var Iq = {};
/**
* @vue/shared v3.5.11
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function Gm(e) {
  const t = /* @__PURE__ */ Object.create(null);
  for (const r of e.split(",")) t[r] = 1;
  return (r) => r in t;
}
const zo = Iq.NODE_ENV !== "production" ? Object.freeze({}) : {}, cx = Iq.NODE_ENV !== "production" ? Object.freeze([]) : [], vc = () => {
}, Lae = () => !1, Xw = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), F8 = (e) => e.startsWith("onUpdate:"), Sl = Object.assign, jI = (e, t) => {
  const r = e.indexOf(t);
  r > -1 && e.splice(r, 1);
}, Pae = Object.prototype.hasOwnProperty, wo = (e, t) => Pae.call(e, t), ia = Array.isArray, Qy = (e) => Nk(e) === "[object Map]", Dq = (e) => Nk(e) === "[object Set]", ya = (e) => typeof e == "function", Wl = (e) => typeof e == "string", zg = (e) => typeof e == "symbol", is = (e) => e !== null && typeof e == "object", UI = (e) => (is(e) || ya(e)) && ya(e.then) && ya(e.catch), Lq = Object.prototype.toString, Nk = (e) => Lq.call(e), VI = (e) => Nk(e).slice(8, -1), Pq = (e) => Nk(e) === "[object Object]", $I = (e) => Wl(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, N3 = /* @__PURE__ */ Gm(
  // the leading comma is intentional so empty string "" is also included
  ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
), Oae = /* @__PURE__ */ Gm(
  "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
), Bk = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (r) => t[r] || (t[r] = e(r));
}, zae = /-(\w)/g, fp = Bk(
  (e) => e.replace(zae, (t, r) => r ? r.toUpperCase() : "")
), Rae = /\B([A-Z])/g, k0 = Bk(
  (e) => e.replace(Rae, "-$1").toLowerCase()
), jk = Bk((e) => e.charAt(0).toUpperCase() + e.slice(1)), zy = Bk(
  (e) => e ? `on${jk(e)}` : ""
), Sh = (e, t) => !Object.is(e, t), I_ = (e, ...t) => {
  for (let r = 0; r < e.length; r++)
    e[r](...t);
}, N8 = (e, t, r, a = !1) => {
  Object.defineProperty(e, t, {
    configurable: !0,
    enumerable: !1,
    writable: a,
    value: r
  });
}, Fae = (e) => {
  const t = parseFloat(e);
  return isNaN(t) ? e : t;
}, Nae = (e) => {
  const t = Wl(e) ? Number(e) : NaN;
  return isNaN(t) ? e : t;
};
let pF;
const qI = () => pF || (pF = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
function hb(e) {
  if (ia(e)) {
    const t = {};
    for (let r = 0; r < e.length; r++) {
      const a = e[r], v = Wl(a) ? Vae(a) : hb(a);
      if (v)
        for (const o in v)
          t[o] = v[o];
    }
    return t;
  } else if (Wl(e) || is(e))
    return e;
}
const Bae = /;(?![^(]*\))/g, jae = /:([^]+)/, Uae = /\/\*[^]*?\*\//g;
function Vae(e) {
  const t = {};
  return e.replace(Uae, "").split(Bae).forEach((r) => {
    if (r) {
      const a = r.split(jae);
      a.length > 1 && (t[a[0].trim()] = a[1].trim());
    }
  }), t;
}
function dg(e) {
  let t = "";
  if (Wl(e))
    t = e;
  else if (ia(e))
    for (let r = 0; r < e.length; r++) {
      const a = dg(e[r]);
      a && (t += a + " ");
    }
  else if (is(e))
    for (const r in e)
      e[r] && (t += r + " ");
  return t.trim();
}
const $ae = "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", qae = "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", Hae = "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", Gae = /* @__PURE__ */ Gm($ae), Wae = /* @__PURE__ */ Gm(qae), Yae = /* @__PURE__ */ Gm(Hae), Zae = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", Xae = /* @__PURE__ */ Gm(Zae);
function Oq(e) {
  return !!e || e === "";
}
const zq = (e) => !!(e && e.__v_isRef === !0), bd = (e) => Wl(e) ? e : e == null ? "" : ia(e) || is(e) && (e.toString === Lq || !ya(e.toString)) ? zq(e) ? bd(e.value) : JSON.stringify(e, Rq, 2) : String(e), Rq = (e, t) => zq(t) ? Rq(e, t.value) : Qy(t) ? {
  [`Map(${t.size})`]: [...t.entries()].reduce(
    (r, [a, v], o) => (r[eS(a, o) + " =>"] = v, r),
    {}
  )
} : Dq(t) ? {
  [`Set(${t.size})`]: [...t.values()].map((r) => eS(r))
} : zg(t) ? eS(t) : is(t) && !ia(t) && !Pq(t) ? String(t) : t, eS = (e, t = "") => {
  var r;
  return (
    // Symbol.description in es2019+ so we need to cast here to pass
    // the lib: es2016 check
    zg(e) ? `Symbol(${(r = e.description) != null ? r : t})` : e
  );
};
var ys = {};
function Cd(e, ...t) {
  console.warn(`[Vue warn] ${e}`, ...t);
}
let Qf;
class Fq {
  constructor(t = !1) {
    this.detached = t, this._active = !0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.parent = Qf, !t && Qf && (this.index = (Qf.scopes || (Qf.scopes = [])).push(
      this
    ) - 1);
  }
  get active() {
    return this._active;
  }
  pause() {
    if (this._active) {
      this._isPaused = !0;
      let t, r;
      if (this.scopes)
        for (t = 0, r = this.scopes.length; t < r; t++)
          this.scopes[t].pause();
      for (t = 0, r = this.effects.length; t < r; t++)
        this.effects[t].pause();
    }
  }
  /**
   * Resumes the effect scope, including all child scopes and effects.
   */
  resume() {
    if (this._active && this._isPaused) {
      this._isPaused = !1;
      let t, r;
      if (this.scopes)
        for (t = 0, r = this.scopes.length; t < r; t++)
          this.scopes[t].resume();
      for (t = 0, r = this.effects.length; t < r; t++)
        this.effects[t].resume();
    }
  }
  run(t) {
    if (this._active) {
      const r = Qf;
      try {
        return Qf = this, t();
      } finally {
        Qf = r;
      }
    } else ys.NODE_ENV !== "production" && Cd("cannot run an inactive effect scope.");
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  on() {
    Qf = this;
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  off() {
    Qf = this.parent;
  }
  stop(t) {
    if (this._active) {
      let r, a;
      for (r = 0, a = this.effects.length; r < a; r++)
        this.effects[r].stop();
      for (r = 0, a = this.cleanups.length; r < a; r++)
        this.cleanups[r]();
      if (this.scopes)
        for (r = 0, a = this.scopes.length; r < a; r++)
          this.scopes[r].stop(!0);
      if (!this.detached && this.parent && !t) {
        const v = this.parent.scopes.pop();
        v && v !== this && (this.parent.scopes[this.index] = v, v.index = this.index);
      }
      this.parent = void 0, this._active = !1;
    }
  }
}
function Nq(e) {
  return new Fq(e);
}
function HI() {
  return Qf;
}
function Bq(e, t = !1) {
  Qf ? Qf.cleanups.push(e) : ys.NODE_ENV !== "production" && !t && Cd(
    "onScopeDispose() is called when there is no active effect scope to be associated with."
  );
}
let ms;
const tS = /* @__PURE__ */ new WeakSet();
class jq {
  constructor(t) {
    this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, Qf && Qf.active && Qf.effects.push(this);
  }
  pause() {
    this.flags |= 64;
  }
  resume() {
    this.flags & 64 && (this.flags &= -65, tS.has(this) && (tS.delete(this), this.trigger()));
  }
  /**
   * @internal
   */
  notify() {
    this.flags & 2 && !(this.flags & 32) || this.flags & 8 || Vq(this);
  }
  run() {
    if (!(this.flags & 1))
      return this.fn();
    this.flags |= 2, mF(this), $q(this);
    const t = ms, r = hp;
    ms = this, hp = !0;
    try {
      return this.fn();
    } finally {
      ys.NODE_ENV !== "production" && ms !== this && Cd(
        "Active effect was not restored correctly - this is likely a Vue internal bug."
      ), qq(this), ms = t, hp = r, this.flags &= -3;
    }
  }
  stop() {
    if (this.flags & 1) {
      for (let t = this.deps; t; t = t.nextDep)
        YI(t);
      this.deps = this.depsTail = void 0, mF(this), this.onStop && this.onStop(), this.flags &= -2;
    }
  }
  trigger() {
    this.flags & 64 ? tS.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
  }
  /**
   * @internal
   */
  runIfDirty() {
    eE(this) && this.run();
  }
  get dirty() {
    return eE(this);
  }
}
let Uq = 0, B3, j3;
function Vq(e, t = !1) {
  if (e.flags |= 8, t) {
    e.next = j3, j3 = e;
    return;
  }
  e.next = B3, B3 = e;
}
function GI() {
  Uq++;
}
function WI() {
  if (--Uq > 0)
    return;
  if (j3) {
    let t = j3;
    for (j3 = void 0; t; ) {
      const r = t.next;
      t.next = void 0, t.flags &= -9, t = r;
    }
  }
  let e;
  for (; B3; ) {
    let t = B3;
    for (B3 = void 0; t; ) {
      const r = t.next;
      if (t.next = void 0, t.flags &= -9, t.flags & 1)
        try {
          t.trigger();
        } catch (a) {
          e || (e = a);
        }
      t = r;
    }
  }
  if (e) throw e;
}
function $q(e) {
  for (let t = e.deps; t; t = t.nextDep)
    t.version = -1, t.prevActiveLink = t.dep.activeLink, t.dep.activeLink = t;
}
function qq(e) {
  let t, r = e.depsTail, a = r;
  for (; a; ) {
    const v = a.prevDep;
    a.version === -1 ? (a === r && (r = v), YI(a), Kae(a)) : t = a, a.dep.activeLink = a.prevActiveLink, a.prevActiveLink = void 0, a = v;
  }
  e.deps = t, e.depsTail = r;
}
function eE(e) {
  for (let t = e.deps; t; t = t.nextDep)
    if (t.dep.version !== t.version || t.dep.computed && (Hq(t.dep.computed) || t.dep.version !== t.version))
      return !0;
  return !!e._dirty;
}
function Hq(e) {
  if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === iw))
    return;
  e.globalVersion = iw;
  const t = e.dep;
  if (e.flags |= 2, t.version > 0 && !e.isSSR && e.deps && !eE(e)) {
    e.flags &= -3;
    return;
  }
  const r = ms, a = hp;
  ms = e, hp = !0;
  try {
    $q(e);
    const v = e.fn(e._value);
    (t.version === 0 || Sh(v, e._value)) && (e._value = v, t.version++);
  } catch (v) {
    throw t.version++, v;
  } finally {
    ms = r, hp = a, qq(e), e.flags &= -3;
  }
}
function YI(e, t = !1) {
  const { dep: r, prevSub: a, nextSub: v } = e;
  if (a && (a.nextSub = v, e.prevSub = void 0), v && (v.prevSub = a, e.nextSub = void 0), r.subs === e && (r.subs = a), ys.NODE_ENV !== "production" && r.subsHead === e && (r.subsHead = v), !r.subs && r.computed) {
    r.computed.flags &= -5;
    for (let o = r.computed.deps; o; o = o.nextDep)
      YI(o, !0);
  }
  !t && !--r.sc && r.map && r.map.delete(r.key);
}
function Kae(e) {
  const { prevDep: t, nextDep: r } = e;
  t && (t.nextDep = r, e.prevDep = void 0), r && (r.prevDep = t, e.nextDep = void 0);
}
let hp = !0;
const Gq = [];
function Wm() {
  Gq.push(hp), hp = !1;
}
function Ym() {
  const e = Gq.pop();
  hp = e === void 0 ? !0 : e;
}
function mF(e) {
  const { cleanup: t } = e;
  if (e.cleanup = void 0, t) {
    const r = ms;
    ms = void 0;
    try {
      t();
    } finally {
      ms = r;
    }
  }
}
let iw = 0;
class Jae {
  constructor(t, r) {
    this.sub = t, this.dep = r, this.version = r.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  }
}
class Uk {
  constructor(t) {
    this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, ys.NODE_ENV !== "production" && (this.subsHead = void 0);
  }
  track(t) {
    if (!ms || !hp || ms === this.computed)
      return;
    let r = this.activeLink;
    if (r === void 0 || r.sub !== ms)
      r = this.activeLink = new Jae(ms, this), ms.deps ? (r.prevDep = ms.depsTail, ms.depsTail.nextDep = r, ms.depsTail = r) : ms.deps = ms.depsTail = r, Wq(r);
    else if (r.version === -1 && (r.version = this.version, r.nextDep)) {
      const a = r.nextDep;
      a.prevDep = r.prevDep, r.prevDep && (r.prevDep.nextDep = a), r.prevDep = ms.depsTail, r.nextDep = void 0, ms.depsTail.nextDep = r, ms.depsTail = r, ms.deps === r && (ms.deps = a);
    }
    return ys.NODE_ENV !== "production" && ms.onTrack && ms.onTrack(
      Sl(
        {
          effect: ms
        },
        t
      )
    ), r;
  }
  trigger(t) {
    this.version++, iw++, this.notify(t);
  }
  notify(t) {
    GI();
    try {
      if (ys.NODE_ENV !== "production")
        for (let r = this.subsHead; r; r = r.nextSub)
          r.sub.onTrigger && !(r.sub.flags & 8) && r.sub.onTrigger(
            Sl(
              {
                effect: r.sub
              },
              t
            )
          );
      for (let r = this.subs; r; r = r.prevSub)
        r.sub.notify() && r.sub.dep.notify();
    } finally {
      WI();
    }
  }
}
function Wq(e) {
  if (e.dep.sc++, e.sub.flags & 4) {
    const t = e.dep.computed;
    if (t && !e.dep.subs) {
      t.flags |= 20;
      for (let a = t.deps; a; a = a.nextDep)
        Wq(a);
    }
    const r = e.dep.subs;
    r !== e && (e.prevSub = r, r && (r.nextSub = e)), ys.NODE_ENV !== "production" && e.dep.subsHead === void 0 && (e.dep.subsHead = e), e.dep.subs = e;
  }
}
const B8 = /* @__PURE__ */ new WeakMap(), ev = Symbol(
  ys.NODE_ENV !== "production" ? "Object iterate" : ""
), tE = Symbol(
  ys.NODE_ENV !== "production" ? "Map keys iterate" : ""
), aw = Symbol(
  ys.NODE_ENV !== "production" ? "Array iterate" : ""
);
function Tc(e, t, r) {
  if (hp && ms) {
    let a = B8.get(e);
    a || B8.set(e, a = /* @__PURE__ */ new Map());
    let v = a.get(r);
    v || (a.set(r, v = new Uk()), v.map = a, v.key = r), ys.NODE_ENV !== "production" ? v.track({
      target: e,
      type: t,
      key: r
    }) : v.track();
  }
}
function m0(e, t, r, a, v, o) {
  const s = B8.get(e);
  if (!s) {
    iw++;
    return;
  }
  const n = (l) => {
    l && (ys.NODE_ENV !== "production" ? l.trigger({
      target: e,
      type: t,
      key: r,
      newValue: a,
      oldValue: v,
      oldTarget: o
    }) : l.trigger());
  };
  if (GI(), t === "clear")
    s.forEach(n);
  else {
    const l = ia(e), u = l && $I(r);
    if (l && r === "length") {
      const i = Number(a);
      s.forEach((h, p) => {
        (p === "length" || p === aw || !zg(p) && p >= i) && n(h);
      });
    } else
      switch (r !== void 0 && n(s.get(r)), u && n(s.get(aw)), t) {
        case "add":
          l ? u && n(s.get("length")) : (n(s.get(ev)), Qy(e) && n(s.get(tE)));
          break;
        case "delete":
          l || (n(s.get(ev)), Qy(e) && n(s.get(tE)));
          break;
        case "set":
          Qy(e) && n(s.get(ev));
          break;
      }
  }
  WI();
}
function Qae(e, t) {
  const r = B8.get(e);
  return r && r.get(t);
}
function P2(e) {
  const t = Ta(e);
  return t === e ? t : (Tc(t, "iterate", aw), sh(e) ? t : t.map(Lf));
}
function Vk(e) {
  return Tc(e = Ta(e), "iterate", aw), e;
}
const eoe = {
  __proto__: null,
  [Symbol.iterator]() {
    return nS(this, Symbol.iterator, Lf);
  },
  concat(...e) {
    return P2(this).concat(
      ...e.map((t) => ia(t) ? P2(t) : t)
    );
  },
  entries() {
    return nS(this, "entries", (e) => (e[1] = Lf(e[1]), e));
  },
  every(e, t) {
    return cm(this, "every", e, t, void 0, arguments);
  },
  filter(e, t) {
    return cm(this, "filter", e, t, (r) => r.map(Lf), arguments);
  },
  find(e, t) {
    return cm(this, "find", e, t, Lf, arguments);
  },
  findIndex(e, t) {
    return cm(this, "findIndex", e, t, void 0, arguments);
  },
  findLast(e, t) {
    return cm(this, "findLast", e, t, Lf, arguments);
  },
  findLastIndex(e, t) {
    return cm(this, "findLastIndex", e, t, void 0, arguments);
  },
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  forEach(e, t) {
    return cm(this, "forEach", e, t, void 0, arguments);
  },
  includes(...e) {
    return rS(this, "includes", e);
  },
  indexOf(...e) {
    return rS(this, "indexOf", e);
  },
  join(e) {
    return P2(this).join(e);
  },
  // keys() iterator only reads `length`, no optimisation required
  lastIndexOf(...e) {
    return rS(this, "lastIndexOf", e);
  },
  map(e, t) {
    return cm(this, "map", e, t, void 0, arguments);
  },
  pop() {
    return D_(this, "pop");
  },
  push(...e) {
    return D_(this, "push", e);
  },
  reduce(e, ...t) {
    return gF(this, "reduce", e, t);
  },
  reduceRight(e, ...t) {
    return gF(this, "reduceRight", e, t);
  },
  shift() {
    return D_(this, "shift");
  },
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  some(e, t) {
    return cm(this, "some", e, t, void 0, arguments);
  },
  splice(...e) {
    return D_(this, "splice", e);
  },
  toReversed() {
    return P2(this).toReversed();
  },
  toSorted(e) {
    return P2(this).toSorted(e);
  },
  toSpliced(...e) {
    return P2(this).toSpliced(...e);
  },
  unshift(...e) {
    return D_(this, "unshift", e);
  },
  values() {
    return nS(this, "values", Lf);
  }
};
function nS(e, t, r) {
  const a = Vk(e), v = a[t]();
  return a !== e && !sh(e) && (v._next = v.next, v.next = () => {
    const o = v._next();
    return o.value && (o.value = r(o.value)), o;
  }), v;
}
const toe = Array.prototype;
function cm(e, t, r, a, v, o) {
  const s = Vk(e), n = s !== e && !sh(e), l = s[t];
  if (l !== toe[t]) {
    const h = l.apply(e, o);
    return n ? Lf(h) : h;
  }
  let u = r;
  s !== e && (n ? u = function(h, p) {
    return r.call(this, Lf(h), p, e);
  } : r.length > 2 && (u = function(h, p) {
    return r.call(this, h, p, e);
  }));
  const i = l.call(s, u, a);
  return n && v ? v(i) : i;
}
function gF(e, t, r, a) {
  const v = Vk(e);
  let o = r;
  return v !== e && (sh(e) ? r.length > 3 && (o = function(s, n, l) {
    return r.call(this, s, n, l, e);
  }) : o = function(s, n, l) {
    return r.call(this, s, Lf(n), l, e);
  }), v[t](o, ...a);
}
function rS(e, t, r) {
  const a = Ta(e);
  Tc(a, "iterate", aw);
  const v = a[t](...r);
  return (v === -1 || v === !1) && ow(r[0]) ? (r[0] = Ta(r[0]), a[t](...r)) : v;
}
function D_(e, t, r = []) {
  Wm(), GI();
  const a = Ta(e)[t].apply(e, r);
  return WI(), Ym(), a;
}
const noe = /* @__PURE__ */ Gm("__proto__,__v_isRef,__isVue"), Yq = new Set(
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(zg)
);
function roe(e) {
  zg(e) || (e = String(e));
  const t = Ta(this);
  return Tc(t, "has", e), t.hasOwnProperty(e);
}
class Zq {
  constructor(t = !1, r = !1) {
    this._isReadonly = t, this._isShallow = r;
  }
  get(t, r, a) {
    const v = this._isReadonly, o = this._isShallow;
    if (r === "__v_isReactive")
      return !v;
    if (r === "__v_isReadonly")
      return v;
    if (r === "__v_isShallow")
      return o;
    if (r === "__v_raw")
      return a === (v ? o ? nH : tH : o ? eH : Qq).get(t) || // receiver is not the reactive proxy, but has the same prototype
      // this means the receiver is a user proxy of the reactive proxy
      Object.getPrototypeOf(t) === Object.getPrototypeOf(a) ? t : void 0;
    const s = ia(t);
    if (!v) {
      let l;
      if (s && (l = eoe[r]))
        return l;
      if (r === "hasOwnProperty")
        return roe;
    }
    const n = Reflect.get(
      t,
      r,
      // if this is a proxy wrapping a ref, return methods using the raw ref
      // as receiver so that we don't have to call `toRaw` on the ref in all
      // its class methods
      fl(t) ? t : a
    );
    return (zg(r) ? Yq.has(r) : noe(r)) || (v || Tc(t, "get", r), o) ? n : fl(n) ? s && $I(r) ? n : n.value : is(n) ? v ? rH(n) : Hk(n) : n;
  }
}
class Xq extends Zq {
  constructor(t = !1) {
    super(!1, t);
  }
  set(t, r, a, v) {
    let o = t[r];
    if (!this._isShallow) {
      const l = Um(o);
      if (!sh(a) && !Um(a) && (o = Ta(o), a = Ta(a)), !ia(t) && fl(o) && !fl(a))
        return l ? !1 : (o.value = a, !0);
    }
    const s = ia(t) && $I(r) ? Number(r) < t.length : wo(t, r), n = Reflect.set(
      t,
      r,
      a,
      fl(t) ? t : v
    );
    return t === Ta(v) && (s ? Sh(a, o) && m0(t, "set", r, a, o) : m0(t, "add", r, a)), n;
  }
  deleteProperty(t, r) {
    const a = wo(t, r), v = t[r], o = Reflect.deleteProperty(t, r);
    return o && a && m0(t, "delete", r, void 0, v), o;
  }
  has(t, r) {
    const a = Reflect.has(t, r);
    return (!zg(r) || !Yq.has(r)) && Tc(t, "has", r), a;
  }
  ownKeys(t) {
    return Tc(
      t,
      "iterate",
      ia(t) ? "length" : ev
    ), Reflect.ownKeys(t);
  }
}
class Kq extends Zq {
  constructor(t = !1) {
    super(!0, t);
  }
  set(t, r) {
    return ys.NODE_ENV !== "production" && Cd(
      `Set operation on key "${String(r)}" failed: target is readonly.`,
      t
    ), !0;
  }
  deleteProperty(t, r) {
    return ys.NODE_ENV !== "production" && Cd(
      `Delete operation on key "${String(r)}" failed: target is readonly.`,
      t
    ), !0;
  }
}
const ioe = /* @__PURE__ */ new Xq(), aoe = /* @__PURE__ */ new Kq(), ooe = /* @__PURE__ */ new Xq(!0), soe = /* @__PURE__ */ new Kq(!0), ZI = (e) => e, $k = (e) => Reflect.getPrototypeOf(e);
function Z5(e, t, r = !1, a = !1) {
  e = e.__v_raw;
  const v = Ta(e), o = Ta(t);
  r || (Sh(t, o) && Tc(v, "get", t), Tc(v, "get", o));
  const { has: s } = $k(v), n = a ? ZI : r ? XI : Lf;
  if (s.call(v, t))
    return n(e.get(t));
  if (s.call(v, o))
    return n(e.get(o));
  e !== v && e.get(t);
}
function X5(e, t = !1) {
  const r = this.__v_raw, a = Ta(r), v = Ta(e);
  return t || (Sh(e, v) && Tc(a, "has", e), Tc(a, "has", v)), e === v ? r.has(e) : r.has(e) || r.has(v);
}
function K5(e, t = !1) {
  return e = e.__v_raw, !t && Tc(Ta(e), "iterate", ev), Reflect.get(e, "size", e);
}
function yF(e, t = !1) {
  !t && !sh(e) && !Um(e) && (e = Ta(e));
  const r = Ta(this);
  return $k(r).has.call(r, e) || (r.add(e), m0(r, "add", e, e)), this;
}
function vF(e, t, r = !1) {
  !r && !sh(t) && !Um(t) && (t = Ta(t));
  const a = Ta(this), { has: v, get: o } = $k(a);
  let s = v.call(a, e);
  s ? ys.NODE_ENV !== "production" && Jq(a, v, e) : (e = Ta(e), s = v.call(a, e));
  const n = o.call(a, e);
  return a.set(e, t), s ? Sh(t, n) && m0(a, "set", e, t, n) : m0(a, "add", e, t), this;
}
function xF(e) {
  const t = Ta(this), { has: r, get: a } = $k(t);
  let v = r.call(t, e);
  v ? ys.NODE_ENV !== "production" && Jq(t, r, e) : (e = Ta(e), v = r.call(t, e));
  const o = a ? a.call(t, e) : void 0, s = t.delete(e);
  return v && m0(t, "delete", e, void 0, o), s;
}
function bF() {
  const e = Ta(this), t = e.size !== 0, r = ys.NODE_ENV !== "production" ? Qy(e) ? new Map(e) : new Set(e) : void 0, a = e.clear();
  return t && m0(e, "clear", void 0, void 0, r), a;
}
function J5(e, t) {
  return function(a, v) {
    const o = this, s = o.__v_raw, n = Ta(s), l = t ? ZI : e ? XI : Lf;
    return !e && Tc(n, "iterate", ev), s.forEach((u, i) => a.call(v, l(u), l(i), o));
  };
}
function Q5(e, t, r) {
  return function(...a) {
    const v = this.__v_raw, o = Ta(v), s = Qy(o), n = e === "entries" || e === Symbol.iterator && s, l = e === "keys" && s, u = v[e](...a), i = r ? ZI : t ? XI : Lf;
    return !t && Tc(
      o,
      "iterate",
      l ? tE : ev
    ), {
      // iterator protocol
      next() {
        const { value: h, done: p } = u.next();
        return p ? { value: h, done: p } : {
          value: n ? [i(h[0]), i(h[1])] : i(h),
          done: p
        };
      },
      // iterable protocol
      [Symbol.iterator]() {
        return this;
      }
    };
  };
}
function A1(e) {
  return function(...t) {
    if (ys.NODE_ENV !== "production") {
      const r = t[0] ? `on key "${t[0]}" ` : "";
      Cd(
        `${jk(e)} operation ${r}failed: target is readonly.`,
        Ta(this)
      );
    }
    return e === "delete" ? !1 : e === "clear" ? void 0 : this;
  };
}
function loe() {
  const e = {
    get(o) {
      return Z5(this, o);
    },
    get size() {
      return K5(this);
    },
    has: X5,
    add: yF,
    set: vF,
    delete: xF,
    clear: bF,
    forEach: J5(!1, !1)
  }, t = {
    get(o) {
      return Z5(this, o, !1, !0);
    },
    get size() {
      return K5(this);
    },
    has: X5,
    add(o) {
      return yF.call(this, o, !0);
    },
    set(o, s) {
      return vF.call(this, o, s, !0);
    },
    delete: xF,
    clear: bF,
    forEach: J5(!1, !0)
  }, r = {
    get(o) {
      return Z5(this, o, !0);
    },
    get size() {
      return K5(this, !0);
    },
    has(o) {
      return X5.call(this, o, !0);
    },
    add: A1("add"),
    set: A1("set"),
    delete: A1("delete"),
    clear: A1("clear"),
    forEach: J5(!0, !1)
  }, a = {
    get(o) {
      return Z5(this, o, !0, !0);
    },
    get size() {
      return K5(this, !0);
    },
    has(o) {
      return X5.call(this, o, !0);
    },
    add: A1("add"),
    set: A1("set"),
    delete: A1("delete"),
    clear: A1("clear"),
    forEach: J5(!0, !0)
  };
  return [
    "keys",
    "values",
    "entries",
    Symbol.iterator
  ].forEach((o) => {
    e[o] = Q5(o, !1, !1), r[o] = Q5(o, !0, !1), t[o] = Q5(o, !1, !0), a[o] = Q5(
      o,
      !0,
      !0
    );
  }), [
    e,
    r,
    t,
    a
  ];
}
const [
  uoe,
  coe,
  foe,
  hoe
] = /* @__PURE__ */ loe();
function qk(e, t) {
  const r = t ? e ? hoe : foe : e ? coe : uoe;
  return (a, v, o) => v === "__v_isReactive" ? !e : v === "__v_isReadonly" ? e : v === "__v_raw" ? a : Reflect.get(
    wo(r, v) && v in a ? r : a,
    v,
    o
  );
}
const doe = {
  get: /* @__PURE__ */ qk(!1, !1)
}, poe = {
  get: /* @__PURE__ */ qk(!1, !0)
}, moe = {
  get: /* @__PURE__ */ qk(!0, !1)
}, goe = {
  get: /* @__PURE__ */ qk(!0, !0)
};
function Jq(e, t, r) {
  const a = Ta(r);
  if (a !== r && t.call(e, a)) {
    const v = VI(e);
    Cd(
      `Reactive ${v} contains both the raw and reactive versions of the same object${v === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
    );
  }
}
const Qq = /* @__PURE__ */ new WeakMap(), eH = /* @__PURE__ */ new WeakMap(), tH = /* @__PURE__ */ new WeakMap(), nH = /* @__PURE__ */ new WeakMap();
function yoe(e) {
  switch (e) {
    case "Object":
    case "Array":
      return 1;
    case "Map":
    case "Set":
    case "WeakMap":
    case "WeakSet":
      return 2;
    default:
      return 0;
  }
}
function voe(e) {
  return e.__v_skip || !Object.isExtensible(e) ? 0 : yoe(VI(e));
}
function Hk(e) {
  return Um(e) ? e : Gk(
    e,
    !1,
    ioe,
    doe,
    Qq
  );
}
function xoe(e) {
  return Gk(
    e,
    !1,
    ooe,
    poe,
    eH
  );
}
function rH(e) {
  return Gk(
    e,
    !0,
    aoe,
    moe,
    tH
  );
}
function Df(e) {
  return Gk(
    e,
    !0,
    soe,
    goe,
    nH
  );
}
function Gk(e, t, r, a, v) {
  if (!is(e))
    return ys.NODE_ENV !== "production" && Cd(
      `value cannot be made ${t ? "readonly" : "reactive"}: ${String(
        e
      )}`
    ), e;
  if (e.__v_raw && !(t && e.__v_isReactive))
    return e;
  const o = v.get(e);
  if (o)
    return o;
  const s = voe(e);
  if (s === 0)
    return e;
  const n = new Proxy(
    e,
    s === 2 ? a : r
  );
  return v.set(e, n), n;
}
function g0(e) {
  return Um(e) ? g0(e.__v_raw) : !!(e && e.__v_isReactive);
}
function Um(e) {
  return !!(e && e.__v_isReadonly);
}
function sh(e) {
  return !!(e && e.__v_isShallow);
}
function ow(e) {
  return e ? !!e.__v_raw : !1;
}
function Ta(e) {
  const t = e && e.__v_raw;
  return t ? Ta(t) : e;
}
function Y1(e) {
  return !wo(e, "__v_skip") && Object.isExtensible(e) && N8(e, "__v_skip", !0), e;
}
const Lf = (e) => is(e) ? Hk(e) : e, XI = (e) => is(e) ? rH(e) : e;
function fl(e) {
  return e ? e.__v_isRef === !0 : !1;
}
function Ys(e) {
  return aH(e, !1);
}
function iH(e) {
  return aH(e, !0);
}
function aH(e, t) {
  return fl(e) ? e : new boe(e, t);
}
class boe {
  constructor(t, r) {
    this.dep = new Uk(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = r ? t : Ta(t), this._value = r ? t : Lf(t), this.__v_isShallow = r;
  }
  get value() {
    return ys.NODE_ENV !== "production" ? this.dep.track({
      target: this,
      type: "get",
      key: "value"
    }) : this.dep.track(), this._value;
  }
  set value(t) {
    const r = this._rawValue, a = this.__v_isShallow || sh(t) || Um(t);
    t = a ? t : Ta(t), Sh(t, r) && (this._rawValue = t, this._value = a ? t : Lf(t), ys.NODE_ENV !== "production" ? this.dep.trigger({
      target: this,
      type: "set",
      key: "value",
      newValue: t,
      oldValue: r
    }) : this.dep.trigger());
  }
}
function pg(e) {
  return fl(e) ? e.value : e;
}
function _F(e) {
  return ya(e) ? e() : pg(e);
}
const _oe = {
  get: (e, t, r) => t === "__v_raw" ? e : pg(Reflect.get(e, t, r)),
  set: (e, t, r, a) => {
    const v = e[t];
    return fl(v) && !fl(r) ? (v.value = r, !0) : Reflect.set(e, t, r, a);
  }
};
function oH(e) {
  return g0(e) ? e : new Proxy(e, _oe);
}
class woe {
  constructor(t) {
    this.__v_isRef = !0, this._value = void 0;
    const r = this.dep = new Uk(), { get: a, set: v } = t(r.track.bind(r), r.trigger.bind(r));
    this._get = a, this._set = v;
  }
  get value() {
    return this._value = this._get();
  }
  set value(t) {
    this._set(t);
  }
}
function koe(e) {
  return new woe(e);
}
function wF(e) {
  ys.NODE_ENV !== "production" && !ow(e) && Cd("toRefs() expects a reactive object but received a plain one.");
  const t = ia(e) ? new Array(e.length) : {};
  for (const r in e)
    t[r] = sH(e, r);
  return t;
}
class Toe {
  constructor(t, r, a) {
    this._object = t, this._key = r, this._defaultValue = a, this.__v_isRef = !0, this._value = void 0;
  }
  get value() {
    const t = this._object[this._key];
    return this._value = t === void 0 ? this._defaultValue : t;
  }
  set value(t) {
    this._object[this._key] = t;
  }
  get dep() {
    return Qae(Ta(this._object), this._key);
  }
}
class Aoe {
  constructor(t) {
    this._getter = t, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
  }
  get value() {
    return this._value = this._getter();
  }
}
function iS(e, t, r) {
  return fl(e) ? e : ya(e) ? new Aoe(e) : is(e) && arguments.length > 1 ? sH(e, t, r) : Ys(e);
}
function sH(e, t, r) {
  const a = e[t];
  return fl(a) ? a : new Toe(e, t, r);
}
class Soe {
  constructor(t, r, a) {
    this.fn = t, this.setter = r, this._value = void 0, this.dep = new Uk(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = iw - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !r, this.isSSR = a;
  }
  /**
   * @internal
   */
  notify() {
    if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
    ms !== this)
      return Vq(this, !0), !0;
  }
  get value() {
    const t = ys.NODE_ENV !== "production" ? this.dep.track({
      target: this,
      type: "get",
      key: "value"
    }) : this.dep.track();
    return Hq(this), t && (t.version = this.dep.version), this._value;
  }
  set value(t) {
    this.setter ? this.setter(t) : ys.NODE_ENV !== "production" && Cd("Write operation failed: computed value is readonly");
  }
}
function Moe(e, t, r = !1) {
  let a, v;
  ya(e) ? a = e : (a = e.get, v = e.set);
  const o = new Soe(a, v, r);
  return ys.NODE_ENV !== "production" && t && !r && (o.onTrack = t.onTrack, o.onTrigger = t.onTrigger), o;
}
const e6 = {}, j8 = /* @__PURE__ */ new WeakMap();
let Ry;
function Eoe(e, t = !1, r = Ry) {
  if (r) {
    let a = j8.get(r);
    a || j8.set(r, a = []), a.push(e);
  } else ys.NODE_ENV !== "production" && !t && Cd(
    "onWatcherCleanup() was called when there was no active watcher to associate with."
  );
}
function Coe(e, t, r = zo) {
  const { immediate: a, deep: v, once: o, scheduler: s, augmentJob: n, call: l } = r, u = (k) => {
    (r.onWarn || Cd)(
      "Invalid watch source: ",
      k,
      "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
    );
  }, i = (k) => v ? k : sh(k) || v === !1 || v === 0 ? q1(k, 1) : q1(k);
  let h, p, _, d, f = !1, c = !1;
  if (fl(e) ? (p = () => e.value, f = sh(e)) : g0(e) ? (p = () => i(e), f = !0) : ia(e) ? (c = !0, f = e.some((k) => g0(k) || sh(k)), p = () => e.map((k) => {
    if (fl(k))
      return k.value;
    if (g0(k))
      return i(k);
    if (ya(k))
      return l ? l(k, 2) : k();
    ys.NODE_ENV !== "production" && u(k);
  })) : ya(e) ? t ? p = l ? () => l(e, 2) : e : p = () => {
    if (_) {
      Wm();
      try {
        _();
      } finally {
        Ym();
      }
    }
    const k = Ry;
    Ry = h;
    try {
      return l ? l(e, 3, [d]) : e(d);
    } finally {
      Ry = k;
    }
  } : (p = vc, ys.NODE_ENV !== "production" && u(e)), t && v) {
    const k = p, S = v === !0 ? 1 / 0 : v;
    p = () => q1(k(), S);
  }
  const g = HI(), m = () => {
    h.stop(), g && jI(g.effects, h);
  };
  if (o && t) {
    const k = t;
    t = (...S) => {
      k(...S), m();
    };
  }
  let x = c ? new Array(e.length).fill(e6) : e6;
  const w = (k) => {
    if (!(!(h.flags & 1) || !h.dirty && !k))
      if (t) {
        const S = h.run();
        if (v || f || (c ? S.some((A, C) => Sh(A, x[C])) : Sh(S, x))) {
          _ && _();
          const A = Ry;
          Ry = h;
          try {
            const C = [
              S,
              // pass undefined as the old value when it's changed for the first time
              x === e6 ? void 0 : c && x[0] === e6 ? [] : x,
              d
            ];
            l ? l(t, 3, C) : (
              // @ts-expect-error
              t(...C)
            ), x = S;
          } finally {
            Ry = A;
          }
        }
      } else
        h.run();
  };
  return n && n(w), h = new jq(p), h.scheduler = s ? () => s(w, !1) : w, d = (k) => Eoe(k, !1, h), _ = h.onStop = () => {
    const k = j8.get(h);
    if (k) {
      if (l)
        l(k, 4);
      else
        for (const S of k) S();
      j8.delete(h);
    }
  }, ys.NODE_ENV !== "production" && (h.onTrack = r.onTrack, h.onTrigger = r.onTrigger), t ? a ? w(!0) : x = h.run() : s ? s(w.bind(null, !0), !0) : h.run(), m.pause = h.pause.bind(h), m.resume = h.resume.bind(h), m.stop = m, m;
}
function q1(e, t = 1 / 0, r) {
  if (t <= 0 || !is(e) || e.__v_skip || (r = r || /* @__PURE__ */ new Set(), r.has(e)))
    return e;
  if (r.add(e), t--, fl(e))
    q1(e.value, t, r);
  else if (ia(e))
    for (let a = 0; a < e.length; a++)
      q1(e[a], t, r);
  else if (Dq(e) || Qy(e))
    e.forEach((a) => {
      q1(a, t, r);
    });
  else if (Pq(e)) {
    for (const a in e)
      q1(e[a], t, r);
    for (const a of Object.getOwnPropertySymbols(e))
      Object.prototype.propertyIsEnumerable.call(e, a) && q1(e[a], t, r);
  }
  return e;
}
var Ar = {};
const tv = [];
function J6(e) {
  tv.push(e);
}
function Q6() {
  tv.pop();
}
let aS = !1;
function wi(e, ...t) {
  if (aS) return;
  aS = !0, Wm();
  const r = tv.length ? tv[tv.length - 1].component : null, a = r && r.appContext.config.warnHandler, v = Ioe();
  if (a)
    db(
      a,
      r,
      11,
      [
        // eslint-disable-next-line no-restricted-syntax
        e + t.map((o) => {
          var s, n;
          return (n = (s = o.toString) == null ? void 0 : s.call(o)) != null ? n : JSON.stringify(o);
        }).join(""),
        r && r.proxy,
        v.map(
          ({ vnode: o }) => `at <${Jk(r, o.type)}>`
        ).join(`
`),
        v
      ]
    );
  else {
    const o = [`[Vue warn]: ${e}`, ...t];
    v.length && o.push(`
`, ...Doe(v)), console.warn(...o);
  }
  Ym(), aS = !1;
}
function Ioe() {
  let e = tv[tv.length - 1];
  if (!e)
    return [];
  const t = [];
  for (; e; ) {
    const r = t[0];
    r && r.vnode === e ? r.recurseCount++ : t.push({
      vnode: e,
      recurseCount: 0
    });
    const a = e.component && e.component.parent;
    e = a && a.vnode;
  }
  return t;
}
function Doe(e) {
  const t = [];
  return e.forEach((r, a) => {
    t.push(...a === 0 ? [] : [`
`], ...Loe(r));
  }), t;
}
function Loe({ vnode: e, recurseCount: t }) {
  const r = t > 0 ? `... (${t} recursive calls)` : "", a = e.component ? e.component.parent == null : !1, v = ` at <${Jk(
    e.component,
    e.type,
    a
  )}`, o = ">" + r;
  return e.props ? [v, ...Poe(e.props), o] : [v + o];
}
function Poe(e) {
  const t = [], r = Object.keys(e);
  return r.slice(0, 3).forEach((a) => {
    t.push(...lH(a, e[a]));
  }), r.length > 3 && t.push(" ..."), t;
}
function lH(e, t, r) {
  return Wl(t) ? (t = JSON.stringify(t), r ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? r ? t : [`${e}=${t}`] : fl(t) ? (t = lH(e, Ta(t.value), !0), r ? t : [`${e}=Ref<`, t, ">"]) : ya(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = Ta(t), r ? t : [`${e}=`, t]);
}
function Ooe(e, t) {
  Ar.NODE_ENV !== "production" && e !== void 0 && (typeof e != "number" ? wi(`${t} is not a valid number - got ${JSON.stringify(e)}.`) : isNaN(e) && wi(`${t} is NaN - the duration expression might be incorrect.`));
}
const KI = {
  sp: "serverPrefetch hook",
  bc: "beforeCreate hook",
  c: "created hook",
  bm: "beforeMount hook",
  m: "mounted hook",
  bu: "beforeUpdate hook",
  u: "updated",
  bum: "beforeUnmount hook",
  um: "unmounted hook",
  a: "activated hook",
  da: "deactivated hook",
  ec: "errorCaptured hook",
  rtc: "renderTracked hook",
  rtg: "renderTriggered hook",
  0: "setup function",
  1: "render function",
  2: "watcher getter",
  3: "watcher callback",
  4: "watcher cleanup function",
  5: "native event handler",
  6: "component event handler",
  7: "vnode hook",
  8: "directive hook",
  9: "transition hook",
  10: "app errorHandler",
  11: "app warnHandler",
  12: "ref function",
  13: "async component loader",
  14: "scheduler flush",
  15: "component update",
  16: "app unmount cleanup function"
};
function db(e, t, r, a) {
  try {
    return a ? e(...a) : e();
  } catch (v) {
    Kw(v, t, r);
  }
}
function mp(e, t, r, a) {
  if (ya(e)) {
    const v = db(e, t, r, a);
    return v && UI(v) && v.catch((o) => {
      Kw(o, t, r);
    }), v;
  }
  if (ia(e)) {
    const v = [];
    for (let o = 0; o < e.length; o++)
      v.push(mp(e[o], t, r, a));
    return v;
  } else Ar.NODE_ENV !== "production" && wi(
    `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`
  );
}
function Kw(e, t, r, a = !0) {
  const v = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: s } = t && t.appContext.config || zo;
  if (t) {
    let n = t.parent;
    const l = t.proxy, u = Ar.NODE_ENV !== "production" ? KI[r] : `https://vuejs.org/error-reference/#runtime-${r}`;
    for (; n; ) {
      const i = n.ec;
      if (i) {
        for (let h = 0; h < i.length; h++)
          if (i[h](e, l, u) === !1)
            return;
      }
      n = n.parent;
    }
    if (o) {
      Wm(), db(o, null, 10, [
        e,
        l,
        u
      ]), Ym();
      return;
    }
  }
  zoe(e, r, v, a, s);
}
function zoe(e, t, r, a = !0, v = !1) {
  if (Ar.NODE_ENV !== "production") {
    const o = KI[t];
    if (r && J6(r), wi(`Unhandled error${o ? ` during execution of ${o}` : ""}`), r && Q6(), a)
      throw e;
    console.error(e);
  } else {
    if (v)
      throw e;
    console.error(e);
  }
}
const th = [];
let t0 = -1;
const fx = [];
let z1 = null, K2 = 0;
const uH = /* @__PURE__ */ Promise.resolve();
let U8 = null;
const Roe = 100;
function nE(e) {
  const t = U8 || uH;
  return e ? t.then(this ? e.bind(this) : e) : t;
}
function Foe(e) {
  let t = t0 + 1, r = th.length;
  for (; t < r; ) {
    const a = t + r >>> 1, v = th[a], o = sw(v);
    o < e || o === e && v.flags & 2 ? t = a + 1 : r = a;
  }
  return t;
}
function Wk(e) {
  if (!(e.flags & 1)) {
    const t = sw(e), r = th[th.length - 1];
    !r || // fast path when the job id is larger than the tail
    !(e.flags & 2) && t >= sw(r) ? th.push(e) : th.splice(Foe(t), 0, e), e.flags |= 1, cH();
  }
}
function cH() {
  U8 || (U8 = uH.then(dH));
}
function fH(e) {
  ia(e) ? fx.push(...e) : z1 && e.id === -1 ? z1.splice(K2 + 1, 0, e) : e.flags & 1 || (fx.push(e), e.flags |= 1), cH();
}
function kF(e, t, r = t0 + 1) {
  for (Ar.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()); r < th.length; r++) {
    const a = th[r];
    if (a && a.flags & 2) {
      if (e && a.id !== e.uid || Ar.NODE_ENV !== "production" && JI(t, a))
        continue;
      th.splice(r, 1), r--, a.flags & 4 && (a.flags &= -2), a(), a.flags & 4 || (a.flags &= -2);
    }
  }
}
function hH(e) {
  if (fx.length) {
    const t = [...new Set(fx)].sort(
      (r, a) => sw(r) - sw(a)
    );
    if (fx.length = 0, z1) {
      z1.push(...t);
      return;
    }
    for (z1 = t, Ar.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), K2 = 0; K2 < z1.length; K2++) {
      const r = z1[K2];
      Ar.NODE_ENV !== "production" && JI(e, r) || (r.flags & 4 && (r.flags &= -2), r.flags & 8 || r(), r.flags &= -2);
    }
    z1 = null, K2 = 0;
  }
}
const sw = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
function dH(e) {
  Ar.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
  const t = Ar.NODE_ENV !== "production" ? (r) => JI(e, r) : vc;
  try {
    for (t0 = 0; t0 < th.length; t0++) {
      const r = th[t0];
      if (r && !(r.flags & 8)) {
        if (Ar.NODE_ENV !== "production" && t(r))
          continue;
        r.flags & 4 && (r.flags &= -2), db(
          r,
          r.i,
          r.i ? 15 : 14
        ), r.flags & 4 || (r.flags &= -2);
      }
    }
  } finally {
    for (; t0 < th.length; t0++) {
      const r = th[t0];
      r && (r.flags &= -2);
    }
    t0 = -1, th.length = 0, hH(e), U8 = null, (th.length || fx.length) && dH(e);
  }
}
function JI(e, t) {
  const r = e.get(t) || 0;
  if (r > Roe) {
    const a = t.i, v = a && iG(a.type);
    return Kw(
      `Maximum recursive updates exceeded${v ? ` in component <${v}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
      null,
      10
    ), !0;
  }
  return e.set(t, r + 1), !1;
}
let c0 = !1;
const e8 = /* @__PURE__ */ new Map();
Ar.NODE_ENV !== "production" && (qI().__VUE_HMR_RUNTIME__ = {
  createRecord: oS(pH),
  rerender: oS(joe),
  reload: oS(Uoe)
});
const mv = /* @__PURE__ */ new Map();
function Noe(e) {
  const t = e.type.__hmrId;
  let r = mv.get(t);
  r || (pH(t, e.type), r = mv.get(t)), r.instances.add(e);
}
function Boe(e) {
  mv.get(e.type.__hmrId).instances.delete(e);
}
function pH(e, t) {
  return mv.has(e) ? !1 : (mv.set(e, {
    initialDef: V8(t),
    instances: /* @__PURE__ */ new Set()
  }), !0);
}
function V8(e) {
  return aG(e) ? e.__vccOpts : e;
}
function joe(e, t) {
  const r = mv.get(e);
  r && (r.initialDef.render = t, [...r.instances].forEach((a) => {
    t && (a.render = t, V8(a.type).render = t), a.renderCache = [], c0 = !0, a.update(), c0 = !1;
  }));
}
function Uoe(e, t) {
  const r = mv.get(e);
  if (!r) return;
  t = V8(t), TF(r.initialDef, t);
  const a = [...r.instances];
  for (let v = 0; v < a.length; v++) {
    const o = a[v], s = V8(o.type);
    let n = e8.get(s);
    n || (s !== r.initialDef && TF(s, t), e8.set(s, n = /* @__PURE__ */ new Set())), n.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (n.add(o), o.ceReload(t.styles), n.delete(o)) : o.parent ? Wk(() => {
      c0 = !0, o.parent.update(), c0 = !1, n.delete(o);
    }) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
      "[HMR] Root or manually mounted instance modified. Full reload required."
    ), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(s);
  }
  fH(() => {
    e8.clear();
  });
}
function TF(e, t) {
  Sl(e, t);
  for (const r in e)
    r !== "__file" && !(r in t) && delete e[r];
}
function oS(e) {
  return (t, r) => {
    try {
      return e(t, r);
    } catch (a) {
      console.error(a), console.warn(
        "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
      );
    }
  };
}
let o0, f3 = [], rE = !1;
function Jw(e, ...t) {
  o0 ? o0.emit(e, ...t) : rE || f3.push({ event: e, args: t });
}
function mH(e, t) {
  var r, a;
  o0 = e, o0 ? (o0.enabled = !0, f3.forEach(({ event: v, args: o }) => o0.emit(v, ...o)), f3 = []) : /* 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
  window.HTMLElement && // also exclude jsdom
  // eslint-disable-next-line no-restricted-syntax
  !((a = (r = window.navigator) == null ? void 0 : r.userAgent) != null && a.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((o) => {
    mH(o, t);
  }), setTimeout(() => {
    o0 || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, rE = !0, f3 = []);
  }, 3e3)) : (rE = !0, f3 = []);
}
function Voe(e, t) {
  Jw("app:init", e, t, {
    Fragment: jc,
    Text: e4,
    Comment: Gu,
    Static: r8
  });
}
function $oe(e) {
  Jw("app:unmount", e);
}
const qoe = /* @__PURE__ */ QI(
  "component:added"
  /* COMPONENT_ADDED */
), gH = /* @__PURE__ */ QI(
  "component:updated"
  /* COMPONENT_UPDATED */
), Hoe = /* @__PURE__ */ QI(
  "component:removed"
  /* COMPONENT_REMOVED */
), Goe = (e) => {
  o0 && typeof o0.cleanupBuffer == "function" && // remove the component if it wasn't buffered
  !o0.cleanupBuffer(e) && Hoe(e);
};
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function QI(e) {
  return (t) => {
    Jw(
      e,
      t.appContext.app,
      t.uid,
      t.parent ? t.parent.uid : void 0,
      t
    );
  };
}
const Woe = /* @__PURE__ */ yH(
  "perf:start"
  /* PERFORMANCE_START */
), Yoe = /* @__PURE__ */ yH(
  "perf:end"
  /* PERFORMANCE_END */
);
function yH(e) {
  return (t, r, a) => {
    Jw(e, t.appContext.app, t.uid, t, r, a);
  };
}
function Zoe(e, t, r) {
  Jw(
    "component:emit",
    e.appContext.app,
    e,
    t,
    r
  );
}
let qc = null, vH = null;
function $8(e) {
  const t = qc;
  return qc = e, vH = e && e.type.__scopeId || null, t;
}
function pb(e, t = qc, r) {
  if (!t || e._n)
    return e;
  const a = (...v) => {
    a._d && zF(-1);
    const o = $8(t);
    let s;
    try {
      s = e(...v);
    } finally {
      $8(o), a._d && zF(1);
    }
    return Ar.NODE_ENV !== "production" && gH(t), s;
  };
  return a._n = !0, a._c = !0, a._d = !0, a;
}
function xH(e) {
  Oae(e) && wi("Do not use built-in directive ids as custom directive id: " + e);
}
function by(e, t, r, a) {
  const v = e.dirs, o = t && t.dirs;
  for (let s = 0; s < v.length; s++) {
    const n = v[s];
    o && (n.oldValue = o[s].value);
    let l = n.dir[a];
    l && (Wm(), mp(l, r, 8, [
      e.el,
      n,
      e,
      t
    ]), Ym());
  }
}
const Xoe = Symbol("_vte"), bH = (e) => e.__isTeleport, R1 = Symbol("_leaveCb"), t6 = Symbol("_enterCb");
function Koe() {
  const e = {
    isMounted: !1,
    isLeaving: !1,
    isUnmounting: !1,
    leavingVNodes: /* @__PURE__ */ new Map()
  };
  return mb(() => {
    e.isMounted = !0;
  }), gb(() => {
    e.isUnmounting = !0;
  }), e;
}
const gd = [Function, Array], _H = {
  mode: String,
  appear: Boolean,
  persisted: Boolean,
  // enter
  onBeforeEnter: gd,
  onEnter: gd,
  onAfterEnter: gd,
  onEnterCancelled: gd,
  // leave
  onBeforeLeave: gd,
  onLeave: gd,
  onAfterLeave: gd,
  onLeaveCancelled: gd,
  // appear
  onBeforeAppear: gd,
  onAppear: gd,
  onAfterAppear: gd,
  onAppearCancelled: gd
}, wH = (e) => {
  const t = e.subTree;
  return t.component ? wH(t.component) : t;
}, Joe = {
  name: "BaseTransition",
  props: _H,
  setup(e, { slots: t }) {
    const r = Xk(), a = Koe();
    return () => {
      const v = t.default && AH(t.default(), !0);
      if (!v || !v.length)
        return;
      const o = kH(v), s = Ta(e), { mode: n } = s;
      if (Ar.NODE_ENV !== "production" && n && n !== "in-out" && n !== "out-in" && n !== "default" && wi(`invalid <transition> mode: ${n}`), a.isLeaving)
        return sS(o);
      const l = AF(o);
      if (!l)
        return sS(o);
      let u = iE(
        l,
        s,
        a,
        r,
        // #11061, ensure enterHooks is fresh after clone
        (p) => u = p
      );
      l.type !== Gu && lw(l, u);
      const i = r.subTree, h = i && AF(i);
      if (h && h.type !== Gu && !Uy(l, h) && wH(r).type !== Gu) {
        const p = iE(
          h,
          s,
          a,
          r
        );
        if (lw(h, p), n === "out-in" && l.type !== Gu)
          return a.isLeaving = !0, p.afterLeave = () => {
            a.isLeaving = !1, r.job.flags & 8 || r.update(), delete p.afterLeave;
          }, sS(o);
        n === "in-out" && l.type !== Gu && (p.delayLeave = (_, d, f) => {
          const c = TH(
            a,
            h
          );
          c[String(h.key)] = h, _[R1] = () => {
            d(), _[R1] = void 0, delete u.delayedLeave;
          }, u.delayedLeave = f;
        });
      }
      return o;
    };
  }
};
function kH(e) {
  let t = e[0];
  if (e.length > 1) {
    let r = !1;
    for (const a of e)
      if (a.type !== Gu) {
        if (Ar.NODE_ENV !== "production" && r) {
          wi(
            "<transition> can only be used on a single element or component. Use <transition-group> for lists."
          );
          break;
        }
        if (t = a, r = !0, Ar.NODE_ENV === "production") break;
      }
  }
  return t;
}
const Qoe = Joe;
function TH(e, t) {
  const { leavingVNodes: r } = e;
  let a = r.get(t.type);
  return a || (a = /* @__PURE__ */ Object.create(null), r.set(t.type, a)), a;
}
function iE(e, t, r, a, v) {
  const {
    appear: o,
    mode: s,
    persisted: n = !1,
    onBeforeEnter: l,
    onEnter: u,
    onAfterEnter: i,
    onEnterCancelled: h,
    onBeforeLeave: p,
    onLeave: _,
    onAfterLeave: d,
    onLeaveCancelled: f,
    onBeforeAppear: c,
    onAppear: g,
    onAfterAppear: m,
    onAppearCancelled: x
  } = t, w = String(e.key), k = TH(r, e), S = (D, L) => {
    D && mp(
      D,
      a,
      9,
      L
    );
  }, A = (D, L) => {
    const E = L[1];
    S(D, L), ia(D) ? D.every((P) => P.length <= 1) && E() : D.length <= 1 && E();
  }, C = {
    mode: s,
    persisted: n,
    beforeEnter(D) {
      let L = l;
      if (!r.isMounted)
        if (o)
          L = c || l;
        else
          return;
      D[R1] && D[R1](
        !0
        /* cancelled */
      );
      const E = k[w];
      E && Uy(e, E) && E.el[R1] && E.el[R1](), S(L, [D]);
    },
    enter(D) {
      let L = u, E = i, P = h;
      if (!r.isMounted)
        if (o)
          L = g || u, E = m || i, P = x || h;
        else
          return;
      let I = !1;
      const M = D[t6] = (O) => {
        I || (I = !0, O ? S(P, [D]) : S(E, [D]), C.delayedLeave && C.delayedLeave(), D[t6] = void 0);
      };
      L ? A(L, [D, M]) : M();
    },
    leave(D, L) {
      const E = String(e.key);
      if (D[t6] && D[t6](
        !0
        /* cancelled */
      ), r.isUnmounting)
        return L();
      S(p, [D]);
      let P = !1;
      const I = D[R1] = (M) => {
        P || (P = !0, L(), M ? S(f, [D]) : S(d, [D]), D[R1] = void 0, k[E] === e && delete k[E]);
      };
      k[E] = e, _ ? A(_, [D, I]) : I();
    },
    clone(D) {
      const L = iE(
        D,
        t,
        r,
        a,
        v
      );
      return v && v(L), L;
    }
  };
  return C;
}
function sS(e) {
  if (Qw(e))
    return e = T0(e), e.children = null, e;
}
function AF(e) {
  if (!Qw(e))
    return bH(e.type) && e.children ? kH(e.children) : e;
  if (Ar.NODE_ENV !== "production" && e.component)
    return e.component.subTree;
  const { shapeFlag: t, children: r } = e;
  if (r) {
    if (t & 16)
      return r[0];
    if (t & 32 && ya(r.default))
      return r.default();
  }
}
function lw(e, t) {
  e.shapeFlag & 6 && e.component ? (e.transition = t, lw(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
}
function AH(e, t = !1, r) {
  let a = [], v = 0;
  for (let o = 0; o < e.length; o++) {
    let s = e[o];
    const n = r == null ? s.key : String(r) + String(s.key != null ? s.key : o);
    s.type === jc ? (s.patchFlag & 128 && v++, a = a.concat(
      AH(s.children, t, n)
    )) : (t || s.type !== Gu) && a.push(n != null ? T0(s, { key: n }) : s);
  }
  if (v > 1)
    for (let o = 0; o < a.length; o++)
      a[o].patchFlag = -2;
  return a;
}
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function Bh(e, t) {
  return ya(e) ? (
    // #8236: extend call and options.name access are considered side-effects
    // by Rollup, so we have to wrap it in a pure-annotated IIFE.
    Sl({ name: e.name }, t, { setup: e })
  ) : e;
}
function SH(e) {
  e.ids = [e.ids[0] + e.ids[2]++ + "-", 0, 0];
}
const ese = /* @__PURE__ */ new WeakSet();
function aE(e, t, r, a, v = !1) {
  if (ia(e)) {
    e.forEach(
      (d, f) => aE(
        d,
        t && (ia(t) ? t[f] : t),
        r,
        a,
        v
      )
    );
    return;
  }
  if (hx(a) && !v)
    return;
  const o = a.shapeFlag & 4 ? oD(a.component) : a.el, s = v ? null : o, { i: n, r: l } = e;
  if (Ar.NODE_ENV !== "production" && !n) {
    wi(
      "Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function."
    );
    return;
  }
  const u = t && t.r, i = n.refs === zo ? n.refs = {} : n.refs, h = n.setupState, p = Ta(h), _ = h === zo ? () => !1 : (d) => Ar.NODE_ENV !== "production" && ese.has(p[d]) ? !1 : wo(p, d);
  if (u != null && u !== l && (Wl(u) ? (i[u] = null, _(u) && (h[u] = null)) : fl(u) && (u.value = null)), ya(l))
    db(l, n, 12, [s, i]);
  else {
    const d = Wl(l), f = fl(l);
    if (d || f) {
      const c = () => {
        if (e.f) {
          const g = d ? _(l) ? h[l] : i[l] : l.value;
          v ? ia(g) && jI(g, o) : ia(g) ? g.includes(o) || g.push(o) : d ? (i[l] = [o], _(l) && (h[l] = i[l])) : (l.value = [o], e.k && (i[e.k] = l.value));
        } else d ? (i[l] = s, _(l) && (h[l] = s)) : f ? (l.value = s, e.k && (i[e.k] = s)) : Ar.NODE_ENV !== "production" && wi("Invalid template ref type:", l, `(${typeof l})`);
      };
      s ? (c.id = -1, Hh(c, r)) : c();
    } else Ar.NODE_ENV !== "production" && wi("Invalid template ref type:", l, `(${typeof l})`);
  }
}
const hx = (e) => !!e.type.__asyncLoader, Qw = (e) => e.type.__isKeepAlive;
function tse(e, t) {
  MH(e, "a", t);
}
function nse(e, t) {
  MH(e, "da", t);
}
function MH(e, t, r = xc) {
  const a = e.__wdc || (e.__wdc = () => {
    let v = r;
    for (; v; ) {
      if (v.isDeactivated)
        return;
      v = v.parent;
    }
    return e();
  });
  if (Yk(t, a, r), r) {
    let v = r.parent;
    for (; v && v.parent; )
      Qw(v.parent.vnode) && rse(a, t, r, v), v = v.parent;
  }
}
function rse(e, t, r, a) {
  const v = Yk(
    t,
    e,
    a,
    !0
    /* prepend */
  );
  CH(() => {
    jI(a[t], v);
  }, r);
}
function Yk(e, t, r = xc, a = !1) {
  if (r) {
    const v = r[e] || (r[e] = []), o = t.__weh || (t.__weh = (...s) => {
      Wm();
      const n = t4(r), l = mp(t, r, e, s);
      return n(), Ym(), l;
    });
    return a ? v.unshift(o) : v.push(o), o;
  } else if (Ar.NODE_ENV !== "production") {
    const v = zy(KI[e].replace(/ hook$/, ""));
    wi(
      `${v} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
    );
  }
}
const Zm = (e) => (t, r = xc) => {
  (!Kk || e === "sp") && Yk(e, (...a) => t(...a), r);
}, EH = Zm("bm"), mb = Zm("m"), ise = Zm(
  "bu"
), ase = Zm("u"), gb = Zm(
  "bum"
), CH = Zm("um"), ose = Zm(
  "sp"
), sse = Zm("rtg"), lse = Zm("rtc");
function use(e, t = xc) {
  Yk("ec", e, t);
}
const cse = Symbol.for("v-ndc");
function t8(e, t, r, a) {
  let v;
  const o = r, s = ia(e);
  if (s || Wl(e)) {
    const n = s && g0(e);
    let l = !1;
    n && (l = !sh(e), e = Vk(e)), v = new Array(e.length);
    for (let u = 0, i = e.length; u < i; u++)
      v[u] = t(
        l ? Lf(e[u]) : e[u],
        u,
        void 0,
        o
      );
  } else if (typeof e == "number") {
    Ar.NODE_ENV !== "production" && !Number.isInteger(e) && wi(`The v-for range expect an integer value but got ${e}.`), v = new Array(e);
    for (let n = 0; n < e; n++)
      v[n] = t(n + 1, n, void 0, o);
  } else if (is(e))
    if (e[Symbol.iterator])
      v = Array.from(
        e,
        (n, l) => t(n, l, void 0, o)
      );
    else {
      const n = Object.keys(e);
      v = new Array(n.length);
      for (let l = 0, u = n.length; l < u; l++) {
        const i = n[l];
        v[l] = t(e[i], i, l, o);
      }
    }
  else
    v = [];
  return v;
}
function IH(e, t, r = {}, a, v) {
  if (qc.ce || qc.parent && hx(qc.parent) && qc.parent.ce)
    return Va(), Qd(
      jc,
      null,
      [Iu("slot", r, a)],
      64
    );
  let o = e[t];
  Ar.NODE_ENV !== "production" && o && o.length > 1 && (wi(
    "SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."
  ), o = () => []), o && o._c && (o._d = !1), Va();
  const s = o && DH(o(r)), n = Qd(
    jc,
    {
      key: (r.key || // slot content array of a dynamic conditional slot may have a branch
      // key attached in the `createSlots` helper, respect that
      s && s.key || `_${t}`) + // #7256 force differentiate fallback content from actual content
      (!s && a ? "_fb" : "")
    },
    s || [],
    s && e._ === 1 ? 64 : -2
  );
  return o && o._c && (o._d = !0), n;
}
function DH(e) {
  return e.some((t) => gv(t) ? !(t.type === Gu || t.type === jc && !DH(t.children)) : !0) ? e : null;
}
const oE = (e) => e ? nG(e) ? oD(e) : oE(e.parent) : null, nv = (
  // Move PURE marker to new line to workaround compiler discarding it
  // due to type annotation
  /* @__PURE__ */ Sl(/* @__PURE__ */ Object.create(null), {
    $: (e) => e,
    $el: (e) => e.vnode.el,
    $data: (e) => e.data,
    $props: (e) => Ar.NODE_ENV !== "production" ? Df(e.props) : e.props,
    $attrs: (e) => Ar.NODE_ENV !== "production" ? Df(e.attrs) : e.attrs,
    $slots: (e) => Ar.NODE_ENV !== "production" ? Df(e.slots) : e.slots,
    $refs: (e) => Ar.NODE_ENV !== "production" ? Df(e.refs) : e.refs,
    $parent: (e) => oE(e.parent),
    $root: (e) => oE(e.root),
    $host: (e) => e.ce,
    $emit: (e) => e.emit,
    $options: (e) => tD(e),
    $forceUpdate: (e) => e.f || (e.f = () => {
      Wk(e.update);
    }),
    $nextTick: (e) => e.n || (e.n = nE.bind(e.proxy)),
    $watch: (e) => Hse.bind(e)
  })
), eD = (e) => e === "_" || e === "$", lS = (e, t) => e !== zo && !e.__isScriptSetup && wo(e, t), LH = {
  get({ _: e }, t) {
    if (t === "__v_skip")
      return !0;
    const { ctx: r, setupState: a, data: v, props: o, accessCache: s, type: n, appContext: l } = e;
    if (Ar.NODE_ENV !== "production" && t === "__isVue")
      return !0;
    let u;
    if (t[0] !== "$") {
      const _ = s[t];
      if (_ !== void 0)
        switch (_) {
          case 1:
            return a[t];
          case 2:
            return v[t];
          case 4:
            return r[t];
          case 3:
            return o[t];
        }
      else {
        if (lS(a, t))
          return s[t] = 1, a[t];
        if (v !== zo && wo(v, t))
          return s[t] = 2, v[t];
        if (
          // only cache other properties when instance has declared (thus stable)
          // props
          (u = e.propsOptions[0]) && wo(u, t)
        )
          return s[t] = 3, o[t];
        if (r !== zo && wo(r, t))
          return s[t] = 4, r[t];
        sE && (s[t] = 0);
      }
    }
    const i = nv[t];
    let h, p;
    if (i)
      return t === "$attrs" ? (Tc(e.attrs, "get", ""), Ar.NODE_ENV !== "production" && W8()) : Ar.NODE_ENV !== "production" && t === "$slots" && Tc(e, "get", t), i(e);
    if (
      // css module (injected by vue-loader)
      (h = n.__cssModules) && (h = h[t])
    )
      return h;
    if (r !== zo && wo(r, t))
      return s[t] = 4, r[t];
    if (
      // global properties
      p = l.config.globalProperties, wo(p, t)
    )
      return p[t];
    Ar.NODE_ENV !== "production" && qc && (!Wl(t) || // #1091 avoid internal isRef/isVNode checks on component instance leading
    // to infinite warning loop
    t.indexOf("__v") !== 0) && (v !== zo && eD(t[0]) && wo(v, t) ? wi(
      `Property ${JSON.stringify(
        t
      )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
    ) : e === qc && wi(
      `Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`
    ));
  },
  set({ _: e }, t, r) {
    const { data: a, setupState: v, ctx: o } = e;
    return lS(v, t) ? (v[t] = r, !0) : Ar.NODE_ENV !== "production" && v.__isScriptSetup && wo(v, t) ? (wi(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : a !== zo && wo(a, t) ? (a[t] = r, !0) : wo(e.props, t) ? (Ar.NODE_ENV !== "production" && wi(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (Ar.NODE_ENV !== "production" && wi(
      `Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`
    ), !1) : (Ar.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(o, t, {
      enumerable: !0,
      configurable: !0,
      value: r
    }) : o[t] = r, !0);
  },
  has({
    _: { data: e, setupState: t, accessCache: r, ctx: a, appContext: v, propsOptions: o }
  }, s) {
    let n;
    return !!r[s] || e !== zo && wo(e, s) || lS(t, s) || (n = o[0]) && wo(n, s) || wo(a, s) || wo(nv, s) || wo(v.config.globalProperties, s);
  },
  defineProperty(e, t, r) {
    return r.get != null ? e._.accessCache[t] = 0 : wo(r, "value") && this.set(e, t, r.value, null), Reflect.defineProperty(e, t, r);
  }
};
Ar.NODE_ENV !== "production" && (LH.ownKeys = (e) => (wi(
  "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
), Reflect.ownKeys(e)));
function fse(e) {
  const t = {};
  return Object.defineProperty(t, "_", {
    configurable: !0,
    enumerable: !1,
    get: () => e
  }), Object.keys(nv).forEach((r) => {
    Object.defineProperty(t, r, {
      configurable: !0,
      enumerable: !1,
      get: () => nv[r](e),
      // intercepted by the proxy so no need for implementation,
      // but needed to prevent set errors
      set: vc
    });
  }), t;
}
function hse(e) {
  const {
    ctx: t,
    propsOptions: [r]
  } = e;
  r && Object.keys(r).forEach((a) => {
    Object.defineProperty(t, a, {
      enumerable: !0,
      configurable: !0,
      get: () => e.props[a],
      set: vc
    });
  });
}
function dse(e) {
  const { ctx: t, setupState: r } = e;
  Object.keys(Ta(r)).forEach((a) => {
    if (!r.__isScriptSetup) {
      if (eD(a[0])) {
        wi(
          `setup() return property ${JSON.stringify(
            a
          )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
        );
        return;
      }
      Object.defineProperty(t, a, {
        enumerable: !0,
        configurable: !0,
        get: () => r[a],
        set: vc
      });
    }
  });
}
function q8(e) {
  return ia(e) ? e.reduce(
    (t, r) => (t[r] = null, t),
    {}
  ) : e;
}
function PH(e, t) {
  return !e || !t ? e || t : ia(e) && ia(t) ? e.concat(t) : Sl({}, q8(e), q8(t));
}
function pse() {
  const e = /* @__PURE__ */ Object.create(null);
  return (t, r) => {
    e[r] ? wi(`${t} property "${r}" is already defined in ${e[r]}.`) : e[r] = t;
  };
}
let sE = !0;
function mse(e) {
  const t = tD(e), r = e.proxy, a = e.ctx;
  sE = !1, t.beforeCreate && SF(t.beforeCreate, e, "bc");
  const {
    // state
    data: v,
    computed: o,
    methods: s,
    watch: n,
    provide: l,
    inject: u,
    // lifecycle
    created: i,
    beforeMount: h,
    mounted: p,
    beforeUpdate: _,
    updated: d,
    activated: f,
    deactivated: c,
    beforeDestroy: g,
    beforeUnmount: m,
    destroyed: x,
    unmounted: w,
    render: k,
    renderTracked: S,
    renderTriggered: A,
    errorCaptured: C,
    serverPrefetch: D,
    // public API
    expose: L,
    inheritAttrs: E,
    // assets
    components: P,
    directives: I,
    filters: M
  } = t, O = Ar.NODE_ENV !== "production" ? pse() : null;
  if (Ar.NODE_ENV !== "production") {
    const [z] = e.propsOptions;
    if (z)
      for (const F in z)
        O("Props", F);
  }
  if (u && gse(u, a, O), s)
    for (const z in s) {
      const F = s[z];
      ya(F) ? (Ar.NODE_ENV !== "production" ? Object.defineProperty(a, z, {
        value: F.bind(r),
        configurable: !0,
        enumerable: !0,
        writable: !0
      }) : a[z] = F.bind(r), Ar.NODE_ENV !== "production" && O("Methods", z)) : Ar.NODE_ENV !== "production" && wi(
        `Method "${z}" has type "${typeof F}" in the component definition. Did you reference the function correctly?`
      );
    }
  if (v) {
    Ar.NODE_ENV !== "production" && !ya(v) && wi(
      "The data option must be a function. Plain object usage is no longer supported."
    );
    const z = v.call(r, r);
    if (Ar.NODE_ENV !== "production" && UI(z) && wi(
      "data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."
    ), !is(z))
      Ar.NODE_ENV !== "production" && wi("data() should return an object.");
    else if (e.data = Hk(z), Ar.NODE_ENV !== "production")
      for (const F in z)
        O("Data", F), eD(F[0]) || Object.defineProperty(a, F, {
          configurable: !0,
          enumerable: !0,
          get: () => z[F],
          set: vc
        });
  }
  if (sE = !0, o)
    for (const z in o) {
      const F = o[z], U = ya(F) ? F.bind(r, r) : ya(F.get) ? F.get.bind(r, r) : vc;
      Ar.NODE_ENV !== "production" && U === vc && wi(`Computed property "${z}" has no getter.`);
      const V = !ya(F) && ya(F.set) ? F.set.bind(r) : Ar.NODE_ENV !== "production" ? () => {
        wi(
          `Write operation failed: computed property "${z}" is readonly.`
        );
      } : vc, $ = Hu({
        get: U,
        set: V
      });
      Object.defineProperty(a, z, {
        enumerable: !0,
        configurable: !0,
        get: () => $.value,
        set: (q) => $.value = q
      }), Ar.NODE_ENV !== "production" && O("Computed", z);
    }
  if (n)
    for (const z in n)
      OH(n[z], a, r, z);
  if (l) {
    const z = ya(l) ? l.call(r) : l;
    Reflect.ownKeys(z).forEach((F) => {
      wse(F, z[F]);
    });
  }
  i && SF(i, e, "c");
  function T(z, F) {
    ia(F) ? F.forEach((U) => z(U.bind(r))) : F && z(F.bind(r));
  }
  if (T(EH, h), T(mb, p), T(ise, _), T(ase, d), T(tse, f), T(nse, c), T(use, C), T(lse, S), T(sse, A), T(gb, m), T(CH, w), T(ose, D), ia(L))
    if (L.length) {
      const z = e.exposed || (e.exposed = {});
      L.forEach((F) => {
        Object.defineProperty(z, F, {
          get: () => r[F],
          set: (U) => r[F] = U
        });
      });
    } else e.exposed || (e.exposed = {});
  k && e.render === vc && (e.render = k), E != null && (e.inheritAttrs = E), P && (e.components = P), I && (e.directives = I), D && SH(e);
}
function gse(e, t, r = vc) {
  ia(e) && (e = lE(e));
  for (const a in e) {
    const v = e[a];
    let o;
    is(v) ? "default" in v ? o = U3(
      v.from || a,
      v.default,
      !0
    ) : o = U3(v.from || a) : o = U3(v), fl(o) ? Object.defineProperty(t, a, {
      enumerable: !0,
      configurable: !0,
      get: () => o.value,
      set: (s) => o.value = s
    }) : t[a] = o, Ar.NODE_ENV !== "production" && r("Inject", a);
  }
}
function SF(e, t, r) {
  mp(
    ia(e) ? e.map((a) => a.bind(t.proxy)) : e.bind(t.proxy),
    t,
    r
  );
}
function OH(e, t, r, a) {
  let v = a.includes(".") ? GH(r, a) : () => r[a];
  if (Wl(e)) {
    const o = t[e];
    ya(o) ? Dm(v, o) : Ar.NODE_ENV !== "production" && wi(`Invalid watch handler specified by key "${e}"`, o);
  } else if (ya(e))
    Dm(v, e.bind(r));
  else if (is(e))
    if (ia(e))
      e.forEach((o) => OH(o, t, r, a));
    else {
      const o = ya(e.handler) ? e.handler.bind(r) : t[e.handler];
      ya(o) ? Dm(v, o, e) : Ar.NODE_ENV !== "production" && wi(`Invalid watch handler specified by key "${e.handler}"`, o);
    }
  else Ar.NODE_ENV !== "production" && wi(`Invalid watch option: "${a}"`, e);
}
function tD(e) {
  const t = e.type, { mixins: r, extends: a } = t, {
    mixins: v,
    optionsCache: o,
    config: { optionMergeStrategies: s }
  } = e.appContext, n = o.get(t);
  let l;
  return n ? l = n : !v.length && !r && !a ? l = t : (l = {}, v.length && v.forEach(
    (u) => H8(l, u, s, !0)
  ), H8(l, t, s)), is(t) && o.set(t, l), l;
}
function H8(e, t, r, a = !1) {
  const { mixins: v, extends: o } = t;
  o && H8(e, o, r, !0), v && v.forEach(
    (s) => H8(e, s, r, !0)
  );
  for (const s in t)
    if (a && s === "expose")
      Ar.NODE_ENV !== "production" && wi(
        '"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.'
      );
    else {
      const n = yse[s] || r && r[s];
      e[s] = n ? n(e[s], t[s]) : t[s];
    }
  return e;
}
const yse = {
  data: MF,
  props: EF,
  emits: EF,
  // objects
  methods: h3,
  computed: h3,
  // lifecycle
  beforeCreate: Kf,
  created: Kf,
  beforeMount: Kf,
  mounted: Kf,
  beforeUpdate: Kf,
  updated: Kf,
  beforeDestroy: Kf,
  beforeUnmount: Kf,
  destroyed: Kf,
  unmounted: Kf,
  activated: Kf,
  deactivated: Kf,
  errorCaptured: Kf,
  serverPrefetch: Kf,
  // assets
  components: h3,
  directives: h3,
  // watch
  watch: xse,
  // provide / inject
  provide: MF,
  inject: vse
};
function MF(e, t) {
  return t ? e ? function() {
    return Sl(
      ya(e) ? e.call(this, this) : e,
      ya(t) ? t.call(this, this) : t
    );
  } : t : e;
}
function vse(e, t) {
  return h3(lE(e), lE(t));
}
function lE(e) {
  if (ia(e)) {
    const t = {};
    for (let r = 0; r < e.length; r++)
      t[e[r]] = e[r];
    return t;
  }
  return e;
}
function Kf(e, t) {
  return e ? [...new Set([].concat(e, t))] : t;
}
function h3(e, t) {
  return e ? Sl(/* @__PURE__ */ Object.create(null), e, t) : t;
}
function EF(e, t) {
  return e ? ia(e) && ia(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : Sl(
    /* @__PURE__ */ Object.create(null),
    q8(e),
    q8(t ?? {})
  ) : t;
}
function xse(e, t) {
  if (!e) return t;
  if (!t) return e;
  const r = Sl(/* @__PURE__ */ Object.create(null), e);
  for (const a in t)
    r[a] = Kf(e[a], t[a]);
  return r;
}
function zH() {
  return {
    app: null,
    config: {
      isNativeTag: Lae,
      performance: !1,
      globalProperties: {},
      optionMergeStrategies: {},
      errorHandler: void 0,
      warnHandler: void 0,
      compilerOptions: {}
    },
    mixins: [],
    components: {},
    directives: {},
    provides: /* @__PURE__ */ Object.create(null),
    optionsCache: /* @__PURE__ */ new WeakMap(),
    propsCache: /* @__PURE__ */ new WeakMap(),
    emitsCache: /* @__PURE__ */ new WeakMap()
  };
}
let bse = 0;
function _se(e, t) {
  return function(a, v = null) {
    ya(a) || (a = Sl({}, a)), v != null && !is(v) && (Ar.NODE_ENV !== "production" && wi("root props passed to app.mount() must be an object."), v = null);
    const o = zH(), s = /* @__PURE__ */ new WeakSet(), n = [];
    let l = !1;
    const u = o.app = {
      _uid: bse++,
      _component: a,
      _props: v,
      _container: null,
      _context: o,
      _instance: null,
      version: BF,
      get config() {
        return o.config;
      },
      set config(i) {
        Ar.NODE_ENV !== "production" && wi(
          "app.config cannot be replaced. Modify individual options instead."
        );
      },
      use(i, ...h) {
        return s.has(i) ? Ar.NODE_ENV !== "production" && wi("Plugin has already been applied to target app.") : i && ya(i.install) ? (s.add(i), i.install(u, ...h)) : ya(i) ? (s.add(i), i(u, ...h)) : Ar.NODE_ENV !== "production" && wi(
          'A plugin must either be a function or an object with an "install" function.'
        ), u;
      },
      mixin(i) {
        return o.mixins.includes(i) ? Ar.NODE_ENV !== "production" && wi(
          "Mixin has already been applied to target app" + (i.name ? `: ${i.name}` : "")
        ) : o.mixins.push(i), u;
      },
      component(i, h) {
        return Ar.NODE_ENV !== "production" && pE(i, o.config), h ? (Ar.NODE_ENV !== "production" && o.components[i] && wi(`Component "${i}" has already been registered in target app.`), o.components[i] = h, u) : o.components[i];
      },
      directive(i, h) {
        return Ar.NODE_ENV !== "production" && xH(i), h ? (Ar.NODE_ENV !== "production" && o.directives[i] && wi(`Directive "${i}" has already been registered in target app.`), o.directives[i] = h, u) : o.directives[i];
      },
      mount(i, h, p) {
        if (l)
          Ar.NODE_ENV !== "production" && wi(
            "App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`"
          );
        else {
          Ar.NODE_ENV !== "production" && i.__vue_app__ && wi(
            "There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first."
          );
          const _ = u._ceVNode || Iu(a, v);
          return _.appContext = o, p === !0 ? p = "svg" : p === !1 && (p = void 0), Ar.NODE_ENV !== "production" && (o.reload = () => {
            e(
              T0(_),
              i,
              p
            );
          }), h && t ? t(_, i) : e(_, i, p), l = !0, u._container = i, i.__vue_app__ = u, Ar.NODE_ENV !== "production" && (u._instance = _.component, Voe(u, BF)), oD(_.component);
        }
      },
      onUnmount(i) {
        Ar.NODE_ENV !== "production" && typeof i != "function" && wi(
          `Expected function as first argument to app.onUnmount(), but got ${typeof i}`
        ), n.push(i);
      },
      unmount() {
        l ? (mp(
          n,
          u._instance,
          16
        ), e(null, u._container), Ar.NODE_ENV !== "production" && (u._instance = null, $oe(u)), delete u._container.__vue_app__) : Ar.NODE_ENV !== "production" && wi("Cannot unmount an app that is not mounted.");
      },
      provide(i, h) {
        return Ar.NODE_ENV !== "production" && i in o.provides && wi(
          `App already provides property with key "${String(i)}". It will be overwritten with the new value.`
        ), o.provides[i] = h, u;
      },
      runWithContext(i) {
        const h = rv;
        rv = u;
        try {
          return i();
        } finally {
          rv = h;
        }
      }
    };
    return u;
  };
}
let rv = null;
function wse(e, t) {
  if (!xc)
    Ar.NODE_ENV !== "production" && wi("provide() can only be used inside setup().");
  else {
    let r = xc.provides;
    const a = xc.parent && xc.parent.provides;
    a === r && (r = xc.provides = Object.create(a)), r[e] = t;
  }
}
function U3(e, t, r = !1) {
  const a = xc || qc;
  if (a || rv) {
    const v = rv ? rv._context.provides : a ? a.parent == null ? a.vnode.appContext && a.vnode.appContext.provides : a.parent.provides : void 0;
    if (v && e in v)
      return v[e];
    if (arguments.length > 1)
      return r && ya(t) ? t.call(a && a.proxy) : t;
    Ar.NODE_ENV !== "production" && wi(`injection "${String(e)}" not found.`);
  } else Ar.NODE_ENV !== "production" && wi("inject() can only be used inside setup() or functional components.");
}
function kse() {
  return !!(xc || qc || rv);
}
const RH = {}, FH = () => Object.create(RH), NH = (e) => Object.getPrototypeOf(e) === RH;
function Tse(e, t, r, a = !1) {
  const v = {}, o = FH();
  e.propsDefaults = /* @__PURE__ */ Object.create(null), BH(e, t, v, o);
  for (const s in e.propsOptions[0])
    s in v || (v[s] = void 0);
  Ar.NODE_ENV !== "production" && UH(t || {}, v, e), r ? e.props = a ? v : xoe(v) : e.type.props ? e.props = v : e.props = o, e.attrs = o;
}
function Ase(e) {
  for (; e; ) {
    if (e.type.__hmrId) return !0;
    e = e.parent;
  }
}
function Sse(e, t, r, a) {
  const {
    props: v,
    attrs: o,
    vnode: { patchFlag: s }
  } = e, n = Ta(v), [l] = e.propsOptions;
  let u = !1;
  if (
    // always force full diff in dev
    // - #1942 if hmr is enabled with sfc component
    // - vite#872 non-sfc component used by sfc component
    !(Ar.NODE_ENV !== "production" && Ase(e)) && (a || s > 0) && !(s & 16)
  ) {
    if (s & 8) {
      const i = e.vnode.dynamicProps;
      for (let h = 0; h < i.length; h++) {
        let p = i[h];
        if (Zk(e.emitsOptions, p))
          continue;
        const _ = t[p];
        if (l)
          if (wo(o, p))
            _ !== o[p] && (o[p] = _, u = !0);
          else {
            const d = fp(p);
            v[d] = uE(
              l,
              n,
              d,
              _,
              e,
              !1
            );
          }
        else
          _ !== o[p] && (o[p] = _, u = !0);
      }
    }
  } else {
    BH(e, t, v, o) && (u = !0);
    let i;
    for (const h in n)
      (!t || // for camelCase
      !wo(t, h) && // it's possible the original props was passed in as kebab-case
      // and converted to camelCase (#955)
      ((i = k0(h)) === h || !wo(t, i))) && (l ? r && // for camelCase
      (r[h] !== void 0 || // for kebab-case
      r[i] !== void 0) && (v[h] = uE(
        l,
        n,
        h,
        void 0,
        e,
        !0
      )) : delete v[h]);
    if (o !== n)
      for (const h in o)
        (!t || !wo(t, h)) && (delete o[h], u = !0);
  }
  u && m0(e.attrs, "set", ""), Ar.NODE_ENV !== "production" && UH(t || {}, v, e);
}
function BH(e, t, r, a) {
  const [v, o] = e.propsOptions;
  let s = !1, n;
  if (t)
    for (let l in t) {
      if (N3(l))
        continue;
      const u = t[l];
      let i;
      v && wo(v, i = fp(l)) ? !o || !o.includes(i) ? r[i] = u : (n || (n = {}))[i] = u : Zk(e.emitsOptions, l) || (!(l in a) || u !== a[l]) && (a[l] = u, s = !0);
    }
  if (o) {
    const l = Ta(r), u = n || zo;
    for (let i = 0; i < o.length; i++) {
      const h = o[i];
      r[h] = uE(
        v,
        l,
        h,
        u[h],
        e,
        !wo(u, h)
      );
    }
  }
  return s;
}
function uE(e, t, r, a, v, o) {
  const s = e[r];
  if (s != null) {
    const n = wo(s, "default");
    if (n && a === void 0) {
      const l = s.default;
      if (s.type !== Function && !s.skipFactory && ya(l)) {
        const { propsDefaults: u } = v;
        if (r in u)
          a = u[r];
        else {
          const i = t4(v);
          a = u[r] = l.call(
            null,
            t
          ), i();
        }
      } else
        a = l;
      v.ce && v.ce._setProp(r, a);
    }
    s[
      0
      /* shouldCast */
    ] && (o && !n ? a = !1 : s[
      1
      /* shouldCastTrue */
    ] && (a === "" || a === k0(r)) && (a = !0));
  }
  return a;
}
const Mse = /* @__PURE__ */ new WeakMap();
function jH(e, t, r = !1) {
  const a = r ? Mse : t.propsCache, v = a.get(e);
  if (v)
    return v;
  const o = e.props, s = {}, n = [];
  let l = !1;
  if (!ya(e)) {
    const i = (h) => {
      l = !0;
      const [p, _] = jH(h, t, !0);
      Sl(s, p), _ && n.push(..._);
    };
    !r && t.mixins.length && t.mixins.forEach(i), e.extends && i(e.extends), e.mixins && e.mixins.forEach(i);
  }
  if (!o && !l)
    return is(e) && a.set(e, cx), cx;
  if (ia(o))
    for (let i = 0; i < o.length; i++) {
      Ar.NODE_ENV !== "production" && !Wl(o[i]) && wi("props must be strings when using array syntax.", o[i]);
      const h = fp(o[i]);
      CF(h) && (s[h] = zo);
    }
  else if (o) {
    Ar.NODE_ENV !== "production" && !is(o) && wi("invalid props options", o);
    for (const i in o) {
      const h = fp(i);
      if (CF(h)) {
        const p = o[i], _ = s[h] = ia(p) || ya(p) ? { type: p } : Sl({}, p), d = _.type;
        let f = !1, c = !0;
        if (ia(d))
          for (let g = 0; g < d.length; ++g) {
            const m = d[g], x = ya(m) && m.name;
            if (x === "Boolean") {
              f = !0;
              break;
            } else x === "String" && (c = !1);
          }
        else
          f = ya(d) && d.name === "Boolean";
        _[
          0
          /* shouldCast */
        ] = f, _[
          1
          /* shouldCastTrue */
        ] = c, (f || wo(_, "default")) && n.push(h);
      }
    }
  }
  const u = [s, n];
  return is(e) && a.set(e, u), u;
}
function CF(e) {
  return e[0] !== "$" && !N3(e) ? !0 : (Ar.NODE_ENV !== "production" && wi(`Invalid prop name: "${e}" is a reserved property.`), !1);
}
function Ese(e) {
  return e === null ? "null" : typeof e == "function" ? e.name || "" : typeof e == "object" && e.constructor && e.constructor.name || "";
}
function UH(e, t, r) {
  const a = Ta(t), v = r.propsOptions[0];
  for (const o in v) {
    let s = v[o];
    s != null && Cse(
      o,
      a[o],
      s,
      Ar.NODE_ENV !== "production" ? Df(a) : a,
      !wo(e, o) && !wo(e, k0(o))
    );
  }
}
function Cse(e, t, r, a, v) {
  const { type: o, required: s, validator: n, skipCheck: l } = r;
  if (s && v) {
    wi('Missing required prop: "' + e + '"');
    return;
  }
  if (!(t == null && !s)) {
    if (o != null && o !== !0 && !l) {
      let u = !1;
      const i = ia(o) ? o : [o], h = [];
      for (let p = 0; p < i.length && !u; p++) {
        const { valid: _, expectedType: d } = Dse(t, i[p]);
        h.push(d || ""), u = _;
      }
      if (!u) {
        wi(Lse(e, t, h));
        return;
      }
    }
    n && !n(t, a) && wi('Invalid prop: custom validator check failed for prop "' + e + '".');
  }
}
const Ise = /* @__PURE__ */ Gm(
  "String,Number,Boolean,Function,Symbol,BigInt"
);
function Dse(e, t) {
  let r;
  const a = Ese(t);
  if (a === "null")
    r = e === null;
  else if (Ise(a)) {
    const v = typeof e;
    r = v === a.toLowerCase(), !r && v === "object" && (r = e instanceof t);
  } else a === "Object" ? r = is(e) : a === "Array" ? r = ia(e) : r = e instanceof t;
  return {
    valid: r,
    expectedType: a
  };
}
function Lse(e, t, r) {
  if (r.length === 0)
    return `Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;
  let a = `Invalid prop: type check failed for prop "${e}". Expected ${r.map(jk).join(" | ")}`;
  const v = r[0], o = VI(t), s = IF(t, v), n = IF(t, o);
  return r.length === 1 && DF(v) && !Pse(v, o) && (a += ` with value ${s}`), a += `, got ${o} `, DF(o) && (a += `with value ${n}.`), a;
}
function IF(e, t) {
  return t === "String" ? `"${e}"` : t === "Number" ? `${Number(e)}` : `${e}`;
}
function DF(e) {
  return ["string", "number", "boolean"].some((r) => e.toLowerCase() === r);
}
function Pse(...e) {
  return e.some((t) => t.toLowerCase() === "boolean");
}
const VH = (e) => e[0] === "_" || e === "$stable", nD = (e) => ia(e) ? e.map(np) : [np(e)], Ose = (e, t, r) => {
  if (t._n)
    return t;
  const a = pb((...v) => (Ar.NODE_ENV !== "production" && xc && (!r || r.root === xc.root) && wi(
    `Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
  ), nD(t(...v))), r);
  return a._c = !1, a;
}, $H = (e, t, r) => {
  const a = e._ctx;
  for (const v in e) {
    if (VH(v)) continue;
    const o = e[v];
    if (ya(o))
      t[v] = Ose(v, o, a);
    else if (o != null) {
      Ar.NODE_ENV !== "production" && wi(
        `Non-function value encountered for slot "${v}". Prefer function slots for better performance.`
      );
      const s = nD(o);
      t[v] = () => s;
    }
  }
}, qH = (e, t) => {
  Ar.NODE_ENV !== "production" && !Qw(e.vnode) && wi(
    "Non-function value encountered for default slot. Prefer function slots for better performance."
  );
  const r = nD(t);
  e.slots.default = () => r;
}, cE = (e, t, r) => {
  for (const a in t)
    (r || a !== "_") && (e[a] = t[a]);
}, zse = (e, t, r) => {
  const a = e.slots = FH();
  if (e.vnode.shapeFlag & 32) {
    const v = t._;
    v ? (cE(a, t, r), r && N8(a, "_", v, !0)) : $H(t, a);
  } else t && qH(e, t);
}, Rse = (e, t, r) => {
  const { vnode: a, slots: v } = e;
  let o = !0, s = zo;
  if (a.shapeFlag & 32) {
    const n = t._;
    n ? Ar.NODE_ENV !== "production" && c0 ? (cE(v, t, r), m0(e, "set", "$slots")) : r && n === 1 ? o = !1 : cE(v, t, r) : (o = !t.$stable, $H(t, v)), s = t;
  } else t && (qH(e, t), s = { default: 1 });
  if (o)
    for (const n in v)
      !VH(n) && s[n] == null && delete v[n];
};
let L_, H1;
function ym(e, t) {
  e.appContext.config.performance && G8() && H1.mark(`vue-${t}-${e.uid}`), Ar.NODE_ENV !== "production" && Woe(e, t, G8() ? H1.now() : Date.now());
}
function vm(e, t) {
  if (e.appContext.config.performance && G8()) {
    const r = `vue-${t}-${e.uid}`, a = r + ":end";
    H1.mark(a), H1.measure(
      `<${Jk(e, e.type)}> ${t}`,
      r,
      a
    ), H1.clearMarks(r), H1.clearMarks(a);
  }
  Ar.NODE_ENV !== "production" && Yoe(e, t, G8() ? H1.now() : Date.now());
}
function G8() {
  return L_ !== void 0 || (typeof window < "u" && window.performance ? (L_ = !0, H1 = window.performance) : L_ = !1), L_;
}
function Fse() {
  const e = [];
  if (Ar.NODE_ENV !== "production" && e.length) {
    const t = e.length > 1;
    console.warn(
      `Feature flag${t ? "s" : ""} ${e.join(", ")} ${t ? "are" : "is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.

For more details, see https://link.vuejs.org/feature-flags.`
    );
  }
}
const Hh = Kse;
function Nse(e) {
  return Bse(e);
}
function Bse(e, t) {
  Fse();
  const r = qI();
  r.__VUE__ = !0, Ar.NODE_ENV !== "production" && mH(r.__VUE_DEVTOOLS_GLOBAL_HOOK__, r);
  const {
    insert: a,
    remove: v,
    patchProp: o,
    createElement: s,
    createText: n,
    createComment: l,
    setText: u,
    setElementText: i,
    parentNode: h,
    nextSibling: p,
    setScopeId: _ = vc,
    insertStaticContent: d
  } = e, f = (ne, ae, se, me = null, ye = null, pe = null, be = void 0, Ae = null, Se = Ar.NODE_ENV !== "production" && c0 ? !1 : !!ae.dynamicChildren) => {
    if (ne === ae)
      return;
    ne && !Uy(ne, ae) && (me = X(ne), K(ne, ye, pe, !0), ne = null), ae.patchFlag === -2 && (Se = !1, ae.dynamicChildren = null);
    const { type: Me, ref: De, shapeFlag: Le } = ae;
    switch (Me) {
      case e4:
        c(ne, ae, se, me);
        break;
      case Gu:
        g(ne, ae, se, me);
        break;
      case r8:
        ne == null ? m(ae, se, me, be) : Ar.NODE_ENV !== "production" && x(ne, ae, se, be);
        break;
      case jc:
        I(
          ne,
          ae,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se
        );
        break;
      default:
        Le & 1 ? S(
          ne,
          ae,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se
        ) : Le & 6 ? M(
          ne,
          ae,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se
        ) : Le & 64 || Le & 128 ? Me.process(
          ne,
          ae,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se,
          ce
        ) : Ar.NODE_ENV !== "production" && wi("Invalid VNode type:", Me, `(${typeof Me})`);
    }
    De != null && ye && aE(De, ne && ne.ref, pe, ae || ne, !ae);
  }, c = (ne, ae, se, me) => {
    if (ne == null)
      a(
        ae.el = n(ae.children),
        se,
        me
      );
    else {
      const ye = ae.el = ne.el;
      ae.children !== ne.children && u(ye, ae.children);
    }
  }, g = (ne, ae, se, me) => {
    ne == null ? a(
      ae.el = l(ae.children || ""),
      se,
      me
    ) : ae.el = ne.el;
  }, m = (ne, ae, se, me) => {
    [ne.el, ne.anchor] = d(
      ne.children,
      ae,
      se,
      me,
      ne.el,
      ne.anchor
    );
  }, x = (ne, ae, se, me) => {
    if (ae.children !== ne.children) {
      const ye = p(ne.anchor);
      k(ne), [ae.el, ae.anchor] = d(
        ae.children,
        se,
        ye,
        me
      );
    } else
      ae.el = ne.el, ae.anchor = ne.anchor;
  }, w = ({ el: ne, anchor: ae }, se, me) => {
    let ye;
    for (; ne && ne !== ae; )
      ye = p(ne), a(ne, se, me), ne = ye;
    a(ae, se, me);
  }, k = ({ el: ne, anchor: ae }) => {
    let se;
    for (; ne && ne !== ae; )
      se = p(ne), v(ne), ne = se;
    v(ae);
  }, S = (ne, ae, se, me, ye, pe, be, Ae, Se) => {
    ae.type === "svg" ? be = "svg" : ae.type === "math" && (be = "mathml"), ne == null ? A(
      ae,
      se,
      me,
      ye,
      pe,
      be,
      Ae,
      Se
    ) : L(
      ne,
      ae,
      ye,
      pe,
      be,
      Ae,
      Se
    );
  }, A = (ne, ae, se, me, ye, pe, be, Ae) => {
    let Se, Me;
    const { props: De, shapeFlag: Le, transition: We, dirs: Ee } = ne;
    if (Se = ne.el = s(
      ne.type,
      pe,
      De && De.is,
      De
    ), Le & 8 ? i(Se, ne.children) : Le & 16 && D(
      ne.children,
      Se,
      null,
      me,
      ye,
      uS(ne, pe),
      be,
      Ae
    ), Ee && by(ne, null, me, "created"), C(Se, ne, ne.scopeId, be, me), De) {
      for (const Ie in De)
        Ie !== "value" && !N3(Ie) && o(Se, Ie, null, De[Ie], pe, me);
      "value" in De && o(Se, "value", null, De.value, pe), (Me = De.onVnodeBeforeMount) && Xp(Me, me, ne);
    }
    Ar.NODE_ENV !== "production" && (N8(Se, "__vnode", ne, !0), N8(Se, "__vueParentComponent", me, !0)), Ee && by(ne, null, me, "beforeMount");
    const Ne = jse(ye, We);
    Ne && We.beforeEnter(Se), a(Se, ae, se), ((Me = De && De.onVnodeMounted) || Ne || Ee) && Hh(() => {
      Me && Xp(Me, me, ne), Ne && We.enter(Se), Ee && by(ne, null, me, "mounted");
    }, ye);
  }, C = (ne, ae, se, me, ye) => {
    if (se && _(ne, se), me)
      for (let pe = 0; pe < me.length; pe++)
        _(ne, me[pe]);
    if (ye) {
      let pe = ye.subTree;
      if (Ar.NODE_ENV !== "production" && pe.patchFlag > 0 && pe.patchFlag & 2048 && (pe = iD(pe.children) || pe), ae === pe || KH(pe.type) && (pe.ssContent === ae || pe.ssFallback === ae)) {
        const be = ye.vnode;
        C(
          ne,
          be,
          be.scopeId,
          be.slotScopeIds,
          ye.parent
        );
      }
    }
  }, D = (ne, ae, se, me, ye, pe, be, Ae, Se = 0) => {
    for (let Me = Se; Me < ne.length; Me++) {
      const De = ne[Me] = Ae ? F1(ne[Me]) : np(ne[Me]);
      f(
        null,
        De,
        ae,
        se,
        me,
        ye,
        pe,
        be,
        Ae
      );
    }
  }, L = (ne, ae, se, me, ye, pe, be) => {
    const Ae = ae.el = ne.el;
    Ar.NODE_ENV !== "production" && (Ae.__vnode = ae);
    let { patchFlag: Se, dynamicChildren: Me, dirs: De } = ae;
    Se |= ne.patchFlag & 16;
    const Le = ne.props || zo, We = ae.props || zo;
    let Ee;
    if (se && _y(se, !1), (Ee = We.onVnodeBeforeUpdate) && Xp(Ee, se, ae, ne), De && by(ae, ne, se, "beforeUpdate"), se && _y(se, !0), Ar.NODE_ENV !== "production" && c0 && (Se = 0, be = !1, Me = null), (Le.innerHTML && We.innerHTML == null || Le.textContent && We.textContent == null) && i(Ae, ""), Me ? (E(
      ne.dynamicChildren,
      Me,
      Ae,
      se,
      me,
      uS(ae, ye),
      pe
    ), Ar.NODE_ENV !== "production" && n8(ne, ae)) : be || U(
      ne,
      ae,
      Ae,
      null,
      se,
      me,
      uS(ae, ye),
      pe,
      !1
    ), Se > 0) {
      if (Se & 16)
        P(Ae, Le, We, se, ye);
      else if (Se & 2 && Le.class !== We.class && o(Ae, "class", null, We.class, ye), Se & 4 && o(Ae, "style", Le.style, We.style, ye), Se & 8) {
        const Ne = ae.dynamicProps;
        for (let Ie = 0; Ie < Ne.length; Ie++) {
          const ge = Ne[Ie], Ce = Le[ge], we = We[ge];
          (we !== Ce || ge === "value") && o(Ae, ge, Ce, we, ye, se);
        }
      }
      Se & 1 && ne.children !== ae.children && i(Ae, ae.children);
    } else !be && Me == null && P(Ae, Le, We, se, ye);
    ((Ee = We.onVnodeUpdated) || De) && Hh(() => {
      Ee && Xp(Ee, se, ae, ne), De && by(ae, ne, se, "updated");
    }, me);
  }, E = (ne, ae, se, me, ye, pe, be) => {
    for (let Ae = 0; Ae < ae.length; Ae++) {
      const Se = ne[Ae], Me = ae[Ae], De = (
        // oldVNode may be an errored async setup() component inside Suspense
        // which will not have a mounted element
        Se.el && // - In the case of a Fragment, we need to provide the actual parent
        // of the Fragment itself so it can move its children.
        (Se.type === jc || // - In the case of different nodes, there is going to be a replacement
        // which also requires the correct parent container
        !Uy(Se, Me) || // - In the case of a component, it could contain anything.
        Se.shapeFlag & 70) ? h(Se.el) : (
          // In other cases, the parent container is not actually used so we
          // just pass the block element here to avoid a DOM parentNode call.
          se
        )
      );
      f(
        Se,
        Me,
        De,
        null,
        me,
        ye,
        pe,
        be,
        !0
      );
    }
  }, P = (ne, ae, se, me, ye) => {
    if (ae !== se) {
      if (ae !== zo)
        for (const pe in ae)
          !N3(pe) && !(pe in se) && o(
            ne,
            pe,
            ae[pe],
            null,
            ye,
            me
          );
      for (const pe in se) {
        if (N3(pe)) continue;
        const be = se[pe], Ae = ae[pe];
        be !== Ae && pe !== "value" && o(ne, pe, Ae, be, ye, me);
      }
      "value" in se && o(ne, "value", ae.value, se.value, ye);
    }
  }, I = (ne, ae, se, me, ye, pe, be, Ae, Se) => {
    const Me = ae.el = ne ? ne.el : n(""), De = ae.anchor = ne ? ne.anchor : n("");
    let { patchFlag: Le, dynamicChildren: We, slotScopeIds: Ee } = ae;
    Ar.NODE_ENV !== "production" && // #5523 dev root fragment may inherit directives
    (c0 || Le & 2048) && (Le = 0, Se = !1, We = null), Ee && (Ae = Ae ? Ae.concat(Ee) : Ee), ne == null ? (a(Me, se, me), a(De, se, me), D(
      // #10007
      // such fragment like `<></>` will be compiled into
      // a fragment which doesn't have a children.
      // In this case fallback to an empty array
      ae.children || [],
      se,
      De,
      ye,
      pe,
      be,
      Ae,
      Se
    )) : Le > 0 && Le & 64 && We && // #2715 the previous fragment could've been a BAILed one as a result
    // of renderSlot() with no valid children
    ne.dynamicChildren ? (E(
      ne.dynamicChildren,
      We,
      se,
      ye,
      pe,
      be,
      Ae
    ), Ar.NODE_ENV !== "production" ? n8(ne, ae) : (
      // #2080 if the stable fragment has a key, it's a <template v-for> that may
      //  get moved around. Make sure all root level vnodes inherit el.
      // #2134 or if it's a component root, it may also get moved around
      // as the component is being moved.
      (ae.key != null || ye && ae === ye.subTree) && n8(
        ne,
        ae,
        !0
        /* shallow */
      )
    )) : U(
      ne,
      ae,
      se,
      De,
      ye,
      pe,
      be,
      Ae,
      Se
    );
  }, M = (ne, ae, se, me, ye, pe, be, Ae, Se) => {
    ae.slotScopeIds = Ae, ne == null ? ae.shapeFlag & 512 ? ye.ctx.activate(
      ae,
      se,
      me,
      be,
      Se
    ) : O(
      ae,
      se,
      me,
      ye,
      pe,
      be,
      Se
    ) : T(ne, ae, Se);
  }, O = (ne, ae, se, me, ye, pe, be) => {
    const Ae = ne.component = ile(
      ne,
      me,
      ye
    );
    if (Ar.NODE_ENV !== "production" && Ae.type.__hmrId && Noe(Ae), Ar.NODE_ENV !== "production" && (J6(ne), ym(Ae, "mount")), Qw(ne) && (Ae.ctx.renderer = ce), Ar.NODE_ENV !== "production" && ym(Ae, "init"), ole(Ae, !1, be), Ar.NODE_ENV !== "production" && vm(Ae, "init"), Ae.asyncDep) {
      if (Ar.NODE_ENV !== "production" && c0 && (ne.el = null), ye && ye.registerDep(Ae, z, be), !ne.el) {
        const Se = Ae.subTree = Iu(Gu);
        g(null, Se, ae, se);
      }
    } else
      z(
        Ae,
        ne,
        ae,
        se,
        ye,
        pe,
        be
      );
    Ar.NODE_ENV !== "production" && (Q6(), vm(Ae, "mount"));
  }, T = (ne, ae, se) => {
    const me = ae.component = ne.component;
    if (Zse(ne, ae, se))
      if (me.asyncDep && !me.asyncResolved) {
        Ar.NODE_ENV !== "production" && J6(ae), F(me, ae, se), Ar.NODE_ENV !== "production" && Q6();
        return;
      } else
        me.next = ae, me.update();
    else
      ae.el = ne.el, me.vnode = ae;
  }, z = (ne, ae, se, me, ye, pe, be) => {
    const Ae = () => {
      if (ne.isMounted) {
        let { next: Le, bu: We, u: Ee, parent: Ne, vnode: Ie } = ne;
        {
          const Re = HH(ne);
          if (Re) {
            Le && (Le.el = Ie.el, F(ne, Le, be)), Re.asyncDep.then(() => {
              ne.isUnmounted || Ae();
            });
            return;
          }
        }
        let ge = Le, Ce;
        Ar.NODE_ENV !== "production" && J6(Le || ne.vnode), _y(ne, !1), Le ? (Le.el = Ie.el, F(ne, Le, be)) : Le = Ie, We && I_(We), (Ce = Le.props && Le.props.onVnodeBeforeUpdate) && Xp(Ce, Ne, Le, Ie), _y(ne, !0), Ar.NODE_ENV !== "production" && ym(ne, "render");
        const we = cS(ne);
        Ar.NODE_ENV !== "production" && vm(ne, "render");
        const Ge = ne.subTree;
        ne.subTree = we, Ar.NODE_ENV !== "production" && ym(ne, "patch"), f(
          Ge,
          we,
          // parent may have changed if it's in a teleport
          h(Ge.el),
          // anchor may have changed if it's in a fragment
          X(Ge),
          ne,
          ye,
          pe
        ), Ar.NODE_ENV !== "production" && vm(ne, "patch"), Le.el = we.el, ge === null && Xse(ne, we.el), Ee && Hh(Ee, ye), (Ce = Le.props && Le.props.onVnodeUpdated) && Hh(
          () => Xp(Ce, Ne, Le, Ie),
          ye
        ), Ar.NODE_ENV !== "production" && gH(ne), Ar.NODE_ENV !== "production" && Q6();
      } else {
        let Le;
        const { el: We, props: Ee } = ae, { bm: Ne, m: Ie, parent: ge, root: Ce, type: we } = ne, Ge = hx(ae);
        if (_y(ne, !1), Ne && I_(Ne), !Ge && (Le = Ee && Ee.onVnodeBeforeMount) && Xp(Le, ge, ae), _y(ne, !0), We && de) {
          const Re = () => {
            Ar.NODE_ENV !== "production" && ym(ne, "render"), ne.subTree = cS(ne), Ar.NODE_ENV !== "production" && vm(ne, "render"), Ar.NODE_ENV !== "production" && ym(ne, "hydrate"), de(
              We,
              ne.subTree,
              ne,
              ye,
              null
            ), Ar.NODE_ENV !== "production" && vm(ne, "hydrate");
          };
          Ge && we.__asyncHydrate ? we.__asyncHydrate(
            We,
            ne,
            Re
          ) : Re();
        } else {
          Ce.ce && Ce.ce._injectChildStyle(we), Ar.NODE_ENV !== "production" && ym(ne, "render");
          const Re = ne.subTree = cS(ne);
          Ar.NODE_ENV !== "production" && vm(ne, "render"), Ar.NODE_ENV !== "production" && ym(ne, "patch"), f(
            null,
            Re,
            se,
            me,
            ne,
            ye,
            pe
          ), Ar.NODE_ENV !== "production" && vm(ne, "patch"), ae.el = Re.el;
        }
        if (Ie && Hh(Ie, ye), !Ge && (Le = Ee && Ee.onVnodeMounted)) {
          const Re = ae;
          Hh(
            () => Xp(Le, ge, Re),
            ye
          );
        }
        (ae.shapeFlag & 256 || ge && hx(ge.vnode) && ge.vnode.shapeFlag & 256) && ne.a && Hh(ne.a, ye), ne.isMounted = !0, Ar.NODE_ENV !== "production" && qoe(ne), ae = se = me = null;
      }
    };
    ne.scope.on();
    const Se = ne.effect = new jq(Ae);
    ne.scope.off();
    const Me = ne.update = Se.run.bind(Se), De = ne.job = Se.runIfDirty.bind(Se);
    De.i = ne, De.id = ne.uid, Se.scheduler = () => Wk(De), _y(ne, !0), Ar.NODE_ENV !== "production" && (Se.onTrack = ne.rtc ? (Le) => I_(ne.rtc, Le) : void 0, Se.onTrigger = ne.rtg ? (Le) => I_(ne.rtg, Le) : void 0), Me();
  }, F = (ne, ae, se) => {
    ae.component = ne;
    const me = ne.vnode.props;
    ne.vnode = ae, ne.next = null, Sse(ne, ae.props, me, se), Rse(ne, ae.children, se), Wm(), kF(ne), Ym();
  }, U = (ne, ae, se, me, ye, pe, be, Ae, Se = !1) => {
    const Me = ne && ne.children, De = ne ? ne.shapeFlag : 0, Le = ae.children, { patchFlag: We, shapeFlag: Ee } = ae;
    if (We > 0) {
      if (We & 128) {
        $(
          Me,
          Le,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se
        );
        return;
      } else if (We & 256) {
        V(
          Me,
          Le,
          se,
          me,
          ye,
          pe,
          be,
          Ae,
          Se
        );
        return;
      }
    }
    Ee & 8 ? (De & 16 && ee(Me, ye, pe), Le !== Me && i(se, Le)) : De & 16 ? Ee & 16 ? $(
      Me,
      Le,
      se,
      me,
      ye,
      pe,
      be,
      Ae,
      Se
    ) : ee(Me, ye, pe, !0) : (De & 8 && i(se, ""), Ee & 16 && D(
      Le,
      se,
      me,
      ye,
      pe,
      be,
      Ae,
      Se
    ));
  }, V = (ne, ae, se, me, ye, pe, be, Ae, Se) => {
    ne = ne || cx, ae = ae || cx;
    const Me = ne.length, De = ae.length, Le = Math.min(Me, De);
    let We;
    for (We = 0; We < Le; We++) {
      const Ee = ae[We] = Se ? F1(ae[We]) : np(ae[We]);
      f(
        ne[We],
        Ee,
        se,
        null,
        ye,
        pe,
        be,
        Ae,
        Se
      );
    }
    Me > De ? ee(
      ne,
      ye,
      pe,
      !0,
      !1,
      Le
    ) : D(
      ae,
      se,
      me,
      ye,
      pe,
      be,
      Ae,
      Se,
      Le
    );
  }, $ = (ne, ae, se, me, ye, pe, be, Ae, Se) => {
    let Me = 0;
    const De = ae.length;
    let Le = ne.length - 1, We = De - 1;
    for (; Me <= Le && Me <= We; ) {
      const Ee = ne[Me], Ne = ae[Me] = Se ? F1(ae[Me]) : np(ae[Me]);
      if (Uy(Ee, Ne))
        f(
          Ee,
          Ne,
          se,
          null,
          ye,
          pe,
          be,
          Ae,
          Se
        );
      else
        break;
      Me++;
    }
    for (; Me <= Le && Me <= We; ) {
      const Ee = ne[Le], Ne = ae[We] = Se ? F1(ae[We]) : np(ae[We]);
      if (Uy(Ee, Ne))
        f(
          Ee,
          Ne,
          se,
          null,
          ye,
          pe,
          be,
          Ae,
          Se
        );
      else
        break;
      Le--, We--;
    }
    if (Me > Le) {
      if (Me <= We) {
        const Ee = We + 1, Ne = Ee < De ? ae[Ee].el : me;
        for (; Me <= We; )
          f(
            null,
            ae[Me] = Se ? F1(ae[Me]) : np(ae[Me]),
            se,
            Ne,
            ye,
            pe,
            be,
            Ae,
            Se
          ), Me++;
      }
    } else if (Me > We)
      for (; Me <= Le; )
        K(ne[Me], ye, pe, !0), Me++;
    else {
      const Ee = Me, Ne = Me, Ie = /* @__PURE__ */ new Map();
      for (Me = Ne; Me <= We; Me++) {
        const tt = ae[Me] = Se ? F1(ae[Me]) : np(ae[Me]);
        tt.key != null && (Ar.NODE_ENV !== "production" && Ie.has(tt.key) && wi(
          "Duplicate keys found during update:",
          JSON.stringify(tt.key),
          "Make sure keys are unique."
        ), Ie.set(tt.key, Me));
      }
      let ge, Ce = 0;
      const we = We - Ne + 1;
      let Ge = !1, Re = 0;
      const je = new Array(we);
      for (Me = 0; Me < we; Me++) je[Me] = 0;
      for (Me = Ee; Me <= Le; Me++) {
        const tt = ne[Me];
        if (Ce >= we) {
          K(tt, ye, pe, !0);
          continue;
        }
        let _e;
        if (tt.key != null)
          _e = Ie.get(tt.key);
        else
          for (ge = Ne; ge <= We; ge++)
            if (je[ge - Ne] === 0 && Uy(tt, ae[ge])) {
              _e = ge;
              break;
            }
        _e === void 0 ? K(tt, ye, pe, !0) : (je[_e - Ne] = Me + 1, _e >= Re ? Re = _e : Ge = !0, f(
          tt,
          ae[_e],
          se,
          null,
          ye,
          pe,
          be,
          Ae,
          Se
        ), Ce++);
      }
      const Ke = Ge ? Use(je) : cx;
      for (ge = Ke.length - 1, Me = we - 1; Me >= 0; Me--) {
        const tt = Ne + Me, _e = ae[tt], Be = tt + 1 < De ? ae[tt + 1].el : me;
        je[Me] === 0 ? f(
          null,
          _e,
          se,
          Be,
          ye,
          pe,
          be,
          Ae,
          Se
        ) : Ge && (ge < 0 || Me !== Ke[ge] ? q(_e, se, Be, 2) : ge--);
      }
    }
  }, q = (ne, ae, se, me, ye = null) => {
    const { el: pe, type: be, transition: Ae, children: Se, shapeFlag: Me } = ne;
    if (Me & 6) {
      q(ne.component.subTree, ae, se, me);
      return;
    }
    if (Me & 128) {
      ne.suspense.move(ae, se, me);
      return;
    }
    if (Me & 64) {
      be.move(ne, ae, se, ce);
      return;
    }
    if (be === jc) {
      a(pe, ae, se);
      for (let Le = 0; Le < Se.length; Le++)
        q(Se[Le], ae, se, me);
      a(ne.anchor, ae, se);
      return;
    }
    if (be === r8) {
      w(ne, ae, se);
      return;
    }
    if (me !== 2 && Me & 1 && Ae)
      if (me === 0)
        Ae.beforeEnter(pe), a(pe, ae, se), Hh(() => Ae.enter(pe), ye);
      else {
        const { leave: Le, delayLeave: We, afterLeave: Ee } = Ae, Ne = () => a(pe, ae, se), Ie = () => {
          Le(pe, () => {
            Ne(), Ee && Ee();
          });
        };
        We ? We(pe, Ne, Ie) : Ie();
      }
    else
      a(pe, ae, se);
  }, K = (ne, ae, se, me = !1, ye = !1) => {
    const {
      type: pe,
      props: be,
      ref: Ae,
      children: Se,
      dynamicChildren: Me,
      shapeFlag: De,
      patchFlag: Le,
      dirs: We,
      cacheIndex: Ee
    } = ne;
    if (Le === -2 && (ye = !1), Ae != null && aE(Ae, null, se, ne, !0), Ee != null && (ae.renderCache[Ee] = void 0), De & 256) {
      ae.ctx.deactivate(ne);
      return;
    }
    const Ne = De & 1 && We, Ie = !hx(ne);
    let ge;
    if (Ie && (ge = be && be.onVnodeBeforeUnmount) && Xp(ge, ae, ne), De & 6)
      te(ne.component, se, me);
    else {
      if (De & 128) {
        ne.suspense.unmount(se, me);
        return;
      }
      Ne && by(ne, null, ae, "beforeUnmount"), De & 64 ? ne.type.remove(
        ne,
        ae,
        se,
        ce,
        me
      ) : Me && // #5154
      // when v-once is used inside a block, setBlockTracking(-1) marks the
      // parent block with hasOnce: true
      // so that it doesn't take the fast path during unmount - otherwise
      // components nested in v-once are never unmounted.
      !Me.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
      (pe !== jc || Le > 0 && Le & 64) ? ee(
        Me,
        ae,
        se,
        !1,
        !0
      ) : (pe === jc && Le & 384 || !ye && De & 16) && ee(Se, ae, se), me && re(ne);
    }
    (Ie && (ge = be && be.onVnodeUnmounted) || Ne) && Hh(() => {
      ge && Xp(ge, ae, ne), Ne && by(ne, null, ae, "unmounted");
    }, se);
  }, re = (ne) => {
    const { type: ae, el: se, anchor: me, transition: ye } = ne;
    if (ae === jc) {
      Ar.NODE_ENV !== "production" && ne.patchFlag > 0 && ne.patchFlag & 2048 && ye && !ye.persisted ? ne.children.forEach((be) => {
        be.type === Gu ? v(be.el) : re(be);
      }) : Y(se, me);
      return;
    }
    if (ae === r8) {
      k(ne);
      return;
    }
    const pe = () => {
      v(se), ye && !ye.persisted && ye.afterLeave && ye.afterLeave();
    };
    if (ne.shapeFlag & 1 && ye && !ye.persisted) {
      const { leave: be, delayLeave: Ae } = ye, Se = () => be(se, pe);
      Ae ? Ae(ne.el, pe, Se) : Se();
    } else
      pe();
  }, Y = (ne, ae) => {
    let se;
    for (; ne !== ae; )
      se = p(ne), v(ne), ne = se;
    v(ae);
  }, te = (ne, ae, se) => {
    Ar.NODE_ENV !== "production" && ne.type.__hmrId && Boe(ne);
    const { bum: me, scope: ye, job: pe, subTree: be, um: Ae, m: Se, a: Me } = ne;
    LF(Se), LF(Me), me && I_(me), ye.stop(), pe && (pe.flags |= 8, K(be, ne, ae, se)), Ae && Hh(Ae, ae), Hh(() => {
      ne.isUnmounted = !0;
    }, ae), ae && ae.pendingBranch && !ae.isUnmounted && ne.asyncDep && !ne.asyncResolved && ne.suspenseId === ae.pendingId && (ae.deps--, ae.deps === 0 && ae.resolve()), Ar.NODE_ENV !== "production" && Goe(ne);
  }, ee = (ne, ae, se, me = !1, ye = !1, pe = 0) => {
    for (let be = pe; be < ne.length; be++)
      K(ne[be], ae, se, me, ye);
  }, X = (ne) => {
    if (ne.shapeFlag & 6)
      return X(ne.component.subTree);
    if (ne.shapeFlag & 128)
      return ne.suspense.next();
    const ae = p(ne.anchor || ne.el), se = ae && ae[Xoe];
    return se ? p(se) : ae;
  };
  let Q = !1;
  const ue = (ne, ae, se) => {
    ne == null ? ae._vnode && K(ae._vnode, null, null, !0) : f(
      ae._vnode || null,
      ne,
      ae,
      null,
      null,
      null,
      se
    ), ae._vnode = ne, Q || (Q = !0, kF(), hH(), Q = !1);
  }, ce = {
    p: f,
    um: K,
    m: q,
    r: re,
    mt: O,
    mc: D,
    pc: U,
    pbc: E,
    n: X,
    o: e
  };
  let he, de;
  return {
    render: ue,
    hydrate: he,
    createApp: _se(ue, he)
  };
}
function uS({ type: e, props: t }, r) {
  return r === "svg" && e === "foreignObject" || r === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : r;
}
function _y({ effect: e, job: t }, r) {
  r ? (e.flags |= 32, t.flags |= 4) : (e.flags &= -33, t.flags &= -5);
}
function jse(e, t) {
  return (!e || e && !e.pendingBranch) && t && !t.persisted;
}
function n8(e, t, r = !1) {
  const a = e.children, v = t.children;
  if (ia(a) && ia(v))
    for (let o = 0; o < a.length; o++) {
      const s = a[o];
      let n = v[o];
      n.shapeFlag & 1 && !n.dynamicChildren && ((n.patchFlag <= 0 || n.patchFlag === 32) && (n = v[o] = F1(v[o]), n.el = s.el), !r && n.patchFlag !== -2 && n8(s, n)), n.type === e4 && (n.el = s.el), Ar.NODE_ENV !== "production" && n.type === Gu && !n.el && (n.el = s.el);
    }
}
function Use(e) {
  const t = e.slice(), r = [0];
  let a, v, o, s, n;
  const l = e.length;
  for (a = 0; a < l; a++) {
    const u = e[a];
    if (u !== 0) {
      if (v = r[r.length - 1], e[v] < u) {
        t[a] = v, r.push(a);
        continue;
      }
      for (o = 0, s = r.length - 1; o < s; )
        n = o + s >> 1, e[r[n]] < u ? o = n + 1 : s = n;
      u < e[r[o]] && (o > 0 && (t[a] = r[o - 1]), r[o] = a);
    }
  }
  for (o = r.length, s = r[o - 1]; o-- > 0; )
    r[o] = s, s = t[s];
  return r;
}
function HH(e) {
  const t = e.subTree.component;
  if (t)
    return t.asyncDep && !t.asyncResolved ? t : HH(t);
}
function LF(e) {
  if (e)
    for (let t = 0; t < e.length; t++)
      e[t].flags |= 8;
}
const Vse = Symbol.for("v-scx"), $se = () => {
  {
    const e = U3(Vse);
    return e || Ar.NODE_ENV !== "production" && wi(
      "Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."
    ), e;
  }
};
function qse(e, t) {
  return rD(
    e,
    null,
    Ar.NODE_ENV !== "production" ? Sl({}, t, { flush: "sync" }) : { flush: "sync" }
  );
}
function Dm(e, t, r) {
  return Ar.NODE_ENV !== "production" && !ya(t) && wi(
    "`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."
  ), rD(e, t, r);
}
function rD(e, t, r = zo) {
  const { immediate: a, deep: v, flush: o, once: s } = r;
  Ar.NODE_ENV !== "production" && !t && (a !== void 0 && wi(
    'watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'
  ), v !== void 0 && wi(
    'watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'
  ), s !== void 0 && wi(
    'watch() "once" option is only respected when using the watch(source, callback, options?) signature.'
  ));
  const n = Sl({}, r);
  Ar.NODE_ENV !== "production" && (n.onWarn = wi);
  let l;
  if (Kk)
    if (o === "sync") {
      const p = $se();
      l = p.__watcherHandles || (p.__watcherHandles = []);
    } else if (!t || a)
      n.once = !0;
    else {
      const p = () => {
      };
      return p.stop = vc, p.resume = vc, p.pause = vc, p;
    }
  const u = xc;
  n.call = (p, _, d) => mp(p, u, _, d);
  let i = !1;
  o === "post" ? n.scheduler = (p) => {
    Hh(p, u && u.suspense);
  } : o !== "sync" && (i = !0, n.scheduler = (p, _) => {
    _ ? p() : Wk(p);
  }), n.augmentJob = (p) => {
    t && (p.flags |= 4), i && (p.flags |= 2, u && (p.id = u.uid, p.i = u));
  };
  const h = Coe(e, t, n);
  return l && l.push(h), h;
}
function Hse(e, t, r) {
  const a = this.proxy, v = Wl(e) ? e.includes(".") ? GH(a, e) : () => a[e] : e.bind(a, a);
  let o;
  ya(t) ? o = t : (o = t.handler, r = t);
  const s = t4(this), n = rD(v, o.bind(a), r);
  return s(), n;
}
function GH(e, t) {
  const r = t.split(".");
  return () => {
    let a = e;
    for (let v = 0; v < r.length && a; v++)
      a = a[r[v]];
    return a;
  };
}
function WH(e, t, r = zo) {
  const a = Xk();
  if (Ar.NODE_ENV !== "production" && !a)
    return wi("useModel() called without active instance."), Ys();
  if (Ar.NODE_ENV !== "production" && !a.propsOptions[0][t])
    return wi(`useModel() called with prop "${t}" which is not declared.`), Ys();
  const v = fp(t), o = k0(t), s = YH(e, t), n = koe((l, u) => {
    let i, h = zo, p;
    return qse(() => {
      const _ = e[t];
      Sh(i, _) && (i = _, u());
    }), {
      get() {
        return l(), r.get ? r.get(i) : i;
      },
      set(_) {
        const d = r.set ? r.set(_) : _;
        if (!Sh(d, i) && !(h !== zo && Sh(_, h)))
          return;
        const f = a.vnode.props;
        f && // check if parent has passed v-model
        (t in f || v in f || o in f) && (`onUpdate:${t}` in f || `onUpdate:${v}` in f || `onUpdate:${o}` in f) || (i = _, u()), a.emit(`update:${t}`, d), Sh(_, d) && Sh(_, h) && !Sh(d, p) && u(), h = _, p = d;
      }
    };
  });
  return n[Symbol.iterator] = () => {
    let l = 0;
    return {
      next() {
        return l < 2 ? { value: l++ ? s || zo : n, done: !1 } : { done: !0 };
      }
    };
  }, n;
}
const YH = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${fp(t)}Modifiers`] || e[`${k0(t)}Modifiers`];
function Gse(e, t, ...r) {
  if (e.isUnmounted) return;
  const a = e.vnode.props || zo;
  if (Ar.NODE_ENV !== "production") {
    const {
      emitsOptions: i,
      propsOptions: [h]
    } = e;
    if (i)
      if (!(t in i))
        (!h || !(zy(fp(t)) in h)) && wi(
          `Component emitted event "${t}" but it is neither declared in the emits option nor as an "${zy(fp(t))}" prop.`
        );
      else {
        const p = i[t];
        ya(p) && (p(...r) || wi(
          `Invalid event arguments: event validation failed for event "${t}".`
        ));
      }
  }
  let v = r;
  const o = t.startsWith("update:"), s = o && YH(a, t.slice(7));
  if (s && (s.trim && (v = r.map((i) => Wl(i) ? i.trim() : i)), s.number && (v = r.map(Fae))), Ar.NODE_ENV !== "production" && Zoe(e, t, v), Ar.NODE_ENV !== "production") {
    const i = t.toLowerCase();
    i !== t && a[zy(i)] && wi(
      `Event "${i}" is emitted in component ${Jk(
        e,
        e.type
      )} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${k0(
        t
      )}" instead of "${t}".`
    );
  }
  let n, l = a[n = zy(t)] || // also try camelCase event handler (#2249)
  a[n = zy(fp(t))];
  !l && o && (l = a[n = zy(k0(t))]), l && mp(
    l,
    e,
    6,
    v
  );
  const u = a[n + "Once"];
  if (u) {
    if (!e.emitted)
      e.emitted = {};
    else if (e.emitted[n])
      return;
    e.emitted[n] = !0, mp(
      u,
      e,
      6,
      v
    );
  }
}
function ZH(e, t, r = !1) {
  const a = t.emitsCache, v = a.get(e);
  if (v !== void 0)
    return v;
  const o = e.emits;
  let s = {}, n = !1;
  if (!ya(e)) {
    const l = (u) => {
      const i = ZH(u, t, !0);
      i && (n = !0, Sl(s, i));
    };
    !r && t.mixins.length && t.mixins.forEach(l), e.extends && l(e.extends), e.mixins && e.mixins.forEach(l);
  }
  return !o && !n ? (is(e) && a.set(e, null), null) : (ia(o) ? o.forEach((l) => s[l] = null) : Sl(s, o), is(e) && a.set(e, s), s);
}
function Zk(e, t) {
  return !e || !Xw(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), wo(e, t[0].toLowerCase() + t.slice(1)) || wo(e, k0(t)) || wo(e, t));
}
let fE = !1;
function W8() {
  fE = !0;
}
function cS(e) {
  const {
    type: t,
    vnode: r,
    proxy: a,
    withProxy: v,
    propsOptions: [o],
    slots: s,
    attrs: n,
    emit: l,
    render: u,
    renderCache: i,
    props: h,
    data: p,
    setupState: _,
    ctx: d,
    inheritAttrs: f
  } = e, c = $8(e);
  let g, m;
  Ar.NODE_ENV !== "production" && (fE = !1);
  try {
    if (r.shapeFlag & 4) {
      const k = v || a, S = Ar.NODE_ENV !== "production" && _.__isScriptSetup ? new Proxy(k, {
        get(A, C, D) {
          return wi(
            `Property '${String(
              C
            )}' was accessed via 'this'. Avoid using 'this' in templates.`
          ), Reflect.get(A, C, D);
        }
      }) : k;
      g = np(
        u.call(
          S,
          k,
          i,
          Ar.NODE_ENV !== "production" ? Df(h) : h,
          _,
          p,
          d
        )
      ), m = n;
    } else {
      const k = t;
      Ar.NODE_ENV !== "production" && n === h && W8(), g = np(
        k.length > 1 ? k(
          Ar.NODE_ENV !== "production" ? Df(h) : h,
          Ar.NODE_ENV !== "production" ? {
            get attrs() {
              return W8(), Df(n);
            },
            slots: s,
            emit: l
          } : { attrs: n, slots: s, emit: l }
        ) : k(
          Ar.NODE_ENV !== "production" ? Df(h) : h,
          null
        )
      ), m = t.props ? n : Wse(n);
    }
  } catch (k) {
    V3.length = 0, Kw(k, e, 1), g = Iu(Gu);
  }
  let x = g, w;
  if (Ar.NODE_ENV !== "production" && g.patchFlag > 0 && g.patchFlag & 2048 && ([x, w] = XH(g)), m && f !== !1) {
    const k = Object.keys(m), { shapeFlag: S } = x;
    if (k.length) {
      if (S & 7)
        o && k.some(F8) && (m = Yse(
          m,
          o
        )), x = T0(x, m, !1, !0);
      else if (Ar.NODE_ENV !== "production" && !fE && x.type !== Gu) {
        const A = Object.keys(n), C = [], D = [];
        for (let L = 0, E = A.length; L < E; L++) {
          const P = A[L];
          Xw(P) ? F8(P) || C.push(P[2].toLowerCase() + P.slice(3)) : D.push(P);
        }
        D.length && wi(
          `Extraneous non-props attributes (${D.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
        ), C.length && wi(
          `Extraneous non-emits event listeners (${C.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
        );
      }
    }
  }
  return r.dirs && (Ar.NODE_ENV !== "production" && !PF(x) && wi(
    "Runtime directive used on component with non-element root node. The directives will not function as intended."
  ), x = T0(x, null, !1, !0), x.dirs = x.dirs ? x.dirs.concat(r.dirs) : r.dirs), r.transition && (Ar.NODE_ENV !== "production" && !PF(x) && wi(
    "Component inside <Transition> renders non-element root node that cannot be animated."
  ), lw(x, r.transition)), Ar.NODE_ENV !== "production" && w ? w(x) : g = x, $8(c), g;
}
const XH = (e) => {
  const t = e.children, r = e.dynamicChildren, a = iD(t, !1);
  if (a) {
    if (Ar.NODE_ENV !== "production" && a.patchFlag > 0 && a.patchFlag & 2048)
      return XH(a);
  } else return [e, void 0];
  const v = t.indexOf(a), o = r ? r.indexOf(a) : -1, s = (n) => {
    t[v] = n, r && (o > -1 ? r[o] = n : n.patchFlag > 0 && (e.dynamicChildren = [...r, n]));
  };
  return [np(a), s];
};
function iD(e, t = !0) {
  let r;
  for (let a = 0; a < e.length; a++) {
    const v = e[a];
    if (gv(v)) {
      if (v.type !== Gu || v.children === "v-if") {
        if (r)
          return;
        if (r = v, Ar.NODE_ENV !== "production" && t && r.patchFlag > 0 && r.patchFlag & 2048)
          return iD(r.children);
      }
    } else
      return;
  }
  return r;
}
const Wse = (e) => {
  let t;
  for (const r in e)
    (r === "class" || r === "style" || Xw(r)) && ((t || (t = {}))[r] = e[r]);
  return t;
}, Yse = (e, t) => {
  const r = {};
  for (const a in e)
    (!F8(a) || !(a.slice(9) in t)) && (r[a] = e[a]);
  return r;
}, PF = (e) => e.shapeFlag & 7 || e.type === Gu;
function Zse(e, t, r) {
  const { props: a, children: v, component: o } = e, { props: s, children: n, patchFlag: l } = t, u = o.emitsOptions;
  if (Ar.NODE_ENV !== "production" && (v || n) && c0 || t.dirs || t.transition)
    return !0;
  if (r && l >= 0) {
    if (l & 1024)
      return !0;
    if (l & 16)
      return a ? OF(a, s, u) : !!s;
    if (l & 8) {
      const i = t.dynamicProps;
      for (let h = 0; h < i.length; h++) {
        const p = i[h];
        if (s[p] !== a[p] && !Zk(u, p))
          return !0;
      }
    }
  } else
    return (v || n) && (!n || !n.$stable) ? !0 : a === s ? !1 : a ? s ? OF(a, s, u) : !0 : !!s;
  return !1;
}
function OF(e, t, r) {
  const a = Object.keys(t);
  if (a.length !== Object.keys(e).length)
    return !0;
  for (let v = 0; v < a.length; v++) {
    const o = a[v];
    if (t[o] !== e[o] && !Zk(r, o))
      return !0;
  }
  return !1;
}
function Xse({ vnode: e, parent: t }, r) {
  for (; t; ) {
    const a = t.subTree;
    if (a.suspense && a.suspense.activeBranch === e && (a.el = e.el), a === e)
      (e = t.vnode).el = r, t = t.parent;
    else
      break;
  }
}
const KH = (e) => e.__isSuspense;
function Kse(e, t) {
  t && t.pendingBranch ? ia(e) ? t.effects.push(...e) : t.effects.push(e) : fH(e);
}
const jc = Symbol.for("v-fgt"), e4 = Symbol.for("v-txt"), Gu = Symbol.for("v-cmt"), r8 = Symbol.for("v-stc"), V3 = [];
let Xh = null;
function Va(e = !1) {
  V3.push(Xh = e ? null : []);
}
function Jse() {
  V3.pop(), Xh = V3[V3.length - 1] || null;
}
let uw = 1;
function zF(e) {
  uw += e, e < 0 && Xh && (Xh.hasOnce = !0);
}
function JH(e) {
  return e.dynamicChildren = uw > 0 ? Xh || cx : null, Jse(), uw > 0 && Xh && Xh.push(e), e;
}
function ns(e, t, r, a, v, o) {
  return JH(
    ql(
      e,
      t,
      r,
      a,
      v,
      o,
      !0
    )
  );
}
function Qd(e, t, r, a, v) {
  return JH(
    Iu(
      e,
      t,
      r,
      a,
      v,
      !0
    )
  );
}
function gv(e) {
  return e ? e.__v_isVNode === !0 : !1;
}
function Uy(e, t) {
  if (Ar.NODE_ENV !== "production" && t.shapeFlag & 6 && e.component) {
    const r = e8.get(t.type);
    if (r && r.has(e.component))
      return e.shapeFlag &= -257, t.shapeFlag &= -513, !1;
  }
  return e.type === t.type && e.key === t.key;
}
const Qse = (...e) => eG(
  ...e
), QH = ({ key: e }) => e ?? null, i8 = ({
  ref: e,
  ref_key: t,
  ref_for: r
}) => (typeof e == "number" && (e = "" + e), e != null ? Wl(e) || fl(e) || ya(e) ? { i: qc, r: e, k: t, f: !!r } : e : null);
function ql(e, t = null, r = null, a = 0, v = null, o = e === jc ? 0 : 1, s = !1, n = !1) {
  const l = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e,
    props: t,
    key: t && QH(t),
    ref: t && i8(t),
    scopeId: vH,
    slotScopeIds: null,
    children: r,
    component: null,
    suspense: null,
    ssContent: null,
    ssFallback: null,
    dirs: null,
    transition: null,
    el: null,
    anchor: null,
    target: null,
    targetStart: null,
    targetAnchor: null,
    staticCount: 0,
    shapeFlag: o,
    patchFlag: a,
    dynamicProps: v,
    dynamicChildren: null,
    appContext: null,
    ctx: qc
  };
  return n ? (aD(l, r), o & 128 && e.normalize(l)) : r && (l.shapeFlag |= Wl(r) ? 8 : 16), Ar.NODE_ENV !== "production" && l.key !== l.key && wi("VNode created with invalid key (NaN). VNode type:", l.type), uw > 0 && // avoid a block node from tracking itself
  !s && // has current parent block
  Xh && // presence of a patch flag indicates this node needs patching on updates.
  // component nodes also should always be patched, because even if the
  // component doesn't need to update, it needs to persist the instance on to
  // the next vnode so that it can be properly unmounted later.
  (l.patchFlag > 0 || o & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  // vnode should not be considered dynamic due to handler caching.
  l.patchFlag !== 32 && Xh.push(l), l;
}
const Iu = Ar.NODE_ENV !== "production" ? Qse : eG;
function eG(e, t = null, r = null, a = 0, v = null, o = !1) {
  if ((!e || e === cse) && (Ar.NODE_ENV !== "production" && !e && wi(`Invalid vnode type when creating vnode: ${e}.`), e = Gu), gv(e)) {
    const n = T0(
      e,
      t,
      !0
      /* mergeRef: true */
    );
    return r && aD(n, r), uw > 0 && !o && Xh && (n.shapeFlag & 6 ? Xh[Xh.indexOf(e)] = n : Xh.push(n)), n.patchFlag = -2, n;
  }
  if (aG(e) && (e = e.__vccOpts), t) {
    t = ele(t);
    let { class: n, style: l } = t;
    n && !Wl(n) && (t.class = dg(n)), is(l) && (ow(l) && !ia(l) && (l = Sl({}, l)), t.style = hb(l));
  }
  const s = Wl(e) ? 1 : KH(e) ? 128 : bH(e) ? 64 : is(e) ? 4 : ya(e) ? 2 : 0;
  return Ar.NODE_ENV !== "production" && s & 4 && ow(e) && (e = Ta(e), wi(
    "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
    `
Component that was made reactive: `,
    e
  )), ql(
    e,
    t,
    r,
    a,
    v,
    s,
    o,
    !0
  );
}
function ele(e) {
  return e ? ow(e) || NH(e) ? Sl({}, e) : e : null;
}
function T0(e, t, r = !1, a = !1) {
  const { props: v, ref: o, patchFlag: s, children: n, transition: l } = e, u = t ? tle(v || {}, t) : v, i = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e.type,
    props: u,
    key: u && QH(u),
    ref: t && t.ref ? (
      // #2078 in the case of <component :is="vnode" ref="extra"/>
      // if the vnode itself already has a ref, cloneVNode will need to merge
      // the refs so the single vnode can be set on multiple refs
      r && o ? ia(o) ? o.concat(i8(t)) : [o, i8(t)] : i8(t)
    ) : o,
    scopeId: e.scopeId,
    slotScopeIds: e.slotScopeIds,
    children: Ar.NODE_ENV !== "production" && s === -1 && ia(n) ? n.map(tG) : n,
    target: e.target,
    targetStart: e.targetStart,
    targetAnchor: e.targetAnchor,
    staticCount: e.staticCount,
    shapeFlag: e.shapeFlag,
    // if the vnode is cloned with extra props, we can no longer assume its
    // existing patch flag to be reliable and need to add the FULL_PROPS flag.
    // note: preserve flag for fragments since they use the flag for children
    // fast paths only.
    patchFlag: t && e.type !== jc ? s === -1 ? 16 : s | 16 : s,
    dynamicProps: e.dynamicProps,
    dynamicChildren: e.dynamicChildren,
    appContext: e.appContext,
    dirs: e.dirs,
    transition: l,
    // These should technically only be non-null on mounted VNodes. However,
    // they *should* be copied for kept-alive vnodes. So we just always copy
    // them since them being non-null during a mount doesn't affect the logic as
    // they will simply be overwritten.
    component: e.component,
    suspense: e.suspense,
    ssContent: e.ssContent && T0(e.ssContent),
    ssFallback: e.ssFallback && T0(e.ssFallback),
    el: e.el,
    anchor: e.anchor,
    ctx: e.ctx,
    ce: e.ce
  };
  return l && a && lw(
    i,
    l.clone(i)
  ), i;
}
function tG(e) {
  const t = T0(e);
  return ia(e.children) && (t.children = e.children.map(tG)), t;
}
function hE(e = " ", t = 0) {
  return Iu(e4, null, e, t);
}
function Nc(e = "", t = !1) {
  return t ? (Va(), Qd(Gu, null, e)) : Iu(Gu, null, e);
}
function np(e) {
  return e == null || typeof e == "boolean" ? Iu(Gu) : ia(e) ? Iu(
    jc,
    null,
    // #3666, avoid reference pollution when reusing vnode
    e.slice()
  ) : gv(e) ? F1(e) : Iu(e4, null, String(e));
}
function F1(e) {
  return e.el === null && e.patchFlag !== -1 || e.memo ? e : T0(e);
}
function aD(e, t) {
  let r = 0;
  const { shapeFlag: a } = e;
  if (t == null)
    t = null;
  else if (ia(t))
    r = 16;
  else if (typeof t == "object")
    if (a & 65) {
      const v = t.default;
      v && (v._c && (v._d = !1), aD(e, v()), v._c && (v._d = !0));
      return;
    } else {
      r = 32;
      const v = t._;
      !v && !NH(t) ? t._ctx = qc : v === 3 && qc && (qc.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
    }
  else ya(t) ? (t = { default: t, _ctx: qc }, r = 32) : (t = String(t), a & 64 ? (r = 16, t = [hE(t)]) : r = 8);
  e.children = t, e.shapeFlag |= r;
}
function tle(...e) {
  const t = {};
  for (let r = 0; r < e.length; r++) {
    const a = e[r];
    for (const v in a)
      if (v === "class")
        t.class !== a.class && (t.class = dg([t.class, a.class]));
      else if (v === "style")
        t.style = hb([t.style, a.style]);
      else if (Xw(v)) {
        const o = t[v], s = a[v];
        s && o !== s && !(ia(o) && o.includes(s)) && (t[v] = o ? [].concat(o, s) : s);
      } else v !== "" && (t[v] = a[v]);
  }
  return t;
}
function Xp(e, t, r, a = null) {
  mp(e, t, 7, [
    r,
    a
  ]);
}
const nle = zH();
let rle = 0;
function ile(e, t, r) {
  const a = e.type, v = (t ? t.appContext : e.appContext) || nle, o = {
    uid: rle++,
    vnode: e,
    type: a,
    parent: t,
    appContext: v,
    root: null,
    // to be immediately set
    next: null,
    subTree: null,
    // will be set synchronously right after creation
    effect: null,
    update: null,
    // will be set synchronously right after creation
    job: null,
    scope: new Fq(
      !0
      /* detached */
    ),
    render: null,
    proxy: null,
    exposed: null,
    exposeProxy: null,
    withProxy: null,
    provides: t ? t.provides : Object.create(v.provides),
    ids: t ? t.ids : ["", 0, 0],
    accessCache: null,
    renderCache: [],
    // local resolved assets
    components: null,
    directives: null,
    // resolved props and emits options
    propsOptions: jH(a, v),
    emitsOptions: ZH(a, v),
    // emit
    emit: null,
    // to be set immediately
    emitted: null,
    // props default value
    propsDefaults: zo,
    // inheritAttrs
    inheritAttrs: a.inheritAttrs,
    // state
    ctx: zo,
    data: zo,
    props: zo,
    attrs: zo,
    slots: zo,
    refs: zo,
    setupState: zo,
    setupContext: null,
    // suspense related
    suspense: r,
    suspenseId: r ? r.pendingId : 0,
    asyncDep: null,
    asyncResolved: !1,
    // lifecycle hooks
    // not using enums here because it results in computed properties
    isMounted: !1,
    isUnmounted: !1,
    isDeactivated: !1,
    bc: null,
    c: null,
    bm: null,
    m: null,
    bu: null,
    u: null,
    um: null,
    bum: null,
    da: null,
    a: null,
    rtg: null,
    rtc: null,
    ec: null,
    sp: null
  };
  return Ar.NODE_ENV !== "production" ? o.ctx = fse(o) : o.ctx = { _: o }, o.root = t ? t.root : o, o.emit = Gse.bind(null, o), e.ce && e.ce(o), o;
}
let xc = null;
const Xk = () => xc || qc;
let Y8, dE;
{
  const e = qI(), t = (r, a) => {
    let v;
    return (v = e[r]) || (v = e[r] = []), v.push(a), (o) => {
      v.length > 1 ? v.forEach((s) => s(o)) : v[0](o);
    };
  };
  Y8 = t(
    "__VUE_INSTANCE_SETTERS__",
    (r) => xc = r
  ), dE = t(
    "__VUE_SSR_SETTERS__",
    (r) => Kk = r
  );
}
const t4 = (e) => {
  const t = xc;
  return Y8(e), e.scope.on(), () => {
    e.scope.off(), Y8(t);
  };
}, RF = () => {
  xc && xc.scope.off(), Y8(null);
}, ale = /* @__PURE__ */ Gm("slot,component");
function pE(e, { isNativeTag: t }) {
  (ale(e) || t(e)) && wi(
    "Do not use built-in or reserved HTML elements as component id: " + e
  );
}
function nG(e) {
  return e.vnode.shapeFlag & 4;
}
let Kk = !1;
function ole(e, t = !1, r = !1) {
  t && dE(t);
  const { props: a, children: v } = e.vnode, o = nG(e);
  Tse(e, a, o, t), zse(e, v, r);
  const s = o ? sle(e, t) : void 0;
  return t && dE(!1), s;
}
function sle(e, t) {
  var r;
  const a = e.type;
  if (Ar.NODE_ENV !== "production") {
    if (a.name && pE(a.name, e.appContext.config), a.components) {
      const o = Object.keys(a.components);
      for (let s = 0; s < o.length; s++)
        pE(o[s], e.appContext.config);
    }
    if (a.directives) {
      const o = Object.keys(a.directives);
      for (let s = 0; s < o.length; s++)
        xH(o[s]);
    }
    a.compilerOptions && lle() && wi(
      '"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.'
    );
  }
  e.accessCache = /* @__PURE__ */ Object.create(null), e.proxy = new Proxy(e.ctx, LH), Ar.NODE_ENV !== "production" && hse(e);
  const { setup: v } = a;
  if (v) {
    const o = e.setupContext = v.length > 1 ? cle(e) : null, s = t4(e);
    Wm();
    const n = db(
      v,
      e,
      0,
      [
        Ar.NODE_ENV !== "production" ? Df(e.props) : e.props,
        o
      ]
    );
    if (Ym(), s(), UI(n)) {
      if (hx(e) || SH(e), n.then(RF, RF), t)
        return n.then((l) => {
          FF(e, l, t);
        }).catch((l) => {
          Kw(l, e, 0);
        });
      if (e.asyncDep = n, Ar.NODE_ENV !== "production" && !e.suspense) {
        const l = (r = a.name) != null ? r : "Anonymous";
        wi(
          `Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
        );
      }
    } else
      FF(e, n, t);
  } else
    rG(e, t);
}
function FF(e, t, r) {
  ya(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : is(t) ? (Ar.NODE_ENV !== "production" && gv(t) && wi(
    "setup() should not return VNodes directly - return a render function instead."
  ), Ar.NODE_ENV !== "production" && (e.devtoolsRawSetupState = t), e.setupState = oH(t), Ar.NODE_ENV !== "production" && dse(e)) : Ar.NODE_ENV !== "production" && t !== void 0 && wi(
    `setup() should return an object. Received: ${t === null ? "null" : typeof t}`
  ), rG(e, r);
}
let mE;
const lle = () => !mE;
function rG(e, t, r) {
  const a = e.type;
  if (!e.render) {
    if (!t && mE && !a.render) {
      const v = a.template || tD(e).template;
      if (v) {
        Ar.NODE_ENV !== "production" && ym(e, "compile");
        const { isCustomElement: o, compilerOptions: s } = e.appContext.config, { delimiters: n, compilerOptions: l } = a, u = Sl(
          Sl(
            {
              isCustomElement: o,
              delimiters: n
            },
            s
          ),
          l
        );
        a.render = mE(v, u), Ar.NODE_ENV !== "production" && vm(e, "compile");
      }
    }
    e.render = a.render || vc;
  }
  {
    const v = t4(e);
    Wm();
    try {
      mse(e);
    } finally {
      Ym(), v();
    }
  }
  Ar.NODE_ENV !== "production" && !a.render && e.render === vc && !t && (a.template ? wi(
    'Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'
  ) : wi("Component is missing template or render function: ", a));
}
const NF = Ar.NODE_ENV !== "production" ? {
  get(e, t) {
    return W8(), Tc(e, "get", ""), e[t];
  },
  set() {
    return wi("setupContext.attrs is readonly."), !1;
  },
  deleteProperty() {
    return wi("setupContext.attrs is readonly."), !1;
  }
} : {
  get(e, t) {
    return Tc(e, "get", ""), e[t];
  }
};
function ule(e) {
  return new Proxy(e.slots, {
    get(t, r) {
      return Tc(e, "get", "$slots"), t[r];
    }
  });
}
function cle(e) {
  const t = (r) => {
    if (Ar.NODE_ENV !== "production" && (e.exposed && wi("expose() should be called only once per setup()."), r != null)) {
      let a = typeof r;
      a === "object" && (ia(r) ? a = "array" : fl(r) && (a = "ref")), a !== "object" && wi(
        `expose() should be passed a plain object, received ${a}.`
      );
    }
    e.exposed = r || {};
  };
  if (Ar.NODE_ENV !== "production") {
    let r, a;
    return Object.freeze({
      get attrs() {
        return r || (r = new Proxy(e.attrs, NF));
      },
      get slots() {
        return a || (a = ule(e));
      },
      get emit() {
        return (v, ...o) => e.emit(v, ...o);
      },
      expose: t
    });
  } else
    return {
      attrs: new Proxy(e.attrs, NF),
      slots: e.slots,
      emit: e.emit,
      expose: t
    };
}
function oD(e) {
  return e.exposed ? e.exposeProxy || (e.exposeProxy = new Proxy(oH(Y1(e.exposed)), {
    get(t, r) {
      if (r in t)
        return t[r];
      if (r in nv)
        return nv[r](e);
    },
    has(t, r) {
      return r in t || r in nv;
    }
  })) : e.proxy;
}
const fle = /(?:^|[-_])(\w)/g, hle = (e) => e.replace(fle, (t) => t.toUpperCase()).replace(/[-_]/g, "");
function iG(e, t = !0) {
  return ya(e) ? e.displayName || e.name : e.name || t && e.__name;
}
function Jk(e, t, r = !1) {
  let a = iG(t);
  if (!a && t.__file) {
    const v = t.__file.match(/([^/\\]+)\.\w+$/);
    v && (a = v[1]);
  }
  if (!a && e && e.parent) {
    const v = (o) => {
      for (const s in o)
        if (o[s] === t)
          return s;
    };
    a = v(
      e.components || e.parent.type.components
    ) || v(e.appContext.components);
  }
  return a ? hle(a) : r ? "App" : "Anonymous";
}
function aG(e) {
  return ya(e) && "__vccOpts" in e;
}
const Hu = (e, t) => {
  const r = Moe(e, t, Kk);
  if (Ar.NODE_ENV !== "production") {
    const a = Xk();
    a && a.appContext.config.warnRecursiveComputed && (r._warnRecursive = !0);
  }
  return r;
};
function oG(e, t, r) {
  const a = arguments.length;
  return a === 2 ? is(t) && !ia(t) ? gv(t) ? Iu(e, null, [t]) : Iu(e, t) : Iu(e, null, t) : (a > 3 ? r = Array.prototype.slice.call(arguments, 2) : a === 3 && gv(r) && (r = [r]), Iu(e, t, r));
}
function dle() {
  if (Ar.NODE_ENV === "production" || typeof window > "u")
    return;
  const e = { style: "color:#3ba776" }, t = { style: "color:#1677ff" }, r = { style: "color:#f5222d" }, a = { style: "color:#eb2f96" }, v = {
    __vue_custom_formatter: !0,
    header(h) {
      return is(h) ? h.__isVue ? ["div", e, "VueInstance"] : fl(h) ? [
        "div",
        {},
        ["span", e, i(h)],
        "<",
        // avoid debugger accessing value affecting behavior
        n("_value" in h ? h._value : h),
        ">"
      ] : g0(h) ? [
        "div",
        {},
        ["span", e, sh(h) ? "ShallowReactive" : "Reactive"],
        "<",
        n(h),
        `>${Um(h) ? " (readonly)" : ""}`
      ] : Um(h) ? [
        "div",
        {},
        ["span", e, sh(h) ? "ShallowReadonly" : "Readonly"],
        "<",
        n(h),
        ">"
      ] : null : null;
    },
    hasBody(h) {
      return h && h.__isVue;
    },
    body(h) {
      if (h && h.__isVue)
        return [
          "div",
          {},
          ...o(h.$)
        ];
    }
  };
  function o(h) {
    const p = [];
    h.type.props && h.props && p.push(s("props", Ta(h.props))), h.setupState !== zo && p.push(s("setup", h.setupState)), h.data !== zo && p.push(s("data", Ta(h.data)));
    const _ = l(h, "computed");
    _ && p.push(s("computed", _));
    const d = l(h, "inject");
    return d && p.push(s("injected", d)), p.push([
      "div",
      {},
      [
        "span",
        {
          style: a.style + ";opacity:0.66"
        },
        "$ (internal): "
      ],
      ["object", { object: h }]
    ]), p;
  }
  function s(h, p) {
    return p = Sl({}, p), Object.keys(p).length ? [
      "div",
      { style: "line-height:1.25em;margin-bottom:0.6em" },
      [
        "div",
        {
          style: "color:#476582"
        },
        h
      ],
      [
        "div",
        {
          style: "padding-left:1.25em"
        },
        ...Object.keys(p).map((_) => [
          "div",
          {},
          ["span", a, _ + ": "],
          n(p[_], !1)
        ])
      ]
    ] : ["span", {}];
  }
  function n(h, p = !0) {
    return typeof h == "number" ? ["span", t, h] : typeof h == "string" ? ["span", r, JSON.stringify(h)] : typeof h == "boolean" ? ["span", a, h] : is(h) ? ["object", { object: p ? Ta(h) : h }] : ["span", r, String(h)];
  }
  function l(h, p) {
    const _ = h.type;
    if (ya(_))
      return;
    const d = {};
    for (const f in h.ctx)
      u(_, f, p) && (d[f] = h.ctx[f]);
    return d;
  }
  function u(h, p, _) {
    const d = h[_];
    if (ia(d) && d.includes(p) || is(d) && p in d || h.extends && u(h.extends, p, _) || h.mixins && h.mixins.some((f) => u(f, p, _)))
      return !0;
  }
  function i(h) {
    return sh(h) ? "ShallowRef" : h.effect ? "ComputedRef" : "Ref";
  }
  window.devtoolsFormatters ? window.devtoolsFormatters.push(v) : window.devtoolsFormatters = [v];
}
const BF = "3.5.11", Lm = Ar.NODE_ENV !== "production" ? wi : vc;
var A0 = {};
let gE;
const jF = typeof window < "u" && window.trustedTypes;
if (jF)
  try {
    gE = /* @__PURE__ */ jF.createPolicy("vue", {
      createHTML: (e) => e
    });
  } catch (e) {
    A0.NODE_ENV !== "production" && Lm(`Error creating trusted types policy: ${e}`);
  }
const sG = gE ? (e) => gE.createHTML(e) : (e) => e, ple = "http://www.w3.org/2000/svg", mle = "http://www.w3.org/1998/Math/MathML", xm = typeof document < "u" ? document : null, UF = xm && /* @__PURE__ */ xm.createElement("template"), gle = {
  insert: (e, t, r) => {
    t.insertBefore(e, r || null);
  },
  remove: (e) => {
    const t = e.parentNode;
    t && t.removeChild(e);
  },
  createElement: (e, t, r, a) => {
    const v = t === "svg" ? xm.createElementNS(ple, e) : t === "mathml" ? xm.createElementNS(mle, e) : r ? xm.createElement(e, { is: r }) : xm.createElement(e);
    return e === "select" && a && a.multiple != null && v.setAttribute("multiple", a.multiple), v;
  },
  createText: (e) => xm.createTextNode(e),
  createComment: (e) => xm.createComment(e),
  setText: (e, t) => {
    e.nodeValue = t;
  },
  setElementText: (e, t) => {
    e.textContent = t;
  },
  parentNode: (e) => e.parentNode,
  nextSibling: (e) => e.nextSibling,
  querySelector: (e) => xm.querySelector(e),
  setScopeId(e, t) {
    e.setAttribute(t, "");
  },
  // __UNSAFE__
  // Reason: innerHTML.
  // Static content here can only come from compiled templates.
  // As long as the user only uses trusted templates, this is safe.
  insertStaticContent(e, t, r, a, v, o) {
    const s = r ? r.previousSibling : t.lastChild;
    if (v && (v === o || v.nextSibling))
      for (; t.insertBefore(v.cloneNode(!0), r), !(v === o || !(v = v.nextSibling)); )
        ;
    else {
      UF.innerHTML = sG(
        a === "svg" ? `<svg>${e}</svg>` : a === "mathml" ? `<math>${e}</math>` : e
      );
      const n = UF.content;
      if (a === "svg" || a === "mathml") {
        const l = n.firstChild;
        for (; l.firstChild; )
          n.appendChild(l.firstChild);
        n.removeChild(l);
      }
      t.insertBefore(n, r);
    }
    return [
      // first
      s ? s.nextSibling : t.firstChild,
      // last
      r ? r.previousSibling : t.lastChild
    ];
  }
}, S1 = "transition", P_ = "animation", cw = Symbol("_vtc"), lG = {
  name: String,
  type: String,
  css: {
    type: Boolean,
    default: !0
  },
  duration: [String, Number, Object],
  enterFromClass: String,
  enterActiveClass: String,
  enterToClass: String,
  appearFromClass: String,
  appearActiveClass: String,
  appearToClass: String,
  leaveFromClass: String,
  leaveActiveClass: String,
  leaveToClass: String
}, yle = /* @__PURE__ */ Sl(
  {},
  _H,
  lG
), vle = (e) => (e.displayName = "Transition", e.props = yle, e), xle = /* @__PURE__ */ vle(
  (e, { slots: t }) => oG(Qoe, ble(e), t)
), wy = (e, t = []) => {
  ia(e) ? e.forEach((r) => r(...t)) : e && e(...t);
}, VF = (e) => e ? ia(e) ? e.some((t) => t.length > 1) : e.length > 1 : !1;
function ble(e) {
  const t = {};
  for (const P in e)
    P in lG || (t[P] = e[P]);
  if (e.css === !1)
    return t;
  const {
    name: r = "v",
    type: a,
    duration: v,
    enterFromClass: o = `${r}-enter-from`,
    enterActiveClass: s = `${r}-enter-active`,
    enterToClass: n = `${r}-enter-to`,
    appearFromClass: l = o,
    appearActiveClass: u = s,
    appearToClass: i = n,
    leaveFromClass: h = `${r}-leave-from`,
    leaveActiveClass: p = `${r}-leave-active`,
    leaveToClass: _ = `${r}-leave-to`
  } = e, d = _le(v), f = d && d[0], c = d && d[1], {
    onBeforeEnter: g,
    onEnter: m,
    onEnterCancelled: x,
    onLeave: w,
    onLeaveCancelled: k,
    onBeforeAppear: S = g,
    onAppear: A = m,
    onAppearCancelled: C = x
  } = t, D = (P, I, M) => {
    ky(P, I ? i : n), ky(P, I ? u : s), M && M();
  }, L = (P, I) => {
    P._isLeaving = !1, ky(P, h), ky(P, _), ky(P, p), I && I();
  }, E = (P) => (I, M) => {
    const O = P ? A : m, T = () => D(I, P, M);
    wy(O, [I, T]), $F(() => {
      ky(I, P ? l : o), M1(I, P ? i : n), VF(O) || qF(I, a, f, T);
    });
  };
  return Sl(t, {
    onBeforeEnter(P) {
      wy(g, [P]), M1(P, o), M1(P, s);
    },
    onBeforeAppear(P) {
      wy(S, [P]), M1(P, l), M1(P, u);
    },
    onEnter: E(!1),
    onAppear: E(!0),
    onLeave(P, I) {
      P._isLeaving = !0;
      const M = () => L(P, I);
      M1(P, h), M1(P, p), Tle(), $F(() => {
        P._isLeaving && (ky(P, h), M1(P, _), VF(w) || qF(P, a, c, M));
      }), wy(w, [P, M]);
    },
    onEnterCancelled(P) {
      D(P, !1), wy(x, [P]);
    },
    onAppearCancelled(P) {
      D(P, !0), wy(C, [P]);
    },
    onLeaveCancelled(P) {
      L(P), wy(k, [P]);
    }
  });
}
function _le(e) {
  if (e == null)
    return null;
  if (is(e))
    return [fS(e.enter), fS(e.leave)];
  {
    const t = fS(e);
    return [t, t];
  }
}
function fS(e) {
  const t = Nae(e);
  return A0.NODE_ENV !== "production" && Ooe(t, "<transition> explicit duration"), t;
}
function M1(e, t) {
  t.split(/\s+/).forEach((r) => r && e.classList.add(r)), (e[cw] || (e[cw] = /* @__PURE__ */ new Set())).add(t);
}
function ky(e, t) {
  t.split(/\s+/).forEach((a) => a && e.classList.remove(a));
  const r = e[cw];
  r && (r.delete(t), r.size || (e[cw] = void 0));
}
function $F(e) {
  requestAnimationFrame(() => {
    requestAnimationFrame(e);
  });
}
let wle = 0;
function qF(e, t, r, a) {
  const v = e._endId = ++wle, o = () => {
    v === e._endId && a();
  };
  if (r != null)
    return setTimeout(o, r);
  const { type: s, timeout: n, propCount: l } = kle(e, t);
  if (!s)
    return a();
  const u = s + "end";
  let i = 0;
  const h = () => {
    e.removeEventListener(u, p), o();
  }, p = (_) => {
    _.target === e && ++i >= l && h();
  };
  setTimeout(() => {
    i < l && h();
  }, n + 1), e.addEventListener(u, p);
}
function kle(e, t) {
  const r = window.getComputedStyle(e), a = (d) => (r[d] || "").split(", "), v = a(`${S1}Delay`), o = a(`${S1}Duration`), s = HF(v, o), n = a(`${P_}Delay`), l = a(`${P_}Duration`), u = HF(n, l);
  let i = null, h = 0, p = 0;
  t === S1 ? s > 0 && (i = S1, h = s, p = o.length) : t === P_ ? u > 0 && (i = P_, h = u, p = l.length) : (h = Math.max(s, u), i = h > 0 ? s > u ? S1 : P_ : null, p = i ? i === S1 ? o.length : l.length : 0);
  const _ = i === S1 && /\b(transform|all)(,|$)/.test(
    a(`${S1}Property`).toString()
  );
  return {
    type: i,
    timeout: h,
    propCount: p,
    hasTransform: _
  };
}
function HF(e, t) {
  for (; e.length < t.length; )
    e = e.concat(e);
  return Math.max(...t.map((r, a) => GF(r) + GF(e[a])));
}
function GF(e) {
  return e === "auto" ? 0 : Number(e.slice(0, -1).replace(",", ".")) * 1e3;
}
function Tle() {
  return document.body.offsetHeight;
}
function Ale(e, t, r) {
  const a = e[cw];
  a && (t = (t ? [t, ...a] : [...a]).join(" ")), t == null ? e.removeAttribute("class") : r ? e.setAttribute("class", t) : e.className = t;
}
const WF = Symbol("_vod"), Sle = Symbol("_vsh"), Mle = Symbol(A0.NODE_ENV !== "production" ? "CSS_VAR_TEXT" : ""), Ele = /(^|;)\s*display\s*:/;
function Cle(e, t, r) {
  const a = e.style, v = Wl(r);
  let o = !1;
  if (r && !v) {
    if (t)
      if (Wl(t))
        for (const s of t.split(";")) {
          const n = s.slice(0, s.indexOf(":")).trim();
          r[n] == null && a8(a, n, "");
        }
      else
        for (const s in t)
          r[s] == null && a8(a, s, "");
    for (const s in r)
      s === "display" && (o = !0), a8(a, s, r[s]);
  } else if (v) {
    if (t !== r) {
      const s = a[Mle];
      s && (r += ";" + s), a.cssText = r, o = Ele.test(r);
    }
  } else t && e.removeAttribute("style");
  WF in e && (e[WF] = o ? a.display : "", e[Sle] && (a.display = "none"));
}
const Ile = /[^\\];\s*$/, YF = /\s*!important$/;
function a8(e, t, r) {
  if (ia(r))
    r.forEach((a) => a8(e, t, a));
  else if (r == null && (r = ""), A0.NODE_ENV !== "production" && Ile.test(r) && Lm(
    `Unexpected semicolon at the end of '${t}' style value: '${r}'`
  ), t.startsWith("--"))
    e.setProperty(t, r);
  else {
    const a = Dle(e, t);
    YF.test(r) ? e.setProperty(
      k0(a),
      r.replace(YF, ""),
      "important"
    ) : e[a] = r;
  }
}
const ZF = ["Webkit", "Moz", "ms"], hS = {};
function Dle(e, t) {
  const r = hS[t];
  if (r)
    return r;
  let a = fp(t);
  if (a !== "filter" && a in e)
    return hS[t] = a;
  a = jk(a);
  for (let v = 0; v < ZF.length; v++) {
    const o = ZF[v] + a;
    if (o in e)
      return hS[t] = o;
  }
  return t;
}
const XF = "http://www.w3.org/1999/xlink";
function KF(e, t, r, a, v, o = Xae(t)) {
  a && t.startsWith("xlink:") ? r == null ? e.removeAttributeNS(XF, t.slice(6, t.length)) : e.setAttributeNS(XF, t, r) : r == null || o && !Oq(r) ? e.removeAttribute(t) : e.setAttribute(
    t,
    o ? "" : zg(r) ? String(r) : r
  );
}
function JF(e, t, r, a) {
  if (t === "innerHTML" || t === "textContent") {
    r != null && (e[t] = t === "innerHTML" ? sG(r) : r);
    return;
  }
  const v = e.tagName;
  if (t === "value" && v !== "PROGRESS" && // custom elements may use _value internally
  !v.includes("-")) {
    const s = v === "OPTION" ? e.getAttribute("value") || "" : e.value, n = r == null ? (
      // #11647: value should be set as empty string for null and undefined,
      // but <input type="checkbox"> should be set as 'on'.
      e.type === "checkbox" ? "on" : ""
    ) : String(r);
    (s !== n || !("_value" in e)) && (e.value = n), r == null && e.removeAttribute(t), e._value = r;
    return;
  }
  let o = !1;
  if (r === "" || r == null) {
    const s = typeof e[t];
    s === "boolean" ? r = Oq(r) : r == null && s === "string" ? (r = "", o = !0) : s === "number" && (r = 0, o = !0);
  }
  try {
    e[t] = r;
  } catch (s) {
    A0.NODE_ENV !== "production" && !o && Lm(
      `Failed setting prop "${t}" on <${v.toLowerCase()}>: value ${r} is invalid.`,
      s
    );
  }
  o && e.removeAttribute(t);
}
function Lle(e, t, r, a) {
  e.addEventListener(t, r, a);
}
function Ple(e, t, r, a) {
  e.removeEventListener(t, r, a);
}
const QF = Symbol("_vei");
function Ole(e, t, r, a, v = null) {
  const o = e[QF] || (e[QF] = {}), s = o[t];
  if (a && s)
    s.value = A0.NODE_ENV !== "production" ? tN(a, t) : a;
  else {
    const [n, l] = zle(t);
    if (a) {
      const u = o[t] = Nle(
        A0.NODE_ENV !== "production" ? tN(a, t) : a,
        v
      );
      Lle(e, n, u, l);
    } else s && (Ple(e, n, s, l), o[t] = void 0);
  }
}
const eN = /(?:Once|Passive|Capture)$/;
function zle(e) {
  let t;
  if (eN.test(e)) {
    t = {};
    let a;
    for (; a = e.match(eN); )
      e = e.slice(0, e.length - a[0].length), t[a[0].toLowerCase()] = !0;
  }
  return [e[2] === ":" ? e.slice(3) : k0(e.slice(2)), t];
}
let dS = 0;
const Rle = /* @__PURE__ */ Promise.resolve(), Fle = () => dS || (Rle.then(() => dS = 0), dS = Date.now());
function Nle(e, t) {
  const r = (a) => {
    if (!a._vts)
      a._vts = Date.now();
    else if (a._vts <= r.attached)
      return;
    mp(
      Ble(a, r.value),
      t,
      5,
      [a]
    );
  };
  return r.value = e, r.attached = Fle(), r;
}
function tN(e, t) {
  return ya(e) || ia(e) ? e : (Lm(
    `Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
Expected function or array of functions, received type ${typeof e}.`
  ), vc);
}
function Ble(e, t) {
  if (ia(t)) {
    const r = e.stopImmediatePropagation;
    return e.stopImmediatePropagation = () => {
      r.call(e), e._stopped = !0;
    }, t.map(
      (a) => (v) => !v._stopped && a && a(v)
    );
  } else
    return t;
}
const nN = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, jle = (e, t, r, a, v, o) => {
  const s = v === "svg";
  t === "class" ? Ale(e, a, s) : t === "style" ? Cle(e, r, a) : Xw(t) ? F8(t) || Ole(e, t, r, a, o) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : Ule(e, t, a, s)) ? (JF(e, t, a), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && KF(e, t, a, s, o, t !== "value")) : /* #11081 force set props for possible async custom element */ e._isVueCE && (/[A-Z]/.test(t) || !Wl(a)) ? JF(e, fp(t), a) : (t === "true-value" ? e._trueValue = a : t === "false-value" && (e._falseValue = a), KF(e, t, a, s));
};
function Ule(e, t, r, a) {
  if (a)
    return !!(t === "innerHTML" || t === "textContent" || t in e && nN(t) && ya(r));
  if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
    return !1;
  if (t === "width" || t === "height") {
    const v = e.tagName;
    if (v === "IMG" || v === "VIDEO" || v === "CANVAS" || v === "SOURCE")
      return !1;
  }
  return nN(t) && Wl(r) ? !1 : t in e;
}
const Vle = /* @__PURE__ */ Sl({ patchProp: jle }, gle);
let rN;
function $le() {
  return rN || (rN = Nse(Vle));
}
const qle = (...e) => {
  const t = $le().createApp(...e);
  A0.NODE_ENV !== "production" && (Gle(t), Wle(t));
  const { mount: r } = t;
  return t.mount = (a) => {
    const v = Yle(a);
    if (!v) return;
    const o = t._component;
    !ya(o) && !o.render && !o.template && (o.template = v.innerHTML), v.nodeType === 1 && (v.textContent = "");
    const s = r(v, !1, Hle(v));
    return v instanceof Element && (v.removeAttribute("v-cloak"), v.setAttribute("data-v-app", "")), s;
  }, t;
};
function Hle(e) {
  if (e instanceof SVGElement)
    return "svg";
  if (typeof MathMLElement == "function" && e instanceof MathMLElement)
    return "mathml";
}
function Gle(e) {
  Object.defineProperty(e.config, "isNativeTag", {
    value: (t) => Gae(t) || Wae(t) || Yae(t),
    writable: !1
  });
}
function Wle(e) {
  {
    const t = e.config.isCustomElement;
    Object.defineProperty(e.config, "isCustomElement", {
      get() {
        return t;
      },
      set() {
        Lm(
          "The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead."
        );
      }
    });
    const r = e.config.compilerOptions, a = 'The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';
    Object.defineProperty(e.config, "compilerOptions", {
      get() {
        return Lm(a), r;
      },
      set() {
        Lm(a);
      }
    });
  }
}
function Yle(e) {
  if (Wl(e)) {
    const t = document.querySelector(e);
    return A0.NODE_ENV !== "production" && !t && Lm(
      `Failed to mount app: mount target selector "${e}" returned null.`
    ), t;
  }
  return A0.NODE_ENV !== "production" && window.ShadowRoot && e instanceof window.ShadowRoot && e.mode === "closed" && Lm(
    'mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'
  ), e;
}
var Zle = {};
function Xle() {
  dle();
}
Zle.NODE_ENV !== "production" && Xle();
var uG = !1;
function n6(e, t, r) {
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, r), r) : (e[t] = r, r);
}
function pS(e, t) {
  if (Array.isArray(e)) {
    e.splice(t, 1);
    return;
  }
  delete e[t];
}
function Kle() {
  return cG().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function cG() {
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
}
const Jle = typeof Proxy == "function", Qle = "devtools-plugin:setup", eue = "plugin:settings:set";
let O2, yE;
function tue() {
  var e;
  return O2 !== void 0 || (typeof window < "u" && window.performance ? (O2 = !0, yE = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (O2 = !0, yE = globalThis.perf_hooks.performance) : O2 = !1), O2;
}
function nue() {
  return tue() ? yE.now() : Date.now();
}
class rue {
  constructor(t, r) {
    this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
    const a = {};
    if (t.settings)
      for (const s in t.settings) {
        const n = t.settings[s];
        a[s] = n.defaultValue;
      }
    const v = `__vue-devtools-plugin-settings__${t.id}`;
    let o = Object.assign({}, a);
    try {
      const s = localStorage.getItem(v), n = JSON.parse(s);
      Object.assign(o, n);
    } catch {
    }
    this.fallbacks = {
      getSettings() {
        return o;
      },
      setSettings(s) {
        try {
          localStorage.setItem(v, JSON.stringify(s));
        } catch {
        }
        o = s;
      },
      now() {
        return nue();
      }
    }, r && r.on(eue, (s, n) => {
      s === this.plugin.id && this.fallbacks.setSettings(n);
    }), this.proxiedOn = new Proxy({}, {
      get: (s, n) => this.target ? this.target.on[n] : (...l) => {
        this.onQueue.push({
          method: n,
          args: l
        });
      }
    }), this.proxiedTarget = new Proxy({}, {
      get: (s, n) => this.target ? this.target[n] : n === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(n) ? (...l) => (this.targetQueue.push({
        method: n,
        args: l,
        resolve: () => {
        }
      }), this.fallbacks[n](...l)) : (...l) => new Promise((u) => {
        this.targetQueue.push({
          method: n,
          args: l,
          resolve: u
        });
      })
    });
  }
  async setRealTarget(t) {
    this.target = t;
    for (const r of this.onQueue)
      this.target.on[r.method](...r.args);
    for (const r of this.targetQueue)
      r.resolve(await this.target[r.method](...r.args));
  }
}
function fG(e, t) {
  const r = e, a = cG(), v = Kle(), o = Jle && r.enableEarlyProxy;
  if (v && (a.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
    v.emit(Qle, e, t);
  else {
    const s = o ? new rue(r, v) : null;
    (a.__VUE_DEVTOOLS_PLUGINS__ = a.__VUE_DEVTOOLS_PLUGINS__ || []).push({
      pluginDescriptor: r,
      setupFn: t,
      proxy: s
    }), s && t(s.proxiedTarget);
  }
}
var so = {};
let d3;
const fw = (e) => d3 = e, hG = so.NODE_ENV !== "production" ? Symbol("pinia") : (
  /* istanbul ignore next */
  Symbol()
);
function yv(e) {
  return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
}
var y0;
(function(e) {
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
})(y0 || (y0 = {}));
const Yy = typeof window < "u", iN = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
function iue(e, { autoBom: t = !1 } = {}) {
  return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
}
function sD(e, t, r) {
  const a = new XMLHttpRequest();
  a.open("GET", e), a.responseType = "blob", a.onload = function() {
    mG(a.response, t, r);
  }, a.onerror = function() {
    console.error("could not download file");
  }, a.send();
}
function dG(e) {
  const t = new XMLHttpRequest();
  t.open("HEAD", e, !1);
  try {
    t.send();
  } catch {
  }
  return t.status >= 200 && t.status <= 299;
}
function o8(e) {
  try {
    e.dispatchEvent(new MouseEvent("click"));
  } catch {
    const r = document.createEvent("MouseEvents");
    r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
  }
}
const s8 = typeof navigator == "object" ? navigator : { userAgent: "" }, pG = /Macintosh/.test(s8.userAgent) && /AppleWebKit/.test(s8.userAgent) && !/Safari/.test(s8.userAgent), mG = Yy ? (
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !pG ? aue : (
    // Use msSaveOrOpenBlob as a second approach
    "msSaveOrOpenBlob" in s8 ? oue : (
      // Fallback to using FileReader and a popup
      sue
    )
  )
) : () => {
};
function aue(e, t = "download", r) {
  const a = document.createElement("a");
  a.download = t, a.rel = "noopener", typeof e == "string" ? (a.href = e, a.origin !== location.origin ? dG(a.href) ? sD(e, t, r) : (a.target = "_blank", o8(a)) : o8(a)) : (a.href = URL.createObjectURL(e), setTimeout(function() {
    URL.revokeObjectURL(a.href);
  }, 4e4), setTimeout(function() {
    o8(a);
  }, 0));
}
function oue(e, t = "download", r) {
  if (typeof e == "string")
    if (dG(e))
      sD(e, t, r);
    else {
      const a = document.createElement("a");
      a.href = e, a.target = "_blank", setTimeout(function() {
        o8(a);
      });
    }
  else
    navigator.msSaveOrOpenBlob(iue(e, r), t);
}
function sue(e, t, r, a) {
  if (a = a || open("", "_blank"), a && (a.document.title = a.document.body.innerText = "downloading..."), typeof e == "string")
    return sD(e, t, r);
  const v = e.type === "application/octet-stream", o = /constructor/i.test(String(iN.HTMLElement)) || "safari" in iN, s = /CriOS\/[\d]+/.test(navigator.userAgent);
  if ((s || v && o || pG) && typeof FileReader < "u") {
    const n = new FileReader();
    n.onloadend = function() {
      let l = n.result;
      if (typeof l != "string")
        throw a = null, new Error("Wrong reader.result type");
      l = s ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"), a ? a.location.href = l : location.assign(l), a = null;
    }, n.readAsDataURL(e);
  } else {
    const n = URL.createObjectURL(e);
    a ? a.location.assign(n) : location.href = n, a = null, setTimeout(function() {
      URL.revokeObjectURL(n);
    }, 4e4);
  }
}
function Bc(e, t) {
  const r = "🍍 " + e;
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(r, t) : t === "error" ? console.error(r) : t === "warn" ? console.warn(r) : console.log(r);
}
function lD(e) {
  return "_a" in e && "install" in e;
}
function gG() {
  if (!("clipboard" in navigator))
    return Bc("Your browser doesn't support the Clipboard API", "error"), !0;
}
function yG(e) {
  return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (Bc('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
}
async function lue(e) {
  if (!gG())
    try {
      await navigator.clipboard.writeText(JSON.stringify(e.state.value)), Bc("Global state copied to clipboard.");
    } catch (t) {
      if (yG(t))
        return;
      Bc("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
    }
}
async function uue(e) {
  if (!gG())
    try {
      vG(e, JSON.parse(await navigator.clipboard.readText())), Bc("Global state pasted from clipboard.");
    } catch (t) {
      if (yG(t))
        return;
      Bc("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
    }
}
async function cue(e) {
  try {
    mG(new Blob([JSON.stringify(e.state.value)], {
      type: "text/plain;charset=utf-8"
    }), "pinia-state.json");
  } catch (t) {
    Bc("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
  }
}
let fm;
function fue() {
  fm || (fm = document.createElement("input"), fm.type = "file", fm.accept = ".json");
  function e() {
    return new Promise((t, r) => {
      fm.onchange = async () => {
        const a = fm.files;
        if (!a)
          return t(null);
        const v = a.item(0);
        return t(v ? { text: await v.text(), file: v } : null);
      }, fm.oncancel = () => t(null), fm.onerror = r, fm.click();
    });
  }
  return e;
}
async function hue(e) {
  try {
    const r = await fue()();
    if (!r)
      return;
    const { text: a, file: v } = r;
    vG(e, JSON.parse(a)), Bc(`Global state imported from "${v.name}".`);
  } catch (t) {
    Bc("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
  }
}
function vG(e, t) {
  for (const r in t) {
    const a = e.state.value[r];
    a ? Object.assign(a, t[r]) : e.state.value[r] = t[r];
  }
}
function Jd(e) {
  return {
    _custom: {
      display: e
    }
  };
}
const xG = "🍍 Pinia (root)", l8 = "_root";
function due(e) {
  return lD(e) ? {
    id: l8,
    label: xG
  } : {
    id: e.$id,
    label: e.$id
  };
}
function pue(e) {
  if (lD(e)) {
    const r = Array.from(e._s.keys()), a = e._s;
    return {
      state: r.map((o) => ({
        editable: !0,
        key: o,
        value: e.state.value[o]
      })),
      getters: r.filter((o) => a.get(o)._getters).map((o) => {
        const s = a.get(o);
        return {
          editable: !1,
          key: o,
          value: s._getters.reduce((n, l) => (n[l] = s[l], n), {})
        };
      })
    };
  }
  const t = {
    state: Object.keys(e.$state).map((r) => ({
      editable: !0,
      key: r,
      value: e.$state[r]
    }))
  };
  return e._getters && e._getters.length && (t.getters = e._getters.map((r) => ({
    editable: !1,
    key: r,
    value: e[r]
  }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((r) => ({
    editable: !0,
    key: r,
    value: e[r]
  }))), t;
}
function mue(e) {
  return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
    oldValue: {},
    keys: [],
    operations: [],
    newValue: {}
  }) : {
    operation: Jd(e.type),
    key: Jd(e.key),
    oldValue: e.oldValue,
    newValue: e.newValue
  } : {};
}
function gue(e) {
  switch (e) {
    case y0.direct:
      return "mutation";
    case y0.patchFunction:
      return "$patch";
    case y0.patchObject:
      return "$patch";
    default:
      return "unknown";
  }
}
let tx = !0;
const u8 = [], Fy = "pinia:mutations", Cf = "pinia", { assign: yue } = Object, Z8 = (e) => "🍍 " + e;
function vue(e, t) {
  fG({
    id: "dev.esm.pinia",
    label: "Pinia 🍍",
    logo: "https://pinia.vuejs.org/logo.svg",
    packageName: "pinia",
    homepage: "https://pinia.vuejs.org",
    componentStateTypes: u8,
    app: e
  }, (r) => {
    typeof r.now != "function" && Bc("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), r.addTimelineLayer({
      id: Fy,
      label: "Pinia 🍍",
      color: 15064968
    }), r.addInspector({
      id: Cf,
      label: "Pinia 🍍",
      icon: "storage",
      treeFilterPlaceholder: "Search stores",
      actions: [
        {
          icon: "content_copy",
          action: () => {
            lue(t);
          },
          tooltip: "Serialize and copy the state"
        },
        {
          icon: "content_paste",
          action: async () => {
            await uue(t), r.sendInspectorTree(Cf), r.sendInspectorState(Cf);
          },
          tooltip: "Replace the state with the content of your clipboard"
        },
        {
          icon: "save",
          action: () => {
            cue(t);
          },
          tooltip: "Save the state as a JSON file"
        },
        {
          icon: "folder_open",
          action: async () => {
            await hue(t), r.sendInspectorTree(Cf), r.sendInspectorState(Cf);
          },
          tooltip: "Import the state from a JSON file"
        }
      ],
      nodeActions: [
        {
          icon: "restore",
          tooltip: 'Reset the state (with "$reset")',
          action: (a) => {
            const v = t._s.get(a);
            v ? typeof v.$reset != "function" ? Bc(`Cannot reset "${a}" store because it doesn't have a "$reset" method implemented.`, "warn") : (v.$reset(), Bc(`Store "${a}" reset.`)) : Bc(`Cannot reset "${a}" store because it wasn't found.`, "warn");
          }
        }
      ]
    }), r.on.inspectComponent((a, v) => {
      const o = a.componentInstance && a.componentInstance.proxy;
      if (o && o._pStores) {
        const s = a.componentInstance.proxy._pStores;
        Object.values(s).forEach((n) => {
          a.instanceData.state.push({
            type: Z8(n.$id),
            key: "state",
            editable: !0,
            value: n._isOptionsAPI ? {
              _custom: {
                value: Ta(n.$state),
                actions: [
                  {
                    icon: "restore",
                    tooltip: "Reset the state of this store",
                    action: () => n.$reset()
                  }
                ]
              }
            } : (
              // NOTE: workaround to unwrap transferred refs
              Object.keys(n.$state).reduce((l, u) => (l[u] = n.$state[u], l), {})
            )
          }), n._getters && n._getters.length && a.instanceData.state.push({
            type: Z8(n.$id),
            key: "getters",
            editable: !1,
            value: n._getters.reduce((l, u) => {
              try {
                l[u] = n[u];
              } catch (i) {
                l[u] = i;
              }
              return l;
            }, {})
          });
        });
      }
    }), r.on.getInspectorTree((a) => {
      if (a.app === e && a.inspectorId === Cf) {
        let v = [t];
        v = v.concat(Array.from(t._s.values())), a.rootNodes = (a.filter ? v.filter((o) => "$id" in o ? o.$id.toLowerCase().includes(a.filter.toLowerCase()) : xG.toLowerCase().includes(a.filter.toLowerCase())) : v).map(due);
      }
    }), globalThis.$pinia = t, r.on.getInspectorState((a) => {
      if (a.app === e && a.inspectorId === Cf) {
        const v = a.nodeId === l8 ? t : t._s.get(a.nodeId);
        if (!v)
          return;
        v && (a.nodeId !== l8 && (globalThis.$store = Ta(v)), a.state = pue(v));
      }
    }), r.on.editInspectorState((a, v) => {
      if (a.app === e && a.inspectorId === Cf) {
        const o = a.nodeId === l8 ? t : t._s.get(a.nodeId);
        if (!o)
          return Bc(`store "${a.nodeId}" not found`, "error");
        const { path: s } = a;
        lD(o) ? s.unshift("state") : (s.length !== 1 || !o._customProperties.has(s[0]) || s[0] in o.$state) && s.unshift("$state"), tx = !1, a.set(o, s, a.state.value), tx = !0;
      }
    }), r.on.editComponentState((a) => {
      if (a.type.startsWith("🍍")) {
        const v = a.type.replace(/^🍍\s*/, ""), o = t._s.get(v);
        if (!o)
          return Bc(`store "${v}" not found`, "error");
        const { path: s } = a;
        if (s[0] !== "state")
          return Bc(`Invalid path for store "${v}":
${s}
Only state can be modified.`);
        s[0] = "$state", tx = !1, a.set(o, s, a.state.value), tx = !0;
      }
    });
  });
}
function xue(e, t) {
  u8.includes(Z8(t.$id)) || u8.push(Z8(t.$id)), fG({
    id: "dev.esm.pinia",
    label: "Pinia 🍍",
    logo: "https://pinia.vuejs.org/logo.svg",
    packageName: "pinia",
    homepage: "https://pinia.vuejs.org",
    componentStateTypes: u8,
    app: e,
    settings: {
      logStoreChanges: {
        label: "Notify about new/deleted stores",
        type: "boolean",
        defaultValue: !0
      }
      // useEmojis: {
      //   label: 'Use emojis in messages ⚡️',
      //   type: 'boolean',
      //   defaultValue: true,
      // },
    }
  }, (r) => {
    const a = typeof r.now == "function" ? r.now.bind(r) : Date.now;
    t.$onAction(({ after: s, onError: n, name: l, args: u }) => {
      const i = bG++;
      r.addTimelineEvent({
        layerId: Fy,
        event: {
          time: a(),
          title: "🛫 " + l,
          subtitle: "start",
          data: {
            store: Jd(t.$id),
            action: Jd(l),
            args: u
          },
          groupId: i
        }
      }), s((h) => {
        Z1 = void 0, r.addTimelineEvent({
          layerId: Fy,
          event: {
            time: a(),
            title: "🛬 " + l,
            subtitle: "end",
            data: {
              store: Jd(t.$id),
              action: Jd(l),
              args: u,
              result: h
            },
            groupId: i
          }
        });
      }), n((h) => {
        Z1 = void 0, r.addTimelineEvent({
          layerId: Fy,
          event: {
            time: a(),
            logType: "error",
            title: "💥 " + l,
            subtitle: "end",
            data: {
              store: Jd(t.$id),
              action: Jd(l),
              args: u,
              error: h
            },
            groupId: i
          }
        });
      });
    }, !0), t._customProperties.forEach((s) => {
      Dm(() => pg(t[s]), (n, l) => {
        r.notifyComponentUpdate(), r.sendInspectorState(Cf), tx && r.addTimelineEvent({
          layerId: Fy,
          event: {
            time: a(),
            title: "Change",
            subtitle: s,
            data: {
              newValue: n,
              oldValue: l
            },
            groupId: Z1
          }
        });
      }, { deep: !0 });
    }), t.$subscribe(({ events: s, type: n }, l) => {
      if (r.notifyComponentUpdate(), r.sendInspectorState(Cf), !tx)
        return;
      const u = {
        time: a(),
        title: gue(n),
        data: yue({ store: Jd(t.$id) }, mue(s)),
        groupId: Z1
      };
      n === y0.patchFunction ? u.subtitle = "⤵️" : n === y0.patchObject ? u.subtitle = "🧩" : s && !Array.isArray(s) && (u.subtitle = s.type), s && (u.data["rawEvent(s)"] = {
        _custom: {
          display: "DebuggerEvent",
          type: "object",
          tooltip: "raw DebuggerEvent[]",
          value: s
        }
      }), r.addTimelineEvent({
        layerId: Fy,
        event: u
      });
    }, { detached: !0, flush: "sync" });
    const v = t._hotUpdate;
    t._hotUpdate = Y1((s) => {
      v(s), r.addTimelineEvent({
        layerId: Fy,
        event: {
          time: a(),
          title: "🔥 " + t.$id,
          subtitle: "HMR update",
          data: {
            store: Jd(t.$id),
            info: Jd("HMR update")
          }
        }
      }), r.notifyComponentUpdate(), r.sendInspectorTree(Cf), r.sendInspectorState(Cf);
    });
    const { $dispose: o } = t;
    t.$dispose = () => {
      o(), r.notifyComponentUpdate(), r.sendInspectorTree(Cf), r.sendInspectorState(Cf), r.getSettings().logStoreChanges && Bc(`Disposed "${t.$id}" store 🗑`);
    }, r.notifyComponentUpdate(), r.sendInspectorTree(Cf), r.sendInspectorState(Cf), r.getSettings().logStoreChanges && Bc(`"${t.$id}" store installed 🆕`);
  });
}
let bG = 0, Z1;
function aN(e, t, r) {
  const a = t.reduce((v, o) => (v[o] = Ta(e)[o], v), {});
  for (const v in a)
    e[v] = function() {
      const o = bG, s = r ? new Proxy(e, {
        get(...l) {
          return Z1 = o, Reflect.get(...l);
        },
        set(...l) {
          return Z1 = o, Reflect.set(...l);
        }
      }) : e;
      Z1 = o;
      const n = a[v].apply(s, arguments);
      return Z1 = void 0, n;
    };
}
function bue({ app: e, store: t, options: r }) {
  if (!t.$id.startsWith("__hot:")) {
    if (t._isOptionsAPI = !!r.state, !t._p._testing) {
      aN(t, Object.keys(r.actions), t._isOptionsAPI);
      const a = t._hotUpdate;
      Ta(t)._hotUpdate = function(v) {
        a.apply(this, arguments), aN(t, Object.keys(v._hmrPayload.actions), !!t._isOptionsAPI);
      };
    }
    xue(
      e,
      // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
      t
    );
  }
}
function _ue() {
  const e = Nq(!0), t = e.run(() => Ys({}));
  let r = [], a = [];
  const v = Y1({
    install(o) {
      fw(v), v._a = o, o.provide(hG, v), o.config.globalProperties.$pinia = v, so.NODE_ENV !== "production" && so.NODE_ENV !== "test" && Yy && vue(o, v), a.forEach((s) => r.push(s)), a = [];
    },
    use(o) {
      return !this._a && !uG ? a.push(o) : r.push(o), this;
    },
    _p: r,
    // it's actually undefined here
    // @ts-expect-error
    _a: null,
    _e: e,
    _s: /* @__PURE__ */ new Map(),
    state: t
  });
  return so.NODE_ENV !== "production" && so.NODE_ENV !== "test" && typeof Proxy < "u" && v.use(bue), v;
}
function _G(e, t) {
  for (const r in t) {
    const a = t[r];
    if (!(r in e))
      continue;
    const v = e[r];
    yv(v) && yv(a) && !fl(a) && !g0(a) ? e[r] = _G(v, a) : e[r] = a;
  }
  return e;
}
const wG = () => {
};
function oN(e, t, r, a = wG) {
  e.push(t);
  const v = () => {
    const o = e.indexOf(t);
    o > -1 && (e.splice(o, 1), a());
  };
  return !r && HI() && Bq(v), v;
}
function z2(e, ...t) {
  e.slice().forEach((r) => {
    r(...t);
  });
}
const wue = (e) => e(), sN = Symbol(), mS = Symbol();
function vE(e, t) {
  e instanceof Map && t instanceof Map ? t.forEach((r, a) => e.set(a, r)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
  for (const r in t) {
    if (!t.hasOwnProperty(r))
      continue;
    const a = t[r], v = e[r];
    yv(v) && yv(a) && e.hasOwnProperty(r) && !fl(a) && !g0(a) ? e[r] = vE(v, a) : e[r] = a;
  }
  return e;
}
const kue = so.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
  /* istanbul ignore next */
  Symbol()
);
function Tue(e) {
  return !yv(e) || !e.hasOwnProperty(kue);
}
const { assign: xd } = Object;
function lN(e) {
  return !!(fl(e) && e.effect);
}
function uN(e, t, r, a) {
  const { state: v, actions: o, getters: s } = t, n = r.state.value[e];
  let l;
  function u() {
    !n && (so.NODE_ENV === "production" || !a) && (r.state.value[e] = v ? v() : {});
    const i = so.NODE_ENV !== "production" && a ? (
      // use ref() to unwrap refs inside state TODO: check if this is still necessary
      wF(Ys(v ? v() : {}).value)
    ) : wF(r.state.value[e]);
    return xd(i, o, Object.keys(s || {}).reduce((h, p) => (so.NODE_ENV !== "production" && p in i && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`), h[p] = Y1(Hu(() => {
      fw(r);
      const _ = r._s.get(e);
      return s[p].call(_, _);
    })), h), {}));
  }
  return l = xE(e, u, t, r, a, !0), l;
}
function xE(e, t, r = {}, a, v, o) {
  let s;
  const n = xd({ actions: {} }, r);
  if (so.NODE_ENV !== "production" && !a._e.active)
    throw new Error("Pinia destroyed");
  const l = { deep: !0 };
  so.NODE_ENV !== "production" && !uG && (l.onTrigger = (L) => {
    u ? _ = L : u == !1 && !A._hotUpdating && (Array.isArray(_) ? _.push(L) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
  });
  let u, i, h = [], p = [], _;
  const d = a.state.value[e];
  !o && !d && (so.NODE_ENV === "production" || !v) && (a.state.value[e] = {});
  const f = Ys({});
  let c;
  function g(L) {
    let E;
    u = i = !1, so.NODE_ENV !== "production" && (_ = []), typeof L == "function" ? (L(a.state.value[e]), E = {
      type: y0.patchFunction,
      storeId: e,
      events: _
    }) : (vE(a.state.value[e], L), E = {
      type: y0.patchObject,
      payload: L,
      storeId: e,
      events: _
    });
    const P = c = Symbol();
    nE().then(() => {
      c === P && (u = !0);
    }), i = !0, z2(h, E, a.state.value[e]);
  }
  const m = o ? function() {
    const { state: E } = r, P = E ? E() : {};
    this.$patch((I) => {
      xd(I, P);
    });
  } : (
    /* istanbul ignore next */
    so.NODE_ENV !== "production" ? () => {
      throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
    } : wG
  );
  function x() {
    s.stop(), h = [], p = [], a._s.delete(e);
  }
  const w = (L, E = "") => {
    if (sN in L)
      return L[mS] = E, L;
    const P = function() {
      fw(a);
      const I = Array.from(arguments), M = [], O = [];
      function T(U) {
        M.push(U);
      }
      function z(U) {
        O.push(U);
      }
      z2(p, {
        args: I,
        name: P[mS],
        store: A,
        after: T,
        onError: z
      });
      let F;
      try {
        F = L.apply(this && this.$id === e ? this : A, I);
      } catch (U) {
        throw z2(O, U), U;
      }
      return F instanceof Promise ? F.then((U) => (z2(M, U), U)).catch((U) => (z2(O, U), Promise.reject(U))) : (z2(M, F), F);
    };
    return P[sN] = !0, P[mS] = E, P;
  }, k = /* @__PURE__ */ Y1({
    actions: {},
    getters: {},
    state: [],
    hotState: f
  }), S = {
    _p: a,
    // _s: scope,
    $id: e,
    $onAction: oN.bind(null, p),
    $patch: g,
    $reset: m,
    $subscribe(L, E = {}) {
      const P = oN(h, L, E.detached, () => I()), I = s.run(() => Dm(() => a.state.value[e], (M) => {
        (E.flush === "sync" ? i : u) && L({
          storeId: e,
          type: y0.direct,
          events: _
        }, M);
      }, xd({}, l, E)));
      return P;
    },
    $dispose: x
  }, A = Hk(so.NODE_ENV !== "production" || so.NODE_ENV !== "production" && so.NODE_ENV !== "test" && Yy ? xd(
    {
      _hmrPayload: k,
      _customProperties: Y1(/* @__PURE__ */ new Set())
      // devtools custom properties
    },
    S
    // must be added later
    // setupStore
  ) : S);
  a._s.set(e, A);
  const D = (a._a && a._a.runWithContext || wue)(() => a._e.run(() => (s = Nq()).run(() => t({ action: w }))));
  for (const L in D) {
    const E = D[L];
    if (fl(E) && !lN(E) || g0(E))
      so.NODE_ENV !== "production" && v ? n6(f.value, L, iS(D, L)) : o || (d && Tue(E) && (fl(E) ? E.value = d[L] : vE(E, d[L])), a.state.value[e][L] = E), so.NODE_ENV !== "production" && k.state.push(L);
    else if (typeof E == "function") {
      const P = so.NODE_ENV !== "production" && v ? E : w(E, L);
      D[L] = P, so.NODE_ENV !== "production" && (k.actions[L] = E), n.actions[L] = E;
    } else so.NODE_ENV !== "production" && lN(E) && (k.getters[L] = o ? (
      // @ts-expect-error
      r.getters[L]
    ) : E, Yy && (D._getters || // @ts-expect-error: same
    (D._getters = Y1([]))).push(L));
  }
  if (xd(A, D), xd(Ta(A), D), Object.defineProperty(A, "$state", {
    get: () => so.NODE_ENV !== "production" && v ? f.value : a.state.value[e],
    set: (L) => {
      if (so.NODE_ENV !== "production" && v)
        throw new Error("cannot set hotState");
      g((E) => {
        xd(E, L);
      });
    }
  }), so.NODE_ENV !== "production" && (A._hotUpdate = Y1((L) => {
    A._hotUpdating = !0, L._hmrPayload.state.forEach((E) => {
      if (E in A.$state) {
        const P = L.$state[E], I = A.$state[E];
        typeof P == "object" && yv(P) && yv(I) ? _G(P, I) : L.$state[E] = I;
      }
      n6(A, E, iS(L.$state, E));
    }), Object.keys(A.$state).forEach((E) => {
      E in L.$state || pS(A, E);
    }), u = !1, i = !1, a.state.value[e] = iS(L._hmrPayload, "hotState"), i = !0, nE().then(() => {
      u = !0;
    });
    for (const E in L._hmrPayload.actions) {
      const P = L[E];
      n6(A, E, w(P, E));
    }
    for (const E in L._hmrPayload.getters) {
      const P = L._hmrPayload.getters[E], I = o ? (
        // special handling of options api
        Hu(() => (fw(a), P.call(A, A)))
      ) : P;
      n6(A, E, I);
    }
    Object.keys(A._hmrPayload.getters).forEach((E) => {
      E in L._hmrPayload.getters || pS(A, E);
    }), Object.keys(A._hmrPayload.actions).forEach((E) => {
      E in L._hmrPayload.actions || pS(A, E);
    }), A._hmrPayload = L._hmrPayload, A._getters = L._getters, A._hotUpdating = !1;
  })), so.NODE_ENV !== "production" && so.NODE_ENV !== "test" && Yy) {
    const L = {
      writable: !0,
      configurable: !0,
      // avoid warning on devtools trying to display this property
      enumerable: !1
    };
    ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((E) => {
      Object.defineProperty(A, E, xd({ value: A[E] }, L));
    });
  }
  return a._p.forEach((L) => {
    if (so.NODE_ENV !== "production" && so.NODE_ENV !== "test" && Yy) {
      const E = s.run(() => L({
        store: A,
        app: a._a,
        pinia: a,
        options: n
      }));
      Object.keys(E || {}).forEach((P) => A._customProperties.add(P)), xd(A, E);
    } else
      xd(A, s.run(() => L({
        store: A,
        app: a._a,
        pinia: a,
        options: n
      })));
  }), so.NODE_ENV !== "production" && A.$state && typeof A.$state == "object" && typeof A.$state.constructor == "function" && !A.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
	state: () => new MyClass()
Found in store "${A.$id}".`), d && o && r.hydrate && r.hydrate(A.$state, d), u = !0, i = !0, A;
}
// @__NO_SIDE_EFFECTS__
function kG(e, t, r) {
  let a, v;
  const o = typeof t == "function";
  if (typeof e == "string")
    a = e, v = o ? r : t;
  else if (v = e, a = e.id, so.NODE_ENV !== "production" && typeof a != "string")
    throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
  function s(n, l) {
    const u = kse();
    if (n = // in test mode, ignore the argument provided as we can always retrieve a
    // pinia instance with getActivePinia()
    (so.NODE_ENV === "test" && d3 && d3._testing ? null : n) || (u ? U3(hG, null) : null), n && fw(n), so.NODE_ENV !== "production" && !d3)
      throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
This will fail in production.`);
    n = d3, n._s.has(a) || (o ? xE(a, t, v, n) : uN(a, v, n), so.NODE_ENV !== "production" && (s._pinia = n));
    const i = n._s.get(a);
    if (so.NODE_ENV !== "production" && l) {
      const h = "__hot:" + a, p = o ? xE(h, t, v, n, !0) : uN(h, xd({}, v), n, !0);
      l._hotUpdate(p), delete n.state.value[h], n._s.delete(h);
    }
    if (so.NODE_ENV !== "production" && Yy) {
      const h = Xk();
      if (h && h.proxy && // avoid adding stores that are just built for hot module replacement
      !l) {
        const p = h.proxy, _ = "_pStores" in p ? p._pStores : p._pStores = {};
        _[a] = i;
      }
    }
    return i;
  }
  return s.$id = a, s;
}
var Aue = typeof global == "object" && global && global.Object === Object && global, Sue = typeof self == "object" && self && self.Object === Object && self, TG = Aue || Sue || Function("return this")(), X8 = TG.Symbol, AG = Object.prototype, Mue = AG.hasOwnProperty, Eue = AG.toString, O_ = X8 ? X8.toStringTag : void 0;
function Cue(e) {
  var t = Mue.call(e, O_), r = e[O_];
  try {
    e[O_] = void 0;
    var a = !0;
  } catch {
  }
  var v = Eue.call(e);
  return a && (t ? e[O_] = r : delete e[O_]), v;
}
var Iue = Object.prototype, Due = Iue.toString;
function Lue(e) {
  return Due.call(e);
}
var Pue = "[object Null]", Oue = "[object Undefined]", cN = X8 ? X8.toStringTag : void 0;
function zue(e) {
  return e == null ? e === void 0 ? Oue : Pue : cN && cN in Object(e) ? Cue(e) : Lue(e);
}
function Rue(e) {
  return e != null && typeof e == "object";
}
var Fue = "[object Symbol]";
function Nue(e) {
  return typeof e == "symbol" || Rue(e) && zue(e) == Fue;
}
var Bue = /\s/;
function jue(e) {
  for (var t = e.length; t-- && Bue.test(e.charAt(t)); )
    ;
  return t;
}
var Uue = /^\s+/;
function Vue(e) {
  return e && e.slice(0, jue(e) + 1).replace(Uue, "");
}
function K8(e) {
  var t = typeof e;
  return e != null && (t == "object" || t == "function");
}
var fN = NaN, $ue = /^[-+]0x[0-9a-f]+$/i, que = /^0b[01]+$/i, Hue = /^0o[0-7]+$/i, Gue = parseInt;
function hN(e) {
  if (typeof e == "number")
    return e;
  if (Nue(e))
    return fN;
  if (K8(e)) {
    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
    e = K8(t) ? t + "" : t;
  }
  if (typeof e != "string")
    return e === 0 ? e : +e;
  e = Vue(e);
  var r = que.test(e);
  return r || Hue.test(e) ? Gue(e.slice(2), r ? 2 : 8) : $ue.test(e) ? fN : +e;
}
var gS = function() {
  return TG.Date.now();
}, Wue = "Expected a function", Yue = Math.max, Zue = Math.min;
function c8(e, t, r) {
  var a, v, o, s, n, l, u = 0, i = !1, h = !1, p = !0;
  if (typeof e != "function")
    throw new TypeError(Wue);
  t = hN(t) || 0, K8(r) && (i = !!r.leading, h = "maxWait" in r, o = h ? Yue(hN(r.maxWait) || 0, t) : o, p = "trailing" in r ? !!r.trailing : p);
  function _(S) {
    var A = a, C = v;
    return a = v = void 0, u = S, s = e.apply(C, A), s;
  }
  function d(S) {
    return u = S, n = setTimeout(g, t), i ? _(S) : s;
  }
  function f(S) {
    var A = S - l, C = S - u, D = t - A;
    return h ? Zue(D, o - C) : D;
  }
  function c(S) {
    var A = S - l, C = S - u;
    return l === void 0 || A >= t || A < 0 || h && C >= o;
  }
  function g() {
    var S = gS();
    if (c(S))
      return m(S);
    n = setTimeout(g, f(S));
  }
  function m(S) {
    return n = void 0, p && a ? _(S) : (a = v = void 0, s);
  }
  function x() {
    n !== void 0 && clearTimeout(n), u = 0, a = l = v = n = void 0;
  }
  function w() {
    return n === void 0 ? s : m(gS());
  }
  function k() {
    var S = gS(), A = c(S);
    if (a = arguments, v = this, l = S, A) {
      if (n === void 0)
        return d(l);
      if (h)
        return clearTimeout(n), n = setTimeout(g, t), _(l);
    }
    return n === void 0 && (n = setTimeout(g, t)), s;
  }
  return k.cancel = x, k.flush = w, k;
}
var Xue = "Expected a function";
function Kue(e, t, r) {
  var a = !0, v = !0;
  if (typeof e != "function")
    throw new TypeError(Xue);
  return K8(r) && (a = "leading" in r ? !!r.leading : a, v = "trailing" in r ? !!r.trailing : v), c8(e, t, {
    leading: a,
    maxWait: t,
    trailing: v
  });
}
var nx = function() {
  return nx = Object.assign || function(t) {
    for (var r, a = 1, v = arguments.length; a < v; a++) {
      r = arguments[a];
      for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
    }
    return t;
  }, nx.apply(this, arguments);
};
function SG(e) {
  return !e || !e.ownerDocument || !e.ownerDocument.defaultView ? window : e.ownerDocument.defaultView;
}
function MG(e) {
  return !e || !e.ownerDocument ? document : e.ownerDocument;
}
var EG = function(e) {
  var t = {}, r = Array.prototype.reduce.call(e, function(a, v) {
    var o = v.name.match(/data-simplebar-(.+)/);
    if (o) {
      var s = o[1].replace(/\W+(.)/g, function(n, l) {
        return l.toUpperCase();
      });
      switch (v.value) {
        case "true":
          a[s] = !0;
          break;
        case "false":
          a[s] = !1;
          break;
        case void 0:
          a[s] = !0;
          break;
        default:
          a[s] = v.value;
      }
    }
    return a;
  }, t);
  return r;
};
function CG(e, t) {
  var r;
  e && (r = e.classList).add.apply(r, t.split(" "));
}
function IG(e, t) {
  e && t.split(" ").forEach(function(r) {
    e.classList.remove(r);
  });
}
function DG(e) {
  return ".".concat(e.split(" ").join("."));
}
var uD = !!(typeof window < "u" && window.document && window.document.createElement), Jue = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  addClasses: CG,
  canUseDOM: uD,
  classNamesToQuery: DG,
  getElementDocument: MG,
  getElementWindow: SG,
  getOptions: EG,
  removeClasses: IG
}), J2 = null, dN = null;
uD && window.addEventListener("resize", function() {
  dN !== window.devicePixelRatio && (dN = window.devicePixelRatio, J2 = null);
});
function pN() {
  if (J2 === null) {
    if (typeof document > "u")
      return J2 = 0, J2;
    var e = document.body, t = document.createElement("div");
    t.classList.add("simplebar-hide-scrollbar"), e.appendChild(t);
    var r = t.getBoundingClientRect().right;
    e.removeChild(t), J2 = r;
  }
  return J2;
}
var E1 = SG, yS = MG, Que = EG, C1 = CG, I1 = IG, kh = DG, $3 = (
  /** @class */
  function() {
    function e(t, r) {
      r === void 0 && (r = {});
      var a = this;
      if (this.removePreventClickId = null, this.minScrollbarWidth = 20, this.stopScrollDelay = 175, this.isScrolling = !1, this.isMouseEntering = !1, this.isDragging = !1, this.scrollXTicking = !1, this.scrollYTicking = !1, this.wrapperEl = null, this.contentWrapperEl = null, this.contentEl = null, this.offsetEl = null, this.maskEl = null, this.placeholderEl = null, this.heightAutoObserverWrapperEl = null, this.heightAutoObserverEl = null, this.rtlHelpers = null, this.scrollbarWidth = 0, this.resizeObserver = null, this.mutationObserver = null, this.elStyles = null, this.isRtl = null, this.mouseX = 0, this.mouseY = 0, this.onMouseMove = function() {
      }, this.onWindowResize = function() {
      }, this.onStopScrolling = function() {
      }, this.onMouseEntered = function() {
      }, this.onScroll = function() {
        var v = E1(a.el);
        a.scrollXTicking || (v.requestAnimationFrame(a.scrollX), a.scrollXTicking = !0), a.scrollYTicking || (v.requestAnimationFrame(a.scrollY), a.scrollYTicking = !0), a.isScrolling || (a.isScrolling = !0, C1(a.el, a.classNames.scrolling)), a.showScrollbar("x"), a.showScrollbar("y"), a.onStopScrolling();
      }, this.scrollX = function() {
        a.axis.x.isOverflowing && a.positionScrollbar("x"), a.scrollXTicking = !1;
      }, this.scrollY = function() {
        a.axis.y.isOverflowing && a.positionScrollbar("y"), a.scrollYTicking = !1;
      }, this._onStopScrolling = function() {
        I1(a.el, a.classNames.scrolling), a.options.autoHide && (a.hideScrollbar("x"), a.hideScrollbar("y")), a.isScrolling = !1;
      }, this.onMouseEnter = function() {
        a.isMouseEntering || (C1(a.el, a.classNames.mouseEntered), a.showScrollbar("x"), a.showScrollbar("y"), a.isMouseEntering = !0), a.onMouseEntered();
      }, this._onMouseEntered = function() {
        I1(a.el, a.classNames.mouseEntered), a.options.autoHide && (a.hideScrollbar("x"), a.hideScrollbar("y")), a.isMouseEntering = !1;
      }, this._onMouseMove = function(v) {
        a.mouseX = v.clientX, a.mouseY = v.clientY, (a.axis.x.isOverflowing || a.axis.x.forceVisible) && a.onMouseMoveForAxis("x"), (a.axis.y.isOverflowing || a.axis.y.forceVisible) && a.onMouseMoveForAxis("y");
      }, this.onMouseLeave = function() {
        a.onMouseMove.cancel(), (a.axis.x.isOverflowing || a.axis.x.forceVisible) && a.onMouseLeaveForAxis("x"), (a.axis.y.isOverflowing || a.axis.y.forceVisible) && a.onMouseLeaveForAxis("y"), a.mouseX = -1, a.mouseY = -1;
      }, this._onWindowResize = function() {
        a.scrollbarWidth = a.getScrollbarWidth(), a.hideNativeScrollbar();
      }, this.onPointerEvent = function(v) {
        if (!(!a.axis.x.track.el || !a.axis.y.track.el || !a.axis.x.scrollbar.el || !a.axis.y.scrollbar.el)) {
          var o, s;
          a.axis.x.track.rect = a.axis.x.track.el.getBoundingClientRect(), a.axis.y.track.rect = a.axis.y.track.el.getBoundingClientRect(), (a.axis.x.isOverflowing || a.axis.x.forceVisible) && (o = a.isWithinBounds(a.axis.x.track.rect)), (a.axis.y.isOverflowing || a.axis.y.forceVisible) && (s = a.isWithinBounds(a.axis.y.track.rect)), (o || s) && (v.stopPropagation(), v.type === "pointerdown" && v.pointerType !== "touch" && (o && (a.axis.x.scrollbar.rect = a.axis.x.scrollbar.el.getBoundingClientRect(), a.isWithinBounds(a.axis.x.scrollbar.rect) ? a.onDragStart(v, "x") : a.onTrackClick(v, "x")), s && (a.axis.y.scrollbar.rect = a.axis.y.scrollbar.el.getBoundingClientRect(), a.isWithinBounds(a.axis.y.scrollbar.rect) ? a.onDragStart(v, "y") : a.onTrackClick(v, "y"))));
        }
      }, this.drag = function(v) {
        var o, s, n, l, u, i, h, p, _, d, f;
        if (!(!a.draggedAxis || !a.contentWrapperEl)) {
          var c, g = a.axis[a.draggedAxis].track, m = (s = (o = g.rect) === null || o === void 0 ? void 0 : o[a.axis[a.draggedAxis].sizeAttr]) !== null && s !== void 0 ? s : 0, x = a.axis[a.draggedAxis].scrollbar, w = (l = (n = a.contentWrapperEl) === null || n === void 0 ? void 0 : n[a.axis[a.draggedAxis].scrollSizeAttr]) !== null && l !== void 0 ? l : 0, k = parseInt((i = (u = a.elStyles) === null || u === void 0 ? void 0 : u[a.axis[a.draggedAxis].sizeAttr]) !== null && i !== void 0 ? i : "0px", 10);
          v.preventDefault(), v.stopPropagation(), a.draggedAxis === "y" ? c = v.pageY : c = v.pageX;
          var S = c - ((p = (h = g.rect) === null || h === void 0 ? void 0 : h[a.axis[a.draggedAxis].offsetAttr]) !== null && p !== void 0 ? p : 0) - a.axis[a.draggedAxis].dragOffset;
          S = a.draggedAxis === "x" && a.isRtl ? ((d = (_ = g.rect) === null || _ === void 0 ? void 0 : _[a.axis[a.draggedAxis].sizeAttr]) !== null && d !== void 0 ? d : 0) - x.size - S : S;
          var A = S / (m - x.size), C = A * (w - k);
          a.draggedAxis === "x" && a.isRtl && (C = !((f = e.getRtlHelpers()) === null || f === void 0) && f.isScrollingToNegative ? -C : C), a.contentWrapperEl[a.axis[a.draggedAxis].scrollOffsetAttr] = C;
        }
      }, this.onEndDrag = function(v) {
        a.isDragging = !1;
        var o = yS(a.el), s = E1(a.el);
        v.preventDefault(), v.stopPropagation(), I1(a.el, a.classNames.dragging), a.onStopScrolling(), o.removeEventListener("mousemove", a.drag, !0), o.removeEventListener("mouseup", a.onEndDrag, !0), a.removePreventClickId = s.setTimeout(function() {
          o.removeEventListener("click", a.preventClick, !0), o.removeEventListener("dblclick", a.preventClick, !0), a.removePreventClickId = null;
        });
      }, this.preventClick = function(v) {
        v.preventDefault(), v.stopPropagation();
      }, this.el = t, this.options = nx(nx({}, e.defaultOptions), r), this.classNames = nx(nx({}, e.defaultOptions.classNames), r.classNames), this.axis = {
        x: {
          scrollOffsetAttr: "scrollLeft",
          sizeAttr: "width",
          scrollSizeAttr: "scrollWidth",
          offsetSizeAttr: "offsetWidth",
          offsetAttr: "left",
          overflowAttr: "overflowX",
          dragOffset: 0,
          isOverflowing: !0,
          forceVisible: !1,
          track: { size: null, el: null, rect: null, isVisible: !1 },
          scrollbar: { size: null, el: null, rect: null, isVisible: !1 }
        },
        y: {
          scrollOffsetAttr: "scrollTop",
          sizeAttr: "height",
          scrollSizeAttr: "scrollHeight",
          offsetSizeAttr: "offsetHeight",
          offsetAttr: "top",
          overflowAttr: "overflowY",
          dragOffset: 0,
          isOverflowing: !0,
          forceVisible: !1,
          track: { size: null, el: null, rect: null, isVisible: !1 },
          scrollbar: { size: null, el: null, rect: null, isVisible: !1 }
        }
      }, typeof this.el != "object" || !this.el.nodeName)
        throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
      this.onMouseMove = Kue(this._onMouseMove, 64), this.onWindowResize = c8(this._onWindowResize, 64, { leading: !0 }), this.onStopScrolling = c8(this._onStopScrolling, this.stopScrollDelay), this.onMouseEntered = c8(this._onMouseEntered, this.stopScrollDelay), this.init();
    }
    return e.getRtlHelpers = function() {
      if (e.rtlHelpers)
        return e.rtlHelpers;
      var t = document.createElement("div");
      t.innerHTML = '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
      var r = t.firstElementChild, a = r == null ? void 0 : r.firstElementChild;
      if (!a)
        return null;
      document.body.appendChild(r), r.scrollLeft = 0;
      var v = e.getOffset(r), o = e.getOffset(a);
      r.scrollLeft = -999;
      var s = e.getOffset(a);
      return document.body.removeChild(r), e.rtlHelpers = {
        // determines if the scrolling is responding with negative values
        isScrollOriginAtZero: v.left !== o.left,
        // determines if the origin scrollbar position is inverted or not (positioned on left or right)
        isScrollingToNegative: o.left !== s.left
      }, e.rtlHelpers;
    }, e.prototype.getScrollbarWidth = function() {
      try {
        return this.contentWrapperEl && getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display === "none" || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style ? 0 : pN();
      } catch {
        return pN();
      }
    }, e.getOffset = function(t) {
      var r = t.getBoundingClientRect(), a = yS(t), v = E1(t);
      return {
        top: r.top + (v.pageYOffset || a.documentElement.scrollTop),
        left: r.left + (v.pageXOffset || a.documentElement.scrollLeft)
      };
    }, e.prototype.init = function() {
      uD && (this.initDOM(), this.rtlHelpers = e.getRtlHelpers(), this.scrollbarWidth = this.getScrollbarWidth(), this.recalculate(), this.initListeners());
    }, e.prototype.initDOM = function() {
      var t, r;
      this.wrapperEl = this.el.querySelector(kh(this.classNames.wrapper)), this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(kh(this.classNames.contentWrapper)), this.contentEl = this.options.contentNode || this.el.querySelector(kh(this.classNames.contentEl)), this.offsetEl = this.el.querySelector(kh(this.classNames.offset)), this.maskEl = this.el.querySelector(kh(this.classNames.mask)), this.placeholderEl = this.findChild(this.wrapperEl, kh(this.classNames.placeholder)), this.heightAutoObserverWrapperEl = this.el.querySelector(kh(this.classNames.heightAutoObserverWrapperEl)), this.heightAutoObserverEl = this.el.querySelector(kh(this.classNames.heightAutoObserverEl)), this.axis.x.track.el = this.findChild(this.el, "".concat(kh(this.classNames.track)).concat(kh(this.classNames.horizontal))), this.axis.y.track.el = this.findChild(this.el, "".concat(kh(this.classNames.track)).concat(kh(this.classNames.vertical))), this.axis.x.scrollbar.el = ((t = this.axis.x.track.el) === null || t === void 0 ? void 0 : t.querySelector(kh(this.classNames.scrollbar))) || null, this.axis.y.scrollbar.el = ((r = this.axis.y.track.el) === null || r === void 0 ? void 0 : r.querySelector(kh(this.classNames.scrollbar))) || null, this.options.autoHide || (C1(this.axis.x.scrollbar.el, this.classNames.visible), C1(this.axis.y.scrollbar.el, this.classNames.visible));
    }, e.prototype.initListeners = function() {
      var t = this, r, a = E1(this.el);
      if (this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("pointerdown", this.onPointerEvent, !0), this.el.addEventListener("mousemove", this.onMouseMove), this.el.addEventListener("mouseleave", this.onMouseLeave), (r = this.contentWrapperEl) === null || r === void 0 || r.addEventListener("scroll", this.onScroll), a.addEventListener("resize", this.onWindowResize), !!this.contentEl) {
        if (window.ResizeObserver) {
          var v = !1, o = a.ResizeObserver || ResizeObserver;
          this.resizeObserver = new o(function() {
            v && a.requestAnimationFrame(function() {
              t.recalculate();
            });
          }), this.resizeObserver.observe(this.el), this.resizeObserver.observe(this.contentEl), a.requestAnimationFrame(function() {
            v = !0;
          });
        }
        this.mutationObserver = new a.MutationObserver(function() {
          a.requestAnimationFrame(function() {
            t.recalculate();
          });
        }), this.mutationObserver.observe(this.contentEl, {
          childList: !0,
          subtree: !0,
          characterData: !0
        });
      }
    }, e.prototype.recalculate = function() {
      if (!(!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)) {
        var t = E1(this.el);
        this.elStyles = t.getComputedStyle(this.el), this.isRtl = this.elStyles.direction === "rtl";
        var r = this.contentEl.offsetWidth, a = this.heightAutoObserverEl.offsetHeight <= 1, v = this.heightAutoObserverEl.offsetWidth <= 1 || r > 0, o = this.contentWrapperEl.offsetWidth, s = this.elStyles.overflowX, n = this.elStyles.overflowY;
        this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft), this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
        var l = this.contentEl.scrollHeight, u = this.contentEl.scrollWidth;
        this.contentWrapperEl.style.height = a ? "auto" : "100%", this.placeholderEl.style.width = v ? "".concat(r || u, "px") : "auto", this.placeholderEl.style.height = "".concat(l, "px");
        var i = this.contentWrapperEl.offsetHeight;
        this.axis.x.isOverflowing = r !== 0 && u > r, this.axis.y.isOverflowing = l > i, this.axis.x.isOverflowing = s === "hidden" ? !1 : this.axis.x.isOverflowing, this.axis.y.isOverflowing = n === "hidden" ? !1 : this.axis.y.isOverflowing, this.axis.x.forceVisible = this.options.forceVisible === "x" || this.options.forceVisible === !0, this.axis.y.forceVisible = this.options.forceVisible === "y" || this.options.forceVisible === !0, this.hideNativeScrollbar();
        var h = this.axis.x.isOverflowing ? this.scrollbarWidth : 0, p = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
        this.axis.x.isOverflowing = this.axis.x.isOverflowing && u > o - p, this.axis.y.isOverflowing = this.axis.y.isOverflowing && l > i - h, this.axis.x.scrollbar.size = this.getScrollbarSize("x"), this.axis.y.scrollbar.size = this.getScrollbarSize("y"), this.axis.x.scrollbar.el && (this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px")), this.axis.y.scrollbar.el && (this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px")), this.positionScrollbar("x"), this.positionScrollbar("y"), this.toggleTrackVisibility("x"), this.toggleTrackVisibility("y");
      }
    }, e.prototype.getScrollbarSize = function(t) {
      var r, a;
      if (t === void 0 && (t = "y"), !this.axis[t].isOverflowing || !this.contentEl)
        return 0;
      var v = this.contentEl[this.axis[t].scrollSizeAttr], o = (a = (r = this.axis[t].track.el) === null || r === void 0 ? void 0 : r[this.axis[t].offsetSizeAttr]) !== null && a !== void 0 ? a : 0, s = o / v, n;
      return n = Math.max(~~(s * o), this.options.scrollbarMinSize), this.options.scrollbarMaxSize && (n = Math.min(n, this.options.scrollbarMaxSize)), n;
    }, e.prototype.positionScrollbar = function(t) {
      var r, a, v;
      t === void 0 && (t = "y");
      var o = this.axis[t].scrollbar;
      if (!(!this.axis[t].isOverflowing || !this.contentWrapperEl || !o.el || !this.elStyles)) {
        var s = this.contentWrapperEl[this.axis[t].scrollSizeAttr], n = ((r = this.axis[t].track.el) === null || r === void 0 ? void 0 : r[this.axis[t].offsetSizeAttr]) || 0, l = parseInt(this.elStyles[this.axis[t].sizeAttr], 10), u = this.contentWrapperEl[this.axis[t].scrollOffsetAttr];
        u = t === "x" && this.isRtl && (!((a = e.getRtlHelpers()) === null || a === void 0) && a.isScrollOriginAtZero) ? -u : u, t === "x" && this.isRtl && (u = !((v = e.getRtlHelpers()) === null || v === void 0) && v.isScrollingToNegative ? u : -u);
        var i = u / (s - l), h = ~~((n - o.size) * i);
        h = t === "x" && this.isRtl ? -h + (n - o.size) : h, o.el.style.transform = t === "x" ? "translate3d(".concat(h, "px, 0, 0)") : "translate3d(0, ".concat(h, "px, 0)");
      }
    }, e.prototype.toggleTrackVisibility = function(t) {
      t === void 0 && (t = "y");
      var r = this.axis[t].track.el, a = this.axis[t].scrollbar.el;
      !r || !a || !this.contentWrapperEl || (this.axis[t].isOverflowing || this.axis[t].forceVisible ? (r.style.visibility = "visible", this.contentWrapperEl.style[this.axis[t].overflowAttr] = "scroll", this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(t))) : (r.style.visibility = "hidden", this.contentWrapperEl.style[this.axis[t].overflowAttr] = "hidden", this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(t))), this.axis[t].isOverflowing ? a.style.display = "block" : a.style.display = "none");
    }, e.prototype.showScrollbar = function(t) {
      t === void 0 && (t = "y"), this.axis[t].isOverflowing && !this.axis[t].scrollbar.isVisible && (C1(this.axis[t].scrollbar.el, this.classNames.visible), this.axis[t].scrollbar.isVisible = !0);
    }, e.prototype.hideScrollbar = function(t) {
      t === void 0 && (t = "y"), !this.isDragging && this.axis[t].isOverflowing && this.axis[t].scrollbar.isVisible && (I1(this.axis[t].scrollbar.el, this.classNames.visible), this.axis[t].scrollbar.isVisible = !1);
    }, e.prototype.hideNativeScrollbar = function() {
      this.offsetEl && (this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px", this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px");
    }, e.prototype.onMouseMoveForAxis = function(t) {
      t === void 0 && (t = "y");
      var r = this.axis[t];
      !r.track.el || !r.scrollbar.el || (r.track.rect = r.track.el.getBoundingClientRect(), r.scrollbar.rect = r.scrollbar.el.getBoundingClientRect(), this.isWithinBounds(r.track.rect) ? (this.showScrollbar(t), C1(r.track.el, this.classNames.hover), this.isWithinBounds(r.scrollbar.rect) ? C1(r.scrollbar.el, this.classNames.hover) : I1(r.scrollbar.el, this.classNames.hover)) : (I1(r.track.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(t)));
    }, e.prototype.onMouseLeaveForAxis = function(t) {
      t === void 0 && (t = "y"), I1(this.axis[t].track.el, this.classNames.hover), I1(this.axis[t].scrollbar.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(t);
    }, e.prototype.onDragStart = function(t, r) {
      var a;
      r === void 0 && (r = "y"), this.isDragging = !0;
      var v = yS(this.el), o = E1(this.el), s = this.axis[r].scrollbar, n = r === "y" ? t.pageY : t.pageX;
      this.axis[r].dragOffset = n - (((a = s.rect) === null || a === void 0 ? void 0 : a[this.axis[r].offsetAttr]) || 0), this.draggedAxis = r, C1(this.el, this.classNames.dragging), v.addEventListener("mousemove", this.drag, !0), v.addEventListener("mouseup", this.onEndDrag, !0), this.removePreventClickId === null ? (v.addEventListener("click", this.preventClick, !0), v.addEventListener("dblclick", this.preventClick, !0)) : (o.clearTimeout(this.removePreventClickId), this.removePreventClickId = null);
    }, e.prototype.onTrackClick = function(t, r) {
      var a = this, v, o, s, n;
      r === void 0 && (r = "y");
      var l = this.axis[r];
      if (!(!this.options.clickOnTrack || !l.scrollbar.el || !this.contentWrapperEl)) {
        t.preventDefault();
        var u = E1(this.el);
        this.axis[r].scrollbar.rect = l.scrollbar.el.getBoundingClientRect();
        var i = this.axis[r].scrollbar, h = (o = (v = i.rect) === null || v === void 0 ? void 0 : v[this.axis[r].offsetAttr]) !== null && o !== void 0 ? o : 0, p = parseInt((n = (s = this.elStyles) === null || s === void 0 ? void 0 : s[this.axis[r].sizeAttr]) !== null && n !== void 0 ? n : "0px", 10), _ = this.contentWrapperEl[this.axis[r].scrollOffsetAttr], d = r === "y" ? this.mouseY - h : this.mouseX - h, f = d < 0 ? -1 : 1, c = f === -1 ? _ - p : _ + p, g = 40, m = function() {
          a.contentWrapperEl && (f === -1 ? _ > c && (_ -= g, a.contentWrapperEl[a.axis[r].scrollOffsetAttr] = _, u.requestAnimationFrame(m)) : _ < c && (_ += g, a.contentWrapperEl[a.axis[r].scrollOffsetAttr] = _, u.requestAnimationFrame(m)));
        };
        m();
      }
    }, e.prototype.getContentElement = function() {
      return this.contentEl;
    }, e.prototype.getScrollElement = function() {
      return this.contentWrapperEl;
    }, e.prototype.removeListeners = function() {
      var t = E1(this.el);
      this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("pointerdown", this.onPointerEvent, !0), this.el.removeEventListener("mousemove", this.onMouseMove), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.contentWrapperEl && this.contentWrapperEl.removeEventListener("scroll", this.onScroll), t.removeEventListener("resize", this.onWindowResize), this.mutationObserver && this.mutationObserver.disconnect(), this.resizeObserver && this.resizeObserver.disconnect(), this.onMouseMove.cancel(), this.onWindowResize.cancel(), this.onStopScrolling.cancel(), this.onMouseEntered.cancel();
    }, e.prototype.unMount = function() {
      this.removeListeners();
    }, e.prototype.isWithinBounds = function(t) {
      return this.mouseX >= t.left && this.mouseX <= t.left + t.width && this.mouseY >= t.top && this.mouseY <= t.top + t.height;
    }, e.prototype.findChild = function(t, r) {
      var a = t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector;
      return Array.prototype.filter.call(t.children, function(v) {
        return a.call(v, r);
      })[0];
    }, e.rtlHelpers = null, e.defaultOptions = {
      forceVisible: !1,
      clickOnTrack: !0,
      scrollbarMinSize: 25,
      scrollbarMaxSize: 0,
      ariaLabel: "scrollable content",
      tabIndex: 0,
      classNames: {
        contentEl: "simplebar-content",
        contentWrapper: "simplebar-content-wrapper",
        offset: "simplebar-offset",
        mask: "simplebar-mask",
        wrapper: "simplebar-wrapper",
        placeholder: "simplebar-placeholder",
        scrollbar: "simplebar-scrollbar",
        track: "simplebar-track",
        heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper",
        heightAutoObserverEl: "simplebar-height-auto-observer",
        visible: "simplebar-visible",
        horizontal: "simplebar-horizontal",
        vertical: "simplebar-vertical",
        hover: "simplebar-hover",
        dragging: "simplebar-dragging",
        scrolling: "simplebar-scrolling",
        scrollable: "simplebar-scrollable",
        mouseEntered: "simplebar-mouse-entered"
      },
      scrollableNode: null,
      contentNode: null,
      autoHide: !0
    }, e.getOptions = Que, e.helpers = Jue, e;
  }()
), Vy = function() {
  return Vy = Object.assign || function(t) {
    for (var r, a = 1, v = arguments.length; a < v; a++) {
      r = arguments[a];
      for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
    }
    return t;
  }, Vy.apply(this, arguments);
}, ece = {
  beforeUnmount: "beforeUnmount",
  unmount: "unmount"
}, z_;
function tce(e) {
  var t, r = e.h, a = e.emit, v = e.slots, o = e.props, s = function(l) {
    return a("scroll", l);
  }, n = Vy(Vy({}, $3.defaultOptions.classNames), o.classNames);
  return r("div", Vy({ ref: "element" }, {
    "data-simplebar": "init"
  }), [
    r("div", {
      class: n.wrapper
    }, [
      r("div", { class: n.heightAutoObserverWrapperEl }, [
        r("div", { class: n.heightAutoObserverEl })
      ]),
      r("div", { class: n.mask }, [
        r("div", { class: n.offset }, [
          r("div", Vy(Vy({}, {
            onScroll: s,
            class: n.contentWrapper,
            tabIndex: o.tabIndex || $3.defaultOptions.tabIndex,
            role: "region",
            "aria-label": o.ariaLabel || $3.defaultOptions.ariaLabel
          }), { ref: "scrollElement" }), [
            r("div", { class: n.contentEl, ref: "contentElement" }, (t = v.default) === null || t === void 0 ? void 0 : t.call(v))
          ])
        ])
      ]),
      r("div", { class: n.placeholder })
    ]),
    r("div", { class: "".concat(n.track, " simplebar-horizontal") }, [
      r("div", { class: n.scrollbar })
    ]),
    r("div", { class: "".concat(n.track, " simplebar-vertical") }, [
      r("div", { class: n.scrollbar })
    ])
  ]);
}
var LG = /* @__PURE__ */ Bh((z_ = {
  name: "simplebar-vue",
  props: {
    /**
     * By default SimpleBar automatically hides the scrollbar if the user is not scrolling
     * (it emulates Mac OSX Lion's scrollbar). You can make the scrollbar always visible
     * by passing `false`.
     *
     * Default value is `true`.
     *
     * You can also control the animation via CSS as it's a simple CSS opacity transition.
     */
    autoHide: { type: Boolean, default: void 0 },
    /**
     * It is possible to change the default class names that SimpleBar uses.
     * To get your own styles to work refer to simplebar.css to get an idea how to setup your css.
     * - `content` represents the wrapper for the content being scrolled.
     * - `scrollContent` represents the container containing the elements being scrolled.
     * - `scrollbar` defines the style of the scrollbar with which the user can interact to scroll the content.
     * - `track` styles the area surrounding the `scrollbar`.
     *
     * ```js
     * classNames: {
     *   // defaults
     *   content: 'simplebar-content',
     *   scrollContent: 'simplebar-scroll-content',
     *   scrollbar: 'simplebar-scrollbar',
     *   track: 'simplebar-track'
     * }
     * ```
     */
    classNames: Object,
    /**
     * Force the track to be visible (same behaviour as `overflow: scroll`).
     * Can be `boolean | 'x' | 'y'`, defaults to `false`, which behaves like `overflow: auto`.
     */
    forceVisible: {
      type: [Boolean, String],
      validator: function(e) {
        return typeof e == "boolean" || e === "x" || e === "y";
      },
      default: void 0
    },
    /**
     * Set custom aria-label attribute for users with screen reader.
     */
    ariaLabel: String,
    /**
    * Set custom tabIndex attribute.
    */
    tabIndex: Number,
    /**
     * Activate RTL support by passing `'rtl'`.
     * You will also need a css rule with `direction: rtl`.
     */
    direction: {
      type: String,
      validator: function(e) {
        return e === "ltr" || e === "rtl";
      }
    },
    /**
     * Define the delay until the scrollbar hides. Has no effect if `autoHide` is `false`.
     * Default value is `1000`.
     */
    timeout: Number,
    /**
     * Controls the click on track behaviour.
     * Default to `true`.
     */
    clickOnTrack: { type: Boolean, default: void 0 },
    /**
     * Controls the min size of the scrollbar in `px`.
     * Default is `25`.
     */
    scrollbarMinSize: Number,
    /**
     * Controls the max size of the scrollbar in `px`.
     * Default is `0` (no max size).
     */
    scrollbarMaxSize: Number
  },
  // @ts-ignore
  emits: ["scroll"],
  /**
   * @returns {{ SimpleBar?: SimpleBar; scrollElement?: HTMLDivElement; contentElement?: HTMLDivElement }}
   */
  data: function() {
    return {};
  },
  mounted: function() {
    for (var e = $3.getOptions(this.$refs.element.attributes), t = 0, r = Object.entries(this.$props); t < r.length; t++) {
      var a = r[t], v = a[0], o = a[1];
      o != null && typeof o != "function" && (e[v] = o);
    }
    this.SimpleBar = new $3(this.$refs.element, e), this.scrollElement = this.$refs.scrollElement, this.contentElement = this.$refs.contentElement;
  }
}, z_[ece.beforeUnmount] = function() {
  var e;
  (e = this.SimpleBar) === null || e === void 0 || e.unMount(), this.SimpleBar = void 0;
}, z_.methods = {
  recalculate: function() {
    var e;
    (e = this.SimpleBar) === null || e === void 0 || e.recalculate();
  }
}, /**
 * Note that createElement argument is only provided in <=vue@2.7.x,
 * in other versions it's a context object that we do not use.
 */
z_.render = function(e) {
  var t = this;
  return tce({
    h: typeof e == "function" ? e : oG,
    // @ts-ignore
    emit: function() {
      for (var r = [], a = 0; a < arguments.length; a++)
        r[a] = arguments[a];
      return t.$emit.apply(t, r);
    },
    // @ts-ignore
    slots: this.$slots,
    props: this.$props
  });
}, z_));
function sf(e) {
  const t = Object.prototype.toString.call(e);
  return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
}
const r6 = 43200, mN = 1440;
let nce = {};
function rce() {
  return nce;
}
function gN(e) {
  const t = sf(e), r = new Date(
    Date.UTC(
      t.getFullYear(),
      t.getMonth(),
      t.getDate(),
      t.getHours(),
      t.getMinutes(),
      t.getSeconds(),
      t.getMilliseconds()
    )
  );
  return r.setUTCFullYear(t.getFullYear()), +e - +r;
}
function f8(e, t) {
  const r = sf(e), a = sf(t), v = r.getTime() - a.getTime();
  return v < 0 ? -1 : v > 0 ? 1 : v;
}
function ice(e, t) {
  const r = sf(e), a = sf(t), v = r.getFullYear() - a.getFullYear(), o = r.getMonth() - a.getMonth();
  return v * 12 + o;
}
function ace(e) {
  return (t) => {
    const a = (e ? Math[e] : Math.trunc)(t);
    return a === 0 ? 0 : a;
  };
}
function oce(e, t) {
  return +sf(e) - +sf(t);
}
function sce(e) {
  const t = sf(e);
  return t.setHours(23, 59, 59, 999), t;
}
function lce(e) {
  const t = sf(e), r = t.getMonth();
  return t.setFullYear(t.getFullYear(), r + 1, 0), t.setHours(23, 59, 59, 999), t;
}
function uce(e) {
  const t = sf(e);
  return +sce(t) == +lce(t);
}
function cce(e, t) {
  const r = sf(e), a = sf(t), v = f8(r, a), o = Math.abs(
    ice(r, a)
  );
  let s;
  if (o < 1)
    s = 0;
  else {
    r.getMonth() === 1 && r.getDate() > 27 && r.setDate(30), r.setMonth(r.getMonth() - v * o);
    let n = f8(r, a) === -v;
    uce(sf(e)) && o === 1 && f8(e, a) === 1 && (n = !1), s = v * (o - Number(n));
  }
  return s === 0 ? 0 : s;
}
function fce(e, t, r) {
  const a = oce(e, t) / 1e3;
  return ace(r == null ? void 0 : r.roundingMethod)(a);
}
const hce = {
  lessThanXSeconds: {
    one: "less than a second",
    other: "less than {{count}} seconds"
  },
  xSeconds: {
    one: "1 second",
    other: "{{count}} seconds"
  },
  halfAMinute: "half a minute",
  lessThanXMinutes: {
    one: "less than a minute",
    other: "less than {{count}} minutes"
  },
  xMinutes: {
    one: "1 minute",
    other: "{{count}} minutes"
  },
  aboutXHours: {
    one: "about 1 hour",
    other: "about {{count}} hours"
  },
  xHours: {
    one: "1 hour",
    other: "{{count}} hours"
  },
  xDays: {
    one: "1 day",
    other: "{{count}} days"
  },
  aboutXWeeks: {
    one: "about 1 week",
    other: "about {{count}} weeks"
  },
  xWeeks: {
    one: "1 week",
    other: "{{count}} weeks"
  },
  aboutXMonths: {
    one: "about 1 month",
    other: "about {{count}} months"
  },
  xMonths: {
    one: "1 month",
    other: "{{count}} months"
  },
  aboutXYears: {
    one: "about 1 year",
    other: "about {{count}} years"
  },
  xYears: {
    one: "1 year",
    other: "{{count}} years"
  },
  overXYears: {
    one: "over 1 year",
    other: "over {{count}} years"
  },
  almostXYears: {
    one: "almost 1 year",
    other: "almost {{count}} years"
  }
}, dce = (e, t, r) => {
  let a;
  const v = hce[e];
  return typeof v == "string" ? a = v : t === 1 ? a = v.one : a = v.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + a : a + " ago" : a;
};
function vS(e) {
  return (t = {}) => {
    const r = t.width ? String(t.width) : e.defaultWidth;
    return e.formats[r] || e.formats[e.defaultWidth];
  };
}
const pce = {
  full: "EEEE, MMMM do, y",
  long: "MMMM do, y",
  medium: "MMM d, y",
  short: "MM/dd/yyyy"
}, mce = {
  full: "h:mm:ss a zzzz",
  long: "h:mm:ss a z",
  medium: "h:mm:ss a",
  short: "h:mm a"
}, gce = {
  full: "{{date}} 'at' {{time}}",
  long: "{{date}} 'at' {{time}}",
  medium: "{{date}}, {{time}}",
  short: "{{date}}, {{time}}"
}, yce = {
  date: vS({
    formats: pce,
    defaultWidth: "full"
  }),
  time: vS({
    formats: mce,
    defaultWidth: "full"
  }),
  dateTime: vS({
    formats: gce,
    defaultWidth: "full"
  })
}, vce = {
  lastWeek: "'last' eeee 'at' p",
  yesterday: "'yesterday at' p",
  today: "'today at' p",
  tomorrow: "'tomorrow at' p",
  nextWeek: "eeee 'at' p",
  other: "P"
}, xce = (e, t, r, a) => vce[e];
function R_(e) {
  return (t, r) => {
    const a = r != null && r.context ? String(r.context) : "standalone";
    let v;
    if (a === "formatting" && e.formattingValues) {
      const s = e.defaultFormattingWidth || e.defaultWidth, n = r != null && r.width ? String(r.width) : s;
      v = e.formattingValues[n] || e.formattingValues[s];
    } else {
      const s = e.defaultWidth, n = r != null && r.width ? String(r.width) : e.defaultWidth;
      v = e.values[n] || e.values[s];
    }
    const o = e.argumentCallback ? e.argumentCallback(t) : t;
    return v[o];
  };
}
const bce = {
  narrow: ["B", "A"],
  abbreviated: ["BC", "AD"],
  wide: ["Before Christ", "Anno Domini"]
}, _ce = {
  narrow: ["1", "2", "3", "4"],
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
}, wce = {
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
  abbreviated: [
    "Jan",
    "Feb",
    "Mar",
    "Apr",
    "May",
    "Jun",
    "Jul",
    "Aug",
    "Sep",
    "Oct",
    "Nov",
    "Dec"
  ],
  wide: [
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
  ]
}, kce = {
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  wide: [
    "Sunday",
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday"
  ]
}, Tce = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  }
}, Ace = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  }
}, Sce = (e, t) => {
  const r = Number(e), a = r % 100;
  if (a > 20 || a < 10)
    switch (a % 10) {
      case 1:
        return r + "st";
      case 2:
        return r + "nd";
      case 3:
        return r + "rd";
    }
  return r + "th";
}, Mce = {
  ordinalNumber: Sce,
  era: R_({
    values: bce,
    defaultWidth: "wide"
  }),
  quarter: R_({
    values: _ce,
    defaultWidth: "wide",
    argumentCallback: (e) => e - 1
  }),
  month: R_({
    values: wce,
    defaultWidth: "wide"
  }),
  day: R_({
    values: kce,
    defaultWidth: "wide"
  }),
  dayPeriod: R_({
    values: Tce,
    defaultWidth: "wide",
    formattingValues: Ace,
    defaultFormattingWidth: "wide"
  })
};
function F_(e) {
  return (t, r = {}) => {
    const a = r.width, v = a && e.matchPatterns[a] || e.matchPatterns[e.defaultMatchWidth], o = t.match(v);
    if (!o)
      return null;
    const s = o[0], n = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], l = Array.isArray(n) ? Cce(n, (h) => h.test(s)) : (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
      Ece(n, (h) => h.test(s))
    );
    let u;
    u = e.valueCallback ? e.valueCallback(l) : l, u = r.valueCallback ? (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
      r.valueCallback(u)
    ) : u;
    const i = t.slice(s.length);
    return { value: u, rest: i };
  };
}
function Ece(e, t) {
  for (const r in e)
    if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
      return r;
}
function Cce(e, t) {
  for (let r = 0; r < e.length; r++)
    if (t(e[r]))
      return r;
}
function Ice(e) {
  return (t, r = {}) => {
    const a = t.match(e.matchPattern);
    if (!a) return null;
    const v = a[0], o = t.match(e.parsePattern);
    if (!o) return null;
    let s = e.valueCallback ? e.valueCallback(o[0]) : o[0];
    s = r.valueCallback ? r.valueCallback(s) : s;
    const n = t.slice(v.length);
    return { value: s, rest: n };
  };
}
const Dce = /^(\d+)(th|st|nd|rd)?/i, Lce = /\d+/i, Pce = {
  narrow: /^(b|a)/i,
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
  wide: /^(before christ|before common era|anno domini|common era)/i
}, Oce = {
  any: [/^b/i, /^(a|c)/i]
}, zce = {
  narrow: /^[1234]/i,
  abbreviated: /^q[1234]/i,
  wide: /^[1234](th|st|nd|rd)? quarter/i
}, Rce = {
  any: [/1/i, /2/i, /3/i, /4/i]
}, Fce = {
  narrow: /^[jfmasond]/i,
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
}, Nce = {
  narrow: [
    /^j/i,
    /^f/i,
    /^m/i,
    /^a/i,
    /^m/i,
    /^j/i,
    /^j/i,
    /^a/i,
    /^s/i,
    /^o/i,
    /^n/i,
    /^d/i
  ],
  any: [
    /^ja/i,
    /^f/i,
    /^mar/i,
    /^ap/i,
    /^may/i,
    /^jun/i,
    /^jul/i,
    /^au/i,
    /^s/i,
    /^o/i,
    /^n/i,
    /^d/i
  ]
}, Bce = {
  narrow: /^[smtwf]/i,
  short: /^(su|mo|tu|we|th|fr|sa)/i,
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
}, jce = {
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
}, Uce = {
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
}, Vce = {
  any: {
    am: /^a/i,
    pm: /^p/i,
    midnight: /^mi/i,
    noon: /^no/i,
    morning: /morning/i,
    afternoon: /afternoon/i,
    evening: /evening/i,
    night: /night/i
  }
}, $ce = {
  ordinalNumber: Ice({
    matchPattern: Dce,
    parsePattern: Lce,
    valueCallback: (e) => parseInt(e, 10)
  }),
  era: F_({
    matchPatterns: Pce,
    defaultMatchWidth: "wide",
    parsePatterns: Oce,
    defaultParseWidth: "any"
  }),
  quarter: F_({
    matchPatterns: zce,
    defaultMatchWidth: "wide",
    parsePatterns: Rce,
    defaultParseWidth: "any",
    valueCallback: (e) => e + 1
  }),
  month: F_({
    matchPatterns: Fce,
    defaultMatchWidth: "wide",
    parsePatterns: Nce,
    defaultParseWidth: "any"
  }),
  day: F_({
    matchPatterns: Bce,
    defaultMatchWidth: "wide",
    parsePatterns: jce,
    defaultParseWidth: "any"
  }),
  dayPeriod: F_({
    matchPatterns: Uce,
    defaultMatchWidth: "any",
    parsePatterns: Vce,
    defaultParseWidth: "any"
  })
}, qce = {
  code: "en-US",
  formatDistance: dce,
  formatLong: yce,
  formatRelative: xce,
  localize: Mce,
  match: $ce,
  options: {
    weekStartsOn: 0,
    firstWeekContainsDate: 1
  }
};
function yN(e, t, r) {
  const a = rce(), v = (r == null ? void 0 : r.locale) ?? a.locale ?? qce, o = 2520, s = f8(e, t);
  if (isNaN(s))
    throw new RangeError("Invalid time value");
  const n = Object.assign({}, r, {
    addSuffix: r == null ? void 0 : r.addSuffix,
    comparison: s
  });
  let l, u;
  s > 0 ? (l = sf(t), u = sf(e)) : (l = sf(e), u = sf(t));
  const i = fce(u, l), h = (gN(u) - gN(l)) / 1e3, p = Math.round((i - h) / 60);
  let _;
  if (p < 2)
    return r != null && r.includeSeconds ? i < 5 ? v.formatDistance("lessThanXSeconds", 5, n) : i < 10 ? v.formatDistance("lessThanXSeconds", 10, n) : i < 20 ? v.formatDistance("lessThanXSeconds", 20, n) : i < 40 ? v.formatDistance("halfAMinute", 0, n) : i < 60 ? v.formatDistance("lessThanXMinutes", 1, n) : v.formatDistance("xMinutes", 1, n) : p === 0 ? v.formatDistance("lessThanXMinutes", 1, n) : v.formatDistance("xMinutes", p, n);
  if (p < 45)
    return v.formatDistance("xMinutes", p, n);
  if (p < 90)
    return v.formatDistance("aboutXHours", 1, n);
  if (p < mN) {
    const d = Math.round(p / 60);
    return v.formatDistance("aboutXHours", d, n);
  } else {
    if (p < o)
      return v.formatDistance("xDays", 1, n);
    if (p < r6) {
      const d = Math.round(p / mN);
      return v.formatDistance("xDays", d, n);
    } else if (p < r6 * 2)
      return _ = Math.round(p / r6), v.formatDistance("aboutXMonths", _, n);
  }
  if (_ = cce(u, l), _ < 12) {
    const d = Math.round(p / r6);
    return v.formatDistance("xMonths", d, n);
  } else {
    const d = _ % 12, f = Math.trunc(_ / 12);
    return d < 3 ? v.formatDistance("aboutXYears", f, n) : d < 9 ? v.formatDistance("overXYears", f, n) : v.formatDistance("almostXYears", f + 1, n);
  }
}
const Hce = { class: "text-input" }, Gce = ["value", "placeholder"], Wce = /* @__PURE__ */ Bh({
  __name: "TextInput",
  props: /* @__PURE__ */ PH({
    placeholder: { default: "" },
    type: { default: "text" },
    icon: {},
    focus: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = e, r = WH(e, "modelValue"), a = Ys(null);
    function v(o) {
      const s = o.target;
      r.value = s.value;
    }
    return mb(() => {
      t.focus && a.value && a.value.focus();
    }), (o, s) => (Va(), ns("div", Hce, [
      t.icon ? (Va(), ns("span", {
        key: 0,
        class: dg([t.icon, "icon"])
      }, null, 2)) : Nc("", !0),
      ql("input", {
        type: "text",
        value: r.value,
        placeholder: t.placeholder,
        onKeyup: v,
        ref_key: "input",
        ref: a
      }, null, 40, Gce)
    ]));
  }
}), Ap = (e, t) => {
  const r = e.__vccOpts || e;
  for (const [a, v] of t)
    r[a] = v;
  return r;
}, Yce = /* @__PURE__ */ Ap(Wce, [["__scopeId", "data-v-af750005"]]), Zce = { class: "data-frame-widget" }, Xce = {
  key: 0,
  class: "pagination"
}, Kce = { class: "pagination-page-size" }, Jce = {
  key: 0,
  class: "pagination-buttons"
}, Qce = ["disabled"], efe = ["disabled"], tfe = ["disabled"], nfe = ["disabled"], rfe = { class: "page-info" }, ife = { key: 0 }, afe = /* @__PURE__ */ Bh({
  __name: "DataFrameWidget",
  props: /* @__PURE__ */ PH({
    columns: {},
    data: {}
  }, {
    search: {},
    searchModifiers: {}
  }),
  emits: ["update:search"],
  setup(e) {
    const t = e, r = Ys(10), a = Ys(0), v = WH(e, "search"), o = Hu(() => {
      if (v.value !== void 0 && v.value.length > 0) {
        const _ = v.value.toLowerCase();
        return t.data.filter((d) => d.join(" ").toLowerCase().includes(_));
      }
      return t.data;
    }), s = Hu(() => Math.ceil(o.value.length / r.value)), n = Hu(() => a.value * r.value), l = Hu(() => (a.value + 1) * r.value), u = Hu(() => o.value.slice(n.value, l.value));
    function i() {
      a.value < s.value - 1 && a.value++;
    }
    function h() {
      a.value > 0 && a.value--;
    }
    function p(_) {
      a.value = 0, r.value = parseInt(_.target.value);
    }
    return Dm([() => _F(t.data), () => _F(t.columns)], () => {
      a.value = 0;
    }), (_, d) => (Va(), ns("div", Zce, [
      Iu(Yce, {
        modelValue: v.value,
        "onUpdate:modelValue": d[0] || (d[0] = (f) => v.value = f),
        icon: "icon-search",
        placeholder: "Search",
        class: "search-input"
      }, null, 8, ["modelValue"]),
      Iu(pg(LG), null, {
        default: pb(() => [
          ql("table", null, [
            ql("thead", null, [
              ql("tr", null, [
                (Va(!0), ns(jc, null, t8(t.columns, (f, c) => (Va(), ns("th", { key: c }, bd(f), 1))), 128))
              ])
            ]),
            ql("tbody", null, [
              (Va(!0), ns(jc, null, t8(u.value, (f, c) => (Va(), ns("tr", { key: c }, [
                (Va(!0), ns(jc, null, t8(f, (g, m) => (Va(), ns("td", { key: m }, bd(g), 1))), 128))
              ]))), 128))
            ])
          ])
        ]),
        _: 1
      }),
      o.value.length > 10 ? (Va(), ns("div", Xce, [
        ql("div", Kce, [
          d[4] || (d[4] = hE(" Page size ")),
          ql("select", { onChange: p }, d[3] || (d[3] = [
            ql("option", { value: "10" }, "10", -1),
            ql("option", { value: "25" }, "25", -1),
            ql("option", { value: "50" }, "50", -1)
          ]), 32)
        ]),
        s.value > 1 ? (Va(), ns("div", Jce, [
          ql("button", {
            onClick: d[1] || (d[1] = (f) => a.value = 0),
            disabled: a.value == 0
          }, "<<", 8, Qce),
          ql("button", {
            onClick: h,
            disabled: a.value == 0
          }, "<", 8, efe),
          ql("button", {
            onClick: i,
            disabled: a.value == s.value - 1
          }, ">", 8, tfe),
          ql("button", {
            onClick: d[2] || (d[2] = (f) => a.value = s.value - 1),
            disabled: a.value == s.value - 1
          }, " >> ", 8, nfe)
        ])) : Nc("", !0),
        ql("div", rfe, [
          hE(" Results: " + bd(n.value + 1) + "-" + bd(Math.min(l.value, o.value.length)) + " of " + bd(o.value.length) + " ", 1),
          v.value && v.value.length > 0 ? (Va(), ns("span", ife, " (filtered from " + bd(t.data.length) + " results)", 1)) : Nc("", !0)
        ])
      ])) : Nc("", !0)
    ]));
  }
}), ofe = /* @__PURE__ */ Ap(afe, [["__scopeId", "data-v-d74a0ef5"]]), sfe = ["srcdoc"], lfe = /* @__PURE__ */ Bh({
  __name: "HtmlSnippetWidget",
  props: {
    src: { default: "" },
    base64Src: { default: "" }
  },
  setup(e) {
    const t = e, r = Ys(), a = Ys(0), v = Hu(() => t.src || btoa(t.base64Src)), o = Hu(() => `
    <!DOCTYPE html>
    <html lang="en">

    <head>
      <meta charset="UTF-8">
      <style>
        * {
          margin: 0;
        }
        body {
          -webkit-font-smoothing: antialiased;
        }
      </style>
    </head>

    <body>${v.value}</body>
  `), s = new ResizeObserver((l) => {
      if (l.length == 1) {
        const u = l[0];
        a.value = u.contentRect.height;
      }
    });
    function n() {
      r.value && r.value.contentDocument && s.observe(r.value.contentDocument.body);
    }
    return gb(() => {
      r.value && r.value.contentDocument && s.unobserve(r.value.contentDocument.body);
    }), (l, u) => (Va(), ns("iframe", {
      ref_key: "iframe",
      ref: r,
      srcdoc: o.value,
      frameborder: "0",
      sandbox: "allow-scripts allow-same-origin",
      scrolling: "auto",
      onLoad: n,
      style: hb({ height: `${a.value}px` })
    }, null, 44, sfe));
  }
}), vN = /* @__PURE__ */ Ap(lfe, [["__scopeId", "data-v-3adfdf19"]]), ufe = ["src", "alt"], cfe = /* @__PURE__ */ Bh({
  __name: "ImageWidget",
  props: {
    base64Src: {},
    mediaType: {},
    alt: { default: "" }
  },
  setup(e) {
    const t = e, r = Hu(() => `data:${t.mediaType};base64,${t.base64Src}`);
    return (a, v) => (Va(), ns("img", {
      src: r.value,
      alt: a.alt
    }, null, 8, ufe));
  }
});
var bE = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function cD(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var PG = {}, OG = { exports: {} };
(function(e, t) {
  (function(a, v) {
    e.exports = v();
  })(typeof self < "u" ? self : bE, function() {
    return (
      /******/
      function() {
        var r = {};
        (function() {
          r.d = function(He, Pe) {
            for (var it in Pe)
              r.o(Pe, it) && !r.o(He, it) && Object.defineProperty(He, it, { enumerable: !0, get: Pe[it] });
          };
        })(), function() {
          r.o = function(He, Pe) {
            return Object.prototype.hasOwnProperty.call(He, Pe);
          };
        }();
        var a = {};
        r.d(a, {
          default: function() {
            return (
              /* binding */
              ci
            );
          }
        });
        class v {
          // Error start position based on passed-in Token or ParseNode.
          // Length of affected text based on passed-in Token or ParseNode.
          // The underlying error message without any context added.
          constructor(Pe, it) {
            this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
            let bt = "KaTeX parse error: " + Pe, Ue, Qe;
            const ht = it && it.loc;
            if (ht && ht.start <= ht.end) {
              const B = ht.lexer.input;
              Ue = ht.start, Qe = ht.end, Ue === B.length ? bt += " at end of input: " : bt += " at position " + (Ue + 1) + ": ";
              const y = B.slice(Ue, Qe).replace(/[^]/g, "$&̲");
              let b;
              Ue > 15 ? b = "…" + B.slice(Ue - 15, Ue) : b = B.slice(0, Ue);
              let R;
              Qe + 15 < B.length ? R = B.slice(Qe, Qe + 15) + "…" : R = B.slice(Qe), bt += b + y + R;
            }
            const Z = new Error(bt);
            return Z.name = "ParseError", Z.__proto__ = v.prototype, Z.position = Ue, Ue != null && Qe != null && (Z.length = Qe - Ue), Z.rawMessage = Pe, Z;
          }
        }
        v.prototype.__proto__ = Error.prototype;
        var o = v;
        const s = function(He, Pe) {
          return He.indexOf(Pe) !== -1;
        }, n = function(He, Pe) {
          return He === void 0 ? Pe : He;
        }, l = /([A-Z])/g, u = function(He) {
          return He.replace(l, "-$1").toLowerCase();
        }, i = {
          "&": "&amp;",
          ">": "&gt;",
          "<": "&lt;",
          '"': "&quot;",
          "'": "&#x27;"
        }, h = /[&><"']/g;
        function p(He) {
          return String(He).replace(h, (Pe) => i[Pe]);
        }
        const _ = function(He) {
          return He.type === "ordgroup" || He.type === "color" ? He.body.length === 1 ? _(He.body[0]) : He : He.type === "font" ? _(He.body) : He;
        }, d = function(He) {
          const Pe = _(He);
          return Pe.type === "mathord" || Pe.type === "textord" || Pe.type === "atom";
        }, f = function(He) {
          if (!He)
            throw new Error("Expected non-null, but got " + String(He));
          return He;
        };
        var g = {
          contains: s,
          deflt: n,
          escape: p,
          hyphenate: u,
          getBaseElem: _,
          isCharacterBox: d,
          protocolFromUrl: function(He) {
            const Pe = /^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(He);
            return Pe ? Pe[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(Pe[1]) ? null : Pe[1].toLowerCase() : "_relative";
          }
        };
        const m = {
          displayMode: {
            type: "boolean",
            description: "Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",
            cli: "-d, --display-mode"
          },
          output: {
            type: {
              enum: ["htmlAndMathml", "html", "mathml"]
            },
            description: "Determines the markup language of the output.",
            cli: "-F, --format <type>"
          },
          leqno: {
            type: "boolean",
            description: "Render display math in leqno style (left-justified tags)."
          },
          fleqn: {
            type: "boolean",
            description: "Render display math flush left."
          },
          throwOnError: {
            type: "boolean",
            default: !0,
            cli: "-t, --no-throw-on-error",
            cliDescription: "Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."
          },
          errorColor: {
            type: "string",
            default: "#cc0000",
            cli: "-c, --error-color <color>",
            cliDescription: "A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",
            cliProcessor: (He) => "#" + He
          },
          macros: {
            type: "object",
            cli: "-m, --macro <def>",
            cliDescription: "Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",
            cliDefault: [],
            cliProcessor: (He, Pe) => (Pe.push(He), Pe)
          },
          minRuleThickness: {
            type: "number",
            description: "Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",
            processor: (He) => Math.max(0, He),
            cli: "--min-rule-thickness <size>",
            cliProcessor: parseFloat
          },
          colorIsTextColor: {
            type: "boolean",
            description: "Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",
            cli: "-b, --color-is-text-color"
          },
          strict: {
            type: [{
              enum: ["warn", "ignore", "error"]
            }, "boolean", "function"],
            description: "Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",
            cli: "-S, --strict",
            cliDefault: !1
          },
          trust: {
            type: ["boolean", "function"],
            description: "Trust the input, enabling all HTML features such as \\url.",
            cli: "-T, --trust"
          },
          maxSize: {
            type: "number",
            default: 1 / 0,
            description: "If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",
            processor: (He) => Math.max(0, He),
            cli: "-s, --max-size <n>",
            cliProcessor: parseInt
          },
          maxExpand: {
            type: "number",
            default: 1e3,
            description: "Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",
            processor: (He) => Math.max(0, He),
            cli: "-e, --max-expand <n>",
            cliProcessor: (He) => He === "Infinity" ? 1 / 0 : parseInt(He)
          },
          globalGroup: {
            type: "boolean",
            cli: !1
          }
        };
        function x(He) {
          if (He.default)
            return He.default;
          const Pe = He.type, it = Array.isArray(Pe) ? Pe[0] : Pe;
          if (typeof it != "string")
            return it.enum[0];
          switch (it) {
            case "boolean":
              return !1;
            case "string":
              return "";
            case "number":
              return 0;
            case "object":
              return {};
          }
        }
        class w {
          constructor(Pe) {
            this.displayMode = void 0, this.output = void 0, this.leqno = void 0, this.fleqn = void 0, this.throwOnError = void 0, this.errorColor = void 0, this.macros = void 0, this.minRuleThickness = void 0, this.colorIsTextColor = void 0, this.strict = void 0, this.trust = void 0, this.maxSize = void 0, this.maxExpand = void 0, this.globalGroup = void 0, Pe = Pe || {};
            for (const it in m)
              if (m.hasOwnProperty(it)) {
                const bt = m[it];
                this[it] = Pe[it] !== void 0 ? bt.processor ? bt.processor(Pe[it]) : Pe[it] : x(bt);
              }
          }
          /**
           * Report nonstrict (non-LaTeX-compatible) input.
           * Can safely not be called if `this.strict` is false in JavaScript.
           */
          reportNonstrict(Pe, it, bt) {
            let Ue = this.strict;
            if (typeof Ue == "function" && (Ue = Ue(Pe, it, bt)), !(!Ue || Ue === "ignore")) {
              if (Ue === !0 || Ue === "error")
                throw new o("LaTeX-incompatible input and strict mode is set to 'error': " + (it + " [" + Pe + "]"), bt);
              Ue === "warn" ? typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (it + " [" + Pe + "]")) : typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + Ue + "': " + it + " [" + Pe + "]"));
            }
          }
          /**
           * Check whether to apply strict (LaTeX-adhering) behavior for unusual
           * input (like `\\`).  Unlike `nonstrict`, will not throw an error;
           * instead, "error" translates to a return value of `true`, while "ignore"
           * translates to a return value of `false`.  May still print a warning:
           * "warn" prints a warning and returns `false`.
           * This is for the second category of `errorCode`s listed in the README.
           */
          useStrictBehavior(Pe, it, bt) {
            let Ue = this.strict;
            if (typeof Ue == "function")
              try {
                Ue = Ue(Pe, it, bt);
              } catch {
                Ue = "error";
              }
            return !Ue || Ue === "ignore" ? !1 : Ue === !0 || Ue === "error" ? !0 : Ue === "warn" ? (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to 'warn': " + (it + " [" + Pe + "]")), !1) : (typeof console < "u" && console.warn("LaTeX-incompatible input and strict mode is set to " + ("unrecognized '" + Ue + "': " + it + " [" + Pe + "]")), !1);
          }
          /**
           * Check whether to test potentially dangerous input, and return
           * `true` (trusted) or `false` (untrusted).  The sole argument `context`
           * should be an object with `command` field specifying the relevant LaTeX
           * command (as a string starting with `\`), and any other arguments, etc.
           * If `context` has a `url` field, a `protocol` field will automatically
           * get added by this function (changing the specified object).
           */
          isTrusted(Pe) {
            if (Pe.url && !Pe.protocol) {
              const bt = g.protocolFromUrl(Pe.url);
              if (bt == null)
                return !1;
              Pe.protocol = bt;
            }
            return !!(typeof this.trust == "function" ? this.trust(Pe) : this.trust);
          }
        }
        class k {
          constructor(Pe, it, bt) {
            this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = Pe, this.size = it, this.cramped = bt;
          }
          /**
           * Get the style of a superscript given a base in the current style.
           */
          sup() {
            return M[O[this.id]];
          }
          /**
           * Get the style of a subscript given a base in the current style.
           */
          sub() {
            return M[T[this.id]];
          }
          /**
           * Get the style of a fraction numerator given the fraction in the current
           * style.
           */
          fracNum() {
            return M[z[this.id]];
          }
          /**
           * Get the style of a fraction denominator given the fraction in the current
           * style.
           */
          fracDen() {
            return M[F[this.id]];
          }
          /**
           * Get the cramped version of a style (in particular, cramping a cramped style
           * doesn't change the style).
           */
          cramp() {
            return M[U[this.id]];
          }
          /**
           * Get a text or display version of this style.
           */
          text() {
            return M[V[this.id]];
          }
          /**
           * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
           */
          isTight() {
            return this.size >= 2;
          }
        }
        const S = 0, A = 1, C = 2, D = 3, L = 4, E = 5, P = 6, I = 7, M = [new k(S, 0, !1), new k(A, 0, !0), new k(C, 1, !1), new k(D, 1, !0), new k(L, 2, !1), new k(E, 2, !0), new k(P, 3, !1), new k(I, 3, !0)], O = [L, E, L, E, P, I, P, I], T = [E, E, E, E, I, I, I, I], z = [C, D, L, E, P, I, P, I], F = [D, D, E, E, I, I, I, I], U = [A, A, D, D, E, E, I, I], V = [S, A, C, D, C, D, C, D];
        var $ = {
          DISPLAY: M[S],
          TEXT: M[C],
          SCRIPT: M[L],
          SCRIPTSCRIPT: M[P]
        };
        const q = [{
          // Latin characters beyond the Latin-1 characters we have metrics for.
          // Needed for Czech, Hungarian and Turkish text, for example.
          name: "latin",
          blocks: [
            [256, 591],
            // Latin Extended-A and Latin Extended-B
            [768, 879]
            // Combining Diacritical marks
          ]
        }, {
          // The Cyrillic script used by Russian and related languages.
          // A Cyrillic subset used to be supported as explicitly defined
          // symbols in symbols.js
          name: "cyrillic",
          blocks: [[1024, 1279]]
        }, {
          // Armenian
          name: "armenian",
          blocks: [[1328, 1423]]
        }, {
          // The Brahmic scripts of South and Southeast Asia
          // Devanagari (0900–097F)
          // Bengali (0980–09FF)
          // Gurmukhi (0A00–0A7F)
          // Gujarati (0A80–0AFF)
          // Oriya (0B00–0B7F)
          // Tamil (0B80–0BFF)
          // Telugu (0C00–0C7F)
          // Kannada (0C80–0CFF)
          // Malayalam (0D00–0D7F)
          // Sinhala (0D80–0DFF)
          // Thai (0E00–0E7F)
          // Lao (0E80–0EFF)
          // Tibetan (0F00–0FFF)
          // Myanmar (1000–109F)
          name: "brahmic",
          blocks: [[2304, 4255]]
        }, {
          name: "georgian",
          blocks: [[4256, 4351]]
        }, {
          // Chinese and Japanese.
          // The "k" in cjk is for Korean, but we've separated Korean out
          name: "cjk",
          blocks: [
            [12288, 12543],
            // CJK symbols and punctuation, Hiragana, Katakana
            [19968, 40879],
            // CJK ideograms
            [65280, 65376]
            // Fullwidth punctuation
            // TODO: add halfwidth Katakana and Romanji glyphs
          ]
        }, {
          // Korean
          name: "hangul",
          blocks: [[44032, 55215]]
        }];
        function K(He) {
          for (let Pe = 0; Pe < q.length; Pe++) {
            const it = q[Pe];
            for (let bt = 0; bt < it.blocks.length; bt++) {
              const Ue = it.blocks[bt];
              if (He >= Ue[0] && He <= Ue[1])
                return it.name;
            }
          }
          return null;
        }
        const re = [];
        q.forEach((He) => He.blocks.forEach((Pe) => re.push(...Pe)));
        function Y(He) {
          for (let Pe = 0; Pe < re.length; Pe += 2)
            if (He >= re[Pe] && He <= re[Pe + 1])
              return !0;
          return !1;
        }
        const te = 80, ee = function(He, Pe) {
          return "M95," + (622 + He + Pe) + `
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l` + He / 2.075 + " -" + He + `
c5.3,-9.3,12,-14,20,-14
H400000v` + (40 + He) + `H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M` + (834 + He) + " " + Pe + "h400000v" + (40 + He) + "h-400000z";
        }, X = function(He, Pe) {
          return "M263," + (601 + He + Pe) + `c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l` + He / 2.084 + " -" + He + `
c4.7,-7.3,11,-11,19,-11
H40000v` + (40 + He) + `H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M` + (1001 + He) + " " + Pe + "h400000v" + (40 + He) + "h-400000z";
        }, Q = function(He, Pe) {
          return "M983 " + (10 + He + Pe) + `
l` + He / 3.13 + " -" + He + `
c4,-6.7,10,-10,18,-10 H400000v` + (40 + He) + `
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M` + (1001 + He) + " " + Pe + "h400000v" + (40 + He) + "h-400000z";
        }, ue = function(He, Pe) {
          return "M424," + (2398 + He + Pe) + `
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l` + He / 4.223 + " -" + He + `c4,-6.7,10,-10,18,-10 H400000
v` + (40 + He) + `H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M` + (1001 + He) + " " + Pe + `
h400000v` + (40 + He) + "h-400000z";
        }, ce = function(He, Pe) {
          return "M473," + (2713 + He + Pe) + `
c339.3,-1799.3,509.3,-2700,510,-2702 l` + He / 5.298 + " -" + He + `
c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + He) + `H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM` + (1001 + He) + " " + Pe + "h400000v" + (40 + He) + "H1017.7z";
        }, he = function(He) {
          const Pe = He / 2;
          return "M400000 " + He + " H0 L" + Pe + " 0 l65 45 L145 " + (He - 80) + " H400000z";
        }, de = function(He, Pe, it) {
          const bt = it - 54 - Pe - He;
          return "M702 " + (He + Pe) + "H400000" + (40 + He) + `
H742v` + bt + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 ` + Pe + "H400000v" + (40 + He) + "H742z";
        }, ne = function(He, Pe, it) {
          Pe = 1e3 * Pe;
          let bt = "";
          switch (He) {
            case "sqrtMain":
              bt = ee(Pe, te);
              break;
            case "sqrtSize1":
              bt = X(Pe, te);
              break;
            case "sqrtSize2":
              bt = Q(Pe, te);
              break;
            case "sqrtSize3":
              bt = ue(Pe, te);
              break;
            case "sqrtSize4":
              bt = ce(Pe, te);
              break;
            case "sqrtTall":
              bt = de(Pe, te, it);
          }
          return bt;
        }, ae = function(He, Pe) {
          switch (He) {
            case "⎜":
              return "M291 0 H417 V" + Pe + " H291z M291 0 H417 V" + Pe + " H291z";
            case "∣":
              return "M145 0 H188 V" + Pe + " H145z M145 0 H188 V" + Pe + " H145z";
            case "∥":
              return "M145 0 H188 V" + Pe + " H145z M145 0 H188 V" + Pe + " H145z" + ("M367 0 H410 V" + Pe + " H367z M367 0 H410 V" + Pe + " H367z");
            case "⎟":
              return "M457 0 H583 V" + Pe + " H457z M457 0 H583 V" + Pe + " H457z";
            case "⎢":
              return "M319 0 H403 V" + Pe + " H319z M319 0 H403 V" + Pe + " H319z";
            case "⎥":
              return "M263 0 H347 V" + Pe + " H263z M263 0 H347 V" + Pe + " H263z";
            case "⎪":
              return "M384 0 H504 V" + Pe + " H384z M384 0 H504 V" + Pe + " H384z";
            case "⏐":
              return "M312 0 H355 V" + Pe + " H312z M312 0 H355 V" + Pe + " H312z";
            case "‖":
              return "M257 0 H300 V" + Pe + " H257z M257 0 H300 V" + Pe + " H257z" + ("M478 0 H521 V" + Pe + " H478z M478 0 H521 V" + Pe + " H478z");
            default:
              return "";
          }
        }, se = {
          // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
          doubleleftarrow: `M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,
          // doublerightarrow is from glyph U+21D2 in font KaTeX Main
          doublerightarrow: `M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,
          // leftarrow is from glyph U+2190 in font KaTeX Main
          leftarrow: `M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,
          // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
          leftbrace: `M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,
          leftbraceunder: `M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,
          // overgroup is from the MnSymbol package (public domain)
          leftgroup: `M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,
          leftgroupunder: `M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,
          // Harpoons are from glyph U+21BD in font KaTeX Main
          leftharpoon: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,
          leftharpoonplus: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,
          leftharpoondown: `M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,
          leftharpoondownplus: `M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,
          // hook is from glyph U+21A9 in font KaTeX Main
          lefthook: `M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,
          leftlinesegment: `M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,
          leftmapsto: `M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,
          // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
          leftToFrom: `M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,
          longequal: `M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,
          midbrace: `M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,
          midbraceunder: `M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,
          oiintSize1: `M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,
          oiintSize2: `M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,
          oiiintSize1: `M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,
          oiiintSize2: `M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,
          rightarrow: `M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,
          rightbrace: `M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,
          rightbraceunder: `M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,
          rightgroup: `M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,
          rightgroupunder: `M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,
          rightharpoon: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,
          rightharpoonplus: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,
          rightharpoondown: `M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,
          rightharpoondownplus: `M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,
          righthook: `M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,
          rightlinesegment: `M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,
          rightToFrom: `M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,
          // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
          twoheadleftarrow: `M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,
          twoheadrightarrow: `M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,
          // tilde1 is a modified version of a glyph from the MnSymbol package
          tilde1: `M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,
          // ditto tilde2, tilde3, & tilde4
          tilde2: `M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,
          tilde3: `M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,
          tilde4: `M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,
          // vec is from glyph U+20D7 in font KaTeX Main
          vec: `M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,
          // widehat1 is a modified version of a glyph from the MnSymbol package
          widehat1: `M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,
          // ditto widehat2, widehat3, & widehat4
          widehat2: `M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
          widehat3: `M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
          widehat4: `M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
          // widecheck paths are all inverted versions of widehat
          widecheck1: `M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,
          widecheck2: `M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
          widecheck3: `M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
          widecheck4: `M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
          // The next ten paths support reaction arrows from the mhchem package.
          // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
          // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
          baraboveleftarrow: `M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
          // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
          rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,
          // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
          // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
          baraboveshortleftharpoon: `M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,
          rightharpoonaboveshortbar: `M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,
          shortbaraboveleftharpoon: `M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,
          shortrightharpoonabovebar: `M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`
        }, me = function(He, Pe) {
          switch (He) {
            case "lbrack":
              return "M403 1759 V84 H666 V0 H319 V1759 v" + Pe + ` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v` + Pe + " v1759 h84z";
            case "rbrack":
              return "M347 1759 V0 H0 V84 H263 V1759 v" + Pe + ` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v` + Pe + " v1759 h84z";
            case "vert":
              return "M145 15 v585 v" + Pe + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -Pe + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + Pe + " v585 h43z";
            case "doublevert":
              return "M145 15 v585 v" + Pe + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -Pe + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + Pe + ` v585 h43z
M367 15 v585 v` + Pe + ` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v` + -Pe + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + Pe + " v585 h43z";
            case "lfloor":
              return "M319 602 V0 H403 V602 v" + Pe + ` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v` + Pe + " v1715 H319z";
            case "rfloor":
              return "M319 602 V0 H403 V602 v" + Pe + ` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v` + Pe + " v1715 H319z";
            case "lceil":
              return "M403 1759 V84 H666 V0 H319 V1759 v" + Pe + ` v602 h84z
M403 1759 V0 H319 V1759 v` + Pe + " v602 h84z";
            case "rceil":
              return "M347 1759 V0 H0 V84 H263 V1759 v" + Pe + ` v602 h84z
M347 1759 V0 h-84 V1759 v` + Pe + " v602 h84z";
            case "lparen":
              return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,` + (Pe + 84) + `c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-` + (Pe + 92) + `c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
            case "rparen":
              return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,` + (Pe + 9) + `
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-` + (Pe + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
            default:
              throw new Error("Unknown stretchy delimiter.");
          }
        };
        class ye {
          // HtmlDomNode
          // Never used; needed for satisfying interface.
          constructor(Pe) {
            this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = Pe, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
          }
          hasClass(Pe) {
            return g.contains(this.classes, Pe);
          }
          /** Convert the fragment into a node. */
          toNode() {
            const Pe = document.createDocumentFragment();
            for (let it = 0; it < this.children.length; it++)
              Pe.appendChild(this.children[it].toNode());
            return Pe;
          }
          /** Convert the fragment into HTML markup. */
          toMarkup() {
            let Pe = "";
            for (let it = 0; it < this.children.length; it++)
              Pe += this.children[it].toMarkup();
            return Pe;
          }
          /**
           * Converts the math node into a string, similar to innerText. Applies to
           * MathDomNode's only.
           */
          toText() {
            const Pe = (it) => it.toText();
            return this.children.map(Pe).join("");
          }
        }
        var pe = {
          "AMS-Regular": {
            32: [0, 0, 0, 0, 0.25],
            65: [0, 0.68889, 0, 0, 0.72222],
            66: [0, 0.68889, 0, 0, 0.66667],
            67: [0, 0.68889, 0, 0, 0.72222],
            68: [0, 0.68889, 0, 0, 0.72222],
            69: [0, 0.68889, 0, 0, 0.66667],
            70: [0, 0.68889, 0, 0, 0.61111],
            71: [0, 0.68889, 0, 0, 0.77778],
            72: [0, 0.68889, 0, 0, 0.77778],
            73: [0, 0.68889, 0, 0, 0.38889],
            74: [0.16667, 0.68889, 0, 0, 0.5],
            75: [0, 0.68889, 0, 0, 0.77778],
            76: [0, 0.68889, 0, 0, 0.66667],
            77: [0, 0.68889, 0, 0, 0.94445],
            78: [0, 0.68889, 0, 0, 0.72222],
            79: [0.16667, 0.68889, 0, 0, 0.77778],
            80: [0, 0.68889, 0, 0, 0.61111],
            81: [0.16667, 0.68889, 0, 0, 0.77778],
            82: [0, 0.68889, 0, 0, 0.72222],
            83: [0, 0.68889, 0, 0, 0.55556],
            84: [0, 0.68889, 0, 0, 0.66667],
            85: [0, 0.68889, 0, 0, 0.72222],
            86: [0, 0.68889, 0, 0, 0.72222],
            87: [0, 0.68889, 0, 0, 1],
            88: [0, 0.68889, 0, 0, 0.72222],
            89: [0, 0.68889, 0, 0, 0.72222],
            90: [0, 0.68889, 0, 0, 0.66667],
            107: [0, 0.68889, 0, 0, 0.55556],
            160: [0, 0, 0, 0, 0.25],
            165: [0, 0.675, 0.025, 0, 0.75],
            174: [0.15559, 0.69224, 0, 0, 0.94666],
            240: [0, 0.68889, 0, 0, 0.55556],
            295: [0, 0.68889, 0, 0, 0.54028],
            710: [0, 0.825, 0, 0, 2.33334],
            732: [0, 0.9, 0, 0, 2.33334],
            770: [0, 0.825, 0, 0, 2.33334],
            771: [0, 0.9, 0, 0, 2.33334],
            989: [0.08167, 0.58167, 0, 0, 0.77778],
            1008: [0, 0.43056, 0.04028, 0, 0.66667],
            8245: [0, 0.54986, 0, 0, 0.275],
            8463: [0, 0.68889, 0, 0, 0.54028],
            8487: [0, 0.68889, 0, 0, 0.72222],
            8498: [0, 0.68889, 0, 0, 0.55556],
            8502: [0, 0.68889, 0, 0, 0.66667],
            8503: [0, 0.68889, 0, 0, 0.44445],
            8504: [0, 0.68889, 0, 0, 0.66667],
            8513: [0, 0.68889, 0, 0, 0.63889],
            8592: [-0.03598, 0.46402, 0, 0, 0.5],
            8594: [-0.03598, 0.46402, 0, 0, 0.5],
            8602: [-0.13313, 0.36687, 0, 0, 1],
            8603: [-0.13313, 0.36687, 0, 0, 1],
            8606: [0.01354, 0.52239, 0, 0, 1],
            8608: [0.01354, 0.52239, 0, 0, 1],
            8610: [0.01354, 0.52239, 0, 0, 1.11111],
            8611: [0.01354, 0.52239, 0, 0, 1.11111],
            8619: [0, 0.54986, 0, 0, 1],
            8620: [0, 0.54986, 0, 0, 1],
            8621: [-0.13313, 0.37788, 0, 0, 1.38889],
            8622: [-0.13313, 0.36687, 0, 0, 1],
            8624: [0, 0.69224, 0, 0, 0.5],
            8625: [0, 0.69224, 0, 0, 0.5],
            8630: [0, 0.43056, 0, 0, 1],
            8631: [0, 0.43056, 0, 0, 1],
            8634: [0.08198, 0.58198, 0, 0, 0.77778],
            8635: [0.08198, 0.58198, 0, 0, 0.77778],
            8638: [0.19444, 0.69224, 0, 0, 0.41667],
            8639: [0.19444, 0.69224, 0, 0, 0.41667],
            8642: [0.19444, 0.69224, 0, 0, 0.41667],
            8643: [0.19444, 0.69224, 0, 0, 0.41667],
            8644: [0.1808, 0.675, 0, 0, 1],
            8646: [0.1808, 0.675, 0, 0, 1],
            8647: [0.1808, 0.675, 0, 0, 1],
            8648: [0.19444, 0.69224, 0, 0, 0.83334],
            8649: [0.1808, 0.675, 0, 0, 1],
            8650: [0.19444, 0.69224, 0, 0, 0.83334],
            8651: [0.01354, 0.52239, 0, 0, 1],
            8652: [0.01354, 0.52239, 0, 0, 1],
            8653: [-0.13313, 0.36687, 0, 0, 1],
            8654: [-0.13313, 0.36687, 0, 0, 1],
            8655: [-0.13313, 0.36687, 0, 0, 1],
            8666: [0.13667, 0.63667, 0, 0, 1],
            8667: [0.13667, 0.63667, 0, 0, 1],
            8669: [-0.13313, 0.37788, 0, 0, 1],
            8672: [-0.064, 0.437, 0, 0, 1.334],
            8674: [-0.064, 0.437, 0, 0, 1.334],
            8705: [0, 0.825, 0, 0, 0.5],
            8708: [0, 0.68889, 0, 0, 0.55556],
            8709: [0.08167, 0.58167, 0, 0, 0.77778],
            8717: [0, 0.43056, 0, 0, 0.42917],
            8722: [-0.03598, 0.46402, 0, 0, 0.5],
            8724: [0.08198, 0.69224, 0, 0, 0.77778],
            8726: [0.08167, 0.58167, 0, 0, 0.77778],
            8733: [0, 0.69224, 0, 0, 0.77778],
            8736: [0, 0.69224, 0, 0, 0.72222],
            8737: [0, 0.69224, 0, 0, 0.72222],
            8738: [0.03517, 0.52239, 0, 0, 0.72222],
            8739: [0.08167, 0.58167, 0, 0, 0.22222],
            8740: [0.25142, 0.74111, 0, 0, 0.27778],
            8741: [0.08167, 0.58167, 0, 0, 0.38889],
            8742: [0.25142, 0.74111, 0, 0, 0.5],
            8756: [0, 0.69224, 0, 0, 0.66667],
            8757: [0, 0.69224, 0, 0, 0.66667],
            8764: [-0.13313, 0.36687, 0, 0, 0.77778],
            8765: [-0.13313, 0.37788, 0, 0, 0.77778],
            8769: [-0.13313, 0.36687, 0, 0, 0.77778],
            8770: [-0.03625, 0.46375, 0, 0, 0.77778],
            8774: [0.30274, 0.79383, 0, 0, 0.77778],
            8776: [-0.01688, 0.48312, 0, 0, 0.77778],
            8778: [0.08167, 0.58167, 0, 0, 0.77778],
            8782: [0.06062, 0.54986, 0, 0, 0.77778],
            8783: [0.06062, 0.54986, 0, 0, 0.77778],
            8785: [0.08198, 0.58198, 0, 0, 0.77778],
            8786: [0.08198, 0.58198, 0, 0, 0.77778],
            8787: [0.08198, 0.58198, 0, 0, 0.77778],
            8790: [0, 0.69224, 0, 0, 0.77778],
            8791: [0.22958, 0.72958, 0, 0, 0.77778],
            8796: [0.08198, 0.91667, 0, 0, 0.77778],
            8806: [0.25583, 0.75583, 0, 0, 0.77778],
            8807: [0.25583, 0.75583, 0, 0, 0.77778],
            8808: [0.25142, 0.75726, 0, 0, 0.77778],
            8809: [0.25142, 0.75726, 0, 0, 0.77778],
            8812: [0.25583, 0.75583, 0, 0, 0.5],
            8814: [0.20576, 0.70576, 0, 0, 0.77778],
            8815: [0.20576, 0.70576, 0, 0, 0.77778],
            8816: [0.30274, 0.79383, 0, 0, 0.77778],
            8817: [0.30274, 0.79383, 0, 0, 0.77778],
            8818: [0.22958, 0.72958, 0, 0, 0.77778],
            8819: [0.22958, 0.72958, 0, 0, 0.77778],
            8822: [0.1808, 0.675, 0, 0, 0.77778],
            8823: [0.1808, 0.675, 0, 0, 0.77778],
            8828: [0.13667, 0.63667, 0, 0, 0.77778],
            8829: [0.13667, 0.63667, 0, 0, 0.77778],
            8830: [0.22958, 0.72958, 0, 0, 0.77778],
            8831: [0.22958, 0.72958, 0, 0, 0.77778],
            8832: [0.20576, 0.70576, 0, 0, 0.77778],
            8833: [0.20576, 0.70576, 0, 0, 0.77778],
            8840: [0.30274, 0.79383, 0, 0, 0.77778],
            8841: [0.30274, 0.79383, 0, 0, 0.77778],
            8842: [0.13597, 0.63597, 0, 0, 0.77778],
            8843: [0.13597, 0.63597, 0, 0, 0.77778],
            8847: [0.03517, 0.54986, 0, 0, 0.77778],
            8848: [0.03517, 0.54986, 0, 0, 0.77778],
            8858: [0.08198, 0.58198, 0, 0, 0.77778],
            8859: [0.08198, 0.58198, 0, 0, 0.77778],
            8861: [0.08198, 0.58198, 0, 0, 0.77778],
            8862: [0, 0.675, 0, 0, 0.77778],
            8863: [0, 0.675, 0, 0, 0.77778],
            8864: [0, 0.675, 0, 0, 0.77778],
            8865: [0, 0.675, 0, 0, 0.77778],
            8872: [0, 0.69224, 0, 0, 0.61111],
            8873: [0, 0.69224, 0, 0, 0.72222],
            8874: [0, 0.69224, 0, 0, 0.88889],
            8876: [0, 0.68889, 0, 0, 0.61111],
            8877: [0, 0.68889, 0, 0, 0.61111],
            8878: [0, 0.68889, 0, 0, 0.72222],
            8879: [0, 0.68889, 0, 0, 0.72222],
            8882: [0.03517, 0.54986, 0, 0, 0.77778],
            8883: [0.03517, 0.54986, 0, 0, 0.77778],
            8884: [0.13667, 0.63667, 0, 0, 0.77778],
            8885: [0.13667, 0.63667, 0, 0, 0.77778],
            8888: [0, 0.54986, 0, 0, 1.11111],
            8890: [0.19444, 0.43056, 0, 0, 0.55556],
            8891: [0.19444, 0.69224, 0, 0, 0.61111],
            8892: [0.19444, 0.69224, 0, 0, 0.61111],
            8901: [0, 0.54986, 0, 0, 0.27778],
            8903: [0.08167, 0.58167, 0, 0, 0.77778],
            8905: [0.08167, 0.58167, 0, 0, 0.77778],
            8906: [0.08167, 0.58167, 0, 0, 0.77778],
            8907: [0, 0.69224, 0, 0, 0.77778],
            8908: [0, 0.69224, 0, 0, 0.77778],
            8909: [-0.03598, 0.46402, 0, 0, 0.77778],
            8910: [0, 0.54986, 0, 0, 0.76042],
            8911: [0, 0.54986, 0, 0, 0.76042],
            8912: [0.03517, 0.54986, 0, 0, 0.77778],
            8913: [0.03517, 0.54986, 0, 0, 0.77778],
            8914: [0, 0.54986, 0, 0, 0.66667],
            8915: [0, 0.54986, 0, 0, 0.66667],
            8916: [0, 0.69224, 0, 0, 0.66667],
            8918: [0.0391, 0.5391, 0, 0, 0.77778],
            8919: [0.0391, 0.5391, 0, 0, 0.77778],
            8920: [0.03517, 0.54986, 0, 0, 1.33334],
            8921: [0.03517, 0.54986, 0, 0, 1.33334],
            8922: [0.38569, 0.88569, 0, 0, 0.77778],
            8923: [0.38569, 0.88569, 0, 0, 0.77778],
            8926: [0.13667, 0.63667, 0, 0, 0.77778],
            8927: [0.13667, 0.63667, 0, 0, 0.77778],
            8928: [0.30274, 0.79383, 0, 0, 0.77778],
            8929: [0.30274, 0.79383, 0, 0, 0.77778],
            8934: [0.23222, 0.74111, 0, 0, 0.77778],
            8935: [0.23222, 0.74111, 0, 0, 0.77778],
            8936: [0.23222, 0.74111, 0, 0, 0.77778],
            8937: [0.23222, 0.74111, 0, 0, 0.77778],
            8938: [0.20576, 0.70576, 0, 0, 0.77778],
            8939: [0.20576, 0.70576, 0, 0, 0.77778],
            8940: [0.30274, 0.79383, 0, 0, 0.77778],
            8941: [0.30274, 0.79383, 0, 0, 0.77778],
            8994: [0.19444, 0.69224, 0, 0, 0.77778],
            8995: [0.19444, 0.69224, 0, 0, 0.77778],
            9416: [0.15559, 0.69224, 0, 0, 0.90222],
            9484: [0, 0.69224, 0, 0, 0.5],
            9488: [0, 0.69224, 0, 0, 0.5],
            9492: [0, 0.37788, 0, 0, 0.5],
            9496: [0, 0.37788, 0, 0, 0.5],
            9585: [0.19444, 0.68889, 0, 0, 0.88889],
            9586: [0.19444, 0.74111, 0, 0, 0.88889],
            9632: [0, 0.675, 0, 0, 0.77778],
            9633: [0, 0.675, 0, 0, 0.77778],
            9650: [0, 0.54986, 0, 0, 0.72222],
            9651: [0, 0.54986, 0, 0, 0.72222],
            9654: [0.03517, 0.54986, 0, 0, 0.77778],
            9660: [0, 0.54986, 0, 0, 0.72222],
            9661: [0, 0.54986, 0, 0, 0.72222],
            9664: [0.03517, 0.54986, 0, 0, 0.77778],
            9674: [0.11111, 0.69224, 0, 0, 0.66667],
            9733: [0.19444, 0.69224, 0, 0, 0.94445],
            10003: [0, 0.69224, 0, 0, 0.83334],
            10016: [0, 0.69224, 0, 0, 0.83334],
            10731: [0.11111, 0.69224, 0, 0, 0.66667],
            10846: [0.19444, 0.75583, 0, 0, 0.61111],
            10877: [0.13667, 0.63667, 0, 0, 0.77778],
            10878: [0.13667, 0.63667, 0, 0, 0.77778],
            10885: [0.25583, 0.75583, 0, 0, 0.77778],
            10886: [0.25583, 0.75583, 0, 0, 0.77778],
            10887: [0.13597, 0.63597, 0, 0, 0.77778],
            10888: [0.13597, 0.63597, 0, 0, 0.77778],
            10889: [0.26167, 0.75726, 0, 0, 0.77778],
            10890: [0.26167, 0.75726, 0, 0, 0.77778],
            10891: [0.48256, 0.98256, 0, 0, 0.77778],
            10892: [0.48256, 0.98256, 0, 0, 0.77778],
            10901: [0.13667, 0.63667, 0, 0, 0.77778],
            10902: [0.13667, 0.63667, 0, 0, 0.77778],
            10933: [0.25142, 0.75726, 0, 0, 0.77778],
            10934: [0.25142, 0.75726, 0, 0, 0.77778],
            10935: [0.26167, 0.75726, 0, 0, 0.77778],
            10936: [0.26167, 0.75726, 0, 0, 0.77778],
            10937: [0.26167, 0.75726, 0, 0, 0.77778],
            10938: [0.26167, 0.75726, 0, 0, 0.77778],
            10949: [0.25583, 0.75583, 0, 0, 0.77778],
            10950: [0.25583, 0.75583, 0, 0, 0.77778],
            10955: [0.28481, 0.79383, 0, 0, 0.77778],
            10956: [0.28481, 0.79383, 0, 0, 0.77778],
            57350: [0.08167, 0.58167, 0, 0, 0.22222],
            57351: [0.08167, 0.58167, 0, 0, 0.38889],
            57352: [0.08167, 0.58167, 0, 0, 0.77778],
            57353: [0, 0.43056, 0.04028, 0, 0.66667],
            57356: [0.25142, 0.75726, 0, 0, 0.77778],
            57357: [0.25142, 0.75726, 0, 0, 0.77778],
            57358: [0.41951, 0.91951, 0, 0, 0.77778],
            57359: [0.30274, 0.79383, 0, 0, 0.77778],
            57360: [0.30274, 0.79383, 0, 0, 0.77778],
            57361: [0.41951, 0.91951, 0, 0, 0.77778],
            57366: [0.25142, 0.75726, 0, 0, 0.77778],
            57367: [0.25142, 0.75726, 0, 0, 0.77778],
            57368: [0.25142, 0.75726, 0, 0, 0.77778],
            57369: [0.25142, 0.75726, 0, 0, 0.77778],
            57370: [0.13597, 0.63597, 0, 0, 0.77778],
            57371: [0.13597, 0.63597, 0, 0, 0.77778]
          },
          "Caligraphic-Regular": {
            32: [0, 0, 0, 0, 0.25],
            65: [0, 0.68333, 0, 0.19445, 0.79847],
            66: [0, 0.68333, 0.03041, 0.13889, 0.65681],
            67: [0, 0.68333, 0.05834, 0.13889, 0.52653],
            68: [0, 0.68333, 0.02778, 0.08334, 0.77139],
            69: [0, 0.68333, 0.08944, 0.11111, 0.52778],
            70: [0, 0.68333, 0.09931, 0.11111, 0.71875],
            71: [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
            72: [0, 0.68333, 965e-5, 0.11111, 0.84452],
            73: [0, 0.68333, 0.07382, 0, 0.54452],
            74: [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
            75: [0, 0.68333, 0.01445, 0.05556, 0.76195],
            76: [0, 0.68333, 0, 0.13889, 0.68972],
            77: [0, 0.68333, 0, 0.13889, 1.2009],
            78: [0, 0.68333, 0.14736, 0.08334, 0.82049],
            79: [0, 0.68333, 0.02778, 0.11111, 0.79611],
            80: [0, 0.68333, 0.08222, 0.08334, 0.69556],
            81: [0.09722, 0.68333, 0, 0.11111, 0.81667],
            82: [0, 0.68333, 0, 0.08334, 0.8475],
            83: [0, 0.68333, 0.075, 0.13889, 0.60556],
            84: [0, 0.68333, 0.25417, 0, 0.54464],
            85: [0, 0.68333, 0.09931, 0.08334, 0.62583],
            86: [0, 0.68333, 0.08222, 0, 0.61278],
            87: [0, 0.68333, 0.08222, 0.08334, 0.98778],
            88: [0, 0.68333, 0.14643, 0.13889, 0.7133],
            89: [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
            90: [0, 0.68333, 0.07944, 0.13889, 0.72473],
            160: [0, 0, 0, 0, 0.25]
          },
          "Fraktur-Regular": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69141, 0, 0, 0.29574],
            34: [0, 0.69141, 0, 0, 0.21471],
            38: [0, 0.69141, 0, 0, 0.73786],
            39: [0, 0.69141, 0, 0, 0.21201],
            40: [0.24982, 0.74947, 0, 0, 0.38865],
            41: [0.24982, 0.74947, 0, 0, 0.38865],
            42: [0, 0.62119, 0, 0, 0.27764],
            43: [0.08319, 0.58283, 0, 0, 0.75623],
            44: [0, 0.10803, 0, 0, 0.27764],
            45: [0.08319, 0.58283, 0, 0, 0.75623],
            46: [0, 0.10803, 0, 0, 0.27764],
            47: [0.24982, 0.74947, 0, 0, 0.50181],
            48: [0, 0.47534, 0, 0, 0.50181],
            49: [0, 0.47534, 0, 0, 0.50181],
            50: [0, 0.47534, 0, 0, 0.50181],
            51: [0.18906, 0.47534, 0, 0, 0.50181],
            52: [0.18906, 0.47534, 0, 0, 0.50181],
            53: [0.18906, 0.47534, 0, 0, 0.50181],
            54: [0, 0.69141, 0, 0, 0.50181],
            55: [0.18906, 0.47534, 0, 0, 0.50181],
            56: [0, 0.69141, 0, 0, 0.50181],
            57: [0.18906, 0.47534, 0, 0, 0.50181],
            58: [0, 0.47534, 0, 0, 0.21606],
            59: [0.12604, 0.47534, 0, 0, 0.21606],
            61: [-0.13099, 0.36866, 0, 0, 0.75623],
            63: [0, 0.69141, 0, 0, 0.36245],
            65: [0, 0.69141, 0, 0, 0.7176],
            66: [0, 0.69141, 0, 0, 0.88397],
            67: [0, 0.69141, 0, 0, 0.61254],
            68: [0, 0.69141, 0, 0, 0.83158],
            69: [0, 0.69141, 0, 0, 0.66278],
            70: [0.12604, 0.69141, 0, 0, 0.61119],
            71: [0, 0.69141, 0, 0, 0.78539],
            72: [0.06302, 0.69141, 0, 0, 0.7203],
            73: [0, 0.69141, 0, 0, 0.55448],
            74: [0.12604, 0.69141, 0, 0, 0.55231],
            75: [0, 0.69141, 0, 0, 0.66845],
            76: [0, 0.69141, 0, 0, 0.66602],
            77: [0, 0.69141, 0, 0, 1.04953],
            78: [0, 0.69141, 0, 0, 0.83212],
            79: [0, 0.69141, 0, 0, 0.82699],
            80: [0.18906, 0.69141, 0, 0, 0.82753],
            81: [0.03781, 0.69141, 0, 0, 0.82699],
            82: [0, 0.69141, 0, 0, 0.82807],
            83: [0, 0.69141, 0, 0, 0.82861],
            84: [0, 0.69141, 0, 0, 0.66899],
            85: [0, 0.69141, 0, 0, 0.64576],
            86: [0, 0.69141, 0, 0, 0.83131],
            87: [0, 0.69141, 0, 0, 1.04602],
            88: [0, 0.69141, 0, 0, 0.71922],
            89: [0.18906, 0.69141, 0, 0, 0.83293],
            90: [0.12604, 0.69141, 0, 0, 0.60201],
            91: [0.24982, 0.74947, 0, 0, 0.27764],
            93: [0.24982, 0.74947, 0, 0, 0.27764],
            94: [0, 0.69141, 0, 0, 0.49965],
            97: [0, 0.47534, 0, 0, 0.50046],
            98: [0, 0.69141, 0, 0, 0.51315],
            99: [0, 0.47534, 0, 0, 0.38946],
            100: [0, 0.62119, 0, 0, 0.49857],
            101: [0, 0.47534, 0, 0, 0.40053],
            102: [0.18906, 0.69141, 0, 0, 0.32626],
            103: [0.18906, 0.47534, 0, 0, 0.5037],
            104: [0.18906, 0.69141, 0, 0, 0.52126],
            105: [0, 0.69141, 0, 0, 0.27899],
            106: [0, 0.69141, 0, 0, 0.28088],
            107: [0, 0.69141, 0, 0, 0.38946],
            108: [0, 0.69141, 0, 0, 0.27953],
            109: [0, 0.47534, 0, 0, 0.76676],
            110: [0, 0.47534, 0, 0, 0.52666],
            111: [0, 0.47534, 0, 0, 0.48885],
            112: [0.18906, 0.52396, 0, 0, 0.50046],
            113: [0.18906, 0.47534, 0, 0, 0.48912],
            114: [0, 0.47534, 0, 0, 0.38919],
            115: [0, 0.47534, 0, 0, 0.44266],
            116: [0, 0.62119, 0, 0, 0.33301],
            117: [0, 0.47534, 0, 0, 0.5172],
            118: [0, 0.52396, 0, 0, 0.5118],
            119: [0, 0.52396, 0, 0, 0.77351],
            120: [0.18906, 0.47534, 0, 0, 0.38865],
            121: [0.18906, 0.47534, 0, 0, 0.49884],
            122: [0.18906, 0.47534, 0, 0, 0.39054],
            160: [0, 0, 0, 0, 0.25],
            8216: [0, 0.69141, 0, 0, 0.21471],
            8217: [0, 0.69141, 0, 0, 0.21471],
            58112: [0, 0.62119, 0, 0, 0.49749],
            58113: [0, 0.62119, 0, 0, 0.4983],
            58114: [0.18906, 0.69141, 0, 0, 0.33328],
            58115: [0.18906, 0.69141, 0, 0, 0.32923],
            58116: [0.18906, 0.47534, 0, 0, 0.50343],
            58117: [0, 0.69141, 0, 0, 0.33301],
            58118: [0, 0.62119, 0, 0, 0.33409],
            58119: [0, 0.47534, 0, 0, 0.50073]
          },
          "Main-Bold": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0, 0, 0.35],
            34: [0, 0.69444, 0, 0, 0.60278],
            35: [0.19444, 0.69444, 0, 0, 0.95833],
            36: [0.05556, 0.75, 0, 0, 0.575],
            37: [0.05556, 0.75, 0, 0, 0.95833],
            38: [0, 0.69444, 0, 0, 0.89444],
            39: [0, 0.69444, 0, 0, 0.31944],
            40: [0.25, 0.75, 0, 0, 0.44722],
            41: [0.25, 0.75, 0, 0, 0.44722],
            42: [0, 0.75, 0, 0, 0.575],
            43: [0.13333, 0.63333, 0, 0, 0.89444],
            44: [0.19444, 0.15556, 0, 0, 0.31944],
            45: [0, 0.44444, 0, 0, 0.38333],
            46: [0, 0.15556, 0, 0, 0.31944],
            47: [0.25, 0.75, 0, 0, 0.575],
            48: [0, 0.64444, 0, 0, 0.575],
            49: [0, 0.64444, 0, 0, 0.575],
            50: [0, 0.64444, 0, 0, 0.575],
            51: [0, 0.64444, 0, 0, 0.575],
            52: [0, 0.64444, 0, 0, 0.575],
            53: [0, 0.64444, 0, 0, 0.575],
            54: [0, 0.64444, 0, 0, 0.575],
            55: [0, 0.64444, 0, 0, 0.575],
            56: [0, 0.64444, 0, 0, 0.575],
            57: [0, 0.64444, 0, 0, 0.575],
            58: [0, 0.44444, 0, 0, 0.31944],
            59: [0.19444, 0.44444, 0, 0, 0.31944],
            60: [0.08556, 0.58556, 0, 0, 0.89444],
            61: [-0.10889, 0.39111, 0, 0, 0.89444],
            62: [0.08556, 0.58556, 0, 0, 0.89444],
            63: [0, 0.69444, 0, 0, 0.54305],
            64: [0, 0.69444, 0, 0, 0.89444],
            65: [0, 0.68611, 0, 0, 0.86944],
            66: [0, 0.68611, 0, 0, 0.81805],
            67: [0, 0.68611, 0, 0, 0.83055],
            68: [0, 0.68611, 0, 0, 0.88194],
            69: [0, 0.68611, 0, 0, 0.75555],
            70: [0, 0.68611, 0, 0, 0.72361],
            71: [0, 0.68611, 0, 0, 0.90416],
            72: [0, 0.68611, 0, 0, 0.9],
            73: [0, 0.68611, 0, 0, 0.43611],
            74: [0, 0.68611, 0, 0, 0.59444],
            75: [0, 0.68611, 0, 0, 0.90138],
            76: [0, 0.68611, 0, 0, 0.69166],
            77: [0, 0.68611, 0, 0, 1.09166],
            78: [0, 0.68611, 0, 0, 0.9],
            79: [0, 0.68611, 0, 0, 0.86388],
            80: [0, 0.68611, 0, 0, 0.78611],
            81: [0.19444, 0.68611, 0, 0, 0.86388],
            82: [0, 0.68611, 0, 0, 0.8625],
            83: [0, 0.68611, 0, 0, 0.63889],
            84: [0, 0.68611, 0, 0, 0.8],
            85: [0, 0.68611, 0, 0, 0.88472],
            86: [0, 0.68611, 0.01597, 0, 0.86944],
            87: [0, 0.68611, 0.01597, 0, 1.18888],
            88: [0, 0.68611, 0, 0, 0.86944],
            89: [0, 0.68611, 0.02875, 0, 0.86944],
            90: [0, 0.68611, 0, 0, 0.70277],
            91: [0.25, 0.75, 0, 0, 0.31944],
            92: [0.25, 0.75, 0, 0, 0.575],
            93: [0.25, 0.75, 0, 0, 0.31944],
            94: [0, 0.69444, 0, 0, 0.575],
            95: [0.31, 0.13444, 0.03194, 0, 0.575],
            97: [0, 0.44444, 0, 0, 0.55902],
            98: [0, 0.69444, 0, 0, 0.63889],
            99: [0, 0.44444, 0, 0, 0.51111],
            100: [0, 0.69444, 0, 0, 0.63889],
            101: [0, 0.44444, 0, 0, 0.52708],
            102: [0, 0.69444, 0.10903, 0, 0.35139],
            103: [0.19444, 0.44444, 0.01597, 0, 0.575],
            104: [0, 0.69444, 0, 0, 0.63889],
            105: [0, 0.69444, 0, 0, 0.31944],
            106: [0.19444, 0.69444, 0, 0, 0.35139],
            107: [0, 0.69444, 0, 0, 0.60694],
            108: [0, 0.69444, 0, 0, 0.31944],
            109: [0, 0.44444, 0, 0, 0.95833],
            110: [0, 0.44444, 0, 0, 0.63889],
            111: [0, 0.44444, 0, 0, 0.575],
            112: [0.19444, 0.44444, 0, 0, 0.63889],
            113: [0.19444, 0.44444, 0, 0, 0.60694],
            114: [0, 0.44444, 0, 0, 0.47361],
            115: [0, 0.44444, 0, 0, 0.45361],
            116: [0, 0.63492, 0, 0, 0.44722],
            117: [0, 0.44444, 0, 0, 0.63889],
            118: [0, 0.44444, 0.01597, 0, 0.60694],
            119: [0, 0.44444, 0.01597, 0, 0.83055],
            120: [0, 0.44444, 0, 0, 0.60694],
            121: [0.19444, 0.44444, 0.01597, 0, 0.60694],
            122: [0, 0.44444, 0, 0, 0.51111],
            123: [0.25, 0.75, 0, 0, 0.575],
            124: [0.25, 0.75, 0, 0, 0.31944],
            125: [0.25, 0.75, 0, 0, 0.575],
            126: [0.35, 0.34444, 0, 0, 0.575],
            160: [0, 0, 0, 0, 0.25],
            163: [0, 0.69444, 0, 0, 0.86853],
            168: [0, 0.69444, 0, 0, 0.575],
            172: [0, 0.44444, 0, 0, 0.76666],
            176: [0, 0.69444, 0, 0, 0.86944],
            177: [0.13333, 0.63333, 0, 0, 0.89444],
            184: [0.17014, 0, 0, 0, 0.51111],
            198: [0, 0.68611, 0, 0, 1.04166],
            215: [0.13333, 0.63333, 0, 0, 0.89444],
            216: [0.04861, 0.73472, 0, 0, 0.89444],
            223: [0, 0.69444, 0, 0, 0.59722],
            230: [0, 0.44444, 0, 0, 0.83055],
            247: [0.13333, 0.63333, 0, 0, 0.89444],
            248: [0.09722, 0.54167, 0, 0, 0.575],
            305: [0, 0.44444, 0, 0, 0.31944],
            338: [0, 0.68611, 0, 0, 1.16944],
            339: [0, 0.44444, 0, 0, 0.89444],
            567: [0.19444, 0.44444, 0, 0, 0.35139],
            710: [0, 0.69444, 0, 0, 0.575],
            711: [0, 0.63194, 0, 0, 0.575],
            713: [0, 0.59611, 0, 0, 0.575],
            714: [0, 0.69444, 0, 0, 0.575],
            715: [0, 0.69444, 0, 0, 0.575],
            728: [0, 0.69444, 0, 0, 0.575],
            729: [0, 0.69444, 0, 0, 0.31944],
            730: [0, 0.69444, 0, 0, 0.86944],
            732: [0, 0.69444, 0, 0, 0.575],
            733: [0, 0.69444, 0, 0, 0.575],
            915: [0, 0.68611, 0, 0, 0.69166],
            916: [0, 0.68611, 0, 0, 0.95833],
            920: [0, 0.68611, 0, 0, 0.89444],
            923: [0, 0.68611, 0, 0, 0.80555],
            926: [0, 0.68611, 0, 0, 0.76666],
            928: [0, 0.68611, 0, 0, 0.9],
            931: [0, 0.68611, 0, 0, 0.83055],
            933: [0, 0.68611, 0, 0, 0.89444],
            934: [0, 0.68611, 0, 0, 0.83055],
            936: [0, 0.68611, 0, 0, 0.89444],
            937: [0, 0.68611, 0, 0, 0.83055],
            8211: [0, 0.44444, 0.03194, 0, 0.575],
            8212: [0, 0.44444, 0.03194, 0, 1.14999],
            8216: [0, 0.69444, 0, 0, 0.31944],
            8217: [0, 0.69444, 0, 0, 0.31944],
            8220: [0, 0.69444, 0, 0, 0.60278],
            8221: [0, 0.69444, 0, 0, 0.60278],
            8224: [0.19444, 0.69444, 0, 0, 0.51111],
            8225: [0.19444, 0.69444, 0, 0, 0.51111],
            8242: [0, 0.55556, 0, 0, 0.34444],
            8407: [0, 0.72444, 0.15486, 0, 0.575],
            8463: [0, 0.69444, 0, 0, 0.66759],
            8465: [0, 0.69444, 0, 0, 0.83055],
            8467: [0, 0.69444, 0, 0, 0.47361],
            8472: [0.19444, 0.44444, 0, 0, 0.74027],
            8476: [0, 0.69444, 0, 0, 0.83055],
            8501: [0, 0.69444, 0, 0, 0.70277],
            8592: [-0.10889, 0.39111, 0, 0, 1.14999],
            8593: [0.19444, 0.69444, 0, 0, 0.575],
            8594: [-0.10889, 0.39111, 0, 0, 1.14999],
            8595: [0.19444, 0.69444, 0, 0, 0.575],
            8596: [-0.10889, 0.39111, 0, 0, 1.14999],
            8597: [0.25, 0.75, 0, 0, 0.575],
            8598: [0.19444, 0.69444, 0, 0, 1.14999],
            8599: [0.19444, 0.69444, 0, 0, 1.14999],
            8600: [0.19444, 0.69444, 0, 0, 1.14999],
            8601: [0.19444, 0.69444, 0, 0, 1.14999],
            8636: [-0.10889, 0.39111, 0, 0, 1.14999],
            8637: [-0.10889, 0.39111, 0, 0, 1.14999],
            8640: [-0.10889, 0.39111, 0, 0, 1.14999],
            8641: [-0.10889, 0.39111, 0, 0, 1.14999],
            8656: [-0.10889, 0.39111, 0, 0, 1.14999],
            8657: [0.19444, 0.69444, 0, 0, 0.70277],
            8658: [-0.10889, 0.39111, 0, 0, 1.14999],
            8659: [0.19444, 0.69444, 0, 0, 0.70277],
            8660: [-0.10889, 0.39111, 0, 0, 1.14999],
            8661: [0.25, 0.75, 0, 0, 0.70277],
            8704: [0, 0.69444, 0, 0, 0.63889],
            8706: [0, 0.69444, 0.06389, 0, 0.62847],
            8707: [0, 0.69444, 0, 0, 0.63889],
            8709: [0.05556, 0.75, 0, 0, 0.575],
            8711: [0, 0.68611, 0, 0, 0.95833],
            8712: [0.08556, 0.58556, 0, 0, 0.76666],
            8715: [0.08556, 0.58556, 0, 0, 0.76666],
            8722: [0.13333, 0.63333, 0, 0, 0.89444],
            8723: [0.13333, 0.63333, 0, 0, 0.89444],
            8725: [0.25, 0.75, 0, 0, 0.575],
            8726: [0.25, 0.75, 0, 0, 0.575],
            8727: [-0.02778, 0.47222, 0, 0, 0.575],
            8728: [-0.02639, 0.47361, 0, 0, 0.575],
            8729: [-0.02639, 0.47361, 0, 0, 0.575],
            8730: [0.18, 0.82, 0, 0, 0.95833],
            8733: [0, 0.44444, 0, 0, 0.89444],
            8734: [0, 0.44444, 0, 0, 1.14999],
            8736: [0, 0.69224, 0, 0, 0.72222],
            8739: [0.25, 0.75, 0, 0, 0.31944],
            8741: [0.25, 0.75, 0, 0, 0.575],
            8743: [0, 0.55556, 0, 0, 0.76666],
            8744: [0, 0.55556, 0, 0, 0.76666],
            8745: [0, 0.55556, 0, 0, 0.76666],
            8746: [0, 0.55556, 0, 0, 0.76666],
            8747: [0.19444, 0.69444, 0.12778, 0, 0.56875],
            8764: [-0.10889, 0.39111, 0, 0, 0.89444],
            8768: [0.19444, 0.69444, 0, 0, 0.31944],
            8771: [222e-5, 0.50222, 0, 0, 0.89444],
            8773: [0.027, 0.638, 0, 0, 0.894],
            8776: [0.02444, 0.52444, 0, 0, 0.89444],
            8781: [222e-5, 0.50222, 0, 0, 0.89444],
            8801: [222e-5, 0.50222, 0, 0, 0.89444],
            8804: [0.19667, 0.69667, 0, 0, 0.89444],
            8805: [0.19667, 0.69667, 0, 0, 0.89444],
            8810: [0.08556, 0.58556, 0, 0, 1.14999],
            8811: [0.08556, 0.58556, 0, 0, 1.14999],
            8826: [0.08556, 0.58556, 0, 0, 0.89444],
            8827: [0.08556, 0.58556, 0, 0, 0.89444],
            8834: [0.08556, 0.58556, 0, 0, 0.89444],
            8835: [0.08556, 0.58556, 0, 0, 0.89444],
            8838: [0.19667, 0.69667, 0, 0, 0.89444],
            8839: [0.19667, 0.69667, 0, 0, 0.89444],
            8846: [0, 0.55556, 0, 0, 0.76666],
            8849: [0.19667, 0.69667, 0, 0, 0.89444],
            8850: [0.19667, 0.69667, 0, 0, 0.89444],
            8851: [0, 0.55556, 0, 0, 0.76666],
            8852: [0, 0.55556, 0, 0, 0.76666],
            8853: [0.13333, 0.63333, 0, 0, 0.89444],
            8854: [0.13333, 0.63333, 0, 0, 0.89444],
            8855: [0.13333, 0.63333, 0, 0, 0.89444],
            8856: [0.13333, 0.63333, 0, 0, 0.89444],
            8857: [0.13333, 0.63333, 0, 0, 0.89444],
            8866: [0, 0.69444, 0, 0, 0.70277],
            8867: [0, 0.69444, 0, 0, 0.70277],
            8868: [0, 0.69444, 0, 0, 0.89444],
            8869: [0, 0.69444, 0, 0, 0.89444],
            8900: [-0.02639, 0.47361, 0, 0, 0.575],
            8901: [-0.02639, 0.47361, 0, 0, 0.31944],
            8902: [-0.02778, 0.47222, 0, 0, 0.575],
            8968: [0.25, 0.75, 0, 0, 0.51111],
            8969: [0.25, 0.75, 0, 0, 0.51111],
            8970: [0.25, 0.75, 0, 0, 0.51111],
            8971: [0.25, 0.75, 0, 0, 0.51111],
            8994: [-0.13889, 0.36111, 0, 0, 1.14999],
            8995: [-0.13889, 0.36111, 0, 0, 1.14999],
            9651: [0.19444, 0.69444, 0, 0, 1.02222],
            9657: [-0.02778, 0.47222, 0, 0, 0.575],
            9661: [0.19444, 0.69444, 0, 0, 1.02222],
            9667: [-0.02778, 0.47222, 0, 0, 0.575],
            9711: [0.19444, 0.69444, 0, 0, 1.14999],
            9824: [0.12963, 0.69444, 0, 0, 0.89444],
            9825: [0.12963, 0.69444, 0, 0, 0.89444],
            9826: [0.12963, 0.69444, 0, 0, 0.89444],
            9827: [0.12963, 0.69444, 0, 0, 0.89444],
            9837: [0, 0.75, 0, 0, 0.44722],
            9838: [0.19444, 0.69444, 0, 0, 0.44722],
            9839: [0.19444, 0.69444, 0, 0, 0.44722],
            10216: [0.25, 0.75, 0, 0, 0.44722],
            10217: [0.25, 0.75, 0, 0, 0.44722],
            10815: [0, 0.68611, 0, 0, 0.9],
            10927: [0.19667, 0.69667, 0, 0, 0.89444],
            10928: [0.19667, 0.69667, 0, 0, 0.89444],
            57376: [0.19444, 0.69444, 0, 0, 0]
          },
          "Main-BoldItalic": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0.11417, 0, 0.38611],
            34: [0, 0.69444, 0.07939, 0, 0.62055],
            35: [0.19444, 0.69444, 0.06833, 0, 0.94444],
            37: [0.05556, 0.75, 0.12861, 0, 0.94444],
            38: [0, 0.69444, 0.08528, 0, 0.88555],
            39: [0, 0.69444, 0.12945, 0, 0.35555],
            40: [0.25, 0.75, 0.15806, 0, 0.47333],
            41: [0.25, 0.75, 0.03306, 0, 0.47333],
            42: [0, 0.75, 0.14333, 0, 0.59111],
            43: [0.10333, 0.60333, 0.03306, 0, 0.88555],
            44: [0.19444, 0.14722, 0, 0, 0.35555],
            45: [0, 0.44444, 0.02611, 0, 0.41444],
            46: [0, 0.14722, 0, 0, 0.35555],
            47: [0.25, 0.75, 0.15806, 0, 0.59111],
            48: [0, 0.64444, 0.13167, 0, 0.59111],
            49: [0, 0.64444, 0.13167, 0, 0.59111],
            50: [0, 0.64444, 0.13167, 0, 0.59111],
            51: [0, 0.64444, 0.13167, 0, 0.59111],
            52: [0.19444, 0.64444, 0.13167, 0, 0.59111],
            53: [0, 0.64444, 0.13167, 0, 0.59111],
            54: [0, 0.64444, 0.13167, 0, 0.59111],
            55: [0.19444, 0.64444, 0.13167, 0, 0.59111],
            56: [0, 0.64444, 0.13167, 0, 0.59111],
            57: [0, 0.64444, 0.13167, 0, 0.59111],
            58: [0, 0.44444, 0.06695, 0, 0.35555],
            59: [0.19444, 0.44444, 0.06695, 0, 0.35555],
            61: [-0.10889, 0.39111, 0.06833, 0, 0.88555],
            63: [0, 0.69444, 0.11472, 0, 0.59111],
            64: [0, 0.69444, 0.09208, 0, 0.88555],
            65: [0, 0.68611, 0, 0, 0.86555],
            66: [0, 0.68611, 0.0992, 0, 0.81666],
            67: [0, 0.68611, 0.14208, 0, 0.82666],
            68: [0, 0.68611, 0.09062, 0, 0.87555],
            69: [0, 0.68611, 0.11431, 0, 0.75666],
            70: [0, 0.68611, 0.12903, 0, 0.72722],
            71: [0, 0.68611, 0.07347, 0, 0.89527],
            72: [0, 0.68611, 0.17208, 0, 0.8961],
            73: [0, 0.68611, 0.15681, 0, 0.47166],
            74: [0, 0.68611, 0.145, 0, 0.61055],
            75: [0, 0.68611, 0.14208, 0, 0.89499],
            76: [0, 0.68611, 0, 0, 0.69777],
            77: [0, 0.68611, 0.17208, 0, 1.07277],
            78: [0, 0.68611, 0.17208, 0, 0.8961],
            79: [0, 0.68611, 0.09062, 0, 0.85499],
            80: [0, 0.68611, 0.0992, 0, 0.78721],
            81: [0.19444, 0.68611, 0.09062, 0, 0.85499],
            82: [0, 0.68611, 0.02559, 0, 0.85944],
            83: [0, 0.68611, 0.11264, 0, 0.64999],
            84: [0, 0.68611, 0.12903, 0, 0.7961],
            85: [0, 0.68611, 0.17208, 0, 0.88083],
            86: [0, 0.68611, 0.18625, 0, 0.86555],
            87: [0, 0.68611, 0.18625, 0, 1.15999],
            88: [0, 0.68611, 0.15681, 0, 0.86555],
            89: [0, 0.68611, 0.19803, 0, 0.86555],
            90: [0, 0.68611, 0.14208, 0, 0.70888],
            91: [0.25, 0.75, 0.1875, 0, 0.35611],
            93: [0.25, 0.75, 0.09972, 0, 0.35611],
            94: [0, 0.69444, 0.06709, 0, 0.59111],
            95: [0.31, 0.13444, 0.09811, 0, 0.59111],
            97: [0, 0.44444, 0.09426, 0, 0.59111],
            98: [0, 0.69444, 0.07861, 0, 0.53222],
            99: [0, 0.44444, 0.05222, 0, 0.53222],
            100: [0, 0.69444, 0.10861, 0, 0.59111],
            101: [0, 0.44444, 0.085, 0, 0.53222],
            102: [0.19444, 0.69444, 0.21778, 0, 0.4],
            103: [0.19444, 0.44444, 0.105, 0, 0.53222],
            104: [0, 0.69444, 0.09426, 0, 0.59111],
            105: [0, 0.69326, 0.11387, 0, 0.35555],
            106: [0.19444, 0.69326, 0.1672, 0, 0.35555],
            107: [0, 0.69444, 0.11111, 0, 0.53222],
            108: [0, 0.69444, 0.10861, 0, 0.29666],
            109: [0, 0.44444, 0.09426, 0, 0.94444],
            110: [0, 0.44444, 0.09426, 0, 0.64999],
            111: [0, 0.44444, 0.07861, 0, 0.59111],
            112: [0.19444, 0.44444, 0.07861, 0, 0.59111],
            113: [0.19444, 0.44444, 0.105, 0, 0.53222],
            114: [0, 0.44444, 0.11111, 0, 0.50167],
            115: [0, 0.44444, 0.08167, 0, 0.48694],
            116: [0, 0.63492, 0.09639, 0, 0.385],
            117: [0, 0.44444, 0.09426, 0, 0.62055],
            118: [0, 0.44444, 0.11111, 0, 0.53222],
            119: [0, 0.44444, 0.11111, 0, 0.76777],
            120: [0, 0.44444, 0.12583, 0, 0.56055],
            121: [0.19444, 0.44444, 0.105, 0, 0.56166],
            122: [0, 0.44444, 0.13889, 0, 0.49055],
            126: [0.35, 0.34444, 0.11472, 0, 0.59111],
            160: [0, 0, 0, 0, 0.25],
            168: [0, 0.69444, 0.11473, 0, 0.59111],
            176: [0, 0.69444, 0, 0, 0.94888],
            184: [0.17014, 0, 0, 0, 0.53222],
            198: [0, 0.68611, 0.11431, 0, 1.02277],
            216: [0.04861, 0.73472, 0.09062, 0, 0.88555],
            223: [0.19444, 0.69444, 0.09736, 0, 0.665],
            230: [0, 0.44444, 0.085, 0, 0.82666],
            248: [0.09722, 0.54167, 0.09458, 0, 0.59111],
            305: [0, 0.44444, 0.09426, 0, 0.35555],
            338: [0, 0.68611, 0.11431, 0, 1.14054],
            339: [0, 0.44444, 0.085, 0, 0.82666],
            567: [0.19444, 0.44444, 0.04611, 0, 0.385],
            710: [0, 0.69444, 0.06709, 0, 0.59111],
            711: [0, 0.63194, 0.08271, 0, 0.59111],
            713: [0, 0.59444, 0.10444, 0, 0.59111],
            714: [0, 0.69444, 0.08528, 0, 0.59111],
            715: [0, 0.69444, 0, 0, 0.59111],
            728: [0, 0.69444, 0.10333, 0, 0.59111],
            729: [0, 0.69444, 0.12945, 0, 0.35555],
            730: [0, 0.69444, 0, 0, 0.94888],
            732: [0, 0.69444, 0.11472, 0, 0.59111],
            733: [0, 0.69444, 0.11472, 0, 0.59111],
            915: [0, 0.68611, 0.12903, 0, 0.69777],
            916: [0, 0.68611, 0, 0, 0.94444],
            920: [0, 0.68611, 0.09062, 0, 0.88555],
            923: [0, 0.68611, 0, 0, 0.80666],
            926: [0, 0.68611, 0.15092, 0, 0.76777],
            928: [0, 0.68611, 0.17208, 0, 0.8961],
            931: [0, 0.68611, 0.11431, 0, 0.82666],
            933: [0, 0.68611, 0.10778, 0, 0.88555],
            934: [0, 0.68611, 0.05632, 0, 0.82666],
            936: [0, 0.68611, 0.10778, 0, 0.88555],
            937: [0, 0.68611, 0.0992, 0, 0.82666],
            8211: [0, 0.44444, 0.09811, 0, 0.59111],
            8212: [0, 0.44444, 0.09811, 0, 1.18221],
            8216: [0, 0.69444, 0.12945, 0, 0.35555],
            8217: [0, 0.69444, 0.12945, 0, 0.35555],
            8220: [0, 0.69444, 0.16772, 0, 0.62055],
            8221: [0, 0.69444, 0.07939, 0, 0.62055]
          },
          "Main-Italic": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0.12417, 0, 0.30667],
            34: [0, 0.69444, 0.06961, 0, 0.51444],
            35: [0.19444, 0.69444, 0.06616, 0, 0.81777],
            37: [0.05556, 0.75, 0.13639, 0, 0.81777],
            38: [0, 0.69444, 0.09694, 0, 0.76666],
            39: [0, 0.69444, 0.12417, 0, 0.30667],
            40: [0.25, 0.75, 0.16194, 0, 0.40889],
            41: [0.25, 0.75, 0.03694, 0, 0.40889],
            42: [0, 0.75, 0.14917, 0, 0.51111],
            43: [0.05667, 0.56167, 0.03694, 0, 0.76666],
            44: [0.19444, 0.10556, 0, 0, 0.30667],
            45: [0, 0.43056, 0.02826, 0, 0.35778],
            46: [0, 0.10556, 0, 0, 0.30667],
            47: [0.25, 0.75, 0.16194, 0, 0.51111],
            48: [0, 0.64444, 0.13556, 0, 0.51111],
            49: [0, 0.64444, 0.13556, 0, 0.51111],
            50: [0, 0.64444, 0.13556, 0, 0.51111],
            51: [0, 0.64444, 0.13556, 0, 0.51111],
            52: [0.19444, 0.64444, 0.13556, 0, 0.51111],
            53: [0, 0.64444, 0.13556, 0, 0.51111],
            54: [0, 0.64444, 0.13556, 0, 0.51111],
            55: [0.19444, 0.64444, 0.13556, 0, 0.51111],
            56: [0, 0.64444, 0.13556, 0, 0.51111],
            57: [0, 0.64444, 0.13556, 0, 0.51111],
            58: [0, 0.43056, 0.0582, 0, 0.30667],
            59: [0.19444, 0.43056, 0.0582, 0, 0.30667],
            61: [-0.13313, 0.36687, 0.06616, 0, 0.76666],
            63: [0, 0.69444, 0.1225, 0, 0.51111],
            64: [0, 0.69444, 0.09597, 0, 0.76666],
            65: [0, 0.68333, 0, 0, 0.74333],
            66: [0, 0.68333, 0.10257, 0, 0.70389],
            67: [0, 0.68333, 0.14528, 0, 0.71555],
            68: [0, 0.68333, 0.09403, 0, 0.755],
            69: [0, 0.68333, 0.12028, 0, 0.67833],
            70: [0, 0.68333, 0.13305, 0, 0.65277],
            71: [0, 0.68333, 0.08722, 0, 0.77361],
            72: [0, 0.68333, 0.16389, 0, 0.74333],
            73: [0, 0.68333, 0.15806, 0, 0.38555],
            74: [0, 0.68333, 0.14028, 0, 0.525],
            75: [0, 0.68333, 0.14528, 0, 0.76888],
            76: [0, 0.68333, 0, 0, 0.62722],
            77: [0, 0.68333, 0.16389, 0, 0.89666],
            78: [0, 0.68333, 0.16389, 0, 0.74333],
            79: [0, 0.68333, 0.09403, 0, 0.76666],
            80: [0, 0.68333, 0.10257, 0, 0.67833],
            81: [0.19444, 0.68333, 0.09403, 0, 0.76666],
            82: [0, 0.68333, 0.03868, 0, 0.72944],
            83: [0, 0.68333, 0.11972, 0, 0.56222],
            84: [0, 0.68333, 0.13305, 0, 0.71555],
            85: [0, 0.68333, 0.16389, 0, 0.74333],
            86: [0, 0.68333, 0.18361, 0, 0.74333],
            87: [0, 0.68333, 0.18361, 0, 0.99888],
            88: [0, 0.68333, 0.15806, 0, 0.74333],
            89: [0, 0.68333, 0.19383, 0, 0.74333],
            90: [0, 0.68333, 0.14528, 0, 0.61333],
            91: [0.25, 0.75, 0.1875, 0, 0.30667],
            93: [0.25, 0.75, 0.10528, 0, 0.30667],
            94: [0, 0.69444, 0.06646, 0, 0.51111],
            95: [0.31, 0.12056, 0.09208, 0, 0.51111],
            97: [0, 0.43056, 0.07671, 0, 0.51111],
            98: [0, 0.69444, 0.06312, 0, 0.46],
            99: [0, 0.43056, 0.05653, 0, 0.46],
            100: [0, 0.69444, 0.10333, 0, 0.51111],
            101: [0, 0.43056, 0.07514, 0, 0.46],
            102: [0.19444, 0.69444, 0.21194, 0, 0.30667],
            103: [0.19444, 0.43056, 0.08847, 0, 0.46],
            104: [0, 0.69444, 0.07671, 0, 0.51111],
            105: [0, 0.65536, 0.1019, 0, 0.30667],
            106: [0.19444, 0.65536, 0.14467, 0, 0.30667],
            107: [0, 0.69444, 0.10764, 0, 0.46],
            108: [0, 0.69444, 0.10333, 0, 0.25555],
            109: [0, 0.43056, 0.07671, 0, 0.81777],
            110: [0, 0.43056, 0.07671, 0, 0.56222],
            111: [0, 0.43056, 0.06312, 0, 0.51111],
            112: [0.19444, 0.43056, 0.06312, 0, 0.51111],
            113: [0.19444, 0.43056, 0.08847, 0, 0.46],
            114: [0, 0.43056, 0.10764, 0, 0.42166],
            115: [0, 0.43056, 0.08208, 0, 0.40889],
            116: [0, 0.61508, 0.09486, 0, 0.33222],
            117: [0, 0.43056, 0.07671, 0, 0.53666],
            118: [0, 0.43056, 0.10764, 0, 0.46],
            119: [0, 0.43056, 0.10764, 0, 0.66444],
            120: [0, 0.43056, 0.12042, 0, 0.46389],
            121: [0.19444, 0.43056, 0.08847, 0, 0.48555],
            122: [0, 0.43056, 0.12292, 0, 0.40889],
            126: [0.35, 0.31786, 0.11585, 0, 0.51111],
            160: [0, 0, 0, 0, 0.25],
            168: [0, 0.66786, 0.10474, 0, 0.51111],
            176: [0, 0.69444, 0, 0, 0.83129],
            184: [0.17014, 0, 0, 0, 0.46],
            198: [0, 0.68333, 0.12028, 0, 0.88277],
            216: [0.04861, 0.73194, 0.09403, 0, 0.76666],
            223: [0.19444, 0.69444, 0.10514, 0, 0.53666],
            230: [0, 0.43056, 0.07514, 0, 0.71555],
            248: [0.09722, 0.52778, 0.09194, 0, 0.51111],
            338: [0, 0.68333, 0.12028, 0, 0.98499],
            339: [0, 0.43056, 0.07514, 0, 0.71555],
            710: [0, 0.69444, 0.06646, 0, 0.51111],
            711: [0, 0.62847, 0.08295, 0, 0.51111],
            713: [0, 0.56167, 0.10333, 0, 0.51111],
            714: [0, 0.69444, 0.09694, 0, 0.51111],
            715: [0, 0.69444, 0, 0, 0.51111],
            728: [0, 0.69444, 0.10806, 0, 0.51111],
            729: [0, 0.66786, 0.11752, 0, 0.30667],
            730: [0, 0.69444, 0, 0, 0.83129],
            732: [0, 0.66786, 0.11585, 0, 0.51111],
            733: [0, 0.69444, 0.1225, 0, 0.51111],
            915: [0, 0.68333, 0.13305, 0, 0.62722],
            916: [0, 0.68333, 0, 0, 0.81777],
            920: [0, 0.68333, 0.09403, 0, 0.76666],
            923: [0, 0.68333, 0, 0, 0.69222],
            926: [0, 0.68333, 0.15294, 0, 0.66444],
            928: [0, 0.68333, 0.16389, 0, 0.74333],
            931: [0, 0.68333, 0.12028, 0, 0.71555],
            933: [0, 0.68333, 0.11111, 0, 0.76666],
            934: [0, 0.68333, 0.05986, 0, 0.71555],
            936: [0, 0.68333, 0.11111, 0, 0.76666],
            937: [0, 0.68333, 0.10257, 0, 0.71555],
            8211: [0, 0.43056, 0.09208, 0, 0.51111],
            8212: [0, 0.43056, 0.09208, 0, 1.02222],
            8216: [0, 0.69444, 0.12417, 0, 0.30667],
            8217: [0, 0.69444, 0.12417, 0, 0.30667],
            8220: [0, 0.69444, 0.1685, 0, 0.51444],
            8221: [0, 0.69444, 0.06961, 0, 0.51444],
            8463: [0, 0.68889, 0, 0, 0.54028]
          },
          "Main-Regular": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0, 0, 0.27778],
            34: [0, 0.69444, 0, 0, 0.5],
            35: [0.19444, 0.69444, 0, 0, 0.83334],
            36: [0.05556, 0.75, 0, 0, 0.5],
            37: [0.05556, 0.75, 0, 0, 0.83334],
            38: [0, 0.69444, 0, 0, 0.77778],
            39: [0, 0.69444, 0, 0, 0.27778],
            40: [0.25, 0.75, 0, 0, 0.38889],
            41: [0.25, 0.75, 0, 0, 0.38889],
            42: [0, 0.75, 0, 0, 0.5],
            43: [0.08333, 0.58333, 0, 0, 0.77778],
            44: [0.19444, 0.10556, 0, 0, 0.27778],
            45: [0, 0.43056, 0, 0, 0.33333],
            46: [0, 0.10556, 0, 0, 0.27778],
            47: [0.25, 0.75, 0, 0, 0.5],
            48: [0, 0.64444, 0, 0, 0.5],
            49: [0, 0.64444, 0, 0, 0.5],
            50: [0, 0.64444, 0, 0, 0.5],
            51: [0, 0.64444, 0, 0, 0.5],
            52: [0, 0.64444, 0, 0, 0.5],
            53: [0, 0.64444, 0, 0, 0.5],
            54: [0, 0.64444, 0, 0, 0.5],
            55: [0, 0.64444, 0, 0, 0.5],
            56: [0, 0.64444, 0, 0, 0.5],
            57: [0, 0.64444, 0, 0, 0.5],
            58: [0, 0.43056, 0, 0, 0.27778],
            59: [0.19444, 0.43056, 0, 0, 0.27778],
            60: [0.0391, 0.5391, 0, 0, 0.77778],
            61: [-0.13313, 0.36687, 0, 0, 0.77778],
            62: [0.0391, 0.5391, 0, 0, 0.77778],
            63: [0, 0.69444, 0, 0, 0.47222],
            64: [0, 0.69444, 0, 0, 0.77778],
            65: [0, 0.68333, 0, 0, 0.75],
            66: [0, 0.68333, 0, 0, 0.70834],
            67: [0, 0.68333, 0, 0, 0.72222],
            68: [0, 0.68333, 0, 0, 0.76389],
            69: [0, 0.68333, 0, 0, 0.68056],
            70: [0, 0.68333, 0, 0, 0.65278],
            71: [0, 0.68333, 0, 0, 0.78472],
            72: [0, 0.68333, 0, 0, 0.75],
            73: [0, 0.68333, 0, 0, 0.36111],
            74: [0, 0.68333, 0, 0, 0.51389],
            75: [0, 0.68333, 0, 0, 0.77778],
            76: [0, 0.68333, 0, 0, 0.625],
            77: [0, 0.68333, 0, 0, 0.91667],
            78: [0, 0.68333, 0, 0, 0.75],
            79: [0, 0.68333, 0, 0, 0.77778],
            80: [0, 0.68333, 0, 0, 0.68056],
            81: [0.19444, 0.68333, 0, 0, 0.77778],
            82: [0, 0.68333, 0, 0, 0.73611],
            83: [0, 0.68333, 0, 0, 0.55556],
            84: [0, 0.68333, 0, 0, 0.72222],
            85: [0, 0.68333, 0, 0, 0.75],
            86: [0, 0.68333, 0.01389, 0, 0.75],
            87: [0, 0.68333, 0.01389, 0, 1.02778],
            88: [0, 0.68333, 0, 0, 0.75],
            89: [0, 0.68333, 0.025, 0, 0.75],
            90: [0, 0.68333, 0, 0, 0.61111],
            91: [0.25, 0.75, 0, 0, 0.27778],
            92: [0.25, 0.75, 0, 0, 0.5],
            93: [0.25, 0.75, 0, 0, 0.27778],
            94: [0, 0.69444, 0, 0, 0.5],
            95: [0.31, 0.12056, 0.02778, 0, 0.5],
            97: [0, 0.43056, 0, 0, 0.5],
            98: [0, 0.69444, 0, 0, 0.55556],
            99: [0, 0.43056, 0, 0, 0.44445],
            100: [0, 0.69444, 0, 0, 0.55556],
            101: [0, 0.43056, 0, 0, 0.44445],
            102: [0, 0.69444, 0.07778, 0, 0.30556],
            103: [0.19444, 0.43056, 0.01389, 0, 0.5],
            104: [0, 0.69444, 0, 0, 0.55556],
            105: [0, 0.66786, 0, 0, 0.27778],
            106: [0.19444, 0.66786, 0, 0, 0.30556],
            107: [0, 0.69444, 0, 0, 0.52778],
            108: [0, 0.69444, 0, 0, 0.27778],
            109: [0, 0.43056, 0, 0, 0.83334],
            110: [0, 0.43056, 0, 0, 0.55556],
            111: [0, 0.43056, 0, 0, 0.5],
            112: [0.19444, 0.43056, 0, 0, 0.55556],
            113: [0.19444, 0.43056, 0, 0, 0.52778],
            114: [0, 0.43056, 0, 0, 0.39167],
            115: [0, 0.43056, 0, 0, 0.39445],
            116: [0, 0.61508, 0, 0, 0.38889],
            117: [0, 0.43056, 0, 0, 0.55556],
            118: [0, 0.43056, 0.01389, 0, 0.52778],
            119: [0, 0.43056, 0.01389, 0, 0.72222],
            120: [0, 0.43056, 0, 0, 0.52778],
            121: [0.19444, 0.43056, 0.01389, 0, 0.52778],
            122: [0, 0.43056, 0, 0, 0.44445],
            123: [0.25, 0.75, 0, 0, 0.5],
            124: [0.25, 0.75, 0, 0, 0.27778],
            125: [0.25, 0.75, 0, 0, 0.5],
            126: [0.35, 0.31786, 0, 0, 0.5],
            160: [0, 0, 0, 0, 0.25],
            163: [0, 0.69444, 0, 0, 0.76909],
            167: [0.19444, 0.69444, 0, 0, 0.44445],
            168: [0, 0.66786, 0, 0, 0.5],
            172: [0, 0.43056, 0, 0, 0.66667],
            176: [0, 0.69444, 0, 0, 0.75],
            177: [0.08333, 0.58333, 0, 0, 0.77778],
            182: [0.19444, 0.69444, 0, 0, 0.61111],
            184: [0.17014, 0, 0, 0, 0.44445],
            198: [0, 0.68333, 0, 0, 0.90278],
            215: [0.08333, 0.58333, 0, 0, 0.77778],
            216: [0.04861, 0.73194, 0, 0, 0.77778],
            223: [0, 0.69444, 0, 0, 0.5],
            230: [0, 0.43056, 0, 0, 0.72222],
            247: [0.08333, 0.58333, 0, 0, 0.77778],
            248: [0.09722, 0.52778, 0, 0, 0.5],
            305: [0, 0.43056, 0, 0, 0.27778],
            338: [0, 0.68333, 0, 0, 1.01389],
            339: [0, 0.43056, 0, 0, 0.77778],
            567: [0.19444, 0.43056, 0, 0, 0.30556],
            710: [0, 0.69444, 0, 0, 0.5],
            711: [0, 0.62847, 0, 0, 0.5],
            713: [0, 0.56778, 0, 0, 0.5],
            714: [0, 0.69444, 0, 0, 0.5],
            715: [0, 0.69444, 0, 0, 0.5],
            728: [0, 0.69444, 0, 0, 0.5],
            729: [0, 0.66786, 0, 0, 0.27778],
            730: [0, 0.69444, 0, 0, 0.75],
            732: [0, 0.66786, 0, 0, 0.5],
            733: [0, 0.69444, 0, 0, 0.5],
            915: [0, 0.68333, 0, 0, 0.625],
            916: [0, 0.68333, 0, 0, 0.83334],
            920: [0, 0.68333, 0, 0, 0.77778],
            923: [0, 0.68333, 0, 0, 0.69445],
            926: [0, 0.68333, 0, 0, 0.66667],
            928: [0, 0.68333, 0, 0, 0.75],
            931: [0, 0.68333, 0, 0, 0.72222],
            933: [0, 0.68333, 0, 0, 0.77778],
            934: [0, 0.68333, 0, 0, 0.72222],
            936: [0, 0.68333, 0, 0, 0.77778],
            937: [0, 0.68333, 0, 0, 0.72222],
            8211: [0, 0.43056, 0.02778, 0, 0.5],
            8212: [0, 0.43056, 0.02778, 0, 1],
            8216: [0, 0.69444, 0, 0, 0.27778],
            8217: [0, 0.69444, 0, 0, 0.27778],
            8220: [0, 0.69444, 0, 0, 0.5],
            8221: [0, 0.69444, 0, 0, 0.5],
            8224: [0.19444, 0.69444, 0, 0, 0.44445],
            8225: [0.19444, 0.69444, 0, 0, 0.44445],
            8230: [0, 0.123, 0, 0, 1.172],
            8242: [0, 0.55556, 0, 0, 0.275],
            8407: [0, 0.71444, 0.15382, 0, 0.5],
            8463: [0, 0.68889, 0, 0, 0.54028],
            8465: [0, 0.69444, 0, 0, 0.72222],
            8467: [0, 0.69444, 0, 0.11111, 0.41667],
            8472: [0.19444, 0.43056, 0, 0.11111, 0.63646],
            8476: [0, 0.69444, 0, 0, 0.72222],
            8501: [0, 0.69444, 0, 0, 0.61111],
            8592: [-0.13313, 0.36687, 0, 0, 1],
            8593: [0.19444, 0.69444, 0, 0, 0.5],
            8594: [-0.13313, 0.36687, 0, 0, 1],
            8595: [0.19444, 0.69444, 0, 0, 0.5],
            8596: [-0.13313, 0.36687, 0, 0, 1],
            8597: [0.25, 0.75, 0, 0, 0.5],
            8598: [0.19444, 0.69444, 0, 0, 1],
            8599: [0.19444, 0.69444, 0, 0, 1],
            8600: [0.19444, 0.69444, 0, 0, 1],
            8601: [0.19444, 0.69444, 0, 0, 1],
            8614: [0.011, 0.511, 0, 0, 1],
            8617: [0.011, 0.511, 0, 0, 1.126],
            8618: [0.011, 0.511, 0, 0, 1.126],
            8636: [-0.13313, 0.36687, 0, 0, 1],
            8637: [-0.13313, 0.36687, 0, 0, 1],
            8640: [-0.13313, 0.36687, 0, 0, 1],
            8641: [-0.13313, 0.36687, 0, 0, 1],
            8652: [0.011, 0.671, 0, 0, 1],
            8656: [-0.13313, 0.36687, 0, 0, 1],
            8657: [0.19444, 0.69444, 0, 0, 0.61111],
            8658: [-0.13313, 0.36687, 0, 0, 1],
            8659: [0.19444, 0.69444, 0, 0, 0.61111],
            8660: [-0.13313, 0.36687, 0, 0, 1],
            8661: [0.25, 0.75, 0, 0, 0.61111],
            8704: [0, 0.69444, 0, 0, 0.55556],
            8706: [0, 0.69444, 0.05556, 0.08334, 0.5309],
            8707: [0, 0.69444, 0, 0, 0.55556],
            8709: [0.05556, 0.75, 0, 0, 0.5],
            8711: [0, 0.68333, 0, 0, 0.83334],
            8712: [0.0391, 0.5391, 0, 0, 0.66667],
            8715: [0.0391, 0.5391, 0, 0, 0.66667],
            8722: [0.08333, 0.58333, 0, 0, 0.77778],
            8723: [0.08333, 0.58333, 0, 0, 0.77778],
            8725: [0.25, 0.75, 0, 0, 0.5],
            8726: [0.25, 0.75, 0, 0, 0.5],
            8727: [-0.03472, 0.46528, 0, 0, 0.5],
            8728: [-0.05555, 0.44445, 0, 0, 0.5],
            8729: [-0.05555, 0.44445, 0, 0, 0.5],
            8730: [0.2, 0.8, 0, 0, 0.83334],
            8733: [0, 0.43056, 0, 0, 0.77778],
            8734: [0, 0.43056, 0, 0, 1],
            8736: [0, 0.69224, 0, 0, 0.72222],
            8739: [0.25, 0.75, 0, 0, 0.27778],
            8741: [0.25, 0.75, 0, 0, 0.5],
            8743: [0, 0.55556, 0, 0, 0.66667],
            8744: [0, 0.55556, 0, 0, 0.66667],
            8745: [0, 0.55556, 0, 0, 0.66667],
            8746: [0, 0.55556, 0, 0, 0.66667],
            8747: [0.19444, 0.69444, 0.11111, 0, 0.41667],
            8764: [-0.13313, 0.36687, 0, 0, 0.77778],
            8768: [0.19444, 0.69444, 0, 0, 0.27778],
            8771: [-0.03625, 0.46375, 0, 0, 0.77778],
            8773: [-0.022, 0.589, 0, 0, 0.778],
            8776: [-0.01688, 0.48312, 0, 0, 0.77778],
            8781: [-0.03625, 0.46375, 0, 0, 0.77778],
            8784: [-0.133, 0.673, 0, 0, 0.778],
            8801: [-0.03625, 0.46375, 0, 0, 0.77778],
            8804: [0.13597, 0.63597, 0, 0, 0.77778],
            8805: [0.13597, 0.63597, 0, 0, 0.77778],
            8810: [0.0391, 0.5391, 0, 0, 1],
            8811: [0.0391, 0.5391, 0, 0, 1],
            8826: [0.0391, 0.5391, 0, 0, 0.77778],
            8827: [0.0391, 0.5391, 0, 0, 0.77778],
            8834: [0.0391, 0.5391, 0, 0, 0.77778],
            8835: [0.0391, 0.5391, 0, 0, 0.77778],
            8838: [0.13597, 0.63597, 0, 0, 0.77778],
            8839: [0.13597, 0.63597, 0, 0, 0.77778],
            8846: [0, 0.55556, 0, 0, 0.66667],
            8849: [0.13597, 0.63597, 0, 0, 0.77778],
            8850: [0.13597, 0.63597, 0, 0, 0.77778],
            8851: [0, 0.55556, 0, 0, 0.66667],
            8852: [0, 0.55556, 0, 0, 0.66667],
            8853: [0.08333, 0.58333, 0, 0, 0.77778],
            8854: [0.08333, 0.58333, 0, 0, 0.77778],
            8855: [0.08333, 0.58333, 0, 0, 0.77778],
            8856: [0.08333, 0.58333, 0, 0, 0.77778],
            8857: [0.08333, 0.58333, 0, 0, 0.77778],
            8866: [0, 0.69444, 0, 0, 0.61111],
            8867: [0, 0.69444, 0, 0, 0.61111],
            8868: [0, 0.69444, 0, 0, 0.77778],
            8869: [0, 0.69444, 0, 0, 0.77778],
            8872: [0.249, 0.75, 0, 0, 0.867],
            8900: [-0.05555, 0.44445, 0, 0, 0.5],
            8901: [-0.05555, 0.44445, 0, 0, 0.27778],
            8902: [-0.03472, 0.46528, 0, 0, 0.5],
            8904: [5e-3, 0.505, 0, 0, 0.9],
            8942: [0.03, 0.903, 0, 0, 0.278],
            8943: [-0.19, 0.313, 0, 0, 1.172],
            8945: [-0.1, 0.823, 0, 0, 1.282],
            8968: [0.25, 0.75, 0, 0, 0.44445],
            8969: [0.25, 0.75, 0, 0, 0.44445],
            8970: [0.25, 0.75, 0, 0, 0.44445],
            8971: [0.25, 0.75, 0, 0, 0.44445],
            8994: [-0.14236, 0.35764, 0, 0, 1],
            8995: [-0.14236, 0.35764, 0, 0, 1],
            9136: [0.244, 0.744, 0, 0, 0.412],
            9137: [0.244, 0.745, 0, 0, 0.412],
            9651: [0.19444, 0.69444, 0, 0, 0.88889],
            9657: [-0.03472, 0.46528, 0, 0, 0.5],
            9661: [0.19444, 0.69444, 0, 0, 0.88889],
            9667: [-0.03472, 0.46528, 0, 0, 0.5],
            9711: [0.19444, 0.69444, 0, 0, 1],
            9824: [0.12963, 0.69444, 0, 0, 0.77778],
            9825: [0.12963, 0.69444, 0, 0, 0.77778],
            9826: [0.12963, 0.69444, 0, 0, 0.77778],
            9827: [0.12963, 0.69444, 0, 0, 0.77778],
            9837: [0, 0.75, 0, 0, 0.38889],
            9838: [0.19444, 0.69444, 0, 0, 0.38889],
            9839: [0.19444, 0.69444, 0, 0, 0.38889],
            10216: [0.25, 0.75, 0, 0, 0.38889],
            10217: [0.25, 0.75, 0, 0, 0.38889],
            10222: [0.244, 0.744, 0, 0, 0.412],
            10223: [0.244, 0.745, 0, 0, 0.412],
            10229: [0.011, 0.511, 0, 0, 1.609],
            10230: [0.011, 0.511, 0, 0, 1.638],
            10231: [0.011, 0.511, 0, 0, 1.859],
            10232: [0.024, 0.525, 0, 0, 1.609],
            10233: [0.024, 0.525, 0, 0, 1.638],
            10234: [0.024, 0.525, 0, 0, 1.858],
            10236: [0.011, 0.511, 0, 0, 1.638],
            10815: [0, 0.68333, 0, 0, 0.75],
            10927: [0.13597, 0.63597, 0, 0, 0.77778],
            10928: [0.13597, 0.63597, 0, 0, 0.77778],
            57376: [0.19444, 0.69444, 0, 0, 0]
          },
          "Math-BoldItalic": {
            32: [0, 0, 0, 0, 0.25],
            48: [0, 0.44444, 0, 0, 0.575],
            49: [0, 0.44444, 0, 0, 0.575],
            50: [0, 0.44444, 0, 0, 0.575],
            51: [0.19444, 0.44444, 0, 0, 0.575],
            52: [0.19444, 0.44444, 0, 0, 0.575],
            53: [0.19444, 0.44444, 0, 0, 0.575],
            54: [0, 0.64444, 0, 0, 0.575],
            55: [0.19444, 0.44444, 0, 0, 0.575],
            56: [0, 0.64444, 0, 0, 0.575],
            57: [0.19444, 0.44444, 0, 0, 0.575],
            65: [0, 0.68611, 0, 0, 0.86944],
            66: [0, 0.68611, 0.04835, 0, 0.8664],
            67: [0, 0.68611, 0.06979, 0, 0.81694],
            68: [0, 0.68611, 0.03194, 0, 0.93812],
            69: [0, 0.68611, 0.05451, 0, 0.81007],
            70: [0, 0.68611, 0.15972, 0, 0.68889],
            71: [0, 0.68611, 0, 0, 0.88673],
            72: [0, 0.68611, 0.08229, 0, 0.98229],
            73: [0, 0.68611, 0.07778, 0, 0.51111],
            74: [0, 0.68611, 0.10069, 0, 0.63125],
            75: [0, 0.68611, 0.06979, 0, 0.97118],
            76: [0, 0.68611, 0, 0, 0.75555],
            77: [0, 0.68611, 0.11424, 0, 1.14201],
            78: [0, 0.68611, 0.11424, 0, 0.95034],
            79: [0, 0.68611, 0.03194, 0, 0.83666],
            80: [0, 0.68611, 0.15972, 0, 0.72309],
            81: [0.19444, 0.68611, 0, 0, 0.86861],
            82: [0, 0.68611, 421e-5, 0, 0.87235],
            83: [0, 0.68611, 0.05382, 0, 0.69271],
            84: [0, 0.68611, 0.15972, 0, 0.63663],
            85: [0, 0.68611, 0.11424, 0, 0.80027],
            86: [0, 0.68611, 0.25555, 0, 0.67778],
            87: [0, 0.68611, 0.15972, 0, 1.09305],
            88: [0, 0.68611, 0.07778, 0, 0.94722],
            89: [0, 0.68611, 0.25555, 0, 0.67458],
            90: [0, 0.68611, 0.06979, 0, 0.77257],
            97: [0, 0.44444, 0, 0, 0.63287],
            98: [0, 0.69444, 0, 0, 0.52083],
            99: [0, 0.44444, 0, 0, 0.51342],
            100: [0, 0.69444, 0, 0, 0.60972],
            101: [0, 0.44444, 0, 0, 0.55361],
            102: [0.19444, 0.69444, 0.11042, 0, 0.56806],
            103: [0.19444, 0.44444, 0.03704, 0, 0.5449],
            104: [0, 0.69444, 0, 0, 0.66759],
            105: [0, 0.69326, 0, 0, 0.4048],
            106: [0.19444, 0.69326, 0.0622, 0, 0.47083],
            107: [0, 0.69444, 0.01852, 0, 0.6037],
            108: [0, 0.69444, 88e-4, 0, 0.34815],
            109: [0, 0.44444, 0, 0, 1.0324],
            110: [0, 0.44444, 0, 0, 0.71296],
            111: [0, 0.44444, 0, 0, 0.58472],
            112: [0.19444, 0.44444, 0, 0, 0.60092],
            113: [0.19444, 0.44444, 0.03704, 0, 0.54213],
            114: [0, 0.44444, 0.03194, 0, 0.5287],
            115: [0, 0.44444, 0, 0, 0.53125],
            116: [0, 0.63492, 0, 0, 0.41528],
            117: [0, 0.44444, 0, 0, 0.68102],
            118: [0, 0.44444, 0.03704, 0, 0.56666],
            119: [0, 0.44444, 0.02778, 0, 0.83148],
            120: [0, 0.44444, 0, 0, 0.65903],
            121: [0.19444, 0.44444, 0.03704, 0, 0.59028],
            122: [0, 0.44444, 0.04213, 0, 0.55509],
            160: [0, 0, 0, 0, 0.25],
            915: [0, 0.68611, 0.15972, 0, 0.65694],
            916: [0, 0.68611, 0, 0, 0.95833],
            920: [0, 0.68611, 0.03194, 0, 0.86722],
            923: [0, 0.68611, 0, 0, 0.80555],
            926: [0, 0.68611, 0.07458, 0, 0.84125],
            928: [0, 0.68611, 0.08229, 0, 0.98229],
            931: [0, 0.68611, 0.05451, 0, 0.88507],
            933: [0, 0.68611, 0.15972, 0, 0.67083],
            934: [0, 0.68611, 0, 0, 0.76666],
            936: [0, 0.68611, 0.11653, 0, 0.71402],
            937: [0, 0.68611, 0.04835, 0, 0.8789],
            945: [0, 0.44444, 0, 0, 0.76064],
            946: [0.19444, 0.69444, 0.03403, 0, 0.65972],
            947: [0.19444, 0.44444, 0.06389, 0, 0.59003],
            948: [0, 0.69444, 0.03819, 0, 0.52222],
            949: [0, 0.44444, 0, 0, 0.52882],
            950: [0.19444, 0.69444, 0.06215, 0, 0.50833],
            951: [0.19444, 0.44444, 0.03704, 0, 0.6],
            952: [0, 0.69444, 0.03194, 0, 0.5618],
            953: [0, 0.44444, 0, 0, 0.41204],
            954: [0, 0.44444, 0, 0, 0.66759],
            955: [0, 0.69444, 0, 0, 0.67083],
            956: [0.19444, 0.44444, 0, 0, 0.70787],
            957: [0, 0.44444, 0.06898, 0, 0.57685],
            958: [0.19444, 0.69444, 0.03021, 0, 0.50833],
            959: [0, 0.44444, 0, 0, 0.58472],
            960: [0, 0.44444, 0.03704, 0, 0.68241],
            961: [0.19444, 0.44444, 0, 0, 0.6118],
            962: [0.09722, 0.44444, 0.07917, 0, 0.42361],
            963: [0, 0.44444, 0.03704, 0, 0.68588],
            964: [0, 0.44444, 0.13472, 0, 0.52083],
            965: [0, 0.44444, 0.03704, 0, 0.63055],
            966: [0.19444, 0.44444, 0, 0, 0.74722],
            967: [0.19444, 0.44444, 0, 0, 0.71805],
            968: [0.19444, 0.69444, 0.03704, 0, 0.75833],
            969: [0, 0.44444, 0.03704, 0, 0.71782],
            977: [0, 0.69444, 0, 0, 0.69155],
            981: [0.19444, 0.69444, 0, 0, 0.7125],
            982: [0, 0.44444, 0.03194, 0, 0.975],
            1009: [0.19444, 0.44444, 0, 0, 0.6118],
            1013: [0, 0.44444, 0, 0, 0.48333],
            57649: [0, 0.44444, 0, 0, 0.39352],
            57911: [0.19444, 0.44444, 0, 0, 0.43889]
          },
          "Math-Italic": {
            32: [0, 0, 0, 0, 0.25],
            48: [0, 0.43056, 0, 0, 0.5],
            49: [0, 0.43056, 0, 0, 0.5],
            50: [0, 0.43056, 0, 0, 0.5],
            51: [0.19444, 0.43056, 0, 0, 0.5],
            52: [0.19444, 0.43056, 0, 0, 0.5],
            53: [0.19444, 0.43056, 0, 0, 0.5],
            54: [0, 0.64444, 0, 0, 0.5],
            55: [0.19444, 0.43056, 0, 0, 0.5],
            56: [0, 0.64444, 0, 0, 0.5],
            57: [0.19444, 0.43056, 0, 0, 0.5],
            65: [0, 0.68333, 0, 0.13889, 0.75],
            66: [0, 0.68333, 0.05017, 0.08334, 0.75851],
            67: [0, 0.68333, 0.07153, 0.08334, 0.71472],
            68: [0, 0.68333, 0.02778, 0.05556, 0.82792],
            69: [0, 0.68333, 0.05764, 0.08334, 0.7382],
            70: [0, 0.68333, 0.13889, 0.08334, 0.64306],
            71: [0, 0.68333, 0, 0.08334, 0.78625],
            72: [0, 0.68333, 0.08125, 0.05556, 0.83125],
            73: [0, 0.68333, 0.07847, 0.11111, 0.43958],
            74: [0, 0.68333, 0.09618, 0.16667, 0.55451],
            75: [0, 0.68333, 0.07153, 0.05556, 0.84931],
            76: [0, 0.68333, 0, 0.02778, 0.68056],
            77: [0, 0.68333, 0.10903, 0.08334, 0.97014],
            78: [0, 0.68333, 0.10903, 0.08334, 0.80347],
            79: [0, 0.68333, 0.02778, 0.08334, 0.76278],
            80: [0, 0.68333, 0.13889, 0.08334, 0.64201],
            81: [0.19444, 0.68333, 0, 0.08334, 0.79056],
            82: [0, 0.68333, 773e-5, 0.08334, 0.75929],
            83: [0, 0.68333, 0.05764, 0.08334, 0.6132],
            84: [0, 0.68333, 0.13889, 0.08334, 0.58438],
            85: [0, 0.68333, 0.10903, 0.02778, 0.68278],
            86: [0, 0.68333, 0.22222, 0, 0.58333],
            87: [0, 0.68333, 0.13889, 0, 0.94445],
            88: [0, 0.68333, 0.07847, 0.08334, 0.82847],
            89: [0, 0.68333, 0.22222, 0, 0.58056],
            90: [0, 0.68333, 0.07153, 0.08334, 0.68264],
            97: [0, 0.43056, 0, 0, 0.52859],
            98: [0, 0.69444, 0, 0, 0.42917],
            99: [0, 0.43056, 0, 0.05556, 0.43276],
            100: [0, 0.69444, 0, 0.16667, 0.52049],
            101: [0, 0.43056, 0, 0.05556, 0.46563],
            102: [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
            103: [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
            104: [0, 0.69444, 0, 0, 0.57616],
            105: [0, 0.65952, 0, 0, 0.34451],
            106: [0.19444, 0.65952, 0.05724, 0, 0.41181],
            107: [0, 0.69444, 0.03148, 0, 0.5206],
            108: [0, 0.69444, 0.01968, 0.08334, 0.29838],
            109: [0, 0.43056, 0, 0, 0.87801],
            110: [0, 0.43056, 0, 0, 0.60023],
            111: [0, 0.43056, 0, 0.05556, 0.48472],
            112: [0.19444, 0.43056, 0, 0.08334, 0.50313],
            113: [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
            114: [0, 0.43056, 0.02778, 0.05556, 0.45116],
            115: [0, 0.43056, 0, 0.05556, 0.46875],
            116: [0, 0.61508, 0, 0.08334, 0.36111],
            117: [0, 0.43056, 0, 0.02778, 0.57246],
            118: [0, 0.43056, 0.03588, 0.02778, 0.48472],
            119: [0, 0.43056, 0.02691, 0.08334, 0.71592],
            120: [0, 0.43056, 0, 0.02778, 0.57153],
            121: [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
            122: [0, 0.43056, 0.04398, 0.05556, 0.46505],
            160: [0, 0, 0, 0, 0.25],
            915: [0, 0.68333, 0.13889, 0.08334, 0.61528],
            916: [0, 0.68333, 0, 0.16667, 0.83334],
            920: [0, 0.68333, 0.02778, 0.08334, 0.76278],
            923: [0, 0.68333, 0, 0.16667, 0.69445],
            926: [0, 0.68333, 0.07569, 0.08334, 0.74236],
            928: [0, 0.68333, 0.08125, 0.05556, 0.83125],
            931: [0, 0.68333, 0.05764, 0.08334, 0.77986],
            933: [0, 0.68333, 0.13889, 0.05556, 0.58333],
            934: [0, 0.68333, 0, 0.08334, 0.66667],
            936: [0, 0.68333, 0.11, 0.05556, 0.61222],
            937: [0, 0.68333, 0.05017, 0.08334, 0.7724],
            945: [0, 0.43056, 37e-4, 0.02778, 0.6397],
            946: [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
            947: [0.19444, 0.43056, 0.05556, 0, 0.51773],
            948: [0, 0.69444, 0.03785, 0.05556, 0.44444],
            949: [0, 0.43056, 0, 0.08334, 0.46632],
            950: [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
            951: [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
            952: [0, 0.69444, 0.02778, 0.08334, 0.46944],
            953: [0, 0.43056, 0, 0.05556, 0.35394],
            954: [0, 0.43056, 0, 0, 0.57616],
            955: [0, 0.69444, 0, 0, 0.58334],
            956: [0.19444, 0.43056, 0, 0.02778, 0.60255],
            957: [0, 0.43056, 0.06366, 0.02778, 0.49398],
            958: [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
            959: [0, 0.43056, 0, 0.05556, 0.48472],
            960: [0, 0.43056, 0.03588, 0, 0.57003],
            961: [0.19444, 0.43056, 0, 0.08334, 0.51702],
            962: [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
            963: [0, 0.43056, 0.03588, 0, 0.57141],
            964: [0, 0.43056, 0.1132, 0.02778, 0.43715],
            965: [0, 0.43056, 0.03588, 0.02778, 0.54028],
            966: [0.19444, 0.43056, 0, 0.08334, 0.65417],
            967: [0.19444, 0.43056, 0, 0.05556, 0.62569],
            968: [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
            969: [0, 0.43056, 0.03588, 0, 0.62245],
            977: [0, 0.69444, 0, 0.08334, 0.59144],
            981: [0.19444, 0.69444, 0, 0.08334, 0.59583],
            982: [0, 0.43056, 0.02778, 0, 0.82813],
            1009: [0.19444, 0.43056, 0, 0.08334, 0.51702],
            1013: [0, 0.43056, 0, 0.05556, 0.4059],
            57649: [0, 0.43056, 0, 0.02778, 0.32246],
            57911: [0.19444, 0.43056, 0, 0.08334, 0.38403]
          },
          "SansSerif-Bold": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0, 0, 0.36667],
            34: [0, 0.69444, 0, 0, 0.55834],
            35: [0.19444, 0.69444, 0, 0, 0.91667],
            36: [0.05556, 0.75, 0, 0, 0.55],
            37: [0.05556, 0.75, 0, 0, 1.02912],
            38: [0, 0.69444, 0, 0, 0.83056],
            39: [0, 0.69444, 0, 0, 0.30556],
            40: [0.25, 0.75, 0, 0, 0.42778],
            41: [0.25, 0.75, 0, 0, 0.42778],
            42: [0, 0.75, 0, 0, 0.55],
            43: [0.11667, 0.61667, 0, 0, 0.85556],
            44: [0.10556, 0.13056, 0, 0, 0.30556],
            45: [0, 0.45833, 0, 0, 0.36667],
            46: [0, 0.13056, 0, 0, 0.30556],
            47: [0.25, 0.75, 0, 0, 0.55],
            48: [0, 0.69444, 0, 0, 0.55],
            49: [0, 0.69444, 0, 0, 0.55],
            50: [0, 0.69444, 0, 0, 0.55],
            51: [0, 0.69444, 0, 0, 0.55],
            52: [0, 0.69444, 0, 0, 0.55],
            53: [0, 0.69444, 0, 0, 0.55],
            54: [0, 0.69444, 0, 0, 0.55],
            55: [0, 0.69444, 0, 0, 0.55],
            56: [0, 0.69444, 0, 0, 0.55],
            57: [0, 0.69444, 0, 0, 0.55],
            58: [0, 0.45833, 0, 0, 0.30556],
            59: [0.10556, 0.45833, 0, 0, 0.30556],
            61: [-0.09375, 0.40625, 0, 0, 0.85556],
            63: [0, 0.69444, 0, 0, 0.51945],
            64: [0, 0.69444, 0, 0, 0.73334],
            65: [0, 0.69444, 0, 0, 0.73334],
            66: [0, 0.69444, 0, 0, 0.73334],
            67: [0, 0.69444, 0, 0, 0.70278],
            68: [0, 0.69444, 0, 0, 0.79445],
            69: [0, 0.69444, 0, 0, 0.64167],
            70: [0, 0.69444, 0, 0, 0.61111],
            71: [0, 0.69444, 0, 0, 0.73334],
            72: [0, 0.69444, 0, 0, 0.79445],
            73: [0, 0.69444, 0, 0, 0.33056],
            74: [0, 0.69444, 0, 0, 0.51945],
            75: [0, 0.69444, 0, 0, 0.76389],
            76: [0, 0.69444, 0, 0, 0.58056],
            77: [0, 0.69444, 0, 0, 0.97778],
            78: [0, 0.69444, 0, 0, 0.79445],
            79: [0, 0.69444, 0, 0, 0.79445],
            80: [0, 0.69444, 0, 0, 0.70278],
            81: [0.10556, 0.69444, 0, 0, 0.79445],
            82: [0, 0.69444, 0, 0, 0.70278],
            83: [0, 0.69444, 0, 0, 0.61111],
            84: [0, 0.69444, 0, 0, 0.73334],
            85: [0, 0.69444, 0, 0, 0.76389],
            86: [0, 0.69444, 0.01528, 0, 0.73334],
            87: [0, 0.69444, 0.01528, 0, 1.03889],
            88: [0, 0.69444, 0, 0, 0.73334],
            89: [0, 0.69444, 0.0275, 0, 0.73334],
            90: [0, 0.69444, 0, 0, 0.67223],
            91: [0.25, 0.75, 0, 0, 0.34306],
            93: [0.25, 0.75, 0, 0, 0.34306],
            94: [0, 0.69444, 0, 0, 0.55],
            95: [0.35, 0.10833, 0.03056, 0, 0.55],
            97: [0, 0.45833, 0, 0, 0.525],
            98: [0, 0.69444, 0, 0, 0.56111],
            99: [0, 0.45833, 0, 0, 0.48889],
            100: [0, 0.69444, 0, 0, 0.56111],
            101: [0, 0.45833, 0, 0, 0.51111],
            102: [0, 0.69444, 0.07639, 0, 0.33611],
            103: [0.19444, 0.45833, 0.01528, 0, 0.55],
            104: [0, 0.69444, 0, 0, 0.56111],
            105: [0, 0.69444, 0, 0, 0.25556],
            106: [0.19444, 0.69444, 0, 0, 0.28611],
            107: [0, 0.69444, 0, 0, 0.53056],
            108: [0, 0.69444, 0, 0, 0.25556],
            109: [0, 0.45833, 0, 0, 0.86667],
            110: [0, 0.45833, 0, 0, 0.56111],
            111: [0, 0.45833, 0, 0, 0.55],
            112: [0.19444, 0.45833, 0, 0, 0.56111],
            113: [0.19444, 0.45833, 0, 0, 0.56111],
            114: [0, 0.45833, 0.01528, 0, 0.37222],
            115: [0, 0.45833, 0, 0, 0.42167],
            116: [0, 0.58929, 0, 0, 0.40417],
            117: [0, 0.45833, 0, 0, 0.56111],
            118: [0, 0.45833, 0.01528, 0, 0.5],
            119: [0, 0.45833, 0.01528, 0, 0.74445],
            120: [0, 0.45833, 0, 0, 0.5],
            121: [0.19444, 0.45833, 0.01528, 0, 0.5],
            122: [0, 0.45833, 0, 0, 0.47639],
            126: [0.35, 0.34444, 0, 0, 0.55],
            160: [0, 0, 0, 0, 0.25],
            168: [0, 0.69444, 0, 0, 0.55],
            176: [0, 0.69444, 0, 0, 0.73334],
            180: [0, 0.69444, 0, 0, 0.55],
            184: [0.17014, 0, 0, 0, 0.48889],
            305: [0, 0.45833, 0, 0, 0.25556],
            567: [0.19444, 0.45833, 0, 0, 0.28611],
            710: [0, 0.69444, 0, 0, 0.55],
            711: [0, 0.63542, 0, 0, 0.55],
            713: [0, 0.63778, 0, 0, 0.55],
            728: [0, 0.69444, 0, 0, 0.55],
            729: [0, 0.69444, 0, 0, 0.30556],
            730: [0, 0.69444, 0, 0, 0.73334],
            732: [0, 0.69444, 0, 0, 0.55],
            733: [0, 0.69444, 0, 0, 0.55],
            915: [0, 0.69444, 0, 0, 0.58056],
            916: [0, 0.69444, 0, 0, 0.91667],
            920: [0, 0.69444, 0, 0, 0.85556],
            923: [0, 0.69444, 0, 0, 0.67223],
            926: [0, 0.69444, 0, 0, 0.73334],
            928: [0, 0.69444, 0, 0, 0.79445],
            931: [0, 0.69444, 0, 0, 0.79445],
            933: [0, 0.69444, 0, 0, 0.85556],
            934: [0, 0.69444, 0, 0, 0.79445],
            936: [0, 0.69444, 0, 0, 0.85556],
            937: [0, 0.69444, 0, 0, 0.79445],
            8211: [0, 0.45833, 0.03056, 0, 0.55],
            8212: [0, 0.45833, 0.03056, 0, 1.10001],
            8216: [0, 0.69444, 0, 0, 0.30556],
            8217: [0, 0.69444, 0, 0, 0.30556],
            8220: [0, 0.69444, 0, 0, 0.55834],
            8221: [0, 0.69444, 0, 0, 0.55834]
          },
          "SansSerif-Italic": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0.05733, 0, 0.31945],
            34: [0, 0.69444, 316e-5, 0, 0.5],
            35: [0.19444, 0.69444, 0.05087, 0, 0.83334],
            36: [0.05556, 0.75, 0.11156, 0, 0.5],
            37: [0.05556, 0.75, 0.03126, 0, 0.83334],
            38: [0, 0.69444, 0.03058, 0, 0.75834],
            39: [0, 0.69444, 0.07816, 0, 0.27778],
            40: [0.25, 0.75, 0.13164, 0, 0.38889],
            41: [0.25, 0.75, 0.02536, 0, 0.38889],
            42: [0, 0.75, 0.11775, 0, 0.5],
            43: [0.08333, 0.58333, 0.02536, 0, 0.77778],
            44: [0.125, 0.08333, 0, 0, 0.27778],
            45: [0, 0.44444, 0.01946, 0, 0.33333],
            46: [0, 0.08333, 0, 0, 0.27778],
            47: [0.25, 0.75, 0.13164, 0, 0.5],
            48: [0, 0.65556, 0.11156, 0, 0.5],
            49: [0, 0.65556, 0.11156, 0, 0.5],
            50: [0, 0.65556, 0.11156, 0, 0.5],
            51: [0, 0.65556, 0.11156, 0, 0.5],
            52: [0, 0.65556, 0.11156, 0, 0.5],
            53: [0, 0.65556, 0.11156, 0, 0.5],
            54: [0, 0.65556, 0.11156, 0, 0.5],
            55: [0, 0.65556, 0.11156, 0, 0.5],
            56: [0, 0.65556, 0.11156, 0, 0.5],
            57: [0, 0.65556, 0.11156, 0, 0.5],
            58: [0, 0.44444, 0.02502, 0, 0.27778],
            59: [0.125, 0.44444, 0.02502, 0, 0.27778],
            61: [-0.13, 0.37, 0.05087, 0, 0.77778],
            63: [0, 0.69444, 0.11809, 0, 0.47222],
            64: [0, 0.69444, 0.07555, 0, 0.66667],
            65: [0, 0.69444, 0, 0, 0.66667],
            66: [0, 0.69444, 0.08293, 0, 0.66667],
            67: [0, 0.69444, 0.11983, 0, 0.63889],
            68: [0, 0.69444, 0.07555, 0, 0.72223],
            69: [0, 0.69444, 0.11983, 0, 0.59722],
            70: [0, 0.69444, 0.13372, 0, 0.56945],
            71: [0, 0.69444, 0.11983, 0, 0.66667],
            72: [0, 0.69444, 0.08094, 0, 0.70834],
            73: [0, 0.69444, 0.13372, 0, 0.27778],
            74: [0, 0.69444, 0.08094, 0, 0.47222],
            75: [0, 0.69444, 0.11983, 0, 0.69445],
            76: [0, 0.69444, 0, 0, 0.54167],
            77: [0, 0.69444, 0.08094, 0, 0.875],
            78: [0, 0.69444, 0.08094, 0, 0.70834],
            79: [0, 0.69444, 0.07555, 0, 0.73611],
            80: [0, 0.69444, 0.08293, 0, 0.63889],
            81: [0.125, 0.69444, 0.07555, 0, 0.73611],
            82: [0, 0.69444, 0.08293, 0, 0.64584],
            83: [0, 0.69444, 0.09205, 0, 0.55556],
            84: [0, 0.69444, 0.13372, 0, 0.68056],
            85: [0, 0.69444, 0.08094, 0, 0.6875],
            86: [0, 0.69444, 0.1615, 0, 0.66667],
            87: [0, 0.69444, 0.1615, 0, 0.94445],
            88: [0, 0.69444, 0.13372, 0, 0.66667],
            89: [0, 0.69444, 0.17261, 0, 0.66667],
            90: [0, 0.69444, 0.11983, 0, 0.61111],
            91: [0.25, 0.75, 0.15942, 0, 0.28889],
            93: [0.25, 0.75, 0.08719, 0, 0.28889],
            94: [0, 0.69444, 0.0799, 0, 0.5],
            95: [0.35, 0.09444, 0.08616, 0, 0.5],
            97: [0, 0.44444, 981e-5, 0, 0.48056],
            98: [0, 0.69444, 0.03057, 0, 0.51667],
            99: [0, 0.44444, 0.08336, 0, 0.44445],
            100: [0, 0.69444, 0.09483, 0, 0.51667],
            101: [0, 0.44444, 0.06778, 0, 0.44445],
            102: [0, 0.69444, 0.21705, 0, 0.30556],
            103: [0.19444, 0.44444, 0.10836, 0, 0.5],
            104: [0, 0.69444, 0.01778, 0, 0.51667],
            105: [0, 0.67937, 0.09718, 0, 0.23889],
            106: [0.19444, 0.67937, 0.09162, 0, 0.26667],
            107: [0, 0.69444, 0.08336, 0, 0.48889],
            108: [0, 0.69444, 0.09483, 0, 0.23889],
            109: [0, 0.44444, 0.01778, 0, 0.79445],
            110: [0, 0.44444, 0.01778, 0, 0.51667],
            111: [0, 0.44444, 0.06613, 0, 0.5],
            112: [0.19444, 0.44444, 0.0389, 0, 0.51667],
            113: [0.19444, 0.44444, 0.04169, 0, 0.51667],
            114: [0, 0.44444, 0.10836, 0, 0.34167],
            115: [0, 0.44444, 0.0778, 0, 0.38333],
            116: [0, 0.57143, 0.07225, 0, 0.36111],
            117: [0, 0.44444, 0.04169, 0, 0.51667],
            118: [0, 0.44444, 0.10836, 0, 0.46111],
            119: [0, 0.44444, 0.10836, 0, 0.68334],
            120: [0, 0.44444, 0.09169, 0, 0.46111],
            121: [0.19444, 0.44444, 0.10836, 0, 0.46111],
            122: [0, 0.44444, 0.08752, 0, 0.43472],
            126: [0.35, 0.32659, 0.08826, 0, 0.5],
            160: [0, 0, 0, 0, 0.25],
            168: [0, 0.67937, 0.06385, 0, 0.5],
            176: [0, 0.69444, 0, 0, 0.73752],
            184: [0.17014, 0, 0, 0, 0.44445],
            305: [0, 0.44444, 0.04169, 0, 0.23889],
            567: [0.19444, 0.44444, 0.04169, 0, 0.26667],
            710: [0, 0.69444, 0.0799, 0, 0.5],
            711: [0, 0.63194, 0.08432, 0, 0.5],
            713: [0, 0.60889, 0.08776, 0, 0.5],
            714: [0, 0.69444, 0.09205, 0, 0.5],
            715: [0, 0.69444, 0, 0, 0.5],
            728: [0, 0.69444, 0.09483, 0, 0.5],
            729: [0, 0.67937, 0.07774, 0, 0.27778],
            730: [0, 0.69444, 0, 0, 0.73752],
            732: [0, 0.67659, 0.08826, 0, 0.5],
            733: [0, 0.69444, 0.09205, 0, 0.5],
            915: [0, 0.69444, 0.13372, 0, 0.54167],
            916: [0, 0.69444, 0, 0, 0.83334],
            920: [0, 0.69444, 0.07555, 0, 0.77778],
            923: [0, 0.69444, 0, 0, 0.61111],
            926: [0, 0.69444, 0.12816, 0, 0.66667],
            928: [0, 0.69444, 0.08094, 0, 0.70834],
            931: [0, 0.69444, 0.11983, 0, 0.72222],
            933: [0, 0.69444, 0.09031, 0, 0.77778],
            934: [0, 0.69444, 0.04603, 0, 0.72222],
            936: [0, 0.69444, 0.09031, 0, 0.77778],
            937: [0, 0.69444, 0.08293, 0, 0.72222],
            8211: [0, 0.44444, 0.08616, 0, 0.5],
            8212: [0, 0.44444, 0.08616, 0, 1],
            8216: [0, 0.69444, 0.07816, 0, 0.27778],
            8217: [0, 0.69444, 0.07816, 0, 0.27778],
            8220: [0, 0.69444, 0.14205, 0, 0.5],
            8221: [0, 0.69444, 316e-5, 0, 0.5]
          },
          "SansSerif-Regular": {
            32: [0, 0, 0, 0, 0.25],
            33: [0, 0.69444, 0, 0, 0.31945],
            34: [0, 0.69444, 0, 0, 0.5],
            35: [0.19444, 0.69444, 0, 0, 0.83334],
            36: [0.05556, 0.75, 0, 0, 0.5],
            37: [0.05556, 0.75, 0, 0, 0.83334],
            38: [0, 0.69444, 0, 0, 0.75834],
            39: [0, 0.69444, 0, 0, 0.27778],
            40: [0.25, 0.75, 0, 0, 0.38889],
            41: [0.25, 0.75, 0, 0, 0.38889],
            42: [0, 0.75, 0, 0, 0.5],
            43: [0.08333, 0.58333, 0, 0, 0.77778],
            44: [0.125, 0.08333, 0, 0, 0.27778],
            45: [0, 0.44444, 0, 0, 0.33333],
            46: [0, 0.08333, 0, 0, 0.27778],
            47: [0.25, 0.75, 0, 0, 0.5],
            48: [0, 0.65556, 0, 0, 0.5],
            49: [0, 0.65556, 0, 0, 0.5],
            50: [0, 0.65556, 0, 0, 0.5],
            51: [0, 0.65556, 0, 0, 0.5],
            52: [0, 0.65556, 0, 0, 0.5],
            53: [0, 0.65556, 0, 0, 0.5],
            54: [0, 0.65556, 0, 0, 0.5],
            55: [0, 0.65556, 0, 0, 0.5],
            56: [0, 0.65556, 0, 0, 0.5],
            57: [0, 0.65556, 0, 0, 0.5],
            58: [0, 0.44444, 0, 0, 0.27778],
            59: [0.125, 0.44444, 0, 0, 0.27778],
            61: [-0.13, 0.37, 0, 0, 0.77778],
            63: [0, 0.69444, 0, 0, 0.47222],
            64: [0, 0.69444, 0, 0, 0.66667],
            65: [0, 0.69444, 0, 0, 0.66667],
            66: [0, 0.69444, 0, 0, 0.66667],
            67: [0, 0.69444, 0, 0, 0.63889],
            68: [0, 0.69444, 0, 0, 0.72223],
            69: [0, 0.69444, 0, 0, 0.59722],
            70: [0, 0.69444, 0, 0, 0.56945],
            71: [0, 0.69444, 0, 0, 0.66667],
            72: [0, 0.69444, 0, 0, 0.70834],
            73: [0, 0.69444, 0, 0, 0.27778],
            74: [0, 0.69444, 0, 0, 0.47222],
            75: [0, 0.69444, 0, 0, 0.69445],
            76: [0, 0.69444, 0, 0, 0.54167],
            77: [0, 0.69444, 0, 0, 0.875],
            78: [0, 0.69444, 0, 0, 0.70834],
            79: [0, 0.69444, 0, 0, 0.73611],
            80: [0, 0.69444, 0, 0, 0.63889],
            81: [0.125, 0.69444, 0, 0, 0.73611],
            82: [0, 0.69444, 0, 0, 0.64584],
            83: [0, 0.69444, 0, 0, 0.55556],
            84: [0, 0.69444, 0, 0, 0.68056],
            85: [0, 0.69444, 0, 0, 0.6875],
            86: [0, 0.69444, 0.01389, 0, 0.66667],
            87: [0, 0.69444, 0.01389, 0, 0.94445],
            88: [0, 0.69444, 0, 0, 0.66667],
            89: [0, 0.69444, 0.025, 0, 0.66667],
            90: [0, 0.69444, 0, 0, 0.61111],
            91: [0.25, 0.75, 0, 0, 0.28889],
            93: [0.25, 0.75, 0, 0, 0.28889],
            94: [0, 0.69444, 0, 0, 0.5],
            95: [0.35, 0.09444, 0.02778, 0, 0.5],
            97: [0, 0.44444, 0, 0, 0.48056],
            98: [0, 0.69444, 0, 0, 0.51667],
            99: [0, 0.44444, 0, 0, 0.44445],
            100: [0, 0.69444, 0, 0, 0.51667],
            101: [0, 0.44444, 0, 0, 0.44445],
            102: [0, 0.69444, 0.06944, 0, 0.30556],
            103: [0.19444, 0.44444, 0.01389, 0, 0.5],
            104: [0, 0.69444, 0, 0, 0.51667],
            105: [0, 0.67937, 0, 0, 0.23889],
            106: [0.19444, 0.67937, 0, 0, 0.26667],
            107: [0, 0.69444, 0, 0, 0.48889],
            108: [0, 0.69444, 0, 0, 0.23889],
            109: [0, 0.44444, 0, 0, 0.79445],
            110: [0, 0.44444, 0, 0, 0.51667],
            111: [0, 0.44444, 0, 0, 0.5],
            112: [0.19444, 0.44444, 0, 0, 0.51667],
            113: [0.19444, 0.44444, 0, 0, 0.51667],
            114: [0, 0.44444, 0.01389, 0, 0.34167],
            115: [0, 0.44444, 0, 0, 0.38333],
            116: [0, 0.57143, 0, 0, 0.36111],
            117: [0, 0.44444, 0, 0, 0.51667],
            118: [0, 0.44444, 0.01389, 0, 0.46111],
            119: [0, 0.44444, 0.01389, 0, 0.68334],
            120: [0, 0.44444, 0, 0, 0.46111],
            121: [0.19444, 0.44444, 0.01389, 0, 0.46111],
            122: [0, 0.44444, 0, 0, 0.43472],
            126: [0.35, 0.32659, 0, 0, 0.5],
            160: [0, 0, 0, 0, 0.25],
            168: [0, 0.67937, 0, 0, 0.5],
            176: [0, 0.69444, 0, 0, 0.66667],
            184: [0.17014, 0, 0, 0, 0.44445],
            305: [0, 0.44444, 0, 0, 0.23889],
            567: [0.19444, 0.44444, 0, 0, 0.26667],
            710: [0, 0.69444, 0, 0, 0.5],
            711: [0, 0.63194, 0, 0, 0.5],
            713: [0, 0.60889, 0, 0, 0.5],
            714: [0, 0.69444, 0, 0, 0.5],
            715: [0, 0.69444, 0, 0, 0.5],
            728: [0, 0.69444, 0, 0, 0.5],
            729: [0, 0.67937, 0, 0, 0.27778],
            730: [0, 0.69444, 0, 0, 0.66667],
            732: [0, 0.67659, 0, 0, 0.5],
            733: [0, 0.69444, 0, 0, 0.5],
            915: [0, 0.69444, 0, 0, 0.54167],
            916: [0, 0.69444, 0, 0, 0.83334],
            920: [0, 0.69444, 0, 0, 0.77778],
            923: [0, 0.69444, 0, 0, 0.61111],
            926: [0, 0.69444, 0, 0, 0.66667],
            928: [0, 0.69444, 0, 0, 0.70834],
            931: [0, 0.69444, 0, 0, 0.72222],
            933: [0, 0.69444, 0, 0, 0.77778],
            934: [0, 0.69444, 0, 0, 0.72222],
            936: [0, 0.69444, 0, 0, 0.77778],
            937: [0, 0.69444, 0, 0, 0.72222],
            8211: [0, 0.44444, 0.02778, 0, 0.5],
            8212: [0, 0.44444, 0.02778, 0, 1],
            8216: [0, 0.69444, 0, 0, 0.27778],
            8217: [0, 0.69444, 0, 0, 0.27778],
            8220: [0, 0.69444, 0, 0, 0.5],
            8221: [0, 0.69444, 0, 0, 0.5]
          },
          "Script-Regular": {
            32: [0, 0, 0, 0, 0.25],
            65: [0, 0.7, 0.22925, 0, 0.80253],
            66: [0, 0.7, 0.04087, 0, 0.90757],
            67: [0, 0.7, 0.1689, 0, 0.66619],
            68: [0, 0.7, 0.09371, 0, 0.77443],
            69: [0, 0.7, 0.18583, 0, 0.56162],
            70: [0, 0.7, 0.13634, 0, 0.89544],
            71: [0, 0.7, 0.17322, 0, 0.60961],
            72: [0, 0.7, 0.29694, 0, 0.96919],
            73: [0, 0.7, 0.19189, 0, 0.80907],
            74: [0.27778, 0.7, 0.19189, 0, 1.05159],
            75: [0, 0.7, 0.31259, 0, 0.91364],
            76: [0, 0.7, 0.19189, 0, 0.87373],
            77: [0, 0.7, 0.15981, 0, 1.08031],
            78: [0, 0.7, 0.3525, 0, 0.9015],
            79: [0, 0.7, 0.08078, 0, 0.73787],
            80: [0, 0.7, 0.08078, 0, 1.01262],
            81: [0, 0.7, 0.03305, 0, 0.88282],
            82: [0, 0.7, 0.06259, 0, 0.85],
            83: [0, 0.7, 0.19189, 0, 0.86767],
            84: [0, 0.7, 0.29087, 0, 0.74697],
            85: [0, 0.7, 0.25815, 0, 0.79996],
            86: [0, 0.7, 0.27523, 0, 0.62204],
            87: [0, 0.7, 0.27523, 0, 0.80532],
            88: [0, 0.7, 0.26006, 0, 0.94445],
            89: [0, 0.7, 0.2939, 0, 0.70961],
            90: [0, 0.7, 0.24037, 0, 0.8212],
            160: [0, 0, 0, 0, 0.25]
          },
          "Size1-Regular": {
            32: [0, 0, 0, 0, 0.25],
            40: [0.35001, 0.85, 0, 0, 0.45834],
            41: [0.35001, 0.85, 0, 0, 0.45834],
            47: [0.35001, 0.85, 0, 0, 0.57778],
            91: [0.35001, 0.85, 0, 0, 0.41667],
            92: [0.35001, 0.85, 0, 0, 0.57778],
            93: [0.35001, 0.85, 0, 0, 0.41667],
            123: [0.35001, 0.85, 0, 0, 0.58334],
            125: [0.35001, 0.85, 0, 0, 0.58334],
            160: [0, 0, 0, 0, 0.25],
            710: [0, 0.72222, 0, 0, 0.55556],
            732: [0, 0.72222, 0, 0, 0.55556],
            770: [0, 0.72222, 0, 0, 0.55556],
            771: [0, 0.72222, 0, 0, 0.55556],
            8214: [-99e-5, 0.601, 0, 0, 0.77778],
            8593: [1e-5, 0.6, 0, 0, 0.66667],
            8595: [1e-5, 0.6, 0, 0, 0.66667],
            8657: [1e-5, 0.6, 0, 0, 0.77778],
            8659: [1e-5, 0.6, 0, 0, 0.77778],
            8719: [0.25001, 0.75, 0, 0, 0.94445],
            8720: [0.25001, 0.75, 0, 0, 0.94445],
            8721: [0.25001, 0.75, 0, 0, 1.05556],
            8730: [0.35001, 0.85, 0, 0, 1],
            8739: [-599e-5, 0.606, 0, 0, 0.33333],
            8741: [-599e-5, 0.606, 0, 0, 0.55556],
            8747: [0.30612, 0.805, 0.19445, 0, 0.47222],
            8748: [0.306, 0.805, 0.19445, 0, 0.47222],
            8749: [0.306, 0.805, 0.19445, 0, 0.47222],
            8750: [0.30612, 0.805, 0.19445, 0, 0.47222],
            8896: [0.25001, 0.75, 0, 0, 0.83334],
            8897: [0.25001, 0.75, 0, 0, 0.83334],
            8898: [0.25001, 0.75, 0, 0, 0.83334],
            8899: [0.25001, 0.75, 0, 0, 0.83334],
            8968: [0.35001, 0.85, 0, 0, 0.47222],
            8969: [0.35001, 0.85, 0, 0, 0.47222],
            8970: [0.35001, 0.85, 0, 0, 0.47222],
            8971: [0.35001, 0.85, 0, 0, 0.47222],
            9168: [-99e-5, 0.601, 0, 0, 0.66667],
            10216: [0.35001, 0.85, 0, 0, 0.47222],
            10217: [0.35001, 0.85, 0, 0, 0.47222],
            10752: [0.25001, 0.75, 0, 0, 1.11111],
            10753: [0.25001, 0.75, 0, 0, 1.11111],
            10754: [0.25001, 0.75, 0, 0, 1.11111],
            10756: [0.25001, 0.75, 0, 0, 0.83334],
            10758: [0.25001, 0.75, 0, 0, 0.83334]
          },
          "Size2-Regular": {
            32: [0, 0, 0, 0, 0.25],
            40: [0.65002, 1.15, 0, 0, 0.59722],
            41: [0.65002, 1.15, 0, 0, 0.59722],
            47: [0.65002, 1.15, 0, 0, 0.81111],
            91: [0.65002, 1.15, 0, 0, 0.47222],
            92: [0.65002, 1.15, 0, 0, 0.81111],
            93: [0.65002, 1.15, 0, 0, 0.47222],
            123: [0.65002, 1.15, 0, 0, 0.66667],
            125: [0.65002, 1.15, 0, 0, 0.66667],
            160: [0, 0, 0, 0, 0.25],
            710: [0, 0.75, 0, 0, 1],
            732: [0, 0.75, 0, 0, 1],
            770: [0, 0.75, 0, 0, 1],
            771: [0, 0.75, 0, 0, 1],
            8719: [0.55001, 1.05, 0, 0, 1.27778],
            8720: [0.55001, 1.05, 0, 0, 1.27778],
            8721: [0.55001, 1.05, 0, 0, 1.44445],
            8730: [0.65002, 1.15, 0, 0, 1],
            8747: [0.86225, 1.36, 0.44445, 0, 0.55556],
            8748: [0.862, 1.36, 0.44445, 0, 0.55556],
            8749: [0.862, 1.36, 0.44445, 0, 0.55556],
            8750: [0.86225, 1.36, 0.44445, 0, 0.55556],
            8896: [0.55001, 1.05, 0, 0, 1.11111],
            8897: [0.55001, 1.05, 0, 0, 1.11111],
            8898: [0.55001, 1.05, 0, 0, 1.11111],
            8899: [0.55001, 1.05, 0, 0, 1.11111],
            8968: [0.65002, 1.15, 0, 0, 0.52778],
            8969: [0.65002, 1.15, 0, 0, 0.52778],
            8970: [0.65002, 1.15, 0, 0, 0.52778],
            8971: [0.65002, 1.15, 0, 0, 0.52778],
            10216: [0.65002, 1.15, 0, 0, 0.61111],
            10217: [0.65002, 1.15, 0, 0, 0.61111],
            10752: [0.55001, 1.05, 0, 0, 1.51112],
            10753: [0.55001, 1.05, 0, 0, 1.51112],
            10754: [0.55001, 1.05, 0, 0, 1.51112],
            10756: [0.55001, 1.05, 0, 0, 1.11111],
            10758: [0.55001, 1.05, 0, 0, 1.11111]
          },
          "Size3-Regular": {
            32: [0, 0, 0, 0, 0.25],
            40: [0.95003, 1.45, 0, 0, 0.73611],
            41: [0.95003, 1.45, 0, 0, 0.73611],
            47: [0.95003, 1.45, 0, 0, 1.04445],
            91: [0.95003, 1.45, 0, 0, 0.52778],
            92: [0.95003, 1.45, 0, 0, 1.04445],
            93: [0.95003, 1.45, 0, 0, 0.52778],
            123: [0.95003, 1.45, 0, 0, 0.75],
            125: [0.95003, 1.45, 0, 0, 0.75],
            160: [0, 0, 0, 0, 0.25],
            710: [0, 0.75, 0, 0, 1.44445],
            732: [0, 0.75, 0, 0, 1.44445],
            770: [0, 0.75, 0, 0, 1.44445],
            771: [0, 0.75, 0, 0, 1.44445],
            8730: [0.95003, 1.45, 0, 0, 1],
            8968: [0.95003, 1.45, 0, 0, 0.58334],
            8969: [0.95003, 1.45, 0, 0, 0.58334],
            8970: [0.95003, 1.45, 0, 0, 0.58334],
            8971: [0.95003, 1.45, 0, 0, 0.58334],
            10216: [0.95003, 1.45, 0, 0, 0.75],
            10217: [0.95003, 1.45, 0, 0, 0.75]
          },
          "Size4-Regular": {
            32: [0, 0, 0, 0, 0.25],
            40: [1.25003, 1.75, 0, 0, 0.79167],
            41: [1.25003, 1.75, 0, 0, 0.79167],
            47: [1.25003, 1.75, 0, 0, 1.27778],
            91: [1.25003, 1.75, 0, 0, 0.58334],
            92: [1.25003, 1.75, 0, 0, 1.27778],
            93: [1.25003, 1.75, 0, 0, 0.58334],
            123: [1.25003, 1.75, 0, 0, 0.80556],
            125: [1.25003, 1.75, 0, 0, 0.80556],
            160: [0, 0, 0, 0, 0.25],
            710: [0, 0.825, 0, 0, 1.8889],
            732: [0, 0.825, 0, 0, 1.8889],
            770: [0, 0.825, 0, 0, 1.8889],
            771: [0, 0.825, 0, 0, 1.8889],
            8730: [1.25003, 1.75, 0, 0, 1],
            8968: [1.25003, 1.75, 0, 0, 0.63889],
            8969: [1.25003, 1.75, 0, 0, 0.63889],
            8970: [1.25003, 1.75, 0, 0, 0.63889],
            8971: [1.25003, 1.75, 0, 0, 0.63889],
            9115: [0.64502, 1.155, 0, 0, 0.875],
            9116: [1e-5, 0.6, 0, 0, 0.875],
            9117: [0.64502, 1.155, 0, 0, 0.875],
            9118: [0.64502, 1.155, 0, 0, 0.875],
            9119: [1e-5, 0.6, 0, 0, 0.875],
            9120: [0.64502, 1.155, 0, 0, 0.875],
            9121: [0.64502, 1.155, 0, 0, 0.66667],
            9122: [-99e-5, 0.601, 0, 0, 0.66667],
            9123: [0.64502, 1.155, 0, 0, 0.66667],
            9124: [0.64502, 1.155, 0, 0, 0.66667],
            9125: [-99e-5, 0.601, 0, 0, 0.66667],
            9126: [0.64502, 1.155, 0, 0, 0.66667],
            9127: [1e-5, 0.9, 0, 0, 0.88889],
            9128: [0.65002, 1.15, 0, 0, 0.88889],
            9129: [0.90001, 0, 0, 0, 0.88889],
            9130: [0, 0.3, 0, 0, 0.88889],
            9131: [1e-5, 0.9, 0, 0, 0.88889],
            9132: [0.65002, 1.15, 0, 0, 0.88889],
            9133: [0.90001, 0, 0, 0, 0.88889],
            9143: [0.88502, 0.915, 0, 0, 1.05556],
            10216: [1.25003, 1.75, 0, 0, 0.80556],
            10217: [1.25003, 1.75, 0, 0, 0.80556],
            57344: [-499e-5, 0.605, 0, 0, 1.05556],
            57345: [-499e-5, 0.605, 0, 0, 1.05556],
            57680: [0, 0.12, 0, 0, 0.45],
            57681: [0, 0.12, 0, 0, 0.45],
            57682: [0, 0.12, 0, 0, 0.45],
            57683: [0, 0.12, 0, 0, 0.45]
          },
          "Typewriter-Regular": {
            32: [0, 0, 0, 0, 0.525],
            33: [0, 0.61111, 0, 0, 0.525],
            34: [0, 0.61111, 0, 0, 0.525],
            35: [0, 0.61111, 0, 0, 0.525],
            36: [0.08333, 0.69444, 0, 0, 0.525],
            37: [0.08333, 0.69444, 0, 0, 0.525],
            38: [0, 0.61111, 0, 0, 0.525],
            39: [0, 0.61111, 0, 0, 0.525],
            40: [0.08333, 0.69444, 0, 0, 0.525],
            41: [0.08333, 0.69444, 0, 0, 0.525],
            42: [0, 0.52083, 0, 0, 0.525],
            43: [-0.08056, 0.53055, 0, 0, 0.525],
            44: [0.13889, 0.125, 0, 0, 0.525],
            45: [-0.08056, 0.53055, 0, 0, 0.525],
            46: [0, 0.125, 0, 0, 0.525],
            47: [0.08333, 0.69444, 0, 0, 0.525],
            48: [0, 0.61111, 0, 0, 0.525],
            49: [0, 0.61111, 0, 0, 0.525],
            50: [0, 0.61111, 0, 0, 0.525],
            51: [0, 0.61111, 0, 0, 0.525],
            52: [0, 0.61111, 0, 0, 0.525],
            53: [0, 0.61111, 0, 0, 0.525],
            54: [0, 0.61111, 0, 0, 0.525],
            55: [0, 0.61111, 0, 0, 0.525],
            56: [0, 0.61111, 0, 0, 0.525],
            57: [0, 0.61111, 0, 0, 0.525],
            58: [0, 0.43056, 0, 0, 0.525],
            59: [0.13889, 0.43056, 0, 0, 0.525],
            60: [-0.05556, 0.55556, 0, 0, 0.525],
            61: [-0.19549, 0.41562, 0, 0, 0.525],
            62: [-0.05556, 0.55556, 0, 0, 0.525],
            63: [0, 0.61111, 0, 0, 0.525],
            64: [0, 0.61111, 0, 0, 0.525],
            65: [0, 0.61111, 0, 0, 0.525],
            66: [0, 0.61111, 0, 0, 0.525],
            67: [0, 0.61111, 0, 0, 0.525],
            68: [0, 0.61111, 0, 0, 0.525],
            69: [0, 0.61111, 0, 0, 0.525],
            70: [0, 0.61111, 0, 0, 0.525],
            71: [0, 0.61111, 0, 0, 0.525],
            72: [0, 0.61111, 0, 0, 0.525],
            73: [0, 0.61111, 0, 0, 0.525],
            74: [0, 0.61111, 0, 0, 0.525],
            75: [0, 0.61111, 0, 0, 0.525],
            76: [0, 0.61111, 0, 0, 0.525],
            77: [0, 0.61111, 0, 0, 0.525],
            78: [0, 0.61111, 0, 0, 0.525],
            79: [0, 0.61111, 0, 0, 0.525],
            80: [0, 0.61111, 0, 0, 0.525],
            81: [0.13889, 0.61111, 0, 0, 0.525],
            82: [0, 0.61111, 0, 0, 0.525],
            83: [0, 0.61111, 0, 0, 0.525],
            84: [0, 0.61111, 0, 0, 0.525],
            85: [0, 0.61111, 0, 0, 0.525],
            86: [0, 0.61111, 0, 0, 0.525],
            87: [0, 0.61111, 0, 0, 0.525],
            88: [0, 0.61111, 0, 0, 0.525],
            89: [0, 0.61111, 0, 0, 0.525],
            90: [0, 0.61111, 0, 0, 0.525],
            91: [0.08333, 0.69444, 0, 0, 0.525],
            92: [0.08333, 0.69444, 0, 0, 0.525],
            93: [0.08333, 0.69444, 0, 0, 0.525],
            94: [0, 0.61111, 0, 0, 0.525],
            95: [0.09514, 0, 0, 0, 0.525],
            96: [0, 0.61111, 0, 0, 0.525],
            97: [0, 0.43056, 0, 0, 0.525],
            98: [0, 0.61111, 0, 0, 0.525],
            99: [0, 0.43056, 0, 0, 0.525],
            100: [0, 0.61111, 0, 0, 0.525],
            101: [0, 0.43056, 0, 0, 0.525],
            102: [0, 0.61111, 0, 0, 0.525],
            103: [0.22222, 0.43056, 0, 0, 0.525],
            104: [0, 0.61111, 0, 0, 0.525],
            105: [0, 0.61111, 0, 0, 0.525],
            106: [0.22222, 0.61111, 0, 0, 0.525],
            107: [0, 0.61111, 0, 0, 0.525],
            108: [0, 0.61111, 0, 0, 0.525],
            109: [0, 0.43056, 0, 0, 0.525],
            110: [0, 0.43056, 0, 0, 0.525],
            111: [0, 0.43056, 0, 0, 0.525],
            112: [0.22222, 0.43056, 0, 0, 0.525],
            113: [0.22222, 0.43056, 0, 0, 0.525],
            114: [0, 0.43056, 0, 0, 0.525],
            115: [0, 0.43056, 0, 0, 0.525],
            116: [0, 0.55358, 0, 0, 0.525],
            117: [0, 0.43056, 0, 0, 0.525],
            118: [0, 0.43056, 0, 0, 0.525],
            119: [0, 0.43056, 0, 0, 0.525],
            120: [0, 0.43056, 0, 0, 0.525],
            121: [0.22222, 0.43056, 0, 0, 0.525],
            122: [0, 0.43056, 0, 0, 0.525],
            123: [0.08333, 0.69444, 0, 0, 0.525],
            124: [0.08333, 0.69444, 0, 0, 0.525],
            125: [0.08333, 0.69444, 0, 0, 0.525],
            126: [0, 0.61111, 0, 0, 0.525],
            127: [0, 0.61111, 0, 0, 0.525],
            160: [0, 0, 0, 0, 0.525],
            176: [0, 0.61111, 0, 0, 0.525],
            184: [0.19445, 0, 0, 0, 0.525],
            305: [0, 0.43056, 0, 0, 0.525],
            567: [0.22222, 0.43056, 0, 0, 0.525],
            711: [0, 0.56597, 0, 0, 0.525],
            713: [0, 0.56555, 0, 0, 0.525],
            714: [0, 0.61111, 0, 0, 0.525],
            715: [0, 0.61111, 0, 0, 0.525],
            728: [0, 0.61111, 0, 0, 0.525],
            730: [0, 0.61111, 0, 0, 0.525],
            770: [0, 0.61111, 0, 0, 0.525],
            771: [0, 0.61111, 0, 0, 0.525],
            776: [0, 0.61111, 0, 0, 0.525],
            915: [0, 0.61111, 0, 0, 0.525],
            916: [0, 0.61111, 0, 0, 0.525],
            920: [0, 0.61111, 0, 0, 0.525],
            923: [0, 0.61111, 0, 0, 0.525],
            926: [0, 0.61111, 0, 0, 0.525],
            928: [0, 0.61111, 0, 0, 0.525],
            931: [0, 0.61111, 0, 0, 0.525],
            933: [0, 0.61111, 0, 0, 0.525],
            934: [0, 0.61111, 0, 0, 0.525],
            936: [0, 0.61111, 0, 0, 0.525],
            937: [0, 0.61111, 0, 0, 0.525],
            8216: [0, 0.61111, 0, 0, 0.525],
            8217: [0, 0.61111, 0, 0, 0.525],
            8242: [0, 0.61111, 0, 0, 0.525],
            9251: [0.11111, 0.21944, 0, 0, 0.525]
          }
        };
        const be = {
          slant: [0.25, 0.25, 0.25],
          // sigma1
          space: [0, 0, 0],
          // sigma2
          stretch: [0, 0, 0],
          // sigma3
          shrink: [0, 0, 0],
          // sigma4
          xHeight: [0.431, 0.431, 0.431],
          // sigma5
          quad: [1, 1.171, 1.472],
          // sigma6
          extraSpace: [0, 0, 0],
          // sigma7
          num1: [0.677, 0.732, 0.925],
          // sigma8
          num2: [0.394, 0.384, 0.387],
          // sigma9
          num3: [0.444, 0.471, 0.504],
          // sigma10
          denom1: [0.686, 0.752, 1.025],
          // sigma11
          denom2: [0.345, 0.344, 0.532],
          // sigma12
          sup1: [0.413, 0.503, 0.504],
          // sigma13
          sup2: [0.363, 0.431, 0.404],
          // sigma14
          sup3: [0.289, 0.286, 0.294],
          // sigma15
          sub1: [0.15, 0.143, 0.2],
          // sigma16
          sub2: [0.247, 0.286, 0.4],
          // sigma17
          supDrop: [0.386, 0.353, 0.494],
          // sigma18
          subDrop: [0.05, 0.071, 0.1],
          // sigma19
          delim1: [2.39, 1.7, 1.98],
          // sigma20
          delim2: [1.01, 1.157, 1.42],
          // sigma21
          axisHeight: [0.25, 0.25, 0.25],
          // sigma22
          // These font metrics are extracted from TeX by using tftopl on cmex10.tfm;
          // they correspond to the font parameters of the extension fonts (family 3).
          // See the TeXbook, page 441. In AMSTeX, the extension fonts scale; to
          // match cmex7, we'd use cmex7.tfm values for script and scriptscript
          // values.
          defaultRuleThickness: [0.04, 0.049, 0.049],
          // xi8; cmex7: 0.049
          bigOpSpacing1: [0.111, 0.111, 0.111],
          // xi9
          bigOpSpacing2: [0.166, 0.166, 0.166],
          // xi10
          bigOpSpacing3: [0.2, 0.2, 0.2],
          // xi11
          bigOpSpacing4: [0.6, 0.611, 0.611],
          // xi12; cmex7: 0.611
          bigOpSpacing5: [0.1, 0.143, 0.143],
          // xi13; cmex7: 0.143
          // The \sqrt rule width is taken from the height of the surd character.
          // Since we use the same font at all sizes, this thickness doesn't scale.
          sqrtRuleThickness: [0.04, 0.04, 0.04],
          // This value determines how large a pt is, for metrics which are defined
          // in terms of pts.
          // This value is also used in katex.scss; if you change it make sure the
          // values match.
          ptPerEm: [10, 10, 10],
          // The space between adjacent `|` columns in an array definition. From
          // `\showthe\doublerulesep` in LaTeX. Equals 2.0 / ptPerEm.
          doubleRuleSep: [0.2, 0.2, 0.2],
          // The width of separator lines in {array} environments. From
          // `\showthe\arrayrulewidth` in LaTeX. Equals 0.4 / ptPerEm.
          arrayRuleWidth: [0.04, 0.04, 0.04],
          // Two values from LaTeX source2e:
          fboxsep: [0.3, 0.3, 0.3],
          //        3 pt / ptPerEm
          fboxrule: [0.04, 0.04, 0.04]
          // 0.4 pt / ptPerEm
        }, Ae = {
          // Latin-1
          Å: "A",
          Ð: "D",
          Þ: "o",
          å: "a",
          ð: "d",
          þ: "o",
          // Cyrillic
          А: "A",
          Б: "B",
          В: "B",
          Г: "F",
          Д: "A",
          Е: "E",
          Ж: "K",
          З: "3",
          И: "N",
          Й: "N",
          К: "K",
          Л: "N",
          М: "M",
          Н: "H",
          О: "O",
          П: "N",
          Р: "P",
          С: "C",
          Т: "T",
          У: "y",
          Ф: "O",
          Х: "X",
          Ц: "U",
          Ч: "h",
          Ш: "W",
          Щ: "W",
          Ъ: "B",
          Ы: "X",
          Ь: "B",
          Э: "3",
          Ю: "X",
          Я: "R",
          а: "a",
          б: "b",
          в: "a",
          г: "r",
          д: "y",
          е: "e",
          ж: "m",
          з: "e",
          и: "n",
          й: "n",
          к: "n",
          л: "n",
          м: "m",
          н: "n",
          о: "o",
          п: "n",
          р: "p",
          с: "c",
          т: "o",
          у: "y",
          ф: "b",
          х: "x",
          ц: "n",
          ч: "n",
          ш: "w",
          щ: "w",
          ъ: "a",
          ы: "m",
          ь: "a",
          э: "e",
          ю: "m",
          я: "r"
        };
        function Se(He, Pe) {
          pe[He] = Pe;
        }
        function Me(He, Pe, it) {
          if (!pe[Pe])
            throw new Error("Font metrics not found for font: " + Pe + ".");
          let bt = He.charCodeAt(0), Ue = pe[Pe][bt];
          if (!Ue && He[0] in Ae && (bt = Ae[He[0]].charCodeAt(0), Ue = pe[Pe][bt]), !Ue && it === "text" && Y(bt) && (Ue = pe[Pe][77]), Ue)
            return {
              depth: Ue[0],
              height: Ue[1],
              italic: Ue[2],
              skew: Ue[3],
              width: Ue[4]
            };
        }
        const De = {};
        function Le(He) {
          let Pe;
          if (He >= 5 ? Pe = 0 : He >= 3 ? Pe = 1 : Pe = 2, !De[Pe]) {
            const it = De[Pe] = {
              cssEmPerMu: be.quad[Pe] / 18
            };
            for (const bt in be)
              be.hasOwnProperty(bt) && (it[bt] = be[bt][Pe]);
          }
          return De[Pe];
        }
        const We = [
          // Each element contains [textsize, scriptsize, scriptscriptsize].
          // The size mappings are taken from TeX with \normalsize=10pt.
          [1, 1, 1],
          // size1: [5, 5, 5]              \tiny
          [2, 1, 1],
          // size2: [6, 5, 5]
          [3, 1, 1],
          // size3: [7, 5, 5]              \scriptsize
          [4, 2, 1],
          // size4: [8, 6, 5]              \footnotesize
          [5, 2, 1],
          // size5: [9, 6, 5]              \small
          [6, 3, 1],
          // size6: [10, 7, 5]             \normalsize
          [7, 4, 2],
          // size7: [12, 8, 6]             \large
          [8, 6, 3],
          // size8: [14.4, 10, 7]          \Large
          [9, 7, 6],
          // size9: [17.28, 12, 10]        \LARGE
          [10, 8, 7],
          // size10: [20.74, 14.4, 12]     \huge
          [11, 10, 9]
          // size11: [24.88, 20.74, 17.28] \HUGE
        ], Ee = [
          // fontMetrics.js:getGlobalMetrics also uses size indexes, so if
          // you change size indexes, change that function.
          0.5,
          0.6,
          0.7,
          0.8,
          0.9,
          1,
          1.2,
          1.44,
          1.728,
          2.074,
          2.488
        ], Ne = function(He, Pe) {
          return Pe.size < 2 ? He : We[He - 1][Pe.size - 1];
        };
        class Ie {
          // A font family applies to a group of fonts (i.e. SansSerif), while a font
          // represents a specific font (i.e. SansSerif Bold).
          // See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
          /**
           * The base size index.
           */
          constructor(Pe) {
            this.style = void 0, this.color = void 0, this.size = void 0, this.textSize = void 0, this.phantom = void 0, this.font = void 0, this.fontFamily = void 0, this.fontWeight = void 0, this.fontShape = void 0, this.sizeMultiplier = void 0, this.maxSize = void 0, this.minRuleThickness = void 0, this._fontMetrics = void 0, this.style = Pe.style, this.color = Pe.color, this.size = Pe.size || Ie.BASESIZE, this.textSize = Pe.textSize || this.size, this.phantom = !!Pe.phantom, this.font = Pe.font || "", this.fontFamily = Pe.fontFamily || "", this.fontWeight = Pe.fontWeight || "", this.fontShape = Pe.fontShape || "", this.sizeMultiplier = Ee[this.size - 1], this.maxSize = Pe.maxSize, this.minRuleThickness = Pe.minRuleThickness, this._fontMetrics = void 0;
          }
          /**
           * Returns a new options object with the same properties as "this".  Properties
           * from "extension" will be copied to the new options object.
           */
          extend(Pe) {
            const it = {
              style: this.style,
              size: this.size,
              textSize: this.textSize,
              color: this.color,
              phantom: this.phantom,
              font: this.font,
              fontFamily: this.fontFamily,
              fontWeight: this.fontWeight,
              fontShape: this.fontShape,
              maxSize: this.maxSize,
              minRuleThickness: this.minRuleThickness
            };
            for (const bt in Pe)
              Pe.hasOwnProperty(bt) && (it[bt] = Pe[bt]);
            return new Ie(it);
          }
          /**
           * Return an options object with the given style. If `this.style === style`,
           * returns `this`.
           */
          havingStyle(Pe) {
            return this.style === Pe ? this : this.extend({
              style: Pe,
              size: Ne(this.textSize, Pe)
            });
          }
          /**
           * Return an options object with a cramped version of the current style. If
           * the current style is cramped, returns `this`.
           */
          havingCrampedStyle() {
            return this.havingStyle(this.style.cramp());
          }
          /**
           * Return an options object with the given size and in at least `\textstyle`.
           * Returns `this` if appropriate.
           */
          havingSize(Pe) {
            return this.size === Pe && this.textSize === Pe ? this : this.extend({
              style: this.style.text(),
              size: Pe,
              textSize: Pe,
              sizeMultiplier: Ee[Pe - 1]
            });
          }
          /**
           * Like `this.havingSize(BASESIZE).havingStyle(style)`. If `style` is omitted,
           * changes to at least `\textstyle`.
           */
          havingBaseStyle(Pe) {
            Pe = Pe || this.style.text();
            const it = Ne(Ie.BASESIZE, Pe);
            return this.size === it && this.textSize === Ie.BASESIZE && this.style === Pe ? this : this.extend({
              style: Pe,
              size: it
            });
          }
          /**
           * Remove the effect of sizing changes such as \Huge.
           * Keep the effect of the current style, such as \scriptstyle.
           */
          havingBaseSizing() {
            let Pe;
            switch (this.style.id) {
              case 4:
              case 5:
                Pe = 3;
                break;
              case 6:
              case 7:
                Pe = 1;
                break;
              default:
                Pe = 6;
            }
            return this.extend({
              style: this.style.text(),
              size: Pe
            });
          }
          /**
           * Create a new options object with the given color.
           */
          withColor(Pe) {
            return this.extend({
              color: Pe
            });
          }
          /**
           * Create a new options object with "phantom" set to true.
           */
          withPhantom() {
            return this.extend({
              phantom: !0
            });
          }
          /**
           * Creates a new options object with the given math font or old text font.
           * @type {[type]}
           */
          withFont(Pe) {
            return this.extend({
              font: Pe
            });
          }
          /**
           * Create a new options objects with the given fontFamily.
           */
          withTextFontFamily(Pe) {
            return this.extend({
              fontFamily: Pe,
              font: ""
            });
          }
          /**
           * Creates a new options object with the given font weight
           */
          withTextFontWeight(Pe) {
            return this.extend({
              fontWeight: Pe,
              font: ""
            });
          }
          /**
           * Creates a new options object with the given font weight
           */
          withTextFontShape(Pe) {
            return this.extend({
              fontShape: Pe,
              font: ""
            });
          }
          /**
           * Return the CSS sizing classes required to switch from enclosing options
           * `oldOptions` to `this`. Returns an array of classes.
           */
          sizingClasses(Pe) {
            return Pe.size !== this.size ? ["sizing", "reset-size" + Pe.size, "size" + this.size] : [];
          }
          /**
           * Return the CSS sizing classes required to switch to the base size. Like
           * `this.havingSize(BASESIZE).sizingClasses(this)`.
           */
          baseSizingClasses() {
            return this.size !== Ie.BASESIZE ? ["sizing", "reset-size" + this.size, "size" + Ie.BASESIZE] : [];
          }
          /**
           * Return the font metrics for this size.
           */
          fontMetrics() {
            return this._fontMetrics || (this._fontMetrics = Le(this.size)), this._fontMetrics;
          }
          /**
           * Gets the CSS color of the current options object
           */
          getColor() {
            return this.phantom ? "transparent" : this.color;
          }
        }
        Ie.BASESIZE = 6;
        var ge = Ie;
        const Ce = {
          // https://en.wikibooks.org/wiki/LaTeX/Lengths and
          // https://tex.stackexchange.com/a/8263
          pt: 1,
          // TeX point
          mm: 7227 / 2540,
          // millimeter
          cm: 7227 / 254,
          // centimeter
          in: 72.27,
          // inch
          bp: 803 / 800,
          // big (PostScript) points
          pc: 12,
          // pica
          dd: 1238 / 1157,
          // didot
          cc: 14856 / 1157,
          // cicero (12 didot)
          nd: 685 / 642,
          // new didot
          nc: 1370 / 107,
          // new cicero (12 new didot)
          sp: 1 / 65536,
          // scaled point (TeX's internal smallest unit)
          // https://tex.stackexchange.com/a/41371
          px: 803 / 800
          // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
        }, we = {
          ex: !0,
          em: !0,
          mu: !0
        }, Ge = function(He) {
          return typeof He != "string" && (He = He.unit), He in Ce || He in we || He === "ex";
        }, Re = function(He, Pe) {
          let it;
          if (He.unit in Ce)
            it = Ce[He.unit] / Pe.fontMetrics().ptPerEm / Pe.sizeMultiplier;
          else if (He.unit === "mu")
            it = Pe.fontMetrics().cssEmPerMu;
          else {
            let bt;
            if (Pe.style.isTight() ? bt = Pe.havingStyle(Pe.style.text()) : bt = Pe, He.unit === "ex")
              it = bt.fontMetrics().xHeight;
            else if (He.unit === "em")
              it = bt.fontMetrics().quad;
            else
              throw new o("Invalid unit: '" + He.unit + "'");
            bt !== Pe && (it *= bt.sizeMultiplier / Pe.sizeMultiplier);
          }
          return Math.min(He.number * it, Pe.maxSize);
        }, je = function(He) {
          return +He.toFixed(4) + "em";
        }, Ke = function(He) {
          return He.filter((Pe) => Pe).join(" ");
        }, tt = function(He, Pe, it) {
          if (this.classes = He || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = it || {}, Pe) {
            Pe.style.isTight() && this.classes.push("mtight");
            const bt = Pe.getColor();
            bt && (this.style.color = bt);
          }
        }, _e = function(He) {
          const Pe = document.createElement(He);
          Pe.className = Ke(this.classes);
          for (const it in this.style)
            this.style.hasOwnProperty(it) && (Pe.style[it] = this.style[it]);
          for (const it in this.attributes)
            this.attributes.hasOwnProperty(it) && Pe.setAttribute(it, this.attributes[it]);
          for (let it = 0; it < this.children.length; it++)
            Pe.appendChild(this.children[it].toNode());
          return Pe;
        }, Be = function(He) {
          let Pe = "<" + He;
          this.classes.length && (Pe += ' class="' + g.escape(Ke(this.classes)) + '"');
          let it = "";
          for (const bt in this.style)
            this.style.hasOwnProperty(bt) && (it += g.hyphenate(bt) + ":" + this.style[bt] + ";");
          it && (Pe += ' style="' + g.escape(it) + '"');
          for (const bt in this.attributes)
            this.attributes.hasOwnProperty(bt) && (Pe += " " + bt + '="' + g.escape(this.attributes[bt]) + '"');
          Pe += ">";
          for (let bt = 0; bt < this.children.length; bt++)
            Pe += this.children[bt].toMarkup();
          return Pe += "</" + He + ">", Pe;
        };
        class $e {
          constructor(Pe, it, bt, Ue) {
            this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, tt.call(this, Pe, bt, Ue), this.children = it || [];
          }
          /**
           * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
           * all browsers support attributes the same, and having too many custom
           * attributes is probably bad.
           */
          setAttribute(Pe, it) {
            this.attributes[Pe] = it;
          }
          hasClass(Pe) {
            return g.contains(this.classes, Pe);
          }
          toNode() {
            return _e.call(this, "span");
          }
          toMarkup() {
            return Be.call(this, "span");
          }
        }
        class Ze {
          constructor(Pe, it, bt, Ue) {
            this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, tt.call(this, it, Ue), this.children = bt || [], this.setAttribute("href", Pe);
          }
          setAttribute(Pe, it) {
            this.attributes[Pe] = it;
          }
          hasClass(Pe) {
            return g.contains(this.classes, Pe);
          }
          toNode() {
            return _e.call(this, "a");
          }
          toMarkup() {
            return Be.call(this, "a");
          }
        }
        class ct {
          constructor(Pe, it, bt) {
            this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = it, this.src = Pe, this.classes = ["mord"], this.style = bt;
          }
          hasClass(Pe) {
            return g.contains(this.classes, Pe);
          }
          toNode() {
            const Pe = document.createElement("img");
            Pe.src = this.src, Pe.alt = this.alt, Pe.className = "mord";
            for (const it in this.style)
              this.style.hasOwnProperty(it) && (Pe.style[it] = this.style[it]);
            return Pe;
          }
          toMarkup() {
            let Pe = '<img src="' + g.escape(this.src) + '"' + (' alt="' + g.escape(this.alt) + '"'), it = "";
            for (const bt in this.style)
              this.style.hasOwnProperty(bt) && (it += g.hyphenate(bt) + ":" + this.style[bt] + ";");
            return it && (Pe += ' style="' + g.escape(it) + '"'), Pe += "'/>", Pe;
          }
        }
        const ft = {
          î: "ı̂",
          ï: "ı̈",
          í: "ı́",
          // 'ī': '\u0131\u0304', // enable when we add Extended Latin
          ì: "ı̀"
        };
        class _t {
          constructor(Pe, it, bt, Ue, Qe, ht, Z, B) {
            this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = Pe, this.height = it || 0, this.depth = bt || 0, this.italic = Ue || 0, this.skew = Qe || 0, this.width = ht || 0, this.classes = Z || [], this.style = B || {}, this.maxFontSize = 0;
            const y = K(this.text.charCodeAt(0));
            y && this.classes.push(y + "_fallback"), /[îïíì]/.test(this.text) && (this.text = ft[this.text]);
          }
          hasClass(Pe) {
            return g.contains(this.classes, Pe);
          }
          /**
           * Creates a text node or span from a symbol node. Note that a span is only
           * created if it is needed.
           */
          toNode() {
            const Pe = document.createTextNode(this.text);
            let it = null;
            this.italic > 0 && (it = document.createElement("span"), it.style.marginRight = je(this.italic)), this.classes.length > 0 && (it = it || document.createElement("span"), it.className = Ke(this.classes));
            for (const bt in this.style)
              this.style.hasOwnProperty(bt) && (it = it || document.createElement("span"), it.style[bt] = this.style[bt]);
            return it ? (it.appendChild(Pe), it) : Pe;
          }
          /**
           * Creates markup for a symbol node.
           */
          toMarkup() {
            let Pe = !1, it = "<span";
            this.classes.length && (Pe = !0, it += ' class="', it += g.escape(Ke(this.classes)), it += '"');
            let bt = "";
            this.italic > 0 && (bt += "margin-right:" + this.italic + "em;");
            for (const Qe in this.style)
              this.style.hasOwnProperty(Qe) && (bt += g.hyphenate(Qe) + ":" + this.style[Qe] + ";");
            bt && (Pe = !0, it += ' style="' + g.escape(bt) + '"');
            const Ue = g.escape(this.text);
            return Pe ? (it += ">", it += Ue, it += "</span>", it) : Ue;
          }
        }
        class Pt {
          constructor(Pe, it) {
            this.children = void 0, this.attributes = void 0, this.children = Pe || [], this.attributes = it || {};
          }
          toNode() {
            const it = document.createElementNS("http://www.w3.org/2000/svg", "svg");
            for (const bt in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, bt) && it.setAttribute(bt, this.attributes[bt]);
            for (let bt = 0; bt < this.children.length; bt++)
              it.appendChild(this.children[bt].toNode());
            return it;
          }
          toMarkup() {
            let Pe = '<svg xmlns="http://www.w3.org/2000/svg"';
            for (const it in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, it) && (Pe += " " + it + '="' + g.escape(this.attributes[it]) + '"');
            Pe += ">";
            for (let it = 0; it < this.children.length; it++)
              Pe += this.children[it].toMarkup();
            return Pe += "</svg>", Pe;
          }
        }
        class Dt {
          constructor(Pe, it) {
            this.pathName = void 0, this.alternate = void 0, this.pathName = Pe, this.alternate = it;
          }
          toNode() {
            const it = document.createElementNS("http://www.w3.org/2000/svg", "path");
            return this.alternate ? it.setAttribute("d", this.alternate) : it.setAttribute("d", se[this.pathName]), it;
          }
          toMarkup() {
            return this.alternate ? '<path d="' + g.escape(this.alternate) + '"/>' : '<path d="' + g.escape(se[this.pathName]) + '"/>';
          }
        }
        class $t {
          constructor(Pe) {
            this.attributes = void 0, this.attributes = Pe || {};
          }
          toNode() {
            const it = document.createElementNS("http://www.w3.org/2000/svg", "line");
            for (const bt in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, bt) && it.setAttribute(bt, this.attributes[bt]);
            return it;
          }
          toMarkup() {
            let Pe = "<line";
            for (const it in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, it) && (Pe += " " + it + '="' + g.escape(this.attributes[it]) + '"');
            return Pe += "/>", Pe;
          }
        }
        function Gt(He) {
          if (He instanceof _t)
            return He;
          throw new Error("Expected symbolNode but got " + String(He) + ".");
        }
        function Wt(He) {
          if (He instanceof $e)
            return He;
          throw new Error("Expected span<HtmlDomNode> but got " + String(He) + ".");
        }
        const mt = {
          bin: 1,
          close: 1,
          inner: 1,
          open: 1,
          punct: 1,
          rel: 1
        }, at = {
          "accent-token": 1,
          mathord: 1,
          "op-token": 1,
          spacing: 1,
          textord: 1
        }, vt = {
          math: {},
          text: {}
        };
        var St = vt;
        function Je(He, Pe, it, bt, Ue, Qe) {
          vt[He][Ue] = {
            font: Pe,
            group: it,
            replace: bt
          }, Qe && bt && (vt[He][bt] = vt[He][Ue]);
        }
        const nt = "math", ot = "text", Ye = "main", Fe = "ams", pt = "accent-token", Mt = "bin", At = "close", Rt = "inner", Ft = "mathord", lt = "op-token", st = "open", Ot = "punct", kt = "rel", Bt = "spacing", xt = "textord";
        Je(nt, Ye, kt, "≡", "\\equiv", !0), Je(nt, Ye, kt, "≺", "\\prec", !0), Je(nt, Ye, kt, "≻", "\\succ", !0), Je(nt, Ye, kt, "∼", "\\sim", !0), Je(nt, Ye, kt, "⊥", "\\perp"), Je(nt, Ye, kt, "⪯", "\\preceq", !0), Je(nt, Ye, kt, "⪰", "\\succeq", !0), Je(nt, Ye, kt, "≃", "\\simeq", !0), Je(nt, Ye, kt, "∣", "\\mid", !0), Je(nt, Ye, kt, "≪", "\\ll", !0), Je(nt, Ye, kt, "≫", "\\gg", !0), Je(nt, Ye, kt, "≍", "\\asymp", !0), Je(nt, Ye, kt, "∥", "\\parallel"), Je(nt, Ye, kt, "⋈", "\\bowtie", !0), Je(nt, Ye, kt, "⌣", "\\smile", !0), Je(nt, Ye, kt, "⊑", "\\sqsubseteq", !0), Je(nt, Ye, kt, "⊒", "\\sqsupseteq", !0), Je(nt, Ye, kt, "≐", "\\doteq", !0), Je(nt, Ye, kt, "⌢", "\\frown", !0), Je(nt, Ye, kt, "∋", "\\ni", !0), Je(nt, Ye, kt, "∝", "\\propto", !0), Je(nt, Ye, kt, "⊢", "\\vdash", !0), Je(nt, Ye, kt, "⊣", "\\dashv", !0), Je(nt, Ye, kt, "∋", "\\owns"), Je(nt, Ye, Ot, ".", "\\ldotp"), Je(nt, Ye, Ot, "⋅", "\\cdotp"), Je(nt, Ye, xt, "#", "\\#"), Je(ot, Ye, xt, "#", "\\#"), Je(nt, Ye, xt, "&", "\\&"), Je(ot, Ye, xt, "&", "\\&"), Je(nt, Ye, xt, "ℵ", "\\aleph", !0), Je(nt, Ye, xt, "∀", "\\forall", !0), Je(nt, Ye, xt, "ℏ", "\\hbar", !0), Je(nt, Ye, xt, "∃", "\\exists", !0), Je(nt, Ye, xt, "∇", "\\nabla", !0), Je(nt, Ye, xt, "♭", "\\flat", !0), Je(nt, Ye, xt, "ℓ", "\\ell", !0), Je(nt, Ye, xt, "♮", "\\natural", !0), Je(nt, Ye, xt, "♣", "\\clubsuit", !0), Je(nt, Ye, xt, "℘", "\\wp", !0), Je(nt, Ye, xt, "♯", "\\sharp", !0), Je(nt, Ye, xt, "♢", "\\diamondsuit", !0), Je(nt, Ye, xt, "ℜ", "\\Re", !0), Je(nt, Ye, xt, "♡", "\\heartsuit", !0), Je(nt, Ye, xt, "ℑ", "\\Im", !0), Je(nt, Ye, xt, "♠", "\\spadesuit", !0), Je(nt, Ye, xt, "§", "\\S", !0), Je(ot, Ye, xt, "§", "\\S"), Je(nt, Ye, xt, "¶", "\\P", !0), Je(ot, Ye, xt, "¶", "\\P"), Je(nt, Ye, xt, "†", "\\dag"), Je(ot, Ye, xt, "†", "\\dag"), Je(ot, Ye, xt, "†", "\\textdagger"), Je(nt, Ye, xt, "‡", "\\ddag"), Je(ot, Ye, xt, "‡", "\\ddag"), Je(ot, Ye, xt, "‡", "\\textdaggerdbl"), Je(nt, Ye, At, "⎱", "\\rmoustache", !0), Je(nt, Ye, st, "⎰", "\\lmoustache", !0), Je(nt, Ye, At, "⟯", "\\rgroup", !0), Je(nt, Ye, st, "⟮", "\\lgroup", !0), Je(nt, Ye, Mt, "∓", "\\mp", !0), Je(nt, Ye, Mt, "⊖", "\\ominus", !0), Je(nt, Ye, Mt, "⊎", "\\uplus", !0), Je(nt, Ye, Mt, "⊓", "\\sqcap", !0), Je(nt, Ye, Mt, "∗", "\\ast"), Je(nt, Ye, Mt, "⊔", "\\sqcup", !0), Je(nt, Ye, Mt, "◯", "\\bigcirc", !0), Je(nt, Ye, Mt, "∙", "\\bullet", !0), Je(nt, Ye, Mt, "‡", "\\ddagger"), Je(nt, Ye, Mt, "≀", "\\wr", !0), Je(nt, Ye, Mt, "⨿", "\\amalg"), Je(nt, Ye, Mt, "&", "\\And"), Je(nt, Ye, kt, "⟵", "\\longleftarrow", !0), Je(nt, Ye, kt, "⇐", "\\Leftarrow", !0), Je(nt, Ye, kt, "⟸", "\\Longleftarrow", !0), Je(nt, Ye, kt, "⟶", "\\longrightarrow", !0), Je(nt, Ye, kt, "⇒", "\\Rightarrow", !0), Je(nt, Ye, kt, "⟹", "\\Longrightarrow", !0), Je(nt, Ye, kt, "↔", "\\leftrightarrow", !0), Je(nt, Ye, kt, "⟷", "\\longleftrightarrow", !0), Je(nt, Ye, kt, "⇔", "\\Leftrightarrow", !0), Je(nt, Ye, kt, "⟺", "\\Longleftrightarrow", !0), Je(nt, Ye, kt, "↦", "\\mapsto", !0), Je(nt, Ye, kt, "⟼", "\\longmapsto", !0), Je(nt, Ye, kt, "↗", "\\nearrow", !0), Je(nt, Ye, kt, "↩", "\\hookleftarrow", !0), Je(nt, Ye, kt, "↪", "\\hookrightarrow", !0), Je(nt, Ye, kt, "↘", "\\searrow", !0), Je(nt, Ye, kt, "↼", "\\leftharpoonup", !0), Je(nt, Ye, kt, "⇀", "\\rightharpoonup", !0), Je(nt, Ye, kt, "↙", "\\swarrow", !0), Je(nt, Ye, kt, "↽", "\\leftharpoondown", !0), Je(nt, Ye, kt, "⇁", "\\rightharpoondown", !0), Je(nt, Ye, kt, "↖", "\\nwarrow", !0), Je(nt, Ye, kt, "⇌", "\\rightleftharpoons", !0), Je(nt, Fe, kt, "≮", "\\nless", !0), Je(nt, Fe, kt, "", "\\@nleqslant"), Je(nt, Fe, kt, "", "\\@nleqq"), Je(nt, Fe, kt, "⪇", "\\lneq", !0), Je(nt, Fe, kt, "≨", "\\lneqq", !0), Je(nt, Fe, kt, "", "\\@lvertneqq"), Je(nt, Fe, kt, "⋦", "\\lnsim", !0), Je(nt, Fe, kt, "⪉", "\\lnapprox", !0), Je(nt, Fe, kt, "⊀", "\\nprec", !0), Je(nt, Fe, kt, "⋠", "\\npreceq", !0), Je(nt, Fe, kt, "⋨", "\\precnsim", !0), Je(nt, Fe, kt, "⪹", "\\precnapprox", !0), Je(nt, Fe, kt, "≁", "\\nsim", !0), Je(nt, Fe, kt, "", "\\@nshortmid"), Je(nt, Fe, kt, "∤", "\\nmid", !0), Je(nt, Fe, kt, "⊬", "\\nvdash", !0), Je(nt, Fe, kt, "⊭", "\\nvDash", !0), Je(nt, Fe, kt, "⋪", "\\ntriangleleft"), Je(nt, Fe, kt, "⋬", "\\ntrianglelefteq", !0), Je(nt, Fe, kt, "⊊", "\\subsetneq", !0), Je(nt, Fe, kt, "", "\\@varsubsetneq"), Je(nt, Fe, kt, "⫋", "\\subsetneqq", !0), Je(nt, Fe, kt, "", "\\@varsubsetneqq"), Je(nt, Fe, kt, "≯", "\\ngtr", !0), Je(nt, Fe, kt, "", "\\@ngeqslant"), Je(nt, Fe, kt, "", "\\@ngeqq"), Je(nt, Fe, kt, "⪈", "\\gneq", !0), Je(nt, Fe, kt, "≩", "\\gneqq", !0), Je(nt, Fe, kt, "", "\\@gvertneqq"), Je(nt, Fe, kt, "⋧", "\\gnsim", !0), Je(nt, Fe, kt, "⪊", "\\gnapprox", !0), Je(nt, Fe, kt, "⊁", "\\nsucc", !0), Je(nt, Fe, kt, "⋡", "\\nsucceq", !0), Je(nt, Fe, kt, "⋩", "\\succnsim", !0), Je(nt, Fe, kt, "⪺", "\\succnapprox", !0), Je(nt, Fe, kt, "≆", "\\ncong", !0), Je(nt, Fe, kt, "", "\\@nshortparallel"), Je(nt, Fe, kt, "∦", "\\nparallel", !0), Je(nt, Fe, kt, "⊯", "\\nVDash", !0), Je(nt, Fe, kt, "⋫", "\\ntriangleright"), Je(nt, Fe, kt, "⋭", "\\ntrianglerighteq", !0), Je(nt, Fe, kt, "", "\\@nsupseteqq"), Je(nt, Fe, kt, "⊋", "\\supsetneq", !0), Je(nt, Fe, kt, "", "\\@varsupsetneq"), Je(nt, Fe, kt, "⫌", "\\supsetneqq", !0), Je(nt, Fe, kt, "", "\\@varsupsetneqq"), Je(nt, Fe, kt, "⊮", "\\nVdash", !0), Je(nt, Fe, kt, "⪵", "\\precneqq", !0), Je(nt, Fe, kt, "⪶", "\\succneqq", !0), Je(nt, Fe, kt, "", "\\@nsubseteqq"), Je(nt, Fe, Mt, "⊴", "\\unlhd"), Je(nt, Fe, Mt, "⊵", "\\unrhd"), Je(nt, Fe, kt, "↚", "\\nleftarrow", !0), Je(nt, Fe, kt, "↛", "\\nrightarrow", !0), Je(nt, Fe, kt, "⇍", "\\nLeftarrow", !0), Je(nt, Fe, kt, "⇏", "\\nRightarrow", !0), Je(nt, Fe, kt, "↮", "\\nleftrightarrow", !0), Je(nt, Fe, kt, "⇎", "\\nLeftrightarrow", !0), Je(nt, Fe, kt, "△", "\\vartriangle"), Je(nt, Fe, xt, "ℏ", "\\hslash"), Je(nt, Fe, xt, "▽", "\\triangledown"), Je(nt, Fe, xt, "◊", "\\lozenge"), Je(nt, Fe, xt, "Ⓢ", "\\circledS"), Je(nt, Fe, xt, "®", "\\circledR"), Je(ot, Fe, xt, "®", "\\circledR"), Je(nt, Fe, xt, "∡", "\\measuredangle", !0), Je(nt, Fe, xt, "∄", "\\nexists"), Je(nt, Fe, xt, "℧", "\\mho"), Je(nt, Fe, xt, "Ⅎ", "\\Finv", !0), Je(nt, Fe, xt, "⅁", "\\Game", !0), Je(nt, Fe, xt, "‵", "\\backprime"), Je(nt, Fe, xt, "▲", "\\blacktriangle"), Je(nt, Fe, xt, "▼", "\\blacktriangledown"), Je(nt, Fe, xt, "■", "\\blacksquare"), Je(nt, Fe, xt, "⧫", "\\blacklozenge"), Je(nt, Fe, xt, "★", "\\bigstar"), Je(nt, Fe, xt, "∢", "\\sphericalangle", !0), Je(nt, Fe, xt, "∁", "\\complement", !0), Je(nt, Fe, xt, "ð", "\\eth", !0), Je(ot, Ye, xt, "ð", "ð"), Je(nt, Fe, xt, "╱", "\\diagup"), Je(nt, Fe, xt, "╲", "\\diagdown"), Je(nt, Fe, xt, "□", "\\square"), Je(nt, Fe, xt, "□", "\\Box"), Je(nt, Fe, xt, "◊", "\\Diamond"), Je(nt, Fe, xt, "¥", "\\yen", !0), Je(ot, Fe, xt, "¥", "\\yen", !0), Je(nt, Fe, xt, "✓", "\\checkmark", !0), Je(ot, Fe, xt, "✓", "\\checkmark"), Je(nt, Fe, xt, "ℶ", "\\beth", !0), Je(nt, Fe, xt, "ℸ", "\\daleth", !0), Je(nt, Fe, xt, "ℷ", "\\gimel", !0), Je(nt, Fe, xt, "ϝ", "\\digamma", !0), Je(nt, Fe, xt, "ϰ", "\\varkappa"), Je(nt, Fe, st, "┌", "\\@ulcorner", !0), Je(nt, Fe, At, "┐", "\\@urcorner", !0), Je(nt, Fe, st, "└", "\\@llcorner", !0), Je(nt, Fe, At, "┘", "\\@lrcorner", !0), Je(nt, Fe, kt, "≦", "\\leqq", !0), Je(nt, Fe, kt, "⩽", "\\leqslant", !0), Je(nt, Fe, kt, "⪕", "\\eqslantless", !0), Je(nt, Fe, kt, "≲", "\\lesssim", !0), Je(nt, Fe, kt, "⪅", "\\lessapprox", !0), Je(nt, Fe, kt, "≊", "\\approxeq", !0), Je(nt, Fe, Mt, "⋖", "\\lessdot"), Je(nt, Fe, kt, "⋘", "\\lll", !0), Je(nt, Fe, kt, "≶", "\\lessgtr", !0), Je(nt, Fe, kt, "⋚", "\\lesseqgtr", !0), Je(nt, Fe, kt, "⪋", "\\lesseqqgtr", !0), Je(nt, Fe, kt, "≑", "\\doteqdot"), Je(nt, Fe, kt, "≓", "\\risingdotseq", !0), Je(nt, Fe, kt, "≒", "\\fallingdotseq", !0), Je(nt, Fe, kt, "∽", "\\backsim", !0), Je(nt, Fe, kt, "⋍", "\\backsimeq", !0), Je(nt, Fe, kt, "⫅", "\\subseteqq", !0), Je(nt, Fe, kt, "⋐", "\\Subset", !0), Je(nt, Fe, kt, "⊏", "\\sqsubset", !0), Je(nt, Fe, kt, "≼", "\\preccurlyeq", !0), Je(nt, Fe, kt, "⋞", "\\curlyeqprec", !0), Je(nt, Fe, kt, "≾", "\\precsim", !0), Je(nt, Fe, kt, "⪷", "\\precapprox", !0), Je(nt, Fe, kt, "⊲", "\\vartriangleleft"), Je(nt, Fe, kt, "⊴", "\\trianglelefteq"), Je(nt, Fe, kt, "⊨", "\\vDash", !0), Je(nt, Fe, kt, "⊪", "\\Vvdash", !0), Je(nt, Fe, kt, "⌣", "\\smallsmile"), Je(nt, Fe, kt, "⌢", "\\smallfrown"), Je(nt, Fe, kt, "≏", "\\bumpeq", !0), Je(nt, Fe, kt, "≎", "\\Bumpeq", !0), Je(nt, Fe, kt, "≧", "\\geqq", !0), Je(nt, Fe, kt, "⩾", "\\geqslant", !0), Je(nt, Fe, kt, "⪖", "\\eqslantgtr", !0), Je(nt, Fe, kt, "≳", "\\gtrsim", !0), Je(nt, Fe, kt, "⪆", "\\gtrapprox", !0), Je(nt, Fe, Mt, "⋗", "\\gtrdot"), Je(nt, Fe, kt, "⋙", "\\ggg", !0), Je(nt, Fe, kt, "≷", "\\gtrless", !0), Je(nt, Fe, kt, "⋛", "\\gtreqless", !0), Je(nt, Fe, kt, "⪌", "\\gtreqqless", !0), Je(nt, Fe, kt, "≖", "\\eqcirc", !0), Je(nt, Fe, kt, "≗", "\\circeq", !0), Je(nt, Fe, kt, "≜", "\\triangleq", !0), Je(nt, Fe, kt, "∼", "\\thicksim"), Je(nt, Fe, kt, "≈", "\\thickapprox"), Je(nt, Fe, kt, "⫆", "\\supseteqq", !0), Je(nt, Fe, kt, "⋑", "\\Supset", !0), Je(nt, Fe, kt, "⊐", "\\sqsupset", !0), Je(nt, Fe, kt, "≽", "\\succcurlyeq", !0), Je(nt, Fe, kt, "⋟", "\\curlyeqsucc", !0), Je(nt, Fe, kt, "≿", "\\succsim", !0), Je(nt, Fe, kt, "⪸", "\\succapprox", !0), Je(nt, Fe, kt, "⊳", "\\vartriangleright"), Je(nt, Fe, kt, "⊵", "\\trianglerighteq"), Je(nt, Fe, kt, "⊩", "\\Vdash", !0), Je(nt, Fe, kt, "∣", "\\shortmid"), Je(nt, Fe, kt, "∥", "\\shortparallel"), Je(nt, Fe, kt, "≬", "\\between", !0), Je(nt, Fe, kt, "⋔", "\\pitchfork", !0), Je(nt, Fe, kt, "∝", "\\varpropto"), Je(nt, Fe, kt, "◀", "\\blacktriangleleft"), Je(nt, Fe, kt, "∴", "\\therefore", !0), Je(nt, Fe, kt, "∍", "\\backepsilon"), Je(nt, Fe, kt, "▶", "\\blacktriangleright"), Je(nt, Fe, kt, "∵", "\\because", !0), Je(nt, Fe, kt, "⋘", "\\llless"), Je(nt, Fe, kt, "⋙", "\\gggtr"), Je(nt, Fe, Mt, "⊲", "\\lhd"), Je(nt, Fe, Mt, "⊳", "\\rhd"), Je(nt, Fe, kt, "≂", "\\eqsim", !0), Je(nt, Ye, kt, "⋈", "\\Join"), Je(nt, Fe, kt, "≑", "\\Doteq", !0), Je(nt, Fe, Mt, "∔", "\\dotplus", !0), Je(nt, Fe, Mt, "∖", "\\smallsetminus"), Je(nt, Fe, Mt, "⋒", "\\Cap", !0), Je(nt, Fe, Mt, "⋓", "\\Cup", !0), Je(nt, Fe, Mt, "⩞", "\\doublebarwedge", !0), Je(nt, Fe, Mt, "⊟", "\\boxminus", !0), Je(nt, Fe, Mt, "⊞", "\\boxplus", !0), Je(nt, Fe, Mt, "⋇", "\\divideontimes", !0), Je(nt, Fe, Mt, "⋉", "\\ltimes", !0), Je(nt, Fe, Mt, "⋊", "\\rtimes", !0), Je(nt, Fe, Mt, "⋋", "\\leftthreetimes", !0), Je(nt, Fe, Mt, "⋌", "\\rightthreetimes", !0), Je(nt, Fe, Mt, "⋏", "\\curlywedge", !0), Je(nt, Fe, Mt, "⋎", "\\curlyvee", !0), Je(nt, Fe, Mt, "⊝", "\\circleddash", !0), Je(nt, Fe, Mt, "⊛", "\\circledast", !0), Je(nt, Fe, Mt, "⋅", "\\centerdot"), Je(nt, Fe, Mt, "⊺", "\\intercal", !0), Je(nt, Fe, Mt, "⋒", "\\doublecap"), Je(nt, Fe, Mt, "⋓", "\\doublecup"), Je(nt, Fe, Mt, "⊠", "\\boxtimes", !0), Je(nt, Fe, kt, "⇢", "\\dashrightarrow", !0), Je(nt, Fe, kt, "⇠", "\\dashleftarrow", !0), Je(nt, Fe, kt, "⇇", "\\leftleftarrows", !0), Je(nt, Fe, kt, "⇆", "\\leftrightarrows", !0), Je(nt, Fe, kt, "⇚", "\\Lleftarrow", !0), Je(nt, Fe, kt, "↞", "\\twoheadleftarrow", !0), Je(nt, Fe, kt, "↢", "\\leftarrowtail", !0), Je(nt, Fe, kt, "↫", "\\looparrowleft", !0), Je(nt, Fe, kt, "⇋", "\\leftrightharpoons", !0), Je(nt, Fe, kt, "↶", "\\curvearrowleft", !0), Je(nt, Fe, kt, "↺", "\\circlearrowleft", !0), Je(nt, Fe, kt, "↰", "\\Lsh", !0), Je(nt, Fe, kt, "⇈", "\\upuparrows", !0), Je(nt, Fe, kt, "↿", "\\upharpoonleft", !0), Je(nt, Fe, kt, "⇃", "\\downharpoonleft", !0), Je(nt, Ye, kt, "⊶", "\\origof", !0), Je(nt, Ye, kt, "⊷", "\\imageof", !0), Je(nt, Fe, kt, "⊸", "\\multimap", !0), Je(nt, Fe, kt, "↭", "\\leftrightsquigarrow", !0), Je(nt, Fe, kt, "⇉", "\\rightrightarrows", !0), Je(nt, Fe, kt, "⇄", "\\rightleftarrows", !0), Je(nt, Fe, kt, "↠", "\\twoheadrightarrow", !0), Je(nt, Fe, kt, "↣", "\\rightarrowtail", !0), Je(nt, Fe, kt, "↬", "\\looparrowright", !0), Je(nt, Fe, kt, "↷", "\\curvearrowright", !0), Je(nt, Fe, kt, "↻", "\\circlearrowright", !0), Je(nt, Fe, kt, "↱", "\\Rsh", !0), Je(nt, Fe, kt, "⇊", "\\downdownarrows", !0), Je(nt, Fe, kt, "↾", "\\upharpoonright", !0), Je(nt, Fe, kt, "⇂", "\\downharpoonright", !0), Je(nt, Fe, kt, "⇝", "\\rightsquigarrow", !0), Je(nt, Fe, kt, "⇝", "\\leadsto"), Je(nt, Fe, kt, "⇛", "\\Rrightarrow", !0), Je(nt, Fe, kt, "↾", "\\restriction"), Je(nt, Ye, xt, "‘", "`"), Je(nt, Ye, xt, "$", "\\$"), Je(ot, Ye, xt, "$", "\\$"), Je(ot, Ye, xt, "$", "\\textdollar"), Je(nt, Ye, xt, "%", "\\%"), Je(ot, Ye, xt, "%", "\\%"), Je(nt, Ye, xt, "_", "\\_"), Je(ot, Ye, xt, "_", "\\_"), Je(ot, Ye, xt, "_", "\\textunderscore"), Je(nt, Ye, xt, "∠", "\\angle", !0), Je(nt, Ye, xt, "∞", "\\infty", !0), Je(nt, Ye, xt, "′", "\\prime"), Je(nt, Ye, xt, "△", "\\triangle"), Je(nt, Ye, xt, "Γ", "\\Gamma", !0), Je(nt, Ye, xt, "Δ", "\\Delta", !0), Je(nt, Ye, xt, "Θ", "\\Theta", !0), Je(nt, Ye, xt, "Λ", "\\Lambda", !0), Je(nt, Ye, xt, "Ξ", "\\Xi", !0), Je(nt, Ye, xt, "Π", "\\Pi", !0), Je(nt, Ye, xt, "Σ", "\\Sigma", !0), Je(nt, Ye, xt, "Υ", "\\Upsilon", !0), Je(nt, Ye, xt, "Φ", "\\Phi", !0), Je(nt, Ye, xt, "Ψ", "\\Psi", !0), Je(nt, Ye, xt, "Ω", "\\Omega", !0), Je(nt, Ye, xt, "A", "Α"), Je(nt, Ye, xt, "B", "Β"), Je(nt, Ye, xt, "E", "Ε"), Je(nt, Ye, xt, "Z", "Ζ"), Je(nt, Ye, xt, "H", "Η"), Je(nt, Ye, xt, "I", "Ι"), Je(nt, Ye, xt, "K", "Κ"), Je(nt, Ye, xt, "M", "Μ"), Je(nt, Ye, xt, "N", "Ν"), Je(nt, Ye, xt, "O", "Ο"), Je(nt, Ye, xt, "P", "Ρ"), Je(nt, Ye, xt, "T", "Τ"), Je(nt, Ye, xt, "X", "Χ"), Je(nt, Ye, xt, "¬", "\\neg", !0), Je(nt, Ye, xt, "¬", "\\lnot"), Je(nt, Ye, xt, "⊤", "\\top"), Je(nt, Ye, xt, "⊥", "\\bot"), Je(nt, Ye, xt, "∅", "\\emptyset"), Je(nt, Fe, xt, "∅", "\\varnothing"), Je(nt, Ye, Ft, "α", "\\alpha", !0), Je(nt, Ye, Ft, "β", "\\beta", !0), Je(nt, Ye, Ft, "γ", "\\gamma", !0), Je(nt, Ye, Ft, "δ", "\\delta", !0), Je(nt, Ye, Ft, "ϵ", "\\epsilon", !0), Je(nt, Ye, Ft, "ζ", "\\zeta", !0), Je(nt, Ye, Ft, "η", "\\eta", !0), Je(nt, Ye, Ft, "θ", "\\theta", !0), Je(nt, Ye, Ft, "ι", "\\iota", !0), Je(nt, Ye, Ft, "κ", "\\kappa", !0), Je(nt, Ye, Ft, "λ", "\\lambda", !0), Je(nt, Ye, Ft, "μ", "\\mu", !0), Je(nt, Ye, Ft, "ν", "\\nu", !0), Je(nt, Ye, Ft, "ξ", "\\xi", !0), Je(nt, Ye, Ft, "ο", "\\omicron", !0), Je(nt, Ye, Ft, "π", "\\pi", !0), Je(nt, Ye, Ft, "ρ", "\\rho", !0), Je(nt, Ye, Ft, "σ", "\\sigma", !0), Je(nt, Ye, Ft, "τ", "\\tau", !0), Je(nt, Ye, Ft, "υ", "\\upsilon", !0), Je(nt, Ye, Ft, "ϕ", "\\phi", !0), Je(nt, Ye, Ft, "χ", "\\chi", !0), Je(nt, Ye, Ft, "ψ", "\\psi", !0), Je(nt, Ye, Ft, "ω", "\\omega", !0), Je(nt, Ye, Ft, "ε", "\\varepsilon", !0), Je(nt, Ye, Ft, "ϑ", "\\vartheta", !0), Je(nt, Ye, Ft, "ϖ", "\\varpi", !0), Je(nt, Ye, Ft, "ϱ", "\\varrho", !0), Je(nt, Ye, Ft, "ς", "\\varsigma", !0), Je(nt, Ye, Ft, "φ", "\\varphi", !0), Je(nt, Ye, Mt, "∗", "*", !0), Je(nt, Ye, Mt, "+", "+"), Je(nt, Ye, Mt, "−", "-", !0), Je(nt, Ye, Mt, "⋅", "\\cdot", !0), Je(nt, Ye, Mt, "∘", "\\circ", !0), Je(nt, Ye, Mt, "÷", "\\div", !0), Je(nt, Ye, Mt, "±", "\\pm", !0), Je(nt, Ye, Mt, "×", "\\times", !0), Je(nt, Ye, Mt, "∩", "\\cap", !0), Je(nt, Ye, Mt, "∪", "\\cup", !0), Je(nt, Ye, Mt, "∖", "\\setminus", !0), Je(nt, Ye, Mt, "∧", "\\land"), Je(nt, Ye, Mt, "∨", "\\lor"), Je(nt, Ye, Mt, "∧", "\\wedge", !0), Je(nt, Ye, Mt, "∨", "\\vee", !0), Je(nt, Ye, xt, "√", "\\surd"), Je(nt, Ye, st, "⟨", "\\langle", !0), Je(nt, Ye, st, "∣", "\\lvert"), Je(nt, Ye, st, "∥", "\\lVert"), Je(nt, Ye, At, "?", "?"), Je(nt, Ye, At, "!", "!"), Je(nt, Ye, At, "⟩", "\\rangle", !0), Je(nt, Ye, At, "∣", "\\rvert"), Je(nt, Ye, At, "∥", "\\rVert"), Je(nt, Ye, kt, "=", "="), Je(nt, Ye, kt, ":", ":"), Je(nt, Ye, kt, "≈", "\\approx", !0), Je(nt, Ye, kt, "≅", "\\cong", !0), Je(nt, Ye, kt, "≥", "\\ge"), Je(nt, Ye, kt, "≥", "\\geq", !0), Je(nt, Ye, kt, "←", "\\gets"), Je(nt, Ye, kt, ">", "\\gt", !0), Je(nt, Ye, kt, "∈", "\\in", !0), Je(nt, Ye, kt, "", "\\@not"), Je(nt, Ye, kt, "⊂", "\\subset", !0), Je(nt, Ye, kt, "⊃", "\\supset", !0), Je(nt, Ye, kt, "⊆", "\\subseteq", !0), Je(nt, Ye, kt, "⊇", "\\supseteq", !0), Je(nt, Fe, kt, "⊈", "\\nsubseteq", !0), Je(nt, Fe, kt, "⊉", "\\nsupseteq", !0), Je(nt, Ye, kt, "⊨", "\\models"), Je(nt, Ye, kt, "←", "\\leftarrow", !0), Je(nt, Ye, kt, "≤", "\\le"), Je(nt, Ye, kt, "≤", "\\leq", !0), Je(nt, Ye, kt, "<", "\\lt", !0), Je(nt, Ye, kt, "→", "\\rightarrow", !0), Je(nt, Ye, kt, "→", "\\to"), Je(nt, Fe, kt, "≱", "\\ngeq", !0), Je(nt, Fe, kt, "≰", "\\nleq", !0), Je(nt, Ye, Bt, " ", "\\ "), Je(nt, Ye, Bt, " ", "\\space"), Je(nt, Ye, Bt, " ", "\\nobreakspace"), Je(ot, Ye, Bt, " ", "\\ "), Je(ot, Ye, Bt, " ", " "), Je(ot, Ye, Bt, " ", "\\space"), Je(ot, Ye, Bt, " ", "\\nobreakspace"), Je(nt, Ye, Bt, null, "\\nobreak"), Je(nt, Ye, Bt, null, "\\allowbreak"), Je(nt, Ye, Ot, ",", ","), Je(nt, Ye, Ot, ";", ";"), Je(nt, Fe, Mt, "⊼", "\\barwedge", !0), Je(nt, Fe, Mt, "⊻", "\\veebar", !0), Je(nt, Ye, Mt, "⊙", "\\odot", !0), Je(nt, Ye, Mt, "⊕", "\\oplus", !0), Je(nt, Ye, Mt, "⊗", "\\otimes", !0), Je(nt, Ye, xt, "∂", "\\partial", !0), Je(nt, Ye, Mt, "⊘", "\\oslash", !0), Je(nt, Fe, Mt, "⊚", "\\circledcirc", !0), Je(nt, Fe, Mt, "⊡", "\\boxdot", !0), Je(nt, Ye, Mt, "△", "\\bigtriangleup"), Je(nt, Ye, Mt, "▽", "\\bigtriangledown"), Je(nt, Ye, Mt, "†", "\\dagger"), Je(nt, Ye, Mt, "⋄", "\\diamond"), Je(nt, Ye, Mt, "⋆", "\\star"), Je(nt, Ye, Mt, "◃", "\\triangleleft"), Je(nt, Ye, Mt, "▹", "\\triangleright"), Je(nt, Ye, st, "{", "\\{"), Je(ot, Ye, xt, "{", "\\{"), Je(ot, Ye, xt, "{", "\\textbraceleft"), Je(nt, Ye, At, "}", "\\}"), Je(ot, Ye, xt, "}", "\\}"), Je(ot, Ye, xt, "}", "\\textbraceright"), Je(nt, Ye, st, "{", "\\lbrace"), Je(nt, Ye, At, "}", "\\rbrace"), Je(nt, Ye, st, "[", "\\lbrack", !0), Je(ot, Ye, xt, "[", "\\lbrack", !0), Je(nt, Ye, At, "]", "\\rbrack", !0), Je(ot, Ye, xt, "]", "\\rbrack", !0), Je(nt, Ye, st, "(", "\\lparen", !0), Je(nt, Ye, At, ")", "\\rparen", !0), Je(ot, Ye, xt, "<", "\\textless", !0), Je(ot, Ye, xt, ">", "\\textgreater", !0), Je(nt, Ye, st, "⌊", "\\lfloor", !0), Je(nt, Ye, At, "⌋", "\\rfloor", !0), Je(nt, Ye, st, "⌈", "\\lceil", !0), Je(nt, Ye, At, "⌉", "\\rceil", !0), Je(nt, Ye, xt, "\\", "\\backslash"), Je(nt, Ye, xt, "∣", "|"), Je(nt, Ye, xt, "∣", "\\vert"), Je(ot, Ye, xt, "|", "\\textbar", !0), Je(nt, Ye, xt, "∥", "\\|"), Je(nt, Ye, xt, "∥", "\\Vert"), Je(ot, Ye, xt, "∥", "\\textbardbl"), Je(ot, Ye, xt, "~", "\\textasciitilde"), Je(ot, Ye, xt, "\\", "\\textbackslash"), Je(ot, Ye, xt, "^", "\\textasciicircum"), Je(nt, Ye, kt, "↑", "\\uparrow", !0), Je(nt, Ye, kt, "⇑", "\\Uparrow", !0), Je(nt, Ye, kt, "↓", "\\downarrow", !0), Je(nt, Ye, kt, "⇓", "\\Downarrow", !0), Je(nt, Ye, kt, "↕", "\\updownarrow", !0), Je(nt, Ye, kt, "⇕", "\\Updownarrow", !0), Je(nt, Ye, lt, "∐", "\\coprod"), Je(nt, Ye, lt, "⋁", "\\bigvee"), Je(nt, Ye, lt, "⋀", "\\bigwedge"), Je(nt, Ye, lt, "⨄", "\\biguplus"), Je(nt, Ye, lt, "⋂", "\\bigcap"), Je(nt, Ye, lt, "⋃", "\\bigcup"), Je(nt, Ye, lt, "∫", "\\int"), Je(nt, Ye, lt, "∫", "\\intop"), Je(nt, Ye, lt, "∬", "\\iint"), Je(nt, Ye, lt, "∭", "\\iiint"), Je(nt, Ye, lt, "∏", "\\prod"), Je(nt, Ye, lt, "∑", "\\sum"), Je(nt, Ye, lt, "⨂", "\\bigotimes"), Je(nt, Ye, lt, "⨁", "\\bigoplus"), Je(nt, Ye, lt, "⨀", "\\bigodot"), Je(nt, Ye, lt, "∮", "\\oint"), Je(nt, Ye, lt, "∯", "\\oiint"), Je(nt, Ye, lt, "∰", "\\oiiint"), Je(nt, Ye, lt, "⨆", "\\bigsqcup"), Je(nt, Ye, lt, "∫", "\\smallint"), Je(ot, Ye, Rt, "…", "\\textellipsis"), Je(nt, Ye, Rt, "…", "\\mathellipsis"), Je(ot, Ye, Rt, "…", "\\ldots", !0), Je(nt, Ye, Rt, "…", "\\ldots", !0), Je(nt, Ye, Rt, "⋯", "\\@cdots", !0), Je(nt, Ye, Rt, "⋱", "\\ddots", !0), Je(nt, Ye, xt, "⋮", "\\varvdots"), Je(nt, Ye, pt, "ˊ", "\\acute"), Je(nt, Ye, pt, "ˋ", "\\grave"), Je(nt, Ye, pt, "¨", "\\ddot"), Je(nt, Ye, pt, "~", "\\tilde"), Je(nt, Ye, pt, "ˉ", "\\bar"), Je(nt, Ye, pt, "˘", "\\breve"), Je(nt, Ye, pt, "ˇ", "\\check"), Je(nt, Ye, pt, "^", "\\hat"), Je(nt, Ye, pt, "⃗", "\\vec"), Je(nt, Ye, pt, "˙", "\\dot"), Je(nt, Ye, pt, "˚", "\\mathring"), Je(nt, Ye, Ft, "", "\\@imath"), Je(nt, Ye, Ft, "", "\\@jmath"), Je(nt, Ye, xt, "ı", "ı"), Je(nt, Ye, xt, "ȷ", "ȷ"), Je(ot, Ye, xt, "ı", "\\i", !0), Je(ot, Ye, xt, "ȷ", "\\j", !0), Je(ot, Ye, xt, "ß", "\\ss", !0), Je(ot, Ye, xt, "æ", "\\ae", !0), Je(ot, Ye, xt, "œ", "\\oe", !0), Je(ot, Ye, xt, "ø", "\\o", !0), Je(ot, Ye, xt, "Æ", "\\AE", !0), Je(ot, Ye, xt, "Œ", "\\OE", !0), Je(ot, Ye, xt, "Ø", "\\O", !0), Je(ot, Ye, pt, "ˊ", "\\'"), Je(ot, Ye, pt, "ˋ", "\\`"), Je(ot, Ye, pt, "ˆ", "\\^"), Je(ot, Ye, pt, "˜", "\\~"), Je(ot, Ye, pt, "ˉ", "\\="), Je(ot, Ye, pt, "˘", "\\u"), Je(ot, Ye, pt, "˙", "\\."), Je(ot, Ye, pt, "¸", "\\c"), Je(ot, Ye, pt, "˚", "\\r"), Je(ot, Ye, pt, "ˇ", "\\v"), Je(ot, Ye, pt, "¨", '\\"'), Je(ot, Ye, pt, "˝", "\\H"), Je(ot, Ye, pt, "◯", "\\textcircled");
        const Jt = {
          "--": !0,
          "---": !0,
          "``": !0,
          "''": !0
        };
        Je(ot, Ye, xt, "–", "--", !0), Je(ot, Ye, xt, "–", "\\textendash"), Je(ot, Ye, xt, "—", "---", !0), Je(ot, Ye, xt, "—", "\\textemdash"), Je(ot, Ye, xt, "‘", "`", !0), Je(ot, Ye, xt, "‘", "\\textquoteleft"), Je(ot, Ye, xt, "’", "'", !0), Je(ot, Ye, xt, "’", "\\textquoteright"), Je(ot, Ye, xt, "“", "``", !0), Je(ot, Ye, xt, "“", "\\textquotedblleft"), Je(ot, Ye, xt, "”", "''", !0), Je(ot, Ye, xt, "”", "\\textquotedblright"), Je(nt, Ye, xt, "°", "\\degree", !0), Je(ot, Ye, xt, "°", "\\degree"), Je(ot, Ye, xt, "°", "\\textdegree", !0), Je(nt, Ye, xt, "£", "\\pounds"), Je(nt, Ye, xt, "£", "\\mathsterling", !0), Je(ot, Ye, xt, "£", "\\pounds"), Je(ot, Ye, xt, "£", "\\textsterling", !0), Je(nt, Fe, xt, "✠", "\\maltese"), Je(ot, Fe, xt, "✠", "\\maltese");
        const qt = '0123456789/@."';
        for (let He = 0; He < qt.length; He++) {
          const Pe = qt.charAt(He);
          Je(nt, Ye, xt, Pe, Pe);
        }
        const en = '0123456789!@*()-=+";:?/.,';
        for (let He = 0; He < en.length; He++) {
          const Pe = en.charAt(He);
          Je(ot, Ye, xt, Pe, Pe);
        }
        const Yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        for (let He = 0; He < Yt.length; He++) {
          const Pe = Yt.charAt(He);
          Je(nt, Ye, Ft, Pe, Pe), Je(ot, Ye, xt, Pe, Pe);
        }
        Je(nt, Fe, xt, "C", "ℂ"), Je(ot, Fe, xt, "C", "ℂ"), Je(nt, Fe, xt, "H", "ℍ"), Je(ot, Fe, xt, "H", "ℍ"), Je(nt, Fe, xt, "N", "ℕ"), Je(ot, Fe, xt, "N", "ℕ"), Je(nt, Fe, xt, "P", "ℙ"), Je(ot, Fe, xt, "P", "ℙ"), Je(nt, Fe, xt, "Q", "ℚ"), Je(ot, Fe, xt, "Q", "ℚ"), Je(nt, Fe, xt, "R", "ℝ"), Je(ot, Fe, xt, "R", "ℝ"), Je(nt, Fe, xt, "Z", "ℤ"), Je(ot, Fe, xt, "Z", "ℤ"), Je(nt, Ye, Ft, "h", "ℎ"), Je(ot, Ye, Ft, "h", "ℎ");
        let Ht = "";
        for (let He = 0; He < Yt.length; He++) {
          const Pe = Yt.charAt(He);
          Ht = String.fromCharCode(55349, 56320 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56372 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56424 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56580 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56684 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56736 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56788 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56840 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56944 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), He < 26 && (Ht = String.fromCharCode(55349, 56632 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 56476 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht));
        }
        Ht = "𝕜", Je(nt, Ye, Ft, "k", Ht), Je(ot, Ye, xt, "k", Ht);
        for (let He = 0; He < 10; He++) {
          const Pe = He.toString();
          Ht = String.fromCharCode(55349, 57294 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 57314 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 57324 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht), Ht = String.fromCharCode(55349, 57334 + He), Je(nt, Ye, Ft, Pe, Ht), Je(ot, Ye, xt, Pe, Ht);
        }
        const sn = "ÐÞþ";
        for (let He = 0; He < sn.length; He++) {
          const Pe = sn.charAt(He);
          Je(nt, Ye, Ft, Pe, Pe), Je(ot, Ye, xt, Pe, Pe);
        }
        const fn = [
          ["mathbf", "textbf", "Main-Bold"],
          // A-Z bold upright
          ["mathbf", "textbf", "Main-Bold"],
          // a-z bold upright
          ["mathnormal", "textit", "Math-Italic"],
          // A-Z italic
          ["mathnormal", "textit", "Math-Italic"],
          // a-z italic
          ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
          // A-Z bold italic
          ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
          // a-z bold italic
          // Map fancy A-Z letters to script, not calligraphic.
          // This aligns with unicode-math and math fonts (except Cambria Math).
          ["mathscr", "textscr", "Script-Regular"],
          // A-Z script
          ["", "", ""],
          // a-z script.  No font
          ["", "", ""],
          // A-Z bold script. No font
          ["", "", ""],
          // a-z bold script. No font
          ["mathfrak", "textfrak", "Fraktur-Regular"],
          // A-Z Fraktur
          ["mathfrak", "textfrak", "Fraktur-Regular"],
          // a-z Fraktur
          ["mathbb", "textbb", "AMS-Regular"],
          // A-Z double-struck
          ["mathbb", "textbb", "AMS-Regular"],
          // k double-struck
          // Note that we are using a bold font, but font metrics for regular Fraktur.
          ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
          // A-Z bold Fraktur
          ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
          // a-z bold Fraktur
          ["mathsf", "textsf", "SansSerif-Regular"],
          // A-Z sans-serif
          ["mathsf", "textsf", "SansSerif-Regular"],
          // a-z sans-serif
          ["mathboldsf", "textboldsf", "SansSerif-Bold"],
          // A-Z bold sans-serif
          ["mathboldsf", "textboldsf", "SansSerif-Bold"],
          // a-z bold sans-serif
          ["mathitsf", "textitsf", "SansSerif-Italic"],
          // A-Z italic sans-serif
          ["mathitsf", "textitsf", "SansSerif-Italic"],
          // a-z italic sans-serif
          ["", "", ""],
          // A-Z bold italic sans. No font
          ["", "", ""],
          // a-z bold italic sans. No font
          ["mathtt", "texttt", "Typewriter-Regular"],
          // A-Z monospace
          ["mathtt", "texttt", "Typewriter-Regular"]
          // a-z monospace
        ], In = [
          ["mathbf", "textbf", "Main-Bold"],
          // 0-9 bold
          ["", "", ""],
          // 0-9 double-struck. No KaTeX font.
          ["mathsf", "textsf", "SansSerif-Regular"],
          // 0-9 sans-serif
          ["mathboldsf", "textboldsf", "SansSerif-Bold"],
          // 0-9 bold sans-serif
          ["mathtt", "texttt", "Typewriter-Regular"]
          // 0-9 monospace
        ], zn = function(He, Pe) {
          const it = He.charCodeAt(0), bt = He.charCodeAt(1), Ue = (it - 55296) * 1024 + (bt - 56320) + 65536, Qe = Pe === "math" ? 0 : 1;
          if (119808 <= Ue && Ue < 120484) {
            const ht = Math.floor((Ue - 119808) / 26);
            return [fn[ht][2], fn[ht][Qe]];
          } else if (120782 <= Ue && Ue <= 120831) {
            const ht = Math.floor((Ue - 120782) / 10);
            return [In[ht][2], In[ht][Qe]];
          } else {
            if (Ue === 120485 || Ue === 120486)
              return [fn[0][2], fn[0][Qe]];
            if (120486 < Ue && Ue < 120782)
              return ["", ""];
            throw new o("Unsupported character: " + He);
          }
        }, Cn = function(He, Pe, it) {
          return St[it][He] && St[it][He].replace && (He = St[it][He].replace), {
            value: He,
            metrics: Me(He, Pe, it)
          };
        }, gn = function(He, Pe, it, bt, Ue) {
          const Qe = Cn(He, Pe, it), ht = Qe.metrics;
          He = Qe.value;
          let Z;
          if (ht) {
            let B = ht.italic;
            (it === "text" || bt && bt.font === "mathit") && (B = 0), Z = new _t(He, ht.height, ht.depth, B, ht.skew, ht.width, Ue);
          } else
            typeof console < "u" && console.warn("No character metrics " + ("for '" + He + "' in style '" + Pe + "' and mode '" + it + "'")), Z = new _t(He, 0, 0, 0, 0, 0, Ue);
          if (bt) {
            Z.maxFontSize = bt.sizeMultiplier, bt.style.isTight() && Z.classes.push("mtight");
            const B = bt.getColor();
            B && (Z.style.color = B);
          }
          return Z;
        }, Mn = function(He, Pe, it, bt) {
          return bt === void 0 && (bt = []), it.font === "boldsymbol" && Cn(He, "Main-Bold", Pe).metrics ? gn(He, "Main-Bold", Pe, it, bt.concat(["mathbf"])) : He === "\\" || St[Pe][He].font === "main" ? gn(He, "Main-Regular", Pe, it, bt) : gn(He, "AMS-Regular", Pe, it, bt.concat(["amsrm"]));
        }, Xn = function(He, Pe, it, bt, Ue) {
          return Ue !== "textord" && Cn(He, "Math-BoldItalic", Pe).metrics ? {
            fontName: "Math-BoldItalic",
            fontClass: "boldsymbol"
          } : {
            fontName: "Main-Bold",
            fontClass: "mathbf"
          };
        }, Pn = function(He, Pe, it) {
          const bt = He.mode, Ue = He.text, Qe = ["mord"], ht = bt === "math" || bt === "text" && Pe.font, Z = ht ? Pe.font : Pe.fontFamily;
          let B = "", y = "";
          if (Ue.charCodeAt(0) === 55349 && ([B, y] = zn(Ue, bt)), B.length > 0)
            return gn(Ue, B, bt, Pe, Qe.concat(y));
          if (Z) {
            let b, R;
            if (Z === "boldsymbol") {
              const j = Xn(Ue, bt, Pe, Qe, it);
              b = j.fontName, R = [j.fontClass];
            } else ht ? (b = Ir[Z].fontName, R = [Z]) : (b = mr(Z, Pe.fontWeight, Pe.fontShape), R = [Z, Pe.fontWeight, Pe.fontShape]);
            if (Cn(Ue, b, bt).metrics)
              return gn(Ue, b, bt, Pe, Qe.concat(R));
            if (Jt.hasOwnProperty(Ue) && b.slice(0, 10) === "Typewriter") {
              const j = [];
              for (let G = 0; G < Ue.length; G++)
                j.push(gn(Ue[G], b, bt, Pe, Qe.concat(R)));
              return Zn(j);
            }
          }
          if (it === "mathord")
            return gn(Ue, "Math-Italic", bt, Pe, Qe.concat(["mathnormal"]));
          if (it === "textord") {
            const b = St[bt][Ue] && St[bt][Ue].font;
            if (b === "ams") {
              const R = mr("amsrm", Pe.fontWeight, Pe.fontShape);
              return gn(Ue, R, bt, Pe, Qe.concat("amsrm", Pe.fontWeight, Pe.fontShape));
            } else if (b === "main" || !b) {
              const R = mr("textrm", Pe.fontWeight, Pe.fontShape);
              return gn(Ue, R, bt, Pe, Qe.concat(Pe.fontWeight, Pe.fontShape));
            } else {
              const R = mr(b, Pe.fontWeight, Pe.fontShape);
              return gn(Ue, R, bt, Pe, Qe.concat(R, Pe.fontWeight, Pe.fontShape));
            }
          } else
            throw new Error("unexpected type: " + it + " in makeOrd");
        }, wn = (He, Pe) => {
          if (Ke(He.classes) !== Ke(Pe.classes) || He.skew !== Pe.skew || He.maxFontSize !== Pe.maxFontSize)
            return !1;
          if (He.classes.length === 1) {
            const it = He.classes[0];
            if (it === "mbin" || it === "mord")
              return !1;
          }
          for (const it in He.style)
            if (He.style.hasOwnProperty(it) && He.style[it] !== Pe.style[it])
              return !1;
          for (const it in Pe.style)
            if (Pe.style.hasOwnProperty(it) && He.style[it] !== Pe.style[it])
              return !1;
          return !0;
        }, Rn = (He) => {
          for (let Pe = 0; Pe < He.length - 1; Pe++) {
            const it = He[Pe], bt = He[Pe + 1];
            it instanceof _t && bt instanceof _t && wn(it, bt) && (it.text += bt.text, it.height = Math.max(it.height, bt.height), it.depth = Math.max(it.depth, bt.depth), it.italic = bt.italic, He.splice(Pe + 1, 1), Pe--);
          }
          return He;
        }, _n = function(He) {
          let Pe = 0, it = 0, bt = 0;
          for (let Ue = 0; Ue < He.children.length; Ue++) {
            const Qe = He.children[Ue];
            Qe.height > Pe && (Pe = Qe.height), Qe.depth > it && (it = Qe.depth), Qe.maxFontSize > bt && (bt = Qe.maxFontSize);
          }
          He.height = Pe, He.depth = it, He.maxFontSize = bt;
        }, En = function(He, Pe, it, bt) {
          const Ue = new $e(He, Pe, it, bt);
          return _n(Ue), Ue;
        }, Kn = (He, Pe, it, bt) => new $e(He, Pe, it, bt), Wn = function(He, Pe, it) {
          const bt = En([He], [], Pe);
          return bt.height = Math.max(it || Pe.fontMetrics().defaultRuleThickness, Pe.minRuleThickness), bt.style.borderBottomWidth = je(bt.height), bt.maxFontSize = 1, bt;
        }, hr = function(He, Pe, it, bt) {
          const Ue = new Ze(He, Pe, it, bt);
          return _n(Ue), Ue;
        }, Zn = function(He) {
          const Pe = new ye(He);
          return _n(Pe), Pe;
        }, lr = function(He, Pe) {
          return He instanceof ye ? En([], [He], Pe) : He;
        }, cr = function(He) {
          if (He.positionType === "individualShift") {
            const it = He.children, bt = [it[0]], Ue = -it[0].shift - it[0].elem.depth;
            let Qe = Ue;
            for (let ht = 1; ht < it.length; ht++) {
              const Z = -it[ht].shift - Qe - it[ht].elem.depth, B = Z - (it[ht - 1].elem.height + it[ht - 1].elem.depth);
              Qe = Qe + Z, bt.push({
                type: "kern",
                size: B
              }), bt.push(it[ht]);
            }
            return {
              children: bt,
              depth: Ue
            };
          }
          let Pe;
          if (He.positionType === "top") {
            let it = He.positionData;
            for (let bt = 0; bt < He.children.length; bt++) {
              const Ue = He.children[bt];
              it -= Ue.type === "kern" ? Ue.size : Ue.elem.height + Ue.elem.depth;
            }
            Pe = it;
          } else if (He.positionType === "bottom")
            Pe = -He.positionData;
          else {
            const it = He.children[0];
            if (it.type !== "elem")
              throw new Error('First child must have type "elem".');
            if (He.positionType === "shift")
              Pe = -it.elem.depth - He.positionData;
            else if (He.positionType === "firstBaseline")
              Pe = -it.elem.depth;
            else
              throw new Error("Invalid positionType " + He.positionType + ".");
          }
          return {
            children: He.children,
            depth: Pe
          };
        }, zr = function(He, Pe) {
          const {
            children: it,
            depth: bt
          } = cr(He);
          let Ue = 0;
          for (let G = 0; G < it.length; G++) {
            const ie = it[G];
            if (ie.type === "elem") {
              const fe = ie.elem;
              Ue = Math.max(Ue, fe.maxFontSize, fe.height);
            }
          }
          Ue += 2;
          const Qe = En(["pstrut"], []);
          Qe.style.height = je(Ue);
          const ht = [];
          let Z = bt, B = bt, y = bt;
          for (let G = 0; G < it.length; G++) {
            const ie = it[G];
            if (ie.type === "kern")
              y += ie.size;
            else {
              const fe = ie.elem, xe = ie.wrapperClasses || [], Te = ie.wrapperStyle || {}, ze = En(xe, [Qe, fe], void 0, Te);
              ze.style.top = je(-Ue - y - fe.depth), ie.marginLeft && (ze.style.marginLeft = ie.marginLeft), ie.marginRight && (ze.style.marginRight = ie.marginRight), ht.push(ze), y += fe.height + fe.depth;
            }
            Z = Math.min(Z, y), B = Math.max(B, y);
          }
          const b = En(["vlist"], ht);
          b.style.height = je(B);
          let R;
          if (Z < 0) {
            const G = En([], []), ie = En(["vlist"], [G]);
            ie.style.height = je(-Z);
            const fe = En(["vlist-s"], [new _t("​")]);
            R = [En(["vlist-r"], [b, fe]), En(["vlist-r"], [ie])];
          } else
            R = [En(["vlist-r"], [b])];
          const j = En(["vlist-t"], R);
          return R.length === 2 && j.classes.push("vlist-t2"), j.height = B, j.depth = -Z, j;
        }, Wr = (He, Pe) => {
          const it = En(["mspace"], [], Pe), bt = Re(He, Pe);
          return it.style.marginRight = je(bt), it;
        }, mr = function(He, Pe, it) {
          let bt = "";
          switch (He) {
            case "amsrm":
              bt = "AMS";
              break;
            case "textrm":
              bt = "Main";
              break;
            case "textsf":
              bt = "SansSerif";
              break;
            case "texttt":
              bt = "Typewriter";
              break;
            default:
              bt = He;
          }
          let Ue;
          return Pe === "textbf" && it === "textit" ? Ue = "BoldItalic" : Pe === "textbf" ? Ue = "Bold" : Pe === "textit" ? Ue = "Italic" : Ue = "Regular", bt + "-" + Ue;
        }, Ir = {
          // styles
          mathbf: {
            variant: "bold",
            fontName: "Main-Bold"
          },
          mathrm: {
            variant: "normal",
            fontName: "Main-Regular"
          },
          textit: {
            variant: "italic",
            fontName: "Main-Italic"
          },
          mathit: {
            variant: "italic",
            fontName: "Main-Italic"
          },
          mathnormal: {
            variant: "italic",
            fontName: "Math-Italic"
          },
          // "boldsymbol" is missing because they require the use of multiple fonts:
          // Math-BoldItalic and Main-Bold.  This is handled by a special case in
          // makeOrd which ends up calling boldsymbol.
          // families
          mathbb: {
            variant: "double-struck",
            fontName: "AMS-Regular"
          },
          mathcal: {
            variant: "script",
            fontName: "Caligraphic-Regular"
          },
          mathfrak: {
            variant: "fraktur",
            fontName: "Fraktur-Regular"
          },
          mathscr: {
            variant: "script",
            fontName: "Script-Regular"
          },
          mathsf: {
            variant: "sans-serif",
            fontName: "SansSerif-Regular"
          },
          mathtt: {
            variant: "monospace",
            fontName: "Typewriter-Regular"
          }
        }, yr = {
          //   path, width, height
          vec: ["vec", 0.471, 0.714],
          // values from the font glyph
          oiintSize1: ["oiintSize1", 0.957, 0.499],
          // oval to overlay the integrand
          oiintSize2: ["oiintSize2", 1.472, 0.659],
          oiiintSize1: ["oiiintSize1", 1.304, 0.499],
          oiiintSize2: ["oiiintSize2", 1.98, 0.659]
        };
        var rn = {
          fontMap: Ir,
          makeSymbol: gn,
          mathsym: Mn,
          makeSpan: En,
          makeSvgSpan: Kn,
          makeLineSpan: Wn,
          makeAnchor: hr,
          makeFragment: Zn,
          wrapFragment: lr,
          makeVList: zr,
          makeOrd: Pn,
          makeGlue: Wr,
          staticSvg: function(He, Pe) {
            const [it, bt, Ue] = yr[He], Qe = new Dt(it), ht = new Pt([Qe], {
              width: je(bt),
              height: je(Ue),
              // Override CSS rule `.katex svg { width: 100% }`
              style: "width:" + je(bt),
              viewBox: "0 0 " + 1e3 * bt + " " + 1e3 * Ue,
              preserveAspectRatio: "xMinYMin"
            }), Z = Kn(["overlay"], [ht], Pe);
            return Z.height = Ue, Z.style.height = je(Ue), Z.style.width = je(bt), Z;
          },
          svgData: yr,
          tryCombineChars: Rn
        };
        const Tn = {
          number: 3,
          unit: "mu"
        }, sr = {
          number: 4,
          unit: "mu"
        }, $n = {
          number: 5,
          unit: "mu"
        }, ur = {
          mord: {
            mop: Tn,
            mbin: sr,
            mrel: $n,
            minner: Tn
          },
          mop: {
            mord: Tn,
            mop: Tn,
            mrel: $n,
            minner: Tn
          },
          mbin: {
            mord: sr,
            mop: sr,
            mopen: sr,
            minner: sr
          },
          mrel: {
            mord: $n,
            mop: $n,
            mopen: $n,
            minner: $n
          },
          mopen: {},
          mclose: {
            mop: Tn,
            mbin: sr,
            mrel: $n,
            minner: Tn
          },
          mpunct: {
            mord: Tn,
            mop: Tn,
            mrel: $n,
            mopen: Tn,
            mclose: Tn,
            mpunct: Tn,
            minner: Tn
          },
          minner: {
            mord: Tn,
            mop: Tn,
            mbin: sr,
            mrel: $n,
            mopen: Tn,
            mpunct: Tn,
            minner: Tn
          }
        }, Tr = {
          mord: {
            mop: Tn
          },
          mop: {
            mord: Tn,
            mop: Tn
          },
          mbin: {},
          mrel: {},
          mopen: {},
          mclose: {
            mop: Tn
          },
          mpunct: {},
          minner: {
            mop: Tn
          }
        }, wr = {}, Fr = {}, Xr = {};
        function un(He) {
          let {
            type: Pe,
            names: it,
            props: bt,
            handler: Ue,
            htmlBuilder: Qe,
            mathmlBuilder: ht
          } = He;
          const Z = {
            type: Pe,
            numArgs: bt.numArgs,
            argTypes: bt.argTypes,
            allowedInArgument: !!bt.allowedInArgument,
            allowedInText: !!bt.allowedInText,
            allowedInMath: bt.allowedInMath === void 0 ? !0 : bt.allowedInMath,
            numOptionalArgs: bt.numOptionalArgs || 0,
            infix: !!bt.infix,
            primitive: !!bt.primitive,
            handler: Ue
          };
          for (let B = 0; B < it.length; ++B)
            wr[it[B]] = Z;
          Pe && (Qe && (Fr[Pe] = Qe), ht && (Xr[Pe] = ht));
        }
        function Gn(He) {
          let {
            type: Pe,
            htmlBuilder: it,
            mathmlBuilder: bt
          } = He;
          un({
            type: Pe,
            names: [],
            props: {
              numArgs: 0
            },
            handler() {
              throw new Error("Should never be called.");
            },
            htmlBuilder: it,
            mathmlBuilder: bt
          });
        }
        const on = function(He) {
          return He.type === "ordgroup" && He.body.length === 1 ? He.body[0] : He;
        }, ln = function(He) {
          return He.type === "ordgroup" ? He.body : [He];
        }, bn = rn.makeSpan, Nn = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], jn = ["rightmost", "mrel", "mclose", "mpunct"], Jn = {
          display: $.DISPLAY,
          text: $.TEXT,
          script: $.SCRIPT,
          scriptscript: $.SCRIPTSCRIPT
        }, Hn = {
          mord: "mord",
          mop: "mop",
          mbin: "mbin",
          mrel: "mrel",
          mopen: "mopen",
          mclose: "mclose",
          mpunct: "mpunct",
          minner: "minner"
        }, Ln = function(He, Pe, it, bt) {
          bt === void 0 && (bt = [null, null]);
          const Ue = [];
          for (let y = 0; y < He.length; y++) {
            const b = ir(He[y], Pe);
            if (b instanceof ye) {
              const R = b.children;
              Ue.push(...R);
            } else
              Ue.push(b);
          }
          if (rn.tryCombineChars(Ue), !it)
            return Ue;
          let Qe = Pe;
          if (He.length === 1) {
            const y = He[0];
            y.type === "sizing" ? Qe = Pe.havingSize(y.size) : y.type === "styling" && (Qe = Pe.havingStyle(Jn[y.style]));
          }
          const ht = bn([bt[0] || "leftmost"], [], Pe), Z = bn([bt[1] || "rightmost"], [], Pe), B = it === "root";
          return pn(Ue, (y, b) => {
            const R = b.classes[0], j = y.classes[0];
            R === "mbin" && g.contains(jn, j) ? b.classes[0] = "mord" : j === "mbin" && g.contains(Nn, R) && (y.classes[0] = "mord");
          }, {
            node: ht
          }, Z, B), pn(Ue, (y, b) => {
            const R = nr(b), j = nr(y), G = R && j ? y.hasClass("mtight") ? Tr[R][j] : ur[R][j] : null;
            if (G)
              return rn.makeGlue(G, Qe);
          }, {
            node: ht
          }, Z, B), Ue;
        }, pn = function(He, Pe, it, bt, Ue) {
          bt && He.push(bt);
          let Qe = 0;
          for (; Qe < He.length; Qe++) {
            const ht = He[Qe], Z = dn(ht);
            if (Z) {
              pn(Z.children, Pe, it, null, Ue);
              continue;
            }
            const B = !ht.hasClass("mspace");
            if (B) {
              const y = Pe(ht, it.node);
              y && (it.insertAfter ? it.insertAfter(y) : (He.unshift(y), Qe++));
            }
            B ? it.node = ht : Ue && ht.hasClass("newline") && (it.node = bn(["leftmost"])), it.insertAfter = /* @__PURE__ */ ((y) => (b) => {
              He.splice(y + 1, 0, b), Qe++;
            })(Qe);
          }
          bt && He.pop();
        }, dn = function(He) {
          return He instanceof ye || He instanceof Ze || He instanceof $e && He.hasClass("enclosing") ? He : null;
        }, Dn = function(He, Pe) {
          const it = dn(He);
          if (it) {
            const bt = it.children;
            if (bt.length) {
              if (Pe === "right")
                return Dn(bt[bt.length - 1], "right");
              if (Pe === "left")
                return Dn(bt[0], "left");
            }
          }
          return He;
        }, nr = function(He, Pe) {
          return He ? (Pe && (He = Dn(He, Pe)), Hn[He.classes[0]] || null) : null;
        }, pr = function(He, Pe) {
          const it = ["nulldelimiter"].concat(He.baseSizingClasses());
          return bn(Pe.concat(it));
        }, ir = function(He, Pe, it) {
          if (!He)
            return bn();
          if (Fr[He.type]) {
            let bt = Fr[He.type](He, Pe);
            if (it && Pe.size !== it.size) {
              bt = bn(Pe.sizingClasses(it), [bt], Pe);
              const Ue = Pe.sizeMultiplier / it.sizeMultiplier;
              bt.height *= Ue, bt.depth *= Ue;
            }
            return bt;
          } else
            throw new o("Got group of unknown type: '" + He.type + "'");
        };
        function gr(He, Pe) {
          const it = bn(["base"], He, Pe), bt = bn(["strut"]);
          return bt.style.height = je(it.height + it.depth), it.depth && (bt.style.verticalAlign = je(-it.depth)), it.children.unshift(bt), it;
        }
        function Pr(He, Pe) {
          let it = null;
          He.length === 1 && He[0].type === "tag" && (it = He[0].tag, He = He[0].body);
          const bt = Ln(He, Pe, "root");
          let Ue;
          bt.length === 2 && bt[1].hasClass("tag") && (Ue = bt.pop());
          const Qe = [];
          let ht = [];
          for (let y = 0; y < bt.length; y++)
            if (ht.push(bt[y]), bt[y].hasClass("mbin") || bt[y].hasClass("mrel") || bt[y].hasClass("allowbreak")) {
              let b = !1;
              for (; y < bt.length - 1 && bt[y + 1].hasClass("mspace") && !bt[y + 1].hasClass("newline"); )
                y++, ht.push(bt[y]), bt[y].hasClass("nobreak") && (b = !0);
              b || (Qe.push(gr(ht, Pe)), ht = []);
            } else bt[y].hasClass("newline") && (ht.pop(), ht.length > 0 && (Qe.push(gr(ht, Pe)), ht = []), Qe.push(bt[y]));
          ht.length > 0 && Qe.push(gr(ht, Pe));
          let Z;
          it ? (Z = gr(Ln(it, Pe, !0)), Z.classes = ["tag"], Qe.push(Z)) : Ue && Qe.push(Ue);
          const B = bn(["katex-html"], Qe);
          if (B.setAttribute("aria-hidden", "true"), Z) {
            const y = Z.children[0];
            y.style.height = je(B.height + B.depth), B.depth && (y.style.verticalAlign = je(-B.depth));
          }
          return B;
        }
        function Cr(He) {
          return new ye(He);
        }
        class Er {
          constructor(Pe, it, bt) {
            this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = Pe, this.attributes = {}, this.children = it || [], this.classes = bt || [];
          }
          /**
           * Sets an attribute on a MathML node. MathML depends on attributes to convey a
           * semantic content, so this is used heavily.
           */
          setAttribute(Pe, it) {
            this.attributes[Pe] = it;
          }
          /**
           * Gets an attribute on a MathML node.
           */
          getAttribute(Pe) {
            return this.attributes[Pe];
          }
          /**
           * Converts the math node into a MathML-namespaced DOM element.
           */
          toNode() {
            const Pe = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
            for (const it in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, it) && Pe.setAttribute(it, this.attributes[it]);
            this.classes.length > 0 && (Pe.className = Ke(this.classes));
            for (let it = 0; it < this.children.length; it++)
              Pe.appendChild(this.children[it].toNode());
            return Pe;
          }
          /**
           * Converts the math node into an HTML markup string.
           */
          toMarkup() {
            let Pe = "<" + this.type;
            for (const it in this.attributes)
              Object.prototype.hasOwnProperty.call(this.attributes, it) && (Pe += " " + it + '="', Pe += g.escape(this.attributes[it]), Pe += '"');
            this.classes.length > 0 && (Pe += ' class ="' + g.escape(Ke(this.classes)) + '"'), Pe += ">";
            for (let it = 0; it < this.children.length; it++)
              Pe += this.children[it].toMarkup();
            return Pe += "</" + this.type + ">", Pe;
          }
          /**
           * Converts the math node into a string, similar to innerText, but escaped.
           */
          toText() {
            return this.children.map((Pe) => Pe.toText()).join("");
          }
        }
        class Sr {
          constructor(Pe) {
            this.text = void 0, this.text = Pe;
          }
          /**
           * Converts the text node into a DOM text node.
           */
          toNode() {
            return document.createTextNode(this.text);
          }
          /**
           * Converts the text node into escaped HTML markup
           * (representing the text itself).
           */
          toMarkup() {
            return g.escape(this.toText());
          }
          /**
           * Converts the text node into a string
           * (representing the text itself).
           */
          toText() {
            return this.text;
          }
        }
        class Dr {
          /**
           * Create a Space node with width given in CSS ems.
           */
          constructor(Pe) {
            this.width = void 0, this.character = void 0, this.width = Pe, Pe >= 0.05555 && Pe <= 0.05556 ? this.character = " " : Pe >= 0.1666 && Pe <= 0.1667 ? this.character = " " : Pe >= 0.2222 && Pe <= 0.2223 ? this.character = " " : Pe >= 0.2777 && Pe <= 0.2778 ? this.character = "  " : Pe >= -0.05556 && Pe <= -0.05555 ? this.character = " ⁣" : Pe >= -0.1667 && Pe <= -0.1666 ? this.character = " ⁣" : Pe >= -0.2223 && Pe <= -0.2222 ? this.character = " ⁣" : Pe >= -0.2778 && Pe <= -0.2777 ? this.character = " ⁣" : this.character = null;
          }
          /**
           * Converts the math node into a MathML-namespaced DOM element.
           */
          toNode() {
            if (this.character)
              return document.createTextNode(this.character);
            {
              const Pe = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
              return Pe.setAttribute("width", je(this.width)), Pe;
            }
          }
          /**
           * Converts the math node into an HTML markup string.
           */
          toMarkup() {
            return this.character ? "<mtext>" + this.character + "</mtext>" : '<mspace width="' + je(this.width) + '"/>';
          }
          /**
           * Converts the math node into a string, similar to innerText.
           */
          toText() {
            return this.character ? this.character : " ";
          }
        }
        var Qn = {
          MathNode: Er,
          TextNode: Sr,
          SpaceNode: Dr,
          newDocumentFragment: Cr
        };
        const ri = function(He, Pe, it) {
          return St[Pe][He] && St[Pe][He].replace && He.charCodeAt(0) !== 55349 && !(Jt.hasOwnProperty(He) && it && (it.fontFamily && it.fontFamily.slice(4, 6) === "tt" || it.font && it.font.slice(4, 6) === "tt")) && (He = St[Pe][He].replace), new Qn.TextNode(He);
        }, Zr = function(He) {
          return He.length === 1 ? He[0] : new Qn.MathNode("mrow", He);
        }, Br = function(He, Pe) {
          if (Pe.fontFamily === "texttt")
            return "monospace";
          if (Pe.fontFamily === "textsf")
            return Pe.fontShape === "textit" && Pe.fontWeight === "textbf" ? "sans-serif-bold-italic" : Pe.fontShape === "textit" ? "sans-serif-italic" : Pe.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
          if (Pe.fontShape === "textit" && Pe.fontWeight === "textbf")
            return "bold-italic";
          if (Pe.fontShape === "textit")
            return "italic";
          if (Pe.fontWeight === "textbf")
            return "bold";
          const it = Pe.font;
          if (!it || it === "mathnormal")
            return null;
          const bt = He.mode;
          if (it === "mathit")
            return "italic";
          if (it === "boldsymbol")
            return He.type === "textord" ? "bold" : "bold-italic";
          if (it === "mathbf")
            return "bold";
          if (it === "mathbb")
            return "double-struck";
          if (it === "mathfrak")
            return "fraktur";
          if (it === "mathscr" || it === "mathcal")
            return "script";
          if (it === "mathsf")
            return "sans-serif";
          if (it === "mathtt")
            return "monospace";
          let Ue = He.text;
          if (g.contains(["\\imath", "\\jmath"], Ue))
            return null;
          St[bt][Ue] && St[bt][Ue].replace && (Ue = St[bt][Ue].replace);
          const Qe = rn.fontMap[it].fontName;
          return Me(Ue, Qe, bt) ? rn.fontMap[it].variant : null;
        }, Yr = function(He, Pe, it) {
          if (He.length === 1) {
            const Qe = si(He[0], Pe);
            return it && Qe instanceof Er && Qe.type === "mo" && (Qe.setAttribute("lspace", "0em"), Qe.setAttribute("rspace", "0em")), [Qe];
          }
          const bt = [];
          let Ue;
          for (let Qe = 0; Qe < He.length; Qe++) {
            const ht = si(He[Qe], Pe);
            if (ht instanceof Er && Ue instanceof Er) {
              if (ht.type === "mtext" && Ue.type === "mtext" && ht.getAttribute("mathvariant") === Ue.getAttribute("mathvariant")) {
                Ue.children.push(...ht.children);
                continue;
              } else if (ht.type === "mn" && Ue.type === "mn") {
                Ue.children.push(...ht.children);
                continue;
              } else if (ht.type === "mi" && ht.children.length === 1 && Ue.type === "mn") {
                const Z = ht.children[0];
                if (Z instanceof Sr && Z.text === ".") {
                  Ue.children.push(...ht.children);
                  continue;
                }
              } else if (Ue.type === "mi" && Ue.children.length === 1) {
                const Z = Ue.children[0];
                if (Z instanceof Sr && Z.text === "̸" && (ht.type === "mo" || ht.type === "mi" || ht.type === "mn")) {
                  const B = ht.children[0];
                  B instanceof Sr && B.text.length > 0 && (B.text = B.text.slice(0, 1) + "̸" + B.text.slice(1), bt.pop());
                }
              }
            }
            bt.push(ht), Ue = ht;
          }
          return bt;
        }, yi = function(He, Pe, it) {
          return Zr(Yr(He, Pe, it));
        }, si = function(He, Pe) {
          if (!He)
            return new Qn.MathNode("mrow");
          if (Xr[He.type])
            return Xr[He.type](He, Pe);
          throw new o("Got group of unknown type: '" + He.type + "'");
        };
        function Pa(He, Pe, it, bt, Ue) {
          const Qe = Yr(He, it);
          let ht;
          Qe.length === 1 && Qe[0] instanceof Er && g.contains(["mrow", "mtable"], Qe[0].type) ? ht = Qe[0] : ht = new Qn.MathNode("mrow", Qe);
          const Z = new Qn.MathNode("annotation", [new Qn.TextNode(Pe)]);
          Z.setAttribute("encoding", "application/x-tex");
          const B = new Qn.MathNode("semantics", [ht, Z]), y = new Qn.MathNode("math", [B]);
          y.setAttribute("xmlns", "http://www.w3.org/1998/Math/MathML"), bt && y.setAttribute("display", "block");
          const b = Ue ? "katex" : "katex-mathml";
          return rn.makeSpan([b], [y]);
        }
        const Ni = function(He) {
          return new ge({
            style: He.displayMode ? $.DISPLAY : $.TEXT,
            maxSize: He.maxSize,
            minRuleThickness: He.minRuleThickness
          });
        }, To = function(He, Pe) {
          if (Pe.displayMode) {
            const it = ["katex-display"];
            Pe.leqno && it.push("leqno"), Pe.fleqn && it.push("fleqn"), He = rn.makeSpan(it, [He]);
          }
          return He;
        }, Ba = function(He, Pe, it) {
          const bt = Ni(it);
          let Ue;
          if (it.output === "mathml")
            return Pa(He, Pe, bt, it.displayMode, !0);
          if (it.output === "html") {
            const Qe = Pr(He, bt);
            Ue = rn.makeSpan(["katex"], [Qe]);
          } else {
            const Qe = Pa(He, Pe, bt, it.displayMode, !1), ht = Pr(He, bt);
            Ue = rn.makeSpan(["katex"], [Qe, ht]);
          }
          return To(Ue, it);
        }, eo = function(He, Pe, it) {
          const bt = Ni(it), Ue = Pr(He, bt), Qe = rn.makeSpan(["katex"], [Ue]);
          return To(Qe, it);
        }, Ds = {
          widehat: "^",
          widecheck: "ˇ",
          widetilde: "~",
          utilde: "~",
          overleftarrow: "←",
          underleftarrow: "←",
          xleftarrow: "←",
          overrightarrow: "→",
          underrightarrow: "→",
          xrightarrow: "→",
          underbrace: "⏟",
          overbrace: "⏞",
          overgroup: "⏠",
          undergroup: "⏡",
          overleftrightarrow: "↔",
          underleftrightarrow: "↔",
          xleftrightarrow: "↔",
          Overrightarrow: "⇒",
          xRightarrow: "⇒",
          overleftharpoon: "↼",
          xleftharpoonup: "↼",
          overrightharpoon: "⇀",
          xrightharpoonup: "⇀",
          xLeftarrow: "⇐",
          xLeftrightarrow: "⇔",
          xhookleftarrow: "↩",
          xhookrightarrow: "↪",
          xmapsto: "↦",
          xrightharpoondown: "⇁",
          xleftharpoondown: "↽",
          xrightleftharpoons: "⇌",
          xleftrightharpoons: "⇋",
          xtwoheadleftarrow: "↞",
          xtwoheadrightarrow: "↠",
          xlongequal: "=",
          xtofrom: "⇄",
          xrightleftarrows: "⇄",
          xrightequilibrium: "⇌",
          // Not a perfect match.
          xleftequilibrium: "⇋",
          // None better available.
          "\\cdrightarrow": "→",
          "\\cdleftarrow": "←",
          "\\cdlongequal": "="
        }, ji = function(He) {
          const Pe = new Qn.MathNode("mo", [new Qn.TextNode(Ds[He.replace(/^\\/, "")])]);
          return Pe.setAttribute("stretchy", "true"), Pe;
        }, Ao = {
          //   path(s), minWidth, height, align
          overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
          overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
          underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
          underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
          xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
          "\\cdrightarrow": [["rightarrow"], 3, 522, "xMaxYMin"],
          // CD minwwidth2.5pc
          xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
          "\\cdleftarrow": [["leftarrow"], 3, 522, "xMinYMin"],
          Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
          xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
          xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
          overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
          xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
          xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
          overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
          xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
          xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
          xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
          "\\cdlongequal": [["longequal"], 3, 334, "xMinYMin"],
          xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
          xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
          overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
          overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
          underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
          underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
          xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
          xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
          xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
          xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
          xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
          xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
          overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
          underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
          overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
          undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
          xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
          xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
          // The next three arrows are from the mhchem package.
          // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
          // document as \xrightarrow or \xrightleftharpoons. Those have
          // min-length = 1.75em, so we set min-length on these next three to match.
          xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
          xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
          xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
        }, dl = function(He) {
          return He.type === "ordgroup" ? He.body.length : 1;
        };
        var go = {
          encloseSpan: function(He, Pe, it, bt, Ue) {
            let Qe;
            const ht = He.height + He.depth + it + bt;
            if (/fbox|color|angl/.test(Pe)) {
              if (Qe = rn.makeSpan(["stretchy", Pe], [], Ue), Pe === "fbox") {
                const Z = Ue.color && Ue.getColor();
                Z && (Qe.style.borderColor = Z);
              }
            } else {
              const Z = [];
              /^[bx]cancel$/.test(Pe) && Z.push(new $t({
                x1: "0",
                y1: "0",
                x2: "100%",
                y2: "100%",
                "stroke-width": "0.046em"
              })), /^x?cancel$/.test(Pe) && Z.push(new $t({
                x1: "0",
                y1: "100%",
                x2: "100%",
                y2: "0",
                "stroke-width": "0.046em"
              }));
              const B = new Pt(Z, {
                width: "100%",
                height: je(ht)
              });
              Qe = rn.makeSvgSpan([], [B], Ue);
            }
            return Qe.height = ht, Qe.style.height = je(ht), Qe;
          },
          mathMLnode: ji,
          svgSpan: function(He, Pe) {
            function it() {
              let ht = 4e5;
              const Z = He.label.slice(1);
              if (g.contains(["widehat", "widecheck", "widetilde", "utilde"], Z)) {
                const y = dl(He.base);
                let b, R, j;
                if (y > 5)
                  Z === "widehat" || Z === "widecheck" ? (b = 420, ht = 2364, j = 0.42, R = Z + "4") : (b = 312, ht = 2340, j = 0.34, R = "tilde4");
                else {
                  const fe = [1, 1, 2, 2, 3, 3][y];
                  Z === "widehat" || Z === "widecheck" ? (ht = [0, 1062, 2364, 2364, 2364][fe], b = [0, 239, 300, 360, 420][fe], j = [0, 0.24, 0.3, 0.3, 0.36, 0.42][fe], R = Z + fe) : (ht = [0, 600, 1033, 2339, 2340][fe], b = [0, 260, 286, 306, 312][fe], j = [0, 0.26, 0.286, 0.3, 0.306, 0.34][fe], R = "tilde" + fe);
                }
                const G = new Dt(R), ie = new Pt([G], {
                  width: "100%",
                  height: je(j),
                  viewBox: "0 0 " + ht + " " + b,
                  preserveAspectRatio: "none"
                });
                return {
                  span: rn.makeSvgSpan([], [ie], Pe),
                  minWidth: 0,
                  height: j
                };
              } else {
                const B = [], y = Ao[Z], [b, R, j] = y, G = j / 1e3, ie = b.length;
                let fe, xe;
                if (ie === 1) {
                  const Te = y[3];
                  fe = ["hide-tail"], xe = [Te];
                } else if (ie === 2)
                  fe = ["halfarrow-left", "halfarrow-right"], xe = ["xMinYMin", "xMaxYMin"];
                else if (ie === 3)
                  fe = ["brace-left", "brace-center", "brace-right"], xe = ["xMinYMin", "xMidYMin", "xMaxYMin"];
                else
                  throw new Error(`Correct katexImagesData or update code here to support
                    ` + ie + " children.");
                for (let Te = 0; Te < ie; Te++) {
                  const ze = new Dt(b[Te]), Ve = new Pt([ze], {
                    width: "400em",
                    height: je(G),
                    viewBox: "0 0 " + ht + " " + j,
                    preserveAspectRatio: xe[Te] + " slice"
                  }), ut = rn.makeSvgSpan([fe[Te]], [Ve], Pe);
                  if (ie === 1)
                    return {
                      span: ut,
                      minWidth: R,
                      height: G
                    };
                  ut.style.height = je(G), B.push(ut);
                }
                return {
                  span: rn.makeSpan(["stretchy"], B, Pe),
                  minWidth: R,
                  height: G
                };
              }
            }
            const {
              span: bt,
              minWidth: Ue,
              height: Qe
            } = it();
            return bt.height = Qe, bt.style.height = je(Qe), Ue > 0 && (bt.style.minWidth = je(Ue)), bt;
          }
        };
        function Vi(He, Pe) {
          if (!He || He.type !== Pe)
            throw new Error("Expected node of type " + Pe + ", but got " + (He ? "node of type " + He.type : String(He)));
          return He;
        }
        function Ml(He) {
          const Pe = pl(He);
          if (!Pe)
            throw new Error("Expected node of symbol group type, but got " + (He ? "node of type " + He.type : String(He)));
          return Pe;
        }
        function pl(He) {
          return He && (He.type === "atom" || at.hasOwnProperty(He.type)) ? He : null;
        }
        const Zl = (He, Pe) => {
          let it, bt, Ue;
          He && He.type === "supsub" ? (bt = Vi(He.base, "accent"), it = bt.base, He.base = it, Ue = Wt(ir(He, Pe)), He.base = bt) : (bt = Vi(He, "accent"), it = bt.base);
          const Qe = ir(it, Pe.havingCrampedStyle()), ht = bt.isShifty && g.isCharacterBox(it);
          let Z = 0;
          if (ht) {
            const j = g.getBaseElem(it), G = ir(j, Pe.havingCrampedStyle());
            Z = Gt(G).skew;
          }
          const B = bt.label === "\\c";
          let y = B ? Qe.height + Qe.depth : Math.min(Qe.height, Pe.fontMetrics().xHeight), b;
          if (bt.isStretchy)
            b = go.svgSpan(bt, Pe), b = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: Qe
              }, {
                type: "elem",
                elem: b,
                wrapperClasses: ["svg-align"],
                wrapperStyle: Z > 0 ? {
                  width: "calc(100% - " + je(2 * Z) + ")",
                  marginLeft: je(2 * Z)
                } : void 0
              }]
            }, Pe);
          else {
            let j, G;
            bt.label === "\\vec" ? (j = rn.staticSvg("vec", Pe), G = rn.svgData.vec[1]) : (j = rn.makeOrd({
              mode: bt.mode,
              text: bt.label
            }, Pe, "textord"), j = Gt(j), j.italic = 0, G = j.width, B && (y += j.depth)), b = rn.makeSpan(["accent-body"], [j]);
            const ie = bt.label === "\\textcircled";
            ie && (b.classes.push("accent-full"), y = Qe.height);
            let fe = Z;
            ie || (fe -= G / 2), b.style.left = je(fe), bt.label === "\\textcircled" && (b.style.top = ".2em"), b = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: Qe
              }, {
                type: "kern",
                size: -y
              }, {
                type: "elem",
                elem: b
              }]
            }, Pe);
          }
          const R = rn.makeSpan(["mord", "accent"], [b], Pe);
          return Ue ? (Ue.children[0] = R, Ue.height = Math.max(R.height, Ue.height), Ue.classes[0] = "mord", Ue) : R;
        }, vs = (He, Pe) => {
          const it = He.isStretchy ? go.mathMLnode(He.label) : new Qn.MathNode("mo", [ri(He.label, He.mode)]), bt = new Qn.MathNode("mover", [si(He.base, Pe), it]);
          return bt.setAttribute("accent", "true"), bt;
        }, Xl = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((He) => "\\" + He).join("|"));
        un({
          type: "accent",
          names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
          props: {
            numArgs: 1
          },
          handler: (He, Pe) => {
            const it = on(Pe[0]), bt = !Xl.test(He.funcName), Ue = !bt || He.funcName === "\\widehat" || He.funcName === "\\widetilde" || He.funcName === "\\widecheck";
            return {
              type: "accent",
              mode: He.parser.mode,
              label: He.funcName,
              isStretchy: bt,
              isShifty: Ue,
              base: it
            };
          },
          htmlBuilder: Zl,
          mathmlBuilder: vs
        }), un({
          type: "accent",
          names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
          props: {
            numArgs: 1,
            allowedInText: !0,
            allowedInMath: !0,
            // unless in strict mode
            argTypes: ["primitive"]
          },
          handler: (He, Pe) => {
            const it = Pe[0];
            let bt = He.parser.mode;
            return bt === "math" && (He.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + He.funcName + " works only in text mode"), bt = "text"), {
              type: "accent",
              mode: bt,
              label: He.funcName,
              isStretchy: !1,
              isShifty: !0,
              base: it
            };
          },
          htmlBuilder: Zl,
          mathmlBuilder: vs
        }), un({
          type: "accentUnder",
          names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
          props: {
            numArgs: 1
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "accentUnder",
              mode: it.mode,
              label: bt,
              base: Ue
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = ir(He.base, Pe), bt = go.svgSpan(He, Pe), Ue = He.label === "\\utilde" ? 0.12 : 0, Qe = rn.makeVList({
              positionType: "top",
              positionData: it.height,
              children: [{
                type: "elem",
                elem: bt,
                wrapperClasses: ["svg-align"]
              }, {
                type: "kern",
                size: Ue
              }, {
                type: "elem",
                elem: it
              }]
            }, Pe);
            return rn.makeSpan(["mord", "accentunder"], [Qe], Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = go.mathMLnode(He.label), bt = new Qn.MathNode("munder", [si(He.base, Pe), it]);
            return bt.setAttribute("accentunder", "true"), bt;
          }
        });
        const xs = (He) => {
          const Pe = new Qn.MathNode("mpadded", He ? [He] : []);
          return Pe.setAttribute("width", "+0.6em"), Pe.setAttribute("lspace", "0.3em"), Pe;
        };
        un({
          type: "xArrow",
          names: [
            "\\xleftarrow",
            "\\xrightarrow",
            "\\xLeftarrow",
            "\\xRightarrow",
            "\\xleftrightarrow",
            "\\xLeftrightarrow",
            "\\xhookleftarrow",
            "\\xhookrightarrow",
            "\\xmapsto",
            "\\xrightharpoondown",
            "\\xrightharpoonup",
            "\\xleftharpoondown",
            "\\xleftharpoonup",
            "\\xrightleftharpoons",
            "\\xleftrightharpoons",
            "\\xlongequal",
            "\\xtwoheadrightarrow",
            "\\xtwoheadleftarrow",
            "\\xtofrom",
            // The next 3 functions are here to support the mhchem extension.
            // Direct use of these functions is discouraged and may break someday.
            "\\xrightleftarrows",
            "\\xrightequilibrium",
            "\\xleftequilibrium",
            // The next 3 functions are here only to support the {CD} environment.
            "\\\\cdrightarrow",
            "\\\\cdleftarrow",
            "\\\\cdlongequal"
          ],
          props: {
            numArgs: 1,
            numOptionalArgs: 1
          },
          handler(He, Pe, it) {
            let {
              parser: bt,
              funcName: Ue
            } = He;
            return {
              type: "xArrow",
              mode: bt.mode,
              label: Ue,
              body: Pe[0],
              below: it[0]
            };
          },
          // Flow is unable to correctly infer the type of `group`, even though it's
          // unambiguously determined from the passed-in `type` above.
          htmlBuilder(He, Pe) {
            const it = Pe.style;
            let bt = Pe.havingStyle(it.sup());
            const Ue = rn.wrapFragment(ir(He.body, bt, Pe), Pe), Qe = He.label.slice(0, 2) === "\\x" ? "x" : "cd";
            Ue.classes.push(Qe + "-arrow-pad");
            let ht;
            He.below && (bt = Pe.havingStyle(it.sub()), ht = rn.wrapFragment(ir(He.below, bt, Pe), Pe), ht.classes.push(Qe + "-arrow-pad"));
            const Z = go.svgSpan(He, Pe), B = -Pe.fontMetrics().axisHeight + 0.5 * Z.height;
            let y = -Pe.fontMetrics().axisHeight - 0.5 * Z.height - 0.111;
            (Ue.depth > 0.25 || He.label === "\\xleftequilibrium") && (y -= Ue.depth);
            let b;
            if (ht) {
              const R = -Pe.fontMetrics().axisHeight + ht.height + 0.5 * Z.height + 0.111;
              b = rn.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: Ue,
                  shift: y
                }, {
                  type: "elem",
                  elem: Z,
                  shift: B
                }, {
                  type: "elem",
                  elem: ht,
                  shift: R
                }]
              }, Pe);
            } else
              b = rn.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: Ue,
                  shift: y
                }, {
                  type: "elem",
                  elem: Z,
                  shift: B
                }]
              }, Pe);
            return b.children[0].children[0].children[1].classes.push("svg-align"), rn.makeSpan(["mrel", "x-arrow"], [b], Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = go.mathMLnode(He.label);
            it.setAttribute("minsize", He.label.charAt(0) === "x" ? "1.75em" : "3.0em");
            let bt;
            if (He.body) {
              const Ue = xs(si(He.body, Pe));
              if (He.below) {
                const Qe = xs(si(He.below, Pe));
                bt = new Qn.MathNode("munderover", [it, Qe, Ue]);
              } else
                bt = new Qn.MathNode("mover", [it, Ue]);
            } else if (He.below) {
              const Ue = xs(si(He.below, Pe));
              bt = new Qn.MathNode("munder", [it, Ue]);
            } else
              bt = xs(), bt = new Qn.MathNode("mover", [it, bt]);
            return bt;
          }
        });
        const ja = rn.makeSpan;
        function Mo(He, Pe) {
          const it = Ln(He.body, Pe, !0);
          return ja([He.mclass], it, Pe);
        }
        function Kl(He, Pe) {
          let it;
          const bt = Yr(He.body, Pe);
          return He.mclass === "minner" ? it = new Qn.MathNode("mpadded", bt) : He.mclass === "mord" ? He.isCharacterBox ? (it = bt[0], it.type = "mi") : it = new Qn.MathNode("mi", bt) : (He.isCharacterBox ? (it = bt[0], it.type = "mo") : it = new Qn.MathNode("mo", bt), He.mclass === "mbin" ? (it.attributes.lspace = "0.22em", it.attributes.rspace = "0.22em") : He.mclass === "mpunct" ? (it.attributes.lspace = "0em", it.attributes.rspace = "0.17em") : He.mclass === "mopen" || He.mclass === "mclose" ? (it.attributes.lspace = "0em", it.attributes.rspace = "0em") : He.mclass === "minner" && (it.attributes.lspace = "0.0556em", it.attributes.width = "+0.1111em")), it;
        }
        un({
          type: "mclass",
          names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
          props: {
            numArgs: 1,
            primitive: !0
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "mclass",
              mode: it.mode,
              mclass: "m" + bt.slice(5),
              // TODO(kevinb): don't prefix with 'm'
              body: ln(Ue),
              isCharacterBox: g.isCharacterBox(Ue)
            };
          },
          htmlBuilder: Mo,
          mathmlBuilder: Kl
        });
        const Xs = (He) => {
          const Pe = He.type === "ordgroup" && He.body.length ? He.body[0] : He;
          return Pe.type === "atom" && (Pe.family === "bin" || Pe.family === "rel") ? "m" + Pe.family : "mord";
        };
        un({
          type: "mclass",
          names: ["\\@binrel"],
          props: {
            numArgs: 2
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "mclass",
              mode: it.mode,
              mclass: Xs(Pe[0]),
              body: ln(Pe[1]),
              isCharacterBox: g.isCharacterBox(Pe[1])
            };
          }
        }), un({
          type: "mclass",
          names: ["\\stackrel", "\\overset", "\\underset"],
          props: {
            numArgs: 2
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[1], Qe = Pe[0];
            let ht;
            bt !== "\\stackrel" ? ht = Xs(Ue) : ht = "mrel";
            const Z = {
              type: "op",
              mode: Ue.mode,
              limits: !0,
              alwaysHandleSupSub: !0,
              parentIsSupSub: !1,
              symbol: !1,
              suppressBaseShift: bt !== "\\stackrel",
              body: ln(Ue)
            }, B = {
              type: "supsub",
              mode: Qe.mode,
              base: Z,
              sup: bt === "\\underset" ? null : Qe,
              sub: bt === "\\underset" ? Qe : null
            };
            return {
              type: "mclass",
              mode: it.mode,
              mclass: ht,
              body: [B],
              isCharacterBox: g.isCharacterBox(B)
            };
          },
          htmlBuilder: Mo,
          mathmlBuilder: Kl
        }), un({
          type: "pmb",
          names: ["\\pmb"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "pmb",
              mode: it.mode,
              mclass: Xs(Pe[0]),
              body: ln(Pe[0])
            };
          },
          htmlBuilder(He, Pe) {
            const it = Ln(He.body, Pe, !0), bt = rn.makeSpan([He.mclass], it, Pe);
            return bt.style.textShadow = "0.02em 0.01em 0.04px", bt;
          },
          mathmlBuilder(He, Pe) {
            const it = Yr(He.body, Pe), bt = new Qn.MathNode("mstyle", it);
            return bt.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), bt;
          }
        });
        const El = {
          ">": "\\\\cdrightarrow",
          "<": "\\\\cdleftarrow",
          "=": "\\\\cdlongequal",
          A: "\\uparrow",
          V: "\\downarrow",
          "|": "\\Vert",
          ".": "no arrow"
        }, Jl = () => ({
          type: "styling",
          body: [],
          mode: "math",
          style: "display"
        }), ml = (He) => He.type === "textord" && He.text === "@", mu = (He, Pe) => (He.type === "mathord" || He.type === "atom") && He.text === Pe;
        function gu(He, Pe, it) {
          const bt = El[He];
          switch (bt) {
            case "\\\\cdrightarrow":
            case "\\\\cdleftarrow":
              return it.callFunction(bt, [Pe[0]], [Pe[1]]);
            case "\\uparrow":
            case "\\downarrow": {
              const Ue = it.callFunction("\\\\cdleft", [Pe[0]], []), Qe = {
                type: "atom",
                text: bt,
                mode: "math",
                family: "rel"
              }, ht = it.callFunction("\\Big", [Qe], []), Z = it.callFunction("\\\\cdright", [Pe[1]], []), B = {
                type: "ordgroup",
                mode: "math",
                body: [Ue, ht, Z]
              };
              return it.callFunction("\\\\cdparent", [B], []);
            }
            case "\\\\cdlongequal":
              return it.callFunction("\\\\cdlongequal", [], []);
            case "\\Vert": {
              const Ue = {
                type: "textord",
                text: "\\Vert",
                mode: "math"
              };
              return it.callFunction("\\Big", [Ue], []);
            }
            default:
              return {
                type: "textord",
                text: " ",
                mode: "math"
              };
          }
        }
        function Ql(He) {
          const Pe = [];
          for (He.gullet.beginGroup(), He.gullet.macros.set("\\cr", "\\\\\\relax"), He.gullet.beginGroup(); ; ) {
            Pe.push(He.parseExpression(!1, "\\\\")), He.gullet.endGroup(), He.gullet.beginGroup();
            const Qe = He.fetch().text;
            if (Qe === "&" || Qe === "\\\\")
              He.consume();
            else if (Qe === "\\end") {
              Pe[Pe.length - 1].length === 0 && Pe.pop();
              break;
            } else
              throw new o("Expected \\\\ or \\cr or \\end", He.nextToken);
          }
          let it = [];
          const bt = [it];
          for (let Qe = 0; Qe < Pe.length; Qe++) {
            const ht = Pe[Qe];
            let Z = Jl();
            for (let B = 0; B < ht.length; B++)
              if (!ml(ht[B]))
                Z.body.push(ht[B]);
              else {
                it.push(Z), B += 1;
                const y = Ml(ht[B]).text, b = new Array(2);
                if (b[0] = {
                  type: "ordgroup",
                  mode: "math",
                  body: []
                }, b[1] = {
                  type: "ordgroup",
                  mode: "math",
                  body: []
                }, !("=|.".indexOf(y) > -1)) if ("<>AV".indexOf(y) > -1)
                  for (let G = 0; G < 2; G++) {
                    let ie = !0;
                    for (let fe = B + 1; fe < ht.length; fe++) {
                      if (mu(ht[fe], y)) {
                        ie = !1, B = fe;
                        break;
                      }
                      if (ml(ht[fe]))
                        throw new o("Missing a " + y + " character to complete a CD arrow.", ht[fe]);
                      b[G].body.push(ht[fe]);
                    }
                    if (ie)
                      throw new o("Missing a " + y + " character to complete a CD arrow.", ht[B]);
                  }
                else
                  throw new o('Expected one of "<>AV=|." after @', ht[B]);
                const j = {
                  type: "styling",
                  body: [gu(y, b, He)],
                  mode: "math",
                  style: "display"
                  // CD is always displaystyle.
                };
                it.push(j), Z = Jl();
              }
            Qe % 2 === 0 ? it.push(Z) : it.shift(), it = [], bt.push(it);
          }
          He.gullet.endGroup(), He.gullet.endGroup();
          const Ue = new Array(bt[0].length).fill({
            type: "align",
            align: "c",
            pregap: 0.25,
            // CD package sets \enskip between columns.
            postgap: 0.25
            // So pre and post each get half an \enskip, i.e. 0.25em.
          });
          return {
            type: "array",
            mode: "math",
            body: bt,
            arraystretch: 1,
            addJot: !0,
            rowGaps: [null],
            cols: Ue,
            colSeparationType: "CD",
            hLinesBeforeRow: new Array(bt.length + 1).fill([])
          };
        }
        un({
          type: "cdlabel",
          names: ["\\\\cdleft", "\\\\cdright"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            return {
              type: "cdlabel",
              mode: it.mode,
              side: bt.slice(4),
              label: Pe[0]
            };
          },
          htmlBuilder(He, Pe) {
            const it = Pe.havingStyle(Pe.style.sup()), bt = rn.wrapFragment(ir(He.label, it, Pe), Pe);
            return bt.classes.push("cd-label-" + He.side), bt.style.bottom = je(0.8 - bt.depth), bt.height = 0, bt.depth = 0, bt;
          },
          mathmlBuilder(He, Pe) {
            let it = new Qn.MathNode("mrow", [si(He.label, Pe)]);
            return it = new Qn.MathNode("mpadded", [it]), it.setAttribute("width", "0"), He.side === "left" && it.setAttribute("lspace", "-1width"), it.setAttribute("voffset", "0.7em"), it = new Qn.MathNode("mstyle", [it]), it.setAttribute("displaystyle", "false"), it.setAttribute("scriptlevel", "1"), it;
          }
        }), un({
          type: "cdlabelparent",
          names: ["\\\\cdparent"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "cdlabelparent",
              mode: it.mode,
              fragment: Pe[0]
            };
          },
          htmlBuilder(He, Pe) {
            const it = rn.wrapFragment(ir(He.fragment, Pe), Pe);
            return it.classes.push("cd-vert-arrow"), it;
          },
          mathmlBuilder(He, Pe) {
            return new Qn.MathNode("mrow", [si(He.fragment, Pe)]);
          }
        }), un({
          type: "textord",
          names: ["\\@char"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            const Ue = Vi(Pe[0], "ordgroup").body;
            let Qe = "";
            for (let B = 0; B < Ue.length; B++) {
              const y = Vi(Ue[B], "textord");
              Qe += y.text;
            }
            let ht = parseInt(Qe), Z;
            if (isNaN(ht))
              throw new o("\\@char has non-numeric argument " + Qe);
            if (ht < 0 || ht >= 1114111)
              throw new o("\\@char with invalid code point " + Qe);
            return ht <= 65535 ? Z = String.fromCharCode(ht) : (ht -= 65536, Z = String.fromCharCode((ht >> 10) + 55296, (ht & 1023) + 56320)), {
              type: "textord",
              mode: it.mode,
              text: Z
            };
          }
        });
        const Wo = (He, Pe) => {
          const it = Ln(He.body, Pe.withColor(He.color), !1);
          return rn.makeFragment(it);
        }, Mc = (He, Pe) => {
          const it = Yr(He.body, Pe.withColor(He.color)), bt = new Qn.MathNode("mstyle", it);
          return bt.setAttribute("mathcolor", He.color), bt;
        };
        un({
          type: "color",
          names: ["\\textcolor"],
          props: {
            numArgs: 2,
            allowedInText: !0,
            argTypes: ["color", "original"]
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            const bt = Vi(Pe[0], "color-token").color, Ue = Pe[1];
            return {
              type: "color",
              mode: it.mode,
              color: bt,
              body: ln(Ue)
            };
          },
          htmlBuilder: Wo,
          mathmlBuilder: Mc
        }), un({
          type: "color",
          names: ["\\color"],
          props: {
            numArgs: 1,
            allowedInText: !0,
            argTypes: ["color"]
          },
          handler(He, Pe) {
            let {
              parser: it,
              breakOnTokenText: bt
            } = He;
            const Ue = Vi(Pe[0], "color-token").color;
            it.gullet.macros.set("\\current@color", Ue);
            const Qe = it.parseExpression(!0, bt);
            return {
              type: "color",
              mode: it.mode,
              color: Ue,
              body: Qe
            };
          },
          htmlBuilder: Wo,
          mathmlBuilder: Mc
        }), un({
          type: "cr",
          names: ["\\\\"],
          props: {
            numArgs: 0,
            numOptionalArgs: 0,
            allowedInText: !0
          },
          handler(He, Pe, it) {
            let {
              parser: bt
            } = He;
            const Ue = bt.gullet.future().text === "[" ? bt.parseSizeGroup(!0) : null, Qe = !bt.settings.displayMode || !bt.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
            return {
              type: "cr",
              mode: bt.mode,
              newLine: Qe,
              size: Ue && Vi(Ue, "size").value
            };
          },
          // The following builders are called only at the top level,
          // not within tabular/array environments.
          htmlBuilder(He, Pe) {
            const it = rn.makeSpan(["mspace"], [], Pe);
            return He.newLine && (it.classes.push("newline"), He.size && (it.style.marginTop = je(Re(He.size, Pe)))), it;
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mspace");
            return He.newLine && (it.setAttribute("linebreak", "newline"), He.size && it.setAttribute("height", je(Re(He.size, Pe)))), it;
          }
        });
        const Xu = {
          "\\global": "\\global",
          "\\long": "\\\\globallong",
          "\\\\globallong": "\\\\globallong",
          "\\def": "\\gdef",
          "\\gdef": "\\gdef",
          "\\edef": "\\xdef",
          "\\xdef": "\\xdef",
          "\\let": "\\\\globallet",
          "\\futurelet": "\\\\globalfuture"
        }, yu = (He) => {
          const Pe = He.text;
          if (/^(?:[\\{}$&#^_]|EOF)$/.test(Pe))
            throw new o("Expected a control sequence", He);
          return Pe;
        }, ef = (He) => {
          let Pe = He.gullet.popToken();
          return Pe.text === "=" && (Pe = He.gullet.popToken(), Pe.text === " " && (Pe = He.gullet.popToken())), Pe;
        }, tf = (He, Pe, it, bt) => {
          let Ue = He.gullet.macros.get(it.text);
          Ue == null && (it.noexpand = !0, Ue = {
            tokens: [it],
            numArgs: 0,
            // reproduce the same behavior in expansion
            unexpandable: !He.gullet.isExpandable(it.text)
          }), He.gullet.macros.set(Pe, Ue, bt);
        };
        un({
          type: "internal",
          names: [
            "\\global",
            "\\long",
            "\\\\globallong"
            // can’t be entered directly
          ],
          props: {
            numArgs: 0,
            allowedInText: !0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He;
            Pe.consumeSpaces();
            const bt = Pe.fetch();
            if (Xu[bt.text])
              return (it === "\\global" || it === "\\\\globallong") && (bt.text = Xu[bt.text]), Vi(Pe.parseFunction(), "internal");
            throw new o("Invalid token after macro prefix", bt);
          }
        }), un({
          type: "internal",
          names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
          props: {
            numArgs: 0,
            allowedInText: !0,
            primitive: !0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He, bt = Pe.gullet.popToken();
            const Ue = bt.text;
            if (/^(?:[\\{}$&#^_]|EOF)$/.test(Ue))
              throw new o("Expected a control sequence", bt);
            let Qe = 0, ht;
            const Z = [[]];
            for (; Pe.gullet.future().text !== "{"; )
              if (bt = Pe.gullet.popToken(), bt.text === "#") {
                if (Pe.gullet.future().text === "{") {
                  ht = Pe.gullet.future(), Z[Qe].push("{");
                  break;
                }
                if (bt = Pe.gullet.popToken(), !/^[1-9]$/.test(bt.text))
                  throw new o('Invalid argument number "' + bt.text + '"');
                if (parseInt(bt.text) !== Qe + 1)
                  throw new o('Argument number "' + bt.text + '" out of order');
                Qe++, Z.push([]);
              } else {
                if (bt.text === "EOF")
                  throw new o("Expected a macro definition");
                Z[Qe].push(bt.text);
              }
            let {
              tokens: B
            } = Pe.gullet.consumeArg();
            return ht && B.unshift(ht), (it === "\\edef" || it === "\\xdef") && (B = Pe.gullet.expandTokens(B), B.reverse()), Pe.gullet.macros.set(Ue, {
              tokens: B,
              numArgs: Qe,
              delimiters: Z
            }, it === Xu[it]), {
              type: "internal",
              mode: Pe.mode
            };
          }
        }), un({
          type: "internal",
          names: [
            "\\let",
            "\\\\globallet"
            // can’t be entered directly
          ],
          props: {
            numArgs: 0,
            allowedInText: !0,
            primitive: !0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He;
            const bt = yu(Pe.gullet.popToken());
            Pe.gullet.consumeSpaces();
            const Ue = ef(Pe);
            return tf(Pe, bt, Ue, it === "\\\\globallet"), {
              type: "internal",
              mode: Pe.mode
            };
          }
        }), un({
          type: "internal",
          names: [
            "\\futurelet",
            "\\\\globalfuture"
            // can’t be entered directly
          ],
          props: {
            numArgs: 0,
            allowedInText: !0,
            primitive: !0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He;
            const bt = yu(Pe.gullet.popToken()), Ue = Pe.gullet.popToken(), Qe = Pe.gullet.popToken();
            return tf(Pe, bt, Qe, it === "\\\\globalfuture"), Pe.gullet.pushToken(Qe), Pe.gullet.pushToken(Ue), {
              type: "internal",
              mode: Pe.mode
            };
          }
        });
        const bs = function(He, Pe, it) {
          const bt = St.math[He] && St.math[He].replace, Ue = Me(bt || He, Pe, it);
          if (!Ue)
            throw new Error("Unsupported symbol " + He + " and font size " + Pe + ".");
          return Ue;
        }, Ec = function(He, Pe, it, bt) {
          const Ue = it.havingBaseStyle(Pe), Qe = rn.makeSpan(bt.concat(Ue.sizingClasses(it)), [He], it), ht = Ue.sizeMultiplier / it.sizeMultiplier;
          return Qe.height *= ht, Qe.depth *= ht, Qe.maxFontSize = Ue.sizeMultiplier, Qe;
        }, mh = function(He, Pe, it) {
          const bt = Pe.havingBaseStyle(it), Ue = (1 - Pe.sizeMultiplier / bt.sizeMultiplier) * Pe.fontMetrics().axisHeight;
          He.classes.push("delimcenter"), He.style.top = je(Ue), He.height -= Ue, He.depth += Ue;
        }, Eo = function(He, Pe, it, bt, Ue, Qe) {
          const ht = rn.makeSymbol(He, "Main-Regular", Ue, bt), Z = Ec(ht, Pe, bt, Qe);
          return it && mh(Z, bt, Pe), Z;
        }, ac = function(He, Pe, it, bt) {
          return rn.makeSymbol(He, "Size" + Pe + "-Regular", it, bt);
        }, Xi = function(He, Pe, it, bt, Ue, Qe) {
          const ht = ac(He, Pe, Ue, bt), Z = Ec(rn.makeSpan(["delimsizing", "size" + Pe], [ht], bt), $.TEXT, bt, Qe);
          return it && mh(Z, bt, $.TEXT), Z;
        }, eu = function(He, Pe, it) {
          let bt;
          return Pe === "Size1-Regular" ? bt = "delim-size1" : bt = "delim-size4", {
            type: "elem",
            elem: rn.makeSpan(["delimsizinginner", bt], [rn.makeSpan([], [rn.makeSymbol(He, Pe, it)])])
          };
        }, Ma = function(He, Pe, it) {
          const bt = pe["Size4-Regular"][He.charCodeAt(0)] ? pe["Size4-Regular"][He.charCodeAt(0)][4] : pe["Size1-Regular"][He.charCodeAt(0)][4], Ue = new Dt("inner", ae(He, Math.round(1e3 * Pe))), Qe = new Pt([Ue], {
            width: je(bt),
            height: je(Pe),
            // Override CSS rule `.katex svg { width: 100% }`
            style: "width:" + je(bt),
            viewBox: "0 0 " + 1e3 * bt + " " + Math.round(1e3 * Pe),
            preserveAspectRatio: "xMinYMin"
          }), ht = rn.makeSvgSpan([], [Qe], it);
          return ht.height = Pe, ht.style.height = je(Pe), ht.style.width = je(bt), {
            type: "elem",
            elem: ht
          };
        }, Ea = 8e-3, Ls = {
          type: "kern",
          size: -1 * Ea
        }, Bs = ["|", "\\lvert", "\\rvert", "\\vert"], oc = ["\\|", "\\lVert", "\\rVert", "\\Vert"], tu = function(He, Pe, it, bt, Ue, Qe) {
          let ht, Z, B, y, b = "", R = 0;
          ht = B = y = He, Z = null;
          let j = "Size1-Regular";
          He === "\\uparrow" ? B = y = "⏐" : He === "\\Uparrow" ? B = y = "‖" : He === "\\downarrow" ? ht = B = "⏐" : He === "\\Downarrow" ? ht = B = "‖" : He === "\\updownarrow" ? (ht = "\\uparrow", B = "⏐", y = "\\downarrow") : He === "\\Updownarrow" ? (ht = "\\Uparrow", B = "‖", y = "\\Downarrow") : g.contains(Bs, He) ? (B = "∣", b = "vert", R = 333) : g.contains(oc, He) ? (B = "∥", b = "doublevert", R = 556) : He === "[" || He === "\\lbrack" ? (ht = "⎡", B = "⎢", y = "⎣", j = "Size4-Regular", b = "lbrack", R = 667) : He === "]" || He === "\\rbrack" ? (ht = "⎤", B = "⎥", y = "⎦", j = "Size4-Regular", b = "rbrack", R = 667) : He === "\\lfloor" || He === "⌊" ? (B = ht = "⎢", y = "⎣", j = "Size4-Regular", b = "lfloor", R = 667) : He === "\\lceil" || He === "⌈" ? (ht = "⎡", B = y = "⎢", j = "Size4-Regular", b = "lceil", R = 667) : He === "\\rfloor" || He === "⌋" ? (B = ht = "⎥", y = "⎦", j = "Size4-Regular", b = "rfloor", R = 667) : He === "\\rceil" || He === "⌉" ? (ht = "⎤", B = y = "⎥", j = "Size4-Regular", b = "rceil", R = 667) : He === "(" || He === "\\lparen" ? (ht = "⎛", B = "⎜", y = "⎝", j = "Size4-Regular", b = "lparen", R = 875) : He === ")" || He === "\\rparen" ? (ht = "⎞", B = "⎟", y = "⎠", j = "Size4-Regular", b = "rparen", R = 875) : He === "\\{" || He === "\\lbrace" ? (ht = "⎧", Z = "⎨", y = "⎩", B = "⎪", j = "Size4-Regular") : He === "\\}" || He === "\\rbrace" ? (ht = "⎫", Z = "⎬", y = "⎭", B = "⎪", j = "Size4-Regular") : He === "\\lgroup" || He === "⟮" ? (ht = "⎧", y = "⎩", B = "⎪", j = "Size4-Regular") : He === "\\rgroup" || He === "⟯" ? (ht = "⎫", y = "⎭", B = "⎪", j = "Size4-Regular") : He === "\\lmoustache" || He === "⎰" ? (ht = "⎧", y = "⎭", B = "⎪", j = "Size4-Regular") : (He === "\\rmoustache" || He === "⎱") && (ht = "⎫", y = "⎩", B = "⎪", j = "Size4-Regular");
          const G = bs(ht, j, Ue), ie = G.height + G.depth, fe = bs(B, j, Ue), xe = fe.height + fe.depth, Te = bs(y, j, Ue), ze = Te.height + Te.depth;
          let Ve = 0, ut = 1;
          if (Z !== null) {
            const Qt = bs(Z, j, Ue);
            Ve = Qt.height + Qt.depth, ut = 2;
          }
          const gt = ie + ze + Ve, wt = Math.max(0, Math.ceil((Pe - gt) / (ut * xe))), Et = gt + wt * ut * xe;
          let zt = bt.fontMetrics().axisHeight;
          it && (zt *= bt.sizeMultiplier);
          const It = Et / 2 - zt, jt = [];
          if (b.length > 0) {
            const Qt = Et - ie - ze, Xt = Math.round(Et * 1e3), yn = me(b, Math.round(Qt * 1e3)), Sn = new Dt(b, yn), Un = (R / 1e3).toFixed(3) + "em", Vn = (Xt / 1e3).toFixed(3) + "em", Yn = new Pt([Sn], {
              width: Un,
              height: Vn,
              viewBox: "0 0 " + R + " " + Xt
            }), er = rn.makeSvgSpan([], [Yn], bt);
            er.height = Xt / 1e3, er.style.width = Un, er.style.height = Vn, jt.push({
              type: "elem",
              elem: er
            });
          } else {
            if (jt.push(eu(y, j, Ue)), jt.push(Ls), Z === null) {
              const Qt = Et - ie - ze + 2 * Ea;
              jt.push(Ma(B, Qt, bt));
            } else {
              const Qt = (Et - ie - ze - Ve) / 2 + 2 * Ea;
              jt.push(Ma(B, Qt, bt)), jt.push(Ls), jt.push(eu(Z, j, Ue)), jt.push(Ls), jt.push(Ma(B, Qt, bt));
            }
            jt.push(Ls), jt.push(eu(ht, j, Ue));
          }
          const Lt = bt.havingBaseStyle($.TEXT), Zt = rn.makeVList({
            positionType: "bottom",
            positionData: It,
            children: jt
          }, Lt);
          return Ec(rn.makeSpan(["delimsizing", "mult"], [Zt], Lt), $.TEXT, bt, Qe);
        }, _s = 80, Ps = 0.08, Co = function(He, Pe, it, bt, Ue) {
          const Qe = ne(He, bt, it), ht = new Dt(He, Qe), Z = new Pt([ht], {
            // Note: 1000:1 ratio of viewBox to document em width.
            width: "400em",
            height: je(Pe),
            viewBox: "0 0 400000 " + it,
            preserveAspectRatio: "xMinYMin slice"
          });
          return rn.makeSvgSpan(["hide-tail"], [Z], Ue);
        }, da = function(He, Pe) {
          const it = Pe.havingBaseSizing(), bt = vl("\\surd", He * it.sizeMultiplier, mf, it);
          let Ue = it.sizeMultiplier;
          const Qe = Math.max(0, Pe.minRuleThickness - Pe.fontMetrics().sqrtRuleThickness);
          let ht, Z = 0, B = 0, y = 0, b;
          return bt.type === "small" ? (y = 1e3 + 1e3 * Qe + _s, He < 1 ? Ue = 1 : He < 1.4 && (Ue = 0.7), Z = (1 + Qe + Ps) / Ue, B = (1 + Qe) / Ue, ht = Co("sqrtMain", Z, y, Qe, Pe), ht.style.minWidth = "0.853em", b = 0.833 / Ue) : bt.type === "large" ? (y = (1e3 + _s) * Ks[bt.size], B = (Ks[bt.size] + Qe) / Ue, Z = (Ks[bt.size] + Qe + Ps) / Ue, ht = Co("sqrtSize" + bt.size, Z, y, Qe, Pe), ht.style.minWidth = "1.02em", b = 1 / Ue) : (Z = He + Qe + Ps, B = He + Qe, y = Math.floor(1e3 * He + Qe) + _s, ht = Co("sqrtTall", Z, y, Qe, Pe), ht.style.minWidth = "0.742em", b = 1.056), ht.height = B, ht.style.height = je(Z), {
            span: ht,
            advanceWidth: b,
            // Calculate the actual line width.
            // This actually should depend on the chosen font -- e.g. \boldmath
            // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
            // have thicker rules.
            ruleWidth: (Pe.fontMetrics().sqrtRuleThickness + Qe) * Ue
          };
        }, Ou = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], pf = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], nu = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], Ks = [0, 1.2, 1.8, 2.4, 3], Cc = function(He, Pe, it, bt, Ue) {
          if (He === "<" || He === "\\lt" || He === "⟨" ? He = "\\langle" : (He === ">" || He === "\\gt" || He === "⟩") && (He = "\\rangle"), g.contains(Ou, He) || g.contains(nu, He))
            return Xi(He, Pe, !1, it, bt, Ue);
          if (g.contains(pf, He))
            return tu(He, Ks[Pe], !1, it, bt, Ue);
          throw new o("Illegal delimiter: '" + He + "'");
        }, sc = [{
          type: "small",
          style: $.SCRIPTSCRIPT
        }, {
          type: "small",
          style: $.SCRIPT
        }, {
          type: "small",
          style: $.TEXT
        }, {
          type: "large",
          size: 1
        }, {
          type: "large",
          size: 2
        }, {
          type: "large",
          size: 3
        }, {
          type: "large",
          size: 4
        }], lc = [{
          type: "small",
          style: $.SCRIPTSCRIPT
        }, {
          type: "small",
          style: $.SCRIPT
        }, {
          type: "small",
          style: $.TEXT
        }, {
          type: "stack"
        }], mf = [{
          type: "small",
          style: $.SCRIPTSCRIPT
        }, {
          type: "small",
          style: $.SCRIPT
        }, {
          type: "small",
          style: $.TEXT
        }, {
          type: "large",
          size: 1
        }, {
          type: "large",
          size: 2
        }, {
          type: "large",
          size: 3
        }, {
          type: "large",
          size: 4
        }, {
          type: "stack"
        }], yl = function(He) {
          if (He.type === "small")
            return "Main-Regular";
          if (He.type === "large")
            return "Size" + He.size + "-Regular";
          if (He.type === "stack")
            return "Size4-Regular";
          throw new Error("Add support for delim type '" + He.type + "' here.");
        }, vl = function(He, Pe, it, bt) {
          const Ue = Math.min(2, 3 - bt.style.size);
          for (let Qe = Ue; Qe < it.length && it[Qe].type !== "stack"; Qe++) {
            const ht = bs(He, yl(it[Qe]), "math");
            let Z = ht.height + ht.depth;
            if (it[Qe].type === "small") {
              const B = bt.havingBaseStyle(it[Qe].style);
              Z *= B.sizeMultiplier;
            }
            if (Z > Pe)
              return it[Qe];
          }
          return it[it.length - 1];
        }, ru = function(He, Pe, it, bt, Ue, Qe) {
          He === "<" || He === "\\lt" || He === "⟨" ? He = "\\langle" : (He === ">" || He === "\\gt" || He === "⟩") && (He = "\\rangle");
          let ht;
          g.contains(nu, He) ? ht = sc : g.contains(Ou, He) ? ht = mf : ht = lc;
          const Z = vl(He, Pe, ht, bt);
          return Z.type === "small" ? Eo(He, Z.style, it, bt, Ue, Qe) : Z.type === "large" ? Xi(He, Z.size, it, bt, Ue, Qe) : tu(He, Pe, it, bt, Ue, Qe);
        };
        var ea = {
          sqrtImage: da,
          sizedDelim: Cc,
          sizeToMaxHeight: Ks,
          customSizedDelim: ru,
          leftRightDelim: function(He, Pe, it, bt, Ue, Qe) {
            const ht = bt.fontMetrics().axisHeight * bt.sizeMultiplier, Z = 901, B = 5 / bt.fontMetrics().ptPerEm, y = Math.max(Pe - ht, it + ht), b = Math.max(
              // In real TeX, calculations are done using integral values which are
              // 65536 per pt, or 655360 per em. So, the division here truncates in
              // TeX but doesn't here, producing different results. If we wanted to
              // exactly match TeX's calculation, we could do
              //   Math.floor(655360 * maxDistFromAxis / 500) *
              //    delimiterFactor / 655360
              // (To see the difference, compare
              //    x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
              // in TeX and KaTeX)
              y / 500 * Z,
              2 * y - B
            );
            return ru(He, b, !0, bt, Ue, Qe);
          }
        };
        const Ic = {
          "\\bigl": {
            mclass: "mopen",
            size: 1
          },
          "\\Bigl": {
            mclass: "mopen",
            size: 2
          },
          "\\biggl": {
            mclass: "mopen",
            size: 3
          },
          "\\Biggl": {
            mclass: "mopen",
            size: 4
          },
          "\\bigr": {
            mclass: "mclose",
            size: 1
          },
          "\\Bigr": {
            mclass: "mclose",
            size: 2
          },
          "\\biggr": {
            mclass: "mclose",
            size: 3
          },
          "\\Biggr": {
            mclass: "mclose",
            size: 4
          },
          "\\bigm": {
            mclass: "mrel",
            size: 1
          },
          "\\Bigm": {
            mclass: "mrel",
            size: 2
          },
          "\\biggm": {
            mclass: "mrel",
            size: 3
          },
          "\\Biggm": {
            mclass: "mrel",
            size: 4
          },
          "\\big": {
            mclass: "mord",
            size: 1
          },
          "\\Big": {
            mclass: "mord",
            size: 2
          },
          "\\bigg": {
            mclass: "mord",
            size: 3
          },
          "\\Bigg": {
            mclass: "mord",
            size: 4
          }
        }, nf = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
        function zu(He, Pe) {
          const it = pl(He);
          if (it && g.contains(nf, it.text))
            return it;
          throw it ? new o("Invalid delimiter '" + it.text + "' after '" + Pe.funcName + "'", He) : new o("Invalid delimiter type '" + He.type + "'", He);
        }
        un({
          type: "delimsizing",
          names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
          props: {
            numArgs: 1,
            argTypes: ["primitive"]
          },
          handler: (He, Pe) => {
            const it = zu(Pe[0], He);
            return {
              type: "delimsizing",
              mode: He.parser.mode,
              size: Ic[He.funcName].size,
              mclass: Ic[He.funcName].mclass,
              delim: it.text
            };
          },
          htmlBuilder: (He, Pe) => He.delim === "." ? rn.makeSpan([He.mclass]) : ea.sizedDelim(He.delim, He.size, Pe, He.mode, [He.mclass]),
          mathmlBuilder: (He) => {
            const Pe = [];
            He.delim !== "." && Pe.push(ri(He.delim, He.mode));
            const it = new Qn.MathNode("mo", Pe);
            He.mclass === "mopen" || He.mclass === "mclose" ? it.setAttribute("fence", "true") : it.setAttribute("fence", "false"), it.setAttribute("stretchy", "true");
            const bt = je(ea.sizeToMaxHeight[He.size]);
            return it.setAttribute("minsize", bt), it.setAttribute("maxsize", bt), it;
          }
        });
        function Yo(He) {
          if (!He.body)
            throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
        }
        un({
          type: "leftright-right",
          names: ["\\right"],
          props: {
            numArgs: 1,
            primitive: !0
          },
          handler: (He, Pe) => {
            const it = He.parser.gullet.macros.get("\\current@color");
            if (it && typeof it != "string")
              throw new o("\\current@color set to non-string in \\right");
            return {
              type: "leftright-right",
              mode: He.parser.mode,
              delim: zu(Pe[0], He).text,
              color: it
              // undefined if not set via \color
            };
          }
        }), un({
          type: "leftright",
          names: ["\\left"],
          props: {
            numArgs: 1,
            primitive: !0
          },
          handler: (He, Pe) => {
            const it = zu(Pe[0], He), bt = He.parser;
            ++bt.leftrightDepth;
            const Ue = bt.parseExpression(!1);
            --bt.leftrightDepth, bt.expect("\\right", !1);
            const Qe = Vi(bt.parseFunction(), "leftright-right");
            return {
              type: "leftright",
              mode: bt.mode,
              body: Ue,
              left: it.text,
              right: Qe.delim,
              rightColor: Qe.color
            };
          },
          htmlBuilder: (He, Pe) => {
            Yo(He);
            const it = Ln(He.body, Pe, !0, ["mopen", "mclose"]);
            let bt = 0, Ue = 0, Qe = !1;
            for (let B = 0; B < it.length; B++)
              it[B].isMiddle ? Qe = !0 : (bt = Math.max(it[B].height, bt), Ue = Math.max(it[B].depth, Ue));
            bt *= Pe.sizeMultiplier, Ue *= Pe.sizeMultiplier;
            let ht;
            if (He.left === "." ? ht = pr(Pe, ["mopen"]) : ht = ea.leftRightDelim(He.left, bt, Ue, Pe, He.mode, ["mopen"]), it.unshift(ht), Qe)
              for (let B = 1; B < it.length; B++) {
                const b = it[B].isMiddle;
                b && (it[B] = ea.leftRightDelim(b.delim, bt, Ue, b.options, He.mode, []));
              }
            let Z;
            if (He.right === ".")
              Z = pr(Pe, ["mclose"]);
            else {
              const B = He.rightColor ? Pe.withColor(He.rightColor) : Pe;
              Z = ea.leftRightDelim(He.right, bt, Ue, B, He.mode, ["mclose"]);
            }
            return it.push(Z), rn.makeSpan(["minner"], it, Pe);
          },
          mathmlBuilder: (He, Pe) => {
            Yo(He);
            const it = Yr(He.body, Pe);
            if (He.left !== ".") {
              const bt = new Qn.MathNode("mo", [ri(He.left, He.mode)]);
              bt.setAttribute("fence", "true"), it.unshift(bt);
            }
            if (He.right !== ".") {
              const bt = new Qn.MathNode("mo", [ri(He.right, He.mode)]);
              bt.setAttribute("fence", "true"), He.rightColor && bt.setAttribute("mathcolor", He.rightColor), it.push(bt);
            }
            return Zr(it);
          }
        }), un({
          type: "middle",
          names: ["\\middle"],
          props: {
            numArgs: 1,
            primitive: !0
          },
          handler: (He, Pe) => {
            const it = zu(Pe[0], He);
            if (!He.parser.leftrightDepth)
              throw new o("\\middle without preceding \\left", it);
            return {
              type: "middle",
              mode: He.parser.mode,
              delim: it.text
            };
          },
          htmlBuilder: (He, Pe) => {
            let it;
            if (He.delim === ".")
              it = pr(Pe, []);
            else {
              it = ea.sizedDelim(He.delim, 1, Pe, He.mode, []);
              const bt = {
                delim: He.delim,
                options: Pe
              };
              it.isMiddle = bt;
            }
            return it;
          },
          mathmlBuilder: (He, Pe) => {
            const it = He.delim === "\\vert" || He.delim === "|" ? ri("|", "text") : ri(He.delim, He.mode), bt = new Qn.MathNode("mo", [it]);
            return bt.setAttribute("fence", "true"), bt.setAttribute("lspace", "0.05em"), bt.setAttribute("rspace", "0.05em"), bt;
          }
        });
        const Ru = (He, Pe) => {
          const it = rn.wrapFragment(ir(He.body, Pe), Pe), bt = He.label.slice(1);
          let Ue = Pe.sizeMultiplier, Qe, ht = 0;
          const Z = g.isCharacterBox(He.body);
          if (bt === "sout")
            Qe = rn.makeSpan(["stretchy", "sout"]), Qe.height = Pe.fontMetrics().defaultRuleThickness / Ue, ht = -0.5 * Pe.fontMetrics().xHeight;
          else if (bt === "phase") {
            const y = Re({
              number: 0.6,
              unit: "pt"
            }, Pe), b = Re({
              number: 0.35,
              unit: "ex"
            }, Pe), R = Pe.havingBaseSizing();
            Ue = Ue / R.sizeMultiplier;
            const j = it.height + it.depth + y + b;
            it.style.paddingLeft = je(j / 2 + y);
            const G = Math.floor(1e3 * j * Ue), ie = he(G), fe = new Pt([new Dt("phase", ie)], {
              width: "400em",
              height: je(G / 1e3),
              viewBox: "0 0 400000 " + G,
              preserveAspectRatio: "xMinYMin slice"
            });
            Qe = rn.makeSvgSpan(["hide-tail"], [fe], Pe), Qe.style.height = je(j), ht = it.depth + y + b;
          } else {
            /cancel/.test(bt) ? Z || it.classes.push("cancel-pad") : bt === "angl" ? it.classes.push("anglpad") : it.classes.push("boxpad");
            let y = 0, b = 0, R = 0;
            /box/.test(bt) ? (R = Math.max(
              Pe.fontMetrics().fboxrule,
              // default
              Pe.minRuleThickness
              // User override.
            ), y = Pe.fontMetrics().fboxsep + (bt === "colorbox" ? 0 : R), b = y) : bt === "angl" ? (R = Math.max(Pe.fontMetrics().defaultRuleThickness, Pe.minRuleThickness), y = 4 * R, b = Math.max(0, 0.25 - it.depth)) : (y = Z ? 0.2 : 0, b = y), Qe = go.encloseSpan(it, bt, y, b, Pe), /fbox|boxed|fcolorbox/.test(bt) ? (Qe.style.borderStyle = "solid", Qe.style.borderWidth = je(R)) : bt === "angl" && R !== 0.049 && (Qe.style.borderTopWidth = je(R), Qe.style.borderRightWidth = je(R)), ht = it.depth + b, He.backgroundColor && (Qe.style.backgroundColor = He.backgroundColor, He.borderColor && (Qe.style.borderColor = He.borderColor));
          }
          let B;
          if (He.backgroundColor)
            B = rn.makeVList({
              positionType: "individualShift",
              children: [
                // Put the color background behind inner;
                {
                  type: "elem",
                  elem: Qe,
                  shift: ht
                },
                {
                  type: "elem",
                  elem: it,
                  shift: 0
                }
              ]
            }, Pe);
          else {
            const y = /cancel|phase/.test(bt) ? ["svg-align"] : [];
            B = rn.makeVList({
              positionType: "individualShift",
              children: [
                // Write the \cancel stroke on top of inner.
                {
                  type: "elem",
                  elem: it,
                  shift: 0
                },
                {
                  type: "elem",
                  elem: Qe,
                  shift: ht,
                  wrapperClasses: y
                }
              ]
            }, Pe);
          }
          return /cancel/.test(bt) && (B.height = it.height, B.depth = it.depth), /cancel/.test(bt) && !Z ? rn.makeSpan(["mord", "cancel-lap"], [B], Pe) : rn.makeSpan(["mord"], [B], Pe);
        }, gf = (He, Pe) => {
          let it = 0;
          const bt = new Qn.MathNode(He.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [si(He.body, Pe)]);
          switch (He.label) {
            case "\\cancel":
              bt.setAttribute("notation", "updiagonalstrike");
              break;
            case "\\bcancel":
              bt.setAttribute("notation", "downdiagonalstrike");
              break;
            case "\\phase":
              bt.setAttribute("notation", "phasorangle");
              break;
            case "\\sout":
              bt.setAttribute("notation", "horizontalstrike");
              break;
            case "\\fbox":
              bt.setAttribute("notation", "box");
              break;
            case "\\angl":
              bt.setAttribute("notation", "actuarial");
              break;
            case "\\fcolorbox":
            case "\\colorbox":
              if (it = Pe.fontMetrics().fboxsep * Pe.fontMetrics().ptPerEm, bt.setAttribute("width", "+" + 2 * it + "pt"), bt.setAttribute("height", "+" + 2 * it + "pt"), bt.setAttribute("lspace", it + "pt"), bt.setAttribute("voffset", it + "pt"), He.label === "\\fcolorbox") {
                const Ue = Math.max(
                  Pe.fontMetrics().fboxrule,
                  // default
                  Pe.minRuleThickness
                  // user override
                );
                bt.setAttribute("style", "border: " + Ue + "em solid " + String(He.borderColor));
              }
              break;
            case "\\xcancel":
              bt.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
              break;
          }
          return He.backgroundColor && bt.setAttribute("mathbackground", He.backgroundColor), bt;
        };
        un({
          type: "enclose",
          names: ["\\colorbox"],
          props: {
            numArgs: 2,
            allowedInText: !0,
            argTypes: ["color", "text"]
          },
          handler(He, Pe, it) {
            let {
              parser: bt,
              funcName: Ue
            } = He;
            const Qe = Vi(Pe[0], "color-token").color, ht = Pe[1];
            return {
              type: "enclose",
              mode: bt.mode,
              label: Ue,
              backgroundColor: Qe,
              body: ht
            };
          },
          htmlBuilder: Ru,
          mathmlBuilder: gf
        }), un({
          type: "enclose",
          names: ["\\fcolorbox"],
          props: {
            numArgs: 3,
            allowedInText: !0,
            argTypes: ["color", "color", "text"]
          },
          handler(He, Pe, it) {
            let {
              parser: bt,
              funcName: Ue
            } = He;
            const Qe = Vi(Pe[0], "color-token").color, ht = Vi(Pe[1], "color-token").color, Z = Pe[2];
            return {
              type: "enclose",
              mode: bt.mode,
              label: Ue,
              backgroundColor: ht,
              borderColor: Qe,
              body: Z
            };
          },
          htmlBuilder: Ru,
          mathmlBuilder: gf
        }), un({
          type: "enclose",
          names: ["\\fbox"],
          props: {
            numArgs: 1,
            argTypes: ["hbox"],
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "enclose",
              mode: it.mode,
              label: "\\fbox",
              body: Pe[0]
            };
          }
        }), un({
          type: "enclose",
          names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "enclose",
              mode: it.mode,
              label: bt,
              body: Ue
            };
          },
          htmlBuilder: Ru,
          mathmlBuilder: gf
        }), un({
          type: "enclose",
          names: ["\\angl"],
          props: {
            numArgs: 1,
            argTypes: ["hbox"],
            allowedInText: !1
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "enclose",
              mode: it.mode,
              label: "\\angl",
              body: Pe[0]
            };
          }
        });
        const Fu = {};
        function ws(He) {
          let {
            type: Pe,
            names: it,
            props: bt,
            handler: Ue,
            htmlBuilder: Qe,
            mathmlBuilder: ht
          } = He;
          const Z = {
            type: Pe,
            numArgs: bt.numArgs || 0,
            allowedInText: !1,
            numOptionalArgs: 0,
            handler: Ue
          };
          for (let B = 0; B < it.length; ++B)
            Fu[it[B]] = Z;
          Qe && (Fr[Pe] = Qe), ht && (Xr[Pe] = ht);
        }
        const Nu = {};
        function An(He, Pe) {
          Nu[He] = Pe;
        }
        class to {
          // The + prefix indicates that these fields aren't writeable
          // Lexer holding the input string.
          // Start offset, zero-based inclusive.
          // End offset, zero-based exclusive.
          constructor(Pe, it, bt) {
            this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = Pe, this.start = it, this.end = bt;
          }
          /**
           * Merges two `SourceLocation`s from location providers, given they are
           * provided in order of appearance.
           * - Returns the first one's location if only the first is provided.
           * - Returns a merged range of the first and the last if both are provided
           *   and their lexers match.
           * - Otherwise, returns null.
           */
          static range(Pe, it) {
            return it ? !Pe || !Pe.loc || !it.loc || Pe.loc.lexer !== it.loc.lexer ? null : new to(Pe.loc.lexer, Pe.loc.start, it.loc.end) : Pe && Pe.loc;
          }
        }
        class Io {
          // don't expand the token
          // used in \noexpand
          constructor(Pe, it) {
            this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = Pe, this.loc = it;
          }
          /**
           * Given a pair of tokens (this and endToken), compute a `Token` encompassing
           * the whole input range enclosed by these two.
           */
          range(Pe, it) {
            return new Io(it, to.range(this, Pe));
          }
        }
        function Ku(He) {
          const Pe = [];
          He.consumeSpaces();
          let it = He.fetch().text;
          for (it === "\\relax" && (He.consume(), He.consumeSpaces(), it = He.fetch().text); it === "\\hline" || it === "\\hdashline"; )
            He.consume(), Pe.push(it === "\\hdashline"), He.consumeSpaces(), it = He.fetch().text;
          return Pe;
        }
        const va = (He) => {
          if (!He.parser.settings.displayMode)
            throw new o("{" + He.envName + "} can be used only in display mode.");
        };
        function Js(He) {
          if (He.indexOf("ed") === -1)
            return He.indexOf("*") === -1;
        }
        function Ha(He, Pe, it) {
          let {
            hskipBeforeAndAfter: bt,
            addJot: Ue,
            cols: Qe,
            arraystretch: ht,
            colSeparationType: Z,
            autoTag: B,
            singleRow: y,
            emptySingleRow: b,
            maxNumCols: R,
            leqno: j
          } = Pe;
          if (He.gullet.beginGroup(), y || He.gullet.macros.set("\\cr", "\\\\\\relax"), !ht) {
            const ut = He.gullet.expandMacroAsText("\\arraystretch");
            if (ut == null)
              ht = 1;
            else if (ht = parseFloat(ut), !ht || ht < 0)
              throw new o("Invalid \\arraystretch: " + ut);
          }
          He.gullet.beginGroup();
          let G = [];
          const ie = [G], fe = [], xe = [], Te = B != null ? [] : void 0;
          function ze() {
            B && He.gullet.macros.set("\\@eqnsw", "1", !0);
          }
          function Ve() {
            Te && (He.gullet.macros.get("\\df@tag") ? (Te.push(He.subparse([new Io("\\df@tag")])), He.gullet.macros.set("\\df@tag", void 0, !0)) : Te.push(!!B && He.gullet.macros.get("\\@eqnsw") === "1"));
          }
          for (ze(), xe.push(Ku(He)); ; ) {
            let ut = He.parseExpression(!1, y ? "\\end" : "\\\\");
            He.gullet.endGroup(), He.gullet.beginGroup(), ut = {
              type: "ordgroup",
              mode: He.mode,
              body: ut
            }, it && (ut = {
              type: "styling",
              mode: He.mode,
              style: it,
              body: [ut]
            }), G.push(ut);
            const gt = He.fetch().text;
            if (gt === "&") {
              if (R && G.length === R) {
                if (y || Z)
                  throw new o("Too many tab characters: &", He.nextToken);
                He.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
              }
              He.consume();
            } else if (gt === "\\end") {
              Ve(), G.length === 1 && ut.type === "styling" && ut.body[0].body.length === 0 && (ie.length > 1 || !b) && ie.pop(), xe.length < ie.length + 1 && xe.push([]);
              break;
            } else if (gt === "\\\\") {
              He.consume();
              let wt;
              He.gullet.future().text !== " " && (wt = He.parseSizeGroup(!0)), fe.push(wt ? wt.value : null), Ve(), xe.push(Ku(He)), G = [], ie.push(G), ze();
            } else
              throw new o("Expected & or \\\\ or \\cr or \\end", He.nextToken);
          }
          return He.gullet.endGroup(), He.gullet.endGroup(), {
            type: "array",
            mode: He.mode,
            addJot: Ue,
            arraystretch: ht,
            body: ie,
            cols: Qe,
            rowGaps: fe,
            hskipBeforeAndAfter: bt,
            hLinesBeforeRow: xe,
            colSeparationType: Z,
            tags: Te,
            leqno: j
          };
        }
        function as(He) {
          return He.slice(0, 1) === "d" ? "display" : "text";
        }
        const aa = function(He, Pe) {
          let it, bt;
          const Ue = He.body.length, Qe = He.hLinesBeforeRow;
          let ht = 0, Z = new Array(Ue);
          const B = [], y = Math.max(
            // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
            Pe.fontMetrics().arrayRuleWidth,
            Pe.minRuleThickness
            // User override.
          ), b = 1 / Pe.fontMetrics().ptPerEm;
          let R = 5 * b;
          He.colSeparationType && He.colSeparationType === "small" && (R = 0.2778 * (Pe.havingStyle($.SCRIPT).sizeMultiplier / Pe.sizeMultiplier));
          const j = He.colSeparationType === "CD" ? Re({
            number: 3,
            unit: "ex"
          }, Pe) : 12 * b, G = 3 * b, ie = He.arraystretch * j, fe = 0.7 * ie, xe = 0.3 * ie;
          let Te = 0;
          function ze(It) {
            for (let jt = 0; jt < It.length; ++jt)
              jt > 0 && (Te += 0.25), B.push({
                pos: Te,
                isDashed: It[jt]
              });
          }
          for (ze(Qe[0]), it = 0; it < He.body.length; ++it) {
            const It = He.body[it];
            let jt = fe, Lt = xe;
            ht < It.length && (ht = It.length);
            const Zt = new Array(It.length);
            for (bt = 0; bt < It.length; ++bt) {
              const yn = ir(It[bt], Pe);
              Lt < yn.depth && (Lt = yn.depth), jt < yn.height && (jt = yn.height), Zt[bt] = yn;
            }
            const Qt = He.rowGaps[it];
            let Xt = 0;
            Qt && (Xt = Re(Qt, Pe), Xt > 0 && (Xt += xe, Lt < Xt && (Lt = Xt), Xt = 0)), He.addJot && (Lt += G), Zt.height = jt, Zt.depth = Lt, Te += jt, Zt.pos = Te, Te += Lt + Xt, Z[it] = Zt, ze(Qe[it + 1]);
          }
          const Ve = Te / 2 + Pe.fontMetrics().axisHeight, ut = He.cols || [], gt = [];
          let wt, Et;
          const zt = [];
          if (He.tags && He.tags.some((It) => It))
            for (it = 0; it < Ue; ++it) {
              const It = Z[it], jt = It.pos - Ve, Lt = He.tags[it];
              let Zt;
              Lt === !0 ? Zt = rn.makeSpan(["eqn-num"], [], Pe) : Lt === !1 ? Zt = rn.makeSpan([], [], Pe) : Zt = rn.makeSpan([], Ln(Lt, Pe, !0), Pe), Zt.depth = It.depth, Zt.height = It.height, zt.push({
                type: "elem",
                elem: Zt,
                shift: jt
              });
            }
          for (
            bt = 0, Et = 0;
            // Continue while either there are more columns or more column
            // descriptions, so trailing separators don't get lost.
            bt < ht || Et < ut.length;
            ++bt, ++Et
          ) {
            let It = ut[Et] || {}, jt = !0;
            for (; It.type === "separator"; ) {
              if (jt || (wt = rn.makeSpan(["arraycolsep"], []), wt.style.width = je(Pe.fontMetrics().doubleRuleSep), gt.push(wt)), It.separator === "|" || It.separator === ":") {
                const Qt = It.separator === "|" ? "solid" : "dashed", Xt = rn.makeSpan(["vertical-separator"], [], Pe);
                Xt.style.height = je(Te), Xt.style.borderRightWidth = je(y), Xt.style.borderRightStyle = Qt, Xt.style.margin = "0 " + je(-y / 2);
                const yn = Te - Ve;
                yn && (Xt.style.verticalAlign = je(-yn)), gt.push(Xt);
              } else
                throw new o("Invalid separator type: " + It.separator);
              Et++, It = ut[Et] || {}, jt = !1;
            }
            if (bt >= ht)
              continue;
            let Lt;
            (bt > 0 || He.hskipBeforeAndAfter) && (Lt = g.deflt(It.pregap, R), Lt !== 0 && (wt = rn.makeSpan(["arraycolsep"], []), wt.style.width = je(Lt), gt.push(wt)));
            let Zt = [];
            for (it = 0; it < Ue; ++it) {
              const Qt = Z[it], Xt = Qt[bt];
              if (!Xt)
                continue;
              const yn = Qt.pos - Ve;
              Xt.depth = Qt.depth, Xt.height = Qt.height, Zt.push({
                type: "elem",
                elem: Xt,
                shift: yn
              });
            }
            Zt = rn.makeVList({
              positionType: "individualShift",
              children: Zt
            }, Pe), Zt = rn.makeSpan(["col-align-" + (It.align || "c")], [Zt]), gt.push(Zt), (bt < ht - 1 || He.hskipBeforeAndAfter) && (Lt = g.deflt(It.postgap, R), Lt !== 0 && (wt = rn.makeSpan(["arraycolsep"], []), wt.style.width = je(Lt), gt.push(wt)));
          }
          if (Z = rn.makeSpan(["mtable"], gt), B.length > 0) {
            const It = rn.makeLineSpan("hline", Pe, y), jt = rn.makeLineSpan("hdashline", Pe, y), Lt = [{
              type: "elem",
              elem: Z,
              shift: 0
            }];
            for (; B.length > 0; ) {
              const Zt = B.pop(), Qt = Zt.pos - Ve;
              Zt.isDashed ? Lt.push({
                type: "elem",
                elem: jt,
                shift: Qt
              }) : Lt.push({
                type: "elem",
                elem: It,
                shift: Qt
              });
            }
            Z = rn.makeVList({
              positionType: "individualShift",
              children: Lt
            }, Pe);
          }
          if (zt.length === 0)
            return rn.makeSpan(["mord"], [Z], Pe);
          {
            let It = rn.makeVList({
              positionType: "individualShift",
              children: zt
            }, Pe);
            return It = rn.makeSpan(["tag"], [It], Pe), rn.makeFragment([Z, It]);
          }
        }, Aa = {
          c: "center ",
          l: "left ",
          r: "right "
        }, yo = function(He, Pe) {
          const it = [], bt = new Qn.MathNode("mtd", [], ["mtr-glue"]), Ue = new Qn.MathNode("mtd", [], ["mml-eqn-num"]);
          for (let R = 0; R < He.body.length; R++) {
            const j = He.body[R], G = [];
            for (let ie = 0; ie < j.length; ie++)
              G.push(new Qn.MathNode("mtd", [si(j[ie], Pe)]));
            He.tags && He.tags[R] && (G.unshift(bt), G.push(bt), He.leqno ? G.unshift(Ue) : G.push(Ue)), it.push(new Qn.MathNode("mtr", G));
          }
          let Qe = new Qn.MathNode("mtable", it);
          const ht = He.arraystretch === 0.5 ? 0.1 : 0.16 + He.arraystretch - 1 + (He.addJot ? 0.09 : 0);
          Qe.setAttribute("rowspacing", je(ht));
          let Z = "", B = "";
          if (He.cols && He.cols.length > 0) {
            const R = He.cols;
            let j = "", G = !1, ie = 0, fe = R.length;
            R[0].type === "separator" && (Z += "top ", ie = 1), R[R.length - 1].type === "separator" && (Z += "bottom ", fe -= 1);
            for (let xe = ie; xe < fe; xe++)
              R[xe].type === "align" ? (B += Aa[R[xe].align], G && (j += "none "), G = !0) : R[xe].type === "separator" && G && (j += R[xe].separator === "|" ? "solid " : "dashed ", G = !1);
            Qe.setAttribute("columnalign", B.trim()), /[sd]/.test(j) && Qe.setAttribute("columnlines", j.trim());
          }
          if (He.colSeparationType === "align") {
            const R = He.cols || [];
            let j = "";
            for (let G = 1; G < R.length; G++)
              j += G % 2 ? "0em " : "1em ";
            Qe.setAttribute("columnspacing", j.trim());
          } else He.colSeparationType === "alignat" || He.colSeparationType === "gather" ? Qe.setAttribute("columnspacing", "0em") : He.colSeparationType === "small" ? Qe.setAttribute("columnspacing", "0.2778em") : He.colSeparationType === "CD" ? Qe.setAttribute("columnspacing", "0.5em") : Qe.setAttribute("columnspacing", "1em");
          let y = "";
          const b = He.hLinesBeforeRow;
          Z += b[0].length > 0 ? "left " : "", Z += b[b.length - 1].length > 0 ? "right " : "";
          for (let R = 1; R < b.length - 1; R++)
            y += b[R].length === 0 ? "none " : b[R][0] ? "dashed " : "solid ";
          return /[sd]/.test(y) && Qe.setAttribute("rowlines", y.trim()), Z !== "" && (Qe = new Qn.MathNode("menclose", [Qe]), Qe.setAttribute("notation", Z.trim())), He.arraystretch && He.arraystretch < 1 && (Qe = new Qn.MathNode("mstyle", [Qe]), Qe.setAttribute("scriptlevel", "1")), Qe;
        }, Ju = function(He, Pe) {
          He.envName.indexOf("ed") === -1 && va(He);
          const it = [], bt = He.envName.indexOf("at") > -1 ? "alignat" : "align", Ue = He.envName === "split", Qe = Ha(He.parser, {
            cols: it,
            addJot: !0,
            autoTag: Ue ? void 0 : Js(He.envName),
            emptySingleRow: !0,
            colSeparationType: bt,
            maxNumCols: Ue ? 2 : void 0,
            leqno: He.parser.settings.leqno
          }, "display");
          let ht, Z = 0;
          const B = {
            type: "ordgroup",
            mode: He.mode,
            body: []
          };
          if (Pe[0] && Pe[0].type === "ordgroup") {
            let b = "";
            for (let R = 0; R < Pe[0].body.length; R++) {
              const j = Vi(Pe[0].body[R], "textord");
              b += j.text;
            }
            ht = Number(b), Z = ht * 2;
          }
          const y = !Z;
          Qe.body.forEach(function(b) {
            for (let R = 1; R < b.length; R += 2) {
              const j = Vi(b[R], "styling");
              Vi(j.body[0], "ordgroup").body.unshift(B);
            }
            if (y)
              Z < b.length && (Z = b.length);
            else {
              const R = b.length / 2;
              if (ht < R)
                throw new o("Too many math in a row: " + ("expected " + ht + ", but got " + R), b[0]);
            }
          });
          for (let b = 0; b < Z; ++b) {
            let R = "r", j = 0;
            b % 2 === 1 ? R = "l" : b > 0 && y && (j = 1), it[b] = {
              type: "align",
              align: R,
              pregap: j,
              postgap: 0
            };
          }
          return Qe.colSeparationType = y ? "align" : "alignat", Qe;
        };
        ws({
          type: "array",
          names: ["array", "darray"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            const Ue = (pl(Pe[0]) ? [Pe[0]] : Vi(Pe[0], "ordgroup").body).map(function(ht) {
              const B = Ml(ht).text;
              if ("lcr".indexOf(B) !== -1)
                return {
                  type: "align",
                  align: B
                };
              if (B === "|")
                return {
                  type: "separator",
                  separator: "|"
                };
              if (B === ":")
                return {
                  type: "separator",
                  separator: ":"
                };
              throw new o("Unknown column alignment: " + B, ht);
            }), Qe = {
              cols: Ue,
              hskipBeforeAndAfter: !0,
              // \@preamble in lttab.dtx
              maxNumCols: Ue.length
            };
            return Ha(He.parser, Qe, as(He.envName));
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
          props: {
            numArgs: 0
          },
          handler(He) {
            const Pe = {
              matrix: null,
              pmatrix: ["(", ")"],
              bmatrix: ["[", "]"],
              Bmatrix: ["\\{", "\\}"],
              vmatrix: ["|", "|"],
              Vmatrix: ["\\Vert", "\\Vert"]
            }[He.envName.replace("*", "")];
            let it = "c";
            const bt = {
              hskipBeforeAndAfter: !1,
              cols: [{
                type: "align",
                align: it
              }]
            };
            if (He.envName.charAt(He.envName.length - 1) === "*") {
              const ht = He.parser;
              if (ht.consumeSpaces(), ht.fetch().text === "[") {
                if (ht.consume(), ht.consumeSpaces(), it = ht.fetch().text, "lcr".indexOf(it) === -1)
                  throw new o("Expected l or c or r", ht.nextToken);
                ht.consume(), ht.consumeSpaces(), ht.expect("]"), ht.consume(), bt.cols = [{
                  type: "align",
                  align: it
                }];
              }
            }
            const Ue = Ha(He.parser, bt, as(He.envName)), Qe = Math.max(0, ...Ue.body.map((ht) => ht.length));
            return Ue.cols = new Array(Qe).fill({
              type: "align",
              align: it
            }), Pe ? {
              type: "leftright",
              mode: He.mode,
              body: [Ue],
              left: Pe[0],
              right: Pe[1],
              rightColor: void 0
              // \right uninfluenced by \color in array
            } : Ue;
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["smallmatrix"],
          props: {
            numArgs: 0
          },
          handler(He) {
            const Pe = {
              arraystretch: 0.5
            }, it = Ha(He.parser, Pe, "script");
            return it.colSeparationType = "small", it;
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["subarray"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            const Ue = (pl(Pe[0]) ? [Pe[0]] : Vi(Pe[0], "ordgroup").body).map(function(ht) {
              const B = Ml(ht).text;
              if ("lc".indexOf(B) !== -1)
                return {
                  type: "align",
                  align: B
                };
              throw new o("Unknown column alignment: " + B, ht);
            });
            if (Ue.length > 1)
              throw new o("{subarray} can contain only one column");
            let Qe = {
              cols: Ue,
              hskipBeforeAndAfter: !1,
              arraystretch: 0.5
            };
            if (Qe = Ha(He.parser, Qe, "script"), Qe.body.length > 0 && Qe.body[0].length > 1)
              throw new o("{subarray} can contain only one column");
            return Qe;
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["cases", "dcases", "rcases", "drcases"],
          props: {
            numArgs: 0
          },
          handler(He) {
            const Pe = {
              arraystretch: 1.2,
              cols: [{
                type: "align",
                align: "l",
                pregap: 0,
                // TODO(kevinb) get the current style.
                // For now we use the metrics for TEXT style which is what we were
                // doing before.  Before attempting to get the current style we
                // should look at TeX's behavior especially for \over and matrices.
                postgap: 1
                /* 1em quad */
              }, {
                type: "align",
                align: "l",
                pregap: 0,
                postgap: 0
              }]
            }, it = Ha(He.parser, Pe, as(He.envName));
            return {
              type: "leftright",
              mode: He.mode,
              body: [it],
              left: He.envName.indexOf("r") > -1 ? "." : "\\{",
              right: He.envName.indexOf("r") > -1 ? "\\}" : ".",
              rightColor: void 0
            };
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["align", "align*", "aligned", "split"],
          props: {
            numArgs: 0
          },
          handler: Ju,
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["gathered", "gather", "gather*"],
          props: {
            numArgs: 0
          },
          handler(He) {
            g.contains(["gather", "gather*"], He.envName) && va(He);
            const Pe = {
              cols: [{
                type: "align",
                align: "c"
              }],
              addJot: !0,
              colSeparationType: "gather",
              autoTag: Js(He.envName),
              emptySingleRow: !0,
              leqno: He.parser.settings.leqno
            };
            return Ha(He.parser, Pe, "display");
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["alignat", "alignat*", "alignedat"],
          props: {
            numArgs: 1
          },
          handler: Ju,
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["equation", "equation*"],
          props: {
            numArgs: 0
          },
          handler(He) {
            va(He);
            const Pe = {
              autoTag: Js(He.envName),
              emptySingleRow: !0,
              singleRow: !0,
              maxNumCols: 1,
              leqno: He.parser.settings.leqno
            };
            return Ha(He.parser, Pe, "display");
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), ws({
          type: "array",
          names: ["CD"],
          props: {
            numArgs: 0
          },
          handler(He) {
            return va(He), Ql(He.parser);
          },
          htmlBuilder: aa,
          mathmlBuilder: yo
        }), An("\\nonumber", "\\gdef\\@eqnsw{0}"), An("\\notag", "\\nonumber"), un({
          type: "text",
          // Doesn't matter what this is.
          names: ["\\hline", "\\hdashline"],
          props: {
            numArgs: 0,
            allowedInText: !0,
            allowedInMath: !0
          },
          handler(He, Pe) {
            throw new o(He.funcName + " valid only within array environment");
          }
        });
        var vu = Fu;
        un({
          type: "environment",
          names: ["\\begin", "\\end"],
          props: {
            numArgs: 1,
            argTypes: ["text"]
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            if (Ue.type !== "ordgroup")
              throw new o("Invalid environment name", Ue);
            let Qe = "";
            for (let ht = 0; ht < Ue.body.length; ++ht)
              Qe += Vi(Ue.body[ht], "textord").text;
            if (bt === "\\begin") {
              if (!vu.hasOwnProperty(Qe))
                throw new o("No such environment: " + Qe, Ue);
              const ht = vu[Qe], {
                args: Z,
                optArgs: B
              } = it.parseArguments("\\begin{" + Qe + "}", ht), y = {
                mode: it.mode,
                envName: Qe,
                parser: it
              }, b = ht.handler(y, Z, B);
              it.expect("\\end", !1);
              const R = it.nextToken, j = Vi(it.parseFunction(), "environment");
              if (j.name !== Qe)
                throw new o("Mismatch: \\begin{" + Qe + "} matched by \\end{" + j.name + "}", R);
              return b;
            }
            return {
              type: "environment",
              mode: it.mode,
              name: Qe,
              nameGroup: Ue
            };
          }
        });
        const xu = (He, Pe) => {
          const it = He.font, bt = Pe.withFont(it);
          return ir(He.body, bt);
        }, Zo = (He, Pe) => {
          const it = He.font, bt = Pe.withFont(it);
          return si(He.body, bt);
        }, Fo = {
          "\\Bbb": "\\mathbb",
          "\\bold": "\\mathbf",
          "\\frak": "\\mathfrak",
          "\\bm": "\\boldsymbol"
        };
        un({
          type: "font",
          names: [
            // styles, except \boldsymbol defined below
            "\\mathrm",
            "\\mathit",
            "\\mathbf",
            "\\mathnormal",
            // families
            "\\mathbb",
            "\\mathcal",
            "\\mathfrak",
            "\\mathscr",
            "\\mathsf",
            "\\mathtt",
            // aliases, except \bm defined below
            "\\Bbb",
            "\\bold",
            "\\frak"
          ],
          props: {
            numArgs: 1,
            allowedInArgument: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = on(Pe[0]);
            let Qe = bt;
            return Qe in Fo && (Qe = Fo[Qe]), {
              type: "font",
              mode: it.mode,
              font: Qe.slice(1),
              body: Ue
            };
          },
          htmlBuilder: xu,
          mathmlBuilder: Zo
        }), un({
          type: "mclass",
          names: ["\\boldsymbol", "\\bm"],
          props: {
            numArgs: 1
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[0], Ue = g.isCharacterBox(bt);
            return {
              type: "mclass",
              mode: it.mode,
              mclass: Xs(bt),
              body: [{
                type: "font",
                mode: it.mode,
                font: "boldsymbol",
                body: bt
              }],
              isCharacterBox: Ue
            };
          }
        }), un({
          type: "font",
          names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
          props: {
            numArgs: 0,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt,
              breakOnTokenText: Ue
            } = He;
            const {
              mode: Qe
            } = it, ht = it.parseExpression(!0, Ue), Z = "math" + bt.slice(1);
            return {
              type: "font",
              mode: Qe,
              font: Z,
              body: {
                type: "ordgroup",
                mode: it.mode,
                body: ht
              }
            };
          },
          htmlBuilder: xu,
          mathmlBuilder: Zo
        });
        const Il = (He, Pe) => {
          let it = Pe;
          return He === "display" ? it = it.id >= $.SCRIPT.id ? it.text() : $.DISPLAY : He === "text" && it.size === $.DISPLAY.size ? it = $.TEXT : He === "script" ? it = $.SCRIPT : He === "scriptscript" && (it = $.SCRIPTSCRIPT), it;
        }, bu = (He, Pe) => {
          const it = Il(He.size, Pe.style), bt = it.fracNum(), Ue = it.fracDen();
          let Qe;
          Qe = Pe.havingStyle(bt);
          const ht = ir(He.numer, Qe, Pe);
          if (He.continued) {
            const ze = 8.5 / Pe.fontMetrics().ptPerEm, Ve = 3.5 / Pe.fontMetrics().ptPerEm;
            ht.height = ht.height < ze ? ze : ht.height, ht.depth = ht.depth < Ve ? Ve : ht.depth;
          }
          Qe = Pe.havingStyle(Ue);
          const Z = ir(He.denom, Qe, Pe);
          let B, y, b;
          He.hasBarLine ? (He.barSize ? (y = Re(He.barSize, Pe), B = rn.makeLineSpan("frac-line", Pe, y)) : B = rn.makeLineSpan("frac-line", Pe), y = B.height, b = B.height) : (B = null, y = 0, b = Pe.fontMetrics().defaultRuleThickness);
          let R, j, G;
          it.size === $.DISPLAY.size || He.size === "display" ? (R = Pe.fontMetrics().num1, y > 0 ? j = 3 * b : j = 7 * b, G = Pe.fontMetrics().denom1) : (y > 0 ? (R = Pe.fontMetrics().num2, j = b) : (R = Pe.fontMetrics().num3, j = 3 * b), G = Pe.fontMetrics().denom2);
          let ie;
          if (B) {
            const ze = Pe.fontMetrics().axisHeight;
            R - ht.depth - (ze + 0.5 * y) < j && (R += j - (R - ht.depth - (ze + 0.5 * y))), ze - 0.5 * y - (Z.height - G) < j && (G += j - (ze - 0.5 * y - (Z.height - G)));
            const Ve = -(ze - 0.5 * y);
            ie = rn.makeVList({
              positionType: "individualShift",
              children: [{
                type: "elem",
                elem: Z,
                shift: G
              }, {
                type: "elem",
                elem: B,
                shift: Ve
              }, {
                type: "elem",
                elem: ht,
                shift: -R
              }]
            }, Pe);
          } else {
            const ze = R - ht.depth - (Z.height - G);
            ze < j && (R += 0.5 * (j - ze), G += 0.5 * (j - ze)), ie = rn.makeVList({
              positionType: "individualShift",
              children: [{
                type: "elem",
                elem: Z,
                shift: G
              }, {
                type: "elem",
                elem: ht,
                shift: -R
              }]
            }, Pe);
          }
          Qe = Pe.havingStyle(it), ie.height *= Qe.sizeMultiplier / Pe.sizeMultiplier, ie.depth *= Qe.sizeMultiplier / Pe.sizeMultiplier;
          let fe;
          it.size === $.DISPLAY.size ? fe = Pe.fontMetrics().delim1 : it.size === $.SCRIPTSCRIPT.size ? fe = Pe.havingStyle($.SCRIPT).fontMetrics().delim2 : fe = Pe.fontMetrics().delim2;
          let xe, Te;
          return He.leftDelim == null ? xe = pr(Pe, ["mopen"]) : xe = ea.customSizedDelim(He.leftDelim, fe, !0, Pe.havingStyle(it), He.mode, ["mopen"]), He.continued ? Te = rn.makeSpan([]) : He.rightDelim == null ? Te = pr(Pe, ["mclose"]) : Te = ea.customSizedDelim(He.rightDelim, fe, !0, Pe.havingStyle(it), He.mode, ["mclose"]), rn.makeSpan(["mord"].concat(Qe.sizingClasses(Pe)), [xe, rn.makeSpan(["mfrac"], [ie]), Te], Pe);
        }, Xo = (He, Pe) => {
          let it = new Qn.MathNode("mfrac", [si(He.numer, Pe), si(He.denom, Pe)]);
          if (!He.hasBarLine)
            it.setAttribute("linethickness", "0px");
          else if (He.barSize) {
            const Ue = Re(He.barSize, Pe);
            it.setAttribute("linethickness", je(Ue));
          }
          const bt = Il(He.size, Pe.style);
          if (bt.size !== Pe.style.size) {
            it = new Qn.MathNode("mstyle", [it]);
            const Ue = bt.size === $.DISPLAY.size ? "true" : "false";
            it.setAttribute("displaystyle", Ue), it.setAttribute("scriptlevel", "0");
          }
          if (He.leftDelim != null || He.rightDelim != null) {
            const Ue = [];
            if (He.leftDelim != null) {
              const Qe = new Qn.MathNode("mo", [new Qn.TextNode(He.leftDelim.replace("\\", ""))]);
              Qe.setAttribute("fence", "true"), Ue.push(Qe);
            }
            if (Ue.push(it), He.rightDelim != null) {
              const Qe = new Qn.MathNode("mo", [new Qn.TextNode(He.rightDelim.replace("\\", ""))]);
              Qe.setAttribute("fence", "true"), Ue.push(Qe);
            }
            return Zr(Ue);
          }
          return it;
        };
        un({
          type: "genfrac",
          names: [
            "\\dfrac",
            "\\frac",
            "\\tfrac",
            "\\dbinom",
            "\\binom",
            "\\tbinom",
            "\\\\atopfrac",
            // can’t be entered directly
            "\\\\bracefrac",
            "\\\\brackfrac"
            // ditto
          ],
          props: {
            numArgs: 2,
            allowedInArgument: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0], Qe = Pe[1];
            let ht, Z = null, B = null, y = "auto";
            switch (bt) {
              case "\\dfrac":
              case "\\frac":
              case "\\tfrac":
                ht = !0;
                break;
              case "\\\\atopfrac":
                ht = !1;
                break;
              case "\\dbinom":
              case "\\binom":
              case "\\tbinom":
                ht = !1, Z = "(", B = ")";
                break;
              case "\\\\bracefrac":
                ht = !1, Z = "\\{", B = "\\}";
                break;
              case "\\\\brackfrac":
                ht = !1, Z = "[", B = "]";
                break;
              default:
                throw new Error("Unrecognized genfrac command");
            }
            switch (bt) {
              case "\\dfrac":
              case "\\dbinom":
                y = "display";
                break;
              case "\\tfrac":
              case "\\tbinom":
                y = "text";
                break;
            }
            return {
              type: "genfrac",
              mode: it.mode,
              continued: !1,
              numer: Ue,
              denom: Qe,
              hasBarLine: ht,
              leftDelim: Z,
              rightDelim: B,
              size: y,
              barSize: null
            };
          },
          htmlBuilder: bu,
          mathmlBuilder: Xo
        }), un({
          type: "genfrac",
          names: ["\\cfrac"],
          props: {
            numArgs: 2
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0], Qe = Pe[1];
            return {
              type: "genfrac",
              mode: it.mode,
              continued: !0,
              numer: Ue,
              denom: Qe,
              hasBarLine: !0,
              leftDelim: null,
              rightDelim: null,
              size: "display",
              barSize: null
            };
          }
        }), un({
          type: "infix",
          names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
          props: {
            numArgs: 0,
            infix: !0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it,
              token: bt
            } = He, Ue;
            switch (it) {
              case "\\over":
                Ue = "\\frac";
                break;
              case "\\choose":
                Ue = "\\binom";
                break;
              case "\\atop":
                Ue = "\\\\atopfrac";
                break;
              case "\\brace":
                Ue = "\\\\bracefrac";
                break;
              case "\\brack":
                Ue = "\\\\brackfrac";
                break;
              default:
                throw new Error("Unrecognized infix genfrac command");
            }
            return {
              type: "infix",
              mode: Pe.mode,
              replaceWith: Ue,
              token: bt
            };
          }
        });
        const Ra = ["display", "text", "script", "scriptscript"], No = function(He) {
          let Pe = null;
          return He.length > 0 && (Pe = He, Pe = Pe === "." ? null : Pe), Pe;
        };
        un({
          type: "genfrac",
          names: ["\\genfrac"],
          props: {
            numArgs: 6,
            allowedInArgument: !0,
            argTypes: ["math", "math", "size", "text", "math", "math"]
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            const bt = Pe[4], Ue = Pe[5], Qe = on(Pe[0]), ht = Qe.type === "atom" && Qe.family === "open" ? No(Qe.text) : null, Z = on(Pe[1]), B = Z.type === "atom" && Z.family === "close" ? No(Z.text) : null, y = Vi(Pe[2], "size");
            let b, R = null;
            y.isBlank ? b = !0 : (R = y.value, b = R.number > 0);
            let j = "auto", G = Pe[3];
            if (G.type === "ordgroup") {
              if (G.body.length > 0) {
                const ie = Vi(G.body[0], "textord");
                j = Ra[Number(ie.text)];
              }
            } else
              G = Vi(G, "textord"), j = Ra[Number(G.text)];
            return {
              type: "genfrac",
              mode: it.mode,
              numer: bt,
              denom: Ue,
              continued: !1,
              hasBarLine: b,
              barSize: R,
              leftDelim: ht,
              rightDelim: B,
              size: j
            };
          },
          htmlBuilder: bu,
          mathmlBuilder: Xo
        }), un({
          type: "infix",
          names: ["\\above"],
          props: {
            numArgs: 1,
            argTypes: ["size"],
            infix: !0
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt,
              token: Ue
            } = He;
            return {
              type: "infix",
              mode: it.mode,
              replaceWith: "\\\\abovefrac",
              size: Vi(Pe[0], "size").value,
              token: Ue
            };
          }
        }), un({
          type: "genfrac",
          names: ["\\\\abovefrac"],
          props: {
            numArgs: 3,
            argTypes: ["math", "size", "math"]
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0], Qe = f(Vi(Pe[1], "infix").size), ht = Pe[2], Z = Qe.number > 0;
            return {
              type: "genfrac",
              mode: it.mode,
              numer: Ue,
              denom: ht,
              continued: !1,
              hasBarLine: Z,
              barSize: Qe,
              leftDelim: null,
              rightDelim: null,
              size: "auto"
            };
          },
          htmlBuilder: bu,
          mathmlBuilder: Xo
        });
        const Sa = (He, Pe) => {
          const it = Pe.style;
          let bt, Ue;
          He.type === "supsub" ? (bt = He.sup ? ir(He.sup, Pe.havingStyle(it.sup()), Pe) : ir(He.sub, Pe.havingStyle(it.sub()), Pe), Ue = Vi(He.base, "horizBrace")) : Ue = Vi(He, "horizBrace");
          const Qe = ir(Ue.base, Pe.havingBaseStyle($.DISPLAY)), ht = go.svgSpan(Ue, Pe);
          let Z;
          if (Ue.isOver ? (Z = rn.makeVList({
            positionType: "firstBaseline",
            children: [{
              type: "elem",
              elem: Qe
            }, {
              type: "kern",
              size: 0.1
            }, {
              type: "elem",
              elem: ht
            }]
          }, Pe), Z.children[0].children[0].children[1].classes.push("svg-align")) : (Z = rn.makeVList({
            positionType: "bottom",
            positionData: Qe.depth + 0.1 + ht.height,
            children: [{
              type: "elem",
              elem: ht
            }, {
              type: "kern",
              size: 0.1
            }, {
              type: "elem",
              elem: Qe
            }]
          }, Pe), Z.children[0].children[0].children[0].classes.push("svg-align")), bt) {
            const B = rn.makeSpan(["mord", Ue.isOver ? "mover" : "munder"], [Z], Pe);
            Ue.isOver ? Z = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: B
              }, {
                type: "kern",
                size: 0.2
              }, {
                type: "elem",
                elem: bt
              }]
            }, Pe) : Z = rn.makeVList({
              positionType: "bottom",
              positionData: B.depth + 0.2 + bt.height + bt.depth,
              children: [{
                type: "elem",
                elem: bt
              }, {
                type: "kern",
                size: 0.2
              }, {
                type: "elem",
                elem: B
              }]
            }, Pe);
          }
          return rn.makeSpan(["mord", Ue.isOver ? "mover" : "munder"], [Z], Pe);
        };
        un({
          type: "horizBrace",
          names: ["\\overbrace", "\\underbrace"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            return {
              type: "horizBrace",
              mode: it.mode,
              label: bt,
              isOver: /^\\over/.test(bt),
              base: Pe[0]
            };
          },
          htmlBuilder: Sa,
          mathmlBuilder: (He, Pe) => {
            const it = go.mathMLnode(He.label);
            return new Qn.MathNode(He.isOver ? "mover" : "munder", [si(He.base, Pe), it]);
          }
        }), un({
          type: "href",
          names: ["\\href"],
          props: {
            numArgs: 2,
            argTypes: ["url", "original"],
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[1], Ue = Vi(Pe[0], "url").url;
            return it.settings.isTrusted({
              command: "\\href",
              url: Ue
            }) ? {
              type: "href",
              mode: it.mode,
              href: Ue,
              body: ln(bt)
            } : it.formatUnsupportedCmd("\\href");
          },
          htmlBuilder: (He, Pe) => {
            const it = Ln(He.body, Pe, !1);
            return rn.makeAnchor(He.href, [], it, Pe);
          },
          mathmlBuilder: (He, Pe) => {
            let it = yi(He.body, Pe);
            return it instanceof Er || (it = new Er("mrow", [it])), it.setAttribute("href", He.href), it;
          }
        }), un({
          type: "href",
          names: ["\\url"],
          props: {
            numArgs: 1,
            argTypes: ["url"],
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Vi(Pe[0], "url").url;
            if (!it.settings.isTrusted({
              command: "\\url",
              url: bt
            }))
              return it.formatUnsupportedCmd("\\url");
            const Ue = [];
            for (let ht = 0; ht < bt.length; ht++) {
              let Z = bt[ht];
              Z === "~" && (Z = "\\textasciitilde"), Ue.push({
                type: "textord",
                mode: "text",
                text: Z
              });
            }
            const Qe = {
              type: "text",
              mode: it.mode,
              font: "\\texttt",
              body: Ue
            };
            return {
              type: "href",
              mode: it.mode,
              href: bt,
              body: ln(Qe)
            };
          }
        }), un({
          type: "hbox",
          names: ["\\hbox"],
          props: {
            numArgs: 1,
            argTypes: ["text"],
            allowedInText: !0,
            primitive: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "hbox",
              mode: it.mode,
              body: ln(Pe[0])
            };
          },
          htmlBuilder(He, Pe) {
            const it = Ln(He.body, Pe, !1);
            return rn.makeFragment(it);
          },
          mathmlBuilder(He, Pe) {
            return new Qn.MathNode("mrow", Yr(He.body, Pe));
          }
        }), un({
          type: "html",
          names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
          props: {
            numArgs: 2,
            argTypes: ["raw", "original"],
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt,
              token: Ue
            } = He;
            const Qe = Vi(Pe[0], "raw").string, ht = Pe[1];
            it.settings.strict && it.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
            let Z;
            const B = {};
            switch (bt) {
              case "\\htmlClass":
                B.class = Qe, Z = {
                  command: "\\htmlClass",
                  class: Qe
                };
                break;
              case "\\htmlId":
                B.id = Qe, Z = {
                  command: "\\htmlId",
                  id: Qe
                };
                break;
              case "\\htmlStyle":
                B.style = Qe, Z = {
                  command: "\\htmlStyle",
                  style: Qe
                };
                break;
              case "\\htmlData": {
                const y = Qe.split(",");
                for (let b = 0; b < y.length; b++) {
                  const R = y[b].split("=");
                  if (R.length !== 2)
                    throw new o("Error parsing key-value for \\htmlData");
                  B["data-" + R[0].trim()] = R[1].trim();
                }
                Z = {
                  command: "\\htmlData",
                  attributes: B
                };
                break;
              }
              default:
                throw new Error("Unrecognized html command");
            }
            return it.settings.isTrusted(Z) ? {
              type: "html",
              mode: it.mode,
              attributes: B,
              body: ln(ht)
            } : it.formatUnsupportedCmd(bt);
          },
          htmlBuilder: (He, Pe) => {
            const it = Ln(He.body, Pe, !1), bt = ["enclosing"];
            He.attributes.class && bt.push(...He.attributes.class.trim().split(/\s+/));
            const Ue = rn.makeSpan(bt, it, Pe);
            for (const Qe in He.attributes)
              Qe !== "class" && He.attributes.hasOwnProperty(Qe) && Ue.setAttribute(Qe, He.attributes[Qe]);
            return Ue;
          },
          mathmlBuilder: (He, Pe) => yi(He.body, Pe)
        }), un({
          type: "htmlmathml",
          names: ["\\html@mathml"],
          props: {
            numArgs: 2,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            return {
              type: "htmlmathml",
              mode: it.mode,
              html: ln(Pe[0]),
              mathml: ln(Pe[1])
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = Ln(He.html, Pe, !1);
            return rn.makeFragment(it);
          },
          mathmlBuilder: (He, Pe) => yi(He.mathml, Pe)
        });
        const _a = function(He) {
          if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(He))
            return {
              number: +He,
              unit: "bp"
            };
          {
            const Pe = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(He);
            if (!Pe)
              throw new o("Invalid size: '" + He + "' in \\includegraphics");
            const it = {
              number: +(Pe[1] + Pe[2]),
              // sign + magnitude, cast to number
              unit: Pe[3]
            };
            if (!Ge(it))
              throw new o("Invalid unit: '" + it.unit + "' in \\includegraphics.");
            return it;
          }
        };
        un({
          type: "includegraphics",
          names: ["\\includegraphics"],
          props: {
            numArgs: 1,
            numOptionalArgs: 1,
            argTypes: ["raw", "url"],
            allowedInText: !1
          },
          handler: (He, Pe, it) => {
            let {
              parser: bt
            } = He, Ue = {
              number: 0,
              unit: "em"
            }, Qe = {
              number: 0.9,
              unit: "em"
            }, ht = {
              number: 0,
              unit: "em"
            }, Z = "";
            if (it[0]) {
              const b = Vi(it[0], "raw").string.split(",");
              for (let R = 0; R < b.length; R++) {
                const j = b[R].split("=");
                if (j.length === 2) {
                  const G = j[1].trim();
                  switch (j[0].trim()) {
                    case "alt":
                      Z = G;
                      break;
                    case "width":
                      Ue = _a(G);
                      break;
                    case "height":
                      Qe = _a(G);
                      break;
                    case "totalheight":
                      ht = _a(G);
                      break;
                    default:
                      throw new o("Invalid key: '" + j[0] + "' in \\includegraphics.");
                  }
                }
              }
            }
            const B = Vi(Pe[0], "url").url;
            return Z === "" && (Z = B, Z = Z.replace(/^.*[\\/]/, ""), Z = Z.substring(0, Z.lastIndexOf("."))), bt.settings.isTrusted({
              command: "\\includegraphics",
              url: B
            }) ? {
              type: "includegraphics",
              mode: bt.mode,
              alt: Z,
              width: Ue,
              height: Qe,
              totalheight: ht,
              src: B
            } : bt.formatUnsupportedCmd("\\includegraphics");
          },
          htmlBuilder: (He, Pe) => {
            const it = Re(He.height, Pe);
            let bt = 0;
            He.totalheight.number > 0 && (bt = Re(He.totalheight, Pe) - it);
            let Ue = 0;
            He.width.number > 0 && (Ue = Re(He.width, Pe));
            const Qe = {
              height: je(it + bt)
            };
            Ue > 0 && (Qe.width = je(Ue)), bt > 0 && (Qe.verticalAlign = je(-bt));
            const ht = new ct(He.src, He.alt, Qe);
            return ht.height = it, ht.depth = bt, ht;
          },
          mathmlBuilder: (He, Pe) => {
            const it = new Qn.MathNode("mglyph", []);
            it.setAttribute("alt", He.alt);
            const bt = Re(He.height, Pe);
            let Ue = 0;
            if (He.totalheight.number > 0 && (Ue = Re(He.totalheight, Pe) - bt, it.setAttribute("valign", je(-Ue))), it.setAttribute("height", je(bt + Ue)), He.width.number > 0) {
              const Qe = Re(He.width, Pe);
              it.setAttribute("width", je(Qe));
            }
            return it.setAttribute("src", He.src), it;
          }
        }), un({
          type: "kern",
          names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
          props: {
            numArgs: 1,
            argTypes: ["size"],
            primitive: !0,
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Vi(Pe[0], "size");
            if (it.settings.strict) {
              const Qe = bt[1] === "m", ht = Ue.value.unit === "mu";
              Qe ? (ht || it.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + bt + " supports only mu units, " + ("not " + Ue.value.unit + " units")), it.mode !== "math" && it.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + bt + " works only in math mode")) : ht && it.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + bt + " doesn't support mu units");
            }
            return {
              type: "kern",
              mode: it.mode,
              dimension: Ue.value
            };
          },
          htmlBuilder(He, Pe) {
            return rn.makeGlue(He.dimension, Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = Re(He.dimension, Pe);
            return new Qn.SpaceNode(it);
          }
        }), un({
          type: "lap",
          names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "lap",
              mode: it.mode,
              alignment: bt.slice(5),
              body: Ue
            };
          },
          htmlBuilder: (He, Pe) => {
            let it;
            He.alignment === "clap" ? (it = rn.makeSpan([], [ir(He.body, Pe)]), it = rn.makeSpan(["inner"], [it], Pe)) : it = rn.makeSpan(["inner"], [ir(He.body, Pe)]);
            const bt = rn.makeSpan(["fix"], []);
            let Ue = rn.makeSpan([He.alignment], [it, bt], Pe);
            const Qe = rn.makeSpan(["strut"]);
            return Qe.style.height = je(Ue.height + Ue.depth), Ue.depth && (Qe.style.verticalAlign = je(-Ue.depth)), Ue.children.unshift(Qe), Ue = rn.makeSpan(["thinbox"], [Ue], Pe), rn.makeSpan(["mord", "vbox"], [Ue], Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = new Qn.MathNode("mpadded", [si(He.body, Pe)]);
            if (He.alignment !== "rlap") {
              const bt = He.alignment === "llap" ? "-1" : "-0.5";
              it.setAttribute("lspace", bt + "width");
            }
            return it.setAttribute("width", "0px"), it;
          }
        }), un({
          type: "styling",
          names: ["\\(", "$"],
          props: {
            numArgs: 0,
            allowedInText: !0,
            allowedInMath: !1
          },
          handler(He, Pe) {
            let {
              funcName: it,
              parser: bt
            } = He;
            const Ue = bt.mode;
            bt.switchMode("math");
            const Qe = it === "\\(" ? "\\)" : "$", ht = bt.parseExpression(!1, Qe);
            return bt.expect(Qe), bt.switchMode(Ue), {
              type: "styling",
              mode: bt.mode,
              style: "text",
              body: ht
            };
          }
        }), un({
          type: "text",
          // Doesn't matter what this is.
          names: ["\\)", "\\]"],
          props: {
            numArgs: 0,
            allowedInText: !0,
            allowedInMath: !1
          },
          handler(He, Pe) {
            throw new o("Mismatched " + He.funcName);
          }
        });
        const Do = (He, Pe) => {
          switch (Pe.style.size) {
            case $.DISPLAY.size:
              return He.display;
            case $.TEXT.size:
              return He.text;
            case $.SCRIPT.size:
              return He.script;
            case $.SCRIPTSCRIPT.size:
              return He.scriptscript;
            default:
              return He.text;
          }
        };
        un({
          type: "mathchoice",
          names: ["\\mathchoice"],
          props: {
            numArgs: 4,
            primitive: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            return {
              type: "mathchoice",
              mode: it.mode,
              display: ln(Pe[0]),
              text: ln(Pe[1]),
              script: ln(Pe[2]),
              scriptscript: ln(Pe[3])
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = Do(He, Pe), bt = Ln(it, Pe, !1);
            return rn.makeFragment(bt);
          },
          mathmlBuilder: (He, Pe) => {
            const it = Do(He, Pe);
            return yi(it, Pe);
          }
        });
        const jo = (He, Pe, it, bt, Ue, Qe, ht) => {
          He = rn.makeSpan([], [He]);
          const Z = it && g.isCharacterBox(it);
          let B, y;
          if (Pe) {
            const j = ir(Pe, bt.havingStyle(Ue.sup()), bt);
            y = {
              elem: j,
              kern: Math.max(bt.fontMetrics().bigOpSpacing1, bt.fontMetrics().bigOpSpacing3 - j.depth)
            };
          }
          if (it) {
            const j = ir(it, bt.havingStyle(Ue.sub()), bt);
            B = {
              elem: j,
              kern: Math.max(bt.fontMetrics().bigOpSpacing2, bt.fontMetrics().bigOpSpacing4 - j.height)
            };
          }
          let b;
          if (y && B) {
            const j = bt.fontMetrics().bigOpSpacing5 + B.elem.height + B.elem.depth + B.kern + He.depth + ht;
            b = rn.makeVList({
              positionType: "bottom",
              positionData: j,
              children: [{
                type: "kern",
                size: bt.fontMetrics().bigOpSpacing5
              }, {
                type: "elem",
                elem: B.elem,
                marginLeft: je(-Qe)
              }, {
                type: "kern",
                size: B.kern
              }, {
                type: "elem",
                elem: He
              }, {
                type: "kern",
                size: y.kern
              }, {
                type: "elem",
                elem: y.elem,
                marginLeft: je(Qe)
              }, {
                type: "kern",
                size: bt.fontMetrics().bigOpSpacing5
              }]
            }, bt);
          } else if (B) {
            const j = He.height - ht;
            b = rn.makeVList({
              positionType: "top",
              positionData: j,
              children: [{
                type: "kern",
                size: bt.fontMetrics().bigOpSpacing5
              }, {
                type: "elem",
                elem: B.elem,
                marginLeft: je(-Qe)
              }, {
                type: "kern",
                size: B.kern
              }, {
                type: "elem",
                elem: He
              }]
            }, bt);
          } else if (y) {
            const j = He.depth + ht;
            b = rn.makeVList({
              positionType: "bottom",
              positionData: j,
              children: [{
                type: "elem",
                elem: He
              }, {
                type: "kern",
                size: y.kern
              }, {
                type: "elem",
                elem: y.elem,
                marginLeft: je(Qe)
              }, {
                type: "kern",
                size: bt.fontMetrics().bigOpSpacing5
              }]
            }, bt);
          } else
            return He;
          const R = [b];
          if (B && Qe !== 0 && !Z) {
            const j = rn.makeSpan(["mspace"], [], bt);
            j.style.marginRight = je(Qe), R.unshift(j);
          }
          return rn.makeSpan(["mop", "op-limits"], R, bt);
        }, Dl = ["\\smallint"], Uo = (He, Pe) => {
          let it, bt, Ue = !1, Qe;
          He.type === "supsub" ? (it = He.sup, bt = He.sub, Qe = Vi(He.base, "op"), Ue = !0) : Qe = Vi(He, "op");
          const ht = Pe.style;
          let Z = !1;
          ht.size === $.DISPLAY.size && Qe.symbol && !g.contains(Dl, Qe.name) && (Z = !0);
          let B;
          if (Qe.symbol) {
            const R = Z ? "Size2-Regular" : "Size1-Regular";
            let j = "";
            if ((Qe.name === "\\oiint" || Qe.name === "\\oiiint") && (j = Qe.name.slice(1), Qe.name = j === "oiint" ? "\\iint" : "\\iiint"), B = rn.makeSymbol(Qe.name, R, "math", Pe, ["mop", "op-symbol", Z ? "large-op" : "small-op"]), j.length > 0) {
              const G = B.italic, ie = rn.staticSvg(j + "Size" + (Z ? "2" : "1"), Pe);
              B = rn.makeVList({
                positionType: "individualShift",
                children: [{
                  type: "elem",
                  elem: B,
                  shift: 0
                }, {
                  type: "elem",
                  elem: ie,
                  shift: Z ? 0.08 : 0
                }]
              }, Pe), Qe.name = "\\" + j, B.classes.unshift("mop"), B.italic = G;
            }
          } else if (Qe.body) {
            const R = Ln(Qe.body, Pe, !0);
            R.length === 1 && R[0] instanceof _t ? (B = R[0], B.classes[0] = "mop") : B = rn.makeSpan(["mop"], R, Pe);
          } else {
            const R = [];
            for (let j = 1; j < Qe.name.length; j++)
              R.push(rn.mathsym(Qe.name[j], Qe.mode, Pe));
            B = rn.makeSpan(["mop"], R, Pe);
          }
          let y = 0, b = 0;
          return (B instanceof _t || Qe.name === "\\oiint" || Qe.name === "\\oiiint") && !Qe.suppressBaseShift && (y = (B.height - B.depth) / 2 - Pe.fontMetrics().axisHeight, b = B.italic), Ue ? jo(B, it, bt, Pe, ht, b, y) : (y && (B.style.position = "relative", B.style.top = je(y)), B);
        }, Qs = (He, Pe) => {
          let it;
          if (He.symbol)
            it = new Er("mo", [ri(He.name, He.mode)]), g.contains(Dl, He.name) && it.setAttribute("largeop", "false");
          else if (He.body)
            it = new Er("mo", Yr(He.body, Pe));
          else {
            it = new Er("mi", [new Sr(He.name.slice(1))]);
            const bt = new Er("mo", [ri("⁡", "text")]);
            He.parentIsSupSub ? it = new Er("mrow", [it, bt]) : it = Cr([it, bt]);
          }
          return it;
        }, os = {
          "∏": "\\prod",
          "∐": "\\coprod",
          "∑": "\\sum",
          "⋀": "\\bigwedge",
          "⋁": "\\bigvee",
          "⋂": "\\bigcap",
          "⋃": "\\bigcup",
          "⨀": "\\bigodot",
          "⨁": "\\bigoplus",
          "⨂": "\\bigotimes",
          "⨄": "\\biguplus",
          "⨆": "\\bigsqcup"
        };
        un({
          type: "op",
          names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
          props: {
            numArgs: 0
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He, Ue = bt;
            return Ue.length === 1 && (Ue = os[Ue]), {
              type: "op",
              mode: it.mode,
              limits: !0,
              parentIsSupSub: !1,
              symbol: !0,
              name: Ue
            };
          },
          htmlBuilder: Uo,
          mathmlBuilder: Qs
        }), un({
          type: "op",
          names: ["\\mathop"],
          props: {
            numArgs: 1,
            primitive: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[0];
            return {
              type: "op",
              mode: it.mode,
              limits: !1,
              parentIsSupSub: !1,
              symbol: !1,
              body: ln(bt)
            };
          },
          htmlBuilder: Uo,
          mathmlBuilder: Qs
        });
        const Bu = {
          "∫": "\\int",
          "∬": "\\iint",
          "∭": "\\iiint",
          "∮": "\\oint",
          "∯": "\\oiint",
          "∰": "\\oiiint"
        };
        un({
          type: "op",
          names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
          props: {
            numArgs: 0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He;
            return {
              type: "op",
              mode: Pe.mode,
              limits: !1,
              parentIsSupSub: !1,
              symbol: !1,
              name: it
            };
          },
          htmlBuilder: Uo,
          mathmlBuilder: Qs
        }), un({
          type: "op",
          names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
          props: {
            numArgs: 0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He;
            return {
              type: "op",
              mode: Pe.mode,
              limits: !0,
              parentIsSupSub: !1,
              symbol: !1,
              name: it
            };
          },
          htmlBuilder: Uo,
          mathmlBuilder: Qs
        }), un({
          type: "op",
          names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
          props: {
            numArgs: 0
          },
          handler(He) {
            let {
              parser: Pe,
              funcName: it
            } = He, bt = it;
            return bt.length === 1 && (bt = Bu[bt]), {
              type: "op",
              mode: Pe.mode,
              limits: !1,
              parentIsSupSub: !1,
              symbol: !0,
              name: bt
            };
          },
          htmlBuilder: Uo,
          mathmlBuilder: Qs
        });
        const Ll = (He, Pe) => {
          let it, bt, Ue = !1, Qe;
          He.type === "supsub" ? (it = He.sup, bt = He.sub, Qe = Vi(He.base, "operatorname"), Ue = !0) : Qe = Vi(He, "operatorname");
          let ht;
          if (Qe.body.length > 0) {
            const Z = Qe.body.map((y) => {
              const b = y.text;
              return typeof b == "string" ? {
                type: "textord",
                mode: y.mode,
                text: b
              } : y;
            }), B = Ln(Z, Pe.withFont("mathrm"), !0);
            for (let y = 0; y < B.length; y++) {
              const b = B[y];
              b instanceof _t && (b.text = b.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
            }
            ht = rn.makeSpan(["mop"], B, Pe);
          } else
            ht = rn.makeSpan(["mop"], [], Pe);
          return Ue ? jo(ht, it, bt, Pe, Pe.style, 0, 0) : ht;
        };
        un({
          type: "operatorname",
          names: ["\\operatorname@", "\\operatornamewithlimits"],
          props: {
            numArgs: 1
          },
          handler: (He, Pe) => {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "operatorname",
              mode: it.mode,
              body: ln(Ue),
              alwaysHandleSupSub: bt === "\\operatornamewithlimits",
              limits: !1,
              parentIsSupSub: !1
            };
          },
          htmlBuilder: Ll,
          mathmlBuilder: (He, Pe) => {
            let it = Yr(He.body, Pe.withFont("mathrm")), bt = !0;
            for (let ht = 0; ht < it.length; ht++) {
              const Z = it[ht];
              if (!(Z instanceof Qn.SpaceNode)) if (Z instanceof Qn.MathNode)
                switch (Z.type) {
                  case "mi":
                  case "mn":
                  case "ms":
                  case "mspace":
                  case "mtext":
                    break;
                  case "mo": {
                    const B = Z.children[0];
                    Z.children.length === 1 && B instanceof Qn.TextNode ? B.text = B.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : bt = !1;
                    break;
                  }
                  default:
                    bt = !1;
                }
              else
                bt = !1;
            }
            if (bt) {
              const ht = it.map((Z) => Z.toText()).join("");
              it = [new Qn.TextNode(ht)];
            }
            const Ue = new Qn.MathNode("mi", it);
            Ue.setAttribute("mathvariant", "normal");
            const Qe = new Qn.MathNode("mo", [ri("⁡", "text")]);
            return He.parentIsSupSub ? new Qn.MathNode("mrow", [Ue, Qe]) : Qn.newDocumentFragment([Ue, Qe]);
          }
        }), An("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@"), Gn({
          type: "ordgroup",
          htmlBuilder(He, Pe) {
            return He.semisimple ? rn.makeFragment(Ln(He.body, Pe, !1)) : rn.makeSpan(["mord"], Ln(He.body, Pe, !0), Pe);
          },
          mathmlBuilder(He, Pe) {
            return yi(He.body, Pe, !0);
          }
        }), un({
          type: "overline",
          names: ["\\overline"],
          props: {
            numArgs: 1
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            const bt = Pe[0];
            return {
              type: "overline",
              mode: it.mode,
              body: bt
            };
          },
          htmlBuilder(He, Pe) {
            const it = ir(He.body, Pe.havingCrampedStyle()), bt = rn.makeLineSpan("overline-line", Pe), Ue = Pe.fontMetrics().defaultRuleThickness, Qe = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: it
              }, {
                type: "kern",
                size: 3 * Ue
              }, {
                type: "elem",
                elem: bt
              }, {
                type: "kern",
                size: Ue
              }]
            }, Pe);
            return rn.makeSpan(["mord", "overline"], [Qe], Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mo", [new Qn.TextNode("‾")]);
            it.setAttribute("stretchy", "true");
            const bt = new Qn.MathNode("mover", [si(He.body, Pe), it]);
            return bt.setAttribute("accent", "true"), bt;
          }
        }), un({
          type: "phantom",
          names: ["\\phantom"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[0];
            return {
              type: "phantom",
              mode: it.mode,
              body: ln(bt)
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = Ln(He.body, Pe.withPhantom(), !1);
            return rn.makeFragment(it);
          },
          mathmlBuilder: (He, Pe) => {
            const it = Yr(He.body, Pe);
            return new Qn.MathNode("mphantom", it);
          }
        }), un({
          type: "hphantom",
          names: ["\\hphantom"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[0];
            return {
              type: "hphantom",
              mode: it.mode,
              body: bt
            };
          },
          htmlBuilder: (He, Pe) => {
            let it = rn.makeSpan([], [ir(He.body, Pe.withPhantom())]);
            if (it.height = 0, it.depth = 0, it.children)
              for (let bt = 0; bt < it.children.length; bt++)
                it.children[bt].height = 0, it.children[bt].depth = 0;
            return it = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: it
              }]
            }, Pe), rn.makeSpan(["mord"], [it], Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = Yr(ln(He.body), Pe), bt = new Qn.MathNode("mphantom", it), Ue = new Qn.MathNode("mpadded", [bt]);
            return Ue.setAttribute("height", "0px"), Ue.setAttribute("depth", "0px"), Ue;
          }
        }), un({
          type: "vphantom",
          names: ["\\vphantom"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              parser: it
            } = He;
            const bt = Pe[0];
            return {
              type: "vphantom",
              mode: it.mode,
              body: bt
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = rn.makeSpan(["inner"], [ir(He.body, Pe.withPhantom())]), bt = rn.makeSpan(["fix"], []);
            return rn.makeSpan(["mord", "rlap"], [it, bt], Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = Yr(ln(He.body), Pe), bt = new Qn.MathNode("mphantom", it), Ue = new Qn.MathNode("mpadded", [bt]);
            return Ue.setAttribute("width", "0px"), Ue;
          }
        }), un({
          type: "raisebox",
          names: ["\\raisebox"],
          props: {
            numArgs: 2,
            argTypes: ["size", "hbox"],
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            const bt = Vi(Pe[0], "size").value, Ue = Pe[1];
            return {
              type: "raisebox",
              mode: it.mode,
              dy: bt,
              body: Ue
            };
          },
          htmlBuilder(He, Pe) {
            const it = ir(He.body, Pe), bt = Re(He.dy, Pe);
            return rn.makeVList({
              positionType: "shift",
              positionData: -bt,
              children: [{
                type: "elem",
                elem: it
              }]
            }, Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mpadded", [si(He.body, Pe)]), bt = He.dy.number + He.dy.unit;
            return it.setAttribute("voffset", bt), it;
          }
        }), un({
          type: "internal",
          names: ["\\relax"],
          props: {
            numArgs: 0,
            allowedInText: !0
          },
          handler(He) {
            let {
              parser: Pe
            } = He;
            return {
              type: "internal",
              mode: Pe.mode
            };
          }
        }), un({
          type: "rule",
          names: ["\\rule"],
          props: {
            numArgs: 2,
            numOptionalArgs: 1,
            argTypes: ["size", "size", "size"]
          },
          handler(He, Pe, it) {
            let {
              parser: bt
            } = He;
            const Ue = it[0], Qe = Vi(Pe[0], "size"), ht = Vi(Pe[1], "size");
            return {
              type: "rule",
              mode: bt.mode,
              shift: Ue && Vi(Ue, "size").value,
              width: Qe.value,
              height: ht.value
            };
          },
          htmlBuilder(He, Pe) {
            const it = rn.makeSpan(["mord", "rule"], [], Pe), bt = Re(He.width, Pe), Ue = Re(He.height, Pe), Qe = He.shift ? Re(He.shift, Pe) : 0;
            return it.style.borderRightWidth = je(bt), it.style.borderTopWidth = je(Ue), it.style.bottom = je(Qe), it.width = bt, it.height = Ue + Qe, it.depth = -Qe, it.maxFontSize = Ue * 1.125 * Pe.sizeMultiplier, it;
          },
          mathmlBuilder(He, Pe) {
            const it = Re(He.width, Pe), bt = Re(He.height, Pe), Ue = He.shift ? Re(He.shift, Pe) : 0, Qe = Pe.color && Pe.getColor() || "black", ht = new Qn.MathNode("mspace");
            ht.setAttribute("mathbackground", Qe), ht.setAttribute("width", je(it)), ht.setAttribute("height", je(bt));
            const Z = new Qn.MathNode("mpadded", [ht]);
            return Ue >= 0 ? Z.setAttribute("height", je(Ue)) : (Z.setAttribute("height", je(Ue)), Z.setAttribute("depth", je(-Ue))), Z.setAttribute("voffset", je(Ue)), Z;
          }
        });
        function Lo(He, Pe, it) {
          const bt = Ln(He, Pe, !1), Ue = Pe.sizeMultiplier / it.sizeMultiplier;
          for (let Qe = 0; Qe < bt.length; Qe++) {
            const ht = bt[Qe].classes.indexOf("sizing");
            ht < 0 ? Array.prototype.push.apply(bt[Qe].classes, Pe.sizingClasses(it)) : bt[Qe].classes[ht + 1] === "reset-size" + Pe.size && (bt[Qe].classes[ht + 1] = "reset-size" + it.size), bt[Qe].height *= Ue, bt[Qe].depth *= Ue;
          }
          return rn.makeFragment(bt);
        }
        const Ca = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"];
        un({
          type: "sizing",
          names: Ca,
          props: {
            numArgs: 0,
            allowedInText: !0
          },
          handler: (He, Pe) => {
            let {
              breakOnTokenText: it,
              funcName: bt,
              parser: Ue
            } = He;
            const Qe = Ue.parseExpression(!1, it);
            return {
              type: "sizing",
              mode: Ue.mode,
              // Figure out what size to use based on the list of functions above
              size: Ca.indexOf(bt) + 1,
              body: Qe
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = Pe.havingSize(He.size);
            return Lo(He.body, it, Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = Pe.havingSize(He.size), bt = Yr(He.body, it), Ue = new Qn.MathNode("mstyle", bt);
            return Ue.setAttribute("mathsize", je(it.sizeMultiplier)), Ue;
          }
        }), un({
          type: "smash",
          names: ["\\smash"],
          props: {
            numArgs: 1,
            numOptionalArgs: 1,
            allowedInText: !0
          },
          handler: (He, Pe, it) => {
            let {
              parser: bt
            } = He, Ue = !1, Qe = !1;
            const ht = it[0] && Vi(it[0], "ordgroup");
            if (ht) {
              let B = "";
              for (let y = 0; y < ht.body.length; ++y)
                if (B = ht.body[y].text, B === "t")
                  Ue = !0;
                else if (B === "b")
                  Qe = !0;
                else {
                  Ue = !1, Qe = !1;
                  break;
                }
            } else
              Ue = !0, Qe = !0;
            const Z = Pe[0];
            return {
              type: "smash",
              mode: bt.mode,
              body: Z,
              smashHeight: Ue,
              smashDepth: Qe
            };
          },
          htmlBuilder: (He, Pe) => {
            const it = rn.makeSpan([], [ir(He.body, Pe)]);
            if (!He.smashHeight && !He.smashDepth)
              return it;
            if (He.smashHeight && (it.height = 0, it.children))
              for (let Ue = 0; Ue < it.children.length; Ue++)
                it.children[Ue].height = 0;
            if (He.smashDepth && (it.depth = 0, it.children))
              for (let Ue = 0; Ue < it.children.length; Ue++)
                it.children[Ue].depth = 0;
            const bt = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: it
              }]
            }, Pe);
            return rn.makeSpan(["mord"], [bt], Pe);
          },
          mathmlBuilder: (He, Pe) => {
            const it = new Qn.MathNode("mpadded", [si(He.body, Pe)]);
            return He.smashHeight && it.setAttribute("height", "0px"), He.smashDepth && it.setAttribute("depth", "0px"), it;
          }
        }), un({
          type: "sqrt",
          names: ["\\sqrt"],
          props: {
            numArgs: 1,
            numOptionalArgs: 1
          },
          handler(He, Pe, it) {
            let {
              parser: bt
            } = He;
            const Ue = it[0], Qe = Pe[0];
            return {
              type: "sqrt",
              mode: bt.mode,
              body: Qe,
              index: Ue
            };
          },
          htmlBuilder(He, Pe) {
            let it = ir(He.body, Pe.havingCrampedStyle());
            it.height === 0 && (it.height = Pe.fontMetrics().xHeight), it = rn.wrapFragment(it, Pe);
            const Ue = Pe.fontMetrics().defaultRuleThickness;
            let Qe = Ue;
            Pe.style.id < $.TEXT.id && (Qe = Pe.fontMetrics().xHeight);
            let ht = Ue + Qe / 4;
            const Z = it.height + it.depth + ht + Ue, {
              span: B,
              ruleWidth: y,
              advanceWidth: b
            } = ea.sqrtImage(Z, Pe), R = B.height - y;
            R > it.height + it.depth + ht && (ht = (ht + R - it.height - it.depth) / 2);
            const j = B.height - it.height - ht - y;
            it.style.paddingLeft = je(b);
            const G = rn.makeVList({
              positionType: "firstBaseline",
              children: [{
                type: "elem",
                elem: it,
                wrapperClasses: ["svg-align"]
              }, {
                type: "kern",
                size: -(it.height + j)
              }, {
                type: "elem",
                elem: B
              }, {
                type: "kern",
                size: y
              }]
            }, Pe);
            if (He.index) {
              const ie = Pe.havingStyle($.SCRIPTSCRIPT), fe = ir(He.index, ie, Pe), xe = 0.6 * (G.height - G.depth), Te = rn.makeVList({
                positionType: "shift",
                positionData: -xe,
                children: [{
                  type: "elem",
                  elem: fe
                }]
              }, Pe), ze = rn.makeSpan(["root"], [Te]);
              return rn.makeSpan(["mord", "sqrt"], [ze, G], Pe);
            } else
              return rn.makeSpan(["mord", "sqrt"], [G], Pe);
          },
          mathmlBuilder(He, Pe) {
            const {
              body: it,
              index: bt
            } = He;
            return bt ? new Qn.MathNode("mroot", [si(it, Pe), si(bt, Pe)]) : new Qn.MathNode("msqrt", [si(it, Pe)]);
          }
        });
        const xi = {
          display: $.DISPLAY,
          text: $.TEXT,
          script: $.SCRIPT,
          scriptscript: $.SCRIPTSCRIPT
        };
        un({
          type: "styling",
          names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
          props: {
            numArgs: 0,
            allowedInText: !0,
            primitive: !0
          },
          handler(He, Pe) {
            let {
              breakOnTokenText: it,
              funcName: bt,
              parser: Ue
            } = He;
            const Qe = Ue.parseExpression(!0, it), ht = bt.slice(1, bt.length - 5);
            return {
              type: "styling",
              mode: Ue.mode,
              // Figure out what style to use by pulling out the style from
              // the function name
              style: ht,
              body: Qe
            };
          },
          htmlBuilder(He, Pe) {
            const it = xi[He.style], bt = Pe.havingStyle(it).withFont("");
            return Lo(He.body, bt, Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = xi[He.style], bt = Pe.havingStyle(it), Ue = Yr(He.body, bt), Qe = new Qn.MathNode("mstyle", Ue), Z = {
              display: ["0", "true"],
              text: ["0", "false"],
              script: ["1", "false"],
              scriptscript: ["2", "false"]
            }[He.style];
            return Qe.setAttribute("scriptlevel", Z[0]), Qe.setAttribute("displaystyle", Z[1]), Qe;
          }
        });
        const cc = function(He, Pe) {
          const it = He.base;
          return it ? it.type === "op" ? it.limits && (Pe.style.size === $.DISPLAY.size || it.alwaysHandleSupSub) ? Uo : null : it.type === "operatorname" ? it.alwaysHandleSupSub && (Pe.style.size === $.DISPLAY.size || it.limits) ? Ll : null : it.type === "accent" ? g.isCharacterBox(it.base) ? Zl : null : it.type === "horizBrace" && !He.sub === it.isOver ? Sa : null : null;
        };
        Gn({
          type: "supsub",
          htmlBuilder(He, Pe) {
            const it = cc(He, Pe);
            if (it)
              return it(He, Pe);
            const {
              base: bt,
              sup: Ue,
              sub: Qe
            } = He, ht = ir(bt, Pe);
            let Z, B;
            const y = Pe.fontMetrics();
            let b = 0, R = 0;
            const j = bt && g.isCharacterBox(bt);
            if (Ue) {
              const Ve = Pe.havingStyle(Pe.style.sup());
              Z = ir(Ue, Ve, Pe), j || (b = ht.height - Ve.fontMetrics().supDrop * Ve.sizeMultiplier / Pe.sizeMultiplier);
            }
            if (Qe) {
              const Ve = Pe.havingStyle(Pe.style.sub());
              B = ir(Qe, Ve, Pe), j || (R = ht.depth + Ve.fontMetrics().subDrop * Ve.sizeMultiplier / Pe.sizeMultiplier);
            }
            let G;
            Pe.style === $.DISPLAY ? G = y.sup1 : Pe.style.cramped ? G = y.sup3 : G = y.sup2;
            const ie = Pe.sizeMultiplier, fe = je(0.5 / y.ptPerEm / ie);
            let xe = null;
            if (B) {
              const Ve = He.base && He.base.type === "op" && He.base.name && (He.base.name === "\\oiint" || He.base.name === "\\oiiint");
              (ht instanceof _t || Ve) && (xe = je(-ht.italic));
            }
            let Te;
            if (Z && B) {
              b = Math.max(b, G, Z.depth + 0.25 * y.xHeight), R = Math.max(R, y.sub2);
              const ut = 4 * y.defaultRuleThickness;
              if (b - Z.depth - (B.height - R) < ut) {
                R = ut - (b - Z.depth) + B.height;
                const wt = 0.8 * y.xHeight - (b - Z.depth);
                wt > 0 && (b += wt, R -= wt);
              }
              const gt = [{
                type: "elem",
                elem: B,
                shift: R,
                marginRight: fe,
                marginLeft: xe
              }, {
                type: "elem",
                elem: Z,
                shift: -b,
                marginRight: fe
              }];
              Te = rn.makeVList({
                positionType: "individualShift",
                children: gt
              }, Pe);
            } else if (B) {
              R = Math.max(R, y.sub1, B.height - 0.8 * y.xHeight);
              const Ve = [{
                type: "elem",
                elem: B,
                marginLeft: xe,
                marginRight: fe
              }];
              Te = rn.makeVList({
                positionType: "shift",
                positionData: R,
                children: Ve
              }, Pe);
            } else if (Z)
              b = Math.max(b, G, Z.depth + 0.25 * y.xHeight), Te = rn.makeVList({
                positionType: "shift",
                positionData: -b,
                children: [{
                  type: "elem",
                  elem: Z,
                  marginRight: fe
                }]
              }, Pe);
            else
              throw new Error("supsub must have either sup or sub.");
            const ze = nr(ht, "right") || "mord";
            return rn.makeSpan([ze], [ht, rn.makeSpan(["msupsub"], [Te])], Pe);
          },
          mathmlBuilder(He, Pe) {
            let it = !1, bt, Ue;
            He.base && He.base.type === "horizBrace" && (Ue = !!He.sup, Ue === He.base.isOver && (it = !0, bt = He.base.isOver)), He.base && (He.base.type === "op" || He.base.type === "operatorname") && (He.base.parentIsSupSub = !0);
            const Qe = [si(He.base, Pe)];
            He.sub && Qe.push(si(He.sub, Pe)), He.sup && Qe.push(si(He.sup, Pe));
            let ht;
            if (it)
              ht = bt ? "mover" : "munder";
            else if (He.sub)
              if (He.sup) {
                const Z = He.base;
                Z && Z.type === "op" && Z.limits && Pe.style === $.DISPLAY || Z && Z.type === "operatorname" && Z.alwaysHandleSupSub && (Pe.style === $.DISPLAY || Z.limits) ? ht = "munderover" : ht = "msubsup";
              } else {
                const Z = He.base;
                Z && Z.type === "op" && Z.limits && (Pe.style === $.DISPLAY || Z.alwaysHandleSupSub) || Z && Z.type === "operatorname" && Z.alwaysHandleSupSub && (Z.limits || Pe.style === $.DISPLAY) ? ht = "munder" : ht = "msub";
              }
            else {
              const Z = He.base;
              Z && Z.type === "op" && Z.limits && (Pe.style === $.DISPLAY || Z.alwaysHandleSupSub) || Z && Z.type === "operatorname" && Z.alwaysHandleSupSub && (Z.limits || Pe.style === $.DISPLAY) ? ht = "mover" : ht = "msup";
            }
            return new Qn.MathNode(ht, Qe);
          }
        }), Gn({
          type: "atom",
          htmlBuilder(He, Pe) {
            return rn.mathsym(He.text, He.mode, Pe, ["m" + He.family]);
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mo", [ri(He.text, He.mode)]);
            if (He.family === "bin") {
              const bt = Br(He, Pe);
              bt === "bold-italic" && it.setAttribute("mathvariant", bt);
            } else He.family === "punct" ? it.setAttribute("separator", "true") : (He.family === "open" || He.family === "close") && it.setAttribute("stretchy", "false");
            return it;
          }
        });
        const Dc = {
          mi: "italic",
          mn: "normal",
          mtext: "normal"
        };
        Gn({
          type: "mathord",
          htmlBuilder(He, Pe) {
            return rn.makeOrd(He, Pe, "mathord");
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mi", [ri(He.text, He.mode, Pe)]), bt = Br(He, Pe) || "italic";
            return bt !== Dc[it.type] && it.setAttribute("mathvariant", bt), it;
          }
        }), Gn({
          type: "textord",
          htmlBuilder(He, Pe) {
            return rn.makeOrd(He, Pe, "textord");
          },
          mathmlBuilder(He, Pe) {
            const it = ri(He.text, He.mode, Pe), bt = Br(He, Pe) || "normal";
            let Ue;
            return He.mode === "text" ? Ue = new Qn.MathNode("mtext", [it]) : /[0-9]/.test(He.text) ? Ue = new Qn.MathNode("mn", [it]) : He.text === "\\prime" ? Ue = new Qn.MathNode("mo", [it]) : Ue = new Qn.MathNode("mi", [it]), bt !== Dc[Ue.type] && Ue.setAttribute("mathvariant", bt), Ue;
          }
        });
        const xl = {
          "\\nobreak": "nobreak",
          "\\allowbreak": "allowbreak"
        }, zl = {
          " ": {},
          "\\ ": {},
          "~": {
            className: "nobreak"
          },
          "\\space": {},
          "\\nobreakspace": {
            className: "nobreak"
          }
        };
        Gn({
          type: "spacing",
          htmlBuilder(He, Pe) {
            if (zl.hasOwnProperty(He.text)) {
              const it = zl[He.text].className || "";
              if (He.mode === "text") {
                const bt = rn.makeOrd(He, Pe, "textord");
                return bt.classes.push(it), bt;
              } else
                return rn.makeSpan(["mspace", it], [rn.mathsym(He.text, He.mode, Pe)], Pe);
            } else {
              if (xl.hasOwnProperty(He.text))
                return rn.makeSpan(["mspace", xl[He.text]], [], Pe);
              throw new o('Unknown type of space "' + He.text + '"');
            }
          },
          mathmlBuilder(He, Pe) {
            let it;
            if (zl.hasOwnProperty(He.text))
              it = new Qn.MathNode("mtext", [new Qn.TextNode(" ")]);
            else {
              if (xl.hasOwnProperty(He.text))
                return new Qn.MathNode("mspace");
              throw new o('Unknown type of space "' + He.text + '"');
            }
            return it;
          }
        });
        const Rl = () => {
          const He = new Qn.MathNode("mtd", []);
          return He.setAttribute("width", "50%"), He;
        };
        Gn({
          type: "tag",
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mtable", [new Qn.MathNode("mtr", [Rl(), new Qn.MathNode("mtd", [yi(He.body, Pe)]), Rl(), new Qn.MathNode("mtd", [yi(He.tag, Pe)])])]);
            return it.setAttribute("width", "100%"), it;
          }
        });
        const ju = {
          "\\text": void 0,
          "\\textrm": "textrm",
          "\\textsf": "textsf",
          "\\texttt": "texttt",
          "\\textnormal": "textrm"
        }, ti = {
          "\\textbf": "textbf",
          "\\textmd": "textmd"
        }, js = {
          "\\textit": "textit",
          "\\textup": "textup"
        }, Fl = (He, Pe) => {
          const it = He.font;
          if (it) {
            if (ju[it])
              return Pe.withTextFontFamily(ju[it]);
            if (ti[it])
              return Pe.withTextFontWeight(ti[it]);
            if (it === "\\emph")
              return Pe.fontShape === "textit" ? Pe.withTextFontShape("textup") : Pe.withTextFontShape("textit");
          } else return Pe;
          return Pe.withTextFontShape(js[it]);
        };
        un({
          type: "text",
          names: [
            // Font families
            "\\text",
            "\\textrm",
            "\\textsf",
            "\\texttt",
            "\\textnormal",
            // Font weights
            "\\textbf",
            "\\textmd",
            // Font Shapes
            "\\textit",
            "\\textup",
            "\\emph"
          ],
          props: {
            numArgs: 1,
            argTypes: ["text"],
            allowedInArgument: !0,
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it,
              funcName: bt
            } = He;
            const Ue = Pe[0];
            return {
              type: "text",
              mode: it.mode,
              body: ln(Ue),
              font: bt
            };
          },
          htmlBuilder(He, Pe) {
            const it = Fl(He, Pe), bt = Ln(He.body, it, !0);
            return rn.makeSpan(["mord", "text"], bt, it);
          },
          mathmlBuilder(He, Pe) {
            const it = Fl(He, Pe);
            return yi(He.body, it);
          }
        }), un({
          type: "underline",
          names: ["\\underline"],
          props: {
            numArgs: 1,
            allowedInText: !0
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "underline",
              mode: it.mode,
              body: Pe[0]
            };
          },
          htmlBuilder(He, Pe) {
            const it = ir(He.body, Pe), bt = rn.makeLineSpan("underline-line", Pe), Ue = Pe.fontMetrics().defaultRuleThickness, Qe = rn.makeVList({
              positionType: "top",
              positionData: it.height,
              children: [{
                type: "kern",
                size: Ue
              }, {
                type: "elem",
                elem: bt
              }, {
                type: "kern",
                size: 3 * Ue
              }, {
                type: "elem",
                elem: it
              }]
            }, Pe);
            return rn.makeSpan(["mord", "underline"], [Qe], Pe);
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.MathNode("mo", [new Qn.TextNode("‾")]);
            it.setAttribute("stretchy", "true");
            const bt = new Qn.MathNode("munder", [si(He.body, Pe), it]);
            return bt.setAttribute("accentunder", "true"), bt;
          }
        }), un({
          type: "vcenter",
          names: ["\\vcenter"],
          props: {
            numArgs: 1,
            argTypes: ["original"],
            // In LaTeX, \vcenter can act only on a box.
            allowedInText: !1
          },
          handler(He, Pe) {
            let {
              parser: it
            } = He;
            return {
              type: "vcenter",
              mode: it.mode,
              body: Pe[0]
            };
          },
          htmlBuilder(He, Pe) {
            const it = ir(He.body, Pe), bt = Pe.fontMetrics().axisHeight, Ue = 0.5 * (it.height - bt - (it.depth + bt));
            return rn.makeVList({
              positionType: "shift",
              positionData: Ue,
              children: [{
                type: "elem",
                elem: it
              }]
            }, Pe);
          },
          mathmlBuilder(He, Pe) {
            return new Qn.MathNode("mpadded", [si(He.body, Pe)], ["vcenter"]);
          }
        }), un({
          type: "verb",
          names: ["\\verb"],
          props: {
            numArgs: 0,
            allowedInText: !0
          },
          handler(He, Pe, it) {
            throw new o("\\verb ended by end of line instead of matching delimiter");
          },
          htmlBuilder(He, Pe) {
            const it = Fa(He), bt = [], Ue = Pe.havingStyle(Pe.style.text());
            for (let Qe = 0; Qe < it.length; Qe++) {
              let ht = it[Qe];
              ht === "~" && (ht = "\\textasciitilde"), bt.push(rn.makeSymbol(ht, "Typewriter-Regular", He.mode, Ue, ["mord", "texttt"]));
            }
            return rn.makeSpan(["mord", "text"].concat(Ue.sizingClasses(Pe)), rn.tryCombineChars(bt), Ue);
          },
          mathmlBuilder(He, Pe) {
            const it = new Qn.TextNode(Fa(He)), bt = new Qn.MathNode("mtext", [it]);
            return bt.setAttribute("mathvariant", "monospace"), bt;
          }
        });
        const Fa = (He) => He.body.replace(/ /g, He.star ? "␣" : " ");
        var ss = wr;
        const el = `[ \r
	]`, ks = "\\\\[a-zA-Z@]+", iu = "\\\\[^\uD800-\uDFFF]", tl = "(" + ks + ")" + el + "*", Os = `\\\\(
|[ \r	]+
?)[ \r	]*`, Vs = "[̀-ͯ]", di = new RegExp(Vs + "+$"), xa = "(" + el + "+)|" + // whitespace
        (Os + "|") + // \whitespace
        "([!-\\[\\]-‧‪-퟿豈-]" + // single codepoint
        (Vs + "*") + // ...plus accents
        "|[\uD800-\uDBFF][\uDC00-\uDFFF]" + // surrogate pair
        (Vs + "*") + // ...plus accents
        "|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5" + // \verb unstarred
        ("|" + tl) + // \macroName + spaces
        ("|" + iu + ")");
        class vo {
          // Category codes. The lexer only supports comment characters (14) for now.
          // MacroExpander additionally distinguishes active (13).
          constructor(Pe, it) {
            this.input = void 0, this.settings = void 0, this.tokenRegex = void 0, this.catcodes = void 0, this.input = Pe, this.settings = it, this.tokenRegex = new RegExp(xa, "g"), this.catcodes = {
              "%": 14,
              // comment character
              "~": 13
              // active character
            };
          }
          setCatcode(Pe, it) {
            this.catcodes[Pe] = it;
          }
          /**
           * This function lexes a single token.
           */
          lex() {
            const Pe = this.input, it = this.tokenRegex.lastIndex;
            if (it === Pe.length)
              return new Io("EOF", new to(this, it, it));
            const bt = this.tokenRegex.exec(Pe);
            if (bt === null || bt.index !== it)
              throw new o("Unexpected character: '" + Pe[it] + "'", new Io(Pe[it], new to(this, it, it + 1)));
            const Ue = bt[6] || bt[3] || (bt[2] ? "\\ " : " ");
            if (this.catcodes[Ue] === 14) {
              const Qe = Pe.indexOf(`
`, this.tokenRegex.lastIndex);
              return Qe === -1 ? (this.tokenRegex.lastIndex = Pe.length, this.settings.reportNonstrict("commentAtEnd", "% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")) : this.tokenRegex.lastIndex = Qe + 1, this.lex();
            }
            return new Io(Ue, new to(this, it, this.tokenRegex.lastIndex));
          }
        }
        class Ts {
          /**
           * Both arguments are optional.  The first argument is an object of
           * built-in mappings which never change.  The second argument is an object
           * of initial (global-level) mappings, which will constantly change
           * according to any global/top-level `set`s done.
           */
          constructor(Pe, it) {
            Pe === void 0 && (Pe = {}), it === void 0 && (it = {}), this.current = void 0, this.builtins = void 0, this.undefStack = void 0, this.current = it, this.builtins = Pe, this.undefStack = [];
          }
          /**
           * Start a new nested group, affecting future local `set`s.
           */
          beginGroup() {
            this.undefStack.push({});
          }
          /**
           * End current nested group, restoring values before the group began.
           */
          endGroup() {
            if (this.undefStack.length === 0)
              throw new o("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");
            const Pe = this.undefStack.pop();
            for (const it in Pe)
              Pe.hasOwnProperty(it) && (Pe[it] == null ? delete this.current[it] : this.current[it] = Pe[it]);
          }
          /**
           * Ends all currently nested groups (if any), restoring values before the
           * groups began.  Useful in case of an error in the middle of parsing.
           */
          endGroups() {
            for (; this.undefStack.length > 0; )
              this.endGroup();
          }
          /**
           * Detect whether `name` has a definition.  Equivalent to
           * `get(name) != null`.
           */
          has(Pe) {
            return this.current.hasOwnProperty(Pe) || this.builtins.hasOwnProperty(Pe);
          }
          /**
           * Get the current value of a name, or `undefined` if there is no value.
           *
           * Note: Do not use `if (namespace.get(...))` to detect whether a macro
           * is defined, as the definition may be the empty string which evaluates
           * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
           * `if (namespace.has(...))`.
           */
          get(Pe) {
            return this.current.hasOwnProperty(Pe) ? this.current[Pe] : this.builtins[Pe];
          }
          /**
           * Set the current value of a name, and optionally set it globally too.
           * Local set() sets the current value and (when appropriate) adds an undo
           * operation to the undo stack.  Global set() may change the undo
           * operation at every level, so takes time linear in their number.
           * A value of undefined means to delete existing definitions.
           */
          set(Pe, it, bt) {
            if (bt === void 0 && (bt = !1), bt) {
              for (let Ue = 0; Ue < this.undefStack.length; Ue++)
                delete this.undefStack[Ue][Pe];
              this.undefStack.length > 0 && (this.undefStack[this.undefStack.length - 1][Pe] = it);
            } else {
              const Ue = this.undefStack[this.undefStack.length - 1];
              Ue && !Ue.hasOwnProperty(Pe) && (Ue[Pe] = this.current[Pe]);
            }
            it == null ? delete this.current[Pe] : this.current[Pe] = it;
          }
        }
        var Vo = Nu;
        An("\\noexpand", function(He) {
          const Pe = He.popToken();
          return He.isExpandable(Pe.text) && (Pe.noexpand = !0, Pe.treatAsRelax = !0), {
            tokens: [Pe],
            numArgs: 0
          };
        }), An("\\expandafter", function(He) {
          const Pe = He.popToken();
          return He.expandOnce(!0), {
            tokens: [Pe],
            numArgs: 0
          };
        }), An("\\@firstoftwo", function(He) {
          return {
            tokens: He.consumeArgs(2)[0],
            numArgs: 0
          };
        }), An("\\@secondoftwo", function(He) {
          return {
            tokens: He.consumeArgs(2)[1],
            numArgs: 0
          };
        }), An("\\@ifnextchar", function(He) {
          const Pe = He.consumeArgs(3);
          He.consumeSpaces();
          const it = He.future();
          return Pe[0].length === 1 && Pe[0][0].text === it.text ? {
            tokens: Pe[1],
            numArgs: 0
          } : {
            tokens: Pe[2],
            numArgs: 0
          };
        }), An("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}"), An("\\TextOrMath", function(He) {
          const Pe = He.consumeArgs(2);
          return He.mode === "text" ? {
            tokens: Pe[0],
            numArgs: 0
          } : {
            tokens: Pe[1],
            numArgs: 0
          };
        });
        const Qu = {
          0: 0,
          1: 1,
          2: 2,
          3: 3,
          4: 4,
          5: 5,
          6: 6,
          7: 7,
          8: 8,
          9: 9,
          a: 10,
          A: 10,
          b: 11,
          B: 11,
          c: 12,
          C: 12,
          d: 13,
          D: 13,
          e: 14,
          E: 14,
          f: 15,
          F: 15
        };
        An("\\char", function(He) {
          let Pe = He.popToken(), it, bt = "";
          if (Pe.text === "'")
            it = 8, Pe = He.popToken();
          else if (Pe.text === '"')
            it = 16, Pe = He.popToken();
          else if (Pe.text === "`")
            if (Pe = He.popToken(), Pe.text[0] === "\\")
              bt = Pe.text.charCodeAt(1);
            else {
              if (Pe.text === "EOF")
                throw new o("\\char` missing argument");
              bt = Pe.text.charCodeAt(0);
            }
          else
            it = 10;
          if (it) {
            if (bt = Qu[Pe.text], bt == null || bt >= it)
              throw new o("Invalid base-" + it + " digit " + Pe.text);
            let Ue;
            for (; (Ue = Qu[He.future().text]) != null && Ue < it; )
              bt *= it, bt += Ue, He.popToken();
          }
          return "\\@char{" + bt + "}";
        });
        const li = (He, Pe, it) => {
          let bt = He.consumeArg().tokens;
          if (bt.length !== 1)
            throw new o("\\newcommand's first argument must be a macro name");
          const Ue = bt[0].text, Qe = He.isDefined(Ue);
          if (Qe && !Pe)
            throw new o("\\newcommand{" + Ue + "} attempting to redefine " + (Ue + "; use \\renewcommand"));
          if (!Qe && !it)
            throw new o("\\renewcommand{" + Ue + "} when command " + Ue + " does not yet exist; use \\newcommand");
          let ht = 0;
          if (bt = He.consumeArg().tokens, bt.length === 1 && bt[0].text === "[") {
            let Z = "", B = He.expandNextToken();
            for (; B.text !== "]" && B.text !== "EOF"; )
              Z += B.text, B = He.expandNextToken();
            if (!Z.match(/^\s*[0-9]+\s*$/))
              throw new o("Invalid number of arguments: " + Z);
            ht = parseInt(Z), bt = He.consumeArg().tokens;
          }
          return He.macros.set(Ue, {
            tokens: bt,
            numArgs: ht
          }), "";
        };
        An("\\newcommand", (He) => li(He, !1, !0)), An("\\renewcommand", (He) => li(He, !0, !1)), An("\\providecommand", (He) => li(He, !0, !0)), An("\\message", (He) => {
          const Pe = He.consumeArgs(1)[0];
          return console.log(Pe.reverse().map((it) => it.text).join("")), "";
        }), An("\\errmessage", (He) => {
          const Pe = He.consumeArgs(1)[0];
          return console.error(Pe.reverse().map((it) => it.text).join("")), "";
        }), An("\\show", (He) => {
          const Pe = He.popToken(), it = Pe.text;
          return console.log(Pe, He.macros.get(it), ss[it], St.math[it], St.text[it]), "";
        }), An("\\bgroup", "{"), An("\\egroup", "}"), An("~", "\\nobreakspace"), An("\\lq", "`"), An("\\rq", "'"), An("\\aa", "\\r a"), An("\\AA", "\\r A"), An("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}"), An("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"), An("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"), An("ℬ", "\\mathscr{B}"), An("ℰ", "\\mathscr{E}"), An("ℱ", "\\mathscr{F}"), An("ℋ", "\\mathscr{H}"), An("ℐ", "\\mathscr{I}"), An("ℒ", "\\mathscr{L}"), An("ℳ", "\\mathscr{M}"), An("ℛ", "\\mathscr{R}"), An("ℭ", "\\mathfrak{C}"), An("ℌ", "\\mathfrak{H}"), An("ℨ", "\\mathfrak{Z}"), An("\\Bbbk", "\\Bbb{k}"), An("·", "\\cdotp"), An("\\llap", "\\mathllap{\\textrm{#1}}"), An("\\rlap", "\\mathrlap{\\textrm{#1}}"), An("\\clap", "\\mathclap{\\textrm{#1}}"), An("\\mathstrut", "\\vphantom{(}"), An("\\underbar", "\\underline{\\text{#1}}"), An("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'), An("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"), An("\\ne", "\\neq"), An("≠", "\\neq"), An("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"), An("∉", "\\notin"), An("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"), An("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"), An("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"), An("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"), An("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"), An("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"), An("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"), An("⟂", "\\perp"), An("‼", "\\mathclose{!\\mkern-0.8mu!}"), An("∌", "\\notni"), An("⌜", "\\ulcorner"), An("⌝", "\\urcorner"), An("⌞", "\\llcorner"), An("⌟", "\\lrcorner"), An("©", "\\copyright"), An("®", "\\textregistered"), An("️", "\\textregistered"), An("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'), An("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'), An("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'), An("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'), An("\\vdots", "\\mathord{\\varvdots\\rule{0pt}{15pt}}"), An("⋮", "\\vdots"), An("\\varGamma", "\\mathit{\\Gamma}"), An("\\varDelta", "\\mathit{\\Delta}"), An("\\varTheta", "\\mathit{\\Theta}"), An("\\varLambda", "\\mathit{\\Lambda}"), An("\\varXi", "\\mathit{\\Xi}"), An("\\varPi", "\\mathit{\\Pi}"), An("\\varSigma", "\\mathit{\\Sigma}"), An("\\varUpsilon", "\\mathit{\\Upsilon}"), An("\\varPhi", "\\mathit{\\Phi}"), An("\\varPsi", "\\mathit{\\Psi}"), An("\\varOmega", "\\mathit{\\Omega}"), An("\\substack", "\\begin{subarray}{c}#1\\end{subarray}"), An("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"), An("\\boxed", "\\fbox{$\\displaystyle{#1}$}"), An("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;"), An("\\implies", "\\DOTSB\\;\\Longrightarrow\\;"), An("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
        const ls = {
          ",": "\\dotsc",
          "\\not": "\\dotsb",
          // \keybin@ checks for the following:
          "+": "\\dotsb",
          "=": "\\dotsb",
          "<": "\\dotsb",
          ">": "\\dotsb",
          "-": "\\dotsb",
          "*": "\\dotsb",
          ":": "\\dotsb",
          // Symbols whose definition starts with \DOTSB:
          "\\DOTSB": "\\dotsb",
          "\\coprod": "\\dotsb",
          "\\bigvee": "\\dotsb",
          "\\bigwedge": "\\dotsb",
          "\\biguplus": "\\dotsb",
          "\\bigcap": "\\dotsb",
          "\\bigcup": "\\dotsb",
          "\\prod": "\\dotsb",
          "\\sum": "\\dotsb",
          "\\bigotimes": "\\dotsb",
          "\\bigoplus": "\\dotsb",
          "\\bigodot": "\\dotsb",
          "\\bigsqcup": "\\dotsb",
          "\\And": "\\dotsb",
          "\\longrightarrow": "\\dotsb",
          "\\Longrightarrow": "\\dotsb",
          "\\longleftarrow": "\\dotsb",
          "\\Longleftarrow": "\\dotsb",
          "\\longleftrightarrow": "\\dotsb",
          "\\Longleftrightarrow": "\\dotsb",
          "\\mapsto": "\\dotsb",
          "\\longmapsto": "\\dotsb",
          "\\hookrightarrow": "\\dotsb",
          "\\doteq": "\\dotsb",
          // Symbols whose definition starts with \mathbin:
          "\\mathbin": "\\dotsb",
          // Symbols whose definition starts with \mathrel:
          "\\mathrel": "\\dotsb",
          "\\relbar": "\\dotsb",
          "\\Relbar": "\\dotsb",
          "\\xrightarrow": "\\dotsb",
          "\\xleftarrow": "\\dotsb",
          // Symbols whose definition starts with \DOTSI:
          "\\DOTSI": "\\dotsi",
          "\\int": "\\dotsi",
          "\\oint": "\\dotsi",
          "\\iint": "\\dotsi",
          "\\iiint": "\\dotsi",
          "\\iiiint": "\\dotsi",
          "\\idotsint": "\\dotsi",
          // Symbols whose definition starts with \DOTSX:
          "\\DOTSX": "\\dotsx"
        };
        An("\\dots", function(He) {
          let Pe = "\\dotso";
          const it = He.expandAfterFuture().text;
          return it in ls ? Pe = ls[it] : (it.slice(0, 4) === "\\not" || it in St.math && g.contains(["bin", "rel"], St.math[it].group)) && (Pe = "\\dotsb"), Pe;
        });
        const ma = {
          // \rightdelim@ checks for the following:
          ")": !0,
          "]": !0,
          "\\rbrack": !0,
          "\\}": !0,
          "\\rbrace": !0,
          "\\rangle": !0,
          "\\rceil": !0,
          "\\rfloor": !0,
          "\\rgroup": !0,
          "\\rmoustache": !0,
          "\\right": !0,
          "\\bigr": !0,
          "\\biggr": !0,
          "\\Bigr": !0,
          "\\Biggr": !0,
          // \extra@ also tests for the following:
          $: !0,
          // \extrap@ checks for the following:
          ";": !0,
          ".": !0,
          ",": !0
        };
        An("\\dotso", function(He) {
          return He.future().text in ma ? "\\ldots\\," : "\\ldots";
        }), An("\\dotsc", function(He) {
          const Pe = He.future().text;
          return Pe in ma && Pe !== "," ? "\\ldots\\," : "\\ldots";
        }), An("\\cdots", function(He) {
          return He.future().text in ma ? "\\@cdots\\," : "\\@cdots";
        }), An("\\dotsb", "\\cdots"), An("\\dotsm", "\\cdots"), An("\\dotsi", "\\!\\cdots"), An("\\dotsx", "\\ldots\\,"), An("\\DOTSI", "\\relax"), An("\\DOTSB", "\\relax"), An("\\DOTSX", "\\relax"), An("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"), An("\\,", "\\tmspace+{3mu}{.1667em}"), An("\\thinspace", "\\,"), An("\\>", "\\mskip{4mu}"), An("\\:", "\\tmspace+{4mu}{.2222em}"), An("\\medspace", "\\:"), An("\\;", "\\tmspace+{5mu}{.2777em}"), An("\\thickspace", "\\;"), An("\\!", "\\tmspace-{3mu}{.1667em}"), An("\\negthinspace", "\\!"), An("\\negmedspace", "\\tmspace-{4mu}{.2222em}"), An("\\negthickspace", "\\tmspace-{5mu}{.277em}"), An("\\enspace", "\\kern.5em "), An("\\enskip", "\\hskip.5em\\relax"), An("\\quad", "\\hskip1em\\relax"), An("\\qquad", "\\hskip2em\\relax"), An("\\tag", "\\@ifstar\\tag@literal\\tag@paren"), An("\\tag@paren", "\\tag@literal{({#1})}"), An("\\tag@literal", (He) => {
          if (He.macros.get("\\df@tag"))
            throw new o("Multiple \\tag");
          return "\\gdef\\df@tag{\\text{#1}}";
        }), An("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"), An("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"), An("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}"), An("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"), An("\\newline", "\\\\\\relax"), An("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
        const au = je(pe["Main-Regular"][84][1] - 0.7 * pe["Main-Regular"][65][1]);
        An("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + au + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}"), An("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + au + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}"), An("\\hspace", "\\@ifstar\\@hspacer\\@hspace"), An("\\@hspace", "\\hskip #1\\relax"), An("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax"), An("\\ordinarycolon", ":"), An("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}"), An("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'), An("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'), An("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'), An("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'), An("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'), An("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'), An("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'), An("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'), An("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'), An("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'), An("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'), An("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'), An("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'), An("∷", "\\dblcolon"), An("∹", "\\eqcolon"), An("≔", "\\coloneqq"), An("≕", "\\eqqcolon"), An("⩴", "\\Coloneqq"), An("\\ratio", "\\vcentcolon"), An("\\coloncolon", "\\dblcolon"), An("\\colonequals", "\\coloneqq"), An("\\coloncolonequals", "\\Coloneqq"), An("\\equalscolon", "\\eqqcolon"), An("\\equalscoloncolon", "\\Eqqcolon"), An("\\colonminus", "\\coloneq"), An("\\coloncolonminus", "\\Coloneq"), An("\\minuscolon", "\\eqcolon"), An("\\minuscoloncolon", "\\Eqcolon"), An("\\coloncolonapprox", "\\Colonapprox"), An("\\coloncolonsim", "\\Colonsim"), An("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), An("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"), An("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"), An("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"), An("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"), An("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}"), An("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}"), An("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}"), An("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}"), An("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}"), An("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}"), An("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}"), An("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}"), An("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}"), An("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}"), An("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}"), An("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}"), An("\\nleqq", "\\html@mathml{\\@nleqq}{≰}"), An("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}"), An("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}"), An("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}"), An("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}"), An("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}"), An("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}"), An("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}"), An("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}"), An("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}"), An("\\imath", "\\html@mathml{\\@imath}{ı}"), An("\\jmath", "\\html@mathml{\\@jmath}{ȷ}"), An("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"), An("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"), An("⟦", "\\llbracket"), An("⟧", "\\rrbracket"), An("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"), An("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"), An("⦃", "\\lBrace"), An("⦄", "\\rBrace"), An("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"), An("⦵", "\\minuso"), An("\\darr", "\\downarrow"), An("\\dArr", "\\Downarrow"), An("\\Darr", "\\Downarrow"), An("\\lang", "\\langle"), An("\\rang", "\\rangle"), An("\\uarr", "\\uparrow"), An("\\uArr", "\\Uparrow"), An("\\Uarr", "\\Uparrow"), An("\\N", "\\mathbb{N}"), An("\\R", "\\mathbb{R}"), An("\\Z", "\\mathbb{Z}"), An("\\alef", "\\aleph"), An("\\alefsym", "\\aleph"), An("\\Alpha", "\\mathrm{A}"), An("\\Beta", "\\mathrm{B}"), An("\\bull", "\\bullet"), An("\\Chi", "\\mathrm{X}"), An("\\clubs", "\\clubsuit"), An("\\cnums", "\\mathbb{C}"), An("\\Complex", "\\mathbb{C}"), An("\\Dagger", "\\ddagger"), An("\\diamonds", "\\diamondsuit"), An("\\empty", "\\emptyset"), An("\\Epsilon", "\\mathrm{E}"), An("\\Eta", "\\mathrm{H}"), An("\\exist", "\\exists"), An("\\harr", "\\leftrightarrow"), An("\\hArr", "\\Leftrightarrow"), An("\\Harr", "\\Leftrightarrow"), An("\\hearts", "\\heartsuit"), An("\\image", "\\Im"), An("\\infin", "\\infty"), An("\\Iota", "\\mathrm{I}"), An("\\isin", "\\in"), An("\\Kappa", "\\mathrm{K}"), An("\\larr", "\\leftarrow"), An("\\lArr", "\\Leftarrow"), An("\\Larr", "\\Leftarrow"), An("\\lrarr", "\\leftrightarrow"), An("\\lrArr", "\\Leftrightarrow"), An("\\Lrarr", "\\Leftrightarrow"), An("\\Mu", "\\mathrm{M}"), An("\\natnums", "\\mathbb{N}"), An("\\Nu", "\\mathrm{N}"), An("\\Omicron", "\\mathrm{O}"), An("\\plusmn", "\\pm"), An("\\rarr", "\\rightarrow"), An("\\rArr", "\\Rightarrow"), An("\\Rarr", "\\Rightarrow"), An("\\real", "\\Re"), An("\\reals", "\\mathbb{R}"), An("\\Reals", "\\mathbb{R}"), An("\\Rho", "\\mathrm{P}"), An("\\sdot", "\\cdot"), An("\\sect", "\\S"), An("\\spades", "\\spadesuit"), An("\\sub", "\\subset"), An("\\sube", "\\subseteq"), An("\\supe", "\\supseteq"), An("\\Tau", "\\mathrm{T}"), An("\\thetasym", "\\vartheta"), An("\\weierp", "\\wp"), An("\\Zeta", "\\mathrm{Z}"), An("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}"), An("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}"), An("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"), An("\\bra", "\\mathinner{\\langle{#1}|}"), An("\\ket", "\\mathinner{|{#1}\\rangle}"), An("\\braket", "\\mathinner{\\langle{#1}\\rangle}"), An("\\Bra", "\\left\\langle#1\\right|"), An("\\Ket", "\\left|#1\\right\\rangle");
        const $s = (He) => (Pe) => {
          const it = Pe.consumeArg().tokens, bt = Pe.consumeArg().tokens, Ue = Pe.consumeArg().tokens, Qe = Pe.consumeArg().tokens, ht = Pe.macros.get("|"), Z = Pe.macros.get("\\|");
          Pe.macros.beginGroup();
          const B = (R) => (j) => {
            He && (j.macros.set("|", ht), Ue.length && j.macros.set("\\|", Z));
            let G = R;
            return !R && Ue.length && j.future().text === "|" && (j.popToken(), G = !0), {
              tokens: G ? Ue : bt,
              numArgs: 0
            };
          };
          Pe.macros.set("|", B(!1)), Ue.length && Pe.macros.set("\\|", B(!0));
          const y = Pe.consumeArg().tokens, b = Pe.expandTokens([
            ...Qe,
            ...y,
            ...it
            // reversed
          ]);
          return Pe.macros.endGroup(), {
            tokens: b.reverse(),
            numArgs: 0
          };
        };
        An("\\bra@ket", $s(!1)), An("\\bra@set", $s(!0)), An("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"), An("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"), An("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"), An("\\angln", "{\\angl n}"), An("\\blue", "\\textcolor{##6495ed}{#1}"), An("\\orange", "\\textcolor{##ffa500}{#1}"), An("\\pink", "\\textcolor{##ff00af}{#1}"), An("\\red", "\\textcolor{##df0030}{#1}"), An("\\green", "\\textcolor{##28ae7b}{#1}"), An("\\gray", "\\textcolor{gray}{#1}"), An("\\purple", "\\textcolor{##9d38bd}{#1}"), An("\\blueA", "\\textcolor{##ccfaff}{#1}"), An("\\blueB", "\\textcolor{##80f6ff}{#1}"), An("\\blueC", "\\textcolor{##63d9ea}{#1}"), An("\\blueD", "\\textcolor{##11accd}{#1}"), An("\\blueE", "\\textcolor{##0c7f99}{#1}"), An("\\tealA", "\\textcolor{##94fff5}{#1}"), An("\\tealB", "\\textcolor{##26edd5}{#1}"), An("\\tealC", "\\textcolor{##01d1c1}{#1}"), An("\\tealD", "\\textcolor{##01a995}{#1}"), An("\\tealE", "\\textcolor{##208170}{#1}"), An("\\greenA", "\\textcolor{##b6ffb0}{#1}"), An("\\greenB", "\\textcolor{##8af281}{#1}"), An("\\greenC", "\\textcolor{##74cf70}{#1}"), An("\\greenD", "\\textcolor{##1fab54}{#1}"), An("\\greenE", "\\textcolor{##0d923f}{#1}"), An("\\goldA", "\\textcolor{##ffd0a9}{#1}"), An("\\goldB", "\\textcolor{##ffbb71}{#1}"), An("\\goldC", "\\textcolor{##ff9c39}{#1}"), An("\\goldD", "\\textcolor{##e07d10}{#1}"), An("\\goldE", "\\textcolor{##a75a05}{#1}"), An("\\redA", "\\textcolor{##fca9a9}{#1}"), An("\\redB", "\\textcolor{##ff8482}{#1}"), An("\\redC", "\\textcolor{##f9685d}{#1}"), An("\\redD", "\\textcolor{##e84d39}{#1}"), An("\\redE", "\\textcolor{##bc2612}{#1}"), An("\\maroonA", "\\textcolor{##ffbde0}{#1}"), An("\\maroonB", "\\textcolor{##ff92c6}{#1}"), An("\\maroonC", "\\textcolor{##ed5fa6}{#1}"), An("\\maroonD", "\\textcolor{##ca337c}{#1}"), An("\\maroonE", "\\textcolor{##9e034e}{#1}"), An("\\purpleA", "\\textcolor{##ddd7ff}{#1}"), An("\\purpleB", "\\textcolor{##c6b9fc}{#1}"), An("\\purpleC", "\\textcolor{##aa87ff}{#1}"), An("\\purpleD", "\\textcolor{##7854ab}{#1}"), An("\\purpleE", "\\textcolor{##543b78}{#1}"), An("\\mintA", "\\textcolor{##f5f9e8}{#1}"), An("\\mintB", "\\textcolor{##edf2df}{#1}"), An("\\mintC", "\\textcolor{##e0e5cc}{#1}"), An("\\grayA", "\\textcolor{##f6f7f7}{#1}"), An("\\grayB", "\\textcolor{##f0f1f2}{#1}"), An("\\grayC", "\\textcolor{##e3e5e6}{#1}"), An("\\grayD", "\\textcolor{##d6d8da}{#1}"), An("\\grayE", "\\textcolor{##babec2}{#1}"), An("\\grayF", "\\textcolor{##888d93}{#1}"), An("\\grayG", "\\textcolor{##626569}{#1}"), An("\\grayH", "\\textcolor{##3b3e40}{#1}"), An("\\grayI", "\\textcolor{##21242c}{#1}"), An("\\kaBlue", "\\textcolor{##314453}{#1}"), An("\\kaGreen", "\\textcolor{##71B307}{#1}");
        const bl = {
          "^": !0,
          // Parser.js
          _: !0,
          // Parser.js
          "\\limits": !0,
          // Parser.js
          "\\nolimits": !0
          // Parser.js
        };
        class Lc {
          constructor(Pe, it, bt) {
            this.settings = void 0, this.expansionCount = void 0, this.lexer = void 0, this.macros = void 0, this.stack = void 0, this.mode = void 0, this.settings = it, this.expansionCount = 0, this.feed(Pe), this.macros = new Ts(Vo, it.macros), this.mode = bt, this.stack = [];
          }
          /**
           * Feed a new input string to the same MacroExpander
           * (with existing macros etc.).
           */
          feed(Pe) {
            this.lexer = new vo(Pe, this.settings);
          }
          /**
           * Switches between "text" and "math" modes.
           */
          switchMode(Pe) {
            this.mode = Pe;
          }
          /**
           * Start a new group nesting within all namespaces.
           */
          beginGroup() {
            this.macros.beginGroup();
          }
          /**
           * End current group nesting within all namespaces.
           */
          endGroup() {
            this.macros.endGroup();
          }
          /**
           * Ends all currently nested groups (if any), restoring values before the
           * groups began.  Useful in case of an error in the middle of parsing.
           */
          endGroups() {
            this.macros.endGroups();
          }
          /**
           * Returns the topmost token on the stack, without expanding it.
           * Similar in behavior to TeX's `\futurelet`.
           */
          future() {
            return this.stack.length === 0 && this.pushToken(this.lexer.lex()), this.stack[this.stack.length - 1];
          }
          /**
           * Remove and return the next unexpanded token.
           */
          popToken() {
            return this.future(), this.stack.pop();
          }
          /**
           * Add a given token to the token stack.  In particular, this get be used
           * to put back a token returned from one of the other methods.
           */
          pushToken(Pe) {
            this.stack.push(Pe);
          }
          /**
           * Append an array of tokens to the token stack.
           */
          pushTokens(Pe) {
            this.stack.push(...Pe);
          }
          /**
           * Find an macro argument without expanding tokens and append the array of
           * tokens to the token stack. Uses Token as a container for the result.
           */
          scanArgument(Pe) {
            let it, bt, Ue;
            if (Pe) {
              if (this.consumeSpaces(), this.future().text !== "[")
                return null;
              it = this.popToken(), {
                tokens: Ue,
                end: bt
              } = this.consumeArg(["]"]);
            } else
              ({
                tokens: Ue,
                start: it,
                end: bt
              } = this.consumeArg());
            return this.pushToken(new Io("EOF", bt.loc)), this.pushTokens(Ue), it.range(bt, "");
          }
          /**
           * Consume all following space tokens, without expansion.
           */
          consumeSpaces() {
            for (; this.future().text === " "; )
              this.stack.pop();
          }
          /**
           * Consume an argument from the token stream, and return the resulting array
           * of tokens and start/end token.
           */
          consumeArg(Pe) {
            const it = [], bt = Pe && Pe.length > 0;
            bt || this.consumeSpaces();
            const Ue = this.future();
            let Qe, ht = 0, Z = 0;
            do {
              if (Qe = this.popToken(), it.push(Qe), Qe.text === "{")
                ++ht;
              else if (Qe.text === "}") {
                if (--ht, ht === -1)
                  throw new o("Extra }", Qe);
              } else if (Qe.text === "EOF")
                throw new o("Unexpected end of input in a macro argument, expected '" + (Pe && bt ? Pe[Z] : "}") + "'", Qe);
              if (Pe && bt)
                if ((ht === 0 || ht === 1 && Pe[Z] === "{") && Qe.text === Pe[Z]) {
                  if (++Z, Z === Pe.length) {
                    it.splice(-Z, Z);
                    break;
                  }
                } else
                  Z = 0;
            } while (ht !== 0 || bt);
            return Ue.text === "{" && it[it.length - 1].text === "}" && (it.pop(), it.shift()), it.reverse(), {
              tokens: it,
              start: Ue,
              end: Qe
            };
          }
          /**
           * Consume the specified number of (delimited) arguments from the token
           * stream and return the resulting array of arguments.
           */
          consumeArgs(Pe, it) {
            if (it) {
              if (it.length !== Pe + 1)
                throw new o("The length of delimiters doesn't match the number of args!");
              const Ue = it[0];
              for (let Qe = 0; Qe < Ue.length; Qe++) {
                const ht = this.popToken();
                if (Ue[Qe] !== ht.text)
                  throw new o("Use of the macro doesn't match its definition", ht);
              }
            }
            const bt = [];
            for (let Ue = 0; Ue < Pe; Ue++)
              bt.push(this.consumeArg(it && it[Ue + 1]).tokens);
            return bt;
          }
          /**
           * Increment `expansionCount` by the specified amount.
           * Throw an error if it exceeds `maxExpand`.
           */
          countExpansion(Pe) {
            if (this.expansionCount += Pe, this.expansionCount > this.settings.maxExpand)
              throw new o("Too many expansions: infinite loop or need to increase maxExpand setting");
          }
          /**
           * Expand the next token only once if possible.
           *
           * If the token is expanded, the resulting tokens will be pushed onto
           * the stack in reverse order, and the number of such tokens will be
           * returned.  This number might be zero or positive.
           *
           * If not, the return value is `false`, and the next token remains at the
           * top of the stack.
           *
           * In either case, the next token will be on the top of the stack,
           * or the stack will be empty (in case of empty expansion
           * and no other tokens).
           *
           * Used to implement `expandAfterFuture` and `expandNextToken`.
           *
           * If expandableOnly, only expandable tokens are expanded and
           * an undefined control sequence results in an error.
           */
          expandOnce(Pe) {
            const it = this.popToken(), bt = it.text, Ue = it.noexpand ? null : this._getExpansion(bt);
            if (Ue == null || Pe && Ue.unexpandable) {
              if (Pe && Ue == null && bt[0] === "\\" && !this.isDefined(bt))
                throw new o("Undefined control sequence: " + bt);
              return this.pushToken(it), !1;
            }
            this.countExpansion(1);
            let Qe = Ue.tokens;
            const ht = this.consumeArgs(Ue.numArgs, Ue.delimiters);
            if (Ue.numArgs) {
              Qe = Qe.slice();
              for (let Z = Qe.length - 1; Z >= 0; --Z) {
                let B = Qe[Z];
                if (B.text === "#") {
                  if (Z === 0)
                    throw new o("Incomplete placeholder at end of macro body", B);
                  if (B = Qe[--Z], B.text === "#")
                    Qe.splice(Z + 1, 1);
                  else if (/^[1-9]$/.test(B.text))
                    Qe.splice(Z, 2, ...ht[+B.text - 1]);
                  else
                    throw new o("Not a valid argument number", B);
                }
              }
            }
            return this.pushTokens(Qe), Qe.length;
          }
          /**
           * Expand the next token only once (if possible), and return the resulting
           * top token on the stack (without removing anything from the stack).
           * Similar in behavior to TeX's `\expandafter\futurelet`.
           * Equivalent to expandOnce() followed by future().
           */
          expandAfterFuture() {
            return this.expandOnce(), this.future();
          }
          /**
           * Recursively expand first token, then return first non-expandable token.
           */
          expandNextToken() {
            for (; ; )
              if (this.expandOnce() === !1) {
                const Pe = this.stack.pop();
                return Pe.treatAsRelax && (Pe.text = "\\relax"), Pe;
              }
            throw new Error();
          }
          /**
           * Fully expand the given macro name and return the resulting list of
           * tokens, or return `undefined` if no such macro is defined.
           */
          expandMacro(Pe) {
            return this.macros.has(Pe) ? this.expandTokens([new Io(Pe)]) : void 0;
          }
          /**
           * Fully expand the given token stream and return the resulting list of
           * tokens.  Note that the input tokens are in reverse order, but the
           * output tokens are in forward order.
           */
          expandTokens(Pe) {
            const it = [], bt = this.stack.length;
            for (this.pushTokens(Pe); this.stack.length > bt; )
              if (this.expandOnce(!0) === !1) {
                const Ue = this.stack.pop();
                Ue.treatAsRelax && (Ue.noexpand = !1, Ue.treatAsRelax = !1), it.push(Ue);
              }
            return this.countExpansion(it.length), it;
          }
          /**
           * Fully expand the given macro name and return the result as a string,
           * or return `undefined` if no such macro is defined.
           */
          expandMacroAsText(Pe) {
            const it = this.expandMacro(Pe);
            return it && it.map((bt) => bt.text).join("");
          }
          /**
           * Returns the expanded macro as a reversed array of tokens and a macro
           * argument count.  Or returns `null` if no such macro.
           */
          _getExpansion(Pe) {
            const it = this.macros.get(Pe);
            if (it == null)
              return it;
            if (Pe.length === 1) {
              const Ue = this.lexer.catcodes[Pe];
              if (Ue != null && Ue !== 13)
                return;
            }
            const bt = typeof it == "function" ? it(this) : it;
            if (typeof bt == "string") {
              let Ue = 0;
              if (bt.indexOf("#") !== -1) {
                const y = bt.replace(/##/g, "");
                for (; y.indexOf("#" + (Ue + 1)) !== -1; )
                  ++Ue;
              }
              const Qe = new vo(bt, this.settings), ht = [];
              let Z = Qe.lex();
              for (; Z.text !== "EOF"; )
                ht.push(Z), Z = Qe.lex();
              return ht.reverse(), {
                tokens: ht,
                numArgs: Ue
              };
            }
            return bt;
          }
          /**
           * Determine whether a command is currently "defined" (has some
           * functionality), meaning that it's a macro (in the current group),
           * a function, a symbol, or one of the special commands listed in
           * `implicitCommands`.
           */
          isDefined(Pe) {
            return this.macros.has(Pe) || ss.hasOwnProperty(Pe) || St.math.hasOwnProperty(Pe) || St.text.hasOwnProperty(Pe) || bl.hasOwnProperty(Pe);
          }
          /**
           * Determine whether a command is expandable.
           */
          isExpandable(Pe) {
            const it = this.macros.get(Pe);
            return it != null ? typeof it == "string" || typeof it == "function" || !it.unexpandable : ss.hasOwnProperty(Pe) && !ss[Pe].primitive;
          }
        }
        const ec = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/, rl = Object.freeze({
          "₊": "+",
          "₋": "-",
          "₌": "=",
          "₍": "(",
          "₎": ")",
          "₀": "0",
          "₁": "1",
          "₂": "2",
          "₃": "3",
          "₄": "4",
          "₅": "5",
          "₆": "6",
          "₇": "7",
          "₈": "8",
          "₉": "9",
          "ₐ": "a",
          "ₑ": "e",
          "ₕ": "h",
          "ᵢ": "i",
          "ⱼ": "j",
          "ₖ": "k",
          "ₗ": "l",
          "ₘ": "m",
          "ₙ": "n",
          "ₒ": "o",
          "ₚ": "p",
          "ᵣ": "r",
          "ₛ": "s",
          "ₜ": "t",
          "ᵤ": "u",
          "ᵥ": "v",
          "ₓ": "x",
          "ᵦ": "β",
          "ᵧ": "γ",
          "ᵨ": "ρ",
          "ᵩ": "ϕ",
          "ᵪ": "χ",
          "⁺": "+",
          "⁻": "-",
          "⁼": "=",
          "⁽": "(",
          "⁾": ")",
          "⁰": "0",
          "¹": "1",
          "²": "2",
          "³": "3",
          "⁴": "4",
          "⁵": "5",
          "⁶": "6",
          "⁷": "7",
          "⁸": "8",
          "⁹": "9",
          "ᴬ": "A",
          "ᴮ": "B",
          "ᴰ": "D",
          "ᴱ": "E",
          "ᴳ": "G",
          "ᴴ": "H",
          "ᴵ": "I",
          "ᴶ": "J",
          "ᴷ": "K",
          "ᴸ": "L",
          "ᴹ": "M",
          "ᴺ": "N",
          "ᴼ": "O",
          "ᴾ": "P",
          "ᴿ": "R",
          "ᵀ": "T",
          "ᵁ": "U",
          "ⱽ": "V",
          "ᵂ": "W",
          "ᵃ": "a",
          "ᵇ": "b",
          "ᶜ": "c",
          "ᵈ": "d",
          "ᵉ": "e",
          "ᶠ": "f",
          "ᵍ": "g",
          ʰ: "h",
          "ⁱ": "i",
          ʲ: "j",
          "ᵏ": "k",
          ˡ: "l",
          "ᵐ": "m",
          ⁿ: "n",
          "ᵒ": "o",
          "ᵖ": "p",
          ʳ: "r",
          ˢ: "s",
          "ᵗ": "t",
          "ᵘ": "u",
          "ᵛ": "v",
          ʷ: "w",
          ˣ: "x",
          ʸ: "y",
          "ᶻ": "z",
          "ᵝ": "β",
          "ᵞ": "γ",
          "ᵟ": "δ",
          "ᵠ": "ϕ",
          "ᵡ": "χ",
          "ᶿ": "θ"
        }), Na = {
          "́": {
            text: "\\'",
            math: "\\acute"
          },
          "̀": {
            text: "\\`",
            math: "\\grave"
          },
          "̈": {
            text: '\\"',
            math: "\\ddot"
          },
          "̃": {
            text: "\\~",
            math: "\\tilde"
          },
          "̄": {
            text: "\\=",
            math: "\\bar"
          },
          "̆": {
            text: "\\u",
            math: "\\breve"
          },
          "̌": {
            text: "\\v",
            math: "\\check"
          },
          "̂": {
            text: "\\^",
            math: "\\hat"
          },
          "̇": {
            text: "\\.",
            math: "\\dot"
          },
          "̊": {
            text: "\\r",
            math: "\\mathring"
          },
          "̋": {
            text: "\\H"
          },
          "̧": {
            text: "\\c"
          }
        }, il = {
          á: "á",
          à: "à",
          ä: "ä",
          ǟ: "ǟ",
          ã: "ã",
          ā: "ā",
          ă: "ă",
          ắ: "ắ",
          ằ: "ằ",
          ẵ: "ẵ",
          ǎ: "ǎ",
          â: "â",
          ấ: "ấ",
          ầ: "ầ",
          ẫ: "ẫ",
          ȧ: "ȧ",
          ǡ: "ǡ",
          å: "å",
          ǻ: "ǻ",
          ḃ: "ḃ",
          ć: "ć",
          ḉ: "ḉ",
          č: "č",
          ĉ: "ĉ",
          ċ: "ċ",
          ç: "ç",
          ď: "ď",
          ḋ: "ḋ",
          ḑ: "ḑ",
          é: "é",
          è: "è",
          ë: "ë",
          ẽ: "ẽ",
          ē: "ē",
          ḗ: "ḗ",
          ḕ: "ḕ",
          ĕ: "ĕ",
          ḝ: "ḝ",
          ě: "ě",
          ê: "ê",
          ế: "ế",
          ề: "ề",
          ễ: "ễ",
          ė: "ė",
          ȩ: "ȩ",
          ḟ: "ḟ",
          ǵ: "ǵ",
          ḡ: "ḡ",
          ğ: "ğ",
          ǧ: "ǧ",
          ĝ: "ĝ",
          ġ: "ġ",
          ģ: "ģ",
          ḧ: "ḧ",
          ȟ: "ȟ",
          ĥ: "ĥ",
          ḣ: "ḣ",
          ḩ: "ḩ",
          í: "í",
          ì: "ì",
          ï: "ï",
          ḯ: "ḯ",
          ĩ: "ĩ",
          ī: "ī",
          ĭ: "ĭ",
          ǐ: "ǐ",
          î: "î",
          ǰ: "ǰ",
          ĵ: "ĵ",
          ḱ: "ḱ",
          ǩ: "ǩ",
          ķ: "ķ",
          ĺ: "ĺ",
          ľ: "ľ",
          ļ: "ļ",
          ḿ: "ḿ",
          ṁ: "ṁ",
          ń: "ń",
          ǹ: "ǹ",
          ñ: "ñ",
          ň: "ň",
          ṅ: "ṅ",
          ņ: "ņ",
          ó: "ó",
          ò: "ò",
          ö: "ö",
          ȫ: "ȫ",
          õ: "õ",
          ṍ: "ṍ",
          ṏ: "ṏ",
          ȭ: "ȭ",
          ō: "ō",
          ṓ: "ṓ",
          ṑ: "ṑ",
          ŏ: "ŏ",
          ǒ: "ǒ",
          ô: "ô",
          ố: "ố",
          ồ: "ồ",
          ỗ: "ỗ",
          ȯ: "ȯ",
          ȱ: "ȱ",
          ő: "ő",
          ṕ: "ṕ",
          ṗ: "ṗ",
          ŕ: "ŕ",
          ř: "ř",
          ṙ: "ṙ",
          ŗ: "ŗ",
          ś: "ś",
          ṥ: "ṥ",
          š: "š",
          ṧ: "ṧ",
          ŝ: "ŝ",
          ṡ: "ṡ",
          ş: "ş",
          ẗ: "ẗ",
          ť: "ť",
          ṫ: "ṫ",
          ţ: "ţ",
          ú: "ú",
          ù: "ù",
          ü: "ü",
          ǘ: "ǘ",
          ǜ: "ǜ",
          ǖ: "ǖ",
          ǚ: "ǚ",
          ũ: "ũ",
          ṹ: "ṹ",
          ū: "ū",
          ṻ: "ṻ",
          ŭ: "ŭ",
          ǔ: "ǔ",
          û: "û",
          ů: "ů",
          ű: "ű",
          ṽ: "ṽ",
          ẃ: "ẃ",
          ẁ: "ẁ",
          ẅ: "ẅ",
          ŵ: "ŵ",
          ẇ: "ẇ",
          ẘ: "ẘ",
          ẍ: "ẍ",
          ẋ: "ẋ",
          ý: "ý",
          ỳ: "ỳ",
          ÿ: "ÿ",
          ỹ: "ỹ",
          ȳ: "ȳ",
          ŷ: "ŷ",
          ẏ: "ẏ",
          ẙ: "ẙ",
          ź: "ź",
          ž: "ž",
          ẑ: "ẑ",
          ż: "ż",
          Á: "Á",
          À: "À",
          Ä: "Ä",
          Ǟ: "Ǟ",
          Ã: "Ã",
          Ā: "Ā",
          Ă: "Ă",
          Ắ: "Ắ",
          Ằ: "Ằ",
          Ẵ: "Ẵ",
          Ǎ: "Ǎ",
          Â: "Â",
          Ấ: "Ấ",
          Ầ: "Ầ",
          Ẫ: "Ẫ",
          Ȧ: "Ȧ",
          Ǡ: "Ǡ",
          Å: "Å",
          Ǻ: "Ǻ",
          Ḃ: "Ḃ",
          Ć: "Ć",
          Ḉ: "Ḉ",
          Č: "Č",
          Ĉ: "Ĉ",
          Ċ: "Ċ",
          Ç: "Ç",
          Ď: "Ď",
          Ḋ: "Ḋ",
          Ḑ: "Ḑ",
          É: "É",
          È: "È",
          Ë: "Ë",
          Ẽ: "Ẽ",
          Ē: "Ē",
          Ḗ: "Ḗ",
          Ḕ: "Ḕ",
          Ĕ: "Ĕ",
          Ḝ: "Ḝ",
          Ě: "Ě",
          Ê: "Ê",
          Ế: "Ế",
          Ề: "Ề",
          Ễ: "Ễ",
          Ė: "Ė",
          Ȩ: "Ȩ",
          Ḟ: "Ḟ",
          Ǵ: "Ǵ",
          Ḡ: "Ḡ",
          Ğ: "Ğ",
          Ǧ: "Ǧ",
          Ĝ: "Ĝ",
          Ġ: "Ġ",
          Ģ: "Ģ",
          Ḧ: "Ḧ",
          Ȟ: "Ȟ",
          Ĥ: "Ĥ",
          Ḣ: "Ḣ",
          Ḩ: "Ḩ",
          Í: "Í",
          Ì: "Ì",
          Ï: "Ï",
          Ḯ: "Ḯ",
          Ĩ: "Ĩ",
          Ī: "Ī",
          Ĭ: "Ĭ",
          Ǐ: "Ǐ",
          Î: "Î",
          İ: "İ",
          Ĵ: "Ĵ",
          Ḱ: "Ḱ",
          Ǩ: "Ǩ",
          Ķ: "Ķ",
          Ĺ: "Ĺ",
          Ľ: "Ľ",
          Ļ: "Ļ",
          Ḿ: "Ḿ",
          Ṁ: "Ṁ",
          Ń: "Ń",
          Ǹ: "Ǹ",
          Ñ: "Ñ",
          Ň: "Ň",
          Ṅ: "Ṅ",
          Ņ: "Ņ",
          Ó: "Ó",
          Ò: "Ò",
          Ö: "Ö",
          Ȫ: "Ȫ",
          Õ: "Õ",
          Ṍ: "Ṍ",
          Ṏ: "Ṏ",
          Ȭ: "Ȭ",
          Ō: "Ō",
          Ṓ: "Ṓ",
          Ṑ: "Ṑ",
          Ŏ: "Ŏ",
          Ǒ: "Ǒ",
          Ô: "Ô",
          Ố: "Ố",
          Ồ: "Ồ",
          Ỗ: "Ỗ",
          Ȯ: "Ȯ",
          Ȱ: "Ȱ",
          Ő: "Ő",
          Ṕ: "Ṕ",
          Ṗ: "Ṗ",
          Ŕ: "Ŕ",
          Ř: "Ř",
          Ṙ: "Ṙ",
          Ŗ: "Ŗ",
          Ś: "Ś",
          Ṥ: "Ṥ",
          Š: "Š",
          Ṧ: "Ṧ",
          Ŝ: "Ŝ",
          Ṡ: "Ṡ",
          Ş: "Ş",
          Ť: "Ť",
          Ṫ: "Ṫ",
          Ţ: "Ţ",
          Ú: "Ú",
          Ù: "Ù",
          Ü: "Ü",
          Ǘ: "Ǘ",
          Ǜ: "Ǜ",
          Ǖ: "Ǖ",
          Ǚ: "Ǚ",
          Ũ: "Ũ",
          Ṹ: "Ṹ",
          Ū: "Ū",
          Ṻ: "Ṻ",
          Ŭ: "Ŭ",
          Ǔ: "Ǔ",
          Û: "Û",
          Ů: "Ů",
          Ű: "Ű",
          Ṽ: "Ṽ",
          Ẃ: "Ẃ",
          Ẁ: "Ẁ",
          Ẅ: "Ẅ",
          Ŵ: "Ŵ",
          Ẇ: "Ẇ",
          Ẍ: "Ẍ",
          Ẋ: "Ẋ",
          Ý: "Ý",
          Ỳ: "Ỳ",
          Ÿ: "Ÿ",
          Ỹ: "Ỹ",
          Ȳ: "Ȳ",
          Ŷ: "Ŷ",
          Ẏ: "Ẏ",
          Ź: "Ź",
          Ž: "Ž",
          Ẑ: "Ẑ",
          Ż: "Ż",
          ά: "ά",
          ὰ: "ὰ",
          ᾱ: "ᾱ",
          ᾰ: "ᾰ",
          έ: "έ",
          ὲ: "ὲ",
          ή: "ή",
          ὴ: "ὴ",
          ί: "ί",
          ὶ: "ὶ",
          ϊ: "ϊ",
          ΐ: "ΐ",
          ῒ: "ῒ",
          ῑ: "ῑ",
          ῐ: "ῐ",
          ό: "ό",
          ὸ: "ὸ",
          ύ: "ύ",
          ὺ: "ὺ",
          ϋ: "ϋ",
          ΰ: "ΰ",
          ῢ: "ῢ",
          ῡ: "ῡ",
          ῠ: "ῠ",
          ώ: "ώ",
          ὼ: "ὼ",
          Ύ: "Ύ",
          Ὺ: "Ὺ",
          Ϋ: "Ϋ",
          Ῡ: "Ῡ",
          Ῠ: "Ῠ",
          Ώ: "Ώ",
          Ὼ: "Ὼ"
        };
        class ni {
          constructor(Pe, it) {
            this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new Lc(Pe, it, this.mode), this.settings = it, this.leftrightDepth = 0;
          }
          /**
           * Checks a result to make sure it has the right type, and throws an
           * appropriate error otherwise.
           */
          expect(Pe, it) {
            if (it === void 0 && (it = !0), this.fetch().text !== Pe)
              throw new o("Expected '" + Pe + "', got '" + this.fetch().text + "'", this.fetch());
            it && this.consume();
          }
          /**
           * Discards the current lookahead token, considering it consumed.
           */
          consume() {
            this.nextToken = null;
          }
          /**
           * Return the current lookahead token, or if there isn't one (at the
           * beginning, or if the previous lookahead token was consume()d),
           * fetch the next token as the new lookahead token and return it.
           */
          fetch() {
            return this.nextToken == null && (this.nextToken = this.gullet.expandNextToken()), this.nextToken;
          }
          /**
           * Switches between "text" and "math" modes.
           */
          switchMode(Pe) {
            this.mode = Pe, this.gullet.switchMode(Pe);
          }
          /**
           * Main parsing function, which parses an entire input.
           */
          parse() {
            this.settings.globalGroup || this.gullet.beginGroup(), this.settings.colorIsTextColor && this.gullet.macros.set("\\color", "\\textcolor");
            try {
              const Pe = this.parseExpression(!1);
              return this.expect("EOF"), this.settings.globalGroup || this.gullet.endGroup(), Pe;
            } finally {
              this.gullet.endGroups();
            }
          }
          /**
           * Fully parse a separate sequence of tokens as a separate job.
           * Tokens should be specified in reverse order, as in a MacroDefinition.
           */
          subparse(Pe) {
            const it = this.nextToken;
            this.consume(), this.gullet.pushToken(new Io("}")), this.gullet.pushTokens(Pe);
            const bt = this.parseExpression(!1);
            return this.expect("}"), this.nextToken = it, bt;
          }
          /**
           * Parses an "expression", which is a list of atoms.
           *
           * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
           *                 happens when functions have higher precedence han infix
           *                 nodes in implicit parses.
           *
           * `breakOnTokenText`: The text of the token that the expression should end
           *                     with, or `null` if something else should end the
           *                     expression.
           */
          parseExpression(Pe, it) {
            const bt = [];
            for (; ; ) {
              this.mode === "math" && this.consumeSpaces();
              const Ue = this.fetch();
              if (ni.endOfExpression.indexOf(Ue.text) !== -1 || it && Ue.text === it || Pe && ss[Ue.text] && ss[Ue.text].infix)
                break;
              const Qe = this.parseAtom(it);
              if (Qe) {
                if (Qe.type === "internal")
                  continue;
              } else break;
              bt.push(Qe);
            }
            return this.mode === "text" && this.formLigatures(bt), this.handleInfixNodes(bt);
          }
          /**
           * Rewrites infix operators such as \over with corresponding commands such
           * as \frac.
           *
           * There can only be one infix operator per group.  If there's more than one
           * then the expression is ambiguous.  This can be resolved by adding {}.
           */
          handleInfixNodes(Pe) {
            let it = -1, bt;
            for (let Ue = 0; Ue < Pe.length; Ue++)
              if (Pe[Ue].type === "infix") {
                if (it !== -1)
                  throw new o("only one infix operator per group", Pe[Ue].token);
                it = Ue, bt = Pe[Ue].replaceWith;
              }
            if (it !== -1 && bt) {
              let Ue, Qe;
              const ht = Pe.slice(0, it), Z = Pe.slice(it + 1);
              ht.length === 1 && ht[0].type === "ordgroup" ? Ue = ht[0] : Ue = {
                type: "ordgroup",
                mode: this.mode,
                body: ht
              }, Z.length === 1 && Z[0].type === "ordgroup" ? Qe = Z[0] : Qe = {
                type: "ordgroup",
                mode: this.mode,
                body: Z
              };
              let B;
              return bt === "\\\\abovefrac" ? B = this.callFunction(bt, [Ue, Pe[it], Qe], []) : B = this.callFunction(bt, [Ue, Qe], []), [B];
            } else
              return Pe;
          }
          /**
           * Handle a subscript or superscript with nice errors.
           */
          handleSupSubscript(Pe) {
            const it = this.fetch(), bt = it.text;
            this.consume(), this.consumeSpaces();
            const Ue = this.parseGroup(Pe);
            if (!Ue)
              throw new o("Expected group after '" + bt + "'", it);
            return Ue;
          }
          /**
           * Converts the textual input of an unsupported command into a text node
           * contained within a color node whose color is determined by errorColor
           */
          formatUnsupportedCmd(Pe) {
            const it = [];
            for (let Qe = 0; Qe < Pe.length; Qe++)
              it.push({
                type: "textord",
                mode: "text",
                text: Pe[Qe]
              });
            const bt = {
              type: "text",
              mode: this.mode,
              body: it
            };
            return {
              type: "color",
              mode: this.mode,
              color: this.settings.errorColor,
              body: [bt]
            };
          }
          /**
           * Parses a group with optional super/subscripts.
           */
          parseAtom(Pe) {
            const it = this.parseGroup("atom", Pe);
            if (this.mode === "text")
              return it;
            let bt, Ue;
            for (; ; ) {
              this.consumeSpaces();
              const Qe = this.fetch();
              if (Qe.text === "\\limits" || Qe.text === "\\nolimits") {
                if (it && it.type === "op") {
                  const ht = Qe.text === "\\limits";
                  it.limits = ht, it.alwaysHandleSupSub = !0;
                } else if (it && it.type === "operatorname")
                  it.alwaysHandleSupSub && (it.limits = Qe.text === "\\limits");
                else
                  throw new o("Limit controls must follow a math operator", Qe);
                this.consume();
              } else if (Qe.text === "^") {
                if (bt)
                  throw new o("Double superscript", Qe);
                bt = this.handleSupSubscript("superscript");
              } else if (Qe.text === "_") {
                if (Ue)
                  throw new o("Double subscript", Qe);
                Ue = this.handleSupSubscript("subscript");
              } else if (Qe.text === "'") {
                if (bt)
                  throw new o("Double superscript", Qe);
                const ht = {
                  type: "textord",
                  mode: this.mode,
                  text: "\\prime"
                }, Z = [ht];
                for (this.consume(); this.fetch().text === "'"; )
                  Z.push(ht), this.consume();
                this.fetch().text === "^" && Z.push(this.handleSupSubscript("superscript")), bt = {
                  type: "ordgroup",
                  mode: this.mode,
                  body: Z
                };
              } else if (rl[Qe.text]) {
                const ht = ec.test(Qe.text), Z = [];
                for (Z.push(new Io(rl[Qe.text])), this.consume(); ; ) {
                  const y = this.fetch().text;
                  if (!rl[y] || ec.test(y) !== ht)
                    break;
                  Z.unshift(new Io(rl[y])), this.consume();
                }
                const B = this.subparse(Z);
                ht ? Ue = {
                  type: "ordgroup",
                  mode: "math",
                  body: B
                } : bt = {
                  type: "ordgroup",
                  mode: "math",
                  body: B
                };
              } else
                break;
            }
            return bt || Ue ? {
              type: "supsub",
              mode: this.mode,
              base: it,
              sup: bt,
              sub: Ue
            } : it;
          }
          /**
           * Parses an entire function, including its base and all of its arguments.
           */
          parseFunction(Pe, it) {
            const bt = this.fetch(), Ue = bt.text, Qe = ss[Ue];
            if (!Qe)
              return null;
            if (this.consume(), it && it !== "atom" && !Qe.allowedInArgument)
              throw new o("Got function '" + Ue + "' with no arguments" + (it ? " as " + it : ""), bt);
            if (this.mode === "text" && !Qe.allowedInText)
              throw new o("Can't use function '" + Ue + "' in text mode", bt);
            if (this.mode === "math" && Qe.allowedInMath === !1)
              throw new o("Can't use function '" + Ue + "' in math mode", bt);
            const {
              args: ht,
              optArgs: Z
            } = this.parseArguments(Ue, Qe);
            return this.callFunction(Ue, ht, Z, bt, Pe);
          }
          /**
           * Call a function handler with a suitable context and arguments.
           */
          callFunction(Pe, it, bt, Ue, Qe) {
            const ht = {
              funcName: Pe,
              parser: this,
              token: Ue,
              breakOnTokenText: Qe
            }, Z = ss[Pe];
            if (Z && Z.handler)
              return Z.handler(ht, it, bt);
            throw new o("No function handler for " + Pe);
          }
          /**
           * Parses the arguments of a function or environment
           */
          parseArguments(Pe, it) {
            const bt = it.numArgs + it.numOptionalArgs;
            if (bt === 0)
              return {
                args: [],
                optArgs: []
              };
            const Ue = [], Qe = [];
            for (let ht = 0; ht < bt; ht++) {
              let Z = it.argTypes && it.argTypes[ht];
              const B = ht < it.numOptionalArgs;
              (it.primitive && Z == null || // \sqrt expands into primitive if optional argument doesn't exist
              it.type === "sqrt" && ht === 1 && Qe[0] == null) && (Z = "primitive");
              const y = this.parseGroupOfType("argument to '" + Pe + "'", Z, B);
              if (B)
                Qe.push(y);
              else if (y != null)
                Ue.push(y);
              else
                throw new o("Null argument, please report this as a bug");
            }
            return {
              args: Ue,
              optArgs: Qe
            };
          }
          /**
           * Parses a group when the mode is changing.
           */
          parseGroupOfType(Pe, it, bt) {
            switch (it) {
              case "color":
                return this.parseColorGroup(bt);
              case "size":
                return this.parseSizeGroup(bt);
              case "url":
                return this.parseUrlGroup(bt);
              case "math":
              case "text":
                return this.parseArgumentGroup(bt, it);
              case "hbox": {
                const Ue = this.parseArgumentGroup(bt, "text");
                return Ue != null ? {
                  type: "styling",
                  mode: Ue.mode,
                  body: [Ue],
                  style: "text"
                  // simulate \textstyle
                } : null;
              }
              case "raw": {
                const Ue = this.parseStringGroup("raw", bt);
                return Ue != null ? {
                  type: "raw",
                  mode: "text",
                  string: Ue.text
                } : null;
              }
              case "primitive": {
                if (bt)
                  throw new o("A primitive argument cannot be optional");
                const Ue = this.parseGroup(Pe);
                if (Ue == null)
                  throw new o("Expected group as " + Pe, this.fetch());
                return Ue;
              }
              case "original":
              case null:
              case void 0:
                return this.parseArgumentGroup(bt);
              default:
                throw new o("Unknown group type as " + Pe, this.fetch());
            }
          }
          /**
           * Discard any space tokens, fetching the next non-space token.
           */
          consumeSpaces() {
            for (; this.fetch().text === " "; )
              this.consume();
          }
          /**
           * Parses a group, essentially returning the string formed by the
           * brace-enclosed tokens plus some position information.
           */
          parseStringGroup(Pe, it) {
            const bt = this.gullet.scanArgument(it);
            if (bt == null)
              return null;
            let Ue = "", Qe;
            for (; (Qe = this.fetch()).text !== "EOF"; )
              Ue += Qe.text, this.consume();
            return this.consume(), bt.text = Ue, bt;
          }
          /**
           * Parses a regex-delimited group: the largest sequence of tokens
           * whose concatenated strings match `regex`. Returns the string
           * formed by the tokens plus some position information.
           */
          parseRegexGroup(Pe, it) {
            const bt = this.fetch();
            let Ue = bt, Qe = "", ht;
            for (; (ht = this.fetch()).text !== "EOF" && Pe.test(Qe + ht.text); )
              Ue = ht, Qe += Ue.text, this.consume();
            if (Qe === "")
              throw new o("Invalid " + it + ": '" + bt.text + "'", bt);
            return bt.range(Ue, Qe);
          }
          /**
           * Parses a color description.
           */
          parseColorGroup(Pe) {
            const it = this.parseStringGroup("color", Pe);
            if (it == null)
              return null;
            const bt = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(it.text);
            if (!bt)
              throw new o("Invalid color: '" + it.text + "'", it);
            let Ue = bt[0];
            return /^[0-9a-f]{6}$/i.test(Ue) && (Ue = "#" + Ue), {
              type: "color-token",
              mode: this.mode,
              color: Ue
            };
          }
          /**
           * Parses a size specification, consisting of magnitude and unit.
           */
          parseSizeGroup(Pe) {
            let it, bt = !1;
            if (this.gullet.consumeSpaces(), !Pe && this.gullet.future().text !== "{" ? it = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, "size") : it = this.parseStringGroup("size", Pe), !it)
              return null;
            !Pe && it.text.length === 0 && (it.text = "0pt", bt = !0);
            const Ue = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(it.text);
            if (!Ue)
              throw new o("Invalid size: '" + it.text + "'", it);
            const Qe = {
              number: +(Ue[1] + Ue[2]),
              // sign + magnitude, cast to number
              unit: Ue[3]
            };
            if (!Ge(Qe))
              throw new o("Invalid unit: '" + Qe.unit + "'", it);
            return {
              type: "size",
              mode: this.mode,
              value: Qe,
              isBlank: bt
            };
          }
          /**
           * Parses an URL, checking escaped letters and allowed protocols,
           * and setting the catcode of % as an active character (as in \hyperref).
           */
          parseUrlGroup(Pe) {
            this.gullet.lexer.setCatcode("%", 13), this.gullet.lexer.setCatcode("~", 12);
            const it = this.parseStringGroup("url", Pe);
            if (this.gullet.lexer.setCatcode("%", 14), this.gullet.lexer.setCatcode("~", 13), it == null)
              return null;
            const bt = it.text.replace(/\\([#$%&~_^{}])/g, "$1");
            return {
              type: "url",
              mode: this.mode,
              url: bt
            };
          }
          /**
           * Parses an argument with the mode specified.
           */
          parseArgumentGroup(Pe, it) {
            const bt = this.gullet.scanArgument(Pe);
            if (bt == null)
              return null;
            const Ue = this.mode;
            it && this.switchMode(it), this.gullet.beginGroup();
            const Qe = this.parseExpression(!1, "EOF");
            this.expect("EOF"), this.gullet.endGroup();
            const ht = {
              type: "ordgroup",
              mode: this.mode,
              loc: bt.loc,
              body: Qe
            };
            return it && this.switchMode(Ue), ht;
          }
          /**
           * Parses an ordinary group, which is either a single nucleus (like "x")
           * or an expression in braces (like "{x+y}") or an implicit group, a group
           * that starts at the current position, and ends right before a higher explicit
           * group ends, or at EOF.
           */
          parseGroup(Pe, it) {
            const bt = this.fetch(), Ue = bt.text;
            let Qe;
            if (Ue === "{" || Ue === "\\begingroup") {
              this.consume();
              const ht = Ue === "{" ? "}" : "\\endgroup";
              this.gullet.beginGroup();
              const Z = this.parseExpression(!1, ht), B = this.fetch();
              this.expect(ht), this.gullet.endGroup(), Qe = {
                type: "ordgroup",
                mode: this.mode,
                loc: to.range(bt, B),
                body: Z,
                // A group formed by \begingroup...\endgroup is a semi-simple group
                // which doesn't affect spacing in math mode, i.e., is transparent.
                // https://tex.stackexchange.com/questions/1930/when-should-one-
                // use-begingroup-instead-of-bgroup
                semisimple: Ue === "\\begingroup" || void 0
              };
            } else if (Qe = this.parseFunction(it, Pe) || this.parseSymbol(), Qe == null && Ue[0] === "\\" && !bl.hasOwnProperty(Ue)) {
              if (this.settings.throwOnError)
                throw new o("Undefined control sequence: " + Ue, bt);
              Qe = this.formatUnsupportedCmd(Ue), this.consume();
            }
            return Qe;
          }
          /**
           * Form ligature-like combinations of characters for text mode.
           * This includes inputs like "--", "---", "``" and "''".
           * The result will simply replace multiple textord nodes with a single
           * character in each value by a single textord node having multiple
           * characters in its value.  The representation is still ASCII source.
           * The group will be modified in place.
           */
          formLigatures(Pe) {
            let it = Pe.length - 1;
            for (let bt = 0; bt < it; ++bt) {
              const Ue = Pe[bt], Qe = Ue.text;
              Qe === "-" && Pe[bt + 1].text === "-" && (bt + 1 < it && Pe[bt + 2].text === "-" ? (Pe.splice(bt, 3, {
                type: "textord",
                mode: "text",
                loc: to.range(Ue, Pe[bt + 2]),
                text: "---"
              }), it -= 2) : (Pe.splice(bt, 2, {
                type: "textord",
                mode: "text",
                loc: to.range(Ue, Pe[bt + 1]),
                text: "--"
              }), it -= 1)), (Qe === "'" || Qe === "`") && Pe[bt + 1].text === Qe && (Pe.splice(bt, 2, {
                type: "textord",
                mode: "text",
                loc: to.range(Ue, Pe[bt + 1]),
                text: Qe + Qe
              }), it -= 1);
            }
          }
          /**
           * Parse a single symbol out of the string. Here, we handle single character
           * symbols and special functions like \verb.
           */
          parseSymbol() {
            const Pe = this.fetch();
            let it = Pe.text;
            if (/^\\verb[^a-zA-Z]/.test(it)) {
              this.consume();
              let Qe = it.slice(5);
              const ht = Qe.charAt(0) === "*";
              if (ht && (Qe = Qe.slice(1)), Qe.length < 2 || Qe.charAt(0) !== Qe.slice(-1))
                throw new o(`\\verb assertion failed --
                    please report what input caused this bug`);
              return Qe = Qe.slice(1, -1), {
                type: "verb",
                mode: "text",
                body: Qe,
                star: ht
              };
            }
            il.hasOwnProperty(it[0]) && !St[this.mode][it[0]] && (this.settings.strict && this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Accented Unicode text character "' + it[0] + '" used in math mode', Pe), it = il[it[0]] + it.slice(1));
            const bt = di.exec(it);
            bt && (it = it.substring(0, bt.index), it === "i" ? it = "ı" : it === "j" && (it = "ȷ"));
            let Ue;
            if (St[this.mode][it]) {
              this.settings.strict && this.mode === "math" && sn.indexOf(it) >= 0 && this.settings.reportNonstrict("unicodeTextInMathMode", 'Latin-1/Unicode text character "' + it[0] + '" used in math mode', Pe);
              const Qe = St[this.mode][it].group, ht = to.range(Pe);
              let Z;
              if (mt.hasOwnProperty(Qe)) {
                const B = Qe;
                Z = {
                  type: "atom",
                  mode: this.mode,
                  family: B,
                  loc: ht,
                  text: it
                };
              } else
                Z = {
                  type: Qe,
                  mode: this.mode,
                  loc: ht,
                  text: it
                };
              Ue = Z;
            } else if (it.charCodeAt(0) >= 128)
              this.settings.strict && (Y(it.charCodeAt(0)) ? this.mode === "math" && this.settings.reportNonstrict("unicodeTextInMathMode", 'Unicode text character "' + it[0] + '" used in math mode', Pe) : this.settings.reportNonstrict("unknownSymbol", 'Unrecognized Unicode character "' + it[0] + '"' + (" (" + it.charCodeAt(0) + ")"), Pe)), Ue = {
                type: "textord",
                mode: "text",
                loc: to.range(Pe),
                text: it
              };
            else
              return null;
            if (this.consume(), bt)
              for (let Qe = 0; Qe < bt[0].length; Qe++) {
                const ht = bt[0][Qe];
                if (!Na[ht])
                  throw new o("Unknown accent ' " + ht + "'", Pe);
                const Z = Na[ht][this.mode] || Na[ht].text;
                if (!Z)
                  throw new o("Accent " + ht + " unsupported in " + this.mode + " mode", Pe);
                Ue = {
                  type: "accent",
                  mode: this.mode,
                  loc: to.range(Pe),
                  label: Z,
                  isStretchy: !1,
                  isShifty: !0,
                  // $FlowFixMe
                  base: Ue
                };
              }
            return Ue;
          }
        }
        ni.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
        var us = function(He, Pe) {
          if (!(typeof He == "string" || He instanceof String))
            throw new TypeError("KaTeX can only parse string typed expression");
          const it = new ni(He, Pe);
          delete it.gullet.macros.current["\\df@tag"];
          let bt = it.parse();
          if (delete it.gullet.macros.current["\\current@color"], delete it.gullet.macros.current["\\color"], it.gullet.macros.get("\\df@tag")) {
            if (!Pe.displayMode)
              throw new o("\\tag works only in display equations");
            bt = [{
              type: "tag",
              mode: "text",
              body: bt,
              tag: it.subparse([new Io("\\df@tag")])
            }];
          }
          return bt;
        };
        let al = function(He, Pe, it) {
          Pe.textContent = "";
          const bt = na(He, it).toNode();
          Pe.appendChild(bt);
        };
        typeof document < "u" && document.compatMode !== "CSS1Compat" && (typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."), al = function() {
          throw new o("KaTeX doesn't work in quirks mode.");
        });
        const ou = function(He, Pe) {
          return na(He, Pe).toMarkup();
        }, Za = function(He, Pe) {
          const it = new w(Pe);
          return us(He, it);
        }, su = function(He, Pe, it) {
          if (it.throwOnError || !(He instanceof o))
            throw He;
          const bt = rn.makeSpan(["katex-error"], [new _t(Pe)]);
          return bt.setAttribute("title", He.toString()), bt.setAttribute("style", "color:" + it.errorColor), bt;
        }, na = function(He, Pe) {
          const it = new w(Pe);
          try {
            const bt = us(He, it);
            return Ba(bt, He, it);
          } catch (bt) {
            return su(bt, He, it);
          }
        };
        var bi = {
          /**
           * Current KaTeX version
           */
          version: "0.16.11",
          /**
           * Renders the given LaTeX into an HTML+MathML combination, and adds
           * it as a child to the specified DOM node.
           */
          render: al,
          /**
           * Renders the given LaTeX into an HTML+MathML combination string,
           * for sending to the client.
           */
          renderToString: ou,
          /**
           * KaTeX error, usually during parsing.
           */
          ParseError: o,
          /**
           * The shema of Settings
           */
          SETTINGS_SCHEMA: m,
          /**
           * Parses the given LaTeX into KaTeX's internal parse tree structure,
           * without rendering to HTML or MathML.
           *
           * NOTE: This method is not currently recommended for public use.
           * The internal tree representation is unstable and is very likely
           * to change. Use at your own risk.
           */
          __parse: Za,
          /**
           * Renders the given LaTeX into an HTML+MathML internal DOM tree
           * representation, without flattening that representation to a string.
           *
           * NOTE: This method is not currently recommended for public use.
           * The internal tree representation is unstable and is very likely
           * to change. Use at your own risk.
           */
          __renderToDomTree: na,
          /**
           * Renders the given LaTeX into an HTML internal DOM tree representation,
           * without MathML and without flattening that representation to a string.
           *
           * NOTE: This method is not currently recommended for public use.
           * The internal tree representation is unstable and is very likely
           * to change. Use at your own risk.
           */
          __renderToHTMLTree: function(He, Pe) {
            const it = new w(Pe);
            try {
              const bt = us(He, it);
              return eo(bt, He, it);
            } catch (bt) {
              return su(bt, He, it);
            }
          },
          /**
           * extends internal font metrics object with a new object
           * each key in the new object represents a font name
          */
          __setFontMetrics: Se,
          /**
           * adds a new symbol to builtin symbols table
           */
          __defineSymbol: Je,
          /**
           * adds a new function to builtin function list,
           * which directly produce parse tree elements
           * and have their own html/mathml builders
           */
          __defineFunction: un,
          /**
           * adds a new macro to builtin macro list
           */
          __defineMacro: An,
          /**
           * Expose the dom tree node types, which can be useful for type checking nodes.
           *
           * NOTE: This method is not currently recommended for public use.
           * The internal tree representation is unstable and is very likely
           * to change. Use at your own risk.
           */
          __domTree: {
            Span: $e,
            Anchor: Ze,
            SymbolNode: _t,
            SvgNode: Pt,
            PathNode: Dt,
            LineNode: $t
          }
        }, ci = bi;
        return a = a.default, a;
      }()
    );
  });
})(OG);
var ffe = OG.exports, hfe = bE && bE.__importDefault || function(e) {
  return e && e.__esModule ? e : { default: e };
};
Object.defineProperty(PG, "__esModule", { value: !0 });
const xN = hfe(ffe);
function bN(e, t) {
  const r = e.src[t - 1], a = e.src[t], v = e.src[t + 1];
  if (a !== "$")
    return { can_open: !1, can_close: !1 };
  let o = !1, s = !1;
  return r !== "$" && r !== "\\" && (r === void 0 || _N(r) || !wN(r)) && (o = !0), v !== "$" && (v == null || _N(v) || !wN(v)) && (s = !0), { can_open: o, can_close: s };
}
function _N(e) {
  return /^\s$/u.test(e);
}
function wN(e) {
  return /^[\w\d]$/u.test(e);
}
function kN(e, t) {
  const r = e.src[t - 1], a = e.src[t], v = e.src[t + 1], o = e.src[t + 2];
  return a === "$" && r !== "$" && r !== "\\" && v === "$" && o !== "$" ? { can_open: !0, can_close: !0 } : { can_open: !1, can_close: !1 };
}
function dfe(e, t) {
  if (e.src[e.pos] !== "$")
    return !1;
  const r = e.tokens.at(-1);
  if ((r == null ? void 0 : r.type) === "html_inline" && /^<\w+.+[^/]>$/.test(r.content))
    return !1;
  let a = bN(e, e.pos);
  if (!a.can_open)
    return t || (e.pending += "$"), e.pos += 1, !0;
  let v = e.pos + 1, o = v, s;
  for (; (o = e.src.indexOf("$", o)) !== -1; ) {
    for (s = o - 1; e.src[s] === "\\"; )
      s -= 1;
    if ((o - s) % 2 == 1)
      break;
    o += 1;
  }
  if (o === -1)
    return t || (e.pending += "$"), e.pos = v, !0;
  if (o - v === 0)
    return t || (e.pending += "$$"), e.pos = v + 1, !0;
  if (a = bN(e, o), !a.can_close)
    return t || (e.pending += "$"), e.pos = v, !0;
  if (!t) {
    const n = e.push("math_inline", "math", 0);
    n.markup = "$", n.content = e.src.slice(v, o);
  }
  return e.pos = o + 1, !0;
}
function pfe(e, t, r, a) {
  var v, o, s, n = !1, l, u = e.bMarks[t] + e.tShift[t], i = e.eMarks[t];
  if (u + 2 > i || e.src.slice(u, u + 2) !== "$$")
    return !1;
  u += 2;
  let h = e.src.slice(u, i);
  if (a)
    return !0;
  for (h.trim().slice(-2) === "$$" && (h = h.trim().slice(0, -2), n = !0), o = t; !n && (o++, !(o >= r || (u = e.bMarks[o] + e.tShift[o], i = e.eMarks[o], u < i && e.tShift[o] < e.blkIndent))); )
    e.src.slice(u, i).trim().slice(-2) === "$$" ? (s = e.src.slice(0, i).lastIndexOf("$$"), v = e.src.slice(u, s), n = !0) : e.src.slice(u, i).trim().includes("$$") && (s = e.src.slice(0, i).trim().indexOf("$$"), v = e.src.slice(u, s), n = !0);
  return e.line = o + 1, l = e.push("math_block", "math", 0), l.block = !0, l.content = (h && h.trim() ? h + `
` : "") + e.getLines(t + 1, o, e.tShift[t], !0) + (v && v.trim() ? v : ""), l.map = [t, e.line], l.markup = "$$", !0;
}
function mfe(e, t, r, a) {
  const v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t];
  if (!e.src.slice(v, o).match(/^\s*\\begin\s*\{([^{}]+)\}/))
    return !1;
  if (t > 0) {
    const _ = e.bMarks[t - 1] + e.tShift[t - 1], d = e.eMarks[t - 1], f = e.src.slice(_, d);
    if (!/^\s*$/.test(f))
      return !1;
  }
  if (a)
    return !0;
  const l = [];
  let u = t, i, h = !1;
  e: for (; !h && !(u >= r); u++) {
    const _ = e.bMarks[u] + e.tShift[u], d = e.eMarks[u];
    if (_ < d && e.tShift[u] < e.blkIndent)
      break;
    const f = e.src.slice(_, d);
    for (const c of f.matchAll(/(\\begin|\\end)\s*\{([^{}]+)\}/g))
      if (c[1] === "\\begin")
        l.push(c[2].trim());
      else if (c[1] === "\\end" && (l.pop(), !l.length)) {
        i = e.src.slice(_, d), h = !0;
        break e;
      }
  }
  e.line = u + 1;
  const p = e.push("math_block", "math", 0);
  return p.block = !0, p.content = (e.getLines(t, u, e.tShift[t], !0) + (i ?? "")).trim(), p.map = [t, e.line], p.markup = "$$", !0;
}
function gfe(e, t) {
  var r, a, v, o, s;
  if (e.src.slice(e.pos, e.pos + 2) !== "$$")
    return !1;
  if (o = kN(e, e.pos), !o.can_open)
    return t || (e.pending += "$$"), e.pos += 2, !0;
  for (r = e.pos + 2, a = r; (a = e.src.indexOf("$$", a)) !== -1; ) {
    for (s = a - 1; e.src[s] === "\\"; )
      s -= 1;
    if ((a - s) % 2 == 1)
      break;
    a += 2;
  }
  return a === -1 ? (t || (e.pending += "$$"), e.pos = r, !0) : a - r === 0 ? (t || (e.pending += "$$$$"), e.pos = r + 2, !0) : (o = kN(e, a), o.can_close ? (t || (v = e.push("math_block", "math", 0), v.block = !0, v.markup = "$$", v.content = e.src.slice(r, a)), e.pos = a + 2, !0) : (t || (e.pending += "$$"), e.pos = r, !0));
}
function yfe(e, t) {
  const r = e.src.slice(e.pos);
  if (!/^\n\\begin/.test(r))
    return !1;
  if (e.pos += 1, t)
    return !0;
  const a = r.split(/\n/g).slice(1);
  let v;
  const o = [];
  e: for (var s = 0; s < a.length; ++s) {
    const u = a[s];
    for (const i of u.matchAll(/(\\begin|\\end)\s*\{([^{}]+)\}/g))
      if (i[1] === "\\begin")
        o.push(i[2].trim());
      else if (i[1] === "\\end" && (o.pop(), !o.length)) {
        v = s;
        break e;
      }
  }
  if (typeof v > "u")
    return !1;
  const n = a.slice(0, v + 1).reduce((u, i) => u + i.length, 0) + v + 1, l = e.push("math_inline_bare_block", "math", 0);
  return l.block = !0, l.markup = "$$", l.content = r.slice(1, n), e.pos = e.pos + n, !0;
}
function TN(e, t, r, a) {
  const v = e.tokens;
  for (let o = v.length - 1; o >= 0; o--) {
    const s = v[o], n = [];
    if (s.type !== "html_block")
      continue;
    const l = s.content;
    for (const u of l.matchAll(a)) {
      if (!u.groups)
        continue;
      const i = u.groups.html_before_math, h = u.groups.math, p = u.groups.html_after_math;
      i && n.push({ ...s, type: "html_block", map: null, content: i }), h && n.push({
        ...s,
        type: t,
        map: null,
        content: h,
        markup: r,
        block: !0,
        tag: "math"
      }), p && n.push({ ...s, type: "html_block", map: null, content: p });
    }
    n.length > 0 && v.splice(o, 1, ...n);
  }
  return !0;
}
function i6(e) {
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
}
function vfe(e, t) {
  const r = t == null ? void 0 : t.enableBareBlocks, a = t == null ? void 0 : t.enableMathBlockInHtml, v = t == null ? void 0 : t.enableMathInlineInHtml, o = t == null ? void 0 : t.enableFencedBlocks;
  e.inline.ruler.after("escape", "math_inline", dfe), e.inline.ruler.after("escape", "math_inline_block", gfe), r && e.inline.ruler.before("text", "math_inline_bare_block", yfe), e.block.ruler.after("blockquote", "math_block", (p, _, d, f) => r && mfe(p, _, d, f) ? !0 : pfe(p, _, d, f), {
    alt: ["paragraph", "reference", "blockquote", "list"]
  });
  const s = /(?<html_before_math>[\s\S]*?)\$\$(?<math>[\s\S]+?)\$\$(?<html_after_math>(?:(?!\$\$[\s\S]+?\$\$)[\s\S])*)/gm, n = /(?<html_before_math>[\s\S]*?)\$(?<math>.*?)\$(?<html_after_math>(?:(?!\$.*?\$)[\s\S])*)/gm;
  a && e.core.ruler.push("math_block_in_html_block", (p) => TN(p, "math_block", "$$", s)), v && e.core.ruler.push("math_inline_in_html_block", (p) => TN(p, "math_inline", "$", n));
  const l = (p) => {
    const _ = /\\begin\{(align|equation|gather|cd|alignat)\}/ig.test(p);
    try {
      return xN.default.renderToString(p, { ...t, displayMode: _ });
    } catch (d) {
      return t != null && t.throwOnError && console.log(d), `<span class="katex-error" title="${i6(p)}">${i6(d + "")}</span>`;
    }
  }, u = (p, _) => l(p[_].content), i = (p) => {
    try {
      return `<p class="katex-block">${xN.default.renderToString(p, { ...t, displayMode: !0 })}</p>`;
    } catch (_) {
      return t != null && t.throwOnError && console.log(_), `<p class="katex-block katex-error" title="${i6(p)}">${i6(_ + "")}</p>`;
    }
  }, h = (p, _) => i(p[_].content) + `
`;
  if (e.renderer.rules.math_inline = u, e.renderer.rules.math_inline_block = h, e.renderer.rules.math_inline_bare_block = h, e.renderer.rules.math_block = h, o) {
    const p = "math", _ = e.renderer.rules.fence;
    e.renderer.rules.fence = function(d, f, c, g, m) {
      const x = d[f];
      return x.info.trim().toLowerCase() === p && o ? i(x.content) + `
` : (_ == null ? void 0 : _.call(this, d, f, c, g, m)) || "";
    };
  }
}
var xfe = PG.default = vfe;
function zG(e) {
  return e instanceof Map ? e.clear = e.delete = e.set = function() {
    throw new Error("map is read-only");
  } : e instanceof Set && (e.add = e.clear = e.delete = function() {
    throw new Error("set is read-only");
  }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t) => {
    const r = e[t], a = typeof r;
    (a === "object" || a === "function") && !Object.isFrozen(r) && zG(r);
  }), e;
}
let AN = class {
  /**
   * @param {CompiledMode} mode
   */
  constructor(t) {
    t.data === void 0 && (t.data = {}), this.data = t.data, this.isMatchIgnored = !1;
  }
  ignoreMatch() {
    this.isMatchIgnored = !0;
  }
};
function RG(e) {
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
}
function X1(e, ...t) {
  const r = /* @__PURE__ */ Object.create(null);
  for (const a in e)
    r[a] = e[a];
  return t.forEach(function(a) {
    for (const v in a)
      r[v] = a[v];
  }), /** @type {T} */
  r;
}
const bfe = "</span>", SN = (e) => !!e.scope, _fe = (e, { prefix: t }) => {
  if (e.startsWith("language:"))
    return e.replace("language:", "language-");
  if (e.includes(".")) {
    const r = e.split(".");
    return [
      `${t}${r.shift()}`,
      ...r.map((a, v) => `${a}${"_".repeat(v + 1)}`)
    ].join(" ");
  }
  return `${t}${e}`;
};
class wfe {
  /**
   * Creates a new HTMLRenderer
   *
   * @param {Tree} parseTree - the parse tree (must support `walk` API)
   * @param {{classPrefix: string}} options
   */
  constructor(t, r) {
    this.buffer = "", this.classPrefix = r.classPrefix, t.walk(this);
  }
  /**
   * Adds texts to the output stream
   *
   * @param {string} text */
  addText(t) {
    this.buffer += RG(t);
  }
  /**
   * Adds a node open to the output stream (if needed)
   *
   * @param {Node} node */
  openNode(t) {
    if (!SN(t)) return;
    const r = _fe(
      t.scope,
      { prefix: this.classPrefix }
    );
    this.span(r);
  }
  /**
   * Adds a node close to the output stream (if needed)
   *
   * @param {Node} node */
  closeNode(t) {
    SN(t) && (this.buffer += bfe);
  }
  /**
   * returns the accumulated buffer
  */
  value() {
    return this.buffer;
  }
  // helpers
  /**
   * Builds a span element
   *
   * @param {string} className */
  span(t) {
    this.buffer += `<span class="${t}">`;
  }
}
const MN = (e = {}) => {
  const t = { children: [] };
  return Object.assign(t, e), t;
};
class fD {
  constructor() {
    this.rootNode = MN(), this.stack = [this.rootNode];
  }
  get top() {
    return this.stack[this.stack.length - 1];
  }
  get root() {
    return this.rootNode;
  }
  /** @param {Node} node */
  add(t) {
    this.top.children.push(t);
  }
  /** @param {string} scope */
  openNode(t) {
    const r = MN({ scope: t });
    this.add(r), this.stack.push(r);
  }
  closeNode() {
    if (this.stack.length > 1)
      return this.stack.pop();
  }
  closeAllNodes() {
    for (; this.closeNode(); ) ;
  }
  toJSON() {
    return JSON.stringify(this.rootNode, null, 4);
  }
  /**
   * @typedef { import("./html_renderer").Renderer } Renderer
   * @param {Renderer} builder
   */
  walk(t) {
    return this.constructor._walk(t, this.rootNode);
  }
  /**
   * @param {Renderer} builder
   * @param {Node} node
   */
  static _walk(t, r) {
    return typeof r == "string" ? t.addText(r) : r.children && (t.openNode(r), r.children.forEach((a) => this._walk(t, a)), t.closeNode(r)), t;
  }
  /**
   * @param {Node} node
   */
  static _collapse(t) {
    typeof t != "string" && t.children && (t.children.every((r) => typeof r == "string") ? t.children = [t.children.join("")] : t.children.forEach((r) => {
      fD._collapse(r);
    }));
  }
}
class kfe extends fD {
  /**
   * @param {*} options
   */
  constructor(t) {
    super(), this.options = t;
  }
  /**
   * @param {string} text
   */
  addText(t) {
    t !== "" && this.add(t);
  }
  /** @param {string} scope */
  startScope(t) {
    this.openNode(t);
  }
  endScope() {
    this.closeNode();
  }
  /**
   * @param {Emitter & {root: DataNode}} emitter
   * @param {string} name
   */
  __addSublanguage(t, r) {
    const a = t.root;
    r && (a.scope = `language:${r}`), this.add(a);
  }
  toHTML() {
    return new wfe(this, this.options).value();
  }
  finalize() {
    return this.closeAllNodes(), !0;
  }
}
function hw(e) {
  return e ? typeof e == "string" ? e : e.source : null;
}
function FG(e) {
  return jv("(?=", e, ")");
}
function Tfe(e) {
  return jv("(?:", e, ")*");
}
function Afe(e) {
  return jv("(?:", e, ")?");
}
function jv(...e) {
  return e.map((r) => hw(r)).join("");
}
function Sfe(e) {
  const t = e[e.length - 1];
  return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
}
function hD(...e) {
  return "(" + (Sfe(e).capture ? "" : "?:") + e.map((a) => hw(a)).join("|") + ")";
}
function NG(e) {
  return new RegExp(e.toString() + "|").exec("").length - 1;
}
function Mfe(e, t) {
  const r = e && e.exec(t);
  return r && r.index === 0;
}
const Efe = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
function dD(e, { joinWith: t }) {
  let r = 0;
  return e.map((a) => {
    r += 1;
    const v = r;
    let o = hw(a), s = "";
    for (; o.length > 0; ) {
      const n = Efe.exec(o);
      if (!n) {
        s += o;
        break;
      }
      s += o.substring(0, n.index), o = o.substring(n.index + n[0].length), n[0][0] === "\\" && n[1] ? s += "\\" + String(Number(n[1]) + v) : (s += n[0], n[0] === "(" && r++);
    }
    return s;
  }).map((a) => `(${a})`).join(t);
}
const Cfe = /\b\B/, BG = "[a-zA-Z]\\w*", pD = "[a-zA-Z_]\\w*", jG = "\\b\\d+(\\.\\d+)?", UG = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", VG = "\\b(0b[01]+)", Ife = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", Dfe = (e = {}) => {
  const t = /^#![ ]*\//;
  return e.binary && (e.begin = jv(
    t,
    /.*\b/,
    e.binary,
    /\b.*/
  )), X1({
    scope: "meta",
    begin: t,
    end: /$/,
    relevance: 0,
    /** @type {ModeCallback} */
    "on:begin": (r, a) => {
      r.index !== 0 && a.ignoreMatch();
    }
  }, e);
}, dw = {
  begin: "\\\\[\\s\\S]",
  relevance: 0
}, Lfe = {
  scope: "string",
  begin: "'",
  end: "'",
  illegal: "\\n",
  contains: [dw]
}, Pfe = {
  scope: "string",
  begin: '"',
  end: '"',
  illegal: "\\n",
  contains: [dw]
}, Ofe = {
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
}, Qk = function(e, t, r = {}) {
  const a = X1(
    {
      scope: "comment",
      begin: e,
      end: t,
      contains: []
    },
    r
  );
  a.contains.push({
    scope: "doctag",
    // hack to avoid the space from being included. the space is necessary to
    // match here to prevent the plain text rule below from gobbling up doctags
    begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
    end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
    excludeBegin: !0,
    relevance: 0
  });
  const v = hD(
    // list of common 1 and 2 letter words in English
    "I",
    "a",
    "is",
    "so",
    "us",
    "to",
    "at",
    "if",
    "in",
    "it",
    "on",
    // note: this is not an exhaustive list of contractions, just popular ones
    /[A-Za-z]+['](d|ve|re|ll|t|s|n)/,
    // contractions - can't we'd they're let's, etc
    /[A-Za-z]+[-][a-z]+/,
    // `no-way`, etc.
    /[A-Za-z][a-z]{2,}/
    // allow capitalized words at beginning of sentences
  );
  return a.contains.push(
    {
      // TODO: how to include ", (, ) without breaking grammars that use these for
      // comment delimiters?
      // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/
      // ---
      // this tries to find sequences of 3 english words in a row (without any
      // "programming" type syntax) this gives us a strong signal that we've
      // TRULY found a comment - vs perhaps scanning with the wrong language.
      // It's possible to find something that LOOKS like the start of the
      // comment - but then if there is no readable text - good chance it is a
      // false match and not a comment.
      //
      // for a visual example please see:
      // https://github.com/highlightjs/highlight.js/issues/2827
      begin: jv(
        /[ ]+/,
        // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
        "(",
        v,
        /[.]?[:]?([.][ ]|[ ])/,
        "){3}"
      )
      // look for 3 words in a row
    }
  ), a;
}, zfe = Qk("//", "$"), Rfe = Qk("/\\*", "\\*/"), Ffe = Qk("#", "$"), Nfe = {
  scope: "number",
  begin: jG,
  relevance: 0
}, Bfe = {
  scope: "number",
  begin: UG,
  relevance: 0
}, jfe = {
  scope: "number",
  begin: VG,
  relevance: 0
}, Ufe = {
  scope: "regexp",
  begin: /\/(?=[^/\n]*\/)/,
  end: /\/[gimuy]*/,
  contains: [
    dw,
    {
      begin: /\[/,
      end: /\]/,
      relevance: 0,
      contains: [dw]
    }
  ]
}, Vfe = {
  scope: "title",
  begin: BG,
  relevance: 0
}, $fe = {
  scope: "title",
  begin: pD,
  relevance: 0
}, qfe = {
  // excludes method names from keyword processing
  begin: "\\.\\s*" + pD,
  relevance: 0
}, Hfe = function(e) {
  return Object.assign(
    e,
    {
      /** @type {ModeCallback} */
      "on:begin": (t, r) => {
        r.data._beginMatch = t[1];
      },
      /** @type {ModeCallback} */
      "on:end": (t, r) => {
        r.data._beginMatch !== t[1] && r.ignoreMatch();
      }
    }
  );
};
var a6 = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  APOS_STRING_MODE: Lfe,
  BACKSLASH_ESCAPE: dw,
  BINARY_NUMBER_MODE: jfe,
  BINARY_NUMBER_RE: VG,
  COMMENT: Qk,
  C_BLOCK_COMMENT_MODE: Rfe,
  C_LINE_COMMENT_MODE: zfe,
  C_NUMBER_MODE: Bfe,
  C_NUMBER_RE: UG,
  END_SAME_AS_BEGIN: Hfe,
  HASH_COMMENT_MODE: Ffe,
  IDENT_RE: BG,
  MATCH_NOTHING_RE: Cfe,
  METHOD_GUARD: qfe,
  NUMBER_MODE: Nfe,
  NUMBER_RE: jG,
  PHRASAL_WORDS_MODE: Ofe,
  QUOTE_STRING_MODE: Pfe,
  REGEXP_MODE: Ufe,
  RE_STARTERS_RE: Ife,
  SHEBANG: Dfe,
  TITLE_MODE: Vfe,
  UNDERSCORE_IDENT_RE: pD,
  UNDERSCORE_TITLE_MODE: $fe
});
function Gfe(e, t) {
  e.input[e.index - 1] === "." && t.ignoreMatch();
}
function Wfe(e, t) {
  e.className !== void 0 && (e.scope = e.className, delete e.className);
}
function Yfe(e, t) {
  t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = Gfe, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
}
function Zfe(e, t) {
  Array.isArray(e.illegal) && (e.illegal = hD(...e.illegal));
}
function Xfe(e, t) {
  if (e.match) {
    if (e.begin || e.end) throw new Error("begin & end are not supported with match");
    e.begin = e.match, delete e.match;
  }
}
function Kfe(e, t) {
  e.relevance === void 0 && (e.relevance = 1);
}
const Jfe = (e, t) => {
  if (!e.beforeMatch) return;
  if (e.starts) throw new Error("beforeMatch cannot be used with starts");
  const r = Object.assign({}, e);
  Object.keys(e).forEach((a) => {
    delete e[a];
  }), e.keywords = r.keywords, e.begin = jv(r.beforeMatch, FG(r.begin)), e.starts = {
    relevance: 0,
    contains: [
      Object.assign(r, { endsParent: !0 })
    ]
  }, e.relevance = 0, delete r.beforeMatch;
}, Qfe = [
  "of",
  "and",
  "for",
  "in",
  "not",
  "or",
  "if",
  "then",
  "parent",
  // common variable name
  "list",
  // common variable name
  "value"
  // common variable name
], ehe = "keyword";
function $G(e, t, r = ehe) {
  const a = /* @__PURE__ */ Object.create(null);
  return typeof e == "string" ? v(r, e.split(" ")) : Array.isArray(e) ? v(r, e) : Object.keys(e).forEach(function(o) {
    Object.assign(
      a,
      $G(e[o], t, o)
    );
  }), a;
  function v(o, s) {
    t && (s = s.map((n) => n.toLowerCase())), s.forEach(function(n) {
      const l = n.split("|");
      a[l[0]] = [o, the(l[0], l[1])];
    });
  }
}
function the(e, t) {
  return t ? Number(t) : nhe(e) ? 0 : 1;
}
function nhe(e) {
  return Qfe.includes(e.toLowerCase());
}
const EN = {}, iv = (e) => {
  console.error(e);
}, CN = (e, ...t) => {
  console.log(`WARN: ${e}`, ...t);
}, R2 = (e, t) => {
  EN[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), EN[`${e}/${t}`] = !0);
}, J8 = new Error();
function qG(e, t, { key: r }) {
  let a = 0;
  const v = e[r], o = {}, s = {};
  for (let n = 1; n <= t.length; n++)
    s[n + a] = v[n], o[n + a] = !0, a += NG(t[n - 1]);
  e[r] = s, e[r]._emit = o, e[r]._multi = !0;
}
function rhe(e) {
  if (Array.isArray(e.begin)) {
    if (e.skip || e.excludeBegin || e.returnBegin)
      throw iv("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), J8;
    if (typeof e.beginScope != "object" || e.beginScope === null)
      throw iv("beginScope must be object"), J8;
    qG(e, e.begin, { key: "beginScope" }), e.begin = dD(e.begin, { joinWith: "" });
  }
}
function ihe(e) {
  if (Array.isArray(e.end)) {
    if (e.skip || e.excludeEnd || e.returnEnd)
      throw iv("skip, excludeEnd, returnEnd not compatible with endScope: {}"), J8;
    if (typeof e.endScope != "object" || e.endScope === null)
      throw iv("endScope must be object"), J8;
    qG(e, e.end, { key: "endScope" }), e.end = dD(e.end, { joinWith: "" });
  }
}
function ahe(e) {
  e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
}
function ohe(e) {
  ahe(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), rhe(e), ihe(e);
}
function she(e) {
  function t(s, n) {
    return new RegExp(
      hw(s),
      "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : "")
    );
  }
  class r {
    constructor() {
      this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
    }
    // @ts-ignore
    addRule(n, l) {
      l.position = this.position++, this.matchIndexes[this.matchAt] = l, this.regexes.push([l, n]), this.matchAt += NG(n) + 1;
    }
    compile() {
      this.regexes.length === 0 && (this.exec = () => null);
      const n = this.regexes.map((l) => l[1]);
      this.matcherRe = t(dD(n, { joinWith: "|" }), !0), this.lastIndex = 0;
    }
    /** @param {string} s */
    exec(n) {
      this.matcherRe.lastIndex = this.lastIndex;
      const l = this.matcherRe.exec(n);
      if (!l)
        return null;
      const u = l.findIndex((h, p) => p > 0 && h !== void 0), i = this.matchIndexes[u];
      return l.splice(0, u), Object.assign(l, i);
    }
  }
  class a {
    constructor() {
      this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
    }
    // @ts-ignore
    getMatcher(n) {
      if (this.multiRegexes[n]) return this.multiRegexes[n];
      const l = new r();
      return this.rules.slice(n).forEach(([u, i]) => l.addRule(u, i)), l.compile(), this.multiRegexes[n] = l, l;
    }
    resumingScanAtSamePosition() {
      return this.regexIndex !== 0;
    }
    considerAll() {
      this.regexIndex = 0;
    }
    // @ts-ignore
    addRule(n, l) {
      this.rules.push([n, l]), l.type === "begin" && this.count++;
    }
    /** @param {string} s */
    exec(n) {
      const l = this.getMatcher(this.regexIndex);
      l.lastIndex = this.lastIndex;
      let u = l.exec(n);
      if (this.resumingScanAtSamePosition() && !(u && u.index === this.lastIndex)) {
        const i = this.getMatcher(0);
        i.lastIndex = this.lastIndex + 1, u = i.exec(n);
      }
      return u && (this.regexIndex += u.position + 1, this.regexIndex === this.count && this.considerAll()), u;
    }
  }
  function v(s) {
    const n = new a();
    return s.contains.forEach((l) => n.addRule(l.begin, { rule: l, type: "begin" })), s.terminatorEnd && n.addRule(s.terminatorEnd, { type: "end" }), s.illegal && n.addRule(s.illegal, { type: "illegal" }), n;
  }
  function o(s, n) {
    const l = (
      /** @type CompiledMode */
      s
    );
    if (s.isCompiled) return l;
    [
      Wfe,
      // do this early so compiler extensions generally don't have to worry about
      // the distinction between match/begin
      Xfe,
      ohe,
      Jfe
    ].forEach((i) => i(s, n)), e.compilerExtensions.forEach((i) => i(s, n)), s.__beforeBegin = null, [
      Yfe,
      // do this later so compiler extensions that come earlier have access to the
      // raw array if they wanted to perhaps manipulate it, etc.
      Zfe,
      // default to 1 relevance if not specified
      Kfe
    ].forEach((i) => i(s, n)), s.isCompiled = !0;
    let u = null;
    return typeof s.keywords == "object" && s.keywords.$pattern && (s.keywords = Object.assign({}, s.keywords), u = s.keywords.$pattern, delete s.keywords.$pattern), u = u || /\w+/, s.keywords && (s.keywords = $G(s.keywords, e.case_insensitive)), l.keywordPatternRe = t(u, !0), n && (s.begin || (s.begin = /\B|\b/), l.beginRe = t(l.begin), !s.end && !s.endsWithParent && (s.end = /\B|\b/), s.end && (l.endRe = t(l.end)), l.terminatorEnd = hw(l.end) || "", s.endsWithParent && n.terminatorEnd && (l.terminatorEnd += (s.end ? "|" : "") + n.terminatorEnd)), s.illegal && (l.illegalRe = t(
      /** @type {RegExp | string} */
      s.illegal
    )), s.contains || (s.contains = []), s.contains = [].concat(...s.contains.map(function(i) {
      return lhe(i === "self" ? s : i);
    })), s.contains.forEach(function(i) {
      o(
        /** @type Mode */
        i,
        l
      );
    }), s.starts && o(s.starts, n), l.matcher = v(l), l;
  }
  if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self"))
    throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");
  return e.classNameAliases = X1(e.classNameAliases || {}), o(
    /** @type Mode */
    e
  );
}
function HG(e) {
  return e ? e.endsWithParent || HG(e.starts) : !1;
}
function lhe(e) {
  return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
    return X1(e, { variants: null }, t);
  })), e.cachedVariants ? e.cachedVariants : HG(e) ? X1(e, { starts: e.starts ? X1(e.starts) : null }) : Object.isFrozen(e) ? X1(e) : e;
}
var uhe = "11.10.0";
class che extends Error {
  constructor(t, r) {
    super(t), this.name = "HTMLInjectionError", this.html = r;
  }
}
const xS = RG, IN = X1, DN = Symbol("nomatch"), fhe = 7, GG = function(e) {
  const t = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), a = [];
  let v = !0;
  const o = "Could not find the language '{}', did you forget to load/include a language module?", s = { disableAutodetect: !0, name: "Plain text", contains: [] };
  let n = {
    ignoreUnescapedHTML: !1,
    throwUnescapedHTML: !1,
    noHighlightRe: /^(no-?highlight)$/i,
    languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
    classPrefix: "hljs-",
    cssSelector: "pre code",
    languages: null,
    // beta configuration options, subject to change, welcome to discuss
    // https://github.com/highlightjs/highlight.js/issues/1086
    __emitter: kfe
  };
  function l(z) {
    return n.noHighlightRe.test(z);
  }
  function u(z) {
    let F = z.className + " ";
    F += z.parentNode ? z.parentNode.className : "";
    const U = n.languageDetectRe.exec(F);
    if (U) {
      const V = D(U[1]);
      return V || (CN(o.replace("{}", U[1])), CN("Falling back to no-highlight mode for this block.", z)), V ? U[1] : "no-highlight";
    }
    return F.split(/\s+/).find((V) => l(V) || D(V));
  }
  function i(z, F, U) {
    let V = "", $ = "";
    typeof F == "object" ? (V = z, U = F.ignoreIllegals, $ = F.language) : (R2("10.7.0", "highlight(lang, code, ...args) has been deprecated."), R2("10.7.0", `Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`), $ = z, V = F), U === void 0 && (U = !0);
    const q = {
      code: V,
      language: $
    };
    O("before:highlight", q);
    const K = q.result ? q.result : h(q.language, q.code, U);
    return K.code = q.code, O("after:highlight", K), K;
  }
  function h(z, F, U, V) {
    const $ = /* @__PURE__ */ Object.create(null);
    function q(Ee, Ne) {
      return Ee.keywords[Ne];
    }
    function K() {
      if (!pe.keywords) {
        Ae.addText(Se);
        return;
      }
      let Ee = 0;
      pe.keywordPatternRe.lastIndex = 0;
      let Ne = pe.keywordPatternRe.exec(Se), Ie = "";
      for (; Ne; ) {
        Ie += Se.substring(Ee, Ne.index);
        const ge = se.case_insensitive ? Ne[0].toLowerCase() : Ne[0], Ce = q(pe, ge);
        if (Ce) {
          const [we, Ge] = Ce;
          if (Ae.addText(Ie), Ie = "", $[ge] = ($[ge] || 0) + 1, $[ge] <= fhe && (Me += Ge), we.startsWith("_"))
            Ie += Ne[0];
          else {
            const Re = se.classNameAliases[we] || we;
            te(Ne[0], Re);
          }
        } else
          Ie += Ne[0];
        Ee = pe.keywordPatternRe.lastIndex, Ne = pe.keywordPatternRe.exec(Se);
      }
      Ie += Se.substring(Ee), Ae.addText(Ie);
    }
    function re() {
      if (Se === "") return;
      let Ee = null;
      if (typeof pe.subLanguage == "string") {
        if (!t[pe.subLanguage]) {
          Ae.addText(Se);
          return;
        }
        Ee = h(pe.subLanguage, Se, !0, be[pe.subLanguage]), be[pe.subLanguage] = /** @type {CompiledMode} */
        Ee._top;
      } else
        Ee = _(Se, pe.subLanguage.length ? pe.subLanguage : null);
      pe.relevance > 0 && (Me += Ee.relevance), Ae.__addSublanguage(Ee._emitter, Ee.language);
    }
    function Y() {
      pe.subLanguage != null ? re() : K(), Se = "";
    }
    function te(Ee, Ne) {
      Ee !== "" && (Ae.startScope(Ne), Ae.addText(Ee), Ae.endScope());
    }
    function ee(Ee, Ne) {
      let Ie = 1;
      const ge = Ne.length - 1;
      for (; Ie <= ge; ) {
        if (!Ee._emit[Ie]) {
          Ie++;
          continue;
        }
        const Ce = se.classNameAliases[Ee[Ie]] || Ee[Ie], we = Ne[Ie];
        Ce ? te(we, Ce) : (Se = we, K(), Se = ""), Ie++;
      }
    }
    function X(Ee, Ne) {
      return Ee.scope && typeof Ee.scope == "string" && Ae.openNode(se.classNameAliases[Ee.scope] || Ee.scope), Ee.beginScope && (Ee.beginScope._wrap ? (te(Se, se.classNameAliases[Ee.beginScope._wrap] || Ee.beginScope._wrap), Se = "") : Ee.beginScope._multi && (ee(Ee.beginScope, Ne), Se = "")), pe = Object.create(Ee, { parent: { value: pe } }), pe;
    }
    function Q(Ee, Ne, Ie) {
      let ge = Mfe(Ee.endRe, Ie);
      if (ge) {
        if (Ee["on:end"]) {
          const Ce = new AN(Ee);
          Ee["on:end"](Ne, Ce), Ce.isMatchIgnored && (ge = !1);
        }
        if (ge) {
          for (; Ee.endsParent && Ee.parent; )
            Ee = Ee.parent;
          return Ee;
        }
      }
      if (Ee.endsWithParent)
        return Q(Ee.parent, Ne, Ie);
    }
    function ue(Ee) {
      return pe.matcher.regexIndex === 0 ? (Se += Ee[0], 1) : (We = !0, 0);
    }
    function ce(Ee) {
      const Ne = Ee[0], Ie = Ee.rule, ge = new AN(Ie), Ce = [Ie.__beforeBegin, Ie["on:begin"]];
      for (const we of Ce)
        if (we && (we(Ee, ge), ge.isMatchIgnored))
          return ue(Ne);
      return Ie.skip ? Se += Ne : (Ie.excludeBegin && (Se += Ne), Y(), !Ie.returnBegin && !Ie.excludeBegin && (Se = Ne)), X(Ie, Ee), Ie.returnBegin ? 0 : Ne.length;
    }
    function he(Ee) {
      const Ne = Ee[0], Ie = F.substring(Ee.index), ge = Q(pe, Ee, Ie);
      if (!ge)
        return DN;
      const Ce = pe;
      pe.endScope && pe.endScope._wrap ? (Y(), te(Ne, pe.endScope._wrap)) : pe.endScope && pe.endScope._multi ? (Y(), ee(pe.endScope, Ee)) : Ce.skip ? Se += Ne : (Ce.returnEnd || Ce.excludeEnd || (Se += Ne), Y(), Ce.excludeEnd && (Se = Ne));
      do
        pe.scope && Ae.closeNode(), !pe.skip && !pe.subLanguage && (Me += pe.relevance), pe = pe.parent;
      while (pe !== ge.parent);
      return ge.starts && X(ge.starts, Ee), Ce.returnEnd ? 0 : Ne.length;
    }
    function de() {
      const Ee = [];
      for (let Ne = pe; Ne !== se; Ne = Ne.parent)
        Ne.scope && Ee.unshift(Ne.scope);
      Ee.forEach((Ne) => Ae.openNode(Ne));
    }
    let ne = {};
    function ae(Ee, Ne) {
      const Ie = Ne && Ne[0];
      if (Se += Ee, Ie == null)
        return Y(), 0;
      if (ne.type === "begin" && Ne.type === "end" && ne.index === Ne.index && Ie === "") {
        if (Se += F.slice(Ne.index, Ne.index + 1), !v) {
          const ge = new Error(`0 width match regex (${z})`);
          throw ge.languageName = z, ge.badRule = ne.rule, ge;
        }
        return 1;
      }
      if (ne = Ne, Ne.type === "begin")
        return ce(Ne);
      if (Ne.type === "illegal" && !U) {
        const ge = new Error('Illegal lexeme "' + Ie + '" for mode "' + (pe.scope || "<unnamed>") + '"');
        throw ge.mode = pe, ge;
      } else if (Ne.type === "end") {
        const ge = he(Ne);
        if (ge !== DN)
          return ge;
      }
      if (Ne.type === "illegal" && Ie === "")
        return 1;
      if (Le > 1e5 && Le > Ne.index * 3)
        throw new Error("potential infinite loop, way more iterations than matches");
      return Se += Ie, Ie.length;
    }
    const se = D(z);
    if (!se)
      throw iv(o.replace("{}", z)), new Error('Unknown language: "' + z + '"');
    const me = she(se);
    let ye = "", pe = V || me;
    const be = {}, Ae = new n.__emitter(n);
    de();
    let Se = "", Me = 0, De = 0, Le = 0, We = !1;
    try {
      if (se.__emitTokens)
        se.__emitTokens(F, Ae);
      else {
        for (pe.matcher.considerAll(); ; ) {
          Le++, We ? We = !1 : pe.matcher.considerAll(), pe.matcher.lastIndex = De;
          const Ee = pe.matcher.exec(F);
          if (!Ee) break;
          const Ne = F.substring(De, Ee.index), Ie = ae(Ne, Ee);
          De = Ee.index + Ie;
        }
        ae(F.substring(De));
      }
      return Ae.finalize(), ye = Ae.toHTML(), {
        language: z,
        value: ye,
        relevance: Me,
        illegal: !1,
        _emitter: Ae,
        _top: pe
      };
    } catch (Ee) {
      if (Ee.message && Ee.message.includes("Illegal"))
        return {
          language: z,
          value: xS(F),
          illegal: !0,
          relevance: 0,
          _illegalBy: {
            message: Ee.message,
            index: De,
            context: F.slice(De - 100, De + 100),
            mode: Ee.mode,
            resultSoFar: ye
          },
          _emitter: Ae
        };
      if (v)
        return {
          language: z,
          value: xS(F),
          illegal: !1,
          relevance: 0,
          errorRaised: Ee,
          _emitter: Ae,
          _top: pe
        };
      throw Ee;
    }
  }
  function p(z) {
    const F = {
      value: xS(z),
      illegal: !1,
      relevance: 0,
      _top: s,
      _emitter: new n.__emitter(n)
    };
    return F._emitter.addText(z), F;
  }
  function _(z, F) {
    F = F || n.languages || Object.keys(t);
    const U = p(z), V = F.filter(D).filter(E).map(
      (Y) => h(Y, z, !1)
    );
    V.unshift(U);
    const $ = V.sort((Y, te) => {
      if (Y.relevance !== te.relevance) return te.relevance - Y.relevance;
      if (Y.language && te.language) {
        if (D(Y.language).supersetOf === te.language)
          return 1;
        if (D(te.language).supersetOf === Y.language)
          return -1;
      }
      return 0;
    }), [q, K] = $, re = q;
    return re.secondBest = K, re;
  }
  function d(z, F, U) {
    const V = F && r[F] || U;
    z.classList.add("hljs"), z.classList.add(`language-${V}`);
  }
  function f(z) {
    let F = null;
    const U = u(z);
    if (l(U)) return;
    if (O(
      "before:highlightElement",
      { el: z, language: U }
    ), z.dataset.highlighted) {
      console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", z);
      return;
    }
    if (z.children.length > 0 && (n.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(z)), n.throwUnescapedHTML))
      throw new che(
        "One of your code blocks includes unescaped HTML.",
        z.innerHTML
      );
    F = z;
    const V = F.textContent, $ = U ? i(V, { language: U, ignoreIllegals: !0 }) : _(V);
    z.innerHTML = $.value, z.dataset.highlighted = "yes", d(z, U, $.language), z.result = {
      language: $.language,
      // TODO: remove with version 11.0
      re: $.relevance,
      relevance: $.relevance
    }, $.secondBest && (z.secondBest = {
      language: $.secondBest.language,
      relevance: $.secondBest.relevance
    }), O("after:highlightElement", { el: z, result: $, text: V });
  }
  function c(z) {
    n = IN(n, z);
  }
  const g = () => {
    w(), R2("10.6.0", "initHighlighting() deprecated.  Use highlightAll() now.");
  };
  function m() {
    w(), R2("10.6.0", "initHighlightingOnLoad() deprecated.  Use highlightAll() now.");
  }
  let x = !1;
  function w() {
    if (document.readyState === "loading") {
      x = !0;
      return;
    }
    document.querySelectorAll(n.cssSelector).forEach(f);
  }
  function k() {
    x && w();
  }
  typeof window < "u" && window.addEventListener && window.addEventListener("DOMContentLoaded", k, !1);
  function S(z, F) {
    let U = null;
    try {
      U = F(e);
    } catch (V) {
      if (iv("Language definition for '{}' could not be registered.".replace("{}", z)), v)
        iv(V);
      else
        throw V;
      U = s;
    }
    U.name || (U.name = z), t[z] = U, U.rawDefinition = F.bind(null, e), U.aliases && L(U.aliases, { languageName: z });
  }
  function A(z) {
    delete t[z];
    for (const F of Object.keys(r))
      r[F] === z && delete r[F];
  }
  function C() {
    return Object.keys(t);
  }
  function D(z) {
    return z = (z || "").toLowerCase(), t[z] || t[r[z]];
  }
  function L(z, { languageName: F }) {
    typeof z == "string" && (z = [z]), z.forEach((U) => {
      r[U.toLowerCase()] = F;
    });
  }
  function E(z) {
    const F = D(z);
    return F && !F.disableAutodetect;
  }
  function P(z) {
    z["before:highlightBlock"] && !z["before:highlightElement"] && (z["before:highlightElement"] = (F) => {
      z["before:highlightBlock"](
        Object.assign({ block: F.el }, F)
      );
    }), z["after:highlightBlock"] && !z["after:highlightElement"] && (z["after:highlightElement"] = (F) => {
      z["after:highlightBlock"](
        Object.assign({ block: F.el }, F)
      );
    });
  }
  function I(z) {
    P(z), a.push(z);
  }
  function M(z) {
    const F = a.indexOf(z);
    F !== -1 && a.splice(F, 1);
  }
  function O(z, F) {
    const U = z;
    a.forEach(function(V) {
      V[U] && V[U](F);
    });
  }
  function T(z) {
    return R2("10.7.0", "highlightBlock will be removed entirely in v12.0"), R2("10.7.0", "Please use highlightElement now."), f(z);
  }
  Object.assign(e, {
    highlight: i,
    highlightAuto: _,
    highlightAll: w,
    highlightElement: f,
    // TODO: Remove with v12 API
    highlightBlock: T,
    configure: c,
    initHighlighting: g,
    initHighlightingOnLoad: m,
    registerLanguage: S,
    unregisterLanguage: A,
    listLanguages: C,
    getLanguage: D,
    registerAliases: L,
    autoDetection: E,
    inherit: IN,
    addPlugin: I,
    removePlugin: M
  }), e.debugMode = function() {
    v = !1;
  }, e.safeMode = function() {
    v = !0;
  }, e.versionString = uhe, e.regex = {
    concat: jv,
    lookahead: FG,
    either: hD,
    optional: Afe,
    anyNumberOfTimes: Tfe
  };
  for (const z in a6)
    typeof a6[z] == "object" && zG(a6[z]);
  return Object.assign(e, a6), e;
}, Sx = GG({});
Sx.newInstance = () => GG({});
var hhe = Sx;
Sx.HighlightJS = Sx;
Sx.default = Sx;
const N_ = /* @__PURE__ */ cD(hhe);
function dhe(e) {
  const t = {
    className: "attr",
    begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/,
    relevance: 1.01
  }, r = {
    match: /[{}[\],:]/,
    className: "punctuation",
    relevance: 0
  }, a = [
    "true",
    "false",
    "null"
  ], v = {
    scope: "literal",
    beginKeywords: a.join(" ")
  };
  return {
    name: "JSON",
    aliases: ["jsonc"],
    keywords: {
      literal: a
    },
    contains: [
      t,
      r,
      e.QUOTE_STRING_MODE,
      v,
      e.C_NUMBER_MODE,
      e.C_LINE_COMMENT_MODE,
      e.C_BLOCK_COMMENT_MODE
    ],
    illegal: "\\S"
  };
}
function phe(e) {
  const t = e.regex, r = new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*", "u"), a = [
    "and",
    "as",
    "assert",
    "async",
    "await",
    "break",
    "case",
    "class",
    "continue",
    "def",
    "del",
    "elif",
    "else",
    "except",
    "finally",
    "for",
    "from",
    "global",
    "if",
    "import",
    "in",
    "is",
    "lambda",
    "match",
    "nonlocal|10",
    "not",
    "or",
    "pass",
    "raise",
    "return",
    "try",
    "while",
    "with",
    "yield"
  ], n = {
    $pattern: /[A-Za-z]\w+|__\w+__/,
    keyword: a,
    built_in: [
      "__import__",
      "abs",
      "all",
      "any",
      "ascii",
      "bin",
      "bool",
      "breakpoint",
      "bytearray",
      "bytes",
      "callable",
      "chr",
      "classmethod",
      "compile",
      "complex",
      "delattr",
      "dict",
      "dir",
      "divmod",
      "enumerate",
      "eval",
      "exec",
      "filter",
      "float",
      "format",
      "frozenset",
      "getattr",
      "globals",
      "hasattr",
      "hash",
      "help",
      "hex",
      "id",
      "input",
      "int",
      "isinstance",
      "issubclass",
      "iter",
      "len",
      "list",
      "locals",
      "map",
      "max",
      "memoryview",
      "min",
      "next",
      "object",
      "oct",
      "open",
      "ord",
      "pow",
      "print",
      "property",
      "range",
      "repr",
      "reversed",
      "round",
      "set",
      "setattr",
      "slice",
      "sorted",
      "staticmethod",
      "str",
      "sum",
      "super",
      "tuple",
      "type",
      "vars",
      "zip"
    ],
    literal: [
      "__debug__",
      "Ellipsis",
      "False",
      "None",
      "NotImplemented",
      "True"
    ],
    type: [
      "Any",
      "Callable",
      "Coroutine",
      "Dict",
      "List",
      "Literal",
      "Generic",
      "Optional",
      "Sequence",
      "Set",
      "Tuple",
      "Type",
      "Union"
    ]
  }, l = {
    className: "meta",
    begin: /^(>>>|\.\.\.) /
  }, u = {
    className: "subst",
    begin: /\{/,
    end: /\}/,
    keywords: n,
    illegal: /#/
  }, i = {
    begin: /\{\{/,
    relevance: 0
  }, h = {
    className: "string",
    contains: [e.BACKSLASH_ESCAPE],
    variants: [
      {
        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
        end: /'''/,
        contains: [
          e.BACKSLASH_ESCAPE,
          l
        ],
        relevance: 10
      },
      {
        begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
        end: /"""/,
        contains: [
          e.BACKSLASH_ESCAPE,
          l
        ],
        relevance: 10
      },
      {
        begin: /([fF][rR]|[rR][fF]|[fF])'''/,
        end: /'''/,
        contains: [
          e.BACKSLASH_ESCAPE,
          l,
          i,
          u
        ]
      },
      {
        begin: /([fF][rR]|[rR][fF]|[fF])"""/,
        end: /"""/,
        contains: [
          e.BACKSLASH_ESCAPE,
          l,
          i,
          u
        ]
      },
      {
        begin: /([uU]|[rR])'/,
        end: /'/,
        relevance: 10
      },
      {
        begin: /([uU]|[rR])"/,
        end: /"/,
        relevance: 10
      },
      {
        begin: /([bB]|[bB][rR]|[rR][bB])'/,
        end: /'/
      },
      {
        begin: /([bB]|[bB][rR]|[rR][bB])"/,
        end: /"/
      },
      {
        begin: /([fF][rR]|[rR][fF]|[fF])'/,
        end: /'/,
        contains: [
          e.BACKSLASH_ESCAPE,
          i,
          u
        ]
      },
      {
        begin: /([fF][rR]|[rR][fF]|[fF])"/,
        end: /"/,
        contains: [
          e.BACKSLASH_ESCAPE,
          i,
          u
        ]
      },
      e.APOS_STRING_MODE,
      e.QUOTE_STRING_MODE
    ]
  }, p = "[0-9](_?[0-9])*", _ = `(\\b(${p}))?\\.(${p})|\\b(${p})\\.`, d = `\\b|${a.join("|")}`, f = {
    className: "number",
    relevance: 0,
    variants: [
      // exponentfloat, pointfloat
      // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
      // optionally imaginary
      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
      // Note: no leading \b because floats can start with a decimal point
      // and we don't want to mishandle e.g. `fn(.5)`,
      // no trailing \b for pointfloat because it can end with a decimal point
      // and we don't want to mishandle e.g. `0..hex()`; this should be safe
      // because both MUST contain a decimal point and so cannot be confused with
      // the interior part of an identifier
      {
        begin: `(\\b(${p})|(${_}))[eE][+-]?(${p})[jJ]?(?=${d})`
      },
      {
        begin: `(${_})[jJ]?`
      },
      // decinteger, bininteger, octinteger, hexinteger
      // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
      // optionally "long" in Python 2
      // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
      // decinteger is optionally imaginary
      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
      {
        begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`
      },
      {
        begin: `\\b0[bB](_?[01])+[lL]?(?=${d})`
      },
      {
        begin: `\\b0[oO](_?[0-7])+[lL]?(?=${d})`
      },
      {
        begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`
      },
      // imagnumber (digitpart-based)
      // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
      {
        begin: `\\b(${p})[jJ](?=${d})`
      }
    ]
  }, c = {
    className: "comment",
    begin: t.lookahead(/# type:/),
    end: /$/,
    keywords: n,
    contains: [
      {
        // prevent keywords from coloring `type`
        begin: /# type:/
      },
      // comment within a datatype comment includes no keywords
      {
        begin: /#/,
        end: /\b\B/,
        endsWithParent: !0
      }
    ]
  }, g = {
    className: "params",
    variants: [
      // Exclude params in functions without params
      {
        className: "",
        begin: /\(\s*\)/,
        skip: !0
      },
      {
        begin: /\(/,
        end: /\)/,
        excludeBegin: !0,
        excludeEnd: !0,
        keywords: n,
        contains: [
          "self",
          l,
          f,
          h,
          e.HASH_COMMENT_MODE
        ]
      }
    ]
  };
  return u.contains = [
    h,
    f,
    l
  ], {
    name: "Python",
    aliases: [
      "py",
      "gyp",
      "ipython"
    ],
    unicodeRegex: !0,
    keywords: n,
    illegal: /(<\/|\?)|=>/,
    contains: [
      l,
      f,
      {
        // very common convention
        scope: "variable.language",
        match: /\bself\b/
      },
      {
        // eat "if" prior to string so that it won't accidentally be
        // labeled as an f-string
        beginKeywords: "if",
        relevance: 0
      },
      { match: /\bor\b/, scope: "keyword" },
      h,
      c,
      e.HASH_COMMENT_MODE,
      {
        match: [
          /\bdef/,
          /\s+/,
          r
        ],
        scope: {
          1: "keyword",
          3: "title.function"
        },
        contains: [g]
      },
      {
        variants: [
          {
            match: [
              /\bclass/,
              /\s+/,
              r,
              /\s*/,
              /\(\s*/,
              r,
              /\s*\)/
            ]
          },
          {
            match: [
              /\bclass/,
              /\s+/,
              r
            ]
          }
        ],
        scope: {
          1: "keyword",
          3: "title.class",
          6: "title.class.inherited"
        }
      },
      {
        className: "meta",
        begin: /^[\t ]*@/,
        end: /(?=#)|$/,
        contains: [
          f,
          g,
          h
        ]
      }
    ]
  };
}
function mhe(e) {
  const t = e.regex, r = e.COMMENT("--", "$"), a = {
    className: "string",
    variants: [
      {
        begin: /'/,
        end: /'/,
        contains: [{ begin: /''/ }]
      }
    ]
  }, v = {
    begin: /"/,
    end: /"/,
    contains: [{ begin: /""/ }]
  }, o = [
    "true",
    "false",
    // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.
    // "null",
    "unknown"
  ], s = [
    "double precision",
    "large object",
    "with timezone",
    "without timezone"
  ], n = [
    "bigint",
    "binary",
    "blob",
    "boolean",
    "char",
    "character",
    "clob",
    "date",
    "dec",
    "decfloat",
    "decimal",
    "float",
    "int",
    "integer",
    "interval",
    "nchar",
    "nclob",
    "national",
    "numeric",
    "real",
    "row",
    "smallint",
    "time",
    "timestamp",
    "varchar",
    "varying",
    // modifier (character varying)
    "varbinary"
  ], l = [
    "add",
    "asc",
    "collation",
    "desc",
    "final",
    "first",
    "last",
    "view"
  ], u = [
    "abs",
    "acos",
    "all",
    "allocate",
    "alter",
    "and",
    "any",
    "are",
    "array",
    "array_agg",
    "array_max_cardinality",
    "as",
    "asensitive",
    "asin",
    "asymmetric",
    "at",
    "atan",
    "atomic",
    "authorization",
    "avg",
    "begin",
    "begin_frame",
    "begin_partition",
    "between",
    "bigint",
    "binary",
    "blob",
    "boolean",
    "both",
    "by",
    "call",
    "called",
    "cardinality",
    "cascaded",
    "case",
    "cast",
    "ceil",
    "ceiling",
    "char",
    "char_length",
    "character",
    "character_length",
    "check",
    "classifier",
    "clob",
    "close",
    "coalesce",
    "collate",
    "collect",
    "column",
    "commit",
    "condition",
    "connect",
    "constraint",
    "contains",
    "convert",
    "copy",
    "corr",
    "corresponding",
    "cos",
    "cosh",
    "count",
    "covar_pop",
    "covar_samp",
    "create",
    "cross",
    "cube",
    "cume_dist",
    "current",
    "current_catalog",
    "current_date",
    "current_default_transform_group",
    "current_path",
    "current_role",
    "current_row",
    "current_schema",
    "current_time",
    "current_timestamp",
    "current_path",
    "current_role",
    "current_transform_group_for_type",
    "current_user",
    "cursor",
    "cycle",
    "date",
    "day",
    "deallocate",
    "dec",
    "decimal",
    "decfloat",
    "declare",
    "default",
    "define",
    "delete",
    "dense_rank",
    "deref",
    "describe",
    "deterministic",
    "disconnect",
    "distinct",
    "double",
    "drop",
    "dynamic",
    "each",
    "element",
    "else",
    "empty",
    "end",
    "end_frame",
    "end_partition",
    "end-exec",
    "equals",
    "escape",
    "every",
    "except",
    "exec",
    "execute",
    "exists",
    "exp",
    "external",
    "extract",
    "false",
    "fetch",
    "filter",
    "first_value",
    "float",
    "floor",
    "for",
    "foreign",
    "frame_row",
    "free",
    "from",
    "full",
    "function",
    "fusion",
    "get",
    "global",
    "grant",
    "group",
    "grouping",
    "groups",
    "having",
    "hold",
    "hour",
    "identity",
    "in",
    "indicator",
    "initial",
    "inner",
    "inout",
    "insensitive",
    "insert",
    "int",
    "integer",
    "intersect",
    "intersection",
    "interval",
    "into",
    "is",
    "join",
    "json_array",
    "json_arrayagg",
    "json_exists",
    "json_object",
    "json_objectagg",
    "json_query",
    "json_table",
    "json_table_primitive",
    "json_value",
    "lag",
    "language",
    "large",
    "last_value",
    "lateral",
    "lead",
    "leading",
    "left",
    "like",
    "like_regex",
    "listagg",
    "ln",
    "local",
    "localtime",
    "localtimestamp",
    "log",
    "log10",
    "lower",
    "match",
    "match_number",
    "match_recognize",
    "matches",
    "max",
    "member",
    "merge",
    "method",
    "min",
    "minute",
    "mod",
    "modifies",
    "module",
    "month",
    "multiset",
    "national",
    "natural",
    "nchar",
    "nclob",
    "new",
    "no",
    "none",
    "normalize",
    "not",
    "nth_value",
    "ntile",
    "null",
    "nullif",
    "numeric",
    "octet_length",
    "occurrences_regex",
    "of",
    "offset",
    "old",
    "omit",
    "on",
    "one",
    "only",
    "open",
    "or",
    "order",
    "out",
    "outer",
    "over",
    "overlaps",
    "overlay",
    "parameter",
    "partition",
    "pattern",
    "per",
    "percent",
    "percent_rank",
    "percentile_cont",
    "percentile_disc",
    "period",
    "portion",
    "position",
    "position_regex",
    "power",
    "precedes",
    "precision",
    "prepare",
    "primary",
    "procedure",
    "ptf",
    "range",
    "rank",
    "reads",
    "real",
    "recursive",
    "ref",
    "references",
    "referencing",
    "regr_avgx",
    "regr_avgy",
    "regr_count",
    "regr_intercept",
    "regr_r2",
    "regr_slope",
    "regr_sxx",
    "regr_sxy",
    "regr_syy",
    "release",
    "result",
    "return",
    "returns",
    "revoke",
    "right",
    "rollback",
    "rollup",
    "row",
    "row_number",
    "rows",
    "running",
    "savepoint",
    "scope",
    "scroll",
    "search",
    "second",
    "seek",
    "select",
    "sensitive",
    "session_user",
    "set",
    "show",
    "similar",
    "sin",
    "sinh",
    "skip",
    "smallint",
    "some",
    "specific",
    "specifictype",
    "sql",
    "sqlexception",
    "sqlstate",
    "sqlwarning",
    "sqrt",
    "start",
    "static",
    "stddev_pop",
    "stddev_samp",
    "submultiset",
    "subset",
    "substring",
    "substring_regex",
    "succeeds",
    "sum",
    "symmetric",
    "system",
    "system_time",
    "system_user",
    "table",
    "tablesample",
    "tan",
    "tanh",
    "then",
    "time",
    "timestamp",
    "timezone_hour",
    "timezone_minute",
    "to",
    "trailing",
    "translate",
    "translate_regex",
    "translation",
    "treat",
    "trigger",
    "trim",
    "trim_array",
    "true",
    "truncate",
    "uescape",
    "union",
    "unique",
    "unknown",
    "unnest",
    "update",
    "upper",
    "user",
    "using",
    "value",
    "values",
    "value_of",
    "var_pop",
    "var_samp",
    "varbinary",
    "varchar",
    "varying",
    "versioning",
    "when",
    "whenever",
    "where",
    "width_bucket",
    "window",
    "with",
    "within",
    "without",
    "year"
  ], i = [
    "abs",
    "acos",
    "array_agg",
    "asin",
    "atan",
    "avg",
    "cast",
    "ceil",
    "ceiling",
    "coalesce",
    "corr",
    "cos",
    "cosh",
    "count",
    "covar_pop",
    "covar_samp",
    "cume_dist",
    "dense_rank",
    "deref",
    "element",
    "exp",
    "extract",
    "first_value",
    "floor",
    "json_array",
    "json_arrayagg",
    "json_exists",
    "json_object",
    "json_objectagg",
    "json_query",
    "json_table",
    "json_table_primitive",
    "json_value",
    "lag",
    "last_value",
    "lead",
    "listagg",
    "ln",
    "log",
    "log10",
    "lower",
    "max",
    "min",
    "mod",
    "nth_value",
    "ntile",
    "nullif",
    "percent_rank",
    "percentile_cont",
    "percentile_disc",
    "position",
    "position_regex",
    "power",
    "rank",
    "regr_avgx",
    "regr_avgy",
    "regr_count",
    "regr_intercept",
    "regr_r2",
    "regr_slope",
    "regr_sxx",
    "regr_sxy",
    "regr_syy",
    "row_number",
    "sin",
    "sinh",
    "sqrt",
    "stddev_pop",
    "stddev_samp",
    "substring",
    "substring_regex",
    "sum",
    "tan",
    "tanh",
    "translate",
    "translate_regex",
    "treat",
    "trim",
    "trim_array",
    "unnest",
    "upper",
    "value_of",
    "var_pop",
    "var_samp",
    "width_bucket"
  ], h = [
    "current_catalog",
    "current_date",
    "current_default_transform_group",
    "current_path",
    "current_role",
    "current_schema",
    "current_transform_group_for_type",
    "current_user",
    "session_user",
    "system_time",
    "system_user",
    "current_time",
    "localtime",
    "current_timestamp",
    "localtimestamp"
  ], p = [
    "create table",
    "insert into",
    "primary key",
    "foreign key",
    "not null",
    "alter table",
    "add constraint",
    "grouping sets",
    "on overflow",
    "character set",
    "respect nulls",
    "ignore nulls",
    "nulls first",
    "nulls last",
    "depth first",
    "breadth first"
  ], _ = i, d = [
    ...u,
    ...l
  ].filter((x) => !i.includes(x)), f = {
    className: "variable",
    begin: /@[a-z0-9][a-z0-9_]*/
  }, c = {
    className: "operator",
    begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
    relevance: 0
  }, g = {
    begin: t.concat(/\b/, t.either(..._), /\s*\(/),
    relevance: 0,
    keywords: { built_in: _ }
  };
  function m(x, {
    exceptions: w,
    when: k
  } = {}) {
    const S = k;
    return w = w || [], x.map((A) => A.match(/\|\d+$/) || w.includes(A) ? A : S(A) ? `${A}|0` : A);
  }
  return {
    name: "SQL",
    case_insensitive: !0,
    // does not include {} or HTML tags `</`
    illegal: /[{}]|<\//,
    keywords: {
      $pattern: /\b[\w\.]+/,
      keyword: m(d, { when: (x) => x.length < 3 }),
      literal: o,
      type: n,
      built_in: h
    },
    contains: [
      {
        begin: t.either(...p),
        relevance: 0,
        keywords: {
          $pattern: /[\w\.]+/,
          keyword: d.concat(p),
          literal: o,
          type: n
        }
      },
      {
        className: "type",
        begin: t.either(...s)
      },
      g,
      f,
      a,
      v,
      e.C_NUMBER_MODE,
      e.C_BLOCK_COMMENT_MODE,
      r,
      c
    ]
  };
}
function ghe(e) {
  const t = e.regex, r = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), a = /[\p{L}0-9._:-]+/u, v = {
    className: "symbol",
    begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/
  }, o = {
    begin: /\s/,
    contains: [
      {
        className: "keyword",
        begin: /#?[a-z_][a-z1-9_-]+/,
        illegal: /\n/
      }
    ]
  }, s = e.inherit(o, {
    begin: /\(/,
    end: /\)/
  }), n = e.inherit(e.APOS_STRING_MODE, { className: "string" }), l = e.inherit(e.QUOTE_STRING_MODE, { className: "string" }), u = {
    endsWithParent: !0,
    illegal: /</,
    relevance: 0,
    contains: [
      {
        className: "attr",
        begin: a,
        relevance: 0
      },
      {
        begin: /=\s*/,
        relevance: 0,
        contains: [
          {
            className: "string",
            endsParent: !0,
            variants: [
              {
                begin: /"/,
                end: /"/,
                contains: [v]
              },
              {
                begin: /'/,
                end: /'/,
                contains: [v]
              },
              { begin: /[^\s"'=<>`]+/ }
            ]
          }
        ]
      }
    ]
  };
  return {
    name: "HTML, XML",
    aliases: [
      "html",
      "xhtml",
      "rss",
      "atom",
      "xjb",
      "xsd",
      "xsl",
      "plist",
      "wsf",
      "svg"
    ],
    case_insensitive: !0,
    unicodeRegex: !0,
    contains: [
      {
        className: "meta",
        begin: /<![a-z]/,
        end: />/,
        relevance: 10,
        contains: [
          o,
          l,
          n,
          s,
          {
            begin: /\[/,
            end: /\]/,
            contains: [
              {
                className: "meta",
                begin: /<![a-z]/,
                end: />/,
                contains: [
                  o,
                  s,
                  l,
                  n
                ]
              }
            ]
          }
        ]
      },
      e.COMMENT(
        /<!--/,
        /-->/,
        { relevance: 10 }
      ),
      {
        begin: /<!\[CDATA\[/,
        end: /\]\]>/,
        relevance: 10
      },
      v,
      // xml processing instructions
      {
        className: "meta",
        end: /\?>/,
        variants: [
          {
            begin: /<\?xml/,
            relevance: 10,
            contains: [
              l
            ]
          },
          {
            begin: /<\?[a-z][a-z0-9]+/
          }
        ]
      },
      {
        className: "tag",
        /*
        The lookahead pattern (?=...) ensures that 'begin' only matches
        '<style' as a single word, followed by a whitespace or an
        ending bracket.
        */
        begin: /<style(?=\s|>)/,
        end: />/,
        keywords: { name: "style" },
        contains: [u],
        starts: {
          end: /<\/style>/,
          returnEnd: !0,
          subLanguage: [
            "css",
            "xml"
          ]
        }
      },
      {
        className: "tag",
        // See the comment in the <style tag about the lookahead pattern
        begin: /<script(?=\s|>)/,
        end: />/,
        keywords: { name: "script" },
        contains: [u],
        starts: {
          end: /<\/script>/,
          returnEnd: !0,
          subLanguage: [
            "javascript",
            "handlebars",
            "xml"
          ]
        }
      },
      // we need this for now for jSX
      {
        className: "tag",
        begin: /<>|<\/>/
      },
      // open tag
      {
        className: "tag",
        begin: t.concat(
          /</,
          t.lookahead(t.concat(
            r,
            // <tag/>
            // <tag>
            // <tag ...
            t.either(/\/>/, />/, /\s/)
          ))
        ),
        end: /\/?>/,
        contains: [
          {
            className: "name",
            begin: r,
            relevance: 0,
            starts: u
          }
        ]
      },
      // close tag
      {
        className: "tag",
        begin: t.concat(
          /<\//,
          t.lookahead(t.concat(
            r,
            />/
          ))
        ),
        contains: [
          {
            className: "name",
            begin: r,
            relevance: 0
          },
          {
            begin: />/,
            relevance: 0,
            endsParent: !0
          }
        ]
      }
    ]
  };
}
const LN = {};
function yhe(e) {
  let t = LN[e];
  if (t)
    return t;
  t = LN[e] = [];
  for (let r = 0; r < 128; r++) {
    const a = String.fromCharCode(r);
    t.push(a);
  }
  for (let r = 0; r < e.length; r++) {
    const a = e.charCodeAt(r);
    t[a] = "%" + ("0" + a.toString(16).toUpperCase()).slice(-2);
  }
  return t;
}
function Mx(e, t) {
  typeof t != "string" && (t = Mx.defaultChars);
  const r = yhe(t);
  return e.replace(/(%[a-f0-9]{2})+/gi, function(a) {
    let v = "";
    for (let o = 0, s = a.length; o < s; o += 3) {
      const n = parseInt(a.slice(o + 1, o + 3), 16);
      if (n < 128) {
        v += r[n];
        continue;
      }
      if ((n & 224) === 192 && o + 3 < s) {
        const l = parseInt(a.slice(o + 4, o + 6), 16);
        if ((l & 192) === 128) {
          const u = n << 6 & 1984 | l & 63;
          u < 128 ? v += "��" : v += String.fromCharCode(u), o += 3;
          continue;
        }
      }
      if ((n & 240) === 224 && o + 6 < s) {
        const l = parseInt(a.slice(o + 4, o + 6), 16), u = parseInt(a.slice(o + 7, o + 9), 16);
        if ((l & 192) === 128 && (u & 192) === 128) {
          const i = n << 12 & 61440 | l << 6 & 4032 | u & 63;
          i < 2048 || i >= 55296 && i <= 57343 ? v += "���" : v += String.fromCharCode(i), o += 6;
          continue;
        }
      }
      if ((n & 248) === 240 && o + 9 < s) {
        const l = parseInt(a.slice(o + 4, o + 6), 16), u = parseInt(a.slice(o + 7, o + 9), 16), i = parseInt(a.slice(o + 10, o + 12), 16);
        if ((l & 192) === 128 && (u & 192) === 128 && (i & 192) === 128) {
          let h = n << 18 & 1835008 | l << 12 & 258048 | u << 6 & 4032 | i & 63;
          h < 65536 || h > 1114111 ? v += "����" : (h -= 65536, v += String.fromCharCode(55296 + (h >> 10), 56320 + (h & 1023))), o += 9;
          continue;
        }
      }
      v += "�";
    }
    return v;
  });
}
Mx.defaultChars = ";/?:@&=+$,#";
Mx.componentChars = "";
const PN = {};
function vhe(e) {
  let t = PN[e];
  if (t)
    return t;
  t = PN[e] = [];
  for (let r = 0; r < 128; r++) {
    const a = String.fromCharCode(r);
    /^[0-9a-z]$/i.test(a) ? t.push(a) : t.push("%" + ("0" + r.toString(16).toUpperCase()).slice(-2));
  }
  for (let r = 0; r < e.length; r++)
    t[e.charCodeAt(r)] = e[r];
  return t;
}
function n4(e, t, r) {
  typeof t != "string" && (r = t, t = n4.defaultChars), typeof r > "u" && (r = !0);
  const a = vhe(t);
  let v = "";
  for (let o = 0, s = e.length; o < s; o++) {
    const n = e.charCodeAt(o);
    if (r && n === 37 && o + 2 < s && /^[0-9a-f]{2}$/i.test(e.slice(o + 1, o + 3))) {
      v += e.slice(o, o + 3), o += 2;
      continue;
    }
    if (n < 128) {
      v += a[n];
      continue;
    }
    if (n >= 55296 && n <= 57343) {
      if (n >= 55296 && n <= 56319 && o + 1 < s) {
        const l = e.charCodeAt(o + 1);
        if (l >= 56320 && l <= 57343) {
          v += encodeURIComponent(e[o] + e[o + 1]), o++;
          continue;
        }
      }
      v += "%EF%BF%BD";
      continue;
    }
    v += encodeURIComponent(e[o]);
  }
  return v;
}
n4.defaultChars = ";/?:@&=+$,-_.!~*'()#";
n4.componentChars = "-_.!~*'()";
function mD(e) {
  let t = "";
  return t += e.protocol || "", t += e.slashes ? "//" : "", t += e.auth ? e.auth + "@" : "", e.hostname && e.hostname.indexOf(":") !== -1 ? t += "[" + e.hostname + "]" : t += e.hostname || "", t += e.port ? ":" + e.port : "", t += e.pathname || "", t += e.search || "", t += e.hash || "", t;
}
function Q8() {
  this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
}
const xhe = /^([a-z0-9.+-]+:)/i, bhe = /:[0-9]*$/, _he = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, whe = ["<", ">", '"', "`", " ", "\r", `
`, "	"], khe = ["{", "}", "|", "\\", "^", "`"].concat(whe), The = ["'"].concat(khe), ON = ["%", "/", "?", ";", "#"].concat(The), zN = ["/", "?", "#"], Ahe = 255, RN = /^[+a-z0-9A-Z_-]{0,63}$/, She = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, FN = {
  javascript: !0,
  "javascript:": !0
}, NN = {
  http: !0,
  https: !0,
  ftp: !0,
  gopher: !0,
  file: !0,
  "http:": !0,
  "https:": !0,
  "ftp:": !0,
  "gopher:": !0,
  "file:": !0
};
function gD(e, t) {
  if (e && e instanceof Q8) return e;
  const r = new Q8();
  return r.parse(e, t), r;
}
Q8.prototype.parse = function(e, t) {
  let r, a, v, o = e;
  if (o = o.trim(), !t && e.split("#").length === 1) {
    const u = _he.exec(o);
    if (u)
      return this.pathname = u[1], u[2] && (this.search = u[2]), this;
  }
  let s = xhe.exec(o);
  if (s && (s = s[0], r = s.toLowerCase(), this.protocol = s, o = o.substr(s.length)), (t || s || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (v = o.substr(0, 2) === "//", v && !(s && FN[s]) && (o = o.substr(2), this.slashes = !0)), !FN[s] && (v || s && !NN[s])) {
    let u = -1;
    for (let d = 0; d < zN.length; d++)
      a = o.indexOf(zN[d]), a !== -1 && (u === -1 || a < u) && (u = a);
    let i, h;
    u === -1 ? h = o.lastIndexOf("@") : h = o.lastIndexOf("@", u), h !== -1 && (i = o.slice(0, h), o = o.slice(h + 1), this.auth = i), u = -1;
    for (let d = 0; d < ON.length; d++)
      a = o.indexOf(ON[d]), a !== -1 && (u === -1 || a < u) && (u = a);
    u === -1 && (u = o.length), o[u - 1] === ":" && u--;
    const p = o.slice(0, u);
    o = o.slice(u), this.parseHost(p), this.hostname = this.hostname || "";
    const _ = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
    if (!_) {
      const d = this.hostname.split(/\./);
      for (let f = 0, c = d.length; f < c; f++) {
        const g = d[f];
        if (g && !g.match(RN)) {
          let m = "";
          for (let x = 0, w = g.length; x < w; x++)
            g.charCodeAt(x) > 127 ? m += "x" : m += g[x];
          if (!m.match(RN)) {
            const x = d.slice(0, f), w = d.slice(f + 1), k = g.match(She);
            k && (x.push(k[1]), w.unshift(k[2])), w.length && (o = w.join(".") + o), this.hostname = x.join(".");
            break;
          }
        }
      }
    }
    this.hostname.length > Ahe && (this.hostname = ""), _ && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
  }
  const n = o.indexOf("#");
  n !== -1 && (this.hash = o.substr(n), o = o.slice(0, n));
  const l = o.indexOf("?");
  return l !== -1 && (this.search = o.substr(l), o = o.slice(0, l)), o && (this.pathname = o), NN[r] && this.hostname && !this.pathname && (this.pathname = ""), this;
};
Q8.prototype.parseHost = function(e) {
  let t = bhe.exec(e);
  t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
};
const Mhe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  decode: Mx,
  encode: n4,
  format: mD,
  parse: gD
}, Symbol.toStringTag, { value: "Module" })), WG = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, YG = /[\0-\x1F\x7F-\x9F]/, Ehe = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, yD = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, ZG = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, XG = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Che = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Any: WG,
  Cc: YG,
  Cf: Ehe,
  P: yD,
  S: ZG,
  Z: XG
}, Symbol.toStringTag, { value: "Module" })), Ihe = new Uint16Array(
  // prettier-ignore
  'ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e) => e.charCodeAt(0))
), Dhe = new Uint16Array(
  // prettier-ignore
  "Ȁaglq	\x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e) => e.charCodeAt(0))
);
var bS;
const Lhe = /* @__PURE__ */ new Map([
  [0, 65533],
  // C1 Unicode control character reference replacements
  [128, 8364],
  [130, 8218],
  [131, 402],
  [132, 8222],
  [133, 8230],
  [134, 8224],
  [135, 8225],
  [136, 710],
  [137, 8240],
  [138, 352],
  [139, 8249],
  [140, 338],
  [142, 381],
  [145, 8216],
  [146, 8217],
  [147, 8220],
  [148, 8221],
  [149, 8226],
  [150, 8211],
  [151, 8212],
  [152, 732],
  [153, 8482],
  [154, 353],
  [155, 8250],
  [156, 339],
  [158, 382],
  [159, 376]
]), Phe = (
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
  (bS = String.fromCodePoint) !== null && bS !== void 0 ? bS : function(e) {
    let t = "";
    return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | e & 1023), t += String.fromCharCode(e), t;
  }
);
function Ohe(e) {
  var t;
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = Lhe.get(e)) !== null && t !== void 0 ? t : e;
}
var Vc;
(function(e) {
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
})(Vc || (Vc = {}));
const zhe = 32;
var K1;
(function(e) {
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
})(K1 || (K1 = {}));
function _E(e) {
  return e >= Vc.ZERO && e <= Vc.NINE;
}
function Rhe(e) {
  return e >= Vc.UPPER_A && e <= Vc.UPPER_F || e >= Vc.LOWER_A && e <= Vc.LOWER_F;
}
function Fhe(e) {
  return e >= Vc.UPPER_A && e <= Vc.UPPER_Z || e >= Vc.LOWER_A && e <= Vc.LOWER_Z || _E(e);
}
function Nhe(e) {
  return e === Vc.EQUALS || Fhe(e);
}
var Fc;
(function(e) {
  e[e.EntityStart = 0] = "EntityStart", e[e.NumericStart = 1] = "NumericStart", e[e.NumericDecimal = 2] = "NumericDecimal", e[e.NumericHex = 3] = "NumericHex", e[e.NamedEntity = 4] = "NamedEntity";
})(Fc || (Fc = {}));
var G1;
(function(e) {
  e[e.Legacy = 0] = "Legacy", e[e.Strict = 1] = "Strict", e[e.Attribute = 2] = "Attribute";
})(G1 || (G1 = {}));
class Bhe {
  constructor(t, r, a) {
    this.decodeTree = t, this.emitCodePoint = r, this.errors = a, this.state = Fc.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = G1.Strict;
  }
  /** Resets the instance to make it reusable. */
  startEntity(t) {
    this.decodeMode = t, this.state = Fc.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
  }
  /**
   * Write an entity to the decoder. This can be called multiple times with partial entities.
   * If the entity is incomplete, the decoder will return -1.
   *
   * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
   * entity is incomplete, and resume when the next string is written.
   *
   * @param string The string containing the entity (or a continuation of the entity).
   * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  write(t, r) {
    switch (this.state) {
      case Fc.EntityStart:
        return t.charCodeAt(r) === Vc.NUM ? (this.state = Fc.NumericStart, this.consumed += 1, this.stateNumericStart(t, r + 1)) : (this.state = Fc.NamedEntity, this.stateNamedEntity(t, r));
      case Fc.NumericStart:
        return this.stateNumericStart(t, r);
      case Fc.NumericDecimal:
        return this.stateNumericDecimal(t, r);
      case Fc.NumericHex:
        return this.stateNumericHex(t, r);
      case Fc.NamedEntity:
        return this.stateNamedEntity(t, r);
    }
  }
  /**
   * Switches between the numeric decimal and hexadecimal states.
   *
   * Equivalent to the `Numeric character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  stateNumericStart(t, r) {
    return r >= t.length ? -1 : (t.charCodeAt(r) | zhe) === Vc.LOWER_X ? (this.state = Fc.NumericHex, this.consumed += 1, this.stateNumericHex(t, r + 1)) : (this.state = Fc.NumericDecimal, this.stateNumericDecimal(t, r));
  }
  addToNumericResult(t, r, a, v) {
    if (r !== a) {
      const o = a - r;
      this.result = this.result * Math.pow(v, o) + parseInt(t.substr(r, o), v), this.consumed += o;
    }
  }
  /**
   * Parses a hexadecimal numeric entity.
   *
   * Equivalent to the `Hexademical character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  stateNumericHex(t, r) {
    const a = r;
    for (; r < t.length; ) {
      const v = t.charCodeAt(r);
      if (_E(v) || Rhe(v))
        r += 1;
      else
        return this.addToNumericResult(t, a, r, 16), this.emitNumericEntity(v, 3);
    }
    return this.addToNumericResult(t, a, r, 16), -1;
  }
  /**
   * Parses a decimal numeric entity.
   *
   * Equivalent to the `Decimal character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  stateNumericDecimal(t, r) {
    const a = r;
    for (; r < t.length; ) {
      const v = t.charCodeAt(r);
      if (_E(v))
        r += 1;
      else
        return this.addToNumericResult(t, a, r, 10), this.emitNumericEntity(v, 2);
    }
    return this.addToNumericResult(t, a, r, 10), -1;
  }
  /**
   * Validate and emit a numeric entity.
   *
   * Implements the logic from the `Hexademical character reference start
   * state` and `Numeric character reference end state` in the HTML spec.
   *
   * @param lastCp The last code point of the entity. Used to see if the
   *               entity was terminated with a semicolon.
   * @param expectedLength The minimum number of characters that should be
   *                       consumed. Used to validate that at least one digit
   *                       was consumed.
   * @returns The number of characters that were consumed.
   */
  emitNumericEntity(t, r) {
    var a;
    if (this.consumed <= r)
      return (a = this.errors) === null || a === void 0 || a.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
    if (t === Vc.SEMI)
      this.consumed += 1;
    else if (this.decodeMode === G1.Strict)
      return 0;
    return this.emitCodePoint(Ohe(this.result), this.consumed), this.errors && (t !== Vc.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
  }
  /**
   * Parses a named entity.
   *
   * Equivalent to the `Named character reference state` in the HTML spec.
   *
   * @param str The string containing the entity (or a continuation of the entity).
   * @param offset The current offset.
   * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
   */
  stateNamedEntity(t, r) {
    const { decodeTree: a } = this;
    let v = a[this.treeIndex], o = (v & K1.VALUE_LENGTH) >> 14;
    for (; r < t.length; r++, this.excess++) {
      const s = t.charCodeAt(r);
      if (this.treeIndex = jhe(a, v, this.treeIndex + Math.max(1, o), s), this.treeIndex < 0)
        return this.result === 0 || // If we are parsing an attribute
        this.decodeMode === G1.Attribute && // We shouldn't have consumed any characters after the entity,
        (o === 0 || // And there should be no invalid characters.
        Nhe(s)) ? 0 : this.emitNotTerminatedNamedEntity();
      if (v = a[this.treeIndex], o = (v & K1.VALUE_LENGTH) >> 14, o !== 0) {
        if (s === Vc.SEMI)
          return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
        this.decodeMode !== G1.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
      }
    }
    return -1;
  }
  /**
   * Emit a named entity that was not terminated with a semicolon.
   *
   * @returns The number of characters consumed.
   */
  emitNotTerminatedNamedEntity() {
    var t;
    const { result: r, decodeTree: a } = this, v = (a[r] & K1.VALUE_LENGTH) >> 14;
    return this.emitNamedEntityData(r, v, this.consumed), (t = this.errors) === null || t === void 0 || t.missingSemicolonAfterCharacterReference(), this.consumed;
  }
  /**
   * Emit a named entity.
   *
   * @param result The index of the entity in the decode tree.
   * @param valueLength The number of bytes in the entity.
   * @param consumed The number of characters consumed.
   *
   * @returns The number of characters consumed.
   */
  emitNamedEntityData(t, r, a) {
    const { decodeTree: v } = this;
    return this.emitCodePoint(r === 1 ? v[t] & ~K1.VALUE_LENGTH : v[t + 1], a), r === 3 && this.emitCodePoint(v[t + 2], a), a;
  }
  /**
   * Signal to the parser that the end of the input was reached.
   *
   * Remaining data will be emitted and relevant errors will be produced.
   *
   * @returns The number of characters consumed.
   */
  end() {
    var t;
    switch (this.state) {
      case Fc.NamedEntity:
        return this.result !== 0 && (this.decodeMode !== G1.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
      case Fc.NumericDecimal:
        return this.emitNumericEntity(0, 2);
      case Fc.NumericHex:
        return this.emitNumericEntity(0, 3);
      case Fc.NumericStart:
        return (t = this.errors) === null || t === void 0 || t.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
      case Fc.EntityStart:
        return 0;
    }
  }
}
function KG(e) {
  let t = "";
  const r = new Bhe(e, (a) => t += Phe(a));
  return function(v, o) {
    let s = 0, n = 0;
    for (; (n = v.indexOf("&", n)) >= 0; ) {
      t += v.slice(s, n), r.startEntity(o);
      const u = r.write(
        v,
        // Skip the "&"
        n + 1
      );
      if (u < 0) {
        s = n + r.end();
        break;
      }
      s = n + u, n = u === 0 ? s + 1 : s;
    }
    const l = t + v.slice(s);
    return t = "", l;
  };
}
function jhe(e, t, r, a) {
  const v = (t & K1.BRANCH_LENGTH) >> 7, o = t & K1.JUMP_TABLE;
  if (v === 0)
    return o !== 0 && a === o ? r : -1;
  if (o) {
    const l = a - o;
    return l < 0 || l >= v ? -1 : e[r + l] - 1;
  }
  let s = r, n = s + v - 1;
  for (; s <= n; ) {
    const l = s + n >>> 1, u = e[l];
    if (u < a)
      s = l + 1;
    else if (u > a)
      n = l - 1;
    else
      return e[l + v];
  }
  return -1;
}
const Uhe = KG(Ihe);
KG(Dhe);
function JG(e, t = G1.Legacy) {
  return Uhe(e, t);
}
function Vhe(e) {
  return Object.prototype.toString.call(e);
}
function vD(e) {
  return Vhe(e) === "[object String]";
}
const $he = Object.prototype.hasOwnProperty;
function qhe(e, t) {
  return $he.call(e, t);
}
function e9(e) {
  return Array.prototype.slice.call(arguments, 1).forEach(function(r) {
    if (r) {
      if (typeof r != "object")
        throw new TypeError(r + "must be object");
      Object.keys(r).forEach(function(a) {
        e[a] = r[a];
      });
    }
  }), e;
}
function QG(e, t, r) {
  return [].concat(e.slice(0, t), r, e.slice(t + 1));
}
function xD(e) {
  return !(e >= 55296 && e <= 57343 || e >= 64976 && e <= 65007 || (e & 65535) === 65535 || (e & 65535) === 65534 || e >= 0 && e <= 8 || e === 11 || e >= 14 && e <= 31 || e >= 127 && e <= 159 || e > 1114111);
}
function e7(e) {
  if (e > 65535) {
    e -= 65536;
    const t = 55296 + (e >> 10), r = 56320 + (e & 1023);
    return String.fromCharCode(t, r);
  }
  return String.fromCharCode(e);
}
const eW = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, Hhe = /&([a-z#][a-z0-9]{1,31});/gi, Ghe = new RegExp(eW.source + "|" + Hhe.source, "gi"), Whe = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;
function Yhe(e, t) {
  if (t.charCodeAt(0) === 35 && Whe.test(t)) {
    const a = t[1].toLowerCase() === "x" ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
    return xD(a) ? e7(a) : e;
  }
  const r = JG(e);
  return r !== e ? r : e;
}
function Zhe(e) {
  return e.indexOf("\\") < 0 ? e : e.replace(eW, "$1");
}
function Ex(e) {
  return e.indexOf("\\") < 0 && e.indexOf("&") < 0 ? e : e.replace(Ghe, function(t, r, a) {
    return r || Yhe(t, a);
  });
}
const Xhe = /[&<>"]/, Khe = /[&<>"]/g, Jhe = {
  "&": "&amp;",
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;"
};
function Qhe(e) {
  return Jhe[e];
}
function mg(e) {
  return Xhe.test(e) ? e.replace(Khe, Qhe) : e;
}
const ede = /[.?*+^$[\]\\(){}|-]/g;
function tde(e) {
  return e.replace(ede, "\\$&");
}
function cl(e) {
  switch (e) {
    case 9:
    case 32:
      return !0;
  }
  return !1;
}
function pw(e) {
  if (e >= 8192 && e <= 8202)
    return !0;
  switch (e) {
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 32:
    case 160:
    case 5760:
    case 8239:
    case 8287:
    case 12288:
      return !0;
  }
  return !1;
}
function mw(e) {
  return yD.test(e) || ZG.test(e);
}
function gw(e) {
  switch (e) {
    case 33:
    case 34:
    case 35:
    case 36:
    case 37:
    case 38:
    case 39:
    case 40:
    case 41:
    case 42:
    case 43:
    case 44:
    case 45:
    case 46:
    case 47:
    case 58:
    case 59:
    case 60:
    case 61:
    case 62:
    case 63:
    case 64:
    case 91:
    case 92:
    case 93:
    case 94:
    case 95:
    case 96:
    case 123:
    case 124:
    case 125:
    case 126:
      return !0;
    default:
      return !1;
  }
}
function t9(e) {
  return e = e.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (e = e.replace(/ẞ/g, "ß")), e.toLowerCase().toUpperCase();
}
const nde = { mdurl: Mhe, ucmicro: Che }, rde = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  arrayReplaceAt: QG,
  assign: e9,
  escapeHtml: mg,
  escapeRE: tde,
  fromCodePoint: e7,
  has: qhe,
  isMdAsciiPunct: gw,
  isPunctChar: mw,
  isSpace: cl,
  isString: vD,
  isValidEntityCode: xD,
  isWhiteSpace: pw,
  lib: nde,
  normalizeReference: t9,
  unescapeAll: Ex,
  unescapeMd: Zhe
}, Symbol.toStringTag, { value: "Module" }));
function ide(e, t, r) {
  let a, v, o, s;
  const n = e.posMax, l = e.pos;
  for (e.pos = t + 1, a = 1; e.pos < n; ) {
    if (o = e.src.charCodeAt(e.pos), o === 93 && (a--, a === 0)) {
      v = !0;
      break;
    }
    if (s = e.pos, e.md.inline.skipToken(e), o === 91) {
      if (s === e.pos - 1)
        a++;
      else if (r)
        return e.pos = l, -1;
    }
  }
  let u = -1;
  return v && (u = e.pos), e.pos = l, u;
}
function ade(e, t, r) {
  let a, v = t;
  const o = {
    ok: !1,
    pos: 0,
    str: ""
  };
  if (e.charCodeAt(v) === 60) {
    for (v++; v < r; ) {
      if (a = e.charCodeAt(v), a === 10 || a === 60)
        return o;
      if (a === 62)
        return o.pos = v + 1, o.str = Ex(e.slice(t + 1, v)), o.ok = !0, o;
      if (a === 92 && v + 1 < r) {
        v += 2;
        continue;
      }
      v++;
    }
    return o;
  }
  let s = 0;
  for (; v < r && (a = e.charCodeAt(v), !(a === 32 || a < 32 || a === 127)); ) {
    if (a === 92 && v + 1 < r) {
      if (e.charCodeAt(v + 1) === 32)
        break;
      v += 2;
      continue;
    }
    if (a === 40 && (s++, s > 32))
      return o;
    if (a === 41) {
      if (s === 0)
        break;
      s--;
    }
    v++;
  }
  return t === v || s !== 0 || (o.str = Ex(e.slice(t, v)), o.pos = v, o.ok = !0), o;
}
function ode(e, t, r, a) {
  let v, o = t;
  const s = {
    // if `true`, this is a valid link title
    ok: !1,
    // if `true`, this link can be continued on the next line
    can_continue: !1,
    // if `ok`, it's the position of the first character after the closing marker
    pos: 0,
    // if `ok`, it's the unescaped title
    str: "",
    // expected closing marker character code
    marker: 0
  };
  if (a)
    s.str = a.str, s.marker = a.marker;
  else {
    if (o >= r)
      return s;
    let n = e.charCodeAt(o);
    if (n !== 34 && n !== 39 && n !== 40)
      return s;
    t++, o++, n === 40 && (n = 41), s.marker = n;
  }
  for (; o < r; ) {
    if (v = e.charCodeAt(o), v === s.marker)
      return s.pos = o + 1, s.str += Ex(e.slice(t, o)), s.ok = !0, s;
    if (v === 40 && s.marker === 41)
      return s;
    v === 92 && o + 1 < r && o++, o++;
  }
  return s.can_continue = !0, s.str += Ex(e.slice(t, o)), s;
}
const sde = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  parseLinkDestination: ade,
  parseLinkLabel: ide,
  parseLinkTitle: ode
}, Symbol.toStringTag, { value: "Module" })), R0 = {};
R0.code_inline = function(e, t, r, a, v) {
  const o = e[t];
  return "<code" + v.renderAttrs(o) + ">" + mg(o.content) + "</code>";
};
R0.code_block = function(e, t, r, a, v) {
  const o = e[t];
  return "<pre" + v.renderAttrs(o) + "><code>" + mg(e[t].content) + `</code></pre>
`;
};
R0.fence = function(e, t, r, a, v) {
  const o = e[t], s = o.info ? Ex(o.info).trim() : "";
  let n = "", l = "";
  if (s) {
    const i = s.split(/(\s+)/g);
    n = i[0], l = i.slice(2).join("");
  }
  let u;
  if (r.highlight ? u = r.highlight(o.content, n, l) || mg(o.content) : u = mg(o.content), u.indexOf("<pre") === 0)
    return u + `
`;
  if (s) {
    const i = o.attrIndex("class"), h = o.attrs ? o.attrs.slice() : [];
    i < 0 ? h.push(["class", r.langPrefix + n]) : (h[i] = h[i].slice(), h[i][1] += " " + r.langPrefix + n);
    const p = {
      attrs: h
    };
    return `<pre><code${v.renderAttrs(p)}>${u}</code></pre>
`;
  }
  return `<pre><code${v.renderAttrs(o)}>${u}</code></pre>
`;
};
R0.image = function(e, t, r, a, v) {
  const o = e[t];
  return o.attrs[o.attrIndex("alt")][1] = v.renderInlineAsText(o.children, r, a), v.renderToken(e, t, r);
};
R0.hardbreak = function(e, t, r) {
  return r.xhtmlOut ? `<br />
` : `<br>
`;
};
R0.softbreak = function(e, t, r) {
  return r.breaks ? r.xhtmlOut ? `<br />
` : `<br>
` : `
`;
};
R0.text = function(e, t) {
  return mg(e[t].content);
};
R0.html_block = function(e, t) {
  return e[t].content;
};
R0.html_inline = function(e, t) {
  return e[t].content;
};
function yb() {
  this.rules = e9({}, R0);
}
yb.prototype.renderAttrs = function(t) {
  let r, a, v;
  if (!t.attrs)
    return "";
  for (v = "", r = 0, a = t.attrs.length; r < a; r++)
    v += " " + mg(t.attrs[r][0]) + '="' + mg(t.attrs[r][1]) + '"';
  return v;
};
yb.prototype.renderToken = function(t, r, a) {
  const v = t[r];
  let o = "";
  if (v.hidden)
    return "";
  v.block && v.nesting !== -1 && r && t[r - 1].hidden && (o += `
`), o += (v.nesting === -1 ? "</" : "<") + v.tag, o += this.renderAttrs(v), v.nesting === 0 && a.xhtmlOut && (o += " /");
  let s = !1;
  if (v.block && (s = !0, v.nesting === 1 && r + 1 < t.length)) {
    const n = t[r + 1];
    (n.type === "inline" || n.hidden || n.nesting === -1 && n.tag === v.tag) && (s = !1);
  }
  return o += s ? `>
` : ">", o;
};
yb.prototype.renderInline = function(e, t, r) {
  let a = "";
  const v = this.rules;
  for (let o = 0, s = e.length; o < s; o++) {
    const n = e[o].type;
    typeof v[n] < "u" ? a += v[n](e, o, t, r, this) : a += this.renderToken(e, o, t);
  }
  return a;
};
yb.prototype.renderInlineAsText = function(e, t, r) {
  let a = "";
  for (let v = 0, o = e.length; v < o; v++)
    switch (e[v].type) {
      case "text":
        a += e[v].content;
        break;
      case "image":
        a += this.renderInlineAsText(e[v].children, t, r);
        break;
      case "html_inline":
      case "html_block":
        a += e[v].content;
        break;
      case "softbreak":
      case "hardbreak":
        a += `
`;
        break;
    }
  return a;
};
yb.prototype.render = function(e, t, r) {
  let a = "";
  const v = this.rules;
  for (let o = 0, s = e.length; o < s; o++) {
    const n = e[o].type;
    n === "inline" ? a += this.renderInline(e[o].children, t, r) : typeof v[n] < "u" ? a += v[n](e, o, t, r, this) : a += this.renderToken(e, o, t, r);
  }
  return a;
};
function Lh() {
  this.__rules__ = [], this.__cache__ = null;
}
Lh.prototype.__find__ = function(e) {
  for (let t = 0; t < this.__rules__.length; t++)
    if (this.__rules__[t].name === e)
      return t;
  return -1;
};
Lh.prototype.__compile__ = function() {
  const e = this, t = [""];
  e.__rules__.forEach(function(r) {
    r.enabled && r.alt.forEach(function(a) {
      t.indexOf(a) < 0 && t.push(a);
    });
  }), e.__cache__ = {}, t.forEach(function(r) {
    e.__cache__[r] = [], e.__rules__.forEach(function(a) {
      a.enabled && (r && a.alt.indexOf(r) < 0 || e.__cache__[r].push(a.fn));
    });
  });
};
Lh.prototype.at = function(e, t, r) {
  const a = this.__find__(e), v = r || {};
  if (a === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__[a].fn = t, this.__rules__[a].alt = v.alt || [], this.__cache__ = null;
};
Lh.prototype.before = function(e, t, r, a) {
  const v = this.__find__(e), o = a || {};
  if (v === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__.splice(v, 0, {
    name: t,
    enabled: !0,
    fn: r,
    alt: o.alt || []
  }), this.__cache__ = null;
};
Lh.prototype.after = function(e, t, r, a) {
  const v = this.__find__(e), o = a || {};
  if (v === -1)
    throw new Error("Parser rule not found: " + e);
  this.__rules__.splice(v + 1, 0, {
    name: t,
    enabled: !0,
    fn: r,
    alt: o.alt || []
  }), this.__cache__ = null;
};
Lh.prototype.push = function(e, t, r) {
  const a = r || {};
  this.__rules__.push({
    name: e,
    enabled: !0,
    fn: t,
    alt: a.alt || []
  }), this.__cache__ = null;
};
Lh.prototype.enable = function(e, t) {
  Array.isArray(e) || (e = [e]);
  const r = [];
  return e.forEach(function(a) {
    const v = this.__find__(a);
    if (v < 0) {
      if (t)
        return;
      throw new Error("Rules manager: invalid rule name " + a);
    }
    this.__rules__[v].enabled = !0, r.push(a);
  }, this), this.__cache__ = null, r;
};
Lh.prototype.enableOnly = function(e, t) {
  Array.isArray(e) || (e = [e]), this.__rules__.forEach(function(r) {
    r.enabled = !1;
  }), this.enable(e, t);
};
Lh.prototype.disable = function(e, t) {
  Array.isArray(e) || (e = [e]);
  const r = [];
  return e.forEach(function(a) {
    const v = this.__find__(a);
    if (v < 0) {
      if (t)
        return;
      throw new Error("Rules manager: invalid rule name " + a);
    }
    this.__rules__[v].enabled = !1, r.push(a);
  }, this), this.__cache__ = null, r;
};
Lh.prototype.getRules = function(e) {
  return this.__cache__ === null && this.__compile__(), this.__cache__[e] || [];
};
function Sp(e, t, r) {
  this.type = e, this.tag = t, this.attrs = null, this.map = null, this.nesting = r, this.level = 0, this.children = null, this.content = "", this.markup = "", this.info = "", this.meta = null, this.block = !1, this.hidden = !1;
}
Sp.prototype.attrIndex = function(t) {
  if (!this.attrs)
    return -1;
  const r = this.attrs;
  for (let a = 0, v = r.length; a < v; a++)
    if (r[a][0] === t)
      return a;
  return -1;
};
Sp.prototype.attrPush = function(t) {
  this.attrs ? this.attrs.push(t) : this.attrs = [t];
};
Sp.prototype.attrSet = function(t, r) {
  const a = this.attrIndex(t), v = [t, r];
  a < 0 ? this.attrPush(v) : this.attrs[a] = v;
};
Sp.prototype.attrGet = function(t) {
  const r = this.attrIndex(t);
  let a = null;
  return r >= 0 && (a = this.attrs[r][1]), a;
};
Sp.prototype.attrJoin = function(t, r) {
  const a = this.attrIndex(t);
  a < 0 ? this.attrPush([t, r]) : this.attrs[a][1] = this.attrs[a][1] + " " + r;
};
function tW(e, t, r) {
  this.src = e, this.env = r, this.tokens = [], this.inlineMode = !1, this.md = t;
}
tW.prototype.Token = Sp;
const lde = /\r\n?|\n/g, ude = /\0/g;
function cde(e) {
  let t;
  t = e.src.replace(lde, `
`), t = t.replace(ude, "�"), e.src = t;
}
function fde(e) {
  let t;
  e.inlineMode ? (t = new e.Token("inline", "", 0), t.content = e.src, t.map = [0, 1], t.children = [], e.tokens.push(t)) : e.md.block.parse(e.src, e.md, e.env, e.tokens);
}
function hde(e) {
  const t = e.tokens;
  for (let r = 0, a = t.length; r < a; r++) {
    const v = t[r];
    v.type === "inline" && e.md.inline.parse(v.content, e.md, e.env, v.children);
  }
}
function dde(e) {
  return /^<a[>\s]/i.test(e);
}
function pde(e) {
  return /^<\/a\s*>/i.test(e);
}
function mde(e) {
  const t = e.tokens;
  if (e.md.options.linkify)
    for (let r = 0, a = t.length; r < a; r++) {
      if (t[r].type !== "inline" || !e.md.linkify.pretest(t[r].content))
        continue;
      let v = t[r].children, o = 0;
      for (let s = v.length - 1; s >= 0; s--) {
        const n = v[s];
        if (n.type === "link_close") {
          for (s--; v[s].level !== n.level && v[s].type !== "link_open"; )
            s--;
          continue;
        }
        if (n.type === "html_inline" && (dde(n.content) && o > 0 && o--, pde(n.content) && o++), !(o > 0) && n.type === "text" && e.md.linkify.test(n.content)) {
          const l = n.content;
          let u = e.md.linkify.match(l);
          const i = [];
          let h = n.level, p = 0;
          u.length > 0 && u[0].index === 0 && s > 0 && v[s - 1].type === "text_special" && (u = u.slice(1));
          for (let _ = 0; _ < u.length; _++) {
            const d = u[_].url, f = e.md.normalizeLink(d);
            if (!e.md.validateLink(f))
              continue;
            let c = u[_].text;
            u[_].schema ? u[_].schema === "mailto:" && !/^mailto:/i.test(c) ? c = e.md.normalizeLinkText("mailto:" + c).replace(/^mailto:/, "") : c = e.md.normalizeLinkText(c) : c = e.md.normalizeLinkText("http://" + c).replace(/^http:\/\//, "");
            const g = u[_].index;
            if (g > p) {
              const k = new e.Token("text", "", 0);
              k.content = l.slice(p, g), k.level = h, i.push(k);
            }
            const m = new e.Token("link_open", "a", 1);
            m.attrs = [["href", f]], m.level = h++, m.markup = "linkify", m.info = "auto", i.push(m);
            const x = new e.Token("text", "", 0);
            x.content = c, x.level = h, i.push(x);
            const w = new e.Token("link_close", "a", -1);
            w.level = --h, w.markup = "linkify", w.info = "auto", i.push(w), p = u[_].lastIndex;
          }
          if (p < l.length) {
            const _ = new e.Token("text", "", 0);
            _.content = l.slice(p), _.level = h, i.push(_);
          }
          t[r].children = v = QG(v, s, i);
        }
      }
    }
}
const nW = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, gde = /\((c|tm|r)\)/i, yde = /\((c|tm|r)\)/ig, vde = {
  c: "©",
  r: "®",
  tm: "™"
};
function xde(e, t) {
  return vde[t.toLowerCase()];
}
function bde(e) {
  let t = 0;
  for (let r = e.length - 1; r >= 0; r--) {
    const a = e[r];
    a.type === "text" && !t && (a.content = a.content.replace(yde, xde)), a.type === "link_open" && a.info === "auto" && t--, a.type === "link_close" && a.info === "auto" && t++;
  }
}
function _de(e) {
  let t = 0;
  for (let r = e.length - 1; r >= 0; r--) {
    const a = e[r];
    a.type === "text" && !t && nW.test(a.content) && (a.content = a.content.replace(/\+-/g, "±").replace(/\.{2,}/g, "…").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1—").replace(/(^|\s)--(?=\s|$)/mg, "$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1–")), a.type === "link_open" && a.info === "auto" && t--, a.type === "link_close" && a.info === "auto" && t++;
  }
}
function wde(e) {
  let t;
  if (e.md.options.typographer)
    for (t = e.tokens.length - 1; t >= 0; t--)
      e.tokens[t].type === "inline" && (gde.test(e.tokens[t].content) && bde(e.tokens[t].children), nW.test(e.tokens[t].content) && _de(e.tokens[t].children));
}
const kde = /['"]/, BN = /['"]/g, jN = "’";
function o6(e, t, r) {
  return e.slice(0, t) + r + e.slice(t + 1);
}
function Tde(e, t) {
  let r;
  const a = [];
  for (let v = 0; v < e.length; v++) {
    const o = e[v], s = e[v].level;
    for (r = a.length - 1; r >= 0 && !(a[r].level <= s); r--)
      ;
    if (a.length = r + 1, o.type !== "text")
      continue;
    let n = o.content, l = 0, u = n.length;
    e:
      for (; l < u; ) {
        BN.lastIndex = l;
        const i = BN.exec(n);
        if (!i)
          break;
        let h = !0, p = !0;
        l = i.index + 1;
        const _ = i[0] === "'";
        let d = 32;
        if (i.index - 1 >= 0)
          d = n.charCodeAt(i.index - 1);
        else
          for (r = v - 1; r >= 0 && !(e[r].type === "softbreak" || e[r].type === "hardbreak"); r--)
            if (e[r].content) {
              d = e[r].content.charCodeAt(e[r].content.length - 1);
              break;
            }
        let f = 32;
        if (l < u)
          f = n.charCodeAt(l);
        else
          for (r = v + 1; r < e.length && !(e[r].type === "softbreak" || e[r].type === "hardbreak"); r++)
            if (e[r].content) {
              f = e[r].content.charCodeAt(0);
              break;
            }
        const c = gw(d) || mw(String.fromCharCode(d)), g = gw(f) || mw(String.fromCharCode(f)), m = pw(d), x = pw(f);
        if (x ? h = !1 : g && (m || c || (h = !1)), m ? p = !1 : c && (x || g || (p = !1)), f === 34 && i[0] === '"' && d >= 48 && d <= 57 && (p = h = !1), h && p && (h = c, p = g), !h && !p) {
          _ && (o.content = o6(o.content, i.index, jN));
          continue;
        }
        if (p)
          for (r = a.length - 1; r >= 0; r--) {
            let w = a[r];
            if (a[r].level < s)
              break;
            if (w.single === _ && a[r].level === s) {
              w = a[r];
              let k, S;
              _ ? (k = t.md.options.quotes[2], S = t.md.options.quotes[3]) : (k = t.md.options.quotes[0], S = t.md.options.quotes[1]), o.content = o6(o.content, i.index, S), e[w.token].content = o6(
                e[w.token].content,
                w.pos,
                k
              ), l += S.length - 1, w.token === v && (l += k.length - 1), n = o.content, u = n.length, a.length = r;
              continue e;
            }
          }
        h ? a.push({
          token: v,
          pos: i.index,
          single: _,
          level: s
        }) : p && _ && (o.content = o6(o.content, i.index, jN));
      }
  }
}
function Ade(e) {
  if (e.md.options.typographer)
    for (let t = e.tokens.length - 1; t >= 0; t--)
      e.tokens[t].type !== "inline" || !kde.test(e.tokens[t].content) || Tde(e.tokens[t].children, e);
}
function Sde(e) {
  let t, r;
  const a = e.tokens, v = a.length;
  for (let o = 0; o < v; o++) {
    if (a[o].type !== "inline") continue;
    const s = a[o].children, n = s.length;
    for (t = 0; t < n; t++)
      s[t].type === "text_special" && (s[t].type = "text");
    for (t = r = 0; t < n; t++)
      s[t].type === "text" && t + 1 < n && s[t + 1].type === "text" ? s[t + 1].content = s[t].content + s[t + 1].content : (t !== r && (s[r] = s[t]), r++);
    t !== r && (s.length = r);
  }
}
const _S = [
  ["normalize", cde],
  ["block", fde],
  ["inline", hde],
  ["linkify", mde],
  ["replacements", wde],
  ["smartquotes", Ade],
  // `text_join` finds `text_special` tokens (for escape sequences)
  // and joins them with the rest of the text
  ["text_join", Sde]
];
function bD() {
  this.ruler = new Lh();
  for (let e = 0; e < _S.length; e++)
    this.ruler.push(_S[e][0], _S[e][1]);
}
bD.prototype.process = function(e) {
  const t = this.ruler.getRules("");
  for (let r = 0, a = t.length; r < a; r++)
    t[r](e);
};
bD.prototype.State = tW;
function F0(e, t, r, a) {
  this.src = e, this.md = t, this.env = r, this.tokens = a, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
  const v = this.src;
  for (let o = 0, s = 0, n = 0, l = 0, u = v.length, i = !1; s < u; s++) {
    const h = v.charCodeAt(s);
    if (!i)
      if (cl(h)) {
        n++, h === 9 ? l += 4 - l % 4 : l++;
        continue;
      } else
        i = !0;
    (h === 10 || s === u - 1) && (h !== 10 && s++, this.bMarks.push(o), this.eMarks.push(s), this.tShift.push(n), this.sCount.push(l), this.bsCount.push(0), i = !1, n = 0, l = 0, o = s + 1);
  }
  this.bMarks.push(v.length), this.eMarks.push(v.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
}
F0.prototype.push = function(e, t, r) {
  const a = new Sp(e, t, r);
  return a.block = !0, r < 0 && this.level--, a.level = this.level, r > 0 && this.level++, this.tokens.push(a), a;
};
F0.prototype.isEmpty = function(t) {
  return this.bMarks[t] + this.tShift[t] >= this.eMarks[t];
};
F0.prototype.skipEmptyLines = function(t) {
  for (let r = this.lineMax; t < r && !(this.bMarks[t] + this.tShift[t] < this.eMarks[t]); t++)
    ;
  return t;
};
F0.prototype.skipSpaces = function(t) {
  for (let r = this.src.length; t < r; t++) {
    const a = this.src.charCodeAt(t);
    if (!cl(a))
      break;
  }
  return t;
};
F0.prototype.skipSpacesBack = function(t, r) {
  if (t <= r)
    return t;
  for (; t > r; )
    if (!cl(this.src.charCodeAt(--t)))
      return t + 1;
  return t;
};
F0.prototype.skipChars = function(t, r) {
  for (let a = this.src.length; t < a && this.src.charCodeAt(t) === r; t++)
    ;
  return t;
};
F0.prototype.skipCharsBack = function(t, r, a) {
  if (t <= a)
    return t;
  for (; t > a; )
    if (r !== this.src.charCodeAt(--t))
      return t + 1;
  return t;
};
F0.prototype.getLines = function(t, r, a, v) {
  if (t >= r)
    return "";
  const o = new Array(r - t);
  for (let s = 0, n = t; n < r; n++, s++) {
    let l = 0;
    const u = this.bMarks[n];
    let i = u, h;
    for (n + 1 < r || v ? h = this.eMarks[n] + 1 : h = this.eMarks[n]; i < h && l < a; ) {
      const p = this.src.charCodeAt(i);
      if (cl(p))
        p === 9 ? l += 4 - (l + this.bsCount[n]) % 4 : l++;
      else if (i - u < this.tShift[n])
        l++;
      else
        break;
      i++;
    }
    l > a ? o[s] = new Array(l - a + 1).join(" ") + this.src.slice(i, h) : o[s] = this.src.slice(i, h);
  }
  return o.join("");
};
F0.prototype.Token = Sp;
const Mde = 65536;
function wS(e, t) {
  const r = e.bMarks[t] + e.tShift[t], a = e.eMarks[t];
  return e.src.slice(r, a);
}
function UN(e) {
  const t = [], r = e.length;
  let a = 0, v = e.charCodeAt(a), o = !1, s = 0, n = "";
  for (; a < r; )
    v === 124 && (o ? (n += e.substring(s, a - 1), s = a) : (t.push(n + e.substring(s, a)), n = "", s = a + 1)), o = v === 92, a++, v = e.charCodeAt(a);
  return t.push(n + e.substring(s)), t;
}
function Ede(e, t, r, a) {
  if (t + 2 > r)
    return !1;
  let v = t + 1;
  if (e.sCount[v] < e.blkIndent || e.sCount[v] - e.blkIndent >= 4)
    return !1;
  let o = e.bMarks[v] + e.tShift[v];
  if (o >= e.eMarks[v])
    return !1;
  const s = e.src.charCodeAt(o++);
  if (s !== 124 && s !== 45 && s !== 58 || o >= e.eMarks[v])
    return !1;
  const n = e.src.charCodeAt(o++);
  if (n !== 124 && n !== 45 && n !== 58 && !cl(n) || s === 45 && cl(n))
    return !1;
  for (; o < e.eMarks[v]; ) {
    const w = e.src.charCodeAt(o);
    if (w !== 124 && w !== 45 && w !== 58 && !cl(w))
      return !1;
    o++;
  }
  let l = wS(e, t + 1), u = l.split("|");
  const i = [];
  for (let w = 0; w < u.length; w++) {
    const k = u[w].trim();
    if (!k) {
      if (w === 0 || w === u.length - 1)
        continue;
      return !1;
    }
    if (!/^:?-+:?$/.test(k))
      return !1;
    k.charCodeAt(k.length - 1) === 58 ? i.push(k.charCodeAt(0) === 58 ? "center" : "right") : k.charCodeAt(0) === 58 ? i.push("left") : i.push("");
  }
  if (l = wS(e, t).trim(), l.indexOf("|") === -1 || e.sCount[t] - e.blkIndent >= 4)
    return !1;
  u = UN(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop();
  const h = u.length;
  if (h === 0 || h !== i.length)
    return !1;
  if (a)
    return !0;
  const p = e.parentType;
  e.parentType = "table";
  const _ = e.md.block.ruler.getRules("blockquote"), d = e.push("table_open", "table", 1), f = [t, 0];
  d.map = f;
  const c = e.push("thead_open", "thead", 1);
  c.map = [t, t + 1];
  const g = e.push("tr_open", "tr", 1);
  g.map = [t, t + 1];
  for (let w = 0; w < u.length; w++) {
    const k = e.push("th_open", "th", 1);
    i[w] && (k.attrs = [["style", "text-align:" + i[w]]]);
    const S = e.push("inline", "", 0);
    S.content = u[w].trim(), S.children = [], e.push("th_close", "th", -1);
  }
  e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
  let m, x = 0;
  for (v = t + 2; v < r && !(e.sCount[v] < e.blkIndent); v++) {
    let w = !1;
    for (let S = 0, A = _.length; S < A; S++)
      if (_[S](e, v, r, !0)) {
        w = !0;
        break;
      }
    if (w || (l = wS(e, v).trim(), !l) || e.sCount[v] - e.blkIndent >= 4 || (u = UN(l), u.length && u[0] === "" && u.shift(), u.length && u[u.length - 1] === "" && u.pop(), x += h - u.length, x > Mde))
      break;
    if (v === t + 2) {
      const S = e.push("tbody_open", "tbody", 1);
      S.map = m = [t + 2, 0];
    }
    const k = e.push("tr_open", "tr", 1);
    k.map = [v, v + 1];
    for (let S = 0; S < h; S++) {
      const A = e.push("td_open", "td", 1);
      i[S] && (A.attrs = [["style", "text-align:" + i[S]]]);
      const C = e.push("inline", "", 0);
      C.content = u[S] ? u[S].trim() : "", C.children = [], e.push("td_close", "td", -1);
    }
    e.push("tr_close", "tr", -1);
  }
  return m && (e.push("tbody_close", "tbody", -1), m[1] = v), e.push("table_close", "table", -1), f[1] = v, e.parentType = p, e.line = v, !0;
}
function Cde(e, t, r) {
  if (e.sCount[t] - e.blkIndent < 4)
    return !1;
  let a = t + 1, v = a;
  for (; a < r; ) {
    if (e.isEmpty(a)) {
      a++;
      continue;
    }
    if (e.sCount[a] - e.blkIndent >= 4) {
      a++, v = a;
      continue;
    }
    break;
  }
  e.line = v;
  const o = e.push("code_block", "code", 0);
  return o.content = e.getLines(t, v, 4 + e.blkIndent, !1) + `
`, o.map = [t, e.line], !0;
}
function Ide(e, t, r, a) {
  let v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t];
  if (e.sCount[t] - e.blkIndent >= 4 || v + 3 > o)
    return !1;
  const s = e.src.charCodeAt(v);
  if (s !== 126 && s !== 96)
    return !1;
  let n = v;
  v = e.skipChars(v, s);
  let l = v - n;
  if (l < 3)
    return !1;
  const u = e.src.slice(n, v), i = e.src.slice(v, o);
  if (s === 96 && i.indexOf(String.fromCharCode(s)) >= 0)
    return !1;
  if (a)
    return !0;
  let h = t, p = !1;
  for (; h++, !(h >= r || (v = n = e.bMarks[h] + e.tShift[h], o = e.eMarks[h], v < o && e.sCount[h] < e.blkIndent)); )
    if (e.src.charCodeAt(v) === s && !(e.sCount[h] - e.blkIndent >= 4) && (v = e.skipChars(v, s), !(v - n < l) && (v = e.skipSpaces(v), !(v < o)))) {
      p = !0;
      break;
    }
  l = e.sCount[t], e.line = h + (p ? 1 : 0);
  const _ = e.push("fence", "code", 0);
  return _.info = i, _.content = e.getLines(t + 1, h, l, !0), _.markup = u, _.map = [t, e.line], !0;
}
function Dde(e, t, r, a) {
  let v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t];
  const s = e.lineMax;
  if (e.sCount[t] - e.blkIndent >= 4 || e.src.charCodeAt(v) !== 62)
    return !1;
  if (a)
    return !0;
  const n = [], l = [], u = [], i = [], h = e.md.block.ruler.getRules("blockquote"), p = e.parentType;
  e.parentType = "blockquote";
  let _ = !1, d;
  for (d = t; d < r; d++) {
    const x = e.sCount[d] < e.blkIndent;
    if (v = e.bMarks[d] + e.tShift[d], o = e.eMarks[d], v >= o)
      break;
    if (e.src.charCodeAt(v++) === 62 && !x) {
      let k = e.sCount[d] + 1, S, A;
      e.src.charCodeAt(v) === 32 ? (v++, k++, A = !1, S = !0) : e.src.charCodeAt(v) === 9 ? (S = !0, (e.bsCount[d] + k) % 4 === 3 ? (v++, k++, A = !1) : A = !0) : S = !1;
      let C = k;
      for (n.push(e.bMarks[d]), e.bMarks[d] = v; v < o; ) {
        const D = e.src.charCodeAt(v);
        if (cl(D))
          D === 9 ? C += 4 - (C + e.bsCount[d] + (A ? 1 : 0)) % 4 : C++;
        else
          break;
        v++;
      }
      _ = v >= o, l.push(e.bsCount[d]), e.bsCount[d] = e.sCount[d] + 1 + (S ? 1 : 0), u.push(e.sCount[d]), e.sCount[d] = C - k, i.push(e.tShift[d]), e.tShift[d] = v - e.bMarks[d];
      continue;
    }
    if (_)
      break;
    let w = !1;
    for (let k = 0, S = h.length; k < S; k++)
      if (h[k](e, d, r, !0)) {
        w = !0;
        break;
      }
    if (w) {
      e.lineMax = d, e.blkIndent !== 0 && (n.push(e.bMarks[d]), l.push(e.bsCount[d]), i.push(e.tShift[d]), u.push(e.sCount[d]), e.sCount[d] -= e.blkIndent);
      break;
    }
    n.push(e.bMarks[d]), l.push(e.bsCount[d]), i.push(e.tShift[d]), u.push(e.sCount[d]), e.sCount[d] = -1;
  }
  const f = e.blkIndent;
  e.blkIndent = 0;
  const c = e.push("blockquote_open", "blockquote", 1);
  c.markup = ">";
  const g = [t, 0];
  c.map = g, e.md.block.tokenize(e, t, d);
  const m = e.push("blockquote_close", "blockquote", -1);
  m.markup = ">", e.lineMax = s, e.parentType = p, g[1] = e.line;
  for (let x = 0; x < i.length; x++)
    e.bMarks[x + t] = n[x], e.tShift[x + t] = i[x], e.sCount[x + t] = u[x], e.bsCount[x + t] = l[x];
  return e.blkIndent = f, !0;
}
function Lde(e, t, r, a) {
  const v = e.eMarks[t];
  if (e.sCount[t] - e.blkIndent >= 4)
    return !1;
  let o = e.bMarks[t] + e.tShift[t];
  const s = e.src.charCodeAt(o++);
  if (s !== 42 && s !== 45 && s !== 95)
    return !1;
  let n = 1;
  for (; o < v; ) {
    const u = e.src.charCodeAt(o++);
    if (u !== s && !cl(u))
      return !1;
    u === s && n++;
  }
  if (n < 3)
    return !1;
  if (a)
    return !0;
  e.line = t + 1;
  const l = e.push("hr", "hr", 0);
  return l.map = [t, e.line], l.markup = Array(n + 1).join(String.fromCharCode(s)), !0;
}
function VN(e, t) {
  const r = e.eMarks[t];
  let a = e.bMarks[t] + e.tShift[t];
  const v = e.src.charCodeAt(a++);
  if (v !== 42 && v !== 45 && v !== 43)
    return -1;
  if (a < r) {
    const o = e.src.charCodeAt(a);
    if (!cl(o))
      return -1;
  }
  return a;
}
function $N(e, t) {
  const r = e.bMarks[t] + e.tShift[t], a = e.eMarks[t];
  let v = r;
  if (v + 1 >= a)
    return -1;
  let o = e.src.charCodeAt(v++);
  if (o < 48 || o > 57)
    return -1;
  for (; ; ) {
    if (v >= a)
      return -1;
    if (o = e.src.charCodeAt(v++), o >= 48 && o <= 57) {
      if (v - r >= 10)
        return -1;
      continue;
    }
    if (o === 41 || o === 46)
      break;
    return -1;
  }
  return v < a && (o = e.src.charCodeAt(v), !cl(o)) ? -1 : v;
}
function Pde(e, t) {
  const r = e.level + 2;
  for (let a = t + 2, v = e.tokens.length - 2; a < v; a++)
    e.tokens[a].level === r && e.tokens[a].type === "paragraph_open" && (e.tokens[a + 2].hidden = !0, e.tokens[a].hidden = !0, a += 2);
}
function Ode(e, t, r, a) {
  let v, o, s, n, l = t, u = !0;
  if (e.sCount[l] - e.blkIndent >= 4 || e.listIndent >= 0 && e.sCount[l] - e.listIndent >= 4 && e.sCount[l] < e.blkIndent)
    return !1;
  let i = !1;
  a && e.parentType === "paragraph" && e.sCount[l] >= e.blkIndent && (i = !0);
  let h, p, _;
  if ((_ = $N(e, l)) >= 0) {
    if (h = !0, s = e.bMarks[l] + e.tShift[l], p = Number(e.src.slice(s, _ - 1)), i && p !== 1) return !1;
  } else if ((_ = VN(e, l)) >= 0)
    h = !1;
  else
    return !1;
  if (i && e.skipSpaces(_) >= e.eMarks[l])
    return !1;
  if (a)
    return !0;
  const d = e.src.charCodeAt(_ - 1), f = e.tokens.length;
  h ? (n = e.push("ordered_list_open", "ol", 1), p !== 1 && (n.attrs = [["start", p]])) : n = e.push("bullet_list_open", "ul", 1);
  const c = [l, 0];
  n.map = c, n.markup = String.fromCharCode(d);
  let g = !1;
  const m = e.md.block.ruler.getRules("list"), x = e.parentType;
  for (e.parentType = "list"; l < r; ) {
    o = _, v = e.eMarks[l];
    const w = e.sCount[l] + _ - (e.bMarks[l] + e.tShift[l]);
    let k = w;
    for (; o < v; ) {
      const O = e.src.charCodeAt(o);
      if (O === 9)
        k += 4 - (k + e.bsCount[l]) % 4;
      else if (O === 32)
        k++;
      else
        break;
      o++;
    }
    const S = o;
    let A;
    S >= v ? A = 1 : A = k - w, A > 4 && (A = 1);
    const C = w + A;
    n = e.push("list_item_open", "li", 1), n.markup = String.fromCharCode(d);
    const D = [l, 0];
    n.map = D, h && (n.info = e.src.slice(s, _ - 1));
    const L = e.tight, E = e.tShift[l], P = e.sCount[l], I = e.listIndent;
    if (e.listIndent = e.blkIndent, e.blkIndent = C, e.tight = !0, e.tShift[l] = S - e.bMarks[l], e.sCount[l] = k, S >= v && e.isEmpty(l + 1) ? e.line = Math.min(e.line + 2, r) : e.md.block.tokenize(e, l, r, !0), (!e.tight || g) && (u = !1), g = e.line - l > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = I, e.tShift[l] = E, e.sCount[l] = P, e.tight = L, n = e.push("list_item_close", "li", -1), n.markup = String.fromCharCode(d), l = e.line, D[1] = l, l >= r || e.sCount[l] < e.blkIndent || e.sCount[l] - e.blkIndent >= 4)
      break;
    let M = !1;
    for (let O = 0, T = m.length; O < T; O++)
      if (m[O](e, l, r, !0)) {
        M = !0;
        break;
      }
    if (M)
      break;
    if (h) {
      if (_ = $N(e, l), _ < 0)
        break;
      s = e.bMarks[l] + e.tShift[l];
    } else if (_ = VN(e, l), _ < 0)
      break;
    if (d !== e.src.charCodeAt(_ - 1))
      break;
  }
  return h ? n = e.push("ordered_list_close", "ol", -1) : n = e.push("bullet_list_close", "ul", -1), n.markup = String.fromCharCode(d), c[1] = l, e.line = l, e.parentType = x, u && Pde(e, f), !0;
}
function zde(e, t, r, a) {
  let v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t], s = t + 1;
  if (e.sCount[t] - e.blkIndent >= 4 || e.src.charCodeAt(v) !== 91)
    return !1;
  function n(m) {
    const x = e.lineMax;
    if (m >= x || e.isEmpty(m))
      return null;
    let w = !1;
    if (e.sCount[m] - e.blkIndent > 3 && (w = !0), e.sCount[m] < 0 && (w = !0), !w) {
      const A = e.md.block.ruler.getRules("reference"), C = e.parentType;
      e.parentType = "reference";
      let D = !1;
      for (let L = 0, E = A.length; L < E; L++)
        if (A[L](e, m, x, !0)) {
          D = !0;
          break;
        }
      if (e.parentType = C, D)
        return null;
    }
    const k = e.bMarks[m] + e.tShift[m], S = e.eMarks[m];
    return e.src.slice(k, S + 1);
  }
  let l = e.src.slice(v, o + 1);
  o = l.length;
  let u = -1;
  for (v = 1; v < o; v++) {
    const m = l.charCodeAt(v);
    if (m === 91)
      return !1;
    if (m === 93) {
      u = v;
      break;
    } else if (m === 10) {
      const x = n(s);
      x !== null && (l += x, o = l.length, s++);
    } else if (m === 92 && (v++, v < o && l.charCodeAt(v) === 10)) {
      const x = n(s);
      x !== null && (l += x, o = l.length, s++);
    }
  }
  if (u < 0 || l.charCodeAt(u + 1) !== 58)
    return !1;
  for (v = u + 2; v < o; v++) {
    const m = l.charCodeAt(v);
    if (m === 10) {
      const x = n(s);
      x !== null && (l += x, o = l.length, s++);
    } else if (!cl(m)) break;
  }
  const i = e.md.helpers.parseLinkDestination(l, v, o);
  if (!i.ok)
    return !1;
  const h = e.md.normalizeLink(i.str);
  if (!e.md.validateLink(h))
    return !1;
  v = i.pos;
  const p = v, _ = s, d = v;
  for (; v < o; v++) {
    const m = l.charCodeAt(v);
    if (m === 10) {
      const x = n(s);
      x !== null && (l += x, o = l.length, s++);
    } else if (!cl(m)) break;
  }
  let f = e.md.helpers.parseLinkTitle(l, v, o);
  for (; f.can_continue; ) {
    const m = n(s);
    if (m === null) break;
    l += m, v = o, o = l.length, s++, f = e.md.helpers.parseLinkTitle(l, v, o, f);
  }
  let c;
  for (v < o && d !== v && f.ok ? (c = f.str, v = f.pos) : (c = "", v = p, s = _); v < o; ) {
    const m = l.charCodeAt(v);
    if (!cl(m))
      break;
    v++;
  }
  if (v < o && l.charCodeAt(v) !== 10 && c)
    for (c = "", v = p, s = _; v < o; ) {
      const m = l.charCodeAt(v);
      if (!cl(m))
        break;
      v++;
    }
  if (v < o && l.charCodeAt(v) !== 10)
    return !1;
  const g = t9(l.slice(1, u));
  return g ? (a || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[g] > "u" && (e.env.references[g] = { title: c, href: h }), e.line = s), !0) : !1;
}
const Rde = [
  "address",
  "article",
  "aside",
  "base",
  "basefont",
  "blockquote",
  "body",
  "caption",
  "center",
  "col",
  "colgroup",
  "dd",
  "details",
  "dialog",
  "dir",
  "div",
  "dl",
  "dt",
  "fieldset",
  "figcaption",
  "figure",
  "footer",
  "form",
  "frame",
  "frameset",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "head",
  "header",
  "hr",
  "html",
  "iframe",
  "legend",
  "li",
  "link",
  "main",
  "menu",
  "menuitem",
  "nav",
  "noframes",
  "ol",
  "optgroup",
  "option",
  "p",
  "param",
  "search",
  "section",
  "summary",
  "table",
  "tbody",
  "td",
  "tfoot",
  "th",
  "thead",
  "title",
  "tr",
  "track",
  "ul"
], Fde = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Nde = "[^\"'=<>`\\x00-\\x20]+", Bde = "'[^']*'", jde = '"[^"]*"', Ude = "(?:" + Nde + "|" + Bde + "|" + jde + ")", Vde = "(?:\\s+" + Fde + "(?:\\s*=\\s*" + Ude + ")?)", rW = "<[A-Za-z][A-Za-z0-9\\-]*" + Vde + "*\\s*\\/?>", iW = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", $de = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", qde = "<[?][\\s\\S]*?[?]>", Hde = "<![A-Za-z][^>]*>", Gde = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", Wde = new RegExp("^(?:" + rW + "|" + iW + "|" + $de + "|" + qde + "|" + Hde + "|" + Gde + ")"), Yde = new RegExp("^(?:" + rW + "|" + iW + ")"), F2 = [
  [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
  [/^<!--/, /-->/, !0],
  [/^<\?/, /\?>/, !0],
  [/^<![A-Z]/, />/, !0],
  [/^<!\[CDATA\[/, /\]\]>/, !0],
  [new RegExp("^</?(" + Rde.join("|") + ")(?=(\\s|/?>|$))", "i"), /^$/, !0],
  [new RegExp(Yde.source + "\\s*$"), /^$/, !1]
];
function Zde(e, t, r, a) {
  let v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t];
  if (e.sCount[t] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(v) !== 60)
    return !1;
  let s = e.src.slice(v, o), n = 0;
  for (; n < F2.length && !F2[n][0].test(s); n++)
    ;
  if (n === F2.length)
    return !1;
  if (a)
    return F2[n][2];
  let l = t + 1;
  if (!F2[n][1].test(s)) {
    for (; l < r && !(e.sCount[l] < e.blkIndent); l++)
      if (v = e.bMarks[l] + e.tShift[l], o = e.eMarks[l], s = e.src.slice(v, o), F2[n][1].test(s)) {
        s.length !== 0 && l++;
        break;
      }
  }
  e.line = l;
  const u = e.push("html_block", "", 0);
  return u.map = [t, l], u.content = e.getLines(t, l, e.blkIndent, !0), !0;
}
function Xde(e, t, r, a) {
  let v = e.bMarks[t] + e.tShift[t], o = e.eMarks[t];
  if (e.sCount[t] - e.blkIndent >= 4)
    return !1;
  let s = e.src.charCodeAt(v);
  if (s !== 35 || v >= o)
    return !1;
  let n = 1;
  for (s = e.src.charCodeAt(++v); s === 35 && v < o && n <= 6; )
    n++, s = e.src.charCodeAt(++v);
  if (n > 6 || v < o && !cl(s))
    return !1;
  if (a)
    return !0;
  o = e.skipSpacesBack(o, v);
  const l = e.skipCharsBack(o, 35, v);
  l > v && cl(e.src.charCodeAt(l - 1)) && (o = l), e.line = t + 1;
  const u = e.push("heading_open", "h" + String(n), 1);
  u.markup = "########".slice(0, n), u.map = [t, e.line];
  const i = e.push("inline", "", 0);
  i.content = e.src.slice(v, o).trim(), i.map = [t, e.line], i.children = [];
  const h = e.push("heading_close", "h" + String(n), -1);
  return h.markup = "########".slice(0, n), !0;
}
function Kde(e, t, r) {
  const a = e.md.block.ruler.getRules("paragraph");
  if (e.sCount[t] - e.blkIndent >= 4)
    return !1;
  const v = e.parentType;
  e.parentType = "paragraph";
  let o = 0, s, n = t + 1;
  for (; n < r && !e.isEmpty(n); n++) {
    if (e.sCount[n] - e.blkIndent > 3)
      continue;
    if (e.sCount[n] >= e.blkIndent) {
      let _ = e.bMarks[n] + e.tShift[n];
      const d = e.eMarks[n];
      if (_ < d && (s = e.src.charCodeAt(_), (s === 45 || s === 61) && (_ = e.skipChars(_, s), _ = e.skipSpaces(_), _ >= d))) {
        o = s === 61 ? 1 : 2;
        break;
      }
    }
    if (e.sCount[n] < 0)
      continue;
    let p = !1;
    for (let _ = 0, d = a.length; _ < d; _++)
      if (a[_](e, n, r, !0)) {
        p = !0;
        break;
      }
    if (p)
      break;
  }
  if (!o)
    return !1;
  const l = e.getLines(t, n, e.blkIndent, !1).trim();
  e.line = n + 1;
  const u = e.push("heading_open", "h" + String(o), 1);
  u.markup = String.fromCharCode(s), u.map = [t, e.line];
  const i = e.push("inline", "", 0);
  i.content = l, i.map = [t, e.line - 1], i.children = [];
  const h = e.push("heading_close", "h" + String(o), -1);
  return h.markup = String.fromCharCode(s), e.parentType = v, !0;
}
function Jde(e, t, r) {
  const a = e.md.block.ruler.getRules("paragraph"), v = e.parentType;
  let o = t + 1;
  for (e.parentType = "paragraph"; o < r && !e.isEmpty(o); o++) {
    if (e.sCount[o] - e.blkIndent > 3 || e.sCount[o] < 0)
      continue;
    let u = !1;
    for (let i = 0, h = a.length; i < h; i++)
      if (a[i](e, o, r, !0)) {
        u = !0;
        break;
      }
    if (u)
      break;
  }
  const s = e.getLines(t, o, e.blkIndent, !1).trim();
  e.line = o;
  const n = e.push("paragraph_open", "p", 1);
  n.map = [t, e.line];
  const l = e.push("inline", "", 0);
  return l.content = s, l.map = [t, e.line], l.children = [], e.push("paragraph_close", "p", -1), e.parentType = v, !0;
}
const s6 = [
  // First 2 params - rule name & source. Secondary array - list of rules,
  // which can be terminated by this one.
  ["table", Ede, ["paragraph", "reference"]],
  ["code", Cde],
  ["fence", Ide, ["paragraph", "reference", "blockquote", "list"]],
  ["blockquote", Dde, ["paragraph", "reference", "blockquote", "list"]],
  ["hr", Lde, ["paragraph", "reference", "blockquote", "list"]],
  ["list", Ode, ["paragraph", "reference", "blockquote"]],
  ["reference", zde],
  ["html_block", Zde, ["paragraph", "reference", "blockquote"]],
  ["heading", Xde, ["paragraph", "reference", "blockquote"]],
  ["lheading", Kde],
  ["paragraph", Jde]
];
function n9() {
  this.ruler = new Lh();
  for (let e = 0; e < s6.length; e++)
    this.ruler.push(s6[e][0], s6[e][1], { alt: (s6[e][2] || []).slice() });
}
n9.prototype.tokenize = function(e, t, r) {
  const a = this.ruler.getRules(""), v = a.length, o = e.md.options.maxNesting;
  let s = t, n = !1;
  for (; s < r && (e.line = s = e.skipEmptyLines(s), !(s >= r || e.sCount[s] < e.blkIndent)); ) {
    if (e.level >= o) {
      e.line = r;
      break;
    }
    const l = e.line;
    let u = !1;
    for (let i = 0; i < v; i++)
      if (u = a[i](e, s, r, !1), u) {
        if (l >= e.line)
          throw new Error("block rule didn't increment state.line");
        break;
      }
    if (!u) throw new Error("none of the block rules matched");
    e.tight = !n, e.isEmpty(e.line - 1) && (n = !0), s = e.line, s < r && e.isEmpty(s) && (n = !0, s++, e.line = s);
  }
};
n9.prototype.parse = function(e, t, r, a) {
  if (!e)
    return;
  const v = new this.State(e, t, r, a);
  this.tokenize(v, v.line, v.lineMax);
};
n9.prototype.State = F0;
function r4(e, t, r, a) {
  this.src = e, this.env = r, this.md = t, this.tokens = a, this.tokens_meta = Array(a.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
}
r4.prototype.pushPending = function() {
  const e = new Sp("text", "", 0);
  return e.content = this.pending, e.level = this.pendingLevel, this.tokens.push(e), this.pending = "", e;
};
r4.prototype.push = function(e, t, r) {
  this.pending && this.pushPending();
  const a = new Sp(e, t, r);
  let v = null;
  return r < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), a.level = this.level, r > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], v = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(a), this.tokens_meta.push(v), a;
};
r4.prototype.scanDelims = function(e, t) {
  const r = this.posMax, a = this.src.charCodeAt(e), v = e > 0 ? this.src.charCodeAt(e - 1) : 32;
  let o = e;
  for (; o < r && this.src.charCodeAt(o) === a; )
    o++;
  const s = o - e, n = o < r ? this.src.charCodeAt(o) : 32, l = gw(v) || mw(String.fromCharCode(v)), u = gw(n) || mw(String.fromCharCode(n)), i = pw(v), h = pw(n), p = !h && (!u || i || l), _ = !i && (!l || h || u);
  return { can_open: p && (t || !_ || l), can_close: _ && (t || !p || u), length: s };
};
r4.prototype.Token = Sp;
function Qde(e) {
  switch (e) {
    case 10:
    case 33:
    case 35:
    case 36:
    case 37:
    case 38:
    case 42:
    case 43:
    case 45:
    case 58:
    case 60:
    case 61:
    case 62:
    case 64:
    case 91:
    case 92:
    case 93:
    case 94:
    case 95:
    case 96:
    case 123:
    case 125:
    case 126:
      return !0;
    default:
      return !1;
  }
}
function epe(e, t) {
  let r = e.pos;
  for (; r < e.posMax && !Qde(e.src.charCodeAt(r)); )
    r++;
  return r === e.pos ? !1 : (t || (e.pending += e.src.slice(e.pos, r)), e.pos = r, !0);
}
const tpe = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
function npe(e, t) {
  if (!e.md.options.linkify || e.linkLevel > 0) return !1;
  const r = e.pos, a = e.posMax;
  if (r + 3 > a || e.src.charCodeAt(r) !== 58 || e.src.charCodeAt(r + 1) !== 47 || e.src.charCodeAt(r + 2) !== 47) return !1;
  const v = e.pending.match(tpe);
  if (!v) return !1;
  const o = v[1], s = e.md.linkify.matchAtStart(e.src.slice(r - o.length));
  if (!s) return !1;
  let n = s.url;
  if (n.length <= o.length) return !1;
  n = n.replace(/\*+$/, "");
  const l = e.md.normalizeLink(n);
  if (!e.md.validateLink(l)) return !1;
  if (!t) {
    e.pending = e.pending.slice(0, -o.length);
    const u = e.push("link_open", "a", 1);
    u.attrs = [["href", l]], u.markup = "linkify", u.info = "auto";
    const i = e.push("text", "", 0);
    i.content = e.md.normalizeLinkText(n);
    const h = e.push("link_close", "a", -1);
    h.markup = "linkify", h.info = "auto";
  }
  return e.pos += n.length - o.length, !0;
}
function rpe(e, t) {
  let r = e.pos;
  if (e.src.charCodeAt(r) !== 10)
    return !1;
  const a = e.pending.length - 1, v = e.posMax;
  if (!t)
    if (a >= 0 && e.pending.charCodeAt(a) === 32)
      if (a >= 1 && e.pending.charCodeAt(a - 1) === 32) {
        let o = a - 1;
        for (; o >= 1 && e.pending.charCodeAt(o - 1) === 32; ) o--;
        e.pending = e.pending.slice(0, o), e.push("hardbreak", "br", 0);
      } else
        e.pending = e.pending.slice(0, -1), e.push("softbreak", "br", 0);
    else
      e.push("softbreak", "br", 0);
  for (r++; r < v && cl(e.src.charCodeAt(r)); )
    r++;
  return e.pos = r, !0;
}
const _D = [];
for (let e = 0; e < 256; e++)
  _D.push(0);
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e) {
  _D[e.charCodeAt(0)] = 1;
});
function ipe(e, t) {
  let r = e.pos;
  const a = e.posMax;
  if (e.src.charCodeAt(r) !== 92 || (r++, r >= a)) return !1;
  let v = e.src.charCodeAt(r);
  if (v === 10) {
    for (t || e.push("hardbreak", "br", 0), r++; r < a && (v = e.src.charCodeAt(r), !!cl(v)); )
      r++;
    return e.pos = r, !0;
  }
  let o = e.src[r];
  if (v >= 55296 && v <= 56319 && r + 1 < a) {
    const n = e.src.charCodeAt(r + 1);
    n >= 56320 && n <= 57343 && (o += e.src[r + 1], r++);
  }
  const s = "\\" + o;
  if (!t) {
    const n = e.push("text_special", "", 0);
    v < 256 && _D[v] !== 0 ? n.content = o : n.content = s, n.markup = s, n.info = "escape";
  }
  return e.pos = r + 1, !0;
}
function ape(e, t) {
  let r = e.pos;
  if (e.src.charCodeAt(r) !== 96)
    return !1;
  const v = r;
  r++;
  const o = e.posMax;
  for (; r < o && e.src.charCodeAt(r) === 96; )
    r++;
  const s = e.src.slice(v, r), n = s.length;
  if (e.backticksScanned && (e.backticks[n] || 0) <= v)
    return t || (e.pending += s), e.pos += n, !0;
  let l = r, u;
  for (; (u = e.src.indexOf("`", l)) !== -1; ) {
    for (l = u + 1; l < o && e.src.charCodeAt(l) === 96; )
      l++;
    const i = l - u;
    if (i === n) {
      if (!t) {
        const h = e.push("code_inline", "code", 0);
        h.markup = s, h.content = e.src.slice(r, u).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
      }
      return e.pos = l, !0;
    }
    e.backticks[i] = u;
  }
  return e.backticksScanned = !0, t || (e.pending += s), e.pos += n, !0;
}
function ope(e, t) {
  const r = e.pos, a = e.src.charCodeAt(r);
  if (t || a !== 126)
    return !1;
  const v = e.scanDelims(e.pos, !0);
  let o = v.length;
  const s = String.fromCharCode(a);
  if (o < 2)
    return !1;
  let n;
  o % 2 && (n = e.push("text", "", 0), n.content = s, o--);
  for (let l = 0; l < o; l += 2)
    n = e.push("text", "", 0), n.content = s + s, e.delimiters.push({
      marker: a,
      length: 0,
      // disable "rule of 3" length checks meant for emphasis
      token: e.tokens.length - 1,
      end: -1,
      open: v.can_open,
      close: v.can_close
    });
  return e.pos += v.length, !0;
}
function qN(e, t) {
  let r;
  const a = [], v = t.length;
  for (let o = 0; o < v; o++) {
    const s = t[o];
    if (s.marker !== 126 || s.end === -1)
      continue;
    const n = t[s.end];
    r = e.tokens[s.token], r.type = "s_open", r.tag = "s", r.nesting = 1, r.markup = "~~", r.content = "", r = e.tokens[n.token], r.type = "s_close", r.tag = "s", r.nesting = -1, r.markup = "~~", r.content = "", e.tokens[n.token - 1].type === "text" && e.tokens[n.token - 1].content === "~" && a.push(n.token - 1);
  }
  for (; a.length; ) {
    const o = a.pop();
    let s = o + 1;
    for (; s < e.tokens.length && e.tokens[s].type === "s_close"; )
      s++;
    s--, o !== s && (r = e.tokens[s], e.tokens[s] = e.tokens[o], e.tokens[o] = r);
  }
}
function spe(e) {
  const t = e.tokens_meta, r = e.tokens_meta.length;
  qN(e, e.delimiters);
  for (let a = 0; a < r; a++)
    t[a] && t[a].delimiters && qN(e, t[a].delimiters);
}
const aW = {
  tokenize: ope,
  postProcess: spe
};
function lpe(e, t) {
  const r = e.pos, a = e.src.charCodeAt(r);
  if (t || a !== 95 && a !== 42)
    return !1;
  const v = e.scanDelims(e.pos, a === 42);
  for (let o = 0; o < v.length; o++) {
    const s = e.push("text", "", 0);
    s.content = String.fromCharCode(a), e.delimiters.push({
      // Char code of the starting marker (number).
      //
      marker: a,
      // Total length of these series of delimiters.
      //
      length: v.length,
      // A position of the token this delimiter corresponds to.
      //
      token: e.tokens.length - 1,
      // If this delimiter is matched as a valid opener, `end` will be
      // equal to its position, otherwise it's `-1`.
      //
      end: -1,
      // Boolean flags that determine if this delimiter could open or close
      // an emphasis.
      //
      open: v.can_open,
      close: v.can_close
    });
  }
  return e.pos += v.length, !0;
}
function HN(e, t) {
  const r = t.length;
  for (let a = r - 1; a >= 0; a--) {
    const v = t[a];
    if (v.marker !== 95 && v.marker !== 42 || v.end === -1)
      continue;
    const o = t[v.end], s = a > 0 && t[a - 1].end === v.end + 1 && // check that first two markers match and adjacent
    t[a - 1].marker === v.marker && t[a - 1].token === v.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
    t[v.end + 1].token === o.token + 1, n = String.fromCharCode(v.marker), l = e.tokens[v.token];
    l.type = s ? "strong_open" : "em_open", l.tag = s ? "strong" : "em", l.nesting = 1, l.markup = s ? n + n : n, l.content = "";
    const u = e.tokens[o.token];
    u.type = s ? "strong_close" : "em_close", u.tag = s ? "strong" : "em", u.nesting = -1, u.markup = s ? n + n : n, u.content = "", s && (e.tokens[t[a - 1].token].content = "", e.tokens[t[v.end + 1].token].content = "", a--);
  }
}
function upe(e) {
  const t = e.tokens_meta, r = e.tokens_meta.length;
  HN(e, e.delimiters);
  for (let a = 0; a < r; a++)
    t[a] && t[a].delimiters && HN(e, t[a].delimiters);
}
const oW = {
  tokenize: lpe,
  postProcess: upe
};
function cpe(e, t) {
  let r, a, v, o, s = "", n = "", l = e.pos, u = !0;
  if (e.src.charCodeAt(e.pos) !== 91)
    return !1;
  const i = e.pos, h = e.posMax, p = e.pos + 1, _ = e.md.helpers.parseLinkLabel(e, e.pos, !0);
  if (_ < 0)
    return !1;
  let d = _ + 1;
  if (d < h && e.src.charCodeAt(d) === 40) {
    for (u = !1, d++; d < h && (r = e.src.charCodeAt(d), !(!cl(r) && r !== 10)); d++)
      ;
    if (d >= h)
      return !1;
    if (l = d, v = e.md.helpers.parseLinkDestination(e.src, d, e.posMax), v.ok) {
      for (s = e.md.normalizeLink(v.str), e.md.validateLink(s) ? d = v.pos : s = "", l = d; d < h && (r = e.src.charCodeAt(d), !(!cl(r) && r !== 10)); d++)
        ;
      if (v = e.md.helpers.parseLinkTitle(e.src, d, e.posMax), d < h && l !== d && v.ok)
        for (n = v.str, d = v.pos; d < h && (r = e.src.charCodeAt(d), !(!cl(r) && r !== 10)); d++)
          ;
    }
    (d >= h || e.src.charCodeAt(d) !== 41) && (u = !0), d++;
  }
  if (u) {
    if (typeof e.env.references > "u")
      return !1;
    if (d < h && e.src.charCodeAt(d) === 91 ? (l = d + 1, d = e.md.helpers.parseLinkLabel(e, d), d >= 0 ? a = e.src.slice(l, d++) : d = _ + 1) : d = _ + 1, a || (a = e.src.slice(p, _)), o = e.env.references[t9(a)], !o)
      return e.pos = i, !1;
    s = o.href, n = o.title;
  }
  if (!t) {
    e.pos = p, e.posMax = _;
    const f = e.push("link_open", "a", 1), c = [["href", s]];
    f.attrs = c, n && c.push(["title", n]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
  }
  return e.pos = d, e.posMax = h, !0;
}
function fpe(e, t) {
  let r, a, v, o, s, n, l, u, i = "";
  const h = e.pos, p = e.posMax;
  if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
    return !1;
  const _ = e.pos + 2, d = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
  if (d < 0)
    return !1;
  if (o = d + 1, o < p && e.src.charCodeAt(o) === 40) {
    for (o++; o < p && (r = e.src.charCodeAt(o), !(!cl(r) && r !== 10)); o++)
      ;
    if (o >= p)
      return !1;
    for (u = o, n = e.md.helpers.parseLinkDestination(e.src, o, e.posMax), n.ok && (i = e.md.normalizeLink(n.str), e.md.validateLink(i) ? o = n.pos : i = ""), u = o; o < p && (r = e.src.charCodeAt(o), !(!cl(r) && r !== 10)); o++)
      ;
    if (n = e.md.helpers.parseLinkTitle(e.src, o, e.posMax), o < p && u !== o && n.ok)
      for (l = n.str, o = n.pos; o < p && (r = e.src.charCodeAt(o), !(!cl(r) && r !== 10)); o++)
        ;
    else
      l = "";
    if (o >= p || e.src.charCodeAt(o) !== 41)
      return e.pos = h, !1;
    o++;
  } else {
    if (typeof e.env.references > "u")
      return !1;
    if (o < p && e.src.charCodeAt(o) === 91 ? (u = o + 1, o = e.md.helpers.parseLinkLabel(e, o), o >= 0 ? v = e.src.slice(u, o++) : o = d + 1) : o = d + 1, v || (v = e.src.slice(_, d)), s = e.env.references[t9(v)], !s)
      return e.pos = h, !1;
    i = s.href, l = s.title;
  }
  if (!t) {
    a = e.src.slice(_, d);
    const f = [];
    e.md.inline.parse(
      a,
      e.md,
      e.env,
      f
    );
    const c = e.push("image", "img", 0), g = [["src", i], ["alt", ""]];
    c.attrs = g, c.children = f, c.content = a, l && g.push(["title", l]);
  }
  return e.pos = o, e.posMax = p, !0;
}
const hpe = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/, dpe = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
function ppe(e, t) {
  let r = e.pos;
  if (e.src.charCodeAt(r) !== 60)
    return !1;
  const a = e.pos, v = e.posMax;
  for (; ; ) {
    if (++r >= v) return !1;
    const s = e.src.charCodeAt(r);
    if (s === 60) return !1;
    if (s === 62) break;
  }
  const o = e.src.slice(a + 1, r);
  if (dpe.test(o)) {
    const s = e.md.normalizeLink(o);
    if (!e.md.validateLink(s))
      return !1;
    if (!t) {
      const n = e.push("link_open", "a", 1);
      n.attrs = [["href", s]], n.markup = "autolink", n.info = "auto";
      const l = e.push("text", "", 0);
      l.content = e.md.normalizeLinkText(o);
      const u = e.push("link_close", "a", -1);
      u.markup = "autolink", u.info = "auto";
    }
    return e.pos += o.length + 2, !0;
  }
  if (hpe.test(o)) {
    const s = e.md.normalizeLink("mailto:" + o);
    if (!e.md.validateLink(s))
      return !1;
    if (!t) {
      const n = e.push("link_open", "a", 1);
      n.attrs = [["href", s]], n.markup = "autolink", n.info = "auto";
      const l = e.push("text", "", 0);
      l.content = e.md.normalizeLinkText(o);
      const u = e.push("link_close", "a", -1);
      u.markup = "autolink", u.info = "auto";
    }
    return e.pos += o.length + 2, !0;
  }
  return !1;
}
function mpe(e) {
  return /^<a[>\s]/i.test(e);
}
function gpe(e) {
  return /^<\/a\s*>/i.test(e);
}
function ype(e) {
  const t = e | 32;
  return t >= 97 && t <= 122;
}
function vpe(e, t) {
  if (!e.md.options.html)
    return !1;
  const r = e.posMax, a = e.pos;
  if (e.src.charCodeAt(a) !== 60 || a + 2 >= r)
    return !1;
  const v = e.src.charCodeAt(a + 1);
  if (v !== 33 && v !== 63 && v !== 47 && !ype(v))
    return !1;
  const o = e.src.slice(a).match(Wde);
  if (!o)
    return !1;
  if (!t) {
    const s = e.push("html_inline", "", 0);
    s.content = o[0], mpe(s.content) && e.linkLevel++, gpe(s.content) && e.linkLevel--;
  }
  return e.pos += o[0].length, !0;
}
const xpe = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, bpe = /^&([a-z][a-z0-9]{1,31});/i;
function _pe(e, t) {
  const r = e.pos, a = e.posMax;
  if (e.src.charCodeAt(r) !== 38 || r + 1 >= a) return !1;
  if (e.src.charCodeAt(r + 1) === 35) {
    const o = e.src.slice(r).match(xpe);
    if (o) {
      if (!t) {
        const s = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), n = e.push("text_special", "", 0);
        n.content = xD(s) ? e7(s) : e7(65533), n.markup = o[0], n.info = "entity";
      }
      return e.pos += o[0].length, !0;
    }
  } else {
    const o = e.src.slice(r).match(bpe);
    if (o) {
      const s = JG(o[0]);
      if (s !== o[0]) {
        if (!t) {
          const n = e.push("text_special", "", 0);
          n.content = s, n.markup = o[0], n.info = "entity";
        }
        return e.pos += o[0].length, !0;
      }
    }
  }
  return !1;
}
function GN(e) {
  const t = {}, r = e.length;
  if (!r) return;
  let a = 0, v = -2;
  const o = [];
  for (let s = 0; s < r; s++) {
    const n = e[s];
    if (o.push(0), (e[a].marker !== n.marker || v !== n.token - 1) && (a = s), v = n.token, n.length = n.length || 0, !n.close) continue;
    t.hasOwnProperty(n.marker) || (t[n.marker] = [-1, -1, -1, -1, -1, -1]);
    const l = t[n.marker][(n.open ? 3 : 0) + n.length % 3];
    let u = a - o[a] - 1, i = u;
    for (; u > l; u -= o[u] + 1) {
      const h = e[u];
      if (h.marker === n.marker && h.open && h.end < 0) {
        let p = !1;
        if ((h.close || n.open) && (h.length + n.length) % 3 === 0 && (h.length % 3 !== 0 || n.length % 3 !== 0) && (p = !0), !p) {
          const _ = u > 0 && !e[u - 1].open ? o[u - 1] + 1 : 0;
          o[s] = s - u + _, o[u] = _, n.open = !1, h.end = s, h.close = !1, i = -1, v = -2;
          break;
        }
      }
    }
    i !== -1 && (t[n.marker][(n.open ? 3 : 0) + (n.length || 0) % 3] = i);
  }
}
function wpe(e) {
  const t = e.tokens_meta, r = e.tokens_meta.length;
  GN(e.delimiters);
  for (let a = 0; a < r; a++)
    t[a] && t[a].delimiters && GN(t[a].delimiters);
}
function kpe(e) {
  let t, r, a = 0;
  const v = e.tokens, o = e.tokens.length;
  for (t = r = 0; t < o; t++)
    v[t].nesting < 0 && a--, v[t].level = a, v[t].nesting > 0 && a++, v[t].type === "text" && t + 1 < o && v[t + 1].type === "text" ? v[t + 1].content = v[t].content + v[t + 1].content : (t !== r && (v[r] = v[t]), r++);
  t !== r && (v.length = r);
}
const kS = [
  ["text", epe],
  ["linkify", npe],
  ["newline", rpe],
  ["escape", ipe],
  ["backticks", ape],
  ["strikethrough", aW.tokenize],
  ["emphasis", oW.tokenize],
  ["link", cpe],
  ["image", fpe],
  ["autolink", ppe],
  ["html_inline", vpe],
  ["entity", _pe]
], TS = [
  ["balance_pairs", wpe],
  ["strikethrough", aW.postProcess],
  ["emphasis", oW.postProcess],
  // rules for pairs separate '**' into its own text tokens, which may be left unused,
  // rule below merges unused segments back with the rest of the text
  ["fragments_join", kpe]
];
function i4() {
  this.ruler = new Lh();
  for (let e = 0; e < kS.length; e++)
    this.ruler.push(kS[e][0], kS[e][1]);
  this.ruler2 = new Lh();
  for (let e = 0; e < TS.length; e++)
    this.ruler2.push(TS[e][0], TS[e][1]);
}
i4.prototype.skipToken = function(e) {
  const t = e.pos, r = this.ruler.getRules(""), a = r.length, v = e.md.options.maxNesting, o = e.cache;
  if (typeof o[t] < "u") {
    e.pos = o[t];
    return;
  }
  let s = !1;
  if (e.level < v) {
    for (let n = 0; n < a; n++)
      if (e.level++, s = r[n](e, !0), e.level--, s) {
        if (t >= e.pos)
          throw new Error("inline rule didn't increment state.pos");
        break;
      }
  } else
    e.pos = e.posMax;
  s || e.pos++, o[t] = e.pos;
};
i4.prototype.tokenize = function(e) {
  const t = this.ruler.getRules(""), r = t.length, a = e.posMax, v = e.md.options.maxNesting;
  for (; e.pos < a; ) {
    const o = e.pos;
    let s = !1;
    if (e.level < v) {
      for (let n = 0; n < r; n++)
        if (s = t[n](e, !1), s) {
          if (o >= e.pos)
            throw new Error("inline rule didn't increment state.pos");
          break;
        }
    }
    if (s) {
      if (e.pos >= a)
        break;
      continue;
    }
    e.pending += e.src[e.pos++];
  }
  e.pending && e.pushPending();
};
i4.prototype.parse = function(e, t, r, a) {
  const v = new this.State(e, t, r, a);
  this.tokenize(v);
  const o = this.ruler2.getRules(""), s = o.length;
  for (let n = 0; n < s; n++)
    o[n](v);
};
i4.prototype.State = r4;
function Tpe(e) {
  const t = {};
  e = e || {}, t.src_Any = WG.source, t.src_Cc = YG.source, t.src_Z = XG.source, t.src_P = yD.source, t.src_ZPCc = [t.src_Z, t.src_P, t.src_Cc].join("|"), t.src_ZCc = [t.src_Z, t.src_Cc].join("|");
  const r = "[><｜]";
  return t.src_pseudo_letter = "(?:(?!" + r + "|" + t.src_ZPCc + ")" + t.src_Any + ")", t.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", t.src_auth = "(?:(?:(?!" + t.src_ZCc + "|[@/\\[\\]()]).)+@)?", t.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", t.src_host_terminator = "(?=$|" + r + "|" + t.src_ZPCc + ")(?!" + (e["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + t.src_ZPCc + "))", t.src_path = "(?:[/?#](?:(?!" + t.src_ZCc + "|" + r + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + t.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + t.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + t.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + t.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + t.src_ZCc + "|[']).)+\\'|\\'(?=" + t.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + t.src_ZCc + "|[.]|$)|" + (e["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths
  ",(?!" + t.src_ZCc + "|$)|;(?!" + t.src_ZCc + "|$)|\\!+(?!" + t.src_ZCc + "|[!]|$)|\\?(?!" + t.src_ZCc + "|[?]|$))+|\\/)?", t.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', t.src_xn = "xn--[a-z0-9\\-]{1,59}", t.src_domain_root = // Allow letters & digits (http://test1)
  "(?:" + t.src_xn + "|" + t.src_pseudo_letter + "{1,63})", t.src_domain = "(?:" + t.src_xn + "|(?:" + t.src_pseudo_letter + ")|(?:" + t.src_pseudo_letter + "(?:-|" + t.src_pseudo_letter + "){0,61}" + t.src_pseudo_letter + "))", t.src_host = "(?:(?:(?:(?:" + t.src_domain + ")\\.)*" + t.src_domain + "))", t.tpl_host_fuzzy = "(?:" + t.src_ip4 + "|(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%)))", t.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + t.src_domain + ")\\.)+(?:%TLDS%))", t.src_host_strict = t.src_host + t.src_host_terminator, t.tpl_host_fuzzy_strict = t.tpl_host_fuzzy + t.src_host_terminator, t.src_host_port_strict = t.src_host + t.src_port + t.src_host_terminator, t.tpl_host_port_fuzzy_strict = t.tpl_host_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_port_no_ip_fuzzy_strict = t.tpl_host_no_ip_fuzzy + t.src_port + t.src_host_terminator, t.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + t.src_ZPCc + "|>|$))", t.tpl_email_fuzzy = "(^|" + r + '|"|\\(|' + t.src_ZCc + ")(" + t.src_email_name + "@" + t.tpl_host_fuzzy_strict + ")", t.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  "(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|" + t.src_ZPCc + "))((?![$+<=>^`|｜])" + t.tpl_host_port_fuzzy_strict + t.src_path + ")", t.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation.
  // but can start with > (markdown blockquote)
  "(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|" + t.src_ZPCc + "))((?![$+<=>^`|｜])" + t.tpl_host_port_no_ip_fuzzy_strict + t.src_path + ")", t;
}
function wE(e) {
  return Array.prototype.slice.call(arguments, 1).forEach(function(r) {
    r && Object.keys(r).forEach(function(a) {
      e[a] = r[a];
    });
  }), e;
}
function r9(e) {
  return Object.prototype.toString.call(e);
}
function Ape(e) {
  return r9(e) === "[object String]";
}
function Spe(e) {
  return r9(e) === "[object Object]";
}
function Mpe(e) {
  return r9(e) === "[object RegExp]";
}
function WN(e) {
  return r9(e) === "[object Function]";
}
function Epe(e) {
  return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
}
const sW = {
  fuzzyLink: !0,
  fuzzyEmail: !0,
  fuzzyIP: !1
};
function Cpe(e) {
  return Object.keys(e || {}).reduce(function(t, r) {
    return t || sW.hasOwnProperty(r);
  }, !1);
}
const Ipe = {
  "http:": {
    validate: function(e, t, r) {
      const a = e.slice(t);
      return r.re.http || (r.re.http = new RegExp(
        "^\\/\\/" + r.re.src_auth + r.re.src_host_port_strict + r.re.src_path,
        "i"
      )), r.re.http.test(a) ? a.match(r.re.http)[0].length : 0;
    }
  },
  "https:": "http:",
  "ftp:": "http:",
  "//": {
    validate: function(e, t, r) {
      const a = e.slice(t);
      return r.re.no_http || (r.re.no_http = new RegExp(
        "^" + r.re.src_auth + // Don't allow single-level domains, because of false positives like '//test'
        // with code comments
        "(?:localhost|(?:(?:" + r.re.src_domain + ")\\.)+" + r.re.src_domain_root + ")" + r.re.src_port + r.re.src_host_terminator + r.re.src_path,
        "i"
      )), r.re.no_http.test(a) ? t >= 3 && e[t - 3] === ":" || t >= 3 && e[t - 3] === "/" ? 0 : a.match(r.re.no_http)[0].length : 0;
    }
  },
  "mailto:": {
    validate: function(e, t, r) {
      const a = e.slice(t);
      return r.re.mailto || (r.re.mailto = new RegExp(
        "^" + r.re.src_email_name + "@" + r.re.src_host_strict,
        "i"
      )), r.re.mailto.test(a) ? a.match(r.re.mailto)[0].length : 0;
    }
  }
}, Dpe = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]", Lpe = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");
function Ppe(e) {
  e.__index__ = -1, e.__text_cache__ = "";
}
function Ope(e) {
  return function(t, r) {
    const a = t.slice(r);
    return e.test(a) ? a.match(e)[0].length : 0;
  };
}
function YN() {
  return function(e, t) {
    t.normalize(e);
  };
}
function t7(e) {
  const t = e.re = Tpe(e.__opts__), r = e.__tlds__.slice();
  e.onCompile(), e.__tlds_replaced__ || r.push(Dpe), r.push(t.src_xn), t.src_tlds = r.join("|");
  function a(n) {
    return n.replace("%TLDS%", t.src_tlds);
  }
  t.email_fuzzy = RegExp(a(t.tpl_email_fuzzy), "i"), t.link_fuzzy = RegExp(a(t.tpl_link_fuzzy), "i"), t.link_no_ip_fuzzy = RegExp(a(t.tpl_link_no_ip_fuzzy), "i"), t.host_fuzzy_test = RegExp(a(t.tpl_host_fuzzy_test), "i");
  const v = [];
  e.__compiled__ = {};
  function o(n, l) {
    throw new Error('(LinkifyIt) Invalid schema "' + n + '": ' + l);
  }
  Object.keys(e.__schemas__).forEach(function(n) {
    const l = e.__schemas__[n];
    if (l === null)
      return;
    const u = { validate: null, link: null };
    if (e.__compiled__[n] = u, Spe(l)) {
      Mpe(l.validate) ? u.validate = Ope(l.validate) : WN(l.validate) ? u.validate = l.validate : o(n, l), WN(l.normalize) ? u.normalize = l.normalize : l.normalize ? o(n, l) : u.normalize = YN();
      return;
    }
    if (Ape(l)) {
      v.push(n);
      return;
    }
    o(n, l);
  }), v.forEach(function(n) {
    e.__compiled__[e.__schemas__[n]] && (e.__compiled__[n].validate = e.__compiled__[e.__schemas__[n]].validate, e.__compiled__[n].normalize = e.__compiled__[e.__schemas__[n]].normalize);
  }), e.__compiled__[""] = { validate: null, normalize: YN() };
  const s = Object.keys(e.__compiled__).filter(function(n) {
    return n.length > 0 && e.__compiled__[n];
  }).map(Epe).join("|");
  e.re.schema_test = RegExp("(^|(?!_)(?:[><｜]|" + t.src_ZPCc + "))(" + s + ")", "i"), e.re.schema_search = RegExp("(^|(?!_)(?:[><｜]|" + t.src_ZPCc + "))(" + s + ")", "ig"), e.re.schema_at_start = RegExp("^" + e.re.schema_search.source, "i"), e.re.pretest = RegExp(
    "(" + e.re.schema_test.source + ")|(" + e.re.host_fuzzy_test.source + ")|@",
    "i"
  ), Ppe(e);
}
function zpe(e, t) {
  const r = e.__index__, a = e.__last_index__, v = e.__text_cache__.slice(r, a);
  this.schema = e.__schema__.toLowerCase(), this.index = r + t, this.lastIndex = a + t, this.raw = v, this.text = v, this.url = v;
}
function kE(e, t) {
  const r = new zpe(e, t);
  return e.__compiled__[r.schema].normalize(r, e), r;
}
function id(e, t) {
  if (!(this instanceof id))
    return new id(e, t);
  t || Cpe(e) && (t = e, e = {}), this.__opts__ = wE({}, sW, t), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = wE({}, Ipe, e), this.__compiled__ = {}, this.__tlds__ = Lpe, this.__tlds_replaced__ = !1, this.re = {}, t7(this);
}
id.prototype.add = function(t, r) {
  return this.__schemas__[t] = r, t7(this), this;
};
id.prototype.set = function(t) {
  return this.__opts__ = wE(this.__opts__, t), this;
};
id.prototype.test = function(t) {
  if (this.__text_cache__ = t, this.__index__ = -1, !t.length)
    return !1;
  let r, a, v, o, s, n, l, u, i;
  if (this.re.schema_test.test(t)) {
    for (l = this.re.schema_search, l.lastIndex = 0; (r = l.exec(t)) !== null; )
      if (o = this.testSchemaAt(t, r[2], l.lastIndex), o) {
        this.__schema__ = r[2], this.__index__ = r.index + r[1].length, this.__last_index__ = r.index + r[0].length + o;
        break;
      }
  }
  return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (u = t.search(this.re.host_fuzzy_test), u >= 0 && (this.__index__ < 0 || u < this.__index__) && (a = t.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (s = a.index + a[1].length, (this.__index__ < 0 || s < this.__index__) && (this.__schema__ = "", this.__index__ = s, this.__last_index__ = a.index + a[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (i = t.indexOf("@"), i >= 0 && (v = t.match(this.re.email_fuzzy)) !== null && (s = v.index + v[1].length, n = v.index + v[0].length, (this.__index__ < 0 || s < this.__index__ || s === this.__index__ && n > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = s, this.__last_index__ = n))), this.__index__ >= 0;
};
id.prototype.pretest = function(t) {
  return this.re.pretest.test(t);
};
id.prototype.testSchemaAt = function(t, r, a) {
  return this.__compiled__[r.toLowerCase()] ? this.__compiled__[r.toLowerCase()].validate(t, a, this) : 0;
};
id.prototype.match = function(t) {
  const r = [];
  let a = 0;
  this.__index__ >= 0 && this.__text_cache__ === t && (r.push(kE(this, a)), a = this.__last_index__);
  let v = a ? t.slice(a) : t;
  for (; this.test(v); )
    r.push(kE(this, a)), v = v.slice(this.__last_index__), a += this.__last_index__;
  return r.length ? r : null;
};
id.prototype.matchAtStart = function(t) {
  if (this.__text_cache__ = t, this.__index__ = -1, !t.length) return null;
  const r = this.re.schema_at_start.exec(t);
  if (!r) return null;
  const a = this.testSchemaAt(t, r[2], r[0].length);
  return a ? (this.__schema__ = r[2], this.__index__ = r.index + r[1].length, this.__last_index__ = r.index + r[0].length + a, kE(this, 0)) : null;
};
id.prototype.tlds = function(t, r) {
  return t = Array.isArray(t) ? t : [t], r ? (this.__tlds__ = this.__tlds__.concat(t).sort().filter(function(a, v, o) {
    return a !== o[v - 1];
  }).reverse(), t7(this), this) : (this.__tlds__ = t.slice(), this.__tlds_replaced__ = !0, t7(this), this);
};
id.prototype.normalize = function(t) {
  t.schema || (t.url = "http://" + t.url), t.schema === "mailto:" && !/^mailto:/i.test(t.url) && (t.url = "mailto:" + t.url);
};
id.prototype.onCompile = function() {
};
const dx = 2147483647, f0 = 36, wD = 1, yw = 26, Rpe = 38, Fpe = 700, lW = 72, uW = 128, cW = "-", Npe = /^xn--/, Bpe = /[^\0-\x7F]/, jpe = /[\x2E\u3002\uFF0E\uFF61]/g, Upe = {
  overflow: "Overflow: input needs wider integers to process",
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  "invalid-input": "Invalid input"
}, AS = f0 - wD, h0 = Math.floor, SS = String.fromCharCode;
function N1(e) {
  throw new RangeError(Upe[e]);
}
function Vpe(e, t) {
  const r = [];
  let a = e.length;
  for (; a--; )
    r[a] = t(e[a]);
  return r;
}
function fW(e, t) {
  const r = e.split("@");
  let a = "";
  r.length > 1 && (a = r[0] + "@", e = r[1]), e = e.replace(jpe, ".");
  const v = e.split("."), o = Vpe(v, t).join(".");
  return a + o;
}
function hW(e) {
  const t = [];
  let r = 0;
  const a = e.length;
  for (; r < a; ) {
    const v = e.charCodeAt(r++);
    if (v >= 55296 && v <= 56319 && r < a) {
      const o = e.charCodeAt(r++);
      (o & 64512) == 56320 ? t.push(((v & 1023) << 10) + (o & 1023) + 65536) : (t.push(v), r--);
    } else
      t.push(v);
  }
  return t;
}
const $pe = (e) => String.fromCodePoint(...e), qpe = function(e) {
  return e >= 48 && e < 58 ? 26 + (e - 48) : e >= 65 && e < 91 ? e - 65 : e >= 97 && e < 123 ? e - 97 : f0;
}, ZN = function(e, t) {
  return e + 22 + 75 * (e < 26) - ((t != 0) << 5);
}, dW = function(e, t, r) {
  let a = 0;
  for (e = r ? h0(e / Fpe) : e >> 1, e += h0(e / t); e > AS * yw >> 1; a += f0)
    e = h0(e / AS);
  return h0(a + (AS + 1) * e / (e + Rpe));
}, pW = function(e) {
  const t = [], r = e.length;
  let a = 0, v = uW, o = lW, s = e.lastIndexOf(cW);
  s < 0 && (s = 0);
  for (let n = 0; n < s; ++n)
    e.charCodeAt(n) >= 128 && N1("not-basic"), t.push(e.charCodeAt(n));
  for (let n = s > 0 ? s + 1 : 0; n < r; ) {
    const l = a;
    for (let i = 1, h = f0; ; h += f0) {
      n >= r && N1("invalid-input");
      const p = qpe(e.charCodeAt(n++));
      p >= f0 && N1("invalid-input"), p > h0((dx - a) / i) && N1("overflow"), a += p * i;
      const _ = h <= o ? wD : h >= o + yw ? yw : h - o;
      if (p < _)
        break;
      const d = f0 - _;
      i > h0(dx / d) && N1("overflow"), i *= d;
    }
    const u = t.length + 1;
    o = dW(a - l, u, l == 0), h0(a / u) > dx - v && N1("overflow"), v += h0(a / u), a %= u, t.splice(a++, 0, v);
  }
  return String.fromCodePoint(...t);
}, mW = function(e) {
  const t = [];
  e = hW(e);
  const r = e.length;
  let a = uW, v = 0, o = lW;
  for (const l of e)
    l < 128 && t.push(SS(l));
  const s = t.length;
  let n = s;
  for (s && t.push(cW); n < r; ) {
    let l = dx;
    for (const i of e)
      i >= a && i < l && (l = i);
    const u = n + 1;
    l - a > h0((dx - v) / u) && N1("overflow"), v += (l - a) * u, a = l;
    for (const i of e)
      if (i < a && ++v > dx && N1("overflow"), i === a) {
        let h = v;
        for (let p = f0; ; p += f0) {
          const _ = p <= o ? wD : p >= o + yw ? yw : p - o;
          if (h < _)
            break;
          const d = h - _, f = f0 - _;
          t.push(
            SS(ZN(_ + d % f, 0))
          ), h = h0(d / f);
        }
        t.push(SS(ZN(h, 0))), o = dW(v, u, n === s), v = 0, ++n;
      }
    ++v, ++a;
  }
  return t.join("");
}, Hpe = function(e) {
  return fW(e, function(t) {
    return Npe.test(t) ? pW(t.slice(4).toLowerCase()) : t;
  });
}, Gpe = function(e) {
  return fW(e, function(t) {
    return Bpe.test(t) ? "xn--" + mW(t) : t;
  });
}, gW = {
  /**
   * A string representing the current Punycode.js version number.
   * @memberOf punycode
   * @type String
   */
  version: "2.3.1",
  /**
   * An object of methods to convert from JavaScript's internal character
   * representation (UCS-2) to Unicode code points, and back.
   * @see <https://mathiasbynens.be/notes/javascript-encoding>
   * @memberOf punycode
   * @type Object
   */
  ucs2: {
    decode: hW,
    encode: $pe
  },
  decode: pW,
  encode: mW,
  toASCII: Gpe,
  toUnicode: Hpe
}, Wpe = {
  options: {
    // Enable HTML tags in source
    html: !1,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !1,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 100
  },
  components: {
    core: {},
    block: {},
    inline: {}
  }
}, Ype = {
  options: {
    // Enable HTML tags in source
    html: !1,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !1,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: [
        "normalize",
        "block",
        "inline",
        "text_join"
      ]
    },
    block: {
      rules: [
        "paragraph"
      ]
    },
    inline: {
      rules: [
        "text"
      ],
      rules2: [
        "balance_pairs",
        "fragments_join"
      ]
    }
  }
}, Zpe = {
  options: {
    // Enable HTML tags in source
    html: !0,
    // Use '/' to close single tags (<br />)
    xhtmlOut: !0,
    // Convert '\n' in paragraphs into <br>
    breaks: !1,
    // CSS language prefix for fenced blocks
    langPrefix: "language-",
    // autoconvert URL-like texts to links
    linkify: !1,
    // Enable some language-neutral replacements + quotes beautification
    typographer: !1,
    // Double + single quotes replacement pairs, when typographer enabled,
    // and smartquotes on. Could be either a String or an Array.
    //
    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
    // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
    quotes: "“”‘’",
    /* “”‘’ */
    // Highlighter function. Should return escaped HTML,
    // or '' if the source string is not changed and should be escaped externaly.
    // If result starts with <pre... internal wrapper is skipped.
    //
    // function (/*str, lang*/) { return ''; }
    //
    highlight: null,
    // Internal protection, recursion limit
    maxNesting: 20
  },
  components: {
    core: {
      rules: [
        "normalize",
        "block",
        "inline",
        "text_join"
      ]
    },
    block: {
      rules: [
        "blockquote",
        "code",
        "fence",
        "heading",
        "hr",
        "html_block",
        "lheading",
        "list",
        "reference",
        "paragraph"
      ]
    },
    inline: {
      rules: [
        "autolink",
        "backticks",
        "emphasis",
        "entity",
        "escape",
        "html_inline",
        "image",
        "link",
        "newline",
        "text"
      ],
      rules2: [
        "balance_pairs",
        "emphasis",
        "fragments_join"
      ]
    }
  }
}, Xpe = {
  default: Wpe,
  zero: Ype,
  commonmark: Zpe
}, Kpe = /^(vbscript|javascript|file|data):/, Jpe = /^data:image\/(gif|png|jpeg|webp);/;
function Qpe(e) {
  const t = e.trim().toLowerCase();
  return Kpe.test(t) ? Jpe.test(t) : !0;
}
const yW = ["http:", "https:", "mailto:"];
function e0e(e) {
  const t = gD(e, !0);
  if (t.hostname && (!t.protocol || yW.indexOf(t.protocol) >= 0))
    try {
      t.hostname = gW.toASCII(t.hostname);
    } catch {
    }
  return n4(mD(t));
}
function t0e(e) {
  const t = gD(e, !0);
  if (t.hostname && (!t.protocol || yW.indexOf(t.protocol) >= 0))
    try {
      t.hostname = gW.toUnicode(t.hostname);
    } catch {
    }
  return Mx(mD(t), Mx.defaultChars + "%");
}
function Id(e, t) {
  if (!(this instanceof Id))
    return new Id(e, t);
  t || vD(e) || (t = e || {}, e = "default"), this.inline = new i4(), this.block = new n9(), this.core = new bD(), this.renderer = new yb(), this.linkify = new id(), this.validateLink = Qpe, this.normalizeLink = e0e, this.normalizeLinkText = t0e, this.utils = rde, this.helpers = e9({}, sde), this.options = {}, this.configure(e), t && this.set(t);
}
Id.prototype.set = function(e) {
  return e9(this.options, e), this;
};
Id.prototype.configure = function(e) {
  const t = this;
  if (vD(e)) {
    const r = e;
    if (e = Xpe[r], !e)
      throw new Error('Wrong `markdown-it` preset "' + r + '", check name');
  }
  if (!e)
    throw new Error("Wrong `markdown-it` preset, can't be empty");
  return e.options && t.set(e.options), e.components && Object.keys(e.components).forEach(function(r) {
    e.components[r].rules && t[r].ruler.enableOnly(e.components[r].rules), e.components[r].rules2 && t[r].ruler2.enableOnly(e.components[r].rules2);
  }), this;
};
Id.prototype.enable = function(e, t) {
  let r = [];
  Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(v) {
    r = r.concat(this[v].ruler.enable(e, !0));
  }, this), r = r.concat(this.inline.ruler2.enable(e, !0));
  const a = e.filter(function(v) {
    return r.indexOf(v) < 0;
  });
  if (a.length && !t)
    throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + a);
  return this;
};
Id.prototype.disable = function(e, t) {
  let r = [];
  Array.isArray(e) || (e = [e]), ["core", "block", "inline"].forEach(function(v) {
    r = r.concat(this[v].ruler.disable(e, !0));
  }, this), r = r.concat(this.inline.ruler2.disable(e, !0));
  const a = e.filter(function(v) {
    return r.indexOf(v) < 0;
  });
  if (a.length && !t)
    throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + a);
  return this;
};
Id.prototype.use = function(e) {
  const t = [this].concat(Array.prototype.slice.call(arguments, 1));
  return e.apply(e, t), this;
};
Id.prototype.parse = function(e, t) {
  if (typeof e != "string")
    throw new Error("Input data should be a String");
  const r = new this.core.State(e, this, t);
  return this.core.process(r), r.tokens;
};
Id.prototype.render = function(e, t) {
  return t = t || {}, this.renderer.render(this.parse(e, t), this.options, t);
};
Id.prototype.parseInline = function(e, t) {
  const r = new this.core.State(e, this, t);
  return r.inlineMode = !0, this.core.process(r), r.tokens;
};
Id.prototype.renderInline = function(e, t) {
  return t = t || {}, this.renderer.render(this.parseInline(e, t), this.options, t);
};
function n0e(e, t) {
  return e[t].content;
}
function r0e(e, t, r, a, v) {
  const o = e.utils.arrayReplaceAt, s = e.utils.lib.ucmicro, n = e.utils.has, l = new RegExp([s.Z.source, s.P.source, s.Cc.source].join("|"));
  function u(i, h, p) {
    let _ = 0;
    const d = [];
    if (i.replace(v, function(f, c, g) {
      let m;
      if (n(r, f)) {
        if (m = r[f], c > 0 && !l.test(g[c - 1]) || c + f.length < g.length && !l.test(g[c + f.length]))
          return;
      } else
        m = f.slice(1, -1);
      if (c > _) {
        const w = new p("text", "", 0);
        w.content = i.slice(_, c), d.push(w);
      }
      const x = new p("emoji", "", 0);
      x.markup = m, x.content = t[m], d.push(x), _ = c + f.length;
    }), _ < i.length) {
      const f = new p("text", "", 0);
      f.content = i.slice(_), d.push(f);
    }
    return d;
  }
  return function(h) {
    let p;
    const _ = h.tokens;
    let d = 0;
    for (let f = 0, c = _.length; f < c; f++) {
      if (_[f].type !== "inline")
        continue;
      let g = _[f].children;
      for (let m = g.length - 1; m >= 0; m--)
        p = g[m], (p.type === "link_open" || p.type === "link_close") && p.info === "auto" && (d -= p.nesting), p.type === "text" && d === 0 && a.test(p.content) && (_[f].children = g = o(
          g,
          m,
          u(p.content, p.level, h.Token)
        ));
    }
  };
}
function i0e(e) {
  return e.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
}
function a0e(e) {
  let t = e.defs;
  e.enabled.length && (t = Object.keys(t).reduce((n, l) => (e.enabled.indexOf(l) >= 0 && (n[l] = t[l]), n), {}));
  const r = Object.keys(e.shortcuts).reduce((n, l) => t[l] ? Array.isArray(e.shortcuts[l]) ? (e.shortcuts[l].forEach((u) => {
    n[u] = l;
  }), n) : (n[e.shortcuts[l]] = l, n) : n, {}), a = Object.keys(t);
  let v;
  a.length === 0 ? v = "^$" : v = a.map((n) => `:${n}:`).concat(Object.keys(r)).sort().reverse().map((n) => i0e(n)).join("|");
  const o = RegExp(v), s = RegExp(v, "g");
  return {
    defs: t,
    shortcuts: r,
    scanRE: o,
    replaceRE: s
  };
}
function o0e(e, t) {
  const r = {
    defs: {},
    shortcuts: {},
    enabled: []
  }, a = a0e(e.utils.assign({}, r, t || {}));
  e.renderer.rules.emoji = n0e, e.core.ruler.after(
    "linkify",
    "emoji",
    r0e(e, a.defs, a.shortcuts, a.scanRE, a.replaceRE)
  );
}
const s0e = {
  angry: [">:(", ">:-("],
  blush: [':")', ':-")'],
  broken_heart: ["</3", "<\\3"],
  // :\ and :-\ not used because of conflict with markdown escaping
  confused: [":/", ":-/"],
  // twemoji shows question
  cry: [":'(", ":'-(", ":,(", ":,-("],
  frowning: [":(", ":-("],
  heart: ["<3"],
  imp: ["]:(", "]:-("],
  innocent: ["o:)", "O:)", "o:-)", "O:-)", "0:)", "0:-)"],
  joy: [":')", ":'-)", ":,)", ":,-)", ":'D", ":'-D", ":,D", ":,-D"],
  kissing: [":*", ":-*"],
  laughing: ["x-)", "X-)"],
  neutral_face: [":|", ":-|"],
  open_mouth: [":o", ":-o", ":O", ":-O"],
  rage: [":@", ":-@"],
  smile: [":D", ":-D"],
  smiley: [":)", ":-)"],
  smiling_imp: ["]:)", "]:-)"],
  sob: [":,'(", ":,'-(", ";(", ";-("],
  stuck_out_tongue: [":P", ":-P"],
  sunglasses: ["8-)", "B-)"],
  sweat: [",:(", ",:-("],
  sweat_smile: [",:)", ",:-)"],
  unamused: [":s", ":-S", ":z", ":-Z", ":$", ":-$"],
  wink: [";)", ";-)"]
}, l0e = {
  100: "💯",
  1234: "🔢",
  grinning: "😀",
  smiley: "😃",
  smile: "😄",
  grin: "😁",
  laughing: "😆",
  satisfied: "😆",
  sweat_smile: "😅",
  rofl: "🤣",
  joy: "😂",
  slightly_smiling_face: "🙂",
  upside_down_face: "🙃",
  melting_face: "🫠",
  wink: "😉",
  blush: "😊",
  innocent: "😇",
  smiling_face_with_three_hearts: "🥰",
  heart_eyes: "😍",
  star_struck: "🤩",
  kissing_heart: "😘",
  kissing: "😗",
  relaxed: "☺️",
  kissing_closed_eyes: "😚",
  kissing_smiling_eyes: "😙",
  smiling_face_with_tear: "🥲",
  yum: "😋",
  stuck_out_tongue: "😛",
  stuck_out_tongue_winking_eye: "😜",
  zany_face: "🤪",
  stuck_out_tongue_closed_eyes: "😝",
  money_mouth_face: "🤑",
  hugs: "🤗",
  hand_over_mouth: "🤭",
  face_with_open_eyes_and_hand_over_mouth: "🫢",
  face_with_peeking_eye: "🫣",
  shushing_face: "🤫",
  thinking: "🤔",
  saluting_face: "🫡",
  zipper_mouth_face: "🤐",
  raised_eyebrow: "🤨",
  neutral_face: "😐",
  expressionless: "😑",
  no_mouth: "😶",
  dotted_line_face: "🫥",
  face_in_clouds: "😶‍🌫️",
  smirk: "😏",
  unamused: "😒",
  roll_eyes: "🙄",
  grimacing: "😬",
  face_exhaling: "😮‍💨",
  lying_face: "🤥",
  shaking_face: "🫨",
  relieved: "😌",
  pensive: "😔",
  sleepy: "😪",
  drooling_face: "🤤",
  sleeping: "😴",
  mask: "😷",
  face_with_thermometer: "🤒",
  face_with_head_bandage: "🤕",
  nauseated_face: "🤢",
  vomiting_face: "🤮",
  sneezing_face: "🤧",
  hot_face: "🥵",
  cold_face: "🥶",
  woozy_face: "🥴",
  dizzy_face: "😵",
  face_with_spiral_eyes: "😵‍💫",
  exploding_head: "🤯",
  cowboy_hat_face: "🤠",
  partying_face: "🥳",
  disguised_face: "🥸",
  sunglasses: "😎",
  nerd_face: "🤓",
  monocle_face: "🧐",
  confused: "😕",
  face_with_diagonal_mouth: "🫤",
  worried: "😟",
  slightly_frowning_face: "🙁",
  frowning_face: "☹️",
  open_mouth: "😮",
  hushed: "😯",
  astonished: "😲",
  flushed: "😳",
  pleading_face: "🥺",
  face_holding_back_tears: "🥹",
  frowning: "😦",
  anguished: "😧",
  fearful: "😨",
  cold_sweat: "😰",
  disappointed_relieved: "😥",
  cry: "😢",
  sob: "😭",
  scream: "😱",
  confounded: "😖",
  persevere: "😣",
  disappointed: "😞",
  sweat: "😓",
  weary: "😩",
  tired_face: "😫",
  yawning_face: "🥱",
  triumph: "😤",
  rage: "😡",
  pout: "😡",
  angry: "😠",
  cursing_face: "🤬",
  smiling_imp: "😈",
  imp: "👿",
  skull: "💀",
  skull_and_crossbones: "☠️",
  hankey: "💩",
  poop: "💩",
  shit: "💩",
  clown_face: "🤡",
  japanese_ogre: "👹",
  japanese_goblin: "👺",
  ghost: "👻",
  alien: "👽",
  space_invader: "👾",
  robot: "🤖",
  smiley_cat: "😺",
  smile_cat: "😸",
  joy_cat: "😹",
  heart_eyes_cat: "😻",
  smirk_cat: "😼",
  kissing_cat: "😽",
  scream_cat: "🙀",
  crying_cat_face: "😿",
  pouting_cat: "😾",
  see_no_evil: "🙈",
  hear_no_evil: "🙉",
  speak_no_evil: "🙊",
  love_letter: "💌",
  cupid: "💘",
  gift_heart: "💝",
  sparkling_heart: "💖",
  heartpulse: "💗",
  heartbeat: "💓",
  revolving_hearts: "💞",
  two_hearts: "💕",
  heart_decoration: "💟",
  heavy_heart_exclamation: "❣️",
  broken_heart: "💔",
  heart_on_fire: "❤️‍🔥",
  mending_heart: "❤️‍🩹",
  heart: "❤️",
  pink_heart: "🩷",
  orange_heart: "🧡",
  yellow_heart: "💛",
  green_heart: "💚",
  blue_heart: "💙",
  light_blue_heart: "🩵",
  purple_heart: "💜",
  brown_heart: "🤎",
  black_heart: "🖤",
  grey_heart: "🩶",
  white_heart: "🤍",
  kiss: "💋",
  anger: "💢",
  boom: "💥",
  collision: "💥",
  dizzy: "💫",
  sweat_drops: "💦",
  dash: "💨",
  hole: "🕳️",
  speech_balloon: "💬",
  eye_speech_bubble: "👁️‍🗨️",
  left_speech_bubble: "🗨️",
  right_anger_bubble: "🗯️",
  thought_balloon: "💭",
  zzz: "💤",
  wave: "👋",
  raised_back_of_hand: "🤚",
  raised_hand_with_fingers_splayed: "🖐️",
  hand: "✋",
  raised_hand: "✋",
  vulcan_salute: "🖖",
  rightwards_hand: "🫱",
  leftwards_hand: "🫲",
  palm_down_hand: "🫳",
  palm_up_hand: "🫴",
  leftwards_pushing_hand: "🫷",
  rightwards_pushing_hand: "🫸",
  ok_hand: "👌",
  pinched_fingers: "🤌",
  pinching_hand: "🤏",
  v: "✌️",
  crossed_fingers: "🤞",
  hand_with_index_finger_and_thumb_crossed: "🫰",
  love_you_gesture: "🤟",
  metal: "🤘",
  call_me_hand: "🤙",
  point_left: "👈",
  point_right: "👉",
  point_up_2: "👆",
  middle_finger: "🖕",
  fu: "🖕",
  point_down: "👇",
  point_up: "☝️",
  index_pointing_at_the_viewer: "🫵",
  "+1": "👍",
  thumbsup: "👍",
  "-1": "👎",
  thumbsdown: "👎",
  fist_raised: "✊",
  fist: "✊",
  fist_oncoming: "👊",
  facepunch: "👊",
  punch: "👊",
  fist_left: "🤛",
  fist_right: "🤜",
  clap: "👏",
  raised_hands: "🙌",
  heart_hands: "🫶",
  open_hands: "👐",
  palms_up_together: "🤲",
  handshake: "🤝",
  pray: "🙏",
  writing_hand: "✍️",
  nail_care: "💅",
  selfie: "🤳",
  muscle: "💪",
  mechanical_arm: "🦾",
  mechanical_leg: "🦿",
  leg: "🦵",
  foot: "🦶",
  ear: "👂",
  ear_with_hearing_aid: "🦻",
  nose: "👃",
  brain: "🧠",
  anatomical_heart: "🫀",
  lungs: "🫁",
  tooth: "🦷",
  bone: "🦴",
  eyes: "👀",
  eye: "👁️",
  tongue: "👅",
  lips: "👄",
  biting_lip: "🫦",
  baby: "👶",
  child: "🧒",
  boy: "👦",
  girl: "👧",
  adult: "🧑",
  blond_haired_person: "👱",
  man: "👨",
  bearded_person: "🧔",
  man_beard: "🧔‍♂️",
  woman_beard: "🧔‍♀️",
  red_haired_man: "👨‍🦰",
  curly_haired_man: "👨‍🦱",
  white_haired_man: "👨‍🦳",
  bald_man: "👨‍🦲",
  woman: "👩",
  red_haired_woman: "👩‍🦰",
  person_red_hair: "🧑‍🦰",
  curly_haired_woman: "👩‍🦱",
  person_curly_hair: "🧑‍🦱",
  white_haired_woman: "👩‍🦳",
  person_white_hair: "🧑‍🦳",
  bald_woman: "👩‍🦲",
  person_bald: "🧑‍🦲",
  blond_haired_woman: "👱‍♀️",
  blonde_woman: "👱‍♀️",
  blond_haired_man: "👱‍♂️",
  older_adult: "🧓",
  older_man: "👴",
  older_woman: "👵",
  frowning_person: "🙍",
  frowning_man: "🙍‍♂️",
  frowning_woman: "🙍‍♀️",
  pouting_face: "🙎",
  pouting_man: "🙎‍♂️",
  pouting_woman: "🙎‍♀️",
  no_good: "🙅",
  no_good_man: "🙅‍♂️",
  ng_man: "🙅‍♂️",
  no_good_woman: "🙅‍♀️",
  ng_woman: "🙅‍♀️",
  ok_person: "🙆",
  ok_man: "🙆‍♂️",
  ok_woman: "🙆‍♀️",
  tipping_hand_person: "💁",
  information_desk_person: "💁",
  tipping_hand_man: "💁‍♂️",
  sassy_man: "💁‍♂️",
  tipping_hand_woman: "💁‍♀️",
  sassy_woman: "💁‍♀️",
  raising_hand: "🙋",
  raising_hand_man: "🙋‍♂️",
  raising_hand_woman: "🙋‍♀️",
  deaf_person: "🧏",
  deaf_man: "🧏‍♂️",
  deaf_woman: "🧏‍♀️",
  bow: "🙇",
  bowing_man: "🙇‍♂️",
  bowing_woman: "🙇‍♀️",
  facepalm: "🤦",
  man_facepalming: "🤦‍♂️",
  woman_facepalming: "🤦‍♀️",
  shrug: "🤷",
  man_shrugging: "🤷‍♂️",
  woman_shrugging: "🤷‍♀️",
  health_worker: "🧑‍⚕️",
  man_health_worker: "👨‍⚕️",
  woman_health_worker: "👩‍⚕️",
  student: "🧑‍🎓",
  man_student: "👨‍🎓",
  woman_student: "👩‍🎓",
  teacher: "🧑‍🏫",
  man_teacher: "👨‍🏫",
  woman_teacher: "👩‍🏫",
  judge: "🧑‍⚖️",
  man_judge: "👨‍⚖️",
  woman_judge: "👩‍⚖️",
  farmer: "🧑‍🌾",
  man_farmer: "👨‍🌾",
  woman_farmer: "👩‍🌾",
  cook: "🧑‍🍳",
  man_cook: "👨‍🍳",
  woman_cook: "👩‍🍳",
  mechanic: "🧑‍🔧",
  man_mechanic: "👨‍🔧",
  woman_mechanic: "👩‍🔧",
  factory_worker: "🧑‍🏭",
  man_factory_worker: "👨‍🏭",
  woman_factory_worker: "👩‍🏭",
  office_worker: "🧑‍💼",
  man_office_worker: "👨‍💼",
  woman_office_worker: "👩‍💼",
  scientist: "🧑‍🔬",
  man_scientist: "👨‍🔬",
  woman_scientist: "👩‍🔬",
  technologist: "🧑‍💻",
  man_technologist: "👨‍💻",
  woman_technologist: "👩‍💻",
  singer: "🧑‍🎤",
  man_singer: "👨‍🎤",
  woman_singer: "👩‍🎤",
  artist: "🧑‍🎨",
  man_artist: "👨‍🎨",
  woman_artist: "👩‍🎨",
  pilot: "🧑‍✈️",
  man_pilot: "👨‍✈️",
  woman_pilot: "👩‍✈️",
  astronaut: "🧑‍🚀",
  man_astronaut: "👨‍🚀",
  woman_astronaut: "👩‍🚀",
  firefighter: "🧑‍🚒",
  man_firefighter: "👨‍🚒",
  woman_firefighter: "👩‍🚒",
  police_officer: "👮",
  cop: "👮",
  policeman: "👮‍♂️",
  policewoman: "👮‍♀️",
  detective: "🕵️",
  male_detective: "🕵️‍♂️",
  female_detective: "🕵️‍♀️",
  guard: "💂",
  guardsman: "💂‍♂️",
  guardswoman: "💂‍♀️",
  ninja: "🥷",
  construction_worker: "👷",
  construction_worker_man: "👷‍♂️",
  construction_worker_woman: "👷‍♀️",
  person_with_crown: "🫅",
  prince: "🤴",
  princess: "👸",
  person_with_turban: "👳",
  man_with_turban: "👳‍♂️",
  woman_with_turban: "👳‍♀️",
  man_with_gua_pi_mao: "👲",
  woman_with_headscarf: "🧕",
  person_in_tuxedo: "🤵",
  man_in_tuxedo: "🤵‍♂️",
  woman_in_tuxedo: "🤵‍♀️",
  person_with_veil: "👰",
  man_with_veil: "👰‍♂️",
  woman_with_veil: "👰‍♀️",
  bride_with_veil: "👰‍♀️",
  pregnant_woman: "🤰",
  pregnant_man: "🫃",
  pregnant_person: "🫄",
  breast_feeding: "🤱",
  woman_feeding_baby: "👩‍🍼",
  man_feeding_baby: "👨‍🍼",
  person_feeding_baby: "🧑‍🍼",
  angel: "👼",
  santa: "🎅",
  mrs_claus: "🤶",
  mx_claus: "🧑‍🎄",
  superhero: "🦸",
  superhero_man: "🦸‍♂️",
  superhero_woman: "🦸‍♀️",
  supervillain: "🦹",
  supervillain_man: "🦹‍♂️",
  supervillain_woman: "🦹‍♀️",
  mage: "🧙",
  mage_man: "🧙‍♂️",
  mage_woman: "🧙‍♀️",
  fairy: "🧚",
  fairy_man: "🧚‍♂️",
  fairy_woman: "🧚‍♀️",
  vampire: "🧛",
  vampire_man: "🧛‍♂️",
  vampire_woman: "🧛‍♀️",
  merperson: "🧜",
  merman: "🧜‍♂️",
  mermaid: "🧜‍♀️",
  elf: "🧝",
  elf_man: "🧝‍♂️",
  elf_woman: "🧝‍♀️",
  genie: "🧞",
  genie_man: "🧞‍♂️",
  genie_woman: "🧞‍♀️",
  zombie: "🧟",
  zombie_man: "🧟‍♂️",
  zombie_woman: "🧟‍♀️",
  troll: "🧌",
  massage: "💆",
  massage_man: "💆‍♂️",
  massage_woman: "💆‍♀️",
  haircut: "💇",
  haircut_man: "💇‍♂️",
  haircut_woman: "💇‍♀️",
  walking: "🚶",
  walking_man: "🚶‍♂️",
  walking_woman: "🚶‍♀️",
  standing_person: "🧍",
  standing_man: "🧍‍♂️",
  standing_woman: "🧍‍♀️",
  kneeling_person: "🧎",
  kneeling_man: "🧎‍♂️",
  kneeling_woman: "🧎‍♀️",
  person_with_probing_cane: "🧑‍🦯",
  man_with_probing_cane: "👨‍🦯",
  woman_with_probing_cane: "👩‍🦯",
  person_in_motorized_wheelchair: "🧑‍🦼",
  man_in_motorized_wheelchair: "👨‍🦼",
  woman_in_motorized_wheelchair: "👩‍🦼",
  person_in_manual_wheelchair: "🧑‍🦽",
  man_in_manual_wheelchair: "👨‍🦽",
  woman_in_manual_wheelchair: "👩‍🦽",
  runner: "🏃",
  running: "🏃",
  running_man: "🏃‍♂️",
  running_woman: "🏃‍♀️",
  woman_dancing: "💃",
  dancer: "💃",
  man_dancing: "🕺",
  business_suit_levitating: "🕴️",
  dancers: "👯",
  dancing_men: "👯‍♂️",
  dancing_women: "👯‍♀️",
  sauna_person: "🧖",
  sauna_man: "🧖‍♂️",
  sauna_woman: "🧖‍♀️",
  climbing: "🧗",
  climbing_man: "🧗‍♂️",
  climbing_woman: "🧗‍♀️",
  person_fencing: "🤺",
  horse_racing: "🏇",
  skier: "⛷️",
  snowboarder: "🏂",
  golfing: "🏌️",
  golfing_man: "🏌️‍♂️",
  golfing_woman: "🏌️‍♀️",
  surfer: "🏄",
  surfing_man: "🏄‍♂️",
  surfing_woman: "🏄‍♀️",
  rowboat: "🚣",
  rowing_man: "🚣‍♂️",
  rowing_woman: "🚣‍♀️",
  swimmer: "🏊",
  swimming_man: "🏊‍♂️",
  swimming_woman: "🏊‍♀️",
  bouncing_ball_person: "⛹️",
  bouncing_ball_man: "⛹️‍♂️",
  basketball_man: "⛹️‍♂️",
  bouncing_ball_woman: "⛹️‍♀️",
  basketball_woman: "⛹️‍♀️",
  weight_lifting: "🏋️",
  weight_lifting_man: "🏋️‍♂️",
  weight_lifting_woman: "🏋️‍♀️",
  bicyclist: "🚴",
  biking_man: "🚴‍♂️",
  biking_woman: "🚴‍♀️",
  mountain_bicyclist: "🚵",
  mountain_biking_man: "🚵‍♂️",
  mountain_biking_woman: "🚵‍♀️",
  cartwheeling: "🤸",
  man_cartwheeling: "🤸‍♂️",
  woman_cartwheeling: "🤸‍♀️",
  wrestling: "🤼",
  men_wrestling: "🤼‍♂️",
  women_wrestling: "🤼‍♀️",
  water_polo: "🤽",
  man_playing_water_polo: "🤽‍♂️",
  woman_playing_water_polo: "🤽‍♀️",
  handball_person: "🤾",
  man_playing_handball: "🤾‍♂️",
  woman_playing_handball: "🤾‍♀️",
  juggling_person: "🤹",
  man_juggling: "🤹‍♂️",
  woman_juggling: "🤹‍♀️",
  lotus_position: "🧘",
  lotus_position_man: "🧘‍♂️",
  lotus_position_woman: "🧘‍♀️",
  bath: "🛀",
  sleeping_bed: "🛌",
  people_holding_hands: "🧑‍🤝‍🧑",
  two_women_holding_hands: "👭",
  couple: "👫",
  two_men_holding_hands: "👬",
  couplekiss: "💏",
  couplekiss_man_woman: "👩‍❤️‍💋‍👨",
  couplekiss_man_man: "👨‍❤️‍💋‍👨",
  couplekiss_woman_woman: "👩‍❤️‍💋‍👩",
  couple_with_heart: "💑",
  couple_with_heart_woman_man: "👩‍❤️‍👨",
  couple_with_heart_man_man: "👨‍❤️‍👨",
  couple_with_heart_woman_woman: "👩‍❤️‍👩",
  family: "👪",
  family_man_woman_boy: "👨‍👩‍👦",
  family_man_woman_girl: "👨‍👩‍👧",
  family_man_woman_girl_boy: "👨‍👩‍👧‍👦",
  family_man_woman_boy_boy: "👨‍👩‍👦‍👦",
  family_man_woman_girl_girl: "👨‍👩‍👧‍👧",
  family_man_man_boy: "👨‍👨‍👦",
  family_man_man_girl: "👨‍👨‍👧",
  family_man_man_girl_boy: "👨‍👨‍👧‍👦",
  family_man_man_boy_boy: "👨‍👨‍👦‍👦",
  family_man_man_girl_girl: "👨‍👨‍👧‍👧",
  family_woman_woman_boy: "👩‍👩‍👦",
  family_woman_woman_girl: "👩‍👩‍👧",
  family_woman_woman_girl_boy: "👩‍👩‍👧‍👦",
  family_woman_woman_boy_boy: "👩‍👩‍👦‍👦",
  family_woman_woman_girl_girl: "👩‍👩‍👧‍👧",
  family_man_boy: "👨‍👦",
  family_man_boy_boy: "👨‍👦‍👦",
  family_man_girl: "👨‍👧",
  family_man_girl_boy: "👨‍👧‍👦",
  family_man_girl_girl: "👨‍👧‍👧",
  family_woman_boy: "👩‍👦",
  family_woman_boy_boy: "👩‍👦‍👦",
  family_woman_girl: "👩‍👧",
  family_woman_girl_boy: "👩‍👧‍👦",
  family_woman_girl_girl: "👩‍👧‍👧",
  speaking_head: "🗣️",
  bust_in_silhouette: "👤",
  busts_in_silhouette: "👥",
  people_hugging: "🫂",
  footprints: "👣",
  monkey_face: "🐵",
  monkey: "🐒",
  gorilla: "🦍",
  orangutan: "🦧",
  dog: "🐶",
  dog2: "🐕",
  guide_dog: "🦮",
  service_dog: "🐕‍🦺",
  poodle: "🐩",
  wolf: "🐺",
  fox_face: "🦊",
  raccoon: "🦝",
  cat: "🐱",
  cat2: "🐈",
  black_cat: "🐈‍⬛",
  lion: "🦁",
  tiger: "🐯",
  tiger2: "🐅",
  leopard: "🐆",
  horse: "🐴",
  moose: "🫎",
  donkey: "🫏",
  racehorse: "🐎",
  unicorn: "🦄",
  zebra: "🦓",
  deer: "🦌",
  bison: "🦬",
  cow: "🐮",
  ox: "🐂",
  water_buffalo: "🐃",
  cow2: "🐄",
  pig: "🐷",
  pig2: "🐖",
  boar: "🐗",
  pig_nose: "🐽",
  ram: "🐏",
  sheep: "🐑",
  goat: "🐐",
  dromedary_camel: "🐪",
  camel: "🐫",
  llama: "🦙",
  giraffe: "🦒",
  elephant: "🐘",
  mammoth: "🦣",
  rhinoceros: "🦏",
  hippopotamus: "🦛",
  mouse: "🐭",
  mouse2: "🐁",
  rat: "🐀",
  hamster: "🐹",
  rabbit: "🐰",
  rabbit2: "🐇",
  chipmunk: "🐿️",
  beaver: "🦫",
  hedgehog: "🦔",
  bat: "🦇",
  bear: "🐻",
  polar_bear: "🐻‍❄️",
  koala: "🐨",
  panda_face: "🐼",
  sloth: "🦥",
  otter: "🦦",
  skunk: "🦨",
  kangaroo: "🦘",
  badger: "🦡",
  feet: "🐾",
  paw_prints: "🐾",
  turkey: "🦃",
  chicken: "🐔",
  rooster: "🐓",
  hatching_chick: "🐣",
  baby_chick: "🐤",
  hatched_chick: "🐥",
  bird: "🐦",
  penguin: "🐧",
  dove: "🕊️",
  eagle: "🦅",
  duck: "🦆",
  swan: "🦢",
  owl: "🦉",
  dodo: "🦤",
  feather: "🪶",
  flamingo: "🦩",
  peacock: "🦚",
  parrot: "🦜",
  wing: "🪽",
  black_bird: "🐦‍⬛",
  goose: "🪿",
  frog: "🐸",
  crocodile: "🐊",
  turtle: "🐢",
  lizard: "🦎",
  snake: "🐍",
  dragon_face: "🐲",
  dragon: "🐉",
  sauropod: "🦕",
  "t-rex": "🦖",
  whale: "🐳",
  whale2: "🐋",
  dolphin: "🐬",
  flipper: "🐬",
  seal: "🦭",
  fish: "🐟",
  tropical_fish: "🐠",
  blowfish: "🐡",
  shark: "🦈",
  octopus: "🐙",
  shell: "🐚",
  coral: "🪸",
  jellyfish: "🪼",
  snail: "🐌",
  butterfly: "🦋",
  bug: "🐛",
  ant: "🐜",
  bee: "🐝",
  honeybee: "🐝",
  beetle: "🪲",
  lady_beetle: "🐞",
  cricket: "🦗",
  cockroach: "🪳",
  spider: "🕷️",
  spider_web: "🕸️",
  scorpion: "🦂",
  mosquito: "🦟",
  fly: "🪰",
  worm: "🪱",
  microbe: "🦠",
  bouquet: "💐",
  cherry_blossom: "🌸",
  white_flower: "💮",
  lotus: "🪷",
  rosette: "🏵️",
  rose: "🌹",
  wilted_flower: "🥀",
  hibiscus: "🌺",
  sunflower: "🌻",
  blossom: "🌼",
  tulip: "🌷",
  hyacinth: "🪻",
  seedling: "🌱",
  potted_plant: "🪴",
  evergreen_tree: "🌲",
  deciduous_tree: "🌳",
  palm_tree: "🌴",
  cactus: "🌵",
  ear_of_rice: "🌾",
  herb: "🌿",
  shamrock: "☘️",
  four_leaf_clover: "🍀",
  maple_leaf: "🍁",
  fallen_leaf: "🍂",
  leaves: "🍃",
  empty_nest: "🪹",
  nest_with_eggs: "🪺",
  mushroom: "🍄",
  grapes: "🍇",
  melon: "🍈",
  watermelon: "🍉",
  tangerine: "🍊",
  orange: "🍊",
  mandarin: "🍊",
  lemon: "🍋",
  banana: "🍌",
  pineapple: "🍍",
  mango: "🥭",
  apple: "🍎",
  green_apple: "🍏",
  pear: "🍐",
  peach: "🍑",
  cherries: "🍒",
  strawberry: "🍓",
  blueberries: "🫐",
  kiwi_fruit: "🥝",
  tomato: "🍅",
  olive: "🫒",
  coconut: "🥥",
  avocado: "🥑",
  eggplant: "🍆",
  potato: "🥔",
  carrot: "🥕",
  corn: "🌽",
  hot_pepper: "🌶️",
  bell_pepper: "🫑",
  cucumber: "🥒",
  leafy_green: "🥬",
  broccoli: "🥦",
  garlic: "🧄",
  onion: "🧅",
  peanuts: "🥜",
  beans: "🫘",
  chestnut: "🌰",
  ginger_root: "🫚",
  pea_pod: "🫛",
  bread: "🍞",
  croissant: "🥐",
  baguette_bread: "🥖",
  flatbread: "🫓",
  pretzel: "🥨",
  bagel: "🥯",
  pancakes: "🥞",
  waffle: "🧇",
  cheese: "🧀",
  meat_on_bone: "🍖",
  poultry_leg: "🍗",
  cut_of_meat: "🥩",
  bacon: "🥓",
  hamburger: "🍔",
  fries: "🍟",
  pizza: "🍕",
  hotdog: "🌭",
  sandwich: "🥪",
  taco: "🌮",
  burrito: "🌯",
  tamale: "🫔",
  stuffed_flatbread: "🥙",
  falafel: "🧆",
  egg: "🥚",
  fried_egg: "🍳",
  shallow_pan_of_food: "🥘",
  stew: "🍲",
  fondue: "🫕",
  bowl_with_spoon: "🥣",
  green_salad: "🥗",
  popcorn: "🍿",
  butter: "🧈",
  salt: "🧂",
  canned_food: "🥫",
  bento: "🍱",
  rice_cracker: "🍘",
  rice_ball: "🍙",
  rice: "🍚",
  curry: "🍛",
  ramen: "🍜",
  spaghetti: "🍝",
  sweet_potato: "🍠",
  oden: "🍢",
  sushi: "🍣",
  fried_shrimp: "🍤",
  fish_cake: "🍥",
  moon_cake: "🥮",
  dango: "🍡",
  dumpling: "🥟",
  fortune_cookie: "🥠",
  takeout_box: "🥡",
  crab: "🦀",
  lobster: "🦞",
  shrimp: "🦐",
  squid: "🦑",
  oyster: "🦪",
  icecream: "🍦",
  shaved_ice: "🍧",
  ice_cream: "🍨",
  doughnut: "🍩",
  cookie: "🍪",
  birthday: "🎂",
  cake: "🍰",
  cupcake: "🧁",
  pie: "🥧",
  chocolate_bar: "🍫",
  candy: "🍬",
  lollipop: "🍭",
  custard: "🍮",
  honey_pot: "🍯",
  baby_bottle: "🍼",
  milk_glass: "🥛",
  coffee: "☕",
  teapot: "🫖",
  tea: "🍵",
  sake: "🍶",
  champagne: "🍾",
  wine_glass: "🍷",
  cocktail: "🍸",
  tropical_drink: "🍹",
  beer: "🍺",
  beers: "🍻",
  clinking_glasses: "🥂",
  tumbler_glass: "🥃",
  pouring_liquid: "🫗",
  cup_with_straw: "🥤",
  bubble_tea: "🧋",
  beverage_box: "🧃",
  mate: "🧉",
  ice_cube: "🧊",
  chopsticks: "🥢",
  plate_with_cutlery: "🍽️",
  fork_and_knife: "🍴",
  spoon: "🥄",
  hocho: "🔪",
  knife: "🔪",
  jar: "🫙",
  amphora: "🏺",
  earth_africa: "🌍",
  earth_americas: "🌎",
  earth_asia: "🌏",
  globe_with_meridians: "🌐",
  world_map: "🗺️",
  japan: "🗾",
  compass: "🧭",
  mountain_snow: "🏔️",
  mountain: "⛰️",
  volcano: "🌋",
  mount_fuji: "🗻",
  camping: "🏕️",
  beach_umbrella: "🏖️",
  desert: "🏜️",
  desert_island: "🏝️",
  national_park: "🏞️",
  stadium: "🏟️",
  classical_building: "🏛️",
  building_construction: "🏗️",
  bricks: "🧱",
  rock: "🪨",
  wood: "🪵",
  hut: "🛖",
  houses: "🏘️",
  derelict_house: "🏚️",
  house: "🏠",
  house_with_garden: "🏡",
  office: "🏢",
  post_office: "🏣",
  european_post_office: "🏤",
  hospital: "🏥",
  bank: "🏦",
  hotel: "🏨",
  love_hotel: "🏩",
  convenience_store: "🏪",
  school: "🏫",
  department_store: "🏬",
  factory: "🏭",
  japanese_castle: "🏯",
  european_castle: "🏰",
  wedding: "💒",
  tokyo_tower: "🗼",
  statue_of_liberty: "🗽",
  church: "⛪",
  mosque: "🕌",
  hindu_temple: "🛕",
  synagogue: "🕍",
  shinto_shrine: "⛩️",
  kaaba: "🕋",
  fountain: "⛲",
  tent: "⛺",
  foggy: "🌁",
  night_with_stars: "🌃",
  cityscape: "🏙️",
  sunrise_over_mountains: "🌄",
  sunrise: "🌅",
  city_sunset: "🌆",
  city_sunrise: "🌇",
  bridge_at_night: "🌉",
  hotsprings: "♨️",
  carousel_horse: "🎠",
  playground_slide: "🛝",
  ferris_wheel: "🎡",
  roller_coaster: "🎢",
  barber: "💈",
  circus_tent: "🎪",
  steam_locomotive: "🚂",
  railway_car: "🚃",
  bullettrain_side: "🚄",
  bullettrain_front: "🚅",
  train2: "🚆",
  metro: "🚇",
  light_rail: "🚈",
  station: "🚉",
  tram: "🚊",
  monorail: "🚝",
  mountain_railway: "🚞",
  train: "🚋",
  bus: "🚌",
  oncoming_bus: "🚍",
  trolleybus: "🚎",
  minibus: "🚐",
  ambulance: "🚑",
  fire_engine: "🚒",
  police_car: "🚓",
  oncoming_police_car: "🚔",
  taxi: "🚕",
  oncoming_taxi: "🚖",
  car: "🚗",
  red_car: "🚗",
  oncoming_automobile: "🚘",
  blue_car: "🚙",
  pickup_truck: "🛻",
  truck: "🚚",
  articulated_lorry: "🚛",
  tractor: "🚜",
  racing_car: "🏎️",
  motorcycle: "🏍️",
  motor_scooter: "🛵",
  manual_wheelchair: "🦽",
  motorized_wheelchair: "🦼",
  auto_rickshaw: "🛺",
  bike: "🚲",
  kick_scooter: "🛴",
  skateboard: "🛹",
  roller_skate: "🛼",
  busstop: "🚏",
  motorway: "🛣️",
  railway_track: "🛤️",
  oil_drum: "🛢️",
  fuelpump: "⛽",
  wheel: "🛞",
  rotating_light: "🚨",
  traffic_light: "🚥",
  vertical_traffic_light: "🚦",
  stop_sign: "🛑",
  construction: "🚧",
  anchor: "⚓",
  ring_buoy: "🛟",
  boat: "⛵",
  sailboat: "⛵",
  canoe: "🛶",
  speedboat: "🚤",
  passenger_ship: "🛳️",
  ferry: "⛴️",
  motor_boat: "🛥️",
  ship: "🚢",
  airplane: "✈️",
  small_airplane: "🛩️",
  flight_departure: "🛫",
  flight_arrival: "🛬",
  parachute: "🪂",
  seat: "💺",
  helicopter: "🚁",
  suspension_railway: "🚟",
  mountain_cableway: "🚠",
  aerial_tramway: "🚡",
  artificial_satellite: "🛰️",
  rocket: "🚀",
  flying_saucer: "🛸",
  bellhop_bell: "🛎️",
  luggage: "🧳",
  hourglass: "⌛",
  hourglass_flowing_sand: "⏳",
  watch: "⌚",
  alarm_clock: "⏰",
  stopwatch: "⏱️",
  timer_clock: "⏲️",
  mantelpiece_clock: "🕰️",
  clock12: "🕛",
  clock1230: "🕧",
  clock1: "🕐",
  clock130: "🕜",
  clock2: "🕑",
  clock230: "🕝",
  clock3: "🕒",
  clock330: "🕞",
  clock4: "🕓",
  clock430: "🕟",
  clock5: "🕔",
  clock530: "🕠",
  clock6: "🕕",
  clock630: "🕡",
  clock7: "🕖",
  clock730: "🕢",
  clock8: "🕗",
  clock830: "🕣",
  clock9: "🕘",
  clock930: "🕤",
  clock10: "🕙",
  clock1030: "🕥",
  clock11: "🕚",
  clock1130: "🕦",
  new_moon: "🌑",
  waxing_crescent_moon: "🌒",
  first_quarter_moon: "🌓",
  moon: "🌔",
  waxing_gibbous_moon: "🌔",
  full_moon: "🌕",
  waning_gibbous_moon: "🌖",
  last_quarter_moon: "🌗",
  waning_crescent_moon: "🌘",
  crescent_moon: "🌙",
  new_moon_with_face: "🌚",
  first_quarter_moon_with_face: "🌛",
  last_quarter_moon_with_face: "🌜",
  thermometer: "🌡️",
  sunny: "☀️",
  full_moon_with_face: "🌝",
  sun_with_face: "🌞",
  ringed_planet: "🪐",
  star: "⭐",
  star2: "🌟",
  stars: "🌠",
  milky_way: "🌌",
  cloud: "☁️",
  partly_sunny: "⛅",
  cloud_with_lightning_and_rain: "⛈️",
  sun_behind_small_cloud: "🌤️",
  sun_behind_large_cloud: "🌥️",
  sun_behind_rain_cloud: "🌦️",
  cloud_with_rain: "🌧️",
  cloud_with_snow: "🌨️",
  cloud_with_lightning: "🌩️",
  tornado: "🌪️",
  fog: "🌫️",
  wind_face: "🌬️",
  cyclone: "🌀",
  rainbow: "🌈",
  closed_umbrella: "🌂",
  open_umbrella: "☂️",
  umbrella: "☔",
  parasol_on_ground: "⛱️",
  zap: "⚡",
  snowflake: "❄️",
  snowman_with_snow: "☃️",
  snowman: "⛄",
  comet: "☄️",
  fire: "🔥",
  droplet: "💧",
  ocean: "🌊",
  jack_o_lantern: "🎃",
  christmas_tree: "🎄",
  fireworks: "🎆",
  sparkler: "🎇",
  firecracker: "🧨",
  sparkles: "✨",
  balloon: "🎈",
  tada: "🎉",
  confetti_ball: "🎊",
  tanabata_tree: "🎋",
  bamboo: "🎍",
  dolls: "🎎",
  flags: "🎏",
  wind_chime: "🎐",
  rice_scene: "🎑",
  red_envelope: "🧧",
  ribbon: "🎀",
  gift: "🎁",
  reminder_ribbon: "🎗️",
  tickets: "🎟️",
  ticket: "🎫",
  medal_military: "🎖️",
  trophy: "🏆",
  medal_sports: "🏅",
  "1st_place_medal": "🥇",
  "2nd_place_medal": "🥈",
  "3rd_place_medal": "🥉",
  soccer: "⚽",
  baseball: "⚾",
  softball: "🥎",
  basketball: "🏀",
  volleyball: "🏐",
  football: "🏈",
  rugby_football: "🏉",
  tennis: "🎾",
  flying_disc: "🥏",
  bowling: "🎳",
  cricket_game: "🏏",
  field_hockey: "🏑",
  ice_hockey: "🏒",
  lacrosse: "🥍",
  ping_pong: "🏓",
  badminton: "🏸",
  boxing_glove: "🥊",
  martial_arts_uniform: "🥋",
  goal_net: "🥅",
  golf: "⛳",
  ice_skate: "⛸️",
  fishing_pole_and_fish: "🎣",
  diving_mask: "🤿",
  running_shirt_with_sash: "🎽",
  ski: "🎿",
  sled: "🛷",
  curling_stone: "🥌",
  dart: "🎯",
  yo_yo: "🪀",
  kite: "🪁",
  gun: "🔫",
  "8ball": "🎱",
  crystal_ball: "🔮",
  magic_wand: "🪄",
  video_game: "🎮",
  joystick: "🕹️",
  slot_machine: "🎰",
  game_die: "🎲",
  jigsaw: "🧩",
  teddy_bear: "🧸",
  pinata: "🪅",
  mirror_ball: "🪩",
  nesting_dolls: "🪆",
  spades: "♠️",
  hearts: "♥️",
  diamonds: "♦️",
  clubs: "♣️",
  chess_pawn: "♟️",
  black_joker: "🃏",
  mahjong: "🀄",
  flower_playing_cards: "🎴",
  performing_arts: "🎭",
  framed_picture: "🖼️",
  art: "🎨",
  thread: "🧵",
  sewing_needle: "🪡",
  yarn: "🧶",
  knot: "🪢",
  eyeglasses: "👓",
  dark_sunglasses: "🕶️",
  goggles: "🥽",
  lab_coat: "🥼",
  safety_vest: "🦺",
  necktie: "👔",
  shirt: "👕",
  tshirt: "👕",
  jeans: "👖",
  scarf: "🧣",
  gloves: "🧤",
  coat: "🧥",
  socks: "🧦",
  dress: "👗",
  kimono: "👘",
  sari: "🥻",
  one_piece_swimsuit: "🩱",
  swim_brief: "🩲",
  shorts: "🩳",
  bikini: "👙",
  womans_clothes: "👚",
  folding_hand_fan: "🪭",
  purse: "👛",
  handbag: "👜",
  pouch: "👝",
  shopping: "🛍️",
  school_satchel: "🎒",
  thong_sandal: "🩴",
  mans_shoe: "👞",
  shoe: "👞",
  athletic_shoe: "👟",
  hiking_boot: "🥾",
  flat_shoe: "🥿",
  high_heel: "👠",
  sandal: "👡",
  ballet_shoes: "🩰",
  boot: "👢",
  hair_pick: "🪮",
  crown: "👑",
  womans_hat: "👒",
  tophat: "🎩",
  mortar_board: "🎓",
  billed_cap: "🧢",
  military_helmet: "🪖",
  rescue_worker_helmet: "⛑️",
  prayer_beads: "📿",
  lipstick: "💄",
  ring: "💍",
  gem: "💎",
  mute: "🔇",
  speaker: "🔈",
  sound: "🔉",
  loud_sound: "🔊",
  loudspeaker: "📢",
  mega: "📣",
  postal_horn: "📯",
  bell: "🔔",
  no_bell: "🔕",
  musical_score: "🎼",
  musical_note: "🎵",
  notes: "🎶",
  studio_microphone: "🎙️",
  level_slider: "🎚️",
  control_knobs: "🎛️",
  microphone: "🎤",
  headphones: "🎧",
  radio: "📻",
  saxophone: "🎷",
  accordion: "🪗",
  guitar: "🎸",
  musical_keyboard: "🎹",
  trumpet: "🎺",
  violin: "🎻",
  banjo: "🪕",
  drum: "🥁",
  long_drum: "🪘",
  maracas: "🪇",
  flute: "🪈",
  iphone: "📱",
  calling: "📲",
  phone: "☎️",
  telephone: "☎️",
  telephone_receiver: "📞",
  pager: "📟",
  fax: "📠",
  battery: "🔋",
  low_battery: "🪫",
  electric_plug: "🔌",
  computer: "💻",
  desktop_computer: "🖥️",
  printer: "🖨️",
  keyboard: "⌨️",
  computer_mouse: "🖱️",
  trackball: "🖲️",
  minidisc: "💽",
  floppy_disk: "💾",
  cd: "💿",
  dvd: "📀",
  abacus: "🧮",
  movie_camera: "🎥",
  film_strip: "🎞️",
  film_projector: "📽️",
  clapper: "🎬",
  tv: "📺",
  camera: "📷",
  camera_flash: "📸",
  video_camera: "📹",
  vhs: "📼",
  mag: "🔍",
  mag_right: "🔎",
  candle: "🕯️",
  bulb: "💡",
  flashlight: "🔦",
  izakaya_lantern: "🏮",
  lantern: "🏮",
  diya_lamp: "🪔",
  notebook_with_decorative_cover: "📔",
  closed_book: "📕",
  book: "📖",
  open_book: "📖",
  green_book: "📗",
  blue_book: "📘",
  orange_book: "📙",
  books: "📚",
  notebook: "📓",
  ledger: "📒",
  page_with_curl: "📃",
  scroll: "📜",
  page_facing_up: "📄",
  newspaper: "📰",
  newspaper_roll: "🗞️",
  bookmark_tabs: "📑",
  bookmark: "🔖",
  label: "🏷️",
  moneybag: "💰",
  coin: "🪙",
  yen: "💴",
  dollar: "💵",
  euro: "💶",
  pound: "💷",
  money_with_wings: "💸",
  credit_card: "💳",
  receipt: "🧾",
  chart: "💹",
  envelope: "✉️",
  email: "📧",
  "e-mail": "📧",
  incoming_envelope: "📨",
  envelope_with_arrow: "📩",
  outbox_tray: "📤",
  inbox_tray: "📥",
  package: "📦",
  mailbox: "📫",
  mailbox_closed: "📪",
  mailbox_with_mail: "📬",
  mailbox_with_no_mail: "📭",
  postbox: "📮",
  ballot_box: "🗳️",
  pencil2: "✏️",
  black_nib: "✒️",
  fountain_pen: "🖋️",
  pen: "🖊️",
  paintbrush: "🖌️",
  crayon: "🖍️",
  memo: "📝",
  pencil: "📝",
  briefcase: "💼",
  file_folder: "📁",
  open_file_folder: "📂",
  card_index_dividers: "🗂️",
  date: "📅",
  calendar: "📆",
  spiral_notepad: "🗒️",
  spiral_calendar: "🗓️",
  card_index: "📇",
  chart_with_upwards_trend: "📈",
  chart_with_downwards_trend: "📉",
  bar_chart: "📊",
  clipboard: "📋",
  pushpin: "📌",
  round_pushpin: "📍",
  paperclip: "📎",
  paperclips: "🖇️",
  straight_ruler: "📏",
  triangular_ruler: "📐",
  scissors: "✂️",
  card_file_box: "🗃️",
  file_cabinet: "🗄️",
  wastebasket: "🗑️",
  lock: "🔒",
  unlock: "🔓",
  lock_with_ink_pen: "🔏",
  closed_lock_with_key: "🔐",
  key: "🔑",
  old_key: "🗝️",
  hammer: "🔨",
  axe: "🪓",
  pick: "⛏️",
  hammer_and_pick: "⚒️",
  hammer_and_wrench: "🛠️",
  dagger: "🗡️",
  crossed_swords: "⚔️",
  bomb: "💣",
  boomerang: "🪃",
  bow_and_arrow: "🏹",
  shield: "🛡️",
  carpentry_saw: "🪚",
  wrench: "🔧",
  screwdriver: "🪛",
  nut_and_bolt: "🔩",
  gear: "⚙️",
  clamp: "🗜️",
  balance_scale: "⚖️",
  probing_cane: "🦯",
  link: "🔗",
  chains: "⛓️",
  hook: "🪝",
  toolbox: "🧰",
  magnet: "🧲",
  ladder: "🪜",
  alembic: "⚗️",
  test_tube: "🧪",
  petri_dish: "🧫",
  dna: "🧬",
  microscope: "🔬",
  telescope: "🔭",
  satellite: "📡",
  syringe: "💉",
  drop_of_blood: "🩸",
  pill: "💊",
  adhesive_bandage: "🩹",
  crutch: "🩼",
  stethoscope: "🩺",
  x_ray: "🩻",
  door: "🚪",
  elevator: "🛗",
  mirror: "🪞",
  window: "🪟",
  bed: "🛏️",
  couch_and_lamp: "🛋️",
  chair: "🪑",
  toilet: "🚽",
  plunger: "🪠",
  shower: "🚿",
  bathtub: "🛁",
  mouse_trap: "🪤",
  razor: "🪒",
  lotion_bottle: "🧴",
  safety_pin: "🧷",
  broom: "🧹",
  basket: "🧺",
  roll_of_paper: "🧻",
  bucket: "🪣",
  soap: "🧼",
  bubbles: "🫧",
  toothbrush: "🪥",
  sponge: "🧽",
  fire_extinguisher: "🧯",
  shopping_cart: "🛒",
  smoking: "🚬",
  coffin: "⚰️",
  headstone: "🪦",
  funeral_urn: "⚱️",
  nazar_amulet: "🧿",
  hamsa: "🪬",
  moyai: "🗿",
  placard: "🪧",
  identification_card: "🪪",
  atm: "🏧",
  put_litter_in_its_place: "🚮",
  potable_water: "🚰",
  wheelchair: "♿",
  mens: "🚹",
  womens: "🚺",
  restroom: "🚻",
  baby_symbol: "🚼",
  wc: "🚾",
  passport_control: "🛂",
  customs: "🛃",
  baggage_claim: "🛄",
  left_luggage: "🛅",
  warning: "⚠️",
  children_crossing: "🚸",
  no_entry: "⛔",
  no_entry_sign: "🚫",
  no_bicycles: "🚳",
  no_smoking: "🚭",
  do_not_litter: "🚯",
  "non-potable_water": "🚱",
  no_pedestrians: "🚷",
  no_mobile_phones: "📵",
  underage: "🔞",
  radioactive: "☢️",
  biohazard: "☣️",
  arrow_up: "⬆️",
  arrow_upper_right: "↗️",
  arrow_right: "➡️",
  arrow_lower_right: "↘️",
  arrow_down: "⬇️",
  arrow_lower_left: "↙️",
  arrow_left: "⬅️",
  arrow_upper_left: "↖️",
  arrow_up_down: "↕️",
  left_right_arrow: "↔️",
  leftwards_arrow_with_hook: "↩️",
  arrow_right_hook: "↪️",
  arrow_heading_up: "⤴️",
  arrow_heading_down: "⤵️",
  arrows_clockwise: "🔃",
  arrows_counterclockwise: "🔄",
  back: "🔙",
  end: "🔚",
  on: "🔛",
  soon: "🔜",
  top: "🔝",
  place_of_worship: "🛐",
  atom_symbol: "⚛️",
  om: "🕉️",
  star_of_david: "✡️",
  wheel_of_dharma: "☸️",
  yin_yang: "☯️",
  latin_cross: "✝️",
  orthodox_cross: "☦️",
  star_and_crescent: "☪️",
  peace_symbol: "☮️",
  menorah: "🕎",
  six_pointed_star: "🔯",
  khanda: "🪯",
  aries: "♈",
  taurus: "♉",
  gemini: "♊",
  cancer: "♋",
  leo: "♌",
  virgo: "♍",
  libra: "♎",
  scorpius: "♏",
  sagittarius: "♐",
  capricorn: "♑",
  aquarius: "♒",
  pisces: "♓",
  ophiuchus: "⛎",
  twisted_rightwards_arrows: "🔀",
  repeat: "🔁",
  repeat_one: "🔂",
  arrow_forward: "▶️",
  fast_forward: "⏩",
  next_track_button: "⏭️",
  play_or_pause_button: "⏯️",
  arrow_backward: "◀️",
  rewind: "⏪",
  previous_track_button: "⏮️",
  arrow_up_small: "🔼",
  arrow_double_up: "⏫",
  arrow_down_small: "🔽",
  arrow_double_down: "⏬",
  pause_button: "⏸️",
  stop_button: "⏹️",
  record_button: "⏺️",
  eject_button: "⏏️",
  cinema: "🎦",
  low_brightness: "🔅",
  high_brightness: "🔆",
  signal_strength: "📶",
  wireless: "🛜",
  vibration_mode: "📳",
  mobile_phone_off: "📴",
  female_sign: "♀️",
  male_sign: "♂️",
  transgender_symbol: "⚧️",
  heavy_multiplication_x: "✖️",
  heavy_plus_sign: "➕",
  heavy_minus_sign: "➖",
  heavy_division_sign: "➗",
  heavy_equals_sign: "🟰",
  infinity: "♾️",
  bangbang: "‼️",
  interrobang: "⁉️",
  question: "❓",
  grey_question: "❔",
  grey_exclamation: "❕",
  exclamation: "❗",
  heavy_exclamation_mark: "❗",
  wavy_dash: "〰️",
  currency_exchange: "💱",
  heavy_dollar_sign: "💲",
  medical_symbol: "⚕️",
  recycle: "♻️",
  fleur_de_lis: "⚜️",
  trident: "🔱",
  name_badge: "📛",
  beginner: "🔰",
  o: "⭕",
  white_check_mark: "✅",
  ballot_box_with_check: "☑️",
  heavy_check_mark: "✔️",
  x: "❌",
  negative_squared_cross_mark: "❎",
  curly_loop: "➰",
  loop: "➿",
  part_alternation_mark: "〽️",
  eight_spoked_asterisk: "✳️",
  eight_pointed_black_star: "✴️",
  sparkle: "❇️",
  copyright: "©️",
  registered: "®️",
  tm: "™️",
  hash: "#️⃣",
  asterisk: "*️⃣",
  zero: "0️⃣",
  one: "1️⃣",
  two: "2️⃣",
  three: "3️⃣",
  four: "4️⃣",
  five: "5️⃣",
  six: "6️⃣",
  seven: "7️⃣",
  eight: "8️⃣",
  nine: "9️⃣",
  keycap_ten: "🔟",
  capital_abcd: "🔠",
  abcd: "🔡",
  symbols: "🔣",
  abc: "🔤",
  a: "🅰️",
  ab: "🆎",
  b: "🅱️",
  cl: "🆑",
  cool: "🆒",
  free: "🆓",
  information_source: "ℹ️",
  id: "🆔",
  m: "Ⓜ️",
  new: "🆕",
  ng: "🆖",
  o2: "🅾️",
  ok: "🆗",
  parking: "🅿️",
  sos: "🆘",
  up: "🆙",
  vs: "🆚",
  koko: "🈁",
  sa: "🈂️",
  ideograph_advantage: "🉐",
  accept: "🉑",
  congratulations: "㊗️",
  secret: "㊙️",
  u6e80: "🈵",
  red_circle: "🔴",
  orange_circle: "🟠",
  yellow_circle: "🟡",
  green_circle: "🟢",
  large_blue_circle: "🔵",
  purple_circle: "🟣",
  brown_circle: "🟤",
  black_circle: "⚫",
  white_circle: "⚪",
  red_square: "🟥",
  orange_square: "🟧",
  yellow_square: "🟨",
  green_square: "🟩",
  blue_square: "🟦",
  purple_square: "🟪",
  brown_square: "🟫",
  black_large_square: "⬛",
  white_large_square: "⬜",
  black_medium_square: "◼️",
  white_medium_square: "◻️",
  black_medium_small_square: "◾",
  white_medium_small_square: "◽",
  black_small_square: "▪️",
  white_small_square: "▫️",
  large_orange_diamond: "🔶",
  large_blue_diamond: "🔷",
  small_orange_diamond: "🔸",
  small_blue_diamond: "🔹",
  small_red_triangle: "🔺",
  small_red_triangle_down: "🔻",
  diamond_shape_with_a_dot_inside: "💠",
  radio_button: "🔘",
  white_square_button: "🔳",
  black_square_button: "🔲",
  checkered_flag: "🏁",
  triangular_flag_on_post: "🚩",
  crossed_flags: "🎌",
  black_flag: "🏴",
  white_flag: "🏳️",
  rainbow_flag: "🏳️‍🌈",
  transgender_flag: "🏳️‍⚧️",
  pirate_flag: "🏴‍☠️",
  ascension_island: "🇦🇨",
  andorra: "🇦🇩",
  united_arab_emirates: "🇦🇪",
  afghanistan: "🇦🇫",
  antigua_barbuda: "🇦🇬",
  anguilla: "🇦🇮",
  albania: "🇦🇱",
  armenia: "🇦🇲",
  angola: "🇦🇴",
  antarctica: "🇦🇶",
  argentina: "🇦🇷",
  american_samoa: "🇦🇸",
  austria: "🇦🇹",
  australia: "🇦🇺",
  aruba: "🇦🇼",
  aland_islands: "🇦🇽",
  azerbaijan: "🇦🇿",
  bosnia_herzegovina: "🇧🇦",
  barbados: "🇧🇧",
  bangladesh: "🇧🇩",
  belgium: "🇧🇪",
  burkina_faso: "🇧🇫",
  bulgaria: "🇧🇬",
  bahrain: "🇧🇭",
  burundi: "🇧🇮",
  benin: "🇧🇯",
  st_barthelemy: "🇧🇱",
  bermuda: "🇧🇲",
  brunei: "🇧🇳",
  bolivia: "🇧🇴",
  caribbean_netherlands: "🇧🇶",
  brazil: "🇧🇷",
  bahamas: "🇧🇸",
  bhutan: "🇧🇹",
  bouvet_island: "🇧🇻",
  botswana: "🇧🇼",
  belarus: "🇧🇾",
  belize: "🇧🇿",
  canada: "🇨🇦",
  cocos_islands: "🇨🇨",
  congo_kinshasa: "🇨🇩",
  central_african_republic: "🇨🇫",
  congo_brazzaville: "🇨🇬",
  switzerland: "🇨🇭",
  cote_divoire: "🇨🇮",
  cook_islands: "🇨🇰",
  chile: "🇨🇱",
  cameroon: "🇨🇲",
  cn: "🇨🇳",
  colombia: "🇨🇴",
  clipperton_island: "🇨🇵",
  costa_rica: "🇨🇷",
  cuba: "🇨🇺",
  cape_verde: "🇨🇻",
  curacao: "🇨🇼",
  christmas_island: "🇨🇽",
  cyprus: "🇨🇾",
  czech_republic: "🇨🇿",
  de: "🇩🇪",
  diego_garcia: "🇩🇬",
  djibouti: "🇩🇯",
  denmark: "🇩🇰",
  dominica: "🇩🇲",
  dominican_republic: "🇩🇴",
  algeria: "🇩🇿",
  ceuta_melilla: "🇪🇦",
  ecuador: "🇪🇨",
  estonia: "🇪🇪",
  egypt: "🇪🇬",
  western_sahara: "🇪🇭",
  eritrea: "🇪🇷",
  es: "🇪🇸",
  ethiopia: "🇪🇹",
  eu: "🇪🇺",
  european_union: "🇪🇺",
  finland: "🇫🇮",
  fiji: "🇫🇯",
  falkland_islands: "🇫🇰",
  micronesia: "🇫🇲",
  faroe_islands: "🇫🇴",
  fr: "🇫🇷",
  gabon: "🇬🇦",
  gb: "🇬🇧",
  uk: "🇬🇧",
  grenada: "🇬🇩",
  georgia: "🇬🇪",
  french_guiana: "🇬🇫",
  guernsey: "🇬🇬",
  ghana: "🇬🇭",
  gibraltar: "🇬🇮",
  greenland: "🇬🇱",
  gambia: "🇬🇲",
  guinea: "🇬🇳",
  guadeloupe: "🇬🇵",
  equatorial_guinea: "🇬🇶",
  greece: "🇬🇷",
  south_georgia_south_sandwich_islands: "🇬🇸",
  guatemala: "🇬🇹",
  guam: "🇬🇺",
  guinea_bissau: "🇬🇼",
  guyana: "🇬🇾",
  hong_kong: "🇭🇰",
  heard_mcdonald_islands: "🇭🇲",
  honduras: "🇭🇳",
  croatia: "🇭🇷",
  haiti: "🇭🇹",
  hungary: "🇭🇺",
  canary_islands: "🇮🇨",
  indonesia: "🇮🇩",
  ireland: "🇮🇪",
  israel: "🇮🇱",
  isle_of_man: "🇮🇲",
  india: "🇮🇳",
  british_indian_ocean_territory: "🇮🇴",
  iraq: "🇮🇶",
  iran: "🇮🇷",
  iceland: "🇮🇸",
  it: "🇮🇹",
  jersey: "🇯🇪",
  jamaica: "🇯🇲",
  jordan: "🇯🇴",
  jp: "🇯🇵",
  kenya: "🇰🇪",
  kyrgyzstan: "🇰🇬",
  cambodia: "🇰🇭",
  kiribati: "🇰🇮",
  comoros: "🇰🇲",
  st_kitts_nevis: "🇰🇳",
  north_korea: "🇰🇵",
  kr: "🇰🇷",
  kuwait: "🇰🇼",
  cayman_islands: "🇰🇾",
  kazakhstan: "🇰🇿",
  laos: "🇱🇦",
  lebanon: "🇱🇧",
  st_lucia: "🇱🇨",
  liechtenstein: "🇱🇮",
  sri_lanka: "🇱🇰",
  liberia: "🇱🇷",
  lesotho: "🇱🇸",
  lithuania: "🇱🇹",
  luxembourg: "🇱🇺",
  latvia: "🇱🇻",
  libya: "🇱🇾",
  morocco: "🇲🇦",
  monaco: "🇲🇨",
  moldova: "🇲🇩",
  montenegro: "🇲🇪",
  st_martin: "🇲🇫",
  madagascar: "🇲🇬",
  marshall_islands: "🇲🇭",
  macedonia: "🇲🇰",
  mali: "🇲🇱",
  myanmar: "🇲🇲",
  mongolia: "🇲🇳",
  macau: "🇲🇴",
  northern_mariana_islands: "🇲🇵",
  martinique: "🇲🇶",
  mauritania: "🇲🇷",
  montserrat: "🇲🇸",
  malta: "🇲🇹",
  mauritius: "🇲🇺",
  maldives: "🇲🇻",
  malawi: "🇲🇼",
  mexico: "🇲🇽",
  malaysia: "🇲🇾",
  mozambique: "🇲🇿",
  namibia: "🇳🇦",
  new_caledonia: "🇳🇨",
  niger: "🇳🇪",
  norfolk_island: "🇳🇫",
  nigeria: "🇳🇬",
  nicaragua: "🇳🇮",
  netherlands: "🇳🇱",
  norway: "🇳🇴",
  nepal: "🇳🇵",
  nauru: "🇳🇷",
  niue: "🇳🇺",
  new_zealand: "🇳🇿",
  oman: "🇴🇲",
  panama: "🇵🇦",
  peru: "🇵🇪",
  french_polynesia: "🇵🇫",
  papua_new_guinea: "🇵🇬",
  philippines: "🇵🇭",
  pakistan: "🇵🇰",
  poland: "🇵🇱",
  st_pierre_miquelon: "🇵🇲",
  pitcairn_islands: "🇵🇳",
  puerto_rico: "🇵🇷",
  palestinian_territories: "🇵🇸",
  portugal: "🇵🇹",
  palau: "🇵🇼",
  paraguay: "🇵🇾",
  qatar: "🇶🇦",
  reunion: "🇷🇪",
  romania: "🇷🇴",
  serbia: "🇷🇸",
  ru: "🇷🇺",
  rwanda: "🇷🇼",
  saudi_arabia: "🇸🇦",
  solomon_islands: "🇸🇧",
  seychelles: "🇸🇨",
  sudan: "🇸🇩",
  sweden: "🇸🇪",
  singapore: "🇸🇬",
  st_helena: "🇸🇭",
  slovenia: "🇸🇮",
  svalbard_jan_mayen: "🇸🇯",
  slovakia: "🇸🇰",
  sierra_leone: "🇸🇱",
  san_marino: "🇸🇲",
  senegal: "🇸🇳",
  somalia: "🇸🇴",
  suriname: "🇸🇷",
  south_sudan: "🇸🇸",
  sao_tome_principe: "🇸🇹",
  el_salvador: "🇸🇻",
  sint_maarten: "🇸🇽",
  syria: "🇸🇾",
  swaziland: "🇸🇿",
  tristan_da_cunha: "🇹🇦",
  turks_caicos_islands: "🇹🇨",
  chad: "🇹🇩",
  french_southern_territories: "🇹🇫",
  togo: "🇹🇬",
  thailand: "🇹🇭",
  tajikistan: "🇹🇯",
  tokelau: "🇹🇰",
  timor_leste: "🇹🇱",
  turkmenistan: "🇹🇲",
  tunisia: "🇹🇳",
  tonga: "🇹🇴",
  tr: "🇹🇷",
  trinidad_tobago: "🇹🇹",
  tuvalu: "🇹🇻",
  taiwan: "🇹🇼",
  tanzania: "🇹🇿",
  ukraine: "🇺🇦",
  uganda: "🇺🇬",
  us_outlying_islands: "🇺🇲",
  united_nations: "🇺🇳",
  us: "🇺🇸",
  uruguay: "🇺🇾",
  uzbekistan: "🇺🇿",
  vatican_city: "🇻🇦",
  st_vincent_grenadines: "🇻🇨",
  venezuela: "🇻🇪",
  british_virgin_islands: "🇻🇬",
  us_virgin_islands: "🇻🇮",
  vietnam: "🇻🇳",
  vanuatu: "🇻🇺",
  wallis_futuna: "🇼🇫",
  samoa: "🇼🇸",
  kosovo: "🇽🇰",
  yemen: "🇾🇪",
  mayotte: "🇾🇹",
  south_africa: "🇿🇦",
  zambia: "🇿🇲",
  zimbabwe: "🇿🇼",
  england: "🏴󠁧󠁢󠁥󠁮󠁧󠁿",
  scotland: "🏴󠁧󠁢󠁳󠁣󠁴󠁿",
  wales: "🏴󠁧󠁢󠁷󠁬󠁳󠁿"
};
function u0e(e, t) {
  const r = {
    defs: l0e,
    shortcuts: s0e,
    enabled: []
  }, a = e.utils.assign({}, r, t || {});
  o0e(e, a);
}
var i9 = Object.defineProperty, c0e = Object.defineProperties, f0e = Object.getOwnPropertyDescriptor, h0e = Object.getOwnPropertyDescriptors, d0e = Object.getOwnPropertyNames, XN = Object.getOwnPropertySymbols, vW = Object.prototype.hasOwnProperty, p0e = Object.prototype.propertyIsEnumerable, KN = (e, t, r) => t in e ? i9(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, TE = (e, t) => {
  for (var r in t || (t = {}))
    vW.call(t, r) && KN(e, r, t[r]);
  if (XN)
    for (var r of XN(t))
      p0e.call(t, r) && KN(e, r, t[r]);
  return e;
}, m0e = (e, t) => c0e(e, h0e(t)), g0e = (e, t) => {
  for (var r in t)
    i9(e, r, { get: t[r], enumerable: !0 });
}, y0e = (e, t, r, a) => {
  if (t && typeof t == "object" || typeof t == "function")
    for (let v of d0e(t))
      !vW.call(e, v) && v !== r && i9(e, v, { get: () => t[v], enumerable: !(a = f0e(t, v)) || a.enumerable });
  return e;
}, v0e = (e) => y0e(i9({}, "__esModule", { value: !0 }), e), xW = {};
g0e(xW, {
  default: () => kD
});
var x0e = v0e(xW);
function b0e(e, t) {
  for (const [r, a] of Object.entries(t))
    e.registerLanguage(r, a);
}
function bW(e, t, r, a, v) {
  try {
    return t.highlight(a, { language: v !== "" ? v : "plaintext", ignoreIllegals: r }).value;
  } catch {
    return e.utils.escapeHtml(a);
  }
}
function _0e(e, t, r, a, v) {
  if (v !== "")
    return bW(e, t, r, a, v);
  try {
    return t.highlightAuto(a).value;
  } catch {
    return e.utils.escapeHtml(a);
  }
}
function MS(e) {
  return function(...r) {
    return e(...r).replace(/<code class="/g, '<code class="hljs ').replace(/<code>/g, '<code class="hljs">');
  };
}
function w0e(e) {
  var t, r;
  for (const a of e.tokens)
    if (a.type === "inline" && a.children != null)
      for (const [v, o] of a.children.entries()) {
        if (o.type !== "code_inline")
          continue;
        const s = a.children[v + 1];
        if (s == null)
          continue;
        const n = /^{:?\.([^}]+)}/.exec(s.content);
        if (n == null)
          continue;
        const l = n[1];
        s.content = s.content.slice(n[0].length);
        let u = (t = o.attrGet("class")) != null ? t : "";
        u += `${(r = e.md.options.langPrefix) != null ? r : "language-"}${l}`, o.attrSet("class", u), o.meta = m0e(TE({}, o.meta), { highlightLanguage: l });
      }
}
function k0e(e, t, r, a, v) {
  var o, s;
  const n = e[t];
  if (r.highlight == null)
    throw new Error("`options.highlight` was null, this is not supposed to happen");
  const l = r.highlight(n.content, (s = (o = n.meta) == null ? void 0 : o.highlightLanguage) != null ? s : "", "");
  return `<code${v.renderAttrs(n)}>${l}</code>`;
}
function kD(e, t) {
  const r = TE(TE({}, kD.defaults), t);
  if (r.hljs == null)
    throw new Error("Please pass a highlight.js instance for the required `hljs` option.");
  r.register != null && b0e(r.hljs, r.register), e.options.highlight = (r.auto ? _0e : bW).bind(null, e, r.hljs, r.ignoreIllegals), e.renderer.rules.fence != null && (e.renderer.rules.fence = MS(e.renderer.rules.fence)), r.code && e.renderer.rules.code_block != null && (e.renderer.rules.code_block = MS(e.renderer.rules.code_block)), r.inline && (e.core.ruler.before("linkify", "inline_code_language", w0e), e.renderer.rules.code_inline = MS(k0e));
}
kD.defaults = {
  auto: !1,
  code: !1,
  inline: !1,
  ignoreIllegals: !1
};
var T0e = x0e.default;
const A0e = /* @__PURE__ */ cD(T0e), S0e = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;
function M0e(e, t) {
  const r = e.posMax, a = e.pos;
  if (e.src.charCodeAt(a) !== 126 || t || a + 2 >= r)
    return !1;
  e.pos = a + 1;
  let v = !1;
  for (; e.pos < r; ) {
    if (e.src.charCodeAt(e.pos) === 126) {
      v = !0;
      break;
    }
    e.md.inline.skipToken(e);
  }
  if (!v || a + 1 === e.pos)
    return e.pos = a, !1;
  const o = e.src.slice(a + 1, e.pos);
  if (o.match(/(^|[^\\])(\\\\)*\s/))
    return e.pos = a, !1;
  e.posMax = e.pos, e.pos = a + 1;
  const s = e.push("sub_open", "sub", 1);
  s.markup = "~";
  const n = e.push("text", "", 0);
  n.content = o.replace(S0e, "$1");
  const l = e.push("sub_close", "sub", -1);
  return l.markup = "~", e.pos = e.posMax + 1, e.posMax = r, !0;
}
function E0e(e) {
  e.inline.ruler.after("emphasis", "sub", M0e);
}
const C0e = /\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;
function I0e(e, t) {
  const r = e.posMax, a = e.pos;
  if (e.src.charCodeAt(a) !== 94 || t || a + 2 >= r)
    return !1;
  e.pos = a + 1;
  let v = !1;
  for (; e.pos < r; ) {
    if (e.src.charCodeAt(e.pos) === 94) {
      v = !0;
      break;
    }
    e.md.inline.skipToken(e);
  }
  if (!v || a + 1 === e.pos)
    return e.pos = a, !1;
  const o = e.src.slice(a + 1, e.pos);
  if (o.match(/(^|[^\\])(\\\\)*\s/))
    return e.pos = a, !1;
  e.posMax = e.pos, e.pos = a + 1;
  const s = e.push("sup_open", "sup", 1);
  s.markup = "^";
  const n = e.push("text", "", 0);
  n.content = o.replace(C0e, "$1");
  const l = e.push("sup_close", "sup", -1);
  return l.markup = "^", e.pos = e.posMax + 1, e.posMax = r, !0;
}
function D0e(e) {
  e.inline.ruler.after("emphasis", "sup", I0e);
}
function L0e(e) {
  return typeof e == "string" || e instanceof String;
}
async function P0e(e, t) {
  let r = -1;
  const a = () => {
    r = setInterval(e, t);
  }, v = () => {
    r && (clearInterval(r), r = -1);
  };
  return await e(), a(), v;
}
function O0e() {
  return window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
}
function JN(e, t, r) {
  const a = Math.floor(Math.random() * (r - t + 1)) + t;
  return e * a;
}
function z0e() {
  return crypto.randomUUID();
}
const R0e = ["innerHTML"], F0e = /* @__PURE__ */ Bh({
  __name: "MarkdownWidget",
  props: {
    source: {}
  },
  setup(e) {
    N_.registerLanguage("python", phe), N_.registerLanguage("sql", mhe), N_.registerLanguage("json", dhe), N_.registerLanguage("xml", ghe);
    const t = e, r = Id({
      html: !0,
      linkify: !0,
      typographer: !0
    }).use(u0e).use(E0e).use(D0e).use(xfe).use(A0e, { inline: !0, hljs: N_ }), a = Hu(() => {
      let v = t.source;
      return L0e(v) || (v = JSON.stringify(v, null, 2), v = "```json\n" + v + "\n```"), r.render(v);
    });
    return (v, o) => (Va(), ns("div", {
      class: "markdown",
      innerHTML: a.value
    }, null, 8, R0e));
  }
});
var _W = { exports: {} };
(function(e, t) {
  /*! For license information please see plotly.min.js.LICENSE.txt */
  (function(r, a) {
    e.exports = a();
  })(self, function() {
    return function() {
      var r = { 6713: function(o, s, n) {
        var l = n(34809), u = { "X,X div": 'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;', "X input,X button": 'font-family:"Open Sans",verdana,arial,sans-serif;', "X input:focus,X button:focus": "outline:none;", "X a": "text-decoration:none;", "X a:hover": "text-decoration:none;", "X .crisp": "shape-rendering:crispEdges;", "X .user-select-none": "-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;", "X svg": "overflow:hidden;", "X svg a": "fill:#447adb;", "X svg a:hover": "fill:#3c6dc5;", "X .main-svg": "position:absolute;top:0;left:0;pointer-events:none;", "X .main-svg .draglayer": "pointer-events:all;", "X .cursor-default": "cursor:default;", "X .cursor-pointer": "cursor:pointer;", "X .cursor-crosshair": "cursor:crosshair;", "X .cursor-move": "cursor:move;", "X .cursor-col-resize": "cursor:col-resize;", "X .cursor-row-resize": "cursor:row-resize;", "X .cursor-ns-resize": "cursor:ns-resize;", "X .cursor-ew-resize": "cursor:ew-resize;", "X .cursor-sw-resize": "cursor:sw-resize;", "X .cursor-s-resize": "cursor:s-resize;", "X .cursor-se-resize": "cursor:se-resize;", "X .cursor-w-resize": "cursor:w-resize;", "X .cursor-e-resize": "cursor:e-resize;", "X .cursor-nw-resize": "cursor:nw-resize;", "X .cursor-n-resize": "cursor:n-resize;", "X .cursor-ne-resize": "cursor:ne-resize;", "X .cursor-grab": "cursor:-webkit-grab;cursor:grab;", "X .modebar": "position:absolute;top:2px;right:2px;", "X .ease-bg": "-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;", "X .modebar--hover>:not(.watermark)": "opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;", "X:hover .modebar--hover .modebar-group": "opacity:1;", "X .modebar-group": "float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;", "X .modebar-btn": "position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;", "X .modebar-btn svg": "position:relative;top:2px;", "X .modebar.vertical": "display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;", "X .modebar.vertical svg": "top:-1px;", "X .modebar.vertical .modebar-group": "display:block;float:none;padding-left:0px;padding-bottom:8px;", "X .modebar.vertical .modebar-group .modebar-btn": "display:block;text-align:center;", "X [data-title]:before,X [data-title]:after": "position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;", "X [data-title]:hover:before,X [data-title]:hover:after": "display:block;opacity:1;", "X [data-title]:before": 'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;', "X [data-title]:after": "content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;", "X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;", "X .vertical [data-title]:before": "border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;", Y: 'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;', "Y p": "margin:0;", "Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;", "Y .notifier-close": "color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;", "Y .notifier-close:hover": "color:#444;text-decoration:none;cursor:pointer;" };
        for (var i in u) {
          var h = i.replace(/^,/, " ,").replace(/X/g, ".js-plotly-plot .plotly").replace(/Y/g, ".plotly-notifier");
          l.addStyleRule(h, u[i]);
        }
      }, 14187: function(o, s, n) {
        o.exports = n(47908);
      }, 20273: function(o, s, n) {
        o.exports = n(58218);
      }, 6457: function(o, s, n) {
        o.exports = n(89362);
      }, 15849: function(o, s, n) {
        o.exports = n(53794);
      }, 38847: function(o, s, n) {
        o.exports = n(29698);
      }, 7659: function(o, s, n) {
        o.exports = n(51252);
      }, 60089: function(o, s, n) {
        o.exports = n(48050);
      }, 22084: function(o, s, n) {
        o.exports = n(58075);
      }, 35892: function(o, s, n) {
        o.exports = n(9419);
      }, 81204: function(o, s, n) {
        o.exports = n(28128);
      }, 55857: function(o, s, n) {
        o.exports = n(47050);
      }, 12862: function(o, s, n) {
        o.exports = n(91405);
      }, 97629: function(o, s, n) {
        o.exports = n(34406);
      }, 67549: function(o, s, n) {
        o.exports = n(17430);
      }, 2660: function(o, s, n) {
        o.exports = n(91995);
      }, 86071: function(o, s, n) {
        o.exports = n(81264);
      }, 66200: function(o, s, n) {
        o.exports = n(42849);
      }, 53446: function(o, s, n) {
        o.exports = n(52213);
      }, 86899: function(o, s, n) {
        o.exports = n(91132);
      }, 13430: function(o, s, n) {
        o.exports = n(50453);
      }, 21548: function(o, s, n) {
        o.exports = n(29251);
      }, 53939: function(o, s, n) {
        o.exports = n(72892);
      }, 1902: function(o, s, n) {
        o.exports = n(74461);
      }, 29096: function(o, s, n) {
        o.exports = n(66143);
      }, 23820: function(o, s, n) {
        o.exports = n(81955);
      }, 82017: function(o, s, n) {
        o.exports = n(36858);
      }, 113: function(o, s, n) {
        o.exports = n(92106);
      }, 20260: function(o, s, n) {
        var l = n(67549);
        l.register([n(20273), n(15849), n(21548), n(1902), n(29096), n(23820), n(12862), n(1639), n(10067), n(53446), n(31014), n(113), n(78170), n(8202), n(92382), n(82017), n(86899), n(54357), n(66903), n(90594), n(71680), n(7412), n(55857), n(784), n(74221), n(22084), n(44001), n(97281), n(12345), n(53939), n(29117), n(5410), n(5057), n(81204), n(86071), n(14226), n(35892), n(2660), n(96599), n(28573), n(76832), n(60089), n(51469), n(97629), n(27700), n(7659), n(11780), n(27195), n(6457), n(84639), n(14187), n(66200), n(13430), n(90590), n(38847)]), o.exports = l;
      }, 28573: function(o, s, n) {
        o.exports = n(25638);
      }, 90594: function(o, s, n) {
        o.exports = n(75297);
      }, 7412: function(o, s, n) {
        o.exports = n(58859);
      }, 27700: function(o, s, n) {
        o.exports = n(12683);
      }, 5410: function(o, s, n) {
        o.exports = n(6305);
      }, 29117: function(o, s, n) {
        o.exports = n(83910);
      }, 78170: function(o, s, n) {
        o.exports = n(49913);
      }, 12345: function(o, s, n) {
        o.exports = n(15186);
      }, 96599: function(o, s, n) {
        o.exports = n(71760);
      }, 54357: function(o, s, n) {
        o.exports = n(17822);
      }, 51469: function(o, s, n) {
        o.exports = n(56534);
      }, 74221: function(o, s, n) {
        o.exports = n(18070);
      }, 44001: function(o, s, n) {
        o.exports = n(52378);
      }, 14226: function(o, s, n) {
        o.exports = n(30929);
      }, 5057: function(o, s, n) {
        o.exports = n(83866);
      }, 11780: function(o, s, n) {
        o.exports = n(66939);
      }, 27195: function(o, s, n) {
        o.exports = n(23748);
      }, 84639: function(o, s, n) {
        o.exports = n(73304);
      }, 1639: function(o, s, n) {
        o.exports = n(12864);
      }, 90590: function(o, s, n) {
        o.exports = n(99855);
      }, 97281: function(o, s, n) {
        o.exports = n(91450);
      }, 784: function(o, s, n) {
        o.exports = n(51943);
      }, 8202: function(o, s, n) {
        o.exports = n(80809);
      }, 66903: function(o, s, n) {
        o.exports = n(95984);
      }, 76832: function(o, s, n) {
        o.exports = n(51671);
      }, 92382: function(o, s, n) {
        o.exports = n(47181);
      }, 10067: function(o, s, n) {
        o.exports = n(37276);
      }, 71680: function(o, s, n) {
        o.exports = n(75703);
      }, 31014: function(o, s, n) {
        o.exports = n(38261);
      }, 11645: function(o) {
        o.exports = [{ path: "", backoff: 0 }, { path: "M-2.4,-3V3L0.6,0Z", backoff: 0.6 }, { path: "M-3.7,-2.5V2.5L1.3,0Z", backoff: 1.3 }, { path: "M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z", backoff: 1.55 }, { path: "M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z", backoff: 1.6 }, { path: "M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z", backoff: 2 }, { path: "M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z", backoff: 0, noRotate: !0 }, { path: "M2,2V-2H-2V2Z", backoff: 0, noRotate: !0 }];
      }, 50222: function(o, s, n) {
        var l = n(11645), u = n(80337), i = n(54826), h = n(78032).templatedArray;
        n(35081), o.exports = h("annotation", { visible: { valType: "boolean", dflt: !0, editType: "calc+arraydraw" }, text: { valType: "string", editType: "calc+arraydraw" }, textangle: { valType: "angle", dflt: 0, editType: "calc+arraydraw" }, font: u({ editType: "calc+arraydraw", colorEditType: "arraydraw" }), width: { valType: "number", min: 1, dflt: null, editType: "calc+arraydraw" }, height: { valType: "number", min: 1, dflt: null, editType: "calc+arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, align: { valType: "enumerated", values: ["left", "center", "right"], dflt: "center", editType: "arraydraw" }, valign: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "middle", editType: "arraydraw" }, bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, bordercolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, borderpad: { valType: "number", min: 0, dflt: 1, editType: "calc+arraydraw" }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "calc+arraydraw" }, showarrow: { valType: "boolean", dflt: !0, editType: "calc+arraydraw" }, arrowcolor: { valType: "color", editType: "arraydraw" }, arrowhead: { valType: "integer", min: 0, max: l.length, dflt: 1, editType: "arraydraw" }, startarrowhead: { valType: "integer", min: 0, max: l.length, dflt: 1, editType: "arraydraw" }, arrowside: { valType: "flaglist", flags: ["end", "start"], extras: ["none"], dflt: "end", editType: "arraydraw" }, arrowsize: { valType: "number", min: 0.3, dflt: 1, editType: "calc+arraydraw" }, startarrowsize: { valType: "number", min: 0.3, dflt: 1, editType: "calc+arraydraw" }, arrowwidth: { valType: "number", min: 0.1, editType: "calc+arraydraw" }, standoff: { valType: "number", min: 0, dflt: 0, editType: "calc+arraydraw" }, startstandoff: { valType: "number", min: 0, dflt: 0, editType: "calc+arraydraw" }, ax: { valType: "any", editType: "calc+arraydraw" }, ay: { valType: "any", editType: "calc+arraydraw" }, axref: { valType: "enumerated", dflt: "pixel", values: ["pixel", i.idRegex.x.toString()], editType: "calc" }, ayref: { valType: "enumerated", dflt: "pixel", values: ["pixel", i.idRegex.y.toString()], editType: "calc" }, xref: { valType: "enumerated", values: ["paper", i.idRegex.x.toString()], editType: "calc" }, x: { valType: "any", editType: "calc+arraydraw" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "auto", editType: "calc+arraydraw" }, xshift: { valType: "number", dflt: 0, editType: "calc+arraydraw" }, yref: { valType: "enumerated", values: ["paper", i.idRegex.y.toString()], editType: "calc" }, y: { valType: "any", editType: "calc+arraydraw" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "auto", editType: "calc+arraydraw" }, yshift: { valType: "number", dflt: 0, editType: "calc+arraydraw" }, clicktoshow: { valType: "enumerated", values: [!1, "onoff", "onout"], dflt: !1, editType: "arraydraw" }, xclick: { valType: "any", editType: "arraydraw" }, yclick: { valType: "any", editType: "arraydraw" }, hovertext: { valType: "string", editType: "arraydraw" }, hoverlabel: { bgcolor: { valType: "color", editType: "arraydraw" }, bordercolor: { valType: "color", editType: "arraydraw" }, font: u({ editType: "arraydraw" }), editType: "arraydraw" }, captureevents: { valType: "boolean", editType: "arraydraw" }, editType: "calc", _deprecated: { ref: { valType: "string", editType: "calc" } } });
      }, 60317: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(3377).draw;
        function h(_) {
          var d = _._fullLayout;
          l.filterVisible(d.annotations).forEach(function(f) {
            var c = u.getFromId(_, f.xref), g = u.getFromId(_, f.yref), m = u.getRefType(f.xref), x = u.getRefType(f.yref);
            f._extremes = {}, m === "range" && p(f, c), x === "range" && p(f, g);
          });
        }
        function p(_, d) {
          var f, c = d._id, g = c.charAt(0), m = _[g], x = _["a" + g], w = _[g + "ref"], k = _["a" + g + "ref"], S = _["_" + g + "padplus"], A = _["_" + g + "padminus"], C = { x: 1, y: -1 }[g] * _[g + "shift"], D = 3 * _.arrowsize * _.arrowwidth || 0, L = D + C, E = D - C, P = 3 * _.startarrowsize * _.arrowwidth || 0, I = P + C, M = P - C;
          if (k === w) {
            var O = u.findExtremes(d, [d.r2c(m)], { ppadplus: L, ppadminus: E }), T = u.findExtremes(d, [d.r2c(x)], { ppadplus: Math.max(S, I), ppadminus: Math.max(A, M) });
            f = { min: [O.min[0], T.min[0]], max: [O.max[0], T.max[0]] };
          } else I = x ? I + x : I, M = x ? M - x : M, f = u.findExtremes(d, [d.r2c(m)], { ppadplus: Math.max(S, L, I), ppadminus: Math.max(A, E, M) });
          _._extremes[c] = f;
        }
        o.exports = function(_) {
          var d = _._fullLayout;
          if (l.filterVisible(d.annotations).length && _._fullData.length) return l.syncOrAsync([i, h], _);
        };
      }, 6035: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(78032).arrayEditor;
        function h(_, d) {
          var f, c, g, m, x, w, k, S = _._fullLayout.annotations, A = [], C = [], D = [], L = (d || []).length;
          for (f = 0; f < S.length; f++) if (m = (g = S[f]).clicktoshow) {
            for (c = 0; c < L; c++) if (w = (x = d[c]).xaxis, k = x.yaxis, w._id === g.xref && k._id === g.yref && w.d2r(x.x) === p(g._xclick, w) && k.d2r(x.y) === p(g._yclick, k)) {
              (g.visible ? m === "onout" ? C : D : A).push(f);
              break;
            }
            c === L && g.visible && m === "onout" && C.push(f);
          }
          return { on: A, off: C, explicitOff: D };
        }
        function p(_, d) {
          return d.type === "log" ? d.l2r(_) : d.d2r(_);
        }
        o.exports = { hasClickToShow: function(_, d) {
          var f = h(_, d);
          return f.on.length > 0 || f.explicitOff.length > 0;
        }, onClick: function(_, d) {
          var f, c, g = h(_, d), m = g.on, x = g.off.concat(g.explicitOff), w = {}, k = _._fullLayout.annotations;
          if (m.length || x.length) {
            for (f = 0; f < m.length; f++) (c = i(_.layout, "annotations", k[m[f]])).modifyItem("visible", !0), l.extendFlat(w, c.getUpdateObj());
            for (f = 0; f < x.length; f++) (c = i(_.layout, "annotations", k[x[f]])).modifyItem("visible", !1), l.extendFlat(w, c.getUpdateObj());
            return u.call("update", _, {}, w);
          }
        } };
      }, 53271: function(o, s, n) {
        var l = n(34809), u = n(78766);
        o.exports = function(i, h, p, _) {
          _("opacity");
          var d = _("bgcolor"), f = _("bordercolor"), c = u.opacity(f);
          _("borderpad");
          var g = _("borderwidth"), m = _("showarrow");
          if (_("text", m ? " " : p._dfltTitle.annotation), _("textangle"), l.coerceFont(_, "font", p.font), _("width"), _("align"), _("height") && _("valign"), m) {
            var x, w, k = _("arrowside");
            k.indexOf("end") !== -1 && (x = _("arrowhead"), w = _("arrowsize")), k.indexOf("start") !== -1 && (_("startarrowhead", x), _("startarrowsize", w)), _("arrowcolor", c ? h.bordercolor : u.defaultLine), _("arrowwidth", 2 * (c && g || 1)), _("standoff"), _("startstandoff");
          }
          var S = _("hovertext"), A = p.hoverlabel || {};
          if (S) {
            var C = _("hoverlabel.bgcolor", A.bgcolor || (u.opacity(d) ? u.rgb(d) : u.defaultLine)), D = _("hoverlabel.bordercolor", A.bordercolor || u.contrast(C)), L = l.extendFlat({}, A.font);
            L.color || (L.color = D), l.coerceFont(_, "hoverlabel.font", L);
          }
          _("captureevents", !!S);
        };
      }, 59741: function(o, s, n) {
        var l = n(10721), u = n(8083);
        o.exports = function(i, h, p, _) {
          h = h || {};
          var d = p === "log" && h.type === "linear", f = p === "linear" && h.type === "log";
          if (d || f) for (var c, g, m = i._fullLayout.annotations, x = h._id.charAt(0), w = 0; w < m.length; w++) c = m[w], g = "annotations[" + w + "].", c[x + "ref"] === h._id && k(x), c["a" + x + "ref"] === h._id && k("a" + x);
          function k(S) {
            var A = c[S], C = null;
            C = d ? u(A, h.range) : Math.pow(10, A), l(C) || (C = null), _(g + S, C);
          }
        };
      }, 63737: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(59008), h = n(53271), p = n(50222);
        function _(d, f, c) {
          function g(T, z) {
            return l.coerce(d, f, p, T, z);
          }
          var m = g("visible"), x = g("clicktoshow");
          if (m || x) {
            h(d, f, c, g);
            for (var w = f.showarrow, k = ["x", "y"], S = [-10, -30], A = { _fullLayout: c }, C = 0; C < 2; C++) {
              var D = k[C], L = u.coerceRef(d, f, A, D, "", "paper");
              if (L !== "paper" && u.getFromId(A, L)._annIndices.push(f._index), u.coercePosition(f, A, g, L, D, 0.5), w) {
                var E = "a" + D, P = u.coerceRef(d, f, A, E, "pixel", ["pixel", "paper"]);
                P !== "pixel" && P !== L && (P = f[E] = "pixel");
                var I = P === "pixel" ? S[C] : 0.4;
                u.coercePosition(f, A, g, P, E, I);
              }
              g(D + "anchor"), g(D + "shift");
            }
            if (l.noneOrAll(d, f, ["x", "y"]), w && l.noneOrAll(d, f, ["ax", "ay"]), x) {
              var M = g("xclick"), O = g("yclick");
              f._xclick = M === void 0 ? f.x : u.cleanPosition(M, A, f.xref), f._yclick = O === void 0 ? f.y : u.cleanPosition(O, A, f.yref);
            }
          }
        }
        o.exports = function(d, f) {
          i(d, f, { name: "annotations", handleItemDefaults: _ });
        };
      }, 3377: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(44122), h = n(34809), p = h.strTranslate, _ = n(29714), d = n(78766), f = n(62203), c = n(32141), g = n(30635), m = n(27983), x = n(14751), w = n(78032).arrayEditor, k = n(23768);
        function S(D, L) {
          var E = D._fullLayout.annotations[L] || {}, P = _.getFromId(D, E.xref), I = _.getFromId(D, E.yref);
          P && P.setScale(), I && I.setScale(), C(D, E, L, !1, P, I);
        }
        function A(D, L, E, P, I) {
          var M = I[E], O = I[E + "ref"], T = E.indexOf("y") !== -1, z = _.getRefType(O) === "domain", F = T ? P.h : P.w;
          return D ? z ? M + (T ? -L : L) / D._length : D.p2r(D.r2p(M) + L) : M + (T ? -L : L) / F;
        }
        function C(D, L, E, P, I, M) {
          var O, T, z = D._fullLayout, F = D._fullLayout._size, U = D._context.edits;
          P ? (O = "annotation-" + P, T = P + ".annotations") : (O = "annotation", T = "annotations");
          var V = w(D.layout, T, L), $ = V.modifyBase, q = V.modifyItem, K = V.getUpdateObj;
          z._infolayer.selectAll("." + O + '[data-index="' + E + '"]').remove();
          var re = "clip" + z._uid + "_ann" + E;
          if (L._input && L.visible !== !1) {
            var Y = { x: {}, y: {} }, te = +L.textangle || 0, ee = z._infolayer.append("g").classed(O, !0).attr("data-index", String(E)).style("opacity", L.opacity), X = ee.append("g").classed("annotation-text-g", !0), Q = U[L.showarrow ? "annotationTail" : "annotationPosition"], ue = L.captureevents || U.annotationText || Q, ce = X.append("g").style("pointer-events", ue ? "all" : null).call(m, "pointer").on("click", function() {
              D._dragging = !1, D.emit("plotly_clickannotation", Ae(l.event));
            });
            L.hovertext && ce.on("mouseover", function() {
              var De = L.hoverlabel, Le = De.font, We = this.getBoundingClientRect(), Ee = D.getBoundingClientRect();
              c.loneHover({ x0: We.left - Ee.left, x1: We.right - Ee.left, y: (We.top + We.bottom) / 2 - Ee.top, text: L.hovertext, color: De.bgcolor, borderColor: De.bordercolor, fontFamily: Le.family, fontSize: Le.size, fontColor: Le.color, fontWeight: Le.weight, fontStyle: Le.style, fontVariant: Le.variant, fontShadow: Le.fontShadow, fontLineposition: Le.fontLineposition, fontTextcase: Le.fontTextcase }, { container: z._hoverlayer.node(), outerContainer: z._paper.node(), gd: D });
            }).on("mouseout", function() {
              c.loneUnhover(z._hoverlayer.node());
            });
            var he = L.borderwidth, de = L.borderpad, ne = he + de, ae = ce.append("rect").attr("class", "bg").style("stroke-width", he + "px").call(d.stroke, L.bordercolor).call(d.fill, L.bgcolor), se = L.width || L.height, me = z._topclips.selectAll("#" + re).data(se ? [0] : []);
            me.enter().append("clipPath").classed("annclip", !0).attr("id", re).append("rect"), me.exit().remove();
            var ye = L.font, pe = z._meta ? h.templateString(L.text, z._meta) : L.text, be = ce.append("text").classed("annotation-text", !0).text(pe);
            U.annotationText ? be.call(g.makeEditable, { delegate: ce, gd: D }).call(Se).on("edit", function(De) {
              L.text = De, this.call(Se), q("text", De), I && I.autorange && $(I._name + ".autorange", !0), M && M.autorange && $(M._name + ".autorange", !0), u.call("_guiRelayout", D, K());
            }) : be.call(Se);
          } else l.selectAll("#" + re).remove();
          function Ae(De) {
            var Le = { index: E, annotation: L._input, fullAnnotation: L, event: De };
            return P && (Le.subplotId = P), Le;
          }
          function Se(De) {
            return De.call(f.font, ye).attr({ "text-anchor": { left: "start", right: "end" }[L.align] || "middle" }), g.convertToTspans(De, D, Me), De;
          }
          function Me() {
            var De = be.selectAll("a");
            De.size() === 1 && De.text() === be.text() && ce.insert("a", ":first-child").attr({ "xlink:xlink:href": De.attr("xlink:href"), "xlink:xlink:show": De.attr("xlink:show") }).style({ cursor: "pointer" }).node().appendChild(ae.node());
            var Le = ce.select(".annotation-text-math-group"), We = !Le.empty(), Ee = f.bBox((We ? Le : be).node()), Ne = Ee.width, Ie = Ee.height, ge = L.width || Ne, Ce = L.height || Ie, we = Math.round(ge + 2 * ne), Ge = Math.round(Ce + 2 * ne);
            function Re(Bt, xt) {
              return xt === "auto" && (xt = Bt < 0.3333333333333333 ? "left" : Bt > 0.6666666666666666 ? "right" : "center"), { center: 0, middle: 0, left: 0.5, bottom: -0.5, right: -0.5, top: 0.5 }[xt];
            }
            for (var je = !1, Ke = ["x", "y"], tt = 0; tt < Ke.length; tt++) {
              var _e, Be, $e, Ze, ct, ft = Ke[tt], _t = L[ft + "ref"] || ft, Pt = L["a" + ft + "ref"], Dt = { x: I, y: M }[ft], $t = (te + (ft === "x" ? 0 : -90)) * Math.PI / 180, Gt = we * Math.cos($t), Wt = Ge * Math.sin($t), mt = Math.abs(Gt) + Math.abs(Wt), at = L[ft + "anchor"], vt = L[ft + "shift"] * (ft === "x" ? 1 : -1), St = Y[ft], Je = _.getRefType(_t);
              if (Dt && Je !== "domain") {
                var nt = Dt.r2fraction(L[ft]);
                (nt < 0 || nt > 1) && (Pt === _t ? ((nt = Dt.r2fraction(L["a" + ft])) < 0 || nt > 1) && (je = !0) : je = !0), _e = Dt._offset + Dt.r2p(L[ft]), Ze = 0.5;
              } else {
                var ot = Je === "domain";
                ft === "x" ? ($e = L[ft], _e = ot ? Dt._offset + Dt._length * $e : _e = F.l + F.w * $e) : ($e = 1 - L[ft], _e = ot ? Dt._offset + Dt._length * $e : _e = F.t + F.h * $e), Ze = L.showarrow ? 0.5 : $e;
              }
              if (L.showarrow) {
                St.head = _e;
                var Ye = L["a" + ft];
                if (ct = Gt * Re(0.5, L.xanchor) - Wt * Re(0.5, L.yanchor), Pt === _t) {
                  var Fe = _.getRefType(Pt);
                  Fe === "domain" ? (ft === "y" && (Ye = 1 - Ye), St.tail = Dt._offset + Dt._length * Ye) : Fe === "paper" ? ft === "y" ? (Ye = 1 - Ye, St.tail = F.t + F.h * Ye) : St.tail = F.l + F.w * Ye : St.tail = Dt._offset + Dt.r2p(Ye), Be = ct;
                } else St.tail = _e + Ye, Be = ct + Ye;
                St.text = St.tail + ct;
                var pt = z[ft === "x" ? "width" : "height"];
                if (_t === "paper" && (St.head = h.constrain(St.head, 1, pt - 1)), Pt === "pixel") {
                  var Mt = -Math.max(St.tail - 3, St.text), At = Math.min(St.tail + 3, St.text) - pt;
                  Mt > 0 ? (St.tail += Mt, St.text += Mt) : At > 0 && (St.tail -= At, St.text -= At);
                }
                St.tail += vt, St.head += vt;
              } else Be = ct = mt * Re(Ze, at), St.text = _e + ct;
              St.text += vt, ct += vt, Be += vt, L["_" + ft + "padplus"] = mt / 2 + Be, L["_" + ft + "padminus"] = mt / 2 - Be, L["_" + ft + "size"] = mt, L["_" + ft + "shift"] = ct;
            }
            if (je) ce.remove();
            else {
              var Rt = 0, Ft = 0;
              if (L.align !== "left" && (Rt = (ge - Ne) * (L.align === "center" ? 0.5 : 1)), L.valign !== "top" && (Ft = (Ce - Ie) * (L.valign === "middle" ? 0.5 : 1)), We) Le.select("svg").attr({ x: ne + Rt - 1, y: ne + Ft }).call(f.setClipUrl, se ? re : null, D);
              else {
                var lt = ne + Ft - Ee.top, st = ne + Rt - Ee.left;
                be.call(g.positionText, st, lt).call(f.setClipUrl, se ? re : null, D);
              }
              me.select("rect").call(f.setRect, ne, ne, ge, Ce), ae.call(f.setRect, he / 2, he / 2, we - he, Ge - he), ce.call(f.setTranslate, Math.round(Y.x.text - we / 2), Math.round(Y.y.text - Ge / 2)), X.attr({ transform: "rotate(" + te + "," + Y.x.text + "," + Y.y.text + ")" });
              var Ot, kt = function(Bt, xt) {
                ee.selectAll(".annotation-arrow-g").remove();
                var Jt = Y.x.head, qt = Y.y.head, en = Y.x.tail + Bt, Yt = Y.y.tail + xt, Ht = Y.x.text + Bt, sn = Y.y.text + xt, fn = h.rotationXYMatrix(te, Ht, sn), In = h.apply2DTransform(fn), zn = h.apply2DTransform2(fn), Cn = +ae.attr("width"), gn = +ae.attr("height"), Mn = Ht - 0.5 * Cn, Xn = Mn + Cn, Pn = sn - 0.5 * gn, wn = Pn + gn, Rn = [[Mn, Pn, Mn, wn], [Mn, wn, Xn, wn], [Xn, wn, Xn, Pn], [Xn, Pn, Mn, Pn]].map(zn);
                if (!Rn.reduce(function(Ir, yr) {
                  return Ir ^ !!h.segmentsIntersect(Jt, qt, Jt + 1e6, qt + 1e6, yr[0], yr[1], yr[2], yr[3]);
                }, !1)) {
                  Rn.forEach(function(Ir) {
                    var yr = h.segmentsIntersect(en, Yt, Jt, qt, Ir[0], Ir[1], Ir[2], Ir[3]);
                    yr && (en = yr.x, Yt = yr.y);
                  });
                  var _n = L.arrowwidth, En = L.arrowcolor, Kn = L.arrowside, Wn = ee.append("g").style({ opacity: d.opacity(En) }).classed("annotation-arrow-g", !0), hr = Wn.append("path").attr("d", "M" + en + "," + Yt + "L" + Jt + "," + qt).style("stroke-width", _n + "px").call(d.stroke, d.rgb(En));
                  if (k(hr, Kn, L), U.annotationPosition && hr.node().parentNode && !P) {
                    var Zn = Jt, lr = qt;
                    if (L.standoff) {
                      var cr = Math.sqrt(Math.pow(Jt - en, 2) + Math.pow(qt - Yt, 2));
                      Zn += L.standoff * (en - Jt) / cr, lr += L.standoff * (Yt - qt) / cr;
                    }
                    var zr, Wr, mr = Wn.append("path").classed("annotation-arrow", !0).classed("anndrag", !0).classed("cursor-move", !0).attr({ d: "M3,3H-3V-3H3ZM0,0L" + (en - Zn) + "," + (Yt - lr), transform: p(Zn, lr) }).style("stroke-width", _n + 6 + "px").call(d.stroke, "rgba(0,0,0,0)").call(d.fill, "rgba(0,0,0,0)");
                    x.init({ element: mr.node(), gd: D, prepFn: function() {
                      var Ir = f.getTranslate(ce);
                      zr = Ir.x, Wr = Ir.y, I && I.autorange && $(I._name + ".autorange", !0), M && M.autorange && $(M._name + ".autorange", !0);
                    }, moveFn: function(Ir, yr) {
                      var Vr = In(zr, Wr), rn = Vr[0] + Ir, Tn = Vr[1] + yr;
                      ce.call(f.setTranslate, rn, Tn), q("x", A(I, Ir, "x", F, L)), q("y", A(M, yr, "y", F, L)), L.axref === L.xref && q("ax", A(I, Ir, "ax", F, L)), L.ayref === L.yref && q("ay", A(M, yr, "ay", F, L)), Wn.attr("transform", p(Ir, yr)), X.attr({ transform: "rotate(" + te + "," + rn + "," + Tn + ")" });
                    }, doneFn: function() {
                      u.call("_guiRelayout", D, K());
                      var Ir = document.querySelector(".js-notes-box-panel");
                      Ir && Ir.redraw(Ir.selectedObj);
                    } });
                  }
                }
              };
              L.showarrow && kt(0, 0), Q && x.init({ element: ce.node(), gd: D, prepFn: function() {
                Ot = X.attr("transform");
              }, moveFn: function(Bt, xt) {
                var Jt = "pointer";
                if (L.showarrow) L.axref === L.xref ? q("ax", A(I, Bt, "ax", F, L)) : q("ax", L.ax + Bt), L.ayref === L.yref ? q("ay", A(M, xt, "ay", F.w, L)) : q("ay", L.ay + xt), kt(Bt, xt);
                else {
                  if (P) return;
                  var qt, en;
                  if (I) qt = A(I, Bt, "x", F, L);
                  else {
                    var Yt = L._xsize / F.w, Ht = L.x + (L._xshift - L.xshift) / F.w - Yt / 2;
                    qt = x.align(Ht + Bt / F.w, Yt, 0, 1, L.xanchor);
                  }
                  if (M) en = A(M, xt, "y", F, L);
                  else {
                    var sn = L._ysize / F.h, fn = L.y - (L._yshift + L.yshift) / F.h - sn / 2;
                    en = x.align(fn - xt / F.h, sn, 0, 1, L.yanchor);
                  }
                  q("x", qt), q("y", en), I && M || (Jt = x.getCursor(I ? 0.5 : qt, M ? 0.5 : en, L.xanchor, L.yanchor));
                }
                X.attr({ transform: p(Bt, xt) + Ot }), m(ce, Jt);
              }, clickFn: function(Bt, xt) {
                L.captureevents && D.emit("plotly_clickannotation", Ae(xt));
              }, doneFn: function() {
                m(ce), u.call("_guiRelayout", D, K());
                var Bt = document.querySelector(".js-notes-box-panel");
                Bt && Bt.redraw(Bt.selectedObj);
              } });
            }
          }
        }
        o.exports = { draw: function(D) {
          var L = D._fullLayout;
          L._infolayer.selectAll(".annotation").remove();
          for (var E = 0; E < L.annotations.length; E++) L.annotations[E].visible && S(D, E);
          return i.previousPromises(D);
        }, drawOne: S, drawRaw: C };
      }, 23768: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(11645), h = n(34809), p = h.strScale, _ = h.strRotate, d = h.strTranslate;
        o.exports = function(f, c, g) {
          var m, x, w, k, S = f.node(), A = i[g.arrowhead || 0], C = i[g.startarrowhead || 0], D = (g.arrowwidth || 1) * (g.arrowsize || 1), L = (g.arrowwidth || 1) * (g.startarrowsize || 1), E = c.indexOf("start") >= 0, P = c.indexOf("end") >= 0, I = A.backoff * D + g.standoff, M = C.backoff * L + g.startstandoff;
          if (S.nodeName === "line") {
            m = { x: +f.attr("x1"), y: +f.attr("y1") }, x = { x: +f.attr("x2"), y: +f.attr("y2") };
            var O = m.x - x.x, T = m.y - x.y;
            if (k = (w = Math.atan2(T, O)) + Math.PI, I && M && I + M > Math.sqrt(O * O + T * T)) return void ee();
            if (I) {
              if (I * I > O * O + T * T) return void ee();
              var z = I * Math.cos(w), F = I * Math.sin(w);
              x.x += z, x.y += F, f.attr({ x2: x.x, y2: x.y });
            }
            if (M) {
              if (M * M > O * O + T * T) return void ee();
              var U = M * Math.cos(w), V = M * Math.sin(w);
              m.x -= U, m.y -= V, f.attr({ x1: m.x, y1: m.y });
            }
          } else if (S.nodeName === "path") {
            var $ = S.getTotalLength(), q = "";
            if ($ < I + M) return void ee();
            var K = S.getPointAtLength(0), re = S.getPointAtLength(0.1);
            w = Math.atan2(K.y - re.y, K.x - re.x), m = S.getPointAtLength(Math.min(M, $)), q = "0px," + M + "px,";
            var Y = S.getPointAtLength($), te = S.getPointAtLength($ - 0.1);
            k = Math.atan2(Y.y - te.y, Y.x - te.x), x = S.getPointAtLength(Math.max(0, $ - I)), q += $ - (q ? M + I : I) + "px," + $ + "px", f.style("stroke-dasharray", q);
          }
          function ee() {
            f.style("stroke-dasharray", "0px,100px");
          }
          function X(Q, ue, ce, he) {
            Q.path && (Q.noRotate && (ce = 0), l.select(S.parentNode).append("path").attr({ class: f.attr("class"), d: Q.path, transform: d(ue.x, ue.y) + _(180 * ce / Math.PI) + p(he) }).style({ fill: u.rgb(g.arrowcolor), "stroke-width": 0 }));
          }
          E && X(C, m, w, L), P && X(A, x, k, D);
        };
      }, 3599: function(o, s, n) {
        var l = n(3377), u = n(6035);
        o.exports = { moduleType: "component", name: "annotations", layoutAttributes: n(50222), supplyLayoutDefaults: n(63737), includeBasePlot: n(20706)("annotations"), calcAutorange: n(60317), draw: l.draw, drawOne: l.drawOne, drawRaw: l.drawRaw, hasClickToShow: u.hasClickToShow, onClick: u.onClick, convertCoords: n(59741) };
      }, 38239: function(o, s, n) {
        var l = n(50222), u = n(13582).overrideAll, i = n(78032).templatedArray;
        o.exports = u(i("annotation", { visible: l.visible, x: { valType: "any" }, y: { valType: "any" }, z: { valType: "any" }, ax: { valType: "number" }, ay: { valType: "number" }, xanchor: l.xanchor, xshift: l.xshift, yanchor: l.yanchor, yshift: l.yshift, text: l.text, textangle: l.textangle, font: l.font, width: l.width, height: l.height, opacity: l.opacity, align: l.align, valign: l.valign, bgcolor: l.bgcolor, bordercolor: l.bordercolor, borderpad: l.borderpad, borderwidth: l.borderwidth, showarrow: l.showarrow, arrowcolor: l.arrowcolor, arrowhead: l.arrowhead, startarrowhead: l.startarrowhead, arrowside: l.arrowside, arrowsize: l.arrowsize, startarrowsize: l.startarrowsize, arrowwidth: l.arrowwidth, standoff: l.standoff, startstandoff: l.startstandoff, hovertext: l.hovertext, hoverlabel: l.hoverlabel, captureevents: l.captureevents }), "calc", "from-root");
      }, 47979: function(o, s, n) {
        var l = n(34809), u = n(29714);
        function i(h, p) {
          var _ = p.fullSceneLayout.domain, d = p.fullLayout._size, f = { pdata: null, type: "linear", autorange: !1, range: [-1 / 0, 1 / 0] };
          h._xa = {}, l.extendFlat(h._xa, f), u.setConvert(h._xa), h._xa._offset = d.l + _.x[0] * d.w, h._xa.l2p = function() {
            return 0.5 * (1 + h._pdata[0] / h._pdata[3]) * d.w * (_.x[1] - _.x[0]);
          }, h._ya = {}, l.extendFlat(h._ya, f), u.setConvert(h._ya), h._ya._offset = d.t + (1 - _.y[1]) * d.h, h._ya.l2p = function() {
            return 0.5 * (1 - h._pdata[1] / h._pdata[3]) * d.h * (_.y[1] - _.y[0]);
          };
        }
        o.exports = function(h) {
          for (var p = h.fullSceneLayout.annotations, _ = 0; _ < p.length; _++) i(p[_], h);
          h.fullLayout._infolayer.selectAll(".annotation-" + h.id).remove();
        };
      }, 34232: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(59008), h = n(53271), p = n(38239);
        function _(d, f, c, g) {
          function m(w, k) {
            return l.coerce(d, f, p, w, k);
          }
          function x(w) {
            var k = w + "axis", S = { _fullLayout: {} };
            return S._fullLayout[k] = c[k], u.coercePosition(f, S, m, w, w, 0.5);
          }
          m("visible") && (h(d, f, g.fullLayout, m), x("x"), x("y"), x("z"), l.noneOrAll(d, f, ["x", "y", "z"]), f.xref = "x", f.yref = "y", f.zref = "z", m("xanchor"), m("yanchor"), m("xshift"), m("yshift"), f.showarrow && (f.axref = "pixel", f.ayref = "pixel", m("ax", -10), m("ay", -30), l.noneOrAll(d, f, ["ax", "ay"])));
        }
        o.exports = function(d, f, c) {
          i(d, f, { name: "annotations", handleItemDefaults: _, fullLayout: c.fullLayout });
        };
      }, 9756: function(o, s, n) {
        var l = n(3377).drawRaw, u = n(25802), i = ["x", "y", "z"];
        o.exports = function(h) {
          for (var p = h.fullSceneLayout, _ = h.dataScale, d = p.annotations, f = 0; f < d.length; f++) {
            for (var c = d[f], g = !1, m = 0; m < 3; m++) {
              var x = i[m], w = c[x], k = p[x + "axis"].r2fraction(w);
              if (k < 0 || k > 1) {
                g = !0;
                break;
              }
            }
            g ? h.fullLayout._infolayer.select(".annotation-" + h.id + '[data-index="' + f + '"]').remove() : (c._pdata = u(h.glplot.cameraParams, [p.xaxis.r2l(c.x) * _[0], p.yaxis.r2l(c.y) * _[1], p.zaxis.r2l(c.z) * _[2]]), l(h.graphDiv, c, f, h.id, c._xa, c._ya));
          }
        };
      }, 83348: function(o, s, n) {
        var l = n(33626), u = n(34809);
        o.exports = { moduleType: "component", name: "annotations3d", schema: { subplots: { scene: { annotations: n(38239) } } }, layoutAttributes: n(38239), handleDefaults: n(34232), includeBasePlot: function(i, h) {
          var p = l.subplotsRegistry.gl3d;
          if (p) for (var _ = p.attrRegex, d = Object.keys(i), f = 0; f < d.length; f++) {
            var c = d[f];
            _.test(c) && (i[c].annotations || []).length && (u.pushUnique(h._basePlotModules, p), u.pushUnique(h._subplots.gl3d, c));
          }
        }, convert: n(47979), draw: n(9756) };
      }, 37177: function(o, s, n) {
        o.exports = n(24453), n(23428), n(1401), n(72210), n(28569), n(81133), n(78295), n(25512), n(42645), n(62324), n(91662), n(66445), n(50506), n(84756), n(41858), n(57985);
      }, 29698: function(o, s, n) {
        var l = n(37177), u = n(34809), i = n(63821), h = i.EPOCHJD, p = i.ONEDAY, _ = { valType: "enumerated", values: u.sortObjectKeys(l.calendars), editType: "calc", dflt: "gregorian" }, d = function(D, L, E, P) {
          var I = {};
          return I[E] = _, u.coerce(D, L, I, E, P);
        }, f = "##", c = { d: { 0: "dd", "-": "d" }, e: { 0: "d", "-": "d" }, a: { 0: "D", "-": "D" }, A: { 0: "DD", "-": "DD" }, j: { 0: "oo", "-": "o" }, W: { 0: "ww", "-": "w" }, m: { 0: "mm", "-": "m" }, b: { 0: "M", "-": "M" }, B: { 0: "MM", "-": "MM" }, y: { 0: "yy", "-": "yy" }, Y: { 0: "yyyy", "-": "yyyy" }, U: f, w: f, c: { 0: "D M d %X yyyy", "-": "D M d %X yyyy" }, x: { 0: "mm/dd/yyyy", "-": "mm/dd/yyyy" } }, g = {};
        function m(D) {
          var L = g[D];
          return L || (g[D] = l.instance(D));
        }
        function x(D) {
          return u.extendFlat({}, _, { description: D });
        }
        function w(D) {
          return "Sets the calendar system to use with `" + D + "` date data.";
        }
        var k = { xcalendar: x(w("x")) }, S = u.extendFlat({}, k, { ycalendar: x(w("y")) }), A = u.extendFlat({}, S, { zcalendar: x(w("z")) }), C = x(["Sets the calendar system to use for `range` and `tick0`", "if this is a date axis. This does not set the calendar for", "interpreting data on this axis, that's specified in the trace", "or via the global `layout.calendar`"].join(" "));
        o.exports = { moduleType: "component", name: "calendars", schema: { traces: { scatter: S, bar: S, box: S, heatmap: S, contour: S, histogram: S, histogram2d: S, histogram2dcontour: S, scatter3d: A, surface: A, mesh3d: A, scattergl: S, ohlc: k, candlestick: k }, layout: { calendar: x(["Sets the default calendar system to use for interpreting and", "displaying dates throughout the plot."].join(" ")) }, subplots: { xaxis: { calendar: C }, yaxis: { calendar: C }, scene: { xaxis: { calendar: C }, yaxis: { calendar: C }, zaxis: { calendar: C } }, polar: { radialaxis: { calendar: C } } }, transforms: { filter: { valuecalendar: x(["WARNING: All transforms are deprecated and may be removed from the API in next major version.", "Sets the calendar system to use for `value`, if it is a date."].join(" ")), targetcalendar: x(["WARNING: All transforms are deprecated and may be removed from the API in next major version.", "Sets the calendar system to use for `target`, if it is an", "array of dates. If `target` is a string (eg *x*) we use the", "corresponding trace attribute (eg `xcalendar`) if it exists,", "even if `targetcalendar` is provided."].join(" ")) } } }, layoutAttributes: _, handleDefaults: d, handleTraceDefaults: function(D, L, E, P) {
          for (var I = 0; I < E.length; I++) d(D, L, E[I] + "calendar", P.calendar);
        }, CANONICAL_SUNDAY: { chinese: "2000-01-02", coptic: "2000-01-03", discworld: "2000-01-03", ethiopian: "2000-01-05", hebrew: "5000-01-01", islamic: "1000-01-02", julian: "2000-01-03", mayan: "5000-01-01", nanakshahi: "1000-01-05", nepali: "2000-01-05", persian: "1000-01-01", jalali: "1000-01-01", taiwan: "1000-01-04", thai: "2000-01-04", ummalqura: "1400-01-06" }, CANONICAL_TICK: { chinese: "2000-01-01", coptic: "2000-01-01", discworld: "2000-01-01", ethiopian: "2000-01-01", hebrew: "5000-01-01", islamic: "1000-01-01", julian: "2000-01-01", mayan: "5000-01-01", nanakshahi: "1000-01-01", nepali: "2000-01-01", persian: "1000-01-01", jalali: "1000-01-01", taiwan: "1000-01-01", thai: "2000-01-01", ummalqura: "1400-01-01" }, DFLTRANGE: { chinese: ["2000-01-01", "2001-01-01"], coptic: ["1700-01-01", "1701-01-01"], discworld: ["1800-01-01", "1801-01-01"], ethiopian: ["2000-01-01", "2001-01-01"], hebrew: ["5700-01-01", "5701-01-01"], islamic: ["1400-01-01", "1401-01-01"], julian: ["2000-01-01", "2001-01-01"], mayan: ["5200-01-01", "5201-01-01"], nanakshahi: ["0500-01-01", "0501-01-01"], nepali: ["2000-01-01", "2001-01-01"], persian: ["1400-01-01", "1401-01-01"], jalali: ["1400-01-01", "1401-01-01"], taiwan: ["0100-01-01", "0101-01-01"], thai: ["2500-01-01", "2501-01-01"], ummalqura: ["1400-01-01", "1401-01-01"] }, getCal: m, worldCalFmt: function(D, L, E) {
          for (var P, I, M, O, T, z = Math.floor((L + 0.05) / p) + h, F = m(E).fromJD(z), U = 0; (U = D.indexOf("%", U)) !== -1; ) (P = D.charAt(U + 1)) === "0" || P === "-" || P === "_" ? (M = 3, I = D.charAt(U + 2), P === "_" && (P = "-")) : (I = P, P = "0", M = 2), (O = c[I]) ? (T = O === f ? f : F.formatDate(O[P]), D = D.substr(0, U) + T + D.substr(U + M), U += T.length) : U += M;
          return D;
        } };
      }, 10229: function(o, s) {
        s.defaults = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"], s.defaultLine = "#444", s.lightLine = "#eee", s.background = "#fff", s.borderLine = "#BEC8D9", s.lightFraction = 90.9090909090909;
      }, 78766: function(o, s, n) {
        var l = n(65657), u = n(10721), i = n(87800).isTypedArray, h = o.exports = {}, p = n(10229);
        h.defaults = p.defaults;
        var _ = h.defaultLine = p.defaultLine;
        h.lightLine = p.lightLine;
        var d = h.background = p.background;
        function f(c) {
          if (u(c) || typeof c != "string") return c;
          var g = c.trim();
          if (g.substr(0, 3) !== "rgb") return c;
          var m = g.match(/^rgba?\s*\(([^()]*)\)$/);
          if (!m) return c;
          var x = m[1].trim().split(/\s*[\s,]\s*/), w = g.charAt(3) === "a" && x.length === 4;
          if (!w && x.length !== 3) return c;
          for (var k = 0; k < x.length; k++) {
            if (!x[k].length || (x[k] = Number(x[k]), !(x[k] >= 0))) return c;
            if (k === 3) x[k] > 1 && (x[k] = 1);
            else if (x[k] >= 1) return c;
          }
          var S = Math.round(255 * x[0]) + ", " + Math.round(255 * x[1]) + ", " + Math.round(255 * x[2]);
          return w ? "rgba(" + S + ", " + x[3] + ")" : "rgb(" + S + ")";
        }
        h.tinyRGB = function(c) {
          var g = c.toRgb();
          return "rgb(" + Math.round(g.r) + ", " + Math.round(g.g) + ", " + Math.round(g.b) + ")";
        }, h.rgb = function(c) {
          return h.tinyRGB(l(c));
        }, h.opacity = function(c) {
          return c ? l(c).getAlpha() : 0;
        }, h.addOpacity = function(c, g) {
          var m = l(c).toRgb();
          return "rgba(" + Math.round(m.r) + ", " + Math.round(m.g) + ", " + Math.round(m.b) + ", " + g + ")";
        }, h.combine = function(c, g) {
          var m = l(c).toRgb();
          if (m.a === 1) return l(c).toRgbString();
          var x = l(g || d).toRgb(), w = x.a === 1 ? x : { r: 255 * (1 - x.a) + x.r * x.a, g: 255 * (1 - x.a) + x.g * x.a, b: 255 * (1 - x.a) + x.b * x.a }, k = { r: w.r * (1 - m.a) + m.r * m.a, g: w.g * (1 - m.a) + m.g * m.a, b: w.b * (1 - m.a) + m.b * m.a };
          return l(k).toRgbString();
        }, h.interpolate = function(c, g, m) {
          var x = l(c).toRgb(), w = l(g).toRgb(), k = { r: m * x.r + (1 - m) * w.r, g: m * x.g + (1 - m) * w.g, b: m * x.b + (1 - m) * w.b };
          return l(k).toRgbString();
        }, h.contrast = function(c, g, m) {
          var x = l(c);
          return x.getAlpha() !== 1 && (x = l(h.combine(c, d))), (x.isDark() ? g ? x.lighten(g) : d : m ? x.darken(m) : _).toString();
        }, h.stroke = function(c, g) {
          var m = l(g);
          c.style({ stroke: h.tinyRGB(m), "stroke-opacity": m.getAlpha() });
        }, h.fill = function(c, g) {
          var m = l(g);
          c.style({ fill: h.tinyRGB(m), "fill-opacity": m.getAlpha() });
        }, h.clean = function(c) {
          if (c && typeof c == "object") {
            var g, m, x, w, k = Object.keys(c);
            for (g = 0; g < k.length; g++) if (w = c[x = k[g]], x.substr(x.length - 5) === "color") if (Array.isArray(w)) for (m = 0; m < w.length; m++) w[m] = f(w[m]);
            else c[x] = f(w);
            else if (x.substr(x.length - 10) === "colorscale" && Array.isArray(w)) for (m = 0; m < w.length; m++) Array.isArray(w[m]) && (w[m][1] = f(w[m][1]));
            else if (Array.isArray(w)) {
              var S = w[0];
              if (!Array.isArray(S) && S && typeof S == "object") for (m = 0; m < w.length; m++) h.clean(w[m]);
            } else w && typeof w == "object" && !i(w) && h.clean(w);
          }
        };
      }, 25158: function(o, s, n) {
        var l = n(25829), u = n(80337), i = n(93049).extendFlat, h = n(13582).overrideAll;
        o.exports = h({ orientation: { valType: "enumerated", values: ["h", "v"], dflt: "v" }, thicknessmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "pixels" }, thickness: { valType: "number", min: 0, dflt: 30 }, lenmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "fraction" }, len: { valType: "number", min: 0, dflt: 1 }, x: { valType: "number" }, xref: { valType: "enumerated", dflt: "paper", values: ["container", "paper"], editType: "layoutstyle" }, xanchor: { valType: "enumerated", values: ["left", "center", "right"] }, xpad: { valType: "number", min: 0, dflt: 10 }, y: { valType: "number" }, yref: { valType: "enumerated", dflt: "paper", values: ["container", "paper"], editType: "layoutstyle" }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"] }, ypad: { valType: "number", min: 0, dflt: 10 }, outlinecolor: l.linecolor, outlinewidth: l.linewidth, bordercolor: l.linecolor, borderwidth: { valType: "number", min: 0, dflt: 0 }, bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)" }, tickmode: l.minor.tickmode, nticks: l.nticks, tick0: l.tick0, dtick: l.dtick, tickvals: l.tickvals, ticktext: l.ticktext, ticks: i({}, l.ticks, { dflt: "" }), ticklabeloverflow: i({}, l.ticklabeloverflow, {}), ticklabelposition: { valType: "enumerated", values: ["outside", "inside", "outside top", "inside top", "outside left", "inside left", "outside right", "inside right", "outside bottom", "inside bottom"], dflt: "outside" }, ticklen: l.ticklen, tickwidth: l.tickwidth, tickcolor: l.tickcolor, ticklabelstep: l.ticklabelstep, showticklabels: l.showticklabels, labelalias: l.labelalias, tickfont: u({}), tickangle: l.tickangle, tickformat: l.tickformat, tickformatstops: l.tickformatstops, tickprefix: l.tickprefix, showtickprefix: l.showtickprefix, ticksuffix: l.ticksuffix, showticksuffix: l.showticksuffix, separatethousands: l.separatethousands, exponentformat: l.exponentformat, minexponent: l.minexponent, showexponent: l.showexponent, title: { text: { valType: "string" }, font: u({}), side: { valType: "enumerated", values: ["right", "top", "bottom"] } }, _deprecated: { title: { valType: "string" }, titlefont: u({}), titleside: { valType: "enumerated", values: ["right", "top", "bottom"], dflt: "top" } } }, "colorbars", "from-root");
      }, 34554: function(o) {
        o.exports = { cn: { colorbar: "colorbar", cbbg: "cbbg", cbfill: "cbfill", cbfills: "cbfills", cbline: "cbline", cblines: "cblines", cbaxis: "cbaxis", cbtitleunshift: "cbtitleunshift", cbtitle: "cbtitle", cboutline: "cboutline", crisp: "crisp", jsPlaceholder: "js-placeholder" } };
      }, 42097: function(o, s, n) {
        var l = n(34809), u = n(78032), i = n(22777), h = n(87433), p = n(12036), _ = n(54616), d = n(25158);
        o.exports = function(f, c, g) {
          var m = u.newContainer(c, "colorbar"), x = f.colorbar || {};
          function w(q, K) {
            return l.coerce(x, m, d, q, K);
          }
          var k = g.margin || { t: 0, b: 0, l: 0, r: 0 }, S = g.width - k.l - k.r, A = g.height - k.t - k.b, C = w("orientation") === "v", D = w("thicknessmode");
          w("thickness", D === "fraction" ? 30 / (C ? S : A) : 30);
          var L = w("lenmode");
          w("len", L === "fraction" ? 1 : C ? A : S);
          var E, P, I, M = w("yref") === "paper", O = w("xref") === "paper", T = "left";
          C ? (I = "middle", T = O ? "left" : "right", E = O ? 1.02 : 1, P = 0.5) : (I = M ? "bottom" : "top", T = "center", E = 0.5, P = M ? 1.02 : 1), l.coerce(x, m, { x: { valType: "number", min: O ? -2 : 0, max: O ? 3 : 1, dflt: E } }, "x"), l.coerce(x, m, { y: { valType: "number", min: M ? -2 : 0, max: M ? 3 : 1, dflt: P } }, "y"), w("xanchor", T), w("xpad"), w("yanchor", I), w("ypad"), l.noneOrAll(x, m, ["x", "y"]), w("outlinecolor"), w("outlinewidth"), w("bordercolor"), w("borderwidth"), w("bgcolor");
          var z = l.coerce(x, m, { ticklabelposition: { valType: "enumerated", dflt: "outside", values: C ? ["outside", "inside", "outside top", "inside top", "outside bottom", "inside bottom"] : ["outside", "inside", "outside left", "inside left", "outside right", "inside right"] } }, "ticklabelposition");
          w("ticklabeloverflow", z.indexOf("inside") !== -1 ? "hide past domain" : "hide past div"), i(x, m, w, "linear");
          var F = g.font, U = { noAutotickangles: !0, noTicklabelshift: !0, noTicklabelstandoff: !0, outerTicks: !1, font: F };
          z.indexOf("inside") !== -1 && (U.bgColor = "black"), _(x, m, w, "linear", U), p(x, m, w, "linear", U), h(x, m, w, "linear", U), w("title.text", g._dfltTitle.colorbar);
          var V = m.showticklabels ? m.tickfont : F, $ = l.extendFlat({}, F, { family: V.family, size: l.bigFont(V.size) });
          l.coerceFont(w, "title.font", $), w("title.side", C ? "top" : "right");
        };
      }, 5881: function(o, s, n) {
        var l = n(45568), u = n(65657), i = n(44122), h = n(33626), p = n(29714), _ = n(14751), d = n(34809), f = d.strTranslate, c = n(93049).extendFlat, g = n(27983), m = n(62203), x = n(78766), w = n(17240), k = n(30635), S = n(65477).flipScale, A = n(97655), C = n(40957), D = n(25829), L = n(4530), E = L.LINE_SPACING, P = L.FROM_TL, I = L.FROM_BR, M = n(34554).cn;
        o.exports = { draw: function(O) {
          var T = O._fullLayout._infolayer.selectAll("g." + M.colorbar).data(function(z) {
            var F, U, V, $, q = z._fullLayout, K = z.calcdata, re = [];
            function Y(se) {
              return c(se, { _fillcolor: null, _line: { color: null, width: null, dash: null }, _levels: { start: null, end: null, size: null }, _filllevels: null, _fillgradient: null, _zrange: null });
            }
            function te() {
              typeof $.calc == "function" ? $.calc(z, V, F) : (F._fillgradient = U.reversescale ? S(U.colorscale) : U.colorscale, F._zrange = [U[$.min], U[$.max]]);
            }
            for (var ee = 0; ee < K.length; ee++) {
              var X = K[ee];
              if ((V = X[0].trace)._module) {
                var Q = V._module.colorbar;
                if (V.visible === !0 && Q) for (var ue = Array.isArray(Q), ce = ue ? Q : [Q], he = 0; he < ce.length; he++) {
                  var de = ($ = ce[he]).container;
                  (U = de ? V[de] : V) && U.showscale && ((F = Y(U.colorbar))._id = "cb" + V.uid + (ue && de ? "-" + de : ""), F._traceIndex = V.index, F._propPrefix = (de ? de + "." : "") + "colorbar.", F._meta = V._meta, te(), re.push(F));
                }
              }
            }
            for (var ne in q._colorAxes) if ((U = q[ne]).showscale) {
              var ae = q._colorAxes[ne];
              (F = Y(U.colorbar))._id = "cb" + ne, F._propPrefix = ne + ".colorbar.", F._meta = q._meta, $ = { min: "cmin", max: "cmax" }, ae[0] !== "heatmap" && (V = ae[1], $.calc = V._module.colorbar.calc), te(), re.push(F);
            }
            return re;
          }(O), function(z) {
            return z._id;
          });
          T.enter().append("g").attr("class", function(z) {
            return z._id;
          }).classed(M.colorbar, !0), T.each(function(z) {
            var F = l.select(this);
            d.ensureSingle(F, "rect", M.cbbg), d.ensureSingle(F, "g", M.cbfills), d.ensureSingle(F, "g", M.cblines), d.ensureSingle(F, "g", M.cbaxis, function(V) {
              V.classed(M.crisp, !0);
            }), d.ensureSingle(F, "g", M.cbtitleunshift, function(V) {
              V.append("g").classed(M.cbtitle, !0);
            }), d.ensureSingle(F, "rect", M.cboutline);
            var U = function(V, $, q) {
              var K = $.orientation === "v", re = $.len, Y = $.lenmode, te = $.thickness, ee = $.thicknessmode, X = $.outlinewidth, Q = $.borderwidth, ue = $.bgcolor, ce = $.xanchor, he = $.yanchor, de = $.xpad, ne = $.ypad, ae = $.x, se = K ? $.y : 1 - $.y, me = $.yref === "paper", ye = $.xref === "paper", pe = q._fullLayout, be = pe._size, Ae = $._fillcolor, Se = $._line, Me = $.title, De = Me.side, Le = $._zrange || l.extent((typeof Ae == "function" ? Ae : Se.color).domain()), We = typeof Se.color == "function" ? Se.color : function() {
                return Se.color;
              }, Ee = typeof Ae == "function" ? Ae : function() {
                return Ae;
              }, Ne = $._levels, Ie = function(Fe, pt, Mt) {
                var At, Rt, Ft = pt._levels, lt = [], st = [], Ot = Ft.end + Ft.size / 100, kt = Ft.size, Bt = 1.001 * Mt[0] - 1e-3 * Mt[1], xt = 1.001 * Mt[1] - 1e-3 * Mt[0];
                for (Rt = 0; Rt < 1e5 && (At = Ft.start + Rt * kt, !(kt > 0 ? At >= Ot : At <= Ot)); Rt++) At > Bt && At < xt && lt.push(At);
                if (pt._fillgradient) st = [0];
                else if (typeof pt._fillcolor == "function") {
                  var Jt = pt._filllevels;
                  if (Jt) for (Ot = Jt.end + Jt.size / 100, kt = Jt.size, Rt = 0; Rt < 1e5 && (At = Jt.start + Rt * kt, !(kt > 0 ? At >= Ot : At <= Ot)); Rt++) At > Mt[0] && At < Mt[1] && st.push(At);
                  else (st = lt.map(function(qt) {
                    return qt - Ft.size / 2;
                  })).push(st[st.length - 1] + Ft.size);
                } else pt._fillcolor && typeof pt._fillcolor == "string" && (st = [0]);
                return Ft.size < 0 && (lt.reverse(), st.reverse()), { line: lt, fill: st };
              }(0, $, Le), ge = Ie.fill, Ce = Ie.line, we = Math.round(te * (ee === "fraction" ? K ? be.w : be.h : 1)), Ge = we / (K ? be.w : be.h), Re = Math.round(re * (Y === "fraction" ? K ? be.h : be.w : 1)), je = Re / (K ? be.h : be.w), Ke = ye ? be.w : q._fullLayout.width, tt = me ? be.h : q._fullLayout.height, _e = Math.round(K ? ae * Ke + de : se * tt + ne), Be = { center: 0.5, right: 1 }[ce] || 0, $e = { top: 1, middle: 0.5 }[he] || 0, Ze = K ? ae - Be * Ge : se - $e * Ge, ct = K ? se - $e * je : ae - Be * je, ft = Math.round(K ? tt * (1 - ct) : Ke * ct);
              $._lenFrac = je, $._thickFrac = Ge, $._uFrac = Ze, $._vFrac = ct;
              var _t = $._axis = function(Fe, pt, Mt) {
                var At = Fe._fullLayout, Rt = pt.orientation === "v", Ft = { type: "linear", range: Mt, tickmode: pt.tickmode, nticks: pt.nticks, tick0: pt.tick0, dtick: pt.dtick, tickvals: pt.tickvals, ticktext: pt.ticktext, ticks: pt.ticks, ticklen: pt.ticklen, tickwidth: pt.tickwidth, tickcolor: pt.tickcolor, showticklabels: pt.showticklabels, labelalias: pt.labelalias, ticklabelposition: pt.ticklabelposition, ticklabeloverflow: pt.ticklabeloverflow, ticklabelstep: pt.ticklabelstep, tickfont: pt.tickfont, tickangle: pt.tickangle, tickformat: pt.tickformat, exponentformat: pt.exponentformat, minexponent: pt.minexponent, separatethousands: pt.separatethousands, showexponent: pt.showexponent, showtickprefix: pt.showtickprefix, tickprefix: pt.tickprefix, showticksuffix: pt.showticksuffix, ticksuffix: pt.ticksuffix, title: pt.title, showline: !0, anchor: "free", side: Rt ? "right" : "bottom", position: 1 }, lt = Rt ? "y" : "x", st = { type: "linear", _id: lt + pt._id }, Ot = { letter: lt, font: At.font, noAutotickangles: lt === "y", noHover: !0, noTickson: !0, noTicklabelmode: !0, noInsideRange: !0, calendar: At.calendar };
                function kt(Bt, xt) {
                  return d.coerce(Ft, st, D, Bt, xt);
                }
                return A(Ft, st, kt, Ot, At), C(Ft, st, kt, Ot), st;
              }(q, $, Le);
              _t.position = Ge + (K ? ae + de / be.w : se + ne / be.h);
              var Pt = ["top", "bottom"].indexOf(De) !== -1;
              if (K && Pt && (_t.title.side = De, _t.titlex = ae + de / be.w, _t.titley = ct + (Me.side === "top" ? je - ne / be.h : ne / be.h)), K || Pt || (_t.title.side = De, _t.titley = se + ne / be.h, _t.titlex = ct + de / be.w), Se.color && $.tickmode === "auto") {
                _t.tickmode = "linear", _t.tick0 = Ne.start;
                var Dt = Ne.size, $t = d.constrain(Re / 50, 4, 15) + 1, Gt = (Le[1] - Le[0]) / (($.nticks || $t) * Dt);
                if (Gt > 1) {
                  var Wt = Math.pow(10, Math.floor(Math.log(Gt) / Math.LN10));
                  Dt *= Wt * d.roundUp(Gt / Wt, [2, 5, 10]), (Math.abs(Ne.start) / Ne.size + 1e-6) % 1 < 2e-6 && (_t.tick0 = 0);
                }
                _t.dtick = Dt;
              }
              _t.domain = K ? [ct + ne / be.h, ct + je - ne / be.h] : [ct + de / be.w, ct + je - de / be.w], _t.setScale(), V.attr("transform", f(Math.round(be.l), Math.round(be.t)));
              var mt, at = V.select("." + M.cbtitleunshift).attr("transform", f(-Math.round(be.l), -Math.round(be.t))), vt = _t.ticklabelposition, St = _t.title.font.size, Je = V.select("." + M.cbaxis), nt = 0, ot = 0;
              function Ye(Fe, pt) {
                var Mt = { propContainer: _t, propName: $._propPrefix + "title", traceIndex: $._traceIndex, _meta: $._meta, placeholder: pe._dfltTitle.colorbar, containerGroup: V.select("." + M.cbtitle) }, At = Fe.charAt(0) === "h" ? Fe.substr(1) : "h" + Fe;
                V.selectAll("." + At + ",." + At + "-math-group").remove(), w.draw(q, Fe, c(Mt, pt || {}));
              }
              return d.syncOrAsync([i.previousPromises, function() {
                var Fe, pt;
                (K && Pt || !K && !Pt) && (De === "top" && (Fe = de + be.l + Ke * ae, pt = ne + be.t + tt * (1 - ct - je) + 3 + 0.75 * St), De === "bottom" && (Fe = de + be.l + Ke * ae, pt = ne + be.t + tt * (1 - ct) - 3 - 0.25 * St), De === "right" && (pt = ne + be.t + tt * se + 3 + 0.75 * St, Fe = de + be.l + Ke * ct), Ye(_t._id + "title", { attributes: { x: Fe, y: pt, "text-anchor": K ? "start" : "middle" } }));
              }, function() {
                if (!K && !Pt || K && Pt) {
                  var Fe, pt = V.select("." + M.cbtitle), Mt = pt.select("text"), At = [-X / 2, X / 2], Rt = pt.select(".h" + _t._id + "title-math-group").node(), Ft = 15.6;
                  if (Mt.node() && (Ft = parseInt(Mt.node().style.fontSize, 10) * E), Rt ? (Fe = m.bBox(Rt), ot = Fe.width, (nt = Fe.height) > Ft && (At[1] -= (nt - Ft) / 2)) : Mt.node() && !Mt.classed(M.jsPlaceholder) && (Fe = m.bBox(Mt.node()), ot = Fe.width, nt = Fe.height), K) {
                    if (nt) {
                      if (nt += 5, De === "top") _t.domain[1] -= nt / be.h, At[1] *= -1;
                      else {
                        _t.domain[0] += nt / be.h;
                        var lt = k.lineCount(Mt);
                        At[1] += (1 - lt) * Ft;
                      }
                      pt.attr("transform", f(At[0], At[1])), _t.setScale();
                    }
                  } else ot && (De === "right" && (_t.domain[0] += (ot + St / 2) / be.w), pt.attr("transform", f(At[0], At[1])), _t.setScale());
                }
                V.selectAll("." + M.cbfills + ",." + M.cblines).attr("transform", K ? f(0, Math.round(be.h * (1 - _t.domain[1]))) : f(Math.round(be.w * _t.domain[0]), 0)), Je.attr("transform", K ? f(0, Math.round(-be.t)) : f(Math.round(-be.l), 0));
                var st = V.select("." + M.cbfills).selectAll("rect." + M.cbfill).attr("style", "").data(ge);
                st.enter().append("rect").classed(M.cbfill, !0).attr("style", ""), st.exit().remove();
                var Ot = Le.map(_t.c2p).map(Math.round).sort(function(qt, en) {
                  return qt - en;
                });
                st.each(function(qt, en) {
                  var Yt = [en === 0 ? Le[0] : (ge[en] + ge[en - 1]) / 2, en === ge.length - 1 ? Le[1] : (ge[en] + ge[en + 1]) / 2].map(_t.c2p).map(Math.round);
                  K && (Yt[1] = d.constrain(Yt[1] + (Yt[1] > Yt[0]) ? 1 : -1, Ot[0], Ot[1]));
                  var Ht = l.select(this).attr(K ? "x" : "y", _e).attr(K ? "y" : "x", l.min(Yt)).attr(K ? "width" : "height", Math.max(we, 2)).attr(K ? "height" : "width", Math.max(l.max(Yt) - l.min(Yt), 2));
                  if ($._fillgradient) m.gradient(Ht, q, $._id, K ? "vertical" : "horizontalreversed", $._fillgradient, "fill");
                  else {
                    var sn = Ee(qt).replace("e-", "");
                    Ht.attr("fill", u(sn).toHexString());
                  }
                });
                var kt = V.select("." + M.cblines).selectAll("path." + M.cbline).data(Se.color && Se.width ? Ce : []);
                kt.enter().append("path").classed(M.cbline, !0), kt.exit().remove(), kt.each(function(qt) {
                  var en = _e, Yt = Math.round(_t.c2p(qt)) + Se.width / 2 % 1;
                  l.select(this).attr("d", "M" + (K ? en + "," + Yt : Yt + "," + en) + (K ? "h" : "v") + we).call(m.lineGroupStyle, Se.width, We(qt), Se.dash);
                }), Je.selectAll("g." + _t._id + "tick,path").remove();
                var Bt = _e + we + (X || 0) / 2 - ($.ticks === "outside" ? 1 : 0), xt = p.calcTicks(_t), Jt = p.getTickSigns(_t)[2];
                return p.drawTicks(q, _t, { vals: _t.ticks === "inside" ? p.clipEnds(_t, xt) : xt, layer: Je, path: p.makeTickPath(_t, Bt, Jt), transFn: p.makeTransTickFn(_t) }), p.drawLabels(q, _t, { vals: xt, layer: Je, transFn: p.makeTransTickLabelFn(_t), labelFns: p.makeLabelFns(_t, Bt) });
              }, function() {
                if (K && !Pt || !K && Pt) {
                  var Fe, pt, Mt = _t.position || 0, At = _t._offset + _t._length / 2;
                  if (De === "right") pt = At, Fe = be.l + Ke * Mt + 10 + St * (_t.showticklabels ? 1 : 0.5);
                  else if (Fe = At, De === "bottom" && (pt = be.t + tt * Mt + 10 + (vt.indexOf("inside") === -1 ? _t.tickfont.size : 0) + (_t.ticks !== "intside" && $.ticklen || 0)), De === "top") {
                    var Rt = Me.text.split("<br>").length;
                    pt = be.t + tt * Mt + 10 - we - E * St * Rt;
                  }
                  Ye((K ? "h" : "v") + _t._id + "title", { avoid: { selection: l.select(q).selectAll("g." + _t._id + "tick"), side: De, offsetTop: K ? 0 : be.t, offsetLeft: K ? be.l : 0, maxShift: K ? pe.width : pe.height }, attributes: { x: Fe, y: pt, "text-anchor": "middle" }, transform: { rotate: K ? -90 : 0, offset: 0 } });
                }
              }, i.previousPromises, function() {
                var Fe, pt = we + X / 2;
                vt.indexOf("inside") === -1 && (Fe = m.bBox(Je.node()), pt += K ? Fe.width : Fe.height), mt = at.select("text");
                var Mt = 0, At = K && De === "top", Rt = !K && De === "right", Ft = 0;
                if (mt.node() && !mt.classed(M.jsPlaceholder)) {
                  var lt, st = at.select(".h" + _t._id + "title-math-group").node();
                  st && (K && Pt || !K && !Pt) ? (Mt = (Fe = m.bBox(st)).width, lt = Fe.height) : (Mt = (Fe = m.bBox(at.node())).right - be.l - (K ? _e : ft), lt = Fe.bottom - be.t - (K ? ft : _e), K || De !== "top" || (pt += Fe.height, Ft = Fe.height)), Rt && (mt.attr("transform", f(Mt / 2 + St / 2, 0)), Mt *= 2), pt = Math.max(pt, K ? Mt : lt);
                }
                var Ot = 2 * (K ? de : ne) + pt + Q + X / 2, kt = 0;
                !K && Me.text && he === "bottom" && se <= 0 && (Ot += kt = Ot / 2, Ft += kt), pe._hColorbarMoveTitle = kt, pe._hColorbarMoveCBTitle = Ft;
                var Bt = Q + X, xt = (K ? _e : ft) - Bt / 2 - (K ? de : 0), Jt = (K ? ft : _e) - (K ? Re : ne + Ft - kt);
                V.select("." + M.cbbg).attr("x", xt).attr("y", Jt).attr(K ? "width" : "height", Math.max(Ot - kt, 2)).attr(K ? "height" : "width", Math.max(Re + Bt, 2)).call(x.fill, ue).call(x.stroke, $.bordercolor).style("stroke-width", Q);
                var qt = Rt ? Math.max(Mt - 10, 0) : 0;
                V.selectAll("." + M.cboutline).attr("x", (K ? _e : ft + de) + qt).attr("y", (K ? ft + ne - Re : _e) + (At ? nt : 0)).attr(K ? "width" : "height", Math.max(we, 2)).attr(K ? "height" : "width", Math.max(Re - (K ? 2 * ne + nt : 2 * de + qt), 2)).call(x.stroke, $.outlinecolor).style({ fill: "none", "stroke-width": X });
                var en = K ? Be * Ot : 0, Yt = K ? 0 : (1 - $e) * Ot - Ft;
                if (en = ye ? be.l - en : -en, Yt = me ? be.t - Yt : -Yt, V.attr("transform", f(en, Yt)), !K && (Q || u(ue).getAlpha() && !u.equals(pe.paper_bgcolor, ue))) {
                  var Ht = Je.selectAll("text"), sn = Ht[0].length, fn = V.select("." + M.cbbg).node(), In = m.bBox(fn), zn = m.getTranslate(V);
                  Ht.each(function(Kn, Wn) {
                    var hr = sn - 1;
                    if (Wn === 0 || Wn === hr) {
                      var Zn, lr = m.bBox(this), cr = m.getTranslate(this);
                      if (Wn === hr) {
                        var zr = lr.right + cr.x;
                        (Zn = In.right + zn.x + ft - Q - 2 + ae - zr) > 0 && (Zn = 0);
                      } else if (Wn === 0) {
                        var Wr = lr.left + cr.x;
                        (Zn = In.left + zn.x + ft + Q + 2 - Wr) < 0 && (Zn = 0);
                      }
                      Zn && (sn < 3 ? this.setAttribute("transform", "translate(" + Zn + ",0) " + this.getAttribute("transform")) : this.setAttribute("visibility", "hidden"));
                    }
                  });
                }
                var Cn = {}, gn = P[ce], Mn = I[ce], Xn = P[he], Pn = I[he], wn = Ot - we;
                K ? (Y === "pixels" ? (Cn.y = se, Cn.t = Re * Xn, Cn.b = Re * Pn) : (Cn.t = Cn.b = 0, Cn.yt = se + re * Xn, Cn.yb = se - re * Pn), ee === "pixels" ? (Cn.x = ae, Cn.l = Ot * gn, Cn.r = Ot * Mn) : (Cn.l = wn * gn, Cn.r = wn * Mn, Cn.xl = ae - te * gn, Cn.xr = ae + te * Mn)) : (Y === "pixels" ? (Cn.x = ae, Cn.l = Re * gn, Cn.r = Re * Mn) : (Cn.l = Cn.r = 0, Cn.xl = ae + re * gn, Cn.xr = ae - re * Mn), ee === "pixels" ? (Cn.y = 1 - se, Cn.t = Ot * Xn, Cn.b = Ot * Pn) : (Cn.t = wn * Xn, Cn.b = wn * Pn, Cn.yt = se - te * Xn, Cn.yb = se + te * Pn));
                var Rn = $.y < 0.5 ? "b" : "t", _n = $.x < 0.5 ? "l" : "r";
                q._fullLayout._reservedMargin[$._id] = {};
                var En = { r: pe.width - xt - en, l: xt + Cn.r, b: pe.height - Jt - Yt, t: Jt + Cn.b };
                ye && me ? i.autoMargin(q, $._id, Cn) : ye ? q._fullLayout._reservedMargin[$._id][Rn] = En[Rn] : me || K ? q._fullLayout._reservedMargin[$._id][_n] = En[_n] : q._fullLayout._reservedMargin[$._id][Rn] = En[Rn];
              }], q);
            }(F, z, O);
            U && U.then && (O._promises || []).push(U), O._context.edits.colorbarPosition && function(V, $, q) {
              var K, re, Y, te = $.orientation === "v", ee = q._fullLayout._size;
              _.init({ element: V.node(), gd: q, prepFn: function() {
                K = V.attr("transform"), g(V);
              }, moveFn: function(X, Q) {
                V.attr("transform", K + f(X, Q)), re = _.align((te ? $._uFrac : $._vFrac) + X / ee.w, te ? $._thickFrac : $._lenFrac, 0, 1, $.xanchor), Y = _.align((te ? $._vFrac : 1 - $._uFrac) - Q / ee.h, te ? $._lenFrac : $._thickFrac, 0, 1, $.yanchor);
                var ue = _.getCursor(re, Y, $.xanchor, $.yanchor);
                g(V, ue);
              }, doneFn: function() {
                if (g(V), re !== void 0 && Y !== void 0) {
                  var X = {};
                  X[$._propPrefix + "x"] = re, X[$._propPrefix + "y"] = Y, $._traceIndex !== void 0 ? h.call("_guiRestyle", q, X, $._traceIndex) : h.call("_guiRelayout", q, X);
                }
              } });
            }(F, z, O);
          }), T.exit().each(function(z) {
            i.autoMargin(O, z._id);
          }).remove(), T.order();
        } };
      }, 91362: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u) {
          return l.isPlainObject(u.colorbar);
        };
      }, 96919: function(o, s, n) {
        o.exports = { moduleType: "component", name: "colorbar", attributes: n(25158), supplyDefaults: n(42097), draw: n(5881).draw, hasColorbar: n(91362) };
      }, 87163: function(o, s, n) {
        var l = n(25158), u = n(90694).counter, i = n(62994), h = n(19017).scales;
        function p(_) {
          return "`" + _ + "`";
        }
        i(h), o.exports = function(_, d) {
          _ = _ || "";
          var f, c = (d = d || {}).cLetter || "c", g = ("onlyIfNumerical" in d && d.onlyIfNumerical, "noScale" in d ? d.noScale : _ === "marker.line"), m = "showScaleDflt" in d ? d.showScaleDflt : c === "z", x = typeof d.colorscaleDflt == "string" ? h[d.colorscaleDflt] : null, w = d.editTypeOverride || "", k = _ ? _ + "." : "";
          "colorAttr" in d ? (f = d.colorAttr, d.colorAttr) : p(k + (f = { z: "z", c: "color" }[c]));
          var S = c + "auto", A = c + "min", C = c + "max", D = c + "mid", L = {};
          L[A] = L[C] = void 0;
          var E = {};
          E[S] = !1;
          var P = {};
          return f === "color" && (P.color = { valType: "color", arrayOk: !0, editType: w || "style" }, d.anim && (P.color.anim = !0)), P[S] = { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: L }, P[A] = { valType: "number", dflt: null, editType: w || "plot", impliedEdits: E }, P[C] = { valType: "number", dflt: null, editType: w || "plot", impliedEdits: E }, P[D] = { valType: "number", dflt: null, editType: "calc", impliedEdits: L }, P.colorscale = { valType: "colorscale", editType: "calc", dflt: x, impliedEdits: { autocolorscale: !1 } }, P.autocolorscale = { valType: "boolean", dflt: d.autoColorDflt !== !1, editType: "calc", impliedEdits: { colorscale: void 0 } }, P.reversescale = { valType: "boolean", dflt: !1, editType: "plot" }, g || (P.showscale = { valType: "boolean", dflt: m, editType: "calc" }, P.colorbar = l), d.noColorAxis || (P.coloraxis = { valType: "subplotid", regex: u("coloraxis"), dflt: null, editType: "calc" }), P;
        };
      }, 28379: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(65477).extractOpts;
        o.exports = function(h, p, _) {
          var d, f = h._fullLayout, c = _.vals, g = _.containerStr, m = g ? u.nestedProperty(p, g).get() : p, x = i(m), w = x.auto !== !1, k = x.min, S = x.max, A = x.mid, C = function() {
            return u.aggNums(Math.min, null, c);
          }, D = function() {
            return u.aggNums(Math.max, null, c);
          };
          k === void 0 ? k = C() : w && (k = m._colorAx && l(k) ? Math.min(k, C()) : C()), S === void 0 ? S = D() : w && (S = m._colorAx && l(S) ? Math.max(S, D()) : D()), w && A !== void 0 && (S - A > A - k ? k = A - (S - A) : S - A < A - k && (S = A + (A - k))), k === S && (k -= 0.5, S += 0.5), x._sync("min", k), x._sync("max", S), x.autocolorscale && (d = k * S < 0 ? f.colorscale.diverging : k >= 0 ? f.colorscale.sequential : f.colorscale.sequentialminus, x._sync("colorscale", d));
        };
      }, 67623: function(o, s, n) {
        var l = n(34809), u = n(65477).hasColorscale, i = n(65477).extractOpts;
        o.exports = function(h, p) {
          function _(w, k) {
            var S = w["_" + k];
            S !== void 0 && (w[k] = S);
          }
          function d(w, k) {
            var S = k.container ? l.nestedProperty(w, k.container).get() : w;
            if (S) if (S.coloraxis) S._colorAx = p[S.coloraxis];
            else {
              var A = i(S), C = A.auto;
              (C || A.min === void 0) && _(S, k.min), (C || A.max === void 0) && _(S, k.max), A.autocolorscale && _(S, "colorscale");
            }
          }
          for (var f = 0; f < h.length; f++) {
            var c = h[f], g = c._module.colorbar;
            if (g) if (Array.isArray(g)) for (var m = 0; m < g.length; m++) d(c, g[m]);
            else d(c, g);
            u(c, "marker.line") && d(c, { container: "marker.line", min: "cmin", max: "cmax" });
          }
          for (var x in p._colorAxes) d(p[x], { min: "cmin", max: "cmax" });
        };
      }, 39356: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(91362), h = n(42097), p = n(19017).isValid, _ = n(33626).traceIs;
        function d(f, c) {
          var g = c.slice(0, c.length - 1);
          return c ? u.nestedProperty(f, g).get() || {} : f;
        }
        o.exports = function f(c, g, m, x, w) {
          var k = w.prefix, S = w.cLetter, A = "_module" in g, C = d(c, k), D = d(g, k), L = d(g._template || {}, k) || {}, E = function() {
            return delete c.coloraxis, delete g.coloraxis, f(c, g, m, x, w);
          };
          if (A) {
            var P = m._colorAxes || {}, I = x(k + "coloraxis");
            if (I) {
              var M = _(g, "contour") && u.nestedProperty(g, "contours.coloring").get() || "heatmap", O = P[I];
              return void (O ? (O[2].push(E), O[0] !== M && (O[0] = !1, u.warn(["Ignoring coloraxis:", I, "setting", "as it is linked to incompatible colorscales."].join(" ")))) : P[I] = [M, g, [E]]);
            }
          }
          var T = C[S + "min"], z = C[S + "max"], F = l(T) && l(z) && T < z;
          x(k + S + "auto", !F) ? x(k + S + "mid") : (x(k + S + "min"), x(k + S + "max"));
          var U, V, $ = C.colorscale, q = L.colorscale;
          $ !== void 0 && (U = !p($)), q !== void 0 && (U = !p(q)), x(k + "autocolorscale", U), x(k + "colorscale"), x(k + "reversescale"), k !== "marker.line." && (k && A && (V = i(C)), x(k + "showscale", V) && (k && L && (D._template = L), h(C, D, m)));
        };
      }, 65477: function(o, s, n) {
        var l = n(45568), u = n(65657), i = n(10721), h = n(34809), p = n(78766), _ = n(19017).isValid, d = ["showscale", "autocolorscale", "colorscale", "reversescale", "colorbar"], f = ["min", "max", "mid", "auto"];
        function c(k) {
          var S, A, C, D = k._colorAx, L = D || k, E = {};
          for (A = 0; A < d.length; A++) E[C = d[A]] = L[C];
          if (D) for (S = "c", A = 0; A < f.length; A++) E[C = f[A]] = L["c" + C];
          else {
            var P;
            for (A = 0; A < f.length; A++) ((P = "c" + (C = f[A])) in L || (P = "z" + C) in L) && (E[C] = L[P]);
            S = P.charAt(0);
          }
          return E._sync = function(I, M) {
            var O = f.indexOf(I) !== -1 ? S + I : I;
            L[O] = L["_" + O] = M;
          }, E;
        }
        function g(k) {
          for (var S = c(k), A = S.min, C = S.max, D = S.reversescale ? m(S.colorscale) : S.colorscale, L = D.length, E = new Array(L), P = new Array(L), I = 0; I < L; I++) {
            var M = D[I];
            E[I] = A + M[0] * (C - A), P[I] = M[1];
          }
          return { domain: E, range: P };
        }
        function m(k) {
          for (var S = k.length, A = new Array(S), C = S - 1, D = 0; C >= 0; C--, D++) {
            var L = k[C];
            A[D] = [1 - L[0], L[1]];
          }
          return A;
        }
        function x(k, S) {
          S = S || {};
          for (var A = k.domain, C = k.range, D = C.length, L = new Array(D), E = 0; E < D; E++) {
            var P = u(C[E]).toRgb();
            L[E] = [P.r, P.g, P.b, P.a];
          }
          var I, M = l.scale.linear().domain(A).range(L).clamp(!0), O = S.noNumericCheck, T = S.returnArray;
          return (I = O && T ? M : O ? function(z) {
            return w(M(z));
          } : T ? function(z) {
            return i(z) ? M(z) : u(z).isValid() ? z : p.defaultLine;
          } : function(z) {
            return i(z) ? w(M(z)) : u(z).isValid() ? z : p.defaultLine;
          }).domain = M.domain, I.range = function() {
            return C;
          }, I;
        }
        function w(k) {
          var S = { r: k[0], g: k[1], b: k[2], a: k[3] };
          return u(S).toRgbString();
        }
        o.exports = { hasColorscale: function(k, S, A) {
          var C = S ? h.nestedProperty(k, S).get() || {} : k, D = C[A || "color"];
          D && D._inputArray && (D = D._inputArray);
          var L = !1;
          if (h.isArrayOrTypedArray(D)) {
            for (var E = 0; E < D.length; E++) if (i(D[E])) {
              L = !0;
              break;
            }
          }
          return h.isPlainObject(C) && (L || C.showscale === !0 || i(C.cmin) && i(C.cmax) || _(C.colorscale) || h.isPlainObject(C.colorbar));
        }, extractOpts: c, extractScale: g, flipScale: m, makeColorScaleFunc: x, makeColorScaleFuncFromTrace: function(k, S) {
          return x(g(k), S);
        } };
      }, 88856: function(o, s, n) {
        var l = n(19017), u = n(65477);
        o.exports = { moduleType: "component", name: "colorscale", attributes: n(87163), layoutAttributes: n(56978), supplyLayoutDefaults: n(64613), handleDefaults: n(39356), crossTraceDefaults: n(67623), calc: n(28379), scales: l.scales, defaultScale: l.defaultScale, getScale: l.get, isValidScale: l.isValid, hasColorscale: u.hasColorscale, extractOpts: u.extractOpts, extractScale: u.extractScale, flipScale: u.flipScale, makeColorScaleFunc: u.makeColorScaleFunc, makeColorScaleFuncFromTrace: u.makeColorScaleFuncFromTrace };
      }, 56978: function(o, s, n) {
        var l = n(93049).extendFlat, u = n(87163), i = n(19017).scales;
        o.exports = { editType: "calc", colorscale: { editType: "calc", sequential: { valType: "colorscale", dflt: i.Reds, editType: "calc" }, sequentialminus: { valType: "colorscale", dflt: i.Blues, editType: "calc" }, diverging: { valType: "colorscale", dflt: i.RdBu, editType: "calc" } }, coloraxis: l({ _isSubplotObj: !0, editType: "calc" }, u("", { colorAttr: "corresponding trace color array(s)", noColorAxis: !0, showScaleDflt: !0 })) };
      }, 64613: function(o, s, n) {
        var l = n(34809), u = n(78032), i = n(56978), h = n(39356);
        o.exports = function(p, _) {
          function d(S, A) {
            return l.coerce(p, _, i, S, A);
          }
          d("colorscale.sequential"), d("colorscale.sequentialminus"), d("colorscale.diverging");
          var f, c, g = _._colorAxes;
          function m(S, A) {
            return l.coerce(f, c, i.coloraxis, S, A);
          }
          for (var x in g) {
            var w = g[x];
            if (w[0]) f = p[x] || {}, (c = u.newContainer(_, x, "coloraxis"))._name = x, h(f, c, _, m, { prefix: "", cLetter: "c" });
            else {
              for (var k = 0; k < w[2].length; k++) w[2][k]();
              delete _._colorAxes[x];
            }
          }
        };
      }, 19017: function(o, s, n) {
        var l = n(65657), u = { Greys: [[0, "rgb(0,0,0)"], [1, "rgb(255,255,255)"]], YlGnBu: [[0, "rgb(8,29,88)"], [0.125, "rgb(37,52,148)"], [0.25, "rgb(34,94,168)"], [0.375, "rgb(29,145,192)"], [0.5, "rgb(65,182,196)"], [0.625, "rgb(127,205,187)"], [0.75, "rgb(199,233,180)"], [0.875, "rgb(237,248,217)"], [1, "rgb(255,255,217)"]], Greens: [[0, "rgb(0,68,27)"], [0.125, "rgb(0,109,44)"], [0.25, "rgb(35,139,69)"], [0.375, "rgb(65,171,93)"], [0.5, "rgb(116,196,118)"], [0.625, "rgb(161,217,155)"], [0.75, "rgb(199,233,192)"], [0.875, "rgb(229,245,224)"], [1, "rgb(247,252,245)"]], YlOrRd: [[0, "rgb(128,0,38)"], [0.125, "rgb(189,0,38)"], [0.25, "rgb(227,26,28)"], [0.375, "rgb(252,78,42)"], [0.5, "rgb(253,141,60)"], [0.625, "rgb(254,178,76)"], [0.75, "rgb(254,217,118)"], [0.875, "rgb(255,237,160)"], [1, "rgb(255,255,204)"]], Bluered: [[0, "rgb(0,0,255)"], [1, "rgb(255,0,0)"]], RdBu: [[0, "rgb(5,10,172)"], [0.35, "rgb(106,137,247)"], [0.5, "rgb(190,190,190)"], [0.6, "rgb(220,170,132)"], [0.7, "rgb(230,145,90)"], [1, "rgb(178,10,28)"]], Reds: [[0, "rgb(220,220,220)"], [0.2, "rgb(245,195,157)"], [0.4, "rgb(245,160,105)"], [1, "rgb(178,10,28)"]], Blues: [[0, "rgb(5,10,172)"], [0.35, "rgb(40,60,190)"], [0.5, "rgb(70,100,245)"], [0.6, "rgb(90,120,245)"], [0.7, "rgb(106,137,247)"], [1, "rgb(220,220,220)"]], Picnic: [[0, "rgb(0,0,255)"], [0.1, "rgb(51,153,255)"], [0.2, "rgb(102,204,255)"], [0.3, "rgb(153,204,255)"], [0.4, "rgb(204,204,255)"], [0.5, "rgb(255,255,255)"], [0.6, "rgb(255,204,255)"], [0.7, "rgb(255,153,255)"], [0.8, "rgb(255,102,204)"], [0.9, "rgb(255,102,102)"], [1, "rgb(255,0,0)"]], Rainbow: [[0, "rgb(150,0,90)"], [0.125, "rgb(0,0,200)"], [0.25, "rgb(0,25,255)"], [0.375, "rgb(0,152,255)"], [0.5, "rgb(44,255,150)"], [0.625, "rgb(151,255,0)"], [0.75, "rgb(255,234,0)"], [0.875, "rgb(255,111,0)"], [1, "rgb(255,0,0)"]], Portland: [[0, "rgb(12,51,131)"], [0.25, "rgb(10,136,186)"], [0.5, "rgb(242,211,56)"], [0.75, "rgb(242,143,56)"], [1, "rgb(217,30,30)"]], Jet: [[0, "rgb(0,0,131)"], [0.125, "rgb(0,60,170)"], [0.375, "rgb(5,255,255)"], [0.625, "rgb(255,255,0)"], [0.875, "rgb(250,0,0)"], [1, "rgb(128,0,0)"]], Hot: [[0, "rgb(0,0,0)"], [0.3, "rgb(230,0,0)"], [0.6, "rgb(255,210,0)"], [1, "rgb(255,255,255)"]], Blackbody: [[0, "rgb(0,0,0)"], [0.2, "rgb(230,0,0)"], [0.4, "rgb(230,210,0)"], [0.7, "rgb(255,255,255)"], [1, "rgb(160,200,255)"]], Earth: [[0, "rgb(0,0,130)"], [0.1, "rgb(0,180,180)"], [0.2, "rgb(40,210,40)"], [0.4, "rgb(230,230,50)"], [0.6, "rgb(120,70,20)"], [1, "rgb(255,255,255)"]], Electric: [[0, "rgb(0,0,0)"], [0.15, "rgb(30,0,100)"], [0.4, "rgb(120,0,100)"], [0.6, "rgb(160,90,0)"], [0.8, "rgb(230,200,0)"], [1, "rgb(255,250,220)"]], Viridis: [[0, "#440154"], [0.06274509803921569, "#48186a"], [0.12549019607843137, "#472d7b"], [0.18823529411764706, "#424086"], [0.25098039215686274, "#3b528b"], [0.3137254901960784, "#33638d"], [0.3764705882352941, "#2c728e"], [0.4392156862745098, "#26828e"], [0.5019607843137255, "#21918c"], [0.5647058823529412, "#1fa088"], [0.6274509803921569, "#28ae80"], [0.6901960784313725, "#3fbc73"], [0.7529411764705882, "#5ec962"], [0.8156862745098039, "#84d44b"], [0.8784313725490196, "#addc30"], [0.9411764705882353, "#d8e219"], [1, "#fde725"]], Cividis: [[0, "rgb(0,32,76)"], [0.058824, "rgb(0,42,102)"], [0.117647, "rgb(0,52,110)"], [0.176471, "rgb(39,63,108)"], [0.235294, "rgb(60,74,107)"], [0.294118, "rgb(76,85,107)"], [0.352941, "rgb(91,95,109)"], [0.411765, "rgb(104,106,112)"], [0.470588, "rgb(117,117,117)"], [0.529412, "rgb(131,129,120)"], [0.588235, "rgb(146,140,120)"], [0.647059, "rgb(161,152,118)"], [0.705882, "rgb(176,165,114)"], [0.764706, "rgb(192,177,109)"], [0.823529, "rgb(209,191,102)"], [0.882353, "rgb(225,204,92)"], [0.941176, "rgb(243,219,79)"], [1, "rgb(255,233,69)"]] }, i = u.RdBu;
        function h(p) {
          var _ = 0;
          if (!Array.isArray(p) || p.length < 2 || !p[0] || !p[p.length - 1] || +p[0][0] != 0 || +p[p.length - 1][0] != 1) return !1;
          for (var d = 0; d < p.length; d++) {
            var f = p[d];
            if (f.length !== 2 || +f[0] < _ || !l(f[1]).isValid()) return !1;
            _ = +f[0];
          }
          return !0;
        }
        o.exports = { scales: u, defaultScale: i, get: function(p, _) {
          if (_ || (_ = i), !p) return _;
          function d() {
            try {
              p = u[p] || JSON.parse(p);
            } catch {
              p = _;
            }
          }
          return typeof p == "string" && (d(), typeof p == "string" && d()), h(p) ? p : _;
        }, isValid: function(p) {
          return u[p] !== void 0 || h(p);
        } };
      }, 53770: function(o) {
        o.exports = function(s, n, l, u, i) {
          var h = (s - l) / (u - l), p = h + n / (u - l), _ = (h + p) / 2;
          return i === "left" || i === "bottom" ? h : i === "center" || i === "middle" ? _ : i === "right" || i === "top" ? p : h < 0.6666666666666666 - _ ? h : p > 1.3333333333333333 - _ ? p : _;
        };
      }, 4001: function(o, s, n) {
        var l = n(34809), u = [["sw-resize", "s-resize", "se-resize"], ["w-resize", "move", "e-resize"], ["nw-resize", "n-resize", "ne-resize"]];
        o.exports = function(i, h, p, _) {
          return i = p === "left" ? 0 : p === "center" ? 1 : p === "right" ? 2 : l.constrain(Math.floor(3 * i), 0, 2), h = _ === "bottom" ? 0 : _ === "middle" ? 1 : _ === "top" ? 2 : l.constrain(Math.floor(3 * h), 0, 2), u[h][i];
        };
      }, 70414: function(o, s) {
        s.selectMode = function(n) {
          return n === "lasso" || n === "select";
        }, s.drawMode = function(n) {
          return n === "drawclosedpath" || n === "drawopenpath" || n === "drawline" || n === "drawrect" || n === "drawcircle";
        }, s.openMode = function(n) {
          return n === "drawline" || n === "drawopenpath";
        }, s.rectMode = function(n) {
          return n === "select" || n === "drawline" || n === "drawrect" || n === "drawcircle";
        }, s.freeMode = function(n) {
          return n === "lasso" || n === "drawclosedpath" || n === "drawopenpath";
        }, s.selectingOrDrawing = function(n) {
          return s.freeMode(n) || s.rectMode(n);
        };
      }, 14751: function(o, s, n) {
        var l = n(44039), u = n(39784), i = n(74043), h = n(34809).removeElement, p = n(54826), _ = o.exports = {};
        _.align = n(53770), _.getCursor = n(4001);
        var d = n(60148);
        function f() {
          var g = document.createElement("div");
          g.className = "dragcover";
          var m = g.style;
          return m.position = "fixed", m.left = 0, m.right = 0, m.top = 0, m.bottom = 0, m.zIndex = 999999999, m.background = "none", document.body.appendChild(g), g;
        }
        function c(g) {
          return l(g.changedTouches ? g.changedTouches[0] : g, document.body);
        }
        _.unhover = d.wrapped, _.unhoverRaw = d.raw, _.init = function(g) {
          var m, x, w, k, S, A, C, D, L = g.gd, E = 1, P = L._context.doubleClickDelay, I = g.element;
          L._mouseDownTime || (L._mouseDownTime = 0), I.style.pointerEvents = "all", I.onmousedown = O, i ? (I._ontouchstart && I.removeEventListener("touchstart", I._ontouchstart), I._ontouchstart = O, I.addEventListener("touchstart", O, { passive: !1 })) : I.ontouchstart = O;
          var M = g.clampFn || function(F, U, V) {
            return Math.abs(F) < V && (F = 0), Math.abs(U) < V && (U = 0), [F, U];
          };
          function O(F) {
            L._dragged = !1, L._dragging = !0;
            var U = c(F);
            m = U[0], x = U[1], C = F.target, A = F, D = F.buttons === 2 || F.ctrlKey, F.clientX === void 0 && F.clientY === void 0 && (F.clientX = m, F.clientY = x), (w = (/* @__PURE__ */ new Date()).getTime()) - L._mouseDownTime < P ? E += 1 : (E = 1, L._mouseDownTime = w), g.prepFn && g.prepFn(F, m, x), u && !D ? (S = f()).style.cursor = window.getComputedStyle(I).cursor : u || (S = document, k = window.getComputedStyle(document.documentElement).cursor, document.documentElement.style.cursor = window.getComputedStyle(I).cursor), document.addEventListener("mouseup", z), document.addEventListener("touchend", z), g.dragmode !== !1 && (F.preventDefault(), document.addEventListener("mousemove", T), document.addEventListener("touchmove", T, { passive: !1 }));
          }
          function T(F) {
            F.preventDefault();
            var U = c(F), V = g.minDrag || p.MINDRAG, $ = M(U[0] - m, U[1] - x, V), q = $[0], K = $[1];
            (q || K) && (L._dragged = !0, _.unhover(L, F)), L._dragged && g.moveFn && !D && (L._dragdata = { element: I, dx: q, dy: K }, g.moveFn(q, K));
          }
          function z(F) {
            if (delete L._dragdata, g.dragmode !== !1 && (F.preventDefault(), document.removeEventListener("mousemove", T), document.removeEventListener("touchmove", T)), document.removeEventListener("mouseup", z), document.removeEventListener("touchend", z), u ? h(S) : k && (S.documentElement.style.cursor = k, k = null), L._dragging) {
              if (L._dragging = !1, (/* @__PURE__ */ new Date()).getTime() - L._mouseDownTime > P && (E = Math.max(E - 1, 1)), L._dragged) g.doneFn && g.doneFn();
              else if (g.clickFn && g.clickFn(E, A), !D) {
                var U;
                try {
                  U = new MouseEvent("click", F);
                } catch {
                  var V = c(F);
                  (U = document.createEvent("MouseEvents")).initMouseEvent("click", F.bubbles, F.cancelable, F.view, F.detail, F.screenX, F.screenY, V[0], V[1], F.ctrlKey, F.altKey, F.shiftKey, F.metaKey, F.button, F.relatedTarget);
                }
                C.dispatchEvent(U);
              }
              L._dragging = !1, L._dragged = !1;
            } else L._dragged = !1;
          }
        }, _.coverSlip = f;
      }, 60148: function(o, s, n) {
        var l = n(68596), u = n(64025), i = n(95425).getGraphDiv, h = n(85988), p = o.exports = {};
        p.wrapped = function(_, d, f) {
          (_ = i(_))._fullLayout && u.clear(_._fullLayout._uid + h.HOVERID), p.raw(_, d, f);
        }, p.raw = function(_, d) {
          var f = _._fullLayout, c = _._hoverdata;
          d || (d = {}), d.target && !_._dragged && l.triggerHandler(_, "plotly_beforehover", d) === !1 || (f._hoverlayer.selectAll("g").remove(), f._hoverlayer.selectAll("line").remove(), f._hoverlayer.selectAll("circle").remove(), _._hoverdata = void 0, d.target && c && _.emit("plotly_unhover", { event: d, points: c }));
        };
      }, 94850: function(o, s) {
        s.T = { valType: "string", values: ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"], dflt: "solid", editType: "style" }, s.k = { shape: { valType: "enumerated", values: ["", "/", "\\", "x", "-", "|", "+", "."], dflt: "", arrayOk: !0, editType: "style" }, fillmode: { valType: "enumerated", values: ["replace", "overlay"], dflt: "replace", editType: "style" }, bgcolor: { valType: "color", arrayOk: !0, editType: "style" }, fgcolor: { valType: "color", arrayOk: !0, editType: "style" }, fgopacity: { valType: "number", editType: "style", min: 0, max: 1 }, size: { valType: "number", min: 0, dflt: 8, arrayOk: !0, editType: "style" }, solidity: { valType: "number", min: 0, max: 1, dflt: 0.3, arrayOk: !0, editType: "style" }, editType: "style" };
      }, 62203: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.numberFormat, h = n(10721), p = n(65657), _ = n(33626), d = n(78766), f = n(88856), c = u.strTranslate, g = n(30635), m = n(62972), x = n(4530).LINE_SPACING, w = n(20438).DESELECTDIM, k = n(64726), S = n(92527), A = n(36040).appendArrayPointValue, C = o.exports = {};
        function D(Ee) {
          return Ee === "none" ? void 0 : Ee;
        }
        C.font = function(Ee, Ne) {
          var Ie = Ne.variant, ge = Ne.style, Ce = Ne.weight, we = Ne.color, Ge = Ne.size, Re = Ne.family, je = Ne.shadow, Ke = Ne.lineposition, tt = Ne.textcase;
          Re && Ee.style("font-family", Re), Ge + 1 && Ee.style("font-size", Ge + "px"), we && Ee.call(d.fill, we), Ce && Ee.style("font-weight", Ce), ge && Ee.style("font-style", ge), Ie && Ee.style("font-variant", Ie), tt && Ee.style("text-transform", D(function(_e) {
            return L[_e];
          }(tt))), je && Ee.style("text-shadow", je === "auto" ? g.makeTextShadow(d.contrast(we)) : D(je)), Ke && Ee.style("text-decoration-line", D(function(_e) {
            return _e.replace("under", "underline").replace("over", "overline").replace("through", "line-through").split("+").join(" ");
          }(Ke)));
        };
        var L = { normal: "none", lower: "lowercase", upper: "uppercase", "word caps": "capitalize" };
        function E(Ee, Ne, Ie, ge) {
          var Ce = Ne.fillpattern, we = Ne.fillgradient, Ge = Ce && C.getPatternAttr(Ce.shape, 0, "");
          if (Ge) {
            var Re = C.getPatternAttr(Ce.bgcolor, 0, null), je = C.getPatternAttr(Ce.fgcolor, 0, null), Ke = Ce.fgopacity, tt = C.getPatternAttr(Ce.size, 0, 8), _e = C.getPatternAttr(Ce.solidity, 0, 0.3), Be = Ne.uid;
            C.pattern(Ee, "point", Ie, Be, Ge, tt, _e, void 0, Ce.fillmode, Re, je, Ke);
          } else if (we && we.type !== "none") {
            var $e, Ze, ct = we.type, ft = "scatterfill-" + Ne.uid;
            ge && (ft = "legendfill-" + Ne.uid), ge || we.start === void 0 && we.stop === void 0 ? (ct === "horizontal" && (ct += "reversed"), Ee.call(C.gradient, Ie, ft, ct, we.colorscale, "fill")) : (ct === "horizontal" ? ($e = { x: we.start, y: 0 }, Ze = { x: we.stop, y: 0 }) : ct === "vertical" && ($e = { x: 0, y: we.start }, Ze = { x: 0, y: we.stop }), $e.x = Ne._xA.c2p($e.x === void 0 ? Ne._extremes.x.min[0].val : $e.x, !0), $e.y = Ne._yA.c2p($e.y === void 0 ? Ne._extremes.y.min[0].val : $e.y, !0), Ze.x = Ne._xA.c2p(Ze.x === void 0 ? Ne._extremes.x.max[0].val : Ze.x, !0), Ze.y = Ne._yA.c2p(Ze.y === void 0 ? Ne._extremes.y.max[0].val : Ze.y, !0), Ee.call(z, Ie, ft, "linear", we.colorscale, "fill", $e, Ze, !0, !1));
          } else Ne.fillcolor && Ee.call(d.fill, Ne.fillcolor);
        }
        C.setPosition = function(Ee, Ne, Ie) {
          Ee.attr("x", Ne).attr("y", Ie);
        }, C.setSize = function(Ee, Ne, Ie) {
          Ee.attr("width", Ne).attr("height", Ie);
        }, C.setRect = function(Ee, Ne, Ie, ge, Ce) {
          Ee.call(C.setPosition, Ne, Ie).call(C.setSize, ge, Ce);
        }, C.translatePoint = function(Ee, Ne, Ie, ge) {
          var Ce = Ie.c2p(Ee.x), we = ge.c2p(Ee.y);
          return !!(h(Ce) && h(we) && Ne.node()) && (Ne.node().nodeName === "text" ? Ne.attr("x", Ce).attr("y", we) : Ne.attr("transform", c(Ce, we)), !0);
        }, C.translatePoints = function(Ee, Ne, Ie) {
          Ee.each(function(ge) {
            var Ce = l.select(this);
            C.translatePoint(ge, Ce, Ne, Ie);
          });
        }, C.hideOutsideRangePoint = function(Ee, Ne, Ie, ge, Ce, we) {
          Ne.attr("display", Ie.isPtWithinRange(Ee, Ce) && ge.isPtWithinRange(Ee, we) ? null : "none");
        }, C.hideOutsideRangePoints = function(Ee, Ne) {
          if (Ne._hasClipOnAxisFalse) {
            var Ie = Ne.xaxis, ge = Ne.yaxis;
            Ee.each(function(Ce) {
              var we = Ce[0].trace, Ge = we.xcalendar, Re = we.ycalendar, je = _.traceIs(we, "bar-like") ? ".bartext" : ".point,.textpoint";
              Ee.selectAll(je).each(function(Ke) {
                C.hideOutsideRangePoint(Ke, l.select(this), Ie, ge, Ge, Re);
              });
            });
          }
        }, C.crispRound = function(Ee, Ne, Ie) {
          return Ne && h(Ne) ? Ee._context.staticPlot ? Ne : Ne < 1 ? 1 : Math.round(Ne) : Ie || 0;
        }, C.singleLineStyle = function(Ee, Ne, Ie, ge, Ce) {
          Ne.style("fill", "none");
          var we = (((Ee || [])[0] || {}).trace || {}).line || {}, Ge = Ie || we.width || 0, Re = Ce || we.dash || "";
          d.stroke(Ne, ge || we.color), C.dashLine(Ne, Re, Ge);
        }, C.lineGroupStyle = function(Ee, Ne, Ie, ge) {
          Ee.style("fill", "none").each(function(Ce) {
            var we = (((Ce || [])[0] || {}).trace || {}).line || {}, Ge = Ne || we.width || 0, Re = ge || we.dash || "";
            l.select(this).call(d.stroke, Ie || we.color).call(C.dashLine, Re, Ge);
          });
        }, C.dashLine = function(Ee, Ne, Ie) {
          Ie = +Ie || 0, Ne = C.dashStyle(Ne, Ie), Ee.style({ "stroke-dasharray": Ne, "stroke-width": Ie + "px" });
        }, C.dashStyle = function(Ee, Ne) {
          Ne = +Ne || 1;
          var Ie = Math.max(Ne, 3);
          return Ee === "solid" ? Ee = "" : Ee === "dot" ? Ee = Ie + "px," + Ie + "px" : Ee === "dash" ? Ee = 3 * Ie + "px," + 3 * Ie + "px" : Ee === "longdash" ? Ee = 5 * Ie + "px," + 5 * Ie + "px" : Ee === "dashdot" ? Ee = 3 * Ie + "px," + Ie + "px," + Ie + "px," + Ie + "px" : Ee === "longdashdot" && (Ee = 5 * Ie + "px," + 2 * Ie + "px," + Ie + "px," + 2 * Ie + "px"), Ee;
        }, C.singleFillStyle = function(Ee, Ne) {
          var Ie = l.select(Ee.node());
          E(Ee, ((Ie.data()[0] || [])[0] || {}).trace || {}, Ne, !1);
        }, C.fillGroupStyle = function(Ee, Ne, Ie) {
          Ee.style("stroke-width", 0).each(function(ge) {
            var Ce = l.select(this);
            ge[0].trace && E(Ce, ge[0].trace, Ne, Ie);
          });
        };
        var P = n(38882);
        C.symbolNames = [], C.symbolFuncs = [], C.symbolBackOffs = [], C.symbolNeedLines = {}, C.symbolNoDot = {}, C.symbolNoFill = {}, C.symbolList = [], Object.keys(P).forEach(function(Ee) {
          var Ne = P[Ee], Ie = Ne.n;
          C.symbolList.push(Ie, String(Ie), Ee, Ie + 100, String(Ie + 100), Ee + "-open"), C.symbolNames[Ie] = Ee, C.symbolFuncs[Ie] = Ne.f, C.symbolBackOffs[Ie] = Ne.backoff || 0, Ne.needLine && (C.symbolNeedLines[Ie] = !0), Ne.noDot ? C.symbolNoDot[Ie] = !0 : C.symbolList.push(Ie + 200, String(Ie + 200), Ee + "-dot", Ie + 300, String(Ie + 300), Ee + "-open-dot"), Ne.noFill && (C.symbolNoFill[Ie] = !0);
        });
        var I = C.symbolNames.length;
        function M(Ee, Ne, Ie, ge) {
          var Ce = Ee % 100;
          return C.symbolFuncs[Ce](Ne, Ie, ge) + (Ee >= 200 ? "M0,0.5L0.5,0L0,-0.5L-0.5,0Z" : "");
        }
        C.symbolNumber = function(Ee) {
          if (h(Ee)) Ee = +Ee;
          else if (typeof Ee == "string") {
            var Ne = 0;
            Ee.indexOf("-open") > 0 && (Ne = 100, Ee = Ee.replace("-open", "")), Ee.indexOf("-dot") > 0 && (Ne += 200, Ee = Ee.replace("-dot", "")), (Ee = C.symbolNames.indexOf(Ee)) >= 0 && (Ee += Ne);
          }
          return Ee % 100 >= I || Ee >= 400 ? 0 : Math.floor(Math.max(Ee, 0));
        };
        var O = i("~f"), T = { radial: { type: "radial" }, radialreversed: { type: "radial", reversed: !0 }, horizontal: { type: "linear", start: { x: 1, y: 0 }, stop: { x: 0, y: 0 } }, horizontalreversed: { type: "linear", start: { x: 1, y: 0 }, stop: { x: 0, y: 0 }, reversed: !0 }, vertical: { type: "linear", start: { x: 0, y: 1 }, stop: { x: 0, y: 0 } }, verticalreversed: { type: "linear", start: { x: 0, y: 1 }, stop: { x: 0, y: 0 }, reversed: !0 } };
        function z(Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke) {
          var tt, _e = Ce.length;
          ge === "linear" ? tt = { node: "linearGradient", attrs: { x1: Ge.x, y1: Ge.y, x2: Re.x, y2: Re.y, gradientUnits: je ? "userSpaceOnUse" : "objectBoundingBox" }, reversed: Ke } : ge === "radial" && (tt = { node: "radialGradient", reversed: Ke });
          for (var Be = new Array(_e), $e = 0; $e < _e; $e++) tt.reversed ? Be[_e - 1 - $e] = [O(100 * (1 - Ce[$e][0])), Ce[$e][1]] : Be[$e] = [O(100 * Ce[$e][0]), Ce[$e][1]];
          var Ze = Ne._fullLayout, ct = "g" + Ze._uid + "-" + Ie, ft = Ze._defs.select(".gradients").selectAll("#" + ct).data([ge + Be.join(";")], u.identity);
          ft.exit().remove(), ft.enter().append(tt.node).each(function() {
            var _t = l.select(this);
            tt.attrs && _t.attr(tt.attrs), _t.attr("id", ct);
            var Pt = _t.selectAll("stop").data(Be);
            Pt.exit().remove(), Pt.enter().append("stop"), Pt.each(function(Dt) {
              var $t = p(Dt[1]);
              l.select(this).attr({ offset: Dt[0] + "%", "stop-color": d.tinyRGB($t), "stop-opacity": $t.getAlpha() });
            });
          }), Ee.style(we, he(ct, Ne)).style(we + "-opacity", null), Ee.classed("gradient_filled", !0);
        }
        C.gradient = function(Ee, Ne, Ie, ge, Ce, we) {
          var Ge = T[ge];
          return z(Ee, Ne, Ie, Ge.type, Ce, we, Ge.start, Ge.stop, !1, Ge.reversed);
        }, C.pattern = function(Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke, tt, _e) {
          var Be = Ne === "legend";
          Re && (je === "overlay" ? (Ke = Re, tt = d.contrast(Ke)) : (Ke = void 0, tt = Re));
          var $e, Ze, ct, ft, _t, Pt, Dt, $t, Gt, Wt = Ie._fullLayout, mt = "p" + Wt._uid + "-" + ge, at = {}, vt = p(tt), St = d.tinyRGB(vt), Je = _e * vt.getAlpha();
          switch (Ce) {
            case "/":
              $e = we * Math.sqrt(2), Ze = we * Math.sqrt(2), Pt = "path", at = { d: ct = "M-" + $e / 4 + "," + Ze / 4 + "l" + $e / 2 + ",-" + Ze / 2 + "M0," + Ze + "L" + $e + ",0M" + $e / 4 * 3 + "," + Ze / 4 * 5 + "l" + $e / 2 + ",-" + Ze / 2, opacity: Je, stroke: St, "stroke-width": (ft = Ge * we) + "px" };
              break;
            case "\\":
              $e = we * Math.sqrt(2), Ze = we * Math.sqrt(2), Pt = "path", at = { d: ct = "M" + $e / 4 * 3 + ",-" + Ze / 4 + "l" + $e / 2 + "," + Ze / 2 + "M0,0L" + $e + "," + Ze + "M-" + $e / 4 + "," + Ze / 4 * 3 + "l" + $e / 2 + "," + Ze / 2, opacity: Je, stroke: St, "stroke-width": (ft = Ge * we) + "px" };
              break;
            case "x":
              $e = we * Math.sqrt(2), Ze = we * Math.sqrt(2), ct = "M-" + $e / 4 + "," + Ze / 4 + "l" + $e / 2 + ",-" + Ze / 2 + "M0," + Ze + "L" + $e + ",0M" + $e / 4 * 3 + "," + Ze / 4 * 5 + "l" + $e / 2 + ",-" + Ze / 2 + "M" + $e / 4 * 3 + ",-" + Ze / 4 + "l" + $e / 2 + "," + Ze / 2 + "M0,0L" + $e + "," + Ze + "M-" + $e / 4 + "," + Ze / 4 * 3 + "l" + $e / 2 + "," + Ze / 2, ft = we - we * Math.sqrt(1 - Ge), Pt = "path", at = { d: ct, opacity: Je, stroke: St, "stroke-width": ft + "px" };
              break;
            case "|":
              Pt = "path", Pt = "path", at = { d: ct = "M" + ($e = we) / 2 + ",0L" + $e / 2 + "," + (Ze = we), opacity: Je, stroke: St, "stroke-width": (ft = Ge * we) + "px" };
              break;
            case "-":
              Pt = "path", Pt = "path", at = { d: ct = "M0," + (Ze = we) / 2 + "L" + ($e = we) + "," + Ze / 2, opacity: Je, stroke: St, "stroke-width": (ft = Ge * we) + "px" };
              break;
            case "+":
              Pt = "path", ct = "M" + ($e = we) / 2 + ",0L" + $e / 2 + "," + (Ze = we) + "M0," + Ze / 2 + "L" + $e + "," + Ze / 2, ft = we - we * Math.sqrt(1 - Ge), Pt = "path", at = { d: ct, opacity: Je, stroke: St, "stroke-width": ft + "px" };
              break;
            case ".":
              $e = we, Ze = we, Ge < Math.PI / 4 ? _t = Math.sqrt(Ge * we * we / Math.PI) : (Dt = Ge, $t = Math.PI / 4, _t = (Gt = we / 2) + (we / Math.sqrt(2) - Gt) * (Dt - $t) / (1 - $t)), Pt = "circle", at = { cx: $e / 2, cy: Ze / 2, r: _t, opacity: Je, fill: St };
          }
          var nt = [Ce || "noSh", Ke || "noBg", tt || "noFg", we, Ge].join(";"), ot = Wt._defs.select(".patterns").selectAll("#" + mt).data([nt], u.identity);
          ot.exit().remove(), ot.enter().append("pattern").each(function() {
            var Ye = l.select(this);
            if (Ye.attr({ id: mt, width: $e + "px", height: Ze + "px", patternUnits: "userSpaceOnUse", patternTransform: Be ? "scale(0.8)" : "" }), Ke) {
              var Fe = p(Ke), pt = d.tinyRGB(Fe), Mt = Fe.getAlpha(), At = Ye.selectAll("rect").data([0]);
              At.exit().remove(), At.enter().append("rect").attr({ width: $e + "px", height: Ze + "px", fill: pt, "fill-opacity": Mt });
            }
            var Rt = Ye.selectAll(Pt).data([0]);
            Rt.exit().remove(), Rt.enter().append(Pt).attr(at);
          }), Ee.style("fill", he(mt, Ie)).style("fill-opacity", null), Ee.classed("pattern_filled", !0);
        }, C.initGradients = function(Ee) {
          var Ne = Ee._fullLayout;
          u.ensureSingle(Ne._defs, "g", "gradients").selectAll("linearGradient,radialGradient").remove(), l.select(Ee).selectAll(".gradient_filled").classed("gradient_filled", !1);
        }, C.initPatterns = function(Ee) {
          var Ne = Ee._fullLayout;
          u.ensureSingle(Ne._defs, "g", "patterns").selectAll("pattern").remove(), l.select(Ee).selectAll(".pattern_filled").classed("pattern_filled", !1);
        }, C.getPatternAttr = function(Ee, Ne, Ie) {
          return Ee && u.isArrayOrTypedArray(Ee) ? Ne < Ee.length ? Ee[Ne] : Ie : Ee;
        }, C.pointStyle = function(Ee, Ne, Ie, ge) {
          if (Ee.size()) {
            var Ce = C.makePointStyleFns(Ne);
            Ee.each(function(we) {
              C.singlePointStyle(we, l.select(this), Ne, Ce, Ie, ge);
            });
          }
        }, C.singlePointStyle = function(Ee, Ne, Ie, ge, Ce, we) {
          var Ge = Ie.marker, Re = Ge.line;
          if (we && we.i >= 0 && Ee.i === void 0 && (Ee.i = we.i), Ne.style("opacity", ge.selectedOpacityFn ? ge.selectedOpacityFn(Ee) : Ee.mo === void 0 ? Ge.opacity : Ee.mo), ge.ms2mrc) {
            var je;
            je = Ee.ms === "various" || Ge.size === "various" ? 3 : ge.ms2mrc(Ee.ms), Ee.mrc = je, ge.selectedSizeFn && (je = Ee.mrc = ge.selectedSizeFn(Ee));
            var Ke = C.symbolNumber(Ee.mx || Ge.symbol) || 0;
            Ee.om = Ke % 200 >= 100;
            var tt = We(Ee, Ie), _e = ae(Ee, Ie);
            Ne.attr("d", M(Ke, je, tt, _e));
          }
          var Be, $e, Ze, ct = !1;
          if (Ee.so) Ze = Re.outlierwidth, $e = Re.outliercolor, Be = Ge.outliercolor;
          else {
            var ft = (Re || {}).width;
            Ze = (Ee.mlw + 1 || ft + 1 || (Ee.trace ? (Ee.trace.marker.line || {}).width : 0) + 1) - 1 || 0, $e = "mlc" in Ee ? Ee.mlcc = ge.lineScale(Ee.mlc) : u.isArrayOrTypedArray(Re.color) ? d.defaultLine : Re.color, u.isArrayOrTypedArray(Ge.color) && (Be = d.defaultLine, ct = !0), Be = "mc" in Ee ? Ee.mcc = ge.markerScale(Ee.mc) : Ge.color || Ge.colors || "rgba(0,0,0,0)", ge.selectedColorFn && (Be = ge.selectedColorFn(Ee));
          }
          if (Ee.om) Ne.call(d.stroke, Be).style({ "stroke-width": (Ze || 1) + "px", fill: "none" });
          else {
            Ne.style("stroke-width", (Ee.isBlank ? 0 : Ze) + "px");
            var _t = Ge.gradient, Pt = Ee.mgt;
            Pt ? ct = !0 : Pt = _t && _t.type, u.isArrayOrTypedArray(Pt) && (Pt = Pt[0], T[Pt] || (Pt = 0));
            var Dt = Ge.pattern, $t = Dt && C.getPatternAttr(Dt.shape, Ee.i, "");
            if (Pt && Pt !== "none") {
              var Gt = Ee.mgc;
              Gt ? ct = !0 : Gt = _t.color;
              var Wt = Ie.uid;
              ct && (Wt += "-" + Ee.i), C.gradient(Ne, Ce, Wt, Pt, [[0, Gt], [1, Be]], "fill");
            } else if ($t) {
              var mt = !1, at = Dt.fgcolor;
              !at && we && we.color && (at = we.color, mt = !0);
              var vt = C.getPatternAttr(at, Ee.i, we && we.color || null), St = C.getPatternAttr(Dt.bgcolor, Ee.i, null), Je = Dt.fgopacity, nt = C.getPatternAttr(Dt.size, Ee.i, 8), ot = C.getPatternAttr(Dt.solidity, Ee.i, 0.3);
              mt = mt || Ee.mcc || u.isArrayOrTypedArray(Dt.shape) || u.isArrayOrTypedArray(Dt.bgcolor) || u.isArrayOrTypedArray(Dt.fgcolor) || u.isArrayOrTypedArray(Dt.size) || u.isArrayOrTypedArray(Dt.solidity);
              var Ye = Ie.uid;
              mt && (Ye += "-" + Ee.i), C.pattern(Ne, "point", Ce, Ye, $t, nt, ot, Ee.mcc, Dt.fillmode, St, vt, Je);
            } else u.isArrayOrTypedArray(Be) ? d.fill(Ne, Be[Ee.i]) : d.fill(Ne, Be);
            Ze && d.stroke(Ne, $e);
          }
        }, C.makePointStyleFns = function(Ee) {
          var Ne = {}, Ie = Ee.marker;
          return Ne.markerScale = C.tryColorscale(Ie, ""), Ne.lineScale = C.tryColorscale(Ie, "line"), _.traceIs(Ee, "symbols") && (Ne.ms2mrc = k.isBubble(Ee) ? S(Ee) : function() {
            return (Ie.size || 6) / 2;
          }), Ee.selectedpoints && u.extendFlat(Ne, C.makeSelectedPointStyleFns(Ee)), Ne;
        }, C.makeSelectedPointStyleFns = function(Ee) {
          var Ne = {}, Ie = Ee.selected || {}, ge = Ee.unselected || {}, Ce = Ee.marker || {}, we = Ie.marker || {}, Ge = ge.marker || {}, Re = Ce.opacity, je = we.opacity, Ke = Ge.opacity, tt = je !== void 0, _e = Ke !== void 0;
          (u.isArrayOrTypedArray(Re) || tt || _e) && (Ne.selectedOpacityFn = function($t) {
            var Gt = $t.mo === void 0 ? Ce.opacity : $t.mo;
            return $t.selected ? tt ? je : Gt : _e ? Ke : w * Gt;
          });
          var Be = Ce.color, $e = we.color, Ze = Ge.color;
          ($e || Ze) && (Ne.selectedColorFn = function($t) {
            var Gt = $t.mcc || Be;
            return $t.selected ? $e || Gt : Ze || Gt;
          });
          var ct = Ce.size, ft = we.size, _t = Ge.size, Pt = ft !== void 0, Dt = _t !== void 0;
          return _.traceIs(Ee, "symbols") && (Pt || Dt) && (Ne.selectedSizeFn = function($t) {
            var Gt = $t.mrc || ct / 2;
            return $t.selected ? Pt ? ft / 2 : Gt : Dt ? _t / 2 : Gt;
          }), Ne;
        }, C.makeSelectedTextStyleFns = function(Ee) {
          var Ne = {}, Ie = Ee.selected || {}, ge = Ee.unselected || {}, Ce = Ee.textfont || {}, we = Ie.textfont || {}, Ge = ge.textfont || {}, Re = Ce.color, je = we.color, Ke = Ge.color;
          return Ne.selectedTextColorFn = function(tt) {
            var _e = tt.tc || Re;
            return tt.selected ? je || _e : Ke || (je ? _e : d.addOpacity(_e, w));
          }, Ne;
        }, C.selectedPointStyle = function(Ee, Ne) {
          if (Ee.size() && Ne.selectedpoints) {
            var Ie = C.makeSelectedPointStyleFns(Ne), ge = Ne.marker || {}, Ce = [];
            Ie.selectedOpacityFn && Ce.push(function(we, Ge) {
              we.style("opacity", Ie.selectedOpacityFn(Ge));
            }), Ie.selectedColorFn && Ce.push(function(we, Ge) {
              d.fill(we, Ie.selectedColorFn(Ge));
            }), Ie.selectedSizeFn && Ce.push(function(we, Ge) {
              var Re = Ge.mx || ge.symbol || 0, je = Ie.selectedSizeFn(Ge);
              we.attr("d", M(C.symbolNumber(Re), je, We(Ge, Ne), ae(Ge, Ne))), Ge.mrc2 = je;
            }), Ce.length && Ee.each(function(we) {
              for (var Ge = l.select(this), Re = 0; Re < Ce.length; Re++) Ce[Re](Ge, we);
            });
          }
        }, C.tryColorscale = function(Ee, Ne) {
          var Ie = Ne ? u.nestedProperty(Ee, Ne).get() : Ee;
          if (Ie) {
            var ge = Ie.color;
            if ((Ie.colorscale || Ie._colorAx) && u.isArrayOrTypedArray(ge)) return f.makeColorScaleFuncFromTrace(Ie);
          }
          return u.identity;
        };
        var F, U, V = { start: 1, end: -1, middle: 0, bottom: 1, top: -1 };
        function $(Ee, Ne, Ie, ge, Ce) {
          var we = l.select(Ee.node().parentNode), Ge = Ne.indexOf("top") !== -1 ? "top" : Ne.indexOf("bottom") !== -1 ? "bottom" : "middle", Re = Ne.indexOf("left") !== -1 ? "end" : Ne.indexOf("right") !== -1 ? "start" : "middle", je = ge ? ge / 0.8 + 1 : 0, Ke = (g.lineCount(Ee) - 1) * x + 1, tt = V[Re] * je, _e = 0.75 * Ie + V[Ge] * je + (V[Ge] - 1) * Ke * Ie / 2;
          Ee.attr("text-anchor", Re), Ce || we.attr("transform", c(tt, _e));
        }
        function q(Ee, Ne) {
          var Ie = Ee.ts || Ne.textfont.size;
          return h(Ie) && Ie > 0 ? Ie : 0;
        }
        function K(Ee, Ne, Ie) {
          return Ie && (Ee = Q(Ee)), Ne ? Y(Ee[1]) : re(Ee[0]);
        }
        function re(Ee) {
          var Ne = l.round(Ee, 2);
          return F = Ne, Ne;
        }
        function Y(Ee) {
          var Ne = l.round(Ee, 2);
          return U = Ne, Ne;
        }
        function te(Ee, Ne, Ie, ge) {
          var Ce = Ee[0] - Ne[0], we = Ee[1] - Ne[1], Ge = Ie[0] - Ne[0], Re = Ie[1] - Ne[1], je = Math.pow(Ce * Ce + we * we, 0.25), Ke = Math.pow(Ge * Ge + Re * Re, 0.25), tt = (Ke * Ke * Ce - je * je * Ge) * ge, _e = (Ke * Ke * we - je * je * Re) * ge, Be = 3 * Ke * (je + Ke), $e = 3 * je * (je + Ke);
          return [[re(Ne[0] + (Be && tt / Be)), Y(Ne[1] + (Be && _e / Be))], [re(Ne[0] - ($e && tt / $e)), Y(Ne[1] - ($e && _e / $e))]];
        }
        C.textPointStyle = function(Ee, Ne, Ie) {
          if (Ee.size()) {
            var ge;
            if (Ne.selectedpoints) {
              var Ce = C.makeSelectedTextStyleFns(Ne);
              ge = Ce.selectedTextColorFn;
            }
            var we = Ne.texttemplate, Ge = Ie._fullLayout;
            Ee.each(function(Re) {
              var je = l.select(this), Ke = we ? u.extractOption(Re, Ne, "txt", "texttemplate") : u.extractOption(Re, Ne, "tx", "text");
              if (Ke || Ke === 0) {
                if (we) {
                  var tt = Ne._module.formatLabels, _e = tt ? tt(Re, Ne, Ge) : {}, Be = {};
                  A(Be, Ne, Re.i);
                  var $e = Ne._meta || {};
                  Ke = u.texttemplateString(Ke, _e, Ge._d3locale, Be, Re, $e);
                }
                var Ze = Re.tp || Ne.textposition, ct = q(Re, Ne), ft = ge ? ge(Re) : Re.tc || Ne.textfont.color;
                je.call(C.font, { family: Re.tf || Ne.textfont.family, weight: Re.tw || Ne.textfont.weight, style: Re.ty || Ne.textfont.style, variant: Re.tv || Ne.textfont.variant, textcase: Re.tC || Ne.textfont.textcase, lineposition: Re.tE || Ne.textfont.lineposition, shadow: Re.tS || Ne.textfont.shadow, size: ct, color: ft }).text(Ke).call(g.convertToTspans, Ie).call($, Ze, ct, Re.mrc);
              } else je.remove();
            });
          }
        }, C.selectedTextStyle = function(Ee, Ne) {
          if (Ee.size() && Ne.selectedpoints) {
            var Ie = C.makeSelectedTextStyleFns(Ne);
            Ee.each(function(ge) {
              var Ce = l.select(this), we = Ie.selectedTextColorFn(ge), Ge = ge.tp || Ne.textposition, Re = q(ge, Ne);
              d.fill(Ce, we);
              var je = _.traceIs(Ne, "bar-like");
              $(Ce, Ge, Re, ge.mrc2 || ge.mrc, je);
            });
          }
        }, C.smoothopen = function(Ee, Ne) {
          if (Ee.length < 3) return "M" + Ee.join("L");
          var Ie, ge = "M" + Ee[0], Ce = [];
          for (Ie = 1; Ie < Ee.length - 1; Ie++) Ce.push(te(Ee[Ie - 1], Ee[Ie], Ee[Ie + 1], Ne));
          for (ge += "Q" + Ce[0][0] + " " + Ee[1], Ie = 2; Ie < Ee.length - 1; Ie++) ge += "C" + Ce[Ie - 2][1] + " " + Ce[Ie - 1][0] + " " + Ee[Ie];
          return ge + "Q" + Ce[Ee.length - 3][1] + " " + Ee[Ee.length - 1];
        }, C.smoothclosed = function(Ee, Ne) {
          if (Ee.length < 3) return "M" + Ee.join("L") + "Z";
          var Ie, ge = "M" + Ee[0], Ce = Ee.length - 1, we = [te(Ee[Ce], Ee[0], Ee[1], Ne)];
          for (Ie = 1; Ie < Ce; Ie++) we.push(te(Ee[Ie - 1], Ee[Ie], Ee[Ie + 1], Ne));
          for (we.push(te(Ee[Ce - 1], Ee[Ce], Ee[0], Ne)), Ie = 1; Ie <= Ce; Ie++) ge += "C" + we[Ie - 1][1] + " " + we[Ie][0] + " " + Ee[Ie];
          return ge + "C" + we[Ce][1] + " " + we[0][0] + " " + Ee[0] + "Z";
        };
        var ee = { hv: function(Ee, Ne, Ie) {
          return "H" + re(Ne[0]) + "V" + K(Ne, 1, Ie);
        }, vh: function(Ee, Ne, Ie) {
          return "V" + Y(Ne[1]) + "H" + K(Ne, 0, Ie);
        }, hvh: function(Ee, Ne, Ie) {
          return "H" + re((Ee[0] + Ne[0]) / 2) + "V" + Y(Ne[1]) + "H" + K(Ne, 0, Ie);
        }, vhv: function(Ee, Ne, Ie) {
          return "V" + Y((Ee[1] + Ne[1]) / 2) + "H" + re(Ne[0]) + "V" + K(Ne, 1, Ie);
        } }, X = function(Ee, Ne, Ie) {
          return "L" + K(Ne, 0, Ie) + "," + K(Ne, 1, Ie);
        };
        function Q(Ee, Ne) {
          var Ie = Ee.backoff, ge = Ee.trace, Ce = Ee.d, we = Ee.i;
          if (Ie && ge && ge.marker && ge.marker.angle % 360 == 0 && ge.line && ge.line.shape !== "spline") {
            var Ge = u.isArrayOrTypedArray(Ie), Re = Ee, je = Ne ? Ne[0] : F || 0, Ke = Ne ? Ne[1] : U || 0, tt = Re[0], _e = Re[1], Be = tt - je, $e = _e - Ke, Ze = Math.atan2($e, Be), ct = Ge ? Ie[we] : Ie;
            if (ct === "auto") {
              var ft = Re.i;
              ge.type === "scatter" && ft--;
              var _t = Re.marker, Pt = _t.symbol;
              u.isArrayOrTypedArray(Pt) && (Pt = Pt[ft]);
              var Dt = _t.size;
              u.isArrayOrTypedArray(Dt) && (Dt = Dt[ft]), ct = _t ? C.symbolBackOffs[C.symbolNumber(Pt)] * Dt : 0, ct += C.getMarkerStandoff(Ce[ft], ge) || 0;
            }
            var $t = tt - ct * Math.cos(Ze), Gt = _e - ct * Math.sin(Ze);
            ($t <= tt && $t >= je || $t >= tt && $t <= je) && (Gt <= _e && Gt >= Ke || Gt >= _e && Gt <= Ke) && (Ee = [$t, Gt]);
          }
          return Ee;
        }
        C.steps = function(Ee) {
          var Ne = ee[Ee] || X;
          return function(Ie) {
            for (var ge = "M" + re(Ie[0][0]) + "," + Y(Ie[0][1]), Ce = Ie.length, we = 1; we < Ce; we++) ge += Ne(Ie[we - 1], Ie[we], we === Ce - 1);
            return ge;
          };
        }, C.applyBackoff = Q, C.makeTester = function() {
          var Ee = u.ensureSingleById(l.select("body"), "svg", "js-plotly-tester", function(Ie) {
            Ie.attr(m.svgAttrs).style({ position: "absolute", left: "-10000px", top: "-10000px", width: "9000px", height: "9000px", "z-index": "1" });
          }), Ne = u.ensureSingle(Ee, "path", "js-reference-point", function(Ie) {
            Ie.attr("d", "M0,0H1V1H0Z").style({ "stroke-width": 0, fill: "black" });
          });
          C.tester = Ee, C.testref = Ne;
        }, C.savedBBoxes = {};
        var ue = 0;
        function ce(Ee) {
          var Ne = Ee.getAttribute("data-unformatted");
          if (Ne !== null) return Ne + Ee.getAttribute("data-math") + Ee.getAttribute("text-anchor") + Ee.getAttribute("style");
        }
        function he(Ee, Ne) {
          if (!Ee) return null;
          var Ie = Ne._context, ge = Ie._exportedPlot ? "" : Ie._baseUrl || "";
          return ge ? "url('" + ge + "#" + Ee + "')" : "url(#" + Ee + ")";
        }
        C.bBox = function(Ee, Ne, Ie) {
          var ge, Ce, we;
          if (Ie || (Ie = ce(Ee)), Ie) {
            if (ge = C.savedBBoxes[Ie]) return u.extendFlat({}, ge);
          } else if (Ee.childNodes.length === 1) {
            var Ge = Ee.childNodes[0];
            if (Ie = ce(Ge)) {
              var Re = +Ge.getAttribute("x") || 0, je = +Ge.getAttribute("y") || 0, Ke = Ge.getAttribute("transform");
              if (!Ke) {
                var tt = C.bBox(Ge, !1, Ie);
                return Re && (tt.left += Re, tt.right += Re), je && (tt.top += je, tt.bottom += je), tt;
              }
              if (Ie += "~" + Re + "~" + je + "~" + Ke, ge = C.savedBBoxes[Ie]) return u.extendFlat({}, ge);
            }
          }
          Ne ? Ce = Ee : (we = C.tester.node(), Ce = Ee.cloneNode(!0), we.appendChild(Ce)), l.select(Ce).attr("transform", null).call(g.positionText, 0, 0);
          var _e = Ce.getBoundingClientRect(), Be = C.testref.node().getBoundingClientRect();
          Ne || we.removeChild(Ce);
          var $e = { height: _e.height, width: _e.width, left: _e.left - Be.left, top: _e.top - Be.top, right: _e.right - Be.left, bottom: _e.bottom - Be.top };
          return ue >= 1e4 && (C.savedBBoxes = {}, ue = 0), Ie && (C.savedBBoxes[Ie] = $e), ue++, u.extendFlat({}, $e);
        }, C.setClipUrl = function(Ee, Ne, Ie) {
          Ee.attr("clip-path", he(Ne, Ie));
        }, C.getTranslate = function(Ee) {
          var Ne = (Ee[Ee.attr ? "attr" : "getAttribute"]("transform") || "").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/, function(Ie, ge, Ce) {
            return [ge, Ce].join(" ");
          }).split(" ");
          return { x: +Ne[0] || 0, y: +Ne[1] || 0 };
        }, C.setTranslate = function(Ee, Ne, Ie) {
          var ge = Ee.attr ? "attr" : "getAttribute", Ce = Ee.attr ? "attr" : "setAttribute", we = Ee[ge]("transform") || "";
          return Ne = Ne || 0, Ie = Ie || 0, we = we.replace(/(\btranslate\(.*?\);?)/, "").trim(), we = (we += c(Ne, Ie)).trim(), Ee[Ce]("transform", we), we;
        }, C.getScale = function(Ee) {
          var Ne = (Ee[Ee.attr ? "attr" : "getAttribute"]("transform") || "").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/, function(Ie, ge, Ce) {
            return [ge, Ce].join(" ");
          }).split(" ");
          return { x: +Ne[0] || 1, y: +Ne[1] || 1 };
        }, C.setScale = function(Ee, Ne, Ie) {
          var ge = Ee.attr ? "attr" : "getAttribute", Ce = Ee.attr ? "attr" : "setAttribute", we = Ee[ge]("transform") || "";
          return Ne = Ne || 1, Ie = Ie || 1, we = we.replace(/(\bscale\(.*?\);?)/, "").trim(), we = (we += "scale(" + Ne + "," + Ie + ")").trim(), Ee[Ce]("transform", we), we;
        };
        var de = /\s*sc.*/;
        C.setPointGroupScale = function(Ee, Ne, Ie) {
          if (Ne = Ne || 1, Ie = Ie || 1, Ee) {
            var ge = Ne === 1 && Ie === 1 ? "" : "scale(" + Ne + "," + Ie + ")";
            Ee.each(function() {
              var Ce = (this.getAttribute("transform") || "").replace(de, "");
              Ce = (Ce += ge).trim(), this.setAttribute("transform", Ce);
            });
          }
        };
        var ne = /translate\([^)]*\)\s*$/;
        function ae(Ee, Ne) {
          var Ie;
          return Ee && (Ie = Ee.mf), Ie === void 0 && (Ie = Ne.marker && Ne.marker.standoff || 0), Ne._geo || Ne._xA ? Ie : -Ie;
        }
        C.setTextPointsScale = function(Ee, Ne, Ie) {
          Ee && Ee.each(function() {
            var ge, Ce = l.select(this), we = Ce.select("text");
            if (we.node()) {
              var Ge = parseFloat(we.attr("x") || 0), Re = parseFloat(we.attr("y") || 0), je = (Ce.attr("transform") || "").match(ne);
              ge = Ne === 1 && Ie === 1 ? [] : [c(Ge, Re), "scale(" + Ne + "," + Ie + ")", c(-Ge, -Re)], je && ge.push(je), Ce.attr("transform", ge.join(""));
            }
          });
        }, C.getMarkerStandoff = ae;
        var se, me, ye, pe, be, Ae, Se = Math.atan2, Me = Math.cos, De = Math.sin;
        function Le(Ee, Ne) {
          var Ie = Ne[0], ge = Ne[1];
          return [Ie * Me(Ee) - ge * De(Ee), Ie * De(Ee) + ge * Me(Ee)];
        }
        function We(Ee, Ne) {
          var Ie, ge, Ce = Ee.ma;
          Ce === void 0 && ((Ce = Ne.marker.angle) && !u.isArrayOrTypedArray(Ce) || (Ce = 0));
          var we = Ne.marker.angleref;
          if (we === "previous" || we === "north") {
            if (Ne._geo) {
              var Ge = Ne._geo.project(Ee.lonlat);
              Ie = Ge[0], ge = Ge[1];
            } else {
              var Re = Ne._xA, je = Ne._yA;
              if (!Re || !je) return 90;
              Ie = Re.c2p(Ee.x), ge = je.c2p(Ee.y);
            }
            if (Ne._geo) {
              var Ke, tt = Ee.lonlat[0], _e = Ee.lonlat[1], Be = Ne._geo.project([tt, _e + 1e-5]), $e = Ne._geo.project([tt + 1e-5, _e]), Ze = Se($e[1] - ge, $e[0] - Ie), ct = Se(Be[1] - ge, Be[0] - Ie);
              if (we === "north") Ke = Ce / 180 * Math.PI;
              else if (we === "previous") {
                var ft = tt / 180 * Math.PI, _t = _e / 180 * Math.PI, Pt = se / 180 * Math.PI, Dt = me / 180 * Math.PI, $t = Pt - ft, Gt = Me(Dt) * De($t), Wt = De(Dt) * Me(_t) - Me(Dt) * De(_t) * Me($t);
                Ke = -Se(Gt, Wt) - Math.PI, se = tt, me = _e;
              }
              var mt = Le(Ze, [Me(Ke), 0]), at = Le(ct, [De(Ke), 0]);
              Ce = Se(mt[1] + at[1], mt[0] + at[0]) / Math.PI * 180, we !== "previous" || Ae === Ne.uid && Ee.i === be + 1 || (Ce = null);
            }
            if (we === "previous" && !Ne._geo) if (Ae === Ne.uid && Ee.i === be + 1 && h(Ie) && h(ge)) {
              var vt = Ie - ye, St = ge - pe, Je = Ne.line && Ne.line.shape || "", nt = Je.slice(Je.length - 1);
              nt === "h" && (St = 0), nt === "v" && (vt = 0), Ce += Se(St, vt) / Math.PI * 180 + 90;
            } else Ce = null;
          }
          return ye = Ie, pe = ge, be = Ee.i, Ae = Ne.uid, Ce;
        }
        C.getMarkerAngle = We;
      }, 38882: function(o, s, n) {
        var l, u, i, h, p = n(26953), _ = n(45568).round, d = "M0,0Z", f = Math.sqrt(2), c = Math.sqrt(3), g = Math.PI, m = Math.cos, x = Math.sin;
        function w(S) {
          return S === null;
        }
        function k(S, A, C) {
          if (!(S && S % 360 != 0 || A)) return C;
          if (i === S && h === A && l === C) return u;
          function D(q, K) {
            var re = m(q), Y = x(q), te = K[0], ee = K[1] + (A || 0);
            return [te * re - ee * Y, te * Y + ee * re];
          }
          i = S, h = A, l = C;
          for (var L = S / 180 * g, E = 0, P = 0, I = p(C), M = "", O = 0; O < I.length; O++) {
            var T = I[O], z = T[0], F = E, U = P;
            if (z === "M" || z === "L") E = +T[1], P = +T[2];
            else if (z === "m" || z === "l") E += +T[1], P += +T[2];
            else if (z === "H") E = +T[1];
            else if (z === "h") E += +T[1];
            else if (z === "V") P = +T[1];
            else if (z === "v") P += +T[1];
            else if (z === "A") {
              E = +T[1], P = +T[2];
              var V = D(L, [+T[6], +T[7]]);
              T[6] = V[0], T[7] = V[1], T[3] = +T[3] + S;
            }
            z !== "H" && z !== "V" || (z = "L"), z !== "h" && z !== "v" || (z = "l"), z !== "m" && z !== "l" || (E -= F, P -= U);
            var $ = D(L, [E, P]);
            z !== "H" && z !== "V" || (z = "L"), z !== "M" && z !== "L" && z !== "m" && z !== "l" || (T[1] = $[0], T[2] = $[1]), T[0] = z, M += T[0] + T.slice(1).join(",");
          }
          return u = M, M;
        }
        o.exports = { circle: { n: 0, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2), L = "M" + D + ",0A" + D + "," + D + " 0 1,1 0,-" + D + "A" + D + "," + D + " 0 0,1 " + D + ",0Z";
          return C ? k(A, C, L) : L;
        } }, square: { n: 1, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "H-" + D + "V-" + D + "H" + D + "Z");
        } }, diamond: { n: 2, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.3 * S, 2);
          return k(A, C, "M" + D + ",0L0," + D + "L-" + D + ",0L0,-" + D + "Z");
        } }, cross: { n: 3, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.4 * S, 2), L = _(1.2 * S, 2);
          return k(A, C, "M" + L + "," + D + "H" + D + "V" + L + "H-" + D + "V" + D + "H-" + L + "V-" + D + "H-" + D + "V-" + L + "H" + D + "V-" + D + "H" + L + "Z");
        } }, x: { n: 4, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.8 * S / f, 2), L = "l" + D + "," + D, E = "l" + D + ",-" + D, P = "l-" + D + ",-" + D, I = "l-" + D + "," + D;
          return k(A, C, "M0," + D + L + E + P + E + P + I + P + I + L + I + L + "Z");
        } }, "triangle-up": { n: 5, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S / c, 2);
          return k(A, C, "M-" + D + "," + _(S / 2, 2) + "H" + D + "L0,-" + _(S, 2) + "Z");
        } }, "triangle-down": { n: 6, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S / c, 2);
          return k(A, C, "M-" + D + ",-" + _(S / 2, 2) + "H" + D + "L0," + _(S, 2) + "Z");
        } }, "triangle-left": { n: 7, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S / c, 2);
          return k(A, C, "M" + _(S / 2, 2) + ",-" + D + "V" + D + "L-" + _(S, 2) + ",0Z");
        } }, "triangle-right": { n: 8, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S / c, 2);
          return k(A, C, "M-" + _(S / 2, 2) + ",-" + D + "V" + D + "L" + _(S, 2) + ",0Z");
        } }, "triangle-ne": { n: 9, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.6 * S, 2), L = _(1.2 * S, 2);
          return k(A, C, "M-" + L + ",-" + D + "H" + D + "V" + L + "Z");
        } }, "triangle-se": { n: 10, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.6 * S, 2), L = _(1.2 * S, 2);
          return k(A, C, "M" + D + ",-" + L + "V" + D + "H-" + L + "Z");
        } }, "triangle-sw": { n: 11, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.6 * S, 2), L = _(1.2 * S, 2);
          return k(A, C, "M" + L + "," + D + "H-" + D + "V-" + L + "Z");
        } }, "triangle-nw": { n: 12, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.6 * S, 2), L = _(1.2 * S, 2);
          return k(A, C, "M-" + D + "," + L + "V-" + D + "H" + L + "Z");
        } }, pentagon: { n: 13, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.951 * S, 2), L = _(0.588 * S, 2), E = _(-S, 2), P = _(-0.309 * S, 2);
          return k(A, C, "M" + D + "," + P + "L" + L + "," + _(0.809 * S, 2) + "H-" + L + "L-" + D + "," + P + "L0," + E + "Z");
        } }, hexagon: { n: 14, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2), L = _(S / 2, 2), E = _(S * c / 2, 2);
          return k(A, C, "M" + E + ",-" + L + "V" + L + "L0," + D + "L-" + E + "," + L + "V-" + L + "L0,-" + D + "Z");
        } }, hexagon2: { n: 15, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2), L = _(S / 2, 2), E = _(S * c / 2, 2);
          return k(A, C, "M-" + L + "," + E + "H" + L + "L" + D + ",0L" + L + ",-" + E + "H-" + L + "L-" + D + ",0Z");
        } }, octagon: { n: 16, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.924 * S, 2), L = _(0.383 * S, 2);
          return k(A, C, "M-" + L + ",-" + D + "H" + L + "L" + D + ",-" + L + "V" + L + "L" + L + "," + D + "H-" + L + "L-" + D + "," + L + "V-" + L + "Z");
        } }, star: { n: 17, f: function(S, A, C) {
          if (w(A)) return d;
          var D = 1.4 * S, L = _(0.225 * D, 2), E = _(0.951 * D, 2), P = _(0.363 * D, 2), I = _(0.588 * D, 2), M = _(-D, 2), O = _(-0.309 * D, 2), T = _(0.118 * D, 2), z = _(0.809 * D, 2);
          return k(A, C, "M" + L + "," + O + "H" + E + "L" + P + "," + T + "L" + I + "," + z + "L0," + _(0.382 * D, 2) + "L-" + I + "," + z + "L-" + P + "," + T + "L-" + E + "," + O + "H-" + L + "L0," + M + "Z");
        } }, hexagram: { n: 18, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.66 * S, 2), L = _(0.38 * S, 2), E = _(0.76 * S, 2);
          return k(A, C, "M-" + E + ",0l-" + L + ",-" + D + "h" + E + "l" + L + ",-" + D + "l" + L + "," + D + "h" + E + "l-" + L + "," + D + "l" + L + "," + D + "h-" + E + "l-" + L + "," + D + "l-" + L + ",-" + D + "h-" + E + "Z");
        } }, "star-triangle-up": { n: 19, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S * c * 0.8, 2), L = _(0.8 * S, 2), E = _(1.6 * S, 2), P = _(4 * S, 2), I = "A " + P + "," + P + " 0 0 1 ";
          return k(A, C, "M-" + D + "," + L + I + D + "," + L + I + "0,-" + E + I + "-" + D + "," + L + "Z");
        } }, "star-triangle-down": { n: 20, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S * c * 0.8, 2), L = _(0.8 * S, 2), E = _(1.6 * S, 2), P = _(4 * S, 2), I = "A " + P + "," + P + " 0 0 1 ";
          return k(A, C, "M" + D + ",-" + L + I + "-" + D + ",-" + L + I + "0," + E + I + D + ",-" + L + "Z");
        } }, "star-square": { n: 21, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.1 * S, 2), L = _(2 * S, 2), E = "A " + L + "," + L + " 0 0 1 ";
          return k(A, C, "M-" + D + ",-" + D + E + "-" + D + "," + D + E + D + "," + D + E + D + ",-" + D + E + "-" + D + ",-" + D + "Z");
        } }, "star-diamond": { n: 22, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.4 * S, 2), L = _(1.9 * S, 2), E = "A " + L + "," + L + " 0 0 1 ";
          return k(A, C, "M-" + D + ",0" + E + "0," + D + E + D + ",0" + E + "0,-" + D + E + "-" + D + ",0Z");
        } }, "diamond-tall": { n: 23, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(0.7 * S, 2), L = _(1.4 * S, 2);
          return k(A, C, "M0," + L + "L" + D + ",0L0,-" + L + "L-" + D + ",0Z");
        } }, "diamond-wide": { n: 24, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.4 * S, 2), L = _(0.7 * S, 2);
          return k(A, C, "M0," + L + "L" + D + ",0L0,-" + L + "L-" + D + ",0Z");
        } }, hourglass: { n: 25, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "H-" + D + "L" + D + ",-" + D + "H-" + D + "Z");
        }, noDot: !0 }, bowtie: { n: 26, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "V-" + D + "L-" + D + "," + D + "V-" + D + "Z");
        }, noDot: !0 }, "circle-cross": { n: 27, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M0," + D + "V-" + D + "M" + D + ",0H-" + D + "M" + D + ",0A" + D + "," + D + " 0 1,1 0,-" + D + "A" + D + "," + D + " 0 0,1 " + D + ",0Z");
        }, needLine: !0, noDot: !0 }, "circle-x": { n: 28, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2), L = _(S / f, 2);
          return k(A, C, "M" + L + "," + L + "L-" + L + ",-" + L + "M" + L + ",-" + L + "L-" + L + "," + L + "M" + D + ",0A" + D + "," + D + " 0 1,1 0,-" + D + "A" + D + "," + D + " 0 0,1 " + D + ",0Z");
        }, needLine: !0, noDot: !0 }, "square-cross": { n: 29, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M0," + D + "V-" + D + "M" + D + ",0H-" + D + "M" + D + "," + D + "H-" + D + "V-" + D + "H" + D + "Z");
        }, needLine: !0, noDot: !0 }, "square-x": { n: 30, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "L-" + D + ",-" + D + "M" + D + ",-" + D + "L-" + D + "," + D + "M" + D + "," + D + "H-" + D + "V-" + D + "H" + D + "Z");
        }, needLine: !0, noDot: !0 }, "diamond-cross": { n: 31, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.3 * S, 2);
          return k(A, C, "M" + D + ",0L0," + D + "L-" + D + ",0L0,-" + D + "ZM0,-" + D + "V" + D + "M-" + D + ",0H" + D);
        }, needLine: !0, noDot: !0 }, "diamond-x": { n: 32, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.3 * S, 2), L = _(0.65 * S, 2);
          return k(A, C, "M" + D + ",0L0," + D + "L-" + D + ",0L0,-" + D + "ZM-" + L + ",-" + L + "L" + L + "," + L + "M-" + L + "," + L + "L" + L + ",-" + L);
        }, needLine: !0, noDot: !0 }, "cross-thin": { n: 33, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.4 * S, 2);
          return k(A, C, "M0," + D + "V-" + D + "M" + D + ",0H-" + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, "x-thin": { n: 34, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "L-" + D + ",-" + D + "M" + D + ",-" + D + "L-" + D + "," + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, asterisk: { n: 35, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.2 * S, 2), L = _(0.85 * S, 2);
          return k(A, C, "M0," + D + "V-" + D + "M" + D + ",0H-" + D + "M" + L + "," + L + "L-" + L + ",-" + L + "M" + L + ",-" + L + "L-" + L + "," + L);
        }, needLine: !0, noDot: !0, noFill: !0 }, hash: { n: 36, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S / 2, 2), L = _(S, 2);
          return k(A, C, "M" + D + "," + L + "V-" + L + "M" + (D - L) + ",-" + L + "V" + L + "M" + L + "," + D + "H-" + L + "M-" + L + "," + (D - L) + "H" + L);
        }, needLine: !0, noFill: !0 }, "y-up": { n: 37, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.2 * S, 2), L = _(1.6 * S, 2), E = _(0.8 * S, 2);
          return k(A, C, "M-" + D + "," + E + "L0,0M" + D + "," + E + "L0,0M0,-" + L + "L0,0");
        }, needLine: !0, noDot: !0, noFill: !0 }, "y-down": { n: 38, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.2 * S, 2), L = _(1.6 * S, 2), E = _(0.8 * S, 2);
          return k(A, C, "M-" + D + ",-" + E + "L0,0M" + D + ",-" + E + "L0,0M0," + L + "L0,0");
        }, needLine: !0, noDot: !0, noFill: !0 }, "y-left": { n: 39, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.2 * S, 2), L = _(1.6 * S, 2), E = _(0.8 * S, 2);
          return k(A, C, "M" + E + "," + D + "L0,0M" + E + ",-" + D + "L0,0M-" + L + ",0L0,0");
        }, needLine: !0, noDot: !0, noFill: !0 }, "y-right": { n: 40, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.2 * S, 2), L = _(1.6 * S, 2), E = _(0.8 * S, 2);
          return k(A, C, "M-" + E + "," + D + "L0,0M-" + E + ",-" + D + "L0,0M" + L + ",0L0,0");
        }, needLine: !0, noDot: !0, noFill: !0 }, "line-ew": { n: 41, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.4 * S, 2);
          return k(A, C, "M" + D + ",0H-" + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, "line-ns": { n: 42, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(1.4 * S, 2);
          return k(A, C, "M0," + D + "V-" + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, "line-ne": { n: 43, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + ",-" + D + "L-" + D + "," + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, "line-nw": { n: 44, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M" + D + "," + D + "L-" + D + ",-" + D);
        }, needLine: !0, noDot: !0, noFill: !0 }, "arrow-up": { n: 45, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M0,0L-" + D + "," + _(2 * S, 2) + "H" + D + "Z");
        }, backoff: 1, noDot: !0 }, "arrow-down": { n: 46, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M0,0L-" + D + ",-" + _(2 * S, 2) + "H" + D + "Z");
        }, noDot: !0 }, "arrow-left": { n: 47, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S, 2), L = _(S, 2);
          return k(A, C, "M0,0L" + D + ",-" + L + "V" + L + "Z");
        }, noDot: !0 }, "arrow-right": { n: 48, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S, 2), L = _(S, 2);
          return k(A, C, "M0,0L-" + D + ",-" + L + "V" + L + "Z");
        }, noDot: !0 }, "arrow-bar-up": { n: 49, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M-" + D + ",0H" + D + "M0,0L-" + D + "," + _(2 * S, 2) + "H" + D + "Z");
        }, backoff: 1, needLine: !0, noDot: !0 }, "arrow-bar-down": { n: 50, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(S, 2);
          return k(A, C, "M-" + D + ",0H" + D + "M0,0L-" + D + ",-" + _(2 * S, 2) + "H" + D + "Z");
        }, needLine: !0, noDot: !0 }, "arrow-bar-left": { n: 51, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S, 2), L = _(S, 2);
          return k(A, C, "M0,-" + L + "V" + L + "M0,0L" + D + ",-" + L + "V" + L + "Z");
        }, needLine: !0, noDot: !0 }, "arrow-bar-right": { n: 52, f: function(S, A, C) {
          if (w(A)) return d;
          var D = _(2 * S, 2), L = _(S, 2);
          return k(A, C, "M0,-" + L + "V" + L + "M0,0L-" + D + ",-" + L + "V" + L + "Z");
        }, needLine: !0, noDot: !0 }, arrow: { n: 53, f: function(S, A, C) {
          if (w(A)) return d;
          var D = g / 2.5, L = 2 * S * m(D), E = 2 * S * x(D);
          return k(A, C, "M0,0L" + -L + "," + E + "L" + L + "," + E + "Z");
        }, backoff: 0.9, noDot: !0 }, "arrow-wide": { n: 54, f: function(S, A, C) {
          if (w(A)) return d;
          var D = g / 4, L = 2 * S * m(D), E = 2 * S * x(D);
          return k(A, C, "M0,0L" + -L + "," + E + "A " + 2 * S + "," + 2 * S + " 0 0 1 " + L + "," + E + "Z");
        }, backoff: 0.4, noDot: !0 } };
      }, 75568: function(o) {
        o.exports = { visible: { valType: "boolean", editType: "calc" }, type: { valType: "enumerated", values: ["percent", "constant", "sqrt", "data"], editType: "calc" }, symmetric: { valType: "boolean", editType: "calc" }, array: { valType: "data_array", editType: "calc" }, arrayminus: { valType: "data_array", editType: "calc" }, value: { valType: "number", min: 0, dflt: 10, editType: "calc" }, valueminus: { valType: "number", min: 0, dflt: 10, editType: "calc" }, traceref: { valType: "integer", min: 0, dflt: 0, editType: "style" }, tracerefminus: { valType: "integer", min: 0, dflt: 0, editType: "style" }, copy_ystyle: { valType: "boolean", editType: "plot" }, copy_zstyle: { valType: "boolean", editType: "style" }, color: { valType: "color", editType: "style" }, thickness: { valType: "number", min: 0, dflt: 2, editType: "style" }, width: { valType: "number", min: 0, editType: "plot" }, editType: "calc", _deprecated: { opacity: { valType: "number", editType: "style" } } };
      }, 352: function(o, s, n) {
        var l = n(10721), u = n(33626), i = n(29714), h = n(34809), p = n(25589);
        function _(d, f, c, g) {
          var m = f["error_" + g] || {}, x = [];
          if (m.visible && ["linear", "log"].indexOf(c.type) !== -1) {
            for (var w = p(m), k = 0; k < d.length; k++) {
              var S = d[k], A = S.i;
              if (A === void 0) A = k;
              else if (A === null) continue;
              var C = S[g];
              if (l(c.c2l(C))) {
                var D = w(C, A);
                if (l(D[0]) && l(D[1])) {
                  var L = S[g + "s"] = C - D[0], E = S[g + "h"] = C + D[1];
                  x.push(L, E);
                }
              }
            }
            var P = c._id, I = f._extremes[P], M = i.findExtremes(c, x, h.extendFlat({ tozero: I.opts.tozero }, { padded: !0 }));
            I.min = I.min.concat(M.min), I.max = I.max.concat(M.max);
          }
        }
        o.exports = function(d) {
          for (var f = d.calcdata, c = 0; c < f.length; c++) {
            var g = f[c], m = g[0].trace;
            if (m.visible === !0 && u.traceIs(m, "errorBarsOK")) {
              var x = i.getFromId(d, m.xaxis), w = i.getFromId(d, m.yaxis);
              _(g, m, x, "x"), _(g, m, w, "y");
            }
          }
        };
      }, 25589: function(o) {
        function s(n, l) {
          return n === "percent" ? function(u) {
            return Math.abs(u * l / 100);
          } : n === "constant" ? function() {
            return Math.abs(l);
          } : n === "sqrt" ? function(u) {
            return Math.sqrt(Math.abs(u));
          } : void 0;
        }
        o.exports = function(n) {
          var l = n.type, u = n.symmetric;
          if (l === "data") {
            var i = n.array || [];
            if (u) return function(d, f) {
              var c = +i[f];
              return [c, c];
            };
            var h = n.arrayminus || [];
            return function(d, f) {
              var c = +i[f], g = +h[f];
              return isNaN(c) && isNaN(g) ? [NaN, NaN] : [g || 0, c || 0];
            };
          }
          var p = s(l, n.value), _ = s(l, n.valueminus);
          return u || n.valueminus === void 0 ? function(d) {
            var f = p(d);
            return [f, f];
          } : function(d) {
            return [_(d), p(d)];
          };
        };
      }, 5543: function(o, s, n) {
        var l = n(10721), u = n(33626), i = n(34809), h = n(78032), p = n(75568);
        o.exports = function(_, d, f, c) {
          var g = "error_" + c.axis, m = h.newContainer(d, g), x = _[g] || {};
          function w(C, D) {
            return i.coerce(x, m, p, C, D);
          }
          if (w("visible", x.array !== void 0 || x.value !== void 0 || x.type === "sqrt") !== !1) {
            var k = w("type", "array" in x ? "data" : "percent"), S = !0;
            k !== "sqrt" && (S = w("symmetric", !((k === "data" ? "arrayminus" : "valueminus") in x))), k === "data" ? (w("array"), w("traceref"), S || (w("arrayminus"), w("tracerefminus"))) : k !== "percent" && k !== "constant" || (w("value"), S || w("valueminus"));
            var A = "copy_" + c.inherit + "style";
            c.inherit && (d["error_" + c.inherit] || {}).visible && w(A, !(x.color || l(x.thickness) || l(x.width))), c.inherit && m[A] || (w("color", f), w("thickness"), w("width", u.traceIs(d, "gl3d") ? 0 : 4));
          }
        };
      }, 77901: function(o, s, n) {
        var l = n(34809), u = n(13582).overrideAll, i = n(75568), h = { error_x: l.extendFlat({}, i), error_y: l.extendFlat({}, i) };
        delete h.error_x.copy_zstyle, delete h.error_y.copy_zstyle, delete h.error_y.copy_ystyle;
        var p = { error_x: l.extendFlat({}, i), error_y: l.extendFlat({}, i), error_z: l.extendFlat({}, i) };
        delete p.error_x.copy_ystyle, delete p.error_y.copy_ystyle, delete p.error_z.copy_ystyle, delete p.error_z.copy_zstyle, o.exports = { moduleType: "component", name: "errorbars", schema: { traces: { scatter: h, bar: h, histogram: h, scatter3d: u(p, "calc", "nested"), scattergl: u(h, "calc", "nested") } }, supplyDefaults: n(5543), calc: n(352), makeComputeError: n(25589), plot: n(42130), style: n(22800), hoverInfo: function(_, d, f) {
          (d.error_y || {}).visible && (f.yerr = _.yh - _.y, d.error_y.symmetric || (f.yerrneg = _.y - _.ys)), (d.error_x || {}).visible && (f.xerr = _.xh - _.x, d.error_x.symmetric || (f.xerrneg = _.x - _.xs));
        } };
      }, 42130: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(62203), h = n(64726);
        o.exports = function(p, _, d, f) {
          var c = d.xaxis, g = d.yaxis, m = f && f.duration > 0, x = p._context.staticPlot;
          _.each(function(w) {
            var k, S = w[0].trace, A = S.error_x || {}, C = S.error_y || {};
            S.ids && (k = function(P) {
              return P.id;
            });
            var D = h.hasMarkers(S) && S.marker.maxdisplayed > 0;
            C.visible || A.visible || (w = []);
            var L = l.select(this).selectAll("g.errorbar").data(w, k);
            if (L.exit().remove(), w.length) {
              A.visible || L.selectAll("path.xerror").remove(), C.visible || L.selectAll("path.yerror").remove(), L.style("opacity", 1);
              var E = L.enter().append("g").classed("errorbar", !0);
              m && E.style("opacity", 0).transition().duration(f.duration).style("opacity", 1), i.setClipUrl(L, d.layerClipId, p), L.each(function(P) {
                var I = l.select(this), M = function(V, $, q) {
                  var K = { x: $.c2p(V.x), y: q.c2p(V.y) };
                  return V.yh !== void 0 && (K.yh = q.c2p(V.yh), K.ys = q.c2p(V.ys), u(K.ys) || (K.noYS = !0, K.ys = q.c2p(V.ys, !0))), V.xh !== void 0 && (K.xh = $.c2p(V.xh), K.xs = $.c2p(V.xs), u(K.xs) || (K.noXS = !0, K.xs = $.c2p(V.xs, !0))), K;
                }(P, c, g);
                if (!D || P.vis) {
                  var O, T = I.select("path.yerror");
                  if (C.visible && u(M.x) && u(M.yh) && u(M.ys)) {
                    var z = C.width;
                    O = "M" + (M.x - z) + "," + M.yh + "h" + 2 * z + "m-" + z + ",0V" + M.ys, M.noYS || (O += "m-" + z + ",0h" + 2 * z), T.size() ? m && (T = T.transition().duration(f.duration).ease(f.easing)) : T = I.append("path").style("vector-effect", x ? "none" : "non-scaling-stroke").classed("yerror", !0), T.attr("d", O);
                  } else T.remove();
                  var F = I.select("path.xerror");
                  if (A.visible && u(M.y) && u(M.xh) && u(M.xs)) {
                    var U = (A.copy_ystyle ? C : A).width;
                    O = "M" + M.xh + "," + (M.y - U) + "v" + 2 * U + "m0,-" + U + "H" + M.xs, M.noXS || (O += "m0,-" + U + "v" + 2 * U), F.size() ? m && (F = F.transition().duration(f.duration).ease(f.easing)) : F = I.append("path").style("vector-effect", x ? "none" : "non-scaling-stroke").classed("xerror", !0), F.attr("d", O);
                  } else F.remove();
                }
              });
            }
          });
        };
      }, 22800: function(o, s, n) {
        var l = n(45568), u = n(78766);
        o.exports = function(i) {
          i.each(function(h) {
            var p = h[0].trace, _ = p.error_y || {}, d = p.error_x || {}, f = l.select(this);
            f.selectAll("path.yerror").style("stroke-width", _.thickness + "px").call(u.stroke, _.color), d.copy_ystyle && (d = _), f.selectAll("path.xerror").style("stroke-width", d.thickness + "px").call(u.stroke, d.color);
          });
        };
      }, 70192: function(o, s, n) {
        var l = n(80337), u = n(6811).hoverlabel, i = n(93049).extendFlat;
        o.exports = { hoverlabel: { bgcolor: i({}, u.bgcolor, { arrayOk: !0 }), bordercolor: i({}, u.bordercolor, { arrayOk: !0 }), font: l({ arrayOk: !0, editType: "none" }), align: i({}, u.align, { arrayOk: !0 }), namelength: i({}, u.namelength, { arrayOk: !0 }), editType: "none" } };
      }, 83552: function(o, s, n) {
        var l = n(34809), u = n(33626);
        function i(h, p, _, d) {
          d = d || l.identity, Array.isArray(h) && (p[0][_] = d(h));
        }
        o.exports = function(h) {
          var p = h.calcdata, _ = h._fullLayout;
          function d(x) {
            return function(w) {
              return l.coerceHoverinfo({ hoverinfo: w }, { _module: x._module }, _);
            };
          }
          for (var f = 0; f < p.length; f++) {
            var c = p[f], g = c[0].trace;
            if (!u.traceIs(g, "pie-like")) {
              var m = u.traceIs(g, "2dMap") ? i : l.fillArray;
              m(g.hoverinfo, c, "hi", d(g)), g.hovertemplate && m(g.hovertemplate, c, "ht"), g.hoverlabel && (m(g.hoverlabel.bgcolor, c, "hbg"), m(g.hoverlabel.bordercolor, c, "hbc"), m(g.hoverlabel.font.size, c, "hts"), m(g.hoverlabel.font.color, c, "htc"), m(g.hoverlabel.font.family, c, "htf"), m(g.hoverlabel.font.weight, c, "htw"), m(g.hoverlabel.font.style, c, "hty"), m(g.hoverlabel.font.variant, c, "htv"), m(g.hoverlabel.namelength, c, "hnl"), m(g.hoverlabel.align, c, "hta"));
            }
          }
        };
      }, 94225: function(o, s, n) {
        var l = n(33626), u = n(38103).hover;
        o.exports = function(i, h, p) {
          var _ = l.getComponentMethod("annotations", "onClick")(i, i._hoverdata);
          function d() {
            i.emit("plotly_click", { points: i._hoverdata, event: h });
          }
          p !== void 0 && u(i, h, p, !0), i._hoverdata && h && h.target && (_ && _.then ? _.then(d) : d(), h.stopImmediatePropagation && h.stopImmediatePropagation());
        };
      }, 85988: function(o) {
        o.exports = { YANGLE: 60, HOVERARROWSIZE: 6, HOVERTEXTPAD: 3, HOVERFONTSIZE: 13, HOVERFONT: "Arial, sans-serif", HOVERMINTIME: 50, HOVERID: "-hover" };
      }, 3239: function(o, s, n) {
        var l = n(34809), u = n(70192), i = n(26430);
        o.exports = function(h, p, _, d) {
          var f = l.extendFlat({}, d.hoverlabel);
          p.hovertemplate && (f.namelength = -1), i(h, p, function(c, g) {
            return l.coerce(h, p, u, c, g);
          }, f);
        };
      }, 36040: function(o, s, n) {
        var l = n(34809);
        s.getSubplot = function(d) {
          return d.subplot || d.xaxis + d.yaxis || d.geo;
        }, s.isTraceInSubplots = function(d, f) {
          if (d.type === "splom") {
            for (var c = d.xaxes || [], g = d.yaxes || [], m = 0; m < c.length; m++) for (var x = 0; x < g.length; x++) if (f.indexOf(c[m] + g[x]) !== -1) return !0;
            return !1;
          }
          return f.indexOf(s.getSubplot(d)) !== -1;
        }, s.flat = function(d, f) {
          for (var c = new Array(d.length), g = 0; g < d.length; g++) c[g] = f;
          return c;
        }, s.p2c = function(d, f) {
          for (var c = new Array(d.length), g = 0; g < d.length; g++) c[g] = d[g].p2c(f);
          return c;
        }, s.getDistanceFunction = function(d, f, c, g) {
          return d === "closest" ? g || s.quadrature(f, c) : d.charAt(0) === "x" ? f : c;
        }, s.getClosest = function(d, f, c) {
          if (c.index !== !1) c.index >= 0 && c.index < d.length ? c.distance = 0 : c.index = !1;
          else for (var g = 0; g < d.length; g++) {
            var m = f(d[g]);
            m <= c.distance && (c.index = g, c.distance = m);
          }
          return c;
        }, s.inbox = function(d, f, c) {
          return d * f < 0 || d === 0 ? c : 1 / 0;
        }, s.quadrature = function(d, f) {
          return function(c) {
            var g = d(c), m = f(c);
            return Math.sqrt(g * g + m * m);
          };
        }, s.makeEventData = function(d, f, c) {
          var g = "index" in d ? d.index : d.pointNumber, m = { data: f._input, fullData: f, curveNumber: f.index, pointNumber: g };
          if (f._indexToPoints) {
            var x = f._indexToPoints[g];
            x.length === 1 ? m.pointIndex = x[0] : m.pointIndices = x;
          } else m.pointIndex = g;
          return f._module.eventData ? m = f._module.eventData(m, d, f, c, g) : ("xVal" in d ? m.x = d.xVal : "x" in d && (m.x = d.x), "yVal" in d ? m.y = d.yVal : "y" in d && (m.y = d.y), d.xa && (m.xaxis = d.xa), d.ya && (m.yaxis = d.ya), d.zLabelVal !== void 0 && (m.z = d.zLabelVal)), s.appendArrayPointValue(m, f, g), m;
        }, s.appendArrayPointValue = function(d, f, c) {
          var g = f._arrayAttrs;
          if (g) for (var m = 0; m < g.length; m++) {
            var x = g[m], w = i(x);
            if (d[w] === void 0) {
              var k = h(l.nestedProperty(f, x).get(), c);
              k !== void 0 && (d[w] = k);
            }
          }
        }, s.appendArrayMultiPointValues = function(d, f, c) {
          var g = f._arrayAttrs;
          if (g) for (var m = 0; m < g.length; m++) {
            var x = g[m], w = i(x);
            if (d[w] === void 0) {
              for (var k = l.nestedProperty(f, x).get(), S = new Array(c.length), A = 0; A < c.length; A++) S[A] = h(k, c[A]);
              d[w] = S;
            }
          }
        };
        var u = { ids: "id", locations: "location", labels: "label", values: "value", "marker.colors": "color", parents: "parent" };
        function i(d) {
          return u[d] || d;
        }
        function h(d, f) {
          return Array.isArray(f) ? Array.isArray(d) && Array.isArray(d[f[0]]) ? d[f[0]][f[1]] : void 0 : d[f];
        }
        var p = { x: !0, y: !0 }, _ = { "x unified": !0, "y unified": !0 };
        s.isUnifiedHover = function(d) {
          return typeof d == "string" && !!_[d];
        }, s.isXYhover = function(d) {
          return typeof d == "string" && !!p[d];
        };
      }, 38103: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(65657), h = n(34809), p = h.pushUnique, _ = h.strTranslate, d = h.strRotate, f = n(68596), c = n(30635), g = n(93134), m = n(62203), x = n(78766), w = n(14751), k = n(29714), S = n(54826).zindexSeparator, A = n(33626), C = n(36040), D = n(85988), L = n(73970), E = n(6134), P = D.YANGLE, I = Math.PI * P / 180, M = 1 / Math.sin(I), O = Math.cos(I), T = Math.sin(I), z = D.HOVERARROWSIZE, F = D.HOVERTEXTPAD, U = { box: !0, ohlc: !0, violin: !0, candlestick: !0 }, V = { scatter: !0, scattergl: !0, splom: !0 };
        function $(se, me) {
          return se.distance - me.distance;
        }
        function q(se) {
          return [se.trace.index, se.index, se.x0, se.y0, se.name, se.attr, se.xa ? se.xa._id : "", se.ya ? se.ya._id : ""].join(",");
        }
        s.hover = function(se, me, ye, pe) {
          se = h.getGraphDiv(se);
          var be = me.target;
          h.throttle(se._fullLayout._uid + D.HOVERID, D.HOVERMINTIME, function() {
            (function(Ae, Se, Me, De, Le) {
              Me || (Me = "xy"), typeof Me == "string" && (Me = Me.split(S)[0]);
              var We, Ee, Ne, Ie = Array.isArray(Me) ? Me : [Me], ge = Ae._fullLayout, Ce = ge.hoversubplots, we = ge._plots || [], Ge = we[Me], Re = ge._has("cartesian"), je = Se.hovermode || ge.hovermode, Ke = (je || "").charAt(0) === "x", tt = (je || "").charAt(0) === "y";
              if (Re && (Ke || tt) && Ce === "axis") {
                for (var _e = Ie.length, Be = 0; Be < _e; Be++) if (we[We = Ie[Be]]) {
                  Ee = k.getFromId(Ae, We, "x"), Ne = k.getFromId(Ae, We, "y");
                  var $e = (Ke ? Ee : Ne)._subplotsWith;
                  if ($e && $e.length) for (var Ze = 0; Ze < $e.length; Ze++) p(Ie, $e[Ze]);
                }
              }
              if (Ge && Ce !== "single") {
                var ct = Ge.overlays.map(function(ln) {
                  return ln.id;
                });
                Ie = Ie.concat(ct);
              }
              for (var ft = Ie.length, _t = new Array(ft), Pt = new Array(ft), Dt = !1, $t = 0; $t < ft; $t++) if (we[We = Ie[$t]]) Dt = !0, _t[$t] = we[We].xaxis, Pt[$t] = we[We].yaxis;
              else {
                if (!ge[We] || !ge[We]._subplot) return void h.warn("Unrecognized subplot: " + We);
                var Gt = ge[We]._subplot;
                _t[$t] = Gt.xaxis, Pt[$t] = Gt.yaxis;
              }
              if (je && !Dt && (je = "closest"), ["x", "y", "closest", "x unified", "y unified"].indexOf(je) === -1 || !Ae.calcdata || Ae.querySelector(".zoombox") || Ae._dragging) return w.unhoverRaw(Ae, Se);
              var Wt = ge.hoverdistance;
              Wt === -1 && (Wt = 1 / 0);
              var mt = ge.spikedistance;
              mt === -1 && (mt = 1 / 0);
              var at, vt, St, Je, nt, ot, Ye, Fe, pt, Mt, At, Rt, Ft, lt = [], st = [], Ot = { hLinePoint: null, vLinePoint: null }, kt = !1;
              if (Array.isArray(Se)) for (je = "array", St = 0; St < Se.length; St++) (nt = Ae.calcdata[Se[St].curveNumber || 0]) && (ot = nt[0].trace, nt[0].trace.hoverinfo !== "skip" && (st.push(nt), ot.orientation === "h" && (kt = !0)));
              else {
                var Bt, xt, Jt = Ae.calcdata.slice();
                for (Jt.sort(function(ln, bn) {
                  return (ln[0].trace.zorder || 0) - (bn[0].trace.zorder || 0);
                }), Je = 0; Je < Jt.length; Je++) nt = Jt[Je], (ot = nt[0].trace).hoverinfo !== "skip" && C.isTraceInSubplots(ot, Ie) && (st.push(nt), ot.orientation === "h" && (kt = !0));
                if (Le) {
                  if (f.triggerHandler(Ae, "plotly_beforehover", Se) === !1) return;
                  var qt = Le.getBoundingClientRect();
                  Bt = Se.clientX - qt.left, xt = Se.clientY - qt.top, ge._calcInverseTransform(Ae);
                  var en = h.apply3DTransform(ge._invTransform)(Bt, xt);
                  if (Bt = en[0], xt = en[1], Bt < 0 || Bt > _t[0]._length || xt < 0 || xt > Pt[0]._length) return w.unhoverRaw(Ae, Se);
                } else Bt = "xpx" in Se ? Se.xpx : _t[0]._length / 2, xt = "ypx" in Se ? Se.ypx : Pt[0]._length / 2;
                if (Se.pointerX = Bt + _t[0]._offset, Se.pointerY = xt + Pt[0]._offset, at = "xval" in Se ? C.flat(Ie, Se.xval) : C.p2c(_t, Bt), vt = "yval" in Se ? C.flat(Ie, Se.yval) : C.p2c(Pt, xt), !u(at[0]) || !u(vt[0])) return h.warn("Fx.hover failed", Se, Ae), w.unhoverRaw(Ae, Se);
              }
              var Yt = 1 / 0;
              function Ht(ln, bn) {
                for (Je = 0; Je < st.length; Je++) if ((nt = st[Je]) && nt[0] && nt[0].trace && (ot = nt[0].trace).visible === !0 && ot._length !== 0 && ["carpet", "contourcarpet"].indexOf(ot._module.name) === -1) {
                  if (pt = je, C.isUnifiedHover(pt) && (pt = pt.charAt(0)), ot.type === "splom" ? Ye = Ie[Fe = 0] : (Ye = C.getSubplot(ot), Fe = Ie.indexOf(Ye)), Rt = { cd: nt, trace: ot, xa: _t[Fe], ya: Pt[Fe], maxHoverDistance: Wt, maxSpikeDistance: mt, index: !1, distance: Math.min(Yt, Wt), spikeDistance: 1 / 0, xSpike: void 0, ySpike: void 0, color: x.defaultLine, name: ot.name, x0: void 0, x1: void 0, y0: void 0, y1: void 0, xLabelVal: void 0, yLabelVal: void 0, zLabelVal: void 0, text: void 0 }, ge[Ye] && (Rt.subplot = ge[Ye]._subplot), ge._splomScenes && ge._splomScenes[ot.uid] && (Rt.scene = ge._splomScenes[ot.uid]), pt === "array") {
                    var Nn = Se[Je];
                    "pointNumber" in Nn ? (Rt.index = Nn.pointNumber, pt = "closest") : (pt = "", "xval" in Nn && (Mt = Nn.xval, pt = "x"), "yval" in Nn && (At = Nn.yval, pt = pt ? "closest" : "y"));
                  } else ln !== void 0 && bn !== void 0 ? (Mt = ln, At = bn) : (Mt = at[Fe], At = vt[Fe]);
                  if (Ft = lt.length, Wt !== 0) if (ot._module && ot._module.hoverPoints) {
                    var jn = ot._module.hoverPoints(Rt, Mt, At, pt, { finiteRange: !0, hoverLayer: ge._hoverlayer, hoversubplots: Ce, gd: Ae });
                    if (jn) for (var Jn, Hn = 0; Hn < jn.length; Hn++) Jn = jn[Hn], u(Jn.x0) && u(Jn.y0) && lt.push(X(Jn, je));
                  } else h.log("Unrecognized trace type in hover:", ot);
                  if (je === "closest" && lt.length > Ft && (lt.splice(0, Ft), Yt = lt[0].distance), Re && mt !== 0 && lt.length === 0) {
                    Rt.distance = mt, Rt.index = !1;
                    var Ln = ot._module.hoverPoints(Rt, Mt, At, "closest", { hoverLayer: ge._hoverlayer });
                    if (Ln && (Ln = Ln.filter(function(ir) {
                      return ir.spikeDistance <= mt;
                    })), Ln && Ln.length) {
                      var pn, dn = Ln.filter(function(ir) {
                        return ir.xa.showspikes && ir.xa.spikesnap !== "hovered data";
                      });
                      if (dn.length) {
                        var Dn = dn[0];
                        u(Dn.x0) && u(Dn.y0) && (pn = fn(Dn), (!Ot.vLinePoint || Ot.vLinePoint.spikeDistance > pn.spikeDistance) && (Ot.vLinePoint = pn));
                      }
                      var nr = Ln.filter(function(ir) {
                        return ir.ya.showspikes && ir.ya.spikesnap !== "hovered data";
                      });
                      if (nr.length) {
                        var pr = nr[0];
                        u(pr.x0) && u(pr.y0) && (pn = fn(pr), (!Ot.hLinePoint || Ot.hLinePoint.spikeDistance > pn.spikeDistance) && (Ot.hLinePoint = pn));
                      }
                    }
                  }
                }
              }
              function sn(ln, bn, Nn) {
                for (var jn, Jn = null, Hn = 1 / 0, Ln = 0; Ln < ln.length; Ln++) Ee && Ee._id !== ln[Ln].xa._id || Ne && Ne._id !== ln[Ln].ya._id || (jn = ln[Ln].spikeDistance, Nn && Ln === 0 && (jn = -1 / 0), jn <= Hn && jn <= bn && (Jn = ln[Ln], Hn = jn));
                return Jn;
              }
              function fn(ln) {
                return ln ? { xa: ln.xa, ya: ln.ya, x: ln.xSpike !== void 0 ? ln.xSpike : (ln.x0 + ln.x1) / 2, y: ln.ySpike !== void 0 ? ln.ySpike : (ln.y0 + ln.y1) / 2, distance: ln.distance, spikeDistance: ln.spikeDistance, curveNumber: ln.trace.index, color: ln.color, pointNumber: ln.index } : null;
              }
              Ht();
              var In = { fullLayout: ge, container: ge._hoverlayer, event: Se };
              Ae._spikepoints;
              var zn = { vLinePoint: Ot.vLinePoint, hLinePoint: Ot.hLinePoint };
              Ae._spikepoints = zn;
              var Cn = function() {
                var ln = lt.filter(function(Nn) {
                  return Ee && Ee._id === Nn.xa._id && Ne && Ne._id === Nn.ya._id;
                }), bn = lt.filter(function(Nn) {
                  return !(Ee && Ee._id === Nn.xa._id && Ne && Ne._id === Nn.ya._id);
                });
                ln.sort($), bn.sort($), lt = function(Nn, jn) {
                  for (var Jn = jn.charAt(0), Hn = [], Ln = [], pn = [], dn = 0; dn < Nn.length; dn++) {
                    var Dn = Nn[dn];
                    A.traceIs(Dn.trace, "bar-like") || A.traceIs(Dn.trace, "box-violin") ? pn.push(Dn) : Dn.trace[Jn + "period"] ? Ln.push(Dn) : Hn.push(Dn);
                  }
                  return Hn.concat(Ln).concat(pn);
                }(lt = ln.concat(bn), je);
              };
              Cn();
              var gn = je.charAt(0), Mn = (gn === "x" || gn === "y") && lt[0] && V[lt[0].trace.type];
              if (Re && mt !== 0 && lt.length !== 0) {
                var Xn = sn(lt.filter(function(ln) {
                  return ln.ya.showspikes;
                }), mt, Mn);
                Ot.hLinePoint = fn(Xn);
                var Pn = sn(lt.filter(function(ln) {
                  return ln.xa.showspikes;
                }), mt, Mn);
                Ot.vLinePoint = fn(Pn);
              }
              if (lt.length === 0) {
                var wn = w.unhoverRaw(Ae, Se);
                return !Re || Ot.hLinePoint === null && Ot.vLinePoint === null || Q(Ae, Ot, In), wn;
              }
              if (Re && ue() && Q(Ae, Ot, In), C.isXYhover(pt) && lt[0].length !== 0 && lt[0].trace.type !== "splom") {
                var Rn = lt[0], _n = (lt = U[Rn.trace.type] ? lt.filter(function(ln) {
                  return ln.trace.index === Rn.trace.index;
                }) : [Rn]).length;
                Ht(he("x", Rn, ge), he("y", Rn, ge));
                var En, Kn = [], Wn = {}, hr = 0, Zn = function(ln) {
                  var bn = U[ln.trace.type] ? q(ln) : ln.trace.index;
                  if (Wn[bn]) {
                    var Nn = Wn[bn] - 1, jn = Kn[Nn];
                    Nn > 0 && Math.abs(ln.distance) < Math.abs(jn.distance) && (Kn[Nn] = ln);
                  } else hr++, Wn[bn] = hr, Kn.push(ln);
                };
                for (En = 0; En < _n; En++) Zn(lt[En]);
                for (En = lt.length - 1; En > _n - 1; En--) Zn(lt[En]);
                lt = Kn, Cn();
              }
              var lr = Ae._hoverdata, cr = [], zr = de(Ae), Wr = ne(Ae);
              for (St = 0; St < lt.length; St++) {
                var mr = lt[St], Ir = C.makeEventData(mr, mr.trace, mr.cd);
                if (mr.hovertemplate !== !1) {
                  var yr = !1;
                  mr.cd[mr.index] && mr.cd[mr.index].ht && (yr = mr.cd[mr.index].ht), mr.hovertemplate = yr || mr.trace.hovertemplate || !1;
                }
                if (mr.xa && mr.ya) {
                  var Vr = mr.x0 + mr.xa._offset, rn = mr.x1 + mr.xa._offset, Tn = mr.y0 + mr.ya._offset, sr = mr.y1 + mr.ya._offset, $n = Math.min(Vr, rn), ur = Math.max(Vr, rn), Tr = Math.min(Tn, sr), wr = Math.max(Tn, sr);
                  Ir.bbox = { x0: $n + Wr, x1: ur + Wr, y0: Tr + zr, y1: wr + zr };
                }
                mr.eventData = [Ir], cr.push(Ir);
              }
              Ae._hoverdata = cr;
              var Fr = je === "y" && (st.length > 1 || lt.length > 1) || je === "closest" && kt && lt.length > 1, Xr = x.combine(ge.plot_bgcolor || x.background, ge.paper_bgcolor), un = re(lt, { gd: Ae, hovermode: je, rotateLabels: Fr, bgColor: Xr, container: ge._hoverlayer, outerContainer: ge._paper.node(), commonLabelOpts: ge.hoverlabel, hoverdistance: ge.hoverdistance }), Gn = un.hoverLabels;
              if (C.isUnifiedHover(je) || (function(ln, bn, Nn, jn) {
                var Jn, Hn, Ln, pn, dn, Dn, nr, pr = bn ? "xa" : "ya", ir = bn ? "ya" : "xa", gr = 0, Pr = 1, Cr = ln.size(), Er = new Array(Cr), Sr = 0, Dr = jn.minX, Qn = jn.maxX, ri = jn.minY, Zr = jn.maxY, Br = function(ji) {
                  return ji * Nn._invScaleX;
                }, Yr = function(ji) {
                  return ji * Nn._invScaleY;
                };
                function yi(ji) {
                  var Ao = ji[0], dl = ji[ji.length - 1];
                  if (Hn = Ao.pmin - Ao.pos - Ao.dp + Ao.size, Ln = dl.pos + dl.dp + dl.size - Ao.pmax, Hn > 0.01) {
                    for (dn = ji.length - 1; dn >= 0; dn--) ji[dn].dp += Hn;
                    Jn = !1;
                  }
                  if (!(Ln < 0.01)) {
                    if (Hn < -0.01) {
                      for (dn = ji.length - 1; dn >= 0; dn--) ji[dn].dp -= Ln;
                      Jn = !1;
                    }
                    if (Jn) {
                      var So = 0;
                      for (pn = 0; pn < ji.length; pn++) (Dn = ji[pn]).pos + Dn.dp + Dn.size > Ao.pmax && So++;
                      for (pn = ji.length - 1; pn >= 0 && !(So <= 0); pn--) (Dn = ji[pn]).pos > Ao.pmax - 1 && (Dn.del = !0, So--);
                      for (pn = 0; pn < ji.length && !(So <= 0); pn++) if ((Dn = ji[pn]).pos < Ao.pmin + 1) for (Dn.del = !0, So--, Ln = 2 * Dn.size, dn = ji.length - 1; dn >= 0; dn--) ji[dn].dp -= Ln;
                      for (pn = ji.length - 1; pn >= 0 && !(So <= 0); pn--) (Dn = ji[pn]).pos + Dn.dp + Dn.size > Ao.pmax && (Dn.del = !0, So--);
                    }
                  }
                }
                for (ln.each(function(ji) {
                  var Ao = ji[pr], dl = ji[ir], So = Ao._id.charAt(0) === "x", Pu = Ao.range;
                  Sr === 0 && Pu && Pu[0] > Pu[1] !== So && (Pr = -1);
                  var go = 0, Vi = So ? Nn.width : Nn.height;
                  if (Nn.hovermode === "x" || Nn.hovermode === "y") {
                    var Ml, pl, Zl = te(ji, bn), vs = ji.anchor, Xl = vs === "end" ? -1 : 1;
                    if (vs === "middle") pl = (Ml = ji.crossPos + (So ? Yr(Zl.y - ji.by / 2) : Br(ji.bx / 2 + ji.tx2width / 2))) + (So ? Yr(ji.by) : Br(ji.bx));
                    else if (So) pl = (Ml = ji.crossPos + Yr(z + Zl.y) - Yr(ji.by / 2 - z)) + Yr(ji.by);
                    else {
                      var xs = Br(Xl * z + Zl.x), ja = xs + Br(Xl * ji.bx);
                      Ml = ji.crossPos + Math.min(xs, ja), pl = ji.crossPos + Math.max(xs, ja);
                    }
                    So ? ri !== void 0 && Zr !== void 0 && Math.min(pl, Zr) - Math.max(Ml, ri) > 1 && (dl.side === "left" ? (go = dl._mainLinePosition, Vi = Nn.width) : Vi = dl._mainLinePosition) : Dr !== void 0 && Qn !== void 0 && Math.min(pl, Qn) - Math.max(Ml, Dr) > 1 && (dl.side === "top" ? (go = dl._mainLinePosition, Vi = Nn.height) : Vi = dl._mainLinePosition);
                  }
                  Er[Sr++] = [{ datum: ji, traceIndex: ji.trace.index, dp: 0, pos: ji.pos, posref: ji.posref, size: ji.by * (So ? M : 1) / 2, pmin: go, pmax: Vi }];
                }), Er.sort(function(ji, Ao) {
                  return ji[0].posref - Ao[0].posref || Pr * (Ao[0].traceIndex - ji[0].traceIndex);
                }); !Jn && gr <= Cr; ) {
                  for (gr++, Jn = !0, pn = 0; pn < Er.length - 1; ) {
                    var si = Er[pn], Pa = Er[pn + 1], Ni = si[si.length - 1], To = Pa[0];
                    if ((Hn = Ni.pos + Ni.dp + Ni.size - To.pos - To.dp + To.size) > 0.01) {
                      for (dn = Pa.length - 1; dn >= 0; dn--) Pa[dn].dp += Hn;
                      for (si.push.apply(si, Pa), Er.splice(pn + 1, 1), nr = 0, dn = si.length - 1; dn >= 0; dn--) nr += si[dn].dp;
                      for (Ln = nr / si.length, dn = si.length - 1; dn >= 0; dn--) si[dn].dp -= Ln;
                      Jn = !1;
                    } else pn++;
                  }
                  Er.forEach(yi);
                }
                for (pn = Er.length - 1; pn >= 0; pn--) {
                  var Ba = Er[pn];
                  for (dn = Ba.length - 1; dn >= 0; dn--) {
                    var eo = Ba[dn], Ds = eo.datum;
                    Ds.offset = eo.dp, Ds.del = eo.del;
                  }
                }
              }(Gn, Fr, ge, un.commonLabelBoundingBox), ee(Gn, Fr, ge._invScaleX, ge._invScaleY)), Le && Le.tagName) {
                var on = A.getComponentMethod("annotations", "hasClickToShow")(Ae, cr);
                g(l.select(Le), on ? "pointer" : "");
              }
              Le && !De && function(ln, bn, Nn) {
                if (!Nn || Nn.length !== ln._hoverdata.length) return !0;
                for (var jn = Nn.length - 1; jn >= 0; jn--) {
                  var Jn = Nn[jn], Hn = ln._hoverdata[jn];
                  if (Jn.curveNumber !== Hn.curveNumber || String(Jn.pointNumber) !== String(Hn.pointNumber) || String(Jn.pointNumbers) !== String(Hn.pointNumbers)) return !0;
                }
                return !1;
              }(Ae, 0, lr) && (lr && Ae.emit("plotly_unhover", { event: Se, points: lr }), Ae.emit("plotly_hover", { event: Se, points: Ae._hoverdata, xaxes: _t, yaxes: Pt, xvals: at, yvals: vt }));
            })(se, me, ye, pe, be);
          });
        }, s.loneHover = function(se, me) {
          var ye = !0;
          Array.isArray(se) || (ye = !1, se = [se]);
          var pe = me.gd, be = de(pe), Ae = ne(pe), Se = re(se.map(function(Le) {
            var We = Le._x0 || Le.x0 || Le.x || 0, Ee = Le._x1 || Le.x1 || Le.x || 0, Ne = Le._y0 || Le.y0 || Le.y || 0, Ie = Le._y1 || Le.y1 || Le.y || 0, ge = Le.eventData;
            if (ge) {
              var Ce = Math.min(We, Ee), we = Math.max(We, Ee), Ge = Math.min(Ne, Ie), Re = Math.max(Ne, Ie), je = Le.trace;
              if (A.traceIs(je, "gl3d")) {
                var Ke = pe._fullLayout[je.scene]._scene.container, tt = Ke.offsetLeft, _e = Ke.offsetTop;
                Ce += tt, we += tt, Ge += _e, Re += _e;
              }
              ge.bbox = { x0: Ce + Ae, x1: we + Ae, y0: Ge + be, y1: Re + be }, me.inOut_bbox && me.inOut_bbox.push(ge.bbox);
            } else ge = !1;
            return { color: Le.color || x.defaultLine, x0: Le.x0 || Le.x || 0, x1: Le.x1 || Le.x || 0, y0: Le.y0 || Le.y || 0, y1: Le.y1 || Le.y || 0, xLabel: Le.xLabel, yLabel: Le.yLabel, zLabel: Le.zLabel, text: Le.text, name: Le.name, idealAlign: Le.idealAlign, borderColor: Le.borderColor, fontFamily: Le.fontFamily, fontSize: Le.fontSize, fontColor: Le.fontColor, fontWeight: Le.fontWeight, fontStyle: Le.fontStyle, fontVariant: Le.fontVariant, nameLength: Le.nameLength, textAlign: Le.textAlign, trace: Le.trace || { index: 0, hoverinfo: "" }, xa: { _offset: 0 }, ya: { _offset: 0 }, index: 0, hovertemplate: Le.hovertemplate || !1, hovertemplateLabels: Le.hovertemplateLabels || !1, eventData: ge };
          }), { gd: pe, hovermode: "closest", rotateLabels: !1, bgColor: me.bgColor || x.background, container: l.select(me.container), outerContainer: me.outerContainer || me.container }).hoverLabels, Me = 0, De = 0;
          return Se.sort(function(Le, We) {
            return Le.y0 - We.y0;
          }).each(function(Le, We) {
            var Ee = Le.y0 - Le.by / 2;
            Le.offset = Ee - 5 < Me ? Me - Ee + 5 : 0, Me = Ee + Le.by + Le.offset, We === me.anchorIndex && (De = Le.offset);
          }).each(function(Le) {
            Le.offset -= De;
          }), ee(Se, !1, pe._fullLayout._invScaleX, pe._fullLayout._invScaleY), ye ? Se : Se.node();
        };
        var K = /<extra>([\s\S]*)<\/extra>/;
        function re(se, me) {
          var ye = me.gd, pe = ye._fullLayout, be = me.hovermode, Ae = me.rotateLabels, Se = me.bgColor, Me = me.container, De = me.outerContainer, Le = me.commonLabelOpts || {};
          if (se.length === 0) return [[]];
          var We = me.fontFamily || D.HOVERFONT, Ee = me.fontSize || D.HOVERFONTSIZE, Ne = me.fontWeight || pe.font.weight, Ie = me.fontStyle || pe.font.style, ge = me.fontVariant || pe.font.variant, Ce = me.fontTextcase || pe.font.textcase, we = me.fontLineposition || pe.font.lineposition, Ge = me.fontShadow || pe.font.shadow, Re = se[0], je = Re.xa, Ke = Re.ya, tt = be.charAt(0), _e = tt + "Label", Be = Re[_e];
          if (Be === void 0 && je.type === "multicategory") for (var $e = 0; $e < se.length && (Be = se[$e][_e]) === void 0; $e++) ;
          var Ze = ae(ye, De), ct = Ze.top, ft = Ze.width, _t = Ze.height, Pt = Be !== void 0 && Re.distance <= me.hoverdistance && (be === "x" || be === "y");
          if (Pt) {
            var Dt, $t, Gt = !0;
            for (Dt = 0; Dt < se.length; Dt++) if (Gt && se[Dt].zLabel === void 0 && (Gt = !1), $t = se[Dt].hoverinfo || se[Dt].trace.hoverinfo) {
              var Wt = Array.isArray($t) ? $t : $t.split("+");
              if (Wt.indexOf("all") === -1 && Wt.indexOf(be) === -1) {
                Pt = !1;
                break;
              }
            }
            Gt && (Pt = !1);
          }
          var mt = Me.selectAll("g.axistext").data(Pt ? [0] : []);
          mt.enter().append("g").classed("axistext", !0), mt.exit().remove();
          var at = { minX: 0, maxX: 0, minY: 0, maxY: 0 };
          if (mt.each(function() {
            var Mn = l.select(this), Xn = h.ensureSingle(Mn, "path", "", function(ur) {
              ur.style({ "stroke-width": "1px" });
            }), Pn = h.ensureSingle(Mn, "text", "", function(ur) {
              ur.attr("data-notex", 1);
            }), wn = Le.bgcolor || x.defaultLine, Rn = Le.bordercolor || x.contrast(wn), _n = x.contrast(wn), En = Le.font, Kn = { weight: En.weight || Ne, style: En.style || Ie, variant: En.variant || ge, textcase: En.textcase || Ce, lineposition: En.lineposition || we, shadow: En.shadow || Ge, family: En.family || We, size: En.size || Ee, color: En.color || _n };
            Xn.style({ fill: wn, stroke: Rn }), Pn.text(Be).call(m.font, Kn).call(c.positionText, 0, 0).call(c.convertToTspans, ye), Mn.attr("transform", "");
            var Wn, hr, Zn = ae(ye, Pn.node());
            if (be === "x") {
              var lr = je.side === "top" ? "-" : "";
              Pn.attr("text-anchor", "middle").call(c.positionText, 0, je.side === "top" ? ct - Zn.bottom - z - F : ct - Zn.top + z + F), Wn = je._offset + (Re.x0 + Re.x1) / 2, hr = Ke._offset + (je.side === "top" ? 0 : Ke._length);
              var cr = Zn.width / 2 + F, zr = Wn;
              Wn < cr ? zr = cr : Wn > pe.width - cr && (zr = pe.width - cr), Xn.attr("d", "M" + (Wn - zr) + ",0L" + (Wn - zr + z) + "," + lr + z + "H" + cr + "v" + lr + (2 * F + Zn.height) + "H" + -cr + "V" + lr + z + "H" + (Wn - zr - z) + "Z"), Wn = zr, at.minX = Wn - cr, at.maxX = Wn + cr, je.side === "top" ? (at.minY = hr - (2 * F + Zn.height), at.maxY = hr - F) : (at.minY = hr + F, at.maxY = hr + (2 * F + Zn.height));
            } else {
              var Wr, mr, Ir;
              Ke.side === "right" ? (Wr = "start", mr = 1, Ir = "", Wn = je._offset + je._length) : (Wr = "end", mr = -1, Ir = "-", Wn = je._offset), hr = Ke._offset + (Re.y0 + Re.y1) / 2, Pn.attr("text-anchor", Wr), Xn.attr("d", "M0,0L" + Ir + z + "," + z + "V" + (F + Zn.height / 2) + "h" + Ir + (2 * F + Zn.width) + "V-" + (F + Zn.height / 2) + "H" + Ir + z + "V-" + z + "Z"), at.minY = hr - (F + Zn.height / 2), at.maxY = hr + (F + Zn.height / 2), Ke.side === "right" ? (at.minX = Wn + z, at.maxX = Wn + z + (2 * F + Zn.width)) : (at.minX = Wn - z - (2 * F + Zn.width), at.maxX = Wn - z);
              var yr, Vr = Zn.height / 2, rn = ct - Zn.top - Vr, Tn = "clip" + pe._uid + "commonlabel" + Ke._id;
              if (Wn < Zn.width + 2 * F + z) {
                yr = "M-" + (z + F) + "-" + Vr + "h-" + (Zn.width - F) + "V" + Vr + "h" + (Zn.width - F) + "Z";
                var sr = Zn.width - Wn + F;
                c.positionText(Pn, sr, rn), Wr === "end" && Pn.selectAll("tspan").each(function() {
                  var ur = l.select(this), Tr = m.tester.append("text").text(ur.text()).call(m.font, Kn), wr = ae(ye, Tr.node());
                  Math.round(wr.width) < Math.round(Zn.width) && ur.attr("x", sr - wr.width), Tr.remove();
                });
              } else c.positionText(Pn, mr * (F + z), rn), yr = null;
              var $n = pe._topclips.selectAll("#" + Tn).data(yr ? [0] : []);
              $n.enter().append("clipPath").attr("id", Tn).append("path"), $n.exit().remove(), $n.select("path").attr("d", yr), m.setClipUrl(Pn, yr ? Tn : null, ye);
            }
            Mn.attr("transform", _(Wn, hr));
          }), C.isUnifiedHover(be)) {
            Me.selectAll("g.hovertext").remove();
            var vt = se.filter(function(Mn) {
              return Mn.hoverinfo !== "none";
            });
            if (vt.length === 0) return [];
            var St = pe.hoverlabel, Je = St.font, nt = { showlegend: !0, legend: { title: { text: Be, font: Je }, font: Je, bgcolor: St.bgcolor, bordercolor: St.bordercolor, borderwidth: 1, tracegroupgap: 7, traceorder: pe.legend ? pe.legend.traceorder : void 0, orientation: "v" } }, ot = { font: Je };
            L(nt, ot, ye._fullData);
            var Ye = ot.legend;
            Ye.entries = [];
            for (var Fe = 0; Fe < vt.length; Fe++) {
              var pt = vt[Fe];
              if (pt.hoverinfo !== "none") {
                var Mt = Y(pt, !0, be, pe, Be), At = Mt[0], Rt = Mt[1];
                pt.name = Rt, pt.text = Rt !== "" ? Rt + " : " + At : At;
                var Ft = pt.cd[pt.index];
                Ft && (Ft.mc && (pt.mc = Ft.mc), Ft.mcc && (pt.mc = Ft.mcc), Ft.mlc && (pt.mlc = Ft.mlc), Ft.mlcc && (pt.mlc = Ft.mlcc), Ft.mlw && (pt.mlw = Ft.mlw), Ft.mrc && (pt.mrc = Ft.mrc), Ft.dir && (pt.dir = Ft.dir)), pt._distinct = !0, Ye.entries.push([pt]);
              }
            }
            Ye.entries.sort(function(Mn, Xn) {
              return Mn[0].trace.index - Xn[0].trace.index;
            }), Ye.layer = Me, Ye._inHover = !0, Ye._groupTitleFont = St.grouptitlefont, E(ye, Ye);
            var lt, st, Ot, kt, Bt = Me.select("g.legend"), xt = ae(ye, Bt.node()), Jt = xt.width + 2 * F, qt = xt.height + 2 * F, en = vt[0], Yt = (en.x0 + en.x1) / 2, Ht = (en.y0 + en.y1) / 2, sn = !(A.traceIs(en.trace, "bar-like") || A.traceIs(en.trace, "box-violin"));
            tt === "y" ? sn ? (st = Ht - F, lt = Ht + F) : (st = Math.min.apply(null, vt.map(function(Mn) {
              return Math.min(Mn.y0, Mn.y1);
            })), lt = Math.max.apply(null, vt.map(function(Mn) {
              return Math.max(Mn.y0, Mn.y1);
            }))) : st = lt = h.mean(vt.map(function(Mn) {
              return (Mn.y0 + Mn.y1) / 2;
            })) - qt / 2, tt === "x" ? sn ? (Ot = Yt + F, kt = Yt - F) : (Ot = Math.max.apply(null, vt.map(function(Mn) {
              return Math.max(Mn.x0, Mn.x1);
            })), kt = Math.min.apply(null, vt.map(function(Mn) {
              return Math.min(Mn.x0, Mn.x1);
            }))) : Ot = kt = h.mean(vt.map(function(Mn) {
              return (Mn.x0 + Mn.x1) / 2;
            })) - Jt / 2;
            var fn, In, zn = je._offset, Cn = Ke._offset;
            return kt += zn - Jt, st += Cn - qt, fn = (Ot += zn) + Jt < ft && Ot >= 0 ? Ot : kt + Jt < ft && kt >= 0 ? kt : zn + Jt < ft ? zn : Ot - Yt < Yt - kt + Jt ? ft - Jt : 0, fn += F, In = (lt += Cn) + qt < _t && lt >= 0 ? lt : st + qt < _t && st >= 0 ? st : Cn + qt < _t ? Cn : lt - Ht < Ht - st + qt ? _t - qt : 0, In += F, Bt.attr("transform", _(fn - 1, In - 1)), Bt;
          }
          var gn = Me.selectAll("g.hovertext").data(se, function(Mn) {
            return q(Mn);
          });
          return gn.enter().append("g").classed("hovertext", !0).each(function() {
            var Mn = l.select(this);
            Mn.append("rect").call(x.fill, x.addOpacity(Se, 0.8)), Mn.append("text").classed("name", !0), Mn.append("path").style("stroke-width", "1px"), Mn.append("text").classed("nums", !0).call(m.font, { weight: Ne, style: Ie, variant: ge, textcase: Ce, lineposition: we, shadow: Ge, family: We, size: Ee });
          }), gn.exit().remove(), gn.each(function(Mn) {
            var Xn = l.select(this).attr("transform", ""), Pn = Mn.color;
            Array.isArray(Pn) && (Pn = Pn[Mn.eventData[0].pointNumber]);
            var wn = Mn.bgcolor || Pn, Rn = x.combine(x.opacity(wn) ? wn : x.defaultLine, Se), _n = x.combine(x.opacity(Pn) ? Pn : x.defaultLine, Se), En = Mn.borderColor || x.contrast(Rn), Kn = Y(Mn, Pt, be, pe, Be, Xn), Wn = Kn[0], hr = Kn[1], Zn = Xn.select("text.nums").call(m.font, { family: Mn.fontFamily || We, size: Mn.fontSize || Ee, color: Mn.fontColor || En, weight: Mn.fontWeight || Ne, style: Mn.fontStyle || Ie, variant: Mn.fontVariant || ge, textcase: Mn.fontTextcase || Ce, lineposition: Mn.fontLineposition || we, shadow: Mn.fontShadow || Ge }).text(Wn).attr("data-notex", 1).call(c.positionText, 0, 0).call(c.convertToTspans, ye), lr = Xn.select("text.name"), cr = 0, zr = 0;
            if (hr && hr !== Wn) {
              lr.call(m.font, { family: Mn.fontFamily || We, size: Mn.fontSize || Ee, color: _n, weight: Mn.fontWeight || Ne, style: Mn.fontStyle || Ie, variant: Mn.fontVariant || ge, textcase: Mn.fontTextcase || Ce, lineposition: Mn.fontLineposition || we, shadow: Mn.fontShadow || Ge }).text(hr).attr("data-notex", 1).call(c.positionText, 0, 0).call(c.convertToTspans, ye);
              var Wr = ae(ye, lr.node());
              cr = Wr.width + 2 * F, zr = Wr.height + 2 * F;
            } else lr.remove(), Xn.select("rect").remove();
            Xn.select("path").style({ fill: Rn, stroke: En });
            var mr = Mn.xa._offset + (Mn.x0 + Mn.x1) / 2, Ir = Mn.ya._offset + (Mn.y0 + Mn.y1) / 2, yr = Math.abs(Mn.x1 - Mn.x0), Vr = Math.abs(Mn.y1 - Mn.y0), rn = ae(ye, Zn.node()), Tn = rn.width / pe._invScaleX, sr = rn.height / pe._invScaleY;
            Mn.ty0 = (ct - rn.top) / pe._invScaleY, Mn.bx = Tn + 2 * F, Mn.by = Math.max(sr + 2 * F, zr), Mn.anchor = "start", Mn.txwidth = Tn, Mn.tx2width = cr, Mn.offset = 0;
            var $n, ur, Tr = (Tn + z + F + cr) * pe._invScaleX;
            if (Ae) Mn.pos = mr, $n = Ir + Vr / 2 + Tr <= _t, ur = Ir - Vr / 2 - Tr >= 0, Mn.idealAlign !== "top" && $n || !ur ? $n ? (Ir += Vr / 2, Mn.anchor = "start") : Mn.anchor = "middle" : (Ir -= Vr / 2, Mn.anchor = "end"), Mn.crossPos = Ir;
            else {
              if (Mn.pos = Ir, $n = mr + yr / 2 + Tr <= ft, ur = mr - yr / 2 - Tr >= 0, Mn.idealAlign !== "left" && $n || !ur) if ($n) mr += yr / 2, Mn.anchor = "start";
              else {
                Mn.anchor = "middle";
                var wr = Tr / 2, Fr = mr + wr - ft, Xr = mr - wr;
                Fr > 0 && (mr -= Fr), Xr < 0 && (mr += -Xr);
              }
              else mr -= yr / 2, Mn.anchor = "end";
              Mn.crossPos = mr;
            }
            Zn.attr("text-anchor", Mn.anchor), cr && lr.attr("text-anchor", Mn.anchor), Xn.attr("transform", _(mr, Ir) + (Ae ? d(P) : ""));
          }), { hoverLabels: gn, commonLabelBoundingBox: at };
        }
        function Y(se, me, ye, pe, be, Ae) {
          var Se = "", Me = "";
          se.nameOverride !== void 0 && (se.name = se.nameOverride), se.name && (se.trace._meta && (se.name = h.templateString(se.name, se.trace._meta)), Se = ce(se.name, se.nameLength));
          var De = ye.charAt(0), Le = De === "x" ? "y" : "x";
          se.zLabel !== void 0 ? (se.xLabel !== void 0 && (Me += "x: " + se.xLabel + "<br>"), se.yLabel !== void 0 && (Me += "y: " + se.yLabel + "<br>"), se.trace.type !== "choropleth" && se.trace.type !== "choroplethmapbox" && se.trace.type !== "choroplethmap" && (Me += (Me ? "z: " : "") + se.zLabel)) : me && se[De + "Label"] === be ? Me = se[Le + "Label"] || "" : se.xLabel === void 0 ? se.yLabel !== void 0 && se.trace.type !== "scattercarpet" && (Me = se.yLabel) : Me = se.yLabel === void 0 ? se.xLabel : "(" + se.xLabel + ", " + se.yLabel + ")", !se.text && se.text !== 0 || Array.isArray(se.text) || (Me += (Me ? "<br>" : "") + se.text), se.extraText !== void 0 && (Me += (Me ? "<br>" : "") + se.extraText), Ae && Me === "" && !se.hovertemplate && (Se === "" && Ae.remove(), Me = Se);
          var We = se.hovertemplate || !1;
          if (We) {
            var Ee = se.hovertemplateLabels || se;
            se[De + "Label"] !== be && (Ee[De + "other"] = Ee[De + "Val"], Ee[De + "otherLabel"] = Ee[De + "Label"]), Me = (Me = h.hovertemplateString(We, Ee, pe._d3locale, se.eventData[0] || {}, se.trace._meta)).replace(K, function(Ne, Ie) {
              return Se = ce(Ie, se.nameLength), "";
            });
          }
          return [Me, Se];
        }
        function te(se, me) {
          var ye = 0, pe = se.offset;
          return me && (pe *= -T, ye = se.offset * O), { x: ye, y: pe };
        }
        function ee(se, me, ye, pe) {
          var be = function(Se) {
            return Se * ye;
          }, Ae = function(Se) {
            return Se * pe;
          };
          se.each(function(Se) {
            var Me = l.select(this);
            if (Se.del) return Me.remove();
            var De, Le, We, Ee, Ne = Me.select("text.nums"), Ie = Se.anchor, ge = Ie === "end" ? -1 : 1, Ce = (Ee = (We = (Le = { start: 1, end: -1, middle: 0 }[(De = Se).anchor]) * (z + F)) + Le * (De.txwidth + F), De.anchor === "middle" && (We -= De.tx2width / 2, Ee += De.txwidth / 2 + F), { alignShift: Le, textShiftX: We, text2ShiftX: Ee }), we = te(Se, me), Ge = we.x, Re = we.y, je = Ie === "middle";
            Me.select("path").attr("d", je ? "M-" + be(Se.bx / 2 + Se.tx2width / 2) + "," + Ae(Re - Se.by / 2) + "h" + be(Se.bx) + "v" + Ae(Se.by) + "h-" + be(Se.bx) + "Z" : "M0,0L" + be(ge * z + Ge) + "," + Ae(z + Re) + "v" + Ae(Se.by / 2 - z) + "h" + be(ge * Se.bx) + "v-" + Ae(Se.by) + "H" + be(ge * z + Ge) + "V" + Ae(Re - z) + "Z");
            var Ke = Ge + Ce.textShiftX, tt = Re + Se.ty0 - Se.by / 2 + F, _e = Se.textAlign || "auto";
            _e !== "auto" && (_e === "left" && Ie !== "start" ? (Ne.attr("text-anchor", "start"), Ke = je ? -Se.bx / 2 - Se.tx2width / 2 + F : -Se.bx - F) : _e === "right" && Ie !== "end" && (Ne.attr("text-anchor", "end"), Ke = je ? Se.bx / 2 - Se.tx2width / 2 - F : Se.bx + F)), Ne.call(c.positionText, be(Ke), Ae(tt)), Se.tx2width && (Me.select("text.name").call(c.positionText, be(Ce.text2ShiftX + Ce.alignShift * F + Ge), Ae(Re + Se.ty0 - Se.by / 2 + F)), Me.select("rect").call(m.setRect, be(Ce.text2ShiftX + (Ce.alignShift - 1) * Se.tx2width / 2 + Ge), Ae(Re - Se.by / 2 - 1), be(Se.tx2width), Ae(Se.by + 2)));
          });
        }
        function X(se, me) {
          var ye = se.index, pe = se.trace || {}, be = se.cd[0], Ae = se.cd[ye] || {};
          function Se(Ne) {
            return Ne || u(Ne) && Ne === 0;
          }
          var Me = Array.isArray(ye) ? function(Ne, Ie) {
            var ge = h.castOption(be, ye, Ne);
            return Se(ge) ? ge : h.extractOption({}, pe, "", Ie);
          } : function(Ne, Ie) {
            return h.extractOption(Ae, pe, Ne, Ie);
          };
          function De(Ne, Ie, ge) {
            var Ce = Me(Ie, ge);
            Se(Ce) && (se[Ne] = Ce);
          }
          if (De("hoverinfo", "hi", "hoverinfo"), De("bgcolor", "hbg", "hoverlabel.bgcolor"), De("borderColor", "hbc", "hoverlabel.bordercolor"), De("fontFamily", "htf", "hoverlabel.font.family"), De("fontSize", "hts", "hoverlabel.font.size"), De("fontColor", "htc", "hoverlabel.font.color"), De("fontWeight", "htw", "hoverlabel.font.weight"), De("fontStyle", "hty", "hoverlabel.font.style"), De("fontVariant", "htv", "hoverlabel.font.variant"), De("nameLength", "hnl", "hoverlabel.namelength"), De("textAlign", "hta", "hoverlabel.align"), se.posref = me === "y" || me === "closest" && pe.orientation === "h" ? se.xa._offset + (se.x0 + se.x1) / 2 : se.ya._offset + (se.y0 + se.y1) / 2, se.x0 = h.constrain(se.x0, 0, se.xa._length), se.x1 = h.constrain(se.x1, 0, se.xa._length), se.y0 = h.constrain(se.y0, 0, se.ya._length), se.y1 = h.constrain(se.y1, 0, se.ya._length), se.xLabelVal !== void 0 && (se.xLabel = "xLabel" in se ? se.xLabel : k.hoverLabelText(se.xa, se.xLabelVal, pe.xhoverformat), se.xVal = se.xa.c2d(se.xLabelVal)), se.yLabelVal !== void 0 && (se.yLabel = "yLabel" in se ? se.yLabel : k.hoverLabelText(se.ya, se.yLabelVal, pe.yhoverformat), se.yVal = se.ya.c2d(se.yLabelVal)), se.zLabelVal !== void 0 && se.zLabel === void 0 && (se.zLabel = String(se.zLabelVal)), !(isNaN(se.xerr) || se.xa.type === "log" && se.xerr <= 0)) {
            var Le = k.tickText(se.xa, se.xa.c2l(se.xerr), "hover").text;
            se.xerrneg !== void 0 ? se.xLabel += " +" + Le + " / -" + k.tickText(se.xa, se.xa.c2l(se.xerrneg), "hover").text : se.xLabel += " ± " + Le, me === "x" && (se.distance += 1);
          }
          if (!(isNaN(se.yerr) || se.ya.type === "log" && se.yerr <= 0)) {
            var We = k.tickText(se.ya, se.ya.c2l(se.yerr), "hover").text;
            se.yerrneg !== void 0 ? se.yLabel += " +" + We + " / -" + k.tickText(se.ya, se.ya.c2l(se.yerrneg), "hover").text : se.yLabel += " ± " + We, me === "y" && (se.distance += 1);
          }
          var Ee = se.hoverinfo || se.trace.hoverinfo;
          return Ee && Ee !== "all" && ((Ee = Array.isArray(Ee) ? Ee : Ee.split("+")).indexOf("x") === -1 && (se.xLabel = void 0), Ee.indexOf("y") === -1 && (se.yLabel = void 0), Ee.indexOf("z") === -1 && (se.zLabel = void 0), Ee.indexOf("text") === -1 && (se.text = void 0), Ee.indexOf("name") === -1 && (se.name = void 0)), se;
        }
        function Q(se, me, ye) {
          var pe, be, Ae = ye.container, Se = ye.fullLayout, Me = Se._size, De = ye.event, Le = !!me.hLinePoint, We = !!me.vLinePoint;
          if (Ae.selectAll(".spikeline").remove(), We || Le) {
            var Ee = x.combine(Se.plot_bgcolor, Se.paper_bgcolor);
            if (Le) {
              var Ne, Ie, ge = me.hLinePoint;
              pe = ge && ge.xa, (be = ge && ge.ya).spikesnap === "cursor" ? (Ne = De.pointerX, Ie = De.pointerY) : (Ne = pe._offset + ge.x, Ie = be._offset + ge.y);
              var Ce, we, Ge = i.readability(ge.color, Ee) < 1.5 ? x.contrast(Ee) : ge.color, Re = be.spikemode, je = be.spikethickness, Ke = be.spikecolor || Ge, tt = k.getPxPosition(se, be);
              if (Re.indexOf("toaxis") !== -1 || Re.indexOf("across") !== -1) {
                if (Re.indexOf("toaxis") !== -1 && (Ce = tt, we = Ne), Re.indexOf("across") !== -1) {
                  var _e = be._counterDomainMin, Be = be._counterDomainMax;
                  be.anchor === "free" && (_e = Math.min(_e, be.position), Be = Math.max(Be, be.position)), Ce = Me.l + _e * Me.w, we = Me.l + Be * Me.w;
                }
                Ae.insert("line", ":first-child").attr({ x1: Ce, x2: we, y1: Ie, y2: Ie, "stroke-width": je, stroke: Ke, "stroke-dasharray": m.dashStyle(be.spikedash, je) }).classed("spikeline", !0).classed("crisp", !0), Ae.insert("line", ":first-child").attr({ x1: Ce, x2: we, y1: Ie, y2: Ie, "stroke-width": je + 2, stroke: Ee }).classed("spikeline", !0).classed("crisp", !0);
              }
              Re.indexOf("marker") !== -1 && Ae.insert("circle", ":first-child").attr({ cx: tt + (be.side !== "right" ? je : -je), cy: Ie, r: je, fill: Ke }).classed("spikeline", !0);
            }
            if (We) {
              var $e, Ze, ct = me.vLinePoint;
              pe = ct && ct.xa, be = ct && ct.ya, pe.spikesnap === "cursor" ? ($e = De.pointerX, Ze = De.pointerY) : ($e = pe._offset + ct.x, Ze = be._offset + ct.y);
              var ft, _t, Pt = i.readability(ct.color, Ee) < 1.5 ? x.contrast(Ee) : ct.color, Dt = pe.spikemode, $t = pe.spikethickness, Gt = pe.spikecolor || Pt, Wt = k.getPxPosition(se, pe);
              if (Dt.indexOf("toaxis") !== -1 || Dt.indexOf("across") !== -1) {
                if (Dt.indexOf("toaxis") !== -1 && (ft = Wt, _t = Ze), Dt.indexOf("across") !== -1) {
                  var mt = pe._counterDomainMin, at = pe._counterDomainMax;
                  pe.anchor === "free" && (mt = Math.min(mt, pe.position), at = Math.max(at, pe.position)), ft = Me.t + (1 - at) * Me.h, _t = Me.t + (1 - mt) * Me.h;
                }
                Ae.insert("line", ":first-child").attr({ x1: $e, x2: $e, y1: ft, y2: _t, "stroke-width": $t, stroke: Gt, "stroke-dasharray": m.dashStyle(pe.spikedash, $t) }).classed("spikeline", !0).classed("crisp", !0), Ae.insert("line", ":first-child").attr({ x1: $e, x2: $e, y1: ft, y2: _t, "stroke-width": $t + 2, stroke: Ee }).classed("spikeline", !0).classed("crisp", !0);
              }
              Dt.indexOf("marker") !== -1 && Ae.insert("circle", ":first-child").attr({ cx: $e, cy: Wt - (pe.side !== "top" ? $t : -$t), r: $t, fill: Gt }).classed("spikeline", !0);
            }
          }
        }
        function ue(se, me) {
          return !me;
        }
        function ce(se, me) {
          return c.plainText(se || "", { len: me, allowedTags: ["br", "sub", "sup", "b", "i", "em", "s", "u"] });
        }
        function he(se, me, ye) {
          var pe = me[se + "a"], be = me[se + "Val"], Ae = me.cd[0];
          if (pe.type === "category" || pe.type === "multicategory") be = pe._categoriesMap[be];
          else if (pe.type === "date") {
            var Se = me.trace[se + "periodalignment"];
            if (Se) {
              var Me = me.cd[me.index], De = Me[se + "Start"];
              De === void 0 && (De = Me[se]);
              var Le = Me[se + "End"];
              Le === void 0 && (Le = Me[se]);
              var We = Le - De;
              Se === "end" ? be += We : Se === "middle" && (be += We / 2);
            }
            be = pe.d2c(be);
          }
          return Ae && Ae.t && Ae.t.posLetter === pe._id && (ye.boxmode !== "group" && ye.violinmode !== "group" || (be += Ae.t.dPos)), be;
        }
        function de(se) {
          return se.offsetTop + se.clientTop;
        }
        function ne(se) {
          return se.offsetLeft + se.clientLeft;
        }
        function ae(se, me) {
          var ye = se._fullLayout, pe = me.getBoundingClientRect(), be = pe.left, Ae = pe.top, Se = be + pe.width, Me = Ae + pe.height, De = h.apply3DTransform(ye._invTransform)(be, Ae), Le = h.apply3DTransform(ye._invTransform)(Se, Me), We = De[0], Ee = De[1], Ne = Le[0], Ie = Le[1];
          return { x: We, y: Ee, width: Ne - We, height: Ie - Ee, top: Math.min(Ee, Ie), left: Math.min(We, Ne), right: Math.max(We, Ne), bottom: Math.max(Ee, Ie) };
        }
      }, 26430: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(36040).isUnifiedHover;
        o.exports = function(h, p, _, d) {
          d = d || {};
          var f = p.legend;
          function c(g) {
            d.font[g] || (d.font[g] = f ? p.legend.font[g] : p.font[g]);
          }
          p && i(p.hovermode) && (d.font || (d.font = {}), c("size"), c("family"), c("color"), c("weight"), c("style"), c("variant"), f ? (d.bgcolor || (d.bgcolor = u.combine(p.legend.bgcolor, p.paper_bgcolor)), d.bordercolor || (d.bordercolor = p.legend.bordercolor)) : d.bgcolor || (d.bgcolor = p.paper_bgcolor)), _("hoverlabel.bgcolor", d.bgcolor), _("hoverlabel.bordercolor", d.bordercolor), _("hoverlabel.namelength", d.namelength), l.coerceFont(_, "hoverlabel.font", d.font), _("hoverlabel.align", d.align);
        };
      }, 45265: function(o, s, n) {
        var l = n(34809), u = n(6811);
        o.exports = function(i, h) {
          function p(_, d) {
            return h[_] !== void 0 ? h[_] : l.coerce(i, h, u, _, d);
          }
          return p("clickmode"), p("hoversubplots"), p("hovermode");
        };
      }, 32141: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(14751), h = n(36040), p = n(6811), _ = n(38103);
        o.exports = { moduleType: "component", name: "fx", constants: n(85988), schema: { layout: p }, attributes: n(70192), layoutAttributes: p, supplyLayoutGlobalDefaults: n(5358), supplyDefaults: n(3239), supplyLayoutDefaults: n(8412), calc: n(83552), getDistanceFunction: h.getDistanceFunction, getClosest: h.getClosest, inbox: h.inbox, quadrature: h.quadrature, appendArrayPointValue: h.appendArrayPointValue, castHoverOption: function(d, f, c) {
          return u.castOption(d, f, "hoverlabel." + c);
        }, castHoverinfo: function(d, f, c) {
          return u.castOption(d, c, "hoverinfo", function(g) {
            return u.coerceHoverinfo({ hoverinfo: g }, { _module: d._module }, f);
          });
        }, hover: _.hover, unhover: i.unhover, loneHover: _.loneHover, loneUnhover: function(d) {
          var f = u.isD3Selection(d) ? d : l.select(d);
          f.selectAll("g.hovertext").remove(), f.selectAll(".spikeline").remove();
        }, click: n(94225) };
      }, 6811: function(o, s, n) {
        var l = n(85988), u = n(80337), i = u({ editType: "none" });
        i.family.dflt = l.HOVERFONT, i.size.dflt = l.HOVERFONTSIZE, o.exports = { clickmode: { valType: "flaglist", flags: ["event", "select"], dflt: "event", editType: "plot", extras: ["none"] }, dragmode: { valType: "enumerated", values: ["zoom", "pan", "select", "lasso", "drawclosedpath", "drawopenpath", "drawline", "drawrect", "drawcircle", "orbit", "turntable", !1], dflt: "zoom", editType: "modebar" }, hovermode: { valType: "enumerated", values: ["x", "y", "closest", !1, "x unified", "y unified"], dflt: "closest", editType: "modebar" }, hoversubplots: { valType: "enumerated", values: ["single", "overlaying", "axis"], dflt: "overlaying", editType: "none" }, hoverdistance: { valType: "integer", min: -1, dflt: 20, editType: "none" }, spikedistance: { valType: "integer", min: -1, dflt: -1, editType: "none" }, hoverlabel: { bgcolor: { valType: "color", editType: "none" }, bordercolor: { valType: "color", editType: "none" }, font: i, grouptitlefont: u({ editType: "none" }), align: { valType: "enumerated", values: ["left", "right", "auto"], dflt: "auto", editType: "none" }, namelength: { valType: "integer", min: -1, dflt: 15, editType: "none" }, editType: "none" }, selectdirection: { valType: "enumerated", values: ["h", "v", "d", "any"], dflt: "any", editType: "none" } };
      }, 8412: function(o, s, n) {
        var l = n(34809), u = n(6811), i = n(45265), h = n(26430);
        o.exports = function(p, _) {
          function d(x, w) {
            return l.coerce(p, _, u, x, w);
          }
          i(p, _) && (d("hoverdistance"), d("spikedistance")), d("dragmode") === "select" && d("selectdirection");
          var f = _._has("mapbox"), c = _._has("map"), g = _._has("geo"), m = _._basePlotModules.length;
          _.dragmode === "zoom" && ((f || c || g) && m === 1 || (f || c) && g && m === 2) && (_.dragmode = "pan"), h(p, _, d), l.coerceFont(d, "hoverlabel.grouptitlefont", _.hoverlabel.font);
        };
      }, 5358: function(o, s, n) {
        var l = n(34809), u = n(26430), i = n(6811);
        o.exports = function(h, p) {
          u(h, p, function(_, d) {
            return l.coerce(h, p, i, _, d);
          });
        };
      }, 83595: function(o, s, n) {
        var l = n(34809), u = n(90694).counter, i = n(13792).u, h = n(54826).idRegex, p = n(78032), _ = { rows: { valType: "integer", min: 1, editType: "plot" }, roworder: { valType: "enumerated", values: ["top to bottom", "bottom to top"], dflt: "top to bottom", editType: "plot" }, columns: { valType: "integer", min: 1, editType: "plot" }, subplots: { valType: "info_array", freeLength: !0, dimensions: 2, items: { valType: "enumerated", values: [u("xy").toString(), ""], editType: "plot" }, editType: "plot" }, xaxes: { valType: "info_array", freeLength: !0, items: { valType: "enumerated", values: [h.x.toString(), ""], editType: "plot" }, editType: "plot" }, yaxes: { valType: "info_array", freeLength: !0, items: { valType: "enumerated", values: [h.y.toString(), ""], editType: "plot" }, editType: "plot" }, pattern: { valType: "enumerated", values: ["independent", "coupled"], dflt: "coupled", editType: "plot" }, xgap: { valType: "number", min: 0, max: 1, editType: "plot" }, ygap: { valType: "number", min: 0, max: 1, editType: "plot" }, domain: i({ name: "grid", editType: "plot", noGridCell: !0 }, {}), xside: { valType: "enumerated", values: ["bottom", "bottom plot", "top plot", "top"], dflt: "bottom plot", editType: "plot" }, yside: { valType: "enumerated", values: ["left", "left plot", "right plot", "right"], dflt: "left plot", editType: "plot" }, editType: "plot" };
        function d(g, m, x) {
          var w = m[x + "axes"], k = Object.keys((g._splomAxes || {})[x] || {});
          return Array.isArray(w) ? w : k.length ? k : void 0;
        }
        function f(g, m, x, w, k, S) {
          var A = m(g + "gap", x), C = m("domain." + g);
          m(g + "side", w);
          for (var D = new Array(k), L = C[0], E = (C[1] - L) / (k - A), P = E * (1 - A), I = 0; I < k; I++) {
            var M = L + E * I;
            D[S ? k - 1 - I : I] = [M, M + P];
          }
          return D;
        }
        function c(g, m, x, w, k) {
          var S, A = new Array(x);
          function C(D, L) {
            m.indexOf(L) !== -1 && w[L] === void 0 ? (A[D] = L, w[L] = D) : A[D] = "";
          }
          if (Array.isArray(g)) for (S = 0; S < x; S++) C(S, g[S]);
          else for (C(0, k), S = 1; S < x; S++) C(S, k + (S + 1));
          return A;
        }
        o.exports = { moduleType: "component", name: "grid", schema: { layout: { grid: _ } }, layoutAttributes: _, sizeDefaults: function(g, m) {
          var x = g.grid || {}, w = d(m, x, "x"), k = d(m, x, "y");
          if (g.grid || w || k) {
            var S, A, C = Array.isArray(x.subplots) && Array.isArray(x.subplots[0]), D = Array.isArray(w), L = Array.isArray(k), E = D && w !== x.xaxes && L && k !== x.yaxes;
            C ? (S = x.subplots.length, A = x.subplots[0].length) : (L && (S = k.length), D && (A = w.length));
            var P = p.newContainer(m, "grid"), I = V("rows", S), M = V("columns", A);
            if (I * M > 1) {
              C || D || L || V("pattern") === "independent" && (C = !0), P._hasSubplotGrid = C;
              var O, T, z = V("roworder") === "top to bottom", F = C ? 0.2 : 0.1, U = C ? 0.3 : 0.1;
              E && m._splomGridDflt && (O = m._splomGridDflt.xside, T = m._splomGridDflt.yside), P._domains = { x: f("x", V, F, O, M), y: f("y", V, U, T, I, z) };
            } else delete m.grid;
          }
          function V($, q) {
            return l.coerce(x, P, _, $, q);
          }
        }, contentDefaults: function(g, m) {
          var x = m.grid;
          if (x && x._domains) {
            var w, k, S, A, C, D, L, E = g.grid || {}, P = m._subplots, I = x._hasSubplotGrid, M = x.rows, O = x.columns, T = x.pattern === "independent", z = x._axisMap = {};
            if (I) {
              var F = E.subplots || [];
              D = x.subplots = new Array(M);
              var U = 1;
              for (w = 0; w < M; w++) {
                var V = D[w] = new Array(O), $ = F[w] || [];
                for (k = 0; k < O; k++) if (T ? (C = U === 1 ? "xy" : "x" + U + "y" + U, U++) : C = $[k], V[k] = "", P.cartesian.indexOf(C) !== -1) {
                  if (L = C.indexOf("y"), S = C.slice(0, L), A = C.slice(L), z[S] !== void 0 && z[S] !== k || z[A] !== void 0 && z[A] !== w) continue;
                  V[k] = C, z[S] = k, z[A] = w;
                }
              }
            } else {
              var q = d(m, E, "x"), K = d(m, E, "y");
              x.xaxes = c(q, P.xaxis, O, z, "x"), x.yaxes = c(K, P.yaxis, M, z, "y");
            }
            var re = x._anchors = {}, Y = x.roworder === "top to bottom";
            for (var te in z) {
              var ee, X, Q, ue = te.charAt(0), ce = x[ue + "side"];
              if (ce.length < 8) re[te] = "free";
              else if (ue === "x") {
                if (ce.charAt(0) === "t" === Y ? (ee = 0, X = 1, Q = M) : (ee = M - 1, X = -1, Q = -1), I) {
                  var he = z[te];
                  for (w = ee; w !== Q; w += X) if ((C = D[w][he]) && (L = C.indexOf("y"), C.slice(0, L) === te)) {
                    re[te] = C.slice(L);
                    break;
                  }
                } else for (w = ee; w !== Q; w += X) if (A = x.yaxes[w], P.cartesian.indexOf(te + A) !== -1) {
                  re[te] = A;
                  break;
                }
              } else if (ce.charAt(0) === "l" ? (ee = 0, X = 1, Q = O) : (ee = O - 1, X = -1, Q = -1), I) {
                var de = z[te];
                for (w = ee; w !== Q; w += X) if ((C = D[de][w]) && (L = C.indexOf("y"), C.slice(L) === te)) {
                  re[te] = C.slice(0, L);
                  break;
                }
              } else for (w = ee; w !== Q; w += X) if (S = x.xaxes[w], P.cartesian.indexOf(S + te) !== -1) {
                re[te] = S;
                break;
              }
            }
          }
        } };
      }, 37260: function(o, s, n) {
        var l = n(54826), u = n(78032).templatedArray;
        n(35081), o.exports = u("image", { visible: { valType: "boolean", dflt: !0, editType: "arraydraw" }, source: { valType: "string", editType: "arraydraw" }, layer: { valType: "enumerated", values: ["below", "above"], dflt: "above", editType: "arraydraw" }, sizex: { valType: "number", dflt: 0, editType: "arraydraw" }, sizey: { valType: "number", dflt: 0, editType: "arraydraw" }, sizing: { valType: "enumerated", values: ["fill", "contain", "stretch"], dflt: "contain", editType: "arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, x: { valType: "any", dflt: 0, editType: "arraydraw" }, y: { valType: "any", dflt: 0, editType: "arraydraw" }, xanchor: { valType: "enumerated", values: ["left", "center", "right"], dflt: "left", editType: "arraydraw" }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "top", editType: "arraydraw" }, xref: { valType: "enumerated", values: ["paper", l.idRegex.x.toString()], dflt: "paper", editType: "arraydraw" }, yref: { valType: "enumerated", values: ["paper", l.idRegex.y.toString()], dflt: "paper", editType: "arraydraw" }, editType: "arraydraw" });
      }, 89443: function(o, s, n) {
        var l = n(10721), u = n(8083);
        o.exports = function(i, h, p, _) {
          h = h || {};
          var d = p === "log" && h.type === "linear", f = p === "linear" && h.type === "log";
          if (d || f) {
            for (var c, g, m = i._fullLayout.images, x = h._id.charAt(0), w = 0; w < m.length; w++) if (g = "images[" + w + "].", (c = m[w])[x + "ref"] === h._id) {
              var k = c[x], S = c["size" + x], A = null, C = null;
              if (d) {
                A = u(k, h.range);
                var D = S / Math.pow(10, A) / 2;
                C = 2 * Math.log(D + Math.sqrt(1 + D * D)) / Math.LN10;
              } else C = (A = Math.pow(10, k)) * (Math.pow(10, S / 2) - Math.pow(10, -S / 2));
              l(A) ? l(C) || (C = null) : (A = null, C = null), _(g + x, A), _(g + "size" + x, C);
            }
          }
        };
      }, 507: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(59008), h = n(37260);
        function p(_, d, f) {
          function c(A, C) {
            return l.coerce(_, d, h, A, C);
          }
          var g = c("source");
          if (!c("visible", !!g)) return d;
          c("layer"), c("xanchor"), c("yanchor"), c("sizex"), c("sizey"), c("sizing"), c("opacity");
          for (var m = { _fullLayout: f }, x = ["x", "y"], w = 0; w < 2; w++) {
            var k = x[w], S = u.coerceRef(_, d, m, k, "paper", void 0);
            S !== "paper" && u.getFromId(m, S)._imgIndices.push(d._index), u.coercePosition(d, m, c, S, k, 0);
          }
          return d;
        }
        o.exports = function(_, d) {
          i(_, d, { name: "images", handleItemDefaults: p });
        };
      }, 32211: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(29714), h = n(5975), p = n(62972);
        o.exports = function(_) {
          var d, f, c = _._fullLayout, g = [], m = {}, x = [];
          for (f = 0; f < c.images.length; f++) {
            var w = c.images[f];
            if (w.visible) if (w.layer === "below" && w.xref !== "paper" && w.yref !== "paper") {
              d = h.ref2id(w.xref) + h.ref2id(w.yref);
              var k = c._plots[d];
              if (!k) {
                x.push(w);
                continue;
              }
              k.mainplot && (d = k.mainplot.id), m[d] || (m[d] = []), m[d].push(w);
            } else w.layer === "above" ? g.push(w) : x.push(w);
          }
          var S = { left: { sizing: "xMin", offset: 0 }, center: { sizing: "xMid", offset: -0.5 }, right: { sizing: "xMax", offset: -1 } }, A = { top: { sizing: "YMin", offset: 0 }, middle: { sizing: "YMid", offset: -0.5 }, bottom: { sizing: "YMax", offset: -1 } };
          function C(O) {
            var T = l.select(this);
            if (this._imgSrc !== O.source) if (T.attr("xmlns", p.svg), O.source && O.source.slice(0, 5) === "data:") T.attr("xlink:href", O.source), this._imgSrc = O.source;
            else {
              var z = new Promise((function(F) {
                var U = new Image();
                function V() {
                  T.remove(), F();
                }
                this.img = U, U.setAttribute("crossOrigin", "anonymous"), U.onerror = V, U.onload = function() {
                  var $ = document.createElement("canvas");
                  $.width = this.width, $.height = this.height, $.getContext("2d", { willReadFrequently: !0 }).drawImage(this, 0, 0);
                  var q = $.toDataURL("image/png");
                  T.attr("xlink:href", q), F();
                }, T.on("error", V), U.src = O.source, this._imgSrc = O.source;
              }).bind(this));
              _._promises.push(z);
            }
          }
          function D(O) {
            var T, z, F = l.select(this), U = i.getFromId(_, O.xref), V = i.getFromId(_, O.yref), $ = i.getRefType(O.xref) === "domain", q = i.getRefType(O.yref) === "domain", K = c._size;
            T = U !== void 0 ? typeof O.xref == "string" && $ ? U._length * O.sizex : Math.abs(U.l2p(O.sizex) - U.l2p(0)) : O.sizex * K.w, z = V !== void 0 ? typeof O.yref == "string" && q ? V._length * O.sizey : Math.abs(V.l2p(O.sizey) - V.l2p(0)) : O.sizey * K.h;
            var re, Y, te = T * S[O.xanchor].offset, ee = z * A[O.yanchor].offset, X = S[O.xanchor].sizing + A[O.yanchor].sizing;
            switch (re = U !== void 0 ? typeof O.xref == "string" && $ ? U._length * O.x + U._offset : U.r2p(O.x) + U._offset : O.x * K.w + K.l, re += te, Y = V !== void 0 ? typeof O.yref == "string" && q ? V._length * (1 - O.y) + V._offset : V.r2p(O.y) + V._offset : K.h - O.y * K.h + K.t, Y += ee, O.sizing) {
              case "fill":
                X += " slice";
                break;
              case "stretch":
                X = "none";
            }
            F.attr({ x: re, y: Y, width: T, height: z, preserveAspectRatio: X, opacity: O.opacity });
            var Q = (U && i.getRefType(O.xref) !== "domain" ? U._id : "") + (V && i.getRefType(O.yref) !== "domain" ? V._id : "");
            u.setClipUrl(F, Q ? "clip" + c._uid + Q : null, _);
          }
          var L = c._imageLowerLayer.selectAll("image").data(x), E = c._imageUpperLayer.selectAll("image").data(g);
          L.enter().append("image"), E.enter().append("image"), L.exit().remove(), E.exit().remove(), L.each(function(O) {
            C.bind(this)(O), D.bind(this)(O);
          }), E.each(function(O) {
            C.bind(this)(O), D.bind(this)(O);
          });
          var P = Object.keys(c._plots);
          for (f = 0; f < P.length; f++) {
            d = P[f];
            var I = c._plots[d];
            if (I.imagelayer) {
              var M = I.imagelayer.selectAll("image").data(m[d] || []);
              M.enter().append("image"), M.exit().remove(), M.each(function(O) {
                C.bind(this)(O), D.bind(this)(O);
              });
            }
          }
        };
      }, 15553: function(o, s, n) {
        o.exports = { moduleType: "component", name: "images", layoutAttributes: n(37260), supplyLayoutDefaults: n(507), includeBasePlot: n(20706)("images"), draw: n(32211), convertCoords: n(89443) };
      }, 86405: function(o, s, n) {
        var l = n(80337), u = n(10229);
        o.exports = { _isSubplotObj: !0, visible: { valType: "boolean", dflt: !0, editType: "legend" }, bgcolor: { valType: "color", editType: "legend" }, bordercolor: { valType: "color", dflt: u.defaultLine, editType: "legend" }, borderwidth: { valType: "number", min: 0, dflt: 0, editType: "legend" }, font: l({ editType: "legend" }), grouptitlefont: l({ editType: "legend" }), orientation: { valType: "enumerated", values: ["v", "h"], dflt: "v", editType: "legend" }, traceorder: { valType: "flaglist", flags: ["reversed", "grouped"], extras: ["normal"], editType: "legend" }, tracegroupgap: { valType: "number", min: 0, dflt: 10, editType: "legend" }, entrywidth: { valType: "number", min: 0, editType: "legend" }, entrywidthmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "pixels", editType: "legend" }, indentation: { valType: "number", min: -15, dflt: 0, editType: "legend" }, itemsizing: { valType: "enumerated", values: ["trace", "constant"], dflt: "trace", editType: "legend" }, itemwidth: { valType: "number", min: 30, dflt: 30, editType: "legend" }, itemclick: { valType: "enumerated", values: ["toggle", "toggleothers", !1], dflt: "toggle", editType: "legend" }, itemdoubleclick: { valType: "enumerated", values: ["toggle", "toggleothers", !1], dflt: "toggleothers", editType: "legend" }, groupclick: { valType: "enumerated", values: ["toggleitem", "togglegroup"], dflt: "togglegroup", editType: "legend" }, x: { valType: "number", editType: "legend" }, xref: { valType: "enumerated", dflt: "paper", values: ["container", "paper"], editType: "layoutstyle" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left", editType: "legend" }, y: { valType: "number", editType: "legend" }, yref: { valType: "enumerated", dflt: "paper", values: ["container", "paper"], editType: "layoutstyle" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], editType: "legend" }, uirevision: { valType: "any", editType: "none" }, valign: { valType: "enumerated", values: ["top", "middle", "bottom"], dflt: "middle", editType: "legend" }, title: { text: { valType: "string", dflt: "", editType: "legend" }, font: l({ editType: "legend" }), side: { valType: "enumerated", values: ["top", "left", "top left", "top center", "top right"], editType: "legend" }, editType: "legend" }, editType: "legend" };
      }, 72783: function(o) {
        o.exports = { scrollBarWidth: 6, scrollBarMinHeight: 20, scrollBarColor: "#808BA4", scrollBarMargin: 4, scrollBarEnterAttrs: { rx: 20, ry: 3, width: 0, height: 0 }, titlePad: 2, itemGap: 5 };
      }, 73970: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(78032), h = n(9829), p = n(86405), _ = n(6704), d = n(57599);
        function f(c, g, m, x) {
          var w = g[c] || {}, k = i.newContainer(m, c);
          function S(X, Q) {
            return u.coerce(w, k, p, X, Q);
          }
          var A = u.coerceFont(S, "font", m.font);
          if (S("bgcolor", m.paper_bgcolor), S("bordercolor"), S("visible")) {
            for (var C, D = function(X, Q) {
              var ue = C._input, ce = C;
              return u.coerce(ue, ce, h, X, Q);
            }, L = m.font || {}, E = u.coerceFont(S, "grouptitlefont", L, { overrideDflt: { size: Math.round(1.1 * L.size) } }), P = 0, I = !1, M = "normal", O = (m.shapes || []).filter(function(X) {
              return X.showlegend;
            }), T = x.concat(O).filter(function(X) {
              return c === (X.legend || "legend");
            }), z = 0; z < T.length; z++) if ((C = T[z]).visible) {
              var F = C._isShape;
              (C.showlegend || C._dfltShowLegend && !(C._module && C._module.attributes && C._module.attributes.showlegend && C._module.attributes.showlegend.dflt === !1)) && (P++, C.showlegend && (I = !0, (!F && l.traceIs(C, "pie-like") || C._input.showlegend === !0) && P++), u.coerceFont(D, "legendgrouptitle.font", E)), (!F && l.traceIs(C, "bar") && m.barmode === "stack" || ["tonextx", "tonexty"].indexOf(C.fill) !== -1) && (M = d.isGrouped({ traceorder: M }) ? "grouped+reversed" : "reversed"), C.legendgroup !== void 0 && C.legendgroup !== "" && (M = d.isReversed({ traceorder: M }) ? "reversed+grouped" : "grouped");
            }
            var U = u.coerce(g, m, _, "showlegend", I && P > (c === "legend" ? 1 : 0));
            if (U === !1 && (m[c] = void 0), (U !== !1 || w.uirevision) && (S("uirevision", m.uirevision), U !== !1)) {
              S("borderwidth");
              var V, $, q, K = S("orientation") === "h", re = S("yref") === "paper", Y = S("xref") === "paper", te = "left";
              if (K ? (V = 0, l.getComponentMethod("rangeslider", "isVisible")(g.xaxis) ? re ? ($ = 1.1, q = "bottom") : ($ = 1, q = "top") : re ? ($ = -0.1, q = "top") : ($ = 0, q = "bottom")) : ($ = 1, q = "auto", Y ? V = 1.02 : (V = 1, te = "right")), u.coerce(w, k, { x: { valType: "number", editType: "legend", min: Y ? -2 : 0, max: Y ? 3 : 1, dflt: V } }, "x"), u.coerce(w, k, { y: { valType: "number", editType: "legend", min: re ? -2 : 0, max: re ? 3 : 1, dflt: $ } }, "y"), S("traceorder", M), d.isGrouped(m[c]) && S("tracegroupgap"), S("entrywidth"), S("entrywidthmode"), S("indentation"), S("itemsizing"), S("itemwidth"), S("itemclick"), S("itemdoubleclick"), S("groupclick"), S("xanchor", te), S("yanchor", q), S("valign"), u.noneOrAll(w, k, ["x", "y"]), S("title.text")) {
                S("title.side", K ? "left" : "top");
                var ee = u.extendFlat({}, A, { size: u.bigFont(A.size) });
                u.coerceFont(S, "title.font", ee);
              }
            }
          }
        }
        o.exports = function(c, g, m) {
          var x, w = m.slice(), k = g.shapes;
          if (k) for (x = 0; x < k.length; x++) {
            var S = k[x];
            if (S.showlegend) {
              var A = { _input: S._input, visible: S.visible, showlegend: S.showlegend, legend: S.legend };
              w.push(A);
            }
          }
          var C = ["legend"];
          for (x = 0; x < w.length; x++) u.pushUnique(C, w[x].legend);
          for (g._legends = [], x = 0; x < C.length; x++) {
            var D = C[x];
            f(D, c, g, w), g[D] && g[D].visible && (g[D]._id = D), g._legends.push(D);
          }
        };
      }, 6134: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(44122), h = n(33626), p = n(68596), _ = n(14751), d = n(62203), f = n(78766), c = n(30635), g = n(22165), m = n(72783), x = n(4530), w = x.LINE_SPACING, k = x.FROM_TL, S = x.FROM_BR, A = n(851), C = n(14375), D = n(57599), L = 1, E = /^legend[0-9]*$/;
        function P(q, K) {
          var re, Y, te = K || {}, ee = q._fullLayout, X = $(te), Q = te._inHover;
          if (Q ? (Y = te.layer, re = "hover") : (Y = ee._infolayer, re = X), Y) {
            var ue;
            if (re += ee._uid, q._legendMouseDownTime || (q._legendMouseDownTime = 0), Q) {
              if (!te.entries) return;
              ue = A(te.entries, te);
            } else {
              for (var ce = (q.calcdata || []).slice(), he = ee.shapes, de = 0; de < he.length; de++) {
                var ne = he[de];
                if (ne.showlegend) {
                  var ae = { _isShape: !0, _fullInput: ne, index: ne._index, name: ne.name || ne.label.text || "shape " + ne._index, legend: ne.legend, legendgroup: ne.legendgroup, legendgrouptitle: ne.legendgrouptitle, legendrank: ne.legendrank, legendwidth: ne.legendwidth, showlegend: ne.showlegend, visible: ne.visible, opacity: ne.opacity, mode: ne.type === "line" ? "lines" : "markers", line: ne.line, marker: { line: ne.line, color: ne.fillcolor, size: 12, symbol: ne.type === "rect" ? "square" : ne.type === "circle" ? "circle" : "hexagon2" } };
                  ce.push([{ trace: ae }]);
                }
              }
              ue = ee.showlegend && A(ce, te, ee._legends.length > 1);
            }
            var se = ee.hiddenlabels || [];
            if (!(Q || ee.showlegend && ue.length)) return Y.selectAll("." + X).remove(), ee._topdefs.select("#" + re).remove(), i.autoMargin(q, X);
            var me = u.ensureSingle(Y, "g", X, function(We) {
              Q || We.attr("pointer-events", "all");
            }), ye = u.ensureSingleById(ee._topdefs, "clipPath", re, function(We) {
              We.append("rect");
            }), pe = u.ensureSingle(me, "rect", "bg", function(We) {
              We.attr("shape-rendering", "crispEdges");
            });
            pe.call(f.stroke, te.bordercolor).call(f.fill, te.bgcolor).style("stroke-width", te.borderwidth + "px");
            var be, Ae = u.ensureSingle(me, "g", "scrollbox"), Se = te.title;
            te._titleWidth = 0, te._titleHeight = 0, Se.text ? ((be = u.ensureSingle(Ae, "text", X + "titletext")).attr("text-anchor", "start").call(d.font, Se.font).text(Se.text), F(be, Ae, q, te, L)) : Ae.selectAll("." + X + "titletext").remove();
            var Me = u.ensureSingle(me, "rect", "scrollbar", function(We) {
              We.attr(m.scrollBarEnterAttrs).call(f.fill, m.scrollBarColor);
            }), De = Ae.selectAll("g.groups").data(ue);
            De.enter().append("g").attr("class", "groups"), De.exit().remove();
            var Le = De.selectAll("g.traces").data(u.identity);
            Le.enter().append("g").attr("class", "traces"), Le.exit().remove(), Le.style("opacity", function(We) {
              var Ee = We[0].trace;
              return h.traceIs(Ee, "pie-like") ? se.indexOf(We[0].label) !== -1 ? 0.5 : 1 : Ee.visible === "legendonly" ? 0.5 : 1;
            }).each(function() {
              l.select(this).call(O, q, te);
            }).call(C, q, te).each(function() {
              Q || l.select(this).call(z, q, X);
            }), u.syncOrAsync([i.previousPromises, function() {
              return function(We, Ee, Ne, Ie) {
                var ge = We._fullLayout, Ce = $(Ie);
                Ie || (Ie = ge[Ce]);
                var we = ge._size, Ge = D.isVertical(Ie), Re = D.isGrouped(Ie), je = Ie.entrywidthmode === "fraction", Ke = Ie.borderwidth, tt = 2 * Ke, _e = m.itemGap, Be = Ie.indentation + Ie.itemwidth + 2 * _e, $e = 2 * (Ke + _e), Ze = V(Ie), ct = Ie.y < 0 || Ie.y === 0 && Ze === "top", ft = Ie.y > 1 || Ie.y === 1 && Ze === "bottom", _t = Ie.tracegroupgap, Pt = {};
                Ie._maxHeight = Math.max(ct || ft ? ge.height / 2 : we.h, 30);
                var Dt = 0;
                Ie._width = 0, Ie._height = 0;
                var $t = function(kt) {
                  var Bt = 0, xt = 0, Jt = kt.title.side;
                  return Jt && (Jt.indexOf("left") !== -1 && (Bt = kt._titleWidth), Jt.indexOf("top") !== -1 && (xt = kt._titleHeight)), [Bt, xt];
                }(Ie);
                if (Ge) Ne.each(function(kt) {
                  var Bt = kt[0].height;
                  d.setTranslate(this, Ke + $t[0], Ke + $t[1] + Ie._height + Bt / 2 + _e), Ie._height += Bt, Ie._width = Math.max(Ie._width, kt[0].width);
                }), Dt = Be + Ie._width, Ie._width += _e + Be + tt, Ie._height += $e, Re && (Ee.each(function(kt, Bt) {
                  d.setTranslate(this, 0, Bt * Ie.tracegroupgap);
                }), Ie._height += (Ie._lgroupsLength - 1) * Ie.tracegroupgap);
                else {
                  var Gt = U(Ie), Wt = Ie.x < 0 || Ie.x === 0 && Gt === "right", mt = Ie.x > 1 || Ie.x === 1 && Gt === "left", at = ft || ct, vt = ge.width / 2;
                  Ie._maxWidth = Math.max(Wt ? at && Gt === "left" ? we.l + we.w : vt : mt ? at && Gt === "right" ? we.r + we.w : vt : we.w, 2 * Be);
                  var St = 0, Je = 0;
                  Ne.each(function(kt) {
                    var Bt = I(kt, Ie, Be);
                    St = Math.max(St, Bt), Je += Bt;
                  }), Dt = null;
                  var nt = 0;
                  if (Re) {
                    var ot = 0, Ye = 0, Fe = 0;
                    Ee.each(function() {
                      var kt = 0, Bt = 0;
                      l.select(this).selectAll("g.traces").each(function(Jt) {
                        var qt = I(Jt, Ie, Be), en = Jt[0].height;
                        d.setTranslate(this, $t[0], $t[1] + Ke + _e + en / 2 + Bt), Bt += en, kt = Math.max(kt, qt), Pt[Jt[0].trace.legendgroup] = kt;
                      });
                      var xt = kt + _e;
                      Ye > 0 && xt + Ke + Ye > Ie._maxWidth ? (nt = Math.max(nt, Ye), Ye = 0, Fe += ot + _t, ot = Bt) : ot = Math.max(ot, Bt), d.setTranslate(this, Ye, Fe), Ye += xt;
                    }), Ie._width = Math.max(nt, Ye) + Ke, Ie._height = Fe + ot + $e;
                  } else {
                    var pt = Ne.size(), Mt = Je + tt + (pt - 1) * _e < Ie._maxWidth, At = 0, Rt = 0, Ft = 0, lt = 0;
                    Ne.each(function(kt) {
                      var Bt = kt[0].height, xt = I(kt, Ie, Be), Jt = Mt ? xt : St;
                      je || (Jt += _e), Jt + Ke + Rt - _e >= Ie._maxWidth && (nt = Math.max(nt, lt), Rt = 0, Ft += At, Ie._height += At, At = 0), d.setTranslate(this, $t[0] + Ke + Rt, $t[1] + Ke + Ft + Bt / 2 + _e), lt = Rt + xt + _e, Rt += Jt, At = Math.max(At, Bt);
                    }), Mt ? (Ie._width = Rt + tt, Ie._height = At + $e) : (Ie._width = Math.max(nt, lt) + tt, Ie._height += At + $e);
                  }
                }
                Ie._width = Math.ceil(Math.max(Ie._width + $t[0], Ie._titleWidth + 2 * (Ke + m.titlePad))), Ie._height = Math.ceil(Math.max(Ie._height + $t[1], Ie._titleHeight + 2 * (Ke + m.itemGap))), Ie._effHeight = Math.min(Ie._height, Ie._maxHeight);
                var st = We._context.edits, Ot = st.legendText || st.legendPosition;
                Ne.each(function(kt) {
                  var Bt = l.select(this).select("." + Ce + "toggle"), xt = kt[0].height, Jt = kt[0].trace.legendgroup, qt = I(kt, Ie, Be);
                  Re && Jt !== "" && (qt = Pt[Jt]);
                  var en = Ot ? Be : Dt || qt;
                  Ge || je || (en += _e / 2), d.setRect(Bt, 0, -xt / 2, en, xt);
                });
              }(q, De, Le, te);
            }, function() {
              var We, Ee, Ne, Ie, ge = ee._size, Ce = te.borderwidth, we = te.xref === "paper", Ge = te.yref === "paper";
              if (Se.text && function(at, vt, St) {
                if (vt.title.side === "top center" || vt.title.side === "top right") {
                  var Je = vt.title.font.size * w, nt = 0, ot = at.node(), Ye = d.bBox(ot).width;
                  vt.title.side === "top center" ? nt = 0.5 * (vt._width - 2 * St - 2 * m.titlePad - Ye) : vt.title.side === "top right" && (nt = vt._width - 2 * St - 2 * m.titlePad - Ye), c.positionText(at, St + m.titlePad + nt, St + Je);
                }
              }(be, te, Ce), !Q) {
                var Re, je;
                Re = we ? ge.l + ge.w * te.x - k[U(te)] * te._width : ee.width * te.x - k[U(te)] * te._width, je = Ge ? ge.t + ge.h * (1 - te.y) - k[V(te)] * te._effHeight : ee.height * (1 - te.y) - k[V(te)] * te._effHeight;
                var Ke = function(at, vt, St, Je) {
                  var nt = at._fullLayout, ot = nt[vt], Ye = U(ot), Fe = V(ot), pt = ot.xref === "paper", Mt = ot.yref === "paper";
                  at._fullLayout._reservedMargin[vt] = {};
                  var At = ot.y < 0.5 ? "b" : "t", Rt = ot.x < 0.5 ? "l" : "r", Ft = { r: nt.width - St, l: St + ot._width, b: nt.height - Je, t: Je + ot._effHeight };
                  if (pt && Mt) return i.autoMargin(at, vt, { x: ot.x, y: ot.y, l: ot._width * k[Ye], r: ot._width * S[Ye], b: ot._effHeight * S[Fe], t: ot._effHeight * k[Fe] });
                  pt ? at._fullLayout._reservedMargin[vt][At] = Ft[At] : Mt || ot.orientation === "v" ? at._fullLayout._reservedMargin[vt][Rt] = Ft[Rt] : at._fullLayout._reservedMargin[vt][At] = Ft[At];
                }(q, X, Re, je);
                if (Ke) return;
                if (ee.margin.autoexpand) {
                  var tt = Re, _e = je;
                  Re = we ? u.constrain(Re, 0, ee.width - te._width) : tt, je = Ge ? u.constrain(je, 0, ee.height - te._effHeight) : _e, Re !== tt && u.log("Constrain " + X + ".x to make legend fit inside graph"), je !== _e && u.log("Constrain " + X + ".y to make legend fit inside graph");
                }
                d.setTranslate(me, Re, je);
              }
              if (Me.on(".drag", null), me.on("wheel", null), Q || te._height <= te._maxHeight || q._context.staticPlot) {
                var Be = te._effHeight;
                Q && (Be = te._height), pe.attr({ width: te._width - Ce, height: Be - Ce, x: Ce / 2, y: Ce / 2 }), d.setTranslate(Ae, 0, 0), ye.select("rect").attr({ width: te._width - 2 * Ce, height: Be - 2 * Ce, x: Ce, y: Ce }), d.setClipUrl(Ae, re, q), d.setRect(Me, 0, 0, 0, 0), delete te._scrollY;
              } else {
                var $e, Ze, ct, ft = Math.max(m.scrollBarMinHeight, te._effHeight * te._effHeight / te._height), _t = te._effHeight - ft - 2 * m.scrollBarMargin, Pt = te._height - te._effHeight, Dt = _t / Pt, $t = Math.min(te._scrollY || 0, Pt);
                pe.attr({ width: te._width - 2 * Ce + m.scrollBarWidth + m.scrollBarMargin, height: te._effHeight - Ce, x: Ce / 2, y: Ce / 2 }), ye.select("rect").attr({ width: te._width - 2 * Ce + m.scrollBarWidth + m.scrollBarMargin, height: te._effHeight - 2 * Ce, x: Ce, y: Ce + $t }), d.setClipUrl(Ae, re, q), mt($t, ft, Dt), me.on("wheel", function() {
                  mt($t = u.constrain(te._scrollY + l.event.deltaY / _t * Pt, 0, Pt), ft, Dt), $t !== 0 && $t !== Pt && l.event.preventDefault();
                });
                var Gt = l.behavior.drag().on("dragstart", function() {
                  var at = l.event.sourceEvent;
                  $e = at.type === "touchstart" ? at.changedTouches[0].clientY : at.clientY, ct = $t;
                }).on("drag", function() {
                  var at = l.event.sourceEvent;
                  at.buttons === 2 || at.ctrlKey || (Ze = at.type === "touchmove" ? at.changedTouches[0].clientY : at.clientY, $t = function(vt, St, Je) {
                    var nt = (Je - St) / Dt + vt;
                    return u.constrain(nt, 0, Pt);
                  }(ct, $e, Ze), mt($t, ft, Dt));
                });
                Me.call(Gt);
                var Wt = l.behavior.drag().on("dragstart", function() {
                  var at = l.event.sourceEvent;
                  at.type === "touchstart" && ($e = at.changedTouches[0].clientY, ct = $t);
                }).on("drag", function() {
                  var at = l.event.sourceEvent;
                  at.type === "touchmove" && (Ze = at.changedTouches[0].clientY, $t = function(vt, St, Je) {
                    var nt = (St - Je) / Dt + vt;
                    return u.constrain(nt, 0, Pt);
                  }(ct, $e, Ze), mt($t, ft, Dt));
                });
                Ae.call(Wt);
              }
              function mt(at, vt, St) {
                te._scrollY = q._fullLayout[X]._scrollY = at, d.setTranslate(Ae, 0, -at), d.setRect(Me, te._width, m.scrollBarMargin + at * St, m.scrollBarWidth, vt), ye.select("rect").attr("y", Ce + at);
              }
              q._context.edits.legendPosition && (me.classed("cursor-move", !0), _.init({ element: me.node(), gd: q, prepFn: function(at) {
                if (at.target !== Me.node()) {
                  var vt = d.getTranslate(me);
                  Ne = vt.x, Ie = vt.y;
                }
              }, moveFn: function(at, vt) {
                if (Ne !== void 0 && Ie !== void 0) {
                  var St = Ne + at, Je = Ie + vt;
                  d.setTranslate(me, St, Je), We = _.align(St, te._width, ge.l, ge.l + ge.w, te.xanchor), Ee = _.align(Je + te._height, -te._height, ge.t + ge.h, ge.t, te.yanchor);
                }
              }, doneFn: function() {
                if (We !== void 0 && Ee !== void 0) {
                  var at = {};
                  at[X + ".x"] = We, at[X + ".y"] = Ee, h.call("_guiRelayout", q, at);
                }
              }, clickFn: function(at, vt) {
                var St = Y.selectAll("g.traces").filter(function() {
                  var Je = this.getBoundingClientRect();
                  return vt.clientX >= Je.left && vt.clientX <= Je.right && vt.clientY >= Je.top && vt.clientY <= Je.bottom;
                });
                St.size() > 0 && M(q, me, St, at, vt);
              } }));
            }], q);
          }
        }
        function I(q, K, re) {
          var Y = q[0], te = Y.width, ee = K.entrywidthmode, X = Y.trace.legendwidth || K.entrywidth;
          return ee === "fraction" ? K._maxWidth * X : re + (X || te);
        }
        function M(q, K, re, Y, te) {
          var ee = re.data()[0][0].trace, X = { event: te, node: re.node(), curveNumber: ee.index, expandedIndex: ee._expandedIndex, data: q.data, layout: q.layout, frames: q._transitionData._frames, config: q._context, fullData: q._fullData, fullLayout: q._fullLayout };
          ee._group && (X.group = ee._group), h.traceIs(ee, "pie-like") && (X.label = re.datum()[0].label);
          var Q = p.triggerHandler(q, "plotly_legendclick", X);
          if (Y === 1) {
            if (Q === !1) return;
            K._clickTimeout = setTimeout(function() {
              q._fullLayout && g(re, q, Y);
            }, q._context.doubleClickDelay);
          } else Y === 2 && (K._clickTimeout && clearTimeout(K._clickTimeout), q._legendMouseDownTime = 0, p.triggerHandler(q, "plotly_legenddoubleclick", X) !== !1 && Q !== !1 && g(re, q, Y));
        }
        function O(q, K, re) {
          var Y, te, ee = $(re), X = q.data()[0][0], Q = X.trace, ue = h.traceIs(Q, "pie-like"), ce = !re._inHover && K._context.edits.legendText && !ue, he = re._maxNameLength;
          X.groupTitle ? (Y = X.groupTitle.text, te = X.groupTitle.font) : (te = re.font, re.entries ? Y = X.text : (Y = ue ? X.label : Q.name, Q._meta && (Y = u.templateString(Y, Q._meta))));
          var de = u.ensureSingle(q, "text", ee + "text");
          de.attr("text-anchor", "start").call(d.font, te).text(ce ? T(Y, he) : Y);
          var ne = re.indentation + re.itemwidth + 2 * m.itemGap;
          c.positionText(de, ne, 0), ce ? de.call(c.makeEditable, { gd: K, text: Y }).call(F, q, K, re).on("edit", function(ae) {
            this.text(T(ae, he)).call(F, q, K, re);
            var se = X.trace._fullInput || {}, me = {};
            if (h.hasTransform(se, "groupby")) {
              var ye = h.getTransformIndices(se, "groupby"), pe = ye[ye.length - 1], be = u.keyedContainer(se, "transforms[" + pe + "].styles", "target", "value.name");
              be.set(X.trace._group, ae), me = be.constructUpdate();
            } else me.name = ae;
            return se._isShape ? h.call("_guiRelayout", K, "shapes[" + Q.index + "].name", me.name) : h.call("_guiRestyle", K, me, Q.index);
          }) : F(de, q, K, re);
        }
        function T(q, K) {
          var re = Math.max(4, K);
          if (q && q.trim().length >= re / 2) return q;
          for (var Y = re - (q = q || "").length; Y > 0; Y--) q += " ";
          return q;
        }
        function z(q, K, re) {
          var Y, te = K._context.doubleClickDelay, ee = 1, X = u.ensureSingle(q, "rect", re + "toggle", function(Q) {
            K._context.staticPlot || Q.style("cursor", "pointer").attr("pointer-events", "all"), Q.call(f.fill, "rgba(0,0,0,0)");
          });
          K._context.staticPlot || (X.on("mousedown", function() {
            (Y = (/* @__PURE__ */ new Date()).getTime()) - K._legendMouseDownTime < te ? ee += 1 : (ee = 1, K._legendMouseDownTime = Y);
          }), X.on("mouseup", function() {
            if (!K._dragged && !K._editing) {
              var Q = K._fullLayout[re];
              (/* @__PURE__ */ new Date()).getTime() - K._legendMouseDownTime > te && (ee = Math.max(ee - 1, 1)), M(K, Q, q, ee, l.event);
            }
          }));
        }
        function F(q, K, re, Y, te) {
          Y._inHover && q.attr("data-notex", !0), c.convertToTspans(q, re, function() {
            (function(ee, X, Q, ue) {
              var ce = ee.data()[0][0];
              if (Q._inHover || !ce || ce.trace.showlegend) {
                var he = ee.select("g[class*=math-group]"), de = he.node(), ne = $(Q);
                Q || (Q = X._fullLayout[ne]);
                var ae, se, me = Q.borderwidth, ye = (ue === L ? Q.title.font : ce.groupTitle ? ce.groupTitle.font : Q.font).size * w;
                if (de) {
                  var pe = d.bBox(de);
                  ae = pe.height, se = pe.width, ue === L ? d.setTranslate(he, me, me + 0.75 * ae) : d.setTranslate(he, 0, 0.25 * ae);
                } else {
                  var be = "." + ne + (ue === L ? "title" : "") + "text", Ae = ee.select(be), Se = c.lineCount(Ae), Me = Ae.node();
                  if (ae = ye * Se, se = Me ? d.bBox(Me).width : 0, ue === L) Q.title.side === "left" && (se += 2 * m.itemGap), c.positionText(Ae, me + m.titlePad, me + ye);
                  else {
                    var De = 2 * m.itemGap + Q.indentation + Q.itemwidth;
                    ce.groupTitle && (De = m.itemGap, se -= Q.indentation + Q.itemwidth), c.positionText(Ae, De, -ye * ((Se - 1) / 2 - 0.3));
                  }
                }
                ue === L ? (Q._titleWidth = se, Q._titleHeight = ae) : (ce.lineHeight = ye, ce.height = Math.max(ae, 16) + 3, ce.width = se);
              } else ee.remove();
            })(K, re, Y, te);
          });
        }
        function U(q) {
          return u.isRightAnchor(q) ? "right" : u.isCenterAnchor(q) ? "center" : "left";
        }
        function V(q) {
          return u.isBottomAnchor(q) ? "bottom" : u.isMiddleAnchor(q) ? "middle" : "top";
        }
        function $(q) {
          return q._id || "legend";
        }
        o.exports = function(q, K) {
          if (K) P(q, K);
          else {
            var re = q._fullLayout, Y = re._legends;
            re._infolayer.selectAll('[class^="legend"]').each(function() {
              var X = l.select(this), Q = X.attr("class").split(" ")[0];
              Q.match(E) && Y.indexOf(Q) === -1 && X.remove();
            });
            for (var te = 0; te < Y.length; te++) {
              var ee = Y[te];
              P(q, q._fullLayout[ee]);
            }
          }
        };
      }, 851: function(o, s, n) {
        var l = n(33626), u = n(57599);
        o.exports = function(i, h, p) {
          var _, d, f = h._inHover, c = u.isGrouped(h), g = u.isReversed(h), m = {}, x = [], w = !1, k = {}, S = 0, A = 0;
          function C(Y, te, ee) {
            if (h.visible !== !1 && (!p || Y === h._id)) if (te !== "" && u.isGrouped(h)) x.indexOf(te) === -1 ? (x.push(te), w = !0, m[te] = [ee]) : m[te].push(ee);
            else {
              var X = "~~i" + S;
              x.push(X), m[X] = [ee], S++;
            }
          }
          for (_ = 0; _ < i.length; _++) {
            var D = i[_], L = D[0], E = L.trace, P = E.legend, I = E.legendgroup;
            if (f || E.visible && E.showlegend) if (l.traceIs(E, "pie-like")) for (k[I] || (k[I] = {}), d = 0; d < D.length; d++) {
              var M = D[d].label;
              k[I][M] || (C(P, I, { label: M, color: D[d].color, i: D[d].i, trace: E, pts: D[d].pts }), k[I][M] = !0, A = Math.max(A, (M || "").length));
            }
            else C(P, I, L), A = Math.max(A, (E.name || "").length);
          }
          if (!x.length) return [];
          var O = !w || !c, T = [];
          for (_ = 0; _ < x.length; _++) {
            var z = m[x[_]];
            O ? T.push(z[0]) : T.push(z);
          }
          for (O && (T = [T]), _ = 0; _ < T.length; _++) {
            var F = 1 / 0;
            for (d = 0; d < T[_].length; d++) {
              var U = T[_][d].trace.legendrank;
              F > U && (F = U);
            }
            T[_][0]._groupMinRank = F, T[_][0]._preGroupSort = _;
          }
          var V = function(Y, te) {
            return Y.trace.legendrank - te.trace.legendrank || Y._preSort - te._preSort;
          };
          for (T.forEach(function(Y, te) {
            Y[0]._preGroupSort = te;
          }), T.sort(function(Y, te) {
            return Y[0]._groupMinRank - te[0]._groupMinRank || Y[0]._preGroupSort - te[0]._preGroupSort;
          }), _ = 0; _ < T.length; _++) {
            T[_].forEach(function(Y, te) {
              Y._preSort = te;
            }), T[_].sort(V);
            var $ = T[_][0].trace, q = null;
            for (d = 0; d < T[_].length; d++) {
              var K = T[_][d].trace.legendgrouptitle;
              if (K && K.text) {
                q = K, f && (K.font = h._groupTitleFont);
                break;
              }
            }
            if (g && T[_].reverse(), q) {
              var re = !1;
              for (d = 0; d < T[_].length; d++) if (l.traceIs(T[_][d].trace, "pie-like")) {
                re = !0;
                break;
              }
              T[_].unshift({ i: -1, groupTitle: q, noClick: re, trace: { showlegend: $.showlegend, legendgroup: $.legendgroup, visible: h.groupclick === "toggleitem" || $.visible } });
            }
            for (d = 0; d < T[_].length; d++) T[_][d] = [T[_][d]];
          }
          return h._lgroupsLength = T.length, h._maxNameLength = A, T;
        };
      }, 22165: function(o, s, n) {
        var l = n(33626), u = n(34809), i = u.pushUnique, h = !0;
        o.exports = function(p, _, d) {
          var f = _._fullLayout;
          if (!_._dragged && !_._editing) {
            var c, g = f.legend.itemclick, m = f.legend.itemdoubleclick, x = f.legend.groupclick;
            if (d === 1 && g === "toggle" && m === "toggleothers" && h && _.data && _._context.showTips && u.notifier(u._(_, "Double-click on legend to isolate one trace"), "long"), h = !1, d === 1 ? c = g : d === 2 && (c = m), c) {
              var w = x === "togglegroup", k = f.hiddenlabels ? f.hiddenlabels.slice() : [], S = p.data()[0][0];
              if (!S.groupTitle || !S.noClick) {
                var A = _._fullData, C = (f.shapes || []).filter(function(Ee) {
                  return Ee.showlegend;
                }), D = A.concat(C), L = S.trace;
                L._isShape && (L = L._fullInput);
                var E, P, I, M, O, T = L.legendgroup, z = {}, F = [], U = [], V = [], $ = (f.shapes || []).map(function(Ee) {
                  return Ee._input;
                }), q = !1, K = L.legend, re = L._fullInput;
                if (re && re._isShape || !l.traceIs(L, "pie-like")) {
                  var Y, te = T && T.length, ee = [];
                  if (te) for (E = 0; E < D.length; E++) (Y = D[E]).visible && Y.legendgroup === T && ee.push(E);
                  if (c === "toggle") {
                    var X;
                    switch (L.visible) {
                      case !0:
                        X = "legendonly";
                        break;
                      case !1:
                        X = !1;
                        break;
                      case "legendonly":
                        X = !0;
                    }
                    if (te) if (w) for (E = 0; E < D.length; E++) {
                      var Q = D[E];
                      Q.visible !== !1 && Q.legendgroup === T && We(Q, X);
                    }
                    else We(L, X);
                    else We(L, X);
                  } else if (c === "toggleothers") {
                    var ue, ce, he, de, ne = !0;
                    for (E = 0; E < D.length; E++) if (ue = (de = D[E]) === L, ce = de.showlegend !== !0, !(ue || ce || te && de.legendgroup === T || de.legend !== K || de.visible !== !0 || l.traceIs(de, "notLegendIsolatable"))) {
                      ne = !1;
                      break;
                    }
                    for (E = 0; E < D.length; E++) if ((de = D[E]).visible !== !1 && de.legend === K && !l.traceIs(de, "notLegendIsolatable")) switch (L.visible) {
                      case "legendonly":
                        We(de, !0);
                        break;
                      case !0:
                        he = !!ne || "legendonly", ue = de === L, ce = de.showlegend !== !0 && !de.legendgroup, We(de, !!(ue || te && de.legendgroup === T || ce) || he);
                    }
                  }
                  for (E = 0; E < U.length; E++) if (I = U[E]) {
                    var ae = I.constructUpdate(), se = Object.keys(ae);
                    for (P = 0; P < se.length; P++) M = se[P], (z[M] = z[M] || [])[V[E]] = ae[M];
                  }
                  for (O = Object.keys(z), E = 0; E < O.length; E++) for (M = O[E], P = 0; P < F.length; P++) z[M].hasOwnProperty(P) || (z[M][P] = void 0);
                  q ? l.call("_guiUpdate", _, z, { shapes: $ }, F) : l.call("_guiRestyle", _, z, F);
                } else {
                  var me = S.label, ye = k.indexOf(me);
                  if (c === "toggle") ye === -1 ? k.push(me) : k.splice(ye, 1);
                  else if (c === "toggleothers") {
                    var pe = ye !== -1, be = [];
                    for (E = 0; E < _.calcdata.length; E++) {
                      var Ae = _.calcdata[E];
                      for (P = 0; P < Ae.length; P++) {
                        var Se = Ae[P].label;
                        K === Ae[0].trace.legend && me !== Se && (k.indexOf(Se) === -1 && (pe = !0), i(k, Se), be.push(Se));
                      }
                    }
                    if (!pe) for (var Me = 0; Me < be.length; Me++) {
                      var De = k.indexOf(be[Me]);
                      De !== -1 && k.splice(De, 1);
                    }
                  }
                  l.call("_guiRelayout", _, "hiddenlabels", k);
                }
              }
            }
          }
          function Le(Ee, Ne) {
            var Ie = F.indexOf(Ee), ge = z.visible;
            return ge || (ge = z.visible = []), F.indexOf(Ee) === -1 && (F.push(Ee), Ie = F.length - 1), ge[Ie] = Ne, Ie;
          }
          function We(Ee, Ne) {
            if (!S.groupTitle || w) {
              var Ie, ge = Ee._fullInput || Ee, Ce = ge._isShape, we = ge.index;
              if (we === void 0 && (we = ge._index), l.hasTransform(ge, "groupby")) {
                var Ge = U[we];
                if (!Ge) {
                  var Re = l.getTransformIndices(ge, "groupby"), je = Re[Re.length - 1];
                  Ge = u.keyedContainer(ge, "transforms[" + je + "].styles", "target", "value.visible"), U[we] = Ge;
                }
                var Ke = Ge.get(Ee._group);
                Ke === void 0 && (Ke = !0), Ke !== !1 && Ge.set(Ee._group, Ne), V[we] = Le(we, ge.visible !== !1);
              } else {
                var tt = ge.visible !== !1 && Ne;
                Ce ? (Ie = tt, $[we].visible = Ie, q = !0) : Le(we, tt);
              }
            }
          }
        };
      }, 57599: function(o, s) {
        s.isGrouped = function(n) {
          return (n.traceorder || "").indexOf("grouped") !== -1;
        }, s.isVertical = function(n) {
          return n.orientation !== "h";
        }, s.isReversed = function(n) {
          return (n.traceorder || "").indexOf("reversed") !== -1;
        };
      }, 82494: function(o, s, n) {
        o.exports = { moduleType: "component", name: "legend", layoutAttributes: n(86405), supplyLayoutDefaults: n(73970), draw: n(6134), style: n(14375) };
      }, 14375: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(34809), h = i.strTranslate, p = n(62203), _ = n(78766), d = n(65477).extractOpts, f = n(64726), c = n(32891), g = n(37252).castOption, m = n(72783);
        function x(S, A) {
          return (A ? "radial" : "horizontal") + (S ? "" : "reversed");
        }
        function w(S) {
          var A = S[0].trace, C = A.contours, D = f.hasLines(A), L = f.hasMarkers(A), E = A.visible && A.fill && A.fill !== "none", P = !1, I = !1;
          if (C) {
            var M = C.coloring;
            M === "lines" ? P = !0 : D = M === "none" || M === "heatmap" || C.showlines, C.type === "constraint" ? E = C._operation !== "=" : M !== "fill" && M !== "heatmap" || (I = !0);
          }
          return { showMarker: L, showLine: D, showFill: E, showGradientLine: P, showGradientFill: I, anyLine: D || P, anyFill: E || I };
        }
        function k(S, A, C) {
          return S && i.isArrayOrTypedArray(S) ? A : S > C ? C : S;
        }
        o.exports = function(S, A, C) {
          var D = A._fullLayout;
          C || (C = D.legend);
          var L = C.itemsizing === "constant", E = C.itemwidth, P = (E + 2 * m.itemGap) / 2, I = h(P, 0), M = function(z, F, U, V) {
            var $;
            if (z + 1) $ = z;
            else {
              if (!(F && F.width > 0)) return 0;
              $ = F.width;
            }
            return L ? V : Math.min($, U);
          };
          function O(z, F, U) {
            var V = z[0].trace, $ = V.marker || {}, q = $.line || {}, K = $.cornerradius ? "M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z" : "M6,6H-6V-6H6Z", re = U ? V.visible && V.type === U : u.traceIs(V, "bar"), Y = l.select(F).select("g.legendpoints").selectAll("path.legend" + U).data(re ? [z] : []);
            Y.enter().append("path").classed("legend" + U, !0).attr("d", K).attr("transform", I), Y.exit().remove(), Y.each(function(te) {
              var ee = l.select(this), X = te[0], Q = M(X.mlw, $.line, 5, 2);
              ee.style("stroke-width", Q + "px");
              var ue = X.mcc;
              if (!C._inHover && "mc" in X) {
                var ce = d($), he = ce.mid;
                he === void 0 && (he = (ce.max + ce.min) / 2), ue = p.tryColorscale($, "")(he);
              }
              var de = ue || X.mc || $.color, ne = $.pattern, ae = ne && p.getPatternAttr(ne.shape, 0, "");
              if (ae) {
                var se = p.getPatternAttr(ne.bgcolor, 0, null), me = p.getPatternAttr(ne.fgcolor, 0, null), ye = ne.fgopacity, pe = k(ne.size, 8, 10), be = k(ne.solidity, 0.5, 1), Ae = "legend-" + V.uid;
                ee.call(p.pattern, "legend", A, Ae, ae, pe, be, ue, ne.fillmode, se, me, ye);
              } else ee.call(_.fill, de);
              Q && _.stroke(ee, X.mlc || q.color);
            });
          }
          function T(z, F, U) {
            var V = z[0], $ = V.trace, q = U ? $.visible && $.type === U : u.traceIs($, U), K = l.select(F).select("g.legendpoints").selectAll("path.legend" + U).data(q ? [z] : []);
            if (K.enter().append("path").classed("legend" + U, !0).attr("d", "M6,6H-6V-6H6Z").attr("transform", I), K.exit().remove(), K.size()) {
              var re = $.marker || {}, Y = M(g(re.line.width, V.pts), re.line, 5, 2), te = "pieLike", ee = i.minExtend($, { marker: { line: { width: Y } } }, te), X = i.minExtend(V, { trace: ee }, te);
              c(K, X, ee, A);
            }
          }
          S.each(function(z) {
            var F = l.select(this), U = i.ensureSingle(F, "g", "layers");
            U.style("opacity", z[0].trace.opacity);
            var V = C.indentation, $ = C.valign, q = z[0].lineHeight, K = z[0].height;
            if ($ === "middle" && V === 0 || !q || !K) U.attr("transform", null);
            else {
              var re = { top: 1, bottom: -1 }[$] * (0.5 * (q - K + 3)) || 0, Y = C.indentation;
              U.attr("transform", h(Y, re));
            }
            U.selectAll("g.legendfill").data([z]).enter().append("g").classed("legendfill", !0), U.selectAll("g.legendlines").data([z]).enter().append("g").classed("legendlines", !0);
            var te = U.selectAll("g.legendsymbols").data([z]);
            te.enter().append("g").classed("legendsymbols", !0), te.selectAll("g.legendpoints").data([z]).enter().append("g").classed("legendpoints", !0);
          }).each(function(z) {
            var F, U = z[0].trace, V = [];
            if (U.visible) switch (U.type) {
              case "histogram2d":
              case "heatmap":
                V = [["M-15,-2V4H15V-2Z"]], F = !0;
                break;
              case "choropleth":
              case "choroplethmapbox":
              case "choroplethmap":
                V = [["M-6,-6V6H6V-6Z"]], F = !0;
                break;
              case "densitymapbox":
              case "densitymap":
                V = [["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]], F = "radial";
                break;
              case "cone":
                V = [["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"], ["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"], ["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]], F = !1;
                break;
              case "streamtube":
                V = [["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"], ["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"], ["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]], F = !1;
                break;
              case "surface":
                V = [["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"], ["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]], F = !0;
                break;
              case "mesh3d":
                V = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6H6L0,6Z"]], F = !1;
                break;
              case "volume":
                V = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6H6L0,6Z"]], F = !0;
                break;
              case "isosurface":
                V = [["M-6,6H0L-6,-6Z"], ["M6,6H0L6,-6Z"], ["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]], F = !1;
            }
            var $ = l.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);
            $.enter().append("path").classed("legend3dandfriends", !0).attr("transform", I).style("stroke-miterlimit", 1), $.exit().remove(), $.each(function(q, K) {
              var re, Y = l.select(this), te = d(U), ee = te.colorscale, X = te.reversescale;
              if (ee) {
                if (!F) {
                  var Q = ee.length;
                  re = K === 0 ? ee[X ? Q - 1 : 0][1] : K === 1 ? ee[X ? 0 : Q - 1][1] : ee[Math.floor((Q - 1) / 2)][1];
                }
              } else {
                var ue = U.vertexcolor || U.facecolor || U.color;
                re = i.isArrayOrTypedArray(ue) ? ue[K] || ue[0] : ue;
              }
              Y.attr("d", q[0]), re ? Y.call(_.fill, re) : Y.call(function(ce) {
                if (ce.size()) {
                  var he = "legendfill-" + U.uid;
                  p.gradient(ce, A, he, x(X, F === "radial"), ee, "fill");
                }
              });
            });
          }).each(function(z) {
            var F = z[0].trace, U = F.type === "waterfall";
            if (z[0]._distinct && U) {
              var V = z[0].trace[z[0].dir].marker;
              return z[0].mc = V.color, z[0].mlw = V.line.width, z[0].mlc = V.line.color, O(z, this, "waterfall");
            }
            var $ = [];
            F.visible && U && ($ = z[0].hasTotals ? [["increasing", "M-6,-6V6H0Z"], ["totals", "M6,6H0L-6,-6H-0Z"], ["decreasing", "M6,6V-6H0Z"]] : [["increasing", "M-6,-6V6H6Z"], ["decreasing", "M6,6V-6H-6Z"]]);
            var q = l.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data($);
            q.enter().append("path").classed("legendwaterfall", !0).attr("transform", I).style("stroke-miterlimit", 1), q.exit().remove(), q.each(function(K) {
              var re = l.select(this), Y = F[K[0]].marker, te = M(void 0, Y.line, 5, 2);
              re.attr("d", K[1]).style("stroke-width", te + "px").call(_.fill, Y.color), te && re.call(_.stroke, Y.line.color);
            });
          }).each(function(z) {
            O(z, this, "funnel");
          }).each(function(z) {
            O(z, this);
          }).each(function(z) {
            var F = z[0].trace, U = l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(F.visible && u.traceIs(F, "box-violin") ? [z] : []);
            U.enter().append("path").classed("legendbox", !0).attr("d", "M6,6H-6V-6H6Z").attr("transform", I), U.exit().remove(), U.each(function() {
              var V = l.select(this);
              if (F.boxpoints !== "all" && F.points !== "all" || _.opacity(F.fillcolor) !== 0 || _.opacity((F.line || {}).color) !== 0) {
                var $ = M(void 0, F.line, 5, 2);
                V.style("stroke-width", $ + "px").call(_.fill, F.fillcolor), $ && _.stroke(V, F.line.color);
              } else {
                var q = i.minExtend(F, { marker: { size: L ? 12 : i.constrain(F.marker.size, 2, 16), sizeref: 1, sizemin: 1, sizemode: "diameter" } });
                U.call(p.pointStyle, q, A);
              }
            });
          }).each(function(z) {
            T(z, this, "funnelarea");
          }).each(function(z) {
            T(z, this, "pie");
          }).each(function(z) {
            var F, U, V = w(z), $ = V.showFill, q = V.showLine, K = V.showGradientLine, re = V.showGradientFill, Y = V.anyFill, te = V.anyLine, ee = z[0], X = ee.trace, Q = d(X), ue = Q.colorscale, ce = Q.reversescale, he = f.hasMarkers(X) || !Y ? "M5,0" : te ? "M5,-2" : "M5,-3", de = l.select(this), ne = de.select(".legendfill").selectAll("path").data($ || re ? [z] : []);
            if (ne.enter().append("path").classed("js-fill", !0), ne.exit().remove(), ne.attr("d", he + "h" + E + "v6h-" + E + "z").call(function(me) {
              if (me.size()) if ($) p.fillGroupStyle(me, A, !0);
              else {
                var ye = "legendfill-" + X.uid;
                p.gradient(me, A, ye, x(ce), ue, "fill");
              }
            }), q || K) {
              var ae = M(void 0, X.line, 10, 5);
              U = i.minExtend(X, { line: { width: ae } }), F = [i.minExtend(ee, { trace: U })];
            }
            var se = de.select(".legendlines").selectAll("path").data(q || K ? [F] : []);
            se.enter().append("path").classed("js-line", !0), se.exit().remove(), se.attr("d", he + (K ? "l" + E + ",0.0001" : "h" + E)).call(q ? p.lineGroupStyle : function(me) {
              if (me.size()) {
                var ye = "legendline-" + X.uid;
                p.lineGroupStyle(me), p.gradient(me, A, ye, x(ce), ue, "stroke");
              }
            });
          }).each(function(z) {
            var F, U, V = w(z), $ = V.anyFill, q = V.anyLine, K = V.showLine, re = V.showMarker, Y = z[0], te = Y.trace, ee = !re && !q && !$ && f.hasText(te);
            function X(se, me, ye, pe) {
              var be = i.nestedProperty(te, se).get(), Ae = i.isArrayOrTypedArray(be) && me ? me(be) : be;
              if (L && Ae && pe !== void 0 && (Ae = pe), ye) {
                if (Ae < ye[0]) return ye[0];
                if (Ae > ye[1]) return ye[1];
              }
              return Ae;
            }
            function Q(se) {
              return Y._distinct && Y.index && se[Y.index] ? se[Y.index] : se[0];
            }
            if (re || ee || K) {
              var ue = {}, ce = {};
              if (re) {
                ue.mc = X("marker.color", Q), ue.mx = X("marker.symbol", Q), ue.mo = X("marker.opacity", i.mean, [0.2, 1]), ue.mlc = X("marker.line.color", Q), ue.mlw = X("marker.line.width", i.mean, [0, 5], 2), ce.marker = { sizeref: 1, sizemin: 1, sizemode: "diameter" };
                var he = X("marker.size", i.mean, [2, 16], 12);
                ue.ms = he, ce.marker.size = he;
              }
              K && (ce.line = { width: X("line.width", Q, [0, 10], 5) }), ee && (ue.tx = "Aa", ue.tp = X("textposition", Q), ue.ts = 10, ue.tc = X("textfont.color", Q), ue.tf = X("textfont.family", Q), ue.tw = X("textfont.weight", Q), ue.ty = X("textfont.style", Q), ue.tv = X("textfont.variant", Q), ue.tC = X("textfont.textcase", Q), ue.tE = X("textfont.lineposition", Q), ue.tS = X("textfont.shadow", Q)), F = [i.minExtend(Y, ue)], (U = i.minExtend(te, ce)).selectedpoints = null, U.texttemplate = null;
            }
            var de = l.select(this).select("g.legendpoints"), ne = de.selectAll("path.scatterpts").data(re ? F : []);
            ne.enter().insert("path", ":first-child").classed("scatterpts", !0).attr("transform", I), ne.exit().remove(), ne.call(p.pointStyle, U, A), re && (F[0].mrc = 3);
            var ae = de.selectAll("g.pointtext").data(ee ? F : []);
            ae.enter().append("g").classed("pointtext", !0).append("text").attr("transform", I), ae.exit().remove(), ae.selectAll("text").call(p.textPointStyle, U, A);
          }).each(function(z) {
            var F = z[0].trace, U = l.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(F.visible && F.type === "candlestick" ? [z, z] : []);
            U.enter().append("path").classed("legendcandle", !0).attr("d", function(V, $) {
              return $ ? "M-15,0H-8M-8,6V-6H8Z" : "M15,0H8M8,-6V6H-8Z";
            }).attr("transform", I).style("stroke-miterlimit", 1), U.exit().remove(), U.each(function(V, $) {
              var q = l.select(this), K = F[$ ? "increasing" : "decreasing"], re = M(void 0, K.line, 5, 2);
              q.style("stroke-width", re + "px").call(_.fill, K.fillcolor), re && _.stroke(q, K.line.color);
            });
          }).each(function(z) {
            var F = z[0].trace, U = l.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(F.visible && F.type === "ohlc" ? [z, z] : []);
            U.enter().append("path").classed("legendohlc", !0).attr("d", function(V, $) {
              return $ ? "M-15,0H0M-8,-6V0" : "M15,0H0M8,6V0";
            }).attr("transform", I).style("stroke-miterlimit", 1), U.exit().remove(), U.each(function(V, $) {
              var q = l.select(this), K = F[$ ? "increasing" : "decreasing"], re = M(void 0, K.line, 5, 2);
              q.style("fill", "none").call(p.dashLine, K.line.dash, re), re && _.stroke(q, K.line.color);
            });
          });
        };
      }, 50308: function(o, s, n) {
        n(87632), o.exports = { editType: "modebar", orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h", editType: "modebar" }, bgcolor: { valType: "color", editType: "modebar" }, color: { valType: "color", editType: "modebar" }, activecolor: { valType: "color", editType: "modebar" }, uirevision: { valType: "any", editType: "none" }, add: { valType: "string", arrayOk: !0, dflt: "", editType: "modebar" }, remove: { valType: "string", arrayOk: !0, dflt: "", editType: "modebar" } };
      }, 5832: function(o, s, n) {
        var l = n(33626), u = n(44122), i = n(5975), h = n(35188), p = n(28231).eraseActiveShape, _ = n(34809), d = _._, f = o.exports = {};
        function c(E, P) {
          var I, M, O = P.currentTarget, T = O.getAttribute("data-attr"), z = O.getAttribute("data-val") || !0, F = E._fullLayout, U = {}, V = i.list(E, null, !0), $ = F._cartesianSpikesEnabled;
          if (T === "zoom") {
            var q, K = z === "in" ? 0.5 : 2, re = (1 + K) / 2, Y = (1 - K) / 2;
            for (M = 0; M < V.length; M++) if (!(I = V[M]).fixedrange) if (q = I._name, z === "auto") U[q + ".autorange"] = !0;
            else if (z === "reset") I._rangeInitial0 === void 0 && I._rangeInitial1 === void 0 ? U[q + ".autorange"] = !0 : I._rangeInitial0 === void 0 ? (U[q + ".autorange"] = I._autorangeInitial, U[q + ".range"] = [null, I._rangeInitial1]) : I._rangeInitial1 === void 0 ? (U[q + ".range"] = [I._rangeInitial0, null], U[q + ".autorange"] = I._autorangeInitial) : U[q + ".range"] = [I._rangeInitial0, I._rangeInitial1], I._showSpikeInitial !== void 0 && (U[q + ".showspikes"] = I._showSpikeInitial, $ !== "on" || I._showSpikeInitial || ($ = "off"));
            else {
              var te = [I.r2l(I.range[0]), I.r2l(I.range[1])], ee = [re * te[0] + Y * te[1], re * te[1] + Y * te[0]];
              U[q + ".range[0]"] = I.l2r(ee[0]), U[q + ".range[1]"] = I.l2r(ee[1]);
            }
          } else T !== "hovermode" || z !== "x" && z !== "y" || (z = F._isHoriz ? "y" : "x", O.setAttribute("data-val", z)), U[T] = z;
          F._cartesianSpikesEnabled = $, l.call("_guiRelayout", E, U);
        }
        function g(E, P) {
          for (var I = P.currentTarget, M = I.getAttribute("data-attr"), O = I.getAttribute("data-val") || !0, T = E._fullLayout._subplots.gl3d || [], z = {}, F = M.split("."), U = 0; U < T.length; U++) z[T[U] + "." + F[1]] = O;
          var V = O === "pan" ? O : "zoom";
          z.dragmode = V, l.call("_guiRelayout", E, z);
        }
        function m(E, P) {
          for (var I = P.currentTarget.getAttribute("data-attr"), M = I === "resetLastSave", O = I === "resetDefault", T = E._fullLayout, z = T._subplots.gl3d || [], F = {}, U = 0; U < z.length; U++) {
            var V, $ = z[U], q = $ + ".camera", K = $ + ".aspectratio", re = $ + ".aspectmode", Y = T[$]._scene;
            M ? (F[q + ".up"] = Y.viewInitial.up, F[q + ".eye"] = Y.viewInitial.eye, F[q + ".center"] = Y.viewInitial.center, V = !0) : O && (F[q + ".up"] = null, F[q + ".eye"] = null, F[q + ".center"] = null, V = !0), V && (F[K + ".x"] = Y.viewInitial.aspectratio.x, F[K + ".y"] = Y.viewInitial.aspectratio.y, F[K + ".z"] = Y.viewInitial.aspectratio.z, F[re] = Y.viewInitial.aspectmode);
          }
          l.call("_guiRelayout", E, F);
        }
        function x(E, P) {
          var I = P.currentTarget, M = I._previousVal, O = E._fullLayout, T = O._subplots.gl3d || [], z = ["xaxis", "yaxis", "zaxis"], F = {}, U = {};
          if (M) U = M, I._previousVal = null;
          else {
            for (var V = 0; V < T.length; V++) {
              var $ = T[V], q = O[$], K = $ + ".hovermode";
              F[K] = q.hovermode, U[K] = !1;
              for (var re = 0; re < 3; re++) {
                var Y = z[re], te = $ + "." + Y + ".showspikes";
                U[te] = !1, F[te] = q[Y].showspikes;
              }
            }
            I._previousVal = F;
          }
          return U;
        }
        function w(E, P) {
          for (var I = P.currentTarget, M = I.getAttribute("data-attr"), O = I.getAttribute("data-val") || !0, T = E._fullLayout, z = T._subplots.geo || [], F = 0; F < z.length; F++) {
            var U = z[F], V = T[U];
            if (M === "zoom") {
              var $ = V.projection.scale, q = O === "in" ? 2 * $ : 0.5 * $;
              l.call("_guiRelayout", E, U + ".projection.scale", q);
            }
          }
          M === "reset" && L(E, "geo");
        }
        function k(E) {
          var P = E._fullLayout;
          return !P.hovermode && (P._has("cartesian") ? P._isHoriz ? "y" : "x" : "closest");
        }
        function S(E) {
          var P = k(E);
          l.call("_guiRelayout", E, "hovermode", P);
        }
        function A(E, P) {
          D(E, P, "mapbox");
        }
        function C(E, P) {
          D(E, P, "map");
        }
        function D(E, P, I) {
          for (var M = P.currentTarget.getAttribute("data-val"), O = E._fullLayout, T = O._subplots[I] || [], z = {}, F = 0; F < T.length; F++) {
            var U = T[F], V = O[U].zoom, $ = M === "in" ? 1.05 * V : V / 1.05;
            z[U + ".zoom"] = $;
          }
          l.call("_guiRelayout", E, z);
        }
        function L(E, P) {
          for (var I = E._fullLayout, M = I._subplots[P] || [], O = {}, T = 0; T < M.length; T++) for (var z = M[T], F = I[z]._subplot.viewInitial, U = Object.keys(F), V = 0; V < U.length; V++) {
            var $ = U[V];
            O[z + "." + $] = F[$];
          }
          l.call("_guiRelayout", E, O);
        }
        f.toImage = { name: "toImage", title: function(E) {
          var P = (E._context.toImageButtonOptions || {}).format || "png";
          return d(E, P === "png" ? "Download plot as a png" : "Download plot");
        }, icon: h.camera, click: function(E) {
          var P = E._context.toImageButtonOptions, I = { format: P.format || "png" };
          _.notifier(d(E, "Taking snapshot - this may take a few seconds"), "long"), I.format !== "svg" && _.isIE() && (_.notifier(d(E, "IE only supports svg.  Changing format to svg."), "long"), I.format = "svg"), ["filename", "width", "height", "scale"].forEach(function(M) {
            M in P && (I[M] = P[M]);
          }), l.call("downloadImage", E, I).then(function(M) {
            _.notifier(d(E, "Snapshot succeeded") + " - " + M, "long");
          }).catch(function() {
            _.notifier(d(E, "Sorry, there was a problem downloading your snapshot!"), "long");
          });
        } }, f.sendDataToCloud = { name: "sendDataToCloud", title: function(E) {
          return d(E, "Edit in Chart Studio");
        }, icon: h.disk, click: function(E) {
          u.sendDataToCloud(E);
        } }, f.editInChartStudio = { name: "editInChartStudio", title: function(E) {
          return d(E, "Edit in Chart Studio");
        }, icon: h.pencil, click: function(E) {
          u.sendDataToCloud(E);
        } }, f.zoom2d = { name: "zoom2d", _cat: "zoom", title: function(E) {
          return d(E, "Zoom");
        }, attr: "dragmode", val: "zoom", icon: h.zoombox, click: c }, f.pan2d = { name: "pan2d", _cat: "pan", title: function(E) {
          return d(E, "Pan");
        }, attr: "dragmode", val: "pan", icon: h.pan, click: c }, f.select2d = { name: "select2d", _cat: "select", title: function(E) {
          return d(E, "Box Select");
        }, attr: "dragmode", val: "select", icon: h.selectbox, click: c }, f.lasso2d = { name: "lasso2d", _cat: "lasso", title: function(E) {
          return d(E, "Lasso Select");
        }, attr: "dragmode", val: "lasso", icon: h.lasso, click: c }, f.drawclosedpath = { name: "drawclosedpath", title: function(E) {
          return d(E, "Draw closed freeform");
        }, attr: "dragmode", val: "drawclosedpath", icon: h.drawclosedpath, click: c }, f.drawopenpath = { name: "drawopenpath", title: function(E) {
          return d(E, "Draw open freeform");
        }, attr: "dragmode", val: "drawopenpath", icon: h.drawopenpath, click: c }, f.drawline = { name: "drawline", title: function(E) {
          return d(E, "Draw line");
        }, attr: "dragmode", val: "drawline", icon: h.drawline, click: c }, f.drawrect = { name: "drawrect", title: function(E) {
          return d(E, "Draw rectangle");
        }, attr: "dragmode", val: "drawrect", icon: h.drawrect, click: c }, f.drawcircle = { name: "drawcircle", title: function(E) {
          return d(E, "Draw circle");
        }, attr: "dragmode", val: "drawcircle", icon: h.drawcircle, click: c }, f.eraseshape = { name: "eraseshape", title: function(E) {
          return d(E, "Erase active shape");
        }, icon: h.eraseshape, click: p }, f.zoomIn2d = { name: "zoomIn2d", _cat: "zoomin", title: function(E) {
          return d(E, "Zoom in");
        }, attr: "zoom", val: "in", icon: h.zoom_plus, click: c }, f.zoomOut2d = { name: "zoomOut2d", _cat: "zoomout", title: function(E) {
          return d(E, "Zoom out");
        }, attr: "zoom", val: "out", icon: h.zoom_minus, click: c }, f.autoScale2d = { name: "autoScale2d", _cat: "autoscale", title: function(E) {
          return d(E, "Autoscale");
        }, attr: "zoom", val: "auto", icon: h.autoscale, click: c }, f.resetScale2d = { name: "resetScale2d", _cat: "resetscale", title: function(E) {
          return d(E, "Reset axes");
        }, attr: "zoom", val: "reset", icon: h.home, click: c }, f.hoverClosestCartesian = { name: "hoverClosestCartesian", _cat: "hoverclosest", title: function(E) {
          return d(E, "Show closest data on hover");
        }, attr: "hovermode", val: "closest", icon: h.tooltip_basic, gravity: "ne", click: c }, f.hoverCompareCartesian = { name: "hoverCompareCartesian", _cat: "hoverCompare", title: function(E) {
          return d(E, "Compare data on hover");
        }, attr: "hovermode", val: function(E) {
          return E._fullLayout._isHoriz ? "y" : "x";
        }, icon: h.tooltip_compare, gravity: "ne", click: c }, f.zoom3d = { name: "zoom3d", _cat: "zoom", title: function(E) {
          return d(E, "Zoom");
        }, attr: "scene.dragmode", val: "zoom", icon: h.zoombox, click: g }, f.pan3d = { name: "pan3d", _cat: "pan", title: function(E) {
          return d(E, "Pan");
        }, attr: "scene.dragmode", val: "pan", icon: h.pan, click: g }, f.orbitRotation = { name: "orbitRotation", title: function(E) {
          return d(E, "Orbital rotation");
        }, attr: "scene.dragmode", val: "orbit", icon: h["3d_rotate"], click: g }, f.tableRotation = { name: "tableRotation", title: function(E) {
          return d(E, "Turntable rotation");
        }, attr: "scene.dragmode", val: "turntable", icon: h["z-axis"], click: g }, f.resetCameraDefault3d = { name: "resetCameraDefault3d", _cat: "resetCameraDefault", title: function(E) {
          return d(E, "Reset camera to default");
        }, attr: "resetDefault", icon: h.home, click: m }, f.resetCameraLastSave3d = { name: "resetCameraLastSave3d", _cat: "resetCameraLastSave", title: function(E) {
          return d(E, "Reset camera to last save");
        }, attr: "resetLastSave", icon: h.movie, click: m }, f.hoverClosest3d = { name: "hoverClosest3d", _cat: "hoverclosest", title: function(E) {
          return d(E, "Toggle show closest data on hover");
        }, attr: "hovermode", val: null, toggle: !0, icon: h.tooltip_basic, gravity: "ne", click: function(E, P) {
          var I = x(E, P);
          l.call("_guiRelayout", E, I);
        } }, f.zoomInGeo = { name: "zoomInGeo", _cat: "zoomin", title: function(E) {
          return d(E, "Zoom in");
        }, attr: "zoom", val: "in", icon: h.zoom_plus, click: w }, f.zoomOutGeo = { name: "zoomOutGeo", _cat: "zoomout", title: function(E) {
          return d(E, "Zoom out");
        }, attr: "zoom", val: "out", icon: h.zoom_minus, click: w }, f.resetGeo = { name: "resetGeo", _cat: "reset", title: function(E) {
          return d(E, "Reset");
        }, attr: "reset", val: null, icon: h.autoscale, click: w }, f.hoverClosestGeo = { name: "hoverClosestGeo", _cat: "hoverclosest", title: function(E) {
          return d(E, "Toggle show closest data on hover");
        }, attr: "hovermode", val: null, toggle: !0, icon: h.tooltip_basic, gravity: "ne", click: S }, f.hoverClosestGl2d = { name: "hoverClosestGl2d", _cat: "hoverclosest", title: function(E) {
          return d(E, "Toggle show closest data on hover");
        }, attr: "hovermode", val: null, toggle: !0, icon: h.tooltip_basic, gravity: "ne", click: S }, f.hoverClosestPie = { name: "hoverClosestPie", _cat: "hoverclosest", title: function(E) {
          return d(E, "Toggle show closest data on hover");
        }, attr: "hovermode", val: "closest", icon: h.tooltip_basic, gravity: "ne", click: S }, f.resetViewSankey = { name: "resetSankeyGroup", title: function(E) {
          return d(E, "Reset view");
        }, icon: h.home, click: function(E) {
          for (var P = { "node.groups": [], "node.x": [], "node.y": [] }, I = 0; I < E._fullData.length; I++) {
            var M = E._fullData[I]._viewInitial;
            P["node.groups"].push(M.node.groups.slice()), P["node.x"].push(M.node.x.slice()), P["node.y"].push(M.node.y.slice());
          }
          l.call("restyle", E, P);
        } }, f.toggleHover = { name: "toggleHover", title: function(E) {
          return d(E, "Toggle show closest data on hover");
        }, attr: "hovermode", val: null, toggle: !0, icon: h.tooltip_basic, gravity: "ne", click: function(E, P) {
          var I = x(E, P);
          I.hovermode = k(E), l.call("_guiRelayout", E, I);
        } }, f.resetViews = { name: "resetViews", title: function(E) {
          return d(E, "Reset views");
        }, icon: h.home, click: function(E, P) {
          var I = P.currentTarget;
          I.setAttribute("data-attr", "zoom"), I.setAttribute("data-val", "reset"), c(E, P), I.setAttribute("data-attr", "resetLastSave"), m(E, P), L(E, "geo"), L(E, "mapbox"), L(E, "map");
        } }, f.toggleSpikelines = { name: "toggleSpikelines", title: function(E) {
          return d(E, "Toggle Spike Lines");
        }, icon: h.spikeline, attr: "_cartesianSpikesEnabled", val: "on", click: function(E) {
          var P = E._fullLayout, I = P._cartesianSpikesEnabled;
          P._cartesianSpikesEnabled = I === "on" ? "off" : "on", l.call("_guiRelayout", E, function(M) {
            for (var O = M._fullLayout._cartesianSpikesEnabled === "on", T = i.list(M, null, !0), z = {}, F = 0; F < T.length; F++) {
              var U = T[F];
              z[U._name + ".showspikes"] = !!O || U._showSpikeInitial;
            }
            return z;
          }(E));
        } }, f.resetViewMapbox = { name: "resetViewMapbox", _cat: "resetView", title: function(E) {
          return d(E, "Reset view");
        }, attr: "reset", icon: h.home, click: function(E) {
          L(E, "mapbox");
        } }, f.resetViewMap = { name: "resetViewMap", _cat: "resetView", title: function(E) {
          return d(E, "Reset view");
        }, attr: "reset", icon: h.home, click: function(E) {
          L(E, "map");
        } }, f.zoomInMapbox = { name: "zoomInMapbox", _cat: "zoomin", title: function(E) {
          return d(E, "Zoom in");
        }, attr: "zoom", val: "in", icon: h.zoom_plus, click: A }, f.zoomInMap = { name: "zoomInMap", _cat: "zoomin", title: function(E) {
          return d(E, "Zoom in");
        }, attr: "zoom", val: "in", icon: h.zoom_plus, click: C }, f.zoomOutMapbox = { name: "zoomOutMapbox", _cat: "zoomout", title: function(E) {
          return d(E, "Zoom out");
        }, attr: "zoom", val: "out", icon: h.zoom_minus, click: A }, f.zoomOutMap = { name: "zoomOutMap", _cat: "zoomout", title: function(E) {
          return d(E, "Zoom out");
        }, attr: "zoom", val: "out", icon: h.zoom_minus, click: C };
      }, 87632: function(o, s, n) {
        var l = n(5832), u = Object.keys(l), i = ["drawline", "drawopenpath", "drawclosedpath", "drawcircle", "drawrect", "eraseshape"], h = ["v1hovermode", "hoverclosest", "hovercompare", "togglehover", "togglespikelines"].concat(i), p = [];
        u.forEach(function(_) {
          (function(d) {
            if (h.indexOf(d._cat || d.name) === -1) {
              var f = d.name, c = (d._cat || d.name).toLowerCase();
              p.indexOf(f) === -1 && p.push(f), p.indexOf(c) === -1 && p.push(c);
            }
          })(l[_]);
        }), p.sort(), o.exports = { DRAW_MODES: i, backButtons: h, foreButtons: p };
      }, 17683: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(78032), h = n(50308);
        o.exports = function(p, _) {
          var d = p.modebar || {}, f = i.newContainer(_, "modebar");
          function c(m, x) {
            return l.coerce(d, f, h, m, x);
          }
          c("orientation"), c("bgcolor", u.addOpacity(_.paper_bgcolor, 0.5));
          var g = u.contrast(u.rgb(_.modebar.bgcolor));
          c("color", u.addOpacity(g, 0.3)), c("activecolor", u.addOpacity(g, 0.7)), c("uirevision", _.uirevision), c("add"), c("remove");
        };
      }, 95433: function(o, s, n) {
        o.exports = { moduleType: "component", name: "modebar", layoutAttributes: n(50308), supplyLayoutDefaults: n(17683), manage: n(75442) };
      }, 75442: function(o, s, n) {
        var l = n(5975), u = n(64726), i = n(33626), h = n(36040).isUnifiedHover, p = n(85393), _ = n(5832), d = n(87632).DRAW_MODES, f = n(34809).extendDeep;
        o.exports = function(c) {
          var g = c._fullLayout, m = c._context, x = g._modeBar;
          if (m.displayModeBar || m.watermark) {
            if (!Array.isArray(m.modeBarButtonsToRemove)) throw new Error(["*modeBarButtonsToRemove* configuration options", "must be an array."].join(" "));
            if (!Array.isArray(m.modeBarButtonsToAdd)) throw new Error(["*modeBarButtonsToAdd* configuration options", "must be an array."].join(" "));
            var w, k = m.modeBarButtons;
            w = Array.isArray(k) && k.length ? function(S) {
              for (var A = f([], S), C = 0; C < A.length; C++) for (var D = A[C], L = 0; L < D.length; L++) {
                var E = D[L];
                if (typeof E == "string") {
                  if (_[E] === void 0) throw new Error(["*modeBarButtons* configuration options", "invalid button name"].join(" "));
                  A[C][L] = _[E];
                }
              }
              return A;
            }(k) : !m.displayModeBar && m.watermark ? [] : function(S) {
              var A = S._fullLayout, C = S._fullData, D = S._context;
              function L(Ae, Se) {
                if (typeof Se == "string") {
                  if (Se.toLowerCase() === Ae.toLowerCase()) return !0;
                } else {
                  var Me = Se.name, De = Se._cat || Se.name;
                  if (Me === Ae || De === Ae.toLowerCase()) return !0;
                }
                return !1;
              }
              var E = A.modebar.add;
              typeof E == "string" && (E = [E]);
              var P = A.modebar.remove;
              typeof P == "string" && (P = [P]);
              var I = D.modeBarButtonsToAdd.concat(E.filter(function(Ae) {
                for (var Se = 0; Se < D.modeBarButtonsToRemove.length; Se++) if (L(Ae, D.modeBarButtonsToRemove[Se])) return !1;
                return !0;
              })), M = D.modeBarButtonsToRemove.concat(P.filter(function(Ae) {
                for (var Se = 0; Se < D.modeBarButtonsToAdd.length; Se++) if (L(Ae, D.modeBarButtonsToAdd[Se])) return !1;
                return !0;
              })), O = A._has("cartesian"), T = A._has("gl3d"), z = A._has("geo"), F = A._has("pie"), U = A._has("funnelarea"), V = A._has("gl2d"), $ = A._has("ternary"), q = A._has("mapbox"), K = A._has("map"), re = A._has("polar"), Y = A._has("smith"), te = A._has("sankey"), ee = function(Ae) {
                for (var Se = l.list({ _fullLayout: Ae }, null, !0), Me = 0; Me < Se.length; Me++) if (!Se[Me].fixedrange) return !1;
                return !0;
              }(A), X = h(A.hovermode), Q = [];
              function ue(Ae) {
                if (Ae.length) {
                  for (var Se = [], Me = 0; Me < Ae.length; Me++) {
                    for (var De = Ae[Me], Le = _[De], We = Le.name.toLowerCase(), Ee = (Le._cat || Le.name).toLowerCase(), Ne = !1, Ie = 0; Ie < M.length; Ie++) {
                      var ge = M[Ie].toLowerCase();
                      if (ge === We || ge === Ee) {
                        Ne = !0;
                        break;
                      }
                    }
                    Ne || Se.push(_[De]);
                  }
                  Q.push(Se);
                }
              }
              var ce = ["toImage"];
              D.showEditInChartStudio ? ce.push("editInChartStudio") : D.showSendToCloud && ce.push("sendDataToCloud"), ue(ce);
              var he = [], de = [], ne = [], ae = [];
              (O || V || F || U || $) + z + T + q + K + re + Y > 1 ? (de = ["toggleHover"], ne = ["resetViews"]) : z ? (he = ["zoomInGeo", "zoomOutGeo"], de = ["hoverClosestGeo"], ne = ["resetGeo"]) : T ? (de = ["hoverClosest3d"], ne = ["resetCameraDefault3d", "resetCameraLastSave3d"]) : q ? (he = ["zoomInMapbox", "zoomOutMapbox"], de = ["toggleHover"], ne = ["resetViewMapbox"]) : K ? (he = ["zoomInMap", "zoomOutMap"], de = ["toggleHover"], ne = ["resetViewMap"]) : V ? de = ["hoverClosestGl2d"] : F ? de = ["hoverClosestPie"] : te ? (de = ["hoverClosestCartesian", "hoverCompareCartesian"], ne = ["resetViewSankey"]) : de = ["toggleHover"], O && de.push("toggleSpikelines", "hoverClosestCartesian", "hoverCompareCartesian"), (function(Ae) {
                for (var Se = 0; Se < Ae.length; Se++) if (!i.traceIs(Ae[Se], "noHover")) return !1;
                return !0;
              }(C) || X) && (de = []), !O && !V || ee || (he = ["zoomIn2d", "zoomOut2d", "autoScale2d"], ne[0] !== "resetViews" && (ne = ["resetScale2d"])), T ? ae = ["zoom3d", "pan3d", "orbitRotation", "tableRotation"] : (O || V) && !ee || $ ? ae = ["zoom2d", "pan2d"] : q || K || z ? ae = ["pan2d"] : re && (ae = ["zoom2d"]), function(Ae) {
                for (var Se = !1, Me = 0; Me < Ae.length && !Se; Me++) {
                  var De = Ae[Me];
                  De._module && De._module.selectPoints && (i.traceIs(De, "scatter-like") ? (u.hasMarkers(De) || u.hasText(De)) && (Se = !0) : i.traceIs(De, "box-violin") && De.boxpoints !== "all" && De.points !== "all" || (Se = !0));
                }
                return Se;
              }(C) && ae.push("select2d", "lasso2d");
              var se = [], me = function(Ae) {
                se.indexOf(Ae) === -1 && de.indexOf(Ae) !== -1 && se.push(Ae);
              };
              if (Array.isArray(I)) {
                for (var ye = [], pe = 0; pe < I.length; pe++) {
                  var be = I[pe];
                  typeof be == "string" ? (be = be.toLowerCase(), d.indexOf(be) !== -1 ? (A._has("mapbox") || A._has("map") || A._has("cartesian")) && ae.push(be) : be === "togglespikelines" ? me("toggleSpikelines") : be === "togglehover" ? me("toggleHover") : be === "hovercompare" ? me("hoverCompareCartesian") : be === "hoverclosest" ? (me("hoverClosestCartesian"), me("hoverClosestGeo"), me("hoverClosest3d"), me("hoverClosestGl2d"), me("hoverClosestPie")) : be === "v1hovermode" && (me("hoverClosestCartesian"), me("hoverCompareCartesian"), me("hoverClosestGeo"), me("hoverClosest3d"), me("hoverClosestGl2d"), me("hoverClosestPie"))) : ye.push(be);
                }
                I = ye;
              }
              return ue(ae), ue(he.concat(ne)), ue(se), function(Ae, Se) {
                if (Se.length) if (Array.isArray(Se[0])) for (var Me = 0; Me < Se.length; Me++) Ae.push(Se[Me]);
                else Ae.push(Se);
                return Ae;
              }(Q, I);
            }(c), x ? x.update(c, w) : g._modeBar = p(c, w);
          } else x && (x.destroy(), delete g._modeBar);
        };
      }, 85393: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(34809), h = n(35188), p = n(29697).version, _ = new DOMParser();
        function d(c) {
          this.container = c.container, this.element = document.createElement("div"), this.update(c.graphInfo, c.buttons), this.container.appendChild(this.element);
        }
        var f = d.prototype;
        f.update = function(c, g) {
          this.graphInfo = c;
          var m = this.graphInfo._context, x = this.graphInfo._fullLayout, w = "modebar-" + x._uid;
          this.element.setAttribute("id", w), this._uid = w, this.element.className = "modebar", m.displayModeBar === "hover" && (this.element.className += " modebar--hover ease-bg"), x.modebar.orientation === "v" && (this.element.className += " vertical", g = g.reverse());
          var k = x.modebar, S = m.displayModeBar === "hover" ? ".js-plotly-plot .plotly:hover " : "";
          i.deleteRelatedStyleRule(w), i.addRelatedStyleRule(w, S + "#" + w + " .modebar-group", "background-color: " + k.bgcolor), i.addRelatedStyleRule(w, "#" + w + " .modebar-btn .icon path", "fill: " + k.color), i.addRelatedStyleRule(w, "#" + w + " .modebar-btn:hover .icon path", "fill: " + k.activecolor), i.addRelatedStyleRule(w, "#" + w + " .modebar-btn.active .icon path", "fill: " + k.activecolor);
          var A = !this.hasButtons(g), C = this.hasLogo !== m.displaylogo, D = this.locale !== m.locale;
          if (this.locale = m.locale, (A || C || D) && (this.removeAllButtons(), this.updateButtons(g), m.watermark || m.displaylogo)) {
            var L = this.getLogo();
            m.watermark && (L.className = L.className + " watermark"), x.modebar.orientation === "v" ? this.element.insertBefore(L, this.element.childNodes[0]) : this.element.appendChild(L), this.hasLogo = !0;
          }
          this.updateActiveButton();
        }, f.updateButtons = function(c) {
          var g = this;
          this.buttons = c, this.buttonElements = [], this.buttonsNames = [], this.buttons.forEach(function(m) {
            var x = g.createGroup();
            m.forEach(function(w) {
              var k = w.name;
              if (!k) throw new Error("must provide button 'name' in button config");
              if (g.buttonsNames.indexOf(k) !== -1) throw new Error("button name '" + k + "' is taken");
              g.buttonsNames.push(k);
              var S = g.createButton(w);
              g.buttonElements.push(S), x.appendChild(S);
            }), g.element.appendChild(x);
          });
        }, f.createGroup = function() {
          var c = document.createElement("div");
          return c.className = "modebar-group", c;
        }, f.createButton = function(c) {
          var g = this, m = document.createElement("a");
          m.setAttribute("rel", "tooltip"), m.className = "modebar-btn";
          var x = c.title;
          x === void 0 ? x = c.name : typeof x == "function" && (x = x(this.graphInfo)), (x || x === 0) && m.setAttribute("data-title", x), c.attr !== void 0 && m.setAttribute("data-attr", c.attr);
          var w = c.val;
          if (w !== void 0 && (typeof w == "function" && (w = w(this.graphInfo)), m.setAttribute("data-val", w)), typeof c.click != "function") throw new Error("must provide button 'click' function in button config");
          m.addEventListener("click", function(S) {
            c.click(g.graphInfo, S), g.updateActiveButton(S.currentTarget);
          }), m.setAttribute("data-toggle", c.toggle || !1), c.toggle && l.select(m).classed("active", !0);
          var k = c.icon;
          return typeof k == "function" ? m.appendChild(k()) : m.appendChild(this.createIcon(k || h.question)), m.setAttribute("data-gravity", c.gravity || "n"), m;
        }, f.createIcon = function(c) {
          var g, m = u(c.height) ? Number(c.height) : c.ascent - c.descent, x = "http://www.w3.org/2000/svg";
          if (c.path) {
            (g = document.createElementNS(x, "svg")).setAttribute("viewBox", [0, 0, c.width, m].join(" ")), g.setAttribute("class", "icon");
            var w = document.createElementNS(x, "path");
            w.setAttribute("d", c.path), c.transform ? w.setAttribute("transform", c.transform) : c.ascent !== void 0 && w.setAttribute("transform", "matrix(1 0 0 -1 0 " + c.ascent + ")"), g.appendChild(w);
          }
          return c.svg && (g = _.parseFromString(c.svg, "application/xml").childNodes[0]), g.setAttribute("height", "1em"), g.setAttribute("width", "1em"), g;
        }, f.updateActiveButton = function(c) {
          var g = this.graphInfo._fullLayout, m = c !== void 0 ? c.getAttribute("data-attr") : null;
          this.buttonElements.forEach(function(x) {
            var w = x.getAttribute("data-val") || !0, k = x.getAttribute("data-attr"), S = x.getAttribute("data-toggle") === "true", A = l.select(x);
            if (S) k === m && A.classed("active", !A.classed("active"));
            else {
              var C = k === null ? k : i.nestedProperty(g, k).get();
              A.classed("active", C === w);
            }
          });
        }, f.hasButtons = function(c) {
          var g = this.buttons;
          if (!g || c.length !== g.length) return !1;
          for (var m = 0; m < c.length; ++m) {
            if (c[m].length !== g[m].length) return !1;
            for (var x = 0; x < c[m].length; x++) if (c[m][x].name !== g[m][x].name) return !1;
          }
          return !0;
        }, f.getLogo = function() {
          var c = this.createGroup(), g = document.createElement("a");
          return g.href = "https://plotly.com/", g.target = "_blank", g.setAttribute("data-title", i._(this.graphInfo, "Produced with Plotly.js") + " (v" + p + ")"), g.className = "modebar-btn plotlyjsicon modebar-btn--logo", g.appendChild(this.createIcon(h.newplotlylogo)), c.appendChild(g), c;
        }, f.removeAllButtons = function() {
          for (; this.element.firstChild; ) this.element.removeChild(this.element.firstChild);
          this.hasLogo = !1;
        }, f.destroy = function() {
          i.removeElement(this.container.querySelector(".modebar")), i.deleteRelatedStyleRule(this._uid);
        }, o.exports = function(c, g) {
          var m = c._fullLayout, x = new d({ graphInfo: c, container: m._modebardiv.node(), buttons: g });
          return m._privateplot && l.select(x.element).append("span").classed("badge-private float--left", !0).text("PRIVATE"), x;
        };
      }, 91032: function(o, s, n) {
        var l = n(80337), u = n(10229), i = (0, n(78032).templatedArray)("button", { visible: { valType: "boolean", dflt: !0, editType: "plot" }, step: { valType: "enumerated", values: ["month", "year", "day", "hour", "minute", "second", "all"], dflt: "month", editType: "plot" }, stepmode: { valType: "enumerated", values: ["backward", "todate"], dflt: "backward", editType: "plot" }, count: { valType: "number", min: 0, dflt: 1, editType: "plot" }, label: { valType: "string", editType: "plot" }, editType: "plot" });
        o.exports = { visible: { valType: "boolean", editType: "plot" }, buttons: i, x: { valType: "number", min: -2, max: 3, editType: "plot" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left", editType: "plot" }, y: { valType: "number", min: -2, max: 3, editType: "plot" }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "bottom", editType: "plot" }, font: l({ editType: "plot" }), bgcolor: { valType: "color", dflt: u.lightLine, editType: "plot" }, activecolor: { valType: "color", editType: "plot" }, bordercolor: { valType: "color", dflt: u.defaultLine, editType: "plot" }, borderwidth: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "plot" };
      }, 68508: function(o) {
        o.exports = { yPad: 0.02, minButtonWidth: 30, rx: 3, ry: 3, lightAmount: 25, darkAmount: 10 };
      }, 86255: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(78032), h = n(59008), p = n(91032), _ = n(68508);
        function d(f, c, g, m) {
          var x = m.calendar;
          function w(S, A) {
            return l.coerce(f, c, p.buttons, S, A);
          }
          if (w("visible")) {
            var k = w("step");
            k !== "all" && (!x || x === "gregorian" || k !== "month" && k !== "year" ? w("stepmode") : c.stepmode = "backward", w("count")), w("label");
          }
        }
        o.exports = function(f, c, g, m, x) {
          var w = f.rangeselector || {}, k = i.newContainer(c, "rangeselector");
          function S(D, L) {
            return l.coerce(w, k, p, D, L);
          }
          if (S("visible", h(w, k, { name: "buttons", handleItemDefaults: d, calendar: x }).length > 0)) {
            var A = function(D, L, E) {
              for (var P = E.filter(function(T) {
                return L[T].anchor === D._id;
              }), I = 0, M = 0; M < P.length; M++) {
                var O = L[P[M]].domain;
                O && (I = Math.max(O[1], I));
              }
              return [D.domain[0], I + _.yPad];
            }(c, g, m);
            S("x", A[0]), S("y", A[1]), l.noneOrAll(f, c, ["x", "y"]), S("xanchor"), S("yanchor"), l.coerceFont(S, "font", g.font);
            var C = S("bgcolor");
            S("activecolor", u.contrast(C, _.lightAmount, _.darkAmount)), S("bordercolor"), S("borderwidth");
          }
        };
      }, 45431: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(44122), h = n(78766), p = n(62203), _ = n(34809), d = _.strTranslate, f = n(30635), c = n(5975), g = n(4530), m = g.LINE_SPACING, x = g.FROM_TL, w = g.FROM_BR, k = n(68508), S = n(16383);
        function A(L) {
          return L._id;
        }
        function C(L, E, P) {
          var I = _.ensureSingle(L, "rect", "selector-rect", function(M) {
            M.attr("shape-rendering", "crispEdges");
          });
          I.attr({ rx: k.rx, ry: k.ry }), I.call(h.stroke, E.bordercolor).call(h.fill, function(M, O) {
            return O._isActive || O._isHovered ? M.activecolor : M.bgcolor;
          }(E, P)).style("stroke-width", E.borderwidth + "px");
        }
        function D(L, E, P, I) {
          var M, O;
          _.ensureSingle(L, "text", "selector-text", function(T) {
            T.attr("text-anchor", "middle");
          }).call(p.font, E.font).text((M = P, O = I._fullLayout._meta, M.label ? O ? _.templateString(M.label, O) : M.label : M.step === "all" ? "all" : M.count + M.step.charAt(0))).call(function(T) {
            f.convertToTspans(T, I);
          });
        }
        o.exports = function(L) {
          var E = L._fullLayout._infolayer.selectAll(".rangeselector").data(function(P) {
            for (var I = c.list(P, "x", !0), M = [], O = 0; O < I.length; O++) {
              var T = I[O];
              T.rangeselector && T.rangeselector.visible && M.push(T);
            }
            return M;
          }(L), A);
          E.enter().append("g").classed("rangeselector", !0), E.exit().remove(), E.style({ cursor: "pointer", "pointer-events": "all" }), E.each(function(P) {
            var I = l.select(this), M = P, O = M.rangeselector, T = I.selectAll("g.button").data(_.filterVisible(O.buttons));
            T.enter().append("g").classed("button", !0), T.exit().remove(), T.each(function(z) {
              var F = l.select(this), U = S(M, z);
              z._isActive = function(V, $, q) {
                if ($.step === "all") return V.autorange === !0;
                var K = Object.keys(q);
                return V.range[0] === q[K[0]] && V.range[1] === q[K[1]];
              }(M, z, U), F.call(C, O, z), F.call(D, O, z, L), F.on("click", function() {
                L._dragged || u.call("_guiRelayout", L, U);
              }), F.on("mouseover", function() {
                z._isHovered = !0, F.call(C, O, z);
              }), F.on("mouseout", function() {
                z._isHovered = !1, F.call(C, O, z);
              });
            }), function(z, F, U, V, $) {
              var q = 0, K = 0, re = U.borderwidth;
              F.each(function() {
                var ue = l.select(this).select(".selector-text"), ce = U.font.size * m, he = Math.max(ce * f.lineCount(ue), 16) + 3;
                K = Math.max(K, he);
              }), F.each(function() {
                var ue = l.select(this), ce = ue.select(".selector-rect"), he = ue.select(".selector-text"), de = he.node() && p.bBox(he.node()).width, ne = U.font.size * m, ae = f.lineCount(he), se = Math.max(de + 10, k.minButtonWidth);
                ue.attr("transform", d(re + q, re)), ce.attr({ x: 0, y: 0, width: se, height: K }), f.positionText(he, se / 2, K / 2 - (ae - 1) * ne / 2 + 3), q += se + 5;
              });
              var Y = z._fullLayout._size, te = Y.l + Y.w * U.x, ee = Y.t + Y.h * (1 - U.y), X = "left";
              _.isRightAnchor(U) && (te -= q, X = "right"), _.isCenterAnchor(U) && (te -= q / 2, X = "center");
              var Q = "top";
              _.isBottomAnchor(U) && (ee -= K, Q = "bottom"), _.isMiddleAnchor(U) && (ee -= K / 2, Q = "middle"), q = Math.ceil(q), K = Math.ceil(K), te = Math.round(te), ee = Math.round(ee), i.autoMargin(z, V + "-range-selector", { x: U.x, y: U.y, l: q * x[X], r: q * w[X], b: K * w[Q], t: K * x[Q] }), $.attr("transform", d(te, ee));
            }(L, T, O, M._name, I);
          });
        };
      }, 16383: function(o, s, n) {
        var l = n(50936), u = n(34809).titleCase;
        o.exports = function(i, h) {
          var p = i._name, _ = {};
          if (h.step === "all") _[p + ".autorange"] = !0;
          else {
            var d = function(f, c) {
              var g, m = f.range, x = new Date(f.r2l(m[1])), w = c.step, k = l["utc" + u(w)], S = c.count;
              switch (c.stepmode) {
                case "backward":
                  g = f.l2r(+k.offset(x, -S));
                  break;
                case "todate":
                  var A = k.offset(x, -S);
                  g = f.l2r(+k.ceil(A));
              }
              return [g, m[1]];
            }(i, h);
            _[p + ".range[0]"] = d[0], _[p + ".range[1]"] = d[1];
          }
          return _;
        };
      }, 44453: function(o, s, n) {
        o.exports = { moduleType: "component", name: "rangeselector", schema: { subplots: { xaxis: { rangeselector: n(91032) } } }, layoutAttributes: n(91032), handleDefaults: n(86255), draw: n(45431) };
      }, 63608: function(o, s, n) {
        var l = n(10229);
        o.exports = { bgcolor: { valType: "color", dflt: l.background, editType: "plot" }, bordercolor: { valType: "color", dflt: l.defaultLine, editType: "plot" }, borderwidth: { valType: "integer", dflt: 0, min: 0, editType: "plot" }, autorange: { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, range: { valType: "info_array", items: [{ valType: "any", editType: "calc", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "calc", impliedEdits: { "^autorange": !1 } }], editType: "calc", impliedEdits: { autorange: !1 } }, thickness: { valType: "number", dflt: 0.15, min: 0, max: 1, editType: "plot" }, visible: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" };
      }, 46223: function(o, s, n) {
        var l = n(5975).list, u = n(32919).getAutoRange, i = n(20604);
        o.exports = function(h) {
          for (var p = l(h, "x", !0), _ = 0; _ < p.length; _++) {
            var d = p[_], f = d[i.name];
            f && f.visible && f.autorange && (f._input.autorange = !0, f._input.range = f.range = u(h, d));
          }
        };
      }, 20604: function(o) {
        o.exports = { name: "rangeslider", containerClassName: "rangeslider-container", bgClassName: "rangeslider-bg", rangePlotClassName: "rangeslider-rangeplot", maskMinClassName: "rangeslider-mask-min", maskMaxClassName: "rangeslider-mask-max", slideBoxClassName: "rangeslider-slidebox", grabberMinClassName: "rangeslider-grabber-min", grabAreaMinClassName: "rangeslider-grabarea-min", handleMinClassName: "rangeslider-handle-min", grabberMaxClassName: "rangeslider-grabber-max", grabAreaMaxClassName: "rangeslider-grabarea-max", handleMaxClassName: "rangeslider-handle-max", maskMinOppAxisClassName: "rangeslider-mask-min-opp-axis", maskMaxOppAxisClassName: "rangeslider-mask-max-opp-axis", maskColor: "rgba(0,0,0,0.4)", maskOppAxisColor: "rgba(0,0,0,0.2)", slideBoxFill: "transparent", slideBoxCursor: "ew-resize", grabAreaFill: "transparent", grabAreaCursor: "col-resize", grabAreaWidth: 10, handleWidth: 4, handleRadius: 1, handleStrokeWidth: 1, extraPad: 15 };
      }, 41295: function(o, s, n) {
        var l = n(34809), u = n(78032), i = n(5975), h = n(63608), p = n(66249);
        o.exports = function(_, d, f) {
          var c = _[f], g = d[f];
          if (c.rangeslider || d._requestRangeslider[g._id]) {
            l.isPlainObject(c.rangeslider) || (c.rangeslider = {});
            var m, x, w = c.rangeslider, k = u.newContainer(g, "rangeslider");
            if (I("visible")) {
              I("bgcolor", d.plot_bgcolor), I("bordercolor"), I("borderwidth"), I("thickness"), I("autorange", !g.isValidRange(w.range)), I("range");
              var S = d._subplots;
              if (S) for (var A = S.cartesian.filter(function(O) {
                return O.substr(0, O.indexOf("y")) === i.name2id(f);
              }).map(function(O) {
                return O.substr(O.indexOf("y"), O.length);
              }), C = l.simpleMap(A, i.id2name), D = 0; D < C.length; D++) {
                var L = C[D];
                m = w[L] || {}, x = u.newContainer(k, L, "yaxis");
                var E, P = d[L];
                m.range && P.isValidRange(m.range) && (E = "fixed"), M("rangemode", E) !== "match" && M("range", P.range.slice());
              }
              k._input = w;
            }
          }
          function I(O, T) {
            return l.coerce(w, k, h, O, T);
          }
          function M(O, T) {
            return l.coerce(m, x, p, O, T);
          }
        };
      }, 88887: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(44122), h = n(34809), p = h.strTranslate, _ = n(62203), d = n(78766), f = n(17240), c = n(37703), g = n(5975), m = n(14751), x = n(27983), w = n(20604);
        function k(P) {
          return typeof P.clientX == "number" ? P.clientX : P.touches && P.touches.length > 0 ? P.touches[0].clientX : 0;
        }
        function S(P, I, M, O) {
          var T = h.ensureSingle(P, "rect", w.bgClassName, function(V) {
            V.attr({ x: 0, y: 0, "shape-rendering": "crispEdges" });
          }), z = O.borderwidth % 2 == 0 ? O.borderwidth : O.borderwidth - 1, F = -O._offsetShift, U = _.crispRound(I, O.borderwidth);
          T.attr({ width: O._width + z, height: O._height + z, transform: p(F, F), "stroke-width": U }).call(d.stroke, O.bordercolor).call(d.fill, O.bgcolor);
        }
        function A(P, I, M, O) {
          var T = I._fullLayout;
          h.ensureSingleById(T._topdefs, "clipPath", O._clipId, function(z) {
            z.append("rect").attr({ x: 0, y: 0 });
          }).select("rect").attr({ width: O._width, height: O._height });
        }
        function C(P, I, M, O) {
          var T, z = I.calcdata, F = P.selectAll("g." + w.rangePlotClassName).data(M._subplotsWith, h.identity);
          F.enter().append("g").attr("class", function(U) {
            return w.rangePlotClassName + " " + U;
          }).call(_.setClipUrl, O._clipId, I), F.order(), F.exit().remove(), F.each(function(U, V) {
            var $ = l.select(this), q = V === 0, K = g.getFromId(I, U, "y"), re = K._name, Y = O[re], te = { data: [], layout: { xaxis: { type: M.type, domain: [0, 1], range: O.range.slice(), calendar: M.calendar }, width: O._width, height: O._height, margin: { t: 0, b: 0, l: 0, r: 0 } }, _context: I._context };
            M.rangebreaks && (te.layout.xaxis.rangebreaks = M.rangebreaks), te.layout[re] = { type: K.type, domain: [0, 1], range: Y.rangemode !== "match" ? Y.range.slice() : K.range.slice(), calendar: K.calendar }, K.rangebreaks && (te.layout[re].rangebreaks = K.rangebreaks), i.supplyDefaults(te);
            var ee = te._fullLayout.xaxis, X = te._fullLayout[re];
            ee.clearCalc(), ee.setScale(), X.clearCalc(), X.setScale();
            var Q = { id: U, plotgroup: $, xaxis: ee, yaxis: X, isRangePlot: !0 };
            q ? T = Q : (Q.mainplot = "xy", Q.mainplotinfo = T), c.rangePlot(I, Q, function(ue, ce) {
              for (var he = [], de = 0; de < ue.length; de++) {
                var ne = ue[de], ae = ne[0].trace;
                ae.xaxis + ae.yaxis === ce && he.push(ne);
              }
              return he;
            }(z, U));
          });
        }
        function D(P, I, M, O, T) {
          h.ensureSingle(P, "rect", w.maskMinClassName, function(z) {
            z.attr({ x: 0, y: 0, "shape-rendering": "crispEdges" });
          }).attr("height", O._height).call(d.fill, w.maskColor), h.ensureSingle(P, "rect", w.maskMaxClassName, function(z) {
            z.attr({ y: 0, "shape-rendering": "crispEdges" });
          }).attr("height", O._height).call(d.fill, w.maskColor), T.rangemode !== "match" && (h.ensureSingle(P, "rect", w.maskMinOppAxisClassName, function(z) {
            z.attr({ y: 0, "shape-rendering": "crispEdges" });
          }).attr("width", O._width).call(d.fill, w.maskOppAxisColor), h.ensureSingle(P, "rect", w.maskMaxOppAxisClassName, function(z) {
            z.attr({ y: 0, "shape-rendering": "crispEdges" });
          }).attr("width", O._width).style("border-top", w.maskOppBorder).call(d.fill, w.maskOppAxisColor));
        }
        function L(P, I, M, O) {
          I._context.staticPlot || h.ensureSingle(P, "rect", w.slideBoxClassName, function(T) {
            T.attr({ y: 0, cursor: w.slideBoxCursor, "shape-rendering": "crispEdges" });
          }).attr({ height: O._height, fill: w.slideBoxFill });
        }
        function E(P, I, M, O) {
          var T = h.ensureSingle(P, "g", w.grabberMinClassName), z = h.ensureSingle(P, "g", w.grabberMaxClassName), F = { x: 0, width: w.handleWidth, rx: w.handleRadius, fill: d.background, stroke: d.defaultLine, "stroke-width": w.handleStrokeWidth, "shape-rendering": "crispEdges" }, U = { y: Math.round(O._height / 4), height: Math.round(O._height / 2) };
          h.ensureSingle(T, "rect", w.handleMinClassName, function($) {
            $.attr(F);
          }).attr(U), h.ensureSingle(z, "rect", w.handleMaxClassName, function($) {
            $.attr(F);
          }).attr(U);
          var V = { width: w.grabAreaWidth, x: 0, y: 0, fill: w.grabAreaFill, cursor: I._context.staticPlot ? void 0 : w.grabAreaCursor };
          h.ensureSingle(T, "rect", w.grabAreaMinClassName, function($) {
            $.attr(V);
          }).attr("height", O._height), h.ensureSingle(z, "rect", w.grabAreaMaxClassName, function($) {
            $.attr(V);
          }).attr("height", O._height);
        }
        o.exports = function(P) {
          for (var I = P._fullLayout, M = I._rangeSliderData, O = 0; O < M.length; O++) {
            var T = M[O][w.name];
            T._clipId = T._id + "-" + I._uid;
          }
          var z = I._infolayer.selectAll("g." + w.containerClassName).data(M, function(F) {
            return F._name;
          });
          z.exit().each(function(F) {
            var U = F[w.name];
            I._topdefs.select("#" + U._clipId).remove();
          }).remove(), M.length !== 0 && (z.enter().append("g").classed(w.containerClassName, !0).attr("pointer-events", "all"), z.each(function(F) {
            var U = l.select(this), V = F[w.name], $ = I[g.id2name(F.anchor)], q = V[g.id2name(F.anchor)];
            if (V.range) {
              var K, re = h.simpleMap(V.range, F.r2l), Y = h.simpleMap(F.range, F.r2l);
              K = Y[0] < Y[1] ? [Math.min(re[0], Y[0]), Math.max(re[1], Y[1])] : [Math.max(re[0], Y[0]), Math.min(re[1], Y[1])], V.range = V._input.range = h.simpleMap(K, F.l2r);
            }
            F.cleanRange("rangeslider.range");
            var te = I._size, ee = F.domain;
            V._width = te.w * (ee[1] - ee[0]);
            var X = Math.round(te.l + te.w * ee[0]), Q = Math.round(te.t + te.h * (1 - F._counterDomainMin) + (F.side === "bottom" ? F._depth : 0) + V._offsetShift + w.extraPad);
            U.attr("transform", p(X, Q)), V._rl = h.simpleMap(V.range, F.r2l);
            var ue = V._rl[0], ce = V._rl[1], he = ce - ue;
            if (V.p2d = function(Ae) {
              return Ae / V._width * he + ue;
            }, V.d2p = function(Ae) {
              return (Ae - ue) / he * V._width;
            }, F.rangebreaks) {
              var de = F.locateBreaks(ue, ce);
              if (de.length) {
                var ne, ae, se = 0;
                for (ne = 0; ne < de.length; ne++) se += (ae = de[ne]).max - ae.min;
                var me = V._width / (ce - ue - se), ye = [-me * ue];
                for (ne = 0; ne < de.length; ne++) ae = de[ne], ye.push(ye[ye.length - 1] - me * (ae.max - ae.min));
                for (V.d2p = function(Ae) {
                  for (var Se = ye[0], Me = 0; Me < de.length; Me++) {
                    var De = de[Me];
                    if (Ae >= De.max) Se = ye[Me + 1];
                    else if (Ae < De.min) break;
                  }
                  return Se + me * Ae;
                }, ne = 0; ne < de.length; ne++) (ae = de[ne]).pmin = V.d2p(ae.min), ae.pmax = V.d2p(ae.max);
                V.p2d = function(Ae) {
                  for (var Se = ye[0], Me = 0; Me < de.length; Me++) {
                    var De = de[Me];
                    if (Ae >= De.pmax) Se = ye[Me + 1];
                    else if (Ae < De.pmin) break;
                  }
                  return (Ae - Se) / me;
                };
              }
            }
            if (q.rangemode !== "match") {
              var pe = $.r2l(q.range[0]), be = $.r2l(q.range[1]) - pe;
              V.d2pOppAxis = function(Ae) {
                return (Ae - pe) / be * V._height;
              };
            }
            U.call(S, P, F, V).call(A, P, F, V).call(C, P, F, V).call(D, P, F, V, q).call(L, P, F, V).call(E, P, F, V), function(Ae, Se, Me, De) {
              if (!Se._context.staticPlot) {
                var Le = Ae.select("rect." + w.slideBoxClassName).node(), We = Ae.select("rect." + w.grabAreaMinClassName).node(), Ee = Ae.select("rect." + w.grabAreaMaxClassName).node();
                Ae.on("mousedown", Ne), Ae.on("touchstart", Ne);
              }
              function Ne() {
                var Ie = l.event, ge = Ie.target, Ce = k(Ie), we = Ce - Ae.node().getBoundingClientRect().left, Ge = De.d2p(Me._rl[0]), Re = De.d2p(Me._rl[1]), je = m.coverSlip();
                function Ke(_e) {
                  var Be, $e, Ze, ct = +k(_e) - Ce;
                  switch (ge) {
                    case Le:
                      if (Ze = "ew-resize", Ge + ct > Me._length || Re + ct < 0) return;
                      Be = Ge + ct, $e = Re + ct;
                      break;
                    case We:
                      if (Ze = "col-resize", Ge + ct > Me._length) return;
                      Be = Ge + ct, $e = Re;
                      break;
                    case Ee:
                      if (Ze = "col-resize", Re + ct < 0) return;
                      Be = Ge, $e = Re + ct;
                      break;
                    default:
                      Ze = "ew-resize", Be = we, $e = we + ct;
                  }
                  if ($e < Be) {
                    var ft = $e;
                    $e = Be, Be = ft;
                  }
                  De._pixelMin = Be, De._pixelMax = $e, x(l.select(je), Ze), function(_t, Pt, Dt, $t) {
                    function Gt(at) {
                      return Dt.l2r(h.constrain(at, $t._rl[0], $t._rl[1]));
                    }
                    var Wt = Gt($t.p2d($t._pixelMin)), mt = Gt($t.p2d($t._pixelMax));
                    window.requestAnimationFrame(function() {
                      u.call("_guiRelayout", Pt, Dt._name + ".range", [Wt, mt]);
                    });
                  }(0, Se, Me, De);
                }
                function tt() {
                  je.removeEventListener("mousemove", Ke), je.removeEventListener("mouseup", tt), this.removeEventListener("touchmove", Ke), this.removeEventListener("touchend", tt), h.removeElement(je);
                }
                this.addEventListener("touchmove", Ke), this.addEventListener("touchend", tt), je.addEventListener("mousemove", Ke), je.addEventListener("mouseup", tt);
              }
            }(U, P, F, V), function(Ae, Se, Me, De, Le, We) {
              var Ee = w.handleWidth / 2;
              function Ne(_e) {
                return h.constrain(_e, 0, De._width);
              }
              function Ie(_e) {
                return h.constrain(_e, 0, De._height);
              }
              function ge(_e) {
                return h.constrain(_e, -Ee, De._width + Ee);
              }
              var Ce = Ne(De.d2p(Me._rl[0])), we = Ne(De.d2p(Me._rl[1]));
              if (Ae.select("rect." + w.slideBoxClassName).attr("x", Ce).attr("width", we - Ce), Ae.select("rect." + w.maskMinClassName).attr("width", Ce), Ae.select("rect." + w.maskMaxClassName).attr("x", we).attr("width", De._width - we), We.rangemode !== "match") {
                var Ge = De._height - Ie(De.d2pOppAxis(Le._rl[1])), Re = De._height - Ie(De.d2pOppAxis(Le._rl[0]));
                Ae.select("rect." + w.maskMinOppAxisClassName).attr("x", Ce).attr("height", Ge).attr("width", we - Ce), Ae.select("rect." + w.maskMaxOppAxisClassName).attr("x", Ce).attr("y", Re).attr("height", De._height - Re).attr("width", we - Ce), Ae.select("rect." + w.slideBoxClassName).attr("y", Ge).attr("height", Re - Ge);
              }
              var je = 0.5, Ke = Math.round(ge(Ce - Ee)) - je, tt = Math.round(ge(we - Ee)) + je;
              Ae.select("g." + w.grabberMinClassName).attr("transform", p(Ke, je)), Ae.select("g." + w.grabberMaxClassName).attr("transform", p(tt, je));
            }(U, 0, F, V, $, q), F.side === "bottom" && f.draw(P, F._id + "title", { propContainer: F, propName: F._name + ".title", placeholder: I._dfltTitle.x, attributes: { x: F._offset + F._length / 2, y: Q + V._height + V._offsetShift + 10 + 1.5 * F.title.font.size, "text-anchor": "middle" } });
          }));
        };
      }, 80400: function(o, s, n) {
        var l = n(5975), u = n(30635), i = n(20604), h = n(4530).LINE_SPACING, p = i.name;
        function _(d) {
          var f = d && d[p];
          return f && f.visible;
        }
        s.isVisible = _, s.makeData = function(d) {
          var f = l.list({ _fullLayout: d }, "x", !0), c = d.margin, g = [];
          if (!d._has("gl2d")) for (var m = 0; m < f.length; m++) {
            var x = f[m];
            if (_(x)) {
              g.push(x);
              var w = x[p];
              w._id = p + x._id, w._height = (d.height - c.b - c.t) * w.thickness, w._offsetShift = Math.floor(w.borderwidth / 2);
            }
          }
          d._rangeSliderData = g;
        }, s.autoMarginOpts = function(d, f) {
          var c = d._fullLayout, g = f[p], m = f._id.charAt(0), x = 0, w = 0;
          return f.side === "bottom" && (x = f._depth, f.title.text !== c._dfltTitle[m] && (w = 1.5 * f.title.font.size + 10 + g._offsetShift, w += (f.title.text.match(u.BR_TAG_ALL) || []).length * f.title.font.size * h)), { x: 0, y: f._counterDomainMin, l: 0, r: 0, t: 0, b: g._height + x + Math.max(c.margin.b, w), pad: i.extraPad + 2 * g._offsetShift };
        };
      }, 55429: function(o, s, n) {
        var l = n(34809), u = n(63608), i = n(66249), h = n(80400);
        o.exports = { moduleType: "component", name: "rangeslider", schema: { subplots: { xaxis: { rangeslider: l.extendFlat({}, u, { yaxis: i }) } } }, layoutAttributes: n(63608), handleDefaults: n(41295), calcAutorange: n(46223), draw: n(88887), isVisible: h.isVisible, makeData: h.makeData, autoMarginOpts: h.autoMarginOpts };
      }, 66249: function(o) {
        o.exports = { _isSubplotObj: !0, rangemode: { valType: "enumerated", values: ["auto", "fixed", "match"], dflt: "match", editType: "calc" }, range: { valType: "info_array", items: [{ valType: "any", editType: "plot" }, { valType: "any", editType: "plot" }], editType: "plot" }, editType: "calc" };
      }, 4327: function(o, s, n) {
        var l = n(50222), u = n(36640).line, i = n(94850).T, h = n(93049).extendFlat, p = n(13582).overrideAll, _ = n(78032).templatedArray;
        n(35081), o.exports = p(_("selection", { type: { valType: "enumerated", values: ["rect", "path"] }, xref: h({}, l.xref, {}), yref: h({}, l.yref, {}), x0: { valType: "any" }, x1: { valType: "any" }, y0: { valType: "any" }, y1: { valType: "any" }, path: { valType: "string", editType: "arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.7, editType: "arraydraw" }, line: { color: u.color, width: h({}, u.width, { min: 1, dflt: 1 }), dash: h({}, i, { dflt: "dot" }) } }), "arraydraw", "from-root");
      }, 78865: function(o) {
        o.exports = { BENDPX: 1.5, MINSELECT: 12, SELECTDELAY: 100, SELECTID: "-select" };
      }, 2272: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(59008), h = n(4327), p = n(49728);
        function _(d, f, c) {
          function g(F, U) {
            return l.coerce(d, f, h, F, U);
          }
          var m = g("path"), x = g("type", m ? "path" : "rect") !== "path";
          x && delete f.path, g("opacity"), g("line.color"), g("line.width"), g("line.dash");
          for (var w = ["x", "y"], k = 0; k < 2; k++) {
            var S, A, C, D = w[k], L = { _fullLayout: c }, E = u.coerceRef(d, f, L, D);
            if ((S = u.getFromId(L, E))._selectionIndices.push(f._index), C = p.rangeToShapePosition(S), A = p.shapePositionToRange(S), x) {
              var P = D + "0", I = D + "1", M = d[P], O = d[I];
              d[P] = A(d[P], !0), d[I] = A(d[I], !0), u.coercePosition(f, L, g, E, P), u.coercePosition(f, L, g, E, I);
              var T = f[P], z = f[I];
              T !== void 0 && z !== void 0 && (f[P] = C(T), f[I] = C(z), d[P] = M, d[I] = O);
            }
          }
          x && l.noneOrAll(d, f, ["x0", "x1", "y0", "y1"]);
        }
        o.exports = function(d, f) {
          i(d, f, { name: "selections", handleItemDefaults: _ });
          for (var c = f.selections, g = 0; g < c.length; g++) {
            var m = c[g];
            m && m.path === void 0 && (m.x0 !== void 0 && m.x1 !== void 0 && m.y0 !== void 0 && m.y1 !== void 0 || (f.selections[g] = null));
          }
        };
      }, 7028: function(o, s, n) {
        var l = n(81055).readPaths, u = n(561), i = n(78534).clearOutlineControllers, h = n(78766), p = n(62203), _ = n(78032).arrayEditor, d = n(49728), f = d.getPathString;
        function c(k) {
          var S = k._fullLayout;
          for (var A in i(k), S._selectionLayer.selectAll("path").remove(), S._plots) {
            var C = S._plots[A].selectionLayer;
            C && C.selectAll("path").remove();
          }
          for (var D = 0; D < S.selections.length; D++) m(k, D);
        }
        function g(k) {
          return k._context.editSelection;
        }
        function m(k, S) {
          k._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="' + S + '"]').remove();
          var A = d.makeSelectionsOptionsAndPlotinfo(k, S), C = A.options, D = A.plotinfo;
          C._input && function(L) {
            var E = f(k, C), P = { "data-index": S, "fill-rule": "evenodd", d: E }, I = C.opacity, M = "rgba(0,0,0,0)", O = C.line.color || h.contrast(k._fullLayout.plot_bgcolor), T = C.line.width, z = C.line.dash;
            T || (T = 5, z = "solid");
            var F = g(k) && k._fullLayout._activeSelectionIndex === S;
            F && (M = k._fullLayout.activeselection.fillcolor, I = k._fullLayout.activeselection.opacity);
            for (var U = [], V = 1; V >= 0; V--) {
              var $ = L.append("path").attr(P).style("opacity", V ? 0.1 : I).call(h.stroke, O).call(h.fill, M).call(p.dashLine, V ? "solid" : z, V ? 4 + T : T);
              if (x($, k, C), F) {
                var q = _(k.layout, "selections", C);
                $.style({ cursor: "move" });
                var K = { element: $.node(), plotinfo: D, gd: k, editHelpers: q, isActiveSelection: !0 }, re = l(E, k);
                u(re, $, K);
              } else $.style("pointer-events", V ? "all" : "none");
              U[V] = $;
            }
            var Y = U[0];
            U[1].node().addEventListener("click", function() {
              return function(te, ee) {
                if (g(te)) {
                  var X = +ee.node().getAttribute("data-index");
                  if (X >= 0) {
                    if (X === te._fullLayout._activeSelectionIndex) return void w(te);
                    te._fullLayout._activeSelectionIndex = X, te._fullLayout._deactivateSelection = w, c(te);
                  }
                }
              }(k, Y);
            });
          }(k._fullLayout._selectionLayer);
        }
        function x(k, S, A) {
          var C = A.xref + A.yref;
          p.setClipUrl(k, "clip" + S._fullLayout._uid + C, S);
        }
        function w(k) {
          g(k) && k._fullLayout._activeSelectionIndex >= 0 && (i(k), delete k._fullLayout._activeSelectionIndex, c(k));
        }
        o.exports = { draw: c, drawOne: m, activateLastSelection: function(k) {
          if (g(k)) {
            var S = k._fullLayout.selections.length - 1;
            k._fullLayout._activeSelectionIndex = S, k._fullLayout._deactivateSelection = w, c(k);
          }
        } };
      }, 52307: function(o, s, n) {
        var l = n(94850).T, u = n(93049).extendFlat;
        o.exports = { newselection: { mode: { valType: "enumerated", values: ["immediate", "gradual"], dflt: "immediate", editType: "none" }, line: { color: { valType: "color", editType: "none" }, width: { valType: "number", min: 1, dflt: 1, editType: "none" }, dash: u({}, l, { dflt: "dot", editType: "none" }), editType: "none" }, editType: "none" }, activeselection: { fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "none" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "none" }, editType: "none" } };
      }, 43028: function(o) {
        o.exports = function(s, n, l) {
          l("newselection.mode"), l("newselection.line.width") && (l("newselection.line.color"), l("newselection.line.dash")), l("activeselection.fillcolor"), l("activeselection.opacity");
        };
      }, 51817: function(o, s, n) {
        var l = n(70414).selectMode, u = n(78534).clearOutline, i = n(81055), h = i.readPaths, p = i.writePaths, _ = i.fixDatesForPaths;
        o.exports = function(d, f) {
          if (d.length) {
            var c = d[0][0];
            if (c) {
              var g = c.getAttribute("d"), m = f.gd, x = m._fullLayout.newselection, w = f.plotinfo, k = w.xaxis, S = w.yaxis, A = f.isActiveSelection, C = f.dragmode, D = (m.layout || {}).selections || [];
              if (!l(C) && A !== void 0) {
                var L = m._fullLayout._activeSelectionIndex;
                if (L < D.length) switch (m._fullLayout.selections[L].type) {
                  case "rect":
                    C = "select";
                    break;
                  case "path":
                    C = "lasso";
                }
              }
              var E, P = h(g, m, w, A), I = { xref: k._id, yref: S._id, opacity: x.opacity, line: { color: x.line.color, width: x.line.width, dash: x.line.dash } };
              P.length === 1 && (E = P[0]), E && E.length === 5 && C === "select" ? (I.type = "rect", I.x0 = E[0][1], I.y0 = E[0][2], I.x1 = E[2][1], I.y1 = E[2][2]) : (I.type = "path", k && S && _(P, k, S), I.path = p(P), E = null), u(m);
              for (var M = f.editHelpers, O = (M || {}).modifyItem, T = [], z = 0; z < D.length; z++) {
                var F = m._fullLayout.selections[z];
                if (F) {
                  if (T[z] = F._input, A !== void 0 && z === m._fullLayout._activeSelectionIndex) {
                    var U = I;
                    switch (F.type) {
                      case "rect":
                        O("x0", U.x0), O("x1", U.x1), O("y0", U.y0), O("y1", U.y1);
                        break;
                      case "path":
                        O("path", U.path);
                    }
                  }
                } else T[z] = F;
              }
              return A === void 0 ? (T.push(I), T) : M ? M.getUpdateObj() : {};
            }
          }
        };
      }, 49801: function(o, s, n) {
        var l = n(34809).strTranslate;
        function u(i, h) {
          switch (i.type) {
            case "log":
              return i.p2d(h);
            case "date":
              return i.p2r(h, 0, i.calendar);
            default:
              return i.p2r(h);
          }
        }
        o.exports = { p2r: u, r2p: function(i, h) {
          switch (i.type) {
            case "log":
              return i.d2p(h);
            case "date":
              return i.r2p(h, 0, i.calendar);
            default:
              return i.r2p(h);
          }
        }, axValue: function(i) {
          var h = i._id.charAt(0) === "y" ? 1 : 0;
          return function(p) {
            return u(i, p[h]);
          };
        }, getTransform: function(i) {
          return l(i.xaxis._offset, i.yaxis._offset);
        } };
      }, 44844: function(o, s, n) {
        var l = n(7028), u = n(88666);
        o.exports = { moduleType: "component", name: "selections", layoutAttributes: n(4327), supplyLayoutDefaults: n(2272), supplyDrawNewSelectionDefaults: n(43028), includeBasePlot: n(20706)("selections"), draw: l.draw, drawOne: l.drawOne, reselect: u.reselect, prepSelect: u.prepSelect, clearOutline: u.clearOutline, clearSelectionsCache: u.clearSelectionsCache, selectOnClick: u.selectOnClick };
      }, 88666: function(o, s, n) {
        var l = n(11516), u = n(52773), i = n(33626), h = n(62203).dashStyle, p = n(78766), _ = n(32141), d = n(36040).makeEventData, f = n(70414), c = f.freeMode, g = f.rectMode, m = f.drawMode, x = f.openMode, w = f.selectMode, k = n(49728), S = n(2956), A = n(561), C = n(78534).clearOutline, D = n(81055), L = D.handleEllipse, E = D.readPaths, P = n(87562).newShapes, I = n(51817), M = n(7028).activateLastSelection, O = n(34809), T = O.sorterAsc, z = n(80899), F = n(64025), U = n(5975).getFromId, V = n(34823), $ = n(71817).redrawReglTraces, q = n(78865), K = q.MINSELECT, re = z.filter, Y = z.tester, te = n(49801), ee = te.p2r, X = te.axValue, Q = te.getTransform;
        function ue(Ke) {
          return Ke.subplot !== void 0;
        }
        function ce(Ke, tt, _e, Be, $e, Ze, ct) {
          var ft, _t, Pt, Dt, $t, Gt, Wt, mt, at, vt = tt._hoverdata, St = tt._fullLayout.clickmode.indexOf("event") > -1, Je = [];
          if (function(pt) {
            return pt && Array.isArray(pt) && pt[0].hoverOnBox !== !0;
          }(vt)) {
            ae(Ke, tt, Ze);
            var nt = function(pt, Mt) {
              var At, Rt, Ft = pt[0], lt = -1, st = [];
              for (Rt = 0; Rt < Mt.length; Rt++) if (At = Mt[Rt], Ft.fullData._expandedIndex === At.cd[0].trace._expandedIndex) {
                if (Ft.hoverOnBox === !0) break;
                Ft.pointNumber !== void 0 ? lt = Ft.pointNumber : Ft.binNumber !== void 0 && (lt = Ft.binNumber, st = Ft.pointNumbers);
                break;
              }
              return { pointNumber: lt, pointNumbers: st, searchInfo: At };
            }(vt, ft = ye(tt, _e, Be, $e));
            if (nt.pointNumbers.length > 0 ? function(pt, Mt) {
              var At, Rt, Ft, lt = [];
              for (Ft = 0; Ft < pt.length; Ft++) (At = pt[Ft]).cd[0].trace.selectedpoints && At.cd[0].trace.selectedpoints.length > 0 && lt.push(At);
              if (lt.length === 1 && lt[0] === Mt.searchInfo && (Rt = Mt.searchInfo.cd[0].trace).selectedpoints.length === Mt.pointNumbers.length) {
                for (Ft = 0; Ft < Mt.pointNumbers.length; Ft++) if (Rt.selectedpoints.indexOf(Mt.pointNumbers[Ft]) < 0) return !1;
                return !0;
              }
              return !1;
            }(ft, nt) : function(pt) {
              var Mt, At, Rt = 0;
              for (At = 0; At < pt.length; At++) if ((Mt = pt[At].cd[0].trace).selectedpoints && (Mt.selectedpoints.length > 1 || (Rt += Mt.selectedpoints.length) > 1))
                return !1;
              return Rt === 1;
            }(ft) && (Gt = be(nt))) {
              for (ct && ct.remove(), at = 0; at < ft.length; at++) (_t = ft[at])._module.selectPoints(_t, !1);
              Ae(tt, ft), se(Ze), St && je(tt);
            } else {
              for (Wt = Ke.shiftKey && (Gt !== void 0 ? Gt : be(nt)), Pt = /* @__PURE__ */ function(pt, Mt, At) {
                return { pointNumber: pt, searchInfo: Mt, subtract: !!At };
              }(nt.pointNumber, nt.searchInfo, Wt), Dt = ne(Ze.selectionDefs.concat([Pt])), at = 0; at < ft.length; at++) if ($t = Me(ft[at]._module.selectPoints(ft[at], Dt), ft[at]), Je.length) for (var ot = 0; ot < $t.length; ot++) Je.push($t[ot]);
              else Je = $t;
              if (Ae(tt, ft, mt = { points: Je }), Pt && Ze && Ze.selectionDefs.push(Pt), ct) {
                var Ye = Ze.mergedPolygons, Fe = x(Ze.dragmode);
                A(De(Ye, Fe), ct, Ze);
              }
              St && Re(tt, mt);
            }
          }
        }
        function he(Ke) {
          return "pointNumber" in Ke && "searchInfo" in Ke;
        }
        function de(Ke) {
          return { xmin: 0, xmax: 0, ymin: 0, ymax: 0, pts: [], contains: function(tt, _e, Be, $e) {
            var Ze = Ke.searchInfo.cd[0].trace._expandedIndex;
            return $e.cd[0].trace._expandedIndex === Ze && Be === Ke.pointNumber;
          }, isRect: !1, degenerate: !1, subtract: !!Ke.subtract };
        }
        function ne(Ke) {
          if (Ke.length) {
            for (var tt = [], _e = he(Ke[0]) ? 0 : Ke[0][0][0], Be = _e, $e = he(Ke[0]) ? 0 : Ke[0][0][1], Ze = $e, ct = 0; ct < Ke.length; ct++) if (he(Ke[ct])) tt.push(de(Ke[ct]));
            else {
              var ft = Y(Ke[ct]);
              ft.subtract = !!Ke[ct].subtract, tt.push(ft), _e = Math.min(_e, ft.xmin), Be = Math.max(Be, ft.xmax), $e = Math.min($e, ft.ymin), Ze = Math.max(Ze, ft.ymax);
            }
            return { xmin: _e, xmax: Be, ymin: $e, ymax: Ze, pts: [], contains: function(_t, Pt, Dt, $t) {
              for (var Gt = !1, Wt = 0; Wt < tt.length; Wt++) tt[Wt].contains(_t, Pt, Dt, $t) && (Gt = !tt[Wt].subtract);
              return Gt;
            }, isRect: !1, degenerate: !1 };
          }
        }
        function ae(Ke, tt, _e) {
          var Be = tt._fullLayout, $e = _e.plotinfo, Ze = _e.dragmode, ct = Be._lastSelectedSubplot && Be._lastSelectedSubplot === $e.id, ft = (Ke.shiftKey || Ke.altKey) && !(m(Ze) && x(Ze));
          ct && ft && $e.selection && $e.selection.selectionDefs && !_e.selectionDefs ? (_e.selectionDefs = $e.selection.selectionDefs, _e.mergedPolygons = $e.selection.mergedPolygons) : ft && $e.selection || se(_e), ct || (C(tt), Be._lastSelectedSubplot = $e.id);
        }
        function se(Ke, tt) {
          var _e = Ke.dragmode, Be = Ke.plotinfo, $e = Ke.gd;
          (function($t) {
            return $t._fullLayout._activeShapeIndex >= 0;
          })($e) && $e._fullLayout._deactivateShape($e), function($t) {
            return $t._fullLayout._activeSelectionIndex >= 0;
          }($e) && $e._fullLayout._deactivateSelection($e);
          var Ze = $e._fullLayout._zoomlayer, ct = m(_e), ft = w(_e);
          if (ct || ft) {
            var _t, Pt, Dt = Ze.selectAll(".select-outline-" + Be.id);
            Dt && $e._fullLayout._outlining && (ct && (_t = P(Dt, Ke)), _t && i.call("_guiRelayout", $e, { shapes: _t }), ft && !ue(Ke) && (Pt = I(Dt, Ke)), Pt && ($e._fullLayout._noEmitSelectedAtStart = !0, i.call("_guiRelayout", $e, { selections: Pt }).then(function() {
              tt && M($e);
            })), $e._fullLayout._outlining = !1);
          }
          Be.selection = {}, Be.selection.selectionDefs = Ke.selectionDefs = [], Be.selection.mergedPolygons = Ke.mergedPolygons = [];
        }
        function me(Ke) {
          return Ke._id;
        }
        function ye(Ke, tt, _e, Be) {
          if (!Ke.calcdata) return [];
          var $e, Ze, ct, ft = [], _t = tt.map(me), Pt = _e.map(me);
          for (ct = 0; ct < Ke.calcdata.length; ct++) if ((Ze = ($e = Ke.calcdata[ct])[0].trace).visible === !0 && Ze._module && Ze._module.selectPoints) if (!ue({ subplot: Be }) || Ze.subplot !== Be && Ze.geo !== Be) if (Ze.type === "splom") {
            if (Ze._xaxes[_t[0]] && Ze._yaxes[Pt[0]]) {
              var Dt = pe(Ze._module, $e, tt[0], _e[0]);
              Dt.scene = Ke._fullLayout._splomScenes[Ze.uid], ft.push(Dt);
            }
          } else if (Ze.type === "sankey") {
            var $t = pe(Ze._module, $e, tt[0], _e[0]);
            ft.push($t);
          } else {
            if (!(_t.indexOf(Ze.xaxis) !== -1 || Ze._xA && Ze._xA.overlaying) || !(Pt.indexOf(Ze.yaxis) !== -1 || Ze._yA && Ze._yA.overlaying)) continue;
            ft.push(pe(Ze._module, $e, U(Ke, Ze.xaxis), U(Ke, Ze.yaxis)));
          }
          else ft.push(pe(Ze._module, $e, tt[0], _e[0]));
          return ft;
        }
        function pe(Ke, tt, _e, Be) {
          return { _module: Ke, cd: tt, xaxis: _e, yaxis: Be };
        }
        function be(Ke) {
          var tt = Ke.searchInfo.cd[0].trace, _e = Ke.pointNumber, Be = Ke.pointNumbers, $e = Be.length > 0 ? Be[0] : _e;
          return !!tt.selectedpoints && tt.selectedpoints.indexOf($e) > -1;
        }
        function Ae(Ke, tt, _e) {
          var Be, $e;
          for (Be = 0; Be < tt.length; Be++) {
            var Ze = tt[Be].cd[0].trace._fullInput, ct = Ke._fullLayout._tracePreGUI[Ze.uid] || {};
            ct.selectedpoints === void 0 && (ct.selectedpoints = Ze._input.selectedpoints || null);
          }
          if (_e) {
            var ft = _e.points || [];
            for (Be = 0; Be < tt.length; Be++) ($e = tt[Be].cd[0].trace)._input.selectedpoints = $e._fullInput.selectedpoints = [], $e._fullInput !== $e && ($e.selectedpoints = []);
            for (var _t = 0; _t < ft.length; _t++) {
              var Pt = ft[_t], Dt = Pt.data, $t = Pt.fullData, Gt = Pt.pointIndex, Wt = Pt.pointIndices;
              Wt ? ([].push.apply(Dt.selectedpoints, Wt), $e._fullInput !== $e && [].push.apply($t.selectedpoints, Wt)) : (Dt.selectedpoints.push(Gt), $e._fullInput !== $e && $t.selectedpoints.push(Gt));
            }
          } else for (Be = 0; Be < tt.length; Be++) delete ($e = tt[Be].cd[0].trace).selectedpoints, delete $e._input.selectedpoints, $e._fullInput !== $e && delete $e._fullInput.selectedpoints;
          (function(mt, at) {
            for (var vt = !1, St = 0; St < at.length; St++) {
              var Je = at[St], nt = Je.cd;
              i.traceIs(nt[0].trace, "regl") && (vt = !0);
              var ot = Je._module, Ye = ot.styleOnSelect || ot.style;
              Ye && (Ye(mt, nt, nt[0].node3), nt[0].nodeRangePlot3 && Ye(mt, nt, nt[0].nodeRangePlot3));
            }
            vt && (V(mt), $(mt));
          })(Ke, tt);
        }
        function Se(Ke, tt, _e) {
          for (var Be = (_e ? l.difference : l.union)({ regions: Ke }, { regions: [tt] }).regions.reverse(), $e = 0; $e < Be.length; $e++) {
            var Ze = Be[$e];
            Ze.subtract = ge(Ze, Be.slice(0, $e));
          }
          return Be;
        }
        function Me(Ke, tt) {
          if (Array.isArray(Ke)) for (var _e = tt.cd, Be = tt.cd[0].trace, $e = 0; $e < Ke.length; $e++) Ke[$e] = d(Ke[$e], Be, _e);
          return Ke;
        }
        function De(Ke, tt) {
          for (var _e = [], Be = 0; Be < Ke.length; Be++) {
            _e[Be] = [];
            for (var $e = 0; $e < Ke[Be].length; $e++) {
              _e[Be][$e] = [], _e[Be][$e][0] = $e ? "L" : "M";
              for (var Ze = 0; Ze < Ke[Be][$e].length; Ze++) _e[Be][$e].push(Ke[Be][$e][Ze]);
            }
            tt || _e[Be].push(["Z", _e[Be][0][1], _e[Be][0][2]]);
          }
          return _e;
        }
        function Le(Ke, tt) {
          for (var _e, Be, $e = [], Ze = [], ct = 0; ct < tt.length; ct++) {
            var ft = tt[ct];
            Be = ft._module.selectPoints(ft, Ke), Ze.push(Be), _e = Me(Be, ft), $e = $e.concat(_e);
          }
          return $e;
        }
        function We(Ke, tt, _e, Be, $e) {
          var Ze, ct, ft, _t = !!Be;
          $e && (Ze = $e.plotinfo, ct = $e.xaxes[0]._id, ft = $e.yaxes[0]._id);
          var Pt = [], Dt = [], $t = Ie(Ke), Gt = Ke._fullLayout;
          if (Ze) {
            var Wt = Gt._zoomlayer, mt = Gt.dragmode, at = m(mt), vt = w(mt);
            if (at || vt) {
              var St = U(Ke, ct, "x"), Je = U(Ke, ft, "y");
              if (St && Je) {
                var nt = Wt.selectAll(".select-outline-" + Ze.id);
                if (nt && Ke._fullLayout._outlining && nt.length) {
                  for (var ot = nt[0][0].getAttribute("d"), Ye = E(ot, Ke, Ze), Fe = [], pt = 0; pt < Ye.length; pt++) {
                    for (var Mt = Ye[pt], At = [], Rt = 0; Rt < Mt.length; Rt++) At.push([Ce(St, Mt[Rt][1]), Ce(Je, Mt[Rt][2])]);
                    At.xref = ct, At.yref = ft, At.subtract = ge(At, Fe), Fe.push(At);
                  }
                  $t = $t.concat(Fe);
                }
              }
            }
          }
          var Ft = ct && ft ? [ct + ft] : Gt._subplots.cartesian;
          (function(hr) {
            var Zn = hr.calcdata;
            if (Zn) for (var lr = 0; lr < Zn.length; lr++) {
              var cr = Zn[lr][0].trace, zr = hr._fullLayout._splomScenes;
              if (zr) {
                var Wr = zr[cr.uid];
                Wr && (Wr.selectBatch = []);
              }
            }
          })(Ke);
          for (var lt = {}, st = 0; st < Ft.length; st++) {
            var Ot = Ft[st], kt = Ot.indexOf("y"), Bt = Ot.slice(0, kt), xt = Ot.slice(kt), Jt = ct && ft ? _e : void 0;
            if (Jt = Ne($t, Bt, xt, Jt)) {
              var qt = Be;
              if (!_t) {
                var en = U(Ke, Bt, "x"), Yt = U(Ke, xt, "y");
                qt = ye(Ke, [en], [Yt], Ot);
                for (var Ht = 0; Ht < qt.length; Ht++) {
                  var sn = qt[Ht], fn = sn.cd[0], In = fn.trace;
                  if (sn._module.name === "scattergl" && !fn.t.xpx) {
                    var zn = In.x, Cn = In.y, gn = In._length;
                    fn.t.xpx = [], fn.t.ypx = [];
                    for (var Mn = 0; Mn < gn; Mn++) fn.t.xpx[Mn] = en.c2p(zn[Mn]), fn.t.ypx[Mn] = Yt.c2p(Cn[Mn]);
                  }
                  sn._module.name === "splom" && (lt[In.uid] || (lt[In.uid] = !0));
                }
              }
              var Xn = Le(Jt, qt);
              Pt = Pt.concat(Xn), Dt = Dt.concat(qt);
            }
          }
          var Pn = { points: Pt };
          Ae(Ke, Dt, Pn);
          var wn = Gt.clickmode.indexOf("event") > -1 && tt;
          if (!Ze && tt) {
            var Rn = Ie(Ke, !0);
            if (Rn.length) {
              var _n = Rn[0].xref, En = Rn[0].yref;
              if (_n && En) {
                var Kn = we(Rn);
                Ge([U(Ke, _n, "x"), U(Ke, En, "y")])(Pn, Kn);
              }
            }
            Ke._fullLayout._noEmitSelectedAtStart ? Ke._fullLayout._noEmitSelectedAtStart = !1 : wn && Re(Ke, Pn), Gt._reselect = !1;
          }
          if (!Ze && Gt._deselect) {
            var Wn = Gt._deselect;
            (function(hr, Zn, lr) {
              for (var cr = 0; cr < lr.length; cr++) {
                var zr = lr[cr];
                if (zr.xaxis && zr.xaxis._id === hr && zr.yaxis && zr.yaxis._id === Zn) return !0;
              }
              return !1;
            })(ct = Wn.xref, ft = Wn.yref, Dt) || Ee(Ke, ct, ft, Be), wn && (Pn.points.length ? Re(Ke, Pn) : je(Ke)), Gt._deselect = !1;
          }
          return { eventData: Pn, selectionTesters: _e };
        }
        function Ee(Ke, tt, _e, Be) {
          Be = ye(Ke, [U(Ke, tt, "x")], [U(Ke, _e, "y")], tt + _e);
          for (var $e = 0; $e < Be.length; $e++) {
            var Ze = Be[$e];
            Ze._module.selectPoints(Ze, !1);
          }
          Ae(Ke, Be);
        }
        function Ne(Ke, tt, _e, Be) {
          for (var $e, Ze = 0; Ze < Ke.length; Ze++) {
            var ct = Ke[Ze];
            tt === ct.xref && _e === ct.yref && ($e ? Be = ne($e = Se($e, ct, !!ct.subtract)) : ($e = [ct], Be = Y(ct)));
          }
          return Be;
        }
        function Ie(Ke, tt) {
          for (var _e = [], Be = Ke._fullLayout, $e = Be.selections, Ze = $e.length, ct = 0; ct < Ze; ct++) if (!tt || ct === Be._activeSelectionIndex) {
            var ft = $e[ct];
            if (ft) {
              var _t, Pt, Dt, $t, Gt, Wt = ft.xref, mt = ft.yref, at = U(Ke, Wt, "x"), vt = U(Ke, mt, "y");
              if (ft.type === "rect") {
                Gt = [];
                var St = Ce(at, ft.x0), Je = Ce(at, ft.x1), nt = Ce(vt, ft.y0), ot = Ce(vt, ft.y1);
                Gt = [[St, nt], [St, ot], [Je, ot], [Je, nt]], _t = Math.min(St, Je), Pt = Math.max(St, Je), Dt = Math.min(nt, ot), $t = Math.max(nt, ot), Gt.xmin = _t, Gt.xmax = Pt, Gt.ymin = Dt, Gt.ymax = $t, Gt.xref = Wt, Gt.yref = mt, Gt.subtract = !1, Gt.isRect = !0, _e.push(Gt);
              } else if (ft.type === "path") for (var Ye = ft.path.split("Z"), Fe = [], pt = 0; pt < Ye.length; pt++) {
                var Mt = Ye[pt];
                if (Mt) {
                  Mt += "Z";
                  var At = k.extractPathCoords(Mt, S.paramIsX, "raw"), Rt = k.extractPathCoords(Mt, S.paramIsY, "raw");
                  _t = 1 / 0, Pt = -1 / 0, Dt = 1 / 0, $t = -1 / 0, Gt = [];
                  for (var Ft = 0; Ft < At.length; Ft++) {
                    var lt = Ce(at, At[Ft]), st = Ce(vt, Rt[Ft]);
                    Gt.push([lt, st]), _t = Math.min(lt, _t), Pt = Math.max(lt, Pt), Dt = Math.min(st, Dt), $t = Math.max(st, $t);
                  }
                  Gt.xmin = _t, Gt.xmax = Pt, Gt.ymin = Dt, Gt.ymax = $t, Gt.xref = Wt, Gt.yref = mt, Gt.subtract = ge(Gt, Fe), Fe.push(Gt), _e.push(Gt);
                }
              }
            }
          }
          return _e;
        }
        function ge(Ke, tt) {
          for (var _e = !1, Be = 0; Be < tt.length; Be++) for (var $e = tt[Be], Ze = 0; Ze < Ke.length; Ze++) if (u(Ke[Ze], $e)) {
            _e = !_e;
            break;
          }
          return _e;
        }
        function Ce(Ke, tt) {
          return Ke.type === "date" && (tt = tt.replace("_", " ")), Ke.type === "log" ? Ke.c2p(tt) : Ke.r2p(tt, null, Ke.calendar);
        }
        function we(Ke) {
          for (var tt = Ke.length, _e = [], Be = 0; Be < tt; Be++) {
            var $e = Ke[Be];
            _e = (_e = _e.concat($e)).concat([$e[0]]);
          }
          return (Ze = _e).isRect = Ze.length === 5 && Ze[0][0] === Ze[4][0] && Ze[0][1] === Ze[4][1] && Ze[0][0] === Ze[1][0] && Ze[2][0] === Ze[3][0] && Ze[0][1] === Ze[3][1] && Ze[1][1] === Ze[2][1] || Ze[0][1] === Ze[1][1] && Ze[2][1] === Ze[3][1] && Ze[0][0] === Ze[3][0] && Ze[1][0] === Ze[2][0], Ze.isRect && (Ze.xmin = Math.min(Ze[0][0], Ze[2][0]), Ze.xmax = Math.max(Ze[0][0], Ze[2][0]), Ze.ymin = Math.min(Ze[0][1], Ze[2][1]), Ze.ymax = Math.max(Ze[0][1], Ze[2][1])), Ze;
          var Ze;
        }
        function Ge(Ke) {
          return function(tt, _e) {
            for (var Be, $e, Ze = 0; Ze < Ke.length; Ze++) {
              var ct = Ke[Ze], ft = ct._id, _t = ft.charAt(0);
              if (_e.isRect) {
                Be || (Be = {});
                var Pt = _e[_t + "min"], Dt = _e[_t + "max"];
                Pt !== void 0 && Dt !== void 0 && (Be[ft] = [ee(ct, Pt), ee(ct, Dt)].sort(T));
              } else $e || ($e = {}), $e[ft] = _e.map(X(ct));
            }
            Be && (tt.range = Be), $e && (tt.lassoPoints = $e);
          };
        }
        function Re(Ke, tt) {
          tt && (tt.selections = (Ke.layout || {}).selections || []), Ke.emit("plotly_selected", tt);
        }
        function je(Ke) {
          Ke.emit("plotly_deselect", null);
        }
        o.exports = { reselect: We, prepSelect: function(Ke, tt, _e, Be, $e) {
          var Ze = !ue(Be), ct = c($e), ft = g($e), _t = x($e), Pt = m($e), Dt = w($e), $t = $e === "drawcircle", Gt = $e === "drawline" || $t, Wt = Be.gd, mt = Wt._fullLayout, at = Dt && mt.newselection.mode === "immediate" && Ze, vt = mt._zoomlayer, St = Be.element.getBoundingClientRect(), Je = Be.plotinfo, nt = Q(Je), ot = tt - St.left, Ye = _e - St.top;
          mt._calcInverseTransform(Wt);
          var Fe = O.apply3DTransform(mt._invTransform)(ot, Ye);
          ot = Fe[0], Ye = Fe[1];
          var pt, Mt, At, Rt, Ft, lt, st, Ot = mt._invScaleX, kt = mt._invScaleY, Bt = ot, xt = Ye, Jt = "M" + ot + "," + Ye, qt = Be.xaxes[0], en = Be.yaxes[0], Yt = qt._length, Ht = en._length, sn = Ke.altKey && !(m($e) && _t);
          ae(Ke, Wt, Be), ct && (pt = re([[ot, Ye]], q.BENDPX));
          var fn = vt.selectAll("path.select-outline-" + Je.id).data([1]), In = Pt ? mt.newshape : mt.newselection;
          Pt && (Be.hasText = In.label.text || In.label.texttemplate);
          var zn = Pt && !_t ? In.fillcolor : "rgba(0,0,0,0)", Cn = In.line.color || (Ze ? p.contrast(Wt._fullLayout.plot_bgcolor) : "#7f7f7f");
          fn.enter().append("path").attr("class", "select-outline select-outline-" + Je.id).style({ opacity: Pt ? In.opacity / 2 : 1, "stroke-dasharray": h(In.line.dash, In.line.width), "stroke-width": In.line.width + "px", "shape-rendering": "crispEdges" }).call(p.stroke, Cn).call(p.fill, zn).attr("fill-rule", "evenodd").classed("cursor-move", !!Pt).attr("transform", nt).attr("d", Jt + "Z");
          var gn = vt.append("path").attr("class", "zoombox-corners").style({ fill: p.background, stroke: p.defaultLine, "stroke-width": 1 }).attr("transform", nt).attr("d", "M0,0Z");
          if (Pt && Be.hasText) {
            var Mn = vt.select(".label-temp");
            Mn.empty() && (Mn = vt.append("g").classed("label-temp", !0).classed("select-outline", !0).style({ opacity: 0.8 }));
          }
          var Xn = mt._uid + q.SELECTID, Pn = [], wn = ye(Wt, Be.xaxes, Be.yaxes, Be.subplot);
          at && !Ke.shiftKey && (Be._clearSubplotSelections = function() {
            if (Ze) {
              var _n = qt._id, En = en._id;
              Ee(Wt, _n, En, wn);
              for (var Kn = (Wt.layout || {}).selections || [], Wn = [], hr = !1, Zn = 0; Zn < Kn.length; Zn++) {
                var lr = mt.selections[Zn];
                lr.xref !== _n || lr.yref !== En ? Wn.push(Kn[Zn]) : hr = !0;
              }
              hr && (Wt._fullLayout._noEmitSelectedAtStart = !0, i.call("_guiRelayout", Wt, { selections: Wn }));
            }
          });
          var Rn = function(_n) {
            return _n.plotinfo.fillRangeItems || Ge(_n.xaxes.concat(_n.yaxes));
          }(Be);
          Be.moveFn = function(_n, En) {
            Be._clearSubplotSelections && (Be._clearSubplotSelections(), Be._clearSubplotSelections = void 0), Bt = Math.max(0, Math.min(Yt, Ot * _n + ot)), xt = Math.max(0, Math.min(Ht, kt * En + Ye));
            var Kn = Math.abs(Bt - ot), Wn = Math.abs(xt - Ye);
            if (ft) {
              var hr, Zn, lr;
              if (Dt) {
                var cr = mt.selectdirection;
                switch (hr = cr === "any" ? Wn < Math.min(0.6 * Kn, K) ? "h" : Kn < Math.min(0.6 * Wn, K) ? "v" : "d" : cr) {
                  case "h":
                    Zn = $t ? Ht / 2 : 0, lr = Ht;
                    break;
                  case "v":
                    Zn = $t ? Yt / 2 : 0, lr = Yt;
                }
              }
              if (Pt) switch (mt.newshape.drawdirection) {
                case "vertical":
                  hr = "h", Zn = $t ? Ht / 2 : 0, lr = Ht;
                  break;
                case "horizontal":
                  hr = "v", Zn = $t ? Yt / 2 : 0, lr = Yt;
                  break;
                case "ortho":
                  Kn < Wn ? (hr = "h", Zn = Ye, lr = xt) : (hr = "v", Zn = ot, lr = Bt);
                  break;
                default:
                  hr = "d";
              }
              hr === "h" ? ((Rt = Gt ? L($t, [Bt, Zn], [Bt, lr]) : [[ot, Zn], [ot, lr], [Bt, lr], [Bt, Zn]]).xmin = Gt ? Bt : Math.min(ot, Bt), Rt.xmax = Gt ? Bt : Math.max(ot, Bt), Rt.ymin = Math.min(Zn, lr), Rt.ymax = Math.max(Zn, lr), gn.attr("d", "M" + Rt.xmin + "," + (Ye - K) + "h-4v" + 2 * K + "h4ZM" + (Rt.xmax - 1) + "," + (Ye - K) + "h4v" + 2 * K + "h-4Z")) : hr === "v" ? ((Rt = Gt ? L($t, [Zn, xt], [lr, xt]) : [[Zn, Ye], [Zn, xt], [lr, xt], [lr, Ye]]).xmin = Math.min(Zn, lr), Rt.xmax = Math.max(Zn, lr), Rt.ymin = Gt ? xt : Math.min(Ye, xt), Rt.ymax = Gt ? xt : Math.max(Ye, xt), gn.attr("d", "M" + (ot - K) + "," + Rt.ymin + "v-4h" + 2 * K + "v4ZM" + (ot - K) + "," + (Rt.ymax - 1) + "v4h" + 2 * K + "v-4Z")) : hr === "d" && ((Rt = Gt ? L($t, [ot, Ye], [Bt, xt]) : [[ot, Ye], [ot, xt], [Bt, xt], [Bt, Ye]]).xmin = Math.min(ot, Bt), Rt.xmax = Math.max(ot, Bt), Rt.ymin = Math.min(Ye, xt), Rt.ymax = Math.max(Ye, xt), gn.attr("d", "M0,0Z"));
            } else ct && (pt.addPt([Bt, xt]), Rt = pt.filtered);
            if (Be.selectionDefs && Be.selectionDefs.length ? (At = Se(Be.mergedPolygons, Rt, sn), Rt.subtract = sn, Mt = ne(Be.selectionDefs.concat([Rt]))) : (At = [Rt], Mt = Y(Rt)), A(De(At, _t), fn, Be), Dt) {
              var zr, Wr = We(Wt, !1), mr = Wr.eventData ? Wr.eventData.points.slice() : [];
              Wr = We(Wt, !1, Mt, wn, Be), Mt = Wr.selectionTesters, st = Wr.eventData, zr = pt ? pt.filtered : we(At), F.throttle(Xn, q.SELECTDELAY, function() {
                for (var Ir = (Pn = Le(Mt, wn)).slice(), yr = 0; yr < mr.length; yr++) {
                  for (var Vr = mr[yr], rn = !1, Tn = 0; Tn < Ir.length; Tn++) if (Ir[Tn].curveNumber === Vr.curveNumber && Ir[Tn].pointNumber === Vr.pointNumber) {
                    rn = !0;
                    break;
                  }
                  rn || Ir.push(Vr);
                }
                Ir.length && (st || (st = {}), st.points = Ir), Rn(st, zr), function(sr, $n) {
                  sr.emit("plotly_selecting", $n);
                }(Wt, st);
              });
            }
          }, Be.clickFn = function(_n, En) {
            if (gn.remove(), Wt._fullLayout._activeShapeIndex >= 0) Wt._fullLayout._deactivateShape(Wt);
            else if (!Pt) {
              var Kn = mt.clickmode;
              F.done(Xn).then(function() {
                if (F.clear(Xn), _n === 2) {
                  for (fn.remove(), Ft = 0; Ft < wn.length; Ft++) (lt = wn[Ft])._module.selectPoints(lt, !1);
                  if (Ae(Wt, wn), se(Be), je(Wt), wn.length) {
                    var Wn = wn[0].xaxis, hr = wn[0].yaxis;
                    if (Wn && hr) {
                      for (var Zn = [], lr = Wt._fullLayout.selections, cr = 0; cr < lr.length; cr++) {
                        var zr = lr[cr];
                        zr && (zr.xref === Wn._id && zr.yref === hr._id || Zn.push(zr));
                      }
                      Zn.length < lr.length && (Wt._fullLayout._noEmitSelectedAtStart = !0, i.call("_guiRelayout", Wt, { selections: Zn }));
                    }
                  }
                } else Kn.indexOf("select") > -1 && ce(En, Wt, Be.xaxes, Be.yaxes, Be.subplot, Be, fn), Kn === "event" && Re(Wt, void 0);
                _.click(Wt, En, Je.id);
              }).catch(O.error);
            }
          }, Be.doneFn = function() {
            gn.remove(), F.done(Xn).then(function() {
              F.clear(Xn), !at && Rt && Be.selectionDefs && (Rt.subtract = sn, Be.selectionDefs.push(Rt), Be.mergedPolygons.length = 0, [].push.apply(Be.mergedPolygons, At)), (at || Pt) && se(Be, at), Be.doneFnCompleted && Be.doneFnCompleted(Pn), Dt && Re(Wt, st);
            }).catch(O.error);
          };
        }, clearOutline: C, clearSelectionsCache: se, selectOnClick: ce };
      }, 43144: function(o, s, n) {
        var l = n(50222), u = n(80337), i = n(36640).line, h = n(94850).T, p = n(93049).extendFlat, _ = n(78032).templatedArray, d = (n(35081), n(9829)), f = n(3208).LF, c = n(41235);
        o.exports = _("shape", { visible: p({}, d.visible, { editType: "calc+arraydraw" }), showlegend: { valType: "boolean", dflt: !1, editType: "calc+arraydraw" }, legend: p({}, d.legend, { editType: "calc+arraydraw" }), legendgroup: p({}, d.legendgroup, { editType: "calc+arraydraw" }), legendgrouptitle: { text: p({}, d.legendgrouptitle.text, { editType: "calc+arraydraw" }), font: u({ editType: "calc+arraydraw" }), editType: "calc+arraydraw" }, legendrank: p({}, d.legendrank, { editType: "calc+arraydraw" }), legendwidth: p({}, d.legendwidth, { editType: "calc+arraydraw" }), type: { valType: "enumerated", values: ["circle", "rect", "path", "line"], editType: "calc+arraydraw" }, layer: { valType: "enumerated", values: ["below", "above", "between"], dflt: "above", editType: "arraydraw" }, xref: p({}, l.xref, {}), xsizemode: { valType: "enumerated", values: ["scaled", "pixel"], dflt: "scaled", editType: "calc+arraydraw" }, xanchor: { valType: "any", editType: "calc+arraydraw" }, x0: { valType: "any", editType: "calc+arraydraw" }, x1: { valType: "any", editType: "calc+arraydraw" }, x0shift: { valType: "number", dflt: 0, min: -1, max: 1, editType: "calc" }, x1shift: { valType: "number", dflt: 0, min: -1, max: 1, editType: "calc" }, yref: p({}, l.yref, {}), ysizemode: { valType: "enumerated", values: ["scaled", "pixel"], dflt: "scaled", editType: "calc+arraydraw" }, yanchor: { valType: "any", editType: "calc+arraydraw" }, y0: { valType: "any", editType: "calc+arraydraw" }, y1: { valType: "any", editType: "calc+arraydraw" }, y0shift: { valType: "number", dflt: 0, min: -1, max: 1, editType: "calc" }, y1shift: { valType: "number", dflt: 0, min: -1, max: 1, editType: "calc" }, path: { valType: "string", editType: "calc+arraydraw" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "arraydraw" }, line: { color: p({}, i.color, { editType: "arraydraw" }), width: p({}, i.width, { editType: "calc+arraydraw" }), dash: p({}, h, { editType: "arraydraw" }), editType: "calc+arraydraw" }, fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "arraydraw" }, fillrule: { valType: "enumerated", values: ["evenodd", "nonzero"], dflt: "evenodd", editType: "arraydraw" }, editable: { valType: "boolean", dflt: !1, editType: "calc+arraydraw" }, label: { text: { valType: "string", dflt: "", editType: "arraydraw" }, texttemplate: f({}, { keys: Object.keys(c) }), font: u({ editType: "calc+arraydraw", colorEditType: "arraydraw" }), textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right", "start", "middle", "end"], editType: "arraydraw" }, textangle: { valType: "angle", dflt: "auto", editType: "calc+arraydraw" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "auto", editType: "calc+arraydraw" }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"], editType: "calc+arraydraw" }, padding: { valType: "number", dflt: 3, min: 0, editType: "arraydraw" }, editType: "arraydraw" }, editType: "arraydraw" });
      }, 44959: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(2956), h = n(49728);
        function p(c) {
          return d(c.line.width, c.xsizemode, c.x0, c.x1, c.path, !1);
        }
        function _(c) {
          return d(c.line.width, c.ysizemode, c.y0, c.y1, c.path, !0);
        }
        function d(c, g, m, x, w, k) {
          var S = c / 2, A = k;
          if (g === "pixel") {
            var C = w ? h.extractPathCoords(w, k ? i.paramIsY : i.paramIsX) : [m, x], D = l.aggNums(Math.max, null, C), L = l.aggNums(Math.min, null, C), E = L < 0 ? Math.abs(L) + S : S, P = D > 0 ? D + S : S;
            return { ppad: S, ppadplus: A ? E : P, ppadminus: A ? P : E };
          }
          return { ppad: S };
        }
        function f(c, g, m) {
          var x, w, k = c._id.charAt(0) === "x" ? "x" : "y", S = c.type === "category" || c.type === "multicategory", A = 0, C = 0, D = S ? c.r2c : c.d2c;
          if (g[k + "sizemode"] === "scaled" ? (x = g[k + "0"], w = g[k + "1"], S && (A = g[k + "0shift"], C = g[k + "1shift"])) : (x = g[k + "anchor"], w = g[k + "anchor"]), x !== void 0) return [D(x) + A, D(w) + C];
          if (g.path) {
            var L, E, P, I, M = 1 / 0, O = -1 / 0, T = g.path.match(i.segmentRE);
            for (c.type === "date" && (D = h.decodeDate(D)), L = 0; L < T.length; L++) (E = m[T[L].charAt(0)].drawn) !== void 0 && (!(P = T[L].substr(1).match(i.paramRE)) || P.length < E || ((I = D(P[E])) < M && (M = I), I > O && (O = I)));
            return O >= M ? [M, O] : void 0;
          }
        }
        o.exports = function(c) {
          var g = c._fullLayout, m = l.filterVisible(g.shapes);
          if (m.length && c._fullData.length) for (var x = 0; x < m.length; x++) {
            var w, k, S = m[x];
            S._extremes = {};
            var A = u.getRefType(S.xref), C = u.getRefType(S.yref);
            S.xref !== "paper" && A !== "domain" && (k = f(w = u.getFromId(c, S.xref), S, i.paramIsX)) && (S._extremes[w._id] = u.findExtremes(w, k, p(S))), S.yref !== "paper" && C !== "domain" && (k = f(w = u.getFromId(c, S.yref), S, i.paramIsY)) && (S._extremes[w._id] = u.findExtremes(w, k, _(S)));
          }
        };
      }, 2956: function(o) {
        o.exports = { segmentRE: /[MLHVQCTSZ][^MLHVQCTSZ]*/g, paramRE: /[^\s,]+/g, paramIsX: { M: { 0: !0, drawn: 0 }, L: { 0: !0, drawn: 0 }, H: { 0: !0, drawn: 0 }, V: {}, Q: { 0: !0, 2: !0, drawn: 2 }, C: { 0: !0, 2: !0, 4: !0, drawn: 4 }, T: { 0: !0, drawn: 0 }, S: { 0: !0, 2: !0, drawn: 2 }, Z: {} }, paramIsY: { M: { 1: !0, drawn: 1 }, L: { 1: !0, drawn: 1 }, H: {}, V: { 0: !0, drawn: 0 }, Q: { 1: !0, 3: !0, drawn: 3 }, C: { 1: !0, 3: !0, 5: !0, drawn: 5 }, T: { 1: !0, drawn: 1 }, S: { 1: !0, 3: !0, drawn: 5 }, Z: {} }, numParams: { M: 2, L: 2, H: 1, V: 1, Q: 4, C: 6, T: 2, S: 4, Z: 0 } };
      }, 74367: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(59008), h = n(43144), p = n(49728);
        function _(d, f, c) {
          function g(te, ee) {
            return l.coerce(d, f, h, te, ee);
          }
          if (f._isShape = !0, g("visible")) {
            g("showlegend") && (g("legend"), g("legendwidth"), g("legendgroup"), g("legendgrouptitle.text"), l.coerceFont(g, "legendgrouptitle.font"), g("legendrank"));
            var m = g("path"), x = g("type", m ? "path" : "rect"), w = x !== "path";
            w && delete f.path, g("editable"), g("layer"), g("opacity"), g("fillcolor"), g("fillrule"), g("line.width") && (g("line.color"), g("line.dash"));
            for (var k = g("xsizemode"), S = g("ysizemode"), A = ["x", "y"], C = 0; C < 2; C++) {
              var D, L, E, P = A[C], I = P + "anchor", M = P === "x" ? k : S, O = { _fullLayout: c }, T = u.coerceRef(d, f, O, P, void 0, "paper");
              if (u.getRefType(T) === "range" ? ((D = u.getFromId(O, T))._shapeIndices.push(f._index), E = p.rangeToShapePosition(D), L = p.shapePositionToRange(D), D.type !== "category" && D.type !== "multicategory" || (g(P + "0shift"), g(P + "1shift"))) : L = E = l.identity, w) {
                var z = P + "0", F = P + "1", U = d[z], V = d[F];
                d[z] = L(d[z], !0), d[F] = L(d[F], !0), M === "pixel" ? (g(z, 0), g(F, 10)) : (u.coercePosition(f, O, g, T, z, 0.25), u.coercePosition(f, O, g, T, F, 0.75)), f[z] = E(f[z]), f[F] = E(f[F]), d[z] = U, d[F] = V;
              }
              if (M === "pixel") {
                var $ = d[I];
                d[I] = L(d[I], !0), u.coercePosition(f, O, g, T, I, 0.25), f[I] = E(f[I]), d[I] = $;
              }
            }
            w && l.noneOrAll(d, f, ["x0", "x1", "y0", "y1"]);
            var q, K, re = x === "line";
            if (w && (q = g("label.texttemplate")), q || (K = g("label.text")), K || q) {
              g("label.textangle");
              var Y = g("label.textposition", re ? "middle" : "middle center");
              g("label.xanchor"), g("label.yanchor", function(te, ee) {
                return te ? "bottom" : ee.indexOf("top") !== -1 ? "top" : ee.indexOf("bottom") !== -1 ? "bottom" : "middle";
              }(re, Y)), g("label.padding"), l.coerceFont(g, "label.font", c.font);
            }
          }
        }
        o.exports = function(d, f) {
          i(d, f, { name: "shapes", handleItemDefaults: _ });
        };
      }, 44433: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(30635), h = n(62203), p = n(81055).readPaths, _ = n(49728), d = _.getPathString, f = n(41235), c = n(4530).FROM_TL;
        o.exports = function(g, m, x, w) {
          if (w.selectAll(".shape-label").remove(), x.label.text || x.label.texttemplate) {
            var k;
            if (x.label.texttemplate) {
              var S = {};
              if (x.type !== "path") {
                var A = u.getFromId(g, x.xref), C = u.getFromId(g, x.yref);
                for (var D in f) {
                  var L = f[D](x, A, C);
                  L !== void 0 && (S[D] = L);
                }
              }
              k = l.texttemplateStringForShapes(x.label.texttemplate, {}, g._fullLayout._d3locale, S);
            } else k = x.label.text;
            var E, P, I, M, O = { "data-index": m }, T = x.label.font, z = w.append("g").attr(O).classed("shape-label", !0).append("text").attr({ "data-notex": 1 }).classed("shape-label-text", !0).text(k);
            if (x.path) {
              var F = d(g, x), U = p(F, g);
              E = 1 / 0, I = 1 / 0, P = -1 / 0, M = -1 / 0;
              for (var V = 0; V < U.length; V++) for (var $ = 0; $ < U[V].length; $++) for (var q = U[V][$], K = 1; K < q.length; K += 2) {
                var re = q[K], Y = q[K + 1];
                E = Math.min(E, re), P = Math.max(P, re), I = Math.min(I, Y), M = Math.max(M, Y);
              }
            } else {
              var te = u.getFromId(g, x.xref), ee = x.x0shift, X = x.x1shift, Q = u.getRefType(x.xref), ue = u.getFromId(g, x.yref), ce = x.y0shift, he = x.y1shift, de = u.getRefType(x.yref), ne = function(Ae, Se) {
                return _.getDataToPixel(g, te, Se, !1, Q)(Ae);
              }, ae = function(Ae, Se) {
                return _.getDataToPixel(g, ue, Se, !0, de)(Ae);
              };
              E = ne(x.x0, ee), P = ne(x.x1, X), I = ae(x.y0, ce), M = ae(x.y1, he);
            }
            var se = x.label.textangle;
            se === "auto" && (se = x.type === "line" ? function(Ae, Se, Me, De) {
              var Le, We;
              return We = Math.abs(Me - Ae), Le = Me >= Ae ? Se - De : De - Se, -180 / Math.PI * Math.atan2(Le, We);
            }(E, I, P, M) : 0), z.call(function(Ae) {
              return Ae.call(h.font, T).attr({}), i.convertToTspans(Ae, g), Ae;
            });
            var me = function(Ae, Se, Me, De, Le, We, Ee) {
              var Ne, Ie, ge, Ce, we = Le.label.textposition, Ge = Le.label.textangle, Re = Le.label.padding, je = Le.type, Ke = Math.PI / 180 * We, tt = Math.sin(Ke), _e = Math.cos(Ke), Be = Le.label.xanchor, $e = Le.label.yanchor;
              if (je === "line") {
                we === "start" ? (Ne = Ae, Ie = Se) : we === "end" ? (Ne = Me, Ie = De) : (Ne = (Ae + Me) / 2, Ie = (Se + De) / 2), Be === "auto" && (Be = we === "start" ? Ge === "auto" ? Me > Ae ? "left" : Me < Ae ? "right" : "center" : Me > Ae ? "right" : Me < Ae ? "left" : "center" : we === "end" ? Ge === "auto" ? Me > Ae ? "right" : Me < Ae ? "left" : "center" : Me > Ae ? "left" : Me < Ae ? "right" : "center" : "center");
                var Ze = { bottom: -1, middle: 0, top: 1 };
                if (Ge === "auto") {
                  var ct = Ze[$e];
                  ge = -Re * tt * ct, Ce = Re * _e * ct;
                } else ge = Re * { left: 1, center: 0, right: -1 }[Be], Ce = Re * Ze[$e];
                Ne += ge, Ie += Ce;
              } else ge = Re + 3, we.indexOf("right") !== -1 ? (Ne = Math.max(Ae, Me) - ge, Be === "auto" && (Be = "right")) : we.indexOf("left") !== -1 ? (Ne = Math.min(Ae, Me) + ge, Be === "auto" && (Be = "left")) : (Ne = (Ae + Me) / 2, Be === "auto" && (Be = "center")), Ie = we.indexOf("top") !== -1 ? Math.min(Se, De) : we.indexOf("bottom") !== -1 ? Math.max(Se, De) : (Se + De) / 2, Ce = Re, $e === "bottom" ? Ie -= Ce : $e === "top" && (Ie += Ce);
              var ft = c[$e], _t = Le.label.font.size, Pt = Ee.height;
              return { textx: Ne + (Pt * ft - _t) * tt, texty: Ie + -(Pt * ft - _t) * _e, xanchor: Be };
            }(E, I, P, M, x, se, h.bBox(z.node())), ye = me.textx, pe = me.texty, be = me.xanchor;
            z.attr({ "text-anchor": { left: "start", center: "middle", right: "end" }[be], y: pe, x: ye, transform: "rotate(" + se + "," + ye + "," + pe + ")" }).call(i.positionText, ye, pe);
          }
        };
      }, 561: function(o, s, n) {
        var l = n(34809).strTranslate, u = n(14751), i = n(70414), h = i.drawMode, p = i.selectMode, _ = n(33626), d = n(78766), f = n(93391), c = f.i000, g = f.i090, m = f.i180, x = f.i270, w = n(78534).clearOutlineControllers, k = n(81055), S = k.pointsOnRectangle, A = k.pointsOnEllipse, C = k.writePaths, D = n(87562).newShapes, L = n(87562).createShapeObj, E = n(51817), P = n(44433);
        function I(M, O) {
          var T, z, F, U = M[O][1], V = M[O][2], $ = M.length;
          return z = M[T = (O + 1) % $][1], F = M[T][2], z === U && F === V && (z = M[T = (O + 2) % $][1], F = M[T][2]), [T, z, F];
        }
        o.exports = function M(O, T, z, F) {
          F || (F = 0);
          var U = z.gd;
          function V() {
            M(O, T, z, F++), (A(O[0]) || z.hasText) && $({ redrawing: !0 });
          }
          function $(Ae) {
            var Se = {};
            z.isActiveShape !== void 0 && (z.isActiveShape = !1, Se = D(T, z)), z.isActiveSelection !== void 0 && (z.isActiveSelection = !1, Se = E(T, z), U._fullLayout._reselect = !0), Object.keys(Se).length && _.call((Ae || {}).redrawing ? "relayout" : "_guiRelayout", U, Se);
          }
          var q, K, re, Y, te, ee = U._fullLayout._zoomlayer, X = z.dragmode, Q = h(X), ue = p(X);
          if ((Q || ue) && (U._fullLayout._outlining = !0), w(U), T.attr("d", C(O)), F || !z.isActiveShape && !z.isActiveSelection || (te = function(Ae, Se) {
            for (var Me = 0; Me < Se.length; Me++) {
              var De = Se[Me];
              Ae[Me] = [];
              for (var Le = 0; Le < De.length; Le++) {
                Ae[Me][Le] = [];
                for (var We = 0; We < De[Le].length; We++) Ae[Me][Le][We] = De[Le][We];
              }
            }
            return Ae;
          }([], O), function(Ae) {
            q = [];
            for (var Se = 0; Se < O.length; Se++) {
              var Me = O[Se], De = S(Me), Le = !De && A(Me);
              q[Se] = [];
              for (var We = Me.length, Ee = 0; Ee < We; Ee++) if (Me[Ee][0] !== "Z" && (!Le || Ee === c || Ee === g || Ee === m || Ee === x)) {
                var Ne, Ie = De && z.isActiveSelection;
                Ie && (Ne = I(Me, Ee));
                var ge = Me[Ee][1], Ce = Me[Ee][2], we = Ae.append(Ie ? "rect" : "circle").attr("data-i", Se).attr("data-j", Ee).style({ fill: d.background, stroke: d.defaultLine, "stroke-width": 1, "shape-rendering": "crispEdges" });
                if (Ie) {
                  var Ge = Ne[1] - ge, Re = Ne[2] - Ce, je = Re ? 5 : Math.max(Math.min(25, Math.abs(Ge) - 5), 5), Ke = Ge ? 5 : Math.max(Math.min(25, Math.abs(Re) - 5), 5);
                  we.classed(Re ? "cursor-ew-resize" : "cursor-ns-resize", !0).attr("width", je).attr("height", Ke).attr("x", ge - je / 2).attr("y", Ce - Ke / 2).attr("transform", l(Ge / 2, Re / 2));
                } else we.classed("cursor-grab", !0).attr("r", 5).attr("cx", ge).attr("cy", Ce);
                q[Se][Ee] = { element: we.node(), gd: U, prepFn: de, doneFn: ae, clickFn: se }, u.init(q[Se][Ee]);
              }
            }
          }(ee.append("g").attr("class", "outline-controllers")), function() {
            K = [], O.length && (K[0] = { element: T[0][0], gd: U, prepFn: ye, doneFn: pe, clickFn: be }, u.init(K[0]));
          }()), Q && z.hasText) {
            var ce = ee.select(".label-temp"), he = L(T, z, z.dragmode);
            P(U, "label-temp", he, ce);
          }
          function de(Ae) {
            re = +Ae.srcElement.getAttribute("data-i"), Y = +Ae.srcElement.getAttribute("data-j"), q[re][Y].moveFn = ne;
          }
          function ne(Ae, Se) {
            if (O.length) {
              var Me = te[re][Y][1], De = te[re][Y][2], Le = O[re], We = Le.length;
              if (S(Le)) {
                var Ee = Ae, Ne = Se;
                z.isActiveSelection && (I(Le, Y)[1] === Le[Y][1] ? Ne = 0 : Ee = 0);
                for (var Ie = 0; Ie < We; Ie++) if (Ie !== Y) {
                  var ge = Le[Ie];
                  ge[1] === Le[Y][1] && (ge[1] = Me + Ee), ge[2] === Le[Y][2] && (ge[2] = De + Ne);
                }
                if (Le[Y][1] = Me + Ee, Le[Y][2] = De + Ne, !S(Le)) for (var Ce = 0; Ce < We; Ce++) for (var we = 0; we < Le[Ce].length; we++) Le[Ce][we] = te[re][Ce][we];
              } else Le[Y][1] = Me + Ae, Le[Y][2] = De + Se;
              V();
            }
          }
          function ae() {
            $();
          }
          function se(Ae, Se) {
            if (Ae === 2) {
              re = +Se.srcElement.getAttribute("data-i"), Y = +Se.srcElement.getAttribute("data-j");
              var Me = O[re];
              S(Me) || A(Me) || function() {
                if (O.length && O[re] && O[re].length) {
                  for (var De = [], Le = 0; Le < O[re].length; Le++) Le !== Y && De.push(O[re][Le]);
                  De.length > 1 && (De.length !== 2 || De[1][0] !== "Z") && (Y === 0 && (De[0][0] = "M"), O[re] = De, V(), $());
                }
              }();
            }
          }
          function me(Ae, Se) {
            (function(Me, De) {
              if (O.length) for (var Le = 0; Le < O.length; Le++) for (var We = 0; We < O[Le].length; We++) for (var Ee = 0; Ee + 2 < O[Le][We].length; Ee += 2) O[Le][We][Ee + 1] = te[Le][We][Ee + 1] + Me, O[Le][We][Ee + 2] = te[Le][We][Ee + 2] + De;
            })(Ae, Se), V();
          }
          function ye(Ae) {
            (re = +Ae.srcElement.getAttribute("data-i")) || (re = 0), K[re].moveFn = me;
          }
          function pe() {
            $();
          }
          function be(Ae) {
            Ae === 2 && function(Se) {
              if (p(Se._fullLayout.dragmode)) {
                w(Se);
                var Me = Se._fullLayout._activeSelectionIndex, De = (Se.layout || {}).selections || [];
                if (Me < De.length) {
                  for (var Le = [], We = 0; We < De.length; We++) We !== Me && Le.push(De[We]);
                  delete Se._fullLayout._activeSelectionIndex;
                  var Ee = Se._fullLayout.selections[Me];
                  Se._fullLayout._deselect = { xref: Ee.xref, yref: Ee.yref }, _.call("_guiRelayout", Se, { selections: Le });
                }
              }
            }(U);
          }
        };
      }, 28231: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(34809), h = n(29714), p = n(81055).readPaths, _ = n(561), d = n(44433), f = n(78534).clearOutlineControllers, c = n(78766), g = n(62203), m = n(78032).arrayEditor, x = n(14751), w = n(27983), k = n(2956), S = n(49728), A = S.getPathString;
        function C(O) {
          var T = O._fullLayout;
          for (var z in T._shapeUpperLayer.selectAll("path").remove(), T._shapeLowerLayer.selectAll("path").remove(), T._shapeUpperLayer.selectAll("text").remove(), T._shapeLowerLayer.selectAll("text").remove(), T._plots) {
            var F = T._plots[z].shapelayer;
            F && (F.selectAll("path").remove(), F.selectAll("text").remove());
          }
          for (var U = 0; U < T.shapes.length; U++) T.shapes[U].visible === !0 && E(O, U);
        }
        function D(O) {
          return !!O._fullLayout._outlining;
        }
        function L(O) {
          return !O._context.edits.shapePosition;
        }
        function E(O, T) {
          O._fullLayout._paperdiv.selectAll('.shapelayer [data-index="' + T + '"]').remove();
          var z = S.makeShapesOptionsAndPlotinfo(O, T), F = z.options, U = z.plotinfo;
          function V($) {
            var q = A(O, F), K = { "data-index": T, "fill-rule": F.fillrule, d: q }, re = F.opacity, Y = F.fillcolor, te = F.line.width ? F.line.color : "rgba(0,0,0,0)", ee = F.line.width, X = F.line.dash;
            ee || F.editable !== !0 || (ee = 5, X = "solid");
            var Q = q[q.length - 1] !== "Z", ue = L(O) && F.editable && O._fullLayout._activeShapeIndex === T;
            ue && (Y = Q ? "rgba(0,0,0,0)" : O._fullLayout.activeshape.fillcolor, re = O._fullLayout.activeshape.opacity);
            var ce, he = $.append("g").classed("shape-group", !0).attr({ "data-index": T }), de = he.append("path").attr(K).style("opacity", re).call(c.stroke, te).call(c.fill, Y).call(g.dashLine, X, ee);
            if (P(he, O, F), d(O, T, F, he), (ue || O._context.edits.shapePosition) && (ce = m(O.layout, "shapes", F)), ue) {
              de.style({ cursor: "move" });
              var ne = { element: de.node(), plotinfo: U, gd: O, editHelpers: ce, hasText: F.label.text || F.label.texttemplate, isActiveShape: !0 }, ae = p(q, O);
              _(ae, de, ne);
            } else O._context.edits.shapePosition ? function(se, me, ye, pe, be, Ae) {
              var Se, Me, De, Le, We, Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke, tt, _e = 10, Be = 10, $e = ye.xsizemode === "pixel", Ze = ye.ysizemode === "pixel", ct = ye.type === "line", ft = ye.type === "path", _t = Ae.modifyItem, Pt = l.select(me.node().parentNode), Dt = h.getFromId(se, ye.xref), $t = h.getRefType(ye.xref), Gt = h.getFromId(se, ye.yref), Wt = h.getRefType(ye.yref), mt = ye.x0shift, at = ye.x1shift, vt = ye.y0shift, St = ye.y1shift, Je = function(st, Ot) {
                return S.getDataToPixel(se, Dt, Ot, !1, $t)(st);
              }, nt = function(st, Ot) {
                return S.getDataToPixel(se, Gt, Ot, !0, Wt)(st);
              }, ot = S.getPixelToData(se, Dt, !1, $t), Ye = S.getPixelToData(se, Gt, !0, Wt), Fe = ct ? function() {
                var st = 10, Ot = Math.max(ye.line.width, st), kt = be.append("g").attr("data-index", pe).attr("drag-helper", !0);
                kt.append("path").attr("d", me.attr("d")).style({ cursor: "move", "stroke-width": Ot, "stroke-opacity": "0" });
                var Bt = { "fill-opacity": "0" }, xt = Math.max(Ot / 2, st);
                return kt.append("circle").attr({ "data-line-point": "start-point", cx: $e ? Je(ye.xanchor) + ye.x0 : Je(ye.x0, mt), cy: Ze ? nt(ye.yanchor) - ye.y0 : nt(ye.y0, vt), r: xt }).style(Bt).classed("cursor-grab", !0), kt.append("circle").attr({ "data-line-point": "end-point", cx: $e ? Je(ye.xanchor) + ye.x1 : Je(ye.x1, at), cy: Ze ? nt(ye.yanchor) - ye.y1 : nt(ye.y1, St), r: xt }).style(Bt).classed("cursor-grab", !0), kt;
              }() : me, pt = { element: Fe.node(), gd: se, prepFn: function(st) {
                D(se) || ($e && (We = Je(ye.xanchor)), Ze && (Ee = nt(ye.yanchor)), ye.type === "path" ? Ke = ye.path : (Se = $e ? ye.x0 : Je(ye.x0), Me = Ze ? ye.y0 : nt(ye.y0), De = $e ? ye.x1 : Je(ye.x1), Le = Ze ? ye.y1 : nt(ye.y1)), Se < De ? (ge = Se, Re = "x0", Ce = De, je = "x1") : (ge = De, Re = "x1", Ce = Se, je = "x0"), !Ze && Me < Le || Ze && Me > Le ? (Ne = Me, we = "y0", Ie = Le, Ge = "y1") : (Ne = Le, we = "y1", Ie = Me, Ge = "y0"), Mt(st), Ft(be, ye), function(Ot, kt, Bt) {
                  var xt = kt.xref, Jt = kt.yref, qt = h.getFromId(Bt, xt), en = h.getFromId(Bt, Jt), Yt = "";
                  xt === "paper" || qt.autorange || (Yt += xt), Jt === "paper" || en.autorange || (Yt += Jt), g.setClipUrl(Ot, Yt ? "clip" + Bt._fullLayout._uid + Yt : null, Bt);
                }(me, ye, se), pt.moveFn = tt === "move" ? At : Rt, pt.altKey = st.altKey);
              }, doneFn: function() {
                D(se) || (w(me), lt(be), P(me, se, ye), u.call("_guiRelayout", se, Ae.getUpdateObj()));
              }, clickFn: function() {
                D(se) || lt(be);
              } };
              function Mt(st) {
                if (D(se)) tt = null;
                else if (ct) tt = st.target.tagName === "path" ? "move" : st.target.attributes["data-line-point"].value === "start-point" ? "resize-over-start-point" : "resize-over-end-point";
                else {
                  var Ot = pt.element.getBoundingClientRect(), kt = Ot.right - Ot.left, Bt = Ot.bottom - Ot.top, xt = st.clientX - Ot.left, Jt = st.clientY - Ot.top, qt = !ft && kt > _e && Bt > Be && !st.shiftKey ? x.getCursor(xt / kt, 1 - Jt / Bt) : "move";
                  w(me, qt), tt = qt.split("-")[0];
                }
              }
              function At(st, Ot) {
                if (ye.type === "path") {
                  var kt = function(Jt) {
                    return Jt;
                  }, Bt = kt, xt = kt;
                  $e ? _t("xanchor", ye.xanchor = ot(We + st)) : (Bt = function(Jt) {
                    return ot(Je(Jt) + st);
                  }, Dt && Dt.type === "date" && (Bt = S.encodeDate(Bt))), Ze ? _t("yanchor", ye.yanchor = Ye(Ee + Ot)) : (xt = function(Jt) {
                    return Ye(nt(Jt) + Ot);
                  }, Gt && Gt.type === "date" && (xt = S.encodeDate(xt))), _t("path", ye.path = I(Ke, Bt, xt));
                } else $e ? _t("xanchor", ye.xanchor = ot(We + st)) : (_t("x0", ye.x0 = ot(Se + st)), _t("x1", ye.x1 = ot(De + st))), Ze ? _t("yanchor", ye.yanchor = Ye(Ee + Ot)) : (_t("y0", ye.y0 = Ye(Me + Ot)), _t("y1", ye.y1 = Ye(Le + Ot)));
                me.attr("d", A(se, ye)), Ft(be, ye), d(se, pe, ye, Pt);
              }
              function Rt(st, Ot) {
                if (ft) {
                  var kt = function(Pn) {
                    return Pn;
                  }, Bt = kt, xt = kt;
                  $e ? _t("xanchor", ye.xanchor = ot(We + st)) : (Bt = function(Pn) {
                    return ot(Je(Pn) + st);
                  }, Dt && Dt.type === "date" && (Bt = S.encodeDate(Bt))), Ze ? _t("yanchor", ye.yanchor = Ye(Ee + Ot)) : (xt = function(Pn) {
                    return Ye(nt(Pn) + Ot);
                  }, Gt && Gt.type === "date" && (xt = S.encodeDate(xt))), _t("path", ye.path = I(Ke, Bt, xt));
                } else if (ct) {
                  if (tt === "resize-over-start-point") {
                    var Jt = Se + st, qt = Ze ? Me - Ot : Me + Ot;
                    _t("x0", ye.x0 = $e ? Jt : ot(Jt)), _t("y0", ye.y0 = Ze ? qt : Ye(qt));
                  } else if (tt === "resize-over-end-point") {
                    var en = De + st, Yt = Ze ? Le - Ot : Le + Ot;
                    _t("x1", ye.x1 = $e ? en : ot(en)), _t("y1", ye.y1 = Ze ? Yt : Ye(Yt));
                  }
                } else {
                  var Ht = function(Pn) {
                    return tt.indexOf(Pn) !== -1;
                  }, sn = Ht("n"), fn = Ht("s"), In = Ht("w"), zn = Ht("e"), Cn = sn ? Ne + Ot : Ne, gn = fn ? Ie + Ot : Ie, Mn = In ? ge + st : ge, Xn = zn ? Ce + st : Ce;
                  Ze && (sn && (Cn = Ne - Ot), fn && (gn = Ie - Ot)), (!Ze && gn - Cn > Be || Ze && Cn - gn > Be) && (_t(we, ye[we] = Ze ? Cn : Ye(Cn)), _t(Ge, ye[Ge] = Ze ? gn : Ye(gn))), Xn - Mn > _e && (_t(Re, ye[Re] = $e ? Mn : ot(Mn)), _t(je, ye[je] = $e ? Xn : ot(Xn)));
                }
                me.attr("d", A(se, ye)), Ft(be, ye), d(se, pe, ye, Pt);
              }
              function Ft(st, Ot) {
                ($e || Ze) && function() {
                  var kt = Ot.type !== "path", Bt = st.selectAll(".visual-cue").data([0]);
                  Bt.enter().append("path").attr({ fill: "#fff", "fill-rule": "evenodd", stroke: "#000", "stroke-width": 1 }).classed("visual-cue", !0);
                  var xt = Je($e ? Ot.xanchor : i.midRange(kt ? [Ot.x0, Ot.x1] : S.extractPathCoords(Ot.path, k.paramIsX))), Jt = nt(Ze ? Ot.yanchor : i.midRange(kt ? [Ot.y0, Ot.y1] : S.extractPathCoords(Ot.path, k.paramIsY)));
                  if (xt = S.roundPositionForSharpStrokeRendering(xt, 1), Jt = S.roundPositionForSharpStrokeRendering(Jt, 1), $e && Ze) {
                    var qt = "M" + (xt - 1 - 1) + "," + (Jt - 1 - 1) + "h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";
                    Bt.attr("d", qt);
                  } else if ($e) {
                    var en = "M" + (xt - 1 - 1) + "," + (Jt - 9 - 1) + "v18 h2 v-18 Z";
                    Bt.attr("d", en);
                  } else {
                    var Yt = "M" + (xt - 9 - 1) + "," + (Jt - 1 - 1) + "h18 v2 h-18 Z";
                    Bt.attr("d", Yt);
                  }
                }();
              }
              function lt(st) {
                st.selectAll(".visual-cue").remove();
              }
              x.init(pt), Fe.node().onmousemove = Mt;
            }(O, de, F, T, $, ce) : F.editable === !0 && de.style("pointer-events", Q || c.opacity(Y) * re <= 0.5 ? "stroke" : "all");
            de.node().addEventListener("click", function() {
              return function(se, me) {
                if (L(se)) {
                  var ye = +me.node().getAttribute("data-index");
                  if (ye >= 0) {
                    if (ye === se._fullLayout._activeShapeIndex) return void M(se);
                    se._fullLayout._activeShapeIndex = ye, se._fullLayout._deactivateShape = M, C(se);
                  }
                }
              }(O, de);
            });
          }
          F._input && F.visible === !0 && (F.layer === "above" ? V(O._fullLayout._shapeUpperLayer) : F.xref === "paper" || F.yref === "paper" ? V(O._fullLayout._shapeLowerLayer) : F.layer === "between" ? V(U.shapelayerBetween) : U._hadPlotinfo ? V((U.mainplotinfo || U).shapelayer) : V(O._fullLayout._shapeLowerLayer));
        }
        function P(O, T, z) {
          var F = (z.xref + z.yref).replace(/paper/g, "").replace(/[xyz][1-9]* *domain/g, "");
          g.setClipUrl(O, F ? "clip" + T._fullLayout._uid + F : null, T);
        }
        function I(O, T, z) {
          return O.replace(k.segmentRE, function(F) {
            var U = 0, V = F.charAt(0), $ = k.paramIsX[V], q = k.paramIsY[V], K = k.numParams[V];
            return V + F.substr(1).replace(k.paramRE, function(re) {
              return U >= K || ($[U] ? re = T(re) : q[U] && (re = z(re)), U++), re;
            });
          });
        }
        function M(O) {
          L(O) && O._fullLayout._activeShapeIndex >= 0 && (f(O), delete O._fullLayout._activeShapeIndex, C(O));
        }
        o.exports = { draw: C, drawOne: E, eraseActiveShape: function(O) {
          if (L(O)) {
            f(O);
            var T = O._fullLayout._activeShapeIndex, z = (O.layout || {}).shapes || [];
            if (T < z.length) {
              for (var F = [], U = 0; U < z.length; U++) U !== T && F.push(z[U]);
              return delete O._fullLayout._activeShapeIndex, u.call("_guiRelayout", O, { shapes: F });
            }
          }
        }, drawLabel: d };
      }, 64101: function(o, s, n) {
        var l = n(13582).overrideAll, u = n(9829), i = n(80337), h = n(94850).T, p = n(93049).extendFlat, _ = n(3208).LF, d = n(41235);
        o.exports = l({ newshape: { visible: p({}, u.visible, {}), showlegend: { valType: "boolean", dflt: !1 }, legend: p({}, u.legend, {}), legendgroup: p({}, u.legendgroup, {}), legendgrouptitle: { text: p({}, u.legendgrouptitle.text, {}), font: i({}) }, legendrank: p({}, u.legendrank, {}), legendwidth: p({}, u.legendwidth, {}), line: { color: { valType: "color" }, width: { valType: "number", min: 0, dflt: 4 }, dash: p({}, h, { dflt: "solid" }) }, fillcolor: { valType: "color", dflt: "rgba(0,0,0,0)" }, fillrule: { valType: "enumerated", values: ["evenodd", "nonzero"], dflt: "evenodd" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, layer: { valType: "enumerated", values: ["below", "above", "between"], dflt: "above" }, drawdirection: { valType: "enumerated", values: ["ortho", "horizontal", "vertical", "diagonal"], dflt: "diagonal" }, name: p({}, u.name, {}), label: { text: { valType: "string", dflt: "" }, texttemplate: _({ newshape: !0 }, { keys: Object.keys(d) }), font: i({}), textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right", "start", "middle", "end"] }, textangle: { valType: "angle", dflt: "auto" }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "auto" }, yanchor: { valType: "enumerated", values: ["top", "middle", "bottom"] }, padding: { valType: "number", dflt: 3, min: 0 } } }, activeshape: { fillcolor: { valType: "color", dflt: "rgb(255,0,255)" }, opacity: { valType: "number", min: 0, max: 1, dflt: 0.5 } } }, "none", "from-root");
      }, 93391: function(o) {
        o.exports = { CIRCLE_SIDES: 32, i000: 0, i090: 8, i180: 16, i270: 24, cos45: Math.cos(Math.PI / 4), sin45: Math.sin(Math.PI / 4), SQRT2: Math.sqrt(2) };
      }, 85522: function(o, s, n) {
        var l = n(78766), u = n(34809);
        o.exports = function(i, h, p) {
          if (p("newshape.visible"), p("newshape.name"), p("newshape.showlegend"), p("newshape.legend"), p("newshape.legendwidth"), p("newshape.legendgroup"), p("newshape.legendgrouptitle.text"), u.coerceFont(p, "newshape.legendgrouptitle.font"), p("newshape.legendrank"), p("newshape.drawdirection"), p("newshape.layer"), p("newshape.fillcolor"), p("newshape.fillrule"), p("newshape.opacity"), p("newshape.line.width")) {
            var _ = (i || {}).plot_bgcolor || "#FFF";
            p("newshape.line.color", l.contrast(_)), p("newshape.line.dash");
          }
          var d = i.dragmode === "drawline", f = p("newshape.label.text"), c = p("newshape.label.texttemplate");
          if (f || c) {
            p("newshape.label.textangle");
            var g = p("newshape.label.textposition", d ? "middle" : "middle center");
            p("newshape.label.xanchor"), p("newshape.label.yanchor", function(m, x) {
              return m ? "bottom" : x.indexOf("top") !== -1 ? "top" : x.indexOf("bottom") !== -1 ? "bottom" : "middle";
            }(d, g)), p("newshape.label.padding"), u.coerceFont(p, "newshape.label.font", h.font);
          }
          p("activeshape.fillcolor"), p("activeshape.opacity");
        };
      }, 81055: function(o, s, n) {
        var l = n(26953), u = n(93391), i = u.CIRCLE_SIDES, h = u.SQRT2, p = n(49801), _ = p.p2r, d = p.r2p, f = [0, 3, 4, 5, 6, 1, 2], c = [0, 3, 4, 1, 2];
        function g(x, w) {
          return Math.abs(x - w) <= 1e-6;
        }
        function m(x, w) {
          var k = w[1] - x[1], S = w[2] - x[2];
          return Math.sqrt(k * k + S * S);
        }
        s.writePaths = function(x) {
          var w = x.length;
          if (!w) return "M0,0Z";
          for (var k = "", S = 0; S < w; S++) for (var A = x[S].length, C = 0; C < A; C++) {
            var D = x[S][C][0];
            if (D === "Z") k += "Z";
            else for (var L = x[S][C].length, E = 0; E < L; E++) {
              var P = E;
              D === "Q" || D === "S" ? P = c[E] : D === "C" && (P = f[E]), k += x[S][C][P], E > 0 && E < L - 1 && (k += ",");
            }
          }
          return k;
        }, s.readPaths = function(x, w, k, S) {
          var A, C, D, L = l(x), E = [], P = -1, I = 0, M = 0, O = function() {
            C = I, D = M;
          };
          O();
          for (var T = 0; T < L.length; T++) {
            var z, F, U, V, $ = [], q = L[T][0], K = q;
            switch (q) {
              case "M":
                E[++P] = [], I = +L[T][1], M = +L[T][2], $.push([K, I, M]), O();
                break;
              case "Q":
              case "S":
                z = +L[T][1], U = +L[T][2], I = +L[T][3], M = +L[T][4], $.push([K, I, M, z, U]);
                break;
              case "C":
                z = +L[T][1], U = +L[T][2], F = +L[T][3], V = +L[T][4], I = +L[T][5], M = +L[T][6], $.push([K, I, M, z, U, F, V]);
                break;
              case "T":
              case "L":
                I = +L[T][1], M = +L[T][2], $.push([K, I, M]);
                break;
              case "H":
                K = "L", I = +L[T][1], $.push([K, I, M]);
                break;
              case "V":
                K = "L", M = +L[T][1], $.push([K, I, M]);
                break;
              case "A":
                K = "L";
                var re = +L[T][1], Y = +L[T][2];
                +L[T][4] || (re = -re, Y = -Y);
                var te = I - re, ee = M;
                for (A = 1; A <= i / 2; A++) {
                  var X = 2 * Math.PI * A / i;
                  $.push([K, te + re * Math.cos(X), ee + Y * Math.sin(X)]);
                }
                break;
              case "Z":
                I === C && M === D || (I = C, M = D, $.push([K, I, M]));
            }
            for (var Q = (k || {}).domain, ue = w._fullLayout._size, ce = k && k.xsizemode === "pixel", he = k && k.ysizemode === "pixel", de = S === !1, ne = 0; ne < $.length; ne++) {
              for (A = 0; A + 2 < 7; A += 2) {
                var ae = $[ne][A + 1], se = $[ne][A + 2];
                ae !== void 0 && se !== void 0 && (I = ae, M = se, k && (k.xaxis && k.xaxis.p2r ? (de && (ae -= k.xaxis._offset), ae = ce ? d(k.xaxis, k.xanchor) + ae : _(k.xaxis, ae)) : (de && (ae -= ue.l), Q ? ae = Q.x[0] + ae / ue.w : ae /= ue.w), k.yaxis && k.yaxis.p2r ? (de && (se -= k.yaxis._offset), se = he ? d(k.yaxis, k.yanchor) - se : _(k.yaxis, se)) : (de && (se -= ue.t), se = Q ? Q.y[1] - se / ue.h : 1 - se / ue.h)), $[ne][A + 1] = ae, $[ne][A + 2] = se);
              }
              E[P].push($[ne].slice());
            }
          }
          return E;
        }, s.pointsOnRectangle = function(x) {
          if (x.length !== 5) return !1;
          for (var w = 1; w < 3; w++)
            if (!g(x[0][w] - x[1][w], x[3][w] - x[2][w]) || !g(x[0][w] - x[3][w], x[1][w] - x[2][w])) return !1;
          return !(!g(x[0][1], x[1][1]) && !g(x[0][1], x[3][1]) || !(m(x[0], x[1]) * m(x[0], x[3])));
        }, s.pointsOnEllipse = function(x) {
          var w = x.length;
          if (w !== i + 1) return !1;
          w = i;
          for (var k = 0; k < w; k++) {
            var S = (2 * w - k) % w, A = (w / 2 + S) % w, C = (w / 2 + k) % w;
            if (!g(m(x[k], x[C]), m(x[S], x[A]))) return !1;
          }
          return !0;
        }, s.handleEllipse = function(x, w, k) {
          if (!x) return [w, k];
          var S = s.ellipseOver({ x0: w[0], y0: w[1], x1: k[0], y1: k[1] }), A = (S.x1 + S.x0) / 2, C = (S.y1 + S.y0) / 2, D = (S.x1 - S.x0) / 2, L = (S.y1 - S.y0) / 2;
          D || (D = L /= h), L || (L = D /= h);
          for (var E = [], P = 0; P < i; P++) {
            var I = 2 * P * Math.PI / i;
            E.push([A + D * Math.cos(I), C + L * Math.sin(I)]);
          }
          return E;
        }, s.ellipseOver = function(x) {
          var w = x.x0, k = x.y0, S = x.x1, A = x.y1, C = S - w, D = A - k, L = ((w -= C) + S) / 2, E = ((k -= D) + A) / 2;
          return { x0: L - (C *= h), y0: E - (D *= h), x1: L + C, y1: E + D };
        }, s.fixDatesForPaths = function(x, w, k) {
          var S = w.type === "date", A = k.type === "date";
          if (!S && !A) return x;
          for (var C = 0; C < x.length; C++) for (var D = 0; D < x[C].length; D++) for (var L = 0; L + 2 < x[C][D].length; L += 2) S && (x[C][D][L + 1] = x[C][D][L + 1].replace(" ", "_")), A && (x[C][D][L + 2] = x[C][D][L + 2].replace(" ", "_"));
          return x;
        };
      }, 87562: function(o, s, n) {
        var l = n(70414), u = l.drawMode, i = l.openMode, h = n(93391), p = h.i000, _ = h.i090, d = h.i180, f = h.i270, c = h.cos45, g = h.sin45, m = n(49801), x = m.p2r, w = m.r2p, k = n(78534).clearOutline, S = n(81055), A = S.readPaths, C = S.writePaths, D = S.ellipseOver, L = S.fixDatesForPaths;
        function E(P, I, M) {
          var O, T = P[0][0], z = I.gd, F = T.getAttribute("d"), U = z._fullLayout.newshape, V = I.plotinfo, $ = I.isActiveShape, q = V.xaxis, K = V.yaxis, re = !!V.domain || !V.xaxis, Y = !!V.domain || !V.yaxis, te = i(M), ee = A(F, z, V, $), X = { editable: !0, visible: U.visible, name: U.name, showlegend: U.showlegend, legend: U.legend, legendwidth: U.legendwidth, legendgroup: U.legendgroup, legendgrouptitle: { text: U.legendgrouptitle.text, font: U.legendgrouptitle.font }, legendrank: U.legendrank, label: U.label, xref: re ? "paper" : q._id, yref: Y ? "paper" : K._id, layer: U.layer, opacity: U.opacity, line: { color: U.line.color, width: U.line.width, dash: U.line.dash } };
          if (te || (X.fillcolor = U.fillcolor, X.fillrule = U.fillrule), ee.length === 1 && (O = ee[0]), O && O.length === 5 && M === "drawrect") X.type = "rect", X.x0 = O[0][1], X.y0 = O[0][2], X.x1 = O[2][1], X.y1 = O[2][2];
          else if (O && M === "drawline") X.type = "line", X.x0 = O[0][1], X.y0 = O[0][2], X.x1 = O[1][1], X.y1 = O[1][2];
          else if (O && M === "drawcircle") {
            X.type = "circle";
            var Q = O[p][1], ue = O[_][1], ce = O[d][1], he = O[f][1], de = O[p][2], ne = O[_][2], ae = O[d][2], se = O[f][2], me = V.xaxis && (V.xaxis.type === "date" || V.xaxis.type === "log"), ye = V.yaxis && (V.yaxis.type === "date" || V.yaxis.type === "log");
            me && (Q = w(V.xaxis, Q), ue = w(V.xaxis, ue), ce = w(V.xaxis, ce), he = w(V.xaxis, he)), ye && (de = w(V.yaxis, de), ne = w(V.yaxis, ne), ae = w(V.yaxis, ae), se = w(V.yaxis, se));
            var pe = (ue + he) / 2, be = (de + ae) / 2, Ae = D({ x0: pe, y0: be, x1: pe + (he - ue + ce - Q) / 2 * c, y1: be + (se - ne + ae - de) / 2 * g });
            me && (Ae.x0 = x(V.xaxis, Ae.x0), Ae.x1 = x(V.xaxis, Ae.x1)), ye && (Ae.y0 = x(V.yaxis, Ae.y0), Ae.y1 = x(V.yaxis, Ae.y1)), X.x0 = Ae.x0, X.y0 = Ae.y0, X.x1 = Ae.x1, X.y1 = Ae.y1;
          } else X.type = "path", q && K && L(ee, q, K), X.path = C(ee), O = null;
          return X;
        }
        o.exports = { newShapes: function(P, I) {
          if (P.length && P[0][0]) {
            var M = I.gd, O = I.isActiveShape, T = I.dragmode, z = (M.layout || {}).shapes || [];
            if (!u(T) && O !== void 0) {
              var F = M._fullLayout._activeShapeIndex;
              if (F < z.length) switch (M._fullLayout.shapes[F].type) {
                case "rect":
                  T = "drawrect";
                  break;
                case "circle":
                  T = "drawcircle";
                  break;
                case "line":
                  T = "drawline";
                  break;
                case "path":
                  var U = z[F].path || "";
                  T = U[U.length - 1] === "Z" ? "drawclosedpath" : "drawopenpath";
              }
            }
            var V = E(P, I, T);
            k(M);
            for (var $ = I.editHelpers, q = ($ || {}).modifyItem, K = [], re = 0; re < z.length; re++) {
              var Y = M._fullLayout.shapes[re];
              if (K[re] = Y._input, O !== void 0 && re === M._fullLayout._activeShapeIndex) {
                var te = V;
                switch (Y.type) {
                  case "line":
                  case "rect":
                  case "circle":
                    q("x0", te.x0 - (Y.x0shift || 0)), q("x1", te.x1 - (Y.x1shift || 0)), q("y0", te.y0 - (Y.y0shift || 0)), q("y1", te.y1 - (Y.y1shift || 0));
                    break;
                  case "path":
                    q("path", te.path);
                }
              }
            }
            return O === void 0 ? (K.push(V), K) : $ ? $.getUpdateObj() : {};
          }
        }, createShapeObj: E };
      }, 78534: function(o) {
        o.exports = { clearOutlineControllers: function(s) {
          var n = s._fullLayout._zoomlayer;
          n && n.selectAll(".outline-controllers").remove();
        }, clearOutline: function(s) {
          var n = s._fullLayout._zoomlayer;
          n && n.selectAll(".select-outline").remove(), s._fullLayout._outlining = !1;
        } };
      }, 49728: function(o, s, n) {
        var l = n(2956), u = n(34809), i = n(29714);
        function h(p, _) {
          var d = 0;
          return (_ = _ || 0) && p && (p.type === "category" || p.type === "multicategory") && (d = (p.r2p(1) - p.r2p(0)) * _), d;
        }
        s.rangeToShapePosition = function(p) {
          return p.type === "log" ? p.r2d : function(_) {
            return _;
          };
        }, s.shapePositionToRange = function(p) {
          return p.type === "log" ? p.d2r : function(_) {
            return _;
          };
        }, s.decodeDate = function(p) {
          return function(_) {
            return _.replace && (_ = _.replace("_", " ")), p(_);
          };
        }, s.encodeDate = function(p) {
          return function(_) {
            return p(_).replace(" ", "_");
          };
        }, s.extractPathCoords = function(p, _, d) {
          var f = [];
          return p.match(l.segmentRE).forEach(function(c) {
            var g = _[c.charAt(0)].drawn;
            if (g !== void 0) {
              var m = c.substr(1).match(l.paramRE);
              if (m && !(m.length < g)) {
                var x = m[g], w = d ? x : u.cleanNumber(x);
                f.push(w);
              }
            }
          }), f;
        }, s.getDataToPixel = function(p, _, d, f, c) {
          var g, m = p._fullLayout._size;
          if (_) if (c === "domain") g = function(w) {
            return _._length * (f ? 1 - w : w) + _._offset;
          };
          else {
            var x = s.shapePositionToRange(_);
            g = function(w) {
              var k = h(_, d);
              return _._offset + _.r2p(x(w, !0)) + k;
            }, _.type === "date" && (g = s.decodeDate(g));
          }
          else g = f ? function(w) {
            return m.t + m.h * (1 - w);
          } : function(w) {
            return m.l + m.w * w;
          };
          return g;
        }, s.getPixelToData = function(p, _, d, f) {
          var c, g = p._fullLayout._size;
          if (_) if (f === "domain") c = function(x) {
            var w = (x - _._offset) / _._length;
            return d ? 1 - w : w;
          };
          else {
            var m = s.rangeToShapePosition(_);
            c = function(x) {
              return m(_.p2r(x - _._offset));
            };
          }
          else c = d ? function(x) {
            return 1 - (x - g.t) / g.h;
          } : function(x) {
            return (x - g.l) / g.w;
          };
          return c;
        }, s.roundPositionForSharpStrokeRendering = function(p, _) {
          var d = Math.round(_ % 2) === 1, f = Math.round(p);
          return d ? f + 0.5 : f;
        }, s.makeShapesOptionsAndPlotinfo = function(p, _) {
          var d = p._fullLayout.shapes[_] || {}, f = p._fullLayout._plots[d.xref + d.yref];
          return f ? f._hadPlotinfo = !0 : (f = {}, d.xref && d.xref !== "paper" && (f.xaxis = p._fullLayout[d.xref + "axis"]), d.yref && d.yref !== "paper" && (f.yaxis = p._fullLayout[d.yref + "axis"])), f.xsizemode = d.xsizemode, f.ysizemode = d.ysizemode, f.xanchor = d.xanchor, f.yanchor = d.yanchor, { options: d, plotinfo: f };
        }, s.makeSelectionsOptionsAndPlotinfo = function(p, _) {
          var d = p._fullLayout.selections[_] || {}, f = p._fullLayout._plots[d.xref + d.yref];
          return f ? f._hadPlotinfo = !0 : (f = {}, d.xref && (f.xaxis = p._fullLayout[d.xref + "axis"]), d.yref && (f.yaxis = p._fullLayout[d.yref + "axis"])), { options: d, plotinfo: f };
        }, s.getPathString = function(p, _) {
          var d, f, c, g, m, x, w, k, S = _.type, A = i.getRefType(_.xref), C = i.getRefType(_.yref), D = i.getFromId(p, _.xref), L = i.getFromId(p, _.yref), E = p._fullLayout._size, P = h(D, _.x0shift), I = h(D, _.x1shift), M = h(L, _.y0shift), O = h(L, _.y1shift);
          if (D ? A === "domain" ? f = function(re) {
            return D._offset + D._length * re;
          } : (d = s.shapePositionToRange(D), f = function(re) {
            return D._offset + D.r2p(d(re, !0));
          }) : f = function(re) {
            return E.l + E.w * re;
          }, L ? C === "domain" ? g = function(re) {
            return L._offset + L._length * (1 - re);
          } : (c = s.shapePositionToRange(L), g = function(re) {
            return L._offset + L.r2p(c(re, !0));
          }) : g = function(re) {
            return E.t + E.h * (1 - re);
          }, S === "path") return D && D.type === "date" && (f = s.decodeDate(f)), L && L.type === "date" && (g = s.decodeDate(g)), function(re, Y, te) {
            var ee = re.path, X = re.xsizemode, Q = re.ysizemode, ue = re.xanchor, ce = re.yanchor;
            return ee.replace(l.segmentRE, function(he) {
              var de = 0, ne = he.charAt(0), ae = l.paramIsX[ne], se = l.paramIsY[ne], me = l.numParams[ne], ye = he.substr(1).replace(l.paramRE, function(pe) {
                return ae[de] ? pe = X === "pixel" ? Y(ue) + Number(pe) : Y(pe) : se[de] && (pe = Q === "pixel" ? te(ce) - Number(pe) : te(pe)), ++de > me && (pe = "X"), pe;
              });
              return de > me && (ye = ye.replace(/[\s,]*X.*/, ""), u.log("Ignoring extra params in segment " + he)), ne + ye;
            });
          }(_, f, g);
          if (_.xsizemode === "pixel") {
            var T = f(_.xanchor);
            m = T + _.x0 + P, x = T + _.x1 + I;
          } else m = f(_.x0) + P, x = f(_.x1) + I;
          if (_.ysizemode === "pixel") {
            var z = g(_.yanchor);
            w = z - _.y0 + M, k = z - _.y1 + O;
          } else w = g(_.y0) + M, k = g(_.y1) + O;
          if (S === "line") return "M" + m + "," + w + "L" + x + "," + k;
          if (S === "rect") return "M" + m + "," + w + "H" + x + "V" + k + "H" + m + "Z";
          var F = (m + x) / 2, U = (w + k) / 2, V = Math.abs(F - m), $ = Math.abs(U - w), q = "A" + V + "," + $, K = F + V + "," + U;
          return "M" + K + q + " 0 1,1 " + F + "," + (U - $) + q + " 0 0,1 " + K + "Z";
        };
      }, 43701: function(o, s, n) {
        var l = n(28231);
        o.exports = { moduleType: "component", name: "shapes", layoutAttributes: n(43144), supplyLayoutDefaults: n(74367), supplyDrawNewShapeDefaults: n(85522), includeBasePlot: n(20706)("shapes"), calcAutorange: n(44959), draw: l.draw, drawOne: l.drawOne };
      }, 41235: function(o) {
        function s(d, f) {
          return f ? f.d2l(d) : d;
        }
        function n(d, f) {
          return f ? f.l2d(d) : d;
        }
        function l(d) {
          return d.x0shift || 0;
        }
        function u(d) {
          return d.x1shift || 0;
        }
        function i(d) {
          return d.y0shift || 0;
        }
        function h(d) {
          return d.y1shift || 0;
        }
        function p(d, f) {
          return s(d.x1, f) + u(d) - s(d.x0, f) - l(d);
        }
        function _(d, f, c) {
          return s(d.y1, c) + h(d) - s(d.y0, c) - i(d);
        }
        o.exports = { x0: function(d) {
          return d.x0;
        }, x1: function(d) {
          return d.x1;
        }, y0: function(d) {
          return d.y0;
        }, y1: function(d) {
          return d.y1;
        }, slope: function(d, f, c) {
          return d.type !== "line" ? void 0 : _(d, 0, c) / p(d, f);
        }, dx: p, dy: _, width: function(d, f) {
          return Math.abs(p(d, f));
        }, height: function(d, f, c) {
          return Math.abs(_(d, 0, c));
        }, length: function(d, f, c) {
          return d.type !== "line" ? void 0 : Math.sqrt(Math.pow(p(d, f), 2) + Math.pow(_(d, 0, c), 2));
        }, xcenter: function(d, f) {
          return n((s(d.x1, f) + u(d) + s(d.x0, f) + l(d)) / 2, f);
        }, ycenter: function(d, f, c) {
          return n((s(d.y1, c) + h(d) + s(d.y0, c) + i(d)) / 2, c);
        } };
      }, 8606: function(o, s, n) {
        var l = n(80337), u = n(57891), i = n(93049).extendDeepAll, h = n(13582).overrideAll, p = n(49722), _ = n(78032).templatedArray, d = n(64194), f = _("step", { visible: { valType: "boolean", dflt: !0 }, method: { valType: "enumerated", values: ["restyle", "relayout", "animate", "update", "skip"], dflt: "restyle" }, args: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, label: { valType: "string" }, value: { valType: "string" }, execute: { valType: "boolean", dflt: !0 } });
        o.exports = h(_("slider", { visible: { valType: "boolean", dflt: !0 }, active: { valType: "number", min: 0, dflt: 0 }, steps: f, lenmode: { valType: "enumerated", values: ["fraction", "pixels"], dflt: "fraction" }, len: { valType: "number", min: 0, dflt: 1 }, x: { valType: "number", min: -2, max: 3, dflt: 0 }, pad: i(u({ editType: "arraydraw" }), {}, { t: { dflt: 20 } }), xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "left" }, y: { valType: "number", min: -2, max: 3, dflt: 0 }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "top" }, transition: { duration: { valType: "number", min: 0, dflt: 150 }, easing: { valType: "enumerated", values: p.transition.easing.values, dflt: "cubic-in-out" } }, currentvalue: { visible: { valType: "boolean", dflt: !0 }, xanchor: { valType: "enumerated", values: ["left", "center", "right"], dflt: "left" }, offset: { valType: "number", dflt: 10 }, prefix: { valType: "string" }, suffix: { valType: "string" }, font: l({}) }, font: l({}), activebgcolor: { valType: "color", dflt: d.gripBgActiveColor }, bgcolor: { valType: "color", dflt: d.railBgColor }, bordercolor: { valType: "color", dflt: d.railBorderColor }, borderwidth: { valType: "number", min: 0, dflt: d.railBorderWidth }, ticklen: { valType: "number", min: 0, dflt: d.tickLength }, tickcolor: { valType: "color", dflt: d.tickColor }, tickwidth: { valType: "number", min: 0, dflt: 1 }, minorticklen: { valType: "number", min: 0, dflt: d.minorTickLength } }), "arraydraw", "from-root");
      }, 64194: function(o) {
        o.exports = { name: "sliders", containerClassName: "slider-container", groupClassName: "slider-group", inputAreaClass: "slider-input-area", railRectClass: "slider-rail-rect", railTouchRectClass: "slider-rail-touch-rect", gripRectClass: "slider-grip-rect", tickRectClass: "slider-tick-rect", inputProxyClass: "slider-input-proxy", labelsClass: "slider-labels", labelGroupClass: "slider-label-group", labelClass: "slider-label", currentValueClass: "slider-current-value", railHeight: 5, menuIndexAttrName: "slider-active-index", autoMarginIdRoot: "slider-", minWidth: 30, minHeight: 30, textPadX: 40, arrowOffsetX: 4, railRadius: 2, railWidth: 5, railBorder: 4, railBorderWidth: 1, railBorderColor: "#bec8d9", railBgColor: "#f8fafc", railInset: 8, stepInset: 10, gripRadius: 10, gripWidth: 20, gripHeight: 20, gripBorder: 20, gripBorderWidth: 1, gripBorderColor: "#bec8d9", gripBgColor: "#f6f8fa", gripBgActiveColor: "#dbdde0", labelPadding: 8, labelOffset: 0, tickWidth: 1, tickColor: "#333", tickOffset: 25, tickLength: 7, minorTickOffset: 25, minorTickColor: "#333", minorTickLength: 4, currentValuePadding: 8, currentValueInset: 0 };
      }, 74537: function(o, s, n) {
        var l = n(34809), u = n(59008), i = n(8606), h = n(64194).name, p = i.steps;
        function _(f, c, g) {
          function m(A, C) {
            return l.coerce(f, c, i, A, C);
          }
          for (var x = u(f, c, { name: "steps", handleItemDefaults: d }), w = 0, k = 0; k < x.length; k++) x[k].visible && w++;
          if (w < 2 ? c.visible = !1 : m("visible")) {
            c._stepCount = w;
            var S = c._visibleSteps = l.filterVisible(x);
            (x[m("active")] || {}).visible || (c.active = S[0]._index), m("x"), m("y"), l.noneOrAll(f, c, ["x", "y"]), m("xanchor"), m("yanchor"), m("len"), m("lenmode"), m("pad.t"), m("pad.r"), m("pad.b"), m("pad.l"), l.coerceFont(m, "font", g.font), m("currentvalue.visible") && (m("currentvalue.xanchor"), m("currentvalue.prefix"), m("currentvalue.suffix"), m("currentvalue.offset"), l.coerceFont(m, "currentvalue.font", c.font)), m("transition.duration"), m("transition.easing"), m("bgcolor"), m("activebgcolor"), m("bordercolor"), m("borderwidth"), m("ticklen"), m("tickwidth"), m("tickcolor"), m("minorticklen");
          }
        }
        function d(f, c) {
          function g(x, w) {
            return l.coerce(f, c, p, x, w);
          }
          if (f.method === "skip" || Array.isArray(f.args) ? g("visible") : c.visible = !1) {
            g("method"), g("args");
            var m = g("label", "step-" + c._index);
            g("value", m), g("execute");
          }
        }
        o.exports = function(f, c) {
          u(f, c, { name: h, handleItemDefaults: _ });
        };
      }, 44097: function(o, s, n) {
        var l = n(45568), u = n(44122), i = n(78766), h = n(62203), p = n(34809), _ = p.strTranslate, d = n(30635), f = n(78032).arrayEditor, c = n(64194), g = n(4530), m = g.LINE_SPACING, x = g.FROM_TL, w = g.FROM_BR;
        function k($) {
          return c.autoMarginIdRoot + $._index;
        }
        function S($) {
          return $._index;
        }
        function A($, q) {
          var K = h.tester.selectAll("g." + c.labelGroupClass).data(q._visibleSteps);
          K.enter().append("g").classed(c.labelGroupClass, !0);
          var re = 0, Y = 0;
          K.each(function(ne) {
            var ae = L(l.select(this), { step: ne }, q).node();
            if (ae) {
              var se = h.bBox(ae);
              Y = Math.max(Y, se.height), re = Math.max(re, se.width);
            }
          }), K.remove();
          var te = q._dims = {};
          te.inputAreaWidth = Math.max(c.railWidth, c.gripHeight);
          var ee = $._fullLayout._size;
          te.lx = ee.l + ee.w * q.x, te.ly = ee.t + ee.h * (1 - q.y), q.lenmode === "fraction" ? te.outerLength = Math.round(ee.w * q.len) : te.outerLength = q.len, te.inputAreaStart = 0, te.inputAreaLength = Math.round(te.outerLength - q.pad.l - q.pad.r);
          var X = (te.inputAreaLength - 2 * c.stepInset) / (q._stepCount - 1), Q = re + c.labelPadding;
          if (te.labelStride = Math.max(1, Math.ceil(Q / X)), te.labelHeight = Y, te.currentValueMaxWidth = 0, te.currentValueHeight = 0, te.currentValueTotalHeight = 0, te.currentValueMaxLines = 1, q.currentvalue.visible) {
            var ue = h.tester.append("g");
            K.each(function(ne) {
              var ae = C(ue, q, ne.label), se = ae.node() && h.bBox(ae.node()) || { width: 0, height: 0 }, me = d.lineCount(ae);
              te.currentValueMaxWidth = Math.max(te.currentValueMaxWidth, Math.ceil(se.width)), te.currentValueHeight = Math.max(te.currentValueHeight, Math.ceil(se.height)), te.currentValueMaxLines = Math.max(te.currentValueMaxLines, me);
            }), te.currentValueTotalHeight = te.currentValueHeight + q.currentvalue.offset, ue.remove();
          }
          te.height = te.currentValueTotalHeight + c.tickOffset + q.ticklen + c.labelOffset + te.labelHeight + q.pad.t + q.pad.b;
          var ce = "left";
          p.isRightAnchor(q) && (te.lx -= te.outerLength, ce = "right"), p.isCenterAnchor(q) && (te.lx -= te.outerLength / 2, ce = "center");
          var he = "top";
          p.isBottomAnchor(q) && (te.ly -= te.height, he = "bottom"), p.isMiddleAnchor(q) && (te.ly -= te.height / 2, he = "middle"), te.outerLength = Math.ceil(te.outerLength), te.height = Math.ceil(te.height), te.lx = Math.round(te.lx), te.ly = Math.round(te.ly);
          var de = { y: q.y, b: te.height * w[he], t: te.height * x[he] };
          q.lenmode === "fraction" ? (de.l = 0, de.xl = q.x - q.len * x[ce], de.r = 0, de.xr = q.x + q.len * w[ce]) : (de.x = q.x, de.l = te.outerLength * x[ce], de.r = te.outerLength * w[ce]), u.autoMargin($, k(q), de);
        }
        function C($, q, K) {
          if (q.currentvalue.visible) {
            var re, Y, te = q._dims;
            switch (q.currentvalue.xanchor) {
              case "right":
                re = te.inputAreaLength - c.currentValueInset - te.currentValueMaxWidth, Y = "left";
                break;
              case "center":
                re = 0.5 * te.inputAreaLength, Y = "middle";
                break;
              default:
                re = c.currentValueInset, Y = "left";
            }
            var ee = p.ensureSingle($, "text", c.labelClass, function(de) {
              de.attr({ "text-anchor": Y, "data-notex": 1 });
            }), X = q.currentvalue.prefix ? q.currentvalue.prefix : "";
            if (typeof K == "string") X += K;
            else {
              var Q = q.steps[q.active].label, ue = q._gd._fullLayout._meta;
              ue && (Q = p.templateString(Q, ue)), X += Q;
            }
            q.currentvalue.suffix && (X += q.currentvalue.suffix), ee.call(h.font, q.currentvalue.font).text(X).call(d.convertToTspans, q._gd);
            var ce = d.lineCount(ee), he = (te.currentValueMaxLines + 1 - ce) * q.currentvalue.font.size * m;
            return d.positionText(ee, re, he), ee;
          }
        }
        function D($, q, K) {
          p.ensureSingle($, "rect", c.gripRectClass, function(re) {
            re.call(M, q, $, K).style("pointer-events", "all");
          }).attr({ width: c.gripWidth, height: c.gripHeight, rx: c.gripRadius, ry: c.gripRadius }).call(i.stroke, K.bordercolor).call(i.fill, K.bgcolor).style("stroke-width", K.borderwidth + "px");
        }
        function L($, q, K) {
          var re = p.ensureSingle($, "text", c.labelClass, function(ee) {
            ee.attr({ "text-anchor": "middle", "data-notex": 1 });
          }), Y = q.step.label, te = K._gd._fullLayout._meta;
          return te && (Y = p.templateString(Y, te)), re.call(h.font, K.font).text(Y).call(d.convertToTspans, K._gd), re;
        }
        function E($, q) {
          var K = p.ensureSingle($, "g", c.labelsClass), re = q._dims, Y = K.selectAll("g." + c.labelGroupClass).data(re.labelSteps);
          Y.enter().append("g").classed(c.labelGroupClass, !0), Y.exit().remove(), Y.each(function(te) {
            var ee = l.select(this);
            ee.call(L, te, q), h.setTranslate(ee, z(q, te.fraction), c.tickOffset + q.ticklen + q.font.size * m + c.labelOffset + re.currentValueTotalHeight);
          });
        }
        function P($, q, K, re, Y) {
          var te = Math.round(re * (K._stepCount - 1)), ee = K._visibleSteps[te]._index;
          ee !== K.active && I($, q, K, ee, !0, Y);
        }
        function I($, q, K, re, Y, te) {
          var ee = K.active;
          K.active = re, f($.layout, c.name, K).applyUpdate("active", re);
          var X = K.steps[K.active];
          q.call(T, K, te), q.call(C, K), $.emit("plotly_sliderchange", { slider: K, step: K.steps[K.active], interaction: Y, previousActive: ee }), X && X.method && Y && (q._nextMethod ? (q._nextMethod.step = X, q._nextMethod.doCallback = Y, q._nextMethod.doTransition = te) : (q._nextMethod = { step: X, doCallback: Y, doTransition: te }, q._nextMethodRaf = window.requestAnimationFrame(function() {
            var Q = q._nextMethod.step;
            Q.method && (Q.execute && u.executeAPICommand($, Q.method, Q.args), q._nextMethod = null, q._nextMethodRaf = null);
          })));
        }
        function M($, q, K) {
          if (!q._context.staticPlot) {
            var re = K.node(), Y = l.select(q);
            $.on("mousedown", ee), $.on("touchstart", ee);
          }
          function te() {
            return K.data()[0];
          }
          function ee() {
            var X = te();
            q.emit("plotly_sliderstart", { slider: X });
            var Q = K.select("." + c.gripRectClass);
            l.event.stopPropagation(), l.event.preventDefault(), Q.call(i.fill, X.activebgcolor);
            var ue = F(X, l.mouse(re)[0]);
            function ce() {
              var de = te(), ne = F(de, l.mouse(re)[0]);
              P(q, K, de, ne, !1);
            }
            function he() {
              var de = te();
              de._dragging = !1, Q.call(i.fill, de.bgcolor), Y.on("mouseup", null), Y.on("mousemove", null), Y.on("touchend", null), Y.on("touchmove", null), q.emit("plotly_sliderend", { slider: de, step: de.steps[de.active] });
            }
            P(q, K, X, ue, !0), X._dragging = !0, Y.on("mousemove", ce), Y.on("touchmove", ce), Y.on("mouseup", he), Y.on("touchend", he);
          }
        }
        function O($, q) {
          var K = $.selectAll("rect." + c.tickRectClass).data(q._visibleSteps), re = q._dims;
          K.enter().append("rect").classed(c.tickRectClass, !0), K.exit().remove(), K.attr({ width: q.tickwidth + "px", "shape-rendering": "crispEdges" }), K.each(function(Y, te) {
            var ee = te % re.labelStride == 0, X = l.select(this);
            X.attr({ height: ee ? q.ticklen : q.minorticklen }).call(i.fill, q.tickcolor), h.setTranslate(X, z(q, te / (q._stepCount - 1)) - 0.5 * q.tickwidth, (ee ? c.tickOffset : c.minorTickOffset) + re.currentValueTotalHeight);
          });
        }
        function T($, q, K) {
          for (var re = $.select("rect." + c.gripRectClass), Y = 0, te = 0; te < q._stepCount; te++) if (q._visibleSteps[te]._index === q.active) {
            Y = te;
            break;
          }
          var ee = z(q, Y / (q._stepCount - 1));
          if (!q._invokingCommand) {
            var X = re;
            K && q.transition.duration > 0 && (X = X.transition().duration(q.transition.duration).ease(q.transition.easing)), X.attr("transform", _(ee - 0.5 * c.gripWidth, q._dims.currentValueTotalHeight));
          }
        }
        function z($, q) {
          var K = $._dims;
          return K.inputAreaStart + c.stepInset + (K.inputAreaLength - 2 * c.stepInset) * Math.min(1, Math.max(0, q));
        }
        function F($, q) {
          var K = $._dims;
          return Math.min(1, Math.max(0, (q - c.stepInset - K.inputAreaStart) / (K.inputAreaLength - 2 * c.stepInset - 2 * K.inputAreaStart)));
        }
        function U($, q, K) {
          var re = K._dims, Y = p.ensureSingle($, "rect", c.railTouchRectClass, function(te) {
            te.call(M, q, $, K).style("pointer-events", "all");
          });
          Y.attr({ width: re.inputAreaLength, height: Math.max(re.inputAreaWidth, c.tickOffset + K.ticklen + re.labelHeight) }).call(i.fill, K.bgcolor).attr("opacity", 0), h.setTranslate(Y, 0, re.currentValueTotalHeight);
        }
        function V($, q) {
          var K = q._dims, re = K.inputAreaLength - 2 * c.railInset, Y = p.ensureSingle($, "rect", c.railRectClass);
          Y.attr({ width: re, height: c.railWidth, rx: c.railRadius, ry: c.railRadius, "shape-rendering": "crispEdges" }).call(i.stroke, q.bordercolor).call(i.fill, q.bgcolor).style("stroke-width", q.borderwidth + "px"), h.setTranslate(Y, c.railInset, 0.5 * (K.inputAreaWidth - c.railWidth) + K.currentValueTotalHeight);
        }
        o.exports = function($) {
          var q = $._context.staticPlot, K = $._fullLayout, re = function(ue, ce) {
            for (var he = ue[c.name], de = [], ne = 0; ne < he.length; ne++) {
              var ae = he[ne];
              ae.visible && (ae._gd = ce, de.push(ae));
            }
            return de;
          }(K, $), Y = K._infolayer.selectAll("g." + c.containerClassName).data(re.length > 0 ? [0] : []);
          function te(ue) {
            ue._commandObserver && (ue._commandObserver.remove(), delete ue._commandObserver), u.autoMargin($, k(ue));
          }
          if (Y.enter().append("g").classed(c.containerClassName, !0).style("cursor", q ? null : "ew-resize"), Y.exit().each(function() {
            l.select(this).selectAll("g." + c.groupClassName).each(te);
          }).remove(), re.length !== 0) {
            var ee = Y.selectAll("g." + c.groupClassName).data(re, S);
            ee.enter().append("g").classed(c.groupClassName, !0), ee.exit().each(te).remove();
            for (var X = 0; X < re.length; X++) {
              var Q = re[X];
              A($, Q);
            }
            ee.each(function(ue) {
              var ce = l.select(this);
              (function(he) {
                var de = he._dims;
                de.labelSteps = [];
                for (var ne = he._stepCount, ae = 0; ae < ne; ae += de.labelStride) de.labelSteps.push({ fraction: ae / (ne - 1), step: he._visibleSteps[ae] });
              })(ue), u.manageCommandObserver($, ue, ue._visibleSteps, function(he) {
                var de = ce.data()[0];
                de.active !== he.index && (de._dragging || I($, ce, de, he.index, !1, !0));
              }), function(he, de, ne) {
                (ne.steps[ne.active] || {}).visible || (ne.active = ne._visibleSteps[0]._index), de.call(C, ne).call(V, ne).call(E, ne).call(O, ne).call(U, he, ne).call(D, he, ne);
                var ae = ne._dims;
                h.setTranslate(de, ae.lx + ne.pad.l, ae.ly + ne.pad.t), de.call(T, ne, !1), de.call(C, ne);
              }($, l.select(this), ue);
            });
          }
        };
      }, 15359: function(o, s, n) {
        var l = n(64194);
        o.exports = { moduleType: "component", name: l.name, layoutAttributes: n(8606), supplyLayoutDefaults: n(74537), draw: n(44097) };
      }, 17240: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(44122), h = n(33626), p = n(34809), _ = p.strTranslate, d = n(62203), f = n(78766), c = n(30635), g = n(20438), m = n(4530).OPPOSITE_SIDE, x = / [XY][0-9]* /;
        o.exports = { draw: function(w, k, S) {
          var A, C = w._fullLayout, D = S.propContainer, L = S.propName, E = S.placeholder, P = S.traceIndex, I = S.avoid || {}, M = S.attributes, O = S.transform, T = S.containerGroup, z = 1, F = D.title, U = (F && F.text ? F.text : "").trim(), V = !1, $ = F && F.font ? F.font : {}, q = $.family, K = $.size, re = $.color, Y = $.weight, te = $.style, ee = $.variant, X = $.textcase, Q = $.lineposition, ue = $.shadow, ce = !!S.subtitlePropName, he = S.subtitlePlaceholder, de = (D.title || {}).subtitle || { text: "", font: {} }, ne = de.text.trim(), ae = !1, se = 1, me = de.font, ye = me.family, pe = me.size, be = me.color, Ae = me.weight, Se = me.style, Me = me.variant, De = me.textcase, Le = me.lineposition, We = me.shadow;
          L === "title.text" ? A = "titleText" : L.indexOf("axis") !== -1 ? A = "axisTitleText" : L.indexOf(!0) && (A = "colorbarTitleText");
          var Ee = w._context.edits[A];
          function Ne(Ze, ct) {
            return Ze !== void 0 && ct !== void 0 && Ze.replace(x, " % ") === ct.replace(x, " % ");
          }
          U === "" ? z = 0 : Ne(U, E) && (Ee || (U = ""), z = 0.2, V = !0), ce && (ne === "" ? se = 0 : Ne(ne, he) && (Ee || (ne = ""), se = 0.2, ae = !0)), S._meta ? U = p.templateString(U, S._meta) : C._meta && (U = p.templateString(U, C._meta));
          var Ie, ge = U || ne || Ee;
          T || (T = p.ensureSingle(C._infolayer, "g", "g-" + k), Ie = C._hColorbarMoveTitle);
          var Ce = T.selectAll("text." + k).data(ge ? [0] : []);
          Ce.enter().append("text"), Ce.text(U).attr("class", k), Ce.exit().remove();
          var we = null, Ge = k + "-subtitle", Re = ne || Ee;
          if (ce && Re && ((we = T.selectAll("text." + Ge).data(Re ? [0] : [])).enter().append("text"), we.text(ne).attr("class", Ge), we.exit().remove()), !ge) return T;
          function je(Ze, ct) {
            p.syncOrAsync([Ke, tt], { title: Ze, subtitle: ct });
          }
          function Ke(Ze) {
            var ct, ft = Ze.title, _t = Ze.subtitle;
            if (!O && Ie && (O = {}), O ? (ct = "", O.rotate && (ct += "rotate(" + [O.rotate, M.x, M.y] + ")"), (O.offset || Ie) && (ct += _(0, (O.offset || 0) - (Ie || 0)))) : ct = null, ft.attr("transform", ct), ft.style("opacity", z * f.opacity(re)).call(d.font, { color: f.rgb(re), size: l.round(K, 2), family: q, weight: Y, style: te, variant: ee, textcase: X, shadow: ue, lineposition: Q }).attr(M).call(c.convertToTspans, w, function(mt) {
              if (mt) {
                var at = l.select(mt.node().parentNode).select("." + Ge);
                if (!at.empty()) {
                  var vt = mt.node().getBBox();
                  if (vt.height) {
                    var St = vt.y + vt.height + 1.6 * pe;
                    at.attr("y", St);
                  }
                }
              }
            }), _t) {
              var Pt = T.select("." + k + "-math-group"), Dt = ft.node().getBBox(), $t = Pt.node() ? Pt.node().getBBox() : void 0, Gt = $t ? $t.y + $t.height + 1.6 * pe : Dt.y + Dt.height + 1.6 * pe, Wt = p.extendFlat({}, M, { y: Gt });
              _t.attr("transform", ct), _t.style("opacity", se * f.opacity(be)).call(d.font, { color: f.rgb(be), size: l.round(pe, 2), family: ye, weight: Ae, style: Se, variant: Me, textcase: De, shadow: We, lineposition: Le }).attr(Wt).call(c.convertToTspans, w);
            }
            return i.previousPromises(w);
          }
          function tt(Ze) {
            var ct = Ze.title, ft = l.select(ct.node().parentNode);
            if (I && I.selection && I.side && U) {
              ft.attr("transform", null);
              var _t = m[I.side], Pt = I.side === "left" || I.side === "top" ? -1 : 1, Dt = u(I.pad) ? I.pad : 2, $t = d.bBox(ft.node()), Gt = { t: 0, b: 0, l: 0, r: 0 }, Wt = w._fullLayout._reservedMargin;
              for (var mt in Wt) for (var at in Wt[mt]) {
                var vt = Wt[mt][at];
                Gt[at] = Math.max(Gt[at], vt);
              }
              var St = { left: Gt.l, top: Gt.t, right: C.width - Gt.r, bottom: C.height - Gt.b }, Je = I.maxShift || Pt * (St[I.side] - $t[I.side]), nt = 0;
              if (Je < 0) nt = Je;
              else {
                var ot = I.offsetLeft || 0, Ye = I.offsetTop || 0;
                $t.left -= ot, $t.right -= ot, $t.top -= Ye, $t.bottom -= Ye, I.selection.each(function() {
                  var pt = d.bBox(this);
                  p.bBoxIntersect($t, pt, Dt) && (nt = Math.max(nt, Pt * (pt[I.side] - $t[_t]) + Dt));
                }), nt = Math.min(Je, nt), D._titleScoot = Math.abs(nt);
              }
              if (nt > 0 || Je < 0) {
                var Fe = { left: [-nt, 0], right: [nt, 0], top: [0, -nt], bottom: [0, nt] }[I.side];
                ft.attr("transform", _(Fe[0], Fe[1]));
              }
            }
          }
          function _e(Ze, ct) {
            Ze.text(ct).on("mouseover.opacity", function() {
              l.select(this).transition().duration(g.SHOW_PLACEHOLDER).style("opacity", 1);
            }).on("mouseout.opacity", function() {
              l.select(this).transition().duration(g.HIDE_PLACEHOLDER).style("opacity", 0);
            });
          }
          if (Ce.call(je, we), Ee && (U ? Ce.on(".opacity", null) : (_e(Ce, E), V = !0), Ce.call(c.makeEditable, { gd: w }).on("edit", function(Ze) {
            P !== void 0 ? h.call("_guiRestyle", w, L, Ze, P) : h.call("_guiRelayout", w, L, Ze);
          }).on("cancel", function() {
            this.text(this.attr("data-unformatted")).call(je);
          }).on("input", function(Ze) {
            this.text(Ze || " ").call(c.positionText, M.x, M.y);
          }), ce)) {
            if (ce && !U) {
              var Be = Ce.node().getBBox(), $e = Be.y + Be.height + 1.6 * pe;
              we.attr("y", $e);
            }
            ne ? we.on(".opacity", null) : (_e(we, he), ae = !0), we.call(c.makeEditable, { gd: w }).on("edit", function(Ze) {
              h.call("_guiRelayout", w, "title.subtitle.text", Ze);
            }).on("cancel", function() {
              this.text(this.attr("data-unformatted")).call(je);
            }).on("input", function(Ze) {
              this.text(Ze || " ").call(c.positionText, we.attr("x"), we.attr("y"));
            });
          }
          return Ce.classed("js-placeholder", V), we && we.classed("js-placeholder", ae), T;
        }, SUBTITLE_PADDING_EM: 1.6, SUBTITLE_PADDING_MATHJAX_EM: 1.6 };
      }, 85389: function(o, s, n) {
        var l = n(80337), u = n(10229), i = n(93049).extendFlat, h = n(13582).overrideAll, p = n(57891), _ = n(78032).templatedArray, d = _("button", { visible: { valType: "boolean" }, method: { valType: "enumerated", values: ["restyle", "relayout", "animate", "update", "skip"], dflt: "restyle" }, args: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, args2: { valType: "info_array", freeLength: !0, items: [{ valType: "any" }, { valType: "any" }, { valType: "any" }] }, label: { valType: "string", dflt: "" }, execute: { valType: "boolean", dflt: !0 } });
        o.exports = h(_("updatemenu", { _arrayAttrRegexps: [/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/], visible: { valType: "boolean" }, type: { valType: "enumerated", values: ["dropdown", "buttons"], dflt: "dropdown" }, direction: { valType: "enumerated", values: ["left", "right", "up", "down"], dflt: "down" }, active: { valType: "integer", min: -1, dflt: 0 }, showactive: { valType: "boolean", dflt: !0 }, buttons: d, x: { valType: "number", min: -2, max: 3, dflt: -0.05 }, xanchor: { valType: "enumerated", values: ["auto", "left", "center", "right"], dflt: "right" }, y: { valType: "number", min: -2, max: 3, dflt: 1 }, yanchor: { valType: "enumerated", values: ["auto", "top", "middle", "bottom"], dflt: "top" }, pad: i(p({ editType: "arraydraw" }), {}), font: l({}), bgcolor: { valType: "color" }, bordercolor: { valType: "color", dflt: u.borderLine }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "arraydraw" } }), "arraydraw", "from-root");
      }, 71559: function(o) {
        o.exports = { name: "updatemenus", containerClassName: "updatemenu-container", headerGroupClassName: "updatemenu-header-group", headerClassName: "updatemenu-header", headerArrowClassName: "updatemenu-header-arrow", dropdownButtonGroupClassName: "updatemenu-dropdown-button-group", dropdownButtonClassName: "updatemenu-dropdown-button", buttonClassName: "updatemenu-button", itemRectClassName: "updatemenu-item-rect", itemTextClassName: "updatemenu-item-text", menuIndexAttrName: "updatemenu-active-index", autoMarginIdRoot: "updatemenu-", blankHeaderOpts: { label: "  " }, minWidth: 30, minHeight: 30, textPadX: 24, arrowPadX: 16, rx: 2, ry: 2, textOffsetX: 12, textOffsetY: 3, arrowOffsetX: 4, gapButtonHeader: 5, gapButton: 2, activeColor: "#F4FAFF", hoverColor: "#F4FAFF", arrowSymbol: { left: "◄", right: "►", up: "▲", down: "▼" } };
      }, 42746: function(o, s, n) {
        var l = n(34809), u = n(59008), i = n(85389), h = n(71559).name, p = i.buttons;
        function _(f, c, g) {
          function m(x, w) {
            return l.coerce(f, c, i, x, w);
          }
          m("visible", u(f, c, { name: "buttons", handleItemDefaults: d }).length > 0) && (m("active"), m("direction"), m("type"), m("showactive"), m("x"), m("y"), l.noneOrAll(f, c, ["x", "y"]), m("xanchor"), m("yanchor"), m("pad.t"), m("pad.r"), m("pad.b"), m("pad.l"), l.coerceFont(m, "font", g.font), m("bgcolor", g.paper_bgcolor), m("bordercolor"), m("borderwidth"));
        }
        function d(f, c) {
          function g(m, x) {
            return l.coerce(f, c, p, m, x);
          }
          g("visible", f.method === "skip" || Array.isArray(f.args)) && (g("method"), g("args"), g("args2"), g("label"), g("execute"));
        }
        o.exports = function(f, c) {
          u(f, c, { name: h, handleItemDefaults: _ });
        };
      }, 40974: function(o, s, n) {
        var l = n(45568), u = n(44122), i = n(78766), h = n(62203), p = n(34809), _ = n(30635), d = n(78032).arrayEditor, f = n(4530).LINE_SPACING, c = n(71559), g = n(21736);
        function m(z) {
          return z._index;
        }
        function x(z, F) {
          return +z.attr(c.menuIndexAttrName) === F._index;
        }
        function w(z, F, U, V, $, q, K, re) {
          F.active = K, d(z.layout, c.name, F).applyUpdate("active", K), F.type === "buttons" ? S(z, V, null, null, F) : F.type === "dropdown" && ($.attr(c.menuIndexAttrName, "-1"), k(z, V, $, q, F), re || S(z, V, $, q, F));
        }
        function k(z, F, U, V, $) {
          var q = p.ensureSingle(F, "g", c.headerClassName, function(X) {
            X.style("pointer-events", "all");
          }), K = $._dims, re = $.active, Y = $.buttons[re] || c.blankHeaderOpts, te = { y: $.pad.t, yPad: 0, x: $.pad.l, xPad: 0, index: 0 }, ee = { width: K.headerWidth, height: K.headerHeight };
          q.call(A, $, Y, z).call(O, $, te, ee), p.ensureSingle(F, "text", c.headerArrowClassName, function(X) {
            X.attr("text-anchor", "end").call(h.font, $.font).text(c.arrowSymbol[$.direction]);
          }).attr({ x: K.headerWidth - c.arrowOffsetX + $.pad.l, y: K.headerHeight / 2 + c.textOffsetY + $.pad.t }), q.on("click", function() {
            U.call(T, String(x(U, $) ? -1 : $._index)), S(z, F, U, V, $);
          }), q.on("mouseover", function() {
            q.call(E);
          }), q.on("mouseout", function() {
            q.call(P, $);
          }), h.setTranslate(F, K.lx, K.ly);
        }
        function S(z, F, U, V, $) {
          U || (U = F).attr("pointer-events", "all");
          var q = function(de) {
            return +de.attr(c.menuIndexAttrName) == -1;
          }(U) && $.type !== "buttons" ? [] : $.buttons, K = $.type === "dropdown" ? c.dropdownButtonClassName : c.buttonClassName, re = U.selectAll("g." + K).data(p.filterVisible(q)), Y = re.enter().append("g").classed(K, !0), te = re.exit();
          $.type === "dropdown" ? (Y.attr("opacity", "0").transition().attr("opacity", "1"), te.transition().attr("opacity", "0").remove()) : te.remove();
          var ee = 0, X = 0, Q = $._dims, ue = ["up", "down"].indexOf($.direction) !== -1;
          $.type === "dropdown" && (ue ? X = Q.headerHeight + c.gapButtonHeader : ee = Q.headerWidth + c.gapButtonHeader), $.type === "dropdown" && $.direction === "up" && (X = -c.gapButtonHeader + c.gapButton - Q.openHeight), $.type === "dropdown" && $.direction === "left" && (ee = -c.gapButtonHeader + c.gapButton - Q.openWidth);
          var ce = { x: Q.lx + ee + $.pad.l, y: Q.ly + X + $.pad.t, yPad: c.gapButton, xPad: c.gapButton, index: 0 }, he = { l: ce.x + $.borderwidth, t: ce.y + $.borderwidth };
          re.each(function(de, ne) {
            var ae = l.select(this);
            ae.call(A, $, de, z).call(O, $, ce), ae.on("click", function() {
              l.event.defaultPrevented || (de.execute && (de.args2 && $.active === ne ? (w(z, $, 0, F, U, V, -1), u.executeAPICommand(z, de.method, de.args2)) : (w(z, $, 0, F, U, V, ne), u.executeAPICommand(z, de.method, de.args))), z.emit("plotly_buttonclicked", { menu: $, button: de, active: $.active }));
            }), ae.on("mouseover", function() {
              ae.call(E);
            }), ae.on("mouseout", function() {
              ae.call(P, $), re.call(L, $);
            });
          }), re.call(L, $), ue ? (he.w = Math.max(Q.openWidth, Q.headerWidth), he.h = ce.y - he.t) : (he.w = ce.x - he.l, he.h = Math.max(Q.openHeight, Q.headerHeight)), he.direction = $.direction, V && (re.size() ? function(de, ne, ae, se, me, ye) {
            var pe, be, Ae, Se = me.direction, Me = Se === "up" || Se === "down", De = me._dims, Le = me.active;
            if (Me) for (be = 0, Ae = 0; Ae < Le; Ae++) be += De.heights[Ae] + c.gapButton;
            else for (pe = 0, Ae = 0; Ae < Le; Ae++) pe += De.widths[Ae] + c.gapButton;
            se.enable(ye, pe, be), se.hbar && se.hbar.attr("opacity", "0").transition().attr("opacity", "1"), se.vbar && se.vbar.attr("opacity", "0").transition().attr("opacity", "1");
          }(0, 0, 0, V, $, he) : function(de) {
            var ne = !!de.hbar, ae = !!de.vbar;
            ne && de.hbar.transition().attr("opacity", "0").each("end", function() {
              ne = !1, ae || de.disable();
            }), ae && de.vbar.transition().attr("opacity", "0").each("end", function() {
              ae = !1, ne || de.disable();
            });
          }(V));
        }
        function A(z, F, U, V) {
          z.call(C, F).call(D, F, U, V);
        }
        function C(z, F) {
          p.ensureSingle(z, "rect", c.itemRectClassName, function(U) {
            U.attr({ rx: c.rx, ry: c.ry, "shape-rendering": "crispEdges" });
          }).call(i.stroke, F.bordercolor).call(i.fill, F.bgcolor).style("stroke-width", F.borderwidth + "px");
        }
        function D(z, F, U, V) {
          var $ = p.ensureSingle(z, "text", c.itemTextClassName, function(re) {
            re.attr({ "text-anchor": "start", "data-notex": 1 });
          }), q = U.label, K = V._fullLayout._meta;
          K && (q = p.templateString(q, K)), $.call(h.font, F.font).text(q).call(_.convertToTspans, V);
        }
        function L(z, F) {
          var U = F.active;
          z.each(function(V, $) {
            var q = l.select(this);
            $ === U && F.showactive && q.select("rect." + c.itemRectClassName).call(i.fill, c.activeColor);
          });
        }
        function E(z) {
          z.select("rect." + c.itemRectClassName).call(i.fill, c.hoverColor);
        }
        function P(z, F) {
          z.select("rect." + c.itemRectClassName).call(i.fill, F.bgcolor);
        }
        function I(z, F) {
          var U = F._dims = { width1: 0, height1: 0, heights: [], widths: [], totalWidth: 0, totalHeight: 0, openWidth: 0, openHeight: 0, lx: 0, ly: 0 }, V = h.tester.selectAll("g." + c.dropdownButtonClassName).data(p.filterVisible(F.buttons));
          V.enter().append("g").classed(c.dropdownButtonClassName, !0);
          var $ = ["up", "down"].indexOf(F.direction) !== -1;
          V.each(function(ee, X) {
            var Q = l.select(this);
            Q.call(A, F, ee, z);
            var ue = Q.select("." + c.itemTextClassName), ce = ue.node() && h.bBox(ue.node()).width, he = Math.max(ce + c.textPadX, c.minWidth), de = F.font.size * f, ne = _.lineCount(ue), ae = Math.max(de * ne, c.minHeight) + c.textOffsetY;
            ae = Math.ceil(ae), he = Math.ceil(he), U.widths[X] = he, U.heights[X] = ae, U.height1 = Math.max(U.height1, ae), U.width1 = Math.max(U.width1, he), $ ? (U.totalWidth = Math.max(U.totalWidth, he), U.openWidth = U.totalWidth, U.totalHeight += ae + c.gapButton, U.openHeight += ae + c.gapButton) : (U.totalWidth += he + c.gapButton, U.openWidth += he + c.gapButton, U.totalHeight = Math.max(U.totalHeight, ae), U.openHeight = U.totalHeight);
          }), $ ? U.totalHeight -= c.gapButton : U.totalWidth -= c.gapButton, U.headerWidth = U.width1 + c.arrowPadX, U.headerHeight = U.height1, F.type === "dropdown" && ($ ? (U.width1 += c.arrowPadX, U.totalHeight = U.height1) : U.totalWidth = U.width1, U.totalWidth += c.arrowPadX), V.remove();
          var q = U.totalWidth + F.pad.l + F.pad.r, K = U.totalHeight + F.pad.t + F.pad.b, re = z._fullLayout._size;
          U.lx = re.l + re.w * F.x, U.ly = re.t + re.h * (1 - F.y);
          var Y = "left";
          p.isRightAnchor(F) && (U.lx -= q, Y = "right"), p.isCenterAnchor(F) && (U.lx -= q / 2, Y = "center");
          var te = "top";
          p.isBottomAnchor(F) && (U.ly -= K, te = "bottom"), p.isMiddleAnchor(F) && (U.ly -= K / 2, te = "middle"), U.totalWidth = Math.ceil(U.totalWidth), U.totalHeight = Math.ceil(U.totalHeight), U.lx = Math.round(U.lx), U.ly = Math.round(U.ly), u.autoMargin(z, M(F), { x: F.x, y: F.y, l: q * ({ right: 1, center: 0.5 }[Y] || 0), r: q * ({ left: 1, center: 0.5 }[Y] || 0), b: K * ({ top: 1, middle: 0.5 }[te] || 0), t: K * ({ bottom: 1, middle: 0.5 }[te] || 0) });
        }
        function M(z) {
          return c.autoMarginIdRoot + z._index;
        }
        function O(z, F, U, V) {
          V = V || {};
          var $ = z.select("." + c.itemRectClassName), q = z.select("." + c.itemTextClassName), K = F.borderwidth, re = U.index, Y = F._dims;
          h.setTranslate(z, K + U.x, K + U.y);
          var te = ["up", "down"].indexOf(F.direction) !== -1, ee = V.height || (te ? Y.heights[re] : Y.height1);
          $.attr({ x: 0, y: 0, width: V.width || (te ? Y.width1 : Y.widths[re]), height: ee });
          var X = F.font.size * f, Q = (_.lineCount(q) - 1) * X / 2;
          _.positionText(q, c.textOffsetX, ee / 2 - Q + c.textOffsetY), te ? U.y += Y.heights[re] + U.yPad : U.x += Y.widths[re] + U.xPad, U.index++;
        }
        function T(z, F) {
          z.attr(c.menuIndexAttrName, F || "-1").selectAll("g." + c.dropdownButtonClassName).remove();
        }
        o.exports = function(z) {
          var F = z._fullLayout, U = p.filterVisible(F[c.name]);
          function V(X) {
            u.autoMargin(z, M(X));
          }
          var $ = F._menulayer.selectAll("g." + c.containerClassName).data(U.length > 0 ? [0] : []);
          if ($.enter().append("g").classed(c.containerClassName, !0).style("cursor", "pointer"), $.exit().each(function() {
            l.select(this).selectAll("g." + c.headerGroupClassName).each(V);
          }).remove(), U.length !== 0) {
            var q = $.selectAll("g." + c.headerGroupClassName).data(U, m);
            q.enter().append("g").classed(c.headerGroupClassName, !0);
            for (var K = p.ensureSingle($, "g", c.dropdownButtonGroupClassName, function(X) {
              X.style("pointer-events", "all");
            }), re = 0; re < U.length; re++) {
              var Y = U[re];
              I(z, Y);
            }
            var te = "updatemenus" + F._uid, ee = new g(z, K, te);
            q.enter().size() && (K.node().parentNode.appendChild(K.node()), K.call(T)), q.exit().each(function(X) {
              K.call(T), V(X);
            }).remove(), q.each(function(X) {
              var Q = l.select(this), ue = X.type === "dropdown" ? K : null;
              u.manageCommandObserver(z, X, X.buttons, function(ce) {
                w(z, X, X.buttons[ce.index], Q, ue, ee, ce.index, !0);
              }), X.type === "dropdown" ? (k(z, Q, K, ee, X), x(K, X) && S(z, Q, K, ee, X)) : S(z, Q, null, null, X);
            });
          }
        };
      }, 46230: function(o, s, n) {
        var l = n(71559);
        o.exports = { moduleType: "component", name: l.name, layoutAttributes: n(85389), supplyLayoutDefaults: n(42746), draw: n(40974) };
      }, 21736: function(o, s, n) {
        o.exports = p;
        var l = n(45568), u = n(78766), i = n(62203), h = n(34809);
        function p(_, d, f) {
          this.gd = _, this.container = d, this.id = f, this.position = null, this.translateX = null, this.translateY = null, this.hbar = null, this.vbar = null, this.bg = this.container.selectAll("rect.scrollbox-bg").data([0]), this.bg.exit().on(".drag", null).on("wheel", null).remove(), this.bg.enter().append("rect").classed("scrollbox-bg", !0).style("pointer-events", "all").attr({ opacity: 0, x: 0, y: 0, width: 0, height: 0 });
        }
        p.barWidth = 2, p.barLength = 20, p.barRadius = 2, p.barPad = 1, p.barColor = "#808BA4", p.prototype.enable = function(_, d, f) {
          var c = this.gd._fullLayout, g = c.width, m = c.height;
          this.position = _;
          var x, w, k, S, A = this.position.l, C = this.position.w, D = this.position.t, L = this.position.h, E = this.position.direction, P = E === "down", I = E === "left", M = E === "up", O = C, T = L;
          P || I || E === "right" || M || (this.position.direction = "down", P = !0), P || M ? (w = (x = A) + O, P ? (k = D, T = (S = Math.min(k + T, m)) - k) : T = (S = D + T) - (k = Math.max(S - T, 0))) : (S = (k = D) + T, I ? O = (w = A + O) - (x = Math.max(w - O, 0)) : (x = A, O = (w = Math.min(x + O, g)) - x)), this._box = { l: x, t: k, w: O, h: T };
          var z = C > O, F = p.barLength + 2 * p.barPad, U = p.barWidth + 2 * p.barPad, V = A, $ = D + L;
          $ + U > m && ($ = m - U);
          var q = this.container.selectAll("rect.scrollbar-horizontal").data(z ? [0] : []);
          q.exit().on(".drag", null).remove(), q.enter().append("rect").classed("scrollbar-horizontal", !0).call(u.fill, p.barColor), z ? (this.hbar = q.attr({ rx: p.barRadius, ry: p.barRadius, x: V, y: $, width: F, height: U }), this._hbarXMin = V + F / 2, this._hbarTranslateMax = O - F) : (delete this.hbar, delete this._hbarXMin, delete this._hbarTranslateMax);
          var K = L > T, re = p.barWidth + 2 * p.barPad, Y = p.barLength + 2 * p.barPad, te = A + C, ee = D;
          te + re > g && (te = g - re);
          var X = this.container.selectAll("rect.scrollbar-vertical").data(K ? [0] : []);
          X.exit().on(".drag", null).remove(), X.enter().append("rect").classed("scrollbar-vertical", !0).call(u.fill, p.barColor), K ? (this.vbar = X.attr({ rx: p.barRadius, ry: p.barRadius, x: te, y: ee, width: re, height: Y }), this._vbarYMin = ee + Y / 2, this._vbarTranslateMax = T - Y) : (delete this.vbar, delete this._vbarYMin, delete this._vbarTranslateMax);
          var Q = this.id, ue = x - 0.5, ce = K ? w + re + 0.5 : w + 0.5, he = k - 0.5, de = z ? S + U + 0.5 : S + 0.5, ne = c._topdefs.selectAll("#" + Q).data(z || K ? [0] : []);
          if (ne.exit().remove(), ne.enter().append("clipPath").attr("id", Q).append("rect"), z || K ? (this._clipRect = ne.select("rect").attr({ x: Math.floor(ue), y: Math.floor(he), width: Math.ceil(ce) - Math.floor(ue), height: Math.ceil(de) - Math.floor(he) }), this.container.call(i.setClipUrl, Q, this.gd), this.bg.attr({ x: A, y: D, width: C, height: L })) : (this.bg.attr({ width: 0, height: 0 }), this.container.on("wheel", null).on(".drag", null).call(i.setClipUrl, null), delete this._clipRect), z || K) {
            var ae = l.behavior.drag().on("dragstart", function() {
              l.event.sourceEvent.preventDefault();
            }).on("drag", this._onBoxDrag.bind(this));
            this.container.on("wheel", null).on("wheel", this._onBoxWheel.bind(this)).on(".drag", null).call(ae);
            var se = l.behavior.drag().on("dragstart", function() {
              l.event.sourceEvent.preventDefault(), l.event.sourceEvent.stopPropagation();
            }).on("drag", this._onBarDrag.bind(this));
            z && this.hbar.on(".drag", null).call(se), K && this.vbar.on(".drag", null).call(se);
          }
          this.setTranslate(d, f);
        }, p.prototype.disable = function() {
          (this.hbar || this.vbar) && (this.bg.attr({ width: 0, height: 0 }), this.container.on("wheel", null).on(".drag", null).call(i.setClipUrl, null), delete this._clipRect), this.hbar && (this.hbar.on(".drag", null), this.hbar.remove(), delete this.hbar, delete this._hbarXMin, delete this._hbarTranslateMax), this.vbar && (this.vbar.on(".drag", null), this.vbar.remove(), delete this.vbar, delete this._vbarYMin, delete this._vbarTranslateMax);
        }, p.prototype._onBoxDrag = function() {
          var _ = this.translateX, d = this.translateY;
          this.hbar && (_ -= l.event.dx), this.vbar && (d -= l.event.dy), this.setTranslate(_, d);
        }, p.prototype._onBoxWheel = function() {
          var _ = this.translateX, d = this.translateY;
          this.hbar && (_ += l.event.deltaY), this.vbar && (d += l.event.deltaY), this.setTranslate(_, d);
        }, p.prototype._onBarDrag = function() {
          var _ = this.translateX, d = this.translateY;
          if (this.hbar) {
            var f = _ + this._hbarXMin, c = f + this._hbarTranslateMax;
            _ = (h.constrain(l.event.x, f, c) - f) / (c - f) * (this.position.w - this._box.w);
          }
          if (this.vbar) {
            var g = d + this._vbarYMin, m = g + this._vbarTranslateMax;
            d = (h.constrain(l.event.y, g, m) - g) / (m - g) * (this.position.h - this._box.h);
          }
          this.setTranslate(_, d);
        }, p.prototype.setTranslate = function(_, d) {
          var f = this.position.w - this._box.w, c = this.position.h - this._box.h;
          if (_ = h.constrain(_ || 0, 0, f), d = h.constrain(d || 0, 0, c), this.translateX = _, this.translateY = d, this.container.call(i.setTranslate, this._box.l - this.position.l - _, this._box.t - this.position.t - d), this._clipRect && this._clipRect.attr({ x: Math.floor(this.position.l + _ - 0.5), y: Math.floor(this.position.t + d - 0.5) }), this.hbar) {
            var g = _ / f;
            this.hbar.call(i.setTranslate, _ + g * this._hbarTranslateMax, d);
          }
          if (this.vbar) {
            var m = d / c;
            this.vbar.call(i.setTranslate, _, d + m * this._vbarTranslateMax);
          }
        };
      }, 4530: function(o) {
        o.exports = { FROM_BL: { left: 0, center: 0.5, right: 1, bottom: 0, middle: 0.5, top: 1 }, FROM_TL: { left: 0, center: 0.5, right: 1, bottom: 1, middle: 0.5, top: 0 }, FROM_BR: { left: 1, center: 0.5, right: 0, bottom: 0, middle: 0.5, top: 1 }, LINE_SPACING: 1.3, CAP_SHIFT: 0.7, MID_SHIFT: 0.35, OPPOSITE_SIDE: { left: "right", right: "left", top: "bottom", bottom: "top" } };
      }, 35081: function(o) {
        o.exports = { axisRefDescription: function(s, n, l) {
          return ["If set to a", s, "axis id (e.g. *" + s + "* or", "*" + s + "2*), the `" + s + "` position refers to a", s, "coordinate. If set to *paper*, the `" + s + "`", "position refers to the distance from the", n, "of the plotting", "area in normalized coordinates where *0* (*1*) corresponds to the", n, "(" + l + "). If set to a", s, "axis ID followed by", "*domain* (separated by a space), the position behaves like for", "*paper*, but refers to the distance in fractions of the domain", "length from the", n, "of the domain of that axis: e.g.,", "*" + s + "2 domain* refers to the domain of the second", s, " axis and a", s, "position of 0.5 refers to the", "point between the", n, "and the", l, "of the domain of the", "second", s, "axis."].join(" ");
        } };
      }, 20909: function(o) {
        o.exports = { INCREASING: { COLOR: "#3D9970", SYMBOL: "▲" }, DECREASING: { COLOR: "#FF4136", SYMBOL: "▼" } };
      }, 87296: function(o) {
        o.exports = { FORMAT_LINK: "https://github.com/d3/d3-format/tree/v1.4.5#d3-format", DATE_FORMAT_LINK: "https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format" };
      }, 20726: function(o) {
        o.exports = { COMPARISON_OPS: ["=", "!=", "<", ">=", ">", "<="], COMPARISON_OPS2: ["=", "<", ">=", ">", "<="], INTERVAL_OPS: ["[]", "()", "[)", "(]", "][", ")(", "](", ")["], SET_OPS: ["{}", "}{"], CONSTRAINT_REDUCTION: { "=": "=", "<": "<", "<=": "<", ">": ">", ">=": ">", "[]": "[]", "()": "[]", "[)": "[]", "(]": "[]", "][": "][", ")(": "][", "](": "][", ")[": "][" } };
      }, 84770: function(o) {
        o.exports = { solid: [[], 0], dot: [[0.5, 1], 200], dash: [[0.5, 1], 50], longdash: [[0.5, 1], 10], dashdot: [[0.5, 0.625, 0.875, 1], 50], longdashdot: [[0.5, 0.7, 0.8, 1], 10] };
      }, 49467: function(o) {
        o.exports = { circle: "●", "circle-open": "○", square: "■", "square-open": "□", diamond: "◆", "diamond-open": "◇", cross: "+", x: "❌" };
      }, 20438: function(o) {
        o.exports = { SHOW_PLACEHOLDER: 100, HIDE_PLACEHOLDER: 1e3, DESELECTDIM: 0.2 };
      }, 63821: function(o) {
        o.exports = { BADNUM: void 0, FP_SAFE: 1e-4 * Number.MAX_VALUE, ONEMAXYEAR: 316224e5, ONEAVGYEAR: 315576e5, ONEMINYEAR: 31536e6, ONEMAXQUARTER: 79488e5, ONEAVGQUARTER: 78894e5, ONEMINQUARTER: 76896e5, ONEMAXMONTH: 26784e5, ONEAVGMONTH: 26298e5, ONEMINMONTH: 24192e5, ONEWEEK: 6048e5, ONEDAY: 864e5, ONEHOUR: 36e5, ONEMIN: 6e4, ONESEC: 1e3, ONEMILLI: 1, ONEMICROSEC: 1e-3, EPOCHJD: 24405875e-1, ALMOST_EQUAL: 0.999999, LOG_CLIP: 10, MINUS_SIGN: "−" };
      }, 1837: function(o, s) {
        s.CSS_DECLARATIONS = [["image-rendering", "optimizeSpeed"], ["image-rendering", "-moz-crisp-edges"], ["image-rendering", "-o-crisp-edges"], ["image-rendering", "-webkit-optimize-contrast"], ["image-rendering", "optimize-contrast"], ["image-rendering", "crisp-edges"], ["image-rendering", "pixelated"]], s.STYLE = s.CSS_DECLARATIONS.map(function(n) {
          return n.join(": ") + "; ";
        }).join("");
      }, 62972: function(o, s) {
        s.xmlns = "http://www.w3.org/2000/xmlns/", s.svg = "http://www.w3.org/2000/svg", s.xlink = "http://www.w3.org/1999/xlink", s.svgAttrs = { xmlns: s.svg, "xmlns:xlink": s.xlink };
      }, 17430: function(o, s, n) {
        s.version = n(29697).version, n(71116), n(6713);
        for (var l = n(33626), u = s.register = l.register, i = n(90742), h = Object.keys(i), p = 0; p < h.length; p++) {
          var _ = h[p];
          _.charAt(0) !== "_" && (s[_] = i[_]), u({ moduleType: "apiMethod", name: _, fn: i[_] });
        }
        u(n(69693)), u([n(3599), n(83348), n(44844), n(43701), n(15553), n(46230), n(15359), n(55429), n(44453), n(83595), n(77901), n(88856), n(96919), n(82494), n(32141), n(95433)]), u([n(30227), n(44611)]), window.PlotlyLocales && Array.isArray(window.PlotlyLocales) && (u(window.PlotlyLocales), delete window.PlotlyLocales), s.Icons = n(35188);
        var d = n(32141), f = n(44122);
        s.Plots = { resize: f.resize, graphJson: f.graphJson, sendDataToCloud: f.sendDataToCloud }, s.Fx = { hover: d.hover, unhover: d.unhover, loneHover: d.loneHover, loneUnhover: d.loneUnhover }, s.Snapshot = n(6170), s.PlotSchema = n(57297);
      }, 35188: function(o) {
        o.exports = { undo: { width: 857.1, height: 1e3, path: "m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z", transform: "matrix(1 0 0 -1 0 850)" }, home: { width: 928.6, height: 1e3, path: "m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z", transform: "matrix(1 0 0 -1 0 850)" }, "camera-retro": { width: 1e3, height: 1e3, path: "m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z", transform: "matrix(1 0 0 -1 0 850)" }, zoombox: { width: 1e3, height: 1e3, path: "m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z", transform: "matrix(1 0 0 -1 0 850)" }, pan: { width: 1e3, height: 1e3, path: "m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z", transform: "matrix(1 0 0 -1 0 850)" }, zoom_plus: { width: 875, height: 1e3, path: "m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z", transform: "matrix(1 0 0 -1 0 850)" }, zoom_minus: { width: 875, height: 1e3, path: "m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z", transform: "matrix(1 0 0 -1 0 850)" }, autoscale: { width: 1e3, height: 1e3, path: "m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z", transform: "matrix(1 0 0 -1 0 850)" }, tooltip_basic: { width: 1500, height: 1e3, path: "m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z", transform: "matrix(1 0 0 -1 0 850)" }, tooltip_compare: { width: 1125, height: 1e3, path: "m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z", transform: "matrix(1 0 0 -1 0 850)" }, plotlylogo: { width: 1542, height: 1e3, path: "m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z", transform: "matrix(1 0 0 -1 0 850)" }, "z-axis": { width: 1e3, height: 1e3, path: "m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z", transform: "matrix(1 0 0 -1 0 850)" }, "3d_rotate": { width: 1e3, height: 1e3, path: "m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z", transform: "matrix(1 0 0 -1 0 850)" }, camera: { width: 1e3, height: 1e3, path: "m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z", transform: "matrix(1 0 0 -1 0 850)" }, movie: { width: 1e3, height: 1e3, path: "m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z", transform: "matrix(1 0 0 -1 0 850)" }, question: { width: 857.1, height: 1e3, path: "m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z", transform: "matrix(1 0 0 -1 0 850)" }, disk: { width: 857.1, height: 1e3, path: "m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z", transform: "matrix(1 0 0 -1 0 850)" }, drawopenpath: { width: 70, height: 70, path: "M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z", transform: "matrix(1 0 0 1 -15 -15)" }, drawclosedpath: { width: 90, height: 90, path: "M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z", transform: "matrix(1 0 0 1 -5 -5)" }, lasso: { width: 1031, height: 1e3, path: "m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z", transform: "matrix(1 0 0 -1 0 850)" }, selectbox: { width: 1e3, height: 1e3, path: "m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z", transform: "matrix(1 0 0 -1 0 850)" }, drawline: { width: 70, height: 70, path: "M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z", transform: "matrix(1 0 0 1 -15 -15)" }, drawrect: { width: 80, height: 80, path: "M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z", transform: "matrix(1 0 0 1 -10 -10)" }, drawcircle: { width: 80, height: 80, path: "M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z", transform: "matrix(1 0 0 1 -10 -10)" }, eraseshape: { width: 80, height: 80, path: "M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z", transform: "matrix(1 0 0 1 -10 -10)" }, spikeline: { width: 1e3, height: 1e3, path: "M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z", transform: "matrix(1.5 0 0 -1.5 0 850)" }, pencil: { width: 1792, height: 1792, path: "M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z", transform: "matrix(1 0 0 1 0 1)" }, newplotlylogo: { name: "newplotlylogo", svg: ["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>", "<defs>", " <style>", "  .cls-0{fill:#000;}", "  .cls-1{fill:#FFF;}", "  .cls-2{fill:#F26;}", "  .cls-3{fill:#D69;}", "  .cls-4{fill:#BAC;}", "  .cls-5{fill:#9EF;}", " </style>", "</defs>", " <title>plotly-logomark</title>", " <g id='symbol'>", "  <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>", "  <circle class='cls-5' cx='102' cy='30' r='6'/>", "  <circle class='cls-4' cx='78' cy='30' r='6'/>", "  <circle class='cls-4' cx='78' cy='54' r='6'/>", "  <circle class='cls-3' cx='54' cy='30' r='6'/>", "  <circle class='cls-2' cx='30' cy='30' r='6'/>", "  <circle class='cls-2' cx='30' cy='54' r='6'/>", "  <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>", "  <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>", "  <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>", "  <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>", " </g>", "</svg>"].join("") } };
      }, 32546: function(o, s) {
        s.isLeftAnchor = function(n) {
          return n.xanchor === "left" || n.xanchor === "auto" && n.x <= 0.3333333333333333;
        }, s.isCenterAnchor = function(n) {
          return n.xanchor === "center" || n.xanchor === "auto" && n.x > 0.3333333333333333 && n.x < 0.6666666666666666;
        }, s.isRightAnchor = function(n) {
          return n.xanchor === "right" || n.xanchor === "auto" && n.x >= 0.6666666666666666;
        }, s.isTopAnchor = function(n) {
          return n.yanchor === "top" || n.yanchor === "auto" && n.y >= 0.6666666666666666;
        }, s.isMiddleAnchor = function(n) {
          return n.yanchor === "middle" || n.yanchor === "auto" && n.y > 0.3333333333333333 && n.y < 0.6666666666666666;
        }, s.isBottomAnchor = function(n) {
          return n.yanchor === "bottom" || n.yanchor === "auto" && n.y <= 0.3333333333333333;
        };
      }, 44313: function(o, s, n) {
        var l = n(98953), u = l.mod, i = l.modHalf, h = Math.PI, p = 2 * h;
        function _(g) {
          return Math.abs(g[1] - g[0]) > p - 1e-14;
        }
        function d(g, m) {
          return i(m - g, p);
        }
        function f(g, m) {
          if (_(m)) return !0;
          var x, w;
          m[0] < m[1] ? (x = m[0], w = m[1]) : (x = m[1], w = m[0]), (x = u(x, p)) > (w = u(w, p)) && (w += p);
          var k = u(g, p), S = k + p;
          return k >= x && k <= w || S >= x && S <= w;
        }
        function c(g, m, x, w, k, S, A) {
          k = k || 0, S = S || 0;
          var C, D, L, E, P, I = _([x, w]);
          function M(F, U) {
            return [F * Math.cos(U) + k, S - F * Math.sin(U)];
          }
          I ? (C = 0, D = h, L = p) : x < w ? (C = x, L = w) : (C = w, L = x), g < m ? (E = g, P = m) : (E = m, P = g);
          var O, T = Math.abs(L - C) <= h ? 0 : 1;
          function z(F, U, V) {
            return "A" + [F, F] + " " + [0, T, V] + " " + M(F, U);
          }
          return I ? O = E === null ? "M" + M(P, C) + z(P, D, 0) + z(P, L, 0) + "Z" : "M" + M(E, C) + z(E, D, 0) + z(E, L, 0) + "ZM" + M(P, C) + z(P, D, 1) + z(P, L, 1) + "Z" : E === null ? (O = "M" + M(P, C) + z(P, L, 0), A && (O += "L0,0Z")) : O = "M" + M(E, C) + "L" + M(P, C) + z(P, L, 0) + "L" + M(E, L) + z(E, C, 1) + "Z", O;
        }
        o.exports = { deg2rad: function(g) {
          return g / 180 * h;
        }, rad2deg: function(g) {
          return g / h * 180;
        }, angleDelta: d, angleDist: function(g, m) {
          return Math.abs(d(g, m));
        }, isFullCircle: _, isAngleInsideSector: f, isPtInsideSector: function(g, m, x, w) {
          return !!f(m, w) && (x[0] < x[1] ? (k = x[0], S = x[1]) : (k = x[1], S = x[0]), g >= k && g <= S);
          var k, S;
        }, pathArc: function(g, m, x, w, k) {
          return c(null, g, m, x, w, k, 0);
        }, pathSector: function(g, m, x, w, k) {
          return c(null, g, m, x, w, k, 1);
        }, pathAnnulus: function(g, m, x, w, k, S) {
          return c(g, m, x, w, k, S, 1);
        } };
      }, 87800: function(o, s, n) {
        var l = n(93229).decode, u = n(56174), i = Array.isArray, h = ArrayBuffer, p = DataView;
        function _(m) {
          return h.isView(m) && !(m instanceof p);
        }
        function d(m) {
          return i(m) || _(m);
        }
        s.isTypedArray = _, s.isArrayOrTypedArray = d, s.isArray1D = function(m) {
          return !d(m[0]);
        }, s.ensureArray = function(m, x) {
          return i(m) || (m = []), m.length = x, m;
        };
        var f = { u1c: typeof Uint8ClampedArray > "u" ? void 0 : Uint8ClampedArray, i1: typeof Int8Array > "u" ? void 0 : Int8Array, u1: typeof Uint8Array > "u" ? void 0 : Uint8Array, i2: typeof Int16Array > "u" ? void 0 : Int16Array, u2: typeof Uint16Array > "u" ? void 0 : Uint16Array, i4: typeof Int32Array > "u" ? void 0 : Int32Array, u4: typeof Uint32Array > "u" ? void 0 : Uint32Array, f4: typeof Float32Array > "u" ? void 0 : Float32Array, f8: typeof Float64Array > "u" ? void 0 : Float64Array };
        function c(m) {
          return m.constructor === ArrayBuffer;
        }
        function g(m, x, w) {
          if (d(m)) {
            if (d(m[0])) {
              for (var k = w, S = 0; S < m.length; S++) k = x(k, m[S].length);
              return k;
            }
            return m.length;
          }
          return 0;
        }
        f.uint8c = f.u1c, f.uint8 = f.u1, f.int8 = f.i1, f.uint16 = f.u2, f.int16 = f.i2, f.uint32 = f.u4, f.int32 = f.i4, f.float32 = f.f4, f.float64 = f.f8, s.isArrayBuffer = c, s.decodeTypedArraySpec = function(m) {
          var x = [], w = function(F) {
            return { bdata: F.bdata, dtype: F.dtype, shape: F.shape };
          }(m), k = w.dtype, S = f[k];
          if (!S) throw new Error('Error in dtype: "' + k + '"');
          var A = S.BYTES_PER_ELEMENT, C = w.bdata;
          c(C) || (C = l(C));
          var D = w.shape === void 0 ? [C.byteLength / A] : ("" + w.shape).split(",");
          D.reverse();
          var L, E, P = D.length, I = +D[0], M = A * I, O = 0;
          if (P === 1) x = new S(C);
          else if (P === 2) for (L = +D[1], E = 0; E < L; E++) x[E] = new S(C, O, I), O += M;
          else {
            if (P !== 3) throw new Error("ndim: " + P + 'is not supported with the shape:"' + w.shape + '"');
            L = +D[1];
            for (var T = +D[2], z = 0; z < T; z++) for (x[z] = [], E = 0; E < L; E++) x[z][E] = new S(C, O, I), O += M;
          }
          return x.bdata = w.bdata, x.dtype = w.dtype, x.shape = D.reverse().join(","), m._inputArray = x, x;
        }, s.isTypedArraySpec = function(m) {
          return u(m) && m.hasOwnProperty("dtype") && typeof m.dtype == "string" && m.hasOwnProperty("bdata") && (typeof m.bdata == "string" || c(m.bdata)) && (m.shape === void 0 || m.hasOwnProperty("shape") && (typeof m.shape == "string" || typeof m.shape == "number"));
        }, s.concat = function() {
          var m, x, w, k, S, A, C, D, L = [], E = !0, P = 0;
          for (w = 0; w < arguments.length; w++) (A = (k = arguments[w]).length) && (x ? L.push(k) : (x = k, S = A), i(k) ? m = !1 : (E = !1, P ? m !== k.constructor && (m = !1) : m = k.constructor), P += A);
          if (!P) return [];
          if (!L.length) return x;
          if (E) return x.concat.apply(x, L);
          if (m) {
            for ((C = new m(P)).set(x), w = 0; w < L.length; w++) k = L[w], C.set(k, S), S += k.length;
            return C;
          }
          for (C = new Array(P), D = 0; D < x.length; D++) C[D] = x[D];
          for (w = 0; w < L.length; w++) {
            for (k = L[w], D = 0; D < k.length; D++) C[S + D] = k[D];
            S += D;
          }
          return C;
        }, s.maxRowLength = function(m) {
          return g(m, Math.max, 0);
        }, s.minRowLength = function(m) {
          return g(m, Math.min, 1 / 0);
        };
      }, 44498: function(o, s, n) {
        var l = n(10721), u = n(63821).BADNUM, i = /^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;
        o.exports = function(h) {
          return typeof h == "string" && (h = h.replace(i, "")), l(h) ? Number(h) : u;
        };
      }, 34823: function(o) {
        o.exports = function(s) {
          var n = s._fullLayout;
          n._glcanvas && n._glcanvas.size() && n._glcanvas.each(function(l) {
            l.regl && l.regl.clear({ color: !0, depth: !0 });
          });
        };
      }, 23493: function(o) {
        o.exports = function(s) {
          s._responsiveChartHandler && (window.removeEventListener("resize", s._responsiveChartHandler), delete s._responsiveChartHandler);
        };
      }, 34220: function(o, s, n) {
        var l = n(10721), u = n(65657), i = n(93049).extendFlat, h = n(9829), p = n(19017), _ = n(78766), d = n(20438).DESELECTDIM, f = n(35632), c = n(90694).counter, g = n(98953).modHalf, m = n(87800).isArrayOrTypedArray, x = n(87800).isTypedArraySpec, w = n(87800).decodeTypedArraySpec;
        function k(S, A) {
          var C = s.valObjectMeta[A.valType];
          if (A.arrayOk && m(S)) return !0;
          if (C.validateFunction) return C.validateFunction(S, A);
          var D = {}, L = D, E = { set: function(P) {
            L = P;
          } };
          return C.coerceFunction(S, E, D, A), L !== D;
        }
        s.valObjectMeta = { data_array: { coerceFunction: function(S, A, C) {
          A.set(m(S) ? S : x(S) ? w(S) : C);
        } }, enumerated: { coerceFunction: function(S, A, C, D) {
          D.coerceNumber && (S = +S), D.values.indexOf(S) === -1 ? A.set(C) : A.set(S);
        }, validateFunction: function(S, A) {
          A.coerceNumber && (S = +S);
          for (var C = A.values, D = 0; D < C.length; D++) {
            var L = String(C[D]);
            if (L.charAt(0) === "/" && L.charAt(L.length - 1) === "/") {
              if (new RegExp(L.substr(1, L.length - 2)).test(S)) return !0;
            } else if (S === C[D]) return !0;
          }
          return !1;
        } }, boolean: { coerceFunction: function(S, A, C) {
          S === !0 || S === !1 ? A.set(S) : A.set(C);
        } }, number: { coerceFunction: function(S, A, C, D) {
          x(S) && (S = w(S)), !l(S) || D.min !== void 0 && S < D.min || D.max !== void 0 && S > D.max ? A.set(C) : A.set(+S);
        } }, integer: { coerceFunction: function(S, A, C, D) {
          (D.extras || []).indexOf(S) === -1 ? (x(S) && (S = w(S)), S % 1 || !l(S) || D.min !== void 0 && S < D.min || D.max !== void 0 && S > D.max ? A.set(C) : A.set(+S)) : A.set(S);
        } }, string: { coerceFunction: function(S, A, C, D) {
          if (typeof S != "string") {
            var L = typeof S == "number";
            D.strict !== !0 && L ? A.set(String(S)) : A.set(C);
          } else D.noBlank && !S ? A.set(C) : A.set(S);
        } }, color: { coerceFunction: function(S, A, C) {
          x(S) && (S = w(S)), u(S).isValid() ? A.set(S) : A.set(C);
        } }, colorlist: { coerceFunction: function(S, A, C) {
          Array.isArray(S) && S.length && S.every(function(D) {
            return u(D).isValid();
          }) ? A.set(S) : A.set(C);
        } }, colorscale: { coerceFunction: function(S, A, C) {
          A.set(p.get(S, C));
        } }, angle: { coerceFunction: function(S, A, C) {
          x(S) && (S = w(S)), S === "auto" ? A.set("auto") : l(S) ? A.set(g(+S, 360)) : A.set(C);
        } }, subplotid: { coerceFunction: function(S, A, C, D) {
          var L = D.regex || c(C);
          typeof S == "string" && L.test(S) ? A.set(S) : A.set(C);
        }, validateFunction: function(S, A) {
          var C = A.dflt;
          return S === C || typeof S == "string" && !!c(C).test(S);
        } }, flaglist: { coerceFunction: function(S, A, C, D) {
          if ((D.extras || []).indexOf(S) === -1) if (typeof S == "string") {
            for (var L = S.split("+"), E = 0; E < L.length; ) {
              var P = L[E];
              D.flags.indexOf(P) === -1 || L.indexOf(P) < E ? L.splice(E, 1) : E++;
            }
            L.length ? A.set(L.join("+")) : A.set(C);
          } else A.set(C);
          else A.set(S);
        } }, any: { coerceFunction: function(S, A, C) {
          S === void 0 ? A.set(C) : A.set(x(S) ? w(S) : S);
        } }, info_array: { coerceFunction: function(S, A, C, D) {
          function L(re, Y, te) {
            var ee, X = { set: function(Q) {
              ee = Q;
            } };
            return te === void 0 && (te = Y.dflt), s.valObjectMeta[Y.valType].coerceFunction(re, X, te, Y), ee;
          }
          if (x(S) && (S = w(S)), m(S)) {
            var E, P, I, M, O, T, z = D.dimensions === 2 || D.dimensions === "1-2" && Array.isArray(S) && m(S[0]), F = D.items, U = [], V = Array.isArray(F), $ = V && z && m(F[0]), q = z && V && !$, K = V && !q ? F.length : S.length;
            if (C = Array.isArray(C) ? C : [], z) for (E = 0; E < K; E++) for (U[E] = [], I = m(S[E]) ? S[E] : [], O = q ? F.length : V ? F[E].length : I.length, P = 0; P < O; P++) M = q ? F[P] : V ? F[E][P] : F, (T = L(I[P], M, (C[E] || [])[P])) !== void 0 && (U[E][P] = T);
            else for (E = 0; E < K; E++) (T = L(S[E], V ? F[E] : F, C[E])) !== void 0 && (U[E] = T);
            A.set(U);
          } else A.set(C);
        }, validateFunction: function(S, A) {
          if (!m(S)) return !1;
          var C = A.items, D = Array.isArray(C), L = A.dimensions === 2;
          if (!A.freeLength && S.length !== C.length) return !1;
          for (var E = 0; E < S.length; E++) if (L) {
            if (!m(S[E]) || !A.freeLength && S[E].length !== C[E].length) return !1;
            for (var P = 0; P < S[E].length; P++) if (!k(S[E][P], D ? C[E][P] : C)) return !1;
          } else if (!k(S[E], D ? C[E] : C)) return !1;
          return !0;
        } } }, s.coerce = function(S, A, C, D, L) {
          var E = f(C, D).get(), P = f(S, D), I = f(A, D), M = P.get(), O = A._template;
          if (M === void 0 && O && (M = f(O, D).get(), O = 0), L === void 0 && (L = E.dflt), E.arrayOk) {
            if (m(M)) return I.set(M), M;
            if (x(M)) return M = w(M), I.set(M), M;
          }
          var T = s.valObjectMeta[E.valType].coerceFunction;
          T(M, I, L, E);
          var z = I.get();
          return O && z === L && !k(M, E) && (T(M = f(O, D).get(), I, L, E), z = I.get()), z;
        }, s.coerce2 = function(S, A, C, D, L) {
          var E = f(S, D), P = s.coerce(S, A, C, D, L);
          return E.get() != null && P;
        }, s.coerceFont = function(S, A, C, D) {
          D || (D = {}), C = i({}, C);
          var L = { family: S(A + ".family", (C = i(C, D.overrideDflt || {})).family), size: S(A + ".size", C.size), color: S(A + ".color", C.color), weight: S(A + ".weight", C.weight), style: S(A + ".style", C.style) };
          if (D.noFontVariant || (L.variant = S(A + ".variant", C.variant)), D.noFontLineposition || (L.lineposition = S(A + ".lineposition", C.lineposition)), D.noFontTextcase || (L.textcase = S(A + ".textcase", C.textcase)), !D.noFontShadow) {
            var E = C.shadow;
            E === "none" && D.autoShadowDflt && (E = "auto"), L.shadow = S(A + ".shadow", E);
          }
          return L;
        }, s.coercePattern = function(S, A, C, D) {
          if (S(A + ".shape")) {
            S(A + ".solidity"), S(A + ".size");
            var L = S(A + ".fillmode") === "overlay";
            if (!D) {
              var E = S(A + ".bgcolor", L ? C : void 0);
              S(A + ".fgcolor", L ? _.contrast(E) : C);
            }
            S(A + ".fgopacity", L ? 0.5 : 1);
          }
        }, s.coerceHoverinfo = function(S, A, C) {
          var D, L = A._module.attributes, E = L.hoverinfo ? L : h, P = E.hoverinfo;
          if (C._dataLength === 1) {
            var I = P.dflt === "all" ? P.flags.slice() : P.dflt.split("+");
            I.splice(I.indexOf("name"), 1), D = I.join("+");
          }
          return s.coerce(S, A, E, "hoverinfo", D);
        }, s.coerceSelectionMarkerOpacity = function(S, A) {
          if (S.marker) {
            var C, D, L = S.marker.opacity;
            L !== void 0 && (m(L) || S.selected || S.unselected || (C = L, D = d * L), A("selected.marker.opacity", C), A("unselected.marker.opacity", D));
          }
        }, s.validate = k;
      }, 92596: function(o, s, n) {
        var l, u, i = n(42696).DC, h = n(10721), p = n(48636), _ = n(98953).mod, d = n(63821), f = d.BADNUM, c = d.ONEDAY, g = d.ONEHOUR, m = d.ONEMIN, x = d.ONESEC, w = d.EPOCHJD, k = n(33626), S = n(42696).aL, A = /^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m, C = /^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m, D = (/* @__PURE__ */ new Date()).getFullYear() - 70;
        function L(q) {
          return q && k.componentsRegistry.calendars && typeof q == "string" && q !== "gregorian";
        }
        function E(q, K) {
          return String(q + Math.pow(10, K)).substr(1);
        }
        s.dateTick0 = function(q, K) {
          var re = function(te, ee) {
            return L(te) ? ee ? k.getComponentMethod("calendars", "CANONICAL_SUNDAY")[te] : k.getComponentMethod("calendars", "CANONICAL_TICK")[te] : ee ? "2000-01-02" : "2000-01-01";
          }(q, !!K);
          if (K < 2) return re;
          var Y = s.dateTime2ms(re, q);
          return Y += c * (K - 1), s.ms2DateTime(Y, 0, q);
        }, s.dfltRange = function(q) {
          return L(q) ? k.getComponentMethod("calendars", "DFLTRANGE")[q] : ["2000-01-01", "2001-01-01"];
        }, s.isJSDate = function(q) {
          return typeof q == "object" && q !== null && typeof q.getTime == "function";
        }, s.dateTime2ms = function(q, K) {
          if (s.isJSDate(q)) {
            var re = q.getTimezoneOffset() * m, Y = (q.getUTCMinutes() - q.getMinutes()) * m + (q.getUTCSeconds() - q.getSeconds()) * x + (q.getUTCMilliseconds() - q.getMilliseconds());
            if (Y) {
              var te = 3 * m;
              re = re - te / 2 + _(Y - re + te / 2, te);
            }
            return (q = Number(q) - re) >= l && q <= u ? q : f;
          }
          if (typeof q != "string" && typeof q != "number") return f;
          q = String(q);
          var ee = L(K), X = q.charAt(0);
          !ee || X !== "G" && X !== "g" || (q = q.substr(1), K = "");
          var Q = ee && K.substr(0, 7) === "chinese", ue = q.match(Q ? C : A);
          if (!ue) return f;
          var ce = ue[1], he = ue[3] || "1", de = Number(ue[5] || 1), ne = Number(ue[7] || 0), ae = Number(ue[9] || 0), se = Number(ue[11] || 0);
          if (ee) {
            if (ce.length === 2) return f;
            var me;
            ce = Number(ce);
            try {
              var ye = k.getComponentMethod("calendars", "getCal")(K);
              if (Q) {
                var pe = he.charAt(he.length - 1) === "i";
                he = parseInt(he, 10), me = ye.newDate(ce, ye.toMonthIndex(ce, he, pe), de);
              } else me = ye.newDate(ce, Number(he), de);
            } catch {
              return f;
            }
            return me ? (me.toJD() - w) * c + ne * g + ae * m + se * x : f;
          }
          ce = ce.length === 2 ? (Number(ce) + 2e3 - D) % 100 + D : Number(ce), he -= 1;
          var be = new Date(Date.UTC(2e3, he, de, ne, ae));
          return be.setUTCFullYear(ce), be.getUTCMonth() !== he || be.getUTCDate() !== de ? f : be.getTime() + se * x;
        }, l = s.MIN_MS = s.dateTime2ms("-9999"), u = s.MAX_MS = s.dateTime2ms("9999-12-31 23:59:59.9999"), s.isDateTime = function(q, K) {
          return s.dateTime2ms(q, K) !== f;
        };
        var P = 90 * c, I = 3 * g, M = 5 * m;
        function O(q, K, re, Y, te) {
          if ((K || re || Y || te) && (q += " " + E(K, 2) + ":" + E(re, 2), (Y || te) && (q += ":" + E(Y, 2), te))) {
            for (var ee = 4; te % 10 == 0; ) ee -= 1, te /= 10;
            q += "." + E(te, ee);
          }
          return q;
        }
        s.ms2DateTime = function(q, K, re) {
          if (typeof q != "number" || !(q >= l && q <= u)) return f;
          K || (K = 0);
          var Y, te, ee, X, Q, ue, ce = Math.floor(10 * _(q + 0.05, 1)), he = Math.round(q - ce / 10);
          if (L(re)) {
            var de = Math.floor(he / c) + w, ne = Math.floor(_(q, c));
            try {
              Y = k.getComponentMethod("calendars", "getCal")(re).fromJD(de).formatDate("yyyy-mm-dd");
            } catch {
              Y = S("G%Y-%m-%d")(new Date(he));
            }
            if (Y.charAt(0) === "-") for (; Y.length < 11; ) Y = "-0" + Y.substr(1);
            else for (; Y.length < 10; ) Y = "0" + Y;
            te = K < P ? Math.floor(ne / g) : 0, ee = K < P ? Math.floor(ne % g / m) : 0, X = K < I ? Math.floor(ne % m / x) : 0, Q = K < M ? ne % x * 10 + ce : 0;
          } else ue = new Date(he), Y = S("%Y-%m-%d")(ue), te = K < P ? ue.getUTCHours() : 0, ee = K < P ? ue.getUTCMinutes() : 0, X = K < I ? ue.getUTCSeconds() : 0, Q = K < M ? 10 * ue.getUTCMilliseconds() + ce : 0;
          return O(Y, te, ee, X, Q);
        }, s.ms2DateTimeLocal = function(q) {
          if (!(q >= l + c && q <= u - c)) return f;
          var K = Math.floor(10 * _(q + 0.05, 1)), re = new Date(Math.round(q - K / 10));
          return O(i("%Y-%m-%d")(re), re.getHours(), re.getMinutes(), re.getSeconds(), 10 * re.getUTCMilliseconds() + K);
        }, s.cleanDate = function(q, K, re) {
          if (q === f) return K;
          if (s.isJSDate(q) || typeof q == "number" && isFinite(q)) {
            if (L(re)) return p.error("JS Dates and milliseconds are incompatible with world calendars", q), K;
            if (!(q = s.ms2DateTimeLocal(+q)) && K !== void 0) return K;
          } else if (!s.isDateTime(q, re)) return p.error("unrecognized date", q), K;
          return q;
        };
        var T = /%\d?f/g, z = /%h/g, F = { 1: "1", 2: "1", 3: "2", 4: "2" };
        function U(q, K, re, Y) {
          q = q.replace(T, function(ee) {
            var X = Math.min(+ee.charAt(1) || 6, 6);
            return (K / 1e3 % 1 + 2).toFixed(X).substr(2).replace(/0+$/, "") || "0";
          });
          var te = new Date(Math.floor(K + 0.05));
          if (q = q.replace(z, function() {
            return F[re("%q")(te)];
          }), L(Y)) try {
            q = k.getComponentMethod("calendars", "worldCalFmt")(q, K, Y);
          } catch {
            return "Invalid";
          }
          return re(q)(te);
        }
        var V = [59, 59.9, 59.99, 59.999, 59.9999];
        s.formatDate = function(q, K, re, Y, te, ee) {
          if (te = L(te) && te, !K) if (re === "y") K = ee.year;
          else if (re === "m") K = ee.month;
          else {
            if (re !== "d") return function(X, Q) {
              var ue = _(X + 0.05, c), ce = E(Math.floor(ue / g), 2) + ":" + E(_(Math.floor(ue / m), 60), 2);
              if (Q !== "M") {
                h(Q) || (Q = 0);
                var he = (100 + Math.min(_(X / x, 60), V[Q])).toFixed(Q).substr(1);
                Q > 0 && (he = he.replace(/0+$/, "").replace(/[\.]$/, "")), ce += ":" + he;
              }
              return ce;
            }(q, re) + `
` + U(ee.dayMonthYear, q, Y, te);
            K = ee.dayMonth + `
` + ee.year;
          }
          return U(K, q, Y, te);
        };
        var $ = 3 * c;
        s.incrementMonth = function(q, K, re) {
          re = L(re) && re;
          var Y = _(q, c);
          if (q = Math.round(q - Y), re) try {
            var te = Math.round(q / c) + w, ee = k.getComponentMethod("calendars", "getCal")(re), X = ee.fromJD(te);
            return K % 12 ? ee.add(X, K, "m") : ee.add(X, K / 12, "y"), (X.toJD() - w) * c + Y;
          } catch {
            p.error("invalid ms " + q + " in calendar " + re);
          }
          var Q = new Date(q + $);
          return Q.setUTCMonth(Q.getUTCMonth() + K) + Y - $;
        }, s.findExactDates = function(q, K) {
          for (var re, Y, te = 0, ee = 0, X = 0, Q = 0, ue = L(K) && k.getComponentMethod("calendars", "getCal")(K), ce = 0; ce < q.length; ce++) if (Y = q[ce], h(Y)) {
            if (!(Y % c)) if (ue) try {
              (re = ue.fromJD(Y / c + w)).day() === 1 ? re.month() === 1 ? te++ : ee++ : X++;
            } catch {
            }
            else (re = new Date(Y)).getUTCDate() === 1 ? re.getUTCMonth() === 0 ? te++ : ee++ : X++;
          } else Q++;
          X += ee += te;
          var he = q.length - Q;
          return { exactYears: te / he, exactMonths: ee / he, exactDays: X / he };
        };
      }, 95425: function(o, s, n) {
        var l = n(45568), u = n(48636), i = n(15236), h = n(11191);
        function p(g) {
          var m = g && g.parentNode;
          m && m.removeChild(g);
        }
        function _(g, m, x) {
          var w = "plotly.js-style-" + g, k = document.getElementById(w);
          k || ((k = document.createElement("style")).setAttribute("id", w), k.appendChild(document.createTextNode("")), document.head.appendChild(k));
          var S = k.sheet;
          S.insertRule ? S.insertRule(m + "{" + x + "}", 0) : S.addRule ? S.addRule(m, x, 0) : u.warn("addStyleRule failed");
        }
        function d(g) {
          var m = window.getComputedStyle(g, null), x = m.getPropertyValue("-webkit-transform") || m.getPropertyValue("-moz-transform") || m.getPropertyValue("-ms-transform") || m.getPropertyValue("-o-transform") || m.getPropertyValue("transform");
          return x === "none" ? null : x.replace("matrix", "").replace("3d", "").slice(1, -1).split(",").map(function(w) {
            return +w;
          });
        }
        function f(g) {
          for (var m = []; c(g); ) m.push(g), g = g.parentNode, typeof ShadowRoot == "function" && g instanceof ShadowRoot && (g = g.host);
          return m;
        }
        function c(g) {
          return g && (g instanceof Element || g instanceof HTMLElement);
        }
        o.exports = { getGraphDiv: function(g) {
          var m;
          if (typeof g == "string") {
            if ((m = document.getElementById(g)) === null) throw new Error("No DOM element with id '" + g + "' exists on the page.");
            return m;
          }
          if (g == null) throw new Error("DOM element provided is null or undefined");
          return g;
        }, isPlotDiv: function(g) {
          var m = l.select(g);
          return m.node() instanceof HTMLElement && m.size() && m.classed("js-plotly-plot");
        }, removeElement: p, addStyleRule: function(g, m) {
          _("global", g, m);
        }, addRelatedStyleRule: _, deleteRelatedStyleRule: function(g) {
          var m = "plotly.js-style-" + g, x = document.getElementById(m);
          x && p(x);
        }, getFullTransformMatrix: function(g) {
          var m = f(g), x = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
          return m.forEach(function(w) {
            var k = d(w);
            if (k) {
              var S = i.convertCssMatrix(k);
              x = h.multiply(x, x, S);
            }
          }), x;
        }, getElementTransformMatrix: d, getElementAndAncestors: f, equalDomRects: function(g, m) {
          return g && m && g.top === m.top && g.left === m.left && g.right === m.right && g.bottom === m.bottom;
        } };
      }, 68596: function(o, s, n) {
        var l = n(7683).EventEmitter, u = { init: function(i) {
          if (i._ev instanceof l) return i;
          var h = new l(), p = new l();
          return i._ev = h, i._internalEv = p, i.on = h.on.bind(h), i.once = h.once.bind(h), i.removeListener = h.removeListener.bind(h), i.removeAllListeners = h.removeAllListeners.bind(h), i._internalOn = p.on.bind(p), i._internalOnce = p.once.bind(p), i._removeInternalListener = p.removeListener.bind(p), i._removeAllInternalListeners = p.removeAllListeners.bind(p), i.emit = function(_, d) {
            typeof jQuery < "u" && jQuery(i).trigger(_, d), h.emit(_, d), p.emit(_, d);
          }, i;
        }, triggerHandler: function(i, h, p) {
          var _, d;
          typeof jQuery < "u" && (_ = jQuery(i).triggerHandler(h, p));
          var f = i._ev;
          if (!f) return _;
          var c, g = f._events[h];
          if (!g) return _;
          function m(x) {
            return x.listener ? (f.removeListener(h, x.listener), x.fired ? void 0 : (x.fired = !0, x.listener.apply(f, [p]))) : x.apply(f, [p]);
          }
          for (g = Array.isArray(g) ? g : [g], c = 0; c < g.length - 1; c++) m(g[c]);
          return d = m(g[c]), _ !== void 0 ? _ : d;
        }, purge: function(i) {
          return delete i._ev, delete i.on, delete i.once, delete i.removeListener, delete i.removeAllListeners, delete i.emit, delete i._ev, delete i._internalEv, delete i._internalOn, delete i._internalOnce, delete i._removeInternalListener, delete i._removeAllInternalListeners, i;
        } };
        o.exports = u;
      }, 93049: function(o, s, n) {
        var l = n(56174), u = Array.isArray;
        function i(h, p, _, d) {
          var f, c, g, m, x, w, k, S = h[0], A = h.length;
          if (A === 2 && u(S) && u(h[1]) && S.length === 0) {
            if (k = function(D, L) {
              var E, P;
              for (E = 0; E < D.length; E++) {
                if ((P = D[E]) !== null && typeof P == "object") return !1;
                P !== void 0 && (L[E] = P);
              }
              return !0;
            }(h[1], S), k) return S;
            S.splice(0, S.length);
          }
          for (var C = 1; C < A; C++) for (c in f = h[C]) g = S[c], m = f[c], d && u(m) ? S[c] = m : p && m && (l(m) || (x = u(m))) ? (x ? (x = !1, w = g && u(g) ? g : []) : w = g && l(g) ? g : {}, S[c] = i([w, m], p, _, d)) : (m !== void 0 || _) && (S[c] = m);
          return S;
        }
        s.extendFlat = function() {
          return i(arguments, !1, !1, !1);
        }, s.extendDeep = function() {
          return i(arguments, !0, !1, !1);
        }, s.extendDeepAll = function() {
          return i(arguments, !0, !0, !1);
        }, s.extendDeepNoArrays = function() {
          return i(arguments, !0, !1, !0);
        };
      }, 48965: function(o) {
        o.exports = function(s) {
          for (var n = {}, l = [], u = 0, i = 0; i < s.length; i++) {
            var h = s[i];
            n[h] !== 1 && (n[h] = 1, l[u++] = h);
          }
          return l;
        };
      }, 78926: function(o) {
        function s(l) {
          return l.visible === !0;
        }
        function n(l) {
          var u = l[0].trace;
          return u.visible === !0 && u._length !== 0;
        }
        o.exports = function(l) {
          for (var u, i = (u = l, Array.isArray(u) && Array.isArray(u[0]) && u[0][0] && u[0][0].trace ? n : s), h = [], p = 0; p < l.length; p++) {
            var _ = l[p];
            i(_) && h.push(_);
          }
          return h;
        };
      }, 3994: function(o, s, n) {
        var l = n(45568), u = n(78171), { area: i } = n(61990), { centroid: h } = n(30035), { bbox: p } = n(25368), _ = n(29527), d = n(48636), f = n(56174), c = n(35632), g = n(80899), m = Object.keys(u), x = { "ISO-3": _, "USA-states": _, "country names": function(k) {
          for (var S = 0; S < m.length; S++) {
            var A = m[S];
            if (new RegExp(u[A]).test(k.trim().toLowerCase())) return A;
          }
          return d.log("Unrecognized country name: " + k + "."), !1;
        } };
        function w(k) {
          var S = k.geojson, A = window.PlotlyGeoAssets || {}, C = typeof S == "string" ? A[S] : S;
          return f(C) ? C : (d.error("Oops ... something went wrong when fetching " + S), !1);
        }
        o.exports = { locationToFeature: function(k, S, A) {
          if (!S || typeof S != "string") return !1;
          var C, D, L, E = x[k](S);
          if (E) {
            if (k === "USA-states") for (C = [], L = 0; L < A.length; L++) (D = A[L]).properties && D.properties.gu && D.properties.gu === "USA" && C.push(D);
            else C = A;
            for (L = 0; L < C.length; L++) if ((D = C[L]).id === E) return D;
            d.log(["Location with id", E, "does not have a matching topojson feature at this resolution."].join(" "));
          }
          return !1;
        }, feature2polygons: function(k) {
          var S, A, C, D, L = k.geometry, E = L.coordinates, P = k.id, I = [];
          function M(O) {
            for (var T = 0; T < O.length - 1; T++) if (O[T][0] > 0 && O[T + 1][0] < 0) return T;
            return null;
          }
          switch (S = P === "RUS" || P === "FJI" ? function(O) {
            var T;
            if (M(O) === null) T = O;
            else for (T = new Array(O.length), D = 0; D < O.length; D++) T[D] = [O[D][0] < 0 ? O[D][0] + 360 : O[D][0], O[D][1]];
            I.push(g.tester(T));
          } : P === "ATA" ? function(O) {
            var T = M(O);
            if (T === null) return I.push(g.tester(O));
            var z = new Array(O.length + 1), F = 0;
            for (D = 0; D < O.length; D++) D > T ? z[F++] = [O[D][0] + 360, O[D][1]] : D === T ? (z[F++] = O[D], z[F++] = [O[D][0], -90]) : z[F++] = O[D];
            var U = g.tester(z);
            U.pts.pop(), I.push(U);
          } : function(O) {
            I.push(g.tester(O));
          }, L.type) {
            case "MultiPolygon":
              for (A = 0; A < E.length; A++) for (C = 0; C < E[A].length; C++) S(E[A][C]);
              break;
            case "Polygon":
              for (A = 0; A < E.length; A++) S(E[A]);
          }
          return I;
        }, getTraceGeojson: w, extractTraceFeature: function(k) {
          var S = k[0].trace, A = w(S);
          if (!A) return !1;
          var C, D = {}, L = [];
          for (C = 0; C < S._length; C++) {
            var E = k[C];
            (E.loc || E.loc === 0) && (D[E.loc] = E);
          }
          function P(O) {
            var T = c(O, S.featureidkey || "id").get(), z = D[T];
            if (z) {
              var F = O.geometry;
              if (F.type === "Polygon" || F.type === "MultiPolygon") {
                var U = { type: "Feature", id: T, geometry: F, properties: {} };
                U.geometry.coordinates.length > 0 ? U.properties.ct = function(V) {
                  var $, q = V.geometry;
                  if (q.type === "MultiPolygon") for (var K = q.coordinates, re = 0, Y = 0; Y < K.length; Y++) {
                    var te = { type: "Polygon", coordinates: K[Y] }, ee = i(te);
                    ee > re && (re = ee, $ = te);
                  }
                  else $ = q;
                  return h($).geometry.coordinates;
                }(U) : U.properties.ct = [NaN, NaN], z.fIn = O, z.fOut = U, L.push(U);
              } else d.log(["Location", z.loc, "does not have a valid GeoJSON geometry.", "Traces with locationmode *geojson-id* only support", "*Polygon* and *MultiPolygon* geometries."].join(" "));
            }
            delete D[T];
          }
          switch (A.type) {
            case "FeatureCollection":
              var I = A.features;
              for (C = 0; C < I.length; C++) P(I[C]);
              break;
            case "Feature":
              P(A);
              break;
            default:
              return d.warn(["Invalid GeoJSON type", (A.type || "none") + ".", "Traces with locationmode *geojson-id* only support", "*FeatureCollection* and *Feature* types."].join(" ")), !1;
          }
          for (var M in D) d.log(["Location *" + M + "*", "does not have a matching feature with id-key", "*" + S.featureidkey + "*."].join(" "));
          return L;
        }, fetchTraceGeoData: function(k) {
          var S = window.PlotlyGeoAssets || {}, A = [];
          function C(P) {
            return new Promise(function(I, M) {
              l.json(P, function(O, T) {
                if (O) {
                  delete S[P];
                  var z = O.status === 404 ? 'GeoJSON at URL "' + P + '" does not exist.' : "Unexpected error while fetching from " + P;
                  return M(new Error(z));
                }
                return S[P] = T, I(T);
              });
            });
          }
          function D(P) {
            return new Promise(function(I, M) {
              var O = 0, T = setInterval(function() {
                return S[P] && S[P] !== "pending" ? (clearInterval(T), I(S[P])) : O > 100 ? (clearInterval(T), M("Unexpected error while fetching from " + P)) : void O++;
              }, 50);
            });
          }
          for (var L = 0; L < k.length; L++) {
            var E = k[L][0].trace.geojson;
            typeof E == "string" && (S[E] ? S[E] === "pending" && A.push(D(E)) : (S[E] = "pending", A.push(C(E))));
          }
          return A;
        }, computeBbox: function(k) {
          return p(k);
        } };
      }, 39532: function(o, s, n) {
        var l = n(63821).BADNUM;
        s.calcTraceToLineCoords = function(u) {
          for (var i = u[0].trace.connectgaps, h = [], p = [], _ = 0; _ < u.length; _++) {
            var d = u[_].lonlat;
            d[0] !== l ? p.push(d) : !i && p.length > 0 && (h.push(p), p = []);
          }
          return p.length > 0 && h.push(p), h;
        }, s.makeLine = function(u) {
          return u.length === 1 ? { type: "LineString", coordinates: u[0] } : { type: "MultiLineString", coordinates: u };
        }, s.makePolygon = function(u) {
          if (u.length === 1) return { type: "Polygon", coordinates: u };
          for (var i = new Array(u.length), h = 0; h < u.length; h++) i[h] = [u[h]];
          return { type: "MultiPolygon", coordinates: i };
        }, s.makeBlank = function() {
          return { type: "Point", coordinates: [] };
        };
      }, 3447: function(o, s, n) {
        var l, u, i, h = n(98953).mod;
        function p(d, f, c, g, m, x, w, k) {
          var S = c - d, A = m - d, C = w - m, D = g - f, L = x - f, E = k - x, P = S * E - C * D;
          if (P === 0) return null;
          var I = (A * E - C * L) / P, M = (A * D - S * L) / P;
          return M < 0 || M > 1 || I < 0 || I > 1 ? null : { x: d + S * I, y: f + D * I };
        }
        function _(d, f, c, g, m) {
          var x = g * d + m * f;
          if (x < 0) return g * g + m * m;
          if (x > c) {
            var w = g - d, k = m - f;
            return w * w + k * k;
          }
          var S = g * f - m * d;
          return S * S / c;
        }
        s.segmentsIntersect = p, s.segmentDistance = function(d, f, c, g, m, x, w, k) {
          if (p(d, f, c, g, m, x, w, k)) return 0;
          var S = c - d, A = g - f, C = w - m, D = k - x, L = S * S + A * A, E = C * C + D * D, P = Math.min(_(S, A, L, m - d, x - f), _(S, A, L, w - d, k - f), _(C, D, E, d - m, f - x), _(C, D, E, c - m, g - x));
          return Math.sqrt(P);
        }, s.getTextLocation = function(d, f, c, g) {
          if (d === u && g === i || (l = {}, u = d, i = g), l[c]) return l[c];
          var m = d.getPointAtLength(h(c - g / 2, f)), x = d.getPointAtLength(h(c + g / 2, f)), w = Math.atan((x.y - m.y) / (x.x - m.x)), k = d.getPointAtLength(h(c, f)), S = { x: (4 * k.x + m.x + x.x) / 6, y: (4 * k.y + m.y + x.y) / 6, theta: w };
          return l[c] = S, S;
        }, s.clearLocationCache = function() {
          u = null;
        }, s.getVisibleSegment = function(d, f, c) {
          var g, m, x = f.left, w = f.right, k = f.top, S = f.bottom, A = 0, C = d.getTotalLength(), D = C;
          function L(P) {
            var I = d.getPointAtLength(P);
            P === 0 ? g = I : P === C && (m = I);
            var M = I.x < x ? x - I.x : I.x > w ? I.x - w : 0, O = I.y < k ? k - I.y : I.y > S ? I.y - S : 0;
            return Math.sqrt(M * M + O * O);
          }
          for (var E = L(A); E; ) {
            if ((A += E + c) > D) return;
            E = L(A);
          }
          for (E = L(D); E; ) {
            if (A > (D -= E + c)) return;
            E = L(D);
          }
          return { min: A, max: D, len: D - A, total: C, isClosed: A === 0 && D === C && Math.abs(g.x - m.x) < 0.1 && Math.abs(g.y - m.y) < 0.1 };
        }, s.findPointOnPath = function(d, f, c, g) {
          for (var m, x, w, k = (g = g || {}).pathLength || d.getTotalLength(), S = g.tolerance || 1e-3, A = g.iterationLimit || 30, C = d.getPointAtLength(0)[c] > d.getPointAtLength(k)[c] ? -1 : 1, D = 0, L = 0, E = k; D < A; ) {
            if (m = (L + E) / 2, w = (x = d.getPointAtLength(m))[c] - f, Math.abs(w) < S) return x;
            C * w > 0 ? E = m : L = m, D++;
          }
          return x;
        };
      }, 46998: function(o, s, n) {
        var l = n(10721), u = n(65657), i = n(162), h = n(88856), p = n(10229).defaultLine, _ = n(87800).isArrayOrTypedArray, d = i(p);
        function f(m, x) {
          var w = m;
          return w[3] *= x, w;
        }
        function c(m) {
          if (l(m)) return d;
          var x = i(m);
          return x.length ? x : d;
        }
        function g(m) {
          return l(m) ? m : 1;
        }
        o.exports = { formatColor: function(m, x, w) {
          var k = m.color;
          k && k._inputArray && (k = k._inputArray);
          var S, A, C, D, L, E = _(k), P = _(x), I = h.extractOpts(m), M = [];
          if (S = I.colorscale !== void 0 ? h.makeColorScaleFuncFromTrace(m) : c, A = E ? function(T, z) {
            return T[z] === void 0 ? d : i(S(T[z]));
          } : c, C = P ? function(T, z) {
            return T[z] === void 0 ? 1 : g(T[z]);
          } : g, E || P) for (var O = 0; O < w; O++) D = A(k, O), L = C(x, O), M[O] = f(D, L);
          else M = f(i(k), x);
          return M;
        }, parseColorScale: function(m) {
          var x = h.extractOpts(m), w = x.colorscale;
          return x.reversescale && (w = h.flipScale(x.colorscale)), w.map(function(k) {
            var S = k[0], A = u(k[1]).toRgb();
            return { index: S, rgb: [A.r, A.g, A.b, A.a] };
          });
        } };
      }, 71293: function(o, s, n) {
        var l = n(29527);
        function u(i) {
          return [i];
        }
        o.exports = { keyFun: function(i) {
          return i.key;
        }, repeat: u, descend: l, wrap: u, unwrap: function(i) {
          return i[0];
        } };
      }, 29527: function(o) {
        o.exports = function(s) {
          return s;
        };
      }, 10688: function(o) {
        o.exports = function(s, n) {
          if (!n) return s;
          var l = 1 / Math.abs(n), u = l > 1 ? (l * s + l * n) / l : s + n, i = String(u).length;
          if (i > 16) {
            var h = String(n).length;
            if (i >= String(s).length + h) {
              var p = parseFloat(u).toPrecision(12);
              p.indexOf("e+") === -1 && (u = +p);
            }
          }
          return u;
        };
      }, 34809: function(o, s, n) {
        var l = n(45568), u = n(42696).aL, i = n(36464).GP, h = n(10721), p = n(63821), _ = p.FP_SAFE, d = -_, f = p.BADNUM, c = o.exports = {};
        c.adjustFormat = function(ne) {
          return !ne || /^\d[.]\df/.test(ne) || /[.]\d%/.test(ne) ? ne : ne === "0.f" ? "~f" : /^\d%/.test(ne) ? "~%" : /^\ds/.test(ne) ? "~s" : !/^[~,.0$]/.test(ne) && /[&fps]/.test(ne) ? "~" + ne : ne;
        };
        var g = {};
        c.warnBadFormat = function(ne) {
          var ae = String(ne);
          g[ae] || (g[ae] = 1, c.warn('encountered bad format: "' + ae + '"'));
        }, c.noFormat = function(ne) {
          return String(ne);
        }, c.numberFormat = function(ne) {
          var ae;
          try {
            ae = i(c.adjustFormat(ne));
          } catch {
            return c.warnBadFormat(ne), c.noFormat;
          }
          return ae;
        }, c.nestedProperty = n(35632), c.keyedContainer = n(34967), c.relativeAttr = n(82047), c.isPlainObject = n(56174), c.toLogRange = n(8083), c.relinkPrivateKeys = n(80428);
        var m = n(87800);
        c.isArrayBuffer = m.isArrayBuffer, c.isTypedArray = m.isTypedArray, c.isArrayOrTypedArray = m.isArrayOrTypedArray, c.isArray1D = m.isArray1D, c.ensureArray = m.ensureArray, c.concat = m.concat, c.maxRowLength = m.maxRowLength, c.minRowLength = m.minRowLength;
        var x = n(98953);
        c.mod = x.mod, c.modHalf = x.modHalf;
        var w = n(34220);
        c.valObjectMeta = w.valObjectMeta, c.coerce = w.coerce, c.coerce2 = w.coerce2, c.coerceFont = w.coerceFont, c.coercePattern = w.coercePattern, c.coerceHoverinfo = w.coerceHoverinfo, c.coerceSelectionMarkerOpacity = w.coerceSelectionMarkerOpacity, c.validate = w.validate;
        var k = n(92596);
        c.dateTime2ms = k.dateTime2ms, c.isDateTime = k.isDateTime, c.ms2DateTime = k.ms2DateTime, c.ms2DateTimeLocal = k.ms2DateTimeLocal, c.cleanDate = k.cleanDate, c.isJSDate = k.isJSDate, c.formatDate = k.formatDate, c.incrementMonth = k.incrementMonth, c.dateTick0 = k.dateTick0, c.dfltRange = k.dfltRange, c.findExactDates = k.findExactDates, c.MIN_MS = k.MIN_MS, c.MAX_MS = k.MAX_MS;
        var S = n(98813);
        c.findBin = S.findBin, c.sorterAsc = S.sorterAsc, c.sorterDes = S.sorterDes, c.distinctVals = S.distinctVals, c.roundUp = S.roundUp, c.sort = S.sort, c.findIndexOfMin = S.findIndexOfMin, c.sortObjectKeys = n(62994);
        var A = n(89258);
        c.aggNums = A.aggNums, c.len = A.len, c.mean = A.mean, c.geometricMean = A.geometricMean, c.median = A.median, c.midRange = A.midRange, c.variance = A.variance, c.stdev = A.stdev, c.interp = A.interp;
        var C = n(15236);
        c.init2dArray = C.init2dArray, c.transposeRagged = C.transposeRagged, c.dot = C.dot, c.translationMatrix = C.translationMatrix, c.rotationMatrix = C.rotationMatrix, c.rotationXYMatrix = C.rotationXYMatrix, c.apply3DTransform = C.apply3DTransform, c.apply2DTransform = C.apply2DTransform, c.apply2DTransform2 = C.apply2DTransform2, c.convertCssMatrix = C.convertCssMatrix, c.inverseTransformMatrix = C.inverseTransformMatrix;
        var D = n(44313);
        c.deg2rad = D.deg2rad, c.rad2deg = D.rad2deg, c.angleDelta = D.angleDelta, c.angleDist = D.angleDist, c.isFullCircle = D.isFullCircle, c.isAngleInsideSector = D.isAngleInsideSector, c.isPtInsideSector = D.isPtInsideSector, c.pathArc = D.pathArc, c.pathSector = D.pathSector, c.pathAnnulus = D.pathAnnulus;
        var L = n(32546);
        c.isLeftAnchor = L.isLeftAnchor, c.isCenterAnchor = L.isCenterAnchor, c.isRightAnchor = L.isRightAnchor, c.isTopAnchor = L.isTopAnchor, c.isMiddleAnchor = L.isMiddleAnchor, c.isBottomAnchor = L.isBottomAnchor;
        var E = n(3447);
        c.segmentsIntersect = E.segmentsIntersect, c.segmentDistance = E.segmentDistance, c.getTextLocation = E.getTextLocation, c.clearLocationCache = E.clearLocationCache, c.getVisibleSegment = E.getVisibleSegment, c.findPointOnPath = E.findPointOnPath;
        var P = n(93049);
        c.extendFlat = P.extendFlat, c.extendDeep = P.extendDeep, c.extendDeepAll = P.extendDeepAll, c.extendDeepNoArrays = P.extendDeepNoArrays;
        var I = n(48636);
        c.log = I.log, c.warn = I.warn, c.error = I.error;
        var M = n(90694);
        c.counterRegex = M.counter;
        var O = n(64025);
        c.throttle = O.throttle, c.throttleDone = O.done, c.clearThrottle = O.clear;
        var T = n(95425);
        function z(ne) {
          var ae = {};
          for (var se in ne) for (var me = ne[se], ye = 0; ye < me.length; ye++) ae[me[ye]] = +se;
          return ae;
        }
        c.getGraphDiv = T.getGraphDiv, c.isPlotDiv = T.isPlotDiv, c.removeElement = T.removeElement, c.addStyleRule = T.addStyleRule, c.addRelatedStyleRule = T.addRelatedStyleRule, c.deleteRelatedStyleRule = T.deleteRelatedStyleRule, c.getFullTransformMatrix = T.getFullTransformMatrix, c.getElementTransformMatrix = T.getElementTransformMatrix, c.getElementAndAncestors = T.getElementAndAncestors, c.equalDomRects = T.equalDomRects, c.clearResponsive = n(23493), c.preserveDrawingBuffer = n(32521), c.makeTraceGroups = n(75944), c._ = n(38514), c.notifier = n(87355), c.filterUnique = n(48965), c.filterVisible = n(78926), c.pushUnique = n(36539), c.increment = n(10688), c.cleanNumber = n(44498), c.ensureNumber = function(ne) {
          return h(ne) ? (ne = Number(ne)) > _ || ne < d ? f : ne : f;
        }, c.isIndex = function(ne, ae) {
          return !(ae !== void 0 && ne >= ae) && h(ne) && ne >= 0 && ne % 1 == 0;
        }, c.noop = n(4969), c.identity = n(29527), c.repeat = function(ne, ae) {
          for (var se = new Array(ae), me = 0; me < ae; me++) se[me] = ne;
          return se;
        }, c.swapAttrs = function(ne, ae, se, me) {
          se || (se = "x"), me || (me = "y");
          for (var ye = 0; ye < ae.length; ye++) {
            var pe = ae[ye], be = c.nestedProperty(ne, pe.replace("?", se)), Ae = c.nestedProperty(ne, pe.replace("?", me)), Se = be.get();
            be.set(Ae.get()), Ae.set(Se);
          }
        }, c.raiseToTop = function(ne) {
          ne.parentNode.appendChild(ne);
        }, c.cancelTransition = function(ne) {
          return ne.transition().duration(0);
        }, c.constrain = function(ne, ae, se) {
          return ae > se ? Math.max(se, Math.min(ae, ne)) : Math.max(ae, Math.min(se, ne));
        }, c.bBoxIntersect = function(ne, ae, se) {
          return se = se || 0, ne.left <= ae.right + se && ae.left <= ne.right + se && ne.top <= ae.bottom + se && ae.top <= ne.bottom + se;
        }, c.simpleMap = function(ne, ae, se, me, ye) {
          for (var pe = ne.length, be = new Array(pe), Ae = 0; Ae < pe; Ae++) be[Ae] = ae(ne[Ae], se, me, ye);
          return be;
        }, c.randstr = function ne(ae, se, me, ye) {
          if (me || (me = 16), se === void 0 && (se = 24), se <= 0) return "0";
          var pe, be, Ae = Math.log(Math.pow(2, se)) / Math.log(me), Se = "";
          for (pe = 2; Ae === 1 / 0; pe *= 2) Ae = Math.log(Math.pow(2, se / pe)) / Math.log(me) * pe;
          var Me = Ae - Math.floor(Ae);
          for (pe = 0; pe < Math.floor(Ae); pe++) Se = Math.floor(Math.random() * me).toString(me) + Se;
          Me && (be = Math.pow(me, Me), Se = Math.floor(Math.random() * be).toString(me) + Se);
          var De = parseInt(Se, me);
          return ae && ae[Se] || De !== 1 / 0 && De >= Math.pow(2, se) ? ye > 10 ? (c.warn("randstr failed uniqueness"), Se) : ne(ae, se, me, (ye || 0) + 1) : Se;
        }, c.OptionControl = function(ne, ae) {
          ne || (ne = {}), ae || (ae = "opt");
          var se = { optionList: [], _newoption: function(me) {
            me[ae] = ne, se[me.name] = me, se.optionList.push(me);
          } };
          return se["_" + ae] = ne, se;
        }, c.smooth = function(ne, ae) {
          if ((ae = Math.round(ae) || 0) < 2) return ne;
          var se, me, ye, pe, be = ne.length, Ae = 2 * be, Se = 2 * ae - 1, Me = new Array(Se), De = new Array(be);
          for (se = 0; se < Se; se++) Me[se] = (1 - Math.cos(Math.PI * (se + 1) / ae)) / (2 * ae);
          for (se = 0; se < be; se++) {
            for (pe = 0, me = 0; me < Se; me++) (ye = se + me + 1 - ae) < -be ? ye -= Ae * Math.round(ye / Ae) : ye >= Ae && (ye -= Ae * Math.floor(ye / Ae)), ye < 0 ? ye = -1 - ye : ye >= be && (ye = Ae - 1 - ye), pe += ne[ye] * Me[me];
            De[se] = pe;
          }
          return De;
        }, c.syncOrAsync = function(ne, ae, se) {
          var me;
          function ye() {
            return c.syncOrAsync(ne, ae, se);
          }
          for (; ne.length; ) if ((me = (0, ne.splice(0, 1)[0])(ae)) && me.then) return me.then(ye);
          return se && se(ae);
        }, c.stripTrailingSlash = function(ne) {
          return ne.substr(-1) === "/" ? ne.substr(0, ne.length - 1) : ne;
        }, c.noneOrAll = function(ne, ae, se) {
          if (ne) {
            var me, ye = !1, pe = !0;
            for (me = 0; me < se.length; me++) ne[se[me]] != null ? ye = !0 : pe = !1;
            if (ye && !pe) for (me = 0; me < se.length; me++) ne[se[me]] = ae[se[me]];
          }
        }, c.mergeArray = function(ne, ae, se, me) {
          var ye = typeof me == "function";
          if (c.isArrayOrTypedArray(ne)) for (var pe = Math.min(ne.length, ae.length), be = 0; be < pe; be++) {
            var Ae = ne[be];
            ae[be][se] = ye ? me(Ae) : Ae;
          }
        }, c.mergeArrayCastPositive = function(ne, ae, se) {
          return c.mergeArray(ne, ae, se, function(me) {
            var ye = +me;
            return isFinite(ye) && ye > 0 ? ye : 0;
          });
        }, c.fillArray = function(ne, ae, se, me) {
          if (me = me || c.identity, c.isArrayOrTypedArray(ne)) for (var ye = 0; ye < ae.length; ye++) ae[ye][se] = me(ne[ye]);
        }, c.castOption = function(ne, ae, se, me) {
          me = me || c.identity;
          var ye = c.nestedProperty(ne, se).get();
          return c.isArrayOrTypedArray(ye) ? Array.isArray(ae) && c.isArrayOrTypedArray(ye[ae[0]]) ? me(ye[ae[0]][ae[1]]) : me(ye[ae]) : ye;
        }, c.extractOption = function(ne, ae, se, me) {
          if (se in ne) return ne[se];
          var ye = c.nestedProperty(ae, me).get();
          return Array.isArray(ye) ? void 0 : ye;
        }, c.tagSelected = function(ne, ae, se) {
          var me, ye, pe = ae.selectedpoints, be = ae._indexToPoints;
          be && (me = z(be));
          for (var Ae = 0; Ae < pe.length; Ae++) {
            var Se = pe[Ae];
            if (c.isIndex(Se) || c.isArrayOrTypedArray(Se) && c.isIndex(Se[0]) && c.isIndex(Se[1])) {
              var Me = me ? me[Se] : Se, De = se ? se[Me] : Me;
              (ye = De) !== void 0 && ye < ne.length && (ne[De].selected = 1);
            }
          }
        }, c.selIndices2selPoints = function(ne) {
          var ae = ne.selectedpoints, se = ne._indexToPoints;
          if (se) {
            for (var me = z(se), ye = [], pe = 0; pe < ae.length; pe++) {
              var be = ae[pe];
              if (c.isIndex(be)) {
                var Ae = me[be];
                c.isIndex(Ae) && ye.push(Ae);
              }
            }
            return ye;
          }
          return ae;
        }, c.getTargetArray = function(ne, ae) {
          var se = ae.target;
          if (typeof se == "string" && se) {
            var me = c.nestedProperty(ne, se).get();
            return !!c.isArrayOrTypedArray(me) && me;
          }
          return !!c.isArrayOrTypedArray(se) && se;
        }, c.minExtend = function ne(ae, se, me) {
          var ye = {};
          typeof se != "object" && (se = {});
          var pe, be, Ae, Se = me === "pieLike" ? -1 : 3, Me = Object.keys(ae);
          for (pe = 0; pe < Me.length; pe++) Ae = ae[be = Me[pe]], be.charAt(0) !== "_" && typeof Ae != "function" && (be === "module" ? ye[be] = Ae : Array.isArray(Ae) ? ye[be] = be === "colorscale" || Se === -1 ? Ae.slice() : Ae.slice(0, Se) : c.isTypedArray(Ae) ? ye[be] = Se === -1 ? Ae.subarray() : Ae.subarray(0, Se) : ye[be] = Ae && typeof Ae == "object" ? ne(ae[be], se[be], me) : Ae);
          for (Me = Object.keys(se), pe = 0; pe < Me.length; pe++) typeof (Ae = se[be = Me[pe]]) == "object" && be in ye && typeof ye[be] == "object" || (ye[be] = Ae);
          return ye;
        }, c.titleCase = function(ne) {
          return ne.charAt(0).toUpperCase() + ne.substr(1);
        }, c.containsAny = function(ne, ae) {
          for (var se = 0; se < ae.length; se++) if (ne.indexOf(ae[se]) !== -1) return !0;
          return !1;
        }, c.isIE = function() {
          return window.navigator.msSaveBlob !== void 0;
        };
        var F = /Version\/[\d\.]+.*Safari/;
        c.isSafari = function() {
          return F.test(window.navigator.userAgent);
        };
        var U = /iPad|iPhone|iPod/;
        c.isIOS = function() {
          return U.test(window.navigator.userAgent);
        };
        var V = /Firefox\/(\d+)\.\d+/;
        c.getFirefoxVersion = function() {
          var ne = V.exec(window.navigator.userAgent);
          if (ne && ne.length === 2) {
            var ae = parseInt(ne[1]);
            if (!isNaN(ae)) return ae;
          }
          return null;
        }, c.isD3Selection = function(ne) {
          return ne instanceof l.selection;
        }, c.ensureSingle = function(ne, ae, se, me) {
          var ye = ne.select(ae + (se ? "." + se : ""));
          if (ye.size()) return ye;
          var pe = ne.append(ae);
          return se && pe.classed(se, !0), me && pe.call(me), pe;
        }, c.ensureSingleById = function(ne, ae, se, me) {
          var ye = ne.select(ae + "#" + se);
          if (ye.size()) return ye;
          var pe = ne.append(ae).attr("id", se);
          return me && pe.call(me), pe;
        }, c.objectFromPath = function(ne, ae) {
          for (var se, me = ne.split("."), ye = se = {}, pe = 0; pe < me.length; pe++) {
            var be = me[pe], Ae = null, Se = me[pe].match(/(.*)\[([0-9]+)\]/);
            Se ? (be = Se[1], Ae = Se[2], se = se[be] = [], pe === me.length - 1 ? se[Ae] = ae : se[Ae] = {}, se = se[Ae]) : (pe === me.length - 1 ? se[be] = ae : se[be] = {}, se = se[be]);
          }
          return ye;
        };
        var $ = /^([^\[\.]+)\.(.+)?/, q = /^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;
        function K(ne) {
          return ne.slice(0, 2) === "__";
        }
        c.expandObjectPaths = function(ne) {
          var ae, se, me, ye, pe, be, Ae;
          if (typeof ne == "object" && !Array.isArray(ne)) {
            for (se in ne) if (ne.hasOwnProperty(se)) if (ae = se.match($)) {
              if (ye = ne[se], K(me = ae[1])) continue;
              delete ne[se], ne[me] = c.extendDeepNoArrays(ne[me] || {}, c.objectFromPath(se, c.expandObjectPaths(ye))[me]);
            } else if (ae = se.match(q)) {
              if (ye = ne[se], K(me = ae[1])) continue;
              if (pe = parseInt(ae[2]), delete ne[se], ne[me] = ne[me] || [], ae[3] === ".") Ae = ae[4], be = ne[me][pe] = ne[me][pe] || {}, c.extendDeepNoArrays(be, c.objectFromPath(Ae, c.expandObjectPaths(ye)));
              else {
                if (K(me)) continue;
                ne[me][pe] = c.expandObjectPaths(ye);
              }
            } else {
              if (K(se)) continue;
              ne[se] = c.expandObjectPaths(ne[se]);
            }
          }
          return ne;
        }, c.numSeparate = function(ne, ae, se) {
          if (se || (se = !1), typeof ae != "string" || ae.length === 0) throw new Error("Separator string required for formatting!");
          typeof ne == "number" && (ne = String(ne));
          var me = /(\d+)(\d{3})/, ye = ae.charAt(0), pe = ae.charAt(1), be = ne.split("."), Ae = be[0], Se = be.length > 1 ? ye + be[1] : "";
          if (pe && (be.length > 1 || Ae.length > 4 || se)) for (; me.test(Ae); ) Ae = Ae.replace(me, "$1" + pe + "$2");
          return Ae + Se;
        }, c.TEMPLATE_STRING_REGEX = /%{([^\s%{}:]*)([:|\|][^}]*)?}/g;
        var re = /^\w*$/;
        c.templateString = function(ne, ae) {
          var se = {};
          return ne.replace(c.TEMPLATE_STRING_REGEX, function(me, ye) {
            var pe;
            return re.test(ye) ? pe = ae[ye] : (se[ye] = se[ye] || c.nestedProperty(ae, ye).get, pe = se[ye]()), c.isValidTextValue(pe) ? pe : "";
          });
        };
        var Y = { max: 10, count: 0, name: "hovertemplate" };
        c.hovertemplateString = function() {
          return ue.apply(Y, arguments);
        };
        var te = { max: 10, count: 0, name: "texttemplate" };
        c.texttemplateString = function() {
          return ue.apply(te, arguments);
        };
        var ee = /^(\S+)([\*\/])(-?\d+(\.\d+)?)$/, X = { max: 10, count: 0, name: "texttemplate", parseMultDiv: !0 };
        c.texttemplateStringForShapes = function() {
          return ue.apply(X, arguments);
        };
        var Q = /^[:|\|]/;
        function ue(ne, ae, se) {
          var me = this, ye = arguments;
          ae || (ae = {});
          var pe = {};
          return ne.replace(c.TEMPLATE_STRING_REGEX, function(be, Ae, Se) {
            var Me = Ae === "_xother" || Ae === "_yother", De = Ae === "_xother_" || Ae === "_yother_", Le = Ae === "xother_" || Ae === "yother_", We = Ae === "xother" || Ae === "yother" || Me || Le || De, Ee = Ae;
            (Me || De) && (Ee = Ee.substring(1)), (Le || De) && (Ee = Ee.substring(0, Ee.length - 1));
            var Ne, Ie, ge, Ce = null, we = null;
            if (me.parseMultDiv) {
              var Ge = function(tt) {
                var _e = tt.match(ee);
                return _e ? { key: _e[1], op: _e[2], number: Number(_e[3]) } : { key: tt, op: null, number: null };
              }(Ee);
              Ee = Ge.key, Ce = Ge.op, we = Ge.number;
            }
            if (We) {
              if ((Ne = ae[Ee]) === void 0) return "";
            } else for (ge = 3; ge < ye.length; ge++) if (Ie = ye[ge]) {
              if (Ie.hasOwnProperty(Ee)) {
                Ne = Ie[Ee];
                break;
              }
              if (re.test(Ee) || (Ne = c.nestedProperty(Ie, Ee).get(), (Ne = pe[Ee] || c.nestedProperty(Ie, Ee).get()) && (pe[Ee] = Ne)), Ne !== void 0) break;
            }
            if (Ne !== void 0 && (Ce === "*" && (Ne *= we), Ce === "/" && (Ne /= we)), Ne === void 0 && me) return me.count < me.max && (c.warn("Variable '" + Ee + "' in " + me.name + " could not be found!"), Ne = be), me.count === me.max && c.warn("Too many " + me.name + " warnings - additional warnings will be suppressed"), me.count++, be;
            if (Se) {
              var Re;
              if (Se[0] === ":" && (Re = se ? se.numberFormat : c.numberFormat, Ne !== "" && (Ne = Re(Se.replace(Q, ""))(Ne))), Se[0] === "|") {
                Re = se ? se.timeFormat : u;
                var je = c.dateTime2ms(Ne);
                Ne = c.formatDate(je, Se.replace(Q, ""), !1, Re);
              }
            } else {
              var Ke = Ee + "Label";
              ae.hasOwnProperty(Ke) && (Ne = ae[Ke]);
            }
            return We && (Ne = "(" + Ne + ")", (Me || De) && (Ne = " " + Ne), (Le || De) && (Ne += " ")), Ne;
          });
        }
        c.subplotSort = function(ne, ae) {
          for (var se = Math.min(ne.length, ae.length) + 1, me = 0, ye = 0, pe = 0; pe < se; pe++) {
            var be = ne.charCodeAt(pe) || 0, Ae = ae.charCodeAt(pe) || 0, Se = be >= 48 && be <= 57, Me = Ae >= 48 && Ae <= 57;
            if (Se && (me = 10 * me + be - 48), Me && (ye = 10 * ye + Ae - 48), !Se || !Me) {
              if (me !== ye) return me - ye;
              if (be !== Ae) return be - Ae;
            }
          }
          return ye - me;
        };
        var ce = 2e9;
        c.seedPseudoRandom = function() {
          ce = 2e9;
        }, c.pseudoRandom = function() {
          var ne = ce;
          return ce = (69069 * ce + 1) % 4294967296, Math.abs(ce - ne) < 429496729 ? c.pseudoRandom() : ce / 4294967296;
        }, c.fillText = function(ne, ae, se) {
          var me = Array.isArray(se) ? function(be) {
            se.push(be);
          } : function(be) {
            se.text = be;
          }, ye = c.extractOption(ne, ae, "htx", "hovertext");
          if (c.isValidTextValue(ye)) return me(ye);
          var pe = c.extractOption(ne, ae, "tx", "text");
          return c.isValidTextValue(pe) ? me(pe) : void 0;
        }, c.isValidTextValue = function(ne) {
          return ne || ne === 0;
        }, c.formatPercent = function(ne, ae) {
          ae = ae || 0;
          for (var se = (Math.round(100 * ne * Math.pow(10, ae)) * Math.pow(0.1, ae)).toFixed(ae) + "%", me = 0; me < ae; me++) se.indexOf(".") !== -1 && (se = (se = se.replace("0%", "%")).replace(".%", "%"));
          return se;
        }, c.isHidden = function(ne) {
          var ae = window.getComputedStyle(ne).display;
          return !ae || ae === "none";
        }, c.strTranslate = function(ne, ae) {
          return ne || ae ? "translate(" + ne + "," + ae + ")" : "";
        }, c.strRotate = function(ne) {
          return ne ? "rotate(" + ne + ")" : "";
        }, c.strScale = function(ne) {
          return ne !== 1 ? "scale(" + ne + ")" : "";
        }, c.getTextTransform = function(ne) {
          var ae = ne.noCenter, se = ne.textX, me = ne.textY, ye = ne.targetX, pe = ne.targetY, be = ne.anchorX || 0, Ae = ne.anchorY || 0, Se = ne.rotate, Me = ne.scale;
          return Me ? Me > 1 && (Me = 1) : Me = 0, c.strTranslate(ye - Me * (se + be), pe - Me * (me + Ae)) + c.strScale(Me) + (Se ? "rotate(" + Se + (ae ? "" : " " + se + " " + me) + ")" : "");
        }, c.setTransormAndDisplay = function(ne, ae) {
          ne.attr("transform", c.getTextTransform(ae)), ne.style("display", ae.scale ? null : "none");
        }, c.ensureUniformFontSize = function(ne, ae) {
          var se = c.extendFlat({}, ae);
          return se.size = Math.max(ae.size, ne._fullLayout.uniformtext.minsize || 0), se;
        }, c.join2 = function(ne, ae, se) {
          var me = ne.length;
          return me > 1 ? ne.slice(0, -1).join(ae) + se + ne[me - 1] : ne.join(ae);
        }, c.bigFont = function(ne) {
          return Math.round(1.2 * ne);
        };
        var he = c.getFirefoxVersion(), de = he !== null && he < 86;
        c.getPositionFromD3Event = function() {
          return de ? [l.event.layerX, l.event.layerY] : [l.event.offsetX, l.event.offsetY];
        };
      }, 56174: function(o) {
        o.exports = function(s) {
          return window && window.process && window.process.versions ? Object.prototype.toString.call(s) === "[object Object]" : Object.prototype.toString.call(s) === "[object Object]" && Object.getPrototypeOf(s).hasOwnProperty("hasOwnProperty");
        };
      }, 34967: function(o, s, n) {
        var l = n(35632), u = /^\w*$/;
        o.exports = function(i, h, p, _) {
          var d, f, c;
          p = p || "name", _ = _ || "value";
          var g = {};
          h && h.length ? (c = l(i, h), f = c.get()) : f = i, h = h || "";
          var m = {};
          if (f) for (d = 0; d < f.length; d++) m[f[d][p]] = d;
          var x = u.test(_), w = { set: function(k, S) {
            var A = S === null ? 4 : 0;
            if (!f) {
              if (!c || A === 4) return;
              f = [], c.set(f);
            }
            var C = m[k];
            if (C === void 0) {
              if (A === 4) return;
              A |= 3, C = f.length, m[k] = C;
            } else S !== (x ? f[C][_] : l(f[C], _).get()) && (A |= 2);
            var D = f[C] = f[C] || {};
            return D[p] = k, x ? D[_] = S : l(D, _).set(S), S !== null && (A &= -5), g[C] = g[C] | A, w;
          }, get: function(k) {
            if (f) {
              var S = m[k];
              return S === void 0 ? void 0 : x ? f[S][_] : l(f[S], _).get();
            }
          }, rename: function(k, S) {
            var A = m[k];
            return A === void 0 || (g[A] = 1 | g[A], m[S] = A, delete m[k], f[A][p] = S), w;
          }, remove: function(k) {
            var S = m[k];
            if (S === void 0) return w;
            var A = f[S];
            if (Object.keys(A).length > 2) return g[S] = 2 | g[S], w.set(k, null);
            if (x) {
              for (d = S; d < f.length; d++) g[d] = 3 | g[d];
              for (d = S; d < f.length; d++) m[f[d][p]]--;
              f.splice(S, 1), delete m[k];
            } else l(A, _).set(null), g[S] = 6 | g[S];
            return w;
          }, constructUpdate: function() {
            for (var k, S, A = {}, C = Object.keys(g), D = 0; D < C.length; D++) S = C[D], k = h + "[" + S + "]", f[S] ? (1 & g[S] && (A[k + "." + p] = f[S][p]), 2 & g[S] && (A[k + "." + _] = x ? 4 & g[S] ? null : f[S][_] : 4 & g[S] ? null : l(f[S], _).get())) : A[k] = null;
            return A;
          } };
          return w;
        };
      }, 38514: function(o, s, n) {
        var l = n(33626);
        o.exports = function(u, i) {
          for (var h = u._context.locale, p = 0; p < 2; p++) {
            for (var _ = u._context.locales, d = 0; d < 2; d++) {
              var f = (_[h] || {}).dictionary;
              if (f) {
                var c = f[i];
                if (c) return c;
              }
              _ = l.localeRegistry;
            }
            var g = h.split("-")[0];
            if (g === h) break;
            h = g;
          }
          return i;
        };
      }, 48636: function(o, s, n) {
        var l = n(24452).dfltConfig, u = n(87355), i = o.exports = {};
        i.log = function() {
          var h;
          if (l.logging > 1) {
            var p = ["LOG:"];
            for (h = 0; h < arguments.length; h++) p.push(arguments[h]);
            console.trace.apply(console, p);
          }
          if (l.notifyOnLogging > 1) {
            var _ = [];
            for (h = 0; h < arguments.length; h++) _.push(arguments[h]);
            u(_.join("<br>"), "long");
          }
        }, i.warn = function() {
          var h;
          if (l.logging > 0) {
            var p = ["WARN:"];
            for (h = 0; h < arguments.length; h++) p.push(arguments[h]);
            console.trace.apply(console, p);
          }
          if (l.notifyOnLogging > 0) {
            var _ = [];
            for (h = 0; h < arguments.length; h++) _.push(arguments[h]);
            u(_.join("<br>"), "stick");
          }
        }, i.error = function() {
          var h;
          if (l.logging > 0) {
            var p = ["ERROR:"];
            for (h = 0; h < arguments.length; h++) p.push(arguments[h]);
            console.error.apply(console, p);
          }
          if (l.notifyOnLogging > 0) {
            var _ = [];
            for (h = 0; h < arguments.length; h++) _.push(arguments[h]);
            u(_.join("<br>"), "stick");
          }
        };
      }, 75944: function(o, s, n) {
        var l = n(45568);
        o.exports = function(u, i, h) {
          var p = u.selectAll("g." + h.replace(/\s/g, ".")).data(i, function(d) {
            return d[0].trace.uid;
          });
          p.exit().remove(), p.enter().append("g").attr("class", h), p.order();
          var _ = u.classed("rangeplot") ? "nodeRangePlot3" : "node3";
          return p.each(function(d) {
            d[0][_] = l.select(this);
          }), p;
        };
      }, 15236: function(o, s, n) {
        var l = n(11191);
        s.init2dArray = function(u, i) {
          for (var h = new Array(u), p = 0; p < u; p++) h[p] = new Array(i);
          return h;
        }, s.transposeRagged = function(u) {
          var i, h, p = 0, _ = u.length;
          for (i = 0; i < _; i++) p = Math.max(p, u[i].length);
          var d = new Array(p);
          for (i = 0; i < p; i++) for (d[i] = new Array(_), h = 0; h < _; h++) d[i][h] = u[h][i];
          return d;
        }, s.dot = function(u, i) {
          if (!u.length || !i.length || u.length !== i.length) return null;
          var h, p, _ = u.length;
          if (u[0].length) for (h = new Array(_), p = 0; p < _; p++) h[p] = s.dot(u[p], i);
          else if (i[0].length) {
            var d = s.transposeRagged(i);
            for (h = new Array(d.length), p = 0; p < d.length; p++) h[p] = s.dot(u, d[p]);
          } else for (h = 0, p = 0; p < _; p++) h += u[p] * i[p];
          return h;
        }, s.translationMatrix = function(u, i) {
          return [[1, 0, u], [0, 1, i], [0, 0, 1]];
        }, s.rotationMatrix = function(u) {
          var i = u * Math.PI / 180;
          return [[Math.cos(i), -Math.sin(i), 0], [Math.sin(i), Math.cos(i), 0], [0, 0, 1]];
        }, s.rotationXYMatrix = function(u, i, h) {
          return s.dot(s.dot(s.translationMatrix(i, h), s.rotationMatrix(u)), s.translationMatrix(-i, -h));
        }, s.apply3DTransform = function(u) {
          return function() {
            var i = arguments, h = arguments.length === 1 ? i[0] : [i[0], i[1], i[2] || 0];
            return s.dot(u, [h[0], h[1], h[2], 1]).slice(0, 3);
          };
        }, s.apply2DTransform = function(u) {
          return function() {
            var i = arguments;
            i.length === 3 && (i = i[0]);
            var h = arguments.length === 1 ? i[0] : [i[0], i[1]];
            return s.dot(u, [h[0], h[1], 1]).slice(0, 2);
          };
        }, s.apply2DTransform2 = function(u) {
          var i = s.apply2DTransform(u);
          return function(h) {
            return i(h.slice(0, 2)).concat(i(h.slice(2, 4)));
          };
        }, s.convertCssMatrix = function(u) {
          if (u) {
            var i = u.length;
            if (i === 16) return u;
            if (i === 6) return [u[0], u[1], 0, 0, u[2], u[3], 0, 0, 0, 0, 1, 0, u[4], u[5], 0, 1];
          }
          return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
        }, s.inverseTransformMatrix = function(u) {
          var i = [];
          return l.invert(i, u), [[i[0], i[1], i[2], i[3]], [i[4], i[5], i[6], i[7]], [i[8], i[9], i[10], i[11]], [i[12], i[13], i[14], i[15]]];
        };
      }, 98953: function(o) {
        o.exports = { mod: function(s, n) {
          var l = s % n;
          return l < 0 ? l + n : l;
        }, modHalf: function(s, n) {
          return Math.abs(s) > n / 2 ? s - Math.round(s / n) * n : s;
        } };
      }, 35632: function(o, s, n) {
        var l = n(10721), u = n(87800).isArrayOrTypedArray;
        function i(g, m) {
          return function() {
            var x, w, k, S, A, C = g;
            for (S = 0; S < m.length - 1; S++) {
              if ((x = m[S]) === -1) {
                for (w = !0, k = [], A = 0; A < C.length; A++) k[A] = i(C[A], m.slice(S + 1))(), k[A] !== k[0] && (w = !1);
                return w ? k[0] : k;
              }
              if (typeof x == "number" && !u(C) || typeof (C = C[x]) != "object" || C === null) return;
            }
            if (typeof C == "object" && C !== null && (k = C[m[S]]) !== null) return k;
          };
        }
        o.exports = function(g, m) {
          if (l(m)) m = String(m);
          else if (typeof m != "string" || m.substr(m.length - 4) === "[-1]") throw "bad property string";
          var x, w, k, S, A = m.split(".");
          for (S = 0; S < A.length; S++) if (String(A[S]).slice(0, 2) === "__") throw "bad property string";
          for (S = 0; S < A.length; ) {
            if (x = String(A[S]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)) {
              if (x[1]) A[S] = x[1];
              else {
                if (S !== 0) throw "bad property string";
                A.splice(0, 1);
              }
              for (w = x[2].substr(1, x[2].length - 2).split("]["), k = 0; k < w.length; k++) S++, A.splice(S, 0, Number(w[k]));
            }
            S++;
          }
          return typeof g != "object" ? /* @__PURE__ */ function(C, D, L) {
            return { set: function() {
              throw "bad container";
            }, get: function() {
            }, astr: D, parts: L, obj: C };
          }(g, m, A) : { set: _(g, A, m), get: i(g, A), astr: m, parts: A, obj: g };
        };
        var h = /(^|\.)args\[/;
        function p(g, m) {
          return g === void 0 || g === null && !m.match(h);
        }
        function _(g, m, x) {
          return function(w) {
            var k, S, A = g, C = "", D = p(w, x);
            for (S = 0; S < m.length - 1; S++) {
              if (typeof (k = m[S]) == "number" && !u(A)) throw "array index but container is not an array";
              if (k === -1) {
                if (D = !f(A, m.slice(S + 1), w, x)) break;
                return;
              }
              if (!c(A, k, m[S + 1], D)) break;
              if (typeof (A = A[k]) != "object" || A === null) throw "container is not an object";
              C = d(C, k);
            }
            if (D) {
              if (S === m.length - 1 && (delete A[m[S]], Array.isArray(A) && +m[S] == A.length - 1)) for (; A.length && A[A.length - 1] === void 0; ) A.pop();
            } else A[m[S]] = w;
          };
        }
        function d(g, m) {
          var x = m;
          return l(m) ? x = "[" + m + "]" : g && (x = "." + m), g + x;
        }
        function f(g, m, x, w) {
          var k, S = u(x), A = !0, C = x, D = w.replace("-1", 0), L = !S && p(x, D), E = m[0];
          for (k = 0; k < g.length; k++) D = w.replace("-1", k), S && (L = p(C = x[k % x.length], D)), L && (A = !1), c(g, k, E, L) && _(g[k], m, w.replace("-1", k))(C);
          return A;
        }
        function c(g, m, x, w) {
          if (g[m] === void 0) {
            if (w) return !1;
            g[m] = typeof x == "number" ? [] : {};
          }
          return !0;
        }
      }, 4969: function(o) {
        o.exports = function() {
        };
      }, 87355: function(o, s, n) {
        var l = n(45568), u = n(10721), i = [];
        o.exports = function(h, p) {
          if (i.indexOf(h) === -1) {
            i.push(h);
            var _ = 1e3;
            u(p) ? _ = p : p === "long" && (_ = 3e3);
            var d = l.select("body").selectAll(".plotly-notifier").data([0]);
            d.enter().append("div").classed("plotly-notifier", !0), d.selectAll(".notifier-note").data(i).enter().append("div").classed("notifier-note", !0).style("opacity", 0).each(function(c) {
              var g = l.select(this);
              g.append("button").classed("notifier-close", !0).html("&times;").on("click", function() {
                g.transition().call(f);
              });
              for (var m = g.append("p"), x = c.split(/<br\s*\/?>/g), w = 0; w < x.length; w++) w && m.append("br"), m.append("span").text(x[w]);
              p === "stick" ? g.transition().duration(350).style("opacity", 1) : g.transition().duration(700).style("opacity", 1).transition().delay(_).call(f);
            });
          }
          function f(c) {
            c.duration(700).style("opacity", 0).each("end", function(g) {
              var m = i.indexOf(g);
              m !== -1 && i.splice(m, 1), l.select(this).remove();
            });
          }
        };
      }, 93134: function(o, s, n) {
        var l = n(27983), u = "data-savedcursor";
        o.exports = function(i, h) {
          var p = i.attr(u);
          if (h) {
            if (!p) {
              for (var _ = (i.attr("class") || "").split(" "), d = 0; d < _.length; d++) {
                var f = _[d];
                f.indexOf("cursor-") === 0 && i.attr(u, f.substr(7)).classed(f, !1);
              }
              i.attr(u) || i.attr(u, "!!");
            }
            l(i, h);
          } else p && (i.attr(u, null), p === "!!" ? l(i) : l(i, p));
        };
      }, 80899: function(o, s, n) {
        var l = n(15236).dot, u = n(63821).BADNUM, i = o.exports = {};
        i.tester = function(h) {
          var p, _ = h.slice(), d = _[0][0], f = d, c = _[0][1], g = c;
          for (_[_.length - 1][0] === _[0][0] && _[_.length - 1][1] === _[0][1] || _.push(_[0]), p = 1; p < _.length; p++) d = Math.min(d, _[p][0]), f = Math.max(f, _[p][0]), c = Math.min(c, _[p][1]), g = Math.max(g, _[p][1]);
          var m, x = !1;
          _.length === 5 && (_[0][0] === _[1][0] ? _[2][0] === _[3][0] && _[0][1] === _[3][1] && _[1][1] === _[2][1] && (x = !0, m = function(S) {
            return S[0] === _[0][0];
          }) : _[0][1] === _[1][1] && _[2][1] === _[3][1] && _[0][0] === _[3][0] && _[1][0] === _[2][0] && (x = !0, m = function(S) {
            return S[1] === _[0][1];
          }));
          var w = !0, k = _[0];
          for (p = 1; p < _.length; p++) if (k[0] !== _[p][0] || k[1] !== _[p][1]) {
            w = !1;
            break;
          }
          return { xmin: d, xmax: f, ymin: c, ymax: g, pts: _, contains: x ? function(S, A) {
            var C = S[0], D = S[1];
            return !(C === u || C < d || C > f || D === u || D < c || D > g || A && m(S));
          } : function(S, A) {
            var C = S[0], D = S[1];
            if (C === u || C < d || C > f || D === u || D < c || D > g) return !1;
            var L, E, P, I, M, O = _.length, T = _[0][0], z = _[0][1], F = 0;
            for (L = 1; L < O; L++) if (E = T, P = z, T = _[L][0], z = _[L][1], !(C < (I = Math.min(E, T)) || C > Math.max(E, T) || D > Math.max(P, z))) if (D < Math.min(P, z)) C !== I && F++;
            else {
              if (D === (M = T === E ? D : P + (C - E) * (z - P) / (T - E))) return L !== 1 || !A;
              D <= M && C !== I && F++;
            }
            return F % 2 == 1;
          }, isRect: x, degenerate: w };
        }, i.isSegmentBent = function(h, p, _, d) {
          var f, c, g, m = h[p], x = [h[_][0] - m[0], h[_][1] - m[1]], w = l(x, x), k = Math.sqrt(w), S = [-x[1] / k, x[0] / k];
          for (f = p + 1; f < _; f++) if (c = [h[f][0] - m[0], h[f][1] - m[1]], (g = l(c, x)) < 0 || g > w || Math.abs(l(c, S)) > d) return !0;
          return !1;
        }, i.filter = function(h, p) {
          var _ = [h[0]], d = 0, f = 0;
          function c(g) {
            h.push(g);
            var m = _.length, x = d;
            _.splice(f + 1);
            for (var w = x + 1; w < h.length; w++) (w === h.length - 1 || i.isSegmentBent(h, x, w + 1, p)) && (_.push(h[w]), _.length < m - 2 && (d = w, f = _.length - 1), x = w);
          }
          return h.length > 1 && c(h.pop()), { addPt: c, raw: h, filtered: _ };
        };
      }, 22459: function(o, s, n) {
        var l = n(97464), u = n(81330);
        o.exports = function(i, h, p) {
          var _ = i._fullLayout, d = !0;
          return _._glcanvas.each(function(f) {
            if (f.regl) f.regl.preloadCachedCode(p);
            else if (!f.pick || _._has("parcoords")) {
              try {
                f.regl = u({ canvas: this, attributes: { antialias: !f.pick, preserveDrawingBuffer: !0 }, pixelRatio: i._context.plotGlPixelRatio || n.g.devicePixelRatio, extensions: h || [], cachedCode: p || {} });
              } catch {
                d = !1;
              }
              f.regl || (d = !1), d && this.addEventListener("webglcontextlost", function(c) {
                i && i.emit && i.emit("plotly_webglcontextlost", { event: c, layer: f.key });
              }, !1);
            }
          }), d || l({ container: _._glcontainer.node() }), d;
        };
      }, 32521: function(o, s, n) {
        var l = n(10721), u = n(13087);
        o.exports = function(i) {
          var h;
          if (typeof (h = i && i.hasOwnProperty("userAgent") ? i.userAgent : function() {
            var m;
            return typeof navigator < "u" && (m = navigator.userAgent), m && m.headers && typeof m.headers["user-agent"] == "string" && (m = m.headers["user-agent"]), m;
          }()) != "string") return !0;
          var p = u({ ua: { headers: { "user-agent": h } }, tablet: !0, featureDetect: !1 });
          if (!p) {
            for (var _ = h.split(" "), d = 1; d < _.length; d++) if (_[d].indexOf("Safari") !== -1) for (var f = d - 1; f > -1; f--) {
              var c = _[f];
              if (c.substr(0, 8) === "Version/") {
                var g = c.substr(8).split(".")[0];
                if (l(g) && (g = +g), g >= 13) return !0;
              }
            }
          }
          return p;
        };
      }, 36539: function(o) {
        o.exports = function(s, n) {
          if (n instanceof RegExp) {
            for (var l = n.toString(), u = 0; u < s.length; u++) if (s[u] instanceof RegExp && s[u].toString() === l) return s;
            s.push(n);
          } else !n && n !== 0 || s.indexOf(n) !== -1 || s.push(n);
          return s;
        };
      }, 40486: function(o, s, n) {
        var l = n(34809), u = n(24452).dfltConfig, i = { add: function(h, p, _, d, f) {
          var c, g;
          h.undoQueue = h.undoQueue || { index: 0, queue: [], sequence: !1 }, g = h.undoQueue.index, h.autoplay ? h.undoQueue.inSequence || (h.autoplay = !1) : (!h.undoQueue.sequence || h.undoQueue.beginSequence ? (c = { undo: { calls: [], args: [] }, redo: { calls: [], args: [] } }, h.undoQueue.queue.splice(g, h.undoQueue.queue.length - g, c), h.undoQueue.index += 1) : c = h.undoQueue.queue[g - 1], h.undoQueue.beginSequence = !1, c && (c.undo.calls.unshift(p), c.undo.args.unshift(_), c.redo.calls.push(d), c.redo.args.push(f)), h.undoQueue.queue.length > u.queueLength && (h.undoQueue.queue.shift(), h.undoQueue.index--));
        }, startSequence: function(h) {
          h.undoQueue = h.undoQueue || { index: 0, queue: [], sequence: !1 }, h.undoQueue.sequence = !0, h.undoQueue.beginSequence = !0;
        }, stopSequence: function(h) {
          h.undoQueue = h.undoQueue || { index: 0, queue: [], sequence: !1 }, h.undoQueue.sequence = !1, h.undoQueue.beginSequence = !1;
        }, undo: function(h) {
          var p, _;
          if (!(h.undoQueue === void 0 || isNaN(h.undoQueue.index) || h.undoQueue.index <= 0)) {
            for (h.undoQueue.index--, p = h.undoQueue.queue[h.undoQueue.index], h.undoQueue.inSequence = !0, _ = 0; _ < p.undo.calls.length; _++) i.plotDo(h, p.undo.calls[_], p.undo.args[_]);
            h.undoQueue.inSequence = !1, h.autoplay = !1;
          }
        }, redo: function(h) {
          var p, _;
          if (!(h.undoQueue === void 0 || isNaN(h.undoQueue.index) || h.undoQueue.index >= h.undoQueue.queue.length)) {
            for (p = h.undoQueue.queue[h.undoQueue.index], h.undoQueue.inSequence = !0, _ = 0; _ < p.redo.calls.length; _++) i.plotDo(h, p.redo.calls[_], p.redo.args[_]);
            h.undoQueue.inSequence = !1, h.autoplay = !1, h.undoQueue.index++;
          }
        }, plotDo: function(h, p, _) {
          h.autoplay = !0, _ = function(d, f) {
            for (var c, g = [], m = 0; m < f.length; m++) c = f[m], g[m] = c === d ? c : typeof c == "object" ? Array.isArray(c) ? l.extendDeep([], c) : l.extendDeepAll({}, c) : c;
            return g;
          }(h, _), p.apply(null, _);
        } };
        o.exports = i;
      }, 90694: function(o, s) {
        s.counter = function(n, l, u, i) {
          var h = (l || "") + (u ? "" : "$"), p = i === !1 ? "" : "^";
          return n === "xy" ? new RegExp(p + "x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?" + h) : new RegExp(p + n + "([2-9]|[1-9][0-9]+)?" + h);
        };
      }, 82047: function(o) {
        var s = /^(.*)(\.[^\.\[\]]+|\[\d\])$/, n = /^[^\.\[\]]+$/;
        o.exports = function(l, u) {
          for (; u; ) {
            var i = l.match(s);
            if (i) l = i[1];
            else {
              if (!l.match(n)) throw new Error("bad relativeAttr call:" + [l, u]);
              l = "";
            }
            if (u.charAt(0) !== "^") break;
            u = u.slice(1);
          }
          return l && u.charAt(0) !== "[" ? l + "." + u : l + u;
        };
      }, 80428: function(o, s, n) {
        var l = n(87800).isArrayOrTypedArray, u = n(56174);
        o.exports = function i(h, p) {
          for (var _ in p) {
            var d = p[_], f = h[_];
            if (f !== d) if (_.charAt(0) === "_" || typeof d == "function") {
              if (_ in h) continue;
              h[_] = d;
            } else if (l(d) && l(f) && u(d[0])) {
              if (_ === "customdata" || _ === "ids") continue;
              for (var c = Math.min(d.length, f.length), g = 0; g < c; g++) f[g] !== d[g] && u(d[g]) && u(f[g]) && i(f[g], d[g]);
            } else u(d) && u(f) && (i(f, d), Object.keys(f).length || delete h[_]);
          }
        };
      }, 98813: function(o, s, n) {
        var l = n(10721), u = n(48636), i = n(29527), h = n(63821).BADNUM, p = 1e-9;
        function _(g, m) {
          return g < m;
        }
        function d(g, m) {
          return g <= m;
        }
        function f(g, m) {
          return g > m;
        }
        function c(g, m) {
          return g >= m;
        }
        s.findBin = function(g, m, x) {
          if (l(m.start)) return x ? Math.ceil((g - m.start) / m.size - p) - 1 : Math.floor((g - m.start) / m.size + p);
          var w, k, S = 0, A = m.length, C = 0, D = A > 1 ? (m[A - 1] - m[0]) / (A - 1) : 1;
          for (k = D >= 0 ? x ? _ : d : x ? c : f, g += D * p * (x ? -1 : 1) * (D >= 0 ? 1 : -1); S < A && C++ < 100; ) k(m[w = Math.floor((S + A) / 2)], g) ? S = w + 1 : A = w;
          return C > 90 && u.log("Long binary search..."), S - 1;
        }, s.sorterAsc = function(g, m) {
          return g - m;
        }, s.sorterDes = function(g, m) {
          return m - g;
        }, s.distinctVals = function(g) {
          var m, x = g.slice();
          for (x.sort(s.sorterAsc), m = x.length - 1; m > -1 && x[m] === h; m--) ;
          for (var w, k = x[m] - x[0] || 1, S = k / (m || 1) / 1e4, A = [], C = 0; C <= m; C++) {
            var D = x[C], L = D - w;
            w === void 0 ? (A.push(D), w = D) : L > S && (k = Math.min(k, L), A.push(D), w = D);
          }
          return { vals: A, minDiff: k };
        }, s.roundUp = function(g, m, x) {
          for (var w, k = 0, S = m.length - 1, A = 0, C = x ? 0 : 1, D = x ? 1 : 0, L = x ? Math.ceil : Math.floor; k < S && A++ < 100; ) m[w = L((k + S) / 2)] <= g ? k = w + C : S = w - D;
          return m[k];
        }, s.sort = function(g, m) {
          for (var x = 0, w = 0, k = 1; k < g.length; k++) {
            var S = m(g[k], g[k - 1]);
            if (S < 0 ? x = 1 : S > 0 && (w = 1), x && w) return g.sort(m);
          }
          return w ? g : g.reverse();
        }, s.findIndexOfMin = function(g, m) {
          m = m || i;
          for (var x, w = 1 / 0, k = 0; k < g.length; k++) {
            var S = m(g[k]);
            S < w && (w = S, x = k);
          }
          return x;
        };
      }, 27983: function(o) {
        o.exports = function(s, n) {
          (s.attr("class") || "").split(" ").forEach(function(l) {
            l.indexOf("cursor-") === 0 && s.classed(l, !1);
          }), n && s.classed("cursor-" + n, !0);
        };
      }, 97464: function(o, s, n) {
        var l = n(78766), u = function() {
        };
        o.exports = function(i) {
          for (var h in i) typeof i[h] == "function" && (i[h] = u);
          i.destroy = function() {
            i.container.parentNode.removeChild(i.container);
          };
          var p = document.createElement("div");
          p.className = "no-webgl", p.style.cursor = "pointer", p.style.fontSize = "24px", p.style.color = l.defaults[0], p.style.position = "absolute", p.style.left = p.style.top = "0px", p.style.width = p.style.height = "100%", p.style["background-color"] = l.lightLine, p.style["z-index"] = 30;
          var _ = document.createElement("p");
          return _.textContent = "WebGL is not supported by your browser - visit https://get.webgl.org for more info", _.style.position = "relative", _.style.top = "50%", _.style.left = "50%", _.style.height = "30%", _.style.width = "50%", _.style.margin = "-15% 0 0 -25%", p.appendChild(_), i.container.appendChild(p), i.container.style.background = "#FFFFFF", i.container.onclick = function() {
            window.open("https://get.webgl.org");
          }, !1;
        };
      }, 62994: function(o) {
        o.exports = function(s) {
          return Object.keys(s).sort();
        };
      }, 89258: function(o, s, n) {
        var l = n(10721), u = n(87800).isArrayOrTypedArray;
        s.aggNums = function(i, h, p, _) {
          var d, f;
          if ((!_ || _ > p.length) && (_ = p.length), l(h) || (h = !1), u(p[0])) {
            for (f = new Array(_), d = 0; d < _; d++) f[d] = s.aggNums(i, h, p[d]);
            p = f;
          }
          for (d = 0; d < _; d++) l(h) ? l(p[d]) && (h = i(+h, +p[d])) : h = p[d];
          return h;
        }, s.len = function(i) {
          return s.aggNums(function(h) {
            return h + 1;
          }, 0, i);
        }, s.mean = function(i, h) {
          return h || (h = s.len(i)), s.aggNums(function(p, _) {
            return p + _;
          }, 0, i) / h;
        }, s.geometricMean = function(i, h) {
          return h || (h = s.len(i)), Math.pow(s.aggNums(function(p, _) {
            return p * _;
          }, 1, i), 1 / h);
        }, s.midRange = function(i) {
          if (i !== void 0 && i.length !== 0) return (s.aggNums(Math.max, null, i) + s.aggNums(Math.min, null, i)) / 2;
        }, s.variance = function(i, h, p) {
          return h || (h = s.len(i)), l(p) || (p = s.mean(i, h)), s.aggNums(function(_, d) {
            return _ + Math.pow(d - p, 2);
          }, 0, i) / h;
        }, s.stdev = function(i, h, p) {
          return Math.sqrt(s.variance(i, h, p));
        }, s.median = function(i) {
          var h = i.slice().sort();
          return s.interp(h, 0.5);
        }, s.interp = function(i, h) {
          if (!l(h)) throw "n should be a finite number";
          if ((h = h * i.length - 0.5) < 0) return i[0];
          if (h > i.length - 1) return i[i.length - 1];
          var p = h % 1;
          return p * i[Math.ceil(h)] + (1 - p) * i[Math.floor(h)];
        };
      }, 55010: function(o, s, n) {
        var l = n(162);
        o.exports = function(u) {
          return u ? l(u) : [0, 0, 0, 1];
        };
      }, 95544: function(o, s, n) {
        var l = n(1837), u = n(62203), i = n(34809), h = null;
        o.exports = function() {
          if (h !== null) return h;
          h = !1;
          var p = i.isIE() || i.isSafari() || i.isIOS();
          if (window.navigator.userAgent && !p) {
            var _ = Array.from(l.CSS_DECLARATIONS).reverse(), d = window.CSS && window.CSS.supports || window.supportsCSS;
            if (typeof d == "function") h = _.some(function(g) {
              return d.apply(null, g);
            });
            else {
              var f = u.tester.append("image").attr("style", l.STYLE), c = window.getComputedStyle(f.node()).imageRendering;
              h = _.some(function(g) {
                var m = g[1];
                return c === m || c === m.toLowerCase();
              }), f.remove();
            }
          }
          return h;
        };
      }, 30635: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.strTranslate, h = n(62972), p = n(4530).LINE_SPACING, _ = /([^$]*)([$]+[^$]*[$]+)([^$]*)/;
        s.convertToTspans = function(q, K, re) {
          var Y = q.text(), te = !q.attr("data-notex") && K && K._context.typesetMath && typeof MathJax < "u" && Y.match(_), ee = l.select(q.node().parentNode);
          if (!ee.empty()) {
            var X = q.attr("class") ? q.attr("class").split(" ")[0] : "text";
            return X += "-math", ee.selectAll("svg." + X).remove(), ee.selectAll("g." + X + "-group").remove(), q.style("display", null).attr({ "data-unformatted": Y, "data-math": "N" }), te ? (K && K._promises || []).push(new Promise(function(ue) {
              q.style("display", "none");
              var ce = parseInt(q.node().style.fontSize, 10), he = { fontSize: ce };
              (function(de, ne, ae) {
                var se, me, ye, pe, be = parseInt((MathJax.version || "").split(".")[0]);
                if (be === 2 || be === 3) {
                  var Ae = function() {
                    var Me = "math-output-" + u.randstr({}, 64), De = (pe = l.select("body").append("div").attr({ id: Me }).style({ visibility: "hidden", position: "absolute", "font-size": ne.fontSize + "px" }).text(de.replace(d, "\\lt ").replace(f, "\\gt "))).node();
                    return be === 2 ? MathJax.Hub.Typeset(De) : MathJax.typeset([De]);
                  }, Se = function() {
                    var Me = pe.select(be === 2 ? ".MathJax_SVG" : ".MathJax"), De = !Me.empty() && pe.select("svg").node();
                    if (De) {
                      var Le, We = De.getBoundingClientRect();
                      Le = be === 2 ? l.select("body").select("#MathJax_SVG_glyphs") : Me.select("defs"), ae(Me, Le, We);
                    } else u.log("There was an error in the tex syntax.", de), ae();
                    pe.remove();
                  };
                  be === 2 ? MathJax.Hub.Queue(function() {
                    return me = u.extendDeepAll({}, MathJax.Hub.config), ye = MathJax.Hub.processSectionDelay, MathJax.Hub.processSectionDelay !== void 0 && (MathJax.Hub.processSectionDelay = 0), MathJax.Hub.Config({ messageStyle: "none", tex2jax: { inlineMath: c }, displayAlign: "left" });
                  }, function() {
                    if ((se = MathJax.Hub.config.menuSettings.renderer) !== "SVG") return MathJax.Hub.setRenderer("SVG");
                  }, Ae, Se, function() {
                    if (se !== "SVG") return MathJax.Hub.setRenderer(se);
                  }, function() {
                    return ye !== void 0 && (MathJax.Hub.processSectionDelay = ye), MathJax.Hub.Config(me);
                  }) : be === 3 && (me = u.extendDeepAll({}, MathJax.config), MathJax.config.tex || (MathJax.config.tex = {}), MathJax.config.tex.inlineMath = c, (se = MathJax.config.startup.output) !== "svg" && (MathJax.config.startup.output = "svg"), MathJax.startup.defaultReady(), MathJax.startup.promise.then(function() {
                    Ae(), Se(), se !== "svg" && (MathJax.config.startup.output = se), MathJax.config = me;
                  }));
                } else u.warn("No MathJax version:", MathJax.version);
              })(te[2], he, function(de, ne, ae) {
                ee.selectAll("svg." + X).remove(), ee.selectAll("g." + X + "-group").remove();
                var se = de && de.select("svg");
                if (!se || !se.node()) return Q(), void ue();
                var me = ee.append("g").classed(X + "-group", !0).attr({ "pointer-events": "none", "data-unformatted": Y, "data-math": "Y" });
                me.node().appendChild(se.node()), ne && ne.node() && se.node().insertBefore(ne.node().cloneNode(!0), se.node().firstChild);
                var ye = ae.width, pe = ae.height;
                se.attr({ class: X, height: pe, preserveAspectRatio: "xMinYMin meet" }).style({ overflow: "visible", "pointer-events": "none" });
                var be = q.node().style.fill || "black", Ae = se.select("g");
                Ae.attr({ fill: be, stroke: be });
                var Se = Ae.node().getBoundingClientRect(), Me = Se.width, De = Se.height;
                (Me > ye || De > pe) && (se.style("overflow", "hidden"), Me = (Se = se.node().getBoundingClientRect()).width, De = Se.height);
                var Le = +q.attr("x"), We = +q.attr("y"), Ee = -(ce || q.node().getBoundingClientRect().height) / 4;
                if (X[0] === "y") me.attr({ transform: "rotate(" + [-90, Le, We] + ")" + i(-Me / 2, Ee - De / 2) });
                else if (X[0] === "l") We = Ee - De / 2;
                else if (X[0] === "a" && X.indexOf("atitle") !== 0) Le = 0, We = Ee;
                else {
                  var Ne = q.attr("text-anchor");
                  Le -= Me * (Ne === "middle" ? 0.5 : Ne === "end" ? 1 : 0), We = We + Ee - De / 2;
                }
                se.attr({ x: Le, y: We }), re && re.call(q, me), ue(me);
              });
            })) : Q(), q;
          }
          function Q() {
            ee.empty() || (X = q.attr("class") + "-math", ee.select("svg." + X).remove()), q.text("").style("white-space", "pre");
            var ue = function(ce, he) {
              he = he.replace(S, " ");
              var de, ne = !1, ae = [], se = -1;
              function me() {
                se++;
                var we = document.createElementNS(h.svg, "tspan");
                l.select(we).attr({ class: "line", dy: se * p + "em" }), ce.appendChild(we), de = we;
                var Ge = ae;
                if (ae = [{ node: we }], Ge.length > 1) for (var Re = 1; Re < Ge.length; Re++) ye(Ge[Re]);
              }
              function ye(we) {
                var Ge, Re = we.type, je = {};
                if (Re === "a") {
                  Ge = "a";
                  var Ke = we.target, tt = we.href, _e = we.popup;
                  tt && (je = { "xlink:xlink:show": Ke === "_blank" || Ke.charAt(0) !== "_" ? "new" : "replace", target: Ke, "xlink:xlink:href": tt }, _e && (je.onclick = 'window.open(this.href.baseVal,this.target.baseVal,"' + _e + '");return false;'));
                } else Ge = "tspan";
                we.style && (je.style = we.style);
                var Be = document.createElementNS(h.svg, Ge);
                if (Re === "sup" || Re === "sub") {
                  pe(de, w), de.appendChild(Be);
                  var $e = document.createElementNS(h.svg, "tspan");
                  pe($e, w), l.select($e).attr("dy", x[Re]), je.dy = m[Re], de.appendChild(Be), de.appendChild($e);
                } else de.appendChild(Be);
                l.select(Be).attr(je), de = we.node = Be, ae.push(we);
              }
              function pe(we, Ge) {
                we.appendChild(document.createTextNode(Ge));
              }
              function be(we) {
                if (ae.length !== 1) {
                  var Ge = ae.pop();
                  we !== Ge.type && u.log("Start tag <" + Ge.type + "> doesnt match end tag <" + we + ">. Pretending it did match.", he), de = ae[ae.length - 1].node;
                } else u.log("Ignoring unexpected end tag </" + we + ">.", he);
              }
              D.test(he) ? me() : (de = ce, ae = [{ node: ce }]);
              for (var Ae = he.split(A), Se = 0; Se < Ae.length; Se++) {
                var Me = Ae[Se], De = Me.match(C), Le = De && De[2].toLowerCase(), We = g[Le];
                if (Le === "br") me();
                else if (We === void 0) pe(de, F(Me));
                else if (De[1]) be(Le);
                else {
                  var Ee = De[4], Ne = { type: Le }, Ie = M(Ee, L);
                  if (Ie ? (Ie = Ie.replace(O, "$1 fill:"), We && (Ie += ";" + We)) : We && (Ie = We), Ie && (Ne.style = Ie), Le === "a") {
                    ne = !0;
                    var ge = M(Ee, E);
                    if (ge) {
                      var Ce = U(ge);
                      Ce && (Ne.href = Ce, Ne.target = M(Ee, P) || "_blank", Ne.popup = M(Ee, I));
                    }
                  }
                  ye(Ne);
                }
              }
              return ne;
            }(q.node(), Y);
            ue && q.style("pointer-events", "all"), s.positionText(q), re && re.call(q);
          }
        };
        var d = /(<|&lt;|&#60;)/g, f = /(>|&gt;|&#62;)/g, c = [["$", "$"], ["\\(", "\\)"]], g = { sup: "font-size:70%", sub: "font-size:70%", s: "text-decoration:line-through", u: "text-decoration:underline", b: "font-weight:bold", i: "font-style:italic", a: "cursor:pointer", span: "", em: "font-style:italic;font-weight:bold" }, m = { sub: "0.3em", sup: "-0.6em" }, x = { sub: "-0.21em", sup: "0.42em" }, w = "​", k = ["http:", "https:", "mailto:", "", void 0, ":"], S = s.NEWLINES = /(\r\n?|\n)/g, A = /(<[^<>]*>)/, C = /<(\/?)([^ >]*)(\s+(.*))?>/i, D = /<br(\s+.*)?>/i;
        s.BR_TAG_ALL = /<br(\s+.*)?>/gi;
        var L = /(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i, E = /(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i, P = /(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i, I = /(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;
        function M(q, K) {
          if (!q) return null;
          var re = q.match(K), Y = re && (re[3] || re[4]);
          return Y && F(Y);
        }
        var O = /(^|;)\s*color:/;
        s.plainText = function(q, K) {
          for (var re = (K = K || {}).len !== void 0 && K.len !== -1 ? K.len : 1 / 0, Y = K.allowedTags !== void 0 ? K.allowedTags : ["br"], te = q.split(A), ee = [], X = "", Q = 0, ue = 0; ue < te.length; ue++) {
            var ce = te[ue], he = ce.match(C), de = he && he[2].toLowerCase();
            if (de) Y.indexOf(de) !== -1 && (ee.push(ce), X = de);
            else {
              var ne = ce.length;
              if (Q + ne < re) ee.push(ce), Q += ne;
              else if (Q < re) {
                var ae = re - Q;
                X && (X !== "br" || ae <= 3 || ne <= 3) && ee.pop(), re > 3 ? ee.push(ce.substr(0, ae - 3) + "...") : ee.push(ce.substr(0, ae));
                break;
              }
              X = "";
            }
          }
          return ee.join("");
        };
        var T = { mu: "μ", amp: "&", lt: "<", gt: ">", nbsp: " ", times: "×", plusmn: "±", deg: "°" }, z = /&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;
        function F(q) {
          return q.replace(z, function(K, re) {
            return (re.charAt(0) === "#" ? function(Y) {
              if (!(Y > 1114111)) {
                var te = String.fromCodePoint;
                if (te) return te(Y);
                var ee = String.fromCharCode;
                return Y <= 65535 ? ee(Y) : ee(55232 + (Y >> 10), Y % 1024 + 56320);
              }
            }(re.charAt(1) === "x" ? parseInt(re.substr(2), 16) : parseInt(re.substr(1), 10)) : T[re]) || K;
          });
        }
        function U(q) {
          var K = encodeURI(decodeURI(q)), re = document.createElement("a"), Y = document.createElement("a");
          re.href = q, Y.href = K;
          var te = re.protocol, ee = Y.protocol;
          return k.indexOf(te) !== -1 && k.indexOf(ee) !== -1 ? K : "";
        }
        function V(q, K, re) {
          var Y, te, ee, X = re.horizontalAlign, Q = re.verticalAlign || "top", ue = q.node().getBoundingClientRect(), ce = K.node().getBoundingClientRect();
          return te = Q === "bottom" ? function() {
            return ue.bottom - Y.height;
          } : Q === "middle" ? function() {
            return ue.top + (ue.height - Y.height) / 2;
          } : function() {
            return ue.top;
          }, ee = X === "right" ? function() {
            return ue.right - Y.width;
          } : X === "center" ? function() {
            return ue.left + (ue.width - Y.width) / 2;
          } : function() {
            return ue.left;
          }, function() {
            Y = this.node().getBoundingClientRect();
            var he = ee() - ce.left, de = te() - ce.top, ne = re.gd || {};
            if (re.gd) {
              ne._fullLayout._calcInverseTransform(ne);
              var ae = u.apply3DTransform(ne._fullLayout._invTransform)(he, de);
              he = ae[0], de = ae[1];
            }
            return this.style({ top: de + "px", left: he + "px", "z-index": 1e3 }), this;
          };
        }
        s.convertEntities = F, s.sanitizeHTML = function(q) {
          q = q.replace(S, " ");
          for (var K = document.createElement("p"), re = K, Y = [], te = q.split(A), ee = 0; ee < te.length; ee++) {
            var X = te[ee], Q = X.match(C), ue = Q && Q[2].toLowerCase();
            if (ue in g) if (Q[1]) Y.length && (re = Y.pop());
            else {
              var ce = Q[4], he = M(ce, L), de = he ? { style: he } : {};
              if (ue === "a") {
                var ne = M(ce, E);
                if (ne) {
                  var ae = U(ne);
                  if (ae) {
                    de.href = ae;
                    var se = M(ce, P);
                    se && (de.target = se);
                  }
                }
              }
              var me = document.createElement(ue);
              re.appendChild(me), l.select(me).attr(de), re = me, Y.push(me);
            }
            else re.appendChild(document.createTextNode(F(X)));
          }
          return K.innerHTML;
        }, s.lineCount = function(q) {
          return q.selectAll("tspan.line").size() || 1;
        }, s.positionText = function(q, K, re) {
          return q.each(function() {
            var Y = l.select(this);
            function te(Q, ue) {
              return ue === void 0 ? (ue = Y.attr(Q)) === null && (Y.attr(Q, 0), ue = 0) : Y.attr(Q, ue), ue;
            }
            var ee = te("x", K), X = te("y", re);
            this.nodeName === "text" && Y.selectAll("tspan.line").attr({ x: ee, y: X });
          });
        };
        var $ = "1px ";
        s.makeTextShadow = function(q) {
          return $ + $ + $ + q + ", -" + $ + "-" + $ + $ + q + ", " + $ + "-" + $ + $ + q + ", -" + $ + $ + $ + q;
        }, s.makeEditable = function(q, K) {
          var re = K.gd, Y = K.delegate, te = l.dispatch("edit", "input", "cancel"), ee = Y || q;
          if (q.style({ "pointer-events": Y ? "none" : "all" }), q.size() !== 1) throw new Error("boo");
          function X() {
            var ue, ce, he, de, ne;
            ue = l.select(re).select(".svg-container"), ce = ue.append("div"), he = q.node().style, de = parseFloat(he.fontSize || 12), (ne = K.text) === void 0 && (ne = q.attr("data-unformatted")), ce.classed("plugin-editable editable", !0).style({ position: "absolute", "font-family": he.fontFamily || "Arial", "font-size": de, color: K.fill || he.fill || "black", opacity: 1, "background-color": K.background || "transparent", outline: "#ffffff33 1px solid", margin: [-de / 8 + 1, 0, 0, -1].join("px ") + "px", padding: "0", "box-sizing": "border-box" }).attr({ contenteditable: !0 }).text(ne).call(V(q, ue, K)).on("blur", function() {
              re._editing = !1, q.text(this.textContent).style({ opacity: 1 });
              var me, ye = l.select(this).attr("class");
              (me = ye ? "." + ye.split(" ")[0] + "-math-group" : "[class*=-math-group]") && l.select(q.node().parentNode).select(me).style({ opacity: 0 });
              var pe = this.textContent;
              l.select(this).transition().duration(0).remove(), l.select(document).on("mouseup", null), te.edit.call(q, pe);
            }).on("focus", function() {
              var me = this;
              re._editing = !0, l.select(document).on("mouseup", function() {
                if (l.event.target === me) return !1;
                document.activeElement === ce.node() && ce.node().blur();
              });
            }).on("keyup", function() {
              l.event.which === 27 ? (re._editing = !1, q.style({ opacity: 1 }), l.select(this).style({ opacity: 0 }).on("blur", function() {
                return !1;
              }).transition().remove(), te.cancel.call(q, this.textContent)) : (te.input.call(q, this.textContent), l.select(this).call(V(q, ue, K)));
            }).on("keydown", function() {
              l.event.which === 13 && this.blur();
            }).call(Q), q.style({ opacity: 0 });
            var ae, se = ee.attr("class");
            (ae = se ? "." + se.split(" ")[0] + "-math-group" : "[class*=-math-group]") && l.select(q.node().parentNode).select(ae).style({ opacity: 0 });
          }
          function Q(ue) {
            var ce = ue.node(), he = document.createRange();
            he.selectNodeContents(ce);
            var de = window.getSelection();
            de.removeAllRanges(), de.addRange(he), ce.focus();
          }
          return K.immediate ? X() : ee.on("click", X), l.rebind(q, te, "on");
        };
      }, 64025: function(o, s) {
        var n = {};
        function l(u) {
          u && u.timer !== null && (clearTimeout(u.timer), u.timer = null);
        }
        s.throttle = function(u, i, h) {
          var p = n[u], _ = Date.now();
          if (!p) {
            for (var d in n) n[d].ts < _ - 6e4 && delete n[d];
            p = n[u] = { ts: 0, timer: null };
          }
          function f() {
            h(), p.ts = Date.now(), p.onDone && (p.onDone(), p.onDone = null);
          }
          l(p), _ > p.ts + i ? f() : p.timer = setTimeout(function() {
            f(), p.timer = null;
          }, i);
        }, s.done = function(u) {
          var i = n[u];
          return i && i.timer ? new Promise(function(h) {
            var p = i.onDone;
            i.onDone = function() {
              p && p(), h(), i.onDone = null;
            };
          }) : Promise.resolve();
        }, s.clear = function(u) {
          if (u) l(n[u]), delete n[u];
          else for (var i in n) s.clear(i);
        };
      }, 8083: function(o, s, n) {
        var l = n(10721);
        o.exports = function(u, i) {
          if (u > 0) return Math.log(u) / Math.LN10;
          var h = Math.log(Math.min(i[0], i[1])) / Math.LN10;
          return l(h) || (h = Math.log(Math.max(i[0], i[1])) / Math.LN10 - 6), h;
        };
      }, 11577: function(o, s, n) {
        var l = o.exports = {}, u = n(74285).locationmodeToLayer, i = n(48640).N4;
        l.getTopojsonName = function(h) {
          return [h.scope.replace(/ /g, "-"), "_", h.resolution.toString(), "m"].join("");
        }, l.getTopojsonPath = function(h, p) {
          return h + p + ".json";
        }, l.getTopojsonFeatures = function(h, p) {
          var _ = u[h.locationmode], d = p.objects[_];
          return i(p, d).features;
        };
      }, 44611: function(o) {
        o.exports = { moduleType: "locale", name: "en-US", dictionary: { "Click to enter Colorscale title": "Click to enter Colorscale title" }, format: { date: "%m/%d/%Y" } };
      }, 30227: function(o) {
        o.exports = { moduleType: "locale", name: "en", dictionary: { "Click to enter Colorscale title": "Click to enter Colourscale title" }, format: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], periods: ["AM", "PM"], dateTime: "%a %b %e %X %Y", date: "%d/%m/%Y", time: "%H:%M:%S", decimal: ".", thousands: ",", grouping: [3], currency: ["$", ""], year: "%Y", month: "%b %Y", dayMonth: "%b %-d", dayMonthYear: "%b %-d, %Y" } };
      }, 56037: function(o, s, n) {
        var l = n(33626);
        o.exports = function(u) {
          for (var i, h, p = l.layoutArrayContainers, _ = l.layoutArrayRegexes, d = u.split("[")[0], f = 0; f < _.length; f++) if ((h = u.match(_[f])) && h.index === 0) {
            i = h[0];
            break;
          }
          if (i || (i = p[p.indexOf(d)]), !i) return !1;
          var c = u.substr(i.length);
          return c ? !!(h = c.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/)) && { array: i, index: Number(h[1]), property: h[3] || "" } : { array: i, index: "", property: "" };
        };
      }, 13582: function(o, s, n) {
        var l = n(93049).extendFlat, u = n(56174), i = { valType: "flaglist", extras: ["none"], flags: ["calc", "clearAxisTypes", "plot", "style", "markerSize", "colorbars"] }, h = { valType: "flaglist", extras: ["none"], flags: ["calc", "plot", "legend", "ticks", "axrange", "layoutstyle", "modebar", "camera", "arraydraw", "colorbars"] }, p = i.flags.slice().concat(["fullReplot"]), _ = h.flags.slice().concat("layoutReplot");
        function d(g) {
          for (var m = {}, x = 0; x < g.length; x++) m[g[x]] = !1;
          return m;
        }
        function f(g, m, x) {
          var w = l({}, g);
          for (var k in w) {
            var S = w[k];
            u(S) && (w[k] = c(S, m, 0, k));
          }
          return x === "from-root" && (w.editType = m), w;
        }
        function c(g, m, x, w) {
          if (g.valType) {
            var k = l({}, g);
            if (k.editType = m, Array.isArray(g.items)) {
              k.items = new Array(g.items.length);
              for (var S = 0; S < g.items.length; S++) k.items[S] = c(g.items[S], m);
            }
            return k;
          }
          return f(g, m, w.charAt(0) === "_" ? "nested" : "from-root");
        }
        o.exports = { traces: i, layout: h, traceFlags: function() {
          return d(p);
        }, layoutFlags: function() {
          return d(_);
        }, update: function(g, m) {
          var x = m.editType;
          if (x && x !== "none") for (var w = x.split("+"), k = 0; k < w.length; k++) g[w[k]] = !0;
        }, overrideAll: f };
      }, 10887: function(o, s, n) {
        var l = n(10721), u = n(36472), i = n(33626), h = n(34809), p = n(44122), _ = n(5975), d = n(78766), f = _.cleanId, c = _.getFromTrace, g = i.traceIs;
        function m(E, P) {
          var I = E[P], M = P.charAt(0);
          I && I !== "paper" && (E[P] = f(I, M, !0));
        }
        function x(E) {
          function P(I, M) {
            var O = E[I], T = E.title && E.title[M];
            O && !T && (E.title || (E.title = {}), E.title[M] = E[I], delete E[I]);
          }
          E && (typeof E.title != "string" && typeof E.title != "number" || (E.title = { text: E.title }), P("titlefont", "font"), P("titleposition", "position"), P("titleside", "side"), P("titleoffset", "offset"));
        }
        function w(E) {
          if (!h.isPlainObject(E)) return !1;
          var P = E.name;
          return delete E.name, delete E.showlegend, (typeof P == "string" || typeof P == "number") && String(P);
        }
        function k(E, P, I, M) {
          if (I && !M) return E;
          if (M && !I || !E.trim()) return P;
          if (!P.trim()) return E;
          var O, T = Math.min(E.length, P.length);
          for (O = 0; O < T && E.charAt(O) === P.charAt(O); O++) ;
          return E.substr(0, O).trim();
        }
        function S(E) {
          var P = "middle", I = "center";
          return typeof E == "string" && (E.indexOf("top") !== -1 ? P = "top" : E.indexOf("bottom") !== -1 && (P = "bottom"), E.indexOf("left") !== -1 ? I = "left" : E.indexOf("right") !== -1 && (I = "right")), P + " " + I;
        }
        function A(E, P) {
          return P in E && typeof E[P] == "object" && Object.keys(E[P]).length === 0;
        }
        s.clearPromiseQueue = function(E) {
          Array.isArray(E._promises) && E._promises.length > 0 && h.log("Clearing previous rejected promises from queue."), E._promises = [];
        }, s.cleanLayout = function(E) {
          var P, I;
          E || (E = {}), E.xaxis1 && (E.xaxis || (E.xaxis = E.xaxis1), delete E.xaxis1), E.yaxis1 && (E.yaxis || (E.yaxis = E.yaxis1), delete E.yaxis1), E.scene1 && (E.scene || (E.scene = E.scene1), delete E.scene1);
          var M = (p.subplotsRegistry.cartesian || {}).attrRegex, O = (p.subplotsRegistry.polar || {}).attrRegex, T = (p.subplotsRegistry.ternary || {}).attrRegex, z = (p.subplotsRegistry.gl3d || {}).attrRegex, F = Object.keys(E);
          for (P = 0; P < F.length; P++) {
            var U = F[P];
            if (M && M.test(U)) {
              var V = E[U];
              V.anchor && V.anchor !== "free" && (V.anchor = f(V.anchor)), V.overlaying && (V.overlaying = f(V.overlaying)), V.type || (V.isdate ? V.type = "date" : V.islog ? V.type = "log" : V.isdate === !1 && V.islog === !1 && (V.type = "linear")), V.autorange !== "withzero" && V.autorange !== "tozero" || (V.autorange = !0, V.rangemode = "tozero"), V.insiderange && delete V.range, delete V.islog, delete V.isdate, delete V.categories, A(V, "domain") && delete V.domain, V.autotick !== void 0 && (V.tickmode === void 0 && (V.tickmode = V.autotick ? "auto" : "linear"), delete V.autotick), x(V);
            } else if (O && O.test(U)) x(E[U].radialaxis);
            else if (T && T.test(U)) {
              var $ = E[U];
              x($.aaxis), x($.baxis), x($.caxis);
            } else if (z && z.test(U)) {
              var q = E[U], K = q.cameraposition;
              if (Array.isArray(K) && K[0].length === 4) {
                var re = K[0], Y = K[1], te = K[2], ee = u([], re), X = [];
                for (I = 0; I < 3; ++I) X[I] = Y[I] + te * ee[2 + 4 * I];
                q.camera = { eye: { x: X[0], y: X[1], z: X[2] }, center: { x: Y[0], y: Y[1], z: Y[2] }, up: { x: 0, y: 0, z: 1 } }, delete q.cameraposition;
              }
              x(q.xaxis), x(q.yaxis), x(q.zaxis);
            }
          }
          var Q = Array.isArray(E.annotations) ? E.annotations.length : 0;
          for (P = 0; P < Q; P++) {
            var ue = E.annotations[P];
            h.isPlainObject(ue) && (ue.ref && (ue.ref === "paper" ? (ue.xref = "paper", ue.yref = "paper") : ue.ref === "data" && (ue.xref = "x", ue.yref = "y"), delete ue.ref), m(ue, "xref"), m(ue, "yref"));
          }
          var ce = Array.isArray(E.shapes) ? E.shapes.length : 0;
          for (P = 0; P < ce; P++) {
            var he = E.shapes[P];
            h.isPlainObject(he) && (m(he, "xref"), m(he, "yref"));
          }
          var de = Array.isArray(E.images) ? E.images.length : 0;
          for (P = 0; P < de; P++) {
            var ne = E.images[P];
            h.isPlainObject(ne) && (m(ne, "xref"), m(ne, "yref"));
          }
          var ae = E.legend;
          return ae && (ae.x > 3 ? (ae.x = 1.02, ae.xanchor = "left") : ae.x < -2 && (ae.x = -0.02, ae.xanchor = "right"), ae.y > 3 ? (ae.y = 1.02, ae.yanchor = "bottom") : ae.y < -2 && (ae.y = -0.02, ae.yanchor = "top")), x(E), E.dragmode === "rotate" && (E.dragmode = "orbit"), d.clean(E), E.template && E.template.layout && s.cleanLayout(E.template.layout), E;
        }, s.cleanData = function(E) {
          for (var P = 0; P < E.length; P++) {
            var I, M = E[P];
            if (M.type === "histogramy" && "xbins" in M && !("ybins" in M) && (M.ybins = M.xbins, delete M.xbins), M.error_y && "opacity" in M.error_y) {
              var O = d.defaults, T = M.error_y.color || (g(M, "bar") ? d.defaultLine : O[P % O.length]);
              M.error_y.color = d.addOpacity(d.rgb(T), d.opacity(T) * M.error_y.opacity), delete M.error_y.opacity;
            }
            if ("bardir" in M && (M.bardir !== "h" || !g(M, "bar") && M.type.substr(0, 9) !== "histogram" || (M.orientation = "h", s.swapXYData(M)), delete M.bardir), M.type === "histogramy" && s.swapXYData(M), M.type !== "histogramx" && M.type !== "histogramy" || (M.type = "histogram"), "scl" in M && !("colorscale" in M) && (M.colorscale = M.scl, delete M.scl), "reversescl" in M && !("reversescale" in M) && (M.reversescale = M.reversescl, delete M.reversescl), M.xaxis && (M.xaxis = f(M.xaxis, "x")), M.yaxis && (M.yaxis = f(M.yaxis, "y")), g(M, "gl3d") && M.scene && (M.scene = p.subplotsRegistry.gl3d.cleanId(M.scene)), !g(M, "pie-like") && !g(M, "bar-like")) if (Array.isArray(M.textposition)) for (I = 0; I < M.textposition.length; I++) M.textposition[I] = S(M.textposition[I]);
            else M.textposition && (M.textposition = S(M.textposition));
            var z = i.getModule(M);
            if (z && z.colorbar) {
              var F = z.colorbar.container, U = F ? M[F] : M;
              U && U.colorscale && (U.colorscale === "YIGnBu" && (U.colorscale = "YlGnBu"), U.colorscale === "YIOrRd" && (U.colorscale = "YlOrRd"));
            }
            if (M.type === "surface" && h.isPlainObject(M.contours)) {
              var V = ["x", "y", "z"];
              for (I = 0; I < V.length; I++) {
                var $ = M.contours[V[I]];
                h.isPlainObject($) && ($.highlightColor && ($.highlightcolor = $.highlightColor, delete $.highlightColor), $.highlightWidth && ($.highlightwidth = $.highlightWidth, delete $.highlightWidth));
              }
            }
            if (M.type === "candlestick" || M.type === "ohlc") {
              var q = (M.increasing || {}).showlegend !== !1, K = (M.decreasing || {}).showlegend !== !1, re = w(M.increasing), Y = w(M.decreasing);
              if (re !== !1 && Y !== !1) {
                var te = k(re, Y, q, K);
                te && (M.name = te);
              } else !re && !Y || M.name || (M.name = re || Y);
            }
            if (Array.isArray(M.transforms)) {
              var ee = M.transforms;
              for (I = 0; I < ee.length; I++) {
                var X = ee[I];
                if (h.isPlainObject(X)) switch (X.type) {
                  case "filter":
                    X.filtersrc && (X.target = X.filtersrc, delete X.filtersrc), X.calendar && (X.valuecalendar || (X.valuecalendar = X.calendar), delete X.calendar);
                    break;
                  case "groupby":
                    if (X.styles = X.styles || X.style, X.styles && !Array.isArray(X.styles)) {
                      var Q = X.styles, ue = Object.keys(Q);
                      X.styles = [];
                      for (var ce = 0; ce < ue.length; ce++) X.styles.push({ target: ue[ce], value: Q[ue[ce]] });
                    }
                }
              }
            }
            A(M, "line") && delete M.line, "marker" in M && (A(M.marker, "line") && delete M.marker.line, A(M, "marker") && delete M.marker), d.clean(M), M.autobinx && (delete M.autobinx, delete M.xbins), M.autobiny && (delete M.autobiny, delete M.ybins), x(M), M.colorbar && x(M.colorbar), M.marker && M.marker.colorbar && x(M.marker.colorbar), M.line && M.line.colorbar && x(M.line.colorbar), M.aaxis && x(M.aaxis), M.baxis && x(M.baxis);
          }
        }, s.swapXYData = function(E) {
          var P;
          if (h.swapAttrs(E, ["?", "?0", "d?", "?bins", "nbins?", "autobin?", "?src", "error_?"]), Array.isArray(E.z) && Array.isArray(E.z[0]) && (E.transpose ? delete E.transpose : E.transpose = !0), E.error_x && E.error_y) {
            var I = E.error_y, M = "copy_ystyle" in I ? I.copy_ystyle : !(I.color || I.thickness || I.width);
            h.swapAttrs(E, ["error_?.copy_ystyle"]), M && h.swapAttrs(E, ["error_?.color", "error_?.thickness", "error_?.width"]);
          }
          if (typeof E.hoverinfo == "string") {
            var O = E.hoverinfo.split("+");
            for (P = 0; P < O.length; P++) O[P] === "x" ? O[P] = "y" : O[P] === "y" && (O[P] = "x");
            E.hoverinfo = O.join("+");
          }
        }, s.coerceTraceIndices = function(E, P) {
          if (l(P)) return [P];
          if (!Array.isArray(P) || !P.length) return E.data.map(function(O, T) {
            return T;
          });
          if (Array.isArray(P)) {
            for (var I = [], M = 0; M < P.length; M++) h.isIndex(P[M], E.data.length) ? I.push(P[M]) : h.warn("trace index (", P[M], ") is not a number or is out of bounds");
            return I;
          }
          return P;
        }, s.manageArrayContainers = function(E, P, I) {
          var M = E.obj, O = E.parts, T = O.length, z = O[T - 1], F = l(z);
          if (F && P === null) {
            var U = O.slice(0, T - 1).join(".");
            h.nestedProperty(M, U).get().splice(z, 1);
          } else F && E.get() === void 0 && E.get() === void 0 && (I[E.astr] = null), E.set(P);
        };
        var C = /(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;
        function D(E) {
          var P = E.search(C);
          if (P > 0) return E.substr(0, P);
        }
        s.hasParent = function(E, P) {
          for (var I = D(P); I; ) {
            if (I in E) return !0;
            I = D(I);
          }
          return !1;
        };
        var L = ["x", "y", "z"];
        s.clearAxisTypes = function(E, P, I) {
          for (var M = 0; M < P.length; M++) for (var O = E._fullData[M], T = 0; T < 3; T++) {
            var z = c(E, O, L[T]);
            if (z && z.type !== "log") {
              var F = z._name, U = z._id.substr(1);
              if (U.substr(0, 5) === "scene") {
                if (I[U] !== void 0) continue;
                F = U + "." + F;
              }
              var V = F + ".type";
              I[F] === void 0 && I[V] === void 0 && h.nestedProperty(E.layout, V).set(null);
            }
          }
        };
      }, 90742: function(o, s, n) {
        var l = n(31420);
        s._doPlot = l._doPlot, s.newPlot = l.newPlot, s.restyle = l.restyle, s.relayout = l.relayout, s.redraw = l.redraw, s.update = l.update, s._guiRestyle = l._guiRestyle, s._guiRelayout = l._guiRelayout, s._guiUpdate = l._guiUpdate, s._storeDirectGUIEdit = l._storeDirectGUIEdit, s.react = l.react, s.extendTraces = l.extendTraces, s.prependTraces = l.prependTraces, s.addTraces = l.addTraces, s.deleteTraces = l.deleteTraces, s.moveTraces = l.moveTraces, s.purge = l.purge, s.addFrames = l.addFrames, s.deleteFrames = l.deleteFrames, s.animate = l.animate, s.setPlotConfig = l.setPlotConfig;
        var u = n(95425).getGraphDiv, i = n(28231).eraseActiveShape;
        s.deleteActiveShape = function(p) {
          return i(u(p));
        }, s.toImage = n(80491), s.validate = n(2466), s.downloadImage = n(26452);
        var h = n(53853);
        s.makeTemplate = h.makeTemplate, s.validateTemplate = h.validateTemplate;
      }, 85844: function(o, s, n) {
        var l = n(56174), u = n(4969), i = n(48636), h = n(98813).sorterAsc, p = n(33626);
        s.containerArrayMatch = n(56037);
        var _ = s.isAddVal = function(f) {
          return f === "add" || l(f);
        }, d = s.isRemoveVal = function(f) {
          return f === null || f === "remove";
        };
        s.applyContainerArrayChanges = function(f, c, g, m, x) {
          var w = c.astr, k = p.getComponentMethod(w, "supplyLayoutDefaults"), S = p.getComponentMethod(w, "draw"), A = p.getComponentMethod(w, "drawOne"), C = m.replot || m.recalc || k === u || S === u, D = f.layout, L = f._fullLayout;
          if (g[""]) {
            Object.keys(g).length > 1 && i.warn("Full array edits are incompatible with other edits", w);
            var E = g[""][""];
            if (d(E)) c.set(null);
            else {
              if (!Array.isArray(E)) return i.warn("Unrecognized full array edit value", w, E), !0;
              c.set(E);
            }
            return !C && (k(D, L), S(f), !0);
          }
          var P, I, M, O, T, z, F, U, V = Object.keys(g).map(Number).sort(h), $ = c.get(), q = $ || [], K = x(L, w).get(), re = [], Y = -1, te = q.length;
          for (P = 0; P < V.length; P++) if (O = g[M = V[P]], T = Object.keys(O), z = O[""], F = _(z), M < 0 || M > q.length - (F ? 0 : 1)) i.warn("index out of range", w, M);
          else if (z !== void 0) T.length > 1 && i.warn("Insertion & removal are incompatible with edits to the same index.", w, M), d(z) ? re.push(M) : F ? (z === "add" && (z = {}), q.splice(M, 0, z), K && K.splice(M, 0, {})) : i.warn("Unrecognized full object edit value", w, M, z), Y === -1 && (Y = M);
          else for (I = 0; I < T.length; I++) U = w + "[" + M + "].", x(q[M], T[I], U).set(O[T[I]]);
          for (P = re.length - 1; P >= 0; P--) q.splice(re[P], 1), K && K.splice(re[P], 1);
          if (q.length ? $ || c.set(q) : c.set(null), C) return !1;
          if (k(D, L), A !== u) {
            var ee;
            if (Y === -1) ee = V;
            else {
              for (te = Math.max(q.length, te), ee = [], P = 0; P < V.length && !((M = V[P]) >= Y); P++) ee.push(M);
              for (P = Y; P < te; P++) ee.push(P);
            }
            for (P = 0; P < ee.length; P++) A(f, ee[P]);
          } else S(f);
          return !0;
        };
      }, 31420: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(39784), h = n(34809), p = h.nestedProperty, _ = n(68596), d = n(40486), f = n(33626), c = n(57297), g = n(44122), m = n(29714), x = n(90259), w = n(25829), k = n(62203), S = n(78766), A = n(95284).initInteractions, C = n(62972), D = n(44844).clearOutline, L = n(24452).dfltConfig, E = n(85844), P = n(10887), I = n(71817), M = n(13582), O = n(54826).AX_NAME_PATTERN, T = 0;
        function z(we) {
          var Ge = we._fullLayout;
          Ge._redrawFromAutoMarginCount ? Ge._redrawFromAutoMarginCount-- : we.emit("plotly_afterplot");
        }
        function F(we, Ge) {
          try {
            we._fullLayout._paper.style("background", Ge);
          } catch (Re) {
            h.error(Re);
          }
        }
        function U(we, Ge) {
          F(we, S.combine(Ge, "white"));
        }
        function V(we, Ge) {
          if (!we._context) {
            we._context = h.extendDeep({}, L);
            var Re = l.select("base");
            we._context._baseUrl = Re.size() && Re.attr("href") ? window.location.href.split("#")[0] : "";
          }
          var je, Ke, tt, _e = we._context;
          if (Ge) {
            for (Ke = Object.keys(Ge), je = 0; je < Ke.length; je++) (tt = Ke[je]) !== "editable" && tt !== "edits" && tt in _e && (tt === "setBackground" && Ge[tt] === "opaque" ? _e[tt] = U : _e[tt] = Ge[tt]);
            Ge.plot3dPixelRatio && !_e.plotGlPixelRatio && (_e.plotGlPixelRatio = _e.plot3dPixelRatio);
            var Be = Ge.editable;
            if (Be !== void 0) for (_e.editable = Be, Ke = Object.keys(_e.edits), je = 0; je < Ke.length; je++) _e.edits[Ke[je]] = Be;
            if (Ge.edits) for (Ke = Object.keys(Ge.edits), je = 0; je < Ke.length; je++) (tt = Ke[je]) in _e.edits && (_e.edits[tt] = Ge.edits[tt]);
            _e._exportedPlot = Ge._exportedPlot;
          }
          _e.staticPlot && (_e.editable = !1, _e.edits = {}, _e.autosizable = !1, _e.scrollZoom = !1, _e.doubleClick = !1, _e.showTips = !1, _e.showLink = !1, _e.displayModeBar = !1), _e.displayModeBar !== "hover" || i || (_e.displayModeBar = !0), _e.setBackground !== "transparent" && typeof _e.setBackground == "function" || (_e.setBackground = F), _e._hasZeroHeight = _e._hasZeroHeight || we.clientHeight === 0, _e._hasZeroWidth = _e._hasZeroWidth || we.clientWidth === 0;
          var $e = _e.scrollZoom, Ze = _e._scrollZoom = {};
          if ($e === !0) Ze.cartesian = 1, Ze.gl3d = 1, Ze.geo = 1, Ze.mapbox = 1, Ze.map = 1;
          else if (typeof $e == "string") {
            var ct = $e.split("+");
            for (je = 0; je < ct.length; je++) Ze[ct[je]] = 1;
          } else $e !== !1 && (Ze.gl3d = 1, Ze.geo = 1, Ze.mapbox = 1, Ze.map = 1);
        }
        function $(we, Ge) {
          var Re, je, Ke = Ge + 1, tt = [];
          for (Re = 0; Re < we.length; Re++) (je = we[Re]) < 0 ? tt.push(Ke + je) : tt.push(je);
          return tt;
        }
        function q(we, Ge, Re) {
          var je, Ke;
          for (je = 0; je < Ge.length; je++) {
            if ((Ke = Ge[je]) !== parseInt(Ke, 10)) throw new Error("all values in " + Re + " must be integers");
            if (Ke >= we.data.length || Ke < -we.data.length) throw new Error(Re + " must be valid indices for gd.data.");
            if (Ge.indexOf(Ke, je + 1) > -1 || Ke >= 0 && Ge.indexOf(-we.data.length + Ke) > -1 || Ke < 0 && Ge.indexOf(we.data.length + Ke) > -1) throw new Error("each index in " + Re + " must be unique.");
          }
        }
        function K(we, Ge, Re) {
          if (!Array.isArray(we.data)) throw new Error("gd.data must be an array.");
          if (Ge === void 0) throw new Error("currentIndices is a required argument.");
          if (Array.isArray(Ge) || (Ge = [Ge]), q(we, Ge, "currentIndices"), Re === void 0 || Array.isArray(Re) || (Re = [Re]), Re !== void 0 && q(we, Re, "newIndices"), Re !== void 0 && Ge.length !== Re.length) throw new Error("current and new indices must be of equal length.");
        }
        function re(we, Ge, Re, je, Ke) {
          (function(_t, Pt, Dt, $t) {
            var Gt = h.isPlainObject($t);
            if (!Array.isArray(_t.data)) throw new Error("gd.data must be an array");
            if (!h.isPlainObject(Pt)) throw new Error("update must be a key:value object");
            if (Dt === void 0) throw new Error("indices must be an integer or array of integers");
            for (var Wt in q(_t, Dt, "indices"), Pt) {
              if (!Array.isArray(Pt[Wt]) || Pt[Wt].length !== Dt.length) throw new Error("attribute " + Wt + " must be an array of length equal to indices array length");
              if (Gt && (!(Wt in $t) || !Array.isArray($t[Wt]) || $t[Wt].length !== Pt[Wt].length)) throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object");
            }
          })(we, Ge, Re, je);
          for (var tt = function(_t, Pt, Dt, $t) {
            var Gt, Wt, mt, at, vt, St = h.isPlainObject($t), Je = [];
            for (var nt in Array.isArray(Dt) || (Dt = [Dt]), Dt = $(Dt, _t.data.length - 1), Pt) for (var ot = 0; ot < Dt.length; ot++) {
              if (Gt = _t.data[Dt[ot]], Wt = (mt = p(Gt, nt)).get(), at = Pt[nt][ot], !h.isArrayOrTypedArray(at)) throw new Error("attribute: " + nt + " index: " + ot + " must be an array");
              if (!h.isArrayOrTypedArray(Wt)) throw new Error("cannot extend missing or non-array attribute: " + nt);
              if (Wt.constructor !== at.constructor) throw new Error("cannot extend array with an array of a different type: " + nt);
              vt = St ? $t[nt][ot] : $t, u(vt) || (vt = -1), Je.push({ prop: mt, target: Wt, insert: at, maxp: Math.floor(vt) });
            }
            return Je;
          }(we, Ge, Re, je), _e = {}, Be = {}, $e = 0; $e < tt.length; $e++) {
            var Ze = tt[$e].prop, ct = tt[$e].maxp, ft = Ke(tt[$e].target, tt[$e].insert, ct);
            Ze.set(ft[0]), Array.isArray(_e[Ze.astr]) || (_e[Ze.astr] = []), _e[Ze.astr].push(ft[1]), Array.isArray(Be[Ze.astr]) || (Be[Ze.astr] = []), Be[Ze.astr].push(tt[$e].target.length);
          }
          return { update: _e, maxPoints: Be };
        }
        function Y(we, Ge) {
          var Re = new we.constructor(we.length + Ge.length);
          return Re.set(we), Re.set(Ge, we.length), Re;
        }
        function te(we, Ge, Re, je) {
          we = h.getGraphDiv(we), P.clearPromiseQueue(we);
          var Ke = {};
          if (typeof Ge == "string") Ke[Ge] = Re;
          else {
            if (!h.isPlainObject(Ge)) return h.warn("Restyle fail.", Ge, Re, je), Promise.reject();
            Ke = h.extendFlat({}, Ge), je === void 0 && (je = Re);
          }
          Object.keys(Ke).length && (we.changed = !0);
          var tt = P.coerceTraceIndices(we, je), _e = ue(we, Ke, tt), Be = _e.flags;
          Be.calc && (we.calcdata = void 0), Be.clearAxisTypes && P.clearAxisTypes(we, tt, {});
          var $e = [];
          Be.fullReplot ? $e.push(s._doPlot) : ($e.push(g.previousPromises), g.supplyDefaults(we), Be.markerSize && (g.doCalcdata(we), ne($e)), Be.style && $e.push(I.doTraceStyle), Be.colorbars && $e.push(I.doColorBars), $e.push(z)), $e.push(g.rehover, g.redrag, g.reselect), d.add(we, te, [we, _e.undoit, _e.traces], te, [we, _e.redoit, _e.traces]);
          var Ze = h.syncOrAsync($e, we);
          return Ze && Ze.then || (Ze = Promise.resolve()), Ze.then(function() {
            return we.emit("plotly_restyle", _e.eventData), we;
          });
        }
        function ee(we) {
          return we === void 0 ? null : we;
        }
        function X(we, Ge) {
          return Ge ? function(Re, je, Ke) {
            var tt = p(Re, je), _e = tt.set;
            return tt.set = function(Be) {
              Q((Ke || "") + je, tt.get(), Be, we), _e(Be);
            }, tt;
          } : p;
        }
        function Q(we, Ge, Re, je) {
          if (Array.isArray(Ge) || Array.isArray(Re)) for (var Ke = Array.isArray(Ge) ? Ge : [], tt = Array.isArray(Re) ? Re : [], _e = Math.max(Ke.length, tt.length), Be = 0; Be < _e; Be++) Q(we + "[" + Be + "]", Ke[Be], tt[Be], je);
          else if (h.isPlainObject(Ge) || h.isPlainObject(Re)) {
            var $e = h.isPlainObject(Ge) ? Ge : {}, Ze = h.isPlainObject(Re) ? Re : {}, ct = h.extendFlat({}, $e, Ze);
            for (var ft in ct) Q(we + "." + ft, $e[ft], Ze[ft], je);
          } else je[we] === void 0 && (je[we] = ee(Ge));
        }
        function ue(we, Ge, Re) {
          var je, Ke = we._fullLayout, tt = we._fullData, _e = we.data, Be = Ke._guiEditing, $e = X(Ke._preGUI, Be), Ze = h.extendDeepAll({}, Ge);
          ce(Ge);
          var ct, ft = M.traceFlags(), _t = {}, Pt = {};
          function Dt() {
            return Re.map(function() {
            });
          }
          function $t(zn) {
            var Cn = m.id2name(zn);
            ct.indexOf(Cn) === -1 && ct.push(Cn);
          }
          function Gt(zn) {
            return "LAYOUT" + zn + ".autorange";
          }
          function Wt(zn) {
            return "LAYOUT" + zn + ".range";
          }
          function mt(zn) {
            for (var Cn = zn; Cn < tt.length; Cn++) if (tt[Cn]._input === _e[zn]) return tt[Cn];
          }
          function at(zn, Cn, gn) {
            if (Array.isArray(zn)) zn.forEach(function(Pn) {
              at(Pn, Cn, gn);
            });
            else if (!(zn in Ge) && !P.hasParent(Ge, zn)) {
              var Mn;
              if (zn.substr(0, 6) === "LAYOUT") Mn = $e(we.layout, zn.replace("LAYOUT", ""));
              else {
                var Xn = Re[gn];
                Mn = X(Ke._tracePreGUI[mt(Xn)._fullInput.uid], Be)(_e[Xn], zn);
              }
              zn in Pt || (Pt[zn] = Dt()), Pt[zn][gn] === void 0 && (Pt[zn][gn] = ee(Mn.get())), Cn !== void 0 && Mn.set(Cn);
            }
          }
          function vt(zn) {
            return function(Cn) {
              return tt[Cn][zn];
            };
          }
          function St(zn) {
            return function(Cn, gn) {
              return Cn === !1 ? tt[Re[gn]][zn] : null;
            };
          }
          for (var Je in Ge) {
            if (P.hasParent(Ge, Je)) throw new Error("cannot set " + Je + " and a parent attribute simultaneously");
            var nt, ot, Ye, Fe, pt, Mt, At = Ge[Je];
            if (Je !== "autobinx" && Je !== "autobiny" || (Je = Je.charAt(Je.length - 1) + "bins", At = Array.isArray(At) ? At.map(St(Je)) : At === !1 ? Re.map(vt(Je)) : null), _t[Je] = At, Je.substr(0, 6) !== "LAYOUT") {
              for (Pt[Je] = Dt(), je = 0; je < Re.length; je++) if (nt = _e[Re[je]], ot = mt(Re[je]), Fe = (Ye = X(Ke._tracePreGUI[ot._fullInput.uid], Be)(nt, Je)).get(), (pt = Array.isArray(At) ? At[je % At.length] : At) !== void 0) {
                var Rt = Ye.parts[Ye.parts.length - 1], Ft = Je.substr(0, Je.length - Rt.length - 1), lt = Ft ? Ft + "." : "", st = Ft ? p(ot, Ft).get() : ot;
                if ((Mt = c.getTraceValObject(ot, Ye.parts)) && Mt.impliedEdits && pt !== null) for (var Ot in Mt.impliedEdits) at(h.relativeAttr(Je, Ot), Mt.impliedEdits[Ot], je);
                else if (Rt !== "thicknessmode" && Rt !== "lenmode" || Fe === pt || pt !== "fraction" && pt !== "pixels" || !st) {
                  if (Je === "type" && (pt === "pie" != (Fe === "pie") || pt === "funnelarea" != (Fe === "funnelarea"))) {
                    var kt = "x", Bt = "y";
                    pt !== "bar" && Fe !== "bar" || nt.orientation !== "h" || (kt = "y", Bt = "x"), h.swapAttrs(nt, ["?", "?src"], "labels", kt), h.swapAttrs(nt, ["d?", "?0"], "label", kt), h.swapAttrs(nt, ["?", "?src"], "values", Bt), Fe === "pie" || Fe === "funnelarea" ? (p(nt, "marker.color").set(p(nt, "marker.colors").get()), Ke._pielayer.selectAll("g.trace").remove()) : f.traceIs(nt, "cartesian") && p(nt, "marker.colors").set(p(nt, "marker.color").get());
                  }
                } else {
                  var xt = Ke._size, Jt = st.orient, qt = Jt === "top" || Jt === "bottom";
                  if (Rt === "thicknessmode") {
                    var en = qt ? xt.h : xt.w;
                    at(lt + "thickness", st.thickness * (pt === "fraction" ? 1 / en : en), je);
                  } else {
                    var Yt = qt ? xt.w : xt.h;
                    at(lt + "len", st.len * (pt === "fraction" ? 1 / Yt : Yt), je);
                  }
                }
                if (Pt[Je][je] = ee(Fe), ["swapxy", "swapxyaxes", "orientation", "orientationaxes"].indexOf(Je) !== -1) {
                  if (Je === "orientation") {
                    Ye.set(pt);
                    var Ht = nt.x && !nt.y ? "h" : "v";
                    if ((Ye.get() || Ht) === ot.orientation) continue;
                  } else Je === "orientationaxes" && (nt.orientation = { v: "h", h: "v" }[ot.orientation]);
                  P.swapXYData(nt), ft.calc = ft.clearAxisTypes = !0;
                } else g.dataArrayContainers.indexOf(Ye.parts[0]) !== -1 ? (P.manageArrayContainers(Ye, pt, Pt), ft.calc = !0) : (Mt ? Mt.arrayOk && !f.traceIs(ot, "regl") && (h.isArrayOrTypedArray(pt) || h.isArrayOrTypedArray(Fe)) ? ft.calc = !0 : M.update(ft, Mt) : ft.calc = !0, Ye.set(pt));
              }
              if (["swapxyaxes", "orientationaxes"].indexOf(Je) !== -1 && m.swap(we, Re), Je === "orientationaxes") {
                var sn = p(we.layout, "hovermode"), fn = sn.get();
                fn === "x" ? sn.set("y") : fn === "y" ? sn.set("x") : fn === "x unified" ? sn.set("y unified") : fn === "y unified" && sn.set("x unified");
              }
              if (["orientation", "type"].indexOf(Je) !== -1) {
                for (ct = [], je = 0; je < Re.length; je++) {
                  var In = _e[Re[je]];
                  f.traceIs(In, "cartesian") && ($t(In.xaxis || "x"), $t(In.yaxis || "y"));
                }
                at(ct.map(Gt), !0, 0), at(ct.map(Wt), [0, 1], 0);
              }
            } else Ye = $e(we.layout, Je.replace("LAYOUT", "")), Pt[Je] = [ee(Ye.get())], Ye.set(Array.isArray(At) ? At[0] : At), ft.calc = !0;
          }
          return (ft.calc || ft.plot) && (ft.fullReplot = !0), { flags: ft, undoit: Pt, redoit: _t, traces: Re, eventData: h.extendDeepNoArrays([], [Ze, Re]) };
        }
        function ce(we) {
          var Ge, Re, je, Ke = h.counterRegex("axis", ".title", !1, !1), tt = /colorbar\.title$/, _e = Object.keys(we);
          for (Ge = 0; Ge < _e.length; Ge++) Re = _e[Ge], je = we[Re], Re !== "title" && !Ke.test(Re) && !tt.test(Re) || typeof je != "string" && typeof je != "number" ? Re.indexOf("titlefont") > -1 && Re.indexOf("grouptitlefont") === -1 ? Be(Re, Re.replace("titlefont", "title.font")) : Re.indexOf("titleposition") > -1 ? Be(Re, Re.replace("titleposition", "title.position")) : Re.indexOf("titleside") > -1 ? Be(Re, Re.replace("titleside", "title.side")) : Re.indexOf("titleoffset") > -1 && Be(Re, Re.replace("titleoffset", "title.offset")) : Be(Re, Re.replace("title", "title.text"));
          function Be($e, Ze) {
            we[Ze] = we[$e], delete we[$e];
          }
        }
        function he(we, Ge, Re) {
          we = h.getGraphDiv(we), P.clearPromiseQueue(we);
          var je = {};
          if (typeof Ge == "string") je[Ge] = Re;
          else {
            if (!h.isPlainObject(Ge)) return h.warn("Relayout fail.", Ge, Re), Promise.reject();
            je = h.extendFlat({}, Ge);
          }
          Object.keys(je).length && (we.changed = !0);
          var Ke = ye(we, je), tt = Ke.flags;
          tt.calc && (we.calcdata = void 0);
          var _e = [g.previousPromises];
          tt.layoutReplot ? _e.push(I.layoutReplot) : Object.keys(je).length && (de(we, tt, Ke) || g.supplyDefaults(we), tt.legend && _e.push(I.doLegend), tt.layoutstyle && _e.push(I.layoutStyles), tt.axrange && ne(_e, Ke.rangesAltered), tt.ticks && _e.push(I.doTicksRelayout), tt.modebar && _e.push(I.doModeBar), tt.camera && _e.push(I.doCamera), tt.colorbars && _e.push(I.doColorBars), _e.push(z)), _e.push(g.rehover, g.redrag, g.reselect), d.add(we, he, [we, Ke.undoit], he, [we, Ke.redoit]);
          var Be = h.syncOrAsync(_e, we);
          return Be && Be.then || (Be = Promise.resolve(we)), Be.then(function() {
            return we.emit("plotly_relayout", Ke.eventData), we;
          });
        }
        function de(we, Ge, Re) {
          var je, Ke, tt = we._fullLayout;
          if (!Ge.axrange) return !1;
          for (var _e in Ge) if (_e !== "axrange" && Ge[_e]) return !1;
          var Be = function(Pt, Dt) {
            return h.coerce(je, Ke, w, Pt, Dt);
          }, $e = {};
          for (var Ze in Re.rangesAltered) {
            var ct = m.id2name(Ze);
            if (je = we.layout[ct], Ke = tt[ct], x(je, Ke, Be, $e), Ke._matchGroup) {
              for (var ft in Ke._matchGroup) if (ft !== Ze) {
                var _t = tt[m.id2name(ft)];
                _t.autorange = Ke.autorange, _t.range = Ke.range.slice(), _t._input.range = Ke.range.slice();
              }
            }
          }
          return !0;
        }
        function ne(we, Ge) {
          var Re = Ge ? function(je) {
            var Ke = [];
            for (var tt in Ge) {
              var _e = m.getFromId(je, tt);
              if (Ke.push(tt), (_e.ticklabelposition || "").indexOf("inside") !== -1 && _e._anchorAxis && Ke.push(_e._anchorAxis._id), _e._matchGroup) for (var Be in _e._matchGroup) Ge[Be] || Ke.push(Be);
            }
            return m.draw(je, Ke, { skipTitle: !0 });
          } : function(je) {
            return m.draw(je, "redraw");
          };
          we.push(D, I.doAutoRangeAndConstraints, Re, I.drawData, I.finalDraw);
        }
        var ae = /^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/, se = /^[xyz]axis[0-9]*\.autorange$/, me = /^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;
        function ye(we, Ge) {
          var Re, je, Ke, tt = we.layout, _e = we._fullLayout, Be = _e._guiEditing, $e = X(_e._preGUI, Be), Ze = Object.keys(Ge), ct = m.list(we), ft = h.extendDeepAll({}, Ge), _t = {};
          for (ce(Ge), Ze = Object.keys(Ge), je = 0; je < Ze.length; je++) if (Ze[je].indexOf("allaxes") === 0) {
            for (Ke = 0; Ke < ct.length; Ke++) {
              var Pt = ct[Ke]._id.substr(1), Dt = Pt.indexOf("scene") !== -1 ? Pt + "." : "", $t = Ze[je].replace("allaxes", Dt + ct[Ke]._name);
              Ge[$t] || (Ge[$t] = Ge[Ze[je]]);
            }
            delete Ge[Ze[je]];
          }
          var Gt = M.layoutFlags(), Wt = {}, mt = {};
          function at(Pn, wn) {
            if (Array.isArray(Pn)) Pn.forEach(function(_n) {
              at(_n, wn);
            });
            else if (!(Pn in Ge) && !P.hasParent(Ge, Pn)) {
              var Rn = $e(tt, Pn);
              Pn in mt || (mt[Pn] = ee(Rn.get())), wn !== void 0 && Rn.set(wn);
            }
          }
          var vt, St = {};
          function Je(Pn) {
            var wn = m.name2id(Pn.split(".")[0]);
            return St[wn] = 1, wn;
          }
          for (var nt in Ge) {
            if (P.hasParent(Ge, nt)) throw new Error("cannot set " + nt + " and a parent attribute simultaneously");
            for (var ot = $e(tt, nt), Ye = Ge[nt], Fe = ot.parts.length - 1; Fe > 0 && typeof ot.parts[Fe] != "string"; ) Fe--;
            var pt = ot.parts[Fe], Mt = ot.parts[Fe - 1] + "." + pt, At = ot.parts.slice(0, Fe).join("."), Rt = p(we.layout, At).get(), Ft = p(_e, At).get(), lt = ot.get();
            if (Ye !== void 0) {
              Wt[nt] = Ye, mt[nt] = pt === "reverse" ? Ye : ee(lt);
              var st = c.getLayoutValObject(_e, ot.parts);
              if (st && st.impliedEdits && Ye !== null) for (var Ot in st.impliedEdits) at(h.relativeAttr(nt, Ot), st.impliedEdits[Ot]);
              if (["width", "height"].indexOf(nt) !== -1) if (Ye) {
                at("autosize", null);
                var kt = nt === "height" ? "width" : "height";
                at(kt, _e[kt]);
              } else _e[nt] = we._initialAutoSize[nt];
              else if (nt === "autosize") at("width", Ye ? null : _e.width), at("height", Ye ? null : _e.height);
              else if (Mt.match(ae)) Je(Mt), p(_e, At + "._inputRange").set(null);
              else if (Mt.match(se)) {
                Je(Mt), p(_e, At + "._inputRange").set(null);
                var Bt = p(_e, At).get();
                Bt._inputDomain && (Bt._input.domain = Bt._inputDomain.slice());
              } else Mt.match(me) && p(_e, At + "._inputDomain").set(null);
              if (pt === "type") {
                vt = Rt;
                var xt = Ft.type === "linear" && Ye === "log", Jt = Ft.type === "log" && Ye === "linear";
                if (xt || Jt) {
                  if (vt && vt.range) if (Ft.autorange) xt && (vt.range = vt.range[1] > vt.range[0] ? [1, 2] : [2, 1]);
                  else {
                    var qt = vt.range[0], en = vt.range[1];
                    xt ? (qt <= 0 && en <= 0 && at(At + ".autorange", !0), qt <= 0 ? qt = en / 1e6 : en <= 0 && (en = qt / 1e6), at(At + ".range[0]", Math.log(qt) / Math.LN10), at(At + ".range[1]", Math.log(en) / Math.LN10)) : (at(At + ".range[0]", Math.pow(10, qt)), at(At + ".range[1]", Math.pow(10, en)));
                  }
                  else at(At + ".autorange", !0);
                  Array.isArray(_e._subplots.polar) && _e._subplots.polar.length && _e[ot.parts[0]] && ot.parts[1] === "radialaxis" && delete _e[ot.parts[0]]._subplot.viewInitial["radialaxis.range"], f.getComponentMethod("annotations", "convertCoords")(we, Ft, Ye, at), f.getComponentMethod("images", "convertCoords")(we, Ft, Ye, at);
                } else at(At + ".autorange", !0), at(At + ".range", null);
                p(_e, At + "._inputRange").set(null);
              } else if (pt.match(O)) {
                var Yt = p(_e, nt).get(), Ht = (Ye || {}).type;
                Ht && Ht !== "-" || (Ht = "linear"), f.getComponentMethod("annotations", "convertCoords")(we, Yt, Ht, at), f.getComponentMethod("images", "convertCoords")(we, Yt, Ht, at);
              }
              var sn = E.containerArrayMatch(nt);
              if (sn) {
                Re = sn.array, je = sn.index;
                var fn = sn.property, In = st || { editType: "calc" };
                je !== "" && fn === "" && (E.isAddVal(Ye) ? mt[nt] = null : E.isRemoveVal(Ye) ? mt[nt] = (p(tt, Re).get() || [])[je] : h.warn("unrecognized full object value", Ge)), M.update(Gt, In), _t[Re] || (_t[Re] = {});
                var zn = _t[Re][je];
                zn || (zn = _t[Re][je] = {}), zn[fn] = Ye, delete Ge[nt];
              } else pt === "reverse" ? (Rt.range ? Rt.range.reverse() : (at(At + ".autorange", !0), Rt.range = [1, 0]), Ft.autorange ? Gt.calc = !0 : Gt.plot = !0) : (nt === "dragmode" && (Ye === !1 && lt !== !1 || Ye !== !1 && lt === !1) || _e._has("scatter-like") && _e._has("regl") && nt === "dragmode" && (Ye === "lasso" || Ye === "select") && lt !== "lasso" && lt !== "select" || _e._has("gl2d") ? Gt.plot = !0 : st ? M.update(Gt, st) : Gt.calc = !0, ot.set(Ye));
            }
          }
          for (Re in _t) E.applyContainerArrayChanges(we, $e(tt, Re), _t[Re], Gt, $e) || (Gt.plot = !0);
          for (var Cn in St) {
            var gn = (vt = m.getFromId(we, Cn)) && vt._constraintGroup;
            if (gn) for (var Mn in Gt.calc = !0, gn) St[Mn] || (m.getFromId(we, Mn)._constraintShrinkable = !0);
          }
          (pe(we) || Ge.height || Ge.width) && (Gt.plot = !0);
          var Xn = _e.shapes;
          for (je = 0; je < Xn.length; je++) if (Xn[je].showlegend) {
            Gt.calc = !0;
            break;
          }
          return (Gt.plot || Gt.calc) && (Gt.layoutReplot = !0), { flags: Gt, rangesAltered: St, undoit: mt, redoit: Wt, eventData: ft };
        }
        function pe(we) {
          var Ge = we._fullLayout, Re = Ge.width, je = Ge.height;
          return we.layout.autosize && g.plotAutoSize(we, we.layout, Ge), Ge.width !== Re || Ge.height !== je;
        }
        function be(we, Ge, Re, je) {
          we = h.getGraphDiv(we), P.clearPromiseQueue(we), h.isPlainObject(Ge) || (Ge = {}), h.isPlainObject(Re) || (Re = {}), Object.keys(Ge).length && (we.changed = !0), Object.keys(Re).length && (we.changed = !0);
          var Ke = P.coerceTraceIndices(we, je), tt = ue(we, h.extendFlat({}, Ge), Ke), _e = tt.flags, Be = ye(we, h.extendFlat({}, Re)), $e = Be.flags;
          (_e.calc || $e.calc) && (we.calcdata = void 0), _e.clearAxisTypes && P.clearAxisTypes(we, Ke, Re);
          var Ze = [];
          $e.layoutReplot ? Ze.push(I.layoutReplot) : _e.fullReplot ? Ze.push(s._doPlot) : (Ze.push(g.previousPromises), de(we, $e, Be) || g.supplyDefaults(we), _e.style && Ze.push(I.doTraceStyle), (_e.colorbars || $e.colorbars) && Ze.push(I.doColorBars), $e.legend && Ze.push(I.doLegend), $e.layoutstyle && Ze.push(I.layoutStyles), $e.axrange && ne(Ze, Be.rangesAltered), $e.ticks && Ze.push(I.doTicksRelayout), $e.modebar && Ze.push(I.doModeBar), $e.camera && Ze.push(I.doCamera), Ze.push(z)), Ze.push(g.rehover, g.redrag, g.reselect), d.add(we, be, [we, tt.undoit, Be.undoit, tt.traces], be, [we, tt.redoit, Be.redoit, tt.traces]);
          var ct = h.syncOrAsync(Ze, we);
          return ct && ct.then || (ct = Promise.resolve(we)), ct.then(function() {
            return we.emit("plotly_update", { data: tt.eventData, layout: Be.eventData }), we;
          });
        }
        function Ae(we) {
          return function(Ge) {
            Ge._fullLayout._guiEditing = !0;
            var Re = we.apply(null, arguments);
            return Ge._fullLayout._guiEditing = !1, Re;
          };
        }
        var Se = [{ pattern: /^hiddenlabels/, attr: "legend.uirevision" }, { pattern: /^((x|y)axis\d*)\.((auto)?range|title\.text)/ }, { pattern: /axis\d*\.showspikes$/, attr: "modebar.uirevision" }, { pattern: /(hover|drag)mode$/, attr: "modebar.uirevision" }, { pattern: /^(scene\d*)\.camera/ }, { pattern: /^(geo\d*)\.(projection|center|fitbounds)/ }, { pattern: /^(ternary\d*\.[abc]axis)\.(min|title\.text)$/ }, { pattern: /^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/ }, { pattern: /^(polar\d*\.angularaxis)\.rotation/ }, { pattern: /^(mapbox\d*)\.(center|zoom|bearing|pitch)/ }, { pattern: /^(map\d*)\.(center|zoom|bearing|pitch)/ }, { pattern: /^legend\.(x|y)$/, attr: "editrevision" }, { pattern: /^(shapes|annotations)/, attr: "editrevision" }, { pattern: /^title\.text$/, attr: "editrevision" }], Me = [{ pattern: /^selectedpoints$/, attr: "selectionrevision" }, { pattern: /(^|value\.)visible$/, attr: "legend.uirevision" }, { pattern: /^dimensions\[\d+\]\.constraintrange/ }, { pattern: /^node\.(x|y|groups)/ }, { pattern: /^level$/ }, { pattern: /(^|value\.)name$/ }, { pattern: /colorbar\.title\.text$/ }, { pattern: /colorbar\.(x|y)$/, attr: "editrevision" }];
        function De(we, Ge) {
          for (var Re = 0; Re < Ge.length; Re++) {
            var je = Ge[Re], Ke = we.match(je.pattern);
            if (Ke) {
              var tt = Ke[1] || "";
              return { head: tt, tail: we.substr(tt.length + 1), attr: je.attr };
            }
          }
        }
        function Le(we, Ge) {
          var Re = p(Ge, we).get();
          if (Re !== void 0) return Re;
          var je = we.split(".");
          for (je.pop(); je.length > 1; ) if (je.pop(), (Re = p(Ge, je.join(".") + ".uirevision").get()) !== void 0) return Re;
          return Ge.uirevision;
        }
        function We(we, Ge) {
          for (var Re = 0; Re < Ge.length; Re++) if (Ge[Re]._fullInput.uid === we) return Re;
          return -1;
        }
        function Ee(we, Ge, Re) {
          for (var je = 0; je < Ge.length; je++) if (Ge[je].uid === we) return je;
          return !Ge[Re] || Ge[Re].uid ? -1 : Re;
        }
        function Ne(we, Ge) {
          var Re = h.isPlainObject(we), je = Array.isArray(we);
          return Re || je ? (Re && h.isPlainObject(Ge) || je && Array.isArray(Ge)) && JSON.stringify(we) === JSON.stringify(Ge) : we === Ge;
        }
        function Ie(we, Ge, Re, je) {
          var Ke, tt, _e, Be = je.getValObject, $e = je.flags, Ze = je.immutable, ct = je.inArray, ft = je.arrayIndex;
          function _t() {
            var Rt = Ke.editType;
            ct && Rt.indexOf("arraydraw") !== -1 ? h.pushUnique($e.arrays[ct], ft) : (M.update($e, Ke), Rt !== "none" && $e.nChanges++, je.transition && Ke.anim && $e.nChangesAnim++, (ae.test(_e) || se.test(_e)) && ($e.rangesAltered[Re[0]] = 1), me.test(_e) && p(Ge, "_inputDomain").set(null), tt === "datarevision" && ($e.newDataRevision = 1));
          }
          function Pt(Rt) {
            return Rt.valType === "data_array" || Rt.arrayOk;
          }
          for (tt in we) {
            if ($e.calc && !je.transition) return;
            var Dt = we[tt], $t = Ge[tt], Gt = Re.concat(tt);
            if (_e = Gt.join("."), tt.charAt(0) !== "_" && typeof Dt != "function" && Dt !== $t) {
              if ((tt === "tick0" || tt === "dtick") && Re[0] !== "geo") {
                var Wt = Ge.tickmode;
                if (Wt === "auto" || Wt === "array" || !Wt) continue;
              }
              if ((tt !== "range" || !Ge.autorange) && (tt !== "zmin" && tt !== "zmax" || Ge.type !== "contourcarpet") && (Ke = Be(Gt)) && (!Ke._compareAsJSON || JSON.stringify(Dt) !== JSON.stringify($t))) {
                var mt, at = Ke.valType, vt = Pt(Ke), St = Array.isArray(Dt), Je = Array.isArray($t);
                if (St && Je) {
                  var nt = "_input_" + tt, ot = we[nt], Ye = Ge[nt];
                  if (Array.isArray(ot) && ot === Ye) continue;
                }
                if ($t === void 0) vt && St ? $e.calc = !0 : _t();
                else if (Ke._isLinkedToArray) {
                  var Fe = [], pt = !1;
                  ct || ($e.arrays[tt] = Fe);
                  var Mt = Math.min(Dt.length, $t.length), At = Math.max(Dt.length, $t.length);
                  if (Mt !== At) {
                    if (Ke.editType !== "arraydraw") {
                      _t();
                      continue;
                    }
                    pt = !0;
                  }
                  for (mt = 0; mt < Mt; mt++) Ie(Dt[mt], $t[mt], Gt.concat(mt), h.extendFlat({ inArray: tt, arrayIndex: mt }, je));
                  if (pt) for (mt = Mt; mt < At; mt++) Fe.push(mt);
                } else !at && h.isPlainObject(Dt) ? Ie(Dt, $t, Gt, je) : vt ? St && Je ? (Ze && ($e.calc = !0), (Ze || je.newDataRevision) && _t()) : St !== Je ? $e.calc = !0 : _t() : St && Je && Dt.length === $t.length && String(Dt) === String($t) || _t();
              }
            }
          }
          for (tt in Ge) if (!(tt in we) && tt.charAt(0) !== "_" && typeof Ge[tt] != "function") {
            if (Pt(Ke = Be(Re.concat(tt))) && Array.isArray(Ge[tt])) return void ($e.calc = !0);
            _t();
          }
        }
        function ge(we, Ge) {
          var Re;
          for (Re in we) if (Re.charAt(0) !== "_") {
            var je = we[Re], Ke = Ge[Re];
            if (je !== Ke) if (h.isPlainObject(je) && h.isPlainObject(Ke)) {
              if (ge(je, Ke)) return !0;
            } else {
              if (!Array.isArray(je) || !Array.isArray(Ke) || je.length !== Ke.length) return !0;
              for (var tt = 0; tt < je.length; tt++) if (je[tt] !== Ke[tt] && (!h.isPlainObject(je[tt]) || !h.isPlainObject(Ke[tt]) || ge(je[tt], Ke[tt])))
                return !0;
            }
          }
        }
        function Ce(we) {
          var Ge = we._fullLayout, Re = we.getBoundingClientRect();
          if (!h.equalDomRects(Re, Ge._lastBBox)) {
            var je = Ge._invTransform = h.inverseTransformMatrix(h.getFullTransformMatrix(we));
            Ge._invScaleX = Math.sqrt(je[0][0] * je[0][0] + je[0][1] * je[0][1] + je[0][2] * je[0][2]), Ge._invScaleY = Math.sqrt(je[1][0] * je[1][0] + je[1][1] * je[1][1] + je[1][2] * je[1][2]), Ge._lastBBox = Re;
          }
        }
        s.animate = function(we, Ge, Re) {
          if (we = h.getGraphDiv(we), !h.isPlotDiv(we)) throw new Error("This element is not a Plotly plot: " + we + ". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");
          var je = we._transitionData;
          je._frameQueue || (je._frameQueue = []);
          var Ke = (Re = g.supplyAnimationDefaults(Re)).transition, tt = Re.frame;
          function _e(Ze) {
            return Array.isArray(Ke) ? Ze >= Ke.length ? Ke[0] : Ke[Ze] : Ke;
          }
          function Be(Ze) {
            return Array.isArray(tt) ? Ze >= tt.length ? tt[0] : tt[Ze] : tt;
          }
          function $e(Ze, ct) {
            var ft = 0;
            return function() {
              if (Ze && ++ft === ct) return Ze();
            };
          }
          return je._frameWaitingCnt === void 0 && (je._frameWaitingCnt = 0), new Promise(function(Ze, ct) {
            function ft() {
              we.emit("plotly_animating"), je._lastFrameAt = -1 / 0, je._timeToNext = 0, je._runningTransitions = 0, je._currentFrame = null;
              var nt = function() {
                je._animationRaf = window.requestAnimationFrame(nt), Date.now() - je._lastFrameAt > je._timeToNext && function() {
                  je._currentFrame && je._currentFrame.onComplete && je._currentFrame.onComplete();
                  var ot = je._currentFrame = je._frameQueue.shift();
                  if (ot) {
                    var Ye = ot.name ? ot.name.toString() : null;
                    we._fullLayout._currentFrame = Ye, je._lastFrameAt = Date.now(), je._timeToNext = ot.frameOpts.duration, g.transition(we, ot.frame.data, ot.frame.layout, P.coerceTraceIndices(we, ot.frame.traces), ot.frameOpts, ot.transitionOpts).then(function() {
                      ot.onComplete && ot.onComplete();
                    }), we.emit("plotly_animatingframe", { name: Ye, frame: ot.frame, animation: { frame: ot.frameOpts, transition: ot.transitionOpts } });
                  } else we.emit("plotly_animated"), window.cancelAnimationFrame(je._animationRaf), je._animationRaf = null;
                }();
              };
              nt();
            }
            var _t, Pt, Dt = 0;
            function $t(nt) {
              return Array.isArray(Ke) ? Dt >= Ke.length ? nt.transitionOpts = Ke[Dt] : nt.transitionOpts = Ke[0] : nt.transitionOpts = Ke, Dt++, nt;
            }
            var Gt = [], Wt = Ge == null, mt = Array.isArray(Ge);
            if (Wt || mt || !h.isPlainObject(Ge)) {
              if (Wt || ["string", "number"].indexOf(typeof Ge) !== -1) for (_t = 0; _t < je._frames.length; _t++) (Pt = je._frames[_t]) && (Wt || String(Pt.group) === String(Ge)) && Gt.push({ type: "byname", name: String(Pt.name), data: $t({ name: Pt.name }) });
              else if (mt) for (_t = 0; _t < Ge.length; _t++) {
                var at = Ge[_t];
                ["number", "string"].indexOf(typeof at) !== -1 ? (at = String(at), Gt.push({ type: "byname", name: at, data: $t({ name: at }) })) : h.isPlainObject(at) && Gt.push({ type: "object", data: $t(h.extendFlat({}, at)) });
              }
            } else Gt.push({ type: "object", data: $t(h.extendFlat({}, Ge)) });
            for (_t = 0; _t < Gt.length; _t++) if ((Pt = Gt[_t]).type === "byname" && !je._frameHash[Pt.data.name]) return h.warn('animate failure: frame not found: "' + Pt.data.name + '"'), void ct();
            ["next", "immediate"].indexOf(Re.mode) !== -1 && function() {
              if (je._frameQueue.length !== 0) {
                for (; je._frameQueue.length; ) {
                  var nt = je._frameQueue.pop();
                  nt.onInterrupt && nt.onInterrupt();
                }
                we.emit("plotly_animationinterrupted", []);
              }
            }(), Re.direction === "reverse" && Gt.reverse();
            var vt = we._fullLayout._currentFrame;
            if (vt && Re.fromcurrent) {
              var St = -1;
              for (_t = 0; _t < Gt.length; _t++) if ((Pt = Gt[_t]).type === "byname" && Pt.name === vt) {
                St = _t;
                break;
              }
              if (St > 0 && St < Gt.length - 1) {
                var Je = [];
                for (_t = 0; _t < Gt.length; _t++) Pt = Gt[_t], (Gt[_t].type !== "byname" || _t > St) && Je.push(Pt);
                Gt = Je;
              }
            }
            Gt.length > 0 ? function(nt) {
              if (nt.length !== 0) {
                for (var ot = 0; ot < nt.length; ot++) {
                  var Ye;
                  Ye = nt[ot].type === "byname" ? g.computeFrame(we, nt[ot].name) : nt[ot].data;
                  var Fe = Be(ot), pt = _e(ot);
                  pt.duration = Math.min(pt.duration, Fe.duration);
                  var Mt = { frame: Ye, name: nt[ot].name, frameOpts: Fe, transitionOpts: pt };
                  ot === nt.length - 1 && (Mt.onComplete = $e(Ze, 2), Mt.onInterrupt = ct), je._frameQueue.push(Mt);
                }
                Re.mode === "immediate" && (je._lastFrameAt = -1 / 0), je._animationRaf || ft();
              }
            }(Gt) : (we.emit("plotly_animated"), Ze());
          });
        }, s.addFrames = function(we, Ge, Re) {
          if (we = h.getGraphDiv(we), Ge == null) return Promise.resolve();
          if (!h.isPlotDiv(we)) throw new Error("This element is not a Plotly plot: " + we + ". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");
          var je, Ke, tt, _e, Be = we._transitionData._frames, $e = we._transitionData._frameHash;
          if (!Array.isArray(Ge)) throw new Error("addFrames failure: frameList must be an Array of frame definitions" + Ge);
          var Ze = Be.length + 2 * Ge.length, ct = [], ft = {};
          for (je = Ge.length - 1; je >= 0; je--) if (h.isPlainObject(Ge[je])) {
            var _t = Ge[je].name, Pt = ($e[_t] || ft[_t] || {}).name, Dt = Ge[je].name, $t = $e[Pt] || ft[Pt];
            Pt && Dt && typeof Dt == "number" && $t && T < 5 && (T++, h.warn('addFrames: overwriting frame "' + ($e[Pt] || ft[Pt]).name + '" with a frame whose name of type "number" also equates to "' + Pt + '". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'), T === 5 && h.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")), ft[_t] = { name: _t }, ct.push({ frame: g.supplyFrameDefaults(Ge[je]), index: Re && Re[je] !== void 0 && Re[je] !== null ? Re[je] : Ze + je });
          }
          ct.sort(function(nt, ot) {
            return nt.index > ot.index ? -1 : nt.index < ot.index ? 1 : 0;
          });
          var Gt = [], Wt = [], mt = Be.length;
          for (je = ct.length - 1; je >= 0; je--) {
            if (typeof (Ke = ct[je].frame).name == "number" && h.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"), !Ke.name) for (; $e[Ke.name = "frame " + we._transitionData._counter++]; ) ;
            if ($e[Ke.name]) {
              for (tt = 0; tt < Be.length && (Be[tt] || {}).name !== Ke.name; tt++) ;
              Gt.push({ type: "replace", index: tt, value: Ke }), Wt.unshift({ type: "replace", index: tt, value: Be[tt] });
            } else _e = Math.max(0, Math.min(ct[je].index, mt)), Gt.push({ type: "insert", index: _e, value: Ke }), Wt.unshift({ type: "delete", index: _e }), mt++;
          }
          var at = g.modifyFrames, vt = g.modifyFrames, St = [we, Wt], Je = [we, Gt];
          return d && d.add(we, at, St, vt, Je), g.modifyFrames(we, Gt);
        }, s.deleteFrames = function(we, Ge) {
          if (we = h.getGraphDiv(we), !h.isPlotDiv(we)) throw new Error("This element is not a Plotly plot: " + we);
          var Re, je, Ke = we._transitionData._frames, tt = [], _e = [];
          if (!Ge) for (Ge = [], Re = 0; Re < Ke.length; Re++) Ge.push(Re);
          for ((Ge = Ge.slice()).sort(), Re = Ge.length - 1; Re >= 0; Re--) je = Ge[Re], tt.push({ type: "delete", index: je }), _e.unshift({ type: "insert", index: je, value: Ke[je] });
          var Be = g.modifyFrames, $e = g.modifyFrames, Ze = [we, _e], ct = [we, tt];
          return d && d.add(we, Be, Ze, $e, ct), g.modifyFrames(we, tt);
        }, s.addTraces = function we(Ge, Re, je) {
          Ge = h.getGraphDiv(Ge);
          var Ke, tt, _e = [], Be = s.deleteTraces, $e = we, Ze = [Ge, _e], ct = [Ge, Re];
          for (function(ft, _t, Pt) {
            var Dt, $t;
            if (!Array.isArray(ft.data)) throw new Error("gd.data must be an array.");
            if (_t === void 0) throw new Error("traces must be defined.");
            for (Array.isArray(_t) || (_t = [_t]), Dt = 0; Dt < _t.length; Dt++) if (typeof ($t = _t[Dt]) != "object" || Array.isArray($t) || $t === null) throw new Error("all values in traces array must be non-array objects");
            if (Pt === void 0 || Array.isArray(Pt) || (Pt = [Pt]), Pt !== void 0 && Pt.length !== _t.length) throw new Error("if indices is specified, traces.length must equal indices.length");
          }(Ge, Re, je), Array.isArray(Re) || (Re = [Re]), Re = Re.map(function(ft) {
            return h.extendFlat({}, ft);
          }), P.cleanData(Re), Ke = 0; Ke < Re.length; Ke++) Ge.data.push(Re[Ke]);
          for (Ke = 0; Ke < Re.length; Ke++) _e.push(-Re.length + Ke);
          if (je === void 0) return tt = s.redraw(Ge), d.add(Ge, Be, Ze, $e, ct), tt;
          Array.isArray(je) || (je = [je]);
          try {
            K(Ge, _e, je);
          } catch (ft) {
            throw Ge.data.splice(Ge.data.length - Re.length, Re.length), ft;
          }
          return d.startSequence(Ge), d.add(Ge, Be, Ze, $e, ct), tt = s.moveTraces(Ge, _e, je), d.stopSequence(Ge), tt;
        }, s.deleteTraces = function we(Ge, Re) {
          Ge = h.getGraphDiv(Ge);
          var je, Ke, tt = [], _e = s.addTraces, Be = we, $e = [Ge, tt, Re], Ze = [Ge, Re];
          if (Re === void 0) throw new Error("indices must be an integer or array of integers.");
          for (Array.isArray(Re) || (Re = [Re]), q(Ge, Re, "indices"), (Re = $(Re, Ge.data.length - 1)).sort(h.sorterDes), je = 0; je < Re.length; je += 1) Ke = Ge.data.splice(Re[je], 1)[0], tt.push(Ke);
          var ct = s.redraw(Ge);
          return d.add(Ge, _e, $e, Be, Ze), ct;
        }, s.extendTraces = function we(Ge, Re, je, Ke) {
          var tt = re(Ge = h.getGraphDiv(Ge), Re, je, Ke, function($e, Ze, ct) {
            var ft, _t;
            if (h.isTypedArray($e)) if (ct < 0) {
              var Pt = new $e.constructor(0), Dt = Y($e, Ze);
              ct < 0 ? (ft = Dt, _t = Pt) : (ft = Pt, _t = Dt);
            } else if (ft = new $e.constructor(ct), _t = new $e.constructor($e.length + Ze.length - ct), ct === Ze.length) ft.set(Ze), _t.set($e);
            else if (ct < Ze.length) {
              var $t = Ze.length - ct;
              ft.set(Ze.subarray($t)), _t.set($e), _t.set(Ze.subarray(0, $t), $e.length);
            } else {
              var Gt = ct - Ze.length, Wt = $e.length - Gt;
              ft.set($e.subarray(Wt)), ft.set(Ze, Gt), _t.set($e.subarray(0, Wt));
            }
            else ft = $e.concat(Ze), _t = ct >= 0 && ct < ft.length ? ft.splice(0, ft.length - ct) : [];
            return [ft, _t];
          }), _e = s.redraw(Ge), Be = [Ge, tt.update, je, tt.maxPoints];
          return d.add(Ge, s.prependTraces, Be, we, arguments), _e;
        }, s.moveTraces = function we(Ge, Re, je) {
          var Ke, tt = [], _e = [], Be = we, $e = we, Ze = [Ge = h.getGraphDiv(Ge), je, Re], ct = [Ge, Re, je];
          if (K(Ge, Re, je), Re = Array.isArray(Re) ? Re : [Re], je === void 0) for (je = [], Ke = 0; Ke < Re.length; Ke++) je.push(-Re.length + Ke);
          for (je = Array.isArray(je) ? je : [je], Re = $(Re, Ge.data.length - 1), je = $(je, Ge.data.length - 1), Ke = 0; Ke < Ge.data.length; Ke++) Re.indexOf(Ke) === -1 && tt.push(Ge.data[Ke]);
          for (Ke = 0; Ke < Re.length; Ke++) _e.push({ newIndex: je[Ke], trace: Ge.data[Re[Ke]] });
          for (_e.sort(function(_t, Pt) {
            return _t.newIndex - Pt.newIndex;
          }), Ke = 0; Ke < _e.length; Ke += 1) tt.splice(_e[Ke].newIndex, 0, _e[Ke].trace);
          Ge.data = tt;
          var ft = s.redraw(Ge);
          return d.add(Ge, Be, Ze, $e, ct), ft;
        }, s.prependTraces = function we(Ge, Re, je, Ke) {
          var tt = re(Ge = h.getGraphDiv(Ge), Re, je, Ke, function($e, Ze, ct) {
            var ft, _t;
            if (h.isTypedArray($e)) if (ct <= 0) {
              var Pt = new $e.constructor(0), Dt = Y(Ze, $e);
              ct < 0 ? (ft = Dt, _t = Pt) : (ft = Pt, _t = Dt);
            } else if (ft = new $e.constructor(ct), _t = new $e.constructor($e.length + Ze.length - ct), ct === Ze.length) ft.set(Ze), _t.set($e);
            else if (ct < Ze.length) {
              var $t = Ze.length - ct;
              ft.set(Ze.subarray(0, $t)), _t.set(Ze.subarray($t)), _t.set($e, $t);
            } else {
              var Gt = ct - Ze.length;
              ft.set(Ze), ft.set($e.subarray(0, Gt), Ze.length), _t.set($e.subarray(Gt));
            }
            else ft = Ze.concat($e), _t = ct >= 0 && ct < ft.length ? ft.splice(ct, ft.length) : [];
            return [ft, _t];
          }), _e = s.redraw(Ge), Be = [Ge, tt.update, je, tt.maxPoints];
          return d.add(Ge, s.extendTraces, Be, we, arguments), _e;
        }, s.newPlot = function(we, Ge, Re, je) {
          return we = h.getGraphDiv(we), g.cleanPlot([], {}, we._fullData || [], we._fullLayout || {}), g.purge(we), s._doPlot(we, Ge, Re, je);
        }, s._doPlot = function(we, Ge, Re, je) {
          var Ke;
          if (we = h.getGraphDiv(we), _.init(we), h.isPlainObject(Ge)) {
            var tt = Ge;
            Ge = tt.data, Re = tt.layout, je = tt.config, Ke = tt.frames;
          }
          if (_.triggerHandler(we, "plotly_beforeplot", [Ge, Re, je]) === !1) return Promise.reject();
          Ge || Re || h.isPlotDiv(we) || h.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.", we), V(we, je), Re || (Re = {}), l.select(we).classed("js-plotly-plot", !0), k.makeTester(), Array.isArray(we._promises) || (we._promises = []);
          var _e = (we.data || []).length === 0 && Array.isArray(Ge);
          Array.isArray(Ge) && (P.cleanData(Ge), _e ? we.data = Ge : we.data.push.apply(we.data, Ge), we.empty = !1), we.layout && !_e || (we.layout = P.cleanLayout(Re)), g.supplyDefaults(we);
          var Be = we._fullLayout, $e = Be._has("cartesian");
          Be._replotting = !0, (_e || Be._shouldCreateBgLayer) && (function(Wt) {
            var mt = l.select(Wt), at = Wt._fullLayout;
            if (at._calcInverseTransform = Ce, at._calcInverseTransform(Wt), at._container = mt.selectAll(".plot-container").data([0]), at._container.enter().insert("div", ":first-child").classed("plot-container", !0).classed("plotly", !0), at._paperdiv = at._container.selectAll(".svg-container").data([0]), at._paperdiv.enter().append("div").classed("user-select-none", !0).classed("svg-container", !0).style("position", "relative"), at._glcontainer = at._paperdiv.selectAll(".gl-container").data([{}]), at._glcontainer.enter().append("div").classed("gl-container", !0), at._paperdiv.selectAll(".main-svg").remove(), at._paperdiv.select(".modebar-container").remove(), at._paper = at._paperdiv.insert("svg", ":first-child").classed("main-svg", !0), at._toppaper = at._paperdiv.append("svg").classed("main-svg", !0), at._modebardiv = at._paperdiv.append("div"), delete at._modeBar, at._hoverpaper = at._paperdiv.append("svg").classed("main-svg", !0), !at._uid) {
              var vt = {};
              l.selectAll("defs").each(function() {
                this.id && (vt[this.id.split("-")[1]] = 1);
              }), at._uid = h.randstr(vt);
            }
            at._paperdiv.selectAll(".main-svg").attr(C.svgAttrs), at._defs = at._paper.append("defs").attr("id", "defs-" + at._uid), at._clips = at._defs.append("g").classed("clips", !0), at._topdefs = at._toppaper.append("defs").attr("id", "topdefs-" + at._uid), at._topclips = at._topdefs.append("g").classed("clips", !0), at._bgLayer = at._paper.append("g").classed("bglayer", !0), at._draggers = at._paper.append("g").classed("draglayer", !0);
            var St = at._paper.append("g").classed("layer-below", !0);
            at._imageLowerLayer = St.append("g").classed("imagelayer", !0), at._shapeLowerLayer = St.append("g").classed("shapelayer", !0), at._cartesianlayer = at._paper.append("g").classed("cartesianlayer", !0), at._polarlayer = at._paper.append("g").classed("polarlayer", !0), at._smithlayer = at._paper.append("g").classed("smithlayer", !0), at._ternarylayer = at._paper.append("g").classed("ternarylayer", !0), at._geolayer = at._paper.append("g").classed("geolayer", !0), at._funnelarealayer = at._paper.append("g").classed("funnelarealayer", !0), at._pielayer = at._paper.append("g").classed("pielayer", !0), at._iciclelayer = at._paper.append("g").classed("iciclelayer", !0), at._treemaplayer = at._paper.append("g").classed("treemaplayer", !0), at._sunburstlayer = at._paper.append("g").classed("sunburstlayer", !0), at._indicatorlayer = at._toppaper.append("g").classed("indicatorlayer", !0), at._glimages = at._paper.append("g").classed("glimages", !0);
            var Je = at._toppaper.append("g").classed("layer-above", !0);
            at._imageUpperLayer = Je.append("g").classed("imagelayer", !0), at._shapeUpperLayer = Je.append("g").classed("shapelayer", !0), at._selectionLayer = at._toppaper.append("g").classed("selectionlayer", !0), at._infolayer = at._toppaper.append("g").classed("infolayer", !0), at._menulayer = at._toppaper.append("g").classed("menulayer", !0), at._zoomlayer = at._toppaper.append("g").classed("zoomlayer", !0), at._hoverlayer = at._hoverpaper.append("g").classed("hoverlayer", !0), at._modebardiv.classed("modebar-container", !0).style("position", "absolute").style("top", "0px").style("right", "0px"), Wt.emit("plotly_framework");
          }(we), Be._shouldCreateBgLayer && delete Be._shouldCreateBgLayer), k.initGradients(we), k.initPatterns(we), _e && m.saveShowSpikeInitial(we);
          var Ze = !we.calcdata || we.calcdata.length !== (we._fullData || []).length;
          Ze && g.doCalcdata(we);
          for (var ct = 0; ct < we.calcdata.length; ct++) we.calcdata[ct][0].trace = we._fullData[ct];
          we._context.responsive ? we._responsiveChartHandler || (we._responsiveChartHandler = function() {
            h.isHidden(we) || g.resize(we);
          }, window.addEventListener("resize", we._responsiveChartHandler)) : h.clearResponsive(we);
          var ft = h.extendFlat({}, Be._size), _t = 0;
          function Pt() {
            if (g.clearAutoMarginIds(we), I.drawMarginPushers(we), m.allowAutoMargin(we), we._fullLayout.title.text && we._fullLayout.title.automargin && g.allowAutoMargin(we, "title.automargin"), Be._has("pie")) for (var Wt = we._fullData, mt = 0; mt < Wt.length; mt++) {
              var at = Wt[mt];
              at.type === "pie" && at.automargin && g.allowAutoMargin(we, "pie." + at.uid + ".automargin");
            }
            return g.doAutoMargin(we), g.previousPromises(we);
          }
          function Dt() {
            we._transitioning || (I.doAutoRangeAndConstraints(we), _e && m.saveRangeInitial(we), f.getComponentMethod("rangeslider", "calcAutorange")(we));
          }
          var $t = [g.previousPromises, function() {
            if (Ke) return s.addFrames(we, Ke);
          }, function Wt() {
            for (var mt = Be._basePlotModules, at = 0; at < mt.length; at++) mt[at].drawFramework && mt[at].drawFramework(we);
            !Be._glcanvas && Be._has("gl") && (Be._glcanvas = Be._glcontainer.selectAll(".gl-canvas").data([{ key: "contextLayer", context: !0, pick: !1 }, { key: "focusLayer", context: !1, pick: !1 }, { key: "pickLayer", context: !1, pick: !0 }], function(nt) {
              return nt.key;
            }), Be._glcanvas.enter().append("canvas").attr("class", function(nt) {
              return "gl-canvas gl-canvas-" + nt.key.replace("Layer", "");
            }).style({ position: "absolute", top: 0, left: 0, overflow: "visible", "pointer-events": "none" }));
            var vt = we._context.plotGlPixelRatio;
            if (Be._glcanvas) {
              Be._glcanvas.attr("width", Be.width * vt).attr("height", Be.height * vt).style("width", Be.width + "px").style("height", Be.height + "px");
              var St = Be._glcanvas.data()[0].regl;
              if (St && (Math.floor(Be.width * vt) !== St._gl.drawingBufferWidth || Math.floor(Be.height * vt) !== St._gl.drawingBufferHeight)) {
                var Je = "WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";
                if (!_t) return h.log(Je + " Clearing graph and plotting again."), g.cleanPlot([], {}, we._fullData, Be), g.supplyDefaults(we), Be = we._fullLayout, g.doCalcdata(we), _t++, Wt();
                h.error(Je);
              }
            }
            return Be.modebar.orientation === "h" ? Be._modebardiv.style("height", null).style("width", "100%") : Be._modebardiv.style("width", null).style("height", Be.height + "px"), g.previousPromises(we);
          }, Pt, function() {
            if (g.didMarginChange(ft, Be._size)) return h.syncOrAsync([Pt, I.layoutStyles], we);
          }];
          $e && $t.push(function() {
            if (Ze) return h.syncOrAsync([f.getComponentMethod("shapes", "calcAutorange"), f.getComponentMethod("annotations", "calcAutorange"), Dt], we);
            Dt();
          }), $t.push(I.layoutStyles), $e && $t.push(function() {
            return m.draw(we, _e ? "" : "redraw");
          }, function(Wt) {
            var mt = Wt._fullLayout._insideTickLabelsUpdaterange;
            if (mt) return Wt._fullLayout._insideTickLabelsUpdaterange = void 0, he(Wt, mt).then(function() {
              m.saveRangeInitial(Wt, !0);
            });
          }), $t.push(I.drawData, I.finalDraw, A, g.addLinks, g.rehover, g.redrag, g.reselect, g.doAutoMargin, g.previousPromises);
          var Gt = h.syncOrAsync($t, we);
          return Gt && Gt.then || (Gt = Promise.resolve()), Gt.then(function() {
            return z(we), we;
          });
        }, s.purge = function(we) {
          var Ge = (we = h.getGraphDiv(we))._fullLayout || {}, Re = we._fullData || [];
          return g.cleanPlot([], {}, Re, Ge), g.purge(we), _.purge(we), Ge._container && Ge._container.remove(), delete we._context, we;
        }, s.react = function(we, Ge, Re, je) {
          var Ke, tt;
          we = h.getGraphDiv(we), P.clearPromiseQueue(we);
          var _e = we._fullData, Be = we._fullLayout;
          if (h.isPlotDiv(we) && _e && Be) {
            if (h.isPlainObject(Ge)) {
              var $e = Ge;
              Ge = $e.data, Re = $e.layout, je = $e.config, Ke = $e.frames;
            }
            var Ze = !1;
            if (je) {
              var ct = h.extendDeep({}, we._context);
              we._context = void 0, V(we, je), Ze = ge(ct, we._context);
            }
            we.data = Ge || [], P.cleanData(we.data), we.layout = Re || {}, P.cleanLayout(we.layout), function(At, Rt, Ft, lt) {
              var st, Ot, kt, Bt, xt, Jt, qt, en, Yt, Ht, sn = lt._preGUI, fn = [], In = {}, zn = {};
              for (st in sn) {
                if (xt = De(st, Se)) {
                  if (Yt = xt.head, Ht = xt.tail, Ot = xt.attr || Yt + ".uirevision", (Bt = (kt = p(lt, Ot).get()) && Le(Ot, Rt)) && Bt === kt) {
                    if ((Jt = sn[st]) === null && (Jt = void 0), Ne(en = (qt = p(Rt, st)).get(), Jt)) {
                      en === void 0 && Ht === "autorange" && fn.push(Yt), qt.set(ee(p(lt, st).get()));
                      continue;
                    }
                    if (Ht === "autorange" || Ht.substr(0, 6) === "range[") {
                      var Cn = sn[Yt + ".range[0]"], gn = sn[Yt + ".range[1]"], Mn = sn[Yt + ".autorange"];
                      if (Mn || Mn === null && Cn === null && gn === null) {
                        if (!(Yt in In)) {
                          var Xn = p(Rt, Yt).get();
                          In[Yt] = Xn && (Xn.autorange || Xn.autorange !== !1 && (!Xn.range || Xn.range.length !== 2));
                        }
                        if (In[Yt]) {
                          qt.set(ee(p(lt, st).get()));
                          continue;
                        }
                      }
                    }
                  }
                } else h.warn("unrecognized GUI edit: " + st);
                delete sn[st], xt && xt.tail.substr(0, 6) === "range[" && (zn[xt.head] = 1);
              }
              for (var Pn = 0; Pn < fn.length; Pn++) {
                var wn = fn[Pn];
                if (zn[wn]) {
                  var Rn = p(Rt, wn).get();
                  Rn && delete Rn.autorange;
                }
              }
              var _n = lt._tracePreGUI;
              for (var En in _n) {
                var Kn, Wn = _n[En], hr = null;
                for (st in Wn) {
                  if (!hr) {
                    var Zn = We(En, Ft);
                    if (Zn < 0) {
                      delete _n[En];
                      break;
                    }
                    var lr = Ee(En, At, (Kn = Ft[Zn]._fullInput).index);
                    if (lr < 0) {
                      delete _n[En];
                      break;
                    }
                    hr = At[lr];
                  }
                  if (xt = De(st, Me)) {
                    if (xt.attr ? Bt = (kt = p(lt, xt.attr).get()) && Le(xt.attr, Rt) : (kt = Kn.uirevision, (Bt = hr.uirevision) === void 0 && (Bt = Rt.uirevision)), Bt && Bt === kt && ((Jt = Wn[st]) === null && (Jt = void 0), Ne(en = (qt = p(hr, st)).get(), Jt))) {
                      qt.set(ee(p(Kn, st).get()));
                      continue;
                    }
                  } else h.warn("unrecognized GUI edit: " + st + " in trace uid " + En);
                  delete Wn[st];
                }
              }
            }(we.data, we.layout, _e, Be), g.supplyDefaults(we, { skipUpdateCalc: !0 });
            var ft = we._fullData, _t = we._fullLayout, Pt = _t.datarevision === void 0, Dt = _t.transition, $t = function(At, Rt, Ft, lt, st) {
              var Ot = M.layoutFlags();
              return Ot.arrays = {}, Ot.rangesAltered = {}, Ot.nChanges = 0, Ot.nChangesAnim = 0, Ie(Rt, Ft, [], { getValObject: function(kt) {
                return c.getLayoutValObject(Ft, kt);
              }, flags: Ot, immutable: lt, transition: st, gd: At }), (Ot.plot || Ot.calc) && (Ot.layoutReplot = !0), st && Ot.nChanges && Ot.nChangesAnim && (Ot.anim = Ot.nChanges === Ot.nChangesAnim ? "all" : "some"), Ot;
            }(we, Be, _t, Pt, Dt), Gt = $t.newDataRevision, Wt = function(At, Rt, Ft, lt, st, Ot) {
              var kt = Rt.length === Ft.length;
              if (!st && !kt) return { fullReplot: !0, calc: !0 };
              var Bt, xt, Jt = M.traceFlags();
              Jt.arrays = {}, Jt.nChanges = 0, Jt.nChangesAnim = 0;
              var qt = { getValObject: function(Yt) {
                var Ht = c.getTraceValObject(xt, Yt);
                return !xt._module.animatable && Ht.anim && (Ht.anim = !1), Ht;
              }, flags: Jt, immutable: lt, transition: st, newDataRevision: Ot, gd: At }, en = {};
              for (Bt = 0; Bt < Rt.length; Bt++) if (Ft[Bt]) {
                if (xt = Ft[Bt]._fullInput, g.hasMakesDataTransform(xt) && (xt = Ft[Bt]), en[xt.uid]) continue;
                en[xt.uid] = 1, Ie(Rt[Bt]._fullInput, xt, [], qt);
              }
              return (Jt.calc || Jt.plot) && (Jt.fullReplot = !0), st && Jt.nChanges && Jt.nChangesAnim && (Jt.anim = Jt.nChanges === Jt.nChangesAnim && kt ? "all" : "some"), Jt;
            }(we, _e, ft, Pt, Dt, Gt);
            if (pe(we) && ($t.layoutReplot = !0), Wt.calc || $t.calc) {
              we.calcdata = void 0;
              for (var mt = Object.getOwnPropertyNames(_t), at = 0; at < mt.length; at++) {
                var vt = mt[at], St = vt.substring(0, 5);
                if (St === "xaxis" || St === "yaxis") {
                  var Je = _t[vt]._emptyCategories;
                  Je && Je();
                }
              }
            } else g.supplyDefaultsUpdateCalc(we.calcdata, ft);
            var nt = [];
            if (Ke && (we._transitionData = {}, g.createTransitionData(we), nt.push(function() {
              return s.addFrames(we, Ke);
            })), _t.transition && !Ze && (Wt.anim || $t.anim)) $t.ticks && nt.push(I.doTicksRelayout), g.doCalcdata(we), I.doAutoRangeAndConstraints(we), nt.push(function() {
              return g.transitionFromReact(we, Wt, $t, Be);
            });
            else if (Wt.fullReplot || $t.layoutReplot || Ze) we._fullLayout._skipDefaults = !0, nt.push(s._doPlot);
            else {
              for (var ot in $t.arrays) {
                var Ye = $t.arrays[ot];
                if (Ye.length) {
                  var Fe = f.getComponentMethod(ot, "drawOne");
                  if (Fe !== h.noop) for (var pt = 0; pt < Ye.length; pt++) Fe(we, Ye[pt]);
                  else {
                    var Mt = f.getComponentMethod(ot, "draw");
                    if (Mt === h.noop) throw new Error("cannot draw components: " + ot);
                    Mt(we);
                  }
                }
              }
              nt.push(g.previousPromises), Wt.style && nt.push(I.doTraceStyle), (Wt.colorbars || $t.colorbars) && nt.push(I.doColorBars), $t.legend && nt.push(I.doLegend), $t.layoutstyle && nt.push(I.layoutStyles), $t.axrange && ne(nt), $t.ticks && nt.push(I.doTicksRelayout), $t.modebar && nt.push(I.doModeBar), $t.camera && nt.push(I.doCamera), nt.push(z);
            }
            nt.push(g.rehover, g.redrag, g.reselect), (tt = h.syncOrAsync(nt, we)) && tt.then || (tt = Promise.resolve(we));
          } else tt = s.newPlot(we, Ge, Re, je);
          return tt.then(function() {
            return we.emit("plotly_react", { data: Ge, layout: Re }), we;
          });
        }, s.redraw = function(we) {
          if (we = h.getGraphDiv(we), !h.isPlotDiv(we)) throw new Error("This element is not a Plotly plot: " + we);
          return P.cleanData(we.data), P.cleanLayout(we.layout), we.calcdata = void 0, s._doPlot(we).then(function() {
            return we.emit("plotly_redraw"), we;
          });
        }, s.relayout = he, s.restyle = te, s.setPlotConfig = function(we) {
          return h.extendFlat(L, we);
        }, s.update = be, s._guiRelayout = Ae(he), s._guiRestyle = Ae(te), s._guiUpdate = Ae(be), s._storeDirectGUIEdit = function(we, Ge, Re) {
          for (var je in Re) Q(je, p(we, je).get(), Re[je], Ge);
        };
      }, 24452: function(o) {
        var s = { staticPlot: { valType: "boolean", dflt: !1 }, typesetMath: { valType: "boolean", dflt: !0 }, plotlyServerURL: { valType: "string", dflt: "" }, editable: { valType: "boolean", dflt: !1 }, edits: { annotationPosition: { valType: "boolean", dflt: !1 }, annotationTail: { valType: "boolean", dflt: !1 }, annotationText: { valType: "boolean", dflt: !1 }, axisTitleText: { valType: "boolean", dflt: !1 }, colorbarPosition: { valType: "boolean", dflt: !1 }, colorbarTitleText: { valType: "boolean", dflt: !1 }, legendPosition: { valType: "boolean", dflt: !1 }, legendText: { valType: "boolean", dflt: !1 }, shapePosition: { valType: "boolean", dflt: !1 }, titleText: { valType: "boolean", dflt: !1 } }, editSelection: { valType: "boolean", dflt: !0 }, autosizable: { valType: "boolean", dflt: !1 }, responsive: { valType: "boolean", dflt: !1 }, fillFrame: { valType: "boolean", dflt: !1 }, frameMargins: { valType: "number", dflt: 0, min: 0, max: 0.5 }, scrollZoom: { valType: "flaglist", flags: ["cartesian", "gl3d", "geo", "mapbox", "map"], extras: [!0, !1], dflt: "gl3d+geo+map" }, doubleClick: { valType: "enumerated", values: [!1, "reset", "autosize", "reset+autosize"], dflt: "reset+autosize" }, doubleClickDelay: { valType: "number", dflt: 300, min: 0 }, showAxisDragHandles: { valType: "boolean", dflt: !0 }, showAxisRangeEntryBoxes: { valType: "boolean", dflt: !0 }, showTips: { valType: "boolean", dflt: !0 }, showLink: { valType: "boolean", dflt: !1 }, linkText: { valType: "string", dflt: "Edit chart", noBlank: !0 }, sendData: { valType: "boolean", dflt: !0 }, showSources: { valType: "any", dflt: !1 }, displayModeBar: { valType: "enumerated", values: ["hover", !0, !1], dflt: "hover" }, showSendToCloud: { valType: "boolean", dflt: !1 }, showEditInChartStudio: { valType: "boolean", dflt: !1 }, modeBarButtonsToRemove: { valType: "any", dflt: [] }, modeBarButtonsToAdd: { valType: "any", dflt: [] }, modeBarButtons: { valType: "any", dflt: !1 }, toImageButtonOptions: { valType: "any", dflt: {} }, displaylogo: { valType: "boolean", dflt: !0 }, watermark: { valType: "boolean", dflt: !1 }, plotGlPixelRatio: { valType: "number", dflt: 2, min: 1, max: 4 }, setBackground: { valType: "any", dflt: "transparent" }, topojsonURL: { valType: "string", noBlank: !0, dflt: "https://cdn.plot.ly/" }, mapboxAccessToken: { valType: "string", dflt: null }, logging: { valType: "integer", min: 0, max: 2, dflt: 1 }, notifyOnLogging: { valType: "integer", min: 0, max: 2, dflt: 0 }, queueLength: { valType: "integer", min: 0, dflt: 0 }, globalTransforms: { valType: "any", dflt: [] }, locale: { valType: "string", dflt: "en-US" }, locales: { valType: "any", dflt: {} } }, n = {};
        (function l(u, i) {
          for (var h in u) {
            var p = u[h];
            p.valType ? i[h] = p.dflt : (i[h] || (i[h] = {}), l(p, i[h]));
          }
        })(s, n), o.exports = { configAttributes: s, dfltConfig: n };
      }, 57297: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(9829), h = n(6704), p = n(58935), _ = n(49722), d = n(24452).configAttributes, f = n(13582), c = u.extendDeepAll, g = u.isPlainObject, m = u.isArrayOrTypedArray, x = u.nestedProperty, w = u.valObjectMeta, k = "_isSubplotObj", S = "_isLinkedToArray", A = "_deprecated", C = [k, S, "_arrayAttrRegexps", A];
        function D(O, T, z) {
          if (!O) return !1;
          if (O._isLinkedToArray) {
            if (L(T[z])) z++;
            else if (z < T.length) return !1;
          }
          for (; z < T.length; z++) {
            var F = O[T[z]];
            if (!g(F) || (O = F, z === T.length - 1)) break;
            if (O._isLinkedToArray) {
              if (!L(T[++z])) return !1;
            } else if (O.valType === "info_array") {
              var U = T[++z];
              if (!L(U)) return !1;
              var V = O.items;
              if (Array.isArray(V)) {
                if (U >= V.length) return !1;
                if (O.dimensions === 2) {
                  if (z++, T.length === z) return O;
                  var $ = T[z];
                  if (!L($)) return !1;
                  O = V[U][$];
                } else O = V[U];
              } else O = V;
            }
          }
          return O;
        }
        function L(O) {
          return O === Math.round(O) && O >= 0;
        }
        function E() {
          var O, T, z = {};
          for (O in c(z, h), l.subplotsRegistry) if ((T = l.subplotsRegistry[O]).layoutAttributes) if (Array.isArray(T.attr)) for (var F = 0; F < T.attr.length; F++) I(z, T, T.attr[F]);
          else I(z, T, T.attr === "subplot" ? T.name : T.attr);
          for (O in l.componentsRegistry) {
            var U = (T = l.componentsRegistry[O]).schema;
            if (U && (U.subplots || U.layout)) {
              var V = U.subplots;
              if (V && V.xaxis && !V.yaxis) for (var $ in V.xaxis) delete z.yaxis[$];
              delete z.xaxis.shift, delete z.xaxis.autoshift;
            } else T.name === "colorscale" ? c(z, T.layoutAttributes) : T.layoutAttributes && M(z, T.layoutAttributes, T.name);
          }
          return { layoutAttributes: P(z) };
        }
        function P(O) {
          return function(T) {
            s.crawl(T, function(z, F, U) {
              s.isValObject(z) ? z.arrayOk !== !0 && z.valType !== "data_array" || (U[F + "src"] = { valType: "string", editType: "none" }) : g(z) && (z.role = "object");
            });
          }(O), function(T) {
            s.crawl(T, function(z, F, U) {
              if (z) {
                var V = z[S];
                V && (delete z[S], U[F] = { items: {} }, U[F].items[V] = z, U[F].role = "object");
              }
            });
          }(O), function(T) {
            (function z(F) {
              for (var U in F) if (g(F[U])) z(F[U]);
              else if (Array.isArray(F[U])) for (var V = 0; V < F[U].length; V++) z(F[U][V]);
              else F[U] instanceof RegExp && (F[U] = F[U].toString());
            })(T);
          }(O), O;
        }
        function I(O, T, z) {
          var F = x(O, z), U = c({}, T.layoutAttributes);
          U[k] = !0, F.set(U);
        }
        function M(O, T, z) {
          var F = x(O, z);
          F.set(c(F.get() || {}, T));
        }
        s.IS_SUBPLOT_OBJ = k, s.IS_LINKED_TO_ARRAY = S, s.DEPRECATED = A, s.UNDERSCORE_ATTRS = C, s.get = function() {
          var O = {};
          l.allTypes.forEach(function(F) {
            O[F] = function(U) {
              var V, $;
              $ = (V = l.modules[U]._module).basePlotModule;
              var q = { type: null }, K = c({}, i), re = c({}, V.attributes);
              s.crawl(re, function(ee, X, Q, ue, ce) {
                x(K, ce).set(void 0), ee === void 0 && x(re, ce).set(void 0);
              }), c(q, K), l.traceIs(U, "noOpacity") && delete q.opacity, l.traceIs(U, "showLegend") || (delete q.showlegend, delete q.legendgroup), l.traceIs(U, "noHover") && (delete q.hoverinfo, delete q.hoverlabel), V.selectPoints || delete q.selectedpoints, c(q, re), $.attributes && c(q, $.attributes), q.type = U;
              var Y = { meta: V.meta || {}, categories: V.categories || {}, animatable: !!V.animatable, type: U, attributes: P(q) };
              if (V.layoutAttributes) {
                var te = {};
                c(te, V.layoutAttributes), Y.layoutAttributes = P(te);
              }
              return V.animatable || s.crawl(Y, function(ee) {
                s.isValObject(ee) && "anim" in ee && delete ee.anim;
              }), Y;
            }(F);
          });
          var T, z = {};
          return Object.keys(l.transformsRegistry).forEach(function(F) {
            z[F] = function(U) {
              var V = l.transformsRegistry[U], $ = c({}, V.attributes);
              return Object.keys(l.componentsRegistry).forEach(function(q) {
                var K = l.componentsRegistry[q];
                K.schema && K.schema.transforms && K.schema.transforms[U] && Object.keys(K.schema.transforms[U]).forEach(function(re) {
                  M($, K.schema.transforms[U][re], re);
                });
              }), { attributes: P($) };
            }(F);
          }), { defs: { valObjects: w, metaKeys: C.concat(["description", "role", "editType", "impliedEdits"]), editType: { traces: f.traces, layout: f.layout }, impliedEdits: {} }, traces: O, layout: E(), transforms: z, frames: (T = { frames: c({}, p) }, P(T), T.frames), animation: P(_), config: P(d) };
        }, s.crawl = function(O, T, z, F) {
          var U = z || 0;
          F = F || "", Object.keys(O).forEach(function(V) {
            var $ = O[V];
            if (C.indexOf(V) === -1) {
              var q = (F ? F + "." : "") + V;
              T($, V, O, U, q), s.isValObject($) || g($) && V !== "impliedEdits" && s.crawl($, T, U + 1, q);
            }
          });
        }, s.isValObject = function(O) {
          return O && O.valType !== void 0;
        }, s.findArrayAttributes = function(O) {
          var T, z, F = [], U = [], V = [];
          function $(ee, X, Q, ue) {
            U = U.slice(0, ue).concat([X]), V = V.slice(0, ue).concat([ee && ee._isLinkedToArray]), ee && (ee.valType === "data_array" || ee.arrayOk === !0) && (U[ue - 1] !== "colorbar" || X !== "ticktext" && X !== "tickvals") && q(T, 0, "");
          }
          function q(ee, X, Q) {
            var ue = ee[U[X]], ce = Q + U[X];
            if (X === U.length - 1) m(ue) && F.push(z + ce);
            else if (V[X]) {
              if (Array.isArray(ue)) for (var he = 0; he < ue.length; he++) g(ue[he]) && q(ue[he], X + 1, ce + "[" + he + "].");
            } else g(ue) && q(ue, X + 1, ce + ".");
          }
          T = O, z = "", s.crawl(i, $), O._module && O._module.attributes && s.crawl(O._module.attributes, $);
          var K = O.transforms;
          if (K) for (var re = 0; re < K.length; re++) {
            var Y = K[re], te = Y._module;
            te && (z = "transforms[" + re + "].", T = Y, s.crawl(te.attributes, $));
          }
          return F;
        }, s.getTraceValObject = function(O, T) {
          var z, F, U = T[0], V = 1;
          if (U === "transforms") {
            if (T.length === 1) return i.transforms;
            var $ = O.transforms;
            if (!Array.isArray($) || !$.length) return !1;
            var q = T[1];
            if (!L(q) || q >= $.length) return !1;
            F = (z = (l.transformsRegistry[$[q].type] || {}).attributes) && z[T[2]], V = 3;
          } else {
            var K = O._module;
            if (K || (K = (l.modules[O.type || i.type.dflt] || {})._module), !K) return !1;
            if (!(F = (z = K.attributes) && z[U])) {
              var re = K.basePlotModule;
              re && re.attributes && (F = re.attributes[U]);
            }
            F || (F = i[U]);
          }
          return D(F, T, V);
        }, s.getLayoutValObject = function(O, T) {
          var z = function(F, U) {
            var V, $, q, K, re = F._basePlotModules;
            if (re) {
              var Y;
              for (V = 0; V < re.length; V++) {
                if ((q = re[V]).attrRegex && q.attrRegex.test(U)) {
                  if (q.layoutAttrOverrides) return q.layoutAttrOverrides;
                  !Y && q.layoutAttributes && (Y = q.layoutAttributes);
                }
                var te = q.baseLayoutAttrOverrides;
                if (te && U in te) return te[U];
              }
              if (Y) return Y;
            }
            var ee = F._modules;
            if (ee) {
              for (V = 0; V < ee.length; V++) if ((K = ee[V].layoutAttributes) && U in K) return K[U];
            }
            for ($ in l.componentsRegistry) {
              if ((q = l.componentsRegistry[$]).name === "colorscale" && U.indexOf("coloraxis") === 0) return q.layoutAttributes[U];
              if (!q.schema && U === q.name) return q.layoutAttributes;
            }
            return U in h && h[U];
          }(O, T[0]);
          return D(z, T, 1);
        };
      }, 78032: function(o, s, n) {
        var l = n(34809), u = n(9829), i = "templateitemname", h = { name: { valType: "string", editType: "none" } };
        function p(d) {
          return d && typeof d == "string";
        }
        function _(d) {
          var f = d.length - 1;
          return d.charAt(f) !== "s" && l.warn("bad argument to arrayDefaultKey: " + d), d.substr(0, d.length - 1) + "defaults";
        }
        h[i] = { valType: "string", editType: "calc" }, s.templatedArray = function(d, f) {
          return f._isLinkedToArray = d, f.name = h.name, f[i] = h[i], f;
        }, s.traceTemplater = function(d) {
          var f, c, g = {};
          for (f in d) c = d[f], Array.isArray(c) && c.length && (g[f] = 0);
          return { newTrace: function(m) {
            var x = { type: f = l.coerce(m, {}, u, "type"), _template: null };
            if (f in g) {
              c = d[f];
              var w = g[f] % c.length;
              g[f]++, x._template = c[w];
            }
            return x;
          } };
        }, s.newContainer = function(d, f, c) {
          var g = d._template, m = g && (g[f] || c && g[c]);
          return l.isPlainObject(m) || (m = null), d[f] = { _template: m };
        }, s.arrayTemplater = function(d, f, c) {
          var g = d._template, m = g && g[_(f)], x = g && g[f];
          Array.isArray(x) && x.length || (x = []);
          var w = {};
          return { newItem: function(k) {
            var S = { name: k.name, _input: k }, A = S[i] = k[i];
            if (!p(A)) return S._template = m, S;
            for (var C = 0; C < x.length; C++) {
              var D = x[C];
              if (D.name === A) return w[A] = 1, S._template = D, S;
            }
            return S[c] = k[c] || !1, S._template = !1, S;
          }, defaultItems: function() {
            for (var k = [], S = 0; S < x.length; S++) {
              var A = x[S], C = A.name;
              if (p(C) && !w[C]) {
                var D = { _template: A, name: C, _input: { _templateitemname: C } };
                D[i] = A[i], k.push(D), w[C] = 1;
              }
            }
            return k;
          } };
        }, s.arrayDefaultKey = _, s.arrayEditor = function(d, f, c) {
          var g = (l.nestedProperty(d, f).get() || []).length, m = c._index, x = m >= g && (c._input || {})._templateitemname;
          x && (m = g);
          var w, k = f + "[" + m + "]";
          function S() {
            w = {}, x && (w[k] = {}, w[k][i] = x);
          }
          function A(D, L) {
            x ? l.nestedProperty(w[k], D).set(L) : w[k + "." + D] = L;
          }
          function C() {
            var D = w;
            return S(), D;
          }
          return S(), { modifyBase: function(D, L) {
            w[D] = L;
          }, modifyItem: A, getUpdateObj: C, applyUpdate: function(D, L) {
            D && A(D, L);
            var E = C();
            for (var P in E) l.nestedProperty(d, P).set(E[P]);
          } };
        };
      }, 71817: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(44122), h = n(34809), p = n(30635), _ = n(34823), d = n(78766), f = n(62203), c = n(17240), g = n(95433), m = n(29714), x = n(4530), w = n(84391), k = w.enforce, S = w.clean, A = n(32919).doAutoRange, C = "start", D = n(54826).zindexSeparator;
        function L(T, z, F) {
          for (var U = 0; U < F.length; U++) {
            var V = F[U][0], $ = F[U][1];
            if (!(V[0] >= T[1] || V[1] <= T[0]) && $[0] < z[1] && $[1] > z[0]) return !0;
          }
          return !1;
        }
        function E(T) {
          var z, F, U, V, $, q, K = T._fullLayout, re = K._size, Y = re.p, te = m.list(T, "", !0);
          if (K._paperdiv.style({ width: T._context.responsive && K.autosize && !T._context._hasZeroWidth && !T.layout.width ? "100%" : K.width + "px", height: T._context.responsive && K.autosize && !T._context._hasZeroHeight && !T.layout.height ? "100%" : K.height + "px" }).selectAll(".main-svg").call(f.setSize, K.width, K.height), T._context.setBackground(T, K.paper_bgcolor), s.drawMainTitle(T), g.manage(T), !K._has("cartesian")) return i.previousPromises(T);
          function ee(ft, _t, Pt) {
            var Dt = ft._lw / 2;
            return ft._id.charAt(0) === "x" ? _t ? Pt === "top" ? _t._offset - Y - Dt : _t._offset + _t._length + Y + Dt : re.t + re.h * (1 - (ft.position || 0)) + Dt % 1 : _t ? Pt === "right" ? _t._offset + _t._length + Y + Dt : _t._offset - Y - Dt : re.l + re.w * (ft.position || 0) + Dt % 1;
          }
          for (z = 0; z < te.length; z++) {
            var X = (V = te[z])._anchorAxis;
            V._linepositions = {}, V._lw = f.crispRound(T, V.linewidth, 1), V._mainLinePosition = ee(V, X, V.side), V._mainMirrorPosition = V.mirror && X ? ee(V, X, x.OPPOSITE_SIDE[V.side]) : null;
          }
          var Q = [], ue = [], ce = [], he = d.opacity(K.paper_bgcolor) === 1 && d.opacity(K.plot_bgcolor) === 1 && K.paper_bgcolor === K.plot_bgcolor;
          for (F in K._plots) if ((U = K._plots[F]).mainplot) U.bg && U.bg.remove(), U.bg = void 0;
          else {
            var de = U.xaxis.domain, ne = U.yaxis.domain, ae = U.plotgroup;
            if (L(de, ne, ce) && F.indexOf(D) === -1) {
              var se = ae.node(), me = U.bg = h.ensureSingle(ae, "rect", "bg");
              se.insertBefore(me.node(), se.childNodes[0]), ue.push(F);
            } else ae.select("rect.bg").remove(), ce.push([de, ne]), he || (Q.push(F), ue.push(F));
          }
          var ye, pe, be, Ae, Se, Me, De, Le, We, Ee, Ne, Ie, ge, Ce = K._bgLayer.selectAll(".bg").data(Q);
          for (Ce.enter().append("rect").classed("bg", !0), Ce.exit().remove(), Ce.each(function(ft) {
            K._plots[ft].bg = l.select(this);
          }), z = 0; z < ue.length; z++) U = K._plots[ue[z]], $ = U.xaxis, q = U.yaxis, U.bg && $._offset !== void 0 && q._offset !== void 0 && U.bg.call(f.setRect, $._offset - Y, q._offset - Y, $._length + 2 * Y, q._length + 2 * Y).call(d.fill, K.plot_bgcolor).style("stroke-width", 0);
          if (!K._hasOnlyLargeSploms) for (F in K._plots) {
            U = K._plots[F], $ = U.xaxis, q = U.yaxis;
            var we, Ge, Re = U.clipId = "clip" + K._uid + F + "plot", je = h.ensureSingleById(K._clips, "clipPath", Re, function(ft) {
              ft.classed("plotclip", !0).append("rect");
            });
            U.clipRect = je.select("rect").attr({ width: $._length, height: q._length }), f.setTranslate(U.plot, $._offset, q._offset), U._hasClipOnAxisFalse ? (we = null, Ge = Re) : (we = Re, Ge = null), f.setClipUrl(U.plot, we, T), U.layerClipId = Ge;
          }
          function Ke(ft) {
            return "M" + ye + "," + ft + "H" + pe;
          }
          function tt(ft) {
            return "M" + $._offset + "," + ft + "h" + $._length;
          }
          function _e(ft) {
            return "M" + ft + "," + Le + "V" + De;
          }
          function Be(ft) {
            return q._shift !== void 0 && (ft += q._shift), "M" + ft + "," + q._offset + "v" + q._length;
          }
          function $e(ft, _t, Pt) {
            if (!ft.showline || F !== ft._mainSubplot) return "";
            if (!ft._anchorAxis) return Pt(ft._mainLinePosition);
            var Dt = _t(ft._mainLinePosition);
            return ft.mirror && (Dt += _t(ft._mainMirrorPosition)), Dt;
          }
          for (F in K._plots) {
            U = K._plots[F], $ = U.xaxis, q = U.yaxis;
            var Ze = "M0,0";
            P($, F) && (Se = M($, "left", q, te), ye = $._offset - (Se ? Y + Se : 0), Me = M($, "right", q, te), pe = $._offset + $._length + (Me ? Y + Me : 0), be = ee($, q, "bottom"), Ae = ee($, q, "top"), !(ge = !$._anchorAxis || F !== $._mainSubplot) || $.mirror !== "allticks" && $.mirror !== "all" || ($._linepositions[F] = [be, Ae]), Ze = $e($, Ke, tt), ge && $.showline && ($.mirror === "all" || $.mirror === "allticks") && (Ze += Ke(be) + Ke(Ae)), U.xlines.style("stroke-width", $._lw + "px").call(d.stroke, $.showline ? $.linecolor : "rgba(0,0,0,0)")), U.xlines.attr("d", Ze);
            var ct = "M0,0";
            P(q, F) && (Ne = M(q, "bottom", $, te), De = q._offset + q._length + (Ne ? Y : 0), Ie = M(q, "top", $, te), Le = q._offset - (Ie ? Y : 0), We = ee(q, $, "left"), Ee = ee(q, $, "right"), !(ge = !q._anchorAxis || F !== q._mainSubplot) || q.mirror !== "allticks" && q.mirror !== "all" || (q._linepositions[F] = [We, Ee]), ct = $e(q, _e, Be), ge && q.showline && (q.mirror === "all" || q.mirror === "allticks") && (ct += _e(We) + _e(Ee)), U.ylines.style("stroke-width", q._lw + "px").call(d.stroke, q.showline ? q.linecolor : "rgba(0,0,0,0)")), U.ylines.attr("d", ct);
          }
          return m.makeClipPaths(T), i.previousPromises(T);
        }
        function P(T, z) {
          return (T.ticks || T.showline) && (z === T._mainSubplot || T.mirror === "all" || T.mirror === "allticks");
        }
        function I(T, z, F) {
          if (!F.showline || !F._lw) return !1;
          if (F.mirror === "all" || F.mirror === "allticks") return !0;
          var U = F._anchorAxis;
          if (!U) return !1;
          var V = x.FROM_BL[z];
          return F.side === z ? U.domain[V] === T.domain[V] : F.mirror && U.domain[1 - V] === T.domain[1 - V];
        }
        function M(T, z, F, U) {
          if (I(T, z, F)) return F._lw;
          for (var V = 0; V < U.length; V++) {
            var $ = U[V];
            if ($._mainAxis === F._mainAxis && I(T, z, $)) return $._lw;
          }
          return 0;
        }
        function O(T) {
          return T === "top" ? x.CAP_SHIFT + 0.3 + "em" : T === "bottom" ? "-0.3em" : x.MID_SHIFT + "em";
        }
        s.layoutStyles = function(T) {
          return h.syncOrAsync([i.doAutoMargin, E], T);
        }, s.drawMainTitle = function(T) {
          var z = T._fullLayout.title, F = T._fullLayout, U = function(ce) {
            var he = ce.title, de = "middle";
            return h.isRightAnchor(he) ? de = "end" : h.isLeftAnchor(he) && (de = C), de;
          }(F), V = function(ce) {
            var he = ce.title, de = "0em";
            return h.isTopAnchor(he) ? de = x.CAP_SHIFT + "em" : h.isMiddleAnchor(he) && (de = x.MID_SHIFT + "em"), de;
          }(F), $ = function(ce, he) {
            var de = ce.title, ne = ce._size, ae = 0;
            return he !== "0em" && he ? he === x.CAP_SHIFT + "em" && (ae = de.pad.t) : ae = -de.pad.b, de.y === "auto" ? ne.t / 2 : de.yref === "paper" ? ne.t + ne.h - ne.h * de.y + ae : ce.height - ce.height * de.y + ae;
          }(F, V), q = function(ce, he) {
            var de = ce.title, ne = ce._size, ae = 0;
            return he === C ? ae = de.pad.l : he === "end" && (ae = -de.pad.r), de.xref === "paper" ? ne.l + ne.w * de.x + ae : ce.width * de.x + ae;
          }(F, U);
          if (c.draw(T, "gtitle", { propContainer: F, propName: "title.text", subtitlePropName: "title.subtitle.text", placeholder: F._dfltTitle.plot, subtitlePlaceholder: F._dfltTitle.subtitle, attributes: { x: q, y: $, "text-anchor": U, dy: V } }), z.text && z.automargin) {
            var K = l.selectAll(".gtitle"), re = f.bBox(l.selectAll(".g-gtitle").node()).height, Y = function(ce, he, de) {
              var ne = he.y, ae = he.yanchor, se = ne > 0.5 ? "t" : "b", me = ce._fullLayout.margin[se], ye = 0;
              return he.yref === "paper" ? ye = de + he.pad.t + he.pad.b : he.yref === "container" && (ye = function(pe, be, Ae, Se, Me) {
                var De = 0;
                return Ae === "middle" && (De += Me / 2), pe === "t" ? (Ae === "top" && (De += Me), De += Se - be * Se) : (Ae === "bottom" && (De += Me), De += be * Se), De;
              }(se, ne, ae, ce._fullLayout.height, de) + he.pad.t + he.pad.b), ye > me ? ye : 0;
            }(T, z, re);
            if (Y > 0) {
              (function(ce, he, de, ne) {
                var ae = "title.automargin", se = ce._fullLayout.title, me = se.y > 0.5 ? "t" : "b", ye = { x: se.x, y: se.y, t: 0, b: 0 }, pe = {};
                se.yref === "paper" && function(be, Ae, Se, Me, De) {
                  var Le = Ae.yref === "paper" ? be._fullLayout._size.h : be._fullLayout.height, We = h.isTopAnchor(Ae) ? Me : Me - De, Ee = Se === "b" ? Le - We : We;
                  return !(h.isTopAnchor(Ae) && Se === "t" || h.isBottomAnchor(Ae) && Se === "b") && Ee < De;
                }(ce, se, me, he, ne) ? ye[me] = de : se.yref === "container" && (pe[me] = de, ce._fullLayout._reservedMargin[ae] = pe), i.allowAutoMargin(ce, ae), i.autoMargin(ce, ae, ye);
              })(T, $, Y, re), K.attr({ x: q, y: $, "text-anchor": U, dy: O(z.yanchor) }).call(p.positionText, q, $);
              var te = (z.text.match(p.BR_TAG_ALL) || []).length;
              if (te) {
                var ee = x.LINE_SPACING * te + x.MID_SHIFT;
                z.y === 0 && (ee = -ee), K.selectAll(".line").each(function() {
                  var ce = +this.getAttribute("dy").slice(0, -2) - ee + "em";
                  this.setAttribute("dy", ce);
                });
              }
              var X = l.selectAll(".gtitle-subtitle");
              if (X.node()) {
                var Q = K.node().getBBox(), ue = Q.y + Q.height + c.SUBTITLE_PADDING_EM * z.subtitle.font.size;
                X.attr({ x: q, y: ue, "text-anchor": U, dy: O(z.yanchor) }).call(p.positionText, q, ue);
              }
            }
          }
        }, s.doTraceStyle = function(T) {
          var z, F = T.calcdata, U = [];
          for (z = 0; z < F.length; z++) {
            var V = F[z], $ = V[0] || {}, q = $.trace || {}, K = q._module || {}, re = K.arraysToCalcdata;
            re && re(V, q);
            var Y = K.editStyle;
            Y && U.push({ fn: Y, cd0: $ });
          }
          if (U.length) {
            for (z = 0; z < U.length; z++) {
              var te = U[z];
              te.fn(T, te.cd0);
            }
            _(T), s.redrawReglTraces(T);
          }
          return i.style(T), u.getComponentMethod("legend", "draw")(T), i.previousPromises(T);
        }, s.doColorBars = function(T) {
          return u.getComponentMethod("colorbar", "draw")(T), i.previousPromises(T);
        }, s.layoutReplot = function(T) {
          var z = T.layout;
          return T.layout = void 0, u.call("_doPlot", T, "", z);
        }, s.doLegend = function(T) {
          return u.getComponentMethod("legend", "draw")(T), i.previousPromises(T);
        }, s.doTicksRelayout = function(T) {
          return m.draw(T, "redraw"), T._fullLayout._hasOnlyLargeSploms && (u.subplotsRegistry.splom.updateGrid(T), _(T), s.redrawReglTraces(T)), s.drawMainTitle(T), i.previousPromises(T);
        }, s.doModeBar = function(T) {
          var z = T._fullLayout;
          g.manage(T);
          for (var F = 0; F < z._basePlotModules.length; F++) {
            var U = z._basePlotModules[F].updateFx;
            U && U(T);
          }
          return i.previousPromises(T);
        }, s.doCamera = function(T) {
          for (var z = T._fullLayout, F = z._subplots.gl3d, U = 0; U < F.length; U++) {
            var V = z[F[U]];
            V._scene.setViewport(V);
          }
        }, s.drawData = function(T) {
          var z = T._fullLayout;
          _(T);
          for (var F = z._basePlotModules, U = 0; U < F.length; U++) F[U].plot(T);
          return s.redrawReglTraces(T), i.style(T), u.getComponentMethod("selections", "draw")(T), u.getComponentMethod("shapes", "draw")(T), u.getComponentMethod("annotations", "draw")(T), u.getComponentMethod("images", "draw")(T), z._replotting = !1, i.previousPromises(T);
        }, s.redrawReglTraces = function(T) {
          var z = T._fullLayout;
          if (z._has("regl")) {
            var F, U, V = T._fullData, $ = [], q = [];
            for (z._hasOnlyLargeSploms && z._splomGrid.draw(), F = 0; F < V.length; F++) {
              var K = V[F];
              K.visible === !0 && K._length !== 0 && (K.type === "splom" ? z._splomScenes[K.uid].draw() : K.type === "scattergl" ? h.pushUnique($, K.xaxis + K.yaxis) : K.type === "scatterpolargl" && h.pushUnique(q, K.subplot));
            }
            for (F = 0; F < $.length; F++) (U = z._plots[$[F]])._scene && U._scene.draw();
            for (F = 0; F < q.length; F++) (U = z[q[F]]._subplot)._scene && U._scene.draw();
          }
        }, s.doAutoRangeAndConstraints = function(T) {
          for (var z, F = m.list(T, "", !0), U = {}, V = 0; V < F.length; V++) if (!U[(z = F[V])._id]) {
            U[z._id] = 1, S(T, z), A(T, z);
            var $ = z._matchGroup;
            if ($) for (var q in $) {
              var K = m.getFromId(T, q);
              A(T, K, z.range), U[q] = 1;
            }
          }
          k(T);
        }, s.finalDraw = function(T) {
          u.getComponentMethod("rangeslider", "draw")(T), u.getComponentMethod("rangeselector", "draw")(T);
        }, s.drawMarginPushers = function(T) {
          u.getComponentMethod("legend", "draw")(T), u.getComponentMethod("rangeselector", "draw")(T), u.getComponentMethod("sliders", "draw")(T), u.getComponentMethod("updatemenus", "draw")(T), u.getComponentMethod("colorbar", "draw")(T);
        };
      }, 53853: function(o, s, n) {
        var l = n(34809), u = l.isPlainObject, i = n(57297), h = n(44122), p = n(9829), _ = n(78032), d = n(24452).dfltConfig;
        function f(A, C) {
          A = l.extendDeep({}, A);
          var D, L, E = Object.keys(A).sort();
          function P(z, F, U) {
            if (u(F) && u(z)) f(z, F);
            else if (Array.isArray(F) && Array.isArray(z)) {
              var V = _.arrayTemplater({ _template: A }, U);
              for (L = 0; L < F.length; L++) {
                var $ = F[L], q = V.newItem($)._template;
                q && f(q, $);
              }
              var K = V.defaultItems();
              for (L = 0; L < K.length; L++) F.push(K[L]._template);
              for (L = 0; L < F.length; L++) delete F[L].templateitemname;
            }
          }
          for (D = 0; D < E.length; D++) {
            var I = E[D], M = A[I];
            if (I in C ? P(M, C[I], I) : C[I] = M, c(I) === I) for (var O in C) {
              var T = c(O);
              O === T || T !== I || O in A || P(M, C[O], I);
            }
          }
        }
        function c(A) {
          return A.replace(/[0-9]+$/, "");
        }
        function g(A, C, D, L, E) {
          var P = E && D(E);
          for (var I in A) {
            var M = A[I], O = w(A, I, L), T = w(A, I, E), z = D(T);
            if (!z) {
              var F = c(I);
              F !== I && (z = D(T = w(A, F, E)));
            }
            if (!(P && P === z || !z || z._noTemplating || z.valType === "data_array" || z.arrayOk && Array.isArray(M))) if (!z.valType && u(M)) g(M, C, D, O, T);
            else if (z._isLinkedToArray && Array.isArray(M)) for (var U = !1, V = 0, $ = {}, q = 0; q < M.length; q++) {
              var K = M[q];
              if (u(K)) {
                var re = K.name;
                if (re) $[re] || (g(K, C, D, w(M, V, O), w(M, V, T)), V++, $[re] = 1);
                else if (!U) {
                  var Y = w(A, _.arrayDefaultKey(I), L), te = w(M, V, O);
                  g(K, C, D, te, w(M, V, T));
                  var ee = l.nestedProperty(C, te);
                  l.nestedProperty(C, Y).set(ee.get()), ee.set(null), U = !0;
                }
              }
            }
            else l.nestedProperty(C, O).set(M);
          }
        }
        function m(A, C) {
          return i.getLayoutValObject(A, l.nestedProperty({}, C).parts);
        }
        function x(A, C) {
          return i.getTraceValObject(A, l.nestedProperty({}, C).parts);
        }
        function w(A, C, D) {
          return D ? Array.isArray(A) ? D + "[" + C + "]" : D + "." + C : C;
        }
        function k(A) {
          for (var C = 0; C < A.length; C++) if (u(A[C])) return !0;
        }
        function S(A) {
          var C;
          switch (A.code) {
            case "data":
              C = "The template has no key data.";
              break;
            case "layout":
              C = "The template has no key layout.";
              break;
            case "missing":
              C = A.path ? "There are no templates for item " + A.path + " with name " + A.templateitemname : "There are no templates for trace " + A.index + ", of type " + A.traceType + ".";
              break;
            case "unused":
              C = A.path ? "The template item at " + A.path + " was not used in constructing the plot." : A.dataCount ? "Some of the templates of type " + A.traceType + " were not used. The template has " + A.templateCount + " traces, the data only has " + A.dataCount + " of this type." : "The template has " + A.templateCount + " traces of type " + A.traceType + " but there are none in the data.";
              break;
            case "reused":
              C = "Some of the templates of type " + A.traceType + " were used more than once. The template has " + A.templateCount + " traces, the data has " + A.dataCount + " of this type.";
          }
          return A.msg = C, A;
        }
        s.makeTemplate = function(A) {
          A = l.isPlainObject(A) ? A : l.getGraphDiv(A), A = l.extendDeep({ _context: d }, { data: A.data, layout: A.layout }), h.supplyDefaults(A);
          var C = A.data || [], D = A.layout || {};
          D._basePlotModules = A._fullLayout._basePlotModules, D._modules = A._fullLayout._modules;
          var L = { data: {}, layout: {} };
          C.forEach(function(V) {
            var $ = {};
            g(V, $, x.bind(null, V));
            var q = l.coerce(V, {}, p, "type"), K = L.data[q];
            K || (K = L.data[q] = []), K.push($);
          }), g(D, L.layout, m.bind(null, D)), delete L.layout.template;
          var E = D.template;
          if (u(E)) {
            var P, I, M, O, T, z, F = E.layout;
            u(F) && f(F, L.layout);
            var U = E.data;
            if (u(U)) {
              for (I in L.data) if (M = U[I], Array.isArray(M)) {
                for (z = (T = L.data[I]).length, O = M.length, P = 0; P < z; P++) f(M[P % O], T[P]);
                for (P = z; P < O; P++) T.push(l.extendDeep({}, M[P]));
              }
              for (I in U) I in L.data || (L.data[I] = l.extendDeep([], U[I]));
            }
          }
          return L;
        }, s.validateTemplate = function(A, C) {
          var D = l.extendDeep({}, { _context: d, data: A.data, layout: A.layout }), L = D.layout || {};
          u(C) || (C = L.template || {});
          var E = C.layout, P = C.data, I = [];
          D.layout = L, D.layout.template = C, h.supplyDefaults(D);
          var M = D._fullLayout, O = D._fullData, T = {};
          if (u(E) ? (function K(re, Y) {
            for (var te in re) if (te.charAt(0) !== "_" && u(re[te])) {
              var ee, X = c(te), Q = [];
              for (ee = 0; ee < Y.length; ee++) Q.push(w(re, te, Y[ee])), X !== te && Q.push(w(re, X, Y[ee]));
              for (ee = 0; ee < Q.length; ee++) T[Q[ee]] = 1;
              K(re[te], Q);
            }
          }(M, ["layout"]), function K(re, Y) {
            for (var te in re) if (te.indexOf("defaults") === -1 && u(re[te])) {
              var ee = w(re, te, Y);
              T[ee] ? K(re[te], ee) : I.push({ code: "unused", path: ee });
            }
          }(E, "layout")) : I.push({ code: "layout" }), u(P)) {
            for (var z, F = {}, U = 0; U < O.length; U++) {
              var V = O[U];
              F[z = V.type] = (F[z] || 0) + 1, V._fullInput._template || I.push({ code: "missing", index: V._fullInput.index, traceType: z });
            }
            for (z in P) {
              var $ = P[z].length, q = F[z] || 0;
              $ > q ? I.push({ code: "unused", traceType: z, templateCount: $, dataCount: q }) : q > $ && I.push({ code: "reused", traceType: z, templateCount: $, dataCount: q });
            }
          } else I.push({ code: "data" });
          if (function K(re, Y) {
            for (var te in re) if (te.charAt(0) !== "_") {
              var ee = re[te], X = w(re, te, Y);
              u(ee) ? (Array.isArray(re) && ee._template === !1 && ee.templateitemname && I.push({ code: "missing", path: X, templateitemname: ee.templateitemname }), K(ee, X)) : Array.isArray(ee) && k(ee) && K(ee, X);
            }
          }({ data: O, layout: M }, ""), I.length) return I.map(S);
        };
      }, 80491: function(o, s, n) {
        var l = n(10721), u = n(31420), i = n(44122), h = n(34809), p = n(84619), _ = n(6243), d = n(72914), f = n(29697).version, c = { format: { valType: "enumerated", values: ["png", "jpeg", "webp", "svg", "full-json"], dflt: "png" }, width: { valType: "number", min: 1 }, height: { valType: "number", min: 1 }, scale: { valType: "number", min: 0, dflt: 1 }, setBackground: { valType: "any", dflt: !1 }, imageDataOnly: { valType: "boolean", dflt: !1 } };
        o.exports = function(g, m) {
          var x, w, k, S;
          function A(q) {
            return !(q in m) || h.validate(m[q], c[q]);
          }
          if (m = m || {}, h.isPlainObject(g) ? (x = g.data || [], w = g.layout || {}, k = g.config || {}, S = {}) : (g = h.getGraphDiv(g), x = h.extendDeep([], g.data), w = h.extendDeep({}, g.layout), k = g._context, S = g._fullLayout || {}), !A("width") && m.width !== null || !A("height") && m.height !== null) throw new Error("Height and width should be pixel values.");
          if (!A("format")) throw new Error("Export format is not " + h.join2(c.format.values, ", ", " or ") + ".");
          var C = {};
          function D(q, K) {
            return h.coerce(m, C, c, q, K);
          }
          var L = D("format"), E = D("width"), P = D("height"), I = D("scale"), M = D("setBackground"), O = D("imageDataOnly"), T = document.createElement("div");
          T.style.position = "absolute", T.style.left = "-5000px", document.body.appendChild(T);
          var z = h.extendFlat({}, w);
          E ? z.width = E : m.width === null && l(S.width) && (z.width = S.width), P ? z.height = P : m.height === null && l(S.height) && (z.height = S.height);
          var F = h.extendFlat({}, k, { _exportedPlot: !0, staticPlot: !0, setBackground: M }), U = p.getRedrawFunc(T);
          function V() {
            return new Promise(function(q) {
              setTimeout(q, p.getDelay(T._fullLayout));
            });
          }
          function $() {
            return new Promise(function(q, K) {
              var re = _(T, L, I), Y = T._fullLayout.width, te = T._fullLayout.height;
              function ee() {
                u.purge(T), document.body.removeChild(T);
              }
              if (L === "full-json") {
                var X = i.graphJson(T, !1, "keepdata", "object", !0, !0);
                return X.version = f, X = JSON.stringify(X), ee(), q(O ? X : p.encodeJSON(X));
              }
              if (ee(), L === "svg") return q(O ? re : p.encodeSVG(re));
              var Q = document.createElement("canvas");
              Q.id = h.randstr(), d({ format: L, width: Y, height: te, scale: I, canvas: Q, svg: re, promise: !0 }).then(q).catch(K);
            });
          }
          return new Promise(function(q, K) {
            u.newPlot(T, x, z, F).then(U).then(V).then($).then(function(re) {
              q(function(Y) {
                return O ? Y.replace(p.IMAGE_URL_PREFIX, "") : Y;
              }(re));
            }).catch(function(re) {
              K(re);
            });
          });
        };
      }, 2466: function(o, s, n) {
        var l = n(34809), u = n(44122), i = n(57297), h = n(24452).dfltConfig, p = l.isPlainObject, _ = Array.isArray, d = l.isArrayOrTypedArray;
        function f(A, C, D, L, E, P) {
          P = P || [];
          for (var I = Object.keys(A), M = 0; M < I.length; M++) {
            var O = I[M];
            if (O !== "transforms") {
              var T = P.slice();
              T.push(O);
              var z = A[O], F = C[O], U = w(D, O), V = (U || {}).valType, $ = V === "info_array", q = V === "colorscale", K = (U || {}).items;
              if (x(D, O)) if (p(z) && p(F) && V !== "any") f(z, F, U, L, E, T);
              else if ($ && _(z)) {
                z.length > F.length && L.push(m("unused", E, T.concat(F.length)));
                var re, Y, te, ee, X, Q = F.length, ue = Array.isArray(K);
                if (ue && (Q = Math.min(Q, K.length)), U.dimensions === 2) for (Y = 0; Y < Q; Y++) if (_(z[Y])) {
                  z[Y].length > F[Y].length && L.push(m("unused", E, T.concat(Y, F[Y].length)));
                  var ce = F[Y].length;
                  for (re = 0; re < (ue ? Math.min(ce, K[Y].length) : ce); re++) te = ue ? K[Y][re] : K, ee = z[Y][re], X = F[Y][re], l.validate(ee, te) ? X !== ee && X !== +ee && L.push(m("dynamic", E, T.concat(Y, re), ee, X)) : L.push(m("value", E, T.concat(Y, re), ee));
                } else L.push(m("array", E, T.concat(Y), z[Y]));
                else for (Y = 0; Y < Q; Y++) te = ue ? K[Y] : K, ee = z[Y], X = F[Y], l.validate(ee, te) ? X !== ee && X !== +ee && L.push(m("dynamic", E, T.concat(Y), ee, X)) : L.push(m("value", E, T.concat(Y), ee));
              } else if (U.items && !$ && _(z)) {
                var he, de, ne = K[Object.keys(K)[0]], ae = [];
                for (he = 0; he < F.length; he++) {
                  var se = F[he]._index || he;
                  if ((de = T.slice()).push(se), p(z[se]) && p(F[he])) {
                    ae.push(se);
                    var me = z[se], ye = F[he];
                    p(me) && me.visible !== !1 && ye.visible === !1 ? L.push(m("invisible", E, de)) : f(me, ye, ne, L, E, de);
                  }
                }
                for (he = 0; he < z.length; he++) (de = T.slice()).push(he), p(z[he]) ? ae.indexOf(he) === -1 && L.push(m("unused", E, de)) : L.push(m("object", E, de, z[he]));
              } else !p(z) && p(F) ? L.push(m("object", E, T, z)) : d(z) || !d(F) || $ || q ? O in C ? l.validate(z, U) ? U.valType === "enumerated" && (U.coerceNumber && z !== +F || z !== F) && L.push(m("dynamic", E, T, z, F)) : L.push(m("value", E, T, z)) : L.push(m("unused", E, T, z)) : L.push(m("array", E, T, z));
              else L.push(m("schema", E, T));
            }
          }
          return L;
        }
        o.exports = function(A, C) {
          A === void 0 && (A = []), C === void 0 && (C = {});
          var D, L, E = i.get(), P = [], I = { _context: l.extendFlat({}, h) };
          _(A) ? (I.data = l.extendDeep([], A), D = A) : (I.data = [], D = [], P.push(m("array", "data"))), p(C) ? (I.layout = l.extendDeep({}, C), L = C) : (I.layout = {}, L = {}, arguments.length > 1 && P.push(m("object", "layout"))), u.supplyDefaults(I);
          for (var M = I._fullData, O = D.length, T = 0; T < O; T++) {
            var z = D[T], F = ["data", T];
            if (p(z)) {
              var U = M[T], V = U.type, $ = E.traces[V].attributes;
              $.type = { valType: "enumerated", values: [V] }, U.visible === !1 && z.visible !== !1 && P.push(m("invisible", F)), f(z, U, $, P, F);
              var q = z.transforms, K = U.transforms;
              if (q) {
                _(q) || P.push(m("array", F, ["transforms"])), F.push("transforms");
                for (var re = 0; re < q.length; re++) {
                  var Y = ["transforms", re], te = q[re].type;
                  if (p(q[re])) {
                    var ee = E.transforms[te] ? E.transforms[te].attributes : {};
                    ee.type = { valType: "enumerated", values: Object.keys(E.transforms) }, f(q[re], K[re], ee, P, F, Y);
                  } else P.push(m("object", F, Y));
                }
              }
            } else P.push(m("object", F));
          }
          var X = I._fullLayout, Q = function(ue, ce) {
            for (var he = ue.layout.layoutAttributes, de = 0; de < ce.length; de++) {
              var ne = ce[de], ae = ue.traces[ne.type], se = ae.layoutAttributes;
              se && (ne.subplot ? l.extendFlat(he[ae.attributes.subplot.dflt], se) : l.extendFlat(he, se));
            }
            return he;
          }(E, M);
          return f(L, X, Q, P, "layout"), P.length === 0 ? void 0 : P;
        };
        var c = { object: function(A, C) {
          return (A === "layout" && C === "" ? "The layout argument" : A[0] === "data" && C === "" ? "Trace " + A[1] + " in the data argument" : g(A) + "key " + C) + " must be linked to an object container";
        }, array: function(A, C) {
          return (A === "data" ? "The data argument" : g(A) + "key " + C) + " must be linked to an array container";
        }, schema: function(A, C) {
          return g(A) + "key " + C + " is not part of the schema";
        }, unused: function(A, C, D) {
          var L = p(D) ? "container" : "key";
          return g(A) + L + " " + C + " did not get coerced";
        }, dynamic: function(A, C, D, L) {
          return [g(A) + "key", C, "(set to '" + D + "')", "got reset to", "'" + L + "'", "during defaults."].join(" ");
        }, invisible: function(A, C) {
          return (C ? g(A) + "item " + C : "Trace " + A[1]) + " got defaulted to be not visible";
        }, value: function(A, C, D) {
          return [g(A) + "key " + C, "is set to an invalid value (" + D + ")"].join(" ");
        } };
        function g(A) {
          return _(A) ? "In data trace " + A[1] + ", " : "In " + A + ", ";
        }
        function m(A, C, D, L, E) {
          var P, I;
          D = D || "", _(C) ? (P = C[0], I = C[1]) : (P = C, I = null);
          var M = function(T) {
            if (!_(T)) return String(T);
            for (var z = "", F = 0; F < T.length; F++) {
              var U = T[F];
              typeof U == "number" ? z = z.substr(0, z.length - 1) + "[" + U + "]" : z += U, F < T.length - 1 && (z += ".");
            }
            return z;
          }(D), O = c[A](C, M, L, E);
          return l.log(O), { code: A, container: P, trace: I, path: D, astr: M, msg: O };
        }
        function x(A, C) {
          var D = S(C), L = D.keyMinusId, E = D.id;
          return !!(L in A && A[L]._isSubplotObj && E) || C in A;
        }
        function w(A, C) {
          return C in A ? A[C] : A[S(C).keyMinusId];
        }
        var k = l.counterRegex("([a-z]+)");
        function S(A) {
          var C = A.match(k);
          return { keyMinusId: C && C[1], id: C && C[2] };
        }
      }, 49722: function(o) {
        o.exports = { mode: { valType: "enumerated", dflt: "afterall", values: ["immediate", "next", "afterall"] }, direction: { valType: "enumerated", values: ["forward", "reverse"], dflt: "forward" }, fromcurrent: { valType: "boolean", dflt: !1 }, frame: { duration: { valType: "number", min: 0, dflt: 500 }, redraw: { valType: "boolean", dflt: !0 } }, transition: { duration: { valType: "number", min: 0, dflt: 500, editType: "none" }, easing: { valType: "enumerated", dflt: "cubic-in-out", values: ["linear", "quad", "cubic", "sin", "exp", "circle", "elastic", "back", "bounce", "linear-in", "quad-in", "cubic-in", "sin-in", "exp-in", "circle-in", "elastic-in", "back-in", "bounce-in", "linear-out", "quad-out", "cubic-out", "sin-out", "exp-out", "circle-out", "elastic-out", "back-out", "bounce-out", "linear-in-out", "quad-in-out", "cubic-in-out", "sin-in-out", "exp-in-out", "circle-in-out", "elastic-in-out", "back-in-out", "bounce-in-out"], editType: "none" }, ordering: { valType: "enumerated", values: ["layout first", "traces first"], dflt: "layout first", editType: "none" } } };
      }, 59008: function(o, s, n) {
        var l = n(34809), u = n(78032);
        o.exports = function(i, h, p) {
          var _, d, f = p.name, c = p.inclusionAttr || "visible", g = h[f], m = l.isArrayOrTypedArray(i[f]) ? i[f] : [], x = h[f] = [], w = u.arrayTemplater(h, f, c);
          for (_ = 0; _ < m.length; _++) {
            var k = m[_];
            l.isPlainObject(k) ? d = w.newItem(k) : (d = w.newItem({}))[c] = !1, d._index = _, d[c] !== !1 && p.handleItemDefaults(k, d, h, p), x.push(d);
          }
          var S = w.defaultItems();
          for (_ = 0; _ < S.length; _++) (d = S[_])._index = x.length, p.handleItemDefaults({}, d, h, p, {}), x.push(d);
          if (l.isArrayOrTypedArray(g)) {
            var A = Math.min(g.length, x.length);
            for (_ = 0; _ < A; _++) l.relinkPrivateKeys(x[_], g[_]);
          }
          return x;
        };
      }, 9829: function(o, s, n) {
        var l = n(80337), u = n(70192);
        o.exports = { type: { valType: "enumerated", values: [], dflt: "scatter", editType: "calc+clearAxisTypes", _noTemplating: !0 }, visible: { valType: "enumerated", values: [!0, !1, "legendonly"], dflt: !0, editType: "calc" }, showlegend: { valType: "boolean", dflt: !0, editType: "style" }, legend: { valType: "subplotid", dflt: "legend", editType: "style" }, legendgroup: { valType: "string", dflt: "", editType: "style" }, legendgrouptitle: { text: { valType: "string", dflt: "", editType: "style" }, font: l({ editType: "style" }), editType: "style" }, legendrank: { valType: "number", dflt: 1e3, editType: "style" }, legendwidth: { valType: "number", min: 0, editType: "style" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, editType: "style" }, name: { valType: "string", editType: "style" }, uid: { valType: "string", editType: "plot", anim: !0 }, ids: { valType: "data_array", editType: "calc", anim: !0 }, customdata: { valType: "data_array", editType: "calc" }, meta: { valType: "any", arrayOk: !0, editType: "plot" }, selectedpoints: { valType: "any", editType: "calc" }, hoverinfo: { valType: "flaglist", flags: ["x", "y", "z", "text", "name"], extras: ["all", "none", "skip"], arrayOk: !0, dflt: "all", editType: "none" }, hoverlabel: u.hoverlabel, stream: { token: { valType: "string", noBlank: !0, strict: !0, editType: "calc" }, maxpoints: { valType: "number", min: 0, max: 1e4, dflt: 500, editType: "calc" }, editType: "calc" }, transforms: { _isLinkedToArray: "transform", editType: "calc" }, uirevision: { valType: "any", editType: "none" } };
      }, 40528: function(o, s, n) {
        var l = n(10721), u = n(34809), i = u.dateTime2ms, h = u.incrementMonth, p = n(63821).ONEAVGMONTH;
        o.exports = function(_, d, f, c) {
          if (d.type !== "date") return { vals: c };
          var g = _[f + "periodalignment"];
          if (!g) return { vals: c };
          var m, x = _[f + "period"];
          if (l(x)) {
            if ((x = +x) <= 0) return { vals: c };
          } else if (typeof x == "string" && x.charAt(0) === "M") {
            var w = +x.substring(1);
            if (!(w > 0 && Math.round(w) === w)) return { vals: c };
            m = w;
          }
          for (var k = d.calendar, S = g === "start", A = g === "end", C = _[f + "period0"], D = i(C, k) || 0, L = [], E = [], P = [], I = c.length, M = 0; M < I; M++) {
            var O, T, z, F = c[M];
            if (m) {
              for (O = Math.round((F - D) / (m * p)), z = h(D, m * O, k); z > F; ) z = h(z, -m, k);
              for (; z <= F; ) z = h(z, m, k);
              T = h(z, -m, k);
            } else {
              for (z = D + (O = Math.round((F - D) / x)) * x; z > F; ) z -= x;
              for (; z <= F; ) z += x;
              T = z - x;
            }
            L[M] = S ? T : A ? z : (T + z) / 2, E[M] = T, P[M] = z;
          }
          return { vals: L, starts: E, ends: P };
        };
      }, 55126: function(o) {
        o.exports = { xaxis: { valType: "subplotid", dflt: "x", editType: "calc+clearAxisTypes" }, yaxis: { valType: "subplotid", dflt: "y", editType: "calc+clearAxisTypes" } };
      }, 32919: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(34809), h = n(63821).FP_SAFE, p = n(33626), _ = n(62203), d = n(5975), f = d.getFromId, c = d.isLinked;
        function g(M, O) {
          var T, z, F = [], U = M._fullLayout, V = x(U, O, 0), $ = x(U, O, 1), q = k(M, O), K = q.min, re = q.max;
          if (K.length === 0 || re.length === 0) return i.simpleMap(O.range, O.r2l);
          var Y = K[0].val, te = re[0].val;
          for (T = 1; T < K.length && Y === te; T++) Y = Math.min(Y, K[T].val);
          for (T = 1; T < re.length && Y === te; T++) te = Math.max(te, re[T].val);
          var ee = O.autorange, X = ee === "reversed" || ee === "min reversed" || ee === "max reversed";
          if (!X && O.range) {
            var Q = i.simpleMap(O.range, O.r2l);
            X = Q[1] < Q[0];
          }
          O.autorange === "reversed" && (O.autorange = !0);
          var ue, ce, he, de, ne, ae, se = O.rangemode, me = se === "tozero", ye = se === "nonnegative", pe = O._length, be = pe / 10, Ae = 0;
          for (T = 0; T < K.length; T++) for (ue = K[T], z = 0; z < re.length; z++) (ae = (ce = re[z]).val - ue.val - m(O, ue.val, ce.val)) > 0 && ((ne = pe - V(ue) - $(ce)) > be ? ae / ne > Ae && (he = ue, de = ce, Ae = ae / ne) : ae / pe > Ae && (he = { val: ue.val, nopad: 1 }, de = { val: ce.val, nopad: 1 }, Ae = ae / pe));
          if (Y === te) {
            var Se = Y - 1, Me = Y + 1;
            if (me) if (Y === 0) F = [0, 1];
            else {
              var De = (Y > 0 ? re : K).reduce(function(We, Ee) {
                return Math.max(We, $(Ee));
              }, 0), Le = Y / (1 - Math.min(0.5, De / pe));
              F = Y > 0 ? [0, Le] : [Le, 0];
            }
            else F = ye ? [Math.max(0, Se), Math.max(1, Me)] : [Se, Me];
          } else me ? (he.val >= 0 && (he = { val: 0, nopad: 1 }), de.val <= 0 && (de = { val: 0, nopad: 1 })) : ye && (he.val - Ae * V(he) < 0 && (he = { val: 0, nopad: 1 }), de.val <= 0 && (de = { val: 1, nopad: 1 })), Ae = (de.val - he.val - m(O, ue.val, ce.val)) / (pe - V(he) - $(de)), F = [he.val - Ae * V(he), de.val + Ae * $(de)];
          return F = I(F, O), O.limitRange && O.limitRange(), X && F.reverse(), i.simpleMap(F, O.l2r || Number);
        }
        function m(M, O, T) {
          var z = 0;
          if (M.rangebreaks) for (var F = M.locateBreaks(O, T), U = 0; U < F.length; U++) {
            var V = F[U];
            z += V.max - V.min;
          }
          return z;
        }
        function x(M, O, T) {
          var z = 0.05 * O._length, F = O._anchorAxis || {};
          if ((O.ticklabelposition || "").indexOf("inside") !== -1 || (F.ticklabelposition || "").indexOf("inside") !== -1) {
            var U = O.isReversed();
            if (!U) {
              var V = i.simpleMap(O.range, O.r2l);
              U = V[1] < V[0];
            }
            U && (T = !T);
          }
          var $ = 0;
          return c(M, O._id) || ($ = function(q, K, re) {
            var Y = 0, te = K._id.charAt(0) === "x";
            for (var ee in q._plots) {
              var X = q._plots[ee];
              if (K._id === X.xaxis._id || K._id === X.yaxis._id) {
                var Q = (te ? X.yaxis : X.xaxis) || {};
                if ((Q.ticklabelposition || "").indexOf("inside") !== -1 && (!re && (Q.side === "left" || Q.side === "bottom") || re && (Q.side === "top" || Q.side === "right"))) {
                  if (Q._vals) {
                    var ue = i.deg2rad(Q._tickAngles[Q._id + "tick"] || 0), ce = Math.abs(Math.cos(ue)), he = Math.abs(Math.sin(ue));
                    if (!Q._vals[0].bb) {
                      var de = Q._id + "tick";
                      Q._selections[de].each(function(ye) {
                        var pe = l.select(this);
                        pe.select(".text-math-group").empty() && (ye.bb = _.bBox(pe.node()));
                      });
                    }
                    for (var ne = 0; ne < Q._vals.length; ne++) {
                      var ae = Q._vals[ne].bb;
                      if (ae) {
                        var se = 2 * w + ae.width, me = 2 * w + ae.height;
                        Y = Math.max(Y, te ? Math.max(se * ce, me * he) : Math.max(me * ce, se * he));
                      }
                    }
                  }
                  Q.ticks === "inside" && Q.ticklabelposition === "inside" && (Y += Q.ticklen || 0);
                }
              }
            }
            return Y;
          }(M, O, T)), z = Math.max($, z), O.constrain === "domain" && O._inputDomain && (z *= (O._inputDomain[1] - O._inputDomain[0]) / (O.domain[1] - O.domain[0])), function(q) {
            return q.nopad ? 0 : q.pad + (q.extrapad ? z : $);
          };
        }
        o.exports = { applyAutorangeOptions: I, getAutoRange: g, makePadFn: x, doAutoRange: function(M, O, T) {
          if (O.setScale(), O.autorange) {
            O.range = T ? T.slice() : g(M, O), O._r = O.range.slice(), O._rl = i.simpleMap(O._r, O.r2l);
            var z = O._input, F = {};
            F[O._attr + ".range"] = O.range, F[O._attr + ".autorange"] = O.autorange, p.call("_storeDirectGUIEdit", M.layout, M._fullLayout._preGUI, F), z.range = O.range.slice(), z.autorange = O.autorange;
          }
          var U = O._anchorAxis;
          if (U && U.rangeslider) {
            var V = U.rangeslider[O._name];
            V && V.rangemode === "auto" && (V.range = g(M, O)), U._input.rangeslider[O._name] = i.extendFlat({}, V);
          }
        }, findExtremes: function(M, O, T) {
          T || (T = {}), M._m || M.setScale();
          var z, F, U, V, $, q, K, re, Y, te = [], ee = [], X = O.length, Q = T.padded || !1, ue = T.tozero && (M.type === "linear" || M.type === "-"), ce = M.type === "log", he = !1, de = T.vpadLinearized || !1;
          function ne(Se) {
            if (Array.isArray(Se)) return he = !0, function(De) {
              return Math.max(Number(Se[De] || 0), 0);
            };
            var Me = Math.max(Number(Se || 0), 0);
            return function() {
              return Me;
            };
          }
          var ae = ne((M._m > 0 ? T.ppadplus : T.ppadminus) || T.ppad || 0), se = ne((M._m > 0 ? T.ppadminus : T.ppadplus) || T.ppad || 0), me = ne(T.vpadplus || T.vpad), ye = ne(T.vpadminus || T.vpad);
          if (!he) {
            if (re = 1 / 0, Y = -1 / 0, ce) for (z = 0; z < X; z++) (F = O[z]) < re && F > 0 && (re = F), F > Y && F < h && (Y = F);
            else for (z = 0; z < X; z++) (F = O[z]) < re && F > -h && (re = F), F > Y && F < h && (Y = F);
            O = [re, Y], X = 2;
          }
          var pe = { tozero: ue, extrapad: Q };
          function be(Se) {
            U = O[Se], u(U) && (q = ae(Se), K = se(Se), de ? (V = M.c2l(U) - ye(Se), $ = M.c2l(U) + me(Se)) : (re = U - ye(Se), Y = U + me(Se), ce && re < Y / 10 && (re = Y / 10), V = M.c2l(re), $ = M.c2l(Y)), ue && (V = Math.min(0, V), $ = Math.max(0, $)), D(V) && S(te, V, K, pe), D($) && A(ee, $, q, pe));
          }
          var Ae = Math.min(6, X);
          for (z = 0; z < Ae; z++) be(z);
          for (z = X - 1; z >= Ae; z--) be(z);
          return { min: te, max: ee, opts: T };
        }, concatExtremes: k };
        var w = 3;
        function k(M, O, T) {
          var z, F, U, V = O._id, $ = M._fullData, q = M._fullLayout, K = [], re = [];
          function Y(ue, ce) {
            for (z = 0; z < ce.length; z++) {
              var he = ue[ce[z]], de = (he._extremes || {})[V];
              if (he.visible === !0 && de) {
                for (F = 0; F < de.min.length; F++) U = de.min[F], S(K, U.val, U.pad, { extrapad: U.extrapad });
                for (F = 0; F < de.max.length; F++) U = de.max[F], A(re, U.val, U.pad, { extrapad: U.extrapad });
              }
            }
          }
          if (Y($, O._traceIndices), Y(q.annotations || [], O._annIndices || []), Y(q.shapes || [], O._shapeIndices || []), O._matchGroup && !T) {
            for (var te in O._matchGroup) if (te !== O._id) {
              var ee = f(M, te), X = k(M, ee, !0), Q = O._length / ee._length;
              for (F = 0; F < X.min.length; F++) U = X.min[F], S(K, U.val, U.pad * Q, { extrapad: U.extrapad });
              for (F = 0; F < X.max.length; F++) U = X.max[F], A(re, U.val, U.pad * Q, { extrapad: U.extrapad });
            }
          }
          return { min: K, max: re };
        }
        function S(M, O, T, z) {
          C(M, O, T, z, L);
        }
        function A(M, O, T, z) {
          C(M, O, T, z, E);
        }
        function C(M, O, T, z, F) {
          for (var U = z.tozero, V = z.extrapad, $ = !0, q = 0; q < M.length && $; q++) {
            var K = M[q];
            if (F(K.val, O) && K.pad >= T && (K.extrapad || !V)) {
              $ = !1;
              break;
            }
            F(O, K.val) && K.pad <= T && (V || !K.extrapad) && (M.splice(q, 1), q--);
          }
          if ($) {
            var re = U && O === 0;
            M.push({ val: O, pad: re ? 0 : T, extrapad: !re && V });
          }
        }
        function D(M) {
          return u(M) && Math.abs(M) < h;
        }
        function L(M, O) {
          return M <= O;
        }
        function E(M, O) {
          return M >= O;
        }
        function P(M, O, T) {
          return O === void 0 || T === void 0 || (O = M.d2l(O)) < M.d2l(T);
        }
        function I(M, O) {
          if (!O || !O.autorangeoptions) return M;
          var T = M[0], z = M[1], F = O.autorangeoptions.include;
          if (F !== void 0) {
            var U = O.d2l(T), V = O.d2l(z);
            i.isArrayOrTypedArray(F) || (F = [F]);
            for (var $ = 0; $ < F.length; $++) {
              var q = O.d2l(F[$]);
              U >= q && (U = q, T = q), V <= q && (V = q, z = q);
            }
          }
          return T = function(K, re) {
            var Y = re.autorangeoptions;
            return Y && Y.minallowed !== void 0 && P(re, Y.minallowed, Y.maxallowed) ? Y.minallowed : Y && Y.clipmin !== void 0 && P(re, Y.clipmin, Y.clipmax) ? Math.max(K, re.d2l(Y.clipmin)) : K;
          }(T, O), z = function(K, re) {
            var Y = re.autorangeoptions;
            return Y && Y.maxallowed !== void 0 && P(re, Y.minallowed, Y.maxallowed) ? Y.maxallowed : Y && Y.clipmax !== void 0 && P(re, Y.clipmin, Y.clipmax) ? Math.min(K, re.d2l(Y.clipmax)) : K;
          }(z, O), [T, z];
        }
      }, 75511: function(o) {
        o.exports = function(s, n, l) {
          var u, i;
          if (l) {
            var h = n === "reversed" || n === "min reversed" || n === "max reversed";
            u = l[h ? 1 : 0], i = l[h ? 0 : 1];
          }
          var p = s("autorangeoptions.minallowed", i === null ? u : void 0), _ = s("autorangeoptions.maxallowed", u === null ? i : void 0);
          p === void 0 && s("autorangeoptions.clipmin"), _ === void 0 && s("autorangeoptions.clipmax"), s("autorangeoptions.include");
        };
      }, 29714: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(44122), h = n(33626), p = n(34809), _ = p.strTranslate, d = n(30635), f = n(17240), c = n(78766), g = n(62203), m = n(25829), x = n(68599), w = n(63821), k = w.ONEMAXYEAR, S = w.ONEAVGYEAR, A = w.ONEMINYEAR, C = w.ONEMAXQUARTER, D = w.ONEAVGQUARTER, L = w.ONEMINQUARTER, E = w.ONEMAXMONTH, P = w.ONEAVGMONTH, I = w.ONEMINMONTH, M = w.ONEWEEK, O = w.ONEDAY, T = O / 2, z = w.ONEHOUR, F = w.ONEMIN, U = w.ONESEC, V = w.ONEMILLI, $ = w.ONEMICROSEC, q = w.MINUS_SIGN, K = w.BADNUM, re = { K: "zeroline" }, Y = { K: "gridline", L: "path" }, te = { K: "minor-gridline", L: "path" }, ee = { K: "tick", L: "path" }, X = { K: "tick", L: "text" }, Q = { width: ["x", "r", "l", "xl", "xr"], height: ["y", "t", "b", "yt", "yb"], right: ["r", "xr"], left: ["l", "xl"], top: ["t", "yt"], bottom: ["b", "yb"] }, ue = n(4530), ce = ue.MID_SHIFT, he = ue.CAP_SHIFT, de = ue.LINE_SPACING, ne = ue.OPPOSITE_SIDE, ae = o.exports = {};
        ae.setConvert = n(19091);
        var se = n(9666), me = n(5975), ye = me.idSort, pe = me.isLinked;
        ae.id2name = me.id2name, ae.name2id = me.name2id, ae.cleanId = me.cleanId, ae.list = me.list, ae.listIds = me.listIds, ae.getFromId = me.getFromId, ae.getFromTrace = me.getFromTrace;
        var be = n(32919);
        ae.getAutoRange = be.getAutoRange, ae.findExtremes = be.findExtremes;
        var Ae = 1e-4;
        function Se(lt) {
          var st = (lt[1] - lt[0]) * Ae;
          return [lt[0] - st, lt[1] + st];
        }
        ae.coerceRef = function(lt, st, Ot, kt, Bt, xt) {
          var Jt = kt.charAt(kt.length - 1), qt = Ot._fullLayout._subplots[Jt + "axis"], en = kt + "ref", Yt = {};
          return Bt || (Bt = qt[0] || (typeof xt == "string" ? xt : xt[0])), xt || (xt = Bt), qt = qt.concat(qt.map(function(Ht) {
            return Ht + " domain";
          })), Yt[en] = { valType: "enumerated", values: qt.concat(xt ? typeof xt == "string" ? [xt] : xt : []), dflt: Bt }, p.coerce(lt, st, Yt, en);
        }, ae.getRefType = function(lt) {
          return lt === void 0 ? lt : lt === "paper" ? "paper" : lt === "pixel" ? "pixel" : /( domain)$/.test(lt) ? "domain" : "range";
        }, ae.coercePosition = function(lt, st, Ot, kt, Bt, xt) {
          var Jt, qt;
          if (ae.getRefType(kt) !== "range") Jt = p.ensureNumber, qt = Ot(Bt, xt);
          else {
            var en = ae.getFromId(st, kt);
            qt = Ot(Bt, xt = en.fraction2r(xt)), Jt = en.cleanPos;
          }
          lt[Bt] = Jt(qt);
        }, ae.cleanPosition = function(lt, st, Ot) {
          return (Ot === "paper" || Ot === "pixel" ? p.ensureNumber : ae.getFromId(st, Ot).cleanPos)(lt);
        }, ae.redrawComponents = function(lt, st) {
          st = st || ae.listIds(lt);
          var Ot = lt._fullLayout;
          function kt(Bt, xt, Jt, qt) {
            for (var en = h.getComponentMethod(Bt, xt), Yt = {}, Ht = 0; Ht < st.length; Ht++) for (var sn = Ot[ae.id2name(st[Ht])][Jt], fn = 0; fn < sn.length; fn++) {
              var In = sn[fn];
              if (!Yt[In] && (en(lt, In), Yt[In] = 1, qt)) return;
            }
          }
          kt("annotations", "drawOne", "_annIndices"), kt("shapes", "drawOne", "_shapeIndices"), kt("images", "draw", "_imgIndices", !0), kt("selections", "drawOne", "_selectionIndices");
        };
        var Me = ae.getDataConversions = function(lt, st, Ot, kt) {
          var Bt, xt = Ot === "x" || Ot === "y" || Ot === "z" ? Ot : kt;
          if (p.isArrayOrTypedArray(xt)) {
            if (Bt = { type: se(kt, void 0, { autotypenumbers: lt._fullLayout.autotypenumbers }), _categories: [] }, ae.setConvert(Bt), Bt.type === "category") for (var Jt = 0; Jt < kt.length; Jt++) Bt.d2c(kt[Jt]);
          } else Bt = ae.getFromTrace(lt, st, xt);
          return Bt ? { d2c: Bt.d2c, c2d: Bt.c2d } : xt === "ids" ? { d2c: Le, c2d: Le } : { d2c: De, c2d: De };
        };
        function De(lt) {
          return +lt;
        }
        function Le(lt) {
          return String(lt);
        }
        function We(lt, st) {
          return Math.abs((lt / st + 0.5) % 1 - 0.5) < 1e-3;
        }
        function Ee(lt, st) {
          return Math.abs(lt / st - 1) < 1e-3;
        }
        function Ne(lt) {
          return +lt.substring(1);
        }
        function Ie(lt, st) {
          return lt.rangebreaks && (st = st.filter(function(Ot) {
            return lt.maskBreaks(Ot.x) !== K;
          })), st;
        }
        function ge(lt) {
          var st = lt._mainAxis, Ot = [];
          if (st._vals) {
            for (var kt = 0; kt < st._vals.length; kt++) if (!st._vals[kt].noTick) {
              var Bt = st.l2p(st._vals[kt].x), xt = lt.p2l(Bt), Jt = ae.tickText(lt, xt);
              st._vals[kt].minor && (Jt.minor = !0, Jt.text = ""), Ot.push(Jt);
            }
          }
          return Ie(lt, Ot);
        }
        function Ce(lt, st) {
          var Ot = Se(p.simpleMap(lt.range, lt.r2l)), kt = Math.min(Ot[0], Ot[1]), Bt = Math.max(Ot[0], Ot[1]), xt = lt.type === "category" ? lt.d2l_noadd : lt.d2l;
          lt.type === "log" && String(lt.dtick).charAt(0) !== "L" && (lt.dtick = "L" + Math.pow(10, Math.floor(Math.min(lt.range[0], lt.range[1])) - 1));
          for (var Jt = [], qt = 0; qt <= 1; qt++) if ((st === void 0 || !(st && qt || st === !1 && !qt)) && (!qt || lt.minor)) {
            var en = qt ? lt.minor.tickvals : lt.tickvals, Yt = qt ? [] : lt.ticktext;
            if (en) {
              p.isArrayOrTypedArray(Yt) || (Yt = []);
              for (var Ht = 0; Ht < en.length; Ht++) {
                var sn = xt(en[Ht]);
                if (sn > kt && sn < Bt) {
                  var fn = ae.tickText(lt, sn, !1, String(Yt[Ht]));
                  qt && (fn.minor = !0, fn.text = ""), Jt.push(fn);
                }
              }
            }
          }
          return Ie(lt, Jt);
        }
        ae.getDataToCoordFunc = function(lt, st, Ot, kt) {
          return Me(lt, st, Ot, kt).d2c;
        }, ae.counterLetter = function(lt) {
          var st = lt.charAt(0);
          return st === "x" ? "y" : st === "y" ? "x" : void 0;
        }, ae.minDtick = function(lt, st, Ot, kt) {
          ["log", "category", "multicategory"].indexOf(lt.type) === -1 && kt ? lt._minDtick === void 0 ? (lt._minDtick = st, lt._forceTick0 = Ot) : lt._minDtick && ((lt._minDtick / st + 1e-6) % 1 < 2e-6 && ((Ot - lt._forceTick0) / st % 1 + 1.000001) % 1 < 2e-6 ? (lt._minDtick = st, lt._forceTick0 = Ot) : ((st / lt._minDtick + 1e-6) % 1 > 2e-6 || ((Ot - lt._forceTick0) / lt._minDtick % 1 + 1.000001) % 1 > 2e-6) && (lt._minDtick = 0)) : lt._minDtick = 0;
        }, ae.saveRangeInitial = function(lt, st) {
          for (var Ot = ae.list(lt, "", !0), kt = !1, Bt = 0; Bt < Ot.length; Bt++) {
            var xt = Ot[Bt], Jt = xt._rangeInitial0 === void 0 && xt._rangeInitial1 === void 0, qt = Jt || xt.range[0] !== xt._rangeInitial0 || xt.range[1] !== xt._rangeInitial1, en = xt.autorange;
            (Jt && en !== !0 || st && qt) && (xt._rangeInitial0 = en === "min" || en === "max reversed" ? void 0 : xt.range[0], xt._rangeInitial1 = en === "max" || en === "min reversed" ? void 0 : xt.range[1], xt._autorangeInitial = en, kt = !0);
          }
          return kt;
        }, ae.saveShowSpikeInitial = function(lt, st) {
          for (var Ot = ae.list(lt, "", !0), kt = !1, Bt = "on", xt = 0; xt < Ot.length; xt++) {
            var Jt = Ot[xt], qt = Jt._showSpikeInitial === void 0, en = qt || Jt.showspikes !== Jt._showspikes;
            (qt || st && en) && (Jt._showSpikeInitial = Jt.showspikes, kt = !0), Bt !== "on" || Jt.showspikes || (Bt = "off");
          }
          return lt._fullLayout._cartesianSpikesEnabled = Bt, kt;
        }, ae.autoBin = function(lt, st, Ot, kt, Bt, xt) {
          var Jt, qt = p.aggNums(Math.min, null, lt), en = p.aggNums(Math.max, null, lt);
          if (st.type === "category" || st.type === "multicategory") return { start: qt - 0.5, end: en + 0.5, size: Math.max(1, Math.round(xt) || 1), _dataSpan: en - qt };
          if (Bt || (Bt = st.calendar), Jt = st.type === "log" ? { type: "linear", range: [qt, en] } : { type: st.type, range: p.simpleMap([qt, en], st.c2r, 0, Bt), calendar: Bt }, ae.setConvert(Jt), xt = xt && x.dtick(xt, Jt.type)) Jt.dtick = xt, Jt.tick0 = x.tick0(void 0, Jt.type, Bt);
          else {
            var Yt;
            if (Ot) Yt = (en - qt) / Ot;
            else {
              var Ht = p.distinctVals(lt), sn = Math.pow(10, Math.floor(Math.log(Ht.minDiff) / Math.LN10)), fn = sn * p.roundUp(Ht.minDiff / sn, [0.9, 1.9, 4.9, 9.9], !0);
              Yt = Math.max(fn, 2 * p.stdev(lt) / Math.pow(lt.length, kt ? 0.25 : 0.4)), u(Yt) || (Yt = 1);
            }
            ae.autoTicks(Jt, Yt);
          }
          var In, zn = Jt.dtick, Cn = ae.tickIncrement(ae.tickFirst(Jt), zn, "reverse", Bt);
          if (typeof zn == "number") Cn = function(gn, Mn, Xn, Pn, wn) {
            var Rn = 0, _n = 0, En = 0, Kn = 0;
            function Wn(cr) {
              return (1 + 100 * (cr - gn) / Xn.dtick) % 100 < 2;
            }
            for (var hr = 0; hr < Mn.length; hr++) Mn[hr] % 1 == 0 ? En++ : u(Mn[hr]) || Kn++, Wn(Mn[hr]) && Rn++, Wn(Mn[hr] + Xn.dtick / 2) && _n++;
            var Zn = Mn.length - Kn;
            if (En === Zn && Xn.type !== "date") Xn.dtick < 1 ? gn = Pn - 0.5 * Xn.dtick : (gn -= 0.5) + Xn.dtick < Pn && (gn += Xn.dtick);
            else if (_n < 0.1 * Zn && (Rn > 0.3 * Zn || Wn(Pn) || Wn(wn))) {
              var lr = Xn.dtick / 2;
              gn += gn + lr < Pn ? lr : -lr;
            }
            return gn;
          }(Cn, lt, Jt, qt, en), In = Cn + (1 + Math.floor((en - Cn) / zn)) * zn;
          else for (Jt.dtick.charAt(0) === "M" && (Cn = function(gn, Mn, Xn, Pn, wn) {
            var Rn = p.findExactDates(Mn, wn);
            if (Rn.exactDays > 0.8) {
              var _n = Number(Xn.substr(1));
              Rn.exactYears > 0.8 && _n % 12 == 0 ? gn = ae.tickIncrement(gn, "M6", "reverse") + 1.5 * O : Rn.exactMonths > 0.8 ? gn = ae.tickIncrement(gn, "M1", "reverse") + 15.5 * O : gn -= T;
              var En = ae.tickIncrement(gn, Xn);
              if (En <= Pn) return En;
            }
            return gn;
          }(Cn, lt, zn, qt, Bt)), In = Cn; In <= en; ) In = ae.tickIncrement(In, zn, !1, Bt);
          return { start: st.c2r(Cn, 0, Bt), end: st.c2r(In, 0, Bt), size: zn, _dataSpan: en - qt };
        }, ae.prepMinorTicks = function(lt, st, Ot) {
          if (!st.minor.dtick) {
            delete lt.dtick;
            var kt, Bt = st.dtick && u(st._tmin);
            if (Bt) {
              var xt = ae.tickIncrement(st._tmin, st.dtick, !0);
              kt = [st._tmin, 0.99 * xt + 0.01 * st._tmin];
            } else {
              var Jt = p.simpleMap(st.range, st.r2l);
              kt = [Jt[0], 0.8 * Jt[0] + 0.2 * Jt[1]];
            }
            if (lt.range = p.simpleMap(kt, st.l2r), lt._isMinor = !0, ae.prepTicks(lt, Ot), Bt) {
              var qt = u(st.dtick), en = u(lt.dtick), Yt = qt ? st.dtick : +st.dtick.substring(1), Ht = en ? lt.dtick : +lt.dtick.substring(1);
              qt && en ? We(Yt, Ht) ? Yt === 2 * M && Ht === 2 * O && (lt.dtick = M) : Yt === 2 * M && Ht === 3 * O ? lt.dtick = M : Yt !== M || (st._input.minor || {}).nticks ? Ee(Yt / Ht, 2.5) ? lt.dtick = Yt / 2 : lt.dtick = Yt : lt.dtick = O : String(st.dtick).charAt(0) === "M" ? en ? lt.dtick = "M1" : We(Yt, Ht) ? Yt >= 12 && Ht === 2 && (lt.dtick = "M3") : lt.dtick = st.dtick : String(lt.dtick).charAt(0) === "L" ? String(st.dtick).charAt(0) === "L" ? We(Yt, Ht) || (lt.dtick = Ee(Yt / Ht, 2.5) ? st.dtick / 2 : st.dtick) : lt.dtick = "D1" : lt.dtick === "D2" && +st.dtick > 1 && (lt.dtick = 1);
            }
            lt.range = st.range;
          }
          st.minor._tick0Init === void 0 && (lt.tick0 = st.tick0);
        }, ae.prepTicks = function(lt, st) {
          var Ot = p.simpleMap(lt.range, lt.r2l, void 0, void 0, st);
          if (lt.tickmode === "auto" || !lt.dtick) {
            var kt, Bt = lt.nticks;
            Bt || (lt.type === "category" || lt.type === "multicategory" ? (kt = lt.tickfont ? p.bigFont(lt.tickfont.size || 12) : 15, Bt = lt._length / kt) : (kt = lt._id.charAt(0) === "y" ? 40 : 80, Bt = p.constrain(lt._length / kt, 4, 9) + 1), lt._name === "radialaxis" && (Bt *= 2)), lt.minor && lt.minor.tickmode !== "array" || lt.tickmode === "array" && (Bt *= 100), lt._roughDTick = Math.abs(Ot[1] - Ot[0]) / Bt, ae.autoTicks(lt, lt._roughDTick), lt._minDtick > 0 && lt.dtick < 2 * lt._minDtick && (lt.dtick = lt._minDtick, lt.tick0 = lt.l2r(lt._forceTick0));
          }
          lt.ticklabelmode === "period" && function(xt) {
            var Jt;
            function qt() {
              return !(u(xt.dtick) || xt.dtick.charAt(0) !== "M");
            }
            var en = qt(), Yt = ae.getTickFormat(xt);
            if (Yt) {
              var Ht = xt._dtickInit !== xt.dtick;
              /%[fLQsSMX]/.test(Yt) || (/%[HI]/.test(Yt) ? (Jt = z, Ht && !en && xt.dtick < z && (xt.dtick = z)) : /%p/.test(Yt) ? (Jt = T, Ht && !en && xt.dtick < T && (xt.dtick = T)) : /%[Aadejuwx]/.test(Yt) ? (Jt = O, Ht && !en && xt.dtick < O && (xt.dtick = O)) : /%[UVW]/.test(Yt) ? (Jt = M, Ht && !en && xt.dtick < M && (xt.dtick = M)) : /%[Bbm]/.test(Yt) ? (Jt = P, Ht && (en ? Ne(xt.dtick) < 1 : xt.dtick < I) && (xt.dtick = "M1")) : /%[q]/.test(Yt) ? (Jt = D, Ht && (en ? Ne(xt.dtick) < 3 : xt.dtick < L) && (xt.dtick = "M3")) : /%[Yy]/.test(Yt) && (Jt = S, Ht && (en ? Ne(xt.dtick) < 12 : xt.dtick < A) && (xt.dtick = "M12")));
            }
            (en = qt()) && xt.tick0 === xt._dowTick0 && (xt.tick0 = xt._rawTick0), xt._definedDelta = Jt;
          }(lt), lt.tick0 || (lt.tick0 = lt.type === "date" ? "2000-01-01" : 0), lt.type === "date" && lt.dtick < 0.1 && (lt.dtick = 0.1), $e(lt);
        }, ae.calcTicks = function(lt, st) {
          for (var Ot, kt, Bt, xt, Jt = lt.type, qt = lt.calendar, en = lt.ticklabelstep, Yt = lt.ticklabelmode === "period", Ht = lt.range[0] > lt.range[1], sn = !lt.ticklabelindex || p.isArrayOrTypedArray(lt.ticklabelindex) ? lt.ticklabelindex : [lt.ticklabelindex], fn = p.simpleMap(lt.range, lt.r2l, void 0, void 0, st), In = fn[1] < fn[0], zn = Math.min(fn[0], fn[1]), Cn = Math.max(fn[0], fn[1]), gn = Math.max(1e3, lt._length || 0), Mn = [], Xn = [], Pn = [], wn = [], Rn = [], _n = lt.minor && (lt.minor.ticks || lt.minor.showgrid), En = 1; En >= (_n ? 0 : 1); En--) {
            var Kn = !En;
            En ? (lt._dtickInit = lt.dtick, lt._tick0Init = lt.tick0) : (lt.minor._dtickInit = lt.minor.dtick, lt.minor._tick0Init = lt.minor.tick0);
            var Wn = En ? lt : p.extendFlat({}, lt, lt.minor);
            if (Kn ? ae.prepMinorTicks(Wn, lt, st) : ae.prepTicks(Wn, st), Wn.tickmode !== "array") if (Wn.tickmode !== "sync") {
              var hr = Se(fn), Zn = hr[0], lr = hr[1], cr = u(Wn.dtick), zr = Jt === "log" && !(cr || Wn.dtick.charAt(0) === "L"), Wr = ae.tickFirst(Wn, st);
              if (En) {
                if (lt._tmin = Wr, Wr < Zn !== In) break;
                Jt !== "category" && Jt !== "multicategory" || (lr = In ? Math.max(-0.5, lr) : Math.min(lt._categories.length - 0.5, lr));
              }
              var mr, Ir, yr = null, Vr = Wr;
              En && (cr ? Ir = lt.dtick : Jt === "date" ? typeof lt.dtick == "string" && lt.dtick.charAt(0) === "M" && (Ir = P * lt.dtick.substring(1)) : Ir = lt._roughDTick, mr = Math.round((lt.r2l(Vr) - lt.r2l(lt.tick0)) / Ir) - 1);
              var rn = Wn.dtick;
              for (Wn.rangebreaks && Wn._tick0Init !== Wn.tick0 && (Vr = Mt(Vr, lt), In || (Vr = ae.tickIncrement(Vr, rn, !In, qt))), En && Yt && (Vr = ae.tickIncrement(Vr, rn, !In, qt), mr--); In ? Vr >= lr : Vr <= lr; Vr = ae.tickIncrement(Vr, rn, In, qt)) {
                if (En && mr++, Wn.rangebreaks && !In) {
                  if (Vr < Zn) continue;
                  if (Wn.maskBreaks(Vr) === K && Mt(Vr, Wn) >= Cn) break;
                }
                if (Pn.length > gn || Vr === yr) break;
                yr = Vr;
                var Tn = { value: Vr };
                En ? (zr && Vr !== (0 | Vr) && (Tn.simpleLabel = !0), en > 1 && mr % en && (Tn.skipLabel = !0), Pn.push(Tn)) : (Tn.minor = !0, wn.push(Tn));
              }
            } else Pn = [], Mn = ge(lt);
            else En ? (Pn = [], Mn = Ce(lt, !Kn)) : (wn = [], Xn = Ce(lt, !Kn));
          }
          if (!wn || wn.length < 2 ? sn = !1 : (Ot = (wn[1].value - wn[0].value) * (Ht ? -1 : 1), kt = lt.tickformat, (/%f/.test(kt) ? Ot >= $ : /%L/.test(kt) ? Ot >= V : /%[SX]/.test(kt) ? Ot >= U : /%M/.test(kt) ? Ot >= F : /%[HI]/.test(kt) ? Ot >= z : /%p/.test(kt) ? Ot >= T : /%[Aadejuwx]/.test(kt) ? Ot >= O : /%[UVW]/.test(kt) ? Ot >= M : /%[Bbm]/.test(kt) ? Ot >= I : /%[q]/.test(kt) ? Ot >= L : !/%[Yy]/.test(kt) || Ot >= A) || (sn = !1)), sn) {
            var sr = Pn.concat(wn);
            Yt && Pn.length && (sr = sr.slice(1)), (sr = sr.sort(function(pn, dn) {
              return pn.value - dn.value;
            }).filter(function(pn, dn, Dn) {
              return dn === 0 || pn.value !== Dn[dn - 1].value;
            })).map(function(pn, dn) {
              return pn.minor !== void 0 || pn.skipLabel ? null : dn;
            }).filter(function(pn) {
              return pn !== null;
            }).forEach(function(pn) {
              sn.map(function(dn) {
                var Dn = pn + dn;
                Dn >= 0 && Dn < sr.length && p.pushUnique(Rn, sr[Dn]);
              });
            });
          } else Rn = Pn;
          if (_n && !(lt.minor.ticks === "inside" && lt.ticks === "outside" || lt.minor.ticks === "outside" && lt.ticks === "inside")) {
            for (var $n = Pn.map(function(pn) {
              return pn.value;
            }), ur = [], Tr = 0; Tr < wn.length; Tr++) {
              var wr = wn[Tr], Fr = wr.value;
              if ($n.indexOf(Fr) === -1) {
                for (var Xr = !1, un = 0; !Xr && un < Pn.length; un++) 1e7 + Pn[un].value === 1e7 + Fr && (Xr = !0);
                Xr || ur.push(wr);
              }
            }
            wn = ur;
          }
          if (Yt && function(pn, dn, Dn) {
            for (var nr = 0; nr < pn.length; nr++) {
              var pr = pn[nr].value, ir = nr, gr = nr + 1;
              nr < pn.length - 1 ? (ir = nr, gr = nr + 1) : nr > 0 ? (ir = nr - 1, gr = nr) : (ir = nr, gr = nr);
              var Pr, Cr = pn[ir].value, Er = pn[gr].value, Sr = Math.abs(Er - Cr), Dr = Dn || Sr, Qn = 0;
              Dr >= A ? Qn = Sr >= A && Sr <= k ? Sr : S : Dn === D && Dr >= L ? Qn = Sr >= L && Sr <= C ? Sr : D : Dr >= I ? Qn = Sr >= I && Sr <= E ? Sr : P : Dn === M && Dr >= M ? Qn = M : Dr >= O ? Qn = O : Dn === T && Dr >= T ? Qn = T : Dn === z && Dr >= z && (Qn = z), Qn >= Sr && (Qn = Sr, Pr = !0);
              var ri = pr + Qn;
              if (dn.rangebreaks && Qn > 0) {
                for (var Zr = 0, Br = 0; Br < 84; Br++) {
                  var Yr = (Br + 0.5) / 84;
                  dn.maskBreaks(pr * (1 - Yr) + Yr * ri) !== K && Zr++;
                }
                (Qn *= Zr / 84) || (pn[nr].drop = !0), Pr && Sr > M && (Qn = Sr);
              }
              (Qn > 0 || nr === 0) && (pn[nr].periodX = pr + Qn / 2);
            }
          }(Rn, lt, lt._definedDelta), lt.rangebreaks) {
            var Gn = lt._id.charAt(0) === "y", on = 1;
            lt.tickmode === "auto" && (on = lt.tickfont ? lt.tickfont.size : 12);
            var ln = NaN;
            for (Bt = Pn.length - 1; Bt > -1; Bt--) if (Pn[Bt].drop) Pn.splice(Bt, 1);
            else {
              Pn[Bt].value = Mt(Pn[Bt].value, lt);
              var bn = lt.c2p(Pn[Bt].value);
              (Gn ? ln > bn - on : ln < bn + on) ? Pn.splice(In ? Bt + 1 : Bt, 1) : ln = bn;
            }
          }
          pt(lt) && Math.abs(fn[1] - fn[0]) === 360 && Pn.pop(), lt._tmax = (Pn[Pn.length - 1] || {}).value, lt._prevDateHead = "", lt._inCalcTicks = !0;
          var Nn, jn = function(pn) {
            pn.text = "", lt._prevDateHead = xt;
          };
          function Jn(pn, dn) {
            var Dn = ae.tickText(pn, dn.value, !1, dn.simpleLabel), nr = dn.periodX;
            return nr !== void 0 && (Dn.periodX = nr, (nr > Cn || nr < zn) && (nr > Cn && (Dn.periodX = Cn), nr < zn && (Dn.periodX = zn), jn(Dn))), Dn;
          }
          for (Pn = Pn.concat(wn), Bt = 0; Bt < Pn.length; Bt++) {
            var Hn = Pn[Bt].minor, Ln = Pn[Bt].value;
            Hn ? ((Nn = sn && Rn.indexOf(Pn[Bt]) !== -1 ? Jn(lt, Pn[Bt]) : { x: Ln }).minor = !0, Xn.push(Nn)) : (xt = lt._prevDateHead, Nn = Jn(lt, Pn[Bt]), (Pn[Bt].skipLabel || sn && Rn.indexOf(Pn[Bt]) === -1) && jn(Nn), Mn.push(Nn));
          }
          return Mn = Mn.concat(Xn), lt._inCalcTicks = !1, Yt && Mn.length && (Mn[0].noTick = !0), Mn;
        };
        var we = [2, 5, 10], Ge = [1, 2, 3, 6, 12], Re = [1, 2, 5, 10, 15, 30], je = [1, 2, 3, 7, 14], Ke = [-0.046, 0, 0.301, 0.477, 0.602, 0.699, 0.778, 0.845, 0.903, 0.954, 1], tt = [-0.301, 0, 0.301, 0.699, 1], _e = [15, 30, 45, 90, 180];
        function Be(lt, st, Ot) {
          return st * p.roundUp(lt / st, Ot);
        }
        function $e(lt) {
          var st = lt.dtick;
          if (lt._tickexponent = 0, u(st) || typeof st == "string" || (st = 1), lt.type !== "category" && lt.type !== "multicategory" || (lt._tickround = null), lt.type === "date") {
            var Ot = lt.r2l(lt.tick0), kt = lt.l2r(Ot).replace(/(^-|i)/g, ""), Bt = kt.length;
            if (String(st).charAt(0) === "M") Bt > 10 || kt.substr(5) !== "01-01" ? lt._tickround = "d" : lt._tickround = +st.substr(1) % 12 == 0 ? "y" : "m";
            else if (st >= O && Bt <= 10 || st >= 15 * O) lt._tickround = "d";
            else if (st >= F && Bt <= 16 || st >= z) lt._tickround = "M";
            else if (st >= U && Bt <= 19 || st >= F) lt._tickround = "S";
            else {
              var xt = lt.l2r(Ot + st).replace(/^-/, "").length;
              lt._tickround = Math.max(Bt, xt) - 20, lt._tickround < 0 && (lt._tickround = 4);
            }
          } else if (u(st) || st.charAt(0) === "L") {
            var Jt = lt.range.map(lt.r2d || Number);
            u(st) || (st = Number(st.substr(1))), lt._tickround = 2 - Math.floor(Math.log(st) / Math.LN10 + 0.01);
            var qt = Math.max(Math.abs(Jt[0]), Math.abs(Jt[1])), en = Math.floor(Math.log(qt) / Math.LN10 + 0.01), Yt = lt.minexponent === void 0 ? 3 : lt.minexponent;
            Math.abs(en) > Yt && (ft(lt.exponentformat) && !_t(en) ? lt._tickexponent = 3 * Math.round((en - 1) / 3) : lt._tickexponent = en);
          } else lt._tickround = null;
        }
        function Ze(lt, st, Ot) {
          var kt = lt.tickfont || {};
          return { x: st, dx: 0, dy: 0, text: Ot || "", fontSize: kt.size, font: kt.family, fontWeight: kt.weight, fontStyle: kt.style, fontVariant: kt.variant, fontTextcase: kt.textcase, fontLineposition: kt.lineposition, fontShadow: kt.shadow, fontColor: kt.color };
        }
        ae.autoTicks = function(lt, st, Ot) {
          var kt;
          function Bt(sn) {
            return Math.pow(sn, Math.floor(Math.log(st) / Math.LN10));
          }
          if (lt.type === "date") {
            lt.tick0 = p.dateTick0(lt.calendar, 0);
            var xt = 2 * st;
            if (xt > S) st /= S, kt = Bt(10), lt.dtick = "M" + 12 * Be(st, kt, we);
            else if (xt > P) st /= P, lt.dtick = "M" + Be(st, 1, Ge);
            else if (xt > O) {
              if (lt.dtick = Be(st, O, lt._hasDayOfWeekBreaks ? [1, 2, 7, 14] : je), !Ot) {
                var Jt = ae.getTickFormat(lt), qt = lt.ticklabelmode === "period";
                qt && (lt._rawTick0 = lt.tick0), /%[uVW]/.test(Jt) ? lt.tick0 = p.dateTick0(lt.calendar, 2) : lt.tick0 = p.dateTick0(lt.calendar, 1), qt && (lt._dowTick0 = lt.tick0);
              }
            } else xt > z ? lt.dtick = Be(st, z, Ge) : xt > F ? lt.dtick = Be(st, F, Re) : xt > U ? lt.dtick = Be(st, U, Re) : (kt = Bt(10), lt.dtick = Be(st, kt, we));
          } else if (lt.type === "log") {
            lt.tick0 = 0;
            var en = p.simpleMap(lt.range, lt.r2l);
            if (lt._isMinor && (st *= 1.5), st > 0.7) lt.dtick = Math.ceil(st);
            else if (Math.abs(en[1] - en[0]) < 1) {
              var Yt = 1.5 * Math.abs((en[1] - en[0]) / st);
              st = Math.abs(Math.pow(10, en[1]) - Math.pow(10, en[0])) / Yt, kt = Bt(10), lt.dtick = "L" + Be(st, kt, we);
            } else lt.dtick = st > 0.3 ? "D2" : "D1";
          } else lt.type === "category" || lt.type === "multicategory" ? (lt.tick0 = 0, lt.dtick = Math.ceil(Math.max(st, 1))) : pt(lt) ? (lt.tick0 = 0, kt = 1, lt.dtick = Be(st, kt, _e)) : (lt.tick0 = 0, kt = Bt(10), lt.dtick = Be(st, kt, we));
          if (lt.dtick === 0 && (lt.dtick = 1), !u(lt.dtick) && typeof lt.dtick != "string") {
            var Ht = lt.dtick;
            throw lt.dtick = 1, "ax.dtick error: " + String(Ht);
          }
        }, ae.tickIncrement = function(lt, st, Ot, kt) {
          var Bt = Ot ? -1 : 1;
          if (u(st)) return p.increment(lt, Bt * st);
          var xt = st.charAt(0), Jt = Bt * Number(st.substr(1));
          if (xt === "M") return p.incrementMonth(lt, Jt, kt);
          if (xt === "L") return Math.log(Math.pow(10, lt) + Jt) / Math.LN10;
          if (xt === "D") {
            var qt = st === "D2" ? tt : Ke, en = lt + 0.01 * Bt, Yt = p.roundUp(p.mod(en, 1), qt, Ot);
            return Math.floor(en) + Math.log(l.round(Math.pow(10, Yt), 1)) / Math.LN10;
          }
          throw "unrecognized dtick " + String(st);
        }, ae.tickFirst = function(lt, st) {
          var Ot = lt.r2l || Number, kt = p.simpleMap(lt.range, Ot, void 0, void 0, st), Bt = kt[1] < kt[0], xt = Bt ? Math.floor : Math.ceil, Jt = Se(kt)[0], qt = lt.dtick, en = Ot(lt.tick0);
          if (u(qt)) {
            var Yt = xt((Jt - en) / qt) * qt + en;
            return lt.type !== "category" && lt.type !== "multicategory" || (Yt = p.constrain(Yt, 0, lt._categories.length - 1)), Yt;
          }
          var Ht = qt.charAt(0), sn = Number(qt.substr(1));
          if (Ht === "M") {
            for (var fn, In, zn, Cn = 0, gn = en; Cn < 10; ) {
              if (((fn = ae.tickIncrement(gn, qt, Bt, lt.calendar)) - Jt) * (gn - Jt) <= 0) return Bt ? Math.min(gn, fn) : Math.max(gn, fn);
              In = (Jt - (gn + fn) / 2) / (fn - gn), zn = Ht + (Math.abs(Math.round(In)) || 1) * sn, gn = ae.tickIncrement(gn, zn, In < 0 ? !Bt : Bt, lt.calendar), Cn++;
            }
            return p.error("tickFirst did not converge", lt), gn;
          }
          if (Ht === "L") return Math.log(xt((Math.pow(10, Jt) - en) / sn) * sn + en) / Math.LN10;
          if (Ht === "D") {
            var Mn = qt === "D2" ? tt : Ke, Xn = p.roundUp(p.mod(Jt, 1), Mn, Bt);
            return Math.floor(Jt) + Math.log(l.round(Math.pow(10, Xn), 1)) / Math.LN10;
          }
          throw "unrecognized dtick " + String(qt);
        }, ae.tickText = function(lt, st, Ot, kt) {
          var Bt, xt = Ze(lt, st), Jt = lt.tickmode === "array", qt = Ot || Jt, en = lt.type, Yt = en === "category" ? lt.d2l_noadd : lt.d2l, Ht = function(gn) {
            var Mn = lt.l2p(gn);
            return Mn >= 0 && Mn <= lt._length ? gn : null;
          };
          if (Jt && p.isArrayOrTypedArray(lt.ticktext)) {
            var sn = p.simpleMap(lt.range, lt.r2l), fn = (Math.abs(sn[1] - sn[0]) - (lt._lBreaks || 0)) / 1e4;
            for (Bt = 0; Bt < lt.ticktext.length && !(Math.abs(st - Yt(lt.tickvals[Bt])) < fn); Bt++) ;
            if (Bt < lt.ticktext.length) return xt.text = String(lt.ticktext[Bt]), xt.xbnd = [Ht(xt.x - 0.5), Ht(xt.x + lt.dtick - 0.5)], xt;
          }
          function In(gn) {
            if (gn === void 0) return !0;
            if (Ot) return gn === "none";
            var Mn = { first: lt._tmin, last: lt._tmax }[gn];
            return gn !== "all" && st !== Mn;
          }
          var zn = Ot ? "never" : lt.exponentformat !== "none" && In(lt.showexponent) ? "hide" : "";
          if (en === "date" ? function(gn, Mn, Xn, Pn) {
            var wn = gn._tickround, Rn = Xn && gn.hoverformat || ae.getTickFormat(gn);
            (Pn = !Rn && Pn) && (wn = u(wn) ? 4 : { y: "m", m: "d", d: "M", M: "S", S: 4 }[wn]);
            var _n, En = p.formatDate(Mn.x, Rn, wn, gn._dateFormat, gn.calendar, gn._extraFormat), Kn = En.indexOf(`
`);
            if (Kn !== -1 && (_n = En.substr(Kn + 1), En = En.substr(0, Kn)), Pn && (_n === void 0 || En !== "00:00:00" && En !== "00:00" ? En.length === 8 && (En = En.replace(/:00$/, "")) : (En = _n, _n = "")), _n) if (Xn) wn === "d" ? En += ", " + _n : En = _n + (En ? ", " + En : "");
            else if (gn._inCalcTicks && gn._prevDateHead === _n) {
              var Wn = At(gn), hr = gn._trueSide || gn.side;
              (!Wn && hr === "top" || Wn && hr === "bottom") && (En += "<br> ");
            } else gn._prevDateHead = _n, En += "<br>" + _n;
            Mn.text = En;
          }(lt, xt, Ot, qt) : en === "log" ? function(gn, Mn, Xn, Pn, wn) {
            var Rn = gn.dtick, _n = Mn.x, En = gn.tickformat, Kn = typeof Rn == "string" && Rn.charAt(0);
            if (wn === "never" && (wn = ""), Pn && Kn !== "L" && (Rn = "L3", Kn = "L"), En || Kn === "L") Mn.text = Pt(Math.pow(10, _n), gn, wn, Pn);
            else if (u(Rn) || Kn === "D" && p.mod(_n + 0.01, 1) < 0.1) {
              var Wn = Math.round(_n), hr = Math.abs(Wn), Zn = gn.exponentformat;
              Zn === "power" || ft(Zn) && _t(Wn) ? (Mn.text = Wn === 0 ? 1 : Wn === 1 ? "10" : "10<sup>" + (Wn > 1 ? "" : q) + hr + "</sup>", Mn.fontSize *= 1.25) : (Zn === "e" || Zn === "E") && hr > 2 ? Mn.text = "1" + Zn + (Wn > 0 ? "+" : q) + hr : (Mn.text = Pt(Math.pow(10, _n), gn, "", "fakehover"), Rn === "D1" && gn._id.charAt(0) === "y" && (Mn.dy -= Mn.fontSize / 6));
            } else {
              if (Kn !== "D") throw "unrecognized dtick " + String(Rn);
              Mn.text = String(Math.round(Math.pow(10, p.mod(_n, 1)))), Mn.fontSize *= 0.75;
            }
            if (gn.dtick === "D1") {
              var lr = String(Mn.text).charAt(0);
              lr !== "0" && lr !== "1" || (gn._id.charAt(0) === "y" ? Mn.dx -= Mn.fontSize / 4 : (Mn.dy += Mn.fontSize / 2, Mn.dx += (gn.range[1] > gn.range[0] ? 1 : -1) * Mn.fontSize * (_n < 0 ? 0.5 : 0.25)));
            }
          }(lt, xt, 0, qt, zn) : en === "category" ? function(gn, Mn) {
            var Xn = gn._categories[Math.round(Mn.x)];
            Xn === void 0 && (Xn = ""), Mn.text = String(Xn);
          }(lt, xt) : en === "multicategory" ? function(gn, Mn, Xn) {
            var Pn = Math.round(Mn.x), wn = gn._categories[Pn] || [], Rn = wn[1] === void 0 ? "" : String(wn[1]), _n = wn[0] === void 0 ? "" : String(wn[0]);
            Xn ? Mn.text = _n + " - " + Rn : (Mn.text = Rn, Mn.text2 = _n);
          }(lt, xt, Ot) : pt(lt) ? function(gn, Mn, Xn, Pn, wn) {
            if (gn.thetaunit !== "radians" || Xn) Mn.text = Pt(Mn.x, gn, wn, Pn);
            else {
              var Rn = Mn.x / 180;
              if (Rn === 0) Mn.text = "0";
              else {
                var _n = function(Kn) {
                  function Wn(cr, zr) {
                    return Math.abs(cr - zr) <= 1e-6;
                  }
                  var hr = function(cr) {
                    for (var zr = 1; !Wn(Math.round(cr * zr) / zr, cr); ) zr *= 10;
                    return zr;
                  }(Kn), Zn = Kn * hr, lr = Math.abs(function cr(zr, Wr) {
                    return Wn(Wr, 0) ? zr : cr(Wr, zr % Wr);
                  }(Zn, hr));
                  return [Math.round(Zn / lr), Math.round(hr / lr)];
                }(Rn);
                if (_n[1] >= 100) Mn.text = Pt(p.deg2rad(Mn.x), gn, wn, Pn);
                else {
                  var En = Mn.x < 0;
                  _n[1] === 1 ? _n[0] === 1 ? Mn.text = "π" : Mn.text = _n[0] + "π" : Mn.text = ["<sup>", _n[0], "</sup>", "⁄", "<sub>", _n[1], "</sub>", "π"].join(""), En && (Mn.text = q + Mn.text);
                }
              }
            }
          }(lt, xt, Ot, qt, zn) : function(gn, Mn, Xn, Pn, wn) {
            wn === "never" ? wn = "" : gn.showexponent === "all" && Math.abs(Mn.x / gn.dtick) < 1e-6 && (wn = "hide"), Mn.text = Pt(Mn.x, gn, wn, Pn);
          }(lt, xt, 0, qt, zn), kt || (lt.tickprefix && !In(lt.showtickprefix) && (xt.text = lt.tickprefix + xt.text), lt.ticksuffix && !In(lt.showticksuffix) && (xt.text += lt.ticksuffix)), lt.labelalias && lt.labelalias.hasOwnProperty(xt.text)) {
            var Cn = lt.labelalias[xt.text];
            typeof Cn == "string" && (xt.text = Cn);
          }
          return (lt.tickson === "boundaries" || lt.showdividers) && (xt.xbnd = [Ht(xt.x - 0.5), Ht(xt.x + lt.dtick - 0.5)]), xt;
        }, ae.hoverLabelText = function(lt, st, Ot) {
          Ot && (lt = p.extendFlat({}, lt, { hoverformat: Ot }));
          var kt = p.isArrayOrTypedArray(st) ? st[0] : st, Bt = p.isArrayOrTypedArray(st) ? st[1] : void 0;
          if (Bt !== void 0 && Bt !== kt) return ae.hoverLabelText(lt, kt, Ot) + " - " + ae.hoverLabelText(lt, Bt, Ot);
          var xt = lt.type === "log" && kt <= 0, Jt = ae.tickText(lt, lt.c2l(xt ? -kt : kt), "hover").text;
          return xt ? kt === 0 ? "0" : q + Jt : Jt;
        };
        var ct = ["f", "p", "n", "μ", "m", "", "k", "M", "G", "T"];
        function ft(lt) {
          return lt === "SI" || lt === "B";
        }
        function _t(lt) {
          return lt > 14 || lt < -15;
        }
        function Pt(lt, st, Ot, kt) {
          var Bt = lt < 0, xt = st._tickround, Jt = Ot || st.exponentformat || "B", qt = st._tickexponent, en = ae.getTickFormat(st), Yt = st.separatethousands;
          if (kt) {
            var Ht = { exponentformat: Jt, minexponent: st.minexponent, dtick: st.showexponent === "none" ? st.dtick : u(lt) && Math.abs(lt) || 1, range: st.showexponent === "none" ? st.range.map(st.r2d) : [0, lt || 1] };
            $e(Ht), xt = (Number(Ht._tickround) || 0) + 4, qt = Ht._tickexponent, st.hoverformat && (en = st.hoverformat);
          }
          if (en) return st._numFormat(en)(lt).replace(/-/g, q);
          var sn, fn = Math.pow(10, -xt) / 2;
          if (Jt === "none" && (qt = 0), (lt = Math.abs(lt)) < fn) lt = "0", Bt = !1;
          else {
            if (lt += fn, qt && (lt *= Math.pow(10, -qt), xt += qt), xt === 0) lt = String(Math.floor(lt));
            else if (xt < 0) {
              lt = (lt = String(Math.round(lt))).substr(0, lt.length + xt);
              for (var In = xt; In < 0; In++) lt += "0";
            } else {
              var zn = (lt = String(lt)).indexOf(".") + 1;
              zn && (lt = lt.substr(0, zn + xt).replace(/\.?0+$/, ""));
            }
            lt = p.numSeparate(lt, st._separators, Yt);
          }
          return qt && Jt !== "hide" && (ft(Jt) && _t(qt) && (Jt = "power"), sn = qt < 0 ? q + -qt : Jt !== "power" ? "+" + qt : String(qt), Jt === "e" || Jt === "E" ? lt += Jt + sn : Jt === "power" ? lt += "×10<sup>" + sn + "</sup>" : Jt === "B" && qt === 9 ? lt += "B" : ft(Jt) && (lt += ct[qt / 3 + 5])), Bt ? q + lt : lt;
        }
        function Dt(lt, st) {
          if (lt) {
            var Ot = Object.keys(Q).reduce(function(kt, Bt) {
              return st.indexOf(Bt) !== -1 && Q[Bt].forEach(function(xt) {
                kt[xt] = 1;
              }), kt;
            }, {});
            Object.keys(lt).forEach(function(kt) {
              Ot[kt] || (kt.length === 1 ? lt[kt] = 0 : delete lt[kt]);
            });
          }
        }
        function $t(lt, st) {
          for (var Ot = [], kt = {}, Bt = 0; Bt < st.length; Bt++) {
            var xt = st[Bt];
            kt[xt.text2] ? kt[xt.text2].push(xt.x) : kt[xt.text2] = [xt.x];
          }
          for (var Jt in kt) Ot.push(Ze(lt, p.interp(kt[Jt], 0.5), Jt));
          return Ot;
        }
        function Gt(lt) {
          return lt.periodX !== void 0 ? lt.periodX : lt.x;
        }
        function Wt(lt) {
          return [lt.text, lt.x, lt.axInfo, lt.font, lt.fontSize, lt.fontColor].join("_");
        }
        function mt(lt) {
          var st = lt.title.font.size, Ot = (lt.title.text.match(d.BR_TAG_ALL) || []).length;
          return lt.title.hasOwnProperty("standoff") ? st * (he + Ot * de) : Ot ? st * (Ot + 1) * de : st;
        }
        function at(lt, st) {
          var Ot = lt.l2p(st);
          return Ot > 1 && Ot < lt._length - 1;
        }
        function vt(lt) {
          var st = l.select(lt), Ot = st.select(".text-math-group");
          return Ot.empty() ? st.select("text") : Ot;
        }
        function St(lt) {
          return lt._id + ".automargin";
        }
        function Je(lt) {
          return St(lt) + ".mirror";
        }
        function nt(lt) {
          return lt._id + ".rangeslider";
        }
        function ot(lt, st) {
          for (var Ot = 0; Ot < st.length; Ot++) lt.indexOf(st[Ot]) === -1 && lt.push(st[Ot]);
        }
        function Ye(lt, st, Ot) {
          var kt, Bt, xt = [], Jt = [], qt = lt.layout;
          for (kt = 0; kt < st.length; kt++) xt.push(ae.getFromId(lt, st[kt]));
          for (kt = 0; kt < Ot.length; kt++) Jt.push(ae.getFromId(lt, Ot[kt]));
          var en = Object.keys(m), Yt = ["anchor", "domain", "overlaying", "position", "side", "tickangle", "editType"], Ht = ["linear", "log"];
          for (kt = 0; kt < en.length; kt++) {
            var sn = en[kt], fn = xt[0][sn], In = Jt[0][sn], zn = !0, Cn = !1, gn = !1;
            if (sn.charAt(0) !== "_" && typeof fn != "function" && Yt.indexOf(sn) === -1) {
              for (Bt = 1; Bt < xt.length && zn; Bt++) {
                var Mn = xt[Bt][sn];
                sn === "type" && Ht.indexOf(fn) !== -1 && Ht.indexOf(Mn) !== -1 && fn !== Mn ? Cn = !0 : Mn !== fn && (zn = !1);
              }
              for (Bt = 1; Bt < Jt.length && zn; Bt++) {
                var Xn = Jt[Bt][sn];
                sn === "type" && Ht.indexOf(In) !== -1 && Ht.indexOf(Xn) !== -1 && In !== Xn ? gn = !0 : Jt[Bt][sn] !== In && (zn = !1);
              }
              zn && (Cn && (qt[xt[0]._name].type = "linear"), gn && (qt[Jt[0]._name].type = "linear"), Fe(qt, sn, xt, Jt, lt._fullLayout._dfltTitle));
            }
          }
          for (kt = 0; kt < lt._fullLayout.annotations.length; kt++) {
            var Pn = lt._fullLayout.annotations[kt];
            st.indexOf(Pn.xref) !== -1 && Ot.indexOf(Pn.yref) !== -1 && p.swapAttrs(qt.annotations[kt], ["?"]);
          }
        }
        function Fe(lt, st, Ot, kt, Bt) {
          var xt, Jt = p.nestedProperty, qt = Jt(lt[Ot[0]._name], st).get(), en = Jt(lt[kt[0]._name], st).get();
          for (st === "title" && (qt && qt.text === Bt.x && (qt.text = Bt.y), en && en.text === Bt.y && (en.text = Bt.x)), xt = 0; xt < Ot.length; xt++) Jt(lt, Ot[xt]._name + "." + st).set(en);
          for (xt = 0; xt < kt.length; xt++) Jt(lt, kt[xt]._name + "." + st).set(qt);
        }
        function pt(lt) {
          return lt._id === "angularaxis";
        }
        function Mt(lt, st) {
          for (var Ot = st._rangebreaks.length, kt = 0; kt < Ot; kt++) {
            var Bt = st._rangebreaks[kt];
            if (lt >= Bt.min && lt < Bt.max) return Bt.max;
          }
          return lt;
        }
        function At(lt) {
          return (lt.ticklabelposition || "").indexOf("inside") !== -1;
        }
        function Rt(lt, st) {
          At(lt._anchorAxis || {}) && lt._hideCounterAxisInsideTickLabels && lt._hideCounterAxisInsideTickLabels(st);
        }
        function Ft(lt, st, Ot, kt) {
          var Bt, xt = lt.anchor === "free" || lt.overlaying !== void 0 && lt.overlaying !== !1 ? lt.overlaying : lt._id;
          Bt = kt ? lt.side === "right" ? st : -st : st, xt in Ot || (Ot[xt] = {}), lt.side in Ot[xt] || (Ot[xt][lt.side] = 0), Ot[xt][lt.side] += Bt;
        }
        ae.getTickFormat = function(lt) {
          var st, Ot, kt, Bt, xt, Jt, qt, en;
          function Yt(fn) {
            return typeof fn != "string" ? fn : Number(fn.replace("M", "")) * P;
          }
          function Ht(fn, In) {
            var zn = ["L", "D"];
            if (typeof fn == typeof In) {
              if (typeof fn == "number") return fn - In;
              var Cn = zn.indexOf(fn.charAt(0)), gn = zn.indexOf(In.charAt(0));
              return Cn === gn ? Number(fn.replace(/(L|D)/g, "")) - Number(In.replace(/(L|D)/g, "")) : Cn - gn;
            }
            return typeof fn == "number" ? 1 : -1;
          }
          function sn(fn, In) {
            var zn = In[0] === null, Cn = In[1] === null, gn = Ht(fn, In[0]) >= 0, Mn = Ht(fn, In[1]) <= 0;
            return (zn || gn) && (Cn || Mn);
          }
          if (lt.tickformatstops && lt.tickformatstops.length > 0) switch (lt.type) {
            case "date":
            case "linear":
              for (st = 0; st < lt.tickformatstops.length; st++) if ((kt = lt.tickformatstops[st]).enabled && (Bt = lt.dtick, xt = kt.dtickrange, Jt = void 0, qt = void 0, en = void 0, Jt = Yt || function(fn) {
                return fn;
              }, qt = xt[0], en = xt[1], (!qt && typeof qt != "number" || Jt(qt) <= Jt(Bt)) && (!en && typeof en != "number" || Jt(en) >= Jt(Bt)))) {
                Ot = kt;
                break;
              }
              break;
            case "log":
              for (st = 0; st < lt.tickformatstops.length; st++) if ((kt = lt.tickformatstops[st]).enabled && sn(lt.dtick, kt.dtickrange)) {
                Ot = kt;
                break;
              }
          }
          return Ot ? Ot.value : lt.tickformat;
        }, ae.getSubplots = function(lt, st) {
          var Ot = lt._fullLayout._subplots, kt = Ot.cartesian.concat(Ot.gl2d || []), Bt = st ? ae.findSubplotsWithAxis(kt, st) : kt;
          return Bt.sort(function(xt, Jt) {
            var qt = xt.substr(1).split("y"), en = Jt.substr(1).split("y");
            return qt[0] === en[0] ? +qt[1] - +en[1] : +qt[0] - +en[0];
          }), Bt;
        }, ae.findSubplotsWithAxis = function(lt, st) {
          for (var Ot = new RegExp(st._id.charAt(0) === "x" ? "^" + st._id + "y" : st._id + "$"), kt = [], Bt = 0; Bt < lt.length; Bt++) {
            var xt = lt[Bt];
            Ot.test(xt) && kt.push(xt);
          }
          return kt;
        }, ae.makeClipPaths = function(lt) {
          var st = lt._fullLayout;
          if (!st._hasOnlyLargeSploms) {
            var Ot, kt, Bt = { _offset: 0, _length: st.width, _id: "" }, xt = { _offset: 0, _length: st.height, _id: "" }, Jt = ae.list(lt, "x", !0), qt = ae.list(lt, "y", !0), en = [];
            for (Ot = 0; Ot < Jt.length; Ot++) for (en.push({ x: Jt[Ot], y: xt }), kt = 0; kt < qt.length; kt++) Ot === 0 && en.push({ x: Bt, y: qt[kt] }), en.push({ x: Jt[Ot], y: qt[kt] });
            var Yt = st._clips.selectAll(".axesclip").data(en, function(Ht) {
              return Ht.x._id + Ht.y._id;
            });
            Yt.enter().append("clipPath").classed("axesclip", !0).attr("id", function(Ht) {
              return "clip" + st._uid + Ht.x._id + Ht.y._id;
            }).append("rect"), Yt.exit().remove(), Yt.each(function(Ht) {
              l.select(this).select("rect").attr({ x: Ht.x._offset || 0, y: Ht.y._offset || 0, width: Ht.x._length || 1, height: Ht.y._length || 1 });
            });
          }
        }, ae.draw = function(lt, st, Ot) {
          var kt = lt._fullLayout;
          st === "redraw" && kt._paper.selectAll("g.subplot").each(function(qt) {
            var en = qt[0], Yt = kt._plots[en];
            if (Yt) {
              var Ht = Yt.xaxis, sn = Yt.yaxis;
              Yt.xaxislayer.selectAll("." + Ht._id + "tick").remove(), Yt.yaxislayer.selectAll("." + sn._id + "tick").remove(), Yt.xaxislayer.selectAll("." + Ht._id + "tick2").remove(), Yt.yaxislayer.selectAll("." + sn._id + "tick2").remove(), Yt.xaxislayer.selectAll("." + Ht._id + "divider").remove(), Yt.yaxislayer.selectAll("." + sn._id + "divider").remove(), Yt.minorGridlayer && Yt.minorGridlayer.selectAll("path").remove(), Yt.gridlayer && Yt.gridlayer.selectAll("path").remove(), Yt.zerolinelayer && Yt.zerolinelayer.selectAll("path").remove(), kt._infolayer.select(".g-" + Ht._id + "title").remove(), kt._infolayer.select(".g-" + sn._id + "title").remove();
            }
          });
          var Bt = st && st !== "redraw" ? st : ae.listIds(lt), xt = ae.list(lt).filter(function(qt) {
            return qt.autoshift;
          }).map(function(qt) {
            return qt.overlaying;
          });
          Bt.map(function(qt) {
            var en = ae.getFromId(lt, qt);
            if (en.tickmode === "sync" && en.overlaying) {
              var Yt = Bt.findIndex(function(Ht) {
                return Ht === en.overlaying;
              });
              Yt >= 0 && Bt.unshift(Bt.splice(Yt, 1).shift());
            }
          });
          var Jt = { false: { left: 0, right: 0 } };
          return p.syncOrAsync(Bt.map(function(qt) {
            return function() {
              if (qt) {
                var en = ae.getFromId(lt, qt);
                Ot || (Ot = {}), Ot.axShifts = Jt, Ot.overlayingShiftedAx = xt;
                var Yt = ae.drawOne(lt, en, Ot);
                return en._shiftPusher && Ft(en, en._fullDepth || 0, Jt, !0), en._r = en.range.slice(), en._rl = p.simpleMap(en._r, en.r2l), Yt;
              }
            };
          }));
        }, ae.drawOne = function(lt, st, Ot) {
          var kt, Bt, xt, Jt = (Ot = Ot || {}).axShifts || {}, qt = Ot.overlayingShiftedAx || [];
          st.setScale();
          var en = lt._fullLayout, Yt = st._id, Ht = Yt.charAt(0), sn = ae.counterLetter(Yt), fn = en._plots[st._mainSubplot];
          if (fn) {
            if (st._shiftPusher = st.autoshift || qt.indexOf(st._id) !== -1 || qt.indexOf(st.overlaying) !== -1, st._shiftPusher & st.anchor === "free") {
              var In = st.linewidth / 2 || 0;
              st.ticks === "inside" && (In += st.ticklen), Ft(st, In, Jt, !0), Ft(st, st.shift || 0, Jt, !1);
            }
            Ot.skipTitle === !0 && st._shift !== void 0 || (st._shift = function(pn, dn) {
              return pn.autoshift ? dn[pn.overlaying][pn.side] : pn.shift || 0;
            }(st, Jt));
            var zn = fn[Ht + "axislayer"], Cn = st._mainLinePosition, gn = Cn += st._shift, Mn = st._mainMirrorPosition, Xn = st._vals = ae.calcTicks(st), Pn = [st.mirror, gn, Mn].join("_");
            for (kt = 0; kt < Xn.length; kt++) Xn[kt].axInfo = Pn;
            st._selections = {}, st._tickAngles && (st._prevTickAngles = st._tickAngles), st._tickAngles = {}, st._depth = null;
            var wn = {};
            if (st.visible) {
              var Rn, _n, En = ae.makeTransTickFn(st), Kn = ae.makeTransTickLabelFn(st), Wn = st.ticks === "inside", hr = st.ticks === "outside";
              if (st.tickson === "boundaries") {
                var Zn = function(pn, dn) {
                  var Dn, nr = [], pr = function(ir, gr) {
                    var Pr = ir.xbnd[gr];
                    Pr !== null && nr.push(p.extendFlat({}, ir, { x: Pr }));
                  };
                  if (dn.length) {
                    for (Dn = 0; Dn < dn.length; Dn++) pr(dn[Dn], 0);
                    pr(dn[Dn - 1], 1);
                  }
                  return nr;
                }(0, Xn);
                _n = ae.clipEnds(st, Zn), Rn = Wn ? _n : Zn;
              } else _n = ae.clipEnds(st, Xn), Rn = Wn && st.ticklabelmode !== "period" ? _n : Xn;
              var lr, cr = st._gridVals = _n, zr = function(pn, dn) {
                var Dn, nr, pr = [], ir = dn.length && dn[dn.length - 1].x < dn[0].x, gr = function(Cr, Er) {
                  var Sr = Cr.xbnd[Er];
                  Sr !== null && pr.push(p.extendFlat({}, Cr, { x: Sr }));
                };
                if (pn.showdividers && dn.length) {
                  for (Dn = 0; Dn < dn.length; Dn++) {
                    var Pr = dn[Dn];
                    Pr.text2 !== nr && gr(Pr, ir ? 1 : 0), nr = Pr.text2;
                  }
                  gr(dn[Dn - 1], ir ? 0 : 1);
                }
                return pr;
              }(st, Xn);
              if (!en._hasOnlyLargeSploms) {
                var Wr = st._subplotsWith, mr = {};
                for (kt = 0; kt < Wr.length; kt++) {
                  Bt = Wr[kt];
                  var Ir = (xt = en._plots[Bt])[sn + "axis"], yr = Ir._mainAxis._id;
                  if (!mr[yr]) {
                    mr[yr] = 1;
                    var Vr = Ht === "x" ? "M0," + Ir._offset + "v" + Ir._length : "M" + Ir._offset + ",0h" + Ir._length;
                    ae.drawGrid(lt, st, { vals: cr, counterAxis: Ir, layer: xt.gridlayer.select("." + Yt), minorLayer: xt.minorGridlayer.select("." + Yt), path: Vr, transFn: En }), ae.drawZeroLine(lt, st, { counterAxis: Ir, layer: xt.zerolinelayer, path: Vr, transFn: En });
                  }
                }
              }
              var rn = ae.getTickSigns(st), Tn = ae.getTickSigns(st, "minor");
              if (st.ticks || st.minor && st.minor.ticks) {
                var sr, $n, ur, Tr, wr = ae.makeTickPath(st, gn, rn[2]), Fr = ae.makeTickPath(st, gn, Tn[2], { minor: !0 });
                if (st._anchorAxis && st.mirror && st.mirror !== !0 ? (sr = ae.makeTickPath(st, Mn, rn[3]), $n = ae.makeTickPath(st, Mn, Tn[3], { minor: !0 }), ur = wr + sr, Tr = Fr + $n) : (sr = "", $n = "", ur = wr, Tr = Fr), st.showdividers && hr && st.tickson === "boundaries") {
                  var Xr = {};
                  for (kt = 0; kt < zr.length; kt++) Xr[zr[kt].x] = 1;
                  lr = function(pn) {
                    return Xr[pn.x] ? sr : ur;
                  };
                } else lr = function(pn) {
                  return pn.minor ? Tr : ur;
                };
              }
              if (ae.drawTicks(lt, st, { vals: Rn, layer: zn, path: lr, transFn: En }), st.mirror === "allticks") {
                var un = Object.keys(st._linepositions || {});
                for (kt = 0; kt < un.length; kt++) {
                  Bt = un[kt], xt = en._plots[Bt];
                  var Gn = st._linepositions[Bt] || [], on = Gn[0], ln = Gn[1], bn = Gn[2], Nn = ae.makeTickPath(st, on, bn ? rn[0] : Tn[0], { minor: bn }) + ae.makeTickPath(st, ln, bn ? rn[1] : Tn[1], { minor: bn });
                  ae.drawTicks(lt, st, { vals: Rn, layer: xt[Ht + "axislayer"], path: Nn, transFn: En });
                }
              }
              var jn = [];
              if (jn.push(function() {
                return ae.drawLabels(lt, st, { vals: Xn, layer: zn, plotinfo: xt, transFn: Kn, labelFns: ae.makeLabelFns(st, gn) });
              }), st.type === "multicategory") {
                var Jn = { x: 2, y: 10 }[Ht];
                jn.push(function() {
                  var pn = { x: "height", y: "width" }[Ht], dn = Ln()[pn] + Jn + (st._tickAngles[Yt + "tick"] ? st.tickfont.size * de : 0);
                  return ae.drawLabels(lt, st, { vals: $t(st, Xn), layer: zn, cls: Yt + "tick2", repositionOnUpdate: !0, secondary: !0, transFn: En, labelFns: ae.makeLabelFns(st, gn + dn * rn[4]) });
                }), jn.push(function() {
                  return st._depth = rn[4] * (Ln("tick2")[st.side] - gn), function(pn, dn, Dn) {
                    var nr = dn._id + "divider", pr = Dn.vals, ir = Dn.layer.selectAll("path." + nr).data(pr, Wt);
                    ir.exit().remove(), ir.enter().insert("path", ":first-child").classed(nr, 1).classed("crisp", 1).call(c.stroke, dn.dividercolor).style("stroke-width", g.crispRound(pn, dn.dividerwidth, 1) + "px"), ir.attr("transform", Dn.transFn).attr("d", Dn.path);
                  }(lt, st, { vals: zr, layer: zn, path: ae.makeTickPath(st, gn, rn[4], { len: st._depth }), transFn: En });
                });
              } else st.title.hasOwnProperty("standoff") && jn.push(function() {
                st._depth = rn[4] * (Ln()[st.side] - gn);
              });
              var Hn = h.getComponentMethod("rangeslider", "isVisible")(st);
              return Ot.skipTitle || Hn && st.side === "bottom" || jn.push(function() {
                return function(pn, dn) {
                  var Dn, nr = pn._fullLayout, pr = dn._id, ir = pr.charAt(0), gr = dn.title.font.size, Pr = (dn.title.text.match(d.BR_TAG_ALL) || []).length;
                  if (dn.title.hasOwnProperty("standoff")) dn.side === "bottom" || dn.side === "right" ? Dn = dn._depth + dn.title.standoff + gr * he : dn.side !== "top" && dn.side !== "left" || (Dn = dn._depth + dn.title.standoff + gr * (ce + Pr * de));
                  else {
                    var Cr = At(dn);
                    if (dn.type === "multicategory") Dn = dn._depth;
                    else {
                      var Er = 1.5 * gr;
                      Cr && (Er = 0.5 * gr, dn.ticks === "outside" && (Er += dn.ticklen)), Dn = 10 + Er + (dn.linewidth ? dn.linewidth - 1 : 0);
                    }
                    Cr || (Dn += ir === "x" ? dn.side === "top" ? gr * (dn.showticklabels ? 1 : 0) : gr * (dn.showticklabels ? 1.5 : 0.5) : dn.side === "right" ? gr * (dn.showticklabels ? 1 : 0.5) : gr * (dn.showticklabels ? 0.5 : 0));
                  }
                  var Sr, Dr, Qn, ri, Zr = ae.getPxPosition(pn, dn);
                  if (ir === "x" ? (Dr = dn._offset + dn._length / 2, Qn = dn.side === "top" ? Zr - Dn : Zr + Dn) : (Qn = dn._offset + dn._length / 2, Dr = dn.side === "right" ? Zr + Dn : Zr - Dn, Sr = { rotate: "-90", offset: 0 }), dn.type !== "multicategory") {
                    var Br = dn._selections[dn._id + "tick"];
                    if (ri = { selection: Br, side: dn.side }, Br && Br.node() && Br.node().parentNode) {
                      var Yr = g.getTranslate(Br.node().parentNode);
                      ri.offsetLeft = Yr.x, ri.offsetTop = Yr.y;
                    }
                    dn.title.hasOwnProperty("standoff") && (ri.pad = 0);
                  }
                  return dn._titleStandoff = Dn, f.draw(pn, pr + "title", { propContainer: dn, propName: dn._name + ".title.text", placeholder: nr._dfltTitle[ir], avoid: ri, transform: Sr, attributes: { x: Dr, y: Qn, "text-anchor": "middle" } });
                }(lt, st);
              }), jn.push(function() {
                var pn, dn, Dn, nr, pr = st.side.charAt(0), ir = ne[st.side].charAt(0), gr = ae.getPxPosition(lt, st), Pr = hr ? st.ticklen : 0;
                (st.automargin || Hn || st._shiftPusher) && (st.type === "multicategory" ? pn = Ln("tick2") : (pn = Ln(), Ht === "x" && pr === "b" && (st._depth = Math.max(pn.width > 0 ? pn.bottom - gr : 0, Pr))));
                var Cr = 0, Er = 0;
                if (st._shiftPusher && (Cr = Math.max(Pr, pn.height > 0 ? pr === "l" ? gr - pn.left : pn.right - gr : 0), st.title.text !== en._dfltTitle[Ht] && (Er = (st._titleStandoff || 0) + (st._titleScoot || 0), pr === "l" && (Er += mt(st))), st._fullDepth = Math.max(Cr, Er)), st.automargin) {
                  dn = { x: 0, y: 0, r: 0, l: 0, t: 0, b: 0 };
                  var Sr = [0, 1], Dr = typeof st._shift == "number" ? st._shift : 0;
                  if (Ht === "x") {
                    if (pr === "b" ? dn[pr] = st._depth : (dn[pr] = st._depth = Math.max(pn.width > 0 ? gr - pn.top : 0, Pr), Sr.reverse()), pn.width > 0) {
                      var Qn = pn.right - (st._offset + st._length);
                      Qn > 0 && (dn.xr = 1, dn.r = Qn);
                      var ri = st._offset - pn.left;
                      ri > 0 && (dn.xl = 0, dn.l = ri);
                    }
                  } else if (pr === "l" ? (st._depth = Math.max(pn.height > 0 ? gr - pn.left : 0, Pr), dn[pr] = st._depth - Dr) : (st._depth = Math.max(pn.height > 0 ? pn.right - gr : 0, Pr), dn[pr] = st._depth + Dr, Sr.reverse()), pn.height > 0) {
                    var Zr = pn.bottom - (st._offset + st._length);
                    Zr > 0 && (dn.yb = 0, dn.b = Zr);
                    var Br = st._offset - pn.top;
                    Br > 0 && (dn.yt = 1, dn.t = Br);
                  }
                  dn[sn] = st.anchor === "free" ? st.position : st._anchorAxis.domain[Sr[0]], st.title.text !== en._dfltTitle[Ht] && (dn[pr] += mt(st) + (st.title.standoff || 0)), st.mirror && st.anchor !== "free" && ((Dn = { x: 0, y: 0, r: 0, l: 0, t: 0, b: 0 })[ir] = st.linewidth, st.mirror && st.mirror !== !0 && (Dn[ir] += Pr), st.mirror === !0 || st.mirror === "ticks" ? Dn[sn] = st._anchorAxis.domain[Sr[1]] : st.mirror !== "all" && st.mirror !== "allticks" || (Dn[sn] = [st._counterDomainMin, st._counterDomainMax][Sr[1]]));
                }
                Hn && (nr = h.getComponentMethod("rangeslider", "autoMarginOpts")(lt, st)), typeof st.automargin == "string" && (Dt(dn, st.automargin), Dt(Dn, st.automargin)), i.autoMargin(lt, St(st), dn), i.autoMargin(lt, Je(st), Dn), i.autoMargin(lt, nt(st), nr);
              }), p.syncOrAsync(jn);
            }
          }
          function Ln(pn) {
            var dn = Yt + (pn || "tick");
            return wn[dn] || (wn[dn] = function(Dn, nr, pr) {
              var ir, gr, Pr, Cr;
              if (Dn._selections[nr].size()) ir = 1 / 0, gr = -1 / 0, Pr = 1 / 0, Cr = -1 / 0, Dn._selections[nr].each(function() {
                var Sr = vt(this), Dr = g.bBox(Sr.node().parentNode);
                ir = Math.min(ir, Dr.top), gr = Math.max(gr, Dr.bottom), Pr = Math.min(Pr, Dr.left), Cr = Math.max(Cr, Dr.right);
              });
              else {
                var Er = ae.makeLabelFns(Dn, pr);
                ir = gr = Er.yFn({ dx: 0, dy: 0, fontSize: 0 }), Pr = Cr = Er.xFn({ dx: 0, dy: 0, fontSize: 0 });
              }
              return { top: ir, bottom: gr, left: Pr, right: Cr, height: gr - ir, width: Cr - Pr };
            }(st, dn, gn)), wn[dn];
          }
        }, ae.getTickSigns = function(lt, st) {
          var Ot = lt._id.charAt(0), kt = { x: "top", y: "right" }[Ot], Bt = lt.side === kt ? 1 : -1, xt = [-1, 1, Bt, -Bt];
          return (st ? (lt.minor || {}).ticks : lt.ticks) !== "inside" == (Ot === "x") && (xt = xt.map(function(Jt) {
            return -Jt;
          })), lt.side && xt.push({ l: -1, t: -1, r: 1, b: 1 }[lt.side.charAt(0)]), xt;
        }, ae.makeTransTickFn = function(lt) {
          return lt._id.charAt(0) === "x" ? function(st) {
            return _(lt._offset + lt.l2p(st.x), 0);
          } : function(st) {
            return _(0, lt._offset + lt.l2p(st.x));
          };
        }, ae.makeTransTickLabelFn = function(lt) {
          var st = function(Ht) {
            var sn = Ht.ticklabelposition || "", fn = function(En) {
              return sn.indexOf(En) !== -1;
            }, In = fn("top"), zn = fn("left"), Cn = fn("right"), gn = fn("bottom"), Mn = fn("inside"), Xn = gn || zn || In || Cn;
            if (!Xn && !Mn) return [0, 0];
            var Pn = Ht.side, wn = Xn ? (Ht.tickwidth || 0) / 2 : 0, Rn = 3, _n = Ht.tickfont ? Ht.tickfont.size : 12;
            return (gn || In) && (wn += _n * he, Rn += (Ht.linewidth || 0) / 2), (zn || Cn) && (wn += (Ht.linewidth || 0) / 2, Rn += 3), Mn && Pn === "top" && (Rn -= _n * (1 - he)), (zn || In) && (wn = -wn), Pn !== "bottom" && Pn !== "right" || (Rn = -Rn), [Xn ? wn : 0, Mn ? Rn : 0];
          }(lt), Ot = lt.ticklabelshift || 0, kt = lt.ticklabelstandoff || 0, Bt = st[0], xt = st[1], Jt = lt.range[0] > lt.range[1], qt = lt.ticklabelposition && lt.ticklabelposition.indexOf("inside") !== -1, en = !qt;
          if (Ot && (Ot *= Jt ? -1 : 1), kt) {
            var Yt = lt.side;
            kt *= qt && (Yt === "top" || Yt === "left") || en && (Yt === "bottom" || Yt === "right") ? 1 : -1;
          }
          return lt._id.charAt(0) === "x" ? function(Ht) {
            return _(Bt + lt._offset + lt.l2p(Gt(Ht)) + Ot, xt + kt);
          } : function(Ht) {
            return _(xt + kt, Bt + lt._offset + lt.l2p(Gt(Ht)) + Ot);
          };
        }, ae.makeTickPath = function(lt, st, Ot, kt) {
          kt || (kt = {});
          var Bt = kt.minor;
          if (Bt && !lt.minor) return "";
          var xt = kt.len !== void 0 ? kt.len : Bt ? lt.minor.ticklen : lt.ticklen, Jt = lt._id.charAt(0), qt = (lt.linewidth || 1) / 2;
          return Jt === "x" ? "M0," + (st + qt * Ot) + "v" + xt * Ot : "M" + (st + qt * Ot) + ",0h" + xt * Ot;
        }, ae.makeLabelFns = function(lt, st, Ot) {
          var kt = lt.ticklabelposition || "", Bt = function(Zn) {
            return kt.indexOf(Zn) !== -1;
          }, xt = Bt("top"), Jt = Bt("left"), qt = Bt("right"), en = Bt("bottom") || Jt || xt || qt, Yt = Bt("inside"), Ht = kt === "inside" && lt.ticks === "inside" || !Yt && lt.ticks === "outside" && lt.tickson !== "boundaries", sn = 0, fn = 0, In = Ht ? lt.ticklen : 0;
          if (Yt ? In *= -1 : en && (In = 0), Ht && (sn += In, Ot)) {
            var zn = p.deg2rad(Ot);
            sn = In * Math.cos(zn) + 1, fn = In * Math.sin(zn);
          }
          lt.showticklabels && (Ht || lt.showline) && (sn += 0.2 * lt.tickfont.size);
          var Cn, gn, Mn, Xn, Pn, wn = { labelStandoff: sn += (lt.linewidth || 1) / 2 * (Yt ? -1 : 1), labelShift: fn }, Rn = 0, _n = lt.side, En = lt._id.charAt(0), Kn = lt.tickangle;
          if (En === "x") Xn = (Pn = !Yt && _n === "bottom" || Yt && _n === "top") ? 1 : -1, Yt && (Xn *= -1), Cn = fn * Xn, gn = st + sn * Xn, Mn = Pn ? 1 : -0.2, Math.abs(Kn) === 90 && (Yt ? Mn += ce : Mn = Kn === -90 && _n === "bottom" ? he : Kn === 90 && _n === "top" ? ce : 0.5, Rn = ce / 2 * (Kn / 90)), wn.xFn = function(Zn) {
            return Zn.dx + Cn + Rn * Zn.fontSize;
          }, wn.yFn = function(Zn) {
            return Zn.dy + gn + Zn.fontSize * Mn;
          }, wn.anchorFn = function(Zn, lr) {
            if (en) {
              if (Jt) return "end";
              if (qt) return "start";
            }
            return u(lr) && lr !== 0 && lr !== 180 ? lr * Xn < 0 !== Yt ? "end" : "start" : "middle";
          }, wn.heightFn = function(Zn, lr, cr) {
            return lr < -60 || lr > 60 ? -0.5 * cr : lt.side === "top" !== Yt ? -cr : 0;
          };
          else if (En === "y") {
            if (Xn = (Pn = !Yt && _n === "left" || Yt && _n === "right") ? 1 : -1, Yt && (Xn *= -1), Cn = sn, gn = fn * Xn, Mn = 0, Yt || Math.abs(Kn) !== 90 || (Mn = Kn === -90 && _n === "left" || Kn === 90 && _n === "right" ? he : 0.5), Yt) {
              var Wn = u(Kn) ? +Kn : 0;
              if (Wn !== 0) {
                var hr = p.deg2rad(Wn);
                Rn = Math.abs(Math.sin(hr)) * he * Xn, Mn = 0;
              }
            }
            wn.xFn = function(Zn) {
              return Zn.dx + st - (Cn + Zn.fontSize * Mn) * Xn + Rn * Zn.fontSize;
            }, wn.yFn = function(Zn) {
              return Zn.dy + gn + Zn.fontSize * ce;
            }, wn.anchorFn = function(Zn, lr) {
              return u(lr) && Math.abs(lr) === 90 ? "middle" : Pn ? "end" : "start";
            }, wn.heightFn = function(Zn, lr, cr) {
              return lt.side === "right" && (lr *= -1), lr < -30 ? -cr : lr < 30 ? -0.5 * cr : 0;
            };
          }
          return wn;
        }, ae.drawTicks = function(lt, st, Ot) {
          Ot = Ot || {};
          var kt = st._id + "tick", Bt = [].concat(st.minor && st.minor.ticks ? Ot.vals.filter(function(Jt) {
            return Jt.minor && !Jt.noTick;
          }) : []).concat(st.ticks ? Ot.vals.filter(function(Jt) {
            return !Jt.minor && !Jt.noTick;
          }) : []), xt = Ot.layer.selectAll("path." + kt).data(Bt, Wt);
          xt.exit().remove(), xt.enter().append("path").classed(kt, 1).classed("ticks", 1).classed("crisp", Ot.crisp !== !1).each(function(Jt) {
            return c.stroke(l.select(this), Jt.minor ? st.minor.tickcolor : st.tickcolor);
          }).style("stroke-width", function(Jt) {
            return g.crispRound(lt, Jt.minor ? st.minor.tickwidth : st.tickwidth, 1) + "px";
          }).attr("d", Ot.path).style("display", null), Rt(st, [ee]), xt.attr("transform", Ot.transFn);
        }, ae.drawGrid = function(lt, st, Ot) {
          if (Ot = Ot || {}, st.tickmode !== "sync") {
            var kt = st._id + "grid", Bt = st.minor && st.minor.showgrid, xt = Bt ? Ot.vals.filter(function(Mn) {
              return Mn.minor;
            }) : [], Jt = st.showgrid ? Ot.vals.filter(function(Mn) {
              return !Mn.minor;
            }) : [], qt = Ot.counterAxis;
            if (qt && ae.shouldShowZeroLine(lt, st, qt)) for (var en = st.tickmode === "array", Yt = 0; Yt < Jt.length; Yt++) {
              var Ht = Jt[Yt].x;
              if (en ? !Ht : Math.abs(Ht) < st.dtick / 100) {
                if (Jt = Jt.slice(0, Yt).concat(Jt.slice(Yt + 1)), !en) break;
                Yt--;
              }
            }
            st._gw = g.crispRound(lt, st.gridwidth, 1);
            for (var sn = Bt ? g.crispRound(lt, st.minor.gridwidth, 1) : 0, fn = Ot.layer, In = Ot.minorLayer, zn = 1; zn >= 0; zn--) {
              var Cn = zn ? fn : In;
              if (Cn) {
                var gn = Cn.selectAll("path." + kt).data(zn ? Jt : xt, Wt);
                gn.exit().remove(), gn.enter().append("path").classed(kt, 1).classed("crisp", Ot.crisp !== !1), gn.attr("transform", Ot.transFn).attr("d", Ot.path).each(function(Mn) {
                  return c.stroke(l.select(this), Mn.minor ? st.minor.gridcolor : st.gridcolor || "#ddd");
                }).style("stroke-dasharray", function(Mn) {
                  return g.dashStyle(Mn.minor ? st.minor.griddash : st.griddash, Mn.minor ? st.minor.gridwidth : st.gridwidth);
                }).style("stroke-width", function(Mn) {
                  return (Mn.minor ? sn : st._gw) + "px";
                }).style("display", null), typeof Ot.path == "function" && gn.attr("d", Ot.path);
              }
            }
            Rt(st, [Y, te]);
          }
        }, ae.drawZeroLine = function(lt, st, Ot) {
          Ot = Ot || Ot;
          var kt = st._id + "zl", Bt = ae.shouldShowZeroLine(lt, st, Ot.counterAxis), xt = Ot.layer.selectAll("path." + kt).data(Bt ? [{ x: 0, id: st._id }] : []);
          xt.exit().remove(), xt.enter().append("path").classed(kt, 1).classed("zl", 1).classed("crisp", Ot.crisp !== !1).each(function() {
            Ot.layer.selectAll("path").sort(function(Jt, qt) {
              return ye(Jt.id, qt.id);
            });
          }), xt.attr("transform", Ot.transFn).attr("d", Ot.path).call(c.stroke, st.zerolinecolor || c.defaultLine).style("stroke-width", g.crispRound(lt, st.zerolinewidth, st._gw || 1) + "px").style("display", null), Rt(st, [re]);
        }, ae.drawLabels = function(lt, st, Ot) {
          Ot = Ot || {};
          var kt = lt._fullLayout, Bt = st._id, xt = Ot.cls || Bt + "tick", Jt = Ot.vals.filter(function(mr) {
            return mr.text;
          }), qt = Ot.labelFns, en = Ot.secondary ? 0 : st.tickangle, Yt = (st._prevTickAngles || {})[xt], Ht = Ot.layer.selectAll("g." + xt).data(st.showticklabels ? Jt : [], Wt), sn = [];
          function fn(mr, Ir) {
            mr.each(function(yr) {
              var Vr = l.select(this), rn = Vr.select(".text-math-group"), Tn = qt.anchorFn(yr, Ir), sr = Ot.transFn.call(Vr.node(), yr) + (u(Ir) && +Ir != 0 ? " rotate(" + Ir + "," + qt.xFn(yr) + "," + (qt.yFn(yr) - yr.fontSize / 2) + ")" : ""), $n = d.lineCount(Vr), ur = de * yr.fontSize, Tr = qt.heightFn(yr, u(Ir) ? +Ir : 0, ($n - 1) * ur);
              if (Tr && (sr += _(0, Tr)), rn.empty()) {
                var wr = Vr.select("text");
                wr.attr({ transform: sr, "text-anchor": Tn }), wr.style("opacity", 1), st._adjustTickLabelsOverflow && st._adjustTickLabelsOverflow();
              } else {
                var Fr = g.bBox(rn.node()).width * { end: -0.5, start: 0.5 }[Tn];
                rn.attr("transform", sr + _(Fr, 0));
              }
            });
          }
          Ht.enter().append("g").classed(xt, 1).append("text").attr("text-anchor", "middle").each(function(mr) {
            var Ir = l.select(this), yr = lt._promises.length;
            Ir.call(d.positionText, qt.xFn(mr), qt.yFn(mr)).call(g.font, { family: mr.font, size: mr.fontSize, color: mr.fontColor, weight: mr.fontWeight, style: mr.fontStyle, variant: mr.fontVariant, textcase: mr.fontTextcase, lineposition: mr.fontLineposition, shadow: mr.fontShadow }).text(mr.text).call(d.convertToTspans, lt), lt._promises[yr] ? sn.push(lt._promises.pop().then(function() {
              fn(Ir, en);
            })) : fn(Ir, en);
          }), Rt(st, [X]), Ht.exit().remove(), Ot.repositionOnUpdate && Ht.each(function(mr) {
            l.select(this).select("text").call(d.positionText, qt.xFn(mr), qt.yFn(mr));
          }), st._adjustTickLabelsOverflow = function() {
            var mr = st.ticklabeloverflow;
            if (mr && mr !== "allow") {
              var Ir = mr.indexOf("hide") !== -1, yr = st._id.charAt(0) === "x", Vr = 0, rn = yr ? lt._fullLayout.width : lt._fullLayout.height;
              if (mr.indexOf("domain") !== -1) {
                var Tn = p.simpleMap(st.range, st.r2l);
                Vr = st.l2p(Tn[0]) + st._offset, rn = st.l2p(Tn[1]) + st._offset;
              }
              var sr = Math.min(Vr, rn), $n = Math.max(Vr, rn), ur = st.side, Tr = 1 / 0, wr = -1 / 0;
              for (var Fr in Ht.each(function(Gn) {
                var on = l.select(this);
                if (on.select(".text-math-group").empty()) {
                  var ln = g.bBox(on.node()), bn = 0;
                  yr ? (ln.right > $n || ln.left < sr) && (bn = 1) : (ln.bottom > $n || ln.top + (st.tickangle ? 0 : Gn.fontSize / 4) < sr) && (bn = 1);
                  var Nn = on.select("text");
                  bn ? Ir && Nn.style("opacity", 0) : (Nn.style("opacity", 1), Tr = ur === "bottom" || ur === "right" ? Math.min(Tr, yr ? ln.top : ln.left) : -1 / 0, wr = ur === "top" || ur === "left" ? Math.max(wr, yr ? ln.bottom : ln.right) : 1 / 0);
                }
              }), kt._plots) {
                var Xr = kt._plots[Fr];
                if (st._id === Xr.xaxis._id || st._id === Xr.yaxis._id) {
                  var un = yr ? Xr.yaxis : Xr.xaxis;
                  un && (un["_visibleLabelMin_" + st._id] = Tr, un["_visibleLabelMax_" + st._id] = wr);
                }
              }
            }
          }, st._hideCounterAxisInsideTickLabels = function(mr) {
            var Ir = st._id.charAt(0) === "x", yr = [];
            for (var Vr in kt._plots) {
              var rn = kt._plots[Vr];
              st._id !== rn.xaxis._id && st._id !== rn.yaxis._id || yr.push(Ir ? rn.yaxis : rn.xaxis);
            }
            yr.forEach(function(Tn, sr) {
              Tn && At(Tn) && (mr || [re, te, Y, ee, X]).forEach(function($n) {
                var ur = $n.K === "tick" && $n.L === "text" && st.ticklabelmode === "period", Tr = kt._plots[st._mainSubplot];
                ($n.K === re.K ? Tr.zerolinelayer.selectAll("." + st._id + "zl") : $n.K === te.K ? Tr.minorGridlayer.selectAll("." + st._id) : $n.K === Y.K ? Tr.gridlayer.selectAll("." + st._id) : Tr[st._id.charAt(0) + "axislayer"]).each(function() {
                  var wr = l.select(this);
                  $n.L && (wr = wr.selectAll($n.L)), wr.each(function(Fr) {
                    var Xr = st.l2p(ur ? Gt(Fr) : Fr.x) + st._offset, un = l.select(this);
                    Xr < st["_visibleLabelMax_" + Tn._id] && Xr > st["_visibleLabelMin_" + Tn._id] ? un.style("display", "none") : $n.K !== "tick" || sr || un.style("display", null);
                  });
                });
              });
            });
          }, fn(Ht, Yt + 1 ? Yt : en);
          var In = null;
          st._selections && (st._selections[xt] = Ht);
          var zn = [function() {
            return sn.length && Promise.all(sn);
          }];
          st.automargin && kt._redrawFromAutoMarginCount && Yt === 90 ? (In = Yt, zn.push(function() {
            fn(Ht, Yt);
          })) : zn.push(function() {
            if (fn(Ht, en), Jt.length && st.autotickangles && (st.type !== "log" || String(st.dtick).charAt(0) !== "D")) {
              In = st.autotickangles[0];
              var mr, Ir = 0, yr = [], Vr = 1;
              Ht.each(function(Ln) {
                Ir = Math.max(Ir, Ln.fontSize);
                var pn = st.l2p(Ln.x), dn = vt(this), Dn = g.bBox(dn.node());
                Vr = Math.max(Vr, d.lineCount(dn)), yr.push({ top: 0, bottom: 10, height: 10, left: pn - Dn.width / 2, right: pn + Dn.width / 2 + 2, width: Dn.width + 2 });
              });
              var rn = (st.tickson === "boundaries" || st.showdividers) && !Ot.secondary, Tn = Jt.length, sr = Math.abs((Jt[Tn - 1].x - Jt[0].x) * st._m) / (Tn - 1), $n = rn ? sr / 2 : sr, ur = rn ? st.ticklen : 1.25 * Ir * Vr, Tr = $n / Math.sqrt(Math.pow($n, 2) + Math.pow(ur, 2)), wr = st.autotickangles.map(function(Ln) {
                return Ln * Math.PI / 180;
              }), Fr = wr.find(function(Ln) {
                return Math.abs(Math.cos(Ln)) <= Tr;
              });
              Fr === void 0 && (Fr = wr.reduce(function(Ln, pn) {
                return Math.abs(Math.cos(Ln)) < Math.abs(Math.cos(pn)) ? Ln : pn;
              }, wr[0]));
              var Xr = Fr * (180 / Math.PI);
              if (rn) {
                var un = 2;
                for (st.ticks && (un += st.tickwidth / 2), mr = 0; mr < yr.length; mr++) {
                  var Gn = Jt[mr].xbnd, on = yr[mr];
                  if (Gn[0] !== null && on.left - st.l2p(Gn[0]) < un || Gn[1] !== null && st.l2p(Gn[1]) - on.right < un) {
                    In = Xr;
                    break;
                  }
                }
              } else {
                var ln = st.ticklabelposition || "", bn = function(Ln) {
                  return ln.indexOf(Ln) !== -1;
                }, Nn = bn("top"), jn = bn("left"), Jn = bn("right"), Hn = bn("bottom") || jn || Nn || Jn ? (st.tickwidth || 0) + 6 : 0;
                for (mr = 0; mr < yr.length - 1; mr++) if (p.bBoxIntersect(yr[mr], yr[mr + 1], Hn)) {
                  In = Xr;
                  break;
                }
              }
              In && fn(Ht, In);
            }
          }), st._tickAngles && zn.push(function() {
            st._tickAngles[xt] = In === null ? u(en) ? en : 0 : In;
          });
          var Cn = function() {
            var mr = 0, Ir = 0;
            return Ht.each(function(yr, Vr) {
              var rn, Tn = vt(this);
              Tn.select(".text-math-group").empty() && (st._vals[Vr] && (rn = st._vals[Vr].bb || g.bBox(Tn.node()), st._vals[Vr].bb = rn), mr = Math.max(mr, rn.width), Ir = Math.max(Ir, rn.height));
            }), { labelsMaxW: mr, labelsMaxH: Ir };
          }, gn = st._anchorAxis;
          if (gn && (gn.autorange || gn.insiderange) && At(st) && !pe(kt, st._id) && (kt._insideTickLabelsUpdaterange || (kt._insideTickLabelsUpdaterange = {}), gn.autorange && (kt._insideTickLabelsUpdaterange[gn._name + ".autorange"] = gn.autorange, zn.push(Cn)), gn.insiderange)) {
            var Mn = Cn(), Xn = st._id.charAt(0) === "y" ? Mn.labelsMaxW : Mn.labelsMaxH;
            Xn += 6, st.ticklabelposition === "inside" && (Xn += st.ticklen || 0);
            var Pn = st.side === "right" || st.side === "top" ? 1 : -1, wn = Pn === 1 ? 1 : 0, Rn = Pn === 1 ? 0 : 1, _n = [];
            _n[Rn] = gn.range[Rn];
            var En = gn.range, Kn = gn.r2p(En[wn]), Wn = gn.r2p(En[Rn]), hr = kt._insideTickLabelsUpdaterange[gn._name + ".range"];
            if (hr) {
              var Zn = gn.r2p(hr[wn]), lr = gn.r2p(hr[Rn]), cr = Pn * (st._id.charAt(0) === "y" ? 1 : -1);
              cr * Kn < cr * Zn && (Kn = Zn, _n[wn] = En[wn] = hr[wn]), cr * Wn > cr * lr && (Wn = lr, _n[Rn] = En[Rn] = hr[Rn]);
            }
            var zr = Math.abs(Wn - Kn);
            zr - Xn > 0 ? Xn *= 1 + Xn / (zr -= Xn) : Xn = 0, st._id.charAt(0) !== "y" && (Xn = -Xn), _n[wn] = gn.p2r(gn.r2p(En[wn]) + Pn * Xn), gn.autorange === "min" || gn.autorange === "max reversed" ? (_n[0] = null, gn._rangeInitial0 = void 0, gn._rangeInitial1 = void 0) : gn.autorange !== "max" && gn.autorange !== "min reversed" || (_n[1] = null, gn._rangeInitial0 = void 0, gn._rangeInitial1 = void 0), kt._insideTickLabelsUpdaterange[gn._name + ".range"] = _n;
          }
          var Wr = p.syncOrAsync(zn);
          return Wr && Wr.then && lt._promises.push(Wr), Wr;
        }, ae.getPxPosition = function(lt, st) {
          var Ot, kt = lt._fullLayout._size, Bt = st._id.charAt(0), xt = st.side;
          return st.anchor !== "free" ? Ot = st._anchorAxis : Bt === "x" ? Ot = { _offset: kt.t + (1 - (st.position || 0)) * kt.h, _length: 0 } : Bt === "y" && (Ot = { _offset: kt.l + (st.position || 0) * kt.w + st._shift, _length: 0 }), xt === "top" || xt === "left" ? Ot._offset : xt === "bottom" || xt === "right" ? Ot._offset + Ot._length : void 0;
        }, ae.shouldShowZeroLine = function(lt, st, Ot) {
          var kt = p.simpleMap(st.range, st.r2l);
          return kt[0] * kt[1] <= 0 && st.zeroline && (st.type === "linear" || st.type === "-") && !(st.rangebreaks && st.maskBreaks(0) === K) && (at(st, 0) || !function(Bt, xt, Jt, qt) {
            var en = Jt._mainAxis;
            if (en) {
              var Yt = Bt._fullLayout, Ht = xt._id.charAt(0), sn = ae.counterLetter(xt._id), fn = xt._offset + (Math.abs(qt[0]) < Math.abs(qt[1]) == (Ht === "x") ? 0 : xt._length), In = Yt._plots[Jt._mainSubplot];
              if (!(In.mainplotinfo || In).overlays.length) return Mn(Jt);
              for (var zn = ae.list(Bt, sn), Cn = 0; Cn < zn.length; Cn++) {
                var gn = zn[Cn];
                if (gn._mainAxis === en && Mn(gn)) return !0;
              }
            }
            function Mn(Xn) {
              if (!Xn.showline || !Xn.linewidth) return !1;
              var Pn = Math.max((Xn.linewidth + xt.zerolinewidth) / 2, 1);
              function wn(En) {
                return typeof En == "number" && Math.abs(En - fn) < Pn;
              }
              if (wn(Xn._mainLinePosition) || wn(Xn._mainMirrorPosition)) return !0;
              var Rn = Xn._linepositions || {};
              for (var _n in Rn) if (wn(Rn[_n][0]) || wn(Rn[_n][1])) return !0;
            }
          }(lt, st, Ot, kt) || function(Bt, xt) {
            for (var Jt = Bt._fullData, qt = xt._mainSubplot, en = xt._id.charAt(0), Yt = 0; Yt < Jt.length; Yt++) {
              var Ht = Jt[Yt];
              if (Ht.visible === !0 && Ht.xaxis + Ht.yaxis === qt && (h.traceIs(Ht, "bar-like") && Ht.orientation === { x: "h", y: "v" }[en] || Ht.fill && Ht.fill.charAt(Ht.fill.length - 1) === en))
                return !0;
            }
            return !1;
          }(lt, st));
        }, ae.clipEnds = function(lt, st) {
          return st.filter(function(Ot) {
            return at(lt, Ot.x);
          });
        }, ae.allowAutoMargin = function(lt) {
          for (var st = ae.list(lt, "", !0), Ot = 0; Ot < st.length; Ot++) {
            var kt = st[Ot];
            kt.automargin && (i.allowAutoMargin(lt, St(kt)), kt.mirror && i.allowAutoMargin(lt, Je(kt))), h.getComponentMethod("rangeslider", "isVisible")(kt) && i.allowAutoMargin(lt, nt(kt));
          }
        }, ae.swap = function(lt, st) {
          for (var Ot = function(Bt, xt) {
            var Jt, qt, en = [];
            for (Jt = 0; Jt < xt.length; Jt++) {
              var Yt = [], Ht = Bt._fullData[xt[Jt]].xaxis, sn = Bt._fullData[xt[Jt]].yaxis;
              if (Ht && sn) {
                for (qt = 0; qt < en.length; qt++) en[qt].x.indexOf(Ht) === -1 && en[qt].y.indexOf(sn) === -1 || Yt.push(qt);
                if (Yt.length) {
                  var fn, In = en[Yt[0]];
                  if (Yt.length > 1) for (qt = 1; qt < Yt.length; qt++) fn = en[Yt[qt]], ot(In.x, fn.x), ot(In.y, fn.y);
                  ot(In.x, [Ht]), ot(In.y, [sn]);
                } else en.push({ x: [Ht], y: [sn] });
              }
            }
            return en;
          }(lt, st), kt = 0; kt < Ot.length; kt++) Ye(lt, Ot[kt].x, Ot[kt].y);
        };
      }, 9666: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(63821).BADNUM, h = u.isArrayOrTypedArray, p = u.isDateTime, _ = u.cleanNumber, d = Math.round;
        function f(g, m) {
          return m ? l(g) : typeof g == "number";
        }
        function c(g) {
          return Math.max(1, (g - 1) / 1e3);
        }
        o.exports = function(g, m, x) {
          var w = g, k = x.noMultiCategory;
          if (h(w) && !w.length) return "-";
          if (!k && function(L) {
            return h(L[0]) && h(L[1]);
          }(w)) return "multicategory";
          if (k && Array.isArray(w[0])) {
            for (var S = [], A = 0; A < w.length; A++) if (h(w[A])) for (var C = 0; C < w[A].length; C++) S.push(w[A][C]);
            w = S;
          }
          if (function(L, E) {
            for (var P = L.length, I = c(P), M = 0, O = 0, T = {}, z = 0; z < P; z += I) {
              var F = L[d(z)], U = String(F);
              T[U] || (T[U] = 1, p(F, E) && M++, l(F) && O++);
            }
            return M > 2 * O;
          }(w, m)) return "date";
          var D = x.autotypenumbers !== "strict";
          return function(L, E) {
            for (var P = L.length, I = c(P), M = 0, O = 0, T = {}, z = 0; z < P; z += I) {
              var F = L[d(z)], U = String(F);
              if (!T[U]) {
                T[U] = 1;
                var V = typeof F;
                V === "boolean" ? O++ : (E ? _(F) !== i : V === "number") ? M++ : V === "string" && O++;
              }
            }
            return O > 2 * M;
          }(w, D) ? "category" : function(L, E) {
            for (var P = L.length, I = 0; I < P; I++) if (f(L[I], E)) return !0;
            return !1;
          }(w, D) ? "linear" : "-";
        };
      }, 97655: function(o, s, n) {
        var l = n(10721), u = n(33626), i = n(34809), h = n(78032), p = n(59008), _ = n(25829), d = n(22777), f = n(87433), c = n(12036), g = n(54616), m = n(46473), x = n(97405), w = n(90259), k = n(19091), S = n(54826).WEEKDAY_PATTERN, A = n(54826).HOUR_PATTERN;
        function C(E, P, I) {
          function M(q, K) {
            return i.coerce(E, P, _.rangebreaks, q, K);
          }
          if (M("enabled")) {
            var O = M("bounds");
            if (O && O.length >= 2) {
              var T, z, F = "";
              if (O.length === 2) {
                for (T = 0; T < 2; T++) if (z = L(O[T])) {
                  F = S;
                  break;
                }
              }
              var U = M("pattern", F);
              if (U === S) for (T = 0; T < 2; T++) (z = L(O[T])) && (P.bounds[T] = O[T] = z - 1);
              if (U) for (T = 0; T < 2; T++) switch (z = O[T], U) {
                case S:
                  if (!l(z) || (z = +z) !== Math.floor(z) || z < 0 || z >= 7) return void (P.enabled = !1);
                  P.bounds[T] = O[T] = z;
                  break;
                case A:
                  if (!l(z) || (z = +z) < 0 || z > 24) return void (P.enabled = !1);
                  P.bounds[T] = O[T] = z;
              }
              if (I.autorange === !1) {
                var V = I.range;
                if (V[0] < V[1]) {
                  if (O[0] < V[0] && O[1] > V[1]) return void (P.enabled = !1);
                } else if (O[0] > V[0] && O[1] < V[1]) return void (P.enabled = !1);
              }
            } else {
              var $ = M("values");
              if (!$ || !$.length) return void (P.enabled = !1);
              M("dvalue");
            }
          }
        }
        o.exports = function(E, P, I, M, O) {
          var T, z = M.letter, F = M.font || {}, U = M.splomStash || {}, V = I("visible", !M.visibleDflt), $ = P._template || {}, q = P.type || $.type || "-";
          q === "date" && (u.getComponentMethod("calendars", "handleDefaults")(E, P, "calendar", M.calendar), M.noTicklabelmode || (T = I("ticklabelmode"))), M.noTicklabelindex || q !== "date" && q !== "linear" || I("ticklabelindex");
          var K = "";
          M.noTicklabelposition && q !== "multicategory" || (K = i.coerce(E, P, { ticklabelposition: { valType: "enumerated", dflt: "outside", values: T === "period" ? ["outside", "inside"] : z === "x" ? ["outside", "inside", "outside left", "inside left", "outside right", "inside right"] : ["outside", "inside", "outside top", "inside top", "outside bottom", "inside bottom"] } }, "ticklabelposition")), M.noTicklabeloverflow || I("ticklabeloverflow", K.indexOf("inside") !== -1 ? "hide past domain" : q === "category" || q === "multicategory" ? "allow" : "hide past div"), k(P, O), w(E, P, I, M), m(E, P, I, M), q === "category" || M.noHover || I("hoverformat");
          var re = I("color"), Y = re !== _.color.dflt ? re : F.color, te = U.label || O._dfltTitle[z];
          if (g(E, P, I, q, M), !V) return P;
          I("title.text", te), i.coerceFont(I, "title.font", F, { overrideDflt: { size: i.bigFont(F.size), color: Y } }), d(E, P, I, q);
          var ee = M.hasMinor;
          if (ee && (h.newContainer(P, "minor"), d(E, P, I, q, { isMinor: !0 })), c(E, P, I, q, M), f(E, P, I, M), ee) {
            var X = M.isMinor;
            M.isMinor = !0, f(E, P, I, M), M.isMinor = X;
          }
          x(E, P, I, { dfltColor: re, bgColor: M.bgColor, showGrid: M.showGrid, hasMinor: ee, attributes: _ }), !ee || P.minor.ticks || P.minor.showgrid || delete P.minor, (P.showline || P.ticks) && I("mirror");
          var Q, ue = q === "multicategory";
          if (M.noTickson || q !== "category" && !ue || !P.ticks && !P.showgrid || (ue && (Q = "boundaries"), I("tickson", Q) === "boundaries" && delete P.ticklabelposition), ue && I("showdividers") && (I("dividercolor"), I("dividerwidth")), q === "date") if (p(E, P, { name: "rangebreaks", inclusionAttr: "enabled", handleItemDefaults: C }), P.rangebreaks.length) {
            for (var ce = 0; ce < P.rangebreaks.length; ce++) if (P.rangebreaks[ce].pattern === S) {
              P._hasDayOfWeekBreaks = !0;
              break;
            }
            if (k(P, O), O._has("scattergl") || O._has("splom")) for (var he = 0; he < M.data.length; he++) {
              var de = M.data[he];
              de.type !== "scattergl" && de.type !== "splom" || (de.visible = !1, i.warn(de.type + " traces do not work on axes with rangebreaks. Setting trace " + de.index + " to `visible: false`."));
            }
          } else delete P.rangebreaks;
          return P;
        };
        var D = { sun: 1, mon: 2, tue: 3, wed: 4, thu: 5, fri: 6, sat: 7 };
        function L(E) {
          if (typeof E == "string") return D[E.substr(0, 3).toLowerCase()];
        }
      }, 80712: function(o, s, n) {
        var l = n(87296), u = l.FORMAT_LINK, i = l.DATE_FORMAT_LINK;
        function h(_, d) {
          return ["Sets the " + _ + " formatting rule" + (d ? "for `" + d + "` " : ""), "using d3 formatting mini-languages", "which are very similar to those in Python. For numbers, see: " + u + "."].join(" ");
        }
        function p(_, d) {
          return h(_, d) + [" And for dates see: " + i + ".", "We add two items to d3's date formatter:", "*%h* for half of the year as a decimal number as well as", "*%{n}f* for fractional seconds", "with n digits. For example, *2016-10-13 09:15:23.456* with tickformat", "*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ");
        }
        o.exports = { axisHoverFormat: function(_, d) {
          return { valType: "string", dflt: "", editType: "none", description: (d ? h : p)("hover text", _) + ["By default the values are formatted using " + (d ? "generic number format" : "`" + _ + "axis.hoverformat`") + "."].join(" ") };
        }, descriptionOnlyNumbers: h, descriptionWithDates: p };
      }, 5975: function(o, s, n) {
        var l = n(33626), u = n(54826);
        function i(h, p) {
          if (p && p.length) {
            for (var _ = 0; _ < p.length; _++) if (p[_][h]) return !0;
          }
          return !1;
        }
        s.id2name = function(h) {
          if (typeof h == "string" && h.match(u.AX_ID_PATTERN)) {
            var p = h.split(" ")[0].substr(1);
            return p === "1" && (p = ""), h.charAt(0) + "axis" + p;
          }
        }, s.name2id = function(h) {
          if (h.match(u.AX_NAME_PATTERN)) {
            var p = h.substr(5);
            return p === "1" && (p = ""), h.charAt(0) + p;
          }
        }, s.cleanId = function(h, p, _) {
          var d = /( domain)$/.test(h);
          if (typeof h == "string" && h.match(u.AX_ID_PATTERN) && (!p || h.charAt(0) === p) && (!d || _)) {
            var f = h.split(" ")[0].substr(1).replace(/^0+/, "");
            return f === "1" && (f = ""), h.charAt(0) + f + (d && _ ? " domain" : "");
          }
        }, s.list = function(h, p, _) {
          var d = h._fullLayout;
          if (!d) return [];
          var f, c = s.listIds(h, p), g = new Array(c.length);
          for (f = 0; f < c.length; f++) {
            var m = c[f];
            g[f] = d[m.charAt(0) + "axis" + m.substr(1)];
          }
          if (!_) {
            var x = d._subplots.gl3d || [];
            for (f = 0; f < x.length; f++) {
              var w = d[x[f]];
              p ? g.push(w[p + "axis"]) : g.push(w.xaxis, w.yaxis, w.zaxis);
            }
          }
          return g;
        }, s.listIds = function(h, p) {
          var _ = h._fullLayout;
          if (!_) return [];
          var d = _._subplots;
          return p ? d[p + "axis"] : d.xaxis.concat(d.yaxis);
        }, s.getFromId = function(h, p, _) {
          var d = h._fullLayout;
          return p = p === void 0 || typeof p != "string" ? p : p.replace(" domain", ""), _ === "x" ? p = p.replace(/y[0-9]*/, "") : _ === "y" && (p = p.replace(/x[0-9]*/, "")), d[s.id2name(p)];
        }, s.getFromTrace = function(h, p, _) {
          var d = h._fullLayout, f = null;
          if (l.traceIs(p, "gl3d")) {
            var c = p.scene;
            c.substr(0, 5) === "scene" && (f = d[c][_ + "axis"]);
          } else f = s.getFromId(h, p[_ + "axis"] || _);
          return f;
        }, s.idSort = function(h, p) {
          var _ = h.charAt(0), d = p.charAt(0);
          return _ !== d ? _ > d ? 1 : -1 : +(h.substr(1) || 1) - +(p.substr(1) || 1);
        }, s.ref2id = function(h) {
          return !!/^[xyz]/.test(h) && h.split(" ")[0];
        }, s.isLinked = function(h, p) {
          return i(p, h._axisMatchGroups) || i(p, h._axisConstraintGroups);
        };
      }, 46473: function(o, s, n) {
        var l = n(87800).isTypedArraySpec;
        o.exports = function(u, i, h, p) {
          if (i.type === "category") {
            var _, d = u.categoryarray, f = Array.isArray(d) && d.length > 0 || l(d);
            f && (_ = "array");
            var c, g = h("categoryorder", _);
            g === "array" && (c = h("categoryarray")), f || g !== "array" || (g = i.categoryorder = "trace"), g === "trace" ? i._initialCategories = [] : g === "array" ? i._initialCategories = c.slice() : (c = function(m, x) {
              var w, k, S, A = x.dataAttr || m._id.charAt(0), C = {};
              if (x.axData) w = x.axData;
              else for (w = [], k = 0; k < x.data.length; k++) {
                var D = x.data[k];
                D[A + "axis"] === m._id && w.push(D);
              }
              for (k = 0; k < w.length; k++) {
                var L = w[k][A];
                for (S = 0; S < L.length; S++) {
                  var E = L[S];
                  E != null && (C[E] = 1);
                }
              }
              return Object.keys(C);
            }(i, p).sort(), g === "category ascending" ? i._initialCategories = c : g === "category descending" && (i._initialCategories = c.reverse()));
          }
        };
      }, 68599: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(63821), h = i.ONEDAY, p = i.ONEWEEK;
        s.dtick = function(_, d) {
          var f = d === "log", c = d === "date", g = d === "category", m = c ? h : 1;
          if (!_) return m;
          if (l(_)) return (_ = Number(_)) <= 0 ? m : g ? Math.max(1, Math.round(_)) : c ? Math.max(0.1, _) : _;
          if (typeof _ != "string" || !c && !f) return m;
          var x = _.charAt(0), w = _.substr(1);
          return (w = l(w) ? Number(w) : 0) <= 0 || !(c && x === "M" && w === Math.round(w) || f && x === "L" || f && x === "D" && (w === 1 || w === 2)) ? m : _;
        }, s.tick0 = function(_, d, f, c) {
          return d === "date" ? u.cleanDate(_, u.dateTick0(f, c % p == 0 ? 1 : 0)) : c !== "D1" && c !== "D2" ? l(_) ? Number(_) : 0 : void 0;
        };
      }, 54826: function(o, s, n) {
        var l = n(90694).counter;
        o.exports = { idRegex: { x: l("x", "( domain)?"), y: l("y", "( domain)?") }, attrRegex: l("[xy]axis"), xAxisMatch: l("xaxis"), yAxisMatch: l("yaxis"), AX_ID_PATTERN: /^[xyz][0-9]*( domain)?$/, AX_NAME_PATTERN: /^[xyz]axis[0-9]*$/, SUBPLOT_PATTERN: /^x([0-9]*)y([0-9]*)$/, HOUR_PATTERN: "hour", WEEKDAY_PATTERN: "day of week", MINDRAG: 8, MINZOOM: 20, DRAGGERSIZE: 20, REDRAWDELAY: 50, DFLTRANGEX: [-1, 6], DFLTRANGEY: [-1, 4], traceLayerClasses: ["imagelayer", "heatmaplayer", "contourcarpetlayer", "contourlayer", "funnellayer", "waterfalllayer", "barlayer", "carpetlayer", "violinlayer", "boxlayer", "ohlclayer", "scattercarpetlayer", "scatterlayer"], clipOnAxisFalseQuery: [".scatterlayer", ".barlayer", ".funnellayer", ".waterfalllayer"], layerValue2layerClass: { "above traces": "above", "below traces": "below" }, zindexSeparator: "z" };
      }, 84391: function(o, s, n) {
        var l = n(34809), u = n(32919), i = n(5975).id2name, h = n(25829), p = n(67611), _ = n(19091), d = n(63821).ALMOST_EQUAL, f = n(4530).FROM_BL;
        function c(A, C, D) {
          var L = D.axIds, E = D.layoutOut, P = D.hasImage, I = E._axisConstraintGroups, M = E._axisMatchGroups, O = C._id, T = O.charAt(0), z = ((E._splomAxes || {})[T] || {})[O] || {}, F = C._id, U = F.charAt(0) === "x";
          function V(ne, ae) {
            return l.coerce(A, C, h, ne, ae);
          }
          C._matchGroup = null, C._constraintGroup = null, V("constrain", P ? "domain" : "range"), l.coerce(A, C, { constraintoward: { valType: "enumerated", values: U ? ["left", "center", "right"] : ["bottom", "middle", "top"], dflt: U ? "center" : "middle" } }, "constraintoward");
          var $, q, K = C.type, re = [];
          for ($ = 0; $ < L.length; $++) (q = L[$]) !== F && E[i(q)].type === K && re.push(q);
          var Y = m(I, F);
          if (Y) {
            var te = [];
            for ($ = 0; $ < re.length; $++) Y[q = re[$]] || te.push(q);
            re = te;
          }
          var ee, X, Q = re.length;
          Q && (A.matches || z.matches) && (ee = l.coerce(A, C, { matches: { valType: "enumerated", values: re, dflt: re.indexOf(z.matches) !== -1 ? z.matches : void 0 } }, "matches"));
          var ue = P && !U ? C.anchor : void 0;
          if (Q && !ee && (A.scaleanchor || ue) && (X = l.coerce(A, C, { scaleanchor: { valType: "enumerated", values: re.concat([!1]) } }, "scaleanchor", ue)), ee) {
            C._matchGroup = x(M, F, ee, 1);
            var ce = E[i(ee)], he = g(E, C) / g(E, ce);
            U !== (ee.charAt(0) === "x") && (he = (U ? "x" : "y") + he), x(I, F, ee, he);
          } else A.matches && L.indexOf(A.matches) !== -1 && l.warn("ignored " + C._name + '.matches: "' + A.matches + '" to avoid an infinite loop');
          if (X) {
            var de = V("scaleratio");
            de || (de = C.scaleratio = 1), x(I, F, X, de);
          } else A.scaleanchor && L.indexOf(A.scaleanchor) !== -1 && l.warn("ignored " + C._name + '.scaleanchor: "' + A.scaleanchor + '" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.');
        }
        function g(A, C) {
          var D = C.domain;
          return D || (D = A[i(C.overlaying)].domain), D[1] - D[0];
        }
        function m(A, C) {
          for (var D = 0; D < A.length; D++) if (A[D][C]) return A[D];
          return null;
        }
        function x(A, C, D, L) {
          var E, P, I, M, O, T = m(A, C);
          T === null ? ((T = {})[C] = 1, O = A.length, A.push(T)) : O = A.indexOf(T);
          var z = Object.keys(T);
          for (E = 0; E < A.length; E++) if (I = A[E], E !== O && I[D]) {
            var F = I[D];
            for (P = 0; P < z.length; P++) I[M = z[P]] = w(F, w(L, T[M]));
            return void A.splice(O, 1);
          }
          if (L !== 1) for (P = 0; P < z.length; P++) {
            var U = z[P];
            T[U] = w(L, T[U]);
          }
          T[D] = 1;
        }
        function w(A, C) {
          var D, L, E = "", P = "";
          typeof A == "string" && (D = (E = A.match(/^[xy]*/)[0]).length, A = +A.substr(D)), typeof C == "string" && (L = (P = C.match(/^[xy]*/)[0]).length, C = +C.substr(L));
          var I = A * C;
          return D || L ? D && L && E.charAt(0) !== P.charAt(0) ? D === L ? I : (D > L ? E.substr(L) : P.substr(D)) + I : E + P + A * C : I;
        }
        function k(A, C) {
          for (var D = C._size, L = D.h / D.w, E = {}, P = Object.keys(A), I = 0; I < P.length; I++) {
            var M = P[I], O = A[M];
            if (typeof O == "string") {
              var T = O.match(/^[xy]*/)[0], z = T.length;
              O = +O.substr(z);
              for (var F = T.charAt(0) === "y" ? L : 1 / L, U = 0; U < z; U++) O *= F;
            }
            E[M] = O;
          }
          return E;
        }
        function S(A, C) {
          var D = A._inputDomain, L = f[A.constraintoward], E = D[0] + (D[1] - D[0]) * L;
          A.domain = A._input.domain = [E + (D[0] - E) / C, E + (D[1] - E) / C], A.setScale();
        }
        s.handleDefaults = function(A, C, D) {
          var L, E, P, I, M, O, T, z, F = D.axIds, U = D.axHasImage, V = C._axisConstraintGroups = [], $ = C._axisMatchGroups = [];
          for (L = 0; L < F.length; L++) c(M = A[I = i(F[L])], O = C[I], { axIds: F, layoutOut: C, hasImage: U[I] });
          function q(ce, he) {
            for (L = 0; L < ce.length; L++) for (P in E = ce[L]) C[i(P)][he] = E;
          }
          for (q($, "_matchGroup"), L = 0; L < V.length; L++) for (P in E = V[L]) if ((O = C[i(P)]).fixedrange) {
            for (var K in E) {
              var re = i(K);
              (A[re] || {}).fixedrange === !1 && l.warn("fixedrange was specified as false for axis " + re + " but was overridden because another axis in its constraint group has fixedrange true"), C[re].fixedrange = !0;
            }
            break;
          }
          for (L = 0; L < V.length; ) {
            for (P in E = V[L]) {
              (O = C[i(P)])._matchGroup && Object.keys(O._matchGroup).length === Object.keys(E).length && (V.splice(L, 1), L--);
              break;
            }
            L++;
          }
          q(V, "_constraintGroup");
          var Y = ["constrain", "range", "autorange", "rangemode", "rangebreaks", "categoryorder", "categoryarray"], te = !1, ee = !1;
          function X() {
            z = O[T], T === "rangebreaks" && (ee = O._hasDayOfWeekBreaks);
          }
          for (L = 0; L < $.length; L++) {
            E = $[L];
            for (var Q = 0; Q < Y.length; Q++) {
              var ue;
              for (P in T = Y[Q], z = null, E) if (M = A[I = i(P)], O = C[I], T in O) {
                if (!O.matches && (ue = O, T in M)) {
                  X();
                  break;
                }
                z === null && T in M && X();
              }
              if (T === "range" && z && M.range && M.range.length === 2 && M.range[0] !== null && M.range[1] !== null && (te = !0), T === "autorange" && z === null && te && (z = !1), z === null && T in ue && (z = ue[T]), z !== null) for (P in E) (O = C[i(P)])[T] = T === "range" ? z.slice() : z, T === "rangebreaks" && (O._hasDayOfWeekBreaks = ee, _(O, C));
            }
          }
        }, s.enforce = function(A) {
          var C, D, L, E, P, I, M, O, T = A._fullLayout, z = T._axisConstraintGroups || [];
          for (C = 0; C < z.length; C++) {
            L = k(z[C], T);
            var F = Object.keys(L), U = 1 / 0, V = 0, $ = 1 / 0, q = {}, K = {}, re = !1;
            for (D = 0; D < F.length; D++) K[E = F[D]] = P = T[i(E)], P._inputDomain ? P.domain = P._inputDomain.slice() : P._inputDomain = P.domain.slice(), P._inputRange || (P._inputRange = P.range.slice()), P.setScale(), q[E] = I = Math.abs(P._m) / L[E], U = Math.min(U, I), P.constrain !== "domain" && P._constraintShrinkable || ($ = Math.min($, I)), delete P._constraintShrinkable, V = Math.max(V, I), P.constrain === "domain" && (re = !0);
            if (!(U > d * V) || re) {
              for (D = 0; D < F.length; D++) if (I = q[E = F[D]], M = (P = K[E]).constrain, I !== $ || M === "domain") if (O = I / $, M === "range") p(P, O);
              else {
                var Y = P._inputDomain, te = (P.domain[1] - P.domain[0]) / (Y[1] - Y[0]), ee = (P.r2l(P.range[1]) - P.r2l(P.range[0])) / (P.r2l(P._inputRange[1]) - P.r2l(P._inputRange[0]));
                if ((O /= te) * ee < 1) {
                  P.domain = P._input.domain = Y.slice(), p(P, O);
                  continue;
                }
                if (ee < 1 && (P.range = P._input.range = P._inputRange.slice(), O *= ee), P.autorange) {
                  var X = P.r2l(P.range[0]), Q = P.r2l(P.range[1]), ue = (X + Q) / 2, ce = ue, he = ue, de = Math.abs(Q - ue), ne = ue - de * O * 1.0001, ae = ue + de * O * 1.0001, se = u.makePadFn(T, P, 0), me = u.makePadFn(T, P, 1);
                  S(P, O);
                  var ye, pe, be = Math.abs(P._m), Ae = u.concatExtremes(A, P), Se = Ae.min, Me = Ae.max;
                  for (pe = 0; pe < Se.length; pe++) (ye = Se[pe].val - se(Se[pe]) / be) > ne && ye < ce && (ce = ye);
                  for (pe = 0; pe < Me.length; pe++) (ye = Me[pe].val + me(Me[pe]) / be) < ae && ye > he && (he = ye);
                  O /= (he - ce) / (2 * de), ce = P.l2r(ce), he = P.l2r(he), P.range = P._input.range = X < Q ? [ce, he] : [he, ce];
                }
                S(P, O);
              }
            }
          }
        }, s.getAxisGroup = function(A, C) {
          for (var D = A._axisMatchGroups, L = 0; L < D.length; L++) if (D[L][C]) return "g" + L;
          return C;
        }, s.clean = function(A, C) {
          if (C._inputDomain) {
            for (var D = !1, L = C._id, E = A._fullLayout._axisConstraintGroups, P = 0; P < E.length; P++) if (E[P][L]) {
              D = !0;
              break;
            }
            D && C.constrain === "domain" || (C._input.domain = C.domain = C._inputDomain, delete C._inputDomain);
          }
        };
      }, 51680: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.numberFormat, h = n(65657), p = n(74043), _ = n(33626), d = u.strTranslate, f = n(30635), c = n(78766), g = n(62203), m = n(32141), x = n(29714), w = n(27983), k = n(14751), S = n(70414), A = S.selectingOrDrawing, C = S.freeMode, D = n(4530).FROM_TL, L = n(34823), E = n(71817).redrawReglTraces, P = n(44122), I = n(5975).getFromId, M = n(44844).prepSelect, O = n(44844).clearOutline, T = n(44844).selectOnClick, z = n(67611), F = n(54826), U = F.MINDRAG, V = F.MINZOOM, $ = !0;
        function q(ye, pe, be, Ae) {
          var Se = u.ensureSingle(ye.draglayer, pe, be, function(Me) {
            Me.classed("drag", !0).style({ fill: "transparent", "stroke-width": 0 }).attr("data-subplot", ye.id);
          });
          return Se.call(w, Ae), Se.node();
        }
        function K(ye, pe, be, Ae, Se, Me, De) {
          var Le = q(ye, "rect", pe, be);
          return l.select(Le).call(g.setRect, Ae, Se, Me, De), Le;
        }
        function re(ye, pe) {
          for (var be = 0; be < ye.length; be++) if (!ye[be].fixedrange) return pe;
          return "";
        }
        function Y(ye, pe, be, Ae, Se) {
          for (var Me = 0; Me < ye.length; Me++) {
            var De = ye[Me];
            if (!De.fixedrange) if (De.rangebreaks) {
              var Le = De._id.charAt(0) === "y", We = Le ? 1 - pe : pe, Ee = Le ? 1 - be : be;
              Ae[De._name + ".range[0]"] = De.l2r(De.p2l(We * De._length)), Ae[De._name + ".range[1]"] = De.l2r(De.p2l(Ee * De._length));
            } else {
              var Ne = De._rl[0], Ie = De._rl[1] - Ne;
              Ae[De._name + ".range[0]"] = De.l2r(Ne + Ie * pe), Ae[De._name + ".range[1]"] = De.l2r(Ne + Ie * be);
            }
          }
          if (Se && Se.length) {
            var ge = (pe + (1 - be)) / 2;
            Y(Se, ge, 1 - ge, Ae, []);
          }
        }
        function te(ye, pe) {
          for (var be = 0; be < ye.length; be++) {
            var Ae = ye[be];
            if (!Ae.fixedrange) {
              if (Ae.rangebreaks) {
                var Se = Ae._length, Me = (Ae.p2l(0 + pe) - Ae.p2l(0) + (Ae.p2l(Se + pe) - Ae.p2l(Se))) / 2;
                Ae.range = [Ae.l2r(Ae._rl[0] - Me), Ae.l2r(Ae._rl[1] - Me)];
              } else Ae.range = [Ae.l2r(Ae._rl[0] - pe / Ae._m), Ae.l2r(Ae._rl[1] - pe / Ae._m)];
              Ae.limitRange && Ae.limitRange();
            }
          }
        }
        function ee(ye) {
          return 1 - (ye >= 0 ? Math.min(ye, 0.9) : 1 / (1 / Math.max(ye, -0.3) + 3.222));
        }
        function X(ye, pe, be, Ae, Se) {
          return ye.append("path").attr("class", "zoombox").style({ fill: pe > 0.2 ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)", "stroke-width": 0 }).attr("transform", d(be, Ae)).attr("d", Se + "Z");
        }
        function Q(ye, pe, be) {
          return ye.append("path").attr("class", "zoombox-corners").style({ fill: c.background, stroke: c.defaultLine, "stroke-width": 1, opacity: 0 }).attr("transform", d(pe, be)).attr("d", "M0,0Z");
        }
        function ue(ye, pe, be, Ae, Se, Me) {
          ye.attr("d", Ae + "M" + be.l + "," + be.t + "v" + be.h + "h" + be.w + "v-" + be.h + "h-" + be.w + "Z"), ce(ye, pe, Se, Me);
        }
        function ce(ye, pe, be, Ae) {
          be || (ye.transition().style("fill", Ae > 0.2 ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.3)").duration(200), pe.transition().style("opacity", 1).duration(200));
        }
        function he(ye) {
          l.select(ye).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove();
        }
        function de(ye) {
          $ && ye.data && ye._context.showTips && (u.notifier(u._(ye, "Double-click to zoom back out"), "long"), $ = !1);
        }
        function ne(ye) {
          var pe = Math.floor(Math.min(ye.b - ye.t, ye.r - ye.l, V) / 2);
          return "M" + (ye.l - 3.5) + "," + (ye.t - 0.5 + pe) + "h3v" + -pe + "h" + pe + "v-3h-" + (pe + 3) + "ZM" + (ye.r + 3.5) + "," + (ye.t - 0.5 + pe) + "h-3v" + -pe + "h" + -pe + "v-3h" + (pe + 3) + "ZM" + (ye.r + 3.5) + "," + (ye.b + 0.5 - pe) + "h-3v" + pe + "h" + -pe + "v3h" + (pe + 3) + "ZM" + (ye.l - 3.5) + "," + (ye.b + 0.5 - pe) + "h3v" + pe + "h" + pe + "v3h-" + (pe + 3) + "Z";
        }
        function ae(ye, pe, be, Ae, Se) {
          for (var Me, De, Le, We, Ee = !1, Ne = {}, Ie = {}, ge = (Se || {}).xaHash, Ce = (Se || {}).yaHash, we = 0; we < pe.length; we++) {
            var Ge = pe[we];
            for (Me in be) if (Ge[Me]) {
              for (Le in Ge) Se && (ge[Le] || Ce[Le]) || (Le.charAt(0) === "x" ? be : Ae)[Le] || (Ne[Le] = Me);
              for (De in Ae) Se && (ge[De] || Ce[De]) || !Ge[De] || (Ee = !0);
            }
            for (De in Ae) if (Ge[De]) for (We in Ge) Se && (ge[We] || Ce[We]) || (We.charAt(0) === "x" ? be : Ae)[We] || (Ie[We] = De);
          }
          Ee && (u.extendFlat(Ne, Ie), Ie = {});
          var Re = {}, je = [];
          for (Le in Ne) {
            var Ke = I(ye, Le);
            je.push(Ke), Re[Ke._id] = Ke;
          }
          var tt = {}, _e = [];
          for (We in Ie) {
            var Be = I(ye, We);
            _e.push(Be), tt[Be._id] = Be;
          }
          return { xaHash: Re, yaHash: tt, xaxes: je, yaxes: _e, xLinks: Ne, yLinks: Ie, isSubplotConstrained: Ee };
        }
        function se(ye, pe) {
          if (p) {
            var be = ye.onwheel !== void 0 ? "wheel" : "mousewheel";
            ye._onwheel && ye.removeEventListener(be, ye._onwheel), ye._onwheel = pe, ye.addEventListener(be, pe, { passive: !1 });
          } else ye.onwheel !== void 0 ? ye.onwheel = pe : ye.onmousewheel !== void 0 ? ye.onmousewheel = pe : ye.isAddedWheelEvent || (ye.isAddedWheelEvent = !0, ye.addEventListener("wheel", pe, { passive: !1 }));
        }
        function me(ye) {
          var pe = [];
          for (var be in ye) pe.push(ye[be]);
          return pe;
        }
        o.exports = { makeDragBox: function(ye, pe, be, Ae, Se, Me, De, Le) {
          var We, Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke, tt, _e, Be, $e, Ze, ct, ft, _t, Pt, Dt, $t, Gt, Wt = ye._fullLayout._zoomlayer, mt = De + Le === "nsew", at = (De + Le).length === 1;
          function vt() {
            if (We = pe.xaxis, Ee = pe.yaxis, Re = We._length, je = Ee._length, we = We._offset, Ge = Ee._offset, (Ne = {})[We._id] = We, (Ie = {})[Ee._id] = Ee, De && Le) for (var wn = pe.overlays, Rn = 0; Rn < wn.length; Rn++) {
              var _n = wn[Rn].xaxis;
              Ne[_n._id] = _n;
              var En = wn[Rn].yaxis;
              Ie[En._id] = En;
            }
            ge = me(Ne), Ce = me(Ie), _e = re(ge, Le), Be = re(Ce, De), $e = !Be && !_e, tt = ae(ye, ye._fullLayout._axisMatchGroups, Ne, Ie);
            var Kn = (Ke = ae(ye, ye._fullLayout._axisConstraintGroups, Ne, Ie, tt)).isSubplotConstrained || tt.isSubplotConstrained;
            Ze = Le || Kn, ct = De || Kn;
            var Wn = ye._fullLayout;
            ft = Wn._has("scattergl"), _t = Wn._has("splom"), Pt = Wn._has("svg");
          }
          be += pe.yaxis._shift, vt();
          var St = function(wn, Rn, _n) {
            return wn ? wn === "nsew" ? _n ? "" : Rn === "pan" ? "move" : "crosshair" : wn.toLowerCase() + "-resize" : "pointer";
          }(Be + _e, ye._fullLayout.dragmode, mt), Je = K(pe, De + Le + "drag", St, be, Ae, Se, Me);
          if ($e && !mt) return Je.onmousedown = null, Je.style.pointerEvents = "none", Je;
          var nt, ot, Ye, Fe, pt, Mt, At, Rt, Ft, lt, st = { element: Je, gd: ye, plotinfo: pe };
          function Ot() {
            st.plotinfo.selection = !1, O(ye);
          }
          function kt(wn, Rn) {
            var _n = st.gd;
            if (_n._fullLayout._activeShapeIndex >= 0) _n._fullLayout._deactivateShape(_n);
            else {
              var En = _n._fullLayout.clickmode;
              if (he(_n), wn !== 2 || at || zn(), mt) En.indexOf("select") > -1 && T(Rn, _n, ge, Ce, pe.id, st), En.indexOf("event") > -1 && m.click(_n, Rn, pe.id);
              else if (wn === 1 && at) {
                var Kn = De ? Ee : We, Wn = De === "s" || Le === "w" ? 0 : 1, hr = Kn._name + ".range[" + Wn + "]", Zn = function(zr, Wr) {
                  var mr, Ir = zr.range[Wr], yr = Math.abs(Ir - zr.range[1 - Wr]);
                  return zr.type === "date" ? Ir : zr.type === "log" ? (mr = Math.ceil(Math.max(0, -Math.log(yr) / Math.LN10)) + 3, i("." + mr + "g")(Math.pow(10, Ir))) : (mr = Math.floor(Math.log(Math.abs(Ir)) / Math.LN10) - Math.floor(Math.log(yr) / Math.LN10) + 4, i("." + String(mr) + "g")(Ir));
                }(Kn, Wn), lr = "left", cr = "middle";
                if (Kn.fixedrange) return;
                De ? (cr = De === "n" ? "top" : "bottom", Kn.side === "right" && (lr = "right")) : Le === "e" && (lr = "right"), _n._context.showAxisRangeEntryBoxes && l.select(Je).call(f.makeEditable, { gd: _n, immediate: !0, background: _n._fullLayout.paper_bgcolor, text: String(Zn), fill: Kn.tickfont ? Kn.tickfont.color : "#444", horizontalAlign: lr, verticalAlign: cr }).on("edit", function(zr) {
                  var Wr = Kn.d2r(zr);
                  Wr !== void 0 && _.call("_guiRelayout", _n, hr, Wr);
                });
              }
            }
          }
          function Bt(wn, Rn) {
            if (ye._transitioningWithDuration) return !1;
            var _n = Math.max(0, Math.min(Re, $t * wn + nt)), En = Math.max(0, Math.min(je, Gt * Rn + ot)), Kn = Math.abs(_n - nt), Wn = Math.abs(En - ot);
            function hr() {
              At = "", Ye.r = Ye.l, Ye.t = Ye.b, Ft.attr("d", "M0,0Z");
            }
            if (Ye.l = Math.min(nt, _n), Ye.r = Math.max(nt, _n), Ye.t = Math.min(ot, En), Ye.b = Math.max(ot, En), Ke.isSubplotConstrained) Kn > V || Wn > V ? (At = "xy", Kn / Re > Wn / je ? (Wn = Kn * je / Re, ot > En ? Ye.t = ot - Wn : Ye.b = ot + Wn) : (Kn = Wn * Re / je, nt > _n ? Ye.l = nt - Kn : Ye.r = nt + Kn), Ft.attr("d", ne(Ye))) : hr();
            else if (tt.isSubplotConstrained) if (Kn > V || Wn > V) {
              At = "xy";
              var Zn = Math.min(Ye.l / Re, (je - Ye.b) / je), lr = Math.max(Ye.r / Re, (je - Ye.t) / je);
              Ye.l = Zn * Re, Ye.r = lr * Re, Ye.b = (1 - Zn) * je, Ye.t = (1 - lr) * je, Ft.attr("d", ne(Ye));
            } else hr();
            else !Be || Wn < Math.min(Math.max(0.6 * Kn, U), V) ? Kn < U || !_e ? hr() : (Ye.t = 0, Ye.b = je, At = "x", Ft.attr("d", function(cr, zr) {
              return "M" + (cr.l - 0.5) + "," + (zr - V - 0.5) + "h-3v" + (2 * V + 1) + "h3ZM" + (cr.r + 0.5) + "," + (zr - V - 0.5) + "h3v" + (2 * V + 1) + "h-3Z";
            }(Ye, ot))) : !_e || Kn < Math.min(0.6 * Wn, V) ? (Ye.l = 0, Ye.r = Re, At = "y", Ft.attr("d", function(cr, zr) {
              return "M" + (zr - V - 0.5) + "," + (cr.t - 0.5) + "v-3h" + (2 * V + 1) + "v3ZM" + (zr - V - 0.5) + "," + (cr.b + 0.5) + "v3h" + (2 * V + 1) + "v-3Z";
            }(Ye, nt))) : (At = "xy", Ft.attr("d", ne(Ye)));
            Ye.w = Ye.r - Ye.l, Ye.h = Ye.b - Ye.t, At && (lt = !0), ye._dragged = lt, ue(Rt, Ft, Ye, pt, Mt, Fe), xt(), ye.emit("plotly_relayouting", Dt), Mt = !0;
          }
          function xt() {
            Dt = {}, At !== "xy" && At !== "x" || (Y(ge, Ye.l / Re, Ye.r / Re, Dt, Ke.xaxes), fn("x", Dt)), At !== "xy" && At !== "y" || (Y(Ce, (je - Ye.b) / je, (je - Ye.t) / je, Dt, Ke.yaxes), fn("y", Dt));
          }
          function Jt() {
            xt(), he(ye), Cn(), de(ye);
          }
          st.prepFn = function(wn, Rn, _n) {
            var En = st.dragmode, Kn = ye._fullLayout.dragmode;
            Kn !== En && (st.dragmode = Kn), vt(), $t = ye._fullLayout._invScaleX, Gt = ye._fullLayout._invScaleY, $e || (mt ? wn.shiftKey ? Kn === "pan" ? Kn = "zoom" : A(Kn) || (Kn = "pan") : wn.ctrlKey && (Kn = "pan") : Kn = "pan"), C(Kn) ? st.minDrag = 1 : st.minDrag = void 0, A(Kn) ? (st.xaxes = ge, st.yaxes = Ce, M(wn, Rn, _n, st, Kn)) : (st.clickFn = kt, A(En) && Ot(), $e || (Kn === "zoom" ? (st.moveFn = Bt, st.doneFn = Jt, st.minDrag = 1, function(Wn, hr, Zn) {
              var lr = Je.getBoundingClientRect();
              nt = hr - lr.left, ot = Zn - lr.top, ye._fullLayout._calcInverseTransform(ye);
              var cr = u.apply3DTransform(ye._fullLayout._invTransform)(nt, ot);
              nt = cr[0], ot = cr[1], Ye = { l: nt, r: nt, w: 0, t: ot, b: ot, h: 0 }, Fe = ye._hmpixcount ? ye._hmlumcount / ye._hmpixcount : h(ye._fullLayout.plot_bgcolor).getLuminance(), Mt = !1, At = "xy", lt = !1, Rt = X(Wt, Fe, we, Ge, pt = "M0,0H" + Re + "V" + je + "H0V0"), Ft = Q(Wt, we, Ge);
            }(0, Rn, _n)) : Kn === "pan" && (st.moveFn = sn, st.doneFn = Cn))), ye._fullLayout._redrag = function() {
              var Wn = ye._dragdata;
              if (Wn && Wn.element === Je) {
                var hr = ye._fullLayout.dragmode;
                A(hr) || (vt(), gn([0, 0, Re, je]), st.moveFn(Wn.dx, Wn.dy));
              }
            };
          }, k.init(st);
          var qt = [0, 0, Re, je], en = null, Yt = F.REDRAWDELAY, Ht = pe.mainplot ? ye._fullLayout._plots[pe.mainplot] : pe;
          function sn(wn, Rn) {
            if (wn *= $t, Rn *= Gt, !ye._transitioningWithDuration) {
              if (ye._fullLayout._replotting = !0, _e === "ew" || Be === "ns") {
                var _n = _e ? -wn : 0, En = Be ? -Rn : 0;
                if (tt.isSubplotConstrained) {
                  if (_e && Be) {
                    var Kn = (wn / Re - Rn / je) / 2;
                    _n = -(wn = Kn * Re), En = -(Rn = -Kn * je);
                  }
                  Be ? _n = -En * Re / je : En = -_n * je / Re;
                }
                return _e && (te(ge, wn), fn("x")), Be && (te(Ce, Rn), fn("y")), gn([_n, En, Re, je]), In(), void ye.emit("plotly_relayouting", Dt);
              }
              var Wn, hr, Zn = _e === "w" == (Be === "n") ? 1 : -1;
              if (_e && Be && (Ke.isSubplotConstrained || tt.isSubplotConstrained)) {
                var lr = (wn / Re + Zn * Rn / je) / 2;
                wn = lr * Re, Rn = Zn * lr * je;
              }
              if (_e === "w" ? wn = mr(ge, 0, wn) : _e === "e" ? wn = mr(ge, 1, -wn) : _e || (wn = 0), Be === "n" ? Rn = mr(Ce, 1, Rn) : Be === "s" ? Rn = mr(Ce, 0, -Rn) : Be || (Rn = 0), Wn = _e === "w" ? wn : 0, hr = Be === "n" ? Rn : 0, Ke.isSubplotConstrained && !tt.isSubplotConstrained || tt.isSubplotConstrained && _e && Be && Zn > 0) {
                var cr;
                if (tt.isSubplotConstrained || !_e && Be.length === 1) {
                  for (cr = 0; cr < ge.length; cr++) ge[cr].range = ge[cr]._r.slice(), z(ge[cr], 1 - Rn / je);
                  Wn = (wn = Rn * Re / je) / 2;
                }
                if (tt.isSubplotConstrained || !Be && _e.length === 1) {
                  for (cr = 0; cr < Ce.length; cr++) Ce[cr].range = Ce[cr]._r.slice(), z(Ce[cr], 1 - wn / Re);
                  hr = (Rn = wn * je / Re) / 2;
                }
              }
              tt.isSubplotConstrained && Be || fn("x"), tt.isSubplotConstrained && _e || fn("y");
              var zr = Re - wn, Wr = je - Rn;
              !tt.isSubplotConstrained || _e && Be || (_e ? (hr = Wn ? 0 : wn * je / Re, Wr = zr * je / Re) : (Wn = hr ? 0 : Rn * Re / je, zr = Wr * Re / je)), gn([Wn, hr, zr, Wr]), In(), ye.emit("plotly_relayouting", Dt);
            }
            function mr(Ir, yr, Vr) {
              for (var rn, Tn, sr = 1 - yr, $n = 0; $n < Ir.length; $n++) {
                var ur = Ir[$n];
                if (!ur.fixedrange) {
                  rn = ur, Tn = ur._rl[sr] + (ur._rl[yr] - ur._rl[sr]) / ee(Vr / ur._length);
                  var Tr = ur.l2r(Tn);
                  Tr !== !1 && Tr !== void 0 && (ur.range[yr] = Tr);
                }
              }
              return rn._length * (rn._rl[yr] - Tn) / (rn._rl[yr] - rn._rl[sr]);
            }
          }
          function fn(wn, Rn) {
            for (var _n = tt.isSubplotConstrained ? { x: Ce, y: ge }[wn] : tt[wn + "axes"], En = tt.isSubplotConstrained ? { x: ge, y: Ce }[wn] : [], Kn = 0; Kn < _n.length; Kn++) {
              var Wn = _n[Kn], hr = Wn._id, Zn = tt.xLinks[hr] || tt.yLinks[hr], lr = En[0] || Ne[Zn] || Ie[Zn];
              lr && (Rn ? (Rn[Wn._name + ".range[0]"] = Rn[lr._name + ".range[0]"], Rn[Wn._name + ".range[1]"] = Rn[lr._name + ".range[1]"]) : Wn.range = lr.range.slice());
            }
          }
          function In() {
            var wn, Rn = [];
            function _n(hr) {
              for (wn = 0; wn < hr.length; wn++) hr[wn].fixedrange || Rn.push(hr[wn]._id);
            }
            function En(hr, Zn) {
              for (wn = 0; wn < hr.length; wn++) {
                var lr = hr[wn], cr = lr[Zn];
                lr.fixedrange || cr.tickmode !== "sync" || Rn.push(cr._id);
              }
            }
            for (Ze && (_n(ge), _n(Ke.xaxes), _n(tt.xaxes), En(pe.overlays, "xaxis")), ct && (_n(Ce), _n(Ke.yaxes), _n(tt.yaxes), En(pe.overlays, "yaxis")), Dt = {}, wn = 0; wn < Rn.length; wn++) {
              var Kn = Rn[wn], Wn = I(ye, Kn);
              x.drawOne(ye, Wn, { skipTitle: !0 }), Dt[Wn._name + ".range[0]"] = Wn.range[0], Dt[Wn._name + ".range[1]"] = Wn.range[1];
            }
            x.redrawComponents(ye, Rn);
          }
          function zn() {
            if (!ye._transitioningWithDuration) {
              var wn = ye._context.doubleClick, Rn = [];
              _e && (Rn = Rn.concat(ge)), Be && (Rn = Rn.concat(Ce)), tt.xaxes && (Rn = Rn.concat(tt.xaxes)), tt.yaxes && (Rn = Rn.concat(tt.yaxes));
              var _n, En, Kn = {};
              if (wn === "reset+autosize") for (wn = "autosize", En = 0; En < Rn.length; En++) {
                var Wn = (_n = Rn[En])._rangeInitial0, hr = _n._rangeInitial1, Zn = Wn !== void 0 || hr !== void 0;
                if (Zn && (Wn !== void 0 && Wn !== _n.range[0] || hr !== void 0 && hr !== _n.range[1]) || !Zn && _n.autorange !== !0) {
                  wn = "reset";
                  break;
                }
              }
              if (wn === "autosize") for (En = 0; En < Rn.length; En++) (_n = Rn[En]).fixedrange || (Kn[_n._name + ".autorange"] = !0);
              else if (wn === "reset") {
                for ((_e || Ke.isSubplotConstrained) && (Rn = Rn.concat(Ke.xaxes)), Be && !Ke.isSubplotConstrained && (Rn = Rn.concat(Ke.yaxes)), Ke.isSubplotConstrained && (_e ? Be || (Rn = Rn.concat(Ce)) : Rn = Rn.concat(ge)), En = 0; En < Rn.length; En++) if (!(_n = Rn[En]).fixedrange) {
                  var lr = _n._name, cr = _n._autorangeInitial;
                  _n._rangeInitial0 === void 0 && _n._rangeInitial1 === void 0 ? Kn[lr + ".autorange"] = !0 : _n._rangeInitial0 === void 0 ? (Kn[lr + ".autorange"] = cr, Kn[lr + ".range"] = [null, _n._rangeInitial1]) : _n._rangeInitial1 === void 0 ? (Kn[lr + ".range"] = [_n._rangeInitial0, null], Kn[lr + ".autorange"] = cr) : Kn[lr + ".range"] = [_n._rangeInitial0, _n._rangeInitial1];
                }
              }
              ye.emit("plotly_doubleclick", null), _.call("_guiRelayout", ye, Kn);
            }
          }
          function Cn() {
            gn([0, 0, Re, je]), u.syncOrAsync([P.previousPromises, function() {
              ye._fullLayout._replotting = !1, _.call("_guiRelayout", ye, Dt);
            }], ye);
          }
          function gn(wn) {
            var Rn, _n, En, Kn, Wn = ye._fullLayout, hr = Wn._plots, Zn = Wn._subplots.cartesian;
            if (_t && _.subplotsRegistry.splom.drag(ye), ft) {
              for (Rn = 0; Rn < Zn.length; Rn++) if (En = (_n = hr[Zn[Rn]]).xaxis, Kn = _n.yaxis, _n._scene) {
                En.limitRange && En.limitRange(), Kn.limitRange && Kn.limitRange();
                var lr = u.simpleMap(En.range, En.r2l), cr = u.simpleMap(Kn.range, Kn.r2l);
                _n._scene.update({ range: [lr[0], cr[0], lr[1], cr[1]] });
              }
            }
            if ((_t || ft) && (L(ye), E(ye)), Pt) {
              var zr = wn[2] / We._length, Wr = wn[3] / Ee._length;
              for (Rn = 0; Rn < Zn.length; Rn++) {
                En = (_n = hr[Zn[Rn]]).xaxis, Kn = _n.yaxis;
                var mr, Ir, yr, Vr, rn = (Ze || tt.isSubplotConstrained) && !En.fixedrange && Ne[En._id], Tn = (ct || tt.isSubplotConstrained) && !Kn.fixedrange && Ie[Kn._id];
                if (rn ? (mr = zr, yr = Le || tt.isSubplotConstrained ? wn[0] : Pn(En, mr)) : tt.xaHash[En._id] ? (mr = zr, yr = wn[0] * En._length / We._length) : tt.yaHash[En._id] ? (mr = Wr, yr = Be === "ns" ? -wn[1] * En._length / Ee._length : Pn(En, mr, { n: "top", s: "bottom" }[Be])) : yr = Xn(En, mr = Mn(En, zr, Wr)), mr > 1 && (En.maxallowed !== void 0 && Ze === (En.range[0] < En.range[1] ? "e" : "w") || En.minallowed !== void 0 && Ze === (En.range[0] < En.range[1] ? "w" : "e")) && (mr = 1, yr = 0), Tn ? (Ir = Wr, Vr = De || tt.isSubplotConstrained ? wn[1] : Pn(Kn, Ir)) : tt.yaHash[Kn._id] ? (Ir = Wr, Vr = wn[1] * Kn._length / Ee._length) : tt.xaHash[Kn._id] ? (Ir = zr, Vr = _e === "ew" ? -wn[0] * Kn._length / We._length : Pn(Kn, Ir, { e: "right", w: "left" }[_e])) : Vr = Xn(Kn, Ir = Mn(Kn, zr, Wr)), Ir > 1 && (Kn.maxallowed !== void 0 && ct === (Kn.range[0] < Kn.range[1] ? "n" : "s") || Kn.minallowed !== void 0 && ct === (Kn.range[0] < Kn.range[1] ? "s" : "n")) && (Ir = 1, Vr = 0), mr || Ir) {
                  mr || (mr = 1), Ir || (Ir = 1);
                  var sr = En._offset - yr / mr, $n = Kn._offset - Vr / Ir;
                  _n.clipRect.call(g.setTranslate, yr, Vr).call(g.setScale, mr, Ir), _n.plot.call(g.setTranslate, sr, $n).call(g.setScale, 1 / mr, 1 / Ir), mr === _n.xScaleFactor && Ir === _n.yScaleFactor || (g.setPointGroupScale(_n.zoomScalePts, mr, Ir), g.setTextPointsScale(_n.zoomScaleTxt, mr, Ir)), g.hideOutsideRangePoints(_n.clipOnAxisFalseTraces, _n), _n.xScaleFactor = mr, _n.yScaleFactor = Ir;
                }
              }
            }
          }
          function Mn(wn, Rn, _n) {
            return wn.fixedrange ? 0 : Ze && Ke.xaHash[wn._id] ? Rn : ct && (Ke.isSubplotConstrained ? Ke.xaHash : Ke.yaHash)[wn._id] ? _n : 0;
          }
          function Xn(wn, Rn) {
            return Rn ? (wn.range = wn._r.slice(), z(wn, Rn), Pn(wn, Rn)) : 0;
          }
          function Pn(wn, Rn, _n) {
            return wn._length * (1 - Rn) * D[_n || wn.constraintoward || "middle"];
          }
          return De.length * Le.length != 1 && se(Je, function(wn) {
            if (ye._context._scrollZoom.cartesian || ye._fullLayout._enablescrollzoom) {
              if (Ot(), ye._transitioningWithDuration) return wn.preventDefault(), void wn.stopPropagation();
              vt(), clearTimeout(en);
              var Rn = -wn.deltaY;
              if (isFinite(Rn) || (Rn = wn.wheelDelta / 10), isFinite(Rn)) {
                var _n, En = Math.exp(-Math.min(Math.max(Rn, -20), 20) / 200), Kn = Ht.draglayer.select(".nsewdrag").node().getBoundingClientRect(), Wn = (wn.clientX - Kn.left) / Kn.width, hr = (Kn.bottom - wn.clientY) / Kn.height;
                if (Ze) {
                  for (Le || (Wn = 0.5), _n = 0; _n < ge.length; _n++) Zn(ge[_n], Wn, En);
                  fn("x"), qt[2] *= En, qt[0] += qt[2] * Wn * (1 / En - 1);
                }
                if (ct) {
                  for (De || (hr = 0.5), _n = 0; _n < Ce.length; _n++) Zn(Ce[_n], hr, En);
                  fn("y"), qt[3] *= En, qt[1] += qt[3] * (1 - hr) * (1 / En - 1);
                }
                gn(qt), In(), ye.emit("plotly_relayouting", Dt), en = setTimeout(function() {
                  ye._fullLayout && (qt = [0, 0, Re, je], Cn());
                }, Yt), wn.preventDefault();
              } else u.log("Did not find wheel motion attributes: ", wn);
            }
            function Zn(lr, cr, zr) {
              if (!lr.fixedrange) {
                var Wr = u.simpleMap(lr.range, lr.r2l), mr = Wr[0] + (Wr[1] - Wr[0]) * cr;
                lr.range = Wr.map(function(Ir) {
                  return lr.l2r(mr + (Ir - mr) * zr);
                });
              }
            }
          }), Je;
        }, makeDragger: q, makeRectDragger: K, makeZoombox: X, makeCorners: Q, updateZoombox: ue, xyCorners: ne, transitionZoombox: ce, removeZoombox: he, showDoubleClickNotifier: de, attachWheelEventHandler: se };
      }, 95284: function(o, s, n) {
        var l = n(45568), u = n(32141), i = n(14751), h = n(27983), p = n(51680).makeDragBox, _ = n(54826).DRAGGERSIZE;
        s.initInteractions = function(d) {
          var f = d._fullLayout;
          if (d._context.staticPlot) l.select(d).selectAll(".drag").remove();
          else if (f._has("cartesian") || f._has("splom")) {
            Object.keys(f._plots || {}).sort(function(g, m) {
              if ((f._plots[g].mainplot && !0) === (f._plots[m].mainplot && !0)) {
                var x = g.split("y"), w = m.split("y");
                return x[0] === w[0] ? Number(x[1] || 1) - Number(w[1] || 1) : Number(x[0] || 1) - Number(w[0] || 1);
              }
              return f._plots[g].mainplot ? 1 : -1;
            }).forEach(function(g) {
              var m = f._plots[g], x = m.xaxis, w = m.yaxis;
              if (!m.mainplot) {
                var k = p(d, m, x._offset, w._offset, x._length, w._length, "ns", "ew");
                k.onmousemove = function(C) {
                  d._fullLayout._rehover = function() {
                    d._fullLayout._hoversubplot === g && d._fullLayout._plots[g] && u.hover(d, C, g);
                  }, u.hover(d, C, g), d._fullLayout._lasthover = k, d._fullLayout._hoversubplot = g;
                }, k.onmouseout = function(C) {
                  d._dragging || (d._fullLayout._hoversubplot = null, i.unhover(d, C));
                }, d._context.showAxisDragHandles && (p(d, m, x._offset - _, w._offset - _, _, _, "n", "w"), p(d, m, x._offset + x._length, w._offset - _, _, _, "n", "e"), p(d, m, x._offset - _, w._offset + w._length, _, _, "s", "w"), p(d, m, x._offset + x._length, w._offset + w._length, _, _, "s", "e"));
              }
              if (d._context.showAxisDragHandles) {
                if (g === x._mainSubplot) {
                  var S = x._mainLinePosition;
                  x.side === "top" && (S -= _), p(d, m, x._offset + 0.1 * x._length, S, 0.8 * x._length, _, "", "ew"), p(d, m, x._offset, S, 0.1 * x._length, _, "", "w"), p(d, m, x._offset + 0.9 * x._length, S, 0.1 * x._length, _, "", "e");
                }
                if (g === w._mainSubplot) {
                  var A = w._mainLinePosition;
                  w.side !== "right" && (A -= _), p(d, m, A, w._offset + 0.1 * w._length, _, 0.8 * w._length, "ns", ""), p(d, m, A, w._offset + 0.9 * w._length, _, 0.1 * w._length, "s", ""), p(d, m, A, w._offset, _, 0.1 * w._length, "n", "");
                }
              }
            });
            var c = f._hoverlayer.node();
            c.onmousemove = function(g) {
              g.target = d._fullLayout._lasthover, u.hover(d, g, f._hoversubplot);
            }, c.onclick = function(g) {
              g.target = d._fullLayout._lasthover, u.click(d, g);
            }, c.onmousedown = function(g) {
              d._fullLayout._lasthover.onmousedown(g);
            }, s.updateFx(d);
          }
        }, s.updateFx = function(d) {
          var f = d._fullLayout, c = f.dragmode === "pan" ? "move" : "crosshair";
          h(f._draggers, c);
        };
      }, 20706: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(5975);
        o.exports = function(h) {
          return function(p, _) {
            var d = p[h];
            if (Array.isArray(d)) for (var f = l.subplotsRegistry.cartesian, c = f.idRegex, g = _._subplots, m = g.xaxis, x = g.yaxis, w = g.cartesian, k = _._has("cartesian") || _._has("gl2d"), S = 0; S < d.length; S++) {
              var A = d[S];
              if (u.isPlainObject(A)) {
                var C = i.cleanId(A.xref, "x", !1), D = i.cleanId(A.yref, "y", !1), L = c.x.test(C), E = c.y.test(D);
                if (L || E) {
                  k || u.pushUnique(_._basePlotModules, f);
                  var P = !1;
                  L && m.indexOf(C) === -1 && (m.push(C), P = !0), E && x.indexOf(D) === -1 && (x.push(D), P = !0), P && L && E && w.push(C + D);
                }
              }
            }
          };
        };
      }, 37703: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(34809), h = n(44122), p = n(62203), _ = n(4173).eV, d = n(5975), f = n(54826), c = n(62972), g = i.ensureSingle;
        function m(C, D, L) {
          return i.ensureSingle(C, D, L, function(E) {
            E.datum(L);
          });
        }
        var x = f.zindexSeparator;
        function w(C, D, L, E, P) {
          for (var I, M, O, T = f.traceLayerClasses, z = C._fullLayout, F = z._zindices, U = z._modules, V = [], $ = [], q = 0; q < F.length; q++) for (var K = F[q], re = 0; re < U.length; re++) {
            var Y = (I = U[re]).name, te = u.modules[Y].categories;
            if (te.svg) {
              var ee = I.layerName || Y + "layer", X = ee + (q ? Number(q) + 1 : ""), Q = I.plot;
              O = (M = _(L, Q, K))[0], L = M[1], O.length && V.push({ i: T.indexOf(ee), zindex: q, className: X, plotMethod: Q, cdModule: O }), te.zoomScale && $.push("." + X);
            }
          }
          V.sort(function(he, de) {
            return (he.zindex || 0) - (de.zindex || 0) || he.i - de.i;
          });
          var ue = D.plot.selectAll("g.mlayer").data(V, function(he) {
            return he.className;
          });
          if (ue.enter().append("g").attr("class", function(he) {
            return he.className;
          }).classed("mlayer", !0).classed("rangeplot", D.isRangePlot), ue.exit().remove(), ue.order(), ue.each(function(he) {
            var de = l.select(this), ne = he.className;
            he.plotMethod(C, D, he.cdModule, de, E, P), f.clipOnAxisFalseQuery.indexOf("." + ne) === -1 && p.setClipUrl(de, D.layerClipId, C);
          }), z._has("scattergl") && (I = u.getModule("scattergl"), O = _(L, I)[0], I.plot(C, D, O)), !C._context.staticPlot && (D._hasClipOnAxisFalse && (D.clipOnAxisFalseTraces = D.plot.selectAll(f.clipOnAxisFalseQuery.join(",")).selectAll(".trace")), $.length)) {
            var ce = D.plot.selectAll($.join(",")).selectAll(".trace");
            D.zoomScalePts = ce.selectAll("path.point"), D.zoomScaleTxt = ce.selectAll(".textpoint");
          }
        }
        function k(C, D) {
          var L = C._fullLayout, E = D.plotgroup, P = D.id, I = P.indexOf(x) !== -1, M = f.layerValue2layerClass[D.xaxis.layer], O = f.layerValue2layerClass[D.yaxis.layer], T = L._hasOnlyLargeSploms;
          if (!D.mainplot || L._zindices.length > 1) if (T) D.xlines = g(E, "path", "xlines-above"), D.ylines = g(E, "path", "ylines-above"), D.xaxislayer = g(E, "g", "xaxislayer-above"), D.yaxislayer = g(E, "g", "yaxislayer-above");
          else {
            if (!I) {
              var z = g(E, "g", "layer-subplot");
              D.shapelayer = g(z, "g", "shapelayer"), D.imagelayer = g(z, "g", "imagelayer"), D.minorGridlayer = g(E, "g", "minor-gridlayer"), D.gridlayer = g(E, "g", "gridlayer"), D.zerolinelayer = g(E, "g", "zerolinelayer");
              var F = g(E, "g", "layer-between");
              D.shapelayerBetween = g(F, "g", "shapelayer"), D.imagelayerBetween = g(F, "g", "imagelayer"), g(E, "path", "xlines-below"), g(E, "path", "ylines-below"), D.overlinesBelow = g(E, "g", "overlines-below"), g(E, "g", "xaxislayer-below"), g(E, "g", "yaxislayer-below"), D.overaxesBelow = g(E, "g", "overaxes-below");
            }
            D.overplot = g(E, "g", "overplot"), D.plot = g(D.overplot, "g", P), I || (D.xlines = g(E, "path", "xlines-above"), D.ylines = g(E, "path", "ylines-above"), D.overlinesAbove = g(E, "g", "overlines-above"), g(E, "g", "xaxislayer-above"), g(E, "g", "yaxislayer-above"), D.overaxesAbove = g(E, "g", "overaxes-above"), D.xlines = E.select(".xlines-" + M), D.ylines = E.select(".ylines-" + O), D.xaxislayer = E.select(".xaxislayer-" + M), D.yaxislayer = E.select(".yaxislayer-" + O));
          }
          else {
            var U = D.mainplotinfo, V = U.plotgroup, $ = P + "-x", q = P + "-y";
            D.minorGridlayer = U.minorGridlayer, D.gridlayer = U.gridlayer, D.zerolinelayer = U.zerolinelayer, g(U.overlinesBelow, "path", $), g(U.overlinesBelow, "path", q), g(U.overaxesBelow, "g", $), g(U.overaxesBelow, "g", q), D.plot = g(U.overplot, "g", P), g(U.overlinesAbove, "path", $), g(U.overlinesAbove, "path", q), g(U.overaxesAbove, "g", $), g(U.overaxesAbove, "g", q), D.xlines = V.select(".overlines-" + M).select("." + $), D.ylines = V.select(".overlines-" + O).select("." + q), D.xaxislayer = V.select(".overaxes-" + M).select("." + $), D.yaxislayer = V.select(".overaxes-" + O).select("." + q);
          }
          I || (T || (m(D.minorGridlayer, "g", D.xaxis._id), m(D.minorGridlayer, "g", D.yaxis._id), D.minorGridlayer.selectAll("g").map(function(K) {
            return K[0];
          }).sort(d.idSort), m(D.gridlayer, "g", D.xaxis._id), m(D.gridlayer, "g", D.yaxis._id), D.gridlayer.selectAll("g").map(function(K) {
            return K[0];
          }).sort(d.idSort)), D.xlines.style("fill", "none").classed("crisp", !0), D.ylines.style("fill", "none").classed("crisp", !0));
        }
        function S(C, D) {
          if (C) {
            var L = {};
            for (var E in C.each(function(O) {
              var T = O[0];
              l.select(this).remove(), A(T, D), L[T] = !0;
            }), D._plots) for (var P = D._plots[E].overlays || [], I = 0; I < P.length; I++) {
              var M = P[I];
              L[M.id] && M.plot.selectAll(".trace").remove();
            }
          }
        }
        function A(C, D) {
          D._draggers.selectAll("g." + C).remove(), D._defs.select("#clip" + D._uid + C + "plot").remove();
        }
        s.name = "cartesian", s.attr = ["xaxis", "yaxis"], s.idRoot = ["x", "y"], s.idRegex = f.idRegex, s.attrRegex = f.attrRegex, s.attributes = n(55126), s.layoutAttributes = n(25829), s.supplyLayoutDefaults = n(74098), s.transitionAxes = n(84982), s.finalizeSubplots = function(C, D) {
          var L, E, P, I = D._subplots, M = I.xaxis, O = I.yaxis, T = I.cartesian, z = T.concat(I.gl2d || []), F = {}, U = {};
          for (L = 0; L < z.length; L++) {
            var V = z[L].split("y");
            F[V[0]] = 1, U["y" + V[1]] = 1;
          }
          for (L = 0; L < M.length; L++) F[E = M[L]] || (P = (C[d.id2name(E)] || {}).anchor, f.idRegex.y.test(P) || (P = "y"), T.push(E + P), z.push(E + P), U[P] || (U[P] = 1, i.pushUnique(O, P)));
          for (L = 0; L < O.length; L++) U[P = O[L]] || (E = (C[d.id2name(P)] || {}).anchor, f.idRegex.x.test(E) || (E = "x"), T.push(E + P), z.push(E + P), F[E] || (F[E] = 1, i.pushUnique(M, E)));
          if (!z.length) {
            for (var $ in E = "", P = "", C) f.attrRegex.test($) && ($.charAt(0) === "x" ? (!E || +$.substr(5) < +E.substr(5)) && (E = $) : (!P || +$.substr(5) < +P.substr(5)) && (P = $));
            E = E ? d.name2id(E) : "x", P = P ? d.name2id(P) : "y", M.push(E), O.push(P), T.push(E + P);
          }
        }, s.plot = function(C, D, L, E) {
          var P, I = C._fullLayout, M = I._subplots.cartesian, O = C.calcdata;
          if (!Array.isArray(D)) for (D = [], P = 0; P < O.length; P++) D.push(P);
          for (var T = I._zindices, z = 0; z < T.length; z++) {
            var F = T[z];
            for (P = 0; P < M.length; P++) {
              var U = M[P], V = I._plots[U];
              if (z > 0) {
                var $ = V.id;
                if ($.indexOf(x) !== -1) continue;
                $ += x + (z + 1), V = i.extendFlat({}, V, { id: $, plot: I._cartesianlayer.selectAll(".subplot").select("." + $) });
              }
              for (var q, K = [], re = 0; re < O.length; re++) {
                var Y = O[re], te = Y[0].trace;
                F === (te.zorder || 0) && te.xaxis + te.yaxis === U && ((D.indexOf(te.index) !== -1 || te.carpet) && (q && q[0].trace.xaxis + q[0].trace.yaxis === U && ["tonextx", "tonexty", "tonext"].indexOf(te.fill) !== -1 && K.indexOf(q) === -1 && K.push(q), K.push(Y)), q = Y);
              }
              w(C, V, K, L, E);
            }
          }
        }, s.clean = function(C, D, L, E) {
          var P, I, M, O = E._plots || {}, T = D._plots || {}, z = E._subplots || {};
          if (E._hasOnlyLargeSploms && !D._hasOnlyLargeSploms) for (M in O) (P = O[M]).plotgroup && P.plotgroup.remove();
          var F = E._has && E._has("gl"), U = D._has && D._has("gl");
          if (F && !U) for (M in O) (P = O[M])._scene && P._scene.destroy();
          if (z.xaxis && z.yaxis) {
            var V = d.listIds({ _fullLayout: E });
            for (I = 0; I < V.length; I++) {
              var $ = V[I];
              D[d.id2name($)] || E._infolayer.selectAll(".g-" + $ + "title").remove();
            }
          }
          var q = E._has && E._has("cartesian"), K = D._has && D._has("cartesian");
          if (q && !K) S(E._cartesianlayer.selectAll(".subplot"), E), E._defs.selectAll(".axesclip").remove(), delete E._axisConstraintGroups, delete E._axisMatchGroups;
          else if (z.cartesian) for (I = 0; I < z.cartesian.length; I++) {
            var re = z.cartesian[I];
            if (re.indexOf(x) === -1 && !T[re]) {
              var Y = "." + re + ",." + re + "-x,." + re + "-y";
              E._cartesianlayer.selectAll(Y).remove(), A(re, E);
            }
          }
        }, s.drawFramework = function(C) {
          var D, L = C._fullLayout, E = C.calcdata, P = {};
          for (D = 0; D < E.length; D++) {
            var I = E[D][0], M = I.trace.zorder || 0;
            P[M] || (P[M] = []), P[M].push(I);
          }
          var O = Object.keys(P).map(Number).sort(i.sorterAsc);
          O.length || (O = [0]), L._zindices = O;
          var T = function(q) {
            var K, re, Y, te, ee, X, Q = q._fullLayout, ue = Q._zindices.length, ce = Q._subplots.cartesian, he = ce.length, de = [], ne = [];
            for (K = 0; K < he; K++) {
              Y = ce[K], ee = (te = Q._plots[Y]).xaxis, X = te.yaxis;
              var ae = ee._mainAxis, se = X._mainAxis, me = ae._id + se._id, ye = Q._plots[me];
              te.overlays = [], me !== Y && ye ? (te.mainplot = me, te.mainplotinfo = ye, ne.push(Y)) : (te.mainplot = void 0, te.mainplotinfo = void 0, de.push(Y));
            }
            for (K = 0; K < ne.length; K++) Y = ne[K], (te = Q._plots[Y]).mainplotinfo.overlays.push(te);
            var pe = de.concat(ne), be = [];
            for (K = 0; K < he; K++) {
              Y = pe[K], ee = (te = Q._plots[Y]).xaxis, X = te.yaxis;
              for (var Ae = [], Se = 1; Se <= ue; Se++) {
                var Me = "";
                for (Se > 1 && (Me += x + Se), Ae.push(Y + Me), re = 0; re < te.overlays.length; re++) Ae.push(te.overlays[re].id + Me);
              }
              Ae = Ae.concat([ee.layer, X.layer, ee.overlaying || "", X.overlaying || ""]), be.push(Ae);
            }
            return be;
          }(C), z = T.length, F = [];
          for (D = 0; D < z; D++) F[D] = T[D].slice();
          for (var U = 1; U < O.length; U++) {
            var V = [];
            for (D = 0; D < z; D++) V[D] = T[D].slice(), V[D][0] += x + (U + 1);
            F = F.concat(V);
          }
          var $ = L._cartesianlayer.selectAll(".subplot").data(F, String);
          $.enter().append("g").attr("class", function(q) {
            return "subplot " + q[0];
          }), $.order(), $.exit().call(S, L), $.each(function(q) {
            var K = q[0], re = K.indexOf(x), Y = re !== -1, te = Y ? K.slice(0, re) : K, ee = L._plots[K];
            ee || (ee = i.extendFlat({}, L._plots[te])) && (ee.id = K, L._plots[K] = ee, L._subplots.cartesian.push(K)), ee && (ee.plotgroup = l.select(this), k(C, ee), Y || (ee.draglayer = g(L._draggers, "g", K)));
          });
        }, s.rangePlot = function(C, D, L) {
          k(C, D), w(C, D, L), h.style(C);
        }, s.toSVG = function(C) {
          var D = C._fullLayout._glimages, L = l.select(C).selectAll(".svg-container");
          L.filter(function(E, P) {
            return P === L.size() - 1;
          }).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function() {
            var E = this, P = E.toDataURL("image/png");
            D.append("svg:image").attr({ xmlns: c.svg, "xlink:href": P, preserveAspectRatio: "none", x: 0, y: 0, width: E.style.width, height: E.style.height });
          });
        }, s.updateFx = n(95284).updateFx;
      }, 25829: function(o, s, n) {
        var l = n(80337), u = n(10229), i = n(94850).T, h = n(93049).extendFlat, p = n(78032).templatedArray, _ = n(80712).descriptionWithDates, d = n(63821).ONEDAY, f = n(54826), c = f.HOUR_PATTERN, g = f.WEEKDAY_PATTERN, m = { valType: "enumerated", values: ["auto", "linear", "array"], editType: "ticks", impliedEdits: { tick0: void 0, dtick: void 0 } }, x = h({}, m, { values: m.values.slice().concat(["sync"]) });
        function w(T) {
          return { valType: "integer", min: 0, dflt: T ? 5 : 0, editType: "ticks" };
        }
        var k = { valType: "any", editType: "ticks", impliedEdits: { tickmode: "linear" } }, S = { valType: "any", editType: "ticks", impliedEdits: { tickmode: "linear" } }, A = { valType: "data_array", editType: "ticks" }, C = { valType: "enumerated", values: ["outside", "inside", ""], editType: "ticks" };
        function D(T) {
          var z = { valType: "number", min: 0, editType: "ticks" };
          return T || (z.dflt = 5), z;
        }
        function L(T) {
          var z = { valType: "number", min: 0, editType: "ticks" };
          return T || (z.dflt = 1), z;
        }
        var E = { valType: "color", dflt: u.defaultLine, editType: "ticks" }, P = { valType: "color", dflt: u.lightLine, editType: "ticks" };
        function I(T) {
          var z = { valType: "number", min: 0, editType: "ticks" };
          return T || (z.dflt = 1), z;
        }
        var M = h({}, i, { editType: "ticks" }), O = { valType: "boolean", editType: "ticks" };
        o.exports = { visible: { valType: "boolean", editType: "plot" }, color: { valType: "color", dflt: u.defaultLine, editType: "ticks" }, title: { text: { valType: "string", editType: "ticks" }, font: l({ editType: "ticks" }), standoff: { valType: "number", min: 0, editType: "ticks" }, editType: "ticks" }, type: { valType: "enumerated", values: ["-", "linear", "log", "date", "category", "multicategory"], dflt: "-", editType: "calc", _noTemplating: !0 }, autotypenumbers: { valType: "enumerated", values: ["convert types", "strict"], dflt: "convert types", editType: "calc" }, autorange: { valType: "enumerated", values: [!0, !1, "reversed", "min reversed", "max reversed", "min", "max"], dflt: !0, editType: "axrange", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, autorangeoptions: { minallowed: { valType: "any", editType: "plot", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, maxallowed: { valType: "any", editType: "plot", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, clipmin: { valType: "any", editType: "plot", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, clipmax: { valType: "any", editType: "plot", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, include: { valType: "any", arrayOk: !0, editType: "plot", impliedEdits: { "range[0]": void 0, "range[1]": void 0 } }, editType: "plot" }, rangemode: { valType: "enumerated", values: ["normal", "tozero", "nonnegative"], dflt: "normal", editType: "plot" }, range: { valType: "info_array", items: [{ valType: "any", editType: "axrange", impliedEdits: { "^autorange": !1 }, anim: !0 }, { valType: "any", editType: "axrange", impliedEdits: { "^autorange": !1 }, anim: !0 }], editType: "axrange", impliedEdits: { autorange: !1 }, anim: !0 }, minallowed: { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, maxallowed: { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, fixedrange: { valType: "boolean", dflt: !1, editType: "calc" }, insiderange: { valType: "info_array", items: [{ valType: "any", editType: "plot" }, { valType: "any", editType: "plot" }], editType: "plot" }, scaleanchor: { valType: "enumerated", values: [f.idRegex.x.toString(), f.idRegex.y.toString(), !1], editType: "plot" }, scaleratio: { valType: "number", min: 0, dflt: 1, editType: "plot" }, constrain: { valType: "enumerated", values: ["range", "domain"], editType: "plot" }, constraintoward: { valType: "enumerated", values: ["left", "center", "right", "top", "middle", "bottom"], editType: "plot" }, matches: { valType: "enumerated", values: [f.idRegex.x.toString(), f.idRegex.y.toString()], editType: "calc" }, rangebreaks: p("rangebreak", { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, bounds: { valType: "info_array", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }], editType: "calc" }, pattern: { valType: "enumerated", values: [g, c, ""], editType: "calc" }, values: { valType: "info_array", freeLength: !0, editType: "calc", items: { valType: "any", editType: "calc" } }, dvalue: { valType: "number", editType: "calc", min: 0, dflt: d }, editType: "calc" }), tickmode: x, nticks: w(), tick0: k, dtick: S, ticklabelstep: { valType: "integer", min: 1, dflt: 1, editType: "ticks" }, tickvals: A, ticktext: { valType: "data_array", editType: "ticks" }, ticks: C, tickson: { valType: "enumerated", values: ["labels", "boundaries"], dflt: "labels", editType: "ticks" }, ticklabelmode: { valType: "enumerated", values: ["instant", "period"], dflt: "instant", editType: "ticks" }, ticklabelposition: { valType: "enumerated", values: ["outside", "inside", "outside top", "inside top", "outside left", "inside left", "outside right", "inside right", "outside bottom", "inside bottom"], dflt: "outside", editType: "calc" }, ticklabeloverflow: { valType: "enumerated", values: ["allow", "hide past div", "hide past domain"], editType: "calc" }, ticklabelshift: { valType: "integer", dflt: 0, editType: "ticks" }, ticklabelstandoff: { valType: "integer", dflt: 0, editType: "ticks" }, ticklabelindex: { valType: "integer", arrayOk: !0, editType: "calc" }, mirror: { valType: "enumerated", values: [!0, "ticks", !1, "all", "allticks"], dflt: !1, editType: "ticks+layoutstyle" }, ticklen: D(), tickwidth: L(), tickcolor: E, showticklabels: { valType: "boolean", dflt: !0, editType: "ticks" }, labelalias: { valType: "any", dflt: !1, editType: "ticks" }, automargin: { valType: "flaglist", flags: ["height", "width", "left", "right", "top", "bottom"], extras: [!0, !1], dflt: !1, editType: "ticks" }, showspikes: { valType: "boolean", dflt: !1, editType: "modebar" }, spikecolor: { valType: "color", dflt: null, editType: "none" }, spikethickness: { valType: "number", dflt: 3, editType: "none" }, spikedash: h({}, i, { dflt: "dash", editType: "none" }), spikemode: { valType: "flaglist", flags: ["toaxis", "across", "marker"], dflt: "toaxis", editType: "none" }, spikesnap: { valType: "enumerated", values: ["data", "cursor", "hovered data"], dflt: "hovered data", editType: "none" }, tickfont: l({ editType: "ticks" }), tickangle: { valType: "angle", dflt: "auto", editType: "ticks" }, autotickangles: { valType: "info_array", freeLength: !0, items: { valType: "angle" }, dflt: [0, 30, 90], editType: "ticks" }, tickprefix: { valType: "string", dflt: "", editType: "ticks" }, showtickprefix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, ticksuffix: { valType: "string", dflt: "", editType: "ticks" }, showticksuffix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, showexponent: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "ticks" }, exponentformat: { valType: "enumerated", values: ["none", "e", "E", "power", "SI", "B"], dflt: "B", editType: "ticks" }, minexponent: { valType: "number", dflt: 3, min: 0, editType: "ticks" }, separatethousands: { valType: "boolean", dflt: !1, editType: "ticks" }, tickformat: { valType: "string", dflt: "", editType: "ticks", description: _("tick label") }, tickformatstops: p("tickformatstop", { enabled: { valType: "boolean", dflt: !0, editType: "ticks" }, dtickrange: { valType: "info_array", items: [{ valType: "any", editType: "ticks" }, { valType: "any", editType: "ticks" }], editType: "ticks" }, value: { valType: "string", dflt: "", editType: "ticks" }, editType: "ticks" }), hoverformat: { valType: "string", dflt: "", editType: "none", description: _("hover text") }, showline: { valType: "boolean", dflt: !1, editType: "ticks+layoutstyle" }, linecolor: { valType: "color", dflt: u.defaultLine, editType: "layoutstyle" }, linewidth: { valType: "number", min: 0, dflt: 1, editType: "ticks+layoutstyle" }, showgrid: O, gridcolor: P, gridwidth: I(), griddash: M, zeroline: { valType: "boolean", editType: "ticks" }, zerolinecolor: { valType: "color", dflt: u.defaultLine, editType: "ticks" }, zerolinewidth: { valType: "number", dflt: 1, editType: "ticks" }, showdividers: { valType: "boolean", dflt: !0, editType: "ticks" }, dividercolor: { valType: "color", dflt: u.defaultLine, editType: "ticks" }, dividerwidth: { valType: "number", dflt: 1, editType: "ticks" }, anchor: { valType: "enumerated", values: ["free", f.idRegex.x.toString(), f.idRegex.y.toString()], editType: "plot" }, side: { valType: "enumerated", values: ["top", "bottom", "left", "right"], editType: "plot" }, overlaying: { valType: "enumerated", values: ["free", f.idRegex.x.toString(), f.idRegex.y.toString()], editType: "plot" }, minor: { tickmode: m, nticks: w("minor"), tick0: k, dtick: S, tickvals: A, ticks: C, ticklen: D("minor"), tickwidth: L("minor"), tickcolor: E, gridcolor: P, gridwidth: I("minor"), griddash: M, showgrid: O, editType: "ticks" }, layer: { valType: "enumerated", values: ["above traces", "below traces"], dflt: "above traces", editType: "plot" }, domain: { valType: "info_array", items: [{ valType: "number", min: 0, max: 1, editType: "plot" }, { valType: "number", min: 0, max: 1, editType: "plot" }], dflt: [0, 1], editType: "plot" }, position: { valType: "number", min: 0, max: 1, dflt: 0, editType: "plot" }, autoshift: { valType: "boolean", dflt: !1, editType: "plot" }, shift: { valType: "number", editType: "plot" }, categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array", "total ascending", "total descending", "min ascending", "min descending", "max ascending", "max descending", "sum ascending", "sum descending", "mean ascending", "mean descending", "geometric mean ascending", "geometric mean descending", "median ascending", "median descending"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, uirevision: { valType: "any", editType: "none" }, editType: "calc", _deprecated: { autotick: { valType: "boolean", editType: "ticks" }, title: { valType: "string", editType: "ticks" }, titlefont: l({ editType: "ticks" }) } };
      }, 74098: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(36040).isUnifiedHover, h = n(45265), p = n(78032), _ = n(6704), d = n(25829), f = n(4392), c = n(97655), g = n(84391), m = n(40957), x = n(5975), w = x.id2name, k = x.name2id, S = n(54826).AX_ID_PATTERN, A = n(33626), C = A.traceIs, D = A.getComponentMethod;
        function L(E, P, I) {
          Array.isArray(E[P]) ? E[P].push(I) : E[P] = [I];
        }
        o.exports = function(E, P, I) {
          var M, O, T = P.autotypenumbers, z = {}, F = {}, U = {}, V = {}, $ = {}, q = {}, K = {}, re = {}, Y = {}, te = {};
          for (M = 0; M < I.length; M++) {
            var ee = I[M];
            if (C(ee, "cartesian") || C(ee, "gl2d")) {
              var X, Q;
              if (ee.xaxis) X = w(ee.xaxis), L(z, X, ee);
              else if (ee.xaxes) for (O = 0; O < ee.xaxes.length; O++) L(z, w(ee.xaxes[O]), ee);
              if (ee.yaxis) Q = w(ee.yaxis), L(z, Q, ee);
              else if (ee.yaxes) for (O = 0; O < ee.yaxes.length; O++) L(z, w(ee.yaxes[O]), ee);
              ee.type === "funnel" ? ee.orientation === "h" ? (X && (F[X] = !0), Q && (K[Q] = !0)) : Q && (U[Q] = !0) : ee.type === "image" ? (Q && (re[Q] = !0), X && (re[X] = !0)) : (Q && ($[Q] = !0, q[Q] = !0), C(ee, "carpet") && (ee.type !== "carpet" || ee._cheater) || X && (V[X] = !0)), ee.type === "carpet" && ee._cheater && X && (F[X] = !0), C(ee, "2dMap") && (Y[X] = !0, Y[Q] = !0), C(ee, "oriented") && (te[ee.orientation === "h" ? Q : X] = !0);
            }
          }
          var ue = P._subplots, ce = ue.xaxis, he = ue.yaxis, de = l.simpleMap(ce, w), ne = l.simpleMap(he, w), ae = de.concat(ne), se = u.background;
          ce.length && he.length && (se = l.coerce(E, P, _, "plot_bgcolor"));
          var me, ye, pe, be, Ae, Se = u.combine(se, P.paper_bgcolor);
          function Me() {
            var at = z[me] || [];
            Ae._traceIndices = at.map(function(vt) {
              return vt._expandedIndex;
            }), Ae._annIndices = [], Ae._shapeIndices = [], Ae._selectionIndices = [], Ae._imgIndices = [], Ae._subplotsWith = [], Ae._counterAxes = [], Ae._name = Ae._attr = me, Ae._id = ye;
          }
          function De(at, vt) {
            return l.coerce(be, Ae, d, at, vt);
          }
          function Le(at, vt) {
            return l.coerce2(be, Ae, d, at, vt);
          }
          function We(at) {
            return at === "x" ? he : ce;
          }
          function Ee(at, vt) {
            for (var St = at === "x" ? de : ne, Je = [], nt = 0; nt < St.length; nt++) {
              var ot = St[nt];
              ot === vt || (E[ot] || {}).overlaying || Je.push(k(ot));
            }
            return Je;
          }
          var Ne = { x: We("x"), y: We("y") }, Ie = Ne.x.concat(Ne.y), ge = {}, Ce = [];
          function we() {
            var at = be.matches;
            S.test(at) && Ie.indexOf(at) === -1 && (ge[at] = be.type, Ce = Object.keys(ge));
          }
          var Ge = h(E, P), Re = i(Ge);
          for (M = 0; M < ae.length; M++) {
            me = ae[M], ye = k(me), pe = me.charAt(0), l.isPlainObject(E[me]) || (E[me] = {}), be = E[me], Ae = p.newContainer(P, me, pe + "axis"), Me();
            var je = pe === "x" && !V[me] && F[me] || pe === "y" && !$[me] && U[me], Ke = pe === "y" && (!q[me] && K[me] || re[me]), tt = { hasMinor: !0, letter: pe, font: P.font, outerTicks: Y[me], showGrid: !te[me], data: z[me] || [], bgColor: Se, calendar: P.calendar, automargin: !0, visibleDflt: je, reverseDflt: Ke, autotypenumbersDflt: T, splomStash: ((P._splomAxes || {})[pe] || {})[ye], noAutotickangles: pe === "y" };
            De("uirevision", P.uirevision), f(be, Ae, De, tt), c(be, Ae, De, tt, P);
            var _e = Re && pe === Ge.charAt(0), Be = Le("spikecolor", Re ? Ae.color : void 0), $e = Le("spikethickness", Re ? 1.5 : void 0), Ze = Le("spikedash", Re ? "dot" : void 0), ct = Le("spikemode", Re ? "across" : void 0), ft = Le("spikesnap");
            De("showspikes", !!(_e || Be || $e || Ze || ct || ft)) || (delete Ae.spikecolor, delete Ae.spikethickness, delete Ae.spikedash, delete Ae.spikemode, delete Ae.spikesnap);
            var _t = w(be.overlaying), Pt = [0, 1];
            if (P[_t] !== void 0) {
              var Dt = w(P[_t].anchor);
              P[Dt] !== void 0 && (Pt = P[Dt].domain);
            }
            m(be, Ae, De, { letter: pe, counterAxes: Ne[pe], overlayableAxes: Ee(pe, me), grid: P.grid, overlayingDomain: Pt }), De("title.standoff"), we(), Ae._input = be;
          }
          for (M = 0; M < Ce.length; ) {
            ye = Ce[M++], pe = (me = w(ye)).charAt(0), l.isPlainObject(E[me]) || (E[me] = {}), be = E[me], Ae = p.newContainer(P, me, pe + "axis"), Me();
            var $t = { letter: pe, font: P.font, outerTicks: Y[me], showGrid: !te[me], data: [], bgColor: Se, calendar: P.calendar, automargin: !0, visibleDflt: !1, reverseDflt: !1, autotypenumbersDflt: T, splomStash: ((P._splomAxes || {})[pe] || {})[ye] };
            De("uirevision", P.uirevision), Ae.type = ge[ye] || "linear", c(be, Ae, De, $t, P), m(be, Ae, De, { letter: pe, counterAxes: Ne[pe], overlayableAxes: Ee(pe, me), grid: P.grid }), De("fixedrange"), we(), Ae._input = be;
          }
          var Gt = D("rangeslider", "handleDefaults"), Wt = D("rangeselector", "handleDefaults");
          for (M = 0; M < de.length; M++) me = de[M], be = E[me], Ae = P[me], Gt(E, P, me), Ae.type === "date" && Wt(be, Ae, P, ne, Ae.calendar), De("fixedrange");
          for (M = 0; M < ne.length; M++) {
            me = ne[M], be = E[me], Ae = P[me];
            var mt = P[w(Ae.anchor)];
            De("fixedrange", D("rangeslider", "isVisible")(mt));
          }
          g.handleDefaults(E, P, { axIds: Ie.concat(Ce).sort(x.idSort), axHasImage: re });
        };
      }, 97405: function(o, s, n) {
        var l = n(65657).mix, u = n(10229), i = n(34809);
        o.exports = function(h, p, _, d) {
          var f = (d = d || {}).dfltColor;
          function c(E, P) {
            return i.coerce2(h, p, d.attributes, E, P);
          }
          var g = c("linecolor", f), m = c("linewidth");
          _("showline", d.showLine || !!g || !!m) || (delete p.linecolor, delete p.linewidth);
          var x = c("gridcolor", l(f, d.bgColor, d.blend || u.lightFraction).toRgbString()), w = c("gridwidth"), k = c("griddash");
          if (_("showgrid", d.showGrid || !!x || !!w || !!k) || (delete p.gridcolor, delete p.gridwidth, delete p.griddash), d.hasMinor) {
            var S = c("minor.gridcolor", l(p.gridcolor, d.bgColor, 67).toRgbString()), A = c("minor.gridwidth", p.gridwidth || 1), C = c("minor.griddash", p.griddash || "solid");
            _("minor.showgrid", !!S || !!A || !!C) || (delete p.minor.gridcolor, delete p.minor.gridwidth, delete p.minor.griddash);
          }
          if (!d.noZeroLine) {
            var D = c("zerolinecolor", f), L = c("zerolinewidth");
            _("zeroline", d.showGrid || !!D || !!L) || (delete p.zerolinecolor, delete p.zerolinewidth);
          }
        };
      }, 40957: function(o, s, n) {
        var l = n(10721), u = n(34809);
        o.exports = function(i, h, p, _) {
          var d, f, c, g, m, x, w = _.counterAxes || [], k = _.overlayableAxes || [], S = _.letter, A = _.grid, C = _.overlayingDomain;
          A && (f = A._domains[S][A._axisMap[h._id]], d = A._anchors[h._id], f && (c = A[S + "side"].split(" ")[0], g = A.domain[S][c === "right" || c === "top" ? 1 : 0])), f = f || [0, 1], d = d || (l(i.position) ? "free" : w[0] || "free"), c = c || (S === "x" ? "bottom" : "left"), g = g || 0, m = 0, x = !1;
          var D = u.coerce(i, h, { anchor: { valType: "enumerated", values: ["free"].concat(w), dflt: d } }, "anchor"), L = u.coerce(i, h, { side: { valType: "enumerated", values: S === "x" ? ["bottom", "top"] : ["left", "right"], dflt: c } }, "side");
          D === "free" && (S === "y" && (p("autoshift") && (g = L === "left" ? C[0] : C[1], x = !h.automargin || h.automargin, m = L === "left" ? -3 : 3), p("shift", m)), p("position", g)), p("automargin", x);
          var E = !1;
          if (k.length && (E = u.coerce(i, h, { overlaying: { valType: "enumerated", values: [!1].concat(k), dflt: !1 } }, "overlaying")), !E) {
            var P = p("domain", f);
            P[0] > P[1] - 244140625e-12 && (h.domain = f), u.noneOrAll(i.domain, h.domain, f), h.tickmode === "sync" && (h.tickmode = "auto");
          }
          return p("layer"), h;
        };
      }, 54616: function(o, s, n) {
        var l = n(87703);
        o.exports = function(u, i, h, p, _) {
          _ || (_ = {});
          var d = _.tickSuffixDflt, f = l(u);
          h("tickprefix") && h("showtickprefix", f), h("ticksuffix", d) && h("showticksuffix", f);
        };
      }, 90259: function(o, s, n) {
        var l = n(75511);
        o.exports = function(u, i, h, p) {
          var _ = i._template || {}, d = i.type || _.type || "-";
          h("minallowed"), h("maxallowed");
          var f, c = h("range");
          c || p.noInsiderange || d === "log" || (!(f = h("insiderange")) || f[0] !== null && f[1] !== null || (i.insiderange = !1, f = void 0), f && (c = h("range", f)));
          var g, m = i.getAutorangeDflt(c, p), x = h("autorange", m);
          !c || (c[0] !== null || c[1] !== null) && (c[0] !== null && c[1] !== null || x !== "reversed" && x !== !0) && (c[0] === null || x !== "min" && x !== "max reversed") && (c[1] === null || x !== "max" && x !== "min reversed") || (c = void 0, delete i.range, i.autorange = !0, g = !0), g || (x = h("autorange", m = i.getAutorangeDflt(c, p))), x && (l(h, x, c), d !== "linear" && d !== "-" || h("rangemode")), i.cleanRange();
        };
      }, 67611: function(o, s, n) {
        var l = n(4530).FROM_BL;
        o.exports = function(u, i, h) {
          h === void 0 && (h = l[u.constraintoward || "center"]);
          var p = [u.r2l(u.range[0]), u.r2l(u.range[1])], _ = p[0] + (p[1] - p[0]) * h;
          u.range = u._input.range = [u.l2r(_ + (p[0] - _) * i), u.l2r(_ + (p[1] - _) * i)], u.setScale();
        };
      }, 19091: function(o, s, n) {
        var l = n(45568), u = n(42696).aL, i = n(34809), h = i.numberFormat, p = n(10721), _ = i.cleanNumber, d = i.ms2DateTime, f = i.dateTime2ms, c = i.ensureNumber, g = i.isArrayOrTypedArray, m = n(63821), x = m.FP_SAFE, w = m.BADNUM, k = m.LOG_CLIP, S = m.ONEWEEK, A = m.ONEDAY, C = m.ONEHOUR, D = m.ONEMIN, L = m.ONESEC, E = n(5975), P = n(54826), I = P.HOUR_PATTERN, M = P.WEEKDAY_PATTERN;
        function O(z) {
          return Math.pow(10, z);
        }
        function T(z) {
          return z != null;
        }
        o.exports = function(z, F) {
          F = F || {};
          var U = z._id || "x", V = U.charAt(0);
          function $(ae, se) {
            if (ae > 0) return Math.log(ae) / Math.LN10;
            if (ae <= 0 && se && z.range && z.range.length === 2) {
              var me = z.range[0], ye = z.range[1];
              return 0.5 * (me + ye - 2 * k * Math.abs(me - ye));
            }
            return w;
          }
          function q(ae, se, me, ye) {
            if ((ye || {}).msUTC && p(ae)) return +ae;
            var pe = f(ae, me || z.calendar);
            if (pe === w) {
              if (!p(ae)) return w;
              ae = +ae;
              var be = Math.floor(10 * i.mod(ae + 0.05, 1)), Ae = Math.round(ae - be / 10);
              pe = f(new Date(Ae)) + be / 10;
            }
            return pe;
          }
          function K(ae, se, me) {
            return d(ae, se, me || z.calendar);
          }
          function re(ae) {
            return z._categories[Math.round(ae)];
          }
          function Y(ae) {
            if (T(ae)) {
              if (z._categoriesMap === void 0 && (z._categoriesMap = {}), z._categoriesMap[ae] !== void 0) return z._categoriesMap[ae];
              z._categories.push(typeof ae == "number" ? String(ae) : ae);
              var se = z._categories.length - 1;
              return z._categoriesMap[ae] = se, se;
            }
            return w;
          }
          function te(ae) {
            if (z._categoriesMap) return z._categoriesMap[ae];
          }
          function ee(ae) {
            var se = te(ae);
            return se !== void 0 ? se : p(ae) ? +ae : void 0;
          }
          function X(ae) {
            return p(ae) ? +ae : te(ae);
          }
          function Q(ae, se, me) {
            return l.round(me + se * ae, 2);
          }
          function ue(ae, se, me) {
            return (ae - me) / se;
          }
          var ce = function(ae) {
            return p(ae) ? Q(ae, z._m, z._b) : w;
          }, he = function(ae) {
            return ue(ae, z._m, z._b);
          };
          if (z.rangebreaks) {
            var de = V === "y";
            ce = function(ae) {
              if (!p(ae)) return w;
              var se = z._rangebreaks.length;
              if (!se) return Q(ae, z._m, z._b);
              var me = de;
              z.range[0] > z.range[1] && (me = !me);
              for (var ye = me ? -1 : 1, pe = ye * ae, be = 0, Ae = 0; Ae < se; Ae++) {
                var Se = ye * z._rangebreaks[Ae].min, Me = ye * z._rangebreaks[Ae].max;
                if (pe < Se) break;
                if (!(pe > Me)) {
                  be = pe < (Se + Me) / 2 ? Ae : Ae + 1;
                  break;
                }
                be = Ae + 1;
              }
              var De = z._B[be] || 0;
              return isFinite(De) ? Q(ae, z._m2, De) : 0;
            }, he = function(ae) {
              var se = z._rangebreaks.length;
              if (!se) return ue(ae, z._m, z._b);
              for (var me = 0, ye = 0; ye < se && !(ae < z._rangebreaks[ye].pmin); ye++) ae > z._rangebreaks[ye].pmax && (me = ye + 1);
              return ue(ae, z._m2, z._B[me]);
            };
          }
          z.c2l = z.type === "log" ? $ : c, z.l2c = z.type === "log" ? O : c, z.l2p = ce, z.p2l = he, z.c2p = z.type === "log" ? function(ae, se) {
            return ce($(ae, se));
          } : ce, z.p2c = z.type === "log" ? function(ae) {
            return O(he(ae));
          } : he, ["linear", "-"].indexOf(z.type) !== -1 ? (z.d2r = z.r2d = z.d2c = z.r2c = z.d2l = z.r2l = _, z.c2d = z.c2r = z.l2d = z.l2r = c, z.d2p = z.r2p = function(ae) {
            return z.l2p(_(ae));
          }, z.p2d = z.p2r = he, z.cleanPos = c) : z.type === "log" ? (z.d2r = z.d2l = function(ae, se) {
            return $(_(ae), se);
          }, z.r2d = z.r2c = function(ae) {
            return O(_(ae));
          }, z.d2c = z.r2l = _, z.c2d = z.l2r = c, z.c2r = $, z.l2d = O, z.d2p = function(ae, se) {
            return z.l2p(z.d2r(ae, se));
          }, z.p2d = function(ae) {
            return O(he(ae));
          }, z.r2p = function(ae) {
            return z.l2p(_(ae));
          }, z.p2r = he, z.cleanPos = c) : z.type === "date" ? (z.d2r = z.r2d = i.identity, z.d2c = z.r2c = z.d2l = z.r2l = q, z.c2d = z.c2r = z.l2d = z.l2r = K, z.d2p = z.r2p = function(ae, se, me) {
            return z.l2p(q(ae, 0, me));
          }, z.p2d = z.p2r = function(ae, se, me) {
            return K(he(ae), se, me);
          }, z.cleanPos = function(ae) {
            return i.cleanDate(ae, w, z.calendar);
          }) : z.type === "category" ? (z.d2c = z.d2l = Y, z.r2d = z.c2d = z.l2d = re, z.d2r = z.d2l_noadd = ee, z.r2c = function(ae) {
            var se = X(ae);
            return se !== void 0 ? se : z.fraction2r(0.5);
          }, z.l2r = z.c2r = c, z.r2l = X, z.d2p = function(ae) {
            return z.l2p(z.r2c(ae));
          }, z.p2d = function(ae) {
            return re(he(ae));
          }, z.r2p = z.d2p, z.p2r = he, z.cleanPos = function(ae) {
            return typeof ae == "string" && ae !== "" ? ae : c(ae);
          }) : z.type === "multicategory" && (z.r2d = z.c2d = z.l2d = re, z.d2r = z.d2l_noadd = ee, z.r2c = function(ae) {
            var se = ee(ae);
            return se !== void 0 ? se : z.fraction2r(0.5);
          }, z.r2c_just_indices = te, z.l2r = z.c2r = c, z.r2l = ee, z.d2p = function(ae) {
            return z.l2p(z.r2c(ae));
          }, z.p2d = function(ae) {
            return re(he(ae));
          }, z.r2p = z.d2p, z.p2r = he, z.cleanPos = function(ae) {
            return Array.isArray(ae) || typeof ae == "string" && ae !== "" ? ae : c(ae);
          }, z.setupMultiCategory = function(ae) {
            var se, me, ye = z._traceIndices, pe = z._matchGroup;
            if (pe && z._categories.length === 0) {
              for (var be in pe) if (be !== U) {
                var Ae = F[E.id2name(be)];
                ye = ye.concat(Ae._traceIndices);
              }
            }
            var Se = [[0, {}], [0, {}]], Me = [];
            for (se = 0; se < ye.length; se++) {
              var De = ae[ye[se]];
              if (V in De) {
                var Le = De[V], We = De._length || i.minRowLength(Le);
                if (g(Le[0]) && g(Le[1])) for (me = 0; me < We; me++) {
                  var Ee = Le[0][me], Ne = Le[1][me];
                  T(Ee) && T(Ne) && (Me.push([Ee, Ne]), Ee in Se[0][1] || (Se[0][1][Ee] = Se[0][0]++), Ne in Se[1][1] || (Se[1][1][Ne] = Se[1][0]++));
                }
              }
            }
            for (Me.sort(function(Ie, ge) {
              var Ce = Se[0][1], we = Ce[Ie[0]] - Ce[ge[0]];
              if (we) return we;
              var Ge = Se[1][1];
              return Ge[Ie[1]] - Ge[ge[1]];
            }), se = 0; se < Me.length; se++) Y(Me[se]);
          }), z.fraction2r = function(ae) {
            var se = z.r2l(z.range[0]), me = z.r2l(z.range[1]);
            return z.l2r(se + ae * (me - se));
          }, z.r2fraction = function(ae) {
            var se = z.r2l(z.range[0]), me = z.r2l(z.range[1]);
            return (z.r2l(ae) - se) / (me - se);
          }, z.limitRange = function(ae) {
            var se = z.minallowed, me = z.maxallowed;
            if (se !== void 0 || me !== void 0) {
              ae || (ae = "range");
              var ye = i.nestedProperty(z, ae).get(), pe = i.simpleMap(ye, z.r2l), be = pe[1] < pe[0];
              be && pe.reverse();
              var Ae = i.simpleMap([se, me], z.r2l);
              if (se !== void 0 && pe[0] < Ae[0] && (ye[be ? 1 : 0] = se), me !== void 0 && pe[1] > Ae[1] && (ye[be ? 0 : 1] = me), ye[0] === ye[1]) {
                var Se = z.l2r(se), Me = z.l2r(me);
                if (se !== void 0) {
                  var De = Se + 1;
                  me !== void 0 && (De = Math.min(De, Me)), ye[be ? 1 : 0] = De;
                }
                if (me !== void 0) {
                  var Le = Me + 1;
                  se !== void 0 && (Le = Math.max(Le, Se)), ye[be ? 0 : 1] = Le;
                }
              }
            }
          }, z.cleanRange = function(ae, se) {
            z._cleanRange(ae, se), z.limitRange(ae);
          }, z._cleanRange = function(ae, se) {
            se || (se = {}), ae || (ae = "range");
            var me, ye, pe = i.nestedProperty(z, ae).get();
            if (ye = (ye = z.type === "date" ? i.dfltRange(z.calendar) : V === "y" ? P.DFLTRANGEY : z._name === "realaxis" ? [0, 1] : se.dfltRange || P.DFLTRANGEX).slice(), z.rangemode !== "tozero" && z.rangemode !== "nonnegative" || (ye[0] = 0), pe && pe.length === 2) {
              var be = pe[0] === null, Ae = pe[1] === null;
              for (z.type !== "date" || z.autorange || (pe[0] = i.cleanDate(pe[0], w, z.calendar), pe[1] = i.cleanDate(pe[1], w, z.calendar)), me = 0; me < 2; me++) if (z.type === "date") {
                if (!i.isDateTime(pe[me], z.calendar)) {
                  z[ae] = ye;
                  break;
                }
                if (z.r2l(pe[0]) === z.r2l(pe[1])) {
                  var Se = i.constrain(z.r2l(pe[0]), i.MIN_MS + 1e3, i.MAX_MS - 1e3);
                  pe[0] = z.l2r(Se - 1e3), pe[1] = z.l2r(Se + 1e3);
                  break;
                }
              } else {
                if (!p(pe[me])) {
                  if (be || Ae || !p(pe[1 - me])) {
                    z[ae] = ye;
                    break;
                  }
                  pe[me] = pe[1 - me] * (me ? 10 : 0.1);
                }
                if (pe[me] < -x ? pe[me] = -x : pe[me] > x && (pe[me] = x), pe[0] === pe[1]) {
                  var Me = Math.max(1, Math.abs(1e-6 * pe[0]));
                  pe[0] -= Me, pe[1] += Me;
                }
              }
            } else i.nestedProperty(z, ae).set(ye);
          }, z.setScale = function(ae) {
            var se = F._size;
            if (z.overlaying) {
              var me = E.getFromId({ _fullLayout: F }, z.overlaying);
              z.domain = me.domain;
            }
            var ye = ae && z._r ? "_r" : "range", pe = z.calendar;
            z.cleanRange(ye);
            var be, Ae, Se = z.r2l(z[ye][0], pe), Me = z.r2l(z[ye][1], pe), De = V === "y";
            if (De ? (z._offset = se.t + (1 - z.domain[1]) * se.h, z._length = se.h * (z.domain[1] - z.domain[0]), z._m = z._length / (Se - Me), z._b = -z._m * Me) : (z._offset = se.l + z.domain[0] * se.w, z._length = se.w * (z.domain[1] - z.domain[0]), z._m = z._length / (Me - Se), z._b = -z._m * Se), z._rangebreaks = [], z._lBreaks = 0, z._m2 = 0, z._B = [], z.rangebreaks && (z._rangebreaks = z.locateBreaks(Math.min(Se, Me), Math.max(Se, Me)), z._rangebreaks.length)) {
              for (be = 0; be < z._rangebreaks.length; be++) Ae = z._rangebreaks[be], z._lBreaks += Math.abs(Ae.max - Ae.min);
              var Le = De;
              Se > Me && (Le = !Le), Le && z._rangebreaks.reverse();
              var We = Le ? -1 : 1;
              for (z._m2 = We * z._length / (Math.abs(Me - Se) - z._lBreaks), z._B.push(-z._m2 * (De ? Me : Se)), be = 0; be < z._rangebreaks.length; be++) Ae = z._rangebreaks[be], z._B.push(z._B[z._B.length - 1] - We * z._m2 * (Ae.max - Ae.min));
              for (be = 0; be < z._rangebreaks.length; be++) (Ae = z._rangebreaks[be]).pmin = ce(Ae.min), Ae.pmax = ce(Ae.max);
            }
            if (!isFinite(z._m) || !isFinite(z._b) || z._length < 0) throw F._replotting = !1, new Error("Something went wrong with axis scaling");
          }, z.maskBreaks = function(ae) {
            var se, me, ye, pe, be, Ae = z.rangebreaks || [];
            Ae._cachedPatterns || (Ae._cachedPatterns = Ae.map(function(Ee) {
              return Ee.enabled && Ee.bounds ? i.simpleMap(Ee.bounds, Ee.pattern ? _ : z.d2c) : null;
            })), Ae._cachedValues || (Ae._cachedValues = Ae.map(function(Ee) {
              return Ee.enabled && Ee.values ? i.simpleMap(Ee.values, z.d2c).sort(i.sorterAsc) : null;
            }));
            for (var Se = 0; Se < Ae.length; Se++) {
              var Me = Ae[Se];
              if (Me.enabled) {
                if (Me.bounds) {
                  var De = Me.pattern;
                  switch (me = (se = Ae._cachedPatterns[Se])[0], ye = se[1], De) {
                    case M:
                      pe = (be = new Date(ae)).getUTCDay(), me > ye && (ye += 7, pe < me && (pe += 7));
                      break;
                    case I:
                      pe = (be = new Date(ae)).getUTCHours() + (be.getUTCMinutes() / 60 + be.getUTCSeconds() / 3600 + be.getUTCMilliseconds() / 36e5), me > ye && (ye += 24, pe < me && (pe += 24));
                      break;
                    case "":
                      pe = ae;
                  }
                  if (pe >= me && pe < ye) return w;
                } else for (var Le = Ae._cachedValues[Se], We = 0; We < Le.length; We++) if (ye = (me = Le[We]) + Me.dvalue, ae >= me && ae < ye) return w;
              }
            }
            return ae;
          }, z.locateBreaks = function(ae, se) {
            var me, ye, pe, be, Ae = [];
            if (!z.rangebreaks) return Ae;
            var Se = z.rangebreaks.slice().sort(function(Ge, Re) {
              return Ge.pattern === M && Re.pattern === I ? -1 : Re.pattern === M && Ge.pattern === I ? 1 : 0;
            }), Me = function(Ge, Re) {
              if ((Ge = i.constrain(Ge, ae, se)) !== (Re = i.constrain(Re, ae, se))) {
                for (var je = !0, Ke = 0; Ke < Ae.length; Ke++) {
                  var tt = Ae[Ke];
                  Ge < tt.max && Re >= tt.min && (Ge < tt.min && (tt.min = Ge), Re > tt.max && (tt.max = Re), je = !1);
                }
                je && Ae.push({ min: Ge, max: Re });
              }
            };
            for (me = 0; me < Se.length; me++) {
              var De = Se[me];
              if (De.enabled) if (De.bounds) {
                var Le = ae, We = se;
                De.pattern && (Le = Math.floor(Le)), pe = (ye = i.simpleMap(De.bounds, De.pattern ? _ : z.r2l))[0], be = ye[1];
                var Ee, Ne, Ie = new Date(Le);
                switch (De.pattern) {
                  case M:
                    Ne = S, Ee = (be - pe + (be < pe ? 7 : 0)) * A, Le += pe * A - (Ie.getUTCDay() * A + Ie.getUTCHours() * C + Ie.getUTCMinutes() * D + Ie.getUTCSeconds() * L + Ie.getUTCMilliseconds());
                    break;
                  case I:
                    Ne = A, Ee = (be - pe + (be < pe ? 24 : 0)) * C, Le += pe * C - (Ie.getUTCHours() * C + Ie.getUTCMinutes() * D + Ie.getUTCSeconds() * L + Ie.getUTCMilliseconds());
                    break;
                  default:
                    Le = Math.min(ye[0], ye[1]), Ee = Ne = (We = Math.max(ye[0], ye[1])) - Le;
                }
                for (var ge = Le; ge < We; ge += Ne) Me(ge, ge + Ee);
              } else for (var Ce = i.simpleMap(De.values, z.d2c), we = 0; we < Ce.length; we++) Me(pe = Ce[we], be = pe + De.dvalue);
            }
            return Ae.sort(function(Ge, Re) {
              return Ge.min - Re.min;
            }), Ae;
          }, z.makeCalcdata = function(ae, se, me) {
            var ye, pe, be, Ae, Se = z.type, Me = Se === "date" && ae[se + "calendar"];
            if (se in ae) {
              if (ye = ae[se], Ae = ae._length || i.minRowLength(ye), i.isTypedArray(ye) && (Se === "linear" || Se === "log")) {
                if (Ae === ye.length) return ye;
                if (ye.subarray) return ye.subarray(0, Ae);
              }
              if (Se === "multicategory") return function(We, Ee) {
                for (var Ne = new Array(Ee), Ie = 0; Ie < Ee; Ie++) {
                  var ge = (We[0] || [])[Ie], Ce = (We[1] || [])[Ie];
                  Ne[Ie] = te([ge, Ce]);
                }
                return Ne;
              }(ye, Ae);
              for (pe = new Array(Ae), be = 0; be < Ae; be++) pe[be] = z.d2c(ye[be], 0, Me, me);
            } else {
              var De = se + "0" in ae ? z.d2c(ae[se + "0"], 0, Me) : 0, Le = ae["d" + se] ? Number(ae["d" + se]) : 1;
              for (ye = ae[{ x: "y", y: "x" }[se]], Ae = ae._length || ye.length, pe = new Array(Ae), be = 0; be < Ae; be++) pe[be] = De + be * Le;
            }
            if (z.rangebreaks) for (be = 0; be < Ae; be++) pe[be] = z.maskBreaks(pe[be]);
            return pe;
          }, z.isValidRange = function(ae, se) {
            return Array.isArray(ae) && ae.length === 2 && (se && ae[0] === null || p(z.r2l(ae[0]))) && (se && ae[1] === null || p(z.r2l(ae[1])));
          }, z.getAutorangeDflt = function(ae, se) {
            var me = !z.isValidRange(ae, "nullOk");
            return me && se && se.reverseDflt ? me = "reversed" : ae && (ae[0] === null && ae[1] === null ? me = !0 : ae[0] === null && ae[1] !== null ? me = "min" : ae[0] !== null && ae[1] === null && (me = "max")), me;
          }, z.isReversed = function() {
            var ae = z.autorange;
            return ae === "reversed" || ae === "min reversed" || ae === "max reversed";
          }, z.isPtWithinRange = function(ae, se) {
            var me = z.c2l(ae[V], null, se), ye = z.r2l(z.range[0]), pe = z.r2l(z.range[1]);
            return ye < pe ? ye <= me && me <= pe : pe <= me && me <= ye;
          }, z._emptyCategories = function() {
            z._categories = [], z._categoriesMap = {};
          }, z.clearCalc = function() {
            var ae = z._matchGroup;
            if (ae) {
              var se = null, me = null;
              for (var ye in ae) {
                var pe = F[E.id2name(ye)];
                if (pe._categories) {
                  se = pe._categories, me = pe._categoriesMap;
                  break;
                }
              }
              se && me ? (z._categories = se, z._categoriesMap = me) : z._emptyCategories();
            } else z._emptyCategories();
            if (z._initialCategories) for (var be = 0; be < z._initialCategories.length; be++) Y(z._initialCategories[be]);
          }, z.sortByInitialCategories = function() {
            var ae = [];
            if (z._emptyCategories(), z._initialCategories) for (var se = 0; se < z._initialCategories.length; se++) Y(z._initialCategories[se]);
            ae = ae.concat(z._traceIndices);
            var me = z._matchGroup;
            for (var ye in me) if (U !== ye) {
              var pe = F[E.id2name(ye)];
              pe._categories = z._categories, pe._categoriesMap = z._categoriesMap, ae = ae.concat(pe._traceIndices);
            }
            return ae;
          };
          var ne = F._d3locale;
          z.type === "date" && (z._dateFormat = ne ? ne.timeFormat : u, z._extraFormat = F._extraFormat), z._separators = F.separators, z._numFormat = ne ? ne.numberFormat : h, delete z._minDtick, delete z._forceTick0;
        };
      }, 87703: function(o) {
        o.exports = function(s) {
          var n = ["showexponent", "showtickprefix", "showticksuffix"].filter(function(l) {
            return s[l] !== void 0;
          });
          if (n.every(function(l) {
            return s[l] === s[n[0]];
          }) || n.length === 1) return s[n[0]];
        };
      }, 12036: function(o, s, n) {
        var l = n(34809), u = n(78766).contrast, i = n(25829), h = n(87703), p = n(59008);
        function _(d, f) {
          function c(g, m) {
            return l.coerce(d, f, i.tickformatstops, g, m);
          }
          c("enabled") && (c("dtickrange"), c("value"));
        }
        o.exports = function(d, f, c, g, m) {
          m || (m = {});
          var x = c("labelalias");
          l.isPlainObject(x) || delete f.labelalias;
          var w = h(d);
          if (c("showticklabels")) {
            m.noTicklabelshift || c("ticklabelshift"), m.noTicklabelstandoff || c("ticklabelstandoff");
            var k = m.font || {}, S = f.color, A = (f.ticklabelposition || "").indexOf("inside") !== -1 ? u(m.bgColor) : S && S !== i.color.dflt ? S : k.color;
            if (l.coerceFont(c, "tickfont", k, { overrideDflt: { color: A } }), m.noTicklabelstep || g === "multicategory" || g === "log" || c("ticklabelstep"), !m.noAng) {
              var C = c("tickangle");
              m.noAutotickangles || C !== "auto" || c("autotickangles");
            }
            if (g !== "category") {
              var D = c("tickformat");
              p(d, f, { name: "tickformatstops", inclusionAttr: "enabled", handleItemDefaults: _ }), f.tickformatstops.length || delete f.tickformatstops, m.noExp || D || g === "date" || (c("showexponent", w), c("exponentformat"), c("minexponent"), c("separatethousands"));
            }
          }
        };
      }, 87433: function(o, s, n) {
        var l = n(34809), u = n(25829);
        o.exports = function(i, h, p, _) {
          var d = _.isMinor, f = d ? i.minor || {} : i, c = d ? h.minor : h, g = d ? u.minor : u, m = d ? "minor." : "", x = l.coerce2(f, c, g, "ticklen", d ? 0.6 * (h.ticklen || 5) : void 0), w = l.coerce2(f, c, g, "tickwidth", d ? h.tickwidth || 1 : void 0), k = l.coerce2(f, c, g, "tickcolor", (d ? h.tickcolor : void 0) || c.color);
          p(m + "ticks", !d && _.outerTicks || x || w || k ? "outside" : "") || (delete c.ticklen, delete c.tickwidth, delete c.tickcolor);
        };
      }, 22777: function(o, s, n) {
        var l = n(68599), u = n(34809).isArrayOrTypedArray, i = n(87800).isTypedArraySpec, h = n(87800).decodeTypedArraySpec;
        o.exports = function(p, _, d, f, c) {
          c || (c = {});
          var g = c.isMinor, m = g ? p.minor || {} : p, x = g ? _.minor : _, w = g ? "minor." : "";
          function k(E) {
            var P = m[E];
            return i(P) && (P = h(P)), P !== void 0 ? P : (x._template || {})[E];
          }
          var S = k("tick0"), A = k("dtick"), C = k("tickvals"), D = d(w + "tickmode", u(C) ? "array" : A ? "linear" : "auto");
          if (D === "auto" || D === "sync") d(w + "nticks");
          else if (D === "linear") {
            var L = x.dtick = l.dtick(A, f);
            x.tick0 = l.tick0(S, f, _.calendar, L);
          } else f !== "multicategory" && (d(w + "tickvals") === void 0 ? x.tickmode = "auto" : g || d("ticktext"));
        };
      }, 84982: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(34809), h = n(62203), p = n(29714);
        o.exports = function(_, d, f, c) {
          var g = _._fullLayout;
          if (d.length !== 0) {
            var m, x, w, k;
            c && (m = c());
            var S = l.ease(f.easing);
            return _._transitionData._interruptCallbacks.push(function() {
              return window.cancelAnimationFrame(k), k = null, function() {
                for (var D = {}, L = 0; L < d.length; L++) {
                  var E = d[L], P = E.plotinfo.xaxis, I = E.plotinfo.yaxis;
                  E.xr0 && (D[P._name + ".range"] = E.xr0.slice()), E.yr0 && (D[I._name + ".range"] = E.yr0.slice());
                }
                return u.call("relayout", _, D).then(function() {
                  for (var M = 0; M < d.length; M++) A(d[M].plotinfo);
                });
              }();
            }), x = Date.now(), k = window.requestAnimationFrame(function D() {
              w = Date.now();
              for (var L = Math.min(1, (w - x) / f.duration), E = S(L), P = 0; P < d.length; P++) C(d[P], E);
              w - x > f.duration ? (function() {
                for (var I = {}, M = 0; M < d.length; M++) {
                  var O = d[M], T = O.plotinfo.xaxis, z = O.plotinfo.yaxis;
                  O.xr1 && (I[T._name + ".range"] = O.xr1.slice()), O.yr1 && (I[z._name + ".range"] = O.yr1.slice());
                }
                m && m(), u.call("relayout", _, I).then(function() {
                  for (var F = 0; F < d.length; F++) A(d[F].plotinfo);
                });
              }(), k = window.cancelAnimationFrame(D)) : k = window.requestAnimationFrame(D);
            }), Promise.resolve();
          }
          function A(D) {
            var L = D.xaxis, E = D.yaxis;
            g._defs.select("#" + D.clipId + "> rect").call(h.setTranslate, 0, 0).call(h.setScale, 1, 1), D.plot.call(h.setTranslate, L._offset, E._offset).call(h.setScale, 1, 1);
            var P = D.plot.selectAll(".scatterlayer .trace");
            P.selectAll(".point").call(h.setPointGroupScale, 1, 1), P.selectAll(".textpoint").call(h.setTextPointsScale, 1, 1), P.call(h.hideOutsideRangePoints, D);
          }
          function C(D, L) {
            var E = D.plotinfo, P = E.xaxis, I = E.yaxis, M = P._length, O = I._length, T = !!D.xr1, z = !!D.yr1, F = [];
            if (T) {
              var U = i.simpleMap(D.xr0, P.r2l), V = i.simpleMap(D.xr1, P.r2l), $ = U[1] - U[0], q = V[1] - V[0];
              F[0] = (U[0] * (1 - L) + L * V[0] - U[0]) / (U[1] - U[0]) * M, F[2] = M * (1 - L + L * q / $), P.range[0] = P.l2r(U[0] * (1 - L) + L * V[0]), P.range[1] = P.l2r(U[1] * (1 - L) + L * V[1]);
            } else F[0] = 0, F[2] = M;
            if (z) {
              var K = i.simpleMap(D.yr0, I.r2l), re = i.simpleMap(D.yr1, I.r2l), Y = K[1] - K[0], te = re[1] - re[0];
              F[1] = (K[1] * (1 - L) + L * re[1] - K[1]) / (K[0] - K[1]) * O, F[3] = O * (1 - L + L * te / Y), I.range[0] = P.l2r(K[0] * (1 - L) + L * re[0]), I.range[1] = I.l2r(K[1] * (1 - L) + L * re[1]);
            } else F[1] = 0, F[3] = O;
            p.drawOne(_, P, { skipTitle: !0 }), p.drawOne(_, I, { skipTitle: !0 }), p.redrawComponents(_, [P._id, I._id]);
            var ee = T ? M / F[2] : 1, X = z ? O / F[3] : 1, Q = T ? F[0] : 0, ue = z ? F[1] : 0, ce = T ? F[0] / F[2] * M : 0, he = z ? F[1] / F[3] * O : 0, de = P._offset - ce, ne = I._offset - he;
            E.clipRect.call(h.setTranslate, Q, ue).call(h.setScale, 1 / ee, 1 / X), E.plot.call(h.setTranslate, de, ne).call(h.setScale, ee, X), h.setPointGroupScale(E.zoomScalePts, 1 / ee, 1 / X), h.setTextPointsScale(E.zoomScaleTxt, 1 / ee, 1 / X);
          }
          p.redrawComponents(_);
        };
      }, 4392: function(o, s, n) {
        var l = n(33626).traceIs, u = n(9666);
        function i(p) {
          return { v: "x", h: "y" }[p.orientation || "v"];
        }
        function h(p, _) {
          var d = i(p), f = l(p, "box-violin"), c = l(p._fullInput || {}, "candlestick");
          return f && !c && _ === d && p[d] === void 0 && p[d + "0"] === void 0;
        }
        o.exports = function(p, _, d, f) {
          d("autotypenumbers", f.autotypenumbersDflt), d("type", (f.splomStash || {}).type) === "-" && (function(c, g) {
            if (c.type === "-") {
              var m, x = c._id, w = x.charAt(0);
              x.indexOf("scene") !== -1 && (x = w);
              var k = function(I, M, O) {
                for (var T = 0; T < I.length; T++) {
                  var z = I[T];
                  if (z.type === "splom" && z._length > 0 && (z["_" + O + "axes"] || {})[M] || (z[O + "axis"] || O) === M && (h(z, O) || (z[O] || []).length || z[O + "0"]))
                    return z;
                }
              }(g, x, w);
              if (k) if (k.type !== "histogram" || w !== { v: "y", h: "x" }[k.orientation || "v"]) {
                var S = w + "calendar", A = k[S], C = { noMultiCategory: !l(k, "cartesian") || l(k, "noMultiCategory") };
                if (k.type === "box" && k._hasPreCompStats && w === { h: "x", v: "y" }[k.orientation || "v"] && (C.noMultiCategory = !0), C.autotypenumbers = c.autotypenumbers, h(k, w)) {
                  var D = i(k), L = [];
                  for (m = 0; m < g.length; m++) {
                    var E = g[m];
                    l(E, "box-violin") && (E[w + "axis"] || w) === x && (E[D] !== void 0 ? L.push(E[D][0]) : E.name !== void 0 ? L.push(E.name) : L.push("text"), E[S] !== A && (A = void 0));
                  }
                  c.type = u(L, A, C);
                } else if (k.type === "splom") {
                  var P = k.dimensions[k._axesDim[x]];
                  P.visible && (c.type = u(P.values, A, C));
                } else c.type = u(k[w] || [k[w + "0"]], A, C);
              } else c.type = "linear";
            }
          }(_, f.data), _.type === "-" ? _.type = "linear" : p.type = _.type);
        };
      }, 90251: function(o, s, n) {
        var l = n(33626), u = n(34809);
        function i(d, f, c) {
          var g, m, x, w = !1;
          if (f.type === "data") g = d._fullData[f.traces !== null ? f.traces[0] : 0];
          else {
            if (f.type !== "layout") return !1;
            g = d._fullLayout;
          }
          return m = u.nestedProperty(g, f.prop).get(), (x = c[f.type] = c[f.type] || {}).hasOwnProperty(f.prop) && x[f.prop] !== m && (w = !0), x[f.prop] = m, { changed: w, value: m };
        }
        function h(d, f) {
          var c = [], g = f[0], m = {};
          if (typeof g == "string") m[g] = f[1];
          else {
            if (!u.isPlainObject(g)) return c;
            m = g;
          }
          return _(m, function(x, w, k) {
            c.push({ type: "layout", prop: x, value: k });
          }, "", 0), c;
        }
        function p(d, f) {
          var c, g, m, x, w = [];
          if (g = f[0], m = f[1], c = f[2], x = {}, typeof g == "string") x[g] = m;
          else {
            if (!u.isPlainObject(g)) return w;
            x = g, c === void 0 && (c = m);
          }
          return c === void 0 && (c = null), _(x, function(k, S, A) {
            var C, D;
            if (Array.isArray(A)) {
              D = A.slice();
              var L = Math.min(D.length, d.data.length);
              c && (L = Math.min(L, c.length)), C = [];
              for (var E = 0; E < L; E++) C[E] = c ? c[E] : E;
            } else D = A, C = c ? c.slice() : null;
            if (C === null) Array.isArray(D) && (D = D[0]);
            else if (Array.isArray(C)) {
              if (!Array.isArray(D)) {
                var P = D;
                D = [];
                for (var I = 0; I < C.length; I++) D[I] = P;
              }
              D.length = Math.min(C.length, D.length);
            }
            w.push({ type: "data", prop: k, traces: C, value: D });
          }, "", 0), w;
        }
        function _(d, f, c, g) {
          Object.keys(d).forEach(function(m) {
            var x = d[m];
            if (m[0] !== "_") {
              var w = c + (g > 0 ? "." : "") + m;
              u.isPlainObject(x) ? _(x, f, w, g + 1) : f(w, m, x);
            }
          });
        }
        s.manageCommandObserver = function(d, f, c, g) {
          var m = {}, x = !0;
          f && f._commandObserver && (m = f._commandObserver), m.cache || (m.cache = {}), m.lookupTable = {};
          var w = s.hasSimpleAPICommandBindings(d, c, m.lookupTable);
          if (f && f._commandObserver) {
            if (w) return m;
            if (f._commandObserver.remove) return f._commandObserver.remove(), f._commandObserver = null, m;
          }
          if (w) {
            i(d, w, m.cache), m.check = function() {
              if (x) {
                var A = i(d, w, m.cache);
                return A.changed && g && m.lookupTable[A.value] !== void 0 && (m.disable(), Promise.resolve(g({ value: A.value, type: w.type, prop: w.prop, traces: w.traces, index: m.lookupTable[A.value] })).then(m.enable, m.enable)), A.changed;
              }
            };
            for (var k = ["plotly_relayout", "plotly_redraw", "plotly_restyle", "plotly_update", "plotly_animatingframe", "plotly_afterplot"], S = 0; S < k.length; S++) d._internalOn(k[S], m.check);
            m.remove = function() {
              for (var A = 0; A < k.length; A++) d._removeInternalListener(k[A], m.check);
            };
          } else u.log("Unable to automatically bind plot updates to API command"), m.lookupTable = {}, m.remove = function() {
          };
          return m.disable = function() {
            x = !1;
          }, m.enable = function() {
            x = !0;
          }, f && (f._commandObserver = m), m;
        }, s.hasSimpleAPICommandBindings = function(d, f, c) {
          var g, m, x = f.length;
          for (g = 0; g < x; g++) {
            var w, k = f[g], S = k.method, A = k.args;
            if (Array.isArray(A) || (A = []), !S) return !1;
            var C = s.computeAPICommandBindings(d, S, A);
            if (C.length !== 1) return !1;
            if (m) {
              if ((w = C[0]).type !== m.type || w.prop !== m.prop) return !1;
              if (Array.isArray(m.traces)) {
                if (!Array.isArray(w.traces)) return !1;
                w.traces.sort();
                for (var D = 0; D < m.traces.length; D++) if (m.traces[D] !== w.traces[D]) return !1;
              } else if (w.prop !== m.prop) return !1;
            } else m = C[0], Array.isArray(m.traces) && m.traces.sort();
            var L = (w = C[0]).value;
            if (Array.isArray(L)) {
              if (L.length !== 1) return !1;
              L = L[0];
            }
            c && (c[L] = g);
          }
          return m;
        }, s.executeAPICommand = function(d, f, c) {
          if (f === "skip") return Promise.resolve();
          var g = l.apiMethodRegistry[f], m = [d];
          Array.isArray(c) || (c = []);
          for (var x = 0; x < c.length; x++) m.push(c[x]);
          return g.apply(null, m).catch(function(w) {
            return u.warn("API call to Plotly." + f + " rejected.", w), Promise.reject(w);
          });
        }, s.computeAPICommandBindings = function(d, f, c) {
          var g;
          switch (Array.isArray(c) || (c = []), f) {
            case "restyle":
              g = p(d, c);
              break;
            case "relayout":
              g = h(0, c);
              break;
            case "update":
              g = p(d, [c[0], c[2]]).concat(h(0, [c[1]]));
              break;
            case "animate":
              g = function(m, x) {
                return Array.isArray(x[0]) && x[0].length === 1 && ["string", "number"].indexOf(typeof x[0][0]) !== -1 ? [{ type: "layout", prop: "_currentFrame", value: x[0][0].toString() }] : [];
              }(0, c);
              break;
            default:
              g = [];
          }
          return g;
        };
      }, 13792: function(o, s, n) {
        var l = n(93049).extendFlat;
        s.u = function(u, i) {
          i = i || {};
          var h = { valType: "info_array", editType: (u = u || {}).editType, items: [{ valType: "number", min: 0, max: 1, editType: u.editType }, { valType: "number", min: 0, max: 1, editType: u.editType }], dflt: [0, 1] }, p = (u.name && u.name, u.trace, i.description && i.description, { x: l({}, h, {}), y: l({}, h, {}), editType: u.editType });
          return u.noGridCell || (p.row = { valType: "integer", min: 0, dflt: 0, editType: u.editType }, p.column = { valType: "integer", min: 0, dflt: 0, editType: u.editType }), p;
        }, s.N = function(u, i, h, p) {
          var _ = p && p.x || [0, 1], d = p && p.y || [0, 1], f = i.grid;
          if (f) {
            var c = h("domain.column");
            c !== void 0 && (c < f.columns ? _ = f._domains.x[c] : delete u.domain.column);
            var g = h("domain.row");
            g !== void 0 && (g < f.rows ? d = f._domains.y[g] : delete u.domain.row);
          }
          var m = h("domain.x", _), x = h("domain.y", d);
          m[0] < m[1] || (u.domain.x = _.slice()), x[0] < x[1] || (u.domain.y = d.slice());
        };
      }, 80337: function(o) {
        o.exports = function(s) {
          var n = s.variantValues, l = s.editType, u = s.colorEditType;
          u === void 0 && (u = l);
          var i = { editType: l, valType: "integer", min: 1, max: 1e3, extras: ["normal", "bold"], dflt: "normal" };
          s.noNumericWeightValues && (i.valType = "enumerated", i.values = i.extras, i.extras = void 0, i.min = void 0, i.max = void 0);
          var h = { family: { valType: "string", noBlank: !0, strict: !0, editType: l }, size: { valType: "number", min: 1, editType: l }, color: { valType: "color", editType: u }, weight: i, style: { editType: l, valType: "enumerated", values: ["normal", "italic"], dflt: "normal" }, variant: s.noFontVariant ? void 0 : { editType: l, valType: "enumerated", values: n || ["normal", "small-caps", "all-small-caps", "all-petite-caps", "petite-caps", "unicase"], dflt: "normal" }, textcase: s.noFontTextcase ? void 0 : { editType: l, valType: "enumerated", values: ["normal", "word caps", "upper", "lower"], dflt: "normal" }, lineposition: s.noFontLineposition ? void 0 : { editType: l, valType: "flaglist", flags: ["under", "over", "through"], extras: ["none"], dflt: "none" }, shadow: s.noFontShadow ? void 0 : { editType: l, valType: "string", dflt: s.autoShadowDflt ? "auto" : "none" }, editType: l };
          return s.autoSize && (h.size.dflt = "auto"), s.autoColor && (h.color.dflt = "auto"), s.arrayOk && (h.family.arrayOk = !0, h.weight.arrayOk = !0, h.style.arrayOk = !0, s.noFontVariant || (h.variant.arrayOk = !0), s.noFontTextcase || (h.textcase.arrayOk = !0), s.noFontLineposition || (h.lineposition.arrayOk = !0), s.noFontShadow || (h.shadow.arrayOk = !0), h.size.arrayOk = !0, h.color.arrayOk = !0), h;
        };
      }, 58935: function(o) {
        o.exports = { _isLinkedToArray: "frames_entry", group: { valType: "string" }, name: { valType: "string" }, traces: { valType: "any" }, baseframe: { valType: "string" }, data: { valType: "any" }, layout: { valType: "any" } };
      }, 74285: function(o, s) {
        s.projNames = { airy: "airy", aitoff: "aitoff", "albers usa": "albersUsa", albers: "albers", august: "august", "azimuthal equal area": "azimuthalEqualArea", "azimuthal equidistant": "azimuthalEquidistant", baker: "baker", bertin1953: "bertin1953", boggs: "boggs", bonne: "bonne", bottomley: "bottomley", bromley: "bromley", collignon: "collignon", "conic conformal": "conicConformal", "conic equal area": "conicEqualArea", "conic equidistant": "conicEquidistant", craig: "craig", craster: "craster", "cylindrical equal area": "cylindricalEqualArea", "cylindrical stereographic": "cylindricalStereographic", eckert1: "eckert1", eckert2: "eckert2", eckert3: "eckert3", eckert4: "eckert4", eckert5: "eckert5", eckert6: "eckert6", eisenlohr: "eisenlohr", "equal earth": "equalEarth", equirectangular: "equirectangular", fahey: "fahey", "foucaut sinusoidal": "foucautSinusoidal", foucaut: "foucaut", ginzburg4: "ginzburg4", ginzburg5: "ginzburg5", ginzburg6: "ginzburg6", ginzburg8: "ginzburg8", ginzburg9: "ginzburg9", gnomonic: "gnomonic", "gringorten quincuncial": "gringortenQuincuncial", gringorten: "gringorten", guyou: "guyou", hammer: "hammer", hill: "hill", homolosine: "homolosine", hufnagel: "hufnagel", hyperelliptical: "hyperelliptical", kavrayskiy7: "kavrayskiy7", lagrange: "lagrange", larrivee: "larrivee", laskowski: "laskowski", loximuthal: "loximuthal", mercator: "mercator", miller: "miller", mollweide: "mollweide", "mt flat polar parabolic": "mtFlatPolarParabolic", "mt flat polar quartic": "mtFlatPolarQuartic", "mt flat polar sinusoidal": "mtFlatPolarSinusoidal", "natural earth": "naturalEarth", "natural earth1": "naturalEarth1", "natural earth2": "naturalEarth2", "nell hammer": "nellHammer", nicolosi: "nicolosi", orthographic: "orthographic", patterson: "patterson", "peirce quincuncial": "peirceQuincuncial", polyconic: "polyconic", "rectangular polyconic": "rectangularPolyconic", robinson: "robinson", satellite: "satellite", "sinu mollweide": "sinuMollweide", sinusoidal: "sinusoidal", stereographic: "stereographic", times: "times", "transverse mercator": "transverseMercator", "van der grinten": "vanDerGrinten", "van der grinten2": "vanDerGrinten2", "van der grinten3": "vanDerGrinten3", "van der grinten4": "vanDerGrinten4", wagner4: "wagner4", wagner6: "wagner6", wiechel: "wiechel", "winkel tripel": "winkel3", winkel3: "winkel3" }, s.axesNames = ["lonaxis", "lataxis"], s.lonaxisSpan = { orthographic: 180, "azimuthal equal area": 360, "azimuthal equidistant": 360, "conic conformal": 180, gnomonic: 160, stereographic: 180, "transverse mercator": 180, "*": 360 }, s.lataxisSpan = { "conic conformal": 150, stereographic: 179.5, "*": 180 }, s.scopeDefaults = { world: { lonaxisRange: [-180, 180], lataxisRange: [-90, 90], projType: "equirectangular", projRotate: [0, 0, 0] }, usa: { lonaxisRange: [-180, -50], lataxisRange: [15, 80], projType: "albers usa" }, europe: { lonaxisRange: [-30, 60], lataxisRange: [30, 85], projType: "conic conformal", projRotate: [15, 0, 0], projParallels: [0, 60] }, asia: { lonaxisRange: [22, 160], lataxisRange: [-15, 55], projType: "mercator", projRotate: [0, 0, 0] }, africa: { lonaxisRange: [-30, 60], lataxisRange: [-40, 40], projType: "mercator", projRotate: [0, 0, 0] }, "north america": { lonaxisRange: [-180, -45], lataxisRange: [5, 85], projType: "conic conformal", projRotate: [-100, 0, 0], projParallels: [29.5, 45.5] }, "south america": { lonaxisRange: [-100, -30], lataxisRange: [-60, 15], projType: "mercator", projRotate: [0, 0, 0] } }, s.clipPad = 1e-3, s.precision = 0.1, s.landColor = "#F0DC82", s.waterColor = "#3399FF", s.locationmodeToLayer = { "ISO-3": "countries", "USA-states": "subunits", "country names": "countries" }, s.sphereSVG = { type: "Sphere" }, s.fillLayers = { ocean: 1, land: 1, lakes: 1 }, s.lineLayers = { subunits: 1, countries: 1, coastlines: 1, rivers: 1, frame: 1 }, s.layers = ["bg", "ocean", "land", "lakes", "subunits", "countries", "coastlines", "rivers", "lataxis", "lonaxis", "frame", "backplot", "frontplot"], s.layersForChoropleth = ["bg", "ocean", "land", "subunits", "countries", "coastlines", "lataxis", "lonaxis", "frame", "backplot", "rivers", "lakes", "frontplot"], s.layerNameToAdjective = { ocean: "ocean", land: "land", lakes: "lake", subunits: "subunit", countries: "country", coastlines: "coastline", rivers: "river", frame: "frame" };
      }, 6493: function(o, s, n) {
        var l = n(45568), u = n(70884), i = u.geoPath, h = u.geoDistance, p = n(75987), _ = n(33626), d = n(34809), f = d.strTranslate, c = n(78766), g = n(62203), m = n(32141), x = n(44122), w = n(29714), k = n(32919).getAutoRange, S = n(14751), A = n(44844).prepSelect, C = n(44844).clearOutline, D = n(44844).selectOnClick, L = n(14309), E = n(74285), P = n(3994), I = n(11577), M = n(48640).N4;
        function O(F) {
          this.id = F.id, this.graphDiv = F.graphDiv, this.container = F.container, this.topojsonURL = F.topojsonURL, this.isStatic = F.staticPlot, this.topojsonName = null, this.topojson = null, this.projection = null, this.scope = null, this.viewInitial = null, this.fitScale = null, this.bounds = null, this.midPt = null, this.hasChoropleth = !1, this.traceHash = {}, this.layers = {}, this.basePaths = {}, this.dataPaths = {}, this.dataPoints = {}, this.clipDef = null, this.clipRect = null, this.bgRect = null, this.makeFramework();
        }
        var T = O.prototype;
        function z(F, U) {
          var V = E.clipPad, $ = F[0] + V, q = F[1] - V, K = U[0] + V, re = U[1] - V;
          $ > 0 && q < 0 && (q += 360);
          var Y = (q - $) / 4;
          return { type: "Polygon", coordinates: [[[$, K], [$, re], [$ + Y, re], [$ + 2 * Y, re], [$ + 3 * Y, re], [q, re], [q, K], [q - Y, K], [q - 2 * Y, K], [q - 3 * Y, K], [$, K]]] };
        }
        o.exports = function(F) {
          return new O(F);
        }, T.plot = function(F, U, V, $) {
          var q = this;
          if ($) return q.update(F, U, !0);
          q._geoCalcData = F, q._fullLayout = U;
          var K = U[this.id], re = [], Y = !1;
          for (var te in E.layerNameToAdjective) if (te !== "frame" && K["show" + te]) {
            Y = !0;
            break;
          }
          for (var ee = !1, X = 0; X < F.length; X++) {
            var Q = F[0][0].trace;
            Q._geo = q, Q.locationmode && (Y = !0);
            var ue = Q.marker;
            if (ue) {
              var ce = ue.angle, he = ue.angleref;
              (ce || he === "north" || he === "previous") && (ee = !0);
            }
          }
          if (this._hasMarkerAngles = ee, Y) {
            var de = I.getTopojsonName(K);
            q.topojson !== null && de === q.topojsonName || (q.topojsonName = de, PlotlyGeoAssets.topojson[q.topojsonName] === void 0 && re.push(q.fetchTopojson()));
          }
          re = re.concat(P.fetchTraceGeoData(F)), V.push(new Promise(function(ne, ae) {
            Promise.all(re).then(function() {
              q.topojson = PlotlyGeoAssets.topojson[q.topojsonName], q.update(F, U), ne();
            }).catch(ae);
          }));
        }, T.fetchTopojson = function() {
          var F = this, U = I.getTopojsonPath(F.topojsonURL, F.topojsonName);
          return new Promise(function(V, $) {
            l.json(U, function(q, K) {
              if (q) return q.status === 404 ? $(new Error(["plotly.js could not find topojson file at", U + ".", "Make sure the *topojsonURL* plot config option", "is set properly."].join(" "))) : $(new Error(["unexpected error while fetching topojson file at", U].join(" ")));
              PlotlyGeoAssets.topojson[F.topojsonName] = K, V();
            });
          });
        }, T.update = function(F, U, V) {
          var $ = U[this.id];
          this.hasChoropleth = !1;
          for (var q = 0; q < F.length; q++) {
            var K = F[q], re = K[0].trace;
            re.type === "choropleth" && (this.hasChoropleth = !0), re.visible === !0 && re._length > 0 && re._module.calcGeoJSON(K, U);
          }
          if (!V) {
            if (this.updateProjection(F, U)) return;
            this.viewInitial && this.scope === $.scope || this.saveViewInitial($);
          }
          this.scope = $.scope, this.updateBaseLayers(U, $), this.updateDims(U, $), this.updateFx(U, $), x.generalUpdatePerTraceModule(this.graphDiv, this, F, $);
          var Y = this.layers.frontplot.select(".scatterlayer");
          this.dataPoints.point = Y.selectAll(".point"), this.dataPoints.text = Y.selectAll("text"), this.dataPaths.line = Y.selectAll(".js-line");
          var te = this.layers.backplot.select(".choroplethlayer");
          this.dataPaths.choropleth = te.selectAll("path"), this._render();
        }, T.updateProjection = function(F, U) {
          var V = this.graphDiv, $ = U[this.id], q = U._size, K = $.domain, re = $.projection, Y = $.lonaxis, te = $.lataxis, ee = Y._ax, X = te._ax, Q = this.projection = function(Ie) {
            var ge = Ie.projection, Ce = ge.type, we = E.projNames[Ce];
            we = "geo" + d.titleCase(we);
            for (var Ge = (u[we] || p[we])(), Re = Ie._isSatellite ? 180 * Math.acos(1 / ge.distance) / Math.PI : Ie._isClipped ? E.lonaxisSpan[Ce] / 2 : null, je = ["center", "rotate", "parallels", "clipExtent"], Ke = function(Be) {
              return Be ? Ge : [];
            }, tt = 0; tt < je.length; tt++) {
              var _e = je[tt];
              typeof Ge[_e] != "function" && (Ge[_e] = Ke);
            }
            return Ge.isLonLatOverEdges = function(Be) {
              if (Ge(Be) === null) return !0;
              if (Re) {
                var $e = Ge.rotate();
                return h(Be, [-$e[0], -$e[1]]) > Re * Math.PI / 180;
              }
              return !1;
            }, Ge.getPath = function() {
              return i().projection(Ge);
            }, Ge.getBounds = function(Be) {
              return Ge.getPath().bounds(Be);
            }, Ge.precision(E.precision), Ie._isSatellite && Ge.tilt(ge.tilt).distance(ge.distance), Re && Ge.clipAngle(Re - E.clipPad), Ge;
          }($), ue = [[q.l + q.w * K.x[0], q.t + q.h * (1 - K.y[1])], [q.l + q.w * K.x[1], q.t + q.h * (1 - K.y[0])]], ce = $.center || {}, he = re.rotation || {}, de = Y.range || [], ne = te.range || [];
          if ($.fitbounds) {
            ee._length = ue[1][0] - ue[0][0], X._length = ue[1][1] - ue[0][1], ee.range = k(V, ee), X.range = k(V, X);
            var ae = (ee.range[0] + ee.range[1]) / 2, se = (X.range[0] + X.range[1]) / 2;
            if ($._isScoped) ce = { lon: ae, lat: se };
            else if ($._isClipped) {
              ce = { lon: ae, lat: se }, he = { lon: ae, lat: se, roll: he.roll };
              var me = re.type, ye = E.lonaxisSpan[me] / 2 || 180, pe = E.lataxisSpan[me] / 2 || 90;
              de = [ae - ye, ae + ye], ne = [se - pe, se + pe];
            } else ce = { lon: ae, lat: se }, he = { lon: ae, lat: he.lat, roll: he.roll };
          }
          Q.center([ce.lon - he.lon, ce.lat - he.lat]).rotate([-he.lon, -he.lat, he.roll]).parallels(re.parallels);
          var be = z(de, ne);
          Q.fitExtent(ue, be);
          var Ae = this.bounds = Q.getBounds(be), Se = this.fitScale = Q.scale(), Me = Q.translate();
          if ($.fitbounds) {
            var De = Q.getBounds(z(ee.range, X.range)), Le = Math.min((Ae[1][0] - Ae[0][0]) / (De[1][0] - De[0][0]), (Ae[1][1] - Ae[0][1]) / (De[1][1] - De[0][1]));
            isFinite(Le) ? Q.scale(Le * Se) : d.warn("Something went wrong during" + this.id + "fitbounds computations.");
          } else Q.scale(re.scale * Se);
          var We = this.midPt = [(Ae[0][0] + Ae[1][0]) / 2, (Ae[0][1] + Ae[1][1]) / 2];
          if (Q.translate([Me[0] + (We[0] - Me[0]), Me[1] + (We[1] - Me[1])]).clipExtent(Ae), $._isAlbersUsa) {
            var Ee = Q([ce.lon, ce.lat]), Ne = Q.translate();
            Q.translate([Ne[0] - (Ee[0] - Ne[0]), Ne[1] - (Ee[1] - Ne[1])]);
          }
        }, T.updateBaseLayers = function(F, U) {
          var V = this, $ = V.topojson, q = V.layers, K = V.basePaths;
          function re(Q) {
            return Q === "lonaxis" || Q === "lataxis";
          }
          function Y(Q) {
            return !!E.lineLayers[Q];
          }
          function te(Q) {
            return !!E.fillLayers[Q];
          }
          var ee = (this.hasChoropleth ? E.layersForChoropleth : E.layers).filter(function(Q) {
            return Y(Q) || te(Q) ? U["show" + Q] : !re(Q) || U[Q].showgrid;
          }), X = V.framework.selectAll(".layer").data(ee, String);
          X.exit().each(function(Q) {
            delete q[Q], delete K[Q], l.select(this).remove();
          }), X.enter().append("g").attr("class", function(Q) {
            return "layer " + Q;
          }).each(function(Q) {
            var ue = q[Q] = l.select(this);
            Q === "bg" ? V.bgRect = ue.append("rect").style("pointer-events", "all") : re(Q) ? K[Q] = ue.append("path").style("fill", "none") : Q === "backplot" ? ue.append("g").classed("choroplethlayer", !0) : Q === "frontplot" ? ue.append("g").classed("scatterlayer", !0) : Y(Q) ? K[Q] = ue.append("path").style("fill", "none").style("stroke-miterlimit", 2) : te(Q) && (K[Q] = ue.append("path").style("stroke", "none"));
          }), X.order(), X.each(function(Q) {
            var ue = K[Q], ce = E.layerNameToAdjective[Q];
            Q === "frame" ? ue.datum(E.sphereSVG) : Y(Q) || te(Q) ? ue.datum(M($, $.objects[Q])) : re(Q) && ue.datum(function(he, de, ne) {
              var ae, se, me, ye = de[he], pe = E.scopeDefaults[de.scope];
              he === "lonaxis" ? (ae = pe.lonaxisRange, se = pe.lataxisRange, me = function(Ne, Ie) {
                return [Ne, Ie];
              }) : he === "lataxis" && (ae = pe.lataxisRange, se = pe.lonaxisRange, me = function(Ne, Ie) {
                return [Ie, Ne];
              });
              var be = { type: "linear", range: [ae[0], ae[1] - 1e-6], tick0: ye.tick0, dtick: ye.dtick };
              w.setConvert(be, ne);
              var Ae = w.calcTicks(be);
              de.isScoped || he !== "lonaxis" || Ae.pop();
              for (var Se = Ae.length, Me = new Array(Se), De = 0; De < Se; De++) for (var Le = Ae[De].x, We = Me[De] = [], Ee = se[0]; Ee < se[1] + 2.5; Ee += 2.5) We.push(me(Le, Ee));
              return { type: "MultiLineString", coordinates: Me };
            }(Q, U, F)).call(c.stroke, U[Q].gridcolor).call(g.dashLine, U[Q].griddash, U[Q].gridwidth), Y(Q) ? ue.call(c.stroke, U[ce + "color"]).call(g.dashLine, "", U[ce + "width"]) : te(Q) && ue.call(c.fill, U[ce + "color"]);
          });
        }, T.updateDims = function(F, U) {
          var V = this.bounds, $ = (U.framewidth || 0) / 2, q = V[0][0] - $, K = V[0][1] - $, re = V[1][0] - q + $, Y = V[1][1] - K + $;
          g.setRect(this.clipRect, q, K, re, Y), this.bgRect.call(g.setRect, q, K, re, Y).call(c.fill, U.bgcolor), this.xaxis._offset = q, this.xaxis._length = re, this.yaxis._offset = K, this.yaxis._length = Y;
        }, T.updateFx = function(F, U) {
          var V = this, $ = V.graphDiv, q = V.bgRect, K = F.dragmode, re = F.clickmode;
          if (!V.isStatic) {
            var Y = { element: V.bgRect.node(), gd: $, plotinfo: { id: V.id, xaxis: V.xaxis, yaxis: V.yaxis, fillRangeItems: function(ee, X) {
              X.isRect ? (ee.range = {})[V.id] = [te([X.xmin, X.ymin]), te([X.xmax, X.ymax])] : (ee.lassoPoints = {})[V.id] = X.map(te);
            } }, xaxes: [V.xaxis], yaxes: [V.yaxis], subplot: V.id, clickFn: function(ee) {
              ee === 2 && C($);
            } };
            K === "pan" ? (q.node().onmousedown = null, q.call(L(V, U)), q.on("dblclick.zoom", function() {
              var ee = V.viewInitial, X = {};
              for (var Q in ee) X[V.id + "." + Q] = ee[Q];
              _.call("_guiRelayout", $, X), $.emit("plotly_doubleclick", null);
            }), $._context._scrollZoom.geo || q.on("wheel.zoom", null)) : K !== "select" && K !== "lasso" || (q.on(".zoom", null), Y.prepFn = function(ee, X, Q) {
              A(ee, X, Q, Y, K);
            }, S.init(Y)), q.on("mousemove", function() {
              var ee = V.projection.invert(d.getPositionFromD3Event());
              if (!ee) return S.unhover($, l.event);
              V.xaxis.p2c = function() {
                return ee[0];
              }, V.yaxis.p2c = function() {
                return ee[1];
              }, m.hover($, l.event, V.id);
            }), q.on("mouseout", function() {
              $._dragging || S.unhover($, l.event);
            }), q.on("click", function() {
              K !== "select" && K !== "lasso" && (re.indexOf("select") > -1 && D(l.event, $, [V.xaxis], [V.yaxis], V.id, Y), re.indexOf("event") > -1 && m.click($, l.event));
            });
          }
          function te(ee) {
            return V.projection.invert([ee[0] + V.xaxis._offset, ee[1] + V.yaxis._offset]);
          }
        }, T.makeFramework = function() {
          var F = this, U = F.graphDiv, V = U._fullLayout, $ = "clip" + V._uid + F.id;
          F.clipDef = V._clips.append("clipPath").attr("id", $), F.clipRect = F.clipDef.append("rect"), F.framework = l.select(F.container).append("g").attr("class", "geo " + F.id).call(g.setClipUrl, $, U), F.project = function(q) {
            var K = F.projection(q);
            return K ? [K[0] - F.xaxis._offset, K[1] - F.yaxis._offset] : [null, null];
          }, F.xaxis = { _id: "x", c2p: function(q) {
            return F.project(q)[0];
          } }, F.yaxis = { _id: "y", c2p: function(q) {
            return F.project(q)[1];
          } }, F.mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, w.setConvert(F.mockAxis, V);
        }, T.saveViewInitial = function(F) {
          var U, V = F.center || {}, $ = F.projection, q = $.rotation || {};
          this.viewInitial = { fitbounds: F.fitbounds, "projection.scale": $.scale }, U = F._isScoped ? { "center.lon": V.lon, "center.lat": V.lat } : F._isClipped ? { "projection.rotation.lon": q.lon, "projection.rotation.lat": q.lat } : { "center.lon": V.lon, "center.lat": V.lat, "projection.rotation.lon": q.lon }, d.extendFlat(this.viewInitial, U);
        }, T.render = function(F) {
          this._hasMarkerAngles && F ? this.plot(this._geoCalcData, this._fullLayout, [], !0) : this._render();
        }, T._render = function() {
          var F, U = this.projection, V = U.getPath();
          function $(K) {
            var re = U(K.lonlat);
            return re ? f(re[0], re[1]) : null;
          }
          function q(K) {
            return U.isLonLatOverEdges(K.lonlat) ? "none" : null;
          }
          for (F in this.basePaths) this.basePaths[F].attr("d", V);
          for (F in this.dataPaths) this.dataPaths[F].attr("d", function(K) {
            return V(K.geojson);
          });
          for (F in this.dataPoints) this.dataPoints[F].attr("display", q).attr("transform", $);
        };
      }, 47544: function(o, s, n) {
        var l = n(4173).fX, u = n(34809).counterRegex, i = n(6493), h = "geo", p = u(h), _ = {};
        _[h] = { valType: "subplotid", dflt: h, editType: "calc" }, o.exports = { attr: h, name: h, idRoot: h, idRegex: p, attrRegex: p, attributes: _, layoutAttributes: n(42194), supplyLayoutDefaults: n(31653), plot: function(d) {
          for (var f = d._fullLayout, c = d.calcdata, g = f._subplots[h], m = 0; m < g.length; m++) {
            var x = g[m], w = l(c, h, x), k = f[x]._subplot;
            k || (k = i({ id: x, graphDiv: d, container: f._geolayer.node(), topojsonURL: d._context.topojsonURL, staticPlot: d._context.staticPlot }), f[x]._subplot = k), k.plot(w, f, d._promises);
          }
        }, updateFx: function(d) {
          for (var f = d._fullLayout, c = f._subplots[h], g = 0; g < c.length; g++) {
            var m = f[c[g]];
            m._subplot.updateFx(f, m);
          }
        }, clean: function(d, f, c, g) {
          for (var m = g._subplots[h] || [], x = 0; x < m.length; x++) {
            var w = m[x], k = g[w]._subplot;
            !f[w] && k && (k.framework.remove(), k.clipDef.remove());
          }
        } };
      }, 42194: function(o, s, n) {
        var l = n(10229), u = n(13792).u, i = n(94850).T, h = n(74285), p = n(13582).overrideAll, _ = n(62994), d = { range: { valType: "info_array", items: [{ valType: "number" }, { valType: "number" }] }, showgrid: { valType: "boolean", dflt: !1 }, tick0: { valType: "number", dflt: 0 }, dtick: { valType: "number" }, gridcolor: { valType: "color", dflt: l.lightLine }, gridwidth: { valType: "number", min: 0, dflt: 1 }, griddash: i };
        (o.exports = p({ domain: u({ name: "geo" }, {}), fitbounds: { valType: "enumerated", values: [!1, "locations", "geojson"], dflt: !1, editType: "plot" }, resolution: { valType: "enumerated", values: [110, 50], dflt: 110, coerceNumber: !0 }, scope: { valType: "enumerated", values: _(h.scopeDefaults), dflt: "world" }, projection: { type: { valType: "enumerated", values: _(h.projNames) }, rotation: { lon: { valType: "number" }, lat: { valType: "number" }, roll: { valType: "number" } }, tilt: { valType: "number", dflt: 0 }, distance: { valType: "number", min: 1.001, dflt: 2 }, parallels: { valType: "info_array", items: [{ valType: "number" }, { valType: "number" }] }, scale: { valType: "number", min: 0, dflt: 1 } }, center: { lon: { valType: "number" }, lat: { valType: "number" } }, visible: { valType: "boolean", dflt: !0 }, showcoastlines: { valType: "boolean" }, coastlinecolor: { valType: "color", dflt: l.defaultLine }, coastlinewidth: { valType: "number", min: 0, dflt: 1 }, showland: { valType: "boolean", dflt: !1 }, landcolor: { valType: "color", dflt: h.landColor }, showocean: { valType: "boolean", dflt: !1 }, oceancolor: { valType: "color", dflt: h.waterColor }, showlakes: { valType: "boolean", dflt: !1 }, lakecolor: { valType: "color", dflt: h.waterColor }, showrivers: { valType: "boolean", dflt: !1 }, rivercolor: { valType: "color", dflt: h.waterColor }, riverwidth: { valType: "number", min: 0, dflt: 1 }, showcountries: { valType: "boolean" }, countrycolor: { valType: "color", dflt: l.defaultLine }, countrywidth: { valType: "number", min: 0, dflt: 1 }, showsubunits: { valType: "boolean" }, subunitcolor: { valType: "color", dflt: l.defaultLine }, subunitwidth: { valType: "number", min: 0, dflt: 1 }, showframe: { valType: "boolean" }, framecolor: { valType: "color", dflt: l.defaultLine }, framewidth: { valType: "number", min: 0, dflt: 1 }, bgcolor: { valType: "color", dflt: l.background }, lonaxis: d, lataxis: d }, "plot", "from-root")).uirevision = { valType: "any", editType: "none" };
      }, 31653: function(o, s, n) {
        var l = n(34809), u = n(4448), i = n(4173).KO, h = n(74285), p = n(42194), _ = h.axesNames;
        function d(f, c, g, m) {
          var x = i(m.fullData, "geo", m.id).map(function(he) {
            return he._expandedIndex;
          }), w = g("resolution"), k = g("scope"), S = h.scopeDefaults[k], A = g("projection.type", S.projType), C = c._isAlbersUsa = A === "albers usa";
          C && (k = c.scope = "usa");
          var D = c._isScoped = k !== "world", L = c._isSatellite = A === "satellite", E = c._isConic = A.indexOf("conic") !== -1 || A === "albers", P = c._isClipped = !!h.lonaxisSpan[A];
          if (f.visible === !1) {
            var I = l.extendDeep({}, c._template);
            I.showcoastlines = !1, I.showcountries = !1, I.showframe = !1, I.showlakes = !1, I.showland = !1, I.showocean = !1, I.showrivers = !1, I.showsubunits = !1, I.lonaxis && (I.lonaxis.showgrid = !1), I.lataxis && (I.lataxis.showgrid = !1), c._template = I;
          }
          for (var M = g("visible"), O = 0; O < _.length; O++) {
            var T, z = _[O], F = [30, 10][O];
            if (D) T = S[z + "Range"];
            else {
              var U = h[z + "Span"], V = (U[A] || U["*"]) / 2, $ = g("projection.rotation." + z.substr(0, 3), S.projRotate[O]);
              T = [$ - V, $ + V];
            }
            var q = g(z + ".range", T);
            g(z + ".tick0"), g(z + ".dtick", F), g(z + ".showgrid", !!M && void 0) && (g(z + ".gridcolor"), g(z + ".gridwidth"), g(z + ".griddash")), c[z]._ax = { type: "linear", _id: z.slice(0, 3), _traceIndices: x, setScale: l.identity, c2l: l.identity, r2l: l.identity, autorange: !0, range: q.slice(), _m: 1, _input: {} };
          }
          var K = c.lonaxis.range, re = c.lataxis.range, Y = K[0], te = K[1];
          Y > 0 && te < 0 && (te += 360);
          var ee, X, Q, ue = (Y + te) / 2;
          if (!C) {
            var ce = D ? S.projRotate : [ue, 0, 0];
            ee = g("projection.rotation.lon", ce[0]), g("projection.rotation.lat", ce[1]), g("projection.rotation.roll", ce[2]), g("showcoastlines", !D && M) && (g("coastlinecolor"), g("coastlinewidth")), g("showocean", !!M && void 0) && g("oceancolor");
          }
          C ? (X = -96.6, Q = 38.7) : (X = D ? ue : ee, Q = (re[0] + re[1]) / 2), g("center.lon", X), g("center.lat", Q), L && (g("projection.tilt"), g("projection.distance")), E && g("projection.parallels", S.projParallels || [0, 60]), g("projection.scale"), g("showland", !!M && void 0) && g("landcolor"), g("showlakes", !!M && void 0) && g("lakecolor"), g("showrivers", !!M && void 0) && (g("rivercolor"), g("riverwidth")), g("showcountries", D && k !== "usa" && M) && (g("countrycolor"), g("countrywidth")), (k === "usa" || k === "north america" && w === 50) && (g("showsubunits", M), g("subunitcolor"), g("subunitwidth")), D || g("showframe", M) && (g("framecolor"), g("framewidth")), g("bgcolor"), g("fitbounds") && (delete c.projection.scale, D ? (delete c.center.lon, delete c.center.lat) : P ? (delete c.center.lon, delete c.center.lat, delete c.projection.rotation.lon, delete c.projection.rotation.lat, delete c.lonaxis.range, delete c.lataxis.range) : (delete c.center.lon, delete c.center.lat, delete c.projection.rotation.lon));
        }
        o.exports = function(f, c, g) {
          u(f, c, g, { type: "geo", attributes: p, handleDefaults: d, fullData: g, partition: "y" });
        };
      }, 14309: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(33626), h = Math.PI / 180, p = 180 / Math.PI, _ = { cursor: "pointer" }, d = { cursor: "auto" };
        function f(D, L) {
          return l.behavior.zoom().translate(L.translate()).scale(L.scale());
        }
        function c(D, L, E) {
          var P = D.id, I = D.graphDiv, M = I.layout, O = M[P], T = I._fullLayout, z = T[P], F = {}, U = {};
          function V($, q) {
            F[P + "." + $] = u.nestedProperty(O, $).get(), i.call("_storeDirectGUIEdit", M, T._preGUI, F);
            var K = u.nestedProperty(z, $);
            K.get() !== q && (K.set(q), u.nestedProperty(O, $).set(q), U[P + "." + $] = q);
          }
          E(V), V("projection.scale", L.scale() / D.fitScale), V("fitbounds", !1), I.emit("plotly_relayout", U);
        }
        function g(D, L) {
          var E = f(0, L);
          function P(I) {
            var M = L.invert(D.midPt);
            I("center.lon", M[0]), I("center.lat", M[1]);
          }
          return E.on("zoomstart", function() {
            l.select(this).style(_);
          }).on("zoom", function() {
            L.scale(l.event.scale).translate(l.event.translate), D.render(!0);
            var I = L.invert(D.midPt);
            D.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": L.scale() / D.fitScale, "geo.center.lon": I[0], "geo.center.lat": I[1] });
          }).on("zoomend", function() {
            l.select(this).style(d), c(D, L, P);
          }), E;
        }
        function m(D, L) {
          var E, P, I, M, O, T, z, F, U, V = f(0, L);
          function $(K) {
            return L.invert(K);
          }
          function q(K) {
            var re = L.rotate(), Y = L.invert(D.midPt);
            K("projection.rotation.lon", -re[0]), K("center.lon", Y[0]), K("center.lat", Y[1]);
          }
          return V.on("zoomstart", function() {
            l.select(this).style(_), E = l.mouse(this), P = L.rotate(), I = L.translate(), M = P, O = $(E);
          }).on("zoom", function() {
            if (T = l.mouse(this), function(Y) {
              var te = $(Y);
              if (!te) return !0;
              var ee = L(te);
              return Math.abs(ee[0] - Y[0]) > 2 || Math.abs(ee[1] - Y[1]) > 2;
            }(E)) return V.scale(L.scale()), void V.translate(L.translate());
            L.scale(l.event.scale), L.translate([I[0], l.event.translate[1]]), O ? $(T) && (F = $(T), z = [M[0] + (F[0] - O[0]), P[1], P[2]], L.rotate(z), M = z) : O = $(E = T), U = !0, D.render(!0);
            var K = L.rotate(), re = L.invert(D.midPt);
            D.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": L.scale() / D.fitScale, "geo.center.lon": re[0], "geo.center.lat": re[1], "geo.projection.rotation.lon": -K[0] });
          }).on("zoomend", function() {
            l.select(this).style(d), U && c(D, L, q);
          }), V;
        }
        function x(D, L) {
          var E;
          L.rotate(), L.scale();
          var P = f(0, L), I = function(z) {
            for (var F = 0, U = arguments.length, V = []; ++F < U; ) V.push(arguments[F]);
            var $ = l.dispatch.apply(null, V);
            return $.of = function(q, K) {
              return function(re) {
                var Y;
                try {
                  Y = re.sourceEvent = l.event, re.target = z, l.event = re, $[re.type].apply(q, K);
                } finally {
                  l.event = Y;
                }
              };
            }, $;
          }(P, "zoomstart", "zoom", "zoomend"), M = 0, O = P.on;
          function T(z) {
            var F = L.rotate();
            z("projection.rotation.lon", -F[0]), z("projection.rotation.lat", -F[1]);
          }
          return P.on("zoomstart", function() {
            l.select(this).style(_);
            var z, F, U, V, $, q, K, re, Y, te, ee, X = l.mouse(this), Q = L.rotate(), ue = Q, ce = L.translate(), he = (F = 0.5 * (z = Q)[0] * h, U = 0.5 * z[1] * h, V = 0.5 * z[2] * h, $ = Math.sin(F), q = Math.cos(F), K = Math.sin(U), re = Math.cos(U), Y = Math.sin(V), [q * re * (te = Math.cos(V)) + $ * K * Y, $ * re * te - q * K * Y, q * K * te + $ * re * Y, q * re * Y - $ * K * te]);
            E = w(L, X), O.call(P, "zoom", function() {
              var de, ne, ae, se, me, ye, pe, be, Ae, Se, Me = l.mouse(this);
              if (L.scale(l.event.scale), E) {
                if (w(L, Me)) {
                  L.rotate(Q).translate(ce);
                  var De = w(L, Me), Le = function(Ne, Ie) {
                    if (Ne && Ie) {
                      var ge = function(Re, je) {
                        return [Re[1] * je[2] - Re[2] * je[1], Re[2] * je[0] - Re[0] * je[2], Re[0] * je[1] - Re[1] * je[0]];
                      }(Ne, Ie), Ce = Math.sqrt(C(ge, ge)), we = 0.5 * Math.acos(Math.max(-1, Math.min(1, C(Ne, Ie)))), Ge = Math.sin(we) / Ce;
                      return Ce && [Math.cos(we), ge[2] * Ge, -ge[1] * Ge, ge[0] * Ge];
                    }
                  }(E, De), We = function(Ne) {
                    return [Math.atan2(2 * (Ne[0] * Ne[1] + Ne[2] * Ne[3]), 1 - 2 * (Ne[1] * Ne[1] + Ne[2] * Ne[2])) * p, Math.asin(Math.max(-1, Math.min(1, 2 * (Ne[0] * Ne[2] - Ne[3] * Ne[1])))) * p, Math.atan2(2 * (Ne[0] * Ne[3] + Ne[1] * Ne[2]), 1 - 2 * (Ne[2] * Ne[2] + Ne[3] * Ne[3])) * p];
                  }((ae = (de = he)[0], se = de[1], me = de[2], ye = de[3], [ae * (pe = (ne = Le)[0]) - se * (be = ne[1]) - me * (Ae = ne[2]) - ye * (Se = ne[3]), ae * be + se * pe + me * Se - ye * Ae, ae * Ae - se * Se + me * pe + ye * be, ae * Se + se * Ae - me * be + ye * pe])), Ee = function(Ne, Ie, ge) {
                    var Ce = A(Ie, 2, Ne[0]);
                    Ce = A(Ce, 1, Ne[1]), Ce = A(Ce, 0, Ne[2] - ge[2]);
                    var we, Ge, Re = Ie[0], je = Ie[1], Ke = Ie[2], tt = Ce[0], _e = Ce[1], Be = Ce[2], $e = Math.atan2(je, Re) * p, Ze = Math.sqrt(Re * Re + je * je);
                    Math.abs(_e) > Ze ? (Ge = (_e > 0 ? 90 : -90) - $e, we = 0) : (Ge = Math.asin(_e / Ze) * p - $e, we = Math.sqrt(Ze * Ze - _e * _e));
                    var ct = 180 - Ge - 2 * $e, ft = (Math.atan2(Be, tt) - Math.atan2(Ke, we)) * p, _t = (Math.atan2(Be, tt) - Math.atan2(Ke, -we)) * p;
                    return k(ge[0], ge[1], Ge, ft) <= k(ge[0], ge[1], ct, _t) ? [Ge, ft, ge[2]] : [ct, _t, ge[2]];
                  }(We, E, ue);
                  isFinite(Ee[0]) && isFinite(Ee[1]) && isFinite(Ee[2]) || (Ee = ue), L.rotate(Ee), ue = Ee;
                }
              } else E = w(L, X = Me);
              I.of(this, arguments)({ type: "zoom" });
            }), ee = I.of(this, arguments), M++ || ee({ type: "zoomstart" });
          }).on("zoomend", function() {
            var z;
            l.select(this).style(d), O.call(P, "zoom", null), z = I.of(this, arguments), --M || z({ type: "zoomend" }), c(D, L, T);
          }).on("zoom.redraw", function() {
            D.render(!0);
            var z = L.rotate();
            D.graphDiv.emit("plotly_relayouting", { "geo.projection.scale": L.scale() / D.fitScale, "geo.projection.rotation.lon": -z[0], "geo.projection.rotation.lat": -z[1] });
          }), l.rebind(P, I, "on");
        }
        function w(D, L) {
          var E = D.invert(L);
          return E && isFinite(E[0]) && isFinite(E[1]) && function(P) {
            var I = P[0] * h, M = P[1] * h, O = Math.cos(M);
            return [O * Math.cos(I), O * Math.sin(I), Math.sin(M)];
          }(E);
        }
        function k(D, L, E, P) {
          var I = S(E - D), M = S(P - L);
          return Math.sqrt(I * I + M * M);
        }
        function S(D) {
          return (D % 360 + 540) % 360 - 180;
        }
        function A(D, L, E) {
          var P = E * h, I = D.slice(), M = L === 0 ? 1 : 0, O = L === 2 ? 1 : 2, T = Math.cos(P), z = Math.sin(P);
          return I[M] = D[M] * T - D[O] * z, I[O] = D[O] * T + D[M] * z, I;
        }
        function C(D, L) {
          for (var E = 0, P = 0, I = D.length; P < I; ++P) E += D[P] * L[P];
          return E;
        }
        o.exports = function(D, L) {
          var E = D.projection;
          return (L._isScoped ? g : L._isClipped ? x : m)(D, E);
        };
      }, 4173: function(o, s, n) {
        var l = n(33626), u = n(54826).SUBPLOT_PATTERN;
        s.fX = function(i, h, p) {
          var _ = l.subplotsRegistry[h];
          if (!_) return [];
          for (var d = _.attr, f = [], c = 0; c < i.length; c++) {
            var g = i[c];
            g[0].trace[d] === p && f.push(g);
          }
          return f;
        }, s.eV = function(i, h, p) {
          var _, d = [], f = [];
          if (!(_ = typeof h == "string" ? l.getModule(h).plot : typeof h == "function" ? h : h.plot)) return [d, i];
          for (var c = p, g = 0; g < i.length; g++) {
            var m = i[g], x = m[0].trace, w = x.zorder !== void 0;
            x.visible === !0 && x._length !== 0 && (!x._module || x._module.plot !== _ || w && x.zorder !== c ? f.push(m) : d.push(m));
          }
          return [d, f];
        }, s.KO = function(i, h, p) {
          if (!l.subplotsRegistry[h]) return [];
          var _, d, f, c = l.subplotsRegistry[h].attr, g = [];
          if (h === "gl2d") {
            var m = p.match(u);
            d = "x" + m[1], f = "y" + m[2];
          }
          for (var x = 0; x < i.length; x++) _ = i[x], h === "gl2d" && l.traceIs(_, "gl2d") ? _[c[0]] === d && _[c[1]] === f && g.push(_) : _[c] === p && g.push(_);
          return g;
        };
      }, 77055: function(o, s, n) {
        var l = n(99978), u = n(20573), i = n(44039), h = n(54826), p = n(74043);
        function _(d, f) {
          this.element = d, this.plot = f, this.mouseListener = null, this.wheelListener = null, this.lastInputTime = Date.now(), this.lastPos = [0, 0], this.boxEnabled = !1, this.boxInited = !1, this.boxStart = [0, 0], this.boxEnd = [0, 0], this.dragStart = [0, 0];
        }
        o.exports = function(d) {
          var f = d.mouseContainer, c = d.glplot, g = new _(f, c);
          function m() {
            d.xaxis.autorange = !1, d.yaxis.autorange = !1;
          }
          function x(w, k, S) {
            var A, C, D = d.calcDataBox(), L = c.viewBox, E = g.lastPos[0], P = g.lastPos[1], I = h.MINDRAG * c.pixelRatio, M = h.MINZOOM * c.pixelRatio;
            function O($, q, K) {
              var re = Math.min(q, K), Y = Math.max(q, K);
              re !== Y ? (D[$] = re, D[$ + 2] = Y, g.dataBox = D, d.setRanges(D)) : (d.selectBox.selectBox = [0, 0, 1, 1], d.glplot.setDirty());
            }
            switch (k *= c.pixelRatio, S *= c.pixelRatio, S = L[3] - L[1] - S, d.fullLayout.dragmode) {
              case "zoom":
                if (w) {
                  var T = k / (L[2] - L[0]) * (D[2] - D[0]) + D[0], z = S / (L[3] - L[1]) * (D[3] - D[1]) + D[1];
                  g.boxInited || (g.boxStart[0] = T, g.boxStart[1] = z, g.dragStart[0] = k, g.dragStart[1] = S), g.boxEnd[0] = T, g.boxEnd[1] = z, g.boxInited = !0, g.boxEnabled || g.boxStart[0] === g.boxEnd[0] && g.boxStart[1] === g.boxEnd[1] || (g.boxEnabled = !0);
                  var F = Math.abs(g.dragStart[0] - k) < M, U = Math.abs(g.dragStart[1] - S) < M;
                  if (!function() {
                    for (var $ = d.graphDiv._fullLayout._axisConstraintGroups, q = d.xaxis._id, K = d.yaxis._id, re = 0; re < $.length; re++) if ($[re][q] !== -1) {
                      if ($[re][K] !== -1) return !0;
                      break;
                    }
                    return !1;
                  }() || F && U) F && (g.boxEnd[0] = g.boxStart[0]), U && (g.boxEnd[1] = g.boxStart[1]);
                  else {
                    A = g.boxEnd[0] - g.boxStart[0], C = g.boxEnd[1] - g.boxStart[1];
                    var V = (D[3] - D[1]) / (D[2] - D[0]);
                    Math.abs(A * V) > Math.abs(C) ? (g.boxEnd[1] = g.boxStart[1] + Math.abs(A) * V * (C >= 0 ? 1 : -1), g.boxEnd[1] < D[1] ? (g.boxEnd[1] = D[1], g.boxEnd[0] = g.boxStart[0] + (D[1] - g.boxStart[1]) / Math.abs(V)) : g.boxEnd[1] > D[3] && (g.boxEnd[1] = D[3], g.boxEnd[0] = g.boxStart[0] + (D[3] - g.boxStart[1]) / Math.abs(V))) : (g.boxEnd[0] = g.boxStart[0] + Math.abs(C) / V * (A >= 0 ? 1 : -1), g.boxEnd[0] < D[0] ? (g.boxEnd[0] = D[0], g.boxEnd[1] = g.boxStart[1] + (D[0] - g.boxStart[0]) * Math.abs(V)) : g.boxEnd[0] > D[2] && (g.boxEnd[0] = D[2], g.boxEnd[1] = g.boxStart[1] + (D[2] - g.boxStart[0]) * Math.abs(V)));
                  }
                } else g.boxEnabled ? (A = g.boxStart[0] !== g.boxEnd[0], C = g.boxStart[1] !== g.boxEnd[1], A || C ? (A && (O(0, g.boxStart[0], g.boxEnd[0]), d.xaxis.autorange = !1), C && (O(1, g.boxStart[1], g.boxEnd[1]), d.yaxis.autorange = !1), d.relayoutCallback()) : d.glplot.setDirty(), g.boxEnabled = !1, g.boxInited = !1) : g.boxInited && (g.boxInited = !1);
                break;
              case "pan":
                g.boxEnabled = !1, g.boxInited = !1, w ? (g.panning || (g.dragStart[0] = k, g.dragStart[1] = S), Math.abs(g.dragStart[0] - k) < I && (k = g.dragStart[0]), Math.abs(g.dragStart[1] - S) < I && (S = g.dragStart[1]), A = (E - k) * (D[2] - D[0]) / (c.viewBox[2] - c.viewBox[0]), C = (P - S) * (D[3] - D[1]) / (c.viewBox[3] - c.viewBox[1]), D[0] += A, D[2] += A, D[1] += C, D[3] += C, d.setRanges(D), g.panning = !0, g.lastInputTime = Date.now(), m(), d.cameraChanged(), d.handleAnnotations()) : g.panning && (g.panning = !1, d.relayoutCallback());
            }
            g.lastPos[0] = k, g.lastPos[1] = S;
          }
          return g.mouseListener = l(f, x), f.addEventListener("touchstart", function(w) {
            var k = i(w.changedTouches[0], f);
            x(0, k[0], k[1]), x(1, k[0], k[1]), w.preventDefault();
          }, !!p && { passive: !1 }), f.addEventListener("touchmove", function(w) {
            w.preventDefault();
            var k = i(w.changedTouches[0], f);
            x(1, k[0], k[1]), w.preventDefault();
          }, !!p && { passive: !1 }), f.addEventListener("touchend", function(w) {
            x(0, g.lastPos[0], g.lastPos[1]), w.preventDefault();
          }, !!p && { passive: !1 }), g.wheelListener = u(f, function(w, k) {
            if (!d.scrollZoom) return !1;
            var S = d.calcDataBox(), A = c.viewBox, C = g.lastPos[0], D = g.lastPos[1], L = Math.exp(5 * k / (A[3] - A[1])), E = C / (A[2] - A[0]) * (S[2] - S[0]) + S[0], P = D / (A[3] - A[1]) * (S[3] - S[1]) + S[1];
            return S[0] = (S[0] - E) * L + E, S[2] = (S[2] - E) * L + E, S[1] = (S[1] - P) * L + P, S[3] = (S[3] - P) * L + P, d.setRanges(S), g.lastInputTime = Date.now(), m(), d.cameraChanged(), d.handleAnnotations(), d.relayoutCallback(), !0;
          }, !0), g;
        };
      }, 10749: function(o, s, n) {
        var l = n(29714), u = n(55010);
        function i(_) {
          this.scene = _, this.gl = _.gl, this.pixelRatio = _.pixelRatio, this.screenBox = [0, 0, 1, 1], this.viewBox = [0, 0, 1, 1], this.dataBox = [-1, -1, 1, 1], this.borderLineEnable = [!1, !1, !1, !1], this.borderLineWidth = [1, 1, 1, 1], this.borderLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.ticks = [[], []], this.tickEnable = [!0, !0, !1, !1], this.tickPad = [15, 15, 15, 15], this.tickAngle = [0, 0, 0, 0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickMarkLength = [0, 0, 0, 0], this.tickMarkWidth = [0, 0, 0, 0], this.tickMarkColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labels = ["x", "y"], this.labelEnable = [!0, !0, !1, !1], this.labelAngle = [0, Math.PI / 2, 0, 3 * Math.PI / 2], this.labelPad = [15, 15, 15, 15], this.labelSize = [12, 12], this.labelFont = ["sans-serif", "sans-serif"], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.title = "", this.titleEnable = !0, this.titleCenter = [0, 0, 0, 0], this.titleAngle = 0, this.titleColor = [0, 0, 0, 1], this.titleFont = "sans-serif", this.titleSize = 18, this.gridLineEnable = [!0, !0], this.gridLineColor = [[0, 0, 0, 0.5], [0, 0, 0, 0.5]], this.gridLineWidth = [1, 1], this.zeroLineEnable = [!0, !0], this.zeroLineWidth = [1, 1], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.borderColor = [0, 0, 0, 0], this.backgroundColor = [0, 0, 0, 0], this.static = this.scene.staticPlot;
        }
        var h = i.prototype, p = ["xaxis", "yaxis"];
        h.merge = function(_) {
          var d, f, c, g, m, x, w, k, S, A, C;
          for (this.titleEnable = !1, this.backgroundColor = u(_.plot_bgcolor), A = 0; A < 2; ++A) {
            var D = (d = p[A]).charAt(0);
            for (c = (f = _[this.scene[d]._name]).title.text === this.scene.fullLayout._dfltTitle[D] ? "" : f.title.text, C = 0; C <= 2; C += 2) this.labelEnable[A + C] = !1, this.labels[A + C] = c, this.labelColor[A + C] = u(f.title.font.color), this.labelFont[A + C] = f.title.font.family, this.labelSize[A + C] = f.title.font.size, this.labelPad[A + C] = this.getLabelPad(d, f), this.tickEnable[A + C] = !1, this.tickColor[A + C] = u((f.tickfont || {}).color), this.tickAngle[A + C] = f.tickangle === "auto" ? 0 : Math.PI * -f.tickangle / 180, this.tickPad[A + C] = this.getTickPad(f), this.tickMarkLength[A + C] = 0, this.tickMarkWidth[A + C] = f.tickwidth || 0, this.tickMarkColor[A + C] = u(f.tickcolor), this.borderLineEnable[A + C] = !1, this.borderLineColor[A + C] = u(f.linecolor), this.borderLineWidth[A + C] = f.linewidth || 0;
            w = this.hasSharedAxis(f), m = this.hasAxisInDfltPos(d, f) && !w, x = this.hasAxisInAltrPos(d, f) && !w, g = f.mirror || !1, k = w ? String(g).indexOf("all") !== -1 : !!g, S = w ? g === "allticks" : String(g).indexOf("ticks") !== -1, m ? this.labelEnable[A] = !0 : x && (this.labelEnable[A + 2] = !0), m ? this.tickEnable[A] = f.showticklabels : x && (this.tickEnable[A + 2] = f.showticklabels), (m || k) && (this.borderLineEnable[A] = f.showline), (x || k) && (this.borderLineEnable[A + 2] = f.showline), (m || S) && (this.tickMarkLength[A] = this.getTickMarkLength(f)), (x || S) && (this.tickMarkLength[A + 2] = this.getTickMarkLength(f)), this.gridLineEnable[A] = f.showgrid, this.gridLineColor[A] = u(f.gridcolor), this.gridLineWidth[A] = f.gridwidth, this.zeroLineEnable[A] = f.zeroline, this.zeroLineColor[A] = u(f.zerolinecolor), this.zeroLineWidth[A] = f.zerolinewidth;
          }
        }, h.hasSharedAxis = function(_) {
          var d = this.scene, f = d.fullLayout._subplots.gl2d;
          return l.findSubplotsWithAxis(f, _).indexOf(d.id) !== 0;
        }, h.hasAxisInDfltPos = function(_, d) {
          var f = d.side;
          return _ === "xaxis" ? f === "bottom" : _ === "yaxis" ? f === "left" : void 0;
        }, h.hasAxisInAltrPos = function(_, d) {
          var f = d.side;
          return _ === "xaxis" ? f === "top" : _ === "yaxis" ? f === "right" : void 0;
        }, h.getLabelPad = function(_, d) {
          var f = 1.5, c = d.title.font.size, g = d.showticklabels;
          return _ === "xaxis" ? d.side === "top" ? c * (f + (g ? 1 : 0)) - 10 : c * (f + (g ? 0.5 : 0)) - 10 : _ === "yaxis" ? d.side === "right" ? 10 + c * (f + (g ? 1 : 0.5)) : 10 + c * (f + (g ? 0.5 : 0)) : void 0;
        }, h.getTickPad = function(_) {
          return _.ticks === "outside" ? 10 + _.ticklen : 15;
        }, h.getTickMarkLength = function(_) {
          if (!_.ticks) return 0;
          var d = _.ticklen;
          return _.ticks === "inside" ? -d : d;
        }, o.exports = function(_) {
          return new i(_);
        };
      }, 24585: function(o, s, n) {
        var l = n(13582).overrideAll, u = n(27672), i = n(6704), h = n(62972), p = n(54826), _ = n(37703), d = n(6811), f = n(4173).KO;
        s.name = "gl2d", s.attr = ["xaxis", "yaxis"], s.idRoot = ["x", "y"], s.idRegex = p.idRegex, s.attrRegex = p.attrRegex, s.attributes = n(55126), s.supplyLayoutDefaults = function(c, g, m) {
          g._has("cartesian") || _.supplyLayoutDefaults(c, g, m);
        }, s.layoutAttrOverrides = l(_.layoutAttributes, "plot", "from-root"), s.baseLayoutAttrOverrides = l({ plot_bgcolor: i.plot_bgcolor, hoverlabel: d.hoverlabel }, "plot", "nested"), s.plot = function(c) {
          for (var g = c._fullLayout, m = c._fullData, x = g._subplots.gl2d, w = 0; w < x.length; w++) {
            var k = x[w], S = g._plots[k], A = f(m, "gl2d", k), C = S._scene2d;
            C === void 0 && (C = new u({ id: k, graphDiv: c, container: c.querySelector(".gl-container"), staticPlot: c._context.staticPlot, plotGlPixelRatio: c._context.plotGlPixelRatio }, g), S._scene2d = C), C.plot(A, c.calcdata, g, c.layout);
          }
        }, s.clean = function(c, g, m, x) {
          for (var w = x._subplots.gl2d || [], k = 0; k < w.length; k++) {
            var S = w[k], A = x._plots[S];
            A._scene2d && f(c, "gl2d", S).length === 0 && (A._scene2d.destroy(), delete x._plots[S]);
          }
          _.clean.apply(this, arguments);
        }, s.drawFramework = function(c) {
          c._context.staticPlot || _.drawFramework(c);
        }, s.toSVG = function(c) {
          for (var g = c._fullLayout, m = g._subplots.gl2d, x = 0; x < m.length; x++) {
            var w = g._plots[m[x]]._scene2d, k = w.toImage("png");
            g._glimages.append("svg:image").attr({ xmlns: h.svg, "xlink:href": k, x: 0, y: 0, width: "100%", height: "100%", preserveAspectRatio: "none" }), w.destroy();
          }
        }, s.updateFx = function(c) {
          for (var g = c._fullLayout, m = g._subplots.gl2d, x = 0; x < m.length; x++) g._plots[m[x]]._scene2d.updateFx(g.dragmode);
        };
      }, 27672: function(o, s, n) {
        var l, u, i = n(33626), h = n(29714), p = n(32141), _ = n(99098).gl_plot2d, d = n(99098).gl_spikes2d, f = n(99098).gl_select_box, c = n(22248), g = n(10749), m = n(77055), x = n(97464), w = n(84391), k = w.enforce, S = w.clean, A = n(32919).doAutoRange, C = n(70414), D = C.drawMode, L = C.selectMode, E = ["xaxis", "yaxis"], P = n(54826).SUBPLOT_PATTERN;
        function I(O, T) {
          this.container = O.container, this.graphDiv = O.graphDiv, this.pixelRatio = O.plotGlPixelRatio || window.devicePixelRatio, this.id = O.id, this.staticPlot = !!O.staticPlot, this.scrollZoom = this.graphDiv._context._scrollZoom.cartesian, this.fullData = null, this.updateRefs(T), this.makeFramework(), this.stopped || (this.glplotOptions = g(this), this.glplotOptions.merge(T), this.glplot = _(this.glplotOptions), this.camera = m(this), this.traces = {}, this.spikes = d(this.glplot), this.selectBox = f(this.glplot, { innerFill: !1, outerFill: !0 }), this.lastButtonState = 0, this.pickResult = null, this.isMouseOver = !0, this.stopped = !1, this.redraw = this.draw.bind(this), this.redraw());
        }
        o.exports = I;
        var M = I.prototype;
        M.makeFramework = function() {
          if (this.staticPlot) {
            if (!(u || (l = document.createElement("canvas"), u = c({ canvas: l, preserveDrawingBuffer: !1, premultipliedAlpha: !0, antialias: !0 })))) throw new Error("Error creating static canvas/context for image server");
            this.canvas = l, this.gl = u;
          } else {
            var O = this.container.querySelector(".gl-canvas-focus"), T = c({ canvas: O, preserveDrawingBuffer: !0, premultipliedAlpha: !0 });
            if (!T) return x(this), void (this.stopped = !0);
            this.canvas = O, this.gl = T;
          }
          var z = this.canvas;
          z.style.width = "100%", z.style.height = "100%", z.style.position = "absolute", z.style.top = "0px", z.style.left = "0px", z.style["pointer-events"] = "none", this.updateSize(z);
          var F = this.svgContainer = document.createElementNS("http://www.w3.org/2000/svg", "svg");
          F.style.position = "absolute", F.style.top = F.style.left = "0px", F.style.width = F.style.height = "100%", F.style["z-index"] = 20, F.style["pointer-events"] = "none";
          var U = this.mouseContainer = document.createElement("div");
          U.style.position = "absolute", U.style["pointer-events"] = "auto", this.pickCanvas = this.container.querySelector(".gl-canvas-pick");
          var V = this.container;
          V.appendChild(F), V.appendChild(U);
          var $ = this;
          U.addEventListener("mouseout", function() {
            $.isMouseOver = !1, $.unhover();
          }), U.addEventListener("mouseover", function() {
            $.isMouseOver = !0;
          });
        }, M.toImage = function(O) {
          O || (O = "png"), this.stopped = !0, this.staticPlot && this.container.appendChild(l), this.updateSize(this.canvas);
          var T = this.glplot.gl, z = T.drawingBufferWidth, F = T.drawingBufferHeight;
          T.clearColor(1, 1, 1, 0), T.clear(T.COLOR_BUFFER_BIT | T.DEPTH_BUFFER_BIT), this.glplot.setDirty(), this.glplot.draw(), T.bindFramebuffer(T.FRAMEBUFFER, null);
          var U = new Uint8Array(z * F * 4);
          T.readPixels(0, 0, z, F, T.RGBA, T.UNSIGNED_BYTE, U);
          for (var V = 0, $ = F - 1; V < $; ++V, --$) for (var q = 0; q < z; ++q) for (var K = 0; K < 4; ++K) {
            var re = U[4 * (z * V + q) + K];
            U[4 * (z * V + q) + K] = U[4 * (z * $ + q) + K], U[4 * (z * $ + q) + K] = re;
          }
          var Y = document.createElement("canvas");
          Y.width = z, Y.height = F;
          var te, ee = Y.getContext("2d", { willReadFrequently: !0 }), X = ee.createImageData(z, F);
          switch (X.data.set(U), ee.putImageData(X, 0, 0), O) {
            case "jpeg":
              te = Y.toDataURL("image/jpeg");
              break;
            case "webp":
              te = Y.toDataURL("image/webp");
              break;
            default:
              te = Y.toDataURL("image/png");
          }
          return this.staticPlot && this.container.removeChild(l), te;
        }, M.updateSize = function(O) {
          O || (O = this.canvas);
          var T = this.pixelRatio, z = this.fullLayout, F = z.width, U = z.height, V = 0 | Math.ceil(T * F), $ = 0 | Math.ceil(T * U);
          return O.width === V && O.height === $ || (O.width = V, O.height = $), O;
        }, M.computeTickMarks = function() {
          this.xaxis.setScale(), this.yaxis.setScale();
          for (var O = [h.calcTicks(this.xaxis), h.calcTicks(this.yaxis)], T = 0; T < 2; ++T) for (var z = 0; z < O[T].length; ++z) O[T][z].text = O[T][z].text + "";
          return O;
        }, M.updateRefs = function(O) {
          this.fullLayout = O;
          var T = this.id.match(P), z = "xaxis" + T[1], F = "yaxis" + T[2];
          this.xaxis = this.fullLayout[z], this.yaxis = this.fullLayout[F];
        }, M.relayoutCallback = function() {
          var O = this.graphDiv, T = this.xaxis, z = this.yaxis, F = O.layout, U = {}, V = U[T._name + ".range"] = T.range.slice(), $ = U[z._name + ".range"] = z.range.slice();
          U[T._name + ".autorange"] = T.autorange, U[z._name + ".autorange"] = z.autorange, i.call("_storeDirectGUIEdit", O.layout, O._fullLayout._preGUI, U);
          var q = F[T._name];
          q.range = V, q.autorange = T.autorange;
          var K = F[z._name];
          K.range = $, K.autorange = z.autorange, U.lastInputTime = this.camera.lastInputTime, O.emit("plotly_relayout", U);
        }, M.cameraChanged = function() {
          var O = this.camera;
          this.glplot.setDataBox(this.calcDataBox());
          var T = this.computeTickMarks();
          (function(z, F) {
            for (var U = 0; U < 2; ++U) {
              var V = z[U], $ = F[U];
              if (V.length !== $.length) return !0;
              for (var q = 0; q < V.length; ++q) if (V[q].x !== $[q].x) return !0;
            }
            return !1;
          })(T, this.glplotOptions.ticks) && (this.glplotOptions.ticks = T, this.glplotOptions.dataBox = O.dataBox, this.glplot.update(this.glplotOptions), this.handleAnnotations());
        }, M.handleAnnotations = function() {
          for (var O = this.graphDiv, T = this.fullLayout.annotations, z = 0; z < T.length; z++) {
            var F = T[z];
            F.xref === this.xaxis._id && F.yref === this.yaxis._id && i.getComponentMethod("annotations", "drawOne")(O, z);
          }
        }, M.destroy = function() {
          if (this.glplot) {
            var O = this.traces;
            O && Object.keys(O).map(function(T) {
              O[T].dispose(), delete O[T];
            }), this.glplot.dispose(), this.container.removeChild(this.svgContainer), this.container.removeChild(this.mouseContainer), this.fullData = null, this.glplot = null, this.stopped = !0, this.camera.mouseListener.enabled = !1, this.mouseContainer.removeEventListener("wheel", this.camera.wheelListener), this.camera = null;
          }
        }, M.plot = function(O, T, z) {
          var F = this.glplot;
          this.updateRefs(z), this.xaxis.clearCalc(), this.yaxis.clearCalc(), this.updateTraces(O, T), this.updateFx(z.dragmode);
          var U = z.width, V = z.height;
          this.updateSize(this.canvas);
          var $ = this.glplotOptions;
          $.merge(z), $.screenBox = [0, 0, U, V];
          var q = { _fullLayout: { _axisConstraintGroups: z._axisConstraintGroups, xaxis: this.xaxis, yaxis: this.yaxis, _size: z._size } };
          S(q, this.xaxis), S(q, this.yaxis);
          var K, re, Y = z._size, te = this.xaxis.domain, ee = this.yaxis.domain;
          for ($.viewBox = [Y.l + te[0] * Y.w, Y.b + ee[0] * Y.h, U - Y.r - (1 - te[1]) * Y.w, V - Y.t - (1 - ee[1]) * Y.h], this.mouseContainer.style.width = Y.w * (te[1] - te[0]) + "px", this.mouseContainer.style.height = Y.h * (ee[1] - ee[0]) + "px", this.mouseContainer.height = Y.h * (ee[1] - ee[0]), this.mouseContainer.style.left = Y.l + te[0] * Y.w + "px", this.mouseContainer.style.top = Y.t + (1 - ee[1]) * Y.h + "px", re = 0; re < 2; ++re) (K = this[E[re]])._length = $.viewBox[re + 2] - $.viewBox[re], A(this.graphDiv, K), K.setScale();
          k(q), $.ticks = this.computeTickMarks(), $.dataBox = this.calcDataBox(), $.merge(z), F.update($), this.glplot.draw();
        }, M.calcDataBox = function() {
          var O = this.xaxis, T = this.yaxis, z = O.range, F = T.range, U = O.r2l, V = T.r2l;
          return [U(z[0]), V(F[0]), U(z[1]), V(F[1])];
        }, M.setRanges = function(O) {
          var T = this.xaxis, z = this.yaxis, F = T.l2r, U = z.l2r;
          T.range = [F(O[0]), F(O[2])], z.range = [U(O[1]), U(O[3])];
        }, M.updateTraces = function(O, T) {
          var z, F, U, V = Object.keys(this.traces);
          this.fullData = O;
          e: for (z = 0; z < V.length; z++) {
            var $ = V[z], q = this.traces[$];
            for (F = 0; F < O.length; F++) if ((U = O[F]).uid === $ && U.type === q.type) continue e;
            q.dispose(), delete this.traces[$];
          }
          for (z = 0; z < O.length; z++) {
            U = O[z];
            var K = T[z], re = this.traces[U.uid];
            re ? re.update(U, K) : (re = U._module.plot(this, U, K), this.traces[U.uid] = re);
          }
          this.glplot.objects.sort(function(Y, te) {
            return Y._trace.index - te._trace.index;
          });
        }, M.updateFx = function(O) {
          L(O) || D(O) ? (this.pickCanvas.style["pointer-events"] = "none", this.mouseContainer.style["pointer-events"] = "none") : (this.pickCanvas.style["pointer-events"] = "auto", this.mouseContainer.style["pointer-events"] = "auto"), this.mouseContainer.style.cursor = O === "pan" ? "move" : O === "zoom" ? "crosshair" : null;
        }, M.emitPointAction = function(O, T) {
          for (var z, F = O.trace.uid, U = O.pointIndex, V = 0; V < this.fullData.length; V++) this.fullData[V].uid === F && (z = this.fullData[V]);
          var $ = { x: O.traceCoord[0], y: O.traceCoord[1], curveNumber: z.index, pointNumber: U, data: z._input, fullData: this.fullData, xaxis: this.xaxis, yaxis: this.yaxis };
          p.appendArrayPointValue($, z, U), this.graphDiv.emit(T, { points: [$] });
        }, M.draw = function() {
          if (!this.stopped) {
            requestAnimationFrame(this.redraw);
            var O = this.glplot, T = this.camera, z = T.mouseListener, F = this.lastButtonState === 1 && z.buttons === 0, U = this.fullLayout;
            this.lastButtonState = z.buttons, this.cameraChanged();
            var V, $ = z.x * O.pixelRatio, q = this.canvas.height - O.pixelRatio * z.y;
            if (T.boxEnabled && U.dragmode === "zoom") {
              this.selectBox.enabled = !0;
              for (var K = this.selectBox.selectBox = [Math.min(T.boxStart[0], T.boxEnd[0]), Math.min(T.boxStart[1], T.boxEnd[1]), Math.max(T.boxStart[0], T.boxEnd[0]), Math.max(T.boxStart[1], T.boxEnd[1])], re = 0; re < 2; re++) T.boxStart[re] === T.boxEnd[re] && (K[re] = O.dataBox[re], K[re + 2] = O.dataBox[re + 2]);
              O.setDirty();
            } else if (!T.panning && this.isMouseOver) {
              this.selectBox.enabled = !1;
              var Y = U._size, te = this.xaxis.domain, ee = this.yaxis.domain, X = (V = O.pick($ / O.pixelRatio + Y.l + te[0] * Y.w, q / O.pixelRatio - (Y.t + (1 - ee[1]) * Y.h))) && V.object._trace.handlePick(V);
              if (X && F && this.emitPointAction(X, "plotly_click"), V && V.object._trace.hoverinfo !== "skip" && U.hovermode && X && (!this.lastPickResult || this.lastPickResult.traceUid !== X.trace.uid || this.lastPickResult.dataCoord[0] !== X.dataCoord[0] || this.lastPickResult.dataCoord[1] !== X.dataCoord[1])) {
                var Q = X;
                this.lastPickResult = { traceUid: X.trace ? X.trace.uid : null, dataCoord: X.dataCoord.slice() }, this.spikes.update({ center: V.dataCoord }), Q.screenCoord = [((O.viewBox[2] - O.viewBox[0]) * (V.dataCoord[0] - O.dataBox[0]) / (O.dataBox[2] - O.dataBox[0]) + O.viewBox[0]) / O.pixelRatio, (this.canvas.height - (O.viewBox[3] - O.viewBox[1]) * (V.dataCoord[1] - O.dataBox[1]) / (O.dataBox[3] - O.dataBox[1]) - O.viewBox[1]) / O.pixelRatio], this.emitPointAction(X, "plotly_hover");
                var ue = this.fullData[Q.trace.index] || {}, ce = Q.pointIndex, he = p.castHoverinfo(ue, U, ce);
                if (he && he !== "all") {
                  var de = he.split("+");
                  de.indexOf("x") === -1 && (Q.traceCoord[0] = void 0), de.indexOf("y") === -1 && (Q.traceCoord[1] = void 0), de.indexOf("z") === -1 && (Q.traceCoord[2] = void 0), de.indexOf("text") === -1 && (Q.textLabel = void 0), de.indexOf("name") === -1 && (Q.name = void 0);
                }
                p.loneHover({ x: Q.screenCoord[0], y: Q.screenCoord[1], xLabel: this.hoverFormatter("xaxis", Q.traceCoord[0]), yLabel: this.hoverFormatter("yaxis", Q.traceCoord[1]), zLabel: Q.traceCoord[2], text: Q.textLabel, name: Q.name, color: p.castHoverOption(ue, ce, "bgcolor") || Q.color, borderColor: p.castHoverOption(ue, ce, "bordercolor"), fontFamily: p.castHoverOption(ue, ce, "font.family"), fontSize: p.castHoverOption(ue, ce, "font.size"), fontColor: p.castHoverOption(ue, ce, "font.color"), nameLength: p.castHoverOption(ue, ce, "namelength"), textAlign: p.castHoverOption(ue, ce, "align") }, { container: this.svgContainer, gd: this.graphDiv });
              }
            }
            V || this.unhover(), O.draw();
          }
        }, M.unhover = function() {
          this.lastPickResult && (this.spikes.update({}), this.lastPickResult = null, this.graphDiv.emit("plotly_unhover"), p.loneUnhover(this.svgContainer));
        }, M.hoverFormatter = function(O, T) {
          if (T !== void 0) {
            var z = this[O];
            return h.tickText(z, z.c2l(T), "hover").text;
          }
        };
      }, 2487: function(o, s, n) {
        var l = n(13582).overrideAll, u = n(6811), i = n(20299), h = n(4173).KO, p = n(34809), _ = n(62972), d = "gl3d", f = "scene";
        s.name = d, s.attr = f, s.idRoot = f, s.idRegex = s.attrRegex = p.counterRegex("scene"), s.attributes = n(22597), s.layoutAttributes = n(77168), s.baseLayoutAttrOverrides = l({ hoverlabel: u.hoverlabel }, "plot", "nested"), s.supplyLayoutDefaults = n(15250), s.plot = function(c) {
          for (var g = c._fullLayout, m = c._fullData, x = g._subplots[d], w = 0; w < x.length; w++) {
            var k = x[w], S = h(m, d, k), A = g[k], C = A.camera, D = A._scene;
            D || (D = new i({ id: k, graphDiv: c, container: c.querySelector(".gl-container"), staticPlot: c._context.staticPlot, plotGlPixelRatio: c._context.plotGlPixelRatio, camera: C }, g), A._scene = D), D.viewInitial || (D.viewInitial = { up: { x: C.up.x, y: C.up.y, z: C.up.z }, eye: { x: C.eye.x, y: C.eye.y, z: C.eye.z }, center: { x: C.center.x, y: C.center.y, z: C.center.z } }), D.plot(S, g, c.layout);
          }
        }, s.clean = function(c, g, m, x) {
          for (var w = x._subplots[d] || [], k = 0; k < w.length; k++) {
            var S = w[k];
            !g[S] && x[S]._scene && (x[S]._scene.destroy(), x._infolayer && x._infolayer.selectAll(".annotation-" + S).remove());
          }
        }, s.toSVG = function(c) {
          for (var g = c._fullLayout, m = g._subplots[d], x = g._size, w = 0; w < m.length; w++) {
            var k = g[m[w]], S = k.domain, A = k._scene, C = A.toImage("png");
            g._glimages.append("svg:image").attr({ xmlns: _.svg, "xlink:href": C, x: x.l + x.w * S.x[0], y: x.t + x.h * (1 - S.y[1]), width: x.w * (S.x[1] - S.x[0]), height: x.h * (S.y[1] - S.y[0]), preserveAspectRatio: "none" }), A.destroy();
          }
        }, s.cleanId = function(c) {
          if (c.match(/^scene[0-9]*$/)) {
            var g = c.substr(5);
            return g === "1" && (g = ""), f + g;
          }
        }, s.updateFx = function(c) {
          for (var g = c._fullLayout, m = g._subplots[d], x = 0; x < m.length; x++) g[m[x]]._scene.updateFx(g.dragmode, g.hovermode);
        };
      }, 22597: function(o) {
        o.exports = { scene: { valType: "subplotid", dflt: "scene", editType: "calc+clearAxisTypes" } };
      }, 63397: function(o, s, n) {
        var l = n(78766), u = n(25829), i = n(93049).extendFlat, h = n(13582).overrideAll;
        o.exports = h({ visible: u.visible, showspikes: { valType: "boolean", dflt: !0 }, spikesides: { valType: "boolean", dflt: !0 }, spikethickness: { valType: "number", min: 0, dflt: 2 }, spikecolor: { valType: "color", dflt: l.defaultLine }, showbackground: { valType: "boolean", dflt: !1 }, backgroundcolor: { valType: "color", dflt: "rgba(204, 204, 204, 0.5)" }, showaxeslabels: { valType: "boolean", dflt: !0 }, color: u.color, categoryorder: u.categoryorder, categoryarray: u.categoryarray, title: { text: u.title.text, font: u.title.font }, type: i({}, u.type, { values: ["-", "linear", "log", "date", "category"] }), autotypenumbers: u.autotypenumbers, autorange: u.autorange, autorangeoptions: { minallowed: u.autorangeoptions.minallowed, maxallowed: u.autorangeoptions.maxallowed, clipmin: u.autorangeoptions.clipmin, clipmax: u.autorangeoptions.clipmax, include: u.autorangeoptions.include, editType: "plot" }, rangemode: u.rangemode, minallowed: u.minallowed, maxallowed: u.maxallowed, range: i({}, u.range, { items: [{ valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }], anim: !1 }), tickmode: u.minor.tickmode, nticks: u.nticks, tick0: u.tick0, dtick: u.dtick, tickvals: u.tickvals, ticktext: u.ticktext, ticks: u.ticks, mirror: u.mirror, ticklen: u.ticklen, tickwidth: u.tickwidth, tickcolor: u.tickcolor, showticklabels: u.showticklabels, labelalias: u.labelalias, tickfont: u.tickfont, tickangle: u.tickangle, tickprefix: u.tickprefix, showtickprefix: u.showtickprefix, ticksuffix: u.ticksuffix, showticksuffix: u.showticksuffix, showexponent: u.showexponent, exponentformat: u.exponentformat, minexponent: u.minexponent, separatethousands: u.separatethousands, tickformat: u.tickformat, tickformatstops: u.tickformatstops, hoverformat: u.hoverformat, showline: u.showline, linecolor: u.linecolor, linewidth: u.linewidth, showgrid: u.showgrid, gridcolor: i({}, u.gridcolor, { dflt: "rgb(204, 204, 204)" }), gridwidth: u.gridwidth, zeroline: u.zeroline, zerolinecolor: u.zerolinecolor, zerolinewidth: u.zerolinewidth, _deprecated: { title: u._deprecated.title, titlefont: u._deprecated.titlefont } }, "plot", "from-root");
      }, 34258: function(o, s, n) {
        var l = n(65657).mix, u = n(34809), i = n(78032), h = n(63397), p = n(4392), _ = n(97655), d = ["xaxis", "yaxis", "zaxis"];
        o.exports = function(f, c, g) {
          var m, x;
          function w(A, C) {
            return u.coerce(m, x, h, A, C);
          }
          for (var k = 0; k < d.length; k++) {
            var S = d[k];
            m = f[S] || {}, (x = i.newContainer(c, S))._id = S[0] + g.scene, x._name = S, p(m, x, w, g), _(m, x, w, { font: g.font, letter: S[0], data: g.data, showGrid: !0, noAutotickangles: !0, noTicklabelindex: !0, noTickson: !0, noTicklabelmode: !0, noTicklabelshift: !0, noTicklabelstandoff: !0, noTicklabelstep: !0, noTicklabelposition: !0, noTicklabeloverflow: !0, noInsiderange: !0, bgColor: g.bgColor, calendar: g.calendar }, g.fullLayout), w("gridcolor", l(x.color, g.bgColor, 72.72727272727273).toRgbString()), w("title.text", S[0]), x.setScale = u.noop, w("showspikes") && (w("spikesides"), w("spikethickness"), w("spikecolor", x.color)), w("showaxeslabels"), w("showbackground") && w("backgroundcolor");
          }
        };
      }, 95701: function(o, s, n) {
        var l = n(55010), u = n(34809), i = ["xaxis", "yaxis", "zaxis"];
        function h() {
          this.bounds = [[-10, -10, -10], [10, 10, 10]], this.ticks = [[], [], []], this.tickEnable = [!0, !0, !0], this.tickFont = ["sans-serif", "sans-serif", "sans-serif"], this.tickSize = [12, 12, 12], this.tickFontWeight = ["normal", "normal", "normal", "normal"], this.tickFontStyle = ["normal", "normal", "normal", "normal"], this.tickFontVariant = ["normal", "normal", "normal", "normal"], this.tickAngle = [0, 0, 0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [18, 18, 18], this.labels = ["x", "y", "z"], this.labelEnable = [!0, !0, !0], this.labelFont = ["Open Sans", "Open Sans", "Open Sans"], this.labelSize = [20, 20, 20], this.labelFontWeight = ["normal", "normal", "normal", "normal"], this.labelFontStyle = ["normal", "normal", "normal", "normal"], this.labelFontVariant = ["normal", "normal", "normal", "normal"], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [30, 30, 30], this.lineEnable = [!0, !0, !0], this.lineMirror = [!1, !1, !1], this.lineWidth = [1, 1, 1], this.lineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.lineTickEnable = [!0, !0, !0], this.lineTickMirror = [!1, !1, !1], this.lineTickLength = [10, 10, 10], this.lineTickWidth = [1, 1, 1], this.lineTickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.gridEnable = [!0, !0, !0], this.gridWidth = [1, 1, 1], this.gridColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroEnable = [!0, !0, !0], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroLineWidth = [2, 2, 2], this.backgroundEnable = [!0, !0, !0], this.backgroundColor = [[0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5]], this._defaultTickPad = this.tickPad.slice(), this._defaultLabelPad = this.labelPad.slice(), this._defaultLineTickLength = this.lineTickLength.slice();
        }
        h.prototype.merge = function(p, _) {
          for (var d = this, f = 0; f < 3; ++f) {
            var c = _[i[f]];
            c.visible ? (d.labels[f] = p._meta ? u.templateString(c.title.text, p._meta) : c.title.text, "font" in c.title && (c.title.font.color && (d.labelColor[f] = l(c.title.font.color)), c.title.font.family && (d.labelFont[f] = c.title.font.family), c.title.font.size && (d.labelSize[f] = c.title.font.size), c.title.font.weight && (d.labelFontWeight[f] = c.title.font.weight), c.title.font.style && (d.labelFontStyle[f] = c.title.font.style), c.title.font.variant && (d.labelFontVariant[f] = c.title.font.variant)), "showline" in c && (d.lineEnable[f] = c.showline), "linecolor" in c && (d.lineColor[f] = l(c.linecolor)), "linewidth" in c && (d.lineWidth[f] = c.linewidth), "showgrid" in c && (d.gridEnable[f] = c.showgrid), "gridcolor" in c && (d.gridColor[f] = l(c.gridcolor)), "gridwidth" in c && (d.gridWidth[f] = c.gridwidth), c.type === "log" ? d.zeroEnable[f] = !1 : "zeroline" in c && (d.zeroEnable[f] = c.zeroline), "zerolinecolor" in c && (d.zeroLineColor[f] = l(c.zerolinecolor)), "zerolinewidth" in c && (d.zeroLineWidth[f] = c.zerolinewidth), "ticks" in c && c.ticks ? d.lineTickEnable[f] = !0 : d.lineTickEnable[f] = !1, "ticklen" in c && (d.lineTickLength[f] = d._defaultLineTickLength[f] = c.ticklen), "tickcolor" in c && (d.lineTickColor[f] = l(c.tickcolor)), "tickwidth" in c && (d.lineTickWidth[f] = c.tickwidth), "tickangle" in c && (d.tickAngle[f] = c.tickangle === "auto" ? -3600 : Math.PI * -c.tickangle / 180), "showticklabels" in c && (d.tickEnable[f] = c.showticklabels), "tickfont" in c && (c.tickfont.color && (d.tickColor[f] = l(c.tickfont.color)), c.tickfont.family && (d.tickFont[f] = c.tickfont.family), c.tickfont.size && (d.tickSize[f] = c.tickfont.size), c.tickfont.weight && (d.tickFontWeight[f] = c.tickfont.weight), c.tickfont.style && (d.tickFontStyle[f] = c.tickfont.style), c.tickfont.variant && (d.tickFontVariant[f] = c.tickfont.variant)), "mirror" in c ? ["ticks", "all", "allticks"].indexOf(c.mirror) !== -1 ? (d.lineTickMirror[f] = !0, d.lineMirror[f] = !0) : c.mirror === !0 ? (d.lineTickMirror[f] = !1, d.lineMirror[f] = !0) : (d.lineTickMirror[f] = !1, d.lineMirror[f] = !1) : d.lineMirror[f] = !1, "showbackground" in c && c.showbackground !== !1 ? (d.backgroundEnable[f] = !0, d.backgroundColor[f] = l(c.backgroundcolor)) : d.backgroundEnable[f] = !1) : (d.tickEnable[f] = !1, d.labelEnable[f] = !1, d.lineEnable[f] = !1, d.lineTickEnable[f] = !1, d.gridEnable[f] = !1, d.zeroEnable[f] = !1, d.backgroundEnable[f] = !1);
          }
        }, o.exports = function(p, _) {
          var d = new h();
          return d.merge(p, _), d;
        };
      }, 15250: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(33626), h = n(4448), p = n(34258), _ = n(77168), d = n(4173).KO, f = "gl3d";
        function c(g, m, x, w) {
          for (var k = x("bgcolor"), S = u.combine(k, w.paper_bgcolor), A = ["up", "center", "eye"], C = 0; C < A.length; C++) x("camera." + A[C] + ".x"), x("camera." + A[C] + ".y"), x("camera." + A[C] + ".z");
          x("camera.projection.type");
          var D = !!x("aspectratio.x") && !!x("aspectratio.y") && !!x("aspectratio.z"), L = x("aspectmode", D ? "manual" : "auto");
          D || (g.aspectratio = m.aspectratio = { x: 1, y: 1, z: 1 }, L === "manual" && (m.aspectmode = "auto"), g.aspectmode = m.aspectmode);
          var E = d(w.fullData, f, w.id);
          p(g, m, { font: w.font, scene: w.id, data: E, bgColor: S, calendar: w.calendar, autotypenumbersDflt: w.autotypenumbersDflt, fullLayout: w.fullLayout }), i.getComponentMethod("annotations3d", "handleDefaults")(g, m, w);
          var P = w.getDfltFromLayout("dragmode");
          if (P !== !1 && !P) if (P = "orbit", g.camera && g.camera.up) {
            var I = g.camera.up.x, M = g.camera.up.y, O = g.camera.up.z;
            O !== 0 && (I && M && O ? O / Math.sqrt(I * I + M * M + O * O) > 0.999 && (P = "turntable") : P = "turntable");
          } else P = "turntable";
          x("dragmode", P), x("hovermode", w.getDfltFromLayout("hovermode"));
        }
        o.exports = function(g, m, x) {
          var w = m._basePlotModules.length > 1;
          h(g, m, x, { type: f, attributes: _, handleDefaults: c, fullLayout: m, font: m.font, fullData: x, getDfltFromLayout: function(k) {
            if (!w) return l.validate(g[k], _[k]) ? g[k] : void 0;
          }, autotypenumbersDflt: m.autotypenumbers, paper_bgcolor: m.paper_bgcolor, calendar: m.calendar });
        };
      }, 77168: function(o, s, n) {
        var l = n(63397), u = n(13792).u, i = n(93049).extendFlat, h = n(34809).counterRegex;
        function p(_, d, f) {
          return { x: { valType: "number", dflt: _, editType: "camera" }, y: { valType: "number", dflt: d, editType: "camera" }, z: { valType: "number", dflt: f, editType: "camera" }, editType: "camera" };
        }
        o.exports = { _arrayAttrRegexps: [h("scene", ".annotations", !0)], bgcolor: { valType: "color", dflt: "rgba(0,0,0,0)", editType: "plot" }, camera: { up: i(p(0, 0, 1), {}), center: i(p(0, 0, 0), {}), eye: i(p(1.25, 1.25, 1.25), {}), projection: { type: { valType: "enumerated", values: ["perspective", "orthographic"], dflt: "perspective", editType: "calc" }, editType: "calc" }, editType: "camera" }, domain: u({ name: "scene", editType: "plot" }), aspectmode: { valType: "enumerated", values: ["auto", "cube", "data", "manual"], dflt: "auto", editType: "plot", impliedEdits: { "aspectratio.x": void 0, "aspectratio.y": void 0, "aspectratio.z": void 0 } }, aspectratio: { x: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, y: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, z: { valType: "number", min: 0, editType: "plot", impliedEdits: { "^aspectmode": "manual" } }, editType: "plot", impliedEdits: { aspectmode: "manual" } }, xaxis: l, yaxis: l, zaxis: l, dragmode: { valType: "enumerated", values: ["orbit", "turntable", "zoom", "pan", !1], editType: "plot" }, hovermode: { valType: "enumerated", values: ["closest", !1], dflt: "closest", editType: "modebar" }, uirevision: { valType: "any", editType: "none" }, editType: "plot", _deprecated: { cameraposition: { valType: "info_array", editType: "camera" } } };
      }, 64087: function(o, s, n) {
        var l = n(55010), u = ["xaxis", "yaxis", "zaxis"];
        function i() {
          this.enabled = [!0, !0, !0], this.colors = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.drawSides = [!0, !0, !0], this.lineWidth = [1, 1, 1];
        }
        i.prototype.merge = function(h) {
          for (var p = 0; p < 3; ++p) {
            var _ = h[u[p]];
            _.visible ? (this.enabled[p] = _.showspikes, this.colors[p] = l(_.spikecolor), this.drawSides[p] = _.spikesides, this.lineWidth[p] = _.spikethickness) : (this.enabled[p] = !1, this.drawSides[p] = !1);
          }
        }, o.exports = function(h) {
          var p = new i();
          return p.merge(h), p;
        };
      }, 32412: function(o, s, n) {
        o.exports = function(p) {
          for (var _ = p.axesOptions, d = p.glplot.axesPixels, f = p.fullSceneLayout, c = [[], [], []], g = 0; g < 3; ++g) {
            var m = f[i[g]];
            if (m._length = (d[g].hi - d[g].lo) * d[g].pixelsPerDataUnit / p.dataScale[g], Math.abs(m._length) === 1 / 0 || isNaN(m._length)) c[g] = [];
            else {
              m._input_range = m.range.slice(), m.range[0] = d[g].lo / p.dataScale[g], m.range[1] = d[g].hi / p.dataScale[g], m._m = 1 / (p.dataScale[g] * d[g].pixelsPerDataUnit), m.range[0] === m.range[1] && (m.range[0] -= 1, m.range[1] += 1);
              var x = m.tickmode;
              if (m.tickmode === "auto") {
                m.tickmode = "linear";
                var w = m.nticks || u.constrain(m._length / 40, 4, 9);
                l.autoTicks(m, Math.abs(m.range[1] - m.range[0]) / w);
              }
              for (var k = l.calcTicks(m, { msUTC: !0 }), S = 0; S < k.length; ++S) k[S].x = k[S].x * p.dataScale[g], m.type === "date" && (k[S].text = k[S].text.replace(/\<br\>/g, " "));
              c[g] = k, m.tickmode = x;
            }
          }
          for (_.ticks = c, g = 0; g < 3; ++g) for (h[g] = 0.5 * (p.glplot.bounds[0][g] + p.glplot.bounds[1][g]), S = 0; S < 2; ++S) _.bounds[S][g] = p.glplot.bounds[S][g];
          p.contourLevels = function(A) {
            for (var C = new Array(3), D = 0; D < 3; ++D) {
              for (var L = A[D], E = new Array(L.length), P = 0; P < L.length; ++P) E[P] = L[P].x;
              C[D] = E;
            }
            return C;
          }(c);
        };
        var l = n(29714), u = n(34809), i = ["xaxis", "yaxis", "zaxis"], h = [0, 0, 0];
      }, 25802: function(o) {
        function s(n, l) {
          var u, i, h = [0, 0, 0, 0];
          for (u = 0; u < 4; ++u) for (i = 0; i < 4; ++i) h[i] += n[4 * u + i] * l[u];
          return h;
        }
        o.exports = function(n, l) {
          return s(n.projection, s(n.view, s(n.model, [l[0], l[1], l[2], 1])));
        };
      }, 20299: function(o, s, n) {
        var l, u, i = n(99098).gl_plot3d, h = i.createCamera, p = i.createScene, _ = n(22248), d = n(74043), f = n(33626), c = n(34809), g = c.preserveDrawingBuffer(), m = n(29714), x = n(32141), w = n(55010), k = n(97464), S = n(25802), A = n(95701), C = n(64087), D = n(32412), L = n(32919).applyAutorangeOptions, E = !1;
        function P(z, F) {
          var U = document.createElement("div"), V = z.container;
          this.graphDiv = z.graphDiv;
          var $ = document.createElementNS("http://www.w3.org/2000/svg", "svg");
          $.style.position = "absolute", $.style.top = $.style.left = "0px", $.style.width = $.style.height = "100%", $.style["z-index"] = 20, $.style["pointer-events"] = "none", U.appendChild($), this.svgContainer = $, U.id = z.id, U.style.position = "absolute", U.style.top = U.style.left = "0px", U.style.width = U.style.height = "100%", V.appendChild(U), this.fullLayout = F, this.id = z.id || "scene", this.fullSceneLayout = F[this.id], this.plotArgs = [[], {}, {}], this.axesOptions = A(F, F[this.id]), this.spikeOptions = C(F[this.id]), this.container = U, this.staticMode = !!z.staticPlot, this.pixelRatio = this.pixelRatio || z.plotGlPixelRatio || 2, this.dataScale = [1, 1, 1], this.contourLevels = [[], [], []], this.convertAnnotations = f.getComponentMethod("annotations3d", "convert"), this.drawAnnotations = f.getComponentMethod("annotations3d", "draw"), this.initializeGLPlot();
        }
        var I = P.prototype;
        I.prepareOptions = function() {
          var z = this, F = { canvas: z.canvas, gl: z.gl, glOptions: { preserveDrawingBuffer: g, premultipliedAlpha: !0, antialias: !0 }, container: z.container, axes: z.axesOptions, spikes: z.spikeOptions, pickRadius: 10, snapToData: !0, autoScale: !0, autoBounds: !1, cameraObject: z.camera, pixelRatio: z.pixelRatio };
          if (z.staticMode) {
            if (!(u || (l = document.createElement("canvas"), u = _({ canvas: l, preserveDrawingBuffer: !0, premultipliedAlpha: !0, antialias: !0 })))) throw new Error("error creating static canvas/context for image server");
            F.gl = u, F.canvas = l;
          }
          return F;
        };
        var M = !0;
        I.tryCreatePlot = function() {
          var z = this, F = z.prepareOptions(), U = !0;
          try {
            z.glplot = p(F);
          } catch {
            if (z.staticMode || !M || g) U = !1;
            else {
              c.warn(["webgl setup failed possibly due to", "false preserveDrawingBuffer config.", "The mobile/tablet device may not be detected by is-mobile module.", "Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));
              try {
                g = F.glOptions.preserveDrawingBuffer = !0, z.glplot = p(F);
              } catch {
                g = F.glOptions.preserveDrawingBuffer = !1, U = !1;
              }
            }
          }
          return M = !1, U;
        }, I.initializeGLCamera = function() {
          var z = this, F = z.fullSceneLayout.camera, U = F.projection.type === "orthographic";
          z.camera = h(z.container, { center: [F.center.x, F.center.y, F.center.z], eye: [F.eye.x, F.eye.y, F.eye.z], up: [F.up.x, F.up.y, F.up.z], _ortho: U, zoomMin: 0.01, zoomMax: 100, mode: "orbit" });
        }, I.initializeGLPlot = function() {
          var z = this;
          if (z.initializeGLCamera(), !z.tryCreatePlot()) return k(z);
          z.traces = {}, z.make4thDimension();
          var F = z.graphDiv, U = F.layout, V = function() {
            var q = {};
            return z.isCameraChanged(U) && (q[z.id + ".camera"] = z.getCamera()), z.isAspectChanged(U) && (q[z.id + ".aspectratio"] = z.glplot.getAspectratio(), U[z.id].aspectmode !== "manual" && (z.fullSceneLayout.aspectmode = U[z.id].aspectmode = q[z.id + ".aspectmode"] = "manual")), q;
          }, $ = function(q) {
            if (q.fullSceneLayout.dragmode !== !1) {
              var K = V();
              q.saveLayout(U), q.graphDiv.emit("plotly_relayout", K);
            }
          };
          return z.glplot.canvas && (z.glplot.canvas.addEventListener("mouseup", function() {
            $(z);
          }), z.glplot.canvas.addEventListener("touchstart", function() {
            E = !0;
          }), z.glplot.canvas.addEventListener("wheel", function(q) {
            if (F._context._scrollZoom.gl3d) {
              if (z.camera._ortho) {
                var K = q.deltaX > q.deltaY ? 1.1 : 0.9090909090909091, re = z.glplot.getAspectratio();
                z.glplot.setAspectratio({ x: K * re.x, y: K * re.y, z: K * re.z });
              }
              $(z);
            }
          }, !!d && { passive: !1 }), z.glplot.canvas.addEventListener("mousemove", function() {
            if (z.fullSceneLayout.dragmode !== !1 && z.camera.mouseListener.buttons !== 0) {
              var q = V();
              z.graphDiv.emit("plotly_relayouting", q);
            }
          }), z.staticMode || z.glplot.canvas.addEventListener("webglcontextlost", function(q) {
            F && F.emit && F.emit("plotly_webglcontextlost", { event: q, layer: z.id });
          }, !1)), z.glplot.oncontextloss = function() {
            z.recoverContext();
          }, z.glplot.onrender = function() {
            z.render();
          }, !0;
        }, I.render = function() {
          var z, F = this, U = F.graphDiv, V = F.svgContainer, $ = F.container.getBoundingClientRect();
          U._fullLayout._calcInverseTransform(U);
          var q = U._fullLayout._invScaleX, K = U._fullLayout._invScaleY, re = $.width * q, Y = $.height * K;
          V.setAttributeNS(null, "viewBox", "0 0 " + re + " " + Y), V.setAttributeNS(null, "width", re), V.setAttributeNS(null, "height", Y), D(F), F.glplot.axes.update(F.axesOptions);
          for (var te = Object.keys(F.traces), ee = null, X = F.glplot.selection, Q = 0; Q < te.length; ++Q) (z = F.traces[te[Q]]).data.hoverinfo !== "skip" && z.handlePick(X) && (ee = z), z.setContourLevels && z.setContourLevels();
          function ue(Me, De, Le) {
            var We = F.fullSceneLayout[Me + "axis"];
            return We.type !== "log" && (De = We.d2l(De)), m.hoverLabelText(We, De, Le);
          }
          if (ee !== null) {
            var ce = S(F.glplot.cameraParams, X.dataCoordinate);
            z = ee.data;
            var he, de = U._fullData[z.index], ne = X.index, ae = { xLabel: ue("x", X.traceCoordinate[0], z.xhoverformat), yLabel: ue("y", X.traceCoordinate[1], z.yhoverformat), zLabel: ue("z", X.traceCoordinate[2], z.zhoverformat) }, se = x.castHoverinfo(de, F.fullLayout, ne), me = (se || "").split("+"), ye = se && se === "all";
            de.hovertemplate || ye || (me.indexOf("x") === -1 && (ae.xLabel = void 0), me.indexOf("y") === -1 && (ae.yLabel = void 0), me.indexOf("z") === -1 && (ae.zLabel = void 0), me.indexOf("text") === -1 && (X.textLabel = void 0), me.indexOf("name") === -1 && (ee.name = void 0));
            var pe = [];
            z.type === "cone" || z.type === "streamtube" ? (ae.uLabel = ue("x", X.traceCoordinate[3], z.uhoverformat), (ye || me.indexOf("u") !== -1) && pe.push("u: " + ae.uLabel), ae.vLabel = ue("y", X.traceCoordinate[4], z.vhoverformat), (ye || me.indexOf("v") !== -1) && pe.push("v: " + ae.vLabel), ae.wLabel = ue("z", X.traceCoordinate[5], z.whoverformat), (ye || me.indexOf("w") !== -1) && pe.push("w: " + ae.wLabel), ae.normLabel = X.traceCoordinate[6].toPrecision(3), (ye || me.indexOf("norm") !== -1) && pe.push("norm: " + ae.normLabel), z.type === "streamtube" && (ae.divergenceLabel = X.traceCoordinate[7].toPrecision(3), (ye || me.indexOf("divergence") !== -1) && pe.push("divergence: " + ae.divergenceLabel)), X.textLabel && pe.push(X.textLabel), he = pe.join("<br>")) : z.type === "isosurface" || z.type === "volume" ? (ae.valueLabel = m.hoverLabelText(F._mockAxis, F._mockAxis.d2l(X.traceCoordinate[3]), z.valuehoverformat), pe.push("value: " + ae.valueLabel), X.textLabel && pe.push(X.textLabel), he = pe.join("<br>")) : he = X.textLabel;
            var be = { x: X.traceCoordinate[0], y: X.traceCoordinate[1], z: X.traceCoordinate[2], data: de._input, fullData: de, curveNumber: de.index, pointNumber: ne };
            x.appendArrayPointValue(be, de, ne), z._module.eventData && (be = de._module.eventData(be, X, de, {}, ne));
            var Ae = { points: [be] };
            if (F.fullSceneLayout.hovermode) {
              var Se = [];
              x.loneHover({ trace: de, x: (0.5 + 0.5 * ce[0] / ce[3]) * re, y: (0.5 - 0.5 * ce[1] / ce[3]) * Y, xLabel: ae.xLabel, yLabel: ae.yLabel, zLabel: ae.zLabel, text: he, name: ee.name, color: x.castHoverOption(de, ne, "bgcolor") || ee.color, borderColor: x.castHoverOption(de, ne, "bordercolor"), fontFamily: x.castHoverOption(de, ne, "font.family"), fontSize: x.castHoverOption(de, ne, "font.size"), fontColor: x.castHoverOption(de, ne, "font.color"), nameLength: x.castHoverOption(de, ne, "namelength"), textAlign: x.castHoverOption(de, ne, "align"), hovertemplate: c.castOption(de, ne, "hovertemplate"), hovertemplateLabels: c.extendFlat({}, be, ae), eventData: [be] }, { container: V, gd: U, inOut_bbox: Se }), be.bbox = Se[0];
            }
            X.distance < 5 && (X.buttons || E) ? U.emit("plotly_click", Ae) : U.emit("plotly_hover", Ae), this.oldEventData = Ae;
          } else x.loneUnhover(V), this.oldEventData && U.emit("plotly_unhover", this.oldEventData), this.oldEventData = void 0;
          F.drawAnnotations(F);
        }, I.recoverContext = function() {
          var z = this;
          z.glplot.dispose();
          var F = function() {
            z.glplot.gl.isContextLost() ? requestAnimationFrame(F) : z.initializeGLPlot() ? z.plot.apply(z, z.plotArgs) : c.error("Catastrophic and unrecoverable WebGL error. Context lost.");
          };
          requestAnimationFrame(F);
        };
        var O = ["xaxis", "yaxis", "zaxis"];
        function T(z, F, U) {
          for (var V = z.fullSceneLayout, $ = 0; $ < 3; $++) {
            var q = O[$], K = q.charAt(0), re = V[q], Y = F[K], te = F[K + "calendar"], ee = F["_" + K + "length"];
            if (c.isArrayOrTypedArray(Y)) for (var X, Q = 0; Q < (ee || Y.length); Q++) if (c.isArrayOrTypedArray(Y[Q])) for (var ue = 0; ue < Y[Q].length; ++ue) X = re.d2l(Y[Q][ue], 0, te), !isNaN(X) && isFinite(X) && (U[0][$] = Math.min(U[0][$], X), U[1][$] = Math.max(U[1][$], X));
            else X = re.d2l(Y[Q], 0, te), !isNaN(X) && isFinite(X) && (U[0][$] = Math.min(U[0][$], X), U[1][$] = Math.max(U[1][$], X));
            else U[0][$] = Math.min(U[0][$], 0), U[1][$] = Math.max(U[1][$], ee - 1);
          }
        }
        I.plot = function(z, F, U) {
          var V = this;
          if (V.plotArgs = [z, F, U], !V.glplot.contextLost) {
            var $, q, K, re, Y, te, ee = F[V.id], X = U[V.id];
            V.fullLayout = F, V.fullSceneLayout = ee, V.axesOptions.merge(F, ee), V.spikeOptions.merge(ee), V.setViewport(ee), V.updateFx(ee.dragmode, ee.hovermode), V.camera.enableWheel = V.graphDiv._context._scrollZoom.gl3d, V.glplot.setClearColor(w(ee.bgcolor)), V.setConvert(Y), z ? Array.isArray(z) || (z = [z]) : z = [];
            var Q = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]];
            for (K = 0; K < z.length; ++K) ($ = z[K]).visible === !0 && $._length !== 0 && T(this, $, Q);
            (function(Re, je) {
              for (var Ke = Re.fullSceneLayout, tt = Ke.annotations || [], _e = 0; _e < 3; _e++) for (var Be = O[_e], $e = Be.charAt(0), Ze = Ke[Be], ct = 0; ct < tt.length; ct++) {
                var ft = tt[ct];
                if (ft.visible) {
                  var _t = Ze.r2l(ft[$e]);
                  !isNaN(_t) && isFinite(_t) && (je[0][_e] = Math.min(je[0][_e], _t), je[1][_e] = Math.max(je[1][_e], _t));
                }
              }
            })(this, Q);
            var ue = [1, 1, 1];
            for (re = 0; re < 3; ++re) Q[1][re] === Q[0][re] ? ue[re] = 1 : ue[re] = 1 / (Q[1][re] - Q[0][re]);
            for (V.dataScale = ue, V.convertAnnotations(this), K = 0; K < z.length; ++K) ($ = z[K]).visible === !0 && $._length !== 0 && ((q = V.traces[$.uid]) ? q.data.type === $.type ? q.update($) : (q.dispose(), q = $._module.plot(this, $), V.traces[$.uid] = q) : (q = $._module.plot(this, $), V.traces[$.uid] = q), q.name = $.name);
            var ce = Object.keys(V.traces);
            e: for (K = 0; K < ce.length; ++K) {
              for (re = 0; re < z.length; ++re) if (z[re].uid === ce[K] && z[re].visible === !0 && z[re]._length !== 0) continue e;
              (q = V.traces[ce[K]]).dispose(), delete V.traces[ce[K]];
            }
            V.glplot.objects.sort(function(Re, je) {
              return Re._trace.data.index - je._trace.data.index;
            });
            var he, de = [[0, 0, 0], [0, 0, 0]], ne = [], ae = {};
            for (K = 0; K < 3; ++K) {
              var se;
              if ((te = (Y = ee[O[K]]).type) in ae ? (ae[te].acc *= ue[K], ae[te].count += 1) : ae[te] = { acc: ue[K], count: 1 }, Y.autorange) {
                de[0][K] = 1 / 0, de[1][K] = -1 / 0;
                var me = V.glplot.objects, ye = V.fullSceneLayout.annotations || [], pe = Y._name.charAt(0);
                for (re = 0; re < me.length; re++) {
                  var be = me[re], Ae = be.bounds, Se = be._trace.data._pad || 0;
                  be.constructor.name === "ErrorBars" && Y._lowerLogErrorBound ? de[0][K] = Math.min(de[0][K], Y._lowerLogErrorBound) : de[0][K] = Math.min(de[0][K], Ae[0][K] / ue[K] - Se), de[1][K] = Math.max(de[1][K], Ae[1][K] / ue[K] + Se);
                }
                for (re = 0; re < ye.length; re++) {
                  var Me = ye[re];
                  if (Me.visible) {
                    var De = Y.r2l(Me[pe]);
                    de[0][K] = Math.min(de[0][K], De), de[1][K] = Math.max(de[1][K], De);
                  }
                }
                if ("rangemode" in Y && Y.rangemode === "tozero" && (de[0][K] = Math.min(de[0][K], 0), de[1][K] = Math.max(de[1][K], 0)), de[0][K] > de[1][K]) de[0][K] = -1, de[1][K] = 1;
                else {
                  var Le = de[1][K] - de[0][K];
                  de[0][K] -= Le / 32, de[1][K] += Le / 32;
                }
                if (se = [de[0][K], de[1][K]], se = L(se, Y), de[0][K] = se[0], de[1][K] = se[1], Y.isReversed()) {
                  var We = de[0][K];
                  de[0][K] = de[1][K], de[1][K] = We;
                }
              } else se = Y.range, de[0][K] = Y.r2l(se[0]), de[1][K] = Y.r2l(se[1]);
              de[0][K] === de[1][K] && (de[0][K] -= 1, de[1][K] += 1), ne[K] = de[1][K] - de[0][K], Y.range = [de[0][K], de[1][K]], Y.limitRange(), V.glplot.setBounds(K, { min: Y.range[0] * ue[K], max: Y.range[1] * ue[K] });
            }
            var Ee = ee.aspectmode;
            if (Ee === "cube") he = [1, 1, 1];
            else if (Ee === "manual") {
              var Ne = ee.aspectratio;
              he = [Ne.x, Ne.y, Ne.z];
            } else {
              if (Ee !== "auto" && Ee !== "data") throw new Error("scene.js aspectRatio was not one of the enumerated types");
              var Ie = [1, 1, 1];
              for (K = 0; K < 3; ++K) {
                var ge = ae[te = (Y = ee[O[K]]).type];
                Ie[K] = Math.pow(ge.acc, 1 / ge.count) / ue[K];
              }
              he = Ee === "data" || Math.max.apply(null, Ie) / Math.min.apply(null, Ie) <= 4 ? Ie : [1, 1, 1];
            }
            ee.aspectratio.x = X.aspectratio.x = he[0], ee.aspectratio.y = X.aspectratio.y = he[1], ee.aspectratio.z = X.aspectratio.z = he[2], V.glplot.setAspectratio(ee.aspectratio), V.viewInitial.aspectratio || (V.viewInitial.aspectratio = { x: ee.aspectratio.x, y: ee.aspectratio.y, z: ee.aspectratio.z }), V.viewInitial.aspectmode || (V.viewInitial.aspectmode = ee.aspectmode);
            var Ce = ee.domain || null, we = F._size || null;
            if (Ce && we) {
              var Ge = V.container.style;
              Ge.position = "absolute", Ge.left = we.l + Ce.x[0] * we.w + "px", Ge.top = we.t + (1 - Ce.y[1]) * we.h + "px", Ge.width = we.w * (Ce.x[1] - Ce.x[0]) + "px", Ge.height = we.h * (Ce.y[1] - Ce.y[0]) + "px";
            }
            V.glplot.redraw();
          }
        }, I.destroy = function() {
          var z = this;
          z.glplot && (z.camera.mouseListener.enabled = !1, z.container.removeEventListener("wheel", z.camera.wheelListener), z.camera = null, z.glplot.dispose(), z.container.parentNode.removeChild(z.container), z.glplot = null);
        }, I.getCamera = function() {
          var z, F = this;
          return F.camera.view.recalcMatrix(F.camera.view.lastT()), { up: { x: (z = F.camera).up[0], y: z.up[1], z: z.up[2] }, center: { x: z.center[0], y: z.center[1], z: z.center[2] }, eye: { x: z.eye[0], y: z.eye[1], z: z.eye[2] }, projection: { type: z._ortho === !0 ? "orthographic" : "perspective" } };
        }, I.setViewport = function(z) {
          var F, U = this, V = z.camera;
          U.camera.lookAt.apply(this, [[(F = V).eye.x, F.eye.y, F.eye.z], [F.center.x, F.center.y, F.center.z], [F.up.x, F.up.y, F.up.z]]), U.glplot.setAspectratio(z.aspectratio), V.projection.type === "orthographic" !== U.camera._ortho && (U.glplot.redraw(), U.glplot.clearRGBA(), U.glplot.dispose(), U.initializeGLPlot());
        }, I.isCameraChanged = function(z) {
          var F = this.getCamera(), U = c.nestedProperty(z, this.id + ".camera").get();
          function V(re, Y, te, ee) {
            var X = ["up", "center", "eye"], Q = ["x", "y", "z"];
            return Y[X[te]] && re[X[te]][Q[ee]] === Y[X[te]][Q[ee]];
          }
          var $ = !1;
          if (U === void 0) $ = !0;
          else {
            for (var q = 0; q < 3; q++) for (var K = 0; K < 3; K++) if (!V(F, U, q, K)) {
              $ = !0;
              break;
            }
            (!U.projection || F.projection && F.projection.type !== U.projection.type) && ($ = !0);
          }
          return $;
        }, I.isAspectChanged = function(z) {
          var F = this.glplot.getAspectratio(), U = c.nestedProperty(z, this.id + ".aspectratio").get();
          return U === void 0 || U.x !== F.x || U.y !== F.y || U.z !== F.z;
        }, I.saveLayout = function(z) {
          var F, U, V, $, q, K, re = this, Y = re.fullLayout, te = re.isCameraChanged(z), ee = re.isAspectChanged(z), X = te || ee;
          if (X) {
            var Q = {};
            te && (F = re.getCamera(), V = (U = c.nestedProperty(z, re.id + ".camera")).get(), Q[re.id + ".camera"] = V), ee && ($ = re.glplot.getAspectratio(), K = (q = c.nestedProperty(z, re.id + ".aspectratio")).get(), Q[re.id + ".aspectratio"] = K), f.call("_storeDirectGUIEdit", z, Y._preGUI, Q), te && (U.set(F), c.nestedProperty(Y, re.id + ".camera").set(F)), ee && (q.set($), c.nestedProperty(Y, re.id + ".aspectratio").set($), re.glplot.redraw());
          }
          return X;
        }, I.updateFx = function(z, F) {
          var U = this, V = U.camera;
          if (V) if (z === "orbit") V.mode = "orbit", V.keyBindingMode = "rotate";
          else if (z === "turntable") {
            V.up = [0, 0, 1], V.mode = "turntable", V.keyBindingMode = "rotate";
            var $ = U.graphDiv, q = $._fullLayout, K = U.fullSceneLayout.camera, re = K.up.x, Y = K.up.y, te = K.up.z;
            if (te / Math.sqrt(re * re + Y * Y + te * te) < 0.999) {
              var ee = U.id + ".camera.up", X = { x: 0, y: 0, z: 1 }, Q = {};
              Q[ee] = X;
              var ue = $.layout;
              f.call("_storeDirectGUIEdit", ue, q._preGUI, Q), K.up = X, c.nestedProperty(ue, ee).set(X);
            }
          } else V.keyBindingMode = z;
          U.fullSceneLayout.hovermode = F;
        }, I.toImage = function(z) {
          var F = this;
          z || (z = "png"), F.staticMode && F.container.appendChild(l), F.glplot.redraw();
          var U = F.glplot.gl, V = U.drawingBufferWidth, $ = U.drawingBufferHeight;
          U.bindFramebuffer(U.FRAMEBUFFER, null);
          var q = new Uint8Array(V * $ * 4);
          U.readPixels(0, 0, V, $, U.RGBA, U.UNSIGNED_BYTE, q), function(ee, X, Q) {
            for (var ue = 0, ce = Q - 1; ue < ce; ++ue, --ce) for (var he = 0; he < X; ++he) for (var de = 0; de < 4; ++de) {
              var ne = 4 * (X * ue + he) + de, ae = 4 * (X * ce + he) + de, se = ee[ne];
              ee[ne] = ee[ae], ee[ae] = se;
            }
          }(q, V, $), function(ee, X, Q) {
            for (var ue = 0; ue < Q; ++ue) for (var ce = 0; ce < X; ++ce) {
              var he = 4 * (X * ue + ce), de = ee[he + 3];
              if (de > 0) for (var ne = 255 / de, ae = 0; ae < 3; ++ae) ee[he + ae] = Math.min(ne * ee[he + ae], 255);
            }
          }(q, V, $);
          var K = document.createElement("canvas");
          K.width = V, K.height = $;
          var re, Y = K.getContext("2d", { willReadFrequently: !0 }), te = Y.createImageData(V, $);
          switch (te.data.set(q), Y.putImageData(te, 0, 0), z) {
            case "jpeg":
              re = K.toDataURL("image/jpeg");
              break;
            case "webp":
              re = K.toDataURL("image/webp");
              break;
            default:
              re = K.toDataURL("image/png");
          }
          return F.staticMode && F.container.removeChild(l), re;
        }, I.setConvert = function() {
          for (var z = 0; z < 3; z++) {
            var F = this.fullSceneLayout[O[z]];
            m.setConvert(F, this.fullLayout), F.setScale = c.noop;
          }
        }, I.make4thDimension = function() {
          var z = this, F = z.graphDiv._fullLayout;
          z._mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, m.setConvert(z._mockAxis, F);
        }, o.exports = P;
      }, 88239: function(o) {
        o.exports = function(s, n, l, u) {
          u = u || s.length;
          for (var i = new Array(u), h = 0; h < u; h++) i[h] = [s[h], n[h], l[h]];
          return i;
        };
      }, 6704: function(o, s, n) {
        var l = n(80337), u = n(49722), i = n(10229), h = n(64101), p = n(52307), _ = n(57891), d = n(93049).extendFlat, f = l({ editType: "calc" });
        f.family.dflt = '"Open Sans", verdana, arial, sans-serif', f.size.dflt = 12, f.color.dflt = i.defaultLine, o.exports = { font: f, title: { text: { valType: "string", editType: "layoutstyle" }, font: l({ editType: "layoutstyle" }), subtitle: { text: { valType: "string", editType: "layoutstyle" }, font: l({ editType: "layoutstyle" }), editType: "layoutstyle" }, xref: { valType: "enumerated", dflt: "container", values: ["container", "paper"], editType: "layoutstyle" }, yref: { valType: "enumerated", dflt: "container", values: ["container", "paper"], editType: "layoutstyle" }, x: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "layoutstyle" }, y: { valType: "number", min: 0, max: 1, dflt: "auto", editType: "layoutstyle" }, xanchor: { valType: "enumerated", dflt: "auto", values: ["auto", "left", "center", "right"], editType: "layoutstyle" }, yanchor: { valType: "enumerated", dflt: "auto", values: ["auto", "top", "middle", "bottom"], editType: "layoutstyle" }, pad: d(_({ editType: "layoutstyle" }), {}), automargin: { valType: "boolean", dflt: !1, editType: "plot" }, editType: "layoutstyle" }, uniformtext: { mode: { valType: "enumerated", values: [!1, "hide", "show"], dflt: !1, editType: "plot" }, minsize: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "plot" }, autosize: { valType: "boolean", dflt: !1, editType: "none" }, width: { valType: "number", min: 10, dflt: 700, editType: "plot" }, height: { valType: "number", min: 10, dflt: 450, editType: "plot" }, minreducedwidth: { valType: "number", min: 2, dflt: 64, editType: "plot" }, minreducedheight: { valType: "number", min: 2, dflt: 64, editType: "plot" }, margin: { l: { valType: "number", min: 0, dflt: 80, editType: "plot" }, r: { valType: "number", min: 0, dflt: 80, editType: "plot" }, t: { valType: "number", min: 0, dflt: 100, editType: "plot" }, b: { valType: "number", min: 0, dflt: 80, editType: "plot" }, pad: { valType: "number", min: 0, dflt: 0, editType: "plot" }, autoexpand: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, computed: { valType: "any", editType: "none" }, paper_bgcolor: { valType: "color", dflt: i.background, editType: "plot" }, plot_bgcolor: { valType: "color", dflt: i.background, editType: "layoutstyle" }, autotypenumbers: { valType: "enumerated", values: ["convert types", "strict"], dflt: "convert types", editType: "calc" }, separators: { valType: "string", editType: "plot" }, hidesources: { valType: "boolean", dflt: !1, editType: "plot" }, showlegend: { valType: "boolean", editType: "legend" }, colorway: { valType: "colorlist", dflt: i.defaults, editType: "calc" }, datarevision: { valType: "any", editType: "calc" }, uirevision: { valType: "any", editType: "none" }, editrevision: { valType: "any", editType: "none" }, selectionrevision: { valType: "any", editType: "none" }, template: { valType: "any", editType: "calc" }, newshape: h.newshape, activeshape: h.activeshape, newselection: p.newselection, activeselection: p.activeselection, meta: { valType: "any", arrayOk: !0, editType: "plot" }, transition: d({}, u.transition, { editType: "none" }), _deprecated: { title: { valType: "string", editType: "layoutstyle" }, titlefont: l({ editType: "layoutstyle" }) } };
      }, 8814: function(o, s, n) {
        var l = n(62994), u = n(37071), i = "https://basemaps.cartocdn.com/gl/positron-gl-style/style.json", h = "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json", p = "https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json", _ = { basic: p, streets: p, outdoors: p, light: i, dark: h, satellite: n(51962), "satellite-streets": u, "open-street-map": { id: "osm", version: 8, sources: { "plotly-osm-tiles": { type: "raster", attribution: '© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', tiles: ["https://tile.openstreetmap.org/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-osm-tiles", type: "raster", source: "plotly-osm-tiles", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "white-bg": { id: "white-bg", version: 8, sources: {}, layers: [{ id: "white-bg", type: "background", paint: { "background-color": "#FFFFFF" }, minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "carto-positron": i, "carto-darkmatter": h, "carto-voyager": p, "carto-positron-nolabels": "https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json", "carto-darkmatter-nolabels": "https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json", "carto-voyager-nolabels": "https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json" }, d = l(_);
        o.exports = { styleValueDflt: "basic", stylesMap: _, styleValuesMap: d, traceLayerPrefix: "plotly-trace-layer-", layoutLayerPrefix: "plotly-layout-layer-", missingStyleErrorMsg: ["No valid maplibre style found, please set `map.style` to one of:", d.join(", "), "or use a tile service."].join(`
`), mapOnErrorMsg: "Map error." };
      }, 4657: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          var h = u.split(" "), p = h[0], _ = h[1], d = l.isArrayOrTypedArray(i) ? l.mean(i) : i, f = 0.5 + d / 100, c = 1.5 + d / 100, g = ["", ""], m = [0, 0];
          switch (p) {
            case "top":
              g[0] = "top", m[1] = -c;
              break;
            case "bottom":
              g[0] = "bottom", m[1] = c;
          }
          switch (_) {
            case "left":
              g[1] = "right", m[0] = -f;
              break;
            case "right":
              g[1] = "left", m[0] = f;
          }
          return { anchor: g[0] && g[1] ? g.join("-") : g[0] ? g[0] : g[1] ? g[1] : "center", offset: m };
        };
      }, 34091: function(o, s, n) {
        var l = n(34809), u = l.strTranslate, i = l.strScale, h = n(4173).fX, p = n(62972), _ = n(45568), d = n(62203), f = n(30635), c = n(38793), g = "map";
        s.name = g, s.attr = "subplot", s.idRoot = g, s.idRegex = s.attrRegex = l.counterRegex(g), s.attributes = { subplot: { valType: "subplotid", dflt: "map", editType: "calc" } }, s.layoutAttributes = n(8257), s.supplyLayoutDefaults = n(97446), s.plot = function(m) {
          for (var x = m._fullLayout, w = m.calcdata, k = x._subplots[g], S = 0; S < k.length; S++) {
            var A = k[S], C = h(w, g, A), D = x[A], L = D._subplot;
            L || (L = new c(m, A), x[A]._subplot = L), L.viewInitial || (L.viewInitial = { center: l.extendFlat({}, D.center), zoom: D.zoom, bearing: D.bearing, pitch: D.pitch }), L.plot(C, x, m._promises);
          }
        }, s.clean = function(m, x, w, k) {
          for (var S = k._subplots[g] || [], A = 0; A < S.length; A++) {
            var C = S[A];
            !x[C] && k[C]._subplot && k[C]._subplot.destroy();
          }
        }, s.toSVG = function(m) {
          for (var x = m._fullLayout, w = x._subplots[g], k = x._size, S = 0; S < w.length; S++) {
            var A = x[w[S]], C = A.domain, D = A._subplot.toImage("png");
            x._glimages.append("svg:image").attr({ xmlns: p.svg, "xlink:href": D, x: k.l + k.w * C.x[0], y: k.t + k.h * (1 - C.y[1]), width: k.w * (C.x[1] - C.x[0]), height: k.h * (C.y[1] - C.y[0]), preserveAspectRatio: "none" });
            var L = _.select(A._subplot.div).select(".maplibregl-ctrl-attrib").text().replace("Improve this map", ""), E = x._glimages.append("g"), P = E.append("text");
            P.text(L).classed("static-attribution", !0).attr({ "font-size": 12, "font-family": "Arial", color: "rgba(0, 0, 0, 0.75)", "text-anchor": "end", "data-unformatted": L });
            var I = d.bBox(P.node()), M = k.w * (C.x[1] - C.x[0]);
            if (I.width > M / 2) {
              var O = L.split("|").join("<br>");
              P.text(O).attr("data-unformatted", O).call(f.convertToTspans, m), I = d.bBox(P.node());
            }
            P.attr("transform", u(-3, 8 - I.height)), E.insert("rect", ".static-attribution").attr({ x: -I.width - 6, y: -I.height - 3, width: I.width + 6, height: I.height + 3, fill: "rgba(255, 255, 255, 0.75)" });
            var T = 1;
            I.width + 6 > M && (T = M / (I.width + 6));
            var z = [k.l + k.w * C.x[1], k.t + k.h * (1 - C.y[0])];
            E.attr("transform", u(z[0], z[1]) + i(T));
          }
        }, s.updateFx = function(m) {
          for (var x = m._fullLayout, w = x._subplots[g], k = 0; k < w.length; k++) x[w[k]]._subplot.updateFx(x);
        };
      }, 33389: function(o, s, n) {
        var l = n(34809), u = n(30635).sanitizeHTML, i = n(4657), h = n(8814);
        function p(c, g) {
          this.subplot = c, this.uid = c.uid + "-" + g, this.index = g, this.idSource = "source-" + this.uid, this.idLayer = h.layoutLayerPrefix + this.uid, this.sourceType = null, this.source = null, this.layerType = null, this.below = null, this.visible = !1;
        }
        var _ = p.prototype;
        function d(c) {
          if (!c.visible) return !1;
          var g = c.source;
          if (Array.isArray(g) && g.length > 0) {
            for (var m = 0; m < g.length; m++) if (typeof g[m] != "string" || g[m].length === 0) return !1;
            return !0;
          }
          return l.isPlainObject(g) || typeof g == "string" && g.length > 0;
        }
        function f(c) {
          var g = {}, m = {};
          switch (c.type) {
            case "circle":
              l.extendFlat(m, { "circle-radius": c.circle.radius, "circle-color": c.color, "circle-opacity": c.opacity });
              break;
            case "line":
              l.extendFlat(m, { "line-width": c.line.width, "line-color": c.color, "line-opacity": c.opacity, "line-dasharray": c.line.dash });
              break;
            case "fill":
              l.extendFlat(m, { "fill-color": c.color, "fill-outline-color": c.fill.outlinecolor, "fill-opacity": c.opacity });
              break;
            case "symbol":
              var x = c.symbol, w = i(x.textposition, x.iconsize);
              l.extendFlat(g, { "icon-image": x.icon + "-15", "icon-size": x.iconsize / 10, "text-field": x.text, "text-size": x.textfont.size, "text-anchor": w.anchor, "text-offset": w.offset, "symbol-placement": x.placement }), l.extendFlat(m, { "icon-color": c.color, "text-color": x.textfont.color, "text-opacity": c.opacity });
              break;
            case "raster":
              l.extendFlat(m, { "raster-fade-duration": 0, "raster-opacity": c.opacity });
          }
          return { layout: g, paint: m };
        }
        _.update = function(c) {
          this.visible ? this.needsNewImage(c) ? this.updateImage(c) : this.needsNewSource(c) ? (this.removeLayer(), this.updateSource(c), this.updateLayer(c)) : this.needsNewLayer(c) ? this.updateLayer(c) : this.updateStyle(c) : (this.updateSource(c), this.updateLayer(c)), this.visible = d(c);
        }, _.needsNewImage = function(c) {
          return this.subplot.map.getSource(this.idSource) && this.sourceType === "image" && c.sourcetype === "image" && (this.source !== c.source || JSON.stringify(this.coordinates) !== JSON.stringify(c.coordinates));
        }, _.needsNewSource = function(c) {
          return this.sourceType !== c.sourcetype || JSON.stringify(this.source) !== JSON.stringify(c.source) || this.layerType !== c.type;
        }, _.needsNewLayer = function(c) {
          return this.layerType !== c.type || this.below !== this.subplot.belowLookup["layout-" + this.index];
        }, _.lookupBelow = function() {
          return this.subplot.belowLookup["layout-" + this.index];
        }, _.updateImage = function(c) {
          this.subplot.map.getSource(this.idSource).updateImage({ url: c.source, coordinates: c.coordinates });
          var g = this.findFollowingMapLayerId(this.lookupBelow());
          g !== null && this.subplot.map.moveLayer(this.idLayer, g);
        }, _.updateSource = function(c) {
          var g = this.subplot.map;
          if (g.getSource(this.idSource) && g.removeSource(this.idSource), this.sourceType = c.sourcetype, this.source = c.source, d(c)) {
            var m = function(x) {
              var w, k = x.sourcetype, S = x.source, A = { type: k };
              return k === "geojson" ? w = "data" : k === "vector" ? w = typeof S == "string" ? "url" : "tiles" : k === "raster" ? (w = "tiles", A.tileSize = 256) : k === "image" && (w = "url", A.coordinates = x.coordinates), A[w] = S, x.sourceattribution && (A.attribution = u(x.sourceattribution)), A;
            }(c);
            g.addSource(this.idSource, m);
          }
        }, _.findFollowingMapLayerId = function(c) {
          if (c === "traces") for (var g = this.subplot.getMapLayers(), m = 0; m < g.length; m++) {
            var x = g[m].id;
            if (typeof x == "string" && x.indexOf(h.traceLayerPrefix) === 0) {
              c = x;
              break;
            }
          }
          return c;
        }, _.updateLayer = function(c) {
          var g = this.subplot, m = f(c), x = this.lookupBelow(), w = this.findFollowingMapLayerId(x);
          this.removeLayer(), d(c) && g.addLayer({ id: this.idLayer, source: this.idSource, "source-layer": c.sourcelayer || "", type: c.type, minzoom: c.minzoom, maxzoom: c.maxzoom, layout: m.layout, paint: m.paint }, w), this.layerType = c.type, this.below = x;
        }, _.updateStyle = function(c) {
          if (d(c)) {
            var g = f(c);
            this.subplot.setOptions(this.idLayer, "setLayoutProperty", g.layout), this.subplot.setOptions(this.idLayer, "setPaintProperty", g.paint);
          }
        }, _.removeLayer = function() {
          var c = this.subplot.map;
          c.getLayer(this.idLayer) && c.removeLayer(this.idLayer);
        }, _.dispose = function() {
          var c = this.subplot.map;
          c.getLayer(this.idLayer) && c.removeLayer(this.idLayer), c.getSource(this.idSource) && c.removeSource(this.idSource);
        }, o.exports = function(c, g, m) {
          var x = new p(c, g);
          return x.update(m), x;
        };
      }, 8257: function(o, s, n) {
        var l = n(34809), u = n(78766).defaultLine, i = n(13792).u, h = n(80337), p = n(36640).textposition, _ = n(13582).overrideAll, d = n(78032).templatedArray, f = n(8814), c = h({ noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 });
        c.family.dflt = "Open Sans Regular, Arial Unicode MS Regular", (o.exports = _({ _arrayAttrRegexps: [l.counterRegex("map", ".layers", !0)], domain: i({ name: "map" }), style: { valType: "any", values: f.styleValuesMap, dflt: f.styleValueDflt }, center: { lon: { valType: "number", dflt: 0 }, lat: { valType: "number", dflt: 0 } }, zoom: { valType: "number", dflt: 1 }, bearing: { valType: "number", dflt: 0 }, pitch: { valType: "number", dflt: 0 }, bounds: { west: { valType: "number" }, east: { valType: "number" }, south: { valType: "number" }, north: { valType: "number" } }, layers: d("layer", { visible: { valType: "boolean", dflt: !0 }, sourcetype: { valType: "enumerated", values: ["geojson", "vector", "raster", "image"], dflt: "geojson" }, source: { valType: "any" }, sourcelayer: { valType: "string", dflt: "" }, sourceattribution: { valType: "string" }, type: { valType: "enumerated", values: ["circle", "line", "fill", "symbol", "raster"], dflt: "circle" }, coordinates: { valType: "any" }, below: { valType: "string" }, color: { valType: "color", dflt: u }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, minzoom: { valType: "number", min: 0, max: 24, dflt: 0 }, maxzoom: { valType: "number", min: 0, max: 24, dflt: 24 }, circle: { radius: { valType: "number", dflt: 15 } }, line: { width: { valType: "number", dflt: 2 }, dash: { valType: "data_array" } }, fill: { outlinecolor: { valType: "color", dflt: u } }, symbol: { icon: { valType: "string", dflt: "marker" }, iconsize: { valType: "number", dflt: 10 }, text: { valType: "string", dflt: "" }, placement: { valType: "enumerated", values: ["point", "line", "line-center"], dflt: "point" }, textfont: c, textposition: l.extendFlat({}, p, { arrayOk: !1 }) } }) }, "plot", "from-root")).uirevision = { valType: "any", editType: "none" };
      }, 97446: function(o, s, n) {
        var l = n(34809), u = n(4448), i = n(59008), h = n(8257);
        function p(d, f, c) {
          c("style"), c("center.lon"), c("center.lat"), c("zoom"), c("bearing"), c("pitch");
          var g = c("bounds.west"), m = c("bounds.east"), x = c("bounds.south"), w = c("bounds.north");
          g !== void 0 && m !== void 0 && x !== void 0 && w !== void 0 || delete f.bounds, i(d, f, { name: "layers", handleItemDefaults: _ }), f._input = d;
        }
        function _(d, f) {
          function c(k, S) {
            return l.coerce(d, f, h.layers, k, S);
          }
          if (c("visible")) {
            var g, m = c("sourcetype"), x = m === "raster" || m === "image";
            c("source"), c("sourceattribution"), m === "vector" && c("sourcelayer"), m === "image" && c("coordinates"), x && (g = "raster");
            var w = c("type", g);
            x && w !== "raster" && (w = f.type = "raster", l.log("Source types *raster* and *image* must drawn *raster* layer type.")), c("below"), c("color"), c("opacity"), c("minzoom"), c("maxzoom"), w === "circle" && c("circle.radius"), w === "line" && (c("line.width"), c("line.dash")), w === "fill" && c("fill.outlinecolor"), w === "symbol" && (c("symbol.icon"), c("symbol.iconsize"), c("symbol.text"), l.coerceFont(c, "symbol.textfont", void 0, { noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 }), c("symbol.textposition"), c("symbol.placement"));
          }
        }
        o.exports = function(d, f, c) {
          u(d, f, c, { type: "map", attributes: h, handleDefaults: p, partition: "y" });
        };
      }, 38793: function(o, s, n) {
        var l = n(89380), u = n(34809), i = n(3994), h = n(33626), p = n(29714), _ = n(14751), d = n(32141), f = n(70414), c = f.drawMode, g = f.selectMode, m = n(44844).prepSelect, x = n(44844).clearOutline, w = n(44844).clearSelectionsCache, k = n(44844).selectOnClick, S = n(8814), A = n(33389);
        function C(I, M) {
          this.id = M, this.gd = I;
          var O = I._fullLayout, T = I._context;
          this.container = O._glcontainer.node(), this.isStatic = T.staticPlot, this.uid = O._uid + "-" + this.id, this.div = null, this.xaxis = null, this.yaxis = null, this.createFramework(O), this.map = null, this.styleObj = null, this.traceHash = {}, this.layerList = [], this.belowLookup = {}, this.dragging = !1, this.wheeling = !1;
        }
        var D = C.prototype;
        D.plot = function(I, M, O) {
          var T, z = this;
          T = z.map ? new Promise(function(F, U) {
            z.updateMap(I, M, F, U);
          }) : new Promise(function(F, U) {
            z.createMap(I, M, F, U);
          }), O.push(T);
        }, D.createMap = function(I, M, O, T) {
          var z = this, F = M[z.id], U = z.styleObj = E(F.style), V = F.bounds, $ = V ? [[V.west, V.south], [V.east, V.north]] : null, q = z.map = new l.Map({ container: z.div, style: U.style, center: P(F.center), zoom: F.zoom, bearing: F.bearing, pitch: F.pitch, maxBounds: $, interactive: !z.isStatic, preserveDrawingBuffer: z.isStatic, doubleClickZoom: !1, boxZoom: !1, attributionControl: !1 }).addControl(new l.AttributionControl({ compact: !0 })), K = {};
          q.on("styleimagemissing", function(Y) {
            var te = Y.id;
            if (!K[te] && te.includes("-15")) {
              K[te] = !0;
              var ee = new Image(15, 15);
              ee.onload = function() {
                q.addImage(te, ee);
              }, ee.crossOrigin = "Anonymous", ee.src = "https://unpkg.com/maki@2.1.0/icons/" + te + ".svg";
            }
          }), q.setTransformRequest(function(Y) {
            return { url: Y = (Y = (Y = Y.replace("https://fonts.openmaptiles.org/Open Sans Extrabold", "https://fonts.openmaptiles.org/Open Sans Extra Bold")).replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold", "https://fonts.openmaptiles.org/Open Sans Extra Bold")).replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular", "https://fonts.openmaptiles.org/Klokantech Noto Sans Regular") };
          }), q._canvas.style.left = "0px", q._canvas.style.top = "0px", z.rejectOnError(T), z.isStatic || z.initFx(I, M);
          var re = [];
          re.push(new Promise(function(Y) {
            q.once("load", Y);
          })), re = re.concat(i.fetchTraceGeoData(I)), Promise.all(re).then(function() {
            z.fillBelowLookup(I, M), z.updateData(I), z.updateLayout(M), z.resolveOnRender(O);
          }).catch(T);
        }, D.updateMap = function(I, M, O, T) {
          var z = this, F = z.map, U = M[this.id];
          z.rejectOnError(T);
          var V = [], $ = E(U.style);
          JSON.stringify(z.styleObj) !== JSON.stringify($) && (z.styleObj = $, F.setStyle($.style), z.traceHash = {}, V.push(new Promise(function(q) {
            F.once("styledata", q);
          }))), V = V.concat(i.fetchTraceGeoData(I)), Promise.all(V).then(function() {
            z.fillBelowLookup(I, M), z.updateData(I), z.updateLayout(M), z.resolveOnRender(O);
          }).catch(T);
        }, D.fillBelowLookup = function(I, M) {
          var O, T, z = M[this.id].layers, F = this.belowLookup = {}, U = !1;
          for (O = 0; O < I.length; O++) {
            var V = I[O][0].trace, $ = V._module;
            typeof V.below == "string" ? T = V.below : $.getBelow && (T = $.getBelow(V, this)), T === "" && (U = !0), F["trace-" + V.uid] = T || "";
          }
          for (O = 0; O < z.length; O++) {
            var q = z[O];
            T = typeof q.below == "string" ? q.below : U ? "traces" : "", F["layout-" + O] = T;
          }
          var K, re, Y = {};
          for (K in F) Y[T = F[K]] ? Y[T].push(K) : Y[T] = [K];
          for (T in Y) {
            var te = Y[T];
            if (te.length > 1) for (O = 0; O < te.length; O++) (K = te[O]).indexOf("trace-") === 0 ? (re = K.split("trace-")[1], this.traceHash[re] && (this.traceHash[re].below = null)) : K.indexOf("layout-") === 0 && (re = K.split("layout-")[1], this.layerList[re] && (this.layerList[re].below = null));
          }
        };
        var L = { choroplethmap: 0, densitymap: 1, scattermap: 2 };
        function E(I) {
          var M = {};
          return u.isPlainObject(I) ? (M.id = I.id, M.style = I) : typeof I == "string" ? (M.id = I, S.stylesMap[I] ? M.style = S.stylesMap[I] : M.style = I) : (M.id = S.styleValueDflt, M.style = function(O) {
            return S.styleUrlPrefix + O + "-" + S.styleUrlSuffix;
          }(S.styleValueDflt)), M.transition = { duration: 0, delay: 0 }, M;
        }
        function P(I) {
          return [I.lon, I.lat];
        }
        D.updateData = function(I) {
          var M, O, T, z, F = this.traceHash, U = I.slice().sort(function(re, Y) {
            return L[re[0].trace.type] - L[Y[0].trace.type];
          });
          for (T = 0; T < U.length; T++) {
            var V = U[T], $ = !1;
            (M = F[(O = V[0].trace).uid]) && (M.type === O.type ? (M.update(V), $ = !0) : M.dispose()), !$ && O._module && (F[O.uid] = O._module.plot(this, V));
          }
          var q = Object.keys(F);
          e: for (T = 0; T < q.length; T++) {
            var K = q[T];
            for (z = 0; z < I.length; z++) if (K === (O = I[z][0].trace).uid) continue e;
            (M = F[K]).dispose(), delete F[K];
          }
        }, D.updateLayout = function(I) {
          var M = this.map, O = I[this.id];
          this.dragging || this.wheeling || (M.setCenter(P(O.center)), M.setZoom(O.zoom), M.setBearing(O.bearing), M.setPitch(O.pitch)), this.updateLayers(I), this.updateFramework(I), this.updateFx(I), this.map.resize(), this.gd._context._scrollZoom.map ? M.scrollZoom.enable() : M.scrollZoom.disable();
        }, D.resolveOnRender = function(I) {
          var M = this.map;
          M.on("render", function O() {
            M.loaded() && (M.off("render", O), setTimeout(I, 10));
          });
        }, D.rejectOnError = function(I) {
          var M = this.map;
          function O() {
            I(new Error(S.mapOnErrorMsg));
          }
          M.once("error", O), M.once("style.error", O), M.once("source.error", O), M.once("tile.error", O), M.once("layer.error", O);
        }, D.createFramework = function(I) {
          var M = this, O = M.div = document.createElement("div");
          O.id = M.uid, O.style.position = "absolute", M.container.appendChild(O), M.xaxis = { _id: "x", c2p: function(T) {
            return M.project(T).x;
          } }, M.yaxis = { _id: "y", c2p: function(T) {
            return M.project(T).y;
          } }, M.updateFramework(I), M.mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, p.setConvert(M.mockAxis, I);
        }, D.initFx = function(I, M) {
          var O = this, T = O.gd, z = O.map;
          function F() {
            d.loneUnhover(M._hoverlayer);
          }
          function U() {
            var V = O.getView();
            T.emit("plotly_relayouting", O.getViewEditsWithDerived(V));
          }
          z.on("moveend", function(V) {
            if (O.map) {
              var $ = T._fullLayout;
              if (V.originalEvent || O.wheeling) {
                var q = $[O.id];
                h.call("_storeDirectGUIEdit", T.layout, $._preGUI, O.getViewEdits(q));
                var K = O.getView();
                q._input.center = q.center = K.center, q._input.zoom = q.zoom = K.zoom, q._input.bearing = q.bearing = K.bearing, q._input.pitch = q.pitch = K.pitch, T.emit("plotly_relayout", O.getViewEditsWithDerived(K));
              }
              V.originalEvent && V.originalEvent.type === "mouseup" ? O.dragging = !1 : O.wheeling && (O.wheeling = !1), $ && $._rehover && $._rehover();
            }
          }), z.on("wheel", function() {
            O.wheeling = !0;
          }), z.on("mousemove", function(V) {
            var $ = O.div.getBoundingClientRect(), q = [V.originalEvent.offsetX, V.originalEvent.offsetY];
            V.target.getBoundingClientRect = function() {
              return $;
            }, O.xaxis.p2c = function() {
              return z.unproject(q).lng;
            }, O.yaxis.p2c = function() {
              return z.unproject(q).lat;
            }, T._fullLayout._rehover = function() {
              T._fullLayout._hoversubplot === O.id && T._fullLayout[O.id] && d.hover(T, V, O.id);
            }, d.hover(T, V, O.id), T._fullLayout._hoversubplot = O.id;
          }), z.on("dragstart", function() {
            O.dragging = !0, F();
          }), z.on("zoomstart", F), z.on("mouseout", function() {
            T._fullLayout._hoversubplot = null;
          }), z.on("drag", U), z.on("zoom", U), z.on("dblclick", function() {
            var V = T._fullLayout[O.id];
            h.call("_storeDirectGUIEdit", T.layout, T._fullLayout._preGUI, O.getViewEdits(V));
            var $ = O.viewInitial;
            z.setCenter(P($.center)), z.setZoom($.zoom), z.setBearing($.bearing), z.setPitch($.pitch);
            var q = O.getView();
            V._input.center = V.center = q.center, V._input.zoom = V.zoom = q.zoom, V._input.bearing = V.bearing = q.bearing, V._input.pitch = V.pitch = q.pitch, T.emit("plotly_doubleclick", null), T.emit("plotly_relayout", O.getViewEditsWithDerived(q));
          }), O.clearOutline = function() {
            w(O.dragOptions), x(O.dragOptions.gd);
          }, O.onClickInPanFn = function(V) {
            return function($) {
              var q = T._fullLayout.clickmode;
              q.indexOf("select") > -1 && k($.originalEvent, T, [O.xaxis], [O.yaxis], O.id, V), q.indexOf("event") > -1 && d.click(T, $.originalEvent);
            };
          };
        }, D.updateFx = function(I) {
          var M = this, O = M.map, T = M.gd;
          if (!M.isStatic) {
            var z, F = I.dragmode;
            z = function($, q) {
              q.isRect ? ($.range = {})[M.id] = [V([q.xmin, q.ymin]), V([q.xmax, q.ymax])] : ($.lassoPoints = {})[M.id] = q.map(V);
            };
            var U = M.dragOptions;
            M.dragOptions = u.extendDeep(U || {}, { dragmode: I.dragmode, element: M.div, gd: T, plotinfo: { id: M.id, domain: I[M.id].domain, xaxis: M.xaxis, yaxis: M.yaxis, fillRangeItems: z }, xaxes: [M.xaxis], yaxes: [M.yaxis], subplot: M.id }), O.off("click", M.onClickInPanHandler), g(F) || c(F) ? (O.dragPan.disable(), O.on("zoomstart", M.clearOutline), M.dragOptions.prepFn = function($, q, K) {
              m($, q, K, M.dragOptions, F);
            }, _.init(M.dragOptions)) : (O.dragPan.enable(), O.off("zoomstart", M.clearOutline), M.div.onmousedown = null, M.div.ontouchstart = null, M.div.removeEventListener("touchstart", M.div._ontouchstart), M.onClickInPanHandler = M.onClickInPanFn(M.dragOptions), O.on("click", M.onClickInPanHandler));
          }
          function V($) {
            var q = M.map.unproject($);
            return [q.lng, q.lat];
          }
        }, D.updateFramework = function(I) {
          var M = I[this.id].domain, O = I._size, T = this.div.style;
          T.width = O.w * (M.x[1] - M.x[0]) + "px", T.height = O.h * (M.y[1] - M.y[0]) + "px", T.left = O.l + M.x[0] * O.w + "px", T.top = O.t + (1 - M.y[1]) * O.h + "px", this.xaxis._offset = O.l + M.x[0] * O.w, this.xaxis._length = O.w * (M.x[1] - M.x[0]), this.yaxis._offset = O.t + (1 - M.y[1]) * O.h, this.yaxis._length = O.h * (M.y[1] - M.y[0]);
        }, D.updateLayers = function(I) {
          var M, O = I[this.id].layers, T = this.layerList;
          if (O.length !== T.length) {
            for (M = 0; M < T.length; M++) T[M].dispose();
            for (T = this.layerList = [], M = 0; M < O.length; M++) T.push(A(this, M, O[M]));
          } else for (M = 0; M < O.length; M++) T[M].update(O[M]);
        }, D.destroy = function() {
          this.map && (this.map.remove(), this.map = null, this.container.removeChild(this.div));
        }, D.toImage = function() {
          return this.map.stop(), this.map.getCanvas().toDataURL();
        }, D.setOptions = function(I, M, O) {
          for (var T in O) this.map[M](I, T, O[T]);
        }, D.getMapLayers = function() {
          return this.map.getStyle().layers;
        }, D.addLayer = function(I, M) {
          var O = this.map;
          if (typeof M == "string") {
            if (M === "") return void O.addLayer(I, M);
            for (var T = this.getMapLayers(), z = 0; z < T.length; z++) if (M === T[z].id) return void O.addLayer(I, M);
            u.warn(["Trying to add layer with *below* value", M, "referencing a layer that does not exist", "or that does not yet exist."].join(" "));
          }
          O.addLayer(I);
        }, D.project = function(I) {
          return this.map.project(new l.LngLat(I[0], I[1]));
        }, D.getView = function() {
          var I = this.map, M = I.getCenter(), O = { lon: M.lng, lat: M.lat }, T = I.getCanvas(), z = parseInt(T.style.width), F = parseInt(T.style.height);
          return { center: O, zoom: I.getZoom(), bearing: I.getBearing(), pitch: I.getPitch(), _derived: { coordinates: [I.unproject([0, 0]).toArray(), I.unproject([z, 0]).toArray(), I.unproject([z, F]).toArray(), I.unproject([0, F]).toArray()] } };
        }, D.getViewEdits = function(I) {
          for (var M = this.id, O = ["center", "zoom", "bearing", "pitch"], T = {}, z = 0; z < O.length; z++) {
            var F = O[z];
            T[M + "." + F] = I[F];
          }
          return T;
        }, D.getViewEditsWithDerived = function(I) {
          var M = this.id, O = this.getViewEdits(I);
          return O[M + "._derived"] = I._derived, O;
        }, o.exports = C;
      }, 44245: function(o, s, n) {
        var l = n(62994), u = "1.13.4", i = '© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', h = ['© <a target="_blank" href="https://carto.com/">Carto</a>', i].join(" "), p = ['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>', 'under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', "|", 'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors', 'under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "), _ = { "open-street-map": { id: "osm", version: 8, sources: { "plotly-osm-tiles": { type: "raster", attribution: i, tiles: ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png", "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-osm-tiles", type: "raster", source: "plotly-osm-tiles", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "white-bg": { id: "white-bg", version: 8, sources: {}, layers: [{ id: "white-bg", type: "background", paint: { "background-color": "#FFFFFF" }, minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "carto-positron": { id: "carto-positron", version: 8, sources: { "plotly-carto-positron": { type: "raster", attribution: h, tiles: ["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-carto-positron", type: "raster", source: "plotly-carto-positron", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "carto-darkmatter": { id: "carto-darkmatter", version: 8, sources: { "plotly-carto-darkmatter": { type: "raster", attribution: h, tiles: ["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"], tileSize: 256 } }, layers: [{ id: "plotly-carto-darkmatter", type: "raster", source: "plotly-carto-darkmatter", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "stamen-terrain": { id: "stamen-terrain", version: 8, sources: { "plotly-stamen-terrain": { type: "raster", attribution: p, tiles: ["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="], tileSize: 256 } }, layers: [{ id: "plotly-stamen-terrain", type: "raster", source: "plotly-stamen-terrain", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "stamen-toner": { id: "stamen-toner", version: 8, sources: { "plotly-stamen-toner": { type: "raster", attribution: p, tiles: ["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="], tileSize: 256 } }, layers: [{ id: "plotly-stamen-toner", type: "raster", source: "plotly-stamen-toner", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" }, "stamen-watercolor": { id: "stamen-watercolor", version: 8, sources: { "plotly-stamen-watercolor": { type: "raster", attribution: ['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>', 'under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>', "|", 'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors', 'under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "), tiles: ["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="], tileSize: 256 } }, layers: [{ id: "plotly-stamen-watercolor", type: "raster", source: "plotly-stamen-watercolor", minzoom: 0, maxzoom: 22 }], glyphs: "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf" } }, d = l(_);
        o.exports = { requiredVersion: u, styleUrlPrefix: "mapbox://styles/mapbox/", styleUrlSuffix: "v9", styleValuesMapbox: ["basic", "streets", "outdoors", "light", "dark", "satellite", "satellite-streets"], styleValueDflt: "basic", stylesNonMapbox: _, styleValuesNonMapbox: d, traceLayerPrefix: "plotly-trace-layer-", layoutLayerPrefix: "plotly-layout-layer-", wrongVersionErrorMsg: ["Your custom plotly.js bundle is not using the correct mapbox-gl version", "Please install @plotly/mapbox-gl@" + u + "."].join(`
`), noAccessTokenErrorMsg: ["Missing Mapbox access token.", "Mapbox trace type require a Mapbox access token to be registered.", "For example:", "  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });", "More info here: https://www.mapbox.com/help/define-access-token/"].join(`
`), missingStyleErrorMsg: ["No valid mapbox style found, please set `mapbox.style` to one of:", d.join(", "), "or register a Mapbox access token to use a Mapbox-served style."].join(`
`), multipleTokensErrorMsg: ["Set multiple mapbox access token across different mapbox subplot,", "using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(`
`), mapOnErrorMsg: "Mapbox error.", mapboxLogo: { path0: "m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z", path1: "M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z", path2: "M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z", polygon: "11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34" }, styleRules: { map: "overflow:hidden;position:relative;", "missing-css": "display:none;", canary: "background-color:salmon;", "ctrl-bottom-left": "position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;", "ctrl-bottom-right": "position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;", ctrl: "clear: both; pointer-events: auto; transform: translate(0, 0);", "ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner": "display: none;", "ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner": "display: block; margin-top:2px", "ctrl-attrib.mapboxgl-compact:hover": "padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;", "ctrl-attrib.mapboxgl-compact::after": `content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`, "ctrl-attrib.mapboxgl-compact": "min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;", "ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after": "bottom: 0; right: 0", "ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after": "bottom: 0; left: 0", "ctrl-bottom-left .mapboxgl-ctrl": "margin: 0 0 10px 10px; float: left;", "ctrl-bottom-right .mapboxgl-ctrl": "margin: 0 10px 10px 0; float: right;", "ctrl-attrib": "color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px", "ctrl-attrib a": "color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px", "ctrl-attrib a:hover": "color: inherit; text-decoration: underline;", "ctrl-attrib .mapbox-improve-map": "font-weight: bold; margin-left: 2px;", "attrib-empty": "display: none;", "ctrl-logo": `display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')` } };
      }, 2178: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          var h = u.split(" "), p = h[0], _ = h[1], d = l.isArrayOrTypedArray(i) ? l.mean(i) : i, f = 0.5 + d / 100, c = 1.5 + d / 100, g = ["", ""], m = [0, 0];
          switch (p) {
            case "top":
              g[0] = "top", m[1] = -c;
              break;
            case "bottom":
              g[0] = "bottom", m[1] = c;
          }
          switch (_) {
            case "left":
              g[1] = "right", m[0] = -f;
              break;
            case "right":
              g[1] = "left", m[0] = f;
          }
          return { anchor: g[0] && g[1] ? g.join("-") : g[0] ? g[0] : g[1] ? g[1] : "center", offset: m };
        };
      }, 68192: function(o, s, n) {
        var l = n(32280), u = n(34809), i = u.strTranslate, h = u.strScale, p = n(4173).fX, _ = n(62972), d = n(45568), f = n(62203), c = n(30635), g = n(5417), m = "mapbox", x = s.constants = n(44245);
        s.name = m, s.attr = "subplot", s.idRoot = m, s.idRegex = s.attrRegex = u.counterRegex(m);
        var w = ["mapbox subplots and traces are deprecated!", "Please consider switching to `map` subplots and traces.", "Learn more at: https://plotly.com/javascript/maplibre-migration/"].join(" ");
        s.attributes = { subplot: { valType: "subplotid", dflt: "mapbox", editType: "calc" } }, s.layoutAttributes = n(67514), s.supplyLayoutDefaults = n(86989);
        var k = !0;
        function S(A) {
          return typeof A == "string" && (x.styleValuesMapbox.indexOf(A) !== -1 || A.indexOf("mapbox://") === 0 || A.indexOf("stamen") === 0);
        }
        s.plot = function(A) {
          k && (k = !1, u.warn(w));
          var C = A._fullLayout, D = A.calcdata, L = C._subplots[m];
          if (l.version !== x.requiredVersion) throw new Error(x.wrongVersionErrorMsg);
          var E = function(z, F) {
            var U = z._fullLayout;
            if (z._context.mapboxAccessToken === "") return "";
            for (var V = [], $ = [], q = !1, K = !1, re = 0; re < F.length; re++) {
              var Y = U[F[re]], te = Y.accesstoken;
              S(Y.style) && (te ? u.pushUnique(V, te) : (S(Y._input.style) && (u.error("Uses Mapbox map style, but did not set an access token."), q = !0), K = !0)), te && u.pushUnique($, te);
            }
            if (K) {
              var ee = q ? x.noAccessTokenErrorMsg : x.missingStyleErrorMsg;
              throw u.error(ee), new Error(ee);
            }
            return V.length ? (V.length > 1 && u.warn(x.multipleTokensErrorMsg), V[0]) : ($.length && u.log(["Listed mapbox access token(s)", $.join(","), "but did not use a Mapbox map style, ignoring token(s)."].join(" ")), "");
          }(A, L);
          l.accessToken = E;
          for (var P = 0; P < L.length; P++) {
            var I = L[P], M = p(D, m, I), O = C[I], T = O._subplot;
            T || (T = new g(A, I), C[I]._subplot = T), T.viewInitial || (T.viewInitial = { center: u.extendFlat({}, O.center), zoom: O.zoom, bearing: O.bearing, pitch: O.pitch }), T.plot(M, C, A._promises);
          }
        }, s.clean = function(A, C, D, L) {
          for (var E = L._subplots[m] || [], P = 0; P < E.length; P++) {
            var I = E[P];
            !C[I] && L[I]._subplot && L[I]._subplot.destroy();
          }
        }, s.toSVG = function(A) {
          for (var C = A._fullLayout, D = C._subplots[m], L = C._size, E = 0; E < D.length; E++) {
            var P = C[D[E]], I = P.domain, M = P._subplot.toImage("png");
            C._glimages.append("svg:image").attr({ xmlns: _.svg, "xlink:href": M, x: L.l + L.w * I.x[0], y: L.t + L.h * (1 - I.y[1]), width: L.w * (I.x[1] - I.x[0]), height: L.h * (I.y[1] - I.y[0]), preserveAspectRatio: "none" });
            var O = d.select(P._subplot.div);
            if (O.select(".mapboxgl-ctrl-logo").node().offsetParent !== null) {
              var T = C._glimages.append("g");
              T.attr("transform", i(L.l + L.w * I.x[0] + 10, L.t + L.h * (1 - I.y[0]) - 31)), T.append("path").attr("d", x.mapboxLogo.path0).style({ opacity: 0.9, fill: "#ffffff", "enable-background": "new" }), T.append("path").attr("d", x.mapboxLogo.path1).style("opacity", 0.35).style("enable-background", "new"), T.append("path").attr("d", x.mapboxLogo.path2).style("opacity", 0.35).style("enable-background", "new"), T.append("polygon").attr("points", x.mapboxLogo.polygon).style({ opacity: 0.9, fill: "#ffffff", "enable-background": "new" });
            }
            var z = O.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map", ""), F = C._glimages.append("g"), U = F.append("text");
            U.text(z).classed("static-attribution", !0).attr({ "font-size": 12, "font-family": "Arial", color: "rgba(0, 0, 0, 0.75)", "text-anchor": "end", "data-unformatted": z });
            var V = f.bBox(U.node()), $ = L.w * (I.x[1] - I.x[0]);
            if (V.width > $ / 2) {
              var q = z.split("|").join("<br>");
              U.text(q).attr("data-unformatted", q).call(c.convertToTspans, A), V = f.bBox(U.node());
            }
            U.attr("transform", i(-3, 8 - V.height)), F.insert("rect", ".static-attribution").attr({ x: -V.width - 6, y: -V.height - 3, width: V.width + 6, height: V.height + 3, fill: "rgba(255, 255, 255, 0.75)" });
            var K = 1;
            V.width + 6 > $ && (K = $ / (V.width + 6));
            var re = [L.l + L.w * I.x[1], L.t + L.h * (1 - I.y[0])];
            F.attr("transform", i(re[0], re[1]) + h(K));
          }
        }, s.updateFx = function(A) {
          for (var C = A._fullLayout, D = C._subplots[m], L = 0; L < D.length; L++) C[D[L]]._subplot.updateFx(C);
        };
      }, 51276: function(o, s, n) {
        var l = n(34809), u = n(30635).sanitizeHTML, i = n(2178), h = n(44245);
        function p(c, g) {
          this.subplot = c, this.uid = c.uid + "-" + g, this.index = g, this.idSource = "source-" + this.uid, this.idLayer = h.layoutLayerPrefix + this.uid, this.sourceType = null, this.source = null, this.layerType = null, this.below = null, this.visible = !1;
        }
        var _ = p.prototype;
        function d(c) {
          if (!c.visible) return !1;
          var g = c.source;
          if (Array.isArray(g) && g.length > 0) {
            for (var m = 0; m < g.length; m++) if (typeof g[m] != "string" || g[m].length === 0) return !1;
            return !0;
          }
          return l.isPlainObject(g) || typeof g == "string" && g.length > 0;
        }
        function f(c) {
          var g = {}, m = {};
          switch (c.type) {
            case "circle":
              l.extendFlat(m, { "circle-radius": c.circle.radius, "circle-color": c.color, "circle-opacity": c.opacity });
              break;
            case "line":
              l.extendFlat(m, { "line-width": c.line.width, "line-color": c.color, "line-opacity": c.opacity, "line-dasharray": c.line.dash });
              break;
            case "fill":
              l.extendFlat(m, { "fill-color": c.color, "fill-outline-color": c.fill.outlinecolor, "fill-opacity": c.opacity });
              break;
            case "symbol":
              var x = c.symbol, w = i(x.textposition, x.iconsize);
              l.extendFlat(g, { "icon-image": x.icon + "-15", "icon-size": x.iconsize / 10, "text-field": x.text, "text-size": x.textfont.size, "text-anchor": w.anchor, "text-offset": w.offset, "symbol-placement": x.placement }), l.extendFlat(m, { "icon-color": c.color, "text-color": x.textfont.color, "text-opacity": c.opacity });
              break;
            case "raster":
              l.extendFlat(m, { "raster-fade-duration": 0, "raster-opacity": c.opacity });
          }
          return { layout: g, paint: m };
        }
        _.update = function(c) {
          this.visible ? this.needsNewImage(c) ? this.updateImage(c) : this.needsNewSource(c) ? (this.removeLayer(), this.updateSource(c), this.updateLayer(c)) : this.needsNewLayer(c) ? this.updateLayer(c) : this.updateStyle(c) : (this.updateSource(c), this.updateLayer(c)), this.visible = d(c);
        }, _.needsNewImage = function(c) {
          return this.subplot.map.getSource(this.idSource) && this.sourceType === "image" && c.sourcetype === "image" && (this.source !== c.source || JSON.stringify(this.coordinates) !== JSON.stringify(c.coordinates));
        }, _.needsNewSource = function(c) {
          return this.sourceType !== c.sourcetype || JSON.stringify(this.source) !== JSON.stringify(c.source) || this.layerType !== c.type;
        }, _.needsNewLayer = function(c) {
          return this.layerType !== c.type || this.below !== this.subplot.belowLookup["layout-" + this.index];
        }, _.lookupBelow = function() {
          return this.subplot.belowLookup["layout-" + this.index];
        }, _.updateImage = function(c) {
          this.subplot.map.getSource(this.idSource).updateImage({ url: c.source, coordinates: c.coordinates });
          var g = this.findFollowingMapboxLayerId(this.lookupBelow());
          g !== null && this.subplot.map.moveLayer(this.idLayer, g);
        }, _.updateSource = function(c) {
          var g = this.subplot.map;
          if (g.getSource(this.idSource) && g.removeSource(this.idSource), this.sourceType = c.sourcetype, this.source = c.source, d(c)) {
            var m = function(x) {
              var w, k = x.sourcetype, S = x.source, A = { type: k };
              return k === "geojson" ? w = "data" : k === "vector" ? w = typeof S == "string" ? "url" : "tiles" : k === "raster" ? (w = "tiles", A.tileSize = 256) : k === "image" && (w = "url", A.coordinates = x.coordinates), A[w] = S, x.sourceattribution && (A.attribution = u(x.sourceattribution)), A;
            }(c);
            g.addSource(this.idSource, m);
          }
        }, _.findFollowingMapboxLayerId = function(c) {
          if (c === "traces") for (var g = this.subplot.getMapLayers(), m = 0; m < g.length; m++) {
            var x = g[m].id;
            if (typeof x == "string" && x.indexOf(h.traceLayerPrefix) === 0) {
              c = x;
              break;
            }
          }
          return c;
        }, _.updateLayer = function(c) {
          var g = this.subplot, m = f(c), x = this.lookupBelow(), w = this.findFollowingMapboxLayerId(x);
          this.removeLayer(), d(c) && g.addLayer({ id: this.idLayer, source: this.idSource, "source-layer": c.sourcelayer || "", type: c.type, minzoom: c.minzoom, maxzoom: c.maxzoom, layout: m.layout, paint: m.paint }, w), this.layerType = c.type, this.below = x;
        }, _.updateStyle = function(c) {
          if (d(c)) {
            var g = f(c);
            this.subplot.setOptions(this.idLayer, "setLayoutProperty", g.layout), this.subplot.setOptions(this.idLayer, "setPaintProperty", g.paint);
          }
        }, _.removeLayer = function() {
          var c = this.subplot.map;
          c.getLayer(this.idLayer) && c.removeLayer(this.idLayer);
        }, _.dispose = function() {
          var c = this.subplot.map;
          c.getLayer(this.idLayer) && c.removeLayer(this.idLayer), c.getSource(this.idSource) && c.removeSource(this.idSource);
        }, o.exports = function(c, g, m) {
          var x = new p(c, g);
          return x.update(m), x;
        };
      }, 67514: function(o, s, n) {
        var l = n(34809), u = n(78766).defaultLine, i = n(13792).u, h = n(80337), p = n(36640).textposition, _ = n(13582).overrideAll, d = n(78032).templatedArray, f = n(44245), c = h({ noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 });
        c.family.dflt = "Open Sans Regular, Arial Unicode MS Regular", (o.exports = _({ _arrayAttrRegexps: [l.counterRegex("mapbox", ".layers", !0)], domain: i({ name: "mapbox" }), accesstoken: { valType: "string", noBlank: !0, strict: !0 }, style: { valType: "any", values: f.styleValuesMapbox.concat(f.styleValuesNonMapbox), dflt: f.styleValueDflt }, center: { lon: { valType: "number", dflt: 0 }, lat: { valType: "number", dflt: 0 } }, zoom: { valType: "number", dflt: 1 }, bearing: { valType: "number", dflt: 0 }, pitch: { valType: "number", dflt: 0 }, bounds: { west: { valType: "number" }, east: { valType: "number" }, south: { valType: "number" }, north: { valType: "number" } }, layers: d("layer", { visible: { valType: "boolean", dflt: !0 }, sourcetype: { valType: "enumerated", values: ["geojson", "vector", "raster", "image"], dflt: "geojson" }, source: { valType: "any" }, sourcelayer: { valType: "string", dflt: "" }, sourceattribution: { valType: "string" }, type: { valType: "enumerated", values: ["circle", "line", "fill", "symbol", "raster"], dflt: "circle" }, coordinates: { valType: "any" }, below: { valType: "string" }, color: { valType: "color", dflt: u }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, minzoom: { valType: "number", min: 0, max: 24, dflt: 0 }, maxzoom: { valType: "number", min: 0, max: 24, dflt: 24 }, circle: { radius: { valType: "number", dflt: 15 } }, line: { width: { valType: "number", dflt: 2 }, dash: { valType: "data_array" } }, fill: { outlinecolor: { valType: "color", dflt: u } }, symbol: { icon: { valType: "string", dflt: "marker" }, iconsize: { valType: "number", dflt: 10 }, text: { valType: "string", dflt: "" }, placement: { valType: "enumerated", values: ["point", "line", "line-center"], dflt: "point" }, textfont: c, textposition: l.extendFlat({}, p, { arrayOk: !1 }) } }) }, "plot", "from-root")).uirevision = { valType: "any", editType: "none" };
      }, 86989: function(o, s, n) {
        var l = n(34809), u = n(4448), i = n(59008), h = n(67514);
        function p(d, f, c, g) {
          c("accesstoken", g.accessToken), c("style"), c("center.lon"), c("center.lat"), c("zoom"), c("bearing"), c("pitch");
          var m = c("bounds.west"), x = c("bounds.east"), w = c("bounds.south"), k = c("bounds.north");
          m !== void 0 && x !== void 0 && w !== void 0 && k !== void 0 || delete f.bounds, i(d, f, { name: "layers", handleItemDefaults: _ }), f._input = d;
        }
        function _(d, f) {
          function c(k, S) {
            return l.coerce(d, f, h.layers, k, S);
          }
          if (c("visible")) {
            var g, m = c("sourcetype"), x = m === "raster" || m === "image";
            c("source"), c("sourceattribution"), m === "vector" && c("sourcelayer"), m === "image" && c("coordinates"), x && (g = "raster");
            var w = c("type", g);
            x && w !== "raster" && (w = f.type = "raster", l.log("Source types *raster* and *image* must drawn *raster* layer type.")), c("below"), c("color"), c("opacity"), c("minzoom"), c("maxzoom"), w === "circle" && c("circle.radius"), w === "line" && (c("line.width"), c("line.dash")), w === "fill" && c("fill.outlinecolor"), w === "symbol" && (c("symbol.icon"), c("symbol.iconsize"), c("symbol.text"), l.coerceFont(c, "symbol.textfont", void 0, { noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 }), c("symbol.textposition"), c("symbol.placement"));
          }
        }
        o.exports = function(d, f, c) {
          u(d, f, c, { type: "mapbox", attributes: h, handleDefaults: p, partition: "y", accessToken: f._mapboxAccessToken });
        };
      }, 5417: function(o, s, n) {
        var l = n(32280), u = n(34809), i = n(3994), h = n(33626), p = n(29714), _ = n(14751), d = n(32141), f = n(70414), c = f.drawMode, g = f.selectMode, m = n(44844).prepSelect, x = n(44844).clearOutline, w = n(44844).clearSelectionsCache, k = n(44844).selectOnClick, S = n(44245), A = n(51276);
        function C(M, O) {
          this.id = O, this.gd = M;
          var T = M._fullLayout, z = M._context;
          this.container = T._glcontainer.node(), this.isStatic = z.staticPlot, this.uid = T._uid + "-" + this.id, this.div = null, this.xaxis = null, this.yaxis = null, this.createFramework(T), this.map = null, this.accessToken = null, this.styleObj = null, this.traceHash = {}, this.layerList = [], this.belowLookup = {}, this.dragging = !1, this.wheeling = !1;
        }
        var D = C.prototype;
        D.plot = function(M, O, T) {
          var z, F = this, U = O[F.id];
          F.map && U.accesstoken !== F.accessToken && (F.map.remove(), F.map = null, F.styleObj = null, F.traceHash = {}, F.layerList = []), z = F.map ? new Promise(function(V, $) {
            F.updateMap(M, O, V, $);
          }) : new Promise(function(V, $) {
            F.createMap(M, O, V, $);
          }), T.push(z);
        }, D.createMap = function(M, O, T, z) {
          var F = this, U = O[F.id], V = F.styleObj = E(U.style, O);
          F.accessToken = U.accesstoken;
          var $ = U.bounds, q = $ ? [[$.west, $.south], [$.east, $.north]] : null, K = F.map = new l.Map({ container: F.div, style: V.style, center: I(U.center), zoom: U.zoom, bearing: U.bearing, pitch: U.pitch, maxBounds: q, interactive: !F.isStatic, preserveDrawingBuffer: F.isStatic, doubleClickZoom: !1, boxZoom: !1, attributionControl: !1 }).addControl(new l.AttributionControl({ compact: !0 }));
          K._canvas.style.left = "0px", K._canvas.style.top = "0px", F.rejectOnError(z), F.isStatic || F.initFx(M, O);
          var re = [];
          re.push(new Promise(function(Y) {
            K.once("load", Y);
          })), re = re.concat(i.fetchTraceGeoData(M)), Promise.all(re).then(function() {
            F.fillBelowLookup(M, O), F.updateData(M), F.updateLayout(O), F.resolveOnRender(T);
          }).catch(z);
        }, D.updateMap = function(M, O, T, z) {
          var F = this, U = F.map, V = O[this.id];
          F.rejectOnError(z);
          var $ = [], q = E(V.style, O);
          JSON.stringify(F.styleObj) !== JSON.stringify(q) && (F.styleObj = q, U.setStyle(q.style), F.traceHash = {}, $.push(new Promise(function(K) {
            U.once("styledata", K);
          }))), $ = $.concat(i.fetchTraceGeoData(M)), Promise.all($).then(function() {
            F.fillBelowLookup(M, O), F.updateData(M), F.updateLayout(O), F.resolveOnRender(T);
          }).catch(z);
        }, D.fillBelowLookup = function(M, O) {
          var T, z, F = O[this.id].layers, U = this.belowLookup = {}, V = !1;
          for (T = 0; T < M.length; T++) {
            var $ = M[T][0].trace, q = $._module;
            typeof $.below == "string" ? z = $.below : q.getBelow && (z = q.getBelow($, this)), z === "" && (V = !0), U["trace-" + $.uid] = z || "";
          }
          for (T = 0; T < F.length; T++) {
            var K = F[T];
            z = typeof K.below == "string" ? K.below : V ? "traces" : "", U["layout-" + T] = z;
          }
          var re, Y, te = {};
          for (re in U) te[z = U[re]] ? te[z].push(re) : te[z] = [re];
          for (z in te) {
            var ee = te[z];
            if (ee.length > 1) for (T = 0; T < ee.length; T++) (re = ee[T]).indexOf("trace-") === 0 ? (Y = re.split("trace-")[1], this.traceHash[Y] && (this.traceHash[Y].below = null)) : re.indexOf("layout-") === 0 && (Y = re.split("layout-")[1], this.layerList[Y] && (this.layerList[Y].below = null));
          }
        };
        var L = { choroplethmapbox: 0, densitymapbox: 1, scattermapbox: 2 };
        function E(M, O) {
          var T = {};
          if (u.isPlainObject(M)) T.id = M.id, T.style = M;
          else if (typeof M == "string") if (T.id = M, S.styleValuesMapbox.indexOf(M) !== -1) T.style = P(M);
          else if (S.stylesNonMapbox[M]) {
            T.style = S.stylesNonMapbox[M];
            var z = T.style.sources["plotly-" + M], F = z ? z.tiles : void 0;
            F && F[0] && F[0].slice(-9) === "?api_key=" && (F[0] += O._mapboxAccessToken);
          } else T.style = M;
          else T.id = S.styleValueDflt, T.style = P(S.styleValueDflt);
          return T.transition = { duration: 0, delay: 0 }, T;
        }
        function P(M) {
          return S.styleUrlPrefix + M + "-" + S.styleUrlSuffix;
        }
        function I(M) {
          return [M.lon, M.lat];
        }
        D.updateData = function(M) {
          var O, T, z, F, U = this.traceHash, V = M.slice().sort(function(Y, te) {
            return L[Y[0].trace.type] - L[te[0].trace.type];
          });
          for (z = 0; z < V.length; z++) {
            var $ = V[z], q = !1;
            (O = U[(T = $[0].trace).uid]) && (O.type === T.type ? (O.update($), q = !0) : O.dispose()), !q && T._module && (U[T.uid] = T._module.plot(this, $));
          }
          var K = Object.keys(U);
          e: for (z = 0; z < K.length; z++) {
            var re = K[z];
            for (F = 0; F < M.length; F++) if (re === (T = M[F][0].trace).uid) continue e;
            (O = U[re]).dispose(), delete U[re];
          }
        }, D.updateLayout = function(M) {
          var O = this.map, T = M[this.id];
          this.dragging || this.wheeling || (O.setCenter(I(T.center)), O.setZoom(T.zoom), O.setBearing(T.bearing), O.setPitch(T.pitch)), this.updateLayers(M), this.updateFramework(M), this.updateFx(M), this.map.resize(), this.gd._context._scrollZoom.mapbox ? O.scrollZoom.enable() : O.scrollZoom.disable();
        }, D.resolveOnRender = function(M) {
          var O = this.map;
          O.on("render", function T() {
            O.loaded() && (O.off("render", T), setTimeout(M, 10));
          });
        }, D.rejectOnError = function(M) {
          var O = this.map;
          function T() {
            M(new Error(S.mapOnErrorMsg));
          }
          O.once("error", T), O.once("style.error", T), O.once("source.error", T), O.once("tile.error", T), O.once("layer.error", T);
        }, D.createFramework = function(M) {
          var O = this, T = O.div = document.createElement("div");
          T.id = O.uid, T.style.position = "absolute", O.container.appendChild(T), O.xaxis = { _id: "x", c2p: function(z) {
            return O.project(z).x;
          } }, O.yaxis = { _id: "y", c2p: function(z) {
            return O.project(z).y;
          } }, O.updateFramework(M), O.mockAxis = { type: "linear", showexponent: "all", exponentformat: "B" }, p.setConvert(O.mockAxis, M);
        }, D.initFx = function(M, O) {
          var T = this, z = T.gd, F = T.map;
          function U() {
            d.loneUnhover(O._hoverlayer);
          }
          function V() {
            var $ = T.getView();
            z.emit("plotly_relayouting", T.getViewEditsWithDerived($));
          }
          F.on("moveend", function($) {
            if (T.map) {
              var q = z._fullLayout;
              if ($.originalEvent || T.wheeling) {
                var K = q[T.id];
                h.call("_storeDirectGUIEdit", z.layout, q._preGUI, T.getViewEdits(K));
                var re = T.getView();
                K._input.center = K.center = re.center, K._input.zoom = K.zoom = re.zoom, K._input.bearing = K.bearing = re.bearing, K._input.pitch = K.pitch = re.pitch, z.emit("plotly_relayout", T.getViewEditsWithDerived(re));
              }
              $.originalEvent && $.originalEvent.type === "mouseup" ? T.dragging = !1 : T.wheeling && (T.wheeling = !1), q._rehover && q._rehover();
            }
          }), F.on("wheel", function() {
            T.wheeling = !0;
          }), F.on("mousemove", function($) {
            var q = T.div.getBoundingClientRect(), K = [$.originalEvent.offsetX, $.originalEvent.offsetY];
            $.target.getBoundingClientRect = function() {
              return q;
            }, T.xaxis.p2c = function() {
              return F.unproject(K).lng;
            }, T.yaxis.p2c = function() {
              return F.unproject(K).lat;
            }, z._fullLayout._rehover = function() {
              z._fullLayout._hoversubplot === T.id && z._fullLayout[T.id] && d.hover(z, $, T.id);
            }, d.hover(z, $, T.id), z._fullLayout._hoversubplot = T.id;
          }), F.on("dragstart", function() {
            T.dragging = !0, U();
          }), F.on("zoomstart", U), F.on("mouseout", function() {
            z._fullLayout._hoversubplot = null;
          }), F.on("drag", V), F.on("zoom", V), F.on("dblclick", function() {
            var $ = z._fullLayout[T.id];
            h.call("_storeDirectGUIEdit", z.layout, z._fullLayout._preGUI, T.getViewEdits($));
            var q = T.viewInitial;
            F.setCenter(I(q.center)), F.setZoom(q.zoom), F.setBearing(q.bearing), F.setPitch(q.pitch);
            var K = T.getView();
            $._input.center = $.center = K.center, $._input.zoom = $.zoom = K.zoom, $._input.bearing = $.bearing = K.bearing, $._input.pitch = $.pitch = K.pitch, z.emit("plotly_doubleclick", null), z.emit("plotly_relayout", T.getViewEditsWithDerived(K));
          }), T.clearOutline = function() {
            w(T.dragOptions), x(T.dragOptions.gd);
          }, T.onClickInPanFn = function($) {
            return function(q) {
              var K = z._fullLayout.clickmode;
              K.indexOf("select") > -1 && k(q.originalEvent, z, [T.xaxis], [T.yaxis], T.id, $), K.indexOf("event") > -1 && d.click(z, q.originalEvent);
            };
          };
        }, D.updateFx = function(M) {
          var O = this, T = O.map, z = O.gd;
          if (!O.isStatic) {
            var F, U = M.dragmode;
            F = function(q, K) {
              K.isRect ? (q.range = {})[O.id] = [$([K.xmin, K.ymin]), $([K.xmax, K.ymax])] : (q.lassoPoints = {})[O.id] = K.map($);
            };
            var V = O.dragOptions;
            O.dragOptions = u.extendDeep(V || {}, { dragmode: M.dragmode, element: O.div, gd: z, plotinfo: { id: O.id, domain: M[O.id].domain, xaxis: O.xaxis, yaxis: O.yaxis, fillRangeItems: F }, xaxes: [O.xaxis], yaxes: [O.yaxis], subplot: O.id }), T.off("click", O.onClickInPanHandler), g(U) || c(U) ? (T.dragPan.disable(), T.on("zoomstart", O.clearOutline), O.dragOptions.prepFn = function(q, K, re) {
              m(q, K, re, O.dragOptions, U);
            }, _.init(O.dragOptions)) : (T.dragPan.enable(), T.off("zoomstart", O.clearOutline), O.div.onmousedown = null, O.div.ontouchstart = null, O.div.removeEventListener("touchstart", O.div._ontouchstart), O.onClickInPanHandler = O.onClickInPanFn(O.dragOptions), T.on("click", O.onClickInPanHandler));
          }
          function $(q) {
            var K = O.map.unproject(q);
            return [K.lng, K.lat];
          }
        }, D.updateFramework = function(M) {
          var O = M[this.id].domain, T = M._size, z = this.div.style;
          z.width = T.w * (O.x[1] - O.x[0]) + "px", z.height = T.h * (O.y[1] - O.y[0]) + "px", z.left = T.l + O.x[0] * T.w + "px", z.top = T.t + (1 - O.y[1]) * T.h + "px", this.xaxis._offset = T.l + O.x[0] * T.w, this.xaxis._length = T.w * (O.x[1] - O.x[0]), this.yaxis._offset = T.t + (1 - O.y[1]) * T.h, this.yaxis._length = T.h * (O.y[1] - O.y[0]);
        }, D.updateLayers = function(M) {
          var O, T = M[this.id].layers, z = this.layerList;
          if (T.length !== z.length) {
            for (O = 0; O < z.length; O++) z[O].dispose();
            for (z = this.layerList = [], O = 0; O < T.length; O++) z.push(A(this, O, T[O]));
          } else for (O = 0; O < T.length; O++) z[O].update(T[O]);
        }, D.destroy = function() {
          this.map && (this.map.remove(), this.map = null, this.container.removeChild(this.div));
        }, D.toImage = function() {
          return this.map.stop(), this.map.getCanvas().toDataURL();
        }, D.setOptions = function(M, O, T) {
          for (var z in T) this.map[O](M, z, T[z]);
        }, D.getMapLayers = function() {
          return this.map.getStyle().layers;
        }, D.addLayer = function(M, O) {
          var T = this.map;
          if (typeof O == "string") {
            if (O === "") return void T.addLayer(M, O);
            for (var z = this.getMapLayers(), F = 0; F < z.length; F++) if (O === z[F].id) return void T.addLayer(M, O);
            u.warn(["Trying to add layer with *below* value", O, "referencing a layer that does not exist", "or that does not yet exist."].join(" "));
          }
          T.addLayer(M);
        }, D.project = function(M) {
          return this.map.project(new l.LngLat(M[0], M[1]));
        }, D.getView = function() {
          var M = this.map, O = M.getCenter(), T = { lon: O.lng, lat: O.lat }, z = M.getCanvas(), F = parseInt(z.style.width), U = parseInt(z.style.height);
          return { center: T, zoom: M.getZoom(), bearing: M.getBearing(), pitch: M.getPitch(), _derived: { coordinates: [M.unproject([0, 0]).toArray(), M.unproject([F, 0]).toArray(), M.unproject([F, U]).toArray(), M.unproject([0, U]).toArray()] } };
        }, D.getViewEdits = function(M) {
          for (var O = this.id, T = ["center", "zoom", "bearing", "pitch"], z = {}, F = 0; F < T.length; F++) {
            var U = T[F];
            z[O + "." + U] = M[U];
          }
          return z;
        }, D.getViewEditsWithDerived = function(M) {
          var O = this.id, T = this.getViewEdits(M);
          return T[O + "._derived"] = M._derived, T;
        }, o.exports = C;
      }, 57891: function(o) {
        o.exports = function(s) {
          var n = s.editType;
          return { t: { valType: "number", dflt: 0, editType: n }, r: { valType: "number", dflt: 0, editType: n }, b: { valType: "number", dflt: 0, editType: n }, l: { valType: "number", dflt: 0, editType: n }, editType: n };
        };
      }, 44122: function(o, s, n) {
        var l = n(45568), u = n(42696).de, i = n(36464).OE, h = n(10721), p = n(93229), _ = n(33626), d = n(57297), f = n(78032), c = n(34809), g = n(78766), m = n(63821).BADNUM, x = n(5975), w = n(78534).clearOutline, k = n(26667), S = n(49722), A = n(58935), C = n(4173).eV, D = c.relinkPrivateKeys, L = c._, E = o.exports = {};
        c.extendFlat(E, _), E.attributes = n(9829), E.attributes.type.values = E.allTypes, E.fontAttrs = n(80337), E.layoutAttributes = n(6704);
        var P = E.transformsRegistry, I = n(90251);
        E.executeAPICommand = I.executeAPICommand, E.computeAPICommandBindings = I.computeAPICommandBindings, E.manageCommandObserver = I.manageCommandObserver, E.hasSimpleAPICommandBindings = I.hasSimpleAPICommandBindings, E.redrawText = function(ee) {
          return ee = c.getGraphDiv(ee), new Promise(function(X) {
            setTimeout(function() {
              ee._fullLayout && (_.getComponentMethod("annotations", "draw")(ee), _.getComponentMethod("legend", "draw")(ee), _.getComponentMethod("colorbar", "draw")(ee), X(E.previousPromises(ee)));
            }, 300);
          });
        }, E.resize = function(ee) {
          var X;
          ee = c.getGraphDiv(ee);
          var Q = new Promise(function(ue, ce) {
            ee && !c.isHidden(ee) || ce(new Error("Resize must be passed a displayed plot div element.")), ee._redrawTimer && clearTimeout(ee._redrawTimer), ee._resolveResize && (X = ee._resolveResize), ee._resolveResize = ue, ee._redrawTimer = setTimeout(function() {
              if (!ee.layout || ee.layout.width && ee.layout.height || c.isHidden(ee)) ue(ee);
              else {
                delete ee.layout.width, delete ee.layout.height;
                var he = ee.changed;
                ee.autoplay = !0, _.call("relayout", ee, { autosize: !0 }).then(function() {
                  ee.changed = he, ee._resolveResize === ue && (delete ee._resolveResize, ue(ee));
                });
              }
            }, 100);
          });
          return X && X(Q), Q;
        }, E.previousPromises = function(ee) {
          if ((ee._promises || []).length) return Promise.all(ee._promises).then(function() {
            ee._promises = [];
          });
        }, E.addLinks = function(ee) {
          if (ee._context.showLink || ee._context.showSources) {
            var X = ee._fullLayout, Q = c.ensureSingle(X._paper, "text", "js-plot-link-container", function(ae) {
              ae.style({ "font-family": '"Open Sans", Arial, sans-serif', "font-size": "12px", fill: g.defaultLine, "pointer-events": "all" }).each(function() {
                var se = l.select(this);
                se.append("tspan").classed("js-link-to-tool", !0), se.append("tspan").classed("js-link-spacer", !0), se.append("tspan").classed("js-sourcelinks", !0);
              });
            }), ue = Q.node(), ce = { y: X._paper.attr("height") - 9 };
            document.body.contains(ue) && ue.getComputedTextLength() >= X.width - 20 ? (ce["text-anchor"] = "start", ce.x = 5) : (ce["text-anchor"] = "end", ce.x = X._paper.attr("width") - 7), Q.attr(ce);
            var he = Q.select(".js-link-to-tool"), de = Q.select(".js-link-spacer"), ne = Q.select(".js-sourcelinks");
            ee._context.showSources && ee._context.showSources(ee), ee._context.showLink && function(ae, se) {
              se.text("");
              var me = se.append("a").attr({ "xlink:xlink:href": "#", class: "link--impt link--embedview", "font-weight": "bold" }).text(ae._context.linkText + " »");
              if (ae._context.sendData) me.on("click", function() {
                E.sendDataToCloud(ae);
              });
              else {
                var ye = window.location.pathname.split("/"), pe = window.location.search;
                me.attr({ "xlink:xlink:show": "new", "xlink:xlink:href": "/" + ye[2].split(".")[0] + "/" + ye[1] + pe });
              }
            }(ee, he), de.text(he.text() && ne.text() ? " - " : "");
          }
        }, E.sendDataToCloud = function(ee) {
          var X = (window.PLOTLYENV || {}).BASE_URL || ee._context.plotlyServerURL;
          if (X) {
            ee.emit("plotly_beforeexport");
            var Q = l.select(ee).append("div").attr("id", "hiddenform").style("display", "none"), ue = Q.append("form").attr({ action: X + "/external", method: "post", target: "_blank" });
            return ue.append("input").attr({ type: "text", name: "data" }).node().value = E.graphJson(ee, !1, "keepdata"), ue.node().submit(), Q.remove(), ee.emit("plotly_afterexport"), !1;
          }
        };
        var M = ["days", "shortDays", "months", "shortMonths", "periods", "dateTime", "date", "time", "decimal", "thousands", "grouping", "currency"], O = ["year", "month", "dayMonth", "dayMonthYear"];
        function T(ee, X) {
          var Q = ee._context.locale;
          Q || (Q = "en-US");
          var ue = !1, ce = {};
          function he(ye) {
            for (var pe = !0, be = 0; be < X.length; be++) {
              var Ae = X[be];
              ce[Ae] || (ye[Ae] ? ce[Ae] = ye[Ae] : pe = !1);
            }
            pe && (ue = !0);
          }
          for (var de = 0; de < 2; de++) {
            for (var ne = ee._context.locales, ae = 0; ae < 2; ae++) {
              var se = (ne[Q] || {}).format;
              if (se && (he(se), ue)) break;
              ne = _.localeRegistry;
            }
            var me = Q.split("-")[0];
            if (ue || me === Q) break;
            Q = me;
          }
          return ue || he(_.localeRegistry.en.format), ce;
        }
        function z(ee, X) {
          var Q = { _fullLayout: X }, ue = ee._id.charAt(0) === "x", ce = ee._mainAxis._anchorAxis, he = "", de = "", ne = "";
          if (ce && (ne = ce._mainAxis._id, he = ue ? ee._id + ne : ne + ee._id), !he || !X._plots[he]) {
            he = "";
            for (var ae = ee._counterAxes, se = 0; se < ae.length; se++) {
              var me = ae[se], ye = ue ? ee._id + me : me + ee._id;
              de || (de = ye);
              var pe = x.getFromId(Q, me);
              if (ne && pe.overlaying === ne) {
                he = ye;
                break;
              }
            }
          }
          return he || de;
        }
        function F(ee) {
          var X = ee.transforms;
          if (Array.isArray(X) && X.length) for (var Q = 0; Q < X.length; Q++) {
            var ue = X[Q], ce = ue._module || P[ue.type];
            if (ce && ce.makesData) return !0;
          }
          return !1;
        }
        function U(ee, X, Q, ue) {
          for (var ce = ee.transforms, he = [ee], de = 0; de < ce.length; de++) {
            var ne = ce[de], ae = P[ne.type];
            ae && ae.transform && (he = ae.transform(he, { transform: ne, fullTrace: ee, fullData: X, layout: Q, fullLayout: ue, transformIndex: de }));
          }
          return he;
        }
        function V(ee) {
          return typeof ee == "string" && ee.substr(ee.length - 2) === "px" && parseFloat(ee);
        }
        function $(ee) {
          var X = ee.margin;
          if (!ee._size) {
            var Q = ee._size = { l: Math.round(X.l), r: Math.round(X.r), t: Math.round(X.t), b: Math.round(X.b), p: Math.round(X.pad) };
            Q.w = Math.round(ee.width) - Q.l - Q.r, Q.h = Math.round(ee.height) - Q.t - Q.b;
          }
          ee._pushmargin || (ee._pushmargin = {}), ee._pushmarginIds || (ee._pushmarginIds = {}), ee._reservedMargin || (ee._reservedMargin = {});
        }
        E.supplyDefaults = function(ee, X) {
          var Q = X && X.skipUpdateCalc, ue = ee._fullLayout || {};
          if (ue._skipDefaults) delete ue._skipDefaults;
          else {
            var ce, he = ee._fullLayout = {}, de = ee.layout || {}, ne = ee._fullData || [], ae = ee._fullData = [], se = ee.data || [], me = ee.calcdata || [], ye = ee._context || {};
            ee._transitionData || E.createTransitionData(ee), he._dfltTitle = { plot: L(ee, "Click to enter Plot title"), subtitle: L(ee, "Click to enter Plot subtitle"), x: L(ee, "Click to enter X axis title"), y: L(ee, "Click to enter Y axis title"), colorbar: L(ee, "Click to enter Colorscale title"), annotation: L(ee, "new text") }, he._traceWord = L(ee, "trace");
            var pe = T(ee, M);
            if (he._mapboxAccessToken = ye.mapboxAccessToken, ue._initialAutoSizeIsDone) {
              var be = ue.width, Ae = ue.height;
              E.supplyLayoutGlobalDefaults(de, he, pe), de.width || (he.width = be), de.height || (he.height = Ae), E.sanitizeMargins(he);
            } else {
              E.supplyLayoutGlobalDefaults(de, he, pe);
              var Se = !de.width || !de.height, Me = he.autosize, De = ye.autosizable;
              Se && (Me || De) ? E.plotAutoSize(ee, de, he) : Se && E.sanitizeMargins(he), !Me && Se && (de.width = he.width, de.height = he.height);
            }
            he._d3locale = function(Ze, ct) {
              return Ze.decimal = ct.charAt(0), Ze.thousands = ct.charAt(1), { numberFormat: function(ft) {
                try {
                  ft = i(Ze).format(c.adjustFormat(ft));
                } catch {
                  return c.warnBadFormat(ft), c.noFormat;
                }
                return ft;
              }, timeFormat: u(Ze).utcFormat };
            }(pe, he.separators), he._extraFormat = T(ee, O), he._initialAutoSizeIsDone = !0, he._dataLength = se.length, he._modules = [], he._visibleModules = [], he._basePlotModules = [];
            var Le = he._subplots = function() {
              var Ze, ct, ft = _.collectableSubplotTypes, _t = {};
              if (!ft) {
                ft = [];
                var Pt = _.subplotsRegistry;
                for (var Dt in Pt) {
                  var $t = Pt[Dt].attr;
                  if ($t && (ft.push(Dt), Array.isArray($t))) for (ct = 0; ct < $t.length; ct++) c.pushUnique(ft, $t[ct]);
                }
              }
              for (Ze = 0; Ze < ft.length; Ze++) _t[ft[Ze]] = [];
              return _t;
            }(), We = he._splomAxes = { x: {}, y: {} }, Ee = he._splomSubplots = {};
            he._splomGridDflt = {}, he._scatterStackOpts = {}, he._firstScatter = {}, he._alignmentOpts = {}, he._colorAxes = {}, he._requestRangeslider = {}, he._traceUids = function(Ze, ct) {
              var ft, _t, Pt = ct.length, Dt = [];
              for (ft = 0; ft < Ze.length; ft++) {
                var $t = Ze[ft]._fullInput;
                $t !== _t && Dt.push($t), _t = $t;
              }
              var Gt = Dt.length, Wt = new Array(Pt), mt = {};
              function at(Je, nt) {
                Wt[nt] = Je, mt[Je] = 1;
              }
              function vt(Je, nt) {
                if (Je && typeof Je == "string" && !mt[Je]) return at(Je, nt), !0;
              }
              for (ft = 0; ft < Pt; ft++) {
                var St = ct[ft].uid;
                typeof St == "number" && (St = String(St)), vt(St, ft) || ft < Gt && vt(Dt[ft].uid, ft) || at(c.randstr(mt), ft);
              }
              return Wt;
            }(ne, se), he._globalTransforms = (ee._context || {}).globalTransforms, E.supplyDataDefaults(se, ae, de, he);
            var Ne = Object.keys(We.x), Ie = Object.keys(We.y);
            if (Ne.length > 1 && Ie.length > 1) {
              for (_.getComponentMethod("grid", "sizeDefaults")(de, he), ce = 0; ce < Ne.length; ce++) c.pushUnique(Le.xaxis, Ne[ce]);
              for (ce = 0; ce < Ie.length; ce++) c.pushUnique(Le.yaxis, Ie[ce]);
              for (var ge in Ee) c.pushUnique(Le.cartesian, ge);
            }
            if (he._has = E._hasPlotType.bind(he), ne.length === ae.length) for (ce = 0; ce < ae.length; ce++) D(ae[ce], ne[ce]);
            E.supplyLayoutModuleDefaults(de, he, ae, ee._transitionData);
            var Ce = he._visibleModules, we = [];
            for (ce = 0; ce < Ce.length; ce++) {
              var Ge = Ce[ce].crossTraceDefaults;
              Ge && c.pushUnique(we, Ge);
            }
            for (ce = 0; ce < we.length; ce++) we[ce](ae, he);
            he._hasOnlyLargeSploms = he._basePlotModules.length === 1 && he._basePlotModules[0].name === "splom" && Ne.length > 15 && Ie.length > 15 && he.shapes.length === 0 && he.images.length === 0, E.linkSubplots(ae, he, ne, ue), E.cleanPlot(ae, he, ne, ue);
            var Re = !(!ue._has || !ue._has("gl2d")), je = !(!he._has || !he._has("gl2d")), Ke = !(!ue._has || !ue._has("cartesian")) || Re, tt = !(!he._has || !he._has("cartesian")) || je;
            Ke && !tt ? ue._bgLayer.remove() : tt && !Ke && (he._shouldCreateBgLayer = !0), ue._zoomlayer && !ee._dragging && w({ _fullLayout: ue }), function(Ze, ct) {
              var ft, _t = [];
              ct.meta && (ft = ct._meta = { meta: ct.meta, layout: { meta: ct.meta } });
              for (var Pt = 0; Pt < Ze.length; Pt++) {
                var Dt = Ze[Pt];
                Dt.meta ? _t[Dt.index] = Dt._meta = { meta: Dt.meta } : ct.meta && (Dt._meta = { meta: ct.meta }), ct.meta && (Dt._meta.layout = { meta: ct.meta });
              }
              _t.length && (ft || (ft = ct._meta = {}), ft.data = _t);
            }(ae, he), D(he, ue), _.getComponentMethod("colorscale", "crossTraceDefaults")(ae, he), he._preGUI || (he._preGUI = {}), he._tracePreGUI || (he._tracePreGUI = {});
            var _e, Be = he._tracePreGUI, $e = {};
            for (_e in Be) $e[_e] = "old";
            for (ce = 0; ce < ae.length; ce++) $e[_e = ae[ce]._fullInput.uid] || (Be[_e] = {}), $e[_e] = "new";
            for (_e in $e) $e[_e] === "old" && delete Be[_e];
            $(he), _.getComponentMethod("rangeslider", "makeData")(he), Q || me.length !== ae.length || E.supplyDefaultsUpdateCalc(me, ae);
          }
        }, E.supplyDefaultsUpdateCalc = function(ee, X) {
          for (var Q = 0; Q < X.length; Q++) {
            var ue = X[Q], ce = (ee[Q] || [])[0];
            if (ce && ce.trace) {
              var he = ce.trace;
              if (he._hasCalcTransform) {
                var de, ne, ae, se = he._arrayAttrs;
                for (de = 0; de < se.length; de++) ne = se[de], ae = c.nestedProperty(he, ne).get().slice(), c.nestedProperty(ue, ne).set(ae);
              }
              ce.trace = ue;
            }
          }
        }, E.createTransitionData = function(ee) {
          ee._transitionData || (ee._transitionData = {}), ee._transitionData._frames || (ee._transitionData._frames = []), ee._transitionData._frameHash || (ee._transitionData._frameHash = {}), ee._transitionData._counter || (ee._transitionData._counter = 0), ee._transitionData._interruptCallbacks || (ee._transitionData._interruptCallbacks = []);
        }, E._hasPlotType = function(ee) {
          var X, Q = this._basePlotModules || [];
          for (X = 0; X < Q.length; X++) if (Q[X].name === ee) return !0;
          var ue = this._modules || [];
          for (X = 0; X < ue.length; X++) {
            var ce = ue[X].name;
            if (ce === ee) return !0;
            var he = _.modules[ce];
            if (he && he.categories[ee]) return !0;
          }
          return !1;
        }, E.cleanPlot = function(ee, X, Q, ue) {
          var ce, he, de = ue._basePlotModules || [];
          for (ce = 0; ce < de.length; ce++) {
            var ne = de[ce];
            ne.clean && ne.clean(ee, X, Q, ue);
          }
          var ae = ue._has && ue._has("gl"), se = X._has && X._has("gl");
          ae && !se && ue._glcontainer !== void 0 && (ue._glcontainer.selectAll(".gl-canvas").remove(), ue._glcontainer.selectAll(".no-webgl").remove(), ue._glcanvas = null);
          var me = !!ue._infolayer;
          e: for (ce = 0; ce < Q.length; ce++) {
            var ye = Q[ce].uid;
            for (he = 0; he < ee.length; he++) if (ye === ee[he].uid) continue e;
            me && ue._infolayer.select(".cb" + ye).remove();
          }
        }, E.linkSubplots = function(ee, X, Q, ue) {
          var ce, he, de = ue._plots || {}, ne = X._plots = {}, ae = X._subplots, se = { _fullData: ee, _fullLayout: X }, me = ae.cartesian.concat(ae.gl2d || []);
          for (ce = 0; ce < me.length; ce++) {
            var ye, pe = me[ce], be = de[pe], Ae = x.getFromId(se, pe, "x"), Se = x.getFromId(se, pe, "y");
            for (be ? ye = ne[pe] = be : (ye = ne[pe] = {}).id = pe, Ae._counterAxes.push(Se._id), Se._counterAxes.push(Ae._id), Ae._subplotsWith.push(pe), Se._subplotsWith.push(pe), ye.xaxis = Ae, ye.yaxis = Se, ye._hasClipOnAxisFalse = !1, he = 0; he < ee.length; he++) {
              var Me = ee[he];
              if (Me.xaxis === ye.xaxis._id && Me.yaxis === ye.yaxis._id && Me.cliponaxis === !1) {
                ye._hasClipOnAxisFalse = !0;
                break;
              }
            }
          }
          var De, Le = x.list(se, null, !0);
          for (ce = 0; ce < Le.length; ce++) {
            var We = null;
            (De = Le[ce]).overlaying && (We = x.getFromId(se, De.overlaying)) && We.overlaying && (De.overlaying = !1, We = null), De._mainAxis = We || De, We && (De.domain = We.domain.slice()), De._anchorAxis = De.anchor === "free" ? null : x.getFromId(se, De.anchor);
          }
          for (ce = 0; ce < Le.length; ce++) if ((De = Le[ce])._counterAxes.sort(x.idSort), De._subplotsWith.sort(c.subplotSort), De._mainSubplot = z(De, X), De._counterAxes.length && (De.spikemode && De.spikemode.indexOf("across") !== -1 || De.automargin && De.mirror && De.anchor !== "free" || _.getComponentMethod("rangeslider", "isVisible")(De))) {
            var Ee = 1, Ne = 0;
            for (he = 0; he < De._counterAxes.length; he++) {
              var Ie = x.getFromId(se, De._counterAxes[he]);
              Ee = Math.min(Ee, Ie.domain[0]), Ne = Math.max(Ne, Ie.domain[1]);
            }
            Ee < Ne && (De._counterDomainMin = Ee, De._counterDomainMax = Ne);
          }
        }, E.clearExpandedTraceDefaultColors = function(ee) {
          var X, Q, ue;
          for (Q = [], (X = ee._module._colorAttrs) || (ee._module._colorAttrs = X = [], d.crawl(ee._module.attributes, function(ce, he, de, ne) {
            Q[ne] = he, Q.length = ne + 1, ce.valType === "color" && ce.dflt === void 0 && X.push(Q.join("."));
          })), ue = 0; ue < X.length; ue++) c.nestedProperty(ee, "_input." + X[ue]).get() || c.nestedProperty(ee, X[ue]).set(null);
        }, E.supplyDataDefaults = function(ee, X, Q, ue) {
          var ce, he, de, ne = ue._modules, ae = ue._visibleModules, se = ue._basePlotModules, me = 0, ye = 0;
          function pe(ge) {
            X.push(ge);
            var Ce = ge._module;
            Ce && (c.pushUnique(ne, Ce), ge.visible === !0 && c.pushUnique(ae, Ce), c.pushUnique(se, ge._module.basePlotModule), me++, ge._input.visible !== !1 && ye++);
          }
          ue._transformModules = [];
          var be = {}, Ae = [], Se = (Q.template || {}).data || {}, Me = f.traceTemplater(Se);
          for (ce = 0; ce < ee.length; ce++) {
            if (de = ee[ce], (he = Me.newTrace(de)).uid = ue._traceUids[ce], E.supplyTraceDefaults(de, he, ye, ue, ce), he.index = ce, he._input = de, he._expandedIndex = me, he.transforms && he.transforms.length) for (var De = de.visible !== !1 && he.visible === !1, Le = U(he, X, Q, ue), We = 0; We < Le.length; We++) {
              var Ee = Le[We], Ne = { _template: he._template, type: he.type, uid: he.uid + We };
              De && Ee.visible === !1 && delete Ee.visible, E.supplyTraceDefaults(Ee, Ne, me, ue, ce), D(Ne, Ee), Ne.index = ce, Ne._input = de, Ne._fullInput = he, Ne._expandedIndex = me, Ne._expandedInput = Ee, pe(Ne);
            }
            else he._fullInput = he, he._expandedInput = he, pe(he);
            _.traceIs(he, "carpetAxis") && (be[he.carpet] = he), _.traceIs(he, "carpetDependent") && Ae.push(ce);
          }
          for (ce = 0; ce < Ae.length; ce++) if ((he = X[Ae[ce]]).visible) {
            var Ie = be[he.carpet];
            he._carpet = Ie, Ie && Ie.visible ? (he.xaxis = Ie.xaxis, he.yaxis = Ie.yaxis) : he.visible = !1;
          }
        }, E.supplyAnimationDefaults = function(ee) {
          var X;
          ee = ee || {};
          var Q = {};
          function ue(ce, he) {
            return c.coerce(ee || {}, Q, S, ce, he);
          }
          if (ue("mode"), ue("direction"), ue("fromcurrent"), Array.isArray(ee.frame)) for (Q.frame = [], X = 0; X < ee.frame.length; X++) Q.frame[X] = E.supplyAnimationFrameDefaults(ee.frame[X] || {});
          else Q.frame = E.supplyAnimationFrameDefaults(ee.frame || {});
          if (Array.isArray(ee.transition)) for (Q.transition = [], X = 0; X < ee.transition.length; X++) Q.transition[X] = E.supplyAnimationTransitionDefaults(ee.transition[X] || {});
          else Q.transition = E.supplyAnimationTransitionDefaults(ee.transition || {});
          return Q;
        }, E.supplyAnimationFrameDefaults = function(ee) {
          var X = {};
          function Q(ue, ce) {
            return c.coerce(ee || {}, X, S.frame, ue, ce);
          }
          return Q("duration"), Q("redraw"), X;
        }, E.supplyAnimationTransitionDefaults = function(ee) {
          var X = {};
          function Q(ue, ce) {
            return c.coerce(ee || {}, X, S.transition, ue, ce);
          }
          return Q("duration"), Q("easing"), X;
        }, E.supplyFrameDefaults = function(ee) {
          var X = {};
          function Q(ue, ce) {
            return c.coerce(ee, X, A, ue, ce);
          }
          return Q("group"), Q("name"), Q("traces"), Q("baseframe"), Q("data"), Q("layout"), X;
        }, E.supplyTraceDefaults = function(ee, X, Q, ue, ce) {
          var he, de = ue.colorway || g.defaults, ne = de[Q % de.length];
          function ae(We, Ee) {
            return c.coerce(ee, X, E.attributes, We, Ee);
          }
          var se = ae("visible");
          ae("type"), ae("name", ue._traceWord + " " + ce), ae("uirevision", ue.uirevision);
          var me = E.getModule(X);
          if (X._module = me, me) {
            var ye = me.basePlotModule, pe = ye.attr, be = ye.attributes;
            if (pe && be) {
              var Ae = ue._subplots, Se = "";
              if (se || ye.name !== "gl2d") {
                if (Array.isArray(pe)) for (he = 0; he < pe.length; he++) {
                  var Me = pe[he], De = c.coerce(ee, X, be, Me);
                  Ae[Me] && c.pushUnique(Ae[Me], De), Se += De;
                }
                else Se = c.coerce(ee, X, be, pe);
                Ae[ye.name] && c.pushUnique(Ae[ye.name], Se);
              }
            }
          }
          if (se) {
            if (ae("customdata"), ae("ids"), ae("meta"), _.traceIs(X, "showLegend") ? (c.coerce(ee, X, me.attributes.showlegend ? me.attributes : E.attributes, "showlegend"), ae("legend"), ae("legendwidth"), ae("legendgroup"), ae("legendgrouptitle.text"), ae("legendrank"), X._dfltShowLegend = !0) : X._dfltShowLegend = !1, me && me.supplyDefaults(ee, X, ne, ue), _.traceIs(X, "noOpacity") || ae("opacity"), _.traceIs(X, "notLegendIsolatable") && (X.visible = !!X.visible), _.traceIs(X, "noHover") || (X.hovertemplate || c.coerceHoverinfo(ee, X, ue), X.type !== "parcats" && _.getComponentMethod("fx", "supplyDefaults")(ee, X, ne, ue)), me && me.selectPoints) {
              var Le = ae("selectedpoints");
              c.isTypedArray(Le) && (X.selectedpoints = Array.from(Le));
            }
            E.supplyTransformDefaults(ee, X, ue);
          }
          return X;
        }, E.hasMakesDataTransform = F, E.supplyTransformDefaults = function(ee, X, Q) {
          if (X._length || F(ee)) {
            var ue = Q._globalTransforms || [], ce = Q._transformModules || [];
            if (Array.isArray(ee.transforms) || ue.length !== 0) for (var he = ee.transforms || [], de = ue.concat(he), ne = X.transforms = [], ae = 0; ae < de.length; ae++) {
              var se, me = de[ae], ye = me.type, pe = P[ye], be = !(me._module && me._module === pe), Ae = pe && typeof pe.transform == "function";
              pe || c.warn("Unrecognized transform type " + ye + "."), pe && pe.supplyDefaults && (be || Ae) ? ((se = pe.supplyDefaults(me, X, Q, ee)).type = ye, se._module = pe, c.pushUnique(ce, pe)) : se = c.extendFlat({}, me), ne.push(se);
            }
          }
        }, E.supplyLayoutGlobalDefaults = function(ee, X, Q) {
          function ue(me, ye) {
            return c.coerce(ee, X, E.layoutAttributes, me, ye);
          }
          var ce = ee.template;
          c.isPlainObject(ce) && (X.template = ce, X._template = ce.layout, X._dataTemplate = ce.data), ue("autotypenumbers");
          var he = c.coerceFont(ue, "font"), de = he.size;
          c.coerceFont(ue, "title.font", he, { overrideDflt: { size: Math.round(1.4 * de) } }), ue("title.text", X._dfltTitle.plot), ue("title.xref");
          var ne = ue("title.yref");
          ue("title.pad.t"), ue("title.pad.r"), ue("title.pad.b"), ue("title.pad.l");
          var ae = ue("title.automargin");
          ue("title.x"), ue("title.xanchor"), ue("title.y"), ue("title.yanchor"), ue("title.subtitle.text", X._dfltTitle.subtitle), c.coerceFont(ue, "title.subtitle.font", he, { overrideDflt: { size: Math.round(0.7 * X.title.font.size) } }), ae && (ne === "paper" && (X.title.y !== 0 && (X.title.y = 1), X.title.yanchor === "auto" && (X.title.yanchor = X.title.y === 0 ? "top" : "bottom")), ne === "container" && (X.title.y === "auto" && (X.title.y = 1), X.title.yanchor === "auto" && (X.title.yanchor = X.title.y < 0.5 ? "bottom" : "top"))), ue("uniformtext.mode") && ue("uniformtext.minsize"), ue("autosize", !(ee.width && ee.height)), ue("width"), ue("height"), ue("minreducedwidth"), ue("minreducedheight"), ue("margin.l"), ue("margin.r"), ue("margin.t"), ue("margin.b"), ue("margin.pad"), ue("margin.autoexpand"), ee.width && ee.height && E.sanitizeMargins(X), _.getComponentMethod("grid", "sizeDefaults")(ee, X), ue("paper_bgcolor"), ue("separators", Q.decimal + Q.thousands), ue("hidesources"), ue("colorway"), ue("datarevision");
          var se = ue("uirevision");
          ue("editrevision", se), ue("selectionrevision", se), _.getComponentMethod("modebar", "supplyLayoutDefaults")(ee, X), _.getComponentMethod("shapes", "supplyDrawNewShapeDefaults")(ee, X, ue), _.getComponentMethod("selections", "supplyDrawNewSelectionDefaults")(ee, X, ue), ue("meta"), c.isPlainObject(ee.transition) && (ue("transition.duration"), ue("transition.easing"), ue("transition.ordering")), _.getComponentMethod("calendars", "handleDefaults")(ee, X, "calendar"), _.getComponentMethod("fx", "supplyLayoutGlobalDefaults")(ee, X, ue), c.coerce(ee, X, k, "scattermode");
        }, E.plotAutoSize = function(ee, X, Q) {
          var ue, ce, he = ee._context || {}, de = he.frameMargins, ne = c.isPlotDiv(ee);
          if (ne && ee.emit("plotly_autosize"), he.fillFrame) ue = window.innerWidth, ce = window.innerHeight, document.body.style.overflow = "hidden";
          else {
            var ae = ne ? window.getComputedStyle(ee) : {};
            if (ue = V(ae.width) || V(ae.maxWidth) || Q.width, ce = V(ae.height) || V(ae.maxHeight) || Q.height, h(de) && de > 0) {
              var se = 1 - 2 * de;
              ue = Math.round(se * ue), ce = Math.round(se * ce);
            }
          }
          var me = E.layoutAttributes.width.min, ye = E.layoutAttributes.height.min;
          ue < me && (ue = me), ce < ye && (ce = ye);
          var pe = !X.width && Math.abs(Q.width - ue) > 1, be = !X.height && Math.abs(Q.height - ce) > 1;
          (be || pe) && (pe && (Q.width = ue), be && (Q.height = ce)), ee._initialAutoSize || (ee._initialAutoSize = { width: ue, height: ce }), E.sanitizeMargins(Q);
        }, E.supplyLayoutModuleDefaults = function(ee, X, Q, ue) {
          var ce, he, de, ne = _.componentsRegistry, ae = X._basePlotModules, se = _.subplotsRegistry.cartesian;
          for (ce in ne) (de = ne[ce]).includeBasePlot && de.includeBasePlot(ee, X);
          for (var me in ae.length || ae.push(se), X._has("cartesian") && (_.getComponentMethod("grid", "contentDefaults")(ee, X), se.finalizeSubplots(ee, X)), X._subplots) X._subplots[me].sort(c.subplotSort);
          for (he = 0; he < ae.length; he++) (de = ae[he]).supplyLayoutDefaults && de.supplyLayoutDefaults(ee, X, Q);
          var ye = X._modules;
          for (he = 0; he < ye.length; he++) (de = ye[he]).supplyLayoutDefaults && de.supplyLayoutDefaults(ee, X, Q);
          var pe = X._transformModules;
          for (he = 0; he < pe.length; he++) (de = pe[he]).supplyLayoutDefaults && de.supplyLayoutDefaults(ee, X, Q, ue);
          for (ce in ne) (de = ne[ce]).supplyLayoutDefaults && de.supplyLayoutDefaults(ee, X, Q);
        }, E.purge = function(ee) {
          var X = ee._fullLayout || {};
          X._glcontainer !== void 0 && (X._glcontainer.selectAll(".gl-canvas").remove(), X._glcontainer.remove(), X._glcanvas = null), X._modeBar && X._modeBar.destroy(), ee._transitionData && (ee._transitionData._interruptCallbacks && (ee._transitionData._interruptCallbacks.length = 0), ee._transitionData._animationRaf && window.cancelAnimationFrame(ee._transitionData._animationRaf)), c.clearThrottle(), c.clearResponsive(ee), delete ee.data, delete ee.layout, delete ee._fullData, delete ee._fullLayout, delete ee.calcdata, delete ee.empty, delete ee.fid, delete ee.undoqueue, delete ee.undonum, delete ee.autoplay, delete ee.changed, delete ee._promises, delete ee._redrawTimer, delete ee._hmlumcount, delete ee._hmpixcount, delete ee._transitionData, delete ee._transitioning, delete ee._initialAutoSize, delete ee._transitioningWithDuration, delete ee._dragging, delete ee._dragged, delete ee._dragdata, delete ee._hoverdata, delete ee._snapshotInProgress, delete ee._editing, delete ee._mouseDownTime, delete ee._legendMouseDownTime, ee.removeAllListeners && ee.removeAllListeners();
        }, E.style = function(ee) {
          var X, Q = ee._fullLayout._visibleModules, ue = [];
          for (X = 0; X < Q.length; X++) {
            var ce = Q[X];
            ce.style && c.pushUnique(ue, ce.style);
          }
          for (X = 0; X < ue.length; X++) ue[X](ee);
        }, E.sanitizeMargins = function(ee) {
          if (ee && ee.margin) {
            var X, Q = ee.width, ue = ee.height, ce = ee.margin, he = Q - (ce.l + ce.r), de = ue - (ce.t + ce.b);
            he < 0 && (X = (Q - 1) / (ce.l + ce.r), ce.l = Math.floor(X * ce.l), ce.r = Math.floor(X * ce.r)), de < 0 && (X = (ue - 1) / (ce.t + ce.b), ce.t = Math.floor(X * ce.t), ce.b = Math.floor(X * ce.b));
          }
        }, E.clearAutoMarginIds = function(ee) {
          ee._fullLayout._pushmarginIds = {};
        }, E.allowAutoMargin = function(ee, X) {
          ee._fullLayout._pushmarginIds[X] = 1;
        }, E.autoMargin = function(ee, X, Q) {
          var ue = ee._fullLayout, ce = ue.width, he = ue.height, de = ue.margin, ne = ue.minreducedwidth, ae = ue.minreducedheight, se = c.constrain(ce - de.l - de.r, 2, ne), me = c.constrain(he - de.t - de.b, 2, ae), ye = Math.max(0, ce - se), pe = Math.max(0, he - me), be = ue._pushmargin, Ae = ue._pushmarginIds;
          if (de.autoexpand !== !1) {
            if (Q) {
              var Se = Q.pad;
              if (Se === void 0 && (Se = Math.min(12, de.l, de.r, de.t, de.b)), ye) {
                var Me = (Q.l + Q.r) / ye;
                Me > 1 && (Q.l /= Me, Q.r /= Me);
              }
              if (pe) {
                var De = (Q.t + Q.b) / pe;
                De > 1 && (Q.t /= De, Q.b /= De);
              }
              var Le = Q.xl !== void 0 ? Q.xl : Q.x, We = Q.xr !== void 0 ? Q.xr : Q.x, Ee = Q.yt !== void 0 ? Q.yt : Q.y, Ne = Q.yb !== void 0 ? Q.yb : Q.y;
              be[X] = { l: { val: Le, size: Q.l + Se }, r: { val: We, size: Q.r + Se }, b: { val: Ne, size: Q.b + Se }, t: { val: Ee, size: Q.t + Se } }, Ae[X] = 1;
            } else delete be[X], delete Ae[X];
            if (!ue._replotting) return E.doAutoMargin(ee);
          }
        }, E.doAutoMargin = function(ee) {
          var X = ee._fullLayout, Q = X.width, ue = X.height;
          X._size || (X._size = {}), $(X);
          var ce = X._size, he = X.margin, de = { t: 0, b: 0, l: 0, r: 0 }, ne = c.extendFlat({}, ce), ae = he.l, se = he.r, me = he.t, ye = he.b, pe = X._pushmargin, be = X._pushmarginIds, Ae = X.minreducedwidth, Se = X.minreducedheight;
          if (he.autoexpand !== !1) {
            for (var Me in pe) be[Me] || delete pe[Me];
            var De = ee._fullLayout._reservedMargin;
            for (var Le in De) for (var We in De[Le]) {
              var Ee = De[Le][We];
              de[We] = Math.max(de[We], Ee);
            }
            for (var Ne in pe.base = { l: { val: 0, size: ae }, r: { val: 1, size: se }, t: { val: 1, size: me }, b: { val: 0, size: ye } }, de) {
              var Ie = 0;
              for (var ge in pe) ge !== "base" && h(pe[ge][Ne].size) && (Ie = pe[ge][Ne].size > Ie ? pe[ge][Ne].size : Ie);
              var Ce = Math.max(0, he[Ne] - Ie);
              de[Ne] = Math.max(0, de[Ne] - Ce);
            }
            for (var we in pe) {
              var Ge = pe[we].l || {}, Re = pe[we].b || {}, je = Ge.val, Ke = Ge.size, tt = Re.val, _e = Re.size, Be = Q - de.r - de.l, $e = ue - de.t - de.b;
              for (var Ze in pe) {
                if (h(Ke) && pe[Ze].r) {
                  var ct = pe[Ze].r.val, ft = pe[Ze].r.size;
                  if (ct > je) {
                    var _t = (Ke * ct + (ft - Be) * je) / (ct - je), Pt = (ft * (1 - je) + (Ke - Be) * (1 - ct)) / (ct - je);
                    _t + Pt > ae + se && (ae = _t, se = Pt);
                  }
                }
                if (h(_e) && pe[Ze].t) {
                  var Dt = pe[Ze].t.val, $t = pe[Ze].t.size;
                  if (Dt > tt) {
                    var Gt = (_e * Dt + ($t - $e) * tt) / (Dt - tt), Wt = ($t * (1 - tt) + (_e - $e) * (1 - Dt)) / (Dt - tt);
                    Gt + Wt > ye + me && (ye = Gt, me = Wt);
                  }
                }
              }
            }
          }
          var mt = c.constrain(Q - he.l - he.r, 2, Ae), at = c.constrain(ue - he.t - he.b, 2, Se), vt = Math.max(0, Q - mt), St = Math.max(0, ue - at);
          if (vt) {
            var Je = (ae + se) / vt;
            Je > 1 && (ae /= Je, se /= Je);
          }
          if (St) {
            var nt = (ye + me) / St;
            nt > 1 && (ye /= nt, me /= nt);
          }
          if (ce.l = Math.round(ae) + de.l, ce.r = Math.round(se) + de.r, ce.t = Math.round(me) + de.t, ce.b = Math.round(ye) + de.b, ce.p = Math.round(he.pad), ce.w = Math.round(Q) - ce.l - ce.r, ce.h = Math.round(ue) - ce.t - ce.b, !X._replotting && (E.didMarginChange(ne, ce) || function(Ye) {
            if ("_redrawFromAutoMarginCount" in Ye._fullLayout) return !1;
            var Fe = x.list(Ye, "", !0);
            for (var pt in Fe) if (Fe[pt].autoshift || Fe[pt].shift) return !0;
            return !1;
          }(ee))) {
            "_redrawFromAutoMarginCount" in X ? X._redrawFromAutoMarginCount++ : X._redrawFromAutoMarginCount = 1;
            var ot = 3 * (1 + Object.keys(be).length);
            if (X._redrawFromAutoMarginCount < ot) return _.call("_doPlot", ee);
            X._size = ne, c.warn("Too many auto-margin redraws.");
          }
          (function(Ye) {
            var Fe = x.list(Ye, "", !0);
            ["_adjustTickLabelsOverflow", "_hideCounterAxisInsideTickLabels"].forEach(function(pt) {
              for (var Mt = 0; Mt < Fe.length; Mt++) {
                var At = Fe[Mt][pt];
                At && At();
              }
            });
          })(ee);
        };
        var q = ["l", "r", "t", "b", "p", "w", "h"];
        function K(ee, X, Q) {
          var ue = !1, ce = [E.previousPromises, function() {
            if (ee._transitionData) return ee._transitioning = !1, function(de) {
              var ne = Promise.resolve();
              if (!de) return ne;
              for (; de.length; ) ne = ne.then(de.shift());
              return ne;
            }(ee._transitionData._interruptCallbacks);
          }, Q.prepareFn, E.rehover, E.reselect, function() {
            return ee.emit("plotly_transitioning", []), new Promise(function(de) {
              ee._transitioning = !0, X.duration > 0 && (ee._transitioningWithDuration = !0), ee._transitionData._interruptCallbacks.push(function() {
                ue = !0;
              }), Q.redraw && ee._transitionData._interruptCallbacks.push(function() {
                return _.call("redraw", ee);
              }), ee._transitionData._interruptCallbacks.push(function() {
                ee.emit("plotly_transitioninterrupted", []);
              });
              var ne = 0, ae = 0;
              function se() {
                return ne++, function() {
                  var me;
                  ae++, ue || ae !== ne || (me = de, ee._transitionData && (function(ye) {
                    if (ye) for (; ye.length; ) ye.shift();
                  }(ee._transitionData._interruptCallbacks), Promise.resolve().then(function() {
                    if (Q.redraw) return _.call("redraw", ee);
                  }).then(function() {
                    ee._transitioning = !1, ee._transitioningWithDuration = !1, ee.emit("plotly_transitioned", []);
                  }).then(me)));
                };
              }
              Q.runFn(se), setTimeout(se());
            });
          }], he = c.syncOrAsync(ce, ee);
          return he && he.then || (he = Promise.resolve()), he.then(function() {
            return ee;
          });
        }
        E.didMarginChange = function(ee, X) {
          for (var Q = 0; Q < q.length; Q++) {
            var ue = q[Q], ce = ee[ue], he = X[ue];
            if (!h(ce) || Math.abs(he - ce) > 1) return !0;
          }
          return !1;
        }, E.graphJson = function(ee, X, Q, ue, ce, he) {
          (ce && X && !ee._fullData || ce && !X && !ee._fullLayout) && E.supplyDefaults(ee);
          var de = ce ? ee._fullData : ee.data, ne = ce ? ee._fullLayout : ee.layout, ae = (ee._transitionData || {})._frames;
          function se(pe, be) {
            if (typeof pe == "function") return be ? "_function_" : null;
            if (c.isPlainObject(pe)) {
              var Ae, Se = {};
              return Object.keys(pe).sort().forEach(function(We) {
                if (["_", "["].indexOf(We.charAt(0)) === -1) if (typeof pe[We] != "function") {
                  if (Q === "keepdata") {
                    if (We.substr(We.length - 3) === "src") return;
                  } else if (Q === "keepstream") {
                    if (typeof (Ae = pe[We + "src"]) == "string" && Ae.indexOf(":") > 0 && !c.isPlainObject(pe.stream)) return;
                  } else if (Q !== "keepall" && typeof (Ae = pe[We + "src"]) == "string" && Ae.indexOf(":") > 0) return;
                  Se[We] = se(pe[We], be);
                } else be && (Se[We] = "_function");
              }), Se;
            }
            var Me = Array.isArray(pe), De = c.isTypedArray(pe);
            if ((Me || De) && pe.dtype && pe.shape) {
              var Le = pe.bdata;
              return se({ dtype: pe.dtype, shape: pe.shape, bdata: c.isArrayBuffer(Le) ? p.encode(Le) : Le }, be);
            }
            return Me ? pe.map(function(We) {
              return se(We, be);
            }) : De ? c.simpleMap(pe, c.identity) : c.isJSDate(pe) ? c.ms2DateTimeLocal(+pe) : pe;
          }
          var me = { data: (de || []).map(function(pe) {
            var be = se(pe);
            return X && delete be.fit, be;
          }) };
          if (!X && (me.layout = se(ne), ce)) {
            var ye = ne._size;
            me.layout.computed = { margin: { b: ye.b, l: ye.l, r: ye.r, t: ye.t } };
          }
          return ae && (me.frames = se(ae)), he && (me.config = se(ee._context, !0)), ue === "object" ? me : JSON.stringify(me);
        }, E.modifyFrames = function(ee, X) {
          var Q, ue, ce, he = ee._transitionData._frames, de = ee._transitionData._frameHash;
          for (Q = 0; Q < X.length; Q++) switch ((ue = X[Q]).type) {
            case "replace":
              ce = ue.value;
              var ne = (he[ue.index] || {}).name, ae = ce.name;
              he[ue.index] = de[ae] = ce, ae !== ne && (delete de[ne], de[ae] = ce);
              break;
            case "insert":
              de[(ce = ue.value).name] = ce, he.splice(ue.index, 0, ce);
              break;
            case "delete":
              delete de[(ce = he[ue.index]).name], he.splice(ue.index, 1);
          }
          return Promise.resolve();
        }, E.computeFrame = function(ee, X) {
          var Q, ue, ce, he, de = ee._transitionData._frameHash;
          if (!X) throw new Error("computeFrame must be given a string frame name");
          var ne = de[X.toString()];
          if (!ne) return !1;
          for (var ae = [ne], se = [ne.name]; ne.baseframe && (ne = de[ne.baseframe.toString()]) && se.indexOf(ne.name) === -1; ) ae.push(ne), se.push(ne.name);
          for (var me = {}; ne = ae.pop(); ) if (ne.layout && (me.layout = E.extendLayout(me.layout, ne.layout)), ne.data) {
            if (me.data || (me.data = []), !(ue = ne.traces)) for (ue = [], Q = 0; Q < ne.data.length; Q++) ue[Q] = Q;
            for (me.traces || (me.traces = []), Q = 0; Q < ne.data.length; Q++) (ce = ue[Q]) != null && ((he = me.traces.indexOf(ce)) === -1 && (he = me.data.length, me.traces[he] = ce), me.data[he] = E.extendTrace(me.data[he], ne.data[Q]));
          }
          return me;
        }, E.recomputeFrameHash = function(ee) {
          for (var X = ee._transitionData._frameHash = {}, Q = ee._transitionData._frames, ue = 0; ue < Q.length; ue++) {
            var ce = Q[ue];
            ce && ce.name && (X[ce.name] = ce);
          }
        }, E.extendObjectWithContainers = function(ee, X, Q) {
          var ue, ce, he, de, ne, ae, se, me = c.extendDeepNoArrays({}, X || {}), ye = c.expandObjectPaths(me), pe = {};
          if (Q && Q.length) for (he = 0; he < Q.length; he++) (ce = (ue = c.nestedProperty(ye, Q[he])).get()) === void 0 ? c.nestedProperty(pe, Q[he]).set(null) : (ue.set(null), c.nestedProperty(pe, Q[he]).set(ce));
          if (ee = c.extendDeepNoArrays(ee || {}, ye), Q && Q.length) {
            for (he = 0; he < Q.length; he++) if (ae = c.nestedProperty(pe, Q[he]).get()) {
              for (se = (ne = c.nestedProperty(ee, Q[he])).get(), Array.isArray(se) || (se = [], ne.set(se)), de = 0; de < ae.length; de++) {
                var be = ae[de];
                se[de] = be === null ? null : E.extendObjectWithContainers(se[de], be);
              }
              ne.set(se);
            }
          }
          return ee;
        }, E.dataArrayContainers = ["transforms", "dimensions"], E.layoutArrayContainers = _.layoutArrayContainers, E.extendTrace = function(ee, X) {
          return E.extendObjectWithContainers(ee, X, E.dataArrayContainers);
        }, E.extendLayout = function(ee, X) {
          return E.extendObjectWithContainers(ee, X, E.layoutArrayContainers);
        }, E.transition = function(ee, X, Q, ue, ce, he) {
          var de = { redraw: ce.redraw }, ne = {}, ae = [];
          return de.prepareFn = function() {
            for (var se = Array.isArray(X) ? X.length : 0, me = ue.slice(0, se), ye = 0; ye < me.length; ye++) {
              var pe = me[ye], be = ee._fullData[pe]._module;
              if (be) {
                if (be.animatable) {
                  var Ae = be.basePlotModule.name;
                  ne[Ae] || (ne[Ae] = []), ne[Ae].push(pe);
                }
                ee.data[me[ye]] = E.extendTrace(ee.data[me[ye]], X[ye]);
              }
            }
            var Se = c.expandObjectPaths(c.extendDeepNoArrays({}, Q)), Me = /^[xy]axis[0-9]*$/;
            for (var De in Se) Me.test(De) && delete Se[De].range;
            E.extendLayout(ee.layout, Se), delete ee.calcdata, E.supplyDefaults(ee), E.doCalcdata(ee);
            var Le = c.expandObjectPaths(Q);
            if (Le) {
              var We = ee._fullLayout._plots;
              for (var Ee in We) {
                var Ne = We[Ee], Ie = Ne.xaxis, ge = Ne.yaxis, Ce = Ie.range.slice(), we = ge.range.slice(), Ge = null, Re = null, je = null, Ke = null;
                Array.isArray(Le[Ie._name + ".range"]) ? Ge = Le[Ie._name + ".range"].slice() : Array.isArray((Le[Ie._name] || {}).range) && (Ge = Le[Ie._name].range.slice()), Array.isArray(Le[ge._name + ".range"]) ? Re = Le[ge._name + ".range"].slice() : Array.isArray((Le[ge._name] || {}).range) && (Re = Le[ge._name].range.slice()), Ce && Ge && (Ie.r2l(Ce[0]) !== Ie.r2l(Ge[0]) || Ie.r2l(Ce[1]) !== Ie.r2l(Ge[1])) && (je = { xr0: Ce, xr1: Ge }), we && Re && (ge.r2l(we[0]) !== ge.r2l(Re[0]) || ge.r2l(we[1]) !== ge.r2l(Re[1])) && (Ke = { yr0: we, yr1: Re }), (je || Ke) && ae.push(c.extendFlat({ plotinfo: Ne }, je, Ke));
              }
            }
            return Promise.resolve();
          }, de.runFn = function(se) {
            var me, ye, pe = ee._fullLayout._basePlotModules, be = ae.length;
            if (Q) for (ye = 0; ye < pe.length; ye++) pe[ye].transitionAxes && pe[ye].transitionAxes(ee, ae, he, se);
            for (var Ae in be ? ((me = c.extendFlat({}, he)).duration = 0, delete ne.cartesian) : me = he, ne) {
              var Se = ne[Ae];
              ee._fullData[Se[0]]._module.basePlotModule.plot(ee, Se, me, se);
            }
          }, K(ee, he, de);
        }, E.transitionFromReact = function(ee, X, Q, ue) {
          var ce = ee._fullLayout, he = ce.transition, de = {}, ne = [];
          return de.prepareFn = function() {
            var ae = ce._plots;
            for (var se in de.redraw = !1, X.anim === "some" && (de.redraw = !0), Q.anim === "some" && (de.redraw = !0), ae) {
              var me = ae[se], ye = me.xaxis, pe = me.yaxis, be = ue[ye._name].range.slice(), Ae = ue[pe._name].range.slice(), Se = ye.range.slice(), Me = pe.range.slice();
              ye.setScale(), pe.setScale();
              var De = null, Le = null;
              ye.r2l(be[0]) === ye.r2l(Se[0]) && ye.r2l(be[1]) === ye.r2l(Se[1]) || (De = { xr0: be, xr1: Se }), pe.r2l(Ae[0]) === pe.r2l(Me[0]) && pe.r2l(Ae[1]) === pe.r2l(Me[1]) || (Le = { yr0: Ae, yr1: Me }), (De || Le) && ne.push(c.extendFlat({ plotinfo: me }, De, Le));
            }
            return Promise.resolve();
          }, de.runFn = function(ae) {
            for (var se, me, ye, pe = ee._fullData, be = ee._fullLayout._basePlotModules, Ae = [], Se = 0; Se < pe.length; Se++) Ae.push(Se);
            function Me() {
              if (ee._fullLayout) for (var Le = 0; Le < be.length; Le++) be[Le].transitionAxes && be[Le].transitionAxes(ee, ne, se, ae);
            }
            function De() {
              if (ee._fullLayout) for (var Le = 0; Le < be.length; Le++) be[Le].plot(ee, ye, me, ae);
            }
            ne.length && X.anim ? he.ordering === "traces first" ? (se = c.extendFlat({}, he, { duration: 0 }), ye = Ae, me = he, setTimeout(Me, he.duration), De()) : (se = he, ye = null, me = c.extendFlat({}, he, { duration: 0 }), setTimeout(De, se.duration), Me()) : ne.length ? (se = he, Me()) : X.anim && (ye = Ae, me = he, De());
          }, K(ee, he, de);
        }, E.doCalcdata = function(ee, X) {
          var Q, ue, ce, he, de = x.list(ee), ne = ee._fullData, ae = ee._fullLayout, se = new Array(ne.length), me = (ee.calcdata || []).slice();
          for (ee.calcdata = se, ae._numBoxes = 0, ae._numViolins = 0, ae._violinScaleGroupStats = {}, ee._hmpixcount = 0, ee._hmlumcount = 0, ae._piecolormap = {}, ae._sunburstcolormap = {}, ae._treemapcolormap = {}, ae._iciclecolormap = {}, ae._funnelareacolormap = {}, ce = 0; ce < ne.length; ce++) Array.isArray(X) && X.indexOf(ce) === -1 && (se[ce] = me[ce]);
          for (ce = 0; ce < ne.length; ce++) (Q = ne[ce])._arrayAttrs = d.findArrayAttributes(Q), Q._extremes = {};
          var ye = ae._subplots.polar || [];
          for (ce = 0; ce < ye.length; ce++) de.push(ae[ye[ce]].radialaxis, ae[ye[ce]].angularaxis);
          for (var pe in ae._colorAxes) {
            var be = ae[pe];
            be.cauto !== !1 && (delete be.cmin, delete be.cmax);
          }
          var Ae = !1;
          function Se(Le) {
            if (Q = ne[Le], ue = Q._module, Q.visible === !0 && Q.transforms) {
              if (ue && ue.calc) {
                var We = ue.calc(ee, Q);
                We[0] && We[0].t && We[0].t._scene && delete We[0].t._scene.dirty;
              }
              for (he = 0; he < Q.transforms.length; he++) {
                var Ee = Q.transforms[he];
                (ue = P[Ee.type]) && ue.calcTransform && (Q._hasCalcTransform = !0, Ae = !0, ue.calcTransform(ee, Q, Ee));
              }
            }
          }
          function Me(Le, We) {
            if (Q = ne[Le], !!(ue = Q._module).isContainer === We) {
              var Ee = [];
              if (Q.visible === !0 && Q._length !== 0) {
                delete Q._indexToPoints;
                var Ne = Q.transforms || [];
                for (he = Ne.length - 1; he >= 0; he--) if (Ne[he].enabled) {
                  Q._indexToPoints = Ne[he]._indexToPoints;
                  break;
                }
                ue && ue.calc && (Ee = ue.calc(ee, Q));
              }
              Array.isArray(Ee) && Ee[0] || (Ee = [{ x: m, y: m }]), Ee[0].t || (Ee[0].t = {}), Ee[0].trace = Q, se[Le] = Ee;
            }
          }
          for (Y(de, ne, ae), ce = 0; ce < ne.length; ce++) Me(ce, !0);
          for (ce = 0; ce < ne.length; ce++) Se(ce);
          for (Ae && Y(de, ne, ae), ce = 0; ce < ne.length; ce++) Me(ce, !0);
          for (ce = 0; ce < ne.length; ce++) Me(ce, !1);
          te(ee);
          var De = function(Le, We) {
            var Ee, Ne, Ie, ge, Ce, we = [];
            function Ge(pt, Mt, At) {
              var Rt = Mt._id.charAt(0);
              if (pt === "histogram2dcontour") {
                var Ft = Mt._counterAxes[0], lt = x.getFromId(We, Ft), st = Rt === "x" || Ft === "x" && lt.type === "category", Ot = Rt === "y" || Ft === "y" && lt.type === "category";
                return function(kt, Bt) {
                  return kt === 0 || Bt === 0 || st && kt === At[Bt].length - 1 || Ot && Bt === At.length - 1 ? -1 : (Rt === "y" ? Bt : kt) - 1;
                };
              }
              return function(kt, Bt) {
                return Rt === "y" ? Bt : kt;
              };
            }
            var Re = { min: function(pt) {
              return c.aggNums(Math.min, null, pt);
            }, max: function(pt) {
              return c.aggNums(Math.max, null, pt);
            }, sum: function(pt) {
              return c.aggNums(function(Mt, At) {
                return Mt + At;
              }, null, pt);
            }, total: function(pt) {
              return c.aggNums(function(Mt, At) {
                return Mt + At;
              }, null, pt);
            }, mean: function(pt) {
              return c.mean(pt);
            }, "geometric mean": function(pt) {
              return c.geometricMean(pt);
            }, median: function(pt) {
              return c.median(pt);
            } };
            function je(pt, Mt) {
              return pt[1] - Mt[1];
            }
            function Ke(pt, Mt) {
              return Mt[1] - pt[1];
            }
            for (Ee = 0; Ee < Le.length; Ee++) {
              var tt = Le[Ee];
              if (tt.type === "category") {
                var _e = tt.categoryorder.match(re);
                if (_e) {
                  var Be = _e[1], $e = _e[2], Ze = tt._id.charAt(0), ct = Ze === "x", ft = [];
                  for (Ne = 0; Ne < tt._categories.length; Ne++) ft.push([tt._categories[Ne], []]);
                  for (Ne = 0; Ne < tt._traceIndices.length; Ne++) {
                    var _t = tt._traceIndices[Ne], Pt = We._fullData[_t];
                    if (Pt.visible === !0) {
                      var Dt = Pt.type;
                      _.traceIs(Pt, "histogram") && (delete Pt._xautoBinFinished, delete Pt._yautoBinFinished);
                      var $t = Dt === "splom", Gt = Dt === "scattergl", Wt = We.calcdata[_t];
                      for (Ie = 0; Ie < Wt.length; Ie++) {
                        var mt, at, vt = Wt[Ie];
                        if ($t) {
                          var St = Pt._axesDim[tt._id];
                          if (!ct) {
                            var Je = Pt._diag[St][0];
                            Je && (tt = We._fullLayout[x.id2name(Je)]);
                          }
                          var nt = vt.trace.dimensions[St].values;
                          for (ge = 0; ge < nt.length; ge++) for (mt = tt._categoriesMap[nt[ge]], Ce = 0; Ce < vt.trace.dimensions.length; Ce++) if (Ce !== St) {
                            var ot = vt.trace.dimensions[Ce];
                            ft[mt][1].push(ot.values[ge]);
                          }
                        } else if (Gt) {
                          for (ge = 0; ge < vt.t.x.length; ge++) ct ? (mt = vt.t.x[ge], at = vt.t.y[ge]) : (mt = vt.t.y[ge], at = vt.t.x[ge]), ft[mt][1].push(at);
                          vt.t && vt.t._scene && delete vt.t._scene.dirty;
                        } else if (vt.hasOwnProperty("z")) {
                          at = vt.z;
                          var Ye = Ge(Pt.type, tt, at);
                          for (ge = 0; ge < at.length; ge++) for (Ce = 0; Ce < at[ge].length; Ce++) (mt = Ye(Ce, ge)) + 1 && ft[mt][1].push(at[ge][Ce]);
                        } else for ((mt = vt.p) === void 0 && (mt = vt[Ze]), (at = vt.s) === void 0 && (at = vt.v), at === void 0 && (at = ct ? vt.y : vt.x), Array.isArray(at) || (at = at === void 0 ? [] : [at]), ge = 0; ge < at.length; ge++) ft[mt][1].push(at[ge]);
                      }
                    }
                  }
                  tt._categoriesValue = ft;
                  var Fe = [];
                  for (Ne = 0; Ne < ft.length; Ne++) Fe.push([ft[Ne][0], Re[Be](ft[Ne][1])]);
                  Fe.sort($e === "descending" ? Ke : je), tt._categoriesAggregatedValue = Fe, tt._initialCategories = Fe.map(function(pt) {
                    return pt[0];
                  }), we = we.concat(tt.sortByInitialCategories());
                }
              }
            }
            return we;
          }(de, ee);
          if (De.length) {
            for (ae._numBoxes = 0, ae._numViolins = 0, ce = 0; ce < De.length; ce++) Me(De[ce], !0);
            for (ce = 0; ce < De.length; ce++) Me(De[ce], !1);
            te(ee);
          }
          _.getComponentMethod("fx", "calc")(ee), _.getComponentMethod("errorbars", "calc")(ee);
        };
        var re = /(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;
        function Y(ee, X, Q) {
          var ue = {};
          function ce(ae) {
            ae.clearCalc(), ae.type === "multicategory" && ae.setupMultiCategory(X), ue[ae._id] = 1;
          }
          c.simpleMap(ee, ce);
          for (var he = Q._axisMatchGroups || [], de = 0; de < he.length; de++) for (var ne in he[de]) ue[ne] || ce(Q[x.id2name(ne)]);
        }
        function te(ee) {
          var X, Q, ue, ce = ee._fullLayout, he = ce._visibleModules, de = {};
          for (Q = 0; Q < he.length; Q++) {
            var ne = he[Q], ae = ne.crossTraceCalc;
            if (ae) {
              var se = ne.basePlotModule.name;
              de[se] ? c.pushUnique(de[se], ae) : de[se] = [ae];
            }
          }
          for (ue in de) {
            var me = de[ue], ye = ce._subplots[ue];
            if (Array.isArray(ye)) for (X = 0; X < ye.length; X++) {
              var pe = ye[X], be = ue === "cartesian" ? ce._plots[pe] : ce[pe];
              for (Q = 0; Q < me.length; Q++) me[Q](ee, be, pe);
            }
            else for (Q = 0; Q < me.length; Q++) me[Q](ee);
          }
        }
        E.rehover = function(ee) {
          ee._fullLayout._rehover && ee._fullLayout._rehover();
        }, E.redrag = function(ee) {
          ee._fullLayout._redrag && ee._fullLayout._redrag();
        }, E.reselect = function(ee) {
          var X = ee._fullLayout, Q = (ee.layout || {}).selections, ue = X._previousSelections;
          X._previousSelections = Q;
          var ce = X._reselect || JSON.stringify(Q) !== JSON.stringify(ue);
          _.getComponentMethod("selections", "reselect")(ee, ce);
        }, E.generalUpdatePerTraceModule = function(ee, X, Q, ue) {
          var ce, he = X.traceHash, de = {};
          for (ce = 0; ce < Q.length; ce++) {
            var ne = Q[ce], ae = ne[0].trace;
            ae.visible && (de[ae.type] = de[ae.type] || [], de[ae.type].push(ne));
          }
          for (var se in he) if (!de[se]) {
            var me = he[se][0];
            me[0].trace.visible = !1, de[se] = [me];
          }
          for (var ye in de) {
            var pe = de[ye];
            pe[0][0].trace._module.plot(ee, X, c.filterVisible(pe), ue);
          }
          X.traceHash = de;
        }, E.plotBasePlot = function(ee, X, Q, ue, ce) {
          var he = _.getModule(ee), de = C(X.calcdata, he)[0];
          he.plot(X, de, ue, ce);
        }, E.cleanBasePlot = function(ee, X, Q, ue, ce) {
          var he = ce._has && ce._has(ee), de = Q._has && Q._has(ee);
          he && !de && ce["_" + ee + "layer"].selectAll("g.trace").remove();
        };
      }, 26484: function(o) {
        o.exports = { attr: "subplot", name: "polar", axisNames: ["angularaxis", "radialaxis"], axisName2dataArray: { angularaxis: "theta", radialaxis: "r" }, layerNames: ["draglayer", "plotbg", "backplot", "angular-grid", "radial-grid", "frontplot", "angular-line", "radial-line", "angular-axis", "radial-axis"], radialDragBoxSize: 50, angularDragBoxSize: 30, cornerLen: 25, cornerHalfWidth: 2, MINDRAG: 8, MINZOOM: 20, OFFEDGE: 20 };
      }, 95928: function(o, s, n) {
        var l = n(34809), u = n(80899).tester, i = l.findIndexOfMin, h = l.isAngleInsideSector, p = l.angleDelta, _ = l.angleDist;
        function d(m, x, w, k) {
          var S, A, C = k[0], D = k[1], L = c(Math.sin(x) - Math.sin(m)), E = c(Math.cos(x) - Math.cos(m)), P = Math.tan(w), I = c(1 / P), M = L / E, O = D - M * C;
          return I ? L && E ? A = P * (S = O / (P - M)) : E ? (S = D * I, A = D) : (S = C, A = C * P) : L && E ? (S = 0, A = O) : E ? (S = 0, A = D) : S = A = NaN, [S, A];
        }
        function f(m, x, w, k) {
          return l.isFullCircle([x, w]) ? function(S, A) {
            var C, D = A.length, L = new Array(D + 1);
            for (C = 0; C < D; C++) {
              var E = A[C];
              L[C] = [S * Math.cos(E), S * Math.sin(E)];
            }
            return L[C] = L[0].slice(), L;
          }(m, k) : function(S, A, C, D) {
            var L, E, P = D.length, I = [];
            function M(K) {
              return [S * Math.cos(K), S * Math.sin(K)];
            }
            function O(K, re, Y) {
              return d(K, re, Y, M(K));
            }
            function T(K) {
              return l.mod(K, P);
            }
            function z(K) {
              return h(K, [A, C]);
            }
            var F = i(D, function(K) {
              return z(K) ? _(K, A) : 1 / 0;
            }), U = O(D[F], D[T(F - 1)], A);
            for (I.push(U), L = F, E = 0; E < P; L++, E++) {
              var V = D[T(L)];
              if (!z(V)) break;
              I.push(M(V));
            }
            var $ = i(D, function(K) {
              return z(K) ? _(K, C) : 1 / 0;
            }), q = O(D[$], D[T($ + 1)], C);
            return I.push(q), I.push([0, 0]), I.push(I[0].slice()), I;
          }(m, x, w, k);
        }
        function c(m) {
          return Math.abs(m) > 1e-10 ? m : 0;
        }
        function g(m, x, w) {
          x = x || 0, w = w || 0;
          for (var k = m.length, S = new Array(k), A = 0; A < k; A++) {
            var C = m[A];
            S[A] = [x + C[0], w - C[1]];
          }
          return S;
        }
        o.exports = { isPtInsidePolygon: function(m, x, w, k, S) {
          if (!h(x, k)) return !1;
          var A, C;
          w[0] < w[1] ? (A = w[0], C = w[1]) : (A = w[1], C = w[0]);
          var D = u(f(A, k[0], k[1], S)), L = u(f(C, k[0], k[1], S)), E = [m * Math.cos(x), m * Math.sin(x)];
          return L.contains(E) && !D.contains(E);
        }, findPolygonOffset: function(m, x, w, k) {
          for (var S = 1 / 0, A = 1 / 0, C = f(m, x, w, k), D = 0; D < C.length; D++) {
            var L = C[D];
            S = Math.min(S, L[0]), A = Math.min(A, -L[1]);
          }
          return [S, A];
        }, findEnclosingVertexAngles: function(m, x) {
          var w = i(x, function(S) {
            var A = p(S, m);
            return A > 0 ? A : 1 / 0;
          }), k = l.mod(w + 1, x.length);
          return [x[w], x[k]];
        }, findIntersectionXY: d, findXYatLength: function(m, x, w, k) {
          var S = -x * w, A = x * x + 1, C = 2 * (x * S - w), D = S * S + w * w - m * m, L = Math.sqrt(C * C - 4 * A * D), E = (-C + L) / (2 * A), P = (-C - L) / (2 * A);
          return [[E, x * E + S + k], [P, x * P + S + k]];
        }, clampTiny: c, pathPolygon: function(m, x, w, k, S, A) {
          return "M" + g(f(m, x, w, k), S, A).join("L");
        }, pathPolygonAnnulus: function(m, x, w, k, S, A, C) {
          var D, L;
          m < x ? (D = m, L = x) : (D = x, L = m);
          var E = g(f(D, w, k, S), A, C);
          return "M" + g(f(L, w, k, S), A, C).reverse().join("L") + "M" + E.join("L");
        } };
      }, 31645: function(o, s, n) {
        var l = n(4173).fX, u = n(34809).counterRegex, i = n(35785), h = n(26484), p = h.attr, _ = h.name, d = u(_), f = {};
        f[p] = { valType: "subplotid", dflt: _, editType: "calc" }, o.exports = { attr: p, name: _, idRoot: _, idRegex: d, attrRegex: d, attributes: f, layoutAttributes: n(42219), supplyLayoutDefaults: n(84588), plot: function(c) {
          for (var g = c._fullLayout, m = c.calcdata, x = g._subplots[_], w = 0; w < x.length; w++) {
            var k = x[w], S = l(m, _, k), A = g[k]._subplot;
            A || (A = i(c, k), g[k]._subplot = A), A.plot(S, g, c._promises);
          }
        }, clean: function(c, g, m, x) {
          for (var w = x._subplots[_] || [], k = x._has && x._has("gl"), S = g._has && g._has("gl"), A = k && !S, C = 0; C < w.length; C++) {
            var D = w[C], L = x[D]._subplot;
            if (!g[D] && L) for (var E in L.framework.remove(), L.layers["radial-axis-title"].remove(), L.clipPaths) L.clipPaths[E].remove();
            A && L._scene && (L._scene.destroy(), L._scene = null);
          }
        }, toSVG: n(37703).toSVG };
      }, 42219: function(o, s, n) {
        var l = n(10229), u = n(25829), i = n(13792).u, h = n(34809).extendFlat, p = n(13582).overrideAll, _ = p({ color: u.color, showline: h({}, u.showline, { dflt: !0 }), linecolor: u.linecolor, linewidth: u.linewidth, showgrid: h({}, u.showgrid, { dflt: !0 }), gridcolor: u.gridcolor, gridwidth: u.gridwidth, griddash: u.griddash }, "plot", "from-root"), d = p({ tickmode: u.minor.tickmode, nticks: u.nticks, tick0: u.tick0, dtick: u.dtick, tickvals: u.tickvals, ticktext: u.ticktext, ticks: u.ticks, ticklen: u.ticklen, tickwidth: u.tickwidth, tickcolor: u.tickcolor, ticklabelstep: u.ticklabelstep, showticklabels: u.showticklabels, labelalias: u.labelalias, showtickprefix: u.showtickprefix, tickprefix: u.tickprefix, showticksuffix: u.showticksuffix, ticksuffix: u.ticksuffix, showexponent: u.showexponent, exponentformat: u.exponentformat, minexponent: u.minexponent, separatethousands: u.separatethousands, tickfont: u.tickfont, tickangle: u.tickangle, tickformat: u.tickformat, tickformatstops: u.tickformatstops, layer: u.layer }, "plot", "from-root"), f = { visible: h({}, u.visible, { dflt: !0 }), type: h({}, u.type, { values: ["-", "linear", "log", "date", "category"] }), autotypenumbers: u.autotypenumbers, autorangeoptions: { minallowed: u.autorangeoptions.minallowed, maxallowed: u.autorangeoptions.maxallowed, clipmin: u.autorangeoptions.clipmin, clipmax: u.autorangeoptions.clipmax, include: u.autorangeoptions.include, editType: "plot" }, autorange: h({}, u.autorange, { editType: "plot" }), rangemode: { valType: "enumerated", values: ["tozero", "nonnegative", "normal"], dflt: "tozero", editType: "calc" }, minallowed: h({}, u.minallowed, { editType: "plot" }), maxallowed: h({}, u.maxallowed, { editType: "plot" }), range: h({}, u.range, { items: [{ valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }, { valType: "any", editType: "plot", impliedEdits: { "^autorange": !1 } }], editType: "plot" }), categoryorder: u.categoryorder, categoryarray: u.categoryarray, angle: { valType: "angle", editType: "plot" }, autotickangles: u.autotickangles, side: { valType: "enumerated", values: ["clockwise", "counterclockwise"], dflt: "clockwise", editType: "plot" }, title: { text: h({}, u.title.text, { editType: "plot", dflt: "" }), font: h({}, u.title.font, { editType: "plot" }), editType: "plot" }, hoverformat: u.hoverformat, uirevision: { valType: "any", editType: "none" }, editType: "calc", _deprecated: { title: u._deprecated.title, titlefont: u._deprecated.titlefont } };
        h(f, _, d);
        var c = { visible: h({}, u.visible, { dflt: !0 }), type: { valType: "enumerated", values: ["-", "linear", "category"], dflt: "-", editType: "calc", _noTemplating: !0 }, autotypenumbers: u.autotypenumbers, categoryorder: u.categoryorder, categoryarray: u.categoryarray, thetaunit: { valType: "enumerated", values: ["radians", "degrees"], dflt: "degrees", editType: "calc" }, period: { valType: "number", editType: "calc", min: 0 }, direction: { valType: "enumerated", values: ["counterclockwise", "clockwise"], dflt: "counterclockwise", editType: "calc" }, rotation: { valType: "angle", editType: "calc" }, hoverformat: u.hoverformat, uirevision: { valType: "any", editType: "none" }, editType: "calc" };
        h(c, _, d), o.exports = { domain: i({ name: "polar", editType: "plot" }), sector: { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], dflt: [0, 360], editType: "plot" }, hole: { valType: "number", min: 0, max: 1, dflt: 0, editType: "plot" }, bgcolor: { valType: "color", editType: "plot", dflt: l.background }, radialaxis: f, angularaxis: c, gridshape: { valType: "enumerated", values: ["circular", "linear"], dflt: "circular", editType: "plot" }, uirevision: { valType: "any", editType: "none" }, editType: "calc" };
      }, 84588: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(78032), h = n(4448), p = n(4173).KO, _ = n(22777), d = n(87433), f = n(12036), c = n(54616), g = n(46473), m = n(97405), x = n(75511), w = n(9666), k = n(42219), S = n(51937), A = n(26484), C = A.axisNames;
        function D(E, P, I, M) {
          var O = I("bgcolor");
          M.bgColor = u.combine(O, M.paper_bgcolor);
          var T = I("sector");
          I("hole");
          var z, F = p(M.fullData, A.name, M.id), U = M.layoutOut;
          function V(De, Le) {
            return I(z + "." + De, Le);
          }
          for (var $ = 0; $ < C.length; $++) {
            z = C[$], l.isPlainObject(E[z]) || (E[z] = {});
            var q = E[z], K = i.newContainer(P, z);
            K._id = K._name = z, K._attr = M.id + "." + z, K._traceIndices = F.map(function(De) {
              return De._expandedIndex;
            });
            var re = A.axisName2dataArray[z], Y = L(q, K, V, F, re, M);
            g(q, K, V, { axData: F, dataAttr: re });
            var te = V("visible");
            switch (S(K, P, U), V("uirevision", P.uirevision), K._m = 1, z) {
              case "radialaxis":
                V("minallowed"), V("maxallowed");
                var ee, X = V("range"), Q = K.getAutorangeDflt(X), ue = V("autorange", Q);
                !X || (X[0] !== null || X[1] !== null) && (X[0] !== null && X[1] !== null || ue !== "reversed" && ue !== !0) && (X[0] === null || ue !== "min" && ue !== "max reversed") && (X[1] === null || ue !== "max" && ue !== "min reversed") || (X = void 0, delete K.range, K.autorange = !0, ee = !0), ee || (ue = V("autorange", Q = K.getAutorangeDflt(X))), q.autorange = ue, ue && (x(V, ue, X), Y !== "linear" && Y !== "-" || V("rangemode"), K.isReversed() && (K._m = -1)), K.cleanRange("range", { dfltRange: [0, 1] });
                break;
              case "angularaxis":
                if (Y === "date") {
                  l.log("Polar plots do not support date angular axes yet.");
                  for (var ce = 0; ce < F.length; ce++) F[ce].visible = !1;
                  Y = q.type = K.type = "linear";
                }
                V(Y === "linear" ? "thetaunit" : "period");
                var he = V("direction");
                V("rotation", { counterclockwise: 0, clockwise: 90 }[he]);
            }
            if (c(q, K, V, K.type, { tickSuffixDflt: K.thetaunit === "degrees" ? "°" : void 0 }), te) {
              var de, ne, ae, se, me, ye, pe, be, Ae, Se, Me = M.font || {};
              ne = (de = V("color")) === q.color ? de : Me.color, ae = Me.size, se = Me.family, me = Me.weight, ye = Me.style, pe = Me.variant, be = Me.textcase, Ae = Me.lineposition, Se = Me.shadow, _(q, K, V, K.type), f(q, K, V, K.type, { font: { weight: me, style: ye, variant: pe, textcase: be, lineposition: Ae, shadow: Se, color: ne, size: ae, family: se }, noAutotickangles: z === "angularaxis", noTicklabelshift: !0, noTicklabelstandoff: !0 }), d(q, K, V, { outerTicks: !0 }), m(q, K, V, { dfltColor: de, bgColor: M.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: k[z] }), V("layer"), z === "radialaxis" && (V("side"), V("angle", T[0]), V("title.text"), l.coerceFont(V, "title.font", { weight: me, style: ye, variant: pe, textcase: be, lineposition: Ae, shadow: Se, color: ne, size: l.bigFont(ae), family: se }));
            }
            Y !== "category" && V("hoverformat"), K._input = q;
          }
          P.angularaxis.type === "category" && I("gridshape");
        }
        function L(E, P, I, M, O, T) {
          var z = I("autotypenumbers", T.autotypenumbersDflt);
          if (I("type") === "-") {
            for (var F, U = 0; U < M.length; U++) if (M[U].visible) {
              F = M[U];
              break;
            }
            F && F[O] && (P.type = w(F[O], "gregorian", { noMultiCategory: !0, autotypenumbers: z })), P.type === "-" ? P.type = "linear" : E.type = P.type;
          }
          return P.type;
        }
        o.exports = function(E, P, I) {
          h(E, P, I, { type: A.name, attributes: k, handleDefaults: D, font: P.font, autotypenumbersDflt: P.autotypenumbers, paper_bgcolor: P.paper_bgcolor, fullData: I, layoutOut: P });
        };
      }, 35785: function(o, s, n) {
        var l = n(45568), u = n(65657), i = n(33626), h = n(34809), p = h.strRotate, _ = h.strTranslate, d = n(78766), f = n(62203), c = n(44122), g = n(29714), m = n(19091), x = n(51937), w = n(32919).doAutoRange, k = n(51680), S = n(14751), A = n(32141), C = n(17240), D = n(44844).prepSelect, L = n(44844).selectOnClick, E = n(44844).clearOutline, P = n(27983), I = n(34823), M = n(71817).redrawReglTraces, O = n(4530).MID_SHIFT, T = n(26484), z = n(95928), F = n(52007), U = F.smith, V = F.reactanceArc, $ = F.resistanceArc, q = F.smithTransform, K = h._, re = h.mod, Y = h.deg2rad, te = h.rad2deg;
        function ee(he, de, ne) {
          this.isSmith = ne || !1, this.id = de, this.gd = he, this._hasClipOnAxisFalse = null, this.vangles = null, this.radialAxisAngle = null, this.traceHash = {}, this.layers = {}, this.clipPaths = {}, this.clipIds = {}, this.viewInitial = {};
          var ae = he._fullLayout, se = "clip" + ae._uid + de;
          this.clipIds.forTraces = se + "-for-traces", this.clipPaths.forTraces = ae._clips.append("clipPath").attr("id", this.clipIds.forTraces), this.clipPaths.forTraces.append("path"), this.framework = ae["_" + (ne ? "smith" : "polar") + "layer"].append("g").attr("class", de), this.getHole = function(me) {
            return this.isSmith ? 0 : me.hole;
          }, this.getSector = function(me) {
            return this.isSmith ? [0, 360] : me.sector;
          }, this.getRadial = function(me) {
            return this.isSmith ? me.realaxis : me.radialaxis;
          }, this.getAngular = function(me) {
            return this.isSmith ? me.imaginaryaxis : me.angularaxis;
          }, ne || (this.radialTickLayout = null, this.angularTickLayout = null);
        }
        var X = ee.prototype;
        function Q(he) {
          var de = he.ticks + String(he.ticklen) + String(he.showticklabels);
          return "side" in he && (de += he.side), de;
        }
        function ue(he, de) {
          return de[h.findIndexOfMin(de, function(ne) {
            return h.angleDist(he, ne);
          })];
        }
        function ce(he, de, ne) {
          return de ? (he.attr("display", null), he.attr(ne)) : he && he.attr("display", "none"), he;
        }
        o.exports = function(he, de, ne) {
          return new ee(he, de, ne);
        }, X.plot = function(he, de) {
          for (var ne = this, ae = de[ne.id], se = !1, me = 0; me < he.length; me++) if (he[me][0].trace.cliponaxis === !1) {
            se = !0;
            break;
          }
          ne._hasClipOnAxisFalse = se, ne.updateLayers(de, ae), ne.updateLayout(de, ae), c.generalUpdatePerTraceModule(ne.gd, ne, he, ae), ne.updateFx(de, ae), ne.isSmith && (delete ae.realaxis.range, delete ae.imaginaryaxis.range);
        }, X.updateLayers = function(he, de) {
          var ne = this, ae = ne.isSmith, se = ne.layers, me = ne.getRadial(de), ye = ne.getAngular(de), pe = T.layerNames, be = pe.indexOf("frontplot"), Ae = pe.slice(0, be), Se = ye.layer === "below traces", Me = me.layer === "below traces";
          Se && Ae.push("angular-line"), Me && Ae.push("radial-line"), Se && Ae.push("angular-axis"), Me && Ae.push("radial-axis"), Ae.push("frontplot"), Se || Ae.push("angular-line"), Me || Ae.push("radial-line"), Se || Ae.push("angular-axis"), Me || Ae.push("radial-axis");
          var De = (ae ? "smith" : "polar") + "sublayer", Le = ne.framework.selectAll("." + De).data(Ae, String);
          Le.enter().append("g").attr("class", function(We) {
            return De + " " + We;
          }).each(function(We) {
            var Ee = se[We] = l.select(this);
            switch (We) {
              case "frontplot":
                ae || Ee.append("g").classed("barlayer", !0), Ee.append("g").classed("scatterlayer", !0);
                break;
              case "backplot":
                Ee.append("g").classed("maplayer", !0);
                break;
              case "plotbg":
                se.bg = Ee.append("path");
                break;
              case "radial-grid":
              case "angular-grid":
                Ee.style("fill", "none");
                break;
              case "radial-line":
                Ee.append("line").style("fill", "none");
                break;
              case "angular-line":
                Ee.append("path").style("fill", "none");
            }
          }), Le.order();
        }, X.updateLayout = function(he, de) {
          var ne = this, ae = ne.layers, se = he._size, me = ne.getRadial(de), ye = ne.getAngular(de), pe = de.domain.x, be = de.domain.y;
          ne.xOffset = se.l + se.w * pe[0], ne.yOffset = se.t + se.h * (1 - be[1]);
          var Ae = ne.xLength = se.w * (pe[1] - pe[0]), Se = ne.yLength = se.h * (be[1] - be[0]), Me = ne.getSector(de);
          ne.sectorInRad = Me.map(Y);
          var De, Le, We, Ee, Ne, Ie = ne.sectorBBox = function(Pt) {
            var Dt, $t = Pt[0], Gt = Pt[1] - $t, Wt = re($t, 360), mt = Wt + Gt, at = Math.cos(Y(Wt)), vt = Math.sin(Y(Wt)), St = Math.cos(Y(mt)), Je = Math.sin(Y(mt));
            return Dt = Wt <= 90 && mt >= 90 || Wt > 90 && mt >= 450 ? 1 : vt <= 0 && Je <= 0 ? 0 : Math.max(vt, Je), [Wt <= 180 && mt >= 180 || Wt > 180 && mt >= 540 ? -1 : at >= 0 && St >= 0 ? 0 : Math.min(at, St), Wt <= 270 && mt >= 270 || Wt > 270 && mt >= 630 ? -1 : vt >= 0 && Je >= 0 ? 0 : Math.min(vt, Je), mt >= 360 ? 1 : at <= 0 && St <= 0 ? 0 : Math.max(at, St), Dt];
          }(Me), ge = Ie[2] - Ie[0], Ce = Ie[3] - Ie[1], we = Se / Ae, Ge = Math.abs(Ce / ge);
          we > Ge ? (De = Ae, Ne = (Se - (Le = Ae * Ge)) / se.h / 2, We = [pe[0], pe[1]], Ee = [be[0] + Ne, be[1] - Ne]) : (Le = Se, Ne = (Ae - (De = Se / Ge)) / se.w / 2, We = [pe[0] + Ne, pe[1] - Ne], Ee = [be[0], be[1]]), ne.xLength2 = De, ne.yLength2 = Le, ne.xDomain2 = We, ne.yDomain2 = Ee;
          var Re, je = ne.xOffset2 = se.l + se.w * We[0], Ke = ne.yOffset2 = se.t + se.h * (1 - Ee[1]), tt = ne.radius = De / ge, _e = ne.innerRadius = ne.getHole(de) * tt, Be = ne.cx = je - tt * Ie[0], $e = ne.cy = Ke + tt * Ie[3], Ze = ne.cxx = Be - je, ct = ne.cyy = $e - Ke, ft = me.side;
          ft === "counterclockwise" ? (Re = ft, ft = "top") : ft === "clockwise" && (Re = ft, ft = "bottom"), ne.radialAxis = ne.mockAxis(he, de, me, { _id: "x", side: ft, _trueSide: Re, domain: [_e / se.w, tt / se.w] }), ne.angularAxis = ne.mockAxis(he, de, ye, { side: "right", domain: [0, Math.PI], autorange: !1 }), ne.doAutoRange(he, de), ne.updateAngularAxis(he, de), ne.updateRadialAxis(he, de), ne.updateRadialAxisTitle(he, de), ne.xaxis = ne.mockCartesianAxis(he, de, { _id: "x", domain: We }), ne.yaxis = ne.mockCartesianAxis(he, de, { _id: "y", domain: Ee });
          var _t = ne.pathSubplot();
          ne.clipPaths.forTraces.select("path").attr("d", _t).attr("transform", _(Ze, ct)), ae.frontplot.attr("transform", _(je, Ke)).call(f.setClipUrl, ne._hasClipOnAxisFalse ? null : ne.clipIds.forTraces, ne.gd), ae.bg.attr("d", _t).attr("transform", _(Be, $e)).call(d.fill, de.bgcolor);
        }, X.mockAxis = function(he, de, ne, ae) {
          var se = h.extendFlat({}, ne, ae);
          return x(se, de, he), se;
        }, X.mockCartesianAxis = function(he, de, ne) {
          var ae = this, se = ae.isSmith, me = ne._id, ye = h.extendFlat({ type: "linear" }, ne);
          m(ye, he);
          var pe = { x: [0, 2], y: [1, 3] };
          return ye.setRange = function() {
            var be = ae.sectorBBox, Ae = pe[me], Se = ae.radialAxis._rl, Me = (Se[1] - Se[0]) / (1 - ae.getHole(de));
            ye.range = [be[Ae[0]] * Me, be[Ae[1]] * Me];
          }, ye.isPtWithinRange = me !== "x" || se ? function() {
            return !0;
          } : function(be) {
            return ae.isPtInside(be);
          }, ye.setRange(), ye.setScale(), ye;
        }, X.doAutoRange = function(he, de) {
          var ne = this, ae = ne.gd, se = ne.radialAxis, me = ne.getRadial(de);
          w(ae, se);
          var ye = se.range;
          if (me.range = ye.slice(), me._input.range = ye.slice(), se._rl = [se.r2l(ye[0], null, "gregorian"), se.r2l(ye[1], null, "gregorian")], se.minallowed !== void 0) {
            var pe = se.r2l(se.minallowed);
            se._rl[0] > se._rl[1] ? se._rl[1] = Math.max(se._rl[1], pe) : se._rl[0] = Math.max(se._rl[0], pe);
          }
          if (se.maxallowed !== void 0) {
            var be = se.r2l(se.maxallowed);
            se._rl[0] < se._rl[1] ? se._rl[1] = Math.min(se._rl[1], be) : se._rl[0] = Math.min(se._rl[0], be);
          }
        }, X.updateRadialAxis = function(he, de) {
          var ne = this, ae = ne.gd, se = ne.layers, me = ne.radius, ye = ne.innerRadius, pe = ne.cx, be = ne.cy, Ae = ne.getRadial(de), Se = re(ne.getSector(de)[0], 360), Me = ne.radialAxis, De = ye < me, Le = ne.isSmith;
          Le || (ne.fillViewInitialKey("radialaxis.angle", Ae.angle), ne.fillViewInitialKey("radialaxis.range", Me.range.slice()), Me.setGeometry()), Me.tickangle === "auto" && Se > 90 && Se <= 270 && (Me.tickangle = 180);
          var We = Le ? function(Ke) {
            var tt = q(ne, U([Ke.x, 0]));
            return _(tt[0] - pe, tt[1] - be);
          } : function(Ke) {
            return _(Me.l2p(Ke.x) + ye, 0);
          }, Ee = Le ? function(Ke) {
            return $(ne, Ke.x, -1 / 0, 1 / 0);
          } : function(Ke) {
            return ne.pathArc(Me.r2p(Ke.x) + ye);
          }, Ne = Q(Ae);
          if (ne.radialTickLayout !== Ne && (se["radial-axis"].selectAll(".xtick").remove(), ne.radialTickLayout = Ne), De) {
            Me.setScale();
            var Ie = 0, ge = Le ? (Me.tickvals || []).filter(function(Ke) {
              return Ke >= 0;
            }).map(function(Ke) {
              return g.tickText(Me, Ke, !0, !1);
            }) : g.calcTicks(Me), Ce = Le ? ge : g.clipEnds(Me, ge), we = g.getTickSigns(Me)[2];
            Le && ((Me.ticks === "top" && Me.side === "bottom" || Me.ticks === "bottom" && Me.side === "top") && (we = -we), Me.ticks === "top" && Me.side === "top" && (Ie = -Me.ticklen), Me.ticks === "bottom" && Me.side === "bottom" && (Ie = Me.ticklen)), g.drawTicks(ae, Me, { vals: ge, layer: se["radial-axis"], path: g.makeTickPath(Me, 0, we), transFn: We, crisp: !1 }), g.drawGrid(ae, Me, { vals: Ce, layer: se["radial-grid"], path: Ee, transFn: h.noop, crisp: !1 }), g.drawLabels(ae, Me, { vals: ge, layer: se["radial-axis"], transFn: We, labelFns: g.makeLabelFns(Me, Ie) });
          }
          var Ge = ne.radialAxisAngle = ne.vangles ? te(ue(Y(Ae.angle), ne.vangles)) : Ae.angle, Re = _(pe, be), je = Re + p(-Ge);
          ce(se["radial-axis"], De && (Ae.showticklabels || Ae.ticks), { transform: je }), ce(se["radial-grid"], De && Ae.showgrid, { transform: Le ? "" : Re }), ce(se["radial-line"].select("line"), De && Ae.showline, { x1: Le ? -me : ye, y1: 0, x2: me, y2: 0, transform: je }).attr("stroke-width", Ae.linewidth).call(d.stroke, Ae.linecolor);
        }, X.updateRadialAxisTitle = function(he, de, ne) {
          if (!this.isSmith) {
            var ae = this, se = ae.gd, me = ae.radius, ye = ae.cx, pe = ae.cy, be = ae.getRadial(de), Ae = ae.id + "title", Se = 0;
            if (be.title) {
              var Me = f.bBox(ae.layers["radial-axis"].node()).height, De = be.title.font.size, Le = be.side;
              Se = Le === "top" ? De : Le === "counterclockwise" ? -(Me + 0.4 * De) : Me + 0.8 * De;
            }
            var We = ne !== void 0 ? ne : ae.radialAxisAngle, Ee = Y(We), Ne = Math.cos(Ee), Ie = Math.sin(Ee), ge = ye + me / 2 * Ne + Se * Ie, Ce = pe - me / 2 * Ie + Se * Ne;
            ae.layers["radial-axis-title"] = C.draw(se, Ae, { propContainer: be, propName: ae.id + ".radialaxis.title", placeholder: K(se, "Click to enter radial axis title"), attributes: { x: ge, y: Ce, "text-anchor": "middle" }, transform: { rotate: -We } });
          }
        }, X.updateAngularAxis = function(he, de) {
          var ne = this, ae = ne.gd, se = ne.layers, me = ne.radius, ye = ne.innerRadius, pe = ne.cx, be = ne.cy, Ae = ne.getAngular(de), Se = ne.angularAxis, Me = ne.isSmith;
          Me || (ne.fillViewInitialKey("angularaxis.rotation", Ae.rotation), Se.setGeometry(), Se.setScale());
          var De = Me ? function(Ke) {
            var tt = q(ne, U([0, Ke.x]));
            return Math.atan2(tt[0] - pe, tt[1] - be) - Math.PI / 2;
          } : function(Ke) {
            return Se.t2g(Ke.x);
          };
          Se.type === "linear" && Se.thetaunit === "radians" && (Se.tick0 = te(Se.tick0), Se.dtick = te(Se.dtick));
          var Le = function(Ke) {
            return _(pe + me * Math.cos(Ke), be - me * Math.sin(Ke));
          }, We = Me ? function(Ke) {
            var tt = q(ne, U([0, Ke.x]));
            return _(tt[0], tt[1]);
          } : function(Ke) {
            return Le(De(Ke));
          }, Ee = Me ? function(Ke) {
            var tt = q(ne, U([0, Ke.x])), _e = Math.atan2(tt[0] - pe, tt[1] - be) - Math.PI / 2;
            return _(tt[0], tt[1]) + p(-te(_e));
          } : function(Ke) {
            var tt = De(Ke);
            return Le(tt) + p(-te(tt));
          }, Ne = Me ? function(Ke) {
            return V(ne, Ke.x, 0, 1 / 0);
          } : function(Ke) {
            var tt = De(Ke), _e = Math.cos(tt), Be = Math.sin(tt);
            return "M" + [pe + ye * _e, be - ye * Be] + "L" + [pe + me * _e, be - me * Be];
          }, Ie = g.makeLabelFns(Se, 0).labelStandoff, ge = { xFn: function(Ke) {
            var tt = De(Ke);
            return Math.cos(tt) * Ie;
          }, yFn: function(Ke) {
            var tt = De(Ke), _e = Math.sin(tt) > 0 ? 0.2 : 1;
            return -Math.sin(tt) * (Ie + Ke.fontSize * _e) + Math.abs(Math.cos(tt)) * (Ke.fontSize * O);
          }, anchorFn: function(Ke) {
            var tt = De(Ke), _e = Math.cos(tt);
            return Math.abs(_e) < 0.1 ? "middle" : _e > 0 ? "start" : "end";
          }, heightFn: function(Ke, tt, _e) {
            var Be = De(Ke);
            return -0.5 * (1 + Math.sin(Be)) * _e;
          } }, Ce = Q(Ae);
          ne.angularTickLayout !== Ce && (se["angular-axis"].selectAll("." + Se._id + "tick").remove(), ne.angularTickLayout = Ce);
          var we, Ge = Me ? [1 / 0].concat(Se.tickvals || []).map(function(Ke) {
            return g.tickText(Se, Ke, !0, !1);
          }) : g.calcTicks(Se);
          if (Me && (Ge[0].text = "∞", Ge[0].fontSize *= 1.75), de.gridshape === "linear" ? (we = Ge.map(De), h.angleDelta(we[0], we[1]) < 0 && (we = we.slice().reverse())) : we = null, ne.vangles = we, Se.type === "category" && (Ge = Ge.filter(function(Ke) {
            return h.isAngleInsideSector(De(Ke), ne.sectorInRad);
          })), Se.visible) {
            var Re = Se.ticks === "inside" ? -1 : 1, je = (Se.linewidth || 1) / 2;
            g.drawTicks(ae, Se, { vals: Ge, layer: se["angular-axis"], path: "M" + Re * je + ",0h" + Re * Se.ticklen, transFn: Ee, crisp: !1 }), g.drawGrid(ae, Se, { vals: Ge, layer: se["angular-grid"], path: Ne, transFn: h.noop, crisp: !1 }), g.drawLabels(ae, Se, { vals: Ge, layer: se["angular-axis"], repositionOnUpdate: !0, transFn: We, labelFns: ge });
          }
          ce(se["angular-line"].select("path"), Ae.showline, { d: ne.pathSubplot(), transform: _(pe, be) }).attr("stroke-width", Ae.linewidth).call(d.stroke, Ae.linecolor);
        }, X.updateFx = function(he, de) {
          this.gd._context.staticPlot || (!this.isSmith && (this.updateAngularDrag(he), this.updateRadialDrag(he, de, 0), this.updateRadialDrag(he, de, 1)), this.updateHoverAndMainDrag(he));
        }, X.updateHoverAndMainDrag = function(he) {
          var de, ne, ae = this, se = ae.isSmith, me = ae.gd, ye = ae.layers, pe = he._zoomlayer, be = T.MINZOOM, Ae = T.OFFEDGE, Se = ae.radius, Me = ae.innerRadius, De = ae.cx, Le = ae.cy, We = ae.cxx, Ee = ae.cyy, Ne = ae.sectorInRad, Ie = ae.vangles, ge = ae.radialAxis, Ce = z.clampTiny, we = z.findXYatLength, Ge = z.findEnclosingVertexAngles, Re = T.cornerHalfWidth, je = T.cornerLen / 2, Ke = k.makeDragger(ye, "path", "maindrag", he.dragmode === !1 ? "none" : "crosshair");
          l.select(Ke).attr("d", ae.pathSubplot()).attr("transform", _(De, Le)), Ke.onmousemove = function(At) {
            A.hover(me, At, ae.id), me._fullLayout._lasthover = Ke, me._fullLayout._hoversubplot = ae.id;
          }, Ke.onmouseout = function(At) {
            me._dragging || S.unhover(me, At);
          };
          var tt, _e, Be, $e, Ze, ct, ft, _t, Pt, Dt = { element: Ke, gd: me, subplot: ae.id, plotinfo: { id: ae.id, xaxis: ae.xaxis, yaxis: ae.yaxis }, xaxes: [ae.xaxis], yaxes: [ae.yaxis] };
          function $t(At, Rt) {
            return Math.sqrt(At * At + Rt * Rt);
          }
          function Gt(At, Rt) {
            return $t(At - We, Rt - Ee);
          }
          function Wt(At, Rt) {
            return Math.atan2(Ee - Rt, At - We);
          }
          function mt(At, Rt) {
            return [At * Math.cos(Rt), At * Math.sin(-Rt)];
          }
          function at(At, Rt) {
            if (At === 0) return ae.pathSector(2 * Re);
            var Ft = je / At, lt = Rt - Ft, st = Rt + Ft, Ot = Math.max(0, Math.min(At, Se)), kt = Ot - Re, Bt = Ot + Re;
            return "M" + mt(kt, lt) + "A" + [kt, kt] + " 0,0,0 " + mt(kt, st) + "L" + mt(Bt, st) + "A" + [Bt, Bt] + " 0,0,1 " + mt(Bt, lt) + "Z";
          }
          function vt(At, Rt, Ft) {
            if (At === 0) return ae.pathSector(2 * Re);
            var lt, st, Ot = mt(At, Rt), kt = mt(At, Ft), Bt = Ce((Ot[0] + kt[0]) / 2), xt = Ce((Ot[1] + kt[1]) / 2);
            if (Bt && xt) {
              var Jt = xt / Bt, qt = -1 / Jt, en = we(Re, Jt, Bt, xt);
              lt = we(je, qt, en[0][0], en[0][1]), st = we(je, qt, en[1][0], en[1][1]);
            } else {
              var Yt, Ht;
              xt ? (Yt = je, Ht = Re) : (Yt = Re, Ht = je), lt = [[Bt - Yt, xt - Ht], [Bt + Yt, xt - Ht]], st = [[Bt - Yt, xt + Ht], [Bt + Yt, xt + Ht]];
            }
            return "M" + lt.join("L") + "L" + st.reverse().join("L") + "Z";
          }
          function St(At, Rt) {
            return Rt = Math.max(Math.min(Rt, Se), Me), At < Ae ? At = 0 : Se - At < Ae ? At = Se : Rt < Ae ? Rt = 0 : Se - Rt < Ae && (Rt = Se), Math.abs(Rt - At) > be ? (At < Rt ? (Be = At, $e = Rt) : (Be = Rt, $e = At), !0) : (Be = null, $e = null, !1);
          }
          function Je(At, Rt) {
            At = At || Ze, Rt = Rt || "M0,0Z", _t.attr("d", At), Pt.attr("d", Rt), k.transitionZoombox(_t, Pt, ct, ft), ct = !0;
            var Ft = {};
            pt(Ft), me.emit("plotly_relayouting", Ft);
          }
          function nt(At, Rt) {
            var Ft, lt, st = tt + (At *= de), Ot = _e + (Rt *= ne), kt = Gt(tt, _e), Bt = Math.min(Gt(st, Ot), Se), xt = Wt(tt, _e);
            St(kt, Bt) && (Ft = Ze + ae.pathSector($e), Be && (Ft += ae.pathSector(Be)), lt = at(Be, xt) + at($e, xt)), Je(Ft, lt);
          }
          function ot(At, Rt, Ft, lt) {
            var st = z.findIntersectionXY(Ft, lt, Ft, [At - We, Ee - Rt]);
            return $t(st[0], st[1]);
          }
          function Ye(At, Rt) {
            var Ft, lt, st = tt + At, Ot = _e + Rt, kt = Wt(tt, _e), Bt = Wt(st, Ot), xt = Ge(kt, Ie), Jt = Ge(Bt, Ie);
            St(ot(tt, _e, xt[0], xt[1]), Math.min(ot(st, Ot, Jt[0], Jt[1]), Se)) && (Ft = Ze + ae.pathSector($e), Be && (Ft += ae.pathSector(Be)), lt = [vt(Be, xt[0], xt[1]), vt($e, xt[0], xt[1])].join(" ")), Je(Ft, lt);
          }
          function Fe() {
            if (k.removeZoombox(me), Be !== null && $e !== null) {
              var At = {};
              pt(At), k.showDoubleClickNotifier(me), i.call("_guiRelayout", me, At);
            }
          }
          function pt(At) {
            var Rt = ge._rl, Ft = (Rt[1] - Rt[0]) / (1 - Me / Se) / Se, lt = [Rt[0] + (Be - Me) * Ft, Rt[0] + ($e - Me) * Ft];
            At[ae.id + ".radialaxis.range"] = lt;
          }
          function Mt(At, Rt) {
            var Ft = me._fullLayout.clickmode;
            if (k.removeZoombox(me), At === 2) {
              var lt = {};
              for (var st in ae.viewInitial) lt[ae.id + "." + st] = ae.viewInitial[st];
              me.emit("plotly_doubleclick", null), i.call("_guiRelayout", me, lt);
            }
            Ft.indexOf("select") > -1 && At === 1 && L(Rt, me, [ae.xaxis], [ae.yaxis], ae.id, Dt), Ft.indexOf("event") > -1 && A.click(me, Rt, ae.id);
          }
          Dt.prepFn = function(At, Rt, Ft) {
            var lt = me._fullLayout.dragmode, st = Ke.getBoundingClientRect();
            me._fullLayout._calcInverseTransform(me);
            var Ot = me._fullLayout._invTransform;
            de = me._fullLayout._invScaleX, ne = me._fullLayout._invScaleY;
            var kt = h.apply3DTransform(Ot)(Rt - st.left, Ft - st.top);
            if (tt = kt[0], _e = kt[1], Ie) {
              var Bt = z.findPolygonOffset(Se, Ne[0], Ne[1], Ie);
              tt += We + Bt[0], _e += Ee + Bt[1];
            }
            switch (lt) {
              case "zoom":
                Dt.clickFn = Mt, se || (Dt.moveFn = Ie ? Ye : nt, Dt.doneFn = Fe, function() {
                  Be = null, $e = null, Ze = ae.pathSubplot(), ct = !1;
                  var xt = me._fullLayout[ae.id];
                  ft = u(xt.bgcolor).getLuminance(), (_t = k.makeZoombox(pe, ft, De, Le, Ze)).attr("fill-rule", "evenodd"), Pt = k.makeCorners(pe, De, Le), E(me);
                }());
                break;
              case "select":
              case "lasso":
                D(At, Rt, Ft, Dt, lt);
            }
          }, S.init(Dt);
        }, X.updateRadialDrag = function(he, de, ne) {
          var ae = this, se = ae.gd, me = ae.layers, ye = ae.radius, pe = ae.innerRadius, be = ae.cx, Ae = ae.cy, Se = ae.radialAxis, Me = T.radialDragBoxSize, De = Me / 2;
          if (Se.visible) {
            var Le, We, Ee, Ne = Y(ae.radialAxisAngle), Ie = Se._rl, ge = Ie[0], Ce = Ie[1], we = Ie[ne], Ge = 0.75 * (Ie[1] - Ie[0]) / (1 - ae.getHole(de)) / ye;
            ne ? (Le = be + (ye + De) * Math.cos(Ne), We = Ae - (ye + De) * Math.sin(Ne), Ee = "radialdrag") : (Le = be + (pe - De) * Math.cos(Ne), We = Ae - (pe - De) * Math.sin(Ne), Ee = "radialdrag-inner");
            var Re, je, Ke, tt = k.makeRectDragger(me, Ee, "crosshair", -De, -De, Me, Me), _e = { element: tt, gd: se };
            he.dragmode === !1 && (_e.dragmode = !1), ce(l.select(tt), Se.visible && pe < ye, { transform: _(Le, We) }), _e.prepFn = function() {
              Re = null, je = null, Ke = null, _e.moveFn = Be, _e.doneFn = $e, E(se);
            }, _e.clampFn = function(ft, _t) {
              return Math.sqrt(ft * ft + _t * _t) < T.MINDRAG && (ft = 0, _t = 0), [ft, _t];
            }, S.init(_e);
          }
          function Be(ft, _t) {
            if (Re) Re(ft, _t);
            else {
              var Pt = [ft, -_t], Dt = [Math.cos(Ne), Math.sin(Ne)], $t = Math.abs(h.dot(Pt, Dt) / Math.sqrt(h.dot(Pt, Pt)));
              isNaN($t) || (Re = $t < 0.5 ? Ze : ct);
            }
            var Gt = {};
            (function(Wt) {
              je !== null ? Wt[ae.id + ".radialaxis.angle"] = je : Ke !== null && (Wt[ae.id + ".radialaxis.range[" + ne + "]"] = Ke);
            })(Gt), se.emit("plotly_relayouting", Gt);
          }
          function $e() {
            je !== null ? i.call("_guiRelayout", se, ae.id + ".radialaxis.angle", je) : Ke !== null && i.call("_guiRelayout", se, ae.id + ".radialaxis.range[" + ne + "]", Ke);
          }
          function Ze(ft, _t) {
            if (ne !== 0) {
              var Pt = Le + ft, Dt = We + _t;
              je = Math.atan2(Ae - Dt, Pt - be), ae.vangles && (je = ue(je, ae.vangles)), je = te(je);
              var $t = _(be, Ae) + p(-je);
              me["radial-axis"].attr("transform", $t), me["radial-line"].select("line").attr("transform", $t);
              var Gt = ae.gd._fullLayout, Wt = Gt[ae.id];
              ae.updateRadialAxisTitle(Gt, Wt, je);
            }
          }
          function ct(ft, _t) {
            var Pt = h.dot([ft, -_t], [Math.cos(Ne), Math.sin(Ne)]);
            if (Ke = we - Ge * Pt, Ge > 0 == (ne ? Ke > ge : Ke < Ce)) {
              var Dt = se._fullLayout, $t = Dt[ae.id];
              Se.range[ne] = Ke, Se._rl[ne] = Ke, ae.updateRadialAxis(Dt, $t), ae.xaxis.setRange(), ae.xaxis.setScale(), ae.yaxis.setRange(), ae.yaxis.setScale();
              var Gt = !1;
              for (var Wt in ae.traceHash) {
                var mt = ae.traceHash[Wt], at = h.filterVisible(mt);
                mt[0][0].trace._module.plot(se, ae, at, $t), i.traceIs(Wt, "gl") && at.length && (Gt = !0);
              }
              Gt && (I(se), M(se));
            } else Ke = null;
          }
        }, X.updateAngularDrag = function(he) {
          var de = this, ne = de.gd, ae = de.layers, se = de.radius, me = de.angularAxis, ye = de.cx, pe = de.cy, be = de.cxx, Ae = de.cyy, Se = T.angularDragBoxSize, Me = k.makeDragger(ae, "path", "angulardrag", he.dragmode === !1 ? "none" : "move"), De = { element: Me, gd: ne };
          function Le(_e, Be) {
            return Math.atan2(Ae + Se - Be, _e - be - Se);
          }
          he.dragmode === !1 ? De.dragmode = !1 : l.select(Me).attr("d", de.pathAnnulus(se, se + Se)).attr("transform", _(ye, pe)).call(P, "move");
          var We, Ee, Ne, Ie, ge, Ce, we = ae.frontplot.select(".scatterlayer").selectAll(".trace"), Ge = we.selectAll(".point"), Re = we.selectAll(".textpoint");
          function je(_e, Be) {
            var $e = de.gd._fullLayout, Ze = $e[de.id], ct = Le(We + _e * he._invScaleX, Ee + Be * he._invScaleY), ft = te(ct - Ce);
            if (Ie = Ne + ft, ae.frontplot.attr("transform", _(de.xOffset2, de.yOffset2) + p([-ft, be, Ae])), de.vangles) {
              ge = de.radialAxisAngle + ft;
              var _t = _(ye, pe) + p(-ft), Pt = _(ye, pe) + p(-ge);
              ae.bg.attr("transform", _t), ae["radial-grid"].attr("transform", _t), ae["radial-axis"].attr("transform", Pt), ae["radial-line"].select("line").attr("transform", Pt), de.updateRadialAxisTitle($e, Ze, ge);
            } else de.clipPaths.forTraces.select("path").attr("transform", _(be, Ae) + p(ft));
            Ge.each(function() {
              var at = l.select(this), vt = f.getTranslate(at);
              at.attr("transform", _(vt.x, vt.y) + p([ft]));
            }), Re.each(function() {
              var at = l.select(this), vt = at.select("text"), St = f.getTranslate(at);
              at.attr("transform", p([ft, vt.attr("x"), vt.attr("y")]) + _(St.x, St.y));
            }), me.rotation = h.modHalf(Ie, 360), de.updateAngularAxis($e, Ze), de._hasClipOnAxisFalse && !h.isFullCircle(de.sectorInRad) && we.call(f.hideOutsideRangePoints, de);
            var Dt = !1;
            for (var $t in de.traceHash) if (i.traceIs($t, "gl")) {
              var Gt = de.traceHash[$t], Wt = h.filterVisible(Gt);
              Gt[0][0].trace._module.plot(ne, de, Wt, Ze), Wt.length && (Dt = !0);
            }
            Dt && (I(ne), M(ne));
            var mt = {};
            Ke(mt), ne.emit("plotly_relayouting", mt);
          }
          function Ke(_e) {
            _e[de.id + ".angularaxis.rotation"] = Ie, de.vangles && (_e[de.id + ".radialaxis.angle"] = ge);
          }
          function tt() {
            Re.select("text").attr("transform", null);
            var _e = {};
            Ke(_e), i.call("_guiRelayout", ne, _e);
          }
          De.prepFn = function(_e, Be, $e) {
            var Ze = he[de.id];
            Ne = Ze.angularaxis.rotation;
            var ct = Me.getBoundingClientRect();
            We = Be - ct.left, Ee = $e - ct.top, ne._fullLayout._calcInverseTransform(ne);
            var ft = h.apply3DTransform(he._invTransform)(We, Ee);
            We = ft[0], Ee = ft[1], Ce = Le(We, Ee), De.moveFn = je, De.doneFn = tt, E(ne);
          }, de.vangles && !h.isFullCircle(de.sectorInRad) && (De.prepFn = h.noop, P(l.select(Me), null)), S.init(De);
        }, X.isPtInside = function(he) {
          if (this.isSmith) return !0;
          var de = this.sectorInRad, ne = this.vangles, ae = this.angularAxis.c2g(he.theta), se = this.radialAxis, me = se.c2l(he.r), ye = se._rl;
          return (ne ? z.isPtInsidePolygon : h.isPtInsideSector)(me, ae, ye, de, ne);
        }, X.pathArc = function(he) {
          var de = this.sectorInRad, ne = this.vangles;
          return (ne ? z.pathPolygon : h.pathArc)(he, de[0], de[1], ne);
        }, X.pathSector = function(he) {
          var de = this.sectorInRad, ne = this.vangles;
          return (ne ? z.pathPolygon : h.pathSector)(he, de[0], de[1], ne);
        }, X.pathAnnulus = function(he, de) {
          var ne = this.sectorInRad, ae = this.vangles;
          return (ae ? z.pathPolygonAnnulus : h.pathAnnulus)(he, de, ne[0], ne[1], ae);
        }, X.pathSubplot = function() {
          var he = this.innerRadius, de = this.radius;
          return he ? this.pathAnnulus(he, de) : this.pathSector(de);
        }, X.fillViewInitialKey = function(he, de) {
          he in this.viewInitial || (this.viewInitial[he] = de);
        };
      }, 51937: function(o, s, n) {
        var l = n(34809), u = n(19091), i = l.deg2rad, h = l.rad2deg;
        o.exports = function(p, _, d) {
          switch (u(p, d), p._id) {
            case "x":
            case "radialaxis":
              (function(f, c) {
                var g = c._subplot;
                f.setGeometry = function() {
                  var m = f._rl[0], x = f._rl[1], w = g.innerRadius, k = (g.radius - w) / (x - m), S = w / k, A = m > x ? function(C) {
                    return C <= 0;
                  } : function(C) {
                    return C >= 0;
                  };
                  f.c2g = function(C) {
                    var D = f.c2l(C) - m;
                    return (A(D) ? D : 0) + S;
                  }, f.g2c = function(C) {
                    return f.l2c(C + m - S);
                  }, f.g2p = function(C) {
                    return C * k;
                  }, f.c2p = function(C) {
                    return f.g2p(f.c2g(C));
                  };
                };
              })(p, _);
              break;
            case "angularaxis":
              (function(f, c) {
                var g = f.type;
                if (g === "linear") {
                  var m = f.d2c, x = f.c2d;
                  f.d2c = function(w, k) {
                    return function(S, A) {
                      return A === "degrees" ? i(S) : S;
                    }(m(w), k);
                  }, f.c2d = function(w, k) {
                    return x(function(S, A) {
                      return A === "degrees" ? h(S) : S;
                    }(w, k));
                  };
                }
                f.makeCalcdata = function(w, k) {
                  var S, A, C = w[k], D = w._length, L = function(O) {
                    return f.d2c(O, w.thetaunit);
                  };
                  if (C) for (S = new Array(D), A = 0; A < D; A++) S[A] = L(C[A]);
                  else {
                    var E = k + "0", P = "d" + k, I = E in w ? L(w[E]) : 0, M = w[P] ? L(w[P]) : (f.period || 2 * Math.PI) / D;
                    for (S = new Array(D), A = 0; A < D; A++) S[A] = I + A * M;
                  }
                  return S;
                }, f.setGeometry = function() {
                  var w, k, S, A, C = c.sector, D = C.map(i), L = { clockwise: -1, counterclockwise: 1 }[f.direction], E = i(f.rotation), P = function(T) {
                    return L * T + E;
                  }, I = function(T) {
                    return (T - E) / L;
                  };
                  switch (g) {
                    case "linear":
                      k = w = l.identity, A = i, S = h, f.range = l.isFullCircle(D) ? [C[0], C[0] + 360] : D.map(I).map(h);
                      break;
                    case "category":
                      var M = f._categories.length, O = f.period ? Math.max(f.period, M) : M;
                      O === 0 && (O = 1), k = A = function(T) {
                        return 2 * T * Math.PI / O;
                      }, w = S = function(T) {
                        return T * O / Math.PI / 2;
                      }, f.range = [0, O];
                  }
                  f.c2g = function(T) {
                    return P(k(T));
                  }, f.g2c = function(T) {
                    return w(I(T));
                  }, f.t2g = function(T) {
                    return P(A(T));
                  }, f.g2t = function(T) {
                    return S(I(T));
                  };
                };
              })(p, _);
          }
        };
      }, 70951: function(o) {
        o.exports = { attr: "subplot", name: "smith", axisNames: ["realaxis", "imaginaryaxis"], axisName2dataArray: { imaginaryaxis: "imag", realaxis: "real" } };
      }, 52007: function(o) {
        function s(i) {
          return i < 0 ? -1 : i > 0 ? 1 : 0;
        }
        function n(i) {
          var h = i[0], p = i[1];
          if (!isFinite(h) || !isFinite(p)) return [1, 0];
          var _ = (h + 1) * (h + 1) + p * p;
          return [(h * h + p * p - 1) / _, 2 * p / _];
        }
        function l(i, h) {
          var p = h[0], _ = h[1];
          return [p * i.radius + i.cx, -_ * i.radius + i.cy];
        }
        function u(i, h) {
          return h * i.radius;
        }
        o.exports = { smith: n, reactanceArc: function(i, h, p, _) {
          var d = l(i, n([p, h])), f = d[0], c = d[1], g = l(i, n([_, h])), m = g[0], x = g[1];
          if (h === 0) return ["M" + f + "," + c, "L" + m + "," + x].join(" ");
          var w = u(i, 1 / Math.abs(h));
          return ["M" + f + "," + c, "A" + w + "," + w + " 0 0," + (h < 0 ? 1 : 0) + " " + m + "," + x].join(" ");
        }, resistanceArc: function(i, h, p, _) {
          var d = u(i, 1 / (h + 1)), f = l(i, n([h, p])), c = f[0], g = f[1], m = l(i, n([h, _])), x = m[0], w = m[1];
          if (s(p) !== s(_)) {
            var k = l(i, n([h, 0]));
            return ["M" + c + "," + g, "A" + d + "," + d + " 0 0," + (0 < p ? 0 : 1) + " " + k[0] + "," + k[1], "A" + d + "," + d + " 0 0," + (_ < 0 ? 0 : 1) + x + "," + w].join(" ");
          }
          return ["M" + c + "," + g, "A" + d + "," + d + " 0 0," + (_ < p ? 0 : 1) + " " + x + "," + w].join(" ");
        }, smithTransform: l };
      }, 50358: function(o, s, n) {
        var l = n(4173).fX, u = n(34809).counterRegex, i = n(35785), h = n(70951), p = h.attr, _ = h.name, d = u(_), f = {};
        f[p] = { valType: "subplotid", dflt: _, editType: "calc" }, o.exports = { attr: p, name: _, idRoot: _, idRegex: d, attrRegex: d, attributes: f, layoutAttributes: n(93288), supplyLayoutDefaults: n(31359), plot: function(c) {
          for (var g = c._fullLayout, m = c.calcdata, x = g._subplots[_], w = 0; w < x.length; w++) {
            var k = x[w], S = l(m, _, k), A = g[k]._subplot;
            A || (A = i(c, k, !0), g[k]._subplot = A), A.plot(S, g, c._promises);
          }
        }, clean: function(c, g, m, x) {
          for (var w = x._subplots[_] || [], k = 0; k < w.length; k++) {
            var S = w[k], A = x[S]._subplot;
            if (!g[S] && A) for (var C in A.framework.remove(), A.clipPaths) A.clipPaths[C].remove();
          }
        }, toSVG: n(37703).toSVG };
      }, 93288: function(o, s, n) {
        var l = n(10229), u = n(25829), i = n(13792).u, h = n(34809).extendFlat, p = n(13582).overrideAll, _ = p({ color: u.color, showline: h({}, u.showline, { dflt: !0 }), linecolor: u.linecolor, linewidth: u.linewidth, showgrid: h({}, u.showgrid, { dflt: !0 }), gridcolor: u.gridcolor, gridwidth: u.gridwidth, griddash: u.griddash }, "plot", "from-root"), d = p({ ticklen: u.ticklen, tickwidth: h({}, u.tickwidth, { dflt: 2 }), tickcolor: u.tickcolor, showticklabels: u.showticklabels, labelalias: u.labelalias, showtickprefix: u.showtickprefix, tickprefix: u.tickprefix, showticksuffix: u.showticksuffix, ticksuffix: u.ticksuffix, tickfont: u.tickfont, tickformat: u.tickformat, hoverformat: u.hoverformat, layer: u.layer }, "plot", "from-root"), f = h({ visible: h({}, u.visible, { dflt: !0 }), tickvals: { dflt: [0.2, 0.5, 1, 2, 5], valType: "data_array", editType: "plot" }, tickangle: h({}, u.tickangle, { dflt: 90 }), ticks: { valType: "enumerated", values: ["top", "bottom", ""], editType: "ticks" }, side: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, editType: "calc" }, _, d), c = h({ visible: h({}, u.visible, { dflt: !0 }), tickvals: { valType: "data_array", editType: "plot" }, ticks: u.ticks, editType: "calc" }, _, d);
        o.exports = { domain: i({ name: "smith", editType: "plot" }), bgcolor: { valType: "color", editType: "plot", dflt: l.background }, realaxis: f, imaginaryaxis: c, editType: "calc" };
      }, 31359: function(o, s, n) {
        var l, u, i, h = n(34809), p = n(78766), _ = n(78032), d = n(4448), f = n(4173).KO, c = n(54616), g = n(12036), m = n(97405), x = n(19091), w = n(93288), k = n(70951), S = k.axisNames, A = (l = function(D) {
          return h.isTypedArray(D) && (D = Array.from(D)), D.slice().reverse().map(function(L) {
            return -L;
          }).concat([0]).concat(D);
        }, u = String, i = {}, function(D) {
          var L = u ? u(D) : D;
          if (L in i) return i[L];
          var E = l(D);
          return i[L] = E, E;
        });
        function C(D, L, E, P) {
          var I = E("bgcolor");
          P.bgColor = p.combine(I, P.paper_bgcolor);
          var M, O = f(P.fullData, k.name, P.id), T = P.layoutOut;
          function z(X, Q) {
            return E(M + "." + X, Q);
          }
          for (var F = 0; F < S.length; F++) {
            M = S[F], h.isPlainObject(D[M]) || (D[M] = {});
            var U = D[M], V = _.newContainer(L, M);
            V._id = V._name = M, V._attr = P.id + "." + M, V._traceIndices = O.map(function(X) {
              return X._expandedIndex;
            });
            var $ = z("visible");
            if (V.type = "linear", x(V, T), c(U, V, z, V.type), $) {
              var q, K, re, Y, te = M === "realaxis";
              te && z("side"), te ? z("tickvals") : z("tickvals", A(L.realaxis.tickvals || w.realaxis.tickvals.dflt)), h.isTypedArray(V.tickvals) && (V.tickvals = Array.from(V.tickvals));
              var ee = P.font || {};
              $ && (K = (q = z("color")) === U.color ? q : ee.color, re = ee.size, Y = ee.family), g(U, V, z, V.type, { noAutotickangles: !0, noTicklabelshift: !0, noTicklabelstandoff: !0, noTicklabelstep: !0, noAng: !te, noExp: !0, font: { color: K, size: re, family: Y } }), h.coerce2(D, L, w, M + ".ticklen"), h.coerce2(D, L, w, M + ".tickwidth"), h.coerce2(D, L, w, M + ".tickcolor", L.color), z("ticks") || (delete L[M].ticklen, delete L[M].tickwidth, delete L[M].tickcolor), m(U, V, z, { dfltColor: q, bgColor: P.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: w[M] }), z("layer");
            }
            z("hoverformat"), delete V.type, V._input = U;
          }
        }
        o.exports = function(D, L, E) {
          d(D, L, E, { noUirevision: !0, type: k.name, attributes: w, handleDefaults: C, font: L.font, paper_bgcolor: L.paper_bgcolor, fullData: E, layoutOut: L });
        };
      }, 4448: function(o, s, n) {
        var l = n(34809), u = n(78032), i = n(13792).N;
        o.exports = function(h, p, _, d) {
          var f, c, g = d.type, m = d.attributes, x = d.handleDefaults, w = d.partition || "x", k = p._subplots[g], S = k.length, A = S && k[0].replace(/\d+$/, "");
          function C(P, I) {
            return l.coerce(f, c, m, P, I);
          }
          for (var D = 0; D < S; D++) {
            var L = k[D];
            f = h[L] ? h[L] : h[L] = {}, c = u.newContainer(p, L, A), d.noUirevision || C("uirevision", p.uirevision);
            var E = {};
            E[w] = [D / S, (D + 1) / S], i(c, p, C, E), d.id = L, x(f, c, C, d);
          }
        };
      }, 3208: function(o, s, n) {
        var l = n(87296);
        function u(i) {
          var h = i.description ? " " + i.description : "", p = i.keys || [];
          if (p.length > 0) {
            for (var _ = [], d = 0; d < p.length; d++) _[d] = "`" + p[d] + "`";
            h += "Finally, the template string has access to ", h = p.length === 1 ? h + "variable " + _[0] : h + "variables " + _.slice(0, -1).join(", ") + " and " + _.slice(-1) + ".";
          }
          return h;
        }
        l.FORMAT_LINK, l.DATE_FORMAT_LINK, s.rb = function(i, h) {
          i = i || {}, u(h = h || {});
          var p = { valType: "string", dflt: "", editType: i.editType || "none" };
          return i.arrayOk !== !1 && (p.arrayOk = !0), p;
        }, s.ay = function(i, h) {
          i = i || {}, u(h = h || {});
          var p = { valType: "string", dflt: "", editType: i.editType || "calc" };
          return i.arrayOk !== !1 && (p.arrayOk = !0), p;
        }, s.LF = function(i, h) {
          return h = h || {}, (i = i || {}).newshape, u(h), { valType: "string", dflt: "", editType: i.editType || "arraydraw" };
        };
      }, 7638: function(o, s, n) {
        var l = n(83637), u = n(4173).fX, i = n(34809).counterRegex, h = "ternary";
        s.name = h;
        var p = s.attr = "subplot";
        s.idRoot = h, s.idRegex = s.attrRegex = i(h), (s.attributes = {})[p] = { valType: "subplotid", dflt: "ternary", editType: "calc" }, s.layoutAttributes = n(77416), s.supplyLayoutDefaults = n(25247), s.plot = function(_) {
          for (var d = _._fullLayout, f = _.calcdata, c = d._subplots[h], g = 0; g < c.length; g++) {
            var m = c[g], x = u(f, h, m), w = d[m]._subplot;
            w || (w = new l({ id: m, graphDiv: _, container: d._ternarylayer.node() }, d), d[m]._subplot = w), w.plot(x, d, _._promises);
          }
        }, s.clean = function(_, d, f, c) {
          for (var g = c._subplots[h] || [], m = 0; m < g.length; m++) {
            var x = g[m], w = c[x]._subplot;
            !d[x] && w && (w.plotContainer.remove(), w.clipDef.remove(), w.clipDefRelative.remove(), w.layers["a-title"].remove(), w.layers["b-title"].remove(), w.layers["c-title"].remove());
          }
        }, s.updateFx = function(_) {
          var d = _._fullLayout;
          d._ternarylayer.selectAll("g.toplevel").style("cursor", d.dragmode === "pan" ? "move" : "crosshair");
        };
      }, 77416: function(o, s, n) {
        var l = n(10229), u = n(13792).u, i = n(25829), h = n(13582).overrideAll, p = n(93049).extendFlat, _ = { title: { text: i.title.text, font: i.title.font }, color: i.color, tickmode: i.minor.tickmode, nticks: p({}, i.nticks, { dflt: 6, min: 1 }), tick0: i.tick0, dtick: i.dtick, tickvals: i.tickvals, ticktext: i.ticktext, ticks: i.ticks, ticklen: i.ticklen, tickwidth: i.tickwidth, tickcolor: i.tickcolor, ticklabelstep: i.ticklabelstep, showticklabels: i.showticklabels, labelalias: i.labelalias, showtickprefix: i.showtickprefix, tickprefix: i.tickprefix, showticksuffix: i.showticksuffix, ticksuffix: i.ticksuffix, showexponent: i.showexponent, exponentformat: i.exponentformat, minexponent: i.minexponent, separatethousands: i.separatethousands, tickfont: i.tickfont, tickangle: i.tickangle, tickformat: i.tickformat, tickformatstops: i.tickformatstops, hoverformat: i.hoverformat, showline: p({}, i.showline, { dflt: !0 }), linecolor: i.linecolor, linewidth: i.linewidth, showgrid: p({}, i.showgrid, { dflt: !0 }), gridcolor: i.gridcolor, gridwidth: i.gridwidth, griddash: i.griddash, layer: i.layer, min: { valType: "number", dflt: 0, min: 0 }, _deprecated: { title: i._deprecated.title, titlefont: i._deprecated.titlefont } }, d = o.exports = h({ domain: u({ name: "ternary" }), bgcolor: { valType: "color", dflt: l.background }, sum: { valType: "number", dflt: 1, min: 0 }, aaxis: _, baxis: _, caxis: _ }, "plot", "from-root");
        d.uirevision = { valType: "any", editType: "none" }, d.aaxis.uirevision = d.baxis.uirevision = d.caxis.uirevision = { valType: "any", editType: "none" };
      }, 25247: function(o, s, n) {
        var l = n(78766), u = n(78032), i = n(34809), h = n(4448), p = n(12036), _ = n(54616), d = n(87433), f = n(22777), c = n(97405), g = n(77416), m = ["aaxis", "baxis", "caxis"];
        function x(k, S, A, C) {
          var D, L, E, P = A("bgcolor"), I = A("sum");
          C.bgColor = l.combine(P, C.paper_bgcolor);
          for (var M = 0; M < m.length; M++) L = k[D = m[M]] || {}, (E = u.newContainer(S, D))._name = D, w(L, E, C, S);
          var O = S.aaxis, T = S.baxis, z = S.caxis;
          O.min + T.min + z.min >= I && (O.min = 0, T.min = 0, z.min = 0, k.aaxis && delete k.aaxis.min, k.baxis && delete k.baxis.min, k.caxis && delete k.caxis.min);
        }
        function w(k, S, A, C) {
          var D = g[S._name];
          function L(T, z) {
            return i.coerce(k, S, D, T, z);
          }
          L("uirevision", C.uirevision), S.type = "linear";
          var E = L("color"), P = E !== D.color.dflt ? E : A.font.color, I = S._name.charAt(0).toUpperCase(), M = "Component " + I, O = L("title.text", M);
          S._hovertitle = O === M ? O : I, i.coerceFont(L, "title.font", A.font, { overrideDflt: { size: i.bigFont(A.font.size), color: P } }), L("min"), f(k, S, L, "linear"), _(k, S, L, "linear"), p(k, S, L, "linear", { noAutotickangles: !0, noTicklabelshift: !0, noTicklabelstandoff: !0 }), d(k, S, L, { outerTicks: !0 }), L("showticklabels") && (i.coerceFont(L, "tickfont", A.font, { overrideDflt: { color: P } }), L("tickangle"), L("tickformat")), c(k, S, L, { dfltColor: E, bgColor: A.bgColor, blend: 60, showLine: !0, showGrid: !0, noZeroLine: !0, attributes: D }), L("hoverformat"), L("layer");
        }
        o.exports = function(k, S, A) {
          h(k, S, A, { type: "ternary", attributes: g, handleDefaults: x, font: S.font, paper_bgcolor: S.paper_bgcolor });
        };
      }, 83637: function(o, s, n) {
        var l = n(45568), u = n(65657), i = n(33626), h = n(34809), p = h.strTranslate, _ = h._, d = n(78766), f = n(62203), c = n(19091), g = n(93049).extendFlat, m = n(44122), x = n(29714), w = n(14751), k = n(32141), S = n(70414), A = S.freeMode, C = S.rectMode, D = n(17240), L = n(44844).prepSelect, E = n(44844).selectOnClick, P = n(44844).clearOutline, I = n(44844).clearSelectionsCache, M = n(54826);
        function O(re, Y) {
          this.id = re.id, this.graphDiv = re.graphDiv, this.init(Y), this.makeFramework(Y), this.updateFx(Y), this.aTickLayout = null, this.bTickLayout = null, this.cTickLayout = null;
        }
        o.exports = O;
        var T = O.prototype;
        T.init = function(re) {
          this.container = re._ternarylayer, this.defs = re._defs, this.layoutId = re._uid, this.traceHash = {}, this.layers = {};
        }, T.plot = function(re, Y) {
          var te = this, ee = Y[te.id], X = Y._size;
          te._hasClipOnAxisFalse = !1;
          for (var Q = 0; Q < re.length; Q++) if (re[Q][0].trace.cliponaxis === !1) {
            te._hasClipOnAxisFalse = !0;
            break;
          }
          te.updateLayers(ee), te.adjustLayout(ee, X), m.generalUpdatePerTraceModule(te.graphDiv, te, re, ee), te.layers.plotbg.select("path").call(d.fill, ee.bgcolor);
        }, T.makeFramework = function(re) {
          var Y = this, te = Y.graphDiv, ee = re[Y.id], X = Y.clipId = "clip" + Y.layoutId + Y.id, Q = Y.clipIdRelative = "clip-relative" + Y.layoutId + Y.id;
          Y.clipDef = h.ensureSingleById(re._clips, "clipPath", X, function(ue) {
            ue.append("path").attr("d", "M0,0Z");
          }), Y.clipDefRelative = h.ensureSingleById(re._clips, "clipPath", Q, function(ue) {
            ue.append("path").attr("d", "M0,0Z");
          }), Y.plotContainer = h.ensureSingle(Y.container, "g", Y.id), Y.updateLayers(ee), f.setClipUrl(Y.layers.backplot, X, te), f.setClipUrl(Y.layers.grids, X, te);
        }, T.updateFx = function(re) {
          re._ternarylayer.selectAll("g.toplevel").style("cursor", re.dragmode === "pan" ? "move" : "crosshair");
        }, T.updateLayers = function(re) {
          var Y = this.layers, te = ["draglayer", "plotbg", "backplot", "grids"];
          re.aaxis.layer === "below traces" && te.push("aaxis", "aline"), re.baxis.layer === "below traces" && te.push("baxis", "bline"), re.caxis.layer === "below traces" && te.push("caxis", "cline"), te.push("frontplot"), re.aaxis.layer === "above traces" && te.push("aaxis", "aline"), re.baxis.layer === "above traces" && te.push("baxis", "bline"), re.caxis.layer === "above traces" && te.push("caxis", "cline");
          var ee = this.plotContainer.selectAll("g.toplevel").data(te, String), X = ["agrid", "bgrid", "cgrid"];
          ee.enter().append("g").attr("class", function(Q) {
            return "toplevel " + Q;
          }).each(function(Q) {
            var ue = l.select(this);
            Y[Q] = ue, Q === "frontplot" ? ue.append("g").classed("scatterlayer", !0) : Q === "backplot" ? ue.append("g").classed("maplayer", !0) : Q === "plotbg" ? ue.append("path").attr("d", "M0,0Z") : Q === "aline" || Q === "bline" || Q === "cline" ? ue.append("path") : Q === "grids" && X.forEach(function(ce) {
              Y[ce] = ue.append("g").classed("grid " + ce, !0);
            });
          }), ee.order();
        };
        var z = Math.sqrt(4 / 3);
        T.adjustLayout = function(re, Y) {
          var te, ee, X, Q, ue, ce, he = this, de = re.domain, ne = (de.x[0] + de.x[1]) / 2, ae = (de.y[0] + de.y[1]) / 2, se = de.x[1] - de.x[0], me = de.y[1] - de.y[0], ye = se * Y.w, pe = me * Y.h, be = re.sum, Ae = re.aaxis.min, Se = re.baxis.min, Me = re.caxis.min;
          ye > z * pe ? X = (Q = pe) * z : Q = (X = ye) / z, ue = se * X / ye, ce = me * Q / pe, te = Y.l + Y.w * ne - X / 2, ee = Y.t + Y.h * (1 - ae) - Q / 2, he.x0 = te, he.y0 = ee, he.w = X, he.h = Q, he.sum = be, he.xaxis = { type: "linear", range: [Ae + 2 * Me - be, be - Ae - 2 * Se], domain: [ne - ue / 2, ne + ue / 2], _id: "x" }, c(he.xaxis, he.graphDiv._fullLayout), he.xaxis.setScale(), he.xaxis.isPtWithinRange = function(Re) {
            return Re.a >= he.aaxis.range[0] && Re.a <= he.aaxis.range[1] && Re.b >= he.baxis.range[1] && Re.b <= he.baxis.range[0] && Re.c >= he.caxis.range[1] && Re.c <= he.caxis.range[0];
          }, he.yaxis = { type: "linear", range: [Ae, be - Se - Me], domain: [ae - ce / 2, ae + ce / 2], _id: "y" }, c(he.yaxis, he.graphDiv._fullLayout), he.yaxis.setScale(), he.yaxis.isPtWithinRange = function() {
            return !0;
          };
          var De = he.yaxis.domain[0], Le = he.aaxis = g({}, re.aaxis, { range: [Ae, be - Se - Me], side: "left", tickangle: (+re.aaxis.tickangle || 0) - 30, domain: [De, De + ce * z], anchor: "free", position: 0, _id: "y", _length: X });
          c(Le, he.graphDiv._fullLayout), Le.setScale();
          var We = he.baxis = g({}, re.baxis, { range: [be - Ae - Me, Se], side: "bottom", domain: he.xaxis.domain, anchor: "free", position: 0, _id: "x", _length: X });
          c(We, he.graphDiv._fullLayout), We.setScale();
          var Ee = he.caxis = g({}, re.caxis, { range: [be - Ae - Se, Me], side: "right", tickangle: (+re.caxis.tickangle || 0) + 30, domain: [De, De + ce * z], anchor: "free", position: 0, _id: "y", _length: X });
          c(Ee, he.graphDiv._fullLayout), Ee.setScale();
          var Ne = "M" + te + "," + (ee + Q) + "h" + X + "l-" + X / 2 + ",-" + Q + "Z";
          he.clipDef.select("path").attr("d", Ne), he.layers.plotbg.select("path").attr("d", Ne);
          var Ie = "M0," + Q + "h" + X + "l-" + X / 2 + ",-" + Q + "Z";
          he.clipDefRelative.select("path").attr("d", Ie);
          var ge = p(te, ee);
          he.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform", ge), he.clipDefRelative.select("path").attr("transform", null);
          var Ce = p(te - We._offset, ee + Q);
          he.layers.baxis.attr("transform", Ce), he.layers.bgrid.attr("transform", Ce);
          var we = p(te + X / 2, ee) + "rotate(30)" + p(0, -Le._offset);
          he.layers.aaxis.attr("transform", we), he.layers.agrid.attr("transform", we);
          var Ge = p(te + X / 2, ee) + "rotate(-30)" + p(0, -Ee._offset);
          he.layers.caxis.attr("transform", Ge), he.layers.cgrid.attr("transform", Ge), he.drawAxes(!0), he.layers.aline.select("path").attr("d", Le.showline ? "M" + te + "," + (ee + Q) + "l" + X / 2 + ",-" + Q : "M0,0").call(d.stroke, Le.linecolor || "#000").style("stroke-width", (Le.linewidth || 0) + "px"), he.layers.bline.select("path").attr("d", We.showline ? "M" + te + "," + (ee + Q) + "h" + X : "M0,0").call(d.stroke, We.linecolor || "#000").style("stroke-width", (We.linewidth || 0) + "px"), he.layers.cline.select("path").attr("d", Ee.showline ? "M" + (te + X / 2) + "," + ee + "l" + X / 2 + "," + Q : "M0,0").call(d.stroke, Ee.linecolor || "#000").style("stroke-width", (Ee.linewidth || 0) + "px"), he.graphDiv._context.staticPlot || he.initInteractions(), f.setClipUrl(he.layers.frontplot, he._hasClipOnAxisFalse ? null : he.clipId, he.graphDiv);
        }, T.drawAxes = function(re) {
          var Y = this, te = Y.graphDiv, ee = Y.id.substr(7) + "title", X = Y.layers, Q = Y.aaxis, ue = Y.baxis, ce = Y.caxis;
          if (Y.drawAx(Q), Y.drawAx(ue), Y.drawAx(ce), re) {
            var he = Math.max(Q.showticklabels ? Q.tickfont.size / 2 : 0, (ce.showticklabels ? 0.75 * ce.tickfont.size : 0) + (ce.ticks === "outside" ? 0.87 * ce.ticklen : 0)), de = (ue.showticklabels ? ue.tickfont.size : 0) + (ue.ticks === "outside" ? ue.ticklen : 0) + 3;
            X["a-title"] = D.draw(te, "a" + ee, { propContainer: Q, propName: Y.id + ".aaxis.title", placeholder: _(te, "Click to enter Component A title"), attributes: { x: Y.x0 + Y.w / 2, y: Y.y0 - Q.title.font.size / 3 - he, "text-anchor": "middle" } }), X["b-title"] = D.draw(te, "b" + ee, { propContainer: ue, propName: Y.id + ".baxis.title", placeholder: _(te, "Click to enter Component B title"), attributes: { x: Y.x0 - de, y: Y.y0 + Y.h + 0.83 * ue.title.font.size + de, "text-anchor": "middle" } }), X["c-title"] = D.draw(te, "c" + ee, { propContainer: ce, propName: Y.id + ".caxis.title", placeholder: _(te, "Click to enter Component C title"), attributes: { x: Y.x0 + Y.w + de, y: Y.y0 + Y.h + 0.83 * ce.title.font.size + de, "text-anchor": "middle" } });
          }
        }, T.drawAx = function(re) {
          var Y, te = this, ee = te.graphDiv, X = re._name, Q = X.charAt(0), ue = re._id, ce = te.layers[X], he = Q + "tickLayout", de = (Y = re).ticks + String(Y.ticklen) + String(Y.showticklabels);
          te[he] !== de && (ce.selectAll("." + ue + "tick").remove(), te[he] = de), re.setScale();
          var ne = x.calcTicks(re), ae = x.clipEnds(re, ne), se = x.makeTransTickFn(re), me = x.getTickSigns(re)[2], ye = h.deg2rad(30), pe = me * (re.linewidth || 1) / 2, be = me * re.ticklen, Ae = te.w, Se = te.h, Me = Q === "b" ? "M0," + pe + "l" + Math.sin(ye) * be + "," + Math.cos(ye) * be : "M" + pe + ",0l" + Math.cos(ye) * be + "," + -Math.sin(ye) * be, De = { a: "M0,0l" + Se + ",-" + Ae / 2, b: "M0,0l-" + Ae / 2 + ",-" + Se, c: "M0,0l-" + Se + "," + Ae / 2 }[Q];
          x.drawTicks(ee, re, { vals: re.ticks === "inside" ? ae : ne, layer: ce, path: Me, transFn: se, crisp: !1 }), x.drawGrid(ee, re, { vals: ae, layer: te.layers[Q + "grid"], path: De, transFn: se, crisp: !1 }), x.drawLabels(ee, re, { vals: ne, layer: ce, transFn: se, labelFns: x.makeLabelFns(re, 0, 30) });
        };
        var F = M.MINZOOM / 2 + 0.87, U = "m-0.87,.5h" + F + "v3h-" + (F + 5.2) + "l" + (F / 2 + 2.6) + ",-" + (0.87 * F + 4.5) + "l2.6,1.5l-" + F / 2 + "," + 0.87 * F + "Z", V = "m0.87,.5h-" + F + "v3h" + (F + 5.2) + "l-" + (F / 2 + 2.6) + ",-" + (0.87 * F + 4.5) + "l-2.6,1.5l" + F / 2 + "," + 0.87 * F + "Z", $ = "m0,1l" + F / 2 + "," + 0.87 * F + "l2.6,-1.5l-" + (F / 2 + 2.6) + ",-" + (0.87 * F + 4.5) + "l-" + (F / 2 + 2.6) + "," + (0.87 * F + 4.5) + "l2.6,1.5l" + F / 2 + ",-" + 0.87 * F + "Z", q = !0;
        function K(re) {
          l.select(re).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove();
        }
        T.clearOutline = function() {
          I(this.dragOptions), P(this.dragOptions.gd);
        }, T.initInteractions = function() {
          var re, Y, te, ee, X, Q, ue, ce, he, de, ne, ae, se = this, me = se.layers.plotbg.select("path").node(), ye = se.graphDiv, pe = ye._fullLayout._zoomlayer;
          function be(Ie) {
            var ge = {};
            return ge[se.id + ".aaxis.min"] = Ie.a, ge[se.id + ".baxis.min"] = Ie.b, ge[se.id + ".caxis.min"] = Ie.c, ge;
          }
          function Ae(Ie, ge) {
            var Ce = ye._fullLayout.clickmode;
            K(ye), Ie === 2 && (ye.emit("plotly_doubleclick", null), i.call("_guiRelayout", ye, be({ a: 0, b: 0, c: 0 }))), Ce.indexOf("select") > -1 && Ie === 1 && E(ge, ye, [se.xaxis], [se.yaxis], se.id, se.dragOptions), Ce.indexOf("event") > -1 && k.click(ye, ge, se.id);
          }
          function Se(Ie, ge) {
            return 1 - ge / se.h;
          }
          function Me(Ie, ge) {
            return 1 - (Ie + (se.h - ge) / Math.sqrt(3)) / se.w;
          }
          function De(Ie, ge) {
            return (Ie - (se.h - ge) / Math.sqrt(3)) / se.w;
          }
          function Le(Ie, ge) {
            var Ce = te + Ie * re, we = ee + ge * Y, Ge = Math.max(0, Math.min(1, Se(0, ee), Se(0, we))), Re = Math.max(0, Math.min(1, Me(te, ee), Me(Ce, we))), je = Math.max(0, Math.min(1, De(te, ee), De(Ce, we))), Ke = (Ge / 2 + je) * se.w, tt = (1 - Ge / 2 - Re) * se.w, _e = (Ke + tt) / 2, Be = tt - Ke, $e = (1 - Ge) * se.h, Ze = $e - Be / z;
            Be < M.MINZOOM ? (ue = X, ne.attr("d", he), ae.attr("d", "M0,0Z")) : (ue = { a: X.a + Ge * Q, b: X.b + Re * Q, c: X.c + je * Q }, ne.attr("d", he + "M" + Ke + "," + $e + "H" + tt + "L" + _e + "," + Ze + "L" + Ke + "," + $e + "Z"), ae.attr("d", "M" + te + "," + ee + "m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM" + Ke + "," + $e + U + "M" + tt + "," + $e + V + "M" + _e + "," + Ze + $)), de || (ne.transition().style("fill", ce > 0.2 ? "rgba(0,0,0,0.4)" : "rgba(255,255,255,0.3)").duration(200), ae.transition().style("opacity", 1).duration(200), de = !0), ye.emit("plotly_relayouting", be(ue));
          }
          function We() {
            K(ye), ue !== X && (i.call("_guiRelayout", ye, be(ue)), q && ye.data && ye._context.showTips && (h.notifier(_(ye, "Double-click to zoom back out"), "long"), q = !1));
          }
          function Ee(Ie, ge) {
            var Ce = Ie / se.xaxis._m, we = ge / se.yaxis._m, Ge = [(ue = { a: X.a - we, b: X.b + (Ce + we) / 2, c: X.c - (Ce - we) / 2 }).a, ue.b, ue.c].sort(h.sorterAsc), Re = Ge.indexOf(ue.a), je = Ge.indexOf(ue.b), Ke = Ge.indexOf(ue.c);
            Ge[0] < 0 && (Ge[1] + Ge[0] / 2 < 0 ? (Ge[2] += Ge[0] + Ge[1], Ge[0] = Ge[1] = 0) : (Ge[2] += Ge[0] / 2, Ge[1] += Ge[0] / 2, Ge[0] = 0), ue = { a: Ge[Re], b: Ge[je], c: Ge[Ke] }, ge = (X.a - ue.a) * se.yaxis._m, Ie = (X.c - ue.c - X.b + ue.b) * se.xaxis._m);
            var tt = p(se.x0 + Ie, se.y0 + ge);
            se.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform", tt);
            var _e = p(-Ie, -ge);
            se.clipDefRelative.select("path").attr("transform", _e), se.aaxis.range = [ue.a, se.sum - ue.b - ue.c], se.baxis.range = [se.sum - ue.a - ue.c, ue.b], se.caxis.range = [se.sum - ue.a - ue.b, ue.c], se.drawAxes(!1), se._hasClipOnAxisFalse && se.plotContainer.select(".scatterlayer").selectAll(".trace").call(f.hideOutsideRangePoints, se), ye.emit("plotly_relayouting", be(ue));
          }
          function Ne() {
            i.call("_guiRelayout", ye, be(ue));
          }
          this.dragOptions = { element: me, gd: ye, plotinfo: { id: se.id, domain: ye._fullLayout[se.id].domain, xaxis: se.xaxis, yaxis: se.yaxis }, subplot: se.id, prepFn: function(Ie, ge, Ce) {
            se.dragOptions.xaxes = [se.xaxis], se.dragOptions.yaxes = [se.yaxis], re = ye._fullLayout._invScaleX, Y = ye._fullLayout._invScaleY;
            var we = se.dragOptions.dragmode = ye._fullLayout.dragmode;
            A(we) ? se.dragOptions.minDrag = 1 : se.dragOptions.minDrag = void 0, we === "zoom" ? (se.dragOptions.moveFn = Le, se.dragOptions.clickFn = Ae, se.dragOptions.doneFn = We, function(Ge, Re, je) {
              var Ke = me.getBoundingClientRect();
              te = Re - Ke.left, ee = je - Ke.top, ye._fullLayout._calcInverseTransform(ye);
              var tt = ye._fullLayout._invTransform, _e = h.apply3DTransform(tt)(te, ee);
              te = _e[0], ee = _e[1], X = { a: se.aaxis.range[0], b: se.baxis.range[1], c: se.caxis.range[1] }, ue = X, Q = se.aaxis.range[1] - X.a, ce = u(se.graphDiv._fullLayout[se.id].bgcolor).getLuminance(), he = "M0," + se.h + "L" + se.w / 2 + ", 0L" + se.w + "," + se.h + "Z", de = !1, ne = pe.append("path").attr("class", "zoombox").attr("transform", p(se.x0, se.y0)).style({ fill: ce > 0.2 ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)", "stroke-width": 0 }).attr("d", he), ae = pe.append("path").attr("class", "zoombox-corners").attr("transform", p(se.x0, se.y0)).style({ fill: d.background, stroke: d.defaultLine, "stroke-width": 1, opacity: 0 }).attr("d", "M0,0Z"), se.clearOutline(ye);
            }(0, ge, Ce)) : we === "pan" ? (se.dragOptions.moveFn = Ee, se.dragOptions.clickFn = Ae, se.dragOptions.doneFn = Ne, X = { a: se.aaxis.range[0], b: se.baxis.range[1], c: se.caxis.range[1] }, ue = X, se.clearOutline(ye)) : (C(we) || A(we)) && L(Ie, ge, Ce, se.dragOptions, we);
          } }, me.onmousemove = function(Ie) {
            k.hover(ye, Ie, se.id), ye._fullLayout._lasthover = me, ye._fullLayout._hoversubplot = se.id;
          }, me.onmouseout = function(Ie) {
            ye._dragging || w.unhover(ye, Ie);
          }, w.init(this.dragOptions);
        };
      }, 33626: function(o, s, n) {
        var l = n(48636), u = n(4969), i = n(36539), h = n(56174), p = n(95425).addStyleRule, _ = n(93049), d = n(9829), f = n(6704), c = _.extendFlat, g = _.extendDeepAll;
        function m(E) {
          var P = E.name, I = E.categories, M = E.meta;
          if (s.modules[P]) l.log("Type " + P + " already registered");
          else {
            s.subplotsRegistry[E.basePlotModule.name] || function(q) {
              var K = q.name;
              if (s.subplotsRegistry[K]) l.log("Plot type " + K + " already registered.");
              else for (var re in S(q), s.subplotsRegistry[K] = q, s.componentsRegistry) D(re, q.name);
            }(E.basePlotModule);
            for (var O = {}, T = 0; T < I.length; T++) O[I[T]] = !0, s.allCategories[I[T]] = !0;
            for (var z in s.modules[P] = { _module: E, categories: O }, M && Object.keys(M).length && (s.modules[P].meta = M), s.allTypes.push(P), s.componentsRegistry) A(z, P);
            E.layoutAttributes && c(s.traceLayoutAttributes, E.layoutAttributes);
            var F = E.basePlotModule, U = F.name;
            if (U === "mapbox") {
              var V = F.constants.styleRules;
              for (var $ in V) p(".js-plotly-plot .plotly .mapboxgl-" + $, V[$]);
            }
            U === "map" && n(96144), U !== "geo" && U !== "mapbox" && U !== "map" || window.PlotlyGeoAssets !== void 0 || (window.PlotlyGeoAssets = { topojson: {} });
          }
        }
        function x(E) {
          if (typeof E.name != "string") throw new Error("Component module *name* must be a string.");
          var P = E.name;
          for (var I in s.componentsRegistry[P] = E, E.layoutAttributes && (E.layoutAttributes._isLinkedToArray && i(s.layoutArrayContainers, P), S(E)), s.modules) A(P, I);
          for (var M in s.subplotsRegistry) D(P, M);
          for (var O in s.transformsRegistry) C(P, O);
          E.schema && E.schema.layout && g(f, E.schema.layout);
        }
        function w(E) {
          if (typeof E.name != "string") throw new Error("Transform module *name* must be a string.");
          var P = "Transform module " + E.name, I = typeof E.transform == "function", M = typeof E.calcTransform == "function";
          if (!I && !M) throw new Error(P + " is missing a *transform* or *calcTransform* method.");
          for (var O in I && M && l.log([P + " has both a *transform* and *calcTransform* methods.", "Please note that all *transform* methods are executed", "before all *calcTransform* methods."].join(" ")), h(E.attributes) || l.log(P + " registered without an *attributes* object."), typeof E.supplyDefaults != "function" && l.log(P + " registered without a *supplyDefaults* method."), s.transformsRegistry[E.name] = E, s.componentsRegistry) C(O, E.name);
        }
        function k(E) {
          var P = E.name, I = P.split("-")[0], M = E.dictionary, O = E.format, T = M && Object.keys(M).length, z = O && Object.keys(O).length, F = s.localeRegistry, U = F[P];
          if (U || (F[P] = U = {}), I !== P) {
            var V = F[I];
            V || (F[I] = V = {}), T && V.dictionary === U.dictionary && (V.dictionary = M), z && V.format === U.format && (V.format = O);
          }
          T && (U.dictionary = M), z && (U.format = O);
        }
        function S(E) {
          if (E.layoutAttributes) {
            var P = E.layoutAttributes._arrayAttrRegexps;
            if (P) for (var I = 0; I < P.length; I++) i(s.layoutArrayRegexes, P[I]);
          }
        }
        function A(E, P) {
          var I = s.componentsRegistry[E].schema;
          if (I && I.traces) {
            var M = I.traces[P];
            M && g(s.modules[P]._module.attributes, M);
          }
        }
        function C(E, P) {
          var I = s.componentsRegistry[E].schema;
          if (I && I.transforms) {
            var M = I.transforms[P];
            M && g(s.transformsRegistry[P].attributes, M);
          }
        }
        function D(E, P) {
          var I = s.componentsRegistry[E].schema;
          if (I && I.subplots) {
            var M = s.subplotsRegistry[P], O = M.layoutAttributes, T = M.attr === "subplot" ? M.name : M.attr;
            Array.isArray(T) && (T = T[0]);
            var z = I.subplots[T];
            O && z && g(O, z);
          }
        }
        function L(E) {
          return typeof E == "object" && (E = E.type), E;
        }
        s.modules = {}, s.allCategories = {}, s.allTypes = [], s.subplotsRegistry = {}, s.transformsRegistry = {}, s.componentsRegistry = {}, s.layoutArrayContainers = [], s.layoutArrayRegexes = [], s.traceLayoutAttributes = {}, s.localeRegistry = {}, s.apiMethodRegistry = {}, s.collectableSubplotTypes = null, s.register = function(E) {
          if (s.collectableSubplotTypes = null, !E) throw new Error("No argument passed to Plotly.register.");
          E && !Array.isArray(E) && (E = [E]);
          for (var P = 0; P < E.length; P++) {
            var I = E[P];
            if (!I) throw new Error("Invalid module was attempted to be registered!");
            switch (I.moduleType) {
              case "trace":
                m(I);
                break;
              case "transform":
                w(I);
                break;
              case "component":
                x(I);
                break;
              case "locale":
                k(I);
                break;
              case "apiMethod":
                var M = I.name;
                s.apiMethodRegistry[M] = I.fn;
                break;
              default:
                throw new Error("Invalid module was attempted to be registered!");
            }
          }
        }, s.getModule = function(E) {
          var P = s.modules[L(E)];
          return !!P && P._module;
        }, s.traceIs = function(E, P) {
          if ((E = L(E)) === "various") return !1;
          var I = s.modules[E];
          return I || (E && l.log("Unrecognized trace type " + E + "."), I = s.modules[d.type.dflt]), !!I.categories[P];
        }, s.getTransformIndices = function(E, P) {
          for (var I = [], M = E.transforms || [], O = 0; O < M.length; O++) M[O].type === P && I.push(O);
          return I;
        }, s.hasTransform = function(E, P) {
          for (var I = E.transforms || [], M = 0; M < I.length; M++) if (I[M].type === P) return !0;
          return !1;
        }, s.getComponentMethod = function(E, P) {
          var I = s.componentsRegistry[E];
          return I && I[P] || u;
        }, s.call = function() {
          var E = arguments[0], P = [].slice.call(arguments, 1);
          return s.apiMethodRegistry[E].apply(null, P);
        };
      }, 3164: function(o, s, n) {
        var l = n(33626), u = n(34809), i = u.extendFlat, h = u.extendDeep;
        function p(_) {
          var d;
          switch (_) {
            case "themes__thumb":
              d = { autosize: !0, width: 150, height: 150, title: { text: "" }, showlegend: !1, margin: { l: 5, r: 5, t: 5, b: 5, pad: 0 }, annotations: [] };
              break;
            case "thumbnail":
              d = { title: { text: "" }, hidesources: !0, showlegend: !1, borderwidth: 0, bordercolor: "", margin: { l: 1, r: 1, t: 1, b: 1, pad: 0 }, annotations: [] };
              break;
            default:
              d = {};
          }
          return d;
        }
        o.exports = function(_, d) {
          var f, c, g = _.data, m = _.layout, x = h([], g), w = h({}, m, p(d.tileClass)), k = _._context || {};
          if (d.width && (w.width = d.width), d.height && (w.height = d.height), d.tileClass === "thumbnail" || d.tileClass === "themes__thumb") {
            w.annotations = [];
            var S = Object.keys(w);
            for (f = 0; f < S.length; f++) c = S[f], ["xaxis", "yaxis", "zaxis"].indexOf(c.slice(0, 5)) > -1 && (w[S[f]].title = { text: "" });
            for (f = 0; f < x.length; f++) {
              var A = x[f];
              A.showscale = !1, A.marker && (A.marker.showscale = !1), l.traceIs(A, "pie-like") && (A.textposition = "none");
            }
          }
          if (Array.isArray(d.annotations)) for (f = 0; f < d.annotations.length; f++) w.annotations.push(d.annotations[f]);
          var C = Object.keys(w).filter(function(I) {
            return I.match(/^scene\d*$/);
          });
          if (C.length) {
            var D = {};
            for (d.tileClass === "thumbnail" && (D = { title: { text: "" }, showaxeslabels: !1, showticklabels: !1, linetickenable: !1 }), f = 0; f < C.length; f++) {
              var L = w[C[f]];
              L.xaxis || (L.xaxis = {}), L.yaxis || (L.yaxis = {}), L.zaxis || (L.zaxis = {}), i(L.xaxis, D), i(L.yaxis, D), i(L.zaxis, D), L._scene = null;
            }
          }
          var E = document.createElement("div");
          d.tileClass && (E.className = d.tileClass);
          var P = { gd: E, td: E, layout: w, data: x, config: { staticPlot: d.staticPlot === void 0 || d.staticPlot, plotGlPixelRatio: d.plotGlPixelRatio === void 0 ? 2 : d.plotGlPixelRatio, displaylogo: d.displaylogo || !1, showLink: d.showLink || !1, showTips: d.showTips || !1, mapboxAccessToken: k.mapboxAccessToken } };
          return d.setBackground !== "transparent" && (P.config.setBackground = d.setBackground || "opaque"), P.gd.defaultLayout = p(d.tileClass), P;
        };
      }, 26452: function(o, s, n) {
        var l = n(34809), u = n(80491), i = n(33353), h = n(84619);
        o.exports = function(p, _) {
          var d;
          return l.isPlainObject(p) || (d = l.getGraphDiv(p)), (_ = _ || {}).format = _.format || "png", _.width = _.width || null, _.height = _.height || null, _.imageDataOnly = !0, new Promise(function(f, c) {
            d && d._snapshotInProgress && c(new Error("Snapshotting already in progress.")), l.isIE() && _.format !== "svg" && c(new Error(h.MSG_IE_BAD_FORMAT)), d && (d._snapshotInProgress = !0);
            var g = u(p, _), m = _.filename || p.fn || "newplot";
            m += "." + _.format.replace("-", "."), g.then(function(x) {
              return d && (d._snapshotInProgress = !1), i(x, m, _.format);
            }).then(function(x) {
              f(x);
            }).catch(function(x) {
              d && (d._snapshotInProgress = !1), c(x);
            });
          });
        };
      }, 33353: function(o, s, n) {
        var l = n(34809), u = n(84619);
        o.exports = function(i, h, p) {
          var _ = document.createElement("a"), d = "download" in _;
          return new Promise(function(f, c) {
            var g, m;
            if (l.isIE()) return g = u.createBlob(i, "svg"), window.navigator.msSaveBlob(g, h), g = null, f(h);
            if (d) return g = u.createBlob(i, p), m = u.createObjectURL(g), _.href = m, _.download = h, document.body.appendChild(_), _.click(), document.body.removeChild(_), u.revokeObjectURL(m), g = null, f(h);
            if (l.isSafari()) {
              var x = p === "svg" ? "," : ";base64,";
              return u.octetStream(x + encodeURIComponent(i)), f(h);
            }
            c(new Error("download error"));
          });
        };
      }, 84619: function(o, s, n) {
        var l = n(33626);
        s.getDelay = function(i) {
          return i._has && (i._has("gl3d") || i._has("gl2d") || i._has("mapbox") || i._has("map")) ? 500 : 0;
        }, s.getRedrawFunc = function(i) {
          return function() {
            l.getComponentMethod("colorbar", "draw")(i);
          };
        }, s.encodeSVG = function(i) {
          return "data:image/svg+xml," + encodeURIComponent(i);
        }, s.encodeJSON = function(i) {
          return "data:application/json," + encodeURIComponent(i);
        };
        var u = window.URL || window.webkitURL;
        s.createObjectURL = function(i) {
          return u.createObjectURL(i);
        }, s.revokeObjectURL = function(i) {
          return u.revokeObjectURL(i);
        }, s.createBlob = function(i, h) {
          if (h === "svg") return new window.Blob([i], { type: "image/svg+xml;charset=utf-8" });
          if (h === "full-json") return new window.Blob([i], { type: "application/json;charset=utf-8" });
          var p = function(_) {
            for (var d = _.length, f = new ArrayBuffer(d), c = new Uint8Array(f), g = 0; g < d; g++) c[g] = _.charCodeAt(g);
            return f;
          }(window.atob(i));
          return new window.Blob([p], { type: "image/" + h });
        }, s.octetStream = function(i) {
          document.location.href = "data:application/octet-stream" + i;
        }, s.IMAGE_URL_PREFIX = /^data:image\/\w+;base64,/, s.MSG_IE_BAD_FORMAT = "Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";
      }, 6170: function(o, s, n) {
        var l = n(84619), u = { getDelay: l.getDelay, getRedrawFunc: l.getRedrawFunc, clone: n(3164), toSVG: n(6243), svgToImg: n(72914), toImage: n(76896), downloadImage: n(26452) };
        o.exports = u;
      }, 72914: function(o, s, n) {
        var l = n(34809), u = n(7683).EventEmitter, i = n(84619);
        o.exports = function(h) {
          var p = h.emitter || new u(), _ = new Promise(function(d, f) {
            var c = window.Image, g = h.svg, m = h.format || "png";
            if (l.isIE() && m !== "svg") {
              var x = new Error(i.MSG_IE_BAD_FORMAT);
              return f(x), h.promise ? _ : p.emit("error", x);
            }
            var w, k, S = h.canvas, A = h.scale || 1, C = h.width || 300, D = h.height || 150, L = A * C, E = A * D, P = S.getContext("2d", { willReadFrequently: !0 }), I = new c();
            m === "svg" || l.isSafari() ? k = i.encodeSVG(g) : (w = i.createBlob(g, "svg"), k = i.createObjectURL(w)), S.width = L, S.height = E, I.onload = function() {
              var M;
              switch (w = null, i.revokeObjectURL(k), m !== "svg" && P.drawImage(I, 0, 0, L, E), m) {
                case "jpeg":
                  M = S.toDataURL("image/jpeg");
                  break;
                case "png":
                  M = S.toDataURL("image/png");
                  break;
                case "webp":
                  M = S.toDataURL("image/webp");
                  break;
                case "svg":
                  M = k;
                  break;
                default:
                  var O = "Image format is not jpeg, png, svg or webp.";
                  if (f(new Error(O)), !h.promise) return p.emit("error", O);
              }
              d(M), h.promise || p.emit("success", M);
            }, I.onerror = function(M) {
              if (w = null, i.revokeObjectURL(k), f(M), !h.promise) return p.emit("error", M);
            }, I.src = k;
          });
          return h.promise ? _ : p;
        };
      }, 76896: function(o, s, n) {
        var l = n(7683).EventEmitter, u = n(33626), i = n(34809), h = n(84619), p = n(3164), _ = n(6243), d = n(72914);
        o.exports = function(f, c) {
          var g = new l(), m = p(f, { format: "png" }), x = m.gd;
          x.style.position = "absolute", x.style.left = "-5000px", document.body.appendChild(x);
          var w = h.getRedrawFunc(x);
          return u.call("_doPlot", x, m.data, m.layout, m.config).then(w).then(function() {
            var k = h.getDelay(x._fullLayout);
            setTimeout(function() {
              var S = _(x), A = document.createElement("canvas");
              A.id = i.randstr(), (g = d({ format: c.format, width: x._fullLayout.width, height: x._fullLayout.height, canvas: A, emitter: g, svg: S })).clean = function() {
                x && document.body.removeChild(x);
              };
            }, k);
          }).catch(function(k) {
            g.emit("error", k);
          }), g;
        };
      }, 6243: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(78766), p = n(62972), _ = /"/g, d = "TOBESTRIPPED", f = new RegExp('("' + d + ")|(" + d + '")', "g");
        o.exports = function(c, g, m) {
          var x, w = c._fullLayout, k = w._paper, S = w._toppaper, A = w.width, C = w.height;
          k.insert("rect", ":first-child").call(i.setRect, 0, 0, A, C).call(h.fill, w.paper_bgcolor);
          var D = w._basePlotModules || [];
          for (x = 0; x < D.length; x++) {
            var L = D[x];
            L.toSVG && L.toSVG(c);
          }
          if (S) {
            var E = S.node().childNodes, P = Array.prototype.slice.call(E);
            for (x = 0; x < P.length; x++) {
              var I = P[x];
              I.childNodes.length && k.node().appendChild(I);
            }
          }
          w._draggers && w._draggers.remove(), k.node().style.background = "", k.selectAll("text").attr({ "data-unformatted": null, "data-math": null }).each(function() {
            var O = l.select(this);
            if (this.style.visibility !== "hidden" && this.style.display !== "none") {
              O.style({ visibility: null, display: null });
              var T = this.style.fontFamily;
              T && T.indexOf('"') !== -1 && O.style("font-family", T.replace(_, d));
              var z = this.style.fontWeight;
              !z || z !== "normal" && z !== "400" || O.style("font-weight", void 0);
              var F = this.style.fontStyle;
              F && F === "normal" && O.style("font-style", void 0);
              var U = this.style.fontVariant;
              U && U === "normal" && O.style("font-variant", void 0);
            } else O.remove();
          }), k.selectAll(".gradient_filled,.pattern_filled").each(function() {
            var O = l.select(this), T = this.style.fill;
            T && T.indexOf("url(") !== -1 && O.style("fill", T.replace(_, d));
            var z = this.style.stroke;
            z && z.indexOf("url(") !== -1 && O.style("stroke", z.replace(_, d));
          }), g !== "pdf" && g !== "eps" || k.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width", 0), k.node().setAttributeNS(p.xmlns, "xmlns", p.svg), k.node().setAttributeNS(p.xmlns, "xmlns:xlink", p.xlink), g === "svg" && m && (k.attr("width", m * A), k.attr("height", m * C), k.attr("viewBox", "0 0 " + A + " " + C));
          var M = new window.XMLSerializer().serializeToString(k.node());
          return M = (M = (M = function(O) {
            var T = l.select("body").append("div").style({ display: "none" }).html(""), z = O.replace(/(&[^;]*;)/gi, function(F) {
              return F === "&lt;" ? "&#60;" : F === "&rt;" ? "&#62;" : F.indexOf("<") !== -1 || F.indexOf(">") !== -1 ? "" : T.html(F).text();
            });
            return T.remove(), z;
          }(M)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g, "&amp;")).replace(f, "'"), u.isIE() && (M = (M = (M = M.replace(/"/gi, "'")).replace(/(\('#)([^']*)('\))/gi, '("#$2")')).replace(/(\\')/gi, '"')), M;
        };
      }, 35374: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          for (var h = 0; h < u.length; h++) u[h].i = h;
          l.mergeArray(i.text, u, "tx"), l.mergeArray(i.hovertext, u, "htx");
          var p = i.marker;
          if (p) {
            l.mergeArray(p.opacity, u, "mo", !0), l.mergeArray(p.color, u, "mc");
            var _ = p.line;
            _ && (l.mergeArray(_.color, u, "mlc"), l.mergeArrayCastPositive(_.width, u, "mlw"));
          }
        };
      }, 81481: function(o, s, n) {
        var l = n(36640), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(3208).ay, p = n(87163), _ = n(80337), d = n(56155), f = n(94850).k, c = n(93049).extendFlat, g = _({ editType: "calc", arrayOk: !0, colorEditType: "style" }), m = c({}, l.marker.line.width, { dflt: 0 }), x = c({ width: m, editType: "calc" }, p("marker.line")), w = c({ line: x, editType: "calc" }, p("marker"), { opacity: { valType: "number", arrayOk: !0, dflt: 1, min: 0, max: 1, editType: "style" }, pattern: f, cornerradius: { valType: "any", editType: "calc" } });
        o.exports = { x: l.x, x0: l.x0, dx: l.dx, y: l.y, y0: l.y0, dy: l.dy, xperiod: l.xperiod, yperiod: l.yperiod, xperiod0: l.xperiod0, yperiod0: l.yperiod0, xperiodalignment: l.xperiodalignment, yperiodalignment: l.yperiodalignment, xhoverformat: u("x"), yhoverformat: u("y"), text: l.text, texttemplate: h({ editType: "plot" }, { keys: d.eventDataKeys }), hovertext: l.hovertext, hovertemplate: i({}, { keys: d.eventDataKeys }), textposition: { valType: "enumerated", values: ["inside", "outside", "auto", "none"], dflt: "auto", arrayOk: !0, editType: "calc" }, insidetextanchor: { valType: "enumerated", values: ["end", "middle", "start"], dflt: "end", editType: "plot" }, textangle: { valType: "angle", dflt: "auto", editType: "plot" }, textfont: c({}, g, {}), insidetextfont: c({}, g, {}), outsidetextfont: c({}, g, {}), constraintext: { valType: "enumerated", values: ["inside", "outside", "both", "none"], dflt: "both", editType: "calc" }, cliponaxis: c({}, l.cliponaxis, {}), orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc+clearAxisTypes" }, base: { valType: "any", dflt: null, arrayOk: !0, editType: "calc" }, offset: { valType: "number", dflt: null, arrayOk: !0, editType: "calc" }, width: { valType: "number", dflt: null, min: 0, arrayOk: !0, editType: "calc" }, marker: w, offsetgroup: l.offsetgroup, alignmentgroup: l.alignmentgroup, selected: { marker: { opacity: l.selected.marker.opacity, color: l.selected.marker.color, editType: "style" }, textfont: l.selected.textfont, editType: "style" }, unselected: { marker: { opacity: l.unselected.marker.opacity, color: l.unselected.marker.color, editType: "style" }, textfont: l.unselected.textfont, editType: "style" }, zorder: l.zorder, _deprecated: { bardir: { valType: "enumerated", editType: "calc", values: ["v", "h"] } } };
      }, 67565: function(o, s, n) {
        var l = n(29714), u = n(40528), i = n(65477).hasColorscale, h = n(28379), p = n(35374), _ = n(48861);
        o.exports = function(d, f) {
          var c, g, m, x, w, k, S = l.getFromId(d, f.xaxis || "x"), A = l.getFromId(d, f.yaxis || "y"), C = { msUTC: !(!f.base && f.base !== 0) };
          f.orientation === "h" ? (c = S.makeCalcdata(f, "x", C), m = A.makeCalcdata(f, "y"), x = u(f, A, "y", m), w = !!f.yperiodalignment, k = "y") : (c = A.makeCalcdata(f, "y", C), m = S.makeCalcdata(f, "x"), x = u(f, S, "x", m), w = !!f.xperiodalignment, k = "x"), g = x.vals;
          for (var D = Math.min(g.length, c.length), L = new Array(D), E = 0; E < D; E++) L[E] = { p: g[E], s: c[E] }, w && (L[E].orig_p = m[E], L[E][k + "End"] = x.ends[E], L[E][k + "Start"] = x.starts[E]), f.ids && (L[E].id = String(f.ids[E]));
          return i(f, "marker") && h(d, f, { vals: f.marker.color, containerStr: "marker", cLetter: "c" }), i(f, "marker.line") && h(d, f, { vals: f.marker.line.color, containerStr: "marker.line", cLetter: "c" }), p(L, f), _(L, f), L;
        };
      }, 56155: function(o) {
        o.exports = { TEXTPAD: 3, eventDataKeys: ["value", "label"] };
      }, 24782: function(o, s, n) {
        var l = n(10721), u = n(34809).isArrayOrTypedArray, i = n(63821).BADNUM, h = n(33626), p = n(29714), _ = n(84391).getAxisGroup, d = n(2880);
        function f(D, L, E, P, I) {
          if (P.length) {
            var M, O, T, z;
            switch (function(F, U) {
              var V, $;
              for (V = 0; V < U.length; V++) {
                var q, K = U[V], re = K[0].trace, Y = re.type === "funnel" ? re._base : re.base, te = re.orientation === "h" ? re.xcalendar : re.ycalendar, ee = F.type === "category" || F.type === "multicategory" ? function() {
                  return null;
                } : F.d2c;
                if (u(Y)) {
                  for ($ = 0; $ < Math.min(Y.length, K.length); $++) q = ee(Y[$], 0, te), l(q) ? (K[$].b = +q, K[$].hasB = 1) : K[$].b = 0;
                  for (; $ < K.length; $++) K[$].b = 0;
                } else {
                  q = ee(Y, 0, te);
                  var X = l(q);
                  for (q = X ? q : 0, $ = 0; $ < K.length; $++) K[$].b = q, X && (K[$].hasB = 1);
                }
              }
            }(E, P), I.mode) {
              case "overlay":
                c(L, E, P, I);
                break;
              case "group":
                for (M = [], O = [], T = 0; T < P.length; T++) (z = P[T])[0].trace.offset === void 0 ? O.push(z) : M.push(z);
                O.length && function(F, U, V, $, q) {
                  var K = new d($, { posAxis: U, sepNegVal: !1, overlapNoMerge: !q.norm });
                  (function(re, Y, te, ee) {
                    for (var X = re._fullLayout, Q = te.positions, ue = te.distinctPositions, ce = te.minDiff, he = te.traces, de = he.length, ne = Q.length !== ue.length, ae = ce * (1 - ee.gap), se = _(X, Y._id) + he[0][0].trace.orientation, me = X._alignmentOpts[se] || {}, ye = 0; ye < de; ye++) {
                      var pe, be, Ae = he[ye], Se = Ae[0].trace, Me = me[Se.alignmentgroup] || {}, De = Object.keys(Me.offsetGroups || {}).length, Le = (pe = De ? ae / De : ne ? ae / de : ae) * (1 - (ee.groupgap || 0));
                      be = De ? ((2 * Se._offsetIndex + 1 - De) * pe - Le) / 2 : ne ? ((2 * ye + 1 - de) * pe - Le) / 2 : -Le / 2;
                      var We = Ae[0].t;
                      We.barwidth = Le, We.poffset = be, We.bargroupwidth = ae, We.bardelta = ce;
                    }
                    te.binWidth = he[0][0].t.barwidth / 100, m(te), x(Y, te), w(Y, te, ne);
                  })(F, U, K, q), function(re, Y) {
                    for (var te = re.traces, ee = 0; ee < te.length; ee++) {
                      var X = te[ee];
                      if (X[0].trace.base === void 0) for (var Q = new d([X], { posAxis: Y, sepNegVal: !0, overlapNoMerge: !0 }), ue = 0; ue < X.length; ue++) {
                        var ce = X[ue];
                        if (ce.p !== i) {
                          var he = Q.put(ce.p, ce.b + ce.s);
                          he && (ce.b = he);
                        }
                      }
                    }
                  }(K, U), q.norm ? (S(K), A(V, K, q)) : k(V, K);
                }(D, L, E, O, I), M.length && c(L, E, M, I);
                break;
              case "stack":
              case "relative":
                for (M = [], O = [], T = 0; T < P.length; T++) (z = P[T])[0].trace.base === void 0 ? O.push(z) : M.push(z);
                (function(F) {
                  if (!(F.length < 2)) {
                    var U, V, $, q, K, re;
                    for (U = 0; U < F.length && (q = (V = F[U][0].trace).marker ? V.marker.cornerradius : void 0) === void 0; U++) ;
                    if (q !== void 0) for (K = l(q) ? +q : +q.slice(0, -1), re = l(q) ? "px" : "%", U = 0; U < F.length; U++) ($ = F[U][0].t).cornerradiusvalue = K, $.cornerradiusform = re;
                  }
                })(O), O.length && function(F, U, V, $, q) {
                  var K = new d($, { posAxis: U, sepNegVal: q.mode === "relative", overlapNoMerge: !(q.norm || q.mode === "stack" || q.mode === "relative") });
                  g(U, K, q), function(X, Q, ue) {
                    var ce, he, de, ne, ae, se, me = C(X), ye = Q.traces;
                    for (ne = 0; ne < ye.length; ne++) if ((he = (ce = ye[ne])[0].trace).type === "funnel") for (ae = 0; ae < ce.length; ae++) (se = ce[ae]).s !== i && Q.put(se.p, -0.5 * se.s);
                    for (ne = 0; ne < ye.length; ne++) {
                      de = (he = (ce = ye[ne])[0].trace).type === "funnel";
                      var pe = [];
                      for (ae = 0; ae < ce.length; ae++) if ((se = ce[ae]).s !== i) {
                        var be;
                        be = de ? se.s : se.s + se.b;
                        var Ae = Q.put(se.p, be), Se = Ae + be;
                        se.b = Ae, se[me] = Se, ue.norm || (pe.push(Se), se.hasB && pe.push(Ae));
                      }
                      ue.norm || (he._extremes[X._id] = p.findExtremes(X, pe, { tozero: !0, padded: !0 }));
                    }
                  }(V, K, q);
                  for (var re = 0; re < $.length; re++) for (var Y = $[re], te = 0; te < Y.length; te++) {
                    var ee = Y[te];
                    ee.s !== i && ee.b + ee.s === K.get(ee.p, ee.s) && (ee._outmost = !0);
                  }
                  q.norm && A(V, K, q);
                }(0, L, E, O, I), M.length && c(L, E, M, I);
            }
            (function(F) {
              var U, V, $, q, K, re, Y;
              for (U = 0; U < F.length; U++) $ = (V = F[U])[0].trace, (q = V[0].t).cornerradiusvalue === void 0 && (K = $.marker ? $.marker.cornerradius : void 0) !== void 0 && (re = l(K) ? +K : +K.slice(0, -1), Y = l(K) ? "px" : "%", q.cornerradiusvalue = re, q.cornerradiusform = Y);
            })(P), function(F, U) {
              var V, $, q, K = C(U), re = {}, Y = 1 / 0, te = -1 / 0;
              for (V = 0; V < F.length; V++) for (q = F[V], $ = 0; $ < q.length; $++) {
                var ee = q[$].p;
                l(ee) && (Y = Math.min(Y, ee), te = Math.max(te, ee));
              }
              var X = 1e4 / (te - Y), Q = re.round = function(Se) {
                return String(Math.round(X * (Se - Y)));
              }, ue = {}, ce = {}, he = F.some(function(Se) {
                var Me = Se[0].trace;
                return "marker" in Me && Me.marker.cornerradius;
              });
              for (V = 0; V < F.length; V++) {
                (q = F[V])[0].t.extents = re;
                var de = q[0].t.poffset, ne = u(de);
                for ($ = 0; $ < q.length; $++) {
                  var ae = q[$], se = ae[K] - ae.w / 2;
                  if (l(se)) {
                    var me = ae[K] + ae.w / 2, ye = Q(ae.p);
                    re[ye] ? re[ye] = [Math.min(se, re[ye][0]), Math.max(me, re[ye][1])] : re[ye] = [se, me];
                  }
                  if (ae.p0 = ae.p + (ne ? de[$] : de), ae.p1 = ae.p0 + ae.w, ae.s0 = ae.b, ae.s1 = ae.s0 + ae.s, he) {
                    var pe = Math.min(ae.s0, ae.s1) || 0, be = Math.max(ae.s0, ae.s1) || 0, Ae = ae[K];
                    ue[Ae] = Ae in ue ? Math.min(ue[Ae], pe) : pe, ce[Ae] = Ae in ce ? Math.max(ce[Ae], be) : be;
                  }
                }
              }
              he && function(Se, Me, De, Le) {
                for (var We = C(Le), Ee = 0; Ee < Se.length; Ee++) for (var Ne = Se[Ee], Ie = 0; Ie < Ne.length; Ie++) {
                  var ge = Ne[Ie], Ce = ge[We];
                  ge._sMin = Me[Ce], ge._sMax = De[Ce];
                }
              }(F, ue, ce, U);
            }(P, L);
          }
        }
        function c(D, L, E, P) {
          for (var I = 0; I < E.length; I++) {
            var M = E[I], O = new d([M], { posAxis: D, sepNegVal: !1, overlapNoMerge: !P.norm });
            g(D, O, P), P.norm ? (S(O), A(L, O, P)) : k(L, O);
          }
        }
        function g(D, L, E) {
          for (var P = L.minDiff, I = L.traces, M = P * (1 - E.gap), O = M * (1 - (E.groupgap || 0)), T = -O / 2, z = 0; z < I.length; z++) {
            var F = I[z][0].t;
            F.barwidth = O, F.poffset = T, F.bargroupwidth = M, F.bardelta = P;
          }
          L.binWidth = I[0][0].t.barwidth / 100, m(L), x(D, L), w(D, L);
        }
        function m(D) {
          var L, E, P = D.traces;
          for (L = 0; L < P.length; L++) {
            var I, M = P[L], O = M[0], T = O.trace, z = O.t, F = T._offset || T.offset, U = z.poffset;
            if (u(F)) {
              for (I = Array.prototype.slice.call(F, 0, M.length), E = 0; E < I.length; E++) l(I[E]) || (I[E] = U);
              for (E = I.length; E < M.length; E++) I.push(U);
              z.poffset = I;
            } else F !== void 0 && (z.poffset = F);
            var V = T._width || T.width, $ = z.barwidth;
            if (u(V)) {
              var q = Array.prototype.slice.call(V, 0, M.length);
              for (E = 0; E < q.length; E++) l(q[E]) || (q[E] = $);
              for (E = q.length; E < M.length; E++) q.push($);
              if (z.barwidth = q, F === void 0) {
                for (I = [], E = 0; E < M.length; E++) I.push(U + ($ - q[E]) / 2);
                z.poffset = I;
              }
            } else V !== void 0 && (z.barwidth = V, F === void 0 && (z.poffset = U + ($ - V) / 2));
          }
        }
        function x(D, L) {
          for (var E = L.traces, P = C(D), I = 0; I < E.length; I++) for (var M = E[I], O = M[0].t, T = O.poffset, z = u(T), F = O.barwidth, U = u(F), V = 0; V < M.length; V++) {
            var $ = M[V], q = $.w = U ? F[V] : F;
            $.p === void 0 && ($.p = $[P], $["orig_" + P] = $[P]);
            var K = (z ? T[V] : T) + q / 2;
            $[P] = $.p + K;
          }
        }
        function w(D, L, E) {
          var P = L.traces, I = L.minDiff / 2;
          p.minDtick(D, L.minDiff, L.distinctPositions[0], E);
          for (var M = 0; M < P.length; M++) {
            var O, T, z, F, U = P[M], V = U[0], $ = V.trace, q = [];
            for (F = 0; F < U.length; F++) T = (O = U[F]).p - I, z = O.p + I, q.push(T, z);
            if ($.width || $.offset) {
              var K = V.t, re = K.poffset, Y = K.barwidth, te = u(re), ee = u(Y);
              for (F = 0; F < U.length; F++) {
                O = U[F];
                var X = te ? re[F] : re, Q = ee ? Y[F] : Y;
                z = (T = O.p + X) + Q, q.push(T, z);
              }
            }
            $._extremes[D._id] = p.findExtremes(D, q, { padded: !1 });
          }
        }
        function k(D, L) {
          for (var E = L.traces, P = C(D), I = 0; I < E.length; I++) {
            for (var M = E[I], O = M[0].trace, T = O.type === "scatter", z = O.orientation === "v", F = [], U = !1, V = 0; V < M.length; V++) {
              var $ = M[V], q = T ? 0 : $.b, K = T ? z ? $.y : $.x : q + $.s;
              $[P] = K, F.push(K), $.hasB && F.push(q), $.hasB && $.b || (U = !0);
            }
            O._extremes[D._id] = p.findExtremes(D, F, { tozero: U, padded: !0 });
          }
        }
        function S(D) {
          for (var L = D.traces, E = 0; E < L.length; E++) for (var P = L[E], I = 0; I < P.length; I++) {
            var M = P[I];
            M.s !== i && D.put(M.p, M.b + M.s);
          }
        }
        function A(D, L, E) {
          var P = L.traces, I = C(D), M = E.norm === "fraction" ? 1 : 100, O = M / 1e9, T = D.l2c(D.c2l(0)), z = E.mode === "stack" ? M : T;
          function F(ue) {
            return l(D.c2l(ue)) && (ue < T - O || ue > z + O || !l(T));
          }
          for (var U = 0; U < P.length; U++) {
            for (var V = P[U], $ = V[0].trace, q = [], K = !1, re = !1, Y = 0; Y < V.length; Y++) {
              var te = V[Y];
              if (te.s !== i) {
                var ee = Math.abs(M / L.get(te.p, te.s));
                te.b *= ee, te.s *= ee;
                var X = te.b, Q = X + te.s;
                te[I] = Q, q.push(Q), re = re || F(Q), te.hasB && (q.push(X), re = re || F(X)), te.hasB && te.b || (K = !0);
              }
            }
            $._extremes[D._id] = p.findExtremes(D, q, { tozero: K, padded: re });
          }
        }
        function C(D) {
          return D._id.charAt(0);
        }
        o.exports = { crossTraceCalc: function(D, L) {
          for (var E = L.xaxis, P = L.yaxis, I = D._fullLayout, M = D._fullData, O = D.calcdata, T = [], z = [], F = 0; F < M.length; F++) {
            var U = M[F];
            if (U.visible === !0 && h.traceIs(U, "bar") && U.xaxis === E._id && U.yaxis === P._id && (U.orientation === "h" ? T.push(O[F]) : z.push(O[F]), U._computePh)) for (var V = D.calcdata[F], $ = 0; $ < V.length; $++) typeof V[$].ph0 == "function" && (V[$].ph0 = V[$].ph0()), typeof V[$].ph1 == "function" && (V[$].ph1 = V[$].ph1());
          }
          var q = { xCat: E.type === "category" || E.type === "multicategory", yCat: P.type === "category" || P.type === "multicategory", mode: I.barmode, norm: I.barnorm, gap: I.bargap, groupgap: I.bargroupgap };
          f(D, E, P, z, q), f(D, P, E, T, q);
        }, setGroupPositions: f };
      }, 17550: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(78766), h = n(33626), p = n(99867), _ = n(99669), d = n(59760), f = n(36301), c = n(81481), g = u.coerceFont;
        function m(w) {
          if (l(w)) {
            if ((w = +w) >= 0) return w;
          } else if (typeof w == "string" && (w = w.trim()).slice(-1) === "%" && l(w.slice(0, -1)) && (w = +w.slice(0, -1)) >= 0) return w + "%";
        }
        function x(w, k, S, A, C, D) {
          var L = (D = D || {}).moduleHasSelected !== !1, E = D.moduleHasUnselected !== !1, P = D.moduleHasConstrain !== !1, I = D.moduleHasCliponaxis !== !1, M = D.moduleHasTextangle !== !1, O = D.moduleHasInsideanchor !== !1, T = !!D.hasPathbar, z = Array.isArray(C) || C === "auto", F = z || C === "inside", U = z || C === "outside";
          if (F || U) {
            var V = g(A, "textfont", S.font), $ = u.extendFlat({}, V), q = !(w.textfont && w.textfont.color);
            if (q && delete $.color, g(A, "insidetextfont", $), T) {
              var K = u.extendFlat({}, V);
              q && delete K.color, g(A, "pathbar.textfont", K);
            }
            U && g(A, "outsidetextfont", V), L && A("selected.textfont.color"), E && A("unselected.textfont.color"), P && A("constraintext"), I && A("cliponaxis"), M && A("textangle"), A("texttemplate");
          }
          F && O && A("insidetextanchor");
        }
        o.exports = { supplyDefaults: function(w, k, S, A) {
          function C(P, I) {
            return u.coerce(w, k, c, P, I);
          }
          if (p(w, k, A, C)) {
            _(w, k, A, C), C("xhoverformat"), C("yhoverformat"), C("zorder"), C("orientation", k.x && !k.y ? "h" : "v"), C("base"), C("offset"), C("width"), C("text"), C("hovertext"), C("hovertemplate");
            var D = C("textposition");
            x(w, 0, A, C, D, { moduleHasSelected: !0, moduleHasUnselected: !0, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), d(w, k, C, S, A);
            var L = (k.marker.line || {}).color, E = h.getComponentMethod("errorbars", "supplyDefaults");
            E(w, k, L || i.defaultLine, { axis: "y" }), E(w, k, L || i.defaultLine, { axis: "x", inherit: "y" }), u.coerceSelectionMarkerOpacity(k, C);
          } else k.visible = !1;
        }, crossTraceDefaults: function(w, k) {
          var S, A;
          function C(E, P) {
            return u.coerce(A._input, A, c, E, P);
          }
          for (var D = 0; D < w.length; D++) if ((A = w[D]).type === "bar") {
            S = A._input;
            var L = C("marker.cornerradius", k.barcornerradius);
            A.marker && (A.marker.cornerradius = m(L)), k.barmode === "group" && f(S, A, k, C);
          }
        }, handleText: x, validateCornerradius: m };
      }, 59541: function(o) {
        o.exports = function(s, n, l) {
          return s.x = "xVal" in n ? n.xVal : n.x, s.y = "yVal" in n ? n.yVal : n.y, n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), l.orientation === "h" ? (s.label = s.y, s.value = s.x) : (s.label = s.x, s.value = s.y), s;
        };
      }, 42843: function(o, s, n) {
        var l = n(10721), u = n(65657), i = n(34809).isArrayOrTypedArray;
        s.coerceString = function(h, p, _) {
          if (typeof p == "string") {
            if (p || !h.noBlank) return p;
          } else if ((typeof p == "number" || p === !0) && !h.strict) return String(p);
          return _ !== void 0 ? _ : h.dflt;
        }, s.coerceNumber = function(h, p, _) {
          if (l(p)) {
            p = +p;
            var d = h.min, f = h.max;
            if (!(d !== void 0 && p < d || f !== void 0 && p > f)) return p;
          }
          return _ !== void 0 ? _ : h.dflt;
        }, s.coerceColor = function(h, p, _) {
          return u(p).isValid() ? p : _ !== void 0 ? _ : h.dflt;
        }, s.coerceEnumerated = function(h, p, _) {
          return h.coerceNumber && (p = +p), h.values.indexOf(p) !== -1 ? p : _ !== void 0 ? _ : h.dflt;
        }, s.getValue = function(h, p) {
          var _;
          return i(h) ? p < h.length && (_ = h[p]) : _ = h, _;
        }, s.getLineWidth = function(h, p) {
          return 0 < p.mlw ? p.mlw : i(h.marker.line.width) ? 0 : h.marker.line.width;
        };
      }, 91664: function(o, s, n) {
        var l = n(32141), u = n(33626), i = n(78766), h = n(34809).fillText, p = n(42843).getLineWidth, _ = n(29714).hoverLabelText, d = n(63821).BADNUM;
        function f(g, m, x, w, k) {
          var S, A, C, D, L, E, P, I = g.cd, M = I[0].trace, O = I[0].t, T = w === "closest", z = M.type === "waterfall", F = g.maxHoverDistance, U = g.maxSpikeDistance;
          M.orientation === "h" ? (S = x, A = m, C = "y", D = "x", L = ce, E = Q) : (S = m, A = x, C = "x", D = "y", E = ce, L = Q);
          var V = M[C + "period"], $ = T || V;
          function q(pe) {
            return re(pe, -1);
          }
          function K(pe) {
            return re(pe, 1);
          }
          function re(pe, be) {
            var Ae = pe.w;
            return pe[C] + be * Ae / 2;
          }
          function Y(pe) {
            return pe[C + "End"] - pe[C + "Start"];
          }
          var te = T ? q : V ? function(pe) {
            return pe.p - Y(pe) / 2;
          } : function(pe) {
            return Math.min(q(pe), pe.p - O.bardelta / 2);
          }, ee = T ? K : V ? function(pe) {
            return pe.p + Y(pe) / 2;
          } : function(pe) {
            return Math.max(K(pe), pe.p + O.bardelta / 2);
          };
          function X(pe, be, Ae) {
            return k.finiteRange && (Ae = 0), l.inbox(pe - S, be - S, Ae + Math.min(1, Math.abs(be - pe) / P) - 1);
          }
          function Q(pe) {
            return X(te(pe), ee(pe), F);
          }
          function ue(pe) {
            var be = pe[D];
            if (z) {
              var Ae = Math.abs(pe.rawS) || 0;
              A > 0 ? be += Ae : A < 0 && (be -= Ae);
            }
            return be;
          }
          function ce(pe) {
            var be = A, Ae = pe.b, Se = ue(pe);
            return l.inbox(Ae - be, Se - be, F + (Se - be) / (Se - Ae) - 1);
          }
          var he = g[C + "a"], de = g[D + "a"];
          P = Math.abs(he.r2c(he.range[1]) - he.r2c(he.range[0]));
          var ne = l.getDistanceFunction(w, L, E, function(pe) {
            return (L(pe) + E(pe)) / 2;
          });
          if (l.getClosest(I, ne, g), g.index !== !1 && I[g.index].p !== d) {
            $ || (te = function(pe) {
              return Math.min(q(pe), pe.p - O.bargroupwidth / 2);
            }, ee = function(pe) {
              return Math.max(K(pe), pe.p + O.bargroupwidth / 2);
            });
            var ae = I[g.index], se = M.base ? ae.b + ae.s : ae.s;
            g[D + "0"] = g[D + "1"] = de.c2p(ae[D], !0), g[D + "LabelVal"] = se;
            var me = O.extents[O.extents.round(ae.p)];
            g[C + "0"] = he.c2p(T ? te(ae) : me[0], !0), g[C + "1"] = he.c2p(T ? ee(ae) : me[1], !0);
            var ye = ae.orig_p !== void 0;
            return g[C + "LabelVal"] = ye ? ae.orig_p : ae.p, g.labelLabel = _(he, g[C + "LabelVal"], M[C + "hoverformat"]), g.valueLabel = _(de, g[D + "LabelVal"], M[D + "hoverformat"]), g.baseLabel = _(de, ae.b, M[D + "hoverformat"]), g.spikeDistance = (function(pe) {
              var be = A, Ae = pe.b, Se = ue(pe);
              return l.inbox(Ae - be, Se - be, U + (Se - be) / (Se - Ae) - 1);
            }(ae) + function(pe) {
              return X(q(pe), K(pe), U);
            }(ae)) / 2, g[C + "Spike"] = he.c2p(ae.p, !0), h(ae, M, g), g.hovertemplate = M.hovertemplate, g;
          }
        }
        function c(g, m) {
          var x = m.mcc || g.marker.color, w = m.mlcc || g.marker.line.color, k = p(g, m);
          return i.opacity(x) ? x : i.opacity(w) && k ? w : void 0;
        }
        o.exports = { hoverPoints: function(g, m, x, w, k) {
          var S = f(g, m, x, w, k);
          if (S) {
            var A = S.cd, C = A[0].trace, D = A[S.index];
            return S.color = c(C, D), u.getComponentMethod("errorbars", "hoverInfo")(D, C, S), [S];
          }
        }, hoverOnBars: f, getTraceColor: c };
      }, 58218: function(o, s, n) {
        o.exports = { attributes: n(81481), layoutAttributes: n(25412), supplyDefaults: n(17550).supplyDefaults, crossTraceDefaults: n(17550).crossTraceDefaults, supplyLayoutDefaults: n(78931), calc: n(67565), crossTraceCalc: n(24782).crossTraceCalc, colorbar: n(21146), arraysToCalcdata: n(35374), plot: n(32995).plot, style: n(6851).style, styleOnSelect: n(6851).styleOnSelect, hoverPoints: n(91664).hoverPoints, eventData: n(59541), selectPoints: n(88384), moduleType: "trace", name: "bar", basePlotModule: n(37703), categories: ["bar-like", "cartesian", "svg", "bar", "oriented", "errorBarsOK", "showLegend", "zoomScale"], animatable: !0, meta: {} };
      }, 25412: function(o) {
        o.exports = { barmode: { valType: "enumerated", values: ["stack", "group", "overlay", "relative"], dflt: "group", editType: "calc" }, barnorm: { valType: "enumerated", values: ["", "fraction", "percent"], dflt: "", editType: "calc" }, bargap: { valType: "number", min: 0, max: 1, editType: "calc" }, bargroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" }, barcornerradius: { valType: "any", editType: "calc" } };
      }, 78931: function(o, s, n) {
        var l = n(33626), u = n(29714), i = n(34809), h = n(25412), p = n(17550).validateCornerradius;
        o.exports = function(_, d, f) {
          function c(L, E) {
            return i.coerce(_, d, h, L, E);
          }
          for (var g = !1, m = !1, x = !1, w = {}, k = c("barmode"), S = 0; S < f.length; S++) {
            var A = f[S];
            if (l.traceIs(A, "bar") && A.visible) {
              if (g = !0, k === "group") {
                var C = A.xaxis + A.yaxis;
                w[C] && (x = !0), w[C] = !0;
              }
              A.visible && A.type === "histogram" && u.getFromId({ _fullLayout: d }, A[A.orientation === "v" ? "xaxis" : "yaxis"]).type !== "category" && (m = !0);
            }
          }
          if (g) {
            k !== "overlay" && c("barnorm"), c("bargap", m && !x ? 0 : 0.2), c("bargroupgap");
            var D = c("barcornerradius");
            d.barcornerradius = p(D);
          } else delete d.barmode;
        };
      }, 32995: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(34809), h = n(30635), p = n(78766), _ = n(62203), d = n(33626), f = n(29714).tickText, c = n(84102), g = c.recordMinTextSize, m = c.clearMinTextSize, x = n(6851), w = n(42843), k = n(56155), S = n(81481), A = S.text, C = S.textposition, D = n(36040).appendArrayPointValue, L = k.TEXTPAD;
        function E($) {
          return $.id;
        }
        function P($) {
          if ($.ids) return E;
        }
        function I($) {
          return ($ > 0) - ($ < 0);
        }
        function M($, q) {
          return $ < q ? 1 : -1;
        }
        function O($, q, K, re) {
          var Y;
          return !q.uniformtext.mode && T(K) ? (re && (Y = re()), $.transition().duration(K.duration).ease(K.easing).each("end", function() {
            Y && Y();
          }).each("interrupt", function() {
            Y && Y();
          })) : $;
        }
        function T($) {
          return $ && $.duration > 0;
        }
        function z($, q, K, re, Y) {
          return !($ < 0 || q < 0) && (K <= $ && re <= q || K <= q && re <= $ || (Y ? $ >= K * (q / re) : q >= re * ($ / K)));
        }
        function F($) {
          return $ === "auto" ? 0 : $;
        }
        function U($, q) {
          var K = Math.PI / 180 * q, re = Math.abs(Math.sin(K)), Y = Math.abs(Math.cos(K));
          return { x: $.width * Y + $.height * re, y: $.width * re + $.height * Y };
        }
        function V($, q, K, re, Y, te) {
          var ee = !!te.isHorizontal, X = !!te.constrained, Q = te.angle || 0, ue = te.anchor, ce = ue === "end", he = ue === "start", de = ((te.leftToRight || 0) + 1) / 2, ne = 1 - de, ae = te.hasB, se = te.r, me = te.overhead, ye = Y.width, pe = Y.height, be = Math.abs(q - $), Ae = Math.abs(re - K), Se = be > 2 * L && Ae > 2 * L ? L : 0;
          be -= 2 * Se, Ae -= 2 * Se;
          var Me = F(Q);
          Q !== "auto" || ye <= be && pe <= Ae || !(ye > be || pe > Ae) || (ye > Ae || pe > be) && ye < pe == be < Ae || (Me += 90);
          var De, Le, We = U(Y, Me);
          if (se && se - me > L) {
            var Ee = function(Ke, tt, _e, Be, $e, Ze, ct, ft, _t) {
              var Pt, Dt, $t, Gt, Wt = Math.max(0, Math.abs(tt - Ke) - 2 * L), mt = Math.max(0, Math.abs(Be - _e) - 2 * L), at = Ze - L, vt = ct ? at - Math.sqrt(at * at - (at - ct) * (at - ct)) : at, St = _t ? 2 * at : ft ? at - ct : 2 * vt, Je = _t ? 2 * at : ft ? 2 * vt : at - ct;
              return $e.y / $e.x >= mt / (Wt - St) ? Gt = mt / $e.y : $e.y / $e.x <= (mt - Je) / Wt ? Gt = Wt / $e.x : !_t && ft ? (Pt = $e.x * $e.x + $e.y * $e.y / 4, $t = (Wt - at) * (Wt - at) + (mt / 2 - at) * (mt / 2 - at) - at * at, Gt = (-(Dt = -2 * $e.x * (Wt - at) - $e.y * (mt / 2 - at)) + Math.sqrt(Dt * Dt - 4 * Pt * $t)) / (2 * Pt)) : _t ? (Pt = ($e.x * $e.x + $e.y * $e.y) / 4, $t = (Wt / 2 - at) * (Wt / 2 - at) + (mt / 2 - at) * (mt / 2 - at) - at * at, Gt = (-(Dt = -$e.x * (Wt / 2 - at) - $e.y * (mt / 2 - at)) + Math.sqrt(Dt * Dt - 4 * Pt * $t)) / (2 * Pt)) : (Pt = $e.x * $e.x / 4 + $e.y * $e.y, $t = (Wt / 2 - at) * (Wt / 2 - at) + (mt - at) * (mt - at) - at * at, Gt = (-(Dt = -$e.x * (Wt / 2 - at) - 2 * $e.y * (mt - at)) + Math.sqrt(Dt * Dt - 4 * Pt * $t)) / (2 * Pt)), { scale: Gt = Math.min(1, Gt), pad: ft ? Math.max(0, at - Math.sqrt(Math.max(0, at * at - (at - (mt - $e.y * Gt) / 2) * (at - (mt - $e.y * Gt) / 2))) - ct) : Math.max(0, at - Math.sqrt(Math.max(0, at * at - (at - (Wt - $e.x * Gt) / 2) * (at - (Wt - $e.x * Gt) / 2))) - ct) };
            }($, q, K, re, We, se, me, ee, ae);
            De = Ee.scale, Le = Ee.pad;
          } else De = 1, X && (De = Math.min(1, be / We.x, Ae / We.y)), Le = 0;
          var Ne = Y.left * ne + Y.right * de, Ie = (Y.top + Y.bottom) / 2, ge = ($ + L) * ne + (q - L) * de, Ce = (K + re) / 2, we = 0, Ge = 0;
          if (he || ce) {
            var Re = (ee ? We.x : We.y) / 2;
            se && (ce || ae) && (Se += Le);
            var je = ee ? M($, q) : M(K, re);
            ee ? he ? (ge = $ + je * Se, we = -je * Re) : (ge = q - je * Se, we = je * Re) : he ? (Ce = K + je * Se, Ge = -je * Re) : (Ce = re - je * Se, Ge = je * Re);
          }
          return { textX: Ne, textY: Ie, targetX: ge, targetY: Ce, anchorX: we, anchorY: Ge, scale: De, rotate: Me };
        }
        o.exports = { plot: function($, q, K, re, Y, te) {
          var ee = q.xaxis, X = q.yaxis, Q = $._fullLayout, ue = $._context.staticPlot;
          Y || (Y = { mode: Q.barmode, norm: Q.barmode, gap: Q.bargap, groupgap: Q.bargroupgap }, m("bar", Q));
          var ce = i.makeTraceGroups(re, K, "trace bars").each(function(he) {
            var de = l.select(this), ne = he[0].trace, ae = he[0].t, se = ne.type === "waterfall", me = ne.type === "funnel", ye = ne.type === "histogram", pe = ne.type === "bar", be = pe || me, Ae = 0;
            se && ne.connector.visible && ne.connector.mode === "between" && (Ae = ne.connector.line.width / 2);
            var Se = ne.orientation === "h", Me = T(Y), De = i.ensureSingle(de, "g", "points"), Le = P(ne), We = De.selectAll("g.point").data(i.identity, Le);
            We.enter().append("g").classed("point", !0), We.exit().remove(), We.each(function(Ne, Ie) {
              var ge, Ce, we = l.select(this), Ge = function(At, Rt, Ft, lt) {
                var st = [], Ot = [], kt = lt ? Rt : Ft, Bt = lt ? Ft : Rt;
                return st[0] = kt.c2p(At.s0, !0), Ot[0] = Bt.c2p(At.p0, !0), st[1] = kt.c2p(At.s1, !0), Ot[1] = Bt.c2p(At.p1, !0), lt ? [st, Ot] : [Ot, st];
              }(Ne, ee, X, Se), Re = Ge[0][0], je = Ge[0][1], Ke = Ge[1][0], tt = Ge[1][1], _e = (Se ? je - Re : tt - Ke) == 0;
              if (_e && be && w.getLineWidth(ne, Ne) && (_e = !1), _e || (_e = !(u(Re) && u(je) && u(Ke) && u(tt))), Ne.isBlank = _e, _e && (Se ? je = Re : tt = Ke), Ae && !_e && (Se ? (Re -= M(Re, je) * Ae, je += M(Re, je) * Ae) : (Ke -= M(Ke, tt) * Ae, tt += M(Ke, tt) * Ae)), ne.type === "waterfall") {
                if (!_e) {
                  var Be = ne[Ne.dir].marker;
                  ge = Be.line.width, Ce = Be.color;
                }
              } else ge = w.getLineWidth(ne, Ne), Ce = Ne.mc || ne.marker.color;
              function $e(At) {
                var Rt = l.round(ge / 2 % 1, 2);
                return Y.gap === 0 && Y.groupgap === 0 ? l.round(Math.round(At) - Rt, 2) : At;
              }
              var Ze = p.opacity(Ce) < 1 || ge > 0.01 ? $e : function(At, Rt, Ft) {
                return Ft && At === Rt ? At : Math.abs(At - Rt) >= 2 ? $e(At) : At > Rt ? Math.ceil(At) : Math.floor(At);
              };
              $._context.staticPlot || (Re = Ze(Re, je, Se), je = Ze(je, Re, Se), Ke = Ze(Ke, tt, !Se), tt = Ze(tt, Ke, !Se));
              var ct, ft = Se ? ee.c2p : X.c2p;
              ct = Ne.s0 > 0 ? Ne._sMax : Ne.s0 < 0 ? Ne._sMin : Ne.s1 > 0 ? Ne._sMax : Ne._sMin;
              var _t, Pt, Dt = pe || ye ? function(At, Rt) {
                if (!At) return 0;
                var Ft, lt = Math.abs(Se ? tt - Ke : je - Re), st = Math.abs(Se ? je - Re : tt - Ke), Ot = Ze(Math.abs(ft(ct, !0) - ft(0, !0))), kt = Ne.hasB ? Math.min(lt / 2, st / 2) : Math.min(lt / 2, Ot);
                return Ft = Rt === "%" ? lt * (Math.min(50, At) / 100) : At, Ze(Math.max(Math.min(Ft, kt), 0));
              }(ae.cornerradiusvalue, ae.cornerradiusform) : 0, $t = "M" + Re + "," + Ke + "V" + tt + "H" + je + "V" + Ke + "Z", Gt = 0;
              if (Dt && Ne.s) {
                var Wt = I(Ne.s0) === 0 || I(Ne.s) === I(Ne.s0) ? Ne.s1 : Ne.s0;
                if ((Gt = Ze(Ne.hasB ? 0 : Math.abs(ft(ct, !0) - ft(Wt, !0)))) < Dt) {
                  var mt = M(Re, je), at = M(Ke, tt), vt = mt === -at ? 1 : 0;
                  if (Se) if (Ne.hasB) _t = "M" + (Re + Dt * mt) + "," + Ke + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + Re + "," + (Ke + Dt * at) + "V" + (tt - Dt * at) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (Re + Dt * mt) + "," + tt + "H" + (je - Dt * mt) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + je + "," + (tt - Dt * at) + "V" + (Ke + Dt * at) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (je - Dt * mt) + "," + Ke + "Z";
                  else {
                    var St = (Pt = Math.abs(je - Re) + Gt) < Dt ? Dt - Math.sqrt(Pt * (2 * Dt - Pt)) : 0, Je = Gt > 0 ? Math.sqrt(Gt * (2 * Dt - Gt)) : 0, nt = mt > 0 ? Math.max : Math.min;
                    _t = "M" + Re + "," + Ke + "V" + (tt - St * at) + "H" + nt(je - (Dt - Gt) * mt, Re) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + je + "," + (tt - Dt * at - Je) + "V" + (Ke + Dt * at + Je) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + nt(je - (Dt - Gt) * mt, Re) + "," + (Ke + St * at) + "Z";
                  }
                  else if (Ne.hasB) _t = "M" + (Re + Dt * mt) + "," + Ke + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + Re + "," + (Ke + Dt * at) + "V" + (tt - Dt * at) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (Re + Dt * mt) + "," + tt + "H" + (je - Dt * mt) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + je + "," + (tt - Dt * at) + "V" + (Ke + Dt * at) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (je - Dt * mt) + "," + Ke + "Z";
                  else {
                    var ot = (Pt = Math.abs(tt - Ke) + Gt) < Dt ? Dt - Math.sqrt(Pt * (2 * Dt - Pt)) : 0, Ye = Gt > 0 ? Math.sqrt(Gt * (2 * Dt - Gt)) : 0, Fe = at > 0 ? Math.max : Math.min;
                    _t = "M" + (Re + ot * mt) + "," + Ke + "V" + Fe(tt - (Dt - Gt) * at, Ke) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (Re + Dt * mt - Ye) + "," + tt + "H" + (je - Dt * mt + Ye) + "A " + Dt + "," + Dt + " 0 0 " + vt + " " + (je - ot * mt) + "," + Fe(tt - (Dt - Gt) * at, Ke) + "V" + Ke + "Z";
                  }
                } else _t = $t;
              } else _t = $t;
              var pt = O(i.ensureSingle(we, "path"), Q, Y, te);
              if (pt.style("vector-effect", ue ? "none" : "non-scaling-stroke").attr("d", isNaN((je - Re) * (tt - Ke)) || _e && $._context.staticPlot ? "M0,0Z" : _t).call(_.setClipUrl, q.layerClipId, $), !Q.uniformtext.mode && Me) {
                var Mt = _.makePointStyleFns(ne);
                _.singlePointStyle(Ne, pt, ne, Mt, $);
              }
              (function(At, Rt, Ft, lt, st, Ot, kt, Bt, xt, Jt, qt, en, Yt) {
                var Ht, sn = Rt.xaxis, fn = Rt.yaxis, In = At._fullLayout;
                function zn(Xr, un, Gn) {
                  return i.ensureSingle(Xr, "text").text(un).attr({ class: "bartext bartext-" + Ht, "text-anchor": "middle", "data-notex": 1 }).call(_.font, Gn).call(h.convertToTspans, At);
                }
                var Cn = lt[0].trace, gn = Cn.orientation === "h", Mn = function(Xr, un, Gn, on, ln) {
                  var bn, Nn = un[0].trace;
                  return bn = Nn.texttemplate ? function(jn, Jn, Hn, Ln, pn) {
                    var dn = Jn[0].trace, Dn = i.castOption(dn, Hn, "texttemplate");
                    if (!Dn) return "";
                    var nr, pr, ir, gr, Pr = dn.type === "histogram", Cr = dn.type === "waterfall", Er = dn.type === "funnel", Sr = dn.orientation === "h";
                    function Dr(si) {
                      return f(gr, gr.c2l(si), !0).text;
                    }
                    Sr ? (nr = "y", pr = pn, ir = "x", gr = Ln) : (nr = "x", pr = Ln, ir = "y", gr = pn);
                    var Qn, ri = Jn[Hn], Zr = {};
                    Zr.label = ri.p, Zr.labelLabel = Zr[nr + "Label"] = (Qn = ri.p, f(pr, pr.c2l(Qn), !0).text);
                    var Br = i.castOption(dn, ri.i, "text");
                    (Br === 0 || Br) && (Zr.text = Br), Zr.value = ri.s, Zr.valueLabel = Zr[ir + "Label"] = Dr(ri.s);
                    var Yr = {};
                    D(Yr, dn, ri.i), (Pr || Yr.x === void 0) && (Yr.x = Sr ? Zr.value : Zr.label), (Pr || Yr.y === void 0) && (Yr.y = Sr ? Zr.label : Zr.value), (Pr || Yr.xLabel === void 0) && (Yr.xLabel = Sr ? Zr.valueLabel : Zr.labelLabel), (Pr || Yr.yLabel === void 0) && (Yr.yLabel = Sr ? Zr.labelLabel : Zr.valueLabel), Cr && (Zr.delta = +ri.rawS || ri.s, Zr.deltaLabel = Dr(Zr.delta), Zr.final = ri.v, Zr.finalLabel = Dr(Zr.final), Zr.initial = Zr.final - Zr.delta, Zr.initialLabel = Dr(Zr.initial)), Er && (Zr.value = ri.s, Zr.valueLabel = Dr(Zr.value), Zr.percentInitial = ri.begR, Zr.percentInitialLabel = i.formatPercent(ri.begR), Zr.percentPrevious = ri.difR, Zr.percentPreviousLabel = i.formatPercent(ri.difR), Zr.percentTotal = ri.sumR, Zr.percenTotalLabel = i.formatPercent(ri.sumR));
                    var yi = i.castOption(dn, ri.i, "customdata");
                    return yi && (Zr.customdata = yi), i.texttemplateString(Dn, Zr, jn._d3locale, Yr, Zr, dn._meta || {});
                  }(Xr, un, Gn, on, ln) : Nn.textinfo ? function(jn, Jn, Hn, Ln) {
                    var pn = jn[0].trace, dn = pn.orientation === "h", Dn = pn.type === "waterfall", nr = pn.type === "funnel";
                    function pr(yi) {
                      return f(dn ? Hn : Ln, +yi, !0).text;
                    }
                    var ir, gr, Pr = pn.textinfo, Cr = jn[Jn], Er = Pr.split("+"), Sr = [], Dr = function(yi) {
                      return Er.indexOf(yi) !== -1;
                    };
                    if (Dr("label") && Sr.push((gr = jn[Jn].p, f(dn ? Ln : Hn, gr, !0).text)), Dr("text") && ((ir = i.castOption(pn, Cr.i, "text")) === 0 || ir) && Sr.push(ir), Dn) {
                      var Qn = +Cr.rawS || Cr.s, ri = Cr.v, Zr = ri - Qn;
                      Dr("initial") && Sr.push(pr(Zr)), Dr("delta") && Sr.push(pr(Qn)), Dr("final") && Sr.push(pr(ri));
                    }
                    if (nr) {
                      Dr("value") && Sr.push(pr(Cr.s));
                      var Br = 0;
                      Dr("percent initial") && Br++, Dr("percent previous") && Br++, Dr("percent total") && Br++;
                      var Yr = Br > 1;
                      Dr("percent initial") && (ir = i.formatPercent(Cr.begR), Yr && (ir += " of initial"), Sr.push(ir)), Dr("percent previous") && (ir = i.formatPercent(Cr.difR), Yr && (ir += " of previous"), Sr.push(ir)), Dr("percent total") && (ir = i.formatPercent(Cr.sumR), Yr && (ir += " of total"), Sr.push(ir));
                    }
                    return Sr.join("<br>");
                  }(un, Gn, on, ln) : w.getValue(Nn.text, Gn), w.coerceString(A, bn);
                }(In, lt, st, sn, fn);
                Ht = function(Xr, un) {
                  var Gn = w.getValue(Xr.textposition, un);
                  return w.coerceEnumerated(C, Gn);
                }(Cn, st);
                var Xn = en.mode === "stack" || en.mode === "relative", Pn = lt[st], wn = !Xn || Pn._outmost, Rn = Pn.hasB, _n = Jt && Jt - qt > L;
                if (Mn && Ht !== "none" && (!Pn.isBlank && Ot !== kt && Bt !== xt || Ht !== "auto" && Ht !== "inside")) {
                  var En = In.font, Kn = x.getBarColor(lt[st], Cn), Wn = x.getInsideTextFont(Cn, st, En, Kn), hr = x.getOutsideTextFont(Cn, st, En), Zn = Cn.insidetextanchor || "end", lr = Ft.datum();
                  gn ? sn.type === "log" && lr.s0 <= 0 && (Ot = sn.range[0] < sn.range[1] ? 0 : sn._length) : fn.type === "log" && lr.s0 <= 0 && (Bt = fn.range[0] < fn.range[1] ? fn._length : 0);
                  var cr, zr, Wr, mr, Ir, yr = Math.abs(kt - Ot), Vr = Math.abs(xt - Bt), rn = yr - 2 * L, Tn = Vr - 2 * L;
                  if (Ht === "outside" && (wn || Pn.hasB || (Ht = "inside")), Ht === "auto") if (wn) {
                    Ht = "inside", cr = zn(Ft, Mn, Ir = i.ensureUniformFontSize(At, Wn)), Wr = (zr = _.bBox(cr.node())).width, mr = zr.height;
                    var sr, $n = Wr > 0 && mr > 0;
                    sr = _n ? Rn ? z(rn - 2 * Jt, Tn, Wr, mr, gn) || z(rn, Tn - 2 * Jt, Wr, mr, gn) : gn ? z(rn - (Jt - qt), Tn, Wr, mr, gn) || z(rn, Tn - 2 * (Jt - qt), Wr, mr, gn) : z(rn, Tn - (Jt - qt), Wr, mr, gn) || z(rn - 2 * (Jt - qt), Tn, Wr, mr, gn) : z(rn, Tn, Wr, mr, gn), $n && sr ? Ht = "inside" : (Ht = "outside", cr.remove(), cr = null);
                  } else Ht = "inside";
                  if (!cr) {
                    var ur = (cr = zn(Ft, Mn, Ir = i.ensureUniformFontSize(At, Ht === "outside" ? hr : Wn))).attr("transform");
                    if (cr.attr("transform", ""), Wr = (zr = _.bBox(cr.node())).width, mr = zr.height, cr.attr("transform", ur), Wr <= 0 || mr <= 0) return void cr.remove();
                  }
                  var Tr, wr = Cn.textangle;
                  Tr = Ht === "outside" ? function(Xr, un, Gn, on, ln, bn) {
                    var Nn, jn = !!bn.isHorizontal, Jn = !!bn.constrained, Hn = bn.angle || 0, Ln = ln.width, pn = ln.height, dn = Math.abs(un - Xr), Dn = Math.abs(on - Gn);
                    Nn = jn ? Dn > 2 * L ? L : 0 : dn > 2 * L ? L : 0;
                    var nr = 1;
                    Jn && (nr = jn ? Math.min(1, Dn / pn) : Math.min(1, dn / Ln));
                    var pr = F(Hn), ir = U(ln, pr), gr = (jn ? ir.x : ir.y) / 2, Pr = (ln.left + ln.right) / 2, Cr = (ln.top + ln.bottom) / 2, Er = (Xr + un) / 2, Sr = (Gn + on) / 2, Dr = 0, Qn = 0, ri = jn ? M(un, Xr) : M(Gn, on);
                    return jn ? (Er = un - ri * Nn, Dr = ri * gr) : (Sr = on + ri * Nn, Qn = -ri * gr), { textX: Pr, textY: Cr, targetX: Er, targetY: Sr, anchorX: Dr, anchorY: Qn, scale: nr, rotate: pr };
                  }(Ot, kt, Bt, xt, zr, { isHorizontal: gn, constrained: Cn.constraintext === "both" || Cn.constraintext === "outside", angle: wr }) : V(Ot, kt, Bt, xt, zr, { isHorizontal: gn, constrained: Cn.constraintext === "both" || Cn.constraintext === "inside", angle: wr, anchor: Zn, hasB: Rn, r: Jt, overhead: qt }), Tr.fontSize = Ir.size, g(Cn.type === "histogram" ? "bar" : Cn.type, Tr, In), Pn.transform = Tr;
                  var Fr = O(cr, In, en, Yt);
                  i.setTransormAndDisplay(Fr, Tr);
                } else Ft.select("text").remove();
              })($, q, we, he, Ie, Re, je, Ke, tt, Dt, Gt, Y, te), q.layerClipId && _.hideOutsideRangePoint(Ne, we.select("text"), ee, X, ne.xcalendar, ne.ycalendar);
            });
            var Ee = ne.cliponaxis === !1;
            _.setClipUrl(de, Ee ? null : q.layerClipId, $);
          });
          d.getComponentMethod("errorbars", "plot")($, ce, q, Y);
        }, toMoveInsideBar: V };
      }, 88384: function(o) {
        function s(n, l, u, i, h) {
          var p = l.c2p(i ? n.s0 : n.p0, !0), _ = l.c2p(i ? n.s1 : n.p1, !0), d = u.c2p(i ? n.p0 : n.s0, !0), f = u.c2p(i ? n.p1 : n.s1, !0);
          return h ? [(p + _) / 2, (d + f) / 2] : i ? [_, (d + f) / 2] : [(p + _) / 2, f];
        }
        o.exports = function(n, l) {
          var u, i = n.cd, h = n.xaxis, p = n.yaxis, _ = i[0].trace, d = _.type === "funnel", f = _.orientation === "h", c = [];
          if (l === !1) for (u = 0; u < i.length; u++) i[u].selected = 0;
          else for (u = 0; u < i.length; u++) {
            var g = i[u], m = "ct" in g ? g.ct : s(g, h, p, f, d);
            l.contains(m, !1, u, n) ? (c.push({ pointNumber: u, x: h.c2d(g.x), y: p.c2d(g.y) }), g.selected = 1) : g.selected = 0;
          }
          return c;
        };
      }, 2880: function(o, s, n) {
        o.exports = u;
        var l = n(34809).distinctVals;
        function u(i, h) {
          this.traces = i, this.sepNegVal = h.sepNegVal, this.overlapNoMerge = h.overlapNoMerge;
          for (var p = 1 / 0, _ = h.posAxis._id.charAt(0), d = [], f = 0; f < i.length; f++) {
            for (var c = i[f], g = 0; g < c.length; g++) {
              var m = c[g], x = m.p;
              x === void 0 && (x = m[_]), x !== void 0 && d.push(x);
            }
            c[0] && c[0].width1 && (p = Math.min(c[0].width1, p));
          }
          this.positions = d;
          var w = l(d);
          this.distinctPositions = w.vals, w.vals.length === 1 && p !== 1 / 0 ? this.minDiff = p : this.minDiff = Math.min(w.minDiff, p);
          var k = (h.posAxis || {}).type;
          k !== "category" && k !== "multicategory" || (this.minDiff = 1), this.binWidth = this.minDiff, this.bins = {};
        }
        u.prototype.put = function(i, h) {
          var p = this.getLabel(i, h), _ = this.bins[p] || 0;
          return this.bins[p] = _ + h, _;
        }, u.prototype.get = function(i, h) {
          var p = this.getLabel(i, h);
          return this.bins[p] || 0;
        }, u.prototype.getLabel = function(i, h) {
          return (h < 0 && this.sepNegVal ? "v" : "^") + (this.overlapNoMerge ? i : Math.round(i / this.binWidth));
        };
      }, 6851: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(62203), h = n(34809), p = n(33626), _ = n(84102).resizeText, d = n(81481), f = d.textfont, c = d.insidetextfont, g = d.outsidetextfont, m = n(42843);
        function x(E, P, I) {
          i.pointStyle(E.selectAll("path"), P, I), w(E, P, I);
        }
        function w(E, P, I) {
          E.selectAll("text").each(function(M) {
            var O = l.select(this), T = h.ensureUniformFontSize(I, k(O, M, P, I));
            i.font(O, T);
          });
        }
        function k(E, P, I, M) {
          var O = M._fullLayout.font, T = I.textfont;
          if (E.classed("bartext-inside")) {
            var z = L(P, I);
            T = A(I, P.i, O, z);
          } else E.classed("bartext-outside") && (T = C(I, P.i, O));
          return T;
        }
        function S(E, P, I) {
          return D(f, E.textfont, P, I);
        }
        function A(E, P, I, M) {
          var O = S(E, P, I);
          return (E._input.textfont === void 0 || E._input.textfont.color === void 0 || Array.isArray(E.textfont.color) && E.textfont.color[P] === void 0) && (O = { color: u.contrast(M), family: O.family, size: O.size, weight: O.weight, style: O.style, variant: O.variant, textcase: O.textcase, lineposition: O.lineposition, shadow: O.shadow }), D(c, E.insidetextfont, P, O);
        }
        function C(E, P, I) {
          var M = S(E, P, I);
          return D(g, E.outsidetextfont, P, M);
        }
        function D(E, P, I, M) {
          P = P || {};
          var O = m.getValue(P.family, I), T = m.getValue(P.size, I), z = m.getValue(P.color, I), F = m.getValue(P.weight, I), U = m.getValue(P.style, I), V = m.getValue(P.variant, I), $ = m.getValue(P.textcase, I), q = m.getValue(P.lineposition, I), K = m.getValue(P.shadow, I);
          return { family: m.coerceString(E.family, O, M.family), size: m.coerceNumber(E.size, T, M.size), color: m.coerceColor(E.color, z, M.color), weight: m.coerceString(E.weight, F, M.weight), style: m.coerceString(E.style, U, M.style), variant: m.coerceString(E.variant, V, M.variant), textcase: m.coerceString(E.variant, $, M.textcase), lineposition: m.coerceString(E.variant, q, M.lineposition), shadow: m.coerceString(E.variant, K, M.shadow) };
        }
        function L(E, P) {
          return P.type === "waterfall" ? P[E.dir].marker.color : E.mcc || E.mc || P.marker.color;
        }
        o.exports = { style: function(E) {
          var P = l.select(E).selectAll('g[class^="barlayer"]').selectAll("g.trace");
          _(E, P, "bar");
          var I = P.size(), M = E._fullLayout;
          P.style("opacity", function(O) {
            return O[0].trace.opacity;
          }).each(function(O) {
            (M.barmode === "stack" && I > 1 || M.bargap === 0 && M.bargroupgap === 0 && !O[0].trace.marker.line.width) && l.select(this).attr("shape-rendering", "crispEdges");
          }), P.selectAll("g.points").each(function(O) {
            x(l.select(this), O[0].trace, E);
          }), p.getComponentMethod("errorbars", "style")(P);
        }, styleTextPoints: w, styleOnSelect: function(E, P, I) {
          var M = P[0].trace;
          M.selectedpoints ? function(O, T, z) {
            i.selectedPointStyle(O.selectAll("path"), T), function(F, U, V) {
              F.each(function($) {
                var q, K = l.select(this);
                if ($.selected) {
                  q = h.ensureUniformFontSize(V, k(K, $, U, V));
                  var re = U.selected.textfont && U.selected.textfont.color;
                  re && (q.color = re), i.font(K, q);
                } else i.selectedTextStyle(K, U);
              });
            }(O.selectAll("text"), T, z);
          }(I, M, E) : (x(I, M, E), p.getComponentMethod("errorbars", "style")(I));
        }, getInsideTextFont: A, getOutsideTextFont: C, getBarColor: L, resizeText: _ };
      }, 59760: function(o, s, n) {
        var l = n(78766), u = n(65477).hasColorscale, i = n(39356), h = n(34809).coercePattern;
        o.exports = function(p, _, d, f, c) {
          var g = d("marker.color", f), m = u(p, "marker");
          m && i(p, _, c, d, { prefix: "marker.", cLetter: "c" }), d("marker.line.color", l.defaultLine), u(p, "marker.line") && i(p, _, c, d, { prefix: "marker.line.", cLetter: "c" }), d("marker.line.width"), d("marker.opacity"), h(d, "marker.pattern", g, m), d("selected.marker.color"), d("unselected.marker.color");
        };
      }, 84102: function(o, s, n) {
        var l = n(45568), u = n(34809);
        function i(h) {
          return "_" + h + "Text_minsize";
        }
        o.exports = { recordMinTextSize: function(h, p, _) {
          if (_.uniformtext.mode) {
            var d = i(h), f = _.uniformtext.minsize, c = p.scale * p.fontSize;
            p.hide = c < f, _[d] = _[d] || 1 / 0, p.hide || (_[d] = Math.min(_[d], Math.max(c, f)));
          }
        }, clearMinTextSize: function(h, p) {
          p[i(h)] = void 0;
        }, resizeText: function(h, p, _) {
          var d = h._fullLayout, f = d["_" + _ + "Text_minsize"];
          if (f) {
            var c, g = d.uniformtext.mode === "hide";
            switch (_) {
              case "funnelarea":
              case "pie":
              case "sunburst":
                c = "g.slice";
                break;
              case "treemap":
              case "icicle":
                c = "g.slice, g.pathbar";
                break;
              default:
                c = "g.points > g.point";
            }
            p.selectAll(c).each(function(m) {
              var x = m.transform;
              if (x) {
                x.scale = g && x.hide ? 0 : f / x.fontSize;
                var w = l.select(this).select("text");
                u.setTransormAndDisplay(w, x);
              }
            });
          }
        } };
      }, 32225: function(o, s, n) {
        var l, u = n(3208).rb, i = n(93049).extendFlat, h = n(8738), p = n(81481);
        o.exports = { r: h.r, theta: h.theta, r0: h.r0, dr: h.dr, theta0: h.theta0, dtheta: h.dtheta, thetaunit: h.thetaunit, base: i({}, p.base, {}), offset: i({}, p.offset, {}), width: i({}, p.width, {}), text: i({}, p.text, {}), hovertext: i({}, p.hovertext, {}), marker: (l = i({}, p.marker), delete l.cornerradius, l), hoverinfo: h.hoverinfo, hovertemplate: u(), selected: p.selected, unselected: p.unselected };
      }, 27941: function(o, s, n) {
        var l = n(65477).hasColorscale, u = n(28379), i = n(34809).isArrayOrTypedArray, h = n(35374), p = n(24782).setGroupPositions, _ = n(48861), d = n(33626).traceIs, f = n(34809).extendFlat;
        o.exports = { calc: function(c, g) {
          for (var m = c._fullLayout, x = g.subplot, w = m[x].radialaxis, k = m[x].angularaxis, S = w.makeCalcdata(g, "r"), A = k.makeCalcdata(g, "theta"), C = g._length, D = new Array(C), L = S, E = A, P = 0; P < C; P++) D[P] = { p: E[P], s: L[P] };
          function I(M) {
            var O = g[M];
            O !== void 0 && (g["_" + M] = i(O) ? k.makeCalcdata(g, M) : k.d2c(O, g.thetaunit));
          }
          return k.type === "linear" && (I("width"), I("offset")), l(g, "marker") && u(c, g, { vals: g.marker.color, containerStr: "marker", cLetter: "c" }), l(g, "marker.line") && u(c, g, { vals: g.marker.line.color, containerStr: "marker.line", cLetter: "c" }), h(D, g), _(D, g), D;
        }, crossTraceCalc: function(c, g, m) {
          for (var x = c.calcdata, w = [], k = 0; k < x.length; k++) {
            var S = x[k], A = S[0].trace;
            A.visible === !0 && d(A, "bar") && A.subplot === m && w.push(S);
          }
          var C = f({}, g.radialaxis, { _id: "x" }), D = g.angularaxis;
          p(c, D, C, w, { mode: g.barmode, norm: g.barnorm, gap: g.bargap, groupgap: g.bargroupgap });
        } };
      }, 77318: function(o, s, n) {
        var l = n(34809), u = n(73749).handleRThetaDefaults, i = n(59760), h = n(32225);
        o.exports = function(p, _, d, f) {
          function c(g, m) {
            return l.coerce(p, _, h, g, m);
          }
          u(p, _, f, c) ? (c("thetaunit"), c("base"), c("offset"), c("width"), c("text"), c("hovertext"), c("hovertemplate"), i(p, _, c, d, f), l.coerceSelectionMarkerOpacity(_, c)) : _.visible = !1;
        };
      }, 83080: function(o, s, n) {
        var l = n(32141), u = n(34809), i = n(91664).getTraceColor, h = u.fillText, p = n(29709).makeHoverPointText, _ = n(95928).isPtInsidePolygon;
        o.exports = function(d, f, c) {
          var g = d.cd, m = g[0].trace, x = d.subplot, w = x.radialAxis, k = x.angularAxis, S = x.vangles, A = S ? _ : u.isPtInsideSector, C = d.maxHoverDistance, D = k._period || 2 * Math.PI, L = Math.abs(w.g2p(Math.sqrt(f * f + c * c))), E = Math.atan2(c, f);
          if (w.range[0] > w.range[1] && (E += Math.PI), l.getClosest(g, function(M) {
            return A(L, E, [M.rp0, M.rp1], [M.thetag0, M.thetag1], S) ? C + Math.min(1, Math.abs(M.thetag1 - M.thetag0) / D) - 1 + (M.rp1 - L) / (M.rp1 - M.rp0) - 1 : 1 / 0;
          }, d), d.index !== !1) {
            var P = g[d.index];
            d.x0 = d.x1 = P.ct[0], d.y0 = d.y1 = P.ct[1];
            var I = u.extendFlat({}, P, { r: P.s, theta: P.p });
            return h(P, m, d), p(I, m, x, d), d.hovertemplate = m.hovertemplate, d.color = i(m, P), d.xLabelVal = d.yLabelVal = void 0, P.s < 0 && (d.idealAlign = "left"), [d];
          }
        };
      }, 89362: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "barpolar", basePlotModule: n(31645), categories: ["polar", "bar", "showLegend"], attributes: n(32225), layoutAttributes: n(42956), supplyDefaults: n(77318), supplyLayoutDefaults: n(60507), calc: n(27941).calc, crossTraceCalc: n(27941).crossTraceCalc, plot: n(11627), colorbar: n(21146), formatLabels: n(33368), style: n(6851).style, styleOnSelect: n(6851).styleOnSelect, hoverPoints: n(83080), selectPoints: n(88384), meta: {} };
      }, 42956: function(o) {
        o.exports = { barmode: { valType: "enumerated", values: ["stack", "overlay"], dflt: "stack", editType: "calc" }, bargap: { valType: "number", dflt: 0.1, min: 0, max: 1, editType: "calc" } };
      }, 60507: function(o, s, n) {
        var l = n(34809), u = n(42956);
        o.exports = function(i, h, p) {
          var _, d = {};
          function f(m, x) {
            return l.coerce(i[_] || {}, h[_], u, m, x);
          }
          for (var c = 0; c < p.length; c++) {
            var g = p[c];
            g.type === "barpolar" && g.visible === !0 && (d[_ = g.subplot] || (f("barmode"), f("bargap"), d[_] = 1));
          }
        };
      }, 11627: function(o, s, n) {
        var l = n(45568), u = n(10721), i = n(34809), h = n(62203), p = n(95928);
        o.exports = function(_, d, f) {
          var c = _._context.staticPlot, g = d.xaxis, m = d.yaxis, x = d.radialAxis, w = d.angularAxis, k = function(A) {
            var C = A.cxx, D = A.cyy;
            return A.vangles ? function(L, E, P, I) {
              var M, O;
              i.angleDelta(P, I) > 0 ? (M = P, O = I) : (M = I, O = P);
              var T = [p.findEnclosingVertexAngles(M, A.vangles)[0], (M + O) / 2, p.findEnclosingVertexAngles(O, A.vangles)[1]];
              return p.pathPolygonAnnulus(L, E, M, O, T, C, D);
            } : function(L, E, P, I) {
              return i.pathAnnulus(L, E, P, I, C, D);
            };
          }(d), S = d.layers.frontplot.select("g.barlayer");
          i.makeTraceGroups(S, f, "trace bars").each(function() {
            var A = l.select(this), C = i.ensureSingle(A, "g", "points").selectAll("g.point").data(i.identity);
            C.enter().append("g").style("vector-effect", c ? "none" : "non-scaling-stroke").style("stroke-miterlimit", 2).classed("point", !0), C.exit().remove(), C.each(function(D) {
              var L, E = l.select(this), P = D.rp0 = x.c2p(D.s0), I = D.rp1 = x.c2p(D.s1), M = D.thetag0 = w.c2g(D.p0), O = D.thetag1 = w.c2g(D.p1);
              if (u(P) && u(I) && u(M) && u(O) && P !== I && M !== O) {
                var T = x.c2g(D.s1), z = (M + O) / 2;
                D.ct = [g.c2p(T * Math.cos(z)), m.c2p(T * Math.sin(z))], L = k(P, I, M, O);
              } else L = "M0,0Z";
              i.ensureSingle(E, "path").attr("d", L);
            }), h.setClipUrl(A, d._hasClipOnAxisFalse ? d.clipIds.forTraces : null, _);
          });
        };
      }, 64625: function(o, s, n) {
        var l = n(19326), u = n(36640), i = n(81481), h = n(10229), p = n(80712).axisHoverFormat, _ = n(3208).rb, d = n(93049).extendFlat, f = u.marker, c = f.line;
        o.exports = { y: { valType: "data_array", editType: "calc+clearAxisTypes" }, x: { valType: "data_array", editType: "calc+clearAxisTypes" }, x0: { valType: "any", editType: "calc+clearAxisTypes" }, y0: { valType: "any", editType: "calc+clearAxisTypes" }, dx: { valType: "number", editType: "calc" }, dy: { valType: "number", editType: "calc" }, xperiod: u.xperiod, yperiod: u.yperiod, xperiod0: u.xperiod0, yperiod0: u.yperiod0, xperiodalignment: u.xperiodalignment, yperiodalignment: u.yperiodalignment, xhoverformat: p("x"), yhoverformat: p("y"), name: { valType: "string", editType: "calc+clearAxisTypes" }, q1: { valType: "data_array", editType: "calc+clearAxisTypes" }, median: { valType: "data_array", editType: "calc+clearAxisTypes" }, q3: { valType: "data_array", editType: "calc+clearAxisTypes" }, lowerfence: { valType: "data_array", editType: "calc" }, upperfence: { valType: "data_array", editType: "calc" }, notched: { valType: "boolean", editType: "calc" }, notchwidth: { valType: "number", min: 0, max: 0.5, dflt: 0.25, editType: "calc" }, notchspan: { valType: "data_array", editType: "calc" }, boxpoints: { valType: "enumerated", values: ["all", "outliers", "suspectedoutliers", !1], editType: "calc" }, jitter: { valType: "number", min: 0, max: 1, editType: "calc" }, pointpos: { valType: "number", min: -2, max: 2, editType: "calc" }, sdmultiple: { valType: "number", min: 0, editType: "calc", dflt: 1 }, sizemode: { valType: "enumerated", values: ["quartiles", "sd"], editType: "calc", dflt: "quartiles" }, boxmean: { valType: "enumerated", values: [!0, "sd", !1], editType: "calc" }, mean: { valType: "data_array", editType: "calc" }, sd: { valType: "data_array", editType: "calc" }, orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc+clearAxisTypes" }, quartilemethod: { valType: "enumerated", values: ["linear", "exclusive", "inclusive"], dflt: "linear", editType: "calc" }, width: { valType: "number", min: 0, dflt: 0, editType: "calc" }, marker: { outliercolor: { valType: "color", dflt: "rgba(0, 0, 0, 0)", editType: "style" }, symbol: d({}, f.symbol, { arrayOk: !1, editType: "plot" }), opacity: d({}, f.opacity, { arrayOk: !1, dflt: 1, editType: "style" }), angle: d({}, f.angle, { arrayOk: !1, editType: "calc" }), size: d({}, f.size, { arrayOk: !1, editType: "calc" }), color: d({}, f.color, { arrayOk: !1, editType: "style" }), line: { color: d({}, c.color, { arrayOk: !1, dflt: h.defaultLine, editType: "style" }), width: d({}, c.width, { arrayOk: !1, dflt: 0, editType: "style" }), outliercolor: { valType: "color", editType: "style" }, outlierwidth: { valType: "number", min: 0, dflt: 1, editType: "style" }, editType: "style" }, editType: "plot" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, dflt: 2, editType: "style" }, editType: "plot" }, fillcolor: l(), whiskerwidth: { valType: "number", min: 0, max: 1, dflt: 0.5, editType: "calc" }, showwhiskers: { valType: "boolean", editType: "calc" }, offsetgroup: i.offsetgroup, alignmentgroup: i.alignmentgroup, selected: { marker: u.selected.marker, editType: "style" }, unselected: { marker: u.unselected.marker, editType: "style" }, text: d({}, u.text, {}), hovertext: d({}, u.hovertext, {}), hovertemplate: _({}), hoveron: { valType: "flaglist", flags: ["boxes", "points"], dflt: "boxes+points", editType: "style" }, zorder: u.zorder };
      }, 89429: function(o, s, n) {
        var l = n(10721), u = n(29714), i = n(40528), h = n(34809), p = n(63821).BADNUM, _ = h._;
        o.exports = function(A, C) {
          var D, L, E, P, I, M, O, T = A._fullLayout, z = u.getFromId(A, C.xaxis || "x"), F = u.getFromId(A, C.yaxis || "y"), U = [], V = C.type === "violin" ? "_numViolins" : "_numBoxes";
          C.orientation === "h" ? (E = z, P = "x", I = F, M = "y", O = !!C.yperiodalignment) : (E = F, P = "y", I = z, M = "x", O = !!C.xperiodalignment);
          var $, q, K, re, Y, te, ee = function($e, Ze, ct, ft) {
            var _t, Pt = Ze + "0" in $e;
            if (Ze in $e || Pt && "d" + Ze in $e) {
              var Dt = ct.makeCalcdata($e, Ze);
              return [i($e, ct, Ze, Dt).vals, Dt];
            }
            _t = Pt ? $e[Ze + "0"] : "name" in $e && (ct.type === "category" || l($e.name) && ["linear", "log"].indexOf(ct.type) !== -1 || h.isDateTime($e.name) && ct.type === "date") ? $e.name : ft;
            for (var $t = ct.type === "multicategory" ? ct.r2c_just_indices(_t) : ct.d2c(_t, 0, $e[Ze + "calendar"]), Gt = $e._length, Wt = new Array(Gt), mt = 0; mt < Gt; mt++) Wt[mt] = $t;
            return [Wt];
          }(C, M, I, T[V]), X = ee[0], Q = ee[1], ue = h.distinctVals(X, I), ce = ue.vals, he = ue.minDiff / 2, de = (C.boxpoints || C.points) === "all" ? h.identity : function($e) {
            return $e.v < $.lf || $e.v > $.uf;
          };
          if (C._hasPreCompStats) {
            var ne = C[P], ae = function($e) {
              return E.d2c((C[$e] || [])[D]);
            }, se = 1 / 0, me = -1 / 0;
            for (D = 0; D < C._length; D++) {
              var ye = X[D];
              if (l(ye)) {
                if (($ = {}).pos = $[M] = ye, O && Q && ($.orig_p = Q[D]), $.q1 = ae("q1"), $.med = ae("median"), $.q3 = ae("q3"), q = [], ne && h.isArrayOrTypedArray(ne[D])) for (L = 0; L < ne[D].length; L++) (te = E.d2c(ne[D][L])) !== p && (f(Y = { v: te, i: [D, L] }, C, [D, L]), q.push(Y));
                if ($.pts = q.sort(c), re = (K = $[P] = q.map(g)).length, $.med !== p && $.q1 !== p && $.q3 !== p && $.med >= $.q1 && $.q3 >= $.med) {
                  var pe = ae("lowerfence");
                  $.lf = pe !== p && pe <= $.q1 ? pe : m($, K, re);
                  var be = ae("upperfence");
                  $.uf = be !== p && be >= $.q3 ? be : x($, K, re);
                  var Ae = ae("mean");
                  $.mean = Ae !== p ? Ae : re ? h.mean(K, re) : ($.q1 + $.q3) / 2;
                  var Se = ae("sd");
                  $.sd = Ae !== p && Se >= 0 ? Se : re ? h.stdev(K, re, $.mean) : $.q3 - $.q1, $.lo = w($), $.uo = k($);
                  var Me = ae("notchspan");
                  Me = Me !== p && Me > 0 ? Me : S($, re), $.ln = $.med - Me, $.un = $.med + Me;
                  var De = $.lf, Le = $.uf;
                  C.boxpoints && K.length && (De = Math.min(De, K[0]), Le = Math.max(Le, K[re - 1])), C.notched && (De = Math.min(De, $.ln), Le = Math.max(Le, $.un)), $.min = De, $.max = Le;
                } else {
                  var We;
                  h.warn(["Invalid input - make sure that q1 <= median <= q3", "q1 = " + $.q1, "median = " + $.med, "q3 = " + $.q3].join(`
`)), We = $.med !== p ? $.med : $.q1 !== p ? $.q3 !== p ? ($.q1 + $.q3) / 2 : $.q1 : $.q3 !== p ? $.q3 : 0, $.med = We, $.q1 = $.q3 = We, $.lf = $.uf = We, $.mean = $.sd = We, $.ln = $.un = We, $.min = $.max = We;
                }
                se = Math.min(se, $.min), me = Math.max(me, $.max), $.pts2 = q.filter(de), U.push($);
              }
            }
            C._extremes[E._id] = u.findExtremes(E, [se, me], { padded: !0 });
          } else {
            var Ee = E.makeCalcdata(C, P), Ne = function($e, Ze) {
              for (var ct = $e.length, ft = new Array(ct + 1), _t = 0; _t < ct; _t++) ft[_t] = $e[_t] - Ze;
              return ft[ct] = $e[ct - 1] + Ze, ft;
            }(ce, he), Ie = ce.length, ge = function($e) {
              for (var Ze = new Array($e), ct = 0; ct < $e; ct++) Ze[ct] = [];
              return Ze;
            }(Ie);
            for (D = 0; D < C._length; D++) if (te = Ee[D], l(te)) {
              var Ce = h.findBin(X[D], Ne);
              Ce >= 0 && Ce < Ie && (f(Y = { v: te, i: D }, C, D), ge[Ce].push(Y));
            }
            var we = 1 / 0, Ge = -1 / 0, Re = C.quartilemethod, je = Re === "exclusive", Ke = Re === "inclusive";
            for (D = 0; D < Ie; D++) if (ge[D].length > 0) {
              var tt, _e;
              ($ = {}).pos = $[M] = ce[D], q = $.pts = ge[D].sort(c), re = (K = $[P] = q.map(g)).length, $.min = K[0], $.max = K[re - 1], $.mean = h.mean(K, re), $.sd = h.stdev(K, re, $.mean) * C.sdmultiple, $.med = h.interp(K, 0.5), re % 2 && (je || Ke) ? (je ? (tt = K.slice(0, re / 2), _e = K.slice(re / 2 + 1)) : Ke && (tt = K.slice(0, re / 2 + 1), _e = K.slice(re / 2)), $.q1 = h.interp(tt, 0.5), $.q3 = h.interp(_e, 0.5)) : ($.q1 = h.interp(K, 0.25), $.q3 = h.interp(K, 0.75)), $.lf = m($, K, re), $.uf = x($, K, re), $.lo = w($), $.uo = k($);
              var Be = S($, re);
              $.ln = $.med - Be, $.un = $.med + Be, we = Math.min(we, $.ln), Ge = Math.max(Ge, $.un), $.pts2 = q.filter(de), U.push($);
            }
            C.notched && h.isTypedArray(Ee) && (Ee = Array.from(Ee)), C._extremes[E._id] = u.findExtremes(E, C.notched ? Ee.concat([we, Ge]) : Ee, { padded: !0 });
          }
          return function($e, Ze) {
            if (h.isArrayOrTypedArray(Ze.selectedpoints)) for (var ct = 0; ct < $e.length; ct++) {
              for (var ft = $e[ct].pts || [], _t = {}, Pt = 0; Pt < ft.length; Pt++) _t[ft[Pt].i] = Pt;
              h.tagSelected(ft, Ze, _t);
            }
          }(U, C), U.length > 0 ? (U[0].t = { num: T[V], dPos: he, posLetter: M, valLetter: P, labels: { med: _(A, "median:"), min: _(A, "min:"), q1: _(A, "q1:"), q3: _(A, "q3:"), max: _(A, "max:"), mean: C.boxmean === "sd" || C.sizemode === "sd" ? _(A, "mean ± σ:").replace("σ", C.sdmultiple === 1 ? "σ" : C.sdmultiple + "σ") : _(A, "mean:"), lf: _(A, "lower fence:"), uf: _(A, "upper fence:") } }, T[V]++, U) : [{ t: { empty: !0 } }];
        };
        var d = { text: "tx", hovertext: "htx" };
        function f(A, C, D) {
          for (var L in d) h.isArrayOrTypedArray(C[L]) && (Array.isArray(D) ? h.isArrayOrTypedArray(C[L][D[0]]) && (A[d[L]] = C[L][D[0]][D[1]]) : A[d[L]] = C[L][D]);
        }
        function c(A, C) {
          return A.v - C.v;
        }
        function g(A) {
          return A.v;
        }
        function m(A, C, D) {
          return D === 0 ? A.q1 : Math.min(A.q1, C[Math.min(h.findBin(2.5 * A.q1 - 1.5 * A.q3, C, !0) + 1, D - 1)]);
        }
        function x(A, C, D) {
          return D === 0 ? A.q3 : Math.max(A.q3, C[Math.max(h.findBin(2.5 * A.q3 - 1.5 * A.q1, C), 0)]);
        }
        function w(A) {
          return 4 * A.q1 - 3 * A.q3;
        }
        function k(A) {
          return 4 * A.q3 - 3 * A.q1;
        }
        function S(A, C) {
          return C === 0 ? 0 : 1.57 * (A.q3 - A.q1) / Math.sqrt(C);
        }
      }, 81606: function(o, s, n) {
        var l = n(29714), u = n(34809), i = n(84391).getAxisGroup, h = ["v", "h"];
        function p(_, d, f, c) {
          var g, m, x, w = d.calcdata, k = d._fullLayout, S = c._id, A = S.charAt(0), C = [], D = 0;
          for (g = 0; g < f.length; g++) for (x = w[f[g]], m = 0; m < x.length; m++) C.push(c.c2l(x[m].pos, !0)), D += (x[m].pts2 || []).length;
          if (C.length) {
            var L = u.distinctVals(C);
            c.type !== "category" && c.type !== "multicategory" || (L.minDiff = 1);
            var E = L.minDiff / 2;
            l.minDtick(c, L.minDiff, L.vals[0], !0);
            var P = k[_ === "violin" ? "_numViolins" : "_numBoxes"], I = k[_ + "mode"] === "group" && P > 1, M = 1 - k[_ + "gap"], O = 1 - k[_ + "groupgap"];
            for (g = 0; g < f.length; g++) {
              var T, z, F, U, V, $, q = (x = w[f[g]])[0].trace, K = x[0].t, re = q.width, Y = q.side;
              if (re) T = z = U = re / 2, F = 0;
              else if (T = E, I) {
                var te = i(k, c._id) + q.orientation, ee = (k._alignmentOpts[te] || {})[q.alignmentgroup] || {}, X = Object.keys(ee.offsetGroups || {}).length, Q = X || P;
                z = T * M * O / Q, F = 2 * T * (((X ? q._offsetIndex : K.num) + 0.5) / Q - 0.5) * M, U = T * M / Q;
              } else z = T * M * O, F = 0, U = T;
              K.dPos = T, K.bPos = F, K.bdPos = z, K.wHover = U;
              var ue, ce, he, de, ne, ae, se = F + z, me = !!re;
              if (Y === "positive" ? (V = T * (re ? 1 : 0.5), ue = se, $ = ue = F) : Y === "negative" ? (V = ue = F, $ = T * (re ? 1 : 0.5), ce = se) : (V = $ = T, ue = ce = se), (q.boxpoints || q.points) && D > 0) {
                var ye = q.pointpos, pe = q.jitter, be = q.marker.size / 2, Ae = 0;
                ye + pe >= 0 && ((Ae = se * (ye + pe)) > V ? (me = !0, ne = be, he = Ae) : Ae > ue && (ne = be, he = V)), Ae <= V && (he = V);
                var Se = 0;
                ye - pe <= 0 && ((Se = -se * (ye - pe)) > $ ? (me = !0, ae = be, de = Se) : Se > ce && (ae = be, de = $)), Se <= $ && (de = $);
              } else he = V, de = $;
              var Me = new Array(x.length);
              for (m = 0; m < x.length; m++) Me[m] = x[m].pos;
              q._extremes[S] = l.findExtremes(c, Me, { padded: me, vpadminus: de, vpadplus: he, vpadLinearized: !0, ppadminus: { x: ae, y: ne }[A], ppadplus: { x: ne, y: ae }[A] });
            }
          }
        }
        o.exports = { crossTraceCalc: function(_, d) {
          for (var f = _.calcdata, c = d.xaxis, g = d.yaxis, m = 0; m < h.length; m++) {
            for (var x = h[m], w = x === "h" ? g : c, k = [], S = 0; S < f.length; S++) {
              var A = f[S], C = A[0].t, D = A[0].trace;
              D.visible !== !0 || D.type !== "box" && D.type !== "candlestick" || C.empty || (D.orientation || "v") !== x || D.xaxis !== c._id || D.yaxis !== g._id || k.push(S);
            }
            p("box", _, k, w);
          }
        }, setPositionOffset: p };
      }, 62294: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(78766), h = n(99669), p = n(36301), _ = n(9666), d = n(64625);
        function f(g, m, x, w) {
          function k(Y) {
            var te = 0;
            return Y && Y.length && (te += 1, l.isArrayOrTypedArray(Y[0]) && Y[0].length && (te += 1)), te;
          }
          function S(Y) {
            return l.validate(g[Y], d[Y]);
          }
          var A, C = x("y"), D = x("x");
          if (m.type === "box") {
            var L = x("q1"), E = x("median"), P = x("q3");
            m._hasPreCompStats = L && L.length && E && E.length && P && P.length, A = Math.min(l.minRowLength(L), l.minRowLength(E), l.minRowLength(P));
          }
          var I, M, O = k(C), T = k(D), z = O && l.minRowLength(C), F = T && l.minRowLength(D), U = w.calendar, V = { autotypenumbers: w.autotypenumbers };
          if (m._hasPreCompStats) switch (String(T) + String(O)) {
            case "00":
              var $ = S("x0") || S("dx");
              I = !S("y0") && !S("dy") || $ ? "v" : "h", M = A;
              break;
            case "10":
              I = "v", M = Math.min(A, F);
              break;
            case "20":
              I = "h", M = Math.min(A, D.length);
              break;
            case "01":
              I = "h", M = Math.min(A, z);
              break;
            case "02":
              I = "v", M = Math.min(A, C.length);
              break;
            case "12":
              I = "v", M = Math.min(A, F, C.length);
              break;
            case "21":
              I = "h", M = Math.min(A, D.length, z);
              break;
            case "11":
              M = 0;
              break;
            case "22":
              var q, K = !1;
              for (q = 0; q < D.length; q++) if (_(D[q], U, V) === "category") {
                K = !0;
                break;
              }
              if (K) I = "v", M = Math.min(A, F, C.length);
              else {
                for (q = 0; q < C.length; q++) if (_(C[q], U, V) === "category") {
                  K = !0;
                  break;
                }
                K ? (I = "h", M = Math.min(A, D.length, z)) : (I = "v", M = Math.min(A, F, C.length));
              }
          }
          else O > 0 ? (I = "v", M = T > 0 ? Math.min(F, z) : Math.min(z)) : T > 0 ? (I = "h", M = Math.min(F)) : M = 0;
          if (M) {
            m._length = M;
            var re = x("orientation", I);
            m._hasPreCompStats ? re === "v" && T === 0 ? (x("x0", 0), x("dx", 1)) : re === "h" && O === 0 && (x("y0", 0), x("dy", 1)) : re === "v" && T === 0 ? x("x0") : re === "h" && O === 0 && x("y0"), u.getComponentMethod("calendars", "handleTraceDefaults")(g, m, ["x", "y"], w);
          } else m.visible = !1;
        }
        function c(g, m, x, w) {
          var k = w.prefix, S = l.coerce2(g, m, d, "marker.outliercolor"), A = x("marker.line.outliercolor"), C = "outliers";
          m._hasPreCompStats ? C = "all" : (S || A) && (C = "suspectedoutliers");
          var D = x(k + "points", C);
          D ? (x("jitter", D === "all" ? 0.3 : 0), x("pointpos", D === "all" ? -1.5 : 0), x("marker.symbol"), x("marker.opacity"), x("marker.size"), x("marker.angle"), x("marker.color", m.line.color), x("marker.line.color"), x("marker.line.width"), D === "suspectedoutliers" && (x("marker.line.outliercolor", m.marker.color), x("marker.line.outlierwidth")), x("selected.marker.color"), x("unselected.marker.color"), x("selected.marker.size"), x("unselected.marker.size"), x("text"), x("hovertext")) : delete m.marker;
          var L = x("hoveron");
          L !== "all" && L.indexOf("points") === -1 || x("hovertemplate"), l.coerceSelectionMarkerOpacity(m, x);
        }
        o.exports = { supplyDefaults: function(g, m, x, w) {
          function k(M, O) {
            return l.coerce(g, m, d, M, O);
          }
          if (f(g, m, k, w), m.visible !== !1) {
            h(g, m, w, k), k("xhoverformat"), k("yhoverformat");
            var S = m._hasPreCompStats;
            S && (k("lowerfence"), k("upperfence")), k("line.color", (g.marker || {}).color || x), k("line.width"), k("fillcolor", i.addOpacity(m.line.color, 0.5));
            var A = !1;
            if (S) {
              var C = k("mean"), D = k("sd");
              C && C.length && (A = !0, D && D.length && (A = "sd"));
            }
            k("whiskerwidth");
            var L, E = k("sizemode");
            E === "quartiles" && (L = k("boxmean", A)), k("showwhiskers", E === "quartiles"), E !== "sd" && L !== "sd" || k("sdmultiple"), k("width"), k("quartilemethod");
            var P = !1;
            if (S) {
              var I = k("notchspan");
              I && I.length && (P = !0);
            } else l.validate(g.notchwidth, d.notchwidth) && (P = !0);
            k("notched", P) && k("notchwidth"), c(g, m, k, { prefix: "box" }), k("zorder");
          }
        }, crossTraceDefaults: function(g, m) {
          var x, w;
          function k(C) {
            return l.coerce(w._input, w, d, C);
          }
          for (var S = 0; S < g.length; S++) {
            var A = (w = g[S]).type;
            A !== "box" && A !== "violin" || (x = w._input, m[A + "mode"] === "group" && p(x, w, m, k));
          }
        }, handleSampleDefaults: f, handlePointsDefaults: c };
      }, 76429: function(o) {
        o.exports = function(s, n) {
          return n.hoverOnBox && (s.hoverOnBox = n.hoverOnBox), "xVal" in n && (s.x = n.xVal), "yVal" in n && (s.y = n.yVal), n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), s;
        };
      }, 11448: function(o, s, n) {
        var l = n(29714), u = n(34809), i = n(32141), h = n(78766), p = u.fillText;
        function _(f, c, g, m) {
          var x, w, k, S, A, C, D, L, E, P, I, M, O, T, z = f.cd, F = f.xa, U = f.ya, V = z[0].trace, $ = z[0].t, q = V.type === "violin", K = $.bdPos, re = $.wHover, Y = function(We) {
            return k.c2l(We.pos) + $.bPos - k.c2l(C);
          };
          q && V.side !== "both" ? (V.side === "positive" && (E = function(We) {
            var Ee = Y(We);
            return i.inbox(Ee, Ee + re, P);
          }, M = K, O = 0), V.side === "negative" && (E = function(We) {
            var Ee = Y(We);
            return i.inbox(Ee - re, Ee, P);
          }, M = 0, O = K)) : (E = function(We) {
            var Ee = Y(We);
            return i.inbox(Ee - re, Ee + re, P);
          }, M = O = K), T = q ? function(We) {
            return i.inbox(We.span[0] - A, We.span[1] - A, P);
          } : function(We) {
            return i.inbox(We.min - A, We.max - A, P);
          }, V.orientation === "h" ? (A = c, C = g, D = T, L = E, x = "y", k = U, w = "x", S = F) : (A = g, C = c, D = E, L = T, x = "x", k = F, w = "y", S = U);
          var te = Math.min(1, K / Math.abs(k.r2c(k.range[1]) - k.r2c(k.range[0])));
          function ee(We) {
            return (D(We) + L(We)) / 2;
          }
          P = f.maxHoverDistance - te, I = f.maxSpikeDistance - te;
          var X = i.getDistanceFunction(m, D, L, ee);
          if (i.getClosest(z, X, f), f.index === !1) return [];
          var Q = z[f.index], ue = V.line.color, ce = (V.marker || {}).color;
          h.opacity(ue) && V.line.width ? f.color = ue : h.opacity(ce) && V.boxpoints ? f.color = ce : f.color = V.fillcolor, f[x + "0"] = k.c2p(Q.pos + $.bPos - O, !0), f[x + "1"] = k.c2p(Q.pos + $.bPos + M, !0), f[x + "LabelVal"] = Q.orig_p !== void 0 ? Q.orig_p : Q.pos;
          var he = x + "Spike";
          f.spikeDistance = ee(Q) * I / P, f[he] = k.c2p(Q.pos, !0);
          var de = V.boxmean || V.sizemode === "sd" || (V.meanline || {}).visible, ne = V.boxpoints || V.points, ae = ne && de ? ["max", "uf", "q3", "med", "mean", "q1", "lf", "min"] : ne && !de ? ["max", "uf", "q3", "med", "q1", "lf", "min"] : !ne && de ? ["max", "q3", "med", "mean", "q1", "min"] : ["max", "q3", "med", "q1", "min"], se = S.range[1] < S.range[0];
          V.orientation === (se ? "v" : "h") && ae.reverse();
          for (var me = f.spikeDistance, ye = f[he], pe = [], be = 0; be < ae.length; be++) {
            var Ae = ae[be];
            if (Ae in Q) {
              var Se = Q[Ae], Me = S.c2p(Se, !0), De = u.extendFlat({}, f);
              De.attr = Ae, De[w + "0"] = De[w + "1"] = Me, De[w + "LabelVal"] = Se, De[w + "Label"] = ($.labels ? $.labels[Ae] + " " : "") + l.hoverLabelText(S, Se, V[w + "hoverformat"]), De.hoverOnBox = !0, Ae !== "mean" || !("sd" in Q) || V.boxmean !== "sd" && V.sizemode !== "sd" || (De[w + "err"] = Q.sd), De.hovertemplate = !1, pe.push(De);
            }
          }
          f.name = "", f.spikeDistance = void 0, f[he] = void 0;
          for (var Le = 0; Le < pe.length; Le++) pe[Le].attr !== "med" ? (pe[Le].name = "", pe[Le].spikeDistance = void 0, pe[Le][he] = void 0) : (pe[Le].spikeDistance = me, pe[Le][he] = ye);
          return pe;
        }
        function d(f, c, g) {
          for (var m, x, w, k = f.cd, S = f.xa, A = f.ya, C = k[0].trace, D = S.c2p(c), L = A.c2p(g), E = i.quadrature(function(q) {
            var K = Math.max(3, q.mrc || 0);
            return Math.max(Math.abs(S.c2p(q.x) - D) - K, 1 - 3 / K);
          }, function(q) {
            var K = Math.max(3, q.mrc || 0);
            return Math.max(Math.abs(A.c2p(q.y) - L) - K, 1 - 3 / K);
          }), P = !1, I = 0; I < k.length; I++) {
            x = k[I];
            for (var M = 0; M < (x.pts || []).length; M++) {
              var O = E(w = x.pts[M]);
              O <= f.distance && (f.distance = O, P = [I, M]);
            }
          }
          if (!P) return !1;
          w = (x = k[P[0]]).pts[P[1]];
          var T = S.c2p(w.x, !0), z = A.c2p(w.y, !0), F = w.mrc || 1;
          m = u.extendFlat({}, f, { index: w.i, color: (C.marker || {}).color, name: C.name, x0: T - F, x1: T + F, y0: z - F, y1: z + F, spikeDistance: f.distance, hovertemplate: C.hovertemplate });
          var U, V = x.orig_p, $ = V !== void 0 ? V : x.pos;
          return C.orientation === "h" ? (U = A, m.xLabelVal = w.x, m.yLabelVal = $) : (U = S, m.xLabelVal = $, m.yLabelVal = w.y), m[U._id.charAt(0) + "Spike"] = U.c2p(x.pos, !0), p(w, C, m), m;
        }
        o.exports = { hoverPoints: function(f, c, g, m) {
          var x, w = f.cd[0].trace.hoveron, k = [];
          return w.indexOf("boxes") !== -1 && (k = k.concat(_(f, c, g, m))), w.indexOf("points") !== -1 && (x = d(f, c, g)), m === "closest" ? x ? [x] : k : (x && k.push(x), k);
        }, hoverOnBoxes: _, hoverOnPoints: d };
      }, 53794: function(o, s, n) {
        o.exports = { attributes: n(64625), layoutAttributes: n(64636), supplyDefaults: n(62294).supplyDefaults, crossTraceDefaults: n(62294).crossTraceDefaults, supplyLayoutDefaults: n(65067).supplyLayoutDefaults, calc: n(89429), crossTraceCalc: n(81606).crossTraceCalc, plot: n(95419).plot, style: n(59979).style, styleOnSelect: n(59979).styleOnSelect, hoverPoints: n(11448).hoverPoints, eventData: n(76429), selectPoints: n(72488), moduleType: "trace", name: "box", basePlotModule: n(37703), categories: ["cartesian", "svg", "symbols", "oriented", "box-violin", "showLegend", "boxLayout", "zoomScale"], meta: {} };
      }, 64636: function(o) {
        o.exports = { boxmode: { valType: "enumerated", values: ["group", "overlay"], dflt: "overlay", editType: "calc" }, boxgap: { valType: "number", min: 0, max: 1, dflt: 0.3, editType: "calc" }, boxgroupgap: { valType: "number", min: 0, max: 1, dflt: 0.3, editType: "calc" } };
      }, 65067: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(64636);
        function h(p, _, d, f, c) {
          for (var g = c + "Layout", m = !1, x = 0; x < d.length; x++) {
            var w = d[x];
            if (l.traceIs(w, g)) {
              m = !0;
              break;
            }
          }
          m && (f(c + "mode"), f(c + "gap"), f(c + "groupgap"));
        }
        o.exports = { supplyLayoutDefaults: function(p, _, d) {
          h(0, 0, d, function(f, c) {
            return u.coerce(p, _, i, f, c);
          }, "box");
        }, _supply: h };
      }, 95419: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203);
        function h(d, f, c, g, m) {
          var x, w, k = c.orientation === "h", S = f.val, A = f.pos, C = !!A.rangebreaks, D = g.bPos, L = g.wdPos || 0, E = g.bPosPxOffset || 0, P = c.whiskerwidth || 0, I = c.showwhiskers !== !1, M = c.notched || !1, O = M ? 1 - 2 * c.notchwidth : 1;
          Array.isArray(g.bdPos) ? (x = g.bdPos[0], w = g.bdPos[1]) : (x = g.bdPos, w = g.bdPos);
          var T = d.selectAll("path.box").data(c.type !== "violin" || c.box.visible ? u.identity : []);
          T.enter().append("path").style("vector-effect", m ? "none" : "non-scaling-stroke").attr("class", "box"), T.exit().remove(), T.each(function(z) {
            if (z.empty) return l.select(this).attr("d", "M0,0Z");
            var F = A.c2l(z.pos + D, !0), U = A.l2p(F - x) + E, V = A.l2p(F + w) + E, $ = C ? (U + V) / 2 : A.l2p(F) + E, q = c.whiskerwidth, K = C ? U * q + (1 - q) * $ : A.l2p(F - L) + E, re = C ? V * q + (1 - q) * $ : A.l2p(F + L) + E, Y = A.l2p(F - x * O) + E, te = A.l2p(F + w * O) + E, ee = c.sizemode === "sd", X = S.c2p(ee ? z.mean - z.sd : z.q1, !0), Q = ee ? S.c2p(z.mean + z.sd, !0) : S.c2p(z.q3, !0), ue = u.constrain(ee ? S.c2p(z.mean, !0) : S.c2p(z.med, !0), Math.min(X, Q) + 1, Math.max(X, Q) - 1), ce = z.lf === void 0 || c.boxpoints === !1 || ee, he = S.c2p(ce ? z.min : z.lf, !0), de = S.c2p(ce ? z.max : z.uf, !0), ne = S.c2p(z.ln, !0), ae = S.c2p(z.un, !0);
            k ? l.select(this).attr("d", "M" + ue + "," + Y + "V" + te + "M" + X + "," + U + "V" + V + (M ? "H" + ne + "L" + ue + "," + te + "L" + ae + "," + V : "") + "H" + Q + "V" + U + (M ? "H" + ae + "L" + ue + "," + Y + "L" + ne + "," + U : "") + "Z" + (I ? "M" + X + "," + $ + "H" + he + "M" + Q + "," + $ + "H" + de + (P === 0 ? "" : "M" + he + "," + K + "V" + re + "M" + de + "," + K + "V" + re) : "")) : l.select(this).attr("d", "M" + Y + "," + ue + "H" + te + "M" + U + "," + X + "H" + V + (M ? "V" + ne + "L" + te + "," + ue + "L" + V + "," + ae : "") + "V" + Q + "H" + U + (M ? "V" + ae + "L" + Y + "," + ue + "L" + U + "," + ne : "") + "Z" + (I ? "M" + $ + "," + X + "V" + he + "M" + $ + "," + Q + "V" + de + (P === 0 ? "" : "M" + K + "," + he + "H" + re + "M" + K + "," + de + "H" + re) : ""));
          });
        }
        function p(d, f, c, g) {
          var m = f.x, x = f.y, w = g.bdPos, k = g.bPos, S = c.boxpoints || c.points;
          u.seedPseudoRandom();
          var A = d.selectAll("g.points").data(S ? function(D) {
            return D.forEach(function(L) {
              L.t = g, L.trace = c;
            }), D;
          } : []);
          A.enter().append("g").attr("class", "points"), A.exit().remove();
          var C = A.selectAll("path").data(function(D) {
            var L, E, P = D.pts2, I = Math.max((D.max - D.min) / 10, D.q3 - D.q1), M = 1e-9 * I, O = 0.01 * I, T = [], z = 0;
            if (c.jitter) {
              if (I === 0) for (z = 1, T = new Array(P.length), L = 0; L < P.length; L++) T[L] = 1;
              else for (L = 0; L < P.length; L++) {
                var F = Math.max(0, L - 5), U = P[F].v, V = Math.min(P.length - 1, L + 5), $ = P[V].v;
                S !== "all" && (P[L].v < D.lf ? $ = Math.min($, D.lf) : U = Math.max(U, D.uf));
                var q = Math.sqrt(O * (V - F) / ($ - U + M)) || 0;
                q = u.constrain(Math.abs(q), 0, 1), T.push(q), z = Math.max(q, z);
              }
              E = 2 * c.jitter / (z || 1);
            }
            for (L = 0; L < P.length; L++) {
              var K = P[L], re = K.v, Y = c.jitter ? E * T[L] * (u.pseudoRandom() - 0.5) : 0, te = D.pos + k + w * (c.pointpos + Y);
              c.orientation === "h" ? (K.y = te, K.x = re) : (K.x = te, K.y = re), S === "suspectedoutliers" && re < D.uo && re > D.lo && (K.so = !0);
            }
            return P;
          });
          C.enter().append("path").classed("point", !0), C.exit().remove(), C.call(i.translatePoints, m, x);
        }
        function _(d, f, c, g) {
          var m, x, w = f.val, k = f.pos, S = !!k.rangebreaks, A = g.bPos, C = g.bPosPxOffset || 0, D = c.boxmean || (c.meanline || {}).visible;
          Array.isArray(g.bdPos) ? (m = g.bdPos[0], x = g.bdPos[1]) : (m = g.bdPos, x = g.bdPos);
          var L = d.selectAll("path.mean").data(c.type === "box" && c.boxmean || c.type === "violin" && c.box.visible && c.meanline.visible ? u.identity : []);
          L.enter().append("path").attr("class", "mean").style({ fill: "none", "vector-effect": "non-scaling-stroke" }), L.exit().remove(), L.each(function(E) {
            var P = k.c2l(E.pos + A, !0), I = k.l2p(P - m) + C, M = k.l2p(P + x) + C, O = S ? (I + M) / 2 : k.l2p(P) + C, T = w.c2p(E.mean, !0), z = w.c2p(E.mean - E.sd, !0), F = w.c2p(E.mean + E.sd, !0);
            c.orientation === "h" ? l.select(this).attr("d", "M" + T + "," + I + "V" + M + (D === "sd" ? "m0,0L" + z + "," + O + "L" + T + "," + I + "L" + F + "," + O + "Z" : "")) : l.select(this).attr("d", "M" + I + "," + T + "H" + M + (D === "sd" ? "m0,0L" + O + "," + z + "L" + I + "," + T + "L" + O + "," + F + "Z" : ""));
          });
        }
        o.exports = { plot: function(d, f, c, g) {
          var m = d._context.staticPlot, x = f.xaxis, w = f.yaxis;
          u.makeTraceGroups(g, c, "trace boxes").each(function(k) {
            var S, A, C = l.select(this), D = k[0], L = D.t, E = D.trace;
            L.wdPos = L.bdPos * E.whiskerwidth, E.visible !== !0 || L.empty ? C.remove() : (E.orientation === "h" ? (S = w, A = x) : (S = x, A = w), h(C, { pos: S, val: A }, E, L, m), p(C, { x, y: w }, E, L), _(C, { pos: S, val: A }, E, L));
          });
        }, plotBoxAndWhiskers: h, plotPoints: p, plotBoxMean: _ };
      }, 72488: function(o) {
        o.exports = function(s, n) {
          var l, u, i = s.cd, h = s.xaxis, p = s.yaxis, _ = [];
          if (n === !1) for (l = 0; l < i.length; l++) for (u = 0; u < (i[l].pts || []).length; u++) i[l].pts[u].selected = 0;
          else for (l = 0; l < i.length; l++) for (u = 0; u < (i[l].pts || []).length; u++) {
            var d = i[l].pts[u], f = h.c2p(d.x), c = p.c2p(d.y);
            n.contains([f, c], null, d.i, s) ? (_.push({ pointNumber: d.i, x: h.c2d(d.x), y: p.c2d(d.y) }), d.selected = 1) : d.selected = 0;
          }
          return _;
        };
      }, 59979: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(62203);
        o.exports = { style: function(h, p, _) {
          var d = _ || l.select(h).selectAll("g.trace.boxes");
          d.style("opacity", function(f) {
            return f[0].trace.opacity;
          }), d.each(function(f) {
            var c = l.select(this), g = f[0].trace, m = g.line.width;
            function x(S, A, C, D) {
              S.style("stroke-width", A + "px").call(u.stroke, C).call(u.fill, D);
            }
            var w = c.selectAll("path.box");
            if (g.type === "candlestick") w.each(function(S) {
              if (!S.empty) {
                var A = l.select(this), C = g[S.dir];
                x(A, C.line.width, C.line.color, C.fillcolor), A.style("opacity", g.selectedpoints && !S.selected ? 0.3 : 1);
              }
            });
            else {
              x(w, m, g.line.color, g.fillcolor), c.selectAll("path.mean").style({ "stroke-width": m, "stroke-dasharray": 2 * m + "px," + m + "px" }).call(u.stroke, g.line.color);
              var k = c.selectAll("path.point");
              i.pointStyle(k, g, h);
            }
          });
        }, styleOnSelect: function(h, p, _) {
          var d = p[0].trace, f = _.selectAll("path.point");
          d.selectedpoints ? i.selectedPointStyle(f, d) : i.pointStyle(f, d, h);
        } };
      }, 24319: function(o, s, n) {
        var l = n(34809).extendFlat, u = n(80712).axisHoverFormat, i = n(86706), h = n(64625);
        function p(_) {
          return { line: { color: l({}, h.line.color, { dflt: _ }), width: h.line.width, editType: "style" }, fillcolor: h.fillcolor, editType: "style" };
        }
        o.exports = { xperiod: i.xperiod, xperiod0: i.xperiod0, xperiodalignment: i.xperiodalignment, xhoverformat: u("x"), yhoverformat: u("y"), x: i.x, open: i.open, high: i.high, low: i.low, close: i.close, line: { width: l({}, h.line.width, {}), editType: "style" }, increasing: p(i.increasing.line.color.dflt), decreasing: p(i.decreasing.line.color.dflt), text: i.text, hovertext: i.hovertext, whiskerwidth: l({}, h.whiskerwidth, { dflt: 0 }), hoverlabel: i.hoverlabel, zorder: h.zorder };
      }, 63679: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(40528), h = n(95694).calcCommon;
        function p(_, d, f, c) {
          return { min: f, q1: Math.min(_, c), med: c, q3: Math.max(_, c), max: d };
        }
        o.exports = function(_, d) {
          var f = _._fullLayout, c = u.getFromId(_, d.xaxis), g = u.getFromId(_, d.yaxis), m = c.makeCalcdata(d, "x"), x = i(d, c, "x", m).vals, w = h(_, d, m, x, g, p);
          return w.length ? (l.extendFlat(w[0].t, { num: f._numBoxes, dPos: l.distinctVals(x).minDiff / 2, posLetter: "x", valLetter: "y" }), f._numBoxes++, w) : [{ t: { empty: !0 } }];
        };
      }, 57336: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(28270), h = n(99669), p = n(24319);
        function _(d, f, c, g) {
          var m = c(g + ".line.color");
          c(g + ".line.width", f.line.width), c(g + ".fillcolor", u.addOpacity(m, 0.5));
        }
        o.exports = function(d, f, c, g) {
          function m(x, w) {
            return l.coerce(d, f, p, x, w);
          }
          i(d, f, m, g) ? (h(d, f, g, m, { x: !0 }), m("xhoverformat"), m("yhoverformat"), m("line.width"), _(0, f, m, "increasing"), _(0, f, m, "decreasing"), m("text"), m("hovertext"), m("whiskerwidth"), g._requestRangeslider[f.xaxis] = !0, m("zorder")) : f.visible = !1;
        };
      }, 51252: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "candlestick", basePlotModule: n(37703), categories: ["cartesian", "svg", "showLegend", "candlestick", "boxLayout"], meta: {}, attributes: n(24319), layoutAttributes: n(64636), supplyLayoutDefaults: n(65067).supplyLayoutDefaults, crossTraceCalc: n(81606).crossTraceCalc, supplyDefaults: n(57336), calc: n(63679), plot: n(95419).plot, layerName: "boxlayer", style: n(59979).style, hoverPoints: n(93245).hoverPoints, selectPoints: n(49343) };
      }, 8432: function(o, s, n) {
        var l = n(6038), u = n(78032);
        o.exports = function(i, h, p, _, d) {
          _("a") || (_("da"), _("a0")), _("b") || (_("db"), _("b0")), function(f, c, g, m) {
            ["aaxis", "baxis"].forEach(function(x) {
              var w = x.charAt(0), k = f[x] || {}, S = u.newContainer(c, x), A = { noAutotickangles: !0, noTicklabelshift: !0, noTicklabelstandoff: !0, noTicklabelstep: !0, tickfont: "x", id: w + "axis", letter: w, font: c.font, name: x, data: f[w], calendar: c.calendar, dfltColor: m, bgColor: g.paper_bgcolor, autotypenumbersDflt: g.autotypenumbers, fullLayout: g };
              l(k, S, A), S._categories = S._categories || [], f[x] || k.type === "-" || (f[x] = { type: k.type });
            });
          }(i, h, p, d);
        };
      }, 97052: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray;
        function u(i, h) {
          if (!l(i) || h >= 10) return null;
          for (var p = 1 / 0, _ = -1 / 0, d = i.length, f = 0; f < d; f++) {
            var c = i[f];
            if (l(c)) {
              var g = u(c, h + 1);
              g && (p = Math.min(g[0], p), _ = Math.max(g[1], _));
            } else p = Math.min(c, p), _ = Math.max(c, _);
          }
          return [p, _];
        }
        o.exports = function(i) {
          return u(i, 0);
        };
      }, 43745: function(o, s, n) {
        var l = n(80337), u = n(86961), i = n(10229), h = l({ editType: "calc" }), p = n(36640).zorder;
        h.family.dflt = '"Open Sans", verdana, arial, sans-serif', h.size.dflt = 12, h.color.dflt = i.defaultLine, o.exports = { carpet: { valType: "string", editType: "calc" }, x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, a: { valType: "data_array", editType: "calc" }, a0: { valType: "number", dflt: 0, editType: "calc" }, da: { valType: "number", dflt: 1, editType: "calc" }, b: { valType: "data_array", editType: "calc" }, b0: { valType: "number", dflt: 0, editType: "calc" }, db: { valType: "number", dflt: 1, editType: "calc" }, cheaterslope: { valType: "number", dflt: 1, editType: "calc" }, aaxis: u, baxis: u, font: h, color: { valType: "color", dflt: i.defaultLine, editType: "plot" }, transforms: void 0, zorder: p };
      }, 94903: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray;
        o.exports = function(u, i, h, p) {
          var _, d, f, c, g, m, x, w, k, S, A, C, D, L = l(h) ? "a" : "b", E = (L === "a" ? u.aaxis : u.baxis).smoothing, P = L === "a" ? u.a2i : u.b2j, I = L === "a" ? h : p, M = L === "a" ? p : h, O = L === "a" ? i.a.length : i.b.length, T = L === "a" ? i.b.length : i.a.length, z = Math.floor(L === "a" ? u.b2j(M) : u.a2i(M)), F = L === "a" ? function(ue) {
            return u.evalxy([], ue, z);
          } : function(ue) {
            return u.evalxy([], z, ue);
          };
          E && (f = Math.max(0, Math.min(T - 2, z)), c = z - f, d = L === "a" ? function(ue, ce) {
            return u.dxydi([], ue, f, ce, c);
          } : function(ue, ce) {
            return u.dxydj([], f, ue, c, ce);
          });
          var U = P(I[0]), V = P(I[1]), $ = U < V ? 1 : -1, q = 1e-8 * (V - U), K = $ > 0 ? Math.floor : Math.ceil, re = $ > 0 ? Math.ceil : Math.floor, Y = $ > 0 ? Math.min : Math.max, te = $ > 0 ? Math.max : Math.min, ee = K(U + q), X = re(V - q), Q = [[x = F(U)]];
          for (_ = ee; _ * $ < X * $; _ += $) g = [], A = te(U, _), D = (C = Y(V, _ + $)) - A, m = Math.max(0, Math.min(O - 2, Math.floor(0.5 * (A + C)))), w = F(C), E && (k = d(m, A - m), S = d(m, C - m), g.push([x[0] + k[0] / 3 * D, x[1] + k[1] / 3 * D]), g.push([w[0] - S[0] / 3 * D, w[1] - S[1] / 3 * D])), g.push(w), Q.push(g), x = w;
          return Q;
        };
      }, 86961: function(o, s, n) {
        var l = n(80337), u = n(10229), i = n(25829), h = n(80712).descriptionWithDates, p = n(13582).overrideAll, _ = n(94850).T, d = n(93049).extendFlat;
        o.exports = { color: { valType: "color", editType: "calc" }, smoothing: { valType: "number", dflt: 1, min: 0, max: 1.3, editType: "calc" }, title: { text: { valType: "string", dflt: "", editType: "calc" }, font: l({ editType: "calc" }), offset: { valType: "number", dflt: 10, editType: "calc" }, editType: "calc" }, type: { valType: "enumerated", values: ["-", "linear", "date", "category"], dflt: "-", editType: "calc" }, autotypenumbers: i.autotypenumbers, autorange: { valType: "enumerated", values: [!0, !1, "reversed"], dflt: !0, editType: "calc" }, rangemode: { valType: "enumerated", values: ["normal", "tozero", "nonnegative"], dflt: "normal", editType: "calc" }, range: { valType: "info_array", editType: "calc", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }] }, fixedrange: { valType: "boolean", dflt: !1, editType: "calc" }, cheatertype: { valType: "enumerated", values: ["index", "value"], dflt: "value", editType: "calc" }, tickmode: { valType: "enumerated", values: ["linear", "array"], dflt: "array", editType: "calc" }, nticks: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, tickvals: { valType: "data_array", editType: "calc" }, ticktext: { valType: "data_array", editType: "calc" }, showticklabels: { valType: "enumerated", values: ["start", "end", "both", "none"], dflt: "start", editType: "calc" }, labelalias: d({}, i.labelalias, { editType: "calc" }), tickfont: l({ editType: "calc" }), tickangle: { valType: "angle", dflt: "auto", editType: "calc" }, tickprefix: { valType: "string", dflt: "", editType: "calc" }, showtickprefix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, ticksuffix: { valType: "string", dflt: "", editType: "calc" }, showticksuffix: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, showexponent: { valType: "enumerated", values: ["all", "first", "last", "none"], dflt: "all", editType: "calc" }, exponentformat: { valType: "enumerated", values: ["none", "e", "E", "power", "SI", "B"], dflt: "B", editType: "calc" }, minexponent: { valType: "number", dflt: 3, min: 0, editType: "calc" }, separatethousands: { valType: "boolean", dflt: !1, editType: "calc" }, tickformat: { valType: "string", dflt: "", editType: "calc", description: h("tick label") }, tickformatstops: p(i.tickformatstops, "calc", "from-root"), categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, labelpadding: { valType: "integer", dflt: 10, editType: "calc" }, labelprefix: { valType: "string", editType: "calc" }, labelsuffix: { valType: "string", dflt: "", editType: "calc" }, showline: { valType: "boolean", dflt: !1, editType: "calc" }, linecolor: { valType: "color", dflt: u.defaultLine, editType: "calc" }, linewidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, gridcolor: { valType: "color", editType: "calc" }, gridwidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, griddash: d({}, _, { editType: "calc" }), showgrid: { valType: "boolean", dflt: !0, editType: "calc" }, minorgridcount: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, minorgridwidth: { valType: "number", min: 0, dflt: 1, editType: "calc" }, minorgriddash: d({}, _, { editType: "calc" }), minorgridcolor: { valType: "color", dflt: u.lightLine, editType: "calc" }, startline: { valType: "boolean", editType: "calc" }, startlinecolor: { valType: "color", editType: "calc" }, startlinewidth: { valType: "number", dflt: 1, editType: "calc" }, endline: { valType: "boolean", editType: "calc" }, endlinewidth: { valType: "number", dflt: 1, editType: "calc" }, endlinecolor: { valType: "color", editType: "calc" }, tick0: { valType: "number", min: 0, dflt: 0, editType: "calc" }, dtick: { valType: "number", min: 0, dflt: 1, editType: "calc" }, arraytick0: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, arraydtick: { valType: "integer", min: 1, dflt: 1, editType: "calc" }, _deprecated: { title: { valType: "string", editType: "calc" }, titlefont: l({ editType: "calc" }), titleoffset: { valType: "number", dflt: 10, editType: "calc" } }, editType: "calc" };
      }, 6038: function(o, s, n) {
        var l = n(43745), u = n(78766).addOpacity, i = n(33626), h = n(34809), p = n(22777), _ = n(12036), d = n(54616), f = n(46473), c = n(19091), g = n(9666);
        o.exports = function(m, x, w) {
          var k = w.letter, S = w.font || {}, A = l[k + "axis"];
          function C($, q) {
            return h.coerce(m, x, A, $, q);
          }
          function D($, q) {
            return h.coerce2(m, x, A, $, q);
          }
          w.name && (x._name = w.name, x._id = w.name), C("autotypenumbers", w.autotypenumbersDflt);
          var L = C("type");
          L === "-" && (w.data && function($, q) {
            if ($.type === "-") {
              var K = $._id.charAt(0), re = $[K + "calendar"];
              $.type = g(q, re, { autotypenumbers: $.autotypenumbers });
            }
          }(x, w.data), x.type === "-" ? x.type = "linear" : L = m.type = x.type), C("smoothing"), C("cheatertype"), C("showticklabels"), C("labelprefix", k + " = "), C("labelsuffix"), C("showtickprefix"), C("showticksuffix"), C("separatethousands"), C("tickformat"), C("exponentformat"), C("minexponent"), C("showexponent"), C("categoryorder"), C("tickmode"), C("tickvals"), C("ticktext"), C("tick0"), C("dtick"), x.tickmode === "array" && (C("arraytick0"), C("arraydtick")), C("labelpadding"), x._hovertitle = k, L === "date" && i.getComponentMethod("calendars", "handleDefaults")(m, x, "calendar", w.calendar), c(x, w.fullLayout), x.c2p = h.identity;
          var E = C("color", w.dfltColor), P = E === m.color ? E : S.color;
          C("title.text") && (h.coerceFont(C, "title.font", S, { overrideDflt: { size: h.bigFont(S.size), color: P } }), C("title.offset")), C("tickangle"), C("autorange", !x.isValidRange(m.range)) && C("rangemode"), C("range"), x.cleanRange(), C("fixedrange"), p(m, x, C, L), d(m, x, C, L, w), _(m, x, C, L, w), f(m, x, C, { data: w.data, dataAttr: k });
          var I = D("gridcolor", u(E, 0.3)), M = D("gridwidth"), O = D("griddash"), T = C("showgrid");
          T || (delete x.gridcolor, delete x.gridwidth, delete x.griddash);
          var z = D("startlinecolor", E), F = D("startlinewidth", M);
          C("startline", x.showgrid || !!z || !!F) || (delete x.startlinecolor, delete x.startlinewidth);
          var U = D("endlinecolor", E), V = D("endlinewidth", M);
          return C("endline", x.showgrid || !!U || !!V) || (delete x.endlinecolor, delete x.endlinewidth), T ? (C("minorgridcount"), C("minorgridwidth", M), C("minorgriddash", O), C("minorgridcolor", u(I, 0.06)), x.minorgridcount || (delete x.minorgridwidth, delete x.minorgriddash, delete x.minorgridcolor)) : (delete x.gridcolor, delete x.gridwidth, delete x.griddash), x.showticklabels === "none" && (delete x.tickfont, delete x.tickangle, delete x.showexponent, delete x.exponentformat, delete x.minexponent, delete x.tickformat, delete x.showticksuffix, delete x.showtickprefix), x.showticksuffix || delete x.ticksuffix, x.showtickprefix || delete x.tickprefix, C("tickmode"), x;
        };
      }, 67525: function(o, s, n) {
        var l = n(29714), u = n(34809).isArray1D, i = n(89992), h = n(97052), p = n(4753), _ = n(93923), d = n(39373), f = n(93877), c = n(13007), g = n(87869), m = n(76842);
        o.exports = function(x, w) {
          var k = l.getFromId(x, w.xaxis), S = l.getFromId(x, w.yaxis), A = w.aaxis, C = w.baxis, D = w.x, L = w.y, E = [];
          D && u(D) && E.push("x"), L && u(L) && E.push("y"), E.length && g(w, A, C, "a", "b", E);
          var P = w._a = w._a || w.a, I = w._b = w._b || w.b;
          D = w._x || w.x, L = w._y || w.y;
          var M = {};
          if (w._cheater) {
            var O = A.cheatertype === "index" ? P.length : P, T = C.cheatertype === "index" ? I.length : I;
            D = i(O, T, w.cheaterslope);
          }
          w._x = D = f(D), w._y = L = f(L), c(D, P, I), c(L, P, I), m(w), w.setScale();
          var z = h(D), F = h(L), U = 0.5 * (z[1] - z[0]), V = 0.5 * (z[1] + z[0]), $ = 0.5 * (F[1] - F[0]), q = 0.5 * (F[1] + F[0]), K = 1.3;
          return z = [V - U * K, V + U * K], F = [q - $ * K, q + $ * K], w._extremes[k._id] = l.findExtremes(k, z, { padded: !0 }), w._extremes[S._id] = l.findExtremes(S, F, { padded: !0 }), p(w, "a", "b"), p(w, "b", "a"), _(w, A), _(w, C), M.clipsegments = d(w._xctrl, w._yctrl, A, C), M.x = D, M.y = L, M.a = P, M.b = I, [M];
        };
      }, 39373: function(o) {
        o.exports = function(s, n, l, u) {
          var i, h, p, _ = [], d = !!l.smoothing, f = !!u.smoothing, c = s[0].length - 1, g = s.length - 1;
          for (i = 0, h = [], p = []; i <= c; i++) h[i] = s[0][i], p[i] = n[0][i];
          for (_.push({ x: h, y: p, bicubic: d }), i = 0, h = [], p = []; i <= g; i++) h[i] = s[i][c], p[i] = n[i][c];
          for (_.push({ x: h, y: p, bicubic: f }), i = c, h = [], p = []; i >= 0; i--) h[c - i] = s[g][i], p[c - i] = n[g][i];
          for (_.push({ x: h, y: p, bicubic: d }), i = g, h = [], p = []; i >= 0; i--) h[g - i] = s[i][0], p[g - i] = n[i][0];
          return _.push({ x: h, y: p, bicubic: f }), _;
        };
      }, 4753: function(o, s, n) {
        var l = n(29714), u = n(93049).extendFlat;
        o.exports = function(i, h, p) {
          var _, d, f, c, g, m, x, w, k, S, A, C, D, L, E = i["_" + h], P = i[h + "axis"], I = P._gridlines = [], M = P._minorgridlines = [], O = P._boundarylines = [], T = i["_" + p], z = i[p + "axis"];
          P.tickmode === "array" && (P.tickvals = E.slice());
          var F = i._xctrl, U = i._yctrl, V = F[0].length, $ = F.length, q = i._a.length, K = i._b.length;
          l.prepTicks(P), P.tickmode === "array" && delete P.tickvals;
          var re = P.smoothing ? 3 : 1;
          function Y(ee) {
            var X, Q, ue, ce, he, de, ne, ae, se, me, ye, pe, be = [], Ae = [], Se = {};
            if (h === "b") for (Q = i.b2j(ee), ue = Math.floor(Math.max(0, Math.min(K - 2, Q))), ce = Q - ue, Se.length = K, Se.crossLength = q, Se.xy = function(Me) {
              return i.evalxy([], Me, Q);
            }, Se.dxy = function(Me, De) {
              return i.dxydi([], Me, ue, De, ce);
            }, X = 0; X < q; X++) de = Math.min(q - 2, X), ne = X - de, ae = i.evalxy([], X, Q), z.smoothing && X > 0 && (se = i.dxydi([], X - 1, ue, 0, ce), be.push(he[0] + se[0] / 3), Ae.push(he[1] + se[1] / 3), me = i.dxydi([], X - 1, ue, 1, ce), be.push(ae[0] - me[0] / 3), Ae.push(ae[1] - me[1] / 3)), be.push(ae[0]), Ae.push(ae[1]), he = ae;
            else for (X = i.a2i(ee), de = Math.floor(Math.max(0, Math.min(q - 2, X))), ne = X - de, Se.length = q, Se.crossLength = K, Se.xy = function(Me) {
              return i.evalxy([], X, Me);
            }, Se.dxy = function(Me, De) {
              return i.dxydj([], de, Me, ne, De);
            }, Q = 0; Q < K; Q++) ue = Math.min(K - 2, Q), ce = Q - ue, ae = i.evalxy([], X, Q), z.smoothing && Q > 0 && (ye = i.dxydj([], de, Q - 1, ne, 0), be.push(he[0] + ye[0] / 3), Ae.push(he[1] + ye[1] / 3), pe = i.dxydj([], de, Q - 1, ne, 1), be.push(ae[0] - pe[0] / 3), Ae.push(ae[1] - pe[1] / 3)), be.push(ae[0]), Ae.push(ae[1]), he = ae;
            return Se.axisLetter = h, Se.axis = P, Se.crossAxis = z, Se.value = ee, Se.constvar = p, Se.index = w, Se.x = be, Se.y = Ae, Se.smoothing = z.smoothing, Se;
          }
          function te(ee) {
            var X, Q, ue, ce, he, de = [], ne = [], ae = {};
            if (ae.length = E.length, ae.crossLength = T.length, h === "b") for (ue = Math.max(0, Math.min(K - 2, ee)), he = Math.min(1, Math.max(0, ee - ue)), ae.xy = function(se) {
              return i.evalxy([], se, ee);
            }, ae.dxy = function(se, me) {
              return i.dxydi([], se, ue, me, he);
            }, X = 0; X < V; X++) de[X] = F[ee * re][X], ne[X] = U[ee * re][X];
            else for (Q = Math.max(0, Math.min(q - 2, ee)), ce = Math.min(1, Math.max(0, ee - Q)), ae.xy = function(se) {
              return i.evalxy([], ee, se);
            }, ae.dxy = function(se, me) {
              return i.dxydj([], Q, se, ce, me);
            }, X = 0; X < $; X++) de[X] = F[X][ee * re], ne[X] = U[X][ee * re];
            return ae.axisLetter = h, ae.axis = P, ae.crossAxis = z, ae.value = E[ee], ae.constvar = p, ae.index = ee, ae.x = de, ae.y = ne, ae.smoothing = z.smoothing, ae;
          }
          if (P.tickmode === "array") {
            for (c = 5e-15, m = (g = [Math.floor((E.length - 1 - P.arraytick0) / P.arraydtick * (1 + c)), Math.ceil(-P.arraytick0 / P.arraydtick / (1 + c))].sort(function(ee, X) {
              return ee - X;
            }))[0] - 1, x = g[1] + 1, w = m; w < x; w++) (d = P.arraytick0 + P.arraydtick * w) < 0 || d > E.length - 1 || I.push(u(te(d), { color: P.gridcolor, width: P.gridwidth, dash: P.griddash }));
            for (w = m; w < x; w++) if (f = P.arraytick0 + P.arraydtick * w, A = Math.min(f + P.arraydtick, E.length - 1), !(f < 0 || f > E.length - 1 || A < 0 || A > E.length - 1)) for (C = E[f], D = E[A], _ = 0; _ < P.minorgridcount; _++) (L = A - f) <= 0 || (S = C + (D - C) * (_ + 1) / (P.minorgridcount + 1) * (P.arraydtick / L)) < E[0] || S > E[E.length - 1] || M.push(u(Y(S), { color: P.minorgridcolor, width: P.minorgridwidth, dash: P.minorgriddash }));
            P.startline && O.push(u(te(0), { color: P.startlinecolor, width: P.startlinewidth })), P.endline && O.push(u(te(E.length - 1), { color: P.endlinecolor, width: P.endlinewidth }));
          } else {
            for (c = 5e-15, m = (g = [Math.floor((E[E.length - 1] - P.tick0) / P.dtick * (1 + c)), Math.ceil((E[0] - P.tick0) / P.dtick / (1 + c))].sort(function(ee, X) {
              return ee - X;
            }))[0], x = g[1], w = m; w <= x; w++) k = P.tick0 + P.dtick * w, I.push(u(Y(k), { color: P.gridcolor, width: P.gridwidth, dash: P.griddash }));
            for (w = m - 1; w < x + 1; w++) for (k = P.tick0 + P.dtick * w, _ = 0; _ < P.minorgridcount; _++) (S = k + P.dtick * (_ + 1) / (P.minorgridcount + 1)) < E[0] || S > E[E.length - 1] || M.push(u(Y(S), { color: P.minorgridcolor, width: P.minorgridwidth, dash: P.minorgriddash }));
            P.startline && O.push(u(Y(E[0]), { color: P.startlinecolor, width: P.startlinewidth })), P.endline && O.push(u(Y(E[E.length - 1]), { color: P.endlinecolor, width: P.endlinewidth }));
          }
        };
      }, 93923: function(o, s, n) {
        var l = n(29714), u = n(93049).extendFlat;
        o.exports = function(i, h) {
          var p, _, d, f = h._labels = [], c = h._gridlines;
          for (p = 0; p < c.length; p++) d = c[p], ["start", "both"].indexOf(h.showticklabels) !== -1 && (_ = l.tickText(h, d.value), u(_, { prefix: void 0, suffix: void 0, endAnchor: !0, xy: d.xy(0), dxy: d.dxy(0, 0), axis: d.axis, length: d.crossAxis.length, font: d.axis.tickfont, isFirst: p === 0, isLast: p === c.length - 1 }), f.push(_)), ["end", "both"].indexOf(h.showticklabels) !== -1 && (_ = l.tickText(h, d.value), u(_, { endAnchor: !1, xy: d.xy(d.crossLength - 1), dxy: d.dxy(d.crossLength - 2, 1), axis: d.axis, length: d.crossAxis.length, font: d.axis.tickfont, isFirst: p === 0, isLast: p === c.length - 1 }), f.push(_));
        };
      }, 49109: function(o) {
        o.exports = function(s, n, l, u) {
          var i = s[0] - n[0], h = s[1] - n[1], p = l[0] - n[0], _ = l[1] - n[1], d = Math.pow(i * i + h * h, 0.25), f = Math.pow(p * p + _ * _, 0.25), c = (f * f * i - d * d * p) * u, g = (f * f * h - d * d * _) * u, m = f * (d + f) * 3, x = d * (d + f) * 3;
          return [[n[0] + (m && c / m), n[1] + (m && g / m)], [n[0] - (x && c / x), n[1] - (x && g / x)]];
        };
      }, 89992: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray;
        o.exports = function(u, i, h) {
          var p, _, d, f, c, g, m = [], x = l(u) ? u.length : u, w = l(i) ? i.length : i, k = l(u) ? u : null, S = l(i) ? i : null;
          k && (d = (k.length - 1) / (k[k.length - 1] - k[0]) / (x - 1)), S && (f = (S.length - 1) / (S[S.length - 1] - S[0]) / (w - 1));
          var A = 1 / 0, C = -1 / 0;
          for (_ = 0; _ < w; _++) for (m[_] = [], c = S ? (S[_] - S[0]) * f : _ / (w - 1), p = 0; p < x; p++) g = (k ? (k[p] - k[0]) * d : p / (x - 1)) - c * h, A = Math.min(g, A), C = Math.max(g, C), m[_][p] = g;
          var D = 1 / (C - A), L = -A * D;
          for (_ = 0; _ < w; _++) for (p = 0; p < x; p++) m[_][p] = D * m[_][p] + L;
          return m;
        };
      }, 57075: function(o, s, n) {
        var l = n(49109), u = n(34809).ensureArray;
        function i(h, p, _) {
          var d = -0.5 * _[0] + 1.5 * p[0], f = -0.5 * _[1] + 1.5 * p[1];
          return [(2 * d + h[0]) / 3, (2 * f + h[1]) / 3];
        }
        o.exports = function(h, p, _, d, f, c) {
          var g, m, x, w, k, S, A, C, D, L, E = _[0].length, P = _.length, I = f ? 3 * E - 2 : E, M = c ? 3 * P - 2 : P;
          for (h = u(h, M), p = u(p, M), x = 0; x < M; x++) h[x] = u(h[x], I), p[x] = u(p[x], I);
          for (m = 0, w = 0; m < P; m++, w += c ? 3 : 1) for (k = h[w], S = p[w], A = _[m], C = d[m], g = 0, x = 0; g < E; g++, x += f ? 3 : 1) k[x] = A[g], S[x] = C[g];
          if (f) for (m = 0, w = 0; m < P; m++, w += c ? 3 : 1) {
            for (g = 1, x = 3; g < E - 1; g++, x += 3) D = l([_[m][g - 1], d[m][g - 1]], [_[m][g], d[m][g]], [_[m][g + 1], d[m][g + 1]], f), h[w][x - 1] = D[0][0], p[w][x - 1] = D[0][1], h[w][x + 1] = D[1][0], p[w][x + 1] = D[1][1];
            L = i([h[w][0], p[w][0]], [h[w][2], p[w][2]], [h[w][3], p[w][3]]), h[w][1] = L[0], p[w][1] = L[1], L = i([h[w][I - 1], p[w][I - 1]], [h[w][I - 3], p[w][I - 3]], [h[w][I - 4], p[w][I - 4]]), h[w][I - 2] = L[0], p[w][I - 2] = L[1];
          }
          if (c) for (x = 0; x < I; x++) {
            for (w = 3; w < M - 3; w += 3) D = l([h[w - 3][x], p[w - 3][x]], [h[w][x], p[w][x]], [h[w + 3][x], p[w + 3][x]], c), h[w - 1][x] = D[0][0], p[w - 1][x] = D[0][1], h[w + 1][x] = D[1][0], p[w + 1][x] = D[1][1];
            L = i([h[0][x], p[0][x]], [h[2][x], p[2][x]], [h[3][x], p[3][x]]), h[1][x] = L[0], p[1][x] = L[1], L = i([h[M - 1][x], p[M - 1][x]], [h[M - 3][x], p[M - 3][x]], [h[M - 4][x], p[M - 4][x]]), h[M - 2][x] = L[0], p[M - 2][x] = L[1];
          }
          if (f && c) for (w = 1; w < M; w += (w + 1) % 3 == 0 ? 2 : 1) {
            for (x = 3; x < I - 3; x += 3) D = l([h[w][x - 3], p[w][x - 3]], [h[w][x], p[w][x]], [h[w][x + 3], p[w][x + 3]], f), h[w][x - 1] = 0.5 * (h[w][x - 1] + D[0][0]), p[w][x - 1] = 0.5 * (p[w][x - 1] + D[0][1]), h[w][x + 1] = 0.5 * (h[w][x + 1] + D[1][0]), p[w][x + 1] = 0.5 * (p[w][x + 1] + D[1][1]);
            L = i([h[w][0], p[w][0]], [h[w][2], p[w][2]], [h[w][3], p[w][3]]), h[w][1] = 0.5 * (h[w][1] + L[0]), p[w][1] = 0.5 * (p[w][1] + L[1]), L = i([h[w][I - 1], p[w][I - 1]], [h[w][I - 3], p[w][I - 3]], [h[w][I - 4], p[w][I - 4]]), h[w][I - 2] = 0.5 * (h[w][I - 2] + L[0]), p[w][I - 2] = 0.5 * (p[w][I - 2] + L[1]);
          }
          return [h, p];
        };
      }, 45923: function(o) {
        o.exports = { RELATIVE_CULL_TOLERANCE: 1e-6 };
      }, 39848: function(o) {
        o.exports = function(s, n, l) {
          return n && l ? function(u, i, h, p, _) {
            var d, f, c, g, m, x;
            u || (u = []), i *= 3, h *= 3;
            var w = p * p, k = 1 - p, S = k * k, A = k * p * 2, C = -3 * S, D = 3 * (S - A), L = 3 * (A - w), E = 3 * w, P = _ * _, I = P * _, M = 1 - _, O = M * M, T = O * M;
            for (x = 0; x < s.length; x++) d = C * (m = s[x])[h][i] + D * m[h][i + 1] + L * m[h][i + 2] + E * m[h][i + 3], f = C * m[h + 1][i] + D * m[h + 1][i + 1] + L * m[h + 1][i + 2] + E * m[h + 1][i + 3], c = C * m[h + 2][i] + D * m[h + 2][i + 1] + L * m[h + 2][i + 2] + E * m[h + 2][i + 3], g = C * m[h + 3][i] + D * m[h + 3][i + 1] + L * m[h + 3][i + 2] + E * m[h + 3][i + 3], u[x] = T * d + 3 * (O * _ * f + M * P * c) + I * g;
            return u;
          } : n ? function(u, i, h, p, _) {
            var d, f, c, g;
            u || (u = []), i *= 3;
            var m = p * p, x = 1 - p, w = x * x, k = x * p * 2, S = -3 * w, A = 3 * (w - k), C = 3 * (k - m), D = 3 * m, L = 1 - _;
            for (c = 0; c < s.length; c++) d = S * (g = s[c])[h][i] + A * g[h][i + 1] + C * g[h][i + 2] + D * g[h][i + 3], f = S * g[h + 1][i] + A * g[h + 1][i + 1] + C * g[h + 1][i + 2] + D * g[h + 1][i + 3], u[c] = L * d + _ * f;
            return u;
          } : l ? function(u, i, h, p, _) {
            var d, f, c, g, m, x;
            u || (u = []), h *= 3;
            var w = _ * _, k = w * _, S = 1 - _, A = S * S, C = A * S;
            for (m = 0; m < s.length; m++) d = (x = s[m])[h][i + 1] - x[h][i], f = x[h + 1][i + 1] - x[h + 1][i], c = x[h + 2][i + 1] - x[h + 2][i], g = x[h + 3][i + 1] - x[h + 3][i], u[m] = C * d + 3 * (A * _ * f + S * w * c) + k * g;
            return u;
          } : function(u, i, h, p, _) {
            var d, f, c, g;
            u || (u = []);
            var m = 1 - _;
            for (c = 0; c < s.length; c++) d = (g = s[c])[h][i + 1] - g[h][i], f = g[h + 1][i + 1] - g[h + 1][i], u[c] = m * d + _ * f;
            return u;
          };
        };
      }, 41839: function(o) {
        o.exports = function(s, n, l) {
          return n && l ? function(u, i, h, p, _) {
            var d, f, c, g, m, x;
            u || (u = []), i *= 3, h *= 3;
            var w = p * p, k = w * p, S = 1 - p, A = S * S, C = A * S, D = _ * _, L = 1 - _, E = L * L, P = L * _ * 2, I = -3 * E, M = 3 * (E - P), O = 3 * (P - D), T = 3 * D;
            for (x = 0; x < s.length; x++) d = I * (m = s[x])[h][i] + M * m[h + 1][i] + O * m[h + 2][i] + T * m[h + 3][i], f = I * m[h][i + 1] + M * m[h + 1][i + 1] + O * m[h + 2][i + 1] + T * m[h + 3][i + 1], c = I * m[h][i + 2] + M * m[h + 1][i + 2] + O * m[h + 2][i + 2] + T * m[h + 3][i + 2], g = I * m[h][i + 3] + M * m[h + 1][i + 3] + O * m[h + 2][i + 3] + T * m[h + 3][i + 3], u[x] = C * d + 3 * (A * p * f + S * w * c) + k * g;
            return u;
          } : n ? function(u, i, h, p, _) {
            var d, f, c, g, m, x;
            u || (u = []), i *= 3;
            var w = _ * _, k = w * _, S = 1 - _, A = S * S, C = A * S;
            for (m = 0; m < s.length; m++) d = (x = s[m])[h + 1][i] - x[h][i], f = x[h + 1][i + 1] - x[h][i + 1], c = x[h + 1][i + 2] - x[h][i + 2], g = x[h + 1][i + 3] - x[h][i + 3], u[m] = C * d + 3 * (A * _ * f + S * w * c) + k * g;
            return u;
          } : l ? function(u, i, h, p, _) {
            var d, f, c, g;
            u || (u = []), h *= 3;
            var m = 1 - p, x = _ * _, w = 1 - _, k = w * w, S = w * _ * 2, A = -3 * k, C = 3 * (k - S), D = 3 * (S - x), L = 3 * x;
            for (c = 0; c < s.length; c++) d = A * (g = s[c])[h][i] + C * g[h + 1][i] + D * g[h + 2][i] + L * g[h + 3][i], f = A * g[h][i + 1] + C * g[h + 1][i + 1] + D * g[h + 2][i + 1] + L * g[h + 3][i + 1], u[c] = m * d + p * f;
            return u;
          } : function(u, i, h, p, _) {
            var d, f, c, g;
            u || (u = []);
            var m = 1 - p;
            for (c = 0; c < s.length; c++) d = (g = s[c])[h + 1][i] - g[h][i], f = g[h + 1][i + 1] - g[h][i + 1], u[c] = m * d + p * f;
            return u;
          };
        };
      }, 13828: function(o) {
        o.exports = function(s, n, l, u, i) {
          var h = n - 2, p = l - 2;
          return u && i ? function(_, d, f) {
            var c, g, m, x, w, k;
            _ || (_ = []);
            var S = Math.max(0, Math.min(Math.floor(d), h)), A = Math.max(0, Math.min(Math.floor(f), p)), C = Math.max(0, Math.min(1, d - S)), D = Math.max(0, Math.min(1, f - A));
            S *= 3, A *= 3;
            var L = C * C, E = L * C, P = 1 - C, I = P * P, M = I * P, O = D * D, T = O * D, z = 1 - D, F = z * z, U = F * z;
            for (k = 0; k < s.length; k++) c = M * (w = s[k])[A][S] + 3 * (I * C * w[A][S + 1] + P * L * w[A][S + 2]) + E * w[A][S + 3], g = M * w[A + 1][S] + 3 * (I * C * w[A + 1][S + 1] + P * L * w[A + 1][S + 2]) + E * w[A + 1][S + 3], m = M * w[A + 2][S] + 3 * (I * C * w[A + 2][S + 1] + P * L * w[A + 2][S + 2]) + E * w[A + 2][S + 3], x = M * w[A + 3][S] + 3 * (I * C * w[A + 3][S + 1] + P * L * w[A + 3][S + 2]) + E * w[A + 3][S + 3], _[k] = U * c + 3 * (F * D * g + z * O * m) + T * x;
            return _;
          } : u ? function(_, d, f) {
            _ || (_ = []);
            var c, g, m, x, w, k, S = Math.max(0, Math.min(Math.floor(d), h)), A = Math.max(0, Math.min(Math.floor(f), p)), C = Math.max(0, Math.min(1, d - S)), D = Math.max(0, Math.min(1, f - A));
            S *= 3;
            var L = C * C, E = L * C, P = 1 - C, I = P * P, M = I * P, O = 1 - D;
            for (w = 0; w < s.length; w++) c = O * (k = s[w])[A][S] + D * k[A + 1][S], g = O * k[A][S + 1] + D * k[A + 1][S + 1], m = O * k[A][S + 2] + D * k[A + 1][S + 1], x = O * k[A][S + 3] + D * k[A + 1][S + 1], _[w] = M * c + 3 * (I * C * g + P * L * m) + E * x;
            return _;
          } : i ? function(_, d, f) {
            _ || (_ = []);
            var c, g, m, x, w, k, S = Math.max(0, Math.min(Math.floor(d), h)), A = Math.max(0, Math.min(Math.floor(f), p)), C = Math.max(0, Math.min(1, d - S)), D = Math.max(0, Math.min(1, f - A));
            A *= 3;
            var L = D * D, E = L * D, P = 1 - D, I = P * P, M = I * P, O = 1 - C;
            for (w = 0; w < s.length; w++) c = O * (k = s[w])[A][S] + C * k[A][S + 1], g = O * k[A + 1][S] + C * k[A + 1][S + 1], m = O * k[A + 2][S] + C * k[A + 2][S + 1], x = O * k[A + 3][S] + C * k[A + 3][S + 1], _[w] = M * c + 3 * (I * D * g + P * L * m) + E * x;
            return _;
          } : function(_, d, f) {
            _ || (_ = []);
            var c, g, m, x, w = Math.max(0, Math.min(Math.floor(d), h)), k = Math.max(0, Math.min(Math.floor(f), p)), S = Math.max(0, Math.min(1, d - w)), A = Math.max(0, Math.min(1, f - k)), C = 1 - A, D = 1 - S;
            for (m = 0; m < s.length; m++) c = D * (x = s[m])[k][w] + S * x[k][w + 1], g = D * x[k + 1][w] + S * x[k + 1][w + 1], _[m] = C * c + A * g;
            return _;
          };
        };
      }, 13254: function(o, s, n) {
        var l = n(34809), u = n(10820), i = n(8432), h = n(43745), p = n(10229);
        o.exports = function(_, d, f, c) {
          function g(x, w) {
            return l.coerce(_, d, h, x, w);
          }
          d._clipPathId = "clip" + d.uid + "carpet";
          var m = g("color", p.defaultLine);
          l.coerceFont(g, "font", c.font), g("carpet"), i(_, d, c, g, m), d.a && d.b ? (d.a.length < 3 && (d.aaxis.smoothing = 0), d.b.length < 3 && (d.baxis.smoothing = 0), u(_, d, g) || (d.visible = !1), d._cheater && g("cheaterslope"), g("zorder")) : d.visible = !1;
        };
      }, 48050: function(o, s, n) {
        o.exports = { attributes: n(43745), supplyDefaults: n(13254), plot: n(87947), calc: n(67525), animatable: !0, isContainer: !0, moduleType: "trace", name: "carpet", basePlotModule: n(37703), categories: ["cartesian", "svg", "carpet", "carpetAxis", "notLegendIsolatable", "noMultiCategory", "noHover", "noSortingByValue"], meta: {} };
      }, 26571: function(o) {
        o.exports = function(s, n) {
          for (var l, u = s._fullData.length, i = 0; i < u; i++) {
            var h = s._fullData[i];
            if (h.index !== n.index && h.type === "carpet" && (l || (l = h), h.carpet === n.carpet)) return h;
          }
          return l;
        };
      }, 3685: function(o) {
        o.exports = function(s, n, l) {
          if (s.length === 0) return "";
          var u, i = [], h = l ? 3 : 1;
          for (u = 0; u < s.length; u += h) i.push(s[u] + "," + n[u]), l && u < s.length - h && (i.push("C"), i.push([s[u + 1] + "," + n[u + 1], s[u + 2] + "," + n[u + 2] + " "].join(" ")));
          return i.join(l ? "" : "L");
        };
      }, 6720: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray;
        o.exports = function(u, i, h) {
          var p;
          for (l(u) ? u.length > i.length && (u = u.slice(0, i.length)) : u = [], p = 0; p < i.length; p++) u[p] = h(i[p]);
          return u;
        };
      }, 33163: function(o) {
        o.exports = function(s, n, l, u, i, h) {
          var p = i[0] * s.dpdx(n), _ = i[1] * s.dpdy(l), d = 1, f = 1;
          if (h) {
            var c = Math.sqrt(i[0] * i[0] + i[1] * i[1]), g = Math.sqrt(h[0] * h[0] + h[1] * h[1]), m = (i[0] * h[0] + i[1] * h[1]) / c / g;
            f = Math.max(0, m);
          }
          var x = 180 * Math.atan2(_, p) / Math.PI;
          return x < -90 ? (x += 180, d = -d) : x > 90 && (x -= 180, d = -d), { angle: x, flip: d, p: s.c2p(u, n, l), offsetMultplier: f };
        };
      }, 87947: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(6720), h = n(3685), p = n(33163), _ = n(30635), d = n(34809), f = d.strRotate, c = d.strTranslate, g = n(4530);
        function m(A, C, D, L, E, P, I) {
          var M = "const-" + E + "-lines", O = D.selectAll("." + M).data(P);
          O.enter().append("path").classed(M, !0).style("vector-effect", I ? "none" : "non-scaling-stroke"), O.each(function(T) {
            var z = T, F = z.x, U = z.y, V = i([], F, A.c2p), $ = i([], U, C.c2p), q = "M" + h(V, $, z.smoothing);
            l.select(this).attr("d", q).style("stroke-width", z.width).style("stroke", z.color).style("stroke-dasharray", u.dashStyle(z.dash, z.width)).style("fill", "none");
          }), O.exit().remove();
        }
        function x(A, C, D, L, E, P, I, M) {
          var O = P.selectAll("text." + M).data(I);
          O.enter().append("text").classed(M, !0);
          var T = 0, z = {};
          return O.each(function(F, U) {
            var V;
            if (F.axis.tickangle === "auto") V = p(L, C, D, F.xy, F.dxy);
            else {
              var $ = (F.axis.tickangle + 180) * Math.PI / 180;
              V = p(L, C, D, F.xy, [Math.cos($), Math.sin($)]);
            }
            U || (z = { angle: V.angle, flip: V.flip });
            var q = (F.endAnchor ? -1 : 1) * V.flip, K = l.select(this).attr({ "text-anchor": q > 0 ? "start" : "end", "data-notex": 1 }).call(u.font, F.font).text(F.text).call(_.convertToTspans, A), re = u.bBox(this);
            K.attr("transform", c(V.p[0], V.p[1]) + f(V.angle) + c(F.axis.labelpadding * q, 0.3 * re.height)), T = Math.max(T, re.width + F.axis.labelpadding);
          }), O.exit().remove(), z.maxExtent = T, z;
        }
        o.exports = function(A, C, D, L) {
          var E = A._context.staticPlot, P = C.xaxis, I = C.yaxis, M = A._fullLayout._clips;
          d.makeTraceGroups(L, D, "trace").each(function(O) {
            var T = l.select(this), z = O[0], F = z.trace, U = F.aaxis, V = F.baxis, $ = d.ensureSingle(T, "g", "minorlayer"), q = d.ensureSingle(T, "g", "majorlayer"), K = d.ensureSingle(T, "g", "boundarylayer"), re = d.ensureSingle(T, "g", "labellayer");
            T.style("opacity", F.opacity), m(P, I, q, 0, "a", U._gridlines, !0), m(P, I, q, 0, "b", V._gridlines, !0), m(P, I, $, 0, "a", U._minorgridlines, !0), m(P, I, $, 0, "b", V._minorgridlines, !0), m(P, I, K, 0, "a-boundary", U._boundarylines, E), m(P, I, K, 0, "b-boundary", V._boundarylines, E);
            var Y = x(A, P, I, F, 0, re, U._labels, "a-label"), te = x(A, P, I, F, 0, re, V._labels, "b-label");
            (function(ee, X, Q, ue, ce, he, de, ne) {
              var ae, se, me, ye, pe = d.aggNums(Math.min, null, Q.a), be = d.aggNums(Math.max, null, Q.a), Ae = d.aggNums(Math.min, null, Q.b), Se = d.aggNums(Math.max, null, Q.b);
              ae = 0.5 * (pe + be), se = Ae, me = Q.ab2xy(ae, se, !0), ye = Q.dxyda_rough(ae, se), de.angle === void 0 && d.extendFlat(de, p(Q, ce, he, me, Q.dxydb_rough(ae, se))), S(ee, X, Q, 0, me, ye, Q.aaxis, ce, he, de, "a-title"), ae = pe, se = 0.5 * (Ae + Se), me = Q.ab2xy(ae, se, !0), ye = Q.dxydb_rough(ae, se), ne.angle === void 0 && d.extendFlat(ne, p(Q, ce, he, me, Q.dxyda_rough(ae, se))), S(ee, X, Q, 0, me, ye, Q.baxis, ce, he, ne, "b-title");
            })(A, re, F, 0, P, I, Y, te), function(ee, X, Q, ue, ce) {
              var he, de, ne, ae, se = Q.select("#" + ee._clipPathId);
              se.size() || (se = Q.append("clipPath").classed("carpetclip", !0));
              var me = d.ensureSingle(se, "path", "carpetboundary"), ye = X.clipsegments, pe = [];
              for (ae = 0; ae < ye.length; ae++) he = ye[ae], de = i([], he.x, ue.c2p), ne = i([], he.y, ce.c2p), pe.push(h(de, ne, he.bicubic));
              var be = "M" + pe.join("L") + "Z";
              se.attr("id", ee._clipPathId), me.attr("d", be);
            }(F, z, M, P, I);
          });
        };
        var w = g.LINE_SPACING, k = (1 - g.MID_SHIFT) / w + 1;
        function S(A, C, D, L, E, P, I, M, O, T, z) {
          var F = [];
          I.title.text && F.push(I.title.text);
          var U = C.selectAll("text." + z).data(F), V = T.maxExtent;
          U.enter().append("text").classed(z, !0), U.each(function() {
            var $ = p(D, M, O, E, P);
            ["start", "both"].indexOf(I.showticklabels) === -1 && (V = 0);
            var q = I.title.font.size;
            V += q + I.title.offset;
            var K = (T.angle + (T.flip < 0 ? 180 : 0) - $.angle + 450) % 360, re = K > 90 && K < 270, Y = l.select(this);
            Y.text(I.title.text).call(_.convertToTspans, A), re && (V = (-_.lineCount(Y) + k) * w * q - V), Y.attr("transform", c($.p[0], $.p[1]) + f($.angle) + c(0, V)).attr("text-anchor", "middle").call(u.font, I.title.font);
          }), U.exit().remove();
        }
      }, 76842: function(o, s, n) {
        var l = n(45923), u = n(98813).findBin, i = n(57075), h = n(13828), p = n(39848), _ = n(41839);
        o.exports = function(d) {
          var f = d._a, c = d._b, g = f.length, m = c.length, x = d.aaxis, w = d.baxis, k = f[0], S = f[g - 1], A = c[0], C = c[m - 1], D = f[f.length - 1] - f[0], L = c[c.length - 1] - c[0], E = D * l.RELATIVE_CULL_TOLERANCE, P = L * l.RELATIVE_CULL_TOLERANCE;
          k -= E, S += E, A -= P, C += P, d.isVisible = function(I, M) {
            return I > k && I < S && M > A && M < C;
          }, d.isOccluded = function(I, M) {
            return I < k || I > S || M < A || M > C;
          }, d.setScale = function() {
            var I = d._x, M = d._y, O = i(d._xctrl, d._yctrl, I, M, x.smoothing, w.smoothing);
            d._xctrl = O[0], d._yctrl = O[1], d.evalxy = h([d._xctrl, d._yctrl], g, m, x.smoothing, w.smoothing), d.dxydi = p([d._xctrl, d._yctrl], x.smoothing, w.smoothing), d.dxydj = _([d._xctrl, d._yctrl], x.smoothing, w.smoothing);
          }, d.i2a = function(I) {
            var M = Math.max(0, Math.floor(I[0]), g - 2), O = I[0] - M;
            return (1 - O) * f[M] + O * f[M + 1];
          }, d.j2b = function(I) {
            var M = Math.max(0, Math.floor(I[1]), g - 2), O = I[1] - M;
            return (1 - O) * c[M] + O * c[M + 1];
          }, d.ij2ab = function(I) {
            return [d.i2a(I[0]), d.j2b(I[1])];
          }, d.a2i = function(I) {
            var M = Math.max(0, Math.min(u(I, f), g - 2)), O = f[M], T = f[M + 1];
            return Math.max(0, Math.min(g - 1, M + (I - O) / (T - O)));
          }, d.b2j = function(I) {
            var M = Math.max(0, Math.min(u(I, c), m - 2)), O = c[M], T = c[M + 1];
            return Math.max(0, Math.min(m - 1, M + (I - O) / (T - O)));
          }, d.ab2ij = function(I) {
            return [d.a2i(I[0]), d.b2j(I[1])];
          }, d.i2c = function(I, M) {
            return d.evalxy([], I, M);
          }, d.ab2xy = function(I, M, O) {
            if (!O && (I < f[0] || I > f[g - 1] | M < c[0] || M > c[m - 1])) return [!1, !1];
            var T = d.a2i(I), z = d.b2j(M), F = d.evalxy([], T, z);
            if (O) {
              var U, V, $, q, K = 0, re = 0, Y = [];
              I < f[0] ? (U = 0, V = 0, K = (I - f[0]) / (f[1] - f[0])) : I > f[g - 1] ? (U = g - 2, V = 1, K = (I - f[g - 1]) / (f[g - 1] - f[g - 2])) : V = T - (U = Math.max(0, Math.min(g - 2, Math.floor(T)))), M < c[0] ? ($ = 0, q = 0, re = (M - c[0]) / (c[1] - c[0])) : M > c[m - 1] ? ($ = m - 2, q = 1, re = (M - c[m - 1]) / (c[m - 1] - c[m - 2])) : q = z - ($ = Math.max(0, Math.min(m - 2, Math.floor(z)))), K && (d.dxydi(Y, U, $, V, q), F[0] += Y[0] * K, F[1] += Y[1] * K), re && (d.dxydj(Y, U, $, V, q), F[0] += Y[0] * re, F[1] += Y[1] * re);
            }
            return F;
          }, d.c2p = function(I, M, O) {
            return [M.c2p(I[0]), O.c2p(I[1])];
          }, d.p2x = function(I, M, O) {
            return [M.p2c(I[0]), O.p2c(I[1])];
          }, d.dadi = function(I) {
            var M = Math.max(0, Math.min(f.length - 2, I));
            return f[M + 1] - f[M];
          }, d.dbdj = function(I) {
            var M = Math.max(0, Math.min(c.length - 2, I));
            return c[M + 1] - c[M];
          }, d.dxyda = function(I, M, O, T) {
            var z = d.dxydi(null, I, M, O, T), F = d.dadi(I, O);
            return [z[0] / F, z[1] / F];
          }, d.dxydb = function(I, M, O, T) {
            var z = d.dxydj(null, I, M, O, T), F = d.dbdj(M, T);
            return [z[0] / F, z[1] / F];
          }, d.dxyda_rough = function(I, M, O) {
            var T = D * (O || 0.1), z = d.ab2xy(I + T, M, !0), F = d.ab2xy(I - T, M, !0);
            return [0.5 * (z[0] - F[0]) / T, 0.5 * (z[1] - F[1]) / T];
          }, d.dxydb_rough = function(I, M, O) {
            var T = L * (O || 0.1), z = d.ab2xy(I, M + T, !0), F = d.ab2xy(I, M - T, !0);
            return [0.5 * (z[0] - F[0]) / T, 0.5 * (z[1] - F[1]) / T];
          }, d.dpdx = function(I) {
            return I._m;
          }, d.dpdy = function(I) {
            return I._m;
          };
        };
      }, 13007: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i, h) {
          var p, _, d, f = [], c = [], g = u[0].length, m = u.length;
          function x(ee, X) {
            var Q, ue = 0, ce = 0;
            return ee > 0 && (Q = u[X][ee - 1]) !== void 0 && (ce++, ue += Q), ee < g - 1 && (Q = u[X][ee + 1]) !== void 0 && (ce++, ue += Q), X > 0 && (Q = u[X - 1][ee]) !== void 0 && (ce++, ue += Q), X < m - 1 && (Q = u[X + 1][ee]) !== void 0 && (ce++, ue += Q), ue / Math.max(1, ce);
          }
          var w, k, S, A, C, D, L, E, P, I, M, O = 0;
          for (p = 0; p < g; p++) for (_ = 0; _ < m; _++) u[_][p] === void 0 && (f.push(p), c.push(_), u[_][p] = x(p, _)), O = Math.max(O, Math.abs(u[_][p]));
          if (!f.length) return u;
          var T = 0, z = 0, F = f.length;
          do {
            for (T = 0, d = 0; d < F; d++) {
              p = f[d], _ = c[d];
              var U, V, $, q, K, re, Y = 0, te = 0;
              p === 0 ? ($ = i[K = Math.min(g - 1, 2)], q = i[1], U = u[_][K], te += (V = u[_][1]) + (V - U) * (i[0] - q) / (q - $), Y++) : p === g - 1 && ($ = i[K = Math.max(0, g - 3)], q = i[g - 2], U = u[_][K], te += (V = u[_][g - 2]) + (V - U) * (i[g - 1] - q) / (q - $), Y++), (p === 0 || p === g - 1) && _ > 0 && _ < m - 1 && (w = h[_ + 1] - h[_], te += ((k = h[_] - h[_ - 1]) * u[_ + 1][p] + w * u[_ - 1][p]) / (k + w), Y++), _ === 0 ? ($ = h[re = Math.min(m - 1, 2)], q = h[1], U = u[re][p], te += (V = u[1][p]) + (V - U) * (h[0] - q) / (q - $), Y++) : _ === m - 1 && ($ = h[re = Math.max(0, m - 3)], q = h[m - 2], U = u[re][p], te += (V = u[m - 2][p]) + (V - U) * (h[m - 1] - q) / (q - $), Y++), (_ === 0 || _ === m - 1) && p > 0 && p < g - 1 && (w = i[p + 1] - i[p], te += ((k = i[p] - i[p - 1]) * u[_][p + 1] + w * u[_][p - 1]) / (k + w), Y++), Y ? te /= Y : (S = i[p + 1] - i[p], A = i[p] - i[p - 1], E = (C = h[_ + 1] - h[_]) * (D = h[_] - h[_ - 1]) * (C + D), te = ((L = S * A * (S + A)) * (D * u[_ + 1][p] + C * u[_ - 1][p]) + E * (A * u[_][p + 1] + S * u[_][p - 1])) / (E * (A + S) + L * (D + C))), T += (I = (P = te - u[_][p]) / O) * I, M = Y ? 0 : 0.85, u[_][p] += P * (1 + M);
            }
            T = Math.sqrt(T);
          } while (z++ < 100 && T > 1e-5);
          return l.log("Smoother converged to", T, "after", z, "iterations"), u;
        };
      }, 10820: function(o, s, n) {
        var l = n(34809).isArray1D;
        o.exports = function(u, i, h) {
          var p = h("x"), _ = p && p.length, d = h("y"), f = d && d.length;
          if (!_ && !f) return !1;
          if (i._cheater = !p, _ && !l(p) || f && !l(d)) i._length = null;
          else {
            var c = _ ? p.length : 1 / 0;
            f && (c = Math.min(c, d.length)), i.a && i.a.length && (c = Math.min(c, i.a.length)), i.b && i.b.length && (c = Math.min(c, i.b.length)), i._length = c;
          }
          return !0;
        };
      }, 92802: function(o, s, n) {
        var l = n(3208).rb, u = n(6893), i = n(87163), h = n(9829), p = n(10229).defaultLine, _ = n(93049).extendFlat, d = u.marker.line;
        o.exports = _({ locations: { valType: "data_array", editType: "calc" }, locationmode: u.locationmode, z: { valType: "data_array", editType: "calc" }, geojson: _({}, u.geojson, {}), featureidkey: u.featureidkey, text: _({}, u.text, {}), hovertext: _({}, u.hovertext, {}), marker: { line: { color: _({}, d.color, { dflt: p }), width: _({}, d.width, { dflt: 1 }), editType: "calc" }, opacity: { valType: "number", arrayOk: !0, min: 0, max: 1, dflt: 1, editType: "style" }, editType: "calc" }, selected: { marker: { opacity: u.selected.marker.opacity, editType: "plot" }, editType: "plot" }, unselected: { marker: { opacity: u.unselected.marker.opacity, editType: "plot" }, editType: "plot" }, hoverinfo: _({}, h.hoverinfo, { editType: "calc", flags: ["location", "z", "text", "name"] }), hovertemplate: l(), showlegend: _({}, h.showlegend, { dflt: !1 }) }, i("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 12702: function(o, s, n) {
        var l = n(10721), u = n(63821).BADNUM, i = n(28379), h = n(99203), p = n(48861);
        function _(d) {
          return d && typeof d == "string";
        }
        o.exports = function(d, f) {
          var c, g = f._length, m = new Array(g);
          c = f.geojson ? function(A) {
            return _(A) || l(A);
          } : _;
          for (var x = 0; x < g; x++) {
            var w = m[x] = {}, k = f.locations[x], S = f.z[x];
            c(k) && l(S) ? (w.loc = k, w.z = S) : (w.loc = null, w.z = u), w.index = x;
          }
          return h(m, f), i(d, f, { vals: f.z, containerStr: "", cLetter: "z" }), p(m, f), m;
        };
      }, 51893: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(92802);
        o.exports = function(h, p, _, d) {
          function f(w, k) {
            return l.coerce(h, p, i, w, k);
          }
          var c = f("locations"), g = f("z");
          if (c && c.length && l.isArrayOrTypedArray(g) && g.length) {
            p._length = Math.min(c.length, g.length);
            var m, x = f("geojson");
            (typeof x == "string" && x !== "" || l.isPlainObject(x)) && (m = "geojson-id"), f("locationmode", m) === "geojson-id" && f("featureidkey"), f("text"), f("hovertext"), f("hovertemplate"), f("marker.line.width") && f("marker.line.color"), f("marker.opacity"), u(h, p, d, f, { prefix: "", cLetter: "z" }), l.coerceSelectionMarkerOpacity(p, f);
          } else p.visible = !1;
        };
      }, 38414: function(o) {
        o.exports = function(s, n, l, u, i) {
          s.location = n.location, s.z = n.z;
          var h = u[i];
          return h.fIn && h.fIn.properties && (s.properties = h.fIn.properties), s.ct = h.ct, s;
        };
      }, 94125: function(o, s, n) {
        var l = n(29714), u = n(92802), i = n(34809).fillText;
        o.exports = function(h, p, _) {
          var d, f, c, g, m = h.cd, x = m[0].trace, w = h.subplot, k = [p, _], S = [p + 360, _];
          for (f = 0; f < m.length; f++) if (g = !1, (d = m[f])._polygons) {
            for (c = 0; c < d._polygons.length; c++) d._polygons[c].contains(k) && (g = !g), d._polygons[c].contains(S) && (g = !g);
            if (g) break;
          }
          if (g && d) return h.x0 = h.x1 = h.xa.c2p(d.ct), h.y0 = h.y1 = h.ya.c2p(d.ct), h.index = d.index, h.location = d.loc, h.z = d.z, h.zLabel = l.tickText(w.mockAxis, w.mockAxis.c2l(d.z), "hover").text, h.hovertemplate = d.hovertemplate, function(A, C, D) {
            if (!C.hovertemplate) {
              var L = D.hi || C.hoverinfo, E = String(D.loc), P = L === "all" ? u.hoverinfo.flags : L.split("+"), I = P.indexOf("name") !== -1, M = P.indexOf("location") !== -1, O = P.indexOf("z") !== -1, T = P.indexOf("text") !== -1, z = [];
              !I && M ? A.nameOverride = E : (I && (A.nameOverride = C.name), M && z.push(E)), O && z.push(A.zLabel), T && i(D, C, z), A.extraText = z.join("<br>");
            }
          }(h, x, d), [h];
        };
      }, 58075: function(o, s, n) {
        o.exports = { attributes: n(92802), supplyDefaults: n(51893), colorbar: n(12431), calc: n(12702), calcGeoJSON: n(4700).calcGeoJSON, plot: n(4700).plot, style: n(59342).style, styleOnSelect: n(59342).styleOnSelect, hoverPoints: n(94125), eventData: n(38414), selectPoints: n(43727), moduleType: "trace", name: "choropleth", basePlotModule: n(47544), categories: ["geo", "noOpacity", "showLegend"], meta: {} };
      }, 4700: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(3994), h = n(11577).getTopojsonFeatures, p = n(32919).findExtremes, _ = n(59342).style;
        o.exports = { calcGeoJSON: function(d, f) {
          for (var c = d[0].trace, g = f[c.geo], m = g._subplot, x = c.locationmode, w = c._length, k = x === "geojson-id" ? i.extractTraceFeature(d) : h(c, m.topojson), S = [], A = [], C = 0; C < w; C++) {
            var D = d[C], L = x === "geojson-id" ? D.fOut : i.locationToFeature(x, D.loc, k);
            if (L) {
              D.geojson = L, D.ct = L.properties.ct, D._polygons = i.feature2polygons(L);
              var E = i.computeBbox(L);
              S.push(E[0], E[2]), A.push(E[1], E[3]);
            } else D.geojson = null;
          }
          if (g.fitbounds === "geojson" && x === "geojson-id") {
            var P = i.computeBbox(i.getTraceGeojson(c));
            S = [P[0], P[2]], A = [P[1], P[3]];
          }
          var I = { padded: !0 };
          c._extremes.lon = p(g.lonaxis._ax, S, I), c._extremes.lat = p(g.lataxis._ax, A, I);
        }, plot: function(d, f, c) {
          var g = f.layers.backplot.select(".choroplethlayer");
          u.makeTraceGroups(g, c, "trace choropleth").each(function(m) {
            var x = l.select(this).selectAll("path.choroplethlocation").data(u.identity);
            x.enter().append("path").classed("choroplethlocation", !0), x.exit().remove(), _(d, m);
          });
        } };
      }, 43727: function(o) {
        o.exports = function(s, n) {
          var l, u, i, h, p, _ = s.cd, d = s.xaxis, f = s.yaxis, c = [];
          if (n === !1) for (l = 0; l < _.length; l++) _[l].selected = 0;
          else for (l = 0; l < _.length; l++) (i = (u = _[l]).ct) && (h = d.c2p(i), p = f.c2p(i), n.contains([h, p], null, l, s) ? (c.push({ pointNumber: l, lon: i[0], lat: i[1] }), u.selected = 1) : u.selected = 0);
          return c;
        };
      }, 59342: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(62203), h = n(88856);
        function p(_, d) {
          var f = d[0].trace, c = d[0].node3.selectAll(".choroplethlocation"), g = f.marker || {}, m = g.line || {}, x = h.makeColorScaleFuncFromTrace(f);
          c.each(function(w) {
            l.select(this).attr("fill", x(w.z)).call(u.stroke, w.mlc || m.color).call(i.dashLine, "", w.mlw || m.width || 0).style("opacity", g.opacity);
          }), i.selectedPointStyle(c, f);
        }
        o.exports = { style: function(_, d) {
          d && p(0, d);
        }, styleOnSelect: function(_, d) {
          var f = d[0].node3, c = d[0].trace;
          c.selectedpoints ? i.selectedPointStyle(f.selectAll(".choroplethlocation"), c) : p(0, d);
        } };
      }, 34770: function(o, s, n) {
        var l = n(92802), u = n(87163), i = n(3208).rb, h = n(9829), p = n(93049).extendFlat;
        o.exports = p({ locations: { valType: "data_array", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, geojson: { valType: "any", editType: "calc" }, featureidkey: p({}, l.featureidkey, {}), below: { valType: "string", editType: "plot" }, text: l.text, hovertext: l.hovertext, marker: { line: { color: p({}, l.marker.line.color, { editType: "plot" }), width: p({}, l.marker.line.width, { editType: "plot" }), editType: "calc" }, opacity: p({}, l.marker.opacity, { editType: "plot" }), editType: "calc" }, selected: { marker: { opacity: p({}, l.selected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, unselected: { marker: { opacity: p({}, l.unselected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, hoverinfo: l.hoverinfo, hovertemplate: i({}, { keys: ["properties"] }), showlegend: p({}, h.showlegend, { dflt: !1 }) }, u("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 40980: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(88856), h = n(62203), p = n(39532).makeBlank, _ = n(3994);
        function d(f) {
          var c, g = f[0].trace, m = g._opts;
          if (g.selectedpoints) {
            for (var x = h.makeSelectedPointStyleFns(g), w = 0; w < f.length; w++) {
              var k = f[w];
              k.fOut && (k.fOut.properties.mo2 = x.selectedOpacityFn(k));
            }
            c = { type: "identity", property: "mo2" };
          } else c = u.isArrayOrTypedArray(g.marker.opacity) ? { type: "identity", property: "mo" } : g.marker.opacity;
          return u.extendFlat(m.fill.paint, { "fill-opacity": c }), u.extendFlat(m.line.paint, { "line-opacity": c }), m;
        }
        o.exports = { convert: function(f) {
          var c = f[0].trace, g = c.visible === !0 && c._length !== 0, m = { layout: { visibility: "none" }, paint: {} }, x = { layout: { visibility: "none" }, paint: {} }, w = c._opts = { fill: m, line: x, geojson: p() };
          if (!g) return w;
          var k = _.extractTraceFeature(f);
          if (!k) return w;
          var S, A, C, D = i.makeColorScaleFuncFromTrace(c), L = c.marker, E = L.line || {};
          u.isArrayOrTypedArray(L.opacity) && (S = function(z) {
            var F = z.mo;
            return l(F) ? +u.constrain(F, 0, 1) : 0;
          }), u.isArrayOrTypedArray(E.color) && (A = function(z) {
            return z.mlc;
          }), u.isArrayOrTypedArray(E.width) && (C = function(z) {
            return z.mlw;
          });
          for (var P = 0; P < f.length; P++) {
            var I = f[P], M = I.fOut;
            if (M) {
              var O = M.properties;
              O.fc = D(I.z), S && (O.mo = S(I)), A && (O.mlc = A(I)), C && (O.mlw = C(I)), I.ct = O.ct, I._polygons = _.feature2polygons(M);
            }
          }
          var T = S ? { type: "identity", property: "mo" } : L.opacity;
          return u.extendFlat(m.paint, { "fill-color": { type: "identity", property: "fc" }, "fill-opacity": T }), u.extendFlat(x.paint, { "line-color": A ? { type: "identity", property: "mlc" } : E.color, "line-width": C ? { type: "identity", property: "mlw" } : E.width, "line-opacity": T }), m.layout.visibility = "visible", x.layout.visibility = "visible", w.geojson = { type: "FeatureCollection", features: k }, d(f), w;
        }, convertOnSelect: d };
      }, 94149: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(34770);
        o.exports = function(h, p, _, d) {
          function f(x, w) {
            return l.coerce(h, p, i, x, w);
          }
          var c = f("locations"), g = f("z"), m = f("geojson");
          l.isArrayOrTypedArray(c) && c.length && l.isArrayOrTypedArray(g) && g.length && (typeof m == "string" && m !== "" || l.isPlainObject(m)) ? (f("featureidkey"), p._length = Math.min(c.length, g.length), f("below"), f("text"), f("hovertext"), f("hovertemplate"), f("marker.line.width") && f("marker.line.color"), f("marker.opacity"), u(h, p, d, f, { prefix: "", cLetter: "z" }), l.coerceSelectionMarkerOpacity(p, f)) : p.visible = !1;
        };
      }, 9419: function(o, s, n) {
        o.exports = { attributes: n(34770), supplyDefaults: n(94149), colorbar: n(12431), calc: n(12702), plot: n(30316), hoverPoints: n(94125), eventData: n(38414), selectPoints: n(43727), styleOnSelect: function(l, u) {
          u && u[0].trace._glTrace.updateOnSelect(u);
        }, getBelow: function(l, u) {
          for (var i = u.getMapLayers(), h = i.length - 2; h >= 0; h--) {
            var p = i[h].id;
            if (typeof p == "string" && p.indexOf("water") === 0) {
              for (var _ = h + 1; _ < i.length; _++) if (typeof (p = i[_].id) == "string" && p.indexOf("plotly-") === -1) return p;
            }
          }
        }, moduleType: "trace", name: "choroplethmap", basePlotModule: n(34091), categories: ["map", "gl", "noOpacity", "showLegend"], meta: { hr_name: "choropleth_map" } };
      }, 30316: function(o, s, n) {
        var l = n(40980).convert, u = n(40980).convertOnSelect, i = n(8814).traceLayerPrefix;
        function h(_, d) {
          this.type = "choroplethmap", this.subplot = _, this.uid = d, this.sourceId = "source-" + d, this.layerList = [["fill", i + d + "-fill"], ["line", i + d + "-line"]], this.below = null;
        }
        var p = h.prototype;
        p.update = function(_) {
          this._update(l(_)), _[0].trace._glTrace = this;
        }, p.updateOnSelect = function(_) {
          this._update(u(_));
        }, p._update = function(_) {
          var d = this.subplot, f = this.layerList, c = d.belowLookup["trace-" + this.uid];
          d.map.getSource(this.sourceId).setData(_.geojson), c !== this.below && (this._removeLayers(), this._addLayers(_, c), this.below = c);
          for (var g = 0; g < f.length; g++) {
            var m = f[g], x = m[0], w = m[1], k = _[x];
            d.setOptions(w, "setLayoutProperty", k.layout), k.layout.visibility === "visible" && d.setOptions(w, "setPaintProperty", k.paint);
          }
        }, p._addLayers = function(_, d) {
          for (var f = this.subplot, c = this.layerList, g = this.sourceId, m = 0; m < c.length; m++) {
            var x = c[m], w = x[0], k = _[w];
            f.addLayer({ type: w, id: x[1], source: g, layout: k.layout, paint: k.paint }, d);
          }
        }, p._removeLayers = function() {
          for (var _ = this.subplot.map, d = this.layerList, f = d.length - 1; f >= 0; f--) _.removeLayer(d[f][1]);
        }, p.dispose = function() {
          var _ = this.subplot.map;
          this._removeLayers(), _.removeSource(this.sourceId);
        }, o.exports = function(_, d) {
          var f = d[0].trace, c = new h(_, f.uid), g = c.sourceId, m = l(d), x = c.below = _.belowLookup["trace-" + f.uid];
          return _.map.addSource(g, { type: "geojson", data: m.geojson }), c._addLayers(m, x), d[0].trace._glTrace = c, c;
        };
      }, 86227: function(o, s, n) {
        var l = n(92802), u = n(87163), i = n(3208).rb, h = n(9829), p = n(93049).extendFlat;
        o.exports = p({ locations: { valType: "data_array", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, geojson: { valType: "any", editType: "calc" }, featureidkey: p({}, l.featureidkey, {}), below: { valType: "string", editType: "plot" }, text: l.text, hovertext: l.hovertext, marker: { line: { color: p({}, l.marker.line.color, { editType: "plot" }), width: p({}, l.marker.line.width, { editType: "plot" }), editType: "calc" }, opacity: p({}, l.marker.opacity, { editType: "plot" }), editType: "calc" }, selected: { marker: { opacity: p({}, l.selected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, unselected: { marker: { opacity: p({}, l.unselected.marker.opacity, { editType: "plot" }), editType: "plot" }, editType: "plot" }, hoverinfo: l.hoverinfo, hovertemplate: i({}, { keys: ["properties"] }), showlegend: p({}, h.showlegend, { dflt: !1 }) }, u("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 51335: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(88856), h = n(62203), p = n(39532).makeBlank, _ = n(3994);
        function d(f) {
          var c, g = f[0].trace, m = g._opts;
          if (g.selectedpoints) {
            for (var x = h.makeSelectedPointStyleFns(g), w = 0; w < f.length; w++) {
              var k = f[w];
              k.fOut && (k.fOut.properties.mo2 = x.selectedOpacityFn(k));
            }
            c = { type: "identity", property: "mo2" };
          } else c = u.isArrayOrTypedArray(g.marker.opacity) ? { type: "identity", property: "mo" } : g.marker.opacity;
          return u.extendFlat(m.fill.paint, { "fill-opacity": c }), u.extendFlat(m.line.paint, { "line-opacity": c }), m;
        }
        o.exports = { convert: function(f) {
          var c = f[0].trace, g = c.visible === !0 && c._length !== 0, m = { layout: { visibility: "none" }, paint: {} }, x = { layout: { visibility: "none" }, paint: {} }, w = c._opts = { fill: m, line: x, geojson: p() };
          if (!g) return w;
          var k = _.extractTraceFeature(f);
          if (!k) return w;
          var S, A, C, D = i.makeColorScaleFuncFromTrace(c), L = c.marker, E = L.line || {};
          u.isArrayOrTypedArray(L.opacity) && (S = function(z) {
            var F = z.mo;
            return l(F) ? +u.constrain(F, 0, 1) : 0;
          }), u.isArrayOrTypedArray(E.color) && (A = function(z) {
            return z.mlc;
          }), u.isArrayOrTypedArray(E.width) && (C = function(z) {
            return z.mlw;
          });
          for (var P = 0; P < f.length; P++) {
            var I = f[P], M = I.fOut;
            if (M) {
              var O = M.properties;
              O.fc = D(I.z), S && (O.mo = S(I)), A && (O.mlc = A(I)), C && (O.mlw = C(I)), I.ct = O.ct, I._polygons = _.feature2polygons(M);
            }
          }
          var T = S ? { type: "identity", property: "mo" } : L.opacity;
          return u.extendFlat(m.paint, { "fill-color": { type: "identity", property: "fc" }, "fill-opacity": T }), u.extendFlat(x.paint, { "line-color": A ? { type: "identity", property: "mlc" } : E.color, "line-width": C ? { type: "identity", property: "mlw" } : E.width, "line-opacity": T }), m.layout.visibility = "visible", x.layout.visibility = "visible", w.geojson = { type: "FeatureCollection", features: k }, d(f), w;
        }, convertOnSelect: d };
      }, 8244: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(86227);
        o.exports = function(h, p, _, d) {
          function f(x, w) {
            return l.coerce(h, p, i, x, w);
          }
          var c = f("locations"), g = f("z"), m = f("geojson");
          l.isArrayOrTypedArray(c) && c.length && l.isArrayOrTypedArray(g) && g.length && (typeof m == "string" && m !== "" || l.isPlainObject(m)) ? (f("featureidkey"), p._length = Math.min(c.length, g.length), f("below"), f("text"), f("hovertext"), f("hovertemplate"), f("marker.line.width") && f("marker.line.color"), f("marker.opacity"), u(h, p, d, f, { prefix: "", cLetter: "z" }), l.coerceSelectionMarkerOpacity(p, f)) : p.visible = !1;
        };
      }, 28128: function(o, s, n) {
        o.exports = { attributes: n(86227), supplyDefaults: n(8244), colorbar: n(12431), calc: n(12702), plot: n(33501), hoverPoints: n(94125), eventData: n(38414), selectPoints: n(43727), styleOnSelect: function(l, u) {
          u && u[0].trace._glTrace.updateOnSelect(u);
        }, getBelow: function(l, u) {
          for (var i = u.getMapLayers(), h = i.length - 2; h >= 0; h--) {
            var p = i[h].id;
            if (typeof p == "string" && p.indexOf("water") === 0) {
              for (var _ = h + 1; _ < i.length; _++) if (typeof (p = i[_].id) == "string" && p.indexOf("plotly-") === -1) return p;
            }
          }
        }, moduleType: "trace", name: "choroplethmapbox", basePlotModule: n(68192), categories: ["mapbox", "gl", "noOpacity", "showLegend"], meta: { hr_name: "choropleth_mapbox" } };
      }, 33501: function(o, s, n) {
        var l = n(51335).convert, u = n(51335).convertOnSelect, i = n(44245).traceLayerPrefix;
        function h(_, d) {
          this.type = "choroplethmapbox", this.subplot = _, this.uid = d, this.sourceId = "source-" + d, this.layerList = [["fill", i + d + "-fill"], ["line", i + d + "-line"]], this.below = null;
        }
        var p = h.prototype;
        p.update = function(_) {
          this._update(l(_)), _[0].trace._glTrace = this;
        }, p.updateOnSelect = function(_) {
          this._update(u(_));
        }, p._update = function(_) {
          var d = this.subplot, f = this.layerList, c = d.belowLookup["trace-" + this.uid];
          d.map.getSource(this.sourceId).setData(_.geojson), c !== this.below && (this._removeLayers(), this._addLayers(_, c), this.below = c);
          for (var g = 0; g < f.length; g++) {
            var m = f[g], x = m[0], w = m[1], k = _[x];
            d.setOptions(w, "setLayoutProperty", k.layout), k.layout.visibility === "visible" && d.setOptions(w, "setPaintProperty", k.paint);
          }
        }, p._addLayers = function(_, d) {
          for (var f = this.subplot, c = this.layerList, g = this.sourceId, m = 0; m < c.length; m++) {
            var x = c[m], w = x[0], k = _[w];
            f.addLayer({ type: w, id: x[1], source: g, layout: k.layout, paint: k.paint }, d);
          }
        }, p._removeLayers = function() {
          for (var _ = this.subplot.map, d = this.layerList, f = d.length - 1; f >= 0; f--) _.removeLayer(d[f][1]);
        }, p.dispose = function() {
          var _ = this.subplot.map;
          this._removeLayers(), _.removeSource(this.sourceId);
        }, o.exports = function(_, d) {
          var f = d[0].trace, c = new h(_, f.uid), g = c.sourceId, m = l(d), x = c.below = _.belowLookup["trace-" + f.uid];
          return _.map.addSource(g, { type: "geojson", data: m.geojson }), c._addLayers(m, x), d[0].trace._glTrace = c, c;
        };
      }, 49865: function(o, s, n) {
        var l = n(87163), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(42450), p = n(9829), _ = n(93049).extendFlat, d = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, u: { valType: "data_array", editType: "calc" }, v: { valType: "data_array", editType: "calc" }, w: { valType: "data_array", editType: "calc" }, sizemode: { valType: "enumerated", values: ["scaled", "absolute", "raw"], editType: "calc", dflt: "scaled" }, sizeref: { valType: "number", editType: "calc", min: 0 }, anchor: { valType: "enumerated", editType: "calc", values: ["tip", "tail", "cm", "center"], dflt: "cm" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertemplate: i({ editType: "calc" }, { keys: ["norm"] }), uhoverformat: u("u", 1), vhoverformat: u("v", 1), whoverformat: u("w", 1), xhoverformat: u("x"), yhoverformat: u("y"), zhoverformat: u("z"), showlegend: _({}, p.showlegend, { dflt: !1 }) };
        _(d, l("", { colorAttr: "u/v/w norm", showScaleDflt: !0, editTypeOverride: "calc" })), ["opacity", "lightposition", "lighting"].forEach(function(f) {
          d[f] = h[f];
        }), d.hoverinfo = _({}, p.hoverinfo, { editType: "calc", flags: ["x", "y", "z", "u", "v", "w", "norm", "text", "name"], dflt: "x+y+z+norm+text+name" }), d.transforms = void 0, o.exports = d;
      }, 93805: function(o, s, n) {
        var l = n(28379);
        o.exports = function(u, i) {
          for (var h = i.u, p = i.v, _ = i.w, d = Math.min(i.x.length, i.y.length, i.z.length, h.length, p.length, _.length), f = -1 / 0, c = 1 / 0, g = 0; g < d; g++) {
            var m = h[g], x = p[g], w = _[g], k = Math.sqrt(m * m + x * x + w * w);
            f = Math.max(f, k), c = Math.min(c, k);
          }
          i._len = d, i._normMax = f, l(u, i, { vals: [c, f], containerStr: "", cLetter: "c" });
        };
      }, 49393: function(o, s, n) {
        var l = n(99098).gl_cone3d, u = n(99098).gl_cone3d.createConeMesh, i = n(34809).simpleMap, h = n(46998).parseColorScale, p = n(88856).extractOpts, _ = n(34809).isArrayOrTypedArray, d = n(88239);
        function f(k, S) {
          this.scene = k, this.uid = S, this.mesh = null, this.data = null;
        }
        var c = f.prototype;
        c.handlePick = function(k) {
          if (k.object === this.mesh) {
            var S = k.index = k.data.index, A = this.data.x[S], C = this.data.y[S], D = this.data.z[S], L = this.data.u[S], E = this.data.v[S], P = this.data.w[S];
            k.traceCoordinate = [A, C, D, L, E, P, Math.sqrt(L * L + E * E + P * P)];
            var I = this.data.hovertext || this.data.text;
            return _(I) && I[S] !== void 0 ? k.textLabel = I[S] : I && (k.textLabel = I), !0;
          }
        };
        var g = { xaxis: 0, yaxis: 1, zaxis: 2 }, m = { tip: 1, tail: 0, cm: 0.25, center: 0.5 }, x = { tip: 1, tail: 1, cm: 0.75, center: 0.5 };
        function w(k, S) {
          var A = k.fullSceneLayout, C = k.dataScale, D = {};
          function L(O, T) {
            var z = A[T], F = C[g[T]];
            return i(O, function(U) {
              return z.d2l(U) * F;
            });
          }
          D.vectors = d(L(S.u, "xaxis"), L(S.v, "yaxis"), L(S.w, "zaxis"), S._len), D.positions = d(L(S.x, "xaxis"), L(S.y, "yaxis"), L(S.z, "zaxis"), S._len);
          var E = p(S);
          D.colormap = h(S), D.vertexIntensityBounds = [E.min / S._normMax, E.max / S._normMax], D.coneOffset = m[S.anchor];
          var P = S.sizemode;
          P === "scaled" ? D.coneSize = S.sizeref || 0.5 : P === "absolute" ? D.coneSize = S.sizeref && S._normMax ? S.sizeref / S._normMax : 0.5 : P === "raw" && (D.coneSize = S.sizeref), D.coneSizemode = P;
          var I = l(D), M = S.lightposition;
          return I.lightPosition = [M.x, M.y, M.z], I.ambient = S.lighting.ambient, I.diffuse = S.lighting.diffuse, I.specular = S.lighting.specular, I.roughness = S.lighting.roughness, I.fresnel = S.lighting.fresnel, I.opacity = S.opacity, S._pad = x[S.anchor] * I.vectorScale * I.coneScale * S._normMax, I;
        }
        c.update = function(k) {
          this.data = k;
          var S = w(this.scene, k);
          this.mesh.update(S);
        }, c.dispose = function() {
          this.scene.glplot.remove(this.mesh), this.mesh.dispose();
        }, o.exports = function(k, S) {
          var A = k.glplot.gl, C = w(k, S), D = u(A, C), L = new f(k, S.uid);
          return L.mesh = D, L.data = S, D._trace = L, k.glplot.add(D), L;
        };
      }, 17326: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(49865);
        o.exports = function(h, p, _, d) {
          function f(A, C) {
            return l.coerce(h, p, i, A, C);
          }
          var c = f("u"), g = f("v"), m = f("w"), x = f("x"), w = f("y"), k = f("z");
          if (c && c.length && g && g.length && m && m.length && x && x.length && w && w.length && k && k.length) {
            var S = f("sizemode");
            f("sizeref", S === "raw" ? 1 : 0.5), f("anchor"), f("lighting.ambient"), f("lighting.diffuse"), f("lighting.specular"), f("lighting.roughness"), f("lighting.fresnel"), f("lightposition.x"), f("lightposition.y"), f("lightposition.z"), u(h, p, d, f, { prefix: "", cLetter: "c" }), f("text"), f("hovertext"), f("hovertemplate"), f("uhoverformat"), f("vhoverformat"), f("whoverformat"), f("xhoverformat"), f("yhoverformat"), f("zhoverformat"), p._length = null;
          } else p.visible = !1;
        };
      }, 47050: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "cone", basePlotModule: n(2487), categories: ["gl3d", "showLegend"], attributes: n(49865), supplyDefaults: n(17326), colorbar: { min: "cmin", max: "cmax" }, calc: n(93805), plot: n(49393), eventData: function(l, u) {
          return l.norm = u.traceCoordinate[6], l;
        }, meta: {} };
      }, 52240: function(o, s, n) {
        var l = n(81658), u = n(36640), i = n(80712), h = i.axisHoverFormat, p = i.descriptionOnlyNumbers, _ = n(87163), d = n(94850).T, f = n(80337), c = n(93049).extendFlat, g = n(20726), m = g.COMPARISON_OPS2, x = g.INTERVAL_OPS, w = u.line;
        o.exports = c({ z: l.z, x: l.x, x0: l.x0, dx: l.dx, y: l.y, y0: l.y0, dy: l.dy, xperiod: l.xperiod, yperiod: l.yperiod, xperiod0: u.xperiod0, yperiod0: u.yperiod0, xperiodalignment: l.xperiodalignment, yperiodalignment: l.yperiodalignment, text: l.text, hovertext: l.hovertext, transpose: l.transpose, xtype: l.xtype, ytype: l.ytype, xhoverformat: h("x"), yhoverformat: h("y"), zhoverformat: h("z", 1), hovertemplate: l.hovertemplate, texttemplate: c({}, l.texttemplate, {}), textfont: c({}, l.textfont, {}), hoverongaps: l.hoverongaps, connectgaps: c({}, l.connectgaps, {}), fillcolor: { valType: "color", editType: "calc" }, autocontour: { valType: "boolean", dflt: !0, editType: "calc", impliedEdits: { "contours.start": void 0, "contours.end": void 0, "contours.size": void 0 } }, ncontours: { valType: "integer", dflt: 15, min: 1, editType: "calc" }, contours: { type: { valType: "enumerated", values: ["levels", "constraint"], dflt: "levels", editType: "calc" }, start: { valType: "number", dflt: null, editType: "plot", impliedEdits: { "^autocontour": !1 } }, end: { valType: "number", dflt: null, editType: "plot", impliedEdits: { "^autocontour": !1 } }, size: { valType: "number", dflt: null, min: 0, editType: "plot", impliedEdits: { "^autocontour": !1 } }, coloring: { valType: "enumerated", values: ["fill", "heatmap", "lines", "none"], dflt: "fill", editType: "calc" }, showlines: { valType: "boolean", dflt: !0, editType: "plot" }, showlabels: { valType: "boolean", dflt: !1, editType: "plot" }, labelfont: f({ editType: "plot", colorEditType: "style" }), labelformat: { valType: "string", dflt: "", editType: "plot", description: p("contour label") }, operation: { valType: "enumerated", values: [].concat(m).concat(x), dflt: "=", editType: "calc" }, value: { valType: "any", dflt: 0, editType: "calc" }, editType: "calc", impliedEdits: { autocontour: !1 } }, line: { color: c({}, w.color, { editType: "style+colorbars" }), width: { valType: "number", min: 0, editType: "style+colorbars" }, dash: d, smoothing: c({}, w.smoothing, {}), editType: "plot" }, zorder: u.zorder }, _("", { cLetter: "z", autoColorDflt: !1, editTypeOverride: "calc" }));
      }, 40352: function(o, s, n) {
        var l = n(88856), u = n(51670), i = n(62475), h = n(48715);
        o.exports = function(p, _) {
          var d = u(p, _), f = d[0].z;
          i(_, f);
          var c, g = _.contours, m = l.extractOpts(_);
          if (g.coloring === "heatmap" && m.auto && _.autocontour === !1) {
            var x = g.start, w = h(g), k = g.size || 1, S = Math.floor((w - x) / k) + 1;
            isFinite(k) || (k = 1, S = 1);
            var A = x - k / 2;
            c = [A, A + S * k];
          } else c = f;
          return l.calc(p, _, { vals: c, cLetter: "z" }), d;
        };
      }, 49886: function(o) {
        o.exports = function(s, n) {
          var l, u = s[0], i = u.z;
          switch (n.type) {
            case "levels":
              var h = Math.min(i[0][0], i[0][1]);
              for (l = 0; l < s.length; l++) {
                var p = s[l];
                p.prefixBoundary = !p.edgepaths.length && (h > p.level || p.starts.length && h === p.level);
              }
              break;
            case "constraint":
              if (u.prefixBoundary = !1, u.edgepaths.length) return;
              var _ = u.x.length, d = u.y.length, f = -1 / 0, c = 1 / 0;
              for (l = 0; l < d; l++) c = Math.min(c, i[l][0]), c = Math.min(c, i[l][_ - 1]), f = Math.max(f, i[l][0]), f = Math.max(f, i[l][_ - 1]);
              for (l = 1; l < _ - 1; l++) c = Math.min(c, i[0][l]), c = Math.min(c, i[d - 1][l]), f = Math.max(f, i[0][l]), f = Math.max(f, i[d - 1][l]);
              var g, m, x = n.value;
              switch (n._operation) {
                case ">":
                  x > f && (u.prefixBoundary = !0);
                  break;
                case "<":
                  (x < c || u.starts.length && x === c) && (u.prefixBoundary = !0);
                  break;
                case "[]":
                  g = Math.min(x[0], x[1]), ((m = Math.max(x[0], x[1])) < c || g > f || u.starts.length && m === c) && (u.prefixBoundary = !0);
                  break;
                case "][":
                  g = Math.min(x[0], x[1]), m = Math.max(x[0], x[1]), g < c && m > f && (u.prefixBoundary = !0);
              }
          }
        };
      }, 92697: function(o, s, n) {
        var l = n(88856), u = n(16438), i = n(48715);
        o.exports = { min: "zmin", max: "zmax", calc: function(h, p, _) {
          var d = p.contours, f = p.line, c = d.size || 1, g = d.coloring, m = u(p, { isColorbar: !0 });
          if (g === "heatmap") {
            var x = l.extractOpts(p);
            _._fillgradient = x.reversescale ? l.flipScale(x.colorscale) : x.colorscale, _._zrange = [x.min, x.max];
          } else g === "fill" && (_._fillcolor = m);
          _._line = { color: g === "lines" ? m : f.color, width: d.showlines !== !1 ? f.width : 0, dash: f.dash }, _._levels = { start: d.start, end: i(d), size: c };
        } };
      }, 53156: function(o) {
        o.exports = { BOTTOMSTART: [1, 9, 13, 104, 713], TOPSTART: [4, 6, 7, 104, 713], LEFTSTART: [8, 12, 14, 208, 1114], RIGHTSTART: [2, 3, 11, 208, 1114], NEWDELTA: [null, [-1, 0], [0, -1], [-1, 0], [1, 0], null, [0, -1], [-1, 0], [0, 1], [0, 1], null, [0, 1], [1, 0], [1, 0], [0, -1]], CHOOSESADDLE: { 104: [4, 1], 208: [2, 8], 713: [7, 13], 1114: [11, 14] }, SADDLEREMAINDER: { 1: 4, 2: 8, 4: 1, 7: 13, 8: 2, 11: 14, 13: 7, 14: 11 }, LABELDISTANCE: 2, LABELINCREASE: 10, LABELMIN: 3, LABELMAX: 10, LABELOPTIMIZER: { EDGECOST: 1, ANGLECOST: 1, NEIGHBORCOST: 5, SAMELEVELFACTOR: 10, SAMELEVELDISTANCE: 5, MAXCOST: 100, INITIALSEARCHPOINTS: 10, ITERATIONS: 5 } };
      }, 29503: function(o, s, n) {
        var l = n(10721), u = n(20576), i = n(78766), h = i.addOpacity, p = i.opacity, _ = n(20726), d = n(34809).isArrayOrTypedArray, f = _.CONSTRAINT_REDUCTION, c = _.COMPARISON_OPS2;
        o.exports = function(g, m, x, w, k, S) {
          var A, C, D, L = m.contours, E = x("contours.operation");
          L._operation = f[E], function(P, I) {
            var M;
            c.indexOf(I.operation) === -1 ? (P("contours.value", [0, 1]), d(I.value) ? I.value.length > 2 ? I.value = I.value.slice(2) : I.length === 0 ? I.value = [0, 1] : I.length < 2 ? (M = parseFloat(I.value[0]), I.value = [M, M + 1]) : I.value = [parseFloat(I.value[0]), parseFloat(I.value[1])] : l(I.value) && (M = parseFloat(I.value), I.value = [M, M + 1])) : (P("contours.value", 0), l(I.value) || (d(I.value) ? I.value = parseFloat(I.value[0]) : I.value = 0));
          }(x, L), E === "=" ? A = L.showlines = !0 : (A = x("contours.showlines"), D = x("fillcolor", h((g.line || {}).color || k, 0.5))), A && (C = x("line.color", D && p(D) ? h(m.fillcolor, 1) : k), x("line.width", 2), x("line.dash")), x("line.smoothing"), u(x, w, C, S);
        };
      }, 22783: function(o, s, n) {
        var l = n(20726), u = n(10721);
        function i(_, d) {
          var f, c = Array.isArray(d);
          function g(m) {
            return u(m) ? +m : null;
          }
          return l.COMPARISON_OPS2.indexOf(_) !== -1 ? f = g(c ? d[0] : d) : l.INTERVAL_OPS.indexOf(_) !== -1 ? f = c ? [g(d[0]), g(d[1])] : [g(d), g(d)] : l.SET_OPS.indexOf(_) !== -1 && (f = c ? d.map(g) : [g(d)]), f;
        }
        function h(_) {
          return function(d) {
            d = i(_, d);
            var f = Math.min(d[0], d[1]), c = Math.max(d[0], d[1]);
            return { start: f, end: c, size: c - f };
          };
        }
        function p(_) {
          return function(d) {
            return { start: d = i(_, d), end: 1 / 0, size: 1 / 0 };
          };
        }
        o.exports = { "[]": h("[]"), "][": h("]["), ">": p(">"), "<": p("<"), "=": p("=") };
      }, 47495: function(o) {
        o.exports = function(s, n, l, u) {
          var i = u("contours.start"), h = u("contours.end"), p = i === !1 || h === !1, _ = l("contours.size");
          !(p ? n.autocontour = !0 : l("autocontour", !1)) && _ || l("ncontours");
        };
      }, 1999: function(o, s, n) {
        var l = n(34809);
        function u(i) {
          return l.extendFlat({}, i, { edgepaths: l.extendDeep([], i.edgepaths), paths: l.extendDeep([], i.paths), starts: l.extendDeep([], i.starts) });
        }
        o.exports = function(i, h) {
          var p, _, d, f = function(m) {
            return m.reverse();
          }, c = function(m) {
            return m;
          };
          switch (h) {
            case "=":
            case "<":
              return i;
            case ">":
              for (i.length !== 1 && l.warn("Contour data invalid for the specified inequality operation."), _ = i[0], p = 0; p < _.edgepaths.length; p++) _.edgepaths[p] = f(_.edgepaths[p]);
              for (p = 0; p < _.paths.length; p++) _.paths[p] = f(_.paths[p]);
              for (p = 0; p < _.starts.length; p++) _.starts[p] = f(_.starts[p]);
              return i;
            case "][":
              var g = f;
              f = c, c = g;
            case "[]":
              for (i.length !== 2 && l.warn("Contour data invalid for the specified inequality range operation."), _ = u(i[0]), d = u(i[1]), p = 0; p < _.edgepaths.length; p++) _.edgepaths[p] = f(_.edgepaths[p]);
              for (p = 0; p < _.paths.length; p++) _.paths[p] = f(_.paths[p]);
              for (p = 0; p < _.starts.length; p++) _.starts[p] = f(_.starts[p]);
              for (; d.edgepaths.length; ) _.edgepaths.push(c(d.edgepaths.shift()));
              for (; d.paths.length; ) _.paths.push(c(d.paths.shift()));
              for (; d.starts.length; ) _.starts.push(c(d.starts.shift()));
              return [_];
          }
        };
      }, 57543: function(o, s, n) {
        var l = n(34809), u = n(86073), i = n(99669), h = n(29503), p = n(47495), _ = n(39889), d = n(63814), f = n(52240);
        o.exports = function(c, g, m, x) {
          function w(S, A) {
            return l.coerce(c, g, f, S, A);
          }
          if (u(c, g, w, x)) {
            i(c, g, x, w), w("xhoverformat"), w("yhoverformat"), w("text"), w("hovertext"), w("hoverongaps"), w("hovertemplate");
            var k = w("contours.type") === "constraint";
            w("connectgaps", l.isArray1D(g.z)), k ? h(c, g, w, x, m) : (p(c, g, w, function(S) {
              return l.coerce2(c, g, f, S);
            }), _(c, g, w, x)), g.contours && g.contours.coloring === "heatmap" && d(w, x), w("zorder");
          } else g.visible = !1;
        };
      }, 86828: function(o, s, n) {
        var l = n(34809), u = n(22783), i = n(48715);
        o.exports = function(h, p, _) {
          for (var d = h.type === "constraint" ? u[h._operation](h.value) : h, f = d.size, c = [], g = i(d), m = _.trace._carpetTrace, x = m ? { xaxis: m.aaxis, yaxis: m.baxis, x: _.a, y: _.b } : { xaxis: p.xaxis, yaxis: p.yaxis, x: _.x, y: _.y }, w = d.start; w < g; w += f) if (c.push(l.extendFlat({ level: w, crossings: {}, starts: [], edgepaths: [], paths: [], z: _.z, smoothing: _.trace.line.smoothing }, x)), c.length > 1e3) {
            l.warn("Too many contours, clipping at 1000", h);
            break;
          }
          return c;
        };
      }, 48715: function(o) {
        o.exports = function(s) {
          return s.end + s.size / 1e6;
        };
      }, 27657: function(o, s, n) {
        var l = n(34809), u = n(53156);
        function i(_, d, f, c) {
          return Math.abs(_[0] - d[0]) < f && Math.abs(_[1] - d[1]) < c;
        }
        function h(_, d, f, c, g) {
          var m, x = d.join(","), w = _.crossings[x], k = function(se, me, ye) {
            var pe = 0, be = 0;
            return se > 20 && me ? se === 208 || se === 1114 ? pe = ye[0] === 0 ? 1 : -1 : be = ye[1] === 0 ? 1 : -1 : u.BOTTOMSTART.indexOf(se) !== -1 ? be = 1 : u.LEFTSTART.indexOf(se) !== -1 ? pe = 1 : u.TOPSTART.indexOf(se) !== -1 ? be = -1 : pe = -1, [pe, be];
          }(w, f, d), S = [p(_, d, [-k[0], -k[1]])], A = _.z.length, C = _.z[0].length, D = d.slice(), L = k.slice();
          for (m = 0; m < 1e4; m++) {
            if (w > 20 ? (w = u.CHOOSESADDLE[w][(k[0] || k[1]) < 0 ? 0 : 1], _.crossings[x] = u.SADDLEREMAINDER[w]) : delete _.crossings[x], !(k = u.NEWDELTA[w])) {
              l.log("Found bad marching index:", w, d, _.level);
              break;
            }
            S.push(p(_, d, k)), d[0] += k[0], d[1] += k[1], x = d.join(","), i(S[S.length - 1], S[S.length - 2], c, g) && S.pop();
            var E = k[0] && (d[0] < 0 || d[0] > C - 2) || k[1] && (d[1] < 0 || d[1] > A - 2);
            if (d[0] === D[0] && d[1] === D[1] && k[0] === L[0] && k[1] === L[1] || f && E) break;
            w = _.crossings[x];
          }
          m === 1e4 && l.log("Infinite loop in contour?");
          var P, I, M, O, T, z, F, U, V, $, q, K, re, Y, te, ee = i(S[0], S[S.length - 1], c, g), X = 0, Q = 0.2 * _.smoothing, ue = [], ce = 0;
          for (m = 1; m < S.length; m++) K = S[m], re = S[m - 1], Y = K[2] - re[2], te = K[3] - re[3], X += F = Math.sqrt(Y * Y + te * te), ue.push(F);
          var he = X / ue.length * Q;
          function de(se) {
            return S[se % S.length];
          }
          for (m = S.length - 2; m >= ce; m--) if ((P = ue[m]) < he) {
            for (M = 0, I = m - 1; I >= ce && P + ue[I] < he; I--) P += ue[I];
            if (ee && m === S.length - 2) for (M = 0; M < I && P + ue[M] < he; M++) P += ue[M];
            T = m - I + M + 1, z = Math.floor((m + I + M + 2) / 2), O = ee || m !== S.length - 2 ? ee || I !== -1 ? T % 2 ? de(z) : [(de(z)[0] + de(z + 1)[0]) / 2, (de(z)[1] + de(z + 1)[1]) / 2] : S[0] : S[S.length - 1], S.splice(I + 1, m - I + 1, O), m = I + 1, M && (ce = M), ee && (m === S.length - 2 ? S[M] = S[S.length - 1] : m === 0 && (S[S.length - 1] = S[0]));
          }
          for (S.splice(0, ce), m = 0; m < S.length; m++) S[m].length = 2;
          if (!(S.length < 2)) if (ee) S.pop(), _.paths.push(S);
          else {
            f || l.log("Unclosed interior contour?", _.level, D.join(","), S.join("L"));
            var ne = !1;
            for (U = 0; U < _.edgepaths.length; U++) if ($ = _.edgepaths[U], !ne && i($[0], S[S.length - 1], c, g)) {
              S.pop(), ne = !0;
              var ae = !1;
              for (V = 0; V < _.edgepaths.length; V++) if (i((q = _.edgepaths[V])[q.length - 1], S[0], c, g)) {
                ae = !0, S.shift(), _.edgepaths.splice(U, 1), V === U ? _.paths.push(S.concat(q)) : (V > U && V--, _.edgepaths[V] = q.concat(S, $));
                break;
              }
              ae || (_.edgepaths[U] = S.concat($));
            }
            for (U = 0; U < _.edgepaths.length && !ne; U++) i(($ = _.edgepaths[U])[$.length - 1], S[0], c, g) && (S.shift(), _.edgepaths[U] = $.concat(S), ne = !0);
            ne || _.edgepaths.push(S);
          }
        }
        function p(_, d, f) {
          var c = d[0] + Math.max(f[0], 0), g = d[1] + Math.max(f[1], 0), m = _.z[g][c], x = _.xaxis, w = _.yaxis;
          if (f[1]) {
            var k = (_.level - m) / (_.z[g][c + 1] - m), S = (k !== 1 ? (1 - k) * x.c2l(_.x[c]) : 0) + (k !== 0 ? k * x.c2l(_.x[c + 1]) : 0);
            return [x.c2p(x.l2c(S), !0), w.c2p(_.y[g], !0), c + k, g];
          }
          var A = (_.level - m) / (_.z[g + 1][c] - m), C = (A !== 1 ? (1 - A) * w.c2l(_.y[g]) : 0) + (A !== 0 ? A * w.c2l(_.y[g + 1]) : 0);
          return [x.c2p(_.x[c], !0), w.c2p(w.l2c(C), !0), c, g + A];
        }
        o.exports = function(_, d, f) {
          var c, g, m, x;
          for (d = d || 0.01, f = f || 0.01, g = 0; g < _.length; g++) {
            for (m = _[g], x = 0; x < m.starts.length; x++) h(m, m.starts[x], "edge", d, f);
            for (c = 0; Object.keys(m.crossings).length && c < 1e4; ) c++, h(m, Object.keys(m.crossings)[0].split(",").map(Number), void 0, d, f);
            c === 1e4 && l.log("Infinite loop in contour?");
          }
        };
      }, 29815: function(o, s, n) {
        var l = n(78766), u = n(93125);
        o.exports = function(i, h, p, _, d) {
          d || (d = {}), d.isContour = !0;
          var f = u(i, h, p, _, d);
          return f && f.forEach(function(c) {
            var g = c.trace;
            g.contours.type === "constraint" && (g.fillcolor && l.opacity(g.fillcolor) ? c.color = l.addOpacity(g.fillcolor, 1) : g.contours.showlines && l.opacity(g.line.color) && (c.color = l.addOpacity(g.line.color, 1)));
          }), f;
        };
      }, 91405: function(o, s, n) {
        o.exports = { attributes: n(52240), supplyDefaults: n(57543), calc: n(40352), plot: n(8850).plot, style: n(1328), colorbar: n(92697), hoverPoints: n(29815), moduleType: "trace", name: "contour", basePlotModule: n(37703), categories: ["cartesian", "svg", "2dMap", "contour", "showLegend"], meta: {} };
      }, 20576: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i, h, p) {
          if (p || (p = {}), u("contours.showlabels")) {
            var _ = i.font;
            l.coerceFont(u, "contours.labelfont", _, { overrideDflt: { color: h } }), u("contours.labelformat");
          }
          p.hasHover !== !1 && u("zhoverformat");
        };
      }, 16438: function(o, s, n) {
        var l = n(45568), u = n(88856), i = n(48715);
        o.exports = function(h) {
          var p = h.contours, _ = p.start, d = i(p), f = p.size || 1, c = Math.floor((d - _) / f) + 1, g = p.coloring === "lines" ? 0 : 1, m = u.extractOpts(h);
          isFinite(f) || (f = 1, c = 1);
          var x, w, k = m.reversescale ? u.flipScale(m.colorscale) : m.colorscale, S = k.length, A = new Array(S), C = new Array(S), D = m.min, L = m.max;
          if (p.coloring === "heatmap") {
            for (w = 0; w < S; w++) x = k[w], A[w] = x[0] * (L - D) + D, C[w] = x[1];
            var E = l.extent([D, L, p.start, p.start + f * (c - 1)]), P = E[D < L ? 0 : 1], I = E[D < L ? 1 : 0];
            P !== D && (A.splice(0, 0, P), C.splice(0, 0, C[0])), I !== L && (A.push(I), C.push(C[C.length - 1]));
          } else {
            var M = h._input && typeof h._input.zmin == "number" && typeof h._input.zmax == "number";
            for (M && (_ <= D || d >= L) && (_ <= D && (_ = D), d >= L && (d = L), c = Math.floor((d - _) / f) + 1, g = 0), w = 0; w < S; w++) x = k[w], A[w] = (x[0] * (c + g - 1) - g / 2) * f + _, C[w] = x[1];
            (M || h.autocontour) && (A[0] > D && (A.unshift(D), C.unshift(C[0])), A[A.length - 1] < L && (A.push(L), C.push(C[C.length - 1])));
          }
          return u.makeColorScaleFunc({ domain: A, range: C }, { noNumericCheck: !0 });
        };
      }, 83545: function(o, s, n) {
        var l = n(53156);
        function u(i, h) {
          var p = (h[0][0] > i ? 0 : 1) + (h[0][1] > i ? 0 : 2) + (h[1][1] > i ? 0 : 4) + (h[1][0] > i ? 0 : 8);
          return p === 5 || p === 10 ? i > (h[0][0] + h[0][1] + h[1][0] + h[1][1]) / 4 ? p === 5 ? 713 : 1114 : p === 5 ? 104 : 208 : p === 15 ? 0 : p;
        }
        o.exports = function(i) {
          var h, p, _, d, f, c, g, m, x, w = i[0].z, k = w.length, S = w[0].length, A = k === 2 || S === 2;
          for (p = 0; p < k - 1; p++) for (d = [], p === 0 && (d = d.concat(l.BOTTOMSTART)), p === k - 2 && (d = d.concat(l.TOPSTART)), h = 0; h < S - 1; h++) for (_ = d.slice(), h === 0 && (_ = _.concat(l.LEFTSTART)), h === S - 2 && (_ = _.concat(l.RIGHTSTART)), f = h + "," + p, c = [[w[p][h], w[p][h + 1]], [w[p + 1][h], w[p + 1][h + 1]]], x = 0; x < i.length; x++) (g = u((m = i[x]).level, c)) && (m.crossings[f] = g, _.indexOf(g) !== -1 && (m.starts.push([h, p]), A && _.indexOf(g, _.indexOf(g) + 1) !== -1 && m.starts.push([h, p])));
        };
      }, 8850: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(88856), p = n(30635), _ = n(29714), d = n(19091), f = n(19236), c = n(83545), g = n(27657), m = n(86828), x = n(1999), w = n(49886), k = n(53156), S = k.LABELOPTIMIZER;
        function A(L, E) {
          var P, I, M, O, T, z, F, U = "", V = 0, $ = L.edgepaths.map(function(ee, X) {
            return X;
          }), q = !0;
          function K(ee) {
            return Math.abs(ee[1] - E[2][1]) < 0.01;
          }
          function re(ee) {
            return Math.abs(ee[0] - E[0][0]) < 0.01;
          }
          function Y(ee) {
            return Math.abs(ee[0] - E[2][0]) < 0.01;
          }
          for (; $.length; ) {
            for (z = i.smoothopen(L.edgepaths[V], L.smoothing), U += q ? z : z.replace(/^M/, "L"), $.splice($.indexOf(V), 1), P = L.edgepaths[V][L.edgepaths[V].length - 1], O = -1, M = 0; M < 4; M++) {
              if (!P) {
                u.log("Missing end?", V, L);
                break;
              }
              for (F = P, Math.abs(F[1] - E[0][1]) < 0.01 && !Y(P) ? I = E[1] : re(P) ? I = E[0] : K(P) ? I = E[3] : Y(P) && (I = E[2]), T = 0; T < L.edgepaths.length; T++) {
                var te = L.edgepaths[T][0];
                Math.abs(P[0] - I[0]) < 0.01 ? Math.abs(P[0] - te[0]) < 0.01 && (te[1] - P[1]) * (I[1] - te[1]) >= 0 && (I = te, O = T) : Math.abs(P[1] - I[1]) < 0.01 ? Math.abs(P[1] - te[1]) < 0.01 && (te[0] - P[0]) * (I[0] - te[0]) >= 0 && (I = te, O = T) : u.log("endpt to newendpt is not vert. or horz.", P, I, te);
              }
              if (P = I, O >= 0) break;
              U += "L" + I;
            }
            if (O === L.edgepaths.length) {
              u.log("unclosed perimeter path");
              break;
            }
            V = O, (q = $.indexOf(V) === -1) && (V = $[0], U += "Z");
          }
          for (V = 0; V < L.paths.length; V++) U += i.smoothclosed(L.paths[V], L.smoothing);
          return U;
        }
        function C(L, E, P, I) {
          var M = E.width / 2, O = E.height / 2, T = L.x, z = L.y, F = L.theta, U = Math.cos(F) * M, V = Math.sin(F) * M, $ = (T > I.center ? I.right - T : T - I.left) / (U + Math.abs(Math.sin(F) * O)), q = (z > I.middle ? I.bottom - z : z - I.top) / (Math.abs(V) + Math.cos(F) * O);
          if ($ < 1 || q < 1) return 1 / 0;
          var K = S.EDGECOST * (1 / ($ - 1) + 1 / (q - 1));
          K += S.ANGLECOST * F * F;
          for (var re = T - U, Y = z - V, te = T + U, ee = z + V, X = 0; X < P.length; X++) {
            var Q = P[X], ue = Math.cos(Q.theta) * Q.width / 2, ce = Math.sin(Q.theta) * Q.width / 2, he = 2 * u.segmentDistance(re, Y, te, ee, Q.x - ue, Q.y - ce, Q.x + ue, Q.y + ce) / (E.height + Q.height), de = Q.level === E.level, ne = de ? S.SAMELEVELDISTANCE : 1;
            if (he <= ne) return 1 / 0;
            K += S.NEIGHBORCOST * (de ? S.SAMELEVELFACTOR : 1) / (he - ne);
          }
          return K;
        }
        function D(L) {
          var E, P, I = L.trace._emptypoints, M = [], O = L.z.length, T = L.z[0].length, z = [];
          for (E = 0; E < T; E++) z.push(1);
          for (E = 0; E < O; E++) M.push(z.slice());
          for (E = 0; E < I.length; E++) M[(P = I[E])[0]][P[1]] = 0;
          return L.zmask = M, M;
        }
        s.plot = function(L, E, P, I) {
          var M = E.xaxis, O = E.yaxis;
          u.makeTraceGroups(I, P, "contour").each(function(T) {
            var z = l.select(this), F = T[0], U = F.trace, V = F.x, $ = F.y, q = U.contours, K = m(q, E, F), re = u.ensureSingle(z, "g", "heatmapcoloring"), Y = [];
            q.coloring === "heatmap" && (Y = [T]), f(L, E, Y, re), c(K), g(K);
            var te = M.c2p(V[0], !0), ee = M.c2p(V[V.length - 1], !0), X = O.c2p($[0], !0), Q = O.c2p($[$.length - 1], !0), ue = [[te, Q], [ee, Q], [ee, X], [te, X]], ce = K;
            q.type === "constraint" && (ce = x(K, q._operation)), function(he, de, ne) {
              var ae = u.ensureSingle(he, "g", "contourbg").selectAll("path").data(ne.coloring === "fill" ? [0] : []);
              ae.enter().append("path"), ae.exit().remove(), ae.attr("d", "M" + de.join("L") + "Z").style("stroke", "none");
            }(z, ue, q), function(he, de, ne, ae) {
              var se = ae.coloring === "fill" || ae.type === "constraint" && ae._operation !== "=", me = "M" + ne.join("L") + "Z";
              se && w(de, ae);
              var ye = u.ensureSingle(he, "g", "contourfill").selectAll("path").data(se ? de : []);
              ye.enter().append("path"), ye.exit().remove(), ye.each(function(pe) {
                var be = (pe.prefixBoundary ? me : "") + A(pe, ne);
                be ? l.select(this).attr("d", be).style("stroke", "none") : l.select(this).remove();
              });
            }(z, ce, ue, q), function(he, de, ne, ae, se) {
              var me = ne._context.staticPlot, ye = u.ensureSingle(he, "g", "contourlines"), pe = se.showlines !== !1, be = se.showlabels, Ae = pe && be, Se = s.createLines(ye, pe || be, de, me), Me = s.createLineClip(ye, Ae, ne, ae.trace.uid), De = he.selectAll("g.contourlabels").data(be ? [0] : []);
              if (De.exit().remove(), De.enter().append("g").classed("contourlabels", !0), be) {
                var Le = [], We = [];
                u.clearLocationCache();
                var Ee = s.labelFormatter(ne, ae), Ne = i.tester.append("text").attr("data-notex", 1).call(i.font, se.labelfont), Ie = de[0].xaxis, ge = de[0].yaxis, Ce = Ie._length, we = ge._length, Ge = Ie.range, Re = ge.range, je = u.aggNums(Math.min, null, ae.x), Ke = u.aggNums(Math.max, null, ae.x), tt = u.aggNums(Math.min, null, ae.y), _e = u.aggNums(Math.max, null, ae.y), Be = Math.max(Ie.c2p(je, !0), 0), $e = Math.min(Ie.c2p(Ke, !0), Ce), Ze = Math.max(ge.c2p(_e, !0), 0), ct = Math.min(ge.c2p(tt, !0), we), ft = {};
                Ge[0] < Ge[1] ? (ft.left = Be, ft.right = $e) : (ft.left = $e, ft.right = Be), Re[0] < Re[1] ? (ft.top = Ze, ft.bottom = ct) : (ft.top = ct, ft.bottom = Ze), ft.middle = (ft.top + ft.bottom) / 2, ft.center = (ft.left + ft.right) / 2, Le.push([[ft.left, ft.top], [ft.right, ft.top], [ft.right, ft.bottom], [ft.left, ft.bottom]]);
                var _t = Math.sqrt(Ce * Ce + we * we), Pt = k.LABELDISTANCE * _t / Math.max(1, de.length / k.LABELINCREASE);
                Se.each(function(Dt) {
                  var $t = s.calcTextOpts(Dt.level, Ee, Ne, ne);
                  l.select(this).selectAll("path").each(function() {
                    var Gt = u.getVisibleSegment(this, ft, $t.height / 2);
                    if (Gt && !(Gt.len < ($t.width + $t.height) * k.LABELMIN)) for (var Wt = Math.min(Math.ceil(Gt.len / Pt), k.LABELMAX), mt = 0; mt < Wt; mt++) {
                      var at = s.findBestTextLocation(this, Gt, $t, We, ft);
                      if (!at) break;
                      s.addLabelData(at, $t, We, Le);
                    }
                  });
                }), Ne.remove(), s.drawLabels(De, We, ne, Me, Ae ? Le : null);
              }
              be && !pe && Se.remove();
            }(z, K, L, F, q), function(he, de, ne, ae, se) {
              var me = ae.trace, ye = ne._fullLayout._clips, pe = "clip" + me.uid, be = ye.selectAll("#" + pe).data(me.connectgaps ? [] : [0]);
              if (be.enter().append("clipPath").classed("contourclip", !0).attr("id", pe), be.exit().remove(), me.connectgaps === !1) {
                var Ae = { level: 0.9, crossings: {}, starts: [], edgepaths: [], paths: [], xaxis: de.xaxis, yaxis: de.yaxis, x: ae.x, y: ae.y, z: D(ae), smoothing: 0 };
                c([Ae]), g([Ae]), w([Ae], { type: "levels" }), u.ensureSingle(be, "path", "").attr("d", (Ae.prefixBoundary ? "M" + se.join("L") + "Z" : "") + A(Ae, se));
              } else pe = null;
              i.setClipUrl(he, pe, ne);
            }(z, E, L, F, ue);
          });
        }, s.createLines = function(L, E, P, I) {
          var M = P[0].smoothing, O = L.selectAll("g.contourlevel").data(E ? P : []);
          if (O.exit().remove(), O.enter().append("g").classed("contourlevel", !0), E) {
            var T = O.selectAll("path.openline").data(function(F) {
              return F.pedgepaths || F.edgepaths;
            });
            T.exit().remove(), T.enter().append("path").classed("openline", !0), T.attr("d", function(F) {
              return i.smoothopen(F, M);
            }).style("stroke-miterlimit", 1).style("vector-effect", I ? "none" : "non-scaling-stroke");
            var z = O.selectAll("path.closedline").data(function(F) {
              return F.ppaths || F.paths;
            });
            z.exit().remove(), z.enter().append("path").classed("closedline", !0), z.attr("d", function(F) {
              return i.smoothclosed(F, M);
            }).style("stroke-miterlimit", 1).style("vector-effect", I ? "none" : "non-scaling-stroke");
          }
          return O;
        }, s.createLineClip = function(L, E, P, I) {
          var M = E ? "clipline" + I : null, O = P._fullLayout._clips.selectAll("#" + M).data(E ? [0] : []);
          return O.exit().remove(), O.enter().append("clipPath").classed("contourlineclip", !0).attr("id", M), i.setClipUrl(L, M, P), O;
        }, s.labelFormatter = function(L, E) {
          var P = L._fullLayout, I = E.trace, M = I.contours, O = { type: "linear", _id: "ycontour", showexponent: "all", exponentformat: "B" };
          if (M.labelformat) O.tickformat = M.labelformat, d(O, P);
          else {
            var T = h.extractOpts(I);
            if (T && T.colorbar && T.colorbar._axis) O = T.colorbar._axis;
            else {
              if (M.type === "constraint") {
                var z = M.value;
                u.isArrayOrTypedArray(z) ? O.range = [z[0], z[z.length - 1]] : O.range = [z, z];
              } else O.range = [M.start, M.end], O.nticks = (M.end - M.start) / M.size;
              O.range[0] === O.range[1] && (O.range[1] += O.range[0] || 1), O.nticks || (O.nticks = 1e3), d(O, P), _.prepTicks(O), O._tmin = null, O._tmax = null;
            }
          }
          return function(F) {
            return _.tickText(O, F).text;
          };
        }, s.calcTextOpts = function(L, E, P, I) {
          var M = E(L);
          P.text(M).call(p.convertToTspans, I);
          var O = P.node(), T = i.bBox(O, !0);
          return { text: M, width: T.width, height: T.height, fontSize: +O.style["font-size"].replace("px", ""), level: L, dy: (T.top + T.bottom) / 2 };
        }, s.findBestTextLocation = function(L, E, P, I, M) {
          var O, T, z, F, U, V = P.width;
          E.isClosed ? (T = E.len / S.INITIALSEARCHPOINTS, O = E.min + T / 2, z = E.max) : (T = (E.len - V) / (S.INITIALSEARCHPOINTS + 1), O = E.min + T + V / 2, z = E.max - (T + V) / 2);
          for (var $ = 1 / 0, q = 0; q < S.ITERATIONS; q++) {
            for (var K = O; K < z; K += T) {
              var re = u.getTextLocation(L, E.total, K, V), Y = C(re, P, I, M);
              Y < $ && ($ = Y, U = re, F = K);
            }
            if ($ > 2 * S.MAXCOST) break;
            q && (T /= 2), z = (O = F - T / 2) + 1.5 * T;
          }
          if ($ <= S.MAXCOST) return U;
        }, s.addLabelData = function(L, E, P, I) {
          var M = E.fontSize, O = E.width + M / 3, T = Math.max(0, E.height - M / 3), z = L.x, F = L.y, U = L.theta, V = Math.sin(U), $ = Math.cos(U), q = function(re, Y) {
            return [z + re * $ - Y * V, F + re * V + Y * $];
          }, K = [q(-O / 2, -T / 2), q(-O / 2, T / 2), q(O / 2, T / 2), q(O / 2, -T / 2)];
          P.push({ text: E.text, x: z, y: F, dy: E.dy, theta: U, level: E.level, width: O, height: T }), I.push(K);
        }, s.drawLabels = function(L, E, P, I, M) {
          var O = L.selectAll("text").data(E, function(F) {
            return F.text + "," + F.x + "," + F.y + "," + F.theta;
          });
          if (O.exit().remove(), O.enter().append("text").attr({ "data-notex": 1, "text-anchor": "middle" }).each(function(F) {
            var U = F.x + Math.sin(F.theta) * F.dy, V = F.y - Math.cos(F.theta) * F.dy;
            l.select(this).text(F.text).attr({ x: U, y: V, transform: "rotate(" + 180 * F.theta / Math.PI + " " + U + " " + V + ")" }).call(p.convertToTspans, P);
          }), M) {
            for (var T = "", z = 0; z < M.length; z++) T += "M" + M[z].join("L") + "Z";
            u.ensureSingle(I, "path", "").attr("d", T);
          }
        };
      }, 62475: function(o, s, n) {
        var l = n(29714), u = n(34809);
        function i(h, p, _) {
          var d = { type: "linear", range: [h, p] };
          return l.autoTicks(d, (p - h) / (_ || 15)), d;
        }
        o.exports = function(h, p) {
          var _ = h.contours;
          if (h.autocontour) {
            var d = h.zmin, f = h.zmax;
            (h.zauto || d === void 0) && (d = u.aggNums(Math.min, null, p)), (h.zauto || f === void 0) && (f = u.aggNums(Math.max, null, p));
            var c = i(d, f, h.ncontours);
            _.size = c.dtick, _.start = l.tickFirst(c), c.range.reverse(), _.end = l.tickFirst(c), _.start === d && (_.start += _.size), _.end === f && (_.end -= _.size), _.start > _.end && (_.start = _.end = (_.start + _.end) / 2), h._input.contours || (h._input.contours = {}), u.extendFlat(h._input.contours, { start: _.start, end: _.end, size: _.size }), h._input.autocontour = !0;
          } else if (_.type !== "constraint") {
            var g, m = _.start, x = _.end, w = h._input.contours;
            m > x && (_.start = w.start = x, x = _.end = w.end = m, m = _.start), _.size > 0 || (g = m === x ? 1 : i(m, x, h.ncontours).dtick, w.size = _.size = g);
          }
        };
      }, 1328: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(12774), h = n(16438);
        o.exports = function(p) {
          var _ = l.select(p).selectAll("g.contour");
          _.style("opacity", function(d) {
            return d[0].trace.opacity;
          }), _.each(function(d) {
            var f = l.select(this), c = d[0].trace, g = c.contours, m = c.line, x = g.size || 1, w = g.start, k = g.type === "constraint", S = !k && g.coloring === "lines", A = !k && g.coloring === "fill", C = S || A ? h(c) : null;
            f.selectAll("g.contourlevel").each(function(E) {
              l.select(this).selectAll("path").call(u.lineGroupStyle, m.width, S ? C(E.level) : m.color, m.dash);
            });
            var D = g.labelfont;
            if (f.selectAll("g.contourlabels text").each(function(E) {
              u.font(l.select(this), { weight: D.weight, style: D.style, variant: D.variant, textcase: D.textcase, lineposition: D.lineposition, shadow: D.shadow, family: D.family, size: D.size, color: D.color || (S ? C(E.level) : m.color) });
            }), k) f.selectAll("g.contourfill path").style("fill", c.fillcolor);
            else if (A) {
              var L;
              f.selectAll("g.contourfill path").style("fill", function(E) {
                return L === void 0 && (L = E.level), C(E.level + 0.5 * x);
              }), L === void 0 && (L = w), f.selectAll("g.contourbg path").style("fill", C(L - 0.5 * x));
            }
          }), i(p);
        };
      }, 39889: function(o, s, n) {
        var l = n(39356), u = n(20576);
        o.exports = function(i, h, p, _, d) {
          var f, c = p("contours.coloring"), g = "";
          c === "fill" && (f = p("contours.showlines")), f !== !1 && (c !== "lines" && (g = p("line.color", "#000")), p("line.width", 0.5), p("line.dash")), c !== "none" && (i.showlegend !== !0 && (h.showlegend = !1), h._dfltShowLegend = !1, l(i, h, _, p, { prefix: "", cLetter: "z" })), p("line.smoothing"), u(p, _, g, d);
        };
      }, 66365: function(o, s, n) {
        var l = n(81658), u = n(52240), i = n(87163), h = n(93049).extendFlat, p = u.contours;
        o.exports = h({ carpet: { valType: "string", editType: "calc" }, z: l.z, a: l.x, a0: l.x0, da: l.dx, b: l.y, b0: l.y0, db: l.dy, text: l.text, hovertext: l.hovertext, transpose: l.transpose, atype: l.xtype, btype: l.ytype, fillcolor: u.fillcolor, autocontour: u.autocontour, ncontours: u.ncontours, contours: { type: p.type, start: p.start, end: p.end, size: p.size, coloring: { valType: "enumerated", values: ["fill", "lines", "none"], dflt: "fill", editType: "calc" }, showlines: p.showlines, showlabels: p.showlabels, labelfont: p.labelfont, labelformat: p.labelformat, operation: p.operation, value: p.value, editType: "calc", impliedEdits: { autocontour: !1 } }, line: { color: u.line.color, width: u.line.width, dash: u.line.dash, smoothing: u.line.smoothing, editType: "plot" }, zorder: u.zorder, transforms: void 0 }, i("", { cLetter: "z", autoColorDflt: !1 }));
      }, 80849: function(o, s, n) {
        var l = n(28379), u = n(34809), i = n(87869), h = n(93877), p = n(69295), _ = n(78106), d = n(80924), f = n(50538), c = n(26571), g = n(62475);
        o.exports = function(m, x) {
          var w = x._carpetTrace = c(m, x);
          if (w && w.visible && w.visible !== "legendonly") {
            if (!x.a || !x.b) {
              var k = m.data[w.index], S = m.data[x.index];
              S.a || (S.a = k.a), S.b || (S.b = k.b), f(S, x, x._defaultColor, m._fullLayout);
            }
            var A = function(C, D) {
              var L, E, P, I, M, O, T, z = D._carpetTrace, F = z.aaxis, U = z.baxis;
              F._minDtick = 0, U._minDtick = 0, u.isArray1D(D.z) && i(D, F, U, "a", "b", ["z"]), L = D._a = D._a || D.a, I = D._b = D._b || D.b, L = L ? F.makeCalcdata(D, "_a") : [], I = I ? U.makeCalcdata(D, "_b") : [], E = D.a0 || 0, P = D.da || 1, M = D.b0 || 0, O = D.db || 1, T = D._z = h(D._z || D.z, D.transpose), D._emptypoints = _(T), p(T, D._emptypoints);
              var V = u.maxRowLength(T), $ = D.xtype === "scaled" ? "" : L, q = d(D, $, E, P, V, F), K = D.ytype === "scaled" ? "" : I, re = { a: q, b: d(D, K, M, O, T.length, U), z: T };
              return D.contours.type === "levels" && D.contours.coloring !== "none" && l(C, D, { vals: T, containerStr: "", cLetter: "z" }), [re];
            }(m, x);
            return g(x, x._z), A;
          }
        };
      }, 50538: function(o, s, n) {
        var l = n(34809), u = n(86073), i = n(66365), h = n(29503), p = n(47495), _ = n(39889);
        o.exports = function(d, f, c, g) {
          function m(x, w) {
            return l.coerce(d, f, i, x, w);
          }
          if (m("carpet"), d.a && d.b) {
            if (!u(d, f, m, g, "a", "b")) return void (f.visible = !1);
            m("text"), m("contours.type") === "constraint" ? h(d, f, m, g, c, { hasHover: !1 }) : (p(d, f, m, function(x) {
              return l.coerce2(d, f, i, x);
            }), _(d, f, m, g, { hasHover: !1 }));
          } else f._defaultColor = c, f._length = null;
          m("zorder");
        };
      }, 34406: function(o, s, n) {
        o.exports = { attributes: n(66365), supplyDefaults: n(50538), colorbar: n(92697), calc: n(80849), plot: n(71815), style: n(1328), moduleType: "trace", name: "contourcarpet", basePlotModule: n(37703), categories: ["cartesian", "svg", "carpet", "contour", "symbols", "showLegend", "hasLines", "carpetDependent", "noHover", "noSortingByValue"], meta: {} };
      }, 71815: function(o, s, n) {
        var l = n(45568), u = n(6720), i = n(3685), h = n(62203), p = n(34809), _ = n(83545), d = n(27657), f = n(8850), c = n(53156), g = n(1999), m = n(86828), x = n(49886), w = n(26571), k = n(94903);
        function S(D, L, E) {
          var P = D.getPointAtLength(L), I = D.getPointAtLength(E), M = I.x - P.x, O = I.y - P.y, T = Math.sqrt(M * M + O * O);
          return [M / T, O / T];
        }
        function A(D) {
          var L = Math.sqrt(D[0] * D[0] + D[1] * D[1]);
          return [D[0] / L, D[1] / L];
        }
        function C(D, L) {
          var E = Math.abs(D[0] * L[0] + D[1] * L[1]);
          return Math.sqrt(1 - E * E) / E;
        }
        o.exports = function(D, L, E, P) {
          var I = L.xaxis, M = L.yaxis;
          p.makeTraceGroups(P, E, "contour").each(function(O) {
            var T = l.select(this), z = O[0], F = z.trace, U = F._carpetTrace = w(D, F), V = D.calcdata[U.index][0];
            if (U.visible && U.visible !== "legendonly") {
              var $ = z.a, q = z.b, K = F.contours, re = m(K, L, z), Y = K.type === "constraint", te = K._operation, ee = Y ? te === "=" ? "lines" : "fill" : K.coloring, X = [[$[0], q[q.length - 1]], [$[$.length - 1], q[q.length - 1]], [$[$.length - 1], q[0]], [$[0], q[0]]];
              _(re);
              var Q = 1e-8 * ($[$.length - 1] - $[0]), ue = 1e-8 * (q[q.length - 1] - q[0]);
              d(re, Q, ue);
              var ce, he, de, ne, ae = re;
              K.type === "constraint" && (ae = g(re, te)), function(pe, be) {
                var Ae, Se, Me, De, Le, We, Ee, Ne, Ie;
                for (Ae = 0; Ae < pe.length; Ae++) {
                  for (Le = (De = pe[Ae]).pedgepaths = [], We = De.ppaths = [], Se = 0; Se < De.edgepaths.length; Se++) {
                    for (Ie = De.edgepaths[Se], Ee = [], Me = 0; Me < Ie.length; Me++) Ee[Me] = be(Ie[Me]);
                    Le.push(Ee);
                  }
                  for (Se = 0; Se < De.paths.length; Se++) {
                    for (Ie = De.paths[Se], Ne = [], Me = 0; Me < Ie.length; Me++) Ne[Me] = be(Ie[Me]);
                    We.push(Ne);
                  }
                }
              }(re, ye);
              var se = [];
              for (ne = V.clipsegments.length - 1; ne >= 0; ne--) ce = V.clipsegments[ne], he = u([], ce.x, I.c2p), de = u([], ce.y, M.c2p), he.reverse(), de.reverse(), se.push(i(he, de, ce.bicubic));
              var me = "M" + se.join("L") + "Z";
              (function(pe, be, Ae, Se, Me, De) {
                var Le, We, Ee, Ne, Ie = p.ensureSingle(pe, "g", "contourbg").selectAll("path").data(De !== "fill" || Me ? [] : [0]);
                Ie.enter().append("path"), Ie.exit().remove();
                var ge = [];
                for (Ne = 0; Ne < be.length; Ne++) Le = be[Ne], We = u([], Le.x, Ae.c2p), Ee = u([], Le.y, Se.c2p), ge.push(i(We, Ee, Le.bicubic));
                Ie.attr("d", "M" + ge.join("L") + "Z").style("stroke", "none");
              })(T, V.clipsegments, I, M, Y, ee), function(pe, be, Ae, Se, Me, De, Le, We, Ee, Ne, Ie) {
                var ge = Ne === "fill";
                ge && x(Me, pe.contours);
                var Ce = p.ensureSingle(be, "g", "contourfill").selectAll("path").data(ge ? Me : []);
                Ce.enter().append("path"), Ce.exit().remove(), Ce.each(function(we) {
                  var Ge = (we.prefixBoundary ? Ie : "") + function(Re, je, Ke, tt, _e, Be, $e, Ze) {
                    var ct, ft, _t, Pt, Dt, $t, Gt, Wt = "", mt = je.edgepaths.map(function(At, Rt) {
                      return Rt;
                    }), at = !0, vt = 1e-4 * Math.abs(Ke[0][0] - Ke[2][0]), St = 1e-4 * Math.abs(Ke[0][1] - Ke[2][1]);
                    function Je(At) {
                      return Math.abs(At[1] - Ke[0][1]) < St;
                    }
                    function nt(At) {
                      return Math.abs(At[1] - Ke[2][1]) < St;
                    }
                    function ot(At) {
                      return Math.abs(At[0] - Ke[0][0]) < vt;
                    }
                    function Ye(At) {
                      return Math.abs(At[0] - Ke[2][0]) < vt;
                    }
                    function Fe(At, Rt) {
                      var Ft, lt, st, Ot, kt = "";
                      for (Je(At) && !Ye(At) || nt(At) && !ot(At) ? (Ot = _e.aaxis, st = k(_e, Be, [At[0], Rt[0]], 0.5 * (At[1] + Rt[1]))) : (Ot = _e.baxis, st = k(_e, Be, 0.5 * (At[0] + Rt[0]), [At[1], Rt[1]])), Ft = 1; Ft < st.length; Ft++) for (kt += Ot.smoothing ? "C" : "L", lt = 0; lt < st[Ft].length; lt++) {
                        var Bt = st[Ft][lt];
                        kt += [$e.c2p(Bt[0]), Ze.c2p(Bt[1])] + " ";
                      }
                      return kt;
                    }
                    for (ct = 0, ft = null; mt.length; ) {
                      var pt = je.edgepaths[ct][0];
                      for (ft && (Wt += Fe(ft, pt)), Gt = h.smoothopen(je.edgepaths[ct].map(tt), je.smoothing), Wt += at ? Gt : Gt.replace(/^M/, "L"), mt.splice(mt.indexOf(ct), 1), ft = je.edgepaths[ct][je.edgepaths[ct].length - 1], Dt = -1, Pt = 0; Pt < 4; Pt++) {
                        if (!ft) {
                          p.log("Missing end?", ct, je);
                          break;
                        }
                        for (Je(ft) && !Ye(ft) ? _t = Ke[1] : ot(ft) ? _t = Ke[0] : nt(ft) ? _t = Ke[3] : Ye(ft) && (_t = Ke[2]), $t = 0; $t < je.edgepaths.length; $t++) {
                          var Mt = je.edgepaths[$t][0];
                          Math.abs(ft[0] - _t[0]) < vt ? Math.abs(ft[0] - Mt[0]) < vt && (Mt[1] - ft[1]) * (_t[1] - Mt[1]) >= 0 && (_t = Mt, Dt = $t) : Math.abs(ft[1] - _t[1]) < St ? Math.abs(ft[1] - Mt[1]) < St && (Mt[0] - ft[0]) * (_t[0] - Mt[0]) >= 0 && (_t = Mt, Dt = $t) : p.log("endpt to newendpt is not vert. or horz.", ft, _t, Mt);
                        }
                        if (Dt >= 0) break;
                        Wt += Fe(ft, _t), ft = _t;
                      }
                      if (Dt === je.edgepaths.length) {
                        p.log("unclosed perimeter path");
                        break;
                      }
                      ct = Dt, (at = mt.indexOf(ct) === -1) && (ct = mt[0], Wt += Fe(ft, _t) + "Z", ft = null);
                    }
                    for (ct = 0; ct < je.paths.length; ct++) Wt += h.smoothclosed(je.paths[ct].map(tt), je.smoothing);
                    return Wt;
                  }(0, we, De, Le, We, Ee, Ae, Se);
                  Ge ? l.select(this).attr("d", Ge).style("stroke", "none") : l.select(this).remove();
                });
              }(F, T, I, M, ae, X, ye, U, V, ee, me), function(pe, be, Ae, Se, Me, De, Le) {
                var We = Ae._context.staticPlot, Ee = p.ensureSingle(pe, "g", "contourlines"), Ne = Me.showlines !== !1, Ie = Me.showlabels, ge = Ne && Ie, Ce = f.createLines(Ee, Ne || Ie, be, We), we = f.createLineClip(Ee, ge, Ae, Se.trace.uid), Ge = pe.selectAll("g.contourlabels").data(Ie ? [0] : []);
                if (Ge.exit().remove(), Ge.enter().append("g").classed("contourlabels", !0), Ie) {
                  var Re = De.xaxis, je = De.yaxis, Ke = Re._length, tt = je._length, _e = [[[0, 0], [Ke, 0], [Ke, tt], [0, tt]]], Be = [];
                  p.clearLocationCache();
                  var $e = f.labelFormatter(Ae, Se), Ze = h.tester.append("text").attr("data-notex", 1).call(h.font, Me.labelfont), ct = { left: 0, right: Ke, center: Ke / 2, top: 0, bottom: tt, middle: tt / 2 }, ft = Math.sqrt(Ke * Ke + tt * tt), _t = c.LABELDISTANCE * ft / Math.max(1, be.length / c.LABELINCREASE);
                  Ce.each(function(Pt) {
                    var Dt = f.calcTextOpts(Pt.level, $e, Ze, Ae);
                    l.select(this).selectAll("path").each(function($t) {
                      var Gt = this, Wt = p.getVisibleSegment(Gt, ct, Dt.height / 2);
                      if (Wt && (function(St, Je, nt, ot, Ye, Fe) {
                        for (var pt, Mt = 0; Mt < nt.pedgepaths.length; Mt++) Je === nt.pedgepaths[Mt] && (pt = nt.edgepaths[Mt]);
                        if (pt) {
                          var At = Ye.a[0], Rt = Ye.a[Ye.a.length - 1], Ft = Ye.b[0], lt = Ye.b[Ye.b.length - 1], st = S(St, 0, 1), Ot = S(St, ot.total, ot.total - 1), kt = xt(pt[0], st), Bt = ot.total - xt(pt[pt.length - 1], Ot);
                          ot.min < kt && (ot.min = kt), ot.max > Bt && (ot.max = Bt), ot.len = ot.max - ot.min;
                        }
                        function xt(Jt, qt) {
                          var en, Yt = 0, Ht = 0.1;
                          return (Math.abs(Jt[0] - At) < Ht || Math.abs(Jt[0] - Rt) < Ht) && (en = A(Ye.dxydb_rough(Jt[0], Jt[1], Ht)), Yt = Math.max(Yt, Fe * C(qt, en) / 2)), (Math.abs(Jt[1] - Ft) < Ht || Math.abs(Jt[1] - lt) < Ht) && (en = A(Ye.dxyda_rough(Jt[0], Jt[1], Ht)), Yt = Math.max(Yt, Fe * C(qt, en) / 2)), Yt;
                        }
                      }(Gt, $t, Pt, Wt, Le, Dt.height), !(Wt.len < (Dt.width + Dt.height) * c.LABELMIN))) for (var mt = Math.min(Math.ceil(Wt.len / _t), c.LABELMAX), at = 0; at < mt; at++) {
                        var vt = f.findBestTextLocation(Gt, Wt, Dt, Be, ct);
                        if (!vt) break;
                        f.addLabelData(vt, Dt, Be, _e);
                      }
                    });
                  }), Ze.remove(), f.drawLabels(Ge, Be, Ae, we, ge ? _e : null);
                }
                Ie && !Ne && Ce.remove();
              }(T, re, D, z, K, L, U), h.setClipUrl(T, U._clipPathId, D);
            }
            function ye(pe) {
              var be = U.ab2xy(pe[0], pe[1], !0);
              return [I.c2p(be[0]), M.c2p(be[1])];
            }
          });
        };
      }, 70690: function(o, s, n) {
        var l = n(87163), u = n(3208).rb, i = n(9829), h = n(71388), p = n(93049).extendFlat;
        o.exports = p({ lon: h.lon, lat: h.lat, z: { valType: "data_array", editType: "calc" }, radius: { valType: "number", editType: "plot", arrayOk: !0, min: 1, dflt: 30 }, below: { valType: "string", editType: "plot" }, text: h.text, hovertext: h.hovertext, hoverinfo: p({}, i.hoverinfo, { flags: ["lon", "lat", "z", "text", "name"] }), hovertemplate: u(), showlegend: p({}, i.showlegend, { dflt: !1 }) }, l("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 91582: function(o, s, n) {
        var l = n(10721), u = n(34809).isArrayOrTypedArray, i = n(63821).BADNUM, h = n(28379), p = n(34809)._;
        o.exports = function(_, d) {
          for (var f = d._length, c = new Array(f), g = d.z, m = u(g) && g.length, x = 0; x < f; x++) {
            var w = c[x] = {}, k = d.lon[x], S = d.lat[x];
            if (w.lonlat = l(k) && l(S) ? [+k, +S] : [i, i], m) {
              var A = g[x];
              w.z = l(A) ? A : i;
            }
          }
          return h(_, d, { vals: m ? g : [0, 1], containerStr: "", cLetter: "z" }), f && (c[0].t = { labels: { lat: p(_, "lat:") + " ", lon: p(_, "lon:") + " " } }), c;
        };
      }, 95012: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(78766), h = n(88856), p = n(63821).BADNUM, _ = n(39532).makeBlank;
        o.exports = function(d) {
          var f = d[0].trace, c = f.visible === !0 && f._length !== 0, g = f._opts = { heatmap: { layout: { visibility: "none" }, paint: {} }, geojson: _() };
          if (!c) return g;
          var m, x = [], w = f.z, k = f.radius, S = u.isArrayOrTypedArray(w) && w.length, A = u.isArrayOrTypedArray(k);
          for (m = 0; m < d.length; m++) {
            var C = d[m], D = C.lonlat;
            if (D[0] !== p) {
              var L = {};
              if (S) {
                var E = C.z;
                L.z = E !== p ? E : 0;
              }
              A && (L.r = l(k[m]) && k[m] > 0 ? +k[m] : 0), x.push({ type: "Feature", geometry: { type: "Point", coordinates: D }, properties: L });
            }
          }
          var P = h.extractOpts(f), I = P.reversescale ? h.flipScale(P.colorscale) : P.colorscale, M = I[0][1], O = ["interpolate", ["linear"], ["heatmap-density"], 0, i.opacity(M) < 1 ? M : i.addOpacity(M, 0)];
          for (m = 1; m < I.length; m++) O.push(I[m][0], I[m][1]);
          var T = ["interpolate", ["linear"], ["get", "z"], P.min, 0, P.max, 1];
          return u.extendFlat(g.heatmap.paint, { "heatmap-weight": S ? T : 1 / (P.max - P.min), "heatmap-color": O, "heatmap-radius": A ? { type: "identity", property: "r" } : f.radius, "heatmap-opacity": f.opacity }), g.geojson = { type: "FeatureCollection", features: x }, g.heatmap.layout.visibility = "visible", g;
        };
      }, 9653: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(70690);
        o.exports = function(h, p, _, d) {
          function f(x, w) {
            return l.coerce(h, p, i, x, w);
          }
          var c = f("lon") || [], g = f("lat") || [], m = Math.min(c.length, g.length);
          m ? (p._length = m, f("z"), f("radius"), f("below"), f("text"), f("hovertext"), f("hovertemplate"), u(h, p, d, f, { prefix: "", cLetter: "z" })) : p.visible = !1;
        };
      }, 16302: function(o) {
        o.exports = function(s, n) {
          return s.lon = n.lon, s.lat = n.lat, s.z = n.z, s;
        };
      }, 28045: function(o, s, n) {
        var l = n(29714), u = n(67275).hoverPoints, i = n(67275).getExtraText;
        o.exports = function(h, p, _) {
          var d = u(h, p, _);
          if (d) {
            var f = d[0], c = f.cd, g = c[0].trace, m = c[f.index];
            if (delete f.color, "z" in m) {
              var x = f.subplot.mockAxis;
              f.z = m.z, f.zLabel = l.tickText(x, x.c2l(m.z), "hover").text;
            }
            return f.extraText = i(g, m, c[0].t.labels), [f];
          }
        };
      }, 91995: function(o, s, n) {
        o.exports = { attributes: n(70690), supplyDefaults: n(9653), colorbar: n(12431), formatLabels: n(66762), calc: n(91582), plot: n(99932), hoverPoints: n(28045), eventData: n(16302), getBelow: function(l, u) {
          for (var i = u.getMapLayers(), h = 0; h < i.length; h++) {
            var p = i[h], _ = p.id;
            if (p.type === "symbol" && typeof _ == "string" && _.indexOf("plotly-") === -1) return _;
          }
        }, moduleType: "trace", name: "densitymap", basePlotModule: n(34091), categories: ["map", "gl", "showLegend"], meta: { hr_name: "density_map" } };
      }, 99932: function(o, s, n) {
        var l = n(95012), u = n(8814).traceLayerPrefix;
        function i(p, _) {
          this.type = "densitymap", this.subplot = p, this.uid = _, this.sourceId = "source-" + _, this.layerList = [["heatmap", u + _ + "-heatmap"]], this.below = null;
        }
        var h = i.prototype;
        h.update = function(p) {
          var _ = this.subplot, d = this.layerList, f = l(p), c = _.belowLookup["trace-" + this.uid];
          _.map.getSource(this.sourceId).setData(f.geojson), c !== this.below && (this._removeLayers(), this._addLayers(f, c), this.below = c);
          for (var g = 0; g < d.length; g++) {
            var m = d[g], x = m[0], w = m[1], k = f[x];
            _.setOptions(w, "setLayoutProperty", k.layout), k.layout.visibility === "visible" && _.setOptions(w, "setPaintProperty", k.paint);
          }
        }, h._addLayers = function(p, _) {
          for (var d = this.subplot, f = this.layerList, c = this.sourceId, g = 0; g < f.length; g++) {
            var m = f[g], x = m[0], w = p[x];
            d.addLayer({ type: x, id: m[1], source: c, layout: w.layout, paint: w.paint }, _);
          }
        }, h._removeLayers = function() {
          for (var p = this.subplot.map, _ = this.layerList, d = _.length - 1; d >= 0; d--) p.removeLayer(_[d][1]);
        }, h.dispose = function() {
          var p = this.subplot.map;
          this._removeLayers(), p.removeSource(this.sourceId);
        }, o.exports = function(p, _) {
          var d = _[0].trace, f = new i(p, d.uid), c = f.sourceId, g = l(_), m = f.below = p.belowLookup["trace-" + d.uid];
          return p.map.addSource(c, { type: "geojson", data: g.geojson }), f._addLayers(g, m), f;
        };
      }, 17347: function(o, s, n) {
        var l = n(87163), u = n(3208).rb, i = n(9829), h = n(95833), p = n(93049).extendFlat;
        o.exports = p({ lon: h.lon, lat: h.lat, z: { valType: "data_array", editType: "calc" }, radius: { valType: "number", editType: "plot", arrayOk: !0, min: 1, dflt: 30 }, below: { valType: "string", editType: "plot" }, text: h.text, hovertext: h.hovertext, hoverinfo: p({}, i.hoverinfo, { flags: ["lon", "lat", "z", "text", "name"] }), hovertemplate: u(), showlegend: p({}, i.showlegend, { dflt: !1 }) }, l("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 60675: function(o, s, n) {
        var l = n(10721), u = n(34809).isArrayOrTypedArray, i = n(63821).BADNUM, h = n(28379), p = n(34809)._;
        o.exports = function(_, d) {
          for (var f = d._length, c = new Array(f), g = d.z, m = u(g) && g.length, x = 0; x < f; x++) {
            var w = c[x] = {}, k = d.lon[x], S = d.lat[x];
            if (w.lonlat = l(k) && l(S) ? [+k, +S] : [i, i], m) {
              var A = g[x];
              w.z = l(A) ? A : i;
            }
          }
          return h(_, d, { vals: m ? g : [0, 1], containerStr: "", cLetter: "z" }), f && (c[0].t = { labels: { lat: p(_, "lat:") + " ", lon: p(_, "lon:") + " " } }), c;
        };
      }, 78391: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(78766), h = n(88856), p = n(63821).BADNUM, _ = n(39532).makeBlank;
        o.exports = function(d) {
          var f = d[0].trace, c = f.visible === !0 && f._length !== 0, g = f._opts = { heatmap: { layout: { visibility: "none" }, paint: {} }, geojson: _() };
          if (!c) return g;
          var m, x = [], w = f.z, k = f.radius, S = u.isArrayOrTypedArray(w) && w.length, A = u.isArrayOrTypedArray(k);
          for (m = 0; m < d.length; m++) {
            var C = d[m], D = C.lonlat;
            if (D[0] !== p) {
              var L = {};
              if (S) {
                var E = C.z;
                L.z = E !== p ? E : 0;
              }
              A && (L.r = l(k[m]) && k[m] > 0 ? +k[m] : 0), x.push({ type: "Feature", geometry: { type: "Point", coordinates: D }, properties: L });
            }
          }
          var P = h.extractOpts(f), I = P.reversescale ? h.flipScale(P.colorscale) : P.colorscale, M = I[0][1], O = ["interpolate", ["linear"], ["heatmap-density"], 0, i.opacity(M) < 1 ? M : i.addOpacity(M, 0)];
          for (m = 1; m < I.length; m++) O.push(I[m][0], I[m][1]);
          var T = ["interpolate", ["linear"], ["get", "z"], P.min, 0, P.max, 1];
          return u.extendFlat(g.heatmap.paint, { "heatmap-weight": S ? T : 1 / (P.max - P.min), "heatmap-color": O, "heatmap-radius": A ? { type: "identity", property: "r" } : f.radius, "heatmap-opacity": f.opacity }), g.geojson = { type: "FeatureCollection", features: x }, g.heatmap.layout.visibility = "visible", g;
        };
      }, 1892: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(17347);
        o.exports = function(h, p, _, d) {
          function f(x, w) {
            return l.coerce(h, p, i, x, w);
          }
          var c = f("lon") || [], g = f("lat") || [], m = Math.min(c.length, g.length);
          m ? (p._length = m, f("z"), f("radius"), f("below"), f("text"), f("hovertext"), f("hovertemplate"), u(h, p, d, f, { prefix: "", cLetter: "z" })) : p.visible = !1;
        };
      }, 8919: function(o) {
        o.exports = function(s, n) {
          return s.lon = n.lon, s.lat = n.lat, s.z = n.z, s;
        };
      }, 54478: function(o, s, n) {
        var l = n(29714), u = n(18016).hoverPoints, i = n(18016).getExtraText;
        o.exports = function(h, p, _) {
          var d = u(h, p, _);
          if (d) {
            var f = d[0], c = f.cd, g = c[0].trace, m = c[f.index];
            if (delete f.color, "z" in m) {
              var x = f.subplot.mockAxis;
              f.z = m.z, f.zLabel = l.tickText(x, x.c2l(m.z), "hover").text;
            }
            return f.extraText = i(g, m, c[0].t.labels), [f];
          }
        };
      }, 81264: function(o, s, n) {
        o.exports = { attributes: n(17347), supplyDefaults: n(1892), colorbar: n(12431), formatLabels: n(69009), calc: n(60675), plot: n(5165), hoverPoints: n(54478), eventData: n(8919), getBelow: function(l, u) {
          for (var i = u.getMapLayers(), h = 0; h < i.length; h++) {
            var p = i[h], _ = p.id;
            if (p.type === "symbol" && typeof _ == "string" && _.indexOf("plotly-") === -1) return _;
          }
        }, moduleType: "trace", name: "densitymapbox", basePlotModule: n(68192), categories: ["mapbox", "gl", "showLegend"], meta: { hr_name: "density_mapbox" } };
      }, 5165: function(o, s, n) {
        var l = n(78391), u = n(44245).traceLayerPrefix;
        function i(p, _) {
          this.type = "densitymapbox", this.subplot = p, this.uid = _, this.sourceId = "source-" + _, this.layerList = [["heatmap", u + _ + "-heatmap"]], this.below = null;
        }
        var h = i.prototype;
        h.update = function(p) {
          var _ = this.subplot, d = this.layerList, f = l(p), c = _.belowLookup["trace-" + this.uid];
          _.map.getSource(this.sourceId).setData(f.geojson), c !== this.below && (this._removeLayers(), this._addLayers(f, c), this.below = c);
          for (var g = 0; g < d.length; g++) {
            var m = d[g], x = m[0], w = m[1], k = f[x];
            _.setOptions(w, "setLayoutProperty", k.layout), k.layout.visibility === "visible" && _.setOptions(w, "setPaintProperty", k.paint);
          }
        }, h._addLayers = function(p, _) {
          for (var d = this.subplot, f = this.layerList, c = this.sourceId, g = 0; g < f.length; g++) {
            var m = f[g], x = m[0], w = p[x];
            d.addLayer({ type: x, id: m[1], source: c, layout: w.layout, paint: w.paint }, _);
          }
        }, h._removeLayers = function() {
          for (var p = this.subplot.map, _ = this.layerList, d = _.length - 1; d >= 0; d--) p.removeLayer(_[d][1]);
        }, h.dispose = function() {
          var p = this.subplot.map;
          this._removeLayers(), p.removeSource(this.sourceId);
        }, o.exports = function(p, _) {
          var d = _[0].trace, f = new i(p, d.uid), c = f.sourceId, g = l(_), m = f.below = p.belowLookup["trace-" + d.uid];
          return p.map.addSource(c, { type: "geojson", data: g.geojson }), f._addLayers(g, m), f;
        };
      }, 43179: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          for (var h = 0; h < u.length; h++) u[h].i = h;
          l.mergeArray(i.text, u, "tx"), l.mergeArray(i.hovertext, u, "htx");
          var p = i.marker;
          if (p) {
            l.mergeArray(p.opacity, u, "mo"), l.mergeArray(p.color, u, "mc");
            var _ = p.line;
            _ && (l.mergeArray(_.color, u, "mlc"), l.mergeArrayCastPositive(_.width, u, "mlw"));
          }
        };
      }, 62824: function(o, s, n) {
        var l, u = n(81481), i = n(36640).line, h = n(9829), p = n(80712).axisHoverFormat, _ = n(3208).rb, d = n(3208).ay, f = n(87948), c = n(93049).extendFlat, g = n(78766);
        o.exports = { x: u.x, x0: u.x0, dx: u.dx, y: u.y, y0: u.y0, dy: u.dy, xperiod: u.xperiod, yperiod: u.yperiod, xperiod0: u.xperiod0, yperiod0: u.yperiod0, xperiodalignment: u.xperiodalignment, yperiodalignment: u.yperiodalignment, xhoverformat: p("x"), yhoverformat: p("y"), hovertext: u.hovertext, hovertemplate: _({}, { keys: f.eventDataKeys }), hoverinfo: c({}, h.hoverinfo, { flags: ["name", "x", "y", "text", "percent initial", "percent previous", "percent total"] }), textinfo: { valType: "flaglist", flags: ["label", "text", "percent initial", "percent previous", "percent total", "value"], extras: ["none"], editType: "plot", arrayOk: !1 }, texttemplate: d({ editType: "plot" }, { keys: f.eventDataKeys.concat(["label", "value"]) }), text: u.text, textposition: u.textposition, insidetextanchor: c({}, u.insidetextanchor, { dflt: "middle" }), textangle: c({}, u.textangle, { dflt: 0 }), textfont: u.textfont, insidetextfont: u.insidetextfont, outsidetextfont: u.outsidetextfont, constraintext: u.constraintext, cliponaxis: u.cliponaxis, orientation: c({}, u.orientation, {}), offset: c({}, u.offset, { arrayOk: !1 }), width: c({}, u.width, { arrayOk: !1 }), marker: (l = c({}, u.marker), delete l.pattern, delete l.cornerradius, l), connector: { fillcolor: { valType: "color", editType: "style" }, line: { color: c({}, i.color, { dflt: g.defaultLine }), width: c({}, i.width, { dflt: 0, editType: "plot" }), dash: i.dash, editType: "style" }, visible: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, offsetgroup: u.offsetgroup, alignmentgroup: u.alignmentgroup, zorder: u.zorder };
      }, 28152: function(o, s, n) {
        var l = n(29714), u = n(40528), i = n(43179), h = n(48861), p = n(63821).BADNUM;
        function _(d) {
          return d === p ? 0 : d;
        }
        o.exports = function(d, f) {
          var c, g, m, x, w, k, S, A, C = l.getFromId(d, f.xaxis || "x"), D = l.getFromId(d, f.yaxis || "y");
          f.orientation === "h" ? (c = C.makeCalcdata(f, "x"), m = D.makeCalcdata(f, "y"), x = u(f, D, "y", m), w = !!f.yperiodalignment, k = "y") : (c = D.makeCalcdata(f, "y"), m = C.makeCalcdata(f, "x"), x = u(f, C, "x", m), w = !!f.xperiodalignment, k = "x"), g = x.vals;
          var L, E = Math.min(g.length, c.length), P = new Array(E);
          for (f._base = [], S = 0; S < E; S++) {
            c[S] < 0 && (c[S] = p);
            var I = !1;
            c[S] !== p && S + 1 < E && c[S + 1] !== p && (I = !0), A = P[S] = { p: g[S], s: c[S], cNext: I }, f._base[S] = -0.5 * A.s, w && (P[S].orig_p = m[S], P[S][k + "End"] = x.ends[S], P[S][k + "Start"] = x.starts[S]), f.ids && (A.id = String(f.ids[S])), S === 0 && (P[0].vTotal = 0), P[0].vTotal += _(A.s), A.begR = _(A.s) / _(P[0].s);
          }
          for (S = 0; S < E; S++) (A = P[S]).s !== p && (A.sumR = A.s / P[0].vTotal, A.difR = L !== void 0 ? A.s / L : 1, L = A.s);
          return i(P, f), h(P, f), P;
        };
      }, 87948: function(o) {
        o.exports = { eventDataKeys: ["percentInitial", "percentPrevious", "percentTotal"] };
      }, 82539: function(o, s, n) {
        var l = n(24782).setGroupPositions;
        o.exports = function(u, i) {
          var h, p, _ = u._fullLayout, d = u._fullData, f = u.calcdata, c = i.xaxis, g = i.yaxis, m = [], x = [], w = [];
          for (p = 0; p < d.length; p++) {
            var k = d[p], S = k.orientation === "h";
            k.visible === !0 && k.xaxis === c._id && k.yaxis === g._id && k.type === "funnel" && (h = f[p], S ? w.push(h) : x.push(h), m.push(h));
          }
          var A = { mode: _.funnelmode, norm: _.funnelnorm, gap: _.funnelgap, groupgap: _.funnelgroupgap };
          for (l(u, c, g, x, A), l(u, g, c, w, A), p = 0; p < m.length; p++) {
            h = m[p];
            for (var C = 0; C < h.length; C++) C + 1 < h.length && (h[C].nextP0 = h[C + 1].p0, h[C].nextS0 = h[C + 1].s0, h[C].nextP1 = h[C + 1].p1, h[C].nextS1 = h[C + 1].s1);
          }
        };
      }, 30495: function(o, s, n) {
        var l = n(34809), u = n(36301), i = n(17550).handleText, h = n(99867), p = n(99669), _ = n(62824), d = n(78766);
        o.exports = { supplyDefaults: function(f, c, g, m) {
          function x(A, C) {
            return l.coerce(f, c, _, A, C);
          }
          if (h(f, c, m, x)) {
            p(f, c, m, x), x("xhoverformat"), x("yhoverformat"), x("orientation", c.y && !c.x ? "v" : "h"), x("offset"), x("width");
            var w = x("text");
            x("hovertext"), x("hovertemplate");
            var k = x("textposition");
            i(f, c, m, x, k, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), c.textposition === "none" || c.texttemplate || x("textinfo", l.isArrayOrTypedArray(w) ? "text+value" : "value");
            var S = x("marker.color", g);
            x("marker.line.color", d.defaultLine), x("marker.line.width"), x("connector.visible") && (x("connector.fillcolor", function(A) {
              var C = l.isArrayOrTypedArray(A) ? "#000" : A;
              return d.addOpacity(C, 0.5 * d.opacity(C));
            }(S)), x("connector.line.width") && (x("connector.line.color"), x("connector.line.dash"))), x("zorder");
          } else c.visible = !1;
        }, crossTraceDefaults: function(f, c) {
          var g, m;
          function x(k) {
            return l.coerce(m._input, m, _, k);
          }
          if (c.funnelmode === "group") for (var w = 0; w < f.length; w++) g = (m = f[w])._input, u(g, m, c, x);
        } };
      }, 29412: function(o) {
        o.exports = function(s, n) {
          return s.x = "xVal" in n ? n.xVal : n.x, s.y = "yVal" in n ? n.yVal : n.y, "percentInitial" in n && (s.percentInitial = n.percentInitial), "percentPrevious" in n && (s.percentPrevious = n.percentPrevious), "percentTotal" in n && (s.percentTotal = n.percentTotal), n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), s;
        };
      }, 27759: function(o, s, n) {
        var l = n(78766).opacity, u = n(91664).hoverOnBars, i = n(34809).formatPercent;
        o.exports = function(h, p, _, d, f) {
          var c = u(h, p, _, d, f);
          if (c) {
            var g = c.cd, m = g[0].trace, x = m.orientation === "h", w = g[c.index];
            c[(x ? "x" : "y") + "LabelVal"] = w.s, c.percentInitial = w.begR, c.percentInitialLabel = i(w.begR, 1), c.percentPrevious = w.difR, c.percentPreviousLabel = i(w.difR, 1), c.percentTotal = w.sumR, c.percentTotalLabel = i(w.sumR, 1);
            var k = w.hi || m.hoverinfo, S = [];
            if (k && k !== "none" && k !== "skip") {
              var A = k === "all", C = k.split("+"), D = function(L) {
                return A || C.indexOf(L) !== -1;
              };
              D("percent initial") && S.push(c.percentInitialLabel + " of initial"), D("percent previous") && S.push(c.percentPreviousLabel + " of previous"), D("percent total") && S.push(c.percentTotalLabel + " of total");
            }
            return c.extraText = S.join("<br>"), c.color = function(L, E) {
              var P = L.marker, I = E.mc || P.color, M = E.mlc || P.line.color, O = E.mlw || P.line.width;
              return l(I) ? I : l(M) && O ? M : void 0;
            }(m, w), [c];
          }
        };
      }, 52213: function(o, s, n) {
        o.exports = { attributes: n(62824), layoutAttributes: n(93795), supplyDefaults: n(30495).supplyDefaults, crossTraceDefaults: n(30495).crossTraceDefaults, supplyLayoutDefaults: n(34980), calc: n(28152), crossTraceCalc: n(82539), plot: n(83482), style: n(7240).style, hoverPoints: n(27759), eventData: n(29412), selectPoints: n(88384), moduleType: "trace", name: "funnel", basePlotModule: n(37703), categories: ["bar-like", "cartesian", "svg", "oriented", "showLegend", "zoomScale"], meta: {} };
      }, 93795: function(o) {
        o.exports = { funnelmode: { valType: "enumerated", values: ["stack", "group", "overlay"], dflt: "stack", editType: "calc" }, funnelgap: { valType: "number", min: 0, max: 1, editType: "calc" }, funnelgroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" } };
      }, 34980: function(o, s, n) {
        var l = n(34809), u = n(93795);
        o.exports = function(i, h, p) {
          var _ = !1;
          function d(g, m) {
            return l.coerce(i, h, u, g, m);
          }
          for (var f = 0; f < p.length; f++) {
            var c = p[f];
            if (c.visible && c.type === "funnel") {
              _ = !0;
              break;
            }
          }
          _ && (d("funnelmode"), d("funnelgap", 0.2), d("funnelgroupgap"));
        };
      }, 83482: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(63821).BADNUM, p = n(32995), _ = n(84102).clearMinTextSize;
        function d(f, c, g, m) {
          var x = [], w = [], k = m ? c : g, S = m ? g : c;
          return x[0] = k.c2p(f.s0, !0), w[0] = S.c2p(f.p0, !0), x[1] = k.c2p(f.s1, !0), w[1] = S.c2p(f.p1, !0), x[2] = k.c2p(f.nextS0, !0), w[2] = S.c2p(f.nextP0, !0), x[3] = k.c2p(f.nextS1, !0), w[3] = S.c2p(f.nextP1, !0), m ? [x, w] : [w, x];
        }
        o.exports = function(f, c, g, m) {
          var x = f._fullLayout;
          _("funnel", x), function(w, k, S, A) {
            var C = k.xaxis, D = k.yaxis;
            u.makeTraceGroups(A, S, "trace bars").each(function(L) {
              var E = l.select(this), P = L[0].trace, I = u.ensureSingle(E, "g", "regions");
              if (P.connector && P.connector.visible) {
                var M = P.orientation === "h", O = I.selectAll("g.region").data(u.identity);
                O.enter().append("g").classed("region", !0), O.exit().remove();
                var T = O.size();
                O.each(function(z, F) {
                  if (F === T - 1 || z.cNext) {
                    var U = d(z, C, D, M), V = U[0], $ = U[1], q = "";
                    V[0] !== h && $[0] !== h && V[1] !== h && $[1] !== h && V[2] !== h && $[2] !== h && V[3] !== h && $[3] !== h && (q += M ? "M" + V[0] + "," + $[1] + "L" + V[2] + "," + $[2] + "H" + V[3] + "L" + V[1] + "," + $[1] + "Z" : "M" + V[1] + "," + $[1] + "L" + V[2] + "," + $[3] + "V" + $[2] + "L" + V[1] + "," + $[0] + "Z"), q === "" && (q = "M0,0Z"), u.ensureSingle(l.select(this), "path").attr("d", q).call(i.setClipUrl, k.layerClipId, w);
                  }
                });
              } else I.remove();
            });
          }(f, c, g, m), function(w, k, S, A) {
            var C = k.xaxis, D = k.yaxis;
            u.makeTraceGroups(A, S, "trace bars").each(function(L) {
              var E = l.select(this), P = L[0].trace, I = u.ensureSingle(E, "g", "lines");
              if (P.connector && P.connector.visible && P.connector.line.width) {
                var M = P.orientation === "h", O = I.selectAll("g.line").data(u.identity);
                O.enter().append("g").classed("line", !0), O.exit().remove();
                var T = O.size();
                O.each(function(z, F) {
                  if (F === T - 1 || z.cNext) {
                    var U = d(z, C, D, M), V = U[0], $ = U[1], q = "";
                    V[3] !== void 0 && $[3] !== void 0 && (M ? (q += "M" + V[0] + "," + $[1] + "L" + V[2] + "," + $[2], q += "M" + V[1] + "," + $[1] + "L" + V[3] + "," + $[2]) : (q += "M" + V[1] + "," + $[1] + "L" + V[2] + "," + $[3], q += "M" + V[1] + "," + $[0] + "L" + V[2] + "," + $[2])), q === "" && (q = "M0,0Z"), u.ensureSingle(l.select(this), "path").attr("d", q).call(i.setClipUrl, k.layerClipId, w);
                  }
                });
              } else I.remove();
            });
          }(f, c, g, m), p.plot(f, c, g, m, { mode: x.funnelmode, norm: x.funnelmode, gap: x.funnelgap, groupgap: x.funnelgroupgap });
        };
      }, 7240: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(78766), h = n(20438).DESELECTDIM, p = n(6851), _ = n(84102).resizeText, d = p.styleTextPoints;
        o.exports = { style: function(f, c, g) {
          var m = g || l.select(f).selectAll('g[class^="funnellayer"]').selectAll("g.trace");
          _(f, m, "funnel"), m.style("opacity", function(x) {
            return x[0].trace.opacity;
          }), m.each(function(x) {
            var w = l.select(this), k = x[0].trace;
            w.selectAll(".point > path").each(function(S) {
              if (!S.isBlank) {
                var A = k.marker;
                l.select(this).call(i.fill, S.mc || A.color).call(i.stroke, S.mlc || A.line.color).call(u.dashLine, A.line.dash, S.mlw || A.line.width).style("opacity", k.selectedpoints && !S.selected ? h : 1);
              }
            }), d(w, k, f), w.selectAll(".regions").each(function() {
              l.select(this).selectAll("path").style("stroke-width", 0).call(i.fill, k.connector.fillcolor);
            }), w.selectAll(".lines").each(function() {
              var S = k.connector.line;
              u.lineGroupStyle(l.select(this).selectAll("path"), S.width, S.color, S.dash);
            });
          });
        } };
      }, 63447: function(o, s, n) {
        var l = n(55412), u = n(9829), i = n(13792).u, h = n(3208).rb, p = n(3208).ay, _ = n(93049).extendFlat;
        o.exports = { labels: l.labels, label0: l.label0, dlabel: l.dlabel, values: l.values, marker: { colors: l.marker.colors, line: { color: _({}, l.marker.line.color, { dflt: null }), width: _({}, l.marker.line.width, { dflt: 1 }), editType: "calc" }, pattern: l.marker.pattern, editType: "calc" }, text: l.text, hovertext: l.hovertext, scalegroup: _({}, l.scalegroup, {}), textinfo: _({}, l.textinfo, { flags: ["label", "text", "value", "percent"] }), texttemplate: p({ editType: "plot" }, { keys: ["label", "color", "value", "text", "percent"] }), hoverinfo: _({}, u.hoverinfo, { flags: ["label", "text", "value", "percent", "name"] }), hovertemplate: h({}, { keys: ["label", "color", "value", "text", "percent"] }), textposition: _({}, l.textposition, { values: ["inside", "none"], dflt: "inside" }), textfont: l.textfont, insidetextfont: l.insidetextfont, title: { text: l.title.text, font: l.title.font, position: _({}, l.title.position, { values: ["top left", "top center", "top right"], dflt: "top center" }), editType: "plot" }, domain: i({ name: "funnelarea", trace: !0, editType: "calc" }), aspectratio: { valType: "number", min: 0, dflt: 1, editType: "plot" }, baseratio: { valType: "number", min: 0, max: 1, dflt: 0.333, editType: "plot" } };
      }, 86817: function(o, s, n) {
        var l = n(44122);
        s.name = "funnelarea", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 2807: function(o, s, n) {
        var l = n(44148);
        o.exports = { calc: function(u, i) {
          return l.calc(u, i);
        }, crossTraceCalc: function(u) {
          l.crossTraceCalc(u, { type: "funnelarea" });
        } };
      }, 79824: function(o, s, n) {
        var l = n(34809), u = n(63447), i = n(13792).N, h = n(17550).handleText, p = n(46979).handleLabelsAndValues, _ = n(46979).handleMarkerDefaults;
        o.exports = function(d, f, c, g) {
          function m(E, P) {
            return l.coerce(d, f, u, E, P);
          }
          var x = m("labels"), w = m("values"), k = p(x, w), S = k.len;
          if (f._hasLabels = k.hasLabels, f._hasValues = k.hasValues, !f._hasLabels && f._hasValues && (m("label0"), m("dlabel")), S) {
            f._length = S, _(d, f, g, m), m("scalegroup");
            var A, C = m("text"), D = m("texttemplate");
            if (D || (A = m("textinfo", Array.isArray(C) ? "text+percent" : "percent")), m("hovertext"), m("hovertemplate"), D || A && A !== "none") {
              var L = m("textposition");
              h(d, f, g, m, L, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 });
            } else A === "none" && m("textposition", "none");
            i(f, g, m), m("title.text") && (m("title.position"), l.coerceFont(m, "title.font", g.font)), m("aspectratio"), m("baseratio");
          } else f.visible = !1;
        };
      }, 91132: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "funnelarea", basePlotModule: n(86817), categories: ["pie-like", "funnelarea", "showLegend"], attributes: n(63447), layoutAttributes: n(10270), supplyDefaults: n(79824), supplyLayoutDefaults: n(69161), calc: n(2807).calc, crossTraceCalc: n(2807).crossTraceCalc, plot: n(96673), style: n(13757), styleOne: n(32891), meta: {} };
      }, 10270: function(o, s, n) {
        var l = n(4031).hiddenlabels;
        o.exports = { hiddenlabels: l, funnelareacolorway: { valType: "colorlist", editType: "calc" }, extendfunnelareacolors: { valType: "boolean", dflt: !0, editType: "calc" } };
      }, 69161: function(o, s, n) {
        var l = n(34809), u = n(10270);
        o.exports = function(i, h) {
          function p(_, d) {
            return l.coerce(i, h, u, _, d);
          }
          p("hiddenlabels"), p("funnelareacolorway", h.colorway), p("extendfunnelareacolors");
        };
      }, 96673: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(34809), h = i.strScale, p = i.strTranslate, _ = n(30635), d = n(32995).toMoveInsideBar, f = n(84102), c = f.recordMinTextSize, g = f.clearMinTextSize, m = n(37252), x = n(35734), w = x.attachFxHandlers, k = x.determineInsideTextFont, S = x.layoutAreas, A = x.prerenderTitles, C = x.positionTitleOutside, D = x.formatSliceLabel;
        function L(E, P) {
          return "l" + (P[0] - E[0]) + "," + (P[1] - E[1]);
        }
        o.exports = function(E, P) {
          var I = E._context.staticPlot, M = E._fullLayout;
          g("funnelarea", M), A(P, E), S(P, M._size), i.makeTraceGroups(M._funnelarealayer, P, "trace").each(function(O) {
            var T = l.select(this), z = O[0], F = z.trace;
            (function(U) {
              if (U.length) {
                var V = U[0], $ = V.trace, q = $.aspectratio, K = $.baseratio;
                K > 0.999 && (K = 0.999);
                var re, Y, te, ee = Math.pow(K, 2), X = V.vTotal, Q = X, ue = X * ee / (1 - ee) / X, ce = [];
                for (ce.push(Ee()), Y = U.length - 1; Y > -1; Y--) if (!(te = U[Y]).hidden) {
                  var he = te.v / Q;
                  ue += he, ce.push(Ee());
                }
                var de = 1 / 0, ne = -1 / 0;
                for (Y = 0; Y < ce.length; Y++) re = ce[Y], de = Math.min(de, re[1]), ne = Math.max(ne, re[1]);
                for (Y = 0; Y < ce.length; Y++) ce[Y][1] -= (ne + de) / 2;
                var ae = ce[ce.length - 1][0], se = V.r, me = (ne - de) / 2, ye = se / ae, pe = se / me * q;
                for (V.r = pe * me, Y = 0; Y < ce.length; Y++) ce[Y][0] *= ye, ce[Y][1] *= pe;
                var be, Ae, Se = [-(re = ce[0])[0], re[1]], Me = [re[0], re[1]], De = 0;
                for (Y = U.length - 1; Y > -1; Y--) if (!(te = U[Y]).hidden) {
                  var Le = ce[De += 1][0], We = ce[De][1];
                  te.TL = [-Le, We], te.TR = [Le, We], te.BL = Se, te.BR = Me, te.pxmid = (be = te.TR, Ae = te.BR, [0.5 * (be[0] + Ae[0]), 0.5 * (be[1] + Ae[1])]), Se = te.TL, Me = te.TR;
                }
              }
              function Ee() {
                var Ne, Ie = { x: Ne = Math.sqrt(ue), y: -Ne };
                return [Ie.x, Ie.y];
              }
            })(O), T.each(function() {
              var U = l.select(this).selectAll("g.slice").data(O);
              U.enter().append("g").classed("slice", !0), U.exit().remove(), U.each(function($, q) {
                if ($.hidden) l.select(this).selectAll("path,g").remove();
                else {
                  $.pointNumber = $.i, $.curveNumber = F.index;
                  var K = z.cx, re = z.cy, Y = l.select(this), te = Y.selectAll("path.surface").data([$]);
                  te.enter().append("path").classed("surface", !0).style({ "pointer-events": I ? "none" : "all" }), Y.call(w, E, O);
                  var ee = "M" + (K + $.TR[0]) + "," + (re + $.TR[1]) + L($.TR, $.BR) + L($.BR, $.BL) + L($.BL, $.TL) + "Z";
                  te.attr("d", ee), D(E, $, z);
                  var X = m.castOption(F.textposition, $.pts), Q = Y.selectAll("g.slicetext").data($.text && X !== "none" ? [0] : []);
                  Q.enter().append("g").classed("slicetext", !0), Q.exit().remove(), Q.each(function() {
                    var ue = i.ensureSingle(l.select(this), "text", "", function(ye) {
                      ye.attr("data-notex", 1);
                    }), ce = i.ensureUniformFontSize(E, k(F, $, M.font));
                    ue.text($.text).attr({ class: "slicetext", transform: "", "text-anchor": "middle" }).call(u.font, ce).call(_.convertToTspans, E);
                    var he, de, ne, ae = u.bBox(ue.node()), se = Math.min($.BL[1], $.BR[1]) + re, me = Math.max($.TL[1], $.TR[1]) + re;
                    de = Math.max($.TL[0], $.BL[0]) + K, ne = Math.min($.TR[0], $.BR[0]) + K, (he = d(de, ne, se, me, ae, { isHorizontal: !0, constrained: !0, angle: 0, anchor: "middle" })).fontSize = ce.size, c(F.type, he, M), O[q].transform = he, i.setTransormAndDisplay(ue, he);
                  });
                }
              });
              var V = l.select(this).selectAll("g.titletext").data(F.title.text ? [0] : []);
              V.enter().append("g").classed("titletext", !0), V.exit().remove(), V.each(function() {
                var $ = i.ensureSingle(l.select(this), "text", "", function(re) {
                  re.attr("data-notex", 1);
                }), q = F.title.text;
                F._meta && (q = i.templateString(q, F._meta)), $.text(q).attr({ class: "titletext", transform: "", "text-anchor": "middle" }).call(u.font, F.title.font).call(_.convertToTspans, E);
                var K = C(z, M._size);
                $.attr("transform", p(K.x, K.y) + h(Math.min(1, K.scale)) + p(K.tx, K.ty));
              });
            });
          });
        };
      }, 13757: function(o, s, n) {
        var l = n(45568), u = n(32891), i = n(84102).resizeText;
        o.exports = function(h) {
          var p = h._fullLayout._funnelarealayer.selectAll(".trace");
          i(h, p, "funnelarea"), p.each(function(_) {
            var d = _[0].trace, f = l.select(this);
            f.style({ opacity: d.opacity }), f.selectAll("path.surface").each(function(c) {
              l.select(this).call(u, c, d, h);
            });
          });
        };
      }, 81658: function(o, s, n) {
        var l = n(36640), u = n(9829), i = n(80337), h = n(80712).axisHoverFormat, p = n(3208).rb, _ = n(3208).ay, d = n(87163), f = n(93049).extendFlat;
        o.exports = f({ z: { valType: "data_array", editType: "calc" }, x: f({}, l.x, { impliedEdits: { xtype: "array" } }), x0: f({}, l.x0, { impliedEdits: { xtype: "scaled" } }), dx: f({}, l.dx, { impliedEdits: { xtype: "scaled" } }), y: f({}, l.y, { impliedEdits: { ytype: "array" } }), y0: f({}, l.y0, { impliedEdits: { ytype: "scaled" } }), dy: f({}, l.dy, { impliedEdits: { ytype: "scaled" } }), xperiod: f({}, l.xperiod, { impliedEdits: { xtype: "scaled" } }), yperiod: f({}, l.yperiod, { impliedEdits: { ytype: "scaled" } }), xperiod0: f({}, l.xperiod0, { impliedEdits: { xtype: "scaled" } }), yperiod0: f({}, l.yperiod0, { impliedEdits: { ytype: "scaled" } }), xperiodalignment: f({}, l.xperiodalignment, { impliedEdits: { xtype: "scaled" } }), yperiodalignment: f({}, l.yperiodalignment, { impliedEdits: { ytype: "scaled" } }), text: { valType: "data_array", editType: "calc" }, hovertext: { valType: "data_array", editType: "calc" }, transpose: { valType: "boolean", dflt: !1, editType: "calc" }, xtype: { valType: "enumerated", values: ["array", "scaled"], editType: "calc+clearAxisTypes" }, ytype: { valType: "enumerated", values: ["array", "scaled"], editType: "calc+clearAxisTypes" }, zsmooth: { valType: "enumerated", values: ["fast", "best", !1], dflt: !1, editType: "calc" }, hoverongaps: { valType: "boolean", dflt: !0, editType: "none" }, connectgaps: { valType: "boolean", editType: "calc" }, xgap: { valType: "number", dflt: 0, min: 0, editType: "plot" }, ygap: { valType: "number", dflt: 0, min: 0, editType: "plot" }, xhoverformat: h("x"), yhoverformat: h("y"), zhoverformat: h("z", 1), hovertemplate: p(), texttemplate: _({ arrayOk: !1, editType: "plot" }, { keys: ["x", "y", "z", "text"] }), textfont: i({ editType: "plot", autoSize: !0, autoColor: !0, colorEditType: "style" }), showlegend: f({}, u.showlegend, { dflt: !1 }), zorder: l.zorder }, { transforms: void 0 }, d("", { cLetter: "z", autoColorDflt: !1 }));
      }, 51670: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(29714), h = n(40528), p = n(19226), _ = n(28379), d = n(87869), f = n(93877), c = n(69295), g = n(78106), m = n(80924), x = n(63821).BADNUM;
        function w(k) {
          for (var S = [], A = k.length, C = 0; C < A; C++) {
            var D = k[C];
            D !== x && S.push(D);
          }
          return S;
        }
        o.exports = function(k, S) {
          var A, C, D, L, E, P, I, M, O, T, z, F = i.getFromId(k, S.xaxis || "x"), U = i.getFromId(k, S.yaxis || "y"), V = l.traceIs(S, "contour"), $ = l.traceIs(S, "histogram"), q = l.traceIs(S, "gl2d"), K = V ? "best" : S.zsmooth;
          if (F._minDtick = 0, U._minDtick = 0, $) L = (z = p(k, S)).orig_x, A = z.x, C = z.x0, D = z.dx, M = z.orig_y, E = z.y, P = z.y0, I = z.dy, O = z.z;
          else {
            var re = S.z;
            u.isArray1D(re) ? (d(S, F, U, "x", "y", ["z"]), A = S._x, E = S._y, re = S._z) : (L = S.x ? F.makeCalcdata(S, "x") : [], M = S.y ? U.makeCalcdata(S, "y") : [], A = h(S, F, "x", L).vals, E = h(S, U, "y", M).vals, S._x = A, S._y = E), C = S.x0, D = S.dx, P = S.y0, I = S.dy, O = f(re, S, F, U);
          }
          function Y(ne) {
            K = S._input.zsmooth = S.zsmooth = !1, u.warn('cannot use zsmooth: "fast": ' + ne);
          }
          function te(ne) {
            if (ne.length > 1) {
              var ae = (ne[ne.length - 1] - ne[0]) / (ne.length - 1), se = Math.abs(ae / 100);
              for (T = 0; T < ne.length - 1; T++) if (Math.abs(ne[T + 1] - ne[T] - ae) > se) return !1;
            }
            return !0;
          }
          (F.rangebreaks || U.rangebreaks) && (O = function(ne, ae, se) {
            for (var me = [], ye = -1, pe = 0; pe < se.length; pe++) if (ae[pe] !== x) {
              me[++ye] = [];
              for (var be = 0; be < se[pe].length; be++) ne[be] !== x && me[ye].push(se[pe][be]);
            }
            return me;
          }(A, E, O), $ || (A = w(A), E = w(E), S._x = A, S._y = E)), $ || !V && !S.connectgaps || (S._emptypoints = g(O), c(O, S._emptypoints)), S._islinear = !1, F.type === "log" || U.type === "log" ? K === "fast" && Y("log axis found") : te(A) ? te(E) ? S._islinear = !0 : K === "fast" && Y("y scale is not linear") : K === "fast" && Y("x scale is not linear");
          var ee = u.maxRowLength(O), X = S.xtype === "scaled" ? "" : A, Q = m(S, X, C, D, ee, F), ue = S.ytype === "scaled" ? "" : E, ce = m(S, ue, P, I, O.length, U);
          q || (S._extremes[F._id] = i.findExtremes(F, Q), S._extremes[U._id] = i.findExtremes(U, ce));
          var he = { x: Q, y: ce, z: O, text: S._text || S.text, hovertext: S._hovertext || S.hovertext };
          if (S.xperiodalignment && L && (he.orig_x = L), S.yperiodalignment && M && (he.orig_y = M), X && X.length === Q.length - 1 && (he.xCenter = X), ue && ue.length === ce.length - 1 && (he.yCenter = ue), $ && (he.xRanges = z.xRanges, he.yRanges = z.yRanges, he.pts = z.pts), V || _(k, S, { vals: O, cLetter: "z" }), V && S.contours && S.contours.coloring === "heatmap") {
            var de = { type: S.type === "contour" ? "heatmap" : "histogram2d", xcalendar: S.xcalendar, ycalendar: S.ycalendar };
            he.xfill = m(de, X, C, D, ee, F), he.yfill = m(de, ue, P, I, O.length, U);
          }
          return [he];
        };
      }, 93877: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(63821).BADNUM;
        o.exports = function(h, p, _, d) {
          var f, c, g, m, x, w;
          function k(E) {
            if (l(E)) return +E;
          }
          if (p && p.transpose) {
            for (f = 0, x = 0; x < h.length; x++) f = Math.max(f, h[x].length);
            if (f === 0) return !1;
            g = function(E) {
              return E.length;
            }, m = function(E, P, I) {
              return (E[I] || [])[P];
            };
          } else f = h.length, g = function(E, P) {
            return E[P].length;
          }, m = function(E, P, I) {
            return (E[P] || [])[I];
          };
          var S = function(E, P, I) {
            return P === i || I === i ? i : m(E, P, I);
          };
          function A(E) {
            if (p && p.type !== "carpet" && p.type !== "contourcarpet" && E && E.type === "category" && p["_" + E._id.charAt(0)].length) {
              var P = E._id.charAt(0), I = {}, M = p["_" + P + "CategoryMap"] || p[P];
              for (x = 0; x < M.length; x++) I[M[x]] = x;
              return function(O) {
                var T = I[E._categories[O]];
                return T + 1 ? T : i;
              };
            }
            return u.identity;
          }
          var C = A(_), D = A(d);
          d && d.type === "category" && (f = d._categories.length);
          var L = new Array(f);
          for (x = 0; x < f; x++) for (c = _ && _.type === "category" ? _._categories.length : g(h, x), L[x] = new Array(c), w = 0; w < c; w++) L[x][w] = k(S(h, D(x), C(w)));
          return L;
        };
      }, 12431: function(o) {
        o.exports = { min: "zmin", max: "zmax" };
      }, 87869: function(o, s, n) {
        var l = n(34809), u = n(63821).BADNUM, i = n(40528);
        o.exports = function(h, p, _, d, f, c) {
          var g = h._length, m = p.makeCalcdata(h, d), x = _.makeCalcdata(h, f);
          m = i(h, p, d, m).vals, x = i(h, _, f, x).vals;
          var w, k, S, A, C = h.text, D = C !== void 0 && l.isArray1D(C), L = h.hovertext, E = L !== void 0 && l.isArray1D(L), P = l.distinctVals(m), I = P.vals, M = l.distinctVals(x), O = M.vals, T = [], z = O.length, F = I.length;
          for (w = 0; w < c.length; w++) T[w] = l.init2dArray(z, F);
          D && (S = l.init2dArray(z, F)), E && (A = l.init2dArray(z, F));
          var U = l.init2dArray(z, F);
          for (w = 0; w < g; w++) if (m[w] !== u && x[w] !== u) {
            var V = l.findBin(m[w] + P.minDiff / 2, I), $ = l.findBin(x[w] + M.minDiff / 2, O);
            for (k = 0; k < c.length; k++) {
              var q = h[c[k]];
              T[k][$][V] = q[w], U[$][V] = w;
            }
            D && (S[$][V] = C[w]), E && (A[$][V] = L[w]);
          }
          for (h["_" + d] = I, h["_" + f] = O, k = 0; k < c.length; k++) h["_" + c[k]] = T[k];
          D && (h._text = S), E && (h._hovertext = A), p && p.type === "category" && (h["_" + d + "CategoryMap"] = I.map(function(K) {
            return p._categories[K];
          })), _ && _.type === "category" && (h["_" + f + "CategoryMap"] = O.map(function(K) {
            return _._categories[K];
          })), h._after2before = U;
        };
      }, 52813: function(o, s, n) {
        var l = n(34809), u = n(86073), i = n(63814), h = n(99669), p = n(44143), _ = n(39356), d = n(81658);
        o.exports = function(f, c, g, m) {
          function x(w, k) {
            return l.coerce(f, c, d, w, k);
          }
          u(f, c, x, m) ? (h(f, c, m, x), x("xhoverformat"), x("yhoverformat"), x("text"), x("hovertext"), x("hovertemplate"), i(x, m), p(f, c, x, m), x("hoverongaps"), x("connectgaps", l.isArray1D(c.z) && c.zsmooth !== !1), _(f, c, m, x, { prefix: "", cLetter: "z" }), x("zorder")) : c.visible = !1;
        };
      }, 78106: function(o, s, n) {
        var l = n(34809).maxRowLength;
        o.exports = function(u) {
          var i, h, p, _, d, f, c, g, m = [], x = {}, w = [], k = u[0], S = [], A = [0, 0, 0], C = l(u);
          for (h = 0; h < u.length; h++) for (i = S, S = k, k = u[h + 1] || [], p = 0; p < C; p++) S[p] === void 0 && ((f = (S[p - 1] !== void 0 ? 1 : 0) + (S[p + 1] !== void 0 ? 1 : 0) + (i[p] !== void 0 ? 1 : 0) + (k[p] !== void 0 ? 1 : 0)) ? (h === 0 && f++, p === 0 && f++, h === u.length - 1 && f++, p === S.length - 1 && f++, f < 4 && (x[[h, p]] = [h, p, f]), m.push([h, p, f])) : w.push([h, p]));
          for (; w.length; ) {
            for (c = {}, g = !1, d = w.length - 1; d >= 0; d--) (f = ((x[[(h = (_ = w[d])[0]) - 1, p = _[1]]] || A)[2] + (x[[h + 1, p]] || A)[2] + (x[[h, p - 1]] || A)[2] + (x[[h, p + 1]] || A)[2]) / 20) && (c[_] = [h, p, f], w.splice(d, 1), g = !0);
            if (!g) throw "findEmpties iterated with no new neighbors";
            for (_ in c) x[_] = c[_], m.push(c[_]);
          }
          return m.sort(function(D, L) {
            return L[2] - D[2];
          });
        };
      }, 93125: function(o, s, n) {
        var l = n(32141), u = n(34809), i = u.isArrayOrTypedArray, h = n(29714), p = n(88856).extractOpts;
        o.exports = function(_, d, f, c, g) {
          g || (g = {});
          var m, x, w, k, S = g.isContour, A = _.cd[0], C = A.trace, D = _.xa, L = _.ya, E = A.x, P = A.y, I = A.z, M = A.xCenter, O = A.yCenter, T = A.zmask, z = C.zhoverformat, F = E, U = P;
          if (_.index !== !1) {
            try {
              w = Math.round(_.index[1]), k = Math.round(_.index[0]);
            } catch {
              return void u.error("Error hovering on heatmap, pointNumber must be [row,col], found:", _.index);
            }
            if (w < 0 || w >= I[0].length || k < 0 || k > I.length) return;
          } else {
            if (l.inbox(d - E[0], d - E[E.length - 1], 0) > 0 || l.inbox(f - P[0], f - P[P.length - 1], 0) > 0) return;
            if (S) {
              var V;
              for (F = [2 * E[0] - E[1]], V = 1; V < E.length; V++) F.push((E[V] + E[V - 1]) / 2);
              for (F.push([2 * E[E.length - 1] - E[E.length - 2]]), U = [2 * P[0] - P[1]], V = 1; V < P.length; V++) U.push((P[V] + P[V - 1]) / 2);
              U.push([2 * P[P.length - 1] - P[P.length - 2]]);
            }
            w = Math.max(0, Math.min(F.length - 2, u.findBin(d, F))), k = Math.max(0, Math.min(U.length - 2, u.findBin(f, U)));
          }
          var $, q, K = D.c2p(E[w]), re = D.c2p(E[w + 1]), Y = L.c2p(P[k]), te = L.c2p(P[k + 1]);
          S ? ($ = A.orig_x || E, q = A.orig_y || P, re = K, m = $[w], te = Y, x = q[k]) : ($ = A.orig_x || M || E, q = A.orig_y || O || P, m = M ? $[w] : ($[w] + $[w + 1]) / 2, x = O ? q[k] : (q[k] + q[k + 1]) / 2, D && D.type === "category" && (m = E[w]), L && L.type === "category" && (x = P[k]), C.zsmooth && (K = re = D.c2p(m), Y = te = L.c2p(x)));
          var ee = I[k][w];
          if (T && !T[k][w] && (ee = void 0), ee !== void 0 || C.hoverongaps) {
            var X;
            i(A.hovertext) && i(A.hovertext[k]) ? X = A.hovertext[k][w] : i(A.text) && i(A.text[k]) && (X = A.text[k][w]);
            var Q = p(C), ue = { type: "linear", range: [Q.min, Q.max], hoverformat: z, _separators: D._separators, _numFormat: D._numFormat }, ce = h.tickText(ue, ee, "hover").text;
            return [u.extendFlat(_, { index: C._after2before ? C._after2before[k][w] : [k, w], distance: _.maxHoverDistance, spikeDistance: _.maxSpikeDistance, x0: K, x1: re, y0: Y, y1: te, xLabelVal: m, yLabelVal: x, zLabelVal: ee, zLabel: ce, text: X })];
          }
        };
      }, 29251: function(o, s, n) {
        o.exports = { attributes: n(81658), supplyDefaults: n(52813), calc: n(51670), plot: n(19236), colorbar: n(12431), style: n(12774), hoverPoints: n(93125), moduleType: "trace", name: "heatmap", basePlotModule: n(37703), categories: ["cartesian", "svg", "2dMap", "showLegend"], meta: {} };
      }, 69295: function(o, s, n) {
        var l = n(34809), u = [[-1, 0], [1, 0], [0, -1], [0, 1]];
        function i(p) {
          return 0.5 - 0.25 * Math.min(1, 0.5 * p);
        }
        function h(p, _, d) {
          var f, c, g, m, x, w, k, S, A, C, D, L, E, P = 0;
          for (m = 0; m < _.length; m++) {
            for (c = (f = _[m])[0], g = f[1], D = p[c][g], C = 0, A = 0, x = 0; x < 4; x++) (k = p[c + (w = u[x])[0]]) && (S = k[g + w[1]]) !== void 0 && (C === 0 ? L = E = S : (L = Math.min(L, S), E = Math.max(E, S)), A++, C += S);
            if (A === 0) throw "iterateInterp2d order is wrong: no defined neighbors";
            p[c][g] = C / A, D === void 0 ? A < 4 && (P = 1) : (p[c][g] = (1 + d) * p[c][g] - d * D, E > L && (P = Math.max(P, Math.abs(p[c][g] - D) / (E - L))));
          }
          return P;
        }
        o.exports = function(p, _) {
          var d, f = 1;
          for (h(p, _), d = 0; d < _.length && !(_[d][2] < 4); d++) ;
          for (_ = _.slice(d), d = 0; d < 100 && f > 0.01; d++) f = h(p, _, i(f));
          return f > 0.01 && l.log("interp2d didn't converge quickly", f), p;
        };
      }, 63814: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          u("texttemplate");
          var h = l.extendFlat({}, i.font, { color: "auto", size: "auto" });
          l.coerceFont(u, "textfont", h);
        };
      }, 80924: function(o, s, n) {
        var l = n(33626), u = n(34809).isArrayOrTypedArray;
        o.exports = function(i, h, p, _, d, f) {
          var c, g, m, x = [], w = l.traceIs(i, "contour"), k = l.traceIs(i, "histogram"), S = l.traceIs(i, "gl2d");
          if (u(h) && h.length > 1 && !k && f.type !== "category") {
            var A = h.length;
            if (!(A <= d)) return w ? h.slice(0, d) : h.slice(0, d + 1);
            if (w || S) x = Array.from(h).slice(0, d);
            else if (d === 1) x = f.type === "log" ? [0.5 * h[0], 2 * h[0]] : [h[0] - 0.5, h[0] + 0.5];
            else if (f.type === "log") {
              for (x = [Math.pow(h[0], 1.5) / Math.pow(h[1], 0.5)], m = 1; m < A; m++) x.push(Math.sqrt(h[m - 1] * h[m]));
              x.push(Math.pow(h[A - 1], 1.5) / Math.pow(h[A - 2], 0.5));
            } else {
              for (x = [1.5 * h[0] - 0.5 * h[1]], m = 1; m < A; m++) x.push(0.5 * (h[m - 1] + h[m]));
              x.push(1.5 * h[A - 1] - 0.5 * h[A - 2]);
            }
            if (A < d) {
              var C, D = x[x.length - 1];
              if (f.type === "log") for (C = D / x[x.length - 2], m = A; m < d; m++) D *= C, x.push(D);
              else for (C = D - x[x.length - 2], m = A; m < d; m++) D += C, x.push(D);
            }
          } else {
            var L = i[f._id.charAt(0) + "calendar"];
            for (c = k ? f.r2c(p, 0, L) : u(h) && h.length === 1 ? h[0] : p === void 0 ? 0 : (f.type === "log" ? f.d2c : f.r2c)(p, 0, L), g = _ || 1, m = w || S ? 0 : -0.5; m < d; m++) x.push(c + g * m);
          }
          return x;
        };
      }, 19236: function(o, s, n) {
        var l = n(45568), u = n(65657), i = n(33626), h = n(62203), p = n(29714), _ = n(34809), d = n(30635), f = n(15294), c = n(78766), g = n(88856).extractOpts, m = n(88856).makeColorScaleFuncFromTrace, x = n(62972), w = n(4530).LINE_SPACING, k = n(95544), S = n(1837).STYLE, A = "heatmap-label";
        function C(I) {
          return I.selectAll("g." + A);
        }
        function D(I) {
          C(I).remove();
        }
        function L(I, M) {
          var O = M.length - 2, T = _.constrain(_.findBin(I, M), 0, O), z = M[T], F = M[T + 1], U = _.constrain(T + (I - z) / (F - z) - 0.5, 0, O), V = Math.round(U), $ = Math.abs(U - V);
          return U && U !== O && $ ? { bin0: V, frac: $, bin1: Math.round(V + $ / (U - V)) } : { bin0: V, bin1: V, frac: 0 };
        }
        function E(I, M) {
          var O = M.length - 1, T = _.constrain(_.findBin(I, M), 0, O), z = M[T], F = (I - z) / (M[T + 1] - z) || 0;
          return F <= 0 ? { bin0: T, bin1: T, frac: 0 } : F < 0.5 ? { bin0: T, bin1: T + 1, frac: F } : { bin0: T + 1, bin1: T, frac: 1 - F };
        }
        function P(I, M, O) {
          I[M] = O[0], I[M + 1] = O[1], I[M + 2] = O[2], I[M + 3] = Math.round(255 * O[3]);
        }
        o.exports = function(I, M, O, T) {
          var z = M.xaxis, F = M.yaxis;
          _.makeTraceGroups(T, O, "hm").each(function(U) {
            var V, $, q, K, re, Y, te, ee, X = l.select(this), Q = U[0], ue = Q.trace, ce = ue.xgap || 0, he = ue.ygap || 0, de = Q.z, ne = Q.x, ae = Q.y, se = Q.xCenter, me = Q.yCenter, ye = i.traceIs(ue, "contour"), pe = ye ? "best" : ue.zsmooth, be = de.length, Ae = _.maxRowLength(de), Se = !1, Me = !1;
            for (Y = 0; V === void 0 && Y < ne.length - 1; ) V = z.c2p(ne[Y]), Y++;
            for (Y = ne.length - 1; $ === void 0 && Y > 0; ) $ = z.c2p(ne[Y]), Y--;
            for ($ < V && (q = $, $ = V, V = q, Se = !0), Y = 0; K === void 0 && Y < ae.length - 1; ) K = F.c2p(ae[Y]), Y++;
            for (Y = ae.length - 1; re === void 0 && Y > 0; ) re = F.c2p(ae[Y]), Y--;
            re < K && (q = K, K = re, re = q, Me = !0), ye && (se = ne, me = ae, ne = Q.xfill, ae = Q.yfill);
            var De = "default";
            if (pe ? De = pe === "best" ? "smooth" : "fast" : ue._islinear && ce === 0 && he === 0 && k() && (De = "fast"), De !== "fast") {
              var Le = pe === "best" ? 0 : 0.5;
              V = Math.max(-Le * z._length, V), $ = Math.min((1 + Le) * z._length, $), K = Math.max(-Le * F._length, K), re = Math.min((1 + Le) * F._length, re);
            }
            var We, Ee, Ne = Math.round($ - V), Ie = Math.round(re - K);
            if (V >= z._length || $ <= 0 || K >= F._length || re <= 0) return X.selectAll("image").data([]).exit().remove(), void D(X);
            De === "fast" ? (We = Ae, Ee = be) : (We = Ne, Ee = Ie);
            var ge = document.createElement("canvas");
            ge.width = We, ge.height = Ee;
            var Ce, we, Ge = ge.getContext("2d", { willReadFrequently: !0 }), Re = m(ue, { noNumericCheck: !0, returnArray: !0 });
            De === "fast" ? (Ce = Se ? function(Vr) {
              return Ae - 1 - Vr;
            } : _.identity, we = Me ? function(Vr) {
              return be - 1 - Vr;
            } : _.identity) : (Ce = function(Vr) {
              return _.constrain(Math.round(z.c2p(ne[Vr]) - V), 0, Ne);
            }, we = function(Vr) {
              return _.constrain(Math.round(F.c2p(ae[Vr]) - K), 0, Ie);
            });
            var je, Ke, tt, _e, Be = we(0), $e = [Be, Be], Ze = Se ? 0 : 1, ct = Me ? 0 : 1, ft = 0, _t = 0, Pt = 0, Dt = 0;
            function $t(Vr, rn) {
              if (Vr !== void 0) {
                var Tn = Re(Vr);
                return Tn[0] = Math.round(Tn[0]), Tn[1] = Math.round(Tn[1]), Tn[2] = Math.round(Tn[2]), ft += rn, _t += Tn[0] * rn, Pt += Tn[1] * rn, Dt += Tn[2] * rn, Tn;
              }
              return [0, 0, 0, 0];
            }
            function Gt(Vr, rn, Tn, sr) {
              var $n = Vr[Tn.bin0];
              if ($n === void 0) return $t(void 0, 1);
              var ur, Tr = Vr[Tn.bin1], wr = rn[Tn.bin0], Fr = rn[Tn.bin1], Xr = Tr - $n || 0, un = wr - $n || 0;
              return ur = Tr === void 0 ? Fr === void 0 ? 0 : wr === void 0 ? 2 * (Fr - $n) : 2 * (2 * Fr - wr - $n) / 3 : Fr === void 0 ? wr === void 0 ? 0 : 2 * (2 * $n - Tr - wr) / 3 : wr === void 0 ? 2 * (2 * Fr - Tr - $n) / 3 : Fr + $n - Tr - wr, $t($n + Tn.frac * Xr + sr.frac * (un + Tn.frac * ur));
            }
            if (De !== "default") {
              var Wt, mt = 0;
              try {
                Wt = new Uint8Array(We * Ee * 4);
              } catch {
                Wt = new Array(We * Ee * 4);
              }
              if (De === "smooth") {
                var at, vt, St, Je = se || ne, nt = me || ae, ot = new Array(Je.length), Ye = new Array(nt.length), Fe = new Array(Ne), pt = se ? E : L, Mt = me ? E : L;
                for (Y = 0; Y < Je.length; Y++) ot[Y] = Math.round(z.c2p(Je[Y]) - V);
                for (Y = 0; Y < nt.length; Y++) Ye[Y] = Math.round(F.c2p(nt[Y]) - K);
                for (Y = 0; Y < Ne; Y++) Fe[Y] = pt(Y, ot);
                for (te = 0; te < Ie; te++) for (vt = de[(at = Mt(te, Ye)).bin0], St = de[at.bin1], Y = 0; Y < Ne; Y++, mt += 4) P(Wt, mt, _e = Gt(vt, St, Fe[Y], at));
              } else for (te = 0; te < be; te++) for (tt = de[te], $e = we(te), Y = 0; Y < Ae; Y++) _e = $t(tt[Y], 1), P(Wt, mt = 4 * ($e * Ae + Ce(Y)), _e);
              var At = Ge.createImageData(We, Ee);
              try {
                At.data.set(Wt);
              } catch {
                var Rt = At.data, Ft = Rt.length;
                for (te = 0; te < Ft; te++) Rt[te] = Wt[te];
              }
              Ge.putImageData(At, 0, 0);
            } else {
              var lt = Math.floor(ce / 2), st = Math.floor(he / 2);
              for (te = 0; te < be; te++) if (tt = de[te], $e.reverse(), $e[ct] = we(te + 1), $e[0] !== $e[1] && $e[0] !== void 0 && $e[1] !== void 0) for (je = [Ke = Ce(0), Ke], Y = 0; Y < Ae; Y++) je.reverse(), je[Ze] = Ce(Y + 1), je[0] !== je[1] && je[0] !== void 0 && je[1] !== void 0 && (_e = $t(tt[Y], (je[1] - je[0]) * ($e[1] - $e[0])), Ge.fillStyle = "rgba(" + _e.join(",") + ")", Ge.fillRect(je[0] + lt, $e[0] + st, je[1] - je[0] - ce, $e[1] - $e[0] - he));
            }
            _t = Math.round(_t / ft), Pt = Math.round(Pt / ft), Dt = Math.round(Dt / ft);
            var Ot = u("rgb(" + _t + "," + Pt + "," + Dt + ")");
            I._hmpixcount = (I._hmpixcount || 0) + ft, I._hmlumcount = (I._hmlumcount || 0) + ft * Ot.getLuminance();
            var kt = X.selectAll("image").data(U);
            kt.enter().append("svg:image").attr({ xmlns: x.svg, preserveAspectRatio: "none" }), kt.attr({ height: Ie, width: Ne, x: V, y: K, "xlink:href": ge.toDataURL("image/png") }), De !== "fast" || pe || kt.attr("style", S), D(X);
            var Bt = ue.texttemplate;
            if (Bt) {
              var xt = g(ue), Jt = { type: "linear", range: [xt.min, xt.max], _separators: z._separators, _numFormat: z._numFormat }, qt = ue.type === "histogram2dcontour", en = ue.type === "contour", Yt = en ? be - 1 : be, Ht = en ? 1 : 0, sn = en ? Ae - 1 : Ae, fn = [];
              for (Y = en ? 1 : 0; Y < Yt; Y++) {
                var In;
                if (en) In = Q.y[Y];
                else if (qt) {
                  if (Y === 0 || Y === be - 1) continue;
                  In = Q.y[Y];
                } else if (Q.yCenter) In = Q.yCenter[Y];
                else {
                  if (Y + 1 === be && Q.y[Y + 1] === void 0) continue;
                  In = (Q.y[Y] + Q.y[Y + 1]) / 2;
                }
                var zn = Math.round(F.c2p(In));
                if (!(0 > zn || zn > F._length)) for (te = Ht; te < sn; te++) {
                  var Cn;
                  if (en) Cn = Q.x[te];
                  else if (qt) {
                    if (te === 0 || te === Ae - 1) continue;
                    Cn = Q.x[te];
                  } else if (Q.xCenter) Cn = Q.xCenter[te];
                  else {
                    if (te + 1 === Ae && Q.x[te + 1] === void 0) continue;
                    Cn = (Q.x[te] + Q.x[te + 1]) / 2;
                  }
                  var gn = Math.round(z.c2p(Cn));
                  if (!(0 > gn || gn > z._length)) {
                    var Mn = f({ x: Cn, y: In }, ue, I._fullLayout);
                    Mn.x = Cn, Mn.y = In;
                    var Xn = Q.z[Y][te];
                    Xn === void 0 ? (Mn.z = "", Mn.zLabel = "") : (Mn.z = Xn, Mn.zLabel = p.tickText(Jt, Xn, "hover").text);
                    var Pn = Q.text && Q.text[Y] && Q.text[Y][te];
                    Pn !== void 0 && Pn !== !1 || (Pn = ""), Mn.text = Pn;
                    var wn = _.texttemplateString(Bt, Mn, I._fullLayout._d3locale, Mn, ue._meta || {});
                    if (wn) {
                      var Rn = wn.split("<br>"), _n = Rn.length, En = 0;
                      for (ee = 0; ee < _n; ee++) En = Math.max(En, Rn[ee].length);
                      fn.push({ l: _n, c: En, t: wn, x: gn, y: zn, z: Xn });
                    }
                  }
                }
              }
              var Kn = ue.textfont, Wn = Kn.size, hr = I._fullLayout.font.size;
              if (!Wn || Wn === "auto") {
                var Zn = 1 / 0, lr = 1 / 0, cr = 0, zr = 0;
                for (ee = 0; ee < fn.length; ee++) {
                  var Wr = fn[ee];
                  if (cr = Math.max(cr, Wr.l), zr = Math.max(zr, Wr.c), ee < fn.length - 1) {
                    var mr = fn[ee + 1], Ir = Math.abs(mr.x - Wr.x), yr = Math.abs(mr.y - Wr.y);
                    Ir && (Zn = Math.min(Zn, Ir)), yr && (lr = Math.min(lr, yr));
                  }
                }
                isFinite(Zn) && isFinite(lr) ? (Zn -= ce, lr -= he, Zn /= zr, lr /= cr, Zn /= w / 2, lr /= w, Wn = Math.min(Math.floor(Zn), Math.floor(lr), hr)) : Wn = hr;
              }
              if (Wn <= 0 || !isFinite(Wn)) return;
              C(X).data(fn).enter().append("g").classed(A, 1).append("text").attr("text-anchor", "middle").each(function(Vr) {
                var rn = l.select(this), Tn = Kn.color;
                Tn && Tn !== "auto" || (Tn = c.contrast(Vr.z === void 0 ? I._fullLayout.plot_bgcolor : "rgba(" + Re(Vr.z).join() + ")")), rn.attr("data-notex", 1).call(d.positionText, function(sr) {
                  return sr.x;
                }(Vr), function(sr) {
                  return sr.y - Wn * (sr.l * w / 2 - 1);
                }(Vr)).call(h.font, { family: Kn.family, size: Wn, color: Tn, weight: Kn.weight, style: Kn.style, variant: Kn.variant, textcase: Kn.textcase, lineposition: Kn.lineposition, shadow: Kn.shadow }).text(Vr.t).call(d.convertToTspans, I);
              });
            }
          });
        };
      }, 12774: function(o, s, n) {
        var l = n(45568);
        o.exports = function(u) {
          l.select(u).selectAll(".hm image").style("opacity", function(i) {
            return i.trace.opacity;
          });
        };
      }, 44143: function(o) {
        o.exports = function(s, n, l) {
          l("zsmooth") === !1 && (l("xgap"), l("ygap")), l("zhoverformat");
        };
      }, 86073: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(33626);
        function h(p, _) {
          var d = _(p);
          return (d ? _(p + "type", "array") : "scaled") === "scaled" && (_(p + "0"), _("d" + p)), d;
        }
        o.exports = function(p, _, d, f, c, g) {
          var m, x, w = d("z");
          if (c = c || "x", g = g || "y", w === void 0 || !w.length) return 0;
          if (u.isArray1D(w)) {
            m = d(c), x = d(g);
            var k = u.minRowLength(m), S = u.minRowLength(x);
            if (k === 0 || S === 0) return 0;
            _._length = Math.min(k, S, w.length);
          } else {
            if (m = h(c, d), x = h(g, d), !function(A) {
              for (var C, D = !0, L = !1, E = !1, P = 0; P < A.length; P++) {
                if (C = A[P], !u.isArrayOrTypedArray(C)) {
                  D = !1;
                  break;
                }
                C.length > 0 && (L = !0);
                for (var I = 0; I < C.length; I++) if (l(C[I])) {
                  E = !0;
                  break;
                }
              }
              return D && L && E;
            }(w)) return 0;
            d("transpose"), _._length = null;
          }
          return p.type === "heatmapgl" || i.getComponentMethod("calendars", "handleTraceDefaults")(p, _, [c, g], f), !0;
        };
      }, 29751: function(o, s, n) {
        for (var l = n(81658), u = n(87163), i = n(93049).extendFlat, h = n(13582).overrideAll, p = ["z", "x", "x0", "dx", "y", "y0", "dy", "text", "transpose", "xtype", "ytype"], _ = {}, d = 0; d < p.length; d++) {
          var f = p[d];
          _[f] = l[f];
        }
        _.zsmooth = { valType: "enumerated", values: ["fast", !1], dflt: "fast", editType: "calc" }, i(_, u("", { cLetter: "z", autoColorDflt: !1 })), o.exports = h(_, "calc", "nested");
      }, 89987: function(o, s, n) {
        var l = n(99098).gl_heatmap2d, u = n(29714), i = n(55010);
        function h(_, d) {
          this.scene = _, this.uid = d, this.type = "heatmapgl", this.name = "", this.hoverinfo = "all", this.xData = [], this.yData = [], this.zData = [], this.textLabels = [], this.idToIndex = [], this.bounds = [0, 0, 0, 0], this.options = { zsmooth: "fast", z: [], x: [], y: [], shape: [0, 0], colorLevels: [0], colorValues: [0, 0, 0, 1] }, this.heatmap = l(_.glplot, this.options), this.heatmap._trace = this;
        }
        var p = h.prototype;
        p.handlePick = function(_) {
          var d = this.options, f = d.shape, c = _.pointId, g = c % f[0], m = Math.floor(c / f[0]), x = c;
          return { trace: this, dataCoord: _.dataCoord, traceCoord: [d.x[g], d.y[m], d.z[x]], textLabel: this.textLabels[c], name: this.name, pointIndex: [m, g], hoverinfo: this.hoverinfo };
        }, p.update = function(_, d) {
          var f = d[0];
          this.index = _.index, this.name = _.name, this.hoverinfo = _.hoverinfo;
          var c = f.z;
          this.options.z = [].concat.apply([], c);
          var g = c[0].length, m = c.length;
          this.options.shape = [g, m], this.options.x = f.x, this.options.y = f.y, this.options.zsmooth = _.zsmooth;
          var x = function(C) {
            for (var D = C.colorscale, L = C.zmin, E = C.zmax, P = D.length, I = new Array(P), M = new Array(4 * P), O = 0; O < P; O++) {
              var T = D[O], z = i(T[1]);
              I[O] = L + T[0] * (E - L);
              for (var F = 0; F < 4; F++) M[4 * O + F] = z[F];
            }
            return { colorLevels: I, colorValues: M };
          }(_);
          this.options.colorLevels = x.colorLevels, this.options.colorValues = x.colorValues, this.textLabels = [].concat.apply([], _.text), this.heatmap.update(this.options);
          var w, k, S = this.scene.xaxis, A = this.scene.yaxis;
          _.zsmooth === !1 && (w = { ppad: f.x[1] - f.x[0] }, k = { ppad: f.y[1] - f.y[0] }), _._extremes[S._id] = u.findExtremes(S, f.x, w), _._extremes[A._id] = u.findExtremes(A, f.y, k);
        }, p.dispose = function() {
          this.heatmap.dispose();
        }, o.exports = function(_, d, f) {
          var c = new h(_, d.uid);
          return c.update(d, f), c;
        };
      }, 51312: function(o, s, n) {
        var l = n(34809), u = n(86073), i = n(39356), h = n(29751);
        o.exports = function(p, _, d, f) {
          function c(g, m) {
            return l.coerce(p, _, h, g, m);
          }
          u(p, _, c, f) ? (c("text"), c("zsmooth"), i(p, _, f, c, { prefix: "", cLetter: "z" })) : _.visible = !1;
        };
      }, 72892: function(o, s, n) {
        o.exports = { attributes: n(29751), supplyDefaults: n(51312), colorbar: n(12431), calc: n(51670), plot: n(89987), moduleType: "trace", name: "heatmapgl", basePlotModule: n(24585), categories: ["gl", "gl2d", "2dMap"], meta: {} };
      }, 16160: function(o, s, n) {
        var l = n(81481), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(3208).ay, p = n(80337), _ = n(64766), d = n(39732), f = n(93049).extendFlat;
        o.exports = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, xhoverformat: u("x"), yhoverformat: u("y"), text: f({}, l.text, {}), hovertext: f({}, l.hovertext, {}), orientation: l.orientation, histfunc: { valType: "enumerated", values: ["count", "sum", "avg", "min", "max"], dflt: "count", editType: "calc" }, histnorm: { valType: "enumerated", values: ["", "percent", "probability", "density", "probability density"], dflt: "", editType: "calc" }, cumulative: { enabled: { valType: "boolean", dflt: !1, editType: "calc" }, direction: { valType: "enumerated", values: ["increasing", "decreasing"], dflt: "increasing", editType: "calc" }, currentbin: { valType: "enumerated", values: ["include", "exclude", "half"], dflt: "include", editType: "calc" }, editType: "calc" }, nbinsx: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, xbins: _("x", !0), nbinsy: { valType: "integer", min: 0, dflt: 0, editType: "calc" }, ybins: _("y", !0), autobinx: { valType: "boolean", dflt: null, editType: "calc" }, autobiny: { valType: "boolean", dflt: null, editType: "calc" }, bingroup: { valType: "string", dflt: "", editType: "calc" }, hovertemplate: i({}, { keys: d.eventDataKeys }), texttemplate: h({ arrayOk: !1, editType: "plot" }, { keys: ["label", "value"] }), textposition: f({}, l.textposition, { arrayOk: !1 }), textfont: p({ arrayOk: !1, editType: "plot", colorEditType: "style" }), outsidetextfont: p({ arrayOk: !1, editType: "plot", colorEditType: "style" }), insidetextfont: p({ arrayOk: !1, editType: "plot", colorEditType: "style" }), insidetextanchor: l.insidetextanchor, textangle: l.textangle, cliponaxis: l.cliponaxis, constraintext: l.constraintext, marker: l.marker, offsetgroup: l.offsetgroup, alignmentgroup: l.alignmentgroup, selected: l.selected, unselected: l.unselected, _deprecated: { bardir: l._deprecated.bardir }, zorder: l.zorder };
      }, 48198: function(o) {
        o.exports = function(s, n) {
          for (var l = s.length, u = 0, i = 0; i < l; i++) n[i] ? (s[i] /= n[i], u += s[i]) : s[i] = null;
          return u;
        };
      }, 64766: function(o) {
        o.exports = function(s, n) {
          return { start: { valType: "any", editType: "calc" }, end: { valType: "any", editType: "calc" }, size: { valType: "any", editType: "calc" }, editType: "calc" };
        };
      }, 34870: function(o, s, n) {
        var l = n(10721);
        o.exports = { count: function(u, i, h) {
          return h[u]++, 1;
        }, sum: function(u, i, h, p) {
          var _ = p[i];
          return l(_) ? (_ = Number(_), h[u] += _, _) : 0;
        }, avg: function(u, i, h, p, _) {
          var d = p[i];
          return l(d) && (d = Number(d), h[u] += d, _[u]++), 0;
        }, min: function(u, i, h, p) {
          var _ = p[i];
          if (l(_)) {
            if (_ = Number(_), !l(h[u])) return h[u] = _, _;
            if (h[u] > _) {
              var d = _ - h[u];
              return h[u] = _, d;
            }
          }
          return 0;
        }, max: function(u, i, h, p) {
          var _ = p[i];
          if (l(_)) {
            if (_ = Number(_), !l(h[u])) return h[u] = _, _;
            if (h[u] < _) {
              var d = _ - h[u];
              return h[u] = _, d;
            }
          }
          return 0;
        } };
      }, 64852: function(o, s, n) {
        var l = n(63821), u = l.ONEAVGYEAR, i = l.ONEAVGMONTH, h = l.ONEDAY, p = l.ONEHOUR, _ = l.ONEMIN, d = l.ONESEC, f = n(29714).tickIncrement;
        function c(w, k, S, A) {
          if (w * k <= 0) return 1 / 0;
          for (var C = Math.abs(k - w), D = S.type === "date", L = g(C, D), E = 0; E < 10; E++) {
            var P = g(80 * L, D);
            if (L === P || !m(P, w, k, D, S, A)) break;
            L = P;
          }
          return L;
        }
        function g(w, k) {
          return k && w > d ? w > h ? w > 1.1 * u ? u : w > 1.1 * i ? i : h : w > p ? p : w > _ ? _ : d : Math.pow(10, Math.floor(Math.log(w) / Math.LN10));
        }
        function m(w, k, S, A, C, D) {
          if (A && w > h) {
            var L = x(k, C, D), E = x(S, C, D), P = w === u ? 0 : 1;
            return L[P] !== E[P];
          }
          return Math.floor(S / w) - Math.floor(k / w) > 0.1;
        }
        function x(w, k, S) {
          var A = k.c2d(w, u, S).split("-");
          return A[0] === "" && (A.unshift(), A[0] = "-" + A[0]), A;
        }
        o.exports = function(w, k, S, A, C) {
          var D, L, E = -1.1 * k, P = -0.1 * k, I = w - P, M = S[0], O = S[1], T = Math.min(c(M + P, M + I, A, C), c(O + P, O + I, A, C)), z = Math.min(c(M + E, M + P, A, C), c(O + E, O + P, A, C));
          if (T > z && z < Math.abs(O - M) / 4e3 ? (D = T, L = !1) : (D = Math.min(T, z), L = !0), A.type === "date" && D > h) {
            var F = D === u ? 1 : 6, U = D === u ? "M12" : "M1";
            return function(V, $) {
              var q = A.c2d(V, u, C), K = q.indexOf("-", F);
              K > 0 && (q = q.substr(0, K));
              var re = A.d2c(q, 0, C);
              if (re < V) {
                var Y = f(re, U, !1, C);
                (re + Y) / 2 < V + w && (re = Y);
              }
              return $ && L ? f(re, U, !0, C) : re;
            };
          }
          return function(V, $) {
            var q = D * Math.round(V / D);
            return q + D / 10 < V && q + 0.9 * D < V + w && (q += D), $ && L && (q -= D), q;
          };
        };
      }, 53616: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(33626), h = n(29714), p = n(35374), _ = n(34870), d = n(58665), f = n(48198), c = n(64852);
        function g(m, x, w, k, S) {
          var A, C, D, L, E, P, I, M = k + "bins", O = m._fullLayout, T = x["_" + k + "bingroup"], z = O._histogramBinOpts[T], F = O.barmode === "overlay", U = function(Me) {
            return w.r2c(Me, 0, L);
          }, V = function(Me) {
            return w.c2r(Me, 0, L);
          }, $ = w.type === "date" ? function(Me) {
            return Me || Me === 0 ? u.cleanDate(Me, null, L) : null;
          } : function(Me) {
            return l(Me) ? Number(Me) : null;
          };
          function q(Me, De, Le) {
            De[Me + "Found"] ? (De[Me] = $(De[Me]), De[Me] === null && (De[Me] = Le[Me])) : (P[Me] = De[Me] = Le[Me], u.nestedProperty(C[0], M + "." + Me).set(Le[Me]));
          }
          if (x["_" + k + "autoBinFinished"]) delete x["_" + k + "autoBinFinished"];
          else {
            C = z.traces;
            var K = [], re = !0, Y = !1, te = !1;
            for (A = 0; A < C.length; A++) if ((D = C[A]).visible) {
              var ee = z.dirs[A];
              E = D["_" + ee + "pos0"] = w.makeCalcdata(D, ee), K = u.concat(K, E), delete D["_" + k + "autoBinFinished"], x.visible === !0 && (re ? re = !1 : (delete D._autoBin, D["_" + k + "autoBinFinished"] = 1), i.traceIs(D, "2dMap") && (Y = !0), D.type === "histogram2dcontour" && (te = !0));
            }
            L = C[0][k + "calendar"];
            var X = h.autoBin(K, w, z.nbins, Y, L, z.sizeFound && z.size), Q = C[0]._autoBin = {};
            if (P = Q[z.dirs[0]] = {}, te && (z.size || (X.start = V(h.tickIncrement(U(X.start), X.size, !0, L))), z.end === void 0 && (X.end = V(h.tickIncrement(U(X.end), X.size, !1, L)))), F && !i.traceIs(x, "2dMap") && X._dataSpan === 0 && w.type !== "category" && w.type !== "multicategory" && x.bingroup === "" && x.xbins === void 0) {
              if (S) return [X, E, !0];
              X = function(Me, De, Le, We, Ee) {
                var Ne, Ie, ge, Ce = Me._fullLayout, we = function(_t, Pt) {
                  for (var Dt = Pt.xaxis, $t = Pt.yaxis, Gt = Pt.orientation, Wt = [], mt = _t._fullData, at = 0; at < mt.length; at++) {
                    var vt = mt[at];
                    vt.type === "histogram" && vt.visible === !0 && vt.orientation === Gt && vt.xaxis === Dt && vt.yaxis === $t && Wt.push(vt);
                  }
                  return Wt;
                }(Me, De), Ge = !1, Re = 1 / 0, je = [De];
                for (Ne = 0; Ne < we.length; Ne++) if ((Ie = we[Ne]) === De) Ge = !0;
                else if (Ge) {
                  var Ke = g(Me, Ie, Le, We, !0), tt = Ke[0], _e = Ke[2];
                  Ie["_" + We + "autoBinFinished"] = 1, Ie["_" + We + "pos0"] = Ke[1], _e ? je.push(Ie) : Re = Math.min(Re, tt.size);
                } else ge = Ce._histogramBinOpts[Ie["_" + We + "bingroup"]], Re = Math.min(Re, ge.size || Ie[Ee].size);
                var Be = new Array(je.length);
                for (Ne = 0; Ne < je.length; Ne++) for (var $e = je[Ne]["_" + We + "pos0"], Ze = 0; Ze < $e.length; Ze++) if ($e[Ze] !== void 0) {
                  Be[Ne] = $e[Ze];
                  break;
                }
                for (isFinite(Re) || (Re = u.distinctVals(Be).minDiff), Ne = 0; Ne < je.length; Ne++) {
                  var ct = (Ie = je[Ne])[We + "calendar"], ft = { start: Le.c2r(Be[Ne] - Re / 2, 0, ct), end: Le.c2r(Be[Ne] + Re / 2, 0, ct), size: Re };
                  Ie._input[Ee] = Ie[Ee] = ft, (ge = Ce._histogramBinOpts[Ie["_" + We + "bingroup"]]) && u.extendFlat(ge, ft);
                }
                return De[Ee];
              }(m, x, w, k, M);
            }
            (I = D.cumulative || {}).enabled && I.currentbin !== "include" && (I.direction === "decreasing" ? X.start = V(h.tickIncrement(U(X.start), X.size, !0, L)) : X.end = V(h.tickIncrement(U(X.end), X.size, !1, L))), z.size = X.size, z.sizeFound || (P.size = X.size, u.nestedProperty(C[0], M + ".size").set(X.size)), q("start", z, X), q("end", z, X);
          }
          E = x["_" + k + "pos0"], delete x["_" + k + "pos0"];
          var ue = x._input[M] || {}, ce = u.extendFlat({}, z), he = z.start, de = w.r2l(ue.start), ne = de !== void 0;
          if ((z.startFound || ne) && de !== w.r2l(he)) {
            var ae = ne ? de : u.aggNums(Math.min, null, E), se = { type: w.type === "category" || w.type === "multicategory" ? "linear" : w.type, r2l: w.r2l, dtick: z.size, tick0: he, calendar: L, range: [ae, h.tickIncrement(ae, z.size, !1, L)].map(w.l2r) }, me = h.tickFirst(se);
            me > w.r2l(ae) && (me = h.tickIncrement(me, z.size, !0, L)), ce.start = w.l2r(me), ne || u.nestedProperty(x, M + ".start").set(ce.start);
          }
          var ye = z.end, pe = w.r2l(ue.end), be = pe !== void 0;
          if ((z.endFound || be) && pe !== w.r2l(ye)) {
            var Ae = be ? pe : u.aggNums(Math.max, null, E);
            ce.end = w.l2r(Ae), be || u.nestedProperty(x, M + ".start").set(ce.end);
          }
          var Se = "autobin" + k;
          return x._input[Se] === !1 && (x._input[M] = u.extendFlat({}, x[M] || {}), delete x._input[Se], delete x[Se]), [ce, E];
        }
        o.exports = { calc: function(m, x) {
          var w, k, S, A, C = [], D = [], L = x.orientation === "h", E = h.getFromId(m, L ? x.yaxis : x.xaxis), P = L ? "y" : "x", I = { x: "y", y: "x" }[P], M = x[P + "calendar"], O = x.cumulative, T = g(m, x, E, P), z = T[0], F = T[1], U = typeof z.size == "string", V = [], $ = U ? V : z, q = [], K = [], re = [], Y = 0, te = x.histnorm, ee = x.histfunc, X = te.indexOf("density") !== -1;
          O.enabled && X && (te = te.replace(/ ?density$/, ""), X = !1);
          var Q, ue = ee === "max" || ee === "min" ? null : 0, ce = _.count, he = d[te], de = !1, ne = function(Ie) {
            return E.r2c(Ie, 0, M);
          };
          for (u.isArrayOrTypedArray(x[I]) && ee !== "count" && (Q = x[I], de = ee === "avg", ce = _[ee]), w = ne(z.start), S = ne(z.end) + (w - h.tickIncrement(w, z.size, !1, M)) / 1e6; w < S && C.length < 1e6 && (k = h.tickIncrement(w, z.size, !1, M), C.push((w + k) / 2), D.push(ue), re.push([]), V.push(w), X && q.push(1 / (k - w)), de && K.push(0), !(k <= w)); ) w = k;
          V.push(w), U || E.type !== "date" || ($ = { start: ne($.start), end: ne($.end), size: $.size }), m._fullLayout._roundFnOpts || (m._fullLayout._roundFnOpts = {});
          var ae = x["_" + P + "bingroup"], se = { leftGap: 1 / 0, rightGap: 1 / 0 };
          ae && (m._fullLayout._roundFnOpts[ae] || (m._fullLayout._roundFnOpts[ae] = se), se = m._fullLayout._roundFnOpts[ae]);
          var me, ye = D.length, pe = !0, be = se.leftGap, Ae = se.rightGap, Se = {};
          for (w = 0; w < F.length; w++) {
            var Me = F[w];
            (A = u.findBin(Me, $)) >= 0 && A < ye && (Y += ce(A, w, D, Q, K), pe && re[A].length && Me !== F[re[A][0]] && (pe = !1), re[A].push(w), Se[w] = A, be = Math.min(be, Me - V[A]), Ae = Math.min(Ae, V[A + 1] - Me));
          }
          se.leftGap = be, se.rightGap = Ae, pe || (me = function(Ie, ge) {
            return function() {
              var Ce = m._fullLayout._roundFnOpts[ae];
              return c(Ce.leftGap, Ce.rightGap, V, E, M)(Ie, ge);
            };
          }), de && (Y = f(D, K)), he && he(D, Y, q), O.enabled && function(Ie, ge, Ce) {
            var we, Ge, Re;
            function je(tt) {
              Re = Ie[tt], Ie[tt] /= 2;
            }
            function Ke(tt) {
              Ge = Ie[tt], Ie[tt] = Re + Ge / 2, Re += Ge;
            }
            if (Ce === "half") if (ge === "increasing") for (je(0), we = 1; we < Ie.length; we++) Ke(we);
            else for (je(Ie.length - 1), we = Ie.length - 2; we >= 0; we--) Ke(we);
            else if (ge === "increasing") {
              for (we = 1; we < Ie.length; we++) Ie[we] += Ie[we - 1];
              Ce === "exclude" && (Ie.unshift(0), Ie.pop());
            } else {
              for (we = Ie.length - 2; we >= 0; we--) Ie[we] += Ie[we + 1];
              Ce === "exclude" && (Ie.push(0), Ie.shift());
            }
          }(D, O.direction, O.currentbin);
          var De = Math.min(C.length, D.length), Le = [], We = 0, Ee = De - 1;
          for (w = 0; w < De; w++) if (D[w]) {
            We = w;
            break;
          }
          for (w = De - 1; w >= We; w--) if (D[w]) {
            Ee = w;
            break;
          }
          for (w = We; w <= Ee; w++) if (l(C[w]) && l(D[w])) {
            var Ne = { p: C[w], s: D[w], b: 0 };
            O.enabled || (Ne.pts = re[w], pe ? Ne.ph0 = Ne.ph1 = re[w].length ? F[re[w][0]] : C[w] : (x._computePh = !0, Ne.ph0 = me(V[w]), Ne.ph1 = me(V[w + 1], !0))), Le.push(Ne);
          }
          return Le.length === 1 && (Le[0].width1 = h.tickIncrement(Le[0].p, z.size, !1, M) - Le[0].p), p(Le, x), u.isArrayOrTypedArray(x.selectedpoints) && u.tagSelected(Le, x, Se), Le;
        }, calcAllAutoBins: g };
      }, 39732: function(o) {
        o.exports = { eventDataKeys: ["binNumber"] };
      }, 83380: function(o, s, n) {
        var l = n(34809), u = n(5975), i = n(33626).traceIs, h = n(36301), p = n(17550).validateCornerradius, _ = l.nestedProperty, d = n(84391).getAxisGroup, f = [{ aStr: { x: "xbins.start", y: "ybins.start" }, name: "start" }, { aStr: { x: "xbins.end", y: "ybins.end" }, name: "end" }, { aStr: { x: "xbins.size", y: "ybins.size" }, name: "size" }, { aStr: { x: "nbinsx", y: "nbinsy" }, name: "nbins" }], c = ["x", "y"];
        o.exports = function(g, m) {
          var x, w, k, S, A, C, D, L = m._histogramBinOpts = {}, E = [], P = {}, I = [];
          function M(ue, ce) {
            return l.coerce(x._input, x, x._module.attributes, ue, ce);
          }
          function O(ue) {
            return ue.orientation === "v" ? "x" : "y";
          }
          function T(ue, ce, he) {
            var de = ue.uid + "__" + he;
            ce || (ce = de);
            var ne = function(ye, pe) {
              return u.getFromTrace({ _fullLayout: m }, ye, pe).type;
            }(ue, he), ae = ue[he + "calendar"] || "", se = L[ce], me = !0;
            se && (ne === se.axType && ae === se.calendar ? (me = !1, se.traces.push(ue), se.dirs.push(he)) : (ce = de, ne !== se.axType && l.warn(["Attempted to group the bins of trace", ue.index, "set on a", "type:" + ne, "axis", "with bins on", "type:" + se.axType, "axis."].join(" ")), ae !== se.calendar && l.warn(["Attempted to group the bins of trace", ue.index, "set with a", ae, "calendar", "with bins", se.calendar ? "on a " + se.calendar + " calendar" : "w/o a set calendar"].join(" ")))), me && (L[ce] = { traces: [ue], dirs: [he], axType: ne, calendar: ue[he + "calendar"] || "" }), ue["_" + he + "bingroup"] = ce;
          }
          for (A = 0; A < g.length; A++) if (x = g[A], i(x, "histogram")) {
            if (E.push(x), delete x._xautoBinFinished, delete x._yautoBinFinished, x.type === "histogram") {
              var z = M("marker.cornerradius", m.barcornerradius);
              x.marker && (x.marker.cornerradius = p(z));
            }
            i(x, "2dMap") || h(x._input, x, m, M);
          }
          var F = m._alignmentOpts || {};
          for (A = 0; A < E.length; A++) {
            if (x = E[A], k = "", !i(x, "2dMap")) {
              if (S = O(x), m.barmode === "group" && x.alignmentgroup) {
                var U = x[S + "axis"], V = d(m, U) + x.orientation;
                (F[V] || {})[x.alignmentgroup] && (k = V);
              }
              k || m.barmode === "overlay" || (k = d(m, x.xaxis) + d(m, x.yaxis) + O(x));
            }
            k ? (P[k] || (P[k] = []), P[k].push(x)) : I.push(x);
          }
          for (k in P) if ((w = P[k]).length !== 1) {
            var $ = !1;
            for (w.length && (x = w[0], $ = M("bingroup")), k = $ || k, A = 0; A < w.length; A++) {
              var q = (x = w[A])._input.bingroup;
              q && q !== k && l.warn(["Trace", x.index, "must match", "within bingroup", k + ".", "Ignoring its bingroup:", q, "setting."].join(" ")), x.bingroup = k, T(x, k, O(x));
            }
          } else I.push(w[0]);
          for (A = 0; A < I.length; A++) {
            x = I[A];
            var K = M("bingroup");
            if (i(x, "2dMap")) for (D = 0; D < 2; D++) {
              var re = M((S = c[D]) + "bingroup", K ? K + "__" + S : null);
              T(x, re, S);
            }
            else T(x, K, O(x));
          }
          for (k in L) {
            var Y = L[k];
            for (w = Y.traces, C = 0; C < f.length; C++) {
              var te, ee, X = f[C], Q = X.name;
              if (Q !== "nbins" || !Y.sizeFound) {
                for (A = 0; A < w.length; A++) {
                  if (x = w[A], S = Y.dirs[A], te = X.aStr[S], _(x._input, te).get() !== void 0) {
                    Y[Q] = M(te), Y[Q + "Found"] = !0;
                    break;
                  }
                  (ee = (x._autoBin || {})[S] || {})[Q] && _(x, te).set(ee[Q]);
                }
                if (Q === "start" || Q === "end") for (; A < w.length; A++) (x = w[A])["_" + S + "bingroup"] && M(te, (ee = (x._autoBin || {})[S] || {})[Q]);
                Q !== "nbins" || Y.sizeFound || Y.nbinsFound || (x = w[0], Y[Q] = M(te));
              }
            }
          }
        };
      }, 85079: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(78766), h = n(17550).handleText, p = n(59760), _ = n(16160);
        o.exports = function(d, f, c, g) {
          function m(P, I) {
            return u.coerce(d, f, _, P, I);
          }
          var x = m("x"), w = m("y");
          m("cumulative.enabled") && (m("cumulative.direction"), m("cumulative.currentbin")), m("text");
          var k = m("textposition");
          h(d, f, g, m, k, { moduleHasSelected: !0, moduleHasUnselected: !0, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), m("hovertext"), m("hovertemplate"), m("xhoverformat"), m("yhoverformat");
          var S = m("orientation", w && !x ? "h" : "v"), A = S === "v" ? "x" : "y", C = S === "v" ? "y" : "x", D = x && w ? Math.min(u.minRowLength(x) && u.minRowLength(w)) : u.minRowLength(f[A] || []);
          if (D) {
            f._length = D, l.getComponentMethod("calendars", "handleTraceDefaults")(d, f, ["x", "y"], g), f[C] && m("histfunc"), m("histnorm"), m("autobin" + A), p(d, f, m, c, g), u.coerceSelectionMarkerOpacity(f, m);
            var L = (f.marker.line || {}).color, E = l.getComponentMethod("errorbars", "supplyDefaults");
            E(d, f, L || i.defaultLine, { axis: "y" }), E(d, f, L || i.defaultLine, { axis: "x", inherit: "y" }), m("zorder");
          } else f.visible = !1;
        };
      }, 82604: function(o) {
        o.exports = function(s, n, l, u, i) {
          if (s.x = "xVal" in n ? n.xVal : n.x, s.y = "yVal" in n ? n.yVal : n.y, "zLabelVal" in n && (s.z = n.zLabelVal), n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), !(l.cumulative || {}).enabled) {
            var h, p = Array.isArray(i) ? u[0].pts[i[0]][i[1]] : u[i].pts;
            if (s.pointNumbers = p, s.binNumber = s.pointNumber, delete s.pointNumber, delete s.pointIndex, l._indexToPoints) {
              h = [];
              for (var _ = 0; _ < p.length; _++) h = h.concat(l._indexToPoints[p[_]]);
            } else h = p;
            s.pointIndices = h;
          }
          return s;
        };
      }, 20487: function(o, s, n) {
        var l = n(91664).hoverPoints, u = n(29714).hoverLabelText;
        o.exports = function(i, h, p, _, d) {
          var f = l(i, h, p, _, d);
          if (f) {
            var c = (i = f[0]).cd[i.index], g = i.cd[0].trace;
            if (!g.cumulative.enabled) {
              var m = g.orientation === "h" ? "y" : "x";
              i[m + "Label"] = u(i[m + "a"], [c.ph0, c.ph1], g[m + "hoverformat"]);
            }
            return f;
          }
        };
      }, 74461: function(o, s, n) {
        o.exports = { attributes: n(16160), layoutAttributes: n(25412), supplyDefaults: n(85079), crossTraceDefaults: n(83380), supplyLayoutDefaults: n(78931), calc: n(53616).calc, crossTraceCalc: n(24782).crossTraceCalc, plot: n(32995).plot, layerName: "barlayer", style: n(6851).style, styleOnSelect: n(6851).styleOnSelect, colorbar: n(21146), hoverPoints: n(20487), selectPoints: n(88384), eventData: n(82604), moduleType: "trace", name: "histogram", basePlotModule: n(37703), categories: ["bar-like", "cartesian", "svg", "bar", "histogram", "oriented", "errorBarsOK", "showLegend"], meta: {} };
      }, 58665: function(o) {
        o.exports = { percent: function(s, n) {
          for (var l = s.length, u = 100 / n, i = 0; i < l; i++) s[i] *= u;
        }, probability: function(s, n) {
          for (var l = s.length, u = 0; u < l; u++) s[u] /= n;
        }, density: function(s, n, l, u) {
          var i = s.length;
          u = u || 1;
          for (var h = 0; h < i; h++) s[h] *= l[h] * u;
        }, "probability density": function(s, n, l, u) {
          var i = s.length;
          u && (n /= u);
          for (var h = 0; h < i; h++) s[h] *= l[h] / n;
        } };
      }, 9310: function(o, s, n) {
        var l = n(16160), u = n(64766), i = n(81658), h = n(9829), p = n(80712).axisHoverFormat, _ = n(3208).rb, d = n(3208).ay, f = n(87163), c = n(93049).extendFlat;
        o.exports = c({ x: l.x, y: l.y, z: { valType: "data_array", editType: "calc" }, marker: { color: { valType: "data_array", editType: "calc" }, editType: "calc" }, histnorm: l.histnorm, histfunc: l.histfunc, nbinsx: l.nbinsx, xbins: u("x"), nbinsy: l.nbinsy, ybins: u("y"), autobinx: l.autobinx, autobiny: l.autobiny, bingroup: c({}, l.bingroup, {}), xbingroup: c({}, l.bingroup, {}), ybingroup: c({}, l.bingroup, {}), xgap: i.xgap, ygap: i.ygap, zsmooth: i.zsmooth, xhoverformat: p("x"), yhoverformat: p("y"), zhoverformat: p("z", 1), hovertemplate: _({}, { keys: "z" }), texttemplate: d({ arrayOk: !1, editType: "plot" }, { keys: "z" }), textfont: i.textfont, showlegend: c({}, h.showlegend, { dflt: !1 }) }, f("", { cLetter: "z", autoColorDflt: !1 }));
      }, 19226: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(34870), h = n(58665), p = n(48198), _ = n(64852), d = n(53616).calcAllAutoBins;
        function f(m, x, w, k) {
          var S, A = new Array(m);
          if (k) for (S = 0; S < m; S++) A[S] = 1 / (x[S + 1] - x[S]);
          else {
            var C = 1 / w;
            for (S = 0; S < m; S++) A[S] = C;
          }
          return A;
        }
        function c(m, x) {
          return { start: m(x.start), end: m(x.end), size: x.size };
        }
        function g(m, x, w, k, S, A) {
          var C, D = m.length - 1, L = new Array(D), E = _(w, k, m, S, A);
          for (C = 0; C < D; C++) {
            var P = (x || [])[C];
            L[C] = P === void 0 ? [E(m[C]), E(m[C + 1], !0)] : [P, P];
          }
          return L;
        }
        o.exports = function(m, x) {
          var w, k, S, A, C = u.getFromId(m, x.xaxis), D = u.getFromId(m, x.yaxis), L = x.xcalendar, E = x.ycalendar, P = function($t) {
            return C.r2c($t, 0, L);
          }, I = function($t) {
            return D.r2c($t, 0, E);
          }, M = d(m, x, C, "x"), O = M[0], T = M[1], z = d(m, x, D, "y"), F = z[0], U = z[1], V = x._length;
          T.length > V && T.splice(V, T.length - V), U.length > V && U.splice(V, U.length - V);
          var $ = [], q = [], K = [], re = typeof O.size == "string", Y = typeof F.size == "string", te = [], ee = [], X = re ? te : O, Q = Y ? ee : F, ue = 0, ce = [], he = [], de = x.histnorm, ne = x.histfunc, ae = de.indexOf("density") !== -1, se = ne === "max" || ne === "min" ? null : 0, me = i.count, ye = h[de], pe = !1, be = [], Ae = [], Se = "z" in x ? x.z : "marker" in x && Array.isArray(x.marker.color) ? x.marker.color : "";
          Se && ne !== "count" && (pe = ne === "avg", me = i[ne]);
          var Me = O.size, De = P(O.start), Le = P(O.end) + (De - u.tickIncrement(De, Me, !1, L)) / 1e6;
          for (w = De; w < Le; w = u.tickIncrement(w, Me, !1, L)) q.push(se), te.push(w), pe && K.push(0);
          te.push(w);
          var We, Ee = q.length, Ne = (w - De) / Ee, Ie = (We = De + Ne / 2, C.c2r(We, 0, L)), ge = F.size, Ce = I(F.start), we = I(F.end) + (Ce - u.tickIncrement(Ce, ge, !1, E)) / 1e6;
          for (w = Ce; w < we; w = u.tickIncrement(w, ge, !1, E)) {
            $.push(q.slice()), ee.push(w);
            var Ge = new Array(Ee);
            for (k = 0; k < Ee; k++) Ge[k] = [];
            he.push(Ge), pe && ce.push(K.slice());
          }
          ee.push(w);
          var Re = $.length, je = (w - Ce) / Re, Ke = function($t) {
            return D.c2r($t, 0, E);
          }(Ce + je / 2);
          ae && (be = f(q.length, X, Ne, re), Ae = f($.length, Q, je, Y)), re || C.type !== "date" || (X = c(P, X)), Y || D.type !== "date" || (Q = c(I, Q));
          var tt = !0, _e = !0, Be = new Array(Ee), $e = new Array(Re), Ze = 1 / 0, ct = 1 / 0, ft = 1 / 0, _t = 1 / 0;
          for (w = 0; w < V; w++) {
            var Pt = T[w], Dt = U[w];
            S = l.findBin(Pt, X), A = l.findBin(Dt, Q), S >= 0 && S < Ee && A >= 0 && A < Re && (ue += me(S, w, $[A], Se, ce[A]), he[A][S].push(w), tt && (Be[S] === void 0 ? Be[S] = Pt : Be[S] !== Pt && (tt = !1)), _e && ($e[A] === void 0 ? $e[A] = Dt : $e[A] !== Dt && (_e = !1)), Ze = Math.min(Ze, Pt - te[S]), ct = Math.min(ct, te[S + 1] - Pt), ft = Math.min(ft, Dt - ee[A]), _t = Math.min(_t, ee[A + 1] - Dt));
          }
          if (pe) for (A = 0; A < Re; A++) ue += p($[A], ce[A]);
          if (ye) for (A = 0; A < Re; A++) ye($[A], ue, be, Ae[A]);
          return { x: T, xRanges: g(te, tt && Be, Ze, ct, C, L), x0: Ie, dx: Ne, y: U, yRanges: g(ee, _e && $e, ft, _t, D, E), y0: Ke, dy: je, z: $, pts: he };
        };
      }, 29097: function(o, s, n) {
        var l = n(34809), u = n(77134), i = n(44143), h = n(39356), p = n(63814), _ = n(9310);
        o.exports = function(d, f, c, g) {
          function m(x, w) {
            return l.coerce(d, f, _, x, w);
          }
          u(d, f, m, g), f.visible !== !1 && (i(d, f, m, g), h(d, f, g, m, { prefix: "", cLetter: "z" }), m("hovertemplate"), p(m, g), m("xhoverformat"), m("yhoverformat"));
        };
      }, 1873: function(o, s, n) {
        var l = n(93125), u = n(29714).hoverLabelText;
        o.exports = function(i, h, p, _, d) {
          var f = l(i, h, p, _, d);
          if (f) {
            var c = (i = f[0]).index, g = c[0], m = c[1], x = i.cd[0], w = x.trace, k = x.xRanges[m], S = x.yRanges[g];
            return i.xLabel = u(i.xa, [k[0], k[1]], w.xhoverformat), i.yLabel = u(i.ya, [S[0], S[1]], w.yhoverformat), f;
          }
        };
      }, 66143: function(o, s, n) {
        o.exports = { attributes: n(9310), supplyDefaults: n(29097), crossTraceDefaults: n(83380), calc: n(51670), plot: n(19236), layerName: "heatmaplayer", colorbar: n(12431), style: n(12774), hoverPoints: n(1873), eventData: n(82604), moduleType: "trace", name: "histogram2d", basePlotModule: n(37703), categories: ["cartesian", "svg", "2dMap", "histogram", "showLegend"], meta: {} };
      }, 77134: function(o, s, n) {
        var l = n(33626), u = n(34809);
        o.exports = function(i, h, p, _) {
          var d = p("x"), f = p("y"), c = u.minRowLength(d), g = u.minRowLength(f);
          c && g ? (h._length = Math.min(c, g), l.getComponentMethod("calendars", "handleTraceDefaults")(i, h, ["x", "y"], _), (p("z") || p("marker.color")) && p("histfunc"), p("histnorm"), p("autobinx"), p("autobiny")) : h.visible = !1;
        };
      }, 85018: function(o, s, n) {
        var l = n(9310), u = n(52240), i = n(87163), h = n(80712).axisHoverFormat, p = n(93049).extendFlat;
        o.exports = p({ x: l.x, y: l.y, z: l.z, marker: l.marker, histnorm: l.histnorm, histfunc: l.histfunc, nbinsx: l.nbinsx, xbins: l.xbins, nbinsy: l.nbinsy, ybins: l.ybins, autobinx: l.autobinx, autobiny: l.autobiny, bingroup: l.bingroup, xbingroup: l.xbingroup, ybingroup: l.ybingroup, autocontour: u.autocontour, ncontours: u.ncontours, contours: u.contours, line: { color: u.line.color, width: p({}, u.line.width, { dflt: 0.5 }), dash: u.line.dash, smoothing: u.line.smoothing, editType: "plot" }, xhoverformat: h("x"), yhoverformat: h("y"), zhoverformat: h("z", 1), hovertemplate: l.hovertemplate, texttemplate: u.texttemplate, textfont: u.textfont }, i("", { cLetter: "z", editTypeOverride: "calc" }));
      }, 49389: function(o, s, n) {
        var l = n(34809), u = n(77134), i = n(47495), h = n(39889), p = n(63814), _ = n(85018);
        o.exports = function(d, f, c, g) {
          function m(x, w) {
            return l.coerce(d, f, _, x, w);
          }
          u(d, f, m, g), f.visible !== !1 && (i(d, f, m, function(x) {
            return l.coerce2(d, f, _, x);
          }), h(d, f, m, g), m("xhoverformat"), m("yhoverformat"), m("hovertemplate"), f.contours && f.contours.coloring === "heatmap" && p(m, g));
        };
      }, 81955: function(o, s, n) {
        o.exports = { attributes: n(85018), supplyDefaults: n(49389), crossTraceDefaults: n(83380), calc: n(40352), plot: n(8850).plot, layerName: "contourlayer", style: n(1328), colorbar: n(92697), hoverPoints: n(29815), moduleType: "trace", name: "histogram2dcontour", basePlotModule: n(37703), categories: ["cartesian", "svg", "2dMap", "contour", "histogram", "showLegend"], meta: {} };
      }, 12505: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(87163), h = n(13792).u, p = n(55412), _ = n(56708), d = n(71856), f = n(43236), c = n(93049).extendFlat, g = n(94850).k;
        o.exports = { labels: _.labels, parents: _.parents, values: _.values, branchvalues: _.branchvalues, count: _.count, level: _.level, maxdepth: _.maxdepth, tiling: { orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h", editType: "plot" }, flip: d.tiling.flip, pad: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "calc" }, marker: c({ colors: _.marker.colors, line: _.marker.line, pattern: g, editType: "calc" }, i("marker", { colorAttr: "colors", anim: !1 })), leaf: _.leaf, pathbar: d.pathbar, text: p.text, textinfo: _.textinfo, texttemplate: u({ editType: "plot" }, { keys: f.eventDataKeys.concat(["label", "value"]) }), hovertext: p.hovertext, hoverinfo: _.hoverinfo, hovertemplate: l({}, { keys: f.eventDataKeys }), textfont: p.textfont, insidetextfont: p.insidetextfont, outsidetextfont: d.outsidetextfont, textposition: d.textposition, sort: p.sort, root: _.root, domain: h({ name: "icicle", trace: !0, editType: "calc" }) };
      }, 63387: function(o, s, n) {
        var l = n(44122);
        s.name = "icicle", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 36349: function(o, s, n) {
        var l = n(14852);
        s._ = function(u, i) {
          return l.calc(u, i);
        }, s.t = function(u) {
          return l._runCrossTraceCalc("icicle", u);
        };
      }, 17918: function(o, s, n) {
        var l = n(34809), u = n(12505), i = n(78766), h = n(13792).N, p = n(17550).handleText, _ = n(56155).TEXTPAD, d = n(46979).handleMarkerDefaults, f = n(88856), c = f.hasColorscale, g = f.handleDefaults;
        o.exports = function(m, x, w, k) {
          function S(I, M) {
            return l.coerce(m, x, u, I, M);
          }
          var A = S("labels"), C = S("parents");
          if (A && A.length && C && C.length) {
            var D = S("values");
            D && D.length ? S("branchvalues") : S("count"), S("level"), S("maxdepth"), S("tiling.orientation"), S("tiling.flip"), S("tiling.pad");
            var L = S("text");
            S("texttemplate"), x.texttemplate || S("textinfo", l.isArrayOrTypedArray(L) ? "text+label" : "label"), S("hovertext"), S("hovertemplate");
            var E = S("pathbar.visible");
            p(m, x, k, S, "auto", { hasPathbar: E, moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), S("textposition"), d(m, x, k, S);
            var P = x._hasColorscale = c(m, "marker", "colors") || (m.marker || {}).coloraxis;
            P && g(m, x, k, S, { prefix: "marker.", cLetter: "c" }), S("leaf.opacity", P ? 1 : 0.7), x._hovered = { marker: { line: { width: 2, color: i.contrast(k.paper_bgcolor) } } }, E && (S("pathbar.thickness", x.pathbar.textfont.size + 2 * _), S("pathbar.side"), S("pathbar.edgeshape")), S("sort"), S("root.color"), h(x, k, S), x._length = null;
          } else x.visible = !1;
        };
      }, 23593: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(30635), p = n(29316), _ = n(50579).styleOne, d = n(43236), f = n(33108), c = n(44691), g = n(19718).formatSliceLabel, m = !1;
        o.exports = function(x, w, k, S, A) {
          var C = A.width, D = A.height, L = A.viewX, E = A.viewY, P = A.pathSlice, I = A.toMoveInsideSlice, M = A.strTransform, O = A.hasTransition, T = A.handleSlicesExit, z = A.makeUpdateSliceInterpolator, F = A.makeUpdateTextInterpolator, U = A.prevEntry, V = x._context.staticPlot, $ = x._fullLayout, q = w[0].trace, K = q.textposition.indexOf("left") !== -1, re = q.textposition.indexOf("right") !== -1, Y = q.textposition.indexOf("bottom") !== -1, te = p(k, [C, D], { flipX: q.tiling.flip.indexOf("x") > -1, flipY: q.tiling.flip.indexOf("y") > -1, orientation: q.tiling.orientation, pad: { inner: q.tiling.pad }, maxDepth: q._maxDepth }).descendants(), ee = 1 / 0, X = -1 / 0;
          te.forEach(function(de) {
            var ne = de.depth;
            ne >= q._maxDepth ? (de.x0 = de.x1 = (de.x0 + de.x1) / 2, de.y0 = de.y1 = (de.y0 + de.y1) / 2) : (ee = Math.min(ee, ne), X = Math.max(X, ne));
          }), S = S.data(te, f.getPtId), q._maxVisibleLayers = isFinite(X) ? X - ee + 1 : 0, S.enter().append("g").classed("slice", !0), T(S, m, {}, [C, D], P), S.order();
          var Q = null;
          if (O && U) {
            var ue = f.getPtId(U);
            S.each(function(de) {
              Q === null && f.getPtId(de) === ue && (Q = { x0: de.x0, x1: de.x1, y0: de.y0, y1: de.y1 });
            });
          }
          var ce = function() {
            return Q || { x0: 0, x1: C, y0: 0, y1: D };
          }, he = S;
          return O && (he = he.transition().each("end", function() {
            var de = l.select(this);
            f.setSliceCursor(de, x, { hideOnRoot: !0, hideOnLeaves: !1, isTransitioning: !1 });
          })), he.each(function(de) {
            de._x0 = L(de.x0), de._x1 = L(de.x1), de._y0 = E(de.y0), de._y1 = E(de.y1), de._hoverX = L(de.x1 - q.tiling.pad), de._hoverY = E(Y ? de.y1 - q.tiling.pad / 2 : de.y0 + q.tiling.pad / 2);
            var ne = l.select(this), ae = u.ensureSingle(ne, "path", "surface", function(pe) {
              pe.style("pointer-events", V ? "none" : "all");
            });
            O ? ae.transition().attrTween("d", function(pe) {
              var be = z(pe, m, ce(), [C, D], { orientation: q.tiling.orientation, flipX: q.tiling.flip.indexOf("x") > -1, flipY: q.tiling.flip.indexOf("y") > -1 });
              return function(Ae) {
                return P(be(Ae));
              };
            }) : ae.attr("d", P), ne.call(c, k, x, w, { styleOne: _, eventDataKeys: d.eventDataKeys, transitionTime: d.CLICK_TRANSITION_TIME, transitionEasing: d.CLICK_TRANSITION_EASING }).call(f.setSliceCursor, x, { isTransitioning: x._transitioning }), ae.call(_, de, q, x, { hovered: !1 }), de.x0 === de.x1 || de.y0 === de.y1 ? de._text = "" : de._text = g(de, k, q, w, $) || "";
            var se = u.ensureSingle(ne, "g", "slicetext"), me = u.ensureSingle(se, "text", "", function(pe) {
              pe.attr("data-notex", 1);
            }), ye = u.ensureUniformFontSize(x, f.determineTextFont(q, de, $.font));
            me.text(de._text || " ").classed("slicetext", !0).attr("text-anchor", re ? "end" : K ? "start" : "middle").call(i.font, ye).call(h.convertToTspans, x), de.textBB = i.bBox(me.node()), de.transform = I(de, { fontSize: ye.size }), de.transform.fontSize = ye.size, O ? me.transition().attrTween("transform", function(pe) {
              var be = F(pe, m, ce(), [C, D]);
              return function(Ae) {
                return M(be(Ae));
              };
            }) : me.attr("transform", M(de));
          }), Q;
        };
      }, 36858: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "icicle", basePlotModule: n(63387), categories: [], animatable: !0, attributes: n(12505), layoutAttributes: n(60052), supplyDefaults: n(17918), supplyLayoutDefaults: n(11747), calc: n(36349)._, crossTraceCalc: n(36349).t, plot: n(1395), style: n(50579).style, colorbar: n(21146), meta: {} };
      }, 60052: function(o) {
        o.exports = { iciclecolorway: { valType: "colorlist", editType: "calc" }, extendiciclecolors: { valType: "boolean", dflt: !0, editType: "calc" } };
      }, 11747: function(o, s, n) {
        var l = n(34809), u = n(60052);
        o.exports = function(i, h) {
          function p(_, d) {
            return l.coerce(i, h, u, _, d);
          }
          p("iciclecolorway", h.colorway), p("extendiciclecolors");
        };
      }, 29316: function(o, s, n) {
        var l = n(92264), u = n(36141);
        o.exports = function(i, h, p) {
          var _ = p.flipX, d = p.flipY, f = p.orientation === "h", c = p.maxDepth, g = h[0], m = h[1];
          c && (g = (i.height + 1) * h[0] / Math.min(i.height + 1, c), m = (i.height + 1) * h[1] / Math.min(i.height + 1, c));
          var x = l.partition().padding(p.pad.inner).size(f ? [h[1], g] : [h[0], m])(i);
          return (f || _ || d) && u(x, h, { swapXY: f, flipX: _, flipY: d }), x;
        };
      }, 1395: function(o, s, n) {
        var l = n(41567), u = n(23593);
        o.exports = function(i, h, p, _) {
          return l(i, h, p, _, { type: "icicle", drawDescendants: u });
        };
      }, 50579: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(34809), h = n(84102).resizeText, p = n(72043);
        function _(d, f, c, g) {
          var m = f.data.data, x = !f.children, w = m.i, k = i.castOption(c, w, "marker.line.color") || u.defaultLine, S = i.castOption(c, w, "marker.line.width") || 0;
          d.call(p, f, c, g).style("stroke-width", S).call(u.stroke, k).style("opacity", x ? c.leaf.opacity : null);
        }
        o.exports = { style: function(d) {
          var f = d._fullLayout._iciclelayer.selectAll(".trace");
          h(d, f, "icicle"), f.each(function(c) {
            var g = l.select(this), m = c[0].trace;
            g.style("opacity", m.opacity), g.selectAll("path.surface").each(function(x) {
              l.select(this).call(_, x, m, d);
            });
          });
        }, styleOne: _ };
      }, 22153: function(o, s, n) {
        for (var l = n(9829), u = n(36640).zorder, i = n(3208).rb, h = n(93049).extendFlat, p = n(42939).colormodel, _ = ["rgb", "rgba", "rgba256", "hsl", "hsla"], d = [], f = [], c = 0; c < _.length; c++) {
          var g = p[_[c]];
          d.push("For the `" + _[c] + "` colormodel, it is [" + (g.zminDflt || g.min).join(", ") + "]."), f.push("For the `" + _[c] + "` colormodel, it is [" + (g.zmaxDflt || g.max).join(", ") + "].");
        }
        o.exports = h({ source: { valType: "string", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, colormodel: { valType: "enumerated", values: _, editType: "calc" }, zsmooth: { valType: "enumerated", values: ["fast", !1], dflt: !1, editType: "plot" }, zmin: { valType: "info_array", items: [{ valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }], editType: "calc" }, zmax: { valType: "info_array", items: [{ valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }, { valType: "number", editType: "calc" }], editType: "calc" }, x0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, y0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dx: { valType: "number", dflt: 1, editType: "calc" }, dy: { valType: "number", dflt: 1, editType: "calc" }, text: { valType: "data_array", editType: "plot" }, hovertext: { valType: "data_array", editType: "plot" }, hoverinfo: h({}, l.hoverinfo, { flags: ["x", "y", "z", "color", "name", "text"], dflt: "x+y+z+text+name" }), hovertemplate: i({}, { keys: ["z", "color", "colormodel"] }), zorder: u, transforms: void 0 });
      }, 31181: function(o, s, n) {
        var l = n(34809), u = n(42939), i = n(10721), h = n(29714), p = n(34809).maxRowLength, _ = n(96315).p;
        function d(c, g, m, x) {
          return function(w) {
            return l.constrain((w - c) * g, m, x);
          };
        }
        function f(c, g) {
          return function(m) {
            return l.constrain(m, c, g);
          };
        }
        o.exports = function(c, g) {
          var m, x;
          if (g._hasZ) m = g.z.length, x = p(g.z);
          else if (g._hasSource) {
            var w = _(g.source);
            m = w.height, x = w.width;
          }
          var k, S = h.getFromId(c, g.xaxis || "x"), A = h.getFromId(c, g.yaxis || "y"), C = S.d2c(g.x0) - g.dx / 2, D = A.d2c(g.y0) - g.dy / 2, L = [C, C + x * g.dx], E = [D, D + m * g.dy];
          if (S && S.type === "log") for (k = 0; k < x; k++) L.push(C + k * g.dx);
          if (A && A.type === "log") for (k = 0; k < m; k++) E.push(D + k * g.dy);
          return g._extremes[S._id] = h.findExtremes(S, L), g._extremes[A._id] = h.findExtremes(A, E), g._scaler = function(P) {
            var I = u.colormodel[P.colormodel], M = (I.colormodel || P.colormodel).length;
            P._sArray = [];
            for (var O = 0; O < M; O++) I.min[O] !== P.zmin[O] || I.max[O] !== P.zmax[O] ? P._sArray.push(d(P.zmin[O], (I.max[O] - I.min[O]) / (P.zmax[O] - P.zmin[O]), I.min[O], I.max[O])) : P._sArray.push(f(I.min[O], I.max[O]));
            return function(T) {
              for (var z = T.slice(0, M), F = 0; F < M; F++) {
                var U = z[F];
                if (!i(U)) return !1;
                z[F] = P._sArray[F](U);
              }
              return z;
            };
          }(g), [{ x0: C, y0: D, z: g.z, w: x, h: m }];
        };
      }, 42939: function(o) {
        o.exports = { colormodel: { rgb: { min: [0, 0, 0], max: [255, 255, 255], fmt: function(s) {
          return s.slice(0, 3);
        }, suffix: ["", "", ""] }, rgba: { min: [0, 0, 0, 0], max: [255, 255, 255, 1], fmt: function(s) {
          return s.slice(0, 4);
        }, suffix: ["", "", "", ""] }, rgba256: { colormodel: "rgba", zminDflt: [0, 0, 0, 0], zmaxDflt: [255, 255, 255, 255], min: [0, 0, 0, 0], max: [255, 255, 255, 1], fmt: function(s) {
          return s.slice(0, 4);
        }, suffix: ["", "", "", ""] }, hsl: { min: [0, 0, 0], max: [360, 100, 100], fmt: function(s) {
          var n = s.slice(0, 3);
          return n[1] = n[1] + "%", n[2] = n[2] + "%", n;
        }, suffix: ["°", "%", "%"] }, hsla: { min: [0, 0, 0, 0], max: [360, 100, 100, 1], fmt: function(s) {
          var n = s.slice(0, 4);
          return n[1] = n[1] + "%", n[2] = n[2] + "%", n;
        }, suffix: ["°", "%", "%", ""] } } };
      }, 82766: function(o, s, n) {
        var l = n(34809), u = n(22153), i = n(42939), h = n(84619).IMAGE_URL_PREFIX;
        o.exports = function(p, _) {
          function d(g, m) {
            return l.coerce(p, _, u, g, m);
          }
          d("source"), _.source && !_.source.match(h) && delete _.source, _._hasSource = !!_.source;
          var f, c = d("z");
          _._hasZ = !(c === void 0 || !c.length || !c[0] || !c[0].length), _._hasZ || _._hasSource ? (d("x0"), d("y0"), d("dx"), d("dy"), _._hasZ ? (d("colormodel", "rgb"), d("zmin", (f = i.colormodel[_.colormodel]).zminDflt || f.min), d("zmax", f.zmaxDflt || f.max)) : _._hasSource && (_.colormodel = "rgba256", f = i.colormodel[_.colormodel], _.zmin = f.zminDflt, _.zmax = f.zmaxDflt), d("zsmooth"), d("text"), d("hovertext"), d("hovertemplate"), _._length = null, d("zorder")) : _.visible = !1;
        };
      }, 45461: function(o) {
        o.exports = function(s, n) {
          return "xVal" in n && (s.x = n.xVal), "yVal" in n && (s.y = n.yVal), n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), s.color = n.color, s.colormodel = n.trace.colormodel, s.z || (s.z = n.color), s;
        };
      }, 96315: function(o, s, n) {
        var l = n(19490), u = n(84619).IMAGE_URL_PREFIX, i = n(45708).Buffer;
        s.p = function(h) {
          var p = h.replace(u, ""), _ = new i(p, "base64");
          return l(_);
        };
      }, 57328: function(o, s, n) {
        var l = n(32141), u = n(34809), i = u.isArrayOrTypedArray, h = n(42939);
        o.exports = function(p, _, d) {
          var f = p.cd[0], c = f.trace, g = p.xa, m = p.ya;
          if (!(l.inbox(_ - f.x0, _ - (f.x0 + f.w * c.dx), 0) > 0 || l.inbox(d - f.y0, d - (f.y0 + f.h * c.dy), 0) > 0)) {
            var x, w = Math.floor((_ - f.x0) / c.dx), k = Math.floor(Math.abs(d - f.y0) / c.dy);
            if (c._hasZ ? x = f.z[k][w] : c._hasSource && (x = c._canvas.el.getContext("2d", { willReadFrequently: !0 }).getImageData(w, k, 1, 1).data), x) {
              var S, A = f.hi || c.hoverinfo;
              if (A) {
                var C = A.split("+");
                C.indexOf("all") !== -1 && (C = ["color"]), C.indexOf("color") !== -1 && (S = !0);
              }
              var D, L = h.colormodel[c.colormodel], E = L.colormodel || c.colormodel, P = E.length, I = c._scaler(x), M = L.suffix, O = [];
              (c.hovertemplate || S) && (O.push("[" + [I[0] + M[0], I[1] + M[1], I[2] + M[2]].join(", ")), P === 4 && O.push(", " + I[3] + M[3]), O.push("]"), O = O.join(""), p.extraText = E.toUpperCase() + ": " + O), i(c.hovertext) && i(c.hovertext[k]) ? D = c.hovertext[k][w] : i(c.text) && i(c.text[k]) && (D = c.text[k][w]);
              var T = m.c2p(f.y0 + (k + 0.5) * c.dy), z = f.x0 + (w + 0.5) * c.dx, F = f.y0 + (k + 0.5) * c.dy, U = "[" + x.slice(0, c.colormodel.length).join(", ") + "]";
              return [u.extendFlat(p, { index: [k, w], x0: g.c2p(f.x0 + w * c.dx), x1: g.c2p(f.x0 + (w + 1) * c.dx), y0: T, y1: T, color: I, xVal: z, xLabelVal: z, yVal: F, yLabelVal: F, zLabelVal: U, text: D, hovertemplateLabels: { zLabel: U, colorLabel: O, "color[0]Label": I[0] + M[0], "color[1]Label": I[1] + M[1], "color[2]Label": I[2] + M[2], "color[3]Label": I[3] + M[3] } })];
            }
          }
        };
      }, 92106: function(o, s, n) {
        o.exports = { attributes: n(22153), supplyDefaults: n(82766), calc: n(31181), plot: n(36899), style: n(67555), hoverPoints: n(57328), eventData: n(45461), moduleType: "trace", name: "image", basePlotModule: n(37703), categories: ["cartesian", "svg", "2dMap", "noSortingByValue"], animatable: !1, meta: {} };
      }, 36899: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.strTranslate, h = n(62972), p = n(42939), _ = n(95544), d = n(1837).STYLE;
        o.exports = function(f, c, g, m) {
          var x = c.xaxis, w = c.yaxis, k = !f._context._exportedPlot && _();
          u.makeTraceGroups(m, g, "im").each(function(S) {
            var A = l.select(this), C = S[0], D = C.trace, L = (D.zsmooth === "fast" || D.zsmooth === !1 && k) && !D._hasZ && D._hasSource && x.type === "linear" && w.type === "linear";
            D._realImage = L;
            var E, P, I, M, O, T, z = C.z, F = C.x0, U = C.y0, V = C.w, $ = C.h, q = D.dx, K = D.dy;
            for (T = 0; E === void 0 && T < V; ) E = x.c2p(F + T * q), T++;
            for (T = V; P === void 0 && T > 0; ) P = x.c2p(F + T * q), T--;
            for (T = 0; M === void 0 && T < $; ) M = w.c2p(U + T * K), T++;
            for (T = $; O === void 0 && T > 0; ) O = w.c2p(U + T * K), T--;
            P < E && (I = P, P = E, E = I), O < M && (I = M, M = O, O = I), L || (E = Math.max(-0.5 * x._length, E), P = Math.min(1.5 * x._length, P), M = Math.max(-0.5 * w._length, M), O = Math.min(1.5 * w._length, O));
            var re = Math.round(P - E), Y = Math.round(O - M);
            if (re <= 0 || Y <= 0) A.selectAll("image").data([]).exit().remove();
            else {
              var te = A.selectAll("image").data([S]);
              te.enter().append("svg:image").attr({ xmlns: h.svg, preserveAspectRatio: "none" }), te.exit().remove();
              var ee = D.zsmooth === !1 ? d : "";
              if (L) {
                var X = u.simpleMap(x.range, x.r2l), Q = u.simpleMap(w.range, w.r2l), ue = X[1] < X[0], ce = Q[1] > Q[0];
                if (ue || ce) {
                  var he = E + re / 2, de = M + Y / 2;
                  ee += "transform:" + i(he + "px", de + "px") + "scale(" + (ue ? -1 : 1) + "," + (ce ? -1 : 1) + ")" + i(-he + "px", -de + "px") + ";";
                }
              }
              te.attr("style", ee);
              var ne = new Promise(function(se) {
                if (D._hasZ) se();
                else if (D._hasSource) if (D._canvas && D._canvas.el.width === V && D._canvas.el.height === $ && D._canvas.source === D.source) se();
                else {
                  var me = document.createElement("canvas");
                  me.width = V, me.height = $;
                  var ye = me.getContext("2d", { willReadFrequently: !0 });
                  D._image = D._image || new Image();
                  var pe = D._image;
                  pe.onload = function() {
                    ye.drawImage(pe, 0, 0), D._canvas = { el: me, source: D.source }, se();
                  }, pe.setAttribute("src", D.source);
                }
              }).then(function() {
                var se, me;
                if (D._hasZ) me = ae(function(pe, be) {
                  var Ae = z[be][pe];
                  return u.isTypedArray(Ae) && (Ae = Array.from(Ae)), Ae;
                }), se = me.toDataURL("image/png");
                else if (D._hasSource) if (L) se = D.source;
                else {
                  var ye = D._canvas.el.getContext("2d", { willReadFrequently: !0 }).getImageData(0, 0, V, $).data;
                  me = ae(function(pe, be) {
                    var Ae = 4 * (be * V + pe);
                    return [ye[Ae], ye[Ae + 1], ye[Ae + 2], ye[Ae + 3]];
                  }), se = me.toDataURL("image/png");
                }
                te.attr({ "xlink:href": se, height: Y, width: re, x: E, y: M });
              });
              f._promises.push(ne);
            }
            function ae(se) {
              var me = document.createElement("canvas");
              me.width = re, me.height = Y;
              var ye, pe = me.getContext("2d", { willReadFrequently: !0 }), be = function(ge) {
                return u.constrain(Math.round(x.c2p(F + ge * q) - E), 0, re);
              }, Ae = function(ge) {
                return u.constrain(Math.round(w.c2p(U + ge * K) - M), 0, Y);
              }, Se = p.colormodel[D.colormodel], Me = Se.colormodel || D.colormodel, De = Se.fmt;
              for (T = 0; T < C.w; T++) {
                var Le = be(T), We = be(T + 1);
                if (We !== Le && !isNaN(We) && !isNaN(Le)) for (var Ee = 0; Ee < C.h; Ee++) {
                  var Ne = Ae(Ee), Ie = Ae(Ee + 1);
                  Ie === Ne || isNaN(Ie) || isNaN(Ne) || !se(T, Ee) || (ye = D._scaler(se(T, Ee)), pe.fillStyle = ye ? Me + "(" + De(ye).join(",") + ")" : "rgba(0,0,0,0)", pe.fillRect(Le, Ne, We - Le, Ie - Ne));
                }
              }
              return me;
            }
          });
        };
      }, 67555: function(o, s, n) {
        var l = n(45568);
        o.exports = function(u) {
          l.select(u).selectAll(".im image").style("opacity", function(i) {
            return i[0].trace.opacity;
          });
        };
      }, 95485: function(o, s, n) {
        var l = n(93049).extendFlat, u = n(93049).extendDeep, i = n(13582).overrideAll, h = n(80337), p = n(10229), _ = n(13792).u, d = n(25829), f = n(78032).templatedArray, c = n(20909), g = n(80712).descriptionOnlyNumbers, m = h({ editType: "plot", colorEditType: "plot" }), x = { color: { valType: "color", editType: "plot" }, line: { color: { valType: "color", dflt: p.defaultLine, editType: "plot" }, width: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "calc" }, thickness: { valType: "number", min: 0, max: 1, dflt: 1, editType: "plot" }, editType: "calc" }, w = { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], editType: "plot" }, k = f("step", u({}, x, { range: w }));
        o.exports = { mode: { valType: "flaglist", editType: "calc", flags: ["number", "delta", "gauge"], dflt: "number" }, value: { valType: "number", editType: "calc", anim: !0 }, align: { valType: "enumerated", values: ["left", "center", "right"], editType: "plot" }, domain: _({ name: "indicator", trace: !0, editType: "calc" }), title: { text: { valType: "string", editType: "plot" }, align: { valType: "enumerated", values: ["left", "center", "right"], editType: "plot" }, font: l({}, m, {}), editType: "plot" }, number: { valueformat: { valType: "string", dflt: "", editType: "plot", description: g("value") }, font: l({}, m, {}), prefix: { valType: "string", dflt: "", editType: "plot" }, suffix: { valType: "string", dflt: "", editType: "plot" }, editType: "plot" }, delta: { reference: { valType: "number", editType: "calc" }, position: { valType: "enumerated", values: ["top", "bottom", "left", "right"], dflt: "bottom", editType: "plot" }, relative: { valType: "boolean", editType: "plot", dflt: !1 }, valueformat: { valType: "string", editType: "plot", description: g("value") }, increasing: { symbol: { valType: "string", dflt: c.INCREASING.SYMBOL, editType: "plot" }, color: { valType: "color", dflt: c.INCREASING.COLOR, editType: "plot" }, editType: "plot" }, decreasing: { symbol: { valType: "string", dflt: c.DECREASING.SYMBOL, editType: "plot" }, color: { valType: "color", dflt: c.DECREASING.COLOR, editType: "plot" }, editType: "plot" }, font: l({}, m, {}), prefix: { valType: "string", dflt: "", editType: "plot" }, suffix: { valType: "string", dflt: "", editType: "plot" }, editType: "calc" }, gauge: { shape: { valType: "enumerated", editType: "plot", dflt: "angular", values: ["angular", "bullet"] }, bar: u({}, x, { color: { dflt: "green" } }), bgcolor: { valType: "color", editType: "plot" }, bordercolor: { valType: "color", dflt: p.defaultLine, editType: "plot" }, borderwidth: { valType: "number", min: 0, dflt: 1, editType: "plot" }, axis: i({ range: w, visible: l({}, d.visible, { dflt: !0 }), tickmode: d.minor.tickmode, nticks: d.nticks, tick0: d.tick0, dtick: d.dtick, tickvals: d.tickvals, ticktext: d.ticktext, ticks: l({}, d.ticks, { dflt: "outside" }), ticklen: d.ticklen, tickwidth: d.tickwidth, tickcolor: d.tickcolor, ticklabelstep: d.ticklabelstep, showticklabels: d.showticklabels, labelalias: d.labelalias, tickfont: h({}), tickangle: d.tickangle, tickformat: d.tickformat, tickformatstops: d.tickformatstops, tickprefix: d.tickprefix, showtickprefix: d.showtickprefix, ticksuffix: d.ticksuffix, showticksuffix: d.showticksuffix, separatethousands: d.separatethousands, exponentformat: d.exponentformat, minexponent: d.minexponent, showexponent: d.showexponent, editType: "plot" }, "plot"), steps: k, threshold: { line: { color: l({}, x.line.color, {}), width: l({}, x.line.width, { dflt: 1 }), editType: "plot" }, thickness: l({}, x.thickness, { dflt: 0.85 }), value: { valType: "number", editType: "calc", dflt: !1 }, editType: "plot" }, editType: "plot" } };
      }, 47751: function(o, s, n) {
        var l = n(44122);
        s.name = "indicator", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 98385: function(o) {
        o.exports = { calc: function(s, n) {
          var l = [], u = n.value;
          typeof n._lastValue != "number" && (n._lastValue = n.value);
          var i = n._lastValue, h = i;
          return n._hasDelta && typeof n.delta.reference == "number" && (h = n.delta.reference), l[0] = { y: u, lastY: i, delta: u - h, relativeDelta: (u - h) / h }, l;
        } };
      }, 74807: function(o) {
        o.exports = { defaultNumberFontSize: 80, bulletNumberDomainSize: 0.25, bulletPadding: 0.025, innerRadius: 0.75, valueThickness: 0.5, titlePadding: 5, horizontalPadding: 10 };
      }, 79306: function(o, s, n) {
        var l = n(34809), u = n(95485), i = n(13792).N, h = n(78032), p = n(59008), _ = n(74807), d = n(22777), f = n(87433), c = n(12036), g = n(54616);
        function m(x, w) {
          function k(S, A) {
            return l.coerce(x, w, u.gauge.steps, S, A);
          }
          k("color"), k("line.color"), k("line.width"), k("range"), k("thickness");
        }
        o.exports = { supplyDefaults: function(x, w, k, S) {
          function A(q, K) {
            return l.coerce(x, w, u, q, K);
          }
          i(w, S, A), A("mode"), w._hasNumber = w.mode.indexOf("number") !== -1, w._hasDelta = w.mode.indexOf("delta") !== -1, w._hasGauge = w.mode.indexOf("gauge") !== -1;
          var C = A("value");
          w._range = [0, typeof C == "number" ? 1.5 * C : 1];
          var D, L, E = new Array(2);
          if (w._hasNumber) {
            A("number.valueformat");
            var P = l.extendFlat({}, S.font);
            P.size = void 0, l.coerceFont(A, "number.font", P), w.number.font.size === void 0 && (w.number.font.size = _.defaultNumberFontSize, E[0] = !0), A("number.prefix"), A("number.suffix"), D = w.number.font.size;
          }
          if (w._hasDelta) {
            var I = l.extendFlat({}, S.font);
            I.size = void 0, l.coerceFont(A, "delta.font", I), w.delta.font.size === void 0 && (w.delta.font.size = (w._hasNumber ? 0.5 : 1) * (D || _.defaultNumberFontSize), E[1] = !0), A("delta.reference", w.value), A("delta.relative"), A("delta.valueformat", w.delta.relative ? "2%" : ""), A("delta.increasing.symbol"), A("delta.increasing.color"), A("delta.decreasing.symbol"), A("delta.decreasing.color"), A("delta.position"), A("delta.prefix"), A("delta.suffix"), L = w.delta.font.size;
          }
          w._scaleNumbers = (!w._hasNumber || E[0]) && (!w._hasDelta || E[1]) || !1;
          var M, O, T, z, F = l.extendFlat({}, S.font);
          function U(q, K) {
            return l.coerce(M, O, u.gauge, q, K);
          }
          function V(q, K) {
            return l.coerce(T, z, u.gauge.axis, q, K);
          }
          if (F.size = 0.25 * (D || L || _.defaultNumberFontSize), l.coerceFont(A, "title.font", F), A("title.text"), w._hasGauge) {
            (M = x.gauge) || (M = {}), O = h.newContainer(w, "gauge"), U("shape"), (w._isBullet = w.gauge.shape === "bullet") || A("title.align", "center"), (w._isAngular = w.gauge.shape === "angular") || A("align", "center"), U("bgcolor", S.paper_bgcolor), U("borderwidth"), U("bordercolor"), U("bar.color"), U("bar.line.color"), U("bar.line.width"), U("bar.thickness", _.valueThickness * (w.gauge.shape === "bullet" ? 0.5 : 1)), p(M, O, { name: "steps", handleItemDefaults: m }), U("threshold.value"), U("threshold.thickness"), U("threshold.line.width"), U("threshold.line.color"), T = {}, M && (T = M.axis || {}), z = h.newContainer(O, "axis"), V("visible"), w._range = V("range", w._range);
            var $ = { font: S.font, noAutotickangles: !0, outerTicks: !0, noTicklabelshift: !0, noTicklabelstandoff: !0 };
            d(T, z, V, "linear"), g(T, z, V, "linear", $), c(T, z, V, "linear", $), f(T, z, V, $);
          } else A("title.align", "center"), A("align", "center"), w._isAngular = w._isBullet = !1;
          w._length = null;
        } };
      }, 25638: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "indicator", basePlotModule: n(47751), categories: ["svg", "noOpacity", "noHover"], animatable: !0, attributes: n(95485), supplyDefaults: n(79306).supplyDefaults, calc: n(98385).calc, plot: n(37095), meta: {} };
      }, 37095: function(o, s, n) {
        var l = n(45568), u = n(88640).GW, i = n(88640).Dj, h = n(34809), p = h.strScale, _ = h.strTranslate, d = h.rad2deg, f = n(4530).MID_SHIFT, c = n(62203), g = n(74807), m = n(30635), x = n(29714), w = n(97655), k = n(40957), S = n(25829), A = n(78766), C = { left: "start", center: "middle", right: "end" }, D = { left: 0, center: 0.5, right: 1 }, L = /[yzafpnµmkMGTPEZY]/;
        function E(z) {
          return z && z.duration > 0;
        }
        function P(z) {
          z.each(function(F) {
            A.stroke(l.select(this), F.line.color);
          }).each(function(F) {
            A.fill(l.select(this), F.color);
          }).style("stroke-width", function(F) {
            return F.line.width;
          });
        }
        function I(z, F, U) {
          var V = z._fullLayout, $ = h.extendFlat({ type: "linear", ticks: "outside", range: U, showline: !0 }, F), q = { type: "linear", _id: "x" + F._id }, K = { letter: "x", font: V.font, noAutotickangles: !0, noHover: !0, noTickson: !0 };
          function re(Y, te) {
            return h.coerce($, q, S, Y, te);
          }
          return w($, q, re, K, V), k($, q, re, K), q;
        }
        function M(z, F, U) {
          return [Math.min(F / z.width, U / z.height), z, F + "x" + U];
        }
        function O(z, F, U, V) {
          var $ = document.createElementNS("http://www.w3.org/2000/svg", "text"), q = l.select($);
          return q.text(z).attr("x", 0).attr("y", 0).attr("text-anchor", U).attr("data-unformatted", z).call(m.convertToTspans, V).call(c.font, F), c.bBox(q.node());
        }
        function T(z, F, U, V, $, q) {
          var K = "_cache" + F;
          z[K] && z[K].key === $ || (z[K] = { key: $, value: U });
          var re = h.aggNums(q, null, [z[K].value, V], 2);
          return z[K].value = re, re;
        }
        o.exports = function(z, F, U, V) {
          var $, q = z._fullLayout;
          E(U) && V && ($ = V()), h.makeTraceGroups(q._indicatorlayer, F, "trace").each(function(K) {
            var re, Y, te, ee, X, Q = K[0].trace, ue = l.select(this), ce = Q._hasGauge, he = Q._isAngular, de = Q._isBullet, ne = Q.domain, ae = { w: q._size.w * (ne.x[1] - ne.x[0]), h: q._size.h * (ne.y[1] - ne.y[0]), l: q._size.l + q._size.w * ne.x[0], r: q._size.r + q._size.w * (1 - ne.x[1]), t: q._size.t + q._size.h * (1 - ne.y[1]), b: q._size.b + q._size.h * ne.y[0] }, se = ae.l + ae.w / 2, me = ae.t + ae.h / 2, ye = Math.min(ae.w / 2, ae.h), pe = g.innerRadius * ye, be = Q.align || "center";
            if (Y = me, ce) {
              if (he && (re = se, Y = me + ye / 2, te = function(Ne) {
                return function(Ie, ge) {
                  return [ge / Math.sqrt(Ie.width / 2 * (Ie.width / 2) + Ie.height * Ie.height), Ie, ge];
                }(Ne, 0.9 * pe);
              }), de) {
                var Ae = g.bulletPadding, Se = 1 - g.bulletNumberDomainSize + Ae;
                re = ae.l + (Se + (1 - Se) * D[be]) * ae.w, te = function(Ne) {
                  return M(Ne, (g.bulletNumberDomainSize - Ae) * ae.w, ae.h);
                };
              }
            } else re = ae.l + D[be] * ae.w, te = function(Ne) {
              return M(Ne, ae.w, ae.h);
            };
            (function(Ne, Ie, ge, Ce) {
              var we, Ge, Re, je = ge[0].trace, Ke = Ce.numbersX, tt = Ce.numbersY, _e = je.align || "center", Be = C[_e], $e = Ce.transitionOpts, Ze = Ce.onComplete, ct = h.ensureSingle(Ie, "g", "numbers"), ft = [];
              je._hasNumber && ft.push("number"), je._hasDelta && (ft.push("delta"), je.delta.position === "left" && ft.reverse());
              var _t = ct.selectAll("text").data(ft);
              function Pt(St, Je, nt, ot) {
                if (!St.match("s") || nt >= 0 == ot >= 0 || Je(nt).slice(-1).match(L) || Je(ot).slice(-1).match(L)) return Je;
                var Ye = St.slice().replace("s", "f").replace(/\d+/, function(pt) {
                  return parseInt(pt) - 1;
                }), Fe = I(Ne, { tickformat: Ye });
                return function(pt) {
                  return Math.abs(pt) < 1 ? x.tickText(Fe, pt).text : Je(pt);
                };
              }
              _t.enter().append("text"), _t.attr("text-anchor", function() {
                return Be;
              }).attr("class", function(St) {
                return St;
              }).attr("x", null).attr("y", null).attr("dx", null).attr("dy", null), _t.exit().remove();
              var Dt, $t = je.mode + je.align;
              if (je._hasDelta && (Dt = function() {
                var St = I(Ne, { tickformat: je.delta.valueformat }, je._range);
                St.setScale(), x.prepTicks(St);
                var Je = function(Rt) {
                  return x.tickText(St, Rt).text;
                }, nt = je.delta.suffix, ot = je.delta.prefix, Ye = function(Rt) {
                  return je.delta.relative ? Rt.relativeDelta : Rt.delta;
                }, Fe = function(Rt, Ft) {
                  return Rt === 0 || typeof Rt != "number" || isNaN(Rt) ? "-" : (Rt > 0 ? je.delta.increasing.symbol : je.delta.decreasing.symbol) + ot + Ft(Rt) + nt;
                }, pt = function(Rt) {
                  return Rt.delta >= 0 ? je.delta.increasing.color : je.delta.decreasing.color;
                };
                je._deltaLastValue === void 0 && (je._deltaLastValue = Ye(ge[0]));
                var Mt = ct.select("text.delta");
                function At() {
                  Mt.text(Fe(Ye(ge[0]), Je)).call(A.fill, pt(ge[0])).call(m.convertToTspans, Ne);
                }
                return Mt.call(c.font, je.delta.font).call(A.fill, pt({ delta: je._deltaLastValue })), E($e) ? Mt.transition().duration($e.duration).ease($e.easing).tween("text", function() {
                  var Rt = l.select(this), Ft = Ye(ge[0]), lt = je._deltaLastValue, st = Pt(je.delta.valueformat, Je, lt, Ft), Ot = i(lt, Ft);
                  return je._deltaLastValue = Ft, function(kt) {
                    Rt.text(Fe(Ot(kt), st)), Rt.call(A.fill, pt({ delta: Ot(kt) }));
                  };
                }).each("end", function() {
                  At(), Ze && Ze();
                }).each("interrupt", function() {
                  At(), Ze && Ze();
                }) : At(), Ge = O(Fe(Ye(ge[0]), Je), je.delta.font, Be, Ne), Mt;
              }(), $t += je.delta.position + je.delta.font.size + je.delta.font.family + je.delta.valueformat, $t += je.delta.increasing.symbol + je.delta.decreasing.symbol, Re = Ge), je._hasNumber && (function() {
                var St = I(Ne, { tickformat: je.number.valueformat }, je._range);
                St.setScale(), x.prepTicks(St);
                var Je = function(pt) {
                  return x.tickText(St, pt).text;
                }, nt = je.number.suffix, ot = je.number.prefix, Ye = ct.select("text.number");
                function Fe() {
                  var pt = typeof ge[0].y == "number" ? ot + Je(ge[0].y) + nt : "-";
                  Ye.text(pt).call(c.font, je.number.font).call(m.convertToTspans, Ne);
                }
                E($e) ? Ye.transition().duration($e.duration).ease($e.easing).each("end", function() {
                  Fe(), Ze && Ze();
                }).each("interrupt", function() {
                  Fe(), Ze && Ze();
                }).attrTween("text", function() {
                  var pt = l.select(this), Mt = i(ge[0].lastY, ge[0].y);
                  je._lastValue = ge[0].y;
                  var At = Pt(je.number.valueformat, Je, ge[0].lastY, ge[0].y);
                  return function(Rt) {
                    pt.text(ot + At(Mt(Rt)) + nt);
                  };
                }) : Fe(), we = O(ot + Je(ge[0].y) + nt, je.number.font, Be, Ne);
              }(), $t += je.number.font.size + je.number.font.family + je.number.valueformat + je.number.suffix + je.number.prefix, Re = we), je._hasDelta && je._hasNumber) {
                var Gt, Wt, mt = [(we.left + we.right) / 2, (we.top + we.bottom) / 2], at = [(Ge.left + Ge.right) / 2, (Ge.top + Ge.bottom) / 2], vt = 0.75 * je.delta.font.size;
                je.delta.position === "left" && (Gt = T(je, "deltaPos", 0, -1 * (we.width * D[je.align] + Ge.width * (1 - D[je.align]) + vt), $t, Math.min), Wt = mt[1] - at[1], Re = { width: we.width + Ge.width + vt, height: Math.max(we.height, Ge.height), left: Ge.left + Gt, right: we.right, top: Math.min(we.top, Ge.top + Wt), bottom: Math.max(we.bottom, Ge.bottom + Wt) }), je.delta.position === "right" && (Gt = T(je, "deltaPos", 0, we.width * (1 - D[je.align]) + Ge.width * D[je.align] + vt, $t, Math.max), Wt = mt[1] - at[1], Re = { width: we.width + Ge.width + vt, height: Math.max(we.height, Ge.height), left: we.left, right: Ge.right + Gt, top: Math.min(we.top, Ge.top + Wt), bottom: Math.max(we.bottom, Ge.bottom + Wt) }), je.delta.position === "bottom" && (Gt = null, Wt = Ge.height, Re = { width: Math.max(we.width, Ge.width), height: we.height + Ge.height, left: Math.min(we.left, Ge.left), right: Math.max(we.right, Ge.right), top: we.bottom - we.height, bottom: we.bottom + Ge.height }), je.delta.position === "top" && (Gt = null, Wt = we.top, Re = { width: Math.max(we.width, Ge.width), height: we.height + Ge.height, left: Math.min(we.left, Ge.left), right: Math.max(we.right, Ge.right), top: we.bottom - we.height - Ge.height, bottom: we.bottom }), Dt.attr({ dx: Gt, dy: Wt });
              }
              (je._hasNumber || je._hasDelta) && ct.attr("transform", function() {
                var St = Ce.numbersScaler(Re);
                $t += St[2];
                var Je, nt = T(je, "numbersScale", 1, St[0], $t, Math.min);
                je._scaleNumbers || (nt = 1), Je = je._isAngular ? tt - nt * Re.bottom : tt - nt * (Re.top + Re.bottom) / 2, je._numbersTop = nt * Re.top + Je;
                var ot = Re[_e];
                _e === "center" && (ot = (Re.left + Re.right) / 2);
                var Ye = Ke - nt * ot;
                return Ye = T(je, "numbersTranslate", 0, Ye, $t, Math.max), _(Ye, Je) + p(nt);
              });
            })(z, ue, K, { numbersX: re, numbersY: Y, numbersScaler: te, transitionOpts: U, onComplete: $ }), ce && (ee = { range: Q.gauge.axis.range, color: Q.gauge.bgcolor, line: { color: Q.gauge.bordercolor, width: 0 }, thickness: 1 }, X = { range: Q.gauge.axis.range, color: "rgba(0, 0, 0, 0)", line: { color: Q.gauge.bordercolor, width: Q.gauge.borderwidth }, thickness: 1 });
            var Me = ue.selectAll("g.angular").data(he ? K : []);
            Me.exit().remove();
            var De = ue.selectAll("g.angularaxis").data(he ? K : []);
            De.exit().remove(), he && function(Ne, Ie, ge, Ce) {
              var we, Ge, Re, je, Ke = ge[0].trace, tt = Ce.size, _e = Ce.radius, Be = Ce.innerRadius, $e = Ce.gaugeBg, Ze = Ce.gaugeOutline, ct = [tt.l + tt.w / 2, tt.t + tt.h / 2 + _e / 2], ft = Ce.gauge, _t = Ce.layer, Pt = Ce.transitionOpts, Dt = Ce.onComplete, $t = Math.PI / 2;
              function Gt(kt) {
                var Bt = Ke.gauge.axis.range[0], xt = (kt - Bt) / (Ke.gauge.axis.range[1] - Bt) * Math.PI - $t;
                return xt < -$t ? -$t : xt > $t ? $t : xt;
              }
              function Wt(kt) {
                return l.svg.arc().innerRadius((Be + _e) / 2 - kt / 2 * (_e - Be)).outerRadius((Be + _e) / 2 + kt / 2 * (_e - Be)).startAngle(-$t);
              }
              function mt(kt) {
                kt.attr("d", function(Bt) {
                  return Wt(Bt.thickness).startAngle(Gt(Bt.range[0])).endAngle(Gt(Bt.range[1]))();
                });
              }
              ft.enter().append("g").classed("angular", !0), ft.attr("transform", _(ct[0], ct[1])), _t.enter().append("g").classed("angularaxis", !0).classed("crisp", !0), _t.selectAll("g.xangularaxistick,path,text").remove(), (we = I(Ne, Ke.gauge.axis)).type = "linear", we.range = Ke.gauge.axis.range, we._id = "xangularaxis", we.ticklabeloverflow = "allow", we.setScale();
              var at = function(kt) {
                return (we.range[0] - kt.x) / (we.range[1] - we.range[0]) * Math.PI + Math.PI;
              }, vt = {}, St = x.makeLabelFns(we, 0).labelStandoff;
              vt.xFn = function(kt) {
                var Bt = at(kt);
                return Math.cos(Bt) * St;
              }, vt.yFn = function(kt) {
                var Bt = at(kt), xt = Math.sin(Bt) > 0 ? 0.2 : 1;
                return -Math.sin(Bt) * (St + kt.fontSize * xt) + Math.abs(Math.cos(Bt)) * (kt.fontSize * f);
              }, vt.anchorFn = function(kt) {
                var Bt = at(kt), xt = Math.cos(Bt);
                return Math.abs(xt) < 0.1 ? "middle" : xt > 0 ? "start" : "end";
              }, vt.heightFn = function(kt, Bt, xt) {
                var Jt = at(kt);
                return -0.5 * (1 + Math.sin(Jt)) * xt;
              };
              var Je = function(kt) {
                return _(ct[0] + _e * Math.cos(kt), ct[1] - _e * Math.sin(kt));
              };
              if (Re = function(kt) {
                return Je(at(kt));
              }, Ge = x.calcTicks(we), je = x.getTickSigns(we)[2], we.visible) {
                je = we.ticks === "inside" ? -1 : 1;
                var nt = (we.linewidth || 1) / 2;
                x.drawTicks(Ne, we, { vals: Ge, layer: _t, path: "M" + je * nt + ",0h" + je * we.ticklen, transFn: function(kt) {
                  var Bt = at(kt);
                  return Je(Bt) + "rotate(" + -d(Bt) + ")";
                } }), x.drawLabels(Ne, we, { vals: Ge, layer: _t, transFn: Re, labelFns: vt });
              }
              var ot = [$e].concat(Ke.gauge.steps), Ye = ft.selectAll("g.bg-arc").data(ot);
              Ye.enter().append("g").classed("bg-arc", !0).append("path"), Ye.select("path").call(mt).call(P), Ye.exit().remove();
              var Fe = Wt(Ke.gauge.bar.thickness), pt = ft.selectAll("g.value-arc").data([Ke.gauge.bar]);
              pt.enter().append("g").classed("value-arc", !0).append("path");
              var Mt, At, Rt, Ft = pt.select("path");
              E(Pt) ? (Ft.transition().duration(Pt.duration).ease(Pt.easing).each("end", function() {
                Dt && Dt();
              }).each("interrupt", function() {
                Dt && Dt();
              }).attrTween("d", (Mt = Fe, At = Gt(ge[0].lastY), Rt = Gt(ge[0].y), function() {
                var kt = u(At, Rt);
                return function(Bt) {
                  return Mt.endAngle(kt(Bt))();
                };
              })), Ke._lastValue = ge[0].y) : Ft.attr("d", typeof ge[0].y == "number" ? Fe.endAngle(Gt(ge[0].y)) : "M0,0Z"), Ft.call(P), pt.exit().remove(), ot = [];
              var lt = Ke.gauge.threshold.value;
              (lt || lt === 0) && ot.push({ range: [lt, lt], color: Ke.gauge.threshold.color, line: { color: Ke.gauge.threshold.line.color, width: Ke.gauge.threshold.line.width }, thickness: Ke.gauge.threshold.thickness });
              var st = ft.selectAll("g.threshold-arc").data(ot);
              st.enter().append("g").classed("threshold-arc", !0).append("path"), st.select("path").call(mt).call(P), st.exit().remove();
              var Ot = ft.selectAll("g.gauge-outline").data([Ze]);
              Ot.enter().append("g").classed("gauge-outline", !0).append("path"), Ot.select("path").call(mt).call(P), Ot.exit().remove();
            }(z, 0, K, { radius: ye, innerRadius: pe, gauge: Me, layer: De, size: ae, gaugeBg: ee, gaugeOutline: X, transitionOpts: U, onComplete: $ });
            var Le = ue.selectAll("g.bullet").data(de ? K : []);
            Le.exit().remove();
            var We = ue.selectAll("g.bulletaxis").data(de ? K : []);
            We.exit().remove(), de && function(Ne, Ie, ge, Ce) {
              var we, Ge, Re, je, Ke, tt = ge[0].trace, _e = Ce.gauge, Be = Ce.layer, $e = Ce.gaugeBg, Ze = Ce.gaugeOutline, ct = Ce.size, ft = tt.domain, _t = Ce.transitionOpts, Pt = Ce.onComplete;
              _e.enter().append("g").classed("bullet", !0), _e.attr("transform", _(ct.l, ct.t)), Be.enter().append("g").classed("bulletaxis", !0).classed("crisp", !0), Be.selectAll("g.xbulletaxistick,path,text").remove();
              var Dt = ct.h, $t = tt.gauge.bar.thickness * Dt, Gt = ft.x[0], Wt = ft.x[0] + (ft.x[1] - ft.x[0]) * (tt._hasNumber || tt._hasDelta ? 1 - g.bulletNumberDomainSize : 1);
              function mt(Ye) {
                Ye.attr("width", function(Fe) {
                  return Math.max(0, we.c2p(Fe.range[1]) - we.c2p(Fe.range[0]));
                }).attr("x", function(Fe) {
                  return we.c2p(Fe.range[0]);
                }).attr("y", function(Fe) {
                  return 0.5 * (1 - Fe.thickness) * Dt;
                }).attr("height", function(Fe) {
                  return Fe.thickness * Dt;
                });
              }
              (we = I(Ne, tt.gauge.axis))._id = "xbulletaxis", we.domain = [Gt, Wt], we.setScale(), Ge = x.calcTicks(we), Re = x.makeTransTickFn(we), je = x.getTickSigns(we)[2], Ke = ct.t + ct.h, we.visible && (x.drawTicks(Ne, we, { vals: we.ticks === "inside" ? x.clipEnds(we, Ge) : Ge, layer: Be, path: x.makeTickPath(we, Ke, je), transFn: Re }), x.drawLabels(Ne, we, { vals: Ge, layer: Be, transFn: Re, labelFns: x.makeLabelFns(we, Ke) }));
              var at = [$e].concat(tt.gauge.steps), vt = _e.selectAll("g.bg-bullet").data(at);
              vt.enter().append("g").classed("bg-bullet", !0).append("rect"), vt.select("rect").call(mt).call(P), vt.exit().remove();
              var St = _e.selectAll("g.value-bullet").data([tt.gauge.bar]);
              St.enter().append("g").classed("value-bullet", !0).append("rect"), St.select("rect").attr("height", $t).attr("y", (Dt - $t) / 2).call(P), E(_t) ? St.select("rect").transition().duration(_t.duration).ease(_t.easing).each("end", function() {
                Pt && Pt();
              }).each("interrupt", function() {
                Pt && Pt();
              }).attr("width", Math.max(0, we.c2p(Math.min(tt.gauge.axis.range[1], ge[0].y)))) : St.select("rect").attr("width", typeof ge[0].y == "number" ? Math.max(0, we.c2p(Math.min(tt.gauge.axis.range[1], ge[0].y))) : 0), St.exit().remove();
              var Je = ge.filter(function() {
                return tt.gauge.threshold.value || tt.gauge.threshold.value === 0;
              }), nt = _e.selectAll("g.threshold-bullet").data(Je);
              nt.enter().append("g").classed("threshold-bullet", !0).append("line"), nt.select("line").attr("x1", we.c2p(tt.gauge.threshold.value)).attr("x2", we.c2p(tt.gauge.threshold.value)).attr("y1", (1 - tt.gauge.threshold.thickness) / 2 * Dt).attr("y2", (1 - (1 - tt.gauge.threshold.thickness) / 2) * Dt).call(A.stroke, tt.gauge.threshold.line.color).style("stroke-width", tt.gauge.threshold.line.width), nt.exit().remove();
              var ot = _e.selectAll("g.gauge-outline").data([Ze]);
              ot.enter().append("g").classed("gauge-outline", !0).append("rect"), ot.select("rect").call(mt).call(P), ot.exit().remove();
            }(z, 0, K, { gauge: Le, layer: We, size: ae, gaugeBg: ee, gaugeOutline: X, transitionOpts: U, onComplete: $ });
            var Ee = ue.selectAll("text.title").data(K);
            Ee.exit().remove(), Ee.enter().append("text").classed("title", !0), Ee.attr("text-anchor", function() {
              return de ? C.right : C[Q.title.align];
            }).text(Q.title.text).call(c.font, Q.title.font).call(m.convertToTspans, z), Ee.attr("transform", function() {
              var Ne, Ie = ae.l + ae.w * D[Q.title.align], ge = g.titlePadding, Ce = c.bBox(Ee.node());
              return ce ? (he && (Ne = Q.gauge.axis.visible ? c.bBox(De.node()).top - ge - Ce.bottom : ae.t + ae.h / 2 - ye / 2 - Ce.bottom - ge), de && (Ne = Y - (Ce.top + Ce.bottom) / 2, Ie = ae.l - g.bulletPadding * ae.w)) : Ne = Q._numbersTop - ge - Ce.bottom, _(Ie, Ne);
            });
          });
        };
      }, 70252: function(o, s, n) {
        var l = n(87163), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(42450), p = n(9829), _ = n(93049).extendFlat, d = n(13582).overrideAll, f = o.exports = d(_({ x: { valType: "data_array" }, y: { valType: "data_array" }, z: { valType: "data_array" }, value: { valType: "data_array" }, isomin: { valType: "number" }, isomax: { valType: "number" }, surface: { show: { valType: "boolean", dflt: !0 }, count: { valType: "integer", dflt: 2, min: 1 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 }, pattern: { valType: "flaglist", flags: ["A", "B", "C", "D", "E"], extras: ["all", "odd", "even"], dflt: "all" } }, spaceframe: { show: { valType: "boolean", dflt: !1 }, fill: { valType: "number", min: 0, max: 1, dflt: 0.15 } }, slices: { x: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, y: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, z: { show: { valType: "boolean", dflt: !1 }, locations: { valType: "data_array", dflt: [] }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } } }, caps: { x: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, y: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, z: { show: { valType: "boolean", dflt: !0 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } } }, text: { valType: "string", dflt: "", arrayOk: !0 }, hovertext: { valType: "string", dflt: "", arrayOk: !0 }, hovertemplate: i(), xhoverformat: u("x"), yhoverformat: u("y"), zhoverformat: u("z"), valuehoverformat: u("value", 1), showlegend: _({}, p.showlegend, { dflt: !1 }) }, l("", { colorAttr: "`value`", showScaleDflt: !0, editTypeOverride: "calc" }), { opacity: h.opacity, lightposition: h.lightposition, lighting: h.lighting, flatshading: h.flatshading, contour: h.contour, hoverinfo: _({}, p.hoverinfo) }), "calc", "nested");
        f.flatshading.dflt = !0, f.lighting.facenormalsepsilon.dflt = 0, f.x.editType = f.y.editType = f.z.editType = f.value.editType = "calc+clearAxisTypes", f.transforms = void 0;
      }, 58988: function(o, s, n) {
        var l = n(28379), u = n(36402).processGrid, i = n(36402).filter;
        o.exports = function(h, p) {
          p._len = Math.min(p.x.length, p.y.length, p.z.length, p.value.length), p._x = i(p.x, p._len), p._y = i(p.y, p._len), p._z = i(p.z, p._len), p._value = i(p.value, p._len);
          var _ = u(p);
          p._gridFill = _.fill, p._Xs = _.Xs, p._Ys = _.Ys, p._Zs = _.Zs, p._len = _.len;
          for (var d = 1 / 0, f = -1 / 0, c = 0; c < p._len; c++) {
            var g = p._value[c];
            d = Math.min(d, g), f = Math.max(f, g);
          }
          p._minValues = d, p._maxValues = f, p._vMin = p.isomin === void 0 || p.isomin === null ? d : p.isomin, p._vMax = p.isomax === void 0 || p.isomax === null ? f : p.isomax, l(h, p, { vals: [p._vMin, p._vMax], containerStr: "", cLetter: "c" });
        };
      }, 91370: function(o, s, n) {
        var l = n(99098).gl_mesh3d, u = n(46998).parseColorScale, i = n(34809).isArrayOrTypedArray, h = n(55010), p = n(88856).extractOpts, _ = n(88239), d = function(x, w) {
          for (var k = w.length - 1; k > 0; k--) {
            var S = Math.min(w[k], w[k - 1]), A = Math.max(w[k], w[k - 1]);
            if (A > S && S < x && x <= A) return { id: k, distRatio: (A - x) / (A - S) };
          }
          return { id: 0, distRatio: 0 };
        };
        function f(x, w, k) {
          this.scene = x, this.uid = k, this.mesh = w, this.name = "", this.data = null, this.showContour = !1;
        }
        var c = f.prototype;
        c.handlePick = function(x) {
          if (x.object === this.mesh) {
            var w = x.data.index, k = this.data._meshX[w], S = this.data._meshY[w], A = this.data._meshZ[w], C = this.data._Ys.length, D = this.data._Zs.length, L = d(k, this.data._Xs).id, E = d(S, this.data._Ys).id, P = d(A, this.data._Zs).id, I = x.index = P + D * E + D * C * L;
            x.traceCoordinate = [this.data._meshX[I], this.data._meshY[I], this.data._meshZ[I], this.data._value[I]];
            var M = this.data.hovertext || this.data.text;
            return i(M) && M[I] !== void 0 ? x.textLabel = M[I] : M && (x.textLabel = M), !0;
          }
        }, c.update = function(x) {
          var w = this.scene, k = w.fullSceneLayout;
          function S(D, L, E, P) {
            return L.map(function(I) {
              return D.d2l(I, 0, P) * E;
            });
          }
          this.data = m(x);
          var A = { positions: _(S(k.xaxis, x._meshX, w.dataScale[0], x.xcalendar), S(k.yaxis, x._meshY, w.dataScale[1], x.ycalendar), S(k.zaxis, x._meshZ, w.dataScale[2], x.zcalendar)), cells: _(x._meshI, x._meshJ, x._meshK), lightPosition: [x.lightposition.x, x.lightposition.y, x.lightposition.z], ambient: x.lighting.ambient, diffuse: x.lighting.diffuse, specular: x.lighting.specular, roughness: x.lighting.roughness, fresnel: x.lighting.fresnel, vertexNormalsEpsilon: x.lighting.vertexnormalsepsilon, faceNormalsEpsilon: x.lighting.facenormalsepsilon, opacity: x.opacity, contourEnable: x.contour.show, contourColor: h(x.contour.color).slice(0, 3), contourWidth: x.contour.width, useFacetNormals: x.flatshading }, C = p(x);
          A.vertexIntensity = x._meshIntensity, A.vertexIntensityBounds = [C.min, C.max], A.colormap = u(x), this.mesh.update(A);
        }, c.dispose = function() {
          this.scene.glplot.remove(this.mesh), this.mesh.dispose();
        };
        var g = ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"];
        function m(x) {
          x._meshI = [], x._meshJ = [], x._meshK = [];
          var w, k, S, A, C, D, L, E = x.surface.show, P = x.spaceframe.show, I = x.surface.fill, M = x.spaceframe.fill, O = !1, T = !1, z = 0, F = x._Xs, U = x._Ys, V = x._Zs, $ = F.length, q = U.length, K = V.length, re = g.indexOf(x._gridFill.replace(/-/g, "").replace(/\+/g, "")), Y = function(Be, $e, Ze) {
            switch (re) {
              case 5:
                return Ze + K * $e + K * q * Be;
              case 4:
                return Ze + K * Be + K * $ * $e;
              case 3:
                return $e + q * Ze + q * K * Be;
              case 2:
                return $e + q * Be + q * $ * Ze;
              case 1:
                return Be + $ * Ze + $ * K * $e;
              default:
                return Be + $ * $e + $ * q * Ze;
            }
          }, te = x._minValues, ee = x._maxValues, X = x._vMin, Q = x._vMax;
          function ue(Be, $e, Ze) {
            for (var ct = D.length, ft = k; ft < ct; ft++) if (Be === S[ft] && $e === A[ft] && Ze === C[ft]) return ft;
            return -1;
          }
          function ce() {
            k = w;
          }
          function he() {
            S = [], A = [], C = [], D = [], w = 0, ce();
          }
          function de(Be, $e, Ze, ct) {
            return S.push(Be), A.push($e), C.push(Ze), D.push(ct), ++w - 1;
          }
          function ne(Be, $e, Ze) {
            for (var ct = [], ft = 0; ft < Be.length; ft++) ct[ft] = Be[ft] * (1 - Ze) + Ze * $e[ft];
            return ct;
          }
          function ae(Be) {
            L = Be;
          }
          function se(Be, $e) {
            return Be === "all" || Be === null || Be.indexOf($e) > -1;
          }
          function me(Be, $e) {
            return Be === null ? $e : Be;
          }
          function ye(Be, $e, Ze) {
            ce();
            var ct, ft, _t, Pt = [$e], Dt = [Ze];
            if (L >= 1) Pt = [$e], Dt = [Ze];
            else if (L > 0) {
              var $t = function(ot, Ye) {
                var Fe = ot[0], pt = ot[1], Mt = ot[2], At = function(xt, Jt, qt) {
                  for (var en = [], Yt = 0; Yt < xt.length; Yt++) en[Yt] = (xt[Yt] + Jt[Yt] + qt[Yt]) / 3;
                  return en;
                }(Fe, pt, Mt), Rt = Math.sqrt(1 - L), Ft = ne(At, Fe, Rt), lt = ne(At, pt, Rt), st = ne(At, Mt, Rt), Ot = Ye[0], kt = Ye[1], Bt = Ye[2];
                return { xyzv: [[Fe, pt, lt], [lt, Ft, Fe], [pt, Mt, st], [st, lt, pt], [Mt, Fe, Ft], [Ft, st, Mt]], abc: [[Ot, kt, -1], [-1, -1, Ot], [kt, Bt, -1], [-1, -1, kt], [Bt, Ot, -1], [-1, -1, Bt]] };
              }($e, Ze);
              Pt = $t.xyzv, Dt = $t.abc;
            }
            for (var Gt = 0; Gt < Pt.length; Gt++) {
              $e = Pt[Gt], Ze = Dt[Gt];
              for (var Wt = [], mt = 0; mt < 3; mt++) {
                var at = $e[mt][0], vt = $e[mt][1], St = $e[mt][2], Je = $e[mt][3], nt = Ze[mt] > -1 ? Ze[mt] : ue(at, vt, St);
                Wt[mt] = nt > -1 ? nt : de(at, vt, St, me(Be, Je));
              }
              ct = Wt[0], ft = Wt[1], _t = Wt[2], x._meshI.push(ct), x._meshJ.push(ft), x._meshK.push(_t), ++z;
            }
          }
          function pe(Be, $e, Ze, ct) {
            var ft = Be[3];
            ft < Ze && (ft = Ze), ft > ct && (ft = ct);
            for (var _t = (Be[3] - ft) / (Be[3] - $e[3] + 1e-9), Pt = [], Dt = 0; Dt < 4; Dt++) Pt[Dt] = (1 - _t) * Be[Dt] + _t * $e[Dt];
            return Pt;
          }
          function be(Be, $e, Ze) {
            return Be >= $e && Be <= Ze;
          }
          function Ae(Be) {
            var $e = 1e-3 * (Q - X);
            return Be >= X - $e && Be <= Q + $e;
          }
          function Se(Be) {
            for (var $e = [], Ze = 0; Ze < 4; Ze++) {
              var ct = Be[Ze];
              $e.push([x._x[ct], x._y[ct], x._z[ct], x._value[ct]]);
            }
            return $e;
          }
          var Me = 3;
          function De(Be, $e, Ze, ct, ft, _t) {
            _t || (_t = 1), Ze = [-1, -1, -1];
            var Pt = !1, Dt = [be($e[0][3], ct, ft), be($e[1][3], ct, ft), be($e[2][3], ct, ft)];
            if (!Dt[0] && !Dt[1] && !Dt[2]) return !1;
            var $t = function(Wt, mt, at) {
              return Ae(mt[0][3]) && Ae(mt[1][3]) && Ae(mt[2][3]) ? (ye(Wt, mt, at), !0) : _t < Me && De(Wt, mt, at, X, Q, ++_t);
            };
            if (Dt[0] && Dt[1] && Dt[2]) return $t(Be, $e, Ze) || Pt;
            var Gt = !1;
            return [[0, 1, 2], [2, 0, 1], [1, 2, 0]].forEach(function(Wt) {
              if (Dt[Wt[0]] && Dt[Wt[1]] && !Dt[Wt[2]]) {
                var mt = $e[Wt[0]], at = $e[Wt[1]], vt = $e[Wt[2]], St = pe(vt, mt, ct, ft), Je = pe(vt, at, ct, ft);
                Pt = $t(Be, [Je, St, mt], [-1, -1, Ze[Wt[0]]]) || Pt, Pt = $t(Be, [mt, at, Je], [Ze[Wt[0]], Ze[Wt[1]], -1]) || Pt, Gt = !0;
              }
            }), Gt || [[0, 1, 2], [1, 2, 0], [2, 0, 1]].forEach(function(Wt) {
              if (Dt[Wt[0]] && !Dt[Wt[1]] && !Dt[Wt[2]]) {
                var mt = $e[Wt[0]], at = $e[Wt[1]], vt = $e[Wt[2]], St = pe(at, mt, ct, ft), Je = pe(vt, mt, ct, ft);
                Pt = $t(Be, [Je, St, mt], [-1, -1, Ze[Wt[0]]]) || Pt, Gt = !0;
              }
            }), Pt;
          }
          function Le(Be, $e, Ze, ct) {
            var ft = !1, _t = Se($e), Pt = [be(_t[0][3], Ze, ct), be(_t[1][3], Ze, ct), be(_t[2][3], Ze, ct), be(_t[3][3], Ze, ct)];
            if (!(Pt[0] || Pt[1] || Pt[2] || Pt[3])) return ft;
            if (Pt[0] && Pt[1] && Pt[2] && Pt[3]) return T && (ft = function($t, Gt, Wt) {
              var mt = function(at, vt, St) {
                ye($t, [Gt[at], Gt[vt], Gt[St]], [Wt[at], Wt[vt], Wt[St]]);
              };
              mt(0, 1, 2), mt(3, 0, 1), mt(2, 3, 0), mt(1, 2, 3);
            }(Be, _t, $e) || ft), ft;
            var Dt = !1;
            return [[0, 1, 2, 3], [3, 0, 1, 2], [2, 3, 0, 1], [1, 2, 3, 0]].forEach(function($t) {
              if (Pt[$t[0]] && Pt[$t[1]] && Pt[$t[2]] && !Pt[$t[3]]) {
                var Gt = _t[$t[0]], Wt = _t[$t[1]], mt = _t[$t[2]], at = _t[$t[3]];
                if (T) ft = ye(Be, [Gt, Wt, mt], [$e[$t[0]], $e[$t[1]], $e[$t[2]]]) || ft;
                else {
                  var vt = pe(at, Gt, Ze, ct), St = pe(at, Wt, Ze, ct), Je = pe(at, mt, Ze, ct);
                  ft = ye(null, [vt, St, Je], [-1, -1, -1]) || ft;
                }
                Dt = !0;
              }
            }), Dt || ([[0, 1, 2, 3], [1, 2, 3, 0], [2, 3, 0, 1], [3, 0, 1, 2], [0, 2, 3, 1], [1, 3, 2, 0]].forEach(function($t) {
              if (Pt[$t[0]] && Pt[$t[1]] && !Pt[$t[2]] && !Pt[$t[3]]) {
                var Gt = _t[$t[0]], Wt = _t[$t[1]], mt = _t[$t[2]], at = _t[$t[3]], vt = pe(mt, Gt, Ze, ct), St = pe(mt, Wt, Ze, ct), Je = pe(at, Wt, Ze, ct), nt = pe(at, Gt, Ze, ct);
                T ? (ft = ye(Be, [Gt, nt, vt], [$e[$t[0]], -1, -1]) || ft, ft = ye(Be, [Wt, St, Je], [$e[$t[1]], -1, -1]) || ft) : ft = function(ot, Ye, Fe) {
                  var pt = function(Mt, At, Rt) {
                    ye(null, [Ye[Mt], Ye[At], Ye[Rt]], [Fe[Mt], Fe[At], Fe[Rt]]);
                  };
                  pt(0, 1, 2), pt(2, 3, 0);
                }(0, [vt, St, Je, nt], [-1, -1, -1, -1]) || ft, Dt = !0;
              }
            }), Dt || [[0, 1, 2, 3], [1, 2, 3, 0], [2, 3, 0, 1], [3, 0, 1, 2]].forEach(function($t) {
              if (Pt[$t[0]] && !Pt[$t[1]] && !Pt[$t[2]] && !Pt[$t[3]]) {
                var Gt = _t[$t[0]], Wt = _t[$t[1]], mt = _t[$t[2]], at = _t[$t[3]], vt = pe(Wt, Gt, Ze, ct), St = pe(mt, Gt, Ze, ct), Je = pe(at, Gt, Ze, ct);
                T ? (ft = ye(Be, [Gt, vt, St], [$e[$t[0]], -1, -1]) || ft, ft = ye(Be, [Gt, St, Je], [$e[$t[0]], -1, -1]) || ft, ft = ye(Be, [Gt, Je, vt], [$e[$t[0]], -1, -1]) || ft) : ft = ye(null, [vt, St, Je], [-1, -1, -1]) || ft, Dt = !0;
              }
            })), ft;
          }
          function We(Be, $e, Ze, ct, ft, _t, Pt, Dt, $t, Gt, Wt) {
            var mt = !1;
            return O && (se(Be, "A") && (mt = Le(null, [$e, Ze, ct, _t], Gt, Wt) || mt), se(Be, "B") && (mt = Le(null, [Ze, ct, ft, $t], Gt, Wt) || mt), se(Be, "C") && (mt = Le(null, [Ze, _t, Pt, $t], Gt, Wt) || mt), se(Be, "D") && (mt = Le(null, [ct, _t, Dt, $t], Gt, Wt) || mt), se(Be, "E") && (mt = Le(null, [Ze, ct, _t, $t], Gt, Wt) || mt)), T && (mt = Le(Be, [Ze, ct, _t, $t], Gt, Wt) || mt), mt;
          }
          function Ee(Be, $e, Ze, ct, ft, _t, Pt, Dt) {
            return [Dt[0] === !0 || De(Be, Se([$e, Ze, ct]), [$e, Ze, ct], _t, Pt), Dt[1] === !0 || De(Be, Se([ct, ft, $e]), [ct, ft, $e], _t, Pt)];
          }
          function Ne(Be, $e, Ze, ct, ft, _t, Pt, Dt, $t) {
            return Dt ? Ee(Be, $e, Ze, ft, ct, _t, Pt, $t) : Ee(Be, Ze, ft, ct, $e, _t, Pt, $t);
          }
          function Ie(Be, $e, Ze, ct, ft, _t, Pt) {
            var Dt, $t, Gt, Wt, mt = !1, at = function() {
              mt = De(Be, [Dt, $t, Gt], [-1, -1, -1], ft, _t) || mt, mt = De(Be, [Gt, Wt, Dt], [-1, -1, -1], ft, _t) || mt;
            }, vt = Pt[0], St = Pt[1], Je = Pt[2];
            return vt && (Dt = ne(Se([Y($e, Ze - 0, ct - 0)])[0], Se([Y($e - 1, Ze - 0, ct - 0)])[0], vt), $t = ne(Se([Y($e, Ze - 0, ct - 1)])[0], Se([Y($e - 1, Ze - 0, ct - 1)])[0], vt), Gt = ne(Se([Y($e, Ze - 1, ct - 1)])[0], Se([Y($e - 1, Ze - 1, ct - 1)])[0], vt), Wt = ne(Se([Y($e, Ze - 1, ct - 0)])[0], Se([Y($e - 1, Ze - 1, ct - 0)])[0], vt), at()), St && (Dt = ne(Se([Y($e - 0, Ze, ct - 0)])[0], Se([Y($e - 0, Ze - 1, ct - 0)])[0], St), $t = ne(Se([Y($e - 0, Ze, ct - 1)])[0], Se([Y($e - 0, Ze - 1, ct - 1)])[0], St), Gt = ne(Se([Y($e - 1, Ze, ct - 1)])[0], Se([Y($e - 1, Ze - 1, ct - 1)])[0], St), Wt = ne(Se([Y($e - 1, Ze, ct - 0)])[0], Se([Y($e - 1, Ze - 1, ct - 0)])[0], St), at()), Je && (Dt = ne(Se([Y($e - 0, Ze - 0, ct)])[0], Se([Y($e - 0, Ze - 0, ct - 1)])[0], Je), $t = ne(Se([Y($e - 0, Ze - 1, ct)])[0], Se([Y($e - 0, Ze - 1, ct - 1)])[0], Je), Gt = ne(Se([Y($e - 1, Ze - 1, ct)])[0], Se([Y($e - 1, Ze - 1, ct - 1)])[0], Je), Wt = ne(Se([Y($e - 1, Ze - 0, ct)])[0], Se([Y($e - 1, Ze - 0, ct - 1)])[0], Je), at()), mt;
          }
          function ge(Be, $e, Ze, ct, ft, _t, Pt, Dt, $t, Gt, Wt, mt) {
            var at = Be;
            return mt ? (O && Be === "even" && (at = null), We(at, $e, Ze, ct, ft, _t, Pt, Dt, $t, Gt, Wt)) : (O && Be === "odd" && (at = null), We(at, $t, Dt, Pt, _t, ft, ct, Ze, $e, Gt, Wt));
          }
          function Ce(Be, $e, Ze, ct, ft) {
            for (var _t = [], Pt = 0, Dt = 0; Dt < $e.length; Dt++) for (var $t = $e[Dt], Gt = 1; Gt < K; Gt++) for (var Wt = 1; Wt < q; Wt++) _t.push(Ne(Be, Y($t, Wt - 1, Gt - 1), Y($t, Wt - 1, Gt), Y($t, Wt, Gt - 1), Y($t, Wt, Gt), Ze, ct, ($t + Wt + Gt) % 2, ft && ft[Pt] ? ft[Pt] : [])), Pt++;
            return _t;
          }
          function we(Be, $e, Ze, ct, ft) {
            for (var _t = [], Pt = 0, Dt = 0; Dt < $e.length; Dt++) for (var $t = $e[Dt], Gt = 1; Gt < $; Gt++) for (var Wt = 1; Wt < K; Wt++) _t.push(Ne(Be, Y(Gt - 1, $t, Wt - 1), Y(Gt, $t, Wt - 1), Y(Gt - 1, $t, Wt), Y(Gt, $t, Wt), Ze, ct, (Gt + $t + Wt) % 2, ft && ft[Pt] ? ft[Pt] : [])), Pt++;
            return _t;
          }
          function Ge(Be, $e, Ze, ct, ft) {
            for (var _t = [], Pt = 0, Dt = 0; Dt < $e.length; Dt++) for (var $t = $e[Dt], Gt = 1; Gt < q; Gt++) for (var Wt = 1; Wt < $; Wt++) _t.push(Ne(Be, Y(Wt - 1, Gt - 1, $t), Y(Wt - 1, Gt, $t), Y(Wt, Gt - 1, $t), Y(Wt, Gt, $t), Ze, ct, (Wt + Gt + $t) % 2, ft && ft[Pt] ? ft[Pt] : [])), Pt++;
            return _t;
          }
          function Re(Be, $e, Ze) {
            for (var ct = 1; ct < K; ct++) for (var ft = 1; ft < q; ft++) for (var _t = 1; _t < $; _t++) ge(Be, Y(_t - 1, ft - 1, ct - 1), Y(_t - 1, ft - 1, ct), Y(_t - 1, ft, ct - 1), Y(_t - 1, ft, ct), Y(_t, ft - 1, ct - 1), Y(_t, ft - 1, ct), Y(_t, ft, ct - 1), Y(_t, ft, ct), $e, Ze, (_t + ft + ct) % 2);
          }
          function je(Be, $e, Ze, ct, ft, _t) {
            for (var Pt = [], Dt = 0, $t = 0; $t < $e.length; $t++) for (var Gt = $e[$t], Wt = 1; Wt < K; Wt++) for (var mt = 1; mt < q; mt++) Pt.push(Ie(Be, Gt, mt, Wt, Ze, ct, ft[$t], _t && _t[Dt] && _t[Dt])), Dt++;
            return Pt;
          }
          function Ke(Be, $e, Ze, ct, ft, _t) {
            for (var Pt = [], Dt = 0, $t = 0; $t < $e.length; $t++) for (var Gt = $e[$t], Wt = 1; Wt < $; Wt++) for (var mt = 1; mt < K; mt++) Pt.push(Ie(Be, Wt, Gt, mt, Ze, ct, ft[$t], _t && _t[Dt] && _t[Dt])), Dt++;
            return Pt;
          }
          function tt(Be, $e, Ze, ct, ft, _t) {
            for (var Pt = [], Dt = 0, $t = 0; $t < $e.length; $t++) for (var Gt = $e[$t], Wt = 1; Wt < q; Wt++) for (var mt = 1; mt < $; mt++) Pt.push(Ie(Be, mt, Wt, Gt, Ze, ct, ft[$t], _t && _t[Dt] && _t[Dt])), Dt++;
            return Pt;
          }
          function _e(Be, $e) {
            for (var Ze = [], ct = Be; ct < $e; ct++) Ze.push(ct);
            return Ze;
          }
          return function() {
            he(), function() {
              for (var $t = 0; $t < $; $t++) for (var Gt = 0; Gt < q; Gt++) for (var Wt = 0; Wt < K; Wt++) {
                var mt = Y($t, Gt, Wt);
                de(x._x[mt], x._y[mt], x._z[mt], x._value[mt]);
              }
            }();
            var Be = null;
            if (P && M && (ae(M), T = !0, Re(Be, X, Q), T = !1), E && I) {
              ae(I);
              for (var $e = x.surface.pattern, Ze = x.surface.count, ct = 0; ct < Ze; ct++) {
                var ft = Ze === 1 ? 0.5 : ct / (Ze - 1), _t = (1 - ft) * X + ft * Q, Pt = Math.abs(_t - te) > Math.abs(_t - ee) ? [te, _t] : [_t, ee];
                O = !0, Re($e, Pt[0], Pt[1]), O = !1;
              }
            }
            var Dt = [[Math.min(X, ee), Math.max(X, ee)], [Math.min(te, Q), Math.max(te, Q)]];
            ["x", "y", "z"].forEach(function($t) {
              for (var Gt = [], Wt = 0; Wt < Dt.length; Wt++) {
                var mt = 0, at = Dt[Wt][0], vt = Dt[Wt][1], St = x.slices[$t];
                if (St.show && St.fill) {
                  ae(St.fill);
                  var Je = [], nt = [], ot = [];
                  if (St.locations.length) for (var Ye = 0; Ye < St.locations.length; Ye++) {
                    var Fe = d(St.locations[Ye], $t === "x" ? F : $t === "y" ? U : V);
                    Fe.distRatio === 0 ? Je.push(Fe.id) : Fe.id > 0 && (nt.push(Fe.id), $t === "x" ? ot.push([Fe.distRatio, 0, 0]) : $t === "y" ? ot.push([0, Fe.distRatio, 0]) : ot.push([0, 0, Fe.distRatio]));
                  }
                  else Je = _e(1, $t === "x" ? $ - 1 : $t === "y" ? q - 1 : K - 1);
                  nt.length > 0 && (Gt[mt] = $t === "x" ? je(Be, nt, at, vt, ot, Gt[mt]) : $t === "y" ? Ke(Be, nt, at, vt, ot, Gt[mt]) : tt(Be, nt, at, vt, ot, Gt[mt]), mt++), Je.length > 0 && (Gt[mt] = $t === "x" ? Ce(Be, Je, at, vt, Gt[mt]) : $t === "y" ? we(Be, Je, at, vt, Gt[mt]) : Ge(Be, Je, at, vt, Gt[mt]), mt++);
                }
                var pt = x.caps[$t];
                pt.show && pt.fill && (ae(pt.fill), Gt[mt] = $t === "x" ? Ce(Be, [0, $ - 1], at, vt, Gt[mt]) : $t === "y" ? we(Be, [0, q - 1], at, vt, Gt[mt]) : Ge(Be, [0, K - 1], at, vt, Gt[mt]), mt++);
              }
            }), z === 0 && he(), x._meshX = S, x._meshY = A, x._meshZ = C, x._meshIntensity = D, x._Xs = F, x._Ys = U, x._Zs = V;
          }(), x;
        }
        o.exports = { findNearestOnAxis: d, generateIsoMeshes: m, createIsosurfaceTrace: function(x, w) {
          var k = x.glplot.gl, S = l({ gl: k }), A = new f(x, S, w.uid);
          return S._trace = A, A.update(w), x.glplot.add(S), A;
        } };
      }, 44731: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(70252), h = n(39356);
        function p(_, d, f, c, g) {
          var m = g("isomin"), x = g("isomax");
          x != null && m != null && m > x && (d.isomin = null, d.isomax = null);
          var w = g("x"), k = g("y"), S = g("z"), A = g("value");
          w && w.length && k && k.length && S && S.length && A && A.length ? (u.getComponentMethod("calendars", "handleTraceDefaults")(_, d, ["x", "y", "z"], c), g("valuehoverformat"), ["x", "y", "z"].forEach(function(C) {
            g(C + "hoverformat");
            var D = "caps." + C;
            g(D + ".show") && g(D + ".fill");
            var L = "slices." + C;
            g(L + ".show") && (g(L + ".fill"), g(L + ".locations"));
          }), g("spaceframe.show") && g("spaceframe.fill"), g("surface.show") && (g("surface.count"), g("surface.fill"), g("surface.pattern")), g("contour.show") && (g("contour.color"), g("contour.width")), ["text", "hovertext", "hovertemplate", "lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lighting.vertexnormalsepsilon", "lighting.facenormalsepsilon", "lightposition.x", "lightposition.y", "lightposition.z", "flatshading", "opacity"].forEach(function(C) {
            g(C);
          }), h(_, d, c, g, { prefix: "", cLetter: "c" }), d._length = null) : d.visible = !1;
        }
        o.exports = { supplyDefaults: function(_, d, f, c) {
          p(_, d, 0, c, function(g, m) {
            return l.coerce(_, d, i, g, m);
          });
        }, supplyIsoDefaults: p };
      }, 75297: function(o, s, n) {
        o.exports = { attributes: n(70252), supplyDefaults: n(44731).supplyDefaults, calc: n(58988), colorbar: { min: "cmin", max: "cmax" }, plot: n(91370).createIsosurfaceTrace, moduleType: "trace", name: "isosurface", basePlotModule: n(2487), categories: ["gl3d", "showLegend"], meta: {} };
      }, 42450: function(o, s, n) {
        var l = n(87163), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(16131), p = n(9829), _ = n(93049).extendFlat;
        o.exports = _({ x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, i: { valType: "data_array", editType: "calc" }, j: { valType: "data_array", editType: "calc" }, k: { valType: "data_array", editType: "calc" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertemplate: i({ editType: "calc" }), xhoverformat: u("x"), yhoverformat: u("y"), zhoverformat: u("z"), delaunayaxis: { valType: "enumerated", values: ["x", "y", "z"], dflt: "z", editType: "calc" }, alphahull: { valType: "number", dflt: -1, editType: "calc" }, intensity: { valType: "data_array", editType: "calc" }, intensitymode: { valType: "enumerated", values: ["vertex", "cell"], dflt: "vertex", editType: "calc" }, color: { valType: "color", editType: "calc" }, vertexcolor: { valType: "data_array", editType: "calc" }, facecolor: { valType: "data_array", editType: "calc" }, transforms: void 0 }, l("", { colorAttr: "`intensity`", showScaleDflt: !0, editTypeOverride: "calc" }), { opacity: h.opacity, flatshading: { valType: "boolean", dflt: !1, editType: "calc" }, contour: { show: _({}, h.contours.x.show, {}), color: h.contours.x.color, width: h.contours.x.width, editType: "calc" }, lightposition: { x: _({}, h.lightposition.x, { dflt: 1e5 }), y: _({}, h.lightposition.y, { dflt: 1e5 }), z: _({}, h.lightposition.z, { dflt: 0 }), editType: "calc" }, lighting: _({ vertexnormalsepsilon: { valType: "number", min: 0, max: 1, dflt: 1e-12, editType: "calc" }, facenormalsepsilon: { valType: "number", min: 0, max: 1, dflt: 1e-6, editType: "calc" }, editType: "calc" }, h.lighting), hoverinfo: _({}, p.hoverinfo, { editType: "calc" }), showlegend: _({}, p.showlegend, { dflt: !1 }) });
      }, 44878: function(o, s, n) {
        var l = n(28379);
        o.exports = function(u, i) {
          i.intensity && l(u, i, { vals: i.intensity, containerStr: "", cLetter: "c" });
        };
      }, 82836: function(o, s, n) {
        var l = n(99098).gl_mesh3d, u = n(99098).delaunay_triangulate, i = n(99098).alpha_shape, h = n(99098).convex_hull, p = n(46998).parseColorScale, _ = n(34809).isArrayOrTypedArray, d = n(55010), f = n(88856).extractOpts, c = n(88239);
        function g(A, C, D) {
          this.scene = A, this.uid = D, this.mesh = C, this.name = "", this.color = "#fff", this.data = null, this.showContour = !1;
        }
        var m = g.prototype;
        function x(A) {
          for (var C = [], D = A.length, L = 0; L < D; L++) C[L] = d(A[L]);
          return C;
        }
        function w(A, C, D, L) {
          for (var E = [], P = C.length, I = 0; I < P; I++) E[I] = A.d2l(C[I], 0, L) * D;
          return E;
        }
        function k(A) {
          for (var C = [], D = A.length, L = 0; L < D; L++) C[L] = Math.round(A[L]);
          return C;
        }
        function S(A, C) {
          for (var D = A.length, L = 0; L < D; L++) if (A[L] <= -0.5 || A[L] >= C - 0.5) return !1;
          return !0;
        }
        m.handlePick = function(A) {
          if (A.object === this.mesh) {
            var C = A.index = A.data.index;
            A.data._cellCenter ? A.traceCoordinate = A.data.dataCoordinate : A.traceCoordinate = [this.data.x[C], this.data.y[C], this.data.z[C]];
            var D = this.data.hovertext || this.data.text;
            return _(D) && D[C] !== void 0 ? A.textLabel = D[C] : D && (A.textLabel = D), !0;
          }
        }, m.update = function(A) {
          var C = this.scene, D = C.fullSceneLayout;
          this.data = A;
          var L, E = A.x.length, P = c(w(D.xaxis, A.x, C.dataScale[0], A.xcalendar), w(D.yaxis, A.y, C.dataScale[1], A.ycalendar), w(D.zaxis, A.z, C.dataScale[2], A.zcalendar));
          if (A.i && A.j && A.k) {
            if (A.i.length !== A.j.length || A.j.length !== A.k.length || !S(A.i, E) || !S(A.j, E) || !S(A.k, E)) return;
            L = c(k(A.i), k(A.j), k(A.k));
          } else L = A.alphahull === 0 ? h(P) : A.alphahull > 0 ? i(A.alphahull, P) : function(T, z) {
            for (var F = ["x", "y", "z"].indexOf(T), U = [], V = z.length, $ = 0; $ < V; $++) U[$] = [z[$][(F + 1) % 3], z[$][(F + 2) % 3]];
            return u(U);
          }(A.delaunayaxis, P);
          var I = { positions: P, cells: L, lightPosition: [A.lightposition.x, A.lightposition.y, A.lightposition.z], ambient: A.lighting.ambient, diffuse: A.lighting.diffuse, specular: A.lighting.specular, roughness: A.lighting.roughness, fresnel: A.lighting.fresnel, vertexNormalsEpsilon: A.lighting.vertexnormalsepsilon, faceNormalsEpsilon: A.lighting.facenormalsepsilon, opacity: A.opacity, contourEnable: A.contour.show, contourColor: d(A.contour.color).slice(0, 3), contourWidth: A.contour.width, useFacetNormals: A.flatshading };
          if (A.intensity) {
            var M = f(A);
            this.color = "#fff";
            var O = A.intensitymode;
            I[O + "Intensity"] = A.intensity, I[O + "IntensityBounds"] = [M.min, M.max], I.colormap = p(A);
          } else A.vertexcolor ? (this.color = A.vertexcolor[0], I.vertexColors = x(A.vertexcolor)) : A.facecolor ? (this.color = A.facecolor[0], I.cellColors = x(A.facecolor)) : (this.color = A.color, I.meshColor = d(A.color));
          this.mesh.update(I);
        }, m.dispose = function() {
          this.scene.glplot.remove(this.mesh), this.mesh.dispose();
        }, o.exports = function(A, C) {
          var D = A.glplot.gl, L = l({ gl: D }), E = new g(A, L, C.uid);
          return L._trace = E, E.update(C), A.glplot.add(L), E;
        };
      }, 13573: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(39356), h = n(42450);
        o.exports = function(p, _, d, f) {
          function c(m, x) {
            return u.coerce(p, _, h, m, x);
          }
          function g(m) {
            var x = m.map(function(w) {
              var k = c(w);
              return k && u.isArrayOrTypedArray(k) ? k : null;
            });
            return x.every(function(w) {
              return w && w.length === x[0].length;
            }) && x;
          }
          g(["x", "y", "z"]) ? (g(["i", "j", "k"]), (!_.i || _.j && _.k) && (!_.j || _.k && _.i) && (!_.k || _.i && _.j) ? (l.getComponentMethod("calendars", "handleTraceDefaults")(p, _, ["x", "y", "z"], f), ["lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lighting.vertexnormalsepsilon", "lighting.facenormalsepsilon", "lightposition.x", "lightposition.y", "lightposition.z", "flatshading", "alphahull", "delaunayaxis", "opacity"].forEach(function(m) {
            c(m);
          }), c("contour.show") && (c("contour.color"), c("contour.width")), "intensity" in p ? (c("intensity"), c("intensitymode"), i(p, _, f, c, { prefix: "", cLetter: "c" })) : (_.showscale = !1, "facecolor" in p ? c("facecolor") : "vertexcolor" in p ? c("vertexcolor") : c("color", d)), c("text"), c("hovertext"), c("hovertemplate"), c("xhoverformat"), c("yhoverformat"), c("zhoverformat"), _._length = null) : _.visible = !1) : _.visible = !1;
        };
      }, 58859: function(o, s, n) {
        o.exports = { attributes: n(42450), supplyDefaults: n(13573), calc: n(44878), colorbar: { min: "cmin", max: "cmax" }, plot: n(82836), moduleType: "trace", name: "mesh3d", basePlotModule: n(2487), categories: ["gl3d", "showLegend"], meta: {} };
      }, 86706: function(o, s, n) {
        var l = n(34809).extendFlat, u = n(36640), i = n(80712).axisHoverFormat, h = n(94850).T, p = n(70192), _ = n(20909), d = _.INCREASING.COLOR, f = _.DECREASING.COLOR, c = u.line;
        function g(m) {
          return { line: { color: l({}, c.color, { dflt: m }), width: c.width, dash: h, editType: "style" }, editType: "style" };
        }
        o.exports = { xperiod: u.xperiod, xperiod0: u.xperiod0, xperiodalignment: u.xperiodalignment, xhoverformat: i("x"), yhoverformat: i("y"), x: { valType: "data_array", editType: "calc+clearAxisTypes" }, open: { valType: "data_array", editType: "calc" }, high: { valType: "data_array", editType: "calc" }, low: { valType: "data_array", editType: "calc" }, close: { valType: "data_array", editType: "calc" }, line: { width: l({}, c.width, {}), dash: l({}, h, {}), editType: "style" }, increasing: g(d), decreasing: g(f), text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, tickwidth: { valType: "number", min: 0, max: 0.5, dflt: 0.3, editType: "calc" }, hoverlabel: l({}, p.hoverlabel, { split: { valType: "boolean", dflt: !1, editType: "style" } }), zorder: u.zorder };
      }, 95694: function(o, s, n) {
        var l = n(34809), u = l._, i = n(29714), h = n(40528), p = n(63821).BADNUM;
        function _(f, c, g, m) {
          return { o: f, h: c, l: g, c: m };
        }
        function d(f, c, g, m, x, w) {
          for (var k = x.makeCalcdata(c, "open"), S = x.makeCalcdata(c, "high"), A = x.makeCalcdata(c, "low"), C = x.makeCalcdata(c, "close"), D = l.isArrayOrTypedArray(c.text), L = l.isArrayOrTypedArray(c.hovertext), E = !0, P = null, I = !!c.xperiodalignment, M = [], O = 0; O < m.length; O++) {
            var T = m[O], z = k[O], F = S[O], U = A[O], V = C[O];
            if (T !== p && z !== p && F !== p && U !== p && V !== p) {
              V === z ? P !== null && V !== P && (E = V > P) : E = V > z, P = V;
              var $ = w(z, F, U, V);
              $.pos = T, $.yc = (z + V) / 2, $.i = O, $.dir = E ? "increasing" : "decreasing", $.x = $.pos, $.y = [U, F], I && ($.orig_p = g[O]), D && ($.tx = c.text[O]), L && ($.htx = c.hovertext[O]), M.push($);
            } else M.push({ pos: T, empty: !0 });
          }
          return c._extremes[x._id] = i.findExtremes(x, l.concat(A, S), { padded: !0 }), M.length && (M[0].t = { labels: { open: u(f, "open:") + " ", high: u(f, "high:") + " ", low: u(f, "low:") + " ", close: u(f, "close:") + " " } }), M;
        }
        o.exports = { calc: function(f, c) {
          var g = i.getFromId(f, c.xaxis), m = i.getFromId(f, c.yaxis), x = function(C, D, L) {
            var E = L._minDiff;
            if (!E) {
              var P, I = C._fullData, M = [];
              for (E = 1 / 0, P = 0; P < I.length; P++) {
                var O = I[P];
                if (O.type === "ohlc" && O.visible === !0 && O.xaxis === D._id) {
                  M.push(O);
                  var T = D.makeCalcdata(O, "x");
                  O._origX = T;
                  var z = h(L, D, "x", T).vals;
                  O._xcalc = z;
                  var F = l.distinctVals(z).minDiff;
                  F && isFinite(F) && (E = Math.min(E, F));
                }
              }
              for (E === 1 / 0 && (E = 1), P = 0; P < M.length; P++) M[P]._minDiff = E;
            }
            return E * L.tickwidth;
          }(f, g, c), w = c._minDiff;
          c._minDiff = null;
          var k = c._origX;
          c._origX = null;
          var S = c._xcalc;
          c._xcalc = null;
          var A = d(f, c, k, S, m, _);
          return c._extremes[g._id] = i.findExtremes(g, S, { vpad: w / 2 }), A.length ? (l.extendFlat(A[0].t, { wHover: w / 2, tickLen: x }), A) : [{ t: { empty: !0 } }];
        }, calcCommon: d };
      }, 22629: function(o, s, n) {
        var l = n(34809), u = n(28270), i = n(99669), h = n(86706);
        function p(_, d, f, c) {
          f(c + ".line.color"), f(c + ".line.width", d.line.width), f(c + ".line.dash", d.line.dash);
        }
        o.exports = function(_, d, f, c) {
          function g(m, x) {
            return l.coerce(_, d, h, m, x);
          }
          u(_, d, g, c) ? (i(_, d, c, g, { x: !0 }), g("xhoverformat"), g("yhoverformat"), g("line.width"), g("line.dash"), p(0, d, g, "increasing"), p(0, d, g, "decreasing"), g("text"), g("hovertext"), g("tickwidth"), c._requestRangeslider[d.xaxis] = !0, g("zorder")) : d.visible = !1;
        };
      }, 93245: function(o, s, n) {
        var l = n(29714), u = n(34809), i = n(32141), h = n(78766), p = n(34809).fillText, _ = n(20909), d = { increasing: _.INCREASING.SYMBOL, decreasing: _.DECREASING.SYMBOL };
        function f(m, x, w, k) {
          var S, A, C = m.cd, D = m.xa, L = C[0].trace, E = C[0].t, P = L.type, I = P === "ohlc" ? "l" : "min", M = P === "ohlc" ? "h" : "max", O = E.bPos || 0, T = function(ee) {
            return ee.pos + O - x;
          }, z = E.bdPos || E.tickLen, F = E.wHover, U = Math.min(1, z / Math.abs(D.r2c(D.range[1]) - D.r2c(D.range[0])));
          function V(ee) {
            var X = T(ee);
            return i.inbox(X - F, X + F, S);
          }
          function $(ee) {
            var X = ee[I], Q = ee[M];
            return X === Q || i.inbox(X - w, Q - w, S);
          }
          function q(ee) {
            return (V(ee) + $(ee)) / 2;
          }
          S = m.maxHoverDistance - U, A = m.maxSpikeDistance - U;
          var K = i.getDistanceFunction(k, V, $, q);
          if (i.getClosest(C, K, m), m.index === !1) return null;
          var re = C[m.index];
          if (re.empty) return null;
          var Y = L[re.dir], te = Y.line.color;
          return h.opacity(te) && Y.line.width ? m.color = te : m.color = Y.fillcolor, m.x0 = D.c2p(re.pos + O - z, !0), m.x1 = D.c2p(re.pos + O + z, !0), m.xLabelVal = re.orig_p !== void 0 ? re.orig_p : re.pos, m.spikeDistance = q(re) * A / S, m.xSpike = D.c2p(re.pos, !0), m;
        }
        function c(m, x, w, k) {
          var S = m.cd, A = m.ya, C = S[0].trace, D = S[0].t, L = [], E = f(m, x, w, k);
          if (!E) return [];
          var P = S[E.index].hi || C.hoverinfo, I = P.split("+");
          if (P !== "all" && I.indexOf("y") === -1) return [];
          for (var M = ["high", "open", "close", "low"], O = {}, T = 0; T < M.length; T++) {
            var z, F = M[T], U = C[F][E.index], V = A.c2p(U, !0);
            U in O ? (z = O[U]).yLabel += "<br>" + D.labels[F] + l.hoverLabelText(A, U, C.yhoverformat) : ((z = u.extendFlat({}, E)).y0 = z.y1 = V, z.yLabelVal = U, z.yLabel = D.labels[F] + l.hoverLabelText(A, U, C.yhoverformat), z.name = "", L.push(z), O[U] = z);
          }
          return L;
        }
        function g(m, x, w, k) {
          var S = m.cd, A = m.ya, C = S[0].trace, D = S[0].t, L = f(m, x, w, k);
          if (!L) return [];
          var E = S[L.index], P = L.index = E.i, I = E.dir;
          function M($) {
            return D.labels[$] + l.hoverLabelText(A, C[$][P], C.yhoverformat);
          }
          var O = E.hi || C.hoverinfo, T = O.split("+"), z = O === "all", F = z || T.indexOf("y") !== -1, U = z || T.indexOf("text") !== -1, V = F ? [M("open"), M("high"), M("low"), M("close") + "  " + d[I]] : [];
          return U && p(E, C, V), L.extraText = V.join("<br>"), L.y0 = L.y1 = A.c2p(E.yc, !0), [L];
        }
        o.exports = { hoverPoints: function(m, x, w, k) {
          return m.cd[0].trace.hoverlabel.split ? c(m, x, w, k) : g(m, x, w, k);
        }, hoverSplit: c, hoverOnPoints: g };
      }, 12683: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "ohlc", basePlotModule: n(37703), categories: ["cartesian", "svg", "showLegend"], meta: {}, attributes: n(86706), supplyDefaults: n(22629), calc: n(95694).calc, plot: n(38956), style: n(57406), hoverPoints: n(93245).hoverPoints, selectPoints: n(49343) };
      }, 28270: function(o, s, n) {
        var l = n(33626), u = n(34809);
        o.exports = function(i, h, p, _) {
          var d = p("x"), f = p("open"), c = p("high"), g = p("low"), m = p("close");
          if (p("hoverlabel.split"), l.getComponentMethod("calendars", "handleTraceDefaults")(i, h, ["x"], _), f && c && g && m) {
            var x = Math.min(f.length, c.length, g.length, m.length);
            return d && (x = Math.min(x, u.minRowLength(d))), h._length = x, x;
          }
        };
      }, 38956: function(o, s, n) {
        var l = n(45568), u = n(34809);
        o.exports = function(i, h, p, _) {
          var d = h.yaxis, f = h.xaxis, c = !!f.rangebreaks;
          u.makeTraceGroups(_, p, "trace ohlc").each(function(g) {
            var m = l.select(this), x = g[0], w = x.t;
            if (x.trace.visible !== !0 || w.empty) m.remove();
            else {
              var k = w.tickLen, S = m.selectAll("path").data(u.identity);
              S.enter().append("path"), S.exit().remove(), S.attr("d", function(A) {
                if (A.empty) return "M0,0Z";
                var C = f.c2p(A.pos - k, !0), D = f.c2p(A.pos + k, !0), L = c ? (C + D) / 2 : f.c2p(A.pos, !0);
                return "M" + C + "," + d.c2p(A.o, !0) + "H" + L + "M" + L + "," + d.c2p(A.h, !0) + "V" + d.c2p(A.l, !0) + "M" + D + "," + d.c2p(A.c, !0) + "H" + L;
              });
            }
          });
        };
      }, 49343: function(o) {
        o.exports = function(s, n) {
          var l, u = s.cd, i = s.xaxis, h = s.yaxis, p = [], _ = u[0].t.bPos || 0;
          if (n === !1) for (l = 0; l < u.length; l++) u[l].selected = 0;
          else for (l = 0; l < u.length; l++) {
            var d = u[l];
            n.contains([i.c2p(d.pos + _), h.c2p(d.yc)], null, d.i, s) ? (p.push({ pointNumber: d.i, x: i.c2d(d.pos), y: h.c2d(d.yc) }), d.selected = 1) : d.selected = 0;
          }
          return p;
        };
      }, 57406: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(78766);
        o.exports = function(h, p, _) {
          var d = _ || l.select(h).selectAll("g.ohlclayer").selectAll("g.trace");
          d.style("opacity", function(f) {
            return f[0].trace.opacity;
          }), d.each(function(f) {
            var c = f[0].trace;
            l.select(this).selectAll("path").each(function(g) {
              if (!g.empty) {
                var m = c[g.dir].line;
                l.select(this).style("fill", "none").call(i.stroke, m.color).call(u.dashLine, m.dash, m.width).style("opacity", c.selectedpoints && !g.selected ? 0.3 : 1);
              }
            });
          });
        };
      }, 11660: function(o, s, n) {
        var l = n(93049).extendFlat, u = n(9829), i = n(80337), h = n(87163), p = n(3208).rb, _ = n(13792).u, d = l({ editType: "calc" }, h("line", { editTypeOverride: "calc" }), { shape: { valType: "enumerated", values: ["linear", "hspline"], dflt: "linear", editType: "plot" }, hovertemplate: p({ editType: "plot", arrayOk: !1 }, { keys: ["count", "probability"] }) });
        o.exports = { domain: _({ name: "parcats", trace: !0, editType: "calc" }), hoverinfo: l({}, u.hoverinfo, { flags: ["count", "probability"], editType: "plot", arrayOk: !1 }), hoveron: { valType: "enumerated", values: ["category", "color", "dimension"], dflt: "category", editType: "plot" }, hovertemplate: p({ editType: "plot", arrayOk: !1 }, { keys: ["count", "probability", "category", "categorycount", "colorcount", "bandcolorcount"] }), arrangement: { valType: "enumerated", values: ["perpendicular", "freeform", "fixed"], dflt: "perpendicular", editType: "plot" }, bundlecolors: { valType: "boolean", dflt: !0, editType: "plot" }, sortpaths: { valType: "enumerated", values: ["forward", "backward"], dflt: "forward", editType: "plot" }, labelfont: i({ editType: "calc" }), tickfont: i({ autoShadowDflt: !0, editType: "calc" }), dimensions: { _isLinkedToArray: "dimension", label: { valType: "string", editType: "calc" }, categoryorder: { valType: "enumerated", values: ["trace", "category ascending", "category descending", "array"], dflt: "trace", editType: "calc" }, categoryarray: { valType: "data_array", editType: "calc" }, ticktext: { valType: "data_array", editType: "calc" }, values: { valType: "data_array", dflt: [], editType: "calc" }, displayindex: { valType: "integer", editType: "calc" }, editType: "calc", visible: { valType: "boolean", dflt: !0, editType: "calc" } }, line: d, counts: { valType: "number", min: 0, dflt: 1, arrayOk: !0, editType: "calc" }, customdata: void 0, hoverlabel: void 0, ids: void 0, legend: void 0, legendgroup: void 0, legendrank: void 0, opacity: void 0, selectedpoints: void 0, showlegend: void 0 };
      }, 83260: function(o, s, n) {
        var l = n(4173).eV, u = n(37822), i = "parcats";
        s.name = i, s.plot = function(h, p, _, d) {
          var f = l(h.calcdata, i);
          if (f.length) {
            var c = f[0];
            u(h, c, _, d);
          }
        }, s.clean = function(h, p, _, d) {
          var f = d._has && d._has("parcats"), c = p._has && p._has("parcats");
          f && !c && d._paperdiv.selectAll(".parcats").remove();
        };
      }, 95564: function(o, s, n) {
        var l = n(71293).wrap, u = n(65477).hasColorscale, i = n(28379), h = n(48965), p = n(62203), _ = n(34809), d = n(10721);
        function f(m, x, w) {
          m.valueInds.push(x), m.count += w;
        }
        function c(m, x, w) {
          return { categoryInds: m, color: x, rawColor: w, valueInds: [], count: 0 };
        }
        function g(m, x, w) {
          m.valueInds.push(x), m.count += w;
        }
        o.exports = function(m, x) {
          var w = _.filterVisible(x.dimensions);
          if (w.length === 0) return [];
          var k, S, A, C = w.map(function(Q) {
            var ue;
            if (Q.categoryorder === "trace") ue = null;
            else if (Q.categoryorder === "array") ue = Q.categoryarray;
            else {
              ue = h(Q.values);
              for (var ce = !0, he = 0; he < ue.length; he++) if (!d(ue[he])) {
                ce = !1;
                break;
              }
              ue.sort(ce ? _.sorterAsc : void 0), Q.categoryorder === "category descending" && (ue = ue.reverse());
            }
            return function(de, ne) {
              ne = ne == null ? [] : ne.map(function(Se) {
                return Se;
              });
              var ae = {}, se = {}, me = [];
              ne.forEach(function(Se, Me) {
                ae[Se] = 0, se[Se] = Me;
              });
              for (var ye = 0; ye < de.length; ye++) {
                var pe, be = de[ye];
                ae[be] === void 0 ? (ae[be] = 1, pe = ne.push(be) - 1, se[be] = pe) : (ae[be]++, pe = se[be]), me.push(pe);
              }
              var Ae = ne.map(function(Se) {
                return ae[Se];
              });
              return { uniqueValues: ne, uniqueCounts: Ae, inds: me };
            }(Q.values, ue);
          });
          k = _.isArrayOrTypedArray(x.counts) ? x.counts : [x.counts], function(Q) {
            var ue, ce = Q.map(function(he) {
              return he.displayindex;
            });
            if (function(he) {
              for (var de = new Array(he.length), ne = 0; ne < he.length; ne++) {
                if (he[ne] < 0 || he[ne] >= he.length || de[he[ne]] !== void 0) return !1;
                de[he[ne]] = !0;
              }
              return !0;
            }(ce)) for (ue = 0; ue < Q.length; ue++) Q[ue]._displayindex = Q[ue].displayindex;
            else for (ue = 0; ue < Q.length; ue++) Q[ue]._displayindex = ue;
          }(w), w.forEach(function(Q, ue) {
            (function(ce, he) {
              ce._categoryarray = he.uniqueValues, ce.ticktext === null || ce.ticktext === void 0 ? ce._ticktext = [] : ce._ticktext = ce.ticktext.slice();
              for (var de = ce._ticktext.length; de < he.uniqueValues.length; de++) ce._ticktext.push(he.uniqueValues[de]);
            })(Q, C[ue]);
          });
          var D, L = x.line;
          L ? (u(x, "line") && i(m, x, { vals: x.line.color, containerStr: "line", cLetter: "c" }), D = p.tryColorscale(L)) : D = _.identity;
          var E, P, I, M, O, T = w[0].values.length, z = {}, F = C.map(function(Q) {
            return Q.inds;
          });
          for (A = 0, E = 0; E < T; E++) {
            var U = [];
            for (P = 0; P < F.length; P++) U.push(F[P][E]);
            S = k[E % k.length], A += S;
            var V = (I = E, M = void 0, O = void 0, _.isArrayOrTypedArray(L.color) ? O = M = L.color[I % L.color.length] : M = L.color, { color: D(M), rawColor: O }), $ = U + "-" + V.rawColor;
            z[$] === void 0 && (z[$] = c(U, V.color, V.rawColor)), g(z[$], E, S);
          }
          var q, K = w.map(function(Q, ue) {
            return /* @__PURE__ */ function(ce, he, de, ne, ae) {
              return { dimensionInd: ce, containerInd: he, displayInd: de, dimensionLabel: ne, count: ae, categories: [], dragX: null };
            }(ue, Q._index, Q._displayindex, Q.label, A);
          });
          for (E = 0; E < T; E++) for (S = k[E % k.length], P = 0; P < K.length; P++) {
            var re = K[P].containerInd, Y = C[P].inds[E], te = K[P].categories;
            if (te[Y] === void 0) {
              var ee = x.dimensions[re]._categoryarray[Y], X = x.dimensions[re]._ticktext[Y];
              te[Y] = { dimensionInd: P, categoryInd: q = Y, categoryValue: ee, displayInd: q, categoryLabel: X, valueInds: [], count: 0, dragY: null };
            }
            f(te[Y], E, S);
          }
          return l(function(Q, ue, ce) {
            var he = Q.map(function(de) {
              return de.categories.length;
            }).reduce(function(de, ne) {
              return Math.max(de, ne);
            });
            return { dimensions: Q, paths: ue, trace: void 0, maxCats: he, count: ce };
          }(K, z, A));
        };
      }, 62651: function(o, s, n) {
        var l = n(34809), u = n(65477).hasColorscale, i = n(39356), h = n(13792).N, p = n(59008), _ = n(11660), d = n(63197), f = n(87800).isTypedArraySpec;
        function c(g, m) {
          function x(L, E) {
            return l.coerce(g, m, _.dimensions, L, E);
          }
          var w = x("values"), k = x("visible");
          if (w && w.length || (k = m.visible = !1), k) {
            x("label"), x("displayindex", m._index);
            var S, A = g.categoryarray, C = l.isArrayOrTypedArray(A) && A.length > 0 || f(A);
            C && (S = "array");
            var D = x("categoryorder", S);
            D === "array" ? (x("categoryarray"), x("ticktext")) : (delete g.categoryarray, delete g.ticktext), C || D !== "array" || (m.categoryorder = "trace");
          }
        }
        o.exports = function(g, m, x, w) {
          function k(D, L) {
            return l.coerce(g, m, _, D, L);
          }
          var S = p(g, m, { name: "dimensions", handleItemDefaults: c }), A = function(D, L, E, P, I) {
            I("line.shape"), I("line.hovertemplate");
            var M = I("line.color", P.colorway[0]);
            if (u(D, "line") && l.isArrayOrTypedArray(M)) {
              if (M.length) return I("line.colorscale"), i(D, L, P, I, { prefix: "line.", cLetter: "c" }), M.length;
              L.line.color = E;
            }
            return 1 / 0;
          }(g, m, x, w, k);
          h(m, w, k), Array.isArray(S) && S.length || (m.visible = !1), d(m, S, "values", A), k("hoveron"), k("hovertemplate"), k("arrangement"), k("bundlecolors"), k("sortpaths"), k("counts");
          var C = w.font;
          l.coerceFont(k, "labelfont", C, { overrideDflt: { size: Math.round(C.size) } }), l.coerceFont(k, "tickfont", C, { autoShadowDflt: !0, overrideDflt: { size: Math.round(C.size / 1.2) } });
        };
      }, 6305: function(o, s, n) {
        o.exports = { attributes: n(11660), supplyDefaults: n(62651), calc: n(95564), plot: n(37822), colorbar: { container: "line", min: "cmin", max: "cmax" }, moduleType: "trace", name: "parcats", basePlotModule: n(83260), categories: ["noOpacity"], meta: {} };
      }, 27219: function(o, s, n) {
        var l = n(45568), u = n(88640).Dj, i = n(31420), h = n(32141), p = n(34809), _ = p.strTranslate, d = n(62203), f = n(65657), c = n(30635);
        function g(ce, he, de, ne) {
          var ae = he._context.staticPlot, se = ce.map(te.bind(0, he, de)), me = ne.selectAll("g.parcatslayer").data([null]);
          me.enter().append("g").attr("class", "parcatslayer").style("pointer-events", ae ? "none" : "all");
          var ye = me.selectAll("g.trace.parcats").data(se, m), pe = ye.enter().append("g").attr("class", "trace parcats");
          ye.attr("transform", function(Ee) {
            return _(Ee.x, Ee.y);
          }), pe.append("g").attr("class", "paths");
          var be = ye.select("g.paths").selectAll("path.path").data(function(Ee) {
            return Ee.paths;
          }, m);
          be.attr("fill", function(Ee) {
            return Ee.model.color;
          });
          var Ae = be.enter().append("path").attr("class", "path").attr("stroke-opacity", 0).attr("fill", function(Ee) {
            return Ee.model.color;
          }).attr("fill-opacity", 0);
          L(Ae), be.attr("d", function(Ee) {
            return Ee.svgD;
          }), Ae.empty() || be.sort(w), be.exit().remove(), be.on("mouseover", k).on("mouseout", S).on("click", D), pe.append("g").attr("class", "dimensions");
          var Se = ye.select("g.dimensions").selectAll("g.dimension").data(function(Ee) {
            return Ee.dimensions;
          }, m);
          Se.enter().append("g").attr("class", "dimension"), Se.attr("transform", function(Ee) {
            return _(Ee.x, 0);
          }), Se.exit().remove();
          var Me = Se.selectAll("g.category").data(function(Ee) {
            return Ee.categories;
          }, m), De = Me.enter().append("g").attr("class", "category");
          Me.attr("transform", function(Ee) {
            return _(0, Ee.y);
          }), De.append("rect").attr("class", "catrect").attr("pointer-events", "none"), Me.select("rect.catrect").attr("fill", "none").attr("width", function(Ee) {
            return Ee.width;
          }).attr("height", function(Ee) {
            return Ee.height;
          }), P(De);
          var Le = Me.selectAll("rect.bandrect").data(function(Ee) {
            return Ee.bands;
          }, m);
          Le.each(function() {
            p.raiseToTop(this);
          }), Le.attr("fill", function(Ee) {
            return Ee.color;
          });
          var We = Le.enter().append("rect").attr("class", "bandrect").attr("stroke-opacity", 0).attr("fill", function(Ee) {
            return Ee.color;
          }).attr("fill-opacity", 0);
          Le.attr("fill", function(Ee) {
            return Ee.color;
          }).attr("width", function(Ee) {
            return Ee.width;
          }).attr("height", function(Ee) {
            return Ee.height;
          }).attr("y", function(Ee) {
            return Ee.y;
          }).attr("cursor", function(Ee) {
            return Ee.parcatsViewModel.arrangement === "fixed" ? "default" : Ee.parcatsViewModel.arrangement === "perpendicular" ? "ns-resize" : "move";
          }), I(We), Le.exit().remove(), De.append("text").attr("class", "catlabel").attr("pointer-events", "none"), Me.select("text.catlabel").attr("text-anchor", function(Ee) {
            return x(Ee) ? "start" : "end";
          }).attr("alignment-baseline", "middle").style("fill", "rgb(0, 0, 0)").attr("x", function(Ee) {
            return x(Ee) ? Ee.width + 5 : -5;
          }).attr("y", function(Ee) {
            return Ee.height / 2;
          }).text(function(Ee) {
            return Ee.model.categoryLabel;
          }).each(function(Ee) {
            d.font(l.select(this), Ee.parcatsViewModel.categorylabelfont), c.convertToTspans(l.select(this), he);
          }), De.append("text").attr("class", "dimlabel"), Me.select("text.dimlabel").attr("text-anchor", "middle").attr("alignment-baseline", "baseline").attr("cursor", function(Ee) {
            return Ee.parcatsViewModel.arrangement === "fixed" ? "default" : "ew-resize";
          }).attr("x", function(Ee) {
            return Ee.width / 2;
          }).attr("y", -5).text(function(Ee, Ne) {
            return Ne === 0 ? Ee.parcatsViewModel.model.dimensions[Ee.model.dimensionInd].dimensionLabel : null;
          }).each(function(Ee) {
            d.font(l.select(this), Ee.parcatsViewModel.labelfont);
          }), Me.selectAll("rect.bandrect").on("mouseover", F).on("mouseout", U), Me.exit().remove(), Se.call(l.behavior.drag().origin(function(Ee) {
            return { x: Ee.x, y: 0 };
          }).on("dragstart", V).on("drag", $).on("dragend", q)), ye.each(function(Ee) {
            Ee.traceSelection = l.select(this), Ee.pathSelection = l.select(this).selectAll("g.paths").selectAll("path.path"), Ee.dimensionSelection = l.select(this).selectAll("g.dimensions").selectAll("g.dimension");
          }), ye.exit().remove();
        }
        function m(ce) {
          return ce.key;
        }
        function x(ce) {
          var he = ce.parcatsViewModel.dimensions.length, de = ce.parcatsViewModel.dimensions[he - 1].model.dimensionInd;
          return ce.model.dimensionInd === de;
        }
        function w(ce, he) {
          return ce.model.rawColor > he.model.rawColor ? 1 : ce.model.rawColor < he.model.rawColor ? -1 : 0;
        }
        function k(ce) {
          if (!ce.parcatsViewModel.dragDimension && ce.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
            p.raiseToTop(this), E(l.select(this));
            var he = A(ce), de = C(ce);
            if (ce.parcatsViewModel.graphDiv.emit("plotly_hover", { points: he, event: l.event, constraints: de }), ce.parcatsViewModel.hoverinfoItems.indexOf("none") === -1) {
              var ne, ae, se, me = l.mouse(this)[0], ye = ce.parcatsViewModel.graphDiv, pe = ce.parcatsViewModel.trace, be = ye._fullLayout, Ae = be._paperdiv.node().getBoundingClientRect(), Se = ce.parcatsViewModel.graphDiv.getBoundingClientRect();
              for (se = 0; se < ce.leftXs.length - 1; se++) if (ce.leftXs[se] + ce.dimWidths[se] - 2 <= me && me <= ce.leftXs[se + 1] + 2) {
                var Me = ce.parcatsViewModel.dimensions[se], De = ce.parcatsViewModel.dimensions[se + 1];
                ne = (Me.x + Me.width + De.x) / 2, ae = (ce.topYs[se] + ce.topYs[se + 1] + ce.height) / 2;
                break;
              }
              var Le = ce.parcatsViewModel.x + ne, We = ce.parcatsViewModel.y + ae, Ee = f.mostReadable(ce.model.color, ["black", "white"]), Ne = ce.model.count, Ie = Ne / ce.parcatsViewModel.model.count, ge = { countLabel: Ne, probabilityLabel: Ie.toFixed(3) }, Ce = [];
              ce.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && Ce.push(["Count:", ge.countLabel].join(" ")), ce.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && Ce.push(["P:", ge.probabilityLabel].join(" "));
              var we = Ce.join("<br>"), Ge = l.mouse(ye)[0];
              h.loneHover({ trace: pe, x: Le - Ae.left + Se.left, y: We - Ae.top + Se.top, text: we, color: ce.model.color, borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontSize: 10, fontColor: Ee, idealAlign: Ge < Le ? "right" : "left", hovertemplate: (pe.line || {}).hovertemplate, hovertemplateLabels: ge, eventData: [{ data: pe._input, fullData: pe, count: Ne, probability: Ie }] }, { container: be._hoverlayer.node(), outerContainer: be._paper.node(), gd: ye });
            }
          }
        }
        function S(ce) {
          if (!ce.parcatsViewModel.dragDimension && (L(l.select(this)), h.loneUnhover(ce.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()), ce.parcatsViewModel.pathSelection.sort(w), ce.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1)) {
            var he = A(ce), de = C(ce);
            ce.parcatsViewModel.graphDiv.emit("plotly_unhover", { points: he, event: l.event, constraints: de });
          }
        }
        function A(ce) {
          for (var he = [], de = K(ce.parcatsViewModel), ne = 0; ne < ce.model.valueInds.length; ne++) {
            var ae = ce.model.valueInds[ne];
            he.push({ curveNumber: de, pointNumber: ae });
          }
          return he;
        }
        function C(ce) {
          for (var he = {}, de = ce.parcatsViewModel.model.dimensions, ne = 0; ne < de.length; ne++) {
            var ae = de[ne], se = ae.categories[ce.model.categoryInds[ne]];
            he[ae.containerInd] = se.categoryValue;
          }
          return ce.model.rawColor !== void 0 && (he.color = ce.model.rawColor), he;
        }
        function D(ce) {
          if (ce.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
            var he = A(ce), de = C(ce);
            ce.parcatsViewModel.graphDiv.emit("plotly_click", { points: he, event: l.event, constraints: de });
          }
        }
        function L(ce) {
          ce.attr("fill", function(he) {
            return he.model.color;
          }).attr("fill-opacity", 0.6).attr("stroke", "lightgray").attr("stroke-width", 0.2).attr("stroke-opacity", 1);
        }
        function E(ce) {
          ce.attr("fill-opacity", 0.8).attr("stroke", function(he) {
            return f.mostReadable(he.model.color, ["black", "white"]);
          }).attr("stroke-width", 0.3);
        }
        function P(ce) {
          ce.select("rect.catrect").attr("stroke", "black").attr("stroke-width", 1).attr("stroke-opacity", 1);
        }
        function I(ce) {
          ce.attr("stroke", "black").attr("stroke-width", 0.2).attr("stroke-opacity", 1).attr("fill-opacity", 1);
        }
        function M(ce) {
          var he = ce.parcatsViewModel.pathSelection, de = ce.categoryViewModel.model.dimensionInd, ne = ce.categoryViewModel.model.categoryInd;
          return he.filter(function(ae) {
            return ae.model.categoryInds[de] === ne && ae.model.color === ce.color;
          });
        }
        function O(ce, he, de) {
          var ne = l.select(ce).datum(), ae = ne.categoryViewModel.model, se = ne.parcatsViewModel.graphDiv, me = l.select(ce.parentNode).selectAll("rect.bandrect"), ye = [];
          me.each(function(be) {
            M(be).each(function(Ae) {
              Array.prototype.push.apply(ye, A(Ae));
            });
          });
          var pe = {};
          pe[ae.dimensionInd] = ae.categoryValue, se.emit(he, { points: ye, event: de, constraints: pe });
        }
        function T(ce, he, de) {
          var ne = l.select(ce).datum(), ae = ne.categoryViewModel.model, se = ne.parcatsViewModel.graphDiv, me = M(ne), ye = [];
          me.each(function(be) {
            Array.prototype.push.apply(ye, A(be));
          });
          var pe = {};
          pe[ae.dimensionInd] = ae.categoryValue, ne.rawColor !== void 0 && (pe.color = ne.rawColor), se.emit(he, { points: ye, event: de, constraints: pe });
        }
        function z(ce, he, de) {
          ce._fullLayout._calcInverseTransform(ce);
          var ne, ae, se = ce._fullLayout._invScaleX, me = ce._fullLayout._invScaleY, ye = l.select(de.parentNode).select("rect.catrect"), pe = ye.node().getBoundingClientRect(), be = ye.datum(), Ae = be.parcatsViewModel, Se = Ae.model.dimensions[be.model.dimensionInd], Me = Ae.trace, De = pe.top + pe.height / 2;
          Ae.dimensions.length > 1 && Se.displayInd === Ae.dimensions.length - 1 ? (ne = pe.left, ae = "left") : (ne = pe.left + pe.width, ae = "right");
          var Le = be.model.count, We = be.model.categoryLabel, Ee = Le / be.parcatsViewModel.model.count, Ne = { countLabel: Le, categoryLabel: We, probabilityLabel: Ee.toFixed(3) }, Ie = [];
          be.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && Ie.push(["Count:", Ne.countLabel].join(" ")), be.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && Ie.push(["P(" + Ne.categoryLabel + "):", Ne.probabilityLabel].join(" "));
          var ge = Ie.join("<br>");
          return { trace: Me, x: se * (ne - he.left), y: me * (De - he.top), text: ge, color: "lightgray", borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontSize: 12, fontColor: "black", idealAlign: ae, hovertemplate: Me.hovertemplate, hovertemplateLabels: Ne, eventData: [{ data: Me._input, fullData: Me, count: Le, category: We, probability: Ee }] };
        }
        function F(ce) {
          if (!ce.parcatsViewModel.dragDimension && ce.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1) {
            if (l.mouse(this)[1] < -1) return;
            var he, de = ce.parcatsViewModel.graphDiv, ne = de._fullLayout, ae = ne._paperdiv.node().getBoundingClientRect(), se = ce.parcatsViewModel.hoveron, me = this;
            se === "color" ? (function(ye) {
              var pe = l.select(ye).datum(), be = M(pe);
              E(be), be.each(function() {
                p.raiseToTop(this);
              }), l.select(ye.parentNode).selectAll("rect.bandrect").filter(function(Ae) {
                return Ae.color === pe.color;
              }).each(function() {
                p.raiseToTop(this), l.select(this).attr("stroke", "black").attr("stroke-width", 1.5);
              });
            }(me), T(me, "plotly_hover", l.event)) : (function(ye) {
              l.select(ye.parentNode).selectAll("rect.bandrect").each(function(pe) {
                var be = M(pe);
                E(be), be.each(function() {
                  p.raiseToTop(this);
                });
              }), l.select(ye.parentNode).select("rect.catrect").attr("stroke", "black").attr("stroke-width", 2.5);
            }(me), O(me, "plotly_hover", l.event)), ce.parcatsViewModel.hoverinfoItems.indexOf("none") === -1 && (se === "category" ? he = z(de, ae, me) : se === "color" ? he = function(ye, pe, be) {
              ye._fullLayout._calcInverseTransform(ye);
              var Ae, Se, Me = ye._fullLayout._invScaleX, De = ye._fullLayout._invScaleY, Le = be.getBoundingClientRect(), We = l.select(be).datum(), Ee = We.categoryViewModel, Ne = Ee.parcatsViewModel, Ie = Ne.model.dimensions[Ee.model.dimensionInd], ge = Ne.trace, Ce = Le.y + Le.height / 2;
              Ne.dimensions.length > 1 && Ie.displayInd === Ne.dimensions.length - 1 ? (Ae = Le.left, Se = "left") : (Ae = Le.left + Le.width, Se = "right");
              var we = Ee.model.categoryLabel, Ge = We.parcatsViewModel.model.count, Re = 0;
              We.categoryViewModel.bands.forEach(function(_t) {
                _t.color === We.color && (Re += _t.count);
              });
              var je = Ee.model.count, Ke = 0;
              Ne.pathSelection.each(function(_t) {
                _t.model.color === We.color && (Ke += _t.model.count);
              });
              var tt = Re / Ge, _e = Re / Ke, Be = Re / je, $e = { countLabel: Re, categoryLabel: we, probabilityLabel: tt.toFixed(3) }, Ze = [];
              Ee.parcatsViewModel.hoverinfoItems.indexOf("count") !== -1 && Ze.push(["Count:", $e.countLabel].join(" ")), Ee.parcatsViewModel.hoverinfoItems.indexOf("probability") !== -1 && (Ze.push("P(color ∩ " + we + "): " + $e.probabilityLabel), Ze.push("P(" + we + " | color): " + _e.toFixed(3)), Ze.push("P(color | " + we + "): " + Be.toFixed(3)));
              var ct = Ze.join("<br>"), ft = f.mostReadable(We.color, ["black", "white"]);
              return { trace: ge, x: Me * (Ae - pe.left), y: De * (Ce - pe.top), text: ct, color: We.color, borderColor: "black", fontFamily: 'Monaco, "Courier New", monospace', fontColor: ft, fontSize: 10, idealAlign: Se, hovertemplate: ge.hovertemplate, hovertemplateLabels: $e, eventData: [{ data: ge._input, fullData: ge, category: we, count: Ge, probability: tt, categorycount: je, colorcount: Ke, bandcolorcount: Re }] };
            }(de, ae, me) : se === "dimension" && (he = function(ye, pe, be) {
              var Ae = [];
              return l.select(be.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function() {
                Ae.push(z(ye, pe, this));
              }), Ae;
            }(de, ae, me)), he && h.loneHover(he, { container: ne._hoverlayer.node(), outerContainer: ne._paper.node(), gd: de }));
          }
        }
        function U(ce) {
          var he = ce.parcatsViewModel;
          he.dragDimension || (L(he.pathSelection), P(he.dimensionSelection.selectAll("g.category")), I(he.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")), h.loneUnhover(he.graphDiv._fullLayout._hoverlayer.node()), he.pathSelection.sort(w), he.hoverinfoItems.indexOf("skip") !== -1) || (ce.parcatsViewModel.hoveron === "color" ? T(this, "plotly_unhover", l.event) : O(this, "plotly_unhover", l.event));
        }
        function V(ce) {
          ce.parcatsViewModel.arrangement !== "fixed" && (ce.dragDimensionDisplayInd = ce.model.displayInd, ce.initialDragDimensionDisplayInds = ce.parcatsViewModel.model.dimensions.map(function(he) {
            return he.displayInd;
          }), ce.dragHasMoved = !1, ce.dragCategoryDisplayInd = null, l.select(this).selectAll("g.category").select("rect.catrect").each(function(he) {
            var de = l.mouse(this)[0], ne = l.mouse(this)[1];
            -2 <= de && de <= he.width + 2 && -2 <= ne && ne <= he.height + 2 && (ce.dragCategoryDisplayInd = he.model.displayInd, ce.initialDragCategoryDisplayInds = ce.model.categories.map(function(ae) {
              return ae.displayInd;
            }), he.model.dragY = he.y, p.raiseToTop(this.parentNode), l.select(this.parentNode).selectAll("rect.bandrect").each(function(ae) {
              ae.y < ne && ne <= ae.y + ae.height && (ce.potentialClickBand = this);
            }));
          }), ce.parcatsViewModel.dragDimension = ce, h.loneUnhover(ce.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()));
        }
        function $(ce) {
          if (ce.parcatsViewModel.arrangement !== "fixed" && (ce.dragHasMoved = !0, ce.dragDimensionDisplayInd !== null)) {
            var he = ce.dragDimensionDisplayInd, de = he - 1, ne = he + 1, ae = ce.parcatsViewModel.dimensions[he];
            if (ce.dragCategoryDisplayInd !== null) {
              var se = ae.categories[ce.dragCategoryDisplayInd];
              se.model.dragY += l.event.dy;
              var me = se.model.dragY, ye = se.model.displayInd, pe = ae.categories, be = pe[ye - 1], Ae = pe[ye + 1];
              be !== void 0 && me < be.y + be.height / 2 && (se.model.displayInd = be.model.displayInd, be.model.displayInd = ye), Ae !== void 0 && me + se.height > Ae.y + Ae.height / 2 && (se.model.displayInd = Ae.model.displayInd, Ae.model.displayInd = ye), ce.dragCategoryDisplayInd = se.model.displayInd;
            }
            if (ce.dragCategoryDisplayInd === null || ce.parcatsViewModel.arrangement === "freeform") {
              ae.model.dragX = l.event.x;
              var Se = ce.parcatsViewModel.dimensions[de], Me = ce.parcatsViewModel.dimensions[ne];
              Se !== void 0 && ae.model.dragX < Se.x + Se.width && (ae.model.displayInd = Se.model.displayInd, Se.model.displayInd = he), Me !== void 0 && ae.model.dragX + ae.width > Me.x && (ae.model.displayInd = Me.model.displayInd, Me.model.displayInd = ce.dragDimensionDisplayInd), ce.dragDimensionDisplayInd = ae.model.displayInd;
            }
            Q(ce.parcatsViewModel), X(ce.parcatsViewModel), Y(ce.parcatsViewModel), re(ce.parcatsViewModel);
          }
        }
        function q(ce) {
          if (ce.parcatsViewModel.arrangement !== "fixed" && ce.dragDimensionDisplayInd !== null) {
            l.select(this).selectAll("text").attr("font-weight", "normal");
            var he = {}, de = K(ce.parcatsViewModel), ne = ce.parcatsViewModel.model.dimensions.map(function(Ae) {
              return Ae.displayInd;
            }), ae = ce.initialDragDimensionDisplayInds.some(function(Ae, Se) {
              return Ae !== ne[Se];
            });
            ae && ne.forEach(function(Ae, Se) {
              var Me = ce.parcatsViewModel.model.dimensions[Se].containerInd;
              he["dimensions[" + Me + "].displayindex"] = Ae;
            });
            var se = !1;
            if (ce.dragCategoryDisplayInd !== null) {
              var me = ce.model.categories.map(function(Ae) {
                return Ae.displayInd;
              });
              if (se = ce.initialDragCategoryDisplayInds.some(function(Ae, Se) {
                return Ae !== me[Se];
              })) {
                var ye = ce.model.categories.slice().sort(function(Ae, Se) {
                  return Ae.displayInd - Se.displayInd;
                }), pe = ye.map(function(Ae) {
                  return Ae.categoryValue;
                }), be = ye.map(function(Ae) {
                  return Ae.categoryLabel;
                });
                he["dimensions[" + ce.model.containerInd + "].categoryarray"] = [pe], he["dimensions[" + ce.model.containerInd + "].ticktext"] = [be], he["dimensions[" + ce.model.containerInd + "].categoryorder"] = "array";
              }
            }
            ce.parcatsViewModel.hoverinfoItems.indexOf("skip") === -1 && !ce.dragHasMoved && ce.potentialClickBand && (ce.parcatsViewModel.hoveron === "color" ? T(ce.potentialClickBand, "plotly_click", l.event.sourceEvent) : O(ce.potentialClickBand, "plotly_click", l.event.sourceEvent)), ce.model.dragX = null, ce.dragCategoryDisplayInd !== null && (ce.parcatsViewModel.dimensions[ce.dragDimensionDisplayInd].categories[ce.dragCategoryDisplayInd].model.dragY = null, ce.dragCategoryDisplayInd = null), ce.dragDimensionDisplayInd = null, ce.parcatsViewModel.dragDimension = null, ce.dragHasMoved = null, ce.potentialClickBand = null, Q(ce.parcatsViewModel), X(ce.parcatsViewModel), l.transition().duration(300).ease("cubic-in-out").each(function() {
              Y(ce.parcatsViewModel, !0), re(ce.parcatsViewModel, !0);
            }).each("end", function() {
              (ae || se) && i.restyle(ce.parcatsViewModel.graphDiv, he, [de]);
            });
          }
        }
        function K(ce) {
          for (var he, de = ce.graphDiv._fullData, ne = 0; ne < de.length; ne++) if (ce.key === de[ne].uid) {
            he = ne;
            break;
          }
          return he;
        }
        function re(ce, he) {
          var de;
          he === void 0 && (he = !1), ce.pathSelection.data(function(ne) {
            return ne.paths;
          }, m), (de = ce.pathSelection, he ? de.transition() : de).attr("d", function(ne) {
            return ne.svgD;
          });
        }
        function Y(ce, he) {
          function de(me) {
            return he ? me.transition() : me;
          }
          he === void 0 && (he = !1), ce.dimensionSelection.data(function(me) {
            return me.dimensions;
          }, m);
          var ne = ce.dimensionSelection.selectAll("g.category").data(function(me) {
            return me.categories;
          }, m);
          de(ce.dimensionSelection).attr("transform", function(me) {
            return _(me.x, 0);
          }), de(ne).attr("transform", function(me) {
            return _(0, me.y);
          }), ne.select(".dimlabel").text(function(me, ye) {
            return ye === 0 ? me.parcatsViewModel.model.dimensions[me.model.dimensionInd].dimensionLabel : null;
          }), ne.select(".catlabel").attr("text-anchor", function(me) {
            return x(me) ? "start" : "end";
          }).attr("x", function(me) {
            return x(me) ? me.width + 5 : -5;
          }).each(function(me) {
            var ye, pe;
            x(me) ? (ye = me.width + 5, pe = "start") : (ye = -5, pe = "end"), l.select(this).selectAll("tspan").attr("x", ye).attr("text-anchor", pe);
          });
          var ae = ne.selectAll("rect.bandrect").data(function(me) {
            return me.bands;
          }, m), se = ae.enter().append("rect").attr("class", "bandrect").attr("cursor", "move").attr("stroke-opacity", 0).attr("fill", function(me) {
            return me.color;
          }).attr("fill-opacity", 0);
          ae.attr("fill", function(me) {
            return me.color;
          }).attr("width", function(me) {
            return me.width;
          }).attr("height", function(me) {
            return me.height;
          }).attr("y", function(me) {
            return me.y;
          }), I(se), ae.each(function() {
            p.raiseToTop(this);
          }), ae.exit().remove();
        }
        function te(ce, he, de) {
          var ne, ae = de[0], se = he.margin || { l: 80, r: 80, t: 100, b: 80 }, me = ae.trace, ye = me.domain, pe = he.width, be = he.height, Ae = Math.floor(pe * (ye.x[1] - ye.x[0])), Se = Math.floor(be * (ye.y[1] - ye.y[0])), Me = ye.x[0] * pe + se.l, De = he.height - ye.y[1] * he.height + se.t, Le = me.line.shape;
          ne = me.hoverinfo === "all" ? ["count", "probability"] : (me.hoverinfo || "").split("+");
          var We = { trace: me, key: me.uid, model: ae, x: Me, y: De, width: Ae, height: Se, hoveron: me.hoveron, hoverinfoItems: ne, arrangement: me.arrangement, bundlecolors: me.bundlecolors, sortpaths: me.sortpaths, labelfont: me.labelfont, categorylabelfont: me.tickfont, pathShape: Le, dragDimension: null, margin: se, paths: [], dimensions: [], graphDiv: ce, traceSelection: null, pathSelection: null, dimensionSelection: null };
          return ae.dimensions && (Q(We), X(We)), We;
        }
        function ee(ce, he, de, ne, ae) {
          var se, me, ye = [], pe = [];
          for (me = 0; me < de.length - 1; me++) se = u(de[me] + ce[me], ce[me + 1]), ye.push(se(ae)), pe.push(se(1 - ae));
          var be = "M " + ce[0] + "," + he[0];
          for (be += "l" + de[0] + ",0 ", me = 1; me < de.length; me++) be += "C" + ye[me - 1] + "," + he[me - 1] + " " + pe[me - 1] + "," + he[me] + " " + ce[me] + "," + he[me], be += "l" + de[me] + ",0 ";
          for (be += "l0," + ne + " ", be += "l -" + de[de.length - 1] + ",0 ", me = de.length - 2; me >= 0; me--) be += "C" + pe[me] + "," + (he[me + 1] + ne) + " " + ye[me] + "," + (he[me] + ne) + " " + (ce[me] + de[me]) + "," + (he[me] + ne), be += "l-" + de[me] + ",0 ";
          return be + "Z";
        }
        function X(ce) {
          var he = ce.dimensions, de = ce.model, ne = he.map(function($e) {
            return $e.categories.map(function(Ze) {
              return Ze.y;
            });
          }), ae = ce.model.dimensions.map(function($e) {
            return $e.categories.map(function(Ze) {
              return Ze.displayInd;
            });
          }), se = ce.model.dimensions.map(function($e) {
            return $e.displayInd;
          }), me = ce.dimensions.map(function($e) {
            return $e.model.dimensionInd;
          }), ye = he.map(function($e) {
            return $e.x;
          }), pe = he.map(function($e) {
            return $e.width;
          }), be = [];
          for (var Ae in de.paths) de.paths.hasOwnProperty(Ae) && be.push(de.paths[Ae]);
          function Se($e) {
            var Ze = $e.categoryInds.map(function(ct, ft) {
              return ae[ft][ct];
            });
            return me.map(function(ct) {
              return Ze[ct];
            });
          }
          be.sort(function($e, Ze) {
            var ct = Se($e), ft = Se(Ze);
            return ce.sortpaths === "backward" && (ct.reverse(), ft.reverse()), ct.push($e.valueInds[0]), ft.push(Ze.valueInds[0]), ce.bundlecolors && (ct.unshift($e.rawColor), ft.unshift(Ze.rawColor)), ct < ft ? -1 : ct > ft ? 1 : 0;
          });
          for (var Me = new Array(be.length), De = he[0].model.count, Le = he[0].categories.map(function($e) {
            return $e.height;
          }).reduce(function($e, Ze) {
            return $e + Ze;
          }), We = 0; We < be.length; We++) {
            var Ee, Ne = be[We];
            Ee = De > 0 ? Le * (Ne.count / De) : 0;
            for (var Ie, ge = new Array(ne.length), Ce = 0; Ce < Ne.categoryInds.length; Ce++) {
              var we = Ne.categoryInds[Ce], Ge = ae[Ce][we], Re = se[Ce];
              ge[Re] = ne[Re][Ge], ne[Re][Ge] += Ee;
              var je = ce.dimensions[Re].categories[Ge], Ke = je.bands.length, tt = je.bands[Ke - 1];
              if (tt === void 0 || Ne.rawColor !== tt.rawColor) {
                var _e = tt === void 0 ? 0 : tt.y + tt.height;
                je.bands.push({ key: _e, color: Ne.color, rawColor: Ne.rawColor, height: Ee, width: je.width, count: Ne.count, y: _e, categoryViewModel: je, parcatsViewModel: ce });
              } else {
                var Be = je.bands[Ke - 1];
                Be.height += Ee, Be.count += Ne.count;
              }
            }
            Ie = ce.pathShape === "hspline" ? ee(ye, ge, pe, Ee, 0.5) : ee(ye, ge, pe, Ee, 0), Me[We] = { key: Ne.valueInds[0], model: Ne, height: Ee, leftXs: ye, topYs: ge, dimWidths: pe, svgD: Ie, parcatsViewModel: ce };
          }
          ce.paths = Me;
        }
        function Q(ce) {
          var he = ce.model.dimensions.map(function(me) {
            return { displayInd: me.displayInd, dimensionInd: me.dimensionInd };
          });
          he.sort(function(me, ye) {
            return me.displayInd - ye.displayInd;
          });
          var de = [];
          for (var ne in he) {
            var ae = he[ne].dimensionInd, se = ce.model.dimensions[ae];
            de.push(ue(ce, se));
          }
          ce.dimensions = de;
        }
        function ue(ce, he) {
          var de, ne = ce.model.dimensions.length, ae = he.displayInd;
          de = 40 + (ne > 1 ? (ce.width - 80 - 16) / (ne - 1) : 0) * ae;
          var se, me, ye, pe, be, Ae = [], Se = ce.model.maxCats, Me = he.categories.length, De = he.count, Le = ce.height - 8 * (Se - 1), We = 8 * (Se - Me) / 2, Ee = he.categories.map(function(Ne) {
            return { displayInd: Ne.displayInd, categoryInd: Ne.categoryInd };
          });
          for (Ee.sort(function(Ne, Ie) {
            return Ne.displayInd - Ie.displayInd;
          }), be = 0; be < Me; be++) pe = Ee[be].categoryInd, me = he.categories[pe], se = De > 0 ? me.count / De * Le : 0, ye = { key: me.valueInds[0], model: me, width: 16, height: se, y: me.dragY !== null ? me.dragY : We, bands: [], parcatsViewModel: ce }, We = We + se + 8, Ae.push(ye);
          return { key: he.dimensionInd, x: he.dragX !== null ? he.dragX : de, y: 0, width: 16, model: he, categories: Ae, parcatsViewModel: ce, dragCategoryDisplayInd: null, dragDimensionDisplayInd: null, initialDragDimensionDisplayInds: null, initialDragCategoryDisplayInds: null, dragHasMoved: null, potentialClickBand: null };
        }
        o.exports = function(ce, he, de, ne) {
          g(de, ce, ne, he);
        };
      }, 37822: function(o, s, n) {
        var l = n(27219);
        o.exports = function(u, i, h, p) {
          var _ = u._fullLayout, d = _._paper, f = _._size;
          l(u, d, i, { width: f.w, height: f.h, margin: { t: f.t, r: f.r, b: f.b, l: f.l } }, h, p);
        };
      }, 59549: function(o, s, n) {
        var l = n(87163), u = n(25829), i = n(80337), h = n(13792).u, p = n(93049).extendFlat, _ = n(78032).templatedArray;
        o.exports = { domain: h({ name: "parcoords", trace: !0, editType: "plot" }), labelangle: { valType: "angle", dflt: 0, editType: "plot" }, labelside: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, labelfont: i({ editType: "plot" }), tickfont: i({ autoShadowDflt: !0, editType: "plot" }), rangefont: i({ editType: "plot" }), dimensions: _("dimension", { label: { valType: "string", editType: "plot" }, tickvals: p({}, u.tickvals, { editType: "plot" }), ticktext: p({}, u.ticktext, { editType: "plot" }), tickformat: p({}, u.tickformat, { editType: "plot" }), visible: { valType: "boolean", dflt: !0, editType: "plot" }, range: { valType: "info_array", items: [{ valType: "number", editType: "plot" }, { valType: "number", editType: "plot" }], editType: "plot" }, constraintrange: { valType: "info_array", freeLength: !0, dimensions: "1-2", items: [{ valType: "any", editType: "plot" }, { valType: "any", editType: "plot" }], editType: "plot" }, multiselect: { valType: "boolean", dflt: !0, editType: "plot" }, values: { valType: "data_array", editType: "calc" }, editType: "calc" }), line: p({ editType: "calc" }, l("line", { colorscaleDflt: "Viridis", autoColorDflt: !1, editTypeOverride: "calc" })), unselected: { line: { color: { valType: "color", dflt: "#7f7f7f", editType: "plot" }, opacity: { valType: "number", min: 0, max: 1, dflt: "auto", editType: "plot" }, editType: "plot" }, editType: "plot" } };
      }, 23245: function(o, s, n) {
        var l = n(77911), u = n(45568), i = n(71293).keyFun, h = n(71293).repeat, p = n(34809).sorterAsc, _ = n(34809).strTranslate, d = l.bar.snapRatio;
        function f(z, F) {
          return z * (1 - d) + F * d;
        }
        var c = l.bar.snapClose;
        function g(z, F) {
          return z * (1 - c) + F * c;
        }
        function m(z, F, U, V) {
          if (function(ue, ce) {
            for (var he = 0; he < ce.length; he++) if (ue >= ce[he][0] && ue <= ce[he][1]) return !0;
            return !1;
          }(U, V)) return U;
          var $ = z ? -1 : 1, q = 0, K = F.length - 1;
          if ($ < 0) {
            var re = q;
            q = K, K = re;
          }
          for (var Y = F[q], te = Y, ee = q; $ * ee < $ * K; ee += $) {
            var X = ee + $, Q = F[X];
            if ($ * U < $ * g(Y, Q)) return f(Y, te);
            if ($ * U < $ * Q || X === K) return f(Q, Y);
            te = Y, Y = Q;
          }
        }
        function x(z) {
          z.attr("x", -l.bar.captureWidth / 2).attr("width", l.bar.captureWidth);
        }
        function w(z) {
          z.attr("visibility", "visible").style("visibility", "visible").attr("fill", "yellow").attr("opacity", 0);
        }
        function k(z) {
          if (!z.brush.filterSpecified) return "0," + z.height;
          for (var F, U, V, $ = S(z.brush.filter.getConsolidated(), z.height), q = [0], K = $.length ? $[0][0] : null, re = 0; re < $.length; re++) U = (F = $[re])[1] - F[0], q.push(K), q.push(U), (V = re + 1) < $.length && (K = $[V][0] - F[1]);
          return q.push(z.height), q;
        }
        function S(z, F) {
          return z.map(function(U) {
            return U.map(function(V) {
              return Math.max(0, V * F);
            }).sort(p);
          });
        }
        function A() {
          u.select(document.body).style("cursor", null);
        }
        function C(z) {
          z.attr("stroke-dasharray", k);
        }
        function D(z, F) {
          var U = u.select(z).selectAll(".highlight, .highlight-shadow");
          C(F ? U.transition().duration(l.bar.snapDuration).each("end", F) : U);
        }
        function L(z, F) {
          var U, V = z.brush, $ = NaN, q = {};
          if (V.filterSpecified) {
            var K = z.height, re = V.filter.getConsolidated(), Y = S(re, K), te = NaN, ee = NaN, X = NaN;
            for (U = 0; U <= Y.length; U++) {
              var Q = Y[U];
              if (Q && Q[0] <= F && F <= Q[1]) {
                te = U;
                break;
              }
              if (ee = U ? U - 1 : NaN, Q && Q[0] > F) {
                X = U;
                break;
              }
            }
            if ($ = te, isNaN($) && ($ = isNaN(ee) || isNaN(X) ? isNaN(ee) ? X : ee : F - Y[ee][1] < Y[X][0] - F ? ee : X), !isNaN($)) {
              var ue = Y[$], ce = function(ae, se) {
                var me = l.bar.handleHeight;
                if (!(se > ae[1] + me || se < ae[0] - me)) return se >= 0.9 * ae[1] + 0.1 * ae[0] ? "n" : se <= 0.9 * ae[0] + 0.1 * ae[1] ? "s" : "ns";
              }(ue, F);
              ce && (q.interval = re[$], q.intervalPix = ue, q.region = ce);
            }
          }
          if (z.ordinal && !q.region) {
            var he = z.unitTickvals, de = z.unitToPaddedPx.invert(F);
            for (U = 0; U < he.length; U++) {
              var ne = [0.25 * he[Math.max(U - 1, 0)] + 0.75 * he[U], 0.25 * he[Math.min(U + 1, he.length - 1)] + 0.75 * he[U]];
              if (de >= ne[0] && de <= ne[1]) {
                q.clickableOrdinalRange = ne;
                break;
              }
            }
          }
          return q;
        }
        function E(z, F) {
          u.event.sourceEvent.stopPropagation();
          var U = F.height - u.mouse(z)[1] - 2 * l.verticalPadding, V = F.brush.svgBrush;
          V.wasDragged = !0, V._dragging = !0, V.grabbingBar ? V.newExtent = [U - V.grabPoint, U + V.barLength - V.grabPoint].map(F.unitToPaddedPx.invert) : V.newExtent = [V.startExtent, F.unitToPaddedPx.invert(U)].sort(p), F.brush.filterSpecified = !0, V.extent = V.stayingIntervals.concat([V.newExtent]), V.brushCallback(F), D(z.parentNode);
        }
        function P(z, F) {
          var U = L(F, F.height - u.mouse(z)[1] - 2 * l.verticalPadding), V = "crosshair";
          U.clickableOrdinalRange ? V = "pointer" : U.region && (V = U.region + "-resize"), u.select(document.body).style("cursor", V);
        }
        function I(z) {
          z.on("mousemove", function(F) {
            u.event.preventDefault(), F.parent.inBrushDrag || P(this, F);
          }).on("mouseleave", function(F) {
            F.parent.inBrushDrag || A();
          }).call(u.behavior.drag().on("dragstart", function(F) {
            (function(U, V) {
              u.event.sourceEvent.stopPropagation();
              var $ = V.height - u.mouse(U)[1] - 2 * l.verticalPadding, q = V.unitToPaddedPx.invert($), K = V.brush, re = L(V, $), Y = re.interval, te = K.svgBrush;
              if (te.wasDragged = !1, te.grabbingBar = re.region === "ns", te.grabbingBar) {
                var ee = Y.map(V.unitToPaddedPx);
                te.grabPoint = $ - ee[0] - l.verticalPadding, te.barLength = ee[1] - ee[0];
              }
              te.clickableOrdinalRange = re.clickableOrdinalRange, te.stayingIntervals = V.multiselect && K.filterSpecified ? K.filter.getConsolidated() : [], Y && (te.stayingIntervals = te.stayingIntervals.filter(function(X) {
                return X[0] !== Y[0] && X[1] !== Y[1];
              })), te.startExtent = re.region ? Y[re.region === "s" ? 1 : 0] : q, V.parent.inBrushDrag = !0, te.brushStartCallback();
            })(this, F);
          }).on("drag", function(F) {
            E(this, F);
          }).on("dragend", function(F) {
            (function(U, V) {
              var $ = V.brush, q = $.filter, K = $.svgBrush;
              K._dragging || (P(U, V), E(U, V), V.brush.svgBrush.wasDragged = !1), K._dragging = !1, u.event.sourceEvent.stopPropagation();
              var re = K.grabbingBar;
              if (K.grabbingBar = !1, K.grabLocation = void 0, V.parent.inBrushDrag = !1, A(), !K.wasDragged) return K.wasDragged = void 0, K.clickableOrdinalRange ? $.filterSpecified && V.multiselect ? K.extent.push(K.clickableOrdinalRange) : (K.extent = [K.clickableOrdinalRange], $.filterSpecified = !0) : re ? (K.extent = K.stayingIntervals, K.extent.length === 0 && O($)) : O($), K.brushCallback(V), D(U.parentNode), void K.brushEndCallback($.filterSpecified ? q.getConsolidated() : []);
              var Y = function() {
                q.set(q.getConsolidated());
              };
              if (V.ordinal) {
                var te = V.unitTickvals;
                te[te.length - 1] < te[0] && te.reverse(), K.newExtent = [m(0, te, K.newExtent[0], K.stayingIntervals), m(1, te, K.newExtent[1], K.stayingIntervals)];
                var ee = K.newExtent[1] > K.newExtent[0];
                K.extent = K.stayingIntervals.concat(ee ? [K.newExtent] : []), K.extent.length || O($), K.brushCallback(V), ee ? D(U.parentNode, Y) : (Y(), D(U.parentNode));
              } else Y();
              K.brushEndCallback($.filterSpecified ? q.getConsolidated() : []);
            })(this, F);
          }));
        }
        function M(z, F) {
          return z[0] - F[0];
        }
        function O(z) {
          z.filterSpecified = !1, z.svgBrush.extent = [[-1 / 0, 1 / 0]];
        }
        function T(z) {
          for (var F, U = z.slice(), V = [], $ = U.shift(); $; ) {
            for (F = $.slice(); ($ = U.shift()) && $[0] <= F[1]; ) F[1] = Math.max(F[1], $[1]);
            V.push(F);
          }
          return V.length === 1 && V[0][0] > V[0][1] && (V = []), V;
        }
        o.exports = { makeBrush: function(z, F, U, V, $, q) {
          var K, re = /* @__PURE__ */ function() {
            var Y, te, ee = [];
            return { set: function(X) {
              (ee = X.map(function(Q) {
                return Q.slice().sort(p);
              }).sort(M)).length === 1 && ee[0][0] === -1 / 0 && ee[0][1] === 1 / 0 && (ee = [[0, -1]]), Y = T(ee), te = ee.reduce(function(Q, ue) {
                return [Math.min(Q[0], ue[0]), Math.max(Q[1], ue[1])];
              }, [1 / 0, -1 / 0]);
            }, get: function() {
              return ee.slice();
            }, getConsolidated: function() {
              return Y;
            }, getBounds: function() {
              return te;
            } };
          }();
          return re.set(U), { filter: re, filterSpecified: F, svgBrush: { extent: [], brushStartCallback: V, brushCallback: (K = $, function(Y) {
            var te = Y.brush, ee = function(Q) {
              return Q.svgBrush.extent.map(function(ue) {
                return ue.slice();
              });
            }(te), X = ee.slice();
            te.filter.set(X), K();
          }), brushEndCallback: q } };
        }, ensureAxisBrush: function(z, F, U) {
          var V = z.selectAll("." + l.cn.axisBrush).data(h, i);
          V.enter().append("g").classed(l.cn.axisBrush, !0), function($, q, K) {
            var re = K._context.staticPlot, Y = $.selectAll(".background").data(h);
            Y.enter().append("rect").classed("background", !0).call(x).call(w).style("pointer-events", re ? "none" : "auto").attr("transform", _(0, l.verticalPadding)), Y.call(I).attr("height", function(X) {
              return X.height - l.verticalPadding;
            });
            var te = $.selectAll(".highlight-shadow").data(h);
            te.enter().append("line").classed("highlight-shadow", !0).attr("x", -l.bar.width / 2).attr("stroke-width", l.bar.width + l.bar.strokeWidth).attr("stroke", q).attr("opacity", l.bar.strokeOpacity).attr("stroke-linecap", "butt"), te.attr("y1", function(X) {
              return X.height;
            }).call(C);
            var ee = $.selectAll(".highlight").data(h);
            ee.enter().append("line").classed("highlight", !0).attr("x", -l.bar.width / 2).attr("stroke-width", l.bar.width - l.bar.strokeWidth).attr("stroke", l.bar.fillColor).attr("opacity", l.bar.fillOpacity).attr("stroke-linecap", "butt"), ee.attr("y1", function(X) {
              return X.height;
            }).call(C);
          }(V, F, U);
        }, cleanRanges: function(z, F) {
          if (Array.isArray(z[0]) ? (z = z.map(function(V) {
            return V.sort(p);
          }), z = F.multiselect ? T(z.sort(M)) : [z[0]]) : z = [z.sort(p)], F.tickvals) {
            var U = F.tickvals.slice().sort(p);
            if (!(z = z.map(function(V) {
              var $ = [m(0, U, V[0], []), m(1, U, V[1], [])];
              if ($[1] > $[0]) return $;
            }).filter(function(V) {
              return V;
            })).length) return;
          }
          return z.length > 1 ? z : z[0];
        } };
      }, 79846: function(o, s, n) {
        o.exports = { attributes: n(59549), supplyDefaults: n(12842), calc: n(20113), colorbar: { container: "line", min: "cmin", max: "cmax" }, moduleType: "trace", name: "parcoords", basePlotModule: n(67207), categories: ["gl", "regl", "noOpacity", "noHover"], meta: {} };
      }, 67207: function(o, s, n) {
        var l = n(45568), u = n(4173).eV, i = n(58823), h = n(62972);
        s.name = "parcoords", s.plot = function(p) {
          var _ = u(p.calcdata, "parcoords")[0];
          _.length && i(p, _);
        }, s.clean = function(p, _, d, f) {
          var c = f._has && f._has("parcoords"), g = _._has && _._has("parcoords");
          c && !g && (f._paperdiv.selectAll(".parcoords").remove(), f._glimages.selectAll("*").remove());
        }, s.toSVG = function(p) {
          var _ = p._fullLayout._glimages, d = l.select(p).selectAll(".svg-container");
          d.filter(function(f, c) {
            return c === d.size() - 1;
          }).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function() {
            var f = this, c = f.toDataURL("image/png");
            _.append("svg:image").attr({ xmlns: h.svg, "xlink:href": c, preserveAspectRatio: "none", x: 0, y: 0, width: f.style.width, height: f.style.height });
          }), window.setTimeout(function() {
            l.selectAll("#filterBarPattern").attr("id", "filterBarPattern");
          }, 60);
        };
      }, 20113: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray, u = n(88856), i = n(71293).wrap;
        o.exports = function(h, p) {
          var _, d;
          return u.hasColorscale(p, "line") && l(p.line.color) ? (_ = p.line.color, d = u.extractOpts(p.line).colorscale, u.calc(h, p, { vals: _, containerStr: "line", cLetter: "c" })) : (_ = function(f) {
            for (var c = new Array(f), g = 0; g < f; g++) c[g] = 0.5;
            return c;
          }(p._length), d = [[0, p.line.color], [1, p.line.color]]), i({ lineColor: _, cscale: d });
        };
      }, 77911: function(o) {
        o.exports = { maxDimensionCount: 60, overdrag: 45, verticalPadding: 2, tickDistance: 50, canvasPixelRatio: 1, blockLineCount: 5e3, layers: ["contextLineLayer", "focusLineLayer", "pickLineLayer"], axisTitleOffset: 28, axisExtentOffset: 10, bar: { width: 4, captureWidth: 10, fillColor: "magenta", fillOpacity: 1, snapDuration: 150, snapRatio: 0.25, snapClose: 0.01, strokeOpacity: 1, strokeWidth: 1, handleHeight: 8, handleOpacity: 1, handleOverlap: 0 }, cn: { axisExtentText: "axis-extent-text", parcoordsLineLayers: "parcoords-line-layers", parcoordsLineLayer: "parcoords-lines", parcoords: "parcoords", parcoordsControlView: "parcoords-control-view", yAxis: "y-axis", axisOverlays: "axis-overlays", axis: "axis", axisHeading: "axis-heading", axisTitle: "axis-title", axisExtent: "axis-extent", axisExtentTop: "axis-extent-top", axisExtentTopText: "axis-extent-top-text", axisExtentBottom: "axis-extent-bottom", axisExtentBottomText: "axis-extent-bottom-text", axisBrush: "axis-brush" }, id: { filterBarPattern: "filter-bar-pattern" } };
      }, 12842: function(o, s, n) {
        var l = n(34809), u = n(65477).hasColorscale, i = n(39356), h = n(13792).N, p = n(59008), _ = n(29714), d = n(59549), f = n(23245), c = n(77911).maxDimensionCount, g = n(63197);
        function m(x, w, k, S) {
          function A(P, I) {
            return l.coerce(x, w, d.dimensions, P, I);
          }
          var C = A("values"), D = A("visible");
          if (C && C.length || (D = w.visible = !1), D) {
            A("label"), A("tickvals"), A("ticktext"), A("tickformat");
            var L = A("range");
            w._ax = { _id: "y", type: "linear", showexponent: "all", exponentformat: "B", range: L }, _.setConvert(w._ax, S.layout), A("multiselect");
            var E = A("constraintrange");
            E && (w.constraintrange = f.cleanRanges(E, w));
          }
        }
        o.exports = function(x, w, k, S) {
          function A(P, I) {
            return l.coerce(x, w, d, P, I);
          }
          var C = x.dimensions;
          Array.isArray(C) && C.length > c && (l.log("parcoords traces support up to " + c + " dimensions at the moment"), C.splice(c));
          var D = p(x, w, { name: "dimensions", layout: S, handleItemDefaults: m }), L = function(P, I, M, O, T) {
            var z = T("line.color", M);
            if (u(P, "line") && l.isArrayOrTypedArray(z)) {
              if (z.length) return T("line.colorscale"), i(P, I, O, T, { prefix: "line.", cLetter: "c" }), z.length;
              I.line.color = M;
            }
            return 1 / 0;
          }(x, w, k, S, A);
          h(w, S, A), Array.isArray(D) && D.length || (w.visible = !1), g(w, D, "values", L);
          var E = l.extendFlat({}, S.font, { size: Math.round(S.font.size / 1.2) });
          l.coerceFont(A, "labelfont", E), l.coerceFont(A, "tickfont", E, { autoShadowDflt: !0 }), l.coerceFont(A, "rangefont", E), A("labelangle"), A("labelside"), A("unselected.line.color"), A("unselected.line.opacity");
        };
      }, 62935: function(o, s, n) {
        var l = n(34809).isTypedArray;
        s.convertTypedArray = function(u) {
          return l(u) ? Array.prototype.slice.call(u) : u;
        }, s.isOrdinal = function(u) {
          return !!u.tickvals;
        }, s.isVisible = function(u) {
          return u.visible || !("visible" in u);
        };
      }, 83910: function(o, s, n) {
        var l = n(79846);
        l.plot = n(58823), o.exports = l;
      }, 1293: function(o, s, n) {
        var l = ["precision highp float;", "", "varying vec4 fragColor;", "", "attribute vec4 p01_04, p05_08, p09_12, p13_16,", "               p17_20, p21_24, p25_28, p29_32,", "               p33_36, p37_40, p41_44, p45_48,", "               p49_52, p53_56, p57_60, colors;", "", "uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,", "             loA, hiA, loB, hiB, loC, hiC, loD, hiD;", "", "uniform vec2 resolution, viewBoxPos, viewBoxSize;", "uniform float maskHeight;", "uniform float drwLayer; // 0: context, 1: focus, 2: pick", "uniform vec4 contextColor;", "uniform sampler2D maskTexture, palette;", "", "bool isPick    = (drwLayer > 1.5);", "bool isContext = (drwLayer < 0.5);", "", "const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);", "const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);", "", "float val(mat4 p, mat4 v) {", "    return dot(matrixCompMult(p, v) * UNITS, UNITS);", "}", "", "float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {", "    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);", "    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);", "    return y1 * (1.0 - ratio) + y2 * ratio;", "}", "", "int iMod(int a, int b) {", "    return a - b * (a / b);", "}", "", "bool fOutside(float p, float lo, float hi) {", "    return (lo < hi) && (lo > p || p > hi);", "}", "", "bool vOutside(vec4 p, vec4 lo, vec4 hi) {", "    return (", "        fOutside(p[0], lo[0], hi[0]) ||", "        fOutside(p[1], lo[1], hi[1]) ||", "        fOutside(p[2], lo[2], hi[2]) ||", "        fOutside(p[3], lo[3], hi[3])", "    );", "}", "", "bool mOutside(mat4 p, mat4 lo, mat4 hi) {", "    return (", "        vOutside(p[0], lo[0], hi[0]) ||", "        vOutside(p[1], lo[1], hi[1]) ||", "        vOutside(p[2], lo[2], hi[2]) ||", "        vOutside(p[3], lo[3], hi[3])", "    );", "}", "", "bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {", "    return mOutside(A, loA, hiA) ||", "           mOutside(B, loB, hiB) ||", "           mOutside(C, loC, hiC) ||", "           mOutside(D, loD, hiD);", "}", "", "bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {", "    mat4 pnts[4];", "    pnts[0] = A;", "    pnts[1] = B;", "    pnts[2] = C;", "    pnts[3] = D;", "", "    for(int i = 0; i < 4; ++i) {", "        for(int j = 0; j < 4; ++j) {", "            for(int k = 0; k < 4; ++k) {", "                if(0 == iMod(", "                    int(255.0 * texture2D(maskTexture,", "                        vec2(", "                            (float(i * 2 + j / 2) + 0.5) / 8.0,", "                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight", "                        ))[3]", "                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),", "                    2", "                )) return true;", "            }", "        }", "    }", "    return false;", "}", "", "vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {", "    float x = 0.5 * sign(v) + 0.5;", "    float y = axisY(x, A, B, C, D);", "    float z = 1.0 - abs(v);", "", "    z += isContext ? 0.0 : 2.0 * float(", "        outsideBoundingBox(A, B, C, D) ||", "        outsideRasterMask(A, B, C, D)", "    );", "", "    return vec4(", "        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,", "        z,", "        1.0", "    );", "}", "", "void main() {", "    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);", "    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);", "    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);", "    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);", "", "    float v = colors[3];", "", "    gl_Position = position(isContext, v, A, B, C, D);", "", "    fragColor =", "        isContext ? vec4(contextColor) :", "        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));", "}"].join(`
`), u = ["precision highp float;", "", "varying vec4 fragColor;", "", "void main() {", "    gl_FragColor = fragColor;", "}"].join(`
`), i = n(77911).maxDimensionCount, h = n(34809), p = 1e-6, _ = new Uint8Array(4), d = new Uint8Array(4), f = { shape: [256, 1], format: "rgba", type: "uint8", mag: "nearest", min: "nearest" };
        function c(D, L, E, P, I) {
          var M = D._gl;
          M.enable(M.SCISSOR_TEST), M.scissor(L, E, P, I), D.clear({ color: [0, 0, 0, 0], depth: 1 });
        }
        function g(D, L, E, P, I, M) {
          var O = M.key;
          E.drawCompleted || (function(T) {
            T.read({ x: 0, y: 0, width: 1, height: 1, data: _ });
          }(D), E.drawCompleted = !0), function T(z) {
            var F = Math.min(P, I - z * P);
            z === 0 && (window.cancelAnimationFrame(E.currentRafs[O]), delete E.currentRafs[O], c(D, M.scissorX, M.scissorY, M.scissorWidth, M.viewBoxSize[1])), E.clearOnly || (M.count = 2 * F, M.offset = 2 * z * P, L(M), z * P + F < I && (E.currentRafs[O] = window.requestAnimationFrame(function() {
              T(z + 1);
            })), E.drawCompleted = !1);
          }(0);
        }
        function m(D, L) {
          for (var E = new Array(256), P = 0; P < 256; P++) E[P] = D(P / 255).concat(L);
          return E;
        }
        function x(D, L) {
          return (D >>> 8 * L) % 256 / 255;
        }
        function w(D, L, E) {
          for (var P = new Array(8 * L), I = 0, M = 0; M < L; M++) for (var O = 0; O < 2; O++) for (var T = 0; T < 4; T++) {
            var z = 4 * D + T, F = E[64 * M + z];
            z === 63 && O === 0 && (F *= -1), P[I++] = F;
          }
          return P;
        }
        function k(D) {
          var L = "0" + D;
          return L.substr(L.length - 2);
        }
        function S(D) {
          return D < i ? "p" + k(D + 1) + "_" + k(D + 4) : "colors";
        }
        function A(D, L, E, P, I, M, O, T, z, F, U, V, $, q) {
          for (var K = [[], []], re = 0; re < 64; re++) K[0][re] = re === I ? 1 : 0, K[1][re] = re === M ? 1 : 0;
          O *= q, T *= q, z *= q, F *= q;
          var Y = D.lines.canvasOverdrag * q, te = D.domain, ee = D.canvasWidth * q, X = D.canvasHeight * q, Q = D.pad.l * q, ue = D.pad.b * q, ce = D.layoutHeight * q, he = D.layoutWidth * q, de = D.deselectedLines.color, ne = D.deselectedLines.opacity;
          return h.extendFlat({ key: U, resolution: [ee, X], viewBoxPos: [O + Y, T], viewBoxSize: [z, F], i0: I, i1: M, dim0A: K[0].slice(0, 16), dim0B: K[0].slice(16, 32), dim0C: K[0].slice(32, 48), dim0D: K[0].slice(48, 64), dim1A: K[1].slice(0, 16), dim1B: K[1].slice(16, 32), dim1C: K[1].slice(32, 48), dim1D: K[1].slice(48, 64), drwLayer: V, contextColor: [de[0] / 255, de[1] / 255, de[2] / 255, ne !== "auto" ? de[3] * ne : Math.max(0.00392156862745098, Math.pow(1 / D.lines.color.length, 0.3333333333333333))], scissorX: (P === L ? 0 : O + Y) + (Q - Y) + he * te.x[0], scissorWidth: (P === E ? ee - O + Y : z + 0.5) + (P === L ? O + Y : 0), scissorY: T + ue + ce * te.y[0], scissorHeight: F, viewportX: Q - Y + he * te.x[0], viewportY: ue + ce * te.y[0], viewportWidth: ee, viewportHeight: X }, $);
        }
        function C(D) {
          var L = 2047, E = Math.max(0, Math.floor(D[0] * L), 0), P = Math.min(L, Math.ceil(D[1] * L), L);
          return [Math.min(E, P), Math.max(E, P)];
        }
        o.exports = function(D, L) {
          var E, P, I, M, O, T = L.context, z = L.pick, F = L.regl, U = F._gl, V = U.getParameter(U.ALIASED_LINE_WIDTH_RANGE), $ = Math.max(V[0], Math.min(V[1], L.viewModel.plotGlPixelRatio)), q = { currentRafs: {}, drawCompleted: !0, clearOnly: !1 }, K = function(X) {
            for (var Q = {}, ue = 0; ue <= i; ue += 4) Q[S(ue)] = X.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) });
            return Q;
          }(F), re = F.texture(f), Y = [];
          ee(L);
          var te = F({ profile: !1, blend: { enable: T, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: 1, dstAlpha: 1 }, equation: { rgb: "add", alpha: "add" }, color: [0, 0, 0, 0] }, depth: { enable: !T, mask: !0, func: "less", range: [0, 1] }, cull: { enable: !0, face: "back" }, scissor: { enable: !0, box: { x: F.prop("scissorX"), y: F.prop("scissorY"), width: F.prop("scissorWidth"), height: F.prop("scissorHeight") } }, viewport: { x: F.prop("viewportX"), y: F.prop("viewportY"), width: F.prop("viewportWidth"), height: F.prop("viewportHeight") }, dither: !1, vert: l, frag: u, primitive: "lines", lineWidth: $, attributes: K, uniforms: { resolution: F.prop("resolution"), viewBoxPos: F.prop("viewBoxPos"), viewBoxSize: F.prop("viewBoxSize"), dim0A: F.prop("dim0A"), dim1A: F.prop("dim1A"), dim0B: F.prop("dim0B"), dim1B: F.prop("dim1B"), dim0C: F.prop("dim0C"), dim1C: F.prop("dim1C"), dim0D: F.prop("dim0D"), dim1D: F.prop("dim1D"), loA: F.prop("loA"), hiA: F.prop("hiA"), loB: F.prop("loB"), hiB: F.prop("hiB"), loC: F.prop("loC"), hiC: F.prop("hiC"), loD: F.prop("loD"), hiD: F.prop("hiD"), palette: re, contextColor: F.prop("contextColor"), maskTexture: F.prop("maskTexture"), drwLayer: F.prop("drwLayer"), maskHeight: F.prop("maskHeight") }, offset: F.prop("offset"), count: F.prop("count") });
          function ee(X) {
            E = X.model, P = X.viewModel, I = P.dimensions.slice(), M = I[0] ? I[0].values.length : 0;
            var Q = E.lines, ue = z ? Q.color.map(function(he, de) {
              return de / Q.color.length;
            }) : Q.color, ce = function(he, de, ne) {
              for (var ae, se = new Array(he * (i + 4)), me = 0, ye = 0; ye < he; ye++) {
                for (var pe = 0; pe < i; pe++) se[me++] = pe < de.length ? de[pe].paddedUnitValues[ye] : 0.5;
                se[me++] = x(ye, 2), se[me++] = x(ye, 1), se[me++] = x(ye, 0), se[me++] = (ae = ne[ye], Math.max(p, Math.min(0.999999, ae)));
              }
              return se;
            }(M, I, ue);
            (function(he, de, ne) {
              for (var ae = 0; ae <= i; ae += 4) he[S(ae)](w(ae / 4, de, ne));
            })(K, M, ce), T || z || (re = F.texture(h.extendFlat({ data: m(E.unitToColor, 255) }, f)));
          }
          return { render: function(X, Q, ue) {
            var ce, he, de, ne = X.length, ae = 1 / 0, se = -1 / 0;
            for (ce = 0; ce < ne; ce++) X[ce].dim0.canvasX < ae && (ae = X[ce].dim0.canvasX, he = ce), X[ce].dim1.canvasX > se && (se = X[ce].dim1.canvasX, de = ce);
            ne === 0 && c(F, 0, 0, E.canvasWidth, E.canvasHeight);
            var me = function(Ee) {
              var Ne, Ie, ge, Ce = [[], []];
              for (ge = 0; ge < 64; ge++) {
                var we = !Ee && ge < I.length ? I[ge].brush.filter.getBounds() : [-1 / 0, 1 / 0];
                Ce[0][ge] = we[0], Ce[1][ge] = we[1];
              }
              var Ge = new Array(16384);
              for (Ne = 0; Ne < 16384; Ne++) Ge[Ne] = 255;
              if (!Ee) for (Ne = 0; Ne < I.length; Ne++) {
                var Re = Ne % 8, je = (Ne - Re) / 8, Ke = Math.pow(2, Re), tt = I[Ne].brush.filter.get();
                if (!(tt.length < 2)) {
                  var _e = C(tt[0])[1];
                  for (Ie = 1; Ie < tt.length; Ie++) {
                    var Be = C(tt[Ie]);
                    for (ge = _e + 1; ge < Be[0]; ge++) Ge[8 * ge + je] &= ~Ke;
                    _e = Math.max(_e, Be[1]);
                  }
                }
              }
              var $e = { shape: [8, 2048], format: "alpha", type: "uint8", mag: "nearest", min: "nearest", data: Ge };
              return O ? O($e) : O = F.texture($e), { maskTexture: O, maskHeight: 2048, loA: Ce[0].slice(0, 16), loB: Ce[0].slice(16, 32), loC: Ce[0].slice(32, 48), loD: Ce[0].slice(48, 64), hiA: Ce[1].slice(0, 16), hiB: Ce[1].slice(16, 32), hiC: Ce[1].slice(32, 48), hiD: Ce[1].slice(48, 64) };
            }(T);
            for (ce = 0; ce < ne; ce++) {
              var ye = X[ce], pe = ye.dim0.crossfilterDimensionIndex, be = ye.dim1.crossfilterDimensionIndex, Ae = ye.canvasX, Se = ye.canvasY, Me = Ae + ye.panelSizeX, De = ye.plotGlPixelRatio;
              if (Q || !Y[pe] || Y[pe][0] !== Ae || Y[pe][1] !== Me) {
                Y[pe] = [Ae, Me];
                var Le = A(E, he, de, ce, pe, be, Ae, Se, ye.panelSizeX, ye.panelSizeY, ye.dim0.crossfilterDimensionIndex, T ? 0 : z ? 2 : 1, me, De);
                q.clearOnly = ue;
                var We = Q ? E.lines.blockLineCount : M;
                g(F, te, q, We, M, Le);
              }
            }
          }, readPixel: function(X, Q) {
            return F.read({ x: X, y: Q, width: 1, height: 1, data: d }), d;
          }, readPixels: function(X, Q, ue, ce) {
            var he = new Uint8Array(4 * ue * ce);
            return F.read({ x: X, y: Q, width: ue, height: ce, data: he }), he;
          }, destroy: function() {
            for (var X in D.style["pointer-events"] = "none", re.destroy(), O && O.destroy(), K) K[X].destroy();
          }, update: ee };
        };
      }, 63197: function(o) {
        o.exports = function(s, n, l, u) {
          var i, h;
          for (u || (u = 1 / 0), i = 0; i < n.length; i++) (h = n[i]).visible && (u = Math.min(u, h[l].length));
          for (u === 1 / 0 && (u = 0), s._length = u, i = 0; i < n.length; i++) (h = n[i]).visible && (h._length = u);
          return u;
        };
      }, 16019: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.isArrayOrTypedArray, h = u.numberFormat, p = n(16401), _ = n(29714), d = u.strRotate, f = u.strTranslate, c = n(30635), g = n(62203), m = n(88856), x = n(71293), w = x.keyFun, k = x.repeat, S = x.unwrap, A = n(62935), C = n(77911), D = n(23245), L = n(1293);
        function E(te, ee, X) {
          return u.aggNums(te, null, ee, X);
        }
        function P(te, ee) {
          return M(E(Math.min, te, ee), E(Math.max, te, ee));
        }
        function I(te) {
          var ee = te.range;
          return ee ? M(ee[0], ee[1]) : P(te.values, te._length);
        }
        function M(te, ee) {
          return !isNaN(te) && isFinite(te) || (te = 0), !isNaN(ee) && isFinite(ee) || (ee = 0), te === ee && (te === 0 ? (te -= 1, ee += 1) : (te *= 0.9, ee *= 1.1)), [te, ee];
        }
        function O(te, ee, X, Q, ue) {
          var ce, he, de = I(X);
          return Q ? l.scale.ordinal().domain(Q.map((ce = h(X.tickformat), he = ue, he ? function(ne, ae) {
            var se = he[ae];
            return se ?? ce(ne);
          } : ce))).range(Q.map(function(ne) {
            var ae = (ne - de[0]) / (de[1] - de[0]);
            return te - ee + ae * (2 * ee - te);
          })) : l.scale.linear().domain(de).range([te - ee, ee]);
        }
        function T(te) {
          if (te.tickvals) {
            var ee = I(te);
            return l.scale.ordinal().domain(te.tickvals).range(te.tickvals.map(function(X) {
              return (X - ee[0]) / (ee[1] - ee[0]);
            }));
          }
        }
        function z(te) {
          var ee = te.map(function(ue) {
            return ue[0];
          }), X = te.map(function(ue) {
            var ce = p(ue[1]);
            return l.rgb("rgb(" + ce[0] + "," + ce[1] + "," + ce[2] + ")");
          }), Q = "rgb".split("").map(function(ue) {
            return l.scale.linear().clamp(!0).domain(ee).range(X.map((ce = ue, function(he) {
              return he[ce];
            })));
            var ce;
          });
          return function(ue) {
            return Q.map(function(ce) {
              return ce(ue);
            });
          };
        }
        function F(te) {
          return te.dimensions.some(function(ee) {
            return ee.brush.filterSpecified;
          });
        }
        function U(te, ee, X) {
          var Q = S(ee), ue = Q.trace, ce = A.convertTypedArray(Q.lineColor), he = ue.line, de = { color: p(ue.unselected.line.color), opacity: ue.unselected.line.opacity }, ne = m.extractOpts(he), ae = ne.reversescale ? m.flipScale(Q.cscale) : Q.cscale, se = ue.domain, me = ue.dimensions, ye = te.width, pe = ue.labelangle, be = ue.labelside, Ae = ue.labelfont, Se = ue.tickfont, Me = ue.rangefont, De = u.extendDeepNoArrays({}, he, { color: ce.map(l.scale.linear().domain(I({ values: ce, range: [ne.min, ne.max], _length: ue._length }))), blockLineCount: C.blockLineCount, canvasOverdrag: C.overdrag * C.canvasPixelRatio }), Le = Math.floor(ye * (se.x[1] - se.x[0])), We = Math.floor(te.height * (se.y[1] - se.y[0])), Ee = te.margin || { l: 80, r: 80, t: 100, b: 80 }, Ne = Le, Ie = We;
          return { key: X, colCount: me.filter(A.isVisible).length, dimensions: me, tickDistance: C.tickDistance, unitToColor: z(ae), lines: De, deselectedLines: de, labelAngle: pe, labelSide: be, labelFont: Ae, tickFont: Se, rangeFont: Me, layoutWidth: ye, layoutHeight: te.height, domain: se, translateX: se.x[0] * ye, translateY: te.height - se.y[1] * te.height, pad: Ee, canvasWidth: Ne * C.canvasPixelRatio + 2 * De.canvasOverdrag, canvasHeight: Ie * C.canvasPixelRatio, width: Ne, height: Ie, canvasPixelRatio: C.canvasPixelRatio };
        }
        function V(te, ee, X) {
          var Q = X.width, ue = X.height, ce = X.dimensions, he = X.canvasPixelRatio, de = function(ye) {
            return Q * ye / Math.max(1, X.colCount - 1);
          }, ne = C.verticalPadding / ue, ae = function(ye, pe) {
            return l.scale.linear().range([pe, ye - pe]);
          }(ue, C.verticalPadding), se = { key: X.key, xScale: de, model: X, inBrushDrag: !1 }, me = {};
          return se.dimensions = ce.filter(A.isVisible).map(function(ye, pe) {
            var be = function(Re, je) {
              return l.scale.linear().domain(I(Re)).range([je, 1 - je]);
            }(ye, ne), Ae = me[ye.label];
            me[ye.label] = (Ae || 0) + 1;
            var Se = ye.label + (Ae ? "__" + Ae : ""), Me = ye.constraintrange, De = Me && Me.length;
            De && !i(Me[0]) && (Me = [Me]);
            var Le = De ? Me.map(function(Re) {
              return Re.map(be);
            }) : [[-1 / 0, 1 / 0]], We = ye.values;
            We.length > ye._length && (We = We.slice(0, ye._length));
            var Ee, Ne = ye.tickvals;
            function Ie(Re, je) {
              return { val: Re, text: Ee[je] };
            }
            function ge(Re, je) {
              return Re.val - je.val;
            }
            if (i(Ne) && Ne.length) {
              u.isTypedArray(Ne) && (Ne = Array.from(Ne)), Ee = ye.ticktext, i(Ee) && Ee.length ? Ee.length > Ne.length ? Ee = Ee.slice(0, Ne.length) : Ne.length > Ee.length && (Ne = Ne.slice(0, Ee.length)) : Ee = Ne.map(h(ye.tickformat));
              for (var Ce = 1; Ce < Ne.length; Ce++) if (Ne[Ce] < Ne[Ce - 1]) {
                for (var we = Ne.map(Ie).sort(ge), Ge = 0; Ge < Ne.length; Ge++) Ne[Ge] = we[Ge].val, Ee[Ge] = we[Ge].text;
                break;
              }
            } else Ne = void 0;
            return We = A.convertTypedArray(We), { key: Se, label: ye.label, tickFormat: ye.tickformat, tickvals: Ne, ticktext: Ee, ordinal: A.isOrdinal(ye), multiselect: ye.multiselect, xIndex: pe, crossfilterDimensionIndex: pe, visibleIndex: ye._index, height: ue, values: We, paddedUnitValues: We.map(be), unitTickvals: Ne && Ne.map(be), xScale: de, x: de(pe), canvasX: de(pe) * he, unitToPaddedPx: ae, domainScale: O(ue, C.verticalPadding, ye, Ne, Ee), ordinalScale: T(ye), parent: se, model: X, brush: D.makeBrush(te, De, Le, function() {
              te.linePickActive(!1);
            }, function() {
              var Re = se;
              Re.focusLayer && Re.focusLayer.render(Re.panels, !0);
              var je = F(Re);
              !te.contextShown() && je ? (Re.contextLayer && Re.contextLayer.render(Re.panels, !0), te.contextShown(!0)) : te.contextShown() && !je && (Re.contextLayer && Re.contextLayer.render(Re.panels, !0, !0), te.contextShown(!1));
            }, function(Re) {
              if (se.focusLayer.render(se.panels, !0), se.pickLayer && se.pickLayer.render(se.panels, !0), te.linePickActive(!0), ee && ee.filterChanged) {
                var je = be.invert, Ke = Re.map(function(tt) {
                  return tt.map(je).sort(u.sorterAsc);
                }).sort(function(tt, _e) {
                  return tt[0] - _e[0];
                });
                ee.filterChanged(se.key, ye._index, Ke);
              }
            }) };
          }), se;
        }
        function $(te) {
          te.classed(C.cn.axisExtentText, !0).attr("text-anchor", "middle").style("cursor", "default");
        }
        function q(te, ee) {
          var X = ee === "top" ? 1 : -1, Q = te * Math.PI / 180;
          return { dir: X, dx: Math.sin(Q), dy: Math.cos(Q), degrees: te };
        }
        function K(te, ee, X) {
          for (var Q = ee.panels || (ee.panels = []), ue = te.data(), ce = 0; ce < ue.length - 1; ce++) {
            var he = Q[ce] || (Q[ce] = {}), de = ue[ce], ne = ue[ce + 1];
            he.dim0 = de, he.dim1 = ne, he.canvasX = de.canvasX, he.panelSizeX = ne.canvasX - de.canvasX, he.panelSizeY = ee.model.canvasHeight, he.y = 0, he.canvasY = 0, he.plotGlPixelRatio = X;
          }
        }
        function re(te, ee) {
          return _.tickText(te._ax, ee, !1).text;
        }
        function Y(te, ee) {
          if (te.ordinal) return "";
          var X = te.domainScale.domain(), Q = X[ee ? X.length - 1 : 0];
          return re(te.model.dimensions[te.visibleIndex], Q);
        }
        o.exports = function(te, ee, X, Q) {
          var ue = te._context.staticPlot, ce = te._fullLayout, he = ce._toppaper, de = ce._glcontainer, ne = te._context.plotGlPixelRatio, ae = te._fullLayout.paper_bgcolor;
          (function(Re) {
            for (var je = 0; je < Re.length; je++) for (var Ke = 0; Ke < Re[je].length; Ke++) for (var tt = Re[je][Ke].trace, _e = tt.dimensions, Be = 0; Be < _e.length; Be++) {
              var $e = _e[Be].values, Ze = _e[Be]._ax;
              Ze && (Ze.range ? Ze.range = M(Ze.range[0], Ze.range[1]) : Ze.range = P($e, tt._length), Ze.dtick || (Ze.dtick = 0.01 * (Math.abs(Ze.range[1] - Ze.range[0]) || 1)), Ze.tickformat = _e[Be].tickformat, _.calcTicks(Ze), Ze.cleanRange());
            }
          })(ee);
          var se, me, ye = (se = !0, me = !1, { linePickActive: function(Re) {
            return arguments.length ? se = !!Re : se;
          }, contextShown: function(Re) {
            return arguments.length ? me = !!Re : me;
          } }), pe = ee.filter(function(Re) {
            return S(Re).trace.visible;
          }).map(U.bind(0, X)).map(V.bind(0, ye, Q));
          de.each(function(Re, je) {
            return u.extendFlat(Re, pe[je]);
          });
          var be = de.selectAll(".gl-canvas").each(function(Re) {
            Re.viewModel = pe[0], Re.viewModel.plotGlPixelRatio = ne, Re.viewModel.paperColor = ae, Re.model = Re.viewModel ? Re.viewModel.model : null;
          }), Ae = null;
          be.filter(function(Re) {
            return Re.pick;
          }).style("pointer-events", ue ? "none" : "auto").on("mousemove", function(Re) {
            if (ye.linePickActive() && Re.lineLayer && Q && Q.hover) {
              var je = l.event, Ke = this.width, tt = this.height, _e = l.mouse(this), Be = _e[0], $e = _e[1];
              if (Be < 0 || $e < 0 || Be >= Ke || $e >= tt) return;
              var Ze = Re.lineLayer.readPixel(Be, tt - 1 - $e), ct = Ze[3] !== 0, ft = ct ? Ze[2] + 256 * (Ze[1] + 256 * Ze[0]) : null, _t = { x: Be, y: $e, clientX: je.clientX, clientY: je.clientY, dataIndex: Re.model.key, curveNumber: ft };
              ft !== Ae && (ct ? Q.hover(_t) : Q.unhover && Q.unhover(_t), Ae = ft);
            }
          }), be.style("opacity", function(Re) {
            return Re.pick ? 0 : 1;
          }), he.style("background", "rgba(255, 255, 255, 0)");
          var Se = he.selectAll("." + C.cn.parcoords).data(pe, w);
          Se.exit().remove(), Se.enter().append("g").classed(C.cn.parcoords, !0).style("shape-rendering", "crispEdges").style("pointer-events", "none"), Se.attr("transform", function(Re) {
            return f(Re.model.translateX, Re.model.translateY);
          });
          var Me = Se.selectAll("." + C.cn.parcoordsControlView).data(k, w);
          Me.enter().append("g").classed(C.cn.parcoordsControlView, !0), Me.attr("transform", function(Re) {
            return f(Re.model.pad.l, Re.model.pad.t);
          });
          var De = Me.selectAll("." + C.cn.yAxis).data(function(Re) {
            return Re.dimensions;
          }, w);
          De.enter().append("g").classed(C.cn.yAxis, !0), Me.each(function(Re) {
            K(De, Re, ne);
          }), be.each(function(Re) {
            if (Re.viewModel) {
              !Re.lineLayer || Q ? Re.lineLayer = L(this, Re) : Re.lineLayer.update(Re), (Re.key || Re.key === 0) && (Re.viewModel[Re.key] = Re.lineLayer);
              var je = !Re.context || Q;
              Re.lineLayer.render(Re.viewModel.panels, je);
            }
          }), De.attr("transform", function(Re) {
            return f(Re.xScale(Re.xIndex), 0);
          }), De.call(l.behavior.drag().origin(function(Re) {
            return Re;
          }).on("drag", function(Re) {
            var je = Re.parent;
            ye.linePickActive(!1), Re.x = Math.max(-C.overdrag, Math.min(Re.model.width + C.overdrag, l.event.x)), Re.canvasX = Re.x * Re.model.canvasPixelRatio, De.sort(function(Ke, tt) {
              return Ke.x - tt.x;
            }).each(function(Ke, tt) {
              Ke.xIndex = tt, Ke.x = Re === Ke ? Ke.x : Ke.xScale(Ke.xIndex), Ke.canvasX = Ke.x * Ke.model.canvasPixelRatio;
            }), K(De, je, ne), De.filter(function(Ke) {
              return Math.abs(Re.xIndex - Ke.xIndex) !== 0;
            }).attr("transform", function(Ke) {
              return f(Ke.xScale(Ke.xIndex), 0);
            }), l.select(this).attr("transform", f(Re.x, 0)), De.each(function(Ke, tt, _e) {
              _e === Re.parent.key && (je.dimensions[tt] = Ke);
            }), je.contextLayer && je.contextLayer.render(je.panels, !1, !F(je)), je.focusLayer.render && je.focusLayer.render(je.panels);
          }).on("dragend", function(Re) {
            var je = Re.parent;
            Re.x = Re.xScale(Re.xIndex), Re.canvasX = Re.x * Re.model.canvasPixelRatio, K(De, je, ne), l.select(this).attr("transform", function(Ke) {
              return f(Ke.x, 0);
            }), je.contextLayer && je.contextLayer.render(je.panels, !1, !F(je)), je.focusLayer && je.focusLayer.render(je.panels), je.pickLayer && je.pickLayer.render(je.panels, !0), ye.linePickActive(!0), Q && Q.axesMoved && Q.axesMoved(je.key, je.dimensions.map(function(Ke) {
              return Ke.crossfilterDimensionIndex;
            }));
          })), De.exit().remove();
          var Le = De.selectAll("." + C.cn.axisOverlays).data(k, w);
          Le.enter().append("g").classed(C.cn.axisOverlays, !0), Le.selectAll("." + C.cn.axis).remove();
          var We = Le.selectAll("." + C.cn.axis).data(k, w);
          We.enter().append("g").classed(C.cn.axis, !0), We.each(function(Re) {
            var je = Re.model.height / Re.model.tickDistance, Ke = Re.domainScale, tt = Ke.domain();
            l.select(this).call(l.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(je, Re.tickFormat).tickValues(Re.ordinal ? tt : null).tickFormat(function(_e) {
              return A.isOrdinal(Re) ? _e : re(Re.model.dimensions[Re.visibleIndex], _e);
            }).scale(Ke)), g.font(We.selectAll("text"), Re.model.tickFont);
          }), We.selectAll(".domain, .tick>line").attr("fill", "none").attr("stroke", "black").attr("stroke-opacity", 0.25).attr("stroke-width", "1px"), We.selectAll("text").style("cursor", "default");
          var Ee = Le.selectAll("." + C.cn.axisHeading).data(k, w);
          Ee.enter().append("g").classed(C.cn.axisHeading, !0);
          var Ne = Ee.selectAll("." + C.cn.axisTitle).data(k, w);
          Ne.enter().append("text").classed(C.cn.axisTitle, !0).attr("text-anchor", "middle").style("cursor", "ew-resize").style("pointer-events", ue ? "none" : "auto"), Ne.text(function(Re) {
            return Re.label;
          }).each(function(Re) {
            var je = l.select(this);
            g.font(je, Re.model.labelFont), c.convertToTspans(je, te);
          }).attr("transform", function(Re) {
            var je = q(Re.model.labelAngle, Re.model.labelSide), Ke = C.axisTitleOffset;
            return (je.dir > 0 ? "" : f(0, 2 * Ke + Re.model.height)) + d(je.degrees) + f(-Ke * je.dx, -Ke * je.dy);
          }).attr("text-anchor", function(Re) {
            var je = q(Re.model.labelAngle, Re.model.labelSide);
            return 2 * Math.abs(je.dx) > Math.abs(je.dy) ? je.dir * je.dx < 0 ? "start" : "end" : "middle";
          });
          var Ie = Le.selectAll("." + C.cn.axisExtent).data(k, w);
          Ie.enter().append("g").classed(C.cn.axisExtent, !0);
          var ge = Ie.selectAll("." + C.cn.axisExtentTop).data(k, w);
          ge.enter().append("g").classed(C.cn.axisExtentTop, !0), ge.attr("transform", f(0, -C.axisExtentOffset));
          var Ce = ge.selectAll("." + C.cn.axisExtentTopText).data(k, w);
          Ce.enter().append("text").classed(C.cn.axisExtentTopText, !0).call($), Ce.text(function(Re) {
            return Y(Re, !0);
          }).each(function(Re) {
            g.font(l.select(this), Re.model.rangeFont);
          });
          var we = Ie.selectAll("." + C.cn.axisExtentBottom).data(k, w);
          we.enter().append("g").classed(C.cn.axisExtentBottom, !0), we.attr("transform", function(Re) {
            return f(0, Re.model.height + C.axisExtentOffset);
          });
          var Ge = we.selectAll("." + C.cn.axisExtentBottomText).data(k, w);
          Ge.enter().append("text").classed(C.cn.axisExtentBottomText, !0).attr("dy", "0.75em").call($), Ge.text(function(Re) {
            return Y(Re, !1);
          }).each(function(Re) {
            g.font(l.select(this), Re.model.rangeFont);
          }), D.ensureAxisBrush(Le, ae, te);
        };
      }, 58823: function(o, s, n) {
        var l = n(16019), u = n(22459), i = n(62935).isVisible, h = {};
        function p(_, d, f) {
          var c = d.indexOf(f), g = _.indexOf(c);
          return g === -1 && (g += d.length), g;
        }
        (o.exports = function(_, d) {
          var f = _._fullLayout;
          if (u(_, [], h)) {
            var c = {}, g = {}, m = {}, x = {}, w = f._size;
            d.forEach(function(k, S) {
              var A = k[0].trace;
              m[S] = A.index;
              var C = x[S] = A._fullInput.index;
              c[S] = _.data[C].dimensions, g[S] = _.data[C].dimensions.slice();
            }), l(_, d, { width: w.w, height: w.h, margin: { t: w.t, r: w.r, b: w.b, l: w.l } }, { filterChanged: function(k, S, A) {
              var C = g[k][S], D = A.map(function(O) {
                return O.slice();
              }), L = "dimensions[" + S + "].constraintrange", E = f._tracePreGUI[_._fullData[m[k]]._fullInput.uid];
              if (E[L] === void 0) {
                var P = C.constraintrange;
                E[L] = P || null;
              }
              var I = _._fullData[m[k]].dimensions[S];
              D.length ? (D.length === 1 && (D = D[0]), C.constraintrange = D, I.constraintrange = D.slice(), D = [D]) : (delete C.constraintrange, delete I.constraintrange, D = null);
              var M = {};
              M[L] = D, _.emit("plotly_restyle", [M, [x[k]]]);
            }, hover: function(k) {
              _.emit("plotly_hover", k);
            }, unhover: function(k) {
              _.emit("plotly_unhover", k);
            }, axesMoved: function(k, S) {
              var A = /* @__PURE__ */ function(C, D) {
                return function(L, E) {
                  return p(C, D, L) - p(C, D, E);
                };
              }(S, g[k].filter(i));
              c[k].sort(A), g[k].filter(function(C) {
                return !i(C);
              }).sort(function(C) {
                return g[k].indexOf(C);
              }).forEach(function(C) {
                c[k].splice(c[k].indexOf(C), 1), c[k].splice(g[k].indexOf(C), 0, C);
              }), _.emit("plotly_restyle", [{ dimensions: [c[k]] }, [x[k]]]);
            } });
          }
        }).reglPrecompiled = h;
      }, 55412: function(o, s, n) {
        var l = n(9829), u = n(13792).u, i = n(80337), h = n(10229), p = n(3208).rb, _ = n(3208).ay, d = n(93049).extendFlat, f = n(94850).k, c = i({ editType: "plot", arrayOk: !0, colorEditType: "plot" });
        o.exports = { labels: { valType: "data_array", editType: "calc" }, label0: { valType: "number", dflt: 0, editType: "calc" }, dlabel: { valType: "number", dflt: 1, editType: "calc" }, values: { valType: "data_array", editType: "calc" }, marker: { colors: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: h.defaultLine, arrayOk: !0, editType: "style" }, width: { valType: "number", min: 0, dflt: 0, arrayOk: !0, editType: "style" }, editType: "calc" }, pattern: f, editType: "calc" }, text: { valType: "data_array", editType: "plot" }, hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "style" }, scalegroup: { valType: "string", dflt: "", editType: "calc" }, textinfo: { valType: "flaglist", flags: ["label", "text", "value", "percent"], extras: ["none"], editType: "calc" }, hoverinfo: d({}, l.hoverinfo, { flags: ["label", "text", "value", "percent", "name"] }), hovertemplate: p({}, { keys: ["label", "color", "value", "percent", "text"] }), texttemplate: _({ editType: "plot" }, { keys: ["label", "color", "value", "percent", "text"] }), textposition: { valType: "enumerated", values: ["inside", "outside", "auto", "none"], dflt: "auto", arrayOk: !0, editType: "plot" }, textfont: d({}, c, {}), insidetextorientation: { valType: "enumerated", values: ["horizontal", "radial", "tangential", "auto"], dflt: "auto", editType: "plot" }, insidetextfont: d({}, c, {}), outsidetextfont: d({}, c, {}), automargin: { valType: "boolean", dflt: !1, editType: "plot" }, title: { text: { valType: "string", dflt: "", editType: "plot" }, font: d({}, c, {}), position: { valType: "enumerated", values: ["top left", "top center", "top right", "middle center", "bottom left", "bottom center", "bottom right"], editType: "plot" }, editType: "plot" }, domain: u({ name: "pie", trace: !0, editType: "calc" }), hole: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" }, sort: { valType: "boolean", dflt: !0, editType: "calc" }, direction: { valType: "enumerated", values: ["clockwise", "counterclockwise"], dflt: "counterclockwise", editType: "calc" }, rotation: { valType: "angle", dflt: 0, editType: "calc" }, pull: { valType: "number", min: 0, max: 1, dflt: 0, arrayOk: !0, editType: "calc" }, _deprecated: { title: { valType: "string", dflt: "", editType: "calc" }, titlefont: d({}, c, {}), titleposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle center", "bottom left", "bottom center", "bottom right"], editType: "calc" } } };
      }, 96052: function(o, s, n) {
        var l = n(44122);
        s.name = "pie", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 44148: function(o, s, n) {
        var l = n(10721), u = n(65657), i = n(78766), h = {};
        function p(d) {
          return function(f, c) {
            return !!f && !!(f = u(f)).isValid() && (f = i.addOpacity(f, f.getAlpha()), d[c] || (d[c] = f), f);
          };
        }
        function _(d, f) {
          var c, g = JSON.stringify(d), m = f[g];
          if (!m) {
            for (m = d.slice(), c = 0; c < d.length; c++) m.push(u(d[c]).lighten(20).toHexString());
            for (c = 0; c < d.length; c++) m.push(u(d[c]).darken(20).toHexString());
            f[g] = m;
          }
          return m;
        }
        o.exports = { calc: function(d, f) {
          var c, g, m = [], x = d._fullLayout, w = x.hiddenlabels || [], k = f.labels, S = f.marker.colors || [], A = f.values, C = f._length, D = f._hasValues && C;
          if (f.dlabel) for (k = new Array(C), c = 0; c < C; c++) k[c] = String(f.label0 + c * f.dlabel);
          var L = {}, E = p(x["_" + f.type + "colormap"]), P = 0, I = !1;
          for (c = 0; c < C; c++) {
            var M, O, T;
            if (D) {
              if (M = A[c], !l(M)) continue;
              M = +M;
            } else M = 1;
            (O = k[c]) !== void 0 && O !== "" || (O = c);
            var z = L[O = String(O)];
            z === void 0 ? (L[O] = m.length, (T = w.indexOf(O) !== -1) || (P += M), m.push({ v: M, label: O, color: E(S[c], O), i: c, pts: [c], hidden: T })) : (I = !0, (g = m[z]).v += M, g.pts.push(c), g.hidden || (P += M), g.color === !1 && S[c] && (g.color = E(S[c], O)));
          }
          return m = m.filter(function(F) {
            return F.v >= 0;
          }), (f.type === "funnelarea" ? I : f.sort) && m.sort(function(F, U) {
            return U.v - F.v;
          }), m[0] && (m[0].vTotal = P), m;
        }, crossTraceCalc: function(d, f) {
          var c = (f || {}).type;
          c || (c = "pie");
          var g = d._fullLayout, m = d.calcdata, x = g[c + "colorway"], w = g["_" + c + "colormap"];
          g["extend" + c + "colors"] && (x = _(x, h));
          for (var k = 0, S = 0; S < m.length; S++) {
            var A = m[S];
            if (A[0].trace.type === c) for (var C = 0; C < A.length; C++) {
              var D = A[C];
              D.color === !1 && (w[D.label] ? D.color = w[D.label] : (w[D.label] = D.color = x[k % x.length], k++));
            }
          }
        }, makePullColorFn: p, generateExtendedColors: _ };
      }, 46979: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(55412), h = n(13792).N, p = n(17550).handleText, _ = n(34809).coercePattern;
        function d(c, g) {
          var m = u.isArrayOrTypedArray(c), x = u.isArrayOrTypedArray(g), w = Math.min(m ? c.length : 1 / 0, x ? g.length : 1 / 0);
          if (isFinite(w) || (w = 0), w && x) {
            for (var k, S = 0; S < w; S++) {
              var A = g[S];
              if (l(A) && A > 0) {
                k = !0;
                break;
              }
            }
            k || (w = 0);
          }
          return { hasLabels: m, hasValues: x, len: w };
        }
        function f(c, g, m, x, w) {
          x("marker.line.width") && x("marker.line.color", w ? void 0 : m.paper_bgcolor);
          var k = x("marker.colors");
          _(x, "marker.pattern", k), c.marker && !g.marker.pattern.fgcolor && (g.marker.pattern.fgcolor = c.marker.colors), g.marker.pattern.bgcolor || (g.marker.pattern.bgcolor = m.paper_bgcolor);
        }
        o.exports = { handleLabelsAndValues: d, handleMarkerDefaults: f, supplyDefaults: function(c, g, m, x) {
          function w(I, M) {
            return u.coerce(c, g, i, I, M);
          }
          var k = d(w("labels"), w("values")), S = k.len;
          if (g._hasLabels = k.hasLabels, g._hasValues = k.hasValues, !g._hasLabels && g._hasValues && (w("label0"), w("dlabel")), S) {
            g._length = S, f(c, g, x, w, !0), w("scalegroup");
            var A, C = w("text"), D = w("texttemplate");
            if (D || (A = w("textinfo", u.isArrayOrTypedArray(C) ? "text+percent" : "percent")), w("hovertext"), w("hovertemplate"), D || A && A !== "none") {
              var L = w("textposition");
              p(c, g, x, w, L, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), (Array.isArray(L) || L === "auto" || L === "outside") && w("automargin"), (L === "inside" || L === "auto" || Array.isArray(L)) && w("insidetextorientation");
            } else A === "none" && w("textposition", "none");
            h(g, x, w);
            var E = w("hole");
            if (w("title.text")) {
              var P = w("title.position", E ? "middle center" : "top center");
              E || P !== "middle center" || (g.title.position = "top center"), u.coerceFont(w, "title.font", x.font);
            }
            w("sort"), w("direction"), w("rotation"), w("pull");
          } else g.visible = !1;
        } };
      }, 50568: function(o, s, n) {
        var l = n(36040).appendArrayMultiPointValues;
        o.exports = function(u, i) {
          var h = { curveNumber: i.index, pointNumbers: u.pts, data: i._input, fullData: i, label: u.label, color: u.color, value: u.v, percent: u.percent, text: u.text, bbox: u.bbox, v: u.v };
          return u.pts.length === 1 && (h.pointNumber = h.i = u.pts[0]), l(h, i, u.pts), i.type === "funnelarea" && (delete h.v, delete h.i), h;
        };
      }, 75067: function(o, s, n) {
        var l = n(62203), u = n(78766);
        o.exports = function(i, h, p, _) {
          var d = p.marker.pattern;
          d && d.shape ? l.pointStyle(i, p, _, h) : u.fill(i, h.color);
        };
      }, 37252: function(o, s, n) {
        var l = n(34809);
        function u(i) {
          return i.indexOf("e") !== -1 ? i.replace(/[.]?0+e/, "e") : i.indexOf(".") !== -1 ? i.replace(/[.]?0+$/, "") : i;
        }
        s.formatPiePercent = function(i, h) {
          var p = u((100 * i).toPrecision(3));
          return l.numSeparate(p, h) + "%";
        }, s.formatPieValue = function(i, h) {
          var p = u(i.toPrecision(10));
          return l.numSeparate(p, h);
        }, s.getFirstFilled = function(i, h) {
          if (l.isArrayOrTypedArray(i)) for (var p = 0; p < h.length; p++) {
            var _ = i[h[p]];
            if (_ || _ === 0 || _ === "") return _;
          }
        }, s.castOption = function(i, h) {
          return l.isArrayOrTypedArray(i) ? s.getFirstFilled(i, h) : i || void 0;
        }, s.getRotationAngle = function(i) {
          return (i === "auto" ? 0 : i) * Math.PI / 180;
        };
      }, 49913: function(o, s, n) {
        o.exports = { attributes: n(55412), supplyDefaults: n(46979).supplyDefaults, supplyLayoutDefaults: n(13464), layoutAttributes: n(4031), calc: n(44148).calc, crossTraceCalc: n(44148).crossTraceCalc, plot: n(35734).plot, style: n(140), styleOne: n(32891), moduleType: "trace", name: "pie", basePlotModule: n(96052), categories: ["pie-like", "pie", "showLegend"], meta: {} };
      }, 4031: function(o) {
        o.exports = { hiddenlabels: { valType: "data_array", editType: "calc" }, piecolorway: { valType: "colorlist", editType: "calc" }, extendpiecolors: { valType: "boolean", dflt: !0, editType: "calc" } };
      }, 13464: function(o, s, n) {
        var l = n(34809), u = n(4031);
        o.exports = function(i, h) {
          function p(_, d) {
            return l.coerce(i, h, u, _, d);
          }
          p("hiddenlabels"), p("piecolorway", h.colorway), p("extendpiecolors");
        };
      }, 35734: function(o, s, n) {
        var l = n(45568), u = n(44122), i = n(32141), h = n(78766), p = n(62203), _ = n(34809), d = _.strScale, f = _.strTranslate, c = n(30635), g = n(84102), m = g.recordMinTextSize, x = g.clearMinTextSize, w = n(56155).TEXTPAD, k = n(37252), S = n(50568), A = n(34809).isValidTextValue;
        function C(te, ee, X) {
          var Q = X[0], ue = Q.cx, ce = Q.cy, he = Q.trace, de = he.type === "funnelarea";
          "_hasHoverLabel" in he || (he._hasHoverLabel = !1), "_hasHoverEvent" in he || (he._hasHoverEvent = !1), te.on("mouseover", function(ne) {
            var ae = ee._fullLayout, se = ee._fullData[he.index];
            if (!ee._dragging && ae.hovermode !== !1) {
              var me = se.hoverinfo;
              if (Array.isArray(me) && (me = i.castHoverinfo({ hoverinfo: [k.castOption(me, ne.pts)], _module: he._module }, ae, 0)), me === "all" && (me = "label+text+value+percent+name"), se.hovertemplate || me !== "none" && me !== "skip" && me) {
                var ye = ne.rInscribed || 0, pe = ue + ne.pxmid[0] * (1 - ye), be = ce + ne.pxmid[1] * (1 - ye), Ae = ae.separators, Se = [];
                if (me && me.indexOf("label") !== -1 && Se.push(ne.label), ne.text = k.castOption(se.hovertext || se.text, ne.pts), me && me.indexOf("text") !== -1) {
                  var Me = ne.text;
                  _.isValidTextValue(Me) && Se.push(Me);
                }
                ne.value = ne.v, ne.valueLabel = k.formatPieValue(ne.v, Ae), me && me.indexOf("value") !== -1 && Se.push(ne.valueLabel), ne.percent = ne.v / Q.vTotal, ne.percentLabel = k.formatPiePercent(ne.percent, Ae), me && me.indexOf("percent") !== -1 && Se.push(ne.percentLabel);
                var De = se.hoverlabel, Le = De.font, We = [];
                i.loneHover({ trace: he, x0: pe - ye * Q.r, x1: pe + ye * Q.r, y: be, _x0: de ? ue + ne.TL[0] : pe - ye * Q.r, _x1: de ? ue + ne.TR[0] : pe + ye * Q.r, _y0: de ? ce + ne.TL[1] : be - ye * Q.r, _y1: de ? ce + ne.BL[1] : be + ye * Q.r, text: Se.join("<br>"), name: se.hovertemplate || me.indexOf("name") !== -1 ? se.name : void 0, idealAlign: ne.pxmid[0] < 0 ? "left" : "right", color: k.castOption(De.bgcolor, ne.pts) || ne.color, borderColor: k.castOption(De.bordercolor, ne.pts), fontFamily: k.castOption(Le.family, ne.pts), fontSize: k.castOption(Le.size, ne.pts), fontColor: k.castOption(Le.color, ne.pts), nameLength: k.castOption(De.namelength, ne.pts), textAlign: k.castOption(De.align, ne.pts), hovertemplate: k.castOption(se.hovertemplate, ne.pts), hovertemplateLabels: ne, eventData: [S(ne, se)] }, { container: ae._hoverlayer.node(), outerContainer: ae._paper.node(), gd: ee, inOut_bbox: We }), ne.bbox = We[0], he._hasHoverLabel = !0;
              }
              he._hasHoverEvent = !0, ee.emit("plotly_hover", { points: [S(ne, se)], event: l.event });
            }
          }), te.on("mouseout", function(ne) {
            var ae = ee._fullLayout, se = ee._fullData[he.index], me = l.select(this).datum();
            he._hasHoverEvent && (ne.originalEvent = l.event, ee.emit("plotly_unhover", { points: [S(me, se)], event: l.event }), he._hasHoverEvent = !1), he._hasHoverLabel && (i.loneUnhover(ae._hoverlayer.node()), he._hasHoverLabel = !1);
          }), te.on("click", function(ne) {
            var ae = ee._fullLayout, se = ee._fullData[he.index];
            ee._dragging || ae.hovermode === !1 || (ee._hoverdata = [S(ne, se)], i.click(ee, l.event));
          });
        }
        function D(te, ee, X) {
          var Q = k.castOption(te.insidetextfont.color, ee.pts);
          !Q && te._input.textfont && (Q = k.castOption(te._input.textfont.color, ee.pts));
          var ue = k.castOption(te.insidetextfont.family, ee.pts) || k.castOption(te.textfont.family, ee.pts) || X.family, ce = k.castOption(te.insidetextfont.size, ee.pts) || k.castOption(te.textfont.size, ee.pts) || X.size, he = k.castOption(te.insidetextfont.weight, ee.pts) || k.castOption(te.textfont.weight, ee.pts) || X.weight, de = k.castOption(te.insidetextfont.style, ee.pts) || k.castOption(te.textfont.style, ee.pts) || X.style, ne = k.castOption(te.insidetextfont.variant, ee.pts) || k.castOption(te.textfont.variant, ee.pts) || X.variant, ae = k.castOption(te.insidetextfont.textcase, ee.pts) || k.castOption(te.textfont.textcase, ee.pts) || X.textcase, se = k.castOption(te.insidetextfont.lineposition, ee.pts) || k.castOption(te.textfont.lineposition, ee.pts) || X.lineposition, me = k.castOption(te.insidetextfont.shadow, ee.pts) || k.castOption(te.textfont.shadow, ee.pts) || X.shadow;
          return { color: Q || h.contrast(ee.color), family: ue, size: ce, weight: he, style: de, variant: ne, textcase: ae, lineposition: se, shadow: me };
        }
        function L(te, ee) {
          for (var X, Q, ue = 0; ue < te.length; ue++) if ((Q = (X = te[ue][0]).trace).title.text) {
            var ce = Q.title.text;
            Q._meta && (ce = _.templateString(ce, Q._meta));
            var he = p.tester.append("text").attr("data-notex", 1).text(ce).call(p.font, Q.title.font).call(c.convertToTspans, ee), de = p.bBox(he.node(), !0);
            X.titleBox = { width: de.width, height: de.height }, he.remove();
          }
        }
        function E(te, ee, X) {
          var Q = X.r || ee.rpx1, ue = ee.rInscribed;
          if (ee.startangle === ee.stopangle) return { rCenter: 1 - ue, scale: 0, rotate: 0, textPosAngle: 0 };
          var ce, he = ee.ring, de = he === 1 && Math.abs(ee.startangle - ee.stopangle) === 2 * Math.PI, ne = ee.halfangle, ae = ee.midangle, se = X.trace.insidetextorientation, me = se === "horizontal", ye = se === "tangential", pe = se === "radial", be = se === "auto", Ae = [];
          if (!be) {
            var Se, Me = function(Ie, ge) {
              if (function(Re, je) {
                var Ke = Re.startangle, tt = Re.stopangle;
                return Ke > je && je > tt || Ke < je && je < tt;
              }(ee, Ie)) {
                var Ce = Math.abs(Ie - ee.startangle), we = Math.abs(Ie - ee.stopangle), Ge = Ce < we ? Ce : we;
                (ce = ge === "tan" ? I(te, Q, he, Ge, 0) : P(te, Q, he, Ge, Math.PI / 2)).textPosAngle = Ie, Ae.push(ce);
              }
            };
            if (me || ye) {
              for (Se = 4; Se >= -4; Se -= 2) Me(Math.PI * Se, "tan");
              for (Se = 4; Se >= -4; Se -= 2) Me(Math.PI * (Se + 1), "tan");
            }
            if (me || pe) {
              for (Se = 4; Se >= -4; Se -= 2) Me(Math.PI * (Se + 1.5), "rad");
              for (Se = 4; Se >= -4; Se -= 2) Me(Math.PI * (Se + 0.5), "rad");
            }
          }
          if (de || be || me) {
            var De = Math.sqrt(te.width * te.width + te.height * te.height);
            if ((ce = { scale: ue * Q * 2 / De, rCenter: 1 - ue, rotate: 0 }).textPosAngle = (ee.startangle + ee.stopangle) / 2, ce.scale >= 1) return ce;
            Ae.push(ce);
          }
          (be || pe) && ((ce = P(te, Q, he, ne, ae)).textPosAngle = (ee.startangle + ee.stopangle) / 2, Ae.push(ce)), (be || ye) && ((ce = I(te, Q, he, ne, ae)).textPosAngle = (ee.startangle + ee.stopangle) / 2, Ae.push(ce));
          for (var Le = 0, We = 0, Ee = 0; Ee < Ae.length; Ee++) {
            var Ne = Ae[Ee].scale;
            if (We < Ne && (We = Ne, Le = Ee), !be && We >= 1) break;
          }
          return Ae[Le];
        }
        function P(te, ee, X, Q, ue) {
          ee = Math.max(0, ee - 2 * w);
          var ce = te.width / te.height, he = T(ce, Q, ee, X);
          return { scale: 2 * he / te.height, rCenter: M(ce, he / ee), rotate: O(ue) };
        }
        function I(te, ee, X, Q, ue) {
          ee = Math.max(0, ee - 2 * w);
          var ce = te.height / te.width, he = T(ce, Q, ee, X);
          return { scale: 2 * he / te.width, rCenter: M(ce, he / ee), rotate: O(ue + Math.PI / 2) };
        }
        function M(te, ee) {
          return Math.cos(ee) - te * ee;
        }
        function O(te) {
          return (180 / Math.PI * te + 720) % 180 - 90;
        }
        function T(te, ee, X, Q) {
          var ue = te + 1 / (2 * Math.tan(ee));
          return X * Math.min(1 / (Math.sqrt(ue * ue + 0.5) + ue), Q / (Math.sqrt(te * te + Q / 2) + te));
        }
        function z(te, ee) {
          return te.v !== ee.vTotal || ee.trace.hole ? Math.min(1 / (1 + 1 / Math.sin(te.halfangle)), te.ring / 2) : 1;
        }
        function F(te, ee) {
          var X = ee.pxmid[0], Q = ee.pxmid[1], ue = te.width / 2, ce = te.height / 2;
          return X < 0 && (ue *= -1), Q < 0 && (ce *= -1), { scale: 1, rCenter: 1, rotate: 0, x: ue + Math.abs(ce) * (ue > 0 ? 1 : -1) / 2, y: ce / (1 + X * X / (Q * Q)), outside: !0 };
        }
        function U(te, ee) {
          var X, Q, ue, ce = te.trace, he = { x: te.cx, y: te.cy }, de = { tx: 0, ty: 0 };
          de.ty += ce.title.font.size, ue = $(ce), ce.title.position.indexOf("top") !== -1 ? (he.y -= (1 + ue) * te.r, de.ty -= te.titleBox.height) : ce.title.position.indexOf("bottom") !== -1 && (he.y += (1 + ue) * te.r);
          var ne, ae = te.r / ((ne = te.trace.aspectratio) === void 0 ? 1 : ne), se = ee.w * (ce.domain.x[1] - ce.domain.x[0]) / 2;
          return ce.title.position.indexOf("left") !== -1 ? (se += ae, he.x -= (1 + ue) * ae, de.tx += te.titleBox.width / 2) : ce.title.position.indexOf("center") !== -1 ? se *= 2 : ce.title.position.indexOf("right") !== -1 && (se += ae, he.x += (1 + ue) * ae, de.tx -= te.titleBox.width / 2), X = se / te.titleBox.width, Q = V(te, ee) / te.titleBox.height, { x: he.x, y: he.y, scale: Math.min(X, Q), tx: de.tx, ty: de.ty };
        }
        function V(te, ee) {
          var X = te.trace, Q = ee.h * (X.domain.y[1] - X.domain.y[0]);
          return Math.min(te.titleBox.height, Q / 2);
        }
        function $(te) {
          var ee, X = te.pull;
          if (!X) return 0;
          if (_.isArrayOrTypedArray(X)) for (X = 0, ee = 0; ee < te.pull.length; ee++) te.pull[ee] > X && (X = te.pull[ee]);
          return X;
        }
        function q(te, ee) {
          for (var X = [], Q = 0; Q < te.length; Q++) {
            var ue = te[Q][0], ce = ue.trace, he = ce.domain, de = ee.w * (he.x[1] - he.x[0]), ne = ee.h * (he.y[1] - he.y[0]);
            ce.title.text && ce.title.position !== "middle center" && (ne -= V(ue, ee));
            var ae = de / 2, se = ne / 2;
            ce.type !== "funnelarea" || ce.scalegroup || (se /= ce.aspectratio), ue.r = Math.min(ae, se) / (1 + $(ce)), ue.cx = ee.l + ee.w * (ce.domain.x[1] + ce.domain.x[0]) / 2, ue.cy = ee.t + ee.h * (1 - ce.domain.y[0]) - ne / 2, ce.title.text && ce.title.position.indexOf("bottom") !== -1 && (ue.cy -= V(ue, ee)), ce.scalegroup && X.indexOf(ce.scalegroup) === -1 && X.push(ce.scalegroup);
          }
          (function(me, ye) {
            for (var pe, be, Ae, Se = 0; Se < ye.length; Se++) {
              var Me = 1 / 0, De = ye[Se];
              for (be = 0; be < me.length; be++) if ((Ae = (pe = me[be][0]).trace).scalegroup === De) {
                var Le;
                if (Ae.type === "pie") Le = pe.r * pe.r;
                else if (Ae.type === "funnelarea") {
                  var We, Ee;
                  Ae.aspectratio > 1 ? Ee = (We = pe.r) / Ae.aspectratio : We = (Ee = pe.r) * Ae.aspectratio, Le = (We *= (1 + Ae.baseratio) / 2) * Ee;
                }
                Me = Math.min(Me, Le / pe.vTotal);
              }
              for (be = 0; be < me.length; be++) if ((Ae = (pe = me[be][0]).trace).scalegroup === De) {
                var Ne = Me * pe.vTotal;
                Ae.type === "funnelarea" && (Ne /= (1 + Ae.baseratio) / 2, Ne /= Ae.aspectratio), pe.r = Math.sqrt(Ne);
              }
            }
          })(te, X);
        }
        function K(te, ee) {
          return [te * Math.sin(ee), -te * Math.cos(ee)];
        }
        function re(te, ee, X) {
          var Q = te._fullLayout, ue = X.trace, ce = ue.texttemplate, he = ue.textinfo;
          if (!ce && he && he !== "none") {
            var de, ne = he.split("+"), ae = function(Le) {
              return ne.indexOf(Le) !== -1;
            }, se = ae("label"), me = ae("text"), ye = ae("value"), pe = ae("percent"), be = Q.separators;
            if (de = se ? [ee.label] : [], me) {
              var Ae = k.getFirstFilled(ue.text, ee.pts);
              A(Ae) && de.push(Ae);
            }
            ye && de.push(k.formatPieValue(ee.v, be)), pe && de.push(k.formatPiePercent(ee.v / X.vTotal, be)), ee.text = de.join("<br>");
          }
          if (ce) {
            var Se = _.castOption(ue, ee.i, "texttemplate");
            if (Se) {
              var Me = function(Le) {
                return { label: Le.label, value: Le.v, valueLabel: k.formatPieValue(Le.v, Q.separators), percent: Le.v / X.vTotal, percentLabel: k.formatPiePercent(Le.v / X.vTotal, Q.separators), color: Le.color, text: Le.text, customdata: _.castOption(ue, Le.i, "customdata") };
              }(ee), De = k.getFirstFilled(ue.text, ee.pts);
              (A(De) || De === "") && (Me.text = De), ee.text = _.texttemplateString(Se, Me, te._fullLayout._d3locale, Me, ue._meta || {});
            } else ee.text = "";
          }
        }
        function Y(te, ee) {
          var X = te.rotate * Math.PI / 180, Q = Math.cos(X), ue = Math.sin(X), ce = (ee.left + ee.right) / 2, he = (ee.top + ee.bottom) / 2;
          te.textX = ce * Q - he * ue, te.textY = ce * ue + he * Q, te.noCenter = !0;
        }
        o.exports = { plot: function(te, ee) {
          var X = te._context.staticPlot, Q = te._fullLayout, ue = Q._size;
          x("pie", Q), L(ee, te), q(ee, ue);
          var ce = _.makeTraceGroups(Q._pielayer, ee, "trace").each(function(he) {
            var de = l.select(this), ne = he[0], ae = ne.trace;
            (function(se) {
              var me, ye, pe, be = se[0], Ae = be.r, Se = be.trace, Me = k.getRotationAngle(Se.rotation), De = 2 * Math.PI / be.vTotal, Le = "px0", We = "px1";
              if (Se.direction === "counterclockwise") {
                for (me = 0; me < se.length && se[me].hidden; me++) ;
                if (me === se.length) return;
                Me += De * se[me].v, De *= -1, Le = "px1", We = "px0";
              }
              for (pe = K(Ae, Me), me = 0; me < se.length; me++) (ye = se[me]).hidden || (ye[Le] = pe, ye.startangle = Me, Me += De * ye.v / 2, ye.pxmid = K(Ae, Me), ye.midangle = Me, pe = K(Ae, Me += De * ye.v / 2), ye.stopangle = Me, ye[We] = pe, ye.largeArc = ye.v > be.vTotal / 2 ? 1 : 0, ye.halfangle = Math.PI * Math.min(ye.v / be.vTotal, 0.5), ye.ring = 1 - Se.hole, ye.rInscribed = z(ye, be));
            })(he), de.attr("stroke-linejoin", "round"), de.each(function() {
              var se = l.select(this).selectAll("g.slice").data(he);
              se.enter().append("g").classed("slice", !0), se.exit().remove();
              var me = [[[], []], [[], []]], ye = !1;
              se.each(function(We, Ee) {
                if (We.hidden) l.select(this).selectAll("path,g").remove();
                else {
                  We.pointNumber = We.i, We.curveNumber = ae.index, me[We.pxmid[1] < 0 ? 0 : 1][We.pxmid[0] < 0 ? 0 : 1].push(We);
                  var Ne = ne.cx, Ie = ne.cy, ge = l.select(this), Ce = ge.selectAll("path.surface").data([We]);
                  if (Ce.enter().append("path").classed("surface", !0).style({ "pointer-events": X ? "none" : "all" }), ge.call(C, te, he), ae.pull) {
                    var we = +k.castOption(ae.pull, We.pts) || 0;
                    we > 0 && (Ne += we * We.pxmid[0], Ie += we * We.pxmid[1]);
                  }
                  We.cxFinal = Ne, We.cyFinal = Ie;
                  var Ge = ae.hole;
                  if (We.v === ne.vTotal) {
                    var Re = "M" + (Ne + We.px0[0]) + "," + (Ie + We.px0[1]) + Be(We.px0, We.pxmid, !0, 1) + Be(We.pxmid, We.px0, !0, 1) + "Z";
                    Ge ? Ce.attr("d", "M" + (Ne + Ge * We.px0[0]) + "," + (Ie + Ge * We.px0[1]) + Be(We.px0, We.pxmid, !1, Ge) + Be(We.pxmid, We.px0, !1, Ge) + "Z" + Re) : Ce.attr("d", Re);
                  } else {
                    var je = Be(We.px0, We.px1, !0, 1);
                    if (Ge) {
                      var Ke = 1 - Ge;
                      Ce.attr("d", "M" + (Ne + Ge * We.px1[0]) + "," + (Ie + Ge * We.px1[1]) + Be(We.px1, We.px0, !1, Ge) + "l" + Ke * We.px0[0] + "," + Ke * We.px0[1] + je + "Z");
                    } else Ce.attr("d", "M" + Ne + "," + Ie + "l" + We.px0[0] + "," + We.px0[1] + je + "Z");
                  }
                  re(te, We, ne);
                  var tt = k.castOption(ae.textposition, We.pts), _e = ge.selectAll("g.slicetext").data(We.text && tt !== "none" ? [0] : []);
                  _e.enter().append("g").classed("slicetext", !0), _e.exit().remove(), _e.each(function() {
                    var $e = _.ensureSingle(l.select(this), "text", "", function(Gt) {
                      Gt.attr("data-notex", 1);
                    }), Ze = _.ensureUniformFontSize(te, tt === "outside" ? function(Gt, Wt, mt) {
                      return { color: k.castOption(Gt.outsidetextfont.color, Wt.pts) || k.castOption(Gt.textfont.color, Wt.pts) || mt.color, family: k.castOption(Gt.outsidetextfont.family, Wt.pts) || k.castOption(Gt.textfont.family, Wt.pts) || mt.family, size: k.castOption(Gt.outsidetextfont.size, Wt.pts) || k.castOption(Gt.textfont.size, Wt.pts) || mt.size, weight: k.castOption(Gt.outsidetextfont.weight, Wt.pts) || k.castOption(Gt.textfont.weight, Wt.pts) || mt.weight, style: k.castOption(Gt.outsidetextfont.style, Wt.pts) || k.castOption(Gt.textfont.style, Wt.pts) || mt.style, variant: k.castOption(Gt.outsidetextfont.variant, Wt.pts) || k.castOption(Gt.textfont.variant, Wt.pts) || mt.variant, textcase: k.castOption(Gt.outsidetextfont.textcase, Wt.pts) || k.castOption(Gt.textfont.textcase, Wt.pts) || mt.textcase, lineposition: k.castOption(Gt.outsidetextfont.lineposition, Wt.pts) || k.castOption(Gt.textfont.lineposition, Wt.pts) || mt.lineposition, shadow: k.castOption(Gt.outsidetextfont.shadow, Wt.pts) || k.castOption(Gt.textfont.shadow, Wt.pts) || mt.shadow };
                    }(ae, We, Q.font) : D(ae, We, Q.font));
                    $e.text(We.text).attr({ class: "slicetext", transform: "", "text-anchor": "middle" }).call(p.font, Ze).call(c.convertToTspans, te);
                    var ct, ft = p.bBox($e.node());
                    if (tt === "outside") ct = F(ft, We);
                    else if (ct = E(ft, We, ne), tt === "auto" && ct.scale < 1) {
                      var _t = _.ensureUniformFontSize(te, ae.outsidetextfont);
                      $e.call(p.font, _t), ct = F(ft = p.bBox($e.node()), We);
                    }
                    var Pt = ct.textPosAngle, Dt = Pt === void 0 ? We.pxmid : K(ne.r, Pt);
                    if (ct.targetX = Ne + Dt[0] * ct.rCenter + (ct.x || 0), ct.targetY = Ie + Dt[1] * ct.rCenter + (ct.y || 0), Y(ct, ft), ct.outside) {
                      var $t = ct.targetY;
                      We.yLabelMin = $t - ft.height / 2, We.yLabelMid = $t, We.yLabelMax = $t + ft.height / 2, We.labelExtraX = 0, We.labelExtraY = 0, ye = !0;
                    }
                    ct.fontSize = Ze.size, m(ae.type, ct, Q), he[Ee].transform = ct, _.setTransormAndDisplay($e, ct);
                  });
                }
                function Be($e, Ze, ct, ft) {
                  var _t = ft * (Ze[0] - $e[0]), Pt = ft * (Ze[1] - $e[1]);
                  return "a" + ft * ne.r + "," + ft * ne.r + " 0 " + We.largeArc + (ct ? " 1 " : " 0 ") + _t + "," + Pt;
                }
              });
              var pe = l.select(this).selectAll("g.titletext").data(ae.title.text ? [0] : []);
              if (pe.enter().append("g").classed("titletext", !0), pe.exit().remove(), pe.each(function() {
                var We, Ee = _.ensureSingle(l.select(this), "text", "", function(Ie) {
                  Ie.attr("data-notex", 1);
                }), Ne = ae.title.text;
                ae._meta && (Ne = _.templateString(Ne, ae._meta)), Ee.text(Ne).attr({ class: "titletext", transform: "", "text-anchor": "middle" }).call(p.font, ae.title.font).call(c.convertToTspans, te), We = ae.title.position === "middle center" ? function(Ie) {
                  var ge = Math.sqrt(Ie.titleBox.width * Ie.titleBox.width + Ie.titleBox.height * Ie.titleBox.height);
                  return { x: Ie.cx, y: Ie.cy, scale: Ie.trace.hole * Ie.r * 2 / ge, tx: 0, ty: -Ie.titleBox.height / 2 + Ie.trace.title.font.size };
                }(ne) : U(ne, ue), Ee.attr("transform", f(We.x, We.y) + d(Math.min(1, We.scale)) + f(We.tx, We.ty));
              }), ye && function(We, Ee) {
                var Ne, Ie, ge, Ce, we, Ge, Re, je, Ke, tt, _e, Be, $e;
                function Ze(Pt, Dt) {
                  return Pt.pxmid[1] - Dt.pxmid[1];
                }
                function ct(Pt, Dt) {
                  return Dt.pxmid[1] - Pt.pxmid[1];
                }
                function ft(Pt, Dt) {
                  Dt || (Dt = {});
                  var $t, Gt, Wt, mt, at = Dt.labelExtraY + (Ie ? Dt.yLabelMax : Dt.yLabelMin), vt = Ie ? Pt.yLabelMin : Pt.yLabelMax, St = Ie ? Pt.yLabelMax : Pt.yLabelMin, Je = Pt.cyFinal + we(Pt.px0[1], Pt.px1[1]), nt = at - vt;
                  if (nt * Re > 0 && (Pt.labelExtraY = nt), _.isArrayOrTypedArray(Ee.pull)) for (Gt = 0; Gt < tt.length; Gt++) (Wt = tt[Gt]) === Pt || (k.castOption(Ee.pull, Pt.pts) || 0) >= (k.castOption(Ee.pull, Wt.pts) || 0) || ((Pt.pxmid[1] - Wt.pxmid[1]) * Re > 0 ? (nt = Wt.cyFinal + we(Wt.px0[1], Wt.px1[1]) - vt - Pt.labelExtraY) * Re > 0 && (Pt.labelExtraY += nt) : (St + Pt.labelExtraY - Je) * Re > 0 && ($t = 3 * Ge * Math.abs(Gt - tt.indexOf(Pt)), (mt = Wt.cxFinal + Ce(Wt.px0[0], Wt.px1[0]) + $t - (Pt.cxFinal + Pt.pxmid[0]) - Pt.labelExtraX) * Ge > 0 && (Pt.labelExtraX += mt)));
                }
                for (Ie = 0; Ie < 2; Ie++) for (ge = Ie ? Ze : ct, we = Ie ? Math.max : Math.min, Re = Ie ? 1 : -1, Ne = 0; Ne < 2; Ne++) {
                  for (Ce = Ne ? Math.max : Math.min, Ge = Ne ? 1 : -1, (je = We[Ie][Ne]).sort(ge), Ke = We[1 - Ie][Ne], tt = Ke.concat(je), Be = [], _e = 0; _e < je.length; _e++) je[_e].yLabelMid !== void 0 && Be.push(je[_e]);
                  for ($e = !1, _e = 0; Ie && _e < Ke.length; _e++) if (Ke[_e].yLabelMid !== void 0) {
                    $e = Ke[_e];
                    break;
                  }
                  for (_e = 0; _e < Be.length; _e++) {
                    var _t = _e && Be[_e - 1];
                    $e && !_e && (_t = $e), ft(Be[_e], _t);
                  }
                }
              }(me, ae), function(We, Ee) {
                We.each(function(Ne) {
                  var Ie = l.select(this);
                  if (Ne.labelExtraX || Ne.labelExtraY) {
                    var ge = Ie.select("g.slicetext text");
                    Ne.transform.targetX += Ne.labelExtraX, Ne.transform.targetY += Ne.labelExtraY, _.setTransormAndDisplay(ge, Ne.transform);
                    var Ce = Ne.cxFinal + Ne.pxmid[0], we = "M" + Ce + "," + (Ne.cyFinal + Ne.pxmid[1]), Ge = (Ne.yLabelMax - Ne.yLabelMin) * (Ne.pxmid[0] < 0 ? -1 : 1) / 4;
                    if (Ne.labelExtraX) {
                      var Re = Ne.labelExtraX * Ne.pxmid[1] / Ne.pxmid[0], je = Ne.yLabelMid + Ne.labelExtraY - (Ne.cyFinal + Ne.pxmid[1]);
                      Math.abs(Re) > Math.abs(je) ? we += "l" + je * Ne.pxmid[0] / Ne.pxmid[1] + "," + je + "H" + (Ce + Ne.labelExtraX + Ge) : we += "l" + Ne.labelExtraX + "," + Re + "v" + (je - Re) + "h" + Ge;
                    } else we += "V" + (Ne.yLabelMid + Ne.labelExtraY) + "h" + Ge;
                    _.ensureSingle(Ie, "path", "textline").call(h.stroke, Ee.outsidetextfont.color).attr({ "stroke-width": Math.min(2, Ee.outsidetextfont.size / 8), d: we, fill: "none" });
                  } else Ie.select("path.textline").remove();
                });
              }(se, ae), ye && ae.automargin) {
                var be = p.bBox(de.node()), Ae = ae.domain, Se = ue.w * (Ae.x[1] - Ae.x[0]), Me = ue.h * (Ae.y[1] - Ae.y[0]), De = (0.5 * Se - ne.r) / ue.w, Le = (0.5 * Me - ne.r) / ue.h;
                u.autoMargin(te, "pie." + ae.uid + ".automargin", { xl: Ae.x[0] - De, xr: Ae.x[1] + De, yb: Ae.y[0] - Le, yt: Ae.y[1] + Le, l: Math.max(ne.cx - ne.r - be.left, 0), r: Math.max(be.right - (ne.cx + ne.r), 0), b: Math.max(be.bottom - (ne.cy + ne.r), 0), t: Math.max(ne.cy - ne.r - be.top, 0), pad: 5 });
              }
            });
          });
          setTimeout(function() {
            ce.selectAll("tspan").each(function() {
              var he = l.select(this);
              he.attr("dy") && he.attr("dy", he.attr("dy"));
            });
          }, 0);
        }, formatSliceLabel: re, transformInsideText: E, determineInsideTextFont: D, positionTitleOutside: U, prerenderTitles: L, layoutAreas: q, attachFxHandlers: C, computeTransform: Y };
      }, 140: function(o, s, n) {
        var l = n(45568), u = n(32891), i = n(84102).resizeText;
        o.exports = function(h) {
          var p = h._fullLayout._pielayer.selectAll(".trace");
          i(h, p, "pie"), p.each(function(_) {
            var d = _[0].trace, f = l.select(this);
            f.style({ opacity: d.opacity }), f.selectAll("path.surface").each(function(c) {
              l.select(this).call(u, c, d, h);
            });
          });
        };
      }, 32891: function(o, s, n) {
        var l = n(78766), u = n(37252).castOption, i = n(75067);
        o.exports = function(h, p, _, d) {
          var f = _.marker.line, c = u(f.color, p.pts) || l.defaultLine, g = u(f.width, p.pts) || 0;
          h.call(i, p, _, d).style("stroke-width", g).call(l.stroke, c);
        };
      }, 36961: function(o, s, n) {
        var l = n(36640);
        o.exports = { x: l.x, y: l.y, xy: { valType: "data_array", editType: "calc" }, indices: { valType: "data_array", editType: "calc" }, xbounds: { valType: "data_array", editType: "calc" }, ybounds: { valType: "data_array", editType: "calc" }, text: l.text, marker: { color: { valType: "color", arrayOk: !1, editType: "calc" }, opacity: { valType: "number", min: 0, max: 1, dflt: 1, arrayOk: !1, editType: "calc" }, blend: { valType: "boolean", dflt: null, editType: "calc" }, sizemin: { valType: "number", min: 0.1, max: 2, dflt: 0.5, editType: "calc" }, sizemax: { valType: "number", min: 0.1, dflt: 20, editType: "calc" }, border: { color: { valType: "color", arrayOk: !1, editType: "calc" }, arearatio: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" }, editType: "calc" }, editType: "calc" }, transforms: void 0 };
      }, 71593: function(o, s, n) {
        var l = n(99098).gl_pointcloud2d, u = n(34809).isArrayOrTypedArray, i = n(55010), h = n(32919).findExtremes, p = n(11539);
        function _(f, c) {
          this.scene = f, this.uid = c, this.type = "pointcloud", this.pickXData = [], this.pickYData = [], this.xData = [], this.yData = [], this.textLabels = [], this.color = "rgb(0, 0, 0)", this.name = "", this.hoverinfo = "all", this.idToIndex = new Int32Array(0), this.bounds = [0, 0, 0, 0], this.pointcloudOptions = { positions: new Float32Array(0), idToIndex: this.idToIndex, sizemin: 0.5, sizemax: 12, color: [0, 0, 0, 1], areaRatio: 1, borderColor: [0, 0, 0, 1] }, this.pointcloud = l(f.glplot, this.pointcloudOptions), this.pointcloud._trace = this;
        }
        var d = _.prototype;
        d.handlePick = function(f) {
          var c = this.idToIndex[f.pointId];
          return { trace: this, dataCoord: f.dataCoord, traceCoord: this.pickXYData ? [this.pickXYData[2 * c], this.pickXYData[2 * c + 1]] : [this.pickXData[c], this.pickYData[c]], textLabel: u(this.textLabels) ? this.textLabels[c] : this.textLabels, color: this.color, name: this.name, pointIndex: c, hoverinfo: this.hoverinfo };
        }, d.update = function(f) {
          this.index = f.index, this.textLabels = f.text, this.name = f.name, this.hoverinfo = f.hoverinfo, this.bounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.updateFast(f), this.color = p(f, {});
        }, d.updateFast = function(f) {
          var c, g, m, x, w, k, S = this.xData = this.pickXData = f.x, A = this.yData = this.pickYData = f.y, C = this.pickXYData = f.xy, D = f.xbounds && f.ybounds, L = f.indices, E = this.bounds;
          if (C) {
            if (m = C, c = C.length >>> 1, D) E[0] = f.xbounds[0], E[2] = f.xbounds[1], E[1] = f.ybounds[0], E[3] = f.ybounds[1];
            else for (k = 0; k < c; k++) x = m[2 * k], w = m[2 * k + 1], x < E[0] && (E[0] = x), x > E[2] && (E[2] = x), w < E[1] && (E[1] = w), w > E[3] && (E[3] = w);
            if (L) g = L;
            else for (g = new Int32Array(c), k = 0; k < c; k++) g[k] = k;
          } else for (c = S.length, m = new Float32Array(2 * c), g = new Int32Array(c), k = 0; k < c; k++) x = S[k], w = A[k], g[k] = k, m[2 * k] = x, m[2 * k + 1] = w, x < E[0] && (E[0] = x), x > E[2] && (E[2] = x), w < E[1] && (E[1] = w), w > E[3] && (E[3] = w);
          this.idToIndex = g, this.pointcloudOptions.idToIndex = g, this.pointcloudOptions.positions = m;
          var P = i(f.marker.color), I = i(f.marker.border.color), M = f.opacity * f.marker.opacity;
          P[3] *= M, this.pointcloudOptions.color = P;
          var O = f.marker.blend;
          O === null && (O = S.length < 100 || A.length < 100), this.pointcloudOptions.blend = O, I[3] *= M, this.pointcloudOptions.borderColor = I;
          var T = f.marker.sizemin, z = Math.max(f.marker.sizemax, f.marker.sizemin);
          this.pointcloudOptions.sizeMin = T, this.pointcloudOptions.sizeMax = z, this.pointcloudOptions.areaRatio = f.marker.border.arearatio, this.pointcloud.update(this.pointcloudOptions);
          var F = this.scene.xaxis, U = this.scene.yaxis, V = z / 2 || 0.5;
          f._extremes[F._id] = h(F, [E[0], E[2]], { ppad: V }), f._extremes[U._id] = h(U, [E[1], E[3]], { ppad: V });
        }, d.dispose = function() {
          this.pointcloud.dispose();
        }, o.exports = function(f, c) {
          var g = new _(f, c.uid);
          return g.update(c), g;
        };
      }, 75526: function(o, s, n) {
        var l = n(34809), u = n(36961);
        o.exports = function(i, h, p) {
          function _(d, f) {
            return l.coerce(i, h, u, d, f);
          }
          _("x"), _("y"), _("xbounds"), _("ybounds"), i.xy && i.xy instanceof Float32Array && (h.xy = i.xy), i.indices && i.indices instanceof Int32Array && (h.indices = i.indices), _("text"), _("marker.color", p), _("marker.opacity"), _("marker.blend"), _("marker.sizemin"), _("marker.sizemax"), _("marker.border.color", p), _("marker.border.arearatio"), h._length = null;
        };
      }, 15186: function(o, s, n) {
        o.exports = { attributes: n(36961), supplyDefaults: n(75526), calc: n(37593), plot: n(71593), moduleType: "trace", name: "pointcloud", basePlotModule: n(24585), categories: ["gl", "gl2d", "showLegend"], meta: {} };
      }, 33795: function(o, s, n) {
        var l = n(80337), u = n(9829), i = n(10229), h = n(70192), p = n(13792).u, _ = n(3208).rb, d = n(87163), f = n(78032).templatedArray, c = n(80712).descriptionOnlyNumbers, g = n(93049).extendFlat, m = n(13582).overrideAll;
        (o.exports = m({ hoverinfo: g({}, u.hoverinfo, { flags: [], arrayOk: !1 }), hoverlabel: h.hoverlabel, domain: p({ name: "sankey", trace: !0 }), orientation: { valType: "enumerated", values: ["v", "h"], dflt: "h" }, valueformat: { valType: "string", dflt: ".3s", description: c("value") }, valuesuffix: { valType: "string", dflt: "" }, arrangement: { valType: "enumerated", values: ["snap", "perpendicular", "freeform", "fixed"], dflt: "snap" }, textfont: l({ autoShadowDflt: !0 }), customdata: void 0, node: { label: { valType: "data_array", dflt: [] }, groups: { valType: "info_array", impliedEdits: { x: [], y: [] }, dimensions: 2, freeLength: !0, dflt: [], items: { valType: "number", editType: "calc" } }, x: { valType: "data_array", dflt: [] }, y: { valType: "data_array", dflt: [] }, color: { valType: "color", arrayOk: !0 }, customdata: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: i.defaultLine, arrayOk: !0 }, width: { valType: "number", min: 0, dflt: 0.5, arrayOk: !0 } }, pad: { valType: "number", arrayOk: !1, min: 0, dflt: 20 }, thickness: { valType: "number", arrayOk: !1, min: 1, dflt: 20 }, hoverinfo: { valType: "enumerated", values: ["all", "none", "skip"], dflt: "all" }, hoverlabel: h.hoverlabel, hovertemplate: _({}, { keys: ["value", "label"] }), align: { valType: "enumerated", values: ["justify", "left", "right", "center"], dflt: "justify" } }, link: { arrowlen: { valType: "number", min: 0, dflt: 0 }, label: { valType: "data_array", dflt: [] }, color: { valType: "color", arrayOk: !0 }, hovercolor: { valType: "color", arrayOk: !0 }, customdata: { valType: "data_array", editType: "calc" }, line: { color: { valType: "color", dflt: i.defaultLine, arrayOk: !0 }, width: { valType: "number", min: 0, dflt: 0, arrayOk: !0 } }, source: { valType: "data_array", dflt: [] }, target: { valType: "data_array", dflt: [] }, value: { valType: "data_array", dflt: [] }, hoverinfo: { valType: "enumerated", values: ["all", "none", "skip"], dflt: "all" }, hoverlabel: h.hoverlabel, hovertemplate: _({}, { keys: ["value", "label"] }), colorscales: f("concentrationscales", { editType: "calc", label: { valType: "string", editType: "calc", dflt: "" }, cmax: { valType: "number", editType: "calc", dflt: 1 }, cmin: { valType: "number", editType: "calc", dflt: 0 }, colorscale: g(d().colorscale, { dflt: [[0, "white"], [1, "black"]] }) }) } }, "calc", "nested")).transforms = void 0;
      }, 42229: function(o, s, n) {
        var l = n(13582).overrideAll, u = n(4173).eV, i = n(16506), h = n(6811), p = n(27983), _ = n(14751), d = n(44844).prepSelect, f = n(34809), c = n(33626), g = "sankey";
        function m(x, w) {
          var k = x._fullData[w], S = x._fullLayout, A = S.dragmode, C = S.dragmode === "pan" ? "move" : "crosshair", D = k._bgRect;
          if (D && A !== "pan" && A !== "zoom") {
            p(D, C);
            var L = { _id: "x", c2p: f.identity, _offset: k._sankey.translateX, _length: k._sankey.width }, E = { _id: "y", c2p: f.identity, _offset: k._sankey.translateY, _length: k._sankey.height }, P = { gd: x, element: D.node(), plotinfo: { id: w, xaxis: L, yaxis: E, fillRangeItems: f.noop }, subplot: w, xaxes: [L], yaxes: [E], doneFnCompleted: function(I) {
              var M, O = x._fullData[w], T = O.node.groups.slice(), z = [];
              function F(q) {
                for (var K = O._sankey.graph.nodes, re = 0; re < K.length; re++) if (K[re].pointNumber === q) return K[re];
              }
              for (var U = 0; U < I.length; U++) {
                var V = F(I[U].pointNumber);
                if (V) if (V.group) {
                  for (var $ = 0; $ < V.childrenNodes.length; $++) z.push(V.childrenNodes[$].pointNumber);
                  T[V.pointNumber - O.node._count] = !1;
                } else z.push(V.pointNumber);
              }
              M = T.filter(Boolean).concat([z]), c.call("_guiRestyle", x, { "node.groups": [M] }, w);
            }, prepFn: function(I, M, O) {
              d(I, M, O, P, A);
            } };
            _.init(P);
          }
        }
        s.name = g, s.baseLayoutAttrOverrides = l({ hoverlabel: h.hoverlabel }, "plot", "nested"), s.plot = function(x) {
          var w = u(x.calcdata, g)[0];
          i(x, w), s.updateFx(x);
        }, s.clean = function(x, w, k, S) {
          var A = S._has && S._has(g), C = w._has && w._has(g);
          A && !C && (S._paperdiv.selectAll(".sankey").remove(), S._paperdiv.selectAll(".bgsankey").remove());
        }, s.updateFx = function(x) {
          for (var w = 0; w < x._fullData.length; w++) m(x, w);
        };
      }, 22915: function(o, s, n) {
        var l = n(26381), u = n(34809), i = n(71293).wrap, h = u.isArrayOrTypedArray, p = u.isIndex, _ = n(88856);
        o.exports = function(d, f) {
          var c = function(g) {
            var m, x = g.node, w = g.link, k = [], S = h(w.color), A = h(w.hovercolor), C = h(w.customdata), D = {}, L = {}, E = w.colorscales.length;
            for (m = 0; m < E; m++) {
              var P = w.colorscales[m], I = _.extractScale(P, { cLetter: "c" }), M = _.makeColorScaleFunc(I);
              L[P.label] = M;
            }
            var O = 0;
            for (m = 0; m < w.value.length; m++) w.source[m] > O && (O = w.source[m]), w.target[m] > O && (O = w.target[m]);
            var T, z = O + 1;
            g.node._count = z;
            var F = g.node.groups, U = {};
            for (m = 0; m < F.length; m++) {
              var V = F[m];
              for (T = 0; T < V.length; T++) {
                var $ = V[T], q = z + m;
                U.hasOwnProperty($) ? u.warn("Node " + $ + " is already part of a group.") : U[$] = q;
              }
            }
            var K = { source: [], target: [] };
            for (m = 0; m < w.value.length; m++) {
              var re = w.value[m], Y = w.source[m], te = w.target[m];
              if (re > 0 && p(Y, z) && p(te, z) && (!U.hasOwnProperty(Y) || !U.hasOwnProperty(te) || U[Y] !== U[te])) {
                U.hasOwnProperty(te) && (te = U[te]), U.hasOwnProperty(Y) && (Y = U[Y]), te = +te, D[Y = +Y] = D[te] = !0;
                var ee = "";
                w.label && w.label[m] && (ee = w.label[m]);
                var X = null;
                ee && L.hasOwnProperty(ee) && (X = L[ee]), k.push({ pointNumber: m, label: ee, color: S ? w.color[m] : w.color, hovercolor: A ? w.hovercolor[m] : w.hovercolor, customdata: C ? w.customdata[m] : w.customdata, concentrationscale: X, source: Y, target: te, value: +re }), K.source.push(Y), K.target.push(te);
              }
            }
            var Q = z + F.length, ue = h(x.color), ce = h(x.customdata), he = [];
            for (m = 0; m < Q; m++) if (D[m]) {
              var de = x.label[m];
              he.push({ group: m > z - 1, childrenNodes: [], pointNumber: m, label: de, color: ue ? x.color[m] : x.color, customdata: ce ? x.customdata[m] : x.customdata });
            }
            var ne = !1;
            return function(ae, se, me) {
              for (var ye = u.init2dArray(ae, 0), pe = 0; pe < Math.min(se.length, me.length); pe++) if (u.isIndex(se[pe], ae) && u.isIndex(me[pe], ae)) {
                if (se[pe] === me[pe]) return !0;
                ye[se[pe]].push(me[pe]);
              }
              return l(ye).components.some(function(be) {
                return be.length > 1;
              });
            }(Q, K.source, K.target) && (ne = !0), { circular: ne, links: k, nodes: he, groups: F, groupLookup: U };
          }(f);
          return i({ circular: c.circular, _nodes: c.nodes, _links: c.links, _groups: c.groups, _groupLookup: c.groupLookup });
        };
      }, 21541: function(o) {
        o.exports = { nodeTextOffsetHorizontal: 4, nodeTextOffsetVertical: 3, nodePadAcross: 10, sankeyIterations: 50, forceIterations: 5, forceTicksPerFrame: 10, duration: 500, ease: "linear", cn: { sankey: "sankey", sankeyLinks: "sankey-links", sankeyLink: "sankey-link", sankeyNodeSet: "sankey-node-set", sankeyNode: "sankey-node", nodeRect: "node-rect", nodeLabel: "node-label" } };
      }, 67940: function(o, s, n) {
        var l = n(34809), u = n(33795), i = n(78766), h = n(65657), p = n(13792).N, _ = n(26430), d = n(78032), f = n(59008);
        function c(g, m) {
          function x(w, k) {
            return l.coerce(g, m, u.link.colorscales, w, k);
          }
          x("label"), x("cmin"), x("cmax"), x("colorscale");
        }
        o.exports = function(g, m, x, w) {
          function k(F, U) {
            return l.coerce(g, m, u, F, U);
          }
          var S = l.extendDeep(w.hoverlabel, g.hoverlabel), A = g.node, C = d.newContainer(m, "node");
          function D(F, U) {
            return l.coerce(A, C, u.node, F, U);
          }
          D("label"), D("groups"), D("x"), D("y"), D("pad"), D("thickness"), D("line.color"), D("line.width"), D("hoverinfo", g.hoverinfo), _(A, C, D, S), D("hovertemplate"), D("align");
          var L = w.colorway;
          D("color", C.label.map(function(F, U) {
            return i.addOpacity(function(V) {
              return L[V % L.length];
            }(U), 0.8);
          })), D("customdata");
          var E = g.link || {}, P = d.newContainer(m, "link");
          function I(F, U) {
            return l.coerce(E, P, u.link, F, U);
          }
          I("label"), I("arrowlen"), I("source"), I("target"), I("value"), I("line.color"), I("line.width"), I("hoverinfo", g.hoverinfo), _(E, P, I, S), I("hovertemplate");
          var M, O = h(w.paper_bgcolor).getLuminance() < 0.333, T = I("color", O ? "rgba(255, 255, 255, 0.6)" : "rgba(0, 0, 0, 0.2)");
          function z(F) {
            var U = h(F);
            if (!U.isValid()) return F;
            var V = U.getAlpha();
            return V <= 0.8 ? U.setAlpha(V + 0.2) : U = O ? U.brighten() : U.darken(), U.toRgbString();
          }
          I("hovercolor", Array.isArray(T) ? T.map(z) : z(T)), I("customdata"), f(E, P, { name: "colorscales", handleItemDefaults: c }), p(m, w, k), k("orientation"), k("valueformat"), k("valuesuffix"), C.x.length && C.y.length && (M = "freeform"), k("arrangement", M), l.coerceFont(k, "textfont", w.font, { autoShadowDflt: !0 }), m._length = null;
        };
      }, 71760: function(o, s, n) {
        o.exports = { attributes: n(33795), supplyDefaults: n(67940), calc: n(22915), plot: n(16506), moduleType: "trace", name: "sankey", basePlotModule: n(42229), selectPoints: n(74670), categories: ["noOpacity"], meta: {} };
      }, 16506: function(o, s, n) {
        var l = n(45568), u = n(34809), i = u.numberFormat, h = n(90958), p = n(32141), _ = n(78766), d = n(21541).cn, f = u._;
        function c(E) {
          return E !== "";
        }
        function g(E, P) {
          return E.filter(function(I) {
            return I.key === P.traceId;
          });
        }
        function m(E, P) {
          l.select(E).select("path").style("fill-opacity", P), l.select(E).select("rect").style("fill-opacity", P);
        }
        function x(E) {
          l.select(E).select("text.name").style("fill", "black");
        }
        function w(E) {
          return function(P) {
            return E.node.sourceLinks.indexOf(P.link) !== -1 || E.node.targetLinks.indexOf(P.link) !== -1;
          };
        }
        function k(E) {
          return function(P) {
            return P.node.sourceLinks.indexOf(E.link) !== -1 || P.node.targetLinks.indexOf(E.link) !== -1;
          };
        }
        function S(E, P, I) {
          P && I && g(I, P).selectAll("." + d.sankeyLink).filter(w(P)).call(C.bind(0, P, I, !1));
        }
        function A(E, P, I) {
          P && I && g(I, P).selectAll("." + d.sankeyLink).filter(w(P)).call(D.bind(0, P, I, !1));
        }
        function C(E, P, I, M) {
          M.style("fill", function(O) {
            if (!O.link.concentrationscale) return O.tinyColorHoverHue;
          }).style("fill-opacity", function(O) {
            if (!O.link.concentrationscale) return O.tinyColorHoverAlpha;
          }), M.each(function(O) {
            var T = O.link.label;
            T !== "" && g(P, E).selectAll("." + d.sankeyLink).filter(function(z) {
              return z.link.label === T;
            }).style("fill", function(z) {
              if (!z.link.concentrationscale) return z.tinyColorHoverHue;
            }).style("fill-opacity", function(z) {
              if (!z.link.concentrationscale) return z.tinyColorHoverAlpha;
            });
          }), I && g(P, E).selectAll("." + d.sankeyNode).filter(k(E)).call(S);
        }
        function D(E, P, I, M) {
          M.style("fill", function(O) {
            return O.tinyColorHue;
          }).style("fill-opacity", function(O) {
            return O.tinyColorAlpha;
          }), M.each(function(O) {
            var T = O.link.label;
            T !== "" && g(P, E).selectAll("." + d.sankeyLink).filter(function(z) {
              return z.link.label === T;
            }).style("fill", function(z) {
              return z.tinyColorHue;
            }).style("fill-opacity", function(z) {
              return z.tinyColorAlpha;
            });
          }), I && g(P, E).selectAll(d.sankeyNode).filter(k(E)).call(A);
        }
        function L(E, P) {
          var I = E.hoverlabel || {}, M = u.nestedProperty(I, P).get();
          return !Array.isArray(M) && M;
        }
        o.exports = function(E, P) {
          for (var I = E._fullLayout, M = I._paper, O = I._size, T = 0; T < E._fullData.length; T++) if (E._fullData[T].visible && E._fullData[T].type === d.sankey && !E._fullData[T]._viewInitial) {
            var z = E._fullData[T].node;
            E._fullData[T]._viewInitial = { node: { groups: z.groups.slice(), x: z.x.slice(), y: z.y.slice() } };
          }
          var F = f(E, "source:") + " ", U = f(E, "target:") + " ", V = f(E, "concentration:") + " ", $ = f(E, "incoming flow count:") + " ", q = f(E, "outgoing flow count:") + " ";
          h(E, M, P, { width: O.w, height: O.h, margin: { t: O.t, r: O.r, b: O.b, l: O.l } }, { linkEvents: { hover: function(K, re, Y) {
            E._fullLayout.hovermode !== !1 && (l.select(K).call(C.bind(0, re, Y, !0)), re.link.trace.link.hoverinfo !== "skip" && (re.link.fullData = re.link.trace, E.emit("plotly_hover", { event: l.event, points: [re.link] })));
          }, follow: function(K, re) {
            if (E._fullLayout.hovermode !== !1) {
              var Y = re.link.trace.link;
              if (Y.hoverinfo !== "none" && Y.hoverinfo !== "skip") {
                for (var te = [], ee = 0, X = 0; X < re.flow.links.length; X++) {
                  var Q = re.flow.links[X];
                  if (E._fullLayout.hovermode !== "closest" || re.link.pointNumber === Q.pointNumber) {
                    re.link.pointNumber === Q.pointNumber && (ee = X), Q.fullData = Q.trace, Y = re.link.trace.link;
                    var ue = he(Q), ce = { valueLabel: i(re.valueFormat)(Q.value) + re.valueSuffix };
                    te.push({ x: ue[0], y: ue[1], name: ce.valueLabel, text: [Q.label || "", F + Q.source.label, U + Q.target.label, Q.concentrationscale ? V + i("%0.2f")(Q.flow.labelConcentration) : ""].filter(c).join("<br>"), color: L(Y, "bgcolor") || _.addOpacity(Q.color, 1), borderColor: L(Y, "bordercolor"), fontFamily: L(Y, "font.family"), fontSize: L(Y, "font.size"), fontColor: L(Y, "font.color"), fontWeight: L(Y, "font.weight"), fontStyle: L(Y, "font.style"), fontVariant: L(Y, "font.variant"), fontTextcase: L(Y, "font.textcase"), fontLineposition: L(Y, "font.lineposition"), fontShadow: L(Y, "font.shadow"), nameLength: L(Y, "namelength"), textAlign: L(Y, "align"), idealAlign: l.event.x < ue[0] ? "right" : "left", hovertemplate: Y.hovertemplate, hovertemplateLabels: ce, eventData: [Q] });
                  }
                }
                p.loneHover(te, { container: I._hoverlayer.node(), outerContainer: I._paper.node(), gd: E, anchorIndex: ee }).each(function() {
                  re.link.concentrationscale || m(this, 0.65), x(this);
                });
              }
            }
            function he(de) {
              var ne, ae;
              de.circular ? (ne = (de.circularPathData.leftInnerExtent + de.circularPathData.rightInnerExtent) / 2, ae = de.circularPathData.verticalFullExtent) : (ne = (de.source.x1 + de.target.x0) / 2, ae = (de.y0 + de.y1) / 2);
              var se = [ne, ae];
              return de.trace.orientation === "v" && se.reverse(), se[0] += re.parent.translateX, se[1] += re.parent.translateY, se;
            }
          }, unhover: function(K, re, Y) {
            E._fullLayout.hovermode !== !1 && (l.select(K).call(D.bind(0, re, Y, !0)), re.link.trace.link.hoverinfo !== "skip" && (re.link.fullData = re.link.trace, E.emit("plotly_unhover", { event: l.event, points: [re.link] })), p.loneUnhover(I._hoverlayer.node()));
          }, select: function(K, re) {
            var Y = re.link;
            Y.originalEvent = l.event, E._hoverdata = [Y], p.click(E, { target: !0 });
          } }, nodeEvents: { hover: function(K, re, Y) {
            E._fullLayout.hovermode !== !1 && (l.select(K).call(S, re, Y), re.node.trace.node.hoverinfo !== "skip" && (re.node.fullData = re.node.trace, E.emit("plotly_hover", { event: l.event, points: [re.node] })));
          }, follow: function(K, re) {
            if (E._fullLayout.hovermode !== !1) {
              var Y = re.node.trace.node;
              if (Y.hoverinfo !== "none" && Y.hoverinfo !== "skip") {
                var te = l.select(K).select("." + d.nodeRect), ee = E._fullLayout._paperdiv.node().getBoundingClientRect(), X = te.node().getBoundingClientRect(), Q = X.left - 2 - ee.left, ue = X.right + 2 - ee.left, ce = X.top + X.height / 4 - ee.top, he = { valueLabel: i(re.valueFormat)(re.node.value) + re.valueSuffix };
                re.node.fullData = re.node.trace, E._fullLayout._calcInverseTransform(E);
                var de = E._fullLayout._invScaleX, ne = E._fullLayout._invScaleY, ae = p.loneHover({ x0: de * Q, x1: de * ue, y: ne * ce, name: i(re.valueFormat)(re.node.value) + re.valueSuffix, text: [re.node.label, $ + re.node.targetLinks.length, q + re.node.sourceLinks.length].filter(c).join("<br>"), color: L(Y, "bgcolor") || re.tinyColorHue, borderColor: L(Y, "bordercolor"), fontFamily: L(Y, "font.family"), fontSize: L(Y, "font.size"), fontColor: L(Y, "font.color"), fontWeight: L(Y, "font.weight"), fontStyle: L(Y, "font.style"), fontVariant: L(Y, "font.variant"), fontTextcase: L(Y, "font.textcase"), fontLineposition: L(Y, "font.lineposition"), fontShadow: L(Y, "font.shadow"), nameLength: L(Y, "namelength"), textAlign: L(Y, "align"), idealAlign: "left", hovertemplate: Y.hovertemplate, hovertemplateLabels: he, eventData: [re.node] }, { container: I._hoverlayer.node(), outerContainer: I._paper.node(), gd: E });
                m(ae, 0.85), x(ae);
              }
            }
          }, unhover: function(K, re, Y) {
            E._fullLayout.hovermode !== !1 && (l.select(K).call(A, re, Y), re.node.trace.node.hoverinfo !== "skip" && (re.node.fullData = re.node.trace, E.emit("plotly_unhover", { event: l.event, points: [re.node] })), p.loneUnhover(I._hoverlayer.node()));
          }, select: function(K, re, Y) {
            var te = re.node;
            te.originalEvent = l.event, E._hoverdata = [te], l.select(K).call(A, re, Y), p.click(E, { target: !0 });
          } } });
        };
      }, 90958: function(o, s, n) {
        var l = n(32702), u = n(88640).Dj, i = n(45568), h = n(62369), p = n(68735), _ = n(21541), d = n(65657), f = n(78766), c = n(62203), g = n(34809), m = g.strTranslate, x = g.strRotate, w = n(71293), k = w.keyFun, S = w.repeat, A = w.unwrap, C = n(30635), D = n(33626), L = n(4530), E = L.CAP_SHIFT, P = L.LINE_SPACING;
        function I(X, Q, ue) {
          var ce, he = A(Q), de = he.trace, ne = de.domain, ae = de.orientation === "h", se = de.node.pad, me = de.node.thickness, ye = { justify: h.sankeyJustify, left: h.sankeyLeft, right: h.sankeyRight, center: h.sankeyCenter }[de.node.align], pe = X.width * (ne.x[1] - ne.x[0]), be = X.height * (ne.y[1] - ne.y[0]), Ae = he._nodes, Se = he._links, Me = he.circular;
          (ce = Me ? p.sankeyCircular().circularLinkGap(0) : h.sankey()).iterations(_.sankeyIterations).size(ae ? [pe, be] : [be, pe]).nodeWidth(me).nodePadding(se).nodeId(function(Re) {
            return Re.pointNumber;
          }).nodeAlign(ye).nodes(Ae).links(Se);
          var De, Le, We, Ee = ce();
          for (var Ne in ce.nodePadding() < se && g.warn("node.pad was reduced to ", ce.nodePadding(), " to fit within the figure."), he._groupLookup) {
            var Ie, ge = parseInt(he._groupLookup[Ne]);
            for (De = 0; De < Ee.nodes.length; De++) if (Ee.nodes[De].pointNumber === ge) {
              Ie = Ee.nodes[De];
              break;
            }
            if (Ie) {
              var Ce = { pointNumber: parseInt(Ne), x0: Ie.x0, x1: Ie.x1, y0: Ie.y0, y1: Ie.y1, partOfGroup: !0, sourceLinks: [], targetLinks: [] };
              Ee.nodes.unshift(Ce), Ie.childrenNodes.unshift(Ce);
            }
          }
          if (function() {
            for (De = 0; De < Ee.nodes.length; De++) {
              var Re, je, Ke = Ee.nodes[De], tt = {};
              for (Le = 0; Le < Ke.targetLinks.length; Le++) Re = (je = Ke.targetLinks[Le]).source.pointNumber + ":" + je.target.pointNumber, tt.hasOwnProperty(Re) || (tt[Re] = []), tt[Re].push(je);
              var _e = Object.keys(tt);
              for (Le = 0; Le < _e.length; Le++) {
                var Be = tt[Re = _e[Le]], $e = 0, Ze = {};
                for (We = 0; We < Be.length; We++) Ze[(je = Be[We]).label] || (Ze[je.label] = 0), Ze[je.label] += je.value, $e += je.value;
                for (We = 0; We < Be.length; We++) (je = Be[We]).flow = { value: $e, labelConcentration: Ze[je.label] / $e, concentration: je.value / $e, links: Be }, je.concentrationscale && (je.color = d(je.concentrationscale(je.flow.labelConcentration)));
              }
              var ct = 0;
              for (Le = 0; Le < Ke.sourceLinks.length; Le++) ct += Ke.sourceLinks[Le].value;
              for (Le = 0; Le < Ke.sourceLinks.length; Le++) (je = Ke.sourceLinks[Le]).concentrationOut = je.value / ct;
              var ft = 0;
              for (Le = 0; Le < Ke.targetLinks.length; Le++) ft += Ke.targetLinks[Le].value;
              for (Le = 0; Le < Ke.targetLinks.length; Le++) (je = Ke.targetLinks[Le]).concenrationIn = je.value / ft;
            }
          }(), de.node.x.length && de.node.y.length) {
            for (De = 0; De < Math.min(de.node.x.length, de.node.y.length, Ee.nodes.length); De++) if (de.node.x[De] && de.node.y[De]) {
              var we = [de.node.x[De] * pe, de.node.y[De] * be];
              Ee.nodes[De].x0 = we[0] - me / 2, Ee.nodes[De].x1 = we[0] + me / 2;
              var Ge = Ee.nodes[De].y1 - Ee.nodes[De].y0;
              Ee.nodes[De].y0 = we[1] - Ge / 2, Ee.nodes[De].y1 = we[1] + Ge / 2;
            }
            de.arrangement === "snap" && function(Re) {
              var je, Ke, tt = Re.map(function(ct, ft) {
                return { x0: ct.x0, index: ft };
              }).sort(function(ct, ft) {
                return ct.x0 - ft.x0;
              }), _e = [], Be = -1, $e = -1 / 0;
              for (De = 0; De < tt.length; De++) {
                var Ze = Re[tt[De].index];
                Ze.x0 > $e + me && (Be += 1, je = Ze.x0), $e = Ze.x0, _e[Be] || (_e[Be] = []), _e[Be].push(Ze), Ke = je - Ze.x0, Ze.x0 += Ke, Ze.x1 += Ke;
              }
              return _e;
            }(Ae = Ee.nodes).forEach(function(Re) {
              var je, Ke, tt, _e = 0, Be = Re.length;
              for (Re.sort(function($e, Ze) {
                return $e.y0 - Ze.y0;
              }), tt = 0; tt < Be; ++tt) (je = Re[tt]).y0 >= _e || (Ke = _e - je.y0) > 1e-6 && (je.y0 += Ke, je.y1 += Ke), _e = je.y1 + se;
            }), ce.update(Ee);
          }
          return { circular: Me, key: ue, trace: de, guid: g.randstr(), horizontal: ae, width: pe, height: be, nodePad: de.node.pad, nodeLineColor: de.node.line.color, nodeLineWidth: de.node.line.width, linkLineColor: de.link.line.color, linkLineWidth: de.link.line.width, linkArrowLength: de.link.arrowlen, valueFormat: de.valueformat, valueSuffix: de.valuesuffix, textFont: de.textfont, translateX: ne.x[0] * X.width + X.margin.l, translateY: X.height - ne.y[1] * X.height + X.margin.t, dragParallel: ae ? be : pe, dragPerpendicular: ae ? pe : be, arrangement: de.arrangement, sankey: ce, graph: Ee, forceLayouts: {}, interactionState: { dragInProgress: !1, hovered: !1 } };
        }
        function M(X, Q, ue) {
          var ce = d(Q.color), he = d(Q.hovercolor), de = Q.source.label + "|" + Q.target.label + "__" + ue;
          return Q.trace = X.trace, Q.curveNumber = X.trace.index, { circular: X.circular, key: de, traceId: X.key, pointNumber: Q.pointNumber, link: Q, tinyColorHue: f.tinyRGB(ce), tinyColorAlpha: ce.getAlpha(), tinyColorHoverHue: f.tinyRGB(he), tinyColorHoverAlpha: he.getAlpha(), linkPath: O, linkLineColor: X.linkLineColor, linkLineWidth: X.linkLineWidth, linkArrowLength: X.linkArrowLength, valueFormat: X.valueFormat, valueSuffix: X.valueSuffix, sankey: X.sankey, parent: X, interactionState: X.interactionState, flow: Q.flow };
        }
        function O() {
          return function(X) {
            var Q = X.linkArrowLength;
            if (X.link.circular) return function(De, Le) {
              var We = De.width / 2, Ee = De.circularPathData;
              return De.circularLinkType === "top" ? "M " + (Ee.targetX - Le) + " " + (Ee.targetY + We) + " L" + (Ee.rightInnerExtent - Le) + " " + (Ee.targetY + We) + "A" + (Ee.rightLargeArcRadius + We) + " " + (Ee.rightSmallArcRadius + We) + " 0 0 1 " + (Ee.rightFullExtent - We - Le) + " " + (Ee.targetY - Ee.rightSmallArcRadius) + "L" + (Ee.rightFullExtent - We - Le) + " " + Ee.verticalRightInnerExtent + "A" + (Ee.rightLargeArcRadius + We) + " " + (Ee.rightLargeArcRadius + We) + " 0 0 1 " + (Ee.rightInnerExtent - Le) + " " + (Ee.verticalFullExtent - We) + "L" + Ee.leftInnerExtent + " " + (Ee.verticalFullExtent - We) + "A" + (Ee.leftLargeArcRadius + We) + " " + (Ee.leftLargeArcRadius + We) + " 0 0 1 " + (Ee.leftFullExtent + We) + " " + Ee.verticalLeftInnerExtent + "L" + (Ee.leftFullExtent + We) + " " + (Ee.sourceY - Ee.leftSmallArcRadius) + "A" + (Ee.leftLargeArcRadius + We) + " " + (Ee.leftSmallArcRadius + We) + " 0 0 1 " + Ee.leftInnerExtent + " " + (Ee.sourceY + We) + "L" + Ee.sourceX + " " + (Ee.sourceY + We) + "L" + Ee.sourceX + " " + (Ee.sourceY - We) + "L" + Ee.leftInnerExtent + " " + (Ee.sourceY - We) + "A" + (Ee.leftLargeArcRadius - We) + " " + (Ee.leftSmallArcRadius - We) + " 0 0 0 " + (Ee.leftFullExtent - We) + " " + (Ee.sourceY - Ee.leftSmallArcRadius) + "L" + (Ee.leftFullExtent - We) + " " + Ee.verticalLeftInnerExtent + "A" + (Ee.leftLargeArcRadius - We) + " " + (Ee.leftLargeArcRadius - We) + " 0 0 0 " + Ee.leftInnerExtent + " " + (Ee.verticalFullExtent + We) + "L" + (Ee.rightInnerExtent - Le) + " " + (Ee.verticalFullExtent + We) + "A" + (Ee.rightLargeArcRadius - We) + " " + (Ee.rightLargeArcRadius - We) + " 0 0 0 " + (Ee.rightFullExtent + We - Le) + " " + Ee.verticalRightInnerExtent + "L" + (Ee.rightFullExtent + We - Le) + " " + (Ee.targetY - Ee.rightSmallArcRadius) + "A" + (Ee.rightLargeArcRadius - We) + " " + (Ee.rightSmallArcRadius - We) + " 0 0 0 " + (Ee.rightInnerExtent - Le) + " " + (Ee.targetY - We) + "L" + (Ee.targetX - Le) + " " + (Ee.targetY - We) + (Le > 0 ? "L" + Ee.targetX + " " + Ee.targetY : "") + "Z" : "M " + (Ee.targetX - Le) + " " + (Ee.targetY - We) + " L" + (Ee.rightInnerExtent - Le) + " " + (Ee.targetY - We) + "A" + (Ee.rightLargeArcRadius + We) + " " + (Ee.rightSmallArcRadius + We) + " 0 0 0 " + (Ee.rightFullExtent - We - Le) + " " + (Ee.targetY + Ee.rightSmallArcRadius) + "L" + (Ee.rightFullExtent - We - Le) + " " + Ee.verticalRightInnerExtent + "A" + (Ee.rightLargeArcRadius + We) + " " + (Ee.rightLargeArcRadius + We) + " 0 0 0 " + (Ee.rightInnerExtent - Le) + " " + (Ee.verticalFullExtent + We) + "L" + Ee.leftInnerExtent + " " + (Ee.verticalFullExtent + We) + "A" + (Ee.leftLargeArcRadius + We) + " " + (Ee.leftLargeArcRadius + We) + " 0 0 0 " + (Ee.leftFullExtent + We) + " " + Ee.verticalLeftInnerExtent + "L" + (Ee.leftFullExtent + We) + " " + (Ee.sourceY + Ee.leftSmallArcRadius) + "A" + (Ee.leftLargeArcRadius + We) + " " + (Ee.leftSmallArcRadius + We) + " 0 0 0 " + Ee.leftInnerExtent + " " + (Ee.sourceY - We) + "L" + Ee.sourceX + " " + (Ee.sourceY - We) + "L" + Ee.sourceX + " " + (Ee.sourceY + We) + "L" + Ee.leftInnerExtent + " " + (Ee.sourceY + We) + "A" + (Ee.leftLargeArcRadius - We) + " " + (Ee.leftSmallArcRadius - We) + " 0 0 1 " + (Ee.leftFullExtent - We) + " " + (Ee.sourceY + Ee.leftSmallArcRadius) + "L" + (Ee.leftFullExtent - We) + " " + Ee.verticalLeftInnerExtent + "A" + (Ee.leftLargeArcRadius - We) + " " + (Ee.leftLargeArcRadius - We) + " 0 0 1 " + Ee.leftInnerExtent + " " + (Ee.verticalFullExtent - We) + "L" + (Ee.rightInnerExtent - Le) + " " + (Ee.verticalFullExtent - We) + "A" + (Ee.rightLargeArcRadius - We) + " " + (Ee.rightLargeArcRadius - We) + " 0 0 1 " + (Ee.rightFullExtent + We - Le) + " " + Ee.verticalRightInnerExtent + "L" + (Ee.rightFullExtent + We - Le) + " " + (Ee.targetY + Ee.rightSmallArcRadius) + "A" + (Ee.rightLargeArcRadius - We) + " " + (Ee.rightSmallArcRadius - We) + " 0 0 1 " + (Ee.rightInnerExtent - Le) + " " + (Ee.targetY + We) + "L" + (Ee.targetX - Le) + " " + (Ee.targetY + We) + (Le > 0 ? "L" + Ee.targetX + " " + Ee.targetY : "") + "Z";
            }(X.link, Q);
            var ue = Math.abs((X.link.target.x0 - X.link.source.x1) / 2);
            Q > ue && (Q = ue);
            var ce = X.link.source.x1, he = X.link.target.x0 - Q, de = u(ce, he), ne = de(0.5), ae = de(0.5), se = X.link.y0 - X.link.width / 2, me = X.link.y0 + X.link.width / 2, ye = X.link.y1 - X.link.width / 2, pe = X.link.y1 + X.link.width / 2, be = "M" + ce + "," + se, Ae = "C" + ne + "," + se + " " + ae + "," + ye + " " + he + "," + ye, Se = "C" + ae + "," + pe + " " + ne + "," + me + " " + ce + "," + me, Me = Q > 0 ? "L" + (he + Q) + "," + (ye + X.link.width / 2) : "";
            return be + Ae + (Me += "L" + he + "," + pe) + Se + "Z";
          };
        }
        function T(X, Q) {
          var ue = d(Q.color), ce = _.nodePadAcross, he = X.nodePad / 2;
          Q.dx = Q.x1 - Q.x0, Q.dy = Q.y1 - Q.y0;
          var de = Q.dx, ne = Math.max(0.5, Q.dy), ae = "node_" + Q.pointNumber;
          return Q.group && (ae = g.randstr()), Q.trace = X.trace, Q.curveNumber = X.trace.index, { index: Q.pointNumber, key: ae, partOfGroup: Q.partOfGroup || !1, group: Q.group, traceId: X.key, trace: X.trace, node: Q, nodePad: X.nodePad, nodeLineColor: X.nodeLineColor, nodeLineWidth: X.nodeLineWidth, textFont: X.textFont, size: X.horizontal ? X.height : X.width, visibleWidth: Math.ceil(de), visibleHeight: ne, zoneX: -ce, zoneY: -he, zoneWidth: de + 2 * ce, zoneHeight: ne + 2 * he, labelY: X.horizontal ? Q.dy / 2 + 1 : Q.dx / 2 + 1, left: Q.originalLayer === 1, sizeAcross: X.width, forceLayouts: X.forceLayouts, horizontal: X.horizontal, darkBackground: ue.getBrightness() <= 128, tinyColorHue: f.tinyRGB(ue), tinyColorAlpha: ue.getAlpha(), valueFormat: X.valueFormat, valueSuffix: X.valueSuffix, sankey: X.sankey, graph: X.graph, arrangement: X.arrangement, uniqueNodeLabelPathId: [X.guid, X.key, ae].join("_"), interactionState: X.interactionState, figure: X };
        }
        function z(X) {
          X.attr("transform", function(Q) {
            return m(Q.node.x0.toFixed(3), Q.node.y0.toFixed(3));
          });
        }
        function F(X) {
          X.call(z);
        }
        function U(X, Q) {
          X.call(F), Q.attr("d", O());
        }
        function V(X) {
          X.attr("width", function(Q) {
            return Q.node.x1 - Q.node.x0;
          }).attr("height", function(Q) {
            return Q.visibleHeight;
          });
        }
        function $(X) {
          return X.link.width > 1 || X.linkLineWidth > 0;
        }
        function q(X) {
          return m(X.translateX, X.translateY) + (X.horizontal ? "matrix(1 0 0 1 0 0)" : "matrix(0 1 1 0 0 0)");
        }
        function K(X, Q, ue) {
          X.on(".basic", null).on("mouseover.basic", function(ce) {
            ce.interactionState.dragInProgress || ce.partOfGroup || (ue.hover(this, ce, Q), ce.interactionState.hovered = [this, ce]);
          }).on("mousemove.basic", function(ce) {
            ce.interactionState.dragInProgress || ce.partOfGroup || (ue.follow(this, ce), ce.interactionState.hovered = [this, ce]);
          }).on("mouseout.basic", function(ce) {
            ce.interactionState.dragInProgress || ce.partOfGroup || (ue.unhover(this, ce, Q), ce.interactionState.hovered = !1);
          }).on("click.basic", function(ce) {
            ce.interactionState.hovered && (ue.unhover(this, ce, Q), ce.interactionState.hovered = !1), ce.interactionState.dragInProgress || ce.partOfGroup || ue.select(this, ce, Q);
          });
        }
        function re(X, Q, ue, ce) {
          var he = i.behavior.drag().origin(function(de) {
            return { x: de.node.x0 + de.visibleWidth / 2, y: de.node.y0 + de.visibleHeight / 2 };
          }).on("dragstart", function(de) {
            if (de.arrangement !== "fixed" && (g.ensureSingle(ce._fullLayout._infolayer, "g", "dragcover", function(ae) {
              ce._fullLayout._dragCover = ae;
            }), g.raiseToTop(this), de.interactionState.dragInProgress = de.node, te(de.node), de.interactionState.hovered && (ue.nodeEvents.unhover.apply(0, de.interactionState.hovered), de.interactionState.hovered = !1), de.arrangement === "snap")) {
              var ne = de.traceId + "|" + de.key;
              de.forceLayouts[ne] ? de.forceLayouts[ne].alpha(1) : function(ae, se, me, ye) {
                (function(be) {
                  for (var Ae = 0; Ae < be.length; Ae++) be[Ae].y = (be[Ae].y0 + be[Ae].y1) / 2, be[Ae].x = (be[Ae].x0 + be[Ae].x1) / 2;
                })(me.graph.nodes);
                var pe = me.graph.nodes.filter(function(be) {
                  return be.originalX === me.node.originalX;
                }).filter(function(be) {
                  return !be.partOfGroup;
                });
                me.forceLayouts[se] = l.forceSimulation(pe).alphaDecay(0).force("collide", l.forceCollide().radius(function(be) {
                  return be.dy / 2 + me.nodePad / 2;
                }).strength(1).iterations(_.forceIterations)).force("constrain", /* @__PURE__ */ function(be, Ae, Se, Me) {
                  return function() {
                    for (var De = 0, Le = 0; Le < Se.length; Le++) {
                      var We = Se[Le];
                      We === Me.interactionState.dragInProgress ? (We.x = We.lastDraggedX, We.y = We.lastDraggedY) : (We.vx = (We.originalX - We.x) / _.forceTicksPerFrame, We.y = Math.min(Me.size - We.dy / 2, Math.max(We.dy / 2, We.y))), De = Math.max(De, Math.abs(We.vx), Math.abs(We.vy));
                    }
                    !Me.interactionState.dragInProgress && De < 0.1 && Me.forceLayouts[Ae].alpha() > 0 && Me.forceLayouts[Ae].alpha(0);
                  };
                }(0, se, pe, me)).stop();
              }(0, ne, de), function(ae, se, me, ye, pe) {
                window.requestAnimationFrame(function be() {
                  var Ae;
                  for (Ae = 0; Ae < _.forceTicksPerFrame; Ae++) me.forceLayouts[ye].tick();
                  if (function(Me) {
                    for (var De = 0; De < Me.length; De++) Me[De].y0 = Me[De].y - Me[De].dy / 2, Me[De].y1 = Me[De].y0 + Me[De].dy, Me[De].x0 = Me[De].x - Me[De].dx / 2, Me[De].x1 = Me[De].x0 + Me[De].dx;
                  }(me.graph.nodes), me.sankey.update(me.graph), U(ae.filter(ee(me)), se), me.forceLayouts[ye].alpha() > 0) window.requestAnimationFrame(be);
                  else {
                    var Se = me.node.originalX;
                    me.node.x0 = Se - me.visibleWidth / 2, me.node.x1 = Se + me.visibleWidth / 2, Y(me, pe);
                  }
                });
              }(X, Q, de, ne, ce);
            }
          }).on("drag", function(de) {
            if (de.arrangement !== "fixed") {
              var ne = i.event.x, ae = i.event.y;
              de.arrangement === "snap" ? (de.node.x0 = ne - de.visibleWidth / 2, de.node.x1 = ne + de.visibleWidth / 2, de.node.y0 = ae - de.visibleHeight / 2, de.node.y1 = ae + de.visibleHeight / 2) : (de.arrangement === "freeform" && (de.node.x0 = ne - de.visibleWidth / 2, de.node.x1 = ne + de.visibleWidth / 2), ae = Math.max(0, Math.min(de.size - de.visibleHeight / 2, ae)), de.node.y0 = ae - de.visibleHeight / 2, de.node.y1 = ae + de.visibleHeight / 2), te(de.node), de.arrangement !== "snap" && (de.sankey.update(de.graph), U(X.filter(ee(de)), Q));
            }
          }).on("dragend", function(de) {
            if (de.arrangement !== "fixed") {
              de.interactionState.dragInProgress = !1;
              for (var ne = 0; ne < de.node.childrenNodes.length; ne++) de.node.childrenNodes[ne].x = de.node.x, de.node.childrenNodes[ne].y = de.node.y;
              de.arrangement !== "snap" && Y(de, ce);
            }
          });
          X.on(".drag", null).call(he);
        }
        function Y(X, Q) {
          for (var ue = [], ce = [], he = 0; he < X.graph.nodes.length; he++) {
            var de = (X.graph.nodes[he].x0 + X.graph.nodes[he].x1) / 2, ne = (X.graph.nodes[he].y0 + X.graph.nodes[he].y1) / 2;
            ue.push(de / X.figure.width), ce.push(ne / X.figure.height);
          }
          D.call("_guiRestyle", Q, { "node.x": [ue], "node.y": [ce] }, X.trace.index).then(function() {
            Q._fullLayout._dragCover && Q._fullLayout._dragCover.remove();
          });
        }
        function te(X) {
          X.lastDraggedX = X.x0 + X.dx / 2, X.lastDraggedY = X.y0 + X.dy / 2;
        }
        function ee(X) {
          return function(Q) {
            return Q.node.originalX === X.node.originalX;
          };
        }
        o.exports = function(X, Q, ue, ce, he) {
          var de = X._context.staticPlot, ne = !1;
          g.ensureSingle(X._fullLayout._infolayer, "g", "first-render", function() {
            ne = !0;
          });
          var ae = X._fullLayout._dragCover, se = ue.filter(function(De) {
            return A(De).trace.visible;
          }).map(I.bind(null, ce)), me = Q.selectAll("." + _.cn.sankey).data(se, k);
          me.exit().remove(), me.enter().append("g").classed(_.cn.sankey, !0).style("box-sizing", "content-box").style("position", "absolute").style("left", 0).style("shape-rendering", "geometricPrecision").style("pointer-events", de ? "none" : "auto").attr("transform", q), me.each(function(De, Le) {
            X._fullData[Le]._sankey = De;
            var We = "bgsankey-" + De.trace.uid + "-" + Le;
            g.ensureSingle(X._fullLayout._draggers, "rect", We), X._fullData[Le]._bgRect = i.select("." + We), X._fullData[Le]._bgRect.style("pointer-events", de ? "none" : "all").attr("width", De.width).attr("height", De.height).attr("x", De.translateX).attr("y", De.translateY).classed("bgsankey", !0).style({ fill: "transparent", "stroke-width": 0 });
          }), me.transition().ease(_.ease).duration(_.duration).attr("transform", q);
          var ye = me.selectAll("." + _.cn.sankeyLinks).data(S, k);
          ye.enter().append("g").classed(_.cn.sankeyLinks, !0).style("fill", "none");
          var pe = ye.selectAll("." + _.cn.sankeyLink).data(function(De) {
            return De.graph.links.filter(function(Le) {
              return Le.value;
            }).map(M.bind(null, De));
          }, k);
          pe.enter().append("path").classed(_.cn.sankeyLink, !0).call(K, me, he.linkEvents), pe.style("stroke", function(De) {
            return $(De) ? f.tinyRGB(d(De.linkLineColor)) : De.tinyColorHue;
          }).style("stroke-opacity", function(De) {
            return $(De) ? f.opacity(De.linkLineColor) : De.tinyColorAlpha;
          }).style("fill", function(De) {
            return De.tinyColorHue;
          }).style("fill-opacity", function(De) {
            return De.tinyColorAlpha;
          }).style("stroke-width", function(De) {
            return $(De) ? De.linkLineWidth : 1;
          }).attr("d", O()), pe.style("opacity", function() {
            return X._context.staticPlot || ne || ae ? 1 : 0;
          }).transition().ease(_.ease).duration(_.duration).style("opacity", 1), pe.exit().transition().ease(_.ease).duration(_.duration).style("opacity", 0).remove();
          var be = me.selectAll("." + _.cn.sankeyNodeSet).data(S, k);
          be.enter().append("g").classed(_.cn.sankeyNodeSet, !0), be.style("cursor", function(De) {
            switch (De.arrangement) {
              case "fixed":
                return "default";
              case "perpendicular":
                return "ns-resize";
              default:
                return "move";
            }
          });
          var Ae = be.selectAll("." + _.cn.sankeyNode).data(function(De) {
            var Le = De.graph.nodes;
            return function(We) {
              var Ee, Ne = [];
              for (Ee = 0; Ee < We.length; Ee++) We[Ee].originalX = (We[Ee].x0 + We[Ee].x1) / 2, We[Ee].originalY = (We[Ee].y0 + We[Ee].y1) / 2, Ne.indexOf(We[Ee].originalX) === -1 && Ne.push(We[Ee].originalX);
              for (Ne.sort(function(Ie, ge) {
                return Ie - ge;
              }), Ee = 0; Ee < We.length; Ee++) We[Ee].originalLayerIndex = Ne.indexOf(We[Ee].originalX), We[Ee].originalLayer = We[Ee].originalLayerIndex / (Ne.length - 1);
            }(Le), Le.map(T.bind(null, De));
          }, k);
          Ae.enter().append("g").classed(_.cn.sankeyNode, !0).call(z).style("opacity", function(De) {
            return !X._context.staticPlot && !ne || De.partOfGroup ? 0 : 1;
          }), Ae.call(K, me, he.nodeEvents).call(re, pe, he, X), Ae.transition().ease(_.ease).duration(_.duration).call(z).style("opacity", function(De) {
            return De.partOfGroup ? 0 : 1;
          }), Ae.exit().transition().ease(_.ease).duration(_.duration).style("opacity", 0).remove();
          var Se = Ae.selectAll("." + _.cn.nodeRect).data(S);
          Se.enter().append("rect").classed(_.cn.nodeRect, !0).call(V), Se.style("stroke-width", function(De) {
            return De.nodeLineWidth;
          }).style("stroke", function(De) {
            return f.tinyRGB(d(De.nodeLineColor));
          }).style("stroke-opacity", function(De) {
            return f.opacity(De.nodeLineColor);
          }).style("fill", function(De) {
            return De.tinyColorHue;
          }).style("fill-opacity", function(De) {
            return De.tinyColorAlpha;
          }), Se.transition().ease(_.ease).duration(_.duration).call(V);
          var Me = Ae.selectAll("." + _.cn.nodeLabel).data(S);
          Me.enter().append("text").classed(_.cn.nodeLabel, !0).style("cursor", "default"), Me.attr("data-notex", 1).text(function(De) {
            return De.node.label;
          }).each(function(De) {
            var Le = i.select(this);
            c.font(Le, De.textFont), C.convertToTspans(Le, X);
          }).attr("text-anchor", function(De) {
            return De.horizontal && De.left ? "end" : "start";
          }).attr("transform", function(De) {
            var Le = i.select(this), We = C.lineCount(Le), Ee = De.textFont.size * ((We - 1) * P - E), Ne = De.nodeLineWidth / 2 + 3, Ie = ((De.horizontal ? De.visibleHeight : De.visibleWidth) - Ee) / 2;
            De.horizontal && (De.left ? Ne = -Ne : Ne += De.visibleWidth);
            var ge = De.horizontal ? "" : "scale(-1,1)" + x(90);
            return m(De.horizontal ? Ne : Ie, De.horizontal ? Ie : Ne) + ge;
          }), Me.transition().ease(_.ease).duration(_.duration);
        };
      }, 74670: function(o) {
        o.exports = function(s, n) {
          for (var l = [], u = s.cd[0].trace, i = u._sankey.graph.nodes, h = 0; h < i.length; h++) {
            var p = i[h];
            if (!p.partOfGroup) {
              var _ = [(p.x0 + p.x1) / 2, (p.y0 + p.y1) / 2];
              u.orientation === "v" && _.reverse(), n && n.contains(_, !1, h, s) && l.push({ pointNumber: p.pointNumber });
            }
          }
          return l;
        };
      }, 99203: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          for (var h = 0; h < u.length; h++) u[h].i = h;
          l.mergeArray(i.text, u, "tx"), l.mergeArray(i.texttemplate, u, "txt"), l.mergeArray(i.hovertext, u, "htx"), l.mergeArray(i.customdata, u, "data"), l.mergeArray(i.textposition, u, "tp"), i.textfont && (l.mergeArrayCastPositive(i.textfont.size, u, "ts"), l.mergeArray(i.textfont.color, u, "tc"), l.mergeArray(i.textfont.family, u, "tf"), l.mergeArray(i.textfont.weight, u, "tw"), l.mergeArray(i.textfont.style, u, "ty"), l.mergeArray(i.textfont.variant, u, "tv"), l.mergeArray(i.textfont.textcase, u, "tC"), l.mergeArray(i.textfont.lineposition, u, "tE"), l.mergeArray(i.textfont.shadow, u, "tS"));
          var p = i.marker;
          if (p) {
            l.mergeArrayCastPositive(p.size, u, "ms"), l.mergeArrayCastPositive(p.opacity, u, "mo"), l.mergeArray(p.symbol, u, "mx"), l.mergeArray(p.angle, u, "ma"), l.mergeArray(p.standoff, u, "mf"), l.mergeArray(p.color, u, "mc");
            var _ = p.line;
            p.line && (l.mergeArray(_.color, u, "mlc"), l.mergeArrayCastPositive(_.width, u, "mlw"));
            var d = p.gradient;
            d && d.type !== "none" && (l.mergeArray(d.type, u, "mgt"), l.mergeArray(d.color, u, "mgc"));
          }
        };
      }, 36640: function(o, s, n) {
        var l = n(80712).axisHoverFormat, u = n(3208).ay, i = n(3208).rb, h = n(87163), p = n(80337), _ = n(94850).T, d = n(94850).k, f = n(62203), c = n(32660), g = n(93049).extendFlat, m = n(19326);
        o.exports = { x: { valType: "data_array", editType: "calc+clearAxisTypes", anim: !0 }, x0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes", anim: !0 }, dx: { valType: "number", dflt: 1, editType: "calc", anim: !0 }, y: { valType: "data_array", editType: "calc+clearAxisTypes", anim: !0 }, y0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes", anim: !0 }, dy: { valType: "number", dflt: 1, editType: "calc", anim: !0 }, xperiod: { valType: "any", dflt: 0, editType: "calc" }, yperiod: { valType: "any", dflt: 0, editType: "calc" }, xperiod0: { valType: "any", editType: "calc" }, yperiod0: { valType: "any", editType: "calc" }, xperiodalignment: { valType: "enumerated", values: ["start", "middle", "end"], dflt: "middle", editType: "calc" }, yperiodalignment: { valType: "enumerated", values: ["start", "middle", "end"], dflt: "middle", editType: "calc" }, xhoverformat: l("x"), yhoverformat: l("y"), offsetgroup: { valType: "string", dflt: "", editType: "calc" }, alignmentgroup: { valType: "string", dflt: "", editType: "calc" }, stackgroup: { valType: "string", dflt: "", editType: "calc" }, orientation: { valType: "enumerated", values: ["v", "h"], editType: "calc" }, groupnorm: { valType: "enumerated", values: ["", "fraction", "percent"], dflt: "", editType: "calc" }, stackgaps: { valType: "enumerated", values: ["infer zero", "interpolate"], dflt: "infer zero", editType: "calc" }, text: { valType: "string", dflt: "", arrayOk: !0, editType: "calc" }, texttemplate: u({}, {}), hovertext: { valType: "string", dflt: "", arrayOk: !0, editType: "style" }, mode: { valType: "flaglist", flags: ["lines", "markers", "text"], extras: ["none"], editType: "calc" }, hoveron: { valType: "flaglist", flags: ["points", "fills"], editType: "style" }, hovertemplate: i({}, { keys: c.eventDataKeys }), line: { color: { valType: "color", editType: "style", anim: !0 }, width: { valType: "number", min: 0, dflt: 2, editType: "style", anim: !0 }, shape: { valType: "enumerated", values: ["linear", "spline", "hv", "vh", "hvh", "vhv"], dflt: "linear", editType: "plot" }, smoothing: { valType: "number", min: 0, max: 1.3, dflt: 1, editType: "plot" }, dash: g({}, _, { editType: "style" }), backoff: { valType: "number", min: 0, dflt: "auto", arrayOk: !0, editType: "plot" }, simplify: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, connectgaps: { valType: "boolean", dflt: !1, editType: "calc" }, cliponaxis: { valType: "boolean", dflt: !0, editType: "plot" }, fill: { valType: "enumerated", values: ["none", "tozeroy", "tozerox", "tonexty", "tonextx", "toself", "tonext"], editType: "calc" }, fillcolor: m(!0), fillgradient: g({ type: { valType: "enumerated", values: ["radial", "horizontal", "vertical", "none"], dflt: "none", editType: "calc" }, start: { valType: "number", editType: "calc" }, stop: { valType: "number", editType: "calc" }, colorscale: { valType: "colorscale", editType: "style" }, editType: "calc" }), fillpattern: d, marker: g({ symbol: { valType: "enumerated", values: f.symbolList, dflt: "circle", arrayOk: !0, editType: "style" }, opacity: { valType: "number", min: 0, max: 1, arrayOk: !0, editType: "style", anim: !0 }, angle: { valType: "angle", dflt: 0, arrayOk: !0, editType: "plot", anim: !1 }, angleref: { valType: "enumerated", values: ["previous", "up"], dflt: "up", editType: "plot", anim: !1 }, standoff: { valType: "number", min: 0, dflt: 0, arrayOk: !0, editType: "plot", anim: !0 }, size: { valType: "number", min: 0, dflt: 6, arrayOk: !0, editType: "calc", anim: !0 }, maxdisplayed: { valType: "number", min: 0, dflt: 0, editType: "plot" }, sizeref: { valType: "number", dflt: 1, editType: "calc" }, sizemin: { valType: "number", min: 0, dflt: 0, editType: "calc" }, sizemode: { valType: "enumerated", values: ["diameter", "area"], dflt: "diameter", editType: "calc" }, line: g({ width: { valType: "number", min: 0, arrayOk: !0, editType: "style", anim: !0 }, editType: "calc" }, h("marker.line", { anim: !0 })), gradient: { type: { valType: "enumerated", values: ["radial", "horizontal", "vertical", "none"], arrayOk: !0, dflt: "none", editType: "calc" }, color: { valType: "color", arrayOk: !0, editType: "calc" }, editType: "calc" }, editType: "calc" }, h("marker", { anim: !0 })), selected: { marker: { opacity: { valType: "number", min: 0, max: 1, editType: "style" }, color: { valType: "color", editType: "style" }, size: { valType: "number", min: 0, editType: "style" }, editType: "style" }, textfont: { color: { valType: "color", editType: "style" }, editType: "style" }, editType: "style" }, unselected: { marker: { opacity: { valType: "number", min: 0, max: 1, editType: "style" }, color: { valType: "color", editType: "style" }, size: { valType: "number", min: 0, editType: "style" }, editType: "style" }, textfont: { color: { valType: "color", editType: "style" }, editType: "style" }, editType: "style" }, textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right"], dflt: "middle center", arrayOk: !0, editType: "calc" }, textfont: p({ editType: "calc", colorEditType: "style", arrayOk: !0 }), zorder: { valType: "integer", dflt: 0, editType: "plot" } };
      }, 26544: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(29714), h = n(40528), p = n(63821).BADNUM, _ = n(64726), d = n(77272), f = n(99203), c = n(48861);
        function g(S, A, C, D, L, E, P) {
          var I = A._length, M = S._fullLayout, O = C._id, T = D._id, z = M._firstScatter[w(A)] === A.uid, F = (k(A, M, C, D) || {}).orientation, U = A.fill;
          C._minDtick = 0, D._minDtick = 0;
          var V = { padded: !0 }, $ = { padded: !0 };
          P && (V.ppad = $.ppad = P);
          var q = I < 2 || L[0] !== L[I - 1] || E[0] !== E[I - 1];
          q && (U === "tozerox" || U === "tonextx" && (z || F === "h")) ? V.tozero = !0 : (A.error_y || {}).visible || U !== "tonexty" && U !== "tozeroy" && (_.hasMarkers(A) || _.hasText(A)) || (V.padded = !1, V.ppad = 0), q && (U === "tozeroy" || U === "tonexty" && (z || F === "v")) ? $.tozero = !0 : U !== "tonextx" && U !== "tozerox" || ($.padded = !1), O && (A._extremes[O] = i.findExtremes(C, L, V)), T && (A._extremes[T] = i.findExtremes(D, E, $));
        }
        function m(S, A) {
          if (_.hasMarkers(S)) {
            var C, D = S.marker, L = 1.6 * (S.marker.sizeref || 1);
            if (C = S.marker.sizemode === "area" ? function(O) {
              return Math.max(Math.sqrt((O || 0) / L), 3);
            } : function(O) {
              return Math.max((O || 0) / L, 3);
            }, u.isArrayOrTypedArray(D.size)) {
              var E = { type: "linear" };
              i.setConvert(E);
              for (var P = E.makeCalcdata(S.marker, "size"), I = new Array(A), M = 0; M < A; M++) I[M] = C(P[M]);
              return I;
            }
            return C(D.size);
          }
        }
        function x(S, A) {
          var C = w(A), D = S._firstScatter;
          D[C] || (D[C] = A.uid);
        }
        function w(S) {
          var A = S.stackgroup;
          return S.xaxis + S.yaxis + S.type + (A ? "-" + A : "");
        }
        function k(S, A, C, D) {
          var L = S.stackgroup;
          if (L) {
            var E = A._scatterStackOpts[C._id + D._id][L], P = E.orientation === "v" ? D : C;
            return P.type === "linear" || P.type === "log" ? E : void 0;
          }
        }
        o.exports = { calc: function(S, A) {
          var C, D, L, E, P, I, M = S._fullLayout, O = A._xA = i.getFromId(S, A.xaxis || "x", "x"), T = A._yA = i.getFromId(S, A.yaxis || "y", "y"), z = O.makeCalcdata(A, "x"), F = T.makeCalcdata(A, "y"), U = h(A, O, "x", z), V = h(A, T, "y", F), $ = U.vals, q = V.vals, K = A._length, re = new Array(K), Y = A.ids, te = k(A, M, O, T), ee = !1;
          x(M, A);
          var X, Q = "x", ue = "y";
          te ? (u.pushUnique(te.traceIndices, A._expandedIndex), (C = te.orientation === "v") ? (ue = "s", X = "x") : (Q = "s", X = "y"), P = te.stackgaps === "interpolate") : g(S, A, O, T, $, q, m(A, K));
          var ce = !!A.xperiodalignment, he = !!A.yperiodalignment;
          for (D = 0; D < K; D++) {
            var de = re[D] = {}, ne = l($[D]), ae = l(q[D]);
            ne && ae ? (de[Q] = $[D], de[ue] = q[D], ce && (de.orig_x = z[D], de.xEnd = U.ends[D], de.xStart = U.starts[D]), he && (de.orig_y = F[D], de.yEnd = V.ends[D], de.yStart = V.starts[D])) : te && (C ? ne : ae) ? (de[X] = C ? $[D] : q[D], de.gap = !0, P ? (de.s = p, ee = !0) : de.s = 0) : de[Q] = de[ue] = p, Y && (de.id = String(Y[D]));
          }
          if (f(re, A), d(S, A), c(re, A), te) {
            for (D = 0; D < re.length; ) re[D][X] === p ? re.splice(D, 1) : D++;
            if (u.sort(re, function(pe, be) {
              return pe[X] - be[X] || pe.i - be.i;
            }), ee) {
              for (D = 0; D < re.length - 1 && re[D].gap; ) D++;
              for ((I = re[D].s) || (I = re[D].s = 0), L = 0; L < D; L++) re[L].s = I;
              for (E = re.length - 1; E > D && re[E].gap; ) E--;
              for (I = re[E].s, L = re.length - 1; L > E; L--) re[L].s = I;
              for (; D < E; ) if (re[++D].gap) {
                for (L = D + 1; re[L].gap; ) L++;
                for (var se = re[D - 1][X], me = re[D - 1].s, ye = (re[L].s - me) / (re[L][X] - se); D < L; ) re[D].s = me + (re[D][X] - se) * ye, D++;
              }
            }
          }
          return re;
        }, calcMarkerSize: m, calcAxisExpansion: g, setFirstScatter: x, getStackOpts: k };
      }, 48861: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          l.isArrayOrTypedArray(i.selectedpoints) && l.tagSelected(u, i);
        };
      }, 77272: function(o, s, n) {
        var l = n(65477).hasColorscale, u = n(28379), i = n(64726);
        o.exports = function(h, p) {
          i.hasLines(p) && l(p, "line") && u(h, p, { vals: p.line.color, containerStr: "line", cLetter: "c" }), i.hasMarkers(p) && (l(p, "marker") && u(h, p, { vals: p.marker.color, containerStr: "marker", cLetter: "c" }), l(p, "marker.line") && u(h, p, { vals: p.marker.line.color, containerStr: "marker.line", cLetter: "c" }));
        };
      }, 32660: function(o) {
        o.exports = { PTS_LINESONLY: 20, minTolerance: 0.2, toleranceGrowth: 10, maxScreensAway: 20, eventDataKeys: [] };
      }, 75603: function(o, s, n) {
        var l = n(26544), u = n(24782).setGroupPositions;
        function i(h, p, _, d, f, c, g) {
          f[d] = !0;
          var m = { i: null, gap: !0, s: 0 };
          if (m[g] = _, h.splice(p, 0, m), p && _ === h[p - 1][g]) {
            var x = h[p - 1];
            m.s = x.s, m.i = x.i, m.gap = x.gap;
          } else c && (m.s = function(w, k, S, A) {
            var C = w[k - 1], D = w[k + 1];
            return D ? C ? C.s + (D.s - C.s) * (S - C[A]) / (D[A] - C[A]) : D.s : C.s;
          }(h, p, _, g));
          p || (h[0].t = h[1].t, h[0].trace = h[1].trace, delete h[1].t, delete h[1].trace);
        }
        o.exports = function(h, p) {
          h._fullLayout.scattermode === "group" && function(X, Q) {
            for (var ue = Q.xaxis, ce = Q.yaxis, he = X._fullLayout, de = X._fullData, ne = X.calcdata, ae = [], se = [], me = 0; me < de.length; me++) {
              var ye = de[me];
              ye.visible === !0 && ye.type === "scatter" && ye.xaxis === ue._id && ye.yaxis === ce._id && (ye.orientation === "h" ? ae.push(ne[me]) : ye.orientation === "v" && se.push(ne[me]));
            }
            var pe = { mode: he.scattermode, gap: he.scattergap };
            u(X, ue, ce, se, pe), u(X, ce, ue, ae, pe);
          }(h, p);
          var _ = p.xaxis, d = p.yaxis, f = _._id + d._id, c = h._fullLayout._scatterStackOpts[f];
          if (c) {
            var g, m, x, w, k, S, A, C, D, L, E, P, I, M, O, T = h.calcdata;
            for (var z in c) {
              var F = (L = c[z]).traceIndices;
              if (F.length) {
                for (E = L.stackgaps === "interpolate", P = L.groupnorm, L.orientation === "v" ? (I = "x", M = "y") : (I = "y", M = "x"), O = new Array(F.length), g = 0; g < O.length; g++) O[g] = !1;
                S = T[F[0]];
                var U = new Array(S.length);
                for (g = 0; g < S.length; g++) U[g] = S[g][I];
                for (g = 1; g < F.length; g++) {
                  for (k = T[F[g]], m = x = 0; m < k.length; m++) {
                    for (A = k[m][I]; A > U[x] && x < U.length; x++) i(k, m, U[x], g, O, E, I), m++;
                    if (A !== U[x]) {
                      for (w = 0; w < g; w++) i(T[F[w]], x, A, w, O, E, I);
                      U.splice(x, 0, A);
                    }
                    x++;
                  }
                  for (; x < U.length; x++) i(k, m, U[x], g, O, E, I), m++;
                }
                var V = U.length;
                for (m = 0; m < S.length; m++) {
                  for (C = S[m][M] = S[m].s, g = 1; g < F.length; g++) (k = T[F[g]])[0].trace._rawLength = k[0].trace._length, k[0].trace._length = V, C += k[m].s, k[m][M] = C;
                  if (P) for (D = (P === "fraction" ? C : C / 100) || 1, g = 0; g < F.length; g++) {
                    var $ = T[F[g]][m];
                    $[M] /= D, $.sNorm = $.s / D;
                  }
                }
                for (g = 0; g < F.length; g++) {
                  var q = (k = T[F[g]])[0].trace, K = l.calcMarkerSize(q, q._rawLength), re = Array.isArray(K);
                  if (K && O[g] || re) {
                    var Y = K;
                    for (K = new Array(V), m = 0; m < V; m++) K[m] = k[m].gap ? 0 : re ? Y[k[m].i] : Y;
                  }
                  var te = new Array(V), ee = new Array(V);
                  for (m = 0; m < V; m++) te[m] = k[m].x, ee[m] = k[m].y;
                  l.calcAxisExpansion(h, q, _, d, te, ee, K), k[0].t.orientation = L.orientation;
                }
              }
            }
          }
        };
      }, 53044: function(o, s, n) {
        var l = n(34809), u = n(36301), i = n(36640);
        o.exports = function(h, p) {
          var _, d, f;
          function c(k) {
            return l.coerce(d._input, d, i, k);
          }
          if (p.scattermode === "group") for (f = 0; f < h.length; f++) (d = h[f]).type === "scatter" && (_ = d._input, u(_, d, p, c));
          for (f = 0; f < h.length; f++) {
            var g = h[f];
            if (g.type === "scatter") {
              var m = g.fill;
              if (m !== "none" && m !== "toself" && (g.opacity = void 0, m === "tonexty" || m === "tonextx")) for (var x = f - 1; x >= 0; x--) {
                var w = h[x];
                if (w.type === "scatter" && w.xaxis === g.xaxis && w.yaxis === g.yaxis) {
                  w.opacity = void 0;
                  break;
                }
              }
            }
          }
        };
      }, 40247: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(36640), h = n(32660), p = n(64726), _ = n(99867), d = n(99669), f = n(382), c = n(24272), g = n(98168), m = n(91602), x = n(663), w = n(54114), k = n(34809).coercePattern;
        o.exports = function(S, A, C, D) {
          function L(F, U) {
            return l.coerce(S, A, i, F, U);
          }
          var E = _(S, A, D, L);
          if (E || (A.visible = !1), A.visible) {
            d(S, A, D, L), L("xhoverformat"), L("yhoverformat"), L("zorder");
            var P = f(S, A, D, L);
            D.scattermode === "group" && A.orientation === void 0 && L("orientation", "v");
            var I = !P && E < h.PTS_LINESONLY ? "lines+markers" : "lines";
            L("text"), L("hovertext"), L("mode", I), p.hasMarkers(A) && c(S, A, C, D, L, { gradient: !0 }), p.hasLines(A) && (g(S, A, C, D, L, { backoff: !0 }), m(S, A, L), L("connectgaps"), L("line.simplify")), p.hasText(A) && (L("texttemplate"), x(S, A, D, L));
            var M = [];
            (p.hasMarkers(A) || p.hasText(A)) && (L("cliponaxis"), L("marker.maxdisplayed"), M.push("points")), L("fill", P ? P.fillDflt : "none"), A.fill !== "none" && (w(S, A, C, L, { moduleHasFillgradient: !0 }), p.hasLines(A) || m(S, A, L), k(L, "fillpattern", A.fillcolor, !1));
            var O = (A.line || {}).color, T = (A.marker || {}).color;
            A.fill !== "tonext" && A.fill !== "toself" || M.push("fills"), L("hoveron", M.join("+") || "points"), A.hoveron !== "fills" && L("hovertemplate");
            var z = u.getComponentMethod("errorbars", "supplyDefaults");
            z(S, A, O || T || C, { axis: "y" }), z(S, A, O || T || C, { axis: "x", inherit: "y" }), l.coerceSelectionMarkerOpacity(A, L);
          }
        };
      }, 19326: function(o) {
        o.exports = function(s) {
          return { valType: "color", editType: "style", anim: !0 };
        };
      }, 54114: function(o, s, n) {
        var l = n(78766), u = n(34809).isArrayOrTypedArray;
        o.exports = function(i, h, p, _, d) {
          d || (d = {});
          var f, c = !1;
          if (h.marker) {
            var g = h.marker.color, m = (h.marker.line || {}).color;
            g && !u(g) ? c = g : m && !u(m) && (c = m);
          }
          if (d.moduleHasFillgradient && _("fillgradient.type") !== "none") {
            _("fillgradient.start"), _("fillgradient.stop");
            var x = _("fillgradient.colorscale");
            x && (f = function(w) {
              for (var k = l.interpolate(w[0][1], w[1][1], 0.5), S = 2; S < w.length; S++) {
                var A = l.interpolate(w[S - 1][1], w[S][1], 0.5);
                k = l.interpolate(k, A, w[S - 1][0] / w[S][0]);
              }
              return k;
            }(x));
          }
          _("fillcolor", l.addOpacity((h.line || {}).color || c || f || p, 0.5));
        };
      }, 15294: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = { _fullLayout: h }, d = l.getFromTrace(_, i, "x"), f = l.getFromTrace(_, i, "y"), c = u.orig_x;
          c === void 0 && (c = u.x);
          var g = u.orig_y;
          return g === void 0 && (g = u.y), p.xLabel = l.tickText(d, d.c2l(c), !0).text, p.yLabel = l.tickText(f, f.c2l(g), !0).text, p;
        };
      }, 11539: function(o, s, n) {
        var l = n(78766), u = n(64726);
        o.exports = function(i, h) {
          var p, _;
          if (i.mode === "lines") return (p = i.line.color) && l.opacity(p) ? p : i.fillcolor;
          if (i.mode === "none") return i.fill ? i.fillcolor : "";
          var d = h.mcc || (i.marker || {}).color, f = h.mlcc || ((i.marker || {}).line || {}).color;
          return (_ = d && l.opacity(d) ? d : f && l.opacity(f) && (h.mlw || ((i.marker || {}).line || {}).width) ? f : "") ? l.opacity(_) < 0.3 ? l.addOpacity(_, 0.3) : _ : (p = (i.line || {}).color) && l.opacity(p) && u.hasLines(i) && i.line.width ? p : i.fillcolor;
        };
      }, 36301: function(o, s, n) {
        var l = n(84391).getAxisGroup;
        o.exports = function(u, i, h, p) {
          var _ = i.orientation, d = i[{ v: "x", h: "y" }[_] + "axis"], f = l(h, d) + _, c = h._alignmentOpts || {}, g = p("alignmentgroup"), m = c[f];
          m || (m = c[f] = {});
          var x = m[g];
          x ? x.traces.push(i) : x = m[g] = { traces: [i], alignmentIndex: Object.keys(m).length, offsetGroups: {} };
          var w = p("offsetgroup"), k = x.offsetGroups, S = k[w];
          w && (S || (S = k[w] = { offsetIndex: Object.keys(k).length }), i._offsetIndex = S.offsetIndex);
        };
      }, 37255: function(o, s, n) {
        var l = n(34809), u = n(32141), i = n(33626), h = n(11539), p = n(78766), _ = l.fillText;
        o.exports = function(d, f, c, g) {
          var m = d.cd, x = m[0].trace, w = d.xa, k = d.ya, S = w.c2p(f), A = k.c2p(c), C = [S, A], D = x.hoveron || "", L = x.mode.indexOf("markers") !== -1 ? 3 : 0.5, E = !!x.xperiodalignment, P = !!x.yperiodalignment;
          if (D.indexOf("points") !== -1) {
            var I = function(te) {
              var ee = Math.max(L, te.mrc || 0), X = w.c2p(te.x) - S, Q = k.c2p(te.y) - A;
              return Math.max(Math.sqrt(X * X + Q * Q) - ee, 1 - L / ee);
            }, M = u.getDistanceFunction(g, function(te) {
              if (E) {
                var ee = w.c2p(te.xStart), X = w.c2p(te.xEnd);
                return S >= Math.min(ee, X) && S <= Math.max(ee, X) ? 0 : 1 / 0;
              }
              var Q = Math.max(3, te.mrc || 0), ue = 1 - 1 / Q, ce = Math.abs(w.c2p(te.x) - S);
              return ce < Q ? ue * ce / Q : ce - Q + ue;
            }, function(te) {
              if (P) {
                var ee = k.c2p(te.yStart), X = k.c2p(te.yEnd);
                return A >= Math.min(ee, X) && A <= Math.max(ee, X) ? 0 : 1 / 0;
              }
              var Q = Math.max(3, te.mrc || 0), ue = 1 - 1 / Q, ce = Math.abs(k.c2p(te.y) - A);
              return ce < Q ? ue * ce / Q : ce - Q + ue;
            }, I);
            if (u.getClosest(m, M, d), d.index !== !1) {
              var O = m[d.index], T = w.c2p(O.x, !0), z = k.c2p(O.y, !0), F = O.mrc || 1;
              d.index = O.i;
              var U = m[0].t.orientation, V = U && (O.sNorm || O.s), $ = U === "h" ? V : O.orig_x !== void 0 ? O.orig_x : O.x, q = U === "v" ? V : O.orig_y !== void 0 ? O.orig_y : O.y;
              return l.extendFlat(d, { color: h(x, O), x0: T - F, x1: T + F, xLabelVal: $, y0: z - F, y1: z + F, yLabelVal: q, spikeDistance: I(O), hovertemplate: x.hovertemplate }), _(O, x, d), i.getComponentMethod("errorbars", "hoverInfo")(O, x, d), [d];
            }
          }
          function K(te) {
            if (!te) return !1;
            var ee = te.node();
            try {
              var X = new DOMPoint(C[0], C[1]);
              return ee.isPointInFill(X);
            } catch {
              var Q = ee.ownerSVGElement.createSVGPoint();
              return Q.x = C[0], Q.y = C[1], ee.isPointInFill(Q);
            }
          }
          if (D.indexOf("fills") !== -1 && x._fillElement && K(x._fillElement) && !K(x._fillExclusionElement)) {
            var re = function(te) {
              var ee, X, Q, ue, ce, he, de, ne, ae, se = [], me = 1 / 0, ye = -1 / 0, pe = 1 / 0, be = -1 / 0;
              for (ee = 0; ee < te.length; ee++) {
                var Ae = te[ee];
                Ae.contains(C) && (se.push(Ae), pe = Math.min(pe, Ae.ymin), be = Math.max(be, Ae.ymax));
              }
              if (se.length === 0) return null;
              for (X = ((pe = Math.max(pe, 0)) + (be = Math.min(be, k._length))) / 2, ee = 0; ee < se.length; ee++) for (ue = se[ee].pts, Q = 1; Q < ue.length; Q++) (ne = ue[Q - 1][1]) > X != (ae = ue[Q][1]) >= X && (he = ue[Q - 1][0], de = ue[Q][0], ae - ne && (ce = he + (de - he) * (X - ne) / (ae - ne), me = Math.min(me, ce), ye = Math.max(ye, ce)));
              return { x0: me = Math.max(me, 0), x1: ye = Math.min(ye, w._length), y0: X, y1: X };
            }(x._polygons);
            re === null && (re = { x0: C[0], x1: C[0], y0: C[1], y1: C[1] });
            var Y = p.defaultLine;
            return p.opacity(x.fillcolor) ? Y = x.fillcolor : p.opacity((x.line || {}).color) && (Y = x.line.color), l.extendFlat(d, { distance: d.maxHoverDistance, x0: re.x0, x1: re.x1, y0: re.y0, y1: re.y1, color: Y, hovertemplate: !1 }), delete d.index, x.text && !l.isArrayOrTypedArray(x.text) ? d.text = String(x.text) : d.text = x.name, [d];
          }
        };
      }, 69693: function(o, s, n) {
        var l = n(64726);
        o.exports = { hasLines: l.hasLines, hasMarkers: l.hasMarkers, hasText: l.hasText, isBubble: l.isBubble, attributes: n(36640), layoutAttributes: n(26667), supplyDefaults: n(40247), crossTraceDefaults: n(53044), supplyLayoutDefaults: n(12332), calc: n(26544).calc, crossTraceCalc: n(75603), arraysToCalcdata: n(99203), plot: n(36098), colorbar: n(21146), formatLabels: n(15294), style: n(9408).style, styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(37255), selectPoints: n(32665), animatable: !0, moduleType: "trace", name: "scatter", basePlotModule: n(37703), categories: ["cartesian", "svg", "symbols", "errorBarsOK", "showLegend", "scatter-like", "zoomScale"], meta: {} };
      }, 26667: function(o) {
        o.exports = { scattermode: { valType: "enumerated", values: ["group", "overlay"], dflt: "overlay", editType: "calc" }, scattergap: { valType: "number", min: 0, max: 1, editType: "calc" } };
      }, 12332: function(o, s, n) {
        var l = n(34809), u = n(26667);
        o.exports = function(i, h) {
          var p, _ = h.barmode === "group";
          h.scattermode === "group" && (p = _ ? h.bargap : 0.2, l.coerce(i, h, u, "scattergap", p));
        };
      }, 98168: function(o, s, n) {
        var l = n(34809).isArrayOrTypedArray, u = n(65477).hasColorscale, i = n(39356);
        o.exports = function(h, p, _, d, f, c) {
          c || (c = {});
          var g = (h.marker || {}).color;
          g && g._inputArray && (g = g._inputArray), f("line.color", _), u(h, "line") ? i(h, p, d, f, { prefix: "line.", cLetter: "c" }) : f("line.color", !l(g) && g || _), f("line.width"), c.noDash || f("line.dash"), c.backoff && f("line.backoff");
        };
      }, 5525: function(o, s, n) {
        var l = n(62203), u = n(63821), i = u.BADNUM, h = u.LOG_CLIP, p = h + 0.5, _ = h - 0.5, d = n(34809), f = d.segmentsIntersect, c = d.constrain, g = n(32660);
        o.exports = function(m, x) {
          var w, k, S, A, C, D, L, E, P, I, M, O, T, z, F, U, V, $, q = x.trace || {}, K = x.xaxis, re = x.yaxis, Y = K.type === "log", te = re.type === "log", ee = K._length, X = re._length, Q = x.backoff, ue = q.marker, ce = x.connectGaps, he = x.baseTolerance, de = x.shape, ne = de === "linear", ae = q.fill && q.fill !== "none", se = [], me = g.minTolerance, ye = m.length, pe = new Array(ye), be = 0;
          function Ae(nt) {
            var ot = m[nt];
            if (!ot) return !1;
            var Ye = x.linearized ? K.l2p(ot.x) : K.c2p(ot.x), Fe = x.linearized ? re.l2p(ot.y) : re.c2p(ot.y);
            if (Ye === i) {
              if (Y && (Ye = K.c2p(ot.x, !0)), Ye === i) return !1;
              te && Fe === i && (Ye *= Math.abs(K._m * X * (K._m > 0 ? p : _) / (re._m * ee * (re._m > 0 ? p : _)))), Ye *= 1e3;
            }
            if (Fe === i) {
              if (te && (Fe = re.c2p(ot.y, !0)), Fe === i) return !1;
              Fe *= 1e3;
            }
            return [Ye, Fe];
          }
          function Se(nt, ot, Ye, Fe) {
            var pt = Ye - nt, Mt = Fe - ot, At = 0.5 - nt, Rt = 0.5 - ot, Ft = pt * pt + Mt * Mt, lt = pt * At + Mt * Rt;
            if (lt > 0 && lt < Ft) {
              var st = At * Mt - Rt * pt;
              if (st * st < Ft) return !0;
            }
          }
          function Me(nt, ot) {
            var Ye = nt[0] / ee, Fe = nt[1] / X, pt = Math.max(0, -Ye, Ye - 1, -Fe, Fe - 1);
            return pt && V !== void 0 && Se(Ye, Fe, V, $) && (pt = 0), pt && ot && Se(Ye, Fe, ot[0] / ee, ot[1] / X) && (pt = 0), (1 + g.toleranceGrowth * pt) * he;
          }
          function De(nt, ot) {
            var Ye = nt[0] - ot[0], Fe = nt[1] - ot[1];
            return Math.sqrt(Ye * Ye + Fe * Fe);
          }
          var Le, We, Ee, Ne, Ie, ge, Ce, we = g.maxScreensAway, Ge = -ee * we, Re = ee * (1 + we), je = -X * we, Ke = X * (1 + we), tt = [[Ge, je, Re, je], [Re, je, Re, Ke], [Re, Ke, Ge, Ke], [Ge, Ke, Ge, je]];
          function _e(nt) {
            if (nt[0] < Ge || nt[0] > Re || nt[1] < je || nt[1] > Ke) return [c(nt[0], Ge, Re), c(nt[1], je, Ke)];
          }
          function Be(nt, ot) {
            return nt[0] === ot[0] && (nt[0] === Ge || nt[0] === Re) || nt[1] === ot[1] && (nt[1] === je || nt[1] === Ke) || void 0;
          }
          function $e(nt, ot, Ye) {
            return function(Fe, pt) {
              var Mt = _e(Fe), At = _e(pt), Rt = [];
              if (Mt && At && Be(Mt, At)) return Rt;
              Mt && Rt.push(Mt), At && Rt.push(At);
              var Ft = 2 * d.constrain((Fe[nt] + pt[nt]) / 2, ot, Ye) - ((Mt || Fe)[nt] + (At || pt)[nt]);
              return Ft && ((Mt && At ? Ft > 0 == Mt[nt] > At[nt] ? Mt : At : Mt || At)[nt] += Ft), Rt;
            };
          }
          function Ze(nt) {
            var ot = nt[0], Ye = nt[1], Fe = ot === pe[be - 1][0], pt = Ye === pe[be - 1][1];
            if (!Fe || !pt) if (be > 1) {
              var Mt = ot === pe[be - 2][0], At = Ye === pe[be - 2][1];
              Fe && (ot === Ge || ot === Re) && Mt ? At ? be-- : pe[be - 1] = nt : pt && (Ye === je || Ye === Ke) && At ? Mt ? be-- : pe[be - 1] = nt : pe[be++] = nt;
            } else pe[be++] = nt;
          }
          function ct(nt) {
            pe[be - 1][0] !== nt[0] && pe[be - 1][1] !== nt[1] && Ze([Ee, Ne]), Ze(nt), Ie = null, Ee = Ne = 0;
          }
          de === "linear" || de === "spline" ? Ce = function(nt, ot) {
            for (var Ye = [], Fe = 0, pt = 0; pt < 4; pt++) {
              var Mt = tt[pt], At = f(nt[0], nt[1], ot[0], ot[1], Mt[0], Mt[1], Mt[2], Mt[3]);
              At && (!Fe || Math.abs(At.x - Ye[0][0]) > 1 || Math.abs(At.y - Ye[0][1]) > 1) && (At = [At.x, At.y], Fe && De(At, nt) < De(Ye[0], nt) ? Ye.unshift(At) : Ye.push(At), Fe++);
            }
            return Ye;
          } : de === "hv" || de === "vh" ? Ce = function(nt, ot) {
            var Ye = [], Fe = _e(nt), pt = _e(ot);
            return Fe && pt && Be(Fe, pt) || (Fe && Ye.push(Fe), pt && Ye.push(pt)), Ye;
          } : de === "hvh" ? Ce = $e(0, Ge, Re) : de === "vhv" && (Ce = $e(1, je, Ke));
          var ft = d.isArrayOrTypedArray(ue);
          function _t(nt) {
            if (nt && Q && (nt.i = w, nt.d = m, nt.trace = q, nt.marker = ft ? ue[nt.i] : ue, nt.backoff = Q), V = nt[0] / ee, $ = nt[1] / X, Le = nt[0] < Ge ? Ge : nt[0] > Re ? Re : 0, We = nt[1] < je ? je : nt[1] > Ke ? Ke : 0, Le || We) {
              if (be) if (Ie) {
                var ot = Ce(Ie, nt);
                ot.length > 1 && (ct(ot[0]), pe[be++] = ot[1]);
              } else ge = Ce(pe[be - 1], nt)[0], pe[be++] = ge;
              else pe[be++] = [Le || nt[0], We || nt[1]];
              var Ye = pe[be - 1];
              Le && We && (Ye[0] !== Le || Ye[1] !== We) ? (Ie && (Ee !== Le && Ne !== We ? Ze(Ee && Ne ? (Fe = Ie, Mt = (pt = nt)[0] - Fe[0], At = (pt[1] - Fe[1]) / Mt, (Fe[1] * pt[0] - pt[1] * Fe[0]) / Mt > 0 ? [At > 0 ? Ge : Re, Ke] : [At > 0 ? Re : Ge, je]) : [Ee || Le, Ne || We]) : Ee && Ne && Ze([Ee, Ne])), Ze([Le, We])) : Ee - Le && Ne - We && Ze([Le || Ee, We || Ne]), Ie = nt, Ee = Le, Ne = We;
            } else Ie && ct(Ce(Ie, nt)[0]), pe[be++] = nt;
            var Fe, pt, Mt, At;
          }
          for (w = 0; w < ye; w++) if (k = Ae(w)) {
            for (be = 0, Ie = null, _t(k), w++; w < ye; w++) {
              if (!(A = Ae(w))) {
                if (ce) continue;
                break;
              }
              if (ne && x.simplify) {
                var Pt = Ae(w + 1);
                if (I = De(A, k), ae && (be === 0 || be === ye - 1) || !(I < Me(A, Pt) * me)) {
                  for (E = [(A[0] - k[0]) / I, (A[1] - k[1]) / I], C = k, M = I, O = z = F = 0, L = !1, S = A, w++; w < m.length; w++) {
                    if (D = Pt, Pt = Ae(w + 1), !D) {
                      if (ce) continue;
                      break;
                    }
                    if (U = (P = [D[0] - k[0], D[1] - k[1]])[0] * E[1] - P[1] * E[0], z = Math.min(z, U), (F = Math.max(F, U)) - z > Me(D, Pt)) break;
                    S = D, (T = P[0] * E[0] + P[1] * E[1]) > M ? (M = T, A = D, L = !1) : T < O && (O = T, C = D, L = !0);
                  }
                  if (L ? (_t(A), S !== C && _t(C)) : (C !== k && _t(C), S !== A && _t(A)), _t(S), w >= m.length || !D) break;
                  _t(D), k = D;
                }
              } else _t(A);
            }
            Ie && Ze([Ee || Ie[0], Ne || Ie[1]]), se.push(pe.slice(0, be));
          }
          var Dt = de.slice(de.length - 1);
          if (Q && Dt !== "h" && Dt !== "v") {
            for (var $t = !1, Gt = -1, Wt = [], mt = 0; mt < se.length; mt++) for (var at = 0; at < se[mt].length - 1; at++) {
              var vt = se[mt][at], St = se[mt][at + 1], Je = l.applyBackoff(St, vt);
              Je[0] === St[0] && Je[1] === St[1] || ($t = !0), Wt[Gt + 1] || (Wt[++Gt] = [vt, [Je[0], Je[1]]]);
            }
            return $t ? Wt : se;
          }
          return se;
        };
      }, 91602: function(o) {
        o.exports = function(s, n, l) {
          l("line.shape") === "spline" && l("line.smoothing");
        };
      }, 17210: function(o) {
        var s = { tonextx: 1, tonexty: 1, tonext: 1 };
        o.exports = function(n, l, u) {
          var i, h, p, _, d, f = {}, c = !1, g = -1, m = 0, x = -1;
          for (h = 0; h < u.length; h++) (p = (i = u[h][0].trace).stackgroup || "") ? p in f ? d = f[p] : (d = f[p] = m, m++) : i.fill in s && x >= 0 ? d = x : (d = x = m, m++), d < g && (c = !0), i._groupIndex = g = d;
          var w = u.slice();
          c && w.sort(function(S, A) {
            var C = S[0].trace, D = A[0].trace;
            return C._groupIndex - D._groupIndex || C.index - D.index;
          });
          var k = {};
          for (h = 0; h < w.length; h++) p = (i = w[h][0].trace).stackgroup || "", i.visible === !0 ? (i._nexttrace = null, i.fill in s && (_ = k[p], i._prevtrace = _ || null, _ && (_._nexttrace = i)), i._ownfill = i.fill && (i.fill.substr(0, 6) === "tozero" || i.fill === "toself" || i.fill.substr(0, 2) === "to" && !i._prevtrace), k[p] = i) : i._prevtrace = i._nexttrace = i._ownfill = null;
          return w;
        };
      }, 92527: function(o, s, n) {
        var l = n(10721);
        o.exports = function(u, i) {
          i || (i = 2);
          var h = u.marker, p = h.sizeref || 1, _ = h.sizemin || 0, d = h.sizemode === "area" ? function(f) {
            return Math.sqrt(f / p);
          } : function(f) {
            return f / p;
          };
          return function(f) {
            var c = d(f / i);
            return l(c) && c > 0 ? Math.max(c, _) : 0;
          };
        };
      }, 21146: function(o) {
        o.exports = { container: "marker", min: "cmin", max: "cmax" };
      }, 24272: function(o, s, n) {
        var l = n(78766), u = n(65477).hasColorscale, i = n(39356), h = n(64726);
        o.exports = function(p, _, d, f, c, g) {
          var m = h.isBubble(p), x = (p.line || {}).color;
          g = g || {}, x && (d = x), c("marker.symbol"), c("marker.opacity", m ? 0.7 : 1), c("marker.size"), g.noAngle || (c("marker.angle"), g.noAngleRef || c("marker.angleref"), g.noStandOff || c("marker.standoff")), c("marker.color", d), u(p, "marker") && i(p, _, f, c, { prefix: "marker.", cLetter: "c" }), g.noSelect || (c("selected.marker.color"), c("unselected.marker.color"), c("selected.marker.size"), c("unselected.marker.size")), g.noLine || (c("marker.line.color", x && !Array.isArray(x) && _.marker.color !== x ? x : m ? l.background : l.defaultLine), u(p, "marker.line") && i(p, _, f, c, { prefix: "marker.line.", cLetter: "c" }), c("marker.line.width", m ? 1 : 0)), m && (c("marker.sizeref"), c("marker.sizemin"), c("marker.sizemode")), g.gradient && c("marker.gradient.type") !== "none" && c("marker.gradient.color");
        };
      }, 99669: function(o, s, n) {
        var l = n(34809).dateTick0, u = n(63821).ONEWEEK;
        function i(h, p) {
          return l(p, h % u == 0 ? 1 : 0);
        }
        o.exports = function(h, p, _, d, f) {
          if (f || (f = { x: !0, y: !0 }), f.x) {
            var c = d("xperiod");
            c && (d("xperiod0", i(c, p.xcalendar)), d("xperiodalignment"));
          }
          if (f.y) {
            var g = d("yperiod");
            g && (d("yperiod0", i(g, p.ycalendar)), d("yperiodalignment"));
          }
        };
      }, 36098: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(34809), h = i.ensureSingle, p = i.identity, _ = n(62203), d = n(64726), f = n(5525), c = n(17210), g = n(80899).tester;
        function m(x, w, k, S, A, C, D) {
          var L, E = x._context.staticPlot;
          (function(Ze, ct, ft, _t, Pt) {
            var Dt = ft.xaxis, $t = ft.yaxis, Gt = l.extent(i.simpleMap(Dt.range, Dt.r2c)), Wt = l.extent(i.simpleMap($t.range, $t.r2c)), mt = _t[0].trace;
            if (d.hasMarkers(mt)) {
              var at = mt.marker.maxdisplayed;
              if (at !== 0) {
                var vt = _t.filter(function(ot) {
                  return ot.x >= Gt[0] && ot.x <= Gt[1] && ot.y >= Wt[0] && ot.y <= Wt[1];
                }), St = Math.ceil(vt.length / at), Je = 0;
                Pt.forEach(function(ot, Ye) {
                  var Fe = ot[0].trace;
                  d.hasMarkers(Fe) && Fe.marker.maxdisplayed > 0 && Ye < ct && Je++;
                });
                var nt = Math.round(Je * St / 3 + Math.floor(Je / 3) * St / 7.1);
                _t.forEach(function(ot) {
                  delete ot.vis;
                }), vt.forEach(function(ot, Ye) {
                  Math.round((Ye + nt) % St) === 0 && (ot.vis = !0);
                });
              }
            }
          })(0, w, k, S, A);
          var P = !!D && D.duration > 0;
          function I(Ze) {
            return P ? Ze.transition() : Ze;
          }
          var M = k.xaxis, O = k.yaxis, T = S[0].trace, z = T.line, F = l.select(C), U = h(F, "g", "errorbars"), V = h(F, "g", "lines"), $ = h(F, "g", "points"), q = h(F, "g", "text");
          if (u.getComponentMethod("errorbars", "plot")(x, U, k, D), T.visible === !0) {
            var K, re;
            I(F).style("opacity", T.opacity);
            var Y, te, ee = T.fill.charAt(T.fill.length - 1);
            ee !== "x" && ee !== "y" && (ee = ""), ee === "y" ? (Y = 1, te = O.c2p(0, !0)) : ee === "x" && (Y = 0, te = M.c2p(0, !0)), S[0][k.isRangePlot ? "nodeRangePlot3" : "node3"] = F;
            var X, Q, ue = "", ce = [], he = T._prevtrace, de = null, ne = null;
            he && (ue = he._prevRevpath || "", re = he._nextFill, ce = he._ownPolygons, de = he._fillsegments, ne = he._fillElement);
            var ae, se, me, ye, pe, be, Ae = "", Se = "", Me = [];
            T._polygons = [];
            var De = [], Le = [], We = i.noop;
            if (K = T._ownFill, d.hasLines(T) || T.fill !== "none") {
              re && re.datum(S), ["hv", "vh", "hvh", "vhv"].indexOf(z.shape) !== -1 ? (ae = _.steps(z.shape), se = _.steps(z.shape.split("").reverse().join(""))) : ae = se = z.shape === "spline" ? function(Ze) {
                var ct = Ze[Ze.length - 1];
                return Ze.length > 1 && Ze[0][0] === ct[0] && Ze[0][1] === ct[1] ? _.smoothclosed(Ze.slice(1), z.smoothing) : _.smoothopen(Ze, z.smoothing);
              } : function(Ze) {
                return "M" + Ze.join("L");
              }, me = function(Ze) {
                return se(Ze.reverse());
              }, Le = f(S, { xaxis: M, yaxis: O, trace: T, connectGaps: T.connectgaps, baseTolerance: Math.max(z.width || 1, 3) / 4, shape: z.shape, backoff: z.backoff, simplify: z.simplify, fill: T.fill }), De = new Array(Le.length);
              var Ee = 0;
              for (L = 0; L < Le.length; L++) {
                var Ne, Ie = Le[L];
                Ne && ee ? Ne.push.apply(Ne, Ie) : (Ne = Ie.slice(), De[Ee] = Ne, Ee++);
              }
              T._fillElement = null, T._fillExclusionElement = ne, T._fillsegments = De.slice(0, Ee), De = T._fillsegments, Le.length && (ye = Le[0][0].slice(), be = (pe = Le[Le.length - 1])[pe.length - 1].slice()), We = function(Ze) {
                return function(ct) {
                  if (X = ae(ct), Q = me(ct), Ae ? ee ? (Ae += "L" + X.substr(1), Se = Q + "L" + Se.substr(1)) : (Ae += "Z" + X, Se = Q + "Z" + Se) : (Ae = X, Se = Q), d.hasLines(T)) {
                    var ft = l.select(this);
                    if (ft.datum(S), Ze) I(ft.style("opacity", 0).attr("d", X).call(_.lineGroupStyle)).style("opacity", 1);
                    else {
                      var _t = I(ft);
                      _t.attr("d", X), _.singleLineStyle(S, _t);
                    }
                  }
                };
              };
            }
            var ge = V.selectAll(".js-line").data(Le);
            I(ge.exit()).style("opacity", 0).remove(), ge.each(We(!1)), ge.enter().append("path").classed("js-line", !0).style("vector-effect", E ? "none" : "non-scaling-stroke").call(_.lineGroupStyle).each(We(!0)), _.setClipUrl(ge, k.layerClipId, x);
            var Ce = function() {
              var Ze = new Array(De.length);
              for (L = 0; L < De.length; L++) Ze[L] = g(De[L]);
              return Ze;
            }, we = function(Ze) {
              var ct, ft;
              if (Ze && Ze.length !== 0) {
                for (ct = new Array(Ze.length - 1 + De.length), ft = 0; ft < Ze.length - 1; ft++) ct[ft] = g(Ze[ft]);
                var _t = Ze[Ze.length - 1].slice();
                for (_t.reverse(), ft = 0; ft < De.length; ft++) ct[Ze.length - 1 + ft] = g(De[ft].concat(_t));
              } else for (ct = new Array(De.length), ft = 0; ft < De.length; ft++) {
                var Pt = De[ft][0].slice(), Dt = De[ft][De[ft].length - 1].slice();
                Pt[Y] = Dt[Y] = te;
                var $t = [Dt, Pt].concat(De[ft]);
                ct[ft] = g($t);
              }
              return ct;
            };
            Le.length ? (K ? (K.datum(S), ye && be && (ee ? (ye[Y] = be[Y] = te, I(K).attr("d", "M" + be + "L" + ye + "L" + Ae.substr(1)).call(_.singleFillStyle, x), Me = we(null)) : (I(K).attr("d", Ae + "Z").call(_.singleFillStyle, x), Me = Ce())), T._polygons = Me, T._fillElement = K) : re && (T.fill.substr(0, 6) === "tonext" && Ae && ue ? (T.fill === "tonext" ? (I(re).attr("d", Ae + "Z" + ue + "Z").call(_.singleFillStyle, x), Me = Ce(), T._polygons = Me.concat(ce)) : (I(re).attr("d", Ae + "L" + ue.substr(1) + "Z").call(_.singleFillStyle, x), Me = we(de), T._polygons = Me), T._fillElement = re) : Re(re)), T._prevRevpath = Se) : (K ? Re(K) : re && Re(re), T._prevRevpath = null), T._ownPolygons = Me, $.datum(S), q.datum(S), function(Ze, ct, ft) {
              var _t, Pt = ft[0].trace, Dt = d.hasMarkers(Pt), $t = d.hasText(Pt), Gt = Be(Pt), Wt = $e, mt = $e;
              if (Dt || $t) {
                var at = p, vt = Pt.stackgroup, St = vt && x._fullLayout._scatterStackOpts[M._id + O._id][vt].stackgaps === "infer zero";
                Pt.marker.maxdisplayed || Pt._needsCull ? at = St ? Ke : je : vt && !St && (at = tt), Dt && (Wt = at), $t && (mt = at);
              }
              var Je, nt = (_t = Ze.selectAll("path.point").data(Wt, Gt)).enter().append("path").classed("point", !0);
              P && nt.call(_.pointStyle, Pt, x).call(_.translatePoints, M, O).style("opacity", 0).transition().style("opacity", 1), _t.order(), Dt && (Je = _.makePointStyleFns(Pt)), _t.each(function(ot) {
                var Ye = l.select(this), Fe = I(Ye);
                _.translatePoint(ot, Fe, M, O) ? (_.singlePointStyle(ot, Fe, Pt, Je, x), k.layerClipId && _.hideOutsideRangePoint(ot, Fe, M, O, Pt.xcalendar, Pt.ycalendar), Pt.customdata && Ye.classed("plotly-customdata", ot.data !== null && ot.data !== void 0)) : Fe.remove();
              }), P ? _t.exit().transition().style("opacity", 0).remove() : _t.exit().remove(), (_t = ct.selectAll("g").data(mt, Gt)).enter().append("g").classed("textpoint", !0).append("text"), _t.order(), _t.each(function(ot) {
                var Ye = l.select(this), Fe = I(Ye.select("text"));
                _.translatePoint(ot, Fe, M, O) ? k.layerClipId && _.hideOutsideRangePoint(ot, Ye, M, O, Pt.xcalendar, Pt.ycalendar) : Ye.remove();
              }), _t.selectAll("text").call(_.textPointStyle, Pt, x).each(function(ot) {
                var Ye = M.c2p(ot.x), Fe = O.c2p(ot.y);
                l.select(this).selectAll("tspan.line").each(function() {
                  I(l.select(this)).attr({ x: Ye, y: Fe });
                });
              }), _t.exit().remove();
            }($, q, S);
            var Ge = T.cliponaxis === !1 ? null : k.layerClipId;
            _.setClipUrl($, Ge, x), _.setClipUrl(q, Ge, x);
          }
          function Re(Ze) {
            I(Ze).attr("d", "M0,0Z");
          }
          function je(Ze) {
            return Ze.filter(function(ct) {
              return !ct.gap && ct.vis;
            });
          }
          function Ke(Ze) {
            return Ze.filter(function(ct) {
              return ct.vis;
            });
          }
          function tt(Ze) {
            return Ze.filter(function(ct) {
              return !ct.gap;
            });
          }
          function _e(Ze) {
            return Ze.id;
          }
          function Be(Ze) {
            if (Ze.ids) return _e;
          }
          function $e() {
            return !1;
          }
        }
        o.exports = function(x, w, k, S, A, C) {
          var D, L, E = !A, P = !!A && A.duration > 0, I = c(x, w, k);
          (D = S.selectAll("g.trace").data(I, function(M) {
            return M[0].trace.uid;
          })).enter().append("g").attr("class", function(M) {
            return "trace scatter trace" + M[0].trace.uid;
          }).style("stroke-miterlimit", 2), D.order(), function(M, O, T) {
            O.each(function(z) {
              var F = h(l.select(this), "g", "fills");
              _.setClipUrl(F, T.layerClipId, M);
              var U = z[0].trace, V = [];
              U._ownfill && V.push("_ownFill"), U._nexttrace && V.push("_nextFill");
              var $ = F.selectAll("g").data(V, p);
              $.enter().append("g"), $.exit().each(function(q) {
                U[q] = null;
              }).remove(), $.order().each(function(q) {
                U[q] = h(l.select(this), "path", "js-fill");
              });
            });
          }(x, D, w), P ? (C && (L = C()), l.transition().duration(A.duration).ease(A.easing).each("end", function() {
            L && L();
          }).each("interrupt", function() {
            L && L();
          }).each(function() {
            S.selectAll("g.trace").each(function(M, O) {
              m(x, O, w, M, I, this, A);
            });
          })) : D.each(function(M, O) {
            m(x, O, w, M, I, this, A);
          }), E && D.exit().remove(), S.selectAll("path:not([d])").remove();
        };
      }, 32665: function(o, s, n) {
        var l = n(64726);
        o.exports = function(u, i) {
          var h, p, _, d, f = u.cd, c = u.xaxis, g = u.yaxis, m = [], x = f[0].trace;
          if (!l.hasMarkers(x) && !l.hasText(x)) return [];
          if (i === !1) for (h = 0; h < f.length; h++) f[h].selected = 0;
          else for (h = 0; h < f.length; h++) p = f[h], _ = c.c2p(p.x), d = g.c2p(p.y), p.i !== null && i.contains([_, d], !1, h, u) ? (m.push({ pointNumber: p.i, x: c.c2d(p.x), y: g.c2d(p.y) }), p.selected = 1) : p.selected = 0;
          return m;
        };
      }, 382: function(o) {
        var s = ["orientation", "groupnorm", "stackgaps"];
        o.exports = function(n, l, u, i) {
          var h = u._scatterStackOpts, p = i("stackgroup");
          if (p) {
            var _ = l.xaxis + l.yaxis, d = h[_];
            d || (d = h[_] = {});
            var f = d[p], c = !1;
            f ? f.traces.push(l) : (f = d[p] = { traceIndices: [], traces: [l] }, c = !0);
            for (var g = { orientation: l.x && !l.y ? "h" : "v" }, m = 0; m < s.length; m++) {
              var x = s[m], w = x + "Found";
              if (!f[w]) {
                var k = n[x] !== void 0, S = x === "orientation";
                if ((k || c) && (f[x] = i(x, g[x]), S && (f.fillDflt = f[x] === "h" ? "tonextx" : "tonexty"), k && (f[w] = !0, !c && (delete f.traces[0][x], S)))) for (var A = 0; A < f.traces.length - 1; A++) {
                  var C = f.traces[A];
                  C._input.fill !== C.fill && (C.fill = f.fillDflt);
                }
              }
            }
            return f;
          }
        };
      }, 9408: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(33626);
        function h(_, d, f) {
          u.pointStyle(_.selectAll("path.point"), d, f);
        }
        function p(_, d, f) {
          u.textPointStyle(_.selectAll("text"), d, f);
        }
        o.exports = { style: function(_) {
          var d = l.select(_).selectAll("g.trace.scatter");
          d.style("opacity", function(f) {
            return f[0].trace.opacity;
          }), d.selectAll("g.points").each(function(f) {
            h(l.select(this), f.trace || f[0].trace, _);
          }), d.selectAll("g.text").each(function(f) {
            p(l.select(this), f.trace || f[0].trace, _);
          }), d.selectAll("g.trace path.js-line").call(u.lineGroupStyle), d.selectAll("g.trace path.js-fill").call(u.fillGroupStyle, _, !1), i.getComponentMethod("errorbars", "style")(d);
        }, stylePoints: h, styleText: p, styleOnSelect: function(_, d, f) {
          var c = d[0].trace;
          c.selectedpoints ? (u.selectedPointStyle(f.selectAll("path.point"), c), u.selectedTextStyle(f.selectAll("text"), c)) : (h(f, c, _), p(f, c, _));
        } };
      }, 64726: function(o, s, n) {
        var l = n(34809), u = n(87800).isTypedArraySpec;
        o.exports = { hasLines: function(i) {
          return i.visible && i.mode && i.mode.indexOf("lines") !== -1;
        }, hasMarkers: function(i) {
          return i.visible && (i.mode && i.mode.indexOf("markers") !== -1 || i.type === "splom");
        }, hasText: function(i) {
          return i.visible && i.mode && i.mode.indexOf("text") !== -1;
        }, isBubble: function(i) {
          var h = i.marker;
          return l.isPlainObject(h) && (l.isArrayOrTypedArray(h.size) || u(h.size));
        } };
      }, 663: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i, h, p, _) {
          _ = _ || {}, p("textposition"), l.coerceFont(p, "textfont", _.font || h.font, _), _.noSelect || (p("selected.textfont.color"), p("unselected.textfont.color"));
        };
      }, 99867: function(o, s, n) {
        var l = n(34809), u = n(33626);
        o.exports = function(i, h, p, _) {
          var d, f = _("x"), c = _("y");
          if (u.getComponentMethod("calendars", "handleTraceDefaults")(i, h, ["x", "y"], p), f) {
            var g = l.minRowLength(f);
            c ? d = Math.min(g, l.minRowLength(c)) : (d = g, _("y0"), _("dy"));
          } else {
            if (!c) return 0;
            d = l.minRowLength(c), _("x0"), _("dx");
          }
          return h._length = d, d;
        };
      }, 14117: function(o, s, n) {
        var l = n(36640), u = n(80337), i = n(87163), h = n(80712).axisHoverFormat, p = n(3208).rb, _ = n(3208).ay, d = n(9829), f = n(84770), c = n(49467), g = n(93049).extendFlat, m = n(13582).overrideAll, x = n(62994), w = l.line, k = l.marker, S = k.line, A = g({ width: w.width, dash: { valType: "enumerated", values: x(f), dflt: "solid" } }, i("line")), C = o.exports = m({ x: l.x, y: l.y, z: { valType: "data_array" }, text: g({}, l.text, {}), texttemplate: _({}, {}), hovertext: g({}, l.hovertext, {}), hovertemplate: p(), xhoverformat: h("x"), yhoverformat: h("y"), zhoverformat: h("z"), mode: g({}, l.mode, { dflt: "lines+markers" }), surfaceaxis: { valType: "enumerated", values: [-1, 0, 1, 2], dflt: -1 }, surfacecolor: { valType: "color" }, projection: { x: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } }, y: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } }, z: { show: { valType: "boolean", dflt: !1 }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, scale: { valType: "number", min: 0, max: 10, dflt: 2 / 3 } } }, connectgaps: l.connectgaps, line: A, marker: g({ symbol: { valType: "enumerated", values: x(c), dflt: "circle", arrayOk: !0 }, size: g({}, k.size, { dflt: 8 }), sizeref: k.sizeref, sizemin: k.sizemin, sizemode: k.sizemode, opacity: g({}, k.opacity, { arrayOk: !1 }), colorbar: k.colorbar, line: g({ width: g({}, S.width, { arrayOk: !1 }) }, i("marker.line")) }, i("marker")), textposition: g({}, l.textposition, { dflt: "top center" }), textfont: u({ noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0, editType: "calc", colorEditType: "style", arrayOk: !0, variantValues: ["normal", "small-caps"] }), opacity: d.opacity, hoverinfo: g({}, d.hoverinfo) }, "calc", "nested");
        C.x.editType = C.y.editType = C.z.editType = "calc+clearAxisTypes";
      }, 37593: function(o, s, n) {
        var l = n(99203), u = n(77272);
        o.exports = function(i, h) {
          var p = [{ x: !1, y: !1, trace: h, t: {} }];
          return l(p, h), u(i, h), p;
        };
      }, 95447: function(o, s, n) {
        var l = n(33626);
        function u(i, h, p, _) {
          if (!h || !h.visible) return null;
          for (var d = l.getComponentMethod("errorbars", "makeComputeError")(h), f = new Array(i.length), c = 0; c < i.length; c++) {
            var g = d(+i[c], c);
            if (_.type === "log") {
              var m = _.c2l(i[c]), x = i[c] - g[0], w = i[c] + g[1];
              if (f[c] = [(_.c2l(x, !0) - m) * p, (_.c2l(w, !0) - m) * p], x > 0) {
                var k = _.c2l(x);
                _._lowerLogErrorBound || (_._lowerLogErrorBound = k), _._lowerErrorBound = Math.min(_._lowerLogErrorBound, k);
              }
            } else f[c] = [-g[0] * p, g[1] * p];
          }
          return f;
        }
        o.exports = function(i, h, p) {
          var _ = [u(i.x, i.error_x, h[0], p.xaxis), u(i.y, i.error_y, h[1], p.yaxis), u(i.z, i.error_z, h[2], p.zaxis)], d = function(w) {
            for (var k = 0; k < w.length; k++) if (w[k]) return w[k].length;
            return 0;
          }(_);
          if (d === 0) return null;
          for (var f = new Array(d), c = 0; c < d; c++) {
            for (var g = [[0, 0, 0], [0, 0, 0]], m = 0; m < 3; m++) if (_[m]) for (var x = 0; x < 2; x++) g[x][m] = _[m][c][x];
            f[c] = g;
          }
          return f;
        };
      }, 16533: function(o, s, n) {
        var l = n(99098).gl_line3d, u = n(99098).gl_scatter3d, i = n(99098).gl_error3d, h = n(99098).gl_mesh3d, p = n(99098).delaunay_triangulate, _ = n(34809), d = n(55010), f = n(46998).formatColor, c = n(92527), g = n(84770), m = n(49467), x = n(29714), w = n(36040).appendArrayPointValue, k = n(95447);
        function S(O, T) {
          this.scene = O, this.uid = T, this.linePlot = null, this.scatterPlot = null, this.errorBars = null, this.textMarkers = null, this.delaunayMesh = null, this.color = null, this.mode = "", this.dataPoints = [], this.axesBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.textLabels = null, this.data = null;
        }
        var A = S.prototype;
        function C(O) {
          return O == null ? 0 : O.indexOf("left") > -1 ? -1 : O.indexOf("right") > -1 ? 1 : 0;
        }
        function D(O) {
          return O == null ? 0 : O.indexOf("top") > -1 ? -1 : O.indexOf("bottom") > -1 ? 1 : 0;
        }
        function L(O, T) {
          return T(4 * O);
        }
        function E(O) {
          return m[O];
        }
        function P(O, T, z, F, U) {
          var V = null;
          if (_.isArrayOrTypedArray(O)) {
            V = [];
            for (var $ = 0; $ < T; $++) O[$] === void 0 ? V[$] = F : V[$] = z(O[$], U);
          } else V = z(O, _.identity);
          return V;
        }
        function I(O) {
          if (_.isArrayOrTypedArray(O)) {
            var T = O[0];
            return _.isArrayOrTypedArray(T) && (O = T), "rgb(" + O.slice(0, 3).map(function(z) {
              return Math.round(255 * z);
            }) + ")";
          }
          return null;
        }
        function M(O) {
          return _.isArrayOrTypedArray(O) ? O.length === 4 && typeof O[0] == "number" ? I(O) : O.map(I) : null;
        }
        A.handlePick = function(O) {
          if (O.object && (O.object === this.linePlot || O.object === this.delaunayMesh || O.object === this.textMarkers || O.object === this.scatterPlot)) {
            var T = O.index = O.data.index;
            return O.object.highlight && O.object.highlight(null), this.scatterPlot && (O.object = this.scatterPlot, this.scatterPlot.highlight(O.data)), O.textLabel = "", this.textLabels && (_.isArrayOrTypedArray(this.textLabels) ? (this.textLabels[T] || this.textLabels[T] === 0) && (O.textLabel = this.textLabels[T]) : O.textLabel = this.textLabels), O.traceCoordinate = [this.data.x[T], this.data.y[T], this.data.z[T]], !0;
          }
        }, A.update = function(O) {
          var T, z, F, U, V = this.scene.glplot.gl, $ = g.solid;
          this.data = O;
          var q = function(Y, te) {
            var ee, X, Q, ue, ce, he, de = [], ne = Y.fullSceneLayout, ae = Y.dataScale, se = ne.xaxis, me = ne.yaxis, ye = ne.zaxis, pe = te.marker, be = te.line, Ae = te.x || [], Se = te.y || [], Me = te.z || [], De = Ae.length, Le = te.xcalendar, We = te.ycalendar, Ee = te.zcalendar;
            for (ce = 0; ce < De; ce++) ee = se.d2l(Ae[ce], 0, Le) * ae[0], X = me.d2l(Se[ce], 0, We) * ae[1], Q = ye.d2l(Me[ce], 0, Ee) * ae[2], de[ce] = [ee, X, Q];
            if (Array.isArray(te.text)) he = te.text;
            else if (_.isTypedArray(te.text)) he = Array.from(te.text);
            else if (te.text !== void 0) for (he = new Array(De), ce = 0; ce < De; ce++) he[ce] = te.text;
            function Ne(ct, ft) {
              var _t = ne[ct];
              return x.tickText(_t, _t.d2l(ft), !0).text;
            }
            var Ie = te.texttemplate;
            if (Ie) {
              var ge = Y.fullLayout._d3locale, Ce = Array.isArray(Ie), we = Ce ? Math.min(Ie.length, De) : De, Ge = Ce ? function(ct) {
                return Ie[ct];
              } : function() {
                return Ie;
              };
              for (he = new Array(we), ce = 0; ce < we; ce++) {
                var Re = { x: Ae[ce], y: Se[ce], z: Me[ce] }, je = { xLabel: Ne("xaxis", Ae[ce]), yLabel: Ne("yaxis", Se[ce]), zLabel: Ne("zaxis", Me[ce]) }, Ke = {};
                w(Ke, te, ce);
                var tt = te._meta || {};
                he[ce] = _.texttemplateString(Ge(ce), je, ge, Ke, Re, tt);
              }
            }
            if (ue = { position: de, mode: te.mode, text: he }, "line" in te && (ue.lineColor = f(be, 1, De), ue.lineWidth = be.width, ue.lineDashes = be.dash), "marker" in te) {
              var _e = c(te);
              ue.scatterColor = f(pe, 1, De), ue.scatterSize = P(pe.size, De, L, 20, _e), ue.scatterMarker = P(pe.symbol, De, E, "●"), ue.scatterLineWidth = pe.line.width, ue.scatterLineColor = f(pe.line, 1, De), ue.scatterAngle = 0;
            }
            "textposition" in te && (ue.textOffset = function(ct) {
              var ft = [0, 0];
              if (Array.isArray(ct)) for (var _t = 0; _t < ct.length; _t++) ft[_t] = [0, 0], ct[_t] && (ft[_t][0] = C(ct[_t]), ft[_t][1] = D(ct[_t]));
              else ft[0] = C(ct), ft[1] = D(ct);
              return ft;
            }(te.textposition), ue.textColor = f(te.textfont, 1, De), ue.textSize = P(te.textfont.size, De, _.identity, 12), ue.textFontFamily = te.textfont.family, ue.textFontWeight = te.textfont.weight, ue.textFontStyle = te.textfont.style, ue.textFontVariant = te.textfont.variant, ue.textAngle = 0);
            var Be = ["x", "y", "z"];
            for (ue.project = [!1, !1, !1], ue.projectScale = [1, 1, 1], ue.projectOpacity = [1, 1, 1], ce = 0; ce < 3; ++ce) {
              var $e = te.projection[Be[ce]];
              (ue.project[ce] = $e.show) && (ue.projectOpacity[ce] = $e.opacity, ue.projectScale[ce] = $e.scale);
            }
            ue.errorBounds = k(te, ae, ne);
            var Ze = function(ct) {
              for (var ft = [0, 0, 0], _t = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], Pt = [1, 1, 1], Dt = 0; Dt < 3; Dt++) {
                var $t = ct[Dt];
                $t && $t.copy_zstyle !== !1 && ct[2].visible !== !1 && ($t = ct[2]), $t && $t.visible && (ft[Dt] = $t.width / 2, _t[Dt] = d($t.color), Pt[Dt] = $t.thickness);
              }
              return { capSize: ft, color: _t, lineWidth: Pt };
            }([te.error_x, te.error_y, te.error_z]);
            return ue.errorColor = Ze.color, ue.errorLineWidth = Ze.lineWidth, ue.errorCapSize = Ze.capSize, ue.delaunayAxis = te.surfaceaxis, ue.delaunayColor = d(te.surfacecolor), ue;
          }(this.scene, O);
          "mode" in q && (this.mode = q.mode), "lineDashes" in q && q.lineDashes in g && ($ = g[q.lineDashes]), this.color = M(q.scatterColor) || M(q.lineColor), this.dataPoints = q.position, T = { gl: this.scene.glplot.gl, position: q.position, color: q.lineColor, lineWidth: q.lineWidth || 1, dashes: $[0], dashScale: $[1], opacity: O.opacity, connectGaps: O.connectgaps }, this.mode.indexOf("lines") !== -1 ? this.linePlot ? this.linePlot.update(T) : (this.linePlot = l(T), this.linePlot._trace = this, this.scene.glplot.add(this.linePlot)) : this.linePlot && (this.scene.glplot.remove(this.linePlot), this.linePlot.dispose(), this.linePlot = null);
          var K = O.opacity;
          if (O.marker && O.marker.opacity !== void 0 && (K *= O.marker.opacity), z = { gl: this.scene.glplot.gl, position: q.position, color: q.scatterColor, size: q.scatterSize, glyph: q.scatterMarker, opacity: K, orthographic: !0, lineWidth: q.scatterLineWidth, lineColor: q.scatterLineColor, project: q.project, projectScale: q.projectScale, projectOpacity: q.projectOpacity }, this.mode.indexOf("markers") !== -1 ? this.scatterPlot ? this.scatterPlot.update(z) : (this.scatterPlot = u(z), this.scatterPlot._trace = this, this.scatterPlot.highlightScale = 1, this.scene.glplot.add(this.scatterPlot)) : this.scatterPlot && (this.scene.glplot.remove(this.scatterPlot), this.scatterPlot.dispose(), this.scatterPlot = null), U = { gl: this.scene.glplot.gl, position: q.position, glyph: q.text, color: q.textColor, size: q.textSize, angle: q.textAngle, alignment: q.textOffset, font: q.textFontFamily, fontWeight: q.textFontWeight, fontStyle: q.textFontStyle, fontVariant: q.textFontVariant, orthographic: !0, lineWidth: 0, project: !1, opacity: O.opacity }, this.textLabels = O.hovertext || O.text, this.mode.indexOf("text") !== -1 ? this.textMarkers ? this.textMarkers.update(U) : (this.textMarkers = u(U), this.textMarkers._trace = this, this.textMarkers.highlightScale = 1, this.scene.glplot.add(this.textMarkers)) : this.textMarkers && (this.scene.glplot.remove(this.textMarkers), this.textMarkers.dispose(), this.textMarkers = null), F = { gl: this.scene.glplot.gl, position: q.position, color: q.errorColor, error: q.errorBounds, lineWidth: q.errorLineWidth, capSize: q.errorCapSize, opacity: O.opacity }, this.errorBars ? q.errorBounds ? this.errorBars.update(F) : (this.scene.glplot.remove(this.errorBars), this.errorBars.dispose(), this.errorBars = null) : q.errorBounds && (this.errorBars = i(F), this.errorBars._trace = this, this.scene.glplot.add(this.errorBars)), q.delaunayAxis >= 0) {
            var re = function(Y, te, ee) {
              var X, Q = (ee + 1) % 3, ue = (ee + 2) % 3, ce = [], he = [];
              for (X = 0; X < Y.length; ++X) {
                var de = Y[X];
                !isNaN(de[Q]) && isFinite(de[Q]) && !isNaN(de[ue]) && isFinite(de[ue]) && (ce.push([de[Q], de[ue]]), he.push(X));
              }
              var ne = p(ce);
              for (X = 0; X < ne.length; ++X) for (var ae = ne[X], se = 0; se < ae.length; ++se) ae[se] = he[ae[se]];
              return { positions: Y, cells: ne, meshColor: te };
            }(q.position, q.delaunayColor, q.delaunayAxis);
            re.opacity = O.opacity, this.delaunayMesh ? this.delaunayMesh.update(re) : (re.gl = V, this.delaunayMesh = h(re), this.delaunayMesh._trace = this, this.scene.glplot.add(this.delaunayMesh));
          } else this.delaunayMesh && (this.scene.glplot.remove(this.delaunayMesh), this.delaunayMesh.dispose(), this.delaunayMesh = null);
        }, A.dispose = function() {
          this.linePlot && (this.scene.glplot.remove(this.linePlot), this.linePlot.dispose()), this.scatterPlot && (this.scene.glplot.remove(this.scatterPlot), this.scatterPlot.dispose()), this.errorBars && (this.scene.glplot.remove(this.errorBars), this.errorBars.dispose()), this.textMarkers && (this.scene.glplot.remove(this.textMarkers), this.textMarkers.dispose()), this.delaunayMesh && (this.scene.glplot.remove(this.delaunayMesh), this.delaunayMesh.dispose());
        }, o.exports = function(O, T) {
          var z = new S(O, T.uid);
          return z.update(T), z;
        };
      }, 82418: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(64726), h = n(24272), p = n(98168), _ = n(663), d = n(14117);
        o.exports = function(f, c, g, m) {
          function x(E, P) {
            return u.coerce(f, c, d, E, P);
          }
          var w = function(E, P, I, M) {
            var O = 0, T = I("x"), z = I("y"), F = I("z");
            return l.getComponentMethod("calendars", "handleTraceDefaults")(E, P, ["x", "y", "z"], M), T && z && F && (O = Math.min(T.length, z.length, F.length), P._length = P._xlength = P._ylength = P._zlength = O), O;
          }(f, c, x, m);
          if (w) {
            x("text"), x("hovertext"), x("hovertemplate"), x("xhoverformat"), x("yhoverformat"), x("zhoverformat"), x("mode"), i.hasMarkers(c) && h(f, c, g, m, x, { noSelect: !0, noAngle: !0 }), i.hasLines(c) && (x("connectgaps"), p(f, c, g, m, x)), i.hasText(c) && (x("texttemplate"), _(f, c, m, x, { noSelect: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 }));
            var k = (c.line || {}).color, S = (c.marker || {}).color;
            x("surfaceaxis") >= 0 && x("surfacecolor", k || S);
            for (var A = ["x", "y", "z"], C = 0; C < 3; ++C) {
              var D = "projection." + A[C];
              x(D + ".show") && (x(D + ".opacity"), x(D + ".scale"));
            }
            var L = l.getComponentMethod("errorbars", "supplyDefaults");
            L(f, c, k || S || g, { axis: "z" }), L(f, c, k || S || g, { axis: "y", inherit: "z" }), L(f, c, k || S || g, { axis: "x", inherit: "z" });
          } else c.visible = !1;
        };
      }, 17822: function(o, s, n) {
        o.exports = { plot: n(16533), attributes: n(14117), markerSymbols: n(49467), supplyDefaults: n(82418), colorbar: [{ container: "marker", min: "cmin", max: "cmax" }, { container: "line", min: "cmin", max: "cmax" }], calc: n(37593), moduleType: "trace", name: "scatter3d", basePlotModule: n(2487), categories: ["gl3d", "symbols", "showLegend", "scatter-like"], meta: {} };
      }, 54637: function(o, s, n) {
        var l = n(19326), u = n(36640), i = n(9829), h = n(3208).rb, p = n(3208).ay, _ = n(87163), d = n(93049).extendFlat, f = u.marker, c = u.line, g = f.line;
        o.exports = { carpet: { valType: "string", editType: "calc" }, a: { valType: "data_array", editType: "calc" }, b: { valType: "data_array", editType: "calc" }, mode: d({}, u.mode, { dflt: "markers" }), text: d({}, u.text, {}), texttemplate: p({ editType: "plot" }, { keys: ["a", "b", "text"] }), hovertext: d({}, u.hovertext, {}), line: { color: c.color, width: c.width, dash: c.dash, backoff: c.backoff, shape: d({}, c.shape, { values: ["linear", "spline"] }), smoothing: c.smoothing, editType: "calc" }, connectgaps: u.connectgaps, fill: d({}, u.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: l(), marker: d({ symbol: f.symbol, opacity: f.opacity, maxdisplayed: f.maxdisplayed, angle: f.angle, angleref: f.angleref, standoff: f.standoff, size: f.size, sizeref: f.sizeref, sizemin: f.sizemin, sizemode: f.sizemode, line: d({ width: g.width, editType: "calc" }, _("marker.line")), gradient: f.gradient, editType: "calc" }, _("marker")), textfont: u.textfont, textposition: u.textposition, selected: u.selected, unselected: u.unselected, hoverinfo: d({}, i.hoverinfo, { flags: ["a", "b", "text", "name"] }), hoveron: u.hoveron, hovertemplate: h(), zorder: u.zorder };
      }, 68001: function(o, s, n) {
        var l = n(10721), u = n(77272), i = n(99203), h = n(48861), p = n(26544).calcMarkerSize, _ = n(26571);
        o.exports = function(d, f) {
          var c = f._carpetTrace = _(d, f);
          if (c && c.visible && c.visible !== "legendonly") {
            var g;
            f.xaxis = c.xaxis, f.yaxis = c.yaxis;
            var m, x, w = f._length, k = new Array(w), S = !1;
            for (g = 0; g < w; g++) if (m = f.a[g], x = f.b[g], l(m) && l(x)) {
              var A = c.ab2xy(+m, +x, !0), C = c.isVisible(+m, +x);
              C || (S = !0), k[g] = { x: A[0], y: A[1], a: m, b: x, vis: C };
            } else k[g] = { x: !1, y: !1 };
            return f._needsCull = S, k[0].carpet = c, k[0].trace = f, p(f, w), u(d, f), i(k, f), h(k, f), k;
          }
        };
      }, 16986: function(o, s, n) {
        var l = n(34809), u = n(32660), i = n(64726), h = n(24272), p = n(98168), _ = n(91602), d = n(663), f = n(54114), c = n(54637);
        o.exports = function(g, m, x, w) {
          function k(L, E) {
            return l.coerce(g, m, c, L, E);
          }
          k("carpet"), m.xaxis = "x", m.yaxis = "y";
          var S = k("a"), A = k("b"), C = Math.min(S.length, A.length);
          if (C) {
            m._length = C, k("text"), k("texttemplate"), k("hovertext"), k("mode", C < u.PTS_LINESONLY ? "lines+markers" : "lines"), i.hasMarkers(m) && h(g, m, x, w, k, { gradient: !0 }), i.hasLines(m) && (p(g, m, x, w, k, { backoff: !0 }), _(g, m, k), k("connectgaps")), i.hasText(m) && d(g, m, w, k);
            var D = [];
            (i.hasMarkers(m) || i.hasText(m)) && (k("marker.maxdisplayed"), D.push("points")), k("fill"), m.fill !== "none" && (f(g, m, x, k), i.hasLines(m) || _(g, m, k)), m.fill !== "tonext" && m.fill !== "toself" || D.push("fills"), k("hoveron", D.join("+") || "points") !== "fills" && k("hovertemplate"), k("zorder"), l.coerceSelectionMarkerOpacity(m, k);
          } else m.visible = !1;
        };
      }, 68289: function(o) {
        o.exports = function(s, n, l, u, i) {
          var h = u[i];
          return s.a = h.a, s.b = h.b, s.y = h.y, s;
        };
      }, 32709: function(o) {
        o.exports = function(s, n) {
          var l = {}, u = n._carpet, i = u.ab2ij([s.a, s.b]), h = Math.floor(i[0]), p = i[0] - h, _ = Math.floor(i[1]), d = i[1] - _, f = u.evalxy([], h, _, p, d);
          return l.yLabel = f[1].toFixed(3), l;
        };
      }, 59420: function(o, s, n) {
        var l = n(37255), u = n(34809).fillText;
        o.exports = function(i, h, p, _) {
          var d = l(i, h, p, _);
          if (d && d[0].index !== !1) {
            var f = d[0];
            if (f.index === void 0) {
              var c = 1 - f.y0 / i.ya._length, g = i.xa._length, m = g * c / 2, x = g - m;
              return f.x0 = Math.max(Math.min(f.x0, x), m), f.x1 = Math.max(Math.min(f.x1, x), m), d;
            }
            var w = f.cd[f.index];
            f.a = w.a, f.b = w.b, f.xLabelVal = void 0, f.yLabelVal = void 0;
            var k = f.trace, S = k._carpet, A = k._module.formatLabels(w, k);
            f.yLabel = A.yLabel, delete f.text;
            var C = [];
            if (!k.hovertemplate) {
              var D = (w.hi || k.hoverinfo).split("+");
              D.indexOf("all") !== -1 && (D = ["a", "b", "text"]), D.indexOf("a") !== -1 && L(S.aaxis, w.a), D.indexOf("b") !== -1 && L(S.baxis, w.b), C.push("y: " + f.yLabel), D.indexOf("text") !== -1 && u(w, k, C), f.extraText = C.join("<br>");
            }
            return d;
          }
          function L(E, P) {
            var I;
            I = E.labelprefix && E.labelprefix.length > 0 ? E.labelprefix.replace(/ = $/, "") : E._hovertitle, C.push(I + ": " + P.toFixed(3) + E.labelsuffix);
          }
        };
      }, 56534: function(o, s, n) {
        o.exports = { attributes: n(54637), supplyDefaults: n(16986), colorbar: n(21146), formatLabels: n(32709), calc: n(68001), plot: n(64535), style: n(9408).style, styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(59420), selectPoints: n(32665), eventData: n(68289), moduleType: "trace", name: "scattercarpet", basePlotModule: n(37703), categories: ["svg", "carpet", "symbols", "showLegend", "carpetDependent", "zoomScale"], meta: {} };
      }, 64535: function(o, s, n) {
        var l = n(36098), u = n(29714), i = n(62203);
        o.exports = function(h, p, _, d) {
          var f, c, g, m = _[0][0].carpet, x = u.getFromId(h, m.xaxis || "x"), w = u.getFromId(h, m.yaxis || "y"), k = { xaxis: x, yaxis: w, plot: p.plot };
          for (f = 0; f < _.length; f++) (c = _[f][0].trace)._xA = x, c._yA = w;
          for (l(h, k, _, d), f = 0; f < _.length; f++) c = _[f][0].trace, g = d.selectAll("g.trace" + c.uid + " .js-line"), i.setClipUrl(g, _[f][0].carpet._clipPathId, h);
        };
      }, 6893: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(19326), h = n(36640), p = n(9829), _ = n(87163), d = n(94850).T, f = n(93049).extendFlat, c = n(13582).overrideAll, g = h.marker, m = h.line, x = g.line;
        o.exports = c({ lon: { valType: "data_array" }, lat: { valType: "data_array" }, locations: { valType: "data_array" }, locationmode: { valType: "enumerated", values: ["ISO-3", "USA-states", "country names", "geojson-id"], dflt: "ISO-3" }, geojson: { valType: "any", editType: "calc" }, featureidkey: { valType: "string", editType: "calc", dflt: "id" }, mode: f({}, h.mode, { dflt: "markers" }), text: f({}, h.text, {}), texttemplate: u({ editType: "plot" }, { keys: ["lat", "lon", "location", "text"] }), hovertext: f({}, h.hovertext, {}), textfont: h.textfont, textposition: h.textposition, line: { color: m.color, width: m.width, dash: d }, connectgaps: h.connectgaps, marker: f({ symbol: g.symbol, opacity: g.opacity, angle: g.angle, angleref: f({}, g.angleref, { values: ["previous", "up", "north"] }), standoff: g.standoff, size: g.size, sizeref: g.sizeref, sizemin: g.sizemin, sizemode: g.sizemode, colorbar: g.colorbar, line: f({ width: x.width }, _("marker.line")), gradient: g.gradient }, _("marker")), fill: { valType: "enumerated", values: ["none", "toself"], dflt: "none" }, fillcolor: i(), selected: h.selected, unselected: h.unselected, hoverinfo: f({}, p.hoverinfo, { flags: ["lon", "lat", "location", "text", "name"] }), hovertemplate: l() }, "calc", "nested");
      }, 75649: function(o, s, n) {
        var l = n(10721), u = n(63821).BADNUM, i = n(77272), h = n(99203), p = n(48861), _ = n(34809).isArrayOrTypedArray, d = n(34809)._;
        function f(c) {
          return c && typeof c == "string";
        }
        o.exports = function(c, g) {
          var m, x = _(g.locations), w = x ? g.locations.length : g._length, k = new Array(w);
          m = g.geojson ? function(E) {
            return f(E) || l(E);
          } : f;
          for (var S = 0; S < w; S++) {
            var A = k[S] = {};
            if (x) {
              var C = g.locations[S];
              A.loc = m(C) ? C : null;
            } else {
              var D = g.lon[S], L = g.lat[S];
              l(D) && l(L) ? A.lonlat = [+D, +L] : A.lonlat = [u, u];
            }
          }
          return h(k, g), i(c, g), p(k, g), w && (k[0].t = { labels: { lat: d(c, "lat:") + " ", lon: d(c, "lon:") + " " } }), k;
        };
      }, 27386: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(24272), h = n(98168), p = n(663), _ = n(54114), d = n(6893);
        o.exports = function(f, c, g, m) {
          function x(L, E) {
            return l.coerce(f, c, d, L, E);
          }
          var w, k = x("locations");
          if (k && k.length) {
            var S, A = x("geojson");
            (typeof A == "string" && A !== "" || l.isPlainObject(A)) && (S = "geojson-id"), x("locationmode", S) === "geojson-id" && x("featureidkey"), w = k.length;
          } else {
            var C = x("lon") || [], D = x("lat") || [];
            w = Math.min(C.length, D.length);
          }
          w ? (c._length = w, x("text"), x("hovertext"), x("hovertemplate"), x("mode"), u.hasMarkers(c) && i(f, c, g, m, x, { gradient: !0 }), u.hasLines(c) && (h(f, c, g, m, x), x("connectgaps")), u.hasText(c) && (x("texttemplate"), p(f, c, m, x)), x("fill"), c.fill !== "none" && _(f, c, g, x), l.coerceSelectionMarkerOpacity(c, x)) : c.visible = !1;
        };
      }, 71873: function(o) {
        o.exports = function(s, n, l, u, i) {
          s.lon = n.lon, s.lat = n.lat, s.location = n.loc ? n.loc : null;
          var h = u[i];
          return h.fIn && h.fIn.properties && (s.properties = h.fIn.properties), s;
        };
      }, 57413: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = h[i.geo]._subplot.mockAxis, d = u.lonlat;
          return p.lonLabel = l.tickText(_, _.c2l(d[0]), !0).text, p.latLabel = l.tickText(_, _.c2l(d[1]), !0).text, p;
        };
      }, 40636: function(o, s, n) {
        var l = n(32141), u = n(63821).BADNUM, i = n(11539), h = n(34809).fillText, p = n(6893);
        o.exports = function(_, d, f) {
          var c = _.cd, g = c[0].trace, m = _.xa, x = _.ya, w = _.subplot, k = w.projection.isLonLatOverEdges, S = w.project;
          if (l.getClosest(c, function(I) {
            var M = I.lonlat;
            if (M[0] === u || k(M)) return 1 / 0;
            var O = S(M), T = S([d, f]), z = Math.abs(O[0] - T[0]), F = Math.abs(O[1] - T[1]), U = Math.max(3, I.mrc || 0);
            return Math.max(Math.sqrt(z * z + F * F) - U, 1 - 3 / U);
          }, _), _.index !== !1) {
            var A = c[_.index], C = A.lonlat, D = [m.c2p(C), x.c2p(C)], L = A.mrc || 1;
            _.x0 = D[0] - L, _.x1 = D[0] + L, _.y0 = D[1] - L, _.y1 = D[1] + L, _.loc = A.loc, _.lon = C[0], _.lat = C[1];
            var E = {};
            E[g.geo] = { _subplot: w };
            var P = g._module.formatLabels(A, g, E);
            return _.lonLabel = P.lonLabel, _.latLabel = P.latLabel, _.color = i(g, A), _.extraText = function(I, M, O, T) {
              if (!I.hovertemplate) {
                var z = M.hi || I.hoverinfo, F = z === "all" ? p.hoverinfo.flags : z.split("+"), U = F.indexOf("location") !== -1 && Array.isArray(I.locations), V = F.indexOf("lon") !== -1, $ = F.indexOf("lat") !== -1, q = F.indexOf("text") !== -1, K = [];
                return U ? K.push(M.loc) : V && $ ? K.push("(" + re(O.latLabel) + ", " + re(O.lonLabel) + ")") : V ? K.push(T.lon + re(O.lonLabel)) : $ && K.push(T.lat + re(O.latLabel)), q && h(M, I, K), K.join("<br>");
              }
              function re(Y) {
                return Y + "°";
              }
            }(g, A, _, c[0].t.labels), _.hovertemplate = g.hovertemplate, [_];
          }
        };
      }, 18070: function(o, s, n) {
        o.exports = { attributes: n(6893), supplyDefaults: n(27386), colorbar: n(21146), formatLabels: n(57413), calc: n(75649), calcGeoJSON: n(48887).calcGeoJSON, plot: n(48887).plot, style: n(60367), styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(40636), eventData: n(71873), selectPoints: n(45852), moduleType: "trace", name: "scattergeo", basePlotModule: n(47544), categories: ["geo", "symbols", "showLegend", "scatter-like"], meta: {} };
      }, 48887: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(11577).getTopojsonFeatures, h = n(39532), p = n(3994), _ = n(32919).findExtremes, d = n(63821).BADNUM, f = n(26544).calcMarkerSize, c = n(64726), g = n(60367);
        o.exports = { calcGeoJSON: function(m, x) {
          var w, k, S = m[0].trace, A = x[S.geo], C = A._subplot, D = S._length;
          if (u.isArrayOrTypedArray(S.locations)) {
            var L = S.locationmode, E = L === "geojson-id" ? p.extractTraceFeature(m) : i(S, C.topojson);
            for (w = 0; w < D; w++) {
              k = m[w];
              var P = L === "geojson-id" ? k.fOut : p.locationToFeature(L, k.loc, E);
              k.lonlat = P ? P.properties.ct : [d, d];
            }
          }
          var I, M, O = { padded: !0 };
          if (A.fitbounds === "geojson" && S.locationmode === "geojson-id") {
            var T = p.computeBbox(p.getTraceGeojson(S));
            I = [T[0], T[2]], M = [T[1], T[3]];
          } else {
            for (I = new Array(D), M = new Array(D), w = 0; w < D; w++) k = m[w], I[w] = k.lonlat[0], M[w] = k.lonlat[1];
            O.ppad = f(S, D);
          }
          S._extremes.lon = _(A.lonaxis._ax, I, O), S._extremes.lat = _(A.lataxis._ax, M, O);
        }, plot: function(m, x, w) {
          var k = x.layers.frontplot.select(".scatterlayer"), S = u.makeTraceGroups(k, w, "trace scattergeo");
          function A(C, D) {
            C.lonlat[0] === d && l.select(D).remove();
          }
          S.selectAll("*").remove(), S.each(function(C) {
            var D = l.select(this), L = C[0].trace;
            if (c.hasLines(L) || L.fill !== "none") {
              var E = h.calcTraceToLineCoords(C), P = L.fill !== "none" ? h.makePolygon(E) : h.makeLine(E);
              D.selectAll("path.js-line").data([{ geojson: P, trace: L }]).enter().append("path").classed("js-line", !0).style("stroke-miterlimit", 2);
            }
            c.hasMarkers(L) && D.selectAll("path.point").data(u.identity).enter().append("path").classed("point", !0).each(function(I) {
              A(I, this);
            }), c.hasText(L) && D.selectAll("g").data(u.identity).enter().append("g").append("text").each(function(I) {
              A(I, this);
            }), g(m, C);
          });
        } };
      }, 45852: function(o, s, n) {
        var l = n(64726), u = n(63821).BADNUM;
        o.exports = function(i, h) {
          var p, _, d, f, c, g = i.cd, m = i.xaxis, x = i.yaxis, w = [], k = g[0].trace;
          if (!l.hasMarkers(k) && !l.hasText(k)) return [];
          if (h === !1) for (c = 0; c < g.length; c++) g[c].selected = 0;
          else for (c = 0; c < g.length; c++) (_ = (p = g[c]).lonlat)[0] !== u && (d = m.c2p(_), f = x.c2p(_), h.contains([d, f], null, c, i) ? (w.push({ pointNumber: c, lon: _[0], lat: _[1] }), p.selected = 1) : p.selected = 0);
          return w;
        };
      }, 60367: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(78766), h = n(9408), p = h.stylePoints, _ = h.styleText;
        o.exports = function(d, f) {
          f && function(c, g) {
            var m = g[0].trace, x = g[0].node3;
            x.style("opacity", g[0].trace.opacity), p(x, m, c), _(x, m, c), x.selectAll("path.js-line").style("fill", "none").each(function(w) {
              var k = l.select(this), S = w.trace, A = S.line || {};
              k.call(i.stroke, A.color).call(u.dashLine, A.dash || "", A.width || 0), S.fill !== "none" && k.call(i.fill, S.fillcolor);
            });
          }(d, f);
        };
      }, 92089: function(o, s, n) {
        var l = n(9829), u = n(80337), i = n(19326), h = n(36640), p = n(80712).axisHoverFormat, _ = n(87163), d = n(62994), f = n(93049).extendFlat, c = n(13582).overrideAll, g = n(29483).DASHES, m = h.line, x = h.marker, w = x.line, k = o.exports = c({ x: h.x, x0: h.x0, dx: h.dx, y: h.y, y0: h.y0, dy: h.dy, xperiod: h.xperiod, yperiod: h.yperiod, xperiod0: h.xperiod0, yperiod0: h.yperiod0, xperiodalignment: h.xperiodalignment, yperiodalignment: h.yperiodalignment, xhoverformat: p("x"), yhoverformat: p("y"), text: h.text, hovertext: h.hovertext, textposition: h.textposition, textfont: u({ noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0, editType: "calc", colorEditType: "style", arrayOk: !0, noNumericWeightValues: !0, variantValues: ["normal", "small-caps"] }), mode: { valType: "flaglist", flags: ["lines", "markers", "text"], extras: ["none"] }, line: { color: m.color, width: m.width, shape: { valType: "enumerated", values: ["linear", "hv", "vh", "hvh", "vhv"], dflt: "linear", editType: "plot" }, dash: { valType: "enumerated", values: d(g), dflt: "solid" } }, marker: f({}, _("marker"), { symbol: x.symbol, angle: x.angle, size: x.size, sizeref: x.sizeref, sizemin: x.sizemin, sizemode: x.sizemode, opacity: x.opacity, colorbar: x.colorbar, line: f({}, _("marker.line"), { width: w.width }) }), connectgaps: h.connectgaps, fill: f({}, h.fill, { dflt: "none" }), fillcolor: i(), selected: { marker: h.selected.marker, textfont: h.selected.textfont }, unselected: { marker: h.unselected.marker, textfont: h.unselected.textfont }, opacity: l.opacity }, "calc", "nested");
        k.x.editType = k.y.editType = k.x0.editType = k.y0.editType = "calc+clearAxisTypes", k.hovertemplate = h.hovertemplate, k.texttemplate = h.texttemplate;
      }, 68258: function(o, s, n) {
        var l = n(36544);
        o.exports = { moduleType: "trace", name: "scattergl", basePlotModule: n(37703), categories: ["gl", "regl", "cartesian", "symbols", "errorBarsOK", "showLegend", "scatter-like"], attributes: n(92089), supplyDefaults: n(86590), crossTraceDefaults: n(53044), colorbar: n(21146), formatLabels: n(99185), calc: n(15293), hoverPoints: l.hoverPoints, selectPoints: n(17168), meta: {} };
      }, 15293: function(o, s, n) {
        var l = n(27549), u = n(34809), i = n(5975), h = n(32919).findExtremes, p = n(40528), _ = n(26544), d = _.calcMarkerSize, f = _.calcAxisExpansion, c = _.setFirstScatter, g = n(77272), m = n(19937), x = n(62336), w = n(63821).BADNUM, k = n(29483).TOO_MANY_POINTS;
        function S(A, C, D) {
          var L = A._extremes[C._id], E = h(C, D._bnds, { padded: !0 });
          L.min = L.min.concat(E.min), L.max = L.max.concat(E.max);
        }
        o.exports = function(A, C) {
          var D, L = A._fullLayout, E = C._xA = i.getFromId(A, C.xaxis, "x"), P = C._yA = i.getFromId(A, C.yaxis, "y"), I = L._plots[C.xaxis + C.yaxis], M = C._length, O = M >= k, T = 2 * M, z = {}, F = E.makeCalcdata(C, "x"), U = P.makeCalcdata(C, "y"), V = p(C, E, "x", F), $ = p(C, P, "y", U), q = V.vals, K = $.vals;
          C._x = q, C._y = K, C.xperiodalignment && (C._origX = F, C._xStarts = V.starts, C._xEnds = V.ends), C.yperiodalignment && (C._origY = U, C._yStarts = $.starts, C._yEnds = $.ends);
          var re = new Array(T), Y = new Array(M);
          for (D = 0; D < M; D++) re[2 * D] = q[D] === w ? NaN : q[D], re[2 * D + 1] = K[D] === w ? NaN : K[D], Y[D] = D;
          if (E.type === "log") for (D = 0; D < T; D += 2) re[D] = E.c2l(re[D]);
          if (P.type === "log") for (D = 1; D < T; D += 2) re[D] = P.c2l(re[D]);
          O && E.type !== "log" && P.type !== "log" ? z.tree = l(re) : z.ids = Y, g(A, C);
          var te, ee = function(Q, ue, ce, he, de, ne) {
            var ae = m.style(Q, ce);
            if (ae.marker && (ae.marker.positions = he), ae.line && he.length > 1 && u.extendFlat(ae.line, m.linePositions(Q, ce, he)), ae.errorX || ae.errorY) {
              var se = m.errorBarPositions(Q, ce, he, de, ne);
              ae.errorX && u.extendFlat(ae.errorX, se.x), ae.errorY && u.extendFlat(ae.errorY, se.y);
            }
            return ae.text && (u.extendFlat(ae.text, { positions: he }, m.textPosition(Q, ce, ae.text, ae.marker)), u.extendFlat(ae.textSel, { positions: he }, m.textPosition(Q, ce, ae.text, ae.markerSel)), u.extendFlat(ae.textUnsel, { positions: he }, m.textPosition(Q, ce, ae.text, ae.markerUnsel))), ae;
          }(A, 0, C, re, q, K), X = x(A, I);
          return c(L, C), O ? ee.marker && (te = ee.marker.sizeAvg || Math.max(ee.marker.size, 3)) : te = d(C, M), f(A, C, E, P, q, K, te), ee.errorX && S(C, E, ee.errorX), ee.errorY && S(C, P, ee.errorY), ee.fill && !X.fill2d && (X.fill2d = !0), ee.marker && !X.scatter2d && (X.scatter2d = !0), ee.line && !X.line2d && (X.line2d = !0), !ee.errorX && !ee.errorY || X.error2d || (X.error2d = !0), ee.text && !X.glText && (X.glText = !0), ee.marker && (ee.marker.snap = M), X.lineOptions.push(ee.line), X.errorXOptions.push(ee.errorX), X.errorYOptions.push(ee.errorY), X.fillOptions.push(ee.fill), X.markerOptions.push(ee.marker), X.markerSelectedOptions.push(ee.markerSel), X.markerUnselectedOptions.push(ee.markerUnsel), X.textOptions.push(ee.text), X.textSelectedOptions.push(ee.textSel), X.textUnselectedOptions.push(ee.textUnsel), X.selectBatch.push([]), X.unselectBatch.push([]), z._scene = X, z.index = X.count, z.x = q, z.y = K, z.positions = re, X.count++, [{ x: !1, y: !1, t: z, trace: C }];
        };
      }, 29483: function(o) {
        o.exports = { TOO_MANY_POINTS: 1e5, SYMBOL_SDF_SIZE: 200, SYMBOL_SIZE: 20, SYMBOL_STROKE: 1, DOT_RE: /-dot/, OPEN_RE: /-open/, DASHES: { solid: [1], dot: [1, 1], dash: [4, 1], longdash: [8, 1], dashdot: [4, 1, 1, 1], longdashdot: [8, 1, 1, 1] } };
      }, 19937: function(o, s, n) {
        var l = n(10721), u = n(96021), i = n(162), h = n(33626), p = n(34809), _ = p.isArrayOrTypedArray, d = n(62203), f = n(5975), c = n(46998).formatColor, g = n(64726), m = n(92527), x = n(4075), w = n(29483), k = n(20438).DESELECTDIM, S = { start: 1, left: 1, end: -1, right: -1, middle: 0, center: 0, bottom: 1, top: -1 }, A = n(36040).appendArrayPointValue;
        function C(V, $) {
          var q, K = V._fullLayout, re = $._length, Y = $.textfont, te = $.textposition, ee = _(te) ? te : [te], X = Y.color, Q = Y.size, ue = Y.family, ce = Y.weight, he = Y.style, de = Y.variant, ne = {}, ae = V._context.plotGlPixelRatio, se = $.texttemplate;
          if (se) {
            ne.text = [];
            var me = K._d3locale, ye = Array.isArray(se), pe = ye ? Math.min(se.length, re) : re, be = ye ? function(Ee) {
              return se[Ee];
            } : function() {
              return se;
            };
            for (q = 0; q < pe; q++) {
              var Ae = { i: q }, Se = $._module.formatLabels(Ae, $, K), Me = {};
              A(Me, $, q);
              var De = $._meta || {};
              ne.text.push(p.texttemplateString(be(q), Se, me, Me, Ae, De));
            }
          } else _($.text) && $.text.length < re ? ne.text = $.text.slice() : ne.text = $.text;
          if (_(ne.text)) for (q = ne.text.length; q < re; q++) ne.text[q] = "";
          for (ne.opacity = $.opacity, ne.font = {}, ne.align = [], ne.baseline = [], q = 0; q < ee.length; q++) {
            var Le = ee[q].split(/\s+/);
            switch (Le[1]) {
              case "left":
                ne.align.push("right");
                break;
              case "right":
                ne.align.push("left");
                break;
              default:
                ne.align.push(Le[1]);
            }
            switch (Le[0]) {
              case "top":
                ne.baseline.push("bottom");
                break;
              case "bottom":
                ne.baseline.push("top");
                break;
              default:
                ne.baseline.push(Le[0]);
            }
          }
          if (_(X)) for (ne.color = new Array(re), q = 0; q < re; q++) ne.color[q] = X[q];
          else ne.color = X;
          if (_(Q) || Array.isArray(ue) || _(ce) || Array.isArray(he) || Array.isArray(de)) for (ne.font = new Array(re), q = 0; q < re; q++) {
            var We = ne.font[q] = {};
            We.size = (p.isTypedArray(Q) ? Q[q] : _(Q) ? l(Q[q]) ? Q[q] : 0 : Q) * ae, We.family = Array.isArray(ue) ? ue[q] : ue, We.weight = D(_(ce) ? ce[q] : ce), We.style = Array.isArray(he) ? he[q] : he, We.variant = Array.isArray(de) ? de[q] : de;
          }
          else ne.font = { size: Q * ae, family: ue, weight: D(ce), style: he, variant: de };
          return ne;
        }
        function D(V) {
          return V <= 1e3 ? V > 500 ? "bold" : "normal" : V;
        }
        function L(V, $) {
          var q, K, re = $._length, Y = $.marker, te = {}, ee = _(Y.symbol), X = _(Y.angle), Q = _(Y.color), ue = _(Y.line.color), ce = _(Y.opacity), he = _(Y.size), de = _(Y.line.width);
          if (ee || (K = x.isOpenSymbol(Y.symbol)), ee || Q || ue || ce || X) {
            te.symbols = new Array(re), te.angles = new Array(re), te.colors = new Array(re), te.borderColors = new Array(re);
            var ne = Y.symbol, ae = Y.angle, se = c(Y, Y.opacity, re), me = c(Y.line, Y.opacity, re);
            if (!_(me[0])) {
              var ye = me;
              for (me = Array(re), q = 0; q < re; q++) me[q] = ye;
            }
            if (!_(se[0])) {
              var pe = se;
              for (se = Array(re), q = 0; q < re; q++) se[q] = pe;
            }
            if (!_(ne)) {
              var be = ne;
              for (ne = Array(re), q = 0; q < re; q++) ne[q] = be;
            }
            if (!_(ae)) {
              var Ae = ae;
              for (ae = Array(re), q = 0; q < re; q++) ae[q] = Ae;
            }
            for (te.symbols = ne, te.angles = ae, te.colors = se, te.borderColors = me, q = 0; q < re; q++) ee && (K = x.isOpenSymbol(Y.symbol[q])), K && (me[q] = se[q].slice(), se[q] = se[q].slice(), se[q][3] = 0);
            for (te.opacity = $.opacity, te.markers = new Array(re), q = 0; q < re; q++) te.markers[q] = U({ mx: te.symbols[q], ma: te.angles[q] }, $);
          } else K ? (te.color = i(Y.color, "uint8"), te.color[3] = 0, te.borderColor = i(Y.color, "uint8")) : (te.color = i(Y.color, "uint8"), te.borderColor = i(Y.line.color, "uint8")), te.opacity = $.opacity * Y.opacity, te.marker = U({ mx: Y.symbol, ma: Y.angle }, $);
          var Se, Me = m($, 1);
          if (he || de) {
            var De, Le = te.sizes = new Array(re), We = te.borderSizes = new Array(re), Ee = 0;
            if (he) {
              for (q = 0; q < re; q++) Le[q] = Me(Y.size[q]), Ee += Le[q];
              De = Ee / re;
            } else for (Se = Me(Y.size), q = 0; q < re; q++) Le[q] = Se;
            if (de) for (q = 0; q < re; q++) We[q] = Y.line.width[q];
            else for (Se = Y.line.width, q = 0; q < re; q++) We[q] = Se;
            te.sizeAvg = De;
          } else te.size = Me(Y && Y.size || 10), te.borderSizes = Me(Y.line.width);
          return te;
        }
        function E(V, $, q) {
          var K = $.marker, re = {};
          return q && (q.marker && q.marker.symbol ? re = L(0, p.extendFlat({}, K, q.marker)) : q.marker && (q.marker.size && (re.size = q.marker.size), q.marker.color && (re.colors = q.marker.color), q.marker.opacity !== void 0 && (re.opacity = q.marker.opacity))), re;
        }
        function P(V, $, q) {
          var K = {};
          if (!q) return K;
          if (q.textfont) {
            var re = { opacity: 1, text: $.text, texttemplate: $.texttemplate, textposition: $.textposition, textfont: p.extendFlat({}, $.textfont) };
            q.textfont && p.extendFlat(re.textfont, q.textfont), K = C(V, re);
          }
          return K;
        }
        function I(V, $, q) {
          var K = { capSize: 2 * $.width * q, lineWidth: $.thickness * q, color: $.color };
          return $.copy_ystyle && (K = V.error_y), K;
        }
        var M = w.SYMBOL_SDF_SIZE, O = w.SYMBOL_SIZE, T = w.SYMBOL_STROKE, z = {}, F = d.symbolFuncs[0](0.05 * O);
        function U(V, $) {
          var q, K, re = V.mx;
          if (re === "circle") return null;
          var Y = d.symbolNumber(re), te = d.symbolFuncs[Y % 100], ee = !!d.symbolNoDot[Y % 100], X = !!d.symbolNoFill[Y % 100], Q = x.isDotSymbol(re);
          if (V.ma && (re += "_" + V.ma), z[re]) return z[re];
          var ue = d.getMarkerAngle(V, $);
          return q = Q && !ee ? te(1.1 * O, ue) + F : te(O, ue), K = u(q, { w: M, h: M, viewBox: [-O, -O, O, O], stroke: X ? T : -T }), z[re] = K, K || null;
        }
        o.exports = { style: function(V, $) {
          var q, K = { marker: void 0, markerSel: void 0, markerUnsel: void 0, line: void 0, fill: void 0, errorX: void 0, errorY: void 0, text: void 0, textSel: void 0, textUnsel: void 0 }, re = V._context.plotGlPixelRatio;
          if ($.visible !== !0) return K;
          if (g.hasText($) && (K.text = C(V, $), K.textSel = P(V, $, $.selected), K.textUnsel = P(V, $, $.unselected)), g.hasMarkers($) && (K.marker = L(0, $), K.markerSel = E(0, $, $.selected), K.markerUnsel = E(0, $, $.unselected), !$.unselected && _($.marker.opacity))) {
            var Y = $.marker.opacity;
            for (K.markerUnsel.opacity = new Array(Y.length), q = 0; q < Y.length; q++) K.markerUnsel.opacity[q] = k * Y[q];
          }
          if (g.hasLines($)) {
            K.line = { overlay: !0, thickness: $.line.width * re, color: $.line.color, opacity: $.opacity };
            var te = (w.DASHES[$.line.dash] || [1]).slice();
            for (q = 0; q < te.length; ++q) te[q] *= $.line.width * re;
            K.line.dashes = te;
          }
          return $.error_x && $.error_x.visible && (K.errorX = I($, $.error_x, re)), $.error_y && $.error_y.visible && (K.errorY = I($, $.error_y, re)), $.fill && $.fill !== "none" && (K.fill = { closed: !0, fill: $.fillcolor, thickness: 0 }), K;
        }, markerStyle: L, markerSelection: E, linePositions: function(V, $, q) {
          var K, re, Y = q.length, te = Y / 2;
          if (g.hasLines($) && te) if ($.line.shape === "hv") {
            for (K = [], re = 0; re < te - 1; re++) isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) ? K.push(NaN, NaN, NaN, NaN) : (K.push(q[2 * re], q[2 * re + 1]), isNaN(q[2 * re + 2]) || isNaN(q[2 * re + 3]) ? K.push(NaN, NaN) : K.push(q[2 * re + 2], q[2 * re + 1]));
            K.push(q[Y - 2], q[Y - 1]);
          } else if ($.line.shape === "hvh") {
            for (K = [], re = 0; re < te - 1; re++) if (isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) || isNaN(q[2 * re + 2]) || isNaN(q[2 * re + 3])) isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) ? K.push(NaN, NaN) : K.push(q[2 * re], q[2 * re + 1]), K.push(NaN, NaN);
            else {
              var ee = (q[2 * re] + q[2 * re + 2]) / 2;
              K.push(q[2 * re], q[2 * re + 1], ee, q[2 * re + 1], ee, q[2 * re + 3]);
            }
            K.push(q[Y - 2], q[Y - 1]);
          } else if ($.line.shape === "vhv") {
            for (K = [], re = 0; re < te - 1; re++) if (isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) || isNaN(q[2 * re + 2]) || isNaN(q[2 * re + 3])) isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) ? K.push(NaN, NaN) : K.push(q[2 * re], q[2 * re + 1]), K.push(NaN, NaN);
            else {
              var X = (q[2 * re + 1] + q[2 * re + 3]) / 2;
              K.push(q[2 * re], q[2 * re + 1], q[2 * re], X, q[2 * re + 2], X);
            }
            K.push(q[Y - 2], q[Y - 1]);
          } else if ($.line.shape === "vh") {
            for (K = [], re = 0; re < te - 1; re++) isNaN(q[2 * re]) || isNaN(q[2 * re + 1]) ? K.push(NaN, NaN, NaN, NaN) : (K.push(q[2 * re], q[2 * re + 1]), isNaN(q[2 * re + 2]) || isNaN(q[2 * re + 3]) ? K.push(NaN, NaN) : K.push(q[2 * re], q[2 * re + 3]));
            K.push(q[Y - 2], q[Y - 1]);
          } else K = q;
          var Q = !1;
          for (re = 0; re < K.length; re++) if (isNaN(K[re])) {
            Q = !0;
            break;
          }
          var ue = Q || K.length > w.TOO_MANY_POINTS || g.hasMarkers($) ? "rect" : "round";
          if (Q && $.connectgaps) {
            var ce = K[0], he = K[1];
            for (re = 0; re < K.length; re += 2) isNaN(K[re]) || isNaN(K[re + 1]) ? (K[re] = ce, K[re + 1] = he) : (ce = K[re], he = K[re + 1]);
          }
          return { join: ue, positions: K };
        }, errorBarPositions: function(V, $, q, K, re) {
          var Y = h.getComponentMethod("errorbars", "makeComputeError"), te = f.getFromId(V, $.xaxis, "x"), ee = f.getFromId(V, $.yaxis, "y"), X = q.length / 2, Q = {};
          function ue(ce, he) {
            var de = he._id.charAt(0), ne = $["error_" + de];
            if (ne && ne.visible && (he.type === "linear" || he.type === "log")) {
              for (var ae = Y(ne), se = { x: 0, y: 1 }[de], me = { x: [0, 1, 2, 3], y: [2, 3, 0, 1] }[de], ye = new Float64Array(4 * X), pe = 1 / 0, be = -1 / 0, Ae = 0, Se = 0; Ae < X; Ae++, Se += 4) {
                var Me = ce[Ae];
                if (l(Me)) {
                  var De = q[2 * Ae + se], Le = ae(Me, Ae), We = Le[0], Ee = Le[1];
                  if (l(We) && l(Ee)) {
                    var Ne = Me - We, Ie = Me + Ee;
                    ye[Se + me[0]] = De - he.c2l(Ne), ye[Se + me[1]] = he.c2l(Ie) - De, ye[Se + me[2]] = 0, ye[Se + me[3]] = 0, pe = Math.min(pe, Me - We), be = Math.max(be, Me + Ee);
                  }
                }
              }
              Q[de] = { positions: q, errors: ye, _bnds: [pe, be] };
            }
          }
          return ue(K, te), ue(re, ee), Q;
        }, textPosition: function(V, $, q, K) {
          var re, Y = $._length, te = {};
          if (g.hasMarkers($)) {
            var ee = q.font, X = q.align, Q = q.baseline;
            for (te.offset = new Array(Y), re = 0; re < Y; re++) {
              var ue = K.sizes ? K.sizes[re] : K.size, ce = _(ee) ? ee[re].size : ee.size, he = _(X) ? X.length > 1 ? X[re] : X[0] : X, de = _(Q) ? Q.length > 1 ? Q[re] : Q[0] : Q, ne = S[he], ae = S[de], se = ue ? ue / 0.8 + 1 : 0, me = -ae * se - 0.5 * ae;
              te.offset[re] = [ne * se / ce, me / ce];
            }
          }
          return te;
        } };
      }, 86590: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(4075), h = n(92089), p = n(32660), _ = n(64726), d = n(99867), f = n(99669), c = n(24272), g = n(98168), m = n(54114), x = n(663);
        o.exports = function(w, k, S, A) {
          function C(T, z) {
            return l.coerce(w, k, h, T, z);
          }
          var D = !!w.marker && i.isOpenSymbol(w.marker.symbol), L = _.isBubble(w), E = d(w, k, A, C);
          if (E) {
            f(w, k, A, C), C("xhoverformat"), C("yhoverformat");
            var P = E < p.PTS_LINESONLY ? "lines+markers" : "lines";
            C("text"), C("hovertext"), C("hovertemplate"), C("mode", P), _.hasMarkers(k) && (c(w, k, S, A, C, { noAngleRef: !0, noStandOff: !0 }), C("marker.line.width", D || L ? 1 : 0)), _.hasLines(k) && (C("connectgaps"), g(w, k, S, A, C), C("line.shape")), _.hasText(k) && (C("texttemplate"), x(w, k, A, C, { noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 }));
            var I = (k.line || {}).color, M = (k.marker || {}).color;
            C("fill"), k.fill !== "none" && m(w, k, S, C);
            var O = u.getComponentMethod("errorbars", "supplyDefaults");
            O(w, k, I || M || S, { axis: "y" }), O(w, k, I || M || S, { axis: "x", inherit: "y" }), l.coerceSelectionMarkerOpacity(k, C);
          } else k.visible = !1;
        };
      }, 85686: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(20438).DESELECTDIM;
        o.exports = { styleTextSelection: function(h) {
          var p, _, d = h[0], f = d.trace, c = d.t, g = c._scene, m = c.index, x = g.selectBatch[m], w = g.unselectBatch[m], k = g.textOptions[m], S = g.textSelectedOptions[m] || {}, A = g.textUnselectedOptions[m] || {}, C = l.extendFlat({}, k);
          if (x.length || w.length) {
            var D = S.color, L = A.color, E = k.color, P = l.isArrayOrTypedArray(E);
            for (C.color = new Array(f._length), p = 0; p < x.length; p++) _ = x[p], C.color[_] = D || (P ? E[_] : E);
            for (p = 0; p < w.length; p++) {
              _ = w[p];
              var I = P ? E[_] : E;
              C.color[_] = L || (D ? I : u.addOpacity(I, i));
            }
          }
          g.glText[m].update(C);
        } };
      }, 99185: function(o, s, n) {
        var l = n(15294);
        o.exports = function(u, i, h) {
          var p = u.i;
          return "x" in u || (u.x = i._x[p]), "y" in u || (u.y = i._y[p]), l(u, i, h);
        };
      }, 4075: function(o, s, n) {
        var l = n(29483);
        s.isOpenSymbol = function(u) {
          return typeof u == "string" ? l.OPEN_RE.test(u) : u % 200 > 100;
        }, s.isDotSymbol = function(u) {
          return typeof u == "string" ? l.DOT_RE.test(u) : u > 200;
        };
      }, 36544: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(11539);
        function h(p, _, d, f) {
          var c = p.xa, g = p.ya, m = p.distance, x = p.dxy, w = p.index, k = { pointNumber: w, x: _[w], y: d[w] };
          k.tx = u.isArrayOrTypedArray(f.text) ? f.text[w] : f.text, k.htx = Array.isArray(f.hovertext) ? f.hovertext[w] : f.hovertext, k.data = Array.isArray(f.customdata) ? f.customdata[w] : f.customdata, k.tp = Array.isArray(f.textposition) ? f.textposition[w] : f.textposition;
          var S = f.textfont;
          S && (k.ts = u.isArrayOrTypedArray(S.size) ? S.size[w] : S.size, k.tc = u.isArrayOrTypedArray(S.color) ? S.color[w] : S.color, k.tf = Array.isArray(S.family) ? S.family[w] : S.family, k.tw = Array.isArray(S.weight) ? S.weight[w] : S.weight, k.ty = Array.isArray(S.style) ? S.style[w] : S.style, k.tv = Array.isArray(S.variant) ? S.variant[w] : S.variant);
          var A = f.marker;
          A && (k.ms = u.isArrayOrTypedArray(A.size) ? A.size[w] : A.size, k.mo = u.isArrayOrTypedArray(A.opacity) ? A.opacity[w] : A.opacity, k.mx = u.isArrayOrTypedArray(A.symbol) ? A.symbol[w] : A.symbol, k.ma = u.isArrayOrTypedArray(A.angle) ? A.angle[w] : A.angle, k.mc = u.isArrayOrTypedArray(A.color) ? A.color[w] : A.color);
          var C = A && A.line;
          C && (k.mlc = Array.isArray(C.color) ? C.color[w] : C.color, k.mlw = u.isArrayOrTypedArray(C.width) ? C.width[w] : C.width);
          var D = A && A.gradient;
          D && D.type !== "none" && (k.mgt = Array.isArray(D.type) ? D.type[w] : D.type, k.mgc = Array.isArray(D.color) ? D.color[w] : D.color);
          var L = c.c2p(k.x, !0), E = g.c2p(k.y, !0), P = k.mrc || 1, I = f.hoverlabel;
          I && (k.hbg = Array.isArray(I.bgcolor) ? I.bgcolor[w] : I.bgcolor, k.hbc = Array.isArray(I.bordercolor) ? I.bordercolor[w] : I.bordercolor, k.hts = u.isArrayOrTypedArray(I.font.size) ? I.font.size[w] : I.font.size, k.htc = Array.isArray(I.font.color) ? I.font.color[w] : I.font.color, k.htf = Array.isArray(I.font.family) ? I.font.family[w] : I.font.family, k.hnl = u.isArrayOrTypedArray(I.namelength) ? I.namelength[w] : I.namelength);
          var M = f.hoverinfo;
          M && (k.hi = Array.isArray(M) ? M[w] : M);
          var O = f.hovertemplate;
          O && (k.ht = Array.isArray(O) ? O[w] : O);
          var T = {};
          T[p.index] = k;
          var z = f._origX, F = f._origY, U = u.extendFlat({}, p, { color: i(f, k), x0: L - P, x1: L + P, xLabelVal: z ? z[w] : k.x, y0: E - P, y1: E + P, yLabelVal: F ? F[w] : k.y, cd: T, distance: m, spikeDistance: x, hovertemplate: k.ht });
          return k.htx ? U.text = k.htx : k.tx ? U.text = k.tx : f.text && (U.text = f.text), u.fillText(k, f, U), l.getComponentMethod("errorbars", "hoverInfo")(k, f, U), U;
        }
        o.exports = { hoverPoints: function(p, _, d, f) {
          var c, g, m, x, w, k, S, A, C, D, L = p.cd, E = L[0].t, P = L[0].trace, I = p.xa, M = p.ya, O = E.x, T = E.y, z = I.c2p(_), F = M.c2p(d), U = p.distance;
          if (E.tree) {
            var V = I.p2c(z - U), $ = I.p2c(z + U), q = M.p2c(F - U), K = M.p2c(F + U);
            c = f === "x" ? E.tree.range(Math.min(V, $), Math.min(M._rl[0], M._rl[1]), Math.max(V, $), Math.max(M._rl[0], M._rl[1])) : E.tree.range(Math.min(V, $), Math.min(q, K), Math.max(V, $), Math.max(q, K));
          } else c = E.ids;
          var re = U;
          if (f === "x") {
            var Y = !!P.xperiodalignment, te = !!P.yperiodalignment;
            for (k = 0; k < c.length; k++) {
              if (x = O[g = c[k]], S = Math.abs(I.c2p(x) - z), Y) {
                var ee = I.c2p(P._xStarts[g]), X = I.c2p(P._xEnds[g]);
                S = z >= Math.min(ee, X) && z <= Math.max(ee, X) ? 0 : 1 / 0;
              }
              if (S < re) {
                if (re = S, w = T[g], A = M.c2p(w) - F, te) {
                  var Q = M.c2p(P._yStarts[g]), ue = M.c2p(P._yEnds[g]);
                  A = F >= Math.min(Q, ue) && F <= Math.max(Q, ue) ? 0 : 1 / 0;
                }
                D = Math.sqrt(S * S + A * A), m = c[k];
              }
            }
          } else for (k = c.length - 1; k > -1; k--) x = O[g = c[k]], w = T[g], S = I.c2p(x) - z, A = M.c2p(w) - F, (C = Math.sqrt(S * S + A * A)) < re && (re = D = C, m = g);
          return p.index = m, p.distance = re, p.dxy = D, m === void 0 ? [p] : [h(p, O, T, P)];
        }, calcHover: h };
      }, 52378: function(o, s, n) {
        var l = n(68258);
        l.plot = n(47731), o.exports = l;
      }, 47731: function(o, s, n) {
        var l = n(62172), u = n(49478), i = n(29978), h = n(74024), p = n(34809), _ = n(70414).selectMode, d = n(22459), f = n(64726), c = n(17210), g = n(85686).styleTextSelection, m = {};
        function x(w, k, S, A) {
          var C = w._size, D = w.width * A, L = w.height * A, E = C.l * A, P = C.b * A, I = C.r * A, M = C.t * A, O = C.w * A, T = C.h * A;
          return [E + k.domain[0] * O, P + S.domain[0] * T, D - I - (1 - k.domain[1]) * O, L - M - (1 - S.domain[1]) * T];
        }
        (o.exports = function(w, k, S) {
          if (S.length) {
            var A, C, D = w._fullLayout, L = k._scene, E = k.xaxis, P = k.yaxis;
            if (L) if (d(w, ["ANGLE_instanced_arrays", "OES_element_index_uint"], m)) {
              var I = L.count, M = D._glcanvas.data()[0].regl;
              if (c(w, k, S), L.dirty) {
                if (!L.line2d && !L.error2d || L.scatter2d || L.fill2d || L.glText || M.clear({}), L.error2d === !0 && (L.error2d = i(M)), L.line2d === !0 && (L.line2d = u(M)), L.scatter2d === !0 && (L.scatter2d = l(M)), L.fill2d === !0 && (L.fill2d = u(M)), L.glText === !0) for (L.glText = new Array(I), A = 0; A < I; A++) L.glText[A] = new h(M);
                if (L.glText) {
                  if (I > L.glText.length) {
                    var O = I - L.glText.length;
                    for (A = 0; A < O; A++) L.glText.push(new h(M));
                  } else if (I < L.glText.length) {
                    var T = L.glText.length - I;
                    L.glText.splice(I, T).forEach(function(se) {
                      se.destroy();
                    });
                  }
                  for (A = 0; A < I; A++) L.glText[A].update(L.textOptions[A]);
                }
                if (L.line2d && (L.line2d.update(L.lineOptions), L.lineOptions = L.lineOptions.map(function(se) {
                  if (se && se.positions) {
                    for (var me = se.positions, ye = 0; ye < me.length && (isNaN(me[ye]) || isNaN(me[ye + 1])); ) ye += 2;
                    for (var pe = me.length - 2; pe > ye && (isNaN(me[pe]) || isNaN(me[pe + 1])); ) pe -= 2;
                    se.positions = me.slice(ye, pe + 2);
                  }
                  return se;
                }), L.line2d.update(L.lineOptions)), L.error2d) {
                  var z = (L.errorXOptions || []).concat(L.errorYOptions || []);
                  L.error2d.update(z);
                }
                L.scatter2d && L.scatter2d.update(L.markerOptions), L.fillOrder = p.repeat(null, I), L.fill2d && (L.fillOptions = L.fillOptions.map(function(se, me) {
                  var ye = S[me];
                  if (se && ye && ye[0] && ye[0].trace) {
                    var pe, be, Ae = ye[0], Se = Ae.trace, Me = Ae.t, De = L.lineOptions[me], Le = [];
                    Se._ownfill && Le.push(me), Se._nexttrace && Le.push(me + 1), Le.length && (L.fillOrder[me] = Le);
                    var We, Ee, Ne = [], Ie = De && De.positions || Me.positions;
                    if (Se.fill === "tozeroy") {
                      for (We = 0; We < Ie.length && isNaN(Ie[We + 1]); ) We += 2;
                      for (Ee = Ie.length - 2; Ee > We && isNaN(Ie[Ee + 1]); ) Ee -= 2;
                      Ie[We + 1] !== 0 && (Ne = [Ie[We], 0]), Ne = Ne.concat(Ie.slice(We, Ee + 2)), Ie[Ee + 1] !== 0 && (Ne = Ne.concat([Ie[Ee], 0]));
                    } else if (Se.fill === "tozerox") {
                      for (We = 0; We < Ie.length && isNaN(Ie[We]); ) We += 2;
                      for (Ee = Ie.length - 2; Ee > We && isNaN(Ie[Ee]); ) Ee -= 2;
                      Ie[We] !== 0 && (Ne = [0, Ie[We + 1]]), Ne = Ne.concat(Ie.slice(We, Ee + 2)), Ie[Ee] !== 0 && (Ne = Ne.concat([0, Ie[Ee + 1]]));
                    } else if (Se.fill === "toself" || Se.fill === "tonext") {
                      for (Ne = [], pe = 0, se.splitNull = !0, be = 0; be < Ie.length; be += 2) (isNaN(Ie[be]) || isNaN(Ie[be + 1])) && ((Ne = Ne.concat(Ie.slice(pe, be))).push(Ie[pe], Ie[pe + 1]), Ne.push(null, null), pe = be + 2);
                      Ne = Ne.concat(Ie.slice(pe)), pe && Ne.push(Ie[pe], Ie[pe + 1]);
                    } else {
                      var ge = Se._nexttrace;
                      if (ge) {
                        var Ce = L.lineOptions[me + 1];
                        if (Ce) {
                          var we = Ce.positions;
                          if (Se.fill === "tonexty") {
                            for (Ne = Ie.slice(), me = Math.floor(we.length / 2); me--; ) {
                              var Ge = we[2 * me], Re = we[2 * me + 1];
                              isNaN(Ge) || isNaN(Re) || Ne.push(Ge, Re);
                            }
                            se.fill = ge.fillcolor;
                          }
                        }
                      }
                    }
                    if (Se._prevtrace && Se._prevtrace.fill === "tonext") {
                      var je = L.lineOptions[me - 1].positions, Ke = Ne.length / 2, tt = [pe = Ke];
                      for (be = 0; be < je.length; be += 2) (isNaN(je[be]) || isNaN(je[be + 1])) && (tt.push(be / 2 + Ke + 1), pe = be + 2);
                      Ne = Ne.concat(je), se.hole = tt;
                    }
                    return se.fillmode = Se.fill, se.opacity = Se.opacity, se.positions = Ne, se;
                  }
                }), L.fill2d.update(L.fillOptions));
              }
              var F = D.dragmode, U = _(F), V = D.clickmode.indexOf("select") > -1;
              for (A = 0; A < I; A++) {
                var $ = S[A][0], q = $.trace, K = $.t, re = K.index, Y = q._length, te = K.x, ee = K.y;
                if (q.selectedpoints || U || V) {
                  if (U || (U = !0), q.selectedpoints) {
                    var X = L.selectBatch[re] = p.selIndices2selPoints(q), Q = {};
                    for (C = 0; C < X.length; C++) Q[X[C]] = 1;
                    var ue = [];
                    for (C = 0; C < Y; C++) Q[C] || ue.push(C);
                    L.unselectBatch[re] = ue;
                  }
                  var ce = K.xpx = new Array(Y), he = K.ypx = new Array(Y);
                  for (C = 0; C < Y; C++) ce[C] = E.c2p(te[C]), he[C] = P.c2p(ee[C]);
                } else K.xpx = K.ypx = null;
              }
              if (U) {
                if (L.select2d || (L.select2d = l(D._glcanvas.data()[1].regl)), L.scatter2d) {
                  var de = new Array(I);
                  for (A = 0; A < I; A++) de[A] = L.selectBatch[A].length || L.unselectBatch[A].length ? L.markerUnselectedOptions[A] : {};
                  L.scatter2d.update(de);
                }
                L.select2d && (L.select2d.update(L.markerOptions), L.select2d.update(L.markerSelectedOptions)), L.glText && S.forEach(function(se) {
                  var me = ((se || [])[0] || {}).trace || {};
                  f.hasText(me) && g(se);
                });
              } else L.scatter2d && L.scatter2d.update(L.markerOptions);
              var ne = { viewport: x(D, E, P, w._context.plotGlPixelRatio), range: [(E._rl || E.range)[0], (P._rl || P.range)[0], (E._rl || E.range)[1], (P._rl || P.range)[1]] }, ae = p.repeat(ne, L.count);
              L.fill2d && L.fill2d.update(ae), L.line2d && L.line2d.update(ae), L.error2d && L.error2d.update(ae.concat(ae)), L.scatter2d && L.scatter2d.update(ae), L.select2d && L.select2d.update(ae), L.glText && L.glText.forEach(function(se) {
                se.update(ne);
              });
            } else L.init();
          }
        }).reglPrecompiled = m;
      }, 62336: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          var h = i._scene, p = { count: 0, dirty: !0, lineOptions: [], fillOptions: [], markerOptions: [], markerSelectedOptions: [], markerUnselectedOptions: [], errorXOptions: [], errorYOptions: [], textOptions: [], textSelectedOptions: [], textUnselectedOptions: [], selectBatch: [], unselectBatch: [] }, _ = { fill2d: !1, scatter2d: !1, error2d: !1, line2d: !1, glText: !1, select2d: !1 };
          return i._scene || ((h = i._scene = {}).init = function() {
            l.extendFlat(h, _, p);
          }, h.init(), h.update = function(d) {
            var f = l.repeat(d, h.count);
            if (h.fill2d && h.fill2d.update(f), h.scatter2d && h.scatter2d.update(f), h.line2d && h.line2d.update(f), h.error2d && h.error2d.update(f.concat(f)), h.select2d && h.select2d.update(f), h.glText) for (var c = 0; c < h.count; c++) h.glText[c].update(d);
          }, h.draw = function() {
            for (var d = h.count, f = h.fill2d, c = h.error2d, g = h.line2d, m = h.scatter2d, x = h.glText, w = h.select2d, k = h.selectBatch, S = h.unselectBatch, A = 0; A < d; A++) {
              if (f && h.fillOrder[A] && f.draw(h.fillOrder[A]), g && h.lineOptions[A] && g.draw(A), c && (h.errorXOptions[A] && c.draw(A), h.errorYOptions[A] && c.draw(A + d)), m && h.markerOptions[A]) if (S[A].length) {
                var C = l.repeat([], h.count);
                C[A] = S[A], m.draw(C);
              } else k[A].length || m.draw(A);
              x[A] && h.textOptions[A] && x[A].render();
            }
            w && w.draw(k), h.dirty = !1;
          }, h.destroy = function() {
            h.fill2d && h.fill2d.destroy && h.fill2d.destroy(), h.scatter2d && h.scatter2d.destroy && h.scatter2d.destroy(), h.error2d && h.error2d.destroy && h.error2d.destroy(), h.line2d && h.line2d.destroy && h.line2d.destroy(), h.select2d && h.select2d.destroy && h.select2d.destroy(), h.glText && h.glText.forEach(function(d) {
              d.destroy && d.destroy();
            }), h.lineOptions = null, h.fillOptions = null, h.markerOptions = null, h.markerSelectedOptions = null, h.markerUnselectedOptions = null, h.errorXOptions = null, h.errorYOptions = null, h.textOptions = null, h.textSelectedOptions = null, h.textUnselectedOptions = null, h.selectBatch = null, h.unselectBatch = null, i._scene = null;
          }), h.dirty || l.extendFlat(h, p), h;
        };
      }, 17168: function(o, s, n) {
        var l = n(64726), u = n(85686).styleTextSelection;
        o.exports = function(i, h) {
          var p = i.cd, _ = i.xaxis, d = i.yaxis, f = [], c = p[0].trace, g = p[0].t, m = c._length, x = g.x, w = g.y, k = g._scene, S = g.index;
          if (!k) return f;
          var A = l.hasText(c), C = l.hasMarkers(c), D = !C && !A;
          if (c.visible !== !0 || D) return f;
          var L = [], E = [];
          if (h !== !1 && !h.degenerate) for (var P = 0; P < m; P++) h.contains([g.xpx[P], g.ypx[P]], !1, P, i) ? (L.push(P), f.push({ pointNumber: P, x: _.c2d(x[P]), y: d.c2d(w[P]) })) : E.push(P);
          if (C) {
            var I = k.scatter2d;
            if (L.length || E.length) {
              if (!k.selectBatch[S].length && !k.unselectBatch[S].length) {
                var M = new Array(k.count);
                M[S] = k.markerUnselectedOptions[S], I.update.apply(I, M);
              }
            } else {
              var O = new Array(k.count);
              O[S] = k.markerOptions[S], I.update.apply(I, O);
            }
          }
          return k.selectBatch[S] = L, k.unselectBatch[S] = E, A && u(p), f;
        };
      }, 71388: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(19326), h = n(6893), p = n(36640), _ = n(8257), d = n(9829), f = n(87163), c = n(93049).extendFlat, g = n(13582).overrideAll, m = n(8257), x = h.line, w = h.marker;
        o.exports = g({ lon: h.lon, lat: h.lat, cluster: { enabled: { valType: "boolean" }, maxzoom: c({}, m.layers.maxzoom, {}), step: { valType: "number", arrayOk: !0, dflt: -1, min: -1 }, size: { valType: "number", arrayOk: !0, dflt: 20, min: 0 }, color: { valType: "color", arrayOk: !0 }, opacity: c({}, w.opacity, { dflt: 1 }) }, mode: c({}, p.mode, { dflt: "markers" }), text: c({}, p.text, {}), texttemplate: u({ editType: "plot" }, { keys: ["lat", "lon", "text"] }), hovertext: c({}, p.hovertext, {}), line: { color: x.color, width: x.width }, connectgaps: p.connectgaps, marker: c({ symbol: { valType: "string", dflt: "circle", arrayOk: !0 }, angle: { valType: "number", dflt: "auto", arrayOk: !0 }, allowoverlap: { valType: "boolean", dflt: !1 }, opacity: w.opacity, size: w.size, sizeref: w.sizeref, sizemin: w.sizemin, sizemode: w.sizemode }, f("marker")), fill: h.fill, fillcolor: i(), textfont: _.layers.symbol.textfont, textposition: _.layers.symbol.textposition, below: { valType: "string" }, selected: { marker: p.selected.marker }, unselected: { marker: p.unselected.marker }, hoverinfo: c({}, d.hoverinfo, { flags: ["lon", "lat", "text", "name"] }), hovertemplate: l() }, "calc", "nested");
      }, 13624: function(o) {
        var s = ["Metropolis Black Italic", "Metropolis Black", "Metropolis Bold Italic", "Metropolis Bold", "Metropolis Extra Bold Italic", "Metropolis Extra Bold", "Metropolis Extra Light Italic", "Metropolis Extra Light", "Metropolis Light Italic", "Metropolis Light", "Metropolis Medium Italic", "Metropolis Medium", "Metropolis Regular Italic", "Metropolis Regular", "Metropolis Semi Bold Italic", "Metropolis Semi Bold", "Metropolis Thin Italic", "Metropolis Thin", "Open Sans Bold Italic", "Open Sans Bold", "Open Sans Extrabold Italic", "Open Sans Extrabold", "Open Sans Italic", "Open Sans Light Italic", "Open Sans Light", "Open Sans Regular", "Open Sans Semibold Italic", "Open Sans Semibold", "Klokantech Noto Sans Bold", "Klokantech Noto Sans CJK Bold", "Klokantech Noto Sans CJK Regular", "Klokantech Noto Sans Italic", "Klokantech Noto Sans Regular"];
        o.exports = { isSupportedFont: function(n) {
          return s.indexOf(n) !== -1;
        } };
      }, 76717: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(63821).BADNUM, h = n(39532), p = n(88856), _ = n(62203), d = n(92527), f = n(64726), c = n(13624).isSupportedFont, g = n(4657), m = n(36040).appendArrayPointValue, x = n(30635).NEWLINES, w = n(30635).BR_TAG_ALL;
        function k(E) {
          return { type: E, geojson: h.makeBlank(), layout: { visibility: "none" }, filter: null, paint: {} };
        }
        function S(E, P) {
          return u.isArrayOrTypedArray(E) ? P ? function(I) {
            return l(E[I]) ? +E[I] : 0;
          } : function(I) {
            return E[I];
          } : E ? function() {
            return E;
          } : A;
        }
        function A() {
          return "";
        }
        function C(E) {
          return E[0] === i;
        }
        function D(E, P) {
          var I;
          if (u.isArrayOrTypedArray(E) && u.isArrayOrTypedArray(P)) {
            I = ["step", ["get", "point_count"], E[0]];
            for (var M = 1; M < E.length; M++) I.push(P[M - 1], E[M]);
          } else I = E;
          return I;
        }
        function L(E) {
          var P = E.textfont, I = P.family, M = P.style, O = P.weight, T = I.split(" "), z = T[T.length - 1] === "Italic";
          z && T.pop(), z = z || M === "italic";
          var F = T.join(" ");
          return O === "bold" && T.indexOf("Bold") === -1 ? F += " Bold" : O <= 1e3 && (T[0] === "Metropolis" ? (F = "Metropolis", F += O > 850 ? " Black" : O > 750 ? " Extra Bold" : O > 650 ? " Bold" : O > 550 ? " Semi Bold" : O > 450 ? " Medium" : O > 350 ? " Regular" : O > 250 ? " Light" : O > 150 ? " Extra Light" : " Thin") : T.slice(0, 2).join(" ") === "Open Sans" ? (F = "Open Sans", F += O > 750 ? " Extrabold" : O > 650 ? " Bold" : O > 550 ? " Semibold" : O > 350 ? " Regular" : " Light") : T.slice(0, 3).join(" ") === "Klokantech Noto Sans" && (F = "Klokantech Noto Sans", T[3] === "CJK" && (F += " CJK"), F += O > 500 ? " Bold" : " Regular")), z && (F += " Italic"), F === "Open Sans Regular Italic" ? F = "Open Sans Italic" : F === "Open Sans Regular Bold" ? F = "Open Sans Bold" : F === "Open Sans Regular Bold Italic" ? F = "Open Sans Bold Italic" : F === "Klokantech Noto Sans Regular Italic" && (F = "Klokantech Noto Sans Italic"), c(F) || (F = I), F.split(", ");
        }
        o.exports = function(E, P) {
          var I, M = P[0].trace, O = M.visible === !0 && M._length !== 0, T = M.fill !== "none", z = f.hasLines(M), F = f.hasMarkers(M), U = f.hasText(M), V = F && M.marker.symbol === "circle", $ = F && M.marker.symbol !== "circle", q = M.cluster && M.cluster.enabled, K = k("fill"), re = k("line"), Y = k("circle"), te = k("symbol"), ee = { fill: K, line: re, circle: Y, symbol: te };
          if (!O) return ee;
          if ((T || z) && (I = h.calcTraceToLineCoords(P)), T && (K.geojson = h.makePolygon(I), K.layout.visibility = "visible", u.extendFlat(K.paint, { "fill-color": M.fillcolor })), z && (re.geojson = h.makeLine(I), re.layout.visibility = "visible", u.extendFlat(re.paint, { "line-width": M.line.width, "line-color": M.line.color, "line-opacity": M.opacity })), V) {
            var X = function(ce) {
              var he, de, ne, ae, se = ce[0].trace, me = se.marker, ye = se.selectedpoints, pe = u.isArrayOrTypedArray(me.color), be = u.isArrayOrTypedArray(me.size), Ae = u.isArrayOrTypedArray(me.opacity);
              function Se(ge) {
                return se.opacity * ge;
              }
              pe && (de = p.hasColorscale(se, "marker") ? p.makeColorScaleFuncFromTrace(me) : u.identity), be && (ne = d(se)), Ae && (ae = function(ge) {
                return Se(l(ge) ? +u.constrain(ge, 0, 1) : 0);
              });
              var Me, De, Le = [];
              for (he = 0; he < ce.length; he++) {
                var We = ce[he], Ee = We.lonlat;
                if (!C(Ee)) {
                  var Ne = {};
                  de && (Ne.mcc = We.mcc = de(We.mc)), ne && (Ne.mrc = We.mrc = ne(We.ms)), ae && (Ne.mo = ae(We.mo)), ye && (Ne.selected = We.selected || 0), Le.push({ type: "Feature", id: he + 1, geometry: { type: "Point", coordinates: Ee }, properties: Ne });
                }
              }
              if (ye) for (Me = _.makeSelectedPointStyleFns(se), he = 0; he < Le.length; he++) {
                var Ie = Le[he].properties;
                Me.selectedOpacityFn && (Ie.mo = Se(Me.selectedOpacityFn(Ie))), Me.selectedColorFn && (Ie.mcc = Me.selectedColorFn(Ie)), Me.selectedSizeFn && (Ie.mrc = Me.selectedSizeFn(Ie));
              }
              return { geojson: { type: "FeatureCollection", features: Le }, mcc: pe || Me && Me.selectedColorFn ? { type: "identity", property: "mcc" } : me.color, mrc: be || Me && Me.selectedSizeFn ? { type: "identity", property: "mrc" } : (De = me.size, De / 2), mo: Ae || Me && Me.selectedOpacityFn ? { type: "identity", property: "mo" } : Se(me.opacity) };
            }(P);
            Y.geojson = X.geojson, Y.layout.visibility = "visible", q && (Y.filter = ["!", ["has", "point_count"]], ee.cluster = { type: "circle", filter: ["has", "point_count"], layout: { visibility: "visible" }, paint: { "circle-color": D(M.cluster.color, M.cluster.step), "circle-radius": D(M.cluster.size, M.cluster.step), "circle-opacity": D(M.cluster.opacity, M.cluster.step) } }, ee.clusterCount = { type: "symbol", filter: ["has", "point_count"], paint: {}, layout: { "text-field": "{point_count_abbreviated}", "text-font": L(M), "text-size": 12 } }), u.extendFlat(Y.paint, { "circle-color": X.mcc, "circle-radius": X.mrc, "circle-opacity": X.mo });
          }
          if (V && q && (Y.filter = ["!", ["has", "point_count"]]), ($ || U) && (te.geojson = function(ce, he) {
            for (var de = he._fullLayout, ne = ce[0].trace, ae = ne.marker || {}, se = ae.symbol, me = ae.angle, ye = se !== "circle" ? S(se) : A, pe = me !== "auto" ? S(me, !0) : A, be = f.hasText(ne) ? S(ne.text) : A, Ae = [], Se = 0; Se < ce.length; Se++) {
              var Me = ce[Se];
              if (!C(Me.lonlat)) {
                var De, Le = ne.texttemplate;
                if (Le) {
                  var We = Array.isArray(Le) ? Le[Se] || "" : Le, Ee = ne._module.formatLabels(Me, ne, de), Ne = {};
                  m(Ne, ne, Me.i);
                  var Ie = ne._meta || {};
                  De = u.texttemplateString(We, Ee, de._d3locale, Ne, Me, Ie);
                } else De = be(Se);
                De && (De = De.replace(x, "").replace(w, `
`)), Ae.push({ type: "Feature", geometry: { type: "Point", coordinates: Me.lonlat }, properties: { symbol: ye(Se), angle: pe(Se), text: De } });
              }
            }
            return { type: "FeatureCollection", features: Ae };
          }(P, E), u.extendFlat(te.layout, { visibility: "visible", "icon-image": "{symbol}-15", "text-field": "{text}" }), $ && (u.extendFlat(te.layout, { "icon-size": M.marker.size / 10 }), "angle" in M.marker && M.marker.angle !== "auto" && u.extendFlat(te.layout, { "icon-rotate": { type: "identity", property: "angle" }, "icon-rotation-alignment": "map" }), te.layout["icon-allow-overlap"] = M.marker.allowoverlap, u.extendFlat(te.paint, { "icon-opacity": M.opacity * M.marker.opacity, "icon-color": M.marker.color })), U)) {
            var Q = (M.marker || {}).size, ue = g(M.textposition, Q);
            u.extendFlat(te.layout, { "text-size": M.textfont.size, "text-anchor": ue.anchor, "text-offset": ue.offset, "text-font": L(M) }), u.extendFlat(te.paint, { "text-color": M.textfont.color, "text-opacity": M.opacity });
          }
          return ee;
        };
      }, 57387: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(24272), h = n(98168), p = n(663), _ = n(54114), d = n(71388), f = n(13624).isSupportedFont;
        o.exports = function(c, g, m, x) {
          function w(M, O) {
            return l.coerce(c, g, d, M, O);
          }
          function k(M, O) {
            return l.coerce2(c, g, d, M, O);
          }
          var S = function(M, O, T) {
            var z = T("lon") || [], F = T("lat") || [], U = Math.min(z.length, F.length);
            return O._length = U, U;
          }(0, g, w);
          if (S) {
            if (w("text"), w("texttemplate"), w("hovertext"), w("hovertemplate"), w("mode"), w("below"), u.hasMarkers(g)) {
              i(c, g, m, x, w, { noLine: !0, noAngle: !0 }), w("marker.allowoverlap"), w("marker.angle");
              var A = g.marker;
              A.symbol !== "circle" && (l.isArrayOrTypedArray(A.size) && (A.size = A.size[0]), l.isArrayOrTypedArray(A.color) && (A.color = A.color[0]));
            }
            u.hasLines(g) && (h(c, g, m, x, w, { noDash: !0 }), w("connectgaps"));
            var C = k("cluster.maxzoom"), D = k("cluster.step"), L = k("cluster.color", g.marker && g.marker.color || m), E = k("cluster.size"), P = k("cluster.opacity");
            if (w("cluster.enabled", C !== !1 || D !== !1 || L !== !1 || E !== !1 || P !== !1) || u.hasText(g)) {
              var I = x.font.family;
              p(c, g, x, w, { noSelect: !0, noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0, font: { family: f(I) ? I : "Open Sans Regular", weight: x.font.weight, style: x.font.style, size: x.font.size, color: x.font.color } });
            }
            w("fill"), g.fill !== "none" && _(c, g, m, w), l.coerceSelectionMarkerOpacity(g, w);
          } else g.visible = !1;
        };
      }, 58240: function(o) {
        o.exports = function(s, n) {
          return s.lon = n.lon, s.lat = n.lat, s;
        };
      }, 66762: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = h[i.subplot]._subplot.mockAxis, d = u.lonlat;
          return p.lonLabel = l.tickText(_, _.c2l(d[0]), !0).text, p.latLabel = l.tickText(_, _.c2l(d[1]), !0).text, p;
        };
      }, 67275: function(o, s, n) {
        var l = n(32141), u = n(34809), i = n(11539), h = u.fillText, p = n(63821).BADNUM, _ = n(8814).traceLayerPrefix;
        function d(f, c, g) {
          if (!f.hovertemplate) {
            var m = (c.hi || f.hoverinfo).split("+"), x = m.indexOf("all") !== -1, w = m.indexOf("lon") !== -1, k = m.indexOf("lat") !== -1, S = c.lonlat, A = [];
            return x || w && k ? A.push("(" + C(S[1]) + ", " + C(S[0]) + ")") : w ? A.push(g.lon + C(S[0])) : k && A.push(g.lat + C(S[1])), (x || m.indexOf("text") !== -1) && h(c, f, A), A.join("<br>");
          }
          function C(D) {
            return D + "°";
          }
        }
        o.exports = { hoverPoints: function(f, c, g) {
          var m = f.cd, x = m[0].trace, w = f.xa, k = f.ya, S = f.subplot, A = [], C = _ + x.uid + "-circle", D = x.cluster && x.cluster.enabled;
          if (D) {
            var L = S.map.queryRenderedFeatures(null, { layers: [C] });
            A = L.map(function($) {
              return $.id;
            });
          }
          var E = 360 * (c >= 0 ? Math.floor((c + 180) / 360) : Math.ceil((c - 180) / 360)), P = c - E;
          if (l.getClosest(m, function($) {
            var q = $.lonlat;
            if (q[0] === p || D && A.indexOf($.i + 1) === -1) return 1 / 0;
            var K = u.modHalf(q[0], 360), re = q[1], Y = S.project([K, re]), te = Y.x - w.c2p([P, re]), ee = Y.y - k.c2p([K, g]), X = Math.max(3, $.mrc || 0);
            return Math.max(Math.sqrt(te * te + ee * ee) - X, 1 - 3 / X);
          }, f), f.index !== !1) {
            var I = m[f.index], M = I.lonlat, O = [u.modHalf(M[0], 360) + E, M[1]], T = w.c2p(O), z = k.c2p(O), F = I.mrc || 1;
            f.x0 = T - F, f.x1 = T + F, f.y0 = z - F, f.y1 = z + F;
            var U = {};
            U[x.subplot] = { _subplot: S };
            var V = x._module.formatLabels(I, x, U);
            return f.lonLabel = V.lonLabel, f.latLabel = V.latLabel, f.color = i(x, I), f.extraText = d(x, I, m[0].t.labels), f.hovertemplate = x.hovertemplate, [f];
          }
        }, getExtraText: d };
      }, 30929: function(o, s, n) {
        o.exports = { attributes: n(71388), supplyDefaults: n(57387), colorbar: n(21146), formatLabels: n(66762), calc: n(75649), plot: n(26126), hoverPoints: n(67275).hoverPoints, eventData: n(58240), selectPoints: n(21501), styleOnSelect: function(l, u) {
          u && u[0].trace._glTrace.update(u);
        }, moduleType: "trace", name: "scattermap", basePlotModule: n(34091), categories: ["map", "gl", "symbols", "showLegend", "scatter-like"], meta: {} };
      }, 26126: function(o, s, n) {
        var l = n(34809), u = n(76717), i = n(8814).traceLayerPrefix, h = { cluster: ["cluster", "clusterCount", "circle"], nonCluster: ["fill", "line", "circle", "symbol"] };
        function p(d, f, c, g) {
          this.type = "scattermap", this.subplot = d, this.uid = f, this.clusterEnabled = c, this.isHidden = g, this.sourceIds = { fill: "source-" + f + "-fill", line: "source-" + f + "-line", circle: "source-" + f + "-circle", symbol: "source-" + f + "-symbol", cluster: "source-" + f + "-circle", clusterCount: "source-" + f + "-circle" }, this.layerIds = { fill: i + f + "-fill", line: i + f + "-line", circle: i + f + "-circle", symbol: i + f + "-symbol", cluster: i + f + "-cluster", clusterCount: i + f + "-cluster-count" }, this.below = null;
        }
        var _ = p.prototype;
        _.addSource = function(d, f, c) {
          var g = { type: "geojson", data: f.geojson };
          c && c.enabled && l.extendFlat(g, { cluster: !0, clusterMaxZoom: c.maxzoom });
          var m = this.subplot.map.getSource(this.sourceIds[d]);
          m ? m.setData(f.geojson) : this.subplot.map.addSource(this.sourceIds[d], g);
        }, _.setSourceData = function(d, f) {
          this.subplot.map.getSource(this.sourceIds[d]).setData(f.geojson);
        }, _.addLayer = function(d, f, c) {
          var g = { type: f.type, id: this.layerIds[d], source: this.sourceIds[d], layout: f.layout, paint: f.paint };
          f.filter && (g.filter = f.filter);
          for (var m, x = this.layerIds[d], w = this.subplot.getMapLayers(), k = 0; k < w.length; k++) if (w[k].id === x) {
            m = !0;
            break;
          }
          m ? (this.subplot.setOptions(x, "setLayoutProperty", g.layout), g.layout.visibility === "visible" && this.subplot.setOptions(x, "setPaintProperty", g.paint)) : this.subplot.addLayer(g, c);
        }, _.update = function(d) {
          var f = d[0].trace, c = this.subplot, g = c.map, m = u(c.gd, d), x = c.belowLookup["trace-" + this.uid], w = !(!f.cluster || !f.cluster.enabled), k = !!this.clusterEnabled, S = this;
          function A(P) {
            k ? function(I) {
              for (var M = h.cluster, O = M.length - 1; O >= 0; O--) {
                var T = M[O];
                g.removeLayer(S.layerIds[T]);
              }
              I || g.removeSource(S.sourceIds.circle);
            }(P) : function(I) {
              for (var M = h.nonCluster, O = M.length - 1; O >= 0; O--) {
                var T = M[O];
                g.removeLayer(S.layerIds[T]), I || g.removeSource(S.sourceIds[T]);
              }
            }(P);
          }
          function C(P) {
            w ? function(I) {
              I || S.addSource("circle", m.circle, f.cluster);
              for (var M = h.cluster, O = 0; O < M.length; O++) {
                var T = M[O], z = m[T];
                S.addLayer(T, z, x);
              }
            }(P) : function(I) {
              for (var M = h.nonCluster, O = 0; O < M.length; O++) {
                var T = M[O], z = m[T];
                I || S.addSource(T, z), S.addLayer(T, z, x);
              }
            }(P);
          }
          function D() {
            for (var P = w ? h.cluster : h.nonCluster, I = 0; I < P.length; I++) {
              var M = P[I], O = m[M];
              O && (c.setOptions(S.layerIds[M], "setLayoutProperty", O.layout), O.layout.visibility === "visible" && (M !== "cluster" && S.setSourceData(M, O), c.setOptions(S.layerIds[M], "setPaintProperty", O.paint)));
            }
          }
          var L = this.isHidden, E = f.visible !== !0;
          E ? L || A() : L ? E || C() : k !== w ? (A(), C()) : (this.below !== x && (A(!0), C(!0)), D()), this.clusterEnabled = w, this.isHidden = E, this.below = x, d[0].trace._glTrace = this;
        }, _.dispose = function() {
          for (var d = this.subplot.map, f = this.clusterEnabled ? h.cluster : h.nonCluster, c = f.length - 1; c >= 0; c--) {
            var g = f[c];
            d.removeLayer(this.layerIds[g]), d.removeSource(this.sourceIds[g]);
          }
        }, o.exports = function(d, f) {
          var c, g, m, x = f[0].trace, w = x.cluster && x.cluster.enabled, k = x.visible !== !0, S = new p(d, x.uid, w, k), A = u(d.gd, f), C = S.below = d.belowLookup["trace-" + x.uid];
          if (w) for (S.addSource("circle", A.circle, x.cluster), c = 0; c < h.cluster.length; c++) m = A[g = h.cluster[c]], S.addLayer(g, m, C);
          else for (c = 0; c < h.nonCluster.length; c++) m = A[g = h.nonCluster[c]], S.addSource(g, m, x.cluster), S.addLayer(g, m, C);
          return f[0].trace._glTrace = S, S;
        };
      }, 21501: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(63821).BADNUM;
        o.exports = function(h, p) {
          var _, d = h.cd, f = h.xaxis, c = h.yaxis, g = [], m = d[0].trace;
          if (!u.hasMarkers(m)) return [];
          if (p === !1) for (_ = 0; _ < d.length; _++) d[_].selected = 0;
          else for (_ = 0; _ < d.length; _++) {
            var x = d[_], w = x.lonlat;
            if (w[0] !== i) {
              var k = [l.modHalf(w[0], 360), w[1]], S = [f.c2p(k), c.c2p(k)];
              p.contains(S, null, _, h) ? (g.push({ pointNumber: _, lon: w[0], lat: w[1] }), x.selected = 1) : x.selected = 0;
            }
          }
          return g;
        };
      }, 95833: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(19326), h = n(6893), p = n(36640), _ = n(67514), d = n(9829), f = n(87163), c = n(93049).extendFlat, g = n(13582).overrideAll, m = n(67514), x = h.line, w = h.marker;
        o.exports = g({ lon: h.lon, lat: h.lat, cluster: { enabled: { valType: "boolean" }, maxzoom: c({}, m.layers.maxzoom, {}), step: { valType: "number", arrayOk: !0, dflt: -1, min: -1 }, size: { valType: "number", arrayOk: !0, dflt: 20, min: 0 }, color: { valType: "color", arrayOk: !0 }, opacity: c({}, w.opacity, { dflt: 1 }) }, mode: c({}, p.mode, { dflt: "markers" }), text: c({}, p.text, {}), texttemplate: u({ editType: "plot" }, { keys: ["lat", "lon", "text"] }), hovertext: c({}, p.hovertext, {}), line: { color: x.color, width: x.width }, connectgaps: p.connectgaps, marker: c({ symbol: { valType: "string", dflt: "circle", arrayOk: !0 }, angle: { valType: "number", dflt: "auto", arrayOk: !0 }, allowoverlap: { valType: "boolean", dflt: !1 }, opacity: w.opacity, size: w.size, sizeref: w.sizeref, sizemin: w.sizemin, sizemode: w.sizemode }, f("marker")), fill: h.fill, fillcolor: i(), textfont: _.layers.symbol.textfont, textposition: _.layers.symbol.textposition, below: { valType: "string" }, selected: { marker: p.selected.marker }, unselected: { marker: p.unselected.marker }, hoverinfo: c({}, d.hoverinfo, { flags: ["lon", "lat", "text", "name"] }), hovertemplate: l() }, "calc", "nested");
      }, 2795: function(o) {
        var s = ["Metropolis Black Italic", "Metropolis Black", "Metropolis Bold Italic", "Metropolis Bold", "Metropolis Extra Bold Italic", "Metropolis Extra Bold", "Metropolis Extra Light Italic", "Metropolis Extra Light", "Metropolis Light Italic", "Metropolis Light", "Metropolis Medium Italic", "Metropolis Medium", "Metropolis Regular Italic", "Metropolis Regular", "Metropolis Semi Bold Italic", "Metropolis Semi Bold", "Metropolis Thin Italic", "Metropolis Thin", "Open Sans Bold Italic", "Open Sans Bold", "Open Sans Extrabold Italic", "Open Sans Extrabold", "Open Sans Italic", "Open Sans Light Italic", "Open Sans Light", "Open Sans Regular", "Open Sans Semibold Italic", "Open Sans Semibold", "Klokantech Noto Sans Bold", "Klokantech Noto Sans CJK Bold", "Klokantech Noto Sans CJK Regular", "Klokantech Noto Sans Italic", "Klokantech Noto Sans Regular"];
        o.exports = { isSupportedFont: function(n) {
          return s.indexOf(n) !== -1;
        } };
      }, 27009: function(o, s, n) {
        var l = n(10721), u = n(34809), i = n(63821).BADNUM, h = n(39532), p = n(88856), _ = n(62203), d = n(92527), f = n(64726), c = n(2795).isSupportedFont, g = n(2178), m = n(36040).appendArrayPointValue, x = n(30635).NEWLINES, w = n(30635).BR_TAG_ALL;
        function k(E) {
          return { type: E, geojson: h.makeBlank(), layout: { visibility: "none" }, filter: null, paint: {} };
        }
        function S(E, P) {
          return u.isArrayOrTypedArray(E) ? P ? function(I) {
            return l(E[I]) ? +E[I] : 0;
          } : function(I) {
            return E[I];
          } : E ? function() {
            return E;
          } : A;
        }
        function A() {
          return "";
        }
        function C(E) {
          return E[0] === i;
        }
        function D(E, P) {
          var I;
          if (u.isArrayOrTypedArray(E) && u.isArrayOrTypedArray(P)) {
            I = ["step", ["get", "point_count"], E[0]];
            for (var M = 1; M < E.length; M++) I.push(P[M - 1], E[M]);
          } else I = E;
          return I;
        }
        function L(E) {
          var P = E.textfont, I = P.family, M = P.style, O = P.weight, T = I.split(" "), z = T[T.length - 1] === "Italic";
          z && T.pop(), z = z || M === "italic";
          var F = T.join(" ");
          return O === "bold" && T.indexOf("Bold") === -1 ? F += " Bold" : O <= 1e3 && (T[0] === "Metropolis" ? (F = "Metropolis", F += O > 850 ? " Black" : O > 750 ? " Extra Bold" : O > 650 ? " Bold" : O > 550 ? " Semi Bold" : O > 450 ? " Medium" : O > 350 ? " Regular" : O > 250 ? " Light" : O > 150 ? " Extra Light" : " Thin") : T.slice(0, 2).join(" ") === "Open Sans" ? (F = "Open Sans", F += O > 750 ? " Extrabold" : O > 650 ? " Bold" : O > 550 ? " Semibold" : O > 350 ? " Regular" : " Light") : T.slice(0, 3).join(" ") === "Klokantech Noto Sans" && (F = "Klokantech Noto Sans", T[3] === "CJK" && (F += " CJK"), F += O > 500 ? " Bold" : " Regular")), z && (F += " Italic"), F === "Open Sans Regular Italic" ? F = "Open Sans Italic" : F === "Open Sans Regular Bold" ? F = "Open Sans Bold" : F === "Open Sans Regular Bold Italic" ? F = "Open Sans Bold Italic" : F === "Klokantech Noto Sans Regular Italic" && (F = "Klokantech Noto Sans Italic"), c(F) || (F = I), F.split(", ");
        }
        o.exports = function(E, P) {
          var I, M = P[0].trace, O = M.visible === !0 && M._length !== 0, T = M.fill !== "none", z = f.hasLines(M), F = f.hasMarkers(M), U = f.hasText(M), V = F && M.marker.symbol === "circle", $ = F && M.marker.symbol !== "circle", q = M.cluster && M.cluster.enabled, K = k("fill"), re = k("line"), Y = k("circle"), te = k("symbol"), ee = { fill: K, line: re, circle: Y, symbol: te };
          if (!O) return ee;
          if ((T || z) && (I = h.calcTraceToLineCoords(P)), T && (K.geojson = h.makePolygon(I), K.layout.visibility = "visible", u.extendFlat(K.paint, { "fill-color": M.fillcolor })), z && (re.geojson = h.makeLine(I), re.layout.visibility = "visible", u.extendFlat(re.paint, { "line-width": M.line.width, "line-color": M.line.color, "line-opacity": M.opacity })), V) {
            var X = function(ce) {
              var he, de, ne, ae, se = ce[0].trace, me = se.marker, ye = se.selectedpoints, pe = u.isArrayOrTypedArray(me.color), be = u.isArrayOrTypedArray(me.size), Ae = u.isArrayOrTypedArray(me.opacity);
              function Se(ge) {
                return se.opacity * ge;
              }
              pe && (de = p.hasColorscale(se, "marker") ? p.makeColorScaleFuncFromTrace(me) : u.identity), be && (ne = d(se)), Ae && (ae = function(ge) {
                return Se(l(ge) ? +u.constrain(ge, 0, 1) : 0);
              });
              var Me, De, Le = [];
              for (he = 0; he < ce.length; he++) {
                var We = ce[he], Ee = We.lonlat;
                if (!C(Ee)) {
                  var Ne = {};
                  de && (Ne.mcc = We.mcc = de(We.mc)), ne && (Ne.mrc = We.mrc = ne(We.ms)), ae && (Ne.mo = ae(We.mo)), ye && (Ne.selected = We.selected || 0), Le.push({ type: "Feature", id: he + 1, geometry: { type: "Point", coordinates: Ee }, properties: Ne });
                }
              }
              if (ye) for (Me = _.makeSelectedPointStyleFns(se), he = 0; he < Le.length; he++) {
                var Ie = Le[he].properties;
                Me.selectedOpacityFn && (Ie.mo = Se(Me.selectedOpacityFn(Ie))), Me.selectedColorFn && (Ie.mcc = Me.selectedColorFn(Ie)), Me.selectedSizeFn && (Ie.mrc = Me.selectedSizeFn(Ie));
              }
              return { geojson: { type: "FeatureCollection", features: Le }, mcc: pe || Me && Me.selectedColorFn ? { type: "identity", property: "mcc" } : me.color, mrc: be || Me && Me.selectedSizeFn ? { type: "identity", property: "mrc" } : (De = me.size, De / 2), mo: Ae || Me && Me.selectedOpacityFn ? { type: "identity", property: "mo" } : Se(me.opacity) };
            }(P);
            Y.geojson = X.geojson, Y.layout.visibility = "visible", q && (Y.filter = ["!", ["has", "point_count"]], ee.cluster = { type: "circle", filter: ["has", "point_count"], layout: { visibility: "visible" }, paint: { "circle-color": D(M.cluster.color, M.cluster.step), "circle-radius": D(M.cluster.size, M.cluster.step), "circle-opacity": D(M.cluster.opacity, M.cluster.step) } }, ee.clusterCount = { type: "symbol", filter: ["has", "point_count"], paint: {}, layout: { "text-field": "{point_count_abbreviated}", "text-font": L(M), "text-size": 12 } }), u.extendFlat(Y.paint, { "circle-color": X.mcc, "circle-radius": X.mrc, "circle-opacity": X.mo });
          }
          if (V && q && (Y.filter = ["!", ["has", "point_count"]]), ($ || U) && (te.geojson = function(ce, he) {
            for (var de = he._fullLayout, ne = ce[0].trace, ae = ne.marker || {}, se = ae.symbol, me = ae.angle, ye = se !== "circle" ? S(se) : A, pe = me !== "auto" ? S(me, !0) : A, be = f.hasText(ne) ? S(ne.text) : A, Ae = [], Se = 0; Se < ce.length; Se++) {
              var Me = ce[Se];
              if (!C(Me.lonlat)) {
                var De, Le = ne.texttemplate;
                if (Le) {
                  var We = Array.isArray(Le) ? Le[Se] || "" : Le, Ee = ne._module.formatLabels(Me, ne, de), Ne = {};
                  m(Ne, ne, Me.i);
                  var Ie = ne._meta || {};
                  De = u.texttemplateString(We, Ee, de._d3locale, Ne, Me, Ie);
                } else De = be(Se);
                De && (De = De.replace(x, "").replace(w, `
`)), Ae.push({ type: "Feature", geometry: { type: "Point", coordinates: Me.lonlat }, properties: { symbol: ye(Se), angle: pe(Se), text: De } });
              }
            }
            return { type: "FeatureCollection", features: Ae };
          }(P, E), u.extendFlat(te.layout, { visibility: "visible", "icon-image": "{symbol}-15", "text-field": "{text}" }), $ && (u.extendFlat(te.layout, { "icon-size": M.marker.size / 10 }), "angle" in M.marker && M.marker.angle !== "auto" && u.extendFlat(te.layout, { "icon-rotate": { type: "identity", property: "angle" }, "icon-rotation-alignment": "map" }), te.layout["icon-allow-overlap"] = M.marker.allowoverlap, u.extendFlat(te.paint, { "icon-opacity": M.opacity * M.marker.opacity, "icon-color": M.marker.color })), U)) {
            var Q = (M.marker || {}).size, ue = g(M.textposition, Q);
            u.extendFlat(te.layout, { "text-size": M.textfont.size, "text-anchor": ue.anchor, "text-offset": ue.offset, "text-font": L(M) }), u.extendFlat(te.paint, { "text-color": M.textfont.color, "text-opacity": M.opacity });
          }
          return ee;
        };
      }, 38302: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(24272), h = n(98168), p = n(663), _ = n(54114), d = n(95833), f = n(2795).isSupportedFont;
        o.exports = function(c, g, m, x) {
          function w(M, O) {
            return l.coerce(c, g, d, M, O);
          }
          function k(M, O) {
            return l.coerce2(c, g, d, M, O);
          }
          var S = function(M, O, T) {
            var z = T("lon") || [], F = T("lat") || [], U = Math.min(z.length, F.length);
            return O._length = U, U;
          }(0, g, w);
          if (S) {
            if (w("text"), w("texttemplate"), w("hovertext"), w("hovertemplate"), w("mode"), w("below"), u.hasMarkers(g)) {
              i(c, g, m, x, w, { noLine: !0, noAngle: !0 }), w("marker.allowoverlap"), w("marker.angle");
              var A = g.marker;
              A.symbol !== "circle" && (l.isArrayOrTypedArray(A.size) && (A.size = A.size[0]), l.isArrayOrTypedArray(A.color) && (A.color = A.color[0]));
            }
            u.hasLines(g) && (h(c, g, m, x, w, { noDash: !0 }), w("connectgaps"));
            var C = k("cluster.maxzoom"), D = k("cluster.step"), L = k("cluster.color", g.marker && g.marker.color || m), E = k("cluster.size"), P = k("cluster.opacity");
            if (w("cluster.enabled", C !== !1 || D !== !1 || L !== !1 || E !== !1 || P !== !1) || u.hasText(g)) {
              var I = x.font.family;
              p(c, g, x, w, { noSelect: !0, noFontVariant: !0, noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0, font: { family: f(I) ? I : "Open Sans Regular", weight: x.font.weight, style: x.font.style, size: x.font.size, color: x.font.color } });
            }
            w("fill"), g.fill !== "none" && _(c, g, m, w), l.coerceSelectionMarkerOpacity(g, w);
          } else g.visible = !1;
        };
      }, 68197: function(o) {
        o.exports = function(s, n) {
          return s.lon = n.lon, s.lat = n.lat, s;
        };
      }, 69009: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = h[i.subplot]._subplot.mockAxis, d = u.lonlat;
          return p.lonLabel = l.tickText(_, _.c2l(d[0]), !0).text, p.latLabel = l.tickText(_, _.c2l(d[1]), !0).text, p;
        };
      }, 18016: function(o, s, n) {
        var l = n(32141), u = n(34809), i = n(11539), h = u.fillText, p = n(63821).BADNUM, _ = n(44245).traceLayerPrefix;
        function d(f, c, g) {
          if (!f.hovertemplate) {
            var m = (c.hi || f.hoverinfo).split("+"), x = m.indexOf("all") !== -1, w = m.indexOf("lon") !== -1, k = m.indexOf("lat") !== -1, S = c.lonlat, A = [];
            return x || w && k ? A.push("(" + C(S[1]) + ", " + C(S[0]) + ")") : w ? A.push(g.lon + C(S[0])) : k && A.push(g.lat + C(S[1])), (x || m.indexOf("text") !== -1) && h(c, f, A), A.join("<br>");
          }
          function C(D) {
            return D + "°";
          }
        }
        o.exports = { hoverPoints: function(f, c, g) {
          var m = f.cd, x = m[0].trace, w = f.xa, k = f.ya, S = f.subplot, A = [], C = _ + x.uid + "-circle", D = x.cluster && x.cluster.enabled;
          if (D) {
            var L = S.map.queryRenderedFeatures(null, { layers: [C] });
            A = L.map(function($) {
              return $.id;
            });
          }
          var E = 360 * (c >= 0 ? Math.floor((c + 180) / 360) : Math.ceil((c - 180) / 360)), P = c - E;
          if (l.getClosest(m, function($) {
            var q = $.lonlat;
            if (q[0] === p || D && A.indexOf($.i + 1) === -1) return 1 / 0;
            var K = u.modHalf(q[0], 360), re = q[1], Y = S.project([K, re]), te = Y.x - w.c2p([P, re]), ee = Y.y - k.c2p([K, g]), X = Math.max(3, $.mrc || 0);
            return Math.max(Math.sqrt(te * te + ee * ee) - X, 1 - 3 / X);
          }, f), f.index !== !1) {
            var I = m[f.index], M = I.lonlat, O = [u.modHalf(M[0], 360) + E, M[1]], T = w.c2p(O), z = k.c2p(O), F = I.mrc || 1;
            f.x0 = T - F, f.x1 = T + F, f.y0 = z - F, f.y1 = z + F;
            var U = {};
            U[x.subplot] = { _subplot: S };
            var V = x._module.formatLabels(I, x, U);
            return f.lonLabel = V.lonLabel, f.latLabel = V.latLabel, f.color = i(x, I), f.extraText = d(x, I, m[0].t.labels), f.hovertemplate = x.hovertemplate, [f];
          }
        }, getExtraText: d };
      }, 83866: function(o, s, n) {
        o.exports = { attributes: n(95833), supplyDefaults: n(38302), colorbar: n(21146), formatLabels: n(69009), calc: n(75649), plot: n(20691), hoverPoints: n(18016).hoverPoints, eventData: n(68197), selectPoints: n(60784), styleOnSelect: function(l, u) {
          u && u[0].trace._glTrace.update(u);
        }, moduleType: "trace", name: "scattermapbox", basePlotModule: n(68192), categories: ["mapbox", "gl", "symbols", "showLegend", "scatter-like"], meta: {} };
      }, 20691: function(o, s, n) {
        var l = n(34809), u = n(27009), i = n(44245).traceLayerPrefix, h = { cluster: ["cluster", "clusterCount", "circle"], nonCluster: ["fill", "line", "circle", "symbol"] };
        function p(d, f, c, g) {
          this.type = "scattermapbox", this.subplot = d, this.uid = f, this.clusterEnabled = c, this.isHidden = g, this.sourceIds = { fill: "source-" + f + "-fill", line: "source-" + f + "-line", circle: "source-" + f + "-circle", symbol: "source-" + f + "-symbol", cluster: "source-" + f + "-circle", clusterCount: "source-" + f + "-circle" }, this.layerIds = { fill: i + f + "-fill", line: i + f + "-line", circle: i + f + "-circle", symbol: i + f + "-symbol", cluster: i + f + "-cluster", clusterCount: i + f + "-cluster-count" }, this.below = null;
        }
        var _ = p.prototype;
        _.addSource = function(d, f, c) {
          var g = { type: "geojson", data: f.geojson };
          c && c.enabled && l.extendFlat(g, { cluster: !0, clusterMaxZoom: c.maxzoom });
          var m = this.subplot.map.getSource(this.sourceIds[d]);
          m ? m.setData(f.geojson) : this.subplot.map.addSource(this.sourceIds[d], g);
        }, _.setSourceData = function(d, f) {
          this.subplot.map.getSource(this.sourceIds[d]).setData(f.geojson);
        }, _.addLayer = function(d, f, c) {
          var g = { type: f.type, id: this.layerIds[d], source: this.sourceIds[d], layout: f.layout, paint: f.paint };
          f.filter && (g.filter = f.filter);
          for (var m, x = this.layerIds[d], w = this.subplot.getMapLayers(), k = 0; k < w.length; k++) if (w[k].id === x) {
            m = !0;
            break;
          }
          m ? (this.subplot.setOptions(x, "setLayoutProperty", g.layout), g.layout.visibility === "visible" && this.subplot.setOptions(x, "setPaintProperty", g.paint)) : this.subplot.addLayer(g, c);
        }, _.update = function(d) {
          var f = d[0].trace, c = this.subplot, g = c.map, m = u(c.gd, d), x = c.belowLookup["trace-" + this.uid], w = !(!f.cluster || !f.cluster.enabled), k = !!this.clusterEnabled, S = this;
          function A(P) {
            k ? function(I) {
              for (var M = h.cluster, O = M.length - 1; O >= 0; O--) {
                var T = M[O];
                g.removeLayer(S.layerIds[T]);
              }
              I || g.removeSource(S.sourceIds.circle);
            }(P) : function(I) {
              for (var M = h.nonCluster, O = M.length - 1; O >= 0; O--) {
                var T = M[O];
                g.removeLayer(S.layerIds[T]), I || g.removeSource(S.sourceIds[T]);
              }
            }(P);
          }
          function C(P) {
            w ? function(I) {
              I || S.addSource("circle", m.circle, f.cluster);
              for (var M = h.cluster, O = 0; O < M.length; O++) {
                var T = M[O], z = m[T];
                S.addLayer(T, z, x);
              }
            }(P) : function(I) {
              for (var M = h.nonCluster, O = 0; O < M.length; O++) {
                var T = M[O], z = m[T];
                I || S.addSource(T, z), S.addLayer(T, z, x);
              }
            }(P);
          }
          function D() {
            for (var P = w ? h.cluster : h.nonCluster, I = 0; I < P.length; I++) {
              var M = P[I], O = m[M];
              O && (c.setOptions(S.layerIds[M], "setLayoutProperty", O.layout), O.layout.visibility === "visible" && (M !== "cluster" && S.setSourceData(M, O), c.setOptions(S.layerIds[M], "setPaintProperty", O.paint)));
            }
          }
          var L = this.isHidden, E = f.visible !== !0;
          E ? L || A() : L ? E || C() : k !== w ? (A(), C()) : (this.below !== x && (A(!0), C(!0)), D()), this.clusterEnabled = w, this.isHidden = E, this.below = x, d[0].trace._glTrace = this;
        }, _.dispose = function() {
          for (var d = this.subplot.map, f = this.clusterEnabled ? h.cluster : h.nonCluster, c = f.length - 1; c >= 0; c--) {
            var g = f[c];
            d.removeLayer(this.layerIds[g]), d.removeSource(this.sourceIds[g]);
          }
        }, o.exports = function(d, f) {
          var c, g, m, x = f[0].trace, w = x.cluster && x.cluster.enabled, k = x.visible !== !0, S = new p(d, x.uid, w, k), A = u(d.gd, f), C = S.below = d.belowLookup["trace-" + x.uid];
          if (w) for (S.addSource("circle", A.circle, x.cluster), c = 0; c < h.cluster.length; c++) m = A[g = h.cluster[c]], S.addLayer(g, m, C);
          else for (c = 0; c < h.nonCluster.length; c++) m = A[g = h.nonCluster[c]], S.addSource(g, m, x.cluster), S.addLayer(g, m, C);
          return f[0].trace._glTrace = S, S;
        };
      }, 60784: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(63821).BADNUM;
        o.exports = function(h, p) {
          var _, d = h.cd, f = h.xaxis, c = h.yaxis, g = [], m = d[0].trace;
          if (!u.hasMarkers(m)) return [];
          if (p === !1) for (_ = 0; _ < d.length; _++) d[_].selected = 0;
          else for (_ = 0; _ < d.length; _++) {
            var x = d[_], w = x.lonlat;
            if (w[0] !== i) {
              var k = [l.modHalf(w[0], 360), w[1]], S = [f.c2p(k), c.c2p(k)];
              p.contains(S, null, _, h) ? (g.push({ pointNumber: _, lon: w[0], lat: w[1] }), x.selected = 1) : x.selected = 0;
            }
          }
          return g;
        };
      }, 8738: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(93049).extendFlat, h = n(19326), p = n(36640), _ = n(9829), d = p.line;
        o.exports = { mode: p.mode, r: { valType: "data_array", editType: "calc+clearAxisTypes" }, theta: { valType: "data_array", editType: "calc+clearAxisTypes" }, r0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dr: { valType: "number", dflt: 1, editType: "calc" }, theta0: { valType: "any", dflt: 0, editType: "calc+clearAxisTypes" }, dtheta: { valType: "number", editType: "calc" }, thetaunit: { valType: "enumerated", values: ["radians", "degrees", "gradians"], dflt: "degrees", editType: "calc+clearAxisTypes" }, text: p.text, texttemplate: u({ editType: "plot" }, { keys: ["r", "theta", "text"] }), hovertext: p.hovertext, line: { color: d.color, width: d.width, dash: d.dash, backoff: d.backoff, shape: i({}, d.shape, { values: ["linear", "spline"] }), smoothing: d.smoothing, editType: "calc" }, connectgaps: p.connectgaps, marker: p.marker, cliponaxis: i({}, p.cliponaxis, { dflt: !1 }), textposition: p.textposition, textfont: p.textfont, fill: i({}, p.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: h(), hoverinfo: i({}, _.hoverinfo, { flags: ["r", "theta", "text", "name"] }), hoveron: p.hoveron, hovertemplate: l(), selected: p.selected, unselected: p.unselected };
      }, 13246: function(o, s, n) {
        var l = n(10721), u = n(63821).BADNUM, i = n(29714), h = n(77272), p = n(99203), _ = n(48861), d = n(26544).calcMarkerSize;
        o.exports = function(f, c) {
          for (var g = f._fullLayout, m = c.subplot, x = g[m].radialaxis, w = g[m].angularaxis, k = x.makeCalcdata(c, "r"), S = w.makeCalcdata(c, "theta"), A = c._length, C = new Array(A), D = 0; D < A; D++) {
            var L = k[D], E = S[D], P = C[D] = {};
            l(L) && l(E) ? (P.r = L, P.theta = E) : P.r = u;
          }
          var I = d(c, A);
          return c._extremes.x = i.findExtremes(x, k, { ppad: I }), h(f, c), p(C, c), _(C, c), C;
        };
      }, 73749: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(24272), h = n(98168), p = n(91602), _ = n(663), d = n(54114), f = n(32660).PTS_LINESONLY, c = n(8738);
        function g(m, x, w, k) {
          var S, A = k("r"), C = k("theta");
          if (l.isTypedArray(A) && (x.r = A = Array.from(A)), l.isTypedArray(C) && (x.theta = C = Array.from(C)), A) C ? S = Math.min(A.length, C.length) : (S = A.length, k("theta0"), k("dtheta"));
          else {
            if (!C) return 0;
            S = x.theta.length, k("r0"), k("dr");
          }
          return x._length = S, S;
        }
        o.exports = { handleRThetaDefaults: g, supplyDefaults: function(m, x, w, k) {
          function S(D, L) {
            return l.coerce(m, x, c, D, L);
          }
          var A = g(0, x, 0, S);
          if (A) {
            S("thetaunit"), S("mode", A < f ? "lines+markers" : "lines"), S("text"), S("hovertext"), x.hoveron !== "fills" && S("hovertemplate"), u.hasMarkers(x) && i(m, x, w, k, S, { gradient: !0 }), u.hasLines(x) && (h(m, x, w, k, S, { backoff: !0 }), p(m, x, S), S("connectgaps")), u.hasText(x) && (S("texttemplate"), _(m, x, k, S));
            var C = [];
            (u.hasMarkers(x) || u.hasText(x)) && (S("cliponaxis"), S("marker.maxdisplayed"), C.push("points")), S("fill"), x.fill !== "none" && (d(m, x, w, S), u.hasLines(x) || p(m, x, S)), x.fill !== "tonext" && x.fill !== "toself" || C.push("fills"), S("hoveron", C.join("+") || "points"), l.coerceSelectionMarkerOpacity(x, S);
          } else x.visible = !1;
        } };
      }, 33368: function(o, s, n) {
        var l = n(34809), u = n(29714);
        o.exports = function(i, h, p) {
          var _, d, f = {}, c = p[h.subplot]._subplot;
          c ? (_ = c.radialAxis, d = c.angularAxis) : (_ = (c = p[h.subplot]).radialaxis, d = c.angularaxis);
          var g = _.c2l(i.r);
          f.rLabel = u.tickText(_, g, !0).text;
          var m = d.thetaunit === "degrees" ? l.rad2deg(i.theta) : i.theta;
          return f.thetaLabel = u.tickText(d, m, !0).text, f;
        };
      }, 29709: function(o, s, n) {
        var l = n(37255);
        function u(i, h, p, _) {
          var d = p.radialAxis, f = p.angularAxis;
          d._hovertitle = "r", f._hovertitle = "θ";
          var c = {};
          c[h.subplot] = { _subplot: p };
          var g = h._module.formatLabels(i, h, c);
          _.rLabel = g.rLabel, _.thetaLabel = g.thetaLabel;
          var m = i.hi || h.hoverinfo, x = [];
          function w(S, A) {
            x.push(S._hovertitle + ": " + A);
          }
          if (!h.hovertemplate) {
            var k = m.split("+");
            k.indexOf("all") !== -1 && (k = ["r", "theta", "text"]), k.indexOf("r") !== -1 && w(d, _.rLabel), k.indexOf("theta") !== -1 && w(f, _.thetaLabel), k.indexOf("text") !== -1 && _.text && (x.push(_.text), delete _.text), _.extraText = x.join("<br>");
          }
        }
        o.exports = { hoverPoints: function(i, h, p, _) {
          var d = l(i, h, p, _);
          if (d && d[0].index !== !1) {
            var f = d[0];
            if (f.index === void 0) return d;
            var c = i.subplot, g = f.cd[f.index], m = f.trace;
            if (c.isPtInside(g)) return f.xLabelVal = void 0, f.yLabelVal = void 0, u(g, m, c, f), f.hovertemplate = m.hovertemplate, d;
          }
        }, makeHoverPointText: u };
      }, 66939: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "scatterpolar", basePlotModule: n(31645), categories: ["polar", "symbols", "showLegend", "scatter-like"], attributes: n(8738), supplyDefaults: n(73749).supplyDefaults, colorbar: n(21146), formatLabels: n(33368), calc: n(13246), plot: n(43836), style: n(9408).style, styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(29709).hoverPoints, selectPoints: n(32665), meta: {} };
      }, 43836: function(o, s, n) {
        var l = n(36098), u = n(63821).BADNUM;
        o.exports = function(i, h, p) {
          for (var _ = h.layers.frontplot.select("g.scatterlayer"), d = h.xaxis, f = h.yaxis, c = { xaxis: d, yaxis: f, plot: h.framework, layerClipId: h._hasClipOnAxisFalse ? h.clipIds.forTraces : null }, g = h.radialAxis, m = h.angularAxis, x = 0; x < p.length; x++) for (var w = p[x], k = 0; k < w.length; k++) {
            k === 0 && (w[0].trace._xA = d, w[0].trace._yA = f);
            var S = w[k], A = S.r;
            if (A === u) S.x = S.y = u;
            else {
              var C = g.c2g(A), D = m.c2g(S.theta);
              S.x = C * Math.cos(D), S.y = C * Math.sin(D);
            }
          }
          l(i, c, p, _);
        };
      }, 58319: function(o, s, n) {
        var l = n(8738), u = n(92089), i = n(3208).ay;
        o.exports = { mode: l.mode, r: l.r, theta: l.theta, r0: l.r0, dr: l.dr, theta0: l.theta0, dtheta: l.dtheta, thetaunit: l.thetaunit, text: l.text, texttemplate: i({ editType: "plot" }, { keys: ["r", "theta", "text"] }), hovertext: l.hovertext, hovertemplate: l.hovertemplate, line: { color: u.line.color, width: u.line.width, dash: u.line.dash, editType: "calc" }, connectgaps: u.connectgaps, marker: u.marker, fill: u.fill, fillcolor: u.fillcolor, textposition: u.textposition, textfont: u.textfont, hoverinfo: l.hoverinfo, selected: l.selected, unselected: l.unselected };
      }, 25796: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "scatterpolargl", basePlotModule: n(31645), categories: ["gl", "regl", "polar", "symbols", "showLegend", "scatter-like"], attributes: n(58319), supplyDefaults: n(14952), colorbar: n(21146), formatLabels: n(94015), calc: n(71535), hoverPoints: n(47522).hoverPoints, selectPoints: n(17168), meta: {} };
      }, 71535: function(o, s, n) {
        var l = n(77272), u = n(26544).calcMarkerSize, i = n(19937), h = n(29714), p = n(29483).TOO_MANY_POINTS;
        o.exports = function(_, d) {
          var f = _._fullLayout, c = d.subplot, g = f[c].radialaxis, m = f[c].angularaxis, x = d._r = g.makeCalcdata(d, "r"), w = d._theta = m.makeCalcdata(d, "theta"), k = d._length, S = {};
          k < x.length && (x = x.slice(0, k)), k < w.length && (w = w.slice(0, k)), S.r = x, S.theta = w, l(_, d);
          var A, C = S.opts = i.style(_, d);
          return k < p ? A = u(d, k) : C.marker && (A = 2 * (C.marker.sizeAvg || Math.max(C.marker.size, 3))), d._extremes.x = h.findExtremes(g, x, { ppad: A }), [{ x: !1, y: !1, t: S, trace: d }];
        };
      }, 14952: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(73749).handleRThetaDefaults, h = n(24272), p = n(98168), _ = n(663), d = n(54114), f = n(32660).PTS_LINESONLY, c = n(58319);
        o.exports = function(g, m, x, w) {
          function k(A, C) {
            return l.coerce(g, m, c, A, C);
          }
          var S = i(g, m, w, k);
          S ? (k("thetaunit"), k("mode", S < f ? "lines+markers" : "lines"), k("text"), k("hovertext"), m.hoveron !== "fills" && k("hovertemplate"), u.hasMarkers(m) && h(g, m, x, w, k, { noAngleRef: !0, noStandOff: !0 }), u.hasLines(m) && (p(g, m, x, w, k), k("connectgaps")), u.hasText(m) && (k("texttemplate"), _(g, m, w, k, { noFontShadow: !0, noFontLineposition: !0, noFontTextcase: !0 })), k("fill"), m.fill !== "none" && d(g, m, x, k), l.coerceSelectionMarkerOpacity(m, k)) : m.visible = !1;
        };
      }, 94015: function(o, s, n) {
        var l = n(33368);
        o.exports = function(u, i, h) {
          var p = u.i;
          return "r" in u || (u.r = i._r[p]), "theta" in u || (u.theta = i._theta[p]), l(u, i, h);
        };
      }, 47522: function(o, s, n) {
        var l = n(36544), u = n(29709).makeHoverPointText;
        o.exports = { hoverPoints: function(i, h, p, _) {
          var d = i.cd[0].t, f = d.r, c = d.theta, g = l.hoverPoints(i, h, p, _);
          if (g && g[0].index !== !1) {
            var m = g[0];
            if (m.index === void 0) return g;
            var x = i.subplot, w = m.cd[m.index], k = m.trace;
            if (w.r = f[m.index], w.theta = c[m.index], x.isPtInside(w)) return m.xLabelVal = void 0, m.yLabelVal = void 0, u(w, k, x, m), g;
          }
        } };
      }, 23748: function(o, s, n) {
        var l = n(25796);
        l.plot = n(54121), o.exports = l;
      }, 54121: function(o, s, n) {
        var l = n(27549), u = n(10721), i = n(47731), h = n(62336), p = n(19937), _ = n(34809), d = n(29483).TOO_MANY_POINTS;
        o.exports = function(f, c, g) {
          if (g.length) {
            var m = c.radialAxis, x = c.angularAxis, w = h(f, c);
            return g.forEach(function(k) {
              if (k && k[0] && k[0].trace) {
                var S, A = k[0], C = A.trace, D = A.t, L = C._length, E = D.r, P = D.theta, I = D.opts, M = E.slice(), O = P.slice();
                for (S = 0; S < E.length; S++) c.isPtInside({ r: E[S], theta: P[S] }) || (M[S] = NaN, O[S] = NaN);
                var T = new Array(2 * L), z = Array(L), F = Array(L);
                for (S = 0; S < L; S++) {
                  var U, V, $ = M[S];
                  if (u($)) {
                    var q = m.c2g($), K = x.c2g(O[S], C.thetaunit);
                    U = q * Math.cos(K), V = q * Math.sin(K);
                  } else U = V = NaN;
                  z[S] = T[2 * S] = U, F[S] = T[2 * S + 1] = V;
                }
                D.tree = l(T), I.marker && L >= d && (I.marker.cluster = D.tree), I.marker && (I.markerSel.positions = I.markerUnsel.positions = I.marker.positions = T), I.line && T.length > 1 && _.extendFlat(I.line, p.linePositions(f, C, T)), I.text && (_.extendFlat(I.text, { positions: T }, p.textPosition(f, C, I.text, I.marker)), _.extendFlat(I.textSel, { positions: T }, p.textPosition(f, C, I.text, I.markerSel)), _.extendFlat(I.textUnsel, { positions: T }, p.textPosition(f, C, I.text, I.markerUnsel))), I.fill && !w.fill2d && (w.fill2d = !0), I.marker && !w.scatter2d && (w.scatter2d = !0), I.line && !w.line2d && (w.line2d = !0), I.text && !w.glText && (w.glText = !0), w.lineOptions.push(I.line), w.fillOptions.push(I.fill), w.markerOptions.push(I.marker), w.markerSelectedOptions.push(I.markerSel), w.markerUnselectedOptions.push(I.markerUnsel), w.textOptions.push(I.text), w.textSelectedOptions.push(I.textSel), w.textUnselectedOptions.push(I.textUnsel), w.selectBatch.push([]), w.unselectBatch.push([]), D.x = z, D.y = F, D.rawx = z, D.rawy = F, D.r = E, D.theta = P, D.positions = T, D._scene = w, D.index = w.count, w.count++;
              }
            }), i(f, c, g);
          }
        }, o.exports.reglPrecompiled = {};
      }, 69595: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(93049).extendFlat, h = n(19326), p = n(36640), _ = n(9829), d = p.line;
        o.exports = { mode: p.mode, real: { valType: "data_array", editType: "calc+clearAxisTypes" }, imag: { valType: "data_array", editType: "calc+clearAxisTypes" }, text: p.text, texttemplate: u({ editType: "plot" }, { keys: ["real", "imag", "text"] }), hovertext: p.hovertext, line: { color: d.color, width: d.width, dash: d.dash, backoff: d.backoff, shape: i({}, d.shape, { values: ["linear", "spline"] }), smoothing: d.smoothing, editType: "calc" }, connectgaps: p.connectgaps, marker: p.marker, cliponaxis: i({}, p.cliponaxis, { dflt: !1 }), textposition: p.textposition, textfont: p.textfont, fill: i({}, p.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: h(), hoverinfo: i({}, _.hoverinfo, { flags: ["real", "imag", "text", "name"] }), hoveron: p.hoveron, hovertemplate: l(), selected: p.selected, unselected: p.unselected };
      }, 44315: function(o, s, n) {
        var l = n(10721), u = n(63821).BADNUM, i = n(77272), h = n(99203), p = n(48861), _ = n(26544).calcMarkerSize;
        o.exports = function(d, f) {
          for (var c = d._fullLayout, g = f.subplot, m = c[g].realaxis, x = c[g].imaginaryaxis, w = m.makeCalcdata(f, "real"), k = x.makeCalcdata(f, "imag"), S = f._length, A = new Array(S), C = 0; C < S; C++) {
            var D = w[C], L = k[C], E = A[C] = {};
            l(D) && l(L) ? (E.real = D, E.imag = L) : E.real = u;
          }
          return _(f, S), i(d, f), h(A, f), p(A, f), A;
        };
      }, 93788: function(o, s, n) {
        var l = n(34809), u = n(64726), i = n(24272), h = n(98168), p = n(91602), _ = n(663), d = n(54114), f = n(32660).PTS_LINESONLY, c = n(69595);
        o.exports = function(g, m, x, w) {
          function k(C, D) {
            return l.coerce(g, m, c, C, D);
          }
          var S = function(C, D, L, E) {
            var P, I = E("real"), M = E("imag");
            return I && M && (P = Math.min(I.length, M.length)), l.isTypedArray(I) && (D.real = I = Array.from(I)), l.isTypedArray(M) && (D.imag = M = Array.from(M)), D._length = P, P;
          }(0, m, 0, k);
          if (S) {
            k("mode", S < f ? "lines+markers" : "lines"), k("text"), k("hovertext"), m.hoveron !== "fills" && k("hovertemplate"), u.hasMarkers(m) && i(g, m, x, w, k, { gradient: !0 }), u.hasLines(m) && (h(g, m, x, w, k, { backoff: !0 }), p(g, m, k), k("connectgaps")), u.hasText(m) && (k("texttemplate"), _(g, m, w, k));
            var A = [];
            (u.hasMarkers(m) || u.hasText(m)) && (k("cliponaxis"), k("marker.maxdisplayed"), A.push("points")), k("fill"), m.fill !== "none" && (d(g, m, x, k), u.hasLines(m) || p(g, m, k)), m.fill !== "tonext" && m.fill !== "toself" || A.push("fills"), k("hoveron", A.join("+") || "points"), l.coerceSelectionMarkerOpacity(m, k);
          } else m.visible = !1;
        };
      }, 89419: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = h[i.subplot]._subplot;
          return p.realLabel = l.tickText(_.radialAxis, u.real, !0).text, p.imagLabel = l.tickText(_.angularAxis, u.imag, !0).text, p;
        };
      }, 64422: function(o, s, n) {
        var l = n(37255);
        function u(i, h, p, _) {
          var d = p.radialAxis, f = p.angularAxis;
          d._hovertitle = "real", f._hovertitle = "imag";
          var c = {};
          c[h.subplot] = { _subplot: p };
          var g = h._module.formatLabels(i, h, c);
          _.realLabel = g.realLabel, _.imagLabel = g.imagLabel;
          var m = i.hi || h.hoverinfo, x = [];
          function w(S, A) {
            x.push(S._hovertitle + ": " + A);
          }
          if (!h.hovertemplate) {
            var k = m.split("+");
            k.indexOf("all") !== -1 && (k = ["real", "imag", "text"]), k.indexOf("real") !== -1 && w(d, _.realLabel), k.indexOf("imag") !== -1 && w(f, _.imagLabel), k.indexOf("text") !== -1 && _.text && (x.push(_.text), delete _.text), _.extraText = x.join("<br>");
          }
        }
        o.exports = { hoverPoints: function(i, h, p, _) {
          var d = l(i, h, p, _);
          if (d && d[0].index !== !1) {
            var f = d[0];
            if (f.index === void 0) return d;
            var c = i.subplot, g = f.cd[f.index], m = f.trace;
            if (c.isPtInside(g)) return f.xLabelVal = void 0, f.yLabelVal = void 0, u(g, m, c, f), f.hovertemplate = m.hovertemplate, d;
          }
        }, makeHoverPointText: u };
      }, 73304: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "scattersmith", basePlotModule: n(50358), categories: ["smith", "symbols", "showLegend", "scatter-like"], attributes: n(69595), supplyDefaults: n(93788), colorbar: n(21146), formatLabels: n(89419), calc: n(44315), plot: n(6229), style: n(9408).style, styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(64422).hoverPoints, selectPoints: n(32665), meta: {} };
      }, 6229: function(o, s, n) {
        var l = n(36098), u = n(63821).BADNUM, i = n(52007).smith;
        o.exports = function(h, p, _) {
          for (var d = p.layers.frontplot.select("g.scatterlayer"), f = p.xaxis, c = p.yaxis, g = { xaxis: f, yaxis: c, plot: p.framework, layerClipId: p._hasClipOnAxisFalse ? p.clipIds.forTraces : null }, m = 0; m < _.length; m++) for (var x = _[m], w = 0; w < x.length; w++) {
            w === 0 && (x[0].trace._xA = f, x[0].trace._yA = c);
            var k = x[w], S = k.real;
            if (S === u) k.x = k.y = u;
            else {
              var A = i([S, k.imag]);
              k.x = A[0], k.y = A[1];
            }
          }
          l(h, g, _, d);
        };
      }, 18483: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(19326), h = n(36640), p = n(9829), _ = n(87163), d = n(94850).T, f = n(93049).extendFlat, c = h.marker, g = h.line, m = c.line;
        o.exports = { a: { valType: "data_array", editType: "calc" }, b: { valType: "data_array", editType: "calc" }, c: { valType: "data_array", editType: "calc" }, sum: { valType: "number", dflt: 0, min: 0, editType: "calc" }, mode: f({}, h.mode, { dflt: "markers" }), text: f({}, h.text, {}), texttemplate: u({ editType: "plot" }, { keys: ["a", "b", "c", "text"] }), hovertext: f({}, h.hovertext, {}), line: { color: g.color, width: g.width, dash: d, backoff: g.backoff, shape: f({}, g.shape, { values: ["linear", "spline"] }), smoothing: g.smoothing, editType: "calc" }, connectgaps: h.connectgaps, cliponaxis: h.cliponaxis, fill: f({}, h.fill, { values: ["none", "toself", "tonext"], dflt: "none" }), fillcolor: i(), marker: f({ symbol: c.symbol, opacity: c.opacity, angle: c.angle, angleref: c.angleref, standoff: c.standoff, maxdisplayed: c.maxdisplayed, size: c.size, sizeref: c.sizeref, sizemin: c.sizemin, sizemode: c.sizemode, line: f({ width: m.width, editType: "calc" }, _("marker.line")), gradient: c.gradient, editType: "calc" }, _("marker")), textfont: h.textfont, textposition: h.textposition, selected: h.selected, unselected: h.unselected, hoverinfo: f({}, p.hoverinfo, { flags: ["a", "b", "c", "text", "name"] }), hoveron: h.hoveron, hovertemplate: l() };
      }, 67091: function(o, s, n) {
        var l = n(10721), u = n(77272), i = n(99203), h = n(48861), p = n(26544).calcMarkerSize, _ = ["a", "b", "c"], d = { a: ["b", "c"], b: ["a", "c"], c: ["a", "b"] };
        o.exports = function(f, c) {
          var g, m, x, w, k, S, A = f._fullLayout[c.subplot].sum, C = c.sum || A, D = { a: c.a, b: c.b, c: c.c };
          for (g = 0; g < _.length; g++) if (!D[x = _[g]]) {
            for (k = D[d[x][0]], S = D[d[x][1]], w = new Array(k.length), m = 0; m < k.length; m++) w[m] = C - k[m] - S[m];
            D[x] = w;
          }
          var L, E, P, I, M, O, T = c._length, z = new Array(T);
          for (g = 0; g < T; g++) L = D.a[g], E = D.b[g], P = D.c[g], l(L) && l(E) && l(P) ? ((I = A / ((L = +L) + (E = +E) + (P = +P))) != 1 && (L *= I, E *= I, P *= I), O = L, M = P - E, z[g] = { x: M, y: O, a: L, b: E, c: P }) : z[g] = { x: !1, y: !1 };
          return p(c, T), u(f, c), i(z, c), h(z, c), z;
        };
      }, 79028: function(o, s, n) {
        var l = n(34809), u = n(32660), i = n(64726), h = n(24272), p = n(98168), _ = n(91602), d = n(663), f = n(54114), c = n(18483);
        o.exports = function(g, m, x, w) {
          function k(E, P) {
            return l.coerce(g, m, c, E, P);
          }
          var S, A = k("a"), C = k("b"), D = k("c");
          if (A ? (S = A.length, C ? (S = Math.min(S, C.length), D && (S = Math.min(S, D.length))) : S = D ? Math.min(S, D.length) : 0) : C && D && (S = Math.min(C.length, D.length)), S) {
            m._length = S, k("sum"), k("text"), k("hovertext"), m.hoveron !== "fills" && k("hovertemplate"), k("mode", S < u.PTS_LINESONLY ? "lines+markers" : "lines"), i.hasMarkers(m) && h(g, m, x, w, k, { gradient: !0 }), i.hasLines(m) && (p(g, m, x, w, k, { backoff: !0 }), _(g, m, k), k("connectgaps")), i.hasText(m) && (k("texttemplate"), d(g, m, w, k));
            var L = [];
            (i.hasMarkers(m) || i.hasText(m)) && (k("cliponaxis"), k("marker.maxdisplayed"), L.push("points")), k("fill"), m.fill !== "none" && (f(g, m, x, k), i.hasLines(m) || _(g, m, k)), m.fill !== "tonext" && m.fill !== "toself" || L.push("fills"), k("hoveron", L.join("+") || "points"), l.coerceSelectionMarkerOpacity(m, k);
          } else m.visible = !1;
        };
      }, 94343: function(o) {
        o.exports = function(s, n, l, u, i) {
          if (n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), u[i]) {
            var h = u[i];
            s.a = h.a, s.b = h.b, s.c = h.c;
          } else s.a = n.a, s.b = n.b, s.c = n.c;
          return s;
        };
      }, 78995: function(o, s, n) {
        var l = n(29714);
        o.exports = function(u, i, h) {
          var p = {}, _ = h[i.subplot]._subplot;
          return p.aLabel = l.tickText(_.aaxis, u.a, !0).text, p.bLabel = l.tickText(_.baxis, u.b, !0).text, p.cLabel = l.tickText(_.caxis, u.c, !0).text, p;
        };
      }, 26558: function(o, s, n) {
        var l = n(37255);
        o.exports = function(u, i, h, p) {
          var _ = l(u, i, h, p);
          if (_ && _[0].index !== !1) {
            var d = _[0];
            if (d.index === void 0) {
              var f = 1 - d.y0 / u.ya._length, c = u.xa._length, g = c * f / 2, m = c - g;
              return d.x0 = Math.max(Math.min(d.x0, m), g), d.x1 = Math.max(Math.min(d.x1, m), g), _;
            }
            var x = d.cd[d.index], w = d.trace, k = d.subplot;
            d.a = x.a, d.b = x.b, d.c = x.c, d.xLabelVal = void 0, d.yLabelVal = void 0;
            var S = {};
            S[w.subplot] = { _subplot: k };
            var A = w._module.formatLabels(x, w, S);
            d.aLabel = A.aLabel, d.bLabel = A.bLabel, d.cLabel = A.cLabel;
            var C = x.hi || w.hoverinfo, D = [];
            if (!w.hovertemplate) {
              var L = C.split("+");
              L.indexOf("all") !== -1 && (L = ["a", "b", "c"]), L.indexOf("a") !== -1 && E(k.aaxis, d.aLabel), L.indexOf("b") !== -1 && E(k.baxis, d.bLabel), L.indexOf("c") !== -1 && E(k.caxis, d.cLabel);
            }
            return d.extraText = D.join("<br>"), d.hovertemplate = w.hovertemplate, _;
          }
          function E(P, I) {
            D.push(P._hovertitle + ": " + I);
          }
        };
      }, 12864: function(o, s, n) {
        o.exports = { attributes: n(18483), supplyDefaults: n(79028), colorbar: n(21146), formatLabels: n(78995), calc: n(67091), plot: n(79005), style: n(9408).style, styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(26558), selectPoints: n(32665), eventData: n(94343), moduleType: "trace", name: "scatterternary", basePlotModule: n(7638), categories: ["ternary", "symbols", "showLegend", "scatter-like"], meta: {} };
      }, 79005: function(o, s, n) {
        var l = n(36098);
        o.exports = function(u, i, h) {
          var p = i.plotContainer;
          p.select(".scatterlayer").selectAll("*").remove();
          for (var _ = i.xaxis, d = i.yaxis, f = { xaxis: _, yaxis: d, plot: p, layerClipId: i._hasClipOnAxisFalse ? i.clipIdRelative : null }, c = i.layers.frontplot.select("g.scatterlayer"), g = 0; g < h.length; g++) {
            var m = h[g];
            m.length && (m[0].trace._xA = _, m[0].trace._yA = d);
          }
          l(u, f, h, c);
        };
      }, 68697: function(o, s, n) {
        var l = n(36640), u = n(87163), i = n(80712).axisHoverFormat, h = n(3208).rb, p = n(92089), _ = n(54826).idRegex, d = n(78032).templatedArray, f = n(93049).extendFlat, c = l.marker, g = c.line, m = f(u("marker.line", { editTypeOverride: "calc" }), { width: f({}, g.width, { editType: "calc" }), editType: "calc" }), x = f(u("marker"), { symbol: c.symbol, angle: c.angle, size: f({}, c.size, { editType: "markerSize" }), sizeref: c.sizeref, sizemin: c.sizemin, sizemode: c.sizemode, opacity: c.opacity, colorbar: c.colorbar, line: m, editType: "calc" });
        function w(k) {
          return { valType: "info_array", freeLength: !0, editType: "calc", items: { valType: "subplotid", regex: _[k], editType: "plot" } };
        }
        x.color.editType = x.cmin.editType = x.cmax.editType = "style", o.exports = { dimensions: d("dimension", { visible: { valType: "boolean", dflt: !0, editType: "calc" }, label: { valType: "string", editType: "calc" }, values: { valType: "data_array", editType: "calc+clearAxisTypes" }, axis: { type: { valType: "enumerated", values: ["linear", "log", "date", "category"], editType: "calc+clearAxisTypes" }, matches: { valType: "boolean", dflt: !1, editType: "calc" }, editType: "calc+clearAxisTypes" }, editType: "calc+clearAxisTypes" }), text: f({}, p.text, {}), hovertext: f({}, p.hovertext, {}), hovertemplate: h(), xhoverformat: i("x"), yhoverformat: i("y"), marker: x, xaxes: w("x"), yaxes: w("y"), diagonal: { visible: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" }, showupperhalf: { valType: "boolean", dflt: !0, editType: "calc" }, showlowerhalf: { valType: "boolean", dflt: !0, editType: "calc" }, selected: { marker: p.selected.marker, editType: "calc" }, unselected: { marker: p.unselected.marker, editType: "calc" }, opacity: p.opacity };
      }, 86690: function(o, s, n) {
        var l = n(33626), u = n(83595);
        o.exports = { moduleType: "trace", name: "splom", categories: ["gl", "regl", "cartesian", "symbols", "showLegend", "scatter-like"], attributes: n(68697), supplyDefaults: n(52542), colorbar: n(21146), calc: n(55325), plot: n(83027), hoverPoints: n(25600).hoverPoints, selectPoints: n(13392), editStyle: n(27926), meta: {} }, l.register(u);
      }, 571: function(o, s, n) {
        var l = n(49478), u = n(33626), i = n(22459), h = n(4173).eV, p = n(37703), _ = n(5975).getFromId, d = n(29714).shouldShowZeroLine, f = "splom", c = {};
        function g(x, w, k) {
          for (var S = k.matrixOptions.data.length, A = w._visibleDims, C = k.viewOpts.ranges = new Array(S), D = 0; D < A.length; D++) {
            var L = A[D], E = C[D] = new Array(4), P = _(x, w._diag[L][0]);
            P && (E[0] = P.r2l(P.range[0]), E[2] = P.r2l(P.range[1]));
            var I = _(x, w._diag[L][1]);
            I && (E[1] = I.r2l(I.range[0]), E[3] = I.r2l(I.range[1]));
          }
          k.selectBatch.length || k.unselectBatch.length ? k.matrix.update({ ranges: C }, { ranges: C }) : k.matrix.update({ ranges: C });
        }
        function m(x) {
          var w = x._fullLayout, k = w._glcanvas.data()[0].regl, S = w._splomGrid;
          S || (S = w._splomGrid = l(k)), S.update(function(A) {
            var C, D = A._context.plotGlPixelRatio, L = A._fullLayout, E = L._size, P = [0, 0, L.width * D, L.height * D], I = {};
            function M(Q, ue, ce, he, de, ne) {
              ce *= D, he *= D, de *= D, ne *= D;
              var ae = ue[Q + "color"], se = ue[Q + "width"], me = String(ae + se);
              me in I ? I[me].data.push(NaN, NaN, ce, he, de, ne) : I[me] = { data: [ce, he, de, ne], join: "rect", thickness: se * D, color: ae, viewport: P, range: P, overlay: !1 };
            }
            for (C in L._splomSubplots) {
              var O, T, z = L._plots[C], F = z.xaxis, U = z.yaxis, V = F._gridVals, $ = U._gridVals, q = F._offset, K = F._length, re = U._length, Y = E.b + U.domain[0] * E.h, te = -U._m, ee = -te * U.r2l(U.range[0], U.calendar);
              if (F.showgrid) for (C = 0; C < V.length; C++) O = q + F.l2p(V[C].x), M("grid", F, O, Y, O, Y + re);
              if (U.showgrid) for (C = 0; C < $.length; C++) M("grid", U, q, T = Y + ee + te * $[C].x, q + K, T);
              d(A, F, U) && (O = q + F.l2p(0), M("zeroline", F, O, Y, O, Y + re)), d(A, U, F) && M("zeroline", U, q, T = Y + ee + 0, q + K, T);
            }
            var X = [];
            for (C in I) X.push(I[C]);
            return X;
          }(x));
        }
        o.exports = { name: f, attr: p.attr, attrRegex: p.attrRegex, layoutAttributes: p.layoutAttributes, supplyLayoutDefaults: p.supplyLayoutDefaults, drawFramework: p.drawFramework, plot: function(x) {
          var w = x._fullLayout, k = u.getModule(f), S = h(x.calcdata, k)[0];
          i(x, ["ANGLE_instanced_arrays", "OES_element_index_uint"], c) && (w._hasOnlyLargeSploms && m(x), k.plot(x, {}, S));
        }, drag: function(x) {
          var w = x.calcdata, k = x._fullLayout;
          k._hasOnlyLargeSploms && m(x);
          for (var S = 0; S < w.length; S++) {
            var A = w[S][0].trace, C = k._splomScenes[A.uid];
            A.type === "splom" && C && C.matrix && g(x, A, C);
          }
        }, updateGrid: m, clean: function(x, w, k, S) {
          var A, C = {};
          if (S._splomScenes) {
            for (A = 0; A < x.length; A++) {
              var D = x[A];
              D.type === "splom" && (C[D.uid] = 1);
            }
            for (A = 0; A < k.length; A++) {
              var L = k[A];
              if (!C[L.uid]) {
                var E = S._splomScenes[L.uid];
                E && E.destroy && E.destroy(), S._splomScenes[L.uid] = null, delete S._splomScenes[L.uid];
              }
            }
          }
          Object.keys(S._splomScenes || {}).length === 0 && delete S._splomScenes, S._splomGrid && !w._hasOnlyLargeSploms && S._hasOnlyLargeSploms && (S._splomGrid.destroy(), S._splomGrid = null, delete S._splomGrid), p.clean(x, w, k, S);
        }, updateFx: p.updateFx, toSVG: p.toSVG, reglPrecompiled: c };
      }, 55325: function(o, s, n) {
        var l = n(34809), u = n(5975), i = n(26544).calcMarkerSize, h = n(26544).calcAxisExpansion, p = n(77272), _ = n(19937).markerSelection, d = n(19937).markerStyle, f = n(78880), c = n(63821).BADNUM, g = n(29483).TOO_MANY_POINTS;
        o.exports = function(m, x) {
          var w, k, S, A, C, D, L = x.dimensions, E = x._length, P = {}, I = P.cdata = [], M = P.data = [], O = x._visibleDims = [];
          function T(F, U) {
            for (var V = F.makeCalcdata({ v: U.values, vcalendar: x.calendar }, "v"), $ = 0; $ < V.length; $++) V[$] = V[$] === c ? NaN : V[$];
            I.push(V), M.push(F.type === "log" ? l.simpleMap(V, F.c2l) : V);
          }
          for (w = 0; w < L.length; w++) if ((S = L[w]).visible) {
            if (A = u.getFromId(m, x._diag[w][0]), C = u.getFromId(m, x._diag[w][1]), A && C && A.type !== C.type) {
              l.log("Skipping splom dimension " + w + " with conflicting axis types");
              continue;
            }
            A ? (T(A, S), C && C.type === "category" && (C._categories = A._categories.slice())) : T(C, S), O.push(w);
          }
          for (p(m, x), l.extendFlat(P, d(m, x)), D = I.length * E > g ? P.sizeAvg || Math.max(P.size, 3) : i(x, E), k = 0; k < O.length; k++) S = L[w = O[k]], A = u.getFromId(m, x._diag[w][0]) || {}, C = u.getFromId(m, x._diag[w][1]) || {}, h(m, x, A, C, I[k], I[k], D);
          var z = f(m, x);
          return z.matrix || (z.matrix = !0), z.matrixOptions = P, z.selectedOptions = _(m, x, x.selected), z.unselectedOptions = _(m, x, x.unselected), [{ x: !1, y: !1, t: {}, trace: x }];
        };
      }, 52542: function(o, s, n) {
        var l = n(34809), u = n(59008), i = n(68697), h = n(64726), p = n(24272), _ = n(63197), d = n(4075).isOpenSymbol;
        function f(c, g) {
          function m(w, k) {
            return l.coerce(c, g, i.dimensions, w, k);
          }
          m("label");
          var x = m("values");
          x && x.length ? m("visible") : g.visible = !1, m("axis.type"), m("axis.matches");
        }
        o.exports = function(c, g, m, x) {
          function w(E, P) {
            return l.coerce(c, g, i, E, P);
          }
          var k = u(c, g, { name: "dimensions", handleItemDefaults: f }), S = w("diagonal.visible"), A = w("showupperhalf"), C = w("showlowerhalf");
          if (_(g, k, "values") && (S || A || C)) {
            w("text"), w("hovertext"), w("hovertemplate"), w("xhoverformat"), w("yhoverformat"), p(c, g, m, x, w, { noAngleRef: !0, noStandOff: !0 });
            var D = d(g.marker.symbol), L = h.isBubble(g);
            w("marker.line.width", D || L ? 1 : 0), function(E, P, I, M) {
              var O, T, z = P.dimensions, F = z.length, U = P.showupperhalf, V = P.showlowerhalf, $ = P.diagonal.visible, q = new Array(F), K = new Array(F);
              for (O = 0; O < F; O++) {
                var re = O ? O + 1 : "";
                q[O] = "x" + re, K[O] = "y" + re;
              }
              var Y = M("xaxes", q), te = M("yaxes", K), ee = P._diag = new Array(F);
              P._xaxes = {}, P._yaxes = {};
              var X = [], Q = [];
              function ue(pe, be, Ae, Se) {
                if (pe) {
                  var Me = pe.charAt(0), De = I._splomAxes[Me];
                  if (P["_" + Me + "axes"][pe] = 1, Se.push(pe), !(pe in De)) {
                    var Le = De[pe] = {};
                    Ae && (Le.label = Ae.label || "", Ae.visible && Ae.axis && (Ae.axis.type && (Le.type = Ae.axis.type), Ae.axis.matches && (Le.matches = be)));
                  }
                }
              }
              var ce = !$ && !V, he = !$ && !U;
              for (P._axesDim = {}, O = 0; O < F; O++) {
                var de = z[O], ne = O === 0, ae = O === F - 1, se = ne && ce || ae && he ? void 0 : Y[O], me = ne && he || ae && ce ? void 0 : te[O];
                ue(se, me, de, X), ue(me, se, de, Q), ee[O] = [se, me], P._axesDim[se] = O, P._axesDim[me] = O;
              }
              for (O = 0; O < X.length; O++) for (T = 0; T < Q.length; T++) {
                var ye = X[O] + Q[T];
                O > T && U || O < T && V ? I._splomSubplots[ye] = 1 : O !== T || !$ && V && U || (I._splomSubplots[ye] = 1);
              }
              (!V || !$ && U && V) && (I._splomGridDflt.xside = "bottom", I._splomGridDflt.yside = "left");
            }(0, g, x, w), l.coerceSelectionMarkerOpacity(g, w);
          } else g.visible = !1;
        };
      }, 27926: function(o, s, n) {
        var l = n(34809), u = n(77272), i = n(19937).markerStyle;
        o.exports = function(h, p) {
          var _ = p.trace, d = h._fullLayout._splomScenes[_.uid];
          if (d) {
            u(h, _), l.extendFlat(d.matrixOptions, i(h, _));
            var f = l.extendFlat({}, d.matrixOptions, d.viewOpts);
            d.matrix.update(f, null);
          }
        };
      }, 52875: function(o, s) {
        s.getDimIndex = function(n, l) {
          for (var u = l._id, i = { x: 0, y: 1 }[u.charAt(0)], h = n._visibleDims, p = 0; p < h.length; p++) {
            var _ = h[p];
            if (n._diag[_][i] === u) return p;
          }
          return !1;
        };
      }, 25600: function(o, s, n) {
        var l = n(52875), u = n(36544).calcHover, i = n(29714).getFromId, h = n(93049).extendFlat;
        function p(_, d, f, c) {
          var g = _.cd[0].trace, m = _.scene.matrixOptions.cdata, x = _.xa, w = _.ya, k = x.c2p(d), S = w.c2p(f), A = _.distance, C = l.getDimIndex(g, x), D = l.getDimIndex(g, w);
          if (C === !1 || D === !1) return [_];
          for (var L, E, P = m[C], I = m[D], M = A, O = 0; O < P.length; O++) if (!c || O === _.index) {
            var T = P[O], z = I[O], F = x.c2p(T) - k, U = w.c2p(z) - S, V = Math.sqrt(F * F + U * U);
            (c || V < M) && (M = E = V, L = O);
          }
          return _.index = L, _.distance = M, _.dxy = E, L === void 0 ? [_] : [u(_, P, I, g)];
        }
        o.exports = { hoverPoints: function(_, d, f, c, g) {
          g || (g = {});
          var m = (c || "").charAt(0) === "x", x = (c || "").charAt(0) === "y", w = p(_, d, f);
          if ((m || x) && g.hoversubplots === "axis" && w[0]) for (var k = (m ? _.xa : _.ya)._subplotsWith, S = g.gd, A = h({}, _), C = 0; C < k.length; C++) {
            var D = k[C];
            if (D !== _.xa._id + _.ya._id) {
              x ? A.xa = i(S, D, "x") : A.ya = i(S, D, "y");
              var L = p(A, d, f, m || x);
              w = w.concat(L);
            }
          }
          return w;
        } };
      }, 91450: function(o, s, n) {
        var l = n(86690);
        l.basePlotModule = n(571), o.exports = l;
      }, 83027: function(o, s, n) {
        var l = n(31239), u = n(34809), i = n(5975), h = n(70414).selectMode;
        function p(_, d) {
          var f, c, g, m, x, w = _._fullLayout, k = w._size, S = d.trace, A = d.t, C = w._splomScenes[S.uid], D = C.matrixOptions, L = D.cdata, E = w._glcanvas.data()[0].regl, P = w.dragmode;
          if (L.length !== 0) {
            D.lower = S.showupperhalf, D.upper = S.showlowerhalf, D.diagonal = S.diagonal.visible;
            var I = S._visibleDims, M = L.length, O = C.viewOpts = {};
            for (O.ranges = new Array(M), O.domains = new Array(M), x = 0; x < I.length; x++) {
              g = I[x];
              var T = O.ranges[x] = new Array(4), z = O.domains[x] = new Array(4);
              (f = i.getFromId(_, S._diag[g][0])) && (T[0] = f._rl[0], T[2] = f._rl[1], z[0] = f.domain[0], z[2] = f.domain[1]), (c = i.getFromId(_, S._diag[g][1])) && (T[1] = c._rl[0], T[3] = c._rl[1], z[1] = c.domain[0], z[3] = c.domain[1]);
            }
            var F = _._context.plotGlPixelRatio, U = k.l * F, V = k.b * F, $ = k.w * F, q = k.h * F;
            O.viewport = [U, V, $ + U, q + V], C.matrix === !0 && (C.matrix = l(E));
            var K = w.clickmode.indexOf("select") > -1, re = !0;
            if (h(P) || S.selectedpoints || K) {
              var Y = S._length;
              if (S.selectedpoints) {
                C.selectBatch = S.selectedpoints;
                var te = S.selectedpoints, ee = {};
                for (g = 0; g < te.length; g++) ee[te[g]] = !0;
                var X = [];
                for (g = 0; g < Y; g++) ee[g] || X.push(g);
                C.unselectBatch = X;
              }
              var Q = A.xpx = new Array(M), ue = A.ypx = new Array(M);
              for (x = 0; x < I.length; x++) {
                if (g = I[x], f = i.getFromId(_, S._diag[g][0])) for (Q[x] = new Array(Y), m = 0; m < Y; m++) Q[x][m] = f.c2p(L[x][m]);
                if (c = i.getFromId(_, S._diag[g][1])) for (ue[x] = new Array(Y), m = 0; m < Y; m++) ue[x][m] = c.c2p(L[x][m]);
              }
              if (C.selectBatch.length || C.unselectBatch.length) {
                var ce = u.extendFlat({}, D, C.unselectedOptions, O), he = u.extendFlat({}, D, C.selectedOptions, O);
                C.matrix.update(ce, he), re = !1;
              }
            } else A.xpx = A.ypx = null;
            if (re) {
              var de = u.extendFlat({}, D, O);
              C.matrix.update(de, null);
            }
          }
        }
        o.exports = function(_, d, f) {
          if (f.length) for (var c = 0; c < f.length; c++) p(_, f[c][0]);
        };
      }, 78880: function(o, s, n) {
        var l = n(34809);
        o.exports = function(u, i) {
          var h = u._fullLayout, p = i.uid, _ = h._splomScenes;
          _ || (_ = h._splomScenes = {});
          var d = { dirty: !0, selectBatch: [], unselectBatch: [] }, f = _[i.uid];
          return f || ((f = _[p] = l.extendFlat({}, d, { matrix: !1, selectBatch: [], unselectBatch: [] })).draw = function() {
            f.matrix && f.matrix.draw && (f.selectBatch.length || f.unselectBatch.length ? f.matrix.draw(f.unselectBatch, f.selectBatch) : f.matrix.draw()), f.dirty = !1;
          }, f.destroy = function() {
            f.matrix && f.matrix.destroy && f.matrix.destroy(), f.matrixOptions = null, f.selectBatch = null, f.unselectBatch = null, f = null;
          }), f.dirty || l.extendFlat(f, d), f;
        };
      }, 13392: function(o, s, n) {
        var l = n(34809), u = l.pushUnique, i = n(64726), h = n(52875);
        o.exports = function(p, _) {
          var d = p.cd, f = d[0].trace, c = d[0].t, g = p.scene, m = g.matrixOptions.cdata, x = p.xaxis, w = p.yaxis, k = [];
          if (!g) return k;
          var S = !i.hasMarkers(f) && !i.hasText(f);
          if (f.visible !== !0 || S) return k;
          var A = h.getDimIndex(f, x), C = h.getDimIndex(f, w);
          if (A === !1 || C === !1) return k;
          var D = c.xpx[A], L = c.ypx[C], E = m[A], P = m[C], I = (p.scene.selectBatch || []).slice(), M = [];
          if (_ !== !1 && !_.degenerate) for (var O = 0; O < E.length; O++) _.contains([D[O], L[O]], null, O, p) ? (k.push({ pointNumber: O, x: E[O], y: P[O] }), u(I, O)) : I.indexOf(O) !== -1 ? u(I, O) : M.push(O);
          var T = g.matrixOptions;
          return I.length || M.length ? g.selectBatch.length || g.unselectBatch.length || g.matrix.update(g.unselectedOptions, l.extendFlat({}, T, g.selectedOptions, g.viewOpts)) : g.matrix.update(T, null), g.selectBatch = I, g.unselectBatch = M, k;
        };
      }, 14774: function(o, s, n) {
        var l = n(87163), u = n(80712).axisHoverFormat, i = n(3208).rb, h = n(42450), p = n(9829), _ = n(93049).extendFlat, d = { x: { valType: "data_array", editType: "calc+clearAxisTypes" }, y: { valType: "data_array", editType: "calc+clearAxisTypes" }, z: { valType: "data_array", editType: "calc+clearAxisTypes" }, u: { valType: "data_array", editType: "calc" }, v: { valType: "data_array", editType: "calc" }, w: { valType: "data_array", editType: "calc" }, starts: { x: { valType: "data_array", editType: "calc" }, y: { valType: "data_array", editType: "calc" }, z: { valType: "data_array", editType: "calc" }, editType: "calc" }, maxdisplayed: { valType: "integer", min: 0, dflt: 1e3, editType: "calc" }, sizeref: { valType: "number", editType: "calc", min: 0, dflt: 1 }, text: { valType: "string", dflt: "", editType: "calc" }, hovertext: { valType: "string", dflt: "", editType: "calc" }, hovertemplate: i({ editType: "calc" }, { keys: ["tubex", "tubey", "tubez", "tubeu", "tubev", "tubew", "norm", "divergence"] }), uhoverformat: u("u", 1), vhoverformat: u("v", 1), whoverformat: u("w", 1), xhoverformat: u("x"), yhoverformat: u("y"), zhoverformat: u("z"), showlegend: _({}, p.showlegend, { dflt: !1 }) };
        _(d, l("", { colorAttr: "u/v/w norm", showScaleDflt: !0, editTypeOverride: "calc" })), ["opacity", "lightposition", "lighting"].forEach(function(f) {
          d[f] = h[f];
        }), d.hoverinfo = _({}, p.hoverinfo, { editType: "calc", flags: ["x", "y", "z", "u", "v", "w", "norm", "divergence", "text", "name"], dflt: "x+y+z+norm+text+name" }), d.transforms = void 0, o.exports = d;
      }, 36402: function(o, s, n) {
        var l = n(34809), u = n(28379);
        function i(_) {
          var d, f, c, g, m, x, w, k, S, A, C, D, L = _._x, E = _._y, P = _._z, I = _._len, M = -1 / 0, O = 1 / 0, T = -1 / 0, z = 1 / 0, F = -1 / 0, U = 1 / 0, V = "";
          for (I && (w = L[0], S = E[0], C = P[0]), I > 1 && (k = L[I - 1], A = E[I - 1], D = P[I - 1]), d = 0; d < I; d++) M = Math.max(M, L[d]), O = Math.min(O, L[d]), T = Math.max(T, E[d]), z = Math.min(z, E[d]), F = Math.max(F, P[d]), U = Math.min(U, P[d]), g || L[d] === w || (g = !0, V += "x"), m || E[d] === S || (m = !0, V += "y"), x || P[d] === C || (x = !0, V += "z");
          g || (V += "x"), m || (V += "y"), x || (V += "z");
          var $ = h(_._x), q = h(_._y), K = h(_._z);
          V = (V = (V = V.replace("x", (w > k ? "-" : "+") + "x")).replace("y", (S > A ? "-" : "+") + "y")).replace("z", (C > D ? "-" : "+") + "z");
          var re = function() {
            I = 0, $ = [], q = [], K = [];
          };
          (!I || I < $.length * q.length * K.length) && re();
          var Y = function(Me) {
            return Me === "x" ? L : Me === "y" ? E : P;
          }, te = function(Me) {
            return Me === "x" ? $ : Me === "y" ? q : K;
          }, ee = function(Me) {
            return Me[I - 1] < Me[0] ? -1 : 1;
          }, X = Y(V[1]), Q = Y(V[3]), ue = Y(V[5]), ce = te(V[1]).length, he = te(V[3]).length, de = te(V[5]).length, ne = !1, ae = function(Me, De, Le) {
            return ce * (he * Me + De) + Le;
          }, se = ee(Y(V[1])), me = ee(Y(V[3])), ye = ee(Y(V[5]));
          for (d = 0; d < de - 1; d++) {
            for (f = 0; f < he - 1; f++) {
              for (c = 0; c < ce - 1; c++) {
                var pe = ae(d, f, c), be = ae(d, f, c + 1), Ae = ae(d, f + 1, c), Se = ae(d + 1, f, c);
                if (X[pe] * se < X[be] * se && Q[pe] * me < Q[Ae] * me && ue[pe] * ye < ue[Se] * ye || (ne = !0), ne) break;
              }
              if (ne) break;
            }
            if (ne) break;
          }
          return ne && (l.warn("Encountered arbitrary coordinates! Unable to input data grid."), re()), { xMin: O, yMin: z, zMin: U, xMax: M, yMax: T, zMax: F, Xs: $, Ys: q, Zs: K, len: I, fill: V };
        }
        function h(_) {
          return l.distinctVals(_).vals;
        }
        function p(_, d) {
          if (d === void 0 && (d = _.length), l.isTypedArray(_)) return _.subarray(0, d);
          for (var f = [], c = 0; c < d; c++) f[c] = +_[c];
          return f;
        }
        o.exports = { calc: function(_, d) {
          d._len = Math.min(d.u.length, d.v.length, d.w.length, d.x.length, d.y.length, d.z.length), d._u = p(d.u, d._len), d._v = p(d.v, d._len), d._w = p(d.w, d._len), d._x = p(d.x, d._len), d._y = p(d.y, d._len), d._z = p(d.z, d._len);
          var f = i(d);
          d._gridFill = f.fill, d._Xs = f.Xs, d._Ys = f.Ys, d._Zs = f.Zs, d._len = f.len;
          var c, g, m, x = 0;
          d.starts && (c = p(d.starts.x || []), g = p(d.starts.y || []), m = p(d.starts.z || []), x = Math.min(c.length, g.length, m.length)), d._startsX = c || [], d._startsY = g || [], d._startsZ = m || [];
          var w, k = 0, S = 1 / 0;
          for (w = 0; w < d._len; w++) {
            var A = d._u[w], C = d._v[w], D = d._w[w], L = Math.sqrt(A * A + C * C + D * D);
            k = Math.max(k, L), S = Math.min(S, L);
          }
          for (u(_, d, { vals: [S, k], containerStr: "", cLetter: "c" }), w = 0; w < x; w++) {
            var E = c[w];
            f.xMax = Math.max(f.xMax, E), f.xMin = Math.min(f.xMin, E);
            var P = g[w];
            f.yMax = Math.max(f.yMax, P), f.yMin = Math.min(f.yMin, P);
            var I = m[w];
            f.zMax = Math.max(f.zMax, I), f.zMin = Math.min(f.zMin, I);
          }
          d._slen = x, d._normMax = k, d._xbnds = [f.xMin, f.xMax], d._ybnds = [f.yMin, f.yMax], d._zbnds = [f.zMin, f.zMax];
        }, filter: p, processGrid: i };
      }, 49280: function(o, s, n) {
        var l = n(99098).gl_streamtube3d, u = l.createTubeMesh, i = n(34809), h = n(46998).parseColorScale, p = n(88856).extractOpts, _ = n(88239), d = { xaxis: 0, yaxis: 1, zaxis: 2 };
        function f(w, k) {
          this.scene = w, this.uid = k, this.mesh = null, this.data = null;
        }
        var c = f.prototype;
        function g(w) {
          var k = w.length;
          return k > 2 ? w.slice(1, k - 1) : k === 2 ? [(w[0] + w[1]) / 2] : w;
        }
        function m(w) {
          var k = w.length;
          return k === 1 ? [0.5, 0.5] : [w[1] - w[0], w[k - 1] - w[k - 2]];
        }
        function x(w, k) {
          var S = w.fullSceneLayout, A = w.dataScale, C = k._len, D = {};
          function L(ce, he) {
            var de = S[he], ne = A[d[he]];
            return i.simpleMap(ce, function(ae) {
              return de.d2l(ae) * ne;
            });
          }
          if (D.vectors = _(L(k._u, "xaxis"), L(k._v, "yaxis"), L(k._w, "zaxis"), C), !C) return { positions: [], cells: [] };
          var E = L(k._Xs, "xaxis"), P = L(k._Ys, "yaxis"), I = L(k._Zs, "zaxis");
          if (D.meshgrid = [E, P, I], D.gridFill = k._gridFill, k._slen) D.startingPositions = _(L(k._startsX, "xaxis"), L(k._startsY, "yaxis"), L(k._startsZ, "zaxis"));
          else {
            for (var M = P[0], O = g(E), T = g(I), z = new Array(O.length * T.length), F = 0, U = 0; U < O.length; U++) for (var V = 0; V < T.length; V++) z[F++] = [O[U], M, T[V]];
            D.startingPositions = z;
          }
          D.colormap = h(k), D.tubeSize = k.sizeref, D.maxLength = k.maxdisplayed;
          var $ = L(k._xbnds, "xaxis"), q = L(k._ybnds, "yaxis"), K = L(k._zbnds, "zaxis"), re = m(E), Y = m(P), te = m(I), ee = [[$[0] - re[0], q[0] - Y[0], K[0] - te[0]], [$[1] + re[1], q[1] + Y[1], K[1] + te[1]]], X = l(D, ee), Q = p(k);
          X.vertexIntensityBounds = [Q.min / k._normMax, Q.max / k._normMax];
          var ue = k.lightposition;
          return X.lightPosition = [ue.x, ue.y, ue.z], X.ambient = k.lighting.ambient, X.diffuse = k.lighting.diffuse, X.specular = k.lighting.specular, X.roughness = k.lighting.roughness, X.fresnel = k.lighting.fresnel, X.opacity = k.opacity, k._pad = X.tubeScale * k.sizeref * 2, X;
        }
        c.handlePick = function(w) {
          var k = this.scene.fullSceneLayout, S = this.scene.dataScale;
          function A(L, E) {
            var P = k[E], I = S[d[E]];
            return P.l2c(L) / I;
          }
          if (w.object === this.mesh) {
            var C = w.data.position, D = w.data.velocity;
            return w.traceCoordinate = [A(C[0], "xaxis"), A(C[1], "yaxis"), A(C[2], "zaxis"), A(D[0], "xaxis"), A(D[1], "yaxis"), A(D[2], "zaxis"), w.data.intensity * this.data._normMax, w.data.divergence], w.textLabel = this.data.hovertext || this.data.text, !0;
          }
        }, c.update = function(w) {
          this.data = w;
          var k = x(this.scene, w);
          this.mesh.update(k);
        }, c.dispose = function() {
          this.scene.glplot.remove(this.mesh), this.mesh.dispose();
        }, o.exports = function(w, k) {
          var S = w.glplot.gl, A = x(w, k), C = u(S, A), D = new f(w, k.uid);
          return D.mesh = C, D.data = k, C._trace = D, w.glplot.add(C), D;
        };
      }, 52737: function(o, s, n) {
        var l = n(34809), u = n(39356), i = n(14774);
        o.exports = function(h, p, _, d) {
          function f(S, A) {
            return l.coerce(h, p, i, S, A);
          }
          var c = f("u"), g = f("v"), m = f("w"), x = f("x"), w = f("y"), k = f("z");
          c && c.length && g && g.length && m && m.length && x && x.length && w && w.length && k && k.length ? (f("starts.x"), f("starts.y"), f("starts.z"), f("maxdisplayed"), f("sizeref"), f("lighting.ambient"), f("lighting.diffuse"), f("lighting.specular"), f("lighting.roughness"), f("lighting.fresnel"), f("lightposition.x"), f("lightposition.y"), f("lightposition.z"), u(h, p, d, f, { prefix: "", cLetter: "c" }), f("text"), f("hovertext"), f("hovertemplate"), f("uhoverformat"), f("vhoverformat"), f("whoverformat"), f("xhoverformat"), f("yhoverformat"), f("zhoverformat"), p._length = null) : p.visible = !1;
        };
      }, 51943: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "streamtube", basePlotModule: n(2487), categories: ["gl3d", "showLegend"], attributes: n(14774), supplyDefaults: n(52737), colorbar: { min: "cmin", max: "cmax" }, calc: n(36402).calc, plot: n(49280), eventData: function(l, u) {
          return l.tubex = l.x, l.tubey = l.y, l.tubez = l.z, l.tubeu = u.traceCoordinate[3], l.tubev = u.traceCoordinate[4], l.tubew = u.traceCoordinate[5], l.norm = u.traceCoordinate[6], l.divergence = u.traceCoordinate[7], delete l.x, delete l.y, delete l.z, l;
        }, meta: {} };
      }, 56708: function(o, s, n) {
        var l = n(9829), u = n(3208).rb, i = n(3208).ay, h = n(87163), p = n(13792).u, _ = n(55412), d = n(2032), f = n(93049).extendFlat, c = n(94850).k;
        o.exports = { labels: { valType: "data_array", editType: "calc" }, parents: { valType: "data_array", editType: "calc" }, values: { valType: "data_array", editType: "calc" }, branchvalues: { valType: "enumerated", values: ["remainder", "total"], dflt: "remainder", editType: "calc" }, count: { valType: "flaglist", flags: ["branches", "leaves"], dflt: "leaves", editType: "calc" }, level: { valType: "any", editType: "plot", anim: !0 }, maxdepth: { valType: "integer", editType: "plot", dflt: -1 }, marker: f({ colors: { valType: "data_array", editType: "calc" }, line: { color: f({}, _.marker.line.color, { dflt: null }), width: f({}, _.marker.line.width, { dflt: 1 }), editType: "calc" }, pattern: c, editType: "calc" }, h("marker", { colorAttr: "colors", anim: !1 })), leaf: { opacity: { valType: "number", editType: "style", min: 0, max: 1 }, editType: "plot" }, text: _.text, textinfo: { valType: "flaglist", flags: ["label", "text", "value", "current path", "percent root", "percent entry", "percent parent"], extras: ["none"], editType: "plot" }, texttemplate: i({ editType: "plot" }, { keys: d.eventDataKeys.concat(["label", "value"]) }), hovertext: _.hovertext, hoverinfo: f({}, l.hoverinfo, { flags: ["label", "text", "value", "name", "current path", "percent root", "percent entry", "percent parent"], dflt: "label+text+value+name" }), hovertemplate: u({}, { keys: d.eventDataKeys }), textfont: _.textfont, insidetextorientation: _.insidetextorientation, insidetextfont: _.insidetextfont, outsidetextfont: f({}, _.outsidetextfont, {}), rotation: { valType: "angle", dflt: 0, editType: "plot" }, sort: _.sort, root: { color: { valType: "color", editType: "calc", dflt: "rgba(0,0,0,0)" }, editType: "calc" }, domain: p({ name: "sunburst", trace: !0, editType: "calc" }) };
      }, 14724: function(o, s, n) {
        var l = n(44122);
        s.name = "sunburst", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 14852: function(o, s, n) {
        var l = n(92264), u = n(10721), i = n(34809), h = n(88856).makeColorScaleFuncFromTrace, p = n(44148).makePullColorFn, _ = n(44148).generateExtendedColors, d = n(88856).calc, f = n(63821).ALMOST_EQUAL, c = {}, g = {}, m = {};
        function x(w, k, S) {
          var A = 0, C = w.children;
          if (C) {
            for (var D = C.length, L = 0; L < D; L++) A += x(C[L], k, S);
            S.branches && A++;
          } else S.leaves && A++;
          return w.value = w.data.data.value = A, k._values || (k._values = []), k._values[w.data.data.i] = A, A;
        }
        s.calc = function(w, k) {
          var S, A, C, D, L, E, P = w._fullLayout, I = k.ids, M = i.isArrayOrTypedArray(I), O = k.labels, T = k.parents, z = k.values, F = i.isArrayOrTypedArray(z), U = [], V = {}, $ = {}, q = function(ye) {
            return ye || typeof ye == "number";
          }, K = function(ye) {
            return !F || u(z[ye]) && z[ye] >= 0;
          };
          M ? (S = Math.min(I.length, T.length), A = function(ye) {
            return q(I[ye]) && K(ye);
          }, C = function(ye) {
            return String(I[ye]);
          }) : (S = Math.min(O.length, T.length), A = function(ye) {
            return q(O[ye]) && K(ye);
          }, C = function(ye) {
            return String(O[ye]);
          }), F && (S = Math.min(S, z.length));
          for (var re = 0; re < S; re++) if (A(re)) {
            var Y = C(re), te = q(T[re]) ? String(T[re]) : "", ee = { i: re, id: Y, pid: te, label: q(O[re]) ? String(O[re]) : "" };
            F && (ee.v = +z[re]), U.push(ee), L = Y, V[D = te] ? V[D].push(L) : V[D] = [L], $[L] = 1;
          }
          if (V[""]) {
            if (V[""].length > 1) {
              for (var X = i.randstr(), Q = 0; Q < U.length; Q++) U[Q].pid === "" && (U[Q].pid = X);
              U.unshift({ hasMultipleRoots: !0, id: X, pid: "", label: "" });
            }
          } else {
            var ue, ce = [];
            for (ue in V) $[ue] || ce.push(ue);
            if (ce.length !== 1) return i.warn(["Multiple implied roots, cannot build", k.type, "hierarchy of", k.name + ".", "These roots include:", ce.join(", ")].join(" "));
            ue = ce[0], U.unshift({ hasImpliedRoot: !0, id: ue, pid: "", label: ue });
          }
          try {
            E = l.stratify().id(function(ye) {
              return ye.id;
            }).parentId(function(ye) {
              return ye.pid;
            })(U);
          } catch (ye) {
            return i.warn(["Failed to build", k.type, "hierarchy of", k.name + ".", "Error:", ye.message].join(" "));
          }
          var he = l.hierarchy(E), de = !1;
          if (F) switch (k.branchvalues) {
            case "remainder":
              he.sum(function(ye) {
                return ye.data.v;
              });
              break;
            case "total":
              he.each(function(ye) {
                var pe = ye.data.data, be = pe.v;
                if (ye.children) {
                  var Ae = ye.children.reduce(function(Se, Me) {
                    return Se + Me.data.data.v;
                  }, 0);
                  if ((pe.hasImpliedRoot || pe.hasMultipleRoots) && (be = Ae), be < Ae * f) return de = !0, i.warn(["Total value for node", ye.data.data.id, "of", k.name, "is smaller than the sum of its children.", `
parent value =`, be, `
children sum =`, Ae].join(" "));
                }
                ye.value = be;
              });
          }
          else x(he, k, { branches: k.count.indexOf("branches") !== -1, leaves: k.count.indexOf("leaves") !== -1 });
          if (!de) {
            var ne, ae;
            k.sort && he.sort(function(ye, pe) {
              return pe.value - ye.value;
            });
            var se = k.marker.colors || [], me = !!se.length;
            return k._hasColorscale ? (me || (se = F ? k.values : k._values), d(w, k, { vals: se, containerStr: "marker", cLetter: "c" }), ae = h(k.marker)) : ne = p(P["_" + k.type + "colormap"]), he.each(function(ye) {
              var pe = ye.data.data;
              pe.color = k._hasColorscale ? ae(se[pe.i]) : ne(se[pe.i], pe.id);
            }), U[0].hierarchy = he, U;
          }
        }, s._runCrossTraceCalc = function(w, k) {
          var S = k._fullLayout, A = k.calcdata, C = S[w + "colorway"], D = S["_" + w + "colormap"];
          S["extend" + w + "colors"] && (C = _(C, w === "icicle" ? m : w === "treemap" ? g : c));
          var L, E = 0;
          function P(O) {
            var T = O.data.data, z = T.id;
            T.color === !1 && (D[z] ? T.color = D[z] : O.parent ? O.parent.parent ? T.color = O.parent.data.data.color : (D[z] = T.color = C[E % C.length], E++) : T.color = L);
          }
          for (var I = 0; I < A.length; I++) {
            var M = A[I][0];
            M.trace.type === w && M.hierarchy && (L = M.trace.root.color, M.hierarchy.each(P));
          }
        }, s.crossTraceCalc = function(w) {
          return s._runCrossTraceCalc("sunburst", w);
        };
      }, 2032: function(o) {
        o.exports = { CLICK_TRANSITION_TIME: 750, CLICK_TRANSITION_EASING: "linear", eventDataKeys: ["currentPath", "root", "entry", "percentRoot", "percentEntry", "percentParent"] };
      }, 33459: function(o, s, n) {
        var l = n(34809), u = n(56708), i = n(13792).N, h = n(17550).handleText, p = n(46979).handleMarkerDefaults, _ = n(88856), d = _.hasColorscale, f = _.handleDefaults;
        o.exports = function(c, g, m, x) {
          function w(L, E) {
            return l.coerce(c, g, u, L, E);
          }
          var k = w("labels"), S = w("parents");
          if (k && k.length && S && S.length) {
            var A = w("values");
            A && A.length ? w("branchvalues") : w("count"), w("level"), w("maxdepth"), p(c, g, x, w);
            var C = g._hasColorscale = d(c, "marker", "colors") || (c.marker || {}).coloraxis;
            C && f(c, g, x, w, { prefix: "marker.", cLetter: "c" }), w("leaf.opacity", C ? 1 : 0.7);
            var D = w("text");
            w("texttemplate"), g.texttemplate || w("textinfo", l.isArrayOrTypedArray(D) ? "text+label" : "label"), w("hovertext"), w("hovertemplate"), h(c, g, x, w, "auto", { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), w("insidetextorientation"), w("sort"), w("rotation"), w("root.color"), i(g, x, w), g._length = null;
          } else g.visible = !1;
        };
      }, 72043: function(o, s, n) {
        var l = n(62203), u = n(78766);
        o.exports = function(i, h, p, _, d) {
          var f = h.data.data, c = f.i, g = d || f.color;
          if (c >= 0) {
            h.i = f.i;
            var m = p.marker;
            m.pattern && m.colors && m.pattern.shape || (m.color = g, h.color = g), l.pointStyle(i, p, _, h);
          } else u.fill(i, g);
        };
      }, 44691: function(o, s, n) {
        var l = n(45568), u = n(33626), i = n(36040).appendArrayPointValue, h = n(32141), p = n(34809), _ = n(68596), d = n(33108), f = n(37252).formatPieValue;
        function c(g, m, x) {
          for (var w = g.data.data, k = { curveNumber: m.index, pointNumber: w.i, data: m._input, fullData: m }, S = 0; S < x.length; S++) {
            var A = x[S];
            A in g && (k[A] = g[A]);
          }
          return "parentString" in g && !d.isHierarchyRoot(g) && (k.parent = g.parentString), i(k, m, w.i), k;
        }
        o.exports = function(g, m, x, w, k) {
          var S = w[0], A = S.trace, C = S.hierarchy, D = A.type === "sunburst", L = A.type === "treemap" || A.type === "icicle";
          "_hasHoverLabel" in A || (A._hasHoverLabel = !1), "_hasHoverEvent" in A || (A._hasHoverEvent = !1), g.on("mouseover", function(E) {
            var P = x._fullLayout;
            if (!x._dragging && P.hovermode !== !1) {
              var I, M = x._fullData[A.index], O = E.data.data, T = O.i, z = d.isHierarchyRoot(E), F = d.getParent(C, E), U = d.getValue(E), V = function(se) {
                return p.castOption(M, T, se);
              }, $ = V("hovertemplate"), q = h.castHoverinfo(M, P, T), K = P.separators;
              if ($ || q && q !== "none" && q !== "skip") {
                var re, Y;
                D && (re = S.cx + E.pxmid[0] * (1 - E.rInscribed), Y = S.cy + E.pxmid[1] * (1 - E.rInscribed)), L && (re = E._hoverX, Y = E._hoverY);
                var te, ee = {}, X = [], Q = [], ue = function(se) {
                  return X.indexOf(se) !== -1;
                };
                q && (X = q === "all" ? M._module.attributes.hoverinfo.flags : q.split("+")), ee.label = O.label, ue("label") && ee.label && Q.push(ee.label), O.hasOwnProperty("v") && (ee.value = O.v, ee.valueLabel = f(ee.value, K), ue("value") && Q.push(ee.valueLabel)), ee.currentPath = E.currentPath = d.getPath(E.data), ue("current path") && !z && Q.push(ee.currentPath);
                var ce = [], he = function() {
                  ce.indexOf(te) === -1 && (Q.push(te), ce.push(te));
                };
                ee.percentParent = E.percentParent = U / d.getValue(F), ee.parent = E.parentString = d.getPtLabel(F), ue("percent parent") && (te = d.formatPercent(ee.percentParent, K) + " of " + ee.parent, he()), ee.percentEntry = E.percentEntry = U / d.getValue(m), ee.entry = E.entry = d.getPtLabel(m), !ue("percent entry") || z || E.onPathbar || (te = d.formatPercent(ee.percentEntry, K) + " of " + ee.entry, he()), ee.percentRoot = E.percentRoot = U / d.getValue(C), ee.root = E.root = d.getPtLabel(C), ue("percent root") && !z && (te = d.formatPercent(ee.percentRoot, K) + " of " + ee.root, he()), ee.text = V("hovertext") || V("text"), ue("text") && (te = ee.text, p.isValidTextValue(te) && Q.push(te)), I = [c(E, M, k.eventDataKeys)];
                var de = { trace: M, y: Y, _x0: E._x0, _x1: E._x1, _y0: E._y0, _y1: E._y1, text: Q.join("<br>"), name: $ || ue("name") ? M.name : void 0, color: V("hoverlabel.bgcolor") || O.color, borderColor: V("hoverlabel.bordercolor"), fontFamily: V("hoverlabel.font.family"), fontSize: V("hoverlabel.font.size"), fontColor: V("hoverlabel.font.color"), fontWeight: V("hoverlabel.font.weight"), fontStyle: V("hoverlabel.font.style"), fontVariant: V("hoverlabel.font.variant"), nameLength: V("hoverlabel.namelength"), textAlign: V("hoverlabel.align"), hovertemplate: $, hovertemplateLabels: ee, eventData: I };
                D && (de.x0 = re - E.rInscribed * E.rpx1, de.x1 = re + E.rInscribed * E.rpx1, de.idealAlign = E.pxmid[0] < 0 ? "left" : "right"), L && (de.x = re, de.idealAlign = re < 0 ? "left" : "right");
                var ne = [];
                h.loneHover(de, { container: P._hoverlayer.node(), outerContainer: P._paper.node(), gd: x, inOut_bbox: ne }), I[0].bbox = ne[0], A._hasHoverLabel = !0;
              }
              if (L) {
                var ae = g.select("path.surface");
                k.styleOne(ae, E, M, x, { hovered: !0 });
              }
              A._hasHoverEvent = !0, x.emit("plotly_hover", { points: I || [c(E, M, k.eventDataKeys)], event: l.event });
            }
          }), g.on("mouseout", function(E) {
            var P = x._fullLayout, I = x._fullData[A.index], M = l.select(this).datum();
            if (A._hasHoverEvent && (E.originalEvent = l.event, x.emit("plotly_unhover", { points: [c(M, I, k.eventDataKeys)], event: l.event }), A._hasHoverEvent = !1), A._hasHoverLabel && (h.loneUnhover(P._hoverlayer.node()), A._hasHoverLabel = !1), L) {
              var O = g.select("path.surface");
              k.styleOne(O, M, I, x, { hovered: !1 });
            }
          }), g.on("click", function(E) {
            var P = x._fullLayout, I = x._fullData[A.index], M = D && (d.isHierarchyRoot(E) || d.isLeaf(E)), O = d.getPtId(E), T = d.isEntry(E) ? d.findEntryWithChild(C, O) : d.findEntryWithLevel(C, O), z = d.getPtId(T), F = { points: [c(E, I, k.eventDataKeys)], event: l.event };
            M || (F.nextLevel = z);
            var U = _.triggerHandler(x, "plotly_" + A.type + "click", F);
            if (U !== !1 && P.hovermode && (x._hoverdata = [c(E, I, k.eventDataKeys)], h.click(x, l.event)), !M && U !== !1 && !x._dragging && !x._transitioning) {
              u.call("_storeDirectGUIEdit", I, P._tracePreGUI[I.uid], { level: I.level });
              var V = { data: [{ level: z }], traces: [A.index] }, $ = { frame: { redraw: !1, duration: k.transitionTime }, transition: { duration: k.transitionTime, easing: k.transitionEasing }, mode: "immediate", fromcurrent: !0 };
              h.loneUnhover(P._hoverlayer.node()), u.call("animate", x, V, $);
            }
          });
        };
      }, 33108: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(27983), h = n(37252);
        function p(_) {
          return _.data.data.pid;
        }
        s.findEntryWithLevel = function(_, d) {
          var f;
          return d && _.eachAfter(function(c) {
            if (s.getPtId(c) === d) return f = c.copy();
          }), f || _;
        }, s.findEntryWithChild = function(_, d) {
          var f;
          return _.eachAfter(function(c) {
            for (var g = c.children || [], m = 0; m < g.length; m++) {
              var x = g[m];
              if (s.getPtId(x) === d) return f = c.copy();
            }
          }), f || _;
        }, s.isEntry = function(_) {
          return !_.parent;
        }, s.isLeaf = function(_) {
          return !_.children;
        }, s.getPtId = function(_) {
          return _.data.data.id;
        }, s.getPtLabel = function(_) {
          return _.data.data.label;
        }, s.getValue = function(_) {
          return _.value;
        }, s.isHierarchyRoot = function(_) {
          return p(_) === "";
        }, s.setSliceCursor = function(_, d, f) {
          var c = f.isTransitioning;
          if (!c) {
            var g = _.datum();
            c = f.hideOnRoot && s.isHierarchyRoot(g) || f.hideOnLeaves && s.isLeaf(g);
          }
          i(_, c ? null : "pointer");
        }, s.getInsideTextFontKey = function(_, d, f, c, g) {
          var m = (g || {}).onPathbar ? "pathbar.textfont" : "insidetextfont", x = f.data.data.i;
          return l.castOption(d, x, m + "." + _) || l.castOption(d, x, "textfont." + _) || c.size;
        }, s.getOutsideTextFontKey = function(_, d, f, c) {
          var g = f.data.data.i;
          return l.castOption(d, g, "outsidetextfont." + _) || l.castOption(d, g, "textfont." + _) || c.size;
        }, s.isOutsideText = function(_, d) {
          return !_._hasColorscale && s.isHierarchyRoot(d);
        }, s.determineTextFont = function(_, d, f, c) {
          return s.isOutsideText(_, d) ? function(g, m, x) {
            return { color: s.getOutsideTextFontKey("color", g, m, x), family: s.getOutsideTextFontKey("family", g, m, x), size: s.getOutsideTextFontKey("size", g, m, x), weight: s.getOutsideTextFontKey("weight", g, m, x), style: s.getOutsideTextFontKey("style", g, m, x), variant: s.getOutsideTextFontKey("variant", g, m, x), textcase: s.getOutsideTextFontKey("textcase", g, m, x), lineposition: s.getOutsideTextFontKey("lineposition", g, m, x), shadow: s.getOutsideTextFontKey("shadow", g, m, x) };
          }(_, d, f) : function(g, m, x, w) {
            var k = (w || {}).onPathbar, S = m.data.data, A = S.i, C = l.castOption(g, A, (k ? "pathbar.textfont" : "insidetextfont") + ".color");
            return !C && g._input.textfont && (C = l.castOption(g._input, A, "textfont.color")), { color: C || u.contrast(S.color), family: s.getInsideTextFontKey("family", g, m, x, w), size: s.getInsideTextFontKey("size", g, m, x, w), weight: s.getInsideTextFontKey("weight", g, m, x, w), style: s.getInsideTextFontKey("style", g, m, x, w), variant: s.getInsideTextFontKey("variant", g, m, x, w), textcase: s.getInsideTextFontKey("textcase", g, m, x, w), lineposition: s.getInsideTextFontKey("lineposition", g, m, x, w), shadow: s.getInsideTextFontKey("shadow", g, m, x, w) };
          }(_, d, f, c);
        }, s.hasTransition = function(_) {
          return !!(_ && _.duration > 0);
        }, s.getMaxDepth = function(_) {
          return _.maxdepth >= 0 ? _.maxdepth : 1 / 0;
        }, s.isHeader = function(_, d) {
          return !(s.isLeaf(_) || _.depth === d._maxDepth - 1);
        }, s.getParent = function(_, d) {
          return s.findEntryWithLevel(_, p(d));
        }, s.listPath = function(_, d) {
          var f = _.parent;
          if (!f) return [];
          var c = d ? [f.data[d]] : [f];
          return s.listPath(f, d).concat(c);
        }, s.getPath = function(_) {
          return s.listPath(_, "label").join("/") + "/";
        }, s.formatValue = h.formatPieValue, s.formatPercent = function(_, d) {
          var f = l.formatPercent(_, 0);
          return f === "0%" && (f = h.formatPiePercent(_, d)), f;
        };
      }, 80809: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "sunburst", basePlotModule: n(14724), categories: [], animatable: !0, attributes: n(56708), layoutAttributes: n(98959), supplyDefaults: n(33459), supplyLayoutDefaults: n(75816), calc: n(14852).calc, crossTraceCalc: n(14852).crossTraceCalc, plot: n(19718).plot, style: n(98972).style, colorbar: n(21146), meta: {} };
      }, 98959: function(o) {
        o.exports = { sunburstcolorway: { valType: "colorlist", editType: "calc" }, extendsunburstcolors: { valType: "boolean", dflt: !0, editType: "calc" } };
      }, 75816: function(o, s, n) {
        var l = n(34809), u = n(98959);
        o.exports = function(i, h) {
          function p(_, d) {
            return l.coerce(i, h, u, _, d);
          }
          p("sunburstcolorway", h.colorway), p("extendsunburstcolors");
        };
      }, 19718: function(o, s, n) {
        var l = n(45568), u = n(92264), i = n(88640).GW, h = n(62203), p = n(34809), _ = n(30635), d = n(84102), f = d.recordMinTextSize, c = d.clearMinTextSize, g = n(35734), m = n(37252).getRotationAngle, x = g.computeTransform, w = g.transformInsideText, k = n(98972).styleOne, S = n(6851).resizeText, A = n(44691), C = n(2032), D = n(33108);
        function L(P, I, M, O) {
          var T = P._context.staticPlot, z = P._fullLayout, F = !z.uniformtext.mode && D.hasTransition(O), U = l.select(M).selectAll("g.slice"), V = I[0], $ = V.trace, q = V.hierarchy, K = D.findEntryWithLevel(q, $.level), re = D.getMaxDepth($), Y = z._size, te = $.domain, ee = Y.w * (te.x[1] - te.x[0]), X = Y.h * (te.y[1] - te.y[0]), Q = 0.5 * Math.min(ee, X), ue = V.cx = Y.l + Y.w * (te.x[1] + te.x[0]) / 2, ce = V.cy = Y.t + Y.h * (1 - te.y[0]) - X / 2;
          if (!K) return U.remove();
          var he = null, de = {};
          F && U.each(function(Ie) {
            de[D.getPtId(Ie)] = { rpx0: Ie.rpx0, rpx1: Ie.rpx1, x0: Ie.x0, x1: Ie.x1, transform: Ie.transform }, !he && D.isEntry(Ie) && (he = Ie);
          });
          var ne = function(Ie) {
            return u.partition().size([2 * Math.PI, Ie.height + 1])(Ie);
          }(K).descendants(), ae = K.height + 1, se = 0, me = re;
          V.hasMultipleRoots && D.isHierarchyRoot(K) && (ne = ne.slice(1), ae -= 1, se = 1, me += 1), ne = ne.filter(function(Ie) {
            return Ie.y1 <= me;
          });
          var ye = m($.rotation);
          ye && ne.forEach(function(Ie) {
            Ie.x0 += ye, Ie.x1 += ye;
          });
          var pe = Math.min(ae, re), be = function(Ie) {
            return (Ie - se) / pe * Q;
          }, Ae = function(Ie, ge) {
            return [Ie * Math.cos(ge), -Ie * Math.sin(ge)];
          }, Se = function(Ie) {
            return p.pathAnnulus(Ie.rpx0, Ie.rpx1, Ie.x0, Ie.x1, ue, ce);
          }, Me = function(Ie) {
            return ue + E(Ie)[0] * (Ie.transform.rCenter || 0) + (Ie.transform.x || 0);
          }, De = function(Ie) {
            return ce + E(Ie)[1] * (Ie.transform.rCenter || 0) + (Ie.transform.y || 0);
          };
          (U = U.data(ne, D.getPtId)).enter().append("g").classed("slice", !0), F ? U.exit().transition().each(function() {
            var Ie = l.select(this);
            Ie.select("path.surface").transition().attrTween("d", function(ge) {
              var Ce = function(we) {
                var Ge, Re = D.getPtId(we), je = de[Re], Ke = de[D.getPtId(K)];
                if (Ke) {
                  var tt = (we.x1 > Ke.x1 ? 2 * Math.PI : 0) + ye;
                  Ge = we.rpx1 < Ke.rpx1 ? { x0: we.x0, x1: we.x1, rpx0: 0, rpx1: 0 } : { x0: tt, x1: tt, rpx0: we.rpx0, rpx1: we.rpx1 };
                } else {
                  var _e, Be = D.getPtId(we.parent);
                  U.each(function(_t) {
                    if (D.getPtId(_t) === Be) return _e = _t;
                  });
                  var $e, Ze = _e.children;
                  Ze.forEach(function(_t, Pt) {
                    if (D.getPtId(_t) === Re) return $e = Pt;
                  });
                  var ct = Ze.length, ft = i(_e.x0, _e.x1);
                  Ge = { rpx0: Q, rpx1: Q, x0: ft($e / ct), x1: ft(($e + 1) / ct) };
                }
                return i(je, Ge);
              }(ge);
              return function(we) {
                return Se(Ce(we));
              };
            }), Ie.select("g.slicetext").attr("opacity", 0);
          }).remove() : U.exit().remove(), U.order();
          var Le = null;
          if (F && he) {
            var We = D.getPtId(he);
            U.each(function(Ie) {
              Le === null && D.getPtId(Ie) === We && (Le = Ie.x1);
            });
          }
          var Ee = U;
          function Ne(Ie) {
            var ge = Ie.parent, Ce = de[D.getPtId(ge)], we = {};
            if (Ce) {
              var Ge = ge.children, Re = Ge.indexOf(Ie), je = Ge.length, Ke = i(Ce.x0, Ce.x1);
              we.x0 = Ke(Re / je), we.x1 = Ke(Re / je);
            } else we.x0 = we.x1 = 0;
            return we;
          }
          F && (Ee = Ee.transition().each("end", function() {
            var Ie = l.select(this);
            D.setSliceCursor(Ie, P, { hideOnRoot: !0, hideOnLeaves: !0, isTransitioning: !1 });
          })), Ee.each(function(Ie) {
            var ge = l.select(this), Ce = p.ensureSingle(ge, "path", "surface", function(tt) {
              tt.style("pointer-events", T ? "none" : "all");
            });
            Ie.rpx0 = be(Ie.y0), Ie.rpx1 = be(Ie.y1), Ie.xmid = (Ie.x0 + Ie.x1) / 2, Ie.pxmid = Ae(Ie.rpx1, Ie.xmid), Ie.midangle = -(Ie.xmid - Math.PI / 2), Ie.startangle = -(Ie.x0 - Math.PI / 2), Ie.stopangle = -(Ie.x1 - Math.PI / 2), Ie.halfangle = 0.5 * Math.min(p.angleDelta(Ie.x0, Ie.x1) || Math.PI, Math.PI), Ie.ring = 1 - Ie.rpx0 / Ie.rpx1, Ie.rInscribed = function(tt) {
              return tt.rpx0 === 0 && p.isFullCircle([tt.x0, tt.x1]) ? 1 : Math.max(0, Math.min(1 / (1 + 1 / Math.sin(tt.halfangle)), tt.ring / 2));
            }(Ie), F ? Ce.transition().attrTween("d", function(tt) {
              var _e = function(Be) {
                var $e, Ze = de[D.getPtId(Be)], ct = { x0: Be.x0, x1: Be.x1, rpx0: Be.rpx0, rpx1: Be.rpx1 };
                if (Ze) $e = Ze;
                else if (he) if (Be.parent) if (Le) {
                  var ft = (Be.x1 > Le ? 2 * Math.PI : 0) + ye;
                  $e = { x0: ft, x1: ft };
                } else $e = { rpx0: Q, rpx1: Q }, p.extendFlat($e, Ne(Be));
                else $e = { rpx0: 0, rpx1: 0 };
                else $e = { x0: ye, x1: ye };
                return i($e, ct);
              }(tt);
              return function(Be) {
                return Se(_e(Be));
              };
            }) : Ce.attr("d", Se), ge.call(A, K, P, I, { eventDataKeys: C.eventDataKeys, transitionTime: C.CLICK_TRANSITION_TIME, transitionEasing: C.CLICK_TRANSITION_EASING }).call(D.setSliceCursor, P, { hideOnRoot: !0, hideOnLeaves: !0, isTransitioning: P._transitioning }), Ce.call(k, Ie, $, P);
            var we = p.ensureSingle(ge, "g", "slicetext"), Ge = p.ensureSingle(we, "text", "", function(tt) {
              tt.attr("data-notex", 1);
            }), Re = p.ensureUniformFontSize(P, D.determineTextFont($, Ie, z.font));
            Ge.text(s.formatSliceLabel(Ie, K, $, I, z)).classed("slicetext", !0).attr("text-anchor", "middle").call(h.font, Re).call(_.convertToTspans, P);
            var je = h.bBox(Ge.node());
            Ie.transform = w(je, Ie, V), Ie.transform.targetX = Me(Ie), Ie.transform.targetY = De(Ie);
            var Ke = function(tt, _e) {
              var Be = tt.transform;
              return x(Be, _e), Be.fontSize = Re.size, f($.type, Be, z), p.getTextTransform(Be);
            };
            F ? Ge.transition().attrTween("transform", function(tt) {
              var _e = function(Be) {
                var $e, Ze = de[D.getPtId(Be)], ct = Be.transform;
                if (Ze) $e = Ze;
                else if ($e = { rpx1: Be.rpx1, transform: { textPosAngle: ct.textPosAngle, scale: 0, rotate: ct.rotate, rCenter: ct.rCenter, x: ct.x, y: ct.y } }, he) if (Be.parent) if (Le) {
                  var ft = Be.x1 > Le ? 2 * Math.PI : 0;
                  $e.x0 = $e.x1 = ft;
                } else p.extendFlat($e, Ne(Be));
                else $e.x0 = $e.x1 = ye;
                else $e.x0 = $e.x1 = ye;
                var _t = i($e.transform.textPosAngle, Be.transform.textPosAngle), Pt = i($e.rpx1, Be.rpx1), Dt = i($e.x0, Be.x0), $t = i($e.x1, Be.x1), Gt = i($e.transform.scale, ct.scale), Wt = i($e.transform.rotate, ct.rotate), mt = ct.rCenter === 0 ? 3 : $e.transform.rCenter === 0 ? 1 / 3 : 1, at = i($e.transform.rCenter, ct.rCenter);
                return function(vt) {
                  var St = Pt(vt), Je = Dt(vt), nt = $t(vt), ot = function(Fe) {
                    return at(Math.pow(Fe, mt));
                  }(vt), Ye = { pxmid: Ae(St, (Je + nt) / 2), rpx1: St, transform: { textPosAngle: _t(vt), rCenter: ot, x: ct.x, y: ct.y } };
                  return f($.type, ct, z), { transform: { targetX: Me(Ye), targetY: De(Ye), scale: Gt(vt), rotate: Wt(vt), rCenter: ot } };
                };
              }(tt);
              return function(Be) {
                return Ke(_e(Be), je);
              };
            }) : Ge.attr("transform", Ke(Ie, je));
          });
        }
        function E(P) {
          return I = P.rpx1, M = P.transform.textPosAngle, [I * Math.sin(M), -I * Math.cos(M)];
          var I, M;
        }
        s.plot = function(P, I, M, O) {
          var T, z, F = P._fullLayout, U = F._sunburstlayer, V = !M, $ = !F.uniformtext.mode && D.hasTransition(M);
          c("sunburst", F), (T = U.selectAll("g.trace.sunburst").data(I, function(q) {
            return q[0].trace.uid;
          })).enter().append("g").classed("trace", !0).classed("sunburst", !0).attr("stroke-linejoin", "round"), T.order(), $ ? (O && (z = O()), l.transition().duration(M.duration).ease(M.easing).each("end", function() {
            z && z();
          }).each("interrupt", function() {
            z && z();
          }).each(function() {
            U.selectAll("g.trace").each(function(q) {
              L(P, q, this, M);
            });
          })) : (T.each(function(q) {
            L(P, q, this, M);
          }), F.uniformtext.mode && S(P, F._sunburstlayer.selectAll(".trace"), "sunburst")), V && T.exit().remove();
        }, s.formatSliceLabel = function(P, I, M, O, T) {
          var z = M.texttemplate, F = M.textinfo;
          if (!(z || F && F !== "none")) return "";
          var U = T.separators, V = O[0], $ = P.data.data, q = V.hierarchy, K = D.isHierarchyRoot(P), re = D.getParent(q, P), Y = D.getValue(P);
          if (!z) {
            var te, ee = F.split("+"), X = function(me) {
              return ee.indexOf(me) !== -1;
            }, Q = [];
            if (X("label") && $.label && Q.push($.label), $.hasOwnProperty("v") && X("value") && Q.push(D.formatValue($.v, U)), !K) {
              X("current path") && Q.push(D.getPath(P.data));
              var ue = 0;
              X("percent parent") && ue++, X("percent entry") && ue++, X("percent root") && ue++;
              var ce = ue > 1;
              if (ue) {
                var he, de = function(me) {
                  te = D.formatPercent(he, U), ce && (te += " of " + me), Q.push(te);
                };
                X("percent parent") && !K && (he = Y / D.getValue(re), de("parent")), X("percent entry") && (he = Y / D.getValue(I), de("entry")), X("percent root") && (he = Y / D.getValue(q), de("root"));
              }
            }
            return X("text") && (te = p.castOption(M, $.i, "text"), p.isValidTextValue(te) && Q.push(te)), Q.join("<br>");
          }
          var ne = p.castOption(M, $.i, "texttemplate");
          if (!ne) return "";
          var ae = {};
          $.label && (ae.label = $.label), $.hasOwnProperty("v") && (ae.value = $.v, ae.valueLabel = D.formatValue($.v, U)), ae.currentPath = D.getPath(P.data), K || (ae.percentParent = Y / D.getValue(re), ae.percentParentLabel = D.formatPercent(ae.percentParent, U), ae.parent = D.getPtLabel(re)), ae.percentEntry = Y / D.getValue(I), ae.percentEntryLabel = D.formatPercent(ae.percentEntry, U), ae.entry = D.getPtLabel(I), ae.percentRoot = Y / D.getValue(q), ae.percentRootLabel = D.formatPercent(ae.percentRoot, U), ae.root = D.getPtLabel(q), $.hasOwnProperty("color") && (ae.color = $.color);
          var se = p.castOption(M, $.i, "text");
          return (p.isValidTextValue(se) || se === "") && (ae.text = se), ae.customdata = p.castOption(M, $.i, "customdata"), p.texttemplateString(ne, ae, T._d3locale, ae, M._meta || {});
        };
      }, 98972: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(34809), h = n(84102).resizeText, p = n(72043);
        function _(d, f, c, g) {
          var m = f.data.data, x = !f.children, w = m.i, k = i.castOption(c, w, "marker.line.color") || u.defaultLine, S = i.castOption(c, w, "marker.line.width") || 0;
          d.call(p, f, c, g).style("stroke-width", S).call(u.stroke, k).style("opacity", x ? c.leaf.opacity : null);
        }
        o.exports = { style: function(d) {
          var f = d._fullLayout._sunburstlayer.selectAll(".trace");
          h(d, f, "sunburst"), f.each(function(c) {
            var g = l.select(this), m = c[0].trace;
            g.style("opacity", m.opacity), g.selectAll("path.surface").each(function(x) {
              l.select(this).call(_, x, m, d);
            });
          });
        }, styleOne: _ };
      }, 16131: function(o, s, n) {
        var l = n(78766), u = n(87163), i = n(80712).axisHoverFormat, h = n(3208).rb, p = n(9829), _ = n(93049).extendFlat, d = n(13582).overrideAll;
        function f(g) {
          return { show: { valType: "boolean", dflt: !1 }, start: { valType: "number", dflt: null, editType: "plot" }, end: { valType: "number", dflt: null, editType: "plot" }, size: { valType: "number", dflt: null, min: 0, editType: "plot" }, project: { x: { valType: "boolean", dflt: !1 }, y: { valType: "boolean", dflt: !1 }, z: { valType: "boolean", dflt: !1 } }, color: { valType: "color", dflt: l.defaultLine }, usecolormap: { valType: "boolean", dflt: !1 }, width: { valType: "number", min: 1, max: 16, dflt: 2 }, highlight: { valType: "boolean", dflt: !0 }, highlightcolor: { valType: "color", dflt: l.defaultLine }, highlightwidth: { valType: "number", min: 1, max: 16, dflt: 2 } };
        }
        var c = o.exports = d(_({ z: { valType: "data_array" }, x: { valType: "data_array" }, y: { valType: "data_array" }, text: { valType: "string", dflt: "", arrayOk: !0 }, hovertext: { valType: "string", dflt: "", arrayOk: !0 }, hovertemplate: h(), xhoverformat: i("x"), yhoverformat: i("y"), zhoverformat: i("z"), connectgaps: { valType: "boolean", dflt: !1, editType: "calc" }, surfacecolor: { valType: "data_array" } }, u("", { colorAttr: "z or surfacecolor", showScaleDflt: !0, autoColorDflt: !1, editTypeOverride: "calc" }), { contours: { x: f(), y: f(), z: f() }, hidesurface: { valType: "boolean", dflt: !1 }, lightposition: { x: { valType: "number", min: -1e5, max: 1e5, dflt: 10 }, y: { valType: "number", min: -1e5, max: 1e5, dflt: 1e4 }, z: { valType: "number", min: -1e5, max: 1e5, dflt: 0 } }, lighting: { ambient: { valType: "number", min: 0, max: 1, dflt: 0.8 }, diffuse: { valType: "number", min: 0, max: 1, dflt: 0.8 }, specular: { valType: "number", min: 0, max: 2, dflt: 0.05 }, roughness: { valType: "number", min: 0, max: 1, dflt: 0.5 }, fresnel: { valType: "number", min: 0, max: 5, dflt: 0.2 } }, opacity: { valType: "number", min: 0, max: 1, dflt: 1 }, opacityscale: { valType: "any", editType: "calc" }, _deprecated: { zauto: _({}, u.zauto, {}), zmin: _({}, u.zmin, {}), zmax: _({}, u.zmax, {}) }, hoverinfo: _({}, p.hoverinfo), showlegend: _({}, p.showlegend, { dflt: !1 }) }), "calc", "nested");
        c.x.editType = c.y.editType = c.z.editType = "calc+clearAxisTypes", c.transforms = void 0;
      }, 53027: function(o, s, n) {
        var l = n(28379);
        o.exports = function(u, i) {
          i.surfacecolor ? l(u, i, { vals: i.surfacecolor, containerStr: "", cLetter: "c" }) : l(u, i, { vals: i.z, containerStr: "", cLetter: "c" });
        };
      }, 27159: function(o, s, n) {
        var l = n(99098).gl_surface3d, u = n(99098).ndarray, i = n(99098).ndarray_linear_interpolate.d2, h = n(69295), p = n(78106), _ = n(34809).isArrayOrTypedArray, d = n(46998).parseColorScale, f = n(55010), c = n(88856).extractOpts;
        function g(M, O, T) {
          this.scene = M, this.uid = T, this.surface = O, this.data = null, this.showContour = [!1, !1, !1], this.contourStart = [null, null, null], this.contourEnd = [null, null, null], this.contourSize = [0, 0, 0], this.minValues = [1 / 0, 1 / 0, 1 / 0], this.maxValues = [-1 / 0, -1 / 0, -1 / 0], this.dataScaleX = 1, this.dataScaleY = 1, this.refineData = !0, this.objectOffset = [0, 0, 0];
        }
        var m = g.prototype;
        m.getXat = function(M, O, T, z) {
          var F = _(this.data.x) ? _(this.data.x[0]) ? this.data.x[O][M] : this.data.x[M] : M;
          return T === void 0 ? F : z.d2l(F, 0, T);
        }, m.getYat = function(M, O, T, z) {
          var F = _(this.data.y) ? _(this.data.y[0]) ? this.data.y[O][M] : this.data.y[O] : O;
          return T === void 0 ? F : z.d2l(F, 0, T);
        }, m.getZat = function(M, O, T, z) {
          var F = this.data.z[O][M];
          return F === null && this.data.connectgaps && this.data._interpolatedZ && (F = this.data._interpolatedZ[O][M]), T === void 0 ? F : z.d2l(F, 0, T);
        }, m.handlePick = function(M) {
          if (M.object === this.surface) {
            var O = (M.data.index[0] - 1) / this.dataScaleX - 1, T = (M.data.index[1] - 1) / this.dataScaleY - 1, z = Math.max(Math.min(Math.round(O), this.data.z[0].length - 1), 0), F = Math.max(Math.min(Math.round(T), this.data._ylength - 1), 0);
            M.index = [z, F], M.traceCoordinate = [this.getXat(z, F), this.getYat(z, F), this.getZat(z, F)], M.dataCoordinate = [this.getXat(z, F, this.data.xcalendar, this.scene.fullSceneLayout.xaxis), this.getYat(z, F, this.data.ycalendar, this.scene.fullSceneLayout.yaxis), this.getZat(z, F, this.data.zcalendar, this.scene.fullSceneLayout.zaxis)];
            for (var U = 0; U < 3; U++)
              M.dataCoordinate[U] != null && (M.dataCoordinate[U] *= this.scene.dataScale[U]);
            var V = this.data.hovertext || this.data.text;
            return _(V) && V[F] && V[F][z] !== void 0 ? M.textLabel = V[F][z] : M.textLabel = V || "", M.data.dataCoordinate = M.dataCoordinate.slice(), this.surface.highlight(M.data), this.scene.glplot.spikes.position = M.dataCoordinate, !0;
          }
        };
        var x = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999];
        function w(M, O) {
          if (M < O) return 0;
          for (var T = 0; Math.floor(M % O) === 0; ) M /= O, T++;
          return T;
        }
        function k(M) {
          for (var O = [], T = 0; T < x.length; T++) {
            var z = x[T];
            O.push(w(M, z));
          }
          return O;
        }
        function S(M) {
          for (var O = k(M), T = M, z = 0; z < x.length; z++) if (O[z] > 0) {
            T = x[z];
            break;
          }
          return T;
        }
        function A(M, O) {
          if (!(M < 1 || O < 1)) {
            for (var T = k(M), z = k(O), F = 1, U = 0; U < x.length; U++) F *= Math.pow(x[U], Math.max(T[U], z[U]));
            return F;
          }
        }
        m.calcXnums = function(M) {
          var O, T = [];
          for (O = 1; O < M; O++) {
            var z = this.getXat(O - 1, 0), F = this.getXat(O, 0);
            T[O - 1] = F !== z && z != null && F != null ? Math.abs(F - z) : 0;
          }
          var U = 0;
          for (O = 1; O < M; O++) U += T[O - 1];
          for (O = 1; O < M; O++) T[O - 1] === 0 ? T[O - 1] = 1 : T[O - 1] = Math.round(U / T[O - 1]);
          return T;
        }, m.calcYnums = function(M) {
          var O, T = [];
          for (O = 1; O < M; O++) {
            var z = this.getYat(0, O - 1), F = this.getYat(0, O);
            T[O - 1] = F !== z && z != null && F != null ? Math.abs(F - z) : 0;
          }
          var U = 0;
          for (O = 1; O < M; O++) U += T[O - 1];
          for (O = 1; O < M; O++) T[O - 1] === 0 ? T[O - 1] = 1 : T[O - 1] = Math.round(U / T[O - 1]);
          return T;
        };
        var C = [1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260], D = C[9], L = C[13];
        function E(M, O, T) {
          var z = T[8] + T[2] * O[0] + T[5] * O[1];
          return M[0] = (T[6] + T[0] * O[0] + T[3] * O[1]) / z, M[1] = (T[7] + T[1] * O[0] + T[4] * O[1]) / z, M;
        }
        function P(M, O, T) {
          return function(z, F, U, V) {
            for (var $ = [0, 0], q = z.shape[0], K = z.shape[1], re = 0; re < q; re++) for (var Y = 0; Y < K; Y++) U($, [re, Y], V), z.set(re, Y, i(F, $[0], $[1]));
          }(M, O, E, T), M;
        }
        function I(M, O) {
          for (var T = !1, z = 0; z < M.length; z++) if (O === M[z]) {
            T = !0;
            break;
          }
          T === !1 && M.push(O);
        }
        m.estimateScale = function(M, O) {
          for (var T = 1 + function(F) {
            if (F.length !== 0) {
              for (var U = 1, V = 0; V < F.length; V++) U = A(U, F[V]);
              return U;
            }
          }(O === 0 ? this.calcXnums(M) : this.calcYnums(M)); T < D; ) T *= 2;
          for (; T > L; ) T--, T /= S(T), ++T < D && (T = L);
          var z = Math.round(T / M);
          return z > 1 ? z : 1;
        }, m.refineCoords = function(M) {
          for (var O = this.dataScaleX, T = this.dataScaleY, z = M[0].shape[0], F = M[0].shape[1], U = 0 | Math.floor(M[0].shape[0] * O + 1), V = 0 | Math.floor(M[0].shape[1] * T + 1), $ = 1 + z + 1, q = 1 + F + 1, K = u(new Float32Array($ * q), [$, q]), re = [1 / O, 0, 0, 0, 1 / T, 0, 0, 0, 1], Y = 0; Y < M.length; ++Y) {
            this.surface.padField(K, M[Y]);
            var te = u(new Float32Array(U * V), [U, V]);
            P(te, K, re), M[Y] = te;
          }
        }, m.setContourLevels = function() {
          var M, O, T, z = [[], [], []], F = [!1, !1, !1], U = !1;
          for (M = 0; M < 3; ++M) if (this.showContour[M] && (U = !0, this.contourSize[M] > 0 && this.contourStart[M] !== null && this.contourEnd[M] !== null && this.contourEnd[M] > this.contourStart[M])) for (F[M] = !0, O = this.contourStart[M]; O < this.contourEnd[M]; O += this.contourSize[M]) T = O * this.scene.dataScale[M], I(z[M], T);
          if (U) {
            var V = [[], [], []];
            for (M = 0; M < 3; ++M) this.showContour[M] && (V[M] = F[M] ? z[M] : this.scene.contourLevels[M]);
            this.surface.update({ levels: V });
          }
        }, m.update = function(M) {
          var O, T, z, F, U = this.scene, V = U.fullSceneLayout, $ = this.surface, q = d(M), K = U.dataScale, re = M.z[0].length, Y = M._ylength, te = U.contourLevels;
          this.data = M;
          var ee = [];
          for (O = 0; O < 3; O++) for (ee[O] = [], T = 0; T < re; T++) ee[O][T] = [];
          for (T = 0; T < re; T++) for (z = 0; z < Y; z++) ee[0][T][z] = this.getXat(T, z, M.xcalendar, V.xaxis), ee[1][T][z] = this.getYat(T, z, M.ycalendar, V.yaxis), ee[2][T][z] = this.getZat(T, z, M.zcalendar, V.zaxis);
          if (M.connectgaps) for (M._emptypoints = p(ee[2]), h(ee[2], M._emptypoints), M._interpolatedZ = [], T = 0; T < re; T++) for (M._interpolatedZ[T] = [], z = 0; z < Y; z++) M._interpolatedZ[T][z] = ee[2][T][z];
          for (O = 0; O < 3; O++) for (T = 0; T < re; T++) for (z = 0; z < Y; z++) (F = ee[O][T][z]) == null ? ee[O][T][z] = NaN : F = ee[O][T][z] *= K[O];
          for (O = 0; O < 3; O++) for (T = 0; T < re; T++) for (z = 0; z < Y; z++) (F = ee[O][T][z]) != null && (this.minValues[O] > F && (this.minValues[O] = F), this.maxValues[O] < F && (this.maxValues[O] = F));
          for (O = 0; O < 3; O++) this.objectOffset[O] = 0.5 * (this.minValues[O] + this.maxValues[O]);
          for (O = 0; O < 3; O++) for (T = 0; T < re; T++) for (z = 0; z < Y; z++) (F = ee[O][T][z]) != null && (ee[O][T][z] -= this.objectOffset[O]);
          var X = [u(new Float32Array(re * Y), [re, Y]), u(new Float32Array(re * Y), [re, Y]), u(new Float32Array(re * Y), [re, Y])];
          for (O = 0; O < 3; O++) for (T = 0; T < re; T++) for (z = 0; z < Y; z++) X[O].set(T, z, ee[O][T][z]);
          ee = [];
          var Q = { colormap: q, levels: [[], [], []], showContour: [!0, !0, !0], showSurface: !M.hidesurface, contourProject: [[!1, !1, !1], [!1, !1, !1], [!1, !1, !1]], contourWidth: [1, 1, 1], contourColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], contourTint: [1, 1, 1], dynamicColor: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], dynamicWidth: [1, 1, 1], dynamicTint: [1, 1, 1], opacityscale: M.opacityscale, opacity: M.opacity }, ue = c(M);
          if (Q.intensityBounds = [ue.min, ue.max], M.surfacecolor) {
            var ce = u(new Float32Array(re * Y), [re, Y]);
            for (T = 0; T < re; T++) for (z = 0; z < Y; z++) ce.set(T, z, M.surfacecolor[z][T]);
            X.push(ce);
          } else Q.intensityBounds[0] *= K[2], Q.intensityBounds[1] *= K[2];
          (L < X[0].shape[0] || L < X[0].shape[1]) && (this.refineData = !1), this.refineData === !0 && (this.dataScaleX = this.estimateScale(X[0].shape[0], 0), this.dataScaleY = this.estimateScale(X[0].shape[1], 1), this.dataScaleX === 1 && this.dataScaleY === 1 || this.refineCoords(X)), M.surfacecolor && (Q.intensity = X.pop());
          var he = [!0, !0, !0], de = ["x", "y", "z"];
          for (O = 0; O < 3; ++O) {
            var ne = M.contours[de[O]];
            he[O] = ne.highlight, Q.showContour[O] = ne.show || ne.highlight, Q.showContour[O] && (Q.contourProject[O] = [ne.project.x, ne.project.y, ne.project.z], ne.show ? (this.showContour[O] = !0, Q.levels[O] = te[O], $.highlightColor[O] = Q.contourColor[O] = f(ne.color), ne.usecolormap ? $.highlightTint[O] = Q.contourTint[O] = 0 : $.highlightTint[O] = Q.contourTint[O] = 1, Q.contourWidth[O] = ne.width, this.contourStart[O] = ne.start, this.contourEnd[O] = ne.end, this.contourSize[O] = ne.size) : (this.showContour[O] = !1, this.contourStart[O] = null, this.contourEnd[O] = null, this.contourSize[O] = 0), ne.highlight && (Q.dynamicColor[O] = f(ne.highlightcolor), Q.dynamicWidth[O] = ne.highlightwidth));
          }
          (function(ae) {
            var se = ae[0].rgb, me = ae[ae.length - 1].rgb;
            return se[0] === me[0] && se[1] === me[1] && se[2] === me[2] && se[3] === me[3];
          })(q) && (Q.vertexColor = !0), Q.objectOffset = this.objectOffset, Q.coords = X, $.update(Q), $.visible = M.visible, $.enableDynamic = he, $.enableHighlight = he, $.snapToData = !0, "lighting" in M && ($.ambientLight = M.lighting.ambient, $.diffuseLight = M.lighting.diffuse, $.specularLight = M.lighting.specular, $.roughness = M.lighting.roughness, $.fresnel = M.lighting.fresnel), "lightposition" in M && ($.lightPosition = [M.lightposition.x, M.lightposition.y, M.lightposition.z]);
        }, m.dispose = function() {
          this.scene.glplot.remove(this.surface), this.surface.dispose();
        }, o.exports = function(M, O) {
          var T = M.glplot.gl, z = l({ gl: T }), F = new g(M, z, O.uid);
          return z._trace = F, F.update(O), M.glplot.add(z), F;
        };
      }, 65444: function(o, s, n) {
        var l = n(33626), u = n(34809), i = n(39356), h = n(16131);
        function p(d, f, c, g) {
          var m = g("opacityscale");
          m === "max" ? f.opacityscale = [[0, 0.1], [1, 1]] : m === "min" ? f.opacityscale = [[0, 1], [1, 0.1]] : m === "extremes" ? f.opacityscale = function(x, w) {
            for (var k = [], S = 0; S < 32; S++) {
              var A = S / 31, C = 0.1 + 0.9 * (1 - Math.pow(Math.sin(1 * A * Math.PI), 2));
              k.push([A, Math.max(0, Math.min(1, C))]);
            }
            return k;
          }() : function(x) {
            var w = 0;
            if (!Array.isArray(x) || x.length < 2 || !x[0] || !x[x.length - 1] || +x[0][0] != 0 || +x[x.length - 1][0] != 1) return !1;
            for (var k = 0; k < x.length; k++) {
              var S = x[k];
              if (S.length !== 2 || +S[0] < w) return !1;
              w = +S[0];
            }
            return !0;
          }(m) || (f.opacityscale = void 0);
        }
        function _(d, f, c) {
          f in d && !(c in d) && (d[c] = d[f]);
        }
        o.exports = { supplyDefaults: function(d, f, c, g) {
          var m, x;
          function w(I, M) {
            return u.coerce(d, f, h, I, M);
          }
          var k = w("x"), S = w("y"), A = w("z");
          if (!A || !A.length || k && k.length < 1 || S && S.length < 1) f.visible = !1;
          else {
            f._xlength = Array.isArray(k) && u.isArrayOrTypedArray(k[0]) ? A.length : A[0].length, f._ylength = A.length, l.getComponentMethod("calendars", "handleTraceDefaults")(d, f, ["x", "y", "z"], g), w("text"), w("hovertext"), w("hovertemplate"), w("xhoverformat"), w("yhoverformat"), w("zhoverformat"), ["lighting.ambient", "lighting.diffuse", "lighting.specular", "lighting.roughness", "lighting.fresnel", "lightposition.x", "lightposition.y", "lightposition.z", "hidesurface", "connectgaps", "opacity"].forEach(function(I) {
              w(I);
            });
            var C = w("surfacecolor"), D = ["x", "y", "z"];
            for (m = 0; m < 3; ++m) {
              var L = "contours." + D[m], E = w(L + ".show"), P = w(L + ".highlight");
              if (E || P) for (x = 0; x < 3; ++x) w(L + ".project." + D[x]);
              E && (w(L + ".color"), w(L + ".width"), w(L + ".usecolormap")), P && (w(L + ".highlightcolor"), w(L + ".highlightwidth")), w(L + ".start"), w(L + ".end"), w(L + ".size");
            }
            C || (_(d, "zmin", "cmin"), _(d, "zmax", "cmax"), _(d, "zauto", "cauto")), i(d, f, g, w, { prefix: "", cLetter: "c" }), p(0, f, 0, w), f._length = null;
          }
        }, opacityscaleDefaults: p };
      }, 95984: function(o, s, n) {
        o.exports = { attributes: n(16131), supplyDefaults: n(65444).supplyDefaults, colorbar: { min: "cmin", max: "cmax" }, calc: n(53027), plot: n(27159), moduleType: "trace", name: "surface", basePlotModule: n(2487), categories: ["gl3d", "2dMap", "showLegend"], meta: {} };
      }, 92294: function(o, s, n) {
        var l = n(50222), u = n(93049).extendFlat, i = n(13582).overrideAll, h = n(80337), p = n(13792).u, _ = n(80712).descriptionOnlyNumbers;
        (o.exports = i({ domain: p({ name: "table", trace: !0 }), columnwidth: { valType: "number", arrayOk: !0, dflt: null }, columnorder: { valType: "data_array" }, header: { values: { valType: "data_array", dflt: [] }, format: { valType: "data_array", dflt: [], description: _("cell value") }, prefix: { valType: "string", arrayOk: !0, dflt: null }, suffix: { valType: "string", arrayOk: !0, dflt: null }, height: { valType: "number", dflt: 28 }, align: u({}, l.align, { arrayOk: !0 }), line: { width: { valType: "number", arrayOk: !0, dflt: 1 }, color: { valType: "color", arrayOk: !0, dflt: "grey" } }, fill: { color: { valType: "color", arrayOk: !0, dflt: "white" } }, font: u({}, h({ arrayOk: !0 })) }, cells: { values: { valType: "data_array", dflt: [] }, format: { valType: "data_array", dflt: [], description: _("cell value") }, prefix: { valType: "string", arrayOk: !0, dflt: null }, suffix: { valType: "string", arrayOk: !0, dflt: null }, height: { valType: "number", dflt: 20 }, align: u({}, l.align, { arrayOk: !0 }), line: { width: { valType: "number", arrayOk: !0, dflt: 1 }, color: { valType: "color", arrayOk: !0, dflt: "grey" } }, fill: { color: { valType: "color", arrayOk: !0, dflt: "white" } }, font: u({}, h({ arrayOk: !0 })) } }, "calc", "from-root")).transforms = void 0;
      }, 82662: function(o, s, n) {
        var l = n(4173).eV, u = n(84576), i = "table";
        s.name = i, s.plot = function(h) {
          var p = l(h.calcdata, i)[0];
          p.length && u(h, p);
        }, s.clean = function(h, p, _, d) {
          var f = d._has && d._has(i), c = p._has && p._has(i);
          f && !c && d._paperdiv.selectAll(".table").remove();
        };
      }, 87522: function(o, s, n) {
        var l = n(71293).wrap;
        o.exports = function() {
          return l({});
        };
      }, 18426: function(o) {
        o.exports = { cellPad: 8, columnExtentOffset: 10, columnTitleOffset: 28, emptyHeaderHeight: 16, latexCheck: /^\$.*\$$/, goldenRatio: 1.618, lineBreaker: "<br>", maxDimensionCount: 60, overdrag: 45, releaseTransitionDuration: 120, releaseTransitionEase: "cubic-out", scrollbarCaptureWidth: 18, scrollbarHideDelay: 1e3, scrollbarHideDuration: 1e3, scrollbarOffset: 5, scrollbarWidth: 8, transitionDuration: 100, transitionEase: "cubic-out", uplift: 5, wrapSpacer: " ", wrapSplitCharacter: " ", cn: { table: "table", tableControlView: "table-control-view", scrollBackground: "scroll-background", yColumn: "y-column", columnBlock: "column-block", scrollAreaClip: "scroll-area-clip", scrollAreaClipRect: "scroll-area-clip-rect", columnBoundary: "column-boundary", columnBoundaryClippath: "column-boundary-clippath", columnBoundaryRect: "column-boundary-rect", columnCells: "column-cells", columnCell: "column-cell", cellRect: "cell-rect", cellText: "cell-text", cellTextHolder: "cell-text-holder", scrollbarKit: "scrollbar-kit", scrollbar: "scrollbar", scrollbarSlider: "scrollbar-slider", scrollbarGlyph: "scrollbar-glyph", scrollbarCaptureZone: "scrollbar-capture-zone" } };
      }, 21908: function(o, s, n) {
        var l = n(18426), u = n(93049).extendFlat, i = n(10721), h = n(87800).isTypedArray, p = n(87800).isArrayOrTypedArray;
        function _(w) {
          if (p(w)) {
            for (var k = 0, S = 0; S < w.length; S++) k = Math.max(k, _(w[S]));
            return k;
          }
          return w;
        }
        function d(w, k) {
          return w + k;
        }
        function f(w) {
          var k, S = w.slice(), A = 1 / 0, C = 0;
          for (k = 0; k < S.length; k++) h(S[k]) ? S[k] = Array.from(S[k]) : p(S[k]) || (S[k] = [S[k]]), A = Math.min(A, S[k].length), C = Math.max(C, S[k].length);
          if (A !== C) for (k = 0; k < S.length; k++) {
            var D = C - S[k].length;
            D && (S[k] = S[k].concat(c(D)));
          }
          return S;
        }
        function c(w) {
          for (var k = new Array(w), S = 0; S < w; S++) k[S] = "";
          return k;
        }
        function g(w) {
          return w.calcdata.columns.reduce(function(k, S) {
            return S.xIndex < w.xIndex ? k + S.columnWidth : k;
          }, 0);
        }
        function m(w, k) {
          return Object.keys(w).map(function(S) {
            return u({}, w[S], { auxiliaryBlocks: k });
          });
        }
        function x(w, k) {
          for (var S, A = {}, C = 0, D = 0, L = { firstRowIndex: null, lastRowIndex: null, rows: [] }, E = 0, P = 0, I = 0; I < w.length; I++) S = w[I], L.rows.push({ rowIndex: I, rowHeight: S }), ((D += S) >= k || I === w.length - 1) && (A[C] = L, L.key = P++, L.firstRowIndex = E, L.lastRowIndex = I, L = { firstRowIndex: null, lastRowIndex: null, rows: [] }, C += D, E = I + 1, D = 0);
          return A;
        }
        o.exports = function(w, k) {
          var S = f(k.cells.values), A = function(Y) {
            return Y.slice(k.header.values.length, Y.length);
          }, C = f(k.header.values);
          C.length && !C[0].length && (C[0] = [""], C = f(C));
          var D = C.concat(A(S).map(function() {
            return c((C[0] || [""]).length);
          })), L = k.domain, E = Math.floor(w._fullLayout._size.w * (L.x[1] - L.x[0])), P = Math.floor(w._fullLayout._size.h * (L.y[1] - L.y[0])), I = k.header.values.length ? D[0].map(function() {
            return k.header.height;
          }) : [l.emptyHeaderHeight], M = S.length ? S[0].map(function() {
            return k.cells.height;
          }) : [], O = I.reduce(d, 0), T = x(M, P - O + l.uplift), z = m(x(I, O), []), F = m(T, z), U = {}, V = k._fullInput.columnorder;
          p(V) && (V = Array.from(V)), V = V.concat(A(S.map(function(Y, te) {
            return te;
          })));
          var $ = D.map(function(Y, te) {
            var ee = p(k.columnwidth) ? k.columnwidth[Math.min(te, k.columnwidth.length - 1)] : k.columnwidth;
            return i(ee) ? Number(ee) : 1;
          }), q = $.reduce(d, 0);
          $ = $.map(function(Y) {
            return Y / q * E;
          });
          var K = Math.max(_(k.header.line.width), _(k.cells.line.width)), re = { key: k.uid + w._context.staticPlot, translateX: L.x[0] * w._fullLayout._size.w, translateY: w._fullLayout._size.h * (1 - L.y[1]), size: w._fullLayout._size, width: E, maxLineWidth: K, height: P, columnOrder: V, groupHeight: P, rowBlocks: F, headerRowBlocks: z, scrollY: 0, cells: u({}, k.cells, { values: S }), headerCells: u({}, k.header, { values: D }), gdColumns: D.map(function(Y) {
            return Y[0];
          }), gdColumnsOriginalOrder: D.map(function(Y) {
            return Y[0];
          }), prevPages: [0, 0], scrollbarState: { scrollbarScrollInProgress: !1 }, columns: D.map(function(Y, te) {
            var ee = U[Y];
            return U[Y] = (ee || 0) + 1, { key: Y + "__" + U[Y], label: Y, specIndex: te, xIndex: V[te], xScale: g, x: void 0, calcdata: void 0, columnWidth: $[te] };
          }) };
          return re.columns.forEach(function(Y) {
            Y.calcdata = re, Y.x = g(Y);
          }), re;
        };
      }, 49618: function(o, s, n) {
        var l = n(93049).extendFlat;
        s.splitToPanels = function(u) {
          var i = [0, 0], h = l({}, u, { key: "header", type: "header", page: 0, prevPages: i, currentRepaint: [null, null], dragHandle: !0, values: u.calcdata.headerCells.values[u.specIndex], rowBlocks: u.calcdata.headerRowBlocks, calcdata: l({}, u.calcdata, { cells: u.calcdata.headerCells }) });
          return [l({}, u, { key: "cells1", type: "cells", page: 0, prevPages: i, currentRepaint: [null, null], dragHandle: !1, values: u.calcdata.cells.values[u.specIndex], rowBlocks: u.calcdata.rowBlocks }), l({}, u, { key: "cells2", type: "cells", page: 1, prevPages: i, currentRepaint: [null, null], dragHandle: !1, values: u.calcdata.cells.values[u.specIndex], rowBlocks: u.calcdata.rowBlocks }), h];
        }, s.splitToCells = function(u) {
          var i = function(h) {
            var p = h.rowBlocks[h.page], _ = p ? p.rows[0].rowIndex : 0;
            return [_, p ? _ + p.rows.length : 0];
          }(u);
          return (u.values || []).slice(i[0], i[1]).map(function(h, p) {
            return { keyWithinBlock: p + (typeof h == "string" && h.match(/[<$&> ]/) ? "_keybuster_" + Math.random() : ""), key: i[0] + p, column: u, calcdata: u.calcdata, page: u.page, rowBlocks: u.rowBlocks, value: h };
          });
        };
      }, 23281: function(o, s, n) {
        var l = n(34809), u = n(92294), i = n(13792).N;
        o.exports = function(h, p, _, d) {
          function f(c, g) {
            return l.coerce(h, p, u, c, g);
          }
          i(p, d, f), f("columnwidth"), f("header.values"), f("header.format"), f("header.align"), f("header.prefix"), f("header.suffix"), f("header.height"), f("header.line.width"), f("header.line.color"), f("header.fill.color"), l.coerceFont(f, "header.font", d.font), function(c, g) {
            for (var m = c.columnorder || [], x = c.header.values.length, w = m.slice(0, x), k = w.slice().sort(function(C, D) {
              return C - D;
            }), S = w.map(function(C) {
              return k.indexOf(C);
            }), A = S.length; A < x; A++) S.push(A);
            g("columnorder", S);
          }(p, f), f("cells.values"), f("cells.format"), f("cells.align"), f("cells.prefix"), f("cells.suffix"), f("cells.height"), f("cells.line.width"), f("cells.line.color"), f("cells.fill.color"), l.coerceFont(f, "cells.font", d.font), p._length = null;
        };
      }, 51671: function(o, s, n) {
        o.exports = { attributes: n(92294), supplyDefaults: n(23281), calc: n(87522), plot: n(84576), moduleType: "trace", name: "table", basePlotModule: n(82662), categories: ["noOpacity"], meta: {} };
      }, 84576: function(o, s, n) {
        var l = n(18426), u = n(45568), i = n(34809), h = i.numberFormat, p = n(71293), _ = n(62203), d = n(30635), f = n(34809).raiseToTop, c = n(34809).strTranslate, g = n(34809).cancelTransition, m = n(21908), x = n(49618), w = n(78766);
        function k(Q) {
          return Math.ceil(Q.calcdata.maxLineWidth / 2);
        }
        function S(Q, ue) {
          return "clip" + Q._fullLayout._uid + "_scrollAreaBottomClip_" + ue.key;
        }
        function A(Q, ue) {
          return "clip" + Q._fullLayout._uid + "_columnBoundaryClippath_" + ue.calcdata.key + "_" + ue.specIndex;
        }
        function C(Q) {
          return [].concat.apply([], Q.map(function(ue) {
            return ue;
          })).map(function(ue) {
            return ue.__data__;
          });
        }
        function D(Q, ue, ce) {
          var he = Q.selectAll("." + l.cn.scrollbarKit).data(p.repeat, p.keyFun);
          he.enter().append("g").classed(l.cn.scrollbarKit, !0).style("shape-rendering", "geometricPrecision"), he.each(function(me) {
            var ye = me.scrollbarState;
            ye.totalHeight = function(pe) {
              var be = pe.rowBlocks;
              return Y(be, be.length - 1) + (be.length ? te(be[be.length - 1], 1 / 0) : 1);
            }(me), ye.scrollableAreaHeight = me.groupHeight - z(me), ye.currentlyVisibleHeight = Math.min(ye.totalHeight, ye.scrollableAreaHeight), ye.ratio = ye.currentlyVisibleHeight / ye.totalHeight, ye.barLength = Math.max(ye.ratio * ye.currentlyVisibleHeight, l.goldenRatio * l.scrollbarWidth), ye.barWiggleRoom = ye.currentlyVisibleHeight - ye.barLength, ye.wiggleRoom = Math.max(0, ye.totalHeight - ye.scrollableAreaHeight), ye.topY = ye.barWiggleRoom === 0 ? 0 : me.scrollY / ye.wiggleRoom * ye.barWiggleRoom, ye.bottomY = ye.topY + ye.barLength, ye.dragMultiplier = ye.wiggleRoom / ye.barWiggleRoom;
          }).attr("transform", function(me) {
            var ye = me.width + l.scrollbarWidth / 2 + l.scrollbarOffset;
            return c(ye, z(me));
          });
          var de = he.selectAll("." + l.cn.scrollbar).data(p.repeat, p.keyFun);
          de.enter().append("g").classed(l.cn.scrollbar, !0);
          var ne = de.selectAll("." + l.cn.scrollbarSlider).data(p.repeat, p.keyFun);
          ne.enter().append("g").classed(l.cn.scrollbarSlider, !0), ne.attr("transform", function(me) {
            return c(0, me.scrollbarState.topY || 0);
          });
          var ae = ne.selectAll("." + l.cn.scrollbarGlyph).data(p.repeat, p.keyFun);
          ae.enter().append("line").classed(l.cn.scrollbarGlyph, !0).attr("stroke", "black").attr("stroke-width", l.scrollbarWidth).attr("stroke-linecap", "round").attr("y1", l.scrollbarWidth / 2), ae.attr("y2", function(me) {
            return me.scrollbarState.barLength - l.scrollbarWidth / 2;
          }).attr("stroke-opacity", function(me) {
            return me.columnDragInProgress || !me.scrollbarState.barWiggleRoom || ce ? 0 : 0.4;
          }), ae.transition().delay(0).duration(0), ae.transition().delay(l.scrollbarHideDelay).duration(l.scrollbarHideDuration).attr("stroke-opacity", 0);
          var se = de.selectAll("." + l.cn.scrollbarCaptureZone).data(p.repeat, p.keyFun);
          se.enter().append("line").classed(l.cn.scrollbarCaptureZone, !0).attr("stroke", "white").attr("stroke-opacity", 0.01).attr("stroke-width", l.scrollbarCaptureWidth).attr("stroke-linecap", "butt").attr("y1", 0).on("mousedown", function(me) {
            var ye = u.event.y, pe = this.getBoundingClientRect(), be = me.scrollbarState, Ae = ye - pe.top, Se = u.scale.linear().domain([0, be.scrollableAreaHeight]).range([0, be.totalHeight]).clamp(!0);
            be.topY <= Ae && Ae <= be.bottomY || U(ue, Q, null, Se(Ae - be.barLength / 2))(me);
          }).call(u.behavior.drag().origin(function(me) {
            return u.event.stopPropagation(), me.scrollbarState.scrollbarScrollInProgress = !0, me;
          }).on("drag", U(ue, Q)).on("dragend", function() {
          })), se.attr("y2", function(me) {
            return me.scrollbarState.scrollableAreaHeight;
          }), ue._context.staticPlot && (ae.remove(), se.remove());
        }
        function L(Q, ue, ce, he) {
          var de = function(ye) {
            var pe = ye.selectAll("." + l.cn.columnCells).data(p.repeat, p.keyFun);
            return pe.enter().append("g").classed(l.cn.columnCells, !0), pe.exit().remove(), pe;
          }(ce), ne = function(ye) {
            var pe = ye.selectAll("." + l.cn.columnCell).data(x.splitToCells, function(be) {
              return be.keyWithinBlock;
            });
            return pe.enter().append("g").classed(l.cn.columnCell, !0), pe.exit().remove(), pe;
          }(de);
          (function(ye) {
            ye.each(function(pe, be) {
              var Ae = pe.calcdata.cells.font, Se = pe.column.specIndex, Me = { size: I(Ae.size, Se, be), color: I(Ae.color, Se, be), family: I(Ae.family, Se, be), weight: I(Ae.weight, Se, be), style: I(Ae.style, Se, be), variant: I(Ae.variant, Se, be), textcase: I(Ae.textcase, Se, be), lineposition: I(Ae.lineposition, Se, be), shadow: I(Ae.shadow, Se, be) };
              pe.rowNumber = pe.key, pe.align = I(pe.calcdata.cells.align, Se, be), pe.cellBorderWidth = I(pe.calcdata.cells.line.width, Se, be), pe.font = Me;
            });
          })(ne);
          var ae = function(ye) {
            var pe = ye.selectAll("." + l.cn.cellRect).data(p.repeat, function(be) {
              return be.keyWithinBlock;
            });
            return pe.enter().append("rect").classed(l.cn.cellRect, !0), pe;
          }(ne);
          (function(ye) {
            ye.attr("width", function(pe) {
              return pe.column.columnWidth;
            }).attr("stroke-width", function(pe) {
              return pe.cellBorderWidth;
            }).each(function(pe) {
              var be = u.select(this);
              w.stroke(be, I(pe.calcdata.cells.line.color, pe.column.specIndex, pe.rowNumber)), w.fill(be, I(pe.calcdata.cells.fill.color, pe.column.specIndex, pe.rowNumber));
            });
          })(ae);
          var se = function(ye) {
            var pe = ye.selectAll("." + l.cn.cellTextHolder).data(p.repeat, function(be) {
              return be.keyWithinBlock;
            });
            return pe.enter().append("g").classed(l.cn.cellTextHolder, !0).style("shape-rendering", "geometricPrecision"), pe;
          }(ne), me = function(ye) {
            var pe = ye.selectAll("." + l.cn.cellText).data(p.repeat, function(be) {
              return be.keyWithinBlock;
            });
            return pe.enter().append("text").classed(l.cn.cellText, !0).style("cursor", function() {
              return "auto";
            }).on("mousedown", function() {
              u.event.stopPropagation();
            }), pe;
          }(se);
          (function(ye) {
            ye.each(function(pe) {
              _.font(u.select(this), pe.font);
            });
          })(me), E(me, ue, he, Q), re(ne);
        }
        function E(Q, ue, ce, he) {
          Q.text(function(de) {
            var ne = de.column.specIndex, ae = de.rowNumber, se = de.value, me = typeof se == "string", ye = me && se.match(/<br>/i), pe = !me || ye;
            de.mayHaveMarkup = me && se.match(/[<&>]/);
            var be, Ae = typeof (be = se) == "string" && be.match(l.latexCheck);
            de.latex = Ae;
            var Se, Me, De = Ae ? "" : I(de.calcdata.cells.prefix, ne, ae) || "", Le = Ae ? "" : I(de.calcdata.cells.suffix, ne, ae) || "", We = Ae ? null : I(de.calcdata.cells.format, ne, ae) || null, Ee = De + (We ? h(We)(de.value) : de.value) + Le;
            if (de.wrappingNeeded = !de.wrapped && !pe && !Ae && (Se = P(Ee)), de.cellHeightMayIncrease = ye || Ae || de.mayHaveMarkup || (Se === void 0 ? P(Ee) : Se), de.needsConvertToTspans = de.mayHaveMarkup || de.wrappingNeeded || de.latex, de.wrappingNeeded) {
              var Ne = (l.wrapSplitCharacter === " " ? Ee.replace(/<a href=/gi, "<a_href=") : Ee).split(l.wrapSplitCharacter), Ie = l.wrapSplitCharacter === " " ? Ne.map(function(ge) {
                return ge.replace(/<a_href=/gi, "<a href=");
              }) : Ne;
              de.fragments = Ie.map(function(ge) {
                return { text: ge, width: null };
              }), de.fragments.push({ fragment: l.wrapSpacer, width: null }), Me = Ie.join(l.lineBreaker) + l.lineBreaker + l.wrapSpacer;
            } else delete de.fragments, Me = Ee;
            return Me;
          }).attr("dy", function(de) {
            return de.needsConvertToTspans ? 0 : "0.75em";
          }).each(function(de) {
            var ne = this, ae = u.select(ne), se = de.wrappingNeeded ? $ : q;
            de.needsConvertToTspans ? d.convertToTspans(ae, he, se(ce, ne, ue, he, de)) : u.select(ne.parentNode).attr("transform", function(me) {
              return c(K(me), l.cellPad);
            }).attr("text-anchor", function(me) {
              return { left: "start", center: "middle", right: "end" }[me.align];
            });
          });
        }
        function P(Q) {
          return Q.indexOf(l.wrapSplitCharacter) !== -1;
        }
        function I(Q, ue, ce) {
          if (i.isArrayOrTypedArray(Q)) {
            var he = Q[Math.min(ue, Q.length - 1)];
            return i.isArrayOrTypedArray(he) ? he[Math.min(ce, he.length - 1)] : he;
          }
          return Q;
        }
        function M(Q, ue, ce) {
          Q.transition().ease(l.releaseTransitionEase).duration(l.releaseTransitionDuration).attr("transform", c(ue.x, ce));
        }
        function O(Q) {
          return Q.type === "cells";
        }
        function T(Q) {
          return Q.type === "header";
        }
        function z(Q) {
          return (Q.rowBlocks.length ? Q.rowBlocks[0].auxiliaryBlocks : []).reduce(function(ue, ce) {
            return ue + te(ce, 1 / 0);
          }, 0);
        }
        function F(Q, ue, ce) {
          var he = C(ue)[0];
          if (he !== void 0) {
            var de = he.rowBlocks, ne = he.calcdata, ae = Y(de, de.length), se = he.calcdata.groupHeight - z(he), me = ne.scrollY = Math.max(0, Math.min(ae - se, ne.scrollY)), ye = function(pe, be, Ae) {
              for (var Se = [], Me = 0, De = 0; De < pe.length; De++) {
                for (var Le = pe[De], We = Le.rows, Ee = 0, Ne = 0; Ne < We.length; Ne++) Ee += We[Ne].rowHeight;
                Le.allRowsHeight = Ee, be < Me + Ee && be + Ae > Me && Se.push(De), Me += Ee;
              }
              return Se;
            }(de, me, se);
            ye.length === 1 && (ye[0] === de.length - 1 ? ye.unshift(ye[0] - 1) : ye.push(ye[0] + 1)), ye[0] % 2 && ye.reverse(), ue.each(function(pe, be) {
              pe.page = ye[be], pe.scrollY = me;
            }), ue.attr("transform", function(pe) {
              var be = Y(pe.rowBlocks, pe.page) - pe.scrollY;
              return c(0, be);
            }), Q && (V(Q, ce, ue, ye, he.prevPages, he, 0), V(Q, ce, ue, ye, he.prevPages, he, 1), D(ce, Q));
          }
        }
        function U(Q, ue, ce, he) {
          return function(de) {
            var ne = de.calcdata ? de.calcdata : de, ae = ue.filter(function(pe) {
              return ne.key === pe.key;
            }), se = ce || ne.scrollbarState.dragMultiplier, me = ne.scrollY;
            ne.scrollY = he === void 0 ? ne.scrollY + se * u.event.dy : he;
            var ye = ae.selectAll("." + l.cn.yColumn).selectAll("." + l.cn.columnBlock).filter(O);
            return F(Q, ye, ae), ne.scrollY === me;
          };
        }
        function V(Q, ue, ce, he, de, ne, ae) {
          he[ae] !== de[ae] && (clearTimeout(ne.currentRepaint[ae]), ne.currentRepaint[ae] = setTimeout(function() {
            var se = ce.filter(function(me, ye) {
              return ye === ae && he[ye] !== de[ye];
            });
            L(Q, ue, se, ce), de[ae] = he[ae];
          }));
        }
        function $(Q, ue, ce, he) {
          return function() {
            var de = u.select(ue.parentNode);
            de.each(function(ne) {
              var ae = ne.fragments;
              de.selectAll("tspan.line").each(function(Me, De) {
                ae[De].width = this.getComputedTextLength();
              });
              var se, me, ye = ae[ae.length - 1].width, pe = ae.slice(0, -1), be = [], Ae = 0, Se = ne.column.columnWidth - 2 * l.cellPad;
              for (ne.value = ""; pe.length; ) Ae + (me = (se = pe.shift()).width + ye) > Se && (ne.value += be.join(l.wrapSpacer) + l.lineBreaker, be = [], Ae = 0), be.push(se.text), Ae += me;
              Ae && (ne.value += be.join(l.wrapSpacer)), ne.wrapped = !0;
            }), de.selectAll("tspan.line").remove(), E(de.select("." + l.cn.cellText), ce, Q, he), u.select(ue.parentNode.parentNode).call(re);
          };
        }
        function q(Q, ue, ce, he, de) {
          return function() {
            if (!de.settledY) {
              var ne = u.select(ue.parentNode), ae = X(de), se = de.key - ae.firstRowIndex, me = ae.rows[se].rowHeight, ye = de.cellHeightMayIncrease ? ue.parentNode.getBoundingClientRect().height + 2 * l.cellPad : me, pe = Math.max(ye, me);
              pe - ae.rows[se].rowHeight && (ae.rows[se].rowHeight = pe, Q.selectAll("." + l.cn.columnCell).call(re), F(null, Q.filter(O), 0), D(ce, he, !0)), ne.attr("transform", function() {
                var be = this, Ae = be.parentNode.getBoundingClientRect(), Se = u.select(be.parentNode).select("." + l.cn.cellRect).node().getBoundingClientRect(), Me = be.transform.baseVal.consolidate(), De = Se.top - Ae.top + (Me ? Me.matrix.f : l.cellPad);
                return c(K(de, u.select(be.parentNode).select("." + l.cn.cellTextHolder).node().getBoundingClientRect().width), De);
              }), de.settledY = !0;
            }
          };
        }
        function K(Q, ue) {
          switch (Q.align) {
            case "left":
            default:
              return l.cellPad;
            case "right":
              return Q.column.columnWidth - (ue || 0) - l.cellPad;
            case "center":
              return (Q.column.columnWidth - (ue || 0)) / 2;
          }
        }
        function re(Q) {
          Q.attr("transform", function(ue) {
            var ce = ue.rowBlocks[0].auxiliaryBlocks.reduce(function(de, ne) {
              return de + te(ne, 1 / 0);
            }, 0), he = te(X(ue), ue.key);
            return c(0, he + ce);
          }).selectAll("." + l.cn.cellRect).attr("height", function(ue) {
            return (ce = X(ue), he = ue.key, ce.rows[he - ce.firstRowIndex]).rowHeight;
            var ce, he;
          });
        }
        function Y(Q, ue) {
          for (var ce = 0, he = ue - 1; he >= 0; he--) ce += ee(Q[he]);
          return ce;
        }
        function te(Q, ue) {
          for (var ce = 0, he = 0; he < Q.rows.length && Q.rows[he].rowIndex < ue; he++) ce += Q.rows[he].rowHeight;
          return ce;
        }
        function ee(Q) {
          var ue = Q.allRowsHeight;
          if (ue !== void 0) return ue;
          for (var ce = 0, he = 0; he < Q.rows.length; he++) ce += Q.rows[he].rowHeight;
          return Q.allRowsHeight = ce, ce;
        }
        function X(Q) {
          return Q.rowBlocks[Q.page];
        }
        o.exports = function(Q, ue) {
          var ce = !Q._context.staticPlot, he = Q._fullLayout._paper.selectAll("." + l.cn.table).data(ue.map(function(Le) {
            var We = p.unwrap(Le).trace;
            return m(Q, We);
          }), p.keyFun);
          he.exit().remove(), he.enter().append("g").classed(l.cn.table, !0).attr("overflow", "visible").style("box-sizing", "content-box").style("position", "absolute").style("left", 0).style("overflow", "visible").style("shape-rendering", "crispEdges").style("pointer-events", "all"), he.attr("width", function(Le) {
            return Le.width + Le.size.l + Le.size.r;
          }).attr("height", function(Le) {
            return Le.height + Le.size.t + Le.size.b;
          }).attr("transform", function(Le) {
            return c(Le.translateX, Le.translateY);
          });
          var de = he.selectAll("." + l.cn.tableControlView).data(p.repeat, p.keyFun), ne = de.enter().append("g").classed(l.cn.tableControlView, !0).style("box-sizing", "content-box");
          if (ce) {
            var ae = "onwheel" in document ? "wheel" : "mousewheel";
            ne.on("mousemove", function(Le) {
              de.filter(function(We) {
                return Le === We;
              }).call(D, Q);
            }).on(ae, function(Le) {
              if (!Le.scrollbarState.wheeling) {
                Le.scrollbarState.wheeling = !0;
                var We = Le.scrollY + u.event.deltaY;
                U(Q, de, null, We)(Le) || (u.event.stopPropagation(), u.event.preventDefault()), Le.scrollbarState.wheeling = !1;
              }
            }).call(D, Q, !0);
          }
          de.attr("transform", function(Le) {
            return c(Le.size.l, Le.size.t);
          });
          var se = de.selectAll("." + l.cn.scrollBackground).data(p.repeat, p.keyFun);
          se.enter().append("rect").classed(l.cn.scrollBackground, !0).attr("fill", "none"), se.attr("width", function(Le) {
            return Le.width;
          }).attr("height", function(Le) {
            return Le.height;
          }), de.each(function(Le) {
            _.setClipUrl(u.select(this), S(Q, Le), Q);
          });
          var me = de.selectAll("." + l.cn.yColumn).data(function(Le) {
            return Le.columns;
          }, p.keyFun);
          me.enter().append("g").classed(l.cn.yColumn, !0), me.exit().remove(), me.attr("transform", function(Le) {
            return c(Le.x, 0);
          }), ce && me.call(u.behavior.drag().origin(function(Le) {
            return M(u.select(this), Le, -l.uplift), f(this), Le.calcdata.columnDragInProgress = !0, D(de.filter(function(We) {
              return Le.calcdata.key === We.key;
            }), Q), Le;
          }).on("drag", function(Le) {
            var We = u.select(this), Ee = function(Ne) {
              return (Le === Ne ? u.event.x : Ne.x) + Ne.columnWidth / 2;
            };
            Le.x = Math.max(-l.overdrag, Math.min(Le.calcdata.width + l.overdrag - Le.columnWidth, u.event.x)), C(me).filter(function(Ne) {
              return Ne.calcdata.key === Le.calcdata.key;
            }).sort(function(Ne, Ie) {
              return Ee(Ne) - Ee(Ie);
            }).forEach(function(Ne, Ie) {
              Ne.xIndex = Ie, Ne.x = Le === Ne ? Ne.x : Ne.xScale(Ne);
            }), me.filter(function(Ne) {
              return Le !== Ne;
            }).transition().ease(l.transitionEase).duration(l.transitionDuration).attr("transform", function(Ne) {
              return c(Ne.x, 0);
            }), We.call(g).attr("transform", c(Le.x, -l.uplift));
          }).on("dragend", function(Le) {
            var We = u.select(this), Ee = Le.calcdata;
            Le.x = Le.xScale(Le), Le.calcdata.columnDragInProgress = !1, M(We, Le, 0), function(Ne, Ie, ge) {
              var Ce = Ie.gdColumnsOriginalOrder;
              Ie.gdColumns.sort(function(we, Ge) {
                return ge[Ce.indexOf(we)] - ge[Ce.indexOf(Ge)];
              }), Ie.columnorder = ge, Ne.emit("plotly_restyle");
            }(Q, Ee, Ee.columns.map(function(Ne) {
              return Ne.xIndex;
            }));
          })), me.each(function(Le) {
            _.setClipUrl(u.select(this), A(Q, Le), Q);
          });
          var ye = me.selectAll("." + l.cn.columnBlock).data(x.splitToPanels, p.keyFun);
          ye.enter().append("g").classed(l.cn.columnBlock, !0).attr("id", function(Le) {
            return Le.key;
          }), ye.style("cursor", function(Le) {
            return Le.dragHandle ? "ew-resize" : Le.calcdata.scrollbarState.barWiggleRoom ? "ns-resize" : "default";
          });
          var pe = ye.filter(T), be = ye.filter(O);
          ce && be.call(u.behavior.drag().origin(function(Le) {
            return u.event.stopPropagation(), Le;
          }).on("drag", U(Q, de, -1)).on("dragend", function() {
          })), L(Q, de, pe, ye), L(Q, de, be, ye);
          var Ae = de.selectAll("." + l.cn.scrollAreaClip).data(p.repeat, p.keyFun);
          Ae.enter().append("clipPath").classed(l.cn.scrollAreaClip, !0).attr("id", function(Le) {
            return S(Q, Le);
          });
          var Se = Ae.selectAll("." + l.cn.scrollAreaClipRect).data(p.repeat, p.keyFun);
          Se.enter().append("rect").classed(l.cn.scrollAreaClipRect, !0).attr("x", -l.overdrag).attr("y", -l.uplift).attr("fill", "none"), Se.attr("width", function(Le) {
            return Le.width + 2 * l.overdrag;
          }).attr("height", function(Le) {
            return Le.height + l.uplift;
          }), me.selectAll("." + l.cn.columnBoundary).data(p.repeat, p.keyFun).enter().append("g").classed(l.cn.columnBoundary, !0);
          var Me = me.selectAll("." + l.cn.columnBoundaryClippath).data(p.repeat, p.keyFun);
          Me.enter().append("clipPath").classed(l.cn.columnBoundaryClippath, !0), Me.attr("id", function(Le) {
            return A(Q, Le);
          });
          var De = Me.selectAll("." + l.cn.columnBoundaryRect).data(p.repeat, p.keyFun);
          De.enter().append("rect").classed(l.cn.columnBoundaryRect, !0).attr("fill", "none"), De.attr("width", function(Le) {
            return Le.columnWidth + 2 * k(Le);
          }).attr("height", function(Le) {
            return Le.calcdata.height + 2 * k(Le) + l.uplift;
          }).attr("x", function(Le) {
            return -k(Le);
          }).attr("y", function(Le) {
            return -k(Le);
          }), F(null, be, de);
        };
      }, 71856: function(o, s, n) {
        var l = n(3208).rb, u = n(3208).ay, i = n(87163), h = n(13792).u, p = n(55412), _ = n(56708), d = n(43236), f = n(93049).extendFlat, c = n(94850).k;
        o.exports = { labels: _.labels, parents: _.parents, values: _.values, branchvalues: _.branchvalues, count: _.count, level: _.level, maxdepth: _.maxdepth, tiling: { packing: { valType: "enumerated", values: ["squarify", "binary", "dice", "slice", "slice-dice", "dice-slice"], dflt: "squarify", editType: "plot" }, squarifyratio: { valType: "number", min: 1, dflt: 1, editType: "plot" }, flip: { valType: "flaglist", flags: ["x", "y"], dflt: "", editType: "plot" }, pad: { valType: "number", min: 0, dflt: 3, editType: "plot" }, editType: "calc" }, marker: f({ pad: { t: { valType: "number", min: 0, editType: "plot" }, l: { valType: "number", min: 0, editType: "plot" }, r: { valType: "number", min: 0, editType: "plot" }, b: { valType: "number", min: 0, editType: "plot" }, editType: "calc" }, colors: _.marker.colors, pattern: c, depthfade: { valType: "enumerated", values: [!0, !1, "reversed"], editType: "style" }, line: _.marker.line, cornerradius: { valType: "number", min: 0, dflt: 0, editType: "plot" }, editType: "calc" }, i("marker", { colorAttr: "colors", anim: !1 })), pathbar: { visible: { valType: "boolean", dflt: !0, editType: "plot" }, side: { valType: "enumerated", values: ["top", "bottom"], dflt: "top", editType: "plot" }, edgeshape: { valType: "enumerated", values: [">", "<", "|", "/", "\\"], dflt: ">", editType: "plot" }, thickness: { valType: "number", min: 12, editType: "plot" }, textfont: f({}, p.textfont, {}), editType: "calc" }, text: p.text, textinfo: _.textinfo, texttemplate: u({ editType: "plot" }, { keys: d.eventDataKeys.concat(["label", "value"]) }), hovertext: p.hovertext, hoverinfo: _.hoverinfo, hovertemplate: l({}, { keys: d.eventDataKeys }), textfont: p.textfont, insidetextfont: p.insidetextfont, outsidetextfont: f({}, p.outsidetextfont, {}), textposition: { valType: "enumerated", values: ["top left", "top center", "top right", "middle left", "middle center", "middle right", "bottom left", "bottom center", "bottom right"], dflt: "top left", editType: "plot" }, sort: p.sort, root: _.root, domain: h({ name: "treemap", trace: !0, editType: "calc" }) };
      }, 69784: function(o, s, n) {
        var l = n(44122);
        s.name = "treemap", s.plot = function(u, i, h, p) {
          l.plotBasePlot(s.name, u, i, h, p);
        }, s.clean = function(u, i, h, p) {
          l.cleanBasePlot(s.name, u, i, h, p);
        };
      }, 38848: function(o, s, n) {
        var l = n(14852);
        s._ = function(u, i) {
          return l.calc(u, i);
        }, s.t = function(u) {
          return l._runCrossTraceCalc("treemap", u);
        };
      }, 43236: function(o) {
        o.exports = { CLICK_TRANSITION_TIME: 750, CLICK_TRANSITION_EASING: "poly", eventDataKeys: ["currentPath", "root", "entry", "percentRoot", "percentEntry", "percentParent"], gapWithPathbar: 1 };
      }, 95719: function(o, s, n) {
        var l = n(34809), u = n(71856), i = n(78766), h = n(13792).N, p = n(17550).handleText, _ = n(56155).TEXTPAD, d = n(46979).handleMarkerDefaults, f = n(88856), c = f.hasColorscale, g = f.handleDefaults;
        o.exports = function(m, x, w, k) {
          function S(M, O) {
            return l.coerce(m, x, u, M, O);
          }
          var A = S("labels"), C = S("parents");
          if (A && A.length && C && C.length) {
            var D = S("values");
            D && D.length ? S("branchvalues") : S("count"), S("level"), S("maxdepth"), S("tiling.packing") === "squarify" && S("tiling.squarifyratio"), S("tiling.flip"), S("tiling.pad");
            var L = S("text");
            S("texttemplate"), x.texttemplate || S("textinfo", l.isArrayOrTypedArray(L) ? "text+label" : "label"), S("hovertext"), S("hovertemplate");
            var E = S("pathbar.visible");
            p(m, x, k, S, "auto", { hasPathbar: E, moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !1, moduleHasCliponaxis: !1, moduleHasTextangle: !1, moduleHasInsideanchor: !1 }), S("textposition");
            var P = x.textposition.indexOf("bottom") !== -1;
            d(m, x, k, S), (x._hasColorscale = c(m, "marker", "colors") || (m.marker || {}).coloraxis) ? g(m, x, k, S, { prefix: "marker.", cLetter: "c" }) : S("marker.depthfade", !(x.marker.colors || []).length);
            var I = 2 * x.textfont.size;
            S("marker.pad.t", P ? I / 4 : I), S("marker.pad.l", I / 4), S("marker.pad.r", I / 4), S("marker.pad.b", P ? I : I / 4), S("marker.cornerradius"), x._hovered = { marker: { line: { width: 2, color: i.contrast(k.paper_bgcolor) } } }, E && (S("pathbar.thickness", x.pathbar.textfont.size + 2 * _), S("pathbar.side"), S("pathbar.edgeshape")), S("sort"), S("root.color"), h(x, k, S), x._length = null;
          } else x.visible = !1;
        };
      }, 41567: function(o, s, n) {
        var l = n(45568), u = n(33108), i = n(84102).clearMinTextSize, h = n(6851).resizeText, p = n(95709);
        o.exports = function(_, d, f, c, g) {
          var m, x, w = g.type, k = g.drawDescendants, S = _._fullLayout, A = S["_" + w + "layer"], C = !f;
          i(w, S), (m = A.selectAll("g.trace." + w).data(d, function(D) {
            return D[0].trace.uid;
          })).enter().append("g").classed("trace", !0).classed(w, !0), m.order(), !S.uniformtext.mode && u.hasTransition(f) ? (c && (x = c()), l.transition().duration(f.duration).ease(f.easing).each("end", function() {
            x && x();
          }).each("interrupt", function() {
            x && x();
          }).each(function() {
            A.selectAll("g.trace").each(function(D) {
              p(_, D, this, f, k);
            });
          })) : (m.each(function(D) {
            p(_, D, this, f, k);
          }), S.uniformtext.mode && h(_, A.selectAll(".trace"), w)), C && m.exit().remove();
        };
      }, 17010: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(30635), p = n(11995), _ = n(92080).styleOne, d = n(43236), f = n(33108), c = n(44691), g = !0;
        o.exports = function(m, x, w, k, S) {
          var A = S.barDifY, C = S.width, D = S.height, L = S.viewX, E = S.viewY, P = S.pathSlice, I = S.toMoveInsideSlice, M = S.strTransform, O = S.hasTransition, T = S.handleSlicesExit, z = S.makeUpdateSliceInterpolator, F = S.makeUpdateTextInterpolator, U = {}, V = m._context.staticPlot, $ = m._fullLayout, q = x[0], K = q.trace, re = q.hierarchy, Y = C / K._entryDepth, te = f.listPath(w.data, "id"), ee = p(re.copy(), [C, D], { packing: "dice", pad: { inner: 0, top: 0, left: 0, right: 0, bottom: 0 } }).descendants();
          (ee = ee.filter(function(Q) {
            var ue = te.indexOf(Q.data.id);
            return ue !== -1 && (Q.x0 = Y * ue, Q.x1 = Y * (ue + 1), Q.y0 = A, Q.y1 = A + D, Q.onPathbar = !0, !0);
          })).reverse(), (k = k.data(ee, f.getPtId)).enter().append("g").classed("pathbar", !0), T(k, g, U, [C, D], P), k.order();
          var X = k;
          O && (X = X.transition().each("end", function() {
            var Q = l.select(this);
            f.setSliceCursor(Q, m, { hideOnRoot: !1, hideOnLeaves: !1, isTransitioning: !1 });
          })), X.each(function(Q) {
            Q._x0 = L(Q.x0), Q._x1 = L(Q.x1), Q._y0 = E(Q.y0), Q._y1 = E(Q.y1), Q._hoverX = L(Q.x1 - Math.min(C, D) / 2), Q._hoverY = E(Q.y1 - D / 2);
            var ue = l.select(this), ce = u.ensureSingle(ue, "path", "surface", function(ae) {
              ae.style("pointer-events", V ? "none" : "all");
            });
            O ? ce.transition().attrTween("d", function(ae) {
              var se = z(ae, g, U, [C, D]);
              return function(me) {
                return P(se(me));
              };
            }) : ce.attr("d", P), ue.call(c, w, m, x, { styleOne: _, eventDataKeys: d.eventDataKeys, transitionTime: d.CLICK_TRANSITION_TIME, transitionEasing: d.CLICK_TRANSITION_EASING }).call(f.setSliceCursor, m, { hideOnRoot: !1, hideOnLeaves: !1, isTransitioning: m._transitioning }), ce.call(_, Q, K, m, { hovered: !1 }), Q._text = (f.getPtLabel(Q) || "").split("<br>").join(" ") || "";
            var he = u.ensureSingle(ue, "g", "slicetext"), de = u.ensureSingle(he, "text", "", function(ae) {
              ae.attr("data-notex", 1);
            }), ne = u.ensureUniformFontSize(m, f.determineTextFont(K, Q, $.font, { onPathbar: !0 }));
            de.text(Q._text || " ").classed("slicetext", !0).attr("text-anchor", "start").call(i.font, ne).call(h.convertToTspans, m), Q.textBB = i.bBox(de.node()), Q.transform = I(Q, { fontSize: ne.size, onPathbar: !0 }), Q.transform.fontSize = ne.size, O ? de.transition().attrTween("transform", function(ae) {
              var se = F(ae, g, U, [C, D]);
              return function(me) {
                return M(se(me));
              };
            }) : de.attr("transform", M(Q));
          });
        };
      }, 50916: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(30635), p = n(11995), _ = n(92080).styleOne, d = n(43236), f = n(33108), c = n(44691), g = n(19718).formatSliceLabel, m = !1;
        o.exports = function(x, w, k, S, A) {
          var C = A.width, D = A.height, L = A.viewX, E = A.viewY, P = A.pathSlice, I = A.toMoveInsideSlice, M = A.strTransform, O = A.hasTransition, T = A.handleSlicesExit, z = A.makeUpdateSliceInterpolator, F = A.makeUpdateTextInterpolator, U = A.prevEntry, V = x._context.staticPlot, $ = x._fullLayout, q = w[0].trace, K = q.textposition.indexOf("left") !== -1, re = q.textposition.indexOf("right") !== -1, Y = q.textposition.indexOf("bottom") !== -1, te = !Y && !q.marker.pad.t || Y && !q.marker.pad.b, ee = p(k, [C, D], { packing: q.tiling.packing, squarifyratio: q.tiling.squarifyratio, flipX: q.tiling.flip.indexOf("x") > -1, flipY: q.tiling.flip.indexOf("y") > -1, pad: { inner: q.tiling.pad, top: q.marker.pad.t, left: q.marker.pad.l, right: q.marker.pad.r, bottom: q.marker.pad.b } }).descendants(), X = 1 / 0, Q = -1 / 0;
          ee.forEach(function(ne) {
            var ae = ne.depth;
            ae >= q._maxDepth ? (ne.x0 = ne.x1 = (ne.x0 + ne.x1) / 2, ne.y0 = ne.y1 = (ne.y0 + ne.y1) / 2) : (X = Math.min(X, ae), Q = Math.max(Q, ae));
          }), S = S.data(ee, f.getPtId), q._maxVisibleLayers = isFinite(Q) ? Q - X + 1 : 0, S.enter().append("g").classed("slice", !0), T(S, m, {}, [C, D], P), S.order();
          var ue = null;
          if (O && U) {
            var ce = f.getPtId(U);
            S.each(function(ne) {
              ue === null && f.getPtId(ne) === ce && (ue = { x0: ne.x0, x1: ne.x1, y0: ne.y0, y1: ne.y1 });
            });
          }
          var he = function() {
            return ue || { x0: 0, x1: C, y0: 0, y1: D };
          }, de = S;
          return O && (de = de.transition().each("end", function() {
            var ne = l.select(this);
            f.setSliceCursor(ne, x, { hideOnRoot: !0, hideOnLeaves: !1, isTransitioning: !1 });
          })), de.each(function(ne) {
            var ae = f.isHeader(ne, q);
            ne._x0 = L(ne.x0), ne._x1 = L(ne.x1), ne._y0 = E(ne.y0), ne._y1 = E(ne.y1), ne._hoverX = L(ne.x1 - q.marker.pad.r), ne._hoverY = E(Y ? ne.y1 - q.marker.pad.b / 2 : ne.y0 + q.marker.pad.t / 2);
            var se = l.select(this), me = u.ensureSingle(se, "path", "surface", function(Me) {
              Me.style("pointer-events", V ? "none" : "all");
            });
            O ? me.transition().attrTween("d", function(Me) {
              var De = z(Me, m, he(), [C, D]);
              return function(Le) {
                return P(De(Le));
              };
            }) : me.attr("d", P), se.call(c, k, x, w, { styleOne: _, eventDataKeys: d.eventDataKeys, transitionTime: d.CLICK_TRANSITION_TIME, transitionEasing: d.CLICK_TRANSITION_EASING }).call(f.setSliceCursor, x, { isTransitioning: x._transitioning }), me.call(_, ne, q, x, { hovered: !1 }), ne.x0 === ne.x1 || ne.y0 === ne.y1 ? ne._text = "" : ne._text = ae ? te ? "" : f.getPtLabel(ne) || "" : g(ne, k, q, w, $) || "";
            var ye = u.ensureSingle(se, "g", "slicetext"), pe = u.ensureSingle(ye, "text", "", function(Me) {
              Me.attr("data-notex", 1);
            }), be = u.ensureUniformFontSize(x, f.determineTextFont(q, ne, $.font)), Ae = ne._text || " ", Se = ae && Ae.indexOf("<br>") === -1;
            pe.text(Ae).classed("slicetext", !0).attr("text-anchor", re ? "end" : K || Se ? "start" : "middle").call(i.font, be).call(h.convertToTspans, x), ne.textBB = i.bBox(pe.node()), ne.transform = I(ne, { fontSize: be.size, isHeader: ae }), ne.transform.fontSize = be.size, O ? pe.transition().attrTween("transform", function(Me) {
              var De = F(Me, m, he(), [C, D]);
              return function(Le) {
                return M(De(Le));
              };
            }) : pe.attr("transform", M(ne));
          }), ue;
        };
      }, 36141: function(o) {
        o.exports = function s(n, l, u) {
          var i;
          u.swapXY && (i = n.x0, n.x0 = n.y0, n.y0 = i, i = n.x1, n.x1 = n.y1, n.y1 = i), u.flipX && (i = n.x0, n.x0 = l[0] - n.x1, n.x1 = l[0] - i), u.flipY && (i = n.y0, n.y0 = l[1] - n.y1, n.y1 = l[1] - i);
          var h = n.children;
          if (h) for (var p = 0; p < h.length; p++) s(h[p], l, u);
        };
      }, 47181: function(o, s, n) {
        o.exports = { moduleType: "trace", name: "treemap", basePlotModule: n(69784), categories: [], animatable: !0, attributes: n(71856), layoutAttributes: n(4219), supplyDefaults: n(95719), supplyLayoutDefaults: n(49852), calc: n(38848)._, crossTraceCalc: n(38848).t, plot: n(64274), style: n(92080).style, colorbar: n(21146), meta: {} };
      }, 4219: function(o) {
        o.exports = { treemapcolorway: { valType: "colorlist", editType: "calc" }, extendtreemapcolors: { valType: "boolean", dflt: !0, editType: "calc" } };
      }, 49852: function(o, s, n) {
        var l = n(34809), u = n(4219);
        o.exports = function(i, h) {
          function p(_, d) {
            return l.coerce(i, h, u, _, d);
          }
          p("treemapcolorway", h.colorway), p("extendtreemapcolors");
        };
      }, 11995: function(o, s, n) {
        var l = n(92264), u = n(36141);
        o.exports = function(i, h, p) {
          var _, d = p.flipX, f = p.flipY, c = p.packing === "dice-slice", g = p.pad[f ? "bottom" : "top"], m = p.pad[d ? "right" : "left"], x = p.pad[d ? "left" : "right"], w = p.pad[f ? "top" : "bottom"];
          c && (_ = m, m = g, g = _, _ = x, x = w, w = _);
          var k = l.treemap().tile(function(S, A) {
            switch (S) {
              case "squarify":
                return l.treemapSquarify.ratio(A);
              case "binary":
                return l.treemapBinary;
              case "dice":
                return l.treemapDice;
              case "slice":
                return l.treemapSlice;
              default:
                return l.treemapSliceDice;
            }
          }(p.packing, p.squarifyratio)).paddingInner(p.pad.inner).paddingLeft(m).paddingRight(x).paddingTop(g).paddingBottom(w).size(c ? [h[1], h[0]] : h)(i);
          return (c || d || f) && u(k, h, { swapXY: c, flipX: d, flipY: f }), k;
        };
      }, 64274: function(o, s, n) {
        var l = n(41567), u = n(50916);
        o.exports = function(i, h, p, _) {
          return l(i, h, p, _, { type: "treemap", drawDescendants: u });
        };
      }, 95709: function(o, s, n) {
        var l = n(45568), u = n(88640).GW, i = n(33108), h = n(34809), p = n(56155).TEXTPAD, _ = n(32995).toMoveInsideBar, d = n(84102).recordMinTextSize, f = n(43236), c = n(17010);
        function g(m) {
          return i.isHierarchyRoot(m) ? "" : i.getPtId(m);
        }
        o.exports = function(m, x, w, k, S) {
          var A = m._fullLayout, C = x[0], D = C.trace, L = D.type === "icicle", E = C.hierarchy, P = i.findEntryWithLevel(E, D.level), I = l.select(w), M = I.selectAll("g.pathbar"), O = I.selectAll("g.slice");
          if (!P) return M.remove(), void O.remove();
          var T = i.isHierarchyRoot(P), z = !A.uniformtext.mode && i.hasTransition(k), F = i.getMaxDepth(D), U = A._size, V = D.domain, $ = U.w * (V.x[1] - V.x[0]), q = U.h * (V.y[1] - V.y[0]), K = $, re = D.pathbar.thickness, Y = D.marker.line.width + f.gapWithPathbar, te = D.pathbar.visible ? D.pathbar.side.indexOf("bottom") > -1 ? q + Y : -(re + Y) : 0, ee = { x0: K, x1: K, y0: te, y1: te + re }, X = function(_e, Be, $e) {
            var Ze = D.tiling.pad, ct = function(Dt) {
              return Dt - Ze <= Be.x0;
            }, ft = function(Dt) {
              return Dt + Ze >= Be.x1;
            }, _t = function(Dt) {
              return Dt - Ze <= Be.y0;
            }, Pt = function(Dt) {
              return Dt + Ze >= Be.y1;
            };
            return _e.x0 === Be.x0 && _e.x1 === Be.x1 && _e.y0 === Be.y0 && _e.y1 === Be.y1 ? { x0: _e.x0, x1: _e.x1, y0: _e.y0, y1: _e.y1 } : { x0: ct(_e.x0 - Ze) ? 0 : ft(_e.x0 - Ze) ? $e[0] : _e.x0, x1: ct(_e.x1 + Ze) ? 0 : ft(_e.x1 + Ze) ? $e[0] : _e.x1, y0: _t(_e.y0 - Ze) ? 0 : Pt(_e.y0 - Ze) ? $e[1] : _e.y0, y1: _t(_e.y1 + Ze) ? 0 : Pt(_e.y1 + Ze) ? $e[1] : _e.y1 };
          }, Q = null, ue = {}, ce = {}, he = null, de = function(_e, Be) {
            return Be ? ue[g(_e)] : ce[g(_e)];
          };
          C.hasMultipleRoots && T && F++, D._maxDepth = F, D._backgroundColor = A.paper_bgcolor, D._entryDepth = P.data.depth, D._atRootLevel = T;
          var ne = -$ / 2 + U.l + U.w * (V.x[1] + V.x[0]) / 2, ae = -q / 2 + U.t + U.h * (1 - (V.y[1] + V.y[0]) / 2), se = function(_e) {
            return ne + _e;
          }, me = function(_e) {
            return ae + _e;
          }, ye = me(0), pe = se(0), be = function(_e) {
            return pe + _e;
          }, Ae = function(_e) {
            return ye + _e;
          };
          function Se(_e, Be) {
            return _e + "," + Be;
          }
          var Me = be(0), De = function(_e) {
            _e.x = Math.max(Me, _e.x);
          }, Le = D.pathbar.edgeshape, We = D[L ? "tiling" : "marker"].pad, Ee = function(_e) {
            return D.textposition.indexOf(_e) !== -1;
          }, Ne = Ee("top"), Ie = Ee("left"), ge = Ee("right"), Ce = Ee("bottom"), we = function(_e, Be) {
            var $e = _e.x0, Ze = _e.x1, ct = _e.y0, ft = _e.y1, _t = _e.textBB, Pt = Ne || Be.isHeader && !Ce ? "start" : Ce ? "end" : "middle", Dt = Ee("right"), $t = Ee("left") || Be.onPathbar ? -1 : Dt ? 1 : 0;
            if (Be.isHeader) {
              if (($e += (L ? We : We.l) - p) >= (Ze -= (L ? We : We.r) - p)) {
                var Gt = ($e + Ze) / 2;
                $e = Gt, Ze = Gt;
              }
              var Wt;
              Ce ? ct < (Wt = ft - (L ? We : We.b)) && Wt < ft && (ct = Wt) : ct < (Wt = ct + (L ? We : We.t)) && Wt < ft && (ft = Wt);
            }
            var mt = _($e, Ze, ct, ft, _t, { isHorizontal: !1, constrained: !0, angle: 0, anchor: Pt, leftToRight: $t });
            return mt.fontSize = Be.fontSize, mt.targetX = se(mt.targetX), mt.targetY = me(mt.targetY), isNaN(mt.targetX) || isNaN(mt.targetY) ? {} : ($e !== Ze && ct !== ft && d(D.type, mt, A), { scale: mt.scale, rotate: mt.rotate, textX: mt.textX, textY: mt.textY, anchorX: mt.anchorX, anchorY: mt.anchorY, targetX: mt.targetX, targetY: mt.targetY });
          }, Ge = function(_e, Be) {
            for (var $e, Ze = 0, ct = _e; !$e && Ze < F; ) Ze++, (ct = ct.parent) ? $e = de(ct, Be) : Ze = F;
            return $e || {};
          }, Re = function(_e, Be, $e, Ze, ct) {
            var ft, _t = de(_e, Be);
            if (_t) ft = _t;
            else if (Be) ft = ee;
            else if (Q) if (_e.parent) {
              var Pt = he || $e;
              Pt && !Be ? ft = X(_e, Pt, Ze) : (ft = {}, h.extendFlat(ft, Ge(_e, Be)));
            } else ft = h.extendFlat({}, _e), L && (ct.orientation === "h" ? ct.flipX ? ft.x0 = _e.x1 : ft.x1 = 0 : ct.flipY ? ft.y0 = _e.y1 : ft.y1 = 0);
            else ft = {};
            return u(ft, { x0: _e.x0, x1: _e.x1, y0: _e.y0, y1: _e.y1 });
          }, je = function(_e, Be, $e, Ze) {
            var ct = de(_e, Be), ft = {}, _t = function(Dt, $t, Gt, Wt) {
              if ($t) return ue[g(E)] || ee;
              var mt = ce[D.level] || Gt;
              return function(at) {
                return at.data.depth - P.data.depth < F;
              }(Dt) ? X(Dt, mt, Wt) : {};
            }(_e, Be, $e, Ze);
            h.extendFlat(ft, { transform: we({ x0: _t.x0, x1: _t.x1, y0: _t.y0, y1: _t.y1, textBB: _e.textBB, _text: _e._text }, { isHeader: i.isHeader(_e, D) }) }), ct ? ft = ct : _e.parent && h.extendFlat(ft, Ge(_e, Be));
            var Pt = _e.transform;
            return _e.x0 !== _e.x1 && _e.y0 !== _e.y1 && d(D.type, Pt, A), u(ft, { transform: { scale: Pt.scale, rotate: Pt.rotate, textX: Pt.textX, textY: Pt.textY, anchorX: Pt.anchorX, anchorY: Pt.anchorY, targetX: Pt.targetX, targetY: Pt.targetY } });
          }, Ke = function(_e, Be, $e, Ze, ct) {
            var ft = Ze[0], _t = Ze[1];
            z ? _e.exit().transition().each(function() {
              var Pt = l.select(this);
              Pt.select("path.surface").transition().attrTween("d", function(Dt) {
                var $t = function(Gt, Wt, mt, at) {
                  var vt, St = de(Gt, Wt);
                  if (Wt) vt = ee;
                  else {
                    var Je = de(P, Wt);
                    vt = Je ? X(Gt, Je, at) : {};
                  }
                  return u(St, vt);
                }(Dt, Be, 0, [ft, _t]);
                return function(Gt) {
                  return ct($t(Gt));
                };
              }), Pt.select("g.slicetext").attr("opacity", 0);
            }).remove() : _e.exit().remove();
          }, tt = function(_e) {
            var Be = _e.transform;
            return _e.x0 !== _e.x1 && _e.y0 !== _e.y1 && d(D.type, Be, A), h.getTextTransform({ textX: Be.textX, textY: Be.textY, anchorX: Be.anchorX, anchorY: Be.anchorY, targetX: Be.targetX, targetY: Be.targetY, scale: Be.scale, rotate: Be.rotate });
          };
          z && (M.each(function(_e) {
            ue[g(_e)] = { x0: _e.x0, x1: _e.x1, y0: _e.y0, y1: _e.y1 }, _e.transform && (ue[g(_e)].transform = { textX: _e.transform.textX, textY: _e.transform.textY, anchorX: _e.transform.anchorX, anchorY: _e.transform.anchorY, targetX: _e.transform.targetX, targetY: _e.transform.targetY, scale: _e.transform.scale, rotate: _e.transform.rotate });
          }), O.each(function(_e) {
            ce[g(_e)] = { x0: _e.x0, x1: _e.x1, y0: _e.y0, y1: _e.y1 }, _e.transform && (ce[g(_e)].transform = { textX: _e.transform.textX, textY: _e.transform.textY, anchorX: _e.transform.anchorX, anchorY: _e.transform.anchorY, targetX: _e.transform.targetX, targetY: _e.transform.targetY, scale: _e.transform.scale, rotate: _e.transform.rotate }), !Q && i.isEntry(_e) && (Q = _e);
          })), he = S(m, x, P, O, { width: $, height: q, viewX: se, viewY: me, pathSlice: function(_e) {
            var Be = se(_e.x0), $e = se(_e.x1), Ze = me(_e.y0), ct = me(_e.y1), ft = $e - Be, _t = ct - Ze;
            if (!ft || !_t) return "";
            var Pt = D.marker.cornerradius || 0, Dt = Math.min(Pt, ft / 2, _t / 2);
            Dt && _e.data && _e.data.data && _e.data.data.label && (Ne && (Dt = Math.min(Dt, We.t)), Ie && (Dt = Math.min(Dt, We.l)), ge && (Dt = Math.min(Dt, We.r)), Ce && (Dt = Math.min(Dt, We.b)));
            var $t = function(Gt, Wt) {
              return Dt ? "a" + Se(Dt, Dt) + " 0 0 1 " + Se(Gt, Wt) : "";
            };
            return "M" + Se(Be, Ze + Dt) + $t(Dt, -Dt) + "L" + Se($e - Dt, Ze) + $t(Dt, Dt) + "L" + Se($e, ct - Dt) + $t(-Dt, Dt) + "L" + Se(Be + Dt, ct) + $t(-Dt, -Dt) + "Z";
          }, toMoveInsideSlice: we, prevEntry: Q, makeUpdateSliceInterpolator: Re, makeUpdateTextInterpolator: je, handleSlicesExit: Ke, hasTransition: z, strTransform: tt }), D.pathbar.visible ? c(m, x, P, M, { barDifY: te, width: K, height: re, viewX: be, viewY: Ae, pathSlice: function(_e) {
            var Be = be(Math.max(Math.min(_e.x0, _e.x0), 0)), $e = be(Math.min(Math.max(_e.x1, _e.x1), K)), Ze = Ae(_e.y0), ct = Ae(_e.y1), ft = re / 2, _t = {}, Pt = {};
            _t.x = Be, Pt.x = $e, _t.y = Pt.y = (Ze + ct) / 2;
            var Dt = { x: Be, y: Ze }, $t = { x: $e, y: Ze }, Gt = { x: $e, y: ct }, Wt = { x: Be, y: ct };
            return Le === ">" ? (Dt.x -= ft, $t.x -= ft, Gt.x -= ft, Wt.x -= ft) : Le === "/" ? (Gt.x -= ft, Wt.x -= ft, _t.x -= ft / 2, Pt.x -= ft / 2) : Le === "\\" ? (Dt.x -= ft, $t.x -= ft, _t.x -= ft / 2, Pt.x -= ft / 2) : Le === "<" && (_t.x -= ft, Pt.x -= ft), De(Dt), De(Wt), De(_t), De($t), De(Gt), De(Pt), "M" + Se(Dt.x, Dt.y) + "L" + Se($t.x, $t.y) + "L" + Se(Pt.x, Pt.y) + "L" + Se(Gt.x, Gt.y) + "L" + Se(Wt.x, Wt.y) + "L" + Se(_t.x, _t.y) + "Z";
          }, toMoveInsideSlice: we, makeUpdateSliceInterpolator: Re, makeUpdateTextInterpolator: je, handleSlicesExit: Ke, hasTransition: z, strTransform: tt }) : M.remove();
        };
      }, 92080: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(34809), h = n(33108), p = n(84102).resizeText, _ = n(72043);
        function d(f, c, g, m, x) {
          var w, k, S = (x || {}).hovered, A = c.data.data, C = A.i, D = A.color, L = h.isHierarchyRoot(c), E = 1;
          if (S) w = g._hovered.marker.line.color, k = g._hovered.marker.line.width;
          else if (L && D === g.root.color) E = 100, w = "rgba(0,0,0,0)", k = 0;
          else if (w = i.castOption(g, C, "marker.line.color") || u.defaultLine, k = i.castOption(g, C, "marker.line.width") || 0, !g._hasColorscale && !c.onPathbar) {
            var P = g.marker.depthfade;
            if (P) {
              var I, M = u.combine(u.addOpacity(g._backgroundColor, 0.75), D);
              if (P === !0) {
                var O = h.getMaxDepth(g);
                I = isFinite(O) ? h.isLeaf(c) ? 0 : g._maxVisibleLayers - (c.data.depth - g._entryDepth) : c.data.height + 1;
              } else I = c.data.depth - g._entryDepth, g._atRootLevel || I++;
              if (I > 0) for (var T = 0; T < I; T++) {
                var z = 0.5 * T / I;
                D = u.combine(u.addOpacity(M, z), D);
              }
            }
          }
          f.call(_, c, g, m, D).style("stroke-width", k).call(u.stroke, w).style("opacity", E);
        }
        o.exports = { style: function(f) {
          var c = f._fullLayout._treemaplayer.selectAll(".trace");
          p(f, c, "treemap"), c.each(function(g) {
            var m = l.select(this), x = g[0].trace;
            m.style("opacity", x.opacity), m.selectAll("path.surface").each(function(w) {
              l.select(this).call(d, w, x, f, { hovered: !1 });
            });
          });
        }, styleOne: d };
      }, 14711: function(o, s, n) {
        var l = n(64625), u = n(93049).extendFlat, i = n(80712).axisHoverFormat;
        o.exports = { y: l.y, x: l.x, x0: l.x0, y0: l.y0, xhoverformat: i("x"), yhoverformat: i("y"), name: u({}, l.name, {}), orientation: u({}, l.orientation, {}), bandwidth: { valType: "number", min: 0, editType: "calc" }, scalegroup: { valType: "string", dflt: "", editType: "calc" }, scalemode: { valType: "enumerated", values: ["width", "count"], dflt: "width", editType: "calc" }, spanmode: { valType: "enumerated", values: ["soft", "hard", "manual"], dflt: "soft", editType: "calc" }, span: { valType: "info_array", items: [{ valType: "any", editType: "calc" }, { valType: "any", editType: "calc" }], editType: "calc" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, dflt: 2, editType: "style" }, editType: "plot" }, fillcolor: l.fillcolor, points: u({}, l.boxpoints, {}), jitter: u({}, l.jitter, {}), pointpos: u({}, l.pointpos, {}), width: u({}, l.width, {}), marker: l.marker, text: l.text, hovertext: l.hovertext, hovertemplate: l.hovertemplate, quartilemethod: l.quartilemethod, box: { visible: { valType: "boolean", dflt: !1, editType: "plot" }, width: { valType: "number", min: 0, max: 1, dflt: 0.25, editType: "plot" }, fillcolor: { valType: "color", editType: "style" }, line: { color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, editType: "style" }, editType: "style" }, editType: "plot" }, meanline: { visible: { valType: "boolean", dflt: !1, editType: "plot" }, color: { valType: "color", editType: "style" }, width: { valType: "number", min: 0, editType: "style" }, editType: "plot" }, side: { valType: "enumerated", values: ["both", "positive", "negative"], dflt: "both", editType: "calc" }, offsetgroup: l.offsetgroup, alignmentgroup: l.alignmentgroup, selected: l.selected, unselected: l.unselected, hoveron: { valType: "flaglist", flags: ["violins", "points", "kde"], dflt: "violins+points+kde", extras: ["all"], editType: "style" }, zorder: l.zorder };
      }, 88759: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(89429), h = n(37881), p = n(63821).BADNUM;
        function _(f, c, g) {
          var m = c.max - c.min;
          if (!m) return f.bandwidth ? f.bandwidth : 0;
          if (f.bandwidth) return Math.max(f.bandwidth, m / 1e4);
          var x = g.length, w = l.stdev(g, x - 1, c.mean);
          return Math.max(function(k, S, A) {
            return 1.059 * Math.min(S, A / 1.349) * Math.pow(k, -0.2);
          }(x, w, c.q3 - c.q1), m / 100);
        }
        function d(f, c, g, m) {
          var x, w = f.spanmode, k = f.span || [], S = [c.min, c.max], A = [c.min - 2 * m, c.max + 2 * m];
          function C(L) {
            var E = k[L], P = g.type === "multicategory" ? g.r2c(E) : g.d2c(E, 0, f[c.valLetter + "calendar"]);
            return P === p ? A[L] : P;
          }
          var D = { type: "linear", range: x = w === "soft" ? A : w === "hard" ? S : [C(0), C(1)] };
          return u.setConvert(D), D.cleanRange(), x;
        }
        o.exports = function(f, c) {
          var g = i(f, c);
          if (g[0].t.empty) return g;
          for (var m = f._fullLayout, x = u.getFromId(f, c[c.orientation === "h" ? "xaxis" : "yaxis"]), w = 1 / 0, k = -1 / 0, S = 0, A = 0, C = 0; C < g.length; C++) {
            var D = g[C], L = D.pts.map(h.extractVal), E = D.bandwidth = _(c, D, L), P = D.span = d(c, D, x, E);
            if (D.min === D.max && E === 0) P = D.span = [D.min, D.max], D.density = [{ v: 1, t: P[0] }], D.bandwidth = E, S = Math.max(S, 1);
            else {
              var I = P[1] - P[0], M = Math.ceil(I / (E / 3)), O = I / M;
              if (!isFinite(O) || !isFinite(M)) return l.error("Something went wrong with computing the violin span"), g[0].t.empty = !0, g;
              var T = h.makeKDE(D, c, L);
              D.density = new Array(M);
              for (var z = 0, F = P[0]; F < P[1] + O / 2; z++, F += O) {
                var U = T(F);
                D.density[z] = { v: U, t: F }, S = Math.max(S, U);
              }
            }
            A = Math.max(A, L.length), w = Math.min(w, P[0]), k = Math.max(k, P[1]);
          }
          var V = u.findExtremes(x, [w, k], { padded: !0 });
          if (c._extremes[x._id] = V, c.width) g[0].t.maxKDE = S;
          else {
            var $ = m._violinScaleGroupStats, q = c.scalegroup, K = $[q];
            K ? (K.maxKDE = Math.max(K.maxKDE, S), K.maxCount = Math.max(K.maxCount, A)) : $[q] = { maxKDE: S, maxCount: A };
          }
          return g[0].t.labels.kde = l._(f, "kde:"), g;
        };
      }, 67316: function(o, s, n) {
        var l = n(81606).setPositionOffset, u = ["v", "h"];
        o.exports = function(i, h) {
          for (var p = i.calcdata, _ = h.xaxis, d = h.yaxis, f = 0; f < u.length; f++) {
            for (var c = u[f], g = c === "h" ? d : _, m = [], x = 0; x < p.length; x++) {
              var w = p[x], k = w[0].t, S = w[0].trace;
              S.visible !== !0 || S.type !== "violin" || k.empty || S.orientation !== c || S.xaxis !== _._id || S.yaxis !== d._id || m.push(x);
            }
            l("violin", i, m, g);
          }
        };
      }, 10864: function(o, s, n) {
        var l = n(34809), u = n(78766), i = n(62294), h = n(14711);
        o.exports = function(p, _, d, f) {
          function c(I, M) {
            return l.coerce(p, _, h, I, M);
          }
          function g(I, M) {
            return l.coerce2(p, _, h, I, M);
          }
          if (i.handleSampleDefaults(p, _, c, f), _.visible !== !1) {
            c("bandwidth"), c("side"), c("width") || (c("scalegroup", _.name), c("scalemode"));
            var m, x = c("span");
            Array.isArray(x) && (m = "manual"), c("spanmode", m);
            var w = c("line.color", (p.marker || {}).color || d), k = c("line.width"), S = c("fillcolor", u.addOpacity(_.line.color, 0.5));
            i.handlePointsDefaults(p, _, c, { prefix: "" });
            var A = g("box.width"), C = g("box.fillcolor", S), D = g("box.line.color", w), L = g("box.line.width", k);
            c("box.visible", !!(A || C || D || L)) || (_.box = { visible: !1 });
            var E = g("meanline.color", w), P = g("meanline.width", k);
            c("meanline.visible", !!(E || P)) || (_.meanline = { visible: !1 }), c("quartilemethod"), c("zorder");
          }
        };
      }, 37881: function(o, s, n) {
        var l = n(34809), u = function(i) {
          return 1 / Math.sqrt(2 * Math.PI) * Math.exp(-0.5 * i * i);
        };
        s.makeKDE = function(i, h, p) {
          var _ = p.length, d = u, f = i.bandwidth, c = 1 / (_ * f);
          return function(g) {
            for (var m = 0, x = 0; x < _; x++) m += d((g - p[x]) / f);
            return c * m;
          };
        }, s.getPositionOnKdePath = function(i, h, p) {
          var _, d;
          h.orientation === "h" ? (_ = "y", d = "x") : (_ = "x", d = "y");
          var f = l.findPointOnPath(i.path, p, d, { pathLength: i.pathLength }), c = i.posCenterPx, g = f[_];
          return [g, h.side === "both" ? 2 * c - g : c];
        }, s.getKdeValue = function(i, h, p) {
          var _ = i.pts.map(s.extractVal);
          return s.makeKDE(i, h, _)(p) / i.posDensityScale;
        }, s.extractVal = function(i) {
          return i.v;
        };
      }, 16842: function(o, s, n) {
        var l = n(78766), u = n(34809), i = n(29714), h = n(11448), p = n(37881);
        o.exports = function(_, d, f, c, g) {
          g || (g = {});
          var m, x, w = g.hoverLayer, k = _.cd, S = k[0].trace, A = S.hoveron, C = A.indexOf("violins") !== -1, D = A.indexOf("kde") !== -1, L = [];
          if (C || D) {
            var E = h.hoverOnBoxes(_, d, f, c);
            if (D && E.length > 0) {
              var P, I, M, O, T, z = _.xa, F = _.ya;
              S.orientation === "h" ? (T = d, P = "y", M = F, I = "x", O = z) : (T = f, P = "x", M = z, I = "y", O = F);
              var U = k[_.index];
              if (T >= U.span[0] && T <= U.span[1]) {
                var V = u.extendFlat({}, _), $ = O.c2p(T, !0), q = p.getKdeValue(U, S, T), K = p.getPositionOnKdePath(U, S, $), re = M._offset, Y = M._length;
                V[P + "0"] = K[0], V[P + "1"] = K[1], V[I + "0"] = V[I + "1"] = $, V[I + "Label"] = I + ": " + i.hoverLabelText(O, T, S[I + "hoverformat"]) + ", " + k[0].t.labels.kde + " " + q.toFixed(3);
                for (var te = 0, ee = 0; ee < E.length; ee++) if (E[ee].attr === "med") {
                  te = ee;
                  break;
                }
                V.spikeDistance = E[te].spikeDistance;
                var X = P + "Spike";
                V[X] = E[te][X], E[te].spikeDistance = void 0, E[te][X] = void 0, V.hovertemplate = !1, L.push(V), (x = {})[P + "1"] = u.constrain(re + K[0], re, re + Y), x[P + "2"] = u.constrain(re + K[1], re, re + Y), x[I + "1"] = x[I + "2"] = O._offset + $;
              }
            }
            C && (L = L.concat(E));
          }
          A.indexOf("points") !== -1 && (m = h.hoverOnPoints(_, d, f));
          var Q = w.selectAll(".violinline-" + S.uid).data(x ? [0] : []);
          return Q.enter().append("line").classed("violinline-" + S.uid, !0).attr("stroke-width", 1.5), Q.exit().remove(), Q.attr(x).call(l.stroke, _.color), c === "closest" ? m ? [m] : L : (m && L.push(m), L);
        };
      }, 37276: function(o, s, n) {
        o.exports = { attributes: n(14711), layoutAttributes: n(84734), supplyDefaults: n(10864), crossTraceDefaults: n(62294).crossTraceDefaults, supplyLayoutDefaults: n(55145), calc: n(88759), crossTraceCalc: n(67316), plot: n(36769), style: n(25117), styleOnSelect: n(9408).styleOnSelect, hoverPoints: n(16842), selectPoints: n(72488), moduleType: "trace", name: "violin", basePlotModule: n(37703), categories: ["cartesian", "svg", "symbols", "oriented", "box-violin", "showLegend", "violinLayout", "zoomScale"], meta: {} };
      }, 84734: function(o, s, n) {
        var l = n(64636), u = n(34809).extendFlat;
        o.exports = { violinmode: u({}, l.boxmode, {}), violingap: u({}, l.boxgap, {}), violingroupgap: u({}, l.boxgroupgap, {}) };
      }, 55145: function(o, s, n) {
        var l = n(34809), u = n(84734), i = n(65067);
        o.exports = function(h, p, _) {
          i._supply(h, p, _, function(d, f) {
            return l.coerce(h, p, u, d, f);
          }, "violin");
        };
      }, 36769: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(95419), p = n(5525), _ = n(37881);
        o.exports = function(d, f, c, g) {
          var m = d._context.staticPlot, x = d._fullLayout, w = f.xaxis, k = f.yaxis;
          function S(A, C) {
            var D = p(A, { xaxis: w, yaxis: k, trace: C, connectGaps: !0, baseTolerance: 0.75, shape: "spline", simplify: !0, linearized: !0 });
            return i.smoothopen(D[0], 1);
          }
          u.makeTraceGroups(g, c, "trace violins").each(function(A) {
            var C = l.select(this), D = A[0], L = D.t, E = D.trace;
            if (E.visible !== !0 || L.empty) C.remove();
            else {
              var P = L.bPos, I = L.bdPos, M = f[L.valLetter + "axis"], O = f[L.posLetter + "axis"], T = E.side === "both", z = T || E.side === "positive", F = T || E.side === "negative", U = C.selectAll("path.violin").data(u.identity);
              U.enter().append("path").style("vector-effect", m ? "none" : "non-scaling-stroke").attr("class", "violin"), U.exit().remove(), U.each(function(ee) {
                var X, Q, ue, ce, he, de, ne, ae, se = l.select(this), me = ee.density, ye = me.length, pe = O.c2l(ee.pos + P, !0), be = O.l2p(pe);
                if (E.width) X = L.maxKDE / I;
                else {
                  var Ae = x._violinScaleGroupStats[E.scalegroup];
                  X = E.scalemode === "count" ? Ae.maxKDE / I * (Ae.maxCount / ee.pts.length) : Ae.maxKDE / I;
                }
                if (z) {
                  for (ne = new Array(ye), he = 0; he < ye; he++) (ae = ne[he] = {})[L.posLetter] = pe + me[he].v / X, ae[L.valLetter] = M.c2l(me[he].t, !0);
                  Q = S(ne, E);
                }
                if (F) {
                  for (ne = new Array(ye), de = 0, he = ye - 1; de < ye; de++, he--) (ae = ne[de] = {})[L.posLetter] = pe - me[he].v / X, ae[L.valLetter] = M.c2l(me[he].t, !0);
                  ue = S(ne, E);
                }
                if (T) ce = Q + "L" + ue.substr(1) + "Z";
                else {
                  var Se = [be, M.c2p(me[0].t)], Me = [be, M.c2p(me[ye - 1].t)];
                  E.orientation === "h" && (Se.reverse(), Me.reverse()), ce = z ? "M" + Se + "L" + Q.substr(1) + "L" + Me : "M" + Me + "L" + ue.substr(1) + "L" + Se;
                }
                se.attr("d", ce), ee.posCenterPx = be, ee.posDensityScale = X * I, ee.path = se.node(), ee.pathLength = ee.path.getTotalLength() / (T ? 2 : 1);
              });
              var V, $, q, K = E.box, re = K.width, Y = (K.line || {}).width;
              T ? (V = I * re, $ = 0) : z ? (V = [0, I * re / 2], $ = Y * { x: 1, y: -1 }[L.posLetter]) : (V = [I * re / 2, 0], $ = Y * { x: -1, y: 1 }[L.posLetter]), h.plotBoxAndWhiskers(C, { pos: O, val: M }, E, { bPos: P, bdPos: V, bPosPxOffset: $ }), h.plotBoxMean(C, { pos: O, val: M }, E, { bPos: P, bdPos: V, bPosPxOffset: $ }), !E.box.visible && E.meanline.visible && (q = u.identity);
              var te = C.selectAll("path.meanline").data(q || []);
              te.enter().append("path").attr("class", "meanline").style("fill", "none").style("vector-effect", m ? "none" : "non-scaling-stroke"), te.exit().remove(), te.each(function(ee) {
                var X = M.c2p(ee.mean, !0), Q = _.getPositionOnKdePath(ee, E, X);
                l.select(this).attr("d", E.orientation === "h" ? "M" + X + "," + Q[0] + "V" + Q[1] : "M" + Q[0] + "," + X + "H" + Q[1]);
              }), h.plotPoints(C, { x: w, y: k }, E, L);
            }
          });
        };
      }, 25117: function(o, s, n) {
        var l = n(45568), u = n(78766), i = n(9408).stylePoints;
        o.exports = function(h) {
          var p = l.select(h).selectAll("g.trace.violins");
          p.style("opacity", function(_) {
            return _[0].trace.opacity;
          }), p.each(function(_) {
            var d = _[0].trace, f = l.select(this), c = d.box || {}, g = c.line || {}, m = d.meanline || {}, x = m.width;
            f.selectAll("path.violin").style("stroke-width", d.line.width + "px").call(u.stroke, d.line.color).call(u.fill, d.fillcolor), f.selectAll("path.box").style("stroke-width", g.width + "px").call(u.stroke, g.color).call(u.fill, c.fillcolor);
            var w = { "stroke-width": x + "px", "stroke-dasharray": 2 * x + "px," + x + "px" };
            f.selectAll("path.mean").style(w).call(u.stroke, m.color), f.selectAll("path.meanline").style(w).call(u.stroke, m.color), i(f, d, h);
          });
        };
      }, 51526: function(o, s, n) {
        var l = n(87163), u = n(70252), i = n(16131), h = n(9829), p = n(93049).extendFlat, _ = n(13582).overrideAll, d = o.exports = _(p({ x: u.x, y: u.y, z: u.z, value: u.value, isomin: u.isomin, isomax: u.isomax, surface: u.surface, spaceframe: { show: { valType: "boolean", dflt: !1 }, fill: { valType: "number", min: 0, max: 1, dflt: 1 } }, slices: u.slices, caps: u.caps, text: u.text, hovertext: u.hovertext, xhoverformat: u.xhoverformat, yhoverformat: u.yhoverformat, zhoverformat: u.zhoverformat, valuehoverformat: u.valuehoverformat, hovertemplate: u.hovertemplate }, l("", { colorAttr: "`value`", showScaleDflt: !0, editTypeOverride: "calc" }), { colorbar: u.colorbar, opacity: u.opacity, opacityscale: i.opacityscale, lightposition: u.lightposition, lighting: u.lighting, flatshading: u.flatshading, contour: u.contour, hoverinfo: p({}, h.hoverinfo), showlegend: p({}, h.showlegend, { dflt: !1 }) }), "calc", "nested");
        d.x.editType = d.y.editType = d.z.editType = d.value.editType = "calc+clearAxisTypes", d.transforms = void 0;
      }, 96496: function(o, s, n) {
        var l = n(99098).gl_mesh3d, u = n(46998).parseColorScale, i = n(34809).isArrayOrTypedArray, h = n(55010), p = n(88856).extractOpts, _ = n(88239), d = n(91370).findNearestOnAxis, f = n(91370).generateIsoMeshes;
        function c(m, x, w) {
          this.scene = m, this.uid = w, this.mesh = x, this.name = "", this.data = null, this.showContour = !1;
        }
        var g = c.prototype;
        g.handlePick = function(m) {
          if (m.object === this.mesh) {
            var x = m.data.index, w = this.data._meshX[x], k = this.data._meshY[x], S = this.data._meshZ[x], A = this.data._Ys.length, C = this.data._Zs.length, D = d(w, this.data._Xs).id, L = d(k, this.data._Ys).id, E = d(S, this.data._Zs).id, P = m.index = E + C * L + C * A * D;
            m.traceCoordinate = [this.data._meshX[P], this.data._meshY[P], this.data._meshZ[P], this.data._value[P]];
            var I = this.data.hovertext || this.data.text;
            return i(I) && I[P] !== void 0 ? m.textLabel = I[P] : I && (m.textLabel = I), !0;
          }
        }, g.update = function(m) {
          var x = this.scene, w = x.fullSceneLayout;
          function k(C, D, L, E) {
            return D.map(function(P) {
              return C.d2l(P, 0, E) * L;
            });
          }
          this.data = f(m);
          var S = { positions: _(k(w.xaxis, m._meshX, x.dataScale[0], m.xcalendar), k(w.yaxis, m._meshY, x.dataScale[1], m.ycalendar), k(w.zaxis, m._meshZ, x.dataScale[2], m.zcalendar)), cells: _(m._meshI, m._meshJ, m._meshK), lightPosition: [m.lightposition.x, m.lightposition.y, m.lightposition.z], ambient: m.lighting.ambient, diffuse: m.lighting.diffuse, specular: m.lighting.specular, roughness: m.lighting.roughness, fresnel: m.lighting.fresnel, vertexNormalsEpsilon: m.lighting.vertexnormalsepsilon, faceNormalsEpsilon: m.lighting.facenormalsepsilon, opacity: m.opacity, opacityscale: m.opacityscale, contourEnable: m.contour.show, contourColor: h(m.contour.color).slice(0, 3), contourWidth: m.contour.width, useFacetNormals: m.flatshading }, A = p(m);
          S.vertexIntensity = m._meshIntensity, S.vertexIntensityBounds = [A.min, A.max], S.colormap = u(m), this.mesh.update(S);
        }, g.dispose = function() {
          this.scene.glplot.remove(this.mesh), this.mesh.dispose();
        }, o.exports = function(m, x) {
          var w = m.glplot.gl, k = l({ gl: w }), S = new c(m, k, x.uid);
          return k._trace = S, S.update(x), m.glplot.add(k), S;
        };
      }, 22385: function(o, s, n) {
        var l = n(34809), u = n(51526), i = n(44731).supplyIsoDefaults, h = n(65444).opacityscaleDefaults;
        o.exports = function(p, _, d, f) {
          function c(g, m) {
            return l.coerce(p, _, u, g, m);
          }
          i(p, _, d, f, c), h(p, _, f, c);
        };
      }, 75703: function(o, s, n) {
        o.exports = { attributes: n(51526), supplyDefaults: n(22385), calc: n(58988), colorbar: { min: "cmin", max: "cmax" }, plot: n(96496), moduleType: "trace", name: "volume", basePlotModule: n(2487), categories: ["gl3d", "showLegend"], meta: {} };
      }, 37832: function(o, s, n) {
        var l = n(81481), u = n(36640).line, i = n(9829), h = n(80712).axisHoverFormat, p = n(3208).rb, _ = n(3208).ay, d = n(82508), f = n(93049).extendFlat, c = n(78766);
        function g(m) {
          return { marker: { color: f({}, l.marker.color, { arrayOk: !1, editType: "style" }), line: { color: f({}, l.marker.line.color, { arrayOk: !1, editType: "style" }), width: f({}, l.marker.line.width, { arrayOk: !1, editType: "style" }), editType: "style" }, editType: "style" }, editType: "style" };
        }
        o.exports = { measure: { valType: "data_array", dflt: [], editType: "calc" }, base: { valType: "number", dflt: null, arrayOk: !1, editType: "calc" }, x: l.x, x0: l.x0, dx: l.dx, y: l.y, y0: l.y0, dy: l.dy, xperiod: l.xperiod, yperiod: l.yperiod, xperiod0: l.xperiod0, yperiod0: l.yperiod0, xperiodalignment: l.xperiodalignment, yperiodalignment: l.yperiodalignment, xhoverformat: h("x"), yhoverformat: h("y"), hovertext: l.hovertext, hovertemplate: p({}, { keys: d.eventDataKeys }), hoverinfo: f({}, i.hoverinfo, { flags: ["name", "x", "y", "text", "initial", "delta", "final"] }), textinfo: { valType: "flaglist", flags: ["label", "text", "initial", "delta", "final"], extras: ["none"], editType: "plot", arrayOk: !1 }, texttemplate: _({ editType: "plot" }, { keys: d.eventDataKeys.concat(["label"]) }), text: l.text, textposition: l.textposition, insidetextanchor: l.insidetextanchor, textangle: l.textangle, textfont: l.textfont, insidetextfont: l.insidetextfont, outsidetextfont: l.outsidetextfont, constraintext: l.constraintext, cliponaxis: l.cliponaxis, orientation: l.orientation, offset: l.offset, width: l.width, increasing: g(), decreasing: g(), totals: g(), connector: { line: { color: f({}, u.color, { dflt: c.defaultLine }), width: f({}, u.width, { editType: "plot" }), dash: u.dash, editType: "plot" }, mode: { valType: "enumerated", values: ["spanning", "between"], dflt: "between", editType: "plot" }, visible: { valType: "boolean", dflt: !0, editType: "plot" }, editType: "plot" }, offsetgroup: l.offsetgroup, alignmentgroup: l.alignmentgroup, zorder: l.zorder };
      }, 15e3: function(o, s, n) {
        var l = n(29714), u = n(40528), i = n(34809).mergeArray, h = n(48861), p = n(63821).BADNUM;
        function _(f) {
          return f === "a" || f === "absolute";
        }
        function d(f) {
          return f === "t" || f === "total";
        }
        o.exports = function(f, c) {
          var g, m, x, w, k, S, A = l.getFromId(f, c.xaxis || "x"), C = l.getFromId(f, c.yaxis || "y");
          c.orientation === "h" ? (g = A.makeCalcdata(c, "x"), x = C.makeCalcdata(c, "y"), w = u(c, C, "y", x), k = !!c.yperiodalignment, S = "y") : (g = C.makeCalcdata(c, "y"), x = A.makeCalcdata(c, "x"), w = u(c, A, "x", x), k = !!c.xperiodalignment, S = "x"), m = w.vals;
          for (var D, L = Math.min(m.length, g.length), E = new Array(L), P = 0, I = !1, M = 0; M < L; M++) {
            var O = g[M] || 0, T = !1;
            (g[M] !== p || d(c.measure[M]) || _(c.measure[M])) && M + 1 < L && (g[M + 1] !== p || d(c.measure[M + 1]) || _(c.measure[M + 1])) && (T = !0);
            var z = E[M] = { i: M, p: m[M], s: O, rawS: O, cNext: T };
            _(c.measure[M]) ? (P = z.s, z.isSum = !0, z.dir = "totals", z.s = P) : d(c.measure[M]) ? (z.isSum = !0, z.dir = "totals", z.s = P) : (z.isSum = !1, z.dir = z.rawS < 0 ? "decreasing" : "increasing", D = z.s, z.s = P + D, P += D), z.dir === "totals" && (I = !0), k && (E[M].orig_p = x[M], E[M][S + "End"] = w.ends[M], E[M][S + "Start"] = w.starts[M]), c.ids && (z.id = String(c.ids[M])), z.v = (c.base || 0) + P;
          }
          return E.length && (E[0].hasTotals = I), i(c.text, E, "tx"), i(c.hovertext, E, "htx"), h(E, c), E;
        };
      }, 82508: function(o) {
        o.exports = { eventDataKeys: ["initial", "delta", "final"] };
      }, 9963: function(o, s, n) {
        var l = n(24782).setGroupPositions;
        o.exports = function(u, i) {
          var h, p, _ = u._fullLayout, d = u._fullData, f = u.calcdata, c = i.xaxis, g = i.yaxis, m = [], x = [], w = [];
          for (p = 0; p < d.length; p++) {
            var k = d[p];
            k.visible === !0 && k.xaxis === c._id && k.yaxis === g._id && k.type === "waterfall" && (h = f[p], k.orientation === "h" ? w.push(h) : x.push(h), m.push(h));
          }
          var S = { mode: _.waterfallmode, norm: _.waterfallnorm, gap: _.waterfallgap, groupgap: _.waterfallgroupgap };
          for (l(u, c, g, x, S), l(u, g, c, w, S), p = 0; p < m.length; p++) {
            h = m[p];
            for (var A = 0; A < h.length; A++) {
              var C = h[A];
              C.isSum === !1 && (C.s0 += A === 0 ? 0 : h[A - 1].s), A + 1 < h.length && (h[A].nextP0 = h[A + 1].p0, h[A].nextS0 = h[A + 1].s0);
            }
          }
        };
      }, 67199: function(o, s, n) {
        var l = n(34809), u = n(36301), i = n(17550).handleText, h = n(99867), p = n(99669), _ = n(37832), d = n(78766), f = n(20909), c = f.INCREASING.COLOR, g = f.DECREASING.COLOR;
        function m(x, w, k) {
          x(w + ".marker.color", k), x(w + ".marker.line.color", d.defaultLine), x(w + ".marker.line.width");
        }
        o.exports = { supplyDefaults: function(x, w, k, S) {
          function A(D, L) {
            return l.coerce(x, w, _, D, L);
          }
          if (h(x, w, S, A)) {
            p(x, w, S, A), A("xhoverformat"), A("yhoverformat"), A("measure"), A("orientation", w.x && !w.y ? "h" : "v"), A("base"), A("offset"), A("width"), A("text"), A("hovertext"), A("hovertemplate");
            var C = A("textposition");
            i(x, w, S, A, C, { moduleHasSelected: !1, moduleHasUnselected: !1, moduleHasConstrain: !0, moduleHasCliponaxis: !0, moduleHasTextangle: !0, moduleHasInsideanchor: !0 }), w.textposition !== "none" && (A("texttemplate"), w.texttemplate || A("textinfo")), m(A, "increasing", c), m(A, "decreasing", g), m(A, "totals", "#4499FF"), A("connector.visible") && (A("connector.mode"), A("connector.line.width") && (A("connector.line.color"), A("connector.line.dash"))), A("zorder");
          } else w.visible = !1;
        }, crossTraceDefaults: function(x, w) {
          var k, S;
          function A(D) {
            return l.coerce(S._input, S, _, D);
          }
          if (w.waterfallmode === "group") for (var C = 0; C < x.length; C++) k = (S = x[C])._input, u(k, S, w, A);
        } };
      }, 64932: function(o) {
        o.exports = function(s, n) {
          return s.x = "xVal" in n ? n.xVal : n.x, s.y = "yVal" in n ? n.yVal : n.y, "initial" in n && (s.initial = n.initial), "delta" in n && (s.delta = n.delta), "final" in n && (s.final = n.final), n.xa && (s.xaxis = n.xa), n.ya && (s.yaxis = n.ya), s;
        };
      }, 40943: function(o, s, n) {
        var l = n(29714).hoverLabelText, u = n(78766).opacity, i = n(91664).hoverOnBars, h = n(20909), p = h.INCREASING.SYMBOL, _ = h.DECREASING.SYMBOL;
        o.exports = function(d, f, c, g, m) {
          var x = i(d, f, c, g, m);
          if (x) {
            var w = x.cd, k = w[0].trace, S = k.orientation === "h", A = S ? "x" : "y", C = S ? d.xa : d.ya, D = w[x.index], L = D.isSum ? D.b + D.s : D.rawS;
            x.initial = D.b + D.s - L, x.delta = L, x.final = x.initial + x.delta;
            var E = z(Math.abs(x.delta));
            x.deltaLabel = L < 0 ? "(" + E + ")" : E, x.finalLabel = z(x.final), x.initialLabel = z(x.initial);
            var P = D.hi || k.hoverinfo, I = [];
            if (P && P !== "none" && P !== "skip") {
              var M = P === "all", O = P.split("+"), T = function(F) {
                return M || O.indexOf(F) !== -1;
              };
              D.isSum || (!T("final") || T(S ? "x" : "y") || I.push(x.finalLabel), T("delta") && (L < 0 ? I.push(x.deltaLabel + " " + _) : I.push(x.deltaLabel + " " + p)), T("initial") && I.push("Initial: " + x.initialLabel));
            }
            return I.length && (x.extraText = I.join("<br>")), x.color = function(F, U) {
              var V = F[U.dir].marker, $ = V.color, q = V.line.color, K = V.line.width;
              return u($) ? $ : u(q) && K ? q : void 0;
            }(k, D), [x];
          }
          function z(F) {
            return l(C, F, k[A + "hoverformat"]);
          }
        };
      }, 38261: function(o, s, n) {
        o.exports = { attributes: n(37832), layoutAttributes: n(579), supplyDefaults: n(67199).supplyDefaults, crossTraceDefaults: n(67199).crossTraceDefaults, supplyLayoutDefaults: n(71492), calc: n(15e3), crossTraceCalc: n(9963), plot: n(71130), style: n(57256).style, hoverPoints: n(40943), eventData: n(64932), selectPoints: n(88384), moduleType: "trace", name: "waterfall", basePlotModule: n(37703), categories: ["bar-like", "cartesian", "svg", "oriented", "showLegend", "zoomScale"], meta: {} };
      }, 579: function(o) {
        o.exports = { waterfallmode: { valType: "enumerated", values: ["group", "overlay"], dflt: "group", editType: "calc" }, waterfallgap: { valType: "number", min: 0, max: 1, editType: "calc" }, waterfallgroupgap: { valType: "number", min: 0, max: 1, dflt: 0, editType: "calc" } };
      }, 71492: function(o, s, n) {
        var l = n(34809), u = n(579);
        o.exports = function(i, h, p) {
          var _ = !1;
          function d(g, m) {
            return l.coerce(i, h, u, g, m);
          }
          for (var f = 0; f < p.length; f++) {
            var c = p[f];
            if (c.visible && c.type === "waterfall") {
              _ = !0;
              break;
            }
          }
          _ && (d("waterfallmode"), d("waterfallgap", 0.2), d("waterfallgroupgap"));
        };
      }, 71130: function(o, s, n) {
        var l = n(45568), u = n(34809), i = n(62203), h = n(63821).BADNUM, p = n(32995), _ = n(84102).clearMinTextSize;
        o.exports = function(d, f, c, g) {
          var m = d._fullLayout;
          _("waterfall", m), p.plot(d, f, c, g, { mode: m.waterfallmode, norm: m.waterfallmode, gap: m.waterfallgap, groupgap: m.waterfallgroupgap }), function(x, w, k, S) {
            var A = w.xaxis, C = w.yaxis;
            u.makeTraceGroups(S, k, "trace bars").each(function(D) {
              var L = l.select(this), E = D[0].trace, P = u.ensureSingle(L, "g", "lines");
              if (E.connector && E.connector.visible) {
                var I = E.orientation === "h", M = E.connector.mode, O = P.selectAll("g.line").data(u.identity);
                O.enter().append("g").classed("line", !0), O.exit().remove();
                var T = O.size();
                O.each(function(z, F) {
                  if (F === T - 1 || z.cNext) {
                    var U = function(K, re, Y, te) {
                      var ee = [], X = [], Q = te ? re : Y, ue = te ? Y : re;
                      return ee[0] = Q.c2p(K.s0, !0), X[0] = ue.c2p(K.p0, !0), ee[1] = Q.c2p(K.s1, !0), X[1] = ue.c2p(K.p1, !0), ee[2] = Q.c2p(K.nextS0, !0), X[2] = ue.c2p(K.nextP0, !0), te ? [ee, X] : [X, ee];
                    }(z, A, C, I), V = U[0], $ = U[1], q = "";
                    V[0] !== h && $[0] !== h && V[1] !== h && $[1] !== h && (M === "spanning" && !z.isSum && F > 0 && (q += I ? "M" + V[0] + "," + $[1] + "V" + $[0] : "M" + V[1] + "," + $[0] + "H" + V[0]), M !== "between" && (z.isSum || F < T - 1) && (q += I ? "M" + V[1] + "," + $[0] + "V" + $[1] : "M" + V[0] + "," + $[1] + "H" + V[1]), V[2] !== h && $[2] !== h && (q += I ? "M" + V[1] + "," + $[1] + "V" + $[2] : "M" + V[1] + "," + $[1] + "H" + V[2])), q === "" && (q = "M0,0Z"), u.ensureSingle(l.select(this), "path").attr("d", q).call(i.setClipUrl, w.layerClipId, x);
                  }
                });
              } else P.remove();
            });
          }(d, f, c, g);
        };
      }, 57256: function(o, s, n) {
        var l = n(45568), u = n(62203), i = n(78766), h = n(20438).DESELECTDIM, p = n(6851), _ = n(84102).resizeText, d = p.styleTextPoints;
        o.exports = { style: function(f, c, g) {
          var m = g || l.select(f).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");
          _(f, m, "waterfall"), m.style("opacity", function(x) {
            return x[0].trace.opacity;
          }), m.each(function(x) {
            var w = l.select(this), k = x[0].trace;
            w.selectAll(".point > path").each(function(S) {
              if (!S.isBlank) {
                var A = k[S.dir].marker;
                l.select(this).call(i.fill, A.color).call(i.stroke, A.line.color).call(u.dashLine, A.line.dash, A.line.width).style("opacity", k.selectedpoints && !S.selected ? h : 1);
              }
            }), d(w, k, f), w.selectAll(".lines").each(function() {
              var S = k.connector.line;
              u.lineGroupStyle(l.select(this).selectAll("path"), S.width, S.color, S.dash);
            });
          });
        } };
      }, 47908: function(o, s, n) {
        var l = n(29714), u = n(34809), i = n(57297), h = n(5086).z, p = n(63821).BADNUM;
        s.moduleType = "transform", s.name = "aggregate";
        var _ = s.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, groups: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, aggregations: { _isLinkedToArray: "aggregation", target: { valType: "string", editType: "calc" }, func: { valType: "enumerated", values: ["count", "sum", "avg", "median", "mode", "rms", "stddev", "min", "max", "first", "last", "change", "range"], dflt: "first", editType: "calc" }, funcmode: { valType: "enumerated", values: ["sample", "population"], dflt: "sample", editType: "calc" }, enabled: { valType: "boolean", dflt: !0, editType: "calc" }, editType: "calc" }, editType: "calc" }, d = _.aggregations;
        function f(x, w, k, S) {
          if (S.enabled) {
            for (var A = S.target, C = u.nestedProperty(w, A), D = C.get(), L = function(I, M) {
              var O = I.func, T = M.d2c, z = M.c2d;
              switch (O) {
                case "count":
                  return c;
                case "first":
                  return g;
                case "last":
                  return m;
                case "sum":
                  return function(F, U) {
                    for (var V = 0, $ = 0; $ < U.length; $++) {
                      var q = T(F[U[$]]);
                      q !== p && (V += q);
                    }
                    return z(V);
                  };
                case "avg":
                  return function(F, U) {
                    for (var V = 0, $ = 0, q = 0; q < U.length; q++) {
                      var K = T(F[U[q]]);
                      K !== p && (V += K, $++);
                    }
                    return $ ? z(V / $) : p;
                  };
                case "min":
                  return function(F, U) {
                    for (var V = 1 / 0, $ = 0; $ < U.length; $++) {
                      var q = T(F[U[$]]);
                      q !== p && (V = Math.min(V, q));
                    }
                    return V === 1 / 0 ? p : z(V);
                  };
                case "max":
                  return function(F, U) {
                    for (var V = -1 / 0, $ = 0; $ < U.length; $++) {
                      var q = T(F[U[$]]);
                      q !== p && (V = Math.max(V, q));
                    }
                    return V === -1 / 0 ? p : z(V);
                  };
                case "range":
                  return function(F, U) {
                    for (var V = 1 / 0, $ = -1 / 0, q = 0; q < U.length; q++) {
                      var K = T(F[U[q]]);
                      K !== p && (V = Math.min(V, K), $ = Math.max($, K));
                    }
                    return $ === -1 / 0 || V === 1 / 0 ? p : z($ - V);
                  };
                case "change":
                  return function(F, U) {
                    var V = T(F[U[0]]), $ = T(F[U[U.length - 1]]);
                    return V === p || $ === p ? p : z($ - V);
                  };
                case "median":
                  return function(F, U) {
                    for (var V = [], $ = 0; $ < U.length; $++) {
                      var q = T(F[U[$]]);
                      q !== p && V.push(q);
                    }
                    if (!V.length) return p;
                    V.sort(u.sorterAsc);
                    var K = (V.length - 1) / 2;
                    return z((V[Math.floor(K)] + V[Math.ceil(K)]) / 2);
                  };
                case "mode":
                  return function(F, U) {
                    for (var V = {}, $ = 0, q = p, K = 0; K < U.length; K++) {
                      var re = T(F[U[K]]);
                      if (re !== p) {
                        var Y = V[re] = (V[re] || 0) + 1;
                        Y > $ && ($ = Y, q = re);
                      }
                    }
                    return $ ? z(q) : p;
                  };
                case "rms":
                  return function(F, U) {
                    for (var V = 0, $ = 0, q = 0; q < U.length; q++) {
                      var K = T(F[U[q]]);
                      K !== p && (V += K * K, $++);
                    }
                    return $ ? z(Math.sqrt(V / $)) : p;
                  };
                case "stddev":
                  return function(F, U) {
                    var V, $ = 0, q = 0, K = 1, re = p;
                    for (V = 0; V < U.length && re === p; V++) re = T(F[U[V]]);
                    if (re === p) return p;
                    for (; V < U.length; V++) {
                      var Y = T(F[U[V]]);
                      if (Y !== p) {
                        var te = Y - re;
                        $ += te, q += te * te, K++;
                      }
                    }
                    var ee = I.funcmode === "sample" ? K - 1 : K;
                    return ee ? Math.sqrt((q - $ * $ / K) / ee) : 0;
                  };
              }
            }(S, l.getDataConversions(x, w, A, D)), E = new Array(k.length), P = 0; P < k.length; P++) E[P] = L(D, k[P]);
            C.set(E), S.func === "count" && u.pushUnique(w._arrayAttrs, A);
          }
        }
        function c(x, w) {
          return w.length;
        }
        function g(x, w) {
          return x[w[0]];
        }
        function m(x, w) {
          return x[w[w.length - 1]];
        }
        s.supplyDefaults = function(x, w) {
          var k, S = {};
          function A(z, F) {
            return u.coerce(x, S, _, z, F);
          }
          if (!A("enabled")) return S;
          var C = i.findArrayAttributes(w), D = {};
          for (k = 0; k < C.length; k++) D[C[k]] = 1;
          var L = A("groups");
          if (!Array.isArray(L)) {
            if (!D[L]) return S.enabled = !1, S;
            D[L] = 0;
          }
          var E, P = x.aggregations || [], I = S.aggregations = new Array(P.length);
          function M(z, F) {
            return u.coerce(P[k], E, d, z, F);
          }
          for (k = 0; k < P.length; k++) {
            E = { _index: k };
            var O = M("target"), T = M("func");
            M("enabled") && O && (D[O] || T === "count" && D[O] === void 0) ? (T === "stddev" && M("funcmode"), D[O] = 0, I[k] = E) : I[k] = { enabled: !1, _index: k };
          }
          for (k = 0; k < C.length; k++) D[C[k]] && I.push({ target: C[k], func: d.func.dflt, enabled: !0, _index: -1 });
          return S;
        }, s.calcTransform = function(x, w, k) {
          if (k.enabled) {
            var S = k.groups, A = u.getTargetArray(w, { target: S });
            if (A) {
              var C, D, L, E, P = {}, I = {}, M = [], O = h(w.transforms, k), T = A.length;
              for (w._length && (T = Math.min(T, w._length)), C = 0; C < T; C++) (L = P[D = A[C]]) === void 0 ? (P[D] = M.length, E = [C], M.push(E), I[P[D]] = O(C)) : (M[L].push(C), I[P[D]] = (I[P[D]] || []).concat(O(C)));
              k._indexToPoints = I;
              var z = k.aggregations;
              for (C = 0; C < z.length; C++) f(x, w, M, z[C]);
              typeof S == "string" && f(x, w, M, { target: S, func: "first", enabled: !0 }), w._length = M.length;
            }
          }
        };
      }, 42849: function(o, s, n) {
        var l = n(34809), u = n(33626), i = n(29714), h = n(5086).z, p = n(20726), _ = p.COMPARISON_OPS, d = p.INTERVAL_OPS, f = p.SET_OPS;
        s.moduleType = "transform", s.name = "filter", s.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, target: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, operation: { valType: "enumerated", values: [].concat(_).concat(d).concat(f), dflt: "=", editType: "calc" }, value: { valType: "any", dflt: 0, editType: "calc" }, preservegaps: { valType: "boolean", dflt: !1, editType: "calc" }, editType: "calc" }, s.supplyDefaults = function(c) {
          var g = {};
          function m(k, S) {
            return l.coerce(c, g, s.attributes, k, S);
          }
          if (m("enabled")) {
            var x = m("target");
            if (l.isArrayOrTypedArray(x) && x.length === 0) return g.enabled = !1, g;
            m("preservegaps"), m("operation"), m("value");
            var w = u.getComponentMethod("calendars", "handleDefaults");
            w(c, g, "valuecalendar", null), w(c, g, "targetcalendar", null);
          }
          return g;
        }, s.calcTransform = function(c, g, m) {
          if (m.enabled) {
            var x = l.getTargetArray(g, m);
            if (x) {
              var w = m.target, k = x.length;
              g._length && (k = Math.min(k, g._length));
              var S = m.targetcalendar, A = g._arrayAttrs, C = m.preservegaps;
              if (typeof w == "string") {
                var D = l.nestedProperty(g, w + "calendar").get();
                D && (S = D);
              }
              var L, E, P = function(U, V, $) {
                var q = U.operation, K = U.value, re = l.isArrayOrTypedArray(K);
                function Y(Q) {
                  return Q.indexOf(q) !== -1;
                }
                var te, ee = function(Q) {
                  return V(Q, 0, U.valuecalendar);
                }, X = function(Q) {
                  return V(Q, 0, $);
                };
                switch (Y(_) ? te = ee(re ? K[0] : K) : Y(d) ? te = re ? [ee(K[0]), ee(K[1])] : [ee(K), ee(K)] : Y(f) && (te = re ? K.map(ee) : [ee(K)]), q) {
                  case "=":
                    return function(Q) {
                      return X(Q) === te;
                    };
                  case "!=":
                    return function(Q) {
                      return X(Q) !== te;
                    };
                  case "<":
                    return function(Q) {
                      return X(Q) < te;
                    };
                  case "<=":
                    return function(Q) {
                      return X(Q) <= te;
                    };
                  case ">":
                    return function(Q) {
                      return X(Q) > te;
                    };
                  case ">=":
                    return function(Q) {
                      return X(Q) >= te;
                    };
                  case "[]":
                    return function(Q) {
                      var ue = X(Q);
                      return ue >= te[0] && ue <= te[1];
                    };
                  case "()":
                    return function(Q) {
                      var ue = X(Q);
                      return ue > te[0] && ue < te[1];
                    };
                  case "[)":
                    return function(Q) {
                      var ue = X(Q);
                      return ue >= te[0] && ue < te[1];
                    };
                  case "(]":
                    return function(Q) {
                      var ue = X(Q);
                      return ue > te[0] && ue <= te[1];
                    };
                  case "][":
                    return function(Q) {
                      var ue = X(Q);
                      return ue <= te[0] || ue >= te[1];
                    };
                  case ")(":
                    return function(Q) {
                      var ue = X(Q);
                      return ue < te[0] || ue > te[1];
                    };
                  case "](":
                    return function(Q) {
                      var ue = X(Q);
                      return ue <= te[0] || ue > te[1];
                    };
                  case ")[":
                    return function(Q) {
                      var ue = X(Q);
                      return ue < te[0] || ue >= te[1];
                    };
                  case "{}":
                    return function(Q) {
                      return te.indexOf(X(Q)) !== -1;
                    };
                  case "}{":
                    return function(Q) {
                      return te.indexOf(X(Q)) === -1;
                    };
                }
              }(m, i.getDataToCoordFunc(c, g, w, x), S), I = {}, M = {}, O = 0;
              C ? (L = function(U) {
                I[U.astr] = l.extendDeep([], U.get()), U.set(new Array(k));
              }, E = function(U, V) {
                var $ = I[U.astr][V];
                U.get()[V] = $;
              }) : (L = function(U) {
                I[U.astr] = l.extendDeep([], U.get()), U.set([]);
              }, E = function(U, V) {
                var $ = I[U.astr][V];
                U.get().push($);
              }), F(L);
              for (var T = h(g.transforms, m), z = 0; z < k; z++) P(x[z]) ? (F(E, z), M[O++] = T(z)) : C && O++;
              m._indexToPoints = M, g._length = O;
            }
          }
          function F(U, V) {
            for (var $ = 0; $ < A.length; $++) U(l.nestedProperty(g, A[$]), V);
          }
        };
      }, 50453: function(o, s, n) {
        var l = n(34809), u = n(57297), i = n(44122), h = n(5086).z;
        function p(_, d) {
          var f, c, g, m, x, w, k, S, A, C, D = d.transform, L = d.transformIndex, E = _.transforms[L].groups, P = h(_.transforms, D);
          if (!l.isArrayOrTypedArray(E) || E.length === 0) return [_];
          var I = l.filterUnique(E), M = new Array(I.length), O = E.length, T = u.findArrayAttributes(_), z = D.styles || [], F = {};
          for (f = 0; f < z.length; f++) F[z[f].target] = z[f].value;
          D.styles && (C = l.keyedContainer(D, "styles", "target", "value.name"));
          var U = {}, V = {};
          for (f = 0; f < I.length; f++) {
            U[w = I[f]] = f, V[w] = 0, (k = M[f] = l.extendDeepNoArrays({}, _))._group = w, k.transforms[L]._indexToPoints = {};
            var $ = null;
            for (C && ($ = C.get(w)), k.name = $ || $ === "" ? $ : l.templateString(D.nameformat, { trace: _.name, group: w }), S = k.transforms, k.transforms = [], c = 0; c < S.length; c++) k.transforms[c] = l.extendDeepNoArrays({}, S[c]);
            for (c = 0; c < T.length; c++) l.nestedProperty(k, T[c]).set([]);
          }
          for (g = 0; g < T.length; g++) {
            for (m = T[g], c = 0, A = []; c < I.length; c++) A[c] = l.nestedProperty(M[c], m).get();
            for (x = l.nestedProperty(_, m).get(), c = 0; c < O; c++) A[U[E[c]]].push(x[c]);
          }
          for (c = 0; c < O; c++) (k = M[U[E[c]]]).transforms[L]._indexToPoints[V[E[c]]] = P(c), V[E[c]]++;
          for (f = 0; f < I.length; f++) w = I[f], k = M[f], i.clearExpandedTraceDefaultColors(k), k = l.extendDeepNoArrays(k, F[w] || {});
          return M;
        }
        s.moduleType = "transform", s.name = "groupby", s.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, groups: { valType: "data_array", dflt: [], editType: "calc" }, nameformat: { valType: "string", editType: "calc" }, styles: { _isLinkedToArray: "style", target: { valType: "string", editType: "calc" }, value: { valType: "any", dflt: {}, editType: "calc", _compareAsJSON: !0 }, editType: "calc" }, editType: "calc" }, s.supplyDefaults = function(_, d, f) {
          var c, g = {};
          function m(A, C) {
            return l.coerce(_, g, s.attributes, A, C);
          }
          if (!m("enabled")) return g;
          m("groups"), m("nameformat", f._dataLength > 1 ? "%{group} (%{trace})" : "%{group}");
          var x = _.styles, w = g.styles = [];
          if (x) for (c = 0; c < x.length; c++) {
            var k = w[c] = {};
            l.coerce(x[c], w[c], s.attributes.styles, "target");
            var S = l.coerce(x[c], w[c], s.attributes.styles, "value");
            l.isPlainObject(S) ? k.value = l.extendDeep({}, S) : S && delete k.value;
          }
          return g;
        }, s.transform = function(_, d) {
          var f, c, g, m = [];
          for (c = 0; c < _.length; c++) for (f = p(_[c], d), g = 0; g < f.length; g++) m.push(f[g]);
          return m;
        };
      }, 5086: function(o, s) {
        s.z = function(n, l) {
          for (var u, i, h = 0; h < n.length && (u = n[h]) !== l; h++) u._indexToPoints && u.enabled !== !1 && (i = u._indexToPoints);
          var p = i ? function(_) {
            return i[_];
          } : function(_) {
            return [_];
          };
          return p;
        };
      }, 99855: function(o, s, n) {
        var l = n(34809), u = n(29714), i = n(5086).z, h = n(63821).BADNUM;
        s.moduleType = "transform", s.name = "sort", s.attributes = { enabled: { valType: "boolean", dflt: !0, editType: "calc" }, target: { valType: "string", strict: !0, noBlank: !0, arrayOk: !0, dflt: "x", editType: "calc" }, order: { valType: "enumerated", values: ["ascending", "descending"], dflt: "ascending", editType: "calc" }, editType: "calc" }, s.supplyDefaults = function(p) {
          var _ = {};
          function d(f, c) {
            return l.coerce(p, _, s.attributes, f, c);
          }
          return d("enabled") && (d("target"), d("order")), _;
        }, s.calcTransform = function(p, _, d) {
          if (d.enabled) {
            var f = l.getTargetArray(_, d);
            if (f) {
              var c = d.target, g = f.length;
              _._length && (g = Math.min(g, _._length));
              var m, x, w = _._arrayAttrs, k = function(E, P, I, M) {
                var O, T = new Array(M), z = new Array(M);
                for (O = 0; O < M; O++) T[O] = { v: P[O], i: O };
                for (T.sort(function(F, U) {
                  switch (F.order) {
                    case "ascending":
                      return function(V, $) {
                        var q = U(V.v), K = U($.v);
                        return q === h ? 1 : K === h ? -1 : q - K;
                      };
                    case "descending":
                      return function(V, $) {
                        var q = U(V.v), K = U($.v);
                        return q === h ? 1 : K === h ? -1 : K - q;
                      };
                  }
                }(E, I)), O = 0; O < M; O++) z[O] = T[O].i;
                return z;
              }(d, f, u.getDataToCoordFunc(p, _, c, f), g), S = i(_.transforms, d), A = {};
              for (m = 0; m < w.length; m++) {
                var C = l.nestedProperty(_, w[m]), D = C.get(), L = new Array(g);
                for (x = 0; x < g; x++) L[x] = D[k[x]];
                C.set(L);
              }
              for (x = 0; x < g; x++) A[x] = S(k[x]);
              d._indexToPoints = A, _._length = g;
            }
          }
        };
      }, 29697: function(o, s) {
        s.version = "2.35.2";
      }, 99098: function(o, s, n) {
        var l = n(45708).Buffer, u = n(33282);
        (function() {
          var i = { 1964: function(d, f, c) {
            d.exports = { alpha_shape: c(3502), convex_hull: c(7352), delaunay_triangulate: c(7642), gl_cone3d: c(6405), gl_error3d: c(9165), gl_heatmap2d: c(2510), gl_line3d: c(5714), gl_mesh3d: c(7201), gl_plot2d: c(1850), gl_plot3d: c(4100), gl_pointcloud2d: c(4696), gl_scatter3d: c(8418), gl_select_box: c(3161), gl_spikes2d: c(4098), gl_streamtube3d: c(7815), gl_surface3d: c(9499), ndarray: c(9618), ndarray_linear_interpolate: c(4317) };
          }, 4793: function(d, f, c) {
            function g(_e, Be) {
              for (var $e = 0; $e < Be.length; $e++) {
                var Ze = Be[$e];
                Ze.enumerable = Ze.enumerable || !1, Ze.configurable = !0, "value" in Ze && (Ze.writable = !0), Object.defineProperty(_e, m(Ze.key), Ze);
              }
            }
            function m(_e) {
              var Be = function($e, Ze) {
                if (S($e) != "object" || !$e) return $e;
                var ct = $e[Symbol.toPrimitive];
                if (ct !== void 0) {
                  var ft = ct.call($e, "string");
                  if (S(ft) != "object") return ft;
                  throw new TypeError("@@toPrimitive must return a primitive value.");
                }
                return String($e);
              }(_e);
              return S(Be) == "symbol" ? Be : Be + "";
            }
            function x() {
              try {
                var _e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
                }));
              } catch {
              }
              return (x = function() {
                return !!_e;
              })();
            }
            function w(_e) {
              return w = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(Be) {
                return Be.__proto__ || Object.getPrototypeOf(Be);
              }, w(_e);
            }
            function k(_e, Be) {
              return k = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function($e, Ze) {
                return $e.__proto__ = Ze, $e;
              }, k(_e, Be);
            }
            function S(_e) {
              return S = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Be) {
                return typeof Be;
              } : function(Be) {
                return Be && typeof Symbol == "function" && Be.constructor === Symbol && Be !== Symbol.prototype ? "symbol" : typeof Be;
              }, S(_e);
            }
            var A = c(7507), C = c(3778), D = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
            f.hp = P, f.IS = 50;
            var L = 2147483647;
            function E(_e) {
              if (_e > L) throw new RangeError('The value "' + _e + '" is invalid for option "size"');
              var Be = new Uint8Array(_e);
              return Object.setPrototypeOf(Be, P.prototype), Be;
            }
            function P(_e, Be, $e) {
              if (typeof _e == "number") {
                if (typeof Be == "string") throw new TypeError('The "string" argument must be of type string. Received type number');
                return O(_e);
              }
              return I(_e, Be, $e);
            }
            function I(_e, Be, $e) {
              if (typeof _e == "string") return function(ft, _t) {
                if (typeof _t == "string" && _t !== "" || (_t = "utf8"), !P.isEncoding(_t)) throw new TypeError("Unknown encoding: " + _t);
                var Pt = 0 | U(ft, _t), Dt = E(Pt), $t = Dt.write(ft, _t);
                return $t !== Pt && (Dt = Dt.slice(0, $t)), Dt;
              }(_e, Be);
              if (ArrayBuffer.isView(_e)) return function(ft) {
                if (Ge(ft, Uint8Array)) {
                  var _t = new Uint8Array(ft);
                  return z(_t.buffer, _t.byteOffset, _t.byteLength);
                }
                return T(ft);
              }(_e);
              if (_e == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + S(_e));
              if (Ge(_e, ArrayBuffer) || _e && Ge(_e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Ge(_e, SharedArrayBuffer) || _e && Ge(_e.buffer, SharedArrayBuffer))) return z(_e, Be, $e);
              if (typeof _e == "number") throw new TypeError('The "value" argument must not be of type number. Received type number');
              var Ze = _e.valueOf && _e.valueOf();
              if (Ze != null && Ze !== _e) return P.from(Ze, Be, $e);
              var ct = function(ft) {
                if (P.isBuffer(ft)) {
                  var _t = 0 | F(ft.length), Pt = E(_t);
                  return Pt.length === 0 || ft.copy(Pt, 0, 0, _t), Pt;
                }
                return ft.length !== void 0 ? typeof ft.length != "number" || Re(ft.length) ? E(0) : T(ft) : ft.type === "Buffer" && Array.isArray(ft.data) ? T(ft.data) : void 0;
              }(_e);
              if (ct) return ct;
              if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof _e[Symbol.toPrimitive] == "function") return P.from(_e[Symbol.toPrimitive]("string"), Be, $e);
              throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + S(_e));
            }
            function M(_e) {
              if (typeof _e != "number") throw new TypeError('"size" argument must be of type number');
              if (_e < 0) throw new RangeError('The value "' + _e + '" is invalid for option "size"');
            }
            function O(_e) {
              return M(_e), E(_e < 0 ? 0 : 0 | F(_e));
            }
            function T(_e) {
              for (var Be = _e.length < 0 ? 0 : 0 | F(_e.length), $e = E(Be), Ze = 0; Ze < Be; Ze += 1) $e[Ze] = 255 & _e[Ze];
              return $e;
            }
            function z(_e, Be, $e) {
              if (Be < 0 || _e.byteLength < Be) throw new RangeError('"offset" is outside of buffer bounds');
              if (_e.byteLength < Be + ($e || 0)) throw new RangeError('"length" is outside of buffer bounds');
              var Ze;
              return Ze = Be === void 0 && $e === void 0 ? new Uint8Array(_e) : $e === void 0 ? new Uint8Array(_e, Be) : new Uint8Array(_e, Be, $e), Object.setPrototypeOf(Ze, P.prototype), Ze;
            }
            function F(_e) {
              if (_e >= L) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + L.toString(16) + " bytes");
              return 0 | _e;
            }
            function U(_e, Be) {
              if (P.isBuffer(_e)) return _e.length;
              if (ArrayBuffer.isView(_e) || Ge(_e, ArrayBuffer)) return _e.byteLength;
              if (typeof _e != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + S(_e));
              var $e = _e.length, Ze = arguments.length > 2 && arguments[2] === !0;
              if (!Ze && $e === 0) return 0;
              for (var ct = !1; ; ) switch (Be) {
                case "ascii":
                case "latin1":
                case "binary":
                  return $e;
                case "utf8":
                case "utf-8":
                  return ge(_e).length;
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return 2 * $e;
                case "hex":
                  return $e >>> 1;
                case "base64":
                  return Ce(_e).length;
                default:
                  if (ct) return Ze ? -1 : ge(_e).length;
                  Be = ("" + Be).toLowerCase(), ct = !0;
              }
            }
            function V(_e, Be, $e) {
              var Ze = !1;
              if ((Be === void 0 || Be < 0) && (Be = 0), Be > this.length || (($e === void 0 || $e > this.length) && ($e = this.length), $e <= 0) || ($e >>>= 0) <= (Be >>>= 0)) return "";
              for (_e || (_e = "utf8"); ; ) switch (_e) {
                case "hex":
                  return ne(this, Be, $e);
                case "utf8":
                case "utf-8":
                  return ue(this, Be, $e);
                case "ascii":
                  return he(this, Be, $e);
                case "latin1":
                case "binary":
                  return de(this, Be, $e);
                case "base64":
                  return Q(this, Be, $e);
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return ae(this, Be, $e);
                default:
                  if (Ze) throw new TypeError("Unknown encoding: " + _e);
                  _e = (_e + "").toLowerCase(), Ze = !0;
              }
            }
            function $(_e, Be, $e) {
              var Ze = _e[Be];
              _e[Be] = _e[$e], _e[$e] = Ze;
            }
            function q(_e, Be, $e, Ze, ct) {
              if (_e.length === 0) return -1;
              if (typeof $e == "string" ? (Ze = $e, $e = 0) : $e > 2147483647 ? $e = 2147483647 : $e < -2147483648 && ($e = -2147483648), Re($e = +$e) && ($e = ct ? 0 : _e.length - 1), $e < 0 && ($e = _e.length + $e), $e >= _e.length) {
                if (ct) return -1;
                $e = _e.length - 1;
              } else if ($e < 0) {
                if (!ct) return -1;
                $e = 0;
              }
              if (typeof Be == "string" && (Be = P.from(Be, Ze)), P.isBuffer(Be)) return Be.length === 0 ? -1 : K(_e, Be, $e, Ze, ct);
              if (typeof Be == "number") return Be &= 255, typeof Uint8Array.prototype.indexOf == "function" ? ct ? Uint8Array.prototype.indexOf.call(_e, Be, $e) : Uint8Array.prototype.lastIndexOf.call(_e, Be, $e) : K(_e, [Be], $e, Ze, ct);
              throw new TypeError("val must be string, number or Buffer");
            }
            function K(_e, Be, $e, Ze, ct) {
              var ft, _t = 1, Pt = _e.length, Dt = Be.length;
              if (Ze !== void 0 && ((Ze = String(Ze).toLowerCase()) === "ucs2" || Ze === "ucs-2" || Ze === "utf16le" || Ze === "utf-16le")) {
                if (_e.length < 2 || Be.length < 2) return -1;
                _t = 2, Pt /= 2, Dt /= 2, $e /= 2;
              }
              function $t(at, vt) {
                return _t === 1 ? at[vt] : at.readUInt16BE(vt * _t);
              }
              if (ct) {
                var Gt = -1;
                for (ft = $e; ft < Pt; ft++) if ($t(_e, ft) === $t(Be, Gt === -1 ? 0 : ft - Gt)) {
                  if (Gt === -1 && (Gt = ft), ft - Gt + 1 === Dt) return Gt * _t;
                } else Gt !== -1 && (ft -= ft - Gt), Gt = -1;
              } else for ($e + Dt > Pt && ($e = Pt - Dt), ft = $e; ft >= 0; ft--) {
                for (var Wt = !0, mt = 0; mt < Dt; mt++) if ($t(_e, ft + mt) !== $t(Be, mt)) {
                  Wt = !1;
                  break;
                }
                if (Wt) return ft;
              }
              return -1;
            }
            function re(_e, Be, $e, Ze) {
              $e = Number($e) || 0;
              var ct = _e.length - $e;
              Ze ? (Ze = Number(Ze)) > ct && (Ze = ct) : Ze = ct;
              var ft, _t = Be.length;
              for (Ze > _t / 2 && (Ze = _t / 2), ft = 0; ft < Ze; ++ft) {
                var Pt = parseInt(Be.substr(2 * ft, 2), 16);
                if (Re(Pt)) return ft;
                _e[$e + ft] = Pt;
              }
              return ft;
            }
            function Y(_e, Be, $e, Ze) {
              return we(ge(Be, _e.length - $e), _e, $e, Ze);
            }
            function te(_e, Be, $e, Ze) {
              return we(function(ct) {
                for (var ft = [], _t = 0; _t < ct.length; ++_t) ft.push(255 & ct.charCodeAt(_t));
                return ft;
              }(Be), _e, $e, Ze);
            }
            function ee(_e, Be, $e, Ze) {
              return we(Ce(Be), _e, $e, Ze);
            }
            function X(_e, Be, $e, Ze) {
              return we(function(ct, ft) {
                for (var _t, Pt, Dt, $t = [], Gt = 0; Gt < ct.length && !((ft -= 2) < 0); ++Gt) Pt = (_t = ct.charCodeAt(Gt)) >> 8, Dt = _t % 256, $t.push(Dt), $t.push(Pt);
                return $t;
              }(Be, _e.length - $e), _e, $e, Ze);
            }
            function Q(_e, Be, $e) {
              return Be === 0 && $e === _e.length ? A.fromByteArray(_e) : A.fromByteArray(_e.slice(Be, $e));
            }
            function ue(_e, Be, $e) {
              $e = Math.min(_e.length, $e);
              for (var Ze = [], ct = Be; ct < $e; ) {
                var ft = _e[ct], _t = null, Pt = ft > 239 ? 4 : ft > 223 ? 3 : ft > 191 ? 2 : 1;
                if (ct + Pt <= $e) {
                  var Dt = void 0, $t = void 0, Gt = void 0, Wt = void 0;
                  switch (Pt) {
                    case 1:
                      ft < 128 && (_t = ft);
                      break;
                    case 2:
                      (192 & (Dt = _e[ct + 1])) == 128 && (Wt = (31 & ft) << 6 | 63 & Dt) > 127 && (_t = Wt);
                      break;
                    case 3:
                      Dt = _e[ct + 1], $t = _e[ct + 2], (192 & Dt) == 128 && (192 & $t) == 128 && (Wt = (15 & ft) << 12 | (63 & Dt) << 6 | 63 & $t) > 2047 && (Wt < 55296 || Wt > 57343) && (_t = Wt);
                      break;
                    case 4:
                      Dt = _e[ct + 1], $t = _e[ct + 2], Gt = _e[ct + 3], (192 & Dt) == 128 && (192 & $t) == 128 && (192 & Gt) == 128 && (Wt = (15 & ft) << 18 | (63 & Dt) << 12 | (63 & $t) << 6 | 63 & Gt) > 65535 && Wt < 1114112 && (_t = Wt);
                  }
                }
                _t === null ? (_t = 65533, Pt = 1) : _t > 65535 && (_t -= 65536, Ze.push(_t >>> 10 & 1023 | 55296), _t = 56320 | 1023 & _t), Ze.push(_t), ct += Pt;
              }
              return function(mt) {
                var at = mt.length;
                if (at <= ce) return String.fromCharCode.apply(String, mt);
                for (var vt = "", St = 0; St < at; ) vt += String.fromCharCode.apply(String, mt.slice(St, St += ce));
                return vt;
              }(Ze);
            }
            P.TYPED_ARRAY_SUPPORT = function() {
              try {
                var _e = new Uint8Array(1), Be = { foo: function() {
                  return 42;
                } };
                return Object.setPrototypeOf(Be, Uint8Array.prototype), Object.setPrototypeOf(_e, Be), _e.foo() === 42;
              } catch {
                return !1;
              }
            }(), P.TYPED_ARRAY_SUPPORT || typeof console > "u" || typeof console.error != "function" || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(P.prototype, "parent", { enumerable: !0, get: function() {
              if (P.isBuffer(this)) return this.buffer;
            } }), Object.defineProperty(P.prototype, "offset", { enumerable: !0, get: function() {
              if (P.isBuffer(this)) return this.byteOffset;
            } }), P.poolSize = 8192, P.from = function(_e, Be, $e) {
              return I(_e, Be, $e);
            }, Object.setPrototypeOf(P.prototype, Uint8Array.prototype), Object.setPrototypeOf(P, Uint8Array), P.alloc = function(_e, Be, $e) {
              return function(Ze, ct, ft) {
                return M(Ze), Ze <= 0 ? E(Ze) : ct !== void 0 ? typeof ft == "string" ? E(Ze).fill(ct, ft) : E(Ze).fill(ct) : E(Ze);
              }(_e, Be, $e);
            }, P.allocUnsafe = function(_e) {
              return O(_e);
            }, P.allocUnsafeSlow = function(_e) {
              return O(_e);
            }, P.isBuffer = function(_e) {
              return _e != null && _e._isBuffer === !0 && _e !== P.prototype;
            }, P.compare = function(_e, Be) {
              if (Ge(_e, Uint8Array) && (_e = P.from(_e, _e.offset, _e.byteLength)), Ge(Be, Uint8Array) && (Be = P.from(Be, Be.offset, Be.byteLength)), !P.isBuffer(_e) || !P.isBuffer(Be)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
              if (_e === Be) return 0;
              for (var $e = _e.length, Ze = Be.length, ct = 0, ft = Math.min($e, Ze); ct < ft; ++ct) if (_e[ct] !== Be[ct]) {
                $e = _e[ct], Ze = Be[ct];
                break;
              }
              return $e < Ze ? -1 : Ze < $e ? 1 : 0;
            }, P.isEncoding = function(_e) {
              switch (String(_e).toLowerCase()) {
                case "hex":
                case "utf8":
                case "utf-8":
                case "ascii":
                case "latin1":
                case "binary":
                case "base64":
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return !0;
                default:
                  return !1;
              }
            }, P.concat = function(_e, Be) {
              if (!Array.isArray(_e)) throw new TypeError('"list" argument must be an Array of Buffers');
              if (_e.length === 0) return P.alloc(0);
              var $e;
              if (Be === void 0) for (Be = 0, $e = 0; $e < _e.length; ++$e) Be += _e[$e].length;
              var Ze = P.allocUnsafe(Be), ct = 0;
              for ($e = 0; $e < _e.length; ++$e) {
                var ft = _e[$e];
                if (Ge(ft, Uint8Array)) ct + ft.length > Ze.length ? (P.isBuffer(ft) || (ft = P.from(ft)), ft.copy(Ze, ct)) : Uint8Array.prototype.set.call(Ze, ft, ct);
                else {
                  if (!P.isBuffer(ft)) throw new TypeError('"list" argument must be an Array of Buffers');
                  ft.copy(Ze, ct);
                }
                ct += ft.length;
              }
              return Ze;
            }, P.byteLength = U, P.prototype._isBuffer = !0, P.prototype.swap16 = function() {
              var _e = this.length;
              if (_e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
              for (var Be = 0; Be < _e; Be += 2) $(this, Be, Be + 1);
              return this;
            }, P.prototype.swap32 = function() {
              var _e = this.length;
              if (_e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
              for (var Be = 0; Be < _e; Be += 4) $(this, Be, Be + 3), $(this, Be + 1, Be + 2);
              return this;
            }, P.prototype.swap64 = function() {
              var _e = this.length;
              if (_e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
              for (var Be = 0; Be < _e; Be += 8) $(this, Be, Be + 7), $(this, Be + 1, Be + 6), $(this, Be + 2, Be + 5), $(this, Be + 3, Be + 4);
              return this;
            }, P.prototype.toString = function() {
              var _e = this.length;
              return _e === 0 ? "" : arguments.length === 0 ? ue(this, 0, _e) : V.apply(this, arguments);
            }, P.prototype.toLocaleString = P.prototype.toString, P.prototype.equals = function(_e) {
              if (!P.isBuffer(_e)) throw new TypeError("Argument must be a Buffer");
              return this === _e || P.compare(this, _e) === 0;
            }, P.prototype.inspect = function() {
              var _e = "", Be = f.IS;
              return _e = this.toString("hex", 0, Be).replace(/(.{2})/g, "$1 ").trim(), this.length > Be && (_e += " ... "), "<Buffer " + _e + ">";
            }, D && (P.prototype[D] = P.prototype.inspect), P.prototype.compare = function(_e, Be, $e, Ze, ct) {
              if (Ge(_e, Uint8Array) && (_e = P.from(_e, _e.offset, _e.byteLength)), !P.isBuffer(_e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + S(_e));
              if (Be === void 0 && (Be = 0), $e === void 0 && ($e = _e ? _e.length : 0), Ze === void 0 && (Ze = 0), ct === void 0 && (ct = this.length), Be < 0 || $e > _e.length || Ze < 0 || ct > this.length) throw new RangeError("out of range index");
              if (Ze >= ct && Be >= $e) return 0;
              if (Ze >= ct) return -1;
              if (Be >= $e) return 1;
              if (this === _e) return 0;
              for (var ft = (ct >>>= 0) - (Ze >>>= 0), _t = ($e >>>= 0) - (Be >>>= 0), Pt = Math.min(ft, _t), Dt = this.slice(Ze, ct), $t = _e.slice(Be, $e), Gt = 0; Gt < Pt; ++Gt) if (Dt[Gt] !== $t[Gt]) {
                ft = Dt[Gt], _t = $t[Gt];
                break;
              }
              return ft < _t ? -1 : _t < ft ? 1 : 0;
            }, P.prototype.includes = function(_e, Be, $e) {
              return this.indexOf(_e, Be, $e) !== -1;
            }, P.prototype.indexOf = function(_e, Be, $e) {
              return q(this, _e, Be, $e, !0);
            }, P.prototype.lastIndexOf = function(_e, Be, $e) {
              return q(this, _e, Be, $e, !1);
            }, P.prototype.write = function(_e, Be, $e, Ze) {
              if (Be === void 0) Ze = "utf8", $e = this.length, Be = 0;
              else if ($e === void 0 && typeof Be == "string") Ze = Be, $e = this.length, Be = 0;
              else {
                if (!isFinite(Be)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
                Be >>>= 0, isFinite($e) ? ($e >>>= 0, Ze === void 0 && (Ze = "utf8")) : (Ze = $e, $e = void 0);
              }
              var ct = this.length - Be;
              if (($e === void 0 || $e > ct) && ($e = ct), _e.length > 0 && ($e < 0 || Be < 0) || Be > this.length) throw new RangeError("Attempt to write outside buffer bounds");
              Ze || (Ze = "utf8");
              for (var ft = !1; ; ) switch (Ze) {
                case "hex":
                  return re(this, _e, Be, $e);
                case "utf8":
                case "utf-8":
                  return Y(this, _e, Be, $e);
                case "ascii":
                case "latin1":
                case "binary":
                  return te(this, _e, Be, $e);
                case "base64":
                  return ee(this, _e, Be, $e);
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return X(this, _e, Be, $e);
                default:
                  if (ft) throw new TypeError("Unknown encoding: " + Ze);
                  Ze = ("" + Ze).toLowerCase(), ft = !0;
              }
            }, P.prototype.toJSON = function() {
              return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
            };
            var ce = 4096;
            function he(_e, Be, $e) {
              var Ze = "";
              $e = Math.min(_e.length, $e);
              for (var ct = Be; ct < $e; ++ct) Ze += String.fromCharCode(127 & _e[ct]);
              return Ze;
            }
            function de(_e, Be, $e) {
              var Ze = "";
              $e = Math.min(_e.length, $e);
              for (var ct = Be; ct < $e; ++ct) Ze += String.fromCharCode(_e[ct]);
              return Ze;
            }
            function ne(_e, Be, $e) {
              var Ze = _e.length;
              (!Be || Be < 0) && (Be = 0), (!$e || $e < 0 || $e > Ze) && ($e = Ze);
              for (var ct = "", ft = Be; ft < $e; ++ft) ct += je[_e[ft]];
              return ct;
            }
            function ae(_e, Be, $e) {
              for (var Ze = _e.slice(Be, $e), ct = "", ft = 0; ft < Ze.length - 1; ft += 2) ct += String.fromCharCode(Ze[ft] + 256 * Ze[ft + 1]);
              return ct;
            }
            function se(_e, Be, $e) {
              if (_e % 1 != 0 || _e < 0) throw new RangeError("offset is not uint");
              if (_e + Be > $e) throw new RangeError("Trying to access beyond buffer length");
            }
            function me(_e, Be, $e, Ze, ct, ft) {
              if (!P.isBuffer(_e)) throw new TypeError('"buffer" argument must be a Buffer instance');
              if (Be > ct || Be < ft) throw new RangeError('"value" argument is out of bounds');
              if ($e + Ze > _e.length) throw new RangeError("Index out of range");
            }
            function ye(_e, Be, $e, Ze, ct) {
              We(Be, Ze, ct, _e, $e, 7);
              var ft = Number(Be & BigInt(4294967295));
              _e[$e++] = ft, ft >>= 8, _e[$e++] = ft, ft >>= 8, _e[$e++] = ft, ft >>= 8, _e[$e++] = ft;
              var _t = Number(Be >> BigInt(32) & BigInt(4294967295));
              return _e[$e++] = _t, _t >>= 8, _e[$e++] = _t, _t >>= 8, _e[$e++] = _t, _t >>= 8, _e[$e++] = _t, $e;
            }
            function pe(_e, Be, $e, Ze, ct) {
              We(Be, Ze, ct, _e, $e, 7);
              var ft = Number(Be & BigInt(4294967295));
              _e[$e + 7] = ft, ft >>= 8, _e[$e + 6] = ft, ft >>= 8, _e[$e + 5] = ft, ft >>= 8, _e[$e + 4] = ft;
              var _t = Number(Be >> BigInt(32) & BigInt(4294967295));
              return _e[$e + 3] = _t, _t >>= 8, _e[$e + 2] = _t, _t >>= 8, _e[$e + 1] = _t, _t >>= 8, _e[$e] = _t, $e + 8;
            }
            function be(_e, Be, $e, Ze, ct, ft) {
              if ($e + Ze > _e.length) throw new RangeError("Index out of range");
              if ($e < 0) throw new RangeError("Index out of range");
            }
            function Ae(_e, Be, $e, Ze, ct) {
              return Be = +Be, $e >>>= 0, ct || be(_e, 0, $e, 4), C.write(_e, Be, $e, Ze, 23, 4), $e + 4;
            }
            function Se(_e, Be, $e, Ze, ct) {
              return Be = +Be, $e >>>= 0, ct || be(_e, 0, $e, 8), C.write(_e, Be, $e, Ze, 52, 8), $e + 8;
            }
            P.prototype.slice = function(_e, Be) {
              var $e = this.length;
              (_e = ~~_e) < 0 ? (_e += $e) < 0 && (_e = 0) : _e > $e && (_e = $e), (Be = Be === void 0 ? $e : ~~Be) < 0 ? (Be += $e) < 0 && (Be = 0) : Be > $e && (Be = $e), Be < _e && (Be = _e);
              var Ze = this.subarray(_e, Be);
              return Object.setPrototypeOf(Ze, P.prototype), Ze;
            }, P.prototype.readUintLE = P.prototype.readUIntLE = function(_e, Be, $e) {
              _e >>>= 0, Be >>>= 0, $e || se(_e, Be, this.length);
              for (var Ze = this[_e], ct = 1, ft = 0; ++ft < Be && (ct *= 256); ) Ze += this[_e + ft] * ct;
              return Ze;
            }, P.prototype.readUintBE = P.prototype.readUIntBE = function(_e, Be, $e) {
              _e >>>= 0, Be >>>= 0, $e || se(_e, Be, this.length);
              for (var Ze = this[_e + --Be], ct = 1; Be > 0 && (ct *= 256); ) Ze += this[_e + --Be] * ct;
              return Ze;
            }, P.prototype.readUint8 = P.prototype.readUInt8 = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 1, this.length), this[_e];
            }, P.prototype.readUint16LE = P.prototype.readUInt16LE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 2, this.length), this[_e] | this[_e + 1] << 8;
            }, P.prototype.readUint16BE = P.prototype.readUInt16BE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 2, this.length), this[_e] << 8 | this[_e + 1];
            }, P.prototype.readUint32LE = P.prototype.readUInt32LE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), (this[_e] | this[_e + 1] << 8 | this[_e + 2] << 16) + 16777216 * this[_e + 3];
            }, P.prototype.readUint32BE = P.prototype.readUInt32BE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), 16777216 * this[_e] + (this[_e + 1] << 16 | this[_e + 2] << 8 | this[_e + 3]);
            }, P.prototype.readBigUInt64LE = Ke(function(_e) {
              Ee(_e >>>= 0, "offset");
              var Be = this[_e], $e = this[_e + 7];
              Be !== void 0 && $e !== void 0 || Ne(_e, this.length - 8);
              var Ze = Be + this[++_e] * Math.pow(2, 8) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 24), ct = this[++_e] + this[++_e] * Math.pow(2, 8) + this[++_e] * Math.pow(2, 16) + $e * Math.pow(2, 24);
              return BigInt(Ze) + (BigInt(ct) << BigInt(32));
            }), P.prototype.readBigUInt64BE = Ke(function(_e) {
              Ee(_e >>>= 0, "offset");
              var Be = this[_e], $e = this[_e + 7];
              Be !== void 0 && $e !== void 0 || Ne(_e, this.length - 8);
              var Ze = Be * Math.pow(2, 24) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 8) + this[++_e], ct = this[++_e] * Math.pow(2, 24) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 8) + $e;
              return (BigInt(Ze) << BigInt(32)) + BigInt(ct);
            }), P.prototype.readIntLE = function(_e, Be, $e) {
              _e >>>= 0, Be >>>= 0, $e || se(_e, Be, this.length);
              for (var Ze = this[_e], ct = 1, ft = 0; ++ft < Be && (ct *= 256); ) Ze += this[_e + ft] * ct;
              return Ze >= (ct *= 128) && (Ze -= Math.pow(2, 8 * Be)), Ze;
            }, P.prototype.readIntBE = function(_e, Be, $e) {
              _e >>>= 0, Be >>>= 0, $e || se(_e, Be, this.length);
              for (var Ze = Be, ct = 1, ft = this[_e + --Ze]; Ze > 0 && (ct *= 256); ) ft += this[_e + --Ze] * ct;
              return ft >= (ct *= 128) && (ft -= Math.pow(2, 8 * Be)), ft;
            }, P.prototype.readInt8 = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 1, this.length), 128 & this[_e] ? -1 * (255 - this[_e] + 1) : this[_e];
            }, P.prototype.readInt16LE = function(_e, Be) {
              _e >>>= 0, Be || se(_e, 2, this.length);
              var $e = this[_e] | this[_e + 1] << 8;
              return 32768 & $e ? 4294901760 | $e : $e;
            }, P.prototype.readInt16BE = function(_e, Be) {
              _e >>>= 0, Be || se(_e, 2, this.length);
              var $e = this[_e + 1] | this[_e] << 8;
              return 32768 & $e ? 4294901760 | $e : $e;
            }, P.prototype.readInt32LE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), this[_e] | this[_e + 1] << 8 | this[_e + 2] << 16 | this[_e + 3] << 24;
            }, P.prototype.readInt32BE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), this[_e] << 24 | this[_e + 1] << 16 | this[_e + 2] << 8 | this[_e + 3];
            }, P.prototype.readBigInt64LE = Ke(function(_e) {
              Ee(_e >>>= 0, "offset");
              var Be = this[_e], $e = this[_e + 7];
              Be !== void 0 && $e !== void 0 || Ne(_e, this.length - 8);
              var Ze = this[_e + 4] + this[_e + 5] * Math.pow(2, 8) + this[_e + 6] * Math.pow(2, 16) + ($e << 24);
              return (BigInt(Ze) << BigInt(32)) + BigInt(Be + this[++_e] * Math.pow(2, 8) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 24));
            }), P.prototype.readBigInt64BE = Ke(function(_e) {
              Ee(_e >>>= 0, "offset");
              var Be = this[_e], $e = this[_e + 7];
              Be !== void 0 && $e !== void 0 || Ne(_e, this.length - 8);
              var Ze = (Be << 24) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 8) + this[++_e];
              return (BigInt(Ze) << BigInt(32)) + BigInt(this[++_e] * Math.pow(2, 24) + this[++_e] * Math.pow(2, 16) + this[++_e] * Math.pow(2, 8) + $e);
            }), P.prototype.readFloatLE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), C.read(this, _e, !0, 23, 4);
            }, P.prototype.readFloatBE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 4, this.length), C.read(this, _e, !1, 23, 4);
            }, P.prototype.readDoubleLE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 8, this.length), C.read(this, _e, !0, 52, 8);
            }, P.prototype.readDoubleBE = function(_e, Be) {
              return _e >>>= 0, Be || se(_e, 8, this.length), C.read(this, _e, !1, 52, 8);
            }, P.prototype.writeUintLE = P.prototype.writeUIntLE = function(_e, Be, $e, Ze) {
              _e = +_e, Be >>>= 0, $e >>>= 0, Ze || me(this, _e, Be, $e, Math.pow(2, 8 * $e) - 1, 0);
              var ct = 1, ft = 0;
              for (this[Be] = 255 & _e; ++ft < $e && (ct *= 256); ) this[Be + ft] = _e / ct & 255;
              return Be + $e;
            }, P.prototype.writeUintBE = P.prototype.writeUIntBE = function(_e, Be, $e, Ze) {
              _e = +_e, Be >>>= 0, $e >>>= 0, Ze || me(this, _e, Be, $e, Math.pow(2, 8 * $e) - 1, 0);
              var ct = $e - 1, ft = 1;
              for (this[Be + ct] = 255 & _e; --ct >= 0 && (ft *= 256); ) this[Be + ct] = _e / ft & 255;
              return Be + $e;
            }, P.prototype.writeUint8 = P.prototype.writeUInt8 = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 1, 255, 0), this[Be] = 255 & _e, Be + 1;
            }, P.prototype.writeUint16LE = P.prototype.writeUInt16LE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 2, 65535, 0), this[Be] = 255 & _e, this[Be + 1] = _e >>> 8, Be + 2;
            }, P.prototype.writeUint16BE = P.prototype.writeUInt16BE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 2, 65535, 0), this[Be] = _e >>> 8, this[Be + 1] = 255 & _e, Be + 2;
            }, P.prototype.writeUint32LE = P.prototype.writeUInt32LE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 4, 4294967295, 0), this[Be + 3] = _e >>> 24, this[Be + 2] = _e >>> 16, this[Be + 1] = _e >>> 8, this[Be] = 255 & _e, Be + 4;
            }, P.prototype.writeUint32BE = P.prototype.writeUInt32BE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 4, 4294967295, 0), this[Be] = _e >>> 24, this[Be + 1] = _e >>> 16, this[Be + 2] = _e >>> 8, this[Be + 3] = 255 & _e, Be + 4;
            }, P.prototype.writeBigUInt64LE = Ke(function(_e) {
              return ye(this, _e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, BigInt(0), BigInt("0xffffffffffffffff"));
            }), P.prototype.writeBigUInt64BE = Ke(function(_e) {
              return pe(this, _e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, BigInt(0), BigInt("0xffffffffffffffff"));
            }), P.prototype.writeIntLE = function(_e, Be, $e, Ze) {
              if (_e = +_e, Be >>>= 0, !Ze) {
                var ct = Math.pow(2, 8 * $e - 1);
                me(this, _e, Be, $e, ct - 1, -ct);
              }
              var ft = 0, _t = 1, Pt = 0;
              for (this[Be] = 255 & _e; ++ft < $e && (_t *= 256); ) _e < 0 && Pt === 0 && this[Be + ft - 1] !== 0 && (Pt = 1), this[Be + ft] = (_e / _t >> 0) - Pt & 255;
              return Be + $e;
            }, P.prototype.writeIntBE = function(_e, Be, $e, Ze) {
              if (_e = +_e, Be >>>= 0, !Ze) {
                var ct = Math.pow(2, 8 * $e - 1);
                me(this, _e, Be, $e, ct - 1, -ct);
              }
              var ft = $e - 1, _t = 1, Pt = 0;
              for (this[Be + ft] = 255 & _e; --ft >= 0 && (_t *= 256); ) _e < 0 && Pt === 0 && this[Be + ft + 1] !== 0 && (Pt = 1), this[Be + ft] = (_e / _t >> 0) - Pt & 255;
              return Be + $e;
            }, P.prototype.writeInt8 = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 1, 127, -128), _e < 0 && (_e = 255 + _e + 1), this[Be] = 255 & _e, Be + 1;
            }, P.prototype.writeInt16LE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 2, 32767, -32768), this[Be] = 255 & _e, this[Be + 1] = _e >>> 8, Be + 2;
            }, P.prototype.writeInt16BE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 2, 32767, -32768), this[Be] = _e >>> 8, this[Be + 1] = 255 & _e, Be + 2;
            }, P.prototype.writeInt32LE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 4, 2147483647, -2147483648), this[Be] = 255 & _e, this[Be + 1] = _e >>> 8, this[Be + 2] = _e >>> 16, this[Be + 3] = _e >>> 24, Be + 4;
            }, P.prototype.writeInt32BE = function(_e, Be, $e) {
              return _e = +_e, Be >>>= 0, $e || me(this, _e, Be, 4, 2147483647, -2147483648), _e < 0 && (_e = 4294967295 + _e + 1), this[Be] = _e >>> 24, this[Be + 1] = _e >>> 16, this[Be + 2] = _e >>> 8, this[Be + 3] = 255 & _e, Be + 4;
            }, P.prototype.writeBigInt64LE = Ke(function(_e) {
              return ye(this, _e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
            }), P.prototype.writeBigInt64BE = Ke(function(_e) {
              return pe(this, _e, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
            }), P.prototype.writeFloatLE = function(_e, Be, $e) {
              return Ae(this, _e, Be, !0, $e);
            }, P.prototype.writeFloatBE = function(_e, Be, $e) {
              return Ae(this, _e, Be, !1, $e);
            }, P.prototype.writeDoubleLE = function(_e, Be, $e) {
              return Se(this, _e, Be, !0, $e);
            }, P.prototype.writeDoubleBE = function(_e, Be, $e) {
              return Se(this, _e, Be, !1, $e);
            }, P.prototype.copy = function(_e, Be, $e, Ze) {
              if (!P.isBuffer(_e)) throw new TypeError("argument should be a Buffer");
              if ($e || ($e = 0), Ze || Ze === 0 || (Ze = this.length), Be >= _e.length && (Be = _e.length), Be || (Be = 0), Ze > 0 && Ze < $e && (Ze = $e), Ze === $e || _e.length === 0 || this.length === 0) return 0;
              if (Be < 0) throw new RangeError("targetStart out of bounds");
              if ($e < 0 || $e >= this.length) throw new RangeError("Index out of range");
              if (Ze < 0) throw new RangeError("sourceEnd out of bounds");
              Ze > this.length && (Ze = this.length), _e.length - Be < Ze - $e && (Ze = _e.length - Be + $e);
              var ct = Ze - $e;
              return this === _e && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(Be, $e, Ze) : Uint8Array.prototype.set.call(_e, this.subarray($e, Ze), Be), ct;
            }, P.prototype.fill = function(_e, Be, $e, Ze) {
              if (typeof _e == "string") {
                if (typeof Be == "string" ? (Ze = Be, Be = 0, $e = this.length) : typeof $e == "string" && (Ze = $e, $e = this.length), Ze !== void 0 && typeof Ze != "string") throw new TypeError("encoding must be a string");
                if (typeof Ze == "string" && !P.isEncoding(Ze)) throw new TypeError("Unknown encoding: " + Ze);
                if (_e.length === 1) {
                  var ct = _e.charCodeAt(0);
                  (Ze === "utf8" && ct < 128 || Ze === "latin1") && (_e = ct);
                }
              } else typeof _e == "number" ? _e &= 255 : typeof _e == "boolean" && (_e = Number(_e));
              if (Be < 0 || this.length < Be || this.length < $e) throw new RangeError("Out of range index");
              if ($e <= Be) return this;
              var ft;
              if (Be >>>= 0, $e = $e === void 0 ? this.length : $e >>> 0, _e || (_e = 0), typeof _e == "number") for (ft = Be; ft < $e; ++ft) this[ft] = _e;
              else {
                var _t = P.isBuffer(_e) ? _e : P.from(_e, Ze), Pt = _t.length;
                if (Pt === 0) throw new TypeError('The value "' + _e + '" is invalid for argument "value"');
                for (ft = 0; ft < $e - Be; ++ft) this[ft + Be] = _t[ft % Pt];
              }
              return this;
            };
            var Me = {};
            function De(_e, Be, $e) {
              Me[_e] = function(Ze) {
                function ct() {
                  var Pt;
                  return function(Dt, $t) {
                    if (!(Dt instanceof $t)) throw new TypeError("Cannot call a class as a function");
                  }(this, ct), Pt = function(Dt, $t, Gt) {
                    return $t = w($t), function(Wt, mt) {
                      if (mt && (S(mt) == "object" || typeof mt == "function")) return mt;
                      if (mt !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
                      return function(at) {
                        if (at === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                        return at;
                      }(Wt);
                    }(Dt, x() ? Reflect.construct($t, [], w(Dt).constructor) : $t.apply(Dt, Gt));
                  }(this, ct), Object.defineProperty(Pt, "message", { value: Be.apply(Pt, arguments), writable: !0, configurable: !0 }), Pt.name = "".concat(Pt.name, " [").concat(_e, "]"), Pt.stack, delete Pt.name, Pt;
                }
                return function(Pt, Dt) {
                  if (typeof Dt != "function" && Dt !== null) throw new TypeError("Super expression must either be null or a function");
                  Pt.prototype = Object.create(Dt && Dt.prototype, { constructor: { value: Pt, writable: !0, configurable: !0 } }), Object.defineProperty(Pt, "prototype", { writable: !1 }), Dt && k(Pt, Dt);
                }(ct, Ze), ft = ct, (_t = [{ key: "code", get: function() {
                  return _e;
                }, set: function(Pt) {
                  Object.defineProperty(this, "code", { configurable: !0, enumerable: !0, value: Pt, writable: !0 });
                } }, { key: "toString", value: function() {
                  return "".concat(this.name, " [").concat(_e, "]: ").concat(this.message);
                } }]) && g(ft.prototype, _t), Object.defineProperty(ft, "prototype", { writable: !1 }), ft;
                var ft, _t;
              }($e);
            }
            function Le(_e) {
              for (var Be = "", $e = _e.length, Ze = _e[0] === "-" ? 1 : 0; $e >= Ze + 4; $e -= 3) Be = "_".concat(_e.slice($e - 3, $e)).concat(Be);
              return "".concat(_e.slice(0, $e)).concat(Be);
            }
            function We(_e, Be, $e, Ze, ct, ft) {
              if (_e > $e || _e < Be) {
                var _t, Pt = typeof Be == "bigint" ? "n" : "";
                throw _t = Be === 0 || Be === BigInt(0) ? ">= 0".concat(Pt, " and < 2").concat(Pt, " ** ").concat(8 * (ft + 1)).concat(Pt) : ">= -(2".concat(Pt, " ** ").concat(8 * (ft + 1) - 1).concat(Pt, ") and < 2 ** ") + "".concat(8 * (ft + 1) - 1).concat(Pt), new Me.ERR_OUT_OF_RANGE("value", _t, _e);
              }
              (function(Dt, $t, Gt) {
                Ee($t, "offset"), Dt[$t] !== void 0 && Dt[$t + Gt] !== void 0 || Ne($t, Dt.length - (Gt + 1));
              })(Ze, ct, ft);
            }
            function Ee(_e, Be) {
              if (typeof _e != "number") throw new Me.ERR_INVALID_ARG_TYPE(Be, "number", _e);
            }
            function Ne(_e, Be, $e) {
              throw Math.floor(_e) !== _e ? (Ee(_e, $e), new Me.ERR_OUT_OF_RANGE("offset", "an integer", _e)) : Be < 0 ? new Me.ERR_BUFFER_OUT_OF_BOUNDS() : new Me.ERR_OUT_OF_RANGE("offset", ">= ".concat(0, " and <= ").concat(Be), _e);
            }
            De("ERR_BUFFER_OUT_OF_BOUNDS", function(_e) {
              return _e ? "".concat(_e, " is outside of buffer bounds") : "Attempt to access memory outside buffer bounds";
            }, RangeError), De("ERR_INVALID_ARG_TYPE", function(_e, Be) {
              return 'The "'.concat(_e, '" argument must be of type number. Received type ').concat(S(Be));
            }, TypeError), De("ERR_OUT_OF_RANGE", function(_e, Be, $e) {
              var Ze = 'The value of "'.concat(_e, '" is out of range.'), ct = $e;
              return Number.isInteger($e) && Math.abs($e) > Math.pow(2, 32) ? ct = Le(String($e)) : typeof $e == "bigint" && (ct = String($e), ($e > Math.pow(BigInt(2), BigInt(32)) || $e < -Math.pow(BigInt(2), BigInt(32))) && (ct = Le(ct)), ct += "n"), Ze + " It must be ".concat(Be, ". Received ").concat(ct);
            }, RangeError);
            var Ie = /[^+/0-9A-Za-z-_]/g;
            function ge(_e, Be) {
              var $e;
              Be = Be || 1 / 0;
              for (var Ze = _e.length, ct = null, ft = [], _t = 0; _t < Ze; ++_t) {
                if (($e = _e.charCodeAt(_t)) > 55295 && $e < 57344) {
                  if (!ct) {
                    if ($e > 56319) {
                      (Be -= 3) > -1 && ft.push(239, 191, 189);
                      continue;
                    }
                    if (_t + 1 === Ze) {
                      (Be -= 3) > -1 && ft.push(239, 191, 189);
                      continue;
                    }
                    ct = $e;
                    continue;
                  }
                  if ($e < 56320) {
                    (Be -= 3) > -1 && ft.push(239, 191, 189), ct = $e;
                    continue;
                  }
                  $e = 65536 + (ct - 55296 << 10 | $e - 56320);
                } else ct && (Be -= 3) > -1 && ft.push(239, 191, 189);
                if (ct = null, $e < 128) {
                  if ((Be -= 1) < 0) break;
                  ft.push($e);
                } else if ($e < 2048) {
                  if ((Be -= 2) < 0) break;
                  ft.push($e >> 6 | 192, 63 & $e | 128);
                } else if ($e < 65536) {
                  if ((Be -= 3) < 0) break;
                  ft.push($e >> 12 | 224, $e >> 6 & 63 | 128, 63 & $e | 128);
                } else {
                  if (!($e < 1114112)) throw new Error("Invalid code point");
                  if ((Be -= 4) < 0) break;
                  ft.push($e >> 18 | 240, $e >> 12 & 63 | 128, $e >> 6 & 63 | 128, 63 & $e | 128);
                }
              }
              return ft;
            }
            function Ce(_e) {
              return A.toByteArray(function(Be) {
                if ((Be = (Be = Be.split("=")[0]).trim().replace(Ie, "")).length < 2) return "";
                for (; Be.length % 4 != 0; ) Be += "=";
                return Be;
              }(_e));
            }
            function we(_e, Be, $e, Ze) {
              var ct;
              for (ct = 0; ct < Ze && !(ct + $e >= Be.length || ct >= _e.length); ++ct) Be[ct + $e] = _e[ct];
              return ct;
            }
            function Ge(_e, Be) {
              return _e instanceof Be || _e != null && _e.constructor != null && _e.constructor.name != null && _e.constructor.name === Be.name;
            }
            function Re(_e) {
              return _e != _e;
            }
            var je = function() {
              for (var _e = "0123456789abcdef", Be = new Array(256), $e = 0; $e < 16; ++$e) for (var Ze = 16 * $e, ct = 0; ct < 16; ++ct) Be[Ze + ct] = _e[$e] + _e[ct];
              return Be;
            }();
            function Ke(_e) {
              return typeof BigInt > "u" ? tt : _e;
            }
            function tt() {
              throw new Error("BigInt not supported");
            }
          }, 9216: function(d) {
            d.exports = m, d.exports.isMobile = m, d.exports.default = m;
            var f = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, c = /CrOS/, g = /android|ipad|playbook|silk/i;
            function m(x) {
              x || (x = {});
              var w = x.ua;
              if (w || typeof navigator > "u" || (w = navigator.userAgent), w && w.headers && typeof w.headers["user-agent"] == "string" && (w = w.headers["user-agent"]), typeof w != "string") return !1;
              var k = f.test(w) && !c.test(w) || !!x.tablet && g.test(w);
              return !k && x.tablet && x.featureDetect && navigator && navigator.maxTouchPoints > 1 && w.indexOf("Macintosh") !== -1 && w.indexOf("Safari") !== -1 && (k = !0), k;
            }
          }, 6296: function(d, f, c) {
            d.exports = function(S) {
              var A = (S = S || {}).eye || [0, 0, 1], C = S.center || [0, 0, 0], D = S.up || [0, 1, 0], L = S.distanceLimits || [0, 1 / 0], E = S.mode || "turntable", P = g(), I = m(), M = x();
              return P.setDistanceLimits(L[0], L[1]), P.lookAt(0, A, C, D), I.setDistanceLimits(L[0], L[1]), I.lookAt(0, A, C, D), M.setDistanceLimits(L[0], L[1]), M.lookAt(0, A, C, D), new w({ turntable: P, orbit: I, matrix: M }, E);
            };
            var g = c(7261), m = c(9977), x = c(4192);
            function w(S, A) {
              this._controllerNames = Object.keys(S), this._controllerList = this._controllerNames.map(function(C) {
                return S[C];
              }), this._mode = A, this._active = S[A], this._active || (this._mode = "turntable", this._active = S.turntable), this.modes = this._controllerNames, this.computedMatrix = this._active.computedMatrix, this.computedEye = this._active.computedEye, this.computedUp = this._active.computedUp, this.computedCenter = this._active.computedCenter, this.computedRadius = this._active.computedRadius;
            }
            var k = w.prototype;
            k.flush = function(S) {
              for (var A = this._controllerList, C = 0; C < A.length; ++C) A[C].flush(S);
            }, k.idle = function(S) {
              for (var A = this._controllerList, C = 0; C < A.length; ++C) A[C].idle(S);
            }, k.lookAt = function(S, A, C, D) {
              for (var L = this._controllerList, E = 0; E < L.length; ++E) L[E].lookAt(S, A, C, D);
            }, k.rotate = function(S, A, C, D) {
              for (var L = this._controllerList, E = 0; E < L.length; ++E) L[E].rotate(S, A, C, D);
            }, k.pan = function(S, A, C, D) {
              for (var L = this._controllerList, E = 0; E < L.length; ++E) L[E].pan(S, A, C, D);
            }, k.translate = function(S, A, C, D) {
              for (var L = this._controllerList, E = 0; E < L.length; ++E) L[E].translate(S, A, C, D);
            }, k.setMatrix = function(S, A) {
              for (var C = this._controllerList, D = 0; D < C.length; ++D) C[D].setMatrix(S, A);
            }, k.setDistanceLimits = function(S, A) {
              for (var C = this._controllerList, D = 0; D < C.length; ++D) C[D].setDistanceLimits(S, A);
            }, k.setDistance = function(S, A) {
              for (var C = this._controllerList, D = 0; D < C.length; ++D) C[D].setDistance(S, A);
            }, k.recalcMatrix = function(S) {
              this._active.recalcMatrix(S);
            }, k.getDistance = function(S) {
              return this._active.getDistance(S);
            }, k.getDistanceLimits = function(S) {
              return this._active.getDistanceLimits(S);
            }, k.lastT = function() {
              return this._active.lastT();
            }, k.setMode = function(S) {
              if (S !== this._mode) {
                var A = this._controllerNames.indexOf(S);
                if (!(A < 0)) {
                  var C = this._active, D = this._controllerList[A], L = Math.max(C.lastT(), D.lastT());
                  C.recalcMatrix(L), D.setMatrix(L, C.computedMatrix), this._active = D, this._mode = S, this.computedMatrix = this._active.computedMatrix, this.computedEye = this._active.computedEye, this.computedUp = this._active.computedUp, this.computedCenter = this._active.computedCenter, this.computedRadius = this._active.computedRadius;
                }
              }
            }, k.getMode = function() {
              return this._mode;
            };
          }, 7169: function(d, f, c) {
            var g = typeof WeakMap > "u" ? c(1538) : WeakMap, m = c(2762), x = c(8116), w = new g();
            d.exports = function(k) {
              var S = w.get(k), A = S && (S._triangleBuffer.handle || S._triangleBuffer.buffer);
              if (!A || !k.isBuffer(A)) {
                var C = m(k, new Float32Array([-1, -1, -1, 4, 4, -1]));
                (S = x(k, [{ buffer: C, type: k.FLOAT, size: 2 }]))._triangleBuffer = C, w.set(k, S);
              }
              S.bind(), k.drawArrays(k.TRIANGLES, 0, 3), S.unbind();
            };
          }, 1085: function(d, f, c) {
            var g = c(1371);
            d.exports = function(m, x, w) {
              x = typeof x == "number" ? x : 1, w = w || ": ";
              var k = m.split(/\r?\n/), S = String(k.length + x - 1).length;
              return k.map(function(A, C) {
                var D = C + x, L = String(D).length;
                return g(D, S - L) + w + A;
              }).join(`
`);
            };
          }, 3952: function(d, f, c) {
            d.exports = function(x) {
              var w = x.length;
              if (w === 0) return [];
              if (w === 1) return [0];
              for (var k = x[0].length, S = [x[0]], A = [0], C = 1; C < w; ++C) if (S.push(x[C]), m(S, k)) {
                if (A.push(C), A.length === k + 1) return A;
              } else S.pop();
              return A;
            };
            var g = c(3250);
            function m(x, w) {
              for (var k = new Array(w + 1), S = 0; S < x.length; ++S) k[S] = x[S];
              for (S = 0; S <= x.length; ++S) {
                for (var A = x.length; A <= w; ++A) {
                  for (var C = new Array(w), D = 0; D < w; ++D) C[D] = Math.pow(A + 1 - S, D);
                  k[A] = C;
                }
                if (g.apply(void 0, k)) return !0;
              }
              return !1;
            }
          }, 5995: function(d, f, c) {
            d.exports = function(x, w) {
              return g(w).filter(function(k) {
                for (var S = new Array(k.length), A = 0; A < k.length; ++A) S[A] = w[k[A]];
                return m(S) * x < 1;
              });
            };
            var g = c(7642), m = c(6037);
          }, 3502: function(d, f, c) {
            d.exports = function(x, w) {
              return m(g(x, w));
            };
            var g = c(5995), m = c(9127);
          }, 6468: function(d) {
            d.exports = function(f) {
              return atob(f);
            };
          }, 2642: function(d, f, c) {
            d.exports = function(x, w) {
              for (var k = w.length, S = new Array(k + 1), A = 0; A < k; ++A) {
                for (var C = new Array(k + 1), D = 0; D <= k; ++D) C[D] = x[D][A];
                S[A] = C;
              }
              for (S[k] = new Array(k + 1), A = 0; A <= k; ++A) S[k][A] = 1;
              var L = new Array(k + 1);
              for (A = 0; A < k; ++A) L[A] = w[A];
              L[k] = 1;
              var E = g(S, L), P = m(E[k + 1]);
              P === 0 && (P = 1);
              var I = new Array(k + 1);
              for (A = 0; A <= k; ++A) I[A] = m(E[A]) / P;
              return I;
            };
            var g = c(727);
            function m(x) {
              for (var w = 0, k = 0; k < x.length; ++k) w += x[k];
              return w;
            }
          }, 7507: function(d, f) {
            f.byteLength = function(A) {
              var C = k(A), D = C[0], L = C[1];
              return 3 * (D + L) / 4 - L;
            }, f.toByteArray = function(A) {
              var C, D, L = k(A), E = L[0], P = L[1], I = new m(function(T, z, F) {
                return 3 * (z + F) / 4 - F;
              }(0, E, P)), M = 0, O = P > 0 ? E - 4 : E;
              for (D = 0; D < O; D += 4) C = g[A.charCodeAt(D)] << 18 | g[A.charCodeAt(D + 1)] << 12 | g[A.charCodeAt(D + 2)] << 6 | g[A.charCodeAt(D + 3)], I[M++] = C >> 16 & 255, I[M++] = C >> 8 & 255, I[M++] = 255 & C;
              return P === 2 && (C = g[A.charCodeAt(D)] << 2 | g[A.charCodeAt(D + 1)] >> 4, I[M++] = 255 & C), P === 1 && (C = g[A.charCodeAt(D)] << 10 | g[A.charCodeAt(D + 1)] << 4 | g[A.charCodeAt(D + 2)] >> 2, I[M++] = C >> 8 & 255, I[M++] = 255 & C), I;
            }, f.fromByteArray = function(A) {
              for (var C, D = A.length, L = D % 3, E = [], P = 16383, I = 0, M = D - L; I < M; I += P) E.push(S(A, I, I + P > M ? M : I + P));
              return L === 1 ? (C = A[D - 1], E.push(c[C >> 2] + c[C << 4 & 63] + "==")) : L === 2 && (C = (A[D - 2] << 8) + A[D - 1], E.push(c[C >> 10] + c[C >> 4 & 63] + c[C << 2 & 63] + "=")), E.join("");
            };
            for (var c = [], g = [], m = typeof Uint8Array < "u" ? Uint8Array : Array, x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", w = 0; w < 64; ++w) c[w] = x[w], g[x.charCodeAt(w)] = w;
            function k(A) {
              var C = A.length;
              if (C % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
              var D = A.indexOf("=");
              return D === -1 && (D = C), [D, D === C ? 0 : 4 - D % 4];
            }
            function S(A, C, D) {
              for (var L, E, P = [], I = C; I < D; I += 3) L = (A[I] << 16 & 16711680) + (A[I + 1] << 8 & 65280) + (255 & A[I + 2]), P.push(c[(E = L) >> 18 & 63] + c[E >> 12 & 63] + c[E >> 6 & 63] + c[63 & E]);
              return P.join("");
            }
            g[45] = 62, g[95] = 63;
          }, 3865: function(d, f, c) {
            var g = c(869);
            d.exports = function(m, x) {
              return g(m[0].mul(x[1]).add(x[0].mul(m[1])), m[1].mul(x[1]));
            };
          }, 1318: function(d) {
            d.exports = function(f, c) {
              return f[0].mul(c[1]).cmp(c[0].mul(f[1]));
            };
          }, 8697: function(d, f, c) {
            var g = c(869);
            d.exports = function(m, x) {
              return g(m[0].mul(x[1]), m[1].mul(x[0]));
            };
          }, 7842: function(d, f, c) {
            var g = c(6330), m = c(1533), x = c(2651), w = c(4387), k = c(869), S = c(8697);
            d.exports = function A(C, D) {
              if (g(C)) return D ? S(C, A(D)) : [C[0].clone(), C[1].clone()];
              var L, E, P = 0;
              if (m(C)) L = C.clone();
              else if (typeof C == "string") L = w(C);
              else {
                if (C === 0) return [x(0), x(1)];
                if (C === Math.floor(C)) L = x(C);
                else {
                  for (; C !== Math.floor(C); ) C *= Math.pow(2, 256), P -= 256;
                  L = x(C);
                }
              }
              if (g(D)) L.mul(D[1]), E = D[0].clone();
              else if (m(D)) E = D.clone();
              else if (typeof D == "string") E = w(D);
              else if (D) if (D === Math.floor(D)) E = x(D);
              else {
                for (; D !== Math.floor(D); ) D *= Math.pow(2, 256), P += 256;
                E = x(D);
              }
              else E = x(1);
              return P > 0 ? L = L.ushln(P) : P < 0 && (E = E.ushln(-P)), k(L, E);
            };
          }, 6330: function(d, f, c) {
            var g = c(1533);
            d.exports = function(m) {
              return Array.isArray(m) && m.length === 2 && g(m[0]) && g(m[1]);
            };
          }, 5716: function(d, f, c) {
            var g = c(6859);
            d.exports = function(m) {
              return m.cmp(new g(0));
            };
          }, 1369: function(d, f, c) {
            var g = c(5716);
            d.exports = function(m) {
              var x = m.length, w = m.words, k = 0;
              if (x === 1) k = w[0];
              else if (x === 2) k = w[0] + 67108864 * w[1];
              else for (var S = 0; S < x; S++) k += w[S] * Math.pow(67108864, S);
              return g(m) * k;
            };
          }, 4025: function(d, f, c) {
            var g = c(2361), m = c(8828).countTrailingZeros;
            d.exports = function(x) {
              var w = m(g.lo(x));
              if (w < 32) return w;
              var k = m(g.hi(x));
              return k > 20 ? 52 : k + 32;
            };
          }, 1533: function(d, f, c) {
            c(6859), d.exports = function(g) {
              return g && typeof g == "object" && !!g.words;
            };
          }, 2651: function(d, f, c) {
            var g = c(6859), m = c(2361);
            d.exports = function(x) {
              var w = m.exponent(x);
              return w < 52 ? new g(x) : new g(x * Math.pow(2, 52 - w)).ushln(w - 52);
            };
          }, 869: function(d, f, c) {
            var g = c(2651), m = c(5716);
            d.exports = function(x, w) {
              var k = m(x), S = m(w);
              if (k === 0) return [g(0), g(1)];
              if (S === 0) return [g(0), g(0)];
              S < 0 && (x = x.neg(), w = w.neg());
              var A = x.gcd(w);
              return A.cmpn(1) ? [x.div(A), w.div(A)] : [x, w];
            };
          }, 4387: function(d, f, c) {
            var g = c(6859);
            d.exports = function(m) {
              return new g(m);
            };
          }, 6504: function(d, f, c) {
            var g = c(869);
            d.exports = function(m, x) {
              return g(m[0].mul(x[0]), m[1].mul(x[1]));
            };
          }, 7721: function(d, f, c) {
            var g = c(5716);
            d.exports = function(m) {
              return g(m[0]) * g(m[1]);
            };
          }, 5572: function(d, f, c) {
            var g = c(869);
            d.exports = function(m, x) {
              return g(m[0].mul(x[1]).sub(m[1].mul(x[0])), m[1].mul(x[1]));
            };
          }, 946: function(d, f, c) {
            var g = c(1369), m = c(4025);
            d.exports = function(x) {
              var w = x[0], k = x[1];
              if (w.cmpn(0) === 0) return 0;
              var S = w.abs().divmod(k.abs()), A = S.div, C = g(A), D = S.mod, L = w.negative !== k.negative ? -1 : 1;
              if (D.cmpn(0) === 0) return L * C;
              if (C) {
                var E = m(C) + 4;
                return L * (C + (I = g(D.ushln(E).divRound(k))) * Math.pow(2, -E));
              }
              var P = k.bitLength() - D.bitLength() + 53, I = g(D.ushln(P).divRound(k));
              return P < 1023 ? L * I * Math.pow(2, -P) : L * (I *= Math.pow(2, -1023)) * Math.pow(2, 1023 - P);
            };
          }, 2478: function(d) {
            function f(k, S, A, C, D) {
              for (var L = D + 1; C <= D; ) {
                var E = C + D >>> 1, P = k[E];
                (A !== void 0 ? A(P, S) : P - S) >= 0 ? (L = E, D = E - 1) : C = E + 1;
              }
              return L;
            }
            function c(k, S, A, C, D) {
              for (var L = D + 1; C <= D; ) {
                var E = C + D >>> 1, P = k[E];
                (A !== void 0 ? A(P, S) : P - S) > 0 ? (L = E, D = E - 1) : C = E + 1;
              }
              return L;
            }
            function g(k, S, A, C, D) {
              for (var L = C - 1; C <= D; ) {
                var E = C + D >>> 1, P = k[E];
                (A !== void 0 ? A(P, S) : P - S) < 0 ? (L = E, C = E + 1) : D = E - 1;
              }
              return L;
            }
            function m(k, S, A, C, D) {
              for (var L = C - 1; C <= D; ) {
                var E = C + D >>> 1, P = k[E];
                (A !== void 0 ? A(P, S) : P - S) <= 0 ? (L = E, C = E + 1) : D = E - 1;
              }
              return L;
            }
            function x(k, S, A, C, D) {
              for (; C <= D; ) {
                var L = C + D >>> 1, E = k[L], P = A !== void 0 ? A(E, S) : E - S;
                if (P === 0) return L;
                P <= 0 ? C = L + 1 : D = L - 1;
              }
              return -1;
            }
            function w(k, S, A, C, D, L) {
              return typeof A == "function" ? L(k, S, A, C === void 0 ? 0 : 0 | C, D === void 0 ? k.length - 1 : 0 | D) : L(k, S, void 0, A === void 0 ? 0 : 0 | A, C === void 0 ? k.length - 1 : 0 | C);
            }
            d.exports = { ge: function(k, S, A, C, D) {
              return w(k, S, A, C, D, f);
            }, gt: function(k, S, A, C, D) {
              return w(k, S, A, C, D, c);
            }, lt: function(k, S, A, C, D) {
              return w(k, S, A, C, D, g);
            }, le: function(k, S, A, C, D) {
              return w(k, S, A, C, D, m);
            }, eq: function(k, S, A, C, D) {
              return w(k, S, A, C, D, x);
            } };
          }, 8828: function(d, f) {
            function c(m) {
              var x = 32;
              return (m &= -m) && x--, 65535 & m && (x -= 16), 16711935 & m && (x -= 8), 252645135 & m && (x -= 4), 858993459 & m && (x -= 2), 1431655765 & m && (x -= 1), x;
            }
            f.INT_BITS = 32, f.INT_MAX = 2147483647, f.INT_MIN = -2147483648, f.sign = function(m) {
              return (m > 0) - (m < 0);
            }, f.abs = function(m) {
              var x = m >> 31;
              return (m ^ x) - x;
            }, f.min = function(m, x) {
              return x ^ (m ^ x) & -(m < x);
            }, f.max = function(m, x) {
              return m ^ (m ^ x) & -(m < x);
            }, f.isPow2 = function(m) {
              return !(m & m - 1 || !m);
            }, f.log2 = function(m) {
              var x, w;
              return x = (m > 65535) << 4, x |= w = ((m >>>= x) > 255) << 3, x |= w = ((m >>>= w) > 15) << 2, (x |= w = ((m >>>= w) > 3) << 1) | (m >>>= w) >> 1;
            }, f.log10 = function(m) {
              return m >= 1e9 ? 9 : m >= 1e8 ? 8 : m >= 1e7 ? 7 : m >= 1e6 ? 6 : m >= 1e5 ? 5 : m >= 1e4 ? 4 : m >= 1e3 ? 3 : m >= 100 ? 2 : m >= 10 ? 1 : 0;
            }, f.popCount = function(m) {
              return 16843009 * ((m = (858993459 & (m -= m >>> 1 & 1431655765)) + (m >>> 2 & 858993459)) + (m >>> 4) & 252645135) >>> 24;
            }, f.countTrailingZeros = c, f.nextPow2 = function(m) {
              return m += m === 0, --m, m |= m >>> 1, m |= m >>> 2, m |= m >>> 4, m |= m >>> 8, 1 + (m |= m >>> 16);
            }, f.prevPow2 = function(m) {
              return m |= m >>> 1, m |= m >>> 2, m |= m >>> 4, m |= m >>> 8, (m |= m >>> 16) - (m >>> 1);
            }, f.parity = function(m) {
              return m ^= m >>> 16, m ^= m >>> 8, m ^= m >>> 4, 27030 >>> (m &= 15) & 1;
            };
            var g = new Array(256);
            (function(m) {
              for (var x = 0; x < 256; ++x) {
                var w = x, k = x, S = 7;
                for (w >>>= 1; w; w >>>= 1) k <<= 1, k |= 1 & w, --S;
                m[x] = k << S & 255;
              }
            })(g), f.reverse = function(m) {
              return g[255 & m] << 24 | g[m >>> 8 & 255] << 16 | g[m >>> 16 & 255] << 8 | g[m >>> 24 & 255];
            }, f.interleave2 = function(m, x) {
              return (m = 1431655765 & ((m = 858993459 & ((m = 252645135 & ((m = 16711935 & ((m &= 65535) | m << 8)) | m << 4)) | m << 2)) | m << 1)) | (x = 1431655765 & ((x = 858993459 & ((x = 252645135 & ((x = 16711935 & ((x &= 65535) | x << 8)) | x << 4)) | x << 2)) | x << 1)) << 1;
            }, f.deinterleave2 = function(m, x) {
              return (m = 65535 & ((m = 16711935 & ((m = 252645135 & ((m = 858993459 & ((m = m >>> x & 1431655765) | m >>> 1)) | m >>> 2)) | m >>> 4)) | m >>> 16)) << 16 >> 16;
            }, f.interleave3 = function(m, x, w) {
              return m = 1227133513 & ((m = 3272356035 & ((m = 251719695 & ((m = 4278190335 & ((m &= 1023) | m << 16)) | m << 8)) | m << 4)) | m << 2), (m |= (x = 1227133513 & ((x = 3272356035 & ((x = 251719695 & ((x = 4278190335 & ((x &= 1023) | x << 16)) | x << 8)) | x << 4)) | x << 2)) << 1) | (w = 1227133513 & ((w = 3272356035 & ((w = 251719695 & ((w = 4278190335 & ((w &= 1023) | w << 16)) | w << 8)) | w << 4)) | w << 2)) << 2;
            }, f.deinterleave3 = function(m, x) {
              return (m = 1023 & ((m = 4278190335 & ((m = 251719695 & ((m = 3272356035 & ((m = m >>> x & 1227133513) | m >>> 2)) | m >>> 4)) | m >>> 8)) | m >>> 16)) << 22 >> 22;
            }, f.nextCombination = function(m) {
              var x = m | m - 1;
              return x + 1 | (~x & -~x) - 1 >>> c(m) + 1;
            };
          }, 6859: function(d, f, c) {
            (function(g, m) {
              function x(Y, te) {
                if (!Y) throw new Error(te || "Assertion failed");
              }
              function w(Y, te) {
                Y.super_ = te;
                var ee = function() {
                };
                ee.prototype = te.prototype, Y.prototype = new ee(), Y.prototype.constructor = Y;
              }
              function k(Y, te, ee) {
                if (k.isBN(Y)) return Y;
                this.negative = 0, this.words = null, this.length = 0, this.red = null, Y !== null && (te !== "le" && te !== "be" || (ee = te, te = 10), this._init(Y || 0, te || 10, ee || "be"));
              }
              var S;
              typeof g == "object" ? g.exports = k : m.BN = k, k.BN = k, k.wordSize = 26;
              try {
                S = typeof window < "u" && window.Buffer !== void 0 ? window.Buffer : c(7790).Buffer;
              } catch {
              }
              function A(Y, te) {
                var ee = Y.charCodeAt(te);
                return ee >= 65 && ee <= 70 ? ee - 55 : ee >= 97 && ee <= 102 ? ee - 87 : ee - 48 & 15;
              }
              function C(Y, te, ee) {
                var X = A(Y, ee);
                return ee - 1 >= te && (X |= A(Y, ee - 1) << 4), X;
              }
              function D(Y, te, ee, X) {
                for (var Q = 0, ue = Math.min(Y.length, ee), ce = te; ce < ue; ce++) {
                  var he = Y.charCodeAt(ce) - 48;
                  Q *= X, Q += he >= 49 ? he - 49 + 10 : he >= 17 ? he - 17 + 10 : he;
                }
                return Q;
              }
              k.isBN = function(Y) {
                return Y instanceof k || Y !== null && typeof Y == "object" && Y.constructor.wordSize === k.wordSize && Array.isArray(Y.words);
              }, k.max = function(Y, te) {
                return Y.cmp(te) > 0 ? Y : te;
              }, k.min = function(Y, te) {
                return Y.cmp(te) < 0 ? Y : te;
              }, k.prototype._init = function(Y, te, ee) {
                if (typeof Y == "number") return this._initNumber(Y, te, ee);
                if (typeof Y == "object") return this._initArray(Y, te, ee);
                te === "hex" && (te = 16), x(te === (0 | te) && te >= 2 && te <= 36);
                var X = 0;
                (Y = Y.toString().replace(/\s+/g, ""))[0] === "-" && (X++, this.negative = 1), X < Y.length && (te === 16 ? this._parseHex(Y, X, ee) : (this._parseBase(Y, te, X), ee === "le" && this._initArray(this.toArray(), te, ee)));
              }, k.prototype._initNumber = function(Y, te, ee) {
                Y < 0 && (this.negative = 1, Y = -Y), Y < 67108864 ? (this.words = [67108863 & Y], this.length = 1) : Y < 4503599627370496 ? (this.words = [67108863 & Y, Y / 67108864 & 67108863], this.length = 2) : (x(Y < 9007199254740992), this.words = [67108863 & Y, Y / 67108864 & 67108863, 1], this.length = 3), ee === "le" && this._initArray(this.toArray(), te, ee);
              }, k.prototype._initArray = function(Y, te, ee) {
                if (x(typeof Y.length == "number"), Y.length <= 0) return this.words = [0], this.length = 1, this;
                this.length = Math.ceil(Y.length / 3), this.words = new Array(this.length);
                for (var X = 0; X < this.length; X++) this.words[X] = 0;
                var Q, ue, ce = 0;
                if (ee === "be") for (X = Y.length - 1, Q = 0; X >= 0; X -= 3) ue = Y[X] | Y[X - 1] << 8 | Y[X - 2] << 16, this.words[Q] |= ue << ce & 67108863, this.words[Q + 1] = ue >>> 26 - ce & 67108863, (ce += 24) >= 26 && (ce -= 26, Q++);
                else if (ee === "le") for (X = 0, Q = 0; X < Y.length; X += 3) ue = Y[X] | Y[X + 1] << 8 | Y[X + 2] << 16, this.words[Q] |= ue << ce & 67108863, this.words[Q + 1] = ue >>> 26 - ce & 67108863, (ce += 24) >= 26 && (ce -= 26, Q++);
                return this.strip();
              }, k.prototype._parseHex = function(Y, te, ee) {
                this.length = Math.ceil((Y.length - te) / 6), this.words = new Array(this.length);
                for (var X = 0; X < this.length; X++) this.words[X] = 0;
                var Q, ue = 0, ce = 0;
                if (ee === "be") for (X = Y.length - 1; X >= te; X -= 2) Q = C(Y, te, X) << ue, this.words[ce] |= 67108863 & Q, ue >= 18 ? (ue -= 18, ce += 1, this.words[ce] |= Q >>> 26) : ue += 8;
                else for (X = (Y.length - te) % 2 == 0 ? te + 1 : te; X < Y.length; X += 2) Q = C(Y, te, X) << ue, this.words[ce] |= 67108863 & Q, ue >= 18 ? (ue -= 18, ce += 1, this.words[ce] |= Q >>> 26) : ue += 8;
                this.strip();
              }, k.prototype._parseBase = function(Y, te, ee) {
                this.words = [0], this.length = 1;
                for (var X = 0, Q = 1; Q <= 67108863; Q *= te) X++;
                X--, Q = Q / te | 0;
                for (var ue = Y.length - ee, ce = ue % X, he = Math.min(ue, ue - ce) + ee, de = 0, ne = ee; ne < he; ne += X) de = D(Y, ne, ne + X, te), this.imuln(Q), this.words[0] + de < 67108864 ? this.words[0] += de : this._iaddn(de);
                if (ce !== 0) {
                  var ae = 1;
                  for (de = D(Y, ne, Y.length, te), ne = 0; ne < ce; ne++) ae *= te;
                  this.imuln(ae), this.words[0] + de < 67108864 ? this.words[0] += de : this._iaddn(de);
                }
                this.strip();
              }, k.prototype.copy = function(Y) {
                Y.words = new Array(this.length);
                for (var te = 0; te < this.length; te++) Y.words[te] = this.words[te];
                Y.length = this.length, Y.negative = this.negative, Y.red = this.red;
              }, k.prototype.clone = function() {
                var Y = new k(null);
                return this.copy(Y), Y;
              }, k.prototype._expand = function(Y) {
                for (; this.length < Y; ) this.words[this.length++] = 0;
                return this;
              }, k.prototype.strip = function() {
                for (; this.length > 1 && this.words[this.length - 1] === 0; ) this.length--;
                return this._normSign();
              }, k.prototype._normSign = function() {
                return this.length === 1 && this.words[0] === 0 && (this.negative = 0), this;
              }, k.prototype.inspect = function() {
                return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">";
              };
              var L = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"], E = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], P = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
              function I(Y, te, ee) {
                ee.negative = te.negative ^ Y.negative;
                var X = Y.length + te.length | 0;
                ee.length = X, X = X - 1 | 0;
                var Q = 0 | Y.words[0], ue = 0 | te.words[0], ce = Q * ue, he = 67108863 & ce, de = ce / 67108864 | 0;
                ee.words[0] = he;
                for (var ne = 1; ne < X; ne++) {
                  for (var ae = de >>> 26, se = 67108863 & de, me = Math.min(ne, te.length - 1), ye = Math.max(0, ne - Y.length + 1); ye <= me; ye++) {
                    var pe = ne - ye | 0;
                    ae += (ce = (Q = 0 | Y.words[pe]) * (ue = 0 | te.words[ye]) + se) / 67108864 | 0, se = 67108863 & ce;
                  }
                  ee.words[ne] = 0 | se, de = 0 | ae;
                }
                return de !== 0 ? ee.words[ne] = 0 | de : ee.length--, ee.strip();
              }
              k.prototype.toString = function(Y, te) {
                var ee;
                if (te = 0 | te || 1, (Y = Y || 10) === 16 || Y === "hex") {
                  ee = "";
                  for (var X = 0, Q = 0, ue = 0; ue < this.length; ue++) {
                    var ce = this.words[ue], he = (16777215 & (ce << X | Q)).toString(16);
                    ee = (Q = ce >>> 24 - X & 16777215) != 0 || ue !== this.length - 1 ? L[6 - he.length] + he + ee : he + ee, (X += 2) >= 26 && (X -= 26, ue--);
                  }
                  for (Q !== 0 && (ee = Q.toString(16) + ee); ee.length % te != 0; ) ee = "0" + ee;
                  return this.negative !== 0 && (ee = "-" + ee), ee;
                }
                if (Y === (0 | Y) && Y >= 2 && Y <= 36) {
                  var de = E[Y], ne = P[Y];
                  ee = "";
                  var ae = this.clone();
                  for (ae.negative = 0; !ae.isZero(); ) {
                    var se = ae.modn(ne).toString(Y);
                    ee = (ae = ae.idivn(ne)).isZero() ? se + ee : L[de - se.length] + se + ee;
                  }
                  for (this.isZero() && (ee = "0" + ee); ee.length % te != 0; ) ee = "0" + ee;
                  return this.negative !== 0 && (ee = "-" + ee), ee;
                }
                x(!1, "Base should be between 2 and 36");
              }, k.prototype.toNumber = function() {
                var Y = this.words[0];
                return this.length === 2 ? Y += 67108864 * this.words[1] : this.length === 3 && this.words[2] === 1 ? Y += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && x(!1, "Number can only safely store up to 53 bits"), this.negative !== 0 ? -Y : Y;
              }, k.prototype.toJSON = function() {
                return this.toString(16);
              }, k.prototype.toBuffer = function(Y, te) {
                return x(S !== void 0), this.toArrayLike(S, Y, te);
              }, k.prototype.toArray = function(Y, te) {
                return this.toArrayLike(Array, Y, te);
              }, k.prototype.toArrayLike = function(Y, te, ee) {
                var X = this.byteLength(), Q = ee || Math.max(1, X);
                x(X <= Q, "byte array longer than desired length"), x(Q > 0, "Requested array length <= 0"), this.strip();
                var ue, ce, he = te === "le", de = new Y(Q), ne = this.clone();
                if (he) {
                  for (ce = 0; !ne.isZero(); ce++) ue = ne.andln(255), ne.iushrn(8), de[ce] = ue;
                  for (; ce < Q; ce++) de[ce] = 0;
                } else {
                  for (ce = 0; ce < Q - X; ce++) de[ce] = 0;
                  for (ce = 0; !ne.isZero(); ce++) ue = ne.andln(255), ne.iushrn(8), de[Q - ce - 1] = ue;
                }
                return de;
              }, Math.clz32 ? k.prototype._countBits = function(Y) {
                return 32 - Math.clz32(Y);
              } : k.prototype._countBits = function(Y) {
                var te = Y, ee = 0;
                return te >= 4096 && (ee += 13, te >>>= 13), te >= 64 && (ee += 7, te >>>= 7), te >= 8 && (ee += 4, te >>>= 4), te >= 2 && (ee += 2, te >>>= 2), ee + te;
              }, k.prototype._zeroBits = function(Y) {
                if (Y === 0) return 26;
                var te = Y, ee = 0;
                return !(8191 & te) && (ee += 13, te >>>= 13), !(127 & te) && (ee += 7, te >>>= 7), !(15 & te) && (ee += 4, te >>>= 4), !(3 & te) && (ee += 2, te >>>= 2), !(1 & te) && ee++, ee;
              }, k.prototype.bitLength = function() {
                var Y = this.words[this.length - 1], te = this._countBits(Y);
                return 26 * (this.length - 1) + te;
              }, k.prototype.zeroBits = function() {
                if (this.isZero()) return 0;
                for (var Y = 0, te = 0; te < this.length; te++) {
                  var ee = this._zeroBits(this.words[te]);
                  if (Y += ee, ee !== 26) break;
                }
                return Y;
              }, k.prototype.byteLength = function() {
                return Math.ceil(this.bitLength() / 8);
              }, k.prototype.toTwos = function(Y) {
                return this.negative !== 0 ? this.abs().inotn(Y).iaddn(1) : this.clone();
              }, k.prototype.fromTwos = function(Y) {
                return this.testn(Y - 1) ? this.notn(Y).iaddn(1).ineg() : this.clone();
              }, k.prototype.isNeg = function() {
                return this.negative !== 0;
              }, k.prototype.neg = function() {
                return this.clone().ineg();
              }, k.prototype.ineg = function() {
                return this.isZero() || (this.negative ^= 1), this;
              }, k.prototype.iuor = function(Y) {
                for (; this.length < Y.length; ) this.words[this.length++] = 0;
                for (var te = 0; te < Y.length; te++) this.words[te] = this.words[te] | Y.words[te];
                return this.strip();
              }, k.prototype.ior = function(Y) {
                return x((this.negative | Y.negative) == 0), this.iuor(Y);
              }, k.prototype.or = function(Y) {
                return this.length > Y.length ? this.clone().ior(Y) : Y.clone().ior(this);
              }, k.prototype.uor = function(Y) {
                return this.length > Y.length ? this.clone().iuor(Y) : Y.clone().iuor(this);
              }, k.prototype.iuand = function(Y) {
                var te;
                te = this.length > Y.length ? Y : this;
                for (var ee = 0; ee < te.length; ee++) this.words[ee] = this.words[ee] & Y.words[ee];
                return this.length = te.length, this.strip();
              }, k.prototype.iand = function(Y) {
                return x((this.negative | Y.negative) == 0), this.iuand(Y);
              }, k.prototype.and = function(Y) {
                return this.length > Y.length ? this.clone().iand(Y) : Y.clone().iand(this);
              }, k.prototype.uand = function(Y) {
                return this.length > Y.length ? this.clone().iuand(Y) : Y.clone().iuand(this);
              }, k.prototype.iuxor = function(Y) {
                var te, ee;
                this.length > Y.length ? (te = this, ee = Y) : (te = Y, ee = this);
                for (var X = 0; X < ee.length; X++) this.words[X] = te.words[X] ^ ee.words[X];
                if (this !== te) for (; X < te.length; X++) this.words[X] = te.words[X];
                return this.length = te.length, this.strip();
              }, k.prototype.ixor = function(Y) {
                return x((this.negative | Y.negative) == 0), this.iuxor(Y);
              }, k.prototype.xor = function(Y) {
                return this.length > Y.length ? this.clone().ixor(Y) : Y.clone().ixor(this);
              }, k.prototype.uxor = function(Y) {
                return this.length > Y.length ? this.clone().iuxor(Y) : Y.clone().iuxor(this);
              }, k.prototype.inotn = function(Y) {
                x(typeof Y == "number" && Y >= 0);
                var te = 0 | Math.ceil(Y / 26), ee = Y % 26;
                this._expand(te), ee > 0 && te--;
                for (var X = 0; X < te; X++) this.words[X] = 67108863 & ~this.words[X];
                return ee > 0 && (this.words[X] = ~this.words[X] & 67108863 >> 26 - ee), this.strip();
              }, k.prototype.notn = function(Y) {
                return this.clone().inotn(Y);
              }, k.prototype.setn = function(Y, te) {
                x(typeof Y == "number" && Y >= 0);
                var ee = Y / 26 | 0, X = Y % 26;
                return this._expand(ee + 1), this.words[ee] = te ? this.words[ee] | 1 << X : this.words[ee] & ~(1 << X), this.strip();
              }, k.prototype.iadd = function(Y) {
                var te, ee, X;
                if (this.negative !== 0 && Y.negative === 0) return this.negative = 0, te = this.isub(Y), this.negative ^= 1, this._normSign();
                if (this.negative === 0 && Y.negative !== 0) return Y.negative = 0, te = this.isub(Y), Y.negative = 1, te._normSign();
                this.length > Y.length ? (ee = this, X = Y) : (ee = Y, X = this);
                for (var Q = 0, ue = 0; ue < X.length; ue++) te = (0 | ee.words[ue]) + (0 | X.words[ue]) + Q, this.words[ue] = 67108863 & te, Q = te >>> 26;
                for (; Q !== 0 && ue < ee.length; ue++) te = (0 | ee.words[ue]) + Q, this.words[ue] = 67108863 & te, Q = te >>> 26;
                if (this.length = ee.length, Q !== 0) this.words[this.length] = Q, this.length++;
                else if (ee !== this) for (; ue < ee.length; ue++) this.words[ue] = ee.words[ue];
                return this;
              }, k.prototype.add = function(Y) {
                var te;
                return Y.negative !== 0 && this.negative === 0 ? (Y.negative = 0, te = this.sub(Y), Y.negative ^= 1, te) : Y.negative === 0 && this.negative !== 0 ? (this.negative = 0, te = Y.sub(this), this.negative = 1, te) : this.length > Y.length ? this.clone().iadd(Y) : Y.clone().iadd(this);
              }, k.prototype.isub = function(Y) {
                if (Y.negative !== 0) {
                  Y.negative = 0;
                  var te = this.iadd(Y);
                  return Y.negative = 1, te._normSign();
                }
                if (this.negative !== 0) return this.negative = 0, this.iadd(Y), this.negative = 1, this._normSign();
                var ee, X, Q = this.cmp(Y);
                if (Q === 0) return this.negative = 0, this.length = 1, this.words[0] = 0, this;
                Q > 0 ? (ee = this, X = Y) : (ee = Y, X = this);
                for (var ue = 0, ce = 0; ce < X.length; ce++) ue = (te = (0 | ee.words[ce]) - (0 | X.words[ce]) + ue) >> 26, this.words[ce] = 67108863 & te;
                for (; ue !== 0 && ce < ee.length; ce++) ue = (te = (0 | ee.words[ce]) + ue) >> 26, this.words[ce] = 67108863 & te;
                if (ue === 0 && ce < ee.length && ee !== this) for (; ce < ee.length; ce++) this.words[ce] = ee.words[ce];
                return this.length = Math.max(this.length, ce), ee !== this && (this.negative = 1), this.strip();
              }, k.prototype.sub = function(Y) {
                return this.clone().isub(Y);
              };
              var M = function(Y, te, ee) {
                var X, Q, ue, ce = Y.words, he = te.words, de = ee.words, ne = 0, ae = 0 | ce[0], se = 8191 & ae, me = ae >>> 13, ye = 0 | ce[1], pe = 8191 & ye, be = ye >>> 13, Ae = 0 | ce[2], Se = 8191 & Ae, Me = Ae >>> 13, De = 0 | ce[3], Le = 8191 & De, We = De >>> 13, Ee = 0 | ce[4], Ne = 8191 & Ee, Ie = Ee >>> 13, ge = 0 | ce[5], Ce = 8191 & ge, we = ge >>> 13, Ge = 0 | ce[6], Re = 8191 & Ge, je = Ge >>> 13, Ke = 0 | ce[7], tt = 8191 & Ke, _e = Ke >>> 13, Be = 0 | ce[8], $e = 8191 & Be, Ze = Be >>> 13, ct = 0 | ce[9], ft = 8191 & ct, _t = ct >>> 13, Pt = 0 | he[0], Dt = 8191 & Pt, $t = Pt >>> 13, Gt = 0 | he[1], Wt = 8191 & Gt, mt = Gt >>> 13, at = 0 | he[2], vt = 8191 & at, St = at >>> 13, Je = 0 | he[3], nt = 8191 & Je, ot = Je >>> 13, Ye = 0 | he[4], Fe = 8191 & Ye, pt = Ye >>> 13, Mt = 0 | he[5], At = 8191 & Mt, Rt = Mt >>> 13, Ft = 0 | he[6], lt = 8191 & Ft, st = Ft >>> 13, Ot = 0 | he[7], kt = 8191 & Ot, Bt = Ot >>> 13, xt = 0 | he[8], Jt = 8191 & xt, qt = xt >>> 13, en = 0 | he[9], Yt = 8191 & en, Ht = en >>> 13;
                ee.negative = Y.negative ^ te.negative, ee.length = 19;
                var sn = (ne + (X = Math.imul(se, Dt)) | 0) + ((8191 & (Q = (Q = Math.imul(se, $t)) + Math.imul(me, Dt) | 0)) << 13) | 0;
                ne = ((ue = Math.imul(me, $t)) + (Q >>> 13) | 0) + (sn >>> 26) | 0, sn &= 67108863, X = Math.imul(pe, Dt), Q = (Q = Math.imul(pe, $t)) + Math.imul(be, Dt) | 0, ue = Math.imul(be, $t);
                var fn = (ne + (X = X + Math.imul(se, Wt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, mt) | 0) + Math.imul(me, Wt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, mt) | 0) + (Q >>> 13) | 0) + (fn >>> 26) | 0, fn &= 67108863, X = Math.imul(Se, Dt), Q = (Q = Math.imul(Se, $t)) + Math.imul(Me, Dt) | 0, ue = Math.imul(Me, $t), X = X + Math.imul(pe, Wt) | 0, Q = (Q = Q + Math.imul(pe, mt) | 0) + Math.imul(be, Wt) | 0, ue = ue + Math.imul(be, mt) | 0;
                var In = (ne + (X = X + Math.imul(se, vt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, St) | 0) + Math.imul(me, vt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, St) | 0) + (Q >>> 13) | 0) + (In >>> 26) | 0, In &= 67108863, X = Math.imul(Le, Dt), Q = (Q = Math.imul(Le, $t)) + Math.imul(We, Dt) | 0, ue = Math.imul(We, $t), X = X + Math.imul(Se, Wt) | 0, Q = (Q = Q + Math.imul(Se, mt) | 0) + Math.imul(Me, Wt) | 0, ue = ue + Math.imul(Me, mt) | 0, X = X + Math.imul(pe, vt) | 0, Q = (Q = Q + Math.imul(pe, St) | 0) + Math.imul(be, vt) | 0, ue = ue + Math.imul(be, St) | 0;
                var zn = (ne + (X = X + Math.imul(se, nt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, ot) | 0) + Math.imul(me, nt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, ot) | 0) + (Q >>> 13) | 0) + (zn >>> 26) | 0, zn &= 67108863, X = Math.imul(Ne, Dt), Q = (Q = Math.imul(Ne, $t)) + Math.imul(Ie, Dt) | 0, ue = Math.imul(Ie, $t), X = X + Math.imul(Le, Wt) | 0, Q = (Q = Q + Math.imul(Le, mt) | 0) + Math.imul(We, Wt) | 0, ue = ue + Math.imul(We, mt) | 0, X = X + Math.imul(Se, vt) | 0, Q = (Q = Q + Math.imul(Se, St) | 0) + Math.imul(Me, vt) | 0, ue = ue + Math.imul(Me, St) | 0, X = X + Math.imul(pe, nt) | 0, Q = (Q = Q + Math.imul(pe, ot) | 0) + Math.imul(be, nt) | 0, ue = ue + Math.imul(be, ot) | 0;
                var Cn = (ne + (X = X + Math.imul(se, Fe) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, pt) | 0) + Math.imul(me, Fe) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, pt) | 0) + (Q >>> 13) | 0) + (Cn >>> 26) | 0, Cn &= 67108863, X = Math.imul(Ce, Dt), Q = (Q = Math.imul(Ce, $t)) + Math.imul(we, Dt) | 0, ue = Math.imul(we, $t), X = X + Math.imul(Ne, Wt) | 0, Q = (Q = Q + Math.imul(Ne, mt) | 0) + Math.imul(Ie, Wt) | 0, ue = ue + Math.imul(Ie, mt) | 0, X = X + Math.imul(Le, vt) | 0, Q = (Q = Q + Math.imul(Le, St) | 0) + Math.imul(We, vt) | 0, ue = ue + Math.imul(We, St) | 0, X = X + Math.imul(Se, nt) | 0, Q = (Q = Q + Math.imul(Se, ot) | 0) + Math.imul(Me, nt) | 0, ue = ue + Math.imul(Me, ot) | 0, X = X + Math.imul(pe, Fe) | 0, Q = (Q = Q + Math.imul(pe, pt) | 0) + Math.imul(be, Fe) | 0, ue = ue + Math.imul(be, pt) | 0;
                var gn = (ne + (X = X + Math.imul(se, At) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, Rt) | 0) + Math.imul(me, At) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, Rt) | 0) + (Q >>> 13) | 0) + (gn >>> 26) | 0, gn &= 67108863, X = Math.imul(Re, Dt), Q = (Q = Math.imul(Re, $t)) + Math.imul(je, Dt) | 0, ue = Math.imul(je, $t), X = X + Math.imul(Ce, Wt) | 0, Q = (Q = Q + Math.imul(Ce, mt) | 0) + Math.imul(we, Wt) | 0, ue = ue + Math.imul(we, mt) | 0, X = X + Math.imul(Ne, vt) | 0, Q = (Q = Q + Math.imul(Ne, St) | 0) + Math.imul(Ie, vt) | 0, ue = ue + Math.imul(Ie, St) | 0, X = X + Math.imul(Le, nt) | 0, Q = (Q = Q + Math.imul(Le, ot) | 0) + Math.imul(We, nt) | 0, ue = ue + Math.imul(We, ot) | 0, X = X + Math.imul(Se, Fe) | 0, Q = (Q = Q + Math.imul(Se, pt) | 0) + Math.imul(Me, Fe) | 0, ue = ue + Math.imul(Me, pt) | 0, X = X + Math.imul(pe, At) | 0, Q = (Q = Q + Math.imul(pe, Rt) | 0) + Math.imul(be, At) | 0, ue = ue + Math.imul(be, Rt) | 0;
                var Mn = (ne + (X = X + Math.imul(se, lt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, st) | 0) + Math.imul(me, lt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, st) | 0) + (Q >>> 13) | 0) + (Mn >>> 26) | 0, Mn &= 67108863, X = Math.imul(tt, Dt), Q = (Q = Math.imul(tt, $t)) + Math.imul(_e, Dt) | 0, ue = Math.imul(_e, $t), X = X + Math.imul(Re, Wt) | 0, Q = (Q = Q + Math.imul(Re, mt) | 0) + Math.imul(je, Wt) | 0, ue = ue + Math.imul(je, mt) | 0, X = X + Math.imul(Ce, vt) | 0, Q = (Q = Q + Math.imul(Ce, St) | 0) + Math.imul(we, vt) | 0, ue = ue + Math.imul(we, St) | 0, X = X + Math.imul(Ne, nt) | 0, Q = (Q = Q + Math.imul(Ne, ot) | 0) + Math.imul(Ie, nt) | 0, ue = ue + Math.imul(Ie, ot) | 0, X = X + Math.imul(Le, Fe) | 0, Q = (Q = Q + Math.imul(Le, pt) | 0) + Math.imul(We, Fe) | 0, ue = ue + Math.imul(We, pt) | 0, X = X + Math.imul(Se, At) | 0, Q = (Q = Q + Math.imul(Se, Rt) | 0) + Math.imul(Me, At) | 0, ue = ue + Math.imul(Me, Rt) | 0, X = X + Math.imul(pe, lt) | 0, Q = (Q = Q + Math.imul(pe, st) | 0) + Math.imul(be, lt) | 0, ue = ue + Math.imul(be, st) | 0;
                var Xn = (ne + (X = X + Math.imul(se, kt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, Bt) | 0) + Math.imul(me, kt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, Bt) | 0) + (Q >>> 13) | 0) + (Xn >>> 26) | 0, Xn &= 67108863, X = Math.imul($e, Dt), Q = (Q = Math.imul($e, $t)) + Math.imul(Ze, Dt) | 0, ue = Math.imul(Ze, $t), X = X + Math.imul(tt, Wt) | 0, Q = (Q = Q + Math.imul(tt, mt) | 0) + Math.imul(_e, Wt) | 0, ue = ue + Math.imul(_e, mt) | 0, X = X + Math.imul(Re, vt) | 0, Q = (Q = Q + Math.imul(Re, St) | 0) + Math.imul(je, vt) | 0, ue = ue + Math.imul(je, St) | 0, X = X + Math.imul(Ce, nt) | 0, Q = (Q = Q + Math.imul(Ce, ot) | 0) + Math.imul(we, nt) | 0, ue = ue + Math.imul(we, ot) | 0, X = X + Math.imul(Ne, Fe) | 0, Q = (Q = Q + Math.imul(Ne, pt) | 0) + Math.imul(Ie, Fe) | 0, ue = ue + Math.imul(Ie, pt) | 0, X = X + Math.imul(Le, At) | 0, Q = (Q = Q + Math.imul(Le, Rt) | 0) + Math.imul(We, At) | 0, ue = ue + Math.imul(We, Rt) | 0, X = X + Math.imul(Se, lt) | 0, Q = (Q = Q + Math.imul(Se, st) | 0) + Math.imul(Me, lt) | 0, ue = ue + Math.imul(Me, st) | 0, X = X + Math.imul(pe, kt) | 0, Q = (Q = Q + Math.imul(pe, Bt) | 0) + Math.imul(be, kt) | 0, ue = ue + Math.imul(be, Bt) | 0;
                var Pn = (ne + (X = X + Math.imul(se, Jt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, qt) | 0) + Math.imul(me, Jt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, qt) | 0) + (Q >>> 13) | 0) + (Pn >>> 26) | 0, Pn &= 67108863, X = Math.imul(ft, Dt), Q = (Q = Math.imul(ft, $t)) + Math.imul(_t, Dt) | 0, ue = Math.imul(_t, $t), X = X + Math.imul($e, Wt) | 0, Q = (Q = Q + Math.imul($e, mt) | 0) + Math.imul(Ze, Wt) | 0, ue = ue + Math.imul(Ze, mt) | 0, X = X + Math.imul(tt, vt) | 0, Q = (Q = Q + Math.imul(tt, St) | 0) + Math.imul(_e, vt) | 0, ue = ue + Math.imul(_e, St) | 0, X = X + Math.imul(Re, nt) | 0, Q = (Q = Q + Math.imul(Re, ot) | 0) + Math.imul(je, nt) | 0, ue = ue + Math.imul(je, ot) | 0, X = X + Math.imul(Ce, Fe) | 0, Q = (Q = Q + Math.imul(Ce, pt) | 0) + Math.imul(we, Fe) | 0, ue = ue + Math.imul(we, pt) | 0, X = X + Math.imul(Ne, At) | 0, Q = (Q = Q + Math.imul(Ne, Rt) | 0) + Math.imul(Ie, At) | 0, ue = ue + Math.imul(Ie, Rt) | 0, X = X + Math.imul(Le, lt) | 0, Q = (Q = Q + Math.imul(Le, st) | 0) + Math.imul(We, lt) | 0, ue = ue + Math.imul(We, st) | 0, X = X + Math.imul(Se, kt) | 0, Q = (Q = Q + Math.imul(Se, Bt) | 0) + Math.imul(Me, kt) | 0, ue = ue + Math.imul(Me, Bt) | 0, X = X + Math.imul(pe, Jt) | 0, Q = (Q = Q + Math.imul(pe, qt) | 0) + Math.imul(be, Jt) | 0, ue = ue + Math.imul(be, qt) | 0;
                var wn = (ne + (X = X + Math.imul(se, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(se, Ht) | 0) + Math.imul(me, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(me, Ht) | 0) + (Q >>> 13) | 0) + (wn >>> 26) | 0, wn &= 67108863, X = Math.imul(ft, Wt), Q = (Q = Math.imul(ft, mt)) + Math.imul(_t, Wt) | 0, ue = Math.imul(_t, mt), X = X + Math.imul($e, vt) | 0, Q = (Q = Q + Math.imul($e, St) | 0) + Math.imul(Ze, vt) | 0, ue = ue + Math.imul(Ze, St) | 0, X = X + Math.imul(tt, nt) | 0, Q = (Q = Q + Math.imul(tt, ot) | 0) + Math.imul(_e, nt) | 0, ue = ue + Math.imul(_e, ot) | 0, X = X + Math.imul(Re, Fe) | 0, Q = (Q = Q + Math.imul(Re, pt) | 0) + Math.imul(je, Fe) | 0, ue = ue + Math.imul(je, pt) | 0, X = X + Math.imul(Ce, At) | 0, Q = (Q = Q + Math.imul(Ce, Rt) | 0) + Math.imul(we, At) | 0, ue = ue + Math.imul(we, Rt) | 0, X = X + Math.imul(Ne, lt) | 0, Q = (Q = Q + Math.imul(Ne, st) | 0) + Math.imul(Ie, lt) | 0, ue = ue + Math.imul(Ie, st) | 0, X = X + Math.imul(Le, kt) | 0, Q = (Q = Q + Math.imul(Le, Bt) | 0) + Math.imul(We, kt) | 0, ue = ue + Math.imul(We, Bt) | 0, X = X + Math.imul(Se, Jt) | 0, Q = (Q = Q + Math.imul(Se, qt) | 0) + Math.imul(Me, Jt) | 0, ue = ue + Math.imul(Me, qt) | 0;
                var Rn = (ne + (X = X + Math.imul(pe, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(pe, Ht) | 0) + Math.imul(be, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(be, Ht) | 0) + (Q >>> 13) | 0) + (Rn >>> 26) | 0, Rn &= 67108863, X = Math.imul(ft, vt), Q = (Q = Math.imul(ft, St)) + Math.imul(_t, vt) | 0, ue = Math.imul(_t, St), X = X + Math.imul($e, nt) | 0, Q = (Q = Q + Math.imul($e, ot) | 0) + Math.imul(Ze, nt) | 0, ue = ue + Math.imul(Ze, ot) | 0, X = X + Math.imul(tt, Fe) | 0, Q = (Q = Q + Math.imul(tt, pt) | 0) + Math.imul(_e, Fe) | 0, ue = ue + Math.imul(_e, pt) | 0, X = X + Math.imul(Re, At) | 0, Q = (Q = Q + Math.imul(Re, Rt) | 0) + Math.imul(je, At) | 0, ue = ue + Math.imul(je, Rt) | 0, X = X + Math.imul(Ce, lt) | 0, Q = (Q = Q + Math.imul(Ce, st) | 0) + Math.imul(we, lt) | 0, ue = ue + Math.imul(we, st) | 0, X = X + Math.imul(Ne, kt) | 0, Q = (Q = Q + Math.imul(Ne, Bt) | 0) + Math.imul(Ie, kt) | 0, ue = ue + Math.imul(Ie, Bt) | 0, X = X + Math.imul(Le, Jt) | 0, Q = (Q = Q + Math.imul(Le, qt) | 0) + Math.imul(We, Jt) | 0, ue = ue + Math.imul(We, qt) | 0;
                var _n = (ne + (X = X + Math.imul(Se, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(Se, Ht) | 0) + Math.imul(Me, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(Me, Ht) | 0) + (Q >>> 13) | 0) + (_n >>> 26) | 0, _n &= 67108863, X = Math.imul(ft, nt), Q = (Q = Math.imul(ft, ot)) + Math.imul(_t, nt) | 0, ue = Math.imul(_t, ot), X = X + Math.imul($e, Fe) | 0, Q = (Q = Q + Math.imul($e, pt) | 0) + Math.imul(Ze, Fe) | 0, ue = ue + Math.imul(Ze, pt) | 0, X = X + Math.imul(tt, At) | 0, Q = (Q = Q + Math.imul(tt, Rt) | 0) + Math.imul(_e, At) | 0, ue = ue + Math.imul(_e, Rt) | 0, X = X + Math.imul(Re, lt) | 0, Q = (Q = Q + Math.imul(Re, st) | 0) + Math.imul(je, lt) | 0, ue = ue + Math.imul(je, st) | 0, X = X + Math.imul(Ce, kt) | 0, Q = (Q = Q + Math.imul(Ce, Bt) | 0) + Math.imul(we, kt) | 0, ue = ue + Math.imul(we, Bt) | 0, X = X + Math.imul(Ne, Jt) | 0, Q = (Q = Q + Math.imul(Ne, qt) | 0) + Math.imul(Ie, Jt) | 0, ue = ue + Math.imul(Ie, qt) | 0;
                var En = (ne + (X = X + Math.imul(Le, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(Le, Ht) | 0) + Math.imul(We, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(We, Ht) | 0) + (Q >>> 13) | 0) + (En >>> 26) | 0, En &= 67108863, X = Math.imul(ft, Fe), Q = (Q = Math.imul(ft, pt)) + Math.imul(_t, Fe) | 0, ue = Math.imul(_t, pt), X = X + Math.imul($e, At) | 0, Q = (Q = Q + Math.imul($e, Rt) | 0) + Math.imul(Ze, At) | 0, ue = ue + Math.imul(Ze, Rt) | 0, X = X + Math.imul(tt, lt) | 0, Q = (Q = Q + Math.imul(tt, st) | 0) + Math.imul(_e, lt) | 0, ue = ue + Math.imul(_e, st) | 0, X = X + Math.imul(Re, kt) | 0, Q = (Q = Q + Math.imul(Re, Bt) | 0) + Math.imul(je, kt) | 0, ue = ue + Math.imul(je, Bt) | 0, X = X + Math.imul(Ce, Jt) | 0, Q = (Q = Q + Math.imul(Ce, qt) | 0) + Math.imul(we, Jt) | 0, ue = ue + Math.imul(we, qt) | 0;
                var Kn = (ne + (X = X + Math.imul(Ne, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(Ne, Ht) | 0) + Math.imul(Ie, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(Ie, Ht) | 0) + (Q >>> 13) | 0) + (Kn >>> 26) | 0, Kn &= 67108863, X = Math.imul(ft, At), Q = (Q = Math.imul(ft, Rt)) + Math.imul(_t, At) | 0, ue = Math.imul(_t, Rt), X = X + Math.imul($e, lt) | 0, Q = (Q = Q + Math.imul($e, st) | 0) + Math.imul(Ze, lt) | 0, ue = ue + Math.imul(Ze, st) | 0, X = X + Math.imul(tt, kt) | 0, Q = (Q = Q + Math.imul(tt, Bt) | 0) + Math.imul(_e, kt) | 0, ue = ue + Math.imul(_e, Bt) | 0, X = X + Math.imul(Re, Jt) | 0, Q = (Q = Q + Math.imul(Re, qt) | 0) + Math.imul(je, Jt) | 0, ue = ue + Math.imul(je, qt) | 0;
                var Wn = (ne + (X = X + Math.imul(Ce, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(Ce, Ht) | 0) + Math.imul(we, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(we, Ht) | 0) + (Q >>> 13) | 0) + (Wn >>> 26) | 0, Wn &= 67108863, X = Math.imul(ft, lt), Q = (Q = Math.imul(ft, st)) + Math.imul(_t, lt) | 0, ue = Math.imul(_t, st), X = X + Math.imul($e, kt) | 0, Q = (Q = Q + Math.imul($e, Bt) | 0) + Math.imul(Ze, kt) | 0, ue = ue + Math.imul(Ze, Bt) | 0, X = X + Math.imul(tt, Jt) | 0, Q = (Q = Q + Math.imul(tt, qt) | 0) + Math.imul(_e, Jt) | 0, ue = ue + Math.imul(_e, qt) | 0;
                var hr = (ne + (X = X + Math.imul(Re, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(Re, Ht) | 0) + Math.imul(je, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(je, Ht) | 0) + (Q >>> 13) | 0) + (hr >>> 26) | 0, hr &= 67108863, X = Math.imul(ft, kt), Q = (Q = Math.imul(ft, Bt)) + Math.imul(_t, kt) | 0, ue = Math.imul(_t, Bt), X = X + Math.imul($e, Jt) | 0, Q = (Q = Q + Math.imul($e, qt) | 0) + Math.imul(Ze, Jt) | 0, ue = ue + Math.imul(Ze, qt) | 0;
                var Zn = (ne + (X = X + Math.imul(tt, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul(tt, Ht) | 0) + Math.imul(_e, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(_e, Ht) | 0) + (Q >>> 13) | 0) + (Zn >>> 26) | 0, Zn &= 67108863, X = Math.imul(ft, Jt), Q = (Q = Math.imul(ft, qt)) + Math.imul(_t, Jt) | 0, ue = Math.imul(_t, qt);
                var lr = (ne + (X = X + Math.imul($e, Yt) | 0) | 0) + ((8191 & (Q = (Q = Q + Math.imul($e, Ht) | 0) + Math.imul(Ze, Yt) | 0)) << 13) | 0;
                ne = ((ue = ue + Math.imul(Ze, Ht) | 0) + (Q >>> 13) | 0) + (lr >>> 26) | 0, lr &= 67108863;
                var cr = (ne + (X = Math.imul(ft, Yt)) | 0) + ((8191 & (Q = (Q = Math.imul(ft, Ht)) + Math.imul(_t, Yt) | 0)) << 13) | 0;
                return ne = ((ue = Math.imul(_t, Ht)) + (Q >>> 13) | 0) + (cr >>> 26) | 0, cr &= 67108863, de[0] = sn, de[1] = fn, de[2] = In, de[3] = zn, de[4] = Cn, de[5] = gn, de[6] = Mn, de[7] = Xn, de[8] = Pn, de[9] = wn, de[10] = Rn, de[11] = _n, de[12] = En, de[13] = Kn, de[14] = Wn, de[15] = hr, de[16] = Zn, de[17] = lr, de[18] = cr, ne !== 0 && (de[19] = ne, ee.length++), ee;
              };
              function O(Y, te, ee) {
                return new T().mulp(Y, te, ee);
              }
              function T(Y, te) {
                this.x = Y, this.y = te;
              }
              Math.imul || (M = I), k.prototype.mulTo = function(Y, te) {
                var ee, X = this.length + Y.length;
                return ee = this.length === 10 && Y.length === 10 ? M(this, Y, te) : X < 63 ? I(this, Y, te) : X < 1024 ? function(Q, ue, ce) {
                  ce.negative = ue.negative ^ Q.negative, ce.length = Q.length + ue.length;
                  for (var he = 0, de = 0, ne = 0; ne < ce.length - 1; ne++) {
                    var ae = de;
                    de = 0;
                    for (var se = 67108863 & he, me = Math.min(ne, ue.length - 1), ye = Math.max(0, ne - Q.length + 1); ye <= me; ye++) {
                      var pe = ne - ye, be = (0 | Q.words[pe]) * (0 | ue.words[ye]), Ae = 67108863 & be;
                      se = 67108863 & (Ae = Ae + se | 0), de += (ae = (ae = ae + (be / 67108864 | 0) | 0) + (Ae >>> 26) | 0) >>> 26, ae &= 67108863;
                    }
                    ce.words[ne] = se, he = ae, ae = de;
                  }
                  return he !== 0 ? ce.words[ne] = he : ce.length--, ce.strip();
                }(this, Y, te) : O(this, Y, te), ee;
              }, T.prototype.makeRBT = function(Y) {
                for (var te = new Array(Y), ee = k.prototype._countBits(Y) - 1, X = 0; X < Y; X++) te[X] = this.revBin(X, ee, Y);
                return te;
              }, T.prototype.revBin = function(Y, te, ee) {
                if (Y === 0 || Y === ee - 1) return Y;
                for (var X = 0, Q = 0; Q < te; Q++) X |= (1 & Y) << te - Q - 1, Y >>= 1;
                return X;
              }, T.prototype.permute = function(Y, te, ee, X, Q, ue) {
                for (var ce = 0; ce < ue; ce++) X[ce] = te[Y[ce]], Q[ce] = ee[Y[ce]];
              }, T.prototype.transform = function(Y, te, ee, X, Q, ue) {
                this.permute(ue, Y, te, ee, X, Q);
                for (var ce = 1; ce < Q; ce <<= 1) for (var he = ce << 1, de = Math.cos(2 * Math.PI / he), ne = Math.sin(2 * Math.PI / he), ae = 0; ae < Q; ae += he) for (var se = de, me = ne, ye = 0; ye < ce; ye++) {
                  var pe = ee[ae + ye], be = X[ae + ye], Ae = ee[ae + ye + ce], Se = X[ae + ye + ce], Me = se * Ae - me * Se;
                  Se = se * Se + me * Ae, Ae = Me, ee[ae + ye] = pe + Ae, X[ae + ye] = be + Se, ee[ae + ye + ce] = pe - Ae, X[ae + ye + ce] = be - Se, ye !== he && (Me = de * se - ne * me, me = de * me + ne * se, se = Me);
                }
              }, T.prototype.guessLen13b = function(Y, te) {
                var ee = 1 | Math.max(te, Y), X = 1 & ee, Q = 0;
                for (ee = ee / 2 | 0; ee; ee >>>= 1) Q++;
                return 1 << Q + 1 + X;
              }, T.prototype.conjugate = function(Y, te, ee) {
                if (!(ee <= 1)) for (var X = 0; X < ee / 2; X++) {
                  var Q = Y[X];
                  Y[X] = Y[ee - X - 1], Y[ee - X - 1] = Q, Q = te[X], te[X] = -te[ee - X - 1], te[ee - X - 1] = -Q;
                }
              }, T.prototype.normalize13b = function(Y, te) {
                for (var ee = 0, X = 0; X < te / 2; X++) {
                  var Q = 8192 * Math.round(Y[2 * X + 1] / te) + Math.round(Y[2 * X] / te) + ee;
                  Y[X] = 67108863 & Q, ee = Q < 67108864 ? 0 : Q / 67108864 | 0;
                }
                return Y;
              }, T.prototype.convert13b = function(Y, te, ee, X) {
                for (var Q = 0, ue = 0; ue < te; ue++) Q += 0 | Y[ue], ee[2 * ue] = 8191 & Q, Q >>>= 13, ee[2 * ue + 1] = 8191 & Q, Q >>>= 13;
                for (ue = 2 * te; ue < X; ++ue) ee[ue] = 0;
                x(Q === 0), x((-8192 & Q) == 0);
              }, T.prototype.stub = function(Y) {
                for (var te = new Array(Y), ee = 0; ee < Y; ee++) te[ee] = 0;
                return te;
              }, T.prototype.mulp = function(Y, te, ee) {
                var X = 2 * this.guessLen13b(Y.length, te.length), Q = this.makeRBT(X), ue = this.stub(X), ce = new Array(X), he = new Array(X), de = new Array(X), ne = new Array(X), ae = new Array(X), se = new Array(X), me = ee.words;
                me.length = X, this.convert13b(Y.words, Y.length, ce, X), this.convert13b(te.words, te.length, ne, X), this.transform(ce, ue, he, de, X, Q), this.transform(ne, ue, ae, se, X, Q);
                for (var ye = 0; ye < X; ye++) {
                  var pe = he[ye] * ae[ye] - de[ye] * se[ye];
                  de[ye] = he[ye] * se[ye] + de[ye] * ae[ye], he[ye] = pe;
                }
                return this.conjugate(he, de, X), this.transform(he, de, me, ue, X, Q), this.conjugate(me, ue, X), this.normalize13b(me, X), ee.negative = Y.negative ^ te.negative, ee.length = Y.length + te.length, ee.strip();
              }, k.prototype.mul = function(Y) {
                var te = new k(null);
                return te.words = new Array(this.length + Y.length), this.mulTo(Y, te);
              }, k.prototype.mulf = function(Y) {
                var te = new k(null);
                return te.words = new Array(this.length + Y.length), O(this, Y, te);
              }, k.prototype.imul = function(Y) {
                return this.clone().mulTo(Y, this);
              }, k.prototype.imuln = function(Y) {
                x(typeof Y == "number"), x(Y < 67108864);
                for (var te = 0, ee = 0; ee < this.length; ee++) {
                  var X = (0 | this.words[ee]) * Y, Q = (67108863 & X) + (67108863 & te);
                  te >>= 26, te += X / 67108864 | 0, te += Q >>> 26, this.words[ee] = 67108863 & Q;
                }
                return te !== 0 && (this.words[ee] = te, this.length++), this;
              }, k.prototype.muln = function(Y) {
                return this.clone().imuln(Y);
              }, k.prototype.sqr = function() {
                return this.mul(this);
              }, k.prototype.isqr = function() {
                return this.imul(this.clone());
              }, k.prototype.pow = function(Y) {
                var te = function(ue) {
                  for (var ce = new Array(ue.bitLength()), he = 0; he < ce.length; he++) {
                    var de = he / 26 | 0, ne = he % 26;
                    ce[he] = (ue.words[de] & 1 << ne) >>> ne;
                  }
                  return ce;
                }(Y);
                if (te.length === 0) return new k(1);
                for (var ee = this, X = 0; X < te.length && te[X] === 0; X++, ee = ee.sqr()) ;
                if (++X < te.length) for (var Q = ee.sqr(); X < te.length; X++, Q = Q.sqr()) te[X] !== 0 && (ee = ee.mul(Q));
                return ee;
              }, k.prototype.iushln = function(Y) {
                x(typeof Y == "number" && Y >= 0);
                var te, ee = Y % 26, X = (Y - ee) / 26, Q = 67108863 >>> 26 - ee << 26 - ee;
                if (ee !== 0) {
                  var ue = 0;
                  for (te = 0; te < this.length; te++) {
                    var ce = this.words[te] & Q, he = (0 | this.words[te]) - ce << ee;
                    this.words[te] = he | ue, ue = ce >>> 26 - ee;
                  }
                  ue && (this.words[te] = ue, this.length++);
                }
                if (X !== 0) {
                  for (te = this.length - 1; te >= 0; te--) this.words[te + X] = this.words[te];
                  for (te = 0; te < X; te++) this.words[te] = 0;
                  this.length += X;
                }
                return this.strip();
              }, k.prototype.ishln = function(Y) {
                return x(this.negative === 0), this.iushln(Y);
              }, k.prototype.iushrn = function(Y, te, ee) {
                var X;
                x(typeof Y == "number" && Y >= 0), X = te ? (te - te % 26) / 26 : 0;
                var Q = Y % 26, ue = Math.min((Y - Q) / 26, this.length), ce = 67108863 ^ 67108863 >>> Q << Q, he = ee;
                if (X -= ue, X = Math.max(0, X), he) {
                  for (var de = 0; de < ue; de++) he.words[de] = this.words[de];
                  he.length = ue;
                }
                if (ue !== 0) if (this.length > ue) for (this.length -= ue, de = 0; de < this.length; de++) this.words[de] = this.words[de + ue];
                else this.words[0] = 0, this.length = 1;
                var ne = 0;
                for (de = this.length - 1; de >= 0 && (ne !== 0 || de >= X); de--) {
                  var ae = 0 | this.words[de];
                  this.words[de] = ne << 26 - Q | ae >>> Q, ne = ae & ce;
                }
                return he && ne !== 0 && (he.words[he.length++] = ne), this.length === 0 && (this.words[0] = 0, this.length = 1), this.strip();
              }, k.prototype.ishrn = function(Y, te, ee) {
                return x(this.negative === 0), this.iushrn(Y, te, ee);
              }, k.prototype.shln = function(Y) {
                return this.clone().ishln(Y);
              }, k.prototype.ushln = function(Y) {
                return this.clone().iushln(Y);
              }, k.prototype.shrn = function(Y) {
                return this.clone().ishrn(Y);
              }, k.prototype.ushrn = function(Y) {
                return this.clone().iushrn(Y);
              }, k.prototype.testn = function(Y) {
                x(typeof Y == "number" && Y >= 0);
                var te = Y % 26, ee = (Y - te) / 26, X = 1 << te;
                return !(this.length <= ee || !(this.words[ee] & X));
              }, k.prototype.imaskn = function(Y) {
                x(typeof Y == "number" && Y >= 0);
                var te = Y % 26, ee = (Y - te) / 26;
                if (x(this.negative === 0, "imaskn works only with positive numbers"), this.length <= ee) return this;
                if (te !== 0 && ee++, this.length = Math.min(ee, this.length), te !== 0) {
                  var X = 67108863 ^ 67108863 >>> te << te;
                  this.words[this.length - 1] &= X;
                }
                return this.strip();
              }, k.prototype.maskn = function(Y) {
                return this.clone().imaskn(Y);
              }, k.prototype.iaddn = function(Y) {
                return x(typeof Y == "number"), x(Y < 67108864), Y < 0 ? this.isubn(-Y) : this.negative !== 0 ? this.length === 1 && (0 | this.words[0]) < Y ? (this.words[0] = Y - (0 | this.words[0]), this.negative = 0, this) : (this.negative = 0, this.isubn(Y), this.negative = 1, this) : this._iaddn(Y);
              }, k.prototype._iaddn = function(Y) {
                this.words[0] += Y;
                for (var te = 0; te < this.length && this.words[te] >= 67108864; te++) this.words[te] -= 67108864, te === this.length - 1 ? this.words[te + 1] = 1 : this.words[te + 1]++;
                return this.length = Math.max(this.length, te + 1), this;
              }, k.prototype.isubn = function(Y) {
                if (x(typeof Y == "number"), x(Y < 67108864), Y < 0) return this.iaddn(-Y);
                if (this.negative !== 0) return this.negative = 0, this.iaddn(Y), this.negative = 1, this;
                if (this.words[0] -= Y, this.length === 1 && this.words[0] < 0) this.words[0] = -this.words[0], this.negative = 1;
                else for (var te = 0; te < this.length && this.words[te] < 0; te++) this.words[te] += 67108864, this.words[te + 1] -= 1;
                return this.strip();
              }, k.prototype.addn = function(Y) {
                return this.clone().iaddn(Y);
              }, k.prototype.subn = function(Y) {
                return this.clone().isubn(Y);
              }, k.prototype.iabs = function() {
                return this.negative = 0, this;
              }, k.prototype.abs = function() {
                return this.clone().iabs();
              }, k.prototype._ishlnsubmul = function(Y, te, ee) {
                var X, Q, ue = Y.length + ee;
                this._expand(ue);
                var ce = 0;
                for (X = 0; X < Y.length; X++) {
                  Q = (0 | this.words[X + ee]) + ce;
                  var he = (0 | Y.words[X]) * te;
                  ce = ((Q -= 67108863 & he) >> 26) - (he / 67108864 | 0), this.words[X + ee] = 67108863 & Q;
                }
                for (; X < this.length - ee; X++) ce = (Q = (0 | this.words[X + ee]) + ce) >> 26, this.words[X + ee] = 67108863 & Q;
                if (ce === 0) return this.strip();
                for (x(ce === -1), ce = 0, X = 0; X < this.length; X++) ce = (Q = -(0 | this.words[X]) + ce) >> 26, this.words[X] = 67108863 & Q;
                return this.negative = 1, this.strip();
              }, k.prototype._wordDiv = function(Y, te) {
                var ee = (this.length, Y.length), X = this.clone(), Q = Y, ue = 0 | Q.words[Q.length - 1];
                (ee = 26 - this._countBits(ue)) != 0 && (Q = Q.ushln(ee), X.iushln(ee), ue = 0 | Q.words[Q.length - 1]);
                var ce, he = X.length - Q.length;
                if (te !== "mod") {
                  (ce = new k(null)).length = he + 1, ce.words = new Array(ce.length);
                  for (var de = 0; de < ce.length; de++) ce.words[de] = 0;
                }
                var ne = X.clone()._ishlnsubmul(Q, 1, he);
                ne.negative === 0 && (X = ne, ce && (ce.words[he] = 1));
                for (var ae = he - 1; ae >= 0; ae--) {
                  var se = 67108864 * (0 | X.words[Q.length + ae]) + (0 | X.words[Q.length + ae - 1]);
                  for (se = Math.min(se / ue | 0, 67108863), X._ishlnsubmul(Q, se, ae); X.negative !== 0; ) se--, X.negative = 0, X._ishlnsubmul(Q, 1, ae), X.isZero() || (X.negative ^= 1);
                  ce && (ce.words[ae] = se);
                }
                return ce && ce.strip(), X.strip(), te !== "div" && ee !== 0 && X.iushrn(ee), { div: ce || null, mod: X };
              }, k.prototype.divmod = function(Y, te, ee) {
                return x(!Y.isZero()), this.isZero() ? { div: new k(0), mod: new k(0) } : this.negative !== 0 && Y.negative === 0 ? (ue = this.neg().divmod(Y, te), te !== "mod" && (X = ue.div.neg()), te !== "div" && (Q = ue.mod.neg(), ee && Q.negative !== 0 && Q.iadd(Y)), { div: X, mod: Q }) : this.negative === 0 && Y.negative !== 0 ? (ue = this.divmod(Y.neg(), te), te !== "mod" && (X = ue.div.neg()), { div: X, mod: ue.mod }) : this.negative & Y.negative ? (ue = this.neg().divmod(Y.neg(), te), te !== "div" && (Q = ue.mod.neg(), ee && Q.negative !== 0 && Q.isub(Y)), { div: ue.div, mod: Q }) : Y.length > this.length || this.cmp(Y) < 0 ? { div: new k(0), mod: this } : Y.length === 1 ? te === "div" ? { div: this.divn(Y.words[0]), mod: null } : te === "mod" ? { div: null, mod: new k(this.modn(Y.words[0])) } : { div: this.divn(Y.words[0]), mod: new k(this.modn(Y.words[0])) } : this._wordDiv(Y, te);
                var X, Q, ue;
              }, k.prototype.div = function(Y) {
                return this.divmod(Y, "div", !1).div;
              }, k.prototype.mod = function(Y) {
                return this.divmod(Y, "mod", !1).mod;
              }, k.prototype.umod = function(Y) {
                return this.divmod(Y, "mod", !0).mod;
              }, k.prototype.divRound = function(Y) {
                var te = this.divmod(Y);
                if (te.mod.isZero()) return te.div;
                var ee = te.div.negative !== 0 ? te.mod.isub(Y) : te.mod, X = Y.ushrn(1), Q = Y.andln(1), ue = ee.cmp(X);
                return ue < 0 || Q === 1 && ue === 0 ? te.div : te.div.negative !== 0 ? te.div.isubn(1) : te.div.iaddn(1);
              }, k.prototype.modn = function(Y) {
                x(Y <= 67108863);
                for (var te = 67108864 % Y, ee = 0, X = this.length - 1; X >= 0; X--) ee = (te * ee + (0 | this.words[X])) % Y;
                return ee;
              }, k.prototype.idivn = function(Y) {
                x(Y <= 67108863);
                for (var te = 0, ee = this.length - 1; ee >= 0; ee--) {
                  var X = (0 | this.words[ee]) + 67108864 * te;
                  this.words[ee] = X / Y | 0, te = X % Y;
                }
                return this.strip();
              }, k.prototype.divn = function(Y) {
                return this.clone().idivn(Y);
              }, k.prototype.egcd = function(Y) {
                x(Y.negative === 0), x(!Y.isZero());
                var te = this, ee = Y.clone();
                te = te.negative !== 0 ? te.umod(Y) : te.clone();
                for (var X = new k(1), Q = new k(0), ue = new k(0), ce = new k(1), he = 0; te.isEven() && ee.isEven(); ) te.iushrn(1), ee.iushrn(1), ++he;
                for (var de = ee.clone(), ne = te.clone(); !te.isZero(); ) {
                  for (var ae = 0, se = 1; !(te.words[0] & se) && ae < 26; ++ae, se <<= 1) ;
                  if (ae > 0) for (te.iushrn(ae); ae-- > 0; ) (X.isOdd() || Q.isOdd()) && (X.iadd(de), Q.isub(ne)), X.iushrn(1), Q.iushrn(1);
                  for (var me = 0, ye = 1; !(ee.words[0] & ye) && me < 26; ++me, ye <<= 1) ;
                  if (me > 0) for (ee.iushrn(me); me-- > 0; ) (ue.isOdd() || ce.isOdd()) && (ue.iadd(de), ce.isub(ne)), ue.iushrn(1), ce.iushrn(1);
                  te.cmp(ee) >= 0 ? (te.isub(ee), X.isub(ue), Q.isub(ce)) : (ee.isub(te), ue.isub(X), ce.isub(Q));
                }
                return { a: ue, b: ce, gcd: ee.iushln(he) };
              }, k.prototype._invmp = function(Y) {
                x(Y.negative === 0), x(!Y.isZero());
                var te = this, ee = Y.clone();
                te = te.negative !== 0 ? te.umod(Y) : te.clone();
                for (var X, Q = new k(1), ue = new k(0), ce = ee.clone(); te.cmpn(1) > 0 && ee.cmpn(1) > 0; ) {
                  for (var he = 0, de = 1; !(te.words[0] & de) && he < 26; ++he, de <<= 1) ;
                  if (he > 0) for (te.iushrn(he); he-- > 0; ) Q.isOdd() && Q.iadd(ce), Q.iushrn(1);
                  for (var ne = 0, ae = 1; !(ee.words[0] & ae) && ne < 26; ++ne, ae <<= 1) ;
                  if (ne > 0) for (ee.iushrn(ne); ne-- > 0; ) ue.isOdd() && ue.iadd(ce), ue.iushrn(1);
                  te.cmp(ee) >= 0 ? (te.isub(ee), Q.isub(ue)) : (ee.isub(te), ue.isub(Q));
                }
                return (X = te.cmpn(1) === 0 ? Q : ue).cmpn(0) < 0 && X.iadd(Y), X;
              }, k.prototype.gcd = function(Y) {
                if (this.isZero()) return Y.abs();
                if (Y.isZero()) return this.abs();
                var te = this.clone(), ee = Y.clone();
                te.negative = 0, ee.negative = 0;
                for (var X = 0; te.isEven() && ee.isEven(); X++) te.iushrn(1), ee.iushrn(1);
                for (; ; ) {
                  for (; te.isEven(); ) te.iushrn(1);
                  for (; ee.isEven(); ) ee.iushrn(1);
                  var Q = te.cmp(ee);
                  if (Q < 0) {
                    var ue = te;
                    te = ee, ee = ue;
                  } else if (Q === 0 || ee.cmpn(1) === 0) break;
                  te.isub(ee);
                }
                return ee.iushln(X);
              }, k.prototype.invm = function(Y) {
                return this.egcd(Y).a.umod(Y);
              }, k.prototype.isEven = function() {
                return (1 & this.words[0]) == 0;
              }, k.prototype.isOdd = function() {
                return (1 & this.words[0]) == 1;
              }, k.prototype.andln = function(Y) {
                return this.words[0] & Y;
              }, k.prototype.bincn = function(Y) {
                x(typeof Y == "number");
                var te = Y % 26, ee = (Y - te) / 26, X = 1 << te;
                if (this.length <= ee) return this._expand(ee + 1), this.words[ee] |= X, this;
                for (var Q = X, ue = ee; Q !== 0 && ue < this.length; ue++) {
                  var ce = 0 | this.words[ue];
                  Q = (ce += Q) >>> 26, ce &= 67108863, this.words[ue] = ce;
                }
                return Q !== 0 && (this.words[ue] = Q, this.length++), this;
              }, k.prototype.isZero = function() {
                return this.length === 1 && this.words[0] === 0;
              }, k.prototype.cmpn = function(Y) {
                var te, ee = Y < 0;
                if (this.negative !== 0 && !ee) return -1;
                if (this.negative === 0 && ee) return 1;
                if (this.strip(), this.length > 1) te = 1;
                else {
                  ee && (Y = -Y), x(Y <= 67108863, "Number is too big");
                  var X = 0 | this.words[0];
                  te = X === Y ? 0 : X < Y ? -1 : 1;
                }
                return this.negative !== 0 ? 0 | -te : te;
              }, k.prototype.cmp = function(Y) {
                if (this.negative !== 0 && Y.negative === 0) return -1;
                if (this.negative === 0 && Y.negative !== 0) return 1;
                var te = this.ucmp(Y);
                return this.negative !== 0 ? 0 | -te : te;
              }, k.prototype.ucmp = function(Y) {
                if (this.length > Y.length) return 1;
                if (this.length < Y.length) return -1;
                for (var te = 0, ee = this.length - 1; ee >= 0; ee--) {
                  var X = 0 | this.words[ee], Q = 0 | Y.words[ee];
                  if (X !== Q) {
                    X < Q ? te = -1 : X > Q && (te = 1);
                    break;
                  }
                }
                return te;
              }, k.prototype.gtn = function(Y) {
                return this.cmpn(Y) === 1;
              }, k.prototype.gt = function(Y) {
                return this.cmp(Y) === 1;
              }, k.prototype.gten = function(Y) {
                return this.cmpn(Y) >= 0;
              }, k.prototype.gte = function(Y) {
                return this.cmp(Y) >= 0;
              }, k.prototype.ltn = function(Y) {
                return this.cmpn(Y) === -1;
              }, k.prototype.lt = function(Y) {
                return this.cmp(Y) === -1;
              }, k.prototype.lten = function(Y) {
                return this.cmpn(Y) <= 0;
              }, k.prototype.lte = function(Y) {
                return this.cmp(Y) <= 0;
              }, k.prototype.eqn = function(Y) {
                return this.cmpn(Y) === 0;
              }, k.prototype.eq = function(Y) {
                return this.cmp(Y) === 0;
              }, k.red = function(Y) {
                return new K(Y);
              }, k.prototype.toRed = function(Y) {
                return x(!this.red, "Already a number in reduction context"), x(this.negative === 0, "red works only with positives"), Y.convertTo(this)._forceRed(Y);
              }, k.prototype.fromRed = function() {
                return x(this.red, "fromRed works only with numbers in reduction context"), this.red.convertFrom(this);
              }, k.prototype._forceRed = function(Y) {
                return this.red = Y, this;
              }, k.prototype.forceRed = function(Y) {
                return x(!this.red, "Already a number in reduction context"), this._forceRed(Y);
              }, k.prototype.redAdd = function(Y) {
                return x(this.red, "redAdd works only with red numbers"), this.red.add(this, Y);
              }, k.prototype.redIAdd = function(Y) {
                return x(this.red, "redIAdd works only with red numbers"), this.red.iadd(this, Y);
              }, k.prototype.redSub = function(Y) {
                return x(this.red, "redSub works only with red numbers"), this.red.sub(this, Y);
              }, k.prototype.redISub = function(Y) {
                return x(this.red, "redISub works only with red numbers"), this.red.isub(this, Y);
              }, k.prototype.redShl = function(Y) {
                return x(this.red, "redShl works only with red numbers"), this.red.shl(this, Y);
              }, k.prototype.redMul = function(Y) {
                return x(this.red, "redMul works only with red numbers"), this.red._verify2(this, Y), this.red.mul(this, Y);
              }, k.prototype.redIMul = function(Y) {
                return x(this.red, "redMul works only with red numbers"), this.red._verify2(this, Y), this.red.imul(this, Y);
              }, k.prototype.redSqr = function() {
                return x(this.red, "redSqr works only with red numbers"), this.red._verify1(this), this.red.sqr(this);
              }, k.prototype.redISqr = function() {
                return x(this.red, "redISqr works only with red numbers"), this.red._verify1(this), this.red.isqr(this);
              }, k.prototype.redSqrt = function() {
                return x(this.red, "redSqrt works only with red numbers"), this.red._verify1(this), this.red.sqrt(this);
              }, k.prototype.redInvm = function() {
                return x(this.red, "redInvm works only with red numbers"), this.red._verify1(this), this.red.invm(this);
              }, k.prototype.redNeg = function() {
                return x(this.red, "redNeg works only with red numbers"), this.red._verify1(this), this.red.neg(this);
              }, k.prototype.redPow = function(Y) {
                return x(this.red && !Y.red, "redPow(normalNum)"), this.red._verify1(this), this.red.pow(this, Y);
              };
              var z = { k256: null, p224: null, p192: null, p25519: null };
              function F(Y, te) {
                this.name = Y, this.p = new k(te, 16), this.n = this.p.bitLength(), this.k = new k(1).iushln(this.n).isub(this.p), this.tmp = this._tmp();
              }
              function U() {
                F.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");
              }
              function V() {
                F.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");
              }
              function $() {
                F.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");
              }
              function q() {
                F.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");
              }
              function K(Y) {
                if (typeof Y == "string") {
                  var te = k._prime(Y);
                  this.m = te.p, this.prime = te;
                } else x(Y.gtn(1), "modulus must be greater than 1"), this.m = Y, this.prime = null;
              }
              function re(Y) {
                K.call(this, Y), this.shift = this.m.bitLength(), this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), this.r = new k(1).iushln(this.shift), this.r2 = this.imod(this.r.sqr()), this.rinv = this.r._invmp(this.m), this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), this.minv = this.minv.umod(this.r), this.minv = this.r.sub(this.minv);
              }
              F.prototype._tmp = function() {
                var Y = new k(null);
                return Y.words = new Array(Math.ceil(this.n / 13)), Y;
              }, F.prototype.ireduce = function(Y) {
                var te, ee = Y;
                do
                  this.split(ee, this.tmp), te = (ee = (ee = this.imulK(ee)).iadd(this.tmp)).bitLength();
                while (te > this.n);
                var X = te < this.n ? -1 : ee.ucmp(this.p);
                return X === 0 ? (ee.words[0] = 0, ee.length = 1) : X > 0 ? ee.isub(this.p) : ee.strip !== void 0 ? ee.strip() : ee._strip(), ee;
              }, F.prototype.split = function(Y, te) {
                Y.iushrn(this.n, 0, te);
              }, F.prototype.imulK = function(Y) {
                return Y.imul(this.k);
              }, w(U, F), U.prototype.split = function(Y, te) {
                for (var ee = 4194303, X = Math.min(Y.length, 9), Q = 0; Q < X; Q++) te.words[Q] = Y.words[Q];
                if (te.length = X, Y.length <= 9) return Y.words[0] = 0, void (Y.length = 1);
                var ue = Y.words[9];
                for (te.words[te.length++] = ue & ee, Q = 10; Q < Y.length; Q++) {
                  var ce = 0 | Y.words[Q];
                  Y.words[Q - 10] = (ce & ee) << 4 | ue >>> 22, ue = ce;
                }
                ue >>>= 22, Y.words[Q - 10] = ue, ue === 0 && Y.length > 10 ? Y.length -= 10 : Y.length -= 9;
              }, U.prototype.imulK = function(Y) {
                Y.words[Y.length] = 0, Y.words[Y.length + 1] = 0, Y.length += 2;
                for (var te = 0, ee = 0; ee < Y.length; ee++) {
                  var X = 0 | Y.words[ee];
                  te += 977 * X, Y.words[ee] = 67108863 & te, te = 64 * X + (te / 67108864 | 0);
                }
                return Y.words[Y.length - 1] === 0 && (Y.length--, Y.words[Y.length - 1] === 0 && Y.length--), Y;
              }, w(V, F), w($, F), w(q, F), q.prototype.imulK = function(Y) {
                for (var te = 0, ee = 0; ee < Y.length; ee++) {
                  var X = 19 * (0 | Y.words[ee]) + te, Q = 67108863 & X;
                  X >>>= 26, Y.words[ee] = Q, te = X;
                }
                return te !== 0 && (Y.words[Y.length++] = te), Y;
              }, k._prime = function(Y) {
                if (z[Y]) return z[Y];
                var te;
                if (Y === "k256") te = new U();
                else if (Y === "p224") te = new V();
                else if (Y === "p192") te = new $();
                else {
                  if (Y !== "p25519") throw new Error("Unknown prime " + Y);
                  te = new q();
                }
                return z[Y] = te, te;
              }, K.prototype._verify1 = function(Y) {
                x(Y.negative === 0, "red works only with positives"), x(Y.red, "red works only with red numbers");
              }, K.prototype._verify2 = function(Y, te) {
                x((Y.negative | te.negative) == 0, "red works only with positives"), x(Y.red && Y.red === te.red, "red works only with red numbers");
              }, K.prototype.imod = function(Y) {
                return this.prime ? this.prime.ireduce(Y)._forceRed(this) : Y.umod(this.m)._forceRed(this);
              }, K.prototype.neg = function(Y) {
                return Y.isZero() ? Y.clone() : this.m.sub(Y)._forceRed(this);
              }, K.prototype.add = function(Y, te) {
                this._verify2(Y, te);
                var ee = Y.add(te);
                return ee.cmp(this.m) >= 0 && ee.isub(this.m), ee._forceRed(this);
              }, K.prototype.iadd = function(Y, te) {
                this._verify2(Y, te);
                var ee = Y.iadd(te);
                return ee.cmp(this.m) >= 0 && ee.isub(this.m), ee;
              }, K.prototype.sub = function(Y, te) {
                this._verify2(Y, te);
                var ee = Y.sub(te);
                return ee.cmpn(0) < 0 && ee.iadd(this.m), ee._forceRed(this);
              }, K.prototype.isub = function(Y, te) {
                this._verify2(Y, te);
                var ee = Y.isub(te);
                return ee.cmpn(0) < 0 && ee.iadd(this.m), ee;
              }, K.prototype.shl = function(Y, te) {
                return this._verify1(Y), this.imod(Y.ushln(te));
              }, K.prototype.imul = function(Y, te) {
                return this._verify2(Y, te), this.imod(Y.imul(te));
              }, K.prototype.mul = function(Y, te) {
                return this._verify2(Y, te), this.imod(Y.mul(te));
              }, K.prototype.isqr = function(Y) {
                return this.imul(Y, Y.clone());
              }, K.prototype.sqr = function(Y) {
                return this.mul(Y, Y);
              }, K.prototype.sqrt = function(Y) {
                if (Y.isZero()) return Y.clone();
                var te = this.m.andln(3);
                if (x(te % 2 == 1), te === 3) {
                  var ee = this.m.add(new k(1)).iushrn(2);
                  return this.pow(Y, ee);
                }
                for (var X = this.m.subn(1), Q = 0; !X.isZero() && X.andln(1) === 0; ) Q++, X.iushrn(1);
                x(!X.isZero());
                var ue = new k(1).toRed(this), ce = ue.redNeg(), he = this.m.subn(1).iushrn(1), de = this.m.bitLength();
                for (de = new k(2 * de * de).toRed(this); this.pow(de, he).cmp(ce) !== 0; ) de.redIAdd(ce);
                for (var ne = this.pow(de, X), ae = this.pow(Y, X.addn(1).iushrn(1)), se = this.pow(Y, X), me = Q; se.cmp(ue) !== 0; ) {
                  for (var ye = se, pe = 0; ye.cmp(ue) !== 0; pe++) ye = ye.redSqr();
                  x(pe < me);
                  var be = this.pow(ne, new k(1).iushln(me - pe - 1));
                  ae = ae.redMul(be), ne = be.redSqr(), se = se.redMul(ne), me = pe;
                }
                return ae;
              }, K.prototype.invm = function(Y) {
                var te = Y._invmp(this.m);
                return te.negative !== 0 ? (te.negative = 0, this.imod(te).redNeg()) : this.imod(te);
              }, K.prototype.pow = function(Y, te) {
                if (te.isZero()) return new k(1).toRed(this);
                if (te.cmpn(1) === 0) return Y.clone();
                var ee = new Array(16);
                ee[0] = new k(1).toRed(this), ee[1] = Y;
                for (var X = 2; X < ee.length; X++) ee[X] = this.mul(ee[X - 1], Y);
                var Q = ee[0], ue = 0, ce = 0, he = te.bitLength() % 26;
                for (he === 0 && (he = 26), X = te.length - 1; X >= 0; X--) {
                  for (var de = te.words[X], ne = he - 1; ne >= 0; ne--) {
                    var ae = de >> ne & 1;
                    Q !== ee[0] && (Q = this.sqr(Q)), ae !== 0 || ue !== 0 ? (ue <<= 1, ue |= ae, (++ce == 4 || X === 0 && ne === 0) && (Q = this.mul(Q, ee[ue]), ce = 0, ue = 0)) : ce = 0;
                  }
                  he = 26;
                }
                return Q;
              }, K.prototype.convertTo = function(Y) {
                var te = Y.umod(this.m);
                return te === Y ? te.clone() : te;
              }, K.prototype.convertFrom = function(Y) {
                var te = Y.clone();
                return te.red = null, te;
              }, k.mont = function(Y) {
                return new re(Y);
              }, w(re, K), re.prototype.convertTo = function(Y) {
                return this.imod(Y.ushln(this.shift));
              }, re.prototype.convertFrom = function(Y) {
                var te = this.imod(Y.mul(this.rinv));
                return te.red = null, te;
              }, re.prototype.imul = function(Y, te) {
                if (Y.isZero() || te.isZero()) return Y.words[0] = 0, Y.length = 1, Y;
                var ee = Y.imul(te), X = ee.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), Q = ee.isub(X).iushrn(this.shift), ue = Q;
                return Q.cmp(this.m) >= 0 ? ue = Q.isub(this.m) : Q.cmpn(0) < 0 && (ue = Q.iadd(this.m)), ue._forceRed(this);
              }, re.prototype.mul = function(Y, te) {
                if (Y.isZero() || te.isZero()) return new k(0)._forceRed(this);
                var ee = Y.mul(te), X = ee.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), Q = ee.isub(X).iushrn(this.shift), ue = Q;
                return Q.cmp(this.m) >= 0 ? ue = Q.isub(this.m) : Q.cmpn(0) < 0 && (ue = Q.iadd(this.m)), ue._forceRed(this);
              }, re.prototype.invm = function(Y) {
                return this.imod(Y._invmp(this.m).mul(this.r2))._forceRed(this);
              };
            })(d = c.nmd(d), this);
          }, 6204: function(d) {
            d.exports = function(f) {
              var c, g, m, x = f.length, w = 0;
              for (c = 0; c < x; ++c) w += f[c].length;
              var k = new Array(w), S = 0;
              for (c = 0; c < x; ++c) {
                var A = f[c], C = A.length;
                for (g = 0; g < C; ++g) {
                  var D = k[S++] = new Array(C - 1), L = 0;
                  for (m = 0; m < C; ++m) m !== g && (D[L++] = A[m]);
                  if (1 & g) {
                    var E = D[1];
                    D[1] = D[0], D[0] = E;
                  }
                }
              }
              return k;
            };
          }, 6867: function(d, f, c) {
            d.exports = function(D, L, E) {
              switch (arguments.length) {
                case 1:
                  return g = [], A(P = D, P, C, !0), g;
                case 2:
                  return typeof L == "function" ? A(D, D, L, !0) : function(I, M) {
                    return g = [], A(I, M, C, !1), g;
                  }(D, L);
                case 3:
                  return A(D, L, E, !1);
                default:
                  throw new Error("box-intersect: Invalid arguments");
              }
              var P;
            };
            var g, m = c(1888), x = c(855), w = c(7150);
            function k(D, L) {
              for (var E = 0; E < D; ++E) if (!(L[E] <= L[E + D])) return !0;
              return !1;
            }
            function S(D, L, E, P) {
              for (var I = 0, M = 0, O = 0, T = D.length; O < T; ++O) {
                var z = D[O];
                if (!k(L, z)) {
                  for (var F = 0; F < 2 * L; ++F) E[I++] = z[F];
                  P[M++] = O;
                }
              }
              return M;
            }
            function A(D, L, E, P) {
              var I = D.length, M = L.length;
              if (!(I <= 0 || M <= 0)) {
                var O = D[0].length >>> 1;
                if (!(O <= 0)) {
                  var T, z = m.mallocDouble(2 * O * I), F = m.mallocInt32(I);
                  if ((I = S(D, O, z, F)) > 0) {
                    if (O === 1 && P) x.init(I), T = x.sweepComplete(O, E, 0, I, z, F, 0, I, z, F);
                    else {
                      var U = m.mallocDouble(2 * O * M), V = m.mallocInt32(M);
                      (M = S(L, O, U, V)) > 0 && (x.init(I + M), T = O === 1 ? x.sweepBipartite(O, E, 0, I, z, F, 0, M, U, V) : w(O, E, P, I, z, F, M, U, V), m.free(U), m.free(V));
                    }
                    m.free(z), m.free(F);
                  }
                  return T;
                }
              }
            }
            function C(D, L) {
              g.push([D, L]);
            }
          }, 2455: function(d, f) {
            function c(g) {
              return g ? function(m, x, w, k, S, A, C, D, L, E, P) {
                return S - k > L - D ? function(I, M, O, T, z, F, U, V, $, q, K) {
                  for (var re = 2 * I, Y = T, te = re * T; Y < z; ++Y, te += re) {
                    var ee = F[M + te], X = F[M + te + I], Q = U[Y];
                    e: for (var ue = V, ce = re * V; ue < $; ++ue, ce += re) {
                      var he = q[M + ce], de = q[M + ce + I], ne = K[ue];
                      if (!(de < ee || X < he)) {
                        for (var ae = M + 1; ae < I; ++ae) {
                          var se = F[ae + te], me = F[ae + I + te], ye = q[ae + ce], pe = q[ae + I + ce];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = O(Q, ne);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, k, S, A, C, D, L, E, P) : function(I, M, O, T, z, F, U, V, $, q, K) {
                  for (var re = 2 * I, Y = V, te = re * V; Y < $; ++Y, te += re) {
                    var ee = q[M + te], X = q[M + te + I], Q = K[Y];
                    e: for (var ue = T, ce = re * T; ue < z; ++ue, ce += re) {
                      var he = F[M + ce], de = F[M + ce + I], ne = U[ue];
                      if (!(X < he || de < ee)) {
                        for (var ae = M + 1; ae < I; ++ae) {
                          var se = F[ae + ce], me = F[ae + I + ce], ye = q[ae + te], pe = q[ae + I + te];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = O(ne, Q);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, k, S, A, C, D, L, E, P);
              } : function(m, x, w, k, S, A, C, D, L, E, P, I) {
                return A - S > E - L ? k ? function(M, O, T, z, F, U, V, $, q, K, re) {
                  for (var Y = 2 * M, te = z, ee = Y * z; te < F; ++te, ee += Y) {
                    var X = U[O + ee], Q = U[O + ee + M], ue = V[te];
                    e: for (var ce = $, he = Y * $; ce < q; ++ce, he += Y) {
                      var de = K[O + he], ne = re[ce];
                      if (!(de <= X || Q < de)) {
                        for (var ae = O + 1; ae < M; ++ae) {
                          var se = U[ae + ee], me = U[ae + M + ee], ye = K[ae + he], pe = K[ae + M + he];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = T(ne, ue);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, S, A, C, D, L, E, P, I) : function(M, O, T, z, F, U, V, $, q, K, re) {
                  for (var Y = 2 * M, te = z, ee = Y * z; te < F; ++te, ee += Y) {
                    var X = U[O + ee], Q = U[O + ee + M], ue = V[te];
                    e: for (var ce = $, he = Y * $; ce < q; ++ce, he += Y) {
                      var de = K[O + he], ne = re[ce];
                      if (!(de < X || Q < de)) {
                        for (var ae = O + 1; ae < M; ++ae) {
                          var se = U[ae + ee], me = U[ae + M + ee], ye = K[ae + he], pe = K[ae + M + he];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = T(ue, ne);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, S, A, C, D, L, E, P, I) : k ? function(M, O, T, z, F, U, V, $, q, K, re) {
                  for (var Y = 2 * M, te = $, ee = Y * $; te < q; ++te, ee += Y) {
                    var X = K[O + ee], Q = re[te];
                    e: for (var ue = z, ce = Y * z; ue < F; ++ue, ce += Y) {
                      var he = U[O + ce], de = U[O + ce + M], ne = V[ue];
                      if (!(X <= he || de < X)) {
                        for (var ae = O + 1; ae < M; ++ae) {
                          var se = U[ae + ce], me = U[ae + M + ce], ye = K[ae + ee], pe = K[ae + M + ee];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = T(Q, ne);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, S, A, C, D, L, E, P, I) : function(M, O, T, z, F, U, V, $, q, K, re) {
                  for (var Y = 2 * M, te = $, ee = Y * $; te < q; ++te, ee += Y) {
                    var X = K[O + ee], Q = re[te];
                    e: for (var ue = z, ce = Y * z; ue < F; ++ue, ce += Y) {
                      var he = U[O + ce], de = U[O + ce + M], ne = V[ue];
                      if (!(X < he || de < X)) {
                        for (var ae = O + 1; ae < M; ++ae) {
                          var se = U[ae + ce], me = U[ae + M + ce], ye = K[ae + ee], pe = K[ae + M + ee];
                          if (me < ye || pe < se) continue e;
                        }
                        var be = T(ne, Q);
                        if (be !== void 0) return be;
                      }
                    }
                  }
                }(m, x, w, S, A, C, D, L, E, P, I);
              };
            }
            f.partial = c(!1), f.full = c(!0);
          }, 7150: function(d, f, c) {
            d.exports = function(Y, te, ee, X, Q, ue, ce, he, de) {
              (function(Ze, ct) {
                var ft = 8 * m.log2(ct + 1) * (Ze + 1) | 0, _t = m.nextPow2(F * ft);
                V.length < _t && (g.free(V), V = g.mallocInt32(_t));
                var Pt = m.nextPow2(U * ft);
                $.length < Pt && (g.free($), $ = g.mallocDouble(Pt));
              })(Y, X + ce);
              var ne, ae = 0, se = 2 * Y;
              for (q(ae++, 0, 0, X, 0, ce, ee ? 16 : 0, -1 / 0, 1 / 0), ee || q(ae++, 0, 0, ce, 0, X, 1, -1 / 0, 1 / 0); ae > 0; ) {
                var me = (ae -= 1) * F, ye = V[me], pe = V[me + 1], be = V[me + 2], Ae = V[me + 3], Se = V[me + 4], Me = V[me + 5], De = ae * U, Le = $[De], We = $[De + 1], Ee = 1 & Me, Ne = !!(16 & Me), Ie = Q, ge = ue, Ce = he, we = de;
                if (Ee && (Ie = he, ge = de, Ce = Q, we = ue), !(2 & Me && pe >= (be = M(Y, ye, pe, be, Ie, ge, We)) || 4 & Me && (pe = O(Y, ye, pe, be, Ie, ge, Le)) >= be)) {
                  var Ge = be - pe, Re = Se - Ae;
                  if (Ne) {
                    if (Y * Ge * (Ge + Re) < E) {
                      if ((ne = S.scanComplete(Y, ye, te, pe, be, Ie, ge, Ae, Se, Ce, we)) !== void 0) return ne;
                      continue;
                    }
                  } else {
                    if (Y * Math.min(Ge, Re) < D) {
                      if ((ne = w(Y, ye, te, Ee, pe, be, Ie, ge, Ae, Se, Ce, we)) !== void 0) return ne;
                      continue;
                    }
                    if (Y * Ge * Re < L) {
                      if ((ne = S.scanBipartite(Y, ye, te, Ee, pe, be, Ie, ge, Ae, Se, Ce, we)) !== void 0) return ne;
                      continue;
                    }
                  }
                  var je = P(Y, ye, pe, be, Ie, ge, Le, We);
                  if (pe < je) if (Y * (je - pe) < D) {
                    if ((ne = k(Y, ye + 1, te, pe, je, Ie, ge, Ae, Se, Ce, we)) !== void 0) return ne;
                  } else if (ye === Y - 2) {
                    if ((ne = Ee ? S.sweepBipartite(Y, te, Ae, Se, Ce, we, pe, je, Ie, ge) : S.sweepBipartite(Y, te, pe, je, Ie, ge, Ae, Se, Ce, we)) !== void 0) return ne;
                  } else q(ae++, ye + 1, pe, je, Ae, Se, Ee, -1 / 0, 1 / 0), q(ae++, ye + 1, Ae, Se, pe, je, 1 ^ Ee, -1 / 0, 1 / 0);
                  if (je < be) {
                    var Ke = A(Y, ye, Ae, Se, Ce, we), tt = Ce[se * Ke + ye], _e = I(Y, ye, Ke, Se, Ce, we, tt);
                    if (_e < Se && q(ae++, ye, je, be, _e, Se, (4 | Ee) + (Ne ? 16 : 0), tt, We), Ae < Ke && q(ae++, ye, je, be, Ae, Ke, (2 | Ee) + (Ne ? 16 : 0), Le, tt), Ke + 1 === _e) {
                      if ((ne = Ne ? re(Y, ye, te, je, be, Ie, ge, Ke, Ce, we[Ke]) : K(Y, ye, te, Ee, je, be, Ie, ge, Ke, Ce, we[Ke])) !== void 0) return ne;
                    } else if (Ke < _e) {
                      var Be;
                      if (Ne) {
                        if (je < (Be = T(Y, ye, je, be, Ie, ge, tt))) {
                          var $e = I(Y, ye, je, Be, Ie, ge, tt);
                          if (ye === Y - 2) {
                            if (je < $e && (ne = S.sweepComplete(Y, te, je, $e, Ie, ge, Ke, _e, Ce, we)) !== void 0 || $e < Be && (ne = S.sweepBipartite(Y, te, $e, Be, Ie, ge, Ke, _e, Ce, we)) !== void 0) return ne;
                          } else je < $e && q(ae++, ye + 1, je, $e, Ke, _e, 16, -1 / 0, 1 / 0), $e < Be && (q(ae++, ye + 1, $e, Be, Ke, _e, 0, -1 / 0, 1 / 0), q(ae++, ye + 1, Ke, _e, $e, Be, 1, -1 / 0, 1 / 0));
                        }
                      } else je < (Be = Ee ? z(Y, ye, je, be, Ie, ge, tt) : T(Y, ye, je, be, Ie, ge, tt)) && (ye === Y - 2 ? ne = Ee ? S.sweepBipartite(Y, te, Ke, _e, Ce, we, je, Be, Ie, ge) : S.sweepBipartite(Y, te, je, Be, Ie, ge, Ke, _e, Ce, we) : (q(ae++, ye + 1, je, Be, Ke, _e, Ee, -1 / 0, 1 / 0), q(ae++, ye + 1, Ke, _e, je, Be, 1 ^ Ee, -1 / 0, 1 / 0)));
                    }
                  }
                }
              }
            };
            var g = c(1888), m = c(8828), x = c(2455), w = x.partial, k = x.full, S = c(855), A = c(3545), C = c(8105), D = 128, L = 1 << 22, E = 1 << 22, P = C("!(lo>=p0)&&!(p1>=hi)"), I = C("lo===p0"), M = C("lo<p0"), O = C("hi<=p0"), T = C("lo<=p0&&p0<=hi"), z = C("lo<p0&&p0<=hi"), F = 6, U = 2, V = g.mallocInt32(1024), $ = g.mallocDouble(1024);
            function q(Y, te, ee, X, Q, ue, ce, he, de) {
              var ne = F * Y;
              V[ne] = te, V[ne + 1] = ee, V[ne + 2] = X, V[ne + 3] = Q, V[ne + 4] = ue, V[ne + 5] = ce;
              var ae = U * Y;
              $[ae] = he, $[ae + 1] = de;
            }
            function K(Y, te, ee, X, Q, ue, ce, he, de, ne, ae) {
              var se = 2 * Y, me = de * se, ye = ne[me + te];
              e: for (var pe = Q, be = Q * se; pe < ue; ++pe, be += se) {
                var Ae = ce[be + te], Se = ce[be + te + Y];
                if (!(ye < Ae || Se < ye || X && ye === Ae)) {
                  for (var Me, De = he[pe], Le = te + 1; Le < Y; ++Le) {
                    Ae = ce[be + Le], Se = ce[be + Le + Y];
                    var We = ne[me + Le], Ee = ne[me + Le + Y];
                    if (Se < We || Ee < Ae) continue e;
                  }
                  if ((Me = X ? ee(ae, De) : ee(De, ae)) !== void 0) return Me;
                }
              }
            }
            function re(Y, te, ee, X, Q, ue, ce, he, de, ne) {
              var ae = 2 * Y, se = he * ae, me = de[se + te];
              e: for (var ye = X, pe = X * ae; ye < Q; ++ye, pe += ae) {
                var be = ce[ye];
                if (be !== ne) {
                  var Ae = ue[pe + te], Se = ue[pe + te + Y];
                  if (!(me < Ae || Se < me)) {
                    for (var Me = te + 1; Me < Y; ++Me) {
                      Ae = ue[pe + Me], Se = ue[pe + Me + Y];
                      var De = de[se + Me], Le = de[se + Me + Y];
                      if (Se < De || Le < Ae) continue e;
                    }
                    var We = ee(be, ne);
                    if (We !== void 0) return We;
                  }
                }
              }
            }
          }, 3545: function(d, f, c) {
            d.exports = function(w, k, S, A, C, D) {
              if (A <= S + 1) return S;
              for (var L = S, E = A, P = A + S >>> 1, I = 2 * w, M = P, O = C[I * P + k]; L < E; ) {
                if (E - L < m) {
                  x(w, k, L, E, C, D), O = C[I * P + k];
                  break;
                }
                var T = E - L, z = Math.random() * T + L | 0, F = C[I * z + k], U = Math.random() * T + L | 0, V = C[I * U + k], $ = Math.random() * T + L | 0, q = C[I * $ + k];
                F <= V ? q >= V ? (M = U, O = V) : F >= q ? (M = z, O = F) : (M = $, O = q) : V >= q ? (M = U, O = V) : q >= F ? (M = z, O = F) : (M = $, O = q);
                for (var K = I * (E - 1), re = I * M, Y = 0; Y < I; ++Y, ++K, ++re) {
                  var te = C[K];
                  C[K] = C[re], C[re] = te;
                }
                var ee = D[E - 1];
                for (D[E - 1] = D[M], D[M] = ee, K = I * (E - 1), re = I * (M = g(w, k, L, E - 1, C, D, O)), Y = 0; Y < I; ++Y, ++K, ++re) te = C[K], C[K] = C[re], C[re] = te;
                if (ee = D[E - 1], D[E - 1] = D[M], D[M] = ee, P < M) {
                  for (E = M - 1; L < E && C[I * (E - 1) + k] === O; ) E -= 1;
                  E += 1;
                } else {
                  if (!(M < P)) break;
                  for (L = M + 1; L < E && C[I * L + k] === O; ) L += 1;
                }
              }
              return g(w, k, S, P, C, D, C[I * P + k]);
            };
            var g = c(8105)("lo<p0"), m = 8;
            function x(w, k, S, A, C, D) {
              for (var L = 2 * w, E = L * (S + 1) + k, P = S + 1; P < A; ++P, E += L) for (var I = C[E], M = P, O = L * (P - 1); M > S && C[O + k] > I; --M, O -= L) {
                for (var T = O, z = O + L, F = 0; F < L; ++F, ++T, ++z) {
                  var U = C[T];
                  C[T] = C[z], C[z] = U;
                }
                var V = D[M];
                D[M] = D[M - 1], D[M - 1] = V;
              }
            }
          }, 8105: function(d) {
            d.exports = function(c) {
              return f[c];
            };
            var f = { "lo===p0": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = g, P = m; x > P; ++P, C += A) if (w[C + E] === S) if (L === P) L += 1, D += A;
              else {
                for (var I = 0; A > I; ++I) {
                  var M = w[C + I];
                  w[C + I] = w[D], w[D++] = M;
                }
                var O = k[P];
                k[P] = k[L], k[L++] = O;
              }
              return L;
            }, "lo<p0": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = g, P = m; x > P; ++P, C += A) if (w[C + E] < S) if (L === P) L += 1, D += A;
              else {
                for (var I = 0; A > I; ++I) {
                  var M = w[C + I];
                  w[C + I] = w[D], w[D++] = M;
                }
                var O = k[P];
                k[P] = k[L], k[L++] = O;
              }
              return L;
            }, "lo<=p0": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = c + g, P = m; x > P; ++P, C += A) if (w[C + E] <= S) if (L === P) L += 1, D += A;
              else {
                for (var I = 0; A > I; ++I) {
                  var M = w[C + I];
                  w[C + I] = w[D], w[D++] = M;
                }
                var O = k[P];
                k[P] = k[L], k[L++] = O;
              }
              return L;
            }, "hi<=p0": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = c + g, P = m; x > P; ++P, C += A) if (w[C + E] <= S) if (L === P) L += 1, D += A;
              else {
                for (var I = 0; A > I; ++I) {
                  var M = w[C + I];
                  w[C + I] = w[D], w[D++] = M;
                }
                var O = k[P];
                k[P] = k[L], k[L++] = O;
              }
              return L;
            }, "lo<p0&&p0<=hi": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = g, P = c + g, I = m; x > I; ++I, C += A) {
                var M = w[C + E], O = w[C + P];
                if (M < S && S <= O) if (L === I) L += 1, D += A;
                else {
                  for (var T = 0; A > T; ++T) {
                    var z = w[C + T];
                    w[C + T] = w[D], w[D++] = z;
                  }
                  var F = k[I];
                  k[I] = k[L], k[L++] = F;
                }
              }
              return L;
            }, "lo<=p0&&p0<=hi": function(c, g, m, x, w, k, S) {
              for (var A = 2 * c, C = A * m, D = C, L = m, E = g, P = c + g, I = m; x > I; ++I, C += A) {
                var M = w[C + E], O = w[C + P];
                if (M <= S && S <= O) if (L === I) L += 1, D += A;
                else {
                  for (var T = 0; A > T; ++T) {
                    var z = w[C + T];
                    w[C + T] = w[D], w[D++] = z;
                  }
                  var F = k[I];
                  k[I] = k[L], k[L++] = F;
                }
              }
              return L;
            }, "!(lo>=p0)&&!(p1>=hi)": function(c, g, m, x, w, k, S, A) {
              for (var C = 2 * c, D = C * m, L = D, E = m, P = g, I = c + g, M = m; x > M; ++M, D += C) {
                var O = w[D + P], T = w[D + I];
                if (!(O >= S || A >= T)) if (E === M) E += 1, L += C;
                else {
                  for (var z = 0; C > z; ++z) {
                    var F = w[D + z];
                    w[D + z] = w[L], w[L++] = F;
                  }
                  var U = k[M];
                  k[M] = k[E], k[E++] = U;
                }
              }
              return E;
            } };
          }, 1811: function(d) {
            d.exports = function(C, D) {
              D <= 4 * f ? c(0, D - 1, C) : A(0, D - 1, C);
            };
            var f = 32;
            function c(C, D, L) {
              for (var E = 2 * (C + 1), P = C + 1; P <= D; ++P) {
                for (var I = L[E++], M = L[E++], O = P, T = E - 2; O-- > C; ) {
                  var z = L[T - 2], F = L[T - 1];
                  if (z < I || z === I && F < M) break;
                  L[T] = z, L[T + 1] = F, T -= 2;
                }
                L[T] = I, L[T + 1] = M;
              }
            }
            function g(C, D, L) {
              D *= 2;
              var E = L[C *= 2], P = L[C + 1];
              L[C] = L[D], L[C + 1] = L[D + 1], L[D] = E, L[D + 1] = P;
            }
            function m(C, D, L) {
              D *= 2, L[C *= 2] = L[D], L[C + 1] = L[D + 1];
            }
            function x(C, D, L, E) {
              D *= 2, L *= 2;
              var P = E[C *= 2], I = E[C + 1];
              E[C] = E[D], E[C + 1] = E[D + 1], E[D] = E[L], E[D + 1] = E[L + 1], E[L] = P, E[L + 1] = I;
            }
            function w(C, D, L, E, P) {
              D *= 2, P[C *= 2] = P[D], P[D] = L, P[C + 1] = P[D + 1], P[D + 1] = E;
            }
            function k(C, D, L) {
              D *= 2;
              var E = L[C *= 2], P = L[D];
              return !(E < P) && (E !== P || L[C + 1] > L[D + 1]);
            }
            function S(C, D, L, E) {
              var P = E[C *= 2];
              return P < D || P === D && E[C + 1] < L;
            }
            function A(C, D, L) {
              var E = (D - C + 1) / 6 | 0, P = C + E, I = D - E, M = C + D >> 1, O = M - E, T = M + E, z = P, F = O, U = M, V = T, $ = I, q = C + 1, K = D - 1, re = 0;
              k(z, F, L) && (re = z, z = F, F = re), k(V, $, L) && (re = V, V = $, $ = re), k(z, U, L) && (re = z, z = U, U = re), k(F, U, L) && (re = F, F = U, U = re), k(z, V, L) && (re = z, z = V, V = re), k(U, V, L) && (re = U, U = V, V = re), k(F, $, L) && (re = F, F = $, $ = re), k(F, U, L) && (re = F, F = U, U = re), k(V, $, L) && (re = V, V = $, $ = re);
              for (var Y = L[2 * F], te = L[2 * F + 1], ee = L[2 * V], X = L[2 * V + 1], Q = 2 * z, ue = 2 * U, ce = 2 * $, he = 2 * P, de = 2 * M, ne = 2 * I, ae = 0; ae < 2; ++ae) {
                var se = L[Q + ae], me = L[ue + ae], ye = L[ce + ae];
                L[he + ae] = se, L[de + ae] = me, L[ne + ae] = ye;
              }
              m(O, C, L), m(T, D, L);
              for (var pe = q; pe <= K; ++pe) if (S(pe, Y, te, L)) pe !== q && g(pe, q, L), ++q;
              else if (!S(pe, ee, X, L)) for (; ; ) {
                if (S(K, ee, X, L)) {
                  S(K, Y, te, L) ? (x(pe, q, K, L), ++q, --K) : (g(pe, K, L), --K);
                  break;
                }
                if (--K < pe) break;
              }
              w(C, q - 1, Y, te, L), w(D, K + 1, ee, X, L), q - 2 - C <= f ? c(C, q - 2, L) : A(C, q - 2, L), D - (K + 2) <= f ? c(K + 2, D, L) : A(K + 2, D, L), K - q <= f ? c(q, K, L) : A(q, K, L);
            }
          }, 855: function(d, f, c) {
            d.exports = { init: function(O) {
              var T = m.nextPow2(O);
              S.length < T && (g.free(S), S = g.mallocInt32(T)), A.length < T && (g.free(A), A = g.mallocInt32(T)), C.length < T && (g.free(C), C = g.mallocInt32(T)), D.length < T && (g.free(D), D = g.mallocInt32(T)), L.length < T && (g.free(L), L = g.mallocInt32(T)), E.length < T && (g.free(E), E = g.mallocInt32(T));
              var z = 8 * T;
              P.length < z && (g.free(P), P = g.mallocDouble(z));
            }, sweepBipartite: function(O, T, z, F, U, V, $, q, K, re) {
              for (var Y = 0, te = 2 * O, ee = O - 1, X = te - 1, Q = z; Q < F; ++Q) {
                var ue = V[Q], ce = te * Q;
                P[Y++] = U[ce + ee], P[Y++] = -(ue + 1), P[Y++] = U[ce + X], P[Y++] = ue;
              }
              for (Q = $; Q < q; ++Q) {
                ue = re[Q] + w;
                var he = te * Q;
                P[Y++] = K[he + ee], P[Y++] = -ue, P[Y++] = K[he + X], P[Y++] = ue;
              }
              var de = Y >>> 1;
              x(P, de);
              var ne = 0, ae = 0;
              for (Q = 0; Q < de; ++Q) {
                var se = 0 | P[2 * Q + 1];
                if (se >= w) I(C, D, ae--, se = se - w | 0);
                else if (se >= 0) I(S, A, ne--, se);
                else if (se <= -w) {
                  se = -se - w | 0;
                  for (var me = 0; me < ne; ++me) if ((ye = T(S[me], se)) !== void 0) return ye;
                  M(C, D, ae++, se);
                } else {
                  for (se = -se - 1 | 0, me = 0; me < ae; ++me) {
                    var ye;
                    if ((ye = T(se, C[me])) !== void 0) return ye;
                  }
                  M(S, A, ne++, se);
                }
              }
            }, sweepComplete: function(O, T, z, F, U, V, $, q, K, re) {
              for (var Y = 0, te = 2 * O, ee = O - 1, X = te - 1, Q = z; Q < F; ++Q) {
                var ue = V[Q] + 1 << 1, ce = te * Q;
                P[Y++] = U[ce + ee], P[Y++] = -ue, P[Y++] = U[ce + X], P[Y++] = ue;
              }
              for (Q = $; Q < q; ++Q) {
                ue = re[Q] + 1 << 1;
                var he = te * Q;
                P[Y++] = K[he + ee], P[Y++] = 1 | -ue, P[Y++] = K[he + X], P[Y++] = 1 | ue;
              }
              var de = Y >>> 1;
              x(P, de);
              var ne = 0, ae = 0, se = 0;
              for (Q = 0; Q < de; ++Q) {
                var me = 0 | P[2 * Q + 1], ye = 1 & me;
                if (Q < de - 1 && me >> 1 == P[2 * Q + 3] >> 1 && (ye = 2, Q += 1), me < 0) {
                  for (var pe = -(me >> 1) - 1, be = 0; be < se; ++be) if ((Ae = T(L[be], pe)) !== void 0) return Ae;
                  if (ye !== 0) {
                    for (be = 0; be < ne; ++be) if ((Ae = T(S[be], pe)) !== void 0) return Ae;
                  }
                  if (ye !== 1) for (be = 0; be < ae; ++be) {
                    var Ae;
                    if ((Ae = T(C[be], pe)) !== void 0) return Ae;
                  }
                  ye === 0 ? M(S, A, ne++, pe) : ye === 1 ? M(C, D, ae++, pe) : ye === 2 && M(L, E, se++, pe);
                } else pe = (me >> 1) - 1, ye === 0 ? I(S, A, ne--, pe) : ye === 1 ? I(C, D, ae--, pe) : ye === 2 && I(L, E, se--, pe);
              }
            }, scanBipartite: function(O, T, z, F, U, V, $, q, K, re, Y, te) {
              var ee = 0, X = 2 * O, Q = T, ue = T + O, ce = 1, he = 1;
              F ? he = w : ce = w;
              for (var de = U; de < V; ++de) {
                var ne = de + ce, ae = X * de;
                P[ee++] = $[ae + Q], P[ee++] = -ne, P[ee++] = $[ae + ue], P[ee++] = ne;
              }
              for (de = K; de < re; ++de) {
                ne = de + he;
                var se = X * de;
                P[ee++] = Y[se + Q], P[ee++] = -ne;
              }
              var me = ee >>> 1;
              x(P, me);
              var ye = 0;
              for (de = 0; de < me; ++de) {
                var pe = 0 | P[2 * de + 1];
                if (pe < 0) {
                  var be = !1;
                  if ((ne = -pe) >= w ? (be = !F, ne -= w) : (be = !!F, ne -= 1), be) M(S, A, ye++, ne);
                  else {
                    var Ae = te[ne], Se = X * ne, Me = Y[Se + T + 1], De = Y[Se + T + 1 + O];
                    e: for (var Le = 0; Le < ye; ++Le) {
                      var We = S[Le], Ee = X * We;
                      if (!(De < $[Ee + T + 1] || $[Ee + T + 1 + O] < Me)) {
                        for (var Ne = T + 2; Ne < O; ++Ne) if (Y[Se + Ne + O] < $[Ee + Ne] || $[Ee + Ne + O] < Y[Se + Ne]) continue e;
                        var Ie, ge = q[We];
                        if ((Ie = F ? z(Ae, ge) : z(ge, Ae)) !== void 0) return Ie;
                      }
                    }
                  }
                } else I(S, A, ye--, pe - ce);
              }
            }, scanComplete: function(O, T, z, F, U, V, $, q, K, re, Y) {
              for (var te = 0, ee = 2 * O, X = T, Q = T + O, ue = F; ue < U; ++ue) {
                var ce = ue + w, he = ee * ue;
                P[te++] = V[he + X], P[te++] = -ce, P[te++] = V[he + Q], P[te++] = ce;
              }
              for (ue = q; ue < K; ++ue) {
                ce = ue + 1;
                var de = ee * ue;
                P[te++] = re[de + X], P[te++] = -ce;
              }
              var ne = te >>> 1;
              x(P, ne);
              var ae = 0;
              for (ue = 0; ue < ne; ++ue) {
                var se = 0 | P[2 * ue + 1];
                if (se < 0) if ((ce = -se) >= w) S[ae++] = ce - w;
                else {
                  var me = Y[ce -= 1], ye = ee * ce, pe = re[ye + T + 1], be = re[ye + T + 1 + O];
                  e: for (var Ae = 0; Ae < ae; ++Ae) {
                    var Se = S[Ae], Me = $[Se];
                    if (Me === me) break;
                    var De = ee * Se;
                    if (!(be < V[De + T + 1] || V[De + T + 1 + O] < pe)) {
                      for (var Le = T + 2; Le < O; ++Le) if (re[ye + Le + O] < V[De + Le] || V[De + Le + O] < re[ye + Le]) continue e;
                      var We = z(Me, me);
                      if (We !== void 0) return We;
                    }
                  }
                }
                else {
                  for (ce = se - w, Ae = ae - 1; Ae >= 0; --Ae) if (S[Ae] === ce) {
                    for (Le = Ae + 1; Le < ae; ++Le) S[Le - 1] = S[Le];
                    break;
                  }
                  --ae;
                }
              }
            } };
            var g = c(1888), m = c(8828), x = c(1811), w = 1 << 28, k = 1024, S = g.mallocInt32(k), A = g.mallocInt32(k), C = g.mallocInt32(k), D = g.mallocInt32(k), L = g.mallocInt32(k), E = g.mallocInt32(k), P = g.mallocDouble(8192);
            function I(O, T, z, F) {
              var U = T[F], V = O[z - 1];
              O[U] = V, T[V] = U;
            }
            function M(O, T, z, F) {
              O[z] = F, T[F] = z;
            }
          }, 2538: function(d, f, c) {
            var g = c(8902), m = c(5542), x = c(2272), w = c(5023);
            function k(C) {
              return [Math.min(C[0], C[1]), Math.max(C[0], C[1])];
            }
            function S(C, D) {
              return C[0] - D[0] || C[1] - D[1];
            }
            function A(C, D, L) {
              return D in C ? C[D] : L;
            }
            d.exports = function(C, D, L) {
              Array.isArray(D) ? (L = L || {}, D = D || []) : (L = D || {}, D = []);
              var E = !!A(L, "delaunay", !0), P = !!A(L, "interior", !0), I = !!A(L, "exterior", !0), M = !!A(L, "infinity", !1);
              if (!P && !I || C.length === 0) return [];
              var O = g(C, D);
              if (E || P !== I || M) {
                for (var T = m(C.length, function(U) {
                  return U.map(k).sort(S);
                }(D)), z = 0; z < O.length; ++z) {
                  var F = O[z];
                  T.addTriangle(F[0], F[1], F[2]);
                }
                return E && x(C, T), I ? P ? M ? w(T, 0, M) : T.cells() : w(T, 1, M) : w(T, -1);
              }
              return O;
            };
          }, 2272: function(d, f, c) {
            var g = c(2646)[4];
            function m(x, w, k, S, A, C) {
              var D = w.opposite(S, A);
              if (!(D < 0)) {
                if (A < S) {
                  var L = S;
                  S = A, A = L, L = C, C = D, D = L;
                }
                w.isConstraint(S, A) || g(x[S], x[A], x[C], x[D]) < 0 && k.push(S, A);
              }
            }
            c(2478), d.exports = function(x, w) {
              for (var k = [], S = x.length, A = w.stars, C = 0; C < S; ++C) for (var D = A[C], L = 1; L < D.length; L += 2) if (!((M = D[L]) < C || w.isConstraint(C, M))) {
                for (var E = D[L - 1], P = -1, I = 1; I < D.length; I += 2) if (D[I - 1] === M) {
                  P = D[I];
                  break;
                }
                P < 0 || g(x[C], x[M], x[E], x[P]) < 0 && k.push(C, M);
              }
              for (; k.length > 0; ) {
                for (var M = k.pop(), O = (E = -1, P = -1, D = A[C = k.pop()], 1); O < D.length; O += 2) {
                  var T = D[O - 1], z = D[O];
                  T === M ? P = z : z === M && (E = T);
                }
                E < 0 || P < 0 || g(x[C], x[M], x[E], x[P]) >= 0 || (w.flip(C, M), m(x, w, k, E, C, P), m(x, w, k, C, P, E), m(x, w, k, P, M, E), m(x, w, k, M, E, P));
              }
            };
          }, 5023: function(d, f, c) {
            var g, m = c(2478);
            function x(k, S, A, C, D, L, E) {
              this.cells = k, this.neighbor = S, this.flags = C, this.constraint = A, this.active = D, this.next = L, this.boundary = E;
            }
            function w(k, S) {
              return k[0] - S[0] || k[1] - S[1] || k[2] - S[2];
            }
            d.exports = function(k, S, A) {
              var C = function($, q) {
                for (var K = $.cells(), re = K.length, Y = 0; Y < re; ++Y) {
                  var te = (se = K[Y])[0], ee = se[1], X = se[2];
                  ee < X ? ee < te && (se[0] = ee, se[1] = X, se[2] = te) : X < te && (se[0] = X, se[1] = te, se[2] = ee);
                }
                K.sort(w);
                var Q = new Array(re);
                for (Y = 0; Y < Q.length; ++Y) Q[Y] = 0;
                var ue = [], ce = [], he = new Array(3 * re), de = new Array(3 * re), ne = null;
                q && (ne = []);
                var ae = new x(K, he, de, Q, ue, ce, ne);
                for (Y = 0; Y < re; ++Y) for (var se = K[Y], me = 0; me < 3; ++me) {
                  te = se[me], ee = se[(me + 1) % 3];
                  var ye = he[3 * Y + me] = ae.locate(ee, te, $.opposite(ee, te)), pe = de[3 * Y + me] = $.isConstraint(te, ee);
                  ye < 0 && (pe ? ce.push(Y) : (ue.push(Y), Q[Y] = 1), q && ne.push([ee, te, -1]));
                }
                return ae;
              }(k, A);
              if (S === 0) return A ? C.cells.concat(C.boundary) : C.cells;
              for (var D = 1, L = C.active, E = C.next, P = C.flags, I = C.cells, M = C.constraint, O = C.neighbor; L.length > 0 || E.length > 0; ) {
                for (; L.length > 0; ) {
                  var T = L.pop();
                  if (P[T] !== -D) {
                    P[T] = D, I[T];
                    for (var z = 0; z < 3; ++z) {
                      var F = O[3 * T + z];
                      F >= 0 && P[F] === 0 && (M[3 * T + z] ? E.push(F) : (L.push(F), P[F] = D));
                    }
                  }
                }
                var U = E;
                E = L, L = U, E.length = 0, D = -D;
              }
              var V = function($, q, K) {
                for (var re = 0, Y = 0; Y < $.length; ++Y) q[Y] === K && ($[re++] = $[Y]);
                return $.length = re, $;
              }(I, P, S);
              return A ? V.concat(C.boundary) : V;
            }, x.prototype.locate = (g = [0, 0, 0], function(k, S, A) {
              var C = k, D = S, L = A;
              return S < A ? S < k && (C = S, D = A, L = k) : A < k && (C = A, D = k, L = S), C < 0 ? -1 : (g[0] = C, g[1] = D, g[2] = L, m.eq(this.cells, g, w));
            });
          }, 8902: function(d, f, c) {
            var g = c(2478), m = c(3250)[3];
            function x(E, P, I, M, O) {
              this.a = E, this.b = P, this.idx = I, this.lowerIds = M, this.upperIds = O;
            }
            function w(E, P, I, M) {
              this.a = E, this.b = P, this.type = I, this.idx = M;
            }
            function k(E, P) {
              var I = E.a[0] - P.a[0] || E.a[1] - P.a[1] || E.type - P.type;
              return I || (E.type !== 0 && (I = m(E.a, E.b, P.b)) ? I : E.idx - P.idx);
            }
            function S(E, P) {
              return m(E.a, E.b, P);
            }
            function A(E, P, I, M, O) {
              for (var T = g.lt(P, M, S), z = g.gt(P, M, S), F = T; F < z; ++F) {
                for (var U = P[F], V = U.lowerIds, $ = V.length; $ > 1 && m(I[V[$ - 2]], I[V[$ - 1]], M) > 0; ) E.push([V[$ - 1], V[$ - 2], O]), $ -= 1;
                V.length = $, V.push(O);
                var q = U.upperIds;
                for ($ = q.length; $ > 1 && m(I[q[$ - 2]], I[q[$ - 1]], M) < 0; ) E.push([q[$ - 2], q[$ - 1], O]), $ -= 1;
                q.length = $, q.push(O);
              }
            }
            function C(E, P) {
              var I;
              return (I = E.a[0] < P.a[0] ? m(E.a, E.b, P.a) : m(P.b, P.a, E.a)) ? I : (I = P.b[0] < E.b[0] ? m(E.a, E.b, P.b) : m(P.b, P.a, E.b)) || E.idx - P.idx;
            }
            function D(E, P, I) {
              var M = g.le(E, I, C), O = E[M], T = O.upperIds, z = T[T.length - 1];
              O.upperIds = [z], E.splice(M + 1, 0, new x(I.a, I.b, I.idx, [z], T));
            }
            function L(E, P, I) {
              var M = I.a;
              I.a = I.b, I.b = M;
              var O = g.eq(E, I, C), T = E[O];
              E[O - 1].upperIds = T.upperIds, E.splice(O, 1);
            }
            d.exports = function(E, P) {
              for (var I = E.length, M = P.length, O = [], T = 0; T < I; ++T) O.push(new w(E[T], null, 0, T));
              for (T = 0; T < M; ++T) {
                var z = P[T], F = E[z[0]], U = E[z[1]];
                F[0] < U[0] ? O.push(new w(F, U, 2, T), new w(U, F, 1, T)) : F[0] > U[0] && O.push(new w(U, F, 2, T), new w(F, U, 1, T));
              }
              O.sort(k);
              for (var V = O[0].a[0] - (1 + Math.abs(O[0].a[0])) * Math.pow(2, -52), $ = [new x([V, 1], [V, 0], -1, [], [])], q = [], K = (T = 0, O.length); T < K; ++T) {
                var re = O[T], Y = re.type;
                Y === 0 ? A(q, $, E, re.a, re.idx) : Y === 2 ? D($, 0, re) : L($, 0, re);
              }
              return q;
            };
          }, 5542: function(d, f, c) {
            var g = c(2478);
            function m(k, S) {
              this.stars = k, this.edges = S;
            }
            d.exports = function(k, S) {
              for (var A = new Array(k), C = 0; C < k; ++C) A[C] = [];
              return new m(A, S);
            };
            var x = m.prototype;
            function w(k, S, A) {
              for (var C = 1, D = k.length; C < D; C += 2) if (k[C - 1] === S && k[C] === A) return k[C - 1] = k[D - 2], k[C] = k[D - 1], void (k.length = D - 2);
            }
            x.isConstraint = /* @__PURE__ */ function() {
              var k = [0, 0];
              function S(A, C) {
                return A[0] - C[0] || A[1] - C[1];
              }
              return function(A, C) {
                return k[0] = Math.min(A, C), k[1] = Math.max(A, C), g.eq(this.edges, k, S) >= 0;
              };
            }(), x.removeTriangle = function(k, S, A) {
              var C = this.stars;
              w(C[k], S, A), w(C[S], A, k), w(C[A], k, S);
            }, x.addTriangle = function(k, S, A) {
              var C = this.stars;
              C[k].push(S, A), C[S].push(A, k), C[A].push(k, S);
            }, x.opposite = function(k, S) {
              for (var A = this.stars[S], C = 1, D = A.length; C < D; C += 2) if (A[C] === k) return A[C - 1];
              return -1;
            }, x.flip = function(k, S) {
              var A = this.opposite(k, S), C = this.opposite(S, k);
              this.removeTriangle(k, S, A), this.removeTriangle(S, k, C), this.addTriangle(k, C, A), this.addTriangle(S, A, C);
            }, x.edges = function() {
              for (var k = this.stars, S = [], A = 0, C = k.length; A < C; ++A) for (var D = k[A], L = 0, E = D.length; L < E; L += 2) S.push([D[L], D[L + 1]]);
              return S;
            }, x.cells = function() {
              for (var k = this.stars, S = [], A = 0, C = k.length; A < C; ++A) for (var D = k[A], L = 0, E = D.length; L < E; L += 2) {
                var P = D[L], I = D[L + 1];
                A < Math.min(P, I) && S.push([A, P, I]);
              }
              return S;
            };
          }, 2419: function(d) {
            d.exports = function(f) {
              for (var c = 1, g = 1; g < f.length; ++g) for (var m = 0; m < g; ++m) if (f[g] < f[m]) c = -c;
              else if (f[m] === f[g]) return 0;
              return c;
            };
          }, 3628: function(d, f, c) {
            var g = c(1338), m = c(727);
            function x(S, A) {
              for (var C = 0, D = S.length, L = 0; L < D; ++L) C += S[L] * A[L];
              return C;
            }
            function w(S) {
              var A = S.length;
              if (A === 0) return [];
              S[0].length;
              var C = g([S.length + 1, S.length + 1], 1), D = g([S.length + 1], 1);
              C[A][A] = 0;
              for (var L = 0; L < A; ++L) {
                for (var E = 0; E <= L; ++E) C[E][L] = C[L][E] = 2 * x(S[L], S[E]);
                D[L] = x(S[L], S[L]);
              }
              var P = m(C, D), I = 0, M = P[A + 1];
              for (L = 0; L < M.length; ++L) I += M[L];
              var O = new Array(A);
              for (L = 0; L < A; ++L) {
                M = P[L];
                var T = 0;
                for (E = 0; E < M.length; ++E) T += M[E];
                O[L] = T / I;
              }
              return O;
            }
            function k(S) {
              if (S.length === 0) return [];
              for (var A = S[0].length, C = g([A]), D = w(S), L = 0; L < S.length; ++L) for (var E = 0; E < A; ++E) C[E] += S[L][E] * D[L];
              return C;
            }
            k.barycenetric = w, d.exports = k;
          }, 6037: function(d, f, c) {
            d.exports = function(m) {
              for (var x = g(m), w = 0, k = 0; k < m.length; ++k) for (var S = m[k], A = 0; A < x.length; ++A) w += Math.pow(S[A] - x[A], 2);
              return Math.sqrt(w / m.length);
            };
            var g = c(3628);
          }, 332: function(d, f, c) {
            d.exports = function(z, F, U) {
              var V;
              if (U) {
                V = F;
                for (var $ = new Array(F.length), q = 0; q < F.length; ++q) {
                  var K = F[q];
                  $[q] = [K[0], K[1], U[q]];
                }
                F = $;
              }
              for (var re = function(Y, te, ee) {
                var X = P(Y, [], E(Y));
                return O(te, X, ee), !!X;
              }(z, F, !!U); T(z, F, !!U); ) re = !0;
              if (U && re) for (V.length = 0, U.length = 0, q = 0; q < F.length; ++q) K = F[q], V.push([K[0], K[1]]), U.push(K[2]);
              return re;
            };
            var g = c(1755), m = c(6867), x = c(1125), w = c(7842), k = c(1318), S = c(946), A = c(5838), C = c(1278), D = c(3637);
            function L(z) {
              var F = S(z);
              return [C(F, -1 / 0), C(F, 1 / 0)];
            }
            function E(z) {
              for (var F = new Array(z.length), U = 0; U < z.length; ++U) {
                var V = z[U];
                F[U] = [C(V[0], -1 / 0), C(V[1], -1 / 0), C(V[0], 1 / 0), C(V[1], 1 / 0)];
              }
              return F;
            }
            function P(z, F, U) {
              for (var V = F.length, $ = new g(V), q = [], K = 0; K < F.length; ++K) {
                var re = F[K], Y = L(re[0]), te = L(re[1]);
                q.push([C(Y[0], -1 / 0), C(te[0], -1 / 0), C(Y[1], 1 / 0), C(te[1], 1 / 0)]);
              }
              m(q, function(ce, he) {
                $.link(ce, he);
              });
              var ee = !0, X = new Array(V);
              for (K = 0; K < V; ++K) (ue = $.find(K)) !== K && (ee = !1, z[ue] = [Math.min(z[K][0], z[ue][0]), Math.min(z[K][1], z[ue][1])]);
              if (ee) return null;
              var Q = 0;
              for (K = 0; K < V; ++K) {
                var ue;
                (ue = $.find(K)) === K ? (X[K] = Q, z[Q++] = z[K]) : X[K] = -1;
              }
              for (z.length = Q, K = 0; K < V; ++K) X[K] < 0 && (X[K] = X[$.find(K)]);
              return X;
            }
            function I(z, F) {
              return z[0] - F[0] || z[1] - F[1];
            }
            function M(z, F) {
              return z[0] - F[0] || z[1] - F[1] || (z[2] < F[2] ? -1 : z[2] > F[2] ? 1 : 0);
            }
            function O(z, F, U) {
              if (z.length !== 0) {
                if (F) for (var V = 0; V < z.length; ++V) {
                  var $ = F[(K = z[V])[0]], q = F[K[1]];
                  K[0] = Math.min($, q), K[1] = Math.max($, q);
                }
                else for (V = 0; V < z.length; ++V) {
                  var K;
                  $ = (K = z[V])[0], q = K[1], K[0] = Math.min($, q), K[1] = Math.max($, q);
                }
                U ? z.sort(M) : z.sort(I);
                var re = 1;
                for (V = 1; V < z.length; ++V) {
                  var Y = z[V - 1], te = z[V];
                  (te[0] !== Y[0] || te[1] !== Y[1] || U && te[2] !== Y[2]) && (z[re++] = te);
                }
                z.length = re;
              }
            }
            function T(z, F, U) {
              var V = function(Y, te) {
                for (var ee = new Array(te.length), X = 0; X < te.length; ++X) {
                  var Q = te[X], ue = Y[Q[0]], ce = Y[Q[1]];
                  ee[X] = [C(Math.min(ue[0], ce[0]), -1 / 0), C(Math.min(ue[1], ce[1]), -1 / 0), C(Math.max(ue[0], ce[0]), 1 / 0), C(Math.max(ue[1], ce[1]), 1 / 0)];
                }
                return ee;
              }(z, F), $ = function(Y, te, ee) {
                var X = [];
                return m(ee, function(Q, ue) {
                  var ce = te[Q], he = te[ue];
                  if (ce[0] !== he[0] && ce[0] !== he[1] && ce[1] !== he[0] && ce[1] !== he[1]) {
                    var de = Y[ce[0]], ne = Y[ce[1]], ae = Y[he[0]], se = Y[he[1]];
                    x(de, ne, ae, se) && X.push([Q, ue]);
                  }
                }), X;
              }(z, F, V), q = function(Y, te, ee, X) {
                var Q = [];
                return m(ee, X, function(ue, ce) {
                  var he = te[ue];
                  if (he[0] !== ce && he[1] !== ce) {
                    var de = Y[ce], ne = Y[he[0]], ae = Y[he[1]];
                    x(ne, ae, de, de) && Q.push([ue, ce]);
                  }
                }), Q;
              }(z, F, V, E(z)), K = function(Y, te, ee, X, Q) {
                var ue, ce, he = Y.map(function(Ie) {
                  return [w(Ie[0]), w(Ie[1])];
                });
                for (ue = 0; ue < ee.length; ++ue) {
                  var de = ee[ue];
                  ce = de[0];
                  var ne = de[1], ae = te[ce], se = te[ne], me = D(A(Y[ae[0]]), A(Y[ae[1]]), A(Y[se[0]]), A(Y[se[1]]));
                  if (me) {
                    var ye = Y.length;
                    Y.push([S(me[0]), S(me[1])]), he.push(me), X.push([ce, ye], [ne, ye]);
                  }
                }
                for (X.sort(function(Ie, ge) {
                  if (Ie[0] !== ge[0]) return Ie[0] - ge[0];
                  var Ce = he[Ie[1]], we = he[ge[1]];
                  return k(Ce[0], we[0]) || k(Ce[1], we[1]);
                }), ue = X.length - 1; ue >= 0; --ue) {
                  var pe = te[ce = (Ee = X[ue])[0]], be = pe[0], Ae = pe[1], Se = Y[be], Me = Y[Ae];
                  if ((Se[0] - Me[0] || Se[1] - Me[1]) < 0) {
                    var De = be;
                    be = Ae, Ae = De;
                  }
                  pe[0] = be;
                  var Le, We = pe[1] = Ee[1];
                  for (Q && (Le = pe[2]); ue > 0 && X[ue - 1][0] === ce; ) {
                    var Ee, Ne = (Ee = X[--ue])[1];
                    Q ? te.push([We, Ne, Le]) : te.push([We, Ne]), We = Ne;
                  }
                  Q ? te.push([We, Ae, Le]) : te.push([We, Ae]);
                }
                return he;
              }(z, F, $, q, U), re = P(z, K);
              return O(F, re, U), !!re || $.length > 0 || q.length > 0;
            }
          }, 3637: function(d, f, c) {
            d.exports = function(D, L, E, P) {
              var I = k(L, D), M = k(P, E), O = C(I, M);
              if (w(O) === 0) return null;
              var T = C(M, k(D, E)), z = m(T, O), F = A(I, z);
              return S(D, F);
            };
            var g = c(6504), m = c(8697), x = c(5572), w = c(7721), k = c(544), S = c(2653), A = c(8987);
            function C(D, L) {
              return x(g(D[0], L[1]), g(D[1], L[0]));
            }
          }, 3642: function(d) {
            d.exports = { jet: [{ index: 0, rgb: [0, 0, 131] }, { index: 0.125, rgb: [0, 60, 170] }, { index: 0.375, rgb: [5, 255, 255] }, { index: 0.625, rgb: [255, 255, 0] }, { index: 0.875, rgb: [250, 0, 0] }, { index: 1, rgb: [128, 0, 0] }], hsv: [{ index: 0, rgb: [255, 0, 0] }, { index: 0.169, rgb: [253, 255, 2] }, { index: 0.173, rgb: [247, 255, 2] }, { index: 0.337, rgb: [0, 252, 4] }, { index: 0.341, rgb: [0, 252, 10] }, { index: 0.506, rgb: [1, 249, 255] }, { index: 0.671, rgb: [2, 0, 253] }, { index: 0.675, rgb: [8, 0, 253] }, { index: 0.839, rgb: [255, 0, 251] }, { index: 0.843, rgb: [255, 0, 245] }, { index: 1, rgb: [255, 0, 6] }], hot: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.3, rgb: [230, 0, 0] }, { index: 0.6, rgb: [255, 210, 0] }, { index: 1, rgb: [255, 255, 255] }], spring: [{ index: 0, rgb: [255, 0, 255] }, { index: 1, rgb: [255, 255, 0] }], summer: [{ index: 0, rgb: [0, 128, 102] }, { index: 1, rgb: [255, 255, 102] }], autumn: [{ index: 0, rgb: [255, 0, 0] }, { index: 1, rgb: [255, 255, 0] }], winter: [{ index: 0, rgb: [0, 0, 255] }, { index: 1, rgb: [0, 255, 128] }], bone: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.376, rgb: [84, 84, 116] }, { index: 0.753, rgb: [169, 200, 200] }, { index: 1, rgb: [255, 255, 255] }], copper: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.804, rgb: [255, 160, 102] }, { index: 1, rgb: [255, 199, 127] }], greys: [{ index: 0, rgb: [0, 0, 0] }, { index: 1, rgb: [255, 255, 255] }], yignbu: [{ index: 0, rgb: [8, 29, 88] }, { index: 0.125, rgb: [37, 52, 148] }, { index: 0.25, rgb: [34, 94, 168] }, { index: 0.375, rgb: [29, 145, 192] }, { index: 0.5, rgb: [65, 182, 196] }, { index: 0.625, rgb: [127, 205, 187] }, { index: 0.75, rgb: [199, 233, 180] }, { index: 0.875, rgb: [237, 248, 217] }, { index: 1, rgb: [255, 255, 217] }], greens: [{ index: 0, rgb: [0, 68, 27] }, { index: 0.125, rgb: [0, 109, 44] }, { index: 0.25, rgb: [35, 139, 69] }, { index: 0.375, rgb: [65, 171, 93] }, { index: 0.5, rgb: [116, 196, 118] }, { index: 0.625, rgb: [161, 217, 155] }, { index: 0.75, rgb: [199, 233, 192] }, { index: 0.875, rgb: [229, 245, 224] }, { index: 1, rgb: [247, 252, 245] }], yiorrd: [{ index: 0, rgb: [128, 0, 38] }, { index: 0.125, rgb: [189, 0, 38] }, { index: 0.25, rgb: [227, 26, 28] }, { index: 0.375, rgb: [252, 78, 42] }, { index: 0.5, rgb: [253, 141, 60] }, { index: 0.625, rgb: [254, 178, 76] }, { index: 0.75, rgb: [254, 217, 118] }, { index: 0.875, rgb: [255, 237, 160] }, { index: 1, rgb: [255, 255, 204] }], bluered: [{ index: 0, rgb: [0, 0, 255] }, { index: 1, rgb: [255, 0, 0] }], rdbu: [{ index: 0, rgb: [5, 10, 172] }, { index: 0.35, rgb: [106, 137, 247] }, { index: 0.5, rgb: [190, 190, 190] }, { index: 0.6, rgb: [220, 170, 132] }, { index: 0.7, rgb: [230, 145, 90] }, { index: 1, rgb: [178, 10, 28] }], picnic: [{ index: 0, rgb: [0, 0, 255] }, { index: 0.1, rgb: [51, 153, 255] }, { index: 0.2, rgb: [102, 204, 255] }, { index: 0.3, rgb: [153, 204, 255] }, { index: 0.4, rgb: [204, 204, 255] }, { index: 0.5, rgb: [255, 255, 255] }, { index: 0.6, rgb: [255, 204, 255] }, { index: 0.7, rgb: [255, 153, 255] }, { index: 0.8, rgb: [255, 102, 204] }, { index: 0.9, rgb: [255, 102, 102] }, { index: 1, rgb: [255, 0, 0] }], rainbow: [{ index: 0, rgb: [150, 0, 90] }, { index: 0.125, rgb: [0, 0, 200] }, { index: 0.25, rgb: [0, 25, 255] }, { index: 0.375, rgb: [0, 152, 255] }, { index: 0.5, rgb: [44, 255, 150] }, { index: 0.625, rgb: [151, 255, 0] }, { index: 0.75, rgb: [255, 234, 0] }, { index: 0.875, rgb: [255, 111, 0] }, { index: 1, rgb: [255, 0, 0] }], portland: [{ index: 0, rgb: [12, 51, 131] }, { index: 0.25, rgb: [10, 136, 186] }, { index: 0.5, rgb: [242, 211, 56] }, { index: 0.75, rgb: [242, 143, 56] }, { index: 1, rgb: [217, 30, 30] }], blackbody: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.2, rgb: [230, 0, 0] }, { index: 0.4, rgb: [230, 210, 0] }, { index: 0.7, rgb: [255, 255, 255] }, { index: 1, rgb: [160, 200, 255] }], earth: [{ index: 0, rgb: [0, 0, 130] }, { index: 0.1, rgb: [0, 180, 180] }, { index: 0.2, rgb: [40, 210, 40] }, { index: 0.4, rgb: [230, 230, 50] }, { index: 0.6, rgb: [120, 70, 20] }, { index: 1, rgb: [255, 255, 255] }], electric: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.15, rgb: [30, 0, 100] }, { index: 0.4, rgb: [120, 0, 100] }, { index: 0.6, rgb: [160, 90, 0] }, { index: 0.8, rgb: [230, 200, 0] }, { index: 1, rgb: [255, 250, 220] }], alpha: [{ index: 0, rgb: [255, 255, 255, 0] }, { index: 1, rgb: [255, 255, 255, 1] }], viridis: [{ index: 0, rgb: [68, 1, 84] }, { index: 0.13, rgb: [71, 44, 122] }, { index: 0.25, rgb: [59, 81, 139] }, { index: 0.38, rgb: [44, 113, 142] }, { index: 0.5, rgb: [33, 144, 141] }, { index: 0.63, rgb: [39, 173, 129] }, { index: 0.75, rgb: [92, 200, 99] }, { index: 0.88, rgb: [170, 220, 50] }, { index: 1, rgb: [253, 231, 37] }], inferno: [{ index: 0, rgb: [0, 0, 4] }, { index: 0.13, rgb: [31, 12, 72] }, { index: 0.25, rgb: [85, 15, 109] }, { index: 0.38, rgb: [136, 34, 106] }, { index: 0.5, rgb: [186, 54, 85] }, { index: 0.63, rgb: [227, 89, 51] }, { index: 0.75, rgb: [249, 140, 10] }, { index: 0.88, rgb: [249, 201, 50] }, { index: 1, rgb: [252, 255, 164] }], magma: [{ index: 0, rgb: [0, 0, 4] }, { index: 0.13, rgb: [28, 16, 68] }, { index: 0.25, rgb: [79, 18, 123] }, { index: 0.38, rgb: [129, 37, 129] }, { index: 0.5, rgb: [181, 54, 122] }, { index: 0.63, rgb: [229, 80, 100] }, { index: 0.75, rgb: [251, 135, 97] }, { index: 0.88, rgb: [254, 194, 135] }, { index: 1, rgb: [252, 253, 191] }], plasma: [{ index: 0, rgb: [13, 8, 135] }, { index: 0.13, rgb: [75, 3, 161] }, { index: 0.25, rgb: [125, 3, 168] }, { index: 0.38, rgb: [168, 34, 150] }, { index: 0.5, rgb: [203, 70, 121] }, { index: 0.63, rgb: [229, 107, 93] }, { index: 0.75, rgb: [248, 148, 65] }, { index: 0.88, rgb: [253, 195, 40] }, { index: 1, rgb: [240, 249, 33] }], warm: [{ index: 0, rgb: [125, 0, 179] }, { index: 0.13, rgb: [172, 0, 187] }, { index: 0.25, rgb: [219, 0, 170] }, { index: 0.38, rgb: [255, 0, 130] }, { index: 0.5, rgb: [255, 63, 74] }, { index: 0.63, rgb: [255, 123, 0] }, { index: 0.75, rgb: [234, 176, 0] }, { index: 0.88, rgb: [190, 228, 0] }, { index: 1, rgb: [147, 255, 0] }], cool: [{ index: 0, rgb: [125, 0, 179] }, { index: 0.13, rgb: [116, 0, 218] }, { index: 0.25, rgb: [98, 74, 237] }, { index: 0.38, rgb: [68, 146, 231] }, { index: 0.5, rgb: [0, 204, 197] }, { index: 0.63, rgb: [0, 247, 146] }, { index: 0.75, rgb: [0, 255, 88] }, { index: 0.88, rgb: [40, 255, 8] }, { index: 1, rgb: [147, 255, 0] }], "rainbow-soft": [{ index: 0, rgb: [125, 0, 179] }, { index: 0.1, rgb: [199, 0, 180] }, { index: 0.2, rgb: [255, 0, 121] }, { index: 0.3, rgb: [255, 108, 0] }, { index: 0.4, rgb: [222, 194, 0] }, { index: 0.5, rgb: [150, 255, 0] }, { index: 0.6, rgb: [0, 255, 55] }, { index: 0.7, rgb: [0, 246, 150] }, { index: 0.8, rgb: [50, 167, 222] }, { index: 0.9, rgb: [103, 51, 235] }, { index: 1, rgb: [124, 0, 186] }], bathymetry: [{ index: 0, rgb: [40, 26, 44] }, { index: 0.13, rgb: [59, 49, 90] }, { index: 0.25, rgb: [64, 76, 139] }, { index: 0.38, rgb: [63, 110, 151] }, { index: 0.5, rgb: [72, 142, 158] }, { index: 0.63, rgb: [85, 174, 163] }, { index: 0.75, rgb: [120, 206, 163] }, { index: 0.88, rgb: [187, 230, 172] }, { index: 1, rgb: [253, 254, 204] }], cdom: [{ index: 0, rgb: [47, 15, 62] }, { index: 0.13, rgb: [87, 23, 86] }, { index: 0.25, rgb: [130, 28, 99] }, { index: 0.38, rgb: [171, 41, 96] }, { index: 0.5, rgb: [206, 67, 86] }, { index: 0.63, rgb: [230, 106, 84] }, { index: 0.75, rgb: [242, 149, 103] }, { index: 0.88, rgb: [249, 193, 135] }, { index: 1, rgb: [254, 237, 176] }], chlorophyll: [{ index: 0, rgb: [18, 36, 20] }, { index: 0.13, rgb: [25, 63, 41] }, { index: 0.25, rgb: [24, 91, 59] }, { index: 0.38, rgb: [13, 119, 72] }, { index: 0.5, rgb: [18, 148, 80] }, { index: 0.63, rgb: [80, 173, 89] }, { index: 0.75, rgb: [132, 196, 122] }, { index: 0.88, rgb: [175, 221, 162] }, { index: 1, rgb: [215, 249, 208] }], density: [{ index: 0, rgb: [54, 14, 36] }, { index: 0.13, rgb: [89, 23, 80] }, { index: 0.25, rgb: [110, 45, 132] }, { index: 0.38, rgb: [120, 77, 178] }, { index: 0.5, rgb: [120, 113, 213] }, { index: 0.63, rgb: [115, 151, 228] }, { index: 0.75, rgb: [134, 185, 227] }, { index: 0.88, rgb: [177, 214, 227] }, { index: 1, rgb: [230, 241, 241] }], "freesurface-blue": [{ index: 0, rgb: [30, 4, 110] }, { index: 0.13, rgb: [47, 14, 176] }, { index: 0.25, rgb: [41, 45, 236] }, { index: 0.38, rgb: [25, 99, 212] }, { index: 0.5, rgb: [68, 131, 200] }, { index: 0.63, rgb: [114, 156, 197] }, { index: 0.75, rgb: [157, 181, 203] }, { index: 0.88, rgb: [200, 208, 216] }, { index: 1, rgb: [241, 237, 236] }], "freesurface-red": [{ index: 0, rgb: [60, 9, 18] }, { index: 0.13, rgb: [100, 17, 27] }, { index: 0.25, rgb: [142, 20, 29] }, { index: 0.38, rgb: [177, 43, 27] }, { index: 0.5, rgb: [192, 87, 63] }, { index: 0.63, rgb: [205, 125, 105] }, { index: 0.75, rgb: [216, 162, 148] }, { index: 0.88, rgb: [227, 199, 193] }, { index: 1, rgb: [241, 237, 236] }], oxygen: [{ index: 0, rgb: [64, 5, 5] }, { index: 0.13, rgb: [106, 6, 15] }, { index: 0.25, rgb: [144, 26, 7] }, { index: 0.38, rgb: [168, 64, 3] }, { index: 0.5, rgb: [188, 100, 4] }, { index: 0.63, rgb: [206, 136, 11] }, { index: 0.75, rgb: [220, 174, 25] }, { index: 0.88, rgb: [231, 215, 44] }, { index: 1, rgb: [248, 254, 105] }], par: [{ index: 0, rgb: [51, 20, 24] }, { index: 0.13, rgb: [90, 32, 35] }, { index: 0.25, rgb: [129, 44, 34] }, { index: 0.38, rgb: [159, 68, 25] }, { index: 0.5, rgb: [182, 99, 19] }, { index: 0.63, rgb: [199, 134, 22] }, { index: 0.75, rgb: [212, 171, 35] }, { index: 0.88, rgb: [221, 210, 54] }, { index: 1, rgb: [225, 253, 75] }], phase: [{ index: 0, rgb: [145, 105, 18] }, { index: 0.13, rgb: [184, 71, 38] }, { index: 0.25, rgb: [186, 58, 115] }, { index: 0.38, rgb: [160, 71, 185] }, { index: 0.5, rgb: [110, 97, 218] }, { index: 0.63, rgb: [50, 123, 164] }, { index: 0.75, rgb: [31, 131, 110] }, { index: 0.88, rgb: [77, 129, 34] }, { index: 1, rgb: [145, 105, 18] }], salinity: [{ index: 0, rgb: [42, 24, 108] }, { index: 0.13, rgb: [33, 50, 162] }, { index: 0.25, rgb: [15, 90, 145] }, { index: 0.38, rgb: [40, 118, 137] }, { index: 0.5, rgb: [59, 146, 135] }, { index: 0.63, rgb: [79, 175, 126] }, { index: 0.75, rgb: [120, 203, 104] }, { index: 0.88, rgb: [193, 221, 100] }, { index: 1, rgb: [253, 239, 154] }], temperature: [{ index: 0, rgb: [4, 35, 51] }, { index: 0.13, rgb: [23, 51, 122] }, { index: 0.25, rgb: [85, 59, 157] }, { index: 0.38, rgb: [129, 79, 143] }, { index: 0.5, rgb: [175, 95, 130] }, { index: 0.63, rgb: [222, 112, 101] }, { index: 0.75, rgb: [249, 146, 66] }, { index: 0.88, rgb: [249, 196, 65] }, { index: 1, rgb: [232, 250, 91] }], turbidity: [{ index: 0, rgb: [34, 31, 27] }, { index: 0.13, rgb: [65, 50, 41] }, { index: 0.25, rgb: [98, 69, 52] }, { index: 0.38, rgb: [131, 89, 57] }, { index: 0.5, rgb: [161, 112, 59] }, { index: 0.63, rgb: [185, 140, 66] }, { index: 0.75, rgb: [202, 174, 88] }, { index: 0.88, rgb: [216, 209, 126] }, { index: 1, rgb: [233, 246, 171] }], "velocity-blue": [{ index: 0, rgb: [17, 32, 64] }, { index: 0.13, rgb: [35, 52, 116] }, { index: 0.25, rgb: [29, 81, 156] }, { index: 0.38, rgb: [31, 113, 162] }, { index: 0.5, rgb: [50, 144, 169] }, { index: 0.63, rgb: [87, 173, 176] }, { index: 0.75, rgb: [149, 196, 189] }, { index: 0.88, rgb: [203, 221, 211] }, { index: 1, rgb: [254, 251, 230] }], "velocity-green": [{ index: 0, rgb: [23, 35, 19] }, { index: 0.13, rgb: [24, 64, 38] }, { index: 0.25, rgb: [11, 95, 45] }, { index: 0.38, rgb: [39, 123, 35] }, { index: 0.5, rgb: [95, 146, 12] }, { index: 0.63, rgb: [152, 165, 18] }, { index: 0.75, rgb: [201, 186, 69] }, { index: 0.88, rgb: [233, 216, 137] }, { index: 1, rgb: [255, 253, 205] }], cubehelix: [{ index: 0, rgb: [0, 0, 0] }, { index: 0.07, rgb: [22, 5, 59] }, { index: 0.13, rgb: [60, 4, 105] }, { index: 0.2, rgb: [109, 1, 135] }, { index: 0.27, rgb: [161, 0, 147] }, { index: 0.33, rgb: [210, 2, 142] }, { index: 0.4, rgb: [251, 11, 123] }, { index: 0.47, rgb: [255, 29, 97] }, { index: 0.53, rgb: [255, 54, 69] }, { index: 0.6, rgb: [255, 85, 46] }, { index: 0.67, rgb: [255, 120, 34] }, { index: 0.73, rgb: [255, 157, 37] }, { index: 0.8, rgb: [241, 191, 57] }, { index: 0.87, rgb: [224, 220, 93] }, { index: 0.93, rgb: [218, 241, 142] }, { index: 1, rgb: [227, 253, 198] }] };
          }, 6729: function(d, f, c) {
            var g = c(3642), m = c(395);
            function x(S) {
              return [S[0] / 255, S[1] / 255, S[2] / 255, S[3]];
            }
            function w(S) {
              for (var A, C = "#", D = 0; D < 3; ++D) C += ("00" + (A = (A = S[D]).toString(16))).substr(A.length);
              return C;
            }
            function k(S) {
              return "rgba(" + S.join(",") + ")";
            }
            d.exports = function(S) {
              var A, C, D, L, E, P, I, M, O, T;
              if (S || (S = {}), M = (S.nshades || 72) - 1, I = S.format || "hex", (P = S.colormap) || (P = "jet"), typeof P == "string") {
                if (P = P.toLowerCase(), !g[P]) throw Error(P + " not a supported colorscale");
                E = g[P];
              } else {
                if (!Array.isArray(P)) throw Error("unsupported colormap option", P);
                E = P.slice();
              }
              if (E.length > M + 1) throw new Error(P + " map requires nshades to be at least size " + E.length);
              O = Array.isArray(S.alpha) ? S.alpha.length !== 2 ? [1, 1] : S.alpha.slice() : typeof S.alpha == "number" ? [S.alpha, S.alpha] : [1, 1], A = E.map(function($) {
                return Math.round($.index * M);
              }), O[0] = Math.min(Math.max(O[0], 0), 1), O[1] = Math.min(Math.max(O[1], 0), 1);
              var z = E.map(function($, q) {
                var K = E[q].index, re = E[q].rgb.slice();
                return re.length === 4 && re[3] >= 0 && re[3] <= 1 || (re[3] = O[0] + (O[1] - O[0]) * K), re;
              }), F = [];
              for (T = 0; T < A.length - 1; ++T) {
                L = A[T + 1] - A[T], C = z[T], D = z[T + 1];
                for (var U = 0; U < L; U++) {
                  var V = U / L;
                  F.push([Math.round(m(C[0], D[0], V)), Math.round(m(C[1], D[1], V)), Math.round(m(C[2], D[2], V)), m(C[3], D[3], V)]);
                }
              }
              return F.push(E[E.length - 1].rgb.concat(O[1])), I === "hex" ? F = F.map(w) : I === "rgbaString" ? F = F.map(k) : I === "float" && (F = F.map(x)), F;
            };
          }, 3140: function(d, f, c) {
            d.exports = function(A, C, D, L) {
              var E = g(C, D, L);
              if (E === 0) {
                var P = m(g(A, C, D)), I = m(g(A, C, L));
                if (P === I) {
                  if (P === 0) {
                    var M = S(A, C, D);
                    return M === S(A, C, L) ? 0 : M ? 1 : -1;
                  }
                  return 0;
                }
                return I === 0 ? P > 0 || S(A, C, L) ? -1 : 1 : P === 0 ? I > 0 || S(A, C, D) ? 1 : -1 : m(I - P);
              }
              var O = g(A, C, D);
              return O > 0 ? E > 0 && g(A, C, L) > 0 ? 1 : -1 : O < 0 ? E > 0 || g(A, C, L) > 0 ? 1 : -1 : g(A, C, L) > 0 || S(A, C, D) ? 1 : -1;
            };
            var g = c(3250), m = c(8572), x = c(9362), w = c(5382), k = c(8210);
            function S(A, C, D) {
              var L = x(A[0], -C[0]), E = x(A[1], -C[1]), P = x(D[0], -C[0]), I = x(D[1], -C[1]), M = k(w(L, P), w(E, I));
              return M[M.length - 1] >= 0;
            }
          }, 8572: function(d) {
            d.exports = function(f) {
              return f < 0 ? -1 : f > 0 ? 1 : 0;
            };
          }, 8507: function(d) {
            d.exports = function(g, m) {
              var x = g.length, w = g.length - m.length;
              if (w) return w;
              switch (x) {
                case 0:
                  return 0;
                case 1:
                  return g[0] - m[0];
                case 2:
                  return g[0] + g[1] - m[0] - m[1] || f(g[0], g[1]) - f(m[0], m[1]);
                case 3:
                  var k = g[0] + g[1], S = m[0] + m[1];
                  if (w = k + g[2] - (S + m[2])) return w;
                  var A = f(g[0], g[1]), C = f(m[0], m[1]);
                  return f(A, g[2]) - f(C, m[2]) || f(A + g[2], k) - f(C + m[2], S);
                case 4:
                  var D = g[0], L = g[1], E = g[2], P = g[3], I = m[0], M = m[1], O = m[2], T = m[3];
                  return D + L + E + P - (I + M + O + T) || f(D, L, E, P) - f(I, M, O, T, I) || f(D + L, D + E, D + P, L + E, L + P, E + P) - f(I + M, I + O, I + T, M + O, M + T, O + T) || f(D + L + E, D + L + P, D + E + P, L + E + P) - f(I + M + O, I + M + T, I + O + T, M + O + T);
                default:
                  for (var z = g.slice().sort(c), F = m.slice().sort(c), U = 0; U < x; ++U) if (w = z[U] - F[U]) return w;
                  return 0;
              }
            };
            var f = Math.min;
            function c(g, m) {
              return g - m;
            }
          }, 3788: function(d, f, c) {
            var g = c(8507), m = c(2419);
            d.exports = function(x, w) {
              return g(x, w) || m(x) - m(w);
            };
          }, 7352: function(d, f, c) {
            var g = c(5721), m = c(4750), x = c(2690);
            d.exports = function(w) {
              var k = w.length;
              if (k === 0) return [];
              if (k === 1) return [[0]];
              var S = w[0].length;
              return S === 0 ? [] : S === 1 ? g(w) : S === 2 ? m(w) : x(w, S);
            };
          }, 5721: function(d) {
            d.exports = function(f) {
              for (var c = 0, g = 0, m = 1; m < f.length; ++m) f[m][0] < f[c][0] && (c = m), f[m][0] > f[g][0] && (g = m);
              return c < g ? [[c], [g]] : c > g ? [[g], [c]] : [[c]];
            };
          }, 4750: function(d, f, c) {
            d.exports = function(m) {
              var x = g(m), w = x.length;
              if (w <= 2) return [];
              for (var k = new Array(w), S = x[w - 1], A = 0; A < w; ++A) {
                var C = x[A];
                k[A] = [S, C], S = C;
              }
              return k;
            };
            var g = c(3090);
          }, 2690: function(d, f, c) {
            d.exports = function(x, w) {
              try {
                return g(x, !0);
              } catch {
                var k = m(x);
                if (k.length <= w) return [];
                var S = function(C, D) {
                  for (var L = C.length, E = new Array(L), P = 0; P < D.length; ++P) E[P] = C[D[P]];
                  var I = D.length;
                  for (P = 0; P < L; ++P) D.indexOf(P) < 0 && (E[I++] = C[P]);
                  return E;
                }(x, k);
                return function(C, D) {
                  for (var L = C.length, E = D.length, P = 0; P < L; ++P) for (var I = C[P], M = 0; M < I.length; ++M) {
                    var O = I[M];
                    if (O < E) I[M] = D[O];
                    else {
                      O -= E;
                      for (var T = 0; T < E; ++T) O >= D[T] && (O += 1);
                      I[M] = O;
                    }
                  }
                  return C;
                }(g(S, !0), k);
              }
            };
            var g = c(8954), m = c(3952);
          }, 4769: function(d) {
            d.exports = function(f, c, g, m, x, w) {
              var k = x - 1, S = x * x, A = k * k, C = (1 + 2 * x) * A, D = x * A, L = S * (3 - 2 * x), E = S * k;
              if (f.length) {
                w || (w = new Array(f.length));
                for (var P = f.length - 1; P >= 0; --P) w[P] = C * f[P] + D * c[P] + L * g[P] + E * m[P];
                return w;
              }
              return C * f + D * c + L * g + E * m;
            }, d.exports.derivative = function(f, c, g, m, x, w) {
              var k = 6 * x * x - 6 * x, S = 3 * x * x - 4 * x + 1, A = -6 * x * x + 6 * x, C = 3 * x * x - 2 * x;
              if (f.length) {
                w || (w = new Array(f.length));
                for (var D = f.length - 1; D >= 0; --D) w[D] = k * f[D] + S * c[D] + A * g[D] + C * m[D];
                return w;
              }
              return k * f + S * c + A * g[D] + C * m;
            };
          }, 7642: function(d, f, c) {
            var g = c(8954), m = c(1682);
            function x(k, S) {
              this.point = k, this.index = S;
            }
            function w(k, S) {
              for (var A = k.point, C = S.point, D = A.length, L = 0; L < D; ++L) {
                var E = C[L] - A[L];
                if (E) return E;
              }
              return 0;
            }
            d.exports = function(k, S) {
              var A = k.length;
              if (A === 0) return [];
              var C = k[0].length;
              if (C < 1) return [];
              if (C === 1) return function(K, re, Y) {
                if (K === 1) return Y ? [[-1, 0]] : [];
                var te = re.map(function(ce, he) {
                  return [ce[0], he];
                });
                te.sort(function(ce, he) {
                  return ce[0] - he[0];
                });
                for (var ee = new Array(K - 1), X = 1; X < K; ++X) {
                  var Q = te[X - 1], ue = te[X];
                  ee[X - 1] = [Q[1], ue[1]];
                }
                return Y && ee.push([-1, ee[0][1]], [ee[K - 1][1], -1]), ee;
              }(A, k, S);
              for (var D = new Array(A), L = 1, E = 0; E < A; ++E) {
                for (var P = k[E], I = new Array(C + 1), M = 0, O = 0; O < C; ++O) {
                  var T = P[O];
                  I[O] = T, M += T * T;
                }
                I[C] = M, D[E] = new x(I, E), L = Math.max(M, L);
              }
              m(D, w), A = D.length;
              var z = new Array(A + C + 1), F = new Array(A + C + 1), U = (C + 1) * (C + 1) * L, V = new Array(C + 1);
              for (E = 0; E <= C; ++E) V[E] = 0;
              for (V[C] = U, z[0] = V.slice(), F[0] = -1, E = 0; E <= C; ++E) (I = V.slice())[E] = 1, z[E + 1] = I, F[E + 1] = -1;
              for (E = 0; E < A; ++E) {
                var $ = D[E];
                z[E + C + 1] = $.point, F[E + C + 1] = $.index;
              }
              var q = g(z, !1);
              if (q = S ? q.filter(function(K) {
                for (var re = 0, Y = 0; Y <= C; ++Y) {
                  var te = F[K[Y]];
                  if (te < 0 && ++re >= 2) return !1;
                  K[Y] = te;
                }
                return !0;
              }) : q.filter(function(K) {
                for (var re = 0; re <= C; ++re) {
                  var Y = F[K[re]];
                  if (Y < 0) return !1;
                  K[re] = Y;
                }
                return !0;
              }), 1 & C) for (E = 0; E < q.length; ++E) I = ($ = q[E])[0], $[0] = $[1], $[1] = I;
              return q;
            };
          }, 2361: function(d) {
            var f = !1;
            if (typeof Float64Array < "u") {
              var c = new Float64Array(1), g = new Uint32Array(c.buffer);
              c[0] = 1, f = !0, g[1] === 1072693248 ? (d.exports = function(x) {
                return c[0] = x, [g[0], g[1]];
              }, d.exports.pack = function(x, w) {
                return g[0] = x, g[1] = w, c[0];
              }, d.exports.lo = function(x) {
                return c[0] = x, g[0];
              }, d.exports.hi = function(x) {
                return c[0] = x, g[1];
              }) : g[0] === 1072693248 ? (d.exports = function(x) {
                return c[0] = x, [g[1], g[0]];
              }, d.exports.pack = function(x, w) {
                return g[1] = x, g[0] = w, c[0];
              }, d.exports.lo = function(x) {
                return c[0] = x, g[1];
              }, d.exports.hi = function(x) {
                return c[0] = x, g[0];
              }) : f = !1;
            }
            if (!f) {
              var m = new l(8);
              d.exports = function(x) {
                return m.writeDoubleLE(x, 0, !0), [m.readUInt32LE(0, !0), m.readUInt32LE(4, !0)];
              }, d.exports.pack = function(x, w) {
                return m.writeUInt32LE(x, 0, !0), m.writeUInt32LE(w, 4, !0), m.readDoubleLE(0, !0);
              }, d.exports.lo = function(x) {
                return m.writeDoubleLE(x, 0, !0), m.readUInt32LE(0, !0);
              }, d.exports.hi = function(x) {
                return m.writeDoubleLE(x, 0, !0), m.readUInt32LE(4, !0);
              };
            }
            d.exports.sign = function(x) {
              return d.exports.hi(x) >>> 31;
            }, d.exports.exponent = function(x) {
              return (d.exports.hi(x) << 1 >>> 21) - 1023;
            }, d.exports.fraction = function(x) {
              var w = d.exports.lo(x), k = d.exports.hi(x), S = 1048575 & k;
              return 2146435072 & k && (S += 1048576), [w, S];
            }, d.exports.denormalized = function(x) {
              return !(2146435072 & d.exports.hi(x));
            };
          }, 1338: function(d) {
            function f(c, g, m) {
              var x = 0 | c[m];
              if (x <= 0) return [];
              var w, k = new Array(x);
              if (m === c.length - 1) for (w = 0; w < x; ++w) k[w] = g;
              else for (w = 0; w < x; ++w) k[w] = f(c, g, m + 1);
              return k;
            }
            d.exports = function(c, g) {
              switch (g === void 0 && (g = 0), typeof c) {
                case "number":
                  if (c > 0) return function(m, x) {
                    var w, k;
                    for (w = new Array(m), k = 0; k < m; ++k) w[k] = x;
                    return w;
                  }(0 | c, g);
                  break;
                case "object":
                  if (typeof c.length == "number") return f(c, g, 0);
              }
              return [];
            };
          }, 3134: function(d, f, c) {
            d.exports = function(m, x) {
              var w = m.length;
              if (typeof x != "number") {
                x = 0;
                for (var k = 0; k < w; ++k) {
                  var S = m[k];
                  x = Math.max(x, S[0], S[1]);
                }
                x = 1 + (0 | x);
              }
              x |= 0;
              var A = new Array(x);
              for (k = 0; k < x; ++k) A[k] = [];
              for (k = 0; k < w; ++k) A[(S = m[k])[0]].push(S[1]), A[S[1]].push(S[0]);
              for (var C = 0; C < x; ++C) g(A[C], function(D, L) {
                return D - L;
              });
              return A;
            };
            var g = c(1682);
          }, 5033: function(d) {
            d.exports = function(f, c, g) {
              var m = c || 0, x = g || 1;
              return [[f[12] + f[0], f[13] + f[1], f[14] + f[2], f[15] + f[3]], [f[12] - f[0], f[13] - f[1], f[14] - f[2], f[15] - f[3]], [f[12] + f[4], f[13] + f[5], f[14] + f[6], f[15] + f[7]], [f[12] - f[4], f[13] - f[5], f[14] - f[6], f[15] - f[7]], [m * f[12] + f[8], m * f[13] + f[9], m * f[14] + f[10], m * f[15] + f[11]], [x * f[12] - f[8], x * f[13] - f[9], x * f[14] - f[10], x * f[15] - f[11]]];
            };
          }, 9215: function(d, f, c) {
            d.exports = function(A, C, D) {
              switch (arguments.length) {
                case 0:
                  return new w([0], [0], 0);
                case 1:
                  return typeof A == "number" ? new w(L = S(A), L, 0) : new w(A, S(A.length), 0);
                case 2:
                  var L;
                  if (typeof C == "number") return new w(A, L = S(A.length), +C);
                  D = 0;
                case 3:
                  if (A.length !== C.length) throw new Error("state and velocity lengths must match");
                  return new w(A, C, D);
              }
            };
            var g = c(4769), m = c(2478);
            function x(A, C, D) {
              return Math.min(C, Math.max(A, D));
            }
            function w(A, C, D) {
              this.dimension = A.length, this.bounds = [new Array(this.dimension), new Array(this.dimension)];
              for (var L = 0; L < this.dimension; ++L) this.bounds[0][L] = -1 / 0, this.bounds[1][L] = 1 / 0;
              this._state = A.slice().reverse(), this._velocity = C.slice().reverse(), this._time = [D], this._scratch = [A.slice(), A.slice(), A.slice(), A.slice(), A.slice()];
            }
            var k = w.prototype;
            function S(A) {
              for (var C = new Array(A), D = 0; D < A; ++D) C[D] = 0;
              return C;
            }
            k.flush = function(A) {
              var C = m.gt(this._time, A) - 1;
              C <= 0 || (this._time.splice(0, C), this._state.splice(0, C * this.dimension), this._velocity.splice(0, C * this.dimension));
            }, k.curve = function(A) {
              var C = this._time, D = C.length, L = m.le(C, A), E = this._scratch[0], P = this._state, I = this._velocity, M = this.dimension, O = this.bounds;
              if (L < 0) for (var T = M - 1, z = 0; z < M; ++z, --T) E[z] = P[T];
              else if (L >= D - 1) {
                T = P.length - 1;
                var F = A - C[D - 1];
                for (z = 0; z < M; ++z, --T) E[z] = P[T] + F * I[T];
              } else {
                T = M * (L + 1) - 1;
                var U = C[L], V = C[L + 1] - U || 1, $ = this._scratch[1], q = this._scratch[2], K = this._scratch[3], re = this._scratch[4], Y = !0;
                for (z = 0; z < M; ++z, --T) $[z] = P[T], K[z] = I[T] * V, q[z] = P[T + M], re[z] = I[T + M] * V, Y = Y && $[z] === q[z] && K[z] === re[z] && K[z] === 0;
                if (Y) for (z = 0; z < M; ++z) E[z] = $[z];
                else g($, K, q, re, (A - U) / V, E);
              }
              var te = O[0], ee = O[1];
              for (z = 0; z < M; ++z) E[z] = x(te[z], ee[z], E[z]);
              return E;
            }, k.dcurve = function(A) {
              var C = this._time, D = C.length, L = m.le(C, A), E = this._scratch[0], P = this._state, I = this._velocity, M = this.dimension;
              if (L >= D - 1) for (var O = P.length - 1, T = (C[D - 1], 0); T < M; ++T, --O) E[T] = I[O];
              else {
                O = M * (L + 1) - 1;
                var z = C[L], F = C[L + 1] - z || 1, U = this._scratch[1], V = this._scratch[2], $ = this._scratch[3], q = this._scratch[4], K = !0;
                for (T = 0; T < M; ++T, --O) U[T] = P[O], $[T] = I[O] * F, V[T] = P[O + M], q[T] = I[O + M] * F, K = K && U[T] === V[T] && $[T] === q[T] && $[T] === 0;
                if (K) for (T = 0; T < M; ++T) E[T] = 0;
                else for (g.derivative(U, $, V, q, (A - z) / F, E), T = 0; T < M; ++T) E[T] /= F;
              }
              return E;
            }, k.lastT = function() {
              var A = this._time;
              return A[A.length - 1];
            }, k.stable = function() {
              for (var A = this._velocity, C = A.length, D = this.dimension - 1; D >= 0; --D) if (A[--C]) return !1;
              return !0;
            }, k.jump = function(A) {
              var C = this.lastT(), D = this.dimension;
              if (!(A < C || arguments.length !== D + 1)) {
                var L = this._state, E = this._velocity, P = L.length - this.dimension, I = this.bounds, M = I[0], O = I[1];
                this._time.push(C, A);
                for (var T = 0; T < 2; ++T) for (var z = 0; z < D; ++z) L.push(L[P++]), E.push(0);
                for (this._time.push(A), z = D; z > 0; --z) L.push(x(M[z - 1], O[z - 1], arguments[z])), E.push(0);
              }
            }, k.push = function(A) {
              var C = this.lastT(), D = this.dimension;
              if (!(A < C || arguments.length !== D + 1)) {
                var L = this._state, E = this._velocity, P = L.length - this.dimension, I = A - C, M = this.bounds, O = M[0], T = M[1], z = I > 1e-6 ? 1 / I : 0;
                this._time.push(A);
                for (var F = D; F > 0; --F) {
                  var U = x(O[F - 1], T[F - 1], arguments[F]);
                  L.push(U), E.push((U - L[P++]) * z);
                }
              }
            }, k.set = function(A) {
              var C = this.dimension;
              if (!(A < this.lastT() || arguments.length !== C + 1)) {
                var D = this._state, L = this._velocity, E = this.bounds, P = E[0], I = E[1];
                this._time.push(A);
                for (var M = C; M > 0; --M) D.push(x(P[M - 1], I[M - 1], arguments[M])), L.push(0);
              }
            }, k.move = function(A) {
              var C = this.lastT(), D = this.dimension;
              if (!(A <= C || arguments.length !== D + 1)) {
                var L = this._state, E = this._velocity, P = L.length - this.dimension, I = this.bounds, M = I[0], O = I[1], T = A - C, z = T > 1e-6 ? 1 / T : 0;
                this._time.push(A);
                for (var F = D; F > 0; --F) {
                  var U = arguments[F];
                  L.push(x(M[F - 1], O[F - 1], L[P++] + U)), E.push(U * z);
                }
              }
            }, k.idle = function(A) {
              var C = this.lastT();
              if (!(A < C)) {
                var D = this.dimension, L = this._state, E = this._velocity, P = L.length - D, I = this.bounds, M = I[0], O = I[1], T = A - C;
                this._time.push(A);
                for (var z = D - 1; z >= 0; --z) L.push(x(M[z], O[z], L[P] + T * E[P])), E.push(0), P += 1;
              }
            };
          }, 3840: function(d) {
            function f(P, I, M, O, T, z) {
              this._color = P, this.key = I, this.value = M, this.left = O, this.right = T, this._count = z;
            }
            function c(P) {
              return new f(P._color, P.key, P.value, P.left, P.right, P._count);
            }
            function g(P, I) {
              return new f(P, I.key, I.value, I.left, I.right, I._count);
            }
            function m(P) {
              P._count = 1 + (P.left ? P.left._count : 0) + (P.right ? P.right._count : 0);
            }
            function x(P, I) {
              this._compare = P, this.root = I;
            }
            d.exports = function(P) {
              return new x(P || E, null);
            };
            var w = x.prototype;
            function k(P, I) {
              var M;
              return I.left && (M = k(P, I.left)) ? M : (M = P(I.key, I.value)) || (I.right ? k(P, I.right) : void 0);
            }
            function S(P, I, M, O) {
              if (I(P, O.key) <= 0) {
                var T;
                if (O.left && (T = S(P, I, M, O.left)) || (T = M(O.key, O.value))) return T;
              }
              if (O.right) return S(P, I, M, O.right);
            }
            function A(P, I, M, O, T) {
              var z, F = M(P, T.key), U = M(I, T.key);
              if (F <= 0 && (T.left && (z = A(P, I, M, O, T.left)) || U > 0 && (z = O(T.key, T.value))))
                return z;
              if (U > 0 && T.right) return A(P, I, M, O, T.right);
            }
            function C(P, I) {
              this.tree = P, this._stack = I;
            }
            Object.defineProperty(w, "keys", { get: function() {
              var P = [];
              return this.forEach(function(I, M) {
                P.push(I);
              }), P;
            } }), Object.defineProperty(w, "values", { get: function() {
              var P = [];
              return this.forEach(function(I, M) {
                P.push(M);
              }), P;
            } }), Object.defineProperty(w, "length", { get: function() {
              return this.root ? this.root._count : 0;
            } }), w.insert = function(P, I) {
              for (var M = this._compare, O = this.root, T = [], z = []; O; ) {
                var F = M(P, O.key);
                T.push(O), z.push(F), O = F <= 0 ? O.left : O.right;
              }
              T.push(new f(0, P, I, null, null, 1));
              for (var U = T.length - 2; U >= 0; --U) O = T[U], z[U] <= 0 ? T[U] = new f(O._color, O.key, O.value, T[U + 1], O.right, O._count + 1) : T[U] = new f(O._color, O.key, O.value, O.left, T[U + 1], O._count + 1);
              for (U = T.length - 1; U > 1; --U) {
                var V = T[U - 1];
                if (O = T[U], V._color === 1 || O._color === 1) break;
                var $ = T[U - 2];
                if ($.left === V) if (V.left === O) {
                  if (!(q = $.right) || q._color !== 0) {
                    $._color = 0, $.left = V.right, V._color = 1, V.right = $, T[U - 2] = V, T[U - 1] = O, m($), m(V), U >= 3 && ((K = T[U - 3]).left === $ ? K.left = V : K.right = V);
                    break;
                  }
                  V._color = 1, $.right = g(1, q), $._color = 0, U -= 1;
                } else {
                  if (!(q = $.right) || q._color !== 0) {
                    V.right = O.left, $._color = 0, $.left = O.right, O._color = 1, O.left = V, O.right = $, T[U - 2] = O, T[U - 1] = V, m($), m(V), m(O), U >= 3 && ((K = T[U - 3]).left === $ ? K.left = O : K.right = O);
                    break;
                  }
                  V._color = 1, $.right = g(1, q), $._color = 0, U -= 1;
                }
                else if (V.right === O) {
                  if (!(q = $.left) || q._color !== 0) {
                    $._color = 0, $.right = V.left, V._color = 1, V.left = $, T[U - 2] = V, T[U - 1] = O, m($), m(V), U >= 3 && ((K = T[U - 3]).right === $ ? K.right = V : K.left = V);
                    break;
                  }
                  V._color = 1, $.left = g(1, q), $._color = 0, U -= 1;
                } else {
                  var q;
                  if (!(q = $.left) || q._color !== 0) {
                    var K;
                    V.left = O.right, $._color = 0, $.right = O.left, O._color = 1, O.right = V, O.left = $, T[U - 2] = O, T[U - 1] = V, m($), m(V), m(O), U >= 3 && ((K = T[U - 3]).right === $ ? K.right = O : K.left = O);
                    break;
                  }
                  V._color = 1, $.left = g(1, q), $._color = 0, U -= 1;
                }
              }
              return T[0]._color = 1, new x(M, T[0]);
            }, w.forEach = function(P, I, M) {
              if (this.root) switch (arguments.length) {
                case 1:
                  return k(P, this.root);
                case 2:
                  return S(I, this._compare, P, this.root);
                case 3:
                  return this._compare(I, M) >= 0 ? void 0 : A(I, M, this._compare, P, this.root);
              }
            }, Object.defineProperty(w, "begin", { get: function() {
              for (var P = [], I = this.root; I; ) P.push(I), I = I.left;
              return new C(this, P);
            } }), Object.defineProperty(w, "end", { get: function() {
              for (var P = [], I = this.root; I; ) P.push(I), I = I.right;
              return new C(this, P);
            } }), w.at = function(P) {
              if (P < 0) return new C(this, []);
              for (var I = this.root, M = []; ; ) {
                if (M.push(I), I.left) {
                  if (P < I.left._count) {
                    I = I.left;
                    continue;
                  }
                  P -= I.left._count;
                }
                if (!P) return new C(this, M);
                if (P -= 1, !I.right || P >= I.right._count) break;
                I = I.right;
              }
              return new C(this, []);
            }, w.ge = function(P) {
              for (var I = this._compare, M = this.root, O = [], T = 0; M; ) {
                var z = I(P, M.key);
                O.push(M), z <= 0 && (T = O.length), M = z <= 0 ? M.left : M.right;
              }
              return O.length = T, new C(this, O);
            }, w.gt = function(P) {
              for (var I = this._compare, M = this.root, O = [], T = 0; M; ) {
                var z = I(P, M.key);
                O.push(M), z < 0 && (T = O.length), M = z < 0 ? M.left : M.right;
              }
              return O.length = T, new C(this, O);
            }, w.lt = function(P) {
              for (var I = this._compare, M = this.root, O = [], T = 0; M; ) {
                var z = I(P, M.key);
                O.push(M), z > 0 && (T = O.length), M = z <= 0 ? M.left : M.right;
              }
              return O.length = T, new C(this, O);
            }, w.le = function(P) {
              for (var I = this._compare, M = this.root, O = [], T = 0; M; ) {
                var z = I(P, M.key);
                O.push(M), z >= 0 && (T = O.length), M = z < 0 ? M.left : M.right;
              }
              return O.length = T, new C(this, O);
            }, w.find = function(P) {
              for (var I = this._compare, M = this.root, O = []; M; ) {
                var T = I(P, M.key);
                if (O.push(M), T === 0) return new C(this, O);
                M = T <= 0 ? M.left : M.right;
              }
              return new C(this, []);
            }, w.remove = function(P) {
              var I = this.find(P);
              return I ? I.remove() : this;
            }, w.get = function(P) {
              for (var I = this._compare, M = this.root; M; ) {
                var O = I(P, M.key);
                if (O === 0) return M.value;
                M = O <= 0 ? M.left : M.right;
              }
            };
            var D = C.prototype;
            function L(P, I) {
              P.key = I.key, P.value = I.value, P.left = I.left, P.right = I.right, P._color = I._color, P._count = I._count;
            }
            function E(P, I) {
              return P < I ? -1 : P > I ? 1 : 0;
            }
            Object.defineProperty(D, "valid", { get: function() {
              return this._stack.length > 0;
            } }), Object.defineProperty(D, "node", { get: function() {
              return this._stack.length > 0 ? this._stack[this._stack.length - 1] : null;
            }, enumerable: !0 }), D.clone = function() {
              return new C(this.tree, this._stack.slice());
            }, D.remove = function() {
              var P = this._stack;
              if (P.length === 0) return this.tree;
              var I = new Array(P.length), M = P[P.length - 1];
              I[I.length - 1] = new f(M._color, M.key, M.value, M.left, M.right, M._count);
              for (var O = P.length - 2; O >= 0; --O) (M = P[O]).left === P[O + 1] ? I[O] = new f(M._color, M.key, M.value, I[O + 1], M.right, M._count) : I[O] = new f(M._color, M.key, M.value, M.left, I[O + 1], M._count);
              if ((M = I[I.length - 1]).left && M.right) {
                var T = I.length;
                for (M = M.left; M.right; ) I.push(M), M = M.right;
                var z = I[T - 1];
                for (I.push(new f(M._color, z.key, z.value, M.left, M.right, M._count)), I[T - 1].key = M.key, I[T - 1].value = M.value, O = I.length - 2; O >= T; --O) M = I[O], I[O] = new f(M._color, M.key, M.value, M.left, I[O + 1], M._count);
                I[T - 1].left = I[T];
              }
              if ((M = I[I.length - 1])._color === 0) {
                var F = I[I.length - 2];
                for (F.left === M ? F.left = null : F.right === M && (F.right = null), I.pop(), O = 0; O < I.length; ++O) I[O]._count--;
                return new x(this.tree._compare, I[0]);
              }
              if (M.left || M.right) {
                for (M.left ? L(M, M.left) : M.right && L(M, M.right), M._color = 1, O = 0; O < I.length - 1; ++O) I[O]._count--;
                return new x(this.tree._compare, I[0]);
              }
              if (I.length === 1) return new x(this.tree._compare, null);
              for (O = 0; O < I.length; ++O) I[O]._count--;
              var U = I[I.length - 2];
              return function(V) {
                for (var $, q, K, re, Y = V.length - 1; Y >= 0; --Y) {
                  if ($ = V[Y], Y === 0) return void ($._color = 1);
                  if ((q = V[Y - 1]).left === $) {
                    if ((K = q.right).right && K.right._color === 0) return re = (K = q.right = c(K)).right = c(K.right), q.right = K.left, K.left = q, K.right = re, K._color = q._color, $._color = 1, q._color = 1, re._color = 1, m(q), m(K), Y > 1 && ((te = V[Y - 2]).left === q ? te.left = K : te.right = K), void (V[Y - 1] = K);
                    if (K.left && K.left._color === 0) return re = (K = q.right = c(K)).left = c(K.left), q.right = re.left, K.left = re.right, re.left = q, re.right = K, re._color = q._color, q._color = 1, K._color = 1, $._color = 1, m(q), m(K), m(re), Y > 1 && ((te = V[Y - 2]).left === q ? te.left = re : te.right = re), void (V[Y - 1] = re);
                    if (K._color === 1) {
                      if (q._color === 0) return q._color = 1, void (q.right = g(0, K));
                      q.right = g(0, K);
                      continue;
                    }
                    K = c(K), q.right = K.left, K.left = q, K._color = q._color, q._color = 0, m(q), m(K), Y > 1 && ((te = V[Y - 2]).left === q ? te.left = K : te.right = K), V[Y - 1] = K, V[Y] = q, Y + 1 < V.length ? V[Y + 1] = $ : V.push($), Y += 2;
                  } else {
                    if ((K = q.left).left && K.left._color === 0) return re = (K = q.left = c(K)).left = c(K.left), q.left = K.right, K.right = q, K.left = re, K._color = q._color, $._color = 1, q._color = 1, re._color = 1, m(q), m(K), Y > 1 && ((te = V[Y - 2]).right === q ? te.right = K : te.left = K), void (V[Y - 1] = K);
                    if (K.right && K.right._color === 0) return re = (K = q.left = c(K)).right = c(K.right), q.left = re.right, K.right = re.left, re.right = q, re.left = K, re._color = q._color, q._color = 1, K._color = 1, $._color = 1, m(q), m(K), m(re), Y > 1 && ((te = V[Y - 2]).right === q ? te.right = re : te.left = re), void (V[Y - 1] = re);
                    if (K._color === 1) {
                      if (q._color === 0) return q._color = 1, void (q.left = g(0, K));
                      q.left = g(0, K);
                      continue;
                    }
                    var te;
                    K = c(K), q.left = K.right, K.right = q, K._color = q._color, q._color = 0, m(q), m(K), Y > 1 && ((te = V[Y - 2]).right === q ? te.right = K : te.left = K), V[Y - 1] = K, V[Y] = q, Y + 1 < V.length ? V[Y + 1] = $ : V.push($), Y += 2;
                  }
                }
              }(I), U.left === M ? U.left = null : U.right = null, new x(this.tree._compare, I[0]);
            }, Object.defineProperty(D, "key", { get: function() {
              if (this._stack.length > 0) return this._stack[this._stack.length - 1].key;
            }, enumerable: !0 }), Object.defineProperty(D, "value", { get: function() {
              if (this._stack.length > 0) return this._stack[this._stack.length - 1].value;
            }, enumerable: !0 }), Object.defineProperty(D, "index", { get: function() {
              var P = 0, I = this._stack;
              if (I.length === 0) {
                var M = this.tree.root;
                return M ? M._count : 0;
              }
              I[I.length - 1].left && (P = I[I.length - 1].left._count);
              for (var O = I.length - 2; O >= 0; --O) I[O + 1] === I[O].right && (++P, I[O].left && (P += I[O].left._count));
              return P;
            }, enumerable: !0 }), D.next = function() {
              var P = this._stack;
              if (P.length !== 0) {
                var I = P[P.length - 1];
                if (I.right) for (I = I.right; I; ) P.push(I), I = I.left;
                else for (P.pop(); P.length > 0 && P[P.length - 1].right === I; ) I = P[P.length - 1], P.pop();
              }
            }, Object.defineProperty(D, "hasNext", { get: function() {
              var P = this._stack;
              if (P.length === 0) return !1;
              if (P[P.length - 1].right) return !0;
              for (var I = P.length - 1; I > 0; --I) if (P[I - 1].left === P[I]) return !0;
              return !1;
            } }), D.update = function(P) {
              var I = this._stack;
              if (I.length === 0) throw new Error("Can't update empty node!");
              var M = new Array(I.length), O = I[I.length - 1];
              M[M.length - 1] = new f(O._color, O.key, P, O.left, O.right, O._count);
              for (var T = I.length - 2; T >= 0; --T) (O = I[T]).left === I[T + 1] ? M[T] = new f(O._color, O.key, O.value, M[T + 1], O.right, O._count) : M[T] = new f(O._color, O.key, O.value, O.left, M[T + 1], O._count);
              return new x(this.tree._compare, M[0]);
            }, D.prev = function() {
              var P = this._stack;
              if (P.length !== 0) {
                var I = P[P.length - 1];
                if (I.left) for (I = I.left; I; ) P.push(I), I = I.right;
                else for (P.pop(); P.length > 0 && P[P.length - 1].left === I; ) I = P[P.length - 1], P.pop();
              }
            }, Object.defineProperty(D, "hasPrev", { get: function() {
              var P = this._stack;
              if (P.length === 0) return !1;
              if (P[P.length - 1].left) return !0;
              for (var I = P.length - 1; I > 0; --I) if (P[I - 1].right === P[I]) return !0;
              return !1;
            } });
          }, 3837: function(d, f, c) {
            d.exports = function($, q) {
              var K = new E($);
              return K.update(q), K;
            };
            var g = c(4935), m = c(501), x = c(5304), w = c(6429), k = c(6444), S = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), A = ArrayBuffer, C = DataView;
            function D($) {
              return Array.isArray($) || function(q) {
                return A.isView(q) && !(q instanceof C);
              }($);
            }
            function L($, q) {
              return $[0] = q[0], $[1] = q[1], $[2] = q[2], $;
            }
            function E($) {
              this.gl = $, this.pixelRatio = 1, this.bounds = [[-10, -10, -10], [10, 10, 10]], this.ticks = [[], [], []], this.autoTicks = !0, this.tickSpacing = [1, 1, 1], this.tickEnable = [!0, !0, !0], this.tickFont = ["sans-serif", "sans-serif", "sans-serif"], this.tickFontStyle = ["normal", "normal", "normal"], this.tickFontWeight = ["normal", "normal", "normal"], this.tickFontVariant = ["normal", "normal", "normal"], this.tickSize = [12, 12, 12], this.tickAngle = [0, 0, 0], this.tickAlign = ["auto", "auto", "auto"], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [10, 10, 10], this.lastCubeProps = { cubeEdges: [0, 0, 0], axis: [0, 0, 0] }, this.labels = ["x", "y", "z"], this.labelEnable = [!0, !0, !0], this.labelFont = ["sans-serif", "sans-serif", "sans-serif"], this.labelFontStyle = ["normal", "normal", "normal"], this.labelFontWeight = ["normal", "normal", "normal"], this.labelFontVariant = ["normal", "normal", "normal"], this.labelSize = [20, 20, 20], this.labelAngle = [0, 0, 0], this.labelAlign = ["auto", "auto", "auto"], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [10, 10, 10], this.lineEnable = [!0, !0, !0], this.lineMirror = [!1, !1, !1], this.lineWidth = [1, 1, 1], this.lineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.lineTickEnable = [!0, !0, !0], this.lineTickMirror = [!1, !1, !1], this.lineTickLength = [0, 0, 0], this.lineTickWidth = [1, 1, 1], this.lineTickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.gridEnable = [!0, !0, !0], this.gridWidth = [1, 1, 1], this.gridColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroEnable = [!0, !0, !0], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.zeroLineWidth = [2, 2, 2], this.backgroundEnable = [!1, !1, !1], this.backgroundColor = [[0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5], [0.8, 0.8, 0.8, 0.5]], this._firstInit = !0, this._text = null, this._lines = null, this._background = x($);
            }
            var P = E.prototype;
            function I() {
              this.primalOffset = [0, 0, 0], this.primalMinor = [0, 0, 0], this.mirrorOffset = [0, 0, 0], this.mirrorMinor = [0, 0, 0];
            }
            P.update = function($) {
              function q(se, me, ye) {
                if (ye in $) {
                  var pe, be = $[ye], Ae = this[ye];
                  (se ? D(be) && D(be[0]) : D(be)) ? this[ye] = pe = [me(be[0]), me(be[1]), me(be[2])] : this[ye] = pe = [me(be), me(be), me(be)];
                  for (var Se = 0; Se < 3; ++Se) if (pe[Se] !== Ae[Se]) return !0;
                }
                return !1;
              }
              $ = $ || {};
              var K, re = q.bind(this, !1, Number), Y = q.bind(this, !1, Boolean), te = q.bind(this, !1, String), ee = q.bind(this, !0, function(se) {
                if (D(se)) {
                  if (se.length === 3) return [+se[0], +se[1], +se[2], 1];
                  if (se.length === 4) return [+se[0], +se[1], +se[2], +se[3]];
                }
                return [0, 0, 0, 1];
              }), X = !1, Q = !1;
              if ("bounds" in $) for (var ue = $.bounds, ce = 0; ce < 2; ++ce) for (var he = 0; he < 3; ++he) ue[ce][he] !== this.bounds[ce][he] && (Q = !0), this.bounds[ce][he] = ue[ce][he];
              if ("ticks" in $) for (K = $.ticks, X = !0, this.autoTicks = !1, ce = 0; ce < 3; ++ce) this.tickSpacing[ce] = 0;
              else re("tickSpacing") && (this.autoTicks = !0, Q = !0);
              if (this._firstInit && ("ticks" in $ || "tickSpacing" in $ || (this.autoTicks = !0), Q = !0, X = !0, this._firstInit = !1), Q && this.autoTicks && (K = k.create(this.bounds, this.tickSpacing), X = !0), X) {
                for (ce = 0; ce < 3; ++ce) K[ce].sort(function(se, me) {
                  return se.x - me.x;
                });
                k.equal(K, this.ticks) ? X = !1 : this.ticks = K;
              }
              Y("tickEnable"), te("tickFont") && (X = !0), te("tickFontStyle") && (X = !0), te("tickFontWeight") && (X = !0), te("tickFontVariant") && (X = !0), re("tickSize"), re("tickAngle"), re("tickPad"), ee("tickColor");
              var de = te("labels");
              te("labelFont") && (de = !0), te("labelFontStyle") && (de = !0), te("labelFontWeight") && (de = !0), te("labelFontVariant") && (de = !0), Y("labelEnable"), re("labelSize"), re("labelPad"), ee("labelColor"), Y("lineEnable"), Y("lineMirror"), re("lineWidth"), ee("lineColor"), Y("lineTickEnable"), Y("lineTickMirror"), re("lineTickLength"), re("lineTickWidth"), ee("lineTickColor"), Y("gridEnable"), re("gridWidth"), ee("gridColor"), Y("zeroEnable"), ee("zeroLineColor"), re("zeroLineWidth"), Y("backgroundEnable"), ee("backgroundColor");
              var ne = [{ family: this.labelFont[0], style: this.labelFontStyle[0], weight: this.labelFontWeight[0], variant: this.labelFontVariant[0] }, { family: this.labelFont[1], style: this.labelFontStyle[1], weight: this.labelFontWeight[1], variant: this.labelFontVariant[1] }, { family: this.labelFont[2], style: this.labelFontStyle[2], weight: this.labelFontWeight[2], variant: this.labelFontVariant[2] }], ae = [{ family: this.tickFont[0], style: this.tickFontStyle[0], weight: this.tickFontWeight[0], variant: this.tickFontVariant[0] }, { family: this.tickFont[1], style: this.tickFontStyle[1], weight: this.tickFontWeight[1], variant: this.tickFontVariant[1] }, { family: this.tickFont[2], style: this.tickFontStyle[2], weight: this.tickFontWeight[2], variant: this.tickFontVariant[2] }];
              this._text ? this._text && (de || X) && this._text.update(this.bounds, this.labels, ne, this.ticks, ae) : this._text = g(this.gl, this.bounds, this.labels, ne, this.ticks, ae), this._lines && X && (this._lines.dispose(), this._lines = null), this._lines || (this._lines = m(this.gl, this.bounds, this.ticks));
            };
            var M = [new I(), new I(), new I()];
            function O($, q, K, re, Y) {
              for (var te = $.primalOffset, ee = $.primalMinor, X = $.mirrorOffset, Q = $.mirrorMinor, ue = re[q], ce = 0; ce < 3; ++ce) if (q !== ce) {
                var he = te, de = X, ne = ee, ae = Q;
                ue & 1 << ce && (he = X, de = te, ne = Q, ae = ee), he[ce] = K[0][ce], de[ce] = K[1][ce], Y[ce] > 0 ? (ne[ce] = -1, ae[ce] = 0) : (ne[ce] = 0, ae[ce] = 1);
              }
            }
            var T = [0, 0, 0], z = { model: S, view: S, projection: S, _ortho: !1 };
            P.isOpaque = function() {
              return !0;
            }, P.isTransparent = function() {
              return !1;
            }, P.drawTransparent = function($) {
            };
            var F = [0, 0, 0], U = [0, 0, 0], V = [0, 0, 0];
            P.draw = function($) {
              $ = $ || z;
              for (var q = this.gl, K = $.model || S, re = $.view || S, Y = $.projection || S, te = this.bounds, ee = $._ortho || !1, X = w(K, re, Y, te, ee), Q = X.cubeEdges, ue = X.axis, ce = re[12], he = re[13], de = re[14], ne = re[15], ae = (ee ? 2 : 1) * this.pixelRatio * (Y[3] * ce + Y[7] * he + Y[11] * de + Y[15] * ne) / q.drawingBufferHeight, se = 0; se < 3; ++se) this.lastCubeProps.cubeEdges[se] = Q[se], this.lastCubeProps.axis[se] = ue[se];
              var me = M;
              for (se = 0; se < 3; ++se) O(M[se], se, this.bounds, Q, ue);
              q = this.gl;
              var ye, pe, be, Ae = T;
              for (se = 0; se < 3; ++se) this.backgroundEnable[se] ? Ae[se] = ue[se] : Ae[se] = 0;
              for (this._background.draw(K, re, Y, te, Ae, this.backgroundColor), this._lines.bind(K, re, Y, this), se = 0; se < 3; ++se) {
                var Se = [0, 0, 0];
                ue[se] > 0 ? Se[se] = te[1][se] : Se[se] = te[0][se];
                for (var Me = 0; Me < 2; ++Me) {
                  var De = (se + 1 + Me) % 3, Le = (se + 1 + (1 ^ Me)) % 3;
                  this.gridEnable[De] && this._lines.drawGrid(De, Le, this.bounds, Se, this.gridColor[De], this.gridWidth[De] * this.pixelRatio);
                }
                for (Me = 0; Me < 2; ++Me) De = (se + 1 + Me) % 3, Le = (se + 1 + (1 ^ Me)) % 3, this.zeroEnable[Le] && Math.min(te[0][Le], te[1][Le]) <= 0 && Math.max(te[0][Le], te[1][Le]) >= 0 && this._lines.drawZero(De, Le, this.bounds, Se, this.zeroLineColor[Le], this.zeroLineWidth[Le] * this.pixelRatio);
              }
              for (se = 0; se < 3; ++se) {
                this.lineEnable[se] && this._lines.drawAxisLine(se, this.bounds, me[se].primalOffset, this.lineColor[se], this.lineWidth[se] * this.pixelRatio), this.lineMirror[se] && this._lines.drawAxisLine(se, this.bounds, me[se].mirrorOffset, this.lineColor[se], this.lineWidth[se] * this.pixelRatio);
                var We = L(F, me[se].primalMinor), Ee = L(U, me[se].mirrorMinor), Ne = this.lineTickLength;
                for (Me = 0; Me < 3; ++Me) {
                  var Ie = ae / K[5 * Me];
                  We[Me] *= Ne[Me] * Ie, Ee[Me] *= Ne[Me] * Ie;
                }
                this.lineTickEnable[se] && this._lines.drawAxisTicks(se, me[se].primalOffset, We, this.lineTickColor[se], this.lineTickWidth[se] * this.pixelRatio), this.lineTickMirror[se] && this._lines.drawAxisTicks(se, me[se].mirrorOffset, Ee, this.lineTickColor[se], this.lineTickWidth[se] * this.pixelRatio);
              }
              function ge(Ke) {
                (be = [0, 0, 0])[Ke] = 1;
              }
              function Ce(Ke, tt, _e) {
                var Be = (Ke + 1) % 3, $e = (Ke + 2) % 3, Ze = tt[Be], ct = tt[$e], ft = _e[Be], _t = _e[$e];
                Ze > 0 && _t > 0 || Ze > 0 && _t < 0 || Ze < 0 && _t > 0 || Ze < 0 && _t < 0 ? ge(Be) : (ct > 0 && ft > 0 || ct > 0 && ft < 0 || ct < 0 && ft > 0 || ct < 0 && ft < 0) && ge($e);
              }
              for (this._lines.unbind(), this._text.bind(K, re, Y, this.pixelRatio), se = 0; se < 3; ++se) {
                var we = me[se].primalMinor, Ge = me[se].mirrorMinor, Re = L(V, me[se].primalOffset);
                for (Me = 0; Me < 3; ++Me) this.lineTickEnable[se] && (Re[Me] += ae * we[Me] * Math.max(this.lineTickLength[Me], 0) / K[5 * Me]);
                var je = [0, 0, 0];
                if (je[se] = 1, this.tickEnable[se]) {
                  for (this.tickAngle[se] === -3600 ? (this.tickAngle[se] = 0, this.tickAlign[se] = "auto") : this.tickAlign[se] = -1, pe = 1, (ye = [this.tickAlign[se], 0.5, pe])[0] === "auto" ? ye[0] = 0 : ye[0] = parseInt("" + ye[0]), be = [0, 0, 0], Ce(se, we, Ge), Me = 0; Me < 3; ++Me) Re[Me] += ae * we[Me] * this.tickPad[Me] / K[5 * Me];
                  this._text.drawTicks(se, this.tickSize[se], this.tickAngle[se], Re, this.tickColor[se], je, be, ye);
                }
                if (this.labelEnable[se]) {
                  for (pe = 0, be = [0, 0, 0], this.labels[se].length > 4 && (ge(se), pe = 1), (ye = [this.labelAlign[se], 0.5, pe])[0] === "auto" ? ye[0] = 0 : ye[0] = parseInt("" + ye[0]), Me = 0; Me < 3; ++Me) Re[Me] += ae * we[Me] * this.labelPad[Me] / K[5 * Me];
                  Re[se] += 0.5 * (te[0][se] + te[1][se]), this._text.drawLabel(se, this.labelSize[se], this.labelAngle[se], Re, this.labelColor[se], [0, 0, 0], be, ye);
                }
              }
              this._text.unbind();
            }, P.dispose = function() {
              this._text.dispose(), this._lines.dispose(), this._background.dispose(), this._lines = null, this._text = null, this._background = null, this.gl = null;
            };
          }, 5304: function(d, f, c) {
            d.exports = function(S) {
              for (var A = [], C = [], D = 0, L = 0; L < 3; ++L) for (var E = (L + 1) % 3, P = (L + 2) % 3, I = [0, 0, 0], M = [0, 0, 0], O = -1; O <= 1; O += 2) {
                C.push(D, D + 2, D + 1, D + 1, D + 2, D + 3), I[L] = O, M[L] = O;
                for (var T = -1; T <= 1; T += 2) {
                  I[E] = T;
                  for (var z = -1; z <= 1; z += 2) I[P] = z, A.push(I[0], I[1], I[2], M[0], M[1], M[2]), D += 1;
                }
                var F = E;
                E = P, P = F;
              }
              var U = g(S, new Float32Array(A)), V = g(S, new Uint16Array(C), S.ELEMENT_ARRAY_BUFFER), $ = m(S, [{ buffer: U, type: S.FLOAT, size: 3, offset: 0, stride: 24 }, { buffer: U, type: S.FLOAT, size: 3, offset: 12, stride: 24 }], V), q = x(S);
              return q.attributes.position.location = 0, q.attributes.normal.location = 1, new w(S, U, $, q);
            };
            var g = c(2762), m = c(8116), x = c(1879).bg;
            function w(S, A, C, D) {
              this.gl = S, this.buffer = A, this.vao = C, this.shader = D;
            }
            var k = w.prototype;
            k.draw = function(S, A, C, D, L, E) {
              for (var P = !1, I = 0; I < 3; ++I) P = P || L[I];
              if (P) {
                var M = this.gl;
                M.enable(M.POLYGON_OFFSET_FILL), M.polygonOffset(1, 2), this.shader.bind(), this.shader.uniforms = { model: S, view: A, projection: C, bounds: D, enable: L, colors: E }, this.vao.bind(), this.vao.draw(this.gl.TRIANGLES, 36), this.vao.unbind(), M.disable(M.POLYGON_OFFSET_FILL);
              }
            }, k.dispose = function() {
              this.vao.dispose(), this.buffer.dispose(), this.shader.dispose();
            };
          }, 6429: function(d, f, c) {
            d.exports = function(T, z, F, U, V) {
              m(k, z, T), m(k, F, k);
              for (var $ = 0, q = 0; q < 2; ++q) {
                C[2] = U[q][2];
                for (var K = 0; K < 2; ++K) {
                  C[1] = U[K][1];
                  for (var re = 0; re < 2; ++re) C[0] = U[re][0], L(S[$], C, k), $ += 1;
                }
              }
              var Y = -1;
              for (q = 0; q < 8; ++q) {
                for (var te = S[q][3], ee = 0; ee < 3; ++ee) A[q][ee] = S[q][ee] / te;
                V && (A[q][2] *= -1), te < 0 && (Y < 0 || A[q][2] < A[Y][2]) && (Y = q);
              }
              if (Y < 0) {
                Y = 0;
                for (var X = 0; X < 3; ++X) {
                  for (var Q = (X + 2) % 3, ue = (X + 1) % 3, ce = -1, he = -1, de = 0; de < 2; ++de) {
                    var ne = (se = de << X) + (de << Q) + (1 - de << ue), ae = se + (1 - de << Q) + (de << ue);
                    w(A[se], A[ne], A[ae], D) < 0 || (de ? ce = 1 : he = 1);
                  }
                  if (ce < 0 || he < 0) he > ce && (Y |= 1 << X);
                  else {
                    for (de = 0; de < 2; ++de) {
                      ne = (se = de << X) + (de << Q) + (1 - de << ue), ae = se + (1 - de << Q) + (de << ue);
                      var se, me = P([S[se], S[ne], S[ae], S[se + (1 << Q) + (1 << ue)]]);
                      de ? ce = me : he = me;
                    }
                    he > ce && (Y |= 1 << X);
                  }
                }
              }
              var ye = 7 ^ Y, pe = -1;
              for (q = 0; q < 8; ++q) q !== Y && q !== ye && (pe < 0 || A[pe][1] > A[q][1]) && (pe = q);
              var be = -1;
              for (q = 0; q < 3; ++q) (Se = pe ^ 1 << q) !== Y && Se !== ye && (be < 0 && (be = Se), (ue = A[Se])[0] < A[be][0] && (be = Se));
              var Ae = -1;
              for (q = 0; q < 3; ++q) {
                var Se;
                (Se = pe ^ 1 << q) !== Y && Se !== ye && Se !== be && (Ae < 0 && (Ae = Se), (ue = A[Se])[0] > A[Ae][0] && (Ae = Se));
              }
              var Me = I;
              Me[0] = Me[1] = Me[2] = 0, Me[g.log2(be ^ pe)] = pe & be, Me[g.log2(pe ^ Ae)] = pe & Ae;
              var De = 7 ^ Ae;
              De === Y || De === ye ? (De = 7 ^ be, Me[g.log2(Ae ^ De)] = De & Ae) : Me[g.log2(be ^ De)] = De & be;
              var Le = M, We = Y;
              for (X = 0; X < 3; ++X) Le[X] = We & 1 << X ? -1 : 1;
              return O;
            };
            var g = c(8828), m = c(6760), x = c(5202), w = c(3250), k = new Array(16), S = new Array(8), A = new Array(8), C = new Array(3), D = [0, 0, 0];
            function L(T, z, F) {
              for (var U = 0; U < 4; ++U) {
                T[U] = F[12 + U];
                for (var V = 0; V < 3; ++V) T[U] += z[V] * F[4 * V + U];
              }
            }
            (function() {
              for (var T = 0; T < 8; ++T) S[T] = [1, 1, 1, 1], A[T] = [1, 1, 1];
            })();
            var E = [[0, 0, 1, 0, 0], [0, 0, -1, 1, 0], [0, -1, 0, 1, 0], [0, 1, 0, 1, 0], [-1, 0, 0, 1, 0], [1, 0, 0, 1, 0]];
            function P(T) {
              for (var z = 0; z < E.length; ++z) if ((T = x.positive(T, E[z])).length < 3) return 0;
              var F = T[0], U = F[0] / F[3], V = F[1] / F[3], $ = 0;
              for (z = 1; z + 1 < T.length; ++z) {
                var q = T[z], K = T[z + 1], re = q[0] / q[3] - U, Y = q[1] / q[3] - V, te = K[0] / K[3] - U, ee = K[1] / K[3] - V;
                $ += Math.abs(re * ee - Y * te);
              }
              return $;
            }
            var I = [1, 1, 1], M = [0, 0, 0], O = { cubeEdges: I, axis: M };
          }, 501: function(d, f, c) {
            d.exports = function(I, M, O) {
              var T = [], z = [0, 0, 0], F = [0, 0, 0], U = [0, 0, 0], V = [0, 0, 0];
              T.push(0, 0, 1, 0, 1, 1, 0, 0, -1, 0, 0, -1, 0, 1, 1, 0, 1, -1);
              for (var $ = 0; $ < 3; ++$) {
                for (var q = T.length / 3 | 0, K = 0; K < O[$].length; ++K) {
                  var re = +O[$][K].x;
                  T.push(re, 0, 1, re, 1, 1, re, 0, -1, re, 0, -1, re, 1, 1, re, 1, -1);
                }
                var Y = T.length / 3 | 0;
                z[$] = q, F[$] = Y - q, q = T.length / 3 | 0;
                for (var te = 0; te < O[$].length; ++te) re = +O[$][te].x, T.push(re, 0, 1, re, 1, 1, re, 0, -1, re, 0, -1, re, 1, 1, re, 1, -1);
                Y = T.length / 3 | 0, U[$] = q, V[$] = Y - q;
              }
              var ee = g(I, new Float32Array(T)), X = m(I, [{ buffer: ee, type: I.FLOAT, size: 3, stride: 0, offset: 0 }]), Q = x(I);
              return Q.attributes.position.location = 0, new E(I, ee, X, Q, F, z, V, U);
            };
            var g = c(2762), m = c(8116), x = c(1879).n, w = [0, 0, 0], k = [0, 0, 0], S = [0, 0, 0], A = [0, 0, 0], C = [1, 1];
            function D(I) {
              return I[0] = I[1] = I[2] = 0, I;
            }
            function L(I, M) {
              return I[0] = M[0], I[1] = M[1], I[2] = M[2], I;
            }
            function E(I, M, O, T, z, F, U, V) {
              this.gl = I, this.vertBuffer = M, this.vao = O, this.shader = T, this.tickCount = z, this.tickOffset = F, this.gridCount = U, this.gridOffset = V;
            }
            var P = E.prototype;
            P.bind = function(I, M, O) {
              this.shader.bind(), this.shader.uniforms.model = I, this.shader.uniforms.view = M, this.shader.uniforms.projection = O, C[0] = this.gl.drawingBufferWidth, C[1] = this.gl.drawingBufferHeight, this.shader.uniforms.screenShape = C, this.vao.bind();
            }, P.unbind = function() {
              this.vao.unbind();
            }, P.drawAxisLine = function(I, M, O, T, z) {
              var F = D(k);
              this.shader.uniforms.majorAxis = k, F[I] = M[1][I] - M[0][I], this.shader.uniforms.minorAxis = F;
              var U, V = L(A, O);
              V[I] += M[0][I], this.shader.uniforms.offset = V, this.shader.uniforms.lineWidth = z, this.shader.uniforms.color = T, (U = D(S))[(I + 2) % 3] = 1, this.shader.uniforms.screenAxis = U, this.vao.draw(this.gl.TRIANGLES, 6), (U = D(S))[(I + 1) % 3] = 1, this.shader.uniforms.screenAxis = U, this.vao.draw(this.gl.TRIANGLES, 6);
            }, P.drawAxisTicks = function(I, M, O, T, z) {
              if (this.tickCount[I]) {
                var F = D(w);
                F[I] = 1, this.shader.uniforms.majorAxis = F, this.shader.uniforms.offset = M, this.shader.uniforms.minorAxis = O, this.shader.uniforms.color = T, this.shader.uniforms.lineWidth = z;
                var U = D(S);
                U[I] = 1, this.shader.uniforms.screenAxis = U, this.vao.draw(this.gl.TRIANGLES, this.tickCount[I], this.tickOffset[I]);
              }
            }, P.drawGrid = function(I, M, O, T, z, F) {
              if (this.gridCount[I]) {
                var U = D(k);
                U[M] = O[1][M] - O[0][M], this.shader.uniforms.minorAxis = U;
                var V = L(A, T);
                V[M] += O[0][M], this.shader.uniforms.offset = V;
                var $ = D(w);
                $[I] = 1, this.shader.uniforms.majorAxis = $;
                var q = D(S);
                q[I] = 1, this.shader.uniforms.screenAxis = q, this.shader.uniforms.lineWidth = F, this.shader.uniforms.color = z, this.vao.draw(this.gl.TRIANGLES, this.gridCount[I], this.gridOffset[I]);
              }
            }, P.drawZero = function(I, M, O, T, z, F) {
              var U = D(k);
              this.shader.uniforms.majorAxis = U, U[I] = O[1][I] - O[0][I], this.shader.uniforms.minorAxis = U;
              var V = L(A, T);
              V[I] += O[0][I], this.shader.uniforms.offset = V;
              var $ = D(S);
              $[M] = 1, this.shader.uniforms.screenAxis = $, this.shader.uniforms.lineWidth = F, this.shader.uniforms.color = z, this.vao.draw(this.gl.TRIANGLES, 6);
            }, P.dispose = function() {
              this.vao.dispose(), this.vertBuffer.dispose(), this.shader.dispose();
            };
          }, 1879: function(d, f, c) {
            var g = c(3236), m = c(9405), x = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

void main() {
  vec3 major = position.x * majorAxis;
  vec3 minor = position.y * minorAxis;

  vec3 vPosition = major + minor + offset;
  vec3 pPosition = project(vPosition);
  vec3 offset = project(vPosition + screenAxis * position.z);

  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;

  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]), w = g([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);
            f.n = function(D) {
              return m(D, x, w, null, [{ name: "position", type: "vec3" }]);
            };
            var k = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

float computeViewAngle(vec3 a, vec3 b) {
  vec3 A = project(a);
  vec3 B = project(b);

  return atan(
    (B.y - A.y) * resolution.y,
    (B.x - A.x) * resolution.x
  );
}

const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;

int option = int(floor(alignOpt.x + 0.001));
float hv_ratio =       alignOpt.y;
bool enableAlign =    (alignOpt.z != 0.0);

float mod_angle(float a) {
  return mod(a, PI);
}

float positive_angle(float a) {
  return mod_angle((a < 0.0) ?
    a + TWO_PI :
    a
  );
}

float look_upwards(float a) {
  float b = positive_angle(a);
  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?
    b - PI :
    b;
}

float look_horizontal_or_vertical(float a, float ratio) {
  // ratio controls the ratio between being horizontal to (vertical + horizontal)
  // if ratio is set to 0.5 then it is 50%, 50%.
  // when using a higher ratio e.g. 0.75 the result would
  // likely be more horizontal than vertical.

  float b = positive_angle(a);

  return
    (b < (      ratio) * HALF_PI) ? 0.0 :
    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :
    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :
    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :
                                    0.0;
}

float roundTo(float a, float b) {
  return float(b * floor((a + 0.5 * b) / b));
}

float look_round_n_directions(float a, int n) {
  float b = positive_angle(a);
  float div = TWO_PI / float(n);
  float c = roundTo(b, div);
  return look_upwards(c);
}

float applyAlignOption(float rawAngle, float delta) {
  return
    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions
    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical
    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis
    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards
    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal
                    rawAngle;                // otherwise return back raw input angle
}

bool isAxisTitle = (axis.x == 0.0) &&
                   (axis.y == 0.0) &&
                   (axis.z == 0.0);

void main() {
  //Compute world offset
  float axisDistance = position.z;
  vec3 dataPosition = axisDistance * axis + offset;

  float beta = angle; // i.e. user defined attributes for each tick

  float axisAngle;
  float clipAngle;
  float flip;

  if (enableAlign) {
    axisAngle = (isAxisTitle) ? HALF_PI :
                      computeViewAngle(dataPosition, dataPosition + axis);
    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);

    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;
    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;

    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),
                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;

    beta += applyAlignOption(clipAngle, flip * PI);
  }

  //Compute plane offset
  vec2 planeCoord = position.xy * pixelScale;

  mat2 planeXform = scale * mat2(
     cos(beta), sin(beta),
    -sin(beta), cos(beta)
  );

  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;

  //Compute clip position
  vec3 clipPosition = project(dataPosition);

  //Apply text offset in clip coordinates
  clipPosition += vec3(viewOffset, 0.0);

  //Done
  gl_Position = vec4(clipPosition, 1.0);
}
`]), S = g([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);
            f.Q = function(D) {
              return m(D, k, S, null, [{ name: "position", type: "vec3" }]);
            };
            var A = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec3 normal;

uniform mat4 model, view, projection;
uniform vec3 enable;
uniform vec3 bounds[2];

varying vec3 colorChannel;

void main() {

  vec3 signAxis = sign(bounds[1] - bounds[0]);

  vec3 realNormal = signAxis * normal;

  if(dot(realNormal, enable) > 0.0) {
    vec3 minRange = min(bounds[0], bounds[1]);
    vec3 maxRange = max(bounds[0], bounds[1]);
    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
    gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));
  } else {
    gl_Position = vec4(0,0,0,0);
  }

  colorChannel = abs(realNormal);
}
`]), C = g([`precision highp float;
#define GLSLIFY 1

uniform vec4 colors[3];

varying vec3 colorChannel;

void main() {
  gl_FragColor = colorChannel.x * colors[0] +
                 colorChannel.y * colors[1] +
                 colorChannel.z * colors[2];
}`]);
            f.bg = function(D) {
              return m(D, A, C, null, [{ name: "position", type: "vec3" }, { name: "normal", type: "vec3" }]);
            };
          }, 4935: function(d, f, c) {
            d.exports = function(L, E, P, I, M, O) {
              var T = g(L), z = m(L, [{ buffer: T, size: 3 }]), F = w(L);
              F.attributes.position.location = 0;
              var U = new A(L, F, T, z);
              return U.update(E, P, I, M, O), U;
            };
            var g = c(2762), m = c(8116), x = c(4359), w = c(1879).Q, k = window || u.global || {}, S = k.__TEXT_CACHE || {};
            function A(L, E, P, I) {
              this.gl = L, this.shader = E, this.buffer = P, this.vao = I, this.tickOffset = this.tickCount = this.labelOffset = this.labelCount = null;
            }
            k.__TEXT_CACHE = {};
            var C = A.prototype, D = [0, 0];
            C.bind = function(L, E, P, I) {
              this.vao.bind(), this.shader.bind();
              var M = this.shader.uniforms;
              M.model = L, M.view = E, M.projection = P, M.pixelScale = I, D[0] = this.gl.drawingBufferWidth, D[1] = this.gl.drawingBufferHeight, this.shader.uniforms.resolution = D;
            }, C.unbind = function() {
              this.vao.unbind();
            }, C.update = function(L, E, P, I, M) {
              var O = [];
              function T(Y, te, ee, X, Q, ue) {
                var ce = [ee.style, ee.weight, ee.variant, ee.family].join("_"), he = S[ce];
                he || (he = S[ce] = {});
                var de = he[te];
                de || (de = he[te] = function(Se, Me) {
                  try {
                    return x(Se, Me);
                  } catch (De) {
                    return console.warn('error vectorizing text:"' + Se + '" error:', De), { cells: [], positions: [] };
                  }
                }(te, { triangles: !0, font: ee.family, fontStyle: ee.style, fontWeight: ee.weight, fontVariant: ee.variant, textAlign: "center", textBaseline: "middle", lineSpacing: Q, styletags: ue }));
                for (var ne = (X || 12) / 12, ae = de.positions, se = de.cells, me = 0, ye = se.length; me < ye; ++me) for (var pe = se[me], be = 2; be >= 0; --be) {
                  var Ae = ae[pe[be]];
                  O.push(ne * Ae[0], -ne * Ae[1], Y);
                }
              }
              for (var z = [0, 0, 0], F = [0, 0, 0], U = [0, 0, 0], V = [0, 0, 0], $ = { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 }, q = 0; q < 3; ++q) {
                U[q] = O.length / 3 | 0, T(0.5 * (L[0][q] + L[1][q]), E[q], P[q], 12, 1.25, $), V[q] = (O.length / 3 | 0) - U[q], z[q] = O.length / 3 | 0;
                for (var K = 0; K < I[q].length; ++K) if (I[q][K].text) {
                  var re = { family: I[q][K].font || M[q].family, style: M[q].fontStyle || M[q].style, weight: M[q].fontWeight || M[q].weight, variant: M[q].fontVariant || M[q].variant };
                  T(I[q][K].x, I[q][K].text, re, I[q][K].fontSize || 12, 1.25, $);
                }
                F[q] = (O.length / 3 | 0) - z[q];
              }
              this.buffer.update(O), this.tickOffset = z, this.tickCount = F, this.labelOffset = U, this.labelCount = V;
            }, C.drawTicks = function(L, E, P, I, M, O, T, z) {
              this.tickCount[L] && (this.shader.uniforms.axis = O, this.shader.uniforms.color = M, this.shader.uniforms.angle = P, this.shader.uniforms.scale = E, this.shader.uniforms.offset = I, this.shader.uniforms.alignDir = T, this.shader.uniforms.alignOpt = z, this.vao.draw(this.gl.TRIANGLES, this.tickCount[L], this.tickOffset[L]));
            }, C.drawLabel = function(L, E, P, I, M, O, T, z) {
              this.labelCount[L] && (this.shader.uniforms.axis = O, this.shader.uniforms.color = M, this.shader.uniforms.angle = P, this.shader.uniforms.scale = E, this.shader.uniforms.offset = I, this.shader.uniforms.alignDir = T, this.shader.uniforms.alignOpt = z, this.vao.draw(this.gl.TRIANGLES, this.labelCount[L], this.labelOffset[L]));
            }, C.dispose = function() {
              this.shader.dispose(), this.vao.dispose(), this.buffer.dispose();
            };
          }, 6444: function(d, f) {
            function c(g, m) {
              var x = g + "", w = x.indexOf("."), k = 0;
              w >= 0 && (k = x.length - w - 1);
              var S = Math.pow(10, k), A = Math.round(g * m * S), C = A + "";
              if (C.indexOf("e") >= 0) return C;
              var D = A / S, L = A % S;
              A < 0 ? (D = 0 | -Math.ceil(D), L = 0 | -L) : (D = 0 | Math.floor(D), L |= 0);
              var E = "" + D;
              if (A < 0 && (E = "-" + E), k) {
                for (var P = "" + L; P.length < k; ) P = "0" + P;
                return E + "." + P;
              }
              return E;
            }
            f.create = function(g, m) {
              for (var x = [], w = 0; w < 3; ++w) {
                for (var k = [], S = (g[0][w], g[1][w], 0); S * m[w] <= g[1][w]; ++S) k.push({ x: S * m[w], text: c(m[w], S) });
                for (S = -1; S * m[w] >= g[0][w]; --S) k.push({ x: S * m[w], text: c(m[w], S) });
                x.push(k);
              }
              return x;
            }, f.equal = function(g, m) {
              for (var x = 0; x < 3; ++x) {
                if (g[x].length !== m[x].length) return !1;
                for (var w = 0; w < g[x].length; ++w) {
                  var k = g[x][w], S = m[x][w];
                  if (k.x !== S.x || k.text !== S.text || k.font !== S.font || k.fontColor !== S.fontColor || k.fontSize !== S.fontSize || k.dx !== S.dx || k.dy !== S.dy) return !1;
                }
              }
              return !0;
            };
          }, 5445: function(d, f, c) {
            d.exports = function(O, T, z, F, U) {
              var V = T.model || A, $ = T.view || A, q = T.projection || A, K = T._ortho || !1, re = O.bounds, Y = (U = U || x(V, $, q, re, K)).axis;
              w(C, $, V), w(C, q, C);
              for (var te = I, ee = 0; ee < 3; ++ee) te[ee].lo = 1 / 0, te[ee].hi = -1 / 0, te[ee].pixelsPerDataUnit = 1 / 0;
              var X = g(k(C, C));
              k(C, C);
              for (var Q = 0; Q < 3; ++Q) {
                var ue = (Q + 1) % 3, ce = (Q + 2) % 3, he = M;
                e: for (ee = 0; ee < 2; ++ee) {
                  var de = [];
                  if (Y[Q] < 0 != !!ee) {
                    he[Q] = re[ee][Q];
                    for (var ne = 0; ne < 2; ++ne) {
                      he[ue] = re[ne ^ ee][ue];
                      for (var ae = 0; ae < 2; ++ae) he[ce] = re[ae ^ ne ^ ee][ce], de.push(he.slice());
                    }
                    var se = K ? 5 : 4;
                    for (ne = se; ne === se; ++ne) {
                      if (de.length === 0) continue e;
                      de = m.positive(de, X[ne]);
                    }
                    for (ne = 0; ne < de.length; ++ne) {
                      ce = de[ne];
                      var me = P(M, C, ce, z, F);
                      for (ae = 0; ae < 3; ++ae) te[ae].lo = Math.min(te[ae].lo, ce[ae]), te[ae].hi = Math.max(te[ae].hi, ce[ae]), ae !== Q && (te[ae].pixelsPerDataUnit = Math.min(te[ae].pixelsPerDataUnit, Math.abs(me[ae])));
                    }
                  }
                }
              }
              return te;
            };
            var g = c(5033), m = c(5202), x = c(6429), w = c(6760), k = c(5665), S = c(5352), A = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), C = new Float32Array(16);
            function D(O, T, z) {
              this.lo = O, this.hi = T, this.pixelsPerDataUnit = z;
            }
            var L = [0, 0, 0, 1], E = [0, 0, 0, 1];
            function P(O, T, z, F, U) {
              for (var V = 0; V < 3; ++V) {
                for (var $ = L, q = E, K = 0; K < 3; ++K) q[K] = $[K] = z[K];
                q[3] = $[3] = 1, q[V] += 1, S(q, q, T), q[3] < 0 && (O[V] = 1 / 0), $[V] -= 1, S($, $, T), $[3] < 0 && (O[V] = 1 / 0);
                var re = ($[0] / $[3] - q[0] / q[3]) * F, Y = ($[1] / $[3] - q[1] / q[3]) * U;
                O[V] = 0.25 * Math.sqrt(re * re + Y * Y);
              }
              return O;
            }
            var I = [new D(1 / 0, -1 / 0, 1 / 0), new D(1 / 0, -1 / 0, 1 / 0), new D(1 / 0, -1 / 0, 1 / 0)], M = [0, 0, 0];
          }, 2762: function(d, f, c) {
            var g = c(1888), m = c(5298), x = c(9618), w = ["uint8", "uint8_clamped", "uint16", "uint32", "int8", "int16", "int32", "float32"];
            function k(D, L, E, P, I) {
              this.gl = D, this.type = L, this.handle = E, this.length = P, this.usage = I;
            }
            var S = k.prototype;
            function A(D, L, E, P, I, M) {
              var O = I.length * I.BYTES_PER_ELEMENT;
              if (M < 0) return D.bufferData(L, I, P), O;
              if (O + M > E) throw new Error("gl-buffer: If resizing buffer, must not specify offset");
              return D.bufferSubData(L, M, I), E;
            }
            function C(D, L) {
              for (var E = g.malloc(D.length, L), P = D.length, I = 0; I < P; ++I) E[I] = D[I];
              return E;
            }
            S.bind = function() {
              this.gl.bindBuffer(this.type, this.handle);
            }, S.unbind = function() {
              this.gl.bindBuffer(this.type, null);
            }, S.dispose = function() {
              this.gl.deleteBuffer(this.handle);
            }, S.update = function(D, L) {
              if (typeof L != "number" && (L = -1), this.bind(), typeof D == "object" && D.shape !== void 0) {
                var E = D.dtype;
                if (w.indexOf(E) < 0 && (E = "float32"), this.type === this.gl.ELEMENT_ARRAY_BUFFER && (E = gl.getExtension("OES_element_index_uint") && E !== "uint16" ? "uint32" : "uint16"), E === D.dtype && function(O, T) {
                  for (var z = 1, F = T.length - 1; F >= 0; --F) {
                    if (T[F] !== z) return !1;
                    z *= O[F];
                  }
                  return !0;
                }(D.shape, D.stride)) D.offset === 0 && D.data.length === D.shape[0] ? this.length = A(this.gl, this.type, this.length, this.usage, D.data, L) : this.length = A(this.gl, this.type, this.length, this.usage, D.data.subarray(D.offset, D.shape[0]), L);
                else {
                  var P = g.malloc(D.size, E), I = x(P, D.shape);
                  m.assign(I, D), this.length = A(this.gl, this.type, this.length, this.usage, L < 0 ? P : P.subarray(0, D.size), L), g.free(P);
                }
              } else if (Array.isArray(D)) {
                var M;
                M = this.type === this.gl.ELEMENT_ARRAY_BUFFER ? C(D, "uint16") : C(D, "float32"), this.length = A(this.gl, this.type, this.length, this.usage, L < 0 ? M : M.subarray(0, D.length), L), g.free(M);
              } else if (typeof D == "object" && typeof D.length == "number") this.length = A(this.gl, this.type, this.length, this.usage, D, L);
              else {
                if (typeof D != "number" && D !== void 0) throw new Error("gl-buffer: Invalid data type");
                if (L >= 0) throw new Error("gl-buffer: Cannot specify offset when resizing buffer");
                (D |= 0) <= 0 && (D = 1), this.gl.bufferData(this.type, 0 | D, this.usage), this.length = D;
              }
            }, d.exports = function(D, L, E, P) {
              if (E = E || D.ARRAY_BUFFER, P = P || D.DYNAMIC_DRAW, E !== D.ARRAY_BUFFER && E !== D.ELEMENT_ARRAY_BUFFER) throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");
              if (P !== D.DYNAMIC_DRAW && P !== D.STATIC_DRAW && P !== D.STREAM_DRAW) throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");
              var I = D.createBuffer(), M = new k(D, E, I, 0, P);
              return M.update(L), M;
            };
          }, 6405: function(d, f, c) {
            var g = c(2931);
            d.exports = function(x, w) {
              var k = x.positions, S = x.vectors, A = { positions: [], vertexIntensity: [], vertexIntensityBounds: x.vertexIntensityBounds, vectors: [], cells: [], coneOffset: x.coneOffset, colormap: x.colormap };
              if (x.positions.length === 0) return w && (w[0] = [0, 0, 0], w[1] = [0, 0, 0]), A;
              for (var C = 0, D = 1 / 0, L = -1 / 0, E = 1 / 0, P = -1 / 0, I = 1 / 0, M = -1 / 0, O = null, T = null, z = [], F = 1 / 0, U = !1, V = x.coneSizemode === "raw", $ = 0; $ < k.length; $++) {
                var q = k[$];
                D = Math.min(q[0], D), L = Math.max(q[0], L), E = Math.min(q[1], E), P = Math.max(q[1], P), I = Math.min(q[2], I), M = Math.max(q[2], M);
                var K = S[$];
                if (g.length(K) > C && (C = g.length(K)), $ && !V) {
                  var re = 2 * g.distance(O, q) / (g.length(T) + g.length(K));
                  re ? (F = Math.min(F, re), U = !1) : U = !0;
                }
                U || (O = q, T = K), z.push(K);
              }
              var Y = [D, E, I], te = [L, P, M];
              w && (w[0] = Y, w[1] = te), C === 0 && (C = 1);
              var ee = 1 / C;
              isFinite(F) || (F = 1), A.vectorScale = F;
              var X = x.coneSize || (V ? 1 : 0.5);
              x.absoluteConeSize && (X = x.absoluteConeSize * ee), A.coneScale = X, $ = 0;
              for (var Q = 0; $ < k.length; $++) for (var ue = (q = k[$])[0], ce = q[1], he = q[2], de = z[$], ne = g.length(de) * ee, ae = 0; ae < 8; ae++) {
                A.positions.push([ue, ce, he, Q++]), A.positions.push([ue, ce, he, Q++]), A.positions.push([ue, ce, he, Q++]), A.positions.push([ue, ce, he, Q++]), A.positions.push([ue, ce, he, Q++]), A.positions.push([ue, ce, he, Q++]), A.vectors.push(de), A.vectors.push(de), A.vectors.push(de), A.vectors.push(de), A.vectors.push(de), A.vectors.push(de), A.vertexIntensity.push(ne, ne, ne), A.vertexIntensity.push(ne, ne, ne);
                var se = A.positions.length;
                A.cells.push([se - 6, se - 5, se - 4], [se - 3, se - 2, se - 1]);
              }
              return A;
            };
            var m = c(614);
            d.exports.createMesh = c(9060), d.exports.createConeMesh = function(x, w) {
              return d.exports.createMesh(x, w, { shaders: m, traceType: "cone" });
            };
          }, 9060: function(d, f, c) {
            var g = c(9405), m = c(2762), x = c(8116), w = c(7766), k = c(6760), S = c(7608), A = c(9618), C = c(6729), D = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
            function L(P, I, M, O, T, z, F, U, V, $, q) {
              this.gl = P, this.pixelRatio = 1, this.cells = [], this.positions = [], this.intensity = [], this.texture = I, this.dirty = !0, this.triShader = M, this.pickShader = O, this.trianglePositions = T, this.triangleVectors = z, this.triangleColors = U, this.triangleUVs = V, this.triangleIds = F, this.triangleVAO = $, this.triangleCount = 0, this.pickId = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lightPosition = [1e5, 1e5, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.opacity = 1, this.traceType = q, this.tubeScale = 1, this.coneScale = 2, this.vectorScale = 1, this.coneOffset = 0.25, this._model = D, this._view = D, this._projection = D, this._resolution = [1, 1];
            }
            var E = L.prototype;
            E.isOpaque = function() {
              return this.opacity >= 1;
            }, E.isTransparent = function() {
              return this.opacity < 1;
            }, E.pickSlots = 1, E.setPickBase = function(P) {
              this.pickId = P;
            }, E.update = function(P) {
              P = P || {};
              var I = this.gl;
              this.dirty = !0, "lightPosition" in P && (this.lightPosition = P.lightPosition), "opacity" in P && (this.opacity = P.opacity), "ambient" in P && (this.ambientLight = P.ambient), "diffuse" in P && (this.diffuseLight = P.diffuse), "specular" in P && (this.specularLight = P.specular), "roughness" in P && (this.roughness = P.roughness), "fresnel" in P && (this.fresnel = P.fresnel), P.tubeScale !== void 0 && (this.tubeScale = P.tubeScale), P.vectorScale !== void 0 && (this.vectorScale = P.vectorScale), P.coneScale !== void 0 && (this.coneScale = P.coneScale), P.coneOffset !== void 0 && (this.coneOffset = P.coneOffset), P.colormap && (this.texture.shape = [256, 256], this.texture.minFilter = I.LINEAR_MIPMAP_LINEAR, this.texture.magFilter = I.LINEAR, this.texture.setPixels(function(me) {
                for (var ye = C({ colormap: me, nshades: 256, format: "rgba" }), pe = new Uint8Array(1024), be = 0; be < 256; ++be) {
                  for (var Ae = ye[be], Se = 0; Se < 3; ++Se) pe[4 * be + Se] = Ae[Se];
                  pe[4 * be + 3] = 255 * Ae[3];
                }
                return A(pe, [256, 256, 4], [4, 0, 1]);
              }(P.colormap)), this.texture.generateMipmap());
              var M = P.cells, O = P.positions, T = P.vectors;
              if (O && M && T) {
                var z = [], F = [], U = [], V = [], $ = [];
                this.cells = M, this.positions = O, this.vectors = T;
                var q = P.meshColor || [1, 1, 1, 1], K = P.vertexIntensity, re = 1 / 0, Y = -1 / 0;
                if (K) if (P.vertexIntensityBounds) re = +P.vertexIntensityBounds[0], Y = +P.vertexIntensityBounds[1];
                else for (var te = 0; te < K.length; ++te) {
                  var ee = K[te];
                  re = Math.min(re, ee), Y = Math.max(Y, ee);
                }
                else for (te = 0; te < O.length; ++te) ee = O[te][2], re = Math.min(re, ee), Y = Math.max(Y, ee);
                for (this.intensity = K || function(me) {
                  for (var ye = me.length, pe = new Array(ye), be = 0; be < ye; ++be) pe[be] = me[be][2];
                  return pe;
                }(O), this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], te = 0; te < O.length; ++te) for (var X = O[te], Q = 0; Q < 3; ++Q) !isNaN(X[Q]) && isFinite(X[Q]) && (this.bounds[0][Q] = Math.min(this.bounds[0][Q], X[Q]), this.bounds[1][Q] = Math.max(this.bounds[1][Q], X[Q]));
                var ue = 0;
                e: for (te = 0; te < M.length; ++te) {
                  var ce = M[te];
                  if (ce.length === 3) {
                    for (Q = 0; Q < 3; ++Q) {
                      X = O[de = ce[Q]];
                      for (var he = 0; he < 3; ++he) if (isNaN(X[he]) || !isFinite(X[he])) continue e;
                    }
                    for (Q = 0; Q < 3; ++Q) {
                      var de;
                      X = O[de = ce[2 - Q]], z.push(X[0], X[1], X[2], X[3]);
                      var ne = T[de];
                      F.push(ne[0], ne[1], ne[2], ne[3] || 0);
                      var ae, se = q;
                      se.length === 3 ? U.push(se[0], se[1], se[2], 1) : U.push(se[0], se[1], se[2], se[3]), ae = K ? [(K[de] - re) / (Y - re), 0] : [(X[2] - re) / (Y - re), 0], V.push(ae[0], ae[1]), $.push(te);
                    }
                    ue += 1;
                  }
                }
                this.triangleCount = ue, this.trianglePositions.update(z), this.triangleVectors.update(F), this.triangleColors.update(U), this.triangleUVs.update(V), this.triangleIds.update(new Uint32Array($));
              }
            }, E.drawTransparent = E.draw = function(P) {
              P = P || {};
              for (var I = this.gl, M = P.model || D, O = P.view || D, T = P.projection || D, z = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], F = 0; F < 3; ++F) z[0][F] = Math.max(z[0][F], this.clipBounds[0][F]), z[1][F] = Math.min(z[1][F], this.clipBounds[1][F]);
              var U = { model: M, view: O, projection: T, inverseModel: D.slice(), clipBounds: z, kambient: this.ambientLight, kdiffuse: this.diffuseLight, kspecular: this.specularLight, roughness: this.roughness, fresnel: this.fresnel, eyePosition: [0, 0, 0], lightPosition: [0, 0, 0], opacity: this.opacity, tubeScale: this.tubeScale, vectorScale: this.vectorScale, coneScale: this.coneScale, coneOffset: this.coneOffset, texture: 0 };
              U.inverseModel = S(U.inverseModel, U.model), I.disable(I.CULL_FACE), this.texture.bind(0);
              var V = new Array(16);
              for (k(V, U.view, U.model), k(V, U.projection, V), S(V, V), F = 0; F < 3; ++F) U.eyePosition[F] = V[12 + F] / V[15];
              var $ = V[15];
              for (F = 0; F < 3; ++F) $ += this.lightPosition[F] * V[4 * F + 3];
              for (F = 0; F < 3; ++F) {
                for (var q = V[12 + F], K = 0; K < 3; ++K) q += V[4 * K + F] * this.lightPosition[K];
                U.lightPosition[F] = q / $;
              }
              if (this.triangleCount > 0) {
                var re = this.triShader;
                re.bind(), re.uniforms = U, this.triangleVAO.bind(), I.drawArrays(I.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind();
              }
            }, E.drawPick = function(P) {
              P = P || {};
              for (var I = this.gl, M = P.model || D, O = P.view || D, T = P.projection || D, z = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], F = 0; F < 3; ++F) z[0][F] = Math.max(z[0][F], this.clipBounds[0][F]), z[1][F] = Math.min(z[1][F], this.clipBounds[1][F]);
              this._model = [].slice.call(M), this._view = [].slice.call(O), this._projection = [].slice.call(T), this._resolution = [I.drawingBufferWidth, I.drawingBufferHeight];
              var U = { model: M, view: O, projection: T, clipBounds: z, tubeScale: this.tubeScale, vectorScale: this.vectorScale, coneScale: this.coneScale, coneOffset: this.coneOffset, pickId: this.pickId / 255 }, V = this.pickShader;
              V.bind(), V.uniforms = U, this.triangleCount > 0 && (this.triangleVAO.bind(), I.drawArrays(I.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind());
            }, E.pick = function(P) {
              if (!P || P.id !== this.pickId) return null;
              var I = P.value[0] + 256 * P.value[1] + 65536 * P.value[2], M = this.cells[I], O = this.positions[M[1]].slice(0, 3), T = { position: O, dataCoordinate: O, index: Math.floor(M[1] / 48) };
              return this.traceType === "cone" ? T.index = Math.floor(M[1] / 48) : this.traceType === "streamtube" && (T.intensity = this.intensity[M[1]], T.velocity = this.vectors[M[1]].slice(0, 3), T.divergence = this.vectors[M[1]][3], T.index = I), T;
            }, E.dispose = function() {
              this.texture.dispose(), this.triShader.dispose(), this.pickShader.dispose(), this.triangleVAO.dispose(), this.trianglePositions.dispose(), this.triangleVectors.dispose(), this.triangleColors.dispose(), this.triangleUVs.dispose(), this.triangleIds.dispose();
            }, d.exports = function(P, I, M) {
              var O = M.shaders;
              arguments.length === 1 && (P = (I = P).gl);
              var T = function(Y, te) {
                var ee = g(Y, te.meshShader.vertex, te.meshShader.fragment, null, te.meshShader.attributes);
                return ee.attributes.position.location = 0, ee.attributes.color.location = 2, ee.attributes.uv.location = 3, ee.attributes.vector.location = 4, ee;
              }(P, O), z = function(Y, te) {
                var ee = g(Y, te.pickShader.vertex, te.pickShader.fragment, null, te.pickShader.attributes);
                return ee.attributes.position.location = 0, ee.attributes.id.location = 1, ee.attributes.vector.location = 4, ee;
              }(P, O), F = w(P, A(new Uint8Array([255, 255, 255, 255]), [1, 1, 4]));
              F.generateMipmap(), F.minFilter = P.LINEAR_MIPMAP_LINEAR, F.magFilter = P.LINEAR;
              var U = m(P), V = m(P), $ = m(P), q = m(P), K = m(P), re = new L(P, F, T, z, U, V, K, $, q, x(P, [{ buffer: U, type: P.FLOAT, size: 4 }, { buffer: K, type: P.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: $, type: P.FLOAT, size: 4 }, { buffer: q, type: P.FLOAT, size: 2 }, { buffer: V, type: P.FLOAT, size: 4 }]), M.traceType || "cone");
              return re.update(I), re;
            };
          }, 614: function(d, f, c) {
            var g = c(3236), m = g([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec3 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, coneScale, coneOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * conePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(conePosition, 1.0);
  vec4 t_position  = view * conePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = conePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]), x = g([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]), w = g([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
//   segment + 0 top vertex
//   segment + 1 perimeter vertex a+1
//   segment + 2 perimeter vertex a
//   segment + 3 center base vertex
//   segment + 4 perimeter vertex a
//   segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {

  const float segmentCount = 8.0;

  float index = rawIndex - floor(rawIndex /
    (segmentCount * 6.0)) *
    (segmentCount * 6.0);

  float segment = floor(0.001 + index/6.0);
  float segmentIndex = index - (segment*6.0);

  normal = -normalize(d);

  if (segmentIndex > 2.99 && segmentIndex < 3.01) {
    return mix(vec3(0.0), -d, coneOffset);
  }

  float nextAngle = (
    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||
    (segmentIndex > 4.99 &&  segmentIndex < 5.01)
  ) ? 1.0 : 0.0;
  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);

  vec3 v1 = mix(d, vec3(0.0), coneOffset);
  vec3 v2 = v1 - d;

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d)*0.25;
  vec3 y = v * sin(angle) * length(d)*0.25;
  vec3 v3 = v2 + x + y;
  if (segmentIndex < 3.0) {
    vec3 tx = u * sin(angle);
    vec3 ty = v * -cos(angle);
    vec3 tangent = tx + ty;
    normal = normalize(cross(v3 - v1, tangent));
  }

  if (segmentIndex == 0.0) {
    return mix(d, vec3(0.0), coneOffset);
  }
  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float vectorScale, coneScale, coneOffset;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
  gl_Position = projection * (view * conePosition);
  f_id        = id;
  f_position  = position.xyz;
}
`]), k = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);
            f.meshShader = { vertex: m, fragment: x, attributes: [{ name: "position", type: "vec4" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "vector", type: "vec3" }] }, f.pickShader = { vertex: w, fragment: k, attributes: [{ name: "position", type: "vec4" }, { name: "id", type: "vec4" }, { name: "vector", type: "vec3" }] };
          }, 737: function(d) {
            d.exports = { 0: "NONE", 1: "ONE", 2: "LINE_LOOP", 3: "LINE_STRIP", 4: "TRIANGLES", 5: "TRIANGLE_STRIP", 6: "TRIANGLE_FAN", 256: "DEPTH_BUFFER_BIT", 512: "NEVER", 513: "LESS", 514: "EQUAL", 515: "LEQUAL", 516: "GREATER", 517: "NOTEQUAL", 518: "GEQUAL", 519: "ALWAYS", 768: "SRC_COLOR", 769: "ONE_MINUS_SRC_COLOR", 770: "SRC_ALPHA", 771: "ONE_MINUS_SRC_ALPHA", 772: "DST_ALPHA", 773: "ONE_MINUS_DST_ALPHA", 774: "DST_COLOR", 775: "ONE_MINUS_DST_COLOR", 776: "SRC_ALPHA_SATURATE", 1024: "STENCIL_BUFFER_BIT", 1028: "FRONT", 1029: "BACK", 1032: "FRONT_AND_BACK", 1280: "INVALID_ENUM", 1281: "INVALID_VALUE", 1282: "INVALID_OPERATION", 1285: "OUT_OF_MEMORY", 1286: "INVALID_FRAMEBUFFER_OPERATION", 2304: "CW", 2305: "CCW", 2849: "LINE_WIDTH", 2884: "CULL_FACE", 2885: "CULL_FACE_MODE", 2886: "FRONT_FACE", 2928: "DEPTH_RANGE", 2929: "DEPTH_TEST", 2930: "DEPTH_WRITEMASK", 2931: "DEPTH_CLEAR_VALUE", 2932: "DEPTH_FUNC", 2960: "STENCIL_TEST", 2961: "STENCIL_CLEAR_VALUE", 2962: "STENCIL_FUNC", 2963: "STENCIL_VALUE_MASK", 2964: "STENCIL_FAIL", 2965: "STENCIL_PASS_DEPTH_FAIL", 2966: "STENCIL_PASS_DEPTH_PASS", 2967: "STENCIL_REF", 2968: "STENCIL_WRITEMASK", 2978: "VIEWPORT", 3024: "DITHER", 3042: "BLEND", 3088: "SCISSOR_BOX", 3089: "SCISSOR_TEST", 3106: "COLOR_CLEAR_VALUE", 3107: "COLOR_WRITEMASK", 3317: "UNPACK_ALIGNMENT", 3333: "PACK_ALIGNMENT", 3379: "MAX_TEXTURE_SIZE", 3386: "MAX_VIEWPORT_DIMS", 3408: "SUBPIXEL_BITS", 3410: "RED_BITS", 3411: "GREEN_BITS", 3412: "BLUE_BITS", 3413: "ALPHA_BITS", 3414: "DEPTH_BITS", 3415: "STENCIL_BITS", 3553: "TEXTURE_2D", 4352: "DONT_CARE", 4353: "FASTEST", 4354: "NICEST", 5120: "BYTE", 5121: "UNSIGNED_BYTE", 5122: "SHORT", 5123: "UNSIGNED_SHORT", 5124: "INT", 5125: "UNSIGNED_INT", 5126: "FLOAT", 5386: "INVERT", 5890: "TEXTURE", 6401: "STENCIL_INDEX", 6402: "DEPTH_COMPONENT", 6406: "ALPHA", 6407: "RGB", 6408: "RGBA", 6409: "LUMINANCE", 6410: "LUMINANCE_ALPHA", 7680: "KEEP", 7681: "REPLACE", 7682: "INCR", 7683: "DECR", 7936: "VENDOR", 7937: "RENDERER", 7938: "VERSION", 9728: "NEAREST", 9729: "LINEAR", 9984: "NEAREST_MIPMAP_NEAREST", 9985: "LINEAR_MIPMAP_NEAREST", 9986: "NEAREST_MIPMAP_LINEAR", 9987: "LINEAR_MIPMAP_LINEAR", 10240: "TEXTURE_MAG_FILTER", 10241: "TEXTURE_MIN_FILTER", 10242: "TEXTURE_WRAP_S", 10243: "TEXTURE_WRAP_T", 10497: "REPEAT", 10752: "POLYGON_OFFSET_UNITS", 16384: "COLOR_BUFFER_BIT", 32769: "CONSTANT_COLOR", 32770: "ONE_MINUS_CONSTANT_COLOR", 32771: "CONSTANT_ALPHA", 32772: "ONE_MINUS_CONSTANT_ALPHA", 32773: "BLEND_COLOR", 32774: "FUNC_ADD", 32777: "BLEND_EQUATION_RGB", 32778: "FUNC_SUBTRACT", 32779: "FUNC_REVERSE_SUBTRACT", 32819: "UNSIGNED_SHORT_4_4_4_4", 32820: "UNSIGNED_SHORT_5_5_5_1", 32823: "POLYGON_OFFSET_FILL", 32824: "POLYGON_OFFSET_FACTOR", 32854: "RGBA4", 32855: "RGB5_A1", 32873: "TEXTURE_BINDING_2D", 32926: "SAMPLE_ALPHA_TO_COVERAGE", 32928: "SAMPLE_COVERAGE", 32936: "SAMPLE_BUFFERS", 32937: "SAMPLES", 32938: "SAMPLE_COVERAGE_VALUE", 32939: "SAMPLE_COVERAGE_INVERT", 32968: "BLEND_DST_RGB", 32969: "BLEND_SRC_RGB", 32970: "BLEND_DST_ALPHA", 32971: "BLEND_SRC_ALPHA", 33071: "CLAMP_TO_EDGE", 33170: "GENERATE_MIPMAP_HINT", 33189: "DEPTH_COMPONENT16", 33306: "DEPTH_STENCIL_ATTACHMENT", 33635: "UNSIGNED_SHORT_5_6_5", 33648: "MIRRORED_REPEAT", 33901: "ALIASED_POINT_SIZE_RANGE", 33902: "ALIASED_LINE_WIDTH_RANGE", 33984: "TEXTURE0", 33985: "TEXTURE1", 33986: "TEXTURE2", 33987: "TEXTURE3", 33988: "TEXTURE4", 33989: "TEXTURE5", 33990: "TEXTURE6", 33991: "TEXTURE7", 33992: "TEXTURE8", 33993: "TEXTURE9", 33994: "TEXTURE10", 33995: "TEXTURE11", 33996: "TEXTURE12", 33997: "TEXTURE13", 33998: "TEXTURE14", 33999: "TEXTURE15", 34e3: "TEXTURE16", 34001: "TEXTURE17", 34002: "TEXTURE18", 34003: "TEXTURE19", 34004: "TEXTURE20", 34005: "TEXTURE21", 34006: "TEXTURE22", 34007: "TEXTURE23", 34008: "TEXTURE24", 34009: "TEXTURE25", 34010: "TEXTURE26", 34011: "TEXTURE27", 34012: "TEXTURE28", 34013: "TEXTURE29", 34014: "TEXTURE30", 34015: "TEXTURE31", 34016: "ACTIVE_TEXTURE", 34024: "MAX_RENDERBUFFER_SIZE", 34041: "DEPTH_STENCIL", 34055: "INCR_WRAP", 34056: "DECR_WRAP", 34067: "TEXTURE_CUBE_MAP", 34068: "TEXTURE_BINDING_CUBE_MAP", 34069: "TEXTURE_CUBE_MAP_POSITIVE_X", 34070: "TEXTURE_CUBE_MAP_NEGATIVE_X", 34071: "TEXTURE_CUBE_MAP_POSITIVE_Y", 34072: "TEXTURE_CUBE_MAP_NEGATIVE_Y", 34073: "TEXTURE_CUBE_MAP_POSITIVE_Z", 34074: "TEXTURE_CUBE_MAP_NEGATIVE_Z", 34076: "MAX_CUBE_MAP_TEXTURE_SIZE", 34338: "VERTEX_ATTRIB_ARRAY_ENABLED", 34339: "VERTEX_ATTRIB_ARRAY_SIZE", 34340: "VERTEX_ATTRIB_ARRAY_STRIDE", 34341: "VERTEX_ATTRIB_ARRAY_TYPE", 34342: "CURRENT_VERTEX_ATTRIB", 34373: "VERTEX_ATTRIB_ARRAY_POINTER", 34466: "NUM_COMPRESSED_TEXTURE_FORMATS", 34467: "COMPRESSED_TEXTURE_FORMATS", 34660: "BUFFER_SIZE", 34661: "BUFFER_USAGE", 34816: "STENCIL_BACK_FUNC", 34817: "STENCIL_BACK_FAIL", 34818: "STENCIL_BACK_PASS_DEPTH_FAIL", 34819: "STENCIL_BACK_PASS_DEPTH_PASS", 34877: "BLEND_EQUATION_ALPHA", 34921: "MAX_VERTEX_ATTRIBS", 34922: "VERTEX_ATTRIB_ARRAY_NORMALIZED", 34930: "MAX_TEXTURE_IMAGE_UNITS", 34962: "ARRAY_BUFFER", 34963: "ELEMENT_ARRAY_BUFFER", 34964: "ARRAY_BUFFER_BINDING", 34965: "ELEMENT_ARRAY_BUFFER_BINDING", 34975: "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", 35040: "STREAM_DRAW", 35044: "STATIC_DRAW", 35048: "DYNAMIC_DRAW", 35632: "FRAGMENT_SHADER", 35633: "VERTEX_SHADER", 35660: "MAX_VERTEX_TEXTURE_IMAGE_UNITS", 35661: "MAX_COMBINED_TEXTURE_IMAGE_UNITS", 35663: "SHADER_TYPE", 35664: "FLOAT_VEC2", 35665: "FLOAT_VEC3", 35666: "FLOAT_VEC4", 35667: "INT_VEC2", 35668: "INT_VEC3", 35669: "INT_VEC4", 35670: "BOOL", 35671: "BOOL_VEC2", 35672: "BOOL_VEC3", 35673: "BOOL_VEC4", 35674: "FLOAT_MAT2", 35675: "FLOAT_MAT3", 35676: "FLOAT_MAT4", 35678: "SAMPLER_2D", 35680: "SAMPLER_CUBE", 35712: "DELETE_STATUS", 35713: "COMPILE_STATUS", 35714: "LINK_STATUS", 35715: "VALIDATE_STATUS", 35716: "INFO_LOG_LENGTH", 35717: "ATTACHED_SHADERS", 35718: "ACTIVE_UNIFORMS", 35719: "ACTIVE_UNIFORM_MAX_LENGTH", 35720: "SHADER_SOURCE_LENGTH", 35721: "ACTIVE_ATTRIBUTES", 35722: "ACTIVE_ATTRIBUTE_MAX_LENGTH", 35724: "SHADING_LANGUAGE_VERSION", 35725: "CURRENT_PROGRAM", 36003: "STENCIL_BACK_REF", 36004: "STENCIL_BACK_VALUE_MASK", 36005: "STENCIL_BACK_WRITEMASK", 36006: "FRAMEBUFFER_BINDING", 36007: "RENDERBUFFER_BINDING", 36048: "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", 36049: "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", 36050: "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", 36051: "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", 36053: "FRAMEBUFFER_COMPLETE", 36054: "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", 36055: "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", 36057: "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", 36061: "FRAMEBUFFER_UNSUPPORTED", 36064: "COLOR_ATTACHMENT0", 36096: "DEPTH_ATTACHMENT", 36128: "STENCIL_ATTACHMENT", 36160: "FRAMEBUFFER", 36161: "RENDERBUFFER", 36162: "RENDERBUFFER_WIDTH", 36163: "RENDERBUFFER_HEIGHT", 36164: "RENDERBUFFER_INTERNAL_FORMAT", 36168: "STENCIL_INDEX8", 36176: "RENDERBUFFER_RED_SIZE", 36177: "RENDERBUFFER_GREEN_SIZE", 36178: "RENDERBUFFER_BLUE_SIZE", 36179: "RENDERBUFFER_ALPHA_SIZE", 36180: "RENDERBUFFER_DEPTH_SIZE", 36181: "RENDERBUFFER_STENCIL_SIZE", 36194: "RGB565", 36336: "LOW_FLOAT", 36337: "MEDIUM_FLOAT", 36338: "HIGH_FLOAT", 36339: "LOW_INT", 36340: "MEDIUM_INT", 36341: "HIGH_INT", 36346: "SHADER_COMPILER", 36347: "MAX_VERTEX_UNIFORM_VECTORS", 36348: "MAX_VARYING_VECTORS", 36349: "MAX_FRAGMENT_UNIFORM_VECTORS", 37440: "UNPACK_FLIP_Y_WEBGL", 37441: "UNPACK_PREMULTIPLY_ALPHA_WEBGL", 37442: "CONTEXT_LOST_WEBGL", 37443: "UNPACK_COLORSPACE_CONVERSION_WEBGL", 37444: "BROWSER_DEFAULT_WEBGL" };
          }, 5171: function(d, f, c) {
            var g = c(737);
            d.exports = function(m) {
              return g[m];
            };
          }, 9165: function(d, f, c) {
            d.exports = function(L) {
              var E = L.gl, P = g(E), I = m(E, [{ buffer: P, type: E.FLOAT, size: 3, offset: 0, stride: 40 }, { buffer: P, type: E.FLOAT, size: 4, offset: 12, stride: 40 }, { buffer: P, type: E.FLOAT, size: 3, offset: 28, stride: 40 }]), M = x(E);
              M.attributes.position.location = 0, M.attributes.color.location = 1, M.attributes.offset.location = 2;
              var O = new k(E, P, I, M);
              return O.update(L), O;
            };
            var g = c(2762), m = c(8116), x = c(3436), w = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
            function k(L, E, P, I) {
              this.gl = L, this.shader = I, this.buffer = E, this.vao = P, this.pixelRatio = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lineWidth = [1, 1, 1], this.capSize = [10, 10, 10], this.lineCount = [0, 0, 0], this.lineOffset = [0, 0, 0], this.opacity = 1, this.hasAlpha = !1;
            }
            var S = k.prototype;
            function A(L, E) {
              for (var P = 0; P < 3; ++P) L[0][P] = Math.min(L[0][P], E[P]), L[1][P] = Math.max(L[1][P], E[P]);
            }
            S.isOpaque = function() {
              return !this.hasAlpha;
            }, S.isTransparent = function() {
              return this.hasAlpha;
            }, S.drawTransparent = S.draw = function(L) {
              var E = this.gl, P = this.shader.uniforms;
              this.shader.bind();
              var I = P.view = L.view || w, M = P.projection = L.projection || w;
              P.model = L.model || w, P.clipBounds = this.clipBounds, P.opacity = this.opacity;
              var O = I[12], T = I[13], z = I[14], F = I[15], U = (L._ortho ? 2 : 1) * this.pixelRatio * (M[3] * O + M[7] * T + M[11] * z + M[15] * F) / E.drawingBufferHeight;
              this.vao.bind();
              for (var V = 0; V < 3; ++V) E.lineWidth(this.lineWidth[V] * this.pixelRatio), P.capSize = this.capSize[V] * U, this.lineCount[V] && E.drawArrays(E.LINES, this.lineOffset[V], this.lineCount[V]);
              this.vao.unbind();
            };
            var C = function() {
              for (var L = new Array(3), E = 0; E < 3; ++E) {
                for (var P = [], I = 1; I <= 2; ++I) for (var M = -1; M <= 1; M += 2) {
                  var O = [0, 0, 0];
                  O[(I + E) % 3] = M, P.push(O);
                }
                L[E] = P;
              }
              return L;
            }();
            function D(L, E, P, I) {
              for (var M = C[I], O = 0; O < M.length; ++O) {
                var T = M[O];
                L.push(E[0], E[1], E[2], P[0], P[1], P[2], P[3], T[0], T[1], T[2]);
              }
              return M.length;
            }
            S.update = function(L) {
              "lineWidth" in (L = L || {}) && (this.lineWidth = L.lineWidth, Array.isArray(this.lineWidth) || (this.lineWidth = [this.lineWidth, this.lineWidth, this.lineWidth])), "capSize" in L && (this.capSize = L.capSize, Array.isArray(this.capSize) || (this.capSize = [this.capSize, this.capSize, this.capSize])), this.hasAlpha = !1, "opacity" in L && (this.opacity = +L.opacity, this.opacity < 1 && (this.hasAlpha = !0));
              var E = L.color || [[0, 0, 0], [0, 0, 0], [0, 0, 0]], P = L.position, I = L.error;
              if (Array.isArray(E[0]) || (E = [E, E, E]), P && I) {
                var M = [], O = P.length, T = 0;
                this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.lineCount = [0, 0, 0];
                for (var z = 0; z < 3; ++z) {
                  this.lineOffset[z] = T;
                  e: for (var F = 0; F < O; ++F) {
                    for (var U = P[F], V = 0; V < 3; ++V) if (isNaN(U[V]) || !isFinite(U[V])) continue e;
                    var $, q = I[F], K = E[z];
                    Array.isArray(K[0]) && (K = E[F]), K.length === 3 ? K = [K[0], K[1], K[2], 1] : K.length === 4 && (K = [K[0], K[1], K[2], K[3]], !this.hasAlpha && K[3] < 1 && (this.hasAlpha = !0)), !isNaN(q[0][z]) && !isNaN(q[1][z]) && (q[0][z] < 0 && (($ = U.slice())[z] += q[0][z], M.push(U[0], U[1], U[2], K[0], K[1], K[2], K[3], 0, 0, 0, $[0], $[1], $[2], K[0], K[1], K[2], K[3], 0, 0, 0), A(this.bounds, $), T += 2 + D(M, $, K, z)), q[1][z] > 0 && (($ = U.slice())[z] += q[1][z], M.push(U[0], U[1], U[2], K[0], K[1], K[2], K[3], 0, 0, 0, $[0], $[1], $[2], K[0], K[1], K[2], K[3], 0, 0, 0), A(this.bounds, $), T += 2 + D(M, $, K, z)));
                  }
                  this.lineCount[z] = T - this.lineOffset[z];
                }
                this.buffer.update(M);
              }
            }, S.dispose = function() {
              this.shader.dispose(), this.buffer.dispose(), this.vao.dispose();
            };
          }, 3436: function(d, f, c) {
            var g = c(3236), m = c(9405), x = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, offset;
attribute vec4 color;
uniform mat4 model, view, projection;
uniform float capSize;
varying vec4 fragColor;
varying vec3 fragPosition;

void main() {
  vec4 worldPosition  = model * vec4(position, 1.0);
  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
  gl_Position         = projection * (view * worldPosition);
  fragColor           = color;
  fragPosition        = position;
}`]), w = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float opacity;
varying vec3 fragPosition;
varying vec4 fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  gl_FragColor = opacity * fragColor;
}`]);
            d.exports = function(k) {
              return m(k, x, w, null, [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "offset", type: "vec3" }]);
            };
          }, 2260: function(d, f, c) {
            var g = c(7766);
            d.exports = function(O, T, z, F) {
              m || (m = O.FRAMEBUFFER_UNSUPPORTED, x = O.FRAMEBUFFER_INCOMPLETE_ATTACHMENT, w = O.FRAMEBUFFER_INCOMPLETE_DIMENSIONS, k = O.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);
              var U = O.getExtension("WEBGL_draw_buffers");
              if (!S && U && function(te, ee) {
                var X = te.getParameter(ee.MAX_COLOR_ATTACHMENTS_WEBGL);
                S = new Array(X + 1);
                for (var Q = 0; Q <= X; ++Q) {
                  for (var ue = new Array(X), ce = 0; ce < Q; ++ce) ue[ce] = te.COLOR_ATTACHMENT0 + ce;
                  for (ce = Q; ce < X; ++ce) ue[ce] = te.NONE;
                  S[Q] = ue;
                }
              }(O, U), Array.isArray(T) && (F = z, z = 0 | T[1], T = 0 | T[0]), typeof T != "number") throw new Error("gl-fbo: Missing shape parameter");
              var V = O.getParameter(O.MAX_RENDERBUFFER_SIZE);
              if (T < 0 || T > V || z < 0 || z > V) throw new Error("gl-fbo: Parameters are too large for FBO");
              var $ = 1;
              if ("color" in (F = F || {})) {
                if (($ = Math.max(0 | F.color, 0)) < 0) throw new Error("gl-fbo: Must specify a nonnegative number of colors");
                if ($ > 1) {
                  if (!U) throw new Error("gl-fbo: Multiple draw buffer extension not supported");
                  if ($ > O.getParameter(U.MAX_COLOR_ATTACHMENTS_WEBGL)) throw new Error("gl-fbo: Context does not support " + $ + " draw buffers");
                }
              }
              var q = O.UNSIGNED_BYTE, K = O.getExtension("OES_texture_float");
              if (F.float && $ > 0) {
                if (!K) throw new Error("gl-fbo: Context does not support floating point textures");
                q = O.FLOAT;
              } else F.preferFloat && $ > 0 && K && (q = O.FLOAT);
              var re = !0;
              "depth" in F && (re = !!F.depth);
              var Y = !1;
              return "stencil" in F && (Y = !!F.stencil), new P(O, T, z, q, $, re, Y, U);
            };
            var m, x, w, k, S = null;
            function A(O) {
              return [O.getParameter(O.FRAMEBUFFER_BINDING), O.getParameter(O.RENDERBUFFER_BINDING), O.getParameter(O.TEXTURE_BINDING_2D)];
            }
            function C(O, T) {
              O.bindFramebuffer(O.FRAMEBUFFER, T[0]), O.bindRenderbuffer(O.RENDERBUFFER, T[1]), O.bindTexture(O.TEXTURE_2D, T[2]);
            }
            function D(O) {
              switch (O) {
                case m:
                  throw new Error("gl-fbo: Framebuffer unsupported");
                case x:
                  throw new Error("gl-fbo: Framebuffer incomplete attachment");
                case w:
                  throw new Error("gl-fbo: Framebuffer incomplete dimensions");
                case k:
                  throw new Error("gl-fbo: Framebuffer incomplete missing attachment");
                default:
                  throw new Error("gl-fbo: Framebuffer failed for unspecified reason");
              }
            }
            function L(O, T, z, F, U, V) {
              if (!F) return null;
              var $ = g(O, T, z, U, F);
              return $.magFilter = O.NEAREST, $.minFilter = O.NEAREST, $.mipSamples = 1, $.bind(), O.framebufferTexture2D(O.FRAMEBUFFER, V, O.TEXTURE_2D, $.handle, 0), $;
            }
            function E(O, T, z, F, U) {
              var V = O.createRenderbuffer();
              return O.bindRenderbuffer(O.RENDERBUFFER, V), O.renderbufferStorage(O.RENDERBUFFER, F, T, z), O.framebufferRenderbuffer(O.FRAMEBUFFER, U, O.RENDERBUFFER, V), V;
            }
            function P(O, T, z, F, U, V, $, q) {
              this.gl = O, this._shape = [0 | T, 0 | z], this._destroyed = !1, this._ext = q, this.color = new Array(U);
              for (var K = 0; K < U; ++K) this.color[K] = null;
              this._color_rb = null, this.depth = null, this._depth_rb = null, this._colorType = F, this._useDepth = V, this._useStencil = $;
              var re = this, Y = [0 | T, 0 | z];
              Object.defineProperties(Y, { 0: { get: function() {
                return re._shape[0];
              }, set: function(te) {
                return re.width = te;
              } }, 1: { get: function() {
                return re._shape[1];
              }, set: function(te) {
                return re.height = te;
              } } }), this._shapeVector = Y, function(te) {
                var ee = A(te.gl), X = te.gl, Q = te.handle = X.createFramebuffer(), ue = te._shape[0], ce = te._shape[1], he = te.color.length, de = te._ext, ne = te._useStencil, ae = te._useDepth, se = te._colorType;
                X.bindFramebuffer(X.FRAMEBUFFER, Q);
                for (var me = 0; me < he; ++me) te.color[me] = L(X, ue, ce, se, X.RGBA, X.COLOR_ATTACHMENT0 + me);
                he === 0 ? (te._color_rb = E(X, ue, ce, X.RGBA4, X.COLOR_ATTACHMENT0), de && de.drawBuffersWEBGL(S[0])) : he > 1 && de.drawBuffersWEBGL(S[he]);
                var ye = X.getExtension("WEBGL_depth_texture");
                ye ? ne ? te.depth = L(X, ue, ce, ye.UNSIGNED_INT_24_8_WEBGL, X.DEPTH_STENCIL, X.DEPTH_STENCIL_ATTACHMENT) : ae && (te.depth = L(X, ue, ce, X.UNSIGNED_SHORT, X.DEPTH_COMPONENT, X.DEPTH_ATTACHMENT)) : ae && ne ? te._depth_rb = E(X, ue, ce, X.DEPTH_STENCIL, X.DEPTH_STENCIL_ATTACHMENT) : ae ? te._depth_rb = E(X, ue, ce, X.DEPTH_COMPONENT16, X.DEPTH_ATTACHMENT) : ne && (te._depth_rb = E(X, ue, ce, X.STENCIL_INDEX, X.STENCIL_ATTACHMENT));
                var pe = X.checkFramebufferStatus(X.FRAMEBUFFER);
                if (pe !== X.FRAMEBUFFER_COMPLETE) {
                  for (te._destroyed = !0, X.bindFramebuffer(X.FRAMEBUFFER, null), X.deleteFramebuffer(te.handle), te.handle = null, te.depth && (te.depth.dispose(), te.depth = null), te._depth_rb && (X.deleteRenderbuffer(te._depth_rb), te._depth_rb = null), me = 0; me < te.color.length; ++me) te.color[me].dispose(), te.color[me] = null;
                  te._color_rb && (X.deleteRenderbuffer(te._color_rb), te._color_rb = null), C(X, ee), D(pe);
                }
                C(X, ee);
              }(this);
            }
            var I = P.prototype;
            function M(O, T, z) {
              if (O._destroyed) throw new Error("gl-fbo: Can't resize destroyed FBO");
              if (O._shape[0] !== T || O._shape[1] !== z) {
                var F = O.gl, U = F.getParameter(F.MAX_RENDERBUFFER_SIZE);
                if (T < 0 || T > U || z < 0 || z > U) throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");
                O._shape[0] = T, O._shape[1] = z;
                for (var V = A(F), $ = 0; $ < O.color.length; ++$) O.color[$].shape = O._shape;
                O._color_rb && (F.bindRenderbuffer(F.RENDERBUFFER, O._color_rb), F.renderbufferStorage(F.RENDERBUFFER, F.RGBA4, O._shape[0], O._shape[1])), O.depth && (O.depth.shape = O._shape), O._depth_rb && (F.bindRenderbuffer(F.RENDERBUFFER, O._depth_rb), O._useDepth && O._useStencil ? F.renderbufferStorage(F.RENDERBUFFER, F.DEPTH_STENCIL, O._shape[0], O._shape[1]) : O._useDepth ? F.renderbufferStorage(F.RENDERBUFFER, F.DEPTH_COMPONENT16, O._shape[0], O._shape[1]) : O._useStencil && F.renderbufferStorage(F.RENDERBUFFER, F.STENCIL_INDEX, O._shape[0], O._shape[1])), F.bindFramebuffer(F.FRAMEBUFFER, O.handle);
                var q = F.checkFramebufferStatus(F.FRAMEBUFFER);
                q !== F.FRAMEBUFFER_COMPLETE && (O.dispose(), C(F, V), D(q)), C(F, V);
              }
            }
            Object.defineProperties(I, { shape: { get: function() {
              return this._destroyed ? [0, 0] : this._shapeVector;
            }, set: function(O) {
              if (Array.isArray(O) || (O = [0 | O, 0 | O]), O.length !== 2) throw new Error("gl-fbo: Shape vector must be length 2");
              var T = 0 | O[0], z = 0 | O[1];
              return M(this, T, z), [T, z];
            }, enumerable: !1 }, width: { get: function() {
              return this._destroyed ? 0 : this._shape[0];
            }, set: function(O) {
              return M(this, O |= 0, this._shape[1]), O;
            }, enumerable: !1 }, height: { get: function() {
              return this._destroyed ? 0 : this._shape[1];
            }, set: function(O) {
              return O |= 0, M(this, this._shape[0], O), O;
            }, enumerable: !1 } }), I.bind = function() {
              if (!this._destroyed) {
                var O = this.gl;
                O.bindFramebuffer(O.FRAMEBUFFER, this.handle), O.viewport(0, 0, this._shape[0], this._shape[1]);
              }
            }, I.dispose = function() {
              if (!this._destroyed) {
                this._destroyed = !0;
                var O = this.gl;
                O.deleteFramebuffer(this.handle), this.handle = null, this.depth && (this.depth.dispose(), this.depth = null), this._depth_rb && (O.deleteRenderbuffer(this._depth_rb), this._depth_rb = null);
                for (var T = 0; T < this.color.length; ++T) this.color[T].dispose(), this.color[T] = null;
                this._color_rb && (O.deleteRenderbuffer(this._color_rb), this._color_rb = null);
              }
            };
          }, 2992: function(d, f, c) {
            var g = c(3387).sprintf, m = c(5171), x = c(1848), w = c(1085);
            d.exports = function(k, S, A) {
              var C = x(S) || "of unknown name (see npm glsl-shader-name)", D = "unknown type";
              A !== void 0 && (D = A === m.FRAGMENT_SHADER ? "fragment" : "vertex");
              for (var L = g(`Error compiling %s shader %s:
`, D, C), E = g("%s%s", L, k), P = k.split(`
`), I = {}, M = 0; M < P.length; M++) {
                var O = P[M];
                if (O !== "" && O !== "\0") {
                  var T = parseInt(O.split(":")[2]);
                  if (isNaN(T)) throw new Error(g("Could not parse error: %s", O));
                  I[T] = O;
                }
              }
              var z = w(S).split(`
`);
              for (M = 0; M < z.length; M++) if ((I[M + 3] || I[M + 2] || I[M + 1]) && (L += z[M] + `
`, I[M + 1])) {
                var F = I[M + 1];
                F = F.substr(F.split(":", 3).join(":").length + 1).trim(), L += g(`^^^ %s

`, F);
              }
              return { long: L.trim(), short: E.trim() };
            };
          }, 2510: function(d, f, c) {
            d.exports = function(E, P) {
              var I = E.gl, M = new A(E, w(I, S.vertex, S.fragment), w(I, S.pickVertex, S.pickFragment), k(I), k(I), k(I), k(I));
              return M.update(P), E.addObject(M), M;
            };
            var g = c(2478), m = c(7762), x = c(1888), w = c(9405), k = c(2762), S = c(6768);
            function A(E, P, I, M, O, T, z) {
              this.plot = E, this.shader = P, this.pickShader = I, this.positionBuffer = M, this.weightBuffer = O, this.colorBuffer = T, this.idBuffer = z, this.xData = [], this.yData = [], this.shape = [0, 0], this.bounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.pickOffset = 0;
            }
            var C, D = A.prototype, L = [0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1];
            D.draw = (C = [1, 0, 0, 0, 1, 0, 0, 0, 1], function() {
              var E = this.plot, P = this.shader, I = this.bounds, M = this.numVertices;
              if (!(M <= 0)) {
                var O = E.gl, T = E.dataBox, z = I[2] - I[0], F = I[3] - I[1], U = T[2] - T[0], V = T[3] - T[1];
                C[0] = 2 * z / U, C[4] = 2 * F / V, C[6] = 2 * (I[0] - T[0]) / U - 1, C[7] = 2 * (I[1] - T[1]) / V - 1, P.bind();
                var $ = P.uniforms;
                $.viewTransform = C, $.shape = this.shape;
                var q = P.attributes;
                this.positionBuffer.bind(), q.position.pointer(), this.weightBuffer.bind(), q.weight.pointer(O.UNSIGNED_BYTE, !1), this.colorBuffer.bind(), q.color.pointer(O.UNSIGNED_BYTE, !0), O.drawArrays(O.TRIANGLES, 0, M);
              }
            }), D.drawPick = /* @__PURE__ */ function() {
              var E = [1, 0, 0, 0, 1, 0, 0, 0, 1], P = [0, 0, 0, 0];
              return function(I) {
                var M = this.plot, O = this.pickShader, T = this.bounds, z = this.numVertices;
                if (!(z <= 0)) {
                  var F = M.gl, U = M.dataBox, V = T[2] - T[0], $ = T[3] - T[1], q = U[2] - U[0], K = U[3] - U[1];
                  E[0] = 2 * V / q, E[4] = 2 * $ / K, E[6] = 2 * (T[0] - U[0]) / q - 1, E[7] = 2 * (T[1] - U[1]) / K - 1;
                  for (var re = 0; re < 4; ++re) P[re] = I >> 8 * re & 255;
                  this.pickOffset = I, O.bind();
                  var Y = O.uniforms;
                  Y.viewTransform = E, Y.pickOffset = P, Y.shape = this.shape;
                  var te = O.attributes;
                  return this.positionBuffer.bind(), te.position.pointer(), this.weightBuffer.bind(), te.weight.pointer(F.UNSIGNED_BYTE, !1), this.idBuffer.bind(), te.pickId.pointer(F.UNSIGNED_BYTE, !1), F.drawArrays(F.TRIANGLES, 0, z), I + this.shape[0] * this.shape[1];
                }
              };
            }(), D.pick = function(E, P, I) {
              var M = this.pickOffset, O = this.shape[0] * this.shape[1];
              if (I < M || I >= M + O) return null;
              var T = I - M, z = this.xData, F = this.yData;
              return { object: this, pointId: T, dataCoord: [z[T % this.shape[0]], F[T / this.shape[0] | 0]] };
            }, D.update = function(E) {
              var P = (E = E || {}).shape || [0, 0], I = E.x || m(P[0]), M = E.y || m(P[1]), O = E.z || new Float32Array(P[0] * P[1]), T = E.zsmooth !== !1;
              this.xData = I, this.yData = M;
              var z, F, U, V, $ = E.colorLevels || [0], q = E.colorValues || [0, 0, 0, 1], K = $.length, re = this.bounds;
              T ? (z = re[0] = I[0], F = re[1] = M[0], U = re[2] = I[I.length - 1], V = re[3] = M[M.length - 1]) : (z = re[0] = I[0] + (I[1] - I[0]) / 2, F = re[1] = M[0] + (M[1] - M[0]) / 2, U = re[2] = I[I.length - 1] + (I[I.length - 1] - I[I.length - 2]) / 2, V = re[3] = M[M.length - 1] + (M[M.length - 1] - M[M.length - 2]) / 2);
              var Y = 1 / (U - z), te = 1 / (V - F), ee = P[0], X = P[1];
              this.shape = [ee, X];
              var Q = (T ? (ee - 1) * (X - 1) : ee * X) * (L.length >>> 1);
              this.numVertices = Q;
              for (var ue = x.mallocUint8(4 * Q), ce = x.mallocFloat32(2 * Q), he = x.mallocUint8(2 * Q), de = x.mallocUint32(Q), ne = 0, ae = T ? ee - 1 : ee, se = T ? X - 1 : X, me = 0; me < se; ++me) {
                var ye, pe;
                T ? (ye = te * (M[me] - F), pe = te * (M[me + 1] - F)) : (ye = me < X - 1 ? te * (M[me] - (M[me + 1] - M[me]) / 2 - F) : te * (M[me] - (M[me] - M[me - 1]) / 2 - F), pe = me < X - 1 ? te * (M[me] + (M[me + 1] - M[me]) / 2 - F) : te * (M[me] + (M[me] - M[me - 1]) / 2 - F));
                for (var be = 0; be < ae; ++be) {
                  var Ae, Se;
                  T ? (Ae = Y * (I[be] - z), Se = Y * (I[be + 1] - z)) : (Ae = be < ee - 1 ? Y * (I[be] - (I[be + 1] - I[be]) / 2 - z) : Y * (I[be] - (I[be] - I[be - 1]) / 2 - z), Se = be < ee - 1 ? Y * (I[be] + (I[be + 1] - I[be]) / 2 - z) : Y * (I[be] + (I[be] - I[be - 1]) / 2 - z));
                  for (var Me = 0; Me < L.length; Me += 2) {
                    var De, Le, We, Ee, Ne = L[Me], Ie = L[Me + 1], ge = O[T ? (me + Ie) * ee + (be + Ne) : me * ee + be], Ce = g.le($, ge);
                    if (Ce < 0) De = q[0], Le = q[1], We = q[2], Ee = q[3];
                    else if (Ce === K - 1) De = q[4 * K - 4], Le = q[4 * K - 3], We = q[4 * K - 2], Ee = q[4 * K - 1];
                    else {
                      var we = (ge - $[Ce]) / ($[Ce + 1] - $[Ce]), Ge = 1 - we, Re = 4 * Ce, je = 4 * (Ce + 1);
                      De = Ge * q[Re] + we * q[je], Le = Ge * q[Re + 1] + we * q[je + 1], We = Ge * q[Re + 2] + we * q[je + 2], Ee = Ge * q[Re + 3] + we * q[je + 3];
                    }
                    ue[4 * ne] = 255 * De, ue[4 * ne + 1] = 255 * Le, ue[4 * ne + 2] = 255 * We, ue[4 * ne + 3] = 255 * Ee, ce[2 * ne] = 0.5 * Ae + 0.5 * Se, ce[2 * ne + 1] = 0.5 * ye + 0.5 * pe, he[2 * ne] = Ne, he[2 * ne + 1] = Ie, de[ne] = me * ee + be, ne += 1;
                  }
                }
              }
              this.positionBuffer.update(ce), this.weightBuffer.update(he), this.colorBuffer.update(ue), this.idBuffer.update(de), x.free(ce), x.free(ue), x.free(he), x.free(de);
            }, D.dispose = function() {
              this.shader.dispose(), this.pickShader.dispose(), this.positionBuffer.dispose(), this.weightBuffer.dispose(), this.colorBuffer.dispose(), this.idBuffer.dispose(), this.plot.removeObject(this);
            };
          }, 6768: function(d, f, c) {
            var g = c(3236);
            d.exports = { fragment: g([`precision lowp float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);
}
`]), vertex: g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 color;
attribute vec2 weight;

uniform vec2 shape;
uniform mat3 viewTransform;

varying vec4 fragColor;

void main() {
  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
  fragColor = color;
  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]), pickFragment: g([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragId;
varying vec2 vWeight;

uniform vec2 shape;
uniform vec4 pickOffset;

void main() {
  vec2 d = step(.5, vWeight);
  vec4 id = fragId + pickOffset;
  id.x += d.x + d.y*shape.x;

  id.y += floor(id.x / 256.0);
  id.x -= floor(id.x / 256.0) * 256.0;

  id.z += floor(id.y / 256.0);
  id.y -= floor(id.y / 256.0) * 256.0;

  id.w += floor(id.z / 256.0);
  id.z -= floor(id.z / 256.0) * 256.0;

  gl_FragColor = id/255.;
}
`]), pickVertex: g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 pickId;
attribute vec2 weight;

uniform vec2 shape;
uniform mat3 viewTransform;

varying vec4 fragId;
varying vec2 vWeight;

void main() {
  vWeight = weight;

  fragId = pickId;

  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);
  gl_Position = vec4(vPosition.xy, 0, vPosition.z);
}
`]) };
          }, 7319: function(d, f, c) {
            var g = c(3236), m = c(9405), x = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;

uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;

varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;

vec4 project(vec3 p) {
  return projection * (view * (model * vec4(p, 1.0)));
}

void main() {
  vec4 startPoint = project(position);
  vec4 endPoint   = project(nextPosition);

  vec2 A = startPoint.xy / startPoint.w;
  vec2 B =   endPoint.xy /   endPoint.w;

  float clipAngle = atan(
    (B.y - A.y) * screenShape.y,
    (B.x - A.x) * screenShape.x
  );

  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
    sin(clipAngle),
    -cos(clipAngle)
  ) / screenShape;

  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);

  worldPosition = position;
  pixelArcLength = arcLength;
  fragColor = color;
}
`]), w = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3      clipBounds[2];
uniform sampler2D dashTexture;
uniform float     dashScale;
uniform float     opacity;

varying vec3    worldPosition;
varying float   pixelArcLength;
varying vec4    fragColor;

void main() {
  if (
    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
    fragColor.a * opacity == 0.
  ) discard;

  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
  if(dashWeight < 0.5) {
    discard;
  }
  gl_FragColor = fragColor * opacity;
}
`]), k = g([`precision highp float;
#define GLSLIFY 1

#define FLOAT_MAX  1.70141184e38
#define FLOAT_MIN  1.17549435e-38

// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
vec4 packFloat(float v) {
  float av = abs(v);

  //Handle special cases
  if(av < FLOAT_MIN) {
    return vec4(0.0, 0.0, 0.0, 0.0);
  } else if(v > FLOAT_MAX) {
    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
  } else if(v < -FLOAT_MAX) {
    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
  }

  vec4 c = vec4(0,0,0,0);

  //Compute exponent and mantissa
  float e = floor(log2(av));
  float m = av * pow(2.0, -e) - 1.0;

  //Unpack mantissa
  c[1] = floor(128.0 * m);
  m -= c[1] / 128.0;
  c[2] = floor(32768.0 * m);
  m -= c[2] / 32768.0;
  c[3] = floor(8388608.0 * m);

  //Unpack exponent
  float ebias = e + 127.0;
  c[0] = floor(ebias / 2.0);
  ebias -= c[0] * 2.0;
  c[1] += floor(ebias) * 128.0;

  //Unpack sign bit
  c[0] += 128.0 * step(0.0, -v);

  //Scale back to range
  return c / 255.0;
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform float pickId;
uniform vec3 clipBounds[2];

varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;

  gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
}`]), S = [{ name: "position", type: "vec3" }, { name: "nextPosition", type: "vec3" }, { name: "arcLength", type: "float" }, { name: "lineWidth", type: "float" }, { name: "color", type: "vec4" }];
            f.createShader = function(A) {
              return m(A, x, w, null, S);
            }, f.createPickShader = function(A) {
              return m(A, x, k, null, S);
            };
          }, 5714: function(d, f, c) {
            d.exports = function(z) {
              var F = z.gl || z.scene && z.scene.gl, U = D(F);
              U.attributes.position.location = 0, U.attributes.nextPosition.location = 1, U.attributes.arcLength.location = 2, U.attributes.lineWidth.location = 3, U.attributes.color.location = 4;
              var V = L(F);
              V.attributes.position.location = 0, V.attributes.nextPosition.location = 1, V.attributes.arcLength.location = 2, V.attributes.lineWidth.location = 3, V.attributes.color.location = 4;
              for (var $ = g(F), q = m(F, [{ buffer: $, size: 3, offset: 0, stride: 48 }, { buffer: $, size: 3, offset: 12, stride: 48 }, { buffer: $, size: 1, offset: 24, stride: 48 }, { buffer: $, size: 1, offset: 28, stride: 48 }, { buffer: $, size: 4, offset: 32, stride: 48 }]), K = A(new Array(1024), [256, 1, 4]), re = 0; re < 1024; ++re) K.data[re] = 255;
              var Y = x(F, K);
              Y.wrap = F.REPEAT;
              var te = new O(F, U, V, $, q, Y);
              return te.update(z), te;
            };
            var g = c(2762), m = c(8116), x = c(7766), w = new Uint8Array(4), k = new Float32Array(w.buffer), S = c(2478), A = c(9618), C = c(7319), D = C.createShader, L = C.createPickShader, E = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
            function P(z, F) {
              for (var U = 0, V = 0; V < 3; ++V) {
                var $ = z[V] - F[V];
                U += $ * $;
              }
              return Math.sqrt(U);
            }
            function I(z) {
              for (var F = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], U = 0; U < 3; ++U) F[0][U] = Math.max(z[0][U], F[0][U]), F[1][U] = Math.min(z[1][U], F[1][U]);
              return F;
            }
            function M(z, F, U, V) {
              this.arcLength = z, this.position = F, this.index = U, this.dataCoordinate = V;
            }
            function O(z, F, U, V, $, q) {
              this.gl = z, this.shader = F, this.pickShader = U, this.buffer = V, this.vao = $, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.points = [], this.arcLength = [], this.vertexCount = 0, this.bounds = [[0, 0, 0], [0, 0, 0]], this.pickId = 0, this.lineWidth = 1, this.texture = q, this.dashScale = 1, this.opacity = 1, this.hasAlpha = !1, this.dirty = !0, this.pixelRatio = 1;
            }
            var T = O.prototype;
            T.isTransparent = function() {
              return this.hasAlpha;
            }, T.isOpaque = function() {
              return !this.hasAlpha;
            }, T.pickSlots = 1, T.setPickBase = function(z) {
              this.pickId = z;
            }, T.drawTransparent = T.draw = function(z) {
              if (this.vertexCount) {
                var F = this.gl, U = this.shader, V = this.vao;
                U.bind(), U.uniforms = { model: z.model || E, view: z.view || E, projection: z.projection || E, clipBounds: I(this.clipBounds), dashTexture: this.texture.bind(), dashScale: this.dashScale / this.arcLength[this.arcLength.length - 1], opacity: this.opacity, screenShape: [F.drawingBufferWidth, F.drawingBufferHeight], pixelRatio: this.pixelRatio }, V.bind(), V.draw(F.TRIANGLE_STRIP, this.vertexCount), V.unbind();
              }
            }, T.drawPick = function(z) {
              if (this.vertexCount) {
                var F = this.gl, U = this.pickShader, V = this.vao;
                U.bind(), U.uniforms = { model: z.model || E, view: z.view || E, projection: z.projection || E, pickId: this.pickId, clipBounds: I(this.clipBounds), screenShape: [F.drawingBufferWidth, F.drawingBufferHeight], pixelRatio: this.pixelRatio }, V.bind(), V.draw(F.TRIANGLE_STRIP, this.vertexCount), V.unbind();
              }
            }, T.update = function(z) {
              var F, U;
              this.dirty = !0;
              var V = !!z.connectGaps;
              "dashScale" in z && (this.dashScale = z.dashScale), this.hasAlpha = !1, "opacity" in z && (this.opacity = +z.opacity, this.opacity < 1 && (this.hasAlpha = !0));
              var $ = [], q = [], K = [], re = 0, Y = 0, te = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], ee = z.position || z.positions;
              if (ee) {
                var X = z.color || z.colors || [0, 0, 0, 1], Q = z.lineWidth || 1, ue = !1;
                e: for (F = 1; F < ee.length; ++F) {
                  var ce, he, de, ne = ee[F - 1], ae = ee[F];
                  for (q.push(re), K.push(ne.slice()), U = 0; U < 3; ++U) {
                    if (isNaN(ne[U]) || isNaN(ae[U]) || !isFinite(ne[U]) || !isFinite(ae[U])) {
                      if (!V && $.length > 0) {
                        for (var se = 0; se < 24; ++se) $.push($[$.length - 12]);
                        Y += 2, ue = !0;
                      }
                      continue e;
                    }
                    te[0][U] = Math.min(te[0][U], ne[U], ae[U]), te[1][U] = Math.max(te[1][U], ne[U], ae[U]);
                  }
                  Array.isArray(X[0]) ? (ce = X.length > F - 1 ? X[F - 1] : X.length > 0 ? X[X.length - 1] : [0, 0, 0, 1], he = X.length > F ? X[F] : X.length > 0 ? X[X.length - 1] : [0, 0, 0, 1]) : ce = he = X, ce.length === 3 && (ce = [ce[0], ce[1], ce[2], 1]), he.length === 3 && (he = [he[0], he[1], he[2], 1]), !this.hasAlpha && ce[3] < 1 && (this.hasAlpha = !0), de = Array.isArray(Q) ? Q.length > F - 1 ? Q[F - 1] : Q.length > 0 ? Q[Q.length - 1] : [0, 0, 0, 1] : Q;
                  var me = re;
                  if (re += P(ne, ae), ue) {
                    for (U = 0; U < 2; ++U) $.push(ne[0], ne[1], ne[2], ae[0], ae[1], ae[2], me, de, ce[0], ce[1], ce[2], ce[3]);
                    Y += 2, ue = !1;
                  }
                  $.push(ne[0], ne[1], ne[2], ae[0], ae[1], ae[2], me, de, ce[0], ce[1], ce[2], ce[3], ne[0], ne[1], ne[2], ae[0], ae[1], ae[2], me, -de, ce[0], ce[1], ce[2], ce[3], ae[0], ae[1], ae[2], ne[0], ne[1], ne[2], re, -de, he[0], he[1], he[2], he[3], ae[0], ae[1], ae[2], ne[0], ne[1], ne[2], re, de, he[0], he[1], he[2], he[3]), Y += 4;
                }
              }
              if (this.buffer.update($), q.push(re), K.push(ee[ee.length - 1].slice()), this.bounds = te, this.vertexCount = Y, this.points = K, this.arcLength = q, "dashes" in z) {
                var ye = z.dashes.slice();
                for (ye.unshift(0), F = 1; F < ye.length; ++F) ye[F] = ye[F - 1] + ye[F];
                var pe = A(new Array(1024), [256, 1, 4]);
                for (F = 0; F < 256; ++F) {
                  for (U = 0; U < 4; ++U) pe.set(F, 0, U, 0);
                  1 & S.le(ye, ye[ye.length - 1] * F / 255) ? pe.set(F, 0, 0, 0) : pe.set(F, 0, 0, 255);
                }
                this.texture.setPixels(pe);
              }
            }, T.dispose = function() {
              this.shader.dispose(), this.vao.dispose(), this.buffer.dispose();
            }, T.pick = function(z) {
              if (!z || z.id !== this.pickId) return null;
              var F = function(ee, X, Q, ue) {
                return w[0] = 0, w[1] = Q, w[2] = X, w[3] = ee, k[0];
              }(z.value[0], z.value[1], z.value[2]), U = S.le(this.arcLength, F);
              if (U < 0) return null;
              if (U === this.arcLength.length - 1) return new M(this.arcLength[this.arcLength.length - 1], this.points[this.points.length - 1].slice(), U);
              for (var V = this.points[U], $ = this.points[Math.min(U + 1, this.points.length - 1)], q = (F - this.arcLength[U]) / (this.arcLength[U + 1] - this.arcLength[U]), K = 1 - q, re = [0, 0, 0], Y = 0; Y < 3; ++Y) re[Y] = K * V[Y] + q * $[Y];
              var te = Math.min(q < 0.5 ? U : U + 1, this.points.length - 1);
              return new M(F, re, te, this.points[te]);
            };
          }, 1903: function(d) {
            d.exports = function(f) {
              var c = new Float32Array(16);
              return c[0] = f[0], c[1] = f[1], c[2] = f[2], c[3] = f[3], c[4] = f[4], c[5] = f[5], c[6] = f[6], c[7] = f[7], c[8] = f[8], c[9] = f[9], c[10] = f[10], c[11] = f[11], c[12] = f[12], c[13] = f[13], c[14] = f[14], c[15] = f[15], c;
            };
          }, 6864: function(d) {
            d.exports = function() {
              var f = new Float32Array(16);
              return f[0] = 1, f[1] = 0, f[2] = 0, f[3] = 0, f[4] = 0, f[5] = 1, f[6] = 0, f[7] = 0, f[8] = 0, f[9] = 0, f[10] = 1, f[11] = 0, f[12] = 0, f[13] = 0, f[14] = 0, f[15] = 1, f;
            };
          }, 9921: function(d) {
            d.exports = function(f) {
              var c = f[0], g = f[1], m = f[2], x = f[3], w = f[4], k = f[5], S = f[6], A = f[7], C = f[8], D = f[9], L = f[10], E = f[11], P = f[12], I = f[13], M = f[14], O = f[15];
              return (c * k - g * w) * (L * O - E * M) - (c * S - m * w) * (D * O - E * I) + (c * A - x * w) * (D * M - L * I) + (g * S - m * k) * (C * O - E * P) - (g * A - x * k) * (C * M - L * P) + (m * A - x * S) * (C * I - D * P);
            };
          }, 7399: function(d) {
            d.exports = function(f, c) {
              var g = c[0], m = c[1], x = c[2], w = c[3], k = g + g, S = m + m, A = x + x, C = g * k, D = m * k, L = m * S, E = x * k, P = x * S, I = x * A, M = w * k, O = w * S, T = w * A;
              return f[0] = 1 - L - I, f[1] = D + T, f[2] = E - O, f[3] = 0, f[4] = D - T, f[5] = 1 - C - I, f[6] = P + M, f[7] = 0, f[8] = E + O, f[9] = P - M, f[10] = 1 - C - L, f[11] = 0, f[12] = 0, f[13] = 0, f[14] = 0, f[15] = 1, f;
            };
          }, 6743: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = c[3], S = m + m, A = x + x, C = w + w, D = m * S, L = m * A, E = m * C, P = x * A, I = x * C, M = w * C, O = k * S, T = k * A, z = k * C;
              return f[0] = 1 - (P + M), f[1] = L + z, f[2] = E - T, f[3] = 0, f[4] = L - z, f[5] = 1 - (D + M), f[6] = I + O, f[7] = 0, f[8] = E + T, f[9] = I - O, f[10] = 1 - (D + P), f[11] = 0, f[12] = g[0], f[13] = g[1], f[14] = g[2], f[15] = 1, f;
            };
          }, 7894: function(d) {
            d.exports = function(f) {
              return f[0] = 1, f[1] = 0, f[2] = 0, f[3] = 0, f[4] = 0, f[5] = 1, f[6] = 0, f[7] = 0, f[8] = 0, f[9] = 0, f[10] = 1, f[11] = 0, f[12] = 0, f[13] = 0, f[14] = 0, f[15] = 1, f;
            };
          }, 7608: function(d) {
            d.exports = function(f, c) {
              var g = c[0], m = c[1], x = c[2], w = c[3], k = c[4], S = c[5], A = c[6], C = c[7], D = c[8], L = c[9], E = c[10], P = c[11], I = c[12], M = c[13], O = c[14], T = c[15], z = g * S - m * k, F = g * A - x * k, U = g * C - w * k, V = m * A - x * S, $ = m * C - w * S, q = x * C - w * A, K = D * M - L * I, re = D * O - E * I, Y = D * T - P * I, te = L * O - E * M, ee = L * T - P * M, X = E * T - P * O, Q = z * X - F * ee + U * te + V * Y - $ * re + q * K;
              return Q ? (Q = 1 / Q, f[0] = (S * X - A * ee + C * te) * Q, f[1] = (x * ee - m * X - w * te) * Q, f[2] = (M * q - O * $ + T * V) * Q, f[3] = (E * $ - L * q - P * V) * Q, f[4] = (A * Y - k * X - C * re) * Q, f[5] = (g * X - x * Y + w * re) * Q, f[6] = (O * U - I * q - T * F) * Q, f[7] = (D * q - E * U + P * F) * Q, f[8] = (k * ee - S * Y + C * K) * Q, f[9] = (m * Y - g * ee - w * K) * Q, f[10] = (I * $ - M * U + T * z) * Q, f[11] = (L * U - D * $ - P * z) * Q, f[12] = (S * re - k * te - A * K) * Q, f[13] = (g * te - m * re + x * K) * Q, f[14] = (M * F - I * V - O * z) * Q, f[15] = (D * V - L * F + E * z) * Q, f) : null;
            };
          }, 6582: function(d, f, c) {
            var g = c(7894);
            d.exports = function(m, x, w, k) {
              var S, A, C, D, L, E, P, I, M, O, T = x[0], z = x[1], F = x[2], U = k[0], V = k[1], $ = k[2], q = w[0], K = w[1], re = w[2];
              return Math.abs(T - q) < 1e-6 && Math.abs(z - K) < 1e-6 && Math.abs(F - re) < 1e-6 ? g(m) : (P = T - q, I = z - K, M = F - re, S = V * (M *= O = 1 / Math.sqrt(P * P + I * I + M * M)) - $ * (I *= O), A = $ * (P *= O) - U * M, C = U * I - V * P, (O = Math.sqrt(S * S + A * A + C * C)) ? (S *= O = 1 / O, A *= O, C *= O) : (S = 0, A = 0, C = 0), D = I * C - M * A, L = M * S - P * C, E = P * A - I * S, (O = Math.sqrt(D * D + L * L + E * E)) ? (D *= O = 1 / O, L *= O, E *= O) : (D = 0, L = 0, E = 0), m[0] = S, m[1] = D, m[2] = P, m[3] = 0, m[4] = A, m[5] = L, m[6] = I, m[7] = 0, m[8] = C, m[9] = E, m[10] = M, m[11] = 0, m[12] = -(S * T + A * z + C * F), m[13] = -(D * T + L * z + E * F), m[14] = -(P * T + I * z + M * F), m[15] = 1, m);
            };
          }, 6760: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = c[3], S = c[4], A = c[5], C = c[6], D = c[7], L = c[8], E = c[9], P = c[10], I = c[11], M = c[12], O = c[13], T = c[14], z = c[15], F = g[0], U = g[1], V = g[2], $ = g[3];
              return f[0] = F * m + U * S + V * L + $ * M, f[1] = F * x + U * A + V * E + $ * O, f[2] = F * w + U * C + V * P + $ * T, f[3] = F * k + U * D + V * I + $ * z, F = g[4], U = g[5], V = g[6], $ = g[7], f[4] = F * m + U * S + V * L + $ * M, f[5] = F * x + U * A + V * E + $ * O, f[6] = F * w + U * C + V * P + $ * T, f[7] = F * k + U * D + V * I + $ * z, F = g[8], U = g[9], V = g[10], $ = g[11], f[8] = F * m + U * S + V * L + $ * M, f[9] = F * x + U * A + V * E + $ * O, f[10] = F * w + U * C + V * P + $ * T, f[11] = F * k + U * D + V * I + $ * z, F = g[12], U = g[13], V = g[14], $ = g[15], f[12] = F * m + U * S + V * L + $ * M, f[13] = F * x + U * A + V * E + $ * O, f[14] = F * w + U * C + V * P + $ * T, f[15] = F * k + U * D + V * I + $ * z, f;
            };
          }, 4040: function(d) {
            d.exports = function(f, c, g, m, x, w, k) {
              var S = 1 / (c - g), A = 1 / (m - x), C = 1 / (w - k);
              return f[0] = -2 * S, f[1] = 0, f[2] = 0, f[3] = 0, f[4] = 0, f[5] = -2 * A, f[6] = 0, f[7] = 0, f[8] = 0, f[9] = 0, f[10] = 2 * C, f[11] = 0, f[12] = (c + g) * S, f[13] = (x + m) * A, f[14] = (k + w) * C, f[15] = 1, f;
            };
          }, 4772: function(d) {
            d.exports = function(f, c, g, m, x) {
              var w = 1 / Math.tan(c / 2), k = 1 / (m - x);
              return f[0] = w / g, f[1] = 0, f[2] = 0, f[3] = 0, f[4] = 0, f[5] = w, f[6] = 0, f[7] = 0, f[8] = 0, f[9] = 0, f[10] = (x + m) * k, f[11] = -1, f[12] = 0, f[13] = 0, f[14] = 2 * x * m * k, f[15] = 0, f;
            };
          }, 6079: function(d) {
            d.exports = function(f, c, g, m) {
              var x, w, k, S, A, C, D, L, E, P, I, M, O, T, z, F, U, V, $, q, K, re, Y, te, ee = m[0], X = m[1], Q = m[2], ue = Math.sqrt(ee * ee + X * X + Q * Q);
              return Math.abs(ue) < 1e-6 ? null : (ee *= ue = 1 / ue, X *= ue, Q *= ue, x = Math.sin(g), k = 1 - (w = Math.cos(g)), S = c[0], A = c[1], C = c[2], D = c[3], L = c[4], E = c[5], P = c[6], I = c[7], M = c[8], O = c[9], T = c[10], z = c[11], F = ee * ee * k + w, U = X * ee * k + Q * x, V = Q * ee * k - X * x, $ = ee * X * k - Q * x, q = X * X * k + w, K = Q * X * k + ee * x, re = ee * Q * k + X * x, Y = X * Q * k - ee * x, te = Q * Q * k + w, f[0] = S * F + L * U + M * V, f[1] = A * F + E * U + O * V, f[2] = C * F + P * U + T * V, f[3] = D * F + I * U + z * V, f[4] = S * $ + L * q + M * K, f[5] = A * $ + E * q + O * K, f[6] = C * $ + P * q + T * K, f[7] = D * $ + I * q + z * K, f[8] = S * re + L * Y + M * te, f[9] = A * re + E * Y + O * te, f[10] = C * re + P * Y + T * te, f[11] = D * re + I * Y + z * te, c !== f && (f[12] = c[12], f[13] = c[13], f[14] = c[14], f[15] = c[15]), f);
            };
          }, 5567: function(d) {
            d.exports = function(f, c, g) {
              var m = Math.sin(g), x = Math.cos(g), w = c[4], k = c[5], S = c[6], A = c[7], C = c[8], D = c[9], L = c[10], E = c[11];
              return c !== f && (f[0] = c[0], f[1] = c[1], f[2] = c[2], f[3] = c[3], f[12] = c[12], f[13] = c[13], f[14] = c[14], f[15] = c[15]), f[4] = w * x + C * m, f[5] = k * x + D * m, f[6] = S * x + L * m, f[7] = A * x + E * m, f[8] = C * x - w * m, f[9] = D * x - k * m, f[10] = L * x - S * m, f[11] = E * x - A * m, f;
            };
          }, 2408: function(d) {
            d.exports = function(f, c, g) {
              var m = Math.sin(g), x = Math.cos(g), w = c[0], k = c[1], S = c[2], A = c[3], C = c[8], D = c[9], L = c[10], E = c[11];
              return c !== f && (f[4] = c[4], f[5] = c[5], f[6] = c[6], f[7] = c[7], f[12] = c[12], f[13] = c[13], f[14] = c[14], f[15] = c[15]), f[0] = w * x - C * m, f[1] = k * x - D * m, f[2] = S * x - L * m, f[3] = A * x - E * m, f[8] = w * m + C * x, f[9] = k * m + D * x, f[10] = S * m + L * x, f[11] = A * m + E * x, f;
            };
          }, 7089: function(d) {
            d.exports = function(f, c, g) {
              var m = Math.sin(g), x = Math.cos(g), w = c[0], k = c[1], S = c[2], A = c[3], C = c[4], D = c[5], L = c[6], E = c[7];
              return c !== f && (f[8] = c[8], f[9] = c[9], f[10] = c[10], f[11] = c[11], f[12] = c[12], f[13] = c[13], f[14] = c[14], f[15] = c[15]), f[0] = w * x + C * m, f[1] = k * x + D * m, f[2] = S * x + L * m, f[3] = A * x + E * m, f[4] = C * x - w * m, f[5] = D * x - k * m, f[6] = L * x - S * m, f[7] = E * x - A * m, f;
            };
          }, 2504: function(d) {
            d.exports = function(f, c, g) {
              var m = g[0], x = g[1], w = g[2];
              return f[0] = c[0] * m, f[1] = c[1] * m, f[2] = c[2] * m, f[3] = c[3] * m, f[4] = c[4] * x, f[5] = c[5] * x, f[6] = c[6] * x, f[7] = c[7] * x, f[8] = c[8] * w, f[9] = c[9] * w, f[10] = c[10] * w, f[11] = c[11] * w, f[12] = c[12], f[13] = c[13], f[14] = c[14], f[15] = c[15], f;
            };
          }, 7656: function(d) {
            d.exports = function(f, c, g) {
              var m, x, w, k, S, A, C, D, L, E, P, I, M = g[0], O = g[1], T = g[2];
              return c === f ? (f[12] = c[0] * M + c[4] * O + c[8] * T + c[12], f[13] = c[1] * M + c[5] * O + c[9] * T + c[13], f[14] = c[2] * M + c[6] * O + c[10] * T + c[14], f[15] = c[3] * M + c[7] * O + c[11] * T + c[15]) : (m = c[0], x = c[1], w = c[2], k = c[3], S = c[4], A = c[5], C = c[6], D = c[7], L = c[8], E = c[9], P = c[10], I = c[11], f[0] = m, f[1] = x, f[2] = w, f[3] = k, f[4] = S, f[5] = A, f[6] = C, f[7] = D, f[8] = L, f[9] = E, f[10] = P, f[11] = I, f[12] = m * M + S * O + L * T + c[12], f[13] = x * M + A * O + E * T + c[13], f[14] = w * M + C * O + P * T + c[14], f[15] = k * M + D * O + I * T + c[15]), f;
            };
          }, 5665: function(d) {
            d.exports = function(f, c) {
              if (f === c) {
                var g = c[1], m = c[2], x = c[3], w = c[6], k = c[7], S = c[11];
                f[1] = c[4], f[2] = c[8], f[3] = c[12], f[4] = g, f[6] = c[9], f[7] = c[13], f[8] = m, f[9] = w, f[11] = c[14], f[12] = x, f[13] = k, f[14] = S;
              } else f[0] = c[0], f[1] = c[4], f[2] = c[8], f[3] = c[12], f[4] = c[1], f[5] = c[5], f[6] = c[9], f[7] = c[13], f[8] = c[2], f[9] = c[6], f[10] = c[10], f[11] = c[14], f[12] = c[3], f[13] = c[7], f[14] = c[11], f[15] = c[15];
              return f;
            };
          }, 7626: function(d, f, c) {
            var g = c(2642), m = c(9346);
            function x(S, A) {
              for (var C = [0, 0, 0, 0], D = 0; D < 4; ++D) for (var L = 0; L < 4; ++L) C[L] += S[4 * D + L] * A[D];
              return C;
            }
            function w(S, A, C, D, L) {
              for (var E = x(D, x(C, x(A, [S[0], S[1], S[2], 1]))), P = 0; P < 3; ++P) E[P] /= E[3];
              return [0.5 * L[0] * (1 + E[0]), 0.5 * L[1] * (1 - E[1])];
            }
            function k(S, A) {
              for (var C = [0, 0, 0], D = 0; D < S.length; ++D) for (var L = S[D], E = A[D], P = 0; P < 3; ++P) C[P] += E * L[P];
              return C;
            }
            d.exports = function(S, A, C, D, L, E) {
              if (S.length === 1) return [0, S[0].slice()];
              for (var P = new Array(S.length), I = 0; I < S.length; ++I) P[I] = w(S[I], C, D, L, E);
              var M = 0, O = 1 / 0;
              for (I = 0; I < P.length; ++I) {
                for (var T = 0, z = 0; z < 2; ++z) T += Math.pow(P[I][z] - A[z], 2);
                T < O && (O = T, M = I);
              }
              var F = function(V, $) {
                if (V.length === 2) {
                  for (var q = 0, K = 0, re = 0; re < 2; ++re) q += Math.pow($[re] - V[0][re], 2), K += Math.pow($[re] - V[1][re], 2);
                  return (q = Math.sqrt(q)) + (K = Math.sqrt(K)) < 1e-6 ? [1, 0] : [K / (q + K), q / (K + q)];
                }
                if (V.length === 3) {
                  var Y = [0, 0];
                  return m(V[0], V[1], V[2], $, Y), g(V, Y);
                }
                return [];
              }(P, A), U = 0;
              for (I = 0; I < 3; ++I) {
                if (F[I] < -1e-3 || F[I] > 1.0001) return null;
                U += F[I];
              }
              return Math.abs(U - 1) > 1e-3 ? null : [M, k(S, F), F];
            };
          }, 840: function(d, f, c) {
            var g = c(3236), m = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, normal;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model
           , view
           , projection
           , inverseModel;
uniform vec3 eyePosition
           , lightPosition;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

vec4 project(vec3 p) {
  return projection * (view * (model * vec4(p, 1.0)));
}

void main() {
  gl_Position      = project(position);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * vec4(position , 1.0);
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  f_color          = color;
  f_data           = position;
  f_uv             = uv;
}
`]), x = g([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness
            , fresnel
            , kambient
            , kdiffuse
            , kspecular;
uniform sampler2D texture;

varying vec3 f_normal
           , f_lightDirection
           , f_eyeDirection
           , f_data;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (f_color.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], f_data)
  ) discard;

  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d

  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * f_color.a;
}
`]), w = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;

uniform mat4 model, view, projection;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
  f_color = color;
  f_data  = position;
  f_uv    = uv;
}`]), k = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;

  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]), S = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
attribute float pointSize;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
  } else {
    gl_Position = projection * (view * (model * vec4(position, 1.0)));
  }
  gl_PointSize = pointSize;
  f_color = color;
  f_uv = uv;
}`]), A = g([`precision highp float;
#define GLSLIFY 1

uniform sampler2D texture;
uniform float opacity;

varying vec4 f_color;
varying vec2 f_uv;

void main() {
  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
  if(dot(pointR, pointR) > 0.25) {
    discard;
  }
  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]), C = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;
attribute vec4 id;

uniform mat4 model, view, projection;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
  f_id        = id;
  f_position  = position;
}`]), D = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]), L = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3  position;
attribute float pointSize;
attribute vec4  id;

uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
  } else {
    gl_Position  = projection * (view * (model * vec4(position, 1.0)));
    gl_PointSize = pointSize;
  }
  f_id         = id;
  f_position   = position;
}`]), E = g([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;

void main() {
  gl_Position = projection * (view * (model * vec4(position, 1.0)));
}`]), P = g([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);
            f.meshShader = { vertex: m, fragment: x, attributes: [{ name: "position", type: "vec3" }, { name: "normal", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }] }, f.wireShader = { vertex: w, fragment: k, attributes: [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }] }, f.pointShader = { vertex: S, fragment: A, attributes: [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "pointSize", type: "float" }] }, f.pickShader = { vertex: C, fragment: D, attributes: [{ name: "position", type: "vec3" }, { name: "id", type: "vec4" }] }, f.pointPickShader = { vertex: L, fragment: D, attributes: [{ name: "position", type: "vec3" }, { name: "pointSize", type: "float" }, { name: "id", type: "vec4" }] }, f.contourShader = { vertex: E, fragment: P, attributes: [{ name: "position", type: "vec3" }] };
          }, 7201: function(d, f, c) {
            var g = c(9405), m = c(2762), x = c(8116), w = c(7766), k = c(8406), S = c(6760), A = c(7608), C = c(9618), D = c(6729), L = c(7765), E = c(1888), P = c(840), I = c(7626), M = P.meshShader, O = P.wireShader, T = P.pointShader, z = P.pickShader, F = P.pointPickShader, U = P.contourShader, V = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
            function $(X, Q, ue, ce, he, de, ne, ae, se, me, ye, pe, be, Ae, Se, Me, De, Le, We, Ee, Ne, Ie, ge, Ce, we, Ge, Re) {
              this.gl = X, this.pixelRatio = 1, this.cells = [], this.positions = [], this.intensity = [], this.texture = Q, this.dirty = !0, this.triShader = ue, this.lineShader = ce, this.pointShader = he, this.pickShader = de, this.pointPickShader = ne, this.contourShader = ae, this.trianglePositions = se, this.triangleColors = ye, this.triangleNormals = be, this.triangleUVs = pe, this.triangleIds = me, this.triangleVAO = Ae, this.triangleCount = 0, this.lineWidth = 1, this.edgePositions = Se, this.edgeColors = De, this.edgeUVs = Le, this.edgeIds = Me, this.edgeVAO = We, this.edgeCount = 0, this.pointPositions = Ee, this.pointColors = Ie, this.pointUVs = ge, this.pointSizes = Ce, this.pointIds = Ne, this.pointVAO = we, this.pointCount = 0, this.contourLineWidth = 1, this.contourPositions = Ge, this.contourVAO = Re, this.contourCount = 0, this.contourColor = [0, 0, 0], this.contourEnable = !0, this.pickVertex = !0, this.pickId = 1, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.lightPosition = [1e5, 1e5, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.opacity = 1, this.hasAlpha = !1, this.opacityscale = !1, this._model = V, this._view = V, this._projection = V, this._resolution = [1, 1];
            }
            var q = $.prototype;
            function K(X, Q) {
              if (!Q || !Q.length) return 1;
              for (var ue = 0; ue < Q.length; ++ue) {
                if (Q.length < 2) return 1;
                if (Q[ue][0] === X) return Q[ue][1];
                if (Q[ue][0] > X && ue > 0) {
                  var ce = (Q[ue][0] - X) / (Q[ue][0] - Q[ue - 1][0]);
                  return Q[ue][1] * (1 - ce) + ce * Q[ue - 1][1];
                }
              }
              return 1;
            }
            function re(X) {
              var Q = g(X, T.vertex, T.fragment);
              return Q.attributes.position.location = 0, Q.attributes.color.location = 2, Q.attributes.uv.location = 3, Q.attributes.pointSize.location = 4, Q;
            }
            function Y(X) {
              var Q = g(X, z.vertex, z.fragment);
              return Q.attributes.position.location = 0, Q.attributes.id.location = 1, Q;
            }
            function te(X) {
              var Q = g(X, F.vertex, F.fragment);
              return Q.attributes.position.location = 0, Q.attributes.id.location = 1, Q.attributes.pointSize.location = 4, Q;
            }
            function ee(X) {
              var Q = g(X, U.vertex, U.fragment);
              return Q.attributes.position.location = 0, Q;
            }
            q.isOpaque = function() {
              return !this.hasAlpha;
            }, q.isTransparent = function() {
              return this.hasAlpha;
            }, q.pickSlots = 1, q.setPickBase = function(X) {
              this.pickId = X;
            }, q.highlight = function(X) {
              if (X && this.contourEnable) {
                for (var Q = L(this.cells, this.intensity, X.intensity), ue = Q.cells, ce = Q.vertexIds, he = Q.vertexWeights, de = ue.length, ne = E.mallocFloat32(6 * de), ae = 0, se = 0; se < de; ++se) for (var me = ue[se], ye = 0; ye < 2; ++ye) {
                  var pe = me[0];
                  me.length === 2 && (pe = me[ye]);
                  for (var be = ce[pe][0], Ae = ce[pe][1], Se = he[pe], Me = 1 - Se, De = this.positions[be], Le = this.positions[Ae], We = 0; We < 3; ++We) ne[ae++] = Se * De[We] + Me * Le[We];
                }
                this.contourCount = ae / 3 | 0, this.contourPositions.update(ne.subarray(0, ae)), E.free(ne);
              } else this.contourCount = 0;
            }, q.update = function(X) {
              X = X || {};
              var Q = this.gl;
              this.dirty = !0, "contourEnable" in X && (this.contourEnable = X.contourEnable), "contourColor" in X && (this.contourColor = X.contourColor), "lineWidth" in X && (this.lineWidth = X.lineWidth), "lightPosition" in X && (this.lightPosition = X.lightPosition), this.hasAlpha = !1, "opacity" in X && (this.opacity = X.opacity, this.opacity < 1 && (this.hasAlpha = !0)), "opacityscale" in X && (this.opacityscale = X.opacityscale, this.hasAlpha = !0), "ambient" in X && (this.ambientLight = X.ambient), "diffuse" in X && (this.diffuseLight = X.diffuse), "specular" in X && (this.specularLight = X.specular), "roughness" in X && (this.roughness = X.roughness), "fresnel" in X && (this.fresnel = X.fresnel), X.texture ? (this.texture.dispose(), this.texture = w(Q, X.texture)) : X.colormap && (this.texture.shape = [256, 256], this.texture.minFilter = Q.LINEAR_MIPMAP_LINEAR, this.texture.magFilter = Q.LINEAR, this.texture.setPixels(function(Je, nt) {
                for (var ot = D({ colormap: Je, nshades: 256, format: "rgba" }), Ye = new Uint8Array(1024), Fe = 0; Fe < 256; ++Fe) {
                  for (var pt = ot[Fe], Mt = 0; Mt < 3; ++Mt) Ye[4 * Fe + Mt] = pt[Mt];
                  Ye[4 * Fe + 3] = nt ? 255 * K(Fe / 255, nt) : 255 * pt[3];
                }
                return C(Ye, [256, 256, 4], [4, 0, 1]);
              }(X.colormap, this.opacityscale)), this.texture.generateMipmap());
              var ue = X.cells, ce = X.positions;
              if (ce && ue) {
                var he = [], de = [], ne = [], ae = [], se = [], me = [], ye = [], pe = [], be = [], Ae = [], Se = [], Me = [], De = [], Le = [];
                this.cells = ue, this.positions = ce;
                var We = X.vertexNormals, Ee = X.cellNormals, Ne = X.vertexNormalsEpsilon === void 0 ? 1e-6 : X.vertexNormalsEpsilon, Ie = X.faceNormalsEpsilon === void 0 ? 1e-6 : X.faceNormalsEpsilon;
                X.useFacetNormals && !Ee && (Ee = k.faceNormals(ue, ce, Ie)), Ee || We || (We = k.vertexNormals(ue, ce, Ne));
                var ge = X.vertexColors, Ce = X.cellColors, we = X.meshColor || [1, 1, 1, 1], Ge = X.vertexUVs, Re = X.vertexIntensity, je = X.cellUVs, Ke = X.cellIntensity, tt = 1 / 0, _e = -1 / 0;
                if (!Ge && !je) if (Re) if (X.vertexIntensityBounds) tt = +X.vertexIntensityBounds[0], _e = +X.vertexIntensityBounds[1];
                else for (var Be = 0; Be < Re.length; ++Be) {
                  var $e = Re[Be];
                  tt = Math.min(tt, $e), _e = Math.max(_e, $e);
                }
                else if (Ke) if (X.cellIntensityBounds) tt = +X.cellIntensityBounds[0], _e = +X.cellIntensityBounds[1];
                else for (Be = 0; Be < Ke.length; ++Be) $e = Ke[Be], tt = Math.min(tt, $e), _e = Math.max(_e, $e);
                else for (Be = 0; Be < ce.length; ++Be) $e = ce[Be][2], tt = Math.min(tt, $e), _e = Math.max(_e, $e);
                this.intensity = Re || Ke || function(Je) {
                  for (var nt = Je.length, ot = new Array(nt), Ye = 0; Ye < nt; ++Ye) ot[Ye] = Je[Ye][2];
                  return ot;
                }(ce), this.pickVertex = !(Ke || Ce);
                var Ze = X.pointSizes, ct = X.pointSize || 1;
                for (this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], Be = 0; Be < ce.length; ++Be) for (var ft = ce[Be], _t = 0; _t < 3; ++_t) !isNaN(ft[_t]) && isFinite(ft[_t]) && (this.bounds[0][_t] = Math.min(this.bounds[0][_t], ft[_t]), this.bounds[1][_t] = Math.max(this.bounds[1][_t], ft[_t]));
                var Pt = 0, Dt = 0, $t = 0;
                e: for (Be = 0; Be < ue.length; ++Be) {
                  var Gt = ue[Be];
                  switch (Gt.length) {
                    case 1:
                      for (ft = ce[mt = Gt[0]], _t = 0; _t < 3; ++_t) if (isNaN(ft[_t]) || !isFinite(ft[_t])) continue e;
                      Ae.push(ft[0], ft[1], ft[2]), at = ge ? ge[mt] : Ce ? Ce[Be] : we, this.opacityscale && Re ? de.push(at[0], at[1], at[2], this.opacity * K((Re[mt] - tt) / (_e - tt), this.opacityscale)) : at.length === 3 ? Se.push(at[0], at[1], at[2], this.opacity) : (Se.push(at[0], at[1], at[2], at[3] * this.opacity), at[3] < 1 && (this.hasAlpha = !0)), vt = Ge ? Ge[mt] : Re ? [(Re[mt] - tt) / (_e - tt), 0] : je ? je[Be] : Ke ? [(Ke[Be] - tt) / (_e - tt), 0] : [(ft[2] - tt) / (_e - tt), 0], Me.push(vt[0], vt[1]), Ze ? De.push(Ze[mt]) : De.push(ct), Le.push(Be), $t += 1;
                      break;
                    case 2:
                      for (_t = 0; _t < 2; ++_t) {
                        ft = ce[mt = Gt[_t]];
                        for (var Wt = 0; Wt < 3; ++Wt) if (isNaN(ft[Wt]) || !isFinite(ft[Wt])) continue e;
                      }
                      for (_t = 0; _t < 2; ++_t) ft = ce[mt = Gt[_t]], me.push(ft[0], ft[1], ft[2]), at = ge ? ge[mt] : Ce ? Ce[Be] : we, this.opacityscale && Re ? de.push(at[0], at[1], at[2], this.opacity * K((Re[mt] - tt) / (_e - tt), this.opacityscale)) : at.length === 3 ? ye.push(at[0], at[1], at[2], this.opacity) : (ye.push(at[0], at[1], at[2], at[3] * this.opacity), at[3] < 1 && (this.hasAlpha = !0)), vt = Ge ? Ge[mt] : Re ? [(Re[mt] - tt) / (_e - tt), 0] : je ? je[Be] : Ke ? [(Ke[Be] - tt) / (_e - tt), 0] : [(ft[2] - tt) / (_e - tt), 0], pe.push(vt[0], vt[1]), be.push(Be);
                      Dt += 1;
                      break;
                    case 3:
                      for (_t = 0; _t < 3; ++_t) for (ft = ce[mt = Gt[_t]], Wt = 0; Wt < 3; ++Wt) if (isNaN(ft[Wt]) || !isFinite(ft[Wt])) continue e;
                      for (_t = 0; _t < 3; ++_t) {
                        var mt, at, vt, St;
                        ft = ce[mt = Gt[2 - _t]], he.push(ft[0], ft[1], ft[2]), (at = ge ? ge[mt] : Ce ? Ce[Be] : we) ? this.opacityscale && Re ? de.push(at[0], at[1], at[2], this.opacity * K((Re[mt] - tt) / (_e - tt), this.opacityscale)) : at.length === 3 ? de.push(at[0], at[1], at[2], this.opacity) : (de.push(at[0], at[1], at[2], at[3] * this.opacity), at[3] < 1 && (this.hasAlpha = !0)) : de.push(0.5, 0.5, 0.5, 1), vt = Ge ? Ge[mt] : Re ? [(Re[mt] - tt) / (_e - tt), 0] : je ? je[Be] : Ke ? [(Ke[Be] - tt) / (_e - tt), 0] : [(ft[2] - tt) / (_e - tt), 0], ae.push(vt[0], vt[1]), St = We ? We[mt] : Ee[Be], ne.push(St[0], St[1], St[2]), se.push(Be);
                      }
                      Pt += 1;
                  }
                }
                this.pointCount = $t, this.edgeCount = Dt, this.triangleCount = Pt, this.pointPositions.update(Ae), this.pointColors.update(Se), this.pointUVs.update(Me), this.pointSizes.update(De), this.pointIds.update(new Uint32Array(Le)), this.edgePositions.update(me), this.edgeColors.update(ye), this.edgeUVs.update(pe), this.edgeIds.update(new Uint32Array(be)), this.trianglePositions.update(he), this.triangleColors.update(de), this.triangleUVs.update(ae), this.triangleNormals.update(ne), this.triangleIds.update(new Uint32Array(se));
              }
            }, q.drawTransparent = q.draw = function(X) {
              X = X || {};
              for (var Q = this.gl, ue = X.model || V, ce = X.view || V, he = X.projection || V, de = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], ne = 0; ne < 3; ++ne) de[0][ne] = Math.max(de[0][ne], this.clipBounds[0][ne]), de[1][ne] = Math.min(de[1][ne], this.clipBounds[1][ne]);
              var ae = { model: ue, view: ce, projection: he, inverseModel: V.slice(), clipBounds: de, kambient: this.ambientLight, kdiffuse: this.diffuseLight, kspecular: this.specularLight, roughness: this.roughness, fresnel: this.fresnel, eyePosition: [0, 0, 0], lightPosition: [0, 0, 0], contourColor: this.contourColor, texture: 0 };
              ae.inverseModel = A(ae.inverseModel, ae.model), Q.disable(Q.CULL_FACE), this.texture.bind(0);
              var se = new Array(16);
              for (S(se, ae.view, ae.model), S(se, ae.projection, se), A(se, se), ne = 0; ne < 3; ++ne) ae.eyePosition[ne] = se[12 + ne] / se[15];
              var me, ye = se[15];
              for (ne = 0; ne < 3; ++ne) ye += this.lightPosition[ne] * se[4 * ne + 3];
              for (ne = 0; ne < 3; ++ne) {
                for (var pe = se[12 + ne], be = 0; be < 3; ++be) pe += se[4 * be + ne] * this.lightPosition[be];
                ae.lightPosition[ne] = pe / ye;
              }
              this.triangleCount > 0 && ((me = this.triShader).bind(), me.uniforms = ae, this.triangleVAO.bind(), Q.drawArrays(Q.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind()), this.edgeCount > 0 && this.lineWidth > 0 && ((me = this.lineShader).bind(), me.uniforms = ae, this.edgeVAO.bind(), Q.lineWidth(this.lineWidth * this.pixelRatio), Q.drawArrays(Q.LINES, 0, 2 * this.edgeCount), this.edgeVAO.unbind()), this.pointCount > 0 && ((me = this.pointShader).bind(), me.uniforms = ae, this.pointVAO.bind(), Q.drawArrays(Q.POINTS, 0, this.pointCount), this.pointVAO.unbind()), this.contourEnable && this.contourCount > 0 && this.contourLineWidth > 0 && ((me = this.contourShader).bind(), me.uniforms = ae, this.contourVAO.bind(), Q.drawArrays(Q.LINES, 0, this.contourCount), this.contourVAO.unbind());
            }, q.drawPick = function(X) {
              X = X || {};
              for (var Q = this.gl, ue = X.model || V, ce = X.view || V, he = X.projection || V, de = [[-1e6, -1e6, -1e6], [1e6, 1e6, 1e6]], ne = 0; ne < 3; ++ne) de[0][ne] = Math.max(de[0][ne], this.clipBounds[0][ne]), de[1][ne] = Math.min(de[1][ne], this.clipBounds[1][ne]);
              this._model = [].slice.call(ue), this._view = [].slice.call(ce), this._projection = [].slice.call(he), this._resolution = [Q.drawingBufferWidth, Q.drawingBufferHeight];
              var ae, se = { model: ue, view: ce, projection: he, clipBounds: de, pickId: this.pickId / 255 };
              (ae = this.pickShader).bind(), ae.uniforms = se, this.triangleCount > 0 && (this.triangleVAO.bind(), Q.drawArrays(Q.TRIANGLES, 0, 3 * this.triangleCount), this.triangleVAO.unbind()), this.edgeCount > 0 && (this.edgeVAO.bind(), Q.lineWidth(this.lineWidth * this.pixelRatio), Q.drawArrays(Q.LINES, 0, 2 * this.edgeCount), this.edgeVAO.unbind()), this.pointCount > 0 && ((ae = this.pointPickShader).bind(), ae.uniforms = se, this.pointVAO.bind(), Q.drawArrays(Q.POINTS, 0, this.pointCount), this.pointVAO.unbind());
            }, q.pick = function(X) {
              if (!X || X.id !== this.pickId) return null;
              for (var Q = X.value[0] + 256 * X.value[1] + 65536 * X.value[2], ue = this.cells[Q], ce = this.positions, he = new Array(ue.length), de = 0; de < ue.length; ++de) he[de] = ce[ue[de]];
              var ne = X.coord[0], ae = X.coord[1];
              if (!this.pickVertex) {
                var se = this.positions[ue[0]], me = this.positions[ue[1]], ye = this.positions[ue[2]], pe = [(se[0] + me[0] + ye[0]) / 3, (se[1] + me[1] + ye[1]) / 3, (se[2] + me[2] + ye[2]) / 3];
                return { _cellCenter: !0, position: [ne, ae], index: Q, cell: ue, cellId: Q, intensity: this.intensity[Q], dataCoordinate: pe };
              }
              var be = I(he, [ne * this.pixelRatio, this._resolution[1] - ae * this.pixelRatio], this._model, this._view, this._projection, this._resolution);
              if (!be) return null;
              var Ae = be[2], Se = 0;
              for (de = 0; de < ue.length; ++de) Se += Ae[de] * this.intensity[ue[de]];
              return { position: be[1], index: ue[be[0]], cell: ue, cellId: Q, intensity: Se, dataCoordinate: this.positions[ue[be[0]]] };
            }, q.dispose = function() {
              this.texture.dispose(), this.triShader.dispose(), this.lineShader.dispose(), this.pointShader.dispose(), this.pickShader.dispose(), this.pointPickShader.dispose(), this.triangleVAO.dispose(), this.trianglePositions.dispose(), this.triangleColors.dispose(), this.triangleUVs.dispose(), this.triangleNormals.dispose(), this.triangleIds.dispose(), this.edgeVAO.dispose(), this.edgePositions.dispose(), this.edgeColors.dispose(), this.edgeUVs.dispose(), this.edgeIds.dispose(), this.pointVAO.dispose(), this.pointPositions.dispose(), this.pointColors.dispose(), this.pointUVs.dispose(), this.pointSizes.dispose(), this.pointIds.dispose(), this.contourVAO.dispose(), this.contourPositions.dispose(), this.contourShader.dispose();
            }, d.exports = function(X, Q) {
              if (arguments.length === 1 && (X = (Q = X).gl), !(X.getExtension("OES_standard_derivatives") || X.getExtension("MOZ_OES_standard_derivatives") || X.getExtension("WEBKIT_OES_standard_derivatives"))) throw new Error("derivatives not supported");
              var ue = function(Ke) {
                var tt = g(Ke, M.vertex, M.fragment);
                return tt.attributes.position.location = 0, tt.attributes.color.location = 2, tt.attributes.uv.location = 3, tt.attributes.normal.location = 4, tt;
              }(X), ce = function(Ke) {
                var tt = g(Ke, O.vertex, O.fragment);
                return tt.attributes.position.location = 0, tt.attributes.color.location = 2, tt.attributes.uv.location = 3, tt;
              }(X), he = re(X), de = Y(X), ne = te(X), ae = ee(X), se = w(X, C(new Uint8Array([255, 255, 255, 255]), [1, 1, 4]));
              se.generateMipmap(), se.minFilter = X.LINEAR_MIPMAP_LINEAR, se.magFilter = X.LINEAR;
              var me = m(X), ye = m(X), pe = m(X), be = m(X), Ae = m(X), Se = x(X, [{ buffer: me, type: X.FLOAT, size: 3 }, { buffer: Ae, type: X.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: ye, type: X.FLOAT, size: 4 }, { buffer: pe, type: X.FLOAT, size: 2 }, { buffer: be, type: X.FLOAT, size: 3 }]), Me = m(X), De = m(X), Le = m(X), We = m(X), Ee = x(X, [{ buffer: Me, type: X.FLOAT, size: 3 }, { buffer: We, type: X.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: De, type: X.FLOAT, size: 4 }, { buffer: Le, type: X.FLOAT, size: 2 }]), Ne = m(X), Ie = m(X), ge = m(X), Ce = m(X), we = m(X), Ge = x(X, [{ buffer: Ne, type: X.FLOAT, size: 3 }, { buffer: we, type: X.UNSIGNED_BYTE, size: 4, normalized: !0 }, { buffer: Ie, type: X.FLOAT, size: 4 }, { buffer: ge, type: X.FLOAT, size: 2 }, { buffer: Ce, type: X.FLOAT, size: 1 }]), Re = m(X), je = new $(X, se, ue, ce, he, de, ne, ae, me, Ae, ye, pe, be, Se, Me, We, De, Le, Ee, Ne, we, Ie, ge, Ce, Ge, Re, x(X, [{ buffer: Re, type: X.FLOAT, size: 3 }]));
              return je.update(Q), je;
            };
          }, 8120: function(d, f, c) {
            d.exports = function(C) {
              var D = C.gl;
              return new w(C, g(D, [0, 0, 0, 1, 1, 0, 1, 1]), m(D, x.boxVert, x.lineFrag));
            };
            var g = c(2762), m = c(9405), x = c(3603);
            function w(C, D, L) {
              this.plot = C, this.vbo = D, this.shader = L;
            }
            var k, S, A = w.prototype;
            A.bind = function() {
              var C = this.shader;
              this.vbo.bind(), this.shader.bind(), C.attributes.coord.pointer(), C.uniforms.screenBox = this.plot.screenBox;
            }, A.drawBox = (k = [0, 0], S = [0, 0], function(C, D, L, E, P) {
              var I = this.plot, M = this.shader, O = I.gl;
              k[0] = C, k[1] = D, S[0] = L, S[1] = E, M.uniforms.lo = k, M.uniforms.hi = S, M.uniforms.color = P, O.drawArrays(O.TRIANGLE_STRIP, 0, 4);
            }), A.dispose = function() {
              this.vbo.dispose(), this.shader.dispose();
            };
          }, 1913: function(d, f, c) {
            d.exports = function(I) {
              var M = I.gl;
              return new k(I, g(M), m(M, w.gridVert, w.gridFrag), m(M, w.tickVert, w.gridFrag));
            };
            var g = c(2762), m = c(9405), x = c(2478), w = c(3603);
            function k(I, M, O, T) {
              this.plot = I, this.vbo = M, this.shader = O, this.tickShader = T, this.ticks = [[], []];
            }
            function S(I, M) {
              return I - M;
            }
            var A, C, D, L, E, P = k.prototype;
            P.draw = (A = [0, 0], C = [0, 0], D = [0, 0], function() {
              for (var I = this.plot, M = this.vbo, O = this.shader, T = this.ticks, z = I.gl, F = I._tickBounds, U = I.dataBox, V = I.viewBox, $ = I.gridLineWidth, q = I.gridLineColor, K = I.gridLineEnable, re = I.pixelRatio, Y = 0; Y < 2; ++Y) {
                var te = F[Y], ee = F[Y + 2] - te, X = 0.5 * (U[Y + 2] + U[Y]), Q = U[Y + 2] - U[Y];
                C[Y] = 2 * ee / Q, A[Y] = 2 * (te - X) / Q;
              }
              O.bind(), M.bind(), O.attributes.dataCoord.pointer(), O.uniforms.dataShift = A, O.uniforms.dataScale = C;
              var ue = 0;
              for (Y = 0; Y < 2; ++Y) {
                D[0] = D[1] = 0, D[Y] = 1, O.uniforms.dataAxis = D, O.uniforms.lineWidth = $[Y] / (V[Y + 2] - V[Y]) * re, O.uniforms.color = q[Y];
                var ce = 6 * T[Y].length;
                K[Y] && ce && z.drawArrays(z.TRIANGLES, ue, ce), ue += ce;
              }
            }), P.drawTickMarks = /* @__PURE__ */ function() {
              var I = [0, 0], M = [0, 0], O = [1, 0], T = [0, 1], z = [0, 0], F = [0, 0];
              return function() {
                for (var U = this.plot, V = this.vbo, $ = this.tickShader, q = this.ticks, K = U.gl, re = U._tickBounds, Y = U.dataBox, te = U.viewBox, ee = U.pixelRatio, X = U.screenBox, Q = X[2] - X[0], ue = X[3] - X[1], ce = te[2] - te[0], he = te[3] - te[1], de = 0; de < 2; ++de) {
                  var ne = re[de], ae = re[de + 2] - ne, se = 0.5 * (Y[de + 2] + Y[de]), me = Y[de + 2] - Y[de];
                  M[de] = 2 * ae / me, I[de] = 2 * (ne - se) / me;
                }
                M[0] *= ce / Q, I[0] *= ce / Q, M[1] *= he / ue, I[1] *= he / ue, $.bind(), V.bind(), $.attributes.dataCoord.pointer();
                var ye = $.uniforms;
                ye.dataShift = I, ye.dataScale = M;
                var pe = U.tickMarkLength, be = U.tickMarkWidth, Ae = U.tickMarkColor, Se = 6 * q[0].length, Me = Math.min(x.ge(q[0], (Y[0] - re[0]) / (re[2] - re[0]), S), q[0].length), De = Math.min(x.gt(q[0], (Y[2] - re[0]) / (re[2] - re[0]), S), q[0].length), Le = 0 + 6 * Me, We = 6 * Math.max(0, De - Me), Ee = Math.min(x.ge(q[1], (Y[1] - re[1]) / (re[3] - re[1]), S), q[1].length), Ne = Math.min(x.gt(q[1], (Y[3] - re[1]) / (re[3] - re[1]), S), q[1].length), Ie = Se + 6 * Ee, ge = 6 * Math.max(0, Ne - Ee);
                z[0] = 2 * (te[0] - pe[1]) / Q - 1, z[1] = (te[3] + te[1]) / ue - 1, F[0] = pe[1] * ee / Q, F[1] = be[1] * ee / ue, ge && (ye.color = Ae[1], ye.tickScale = F, ye.dataAxis = T, ye.screenOffset = z, K.drawArrays(K.TRIANGLES, Ie, ge)), z[0] = (te[2] + te[0]) / Q - 1, z[1] = 2 * (te[1] - pe[0]) / ue - 1, F[0] = be[0] * ee / Q, F[1] = pe[0] * ee / ue, We && (ye.color = Ae[0], ye.tickScale = F, ye.dataAxis = O, ye.screenOffset = z, K.drawArrays(K.TRIANGLES, Le, We)), z[0] = 2 * (te[2] + pe[3]) / Q - 1, z[1] = (te[3] + te[1]) / ue - 1, F[0] = pe[3] * ee / Q, F[1] = be[3] * ee / ue, ge && (ye.color = Ae[3], ye.tickScale = F, ye.dataAxis = T, ye.screenOffset = z, K.drawArrays(K.TRIANGLES, Ie, ge)), z[0] = (te[2] + te[0]) / Q - 1, z[1] = 2 * (te[3] + pe[2]) / ue - 1, F[0] = be[2] * ee / Q, F[1] = pe[2] * ee / ue, We && (ye.color = Ae[2], ye.tickScale = F, ye.dataAxis = O, ye.screenOffset = z, K.drawArrays(K.TRIANGLES, Le, We));
              };
            }(), P.update = (L = [1, 1, -1, -1, 1, -1], E = [1, -1, 1, 1, -1, -1], function(I) {
              for (var M = I.ticks, O = I.bounds, T = new Float32Array(18 * (M[0].length + M[1].length)), z = (this.plot.zeroLineEnable, 0), F = [[], []], U = 0; U < 2; ++U) for (var V = F[U], $ = M[U], q = O[U], K = O[U + 2], re = 0; re < $.length; ++re) {
                var Y = ($[re].x - q) / (K - q);
                V.push(Y);
                for (var te = 0; te < 6; ++te) T[z++] = Y, T[z++] = L[te], T[z++] = E[te];
              }
              this.ticks = F, this.vbo.update(T);
            }), P.dispose = function() {
              this.vbo.dispose(), this.shader.dispose(), this.tickShader.dispose();
            };
          }, 4747: function(d, f, c) {
            d.exports = function(C) {
              var D = C.gl;
              return new w(C, g(D, [-1, -1, -1, 1, 1, -1, 1, 1]), m(D, x.lineVert, x.lineFrag));
            };
            var g = c(2762), m = c(9405), x = c(3603);
            function w(C, D, L) {
              this.plot = C, this.vbo = D, this.shader = L;
            }
            var k, S, A = w.prototype;
            A.bind = function() {
              var C = this.shader;
              this.vbo.bind(), this.shader.bind(), C.attributes.coord.pointer(), C.uniforms.screenBox = this.plot.screenBox;
            }, A.drawLine = (k = [0, 0], S = [0, 0], function(C, D, L, E, P, I) {
              var M = this.plot, O = this.shader, T = M.gl;
              k[0] = C, k[1] = D, S[0] = L, S[1] = E, O.uniforms.start = k, O.uniforms.end = S, O.uniforms.width = P * M.pixelRatio, O.uniforms.color = I, T.drawArrays(T.TRIANGLE_STRIP, 0, 4);
            }), A.dispose = function() {
              this.vbo.dispose(), this.shader.dispose();
            };
          }, 3603: function(d, f, c) {
            var g = c(3236), m = g([`precision lowp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
  gl_FragColor = vec4(color.xyz * color.w, color.w);
}
`]);
            d.exports = { lineVert: g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 coord;

uniform vec4 screenBox;
uniform vec2 start, end;
uniform float width;

vec2 perp(vec2 v) {
  return vec2(v.y, -v.x);
}

vec2 screen(vec2 v) {
  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}

void main() {
  vec2 delta = normalize(perp(start - end));
  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));
  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);
}
`]), lineFrag: m, textVert: g([`#define GLSLIFY 1
attribute vec3 textCoordinate;

uniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;
uniform float angle;

void main() {
  float dataOffset  = textCoordinate.z;
  vec2 glyphOffset  = textCoordinate.xy;
  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));
  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +
    glyphMatrix * glyphOffset * textScale + screenOffset;
  gl_Position = vec4(screenCoordinate, 0, 1);
}
`]), textFrag: m, gridVert: g([`precision mediump float;
#define GLSLIFY 1

attribute vec3 dataCoord;

uniform vec2 dataAxis, dataShift, dataScale;
uniform float lineWidth;

void main() {
  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;
  gl_Position = vec4(pos, 0, 1);
}
`]), gridFrag: m, boxVert: g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 coord;

uniform vec4 screenBox;
uniform vec2 lo, hi;

vec2 screen(vec2 v) {
  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;
}

void main() {
  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);
}
`]), tickVert: g([`precision mediump float;
#define GLSLIFY 1

attribute vec3 dataCoord;

uniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;

void main() {
  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);
  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);
}
`]) };
          }, 2142: function(d, f, c) {
            d.exports = function(M) {
              var O = M.gl;
              return new S(M, g(O), m(O, k.textVert, k.textFrag));
            };
            var g = c(2762), m = c(9405), x = c(529), w = c(2478), k = c(3603);
            function S(M, O, T) {
              this.plot = M, this.vbo = O, this.shader = T, this.tickOffset = [[], []], this.tickX = [[], []], this.labelOffset = [0, 0], this.labelCount = [0, 0];
            }
            var A, C, D, L, E, P, I = S.prototype;
            I.drawTicks = (A = [0, 0], C = [0, 0], D = [0, 0], function(M) {
              var O = this.plot, T = this.shader, z = this.tickX[M], F = this.tickOffset[M], U = O.gl, V = O.viewBox, $ = O.dataBox, q = O.screenBox, K = O.pixelRatio, re = O.tickEnable, Y = O.tickPad, te = O.tickColor, ee = O.tickAngle, X = O.labelEnable, Q = O.labelPad, ue = O.labelColor, ce = O.labelAngle, he = this.labelOffset[M], de = this.labelCount[M], ne = w.lt(z, $[M]), ae = w.le(z, $[M + 2]);
              A[0] = A[1] = 0, A[M] = 1, C[M] = (V[2 + M] + V[M]) / (q[2 + M] - q[M]) - 1;
              var se = 2 / q[2 + (1 ^ M)] - q[1 ^ M];
              C[1 ^ M] = se * V[1 ^ M] - 1, re[M] && (C[1 ^ M] -= se * K * Y[M], ne < ae && F[ae] > F[ne] && (T.uniforms.dataAxis = A, T.uniforms.screenOffset = C, T.uniforms.color = te[M], T.uniforms.angle = ee[M], U.drawArrays(U.TRIANGLES, F[ne], F[ae] - F[ne]))), X[M] && de && (C[1 ^ M] -= se * K * Q[M], T.uniforms.dataAxis = D, T.uniforms.screenOffset = C, T.uniforms.color = ue[M], T.uniforms.angle = ce[M], U.drawArrays(U.TRIANGLES, he, de)), C[1 ^ M] = se * V[2 + (1 ^ M)] - 1, re[M + 2] && (C[1 ^ M] += se * K * Y[M + 2], ne < ae && F[ae] > F[ne] && (T.uniforms.dataAxis = A, T.uniforms.screenOffset = C, T.uniforms.color = te[M + 2], T.uniforms.angle = ee[M + 2], U.drawArrays(U.TRIANGLES, F[ne], F[ae] - F[ne]))), X[M + 2] && de && (C[1 ^ M] += se * K * Q[M + 2], T.uniforms.dataAxis = D, T.uniforms.screenOffset = C, T.uniforms.color = ue[M + 2], T.uniforms.angle = ce[M + 2], U.drawArrays(U.TRIANGLES, he, de));
            }), I.drawTitle = /* @__PURE__ */ function() {
              var M = [0, 0], O = [0, 0];
              return function() {
                var T = this.plot, z = this.shader, F = T.gl, U = T.screenBox, V = T.titleCenter, $ = T.titleAngle, q = T.titleColor, K = T.pixelRatio;
                if (this.titleCount) {
                  for (var re = 0; re < 2; ++re) O[re] = 2 * (V[re] * K - U[re]) / (U[2 + re] - U[re]) - 1;
                  z.bind(), z.uniforms.dataAxis = M, z.uniforms.screenOffset = O, z.uniforms.angle = $, z.uniforms.color = q, F.drawArrays(F.TRIANGLES, this.titleOffset, this.titleCount);
                }
              };
            }(), I.bind = (L = [0, 0], E = [0, 0], P = [0, 0], function() {
              var M = this.plot, O = this.shader, T = M._tickBounds, z = M.dataBox, F = M.screenBox, U = M.viewBox;
              O.bind();
              for (var V = 0; V < 2; ++V) {
                var $ = T[V], q = T[V + 2] - $, K = 0.5 * (z[V + 2] + z[V]), re = z[V + 2] - z[V], Y = U[V], te = U[V + 2] - Y, ee = F[V], X = F[V + 2] - ee;
                E[V] = 2 * q / re * te / X, L[V] = 2 * ($ - K) / re * te / X;
              }
              P[1] = 2 * M.pixelRatio / (F[3] - F[1]), P[0] = P[1] * (F[3] - F[1]) / (F[2] - F[0]), O.uniforms.dataScale = E, O.uniforms.dataShift = L, O.uniforms.textScale = P, this.vbo.bind(), O.attributes.textCoordinate.pointer();
            }), I.update = function(M) {
              var O, T, z, F, U, V = [], $ = M.ticks, q = M.bounds;
              for (U = 0; U < 2; ++U) {
                var K = [Math.floor(V.length / 3)], re = [-1 / 0], Y = $[U];
                for (O = 0; O < Y.length; ++O) {
                  var te = Y[O], ee = te.x, X = te.text, Q = te.font || "sans-serif", ue = te.fontStyle || "normal", ce = te.fontWeight || "normal", he = te.fontVariant || "normal";
                  F = te.fontSize || 12;
                  for (var de = 1 / (q[U + 2] - q[U]), ne = q[U], ae = X.split(`
`), se = 0; se < ae.length; se++) for (z = x(Q, ae[se], { fontStyle: ue, fontWeight: ce, fontVariant: he }).data, T = 0; T < z.length; T += 2) V.push(z[T] * F, -z[T + 1] * F - se * F * 1.2, (ee - ne) * de);
                  K.push(Math.floor(V.length / 3)), re.push(ee);
                }
                this.tickOffset[U] = K, this.tickX[U] = re;
              }
              for (U = 0; U < 2; ++U) {
                for (this.labelOffset[U] = Math.floor(V.length / 3), z = x(M.labelFont[U], M.labels[U], { fontStyle: M.labelFontStyle[U], fontWeight: M.labelFontWeight[U], fontVariant: M.labelFontVariant[U], textAlign: "center" }).data, F = M.labelSize[U], O = 0; O < z.length; O += 2) V.push(z[O] * F, -z[O + 1] * F, 0);
                this.labelCount[U] = Math.floor(V.length / 3) - this.labelOffset[U];
              }
              for (this.titleOffset = Math.floor(V.length / 3), z = x(M.titleFont, M.title, { fontStyle: M.titleFontStyle, fontWeight: M.titleFontWeight, fontVariant: M.titleFontVariant }).data, F = M.titleSize, O = 0; O < z.length; O += 2) V.push(z[O] * F, -z[O + 1] * F, 0);
              this.titleCount = Math.floor(V.length / 3) - this.titleOffset, this.vbo.update(V);
            }, I.dispose = function() {
              this.vbo.dispose(), this.shader.dispose();
            };
          }, 1850: function(d, f, c) {
            d.exports = function(L) {
              var E = L.gl, P = new S(E, g(E, [E.drawingBufferWidth, E.drawingBufferHeight]));
              return P.grid = m(P), P.text = x(P), P.line = w(P), P.box = k(P), P.update(L), P;
            };
            var g = c(3589), m = c(1913), x = c(2142), w = c(4747), k = c(8120);
            function S(L, E) {
              this.gl = L, this.pickBuffer = E, this.screenBox = [0, 0, L.drawingBufferWidth, L.drawingBufferHeight], this.viewBox = [0, 0, 0, 0], this.dataBox = [-10, -10, 10, 10], this.gridLineEnable = [!0, !0], this.gridLineWidth = [1, 1], this.gridLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.pixelRatio = 1, this.tickMarkLength = [0, 0, 0, 0], this.tickMarkWidth = [0, 0, 0, 0], this.tickMarkColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.tickPad = [15, 15, 15, 15], this.tickAngle = [0, 0, 0, 0], this.tickEnable = [!0, !0, !0, !0], this.tickColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.labelPad = [15, 15, 15, 15], this.labelAngle = [0, Math.PI / 2, 0, 3 * Math.PI / 2], this.labelEnable = [!0, !0, !0, !0], this.labelColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.titleCenter = [0, 0], this.titleEnable = !0, this.titleAngle = 0, this.titleColor = [0, 0, 0, 1], this.borderColor = [0, 0, 0, 0], this.backgroundColor = [0, 0, 0, 0], this.zeroLineEnable = [!0, !0], this.zeroLineWidth = [4, 4], this.zeroLineColor = [[0, 0, 0, 1], [0, 0, 0, 1]], this.borderLineEnable = [!0, !0, !0, !0], this.borderLineWidth = [2, 2, 2, 2], this.borderLineColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.grid = null, this.text = null, this.line = null, this.box = null, this.objects = [], this.overlays = [], this._tickBounds = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.static = !1, this.dirty = !1, this.pickDirty = !1, this.pickDelay = 120, this.pickRadius = 10, this._pickTimeout = null, this._drawPick = this.drawPick.bind(this), this._depthCounter = 0;
            }
            var A = S.prototype;
            function C(L) {
              for (var E = L.slice(), P = 0; P < E.length; ++P) E[P] = E[P].slice();
              return E;
            }
            function D(L, E) {
              return L.x - E.x;
            }
            A.setDirty = function() {
              this.dirty = this.pickDirty = !0;
            }, A.setOverlayDirty = function() {
              this.dirty = !0;
            }, A.nextDepthValue = function() {
              return this._depthCounter++ / 65536;
            }, A.draw = function() {
              var L = this.gl, E = this.screenBox, P = this.viewBox, I = this.dataBox, M = this.pixelRatio, O = this.grid, T = this.line, z = this.text, F = this.objects;
              if (this._depthCounter = 0, this.pickDirty && (this._pickTimeout && clearTimeout(this._pickTimeout), this.pickDirty = !1, this._pickTimeout = setTimeout(this._drawPick, this.pickDelay)), this.dirty) {
                if (this.dirty = !1, L.bindFramebuffer(L.FRAMEBUFFER, null), L.enable(L.SCISSOR_TEST), L.disable(L.DEPTH_TEST), L.depthFunc(L.LESS), L.depthMask(!1), L.enable(L.BLEND), L.blendEquation(L.FUNC_ADD, L.FUNC_ADD), L.blendFunc(L.ONE, L.ONE_MINUS_SRC_ALPHA), this.borderColor) {
                  L.scissor(E[0], E[1], E[2] - E[0], E[3] - E[1]);
                  var U = this.borderColor;
                  L.clearColor(U[0] * U[3], U[1] * U[3], U[2] * U[3], U[3]), L.clear(L.COLOR_BUFFER_BIT | L.DEPTH_BUFFER_BIT);
                }
                L.scissor(P[0], P[1], P[2] - P[0], P[3] - P[1]), L.viewport(P[0], P[1], P[2] - P[0], P[3] - P[1]);
                var V = this.backgroundColor;
                L.clearColor(V[0] * V[3], V[1] * V[3], V[2] * V[3], V[3]), L.clear(L.COLOR_BUFFER_BIT), O.draw();
                var $ = this.zeroLineEnable, q = this.zeroLineColor, K = this.zeroLineWidth;
                if ($[0] || $[1]) {
                  T.bind();
                  for (var re = 0; re < 2; ++re) if ($[re] && I[re] <= 0 && I[re + 2] >= 0) {
                    var Y = E[re] - I[re] * (E[re + 2] - E[re]) / (I[re + 2] - I[re]);
                    re === 0 ? T.drawLine(Y, E[1], Y, E[3], K[re], q[re]) : T.drawLine(E[0], Y, E[2], Y, K[re], q[re]);
                  }
                }
                for (re = 0; re < F.length; ++re) F[re].draw();
                L.viewport(E[0], E[1], E[2] - E[0], E[3] - E[1]), L.scissor(E[0], E[1], E[2] - E[0], E[3] - E[1]), this.grid.drawTickMarks(), T.bind();
                var te = this.borderLineEnable, ee = this.borderLineWidth, X = this.borderLineColor;
                for (te[1] && T.drawLine(P[0], P[1] - 0.5 * ee[1] * M, P[0], P[3] + 0.5 * ee[3] * M, ee[1], X[1]), te[0] && T.drawLine(P[0] - 0.5 * ee[0] * M, P[1], P[2] + 0.5 * ee[2] * M, P[1], ee[0], X[0]), te[3] && T.drawLine(P[2], P[1] - 0.5 * ee[1] * M, P[2], P[3] + 0.5 * ee[3] * M, ee[3], X[3]), te[2] && T.drawLine(P[0] - 0.5 * ee[0] * M, P[3], P[2] + 0.5 * ee[2] * M, P[3], ee[2], X[2]), z.bind(), re = 0; re < 2; ++re) z.drawTicks(re);
                this.titleEnable && z.drawTitle();
                var Q = this.overlays;
                for (re = 0; re < Q.length; ++re) Q[re].draw();
                L.disable(L.SCISSOR_TEST), L.disable(L.BLEND), L.depthMask(!0);
              }
            }, A.drawPick = function() {
              if (!this.static) {
                var L = this.pickBuffer;
                this.gl, this._pickTimeout = null, L.begin();
                for (var E = 1, P = this.objects, I = 0; I < P.length; ++I) E = P[I].drawPick(E);
                L.end();
              }
            }, A.pick = function(L, E) {
              if (!this.static) {
                var P = this.pixelRatio, I = this.pickPixelRatio, M = this.viewBox, O = 0 | Math.round((L - M[0] / P) * I), T = 0 | Math.round((E - M[1] / P) * I), z = this.pickBuffer.query(O, T, this.pickRadius);
                if (!z) return null;
                for (var F = z.id + (z.value[0] << 8) + (z.value[1] << 16) + (z.value[2] << 24), U = this.objects, V = 0; V < U.length; ++V) {
                  var $ = U[V].pick(O, T, F);
                  if ($) return $;
                }
                return null;
              }
            }, A.setScreenBox = function(L) {
              var E = this.screenBox, P = this.pixelRatio;
              E[0] = 0 | Math.round(L[0] * P), E[1] = 0 | Math.round(L[1] * P), E[2] = 0 | Math.round(L[2] * P), E[3] = 0 | Math.round(L[3] * P), this.setDirty();
            }, A.setDataBox = function(L) {
              var E = this.dataBox;
              (E[0] !== L[0] || E[1] !== L[1] || E[2] !== L[2] || E[3] !== L[3]) && (E[0] = L[0], E[1] = L[1], E[2] = L[2], E[3] = L[3], this.setDirty());
            }, A.setViewBox = function(L) {
              var E = this.pixelRatio, P = this.viewBox;
              P[0] = 0 | Math.round(L[0] * E), P[1] = 0 | Math.round(L[1] * E), P[2] = 0 | Math.round(L[2] * E), P[3] = 0 | Math.round(L[3] * E);
              var I = this.pickPixelRatio;
              this.pickBuffer.shape = [0 | Math.round((L[2] - L[0]) * I), 0 | Math.round((L[3] - L[1]) * I)], this.setDirty();
            }, A.update = function(L) {
              L = L || {};
              var E = this.gl;
              this.pixelRatio = L.pixelRatio || 1;
              var P = this.pixelRatio;
              this.pickPixelRatio = Math.max(P, 1), this.setScreenBox(L.screenBox || [0, 0, E.drawingBufferWidth / P, E.drawingBufferHeight / P]), this.screenBox, this.setViewBox(L.viewBox || [0.125 * (this.screenBox[2] - this.screenBox[0]) / P, 0.125 * (this.screenBox[3] - this.screenBox[1]) / P, 0.875 * (this.screenBox[2] - this.screenBox[0]) / P, 0.875 * (this.screenBox[3] - this.screenBox[1]) / P]);
              var I = this.viewBox, M = (I[2] - I[0]) / (I[3] - I[1]);
              this.setDataBox(L.dataBox || [-10, -10 / M, 10, 10 / M]), this.borderColor = L.borderColor !== !1 && (L.borderColor || [0, 0, 0, 0]).slice(), this.backgroundColor = (L.backgroundColor || [0, 0, 0, 0]).slice(), this.gridLineEnable = (L.gridLineEnable || [!0, !0]).slice(), this.gridLineWidth = (L.gridLineWidth || [1, 1]).slice(), this.gridLineColor = C(L.gridLineColor || [[0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1]]), this.zeroLineEnable = (L.zeroLineEnable || [!0, !0]).slice(), this.zeroLineWidth = (L.zeroLineWidth || [4, 4]).slice(), this.zeroLineColor = C(L.zeroLineColor || [[0, 0, 0, 1], [0, 0, 0, 1]]), this.tickMarkLength = (L.tickMarkLength || [0, 0, 0, 0]).slice(), this.tickMarkWidth = (L.tickMarkWidth || [0, 0, 0, 0]).slice(), this.tickMarkColor = C(L.tickMarkColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.titleCenter = (L.titleCenter || [0.5 * (I[0] + I[2]) / P, (I[3] + 120) / P]).slice(), this.titleEnable = !("titleEnable" in L) || !!L.titleEnable, this.titleAngle = L.titleAngle || 0, this.titleColor = (L.titleColor || [0, 0, 0, 1]).slice(), this.labelPad = (L.labelPad || [15, 15, 15, 15]).slice(), this.labelAngle = (L.labelAngle || [0, Math.PI / 2, 0, 3 * Math.PI / 2]).slice(), this.labelEnable = (L.labelEnable || [!0, !0, !0, !0]).slice(), this.labelColor = C(L.labelColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.tickPad = (L.tickPad || [15, 15, 15, 15]).slice(), this.tickAngle = (L.tickAngle || [0, 0, 0, 0]).slice(), this.tickEnable = (L.tickEnable || [!0, !0, !0, !0]).slice(), this.tickColor = C(L.tickColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]), this.borderLineEnable = (L.borderLineEnable || [!0, !0, !0, !0]).slice(), this.borderLineWidth = (L.borderLineWidth || [2, 2, 2, 2]).slice(), this.borderLineColor = C(L.borderLineColor || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]);
              var O = L.ticks || [[], []], T = this._tickBounds;
              T[0] = T[1] = 1 / 0, T[2] = T[3] = -1 / 0;
              for (var z = 0; z < 2; ++z) {
                var F = O[z].slice(0);
                F.length !== 0 && (F.sort(D), T[z] = Math.min(T[z], F[0].x), T[z + 2] = Math.max(T[z + 2], F[F.length - 1].x));
              }
              this.grid.update({ bounds: T, ticks: O }), this.text.update({ bounds: T, ticks: O, labels: L.labels || ["x", "y"], labelSize: L.labelSize || [12, 12], labelFont: L.labelFont || ["sans-serif", "sans-serif"], labelFontStyle: L.labelFontStyle || ["normal", "normal"], labelFontWeight: L.labelFontWeight || ["normal", "normal"], labelFontVariant: L.labelFontVariant || ["normal", "normal"], title: L.title || "", titleSize: L.titleSize || 18, titleFont: L.titleFont || "sans-serif", titleFontStyle: L.titleFontStyle || "normal", titleFontWeight: L.titleFontWeight || "normal", titleFontVariant: L.titleFontVariant || "normal" }), this.static = !!L.static, this.setDirty();
            }, A.dispose = function() {
              this.box.dispose(), this.grid.dispose(), this.text.dispose(), this.line.dispose();
              for (var L = this.objects.length - 1; L >= 0; --L) this.objects[L].dispose();
              for (this.objects.length = 0, L = this.overlays.length - 1; L >= 0; --L) this.overlays[L].dispose();
              this.overlays.length = 0, this.gl = null;
            }, A.addObject = function(L) {
              this.objects.indexOf(L) < 0 && (this.objects.push(L), this.setDirty());
            }, A.removeObject = function(L) {
              for (var E = this.objects, P = 0; P < E.length; ++P) if (E[P] === L) {
                E.splice(P, 1), this.setDirty();
                break;
              }
            }, A.addOverlay = function(L) {
              this.overlays.indexOf(L) < 0 && (this.overlays.push(L), this.setOverlayDirty());
            }, A.removeOverlay = function(L) {
              for (var E = this.overlays, P = 0; P < E.length; ++P) if (E[P] === L) {
                E.splice(P, 1), this.setOverlayDirty();
                break;
              }
            };
          }, 4437: function(d, f, c) {
            d.exports = function(A, C) {
              A = A || document.body;
              var D = [0.01, 1 / 0];
              "distanceLimits" in (C = C || {}) && (D[0] = C.distanceLimits[0], D[1] = C.distanceLimits[1]), "zoomMin" in C && (D[0] = C.zoomMin), "zoomMax" in C && (D[1] = C.zoomMax);
              var L = m({ center: C.center || [0, 0, 0], up: C.up || [0, 1, 0], eye: C.eye || [0, 0, 10], mode: C.mode || "orbit", distanceLimits: D }), E = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], P = 0, I = A.clientWidth, M = A.clientHeight, O = { keyBindingMode: "rotate", enableWheel: !0, view: L, element: A, delay: C.delay || 16, rotateSpeed: C.rotateSpeed || 1, zoomSpeed: C.zoomSpeed || 1, translateSpeed: C.translateSpeed || 1, flipX: !!C.flipX, flipY: !!C.flipY, modes: L.modes, _ortho: C._ortho || C.projection && C.projection.type === "orthographic" || !1, tick: function() {
                var T = g(), z = this.delay, F = T - 2 * z;
                L.idle(T - z), L.recalcMatrix(F), L.flush(T - (100 + 2 * z));
                for (var U = !0, V = L.computedMatrix, $ = 0; $ < 16; ++$) U = U && E[$] === V[$], E[$] = V[$];
                var q = A.clientWidth === I && A.clientHeight === M;
                return I = A.clientWidth, M = A.clientHeight, U ? !q : (P = Math.exp(L.computedRadius[0]), !0);
              }, lookAt: function(T, z, F) {
                L.lookAt(L.lastT(), T, z, F);
              }, rotate: function(T, z, F) {
                L.rotate(L.lastT(), T, z, F);
              }, pan: function(T, z, F) {
                L.pan(L.lastT(), T, z, F);
              }, translate: function(T, z, F) {
                L.translate(L.lastT(), T, z, F);
              } };
              return Object.defineProperties(O, { matrix: { get: function() {
                return L.computedMatrix;
              }, set: function(T) {
                return L.setMatrix(L.lastT(), T), L.computedMatrix;
              }, enumerable: !0 }, mode: { get: function() {
                return L.getMode();
              }, set: function(T) {
                var z = L.computedUp.slice(), F = L.computedEye.slice(), U = L.computedCenter.slice();
                if (L.setMode(T), T === "turntable") {
                  var V = g();
                  L._active.lookAt(V, F, U, z), L._active.lookAt(V + 500, F, U, [0, 0, 1]), L._active.flush(V);
                }
                return L.getMode();
              }, enumerable: !0 }, center: { get: function() {
                return L.computedCenter;
              }, set: function(T) {
                return L.lookAt(L.lastT(), null, T), L.computedCenter;
              }, enumerable: !0 }, eye: { get: function() {
                return L.computedEye;
              }, set: function(T) {
                return L.lookAt(L.lastT(), T), L.computedEye;
              }, enumerable: !0 }, up: { get: function() {
                return L.computedUp;
              }, set: function(T) {
                return L.lookAt(L.lastT(), null, null, T), L.computedUp;
              }, enumerable: !0 }, distance: { get: function() {
                return P;
              }, set: function(T) {
                return L.setDistance(L.lastT(), T), T;
              }, enumerable: !0 }, distanceLimits: { get: function() {
                return L.getDistanceLimits(D);
              }, set: function(T) {
                return L.setDistanceLimits(T), T;
              }, enumerable: !0 } }), A.addEventListener("contextmenu", function(T) {
                return T.preventDefault(), !1;
              }), O._lastX = -1, O._lastY = -1, O._lastMods = { shift: !1, control: !1, alt: !1, meta: !1 }, O.enableMouseListeners = function() {
                function T(z, F, U, V) {
                  var $ = O.keyBindingMode;
                  if ($ !== !1) {
                    var q = $ === "rotate", K = $ === "pan", re = $ === "zoom", Y = !!V.control, te = !!V.alt, ee = !!V.shift, X = !!(1 & z), Q = !!(2 & z), ue = !!(4 & z), ce = 1 / A.clientHeight, he = ce * (F - O._lastX), de = ce * (U - O._lastY), ne = O.flipX ? 1 : -1, ae = O.flipY ? 1 : -1, se = Math.PI * O.rotateSpeed, me = g();
                    if (O._lastX !== -1 && O._lastY !== -1 && ((q && X && !Y && !te && !ee || X && !Y && !te && ee) && L.rotate(me, ne * se * he, -ae * se * de, 0), (K && X && !Y && !te && !ee || Q || X && Y && !te && !ee) && L.pan(me, -O.translateSpeed * he * P, O.translateSpeed * de * P, 0), re && X && !Y && !te && !ee || ue || X && !Y && te && !ee)) {
                      var ye = -O.zoomSpeed * de / window.innerHeight * (me - L.lastT()) * 100;
                      L.pan(me, 0, 0, P * (Math.exp(ye) - 1));
                    }
                    return O._lastX = F, O._lastY = U, O._lastMods = V, !0;
                  }
                }
                O.mouseListener = x(A, T), A.addEventListener("touchstart", function(z) {
                  var F = k(z.changedTouches[0], A);
                  T(0, F[0], F[1], O._lastMods), T(1, F[0], F[1], O._lastMods);
                }, !!S && { passive: !0 }), A.addEventListener("touchmove", function(z) {
                  var F = k(z.changedTouches[0], A);
                  T(1, F[0], F[1], O._lastMods), z.preventDefault();
                }, !!S && { passive: !1 }), A.addEventListener("touchend", function(z) {
                  T(0, O._lastX, O._lastY, O._lastMods);
                }, !!S && { passive: !0 }), O.wheelListener = w(A, function(z, F) {
                  if (O.keyBindingMode !== !1 && O.enableWheel) {
                    var U = O.flipX ? 1 : -1, V = O.flipY ? 1 : -1, $ = g();
                    if (Math.abs(z) > Math.abs(F)) L.rotate($, 0, 0, -z * U * Math.PI * O.rotateSpeed / window.innerWidth);
                    else if (!O._ortho) {
                      var q = -O.zoomSpeed * V * F / window.innerHeight * ($ - L.lastT()) / 20;
                      L.pan($, 0, 0, P * (Math.exp(q) - 1));
                    }
                  }
                }, !0);
              }, O.enableMouseListeners(), O;
            };
            var g = c(3025), m = c(6296), x = c(351), w = c(8512), k = c(24), S = c(7520);
          }, 799: function(d, f, c) {
            var g = c(3236), m = c(9405), x = g([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]), w = g([`precision mediump float;
#define GLSLIFY 1

uniform sampler2D accumBuffer;
varying vec2 uv;

void main() {
  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
  gl_FragColor = min(vec4(1,1,1,1), accum);
}`]);
            d.exports = function(k) {
              return m(k, x, w, null, [{ name: "position", type: "vec2" }]);
            };
          }, 4100: function(d, f, c) {
            var g = c(4437), m = c(3837), x = c(5445), w = c(4449), k = c(3589), S = c(2260), A = c(7169), C = c(351), D = c(4772), L = c(4040), E = c(799), P = c(9216)({ tablet: !0, featureDetect: !0 });
            function I() {
              this.mouse = [-1, -1], this.screen = null, this.distance = 1 / 0, this.index = null, this.dataCoordinate = null, this.dataPosition = null, this.object = null, this.data = null;
            }
            function M(T) {
              var z = Math.round(Math.log(Math.abs(T)) / Math.log(10));
              if (z < 0) {
                var F = Math.round(Math.pow(10, -z));
                return Math.ceil(T * F) / F;
              }
              return z > 0 ? (F = Math.round(Math.pow(10, z)), Math.ceil(T / F) * F) : Math.ceil(T);
            }
            function O(T) {
              return typeof T != "boolean" || T;
            }
            d.exports = { createScene: function(T) {
              (T = T || {}).camera = T.camera || {};
              var z = T.canvas;
              z || (z = document.createElement("canvas"), T.container ? T.container.appendChild(z) : document.body.appendChild(z));
              var F = T.gl;
              if (F || (T.glOptions && (P = !!T.glOptions.preserveDrawingBuffer), F = function(We, Ee) {
                var Ne = null;
                try {
                  (Ne = We.getContext("webgl", Ee)) || (Ne = We.getContext("experimental-webgl", Ee));
                } catch {
                  return null;
                }
                return Ne;
              }(z, T.glOptions || { premultipliedAlpha: !0, antialias: !0, preserveDrawingBuffer: P })), !F) throw new Error("webgl not supported");
              var U = T.bounds || [[-10, -10, -10], [10, 10, 10]], V = new I(), $ = S(F, F.drawingBufferWidth, F.drawingBufferHeight, { preferFloat: !P }), q = E(F), K = T.cameraObject && T.cameraObject._ortho === !0 || T.camera.projection && T.camera.projection.type === "orthographic" || !1, re = { eye: T.camera.eye || [2, 0, 0], center: T.camera.center || [0, 0, 0], up: T.camera.up || [0, 1, 0], zoomMin: T.camera.zoomMax || 0.1, zoomMax: T.camera.zoomMin || 100, mode: T.camera.mode || "turntable", _ortho: K }, Y = T.axes || {}, te = m(F, Y);
              te.enable = !Y.disable;
              var ee = T.spikes || {}, X = w(F, ee), Q = [], ue = [], ce = [], he = [], de = !0, ne = !0, ae = { view: null, projection: new Array(16), model: new Array(16), _ortho: !1 }, se = (ne = !0, [F.drawingBufferWidth, F.drawingBufferHeight]), me = T.cameraObject || g(z, re), ye = { gl: F, contextLost: !1, pixelRatio: T.pixelRatio || 1, canvas: z, selection: V, camera: me, axes: te, axesPixels: null, spikes: X, bounds: U, objects: Q, shape: se, aspect: T.aspectRatio || [1, 1, 1], pickRadius: T.pickRadius || 10, zNear: T.zNear || 0.01, zFar: T.zFar || 1e3, fovy: T.fovy || Math.PI / 4, clearColor: T.clearColor || [0, 0, 0, 0], autoResize: O(T.autoResize), autoBounds: O(T.autoBounds), autoScale: !!T.autoScale, autoCenter: O(T.autoCenter), clipToBounds: O(T.clipToBounds), snapToData: !!T.snapToData, onselect: T.onselect || null, onrender: T.onrender || null, onclick: T.onclick || null, cameraParams: ae, oncontextloss: null, mouseListener: null, _stopped: !1, getAspectratio: function() {
                return { x: this.aspect[0], y: this.aspect[1], z: this.aspect[2] };
              }, setAspectratio: function(We) {
                this.aspect[0] = We.x, this.aspect[1] = We.y, this.aspect[2] = We.z, ne = !0;
              }, setBounds: function(We, Ee) {
                this.bounds[0][We] = Ee.min, this.bounds[1][We] = Ee.max;
              }, setClearColor: function(We) {
                this.clearColor = We;
              }, clearRGBA: function() {
                this.gl.clearColor(this.clearColor[0], this.clearColor[1], this.clearColor[2], this.clearColor[3]), this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT);
              } }, pe = [F.drawingBufferWidth / ye.pixelRatio | 0, F.drawingBufferHeight / ye.pixelRatio | 0];
              function be() {
                if (!ye._stopped && ye.autoResize) {
                  var We = z.parentNode, Ee = 1, Ne = 1;
                  We && We !== document.body ? (Ee = We.clientWidth, Ne = We.clientHeight) : (Ee = window.innerWidth, Ne = window.innerHeight);
                  var Ie = 0 | Math.ceil(Ee * ye.pixelRatio), ge = 0 | Math.ceil(Ne * ye.pixelRatio);
                  if (Ie !== z.width || ge !== z.height) {
                    z.width = Ie, z.height = ge;
                    var Ce = z.style;
                    Ce.position = Ce.position || "absolute", Ce.left = "0px", Ce.top = "0px", Ce.width = Ee + "px", Ce.height = Ne + "px", de = !0;
                  }
                }
              }
              function Ae() {
                for (var We = Q.length, Ee = he.length, Ne = 0; Ne < Ee; ++Ne) ce[Ne] = 0;
                e: for (Ne = 0; Ne < We; ++Ne) {
                  var Ie = Q[Ne], ge = Ie.pickSlots;
                  if (ge) {
                    for (var Ce = 0; Ce < Ee; ++Ce) if (ce[Ce] + ge < 255) {
                      ue[Ne] = Ce, Ie.setPickBase(ce[Ce] + 1), ce[Ce] += ge;
                      continue e;
                    }
                    var we = k(F, se);
                    ue[Ne] = Ee, he.push(we), ce.push(ge), Ie.setPickBase(1), Ee += 1;
                  } else ue[Ne] = -1;
                }
                for (; Ee > 0 && ce[Ee - 1] === 0; ) ce.pop(), he.pop().dispose();
              }
              function Se() {
                if (ye.contextLost) return !0;
                F.isContextLost() && (ye.contextLost = !0, ye.mouseListener.enabled = !1, ye.selection.object = null, ye.oncontextloss && ye.oncontextloss());
              }
              ye.autoResize && be(), window.addEventListener("resize", be), ye.update = function(We) {
                ye._stopped || (de = !0, ne = !0);
              }, ye.add = function(We) {
                ye._stopped || (We.axes = te, Q.push(We), ue.push(-1), de = !0, ne = !0, Ae());
              }, ye.remove = function(We) {
                if (!ye._stopped) {
                  var Ee = Q.indexOf(We);
                  Ee < 0 || (Q.splice(Ee, 1), ue.pop(), de = !0, ne = !0, Ae());
                }
              }, ye.dispose = function() {
                if (!ye._stopped && (ye._stopped = !0, window.removeEventListener("resize", be), z.removeEventListener("webglcontextlost", Se), ye.mouseListener.enabled = !1, !ye.contextLost)) {
                  te.dispose(), X.dispose();
                  for (var We = 0; We < Q.length; ++We) Q[We].dispose();
                  for ($.dispose(), We = 0; We < he.length; ++We) he[We].dispose();
                  q.dispose(), F = null, te = null, X = null, Q = [];
                }
              }, ye._mouseRotating = !1, ye._prevButtons = 0, ye.enableMouseListeners = function() {
                ye.mouseListener = C(z, function(We, Ee, Ne) {
                  if (!ye._stopped) {
                    var Ie = he.length, ge = Q.length, Ce = V.object;
                    V.distance = 1 / 0, V.mouse[0] = Ee, V.mouse[1] = Ne, V.object = null, V.screen = null, V.dataCoordinate = V.dataPosition = null;
                    var we = !1;
                    if (We && ye._prevButtons) ye._mouseRotating = !0;
                    else {
                      ye._mouseRotating && (ne = !0), ye._mouseRotating = !1;
                      for (var Ge = 0; Ge < Ie; ++Ge) {
                        var Re = he[Ge].query(Ee, pe[1] - Ne - 1, ye.pickRadius);
                        if (Re) {
                          if (Re.distance > V.distance) continue;
                          for (var je = 0; je < ge; ++je) {
                            var Ke = Q[je];
                            if (ue[je] === Ge) {
                              var tt = Ke.pick(Re);
                              tt && (V.buttons = We, V.screen = Re.coord, V.distance = Re.distance, V.object = Ke, V.index = tt.distance, V.dataPosition = tt.position, V.dataCoordinate = tt.dataCoordinate, V.data = tt, we = !0);
                            }
                          }
                        }
                      }
                    }
                    Ce && Ce !== V.object && (Ce.highlight && Ce.highlight(null), de = !0), V.object && (V.object.highlight && V.object.highlight(V.data), de = !0), (we = we || V.object !== Ce) && ye.onselect && ye.onselect(V), 1 & We && !(1 & ye._prevButtons) && ye.onclick && ye.onclick(V), ye._prevButtons = We;
                  }
                });
              }, z.addEventListener("webglcontextlost", Se);
              var Me = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], De = [Me[0].slice(), Me[1].slice()];
              function Le() {
                if (!Se()) {
                  be();
                  var We = ye.camera.tick();
                  ae.view = ye.camera.matrix, de = de || We, ne = ne || We, te.pixelRatio = ye.pixelRatio, X.pixelRatio = ye.pixelRatio;
                  var Ee = Q.length, Ne = Me[0], Ie = Me[1];
                  Ne[0] = Ne[1] = Ne[2] = 1 / 0, Ie[0] = Ie[1] = Ie[2] = -1 / 0;
                  for (var ge = 0; ge < Ee; ++ge) {
                    (ct = Q[ge]).pixelRatio = ye.pixelRatio, ct.axes = ye.axes, de = de || !!ct.dirty, ne = ne || !!ct.dirty;
                    var Ce = ct.bounds;
                    if (Ce) for (var we = Ce[0], Ge = Ce[1], Re = 0; Re < 3; ++Re) Ne[Re] = Math.min(Ne[Re], we[Re]), Ie[Re] = Math.max(Ie[Re], Ge[Re]);
                  }
                  var je = ye.bounds;
                  if (ye.autoBounds) for (Re = 0; Re < 3; ++Re) {
                    if (Ie[Re] < Ne[Re]) Ne[Re] = -1, Ie[Re] = 1;
                    else {
                      Ne[Re] === Ie[Re] && (Ne[Re] -= 1, Ie[Re] += 1);
                      var Ke = 0.05 * (Ie[Re] - Ne[Re]);
                      Ne[Re] = Ne[Re] - Ke, Ie[Re] = Ie[Re] + Ke;
                    }
                    je[0][Re] = Ne[Re], je[1][Re] = Ie[Re];
                  }
                  var tt = !1;
                  for (Re = 0; Re < 3; ++Re) tt = tt || De[0][Re] !== je[0][Re] || De[1][Re] !== je[1][Re], De[0][Re] = je[0][Re], De[1][Re] = je[1][Re];
                  if (ne = ne || tt, de = de || tt) {
                    if (tt) {
                      var _e = [0, 0, 0];
                      for (ge = 0; ge < 3; ++ge) _e[ge] = M((je[1][ge] - je[0][ge]) / 10);
                      te.autoTicks ? te.update({ bounds: je, tickSpacing: _e }) : te.update({ bounds: je });
                    }
                    var Be = F.drawingBufferWidth, $e = F.drawingBufferHeight;
                    for (se[0] = Be, se[1] = $e, pe[0] = 0 | Math.max(Be / ye.pixelRatio, 1), pe[1] = 0 | Math.max($e / ye.pixelRatio, 1), function(ft, _t) {
                      var Pt = ft.bounds, Dt = ft.cameraParams, $t = Dt.projection, Gt = Dt.model, Wt = ft.gl.drawingBufferWidth, mt = ft.gl.drawingBufferHeight, at = ft.zNear, vt = ft.zFar, St = ft.fovy, Je = Wt / mt;
                      _t ? (L($t, -Je, Je, -1, 1, at, vt), Dt._ortho = !0) : (D($t, St, Je, at, vt), Dt._ortho = !1);
                      for (var nt = 0; nt < 16; ++nt) Gt[nt] = 0;
                      Gt[15] = 1;
                      var ot = 0;
                      for (nt = 0; nt < 3; ++nt) ot = Math.max(ot, Pt[1][nt] - Pt[0][nt]);
                      for (nt = 0; nt < 3; ++nt) ft.autoScale ? Gt[5 * nt] = ft.aspect[nt] / (Pt[1][nt] - Pt[0][nt]) : Gt[5 * nt] = 1 / ot, ft.autoCenter && (Gt[12 + nt] = 0.5 * -Gt[5 * nt] * (Pt[0][nt] + Pt[1][nt]));
                    }(ye, K), ge = 0; ge < Ee; ++ge) (ct = Q[ge]).axesBounds = je, ye.clipToBounds && (ct.clipBounds = je);
                    V.object && (ye.snapToData ? X.position = V.dataCoordinate : X.position = V.dataPosition, X.bounds = je), ne && (ne = !1, function() {
                      if (!Se()) {
                        F.colorMask(!0, !0, !0, !0), F.depthMask(!0), F.disable(F.BLEND), F.enable(F.DEPTH_TEST), F.depthFunc(F.LEQUAL);
                        for (var ft = Q.length, _t = he.length, Pt = 0; Pt < _t; ++Pt) {
                          var Dt = he[Pt];
                          Dt.shape = pe, Dt.begin();
                          for (var $t = 0; $t < ft; ++$t) if (ue[$t] === Pt) {
                            var Gt = Q[$t];
                            Gt.drawPick && (Gt.pixelRatio = 1, Gt.drawPick(ae));
                          }
                          Dt.end();
                        }
                      }
                    }()), ye.axesPixels = x(ye.axes, ae, Be, $e), ye.onrender && ye.onrender(), F.bindFramebuffer(F.FRAMEBUFFER, null), F.viewport(0, 0, Be, $e), ye.clearRGBA(), F.depthMask(!0), F.colorMask(!0, !0, !0, !0), F.enable(F.DEPTH_TEST), F.depthFunc(F.LEQUAL), F.disable(F.BLEND), F.disable(F.CULL_FACE);
                    var Ze = !1;
                    for (te.enable && (Ze = Ze || te.isTransparent(), te.draw(ae)), X.axes = te, V.object && X.draw(ae), F.disable(F.CULL_FACE), ge = 0; ge < Ee; ++ge) (ct = Q[ge]).axes = te, ct.pixelRatio = ye.pixelRatio, ct.isOpaque && ct.isOpaque() && ct.draw(ae), ct.isTransparent && ct.isTransparent() && (Ze = !0);
                    if (Ze) {
                      for ($.shape = se, $.bind(), F.clear(F.DEPTH_BUFFER_BIT), F.colorMask(!1, !1, !1, !1), F.depthMask(!0), F.depthFunc(F.LESS), te.enable && te.isTransparent() && te.drawTransparent(ae), ge = 0; ge < Ee; ++ge) (ct = Q[ge]).isOpaque && ct.isOpaque() && ct.draw(ae);
                      for (F.enable(F.BLEND), F.blendEquation(F.FUNC_ADD), F.blendFunc(F.ONE, F.ONE_MINUS_SRC_ALPHA), F.colorMask(!0, !0, !0, !0), F.depthMask(!1), F.clearColor(0, 0, 0, 0), F.clear(F.COLOR_BUFFER_BIT), te.isTransparent() && te.drawTransparent(ae), ge = 0; ge < Ee; ++ge) {
                        var ct;
                        (ct = Q[ge]).isTransparent && ct.isTransparent() && ct.drawTransparent(ae);
                      }
                      F.bindFramebuffer(F.FRAMEBUFFER, null), F.blendFunc(F.ONE, F.ONE_MINUS_SRC_ALPHA), F.disable(F.DEPTH_TEST), q.bind(), $.color[0].bind(0), q.uniforms.accumBuffer = 0, A(F), F.disable(F.BLEND);
                    }
                    for (de = !1, ge = 0; ge < Ee; ++ge) Q[ge].dirty = !1;
                  }
                }
              }
              return ye.enableMouseListeners(), function We() {
                ye._stopped || ye.contextLost || (Le(), requestAnimationFrame(We));
              }(), ye.redraw = function() {
                ye._stopped || (de = !0, Le());
              }, ye;
            }, createCamera: g };
          }, 6640: function(d, f, c) {
            var g = c(3236);
            f.pointVertex = g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;

uniform mat3 matrix;
uniform float pointSize;
uniform float pointCloud;

highp float rand(vec2 co) {
  highp float a = 12.9898;
  highp float b = 78.233;
  highp float c = 43758.5453;
  highp float d = dot(co.xy, vec2(a, b));
  highp float e = mod(d, 3.14);
  return fract(sin(e) * c);
}

void main() {
  vec3 hgPosition = matrix * vec3(position, 1);
  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
    // if we don't jitter the point size a bit, overall point cloud
    // saturation 'jumps' on zooming, which is disturbing and confusing
  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);
  if(pointCloud != 0.0) { // pointCloud is truthy
    // get the same square surface as circle would be
    gl_PointSize *= 0.886;
  }
}`]), f.pointFragment = g([`precision mediump float;
#define GLSLIFY 1

uniform vec4 color, borderColor;
uniform float centerFraction;
uniform float pointCloud;

void main() {
  float radius;
  vec4 baseColor;
  if(pointCloud != 0.0) { // pointCloud is truthy
    if(centerFraction == 1.0) {
      gl_FragColor = color;
    } else {
      gl_FragColor = mix(borderColor, color, centerFraction);
    }
  } else {
    radius = length(2.0 * gl_PointCoord.xy - 1.0);
    if(radius > 1.0) {
      discard;
    }
    baseColor = mix(borderColor, color, step(radius, centerFraction));
    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);
  }
}
`]), f.pickVertex = g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 position;
attribute vec4 pickId;

uniform mat3 matrix;
uniform float pointSize;
uniform vec4 pickOffset;

varying vec4 fragId;

void main() {
  vec3 hgPosition = matrix * vec3(position, 1);
  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);
  gl_PointSize = pointSize;

  vec4 id = pickId + pickOffset;
  id.y += floor(id.x / 256.0);
  id.x -= floor(id.x / 256.0) * 256.0;

  id.z += floor(id.y / 256.0);
  id.y -= floor(id.y / 256.0) * 256.0;

  id.w += floor(id.z / 256.0);
  id.z -= floor(id.z / 256.0) * 256.0;

  fragId = id;
}
`]), f.pickFragment = g([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragId;

void main() {
  float radius = length(2.0 * gl_PointCoord.xy - 1.0);
  if(radius > 1.0) {
    discard;
  }
  gl_FragColor = fragId / 255.0;
}
`]);
          }, 4696: function(d, f, c) {
            var g = c(9405), m = c(2762), x = c(1888), w = c(6640);
            function k(D, L, E, P, I) {
              this.plot = D, this.offsetBuffer = L, this.pickBuffer = E, this.shader = P, this.pickShader = I, this.sizeMin = 0.5, this.sizeMinCap = 2, this.sizeMax = 20, this.areaRatio = 1, this.pointCount = 0, this.color = [1, 0, 0, 1], this.borderColor = [0, 0, 0, 1], this.blend = !1, this.pickOffset = 0, this.points = null;
            }
            d.exports = function(D, L) {
              var E = D.gl, P = new k(D, m(E), m(E), g(E, w.pointVertex, w.pointFragment), g(E, w.pickVertex, w.pickFragment));
              return P.update(L), D.addObject(P), P;
            };
            var S, A, C = k.prototype;
            C.dispose = function() {
              this.shader.dispose(), this.pickShader.dispose(), this.offsetBuffer.dispose(), this.pickBuffer.dispose(), this.plot.removeObject(this);
            }, C.update = function(D) {
              var L;
              function E(F, U) {
                return F in D ? D[F] : U;
              }
              D = D || {}, this.sizeMin = E("sizeMin", 0.5), this.sizeMax = E("sizeMax", 20), this.color = E("color", [1, 0, 0, 1]).slice(), this.areaRatio = E("areaRatio", 1), this.borderColor = E("borderColor", [0, 0, 0, 1]).slice(), this.blend = E("blend", !1);
              var P = D.positions.length >>> 1, I = D.positions instanceof Float32Array, M = D.idToIndex instanceof Int32Array && D.idToIndex.length >= P, O = D.positions, T = I ? O : x.mallocFloat32(O.length), z = M ? D.idToIndex : x.mallocInt32(P);
              if (I || T.set(O), !M) for (T.set(O), L = 0; L < P; L++) z[L] = L;
              this.points = O, this.offsetBuffer.update(T), this.pickBuffer.update(z), I || x.free(T), M || x.free(z), this.pointCount = P, this.pickOffset = 0;
            }, C.unifiedDraw = (S = [1, 0, 0, 0, 1, 0, 0, 0, 1], A = [0, 0, 0, 0], function(D) {
              var L = D !== void 0, E = L ? this.pickShader : this.shader, P = this.plot.gl, I = this.plot.dataBox;
              if (this.pointCount === 0) return D;
              var M = I[2] - I[0], O = I[3] - I[1], T = function(V, $) {
                var q, K = 0, re = V.length >>> 1;
                for (q = 0; q < re; q++) {
                  var Y = V[2 * q], te = V[2 * q + 1];
                  Y >= $[0] && Y <= $[2] && te >= $[1] && te <= $[3] && K++;
                }
                return K;
              }(this.points, I), z = this.plot.pickPixelRatio * Math.max(Math.min(this.sizeMinCap, this.sizeMin), Math.min(this.sizeMax, this.sizeMax / Math.pow(T, 0.33333)));
              S[0] = 2 / M, S[4] = 2 / O, S[6] = -2 * I[0] / M - 1, S[7] = -2 * I[1] / O - 1, this.offsetBuffer.bind(), E.bind(), E.attributes.position.pointer(), E.uniforms.matrix = S, E.uniforms.color = this.color, E.uniforms.borderColor = this.borderColor, E.uniforms.pointCloud = z < 5, E.uniforms.pointSize = z, E.uniforms.centerFraction = Math.min(1, Math.max(0, Math.sqrt(1 - this.areaRatio))), L && (A[0] = 255 & D, A[1] = D >> 8 & 255, A[2] = D >> 16 & 255, A[3] = D >> 24 & 255, this.pickBuffer.bind(), E.attributes.pickId.pointer(P.UNSIGNED_BYTE), E.uniforms.pickOffset = A, this.pickOffset = D);
              var F = P.getParameter(P.BLEND), U = P.getParameter(P.DITHER);
              return F && !this.blend && P.disable(P.BLEND), U && P.disable(P.DITHER), P.drawArrays(P.POINTS, 0, this.pointCount), F && !this.blend && P.enable(P.BLEND), U && P.enable(P.DITHER), D + this.pointCount;
            }), C.draw = C.unifiedDraw, C.drawPick = C.unifiedDraw, C.pick = function(D, L, E) {
              var P = this.pickOffset, I = this.pointCount;
              if (E < P || E >= P + I) return null;
              var M = E - P, O = this.points;
              return { object: this, pointId: M, dataCoord: [O[2 * M], O[2 * M + 1]] };
            };
          }, 783: function(d) {
            d.exports = function(f, c, g, m) {
              var x, w, k, S, A, C = c[0], D = c[1], L = c[2], E = c[3], P = g[0], I = g[1], M = g[2], O = g[3];
              return (w = C * P + D * I + L * M + E * O) < 0 && (w = -w, P = -P, I = -I, M = -M, O = -O), 1 - w > 1e-6 ? (x = Math.acos(w), k = Math.sin(x), S = Math.sin((1 - m) * x) / k, A = Math.sin(m * x) / k) : (S = 1 - m, A = m), f[0] = S * C + A * P, f[1] = S * D + A * I, f[2] = S * L + A * M, f[3] = S * E + A * O, f;
            };
          }, 5964: function(d) {
            d.exports = function(f) {
              return f || f === 0 ? f.toString() : "";
            };
          }, 9366: function(d, f, c) {
            var g = c(4359);
            d.exports = function(x, w, k) {
              var S = [w.style, w.weight, w.variant, w.family].join("_"), A = m[S];
              if (A || (A = m[S] = {}), x in A) return A[x];
              var C = { textAlign: "center", textBaseline: "middle", lineHeight: 1, font: w.family, fontStyle: w.style, fontWeight: w.weight, fontVariant: w.variant, lineSpacing: 1.25, styletags: { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 }, triangles: !0 }, D = g(x, C);
              C.triangles = !1;
              var L, E, P = g(x, C);
              if (k && k !== 1) {
                for (L = 0; L < D.positions.length; ++L) for (E = 0; E < D.positions[L].length; ++E) D.positions[L][E] /= k;
                for (L = 0; L < P.positions.length; ++L) for (E = 0; E < P.positions[L].length; ++E) P.positions[L][E] /= k;
              }
              var I = [[1 / 0, 1 / 0], [-1 / 0, -1 / 0]], M = P.positions.length;
              for (L = 0; L < M; ++L) {
                var O = P.positions[L];
                for (E = 0; E < 2; ++E) I[0][E] = Math.min(I[0][E], O[E]), I[1][E] = Math.max(I[1][E], O[E]);
              }
              return A[x] = [D, P, I];
            };
            var m = {};
          }, 1283: function(d, f, c) {
            var g = c(9405), m = c(3236), x = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = 1.0;
    if(distance(highlightId, id) < 0.0001) {
      scale = highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1);
    vec4 viewPosition = view * worldPosition;
    viewPosition = viewPosition / viewPosition.w;
    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]), w = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float highlightScale, pixelRatio;
uniform vec4 highlightId;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = pixelRatio;
    if(distance(highlightId.bgr, id.bgr) < 0.001) {
      scale *= highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1.0);
    vec4 viewPosition = view * worldPosition;
    vec4 clipPosition = projection * viewPosition;
    clipPosition /= clipPosition.w;

    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]), k = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform float highlightScale;
uniform vec4 highlightId;
uniform vec3 axes[2];
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float scale, pixelRatio;

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float lscale = pixelRatio * scale;
    if(distance(highlightId, id) < 0.0001) {
      lscale *= highlightScale;
    }

    vec4 clipCenter   = projection * (view * (model * vec4(position, 1)));
    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
    vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = dataPosition;
  }
}
`]), S = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float opacity;

varying vec4 interpColor;
varying vec3 dataCoordinate;

void main() {
  if (
    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
    interpColor.a * opacity == 0.
  ) discard;
  gl_FragColor = interpColor * opacity;
}
`]), A = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 fragClipBounds[2];
uniform float pickGroup;

varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;

  gl_FragColor = vec4(pickGroup, pickId.bgr);
}`]), C = [{ name: "position", type: "vec3" }, { name: "color", type: "vec4" }, { name: "glyph", type: "vec2" }, { name: "id", type: "vec4" }], D = { vertex: x, fragment: S, attributes: C }, L = { vertex: w, fragment: S, attributes: C }, E = { vertex: k, fragment: S, attributes: C }, P = { vertex: x, fragment: A, attributes: C }, I = { vertex: w, fragment: A, attributes: C }, M = { vertex: k, fragment: A, attributes: C };
            function O(T, z) {
              var F = g(T, z), U = F.attributes;
              return U.position.location = 0, U.color.location = 1, U.glyph.location = 2, U.id.location = 3, F;
            }
            f.createPerspective = function(T) {
              return O(T, D);
            }, f.createOrtho = function(T) {
              return O(T, L);
            }, f.createProject = function(T) {
              return O(T, E);
            }, f.createPickPerspective = function(T) {
              return O(T, P);
            }, f.createPickOrtho = function(T) {
              return O(T, I);
            }, f.createPickProject = function(T) {
              return O(T, M);
            };
          }, 8418: function(d, f, c) {
            var g = c(5219), m = c(2762), x = c(8116), w = c(1888), k = c(6760), S = c(1283), A = c(9366), C = c(5964), D = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], L = ArrayBuffer, E = DataView;
            function P(de) {
              return Array.isArray(de) || function(ne) {
                return L.isView(ne) && !(ne instanceof E);
              }(de);
            }
            function I(de, ne) {
              var ae = de[0], se = de[1], me = de[2], ye = de[3];
              return de[0] = ne[0] * ae + ne[4] * se + ne[8] * me + ne[12] * ye, de[1] = ne[1] * ae + ne[5] * se + ne[9] * me + ne[13] * ye, de[2] = ne[2] * ae + ne[6] * se + ne[10] * me + ne[14] * ye, de[3] = ne[3] * ae + ne[7] * se + ne[11] * me + ne[15] * ye, de;
            }
            function M(de, ne, ae, se) {
              return I(se, se), I(se, se), I(se, se);
            }
            function O(de, ne) {
              this.index = de, this.dataCoordinate = this.position = ne;
            }
            function T(de) {
              return de === !0 || de > 1 ? 1 : de;
            }
            function z(de, ne, ae, se, me, ye, pe, be, Ae, Se, Me, De) {
              this.gl = de, this.pixelRatio = 1, this.shader = ne, this.orthoShader = ae, this.projectShader = se, this.pointBuffer = me, this.colorBuffer = ye, this.glyphBuffer = pe, this.idBuffer = be, this.vao = Ae, this.vertexCount = 0, this.lineVertexCount = 0, this.opacity = 1, this.hasAlpha = !1, this.lineWidth = 0, this.projectScale = [0.6666666666666666, 0.6666666666666666, 0.6666666666666666], this.projectOpacity = [1, 1, 1], this.projectHasAlpha = !1, this.pickId = 0, this.pickPerspectiveShader = Se, this.pickOrthoShader = Me, this.pickProjectShader = De, this.points = [], this._selectResult = new O(0, [0, 0, 0]), this.useOrtho = !0, this.bounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.axesProject = [!0, !0, !0], this.axesBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.highlightId = [1, 1, 1, 1], this.highlightScale = 2, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.dirty = !0;
            }
            d.exports = function(de) {
              var ne = de.gl, ae = S.createPerspective(ne), se = S.createOrtho(ne), me = S.createProject(ne), ye = S.createPickPerspective(ne), pe = S.createPickOrtho(ne), be = S.createPickProject(ne), Ae = m(ne), Se = m(ne), Me = m(ne), De = m(ne), Le = new z(ne, ae, se, me, Ae, Se, Me, De, x(ne, [{ buffer: Ae, size: 3, type: ne.FLOAT }, { buffer: Se, size: 4, type: ne.FLOAT }, { buffer: Me, size: 2, type: ne.FLOAT }, { buffer: De, size: 4, type: ne.UNSIGNED_BYTE, normalized: !0 }]), ye, pe, be);
              return Le.update(de), Le;
            };
            var F = z.prototype;
            F.pickSlots = 1, F.setPickBase = function(de) {
              this.pickId = de;
            }, F.isTransparent = function() {
              if (this.hasAlpha) return !0;
              for (var de = 0; de < 3; ++de) if (this.axesProject[de] && this.projectHasAlpha) return !0;
              return !1;
            }, F.isOpaque = function() {
              if (!this.hasAlpha) return !0;
              for (var de = 0; de < 3; ++de) if (this.axesProject[de] && !this.projectHasAlpha) return !0;
              return !1;
            };
            var U = [0, 0], V = [0, 0, 0], $ = [0, 0, 0], q = [0, 0, 0, 1], K = [0, 0, 0, 1], re = D.slice(), Y = [0, 0, 0], te = [[0, 0, 0], [0, 0, 0]];
            function ee(de) {
              return de[0] = de[1] = de[2] = 0, de;
            }
            function X(de, ne) {
              return de[0] = ne[0], de[1] = ne[1], de[2] = ne[2], de[3] = 1, de;
            }
            function Q(de, ne, ae, se) {
              return de[0] = ne[0], de[1] = ne[1], de[2] = ne[2], de[ae] = se, de;
            }
            var ue = [[-1e8, -1e8, -1e8], [1e8, 1e8, 1e8]];
            function ce(de, ne, ae, se, me, ye, pe) {
              var be = ae.gl;
              if ((ye === ae.projectHasAlpha || pe) && function(Se, Me, De, Le) {
                var We, Ee = Me.axesProject, Ne = Me.gl, Ie = Se.uniforms, ge = De.model || D, Ce = De.view || D, we = De.projection || D, Ge = Me.axesBounds, Re = function(Gt) {
                  for (var Wt = te, mt = 0; mt < 2; ++mt) for (var at = 0; at < 3; ++at) Wt[mt][at] = Math.max(Math.min(Gt[mt][at], 1e8), -1e8);
                  return Wt;
                }(Me.clipBounds);
                We = Me.axes && Me.axes.lastCubeProps ? Me.axes.lastCubeProps.axis : [1, 1, 1], U[0] = 2 / Ne.drawingBufferWidth, U[1] = 2 / Ne.drawingBufferHeight, Se.bind(), Ie.view = Ce, Ie.projection = we, Ie.screenSize = U, Ie.highlightId = Me.highlightId, Ie.highlightScale = Me.highlightScale, Ie.clipBounds = Re, Ie.pickGroup = Me.pickId / 255, Ie.pixelRatio = Le;
                for (var je = 0; je < 3; ++je) if (Ee[je]) {
                  Ie.scale = Me.projectScale[je], Ie.opacity = Me.projectOpacity[je];
                  for (var Ke = re, tt = 0; tt < 16; ++tt) Ke[tt] = 0;
                  for (tt = 0; tt < 4; ++tt) Ke[5 * tt] = 1;
                  Ke[5 * je] = 0, We[je] < 0 ? Ke[12 + je] = Ge[0][je] : Ke[12 + je] = Ge[1][je], k(Ke, ge, Ke), Ie.model = Ke;
                  var _e = (je + 1) % 3, Be = (je + 2) % 3, $e = ee(V), Ze = ee($);
                  $e[_e] = 1, Ze[Be] = 1;
                  var ct = M(0, 0, 0, X(q, $e)), ft = M(0, 0, 0, X(K, Ze));
                  if (Math.abs(ct[1]) > Math.abs(ft[1])) {
                    var _t = ct;
                    ct = ft, ft = _t, _t = $e, $e = Ze, Ze = _t;
                    var Pt = _e;
                    _e = Be, Be = Pt;
                  }
                  ct[0] < 0 && ($e[_e] = -1), ft[1] > 0 && (Ze[Be] = -1);
                  var Dt = 0, $t = 0;
                  for (tt = 0; tt < 4; ++tt) Dt += Math.pow(ge[4 * _e + tt], 2), $t += Math.pow(ge[4 * Be + tt], 2);
                  $e[_e] /= Math.sqrt(Dt), Ze[Be] /= Math.sqrt($t), Ie.axes[0] = $e, Ie.axes[1] = Ze, Ie.fragClipBounds[0] = Q(Y, Re[0], je, -1e8), Ie.fragClipBounds[1] = Q(Y, Re[1], je, 1e8), Me.vao.bind(), Me.vao.draw(Ne.TRIANGLES, Me.vertexCount), Me.lineWidth > 0 && (Ne.lineWidth(Me.lineWidth * Le), Me.vao.draw(Ne.LINES, Me.lineVertexCount, Me.vertexCount)), Me.vao.unbind();
                }
              }(ne, ae, se, me), ye === ae.hasAlpha || pe) {
                de.bind();
                var Ae = de.uniforms;
                Ae.model = se.model || D, Ae.view = se.view || D, Ae.projection = se.projection || D, U[0] = 2 / be.drawingBufferWidth, U[1] = 2 / be.drawingBufferHeight, Ae.screenSize = U, Ae.highlightId = ae.highlightId, Ae.highlightScale = ae.highlightScale, Ae.fragClipBounds = ue, Ae.clipBounds = ae.axes.bounds, Ae.opacity = ae.opacity, Ae.pickGroup = ae.pickId / 255, Ae.pixelRatio = me, ae.vao.bind(), ae.vao.draw(be.TRIANGLES, ae.vertexCount), ae.lineWidth > 0 && (be.lineWidth(ae.lineWidth * me), ae.vao.draw(be.LINES, ae.lineVertexCount, ae.vertexCount)), ae.vao.unbind();
              }
            }
            function he(de, ne, ae, se) {
              var me;
              me = P(de) ? ne < de.length ? de[ne] : void 0 : de, me = C(me);
              var ye = !0;
              g(me) && (me = "▼", ye = !1), ae || (ae = {});
              var pe = ae.family;
              P(pe) && (pe = pe[ne]), pe || (pe = "normal");
              var be = ae.weight;
              P(be) && (be = be[ne]), be || (be = "normal");
              var Ae = ae.style;
              P(Ae) && (Ae = Ae[ne]), Ae || (Ae = "normal");
              var Se = ae.variant;
              P(Se) && (Se = Se[ne]), Se || (Se = "normal");
              var Me = A(me, { family: pe, weight: be, style: Ae, variant: Se }, se);
              return { mesh: (Me = A(me, ae, se))[0], lines: Me[1], bounds: Me[2], visible: ye };
            }
            F.draw = function(de) {
              ce(this.useOrtho ? this.orthoShader : this.shader, this.projectShader, this, de, this.pixelRatio, !1, !1);
            }, F.drawTransparent = function(de) {
              ce(this.useOrtho ? this.orthoShader : this.shader, this.projectShader, this, de, this.pixelRatio, !0, !1);
            }, F.drawPick = function(de) {
              ce(this.useOrtho ? this.pickOrthoShader : this.pickPerspectiveShader, this.pickProjectShader, this, de, 1, !0, !0);
            }, F.pick = function(de) {
              if (!de || de.id !== this.pickId) return null;
              var ne = de.value[2] + (de.value[1] << 8) + (de.value[0] << 16);
              if (ne >= this.pointCount || ne < 0) return null;
              var ae = this.points[ne], se = this._selectResult;
              se.index = ne;
              for (var me = 0; me < 3; ++me) se.position[me] = se.dataCoordinate[me] = ae[me];
              return se;
            }, F.highlight = function(de) {
              if (de) {
                var ne = de.index, ae = 255 & ne, se = ne >> 8 & 255, me = ne >> 16 & 255;
                this.highlightId = [ae / 255, se / 255, me / 255, 0];
              } else this.highlightId = [1, 1, 1, 1];
            }, F.update = function(de) {
              if ("perspective" in (de = de || {}) && (this.useOrtho = !de.perspective), "orthographic" in de && (this.useOrtho = !!de.orthographic), "lineWidth" in de && (this.lineWidth = de.lineWidth), "project" in de) if (P(de.project)) this.axesProject = de.project;
              else {
                var ne = !!de.project;
                this.axesProject = [ne, ne, ne];
              }
              if ("projectScale" in de) if (P(de.projectScale)) this.projectScale = de.projectScale.slice();
              else {
                var ae = +de.projectScale;
                this.projectScale = [ae, ae, ae];
              }
              if (this.projectHasAlpha = !1, "projectOpacity" in de) {
                P(de.projectOpacity) ? this.projectOpacity = de.projectOpacity.slice() : (ae = +de.projectOpacity, this.projectOpacity = [ae, ae, ae]);
                for (var se = 0; se < 3; ++se) this.projectOpacity[se] = T(this.projectOpacity[se]), this.projectOpacity[se] < 1 && (this.projectHasAlpha = !0);
              }
              this.hasAlpha = !1, "opacity" in de && (this.opacity = T(de.opacity), this.opacity < 1 && (this.hasAlpha = !0)), this.dirty = !0;
              var me, ye, pe = de.position, be = { family: de.font || "normal", style: de.fontStyle || "normal", weight: de.fontWeight || "normal", variant: de.fontVariant || "normal" }, Ae = de.alignment || [0, 0];
              if (Ae.length === 2) me = Ae[0], ye = Ae[1];
              else for (me = [], ye = [], se = 0; se < Ae.length; ++se) me[se] = Ae[se][0], ye[se] = Ae[se][1];
              var Se = [1 / 0, 1 / 0, 1 / 0], Me = [-1 / 0, -1 / 0, -1 / 0], De = de.glyph, Le = de.color, We = de.size, Ee = de.angle, Ne = de.lineColor, Ie = -1, ge = 0, Ce = 0, we = 0;
              if (pe.length) {
                we = pe.length;
                e: for (se = 0; se < we; ++se) {
                  for (var Ge = pe[se], Re = 0; Re < 3; ++Re) if (isNaN(Ge[Re]) || !isFinite(Ge[Re])) continue e;
                  var je = (Wt = he(De, se, be, this.pixelRatio)).mesh, Ke = Wt.lines, tt = Wt.bounds;
                  ge += 3 * je.cells.length, Ce += 2 * Ke.edges.length;
                }
              }
              var _e = ge + Ce, Be = w.mallocFloat(3 * _e), $e = w.mallocFloat(4 * _e), Ze = w.mallocFloat(2 * _e), ct = w.mallocUint32(_e);
              if (_e > 0) {
                var ft = 0, _t = ge, Pt = [0, 0, 0, 1], Dt = [0, 0, 0, 1], $t = P(Le) && P(Le[0]), Gt = P(Ne) && P(Ne[0]);
                e: for (se = 0; se < we; ++se) {
                  for (Ie += 1, Ge = pe[se], Re = 0; Re < 3; ++Re) {
                    if (isNaN(Ge[Re]) || !isFinite(Ge[Re])) continue e;
                    Me[Re] = Math.max(Me[Re], Ge[Re]), Se[Re] = Math.min(Se[Re], Ge[Re]);
                  }
                  je = (Wt = he(De, se, be, this.pixelRatio)).mesh, Ke = Wt.lines, tt = Wt.bounds;
                  var Wt, mt = Wt.visible;
                  if (mt) if (P(Le)) {
                    if ((at = $t ? se < Le.length ? Le[se] : [0, 0, 0, 0] : Le).length === 3) {
                      for (Re = 0; Re < 3; ++Re) Pt[Re] = at[Re];
                      Pt[3] = 1;
                    } else if (at.length === 4) {
                      for (Re = 0; Re < 4; ++Re) Pt[Re] = at[Re];
                      !this.hasAlpha && at[3] < 1 && (this.hasAlpha = !0);
                    }
                  } else Pt[0] = Pt[1] = Pt[2] = 0, Pt[3] = 1;
                  else Pt = [1, 1, 1, 0];
                  if (mt) if (P(Ne)) {
                    var at;
                    if ((at = Gt ? se < Ne.length ? Ne[se] : [0, 0, 0, 0] : Ne).length === 3) {
                      for (Re = 0; Re < 3; ++Re) Dt[Re] = at[Re];
                      Dt[Re] = 1;
                    } else if (at.length === 4) {
                      for (Re = 0; Re < 4; ++Re) Dt[Re] = at[Re];
                      !this.hasAlpha && at[3] < 1 && (this.hasAlpha = !0);
                    }
                  } else Dt[0] = Dt[1] = Dt[2] = 0, Dt[3] = 1;
                  else Dt = [1, 1, 1, 0];
                  var vt = 0.5;
                  mt ? P(We) ? vt = se < We.length ? +We[se] : 12 : We ? vt = +We : this.useOrtho && (vt = 12) : vt = 0;
                  var St = 0;
                  P(Ee) ? St = se < Ee.length ? +Ee[se] : 0 : Ee && (St = +Ee);
                  var Je = Math.cos(St), nt = Math.sin(St);
                  for (Ge = pe[se], Re = 0; Re < 3; ++Re) Me[Re] = Math.max(Me[Re], Ge[Re]), Se[Re] = Math.min(Se[Re], Ge[Re]);
                  var ot = me, Ye = ye;
                  ot = 0, P(me) ? ot = se < me.length ? me[se] : 0 : me && (ot = me), Ye = 0, P(ye) ? Ye = se < ye.length ? ye[se] : 0 : ye && (Ye = ye);
                  var Fe = [ot *= ot > 0 ? 1 - tt[0][0] : ot < 0 ? 1 + tt[1][0] : 1, Ye *= Ye > 0 ? 1 - tt[0][1] : Ye < 0 ? 1 + tt[1][1] : 1], pt = je.cells || [], Mt = je.positions || [];
                  for (Re = 0; Re < pt.length; ++Re) for (var At = pt[Re], Rt = 0; Rt < 3; ++Rt) {
                    for (var Ft = 0; Ft < 3; ++Ft) Be[3 * ft + Ft] = Ge[Ft];
                    for (Ft = 0; Ft < 4; ++Ft) $e[4 * ft + Ft] = Pt[Ft];
                    ct[ft] = Ie;
                    var lt = Mt[At[Rt]];
                    Ze[2 * ft] = vt * (Je * lt[0] - nt * lt[1] + Fe[0]), Ze[2 * ft + 1] = vt * (nt * lt[0] + Je * lt[1] + Fe[1]), ft += 1;
                  }
                  for (pt = Ke.edges, Mt = Ke.positions, Re = 0; Re < pt.length; ++Re) for (At = pt[Re], Rt = 0; Rt < 2; ++Rt) {
                    for (Ft = 0; Ft < 3; ++Ft) Be[3 * _t + Ft] = Ge[Ft];
                    for (Ft = 0; Ft < 4; ++Ft) $e[4 * _t + Ft] = Dt[Ft];
                    ct[_t] = Ie, lt = Mt[At[Rt]], Ze[2 * _t] = vt * (Je * lt[0] - nt * lt[1] + Fe[0]), Ze[2 * _t + 1] = vt * (nt * lt[0] + Je * lt[1] + Fe[1]), _t += 1;
                  }
                }
              }
              this.bounds = [Se, Me], this.points = pe, this.pointCount = pe.length, this.vertexCount = ge, this.lineVertexCount = Ce, this.pointBuffer.update(Be), this.colorBuffer.update($e), this.glyphBuffer.update(Ze), this.idBuffer.update(ct), w.free(Be), w.free($e), w.free(Ze), w.free(ct);
            }, F.dispose = function() {
              this.shader.dispose(), this.orthoShader.dispose(), this.pickPerspectiveShader.dispose(), this.pickOrthoShader.dispose(), this.vao.dispose(), this.pointBuffer.dispose(), this.colorBuffer.dispose(), this.glyphBuffer.dispose(), this.idBuffer.dispose();
            };
          }, 4298: function(d, f, c) {
            var g = c(3236);
            f.boxVertex = g([`precision mediump float;
#define GLSLIFY 1

attribute vec2 vertex;

uniform vec2 cornerA, cornerB;

void main() {
  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);
}
`]), f.boxFragment = g([`precision mediump float;
#define GLSLIFY 1

uniform vec4 color;

void main() {
  gl_FragColor = color;
}
`]);
          }, 3161: function(d, f, c) {
            var g = c(9405), m = c(2762), x = c(4298);
            function w(S, A, C) {
              this.plot = S, this.boxBuffer = A, this.boxShader = C, this.enabled = !0, this.selectBox = [1 / 0, 1 / 0, -1 / 0, -1 / 0], this.borderColor = [0, 0, 0, 1], this.innerFill = !1, this.innerColor = [0, 0, 0, 0.25], this.outerFill = !0, this.outerColor = [0, 0, 0, 0.5], this.borderWidth = 10;
            }
            d.exports = function(S, A) {
              var C = S.gl, D = new w(S, m(C, [0, 0, 0, 1, 1, 0, 1, 1]), g(C, x.boxVertex, x.boxFragment));
              return D.update(A), S.addOverlay(D), D;
            };
            var k = w.prototype;
            k.draw = function() {
              if (this.enabled) {
                var S = this.plot, A = this.selectBox, C = this.borderWidth, D = (this.innerFill, this.innerColor), L = (this.outerFill, this.outerColor), E = this.borderColor, P = S.box, I = S.screenBox, M = S.dataBox, O = S.viewBox, T = S.pixelRatio, z = (A[0] - M[0]) * (O[2] - O[0]) / (M[2] - M[0]) + O[0], F = (A[1] - M[1]) * (O[3] - O[1]) / (M[3] - M[1]) + O[1], U = (A[2] - M[0]) * (O[2] - O[0]) / (M[2] - M[0]) + O[0], V = (A[3] - M[1]) * (O[3] - O[1]) / (M[3] - M[1]) + O[1];
                if (z = Math.max(z, O[0]), F = Math.max(F, O[1]), U = Math.min(U, O[2]), V = Math.min(V, O[3]), !(U < z || V < F)) {
                  P.bind();
                  var $ = I[2] - I[0], q = I[3] - I[1];
                  if (this.outerFill && (P.drawBox(0, 0, $, F, L), P.drawBox(0, F, z, V, L), P.drawBox(0, V, $, q, L), P.drawBox(U, F, $, V, L)), this.innerFill && P.drawBox(z, F, U, V, D), C > 0) {
                    var K = C * T;
                    P.drawBox(z - K, F - K, U + K, F + K, E), P.drawBox(z - K, V - K, U + K, V + K, E), P.drawBox(z - K, F - K, z + K, V + K, E), P.drawBox(U - K, F - K, U + K, V + K, E);
                  }
                }
              }
            }, k.update = function(S) {
              S = S || {}, this.innerFill = !!S.innerFill, this.outerFill = !!S.outerFill, this.innerColor = (S.innerColor || [0, 0, 0, 0.5]).slice(), this.outerColor = (S.outerColor || [0, 0, 0, 0.5]).slice(), this.borderColor = (S.borderColor || [0, 0, 0, 1]).slice(), this.borderWidth = S.borderWidth || 0, this.selectBox = (S.selectBox || this.selectBox).slice();
            }, k.dispose = function() {
              this.boxBuffer.dispose(), this.boxShader.dispose(), this.plot.removeOverlay(this);
            };
          }, 3589: function(d, f, c) {
            d.exports = function(C, D) {
              var L = D[0], E = D[1];
              return new S(C, g(C, L, E, {}), m.mallocUint8(L * E * 4));
            };
            var g = c(2260), m = c(1888), x = c(9618), w = c(8828).nextPow2;
            function k(C, D, L, E, P) {
              this.coord = [C, D], this.id = L, this.value = E, this.distance = P;
            }
            function S(C, D, L) {
              this.gl = C, this.fbo = D, this.buffer = L, this._readTimeout = null;
              var E = this;
              this._readCallback = function() {
                E.gl && (D.bind(), C.readPixels(0, 0, D.shape[0], D.shape[1], C.RGBA, C.UNSIGNED_BYTE, E.buffer), E._readTimeout = null);
              };
            }
            var A = S.prototype;
            Object.defineProperty(A, "shape", { get: function() {
              return this.gl ? this.fbo.shape.slice() : [0, 0];
            }, set: function(C) {
              if (this.gl) {
                this.fbo.shape = C;
                var D = this.fbo.shape[0], L = this.fbo.shape[1];
                if (L * D * 4 > this.buffer.length) {
                  m.free(this.buffer);
                  for (var E = this.buffer = m.mallocUint8(w(L * D * 4)), P = 0; P < L * D * 4; ++P) E[P] = 255;
                }
                return C;
              }
            } }), A.begin = function() {
              var C = this.gl;
              this.shape, C && (this.fbo.bind(), C.clearColor(1, 1, 1, 1), C.clear(C.COLOR_BUFFER_BIT | C.DEPTH_BUFFER_BIT));
            }, A.end = function() {
              var C = this.gl;
              C && (C.bindFramebuffer(C.FRAMEBUFFER, null), this._readTimeout || clearTimeout(this._readTimeout), this._readTimeout = setTimeout(this._readCallback, 1));
            }, A.query = function(C, D, L) {
              if (!this.gl) return null;
              var E = this.fbo.shape.slice();
              C |= 0, D |= 0, typeof L != "number" && (L = 1);
              var P = 0 | Math.min(Math.max(C - L, 0), E[0]), I = 0 | Math.min(Math.max(C + L, 0), E[0]), M = 0 | Math.min(Math.max(D - L, 0), E[1]), O = 0 | Math.min(Math.max(D + L, 0), E[1]);
              if (I <= P || O <= M) return null;
              var T = [I - P, O - M], z = x(this.buffer, [T[0], T[1], 4], [4, 4 * E[0], 1], 4 * (P + E[0] * M)), F = function($, q, K) {
                for (var re = 1e8, Y = -1, te = -1, ee = $.shape[0], X = $.shape[1], Q = 0; Q < ee; Q++) for (var ue = 0; ue < X; ue++) {
                  var ce = $.get(Q, ue, 0), he = $.get(Q, ue, 1), de = $.get(Q, ue, 2), ne = $.get(Q, ue, 3);
                  if (ce < 255 || he < 255 || de < 255 || ne < 255) {
                    var ae = q - Q, se = K - ue, me = ae * ae + se * se;
                    me < re && (re = me, Y = Q, te = ue);
                  }
                }
                return [Y, te, re];
              }(z.hi(T[0], T[1], 1), L, L), U = F[0], V = F[1];
              return U < 0 || Math.pow(this.radius, 2) < F[2] ? null : new k(U + P | 0, V + M | 0, z.get(U, V, 0), [z.get(U, V, 1), z.get(U, V, 2), z.get(U, V, 3)], Math.sqrt(F[2]));
            }, A.dispose = function() {
              this.gl && (this.fbo.dispose(), m.free(this.buffer), this.gl = null, this._readTimeout && clearTimeout(this._readTimeout));
            };
          }, 9405: function(d, f, c) {
            var g = c(3327), m = c(8731), x = c(216), w = c(5091), k = c(2145), S = c(8866);
            function A(L) {
              this.gl = L, this.gl.lastAttribCount = 0, this._vref = this._fref = this._relink = this.vertShader = this.fragShader = this.program = this.attributes = this.uniforms = this.types = null;
            }
            var C = A.prototype;
            function D(L, E) {
              return L.name < E.name ? -1 : 1;
            }
            C.bind = function() {
              var L;
              this.program || this._relink();
              var E = this.gl.getProgramParameter(this.program, this.gl.ACTIVE_ATTRIBUTES), P = this.gl.lastAttribCount;
              if (E > P) for (L = P; L < E; L++) this.gl.enableVertexAttribArray(L);
              else if (P > E) for (L = E; L < P; L++) this.gl.disableVertexAttribArray(L);
              this.gl.lastAttribCount = E, this.gl.useProgram(this.program);
            }, C.dispose = function() {
              for (var L = this.gl.lastAttribCount, E = 0; E < L; E++) this.gl.disableVertexAttribArray(E);
              this.gl.lastAttribCount = 0, this._fref && this._fref.dispose(), this._vref && this._vref.dispose(), this.attributes = this.types = this.vertShader = this.fragShader = this.program = this._relink = this._fref = this._vref = null;
            }, C.update = function(L, E, P, I) {
              if (!E || arguments.length === 1) {
                var M = L;
                L = M.vertex, E = M.fragment, P = M.uniforms, I = M.attributes;
              }
              var O = this, T = O.gl, z = O._vref;
              O._vref = w.shader(T, T.VERTEX_SHADER, L), z && z.dispose(), O.vertShader = O._vref.shader;
              var F = this._fref;
              if (O._fref = w.shader(T, T.FRAGMENT_SHADER, E), F && F.dispose(), O.fragShader = O._fref.shader, !P || !I) {
                var U = T.createProgram();
                if (T.attachShader(U, O.fragShader), T.attachShader(U, O.vertShader), T.linkProgram(U), !T.getProgramParameter(U, T.LINK_STATUS)) {
                  var V = T.getProgramInfoLog(U);
                  throw new S(V, "Error linking program:" + V);
                }
                P = P || k.uniforms(T, U), I = I || k.attributes(T, U), T.deleteProgram(U);
              }
              (I = I.slice()).sort(D);
              var $, q = [], K = [], re = [];
              for ($ = 0; $ < I.length; ++$) {
                var Y = I[$];
                if (Y.type.indexOf("mat") >= 0) {
                  for (var te = 0 | Y.type.charAt(Y.type.length - 1), ee = new Array(te), X = 0; X < te; ++X) ee[X] = re.length, K.push(Y.name + "[" + X + "]"), typeof Y.location == "number" ? re.push(Y.location + X) : Array.isArray(Y.location) && Y.location.length === te && typeof Y.location[X] == "number" ? re.push(0 | Y.location[X]) : re.push(-1);
                  q.push({ name: Y.name, type: Y.type, locations: ee });
                } else q.push({ name: Y.name, type: Y.type, locations: [re.length] }), K.push(Y.name), typeof Y.location == "number" ? re.push(0 | Y.location) : re.push(-1);
              }
              var Q = 0;
              for ($ = 0; $ < re.length; ++$) if (re[$] < 0) {
                for (; re.indexOf(Q) >= 0; ) Q += 1;
                re[$] = Q;
              }
              var ue = new Array(P.length);
              function ce() {
                O.program = w.program(T, O._vref, O._fref, K, re);
                for (var he = 0; he < P.length; ++he) ue[he] = T.getUniformLocation(O.program, P[he].name);
              }
              ce(), O._relink = ce, O.types = { uniforms: x(P), attributes: x(I) }, O.attributes = m(T, O, q, re), Object.defineProperty(O, "uniforms", g(T, O, P, ue));
            }, d.exports = function(L, E, P, I, M) {
              var O = new A(L);
              return O.update(E, P, I, M), O;
            };
          }, 8866: function(d) {
            function f(c, g, m) {
              this.shortMessage = g || "", this.longMessage = m || "", this.rawError = c || "", this.message = "gl-shader: " + (g || c || "") + (m ? `
` + m : ""), this.stack = new Error().stack;
            }
            f.prototype = new Error(), f.prototype.name = "GLError", f.prototype.constructor = f, d.exports = f;
          }, 8731: function(d, f, c) {
            d.exports = function(A, C, D, L) {
              for (var E = {}, P = 0, I = D.length; P < I; ++P) {
                var M = D[P], O = M.name, T = M.type, z = M.locations;
                switch (T) {
                  case "bool":
                  case "int":
                  case "float":
                    k(A, C, z[0], L, 1, E, O);
                    break;
                  default:
                    if (T.indexOf("vec") >= 0) {
                      if ((F = T.charCodeAt(T.length - 1) - 48) < 2 || F > 4) throw new g("", "Invalid data type for attribute " + O + ": " + T);
                      k(A, C, z[0], L, F, E, O);
                    } else {
                      if (!(T.indexOf("mat") >= 0)) throw new g("", "Unknown data type for attribute " + O + ": " + T);
                      var F;
                      if ((F = T.charCodeAt(T.length - 1) - 48) < 2 || F > 4) throw new g("", "Invalid data type for attribute " + O + ": " + T);
                      S(A, C, z, L, F, E, O);
                    }
                }
              }
              return E;
            };
            var g = c(8866);
            function m(A, C, D, L, E, P) {
              this._gl = A, this._wrapper = C, this._index = D, this._locations = L, this._dimension = E, this._constFunc = P;
            }
            var x = m.prototype;
            x.pointer = function(A, C, D, L) {
              var E = this, P = E._gl, I = E._locations[E._index];
              P.vertexAttribPointer(I, E._dimension, A || P.FLOAT, !!C, D || 0, L || 0), P.enableVertexAttribArray(I);
            }, x.set = function(A, C, D, L) {
              return this._constFunc(this._locations[this._index], A, C, D, L);
            }, Object.defineProperty(x, "location", { get: function() {
              return this._locations[this._index];
            }, set: function(A) {
              return A !== this._locations[this._index] && (this._locations[this._index] = 0 | A, this._wrapper.program = null), 0 | A;
            } });
            var w = [function(A, C, D) {
              return D.length === void 0 ? A.vertexAttrib1f(C, D) : A.vertexAttrib1fv(C, D);
            }, function(A, C, D, L) {
              return D.length === void 0 ? A.vertexAttrib2f(C, D, L) : A.vertexAttrib2fv(C, D);
            }, function(A, C, D, L, E) {
              return D.length === void 0 ? A.vertexAttrib3f(C, D, L, E) : A.vertexAttrib3fv(C, D);
            }, function(A, C, D, L, E, P) {
              return D.length === void 0 ? A.vertexAttrib4f(C, D, L, E, P) : A.vertexAttrib4fv(C, D);
            }];
            function k(A, C, D, L, E, P, I) {
              var M = w[E], O = new m(A, C, D, L, E, M);
              Object.defineProperty(P, I, { set: function(T) {
                return A.disableVertexAttribArray(L[D]), M(A, L[D], T), T;
              }, get: function() {
                return O;
              }, enumerable: !0 });
            }
            function S(A, C, D, L, E, P, I) {
              for (var M = new Array(E), O = new Array(E), T = 0; T < E; ++T) k(A, C, D[T], L, E, M, T), O[T] = M[T];
              Object.defineProperty(M, "location", { set: function(U) {
                if (Array.isArray(U)) for (var V = 0; V < E; ++V) O[V].location = U[V];
                else for (V = 0; V < E; ++V) O[V].location = U + V;
                return U;
              }, get: function() {
                for (var U = new Array(E), V = 0; V < E; ++V) U[V] = L[D[V]];
                return U;
              }, enumerable: !0 }), M.pointer = function(U, V, $, q) {
                U = U || A.FLOAT, V = !!V, $ = $ || E * E, q = q || 0;
                for (var K = 0; K < E; ++K) {
                  var re = L[D[K]];
                  A.vertexAttribPointer(re, E, U, V, $, q + K * E), A.enableVertexAttribArray(re);
                }
              };
              var z = new Array(E), F = A["vertexAttrib" + E + "fv"];
              Object.defineProperty(P, I, { set: function(U) {
                for (var V = 0; V < E; ++V) {
                  var $ = L[D[V]];
                  if (A.disableVertexAttribArray($), Array.isArray(U[0])) F.call(A, $, U[V]);
                  else {
                    for (var q = 0; q < E; ++q) z[q] = U[E * V + q];
                    F.call(A, $, z);
                  }
                }
                return U;
              }, get: function() {
                return M;
              }, enumerable: !0 });
            }
          }, 3327: function(d, f, c) {
            var g = c(216), m = c(8866);
            function x(k) {
              return function() {
                return k;
              };
            }
            function w(k, S) {
              for (var A = new Array(k), C = 0; C < k; ++C) A[C] = S;
              return A;
            }
            d.exports = function(k, S, A, C) {
              function D(M) {
                return function(O) {
                  for (var T = L("", M), z = 0; z < T.length; ++z) {
                    var F = T[z], U = F[0], V = F[1];
                    if (C[V]) {
                      var $ = O;
                      if (typeof U == "string" && (U.indexOf(".") === 0 || U.indexOf("[") === 0)) {
                        var q = U;
                        if (U.indexOf(".") === 0 && (q = U.slice(1)), q.indexOf("]") === q.length - 1) {
                          var K = q.indexOf("["), re = q.slice(0, K), Y = q.slice(K + 1, q.length - 1);
                          $ = re ? O[re][Y] : O[Y];
                        } else $ = O[q];
                      }
                      var te, ee = A[V].type;
                      switch (ee) {
                        case "bool":
                        case "int":
                        case "sampler2D":
                        case "samplerCube":
                          k.uniform1i(C[V], $);
                          break;
                        case "float":
                          k.uniform1f(C[V], $);
                          break;
                        default:
                          var X = ee.indexOf("vec");
                          if (!(0 <= X && X <= 1 && ee.length === 4 + X)) {
                            if (ee.indexOf("mat") === 0 && ee.length === 4) {
                              if ((te = ee.charCodeAt(ee.length - 1) - 48) < 2 || te > 4) throw new m("", "Invalid uniform dimension type for matrix " + name + ": " + ee);
                              k["uniformMatrix" + te + "fv"](C[V], !1, $);
                              break;
                            }
                            throw new m("", "Unknown uniform data type for " + name + ": " + ee);
                          }
                          if ((te = ee.charCodeAt(ee.length - 1) - 48) < 2 || te > 4) throw new m("", "Invalid data type");
                          switch (ee.charAt(0)) {
                            case "b":
                            case "i":
                              k["uniform" + te + "iv"](C[V], $);
                              break;
                            case "v":
                              k["uniform" + te + "fv"](C[V], $);
                              break;
                            default:
                              throw new m("", "Unrecognized data type for vector " + name + ": " + ee);
                          }
                      }
                    }
                  }
                };
              }
              function L(M, O) {
                if (typeof O != "object") return [[M, O]];
                var T = [];
                for (var z in O) {
                  var F = O[z], U = M;
                  parseInt(z) + "" === z ? U += "[" + z + "]" : U += "." + z, typeof F == "object" ? T.push.apply(T, L(U, F)) : T.push([U, F]);
                }
                return T;
              }
              function E(M, O, T) {
                if (typeof T == "object") {
                  var z = P(T);
                  Object.defineProperty(M, O, { get: x(z), set: D(T), enumerable: !0, configurable: !1 });
                } else C[T] ? Object.defineProperty(M, O, { get: (F = T, function(U, V, $) {
                  return U.getUniform(V.program, $[F]);
                }), set: D(T), enumerable: !0, configurable: !1 }) : M[O] = function(U) {
                  switch (U) {
                    case "bool":
                      return !1;
                    case "int":
                    case "sampler2D":
                    case "samplerCube":
                    case "float":
                      return 0;
                    default:
                      var V = U.indexOf("vec");
                      if (0 <= V && V <= 1 && U.length === 4 + V) {
                        if (($ = U.charCodeAt(U.length - 1) - 48) < 2 || $ > 4) throw new m("", "Invalid data type");
                        return U.charAt(0) === "b" ? w($, !1) : w($, 0);
                      }
                      if (U.indexOf("mat") === 0 && U.length === 4) {
                        var $;
                        if (($ = U.charCodeAt(U.length - 1) - 48) < 2 || $ > 4) throw new m("", "Invalid uniform dimension type for matrix " + name + ": " + U);
                        return w($ * $, 0);
                      }
                      throw new m("", "Unknown uniform data type for " + name + ": " + U);
                  }
                }(A[T].type);
                var F;
              }
              function P(M) {
                var O;
                if (Array.isArray(M)) {
                  O = new Array(M.length);
                  for (var T = 0; T < M.length; ++T) E(O, T, M[T]);
                } else for (var z in O = {}, M) E(O, z, M[z]);
                return O;
              }
              var I = g(A, !0);
              return { get: x(P(I)), set: D(I), enumerable: !0, configurable: !0 };
            };
          }, 216: function(d) {
            d.exports = function(f, c) {
              for (var g = {}, m = 0; m < f.length; ++m) for (var x = f[m].name.split("."), w = g, k = 0; k < x.length; ++k) {
                var S = x[k].split("[");
                if (S.length > 1) {
                  S[0] in w || (w[S[0]] = []), w = w[S[0]];
                  for (var A = 1; A < S.length; ++A) {
                    var C = parseInt(S[A]);
                    A < S.length - 1 || k < x.length - 1 ? (C in w || (A < S.length - 1 ? w[C] = [] : w[C] = {}), w = w[C]) : w[C] = c ? m : f[m].type;
                  }
                } else k < x.length - 1 ? (S[0] in w || (w[S[0]] = {}), w = w[S[0]]) : w[S[0]] = c ? m : f[m].type;
              }
              return g;
            };
          }, 2145: function(d, f) {
            f.uniforms = function(x, w) {
              for (var k = x.getProgramParameter(w, x.ACTIVE_UNIFORMS), S = [], A = 0; A < k; ++A) {
                var C = x.getActiveUniform(w, A);
                if (C) {
                  var D = m(x, C.type);
                  if (C.size > 1) for (var L = 0; L < C.size; ++L) S.push({ name: C.name.replace("[0]", "[" + L + "]"), type: D });
                  else S.push({ name: C.name, type: D });
                }
              }
              return S;
            }, f.attributes = function(x, w) {
              for (var k = x.getProgramParameter(w, x.ACTIVE_ATTRIBUTES), S = [], A = 0; A < k; ++A) {
                var C = x.getActiveAttrib(w, A);
                C && S.push({ name: C.name, type: m(x, C.type) });
              }
              return S;
            };
            var c = { FLOAT: "float", FLOAT_VEC2: "vec2", FLOAT_VEC3: "vec3", FLOAT_VEC4: "vec4", INT: "int", INT_VEC2: "ivec2", INT_VEC3: "ivec3", INT_VEC4: "ivec4", BOOL: "bool", BOOL_VEC2: "bvec2", BOOL_VEC3: "bvec3", BOOL_VEC4: "bvec4", FLOAT_MAT2: "mat2", FLOAT_MAT3: "mat3", FLOAT_MAT4: "mat4", SAMPLER_2D: "sampler2D", SAMPLER_CUBE: "samplerCube" }, g = null;
            function m(x, w) {
              if (!g) {
                var k = Object.keys(c);
                g = {};
                for (var S = 0; S < k.length; ++S) {
                  var A = k[S];
                  g[x[A]] = c[A];
                }
              }
              return g[w];
            }
          }, 5091: function(d, f, c) {
            f.shader = function(D, L, E) {
              return C(D).getShaderReference(L, E);
            }, f.program = function(D, L, E, P, I) {
              return C(D).getProgram(L, E, P, I);
            };
            var g = c(8866), m = c(2992), x = new (typeof WeakMap > "u" ? c(606) : WeakMap)(), w = 0;
            function k(D, L, E, P, I, M, O) {
              this.id = D, this.src = L, this.type = E, this.shader = P, this.count = M, this.programs = [], this.cache = O;
            }
            function S(D) {
              this.gl = D, this.shaders = [{}, {}], this.programs = {};
            }
            k.prototype.dispose = function() {
              if (--this.count == 0) {
                for (var D = this.cache, L = D.gl, E = this.programs, P = 0, I = E.length; P < I; ++P) {
                  var M = D.programs[E[P]];
                  M && (delete D.programs[P], L.deleteProgram(M));
                }
                L.deleteShader(this.shader), delete D.shaders[this.type === L.FRAGMENT_SHADER | 0][this.src];
              }
            };
            var A = S.prototype;
            function C(D) {
              var L = x.get(D);
              return L || (L = new S(D), x.set(D, L)), L;
            }
            A.getShaderReference = function(D, L) {
              var E = this.gl, P = this.shaders[D === E.FRAGMENT_SHADER | 0], I = P[L];
              if (I && E.isShader(I.shader)) I.count += 1;
              else {
                var M = function(O, T, z) {
                  var F = O.createShader(T);
                  if (O.shaderSource(F, z), O.compileShader(F), !O.getShaderParameter(F, O.COMPILE_STATUS)) {
                    var U = O.getShaderInfoLog(F);
                    try {
                      var V = m(U, z, T);
                    } catch ($) {
                      throw console.warn("Failed to format compiler error: " + $), new g(U, `Error compiling shader:
` + U);
                    }
                    throw new g(U, V.short, V.long);
                  }
                  return F;
                }(E, D, L);
                I = P[L] = new k(w++, L, D, M, [], 1, this);
              }
              return I;
            }, A.getProgram = function(D, L, E, P) {
              var I = [D.id, L.id, E.join(":"), P.join(":")].join("@"), M = this.programs[I];
              return M && this.gl.isProgram(M) || (this.programs[I] = M = function(O, T, z, F, U) {
                var V = O.createProgram();
                O.attachShader(V, T), O.attachShader(V, z);
                for (var $ = 0; $ < F.length; ++$) O.bindAttribLocation(V, U[$], F[$]);
                if (O.linkProgram(V), !O.getProgramParameter(V, O.LINK_STATUS)) {
                  var q = O.getProgramInfoLog(V);
                  throw new g(q, "Error linking program: " + q);
                }
                return V;
              }(this.gl, D.shader, L.shader, E, P), D.programs.push(I), L.programs.push(I)), M;
            };
          }, 4098: function(d) {
            function f(g) {
              this.plot = g, this.enable = [!0, !0, !1, !1], this.width = [1, 1, 1, 1], this.color = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.center = [1 / 0, 1 / 0];
            }
            d.exports = function(g, m) {
              var x = new f(g);
              return x.update(m), g.addOverlay(x), x;
            };
            var c = f.prototype;
            c.update = function(g) {
              g = g || {}, this.enable = (g.enable || [!0, !0, !1, !1]).slice(), this.width = (g.width || [1, 1, 1, 1]).slice(), this.color = (g.color || [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]]).map(function(m) {
                return m.slice();
              }), this.center = (g.center || [1 / 0, 1 / 0]).slice(), this.plot.setOverlayDirty();
            }, c.draw = function() {
              var g = this.enable, m = this.width, x = this.color, w = this.center, k = this.plot, S = k.line, A = k.dataBox, C = k.viewBox;
              if (S.bind(), A[0] <= w[0] && w[0] <= A[2] && A[1] <= w[1] && w[1] <= A[3]) {
                var D = C[0] + (w[0] - A[0]) / (A[2] - A[0]) * (C[2] - C[0]), L = C[1] + (w[1] - A[1]) / (A[3] - A[1]) * (C[3] - C[1]);
                g[0] && S.drawLine(D, L, C[0], L, m[0], x[0]), g[1] && S.drawLine(D, L, D, C[1], m[1], x[1]), g[2] && S.drawLine(D, L, C[2], L, m[2], x[2]), g[3] && S.drawLine(D, L, D, C[3], m[3], x[3]);
              }
            }, c.dispose = function() {
              this.plot.removeOverlay(this);
            };
          }, 1493: function(d, f, c) {
            var g = c(3236), m = c(9405), x = g([`precision mediump float;
#define GLSLIFY 1

attribute vec3 position, color;
attribute float weight;

uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;

varying vec4 fragColor;

void main() {
  vec3 vertexPosition = mix(coordinates[0],
    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));

  vec4 clipPos = projection * (view * (model * vec4(vertexPosition, 1.0)));
  vec2 clipOffset = (projection * (view * (model * vec4(color, 0.0)))).xy;
  vec2 delta = weight * clipOffset * screenShape;
  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;

  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]), w = g([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);
            d.exports = function(k) {
              return m(k, x, w, null, [{ name: "position", type: "vec3" }, { name: "color", type: "vec3" }, { name: "weight", type: "float" }]);
            };
          }, 4449: function(d, f, c) {
            var g = c(2762), m = c(8116), x = c(1493);
            d.exports = function(L, E) {
              var P = [];
              function I(F, U, V, $, q, K) {
                var re = [F, U, V, 0, 0, 0, 1];
                re[$ + 3] = 1, re[$] = q, P.push.apply(P, re), re[6] = -1, P.push.apply(P, re), re[$] = K, P.push.apply(P, re), P.push.apply(P, re), re[6] = 1, P.push.apply(P, re), re[$] = q, P.push.apply(P, re);
              }
              I(0, 0, 0, 0, 0, 1), I(0, 0, 0, 1, 0, 1), I(0, 0, 0, 2, 0, 1), I(1, 0, 0, 1, -1, 1), I(1, 0, 0, 2, -1, 1), I(0, 1, 0, 0, -1, 1), I(0, 1, 0, 2, -1, 1), I(0, 0, 1, 0, -1, 1), I(0, 0, 1, 1, -1, 1);
              var M = g(L, P), O = m(L, [{ type: L.FLOAT, buffer: M, size: 3, offset: 0, stride: 28 }, { type: L.FLOAT, buffer: M, size: 3, offset: 12, stride: 28 }, { type: L.FLOAT, buffer: M, size: 1, offset: 24, stride: 28 }]), T = x(L);
              T.attributes.position.location = 0, T.attributes.color.location = 1, T.attributes.weight.location = 2;
              var z = new k(L, M, O, T);
              return z.update(E), z;
            };
            var w = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
            function k(L, E, P, I) {
              this.gl = L, this.buffer = E, this.vao = P, this.shader = I, this.pixelRatio = 1, this.bounds = [[-1e3, -1e3, -1e3], [1e3, 1e3, 1e3]], this.position = [0, 0, 0], this.lineWidth = [2, 2, 2], this.colors = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.enabled = [!0, !0, !0], this.drawSides = [!0, !0, !0], this.axes = null;
            }
            var S = k.prototype, A = [0, 0, 0], C = [0, 0, 0], D = [0, 0];
            S.isTransparent = function() {
              return !1;
            }, S.drawTransparent = function(L) {
            }, S.draw = function(L) {
              var E = this.gl, P = this.vao, I = this.shader;
              P.bind(), I.bind();
              var M, O = L.model || w, T = L.view || w, z = L.projection || w;
              this.axes && (M = this.axes.lastCubeProps.axis);
              for (var F = A, U = C, V = 0; V < 3; ++V) M && M[V] < 0 ? (F[V] = this.bounds[0][V], U[V] = this.bounds[1][V]) : (F[V] = this.bounds[1][V], U[V] = this.bounds[0][V]);
              for (D[0] = E.drawingBufferWidth, D[1] = E.drawingBufferHeight, I.uniforms.model = O, I.uniforms.view = T, I.uniforms.projection = z, I.uniforms.coordinates = [this.position, F, U], I.uniforms.colors = this.colors, I.uniforms.screenShape = D, V = 0; V < 3; ++V) I.uniforms.lineWidth = this.lineWidth[V] * this.pixelRatio, this.enabled[V] && (P.draw(E.TRIANGLES, 6, 6 * V), this.drawSides[V] && P.draw(E.TRIANGLES, 12, 18 + 12 * V));
              P.unbind();
            }, S.update = function(L) {
              L && ("bounds" in L && (this.bounds = L.bounds), "position" in L && (this.position = L.position), "lineWidth" in L && (this.lineWidth = L.lineWidth), "colors" in L && (this.colors = L.colors), "enabled" in L && (this.enabled = L.enabled), "drawSides" in L && (this.drawSides = L.drawSides));
            }, S.dispose = function() {
              this.vao.dispose(), this.buffer.dispose(), this.shader.dispose();
            };
          }, 6740: function(d, f, c) {
            var g = c(3236), m = g([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 color, position;
attribute vec2 uv;

uniform float vectorScale, tubeScale;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  // Scale the vector magnitude to stay constant with
  // model & view changes.
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * tubePosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  f_lightDirection = lightPosition - cameraCoordinate.xyz;
  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;
  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);

  // vec4 m_position  = model * vec4(tubePosition, 1.0);
  vec4 t_position  = view * tubePosition;
  gl_Position      = projection * t_position;

  f_color          = color;
  f_data           = tubePosition.xyz;
  f_position       = position.xyz;
  f_uv             = uv;
}
`]), x = g([`#extension GL_OES_standard_derivatives : enable

precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float cookTorranceSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness,
  float fresnel) {

  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);

  //Half angle vector
  vec3 H = normalize(lightDirection + viewDirection);

  //Geometric term
  float NdotH = max(dot(surfaceNormal, H), 0.0);
  float VdotH = max(dot(viewDirection, H), 0.000001);
  float LdotH = max(dot(lightDirection, H), 0.000001);
  float G1 = (2.0 * NdotH * VdotN) / VdotH;
  float G2 = (2.0 * NdotH * LdotN) / LdotH;
  float G = min(1.0, min(G1, G2));
  
  //Distribution term
  float D = beckmannDistribution(NdotH, roughness);

  //Fresnel term
  float F = pow(1.0 - VdotN, fresnel);

  //Multiply terms and done
  return  G * F * D / max(3.14159265 * VdotN, 0.000001);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;

varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
  vec3 N = normalize(f_normal);
  vec3 L = normalize(f_lightDirection);
  vec3 V = normalize(f_eyeDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  vec4 surfaceColor = f_color * texture2D(texture, f_uv);
  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = litColor * opacity;
}
`]), w = g([`precision highp float;

precision highp float;
#define GLSLIFY 1

vec3 getOrthogonalVector(vec3 v) {
  // Return up-vector for only-z vector.
  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.
  // Assign z = 0, x = -b, y = a:
  // a*-b + b*a + c*0 = -ba + ba + 0 = 0
  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
    return normalize(vec3(-v.y, v.x, 0.0));
  } else {
    return normalize(vec3(0.0, v.z, -v.y));
  }
}

// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
  float segmentCount = 8.0;

  float angle = 2.0 * 3.14159 * (index / segmentCount);

  vec3 u = getOrthogonalVector(d);
  vec3 v = normalize(cross(u, d));

  vec3 x = u * cos(angle) * length(d);
  vec3 y = v * sin(angle) * length(d);
  vec3 v3 = x + y;

  normal = normalize(v3);

  return v3;
}

attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;

uniform mat4 model, view, projection;
uniform float tubeScale;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  vec3 normal;
  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);

  gl_Position = projection * (view * tubePosition);
  f_id        = id;
  f_position  = position.xyz;
}
`]), k = g([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3  clipBounds[2];
uniform float pickId;

varying vec3 f_position;
varying vec4 f_id;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;

  gl_FragColor = vec4(pickId, f_id.xyz);
}`]);
            f.meshShader = { vertex: m, fragment: x, attributes: [{ name: "position", type: "vec4" }, { name: "color", type: "vec4" }, { name: "uv", type: "vec2" }, { name: "vector", type: "vec4" }] }, f.pickShader = { vertex: w, fragment: k, attributes: [{ name: "position", type: "vec4" }, { name: "id", type: "vec4" }, { name: "vector", type: "vec4" }] };
          }, 7815: function(d, f, c) {
            var g = c(2931), m = c(9970), x = ["xyz", "xzy", "yxz", "yzx", "zxy", "zyx"], w = function(D, L) {
              var E, P = D.length;
              for (E = 0; E < P; E++) {
                var I = D[E];
                if (I === L) return E;
                if (I > L) return E - 1;
              }
              return E;
            }, k = function(D, L, E) {
              return D < L ? L : D > E ? E : D;
            }, S = function(D) {
              var L = 1 / 0;
              D.sort(function(M, O) {
                return M - O;
              });
              for (var E = D.length, P = 1; P < E; P++) {
                var I = Math.abs(D[P] - D[P - 1]);
                I < L && (L = I);
              }
              return L;
            };
            d.exports = function(D, L) {
              var E = D.startingPositions, P = D.maxLength || 1e3, I = D.tubeSize || 1, M = D.absoluteTubeSize, O = D.gridFill || "+x+y+z", T = {};
              O.indexOf("-x") !== -1 && (T.reversedX = !0), O.indexOf("-y") !== -1 && (T.reversedY = !0), O.indexOf("-z") !== -1 && (T.reversedZ = !0), T.filled = x.indexOf(O.replace(/-/g, "").replace(/\+/g, ""));
              var z = D.getVelocity || function(Le) {
                return function(We, Ee, Ne) {
                  var Ie = Ee.vectors, ge = Ee.meshgrid, Ce = We[0], we = We[1], Ge = We[2], Re = ge[0].length, je = ge[1].length, Ke = ge[2].length, tt = w(ge[0], Ce), _e = w(ge[1], we), Be = w(ge[2], Ge), $e = tt + 1, Ze = _e + 1, ct = Be + 1;
                  if (tt = k(tt, 0, Re - 1), $e = k($e, 0, Re - 1), _e = k(_e, 0, je - 1), Ze = k(Ze, 0, je - 1), Be = k(Be, 0, Ke - 1), ct = k(ct, 0, Ke - 1), tt < 0 || _e < 0 || Be < 0 || $e > Re - 1 || Ze > je - 1 || ct > Ke - 1) return g.create();
                  var ft, _t, Pt, Dt, $t, Gt, Wt = ge[0][tt], mt = ge[0][$e], at = ge[1][_e], vt = ge[1][Ze], St = ge[2][Be], Je = (Ce - Wt) / (mt - Wt), nt = (we - at) / (vt - at), ot = (Ge - St) / (ge[2][ct] - St);
                  switch (isFinite(Je) || (Je = 0.5), isFinite(nt) || (nt = 0.5), isFinite(ot) || (ot = 0.5), Ne.reversedX && (tt = Re - 1 - tt, $e = Re - 1 - $e), Ne.reversedY && (_e = je - 1 - _e, Ze = je - 1 - Ze), Ne.reversedZ && (Be = Ke - 1 - Be, ct = Ke - 1 - ct), Ne.filled) {
                    case 5:
                      $t = Be, Gt = ct, Pt = _e * Ke, Dt = Ze * Ke, ft = tt * Ke * je, _t = $e * Ke * je;
                      break;
                    case 4:
                      $t = Be, Gt = ct, ft = tt * Ke, _t = $e * Ke, Pt = _e * Ke * Re, Dt = Ze * Ke * Re;
                      break;
                    case 3:
                      Pt = _e, Dt = Ze, $t = Be * je, Gt = ct * je, ft = tt * je * Ke, _t = $e * je * Ke;
                      break;
                    case 2:
                      Pt = _e, Dt = Ze, ft = tt * je, _t = $e * je, $t = Be * je * Re, Gt = ct * je * Re;
                      break;
                    case 1:
                      ft = tt, _t = $e, $t = Be * Re, Gt = ct * Re, Pt = _e * Re * Ke, Dt = Ze * Re * Ke;
                      break;
                    default:
                      ft = tt, _t = $e, Pt = _e * Re, Dt = Ze * Re, $t = Be * Re * je, Gt = ct * Re * je;
                  }
                  var Ye = Ie[ft + Pt + $t], Fe = Ie[ft + Pt + Gt], pt = Ie[ft + Dt + $t], Mt = Ie[ft + Dt + Gt], At = Ie[_t + Pt + $t], Rt = Ie[_t + Pt + Gt], Ft = Ie[_t + Dt + $t], lt = Ie[_t + Dt + Gt], st = g.create(), Ot = g.create(), kt = g.create(), Bt = g.create();
                  g.lerp(st, Ye, At, Je), g.lerp(Ot, Fe, Rt, Je), g.lerp(kt, pt, Ft, Je), g.lerp(Bt, Mt, lt, Je);
                  var xt = g.create(), Jt = g.create();
                  g.lerp(xt, st, kt, nt), g.lerp(Jt, Ot, Bt, nt);
                  var qt = g.create();
                  return g.lerp(qt, xt, Jt, ot), qt;
                }(Le, D, T);
              }, F = D.getDivergence || function(Le, We) {
                var Ee = g.create(), Ne = 1e-4;
                g.add(Ee, Le, [Ne, 0, 0]);
                var Ie = z(Ee);
                g.subtract(Ie, Ie, We), g.scale(Ie, Ie, 1 / Ne), g.add(Ee, Le, [0, Ne, 0]);
                var ge = z(Ee);
                g.subtract(ge, ge, We), g.scale(ge, ge, 1 / Ne), g.add(Ee, Le, [0, 0, Ne]);
                var Ce = z(Ee);
                return g.subtract(Ce, Ce, We), g.scale(Ce, Ce, 1 / Ne), g.add(Ee, Ie, ge), g.add(Ee, Ee, Ce), Ee;
              }, U = [], V = L[0][0], $ = L[0][1], q = L[0][2], K = L[1][0], re = L[1][1], Y = L[1][2], te = function(Le) {
                var We = Le[0], Ee = Le[1], Ne = Le[2];
                return !(We < V || We > K || Ee < $ || Ee > re || Ne < q || Ne > Y);
              }, ee = 10 * g.distance(L[0], L[1]) / P, X = ee * ee, Q = 1, ue = 0, ce = E.length;
              ce > 1 && (Q = function(Le) {
                for (var We = [], Ee = [], Ne = [], Ie = {}, ge = {}, Ce = {}, we = Le.length, Ge = 0; Ge < we; Ge++) {
                  var Re = Le[Ge], je = Re[0], Ke = Re[1], tt = Re[2];
                  Ie[je] || (We.push(je), Ie[je] = !0), ge[Ke] || (Ee.push(Ke), ge[Ke] = !0), Ce[tt] || (Ne.push(tt), Ce[tt] = !0);
                }
                var _e = S(We), Be = S(Ee), $e = S(Ne), Ze = Math.min(_e, Be, $e);
                return isFinite(Ze) ? Ze : 1;
              }(E));
              for (var he = 0; he < ce; he++) {
                var de = g.create();
                g.copy(de, E[he]);
                var ne = [de], ae = [], se = z(de), me = de;
                ae.push(se);
                var ye = [], pe = F(de, se), be = g.length(pe);
                isFinite(be) && be > ue && (ue = be), ye.push(be), U.push({ points: ne, velocities: ae, divergences: ye });
                for (var Ae = 0; Ae < 100 * P && ne.length < P && te(de); ) {
                  Ae++;
                  var Se = g.clone(se), Me = g.squaredLength(Se);
                  if (Me === 0) break;
                  Me > X && g.scale(Se, Se, ee / Math.sqrt(Me)), g.add(Se, Se, de), se = z(Se), g.squaredDistance(me, Se) - X > -1e-4 * X && (ne.push(Se), me = Se, ae.push(se), pe = F(Se, se), be = g.length(pe), isFinite(be) && be > ue && (ue = be), ye.push(be)), de = Se;
                }
              }
              var De = function(Le, We, Ee, Ne) {
                for (var Ie = 0, ge = 0; ge < Le.length; ge++) for (var Ce = Le[ge].velocities, we = 0; we < Ce.length; we++) Ie = Math.max(Ie, g.length(Ce[we]));
                var Ge = Le.map(function(ft) {
                  return function(_t, Pt, Dt, $t) {
                    for (var Gt = _t.points, Wt = _t.velocities, mt = _t.divergences, at = [], vt = [], St = [], Je = [], nt = [], ot = [], Ye = 0, Fe = 0, pt = m.create(), Mt = m.create(), At = 0; At < Gt.length; At++) {
                      var Rt = Gt[At], Ft = Wt[At], lt = mt[At];
                      Pt === 0 && (lt = 0.05 * Dt), Fe = g.length(Ft) / $t, pt = m.create(), g.copy(pt, Ft), pt[3] = lt;
                      for (var st = 0; st < 8; st++) nt[st] = [Rt[0], Rt[1], Rt[2], st];
                      if (Je.length > 0) for (st = 0; st < 8; st++) {
                        var Ot = (st + 1) % 8;
                        at.push(Je[st], nt[st], nt[Ot], nt[Ot], Je[Ot], Je[st]), St.push(Mt, pt, pt, pt, Mt, Mt), ot.push(Ye, Fe, Fe, Fe, Ye, Ye);
                        var kt = at.length;
                        vt.push([kt - 6, kt - 5, kt - 4], [kt - 3, kt - 2, kt - 1]);
                      }
                      var Bt = Je;
                      Je = nt, nt = Bt;
                      var xt = Mt;
                      Mt = pt, pt = xt;
                      var Jt = Ye;
                      Ye = Fe, Fe = Jt;
                    }
                    return { positions: at, cells: vt, vectors: St, vertexIntensity: ot };
                  }(ft, Ee, Ne, Ie);
                }), Re = [], je = [], Ke = [], tt = [];
                for (ge = 0; ge < Ge.length; ge++) {
                  var _e = Ge[ge], Be = Re.length;
                  for (Re = Re.concat(_e.positions), Ke = Ke.concat(_e.vectors), tt = tt.concat(_e.vertexIntensity), we = 0; we < _e.cells.length; we++) {
                    var $e = _e.cells[we], Ze = [];
                    je.push(Ze);
                    for (var ct = 0; ct < $e.length; ct++) Ze.push($e[ct] + Be);
                  }
                }
                return { positions: Re, cells: je, vectors: Ke, vertexIntensity: tt, colormap: We };
              }(U, D.colormap, ue, Q);
              return M ? De.tubeScale = M : (ue === 0 && (ue = 1), De.tubeScale = 0.5 * I * Q / ue), De;
            };
            var A = c(6740), C = c(6405).createMesh;
            d.exports.createTubeMesh = function(D, L) {
              return C(D, L, { shaders: A, traceType: "streamtube" });
            };
          }, 990: function(d, f, c) {
            var g = c(9405), m = c(3236), x = m([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute vec3 f;
attribute vec3 normal;

uniform vec3 objectOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 lightPosition, eyePosition;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 localCoordinate = vec3(uv.zw, f.x);
  worldCoordinate = objectOffset + localCoordinate;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);
  vec4 clipPosition = projection * (view * worldPosition);
  gl_Position = clipPosition;
  kill = f.y;
  value = f.z;
  planeCoordinate = uv.xy;

  vColor = texture2D(colormap, vec2(value, value));

  //Lighting geometry parameters
  vec4 cameraCoordinate = view * worldPosition;
  cameraCoordinate.xyz /= cameraCoordinate.w;
  lightDirection = lightPosition - cameraCoordinate.xyz;
  eyeDirection   = eyePosition - cameraCoordinate.xyz;
  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);
}
`]), w = m([`precision highp float;
#define GLSLIFY 1

float beckmannDistribution(float x, float roughness) {
  float NdotH = max(x, 0.0001);
  float cos2Alpha = NdotH * NdotH;
  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
  float roughness2 = roughness * roughness;
  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
  return exp(tan2Alpha / roughness2) / denom;
}

float beckmannSpecular(
  vec3 lightDirection,
  vec3 viewDirection,
  vec3 surfaceNormal,
  float roughness) {
  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
}

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec3 lowerBound, upperBound;
uniform float contourTint;
uniform vec4 contourColor;
uniform sampler2D colormap;
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform float vertexColor;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  if (
    kill > 0.0 ||
    vColor.a == 0.0 ||
    outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
  ) discard;

  vec3 N = normalize(surfaceNormal);
  vec3 V = normalize(eyeDirection);
  vec3 L = normalize(lightDirection);

  if(gl_FrontFacing) {
    N = -N;
  }

  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);

  //decide how to interpolate color — in vertex or in fragment
  vec4 surfaceColor =
    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
    step(.5, vertexColor) * vColor;

  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);

  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
}
`]), k = m([`precision highp float;
#define GLSLIFY 1

attribute vec4 uv;
attribute float f;

uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;

void main() {
  vec3 dataCoordinate = permutation * vec3(uv.xy, height);
  worldCoordinate = objectOffset + dataCoordinate;
  mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
  vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);

  vec4 clipPosition = projection * (view * worldPosition);
  clipPosition.z += zOffset;

  gl_Position = clipPosition;
  value = f + objectOffset.z;
  kill = -1.0;
  planeCoordinate = uv.zw;

  vColor = texture2D(colormap, vec2(value, value));

  //Don't do lighting for contours
  surfaceNormal   = vec3(1,0,0);
  eyeDirection    = vec3(0,1,0);
  lightDirection  = vec3(0,0,1);
}
`]), S = m([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

uniform vec2 shape;
uniform vec3 clipBounds[2];
uniform float pickId;

varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 surfaceNormal;

vec2 splitFloat(float v) {
  float vh = 255.0 * v;
  float upper = floor(vh);
  float lower = fract(vh);
  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
}

void main() {
  if ((kill > 0.0) ||
      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;

  vec2 ux = splitFloat(planeCoordinate.x / shape.x);
  vec2 uy = splitFloat(planeCoordinate.y / shape.y);
  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
}
`]);
            f.createShader = function(A) {
              var C = g(A, x, w, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "vec3" }, { name: "normal", type: "vec3" }]);
              return C.attributes.uv.location = 0, C.attributes.f.location = 1, C.attributes.normal.location = 2, C;
            }, f.createPickShader = function(A) {
              var C = g(A, x, S, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "vec3" }, { name: "normal", type: "vec3" }]);
              return C.attributes.uv.location = 0, C.attributes.f.location = 1, C.attributes.normal.location = 2, C;
            }, f.createContourShader = function(A) {
              var C = g(A, k, w, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "float" }]);
              return C.attributes.uv.location = 0, C.attributes.f.location = 1, C;
            }, f.createPickContourShader = function(A) {
              var C = g(A, k, S, null, [{ name: "uv", type: "vec4" }, { name: "f", type: "float" }]);
              return C.attributes.uv.location = 0, C.attributes.f.location = 1, C;
            };
          }, 9499: function(d, f, c) {
            d.exports = function(pe) {
              var be = pe.gl, Ae = T(be), Se = F(be), Me = z(be), De = U(be), Le = m(be), We = x(be, [{ buffer: Le, size: 4, stride: V, offset: 0 }, { buffer: Le, size: 3, stride: V, offset: 16 }, { buffer: Le, size: 3, stride: V, offset: 28 }]), Ee = m(be), Ne = x(be, [{ buffer: Ee, size: 4, stride: 20, offset: 0 }, { buffer: Ee, size: 1, stride: 20, offset: 16 }]), Ie = m(be), ge = x(be, [{ buffer: Ie, size: 2, type: be.FLOAT }]), Ce = w(be, 1, Y, be.RGBA, be.UNSIGNED_BYTE);
              Ce.minFilter = be.LINEAR, Ce.magFilter = be.LINEAR;
              var we = new te(be, [0, 0], [[0, 0, 0], [0, 0, 0]], Ae, Se, Le, We, Ce, Me, De, Ee, Ne, Ie, ge, [0, 0, 0]), Ge = { levels: [[], [], []] };
              for (var Re in pe) Ge[Re] = pe[Re];
              return Ge.colormap = Ge.colormap || "jet", we.update(Ge), we;
            };
            var g = c(8828), m = c(2762), x = c(8116), w = c(7766), k = c(1888), S = c(6729), A = c(5298), C = c(9994), D = c(9618), L = c(3711), E = c(6760), P = c(7608), I = c(2478), M = c(6199), O = c(990), T = O.createShader, z = O.createContourShader, F = O.createPickShader, U = O.createPickContourShader, V = 40, $ = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], q = [[0, 0], [0, 1], [1, 0], [1, 1], [1, 0], [0, 1]], K = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
            function re(pe, be, Ae, Se, Me) {
              this.position = pe, this.index = be, this.uv = Ae, this.level = Se, this.dataCoordinate = Me;
            }
            (function() {
              for (var pe = 0; pe < 3; ++pe) {
                var be = K[pe], Ae = (pe + 2) % 3;
                be[(pe + 1) % 3 + 0] = 1, be[Ae + 3] = 1, be[pe + 6] = 1;
              }
            })();
            var Y = 256;
            function te(pe, be, Ae, Se, Me, De, Le, We, Ee, Ne, Ie, ge, Ce, we, Ge) {
              this.gl = pe, this.shape = be, this.bounds = Ae, this.objectOffset = Ge, this.intensityBounds = [], this._shader = Se, this._pickShader = Me, this._coordinateBuffer = De, this._vao = Le, this._colorMap = We, this._contourShader = Ee, this._contourPickShader = Ne, this._contourBuffer = Ie, this._contourVAO = ge, this._contourOffsets = [[], [], []], this._contourCounts = [[], [], []], this._vertexCount = 0, this._pickResult = new re([0, 0, 0], [0, 0], [0, 0], [0, 0, 0], [0, 0, 0]), this._dynamicBuffer = Ce, this._dynamicVAO = we, this._dynamicOffsets = [0, 0, 0], this._dynamicCounts = [0, 0, 0], this.contourWidth = [1, 1, 1], this.contourLevels = [[1], [1], [1]], this.contourTint = [0, 0, 0], this.contourColor = [[0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1], [0.5, 0.5, 0.5, 1]], this.showContour = !0, this.showSurface = !0, this.enableHighlight = [!0, !0, !0], this.highlightColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.highlightTint = [1, 1, 1], this.highlightLevel = [-1, -1, -1], this.enableDynamic = [!0, !0, !0], this.dynamicLevel = [NaN, NaN, NaN], this.dynamicColor = [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]], this.dynamicTint = [1, 1, 1], this.dynamicWidth = [1, 1, 1], this.axesBounds = [[1 / 0, 1 / 0, 1 / 0], [-1 / 0, -1 / 0, -1 / 0]], this.surfaceProject = [!1, !1, !1], this.contourProject = [[!1, !1, !1], [!1, !1, !1], [!1, !1, !1]], this.colorBounds = [!1, !1], this._field = [D(k.mallocFloat(1024), [0, 0]), D(k.mallocFloat(1024), [0, 0]), D(k.mallocFloat(1024), [0, 0])], this.pickId = 1, this.clipBounds = [[-1 / 0, -1 / 0, -1 / 0], [1 / 0, 1 / 0, 1 / 0]], this.snapToData = !1, this.pixelRatio = 1, this.opacity = 1, this.lightPosition = [10, 1e4, 0], this.ambientLight = 0.8, this.diffuseLight = 0.8, this.specularLight = 2, this.roughness = 0.5, this.fresnel = 1.5, this.vertexColor = 0, this.dirty = !0;
            }
            var ee = te.prototype;
            ee.genColormap = function(pe, be) {
              var Ae = !1, Se = C([S({ colormap: pe, nshades: Y, format: "rgba" }).map(function(Me, De) {
                var Le = be ? function(We, Ee) {
                  if (!Ee || !Ee.length) return 1;
                  for (var Ne = 0; Ne < Ee.length; ++Ne) {
                    if (Ee.length < 2) return 1;
                    if (Ee[Ne][0] === We) return Ee[Ne][1];
                    if (Ee[Ne][0] > We && Ne > 0) {
                      var Ie = (Ee[Ne][0] - We) / (Ee[Ne][0] - Ee[Ne - 1][0]);
                      return Ee[Ne][1] * (1 - Ie) + Ie * Ee[Ne - 1][1];
                    }
                  }
                  return 1;
                }(De / 255, be) : Me[3];
                return Le < 1 && (Ae = !0), [Me[0], Me[1], Me[2], 255 * Le];
              })]);
              return A.divseq(Se, 255), this.hasAlphaScale = Ae, Se;
            }, ee.isTransparent = function() {
              return this.opacity < 1 || this.hasAlphaScale;
            }, ee.isOpaque = function() {
              return !this.isTransparent();
            }, ee.pickSlots = 1, ee.setPickBase = function(pe) {
              this.pickId = pe;
            };
            var X = [0, 0, 0], Q = { showSurface: !1, showContour: !1, projections: [$.slice(), $.slice(), $.slice()], clipBounds: [[[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0]]] };
            function ue(pe, be) {
              var Ae, Se, Me, De = be.axes && be.axes.lastCubeProps.axis || X, Le = be.showSurface, We = be.showContour;
              for (Ae = 0; Ae < 3; ++Ae) for (Le = Le || be.surfaceProject[Ae], Se = 0; Se < 3; ++Se) We = We || be.contourProject[Ae][Se];
              for (Ae = 0; Ae < 3; ++Ae) {
                var Ee = Q.projections[Ae];
                for (Se = 0; Se < 16; ++Se) Ee[Se] = 0;
                for (Se = 0; Se < 4; ++Se) Ee[5 * Se] = 1;
                Ee[5 * Ae] = 0, Ee[12 + Ae] = be.axesBounds[+(De[Ae] > 0)][Ae], E(Ee, pe.model, Ee);
                var Ne = Q.clipBounds[Ae];
                for (Me = 0; Me < 2; ++Me) for (Se = 0; Se < 3; ++Se) Ne[Me][Se] = pe.clipBounds[Me][Se];
                Ne[0][Ae] = -1e8, Ne[1][Ae] = 1e8;
              }
              return Q.showSurface = Le, Q.showContour = We, Q;
            }
            var ce = { model: $, view: $, projection: $, inverseModel: $.slice(), lowerBound: [0, 0, 0], upperBound: [0, 0, 0], colorMap: 0, clipBounds: [[0, 0, 0], [0, 0, 0]], height: 0, contourTint: 0, contourColor: [0, 0, 0, 1], permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1], zOffset: -1e-4, objectOffset: [0, 0, 0], kambient: 1, kdiffuse: 1, kspecular: 1, lightPosition: [1e3, 1e3, 1e3], eyePosition: [0, 0, 0], roughness: 1, fresnel: 1, opacity: 1, vertexColor: 0 }, he = $.slice(), de = [1, 0, 0, 0, 1, 0, 0, 0, 1];
            function ne(pe, be) {
              pe = pe || {};
              var Ae = this.gl;
              Ae.disable(Ae.CULL_FACE), this._colorMap.bind(0);
              var Se = ce;
              Se.model = pe.model || $, Se.view = pe.view || $, Se.projection = pe.projection || $, Se.lowerBound = [this.bounds[0][0], this.bounds[0][1], this.colorBounds[0] || this.bounds[0][2]], Se.upperBound = [this.bounds[1][0], this.bounds[1][1], this.colorBounds[1] || this.bounds[1][2]], Se.objectOffset = this.objectOffset, Se.contourColor = this.contourColor[0], Se.inverseModel = P(Se.inverseModel, Se.model);
              for (var Me = 0; Me < 2; ++Me) for (var De = Se.clipBounds[Me], Le = 0; Le < 3; ++Le) De[Le] = Math.min(Math.max(this.clipBounds[Me][Le], -1e8), 1e8);
              Se.kambient = this.ambientLight, Se.kdiffuse = this.diffuseLight, Se.kspecular = this.specularLight, Se.roughness = this.roughness, Se.fresnel = this.fresnel, Se.opacity = this.opacity, Se.height = 0, Se.permutation = de, Se.vertexColor = this.vertexColor;
              var We = he;
              for (E(We, Se.view, Se.model), E(We, Se.projection, We), P(We, We), Me = 0; Me < 3; ++Me) Se.eyePosition[Me] = We[12 + Me] / We[15];
              var Ee = We[15];
              for (Me = 0; Me < 3; ++Me) Ee += this.lightPosition[Me] * We[4 * Me + 3];
              for (Me = 0; Me < 3; ++Me) {
                var Ne = We[12 + Me];
                for (Le = 0; Le < 3; ++Le) Ne += We[4 * Le + Me] * this.lightPosition[Le];
                Se.lightPosition[Me] = Ne / Ee;
              }
              var Ie = ue(Se, this);
              if (Ie.showSurface) {
                for (this._shader.bind(), this._shader.uniforms = Se, this._vao.bind(), this.showSurface && this._vertexCount && this._vao.draw(Ae.TRIANGLES, this._vertexCount), Me = 0; Me < 3; ++Me) this.surfaceProject[Me] && this.vertexCount && (this._shader.uniforms.model = Ie.projections[Me], this._shader.uniforms.clipBounds = Ie.clipBounds[Me], this._vao.draw(Ae.TRIANGLES, this._vertexCount));
                this._vao.unbind();
              }
              if (Ie.showContour) {
                var ge = this._contourShader;
                Se.kambient = 1, Se.kdiffuse = 0, Se.kspecular = 0, Se.opacity = 1, ge.bind(), ge.uniforms = Se;
                var Ce = this._contourVAO;
                for (Ce.bind(), Me = 0; Me < 3; ++Me) for (ge.uniforms.permutation = K[Me], Ae.lineWidth(this.contourWidth[Me] * this.pixelRatio), Le = 0; Le < this.contourLevels[Me].length; ++Le) Le === this.highlightLevel[Me] ? (ge.uniforms.contourColor = this.highlightColor[Me], ge.uniforms.contourTint = this.highlightTint[Me]) : Le !== 0 && Le - 1 !== this.highlightLevel[Me] || (ge.uniforms.contourColor = this.contourColor[Me], ge.uniforms.contourTint = this.contourTint[Me]), this._contourCounts[Me][Le] && (ge.uniforms.height = this.contourLevels[Me][Le], Ce.draw(Ae.LINES, this._contourCounts[Me][Le], this._contourOffsets[Me][Le]));
                for (Me = 0; Me < 3; ++Me) for (ge.uniforms.model = Ie.projections[Me], ge.uniforms.clipBounds = Ie.clipBounds[Me], Le = 0; Le < 3; ++Le) if (this.contourProject[Me][Le]) {
                  ge.uniforms.permutation = K[Le], Ae.lineWidth(this.contourWidth[Le] * this.pixelRatio);
                  for (var we = 0; we < this.contourLevels[Le].length; ++we) we === this.highlightLevel[Le] ? (ge.uniforms.contourColor = this.highlightColor[Le], ge.uniforms.contourTint = this.highlightTint[Le]) : we !== 0 && we - 1 !== this.highlightLevel[Le] || (ge.uniforms.contourColor = this.contourColor[Le], ge.uniforms.contourTint = this.contourTint[Le]), this._contourCounts[Le][we] && (ge.uniforms.height = this.contourLevels[Le][we], Ce.draw(Ae.LINES, this._contourCounts[Le][we], this._contourOffsets[Le][we]));
                }
                for (Ce.unbind(), (Ce = this._dynamicVAO).bind(), Me = 0; Me < 3; ++Me) if (this._dynamicCounts[Me] !== 0) for (ge.uniforms.model = Se.model, ge.uniforms.clipBounds = Se.clipBounds, ge.uniforms.permutation = K[Me], Ae.lineWidth(this.dynamicWidth[Me] * this.pixelRatio), ge.uniforms.contourColor = this.dynamicColor[Me], ge.uniforms.contourTint = this.dynamicTint[Me], ge.uniforms.height = this.dynamicLevel[Me], Ce.draw(Ae.LINES, this._dynamicCounts[Me], this._dynamicOffsets[Me]), Le = 0; Le < 3; ++Le) this.contourProject[Le][Me] && (ge.uniforms.model = Ie.projections[Le], ge.uniforms.clipBounds = Ie.clipBounds[Le], Ce.draw(Ae.LINES, this._dynamicCounts[Me], this._dynamicOffsets[Me]));
                Ce.unbind();
              }
            }
            ee.draw = function(pe) {
              return ne.call(this, pe, !1);
            }, ee.drawTransparent = function(pe) {
              return ne.call(this, pe, !0);
            };
            var ae = { model: $, view: $, projection: $, inverseModel: $, clipBounds: [[0, 0, 0], [0, 0, 0]], height: 0, shape: [0, 0], pickId: 0, lowerBound: [0, 0, 0], upperBound: [0, 0, 0], zOffset: 0, objectOffset: [0, 0, 0], permutation: [1, 0, 0, 0, 1, 0, 0, 0, 1], lightPosition: [0, 0, 0], eyePosition: [0, 0, 0] };
            function se(pe, be) {
              return Array.isArray(pe) ? [be(pe[0]), be(pe[1]), be(pe[2])] : [be(pe), be(pe), be(pe)];
            }
            function me(pe) {
              return Array.isArray(pe) ? pe.length === 3 ? [pe[0], pe[1], pe[2], 1] : [pe[0], pe[1], pe[2], pe[3]] : [0, 0, 0, 1];
            }
            function ye(pe) {
              if (Array.isArray(pe)) {
                if (Array.isArray(pe)) return [me(pe[0]), me(pe[1]), me(pe[2])];
                var be = me(pe);
                return [be.slice(), be.slice(), be.slice()];
              }
            }
            ee.drawPick = function(pe) {
              pe = pe || {};
              var be = this.gl;
              be.disable(be.CULL_FACE);
              var Ae = ae;
              Ae.model = pe.model || $, Ae.view = pe.view || $, Ae.projection = pe.projection || $, Ae.shape = this._field[2].shape, Ae.pickId = this.pickId / 255, Ae.lowerBound = this.bounds[0], Ae.upperBound = this.bounds[1], Ae.objectOffset = this.objectOffset, Ae.permutation = de;
              for (var Se = 0; Se < 2; ++Se) for (var Me = Ae.clipBounds[Se], De = 0; De < 3; ++De) Me[De] = Math.min(Math.max(this.clipBounds[Se][De], -1e8), 1e8);
              var Le = ue(Ae, this);
              if (Le.showSurface) {
                for (this._pickShader.bind(), this._pickShader.uniforms = Ae, this._vao.bind(), this._vao.draw(be.TRIANGLES, this._vertexCount), Se = 0; Se < 3; ++Se) this.surfaceProject[Se] && (this._pickShader.uniforms.model = Le.projections[Se], this._pickShader.uniforms.clipBounds = Le.clipBounds[Se], this._vao.draw(be.TRIANGLES, this._vertexCount));
                this._vao.unbind();
              }
              if (Le.showContour) {
                var We = this._contourPickShader;
                We.bind(), We.uniforms = Ae;
                var Ee = this._contourVAO;
                for (Ee.bind(), De = 0; De < 3; ++De) for (be.lineWidth(this.contourWidth[De] * this.pixelRatio), We.uniforms.permutation = K[De], Se = 0; Se < this.contourLevels[De].length; ++Se) this._contourCounts[De][Se] && (We.uniforms.height = this.contourLevels[De][Se], Ee.draw(be.LINES, this._contourCounts[De][Se], this._contourOffsets[De][Se]));
                for (Se = 0; Se < 3; ++Se) for (We.uniforms.model = Le.projections[Se], We.uniforms.clipBounds = Le.clipBounds[Se], De = 0; De < 3; ++De) if (this.contourProject[Se][De]) {
                  We.uniforms.permutation = K[De], be.lineWidth(this.contourWidth[De] * this.pixelRatio);
                  for (var Ne = 0; Ne < this.contourLevels[De].length; ++Ne) this._contourCounts[De][Ne] && (We.uniforms.height = this.contourLevels[De][Ne], Ee.draw(be.LINES, this._contourCounts[De][Ne], this._contourOffsets[De][Ne]));
                }
                Ee.unbind();
              }
            }, ee.pick = function(pe) {
              if (!pe || pe.id !== this.pickId) return null;
              var be = this._field[2].shape, Ae = this._pickResult, Se = be[0] * (pe.value[0] + (pe.value[2] >> 4) / 16) / 255, Me = Math.floor(Se), De = Se - Me, Le = be[1] * (pe.value[1] + (15 & pe.value[2]) / 16) / 255, We = Math.floor(Le), Ee = Le - We;
              Me += 1, We += 1;
              var Ne = Ae.position;
              Ne[0] = Ne[1] = Ne[2] = 0;
              for (var Ie = 0; Ie < 2; ++Ie) for (var ge = Ie ? De : 1 - De, Ce = 0; Ce < 2; ++Ce) for (var we = Me + Ie, Ge = We + Ce, Re = ge * (Ce ? Ee : 1 - Ee), je = 0; je < 3; ++je) Ne[je] += this._field[je].get(we, Ge) * Re;
              for (var Ke = this._pickResult.level, tt = 0; tt < 3; ++tt) if (Ke[tt] = I.le(this.contourLevels[tt], Ne[tt]), Ke[tt] < 0) this.contourLevels[tt].length > 0 && (Ke[tt] = 0);
              else if (Ke[tt] < this.contourLevels[tt].length - 1) {
                var _e = this.contourLevels[tt][Ke[tt]], Be = this.contourLevels[tt][Ke[tt] + 1];
                Math.abs(_e - Ne[tt]) > Math.abs(Be - Ne[tt]) && (Ke[tt] += 1);
              }
              for (Ae.index[0] = De < 0.5 ? Me : Me + 1, Ae.index[1] = Ee < 0.5 ? We : We + 1, Ae.uv[0] = Se / be[0], Ae.uv[1] = Le / be[1], je = 0; je < 3; ++je) Ae.dataCoordinate[je] = this._field[je].get(Ae.index[0], Ae.index[1]);
              return Ae;
            }, ee.padField = function(pe, be) {
              var Ae = be.shape.slice(), Se = pe.shape.slice();
              A.assign(pe.lo(1, 1).hi(Ae[0], Ae[1]), be), A.assign(pe.lo(1).hi(Ae[0], 1), be.hi(Ae[0], 1)), A.assign(pe.lo(1, Se[1] - 1).hi(Ae[0], 1), be.lo(0, Ae[1] - 1).hi(Ae[0], 1)), A.assign(pe.lo(0, 1).hi(1, Ae[1]), be.hi(1)), A.assign(pe.lo(Se[0] - 1, 1).hi(1, Ae[1]), be.lo(Ae[0] - 1)), pe.set(0, 0, be.get(0, 0)), pe.set(0, Se[1] - 1, be.get(0, Ae[1] - 1)), pe.set(Se[0] - 1, 0, be.get(Ae[0] - 1, 0)), pe.set(Se[0] - 1, Se[1] - 1, be.get(Ae[0] - 1, Ae[1] - 1));
            }, ee.update = function(pe) {
              pe = pe || {}, this.objectOffset = pe.objectOffset || this.objectOffset, this.dirty = !0, "contourWidth" in pe && (this.contourWidth = se(pe.contourWidth, Number)), "showContour" in pe && (this.showContour = se(pe.showContour, Boolean)), "showSurface" in pe && (this.showSurface = !!pe.showSurface), "contourTint" in pe && (this.contourTint = se(pe.contourTint, Boolean)), "contourColor" in pe && (this.contourColor = ye(pe.contourColor)), "contourProject" in pe && (this.contourProject = se(pe.contourProject, function(_n) {
                return se(_n, Boolean);
              })), "surfaceProject" in pe && (this.surfaceProject = pe.surfaceProject), "dynamicColor" in pe && (this.dynamicColor = ye(pe.dynamicColor)), "dynamicTint" in pe && (this.dynamicTint = se(pe.dynamicTint, Number)), "dynamicWidth" in pe && (this.dynamicWidth = se(pe.dynamicWidth, Number)), "opacity" in pe && (this.opacity = pe.opacity), "opacityscale" in pe && (this.opacityscale = pe.opacityscale), "colorBounds" in pe && (this.colorBounds = pe.colorBounds), "vertexColor" in pe && (this.vertexColor = pe.vertexColor ? 1 : 0), "colormap" in pe && this._colorMap.setPixels(this.genColormap(pe.colormap, this.opacityscale));
              var be = pe.field || pe.coords && pe.coords[2] || null, Ae = !1;
              if (be || (be = this._field[2].shape[0] || this._field[2].shape[2] ? this._field[2].lo(1, 1).hi(this._field[2].shape[0] - 2, this._field[2].shape[1] - 2) : this._field[2].hi(0, 0)), "field" in pe || "coords" in pe) {
                var Se = (be.shape[0] + 2) * (be.shape[1] + 2);
                Se > this._field[2].data.length && (k.freeFloat(this._field[2].data), this._field[2].data = k.mallocFloat(g.nextPow2(Se))), this._field[2] = D(this._field[2].data, [be.shape[0] + 2, be.shape[1] + 2]), this.padField(this._field[2], be), this.shape = be.shape.slice();
                for (var Me = this.shape, De = 0; De < 2; ++De) this._field[2].size > this._field[De].data.length && (k.freeFloat(this._field[De].data), this._field[De].data = k.mallocFloat(this._field[2].size)), this._field[De] = D(this._field[De].data, [Me[0] + 2, Me[1] + 2]);
                if (pe.coords) {
                  var Le = pe.coords;
                  if (!Array.isArray(Le) || Le.length !== 3) throw new Error("gl-surface: invalid coordinates for x/y");
                  for (De = 0; De < 2; ++De) {
                    var We = Le[De];
                    for (Ce = 0; Ce < 2; ++Ce) if (We.shape[Ce] !== Me[Ce]) throw new Error("gl-surface: coords have incorrect shape");
                    this.padField(this._field[De], We);
                  }
                } else if (pe.ticks) {
                  var Ee = pe.ticks;
                  if (!Array.isArray(Ee) || Ee.length !== 2) throw new Error("gl-surface: invalid ticks");
                  for (De = 0; De < 2; ++De) {
                    var Ne = Ee[De];
                    if ((Array.isArray(Ne) || Ne.length) && (Ne = D(Ne)), Ne.shape[0] !== Me[De]) throw new Error("gl-surface: invalid tick length");
                    var Ie = D(Ne.data, Me);
                    Ie.stride[De] = Ne.stride[0], Ie.stride[1 ^ De] = 0, this.padField(this._field[De], Ie);
                  }
                } else {
                  for (De = 0; De < 2; ++De) {
                    var ge = [0, 0];
                    ge[De] = 1, this._field[De] = D(this._field[De].data, [Me[0] + 2, Me[1] + 2], ge, 0);
                  }
                  this._field[0].set(0, 0, 0);
                  for (var Ce = 0; Ce < Me[0]; ++Ce) this._field[0].set(Ce + 1, 0, Ce);
                  for (this._field[0].set(Me[0] + 1, 0, Me[0] - 1), this._field[1].set(0, 0, 0), Ce = 0; Ce < Me[1]; ++Ce) this._field[1].set(0, Ce + 1, Ce);
                  this._field[1].set(0, Me[1] + 1, Me[1] - 1);
                }
                var we = this._field, Ge = D(k.mallocFloat(3 * we[2].size * 2), [3, Me[0] + 2, Me[1] + 2, 2]);
                for (De = 0; De < 3; ++De) M(Ge.pick(De), we[De], "mirror");
                var Re = D(k.mallocFloat(3 * we[2].size), [Me[0] + 2, Me[1] + 2, 3]);
                for (De = 0; De < Me[0] + 2; ++De) for (Ce = 0; Ce < Me[1] + 2; ++Ce) {
                  var je = Ge.get(0, De, Ce, 0), Ke = Ge.get(0, De, Ce, 1), tt = Ge.get(1, De, Ce, 0), _e = Ge.get(1, De, Ce, 1), Be = Ge.get(2, De, Ce, 0), $e = Ge.get(2, De, Ce, 1), Ze = tt * $e - _e * Be, ct = Be * Ke - $e * je, ft = je * _e - Ke * tt, _t = Math.sqrt(Ze * Ze + ct * ct + ft * ft);
                  _t < 1e-8 ? (_t = Math.max(Math.abs(Ze), Math.abs(ct), Math.abs(ft))) < 1e-8 ? (ft = 1, ct = Ze = 0, _t = 1) : _t = 1 / _t : _t = 1 / Math.sqrt(_t), Re.set(De, Ce, 0, Ze * _t), Re.set(De, Ce, 1, ct * _t), Re.set(De, Ce, 2, ft * _t);
                }
                k.free(Ge.data);
                var Pt = [1 / 0, 1 / 0, 1 / 0], Dt = [-1 / 0, -1 / 0, -1 / 0], $t = 1 / 0, Gt = -1 / 0, Wt = (Me[0] - 1) * (Me[1] - 1) * 6, mt = k.mallocFloat(g.nextPow2(10 * Wt)), at = 0, vt = 0;
                for (De = 0; De < Me[0] - 1; ++De) e: for (Ce = 0; Ce < Me[1] - 1; ++Ce) {
                  for (var St = 0; St < 2; ++St) for (var Je = 0; Je < 2; ++Je) for (var nt = 0; nt < 3; ++nt) {
                    var ot = this._field[nt].get(1 + De + St, 1 + Ce + Je);
                    if (isNaN(ot) || !isFinite(ot)) continue e;
                  }
                  for (nt = 0; nt < 6; ++nt) {
                    var Ye = De + q[nt][0], Fe = Ce + q[nt][1], pt = this._field[0].get(Ye + 1, Fe + 1), Mt = this._field[1].get(Ye + 1, Fe + 1);
                    ot = this._field[2].get(Ye + 1, Fe + 1), Ze = Re.get(Ye + 1, Fe + 1, 0), ct = Re.get(Ye + 1, Fe + 1, 1), ft = Re.get(Ye + 1, Fe + 1, 2), pe.intensity && (At = pe.intensity.get(Ye, Fe));
                    var At = pe.intensity ? pe.intensity.get(Ye, Fe) : ot + this.objectOffset[2];
                    mt[at++] = Ye, mt[at++] = Fe, mt[at++] = pt, mt[at++] = Mt, mt[at++] = ot, mt[at++] = 0, mt[at++] = At, mt[at++] = Ze, mt[at++] = ct, mt[at++] = ft, Pt[0] = Math.min(Pt[0], pt + this.objectOffset[0]), Pt[1] = Math.min(Pt[1], Mt + this.objectOffset[1]), Pt[2] = Math.min(Pt[2], ot + this.objectOffset[2]), $t = Math.min($t, At), Dt[0] = Math.max(Dt[0], pt + this.objectOffset[0]), Dt[1] = Math.max(Dt[1], Mt + this.objectOffset[1]), Dt[2] = Math.max(Dt[2], ot + this.objectOffset[2]), Gt = Math.max(Gt, At), vt += 1;
                  }
                }
                for (pe.intensityBounds && ($t = +pe.intensityBounds[0], Gt = +pe.intensityBounds[1]), De = 6; De < at; De += 10) mt[De] = (mt[De] - $t) / (Gt - $t);
                this._vertexCount = vt, this._coordinateBuffer.update(mt.subarray(0, at)), k.freeFloat(mt), k.free(Re.data), this.bounds = [Pt, Dt], this.intensity = pe.intensity || this._field[2], this.intensityBounds[0] === $t && this.intensityBounds[1] === Gt || (Ae = !0), this.intensityBounds = [$t, Gt];
              }
              if ("levels" in pe) {
                var Rt = pe.levels;
                for (Rt = Array.isArray(Rt[0]) ? Rt.slice() : [[], [], Rt], De = 0; De < 3; ++De) Rt[De] = Rt[De].slice(), Rt[De].sort(function(_n, En) {
                  return _n - En;
                });
                for (De = 0; De < 3; ++De) for (Ce = 0; Ce < Rt[De].length; ++Ce) Rt[De][Ce] -= this.objectOffset[De];
                e: for (De = 0; De < 3; ++De) {
                  if (Rt[De].length !== this.contourLevels[De].length) {
                    Ae = !0;
                    break;
                  }
                  for (Ce = 0; Ce < Rt[De].length; ++Ce) if (Rt[De][Ce] !== this.contourLevels[De][Ce]) {
                    Ae = !0;
                    break e;
                  }
                }
                this.contourLevels = Rt;
              }
              if (Ae) {
                we = this._field, Me = this.shape;
                for (var Ft = [], lt = 0; lt < 3; ++lt) {
                  var st = this.contourLevels[lt], Ot = [], kt = [], Bt = [0, 0, 0];
                  for (De = 0; De < st.length; ++De) {
                    var xt = L(this._field[lt], st[De]);
                    Ot.push(Ft.length / 5 | 0), vt = 0;
                    e: for (Ce = 0; Ce < xt.cells.length; ++Ce) {
                      var Jt = xt.cells[Ce];
                      for (nt = 0; nt < 2; ++nt) {
                        var qt = xt.positions[Jt[nt]], en = qt[0], Yt = 0 | Math.floor(en), Ht = en - Yt, sn = qt[1], fn = 0 | Math.floor(sn), In = sn - fn, zn = !1;
                        t: for (var Cn = 0; Cn < 3; ++Cn) {
                          Bt[Cn] = 0;
                          var gn = (lt + Cn + 1) % 3;
                          for (St = 0; St < 2; ++St) {
                            var Mn = St ? Ht : 1 - Ht;
                            for (Ye = 0 | Math.min(Math.max(Yt + St, 0), Me[0]), Je = 0; Je < 2; ++Je) {
                              var Xn = Je ? In : 1 - In;
                              if (Fe = 0 | Math.min(Math.max(fn + Je, 0), Me[1]), ot = Cn < 2 ? this._field[gn].get(Ye, Fe) : (this.intensity.get(Ye, Fe) - this.intensityBounds[0]) / (this.intensityBounds[1] - this.intensityBounds[0]), !isFinite(ot) || isNaN(ot)) {
                                zn = !0;
                                break t;
                              }
                              var Pn = Mn * Xn;
                              Bt[Cn] += Pn * ot;
                            }
                          }
                        }
                        if (zn) {
                          if (nt > 0) {
                            for (var wn = 0; wn < 5; ++wn) Ft.pop();
                            vt -= 1;
                          }
                          continue e;
                        }
                        Ft.push(Bt[0], Bt[1], qt[0], qt[1], Bt[2]), vt += 1;
                      }
                    }
                    kt.push(vt);
                  }
                  this._contourOffsets[lt] = Ot, this._contourCounts[lt] = kt;
                }
                var Rn = k.mallocFloat(Ft.length);
                for (De = 0; De < Ft.length; ++De) Rn[De] = Ft[De];
                this._contourBuffer.update(Rn), k.freeFloat(Rn);
              }
            }, ee.dispose = function() {
              this._shader.dispose(), this._vao.dispose(), this._coordinateBuffer.dispose(), this._colorMap.dispose(), this._contourBuffer.dispose(), this._contourVAO.dispose(), this._contourShader.dispose(), this._contourPickShader.dispose(), this._dynamicBuffer.dispose(), this._dynamicVAO.dispose();
              for (var pe = 0; pe < 3; ++pe) k.freeFloat(this._field[pe].data);
            }, ee.highlight = function(pe) {
              var be, Ae;
              if (!pe) return this._dynamicCounts = [0, 0, 0], this.dyanamicLevel = [NaN, NaN, NaN], void (this.highlightLevel = [-1, -1, -1]);
              for (be = 0; be < 3; ++be) this.enableHighlight[be] ? this.highlightLevel[be] = pe.level[be] : this.highlightLevel[be] = -1;
              for (Ae = this.snapToData ? pe.dataCoordinate : pe.position, be = 0; be < 3; ++be) Ae[be] -= this.objectOffset[be];
              if (this.enableDynamic[0] && Ae[0] !== this.dynamicLevel[0] || this.enableDynamic[1] && Ae[1] !== this.dynamicLevel[1] || this.enableDynamic[2] && Ae[2] !== this.dynamicLevel[2]) {
                for (var Se = 0, Me = this.shape, De = k.mallocFloat(12 * Me[0] * Me[1]), Le = 0; Le < 3; ++Le) if (this.enableDynamic[Le]) {
                  this.dynamicLevel[Le] = Ae[Le];
                  var We = (Le + 1) % 3, Ee = (Le + 2) % 3, Ne = this._field[Le], Ie = this._field[We], ge = this._field[Ee], Ce = L(Ne, Ae[Le]), we = Ce.cells, Ge = Ce.positions;
                  for (this._dynamicOffsets[Le] = Se, be = 0; be < we.length; ++be) for (var Re = we[be], je = 0; je < 2; ++je) {
                    var Ke = Ge[Re[je]], tt = +Ke[0], _e = 0 | tt, Be = 0 | Math.min(_e + 1, Me[0]), $e = tt - _e, Ze = 1 - $e, ct = +Ke[1], ft = 0 | ct, _t = 0 | Math.min(ft + 1, Me[1]), Pt = ct - ft, Dt = 1 - Pt, $t = Ze * Dt, Gt = Ze * Pt, Wt = $e * Dt, mt = $e * Pt, at = $t * Ie.get(_e, ft) + Gt * Ie.get(_e, _t) + Wt * Ie.get(Be, ft) + mt * Ie.get(Be, _t), vt = $t * ge.get(_e, ft) + Gt * ge.get(_e, _t) + Wt * ge.get(Be, ft) + mt * ge.get(Be, _t);
                    if (isNaN(at) || isNaN(vt)) {
                      je && (Se -= 1);
                      break;
                    }
                    De[2 * Se + 0] = at, De[2 * Se + 1] = vt, Se += 1;
                  }
                  this._dynamicCounts[Le] = Se - this._dynamicOffsets[Le];
                } else this.dynamicLevel[Le] = NaN, this._dynamicCounts[Le] = 0;
                this._dynamicBuffer.update(De.subarray(0, 2 * Se)), k.freeFloat(De);
              }
            };
          }, 7766: function(d, f, c) {
            var g = c(9618), m = c(5298), x = c(1888);
            d.exports = function(O) {
              if (arguments.length <= 1) throw new Error("gl-texture2d: Missing arguments for texture2d constructor");
              if (w || function(F) {
                w = [F.LINEAR, F.NEAREST_MIPMAP_LINEAR, F.LINEAR_MIPMAP_NEAREST, F.LINEAR_MIPMAP_NEAREST], k = [F.NEAREST, F.LINEAR, F.NEAREST_MIPMAP_NEAREST, F.NEAREST_MIPMAP_LINEAR, F.LINEAR_MIPMAP_NEAREST, F.LINEAR_MIPMAP_LINEAR], S = [F.REPEAT, F.CLAMP_TO_EDGE, F.MIRRORED_REPEAT];
              }(O), typeof arguments[1] == "number") return M(O, arguments[1], arguments[2], arguments[3] || O.RGBA, arguments[4] || O.UNSIGNED_BYTE);
              if (Array.isArray(arguments[1])) return M(O, 0 | arguments[1][0], 0 | arguments[1][1], arguments[2] || O.RGBA, arguments[3] || O.UNSIGNED_BYTE);
              if (typeof arguments[1] == "object") {
                var T = arguments[1], z = A(T) ? T : T.raw;
                if (z) return function(F, U, V, $, q, K) {
                  var re = I(F);
                  return F.texImage2D(F.TEXTURE_2D, 0, q, q, K, U), new L(F, re, V, $, q, K);
                }(O, z, 0 | T.width, 0 | T.height, arguments[2] || O.RGBA, arguments[3] || O.UNSIGNED_BYTE);
                if (T.shape && T.data && T.stride) return function(F, U) {
                  var V = U.dtype, $ = U.shape.slice(), q = F.getParameter(F.MAX_TEXTURE_SIZE);
                  if ($[0] < 0 || $[0] > q || $[1] < 0 || $[1] > q) throw new Error("gl-texture2d: Invalid texture size");
                  var K = P($, U.stride.slice()), re = 0;
                  V === "float32" ? re = F.FLOAT : V === "float64" ? (re = F.FLOAT, K = !1, V = "float32") : V === "uint8" ? re = F.UNSIGNED_BYTE : (re = F.UNSIGNED_BYTE, K = !1, V = "uint8");
                  var Y, te, ee = 0;
                  if ($.length === 2) ee = F.LUMINANCE, $ = [$[0], $[1], 1], U = g(U.data, $, [U.stride[0], U.stride[1], 1], U.offset);
                  else {
                    if ($.length !== 3) throw new Error("gl-texture2d: Invalid shape for texture");
                    if ($[2] === 1) ee = F.ALPHA;
                    else if ($[2] === 2) ee = F.LUMINANCE_ALPHA;
                    else if ($[2] === 3) ee = F.RGB;
                    else {
                      if ($[2] !== 4) throw new Error("gl-texture2d: Invalid shape for pixel coords");
                      ee = F.RGBA;
                    }
                  }
                  re !== F.FLOAT || F.getExtension("OES_texture_float") || (re = F.UNSIGNED_BYTE, K = !1);
                  var X = U.size;
                  if (K) Y = U.offset === 0 && U.data.length === X ? U.data : U.data.subarray(U.offset, U.offset + X);
                  else {
                    var Q = [$[2], $[2] * $[0], 1];
                    te = x.malloc(X, V);
                    var ue = g(te, $, Q, 0);
                    V !== "float32" && V !== "float64" || re !== F.UNSIGNED_BYTE ? m.assign(ue, U) : C(ue, U), Y = te.subarray(0, X);
                  }
                  var ce = I(F);
                  return F.texImage2D(F.TEXTURE_2D, 0, ee, $[0], $[1], 0, ee, re, Y), K || x.free(te), new L(F, ce, $[0], $[1], ee, re);
                }(O, T);
              }
              throw new Error("gl-texture2d: Invalid arguments for texture2d constructor");
            };
            var w = null, k = null, S = null;
            function A(O) {
              return typeof HTMLCanvasElement < "u" && O instanceof HTMLCanvasElement || typeof HTMLImageElement < "u" && O instanceof HTMLImageElement || typeof HTMLVideoElement < "u" && O instanceof HTMLVideoElement || typeof ImageData < "u" && O instanceof ImageData;
            }
            var C = function(O, T) {
              m.muls(O, T, 255);
            };
            function D(O, T, z) {
              var F = O.gl, U = F.getParameter(F.MAX_TEXTURE_SIZE);
              if (T < 0 || T > U || z < 0 || z > U) throw new Error("gl-texture2d: Invalid texture size");
              return O._shape = [T, z], O.bind(), F.texImage2D(F.TEXTURE_2D, 0, O.format, T, z, 0, O.format, O.type, null), O._mipLevels = [0], O;
            }
            function L(O, T, z, F, U, V) {
              this.gl = O, this.handle = T, this.format = U, this.type = V, this._shape = [z, F], this._mipLevels = [0], this._magFilter = O.NEAREST, this._minFilter = O.NEAREST, this._wrapS = O.CLAMP_TO_EDGE, this._wrapT = O.CLAMP_TO_EDGE, this._anisoSamples = 1;
              var $ = this, q = [this._wrapS, this._wrapT];
              Object.defineProperties(q, [{ get: function() {
                return $._wrapS;
              }, set: function(re) {
                return $.wrapS = re;
              } }, { get: function() {
                return $._wrapT;
              }, set: function(re) {
                return $.wrapT = re;
              } }]), this._wrapVector = q;
              var K = [this._shape[0], this._shape[1]];
              Object.defineProperties(K, [{ get: function() {
                return $._shape[0];
              }, set: function(re) {
                return $.width = re;
              } }, { get: function() {
                return $._shape[1];
              }, set: function(re) {
                return $.height = re;
              } }]), this._shapeVector = K;
            }
            var E = L.prototype;
            function P(O, T) {
              return O.length === 3 ? T[2] === 1 && T[1] === O[0] * O[2] && T[0] === O[2] : T[0] === 1 && T[1] === O[0];
            }
            function I(O) {
              var T = O.createTexture();
              return O.bindTexture(O.TEXTURE_2D, T), O.texParameteri(O.TEXTURE_2D, O.TEXTURE_MIN_FILTER, O.NEAREST), O.texParameteri(O.TEXTURE_2D, O.TEXTURE_MAG_FILTER, O.NEAREST), O.texParameteri(O.TEXTURE_2D, O.TEXTURE_WRAP_S, O.CLAMP_TO_EDGE), O.texParameteri(O.TEXTURE_2D, O.TEXTURE_WRAP_T, O.CLAMP_TO_EDGE), T;
            }
            function M(O, T, z, F, U) {
              var V = O.getParameter(O.MAX_TEXTURE_SIZE);
              if (T < 0 || T > V || z < 0 || z > V) throw new Error("gl-texture2d: Invalid texture shape");
              if (U === O.FLOAT && !O.getExtension("OES_texture_float")) throw new Error("gl-texture2d: Floating point textures not supported on this platform");
              var $ = I(O);
              return O.texImage2D(O.TEXTURE_2D, 0, F, T, z, 0, F, U, null), new L(O, $, T, z, F, U);
            }
            Object.defineProperties(E, { minFilter: { get: function() {
              return this._minFilter;
            }, set: function(O) {
              this.bind();
              var T = this.gl;
              if (this.type === T.FLOAT && w.indexOf(O) >= 0 && (T.getExtension("OES_texture_float_linear") || (O = T.NEAREST)), k.indexOf(O) < 0) throw new Error("gl-texture2d: Unknown filter mode " + O);
              return T.texParameteri(T.TEXTURE_2D, T.TEXTURE_MIN_FILTER, O), this._minFilter = O;
            } }, magFilter: { get: function() {
              return this._magFilter;
            }, set: function(O) {
              this.bind();
              var T = this.gl;
              if (this.type === T.FLOAT && w.indexOf(O) >= 0 && (T.getExtension("OES_texture_float_linear") || (O = T.NEAREST)), k.indexOf(O) < 0) throw new Error("gl-texture2d: Unknown filter mode " + O);
              return T.texParameteri(T.TEXTURE_2D, T.TEXTURE_MAG_FILTER, O), this._magFilter = O;
            } }, mipSamples: { get: function() {
              return this._anisoSamples;
            }, set: function(O) {
              var T = this._anisoSamples;
              if (this._anisoSamples = 0 | Math.max(O, 1), T !== this._anisoSamples) {
                var z = this.gl.getExtension("EXT_texture_filter_anisotropic");
                z && this.gl.texParameterf(this.gl.TEXTURE_2D, z.TEXTURE_MAX_ANISOTROPY_EXT, this._anisoSamples);
              }
              return this._anisoSamples;
            } }, wrapS: { get: function() {
              return this._wrapS;
            }, set: function(O) {
              if (this.bind(), S.indexOf(O) < 0) throw new Error("gl-texture2d: Unknown wrap mode " + O);
              return this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, O), this._wrapS = O;
            } }, wrapT: { get: function() {
              return this._wrapT;
            }, set: function(O) {
              if (this.bind(), S.indexOf(O) < 0) throw new Error("gl-texture2d: Unknown wrap mode " + O);
              return this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, O), this._wrapT = O;
            } }, wrap: { get: function() {
              return this._wrapVector;
            }, set: function(O) {
              if (Array.isArray(O) || (O = [O, O]), O.length !== 2) throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");
              for (var T = 0; T < 2; ++T) if (S.indexOf(O[T]) < 0) throw new Error("gl-texture2d: Unknown wrap mode " + O);
              this._wrapS = O[0], this._wrapT = O[1];
              var z = this.gl;
              return this.bind(), z.texParameteri(z.TEXTURE_2D, z.TEXTURE_WRAP_S, this._wrapS), z.texParameteri(z.TEXTURE_2D, z.TEXTURE_WRAP_T, this._wrapT), O;
            } }, shape: { get: function() {
              return this._shapeVector;
            }, set: function(O) {
              if (Array.isArray(O)) {
                if (O.length !== 2) throw new Error("gl-texture2d: Invalid texture shape");
              } else O = [0 | O, 0 | O];
              return D(this, 0 | O[0], 0 | O[1]), [0 | O[0], 0 | O[1]];
            } }, width: { get: function() {
              return this._shape[0];
            }, set: function(O) {
              return D(this, O |= 0, this._shape[1]), O;
            } }, height: { get: function() {
              return this._shape[1];
            }, set: function(O) {
              return O |= 0, D(this, this._shape[0], O), O;
            } } }), E.bind = function(O) {
              var T = this.gl;
              return O !== void 0 && T.activeTexture(T.TEXTURE0 + (0 | O)), T.bindTexture(T.TEXTURE_2D, this.handle), O !== void 0 ? 0 | O : T.getParameter(T.ACTIVE_TEXTURE) - T.TEXTURE0;
            }, E.dispose = function() {
              this.gl.deleteTexture(this.handle);
            }, E.generateMipmap = function() {
              this.bind(), this.gl.generateMipmap(this.gl.TEXTURE_2D);
              for (var O = Math.min(this._shape[0], this._shape[1]), T = 0; O > 0; ++T, O >>>= 1) this._mipLevels.indexOf(T) < 0 && this._mipLevels.push(T);
            }, E.setPixels = function(O, T, z, F) {
              var U = this.gl;
              this.bind(), Array.isArray(T) ? (F = z, z = 0 | T[1], T = 0 | T[0]) : (T = T || 0, z = z || 0), F = F || 0;
              var V = A(O) ? O : O.raw;
              if (V) this._mipLevels.indexOf(F) < 0 ? (U.texImage2D(U.TEXTURE_2D, 0, this.format, this.format, this.type, V), this._mipLevels.push(F)) : U.texSubImage2D(U.TEXTURE_2D, F, T, z, this.format, this.type, V);
              else {
                if (!(O.shape && O.stride && O.data)) throw new Error("gl-texture2d: Unsupported data type");
                if (O.shape.length < 2 || T + O.shape[1] > this._shape[1] >>> F || z + O.shape[0] > this._shape[0] >>> F || T < 0 || z < 0) throw new Error("gl-texture2d: Texture dimensions are out of bounds");
                (function($, q, K, re, Y, te, ee, X) {
                  var Q = X.dtype, ue = X.shape.slice();
                  if (ue.length < 2 || ue.length > 3) throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");
                  var ce = 0, he = 0, de = P(ue, X.stride.slice());
                  if (Q === "float32" ? ce = $.FLOAT : Q === "float64" ? (ce = $.FLOAT, de = !1, Q = "float32") : Q === "uint8" ? ce = $.UNSIGNED_BYTE : (ce = $.UNSIGNED_BYTE, de = !1, Q = "uint8"), ue.length === 2) he = $.LUMINANCE, ue = [ue[0], ue[1], 1], X = g(X.data, ue, [X.stride[0], X.stride[1], 1], X.offset);
                  else {
                    if (ue.length !== 3) throw new Error("gl-texture2d: Invalid shape for texture");
                    if (ue[2] === 1) he = $.ALPHA;
                    else if (ue[2] === 2) he = $.LUMINANCE_ALPHA;
                    else if (ue[2] === 3) he = $.RGB;
                    else {
                      if (ue[2] !== 4) throw new Error("gl-texture2d: Invalid shape for pixel coords");
                      he = $.RGBA;
                    }
                    ue[2];
                  }
                  if (he !== $.LUMINANCE && he !== $.ALPHA || Y !== $.LUMINANCE && Y !== $.ALPHA || (he = Y), he !== Y) throw new Error("gl-texture2d: Incompatible texture format for setPixels");
                  var ne = X.size, ae = ee.indexOf(re) < 0;
                  if (ae && ee.push(re), ce === te && de) X.offset === 0 && X.data.length === ne ? ae ? $.texImage2D($.TEXTURE_2D, re, Y, ue[0], ue[1], 0, Y, te, X.data) : $.texSubImage2D($.TEXTURE_2D, re, q, K, ue[0], ue[1], Y, te, X.data) : ae ? $.texImage2D($.TEXTURE_2D, re, Y, ue[0], ue[1], 0, Y, te, X.data.subarray(X.offset, X.offset + ne)) : $.texSubImage2D($.TEXTURE_2D, re, q, K, ue[0], ue[1], Y, te, X.data.subarray(X.offset, X.offset + ne));
                  else {
                    var se;
                    se = te === $.FLOAT ? x.mallocFloat32(ne) : x.mallocUint8(ne);
                    var me = g(se, ue, [ue[2], ue[2] * ue[0], 1]);
                    ce === $.FLOAT && te === $.UNSIGNED_BYTE ? C(me, X) : m.assign(me, X), ae ? $.texImage2D($.TEXTURE_2D, re, Y, ue[0], ue[1], 0, Y, te, se.subarray(0, ne)) : $.texSubImage2D($.TEXTURE_2D, re, q, K, ue[0], ue[1], Y, te, se.subarray(0, ne)), te === $.FLOAT ? x.freeFloat32(se) : x.freeUint8(se);
                  }
                })(U, T, z, F, this.format, this.type, this._mipLevels, O);
              }
            };
          }, 1433: function(d) {
            d.exports = function(f, c, g) {
              c ? c.bind() : f.bindBuffer(f.ELEMENT_ARRAY_BUFFER, null);
              var m = 0 | f.getParameter(f.MAX_VERTEX_ATTRIBS);
              if (g) {
                if (g.length > m) throw new Error("gl-vao: Too many vertex attributes");
                for (var x = 0; x < g.length; ++x) {
                  var w = g[x];
                  if (w.buffer) {
                    var k = w.buffer, S = w.size || 4, A = w.type || f.FLOAT, C = !!w.normalized, D = w.stride || 0, L = w.offset || 0;
                    k.bind(), f.enableVertexAttribArray(x), f.vertexAttribPointer(x, S, A, C, D, L);
                  } else {
                    if (typeof w == "number") f.vertexAttrib1f(x, w);
                    else if (w.length === 1) f.vertexAttrib1f(x, w[0]);
                    else if (w.length === 2) f.vertexAttrib2f(x, w[0], w[1]);
                    else if (w.length === 3) f.vertexAttrib3f(x, w[0], w[1], w[2]);
                    else {
                      if (w.length !== 4) throw new Error("gl-vao: Invalid vertex attribute");
                      f.vertexAttrib4f(x, w[0], w[1], w[2], w[3]);
                    }
                    f.disableVertexAttribArray(x);
                  }
                }
                for (; x < m; ++x) f.disableVertexAttribArray(x);
              } else for (f.bindBuffer(f.ARRAY_BUFFER, null), x = 0; x < m; ++x) f.disableVertexAttribArray(x);
            };
          }, 870: function(d, f, c) {
            var g = c(1433);
            function m(x) {
              this.gl = x, this._elements = null, this._attributes = null, this._elementsType = x.UNSIGNED_SHORT;
            }
            m.prototype.bind = function() {
              g(this.gl, this._elements, this._attributes);
            }, m.prototype.update = function(x, w, k) {
              this._elements = w, this._attributes = x, this._elementsType = k || this.gl.UNSIGNED_SHORT;
            }, m.prototype.dispose = function() {
            }, m.prototype.unbind = function() {
            }, m.prototype.draw = function(x, w, k) {
              k = k || 0;
              var S = this.gl;
              this._elements ? S.drawElements(x, w, this._elementsType, k) : S.drawArrays(x, k, w);
            }, d.exports = function(x) {
              return new m(x);
            };
          }, 7518: function(d, f, c) {
            var g = c(1433);
            function m(w, k, S, A, C, D) {
              this.location = w, this.dimension = k, this.a = S, this.b = A, this.c = C, this.d = D;
            }
            function x(w, k, S) {
              this.gl = w, this._ext = k, this.handle = S, this._attribs = [], this._useElements = !1, this._elementsType = w.UNSIGNED_SHORT;
            }
            m.prototype.bind = function(w) {
              switch (this.dimension) {
                case 1:
                  w.vertexAttrib1f(this.location, this.a);
                  break;
                case 2:
                  w.vertexAttrib2f(this.location, this.a, this.b);
                  break;
                case 3:
                  w.vertexAttrib3f(this.location, this.a, this.b, this.c);
                  break;
                case 4:
                  w.vertexAttrib4f(this.location, this.a, this.b, this.c, this.d);
              }
            }, x.prototype.bind = function() {
              this._ext.bindVertexArrayOES(this.handle);
              for (var w = 0; w < this._attribs.length; ++w) this._attribs[w].bind(this.gl);
            }, x.prototype.unbind = function() {
              this._ext.bindVertexArrayOES(null);
            }, x.prototype.dispose = function() {
              this._ext.deleteVertexArrayOES(this.handle);
            }, x.prototype.update = function(w, k, S) {
              if (this.bind(), g(this.gl, k, w), this.unbind(), this._attribs.length = 0, w) for (var A = 0; A < w.length; ++A) {
                var C = w[A];
                typeof C == "number" ? this._attribs.push(new m(A, 1, C)) : Array.isArray(C) && this._attribs.push(new m(A, C.length, C[0], C[1], C[2], C[3]));
              }
              this._useElements = !!k, this._elementsType = S || this.gl.UNSIGNED_SHORT;
            }, x.prototype.draw = function(w, k, S) {
              S = S || 0;
              var A = this.gl;
              this._useElements ? A.drawElements(w, k, this._elementsType, S) : A.drawArrays(w, S, k);
            }, d.exports = function(w, k) {
              return new x(w, k, k.createVertexArrayOES());
            };
          }, 8116: function(d, f, c) {
            var g = c(7518), m = c(870);
            function x(w) {
              this.bindVertexArrayOES = w.bindVertexArray.bind(w), this.createVertexArrayOES = w.createVertexArray.bind(w), this.deleteVertexArrayOES = w.deleteVertexArray.bind(w);
            }
            d.exports = function(w, k, S, A) {
              var C, D = w.createVertexArray ? new x(w) : w.getExtension("OES_vertex_array_object");
              return (C = D ? g(w, D) : m(w)).update(k, S, A), C;
            };
          }, 5632: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] + g[0], f[1] = c[1] + g[1], f[2] = c[2] + g[2], f;
            };
          }, 8192: function(d, f, c) {
            d.exports = function(w, k) {
              var S = g(w[0], w[1], w[2]), A = g(k[0], k[1], k[2]);
              m(S, S), m(A, A);
              var C = x(S, A);
              return C > 1 ? 0 : Math.acos(C);
            };
            var g = c(2825), m = c(3536), x = c(244);
          }, 9226: function(d) {
            d.exports = function(f, c) {
              return f[0] = Math.ceil(c[0]), f[1] = Math.ceil(c[1]), f[2] = Math.ceil(c[2]), f;
            };
          }, 3126: function(d) {
            d.exports = function(f) {
              var c = new Float32Array(3);
              return c[0] = f[0], c[1] = f[1], c[2] = f[2], c;
            };
          }, 3990: function(d) {
            d.exports = function(f, c) {
              return f[0] = c[0], f[1] = c[1], f[2] = c[2], f;
            };
          }, 1091: function(d) {
            d.exports = function() {
              var f = new Float32Array(3);
              return f[0] = 0, f[1] = 0, f[2] = 0, f;
            };
          }, 5911: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = g[0], S = g[1], A = g[2];
              return f[0] = x * A - w * S, f[1] = w * k - m * A, f[2] = m * S - x * k, f;
            };
          }, 5455: function(d, f, c) {
            d.exports = c(7056);
          }, 7056: function(d) {
            d.exports = function(f, c) {
              var g = c[0] - f[0], m = c[1] - f[1], x = c[2] - f[2];
              return Math.sqrt(g * g + m * m + x * x);
            };
          }, 4008: function(d, f, c) {
            d.exports = c(6690);
          }, 6690: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] / g[0], f[1] = c[1] / g[1], f[2] = c[2] / g[2], f;
            };
          }, 244: function(d) {
            d.exports = function(f, c) {
              return f[0] * c[0] + f[1] * c[1] + f[2] * c[2];
            };
          }, 2613: function(d) {
            d.exports = 1e-6;
          }, 9922: function(d, f, c) {
            d.exports = function(m, x) {
              var w = m[0], k = m[1], S = m[2], A = x[0], C = x[1], D = x[2];
              return Math.abs(w - A) <= g * Math.max(1, Math.abs(w), Math.abs(A)) && Math.abs(k - C) <= g * Math.max(1, Math.abs(k), Math.abs(C)) && Math.abs(S - D) <= g * Math.max(1, Math.abs(S), Math.abs(D));
            };
            var g = c(2613);
          }, 9265: function(d) {
            d.exports = function(f, c) {
              return f[0] === c[0] && f[1] === c[1] && f[2] === c[2];
            };
          }, 2681: function(d) {
            d.exports = function(f, c) {
              return f[0] = Math.floor(c[0]), f[1] = Math.floor(c[1]), f[2] = Math.floor(c[2]), f;
            };
          }, 5137: function(d, f, c) {
            d.exports = function(m, x, w, k, S, A) {
              var C, D;
              for (x || (x = 3), w || (w = 0), D = k ? Math.min(k * x + w, m.length) : m.length, C = w; C < D; C += x) g[0] = m[C], g[1] = m[C + 1], g[2] = m[C + 2], S(g, g, A), m[C] = g[0], m[C + 1] = g[1], m[C + 2] = g[2];
              return m;
            };
            var g = c(1091)();
          }, 2825: function(d) {
            d.exports = function(f, c, g) {
              var m = new Float32Array(3);
              return m[0] = f, m[1] = c, m[2] = g, m;
            };
          }, 2931: function(d, f, c) {
            d.exports = { EPSILON: c(2613), create: c(1091), clone: c(3126), angle: c(8192), fromValues: c(2825), copy: c(3990), set: c(1463), equals: c(9922), exactEquals: c(9265), add: c(5632), subtract: c(6843), sub: c(2229), multiply: c(5847), mul: c(4505), divide: c(6690), div: c(4008), min: c(8107), max: c(7417), floor: c(2681), ceil: c(9226), round: c(2447), scale: c(6621), scaleAndAdd: c(8489), distance: c(7056), dist: c(5455), squaredDistance: c(2953), sqrDist: c(6141), length: c(1387), len: c(868), squaredLength: c(3066), sqrLen: c(5486), negate: c(5093), inverse: c(811), normalize: c(3536), dot: c(244), cross: c(5911), lerp: c(6658), random: c(7636), transformMat4: c(5673), transformMat3: c(492), transformQuat: c(264), rotateX: c(6894), rotateY: c(109), rotateZ: c(8692), forEach: c(5137) };
          }, 811: function(d) {
            d.exports = function(f, c) {
              return f[0] = 1 / c[0], f[1] = 1 / c[1], f[2] = 1 / c[2], f;
            };
          }, 868: function(d, f, c) {
            d.exports = c(1387);
          }, 1387: function(d) {
            d.exports = function(f) {
              var c = f[0], g = f[1], m = f[2];
              return Math.sqrt(c * c + g * g + m * m);
            };
          }, 6658: function(d) {
            d.exports = function(f, c, g, m) {
              var x = c[0], w = c[1], k = c[2];
              return f[0] = x + m * (g[0] - x), f[1] = w + m * (g[1] - w), f[2] = k + m * (g[2] - k), f;
            };
          }, 7417: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = Math.max(c[0], g[0]), f[1] = Math.max(c[1], g[1]), f[2] = Math.max(c[2], g[2]), f;
            };
          }, 8107: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = Math.min(c[0], g[0]), f[1] = Math.min(c[1], g[1]), f[2] = Math.min(c[2], g[2]), f;
            };
          }, 4505: function(d, f, c) {
            d.exports = c(5847);
          }, 5847: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] * g[0], f[1] = c[1] * g[1], f[2] = c[2] * g[2], f;
            };
          }, 5093: function(d) {
            d.exports = function(f, c) {
              return f[0] = -c[0], f[1] = -c[1], f[2] = -c[2], f;
            };
          }, 3536: function(d) {
            d.exports = function(f, c) {
              var g = c[0], m = c[1], x = c[2], w = g * g + m * m + x * x;
              return w > 0 && (w = 1 / Math.sqrt(w), f[0] = c[0] * w, f[1] = c[1] * w, f[2] = c[2] * w), f;
            };
          }, 7636: function(d) {
            d.exports = function(f, c) {
              c = c || 1;
              var g = 2 * Math.random() * Math.PI, m = 2 * Math.random() - 1, x = Math.sqrt(1 - m * m) * c;
              return f[0] = Math.cos(g) * x, f[1] = Math.sin(g) * x, f[2] = m * c, f;
            };
          }, 6894: function(d) {
            d.exports = function(f, c, g, m) {
              var x = g[1], w = g[2], k = c[1] - x, S = c[2] - w, A = Math.sin(m), C = Math.cos(m);
              return f[0] = c[0], f[1] = x + k * C - S * A, f[2] = w + k * A + S * C, f;
            };
          }, 109: function(d) {
            d.exports = function(f, c, g, m) {
              var x = g[0], w = g[2], k = c[0] - x, S = c[2] - w, A = Math.sin(m), C = Math.cos(m);
              return f[0] = x + S * A + k * C, f[1] = c[1], f[2] = w + S * C - k * A, f;
            };
          }, 8692: function(d) {
            d.exports = function(f, c, g, m) {
              var x = g[0], w = g[1], k = c[0] - x, S = c[1] - w, A = Math.sin(m), C = Math.cos(m);
              return f[0] = x + k * C - S * A, f[1] = w + k * A + S * C, f[2] = c[2], f;
            };
          }, 2447: function(d) {
            d.exports = function(f, c) {
              return f[0] = Math.round(c[0]), f[1] = Math.round(c[1]), f[2] = Math.round(c[2]), f;
            };
          }, 6621: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] * g, f[1] = c[1] * g, f[2] = c[2] * g, f;
            };
          }, 8489: function(d) {
            d.exports = function(f, c, g, m) {
              return f[0] = c[0] + g[0] * m, f[1] = c[1] + g[1] * m, f[2] = c[2] + g[2] * m, f;
            };
          }, 1463: function(d) {
            d.exports = function(f, c, g, m) {
              return f[0] = c, f[1] = g, f[2] = m, f;
            };
          }, 6141: function(d, f, c) {
            d.exports = c(2953);
          }, 5486: function(d, f, c) {
            d.exports = c(3066);
          }, 2953: function(d) {
            d.exports = function(f, c) {
              var g = c[0] - f[0], m = c[1] - f[1], x = c[2] - f[2];
              return g * g + m * m + x * x;
            };
          }, 3066: function(d) {
            d.exports = function(f) {
              var c = f[0], g = f[1], m = f[2];
              return c * c + g * g + m * m;
            };
          }, 2229: function(d, f, c) {
            d.exports = c(6843);
          }, 6843: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] - g[0], f[1] = c[1] - g[1], f[2] = c[2] - g[2], f;
            };
          }, 492: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2];
              return f[0] = m * g[0] + x * g[3] + w * g[6], f[1] = m * g[1] + x * g[4] + w * g[7], f[2] = m * g[2] + x * g[5] + w * g[8], f;
            };
          }, 5673: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = g[3] * m + g[7] * x + g[11] * w + g[15];
              return k = k || 1, f[0] = (g[0] * m + g[4] * x + g[8] * w + g[12]) / k, f[1] = (g[1] * m + g[5] * x + g[9] * w + g[13]) / k, f[2] = (g[2] * m + g[6] * x + g[10] * w + g[14]) / k, f;
            };
          }, 264: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = g[0], S = g[1], A = g[2], C = g[3], D = C * m + S * w - A * x, L = C * x + A * m - k * w, E = C * w + k * x - S * m, P = -k * m - S * x - A * w;
              return f[0] = D * C + P * -k + L * -A - E * -S, f[1] = L * C + P * -S + E * -k - D * -A, f[2] = E * C + P * -A + D * -S - L * -k, f;
            };
          }, 4361: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] + g[0], f[1] = c[1] + g[1], f[2] = c[2] + g[2], f[3] = c[3] + g[3], f;
            };
          }, 2335: function(d) {
            d.exports = function(f) {
              var c = new Float32Array(4);
              return c[0] = f[0], c[1] = f[1], c[2] = f[2], c[3] = f[3], c;
            };
          }, 2933: function(d) {
            d.exports = function(f, c) {
              return f[0] = c[0], f[1] = c[1], f[2] = c[2], f[3] = c[3], f;
            };
          }, 7536: function(d) {
            d.exports = function() {
              var f = new Float32Array(4);
              return f[0] = 0, f[1] = 0, f[2] = 0, f[3] = 0, f;
            };
          }, 4691: function(d) {
            d.exports = function(f, c) {
              var g = c[0] - f[0], m = c[1] - f[1], x = c[2] - f[2], w = c[3] - f[3];
              return Math.sqrt(g * g + m * m + x * x + w * w);
            };
          }, 1373: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] / g[0], f[1] = c[1] / g[1], f[2] = c[2] / g[2], f[3] = c[3] / g[3], f;
            };
          }, 3750: function(d) {
            d.exports = function(f, c) {
              return f[0] * c[0] + f[1] * c[1] + f[2] * c[2] + f[3] * c[3];
            };
          }, 3390: function(d) {
            d.exports = function(f, c, g, m) {
              var x = new Float32Array(4);
              return x[0] = f, x[1] = c, x[2] = g, x[3] = m, x;
            };
          }, 9970: function(d, f, c) {
            d.exports = { create: c(7536), clone: c(2335), fromValues: c(3390), copy: c(2933), set: c(4578), add: c(4361), subtract: c(6860), multiply: c(3576), divide: c(1373), min: c(2334), max: c(160), scale: c(9288), scaleAndAdd: c(4844), distance: c(4691), squaredDistance: c(7960), length: c(6808), squaredLength: c(483), negate: c(1498), inverse: c(4494), normalize: c(5177), dot: c(3750), lerp: c(2573), random: c(9131), transformMat4: c(5352), transformQuat: c(4041) };
          }, 4494: function(d) {
            d.exports = function(f, c) {
              return f[0] = 1 / c[0], f[1] = 1 / c[1], f[2] = 1 / c[2], f[3] = 1 / c[3], f;
            };
          }, 6808: function(d) {
            d.exports = function(f) {
              var c = f[0], g = f[1], m = f[2], x = f[3];
              return Math.sqrt(c * c + g * g + m * m + x * x);
            };
          }, 2573: function(d) {
            d.exports = function(f, c, g, m) {
              var x = c[0], w = c[1], k = c[2], S = c[3];
              return f[0] = x + m * (g[0] - x), f[1] = w + m * (g[1] - w), f[2] = k + m * (g[2] - k), f[3] = S + m * (g[3] - S), f;
            };
          }, 160: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = Math.max(c[0], g[0]), f[1] = Math.max(c[1], g[1]), f[2] = Math.max(c[2], g[2]), f[3] = Math.max(c[3], g[3]), f;
            };
          }, 2334: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = Math.min(c[0], g[0]), f[1] = Math.min(c[1], g[1]), f[2] = Math.min(c[2], g[2]), f[3] = Math.min(c[3], g[3]), f;
            };
          }, 3576: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] * g[0], f[1] = c[1] * g[1], f[2] = c[2] * g[2], f[3] = c[3] * g[3], f;
            };
          }, 1498: function(d) {
            d.exports = function(f, c) {
              return f[0] = -c[0], f[1] = -c[1], f[2] = -c[2], f[3] = -c[3], f;
            };
          }, 5177: function(d) {
            d.exports = function(f, c) {
              var g = c[0], m = c[1], x = c[2], w = c[3], k = g * g + m * m + x * x + w * w;
              return k > 0 && (k = 1 / Math.sqrt(k), f[0] = g * k, f[1] = m * k, f[2] = x * k, f[3] = w * k), f;
            };
          }, 9131: function(d, f, c) {
            var g = c(5177), m = c(9288);
            d.exports = function(x, w) {
              return w = w || 1, x[0] = Math.random(), x[1] = Math.random(), x[2] = Math.random(), x[3] = Math.random(), g(x, x), m(x, x, w), x;
            };
          }, 9288: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] * g, f[1] = c[1] * g, f[2] = c[2] * g, f[3] = c[3] * g, f;
            };
          }, 4844: function(d) {
            d.exports = function(f, c, g, m) {
              return f[0] = c[0] + g[0] * m, f[1] = c[1] + g[1] * m, f[2] = c[2] + g[2] * m, f[3] = c[3] + g[3] * m, f;
            };
          }, 4578: function(d) {
            d.exports = function(f, c, g, m, x) {
              return f[0] = c, f[1] = g, f[2] = m, f[3] = x, f;
            };
          }, 7960: function(d) {
            d.exports = function(f, c) {
              var g = c[0] - f[0], m = c[1] - f[1], x = c[2] - f[2], w = c[3] - f[3];
              return g * g + m * m + x * x + w * w;
            };
          }, 483: function(d) {
            d.exports = function(f) {
              var c = f[0], g = f[1], m = f[2], x = f[3];
              return c * c + g * g + m * m + x * x;
            };
          }, 6860: function(d) {
            d.exports = function(f, c, g) {
              return f[0] = c[0] - g[0], f[1] = c[1] - g[1], f[2] = c[2] - g[2], f[3] = c[3] - g[3], f;
            };
          }, 5352: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = c[3];
              return f[0] = g[0] * m + g[4] * x + g[8] * w + g[12] * k, f[1] = g[1] * m + g[5] * x + g[9] * w + g[13] * k, f[2] = g[2] * m + g[6] * x + g[10] * w + g[14] * k, f[3] = g[3] * m + g[7] * x + g[11] * w + g[15] * k, f;
            };
          }, 4041: function(d) {
            d.exports = function(f, c, g) {
              var m = c[0], x = c[1], w = c[2], k = g[0], S = g[1], A = g[2], C = g[3], D = C * m + S * w - A * x, L = C * x + A * m - k * w, E = C * w + k * x - S * m, P = -k * m - S * x - A * w;
              return f[0] = D * C + P * -k + L * -A - E * -S, f[1] = L * C + P * -S + E * -k - D * -A, f[2] = E * C + P * -A + D * -S - L * -k, f[3] = c[3], f;
            };
          }, 1848: function(d, f, c) {
            var g = c(4905), m = c(6468);
            d.exports = function(x) {
              for (var w = Array.isArray(x) ? x : g(x), k = 0; k < w.length; k++) {
                var S = w[k];
                if (S.type === "preprocessor") {
                  var A = S.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);
                  if (A && A[2]) {
                    var C = A[1], D = A[2];
                    return (C ? m(D) : D).trim();
                  }
                }
              }
            };
          }, 5874: function(d, f, c) {
            d.exports = function($) {
              var q, K, re, Y = 0, te = 0, ee = S, X = [], Q = [], ue = 1, ce = 0, he = 0, de = !1, ne = !1, ae = "", se = x, me = g;
              ($ = $ || {}).version === "300 es" && (se = k, me = w);
              var ye = {}, pe = {};
              for (Y = 0; Y < se.length; Y++) ye[se[Y]] = !0;
              for (Y = 0; Y < me.length; Y++) pe[me[Y]] = !0;
              return function(Ce) {
                return Q = [], Ce !== null ? function(we) {
                  var Ge;
                  for (Y = 0, we.toString && (we = we.toString()), ae += we.replace(/\r\n/g, `
`), re = ae.length; q = ae[Y], Y < re; ) {
                    switch (Ge = Y, ee) {
                      case C:
                        Y = De();
                        break;
                      case D:
                      case L:
                        Y = Me();
                        break;
                      case E:
                        Y = Le();
                        break;
                      case P:
                        Y = Ne();
                        break;
                      case U:
                        Y = Ee();
                        break;
                      case I:
                        Y = Ie();
                        break;
                      case A:
                        Y = ge();
                        break;
                      case z:
                        Y = Se();
                        break;
                      case S:
                        Y = Ae();
                    }
                    Ge !== Y && (ae[Ge] === `
` ? (ce = 0, ++ue) : ++ce);
                  }
                  return te += Y, ae = ae.slice(Y), Q;
                }(Ce) : (X.length && be(X.join("")), ee = F, be("(eof)"), Q);
              };
              function be(Ce) {
                Ce.length && Q.push({ type: V[ee], data: Ce, position: he, line: ue, column: ce });
              }
              function Ae() {
                return X = X.length ? [] : X, K === "/" && q === "*" ? (he = te + Y - 1, ee = C, K = q, Y + 1) : K === "/" && q === "/" ? (he = te + Y - 1, ee = D, K = q, Y + 1) : q === "#" ? (ee = L, he = te + Y, Y) : /\s/.test(q) ? (ee = z, he = te + Y, Y) : (de = /\d/.test(q), ne = /[^\w_]/.test(q), he = te + Y, ee = de ? P : ne ? E : A, Y);
              }
              function Se() {
                return /[^\s]/g.test(q) ? (be(X.join("")), ee = S, Y) : (X.push(q), K = q, Y + 1);
              }
              function Me() {
                return q !== "\r" && q !== `
` || K === "\\" ? (X.push(q), K = q, Y + 1) : (be(X.join("")), ee = S, Y);
              }
              function De() {
                return q === "/" && K === "*" ? (X.push(q), be(X.join("")), ee = S, Y + 1) : (X.push(q), K = q, Y + 1);
              }
              function Le() {
                if (K === "." && /\d/.test(q)) return ee = I, Y;
                if (K === "/" && q === "*") return ee = C, Y;
                if (K === "/" && q === "/") return ee = D, Y;
                if (q === "." && X.length) {
                  for (; We(X); ) ;
                  return ee = I, Y;
                }
                if (q === ";" || q === ")" || q === "(") {
                  if (X.length) for (; We(X); ) ;
                  return be(q), ee = S, Y + 1;
                }
                var Ce = X.length === 2 && q !== "=";
                if (/[\w_\d\s]/.test(q) || Ce) {
                  for (; We(X); ) ;
                  return ee = S, Y;
                }
                return X.push(q), K = q, Y + 1;
              }
              function We(Ce) {
                for (var we, Ge, Re = 0; ; ) {
                  if (we = m.indexOf(Ce.slice(0, Ce.length + Re).join("")), Ge = m[we], we === -1) {
                    if (Re-- + Ce.length > 0) continue;
                    Ge = Ce.slice(0, 1).join("");
                  }
                  return be(Ge), he += Ge.length, (X = X.slice(Ge.length)).length;
                }
              }
              function Ee() {
                return /[^a-fA-F0-9]/.test(q) ? (be(X.join("")), ee = S, Y) : (X.push(q), K = q, Y + 1);
              }
              function Ne() {
                return q === "." || /[eE]/.test(q) ? (X.push(q), ee = I, K = q, Y + 1) : q === "x" && X.length === 1 && X[0] === "0" ? (ee = U, X.push(q), K = q, Y + 1) : /[^\d]/.test(q) ? (be(X.join("")), ee = S, Y) : (X.push(q), K = q, Y + 1);
              }
              function Ie() {
                return q === "f" && (X.push(q), K = q, Y += 1), /[eE]/.test(q) ? (X.push(q), K = q, Y + 1) : (q !== "-" && q !== "+" || !/[eE]/.test(K)) && /[^\d]/.test(q) ? (be(X.join("")), ee = S, Y) : (X.push(q), K = q, Y + 1);
              }
              function ge() {
                if (/[^\d\w_]/.test(q)) {
                  var Ce = X.join("");
                  return ee = pe[Ce] ? T : ye[Ce] ? O : M, be(X.join("")), ee = S, Y;
                }
                return X.push(q), K = q, Y + 1;
              }
            };
            var g = c(620), m = c(7827), x = c(6852), w = c(7932), k = c(3508), S = 999, A = 9999, C = 0, D = 1, L = 2, E = 3, P = 4, I = 5, M = 6, O = 7, T = 8, z = 9, F = 10, U = 11, V = ["block-comment", "line-comment", "preprocessor", "operator", "integer", "float", "ident", "builtin", "keyword", "whitespace", "eof", "integer"];
          }, 3508: function(d, f, c) {
            var g = c(6852);
            g = g.slice().filter(function(m) {
              return !/^(gl\_|texture)/.test(m);
            }), d.exports = g.concat(["gl_VertexID", "gl_InstanceID", "gl_Position", "gl_PointSize", "gl_FragCoord", "gl_FrontFacing", "gl_FragDepth", "gl_PointCoord", "gl_MaxVertexAttribs", "gl_MaxVertexUniformVectors", "gl_MaxVertexOutputVectors", "gl_MaxFragmentInputVectors", "gl_MaxVertexTextureImageUnits", "gl_MaxCombinedTextureImageUnits", "gl_MaxTextureImageUnits", "gl_MaxFragmentUniformVectors", "gl_MaxDrawBuffers", "gl_MinProgramTexelOffset", "gl_MaxProgramTexelOffset", "gl_DepthRangeParameters", "gl_DepthRange", "trunc", "round", "roundEven", "isnan", "isinf", "floatBitsToInt", "floatBitsToUint", "intBitsToFloat", "uintBitsToFloat", "packSnorm2x16", "unpackSnorm2x16", "packUnorm2x16", "unpackUnorm2x16", "packHalf2x16", "unpackHalf2x16", "outerProduct", "transpose", "determinant", "inverse", "texture", "textureSize", "textureProj", "textureLod", "textureOffset", "texelFetch", "texelFetchOffset", "textureProjOffset", "textureLodOffset", "textureProjLod", "textureProjLodOffset", "textureGrad", "textureGradOffset", "textureProjGrad", "textureProjGradOffset"]);
          }, 6852: function(d) {
            d.exports = ["abs", "acos", "all", "any", "asin", "atan", "ceil", "clamp", "cos", "cross", "dFdx", "dFdy", "degrees", "distance", "dot", "equal", "exp", "exp2", "faceforward", "floor", "fract", "gl_BackColor", "gl_BackLightModelProduct", "gl_BackLightProduct", "gl_BackMaterial", "gl_BackSecondaryColor", "gl_ClipPlane", "gl_ClipVertex", "gl_Color", "gl_DepthRange", "gl_DepthRangeParameters", "gl_EyePlaneQ", "gl_EyePlaneR", "gl_EyePlaneS", "gl_EyePlaneT", "gl_Fog", "gl_FogCoord", "gl_FogFragCoord", "gl_FogParameters", "gl_FragColor", "gl_FragCoord", "gl_FragData", "gl_FragDepth", "gl_FragDepthEXT", "gl_FrontColor", "gl_FrontFacing", "gl_FrontLightModelProduct", "gl_FrontLightProduct", "gl_FrontMaterial", "gl_FrontSecondaryColor", "gl_LightModel", "gl_LightModelParameters", "gl_LightModelProducts", "gl_LightProducts", "gl_LightSource", "gl_LightSourceParameters", "gl_MaterialParameters", "gl_MaxClipPlanes", "gl_MaxCombinedTextureImageUnits", "gl_MaxDrawBuffers", "gl_MaxFragmentUniformComponents", "gl_MaxLights", "gl_MaxTextureCoords", "gl_MaxTextureImageUnits", "gl_MaxTextureUnits", "gl_MaxVaryingFloats", "gl_MaxVertexAttribs", "gl_MaxVertexTextureImageUnits", "gl_MaxVertexUniformComponents", "gl_ModelViewMatrix", "gl_ModelViewMatrixInverse", "gl_ModelViewMatrixInverseTranspose", "gl_ModelViewMatrixTranspose", "gl_ModelViewProjectionMatrix", "gl_ModelViewProjectionMatrixInverse", "gl_ModelViewProjectionMatrixInverseTranspose", "gl_ModelViewProjectionMatrixTranspose", "gl_MultiTexCoord0", "gl_MultiTexCoord1", "gl_MultiTexCoord2", "gl_MultiTexCoord3", "gl_MultiTexCoord4", "gl_MultiTexCoord5", "gl_MultiTexCoord6", "gl_MultiTexCoord7", "gl_Normal", "gl_NormalMatrix", "gl_NormalScale", "gl_ObjectPlaneQ", "gl_ObjectPlaneR", "gl_ObjectPlaneS", "gl_ObjectPlaneT", "gl_Point", "gl_PointCoord", "gl_PointParameters", "gl_PointSize", "gl_Position", "gl_ProjectionMatrix", "gl_ProjectionMatrixInverse", "gl_ProjectionMatrixInverseTranspose", "gl_ProjectionMatrixTranspose", "gl_SecondaryColor", "gl_TexCoord", "gl_TextureEnvColor", "gl_TextureMatrix", "gl_TextureMatrixInverse", "gl_TextureMatrixInverseTranspose", "gl_TextureMatrixTranspose", "gl_Vertex", "greaterThan", "greaterThanEqual", "inversesqrt", "length", "lessThan", "lessThanEqual", "log", "log2", "matrixCompMult", "max", "min", "mix", "mod", "normalize", "not", "notEqual", "pow", "radians", "reflect", "refract", "sign", "sin", "smoothstep", "sqrt", "step", "tan", "texture2D", "texture2DLod", "texture2DProj", "texture2DProjLod", "textureCube", "textureCubeLod", "texture2DLodEXT", "texture2DProjLodEXT", "textureCubeLodEXT", "texture2DGradEXT", "texture2DProjGradEXT", "textureCubeGradEXT"];
          }, 7932: function(d, f, c) {
            var g = c(620);
            d.exports = g.slice().concat(["layout", "centroid", "smooth", "case", "mat2x2", "mat2x3", "mat2x4", "mat3x2", "mat3x3", "mat3x4", "mat4x2", "mat4x3", "mat4x4", "uvec2", "uvec3", "uvec4", "samplerCubeShadow", "sampler2DArray", "sampler2DArrayShadow", "isampler2D", "isampler3D", "isamplerCube", "isampler2DArray", "usampler2D", "usampler3D", "usamplerCube", "usampler2DArray", "coherent", "restrict", "readonly", "writeonly", "resource", "atomic_uint", "noperspective", "patch", "sample", "subroutine", "common", "partition", "active", "filter", "image1D", "image2D", "image3D", "imageCube", "iimage1D", "iimage2D", "iimage3D", "iimageCube", "uimage1D", "uimage2D", "uimage3D", "uimageCube", "image1DArray", "image2DArray", "iimage1DArray", "iimage2DArray", "uimage1DArray", "uimage2DArray", "image1DShadow", "image2DShadow", "image1DArrayShadow", "image2DArrayShadow", "imageBuffer", "iimageBuffer", "uimageBuffer", "sampler1DArray", "sampler1DArrayShadow", "isampler1D", "isampler1DArray", "usampler1D", "usampler1DArray", "isampler2DRect", "usampler2DRect", "samplerBuffer", "isamplerBuffer", "usamplerBuffer", "sampler2DMS", "isampler2DMS", "usampler2DMS", "sampler2DMSArray", "isampler2DMSArray", "usampler2DMSArray"]);
          }, 620: function(d) {
            d.exports = ["precision", "highp", "mediump", "lowp", "attribute", "const", "uniform", "varying", "break", "continue", "do", "for", "while", "if", "else", "in", "out", "inout", "float", "int", "uint", "void", "bool", "true", "false", "discard", "return", "mat2", "mat3", "mat4", "vec2", "vec3", "vec4", "ivec2", "ivec3", "ivec4", "bvec2", "bvec3", "bvec4", "sampler1D", "sampler2D", "sampler3D", "samplerCube", "sampler1DShadow", "sampler2DShadow", "struct", "asm", "class", "union", "enum", "typedef", "template", "this", "packed", "goto", "switch", "default", "inline", "noinline", "volatile", "public", "static", "extern", "external", "interface", "long", "short", "double", "half", "fixed", "unsigned", "input", "output", "hvec2", "hvec3", "hvec4", "dvec2", "dvec3", "dvec4", "fvec2", "fvec3", "fvec4", "sampler2DRect", "sampler3DRect", "sampler2DRectShadow", "sizeof", "cast", "namespace", "using"];
          }, 7827: function(d) {
            d.exports = ["<<=", ">>=", "++", "--", "<<", ">>", "<=", ">=", "==", "!=", "&&", "||", "+=", "-=", "*=", "/=", "%=", "&=", "^^", "^=", "|=", "(", ")", "[", "]", ".", "!", "~", "*", "/", "%", "+", "-", "<", ">", "&", "^", "|", "?", ":", "=", ",", ";", "{", "}"];
          }, 4905: function(d, f, c) {
            var g = c(5874);
            d.exports = function(m, x) {
              var w = g(x), k = [];
              return (k = k.concat(w(m))).concat(w(null));
            };
          }, 3236: function(d) {
            d.exports = function(f) {
              typeof f == "string" && (f = [f]);
              for (var c = [].slice.call(arguments, 1), g = [], m = 0; m < f.length - 1; m++) g.push(f[m], c[m] || "");
              return g.push(f[m]), g.join("");
            };
          }, 7520: function(d, f, c) {
            var g = c(9507);
            d.exports = g && function() {
              var m = !1;
              try {
                var x = Object.defineProperty({}, "passive", { get: function() {
                  m = !0;
                } });
                window.addEventListener("test", null, x), window.removeEventListener("test", null, x);
              } catch {
                m = !1;
              }
              return m;
            }();
          }, 3778: function(d, f) {
            f.read = function(c, g, m, x, w) {
              var k, S, A = 8 * w - x - 1, C = (1 << A) - 1, D = C >> 1, L = -7, E = m ? w - 1 : 0, P = m ? -1 : 1, I = c[g + E];
              for (E += P, k = I & (1 << -L) - 1, I >>= -L, L += A; L > 0; k = 256 * k + c[g + E], E += P, L -= 8) ;
              for (S = k & (1 << -L) - 1, k >>= -L, L += x; L > 0; S = 256 * S + c[g + E], E += P, L -= 8) ;
              if (k === 0) k = 1 - D;
              else {
                if (k === C) return S ? NaN : 1 / 0 * (I ? -1 : 1);
                S += Math.pow(2, x), k -= D;
              }
              return (I ? -1 : 1) * S * Math.pow(2, k - x);
            }, f.write = function(c, g, m, x, w, k) {
              var S, A, C, D = 8 * k - w - 1, L = (1 << D) - 1, E = L >> 1, P = w === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, I = x ? 0 : k - 1, M = x ? 1 : -1, O = g < 0 || g === 0 && 1 / g < 0 ? 1 : 0;
              for (g = Math.abs(g), isNaN(g) || g === 1 / 0 ? (A = isNaN(g) ? 1 : 0, S = L) : (S = Math.floor(Math.log(g) / Math.LN2), g * (C = Math.pow(2, -S)) < 1 && (S--, C *= 2), (g += S + E >= 1 ? P / C : P * Math.pow(2, 1 - E)) * C >= 2 && (S++, C /= 2), S + E >= L ? (A = 0, S = L) : S + E >= 1 ? (A = (g * C - 1) * Math.pow(2, w), S += E) : (A = g * Math.pow(2, E - 1) * Math.pow(2, w), S = 0)); w >= 8; c[m + I] = 255 & A, I += M, A /= 256, w -= 8) ;
              for (S = S << w | A, D += w; D > 0; c[m + I] = 255 & S, I += M, S /= 256, D -= 8) ;
              c[m + I - M] |= 128 * O;
            };
          }, 8954: function(d, f, c) {
            d.exports = function(D, L) {
              var E = D.length;
              if (E === 0) throw new Error("Must have at least d+1 points");
              var P = D[0].length;
              if (E <= P) throw new Error("Must input at least d+1 points");
              var I = D.slice(0, P + 1), M = g.apply(void 0, I);
              if (M === 0) throw new Error("Input not in general position");
              for (var O = new Array(P + 1), T = 0; T <= P; ++T) O[T] = T;
              M < 0 && (O[0] = 1, O[1] = 0);
              var z = new x(O, new Array(P + 1), !1), F = z.adjacent, U = new Array(P + 2);
              for (T = 0; T <= P; ++T) {
                for (var V = O.slice(), $ = 0; $ <= P; ++$) $ === T && (V[$] = -1);
                var q = V[0];
                V[0] = V[1], V[1] = q;
                var K = new x(V, new Array(P + 1), !0);
                F[T] = K, U[T] = K;
              }
              for (U[P + 1] = z, T = 0; T <= P; ++T) {
                V = F[T].vertices;
                var re = F[T].adjacent;
                for ($ = 0; $ <= P; ++$) {
                  var Y = V[$];
                  if (Y < 0) re[$] = z;
                  else for (var te = 0; te <= P; ++te) F[te].vertices.indexOf(Y) < 0 && (re[$] = F[te]);
                }
              }
              var ee = new A(P, I, U), X = !!L;
              for (T = P + 1; T < E; ++T) ee.insert(D[T], X);
              return ee.boundary();
            };
            var g = c(3250), m = c(6803).Fw;
            function x(D, L, E) {
              this.vertices = D, this.adjacent = L, this.boundary = E, this.lastVisited = -1;
            }
            function w(D, L, E) {
              this.vertices = D, this.cell = L, this.index = E;
            }
            function k(D, L) {
              return m(D.vertices, L.vertices);
            }
            x.prototype.flip = function() {
              var D = this.vertices[0];
              this.vertices[0] = this.vertices[1], this.vertices[1] = D;
              var L = this.adjacent[0];
              this.adjacent[0] = this.adjacent[1], this.adjacent[1] = L;
            };
            var S = [];
            function A(D, L, E) {
              this.dimension = D, this.vertices = L, this.simplices = E, this.interior = E.filter(function(O) {
                return !O.boundary;
              }), this.tuple = new Array(D + 1);
              for (var P = 0; P <= D; ++P) this.tuple[P] = this.vertices[P];
              var I, M = S[D];
              M || (M = S[D] = ((I = g[D + 1]) || (I = g), /* @__PURE__ */ function(O) {
                return function() {
                  var T = this.tuple;
                  return O.apply(this, T);
                };
              }(I))), this.orient = M;
            }
            var C = A.prototype;
            C.handleBoundaryDegeneracy = function(D, L) {
              var E = this.dimension, P = this.vertices.length - 1, I = this.tuple, M = this.vertices, O = [D];
              for (D.lastVisited = -P; O.length > 0; ) for (var T = (D = O.pop()).adjacent, z = 0; z <= E; ++z) {
                var F = T[z];
                if (F.boundary && !(F.lastVisited <= -P)) {
                  for (var U = F.vertices, V = 0; V <= E; ++V) {
                    var $ = U[V];
                    I[V] = $ < 0 ? L : M[$];
                  }
                  var q = this.orient();
                  if (q > 0) return F;
                  F.lastVisited = -P, q === 0 && O.push(F);
                }
              }
              return null;
            }, C.walk = function(D, L) {
              var E = this.vertices.length - 1, P = this.dimension, I = this.vertices, M = this.tuple, O = L ? this.interior.length * Math.random() | 0 : this.interior.length - 1, T = this.interior[O];
              e: for (; !T.boundary; ) {
                for (var z = T.vertices, F = T.adjacent, U = 0; U <= P; ++U) M[U] = I[z[U]];
                for (T.lastVisited = E, U = 0; U <= P; ++U) {
                  var V = F[U];
                  if (!(V.lastVisited >= E)) {
                    var $ = M[U];
                    M[U] = D;
                    var q = this.orient();
                    if (M[U] = $, q < 0) {
                      T = V;
                      continue e;
                    }
                    V.boundary ? V.lastVisited = -E : V.lastVisited = E;
                  }
                }
                return;
              }
              return T;
            }, C.addPeaks = function(D, L) {
              var E = this.vertices.length - 1, P = this.dimension, I = this.vertices, M = this.tuple, O = this.interior, T = this.simplices, z = [L];
              L.lastVisited = E, L.vertices[L.vertices.indexOf(-1)] = E, L.boundary = !1, O.push(L);
              for (var F = []; z.length > 0; ) {
                var U = (L = z.pop()).vertices, V = L.adjacent, $ = U.indexOf(E);
                if (!($ < 0)) {
                  for (var q = 0; q <= P; ++q) if (q !== $) {
                    var K = V[q];
                    if (K.boundary && !(K.lastVisited >= E)) {
                      var re = K.vertices;
                      if (K.lastVisited !== -E) {
                        for (var Y = 0, te = 0; te <= P; ++te) re[te] < 0 ? (Y = te, M[te] = D) : M[te] = I[re[te]];
                        if (this.orient() > 0) {
                          re[Y] = E, K.boundary = !1, O.push(K), z.push(K), K.lastVisited = E;
                          continue;
                        }
                        K.lastVisited = -E;
                      }
                      var ee = K.adjacent, X = U.slice(), Q = V.slice(), ue = new x(X, Q, !0);
                      T.push(ue);
                      var ce = ee.indexOf(L);
                      if (!(ce < 0)) for (ee[ce] = ue, Q[$] = K, X[q] = -1, Q[q] = L, V[q] = ue, ue.flip(), te = 0; te <= P; ++te) {
                        var he = X[te];
                        if (!(he < 0 || he === E)) {
                          for (var de = new Array(P - 1), ne = 0, ae = 0; ae <= P; ++ae) {
                            var se = X[ae];
                            se < 0 || ae === te || (de[ne++] = se);
                          }
                          F.push(new w(de, ue, te));
                        }
                      }
                    }
                  }
                }
              }
              for (F.sort(k), q = 0; q + 1 < F.length; q += 2) {
                var me = F[q], ye = F[q + 1], pe = me.index, be = ye.index;
                pe < 0 || be < 0 || (me.cell.adjacent[me.index] = ye.cell, ye.cell.adjacent[ye.index] = me.cell);
              }
            }, C.insert = function(D, L) {
              var E = this.vertices;
              E.push(D);
              var P = this.walk(D, L);
              if (P) {
                for (var I = this.dimension, M = this.tuple, O = 0; O <= I; ++O) {
                  var T = P.vertices[O];
                  M[O] = T < 0 ? D : E[T];
                }
                var z = this.orient(M);
                z < 0 || (z !== 0 || (P = this.handleBoundaryDegeneracy(P, D))) && this.addPeaks(D, P);
              }
            }, C.boundary = function() {
              for (var D = this.dimension, L = [], E = this.simplices, P = E.length, I = 0; I < P; ++I) {
                var M = E[I];
                if (M.boundary) {
                  for (var O = new Array(D), T = M.vertices, z = 0, F = 0, U = 0; U <= D; ++U) T[U] >= 0 ? O[z++] = T[U] : F = 1 & U;
                  if (F === (1 & D)) {
                    var V = O[0];
                    O[0] = O[1], O[1] = V;
                  }
                  L.push(O);
                }
              }
              return L;
            };
          }, 3352: function(d, f, c) {
            var g = c(2478);
            function m(z, F, U, V, $) {
              this.mid = z, this.left = F, this.right = U, this.leftPoints = V, this.rightPoints = $, this.count = (F ? F.count : 0) + (U ? U.count : 0) + V.length;
            }
            d.exports = function(z) {
              return z && z.length !== 0 ? new O(M(z)) : new O(null);
            };
            var x = m.prototype;
            function w(z, F) {
              z.mid = F.mid, z.left = F.left, z.right = F.right, z.leftPoints = F.leftPoints, z.rightPoints = F.rightPoints, z.count = F.count;
            }
            function k(z, F) {
              var U = M(F);
              z.mid = U.mid, z.left = U.left, z.right = U.right, z.leftPoints = U.leftPoints, z.rightPoints = U.rightPoints, z.count = U.count;
            }
            function S(z, F) {
              var U = z.intervals([]);
              U.push(F), k(z, U);
            }
            function A(z, F) {
              var U = z.intervals([]), V = U.indexOf(F);
              return V < 0 ? 0 : (U.splice(V, 1), k(z, U), 1);
            }
            function C(z, F, U) {
              for (var V = 0; V < z.length && z[V][0] <= F; ++V) {
                var $ = U(z[V]);
                if ($) return $;
              }
            }
            function D(z, F, U) {
              for (var V = z.length - 1; V >= 0 && z[V][1] >= F; --V) {
                var $ = U(z[V]);
                if ($) return $;
              }
            }
            function L(z, F) {
              for (var U = 0; U < z.length; ++U) {
                var V = F(z[U]);
                if (V) return V;
              }
            }
            function E(z, F) {
              return z - F;
            }
            function P(z, F) {
              return z[0] - F[0] || z[1] - F[1];
            }
            function I(z, F) {
              return z[1] - F[1] || z[0] - F[0];
            }
            function M(z) {
              if (z.length === 0) return null;
              for (var F = [], U = 0; U < z.length; ++U) F.push(z[U][0], z[U][1]);
              F.sort(E);
              var V = F[F.length >> 1], $ = [], q = [], K = [];
              for (U = 0; U < z.length; ++U) {
                var re = z[U];
                re[1] < V ? $.push(re) : V < re[0] ? q.push(re) : K.push(re);
              }
              var Y = K, te = K.slice();
              return Y.sort(P), te.sort(I), new m(V, M($), M(q), Y, te);
            }
            function O(z) {
              this.root = z;
            }
            x.intervals = function(z) {
              return z.push.apply(z, this.leftPoints), this.left && this.left.intervals(z), this.right && this.right.intervals(z), z;
            }, x.insert = function(z) {
              var F = this.count - this.leftPoints.length;
              if (this.count += 1, z[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (F + 1) ? S(this, z) : this.left.insert(z) : this.left = M([z]);
              else if (z[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (F + 1) ? S(this, z) : this.right.insert(z) : this.right = M([z]);
              else {
                var U = g.ge(this.leftPoints, z, P), V = g.ge(this.rightPoints, z, I);
                this.leftPoints.splice(U, 0, z), this.rightPoints.splice(V, 0, z);
              }
            }, x.remove = function(z) {
              var F = this.count - this.leftPoints;
              if (z[1] < this.mid) return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (F - 1) ? A(this, z) : (q = this.left.remove(z)) === 2 ? (this.left = null, this.count -= 1, 1) : (q === 1 && (this.count -= 1), q) : 0;
              if (z[0] > this.mid) return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (F - 1) ? A(this, z) : (q = this.right.remove(z)) === 2 ? (this.right = null, this.count -= 1, 1) : (q === 1 && (this.count -= 1), q) : 0;
              if (this.count === 1) return this.leftPoints[0] === z ? 2 : 0;
              if (this.leftPoints.length === 1 && this.leftPoints[0] === z) {
                if (this.left && this.right) {
                  for (var U = this, V = this.left; V.right; ) U = V, V = V.right;
                  if (U === this) V.right = this.right;
                  else {
                    var $ = this.left, q = this.right;
                    U.count -= V.count, U.right = V.left, V.left = $, V.right = q;
                  }
                  w(this, V), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
                } else this.left ? w(this, this.left) : w(this, this.right);
                return 1;
              }
              for ($ = g.ge(this.leftPoints, z, P); $ < this.leftPoints.length && this.leftPoints[$][0] === z[0]; ++$) if (this.leftPoints[$] === z) {
                for (this.count -= 1, this.leftPoints.splice($, 1), q = g.ge(this.rightPoints, z, I); q < this.rightPoints.length && this.rightPoints[q][1] === z[1]; ++q) if (this.rightPoints[q] === z) return this.rightPoints.splice(q, 1), 1;
              }
              return 0;
            }, x.queryPoint = function(z, F) {
              return z < this.mid ? this.left && (U = this.left.queryPoint(z, F)) ? U : C(this.leftPoints, z, F) : z > this.mid ? this.right && (U = this.right.queryPoint(z, F)) ? U : D(this.rightPoints, z, F) : L(this.leftPoints, F);
              var U;
            }, x.queryInterval = function(z, F, U) {
              var V;
              return z < this.mid && this.left && (V = this.left.queryInterval(z, F, U)) || F > this.mid && this.right && (V = this.right.queryInterval(z, F, U)) ? V : F < this.mid ? C(this.leftPoints, F, U) : z > this.mid ? D(this.rightPoints, z, U) : L(this.leftPoints, U);
            };
            var T = O.prototype;
            T.insert = function(z) {
              this.root ? this.root.insert(z) : this.root = new m(z[0], null, null, [z], [z]);
            }, T.remove = function(z) {
              if (this.root) {
                var F = this.root.remove(z);
                return F === 2 && (this.root = null), F !== 0;
              }
              return !1;
            }, T.queryPoint = function(z, F) {
              if (this.root) return this.root.queryPoint(z, F);
            }, T.queryInterval = function(z, F, U) {
              if (z <= F && this.root) return this.root.queryInterval(z, F, U);
            }, Object.defineProperty(T, "count", { get: function() {
              return this.root ? this.root.count : 0;
            } }), Object.defineProperty(T, "intervals", { get: function() {
              return this.root ? this.root.intervals([]) : [];
            } });
          }, 7762: function(d) {
            d.exports = function(f) {
              for (var c = new Array(f), g = 0; g < f; ++g) c[g] = g;
              return c;
            };
          }, 9507: function(d) {
            d.exports = !0;
          }, 7163: function(d) {
            function f(c) {
              return !!c.constructor && typeof c.constructor.isBuffer == "function" && c.constructor.isBuffer(c);
            }
            d.exports = function(c) {
              return c != null && (f(c) || function(g) {
                return typeof g.readFloatLE == "function" && typeof g.slice == "function" && f(g.slice(0, 0));
              }(c) || !!c._isBuffer);
            };
          }, 5219: function(d) {
            d.exports = function(f) {
              for (var c, g = f.length, m = 0; m < g; m++) if (((c = f.charCodeAt(m)) < 9 || c > 13) && c !== 32 && c !== 133 && c !== 160 && c !== 5760 && c !== 6158 && (c < 8192 || c > 8205) && c !== 8232 && c !== 8233 && c !== 8239 && c !== 8287 && c !== 8288 && c !== 12288 && c !== 65279) return !1;
              return !0;
            };
          }, 395: function(d) {
            d.exports = function(f, c, g) {
              return f * (1 - g) + c * g;
            };
          }, 2652: function(d, f, c) {
            var g = c(4335), m = c(6864), x = c(1903), w = c(9921), k = c(7608), S = c(5665), A = { length: c(1387), normalize: c(3536), dot: c(244), cross: c(5911) }, C = m(), D = m(), L = [0, 0, 0, 0], E = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], P = [0, 0, 0];
            function I(M, O, T, z, F) {
              M[0] = O[0] * z + T[0] * F, M[1] = O[1] * z + T[1] * F, M[2] = O[2] * z + T[2] * F;
            }
            d.exports = function(M, O, T, z, F, U) {
              if (O || (O = [0, 0, 0]), T || (T = [0, 0, 0]), z || (z = [0, 0, 0]), F || (F = [0, 0, 0, 1]), U || (U = [0, 0, 0, 1]), !g(C, M) || (x(D, C), D[3] = 0, D[7] = 0, D[11] = 0, D[15] = 1, Math.abs(w(D) < 1e-8))) return !1;
              var V, $, q, K, re, Y, te, ee = C[3], X = C[7], Q = C[11], ue = C[12], ce = C[13], he = C[14], de = C[15];
              if (ee !== 0 || X !== 0 || Q !== 0) {
                if (L[0] = ee, L[1] = X, L[2] = Q, L[3] = de, !k(D, D)) return !1;
                S(D, D), V = F, q = D, K = ($ = L)[0], re = $[1], Y = $[2], te = $[3], V[0] = q[0] * K + q[4] * re + q[8] * Y + q[12] * te, V[1] = q[1] * K + q[5] * re + q[9] * Y + q[13] * te, V[2] = q[2] * K + q[6] * re + q[10] * Y + q[14] * te, V[3] = q[3] * K + q[7] * re + q[11] * Y + q[15] * te;
              } else F[0] = F[1] = F[2] = 0, F[3] = 1;
              if (O[0] = ue, O[1] = ce, O[2] = he, function(ae, se) {
                ae[0][0] = se[0], ae[0][1] = se[1], ae[0][2] = se[2], ae[1][0] = se[4], ae[1][1] = se[5], ae[1][2] = se[6], ae[2][0] = se[8], ae[2][1] = se[9], ae[2][2] = se[10];
              }(E, C), T[0] = A.length(E[0]), A.normalize(E[0], E[0]), z[0] = A.dot(E[0], E[1]), I(E[1], E[1], E[0], 1, -z[0]), T[1] = A.length(E[1]), A.normalize(E[1], E[1]), z[0] /= T[1], z[1] = A.dot(E[0], E[2]), I(E[2], E[2], E[0], 1, -z[1]), z[2] = A.dot(E[1], E[2]), I(E[2], E[2], E[1], 1, -z[2]), T[2] = A.length(E[2]), A.normalize(E[2], E[2]), z[1] /= T[2], z[2] /= T[2], A.cross(P, E[1], E[2]), A.dot(E[0], P) < 0) for (var ne = 0; ne < 3; ne++) T[ne] *= -1, E[ne][0] *= -1, E[ne][1] *= -1, E[ne][2] *= -1;
              return U[0] = 0.5 * Math.sqrt(Math.max(1 + E[0][0] - E[1][1] - E[2][2], 0)), U[1] = 0.5 * Math.sqrt(Math.max(1 - E[0][0] + E[1][1] - E[2][2], 0)), U[2] = 0.5 * Math.sqrt(Math.max(1 - E[0][0] - E[1][1] + E[2][2], 0)), U[3] = 0.5 * Math.sqrt(Math.max(1 + E[0][0] + E[1][1] + E[2][2], 0)), E[2][1] > E[1][2] && (U[0] = -U[0]), E[0][2] > E[2][0] && (U[1] = -U[1]), E[1][0] > E[0][1] && (U[2] = -U[2]), !0;
            };
          }, 4335: function(d) {
            d.exports = function(f, c) {
              var g = c[15];
              if (g === 0) return !1;
              for (var m = 1 / g, x = 0; x < 16; x++) f[x] = c[x] * m;
              return !0;
            };
          }, 7442: function(d, f, c) {
            var g = c(6658), m = c(7182), x = c(2652), w = c(9921), k = c(8648), S = D(), A = D(), C = D();
            function D() {
              return { translate: L(), scale: L(1), skew: L(), perspective: [0, 0, 0, 1], quaternion: [0, 0, 0, 1] };
            }
            function L(E) {
              return [E || 0, E || 0, E || 0];
            }
            d.exports = function(E, P, I, M) {
              if (w(P) === 0 || w(I) === 0) return !1;
              var O = x(P, S.translate, S.scale, S.skew, S.perspective, S.quaternion), T = x(I, A.translate, A.scale, A.skew, A.perspective, A.quaternion);
              return !(!O || !T || (g(C.translate, S.translate, A.translate, M), g(C.skew, S.skew, A.skew, M), g(C.scale, S.scale, A.scale, M), g(C.perspective, S.perspective, A.perspective, M), k(C.quaternion, S.quaternion, A.quaternion, M), m(E, C.translate, C.scale, C.skew, C.perspective, C.quaternion), 0));
            };
          }, 7182: function(d, f, c) {
            var g = { identity: c(7894), translate: c(7656), multiply: c(6760), create: c(6864), scale: c(2504), fromRotationTranslation: c(6743) }, m = (g.create(), g.create());
            d.exports = function(x, w, k, S, A, C) {
              return g.identity(x), g.fromRotationTranslation(x, C, w), x[3] = A[0], x[7] = A[1], x[11] = A[2], x[15] = A[3], g.identity(m), S[2] !== 0 && (m[9] = S[2], g.multiply(x, x, m)), S[1] !== 0 && (m[9] = 0, m[8] = S[1], g.multiply(x, x, m)), S[0] !== 0 && (m[8] = 0, m[4] = S[0], g.multiply(x, x, m)), g.scale(x, x, k), x;
            };
          }, 4192: function(d, f, c) {
            var g = c(2478), m = c(7442), x = c(7608), w = c(5567), k = c(2408), S = c(7089), A = c(6582), C = c(7656), D = (c(2504), c(3536)), L = [0, 0, 0];
            function E(M) {
              this._components = M.slice(), this._time = [0], this.prevMatrix = M.slice(), this.nextMatrix = M.slice(), this.computedMatrix = M.slice(), this.computedInverse = M.slice(), this.computedEye = [0, 0, 0], this.computedUp = [0, 0, 0], this.computedCenter = [0, 0, 0], this.computedRadius = [0], this._limits = [-1 / 0, 1 / 0];
            }
            d.exports = function(M) {
              return new E((M = M || {}).matrix || [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
            };
            var P = E.prototype;
            P.recalcMatrix = function(M) {
              var O = this._time, T = g.le(O, M), z = this.computedMatrix;
              if (!(T < 0)) {
                var F = this._components;
                if (T === O.length - 1) for (var U = 16 * T, V = 0; V < 16; ++V) z[V] = F[U++];
                else {
                  var $ = O[T + 1] - O[T], q = (U = 16 * T, this.prevMatrix), K = !0;
                  for (V = 0; V < 16; ++V) q[V] = F[U++];
                  var re = this.nextMatrix;
                  for (V = 0; V < 16; ++V) re[V] = F[U++], K = K && q[V] === re[V];
                  if ($ < 1e-6 || K) for (V = 0; V < 16; ++V) z[V] = q[V];
                  else m(z, q, re, (M - O[T]) / $);
                }
                var Y = this.computedUp;
                Y[0] = z[1], Y[1] = z[5], Y[2] = z[9], D(Y, Y);
                var te = this.computedInverse;
                x(te, z);
                var ee = this.computedEye, X = te[15];
                ee[0] = te[12] / X, ee[1] = te[13] / X, ee[2] = te[14] / X;
                var Q = this.computedCenter, ue = Math.exp(this.computedRadius[0]);
                for (V = 0; V < 3; ++V) Q[V] = ee[V] - z[2 + 4 * V] * ue;
              }
            }, P.idle = function(M) {
              if (!(M < this.lastT())) {
                for (var O = this._components, T = O.length - 16, z = 0; z < 16; ++z) O.push(O[T++]);
                this._time.push(M);
              }
            }, P.flush = function(M) {
              var O = g.gt(this._time, M) - 2;
              O < 0 || (this._time.splice(0, O), this._components.splice(0, 16 * O));
            }, P.lastT = function() {
              return this._time[this._time.length - 1];
            }, P.lookAt = function(M, O, T, z) {
              this.recalcMatrix(M), O = O || this.computedEye, T = T || L, z = z || this.computedUp, this.setMatrix(M, A(this.computedMatrix, O, T, z));
              for (var F = 0, U = 0; U < 3; ++U) F += Math.pow(T[U] - O[U], 2);
              F = Math.log(Math.sqrt(F)), this.computedRadius[0] = F;
            }, P.rotate = function(M, O, T, z) {
              this.recalcMatrix(M);
              var F = this.computedInverse;
              O && k(F, F, O), T && w(F, F, T), z && S(F, F, z), this.setMatrix(M, x(this.computedMatrix, F));
            };
            var I = [0, 0, 0];
            P.pan = function(M, O, T, z) {
              I[0] = -(O || 0), I[1] = -(T || 0), I[2] = -(z || 0), this.recalcMatrix(M);
              var F = this.computedInverse;
              C(F, F, I), this.setMatrix(M, x(F, F));
            }, P.translate = function(M, O, T, z) {
              I[0] = O || 0, I[1] = T || 0, I[2] = z || 0, this.recalcMatrix(M);
              var F = this.computedMatrix;
              C(F, F, I), this.setMatrix(M, F);
            }, P.setMatrix = function(M, O) {
              if (!(M < this.lastT())) {
                this._time.push(M);
                for (var T = 0; T < 16; ++T) this._components.push(O[T]);
              }
            }, P.setDistance = function(M, O) {
              this.computedRadius[0] = O;
            }, P.setDistanceLimits = function(M, O) {
              var T = this._limits;
              T[0] = M, T[1] = O;
            }, P.getDistanceLimits = function(M) {
              var O = this._limits;
              return M ? (M[0] = O[0], M[1] = O[1], M) : O;
            };
          }, 3090: function(d, f, c) {
            d.exports = function(m) {
              var x = m.length;
              if (x < 3) {
                for (var w = new Array(x), k = 0; k < x; ++k) w[k] = k;
                return x === 2 && m[0][0] === m[1][0] && m[0][1] === m[1][1] ? [0] : w;
              }
              var S = new Array(x);
              for (k = 0; k < x; ++k) S[k] = k;
              S.sort(function(O, T) {
                return m[O][0] - m[T][0] || m[O][1] - m[T][1];
              });
              var A = [S[0], S[1]], C = [S[0], S[1]];
              for (k = 2; k < x; ++k) {
                for (var D = S[k], L = m[D], E = A.length; E > 1 && g(m[A[E - 2]], m[A[E - 1]], L) <= 0; ) E -= 1, A.pop();
                for (A.push(D), E = C.length; E > 1 && g(m[C[E - 2]], m[C[E - 1]], L) >= 0; ) E -= 1, C.pop();
                C.push(D);
              }
              w = new Array(C.length + A.length - 2);
              for (var P = 0, I = (k = 0, A.length); k < I; ++k) w[P++] = A[k];
              for (var M = C.length - 2; M > 0; --M) w[P++] = C[M];
              return w;
            };
            var g = c(3250)[3];
          }, 351: function(d, f, c) {
            d.exports = function(m, x) {
              x || (x = m, m = window);
              var w = 0, k = 0, S = 0, A = { shift: !1, alt: !1, control: !1, meta: !1 }, C = !1;
              function D(U) {
                var V = !1;
                return "altKey" in U && (V = V || U.altKey !== A.alt, A.alt = !!U.altKey), "shiftKey" in U && (V = V || U.shiftKey !== A.shift, A.shift = !!U.shiftKey), "ctrlKey" in U && (V = V || U.ctrlKey !== A.control, A.control = !!U.ctrlKey), "metaKey" in U && (V = V || U.metaKey !== A.meta, A.meta = !!U.metaKey), V;
              }
              function L(U, V) {
                var $ = g.x(V), q = g.y(V);
                "buttons" in V && (U = 0 | V.buttons), (U !== w || $ !== k || q !== S || D(V)) && (w = 0 | U, k = $ || 0, S = q || 0, x && x(w, k, S, A));
              }
              function E(U) {
                L(0, U);
              }
              function P() {
                (w || k || S || A.shift || A.alt || A.meta || A.control) && (k = S = 0, w = 0, A.shift = A.alt = A.control = A.meta = !1, x && x(0, 0, 0, A));
              }
              function I(U) {
                D(U) && x && x(w, k, S, A);
              }
              function M(U) {
                g.buttons(U) === 0 ? L(0, U) : L(w, U);
              }
              function O(U) {
                L(w | g.buttons(U), U);
              }
              function T(U) {
                L(w & ~g.buttons(U), U);
              }
              function z() {
                C || (C = !0, m.addEventListener("mousemove", M), m.addEventListener("mousedown", O), m.addEventListener("mouseup", T), m.addEventListener("mouseleave", E), m.addEventListener("mouseenter", E), m.addEventListener("mouseout", E), m.addEventListener("mouseover", E), m.addEventListener("blur", P), m.addEventListener("keyup", I), m.addEventListener("keydown", I), m.addEventListener("keypress", I), m !== window && (window.addEventListener("blur", P), window.addEventListener("keyup", I), window.addEventListener("keydown", I), window.addEventListener("keypress", I)));
              }
              z();
              var F = { element: m };
              return Object.defineProperties(F, { enabled: { get: function() {
                return C;
              }, set: function(U) {
                U ? z() : C && (C = !1, m.removeEventListener("mousemove", M), m.removeEventListener("mousedown", O), m.removeEventListener("mouseup", T), m.removeEventListener("mouseleave", E), m.removeEventListener("mouseenter", E), m.removeEventListener("mouseout", E), m.removeEventListener("mouseover", E), m.removeEventListener("blur", P), m.removeEventListener("keyup", I), m.removeEventListener("keydown", I), m.removeEventListener("keypress", I), m !== window && (window.removeEventListener("blur", P), window.removeEventListener("keyup", I), window.removeEventListener("keydown", I), window.removeEventListener("keypress", I)));
              }, enumerable: !0 }, buttons: { get: function() {
                return w;
              }, enumerable: !0 }, x: { get: function() {
                return k;
              }, enumerable: !0 }, y: { get: function() {
                return S;
              }, enumerable: !0 }, mods: { get: function() {
                return A;
              }, enumerable: !0 } }), F;
            };
            var g = c(4687);
          }, 24: function(d) {
            var f = { left: 0, top: 0 };
            d.exports = function(c, g, m) {
              g = g || c.currentTarget || c.srcElement, Array.isArray(m) || (m = [0, 0]);
              var x, w = c.clientX || 0, k = c.clientY || 0, S = (x = g) === window || x === document || x === document.body ? f : x.getBoundingClientRect();
              return m[0] = w - S.left, m[1] = k - S.top, m;
            };
          }, 4687: function(d, f) {
            function c(g) {
              return g.target || g.srcElement || window;
            }
            f.buttons = function(g) {
              if (typeof g == "object") {
                if ("buttons" in g) return g.buttons;
                if ("which" in g) {
                  if ((m = g.which) === 2) return 4;
                  if (m === 3) return 2;
                  if (m > 0) return 1 << m - 1;
                } else if ("button" in g) {
                  var m;
                  if ((m = g.button) === 1) return 4;
                  if (m === 2) return 2;
                  if (m >= 0) return 1 << m;
                }
              }
              return 0;
            }, f.element = c, f.x = function(g) {
              if (typeof g == "object") {
                if ("offsetX" in g) return g.offsetX;
                var m = c(g).getBoundingClientRect();
                return g.clientX - m.left;
              }
              return 0;
            }, f.y = function(g) {
              if (typeof g == "object") {
                if ("offsetY" in g) return g.offsetY;
                var m = c(g).getBoundingClientRect();
                return g.clientY - m.top;
              }
              return 0;
            };
          }, 8512: function(d, f, c) {
            var g = c(665);
            d.exports = function(m, x, w) {
              typeof m == "function" && (w = !!x, x = m, m = window);
              var k = g("ex", m), S = function(A) {
                w && A.preventDefault();
                var C = A.deltaX || 0, D = A.deltaY || 0, L = A.deltaZ || 0, E = 1;
                switch (A.deltaMode) {
                  case 1:
                    E = k;
                    break;
                  case 2:
                    E = window.innerHeight;
                }
                if (D *= E, L *= E, (C *= E) || D || L) return x(C, D, L, A);
              };
              return m.addEventListener("wheel", S), S;
            };
          }, 2640: function(d, f, c) {
            var g = c(1888);
            d.exports = function(x) {
              function w(L) {
                throw new Error("ndarray-extract-contour: " + L);
              }
              typeof x != "object" && w("Must specify arguments");
              var k = x.order;
              Array.isArray(k) || w("Must specify order");
              var S = x.arrayArguments || 1;
              S < 1 && w("Must have at least one array argument"), (x.scalarArguments || 0) < 0 && w("Scalar arg count must be > 0"), typeof x.vertex != "function" && w("Must specify vertex creation function"), typeof x.cell != "function" && w("Must specify cell creation function"), typeof x.phase != "function" && w("Must specify phase function");
              for (var A = x.getters || [], C = new Array(S), D = 0; D < S; ++D) A.indexOf(D) >= 0 ? C[D] = !0 : C[D] = !1;
              return function(L, E, P, I, M, O) {
                var T = [O, M].join(",");
                return (0, m[T])(L, E, P, g.mallocUint32, g.freeUint32);
              }(x.vertex, x.cell, x.phase, 0, k, C);
            };
            var m = { "false,0,1": function(x, w, k, S, A) {
              return function(C, D, L, E) {
                var P, I = 0 | C.shape[0], M = 0 | C.shape[1], O = C.data, T = 0 | C.offset, z = 0 | C.stride[0], F = 0 | C.stride[1], U = T, V = 0 | -z, $ = 0, q = 0 | -F, K = 0, re = -z - F | 0, Y = 0, te = 0 | z, ee = F - z * I | 0, X = 0, Q = 0, ue = 0, ce = 2 * I | 0, he = S(ce), de = S(ce), ne = 0, ae = 0, se = -1, me = -1, ye = 0, pe = 0 | -I, be = 0 | I, Ae = 0, Se = -I - 1 | 0, Me = I - 1 | 0, De = 0, Le = 0, We = 0;
                for (X = 0; X < I; ++X) he[ne++] = k(O[U], D, L, E), U += te;
                if (U += ee, M > 0) {
                  if (Q = 1, he[ne++] = k(O[U], D, L, E), U += te, I > 0) for (X = 1, P = O[U], ae = he[ne] = k(P, D, L, E), ye = he[ne + se], Ae = he[ne + pe], De = he[ne + Se], ae === ye && ae === Ae && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, ye, Ae, De, D, L, E), Le = de[ne] = ue++), ne += 1, U += te, X = 2; X < I; ++X) P = O[U], ae = he[ne] = k(P, D, L, E), ye = he[ne + se], Ae = he[ne + pe], De = he[ne + Se], ae === ye && ae === Ae && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, ye, Ae, De, D, L, E), Le = de[ne] = ue++, De !== ye && w(de[ne + se], Le, Y, $, De, ye, D, L, E)), ne += 1, U += te;
                  for (U += ee, ne = 0, We = se, se = me, me = We, We = pe, pe = be, be = We, We = Se, Se = Me, Me = We, Q = 2; Q < M; ++Q) {
                    if (he[ne++] = k(O[U], D, L, E), U += te, I > 0) for (X = 1, P = O[U], ae = he[ne] = k(P, D, L, E), ye = he[ne + se], Ae = he[ne + pe], De = he[ne + Se], ae === ye && ae === Ae && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, ye, Ae, De, D, L, E), Le = de[ne] = ue++, De !== Ae && w(de[ne + pe], Le, K, Y, Ae, De, D, L, E)), ne += 1, U += te, X = 2; X < I; ++X) P = O[U], ae = he[ne] = k(P, D, L, E), ye = he[ne + se], Ae = he[ne + pe], De = he[ne + Se], ae === ye && ae === Ae && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, ye, Ae, De, D, L, E), Le = de[ne] = ue++, De !== Ae && w(de[ne + pe], Le, K, Y, Ae, De, D, L, E), De !== ye && w(de[ne + se], Le, Y, $, De, ye, D, L, E)), ne += 1, U += te;
                    1 & Q && (ne = 0), We = se, se = me, me = We, We = pe, pe = be, be = We, We = Se, Se = Me, Me = We, U += ee;
                  }
                }
                A(de), A(he);
              };
            }, "false,1,0": function(x, w, k, S, A) {
              return function(C, D, L, E) {
                var P, I = 0 | C.shape[0], M = 0 | C.shape[1], O = C.data, T = 0 | C.offset, z = 0 | C.stride[0], F = 0 | C.stride[1], U = T, V = 0 | -z, $ = 0, q = 0 | -F, K = 0, re = -z - F | 0, Y = 0, te = 0 | F, ee = z - F * M | 0, X = 0, Q = 0, ue = 0, ce = 2 * M | 0, he = S(ce), de = S(ce), ne = 0, ae = 0, se = -1, me = -1, ye = 0, pe = 0 | -M, be = 0 | M, Ae = 0, Se = -M - 1 | 0, Me = M - 1 | 0, De = 0, Le = 0, We = 0;
                for (Q = 0; Q < M; ++Q) he[ne++] = k(O[U], D, L, E), U += te;
                if (U += ee, I > 0) {
                  if (X = 1, he[ne++] = k(O[U], D, L, E), U += te, M > 0) for (Q = 1, P = O[U], ae = he[ne] = k(P, D, L, E), Ae = he[ne + pe], ye = he[ne + se], De = he[ne + Se], ae === Ae && ae === ye && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, Ae, ye, De, D, L, E), Le = de[ne] = ue++), ne += 1, U += te, Q = 2; Q < M; ++Q) P = O[U], ae = he[ne] = k(P, D, L, E), Ae = he[ne + pe], ye = he[ne + se], De = he[ne + Se], ae === Ae && ae === ye && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, Ae, ye, De, D, L, E), Le = de[ne] = ue++, De !== ye && w(de[ne + se], Le, K, Y, ye, De, D, L, E)), ne += 1, U += te;
                  for (U += ee, ne = 0, We = pe, pe = be, be = We, We = se, se = me, me = We, We = Se, Se = Me, Me = We, X = 2; X < I; ++X) {
                    if (he[ne++] = k(O[U], D, L, E), U += te, M > 0) for (Q = 1, P = O[U], ae = he[ne] = k(P, D, L, E), Ae = he[ne + pe], ye = he[ne + se], De = he[ne + Se], ae === Ae && ae === ye && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, Ae, ye, De, D, L, E), Le = de[ne] = ue++, De !== Ae && w(de[ne + pe], Le, Y, $, De, Ae, D, L, E)), ne += 1, U += te, Q = 2; Q < M; ++Q) P = O[U], ae = he[ne] = k(P, D, L, E), Ae = he[ne + pe], ye = he[ne + se], De = he[ne + Se], ae === Ae && ae === ye && ae === De || ($ = O[U + V], K = O[U + q], Y = O[U + re], x(X, Q, P, $, K, Y, ae, Ae, ye, De, D, L, E), Le = de[ne] = ue++, De !== ye && w(de[ne + se], Le, K, Y, ye, De, D, L, E), De !== Ae && w(de[ne + pe], Le, Y, $, De, Ae, D, L, E)), ne += 1, U += te;
                    1 & X && (ne = 0), We = pe, pe = be, be = We, We = se, se = me, me = We, We = Se, Se = Me, Me = We, U += ee;
                  }
                }
                A(de), A(he);
              };
            } };
          }, 6199: function(d, f, c) {
            var g = c(1338), m = { zero: function(I, M, O, T) {
              var z = I[0];
              T |= 0;
              var F = 0, U = O[0];
              for (F = 0; F < z; ++F) M[T] = 0, T += U;
            }, fdTemplate1: function(I, M, O, T, z, F, U) {
              var V = I[0], $ = O[0], q = -1 * $, K = $;
              T |= 0, U |= 0;
              var re = 0, Y = $, te = F[0];
              for (re = 0; re < V; ++re) z[U] = 0.5 * (M[T + q] - M[T + K]), T += Y, U += te;
            }, fdTemplate2: function(I, M, O, T, z, F, U, V, $, q) {
              var K = I[0], re = I[1], Y = O[0], te = O[1], ee = F[0], X = F[1], Q = $[0], ue = $[1], ce = -1 * Y, he = Y, de = -1 * te, ne = te;
              T |= 0, U |= 0, q |= 0;
              var ae = 0, se = 0, me = te, ye = Y - re * te, pe = X, be = ee - re * X, Ae = ue, Se = Q - re * ue;
              for (se = 0; se < K; ++se) {
                for (ae = 0; ae < re; ++ae) z[U] = 0.5 * (M[T + ce] - M[T + he]), V[q] = 0.5 * (M[T + de] - M[T + ne]), T += me, U += pe, q += Ae;
                T += ye, U += be, q += Se;
              }
            } }, x = { cdiff: function(I) {
              var M = {};
              return function(O, T, z) {
                var F = O.dtype, U = O.order, V = T.dtype, $ = T.order, q = z.dtype, K = z.order, re = [F, U.join(), V, $.join(), q, K.join()].join(), Y = M[re];
                return Y || (M[re] = Y = I([F, U, V, $, q, K])), Y(O.shape.slice(0), O.data, O.stride, 0 | O.offset, T.data, T.stride, 0 | T.offset, z.data, z.stride, 0 | z.offset);
              };
            }, zero: function(I) {
              var M = {};
              return function(O) {
                var T = O.dtype, z = O.order, F = [T, z.join()].join(), U = M[F];
                return U || (M[F] = U = I([T, z])), U(O.shape.slice(0), O.data, O.stride, 0 | O.offset);
              };
            }, fdTemplate1: function(I) {
              var M = {};
              return function(O, T) {
                var z = O.dtype, F = O.order, U = T.dtype, V = T.order, $ = [z, F.join(), U, V.join()].join(), q = M[$];
                return q || (M[$] = q = I([z, F, U, V])), q(O.shape.slice(0), O.data, O.stride, 0 | O.offset, T.data, T.stride, 0 | T.offset);
              };
            }, fdTemplate2: function(I) {
              var M = {};
              return function(O, T, z) {
                var F = O.dtype, U = O.order, V = T.dtype, $ = T.order, q = z.dtype, K = z.order, re = [F, U.join(), V, $.join(), q, K.join()].join(), Y = M[re];
                return Y || (M[re] = Y = I([F, U, V, $, q, K])), Y(O.shape.slice(0), O.data, O.stride, 0 | O.offset, T.data, T.stride, 0 | T.offset, z.data, z.stride, 0 | z.offset);
              };
            } };
            function w(I) {
              return (0, x[I.funcName])(k.bind(void 0, I));
            }
            function k(I) {
              return m[I.funcName];
            }
            function S(I) {
              return w({ funcName: I.funcName });
            }
            var A = {}, C = {}, D = S({ funcName: "cdiff" }), L = S({ funcName: "zero" });
            function E(I) {
              return I in A ? A[I] : A[I] = S({ funcName: "fdTemplate" + I });
            }
            function P(I, M, O, T) {
              return function(z, F) {
                var U = F.shape.slice();
                return U[0] > 2 && U[1] > 2 && T(F.pick(-1, -1).lo(1, 1).hi(U[0] - 2, U[1] - 2), z.pick(-1, -1, 0).lo(1, 1).hi(U[0] - 2, U[1] - 2), z.pick(-1, -1, 1).lo(1, 1).hi(U[0] - 2, U[1] - 2)), U[1] > 2 && (O(F.pick(0, -1).lo(1).hi(U[1] - 2), z.pick(0, -1, 1).lo(1).hi(U[1] - 2)), M(z.pick(0, -1, 0).lo(1).hi(U[1] - 2))), U[1] > 2 && (O(F.pick(U[0] - 1, -1).lo(1).hi(U[1] - 2), z.pick(U[0] - 1, -1, 1).lo(1).hi(U[1] - 2)), M(z.pick(U[0] - 1, -1, 0).lo(1).hi(U[1] - 2))), U[0] > 2 && (O(F.pick(-1, 0).lo(1).hi(U[0] - 2), z.pick(-1, 0, 0).lo(1).hi(U[0] - 2)), M(z.pick(-1, 0, 1).lo(1).hi(U[0] - 2))), U[0] > 2 && (O(F.pick(-1, U[1] - 1).lo(1).hi(U[0] - 2), z.pick(-1, U[1] - 1, 0).lo(1).hi(U[0] - 2)), M(z.pick(-1, U[1] - 1, 1).lo(1).hi(U[0] - 2))), z.set(0, 0, 0, 0), z.set(0, 0, 1, 0), z.set(U[0] - 1, 0, 0, 0), z.set(U[0] - 1, 0, 1, 0), z.set(0, U[1] - 1, 0, 0), z.set(0, U[1] - 1, 1, 0), z.set(U[0] - 1, U[1] - 1, 0, 0), z.set(U[0] - 1, U[1] - 1, 1, 0), z;
              };
            }
            d.exports = function(I, M, O) {
              return Array.isArray(O) || (O = g(M.dimension, typeof O == "string" ? O : "clamp")), M.size === 0 ? I : M.dimension === 0 ? (I.set(0), I) : function(T) {
                var z = T.join();
                if ($ = C[z]) return $;
                for (var F = T.length, U = [D, L], V = 1; V <= F; ++V) U.push(E(V));
                var $ = P.apply(void 0, U);
                return C[z] = $, $;
              }(O)(I, M);
            };
          }, 4317: function(d) {
            function f(x, w) {
              var k = Math.floor(w), S = w - k, A = 0 <= k && k < x.shape[0], C = 0 <= k + 1 && k + 1 < x.shape[0];
              return (1 - S) * (A ? +x.get(k) : 0) + S * (C ? +x.get(k + 1) : 0);
            }
            function c(x, w, k) {
              var S = Math.floor(w), A = w - S, C = 0 <= S && S < x.shape[0], D = 0 <= S + 1 && S + 1 < x.shape[0], L = Math.floor(k), E = k - L, P = 0 <= L && L < x.shape[1], I = 0 <= L + 1 && L + 1 < x.shape[1], M = C && P ? x.get(S, L) : 0, O = C && I ? x.get(S, L + 1) : 0;
              return (1 - E) * ((1 - A) * M + A * (D && P ? x.get(S + 1, L) : 0)) + E * ((1 - A) * O + A * (D && I ? x.get(S + 1, L + 1) : 0));
            }
            function g(x, w, k, S) {
              var A = Math.floor(w), C = w - A, D = 0 <= A && A < x.shape[0], L = 0 <= A + 1 && A + 1 < x.shape[0], E = Math.floor(k), P = k - E, I = 0 <= E && E < x.shape[1], M = 0 <= E + 1 && E + 1 < x.shape[1], O = Math.floor(S), T = S - O, z = 0 <= O && O < x.shape[2], F = 0 <= O + 1 && O + 1 < x.shape[2], U = D && I && z ? x.get(A, E, O) : 0, V = D && M && z ? x.get(A, E + 1, O) : 0, $ = L && I && z ? x.get(A + 1, E, O) : 0, q = L && M && z ? x.get(A + 1, E + 1, O) : 0, K = D && I && F ? x.get(A, E, O + 1) : 0, re = D && M && F ? x.get(A, E + 1, O + 1) : 0;
              return (1 - T) * ((1 - P) * ((1 - C) * U + C * $) + P * ((1 - C) * V + C * q)) + T * ((1 - P) * ((1 - C) * K + C * (L && I && F ? x.get(A + 1, E, O + 1) : 0)) + P * ((1 - C) * re + C * (L && M && F ? x.get(A + 1, E + 1, O + 1) : 0)));
            }
            function m(x) {
              var w, k, S = 0 | x.shape.length, A = new Array(S), C = new Array(S), D = new Array(S), L = new Array(S);
              for (w = 0; w < S; ++w) k = +arguments[w + 1], A[w] = Math.floor(k), C[w] = k - A[w], D[w] = 0 <= A[w] && A[w] < x.shape[w], L[w] = 0 <= A[w] + 1 && A[w] + 1 < x.shape[w];
              var E, P, I, M = 0;
              e: for (w = 0; w < 1 << S; ++w) {
                for (P = 1, I = x.offset, E = 0; E < S; ++E) if (w & 1 << E) {
                  if (!L[E]) continue e;
                  P *= C[E], I += x.stride[E] * (A[E] + 1);
                } else {
                  if (!D[E]) continue e;
                  P *= 1 - C[E], I += x.stride[E] * A[E];
                }
                M += P * x.data[I];
              }
              return M;
            }
            d.exports = function(x, w, k, S) {
              switch (x.shape.length) {
                case 0:
                  return 0;
                case 1:
                  return f(x, w);
                case 2:
                  return c(x, w, k);
                case 3:
                  return g(x, w, k, S);
                default:
                  return m.apply(void 0, arguments);
              }
            }, d.exports.d1 = f, d.exports.d2 = c, d.exports.d3 = g;
          }, 5298: function(d, f) {
            var c = { "float64,2,1,0": function() {
              return function(k, S, A, C, D) {
                var L = k[0], E = k[1], P = k[2], I = A[0], M = A[1], O = A[2];
                C |= 0;
                var T = 0, z = 0, F = 0, U = O, V = M - P * O, $ = I - E * M;
                for (F = 0; F < L; ++F) {
                  for (z = 0; z < E; ++z) {
                    for (T = 0; T < P; ++T) S[C] /= D, C += U;
                    C += V;
                  }
                  C += $;
                }
              };
            }, "uint8,2,0,1,float64,2,1,0": function() {
              return function(k, S, A, C, D, L, E, P) {
                for (var I = k[0], M = k[1], O = k[2], T = A[0], z = A[1], F = A[2], U = L[0], V = L[1], $ = L[2], q = C |= 0, K = E |= 0, re = 0 | k[0]; re > 0; ) {
                  re < 64 ? (I = re, re = 0) : (I = 64, re -= 64);
                  for (var Y = 0 | k[1]; Y > 0; ) {
                    Y < 64 ? (M = Y, Y = 0) : (M = 64, Y -= 64), C = q + re * T + Y * z, E = K + re * U + Y * V;
                    var te = 0, ee = 0, X = 0, Q = F, ue = T - O * F, ce = z - I * T, he = $, de = U - O * $, ne = V - I * U;
                    for (X = 0; X < M; ++X) {
                      for (ee = 0; ee < I; ++ee) {
                        for (te = 0; te < O; ++te) S[C] = D[E] * P, C += Q, E += he;
                        C += ue, E += de;
                      }
                      C += ce, E += ne;
                    }
                  }
                }
              };
            }, "float32,1,0,float32,1,0": function() {
              return function(k, S, A, C, D, L, E) {
                var P = k[0], I = k[1], M = A[0], O = A[1], T = L[0], z = L[1];
                C |= 0, E |= 0;
                var F = 0, U = 0, V = O, $ = M - I * O, q = z, K = T - I * z;
                for (U = 0; U < P; ++U) {
                  for (F = 0; F < I; ++F) S[C] = D[E], C += V, E += q;
                  C += $, E += K;
                }
              };
            }, "float32,1,0,float32,0,1": function() {
              return function(k, S, A, C, D, L, E) {
                for (var P = k[0], I = k[1], M = A[0], O = A[1], T = L[0], z = L[1], F = C |= 0, U = E |= 0, V = 0 | k[1]; V > 0; ) {
                  V < 64 ? (I = V, V = 0) : (I = 64, V -= 64);
                  for (var $ = 0 | k[0]; $ > 0; ) {
                    $ < 64 ? (P = $, $ = 0) : (P = 64, $ -= 64), C = F + V * O + $ * M, E = U + V * z + $ * T;
                    var q = 0, K = 0, re = O, Y = M - I * O, te = z, ee = T - I * z;
                    for (K = 0; K < P; ++K) {
                      for (q = 0; q < I; ++q) S[C] = D[E], C += re, E += te;
                      C += Y, E += ee;
                    }
                  }
                }
              };
            }, "uint8,2,0,1,uint8,1,2,0": function() {
              return function(k, S, A, C, D, L, E) {
                for (var P = k[0], I = k[1], M = k[2], O = A[0], T = A[1], z = A[2], F = L[0], U = L[1], V = L[2], $ = C |= 0, q = E |= 0, K = 0 | k[2]; K > 0; ) {
                  K < 64 ? (M = K, K = 0) : (M = 64, K -= 64);
                  for (var re = 0 | k[0]; re > 0; ) {
                    re < 64 ? (P = re, re = 0) : (P = 64, re -= 64);
                    for (var Y = 0 | k[1]; Y > 0; ) {
                      Y < 64 ? (I = Y, Y = 0) : (I = 64, Y -= 64), C = $ + K * z + re * O + Y * T, E = q + K * V + re * F + Y * U;
                      var te = 0, ee = 0, X = 0, Q = z, ue = O - M * z, ce = T - P * O, he = V, de = F - M * V, ne = U - P * F;
                      for (X = 0; X < I; ++X) {
                        for (ee = 0; ee < P; ++ee) {
                          for (te = 0; te < M; ++te) S[C] = D[E], C += Q, E += he;
                          C += ue, E += de;
                        }
                        C += ce, E += ne;
                      }
                    }
                  }
                }
              };
            }, "uint8,2,0,1,array,2,0,1": function() {
              return function(k, S, A, C, D, L, E) {
                var P = k[0], I = k[1], M = k[2], O = A[0], T = A[1], z = A[2], F = L[0], U = L[1], V = L[2];
                C |= 0, E |= 0;
                var $ = 0, q = 0, K = 0, re = z, Y = O - M * z, te = T - P * O, ee = V, X = F - M * V, Q = U - P * F;
                for (K = 0; K < I; ++K) {
                  for (q = 0; q < P; ++q) {
                    for ($ = 0; $ < M; ++$) S[C] = D[E], C += re, E += ee;
                    C += Y, E += X;
                  }
                  C += te, E += Q;
                }
              };
            } }, g = function(k, S) {
              var A = S.join(",");
              return (0, c[A])();
            }, m = { mul: function(k) {
              var S = {};
              return function(A, C, D) {
                var L = A.dtype, E = A.order, P = C.dtype, I = C.order, M = D.dtype, O = D.order, T = [L, E.join(), P, I.join(), M, O.join()].join(), z = S[T];
                return z || (S[T] = z = k([L, E, P, I, M, O])), z(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C.data, C.stride, 0 | C.offset, D.data, D.stride, 0 | D.offset);
              };
            }, muls: function(k) {
              var S = {};
              return function(A, C, D) {
                var L = A.dtype, E = A.order, P = C.dtype, I = C.order, M = [L, E.join(), P, I.join()].join(), O = S[M];
                return O || (S[M] = O = k([L, E, P, I])), O(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C.data, C.stride, 0 | C.offset, D);
              };
            }, mulseq: function(k) {
              var S = {};
              return function(A, C) {
                var D = A.dtype, L = A.order, E = [D, L.join()].join(), P = S[E];
                return P || (S[E] = P = k([D, L])), P(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C);
              };
            }, div: function(k) {
              var S = {};
              return function(A, C, D) {
                var L = A.dtype, E = A.order, P = C.dtype, I = C.order, M = D.dtype, O = D.order, T = [L, E.join(), P, I.join(), M, O.join()].join(), z = S[T];
                return z || (S[T] = z = k([L, E, P, I, M, O])), z(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C.data, C.stride, 0 | C.offset, D.data, D.stride, 0 | D.offset);
              };
            }, divs: function(k) {
              var S = {};
              return function(A, C, D) {
                var L = A.dtype, E = A.order, P = C.dtype, I = C.order, M = [L, E.join(), P, I.join()].join(), O = S[M];
                return O || (S[M] = O = k([L, E, P, I])), O(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C.data, C.stride, 0 | C.offset, D);
              };
            }, divseq: function(k) {
              var S = {};
              return function(A, C) {
                var D = A.dtype, L = A.order, E = [D, L.join()].join(), P = S[E];
                return P || (S[E] = P = k([D, L])), P(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C);
              };
            }, assign: function(k) {
              var S = {};
              return function(A, C) {
                var D = A.dtype, L = A.order, E = C.dtype, P = C.order, I = [D, L.join(), E, P.join()].join(), M = S[I];
                return M || (S[I] = M = k([D, L, E, P])), M(A.shape.slice(0), A.data, A.stride, 0 | A.offset, C.data, C.stride, 0 | C.offset);
              };
            } };
            function x(k) {
              return S = { funcName: k.funcName }, (0, m[S.funcName])(g.bind(void 0, S));
              var S;
            }
            var w = { mul: "*", div: "/" };
            (function() {
              for (var k in w) f[k] = x({ funcName: k }), f[k + "s"] = x({ funcName: k + "s" }), f[k + "seq"] = x({ funcName: k + "seq" });
            })(), f.assign = x({ funcName: "assign" });
          }, 9994: function(d, f, c) {
            var g = c(9618), m = c(8277);
            d.exports = function(x, w) {
              for (var k = [], S = x, A = 1; Array.isArray(S); ) k.push(S.length), A *= S.length, S = S[0];
              return k.length === 0 ? g() : (w || (w = g(new Float64Array(A), k)), m(w, x), w);
            };
          }, 8277: function(d) {
            d.exports = /* @__PURE__ */ function(f) {
              var c = {};
              return function(g, m) {
                var x = g.dtype, w = g.order, k = [x, w.join()].join(), S = c[k];
                return S || (c[k] = S = f([x, w])), S(g.shape.slice(0), g.data, g.stride, 0 | g.offset, m);
              };
            }((function() {
              return function(f, c, g, m, x) {
                var w = f[0], k = f[1], S = f[2], A = g[0], C = g[1], D = g[2], L = [0, 0, 0];
                m |= 0;
                var E = 0, P = 0, I = 0, M = D, O = C - S * D, T = A - k * C;
                for (I = 0; I < w; ++I) {
                  for (P = 0; P < k; ++P) {
                    for (E = 0; E < S; ++E) {
                      var z, F = x;
                      for (z = 0; z < L.length - 1; ++z) F = F[L[z]];
                      c[m] = F[L[L.length - 1]], m += M, ++L[2];
                    }
                    m += O, L[2] -= S, ++L[1];
                  }
                  m += T, L[1] -= k, ++L[0];
                }
              };
            }).bind(void 0, { funcName: "convert" }));
          }, 7640: function(d, f, c) {
            var g = c(1888);
            function m(S) {
              return S === "uint32" ? [g.mallocUint32, g.freeUint32] : null;
            }
            var x = { "uint32,1,0": function(S, A) {
              return function(C, D, L, E, P, I, M, O, T, z, F) {
                var U, V, $, q, K, re, Y, te, ee = C * P + E, X = S(O);
                for (U = C + 1; U <= D; ++U) {
                  for (V = U, $ = ee += P, K = 0, re = ee, q = 0; q < O; ++q) X[K++] = L[re], re += T;
                  e: for (; V-- > C; ) {
                    K = 0, re = $ - P;
                    t: for (q = 0; q < O; ++q) {
                      if ((Y = L[re]) < (te = X[K])) break e;
                      if (Y > te) break t;
                      re += z, K += F;
                    }
                    for (K = $, re = $ - P, q = 0; q < O; ++q) L[K] = L[re], K += T, re += T;
                    $ -= P;
                  }
                  for (K = $, re = 0, q = 0; q < O; ++q) L[K] = X[re++], K += T;
                }
                A(X);
              };
            } }, w = { "uint32,1,0": function(S, A, C) {
              return function D(L, E, P, I, M, O, T, z, F, U, V) {
                var $, q, K, re, Y, te, ee, X, Q, ue, ce, he, de, ne, ae, se, me, ye, pe, be, Ae, Se, Me, De, Le, We = (E - L + 1) / 6 | 0, Ee = L + We, Ne = E - We, Ie = L + E >> 1, ge = Ie - We, Ce = Ie + We, we = Ee, Ge = ge, Re = Ie, je = Ce, Ke = Ne, tt = L + 1, _e = E - 1, Be = !0, $e = 0, Ze = 0, ct = 0, ft = z, _t = A(ft), Pt = A(ft);
                ce = M * we, he = M * Ge, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = we, we = Ge, Ge = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * je, he = M * Ke, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = je, je = Ke, Ke = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * we, he = M * Re, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = we, we = Re, Re = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * Ge, he = M * Re, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = Ge, Ge = Re, Re = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * we, he = M * je, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = we, we = je, je = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * Re, he = M * je, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = Re, Re = je, je = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * Ge, he = M * Ke, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = Ge, Ge = Ke, Ke = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * Ge, he = M * Re, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = Ge, Ge = Re, Re = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                ce = M * je, he = M * Ke, Le = I;
                e: for (ue = 0; ue < z; ++ue) {
                  if (X = he + Le, (ct = P[ee = ce + Le] - P[X]) > 0) {
                    q = je, je = Ke, Ke = q;
                    break e;
                  }
                  if (ct < 0) break e;
                  Le += U;
                }
                for (ce = M * we, he = M * Ge, de = M * Re, ne = M * je, ae = M * Ke, se = M * Ee, me = M * Ie, ye = M * Ne, De = 0, Le = I, ue = 0; ue < z; ++ue) ee = ce + Le, X = he + Le, Q = de + Le, pe = ne + Le, be = ae + Le, Ae = se + Le, Se = me + Le, Me = ye + Le, _t[De] = P[X], Pt[De] = P[pe], Be = Be && _t[De] === Pt[De], K = P[ee], re = P[Q], Y = P[be], P[Ae] = K, P[Se] = re, P[Me] = Y, ++De, Le += F;
                for (ce = M * ge, he = M * L, Le = I, ue = 0; ue < z; ++ue) X = he + Le, P[ee = ce + Le] = P[X], Le += F;
                for (ce = M * Ce, he = M * E, Le = I, ue = 0; ue < z; ++ue) X = he + Le, P[ee = ce + Le] = P[X], Le += F;
                if (Be) for (te = tt; te <= _e; ++te) {
                  for (ee = I + te * M, De = 0, ue = 0; ue < z && (ct = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                  if (ct !== 0) if (ct < 0) {
                    if (te !== tt) for (ce = M * te, he = M * tt, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                    ++tt;
                  } else for (; ; ) {
                    for (ee = I + _e * M, De = 0, ue = 0; ue < z && (ct = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                    if (!(ct > 0)) {
                      if (ct < 0) {
                        for (ce = M * te, he = M * tt, de = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, Q = de + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = P[Q], P[Q] = $, Le += F;
                        ++tt, --_e;
                        break;
                      }
                      for (ce = M * te, he = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                      --_e;
                      break;
                    }
                    _e--;
                  }
                }
                else for (te = tt; te <= _e; ++te) {
                  for (ee = I + te * M, De = 0, ue = 0; ue < z && ($e = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                  if ($e < 0) {
                    if (te !== tt) for (ce = M * te, he = M * tt, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                    ++tt;
                  } else {
                    for (ee = I + te * M, De = 0, ue = 0; ue < z && (Ze = P[ee] - Pt[De]) == 0; ++ue) De += V, ee += U;
                    if (Ze > 0) for (; ; ) {
                      for (ee = I + _e * M, De = 0, ue = 0; ue < z && (ct = P[ee] - Pt[De]) == 0; ++ue) De += V, ee += U;
                      if (!(ct > 0)) {
                        for (ee = I + _e * M, De = 0, ue = 0; ue < z && (ct = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                        if (ct < 0) {
                          for (ce = M * te, he = M * tt, de = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, Q = de + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = P[Q], P[Q] = $, Le += F;
                          ++tt, --_e;
                        } else {
                          for (ce = M * te, he = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                          --_e;
                        }
                        break;
                      }
                      if (--_e < te) break;
                    }
                  }
                }
                for (ce = M * L, he = M * (tt - 1), De = 0, Le = I, ue = 0; ue < z; ++ue) X = he + Le, P[ee = ce + Le] = P[X], P[X] = _t[De], ++De, Le += F;
                for (ce = M * E, he = M * (_e + 1), De = 0, Le = I, ue = 0; ue < z; ++ue) X = he + Le, P[ee = ce + Le] = P[X], P[X] = Pt[De], ++De, Le += F;
                if (tt - 2 - L <= 32 ? S(L, tt - 2, P, I, M, O, T, z, F, U, V) : D(L, tt - 2, P, I, M, O, T, z, F, U, V), E - (_e + 2) <= 32 ? S(_e + 2, E, P, I, M, O, T, z, F, U, V) : D(_e + 2, E, P, I, M, O, T, z, F, U, V), Be) return C(_t), void C(Pt);
                if (tt < Ee && _e > Ne) {
                  e: for (; ; ) {
                    for (ee = I + tt * M, De = 0, Le = I, ue = 0; ue < z; ++ue) {
                      if (P[ee] !== _t[De]) break e;
                      ++De, ee += F;
                    }
                    ++tt;
                  }
                  e: for (; ; ) {
                    for (ee = I + _e * M, De = 0, Le = I, ue = 0; ue < z; ++ue) {
                      if (P[ee] !== Pt[De]) break e;
                      ++De, ee += F;
                    }
                    --_e;
                  }
                  for (te = tt; te <= _e; ++te) {
                    for (ee = I + te * M, De = 0, ue = 0; ue < z && ($e = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                    if ($e === 0) {
                      if (te !== tt) for (ce = M * te, he = M * tt, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                      ++tt;
                    } else {
                      for (ee = I + te * M, De = 0, ue = 0; ue < z && (Ze = P[ee] - Pt[De]) == 0; ++ue) De += V, ee += U;
                      if (Ze === 0) for (; ; ) {
                        for (ee = I + _e * M, De = 0, ue = 0; ue < z && (ct = P[ee] - Pt[De]) == 0; ++ue) De += V, ee += U;
                        if (ct !== 0) {
                          for (ee = I + _e * M, De = 0, ue = 0; ue < z && (ct = P[ee] - _t[De]) == 0; ++ue) De += V, ee += U;
                          if (ct < 0) {
                            for (ce = M * te, he = M * tt, de = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, Q = de + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = P[Q], P[Q] = $, Le += F;
                            ++tt, --_e;
                          } else {
                            for (ce = M * te, he = M * _e, Le = I, ue = 0; ue < z; ++ue) X = he + Le, $ = P[ee = ce + Le], P[ee] = P[X], P[X] = $, Le += F;
                            --_e;
                          }
                          break;
                        }
                        if (--_e < te) break;
                      }
                    }
                  }
                }
                C(_t), C(Pt), _e - tt <= 32 ? S(tt, _e, P, I, M, O, T, z, F, U, V) : D(tt, _e, P, I, M, O, T, z, F, U, V);
              };
            } }, k = { "uint32,1,0": function(S, A) {
              return function(C) {
                var D = C.data, L = 0 | C.offset, E = C.shape, P = C.stride, I = 0 | P[0], M = 0 | E[0], O = 0 | P[1], T = 0 | E[1], z = O, F = O;
                M <= 32 ? S(0, M - 1, D, L, I, O, M, T, z, F, 1) : A(0, M - 1, D, L, I, O, M, T, z, F, 1);
              };
            } };
            d.exports = function(S, A) {
              var C = [A, S].join(","), D = k[C], L = function(P, I) {
                var M = m(I), O = [I, P].join(","), T = x[O];
                return M ? T(M[0], M[1]) : T();
              }(S, A), E = function(P, I, M) {
                var O = m(I), T = [I, P].join(","), z = w[T];
                return P.length > 1 && O ? z(M, O[0], O[1]) : z(M);
              }(S, A, L);
              return D(L, E);
            };
          }, 446: function(d, f, c) {
            var g = c(7640), m = {};
            d.exports = function(x) {
              var w = x.order, k = x.dtype, S = [w, k].join(":"), A = m[S];
              return A || (m[S] = A = g(w, k)), A(x), x;
            };
          }, 9618: function(d, f, c) {
            var g = c(7163), m = typeof Float64Array < "u";
            function x(C, D) {
              return C[0] - D[0];
            }
            function w() {
              var C, D = this.stride, L = new Array(D.length);
              for (C = 0; C < L.length; ++C) L[C] = [Math.abs(D[C]), C];
              L.sort(x);
              var E = new Array(L.length);
              for (C = 0; C < E.length; ++C) E[C] = L[C][1];
              return E;
            }
            var k = { T: function(C) {
              function D(E) {
                this.data = E;
              }
              var L = D.prototype;
              return L.dtype = C, L.index = function() {
                return -1;
              }, L.size = 0, L.dimension = -1, L.shape = L.stride = L.order = [], L.lo = L.hi = L.transpose = L.step = function() {
                return new D(this.data);
              }, L.get = L.set = function() {
              }, L.pick = function() {
                return null;
              }, function(E) {
                return new D(E);
              };
            }, 0: function(C, D) {
              function L(P, I) {
                this.data = P, this.offset = I;
              }
              var E = L.prototype;
              return E.dtype = C, E.index = function() {
                return this.offset;
              }, E.dimension = 0, E.size = 1, E.shape = E.stride = E.order = [], E.lo = E.hi = E.transpose = E.step = function() {
                return new L(this.data, this.offset);
              }, E.pick = function() {
                return D(this.data);
              }, E.valueOf = E.get = function() {
                return C === "generic" ? this.data.get(this.offset) : this.data[this.offset];
              }, E.set = function(P) {
                return C === "generic" ? this.data.set(this.offset, P) : this.data[this.offset] = P;
              }, function(P, I, M, O) {
                return new L(P, O);
              };
            }, 1: function(C, D, L) {
              function E(I, M, O, T) {
                this.data = I, this.shape = [M], this.stride = [O], this.offset = 0 | T;
              }
              var P = E.prototype;
              return P.dtype = C, P.dimension = 1, Object.defineProperty(P, "size", { get: function() {
                return this.shape[0];
              } }), P.order = [0], P.set = function(I, M) {
                return C === "generic" ? this.data.set(this.offset + this.stride[0] * I, M) : this.data[this.offset + this.stride[0] * I] = M;
              }, P.get = function(I) {
                return C === "generic" ? this.data.get(this.offset + this.stride[0] * I) : this.data[this.offset + this.stride[0] * I];
              }, P.index = function(I) {
                return this.offset + this.stride[0] * I;
              }, P.hi = function(I) {
                return new E(this.data, typeof I != "number" || I < 0 ? this.shape[0] : 0 | I, this.stride[0], this.offset);
              }, P.lo = function(I) {
                var M = this.offset, O = 0, T = this.shape[0], z = this.stride[0];
                return typeof I == "number" && I >= 0 && (M += z * (O = 0 | I), T -= O), new E(this.data, T, z, M);
              }, P.step = function(I) {
                var M = this.shape[0], O = this.stride[0], T = this.offset, z = 0, F = Math.ceil;
                return typeof I == "number" && ((z = 0 | I) < 0 ? (T += O * (M - 1), M = F(-M / z)) : M = F(M / z), O *= z), new E(this.data, M, O, T);
              }, P.transpose = function(I) {
                I = I === void 0 ? 0 : 0 | I;
                var M = this.shape, O = this.stride;
                return new E(this.data, M[I], O[I], this.offset);
              }, P.pick = function(I) {
                var M = [], O = [], T = this.offset;
                return typeof I == "number" && I >= 0 ? T = T + this.stride[0] * I | 0 : (M.push(this.shape[0]), O.push(this.stride[0])), (0, D[M.length + 1])(this.data, M, O, T);
              }, function(I, M, O, T) {
                return new E(I, M[0], O[0], T);
              };
            }, 2: function(C, D, L) {
              function E(I, M, O, T, z, F) {
                this.data = I, this.shape = [M, O], this.stride = [T, z], this.offset = 0 | F;
              }
              var P = E.prototype;
              return P.dtype = C, P.dimension = 2, Object.defineProperty(P, "size", { get: function() {
                return this.shape[0] * this.shape[1];
              } }), Object.defineProperty(P, "order", { get: function() {
                return Math.abs(this.stride[0]) > Math.abs(this.stride[1]) ? [1, 0] : [0, 1];
              } }), P.set = function(I, M, O) {
                return C === "generic" ? this.data.set(this.offset + this.stride[0] * I + this.stride[1] * M, O) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M] = O;
              }, P.get = function(I, M) {
                return C === "generic" ? this.data.get(this.offset + this.stride[0] * I + this.stride[1] * M) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M];
              }, P.index = function(I, M) {
                return this.offset + this.stride[0] * I + this.stride[1] * M;
              }, P.hi = function(I, M) {
                return new E(this.data, typeof I != "number" || I < 0 ? this.shape[0] : 0 | I, typeof M != "number" || M < 0 ? this.shape[1] : 0 | M, this.stride[0], this.stride[1], this.offset);
              }, P.lo = function(I, M) {
                var O = this.offset, T = 0, z = this.shape[0], F = this.shape[1], U = this.stride[0], V = this.stride[1];
                return typeof I == "number" && I >= 0 && (O += U * (T = 0 | I), z -= T), typeof M == "number" && M >= 0 && (O += V * (T = 0 | M), F -= T), new E(this.data, z, F, U, V, O);
              }, P.step = function(I, M) {
                var O = this.shape[0], T = this.shape[1], z = this.stride[0], F = this.stride[1], U = this.offset, V = 0, $ = Math.ceil;
                return typeof I == "number" && ((V = 0 | I) < 0 ? (U += z * (O - 1), O = $(-O / V)) : O = $(O / V), z *= V), typeof M == "number" && ((V = 0 | M) < 0 ? (U += F * (T - 1), T = $(-T / V)) : T = $(T / V), F *= V), new E(this.data, O, T, z, F, U);
              }, P.transpose = function(I, M) {
                I = I === void 0 ? 0 : 0 | I, M = M === void 0 ? 1 : 0 | M;
                var O = this.shape, T = this.stride;
                return new E(this.data, O[I], O[M], T[I], T[M], this.offset);
              }, P.pick = function(I, M) {
                var O = [], T = [], z = this.offset;
                return typeof I == "number" && I >= 0 ? z = z + this.stride[0] * I | 0 : (O.push(this.shape[0]), T.push(this.stride[0])), typeof M == "number" && M >= 0 ? z = z + this.stride[1] * M | 0 : (O.push(this.shape[1]), T.push(this.stride[1])), (0, D[O.length + 1])(this.data, O, T, z);
              }, function(I, M, O, T) {
                return new E(I, M[0], M[1], O[0], O[1], T);
              };
            }, 3: function(C, D, L) {
              function E(I, M, O, T, z, F, U, V) {
                this.data = I, this.shape = [M, O, T], this.stride = [z, F, U], this.offset = 0 | V;
              }
              var P = E.prototype;
              return P.dtype = C, P.dimension = 3, Object.defineProperty(P, "size", { get: function() {
                return this.shape[0] * this.shape[1] * this.shape[2];
              } }), Object.defineProperty(P, "order", { get: function() {
                var I = Math.abs(this.stride[0]), M = Math.abs(this.stride[1]), O = Math.abs(this.stride[2]);
                return I > M ? M > O ? [2, 1, 0] : I > O ? [1, 2, 0] : [1, 0, 2] : I > O ? [2, 0, 1] : O > M ? [0, 1, 2] : [0, 2, 1];
              } }), P.set = function(I, M, O, T) {
                return C === "generic" ? this.data.set(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O, T) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O] = T;
              }, P.get = function(I, M, O) {
                return C === "generic" ? this.data.get(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O];
              }, P.index = function(I, M, O) {
                return this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O;
              }, P.hi = function(I, M, O) {
                return new E(this.data, typeof I != "number" || I < 0 ? this.shape[0] : 0 | I, typeof M != "number" || M < 0 ? this.shape[1] : 0 | M, typeof O != "number" || O < 0 ? this.shape[2] : 0 | O, this.stride[0], this.stride[1], this.stride[2], this.offset);
              }, P.lo = function(I, M, O) {
                var T = this.offset, z = 0, F = this.shape[0], U = this.shape[1], V = this.shape[2], $ = this.stride[0], q = this.stride[1], K = this.stride[2];
                return typeof I == "number" && I >= 0 && (T += $ * (z = 0 | I), F -= z), typeof M == "number" && M >= 0 && (T += q * (z = 0 | M), U -= z), typeof O == "number" && O >= 0 && (T += K * (z = 0 | O), V -= z), new E(this.data, F, U, V, $, q, K, T);
              }, P.step = function(I, M, O) {
                var T = this.shape[0], z = this.shape[1], F = this.shape[2], U = this.stride[0], V = this.stride[1], $ = this.stride[2], q = this.offset, K = 0, re = Math.ceil;
                return typeof I == "number" && ((K = 0 | I) < 0 ? (q += U * (T - 1), T = re(-T / K)) : T = re(T / K), U *= K), typeof M == "number" && ((K = 0 | M) < 0 ? (q += V * (z - 1), z = re(-z / K)) : z = re(z / K), V *= K), typeof O == "number" && ((K = 0 | O) < 0 ? (q += $ * (F - 1), F = re(-F / K)) : F = re(F / K), $ *= K), new E(this.data, T, z, F, U, V, $, q);
              }, P.transpose = function(I, M, O) {
                I = I === void 0 ? 0 : 0 | I, M = M === void 0 ? 1 : 0 | M, O = O === void 0 ? 2 : 0 | O;
                var T = this.shape, z = this.stride;
                return new E(this.data, T[I], T[M], T[O], z[I], z[M], z[O], this.offset);
              }, P.pick = function(I, M, O) {
                var T = [], z = [], F = this.offset;
                return typeof I == "number" && I >= 0 ? F = F + this.stride[0] * I | 0 : (T.push(this.shape[0]), z.push(this.stride[0])), typeof M == "number" && M >= 0 ? F = F + this.stride[1] * M | 0 : (T.push(this.shape[1]), z.push(this.stride[1])), typeof O == "number" && O >= 0 ? F = F + this.stride[2] * O | 0 : (T.push(this.shape[2]), z.push(this.stride[2])), (0, D[T.length + 1])(this.data, T, z, F);
              }, function(I, M, O, T) {
                return new E(I, M[0], M[1], M[2], O[0], O[1], O[2], T);
              };
            }, 4: function(C, D, L) {
              function E(I, M, O, T, z, F, U, V, $, q) {
                this.data = I, this.shape = [M, O, T, z], this.stride = [F, U, V, $], this.offset = 0 | q;
              }
              var P = E.prototype;
              return P.dtype = C, P.dimension = 4, Object.defineProperty(P, "size", { get: function() {
                return this.shape[0] * this.shape[1] * this.shape[2] * this.shape[3];
              } }), Object.defineProperty(P, "order", { get: L }), P.set = function(I, M, O, T, z) {
                return C === "generic" ? this.data.set(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T, z) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T] = z;
              }, P.get = function(I, M, O, T) {
                return C === "generic" ? this.data.get(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T];
              }, P.index = function(I, M, O, T) {
                return this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T;
              }, P.hi = function(I, M, O, T) {
                return new E(this.data, typeof I != "number" || I < 0 ? this.shape[0] : 0 | I, typeof M != "number" || M < 0 ? this.shape[1] : 0 | M, typeof O != "number" || O < 0 ? this.shape[2] : 0 | O, typeof T != "number" || T < 0 ? this.shape[3] : 0 | T, this.stride[0], this.stride[1], this.stride[2], this.stride[3], this.offset);
              }, P.lo = function(I, M, O, T) {
                var z = this.offset, F = 0, U = this.shape[0], V = this.shape[1], $ = this.shape[2], q = this.shape[3], K = this.stride[0], re = this.stride[1], Y = this.stride[2], te = this.stride[3];
                return typeof I == "number" && I >= 0 && (z += K * (F = 0 | I), U -= F), typeof M == "number" && M >= 0 && (z += re * (F = 0 | M), V -= F), typeof O == "number" && O >= 0 && (z += Y * (F = 0 | O), $ -= F), typeof T == "number" && T >= 0 && (z += te * (F = 0 | T), q -= F), new E(this.data, U, V, $, q, K, re, Y, te, z);
              }, P.step = function(I, M, O, T) {
                var z = this.shape[0], F = this.shape[1], U = this.shape[2], V = this.shape[3], $ = this.stride[0], q = this.stride[1], K = this.stride[2], re = this.stride[3], Y = this.offset, te = 0, ee = Math.ceil;
                return typeof I == "number" && ((te = 0 | I) < 0 ? (Y += $ * (z - 1), z = ee(-z / te)) : z = ee(z / te), $ *= te), typeof M == "number" && ((te = 0 | M) < 0 ? (Y += q * (F - 1), F = ee(-F / te)) : F = ee(F / te), q *= te), typeof O == "number" && ((te = 0 | O) < 0 ? (Y += K * (U - 1), U = ee(-U / te)) : U = ee(U / te), K *= te), typeof T == "number" && ((te = 0 | T) < 0 ? (Y += re * (V - 1), V = ee(-V / te)) : V = ee(V / te), re *= te), new E(this.data, z, F, U, V, $, q, K, re, Y);
              }, P.transpose = function(I, M, O, T) {
                I = I === void 0 ? 0 : 0 | I, M = M === void 0 ? 1 : 0 | M, O = O === void 0 ? 2 : 0 | O, T = T === void 0 ? 3 : 0 | T;
                var z = this.shape, F = this.stride;
                return new E(this.data, z[I], z[M], z[O], z[T], F[I], F[M], F[O], F[T], this.offset);
              }, P.pick = function(I, M, O, T) {
                var z = [], F = [], U = this.offset;
                return typeof I == "number" && I >= 0 ? U = U + this.stride[0] * I | 0 : (z.push(this.shape[0]), F.push(this.stride[0])), typeof M == "number" && M >= 0 ? U = U + this.stride[1] * M | 0 : (z.push(this.shape[1]), F.push(this.stride[1])), typeof O == "number" && O >= 0 ? U = U + this.stride[2] * O | 0 : (z.push(this.shape[2]), F.push(this.stride[2])), typeof T == "number" && T >= 0 ? U = U + this.stride[3] * T | 0 : (z.push(this.shape[3]), F.push(this.stride[3])), (0, D[z.length + 1])(this.data, z, F, U);
              }, function(I, M, O, T) {
                return new E(I, M[0], M[1], M[2], M[3], O[0], O[1], O[2], O[3], T);
              };
            }, 5: function(C, D, L) {
              function E(I, M, O, T, z, F, U, V, $, q, K, re) {
                this.data = I, this.shape = [M, O, T, z, F], this.stride = [U, V, $, q, K], this.offset = 0 | re;
              }
              var P = E.prototype;
              return P.dtype = C, P.dimension = 5, Object.defineProperty(P, "size", { get: function() {
                return this.shape[0] * this.shape[1] * this.shape[2] * this.shape[3] * this.shape[4];
              } }), Object.defineProperty(P, "order", { get: L }), P.set = function(I, M, O, T, z, F) {
                return C === "generic" ? this.data.set(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T + this.stride[4] * z, F) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T + this.stride[4] * z] = F;
              }, P.get = function(I, M, O, T, z) {
                return C === "generic" ? this.data.get(this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T + this.stride[4] * z) : this.data[this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T + this.stride[4] * z];
              }, P.index = function(I, M, O, T, z) {
                return this.offset + this.stride[0] * I + this.stride[1] * M + this.stride[2] * O + this.stride[3] * T + this.stride[4] * z;
              }, P.hi = function(I, M, O, T, z) {
                return new E(this.data, typeof I != "number" || I < 0 ? this.shape[0] : 0 | I, typeof M != "number" || M < 0 ? this.shape[1] : 0 | M, typeof O != "number" || O < 0 ? this.shape[2] : 0 | O, typeof T != "number" || T < 0 ? this.shape[3] : 0 | T, typeof z != "number" || z < 0 ? this.shape[4] : 0 | z, this.stride[0], this.stride[1], this.stride[2], this.stride[3], this.stride[4], this.offset);
              }, P.lo = function(I, M, O, T, z) {
                var F = this.offset, U = 0, V = this.shape[0], $ = this.shape[1], q = this.shape[2], K = this.shape[3], re = this.shape[4], Y = this.stride[0], te = this.stride[1], ee = this.stride[2], X = this.stride[3], Q = this.stride[4];
                return typeof I == "number" && I >= 0 && (F += Y * (U = 0 | I), V -= U), typeof M == "number" && M >= 0 && (F += te * (U = 0 | M), $ -= U), typeof O == "number" && O >= 0 && (F += ee * (U = 0 | O), q -= U), typeof T == "number" && T >= 0 && (F += X * (U = 0 | T), K -= U), typeof z == "number" && z >= 0 && (F += Q * (U = 0 | z), re -= U), new E(this.data, V, $, q, K, re, Y, te, ee, X, Q, F);
              }, P.step = function(I, M, O, T, z) {
                var F = this.shape[0], U = this.shape[1], V = this.shape[2], $ = this.shape[3], q = this.shape[4], K = this.stride[0], re = this.stride[1], Y = this.stride[2], te = this.stride[3], ee = this.stride[4], X = this.offset, Q = 0, ue = Math.ceil;
                return typeof I == "number" && ((Q = 0 | I) < 0 ? (X += K * (F - 1), F = ue(-F / Q)) : F = ue(F / Q), K *= Q), typeof M == "number" && ((Q = 0 | M) < 0 ? (X += re * (U - 1), U = ue(-U / Q)) : U = ue(U / Q), re *= Q), typeof O == "number" && ((Q = 0 | O) < 0 ? (X += Y * (V - 1), V = ue(-V / Q)) : V = ue(V / Q), Y *= Q), typeof T == "number" && ((Q = 0 | T) < 0 ? (X += te * ($ - 1), $ = ue(-$ / Q)) : $ = ue($ / Q), te *= Q), typeof z == "number" && ((Q = 0 | z) < 0 ? (X += ee * (q - 1), q = ue(-q / Q)) : q = ue(q / Q), ee *= Q), new E(this.data, F, U, V, $, q, K, re, Y, te, ee, X);
              }, P.transpose = function(I, M, O, T, z) {
                I = I === void 0 ? 0 : 0 | I, M = M === void 0 ? 1 : 0 | M, O = O === void 0 ? 2 : 0 | O, T = T === void 0 ? 3 : 0 | T, z = z === void 0 ? 4 : 0 | z;
                var F = this.shape, U = this.stride;
                return new E(this.data, F[I], F[M], F[O], F[T], F[z], U[I], U[M], U[O], U[T], U[z], this.offset);
              }, P.pick = function(I, M, O, T, z) {
                var F = [], U = [], V = this.offset;
                return typeof I == "number" && I >= 0 ? V = V + this.stride[0] * I | 0 : (F.push(this.shape[0]), U.push(this.stride[0])), typeof M == "number" && M >= 0 ? V = V + this.stride[1] * M | 0 : (F.push(this.shape[1]), U.push(this.stride[1])), typeof O == "number" && O >= 0 ? V = V + this.stride[2] * O | 0 : (F.push(this.shape[2]), U.push(this.stride[2])), typeof T == "number" && T >= 0 ? V = V + this.stride[3] * T | 0 : (F.push(this.shape[3]), U.push(this.stride[3])), typeof z == "number" && z >= 0 ? V = V + this.stride[4] * z | 0 : (F.push(this.shape[4]), U.push(this.stride[4])), (0, D[F.length + 1])(this.data, F, U, V);
              }, function(I, M, O, T) {
                return new E(I, M[0], M[1], M[2], M[3], M[4], O[0], O[1], O[2], O[3], O[4], T);
              };
            } };
            function S(C, D) {
              var L = D === -1 ? "T" : String(D), E = k[L];
              return D === -1 ? E(C) : D === 0 ? E(C, A[C][0]) : E(C, A[C], w);
            }
            var A = { generic: [], buffer: [], array: [], float32: [], float64: [], int8: [], int16: [], int32: [], uint8_clamped: [], uint8: [], uint16: [], uint32: [], bigint64: [], biguint64: [] };
            d.exports = function(C, D, L, E) {
              if (C === void 0) return (0, A.array[0])([]);
              typeof C == "number" && (C = [C]), D === void 0 && (D = [C.length]);
              var P = D.length;
              if (L === void 0) {
                L = new Array(P);
                for (var I = P - 1, M = 1; I >= 0; --I) L[I] = M, M *= D[I];
              }
              if (E === void 0) for (E = 0, I = 0; I < P; ++I) L[I] < 0 && (E -= (D[I] - 1) * L[I]);
              for (var O = function(z) {
                if (g(z)) return "buffer";
                if (m) switch (Object.prototype.toString.call(z)) {
                  case "[object Float64Array]":
                    return "float64";
                  case "[object Float32Array]":
                    return "float32";
                  case "[object Int8Array]":
                    return "int8";
                  case "[object Int16Array]":
                    return "int16";
                  case "[object Int32Array]":
                    return "int32";
                  case "[object Uint8ClampedArray]":
                    return "uint8_clamped";
                  case "[object Uint8Array]":
                    return "uint8";
                  case "[object Uint16Array]":
                    return "uint16";
                  case "[object Uint32Array]":
                    return "uint32";
                  case "[object BigInt64Array]":
                    return "bigint64";
                  case "[object BigUint64Array]":
                    return "biguint64";
                }
                return Array.isArray(z) ? "array" : "generic";
              }(C), T = A[O]; T.length <= P + 1; ) T.push(S(O, T.length - 1));
              return (0, T[P + 1])(C, D, L, E);
            };
          }, 1278: function(d, f, c) {
            var g = c(2361), m = Math.pow(2, -1074), x = -1 >>> 0;
            d.exports = function(w, k) {
              if (isNaN(w) || isNaN(k)) return NaN;
              if (w === k) return w;
              if (w === 0) return k < 0 ? -m : m;
              var S = g.hi(w), A = g.lo(w);
              return k > w == w > 0 ? A === x ? (S += 1, A = 0) : A += 1 : A === 0 ? (A = x, S -= 1) : A -= 1, g.pack(A, S);
            };
          }, 8406: function(d, f) {
            f.vertexNormals = function(c, g, m) {
              for (var x = g.length, w = new Array(x), k = m === void 0 ? 1e-6 : m, S = 0; S < x; ++S) w[S] = [0, 0, 0];
              for (S = 0; S < c.length; ++S) for (var A = c[S], C = 0, D = A[A.length - 1], L = A[0], E = 0; E < A.length; ++E) {
                C = D, D = L, L = A[(E + 1) % A.length];
                for (var P = g[C], I = g[D], M = g[L], O = new Array(3), T = 0, z = new Array(3), F = 0, U = 0; U < 3; ++U) O[U] = P[U] - I[U], T += O[U] * O[U], z[U] = M[U] - I[U], F += z[U] * z[U];
                if (T * F > k) {
                  var V = w[D], $ = 1 / Math.sqrt(T * F);
                  for (U = 0; U < 3; ++U) {
                    var q = (U + 1) % 3, K = (U + 2) % 3;
                    V[U] += $ * (z[q] * O[K] - z[K] * O[q]);
                  }
                }
              }
              for (S = 0; S < x; ++S) {
                V = w[S];
                var re = 0;
                for (U = 0; U < 3; ++U) re += V[U] * V[U];
                if (re > k) for ($ = 1 / Math.sqrt(re), U = 0; U < 3; ++U) V[U] *= $;
                else for (U = 0; U < 3; ++U) V[U] = 0;
              }
              return w;
            }, f.faceNormals = function(c, g, m) {
              for (var x = c.length, w = new Array(x), k = m === void 0 ? 1e-6 : m, S = 0; S < x; ++S) {
                for (var A = c[S], C = new Array(3), D = 0; D < 3; ++D) C[D] = g[A[D]];
                var L = new Array(3), E = new Array(3);
                for (D = 0; D < 3; ++D) L[D] = C[1][D] - C[0][D], E[D] = C[2][D] - C[0][D];
                var P = new Array(3), I = 0;
                for (D = 0; D < 3; ++D) {
                  var M = (D + 1) % 3, O = (D + 2) % 3;
                  P[D] = L[M] * E[O] - L[O] * E[M], I += P[D] * P[D];
                }
                for (I = I > k ? 1 / Math.sqrt(I) : 0, D = 0; D < 3; ++D) P[D] *= I;
                w[S] = P;
              }
              return w;
            };
          }, 4081: function(d) {
            d.exports = function(f, c, g, m, x, w, k, S, A, C) {
              var D = c + w + C;
              if (L > 0) {
                var L = Math.sqrt(D + 1);
                f[0] = 0.5 * (k - A) / L, f[1] = 0.5 * (S - m) / L, f[2] = 0.5 * (g - w) / L, f[3] = 0.5 * L;
              } else {
                var E = Math.max(c, w, C);
                L = Math.sqrt(2 * E - D + 1), c >= E ? (f[0] = 0.5 * L, f[1] = 0.5 * (x + g) / L, f[2] = 0.5 * (S + m) / L, f[3] = 0.5 * (k - A) / L) : w >= E ? (f[0] = 0.5 * (g + x) / L, f[1] = 0.5 * L, f[2] = 0.5 * (A + k) / L, f[3] = 0.5 * (S - m) / L) : (f[0] = 0.5 * (m + S) / L, f[1] = 0.5 * (k + A) / L, f[2] = 0.5 * L, f[3] = 0.5 * (g - x) / L);
              }
              return f;
            };
          }, 9977: function(d, f, c) {
            d.exports = function(E) {
              var P = (E = E || {}).center || [0, 0, 0], I = E.rotation || [0, 0, 0, 1], M = E.radius || 1;
              P = [].slice.call(P, 0, 3), C(I = [].slice.call(I, 0, 4), I);
              var O = new D(I, P, Math.log(M));
              return O.setDistanceLimits(E.zoomMin, E.zoomMax), ("eye" in E || "up" in E) && O.lookAt(0, E.eye, E.center, E.up), O;
            };
            var g = c(9215), m = c(6582), x = c(7399), w = c(7608), k = c(4081);
            function S(E, P, I) {
              return Math.sqrt(Math.pow(E, 2) + Math.pow(P, 2) + Math.pow(I, 2));
            }
            function A(E, P, I, M) {
              return Math.sqrt(Math.pow(E, 2) + Math.pow(P, 2) + Math.pow(I, 2) + Math.pow(M, 2));
            }
            function C(E, P) {
              var I = P[0], M = P[1], O = P[2], T = P[3], z = A(I, M, O, T);
              z > 1e-6 ? (E[0] = I / z, E[1] = M / z, E[2] = O / z, E[3] = T / z) : (E[0] = E[1] = E[2] = 0, E[3] = 1);
            }
            function D(E, P, I) {
              this.radius = g([I]), this.center = g(P), this.rotation = g(E), this.computedRadius = this.radius.curve(0), this.computedCenter = this.center.curve(0), this.computedRotation = this.rotation.curve(0), this.computedUp = [0.1, 0, 0], this.computedEye = [0.1, 0, 0], this.computedMatrix = [0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], this.recalcMatrix(0);
            }
            var L = D.prototype;
            L.lastT = function() {
              return Math.max(this.radius.lastT(), this.center.lastT(), this.rotation.lastT());
            }, L.recalcMatrix = function(E) {
              this.radius.curve(E), this.center.curve(E), this.rotation.curve(E);
              var P = this.computedRotation;
              C(P, P);
              var I = this.computedMatrix;
              x(I, P);
              var M = this.computedCenter, O = this.computedEye, T = this.computedUp, z = Math.exp(this.computedRadius[0]);
              O[0] = M[0] + z * I[2], O[1] = M[1] + z * I[6], O[2] = M[2] + z * I[10], T[0] = I[1], T[1] = I[5], T[2] = I[9];
              for (var F = 0; F < 3; ++F) {
                for (var U = 0, V = 0; V < 3; ++V) U += I[F + 4 * V] * O[V];
                I[12 + F] = -U;
              }
            }, L.getMatrix = function(E, P) {
              this.recalcMatrix(E);
              var I = this.computedMatrix;
              if (P) {
                for (var M = 0; M < 16; ++M) P[M] = I[M];
                return P;
              }
              return I;
            }, L.idle = function(E) {
              this.center.idle(E), this.radius.idle(E), this.rotation.idle(E);
            }, L.flush = function(E) {
              this.center.flush(E), this.radius.flush(E), this.rotation.flush(E);
            }, L.pan = function(E, P, I, M) {
              P = P || 0, I = I || 0, M = M || 0, this.recalcMatrix(E);
              var O = this.computedMatrix, T = O[1], z = O[5], F = O[9], U = S(T, z, F);
              T /= U, z /= U, F /= U;
              var V = O[0], $ = O[4], q = O[8], K = V * T + $ * z + q * F, re = S(V -= T * K, $ -= z * K, q -= F * K);
              V /= re, $ /= re, q /= re, O[2], O[6], O[10];
              var Y = V * P + T * I, te = $ * P + z * I, ee = q * P + F * I;
              this.center.move(E, Y, te, ee);
              var X = Math.exp(this.computedRadius[0]);
              X = Math.max(1e-4, X + M), this.radius.set(E, Math.log(X));
            }, L.rotate = function(E, P, I, M) {
              this.recalcMatrix(E), P = P || 0, I = I || 0;
              var O = this.computedMatrix, T = O[0], z = O[4], F = O[8], U = O[1], V = O[5], $ = O[9], q = O[2], K = O[6], re = O[10], Y = P * T + I * U, te = P * z + I * V, ee = P * F + I * $, X = -(K * ee - re * te), Q = -(re * Y - q * ee), ue = -(q * te - K * Y), ce = Math.sqrt(Math.max(0, 1 - Math.pow(X, 2) - Math.pow(Q, 2) - Math.pow(ue, 2))), he = A(X, Q, ue, ce);
              he > 1e-6 ? (X /= he, Q /= he, ue /= he, ce /= he) : (X = Q = ue = 0, ce = 1);
              var de = this.computedRotation, ne = de[0], ae = de[1], se = de[2], me = de[3], ye = ne * ce + me * X + ae * ue - se * Q, pe = ae * ce + me * Q + se * X - ne * ue, be = se * ce + me * ue + ne * Q - ae * X, Ae = me * ce - ne * X - ae * Q - se * ue;
              if (M) {
                X = q, Q = K, ue = re;
                var Se = Math.sin(M) / S(X, Q, ue);
                X *= Se, Q *= Se, ue *= Se, Ae = Ae * (ce = Math.cos(P)) - (ye = ye * ce + Ae * X + pe * ue - be * Q) * X - (pe = pe * ce + Ae * Q + be * X - ye * ue) * Q - (be = be * ce + Ae * ue + ye * Q - pe * X) * ue;
              }
              var Me = A(ye, pe, be, Ae);
              Me > 1e-6 ? (ye /= Me, pe /= Me, be /= Me, Ae /= Me) : (ye = pe = be = 0, Ae = 1), this.rotation.set(E, ye, pe, be, Ae);
            }, L.lookAt = function(E, P, I, M) {
              this.recalcMatrix(E), I = I || this.computedCenter, P = P || this.computedEye, M = M || this.computedUp;
              var O = this.computedMatrix;
              m(O, P, I, M);
              var T = this.computedRotation;
              k(T, O[0], O[1], O[2], O[4], O[5], O[6], O[8], O[9], O[10]), C(T, T), this.rotation.set(E, T[0], T[1], T[2], T[3]);
              for (var z = 0, F = 0; F < 3; ++F) z += Math.pow(I[F] - P[F], 2);
              this.radius.set(E, 0.5 * Math.log(Math.max(z, 1e-6))), this.center.set(E, I[0], I[1], I[2]);
            }, L.translate = function(E, P, I, M) {
              this.center.move(E, P || 0, I || 0, M || 0);
            }, L.setMatrix = function(E, P) {
              var I = this.computedRotation;
              k(I, P[0], P[1], P[2], P[4], P[5], P[6], P[8], P[9], P[10]), C(I, I), this.rotation.set(E, I[0], I[1], I[2], I[3]);
              var M = this.computedMatrix;
              w(M, P);
              var O = M[15];
              if (Math.abs(O) > 1e-6) {
                var T = M[12] / O, z = M[13] / O, F = M[14] / O;
                this.recalcMatrix(E);
                var U = Math.exp(this.computedRadius[0]);
                this.center.set(E, T - M[2] * U, z - M[6] * U, F - M[10] * U), this.radius.idle(E);
              } else this.center.idle(E), this.radius.idle(E);
            }, L.setDistance = function(E, P) {
              P > 0 && this.radius.set(E, Math.log(P));
            }, L.setDistanceLimits = function(E, P) {
              E = E > 0 ? Math.log(E) : -1 / 0, P = P > 0 ? Math.log(P) : 1 / 0, P = Math.max(P, E), this.radius.bounds[0][0] = E, this.radius.bounds[1][0] = P;
            }, L.getDistanceLimits = function(E) {
              var P = this.radius.bounds;
              return E ? (E[0] = Math.exp(P[0][0]), E[1] = Math.exp(P[1][0]), E) : [Math.exp(P[0][0]), Math.exp(P[1][0])];
            }, L.toJSON = function() {
              return this.recalcMatrix(this.lastT()), { center: this.computedCenter.slice(), rotation: this.computedRotation.slice(), distance: Math.log(this.computedRadius[0]), zoomMin: this.radius.bounds[0][0], zoomMax: this.radius.bounds[1][0] };
            }, L.fromJSON = function(E) {
              var P = this.lastT(), I = E.center;
              I && this.center.set(P, I[0], I[1], I[2]);
              var M = E.rotation;
              M && this.rotation.set(P, M[0], M[1], M[2], M[3]);
              var O = E.distance;
              O && O > 0 && this.radius.set(P, Math.log(O)), this.setDistanceLimits(E.zoomMin, E.zoomMax);
            };
          }, 1371: function(d, f, c) {
            var g = c(3233);
            d.exports = function(m, x, w) {
              return g(w = w !== void 0 ? w + "" : " ", x) + m;
            };
          }, 3202: function(d) {
            d.exports = function(f, c) {
              c || (c = [0, ""]), f = String(f);
              var g = parseFloat(f, 10);
              return c[0] = g, c[1] = f.match(/[\d.\-\+]*\s*(.*)/)[1] || "", c;
            };
          }, 3088: function(d, f, c) {
            d.exports = function(m, x) {
              for (var w = 0 | x.length, k = m.length, S = [new Array(w), new Array(w)], A = 0; A < w; ++A) S[0][A] = [], S[1][A] = [];
              for (A = 0; A < k; ++A) {
                var C = m[A];
                S[0][C[0]].push(C), S[1][C[1]].push(C);
              }
              var D = [];
              for (A = 0; A < w; ++A) S[0][A].length + S[1][A].length === 0 && D.push([A]);
              function L(z, F) {
                var U = S[F][z[F]];
                U.splice(U.indexOf(z), 1);
              }
              function E(z, F, U) {
                for (var V, $, q, K = 0; K < 2; ++K) if (S[K][F].length > 0) {
                  V = S[K][F][0], q = K;
                  break;
                }
                $ = V[1 ^ q];
                for (var re = 0; re < 2; ++re) for (var Y = S[re][F], te = 0; te < Y.length; ++te) {
                  var ee = Y[te], X = ee[1 ^ re];
                  g(x[z], x[F], x[$], x[X]) > 0 && (V = ee, $ = X, q = re);
                }
                return U || V && L(V, q), $;
              }
              function P(z, F) {
                var U = S[F][z][0], V = [z];
                L(U, F);
                for (var $ = U[1 ^ F]; ; ) {
                  for (; $ !== z; ) V.push($), $ = E(V[V.length - 2], $, !1);
                  if (S[0][z].length + S[1][z].length === 0) break;
                  var q = V[V.length - 1], K = z, re = V[1], Y = E(q, K, !0);
                  if (g(x[q], x[K], x[re], x[Y]) < 0) break;
                  V.push(z), $ = E(q, K);
                }
                return V;
              }
              function I(z, F) {
                return F[1] === F[F.length - 1];
              }
              for (A = 0; A < w; ++A) for (var M = 0; M < 2; ++M) {
                for (var O = []; S[M][A].length > 0; ) {
                  S[0][A].length;
                  var T = P(A, M);
                  I(0, T) ? O.push.apply(O, T) : (O.length > 0 && D.push(O), O = T);
                }
                O.length > 0 && D.push(O);
              }
              return D;
            };
            var g = c(3140);
          }, 5609: function(d, f, c) {
            d.exports = function(m, x) {
              for (var w = g(m, x.length), k = new Array(x.length), S = new Array(x.length), A = [], C = 0; C < x.length; ++C) {
                var D = w[C].length;
                S[C] = D, k[C] = !0, D <= 1 && A.push(C);
              }
              for (; A.length > 0; ) {
                k[M = A.pop()] = !1;
                var L = w[M];
                for (C = 0; C < L.length; ++C) {
                  var E = L[C];
                  --S[E] == 0 && A.push(E);
                }
              }
              var P = new Array(x.length), I = [];
              for (C = 0; C < x.length; ++C) if (k[C]) {
                var M = I.length;
                P[C] = M, I.push(x[C]);
              } else P[C] = -1;
              var O = [];
              for (C = 0; C < m.length; ++C) {
                var T = m[C];
                k[T[0]] && k[T[1]] && O.push([P[T[0]], P[T[1]]]);
              }
              return [O, I];
            };
            var g = c(3134);
          }, 2095: function(d, f, c) {
            d.exports = function(D, L) {
              var E = A(D, L);
              D = E[0];
              for (var P = (L = E[1]).length, I = (D.length, g(D, L.length)), M = 0; M < P; ++M) if (I[M].length % 2 == 1) throw new Error("planar-graph-to-polyline: graph must be manifold");
              var O = m(D, L), T = (O = O.filter(function(We) {
                for (var Ee = We.length, Ne = [0], Ie = 0; Ie < Ee; ++Ie) {
                  var ge = L[We[Ie]], Ce = L[We[(Ie + 1) % Ee]], we = w(-ge[0], ge[1]), Ge = w(-ge[0], Ce[1]), Re = w(Ce[0], ge[1]), je = w(Ce[0], Ce[1]);
                  Ne = k(Ne, k(k(we, Ge), k(Re, je)));
                }
                return Ne[Ne.length - 1] > 0;
              })).length, z = new Array(T), F = new Array(T);
              for (M = 0; M < T; ++M) {
                z[M] = M;
                var U = new Array(T), V = O[M].map(function(We) {
                  return L[We];
                }), $ = x([V]), q = 0;
                e: for (var K = 0; K < T; ++K) if (U[K] = 0, M !== K) {
                  for (var re = (De = O[K]).length, Y = 0; Y < re; ++Y) {
                    var te = $(L[De[Y]]);
                    if (te !== 0) {
                      te < 0 && (U[K] = 1, q += 1);
                      continue e;
                    }
                  }
                  U[K] = 1, q += 1;
                }
                F[M] = [q, M, U];
              }
              for (F.sort(function(We, Ee) {
                return Ee[0] - We[0];
              }), M = 0; M < T; ++M) {
                var ee = (U = F[M])[1], X = U[2];
                for (K = 0; K < T; ++K) X[K] && (z[K] = ee);
              }
              var Q = function(We) {
                for (var Ee = new Array(We), Ne = 0; Ne < We; ++Ne) Ee[Ne] = [];
                return Ee;
              }(T);
              for (M = 0; M < T; ++M) Q[M].push(z[M]), Q[z[M]].push(M);
              var ue = {}, ce = C(P, !1);
              for (M = 0; M < T; ++M) for (re = (De = O[M]).length, K = 0; K < re; ++K) {
                var he = De[K], de = De[(K + 1) % re], ne = Math.min(he, de) + ":" + Math.max(he, de);
                if (ne in ue) {
                  var ae = ue[ne];
                  Q[ae].push(M), Q[M].push(ae), ce[he] = ce[de] = !0;
                } else ue[ne] = M;
              }
              function se(We) {
                for (var Ee = We.length, Ne = 0; Ne < Ee; ++Ne) if (!ce[We[Ne]]) return !1;
                return !0;
              }
              var me = [], ye = C(T, -1);
              for (M = 0; M < T; ++M) z[M] !== M || se(O[M]) ? ye[M] = -1 : (me.push(M), ye[M] = 0);
              for (E = []; me.length > 0; ) {
                var pe = me.pop(), be = Q[pe];
                S(be, function(We, Ee) {
                  return We - Ee;
                });
                var Ae, Se = be.length, Me = ye[pe];
                for (Me === 0 && (Ae = [De = O[pe]]), M = 0; M < Se; ++M) {
                  var De, Le = be[M];
                  ye[Le] >= 0 || (ye[Le] = 1 ^ Me, me.push(Le), Me === 0 && (se(De = O[Le]) || (De.reverse(), Ae.push(De))));
                }
                Me === 0 && E.push(Ae);
              }
              return E;
            };
            var g = c(3134), m = c(3088), x = c(5085), w = c(5250), k = c(8210), S = c(1682), A = c(5609);
            function C(D, L) {
              for (var E = new Array(D), P = 0; P < D; ++P) E[P] = L;
              return E;
            }
          }, 5085: function(d, f, c) {
            d.exports = function(C) {
              for (var D = C.length, L = [], E = [], P = 0; P < D; ++P) for (var I = C[P], M = I.length, O = M - 1, T = 0; T < M; O = T++) {
                var z = I[O], F = I[T];
                z[0] === F[0] ? E.push([z, F]) : L.push([z, F]);
              }
              if (L.length === 0) return E.length === 0 ? A : (U = S(E), function(q) {
                return U(q[0], q[1]) ? 0 : 1;
              });
              var U, V = m(L), $ = /* @__PURE__ */ function(q, K) {
                return function(re) {
                  var Y = w.le(K, re[0]);
                  if (Y < 0) return 1;
                  var te = q[Y];
                  if (!te) {
                    if (!(Y > 0 && K[Y] === re[0])) return 1;
                    te = q[Y - 1];
                  }
                  for (var ee = 1; te; ) {
                    var X = te.key, Q = g(re, X[0], X[1]);
                    if (X[0][0] < X[1][0]) if (Q < 0) te = te.left;
                    else {
                      if (!(Q > 0)) return 0;
                      ee = -1, te = te.right;
                    }
                    else if (Q > 0) te = te.left;
                    else {
                      if (!(Q < 0)) return 0;
                      ee = 1, te = te.right;
                    }
                  }
                  return ee;
                };
              }(V.slabs, V.coordinates);
              return E.length === 0 ? $ : /* @__PURE__ */ function(q, K) {
                return function(re) {
                  return q(re[0], re[1]) ? 0 : K(re);
                };
              }(S(E), $);
            };
            var g = c(3250)[3], m = c(4209), x = c(3352), w = c(2478);
            function k() {
              return !0;
            }
            function S(C) {
              for (var D = {}, L = 0; L < C.length; ++L) {
                var E = C[L], P = E[0][0], I = E[0][1], M = E[1][1], O = [Math.min(I, M), Math.max(I, M)];
                P in D ? D[P].push(O) : D[P] = [O];
              }
              var T = {}, z = Object.keys(D);
              for (L = 0; L < z.length; ++L) {
                var F = D[z[L]];
                T[z[L]] = x(F);
              }
              return /* @__PURE__ */ function(U) {
                return function(V, $) {
                  var q = U[V];
                  return !!q && !!q.queryPoint($, k);
                };
              }(T);
            }
            function A(C) {
              return 1;
            }
          }, 9346: function(d) {
            var f = new Float64Array(4), c = new Float64Array(4), g = new Float64Array(4);
            d.exports = function(m, x, w, k, S) {
              f.length < k.length && (f = new Float64Array(k.length), c = new Float64Array(k.length), g = new Float64Array(k.length));
              for (var A = 0; A < k.length; ++A) f[A] = m[A] - k[A], c[A] = x[A] - m[A], g[A] = w[A] - m[A];
              var C = 0, D = 0, L = 0, E = 0, P = 0, I = 0;
              for (A = 0; A < k.length; ++A) {
                var M = c[A], O = g[A], T = f[A];
                C += M * M, D += M * O, L += O * O, E += T * M, P += T * O, I += T * T;
              }
              var z, F, U, V, $, q = Math.abs(C * L - D * D), K = D * P - L * E, re = D * E - C * P;
              if (K + re <= q) if (K < 0) re < 0 && E < 0 ? (re = 0, -E >= C ? (K = 1, z = C + 2 * E + I) : z = E * (K = -E / C) + I) : (K = 0, P >= 0 ? (re = 0, z = I) : -P >= L ? (re = 1, z = L + 2 * P + I) : z = P * (re = -P / L) + I);
              else if (re < 0) re = 0, E >= 0 ? (K = 0, z = I) : -E >= C ? (K = 1, z = C + 2 * E + I) : z = E * (K = -E / C) + I;
              else {
                var Y = 1 / q;
                z = (K *= Y) * (C * K + D * (re *= Y) + 2 * E) + re * (D * K + L * re + 2 * P) + I;
              }
              else K < 0 ? (U = L + P) > (F = D + E) ? (V = U - F) >= ($ = C - 2 * D + L) ? (K = 1, re = 0, z = C + 2 * E + I) : z = (K = V / $) * (C * K + D * (re = 1 - K) + 2 * E) + re * (D * K + L * re + 2 * P) + I : (K = 0, U <= 0 ? (re = 1, z = L + 2 * P + I) : P >= 0 ? (re = 0, z = I) : z = P * (re = -P / L) + I) : re < 0 ? (U = C + E) > (F = D + P) ? (V = U - F) >= ($ = C - 2 * D + L) ? (re = 1, K = 0, z = L + 2 * P + I) : z = (K = 1 - (re = V / $)) * (C * K + D * re + 2 * E) + re * (D * K + L * re + 2 * P) + I : (re = 0, U <= 0 ? (K = 1, z = C + 2 * E + I) : E >= 0 ? (K = 0, z = I) : z = E * (K = -E / C) + I) : (V = L + P - D - E) <= 0 ? (K = 0, re = 1, z = L + 2 * P + I) : V >= ($ = C - 2 * D + L) ? (K = 1, re = 0, z = C + 2 * E + I) : z = (K = V / $) * (C * K + D * (re = 1 - K) + 2 * E) + re * (D * K + L * re + 2 * P) + I;
              var te = 1 - K - re;
              for (A = 0; A < k.length; ++A) S[A] = te * m[A] + K * x[A] + re * w[A];
              return z < 0 ? 0 : z;
            };
          }, 8648: function(d, f, c) {
            d.exports = c(783);
          }, 2653: function(d, f, c) {
            var g = c(3865);
            d.exports = function(m, x) {
              for (var w = m.length, k = new Array(w), S = 0; S < w; ++S) k[S] = g(m[S], x[S]);
              return k;
            };
          }, 5838: function(d, f, c) {
            d.exports = function(m) {
              for (var x = new Array(m.length), w = 0; w < m.length; ++w) x[w] = g(m[w]);
              return x;
            };
            var g = c(7842);
          }, 8987: function(d, f, c) {
            var g = c(7842), m = c(6504);
            d.exports = function(x, w) {
              for (var k = g(w), S = x.length, A = new Array(S), C = 0; C < S; ++C) A[C] = m(x[C], k);
              return A;
            };
          }, 544: function(d, f, c) {
            var g = c(5572);
            d.exports = function(m, x) {
              for (var w = m.length, k = new Array(w), S = 0; S < w; ++S) k[S] = g(m[S], x[S]);
              return k;
            };
          }, 5771: function(d, f, c) {
            var g = c(8507), m = c(3788), x = c(2419);
            d.exports = function(w) {
              w.sort(m);
              for (var k = w.length, S = 0, A = 0; A < k; ++A) {
                var C = w[A], D = x(C);
                if (D !== 0) {
                  if (S > 0) {
                    var L = w[S - 1];
                    if (g(C, L) === 0 && x(L) !== D) {
                      S -= 1;
                      continue;
                    }
                  }
                  w[S++] = C;
                }
              }
              return w.length = S, w;
            };
          }, 3233: function(d) {
            var f, c = "";
            d.exports = function(g, m) {
              if (typeof g != "string") throw new TypeError("expected a string");
              if (m === 1) return g;
              if (m === 2) return g + g;
              var x = g.length * m;
              if (f !== g || f === void 0) f = g, c = "";
              else if (c.length >= x) return c.substr(0, x);
              for (; x > c.length && m > 1; ) 1 & m && (c += g), m >>= 1, g += g;
              return c = (c += g).substr(0, x);
            };
          }, 3025: function(d, f, c) {
            d.exports = c.g.performance && c.g.performance.now ? function() {
              return performance.now();
            } : Date.now || function() {
              return +/* @__PURE__ */ new Date();
            };
          }, 7004: function(d) {
            d.exports = function(f) {
              for (var c = f.length, g = f[f.length - 1], m = c, x = c - 2; x >= 0; --x) {
                var w = g;
                (A = (S = f[x]) - ((g = w + S) - w)) && (f[--m] = g, g = A);
              }
              var k = 0;
              for (x = m; x < c; ++x) {
                var S, A;
                (A = (S = g) - ((g = (w = f[x]) + S) - w)) && (f[k++] = A);
              }
              return f[k++] = g, f.length = k, f;
            };
          }, 2962: function(d, f, c) {
            var g = c(5250), m = c(8210), x = c(3012), w = c(7004);
            function k(P, I, M, O) {
              return function(T) {
                return O(P(M(T[0][0], T[1][1]), M(-T[0][1], T[1][0])));
              };
            }
            function S(P, I, M, O) {
              return function(T) {
                return O(P(I(P(M(T[1][1], T[2][2]), M(-T[1][2], T[2][1])), T[0][0]), P(I(P(M(T[1][0], T[2][2]), M(-T[1][2], T[2][0])), -T[0][1]), I(P(M(T[1][0], T[2][1]), M(-T[1][1], T[2][0])), T[0][2]))));
              };
            }
            function A(P, I, M, O) {
              return function(T) {
                return O(P(P(I(P(I(P(M(T[2][2], T[3][3]), M(-T[2][3], T[3][2])), T[1][1]), P(I(P(M(T[2][1], T[3][3]), M(-T[2][3], T[3][1])), -T[1][2]), I(P(M(T[2][1], T[3][2]), M(-T[2][2], T[3][1])), T[1][3]))), T[0][0]), I(P(I(P(M(T[2][2], T[3][3]), M(-T[2][3], T[3][2])), T[1][0]), P(I(P(M(T[2][0], T[3][3]), M(-T[2][3], T[3][0])), -T[1][2]), I(P(M(T[2][0], T[3][2]), M(-T[2][2], T[3][0])), T[1][3]))), -T[0][1])), P(I(P(I(P(M(T[2][1], T[3][3]), M(-T[2][3], T[3][1])), T[1][0]), P(I(P(M(T[2][0], T[3][3]), M(-T[2][3], T[3][0])), -T[1][1]), I(P(M(T[2][0], T[3][1]), M(-T[2][1], T[3][0])), T[1][3]))), T[0][2]), I(P(I(P(M(T[2][1], T[3][2]), M(-T[2][2], T[3][1])), T[1][0]), P(I(P(M(T[2][0], T[3][2]), M(-T[2][2], T[3][0])), -T[1][1]), I(P(M(T[2][0], T[3][1]), M(-T[2][1], T[3][0])), T[1][2]))), -T[0][3]))));
              };
            }
            function C(P, I, M, O) {
              return function(T) {
                return O(P(P(I(P(P(I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][2]), P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), -T[2][3]), I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][4]))), T[1][1]), I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][1]), P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), -T[2][3]), I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), T[2][4]))), -T[1][2])), P(I(P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), T[2][1]), P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), -T[2][2]), I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][4]))), T[1][3]), I(P(I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][1]), P(I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), -T[2][2]), I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][3]))), -T[1][4]))), T[0][0]), I(P(P(I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][2]), P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), -T[2][3]), I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][4]))), T[1][0]), I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][3]), I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), T[2][4]))), -T[1][2])), P(I(P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][2]), I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), T[2][4]))), T[1][3]), I(P(I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][0]), P(I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), -T[2][2]), I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), T[2][3]))), -T[1][4]))), -T[0][1])), P(I(P(P(I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][1]), P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), -T[2][3]), I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), T[2][4]))), T[1][0]), I(P(I(P(M(T[3][3], T[4][4]), M(-T[3][4], T[4][3])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][3]), I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), T[2][4]))), -T[1][1])), P(I(P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][4]))), T[1][3]), I(P(I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][3]))), -T[1][4]))), T[0][2]), P(I(P(P(I(P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), T[2][1]), P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), -T[2][2]), I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][4]))), T[1][0]), I(P(I(P(M(T[3][2], T[4][4]), M(-T[3][4], T[4][2])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][2]), I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), T[2][4]))), -T[1][1])), P(I(P(I(P(M(T[3][1], T[4][4]), M(-T[3][4], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][4]), M(-T[3][4], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][4]))), T[1][2]), I(P(I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][2]))), -T[1][4]))), -T[0][3]), I(P(P(I(P(I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][1]), P(I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), -T[2][2]), I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][3]))), T[1][0]), I(P(I(P(M(T[3][2], T[4][3]), M(-T[3][3], T[4][2])), T[2][0]), P(I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), -T[2][2]), I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), T[2][3]))), -T[1][1])), P(I(P(I(P(M(T[3][1], T[4][3]), M(-T[3][3], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][3]), M(-T[3][3], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][3]))), T[1][2]), I(P(I(P(M(T[3][1], T[4][2]), M(-T[3][2], T[4][1])), T[2][0]), P(I(P(M(T[3][0], T[4][2]), M(-T[3][2], T[4][0])), -T[2][1]), I(P(M(T[3][0], T[4][1]), M(-T[3][1], T[4][0])), T[2][2]))), -T[1][3]))), T[0][4])))));
              };
            }
            function D(P) {
              return (P === 2 ? k : P === 3 ? S : P === 4 ? A : P === 5 ? C : void 0)(m, x, g, w);
            }
            var L = [function() {
              return [0];
            }, function(P) {
              return [P[0][0]];
            }];
            function E(P, I, M, O, T, z, F, U) {
              return function(V) {
                switch (V.length) {
                  case 0:
                    return P(V);
                  case 1:
                    return I(V);
                  case 2:
                    return M(V);
                  case 3:
                    return O(V);
                  case 4:
                    return T(V);
                  case 5:
                    return z(V);
                }
                var $ = F[V.length];
                return $ || ($ = F[V.length] = U(V.length)), $(V);
              };
            }
            (function() {
              for (; L.length < 6; ) L.push(D(L.length));
              d.exports = E.apply(void 0, L.concat([L, D]));
              for (var P = 0; P < L.length; ++P) d.exports[P] = L[P];
            })();
          }, 1944: function(d, f, c) {
            var g = c(5250), m = c(8210);
            d.exports = function(x, w) {
              for (var k = g(x[0], w[0]), S = 1; S < x.length; ++S) k = m(k, g(x[S], w[S]));
              return k;
            };
          }, 2646: function(d, f, c) {
            var g = c(5250), m = c(8210), x = c(8545), w = c(3012);
            function k(I) {
              return (I === 3 ? S : I === 4 ? A : I === 5 ? C : D)(m, x, g, w);
            }
            function S(I, M, O, T) {
              return function(z, F, U) {
                var V = O(z[0], z[0]), $ = T(V, F[0]), q = T(V, U[0]), K = O(F[0], F[0]), re = T(K, z[0]), Y = T(K, U[0]), te = O(U[0], U[0]), ee = T(te, z[0]), X = T(te, F[0]), Q = I(M(X, Y), M(re, $)), ue = M(ee, q), ce = M(Q, ue);
                return ce[ce.length - 1];
              };
            }
            function A(I, M, O, T) {
              return function(z, F, U, V) {
                var $ = I(O(z[0], z[0]), O(z[1], z[1])), q = T($, F[0]), K = T($, U[0]), re = T($, V[0]), Y = I(O(F[0], F[0]), O(F[1], F[1])), te = T(Y, z[0]), ee = T(Y, U[0]), X = T(Y, V[0]), Q = I(O(U[0], U[0]), O(U[1], U[1])), ue = T(Q, z[0]), ce = T(Q, F[0]), he = T(Q, V[0]), de = I(O(V[0], V[0]), O(V[1], V[1])), ne = T(de, z[0]), ae = T(de, F[0]), se = T(de, U[0]), me = I(I(T(M(se, he), F[1]), I(T(M(ae, X), -U[1]), T(M(ce, ee), V[1]))), I(T(M(ae, X), z[1]), I(T(M(ne, re), -F[1]), T(M(te, q), V[1])))), ye = I(I(T(M(se, he), z[1]), I(T(M(ne, re), -U[1]), T(M(ue, K), V[1]))), I(T(M(ce, ee), z[1]), I(T(M(ue, K), -F[1]), T(M(te, q), U[1])))), pe = M(me, ye);
                return pe[pe.length - 1];
              };
            }
            function C(I, M, O, T) {
              return function(z, F, U, V, $) {
                var q = I(O(z[0], z[0]), I(O(z[1], z[1]), O(z[2], z[2]))), K = T(q, F[0]), re = T(q, U[0]), Y = T(q, V[0]), te = T(q, $[0]), ee = I(O(F[0], F[0]), I(O(F[1], F[1]), O(F[2], F[2]))), X = T(ee, z[0]), Q = T(ee, U[0]), ue = T(ee, V[0]), ce = T(ee, $[0]), he = I(O(U[0], U[0]), I(O(U[1], U[1]), O(U[2], U[2]))), de = T(he, z[0]), ne = T(he, F[0]), ae = T(he, V[0]), se = T(he, $[0]), me = I(O(V[0], V[0]), I(O(V[1], V[1]), O(V[2], V[2]))), ye = T(me, z[0]), pe = T(me, F[0]), be = T(me, U[0]), Ae = T(me, $[0]), Se = I(O($[0], $[0]), I(O($[1], $[1]), O($[2], $[2]))), Me = T(Se, z[0]), De = T(Se, F[0]), Le = T(Se, U[0]), We = T(Se, V[0]), Ee = I(I(I(T(I(T(M(We, Ae), U[1]), I(T(M(Le, se), -V[1]), T(M(be, ae), $[1]))), F[2]), I(T(I(T(M(We, Ae), F[1]), I(T(M(De, ce), -V[1]), T(M(pe, ue), $[1]))), -U[2]), T(I(T(M(Le, se), F[1]), I(T(M(De, ce), -U[1]), T(M(ne, Q), $[1]))), V[2]))), I(T(I(T(M(be, ae), F[1]), I(T(M(pe, ue), -U[1]), T(M(ne, Q), V[1]))), -$[2]), I(T(I(T(M(We, Ae), F[1]), I(T(M(De, ce), -V[1]), T(M(pe, ue), $[1]))), z[2]), T(I(T(M(We, Ae), z[1]), I(T(M(Me, te), -V[1]), T(M(ye, Y), $[1]))), -F[2])))), I(I(T(I(T(M(De, ce), z[1]), I(T(M(Me, te), -F[1]), T(M(X, K), $[1]))), V[2]), I(T(I(T(M(pe, ue), z[1]), I(T(M(ye, Y), -F[1]), T(M(X, K), V[1]))), -$[2]), T(I(T(M(be, ae), F[1]), I(T(M(pe, ue), -U[1]), T(M(ne, Q), V[1]))), z[2]))), I(T(I(T(M(be, ae), z[1]), I(T(M(ye, Y), -U[1]), T(M(de, re), V[1]))), -F[2]), I(T(I(T(M(pe, ue), z[1]), I(T(M(ye, Y), -F[1]), T(M(X, K), V[1]))), U[2]), T(I(T(M(ne, Q), z[1]), I(T(M(de, re), -F[1]), T(M(X, K), U[1]))), -V[2]))))), Ne = I(I(I(T(I(T(M(We, Ae), U[1]), I(T(M(Le, se), -V[1]), T(M(be, ae), $[1]))), z[2]), T(I(T(M(We, Ae), z[1]), I(T(M(Me, te), -V[1]), T(M(ye, Y), $[1]))), -U[2])), I(T(I(T(M(Le, se), z[1]), I(T(M(Me, te), -U[1]), T(M(de, re), $[1]))), V[2]), T(I(T(M(be, ae), z[1]), I(T(M(ye, Y), -U[1]), T(M(de, re), V[1]))), -$[2]))), I(I(T(I(T(M(Le, se), F[1]), I(T(M(De, ce), -U[1]), T(M(ne, Q), $[1]))), z[2]), T(I(T(M(Le, se), z[1]), I(T(M(Me, te), -U[1]), T(M(de, re), $[1]))), -F[2])), I(T(I(T(M(De, ce), z[1]), I(T(M(Me, te), -F[1]), T(M(X, K), $[1]))), U[2]), T(I(T(M(ne, Q), z[1]), I(T(M(de, re), -F[1]), T(M(X, K), U[1]))), -$[2])))), Ie = M(Ee, Ne);
                return Ie[Ie.length - 1];
              };
            }
            function D(I, M, O, T) {
              return function(z, F, U, V, $, q) {
                var K = I(I(O(z[0], z[0]), O(z[1], z[1])), I(O(z[2], z[2]), O(z[3], z[3]))), re = T(K, F[0]), Y = T(K, U[0]), te = T(K, V[0]), ee = T(K, $[0]), X = T(K, q[0]), Q = I(I(O(F[0], F[0]), O(F[1], F[1])), I(O(F[2], F[2]), O(F[3], F[3]))), ue = T(Q, z[0]), ce = T(Q, U[0]), he = T(Q, V[0]), de = T(Q, $[0]), ne = T(Q, q[0]), ae = I(I(O(U[0], U[0]), O(U[1], U[1])), I(O(U[2], U[2]), O(U[3], U[3]))), se = T(ae, z[0]), me = T(ae, F[0]), ye = T(ae, V[0]), pe = T(ae, $[0]), be = T(ae, q[0]), Ae = I(I(O(V[0], V[0]), O(V[1], V[1])), I(O(V[2], V[2]), O(V[3], V[3]))), Se = T(Ae, z[0]), Me = T(Ae, F[0]), De = T(Ae, U[0]), Le = T(Ae, $[0]), We = T(Ae, q[0]), Ee = I(I(O($[0], $[0]), O($[1], $[1])), I(O($[2], $[2]), O($[3], $[3]))), Ne = T(Ee, z[0]), Ie = T(Ee, F[0]), ge = T(Ee, U[0]), Ce = T(Ee, V[0]), we = T(Ee, q[0]), Ge = I(I(O(q[0], q[0]), O(q[1], q[1])), I(O(q[2], q[2]), O(q[3], q[3]))), Re = T(Ge, z[0]), je = T(Ge, F[0]), Ke = T(Ge, U[0]), tt = T(Ge, V[0]), _e = T(Ge, $[0]), Be = I(I(I(T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), U[2]), T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), -V[2])), I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), $[2]), T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), -q[2]))), F[3]), I(T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), F[2]), T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), -V[2])), I(T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), $[2]), T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), -q[2]))), -U[3]), T(I(I(T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), F[2]), T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), -U[2])), I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), $[2]), T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), -q[2]))), V[3]))), I(I(T(I(I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), F[2]), T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), -U[2])), I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), V[2]), T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), -q[2]))), -$[3]), T(I(I(T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), F[2]), T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), -U[2])), I(T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), V[2]), T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), -$[2]))), q[3])), I(T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), F[2]), T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), -V[2])), I(T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), $[2]), T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), -q[2]))), z[3]), T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -V[2])), I(T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), $[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -q[2]))), -F[3])))), I(I(I(T(I(I(T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), $[2]), T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), -q[2]))), V[3]), T(I(I(T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), z[2]), T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), V[2]), T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), -q[2]))), -$[3])), I(T(I(I(T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), z[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -F[2])), I(T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), V[2]), T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), -$[2]))), q[3]), T(I(I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), F[2]), T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), -U[2])), I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), V[2]), T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), -q[2]))), z[3]))), I(I(T(I(I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), z[2]), T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), -U[2])), I(T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), V[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -q[2]))), -F[3]), T(I(I(T(I(T(M(tt, We), F[1]), I(T(M(je, ne), -V[1]), T(M(Me, he), q[1]))), z[2]), T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), V[2]), T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), -q[2]))), U[3])), I(T(I(I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), z[2]), T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -q[2]))), -V[3]), T(I(I(T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), z[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -F[2])), I(T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -V[2]))), q[3]))))), $e = I(I(I(T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), U[2]), T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), -V[2])), I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), $[2]), T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), -q[2]))), z[3]), I(T(I(I(T(I(T(M(_e, we), V[1]), I(T(M(tt, We), -$[1]), T(M(Ce, Le), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -V[2])), I(T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), $[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -q[2]))), -U[3]), T(I(I(T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -U[2])), I(T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), $[2]), T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), -q[2]))), V[3]))), I(I(T(I(I(T(I(T(M(tt, We), U[1]), I(T(M(Ke, be), -V[1]), T(M(De, ye), q[1]))), z[2]), T(I(T(M(tt, We), z[1]), I(T(M(Re, X), -V[1]), T(M(Se, te), q[1]))), -U[2])), I(T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), V[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -q[2]))), -$[3]), T(I(I(T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), z[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -U[2])), I(T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), V[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -$[2]))), q[3])), I(T(I(I(T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), F[2]), T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), -U[2])), I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), $[2]), T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), -q[2]))), z[3]), T(I(I(T(I(T(M(_e, we), U[1]), I(T(M(Ke, be), -$[1]), T(M(ge, pe), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -U[2])), I(T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), $[2]), T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), -q[2]))), -F[3])))), I(I(I(T(I(I(T(I(T(M(_e, we), F[1]), I(T(M(je, ne), -$[1]), T(M(Ie, de), q[1]))), z[2]), T(I(T(M(_e, we), z[1]), I(T(M(Re, X), -$[1]), T(M(Ne, ee), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), $[2]), T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), -q[2]))), U[3]), T(I(I(T(I(T(M(Ke, be), F[1]), I(T(M(je, ne), -U[1]), T(M(me, ce), q[1]))), z[2]), T(I(T(M(Ke, be), z[1]), I(T(M(Re, X), -U[1]), T(M(se, Y), q[1]))), -F[2])), I(T(I(T(M(je, ne), z[1]), I(T(M(Re, X), -F[1]), T(M(ue, re), q[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -q[2]))), -$[3])), I(T(I(I(T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), z[2]), T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), -F[2])), I(T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -$[2]))), q[3]), T(I(I(T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), F[2]), T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), -U[2])), I(T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), V[2]), T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), -$[2]))), z[3]))), I(I(T(I(I(T(I(T(M(Ce, Le), U[1]), I(T(M(ge, pe), -V[1]), T(M(De, ye), $[1]))), z[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -U[2])), I(T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), V[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -$[2]))), -F[3]), T(I(I(T(I(T(M(Ce, Le), F[1]), I(T(M(Ie, de), -V[1]), T(M(Me, he), $[1]))), z[2]), T(I(T(M(Ce, Le), z[1]), I(T(M(Ne, ee), -V[1]), T(M(Se, te), $[1]))), -F[2])), I(T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), V[2]), T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), -$[2]))), U[3])), I(T(I(I(T(I(T(M(ge, pe), F[1]), I(T(M(Ie, de), -U[1]), T(M(me, ce), $[1]))), z[2]), T(I(T(M(ge, pe), z[1]), I(T(M(Ne, ee), -U[1]), T(M(se, Y), $[1]))), -F[2])), I(T(I(T(M(Ie, de), z[1]), I(T(M(Ne, ee), -F[1]), T(M(ue, re), $[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -$[2]))), -V[3]), T(I(I(T(I(T(M(De, ye), F[1]), I(T(M(Me, he), -U[1]), T(M(me, ce), V[1]))), z[2]), T(I(T(M(De, ye), z[1]), I(T(M(Se, te), -U[1]), T(M(se, Y), V[1]))), -F[2])), I(T(I(T(M(Me, he), z[1]), I(T(M(Se, te), -F[1]), T(M(ue, re), V[1]))), U[2]), T(I(T(M(me, ce), z[1]), I(T(M(se, Y), -F[1]), T(M(ue, re), U[1]))), -V[2]))), $[3]))))), Ze = M(Be, $e);
                return Ze[Ze.length - 1];
              };
            }
            var L = [function() {
              return 0;
            }, function() {
              return 0;
            }, function() {
              return 0;
            }];
            function E(I) {
              var M = L[I.length];
              return M || (M = L[I.length] = k(I.length)), M.apply(void 0, I);
            }
            function P(I, M, O, T, z, F, U, V) {
              return function($, q, K, re, Y, te) {
                switch (arguments.length) {
                  case 0:
                  case 1:
                    return 0;
                  case 2:
                    return T($, q);
                  case 3:
                    return z($, q, K);
                  case 4:
                    return F($, q, K, re);
                  case 5:
                    return U($, q, K, re, Y);
                  case 6:
                    return V($, q, K, re, Y, te);
                }
                for (var ee = new Array(arguments.length), X = 0; X < arguments.length; ++X) ee[X] = arguments[X];
                return I(ee);
              };
            }
            (function() {
              for (; L.length <= 6; ) L.push(k(L.length));
              d.exports = P.apply(void 0, [E].concat(L));
              for (var I = 0; I <= 6; ++I) d.exports[I] = L[I];
            })();
          }, 727: function(d, f, c) {
            var g = c(2962);
            function m(L) {
              return (L === 2 ? x : L === 3 ? w : L === 4 ? k : L === 5 ? S : A)(L < 6 ? g[L] : g);
            }
            function x(L) {
              return function(E, P) {
                return [L([[+P[0], +E[0][1]], [+P[1], +E[1][1]]]), L([[+E[0][0], +P[0]], [+E[1][0], +P[1]]]), L(E)];
              };
            }
            function w(L) {
              return function(E, P) {
                return [L([[+P[0], +E[0][1], +E[0][2]], [+P[1], +E[1][1], +E[1][2]], [+P[2], +E[2][1], +E[2][2]]]), L([[+E[0][0], +P[0], +E[0][2]], [+E[1][0], +P[1], +E[1][2]], [+E[2][0], +P[2], +E[2][2]]]), L([[+E[0][0], +E[0][1], +P[0]], [+E[1][0], +E[1][1], +P[1]], [+E[2][0], +E[2][1], +P[2]]]), L(E)];
              };
            }
            function k(L) {
              return function(E, P) {
                return [L([[+P[0], +E[0][1], +E[0][2], +E[0][3]], [+P[1], +E[1][1], +E[1][2], +E[1][3]], [+P[2], +E[2][1], +E[2][2], +E[2][3]], [+P[3], +E[3][1], +E[3][2], +E[3][3]]]), L([[+E[0][0], +P[0], +E[0][2], +E[0][3]], [+E[1][0], +P[1], +E[1][2], +E[1][3]], [+E[2][0], +P[2], +E[2][2], +E[2][3]], [+E[3][0], +P[3], +E[3][2], +E[3][3]]]), L([[+E[0][0], +E[0][1], +P[0], +E[0][3]], [+E[1][0], +E[1][1], +P[1], +E[1][3]], [+E[2][0], +E[2][1], +P[2], +E[2][3]], [+E[3][0], +E[3][1], +P[3], +E[3][3]]]), L([[+E[0][0], +E[0][1], +E[0][2], +P[0]], [+E[1][0], +E[1][1], +E[1][2], +P[1]], [+E[2][0], +E[2][1], +E[2][2], +P[2]], [+E[3][0], +E[3][1], +E[3][2], +P[3]]]), L(E)];
              };
            }
            function S(L) {
              return function(E, P) {
                return [L([[+P[0], +E[0][1], +E[0][2], +E[0][3], +E[0][4]], [+P[1], +E[1][1], +E[1][2], +E[1][3], +E[1][4]], [+P[2], +E[2][1], +E[2][2], +E[2][3], +E[2][4]], [+P[3], +E[3][1], +E[3][2], +E[3][3], +E[3][4]], [+P[4], +E[4][1], +E[4][2], +E[4][3], +E[4][4]]]), L([[+E[0][0], +P[0], +E[0][2], +E[0][3], +E[0][4]], [+E[1][0], +P[1], +E[1][2], +E[1][3], +E[1][4]], [+E[2][0], +P[2], +E[2][2], +E[2][3], +E[2][4]], [+E[3][0], +P[3], +E[3][2], +E[3][3], +E[3][4]], [+E[4][0], +P[4], +E[4][2], +E[4][3], +E[4][4]]]), L([[+E[0][0], +E[0][1], +P[0], +E[0][3], +E[0][4]], [+E[1][0], +E[1][1], +P[1], +E[1][3], +E[1][4]], [+E[2][0], +E[2][1], +P[2], +E[2][3], +E[2][4]], [+E[3][0], +E[3][1], +P[3], +E[3][3], +E[3][4]], [+E[4][0], +E[4][1], +P[4], +E[4][3], +E[4][4]]]), L([[+E[0][0], +E[0][1], +E[0][2], +P[0], +E[0][4]], [+E[1][0], +E[1][1], +E[1][2], +P[1], +E[1][4]], [+E[2][0], +E[2][1], +E[2][2], +P[2], +E[2][4]], [+E[3][0], +E[3][1], +E[3][2], +P[3], +E[3][4]], [+E[4][0], +E[4][1], +E[4][2], +P[4], +E[4][4]]]), L([[+E[0][0], +E[0][1], +E[0][2], +E[0][3], +P[0]], [+E[1][0], +E[1][1], +E[1][2], +E[1][3], +P[1]], [+E[2][0], +E[2][1], +E[2][2], +E[2][3], +P[2]], [+E[3][0], +E[3][1], +E[3][2], +E[3][3], +P[3]], [+E[4][0], +E[4][1], +E[4][2], +E[4][3], +P[4]]]), L(E)];
              };
            }
            function A(L) {
              return function(E, P) {
                return [L([[+P[0], +E[0][1], +E[0][2], +E[0][3], +E[0][4], +E[0][5]], [+P[1], +E[1][1], +E[1][2], +E[1][3], +E[1][4], +E[1][5]], [+P[2], +E[2][1], +E[2][2], +E[2][3], +E[2][4], +E[2][5]], [+P[3], +E[3][1], +E[3][2], +E[3][3], +E[3][4], +E[3][5]], [+P[4], +E[4][1], +E[4][2], +E[4][3], +E[4][4], +E[4][5]], [+P[5], +E[5][1], +E[5][2], +E[5][3], +E[5][4], +E[5][5]]]), L([[+E[0][0], +P[0], +E[0][2], +E[0][3], +E[0][4], +E[0][5]], [+E[1][0], +P[1], +E[1][2], +E[1][3], +E[1][4], +E[1][5]], [+E[2][0], +P[2], +E[2][2], +E[2][3], +E[2][4], +E[2][5]], [+E[3][0], +P[3], +E[3][2], +E[3][3], +E[3][4], +E[3][5]], [+E[4][0], +P[4], +E[4][2], +E[4][3], +E[4][4], +E[4][5]], [+E[5][0], +P[5], +E[5][2], +E[5][3], +E[5][4], +E[5][5]]]), L([[+E[0][0], +E[0][1], +P[0], +E[0][3], +E[0][4], +E[0][5]], [+E[1][0], +E[1][1], +P[1], +E[1][3], +E[1][4], +E[1][5]], [+E[2][0], +E[2][1], +P[2], +E[2][3], +E[2][4], +E[2][5]], [+E[3][0], +E[3][1], +P[3], +E[3][3], +E[3][4], +E[3][5]], [+E[4][0], +E[4][1], +P[4], +E[4][3], +E[4][4], +E[4][5]], [+E[5][0], +E[5][1], +P[5], +E[5][3], +E[5][4], +E[5][5]]]), L([[+E[0][0], +E[0][1], +E[0][2], +P[0], +E[0][4], +E[0][5]], [+E[1][0], +E[1][1], +E[1][2], +P[1], +E[1][4], +E[1][5]], [+E[2][0], +E[2][1], +E[2][2], +P[2], +E[2][4], +E[2][5]], [+E[3][0], +E[3][1], +E[3][2], +P[3], +E[3][4], +E[3][5]], [+E[4][0], +E[4][1], +E[4][2], +P[4], +E[4][4], +E[4][5]], [+E[5][0], +E[5][1], +E[5][2], +P[5], +E[5][4], +E[5][5]]]), L([[+E[0][0], +E[0][1], +E[0][2], +E[0][3], +P[0], +E[0][5]], [+E[1][0], +E[1][1], +E[1][2], +E[1][3], +P[1], +E[1][5]], [+E[2][0], +E[2][1], +E[2][2], +E[2][3], +P[2], +E[2][5]], [+E[3][0], +E[3][1], +E[3][2], +E[3][3], +P[3], +E[3][5]], [+E[4][0], +E[4][1], +E[4][2], +E[4][3], +P[4], +E[4][5]], [+E[5][0], +E[5][1], +E[5][2], +E[5][3], +P[5], +E[5][5]]]), L([[+E[0][0], +E[0][1], +E[0][2], +E[0][3], +E[0][4], +P[0]], [+E[1][0], +E[1][1], +E[1][2], +E[1][3], +E[1][4], +P[1]], [+E[2][0], +E[2][1], +E[2][2], +E[2][3], +E[2][4], +P[2]], [+E[3][0], +E[3][1], +E[3][2], +E[3][3], +E[3][4], +P[3]], [+E[4][0], +E[4][1], +E[4][2], +E[4][3], +E[4][4], +P[4]], [+E[5][0], +E[5][1], +E[5][2], +E[5][3], +E[5][4], +P[5]]]), L(E)];
              };
            }
            var C = [function() {
              return [[0]];
            }, function(L, E) {
              return [[E[0]], [L[0][0]]];
            }];
            function D(L, E, P, I, M, O, T, z) {
              return function(F, U) {
                switch (F.length) {
                  case 0:
                    return L(F, U);
                  case 1:
                    return E(F, U);
                  case 2:
                    return P(F, U);
                  case 3:
                    return I(F, U);
                  case 4:
                    return M(F, U);
                  case 5:
                    return O(F, U);
                }
                var V = T[F.length];
                return V || (V = T[F.length] = z(F.length)), V(F, U);
              };
            }
            (function() {
              for (; C.length < 6; ) C.push(m(C.length));
              d.exports = D.apply(void 0, C.concat([C, m]));
              for (var L = 0; L < 6; ++L) d.exports[L] = C[L];
            })();
          }, 3250: function(d, f, c) {
            var g = c(5250), m = c(8210), x = c(3012), w = c(8545);
            function k(M, O, T, z) {
              return function(F, U, V) {
                var $ = M(M(O(U[1], V[0]), O(-V[1], U[0])), M(O(F[1], U[0]), O(-U[1], F[0]))), q = M(O(F[1], V[0]), O(-V[1], F[0])), K = z($, q);
                return K[K.length - 1];
              };
            }
            function S(M, O, T, z) {
              return function(F, U, V, $) {
                var q = M(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), U[2]), M(T(M(O(U[1], $[0]), O(-$[1], U[0])), -V[2]), T(M(O(U[1], V[0]), O(-V[1], U[0])), $[2]))), M(T(M(O(U[1], $[0]), O(-$[1], U[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), $[2])))), K = M(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -V[2]), T(M(O(F[1], V[0]), O(-V[1], F[0])), $[2]))), M(T(M(O(U[1], V[0]), O(-V[1], U[0])), F[2]), M(T(M(O(F[1], V[0]), O(-V[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), V[2])))), re = z(q, K);
                return re[re.length - 1];
              };
            }
            function A(M, O, T, z) {
              return function(F, U, V, $, q) {
                var K = M(M(M(T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), V[2]), M(T(M(O(V[1], q[0]), O(-q[1], V[0])), -$[2]), T(M(O(V[1], $[0]), O(-$[1], V[0])), q[2]))), U[3]), M(T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), U[2]), M(T(M(O(U[1], q[0]), O(-q[1], U[0])), -$[2]), T(M(O(U[1], $[0]), O(-$[1], U[0])), q[2]))), -V[3]), T(M(T(M(O(V[1], q[0]), O(-q[1], V[0])), U[2]), M(T(M(O(U[1], q[0]), O(-q[1], U[0])), -V[2]), T(M(O(U[1], V[0]), O(-V[1], U[0])), q[2]))), $[3]))), M(T(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), U[2]), M(T(M(O(U[1], $[0]), O(-$[1], U[0])), -V[2]), T(M(O(U[1], V[0]), O(-V[1], U[0])), $[2]))), -q[3]), M(T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), U[2]), M(T(M(O(U[1], q[0]), O(-q[1], U[0])), -$[2]), T(M(O(U[1], $[0]), O(-$[1], U[0])), q[2]))), F[3]), T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -$[2]), T(M(O(F[1], $[0]), O(-$[1], F[0])), q[2]))), -U[3])))), M(M(T(M(T(M(O(U[1], q[0]), O(-q[1], U[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), q[2]))), $[3]), M(T(M(T(M(O(U[1], $[0]), O(-$[1], U[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), $[2]))), -q[3]), T(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), U[2]), M(T(M(O(U[1], $[0]), O(-$[1], U[0])), -V[2]), T(M(O(U[1], V[0]), O(-V[1], U[0])), $[2]))), F[3]))), M(T(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -V[2]), T(M(O(F[1], V[0]), O(-V[1], F[0])), $[2]))), -U[3]), M(T(M(T(M(O(U[1], $[0]), O(-$[1], U[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), $[2]))), V[3]), T(M(T(M(O(U[1], V[0]), O(-V[1], U[0])), F[2]), M(T(M(O(F[1], V[0]), O(-V[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), V[2]))), -$[3]))))), re = M(M(M(T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), V[2]), M(T(M(O(V[1], q[0]), O(-q[1], V[0])), -$[2]), T(M(O(V[1], $[0]), O(-$[1], V[0])), q[2]))), F[3]), T(M(T(M(O($[1], q[0]), O(-q[1], $[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -$[2]), T(M(O(F[1], $[0]), O(-$[1], F[0])), q[2]))), -V[3])), M(T(M(T(M(O(V[1], q[0]), O(-q[1], V[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -V[2]), T(M(O(F[1], V[0]), O(-V[1], F[0])), q[2]))), $[3]), T(M(T(M(O(V[1], $[0]), O(-$[1], V[0])), F[2]), M(T(M(O(F[1], $[0]), O(-$[1], F[0])), -V[2]), T(M(O(F[1], V[0]), O(-V[1], F[0])), $[2]))), -q[3]))), M(M(T(M(T(M(O(V[1], q[0]), O(-q[1], V[0])), U[2]), M(T(M(O(U[1], q[0]), O(-q[1], U[0])), -V[2]), T(M(O(U[1], V[0]), O(-V[1], U[0])), q[2]))), F[3]), T(M(T(M(O(V[1], q[0]), O(-q[1], V[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -V[2]), T(M(O(F[1], V[0]), O(-V[1], F[0])), q[2]))), -U[3])), M(T(M(T(M(O(U[1], q[0]), O(-q[1], U[0])), F[2]), M(T(M(O(F[1], q[0]), O(-q[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), q[2]))), V[3]), T(M(T(M(O(U[1], V[0]), O(-V[1], U[0])), F[2]), M(T(M(O(F[1], V[0]), O(-V[1], F[0])), -U[2]), T(M(O(F[1], U[0]), O(-U[1], F[0])), V[2]))), -q[3])))), Y = z(K, re);
                return Y[Y.length - 1];
              };
            }
            function C(M) {
              return (M === 3 ? k : M === 4 ? S : A)(m, g, x, w);
            }
            var D = C(3), L = C(4), E = [function() {
              return 0;
            }, function() {
              return 0;
            }, function(M, O) {
              return O[0] - M[0];
            }, function(M, O, T) {
              var z, F = (M[1] - T[1]) * (O[0] - T[0]), U = (M[0] - T[0]) * (O[1] - T[1]), V = F - U;
              if (F > 0) {
                if (U <= 0) return V;
                z = F + U;
              } else {
                if (!(F < 0) || U >= 0) return V;
                z = -(F + U);
              }
              var $ = 33306690738754716e-32 * z;
              return V >= $ || V <= -$ ? V : D(M, O, T);
            }, function(M, O, T, z) {
              var F = M[0] - z[0], U = O[0] - z[0], V = T[0] - z[0], $ = M[1] - z[1], q = O[1] - z[1], K = T[1] - z[1], re = M[2] - z[2], Y = O[2] - z[2], te = T[2] - z[2], ee = U * K, X = V * q, Q = V * $, ue = F * K, ce = F * q, he = U * $, de = re * (ee - X) + Y * (Q - ue) + te * (ce - he), ne = 7771561172376103e-31 * ((Math.abs(ee) + Math.abs(X)) * Math.abs(re) + (Math.abs(Q) + Math.abs(ue)) * Math.abs(Y) + (Math.abs(ce) + Math.abs(he)) * Math.abs(te));
              return de > ne || -de > ne ? de : L(M, O, T, z);
            }];
            function P(M) {
              var O = E[M.length];
              return O || (O = E[M.length] = C(M.length)), O.apply(void 0, M);
            }
            function I(M, O, T, z, F, U, V) {
              return function($, q, K, re, Y) {
                switch (arguments.length) {
                  case 0:
                  case 1:
                    return 0;
                  case 2:
                    return z($, q);
                  case 3:
                    return F($, q, K);
                  case 4:
                    return U($, q, K, re);
                  case 5:
                    return V($, q, K, re, Y);
                }
                for (var te = new Array(arguments.length), ee = 0; ee < arguments.length; ++ee) te[ee] = arguments[ee];
                return M(te);
              };
            }
            (function() {
              for (; E.length <= 5; ) E.push(C(E.length));
              d.exports = I.apply(void 0, [P].concat(E));
              for (var M = 0; M <= 5; ++M) d.exports[M] = E[M];
            })();
          }, 5382: function(d, f, c) {
            var g = c(8210), m = c(3012);
            d.exports = function(x, w) {
              if (x.length === 1) return m(w, x[0]);
              if (w.length === 1) return m(x, w[0]);
              if (x.length === 0 || w.length === 0) return [0];
              var k = [0];
              if (x.length < w.length) for (var S = 0; S < x.length; ++S) k = g(k, m(w, x[S]));
              else for (S = 0; S < w.length; ++S) k = g(k, m(x, w[S]));
              return k;
            };
          }, 3012: function(d, f, c) {
            var g = c(5250), m = c(9362);
            d.exports = function(x, w) {
              var k = x.length;
              if (k === 1) {
                var S = g(x[0], w);
                return S[0] ? S : [S[1]];
              }
              var A = new Array(2 * k), C = [0.1, 0.1], D = [0.1, 0.1], L = 0;
              g(x[0], w, C), C[0] && (A[L++] = C[0]);
              for (var E = 1; E < k; ++E) {
                g(x[E], w, D);
                var P = C[1];
                m(P, D[0], C), C[0] && (A[L++] = C[0]);
                var I = D[1], M = C[1], O = I + M, T = M - (O - I);
                C[1] = O, T && (A[L++] = T);
              }
              return C[1] && (A[L++] = C[1]), L === 0 && (A[L++] = 0), A.length = L, A;
            };
          }, 1125: function(d, f, c) {
            d.exports = function(m, x, w, k) {
              var S = g(m, w, k), A = g(x, w, k);
              if (S > 0 && A > 0 || S < 0 && A < 0) return !1;
              var C = g(w, m, x), D = g(k, m, x);
              return !(C > 0 && D > 0 || C < 0 && D < 0) && (S !== 0 || A !== 0 || C !== 0 || D !== 0 || function(L, E, P, I) {
                for (var M = 0; M < 2; ++M) {
                  var O = L[M], T = E[M], z = Math.min(O, T), F = Math.max(O, T), U = P[M], V = I[M], $ = Math.min(U, V);
                  if (Math.max(U, V) < z || F < $) return !1;
                }
                return !0;
              }(m, x, w, k));
            };
            var g = c(3250)[3];
          }, 8545: function(d) {
            d.exports = function(f, c) {
              var g = 0 | f.length, m = 0 | c.length;
              if (g === 1 && m === 1) return function($, q) {
                var K = $ + q, re = K - $, Y = $ - (K - re) + (q - re);
                return Y ? [Y, K] : [K];
              }(f[0], -c[0]);
              var x, w, k = new Array(g + m), S = 0, A = 0, C = 0, D = Math.abs, L = f[A], E = D(L), P = -c[C], I = D(P);
              E < I ? (w = L, (A += 1) < g && (E = D(L = f[A]))) : (w = P, (C += 1) < m && (I = D(P = -c[C]))), A < g && E < I || C >= m ? (x = L, (A += 1) < g && (E = D(L = f[A]))) : (x = P, (C += 1) < m && (I = D(P = -c[C])));
              for (var M, O, T = x + w, z = T - x, F = w - z, U = F, V = T; A < g && C < m; ) E < I ? (x = L, (A += 1) < g && (E = D(L = f[A]))) : (x = P, (C += 1) < m && (I = D(P = -c[C]))), (F = (w = U) - (z = (T = x + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M;
              for (; A < g; ) (F = (w = U) - (z = (T = (x = L) + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M, (A += 1) < g && (L = f[A]);
              for (; C < m; ) (F = (w = U) - (z = (T = (x = P) + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M, (C += 1) < m && (P = -c[C]);
              return U && (k[S++] = U), V && (k[S++] = V), S || (k[S++] = 0), k.length = S, k;
            };
          }, 8210: function(d) {
            d.exports = function(f, c) {
              var g = 0 | f.length, m = 0 | c.length;
              if (g === 1 && m === 1) return function($, q) {
                var K = $ + q, re = K - $, Y = $ - (K - re) + (q - re);
                return Y ? [Y, K] : [K];
              }(f[0], c[0]);
              var x, w, k = new Array(g + m), S = 0, A = 0, C = 0, D = Math.abs, L = f[A], E = D(L), P = c[C], I = D(P);
              E < I ? (w = L, (A += 1) < g && (E = D(L = f[A]))) : (w = P, (C += 1) < m && (I = D(P = c[C]))), A < g && E < I || C >= m ? (x = L, (A += 1) < g && (E = D(L = f[A]))) : (x = P, (C += 1) < m && (I = D(P = c[C])));
              for (var M, O, T = x + w, z = T - x, F = w - z, U = F, V = T; A < g && C < m; ) E < I ? (x = L, (A += 1) < g && (E = D(L = f[A]))) : (x = P, (C += 1) < m && (I = D(P = c[C]))), (F = (w = U) - (z = (T = x + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M;
              for (; A < g; ) (F = (w = U) - (z = (T = (x = L) + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M, (A += 1) < g && (L = f[A]);
              for (; C < m; ) (F = (w = U) - (z = (T = (x = P) + w) - x)) && (k[S++] = F), U = V - ((M = V + T) - (O = M - V)) + (T - O), V = M, (C += 1) < m && (P = c[C]);
              return U && (k[S++] = U), V && (k[S++] = V), S || (k[S++] = 0), k.length = S, k;
            };
          }, 9127: function(d, f, c) {
            d.exports = function(x) {
              return m(g(x));
            };
            var g = c(6204), m = c(5771);
          }, 7765: function(d, f, c) {
            d.exports = function(k, S, A, C) {
              if (A = A || 0, C === void 0 && (C = function(T) {
                for (var z = T.length, F = 0, U = 0; U < z; ++U) F = 0 | Math.max(F, T[U].length);
                return F - 1;
              }(k)), k.length === 0 || C < 1) return { cells: [], vertexIds: [], vertexWeights: [] };
              var D = function(T, z) {
                for (var F = T.length, U = m.mallocUint8(F), V = 0; V < F; ++V) U[V] = T[V] < z | 0;
                return U;
              }(S, +A), L = function(T, z) {
                for (var F = T.length, U = z * (z + 1) / 2 * F | 0, V = m.mallocUint32(2 * U), $ = 0, q = 0; q < F; ++q) for (var K = T[q], re = (z = K.length, 0); re < z; ++re) for (var Y = 0; Y < re; ++Y) {
                  var te = K[Y], ee = K[re];
                  V[$++] = 0 | Math.min(te, ee), V[$++] = 0 | Math.max(te, ee);
                }
                x(g(V, [$ / 2 | 0, 2]));
                var X = 2;
                for (q = 2; q < $; q += 2) V[q - 2] === V[q] && V[q - 1] === V[q + 1] || (V[X++] = V[q], V[X++] = V[q + 1]);
                return g(V, [X / 2 | 0, 2]);
              }(k, C), E = function(T, z, F, U) {
                for (var V = T.data, $ = T.shape[0], q = m.mallocDouble($), K = 0, re = 0; re < $; ++re) {
                  var Y = V[2 * re], te = V[2 * re + 1];
                  if (F[Y] !== F[te]) {
                    var ee = z[Y], X = z[te];
                    V[2 * K] = Y, V[2 * K + 1] = te, q[K++] = (X - U) / (X - ee);
                  }
                }
                return T.shape[0] = K, g(q, [K]);
              }(L, S, D, +A), P = function(T, z) {
                var F = m.mallocInt32(2 * z), U = T.shape[0], V = T.data;
                F[0] = 0;
                for (var $ = 0, q = 0; q < U; ++q) {
                  var K = V[2 * q];
                  if (K !== $) {
                    for (F[2 * $ + 1] = q; ++$ < K; ) F[2 * $] = q, F[2 * $ + 1] = q;
                    F[2 * $] = q;
                  }
                }
                for (F[2 * $ + 1] = U; ++$ < z; ) F[2 * $] = F[2 * $ + 1] = U;
                return F;
              }(L, 0 | S.length), I = w(C)(k, L.data, P, D), M = function(T) {
                for (var z = 0 | T.shape[0], F = T.data, U = new Array(z), V = 0; V < z; ++V) U[V] = [F[2 * V], F[2 * V + 1]];
                return U;
              }(L), O = [].slice.call(E.data, 0, E.shape[0]);
              return m.free(D), m.free(L.data), m.free(E.data), m.free(P), { cells: I, vertexIds: M, vertexWeights: O };
            };
            var g = c(9618), m = c(1888), x = c(446), w = c(1570);
          }, 1570: function(d) {
            d.exports = function(c) {
              return f[c]();
            };
            var f = [function() {
              return function(c, g, m, x) {
                for (var w = c.length, k = 0; k < w; ++k) c[k].length;
                return [];
              };
            }, function() {
              function c(g, m, x, w) {
                for (var k = 0 | Math.min(x, w), S = 0 | Math.max(x, w), A = g[2 * k], C = g[2 * k + 1]; A < C; ) {
                  var D = A + C >> 1, L = m[2 * D + 1];
                  if (L === S) return D;
                  S < L ? C = D : A = D + 1;
                }
                return A;
              }
              return function(g, m, x, w) {
                for (var k = g.length, S = [], A = 0; A < k; ++A) {
                  var C = g[A];
                  if (C.length === 2) {
                    var D = (w[C[0]] << 0) + (w[C[1]] << 1);
                    if (D === 0 || D === 3) continue;
                    switch (D) {
                      case 0:
                      case 3:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[1])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[0])]);
                    }
                  }
                }
                return S;
              };
            }, function() {
              function c(g, m, x, w) {
                for (var k = 0 | Math.min(x, w), S = 0 | Math.max(x, w), A = g[2 * k], C = g[2 * k + 1]; A < C; ) {
                  var D = A + C >> 1, L = m[2 * D + 1];
                  if (L === S) return D;
                  S < L ? C = D : A = D + 1;
                }
                return A;
              }
              return function(g, m, x, w) {
                for (var k = g.length, S = [], A = 0; A < k; ++A) {
                  var C = g[A], D = C.length;
                  if (D === 3) {
                    if ((L = (w[C[0]] << 0) + (w[C[1]] << 1) + (w[C[2]] << 2)) == 0 || L === 7) continue;
                    switch (L) {
                      case 0:
                      case 7:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[2]), c(x, m, C[0], C[1])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[0]), c(x, m, C[1], C[2])]);
                        break;
                      case 3:
                        S.push([c(x, m, C[0], C[2]), c(x, m, C[1], C[2])]);
                        break;
                      case 4:
                        S.push([c(x, m, C[2], C[1]), c(x, m, C[2], C[0])]);
                        break;
                      case 5:
                        S.push([c(x, m, C[2], C[1]), c(x, m, C[0], C[1])]);
                        break;
                      case 6:
                        S.push([c(x, m, C[1], C[0]), c(x, m, C[2], C[0])]);
                    }
                  } else if (D === 2) {
                    var L;
                    if ((L = (w[C[0]] << 0) + (w[C[1]] << 1)) == 0 || L === 3) continue;
                    switch (L) {
                      case 0:
                      case 3:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[1])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[0])]);
                    }
                  }
                }
                return S;
              };
            }, function() {
              function c(g, m, x, w) {
                for (var k = 0 | Math.min(x, w), S = 0 | Math.max(x, w), A = g[2 * k], C = g[2 * k + 1]; A < C; ) {
                  var D = A + C >> 1, L = m[2 * D + 1];
                  if (L === S) return D;
                  S < L ? C = D : A = D + 1;
                }
                return A;
              }
              return function(g, m, x, w) {
                for (var k = g.length, S = [], A = 0; A < k; ++A) {
                  var C = g[A], D = C.length;
                  if (D === 4) {
                    if ((L = (w[C[0]] << 0) + (w[C[1]] << 1) + (w[C[2]] << 2) + (w[C[3]] << 3)) == 0 || L === 15) continue;
                    switch (L) {
                      case 0:
                      case 15:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[1]), c(x, m, C[0], C[2]), c(x, m, C[0], C[3])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[2]), c(x, m, C[1], C[0]), c(x, m, C[1], C[3])]);
                        break;
                      case 3:
                        S.push([c(x, m, C[1], C[2]), c(x, m, C[0], C[2]), c(x, m, C[0], C[3])], [c(x, m, C[1], C[3]), c(x, m, C[1], C[2]), c(x, m, C[0], C[3])]);
                        break;
                      case 4:
                        S.push([c(x, m, C[2], C[0]), c(x, m, C[2], C[1]), c(x, m, C[2], C[3])]);
                        break;
                      case 5:
                        S.push([c(x, m, C[0], C[1]), c(x, m, C[2], C[1]), c(x, m, C[0], C[3])], [c(x, m, C[2], C[1]), c(x, m, C[2], C[3]), c(x, m, C[0], C[3])]);
                        break;
                      case 6:
                        S.push([c(x, m, C[2], C[0]), c(x, m, C[1], C[0]), c(x, m, C[1], C[3])], [c(x, m, C[2], C[3]), c(x, m, C[2], C[0]), c(x, m, C[1], C[3])]);
                        break;
                      case 7:
                        S.push([c(x, m, C[0], C[3]), c(x, m, C[1], C[3]), c(x, m, C[2], C[3])]);
                        break;
                      case 8:
                        S.push([c(x, m, C[3], C[1]), c(x, m, C[3], C[0]), c(x, m, C[3], C[2])]);
                        break;
                      case 9:
                        S.push([c(x, m, C[3], C[1]), c(x, m, C[0], C[1]), c(x, m, C[0], C[2])], [c(x, m, C[3], C[2]), c(x, m, C[3], C[1]), c(x, m, C[0], C[2])]);
                        break;
                      case 10:
                        S.push([c(x, m, C[1], C[0]), c(x, m, C[3], C[0]), c(x, m, C[1], C[2])], [c(x, m, C[3], C[0]), c(x, m, C[3], C[2]), c(x, m, C[1], C[2])]);
                        break;
                      case 11:
                        S.push([c(x, m, C[1], C[2]), c(x, m, C[0], C[2]), c(x, m, C[3], C[2])]);
                        break;
                      case 12:
                        S.push([c(x, m, C[3], C[0]), c(x, m, C[2], C[0]), c(x, m, C[2], C[1])], [c(x, m, C[3], C[1]), c(x, m, C[3], C[0]), c(x, m, C[2], C[1])]);
                        break;
                      case 13:
                        S.push([c(x, m, C[0], C[1]), c(x, m, C[2], C[1]), c(x, m, C[3], C[1])]);
                        break;
                      case 14:
                        S.push([c(x, m, C[2], C[0]), c(x, m, C[1], C[0]), c(x, m, C[3], C[0])]);
                    }
                  } else if (D === 3) {
                    if ((L = (w[C[0]] << 0) + (w[C[1]] << 1) + (w[C[2]] << 2)) == 0 || L === 7) continue;
                    switch (L) {
                      case 0:
                      case 7:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[2]), c(x, m, C[0], C[1])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[0]), c(x, m, C[1], C[2])]);
                        break;
                      case 3:
                        S.push([c(x, m, C[0], C[2]), c(x, m, C[1], C[2])]);
                        break;
                      case 4:
                        S.push([c(x, m, C[2], C[1]), c(x, m, C[2], C[0])]);
                        break;
                      case 5:
                        S.push([c(x, m, C[2], C[1]), c(x, m, C[0], C[1])]);
                        break;
                      case 6:
                        S.push([c(x, m, C[1], C[0]), c(x, m, C[2], C[0])]);
                    }
                  } else if (D === 2) {
                    var L;
                    if ((L = (w[C[0]] << 0) + (w[C[1]] << 1)) == 0 || L === 3) continue;
                    switch (L) {
                      case 0:
                      case 3:
                        break;
                      case 1:
                        S.push([c(x, m, C[0], C[1])]);
                        break;
                      case 2:
                        S.push([c(x, m, C[1], C[0])]);
                    }
                  }
                }
                return S;
              };
            }];
          }, 6803: function(d, f, c) {
            c(8828), c(1755);
            function g(m, x) {
              var w = m.length, k = m.length - x.length, S = Math.min;
              if (k) return k;
              switch (w) {
                case 0:
                  return 0;
                case 1:
                  return m[0] - x[0];
                case 2:
                  return (D = m[0] + m[1] - x[0] - x[1]) || S(m[0], m[1]) - S(x[0], x[1]);
                case 3:
                  var A = m[0] + m[1], C = x[0] + x[1];
                  if (D = A + m[2] - (C + x[2])) return D;
                  var D, L = S(m[0], m[1]), E = S(x[0], x[1]);
                  return (D = S(L, m[2]) - S(E, x[2])) || S(L + m[2], A) - S(E + x[2], C);
                default:
                  var P = m.slice(0);
                  P.sort();
                  var I = x.slice(0);
                  I.sort();
                  for (var M = 0; M < w; ++M) if (k = P[M] - I[M]) return k;
                  return 0;
              }
            }
            f.Fw = g;
          }, 3105: function(d, f) {
            function c(m) {
              var x = 32;
              return (m &= -m) && x--, 65535 & m && (x -= 16), 16711935 & m && (x -= 8), 252645135 & m && (x -= 4), 858993459 & m && (x -= 2), 1431655765 & m && (x -= 1), x;
            }
            f.INT_BITS = 32, f.INT_MAX = 2147483647, f.INT_MIN = -2147483648, f.sign = function(m) {
              return (m > 0) - (m < 0);
            }, f.abs = function(m) {
              var x = m >> 31;
              return (m ^ x) - x;
            }, f.min = function(m, x) {
              return x ^ (m ^ x) & -(m < x);
            }, f.max = function(m, x) {
              return m ^ (m ^ x) & -(m < x);
            }, f.isPow2 = function(m) {
              return !(m & m - 1 || !m);
            }, f.log2 = function(m) {
              var x, w;
              return x = (m > 65535) << 4, x |= w = ((m >>>= x) > 255) << 3, x |= w = ((m >>>= w) > 15) << 2, (x |= w = ((m >>>= w) > 3) << 1) | (m >>>= w) >> 1;
            }, f.log10 = function(m) {
              return m >= 1e9 ? 9 : m >= 1e8 ? 8 : m >= 1e7 ? 7 : m >= 1e6 ? 6 : m >= 1e5 ? 5 : m >= 1e4 ? 4 : m >= 1e3 ? 3 : m >= 100 ? 2 : m >= 10 ? 1 : 0;
            }, f.popCount = function(m) {
              return 16843009 * ((m = (858993459 & (m -= m >>> 1 & 1431655765)) + (m >>> 2 & 858993459)) + (m >>> 4) & 252645135) >>> 24;
            }, f.countTrailingZeros = c, f.nextPow2 = function(m) {
              return m += m === 0, --m, m |= m >>> 1, m |= m >>> 2, m |= m >>> 4, m |= m >>> 8, 1 + (m |= m >>> 16);
            }, f.prevPow2 = function(m) {
              return m |= m >>> 1, m |= m >>> 2, m |= m >>> 4, m |= m >>> 8, (m |= m >>> 16) - (m >>> 1);
            }, f.parity = function(m) {
              return m ^= m >>> 16, m ^= m >>> 8, m ^= m >>> 4, 27030 >>> (m &= 15) & 1;
            };
            var g = new Array(256);
            (function(m) {
              for (var x = 0; x < 256; ++x) {
                var w = x, k = x, S = 7;
                for (w >>>= 1; w; w >>>= 1) k <<= 1, k |= 1 & w, --S;
                m[x] = k << S & 255;
              }
            })(g), f.reverse = function(m) {
              return g[255 & m] << 24 | g[m >>> 8 & 255] << 16 | g[m >>> 16 & 255] << 8 | g[m >>> 24 & 255];
            }, f.interleave2 = function(m, x) {
              return (m = 1431655765 & ((m = 858993459 & ((m = 252645135 & ((m = 16711935 & ((m &= 65535) | m << 8)) | m << 4)) | m << 2)) | m << 1)) | (x = 1431655765 & ((x = 858993459 & ((x = 252645135 & ((x = 16711935 & ((x &= 65535) | x << 8)) | x << 4)) | x << 2)) | x << 1)) << 1;
            }, f.deinterleave2 = function(m, x) {
              return (m = 65535 & ((m = 16711935 & ((m = 252645135 & ((m = 858993459 & ((m = m >>> x & 1431655765) | m >>> 1)) | m >>> 2)) | m >>> 4)) | m >>> 16)) << 16 >> 16;
            }, f.interleave3 = function(m, x, w) {
              return m = 1227133513 & ((m = 3272356035 & ((m = 251719695 & ((m = 4278190335 & ((m &= 1023) | m << 16)) | m << 8)) | m << 4)) | m << 2), (m |= (x = 1227133513 & ((x = 3272356035 & ((x = 251719695 & ((x = 4278190335 & ((x &= 1023) | x << 16)) | x << 8)) | x << 4)) | x << 2)) << 1) | (w = 1227133513 & ((w = 3272356035 & ((w = 251719695 & ((w = 4278190335 & ((w &= 1023) | w << 16)) | w << 8)) | w << 4)) | w << 2)) << 2;
            }, f.deinterleave3 = function(m, x) {
              return (m = 1023 & ((m = 4278190335 & ((m = 251719695 & ((m = 3272356035 & ((m = m >>> x & 1227133513) | m >>> 2)) | m >>> 4)) | m >>> 8)) | m >>> 16)) << 22 >> 22;
            }, f.nextCombination = function(m) {
              var x = m | m - 1;
              return x + 1 | (~x & -~x) - 1 >>> c(m) + 1;
            };
          }, 2014: function(d, f, c) {
            var g = c(3105), m = c(4623);
            function x(L, E) {
              var P = L.length, I = L.length - E.length, M = Math.min;
              if (I) return I;
              switch (P) {
                case 0:
                  return 0;
                case 1:
                  return L[0] - E[0];
                case 2:
                  return (z = L[0] + L[1] - E[0] - E[1]) || M(L[0], L[1]) - M(E[0], E[1]);
                case 3:
                  var O = L[0] + L[1], T = E[0] + E[1];
                  if (z = O + L[2] - (T + E[2])) return z;
                  var z, F = M(L[0], L[1]), U = M(E[0], E[1]);
                  return (z = M(F, L[2]) - M(U, E[2])) || M(F + L[2], O) - M(U + E[2], T);
                default:
                  var V = L.slice(0);
                  V.sort();
                  var $ = E.slice(0);
                  $.sort();
                  for (var q = 0; q < P; ++q) if (I = V[q] - $[q]) return I;
                  return 0;
              }
            }
            function w(L, E) {
              return x(L[0], E[0]);
            }
            function k(L, E) {
              if (E) {
                for (var P = L.length, I = new Array(P), M = 0; M < P; ++M) I[M] = [L[M], E[M]];
                for (I.sort(w), M = 0; M < P; ++M) L[M] = I[M][0], E[M] = I[M][1];
                return L;
              }
              return L.sort(x), L;
            }
            function S(L) {
              if (L.length === 0) return [];
              for (var E = 1, P = L.length, I = 1; I < P; ++I) {
                var M = L[I];
                if (x(M, L[I - 1])) {
                  if (I === E) {
                    E++;
                    continue;
                  }
                  L[E++] = M;
                }
              }
              return L.length = E, L;
            }
            function A(L, E) {
              for (var P = 0, I = L.length - 1, M = -1; P <= I; ) {
                var O = P + I >> 1, T = x(L[O], E);
                T <= 0 ? (T === 0 && (M = O), P = O + 1) : T > 0 && (I = O - 1);
              }
              return M;
            }
            function C(L, E) {
              for (var P = new Array(L.length), I = 0, M = P.length; I < M; ++I) P[I] = [];
              for (var O = [], T = (I = 0, E.length); I < T; ++I) for (var z = E[I], F = z.length, U = 1, V = 1 << F; U < V; ++U) {
                O.length = g.popCount(U);
                for (var $ = 0, q = 0; q < F; ++q) U & 1 << q && (O[$++] = z[q]);
                var K = A(L, O);
                if (!(K < 0)) for (; P[K++].push(I), !(K >= L.length || x(L[K], O) !== 0); ) ;
              }
              return P;
            }
            function D(L, E) {
              if (E < 0) return [];
              for (var P = [], I = (1 << E + 1) - 1, M = 0; M < L.length; ++M) for (var O = L[M], T = I; T < 1 << O.length; T = g.nextCombination(T)) {
                for (var z = new Array(E + 1), F = 0, U = 0; U < O.length; ++U) T & 1 << U && (z[F++] = O[U]);
                P.push(z);
              }
              return k(P);
            }
            f.dimension = function(L) {
              for (var E = 0, P = Math.max, I = 0, M = L.length; I < M; ++I) E = P(E, L[I].length);
              return E - 1;
            }, f.countVertices = function(L) {
              for (var E = -1, P = Math.max, I = 0, M = L.length; I < M; ++I) for (var O = L[I], T = 0, z = O.length; T < z; ++T) E = P(E, O[T]);
              return E + 1;
            }, f.cloneCells = function(L) {
              for (var E = new Array(L.length), P = 0, I = L.length; P < I; ++P) E[P] = L[P].slice(0);
              return E;
            }, f.compareCells = x, f.normalize = k, f.unique = S, f.findCell = A, f.incidence = C, f.dual = function(L, E) {
              if (!E) return C(S(D(L, 0)), L);
              for (var P = new Array(E), I = 0; I < E; ++I) P[I] = [];
              I = 0;
              for (var M = L.length; I < M; ++I) for (var O = L[I], T = 0, z = O.length; T < z; ++T) P[O[T]].push(I);
              return P;
            }, f.explode = function(L) {
              for (var E = [], P = 0, I = L.length; P < I; ++P) for (var M = L[P], O = 0 | M.length, T = 1, z = 1 << O; T < z; ++T) {
                for (var F = [], U = 0; U < O; ++U) T >>> U & 1 && F.push(M[U]);
                E.push(F);
              }
              return k(E);
            }, f.skeleton = D, f.boundary = function(L) {
              for (var E = [], P = 0, I = L.length; P < I; ++P) for (var M = L[P], O = 0, T = M.length; O < T; ++O) {
                for (var z = new Array(M.length - 1), F = 0, U = 0; F < T; ++F) F !== O && (z[U++] = M[F]);
                E.push(z);
              }
              return k(E);
            }, f.connectedComponents = function(L, E) {
              return E ? function(P, I) {
                for (var M = new m(I), O = 0; O < P.length; ++O) for (var T = P[O], z = 0; z < T.length; ++z) for (var F = z + 1; F < T.length; ++F) M.link(T[z], T[F]);
                var U = [], V = M.ranks;
                for (O = 0; O < V.length; ++O) V[O] = -1;
                for (O = 0; O < P.length; ++O) {
                  var $ = M.find(P[O][0]);
                  V[$] < 0 ? (V[$] = U.length, U.push([P[O].slice(0)])) : U[V[$]].push(P[O].slice(0));
                }
                return U;
              }(L, E) : function(P) {
                for (var I = S(k(D(P, 0))), M = new m(I.length), O = 0; O < P.length; ++O) for (var T = P[O], z = 0; z < T.length; ++z) for (var F = A(I, [T[z]]), U = z + 1; U < T.length; ++U) M.link(F, A(I, [T[U]]));
                var V = [], $ = M.ranks;
                for (O = 0; O < $.length; ++O) $[O] = -1;
                for (O = 0; O < P.length; ++O) {
                  var q = M.find(A(I, [P[O][0]]));
                  $[q] < 0 ? ($[q] = V.length, V.push([P[O].slice(0)])) : V[$[q]].push(P[O].slice(0));
                }
                return V;
              }(L);
            };
          }, 4623: function(d) {
            function f(c) {
              this.roots = new Array(c), this.ranks = new Array(c);
              for (var g = 0; g < c; ++g) this.roots[g] = g, this.ranks[g] = 0;
            }
            d.exports = f, f.prototype.length = function() {
              return this.roots.length;
            }, f.prototype.makeSet = function() {
              var c = this.roots.length;
              return this.roots.push(c), this.ranks.push(0), c;
            }, f.prototype.find = function(c) {
              for (var g = this.roots; g[c] !== c; ) {
                var m = g[c];
                g[c] = g[m], c = m;
              }
              return c;
            }, f.prototype.link = function(c, g) {
              var m = this.find(c), x = this.find(g);
              if (m !== x) {
                var w = this.ranks, k = this.roots, S = w[m], A = w[x];
                S < A ? k[m] = x : A < S ? k[x] = m : (k[x] = m, ++w[m]);
              }
            };
          }, 5878: function(d, f, c) {
            d.exports = function(x, w, k) {
              for (var S = w.length, A = x.length, C = new Array(S), D = new Array(S), L = new Array(S), E = new Array(S), P = 0; P < S; ++P) C[P] = D[P] = -1, L[P] = 1 / 0, E[P] = !1;
              for (P = 0; P < A; ++P) {
                var I = x[P];
                if (I.length !== 2) throw new Error("Input must be a graph");
                var M = I[1], O = I[0];
                D[O] !== -1 ? D[O] = -2 : D[O] = M, C[M] !== -1 ? C[M] = -2 : C[M] = O;
              }
              function T(he) {
                if (E[he]) return 1 / 0;
                var de, ne, ae, se = C[he], me = D[he];
                return se < 0 || me < 0 ? 1 / 0 : (de = w[he], ne = w[se], ae = w[me], Math.abs(g(de, ne, ae)) / Math.sqrt(Math.pow(ne[0] - ae[0], 2) + Math.pow(ne[1] - ae[1], 2)));
              }
              function z(he, de) {
                var ne = Y[he], ae = Y[de];
                Y[he] = ae, Y[de] = ne, te[ne] = de, te[ae] = he;
              }
              function F(he) {
                return L[Y[he]];
              }
              function U(he) {
                return 1 & he ? he - 1 >> 1 : (he >> 1) - 1;
              }
              function V(he) {
                for (var de = F(he); ; ) {
                  var ne = de, ae = 2 * he + 1, se = 2 * (he + 1), me = he;
                  if (ae < ee) {
                    var ye = F(ae);
                    ye < ne && (me = ae, ne = ye);
                  }
                  if (se < ee && F(se) < ne && (me = se), me === he) return he;
                  z(he, me), he = me;
                }
              }
              function $(he) {
                for (var de = F(he); he > 0; ) {
                  var ne = U(he);
                  if (!(ne >= 0 && de < F(ne))) return he;
                  z(he, ne), he = ne;
                }
              }
              function q() {
                if (ee > 0) {
                  var he = Y[0];
                  return z(0, ee - 1), ee -= 1, V(0), he;
                }
                return -1;
              }
              function K(he, de) {
                var ne = Y[he];
                return L[ne] === de ? he : (L[ne] = -1 / 0, $(he), q(), L[ne] = de, $((ee += 1) - 1));
              }
              function re(he) {
                if (!E[he]) {
                  E[he] = !0;
                  var de = C[he], ne = D[he];
                  C[ne] >= 0 && (C[ne] = de), D[de] >= 0 && (D[de] = ne), te[de] >= 0 && K(te[de], T(de)), te[ne] >= 0 && K(te[ne], T(ne));
                }
              }
              var Y = [], te = new Array(S);
              for (P = 0; P < S; ++P) (L[P] = T(P)) < 1 / 0 ? (te[P] = Y.length, Y.push(P)) : te[P] = -1;
              var ee = Y.length;
              for (P = ee >> 1; P >= 0; --P) V(P);
              for (; ; ) {
                var X = q();
                if (X < 0 || L[X] > k) break;
                re(X);
              }
              var Q = [];
              for (P = 0; P < S; ++P) E[P] || (te[P] = Q.length, Q.push(w[P].slice()));
              function ue(he, de) {
                if (he[de] < 0) return de;
                var ne = de, ae = de;
                do {
                  var se = he[ae];
                  if (!E[ae] || se < 0 || se === ae || (se = he[ae = se], !E[ae] || se < 0 || se === ae)) break;
                  ae = se, ne = he[ne];
                } while (ne !== ae);
                for (var me = de; me !== ae; me = he[me]) he[me] = ae;
                return ae;
              }
              Q.length;
              var ce = [];
              return x.forEach(function(he) {
                var de = ue(C, he[0]), ne = ue(D, he[1]);
                if (de >= 0 && ne >= 0 && de !== ne) {
                  var ae = te[de], se = te[ne];
                  ae !== se && ce.push([ae, se]);
                }
              }), m.unique(m.normalize(ce)), { positions: Q, edges: ce };
            };
            var g = c(3250), m = c(2014);
          }, 1303: function(d, f, c) {
            d.exports = function(x, w) {
              var k, S, A, C;
              if (w[0][0] < w[1][0]) k = w[0], S = w[1];
              else {
                if (!(w[0][0] > w[1][0])) return m(w, x);
                k = w[1], S = w[0];
              }
              if (x[0][0] < x[1][0]) A = x[0], C = x[1];
              else {
                if (!(x[0][0] > x[1][0])) return -m(x, w);
                A = x[1], C = x[0];
              }
              var D = g(k, S, C), L = g(k, S, A);
              if (D < 0) {
                if (L <= 0) return D;
              } else if (D > 0) {
                if (L >= 0) return D;
              } else if (L) return L;
              if (D = g(C, A, S), L = g(C, A, k), D < 0) {
                if (L <= 0) return D;
              } else if (D > 0) {
                if (L >= 0) return D;
              } else if (L) return L;
              return S[0] - C[0];
            };
            var g = c(3250);
            function m(x, w) {
              var k, S, A, C;
              if (w[0][0] < w[1][0]) k = w[0], S = w[1];
              else {
                if (!(w[0][0] > w[1][0])) {
                  var D = Math.min(x[0][1], x[1][1]), L = Math.max(x[0][1], x[1][1]), E = Math.min(w[0][1], w[1][1]), P = Math.max(w[0][1], w[1][1]);
                  return L < E ? L - E : D > P ? D - P : L - P;
                }
                k = w[1], S = w[0];
              }
              x[0][1] < x[1][1] ? (A = x[0], C = x[1]) : (A = x[1], C = x[0]);
              var I = g(S, k, A);
              return I || (I = g(S, k, C)) || C - S;
            }
          }, 4209: function(d, f, c) {
            d.exports = function(L) {
              for (var E = L.length, P = 2 * E, I = new Array(P), M = 0; M < E; ++M) {
                var O = L[M], T = O[0][0] < O[1][0];
                I[2 * M] = new D(O[0][0], O, T, M), I[2 * M + 1] = new D(O[1][0], O, !T, M);
              }
              I.sort(function(re, Y) {
                var te = re.x - Y.x;
                return te || (te = re.create - Y.create) || Math.min(re.segment[0][1], re.segment[1][1]) - Math.min(Y.segment[0][1], Y.segment[1][1]);
              });
              var z = m(w), F = [], U = [], V = [];
              for (M = 0; M < P; ) {
                for (var $ = I[M].x, q = []; M < P; ) {
                  var K = I[M];
                  if (K.x !== $) break;
                  M += 1, K.segment[0][0] === K.x && K.segment[1][0] === K.x ? K.create && (K.segment[0][1] < K.segment[1][1] ? (q.push(new C(K.segment[0][1], K.index, !0, !0)), q.push(new C(K.segment[1][1], K.index, !1, !1))) : (q.push(new C(K.segment[1][1], K.index, !0, !1)), q.push(new C(K.segment[0][1], K.index, !1, !0)))) : z = K.create ? z.insert(K.segment, K.index) : z.remove(K.segment);
                }
                F.push(z.root), U.push($), V.push(q);
              }
              return new k(F, U, V);
            };
            var g = c(2478), m = c(3840), x = c(3250), w = c(1303);
            function k(L, E, P) {
              this.slabs = L, this.coordinates = E, this.horizontal = P;
            }
            function S(L, E) {
              return L.y - E;
            }
            function A(L, E) {
              for (var P = null; L; ) {
                var I, M, O = L.key;
                O[0][0] < O[1][0] ? (I = O[0], M = O[1]) : (I = O[1], M = O[0]);
                var T = x(I, M, E);
                if (T < 0) L = L.left;
                else if (T > 0) if (E[0] !== O[1][0]) P = L, L = L.right;
                else {
                  if (z = A(L.right, E)) return z;
                  L = L.left;
                }
                else {
                  if (E[0] !== O[1][0]) return L;
                  var z;
                  if (z = A(L.right, E)) return z;
                  L = L.left;
                }
              }
              return P;
            }
            function C(L, E, P, I) {
              this.y = L, this.index = E, this.start = P, this.closed = I;
            }
            function D(L, E, P, I) {
              this.x = L, this.segment = E, this.create = P, this.index = I;
            }
            k.prototype.castUp = function(L) {
              var E = g.le(this.coordinates, L[0]);
              if (E < 0) return -1;
              this.slabs[E];
              var P = A(this.slabs[E], L), I = -1;
              if (P && (I = P.value), this.coordinates[E] === L[0]) {
                var M = null;
                if (P && (M = P.key), E > 0) {
                  var O = A(this.slabs[E - 1], L);
                  O && (M ? w(O.key, M) > 0 && (M = O.key, I = O.value) : (I = O.value, M = O.key));
                }
                var T = this.horizontal[E];
                if (T.length > 0) {
                  var z = g.ge(T, L[1], S);
                  if (z < T.length) {
                    var F = T[z];
                    if (L[1] === F.y) {
                      if (F.closed) return F.index;
                      for (; z < T.length - 1 && T[z + 1].y === L[1]; ) if ((F = T[z += 1]).closed) return F.index;
                      if (F.y === L[1] && !F.start) {
                        if ((z += 1) >= T.length) return I;
                        F = T[z];
                      }
                    }
                    if (F.start) if (M) {
                      var U = x(M[0], M[1], [L[0], F.y]);
                      M[0][0] > M[1][0] && (U = -U), U > 0 && (I = F.index);
                    } else I = F.index;
                    else F.y !== L[1] && (I = F.index);
                  }
                }
              }
              return I;
            };
          }, 5202: function(d, f, c) {
            var g = c(1944), m = c(8210);
            function x(k, S) {
              var A = m(g(k, S), [S[S.length - 1]]);
              return A[A.length - 1];
            }
            function w(k, S, A, C) {
              var D = -S / (C - S);
              D < 0 ? D = 0 : D > 1 && (D = 1);
              for (var L = 1 - D, E = k.length, P = new Array(E), I = 0; I < E; ++I) P[I] = D * k[I] + L * A[I];
              return P;
            }
            d.exports = function(k, S) {
              for (var A = [], C = [], D = x(k[k.length - 1], S), L = k[k.length - 1], E = k[0], P = 0; P < k.length; ++P, L = E) {
                var I = x(E = k[P], S);
                if (D < 0 && I > 0 || D > 0 && I < 0) {
                  var M = w(L, I, E, D);
                  A.push(M), C.push(M.slice());
                }
                I < 0 ? C.push(E.slice()) : I > 0 ? A.push(E.slice()) : (A.push(E.slice()), C.push(E.slice())), D = I;
              }
              return { positive: A, negative: C };
            }, d.exports.positive = function(k, S) {
              for (var A = [], C = x(k[k.length - 1], S), D = k[k.length - 1], L = k[0], E = 0; E < k.length; ++E, D = L) {
                var P = x(L = k[E], S);
                (C < 0 && P > 0 || C > 0 && P < 0) && A.push(w(D, P, L, C)), P >= 0 && A.push(L.slice()), C = P;
              }
              return A;
            }, d.exports.negative = function(k, S) {
              for (var A = [], C = x(k[k.length - 1], S), D = k[k.length - 1], L = k[0], E = 0; E < k.length; ++E, D = L) {
                var P = x(L = k[E], S);
                (C < 0 && P > 0 || C > 0 && P < 0) && A.push(w(D, P, L, C)), P <= 0 && A.push(L.slice()), C = P;
              }
              return A;
            };
          }, 3387: function(d, f, c) {
            var g;
            (function() {
              var m = { not_string: /[^s]/, not_bool: /[^t]/, not_type: /[^T]/, not_primitive: /[^v]/, number: /[diefg]/, numeric_arg: /[bcdiefguxX]/, json: /[j]/, not_json: /[^j]/, text: /^[^\x25]+/, modulo: /^\x25{2}/, placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/, key: /^([a-z_][a-z_\d]*)/i, key_access: /^\.([a-z_][a-z_\d]*)/i, index_access: /^\[(\d+)\]/, sign: /^[+-]/ };
              function x(S) {
                return function(A, C) {
                  var D, L, E, P, I, M, O, T, z, F = 1, U = A.length, V = "";
                  for (L = 0; L < U; L++) if (typeof A[L] == "string") V += A[L];
                  else if (typeof A[L] == "object") {
                    if ((P = A[L]).keys) for (D = C[F], E = 0; E < P.keys.length; E++) {
                      if (D == null) throw new Error(x('[sprintf] Cannot access property "%s" of undefined value "%s"', P.keys[E], P.keys[E - 1]));
                      D = D[P.keys[E]];
                    }
                    else D = P.param_no ? C[P.param_no] : C[F++];
                    if (m.not_type.test(P.type) && m.not_primitive.test(P.type) && D instanceof Function && (D = D()), m.numeric_arg.test(P.type) && typeof D != "number" && isNaN(D)) throw new TypeError(x("[sprintf] expecting number but found %T", D));
                    switch (m.number.test(P.type) && (T = D >= 0), P.type) {
                      case "b":
                        D = parseInt(D, 10).toString(2);
                        break;
                      case "c":
                        D = String.fromCharCode(parseInt(D, 10));
                        break;
                      case "d":
                      case "i":
                        D = parseInt(D, 10);
                        break;
                      case "j":
                        D = JSON.stringify(D, null, P.width ? parseInt(P.width) : 0);
                        break;
                      case "e":
                        D = P.precision ? parseFloat(D).toExponential(P.precision) : parseFloat(D).toExponential();
                        break;
                      case "f":
                        D = P.precision ? parseFloat(D).toFixed(P.precision) : parseFloat(D);
                        break;
                      case "g":
                        D = P.precision ? String(Number(D.toPrecision(P.precision))) : parseFloat(D);
                        break;
                      case "o":
                        D = (parseInt(D, 10) >>> 0).toString(8);
                        break;
                      case "s":
                        D = String(D), D = P.precision ? D.substring(0, P.precision) : D;
                        break;
                      case "t":
                        D = String(!!D), D = P.precision ? D.substring(0, P.precision) : D;
                        break;
                      case "T":
                        D = Object.prototype.toString.call(D).slice(8, -1).toLowerCase(), D = P.precision ? D.substring(0, P.precision) : D;
                        break;
                      case "u":
                        D = parseInt(D, 10) >>> 0;
                        break;
                      case "v":
                        D = D.valueOf(), D = P.precision ? D.substring(0, P.precision) : D;
                        break;
                      case "x":
                        D = (parseInt(D, 10) >>> 0).toString(16);
                        break;
                      case "X":
                        D = (parseInt(D, 10) >>> 0).toString(16).toUpperCase();
                    }
                    m.json.test(P.type) ? V += D : (!m.number.test(P.type) || T && !P.sign ? z = "" : (z = T ? "+" : "-", D = D.toString().replace(m.sign, "")), M = P.pad_char ? P.pad_char === "0" ? "0" : P.pad_char.charAt(1) : " ", O = P.width - (z + D).length, I = P.width && O > 0 ? M.repeat(O) : "", V += P.align ? z + D + I : M === "0" ? z + I + D : I + z + D);
                  }
                  return V;
                }(function(A) {
                  if (k[A]) return k[A];
                  for (var C, D = A, L = [], E = 0; D; ) {
                    if ((C = m.text.exec(D)) !== null) L.push(C[0]);
                    else if ((C = m.modulo.exec(D)) !== null) L.push("%");
                    else {
                      if ((C = m.placeholder.exec(D)) === null) throw new SyntaxError("[sprintf] unexpected placeholder");
                      if (C[2]) {
                        E |= 1;
                        var P = [], I = C[2], M = [];
                        if ((M = m.key.exec(I)) === null) throw new SyntaxError("[sprintf] failed to parse named argument key");
                        for (P.push(M[1]); (I = I.substring(M[0].length)) !== ""; ) if ((M = m.key_access.exec(I)) !== null) P.push(M[1]);
                        else {
                          if ((M = m.index_access.exec(I)) === null) throw new SyntaxError("[sprintf] failed to parse named argument key");
                          P.push(M[1]);
                        }
                        C[2] = P;
                      } else E |= 2;
                      if (E === 3) throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
                      L.push({ placeholder: C[0], param_no: C[1], keys: C[2], sign: C[3], pad_char: C[4], align: C[5], width: C[6], precision: C[7], type: C[8] });
                    }
                    D = D.substring(C[0].length);
                  }
                  return k[A] = L;
                }(S), arguments);
              }
              function w(S, A) {
                return x.apply(null, [S].concat(A || []));
              }
              var k = /* @__PURE__ */ Object.create(null);
              f.sprintf = x, f.vsprintf = w, typeof window < "u" && (window.sprintf = x, window.vsprintf = w, (g = (function() {
                return { sprintf: x, vsprintf: w };
              }).call(f, c, f, d)) === void 0 || (d.exports = g));
            })();
          }, 3711: function(d, f, c) {
            d.exports = function(k, S) {
              if (k.dimension <= 0) return { positions: [], cells: [] };
              if (k.dimension === 1) return function(D, L) {
                for (var E = m(D, L), P = E.length, I = new Array(P), M = new Array(P), O = 0; O < P; ++O) I[O] = [E[O]], M[O] = [O];
                return { positions: I, cells: M };
              }(k, S);
              var A = k.order.join() + "-" + k.dtype, C = w[A];
              return S = +S || 0, C || (C = w[A] = function(D, L) {
                var E = D.length + "d", P = x[E];
                if (P) return P(g, D, L);
              }(k.order, k.dtype)), C(k, S);
            };
            var g = c(2640), m = c(781), x = { "2d": function(k, S, A) {
              var C = k({ order: S, scalarArguments: 3, getters: A === "generic" ? [0] : void 0, phase: function(D, L, E, P) {
                return D > P | 0;
              }, vertex: function(D, L, E, P, I, M, O, T, z, F, U, V, $) {
                var q = (O << 0) + (T << 1) + (z << 2) + (F << 3) | 0;
                if (q !== 0 && q !== 15) switch (q) {
                  case 0:
                  case 15:
                    U.push([D - 0.5, L - 0.5]);
                    break;
                  case 1:
                    U.push([D - 0.25 - 0.25 * (P + E - 2 * $) / (E - P), L - 0.25 - 0.25 * (I + E - 2 * $) / (E - I)]);
                    break;
                  case 2:
                    U.push([D - 0.75 - 0.25 * (-P - E + 2 * $) / (P - E), L - 0.25 - 0.25 * (M + P - 2 * $) / (P - M)]);
                    break;
                  case 3:
                    U.push([D - 0.5, L - 0.5 - 0.5 * (I + E + M + P - 4 * $) / (E - I + P - M)]);
                    break;
                  case 4:
                    U.push([D - 0.25 - 0.25 * (M + I - 2 * $) / (I - M), L - 0.75 - 0.25 * (-I - E + 2 * $) / (I - E)]);
                    break;
                  case 5:
                    U.push([D - 0.5 - 0.5 * (P + E + M + I - 4 * $) / (E - P + I - M), L - 0.5]);
                    break;
                  case 6:
                    U.push([D - 0.5 - 0.25 * (-P - E + M + I) / (P - E + I - M), L - 0.5 - 0.25 * (-I - E + M + P) / (I - E + P - M)]);
                    break;
                  case 7:
                    U.push([D - 0.75 - 0.25 * (M + I - 2 * $) / (I - M), L - 0.75 - 0.25 * (M + P - 2 * $) / (P - M)]);
                    break;
                  case 8:
                    U.push([D - 0.75 - 0.25 * (-M - I + 2 * $) / (M - I), L - 0.75 - 0.25 * (-M - P + 2 * $) / (M - P)]);
                    break;
                  case 9:
                    U.push([D - 0.5 - 0.25 * (P + E + -M - I) / (E - P + M - I), L - 0.5 - 0.25 * (I + E + -M - P) / (E - I + M - P)]);
                    break;
                  case 10:
                    U.push([D - 0.5 - 0.5 * (-P - E - M - I + 4 * $) / (P - E + M - I), L - 0.5]);
                    break;
                  case 11:
                    U.push([D - 0.25 - 0.25 * (-M - I + 2 * $) / (M - I), L - 0.75 - 0.25 * (I + E - 2 * $) / (E - I)]);
                    break;
                  case 12:
                    U.push([D - 0.5, L - 0.5 - 0.5 * (-I - E - M - P + 4 * $) / (I - E + M - P)]);
                    break;
                  case 13:
                    U.push([D - 0.75 - 0.25 * (P + E - 2 * $) / (E - P), L - 0.25 - 0.25 * (-M - P + 2 * $) / (M - P)]);
                    break;
                  case 14:
                    U.push([D - 0.25 - 0.25 * (-P - E + 2 * $) / (P - E), L - 0.25 - 0.25 * (-I - E + 2 * $) / (I - E)]);
                }
              }, cell: function(D, L, E, P, I, M, O, T, z) {
                I ? T.push([D, L]) : T.push([L, D]);
              } });
              return function(D, L) {
                var E = [], P = [];
                return C(D, E, P, L), { positions: E, cells: P };
              };
            } }, w = {};
          }, 529: function(d, f, c) {
            d.exports = function w(k, S, A) {
              var C = (A = A || {}).fontStyle || "normal", D = A.fontWeight || "normal", L = A.fontVariant || "normal", E = [C, D, L, k].join("_"), P = x[E];
              P || (P = x[E] = { " ": { data: new Float32Array(0), shape: 0.2 } });
              var I = P[S];
              if (!I) if (S.length <= 1 || !/\d/.test(S)) I = P[S] = function(re) {
                for (var Y = re.cells, te = re.positions, ee = new Float32Array(6 * Y.length), X = 0, Q = 0, ue = 0; ue < Y.length; ++ue) for (var ce = Y[ue], he = 0; he < 3; ++he) {
                  var de = te[ce[he]];
                  ee[X++] = de[0], ee[X++] = de[1] + 1.4, Q = Math.max(de[0], Q);
                }
                return { data: ee, shape: Q };
              }(g(S, { triangles: !0, font: k, fontStyle: C, fontWeight: D, fontVariant: L, textAlign: A.textAlign || "left", textBaseline: "alphabetic", styletags: { breaklines: !0, bolds: !0, italics: !0, subscripts: !0, superscripts: !0 } }));
              else {
                for (var M = S.split(/(\d|\s)/), O = new Array(M.length), T = 0, z = 0, F = 0; F < M.length; ++F) O[F] = w(k, M[F]), T += O[F].data.length, z += O[F].shape, F > 0 && (z += 0.02);
                var U = new Float32Array(T), V = 0, $ = -0.5 * z;
                for (F = 0; F < O.length; ++F) {
                  for (var q = O[F].data, K = 0; K < q.length; K += 2) U[V++] = q[K] + $, U[V++] = q[K + 1];
                  $ += O[F].shape + 0.02;
                }
                I = P[S] = { data: U, shape: z };
              }
              return I;
            };
            var g = c(4359), m = window || u.global || {}, x = m.__TEXT_CACHE || {};
            m.__TEXT_CACHE = {};
          }, 665: function(d, f, c) {
            var g = c(3202);
            d.exports = w;
            var m = 96;
            function x(k, S) {
              var A = g(getComputedStyle(k).getPropertyValue(S));
              return A[0] * w(A[1], k);
            }
            function w(k, S) {
              switch (S = S || document.body, k = (k || "px").trim().toLowerCase(), S !== window && S !== document || (S = document.body), k) {
                case "%":
                  return S.clientHeight / 100;
                case "ch":
                case "ex":
                  return function(A, C) {
                    var D = document.createElement("div");
                    D.style["font-size"] = "128" + A, C.appendChild(D);
                    var L = x(D, "font-size") / 128;
                    return C.removeChild(D), L;
                  }(k, S);
                case "em":
                  return x(S, "font-size");
                case "rem":
                  return x(document.body, "font-size");
                case "vw":
                  return window.innerWidth / 100;
                case "vh":
                  return window.innerHeight / 100;
                case "vmin":
                  return Math.min(window.innerWidth, window.innerHeight) / 100;
                case "vmax":
                  return Math.max(window.innerWidth, window.innerHeight) / 100;
                case "in":
                  return m;
                case "cm":
                  return m / 2.54;
                case "mm":
                  return m / 25.4;
                case "pt":
                  return m / 72;
                case "pc":
                  return m / 6;
              }
              return 1;
            }
          }, 7261: function(d, f, c) {
            d.exports = function(I) {
              var M = (I = I || {}).center || [0, 0, 0], O = I.up || [0, 1, 0], T = I.right || D(O), z = I.radius || 1, F = I.theta || 0, U = I.phi || 0;
              if (M = [].slice.call(M, 0, 3), O = [].slice.call(O, 0, 3), k(O, O), T = [].slice.call(T, 0, 3), k(T, T), "eye" in I) {
                var V = I.eye, $ = [V[0] - M[0], V[1] - M[1], V[2] - M[2]];
                w(T, $, O), A(T[0], T[1], T[2]) < 1e-6 ? T = D(O) : k(T, T), z = A($[0], $[1], $[2]);
                var q = S(O, $) / z, K = S(T, $) / z;
                U = Math.acos(q), F = Math.acos(K);
              }
              return z = Math.log(z), new L(I.zoomMin, I.zoomMax, M, O, T, z, F, U);
            };
            var g = c(9215), m = c(7608), x = c(6079), w = c(5911), k = c(3536), S = c(244);
            function A(I, M, O) {
              return Math.sqrt(Math.pow(I, 2) + Math.pow(M, 2) + Math.pow(O, 2));
            }
            function C(I) {
              return Math.min(1, Math.max(-1, I));
            }
            function D(I) {
              var M = Math.abs(I[0]), O = Math.abs(I[1]), T = Math.abs(I[2]), z = [0, 0, 0];
              M > Math.max(O, T) ? z[2] = 1 : O > Math.max(M, T) ? z[0] = 1 : z[1] = 1;
              for (var F = 0, U = 0, V = 0; V < 3; ++V) F += I[V] * I[V], U += z[V] * I[V];
              for (V = 0; V < 3; ++V) z[V] -= U / F * I[V];
              return k(z, z), z;
            }
            function L(I, M, O, T, z, F, U, V) {
              this.center = g(O), this.up = g(T), this.right = g(z), this.radius = g([F]), this.angle = g([U, V]), this.angle.bounds = [[-1 / 0, -Math.PI / 2], [1 / 0, Math.PI / 2]], this.setDistanceLimits(I, M), this.computedCenter = this.center.curve(0), this.computedUp = this.up.curve(0), this.computedRight = this.right.curve(0), this.computedRadius = this.radius.curve(0), this.computedAngle = this.angle.curve(0), this.computedToward = [0, 0, 0], this.computedEye = [0, 0, 0], this.computedMatrix = new Array(16);
              for (var $ = 0; $ < 16; ++$) this.computedMatrix[$] = 0.5;
              this.recalcMatrix(0);
            }
            var E = L.prototype;
            E.setDistanceLimits = function(I, M) {
              I = I > 0 ? Math.log(I) : -1 / 0, M = M > 0 ? Math.log(M) : 1 / 0, M = Math.max(M, I), this.radius.bounds[0][0] = I, this.radius.bounds[1][0] = M;
            }, E.getDistanceLimits = function(I) {
              var M = this.radius.bounds[0];
              return I ? (I[0] = Math.exp(M[0][0]), I[1] = Math.exp(M[1][0]), I) : [Math.exp(M[0][0]), Math.exp(M[1][0])];
            }, E.recalcMatrix = function(I) {
              this.center.curve(I), this.up.curve(I), this.right.curve(I), this.radius.curve(I), this.angle.curve(I);
              for (var M = this.computedUp, O = this.computedRight, T = 0, z = 0, F = 0; F < 3; ++F) z += M[F] * O[F], T += M[F] * M[F];
              var U = Math.sqrt(T), V = 0;
              for (F = 0; F < 3; ++F) O[F] -= M[F] * z / T, V += O[F] * O[F], M[F] /= U;
              var $ = Math.sqrt(V);
              for (F = 0; F < 3; ++F) O[F] /= $;
              var q = this.computedToward;
              w(q, M, O), k(q, q);
              var K = Math.exp(this.computedRadius[0]), re = this.computedAngle[0], Y = this.computedAngle[1], te = Math.cos(re), ee = Math.sin(re), X = Math.cos(Y), Q = Math.sin(Y), ue = this.computedCenter, ce = te * X, he = ee * X, de = Q, ne = -te * Q, ae = -ee * Q, se = X, me = this.computedEye, ye = this.computedMatrix;
              for (F = 0; F < 3; ++F) {
                var pe = ce * O[F] + he * q[F] + de * M[F];
                ye[4 * F + 1] = ne * O[F] + ae * q[F] + se * M[F], ye[4 * F + 2] = pe, ye[4 * F + 3] = 0;
              }
              var be = ye[1], Ae = ye[5], Se = ye[9], Me = ye[2], De = ye[6], Le = ye[10], We = Ae * Le - Se * De, Ee = Se * Me - be * Le, Ne = be * De - Ae * Me, Ie = A(We, Ee, Ne);
              for (We /= Ie, Ee /= Ie, Ne /= Ie, ye[0] = We, ye[4] = Ee, ye[8] = Ne, F = 0; F < 3; ++F) me[F] = ue[F] + ye[2 + 4 * F] * K;
              for (F = 0; F < 3; ++F) {
                V = 0;
                for (var ge = 0; ge < 3; ++ge) V += ye[F + 4 * ge] * me[ge];
                ye[12 + F] = -V;
              }
              ye[15] = 1;
            }, E.getMatrix = function(I, M) {
              this.recalcMatrix(I);
              var O = this.computedMatrix;
              if (M) {
                for (var T = 0; T < 16; ++T) M[T] = O[T];
                return M;
              }
              return O;
            };
            var P = [0, 0, 0];
            E.rotate = function(I, M, O, T) {
              if (this.angle.move(I, M, O), T) {
                this.recalcMatrix(I);
                var z = this.computedMatrix;
                P[0] = z[2], P[1] = z[6], P[2] = z[10];
                for (var F = this.computedUp, U = this.computedRight, V = this.computedToward, $ = 0; $ < 3; ++$) z[4 * $] = F[$], z[4 * $ + 1] = U[$], z[4 * $ + 2] = V[$];
                for (x(z, z, T, P), $ = 0; $ < 3; ++$) F[$] = z[4 * $], U[$] = z[4 * $ + 1];
                this.up.set(I, F[0], F[1], F[2]), this.right.set(I, U[0], U[1], U[2]);
              }
            }, E.pan = function(I, M, O, T) {
              M = M || 0, O = O || 0, T = T || 0, this.recalcMatrix(I);
              var z = this.computedMatrix, F = (Math.exp(this.computedRadius[0]), z[1]), U = z[5], V = z[9], $ = A(F, U, V);
              F /= $, U /= $, V /= $;
              var q = z[0], K = z[4], re = z[8], Y = q * F + K * U + re * V, te = A(q -= F * Y, K -= U * Y, re -= V * Y), ee = (q /= te) * M + F * O, X = (K /= te) * M + U * O, Q = (re /= te) * M + V * O;
              this.center.move(I, ee, X, Q);
              var ue = Math.exp(this.computedRadius[0]);
              ue = Math.max(1e-4, ue + T), this.radius.set(I, Math.log(ue));
            }, E.translate = function(I, M, O, T) {
              this.center.move(I, M || 0, O || 0, T || 0);
            }, E.setMatrix = function(I, M, O, T) {
              var z = 1;
              typeof O == "number" && (z = 0 | O), (z < 0 || z > 3) && (z = 1);
              var F = (z + 2) % 3;
              M || (this.recalcMatrix(I), M = this.computedMatrix);
              var U = M[z], V = M[z + 4], $ = M[z + 8];
              if (T) {
                var q = Math.abs(U), K = Math.abs(V), re = Math.abs($), Y = Math.max(q, K, re);
                q === Y ? (U = U < 0 ? -1 : 1, V = $ = 0) : re === Y ? ($ = $ < 0 ? -1 : 1, U = V = 0) : (V = V < 0 ? -1 : 1, U = $ = 0);
              } else {
                var te = A(U, V, $);
                U /= te, V /= te, $ /= te;
              }
              var ee, X, Q = M[F], ue = M[F + 4], ce = M[F + 8], he = Q * U + ue * V + ce * $, de = A(Q -= U * he, ue -= V * he, ce -= $ * he), ne = V * (ce /= de) - $ * (ue /= de), ae = $ * (Q /= de) - U * ce, se = U * ue - V * Q, me = A(ne, ae, se);
              if (ne /= me, ae /= me, se /= me, this.center.jump(I, Re, je, Ke), this.radius.idle(I), this.up.jump(I, U, V, $), this.right.jump(I, Q, ue, ce), z === 2) {
                var ye = M[1], pe = M[5], be = M[9], Ae = ye * Q + pe * ue + be * ce, Se = ye * ne + pe * ae + be * se;
                ee = We < 0 ? -Math.PI / 2 : Math.PI / 2, X = Math.atan2(Se, Ae);
              } else {
                var Me = M[2], De = M[6], Le = M[10], We = Me * U + De * V + Le * $, Ee = Me * Q + De * ue + Le * ce, Ne = Me * ne + De * ae + Le * se;
                ee = Math.asin(C(We)), X = Math.atan2(Ne, Ee);
              }
              this.angle.jump(I, X, ee), this.recalcMatrix(I);
              var Ie = M[2], ge = M[6], Ce = M[10], we = this.computedMatrix;
              m(we, M);
              var Ge = we[15], Re = we[12] / Ge, je = we[13] / Ge, Ke = we[14] / Ge, tt = Math.exp(this.computedRadius[0]);
              this.center.jump(I, Re - Ie * tt, je - ge * tt, Ke - Ce * tt);
            }, E.lastT = function() {
              return Math.max(this.center.lastT(), this.up.lastT(), this.right.lastT(), this.radius.lastT(), this.angle.lastT());
            }, E.idle = function(I) {
              this.center.idle(I), this.up.idle(I), this.right.idle(I), this.radius.idle(I), this.angle.idle(I);
            }, E.flush = function(I) {
              this.center.flush(I), this.up.flush(I), this.right.flush(I), this.radius.flush(I), this.angle.flush(I);
            }, E.setDistance = function(I, M) {
              M > 0 && this.radius.set(I, Math.log(M));
            }, E.lookAt = function(I, M, O, T) {
              this.recalcMatrix(I), M = M || this.computedEye, O = O || this.computedCenter;
              var z = (T = T || this.computedUp)[0], F = T[1], U = T[2], V = A(z, F, U);
              if (!(V < 1e-6)) {
                z /= V, F /= V, U /= V;
                var $ = M[0] - O[0], q = M[1] - O[1], K = M[2] - O[2], re = A($, q, K);
                if (!(re < 1e-6)) {
                  $ /= re, q /= re, K /= re;
                  var Y = this.computedRight, te = Y[0], ee = Y[1], X = Y[2], Q = z * te + F * ee + U * X, ue = A(te -= Q * z, ee -= Q * F, X -= Q * U);
                  if (!(ue < 0.01 && (ue = A(te = F * K - U * q, ee = U * $ - z * K, X = z * q - F * $)) < 1e-6)) {
                    te /= ue, ee /= ue, X /= ue, this.up.set(I, z, F, U), this.right.set(I, te, ee, X), this.center.set(I, O[0], O[1], O[2]), this.radius.set(I, Math.log(re));
                    var ce = F * X - U * ee, he = U * te - z * X, de = z * ee - F * te, ne = A(ce, he, de), ae = z * $ + F * q + U * K, se = te * $ + ee * q + X * K, me = (ce /= ne) * $ + (he /= ne) * q + (de /= ne) * K, ye = Math.asin(C(ae)), pe = Math.atan2(me, se), be = this.angle._state, Ae = be[be.length - 1], Se = be[be.length - 2];
                    Ae %= 2 * Math.PI;
                    var Me = Math.abs(Ae + 2 * Math.PI - pe), De = Math.abs(Ae - pe), Le = Math.abs(Ae - 2 * Math.PI - pe);
                    Me < De && (Ae += 2 * Math.PI), Le < De && (Ae -= 2 * Math.PI), this.angle.jump(this.angle.lastT(), Ae, Se), this.angle.set(I, pe, ye);
                  }
                }
              }
            };
          }, 5250: function(d) {
            d.exports = function(c, g, m) {
              var x = c * g, w = f * c, k = w - (w - c), S = c - k, A = f * g, C = A - (A - g), D = g - C, L = S * D - (x - k * C - S * C - k * D);
              return m ? (m[0] = L, m[1] = x, m) : [L, x];
            };
            var f = +(Math.pow(2, 27) + 1);
          }, 9362: function(d) {
            d.exports = function(f, c, g) {
              var m = f + c, x = m - f, w = c - x, k = f - (m - x);
              return g ? (g[0] = k + w, g[1] = m, g) : [k + w, m];
            };
          }, 1888: function(d, f, c) {
            var g = c(8828), m = c(1338), x = c(4793).hp;
            c.g.__TYPEDARRAY_POOL || (c.g.__TYPEDARRAY_POOL = { UINT8: m([32, 0]), UINT16: m([32, 0]), UINT32: m([32, 0]), BIGUINT64: m([32, 0]), INT8: m([32, 0]), INT16: m([32, 0]), INT32: m([32, 0]), BIGINT64: m([32, 0]), FLOAT: m([32, 0]), DOUBLE: m([32, 0]), DATA: m([32, 0]), UINT8C: m([32, 0]), BUFFER: m([32, 0]) });
            var w = typeof Uint8ClampedArray < "u", k = typeof BigUint64Array < "u", S = typeof BigInt64Array < "u", A = c.g.__TYPEDARRAY_POOL;
            A.UINT8C || (A.UINT8C = m([32, 0])), A.BIGUINT64 || (A.BIGUINT64 = m([32, 0])), A.BIGINT64 || (A.BIGINT64 = m([32, 0])), A.BUFFER || (A.BUFFER = m([32, 0]));
            var C = A.DATA, D = A.BUFFER;
            function L(Y) {
              if (Y) {
                var te = Y.length || Y.byteLength, ee = g.log2(te);
                C[ee].push(Y);
              }
            }
            function E(Y) {
              Y = g.nextPow2(Y);
              var te = g.log2(Y), ee = C[te];
              return ee.length > 0 ? ee.pop() : new ArrayBuffer(Y);
            }
            function P(Y) {
              return new Uint8Array(E(Y), 0, Y);
            }
            function I(Y) {
              return new Uint16Array(E(2 * Y), 0, Y);
            }
            function M(Y) {
              return new Uint32Array(E(4 * Y), 0, Y);
            }
            function O(Y) {
              return new Int8Array(E(Y), 0, Y);
            }
            function T(Y) {
              return new Int16Array(E(2 * Y), 0, Y);
            }
            function z(Y) {
              return new Int32Array(E(4 * Y), 0, Y);
            }
            function F(Y) {
              return new Float32Array(E(4 * Y), 0, Y);
            }
            function U(Y) {
              return new Float64Array(E(8 * Y), 0, Y);
            }
            function V(Y) {
              return w ? new Uint8ClampedArray(E(Y), 0, Y) : P(Y);
            }
            function $(Y) {
              return k ? new BigUint64Array(E(8 * Y), 0, Y) : null;
            }
            function q(Y) {
              return S ? new BigInt64Array(E(8 * Y), 0, Y) : null;
            }
            function K(Y) {
              return new DataView(E(Y), 0, Y);
            }
            function re(Y) {
              Y = g.nextPow2(Y);
              var te = g.log2(Y), ee = D[te];
              return ee.length > 0 ? ee.pop() : new x(Y);
            }
            f.free = function(Y) {
              if (x.isBuffer(Y)) D[g.log2(Y.length)].push(Y);
              else {
                if (Object.prototype.toString.call(Y) !== "[object ArrayBuffer]" && (Y = Y.buffer), !Y) return;
                var te = Y.length || Y.byteLength, ee = 0 | g.log2(te);
                C[ee].push(Y);
              }
            }, f.freeUint8 = f.freeUint16 = f.freeUint32 = f.freeBigUint64 = f.freeInt8 = f.freeInt16 = f.freeInt32 = f.freeBigInt64 = f.freeFloat32 = f.freeFloat = f.freeFloat64 = f.freeDouble = f.freeUint8Clamped = f.freeDataView = function(Y) {
              L(Y.buffer);
            }, f.freeArrayBuffer = L, f.freeBuffer = function(Y) {
              D[g.log2(Y.length)].push(Y);
            }, f.malloc = function(Y, te) {
              if (te === void 0 || te === "arraybuffer") return E(Y);
              switch (te) {
                case "uint8":
                  return P(Y);
                case "uint16":
                  return I(Y);
                case "uint32":
                  return M(Y);
                case "int8":
                  return O(Y);
                case "int16":
                  return T(Y);
                case "int32":
                  return z(Y);
                case "float":
                case "float32":
                  return F(Y);
                case "double":
                case "float64":
                  return U(Y);
                case "uint8_clamped":
                  return V(Y);
                case "bigint64":
                  return q(Y);
                case "biguint64":
                  return $(Y);
                case "buffer":
                  return re(Y);
                case "data":
                case "dataview":
                  return K(Y);
                default:
                  return null;
              }
              return null;
            }, f.mallocArrayBuffer = E, f.mallocUint8 = P, f.mallocUint16 = I, f.mallocUint32 = M, f.mallocInt8 = O, f.mallocInt16 = T, f.mallocInt32 = z, f.mallocFloat32 = f.mallocFloat = F, f.mallocFloat64 = f.mallocDouble = U, f.mallocUint8Clamped = V, f.mallocBigUint64 = $, f.mallocBigInt64 = q, f.mallocDataView = K, f.mallocBuffer = re, f.clearCache = function() {
              for (var Y = 0; Y < 32; ++Y) A.UINT8[Y].length = 0, A.UINT16[Y].length = 0, A.UINT32[Y].length = 0, A.INT8[Y].length = 0, A.INT16[Y].length = 0, A.INT32[Y].length = 0, A.FLOAT[Y].length = 0, A.DOUBLE[Y].length = 0, A.BIGUINT64[Y].length = 0, A.BIGINT64[Y].length = 0, A.UINT8C[Y].length = 0, C[Y].length = 0, D[Y].length = 0;
            };
          }, 1755: function(d) {
            function f(g) {
              this.roots = new Array(g), this.ranks = new Array(g);
              for (var m = 0; m < g; ++m) this.roots[m] = m, this.ranks[m] = 0;
            }
            d.exports = f;
            var c = f.prototype;
            Object.defineProperty(c, "length", { get: function() {
              return this.roots.length;
            } }), c.makeSet = function() {
              var g = this.roots.length;
              return this.roots.push(g), this.ranks.push(0), g;
            }, c.find = function(g) {
              for (var m = g, x = this.roots; x[g] !== g; ) g = x[g];
              for (; x[m] !== g; ) {
                var w = x[m];
                x[m] = g, m = w;
              }
              return g;
            }, c.link = function(g, m) {
              var x = this.find(g), w = this.find(m);
              if (x !== w) {
                var k = this.ranks, S = this.roots, A = k[x], C = k[w];
                A < C ? S[x] = w : C < A ? S[w] = x : (S[w] = x, ++k[x]);
              }
            };
          }, 1682: function(d) {
            d.exports = function(f, c, g) {
              return f.length === 0 ? f : c ? (g || f.sort(c), function(m, x) {
                for (var w = 1, k = m.length, S = m[0], A = m[0], C = 1; C < k; ++C) if (A = S, x(S = m[C], A)) {
                  if (C === w) {
                    w++;
                    continue;
                  }
                  m[w++] = S;
                }
                return m.length = w, m;
              }(f, c)) : (g || f.sort(), function(m) {
                for (var x = 1, w = m.length, k = m[0], S = m[0], A = 1; A < w; ++A, S = k) if (S = k, (k = m[A]) !== S) {
                  if (A === x) {
                    x++;
                    continue;
                  }
                  m[x++] = k;
                }
                return m.length = x, m;
              }(f));
            };
          }, 4359: function(d, f, c) {
            d.exports = function(w, k) {
              return typeof k == "object" && k !== null || (k = {}), g(w, k.canvas || m, k.context || x, k);
            };
            var g = c(7718), m = null, x = null;
            typeof document < "u" && ((m = document.createElement("canvas")).width = 8192, m.height = 1024, x = m.getContext("2d"));
          }, 7718: function(d, f, c) {
            d.exports = function($, q, K, re) {
              var Y = 64, te = 1.25, ee = { breaklines: !1, bolds: !1, italics: !1, subscripts: !1, superscripts: !1 };
              return re && (re.size && re.size > 0 && (Y = re.size), re.lineSpacing && re.lineSpacing > 0 && (te = re.lineSpacing), re.styletags && re.styletags.breaklines && (ee.breaklines = !!re.styletags.breaklines), re.styletags && re.styletags.bolds && (ee.bolds = !!re.styletags.bolds), re.styletags && re.styletags.italics && (ee.italics = !!re.styletags.italics), re.styletags && re.styletags.subscripts && (ee.subscripts = !!re.styletags.subscripts), re.styletags && re.styletags.superscripts && (ee.superscripts = !!re.styletags.superscripts)), K.font = [re.fontStyle, re.fontVariant, re.fontWeight, Y + "px", re.font].filter(function(X) {
                return X;
              }).join(" "), K.textAlign = "start", K.textBaseline = "alphabetic", K.direction = "ltr", V(function(X, Q, ue, ce, he, de) {
                ue = ue.replace(/\n/g, ""), ue = de.breaklines === !0 ? ue.replace(/\<br\>/g, `
`) : ue.replace(/\<br\>/g, " ");
                var ne = "", ae = [];
                for (pe = 0; pe < ue.length; ++pe) ae[pe] = ne;
                de.bolds === !0 && (ae = z(A, C, ue, ae)), de.italics === !0 && (ae = z(D, L, ue, ae)), de.superscripts === !0 && (ae = z(E, I, ue, ae)), de.subscripts === !0 && (ae = z(M, T, ue, ae));
                var se = [], me = "";
                for (pe = 0; pe < ue.length; ++pe) ae[pe] !== null && (me += ue[pe], se.push(ae[pe]));
                var ye, pe, be, Ae, Se, Me = me.split(`
`), De = Me.length, Le = Math.round(he * ce), We = ce, Ee = 2 * ce, Ne = 0, Ie = De * Le + Ee;
                X.height < Ie && (X.height = Ie), Q.fillStyle = "#000", Q.fillRect(0, 0, X.width, X.height), Q.fillStyle = "#fff";
                var ge = 0, Ce = "";
                function we() {
                  if (Ce !== "") {
                    var $e = Q.measureText(Ce).width;
                    Q.fillText(Ce, We + be, Ee + Ae), be += $e;
                  }
                }
                function Ge() {
                  return Math.round(Se) + "px ";
                }
                function Re($e, Ze) {
                  var ct = "" + Q.font;
                  if (de.subscripts === !0) {
                    var ft = $e.indexOf(O), _t = Ze.indexOf(O), Pt = ft > -1 ? parseInt($e[1 + ft]) : 0, Dt = _t > -1 ? parseInt(Ze[1 + _t]) : 0;
                    Pt !== Dt && (ct = ct.replace(Ge(), "?px "), Se *= Math.pow(0.75, Dt - Pt), ct = ct.replace("?px ", Ge())), Ae += 0.25 * Le * (Dt - Pt);
                  }
                  if (de.superscripts === !0) {
                    var $t = $e.indexOf(P), Gt = Ze.indexOf(P), Wt = $t > -1 ? parseInt($e[1 + $t]) : 0, mt = Gt > -1 ? parseInt(Ze[1 + Gt]) : 0;
                    Wt !== mt && (ct = ct.replace(Ge(), "?px "), Se *= Math.pow(0.75, mt - Wt), ct = ct.replace("?px ", Ge())), Ae -= 0.25 * Le * (mt - Wt);
                  }
                  if (de.bolds === !0) {
                    var at = $e.indexOf(C) > -1, vt = Ze.indexOf(C) > -1;
                    !at && vt && (ct = St ? ct.replace("italic ", "italic bold ") : "bold " + ct), at && !vt && (ct = ct.replace("bold ", ""));
                  }
                  if (de.italics === !0) {
                    var St = $e.indexOf(L) > -1, Je = Ze.indexOf(L) > -1;
                    !St && Je && (ct = "italic " + ct), St && !Je && (ct = ct.replace("italic ", ""));
                  }
                  Q.font = ct;
                }
                for (ye = 0; ye < De; ++ye) {
                  var je = Me[ye] + `
`;
                  for (be = 0, Ae = ye * Le, Se = ce, Ce = "", pe = 0; pe < je.length; ++pe) {
                    var Ke = pe + ge < se.length ? se[pe + ge] : se[se.length - 1];
                    ne === Ke ? Ce += je[pe] : (we(), Ce = je[pe], Ke !== void 0 && (Re(ne, Ke), ne = Ke));
                  }
                  we(), ge += je.length;
                  var tt = 0 | Math.round(be + 2 * We);
                  Ne < tt && (Ne = tt);
                }
                var _e = Ne, Be = Ee + Le * De;
                return m(Q.getImageData(0, 0, _e, Be).data, [Be, _e, 4]).pick(-1, -1, 0).transpose(1, 0);
              }(q, K, $, Y, te, ee), re, Y);
            }, d.exports.processPixels = V;
            var g = c(3711), m = c(9618), x = c(5878), w = c(332), k = c(2538), S = c(2095), A = "b", C = "b|", D = "i", L = "i|", E = "sup", P = "+", I = "+1", M = "sub", O = "-", T = "-1";
            function z($, q, K, re) {
              for (var Y = "<" + $ + ">", te = "</" + $ + ">", ee = Y.length, X = te.length, Q = q[0] === P || q[0] === O, ue = 0, ce = -X; ue > -1 && (ue = K.indexOf(Y, ue)) !== -1 && (ce = K.indexOf(te, ue + ee)) !== -1 && !(ce <= ue); ) {
                for (var he = ue; he < ce + X; ++he) if (he < ue + ee || he >= ce) re[he] = null, K = K.substr(0, he) + " " + K.substr(he + 1);
                else if (re[he] !== null) {
                  var de = re[he].indexOf(q[0]);
                  de === -1 ? re[he] += q : Q && (re[he] = re[he].substr(0, de + 1) + (1 + parseInt(re[he][de + 1])) + re[he].substr(de + 2));
                }
                var ne = ue + ee, ae = K.substr(ne, ce - ne).indexOf(Y);
                ue = ae !== -1 ? ae : ce + X;
              }
              return re;
            }
            function F($, q) {
              var K = g($, 128);
              return q ? x(K.cells, K.positions, 0.25) : { edges: K.cells, positions: K.positions };
            }
            function U($, q, K, re) {
              var Y = F($, re), te = function(ye, pe, be) {
                for (var Ae = pe.textAlign || "start", Se = pe.textBaseline || "alphabetic", Me = [1 << 30, 1 << 30], De = [0, 0], Le = ye.length, We = 0; We < Le; ++We) for (var Ee = ye[We], Ne = 0; Ne < 2; ++Ne) Me[Ne] = 0 | Math.min(Me[Ne], Ee[Ne]), De[Ne] = 0 | Math.max(De[Ne], Ee[Ne]);
                var Ie = 0;
                switch (Ae) {
                  case "center":
                    Ie = -0.5 * (Me[0] + De[0]);
                    break;
                  case "right":
                  case "end":
                    Ie = -De[0];
                    break;
                  case "left":
                  case "start":
                    Ie = -Me[0];
                    break;
                  default:
                    throw new Error("vectorize-text: Unrecognized textAlign: '" + Ae + "'");
                }
                var ge = 0;
                switch (Se) {
                  case "hanging":
                  case "top":
                    ge = -Me[1];
                    break;
                  case "middle":
                    ge = -0.5 * (Me[1] + De[1]);
                    break;
                  case "alphabetic":
                  case "ideographic":
                    ge = -3 * be;
                    break;
                  case "bottom":
                    ge = -De[1];
                    break;
                  default:
                    throw new Error("vectorize-text: Unrecoginized textBaseline: '" + Se + "'");
                }
                var Ce = 1 / be;
                return "lineHeight" in pe ? Ce *= +pe.lineHeight : "width" in pe ? Ce = pe.width / (De[0] - Me[0]) : "height" in pe && (Ce = pe.height / (De[1] - Me[1])), ye.map(function(we) {
                  return [Ce * (we[0] + Ie), Ce * (we[1] + ge)];
                });
              }(Y.positions, q, K), ee = Y.edges, X = q.orientation === "ccw";
              if (w(te, ee), q.polygons || q.polygon || q.polyline) {
                for (var Q = S(ee, te), ue = new Array(Q.length), ce = 0; ce < Q.length; ++ce) {
                  for (var he = Q[ce], de = new Array(he.length), ne = 0; ne < he.length; ++ne) {
                    for (var ae = he[ne], se = new Array(ae.length), me = 0; me < ae.length; ++me) se[me] = te[ae[me]].slice();
                    X && se.reverse(), de[ne] = se;
                  }
                  ue[ce] = de;
                }
                return ue;
              }
              return q.triangles || q.triangulate || q.triangle ? { cells: k(te, ee, { delaunay: !1, exterior: !1, interior: !0 }), positions: te } : { edges: ee, positions: te };
            }
            function V($, q, K) {
              try {
                return U($, q, K, !0);
              } catch {
              }
              try {
                return U($, q, K, !1);
              } catch {
              }
              return q.polygons || q.polyline || q.polygon ? [] : q.triangles || q.triangulate || q.triangle ? { cells: [], positions: [] } : { edges: [], positions: [] };
            }
          }, 1538: function(d) {
            (function() {
              if (typeof ses > "u" || !ses.ok || ses.ok()) {
                typeof ses < "u" && (ses.weakMapPermitHostObjects = M);
                var f = !1;
                if (typeof WeakMap == "function") {
                  var c = WeakMap;
                  if (!(typeof navigator < "u" && /Firefox/.test(navigator.userAgent))) {
                    var g = new c(), m = Object.freeze({});
                    if (g.set(m, 1), g.get(m) === 1) return void (d.exports = WeakMap);
                    f = !0;
                  }
                }
                var x = Object.getOwnPropertyNames, w = Object.defineProperty, k = Object.isExtensible, S = "weakmap:", A = S + "ident:" + Math.random() + "___";
                if (typeof crypto < "u" && typeof crypto.getRandomValues == "function" && typeof ArrayBuffer == "function" && typeof Uint8Array == "function") {
                  var C = new ArrayBuffer(25), D = new Uint8Array(C);
                  crypto.getRandomValues(D), A = S + "rand:" + Array.prototype.map.call(D, function(U) {
                    return (U % 36).toString(36);
                  }).join("") + "___";
                }
                if (w(Object, "getOwnPropertyNames", { value: function(U) {
                  return x(U).filter(O);
                } }), "getPropertyNames" in Object) {
                  var L = Object.getPropertyNames;
                  w(Object, "getPropertyNames", { value: function(U) {
                    return L(U).filter(O);
                  } });
                }
                (function() {
                  var U = Object.freeze;
                  w(Object, "freeze", { value: function(q) {
                    return T(q), U(q);
                  } });
                  var V = Object.seal;
                  w(Object, "seal", { value: function(q) {
                    return T(q), V(q);
                  } });
                  var $ = Object.preventExtensions;
                  w(Object, "preventExtensions", { value: function(q) {
                    return T(q), $(q);
                  } });
                })();
                var E = !1, P = 0, I = function() {
                  this instanceof I || F();
                  var U = [], V = [], $ = P++;
                  return Object.create(I.prototype, { get___: { value: z(function(q, K) {
                    var re, Y = T(q);
                    return Y ? $ in Y ? Y[$] : K : (re = U.indexOf(q)) >= 0 ? V[re] : K;
                  }) }, has___: { value: z(function(q) {
                    var K = T(q);
                    return K ? $ in K : U.indexOf(q) >= 0;
                  }) }, set___: { value: z(function(q, K) {
                    var re, Y = T(q);
                    return Y ? Y[$] = K : (re = U.indexOf(q)) >= 0 ? V[re] = K : (re = U.length, V[re] = K, U[re] = q), this;
                  }) }, delete___: { value: z(function(q) {
                    var K, re, Y = T(q);
                    return Y ? $ in Y && delete Y[$] : !((K = U.indexOf(q)) < 0 || (re = U.length - 1, U[K] = void 0, V[K] = V[re], U[K] = U[re], U.length = re, V.length = re, 0));
                  }) } });
                };
                I.prototype = Object.create(Object.prototype, { get: { value: function(U, V) {
                  return this.get___(U, V);
                }, writable: !0, configurable: !0 }, has: { value: function(U) {
                  return this.has___(U);
                }, writable: !0, configurable: !0 }, set: { value: function(U, V) {
                  return this.set___(U, V);
                }, writable: !0, configurable: !0 }, delete: { value: function(U) {
                  return this.delete___(U);
                }, writable: !0, configurable: !0 } }), typeof c == "function" ? function() {
                  function U() {
                    this instanceof I || F();
                    var V, $ = new c(), q = void 0, K = !1;
                    return V = f ? function(re, Y) {
                      return $.set(re, Y), $.has(re) || (q || (q = new I()), q.set(re, Y)), this;
                    } : function(re, Y) {
                      if (K) try {
                        $.set(re, Y);
                      } catch {
                        q || (q = new I()), q.set___(re, Y);
                      }
                      else $.set(re, Y);
                      return this;
                    }, Object.create(I.prototype, { get___: { value: z(function(re, Y) {
                      return q ? $.has(re) ? $.get(re) : q.get___(re, Y) : $.get(re, Y);
                    }) }, has___: { value: z(function(re) {
                      return $.has(re) || !!q && q.has___(re);
                    }) }, set___: { value: z(V) }, delete___: { value: z(function(re) {
                      var Y = !!$.delete(re);
                      return q && q.delete___(re) || Y;
                    }) }, permitHostObjects___: { value: z(function(re) {
                      if (re !== M) throw new Error("bogus call to permitHostObjects___");
                      K = !0;
                    }) } });
                  }
                  f && typeof Proxy < "u" && (Proxy = void 0), U.prototype = I.prototype, d.exports = U, Object.defineProperty(WeakMap.prototype, "constructor", { value: WeakMap, enumerable: !1, configurable: !0, writable: !0 });
                }() : (typeof Proxy < "u" && (Proxy = void 0), d.exports = I);
              }
              function M(U) {
                U.permitHostObjects___ && U.permitHostObjects___(M);
              }
              function O(U) {
                return !(U.substr(0, 8) == S && U.substr(U.length - 3) === "___");
              }
              function T(U) {
                if (U !== Object(U)) throw new TypeError("Not an object: " + U);
                var V = U[A];
                if (V && V.key === U) return V;
                if (k(U)) {
                  V = { key: U };
                  try {
                    return w(U, A, { value: V, writable: !1, enumerable: !1, configurable: !1 }), V;
                  } catch {
                    return;
                  }
                }
              }
              function z(U) {
                return U.prototype = null, Object.freeze(U);
              }
              function F() {
                E || typeof console > "u" || (E = !0, console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."));
              }
            })();
          }, 236: function(d, f, c) {
            var g = c(8284);
            d.exports = function() {
              var m = {};
              return function(x) {
                if ((typeof x != "object" || x === null) && typeof x != "function") throw new Error("Weakmap-shim: Key must be object");
                var w = x.valueOf(m);
                return w && w.identity === m ? w : g(x, m);
              };
            };
          }, 8284: function(d) {
            d.exports = function(f, c) {
              var g = { identity: c }, m = f.valueOf;
              return Object.defineProperty(f, "valueOf", { value: function(x) {
                return x !== c ? m.apply(this, arguments) : g;
              }, writable: !0 }), g;
            };
          }, 606: function(d, f, c) {
            var g = c(236);
            d.exports = function() {
              var m = g();
              return { get: function(x, w) {
                var k = m(x);
                return k.hasOwnProperty("value") ? k.value : w;
              }, set: function(x, w) {
                return m(x).value = w, this;
              }, has: function(x) {
                return "value" in m(x);
              }, delete: function(x) {
                return delete m(x).value;
              } };
            };
          }, 3349: function(d) {
            d.exports = /* @__PURE__ */ function(f) {
              var c = {};
              return function(g, m, x) {
                var w = g.dtype, k = g.order, S = [w, k.join()].join(), A = c[S];
                return A || (c[S] = A = f([w, k])), A(g.shape.slice(0), g.data, g.stride, 0 | g.offset, m, x);
              };
            }((function() {
              return function(f, c, g, m, x, w) {
                var k = f[0], S = g[0], A = [0], C = S;
                m |= 0;
                var D = 0, L = S;
                for (D = 0; D < k; ++D) {
                  var E = c[m] - w, P = c[m + C] - w;
                  E >= 0 != P >= 0 && x.push(A[0] + 0.5 + 0.5 * (E + P) / (E - P)), m += L, ++A[0];
                }
              };
            }).bind(void 0, { funcName: "zeroCrossings" }));
          }, 781: function(d, f, c) {
            d.exports = function(m, x) {
              var w = [];
              return x = +x || 0, g(m.hi(m.shape[0] - 1), w, x), w;
            };
            var g = c(3349);
          }, 7790: function() {
          } }, h = {};
          function p(d) {
            var f = h[d];
            if (f !== void 0) return f.exports;
            var c = h[d] = { id: d, loaded: !1, exports: {} };
            return i[d].call(c.exports, c, c.exports, p), c.loaded = !0, c.exports;
          }
          p.g = function() {
            if (typeof globalThis == "object") return globalThis;
            try {
              return this || new Function("return this")();
            } catch {
              if (typeof window == "object") return window;
            }
          }(), p.nmd = function(d) {
            return d.paths = [], d.children || (d.children = []), d;
          };
          var _ = p(1964);
          o.exports = _;
        })();
      }, 45708: function(o, s, n) {
        function l(ge, Ce) {
          for (var we = 0; we < Ce.length; we++) {
            var Ge = Ce[we];
            Ge.enumerable = Ge.enumerable || !1, Ge.configurable = !0, "value" in Ge && (Ge.writable = !0), Object.defineProperty(ge, u(Ge.key), Ge);
          }
        }
        function u(ge) {
          var Ce = function(we, Ge) {
            if (d(we) != "object" || !we) return we;
            var Re = we[Symbol.toPrimitive];
            if (Re !== void 0) {
              var je = Re.call(we, "string");
              if (d(je) != "object") return je;
              throw new TypeError("@@toPrimitive must return a primitive value.");
            }
            return String(we);
          }(ge);
          return d(Ce) == "symbol" ? Ce : Ce + "";
        }
        function i() {
          try {
            var ge = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
            }));
          } catch {
          }
          return (i = function() {
            return !!ge;
          })();
        }
        function h(ge) {
          return h = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(Ce) {
            return Ce.__proto__ || Object.getPrototypeOf(Ce);
          }, h(ge);
        }
        function p(ge) {
          if (ge === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
          return ge;
        }
        function _(ge, Ce) {
          return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(we, Ge) {
            return we.__proto__ = Ge, we;
          }, _(ge, Ce);
        }
        function d(ge) {
          return d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ce) {
            return typeof Ce;
          } : function(Ce) {
            return Ce && typeof Symbol == "function" && Ce.constructor === Symbol && Ce !== Symbol.prototype ? "symbol" : typeof Ce;
          }, d(ge);
        }
        var f = n(76226), c = n(27415), g = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
        s.Buffer = w, s.SlowBuffer = function(ge) {
          return +ge != ge && (ge = 0), w.alloc(+ge);
        }, s.INSPECT_MAX_BYTES = 50;
        var m = 2147483647;
        function x(ge) {
          if (ge > m) throw new RangeError('The value "' + ge + '" is invalid for option "size"');
          var Ce = new Uint8Array(ge);
          return Object.setPrototypeOf(Ce, w.prototype), Ce;
        }
        function w(ge, Ce, we) {
          if (typeof ge == "number") {
            if (typeof Ce == "string") throw new TypeError('The "string" argument must be of type string. Received type number');
            return A(ge);
          }
          return k(ge, Ce, we);
        }
        function k(ge, Ce, we) {
          if (typeof ge == "string") return function(je, Ke) {
            if (typeof Ke == "string" && Ke !== "" || (Ke = "utf8"), !w.isEncoding(Ke)) throw new TypeError("Unknown encoding: " + Ke);
            var tt = 0 | E(je, Ke), _e = x(tt), Be = _e.write(je, Ke);
            return Be !== tt && (_e = _e.slice(0, Be)), _e;
          }(ge, Ce);
          if (ArrayBuffer.isView(ge)) return function(je) {
            if (Le(je, Uint8Array)) {
              var Ke = new Uint8Array(je);
              return D(Ke.buffer, Ke.byteOffset, Ke.byteLength);
            }
            return C(je);
          }(ge);
          if (ge == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + d(ge));
          if (Le(ge, ArrayBuffer) || ge && Le(ge.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Le(ge, SharedArrayBuffer) || ge && Le(ge.buffer, SharedArrayBuffer))) return D(ge, Ce, we);
          if (typeof ge == "number") throw new TypeError('The "value" argument must not be of type number. Received type number');
          var Ge = ge.valueOf && ge.valueOf();
          if (Ge != null && Ge !== ge) return w.from(Ge, Ce, we);
          var Re = function(je) {
            if (w.isBuffer(je)) {
              var Ke = 0 | L(je.length), tt = x(Ke);
              return tt.length === 0 || je.copy(tt, 0, 0, Ke), tt;
            }
            return je.length !== void 0 ? typeof je.length != "number" || We(je.length) ? x(0) : C(je) : je.type === "Buffer" && Array.isArray(je.data) ? C(je.data) : void 0;
          }(ge);
          if (Re) return Re;
          if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof ge[Symbol.toPrimitive] == "function") return w.from(ge[Symbol.toPrimitive]("string"), Ce, we);
          throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + d(ge));
        }
        function S(ge) {
          if (typeof ge != "number") throw new TypeError('"size" argument must be of type number');
          if (ge < 0) throw new RangeError('The value "' + ge + '" is invalid for option "size"');
        }
        function A(ge) {
          return S(ge), x(ge < 0 ? 0 : 0 | L(ge));
        }
        function C(ge) {
          for (var Ce = ge.length < 0 ? 0 : 0 | L(ge.length), we = x(Ce), Ge = 0; Ge < Ce; Ge += 1) we[Ge] = 255 & ge[Ge];
          return we;
        }
        function D(ge, Ce, we) {
          if (Ce < 0 || ge.byteLength < Ce) throw new RangeError('"offset" is outside of buffer bounds');
          if (ge.byteLength < Ce + (we || 0)) throw new RangeError('"length" is outside of buffer bounds');
          var Ge;
          return Ge = Ce === void 0 && we === void 0 ? new Uint8Array(ge) : we === void 0 ? new Uint8Array(ge, Ce) : new Uint8Array(ge, Ce, we), Object.setPrototypeOf(Ge, w.prototype), Ge;
        }
        function L(ge) {
          if (ge >= m) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + m.toString(16) + " bytes");
          return 0 | ge;
        }
        function E(ge, Ce) {
          if (w.isBuffer(ge)) return ge.length;
          if (ArrayBuffer.isView(ge) || Le(ge, ArrayBuffer)) return ge.byteLength;
          if (typeof ge != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + d(ge));
          var we = ge.length, Ge = arguments.length > 2 && arguments[2] === !0;
          if (!Ge && we === 0) return 0;
          for (var Re = !1; ; ) switch (Ce) {
            case "ascii":
            case "latin1":
            case "binary":
              return we;
            case "utf8":
            case "utf-8":
              return Se(ge).length;
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return 2 * we;
            case "hex":
              return we >>> 1;
            case "base64":
              return Me(ge).length;
            default:
              if (Re) return Ge ? -1 : Se(ge).length;
              Ce = ("" + Ce).toLowerCase(), Re = !0;
          }
        }
        function P(ge, Ce, we) {
          var Ge = !1;
          if ((Ce === void 0 || Ce < 0) && (Ce = 0), Ce > this.length || ((we === void 0 || we > this.length) && (we = this.length), we <= 0) || (we >>>= 0) <= (Ce >>>= 0)) return "";
          for (ge || (ge = "utf8"); ; ) switch (ge) {
            case "hex":
              return te(this, Ce, we);
            case "utf8":
            case "utf-8":
              return q(this, Ce, we);
            case "ascii":
              return re(this, Ce, we);
            case "latin1":
            case "binary":
              return Y(this, Ce, we);
            case "base64":
              return $(this, Ce, we);
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return ee(this, Ce, we);
            default:
              if (Ge) throw new TypeError("Unknown encoding: " + ge);
              ge = (ge + "").toLowerCase(), Ge = !0;
          }
        }
        function I(ge, Ce, we) {
          var Ge = ge[Ce];
          ge[Ce] = ge[we], ge[we] = Ge;
        }
        function M(ge, Ce, we, Ge, Re) {
          if (ge.length === 0) return -1;
          if (typeof we == "string" ? (Ge = we, we = 0) : we > 2147483647 ? we = 2147483647 : we < -2147483648 && (we = -2147483648), We(we = +we) && (we = Re ? 0 : ge.length - 1), we < 0 && (we = ge.length + we), we >= ge.length) {
            if (Re) return -1;
            we = ge.length - 1;
          } else if (we < 0) {
            if (!Re) return -1;
            we = 0;
          }
          if (typeof Ce == "string" && (Ce = w.from(Ce, Ge)), w.isBuffer(Ce)) return Ce.length === 0 ? -1 : O(ge, Ce, we, Ge, Re);
          if (typeof Ce == "number") return Ce &= 255, typeof Uint8Array.prototype.indexOf == "function" ? Re ? Uint8Array.prototype.indexOf.call(ge, Ce, we) : Uint8Array.prototype.lastIndexOf.call(ge, Ce, we) : O(ge, [Ce], we, Ge, Re);
          throw new TypeError("val must be string, number or Buffer");
        }
        function O(ge, Ce, we, Ge, Re) {
          var je, Ke = 1, tt = ge.length, _e = Ce.length;
          if (Ge !== void 0 && ((Ge = String(Ge).toLowerCase()) === "ucs2" || Ge === "ucs-2" || Ge === "utf16le" || Ge === "utf-16le")) {
            if (ge.length < 2 || Ce.length < 2) return -1;
            Ke = 2, tt /= 2, _e /= 2, we /= 2;
          }
          function Be(ft, _t) {
            return Ke === 1 ? ft[_t] : ft.readUInt16BE(_t * Ke);
          }
          if (Re) {
            var $e = -1;
            for (je = we; je < tt; je++) if (Be(ge, je) === Be(Ce, $e === -1 ? 0 : je - $e)) {
              if ($e === -1 && ($e = je), je - $e + 1 === _e) return $e * Ke;
            } else $e !== -1 && (je -= je - $e), $e = -1;
          } else for (we + _e > tt && (we = tt - _e), je = we; je >= 0; je--) {
            for (var Ze = !0, ct = 0; ct < _e; ct++) if (Be(ge, je + ct) !== Be(Ce, ct)) {
              Ze = !1;
              break;
            }
            if (Ze) return je;
          }
          return -1;
        }
        function T(ge, Ce, we, Ge) {
          we = Number(we) || 0;
          var Re = ge.length - we;
          Ge ? (Ge = Number(Ge)) > Re && (Ge = Re) : Ge = Re;
          var je, Ke = Ce.length;
          for (Ge > Ke / 2 && (Ge = Ke / 2), je = 0; je < Ge; ++je) {
            var tt = parseInt(Ce.substr(2 * je, 2), 16);
            if (We(tt)) return je;
            ge[we + je] = tt;
          }
          return je;
        }
        function z(ge, Ce, we, Ge) {
          return De(Se(Ce, ge.length - we), ge, we, Ge);
        }
        function F(ge, Ce, we, Ge) {
          return De(function(Re) {
            for (var je = [], Ke = 0; Ke < Re.length; ++Ke) je.push(255 & Re.charCodeAt(Ke));
            return je;
          }(Ce), ge, we, Ge);
        }
        function U(ge, Ce, we, Ge) {
          return De(Me(Ce), ge, we, Ge);
        }
        function V(ge, Ce, we, Ge) {
          return De(function(Re, je) {
            for (var Ke, tt, _e, Be = [], $e = 0; $e < Re.length && !((je -= 2) < 0); ++$e) tt = (Ke = Re.charCodeAt($e)) >> 8, _e = Ke % 256, Be.push(_e), Be.push(tt);
            return Be;
          }(Ce, ge.length - we), ge, we, Ge);
        }
        function $(ge, Ce, we) {
          return Ce === 0 && we === ge.length ? f.fromByteArray(ge) : f.fromByteArray(ge.slice(Ce, we));
        }
        function q(ge, Ce, we) {
          we = Math.min(ge.length, we);
          for (var Ge = [], Re = Ce; Re < we; ) {
            var je = ge[Re], Ke = null, tt = je > 239 ? 4 : je > 223 ? 3 : je > 191 ? 2 : 1;
            if (Re + tt <= we) {
              var _e = void 0, Be = void 0, $e = void 0, Ze = void 0;
              switch (tt) {
                case 1:
                  je < 128 && (Ke = je);
                  break;
                case 2:
                  (192 & (_e = ge[Re + 1])) == 128 && (Ze = (31 & je) << 6 | 63 & _e) > 127 && (Ke = Ze);
                  break;
                case 3:
                  _e = ge[Re + 1], Be = ge[Re + 2], (192 & _e) == 128 && (192 & Be) == 128 && (Ze = (15 & je) << 12 | (63 & _e) << 6 | 63 & Be) > 2047 && (Ze < 55296 || Ze > 57343) && (Ke = Ze);
                  break;
                case 4:
                  _e = ge[Re + 1], Be = ge[Re + 2], $e = ge[Re + 3], (192 & _e) == 128 && (192 & Be) == 128 && (192 & $e) == 128 && (Ze = (15 & je) << 18 | (63 & _e) << 12 | (63 & Be) << 6 | 63 & $e) > 65535 && Ze < 1114112 && (Ke = Ze);
              }
            }
            Ke === null ? (Ke = 65533, tt = 1) : Ke > 65535 && (Ke -= 65536, Ge.push(Ke >>> 10 & 1023 | 55296), Ke = 56320 | 1023 & Ke), Ge.push(Ke), Re += tt;
          }
          return function(ct) {
            var ft = ct.length;
            if (ft <= K) return String.fromCharCode.apply(String, ct);
            for (var _t = "", Pt = 0; Pt < ft; ) _t += String.fromCharCode.apply(String, ct.slice(Pt, Pt += K));
            return _t;
          }(Ge);
        }
        s.kMaxLength = m, w.TYPED_ARRAY_SUPPORT = function() {
          try {
            var ge = new Uint8Array(1), Ce = { foo: function() {
              return 42;
            } };
            return Object.setPrototypeOf(Ce, Uint8Array.prototype), Object.setPrototypeOf(ge, Ce), ge.foo() === 42;
          } catch {
            return !1;
          }
        }(), w.TYPED_ARRAY_SUPPORT || typeof console > "u" || typeof console.error != "function" || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."), Object.defineProperty(w.prototype, "parent", { enumerable: !0, get: function() {
          if (w.isBuffer(this)) return this.buffer;
        } }), Object.defineProperty(w.prototype, "offset", { enumerable: !0, get: function() {
          if (w.isBuffer(this)) return this.byteOffset;
        } }), w.poolSize = 8192, w.from = function(ge, Ce, we) {
          return k(ge, Ce, we);
        }, Object.setPrototypeOf(w.prototype, Uint8Array.prototype), Object.setPrototypeOf(w, Uint8Array), w.alloc = function(ge, Ce, we) {
          return function(Ge, Re, je) {
            return S(Ge), Ge <= 0 ? x(Ge) : Re !== void 0 ? typeof je == "string" ? x(Ge).fill(Re, je) : x(Ge).fill(Re) : x(Ge);
          }(ge, Ce, we);
        }, w.allocUnsafe = function(ge) {
          return A(ge);
        }, w.allocUnsafeSlow = function(ge) {
          return A(ge);
        }, w.isBuffer = function(ge) {
          return ge != null && ge._isBuffer === !0 && ge !== w.prototype;
        }, w.compare = function(ge, Ce) {
          if (Le(ge, Uint8Array) && (ge = w.from(ge, ge.offset, ge.byteLength)), Le(Ce, Uint8Array) && (Ce = w.from(Ce, Ce.offset, Ce.byteLength)), !w.isBuffer(ge) || !w.isBuffer(Ce)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
          if (ge === Ce) return 0;
          for (var we = ge.length, Ge = Ce.length, Re = 0, je = Math.min(we, Ge); Re < je; ++Re) if (ge[Re] !== Ce[Re]) {
            we = ge[Re], Ge = Ce[Re];
            break;
          }
          return we < Ge ? -1 : Ge < we ? 1 : 0;
        }, w.isEncoding = function(ge) {
          switch (String(ge).toLowerCase()) {
            case "hex":
            case "utf8":
            case "utf-8":
            case "ascii":
            case "latin1":
            case "binary":
            case "base64":
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return !0;
            default:
              return !1;
          }
        }, w.concat = function(ge, Ce) {
          if (!Array.isArray(ge)) throw new TypeError('"list" argument must be an Array of Buffers');
          if (ge.length === 0) return w.alloc(0);
          var we;
          if (Ce === void 0) for (Ce = 0, we = 0; we < ge.length; ++we) Ce += ge[we].length;
          var Ge = w.allocUnsafe(Ce), Re = 0;
          for (we = 0; we < ge.length; ++we) {
            var je = ge[we];
            if (Le(je, Uint8Array)) Re + je.length > Ge.length ? (w.isBuffer(je) || (je = w.from(je)), je.copy(Ge, Re)) : Uint8Array.prototype.set.call(Ge, je, Re);
            else {
              if (!w.isBuffer(je)) throw new TypeError('"list" argument must be an Array of Buffers');
              je.copy(Ge, Re);
            }
            Re += je.length;
          }
          return Ge;
        }, w.byteLength = E, w.prototype._isBuffer = !0, w.prototype.swap16 = function() {
          var ge = this.length;
          if (ge % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
          for (var Ce = 0; Ce < ge; Ce += 2) I(this, Ce, Ce + 1);
          return this;
        }, w.prototype.swap32 = function() {
          var ge = this.length;
          if (ge % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
          for (var Ce = 0; Ce < ge; Ce += 4) I(this, Ce, Ce + 3), I(this, Ce + 1, Ce + 2);
          return this;
        }, w.prototype.swap64 = function() {
          var ge = this.length;
          if (ge % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
          for (var Ce = 0; Ce < ge; Ce += 8) I(this, Ce, Ce + 7), I(this, Ce + 1, Ce + 6), I(this, Ce + 2, Ce + 5), I(this, Ce + 3, Ce + 4);
          return this;
        }, w.prototype.toString = function() {
          var ge = this.length;
          return ge === 0 ? "" : arguments.length === 0 ? q(this, 0, ge) : P.apply(this, arguments);
        }, w.prototype.toLocaleString = w.prototype.toString, w.prototype.equals = function(ge) {
          if (!w.isBuffer(ge)) throw new TypeError("Argument must be a Buffer");
          return this === ge || w.compare(this, ge) === 0;
        }, w.prototype.inspect = function() {
          var ge = "", Ce = s.INSPECT_MAX_BYTES;
          return ge = this.toString("hex", 0, Ce).replace(/(.{2})/g, "$1 ").trim(), this.length > Ce && (ge += " ... "), "<Buffer " + ge + ">";
        }, g && (w.prototype[g] = w.prototype.inspect), w.prototype.compare = function(ge, Ce, we, Ge, Re) {
          if (Le(ge, Uint8Array) && (ge = w.from(ge, ge.offset, ge.byteLength)), !w.isBuffer(ge)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + d(ge));
          if (Ce === void 0 && (Ce = 0), we === void 0 && (we = ge ? ge.length : 0), Ge === void 0 && (Ge = 0), Re === void 0 && (Re = this.length), Ce < 0 || we > ge.length || Ge < 0 || Re > this.length) throw new RangeError("out of range index");
          if (Ge >= Re && Ce >= we) return 0;
          if (Ge >= Re) return -1;
          if (Ce >= we) return 1;
          if (this === ge) return 0;
          for (var je = (Re >>>= 0) - (Ge >>>= 0), Ke = (we >>>= 0) - (Ce >>>= 0), tt = Math.min(je, Ke), _e = this.slice(Ge, Re), Be = ge.slice(Ce, we), $e = 0; $e < tt; ++$e) if (_e[$e] !== Be[$e]) {
            je = _e[$e], Ke = Be[$e];
            break;
          }
          return je < Ke ? -1 : Ke < je ? 1 : 0;
        }, w.prototype.includes = function(ge, Ce, we) {
          return this.indexOf(ge, Ce, we) !== -1;
        }, w.prototype.indexOf = function(ge, Ce, we) {
          return M(this, ge, Ce, we, !0);
        }, w.prototype.lastIndexOf = function(ge, Ce, we) {
          return M(this, ge, Ce, we, !1);
        }, w.prototype.write = function(ge, Ce, we, Ge) {
          if (Ce === void 0) Ge = "utf8", we = this.length, Ce = 0;
          else if (we === void 0 && typeof Ce == "string") Ge = Ce, we = this.length, Ce = 0;
          else {
            if (!isFinite(Ce)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
            Ce >>>= 0, isFinite(we) ? (we >>>= 0, Ge === void 0 && (Ge = "utf8")) : (Ge = we, we = void 0);
          }
          var Re = this.length - Ce;
          if ((we === void 0 || we > Re) && (we = Re), ge.length > 0 && (we < 0 || Ce < 0) || Ce > this.length) throw new RangeError("Attempt to write outside buffer bounds");
          Ge || (Ge = "utf8");
          for (var je = !1; ; ) switch (Ge) {
            case "hex":
              return T(this, ge, Ce, we);
            case "utf8":
            case "utf-8":
              return z(this, ge, Ce, we);
            case "ascii":
            case "latin1":
            case "binary":
              return F(this, ge, Ce, we);
            case "base64":
              return U(this, ge, Ce, we);
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return V(this, ge, Ce, we);
            default:
              if (je) throw new TypeError("Unknown encoding: " + Ge);
              Ge = ("" + Ge).toLowerCase(), je = !0;
          }
        }, w.prototype.toJSON = function() {
          return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
        };
        var K = 4096;
        function re(ge, Ce, we) {
          var Ge = "";
          we = Math.min(ge.length, we);
          for (var Re = Ce; Re < we; ++Re) Ge += String.fromCharCode(127 & ge[Re]);
          return Ge;
        }
        function Y(ge, Ce, we) {
          var Ge = "";
          we = Math.min(ge.length, we);
          for (var Re = Ce; Re < we; ++Re) Ge += String.fromCharCode(ge[Re]);
          return Ge;
        }
        function te(ge, Ce, we) {
          var Ge = ge.length;
          (!Ce || Ce < 0) && (Ce = 0), (!we || we < 0 || we > Ge) && (we = Ge);
          for (var Re = "", je = Ce; je < we; ++je) Re += Ee[ge[je]];
          return Re;
        }
        function ee(ge, Ce, we) {
          for (var Ge = ge.slice(Ce, we), Re = "", je = 0; je < Ge.length - 1; je += 2) Re += String.fromCharCode(Ge[je] + 256 * Ge[je + 1]);
          return Re;
        }
        function X(ge, Ce, we) {
          if (ge % 1 != 0 || ge < 0) throw new RangeError("offset is not uint");
          if (ge + Ce > we) throw new RangeError("Trying to access beyond buffer length");
        }
        function Q(ge, Ce, we, Ge, Re, je) {
          if (!w.isBuffer(ge)) throw new TypeError('"buffer" argument must be a Buffer instance');
          if (Ce > Re || Ce < je) throw new RangeError('"value" argument is out of bounds');
          if (we + Ge > ge.length) throw new RangeError("Index out of range");
        }
        function ue(ge, Ce, we, Ge, Re) {
          ye(Ce, Ge, Re, ge, we, 7);
          var je = Number(Ce & BigInt(4294967295));
          ge[we++] = je, je >>= 8, ge[we++] = je, je >>= 8, ge[we++] = je, je >>= 8, ge[we++] = je;
          var Ke = Number(Ce >> BigInt(32) & BigInt(4294967295));
          return ge[we++] = Ke, Ke >>= 8, ge[we++] = Ke, Ke >>= 8, ge[we++] = Ke, Ke >>= 8, ge[we++] = Ke, we;
        }
        function ce(ge, Ce, we, Ge, Re) {
          ye(Ce, Ge, Re, ge, we, 7);
          var je = Number(Ce & BigInt(4294967295));
          ge[we + 7] = je, je >>= 8, ge[we + 6] = je, je >>= 8, ge[we + 5] = je, je >>= 8, ge[we + 4] = je;
          var Ke = Number(Ce >> BigInt(32) & BigInt(4294967295));
          return ge[we + 3] = Ke, Ke >>= 8, ge[we + 2] = Ke, Ke >>= 8, ge[we + 1] = Ke, Ke >>= 8, ge[we] = Ke, we + 8;
        }
        function he(ge, Ce, we, Ge, Re, je) {
          if (we + Ge > ge.length) throw new RangeError("Index out of range");
          if (we < 0) throw new RangeError("Index out of range");
        }
        function de(ge, Ce, we, Ge, Re) {
          return Ce = +Ce, we >>>= 0, Re || he(ge, 0, we, 4), c.write(ge, Ce, we, Ge, 23, 4), we + 4;
        }
        function ne(ge, Ce, we, Ge, Re) {
          return Ce = +Ce, we >>>= 0, Re || he(ge, 0, we, 8), c.write(ge, Ce, we, Ge, 52, 8), we + 8;
        }
        w.prototype.slice = function(ge, Ce) {
          var we = this.length;
          (ge = ~~ge) < 0 ? (ge += we) < 0 && (ge = 0) : ge > we && (ge = we), (Ce = Ce === void 0 ? we : ~~Ce) < 0 ? (Ce += we) < 0 && (Ce = 0) : Ce > we && (Ce = we), Ce < ge && (Ce = ge);
          var Ge = this.subarray(ge, Ce);
          return Object.setPrototypeOf(Ge, w.prototype), Ge;
        }, w.prototype.readUintLE = w.prototype.readUIntLE = function(ge, Ce, we) {
          ge >>>= 0, Ce >>>= 0, we || X(ge, Ce, this.length);
          for (var Ge = this[ge], Re = 1, je = 0; ++je < Ce && (Re *= 256); ) Ge += this[ge + je] * Re;
          return Ge;
        }, w.prototype.readUintBE = w.prototype.readUIntBE = function(ge, Ce, we) {
          ge >>>= 0, Ce >>>= 0, we || X(ge, Ce, this.length);
          for (var Ge = this[ge + --Ce], Re = 1; Ce > 0 && (Re *= 256); ) Ge += this[ge + --Ce] * Re;
          return Ge;
        }, w.prototype.readUint8 = w.prototype.readUInt8 = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 1, this.length), this[ge];
        }, w.prototype.readUint16LE = w.prototype.readUInt16LE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 2, this.length), this[ge] | this[ge + 1] << 8;
        }, w.prototype.readUint16BE = w.prototype.readUInt16BE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 2, this.length), this[ge] << 8 | this[ge + 1];
        }, w.prototype.readUint32LE = w.prototype.readUInt32LE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), (this[ge] | this[ge + 1] << 8 | this[ge + 2] << 16) + 16777216 * this[ge + 3];
        }, w.prototype.readUint32BE = w.prototype.readUInt32BE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), 16777216 * this[ge] + (this[ge + 1] << 16 | this[ge + 2] << 8 | this[ge + 3]);
        }, w.prototype.readBigUInt64LE = Ne(function(ge) {
          pe(ge >>>= 0, "offset");
          var Ce = this[ge], we = this[ge + 7];
          Ce !== void 0 && we !== void 0 || be(ge, this.length - 8);
          var Ge = Ce + this[++ge] * Math.pow(2, 8) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 24), Re = this[++ge] + this[++ge] * Math.pow(2, 8) + this[++ge] * Math.pow(2, 16) + we * Math.pow(2, 24);
          return BigInt(Ge) + (BigInt(Re) << BigInt(32));
        }), w.prototype.readBigUInt64BE = Ne(function(ge) {
          pe(ge >>>= 0, "offset");
          var Ce = this[ge], we = this[ge + 7];
          Ce !== void 0 && we !== void 0 || be(ge, this.length - 8);
          var Ge = Ce * Math.pow(2, 24) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 8) + this[++ge], Re = this[++ge] * Math.pow(2, 24) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 8) + we;
          return (BigInt(Ge) << BigInt(32)) + BigInt(Re);
        }), w.prototype.readIntLE = function(ge, Ce, we) {
          ge >>>= 0, Ce >>>= 0, we || X(ge, Ce, this.length);
          for (var Ge = this[ge], Re = 1, je = 0; ++je < Ce && (Re *= 256); ) Ge += this[ge + je] * Re;
          return Ge >= (Re *= 128) && (Ge -= Math.pow(2, 8 * Ce)), Ge;
        }, w.prototype.readIntBE = function(ge, Ce, we) {
          ge >>>= 0, Ce >>>= 0, we || X(ge, Ce, this.length);
          for (var Ge = Ce, Re = 1, je = this[ge + --Ge]; Ge > 0 && (Re *= 256); ) je += this[ge + --Ge] * Re;
          return je >= (Re *= 128) && (je -= Math.pow(2, 8 * Ce)), je;
        }, w.prototype.readInt8 = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 1, this.length), 128 & this[ge] ? -1 * (255 - this[ge] + 1) : this[ge];
        }, w.prototype.readInt16LE = function(ge, Ce) {
          ge >>>= 0, Ce || X(ge, 2, this.length);
          var we = this[ge] | this[ge + 1] << 8;
          return 32768 & we ? 4294901760 | we : we;
        }, w.prototype.readInt16BE = function(ge, Ce) {
          ge >>>= 0, Ce || X(ge, 2, this.length);
          var we = this[ge + 1] | this[ge] << 8;
          return 32768 & we ? 4294901760 | we : we;
        }, w.prototype.readInt32LE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), this[ge] | this[ge + 1] << 8 | this[ge + 2] << 16 | this[ge + 3] << 24;
        }, w.prototype.readInt32BE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), this[ge] << 24 | this[ge + 1] << 16 | this[ge + 2] << 8 | this[ge + 3];
        }, w.prototype.readBigInt64LE = Ne(function(ge) {
          pe(ge >>>= 0, "offset");
          var Ce = this[ge], we = this[ge + 7];
          Ce !== void 0 && we !== void 0 || be(ge, this.length - 8);
          var Ge = this[ge + 4] + this[ge + 5] * Math.pow(2, 8) + this[ge + 6] * Math.pow(2, 16) + (we << 24);
          return (BigInt(Ge) << BigInt(32)) + BigInt(Ce + this[++ge] * Math.pow(2, 8) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 24));
        }), w.prototype.readBigInt64BE = Ne(function(ge) {
          pe(ge >>>= 0, "offset");
          var Ce = this[ge], we = this[ge + 7];
          Ce !== void 0 && we !== void 0 || be(ge, this.length - 8);
          var Ge = (Ce << 24) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 8) + this[++ge];
          return (BigInt(Ge) << BigInt(32)) + BigInt(this[++ge] * Math.pow(2, 24) + this[++ge] * Math.pow(2, 16) + this[++ge] * Math.pow(2, 8) + we);
        }), w.prototype.readFloatLE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), c.read(this, ge, !0, 23, 4);
        }, w.prototype.readFloatBE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 4, this.length), c.read(this, ge, !1, 23, 4);
        }, w.prototype.readDoubleLE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 8, this.length), c.read(this, ge, !0, 52, 8);
        }, w.prototype.readDoubleBE = function(ge, Ce) {
          return ge >>>= 0, Ce || X(ge, 8, this.length), c.read(this, ge, !1, 52, 8);
        }, w.prototype.writeUintLE = w.prototype.writeUIntLE = function(ge, Ce, we, Ge) {
          ge = +ge, Ce >>>= 0, we >>>= 0, Ge || Q(this, ge, Ce, we, Math.pow(2, 8 * we) - 1, 0);
          var Re = 1, je = 0;
          for (this[Ce] = 255 & ge; ++je < we && (Re *= 256); ) this[Ce + je] = ge / Re & 255;
          return Ce + we;
        }, w.prototype.writeUintBE = w.prototype.writeUIntBE = function(ge, Ce, we, Ge) {
          ge = +ge, Ce >>>= 0, we >>>= 0, Ge || Q(this, ge, Ce, we, Math.pow(2, 8 * we) - 1, 0);
          var Re = we - 1, je = 1;
          for (this[Ce + Re] = 255 & ge; --Re >= 0 && (je *= 256); ) this[Ce + Re] = ge / je & 255;
          return Ce + we;
        }, w.prototype.writeUint8 = w.prototype.writeUInt8 = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 1, 255, 0), this[Ce] = 255 & ge, Ce + 1;
        }, w.prototype.writeUint16LE = w.prototype.writeUInt16LE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 2, 65535, 0), this[Ce] = 255 & ge, this[Ce + 1] = ge >>> 8, Ce + 2;
        }, w.prototype.writeUint16BE = w.prototype.writeUInt16BE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 2, 65535, 0), this[Ce] = ge >>> 8, this[Ce + 1] = 255 & ge, Ce + 2;
        }, w.prototype.writeUint32LE = w.prototype.writeUInt32LE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 4, 4294967295, 0), this[Ce + 3] = ge >>> 24, this[Ce + 2] = ge >>> 16, this[Ce + 1] = ge >>> 8, this[Ce] = 255 & ge, Ce + 4;
        }, w.prototype.writeUint32BE = w.prototype.writeUInt32BE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 4, 4294967295, 0), this[Ce] = ge >>> 24, this[Ce + 1] = ge >>> 16, this[Ce + 2] = ge >>> 8, this[Ce + 3] = 255 & ge, Ce + 4;
        }, w.prototype.writeBigUInt64LE = Ne(function(ge) {
          return ue(this, ge, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, BigInt(0), BigInt("0xffffffffffffffff"));
        }), w.prototype.writeBigUInt64BE = Ne(function(ge) {
          return ce(this, ge, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, BigInt(0), BigInt("0xffffffffffffffff"));
        }), w.prototype.writeIntLE = function(ge, Ce, we, Ge) {
          if (ge = +ge, Ce >>>= 0, !Ge) {
            var Re = Math.pow(2, 8 * we - 1);
            Q(this, ge, Ce, we, Re - 1, -Re);
          }
          var je = 0, Ke = 1, tt = 0;
          for (this[Ce] = 255 & ge; ++je < we && (Ke *= 256); ) ge < 0 && tt === 0 && this[Ce + je - 1] !== 0 && (tt = 1), this[Ce + je] = (ge / Ke >> 0) - tt & 255;
          return Ce + we;
        }, w.prototype.writeIntBE = function(ge, Ce, we, Ge) {
          if (ge = +ge, Ce >>>= 0, !Ge) {
            var Re = Math.pow(2, 8 * we - 1);
            Q(this, ge, Ce, we, Re - 1, -Re);
          }
          var je = we - 1, Ke = 1, tt = 0;
          for (this[Ce + je] = 255 & ge; --je >= 0 && (Ke *= 256); ) ge < 0 && tt === 0 && this[Ce + je + 1] !== 0 && (tt = 1), this[Ce + je] = (ge / Ke >> 0) - tt & 255;
          return Ce + we;
        }, w.prototype.writeInt8 = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 1, 127, -128), ge < 0 && (ge = 255 + ge + 1), this[Ce] = 255 & ge, Ce + 1;
        }, w.prototype.writeInt16LE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 2, 32767, -32768), this[Ce] = 255 & ge, this[Ce + 1] = ge >>> 8, Ce + 2;
        }, w.prototype.writeInt16BE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 2, 32767, -32768), this[Ce] = ge >>> 8, this[Ce + 1] = 255 & ge, Ce + 2;
        }, w.prototype.writeInt32LE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 4, 2147483647, -2147483648), this[Ce] = 255 & ge, this[Ce + 1] = ge >>> 8, this[Ce + 2] = ge >>> 16, this[Ce + 3] = ge >>> 24, Ce + 4;
        }, w.prototype.writeInt32BE = function(ge, Ce, we) {
          return ge = +ge, Ce >>>= 0, we || Q(this, ge, Ce, 4, 2147483647, -2147483648), ge < 0 && (ge = 4294967295 + ge + 1), this[Ce] = ge >>> 24, this[Ce + 1] = ge >>> 16, this[Ce + 2] = ge >>> 8, this[Ce + 3] = 255 & ge, Ce + 4;
        }, w.prototype.writeBigInt64LE = Ne(function(ge) {
          return ue(this, ge, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
        }), w.prototype.writeBigInt64BE = Ne(function(ge) {
          return ce(this, ge, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
        }), w.prototype.writeFloatLE = function(ge, Ce, we) {
          return de(this, ge, Ce, !0, we);
        }, w.prototype.writeFloatBE = function(ge, Ce, we) {
          return de(this, ge, Ce, !1, we);
        }, w.prototype.writeDoubleLE = function(ge, Ce, we) {
          return ne(this, ge, Ce, !0, we);
        }, w.prototype.writeDoubleBE = function(ge, Ce, we) {
          return ne(this, ge, Ce, !1, we);
        }, w.prototype.copy = function(ge, Ce, we, Ge) {
          if (!w.isBuffer(ge)) throw new TypeError("argument should be a Buffer");
          if (we || (we = 0), Ge || Ge === 0 || (Ge = this.length), Ce >= ge.length && (Ce = ge.length), Ce || (Ce = 0), Ge > 0 && Ge < we && (Ge = we), Ge === we || ge.length === 0 || this.length === 0) return 0;
          if (Ce < 0) throw new RangeError("targetStart out of bounds");
          if (we < 0 || we >= this.length) throw new RangeError("Index out of range");
          if (Ge < 0) throw new RangeError("sourceEnd out of bounds");
          Ge > this.length && (Ge = this.length), ge.length - Ce < Ge - we && (Ge = ge.length - Ce + we);
          var Re = Ge - we;
          return this === ge && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(Ce, we, Ge) : Uint8Array.prototype.set.call(ge, this.subarray(we, Ge), Ce), Re;
        }, w.prototype.fill = function(ge, Ce, we, Ge) {
          if (typeof ge == "string") {
            if (typeof Ce == "string" ? (Ge = Ce, Ce = 0, we = this.length) : typeof we == "string" && (Ge = we, we = this.length), Ge !== void 0 && typeof Ge != "string") throw new TypeError("encoding must be a string");
            if (typeof Ge == "string" && !w.isEncoding(Ge)) throw new TypeError("Unknown encoding: " + Ge);
            if (ge.length === 1) {
              var Re = ge.charCodeAt(0);
              (Ge === "utf8" && Re < 128 || Ge === "latin1") && (ge = Re);
            }
          } else typeof ge == "number" ? ge &= 255 : typeof ge == "boolean" && (ge = Number(ge));
          if (Ce < 0 || this.length < Ce || this.length < we) throw new RangeError("Out of range index");
          if (we <= Ce) return this;
          var je;
          if (Ce >>>= 0, we = we === void 0 ? this.length : we >>> 0, ge || (ge = 0), typeof ge == "number") for (je = Ce; je < we; ++je) this[je] = ge;
          else {
            var Ke = w.isBuffer(ge) ? ge : w.from(ge, Ge), tt = Ke.length;
            if (tt === 0) throw new TypeError('The value "' + ge + '" is invalid for argument "value"');
            for (je = 0; je < we - Ce; ++je) this[je + Ce] = Ke[je % tt];
          }
          return this;
        };
        var ae = {};
        function se(ge, Ce, we) {
          ae[ge] = function(Ge) {
            function Re() {
              var tt;
              return function(_e, Be) {
                if (!(_e instanceof Be)) throw new TypeError("Cannot call a class as a function");
              }(this, Re), tt = function(_e, Be, $e) {
                return Be = h(Be), function(Ze, ct) {
                  if (ct && (d(ct) == "object" || typeof ct == "function")) return ct;
                  if (ct !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
                  return p(Ze);
                }(_e, i() ? Reflect.construct(Be, [], h(_e).constructor) : Be.apply(_e, $e));
              }(this, Re), Object.defineProperty(p(tt), "message", { value: Ce.apply(p(tt), arguments), writable: !0, configurable: !0 }), tt.name = "".concat(tt.name, " [").concat(ge, "]"), tt.stack, delete tt.name, tt;
            }
            var je, Ke;
            return function(tt, _e) {
              if (typeof _e != "function" && _e !== null) throw new TypeError("Super expression must either be null or a function");
              tt.prototype = Object.create(_e && _e.prototype, { constructor: { value: tt, writable: !0, configurable: !0 } }), Object.defineProperty(tt, "prototype", { writable: !1 }), _e && _(tt, _e);
            }(Re, Ge), je = Re, (Ke = [{ key: "code", get: function() {
              return ge;
            }, set: function(tt) {
              Object.defineProperty(this, "code", { configurable: !0, enumerable: !0, value: tt, writable: !0 });
            } }, { key: "toString", value: function() {
              return "".concat(this.name, " [").concat(ge, "]: ").concat(this.message);
            } }]) && l(je.prototype, Ke), Object.defineProperty(je, "prototype", { writable: !1 }), Re;
          }(we);
        }
        function me(ge) {
          for (var Ce = "", we = ge.length, Ge = ge[0] === "-" ? 1 : 0; we >= Ge + 4; we -= 3) Ce = "_".concat(ge.slice(we - 3, we)).concat(Ce);
          return "".concat(ge.slice(0, we)).concat(Ce);
        }
        function ye(ge, Ce, we, Ge, Re, je) {
          if (ge > we || ge < Ce) {
            var Ke, tt = typeof Ce == "bigint" ? "n" : "";
            throw Ke = Ce === 0 || Ce === BigInt(0) ? ">= 0".concat(tt, " and < 2").concat(tt, " ** ").concat(8 * (je + 1)).concat(tt) : ">= -(2".concat(tt, " ** ").concat(8 * (je + 1) - 1).concat(tt, ") and < 2 ** ") + "".concat(8 * (je + 1) - 1).concat(tt), new ae.ERR_OUT_OF_RANGE("value", Ke, ge);
          }
          (function(_e, Be, $e) {
            pe(Be, "offset"), _e[Be] !== void 0 && _e[Be + $e] !== void 0 || be(Be, _e.length - ($e + 1));
          })(Ge, Re, je);
        }
        function pe(ge, Ce) {
          if (typeof ge != "number") throw new ae.ERR_INVALID_ARG_TYPE(Ce, "number", ge);
        }
        function be(ge, Ce, we) {
          throw Math.floor(ge) !== ge ? (pe(ge, we), new ae.ERR_OUT_OF_RANGE("offset", "an integer", ge)) : Ce < 0 ? new ae.ERR_BUFFER_OUT_OF_BOUNDS() : new ae.ERR_OUT_OF_RANGE("offset", ">= ".concat(0, " and <= ").concat(Ce), ge);
        }
        se("ERR_BUFFER_OUT_OF_BOUNDS", function(ge) {
          return ge ? "".concat(ge, " is outside of buffer bounds") : "Attempt to access memory outside buffer bounds";
        }, RangeError), se("ERR_INVALID_ARG_TYPE", function(ge, Ce) {
          return 'The "'.concat(ge, '" argument must be of type number. Received type ').concat(d(Ce));
        }, TypeError), se("ERR_OUT_OF_RANGE", function(ge, Ce, we) {
          var Ge = 'The value of "'.concat(ge, '" is out of range.'), Re = we;
          return Number.isInteger(we) && Math.abs(we) > Math.pow(2, 32) ? Re = me(String(we)) : typeof we == "bigint" && (Re = String(we), (we > Math.pow(BigInt(2), BigInt(32)) || we < -Math.pow(BigInt(2), BigInt(32))) && (Re = me(Re)), Re += "n"), Ge + " It must be ".concat(Ce, ". Received ").concat(Re);
        }, RangeError);
        var Ae = /[^+/0-9A-Za-z-_]/g;
        function Se(ge, Ce) {
          var we;
          Ce = Ce || 1 / 0;
          for (var Ge = ge.length, Re = null, je = [], Ke = 0; Ke < Ge; ++Ke) {
            if ((we = ge.charCodeAt(Ke)) > 55295 && we < 57344) {
              if (!Re) {
                if (we > 56319) {
                  (Ce -= 3) > -1 && je.push(239, 191, 189);
                  continue;
                }
                if (Ke + 1 === Ge) {
                  (Ce -= 3) > -1 && je.push(239, 191, 189);
                  continue;
                }
                Re = we;
                continue;
              }
              if (we < 56320) {
                (Ce -= 3) > -1 && je.push(239, 191, 189), Re = we;
                continue;
              }
              we = 65536 + (Re - 55296 << 10 | we - 56320);
            } else Re && (Ce -= 3) > -1 && je.push(239, 191, 189);
            if (Re = null, we < 128) {
              if ((Ce -= 1) < 0) break;
              je.push(we);
            } else if (we < 2048) {
              if ((Ce -= 2) < 0) break;
              je.push(we >> 6 | 192, 63 & we | 128);
            } else if (we < 65536) {
              if ((Ce -= 3) < 0) break;
              je.push(we >> 12 | 224, we >> 6 & 63 | 128, 63 & we | 128);
            } else {
              if (!(we < 1114112)) throw new Error("Invalid code point");
              if ((Ce -= 4) < 0) break;
              je.push(we >> 18 | 240, we >> 12 & 63 | 128, we >> 6 & 63 | 128, 63 & we | 128);
            }
          }
          return je;
        }
        function Me(ge) {
          return f.toByteArray(function(Ce) {
            if ((Ce = (Ce = Ce.split("=")[0]).trim().replace(Ae, "")).length < 2) return "";
            for (; Ce.length % 4 != 0; ) Ce += "=";
            return Ce;
          }(ge));
        }
        function De(ge, Ce, we, Ge) {
          var Re;
          for (Re = 0; Re < Ge && !(Re + we >= Ce.length || Re >= ge.length); ++Re) Ce[Re + we] = ge[Re];
          return Re;
        }
        function Le(ge, Ce) {
          return ge instanceof Ce || ge != null && ge.constructor != null && ge.constructor.name != null && ge.constructor.name === Ce.name;
        }
        function We(ge) {
          return ge != ge;
        }
        var Ee = function() {
          for (var ge = "0123456789abcdef", Ce = new Array(256), we = 0; we < 16; ++we) for (var Ge = 16 * we, Re = 0; Re < 16; ++Re) Ce[Ge + Re] = ge[we] + ge[Re];
          return Ce;
        }();
        function Ne(ge) {
          return typeof BigInt > "u" ? Ie : ge;
        }
        function Ie() {
          throw new Error("BigInt not supported");
        }
      }, 13087: function(o) {
        o.exports = u, o.exports.isMobile = u, o.exports.default = u;
        var s = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, n = /CrOS/, l = /android|ipad|playbook|silk/i;
        function u(i) {
          i || (i = {});
          var h = i.ua;
          if (h || typeof navigator > "u" || (h = navigator.userAgent), h && h.headers && typeof h.headers["user-agent"] == "string" && (h = h.headers["user-agent"]), typeof h != "string") return !1;
          var p = s.test(h) && !n.test(h) || !!i.tablet && l.test(h);
          return !p && i.tablet && i.featureDetect && navigator && navigator.maxTouchPoints > 1 && h.indexOf("Macintosh") !== -1 && h.indexOf("Safari") !== -1 && (p = !0), p;
        }
      }, 5955: function(o, s, n) {
        var l = n(22413), u = n.n(l), i = n(51070), h = n.n(i), p = n(62133), _ = n.n(p), d = new URL(n(77035), n.b), f = new URL(n(43470), n.b), c = new URL(n(68164), n.b), g = new URL(n(64665), n.b), m = new URL(n(4890), n.b), x = new URL(n(13363), n.b), w = new URL(n(13490), n.b), k = new URL(n(47603), n.b), S = new URL(n(13913), n.b), A = new URL(n(91413), n.b), C = new URL(n(64643), n.b), D = new URL(n(80216), n.b), L = new URL(n(61907), n.b), E = new URL(n(68605), n.b), P = new URL(n(25446), n.b), I = new URL(n(56694), n.b), M = new URL(n(24420), n.b), O = new URL(n(75796), n.b), T = new URL(n(92228), n.b), z = new URL(n(9819), n.b), F = new URL(n(47695), n.b), U = new URL(n(28869), n.b), V = new URL(n(30557), n.b), $ = new URL(n(48460), n.b), q = new URL(n(56539), n.b), K = new URL(n(43737), n.b), re = new URL(n(47914), n.b), Y = new URL(n(26117), n.b), te = new URL(n(66311), n.b), ee = h()(u()), X = _()(d), Q = _()(f), ue = _()(c), ce = _()(g), he = _()(m), de = _()(x), ne = _()(w), ae = _()(k), se = _()(S), me = _()(A), ye = _()(C), pe = _()(D), be = _()(L), Ae = _()(E), Se = _()(P), Me = _()(I), De = _()(M), Le = _()(O), We = _()(T), Ee = _()(z), Ne = _()(F), Ie = _()(U), ge = _()(V), Ce = _()($), we = _()(q), Ge = _()(K), Re = _()(re), je = _()(Y), Ke = _()(te);
        ee.push([o.id, ".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(" + X + ")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(" + Q + ")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(" + ue + ")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(" + ce + ")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(" + he + ")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(" + de + ")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(" + ne + ")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(" + ae + ")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(" + se + ")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(" + me + ")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(" + ye + ")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(" + ae + ")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(" + pe + ")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(" + be + ")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(" + Ae + ")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(" + Se + ")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(" + Me + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(" + De + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(" + Le + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(" + We + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(" + Ee + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(" + Ne + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(" + Ie + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(" + ge + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(" + Ce + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(" + We + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(" + Ee + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(" + Ne + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(" + Ie + ")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(" + we + ")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(" + Ge + ")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(" + Re + ");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(" + Re + ")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(" + Re + ")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(" + je + ");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(" + Ke + ")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(" + je + ')}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}', ""]), s.A = ee;
      }, 68735: function(o, s, n) {
        n.r(s), n.d(s, { sankeyCenter: function() {
          return g;
        }, sankeyCircular: function() {
          return U;
        }, sankeyJustify: function() {
          return c;
        }, sankeyLeft: function() {
          return d;
        }, sankeyRight: function() {
          return f;
        } });
        var l = n(29725), u = n(4575), i = n(48544), h = n(96143), p = n.n(h);
        function _(Se) {
          return Se.target.depth;
        }
        function d(Se) {
          return Se.depth;
        }
        function f(Se, Me) {
          return Me - 1 - Se.height;
        }
        function c(Se, Me) {
          return Se.sourceLinks.length ? Se.depth : Me - 1;
        }
        function g(Se) {
          return Se.targetLinks.length ? Se.depth : Se.sourceLinks.length ? (0, l.jk)(Se.sourceLinks, _) - 1 : 0;
        }
        function m(Se) {
          return function() {
            return Se;
          };
        }
        var x = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Se) {
          return typeof Se;
        } : function(Se) {
          return Se && typeof Symbol == "function" && Se.constructor === Symbol && Se !== Symbol.prototype ? "symbol" : typeof Se;
        };
        function w(Se, Me) {
          return S(Se.source, Me.source) || Se.index - Me.index;
        }
        function k(Se, Me) {
          return S(Se.target, Me.target) || Se.index - Me.index;
        }
        function S(Se, Me) {
          return Se.partOfCycle === Me.partOfCycle ? Se.y0 - Me.y0 : Se.circularLinkType === "top" || Me.circularLinkType === "bottom" ? -1 : 1;
        }
        function A(Se) {
          return Se.value;
        }
        function C(Se) {
          return (Se.y0 + Se.y1) / 2;
        }
        function D(Se) {
          return C(Se.source);
        }
        function L(Se) {
          return C(Se.target);
        }
        function E(Se) {
          return Se.index;
        }
        function P(Se) {
          return Se.nodes;
        }
        function I(Se) {
          return Se.links;
        }
        function M(Se, Me) {
          var De = Se.get(Me);
          if (!De) throw new Error("missing: " + Me);
          return De;
        }
        function O(Se, Me) {
          return Me(Se);
        }
        var T = 25, z = 10, F = 0.3;
        function U() {
          var Se, Me, De = 0, Le = 0, We = 1, Ee = 1, Ne = 24, Ie = E, ge = c, Ce = P, we = I, Ge = 32, Re = 2, je = null;
          function Ke() {
            var _e = { nodes: Ce.apply(null, arguments), links: we.apply(null, arguments) };
            (function($e) {
              $e.nodes.forEach(function(ct, ft) {
                ct.index = ft, ct.sourceLinks = [], ct.targetLinks = [];
              });
              var Ze = (0, u.Tj)($e.nodes, Ie);
              $e.links.forEach(function(ct, ft) {
                ct.index = ft;
                var _t = ct.source, Pt = ct.target;
                (_t === void 0 ? "undefined" : x(_t)) !== "object" && (_t = ct.source = M(Ze, _t)), (Pt === void 0 ? "undefined" : x(Pt)) !== "object" && (Pt = ct.target = M(Ze, Pt)), _t.sourceLinks.push(ct), Pt.targetLinks.push(ct);
              });
            })(_e), function($e, Ze, ct) {
              var ft = 0;
              if (ct === null) {
                for (var _t = [], Pt = 0; Pt < $e.links.length; Pt++) {
                  var Dt = $e.links[Pt], $t = Dt.source.index, Gt = Dt.target.index;
                  _t[$t] || (_t[$t] = []), _t[Gt] || (_t[Gt] = []), _t[$t].indexOf(Gt) === -1 && _t[$t].push(Gt);
                }
                var Wt = p()(_t);
                Wt.sort(function(vt, St) {
                  return vt.length - St.length;
                });
                var mt = {};
                for (Pt = 0; Pt < Wt.length; Pt++) {
                  var at = Wt[Pt].slice(-2);
                  mt[at[0]] || (mt[at[0]] = {}), mt[at[0]][at[1]] = !0;
                }
                $e.links.forEach(function(vt) {
                  var St = vt.target.index, Je = vt.source.index;
                  St === Je || mt[Je] && mt[Je][St] ? (vt.circular = !0, vt.circularLinkID = ft, ft += 1) : vt.circular = !1;
                });
              } else $e.links.forEach(function(vt) {
                vt.source[ct] < vt.target[ct] ? vt.circular = !1 : (vt.circular = !0, vt.circularLinkID = ft, ft += 1);
              });
            }(_e, 0, je), function($e) {
              $e.nodes.forEach(function(Ze) {
                Ze.partOfCycle = !1, Ze.value = Math.max((0, l.cz)(Ze.sourceLinks, A), (0, l.cz)(Ze.targetLinks, A)), Ze.sourceLinks.forEach(function(ct) {
                  ct.circular && (Ze.partOfCycle = !0, Ze.circularLinkType = ct.circularLinkType);
                }), Ze.targetLinks.forEach(function(ct) {
                  ct.circular && (Ze.partOfCycle = !0, Ze.circularLinkType = ct.circularLinkType);
                });
              });
            }(_e), function($e) {
              var Ze, ct, ft;
              for (Ze = $e.nodes, ct = [], ft = 0; Ze.length; ++ft, Ze = ct, ct = []) Ze.forEach(function(_t) {
                _t.depth = ft, _t.sourceLinks.forEach(function(Pt) {
                  ct.indexOf(Pt.target) < 0 && !Pt.circular && ct.push(Pt.target);
                });
              });
              for (Ze = $e.nodes, ct = [], ft = 0; Ze.length; ++ft, Ze = ct, ct = []) Ze.forEach(function(_t) {
                _t.height = ft, _t.targetLinks.forEach(function(Pt) {
                  ct.indexOf(Pt.source) < 0 && !Pt.circular && ct.push(Pt.source);
                });
              });
              $e.nodes.forEach(function(_t) {
                _t.column = Math.floor(ge.call(null, _t, ft));
              });
            }(_e), V(_e, Ie), function($e, Ze, ct) {
              var ft = (0, u.$I)().key(function(Gt) {
                return Gt.column;
              }).sortKeys(l.V_).entries($e.nodes).map(function(Gt) {
                return Gt.values;
              });
              (function(Gt) {
                if (Me) {
                  var Wt = 1 / 0;
                  ft.forEach(function(St) {
                    var Je = Ee * Me / (St.length + 1);
                    Wt = Je < Wt ? Je : Wt;
                  }), Se = Wt;
                }
                var mt = (0, l.jk)(ft, function(St) {
                  return (Ee - Le - (St.length - 1) * Se) / (0, l.cz)(St, A);
                });
                mt *= F, $e.links.forEach(function(St) {
                  St.width = St.value * mt;
                });
                var at = function(St) {
                  var Je = 0, nt = 0, ot = 0, Ye = 0, Fe = (0, l.T9)(St.nodes, function(pt) {
                    return pt.column;
                  });
                  return St.links.forEach(function(pt) {
                    pt.circular && (pt.circularLinkType == "top" ? Je += pt.width : nt += pt.width, pt.target.column == 0 && (Ye += pt.width), pt.source.column == Fe && (ot += pt.width));
                  }), { top: Je = Je > 0 ? Je + T + z : Je, bottom: nt = nt > 0 ? nt + T + z : nt, left: Ye = Ye > 0 ? Ye + T + z : Ye, right: ot = ot > 0 ? ot + T + z : ot };
                }($e), vt = function(St, Je) {
                  var nt = (0, l.T9)(St.nodes, function(Mt) {
                    return Mt.column;
                  }), ot = We - De, Ye = Ee - Le, Fe = ot / (ot + Je.right + Je.left), pt = Ye / (Ye + Je.top + Je.bottom);
                  return De = De * Fe + Je.left, We = Je.right == 0 ? We : We * Fe, Le = Le * pt + Je.top, Ee *= pt, St.nodes.forEach(function(Mt) {
                    Mt.x0 = De + Mt.column * ((We - De - Ne) / nt), Mt.x1 = Mt.x0 + Ne;
                  }), pt;
                }($e, at);
                mt *= vt, $e.links.forEach(function(St) {
                  St.width = St.value * mt;
                }), ft.forEach(function(St) {
                  var Je = St.length;
                  St.forEach(function(nt, ot) {
                    nt.depth == ft.length - 1 && Je == 1 || nt.depth == 0 && Je == 1 ? (nt.y0 = Ee / 2 - nt.value * mt, nt.y1 = nt.y0 + nt.value * mt) : nt.partOfCycle ? q(nt, Gt) == 0 ? (nt.y0 = Ee / 2 + ot, nt.y1 = nt.y0 + nt.value * mt) : nt.circularLinkType == "top" ? (nt.y0 = Le + ot, nt.y1 = nt.y0 + nt.value * mt) : (nt.y0 = Ee - nt.value * mt - ot, nt.y1 = nt.y0 + nt.value * mt) : at.top == 0 || at.bottom == 0 ? (nt.y0 = (Ee - Le) / Je * ot, nt.y1 = nt.y0 + nt.value * mt) : (nt.y0 = (Ee - Le) / 2 - Je / 2 + ot, nt.y1 = nt.y0 + nt.value * mt);
                  });
                });
              })(ct), $t();
              for (var _t = 1, Pt = Ze; Pt > 0; --Pt) Dt(_t *= 0.99, ct), $t();
              function Dt(Gt, Wt) {
                var mt = ft.length;
                ft.forEach(function(at) {
                  var vt = at.length, St = at[0].depth;
                  at.forEach(function(Je) {
                    var nt;
                    if ((Je.sourceLinks.length || Je.targetLinks.length) && !(Je.partOfCycle && q(Je, Wt) > 0)) if (St == 0 && vt == 1) nt = Je.y1 - Je.y0, Je.y0 = Ee / 2 - nt / 2, Je.y1 = Ee / 2 + nt / 2;
                    else if (St == mt - 1 && vt == 1) nt = Je.y1 - Je.y0, Je.y0 = Ee / 2 - nt / 2, Je.y1 = Ee / 2 + nt / 2;
                    else {
                      var ot = (0, l.i2)(Je.sourceLinks, L), Ye = (0, l.i2)(Je.targetLinks, D), Fe = ((ot && Ye ? (ot + Ye) / 2 : ot || Ye) - C(Je)) * Gt;
                      Je.y0 += Fe, Je.y1 += Fe;
                    }
                  });
                });
              }
              function $t() {
                ft.forEach(function(Gt) {
                  var Wt, mt, at, vt = Le, St = Gt.length;
                  for (Gt.sort(S), at = 0; at < St; ++at) (mt = vt - (Wt = Gt[at]).y0) > 0 && (Wt.y0 += mt, Wt.y1 += mt), vt = Wt.y1 + Se;
                  if ((mt = vt - Se - Ee) > 0) for (vt = Wt.y0 -= mt, Wt.y1 -= mt, at = St - 2; at >= 0; --at) (mt = (Wt = Gt[at]).y1 + Se - vt) > 0 && (Wt.y0 -= mt, Wt.y1 -= mt), vt = Wt.y0;
                });
              }
            }(_e, Ge, Ie), tt(_e);
            for (var Be = 0; Be < 4; Be++) me(_e, Ee, Ie), ye(_e, 0, Ie), ae(_e, Le, Ee, Ie), me(_e, Ee, Ie), ye(_e, 0, Ie);
            return function($e, Ze, ct) {
              var ft = $e.nodes, _t = $e.links, Pt = !1, Dt = !1;
              if (_t.forEach(function(Wt) {
                Wt.circularLinkType == "top" ? Pt = !0 : Wt.circularLinkType == "bottom" && (Dt = !0);
              }), Pt == 0 || Dt == 0) {
                var $t = (0, l.jk)(ft, function(Wt) {
                  return Wt.y0;
                }), Gt = (ct - Ze) / ((0, l.T9)(ft, function(Wt) {
                  return Wt.y1;
                }) - $t);
                ft.forEach(function(Wt) {
                  var mt = (Wt.y1 - Wt.y0) * Gt;
                  Wt.y0 = (Wt.y0 - $t) * Gt, Wt.y1 = Wt.y0 + mt;
                }), _t.forEach(function(Wt) {
                  Wt.y0 = (Wt.y0 - $t) * Gt, Wt.y1 = (Wt.y1 - $t) * Gt, Wt.width = Wt.width * Gt;
                });
              }
            }(_e, Le, Ee), Y(_e, Re, Ee, Ie), _e;
          }
          function tt(_e) {
            _e.nodes.forEach(function(Be) {
              Be.sourceLinks.sort(k), Be.targetLinks.sort(w);
            }), _e.nodes.forEach(function(Be) {
              var $e = Be.y0, Ze = $e, ct = Be.y1, ft = ct;
              Be.sourceLinks.forEach(function(_t) {
                _t.circular ? (_t.y0 = ct - _t.width / 2, ct -= _t.width) : (_t.y0 = $e + _t.width / 2, $e += _t.width);
              }), Be.targetLinks.forEach(function(_t) {
                _t.circular ? (_t.y1 = ft - _t.width / 2, ft -= _t.width) : (_t.y1 = Ze + _t.width / 2, Ze += _t.width);
              });
            });
          }
          return Ke.nodeId = function(_e) {
            return arguments.length ? (Ie = typeof _e == "function" ? _e : m(_e), Ke) : Ie;
          }, Ke.nodeAlign = function(_e) {
            return arguments.length ? (ge = typeof _e == "function" ? _e : m(_e), Ke) : ge;
          }, Ke.nodeWidth = function(_e) {
            return arguments.length ? (Ne = +_e, Ke) : Ne;
          }, Ke.nodePadding = function(_e) {
            return arguments.length ? (Se = +_e, Ke) : Se;
          }, Ke.nodes = function(_e) {
            return arguments.length ? (Ce = typeof _e == "function" ? _e : m(_e), Ke) : Ce;
          }, Ke.links = function(_e) {
            return arguments.length ? (we = typeof _e == "function" ? _e : m(_e), Ke) : we;
          }, Ke.size = function(_e) {
            return arguments.length ? (De = Le = 0, We = +_e[0], Ee = +_e[1], Ke) : [We - De, Ee - Le];
          }, Ke.extent = function(_e) {
            return arguments.length ? (De = +_e[0][0], We = +_e[1][0], Le = +_e[0][1], Ee = +_e[1][1], Ke) : [[De, Le], [We, Ee]];
          }, Ke.iterations = function(_e) {
            return arguments.length ? (Ge = +_e, Ke) : Ge;
          }, Ke.circularLinkGap = function(_e) {
            return arguments.length ? (Re = +_e, Ke) : Re;
          }, Ke.nodePaddingRatio = function(_e) {
            return arguments.length ? (Me = +_e, Ke) : Me;
          }, Ke.sortNodes = function(_e) {
            return arguments.length ? (je = _e, Ke) : je;
          }, Ke.update = function(_e) {
            return V(_e, Ie), tt(_e), _e.links.forEach(function(Be) {
              Be.circular && (Be.circularLinkType = Be.y0 + Be.y1 < Ee ? "top" : "bottom", Be.source.circularLinkType = Be.circularLinkType, Be.target.circularLinkType = Be.circularLinkType);
            }), me(_e, Ee, Ie, !1), ye(_e, 0, Ie), Y(_e, Re, Ee, Ie), _e;
          }, Ke;
        }
        function V(Se, Me) {
          var De = 0, Le = 0;
          Se.links.forEach(function(We) {
            We.circular && (We.source.circularLinkType || We.target.circularLinkType ? We.circularLinkType = We.source.circularLinkType ? We.source.circularLinkType : We.target.circularLinkType : We.circularLinkType = De < Le ? "top" : "bottom", We.circularLinkType == "top" ? De += 1 : Le += 1, Se.nodes.forEach(function(Ee) {
              O(Ee, Me) != O(We.source, Me) && O(Ee, Me) != O(We.target, Me) || (Ee.circularLinkType = We.circularLinkType);
            }));
          }), Se.links.forEach(function(We) {
            We.circular && (We.source.circularLinkType == We.target.circularLinkType && (We.circularLinkType = We.source.circularLinkType), Ae(We, Me) && (We.circularLinkType = We.source.circularLinkType));
          });
        }
        function $(Se) {
          var Me = Math.abs(Se.y1 - Se.y0), De = Math.abs(Se.target.x0 - Se.source.x1);
          return Math.atan(De / Me);
        }
        function q(Se, Me) {
          var De = 0;
          Se.sourceLinks.forEach(function(We) {
            De = We.circular && !Ae(We, Me) ? De + 1 : De;
          });
          var Le = 0;
          return Se.targetLinks.forEach(function(We) {
            Le = We.circular && !Ae(We, Me) ? Le + 1 : Le;
          }), De + Le;
        }
        function K(Se) {
          var Me = Se.source.sourceLinks, De = 0;
          Me.forEach(function(Ee) {
            De = Ee.circular ? De + 1 : De;
          });
          var Le = Se.target.targetLinks, We = 0;
          return Le.forEach(function(Ee) {
            We = Ee.circular ? We + 1 : We;
          }), !(De > 1 || We > 1);
        }
        function re(Se, Me, De) {
          return Se.sort(te), Se.forEach(function(Le, We) {
            var Ee, Ne, Ie = 0;
            if (Ae(Le, De) && K(Le)) Le.circularPathData.verticalBuffer = Ie + Le.width / 2;
            else {
              for (var ge = 0; ge < We; ge++) if (Ee = Se[We], Ne = Se[ge], !(Ee.source.column < Ne.target.column || Ee.target.column > Ne.source.column)) {
                var Ce = Se[ge].circularPathData.verticalBuffer + Se[ge].width / 2 + Me;
                Ie = Ce > Ie ? Ce : Ie;
              }
              Le.circularPathData.verticalBuffer = Ie + Le.width / 2;
            }
          }), Se;
        }
        function Y(Se, Me, De, Le) {
          var We = (0, l.jk)(Se.links, function(Ee) {
            return Ee.source.y0;
          });
          Se.links.forEach(function(Ee) {
            Ee.circular && (Ee.circularPathData = {});
          }), re(Se.links.filter(function(Ee) {
            return Ee.circularLinkType == "top";
          }), Me, Le), re(Se.links.filter(function(Ee) {
            return Ee.circularLinkType == "bottom";
          }), Me, Le), Se.links.forEach(function(Ee) {
            if (Ee.circular) {
              if (Ee.circularPathData.arcRadius = Ee.width + z, Ee.circularPathData.leftNodeBuffer = 5, Ee.circularPathData.rightNodeBuffer = 5, Ee.circularPathData.sourceWidth = Ee.source.x1 - Ee.source.x0, Ee.circularPathData.sourceX = Ee.source.x0 + Ee.circularPathData.sourceWidth, Ee.circularPathData.targetX = Ee.target.x0, Ee.circularPathData.sourceY = Ee.y0, Ee.circularPathData.targetY = Ee.y1, Ae(Ee, Le) && K(Ee)) Ee.circularPathData.leftSmallArcRadius = z + Ee.width / 2, Ee.circularPathData.leftLargeArcRadius = z + Ee.width / 2, Ee.circularPathData.rightSmallArcRadius = z + Ee.width / 2, Ee.circularPathData.rightLargeArcRadius = z + Ee.width / 2, Ee.circularLinkType == "bottom" ? (Ee.circularPathData.verticalFullExtent = Ee.source.y1 + T + Ee.circularPathData.verticalBuffer, Ee.circularPathData.verticalLeftInnerExtent = Ee.circularPathData.verticalFullExtent - Ee.circularPathData.leftLargeArcRadius, Ee.circularPathData.verticalRightInnerExtent = Ee.circularPathData.verticalFullExtent - Ee.circularPathData.rightLargeArcRadius) : (Ee.circularPathData.verticalFullExtent = Ee.source.y0 - T - Ee.circularPathData.verticalBuffer, Ee.circularPathData.verticalLeftInnerExtent = Ee.circularPathData.verticalFullExtent + Ee.circularPathData.leftLargeArcRadius, Ee.circularPathData.verticalRightInnerExtent = Ee.circularPathData.verticalFullExtent + Ee.circularPathData.rightLargeArcRadius);
              else {
                var Ne = Ee.source.column, Ie = Ee.circularLinkType, ge = Se.links.filter(function(Ge) {
                  return Ge.source.column == Ne && Ge.circularLinkType == Ie;
                });
                Ee.circularLinkType == "bottom" ? ge.sort(X) : ge.sort(ee);
                var Ce = 0;
                ge.forEach(function(Ge, Re) {
                  Ge.circularLinkID == Ee.circularLinkID && (Ee.circularPathData.leftSmallArcRadius = z + Ee.width / 2 + Ce, Ee.circularPathData.leftLargeArcRadius = z + Ee.width / 2 + Re * Me + Ce), Ce += Ge.width;
                }), Ne = Ee.target.column, ge = Se.links.filter(function(Ge) {
                  return Ge.target.column == Ne && Ge.circularLinkType == Ie;
                }), Ee.circularLinkType == "bottom" ? ge.sort(ue) : ge.sort(Q), Ce = 0, ge.forEach(function(Ge, Re) {
                  Ge.circularLinkID == Ee.circularLinkID && (Ee.circularPathData.rightSmallArcRadius = z + Ee.width / 2 + Ce, Ee.circularPathData.rightLargeArcRadius = z + Ee.width / 2 + Re * Me + Ce), Ce += Ge.width;
                }), Ee.circularLinkType == "bottom" ? (Ee.circularPathData.verticalFullExtent = Math.max(De, Ee.source.y1, Ee.target.y1) + T + Ee.circularPathData.verticalBuffer, Ee.circularPathData.verticalLeftInnerExtent = Ee.circularPathData.verticalFullExtent - Ee.circularPathData.leftLargeArcRadius, Ee.circularPathData.verticalRightInnerExtent = Ee.circularPathData.verticalFullExtent - Ee.circularPathData.rightLargeArcRadius) : (Ee.circularPathData.verticalFullExtent = We - T - Ee.circularPathData.verticalBuffer, Ee.circularPathData.verticalLeftInnerExtent = Ee.circularPathData.verticalFullExtent + Ee.circularPathData.leftLargeArcRadius, Ee.circularPathData.verticalRightInnerExtent = Ee.circularPathData.verticalFullExtent + Ee.circularPathData.rightLargeArcRadius);
              }
              Ee.circularPathData.leftInnerExtent = Ee.circularPathData.sourceX + Ee.circularPathData.leftNodeBuffer, Ee.circularPathData.rightInnerExtent = Ee.circularPathData.targetX - Ee.circularPathData.rightNodeBuffer, Ee.circularPathData.leftFullExtent = Ee.circularPathData.sourceX + Ee.circularPathData.leftLargeArcRadius + Ee.circularPathData.leftNodeBuffer, Ee.circularPathData.rightFullExtent = Ee.circularPathData.targetX - Ee.circularPathData.rightLargeArcRadius - Ee.circularPathData.rightNodeBuffer;
            }
            if (Ee.circular) Ee.path = function(Ge) {
              return Ge.circularLinkType == "top" ? "M" + Ge.circularPathData.sourceX + " " + Ge.circularPathData.sourceY + " L" + Ge.circularPathData.leftInnerExtent + " " + Ge.circularPathData.sourceY + " A" + Ge.circularPathData.leftLargeArcRadius + " " + Ge.circularPathData.leftSmallArcRadius + " 0 0 0 " + Ge.circularPathData.leftFullExtent + " " + (Ge.circularPathData.sourceY - Ge.circularPathData.leftSmallArcRadius) + " L" + Ge.circularPathData.leftFullExtent + " " + Ge.circularPathData.verticalLeftInnerExtent + " A" + Ge.circularPathData.leftLargeArcRadius + " " + Ge.circularPathData.leftLargeArcRadius + " 0 0 0 " + Ge.circularPathData.leftInnerExtent + " " + Ge.circularPathData.verticalFullExtent + " L" + Ge.circularPathData.rightInnerExtent + " " + Ge.circularPathData.verticalFullExtent + " A" + Ge.circularPathData.rightLargeArcRadius + " " + Ge.circularPathData.rightLargeArcRadius + " 0 0 0 " + Ge.circularPathData.rightFullExtent + " " + Ge.circularPathData.verticalRightInnerExtent + " L" + Ge.circularPathData.rightFullExtent + " " + (Ge.circularPathData.targetY - Ge.circularPathData.rightSmallArcRadius) + " A" + Ge.circularPathData.rightLargeArcRadius + " " + Ge.circularPathData.rightSmallArcRadius + " 0 0 0 " + Ge.circularPathData.rightInnerExtent + " " + Ge.circularPathData.targetY + " L" + Ge.circularPathData.targetX + " " + Ge.circularPathData.targetY : "M" + Ge.circularPathData.sourceX + " " + Ge.circularPathData.sourceY + " L" + Ge.circularPathData.leftInnerExtent + " " + Ge.circularPathData.sourceY + " A" + Ge.circularPathData.leftLargeArcRadius + " " + Ge.circularPathData.leftSmallArcRadius + " 0 0 1 " + Ge.circularPathData.leftFullExtent + " " + (Ge.circularPathData.sourceY + Ge.circularPathData.leftSmallArcRadius) + " L" + Ge.circularPathData.leftFullExtent + " " + Ge.circularPathData.verticalLeftInnerExtent + " A" + Ge.circularPathData.leftLargeArcRadius + " " + Ge.circularPathData.leftLargeArcRadius + " 0 0 1 " + Ge.circularPathData.leftInnerExtent + " " + Ge.circularPathData.verticalFullExtent + " L" + Ge.circularPathData.rightInnerExtent + " " + Ge.circularPathData.verticalFullExtent + " A" + Ge.circularPathData.rightLargeArcRadius + " " + Ge.circularPathData.rightLargeArcRadius + " 0 0 1 " + Ge.circularPathData.rightFullExtent + " " + Ge.circularPathData.verticalRightInnerExtent + " L" + Ge.circularPathData.rightFullExtent + " " + (Ge.circularPathData.targetY + Ge.circularPathData.rightSmallArcRadius) + " A" + Ge.circularPathData.rightLargeArcRadius + " " + Ge.circularPathData.rightSmallArcRadius + " 0 0 1 " + Ge.circularPathData.rightInnerExtent + " " + Ge.circularPathData.targetY + " L" + Ge.circularPathData.targetX + " " + Ge.circularPathData.targetY;
            }(Ee);
            else {
              var we = (0, i.pq)().source(function(Ge) {
                return [Ge.source.x0 + (Ge.source.x1 - Ge.source.x0), Ge.y0];
              }).target(function(Ge) {
                return [Ge.target.x0, Ge.y1];
              });
              Ee.path = we(Ee);
            }
          });
        }
        function te(Se, Me) {
          return ce(Se) == ce(Me) ? Se.circularLinkType == "bottom" ? X(Se, Me) : ee(Se, Me) : ce(Me) - ce(Se);
        }
        function ee(Se, Me) {
          return Se.y0 - Me.y0;
        }
        function X(Se, Me) {
          return Me.y0 - Se.y0;
        }
        function Q(Se, Me) {
          return Se.y1 - Me.y1;
        }
        function ue(Se, Me) {
          return Me.y1 - Se.y1;
        }
        function ce(Se) {
          return Se.target.column - Se.source.column;
        }
        function he(Se) {
          return Se.target.x0 - Se.source.x1;
        }
        function de(Se, Me) {
          var De = $(Se), Le = he(Me) / Math.tan(De);
          return be(Se) == "up" ? Se.y1 + Le : Se.y1 - Le;
        }
        function ne(Se, Me) {
          var De = $(Se), Le = he(Me) / Math.tan(De);
          return be(Se) == "up" ? Se.y1 - Le : Se.y1 + Le;
        }
        function ae(Se, Me, De, Le) {
          Se.links.forEach(function(We) {
            if (!We.circular && We.target.column - We.source.column > 1) {
              var Ee = We.source.column + 1, Ne = We.target.column - 1, Ie = 1, ge = Ne - Ee + 1;
              for (Ie = 1; Ee <= Ne; Ee++, Ie++) Se.nodes.forEach(function(Ce) {
                if (Ce.column == Ee) {
                  var we, Ge = Ie / (ge + 1), Re = Math.pow(1 - Ge, 3), je = 3 * Ge * Math.pow(1 - Ge, 2), Ke = 3 * Math.pow(Ge, 2) * (1 - Ge), tt = Math.pow(Ge, 3), _e = Re * We.y0 + je * We.y0 + Ke * We.y1 + tt * We.y1, Be = _e - We.width / 2, $e = _e + We.width / 2;
                  Be > Ce.y0 && Be < Ce.y1 ? (we = Ce.y1 - Be + 10, we = Ce.circularLinkType == "bottom" ? we : -we, Ce = se(Ce, we, Me, De), Se.nodes.forEach(function(Ze) {
                    var ct, ft;
                    O(Ze, Le) != O(Ce, Le) && Ze.column == Ce.column && (ft = Ze, (ct = Ce).y0 > ft.y0 && ct.y0 < ft.y1 || ct.y1 > ft.y0 && ct.y1 < ft.y1 || ct.y0 < ft.y0 && ct.y1 > ft.y1) && se(Ze, we, Me, De);
                  })) : ($e > Ce.y0 && $e < Ce.y1 || Be < Ce.y0 && $e > Ce.y1) && (we = $e - Ce.y0 + 10, Ce = se(Ce, we, Me, De), Se.nodes.forEach(function(Ze) {
                    O(Ze, Le) != O(Ce, Le) && Ze.column == Ce.column && Ze.y0 < Ce.y1 && Ze.y1 > Ce.y1 && se(Ze, we, Me, De);
                  }));
                }
              });
            }
          });
        }
        function se(Se, Me, De, Le) {
          return Se.y0 + Me >= De && Se.y1 + Me <= Le && (Se.y0 = Se.y0 + Me, Se.y1 = Se.y1 + Me, Se.targetLinks.forEach(function(We) {
            We.y1 = We.y1 + Me;
          }), Se.sourceLinks.forEach(function(We) {
            We.y0 = We.y0 + Me;
          })), Se;
        }
        function me(Se, Me, De, Le) {
          Se.nodes.forEach(function(We) {
            Le && We.y + (We.y1 - We.y0) > Me && (We.y = We.y - (We.y + (We.y1 - We.y0) - Me));
            var Ee = Se.links.filter(function(ge) {
              return O(ge.source, De) == O(We, De);
            }), Ne = Ee.length;
            Ne > 1 && Ee.sort(function(ge, Ce) {
              if (!ge.circular && !Ce.circular) {
                if (ge.target.column == Ce.target.column || !pe(ge, Ce)) return ge.y1 - Ce.y1;
                if (ge.target.column > Ce.target.column) {
                  var we = ne(Ce, ge);
                  return ge.y1 - we;
                }
                if (Ce.target.column > ge.target.column) return ne(ge, Ce) - Ce.y1;
              }
              return ge.circular && !Ce.circular ? ge.circularLinkType == "top" ? -1 : 1 : Ce.circular && !ge.circular ? Ce.circularLinkType == "top" ? 1 : -1 : ge.circular && Ce.circular ? ge.circularLinkType === Ce.circularLinkType && ge.circularLinkType == "top" ? ge.target.column === Ce.target.column ? ge.target.y1 - Ce.target.y1 : Ce.target.column - ge.target.column : ge.circularLinkType === Ce.circularLinkType && ge.circularLinkType == "bottom" ? ge.target.column === Ce.target.column ? Ce.target.y1 - ge.target.y1 : ge.target.column - Ce.target.column : ge.circularLinkType == "top" ? -1 : 1 : void 0;
            });
            var Ie = We.y0;
            Ee.forEach(function(ge) {
              ge.y0 = Ie + ge.width / 2, Ie += ge.width;
            }), Ee.forEach(function(ge, Ce) {
              if (ge.circularLinkType == "bottom") {
                for (var we = Ce + 1, Ge = 0; we < Ne; we++) Ge += Ee[we].width;
                ge.y0 = We.y1 - Ge - ge.width / 2;
              }
            });
          });
        }
        function ye(Se, Me, De) {
          Se.nodes.forEach(function(Le) {
            var We = Se.links.filter(function(Ie) {
              return O(Ie.target, De) == O(Le, De);
            }), Ee = We.length;
            Ee > 1 && We.sort(function(Ie, ge) {
              if (!Ie.circular && !ge.circular) {
                if (Ie.source.column == ge.source.column || !pe(Ie, ge)) return Ie.y0 - ge.y0;
                if (ge.source.column < Ie.source.column) {
                  var Ce = de(ge, Ie);
                  return Ie.y0 - Ce;
                }
                if (Ie.source.column < ge.source.column) return de(Ie, ge) - ge.y0;
              }
              return Ie.circular && !ge.circular ? Ie.circularLinkType == "top" ? -1 : 1 : ge.circular && !Ie.circular ? ge.circularLinkType == "top" ? 1 : -1 : Ie.circular && ge.circular ? Ie.circularLinkType === ge.circularLinkType && Ie.circularLinkType == "top" ? Ie.source.column === ge.source.column ? Ie.source.y1 - ge.source.y1 : Ie.source.column - ge.source.column : Ie.circularLinkType === ge.circularLinkType && Ie.circularLinkType == "bottom" ? Ie.source.column === ge.source.column ? Ie.source.y1 - ge.source.y1 : ge.source.column - Ie.source.column : Ie.circularLinkType == "top" ? -1 : 1 : void 0;
            });
            var Ne = Le.y0;
            We.forEach(function(Ie) {
              Ie.y1 = Ne + Ie.width / 2, Ne += Ie.width;
            }), We.forEach(function(Ie, ge) {
              if (Ie.circularLinkType == "bottom") {
                for (var Ce = ge + 1, we = 0; Ce < Ee; Ce++) we += We[Ce].width;
                Ie.y1 = Le.y1 - we - Ie.width / 2;
              }
            });
          });
        }
        function pe(Se, Me) {
          return be(Se) == be(Me);
        }
        function be(Se) {
          return Se.y0 - Se.y1 > 0 ? "up" : "down";
        }
        function Ae(Se, Me) {
          return O(Se.source, Me) == O(Se.target, Me);
        }
      }, 62369: function(o, s, n) {
        n.r(s), n.d(s, { sankey: function() {
          return E;
        }, sankeyCenter: function() {
          return d;
        }, sankeyJustify: function() {
          return _;
        }, sankeyLeft: function() {
          return h;
        }, sankeyLinkHorizontal: function() {
          return O;
        }, sankeyRight: function() {
          return p;
        } });
        var l = n(29725), u = n(4575);
        function i(T) {
          return T.target.depth;
        }
        function h(T) {
          return T.depth;
        }
        function p(T, z) {
          return z - 1 - T.height;
        }
        function _(T, z) {
          return T.sourceLinks.length ? T.depth : z - 1;
        }
        function d(T) {
          return T.targetLinks.length ? T.depth : T.sourceLinks.length ? (0, l.jk)(T.sourceLinks, i) - 1 : 0;
        }
        function f(T) {
          return function() {
            return T;
          };
        }
        function c(T, z) {
          return m(T.source, z.source) || T.index - z.index;
        }
        function g(T, z) {
          return m(T.target, z.target) || T.index - z.index;
        }
        function m(T, z) {
          return T.y0 - z.y0;
        }
        function x(T) {
          return T.value;
        }
        function w(T) {
          return (T.y0 + T.y1) / 2;
        }
        function k(T) {
          return w(T.source) * T.value;
        }
        function S(T) {
          return w(T.target) * T.value;
        }
        function A(T) {
          return T.index;
        }
        function C(T) {
          return T.nodes;
        }
        function D(T) {
          return T.links;
        }
        function L(T, z) {
          var F = T.get(z);
          if (!F) throw new Error("missing: " + z);
          return F;
        }
        function E() {
          var T = 0, z = 0, F = 1, U = 1, V = 24, $ = 8, q = A, K = _, re = C, Y = D, te = 32;
          function ee() {
            var Q = { nodes: re.apply(null, arguments), links: Y.apply(null, arguments) };
            return function(ue) {
              ue.nodes.forEach(function(he, de) {
                he.index = de, he.sourceLinks = [], he.targetLinks = [];
              });
              var ce = (0, u.Tj)(ue.nodes, q);
              ue.links.forEach(function(he, de) {
                he.index = de;
                var ne = he.source, ae = he.target;
                typeof ne != "object" && (ne = he.source = L(ce, ne)), typeof ae != "object" && (ae = he.target = L(ce, ae)), ne.sourceLinks.push(he), ae.targetLinks.push(he);
              });
            }(Q), function(ue) {
              ue.nodes.forEach(function(ce) {
                ce.value = Math.max((0, l.cz)(ce.sourceLinks, x), (0, l.cz)(ce.targetLinks, x));
              });
            }(Q), function(ue) {
              var ce, he, de;
              for (ce = ue.nodes, he = [], de = 0; ce.length; ++de, ce = he, he = []) ce.forEach(function(ae) {
                ae.depth = de, ae.sourceLinks.forEach(function(se) {
                  he.indexOf(se.target) < 0 && he.push(se.target);
                });
              });
              for (ce = ue.nodes, he = [], de = 0; ce.length; ++de, ce = he, he = []) ce.forEach(function(ae) {
                ae.height = de, ae.targetLinks.forEach(function(se) {
                  he.indexOf(se.source) < 0 && he.push(se.source);
                });
              });
              var ne = (F - T - V) / (de - 1);
              ue.nodes.forEach(function(ae) {
                ae.x1 = (ae.x0 = T + Math.max(0, Math.min(de - 1, Math.floor(K.call(null, ae, de)))) * ne) + V;
              });
            }(Q), function(ue) {
              var ce = (0, u.$I)().key(function(me) {
                return me.x0;
              }).sortKeys(l.V_).entries(ue.nodes).map(function(me) {
                return me.values;
              });
              (function() {
                var me = (0, l.T9)(ce, function(be) {
                  return be.length;
                }), ye = 0.6666666666666666 * (U - z) / (me - 1);
                $ > ye && ($ = ye);
                var pe = (0, l.jk)(ce, function(be) {
                  return (U - z - (be.length - 1) * $) / (0, l.cz)(be, x);
                });
                ce.forEach(function(be) {
                  be.forEach(function(Ae, Se) {
                    Ae.y1 = (Ae.y0 = Se) + Ae.value * pe;
                  });
                }), ue.links.forEach(function(be) {
                  be.width = be.value * pe;
                });
              })(), se();
              for (var he = 1, de = te; de > 0; --de) ae(he *= 0.99), se(), ne(he), se();
              function ne(me) {
                ce.forEach(function(ye) {
                  ye.forEach(function(pe) {
                    if (pe.targetLinks.length) {
                      var be = ((0, l.cz)(pe.targetLinks, k) / (0, l.cz)(pe.targetLinks, x) - w(pe)) * me;
                      pe.y0 += be, pe.y1 += be;
                    }
                  });
                });
              }
              function ae(me) {
                ce.slice().reverse().forEach(function(ye) {
                  ye.forEach(function(pe) {
                    if (pe.sourceLinks.length) {
                      var be = ((0, l.cz)(pe.sourceLinks, S) / (0, l.cz)(pe.sourceLinks, x) - w(pe)) * me;
                      pe.y0 += be, pe.y1 += be;
                    }
                  });
                });
              }
              function se() {
                ce.forEach(function(me) {
                  var ye, pe, be, Ae = z, Se = me.length;
                  for (me.sort(m), be = 0; be < Se; ++be) (pe = Ae - (ye = me[be]).y0) > 0 && (ye.y0 += pe, ye.y1 += pe), Ae = ye.y1 + $;
                  if ((pe = Ae - $ - U) > 0) for (Ae = ye.y0 -= pe, ye.y1 -= pe, be = Se - 2; be >= 0; --be) (pe = (ye = me[be]).y1 + $ - Ae) > 0 && (ye.y0 -= pe, ye.y1 -= pe), Ae = ye.y0;
                });
              }
            }(Q), X(Q), Q;
          }
          function X(Q) {
            Q.nodes.forEach(function(ue) {
              ue.sourceLinks.sort(g), ue.targetLinks.sort(c);
            }), Q.nodes.forEach(function(ue) {
              var ce = ue.y0, he = ce;
              ue.sourceLinks.forEach(function(de) {
                de.y0 = ce + de.width / 2, ce += de.width;
              }), ue.targetLinks.forEach(function(de) {
                de.y1 = he + de.width / 2, he += de.width;
              });
            });
          }
          return ee.update = function(Q) {
            return X(Q), Q;
          }, ee.nodeId = function(Q) {
            return arguments.length ? (q = typeof Q == "function" ? Q : f(Q), ee) : q;
          }, ee.nodeAlign = function(Q) {
            return arguments.length ? (K = typeof Q == "function" ? Q : f(Q), ee) : K;
          }, ee.nodeWidth = function(Q) {
            return arguments.length ? (V = +Q, ee) : V;
          }, ee.nodePadding = function(Q) {
            return arguments.length ? ($ = +Q, ee) : $;
          }, ee.nodes = function(Q) {
            return arguments.length ? (re = typeof Q == "function" ? Q : f(Q), ee) : re;
          }, ee.links = function(Q) {
            return arguments.length ? (Y = typeof Q == "function" ? Q : f(Q), ee) : Y;
          }, ee.size = function(Q) {
            return arguments.length ? (T = z = 0, F = +Q[0], U = +Q[1], ee) : [F - T, U - z];
          }, ee.extent = function(Q) {
            return arguments.length ? (T = +Q[0][0], F = +Q[1][0], z = +Q[0][1], U = +Q[1][1], ee) : [[T, z], [F, U]];
          }, ee.iterations = function(Q) {
            return arguments.length ? (te = +Q, ee) : te;
          }, ee;
        }
        var P = n(48544);
        function I(T) {
          return [T.source.x1, T.y0];
        }
        function M(T) {
          return [T.target.x0, T.y1];
        }
        function O() {
          return (0, P.pq)().source(I).target(M);
        }
      }, 45568: function(o, s, n) {
        var l, u;
        (function() {
          var i = { version: "3.8.2" }, h = [].slice, p = function(b) {
            return h.call(b);
          }, _ = self.document;
          function d(b) {
            return b && (b.ownerDocument || b.document || b).documentElement;
          }
          function f(b) {
            return b && (b.ownerDocument && b.ownerDocument.defaultView || b.document && b || b.defaultView);
          }
          if (_) try {
            p(_.documentElement.childNodes)[0].nodeType;
          } catch {
            p = function(R) {
              for (var j = R.length, G = new Array(j); j--; ) G[j] = R[j];
              return G;
            };
          }
          if (Date.now || (Date.now = function() {
            return +/* @__PURE__ */ new Date();
          }), _) try {
            _.createElement("DIV").style.setProperty("opacity", 0, "");
          } catch {
            var c = this.Element.prototype, g = c.setAttribute, m = c.setAttributeNS, x = this.CSSStyleDeclaration.prototype, w = x.setProperty;
            c.setAttribute = function(R, j) {
              g.call(this, R, j + "");
            }, c.setAttributeNS = function(R, j, G) {
              m.call(this, R, j, G + "");
            }, x.setProperty = function(R, j, G) {
              w.call(this, R, j + "", G);
            };
          }
          function k(b, R) {
            return b < R ? -1 : b > R ? 1 : b >= R ? 0 : NaN;
          }
          function S(b) {
            return b === null ? NaN : +b;
          }
          function A(b) {
            return !isNaN(b);
          }
          function C(b) {
            return { left: function(R, j, G, ie) {
              for (arguments.length < 3 && (G = 0), arguments.length < 4 && (ie = R.length); G < ie; ) {
                var fe = G + ie >>> 1;
                b(R[fe], j) < 0 ? G = fe + 1 : ie = fe;
              }
              return G;
            }, right: function(R, j, G, ie) {
              for (arguments.length < 3 && (G = 0), arguments.length < 4 && (ie = R.length); G < ie; ) {
                var fe = G + ie >>> 1;
                b(R[fe], j) > 0 ? ie = fe : G = fe + 1;
              }
              return G;
            } };
          }
          i.ascending = k, i.descending = function(b, R) {
            return R < b ? -1 : R > b ? 1 : R >= b ? 0 : NaN;
          }, i.min = function(b, R) {
            var j, G, ie = -1, fe = b.length;
            if (arguments.length === 1) {
              for (; ++ie < fe; ) if ((G = b[ie]) != null && G >= G) {
                j = G;
                break;
              }
              for (; ++ie < fe; ) (G = b[ie]) != null && j > G && (j = G);
            } else {
              for (; ++ie < fe; ) if ((G = R.call(b, b[ie], ie)) != null && G >= G) {
                j = G;
                break;
              }
              for (; ++ie < fe; ) (G = R.call(b, b[ie], ie)) != null && j > G && (j = G);
            }
            return j;
          }, i.max = function(b, R) {
            var j, G, ie = -1, fe = b.length;
            if (arguments.length === 1) {
              for (; ++ie < fe; ) if ((G = b[ie]) != null && G >= G) {
                j = G;
                break;
              }
              for (; ++ie < fe; ) (G = b[ie]) != null && G > j && (j = G);
            } else {
              for (; ++ie < fe; ) if ((G = R.call(b, b[ie], ie)) != null && G >= G) {
                j = G;
                break;
              }
              for (; ++ie < fe; ) (G = R.call(b, b[ie], ie)) != null && G > j && (j = G);
            }
            return j;
          }, i.extent = function(b, R) {
            var j, G, ie, fe = -1, xe = b.length;
            if (arguments.length === 1) {
              for (; ++fe < xe; ) if ((G = b[fe]) != null && G >= G) {
                j = ie = G;
                break;
              }
              for (; ++fe < xe; ) (G = b[fe]) != null && (j > G && (j = G), ie < G && (ie = G));
            } else {
              for (; ++fe < xe; ) if ((G = R.call(b, b[fe], fe)) != null && G >= G) {
                j = ie = G;
                break;
              }
              for (; ++fe < xe; ) (G = R.call(b, b[fe], fe)) != null && (j > G && (j = G), ie < G && (ie = G));
            }
            return [j, ie];
          }, i.sum = function(b, R) {
            var j, G = 0, ie = b.length, fe = -1;
            if (arguments.length === 1) for (; ++fe < ie; ) A(j = +b[fe]) && (G += j);
            else for (; ++fe < ie; ) A(j = +R.call(b, b[fe], fe)) && (G += j);
            return G;
          }, i.mean = function(b, R) {
            var j, G = 0, ie = b.length, fe = -1, xe = ie;
            if (arguments.length === 1) for (; ++fe < ie; ) A(j = S(b[fe])) ? G += j : --xe;
            else for (; ++fe < ie; ) A(j = S(R.call(b, b[fe], fe))) ? G += j : --xe;
            if (xe) return G / xe;
          }, i.quantile = function(b, R) {
            var j = (b.length - 1) * R + 1, G = Math.floor(j), ie = +b[G - 1], fe = j - G;
            return fe ? ie + fe * (b[G] - ie) : ie;
          }, i.median = function(b, R) {
            var j, G = [], ie = b.length, fe = -1;
            if (arguments.length === 1) for (; ++fe < ie; ) A(j = S(b[fe])) && G.push(j);
            else for (; ++fe < ie; ) A(j = S(R.call(b, b[fe], fe))) && G.push(j);
            if (G.length) return i.quantile(G.sort(k), 0.5);
          }, i.variance = function(b, R) {
            var j, G, ie = b.length, fe = 0, xe = 0, Te = -1, ze = 0;
            if (arguments.length === 1) for (; ++Te < ie; ) A(j = S(b[Te])) && (xe += (G = j - fe) * (j - (fe += G / ++ze)));
            else for (; ++Te < ie; ) A(j = S(R.call(b, b[Te], Te))) && (xe += (G = j - fe) * (j - (fe += G / ++ze)));
            if (ze > 1) return xe / (ze - 1);
          }, i.deviation = function() {
            var b = i.variance.apply(this, arguments);
            return b && Math.sqrt(b);
          };
          var D = C(k);
          function L(b) {
            return b.length;
          }
          i.bisectLeft = D.left, i.bisect = i.bisectRight = D.right, i.bisector = function(b) {
            return C(b.length === 1 ? function(R, j) {
              return k(b(R), j);
            } : b);
          }, i.shuffle = function(b, R, j) {
            (fe = arguments.length) < 3 && (j = b.length, fe < 2 && (R = 0));
            for (var G, ie, fe = j - R; fe; ) ie = Math.random() * fe-- | 0, G = b[fe + R], b[fe + R] = b[ie + R], b[ie + R] = G;
            return b;
          }, i.permute = function(b, R) {
            for (var j = R.length, G = new Array(j); j--; ) G[j] = b[R[j]];
            return G;
          }, i.pairs = function(b) {
            for (var R = 0, j = b.length - 1, G = b[0], ie = new Array(j < 0 ? 0 : j); R < j; ) ie[R] = [G, G = b[++R]];
            return ie;
          }, i.transpose = function(b) {
            if (!(ie = b.length)) return [];
            for (var R = -1, j = i.min(b, L), G = new Array(j); ++R < j; ) for (var ie, fe = -1, xe = G[R] = new Array(ie); ++fe < ie; ) xe[fe] = b[fe][R];
            return G;
          }, i.zip = function() {
            return i.transpose(arguments);
          }, i.keys = function(b) {
            var R = [];
            for (var j in b) R.push(j);
            return R;
          }, i.values = function(b) {
            var R = [];
            for (var j in b) R.push(b[j]);
            return R;
          }, i.entries = function(b) {
            var R = [];
            for (var j in b) R.push({ key: j, value: b[j] });
            return R;
          }, i.merge = function(b) {
            for (var R, j, G, ie = b.length, fe = -1, xe = 0; ++fe < ie; ) xe += b[fe].length;
            for (j = new Array(xe); --ie >= 0; ) for (R = (G = b[ie]).length; --R >= 0; ) j[--xe] = G[R];
            return j;
          };
          var E = Math.abs;
          function P(b, R) {
            for (var j in R) Object.defineProperty(b.prototype, j, { value: R[j], enumerable: !1 });
          }
          function I() {
            this._ = /* @__PURE__ */ Object.create(null);
          }
          i.range = function(b, R, j) {
            if (arguments.length < 3 && (j = 1, arguments.length < 2 && (R = b, b = 0)), (R - b) / j == 1 / 0) throw new Error("infinite range");
            var G, ie = [], fe = function(Te) {
              for (var ze = 1; Te * ze % 1; ) ze *= 10;
              return ze;
            }(E(j)), xe = -1;
            if (b *= fe, R *= fe, (j *= fe) < 0) for (; (G = b + j * ++xe) > R; ) ie.push(G / fe);
            else for (; (G = b + j * ++xe) < R; ) ie.push(G / fe);
            return ie;
          }, i.map = function(b, R) {
            var j = new I();
            if (b instanceof I) b.forEach(function(Te, ze) {
              j.set(Te, ze);
            });
            else if (Array.isArray(b)) {
              var G, ie = -1, fe = b.length;
              if (arguments.length === 1) for (; ++ie < fe; ) j.set(ie, b[ie]);
              else for (; ++ie < fe; ) j.set(R.call(b, G = b[ie], ie), G);
            } else for (var xe in b) j.set(xe, b[xe]);
            return j;
          };
          var M = "__proto__", O = "\0";
          function T(b) {
            return (b += "") === M || b[0] === O ? O + b : b;
          }
          function z(b) {
            return (b += "")[0] === O ? b.slice(1) : b;
          }
          function F(b) {
            return T(b) in this._;
          }
          function U(b) {
            return (b = T(b)) in this._ && delete this._[b];
          }
          function V() {
            var b = [];
            for (var R in this._) b.push(z(R));
            return b;
          }
          function $() {
            var b = 0;
            for (var R in this._) ++b;
            return b;
          }
          function q() {
            for (var b in this._) return !1;
            return !0;
          }
          function K() {
            this._ = /* @__PURE__ */ Object.create(null);
          }
          function re(b) {
            return b;
          }
          function Y(b, R, j) {
            return function() {
              var G = j.apply(R, arguments);
              return G === R ? b : G;
            };
          }
          function te(b, R) {
            if (R in b) return R;
            R = R.charAt(0).toUpperCase() + R.slice(1);
            for (var j = 0, G = ee.length; j < G; ++j) {
              var ie = ee[j] + R;
              if (ie in b) return ie;
            }
          }
          P(I, { has: F, get: function(b) {
            return this._[T(b)];
          }, set: function(b, R) {
            return this._[T(b)] = R;
          }, remove: U, keys: V, values: function() {
            var b = [];
            for (var R in this._) b.push(this._[R]);
            return b;
          }, entries: function() {
            var b = [];
            for (var R in this._) b.push({ key: z(R), value: this._[R] });
            return b;
          }, size: $, empty: q, forEach: function(b) {
            for (var R in this._) b.call(this, z(R), this._[R]);
          } }), i.nest = function() {
            var b, R, j = {}, G = [], ie = [];
            function fe(Te, ze, Ve) {
              if (Ve >= G.length) return R ? R.call(j, ze) : b ? ze.sort(b) : ze;
              for (var ut, gt, wt, Et, zt = -1, It = ze.length, jt = G[Ve++], Lt = new I(); ++zt < It; ) (Et = Lt.get(ut = jt(gt = ze[zt]))) ? Et.push(gt) : Lt.set(ut, [gt]);
              return Te ? (gt = Te(), wt = function(Zt, Qt) {
                gt.set(Zt, fe(Te, Qt, Ve));
              }) : (gt = {}, wt = function(Zt, Qt) {
                gt[Zt] = fe(Te, Qt, Ve);
              }), Lt.forEach(wt), gt;
            }
            function xe(Te, ze) {
              if (ze >= G.length) return Te;
              var Ve = [], ut = ie[ze++];
              return Te.forEach(function(gt, wt) {
                Ve.push({ key: gt, values: xe(wt, ze) });
              }), ut ? Ve.sort(function(gt, wt) {
                return ut(gt.key, wt.key);
              }) : Ve;
            }
            return j.map = function(Te, ze) {
              return fe(ze, Te, 0);
            }, j.entries = function(Te) {
              return xe(fe(i.map, Te, 0), 0);
            }, j.key = function(Te) {
              return G.push(Te), j;
            }, j.sortKeys = function(Te) {
              return ie[G.length - 1] = Te, j;
            }, j.sortValues = function(Te) {
              return b = Te, j;
            }, j.rollup = function(Te) {
              return R = Te, j;
            }, j;
          }, i.set = function(b) {
            var R = new K();
            if (b) for (var j = 0, G = b.length; j < G; ++j) R.add(b[j]);
            return R;
          }, P(K, { has: F, add: function(b) {
            return this._[T(b += "")] = !0, b;
          }, remove: U, values: V, size: $, empty: q, forEach: function(b) {
            for (var R in this._) b.call(this, z(R));
          } }), i.behavior = {}, i.rebind = function(b, R) {
            for (var j, G = 1, ie = arguments.length; ++G < ie; ) b[j = arguments[G]] = Y(b, R, R[j]);
            return b;
          };
          var ee = ["webkit", "ms", "moz", "Moz", "o", "O"];
          function X() {
          }
          function Q() {
          }
          function ue(b) {
            var R = [], j = new I();
            function G() {
              for (var ie, fe = R, xe = -1, Te = fe.length; ++xe < Te; ) (ie = fe[xe].on) && ie.apply(this, arguments);
              return b;
            }
            return G.on = function(ie, fe) {
              var xe, Te = j.get(ie);
              return arguments.length < 2 ? Te && Te.on : (Te && (Te.on = null, R = R.slice(0, xe = R.indexOf(Te)).concat(R.slice(xe + 1)), j.remove(ie)), fe && R.push(j.set(ie, { on: fe })), b);
            }, G;
          }
          function ce() {
            i.event.preventDefault();
          }
          function he() {
            for (var b, R = i.event; b = R.sourceEvent; ) R = b;
            return R;
          }
          function de(b) {
            for (var R = new Q(), j = 0, G = arguments.length; ++j < G; ) R[arguments[j]] = ue(R);
            return R.of = function(ie, fe) {
              return function(xe) {
                try {
                  var Te = xe.sourceEvent = i.event;
                  xe.target = b, i.event = xe, R[xe.type].apply(ie, fe);
                } finally {
                  i.event = Te;
                }
              };
            }, R;
          }
          i.dispatch = function() {
            for (var b = new Q(), R = -1, j = arguments.length; ++R < j; ) b[arguments[R]] = ue(b);
            return b;
          }, Q.prototype.on = function(b, R) {
            var j = b.indexOf("."), G = "";
            if (j >= 0 && (G = b.slice(j + 1), b = b.slice(0, j)), b) return arguments.length < 2 ? this[b].on(G) : this[b].on(G, R);
            if (arguments.length === 2) {
              if (R == null) for (b in this) this.hasOwnProperty(b) && this[b].on(G, null);
              return this;
            }
          }, i.event = null, i.requote = function(b) {
            return b.replace(ne, "\\$&");
          };
          var ne = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g, ae = {}.__proto__ ? function(b, R) {
            b.__proto__ = R;
          } : function(b, R) {
            for (var j in R) b[j] = R[j];
          };
          function se(b) {
            return ae(b, be), b;
          }
          var me = function(b, R) {
            return R.querySelector(b);
          }, ye = function(b, R) {
            return R.querySelectorAll(b);
          }, pe = function(b, R) {
            var j = b.matches || b[te(b, "matchesSelector")];
            return pe = function(G, ie) {
              return j.call(G, ie);
            }, pe(b, R);
          };
          typeof Sizzle == "function" && (me = function(b, R) {
            return Sizzle(b, R)[0] || null;
          }, ye = Sizzle, pe = Sizzle.matchesSelector), i.selection = function() {
            return i.select(_.documentElement);
          };
          var be = i.selection.prototype = [];
          function Ae(b) {
            return typeof b == "function" ? b : function() {
              return me(b, this);
            };
          }
          function Se(b) {
            return typeof b == "function" ? b : function() {
              return ye(b, this);
            };
          }
          be.select = function(b) {
            var R, j, G, ie, fe = [];
            b = Ae(b);
            for (var xe = -1, Te = this.length; ++xe < Te; ) {
              fe.push(R = []), R.parentNode = (G = this[xe]).parentNode;
              for (var ze = -1, Ve = G.length; ++ze < Ve; ) (ie = G[ze]) ? (R.push(j = b.call(ie, ie.__data__, ze, xe)), j && "__data__" in ie && (j.__data__ = ie.__data__)) : R.push(null);
            }
            return se(fe);
          }, be.selectAll = function(b) {
            var R, j, G = [];
            b = Se(b);
            for (var ie = -1, fe = this.length; ++ie < fe; ) for (var xe = this[ie], Te = -1, ze = xe.length; ++Te < ze; ) (j = xe[Te]) && (G.push(R = p(b.call(j, j.__data__, Te, ie))), R.parentNode = j);
            return se(G);
          };
          var Me = "http://www.w3.org/1999/xhtml", De = { svg: "http://www.w3.org/2000/svg", xhtml: Me, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" };
          function Le(b, R) {
            return b = i.ns.qualify(b), R == null ? b.local ? function() {
              this.removeAttributeNS(b.space, b.local);
            } : function() {
              this.removeAttribute(b);
            } : typeof R == "function" ? b.local ? function() {
              var j = R.apply(this, arguments);
              j == null ? this.removeAttributeNS(b.space, b.local) : this.setAttributeNS(b.space, b.local, j);
            } : function() {
              var j = R.apply(this, arguments);
              j == null ? this.removeAttribute(b) : this.setAttribute(b, j);
            } : b.local ? function() {
              this.setAttributeNS(b.space, b.local, R);
            } : function() {
              this.setAttribute(b, R);
            };
          }
          function We(b) {
            return b.trim().replace(/\s+/g, " ");
          }
          function Ee(b) {
            return new RegExp("(?:^|\\s+)" + i.requote(b) + "(?:\\s+|$)", "g");
          }
          function Ne(b) {
            return (b + "").trim().split(/^|\s+/);
          }
          function Ie(b, R) {
            var j = (b = Ne(b).map(ge)).length;
            return typeof R == "function" ? function() {
              for (var G = -1, ie = R.apply(this, arguments); ++G < j; ) b[G](this, ie);
            } : function() {
              for (var G = -1; ++G < j; ) b[G](this, R);
            };
          }
          function ge(b) {
            var R = Ee(b);
            return function(j, G) {
              if (ie = j.classList) return G ? ie.add(b) : ie.remove(b);
              var ie = j.getAttribute("class") || "";
              G ? (R.lastIndex = 0, R.test(ie) || j.setAttribute("class", We(ie + " " + b))) : j.setAttribute("class", We(ie.replace(R, " ")));
            };
          }
          function Ce(b, R, j) {
            return R == null ? function() {
              this.style.removeProperty(b);
            } : typeof R == "function" ? function() {
              var G = R.apply(this, arguments);
              G == null ? this.style.removeProperty(b) : this.style.setProperty(b, G, j);
            } : function() {
              this.style.setProperty(b, R, j);
            };
          }
          function we(b, R) {
            return R == null ? function() {
              delete this[b];
            } : typeof R == "function" ? function() {
              var j = R.apply(this, arguments);
              j == null ? delete this[b] : this[b] = j;
            } : function() {
              this[b] = R;
            };
          }
          function Ge(b) {
            return typeof b == "function" ? b : (b = i.ns.qualify(b)).local ? function() {
              return this.ownerDocument.createElementNS(b.space, b.local);
            } : function() {
              var R = this.ownerDocument, j = this.namespaceURI;
              return j === Me && R.documentElement.namespaceURI === Me ? R.createElement(b) : R.createElementNS(j, b);
            };
          }
          function Re() {
            var b = this.parentNode;
            b && b.removeChild(this);
          }
          function je(b) {
            return { __data__: b };
          }
          function Ke(b) {
            return function() {
              return pe(this, b);
            };
          }
          function tt(b) {
            return arguments.length || (b = k), function(R, j) {
              return R && j ? b(R.__data__, j.__data__) : !R - !j;
            };
          }
          function _e(b, R) {
            for (var j = 0, G = b.length; j < G; j++) for (var ie, fe = b[j], xe = 0, Te = fe.length; xe < Te; xe++) (ie = fe[xe]) && R(ie, xe, j);
            return b;
          }
          function Be(b) {
            return ae(b, $e), b;
          }
          i.ns = { prefix: De, qualify: function(b) {
            var R = b.indexOf(":"), j = b;
            return R >= 0 && (j = b.slice(0, R)) !== "xmlns" && (b = b.slice(R + 1)), De.hasOwnProperty(j) ? { space: De[j], local: b } : b;
          } }, be.attr = function(b, R) {
            if (arguments.length < 2) {
              if (typeof b == "string") {
                var j = this.node();
                return (b = i.ns.qualify(b)).local ? j.getAttributeNS(b.space, b.local) : j.getAttribute(b);
              }
              for (R in b) this.each(Le(R, b[R]));
              return this;
            }
            return this.each(Le(b, R));
          }, be.classed = function(b, R) {
            if (arguments.length < 2) {
              if (typeof b == "string") {
                var j = this.node(), G = (b = Ne(b)).length, ie = -1;
                if (R = j.classList) {
                  for (; ++ie < G; ) if (!R.contains(b[ie])) return !1;
                } else for (R = j.getAttribute("class"); ++ie < G; ) if (!Ee(b[ie]).test(R)) return !1;
                return !0;
              }
              for (R in b) this.each(Ie(R, b[R]));
              return this;
            }
            return this.each(Ie(b, R));
          }, be.style = function(b, R, j) {
            var G = arguments.length;
            if (G < 3) {
              if (typeof b != "string") {
                for (j in G < 2 && (R = ""), b) this.each(Ce(j, b[j], R));
                return this;
              }
              if (G < 2) {
                var ie = this.node();
                return f(ie).getComputedStyle(ie, null).getPropertyValue(b);
              }
              j = "";
            }
            return this.each(Ce(b, R, j));
          }, be.property = function(b, R) {
            if (arguments.length < 2) {
              if (typeof b == "string") return this.node()[b];
              for (R in b) this.each(we(R, b[R]));
              return this;
            }
            return this.each(we(b, R));
          }, be.text = function(b) {
            return arguments.length ? this.each(typeof b == "function" ? function() {
              var R = b.apply(this, arguments);
              this.textContent = R ?? "";
            } : b == null ? function() {
              this.textContent = "";
            } : function() {
              this.textContent = b;
            }) : this.node().textContent;
          }, be.html = function(b) {
            return arguments.length ? this.each(typeof b == "function" ? function() {
              var R = b.apply(this, arguments);
              this.innerHTML = R ?? "";
            } : b == null ? function() {
              this.innerHTML = "";
            } : function() {
              this.innerHTML = b;
            }) : this.node().innerHTML;
          }, be.append = function(b) {
            return b = Ge(b), this.select(function() {
              return this.appendChild(b.apply(this, arguments));
            });
          }, be.insert = function(b, R) {
            return b = Ge(b), R = Ae(R), this.select(function() {
              return this.insertBefore(b.apply(this, arguments), R.apply(this, arguments) || null);
            });
          }, be.remove = function() {
            return this.each(Re);
          }, be.data = function(b, R) {
            var j, G, ie = -1, fe = this.length;
            if (!arguments.length) {
              for (b = new Array(fe = (j = this[0]).length); ++ie < fe; ) (G = j[ie]) && (b[ie] = G.__data__);
              return b;
            }
            function xe(ut, gt) {
              var wt, Et, zt, It = ut.length, jt = gt.length, Lt = Math.min(It, jt), Zt = new Array(jt), Qt = new Array(jt), Xt = new Array(It);
              if (R) {
                var yn, Sn = new I(), Un = new Array(It);
                for (wt = -1; ++wt < It; ) (Et = ut[wt]) && (Sn.has(yn = R.call(Et, Et.__data__, wt)) ? Xt[wt] = Et : Sn.set(yn, Et), Un[wt] = yn);
                for (wt = -1; ++wt < jt; ) (Et = Sn.get(yn = R.call(gt, zt = gt[wt], wt))) ? Et !== !0 && (Zt[wt] = Et, Et.__data__ = zt) : Qt[wt] = je(zt), Sn.set(yn, !0);
                for (wt = -1; ++wt < It; ) wt in Un && Sn.get(Un[wt]) !== !0 && (Xt[wt] = ut[wt]);
              } else {
                for (wt = -1; ++wt < Lt; ) Et = ut[wt], zt = gt[wt], Et ? (Et.__data__ = zt, Zt[wt] = Et) : Qt[wt] = je(zt);
                for (; wt < jt; ++wt) Qt[wt] = je(gt[wt]);
                for (; wt < It; ++wt) Xt[wt] = ut[wt];
              }
              Qt.update = Zt, Qt.parentNode = Zt.parentNode = Xt.parentNode = ut.parentNode, Te.push(Qt), ze.push(Zt), Ve.push(Xt);
            }
            var Te = Be([]), ze = se([]), Ve = se([]);
            if (typeof b == "function") for (; ++ie < fe; ) xe(j = this[ie], b.call(j, j.parentNode.__data__, ie));
            else for (; ++ie < fe; ) xe(j = this[ie], b);
            return ze.enter = function() {
              return Te;
            }, ze.exit = function() {
              return Ve;
            }, ze;
          }, be.datum = function(b) {
            return arguments.length ? this.property("__data__", b) : this.property("__data__");
          }, be.filter = function(b) {
            var R, j, G, ie = [];
            typeof b != "function" && (b = Ke(b));
            for (var fe = 0, xe = this.length; fe < xe; fe++) {
              ie.push(R = []), R.parentNode = (j = this[fe]).parentNode;
              for (var Te = 0, ze = j.length; Te < ze; Te++) (G = j[Te]) && b.call(G, G.__data__, Te, fe) && R.push(G);
            }
            return se(ie);
          }, be.order = function() {
            for (var b = -1, R = this.length; ++b < R; ) for (var j, G = this[b], ie = G.length - 1, fe = G[ie]; --ie >= 0; ) (j = G[ie]) && (fe && fe !== j.nextSibling && fe.parentNode.insertBefore(j, fe), fe = j);
            return this;
          }, be.sort = function(b) {
            b = tt.apply(this, arguments);
            for (var R = -1, j = this.length; ++R < j; ) this[R].sort(b);
            return this.order();
          }, be.each = function(b) {
            return _e(this, function(R, j, G) {
              b.call(R, R.__data__, j, G);
            });
          }, be.call = function(b) {
            var R = p(arguments);
            return b.apply(R[0] = this, R), this;
          }, be.empty = function() {
            return !this.node();
          }, be.node = function() {
            for (var b = 0, R = this.length; b < R; b++) for (var j = this[b], G = 0, ie = j.length; G < ie; G++) {
              var fe = j[G];
              if (fe) return fe;
            }
            return null;
          }, be.size = function() {
            var b = 0;
            return _e(this, function() {
              ++b;
            }), b;
          };
          var $e = [];
          function Ze(b, R, j) {
            var G = "__on" + b, ie = b.indexOf("."), fe = ft;
            ie > 0 && (b = b.slice(0, ie));
            var xe = ct.get(b);
            function Te() {
              var ze = this[G];
              ze && (this.removeEventListener(b, ze, ze.$), delete this[G]);
            }
            return xe && (b = xe, fe = _t), ie ? R ? function() {
              var ze = fe(R, p(arguments));
              Te.call(this), this.addEventListener(b, this[G] = ze, ze.$ = j), ze._ = R;
            } : Te : R ? X : function() {
              var ze, Ve = new RegExp("^__on([^.]+)" + i.requote(b) + "$");
              for (var ut in this) if (ze = ut.match(Ve)) {
                var gt = this[ut];
                this.removeEventListener(ze[1], gt, gt.$), delete this[ut];
              }
            };
          }
          i.selection.enter = Be, i.selection.enter.prototype = $e, $e.append = be.append, $e.empty = be.empty, $e.node = be.node, $e.call = be.call, $e.size = be.size, $e.select = function(b) {
            for (var R, j, G, ie, fe, xe = [], Te = -1, ze = this.length; ++Te < ze; ) {
              G = (ie = this[Te]).update, xe.push(R = []), R.parentNode = ie.parentNode;
              for (var Ve = -1, ut = ie.length; ++Ve < ut; ) (fe = ie[Ve]) ? (R.push(G[Ve] = j = b.call(ie.parentNode, fe.__data__, Ve, Te)), j.__data__ = fe.__data__) : R.push(null);
            }
            return se(xe);
          }, $e.insert = function(b, R) {
            var j, G, ie;
            return arguments.length < 2 && (j = this, R = function(fe, xe, Te) {
              var ze, Ve = j[Te].update, ut = Ve.length;
              for (Te != ie && (ie = Te, G = 0), xe >= G && (G = xe + 1); !(ze = Ve[G]) && ++G < ut; ) ;
              return ze;
            }), be.insert.call(this, b, R);
          }, i.select = function(b) {
            var R;
            return typeof b == "string" ? (R = [me(b, _)]).parentNode = _.documentElement : (R = [b]).parentNode = d(b), se([R]);
          }, i.selectAll = function(b) {
            var R;
            return typeof b == "string" ? (R = p(ye(b, _))).parentNode = _.documentElement : (R = p(b)).parentNode = null, se([R]);
          }, be.on = function(b, R, j) {
            var G = arguments.length;
            if (G < 3) {
              if (typeof b != "string") {
                for (j in G < 2 && (R = !1), b) this.each(Ze(j, b[j], R));
                return this;
              }
              if (G < 2) return (G = this.node()["__on" + b]) && G._;
              j = !1;
            }
            return this.each(Ze(b, R, j));
          };
          var ct = i.map({ mouseenter: "mouseover", mouseleave: "mouseout" });
          function ft(b, R) {
            return function(j) {
              var G = i.event;
              i.event = j, R[0] = this.__data__;
              try {
                b.apply(this, R);
              } finally {
                i.event = G;
              }
            };
          }
          function _t(b, R) {
            var j = ft(b, R);
            return function(G) {
              var ie = this, fe = G.relatedTarget;
              fe && (fe === ie || 8 & fe.compareDocumentPosition(ie)) || j.call(ie, G);
            };
          }
          _ && ct.forEach(function(b) {
            "on" + b in _ && ct.remove(b);
          });
          var Pt, Dt = 0;
          function $t(b) {
            var R = ".dragsuppress-" + ++Dt, j = "click" + R, G = i.select(f(b)).on("touchmove" + R, ce).on("dragstart" + R, ce).on("selectstart" + R, ce);
            if (Pt == null && (Pt = !("onselectstart" in b) && te(b.style, "userSelect")), Pt) {
              var ie = d(b).style, fe = ie[Pt];
              ie[Pt] = "none";
            }
            return function(xe) {
              if (G.on(R, null), Pt && (ie[Pt] = fe), xe) {
                var Te = function() {
                  G.on(j, null);
                };
                G.on(j, function() {
                  ce(), Te();
                }, !0), setTimeout(Te, 0);
              }
            };
          }
          i.mouse = function(b) {
            return Wt(b, he());
          };
          var Gt = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
          function Wt(b, R) {
            R.changedTouches && (R = R.changedTouches[0]);
            var j = b.ownerSVGElement || b;
            if (j.createSVGPoint) {
              var G = j.createSVGPoint();
              if (Gt < 0) {
                var ie = f(b);
                if (ie.scrollX || ie.scrollY) {
                  var fe = (j = i.select("body").append("svg").style({ position: "absolute", top: 0, left: 0, margin: 0, padding: 0, border: "none" }, "important"))[0][0].getScreenCTM();
                  Gt = !(fe.f || fe.e), j.remove();
                }
              }
              return Gt ? (G.x = R.pageX, G.y = R.pageY) : (G.x = R.clientX, G.y = R.clientY), [(G = G.matrixTransform(b.getScreenCTM().inverse())).x, G.y];
            }
            var xe = b.getBoundingClientRect();
            return [R.clientX - xe.left - b.clientLeft, R.clientY - xe.top - b.clientTop];
          }
          function mt() {
            return i.event.changedTouches[0].identifier;
          }
          i.touch = function(b, R, j) {
            if (arguments.length < 3 && (j = R, R = he().changedTouches), R) {
              for (var G, ie = 0, fe = R.length; ie < fe; ++ie) if ((G = R[ie]).identifier === j) return Wt(b, G);
            }
          }, i.behavior.drag = function() {
            var b = de(ie, "drag", "dragstart", "dragend"), R = null, j = fe(X, i.mouse, f, "mousemove", "mouseup"), G = fe(mt, i.touch, re, "touchmove", "touchend");
            function ie() {
              this.on("mousedown.drag", j).on("touchstart.drag", G);
            }
            function fe(xe, Te, ze, Ve, ut) {
              return function() {
                var gt, wt = this, Et = i.event.target.correspondingElement || i.event.target, zt = wt.parentNode, It = b.of(wt, arguments), jt = 0, Lt = xe(), Zt = ".drag" + (Lt == null ? "" : "-" + Lt), Qt = i.select(ze(Et)).on(Ve + Zt, function() {
                  var Sn, Un, Vn = Te(zt, Lt);
                  Vn && (Sn = Vn[0] - yn[0], Un = Vn[1] - yn[1], jt |= Sn | Un, yn = Vn, It({ type: "drag", x: Vn[0] + gt[0], y: Vn[1] + gt[1], dx: Sn, dy: Un }));
                }).on(ut + Zt, function() {
                  Te(zt, Lt) && (Qt.on(Ve + Zt, null).on(ut + Zt, null), Xt(jt), It({ type: "dragend" }));
                }), Xt = $t(Et), yn = Te(zt, Lt);
                gt = R ? [(gt = R.apply(wt, arguments)).x - yn[0], gt.y - yn[1]] : [0, 0], It({ type: "dragstart" });
              };
            }
            return ie.origin = function(xe) {
              return arguments.length ? (R = xe, ie) : R;
            }, i.rebind(ie, b, "on");
          }, i.touches = function(b, R) {
            return arguments.length < 2 && (R = he().touches), R ? p(R).map(function(j) {
              var G = Wt(b, j);
              return G.identifier = j.identifier, G;
            }) : [];
          };
          var at = 1e-6, vt = at * at, St = Math.PI, Je = 2 * St, nt = Je - at, ot = St / 2, Ye = St / 180, Fe = 180 / St;
          function pt(b) {
            return b > 1 ? ot : b < -1 ? -ot : Math.asin(b);
          }
          function Mt(b) {
            return ((b = Math.exp(b)) + 1 / b) / 2;
          }
          var At = Math.SQRT2;
          i.interpolateZoom = function(b, R) {
            var j, G, ie = b[0], fe = b[1], xe = b[2], Te = R[0], ze = R[1], Ve = R[2], ut = Te - ie, gt = ze - fe, wt = ut * ut + gt * gt;
            if (wt < vt) G = Math.log(Ve / xe) / At, j = function(Zt) {
              return [ie + Zt * ut, fe + Zt * gt, xe * Math.exp(At * Zt * G)];
            };
            else {
              var Et = Math.sqrt(wt), zt = (Ve * Ve - xe * xe + 4 * wt) / (2 * xe * 2 * Et), It = (Ve * Ve - xe * xe - 4 * wt) / (2 * Ve * 2 * Et), jt = Math.log(Math.sqrt(zt * zt + 1) - zt), Lt = Math.log(Math.sqrt(It * It + 1) - It);
              G = (Lt - jt) / At, j = function(Zt) {
                var Qt, Xt = Zt * G, yn = Mt(jt), Sn = xe / (2 * Et) * (yn * (Qt = At * Xt + jt, ((Qt = Math.exp(2 * Qt)) - 1) / (Qt + 1)) - function(Un) {
                  return ((Un = Math.exp(Un)) - 1 / Un) / 2;
                }(jt));
                return [ie + Sn * ut, fe + Sn * gt, xe * yn / Mt(At * Xt + jt)];
              };
            }
            return j.duration = 1e3 * G, j;
          }, i.behavior.zoom = function() {
            var b, R, j, G, ie, fe, xe, Te, ze, Ve = { x: 0, y: 0, k: 1 }, ut = [960, 500], gt = lt, wt = 250, Et = 0, zt = "mousedown.zoom", It = "mousemove.zoom", jt = "mouseup.zoom", Lt = "touchstart.zoom", Zt = de(Qt, "zoomstart", "zoom", "zoomend");
            function Qt(br) {
              br.on(zt, or).on(Ft + ".zoom", fr).on("dblclick.zoom", Or).on(Lt, Mr);
            }
            function Xt(br) {
              return [(br[0] - Ve.x) / Ve.k, (br[1] - Ve.y) / Ve.k];
            }
            function yn(br) {
              Ve.k = Math.max(gt[0], Math.min(gt[1], br));
            }
            function Sn(br, Nr) {
              Nr = function(ii) {
                return [ii[0] * Ve.k + Ve.x, ii[1] * Ve.k + Ve.y];
              }(Nr), Ve.x += br[0] - Nr[0], Ve.y += br[1] - Nr[1];
            }
            function Un(br, Nr, ii, Rr) {
              br.__chart__ = { x: Ve.x, y: Ve.y, k: Ve.k }, yn(Math.pow(2, Rr)), Sn(R = Nr, ii), br = i.select(br), wt > 0 && (br = br.transition().duration(wt)), br.call(Qt.event);
            }
            function Vn() {
              xe && xe.domain(fe.range().map(function(br) {
                return (br - Ve.x) / Ve.k;
              }).map(fe.invert)), ze && ze.domain(Te.range().map(function(br) {
                return (br - Ve.y) / Ve.k;
              }).map(Te.invert));
            }
            function Yn(br) {
              Et++ || br({ type: "zoomstart" });
            }
            function er(br) {
              Vn(), br({ type: "zoom", scale: Ve.k, translate: [Ve.x, Ve.y] });
            }
            function kr(br) {
              --Et || (br({ type: "zoomend" }), R = null);
            }
            function or() {
              var br = this, Nr = Zt.of(br, arguments), ii = 0, Rr = i.select(f(br)).on(It, function() {
                ii = 1, Sn(i.mouse(br), ei), er(Nr);
              }).on(jt, function() {
                Rr.on(It, null).on(jt, null), pi(ii), kr(Nr);
              }), ei = Xt(i.mouse(br)), pi = $t(br);
              us.call(br), Yn(Nr);
            }
            function Mr() {
              var br, Nr = this, ii = Zt.of(Nr, arguments), Rr = {}, ei = 0, pi = ".zoom-" + i.event.changedTouches[0].identifier, qi = "touchmove" + pi, Li = "touchend" + pi, Yi = [], Gi = i.select(Nr), ra = $t(Nr);
              function wa() {
                var Ia = i.touches(Nr);
                return br = Ve.k, Ia.forEach(function(ca) {
                  ca.identifier in Rr && (Rr[ca.identifier] = Xt(ca));
                }), Ia;
              }
              function uo() {
                var Ia = i.event.target;
                i.select(Ia).on(qi, no).on(Li, Ko), Yi.push(Ia);
                for (var ca = i.event.changedTouches, Ga = 0, Oa = ca.length; Ga < Oa; ++Ga) Rr[ca[Ga].identifier] = null;
                var ba = wa(), Da = Date.now();
                if (ba.length === 1) {
                  if (Da - ie < 500) {
                    var Ua = ba[0];
                    Un(Nr, Ua, Rr[Ua.identifier], Math.floor(Math.log(Ve.k) / Math.LN2) + 1), ce();
                  }
                  ie = Da;
                } else if (ba.length > 1) {
                  Ua = ba[0];
                  var pa = ba[1], lu = Ua[0] - pa[0], xo = Ua[1] - pa[1];
                  ei = lu * lu + xo * xo;
                }
              }
              function no() {
                var Ia, ca, Ga, Oa, ba = i.touches(Nr);
                us.call(Nr);
                for (var Da = 0, Ua = ba.length; Da < Ua; ++Da, Oa = null) if (Ga = ba[Da], Oa = Rr[Ga.identifier]) {
                  if (ca) break;
                  Ia = Ga, ca = Oa;
                }
                if (Oa) {
                  var pa = (pa = Ga[0] - Ia[0]) * pa + (pa = Ga[1] - Ia[1]) * pa, lu = ei && Math.sqrt(pa / ei);
                  Ia = [(Ia[0] + Ga[0]) / 2, (Ia[1] + Ga[1]) / 2], ca = [(ca[0] + Oa[0]) / 2, (ca[1] + Oa[1]) / 2], yn(lu * br);
                }
                ie = null, Sn(Ia, ca), er(ii);
              }
              function Ko() {
                if (i.event.touches.length) {
                  for (var Ia = i.event.changedTouches, ca = 0, Ga = Ia.length; ca < Ga; ++ca) delete Rr[Ia[ca].identifier];
                  for (var Oa in Rr) return void wa();
                }
                i.selectAll(Yi).on(pi, null), Gi.on(zt, or).on(Lt, Mr), ra(), kr(ii);
              }
              uo(), Yn(ii), Gi.on(zt, null).on(Lt, uo);
            }
            function fr() {
              var br = Zt.of(this, arguments);
              G ? clearTimeout(G) : (us.call(this), b = Xt(R = j || i.mouse(this)), Yn(br)), G = setTimeout(function() {
                G = null, kr(br);
              }, 50), ce(), yn(Math.pow(2, 2e-3 * Rt()) * Ve.k), Sn(R, b), er(br);
            }
            function Or() {
              var br = i.mouse(this), Nr = Math.log(Ve.k) / Math.LN2;
              Un(this, br, Xt(br), i.event.shiftKey ? Math.ceil(Nr) - 1 : Math.floor(Nr) + 1);
            }
            return Ft || (Ft = "onwheel" in _ ? (Rt = function() {
              return -i.event.deltaY * (i.event.deltaMode ? 120 : 1);
            }, "wheel") : "onmousewheel" in _ ? (Rt = function() {
              return i.event.wheelDelta;
            }, "mousewheel") : (Rt = function() {
              return -i.event.detail;
            }, "MozMousePixelScroll")), Qt.event = function(br) {
              br.each(function() {
                var Nr = Zt.of(this, arguments), ii = Ve;
                Za ? i.select(this).transition().each("start.zoom", function() {
                  Ve = this.__chart__ || { x: 0, y: 0, k: 1 }, Yn(Nr);
                }).tween("zoom:zoom", function() {
                  var Rr = ut[0], ei = ut[1], pi = R ? R[0] : Rr / 2, qi = R ? R[1] : ei / 2, Li = i.interpolateZoom([(pi - Ve.x) / Ve.k, (qi - Ve.y) / Ve.k, Rr / Ve.k], [(pi - ii.x) / ii.k, (qi - ii.y) / ii.k, Rr / ii.k]);
                  return function(Yi) {
                    var Gi = Li(Yi), ra = Rr / Gi[2];
                    this.__chart__ = Ve = { x: pi - Gi[0] * ra, y: qi - Gi[1] * ra, k: ra }, er(Nr);
                  };
                }).each("interrupt.zoom", function() {
                  kr(Nr);
                }).each("end.zoom", function() {
                  kr(Nr);
                }) : (this.__chart__ = Ve, Yn(Nr), er(Nr), kr(Nr));
              });
            }, Qt.translate = function(br) {
              return arguments.length ? (Ve = { x: +br[0], y: +br[1], k: Ve.k }, Vn(), Qt) : [Ve.x, Ve.y];
            }, Qt.scale = function(br) {
              return arguments.length ? (Ve = { x: Ve.x, y: Ve.y, k: null }, yn(+br), Vn(), Qt) : Ve.k;
            }, Qt.scaleExtent = function(br) {
              return arguments.length ? (gt = br == null ? lt : [+br[0], +br[1]], Qt) : gt;
            }, Qt.center = function(br) {
              return arguments.length ? (j = br && [+br[0], +br[1]], Qt) : j;
            }, Qt.size = function(br) {
              return arguments.length ? (ut = br && [+br[0], +br[1]], Qt) : ut;
            }, Qt.duration = function(br) {
              return arguments.length ? (wt = +br, Qt) : wt;
            }, Qt.x = function(br) {
              return arguments.length ? (xe = br, fe = br.copy(), Ve = { x: 0, y: 0, k: 1 }, Qt) : xe;
            }, Qt.y = function(br) {
              return arguments.length ? (ze = br, Te = br.copy(), Ve = { x: 0, y: 0, k: 1 }, Qt) : ze;
            }, i.rebind(Qt, Zt, "on");
          };
          var Rt, Ft, lt = [0, 1 / 0];
          function st() {
          }
          function Ot(b, R, j) {
            return this instanceof Ot ? (this.h = +b, this.s = +R, void (this.l = +j)) : arguments.length < 2 ? b instanceof Ot ? new Ot(b.h, b.s, b.l) : En("" + b, Kn, Ot) : new Ot(b, R, j);
          }
          i.color = st, st.prototype.toString = function() {
            return this.rgb() + "";
          }, i.hsl = Ot;
          var kt = Ot.prototype = new st();
          function Bt(b, R, j) {
            var G, ie;
            function fe(xe) {
              return Math.round(255 * function(Te) {
                return Te > 360 ? Te -= 360 : Te < 0 && (Te += 360), Te < 60 ? G + (ie - G) * Te / 60 : Te < 180 ? ie : Te < 240 ? G + (ie - G) * (240 - Te) / 60 : G;
              }(xe));
            }
            return b = isNaN(b) ? 0 : (b %= 360) < 0 ? b + 360 : b, R = isNaN(R) || R < 0 ? 0 : R > 1 ? 1 : R, G = 2 * (j = j < 0 ? 0 : j > 1 ? 1 : j) - (ie = j <= 0.5 ? j * (1 + R) : j + R - j * R), new Xn(fe(b + 120), fe(b), fe(b - 120));
          }
          function xt(b, R, j) {
            return this instanceof xt ? (this.h = +b, this.c = +R, void (this.l = +j)) : arguments.length < 2 ? b instanceof xt ? new xt(b.h, b.c, b.l) : function(G, ie, fe) {
              return G > 0 ? new xt(Math.atan2(fe, ie) * Fe, Math.sqrt(ie * ie + fe * fe), G) : new xt(NaN, NaN, G);
            }(b instanceof en ? b.l : (b = Wn((b = i.rgb(b)).r, b.g, b.b)).l, b.a, b.b) : new xt(b, R, j);
          }
          kt.brighter = function(b) {
            return b = Math.pow(0.7, arguments.length ? b : 1), new Ot(this.h, this.s, this.l / b);
          }, kt.darker = function(b) {
            return b = Math.pow(0.7, arguments.length ? b : 1), new Ot(this.h, this.s, b * this.l);
          }, kt.rgb = function() {
            return Bt(this.h, this.s, this.l);
          }, i.hcl = xt;
          var Jt = xt.prototype = new st();
          function qt(b, R, j) {
            return isNaN(b) && (b = 0), isNaN(R) && (R = 0), new en(j, Math.cos(b *= Ye) * R, Math.sin(b) * R);
          }
          function en(b, R, j) {
            return this instanceof en ? (this.l = +b, this.a = +R, void (this.b = +j)) : arguments.length < 2 ? b instanceof en ? new en(b.l, b.a, b.b) : b instanceof xt ? qt(b.h, b.c, b.l) : Wn((b = Xn(b)).r, b.g, b.b) : new en(b, R, j);
          }
          Jt.brighter = function(b) {
            return new xt(this.h, this.c, Math.min(100, this.l + Yt * (arguments.length ? b : 1)));
          }, Jt.darker = function(b) {
            return new xt(this.h, this.c, Math.max(0, this.l - Yt * (arguments.length ? b : 1)));
          }, Jt.rgb = function() {
            return qt(this.h, this.c, this.l).rgb();
          }, i.lab = en;
          var Yt = 18, Ht = 0.95047, sn = 1, fn = 1.08883, In = en.prototype = new st();
          function zn(b, R, j) {
            var G = (b + 16) / 116, ie = G + R / 500, fe = G - j / 200;
            return new Xn(Mn(3.2404542 * (ie = Cn(ie) * Ht) - 1.5371385 * (G = Cn(G) * sn) - 0.4985314 * (fe = Cn(fe) * fn)), Mn(-0.969266 * ie + 1.8760108 * G + 0.041556 * fe), Mn(0.0556434 * ie - 0.2040259 * G + 1.0572252 * fe));
          }
          function Cn(b) {
            return b > 0.206893034 ? b * b * b : (b - 0.13793103448275862) / 7.787037;
          }
          function gn(b) {
            return b > 8856e-6 ? Math.pow(b, 0.3333333333333333) : 7.787037 * b + 0.13793103448275862;
          }
          function Mn(b) {
            return Math.round(255 * (b <= 304e-5 ? 12.92 * b : 1.055 * Math.pow(b, 0.4166666666666667) - 0.055));
          }
          function Xn(b, R, j) {
            return this instanceof Xn ? (this.r = ~~b, this.g = ~~R, void (this.b = ~~j)) : arguments.length < 2 ? b instanceof Xn ? new Xn(b.r, b.g, b.b) : En("" + b, Xn, Bt) : new Xn(b, R, j);
          }
          function Pn(b) {
            return new Xn(b >> 16, b >> 8 & 255, 255 & b);
          }
          function wn(b) {
            return Pn(b) + "";
          }
          In.brighter = function(b) {
            return new en(Math.min(100, this.l + Yt * (arguments.length ? b : 1)), this.a, this.b);
          }, In.darker = function(b) {
            return new en(Math.max(0, this.l - Yt * (arguments.length ? b : 1)), this.a, this.b);
          }, In.rgb = function() {
            return zn(this.l, this.a, this.b);
          }, i.rgb = Xn;
          var Rn = Xn.prototype = new st();
          function _n(b) {
            return b < 16 ? "0" + Math.max(0, b).toString(16) : Math.min(255, b).toString(16);
          }
          function En(b, R, j) {
            var G, ie, fe, xe = 0, Te = 0, ze = 0;
            if (G = /([a-z]+)\((.*)\)/.exec(b = b.toLowerCase())) switch (ie = G[2].split(","), G[1]) {
              case "hsl":
                return j(parseFloat(ie[0]), parseFloat(ie[1]) / 100, parseFloat(ie[2]) / 100);
              case "rgb":
                return R(Zn(ie[0]), Zn(ie[1]), Zn(ie[2]));
            }
            return (fe = lr.get(b)) ? R(fe.r, fe.g, fe.b) : (b == null || b.charAt(0) !== "#" || isNaN(fe = parseInt(b.slice(1), 16)) || (b.length === 4 ? (xe = (3840 & fe) >> 4, xe |= xe >> 4, Te = 240 & fe, Te |= Te >> 4, ze = 15 & fe, ze |= ze << 4) : b.length === 7 && (xe = (16711680 & fe) >> 16, Te = (65280 & fe) >> 8, ze = 255 & fe)), R(xe, Te, ze));
          }
          function Kn(b, R, j) {
            var G, ie, fe = Math.min(b /= 255, R /= 255, j /= 255), xe = Math.max(b, R, j), Te = xe - fe, ze = (xe + fe) / 2;
            return Te ? (ie = ze < 0.5 ? Te / (xe + fe) : Te / (2 - xe - fe), G = b == xe ? (R - j) / Te + (R < j ? 6 : 0) : R == xe ? (j - b) / Te + 2 : (b - R) / Te + 4, G *= 60) : (G = NaN, ie = ze > 0 && ze < 1 ? 0 : G), new Ot(G, ie, ze);
          }
          function Wn(b, R, j) {
            var G = gn((0.4124564 * (b = hr(b)) + 0.3575761 * (R = hr(R)) + 0.1804375 * (j = hr(j))) / Ht), ie = gn((0.2126729 * b + 0.7151522 * R + 0.072175 * j) / sn);
            return en(116 * ie - 16, 500 * (G - ie), 200 * (ie - gn((0.0193339 * b + 0.119192 * R + 0.9503041 * j) / fn)));
          }
          function hr(b) {
            return (b /= 255) <= 0.04045 ? b / 12.92 : Math.pow((b + 0.055) / 1.055, 2.4);
          }
          function Zn(b) {
            var R = parseFloat(b);
            return b.charAt(b.length - 1) === "%" ? Math.round(2.55 * R) : R;
          }
          Rn.brighter = function(b) {
            b = Math.pow(0.7, arguments.length ? b : 1);
            var R = this.r, j = this.g, G = this.b, ie = 30;
            return R || j || G ? (R && R < ie && (R = ie), j && j < ie && (j = ie), G && G < ie && (G = ie), new Xn(Math.min(255, R / b), Math.min(255, j / b), Math.min(255, G / b))) : new Xn(ie, ie, ie);
          }, Rn.darker = function(b) {
            return new Xn((b = Math.pow(0.7, arguments.length ? b : 1)) * this.r, b * this.g, b * this.b);
          }, Rn.hsl = function() {
            return Kn(this.r, this.g, this.b);
          }, Rn.toString = function() {
            return "#" + _n(this.r) + _n(this.g) + _n(this.b);
          };
          var lr = i.map({ aliceblue: 15792383, antiquewhite: 16444375, aqua: 65535, aquamarine: 8388564, azure: 15794175, beige: 16119260, bisque: 16770244, black: 0, blanchedalmond: 16772045, blue: 255, blueviolet: 9055202, brown: 10824234, burlywood: 14596231, cadetblue: 6266528, chartreuse: 8388352, chocolate: 13789470, coral: 16744272, cornflowerblue: 6591981, cornsilk: 16775388, crimson: 14423100, cyan: 65535, darkblue: 139, darkcyan: 35723, darkgoldenrod: 12092939, darkgray: 11119017, darkgreen: 25600, darkgrey: 11119017, darkkhaki: 12433259, darkmagenta: 9109643, darkolivegreen: 5597999, darkorange: 16747520, darkorchid: 10040012, darkred: 9109504, darksalmon: 15308410, darkseagreen: 9419919, darkslateblue: 4734347, darkslategray: 3100495, darkslategrey: 3100495, darkturquoise: 52945, darkviolet: 9699539, deeppink: 16716947, deepskyblue: 49151, dimgray: 6908265, dimgrey: 6908265, dodgerblue: 2003199, firebrick: 11674146, floralwhite: 16775920, forestgreen: 2263842, fuchsia: 16711935, gainsboro: 14474460, ghostwhite: 16316671, gold: 16766720, goldenrod: 14329120, gray: 8421504, green: 32768, greenyellow: 11403055, grey: 8421504, honeydew: 15794160, hotpink: 16738740, indianred: 13458524, indigo: 4915330, ivory: 16777200, khaki: 15787660, lavender: 15132410, lavenderblush: 16773365, lawngreen: 8190976, lemonchiffon: 16775885, lightblue: 11393254, lightcoral: 15761536, lightcyan: 14745599, lightgoldenrodyellow: 16448210, lightgray: 13882323, lightgreen: 9498256, lightgrey: 13882323, lightpink: 16758465, lightsalmon: 16752762, lightseagreen: 2142890, lightskyblue: 8900346, lightslategray: 7833753, lightslategrey: 7833753, lightsteelblue: 11584734, lightyellow: 16777184, lime: 65280, limegreen: 3329330, linen: 16445670, magenta: 16711935, maroon: 8388608, mediumaquamarine: 6737322, mediumblue: 205, mediumorchid: 12211667, mediumpurple: 9662683, mediumseagreen: 3978097, mediumslateblue: 8087790, mediumspringgreen: 64154, mediumturquoise: 4772300, mediumvioletred: 13047173, midnightblue: 1644912, mintcream: 16121850, mistyrose: 16770273, moccasin: 16770229, navajowhite: 16768685, navy: 128, oldlace: 16643558, olive: 8421376, olivedrab: 7048739, orange: 16753920, orangered: 16729344, orchid: 14315734, palegoldenrod: 15657130, palegreen: 10025880, paleturquoise: 11529966, palevioletred: 14381203, papayawhip: 16773077, peachpuff: 16767673, peru: 13468991, pink: 16761035, plum: 14524637, powderblue: 11591910, purple: 8388736, rebeccapurple: 6697881, red: 16711680, rosybrown: 12357519, royalblue: 4286945, saddlebrown: 9127187, salmon: 16416882, sandybrown: 16032864, seagreen: 3050327, seashell: 16774638, sienna: 10506797, silver: 12632256, skyblue: 8900331, slateblue: 6970061, slategray: 7372944, slategrey: 7372944, snow: 16775930, springgreen: 65407, steelblue: 4620980, tan: 13808780, teal: 32896, thistle: 14204888, tomato: 16737095, turquoise: 4251856, violet: 15631086, wheat: 16113331, white: 16777215, whitesmoke: 16119285, yellow: 16776960, yellowgreen: 10145074 });
          function cr(b) {
            return typeof b == "function" ? b : function() {
              return b;
            };
          }
          function zr(b) {
            return function(R, j, G) {
              return arguments.length === 2 && typeof j == "function" && (G = j, j = null), Wr(R, j, b, G);
            };
          }
          function Wr(b, R, j, G) {
            var ie = {}, fe = i.dispatch("beforesend", "progress", "load", "error"), xe = {}, Te = new XMLHttpRequest(), ze = null;
            function Ve() {
              var ut, gt = Te.status;
              if (!gt && function(wt) {
                var Et = wt.responseType;
                return Et && Et !== "text" ? wt.response : wt.responseText;
              }(Te) || gt >= 200 && gt < 300 || gt === 304) {
                try {
                  ut = j.call(ie, Te);
                } catch (wt) {
                  return void fe.error.call(ie, wt);
                }
                fe.load.call(ie, ut);
              } else fe.error.call(ie, Te);
            }
            return self.XDomainRequest && !("withCredentials" in Te) && /^(http(s)?:)?\/\//.test(b) && (Te = new XDomainRequest()), "onload" in Te ? Te.onload = Te.onerror = Ve : Te.onreadystatechange = function() {
              Te.readyState > 3 && Ve();
            }, Te.onprogress = function(ut) {
              var gt = i.event;
              i.event = ut;
              try {
                fe.progress.call(ie, Te);
              } finally {
                i.event = gt;
              }
            }, ie.header = function(ut, gt) {
              return ut = (ut + "").toLowerCase(), arguments.length < 2 ? xe[ut] : (gt == null ? delete xe[ut] : xe[ut] = gt + "", ie);
            }, ie.mimeType = function(ut) {
              return arguments.length ? (R = ut == null ? null : ut + "", ie) : R;
            }, ie.responseType = function(ut) {
              return arguments.length ? (ze = ut, ie) : ze;
            }, ie.response = function(ut) {
              return j = ut, ie;
            }, ["get", "post"].forEach(function(ut) {
              ie[ut] = function() {
                return ie.send.apply(ie, [ut].concat(p(arguments)));
              };
            }), ie.send = function(ut, gt, wt) {
              if (arguments.length === 2 && typeof gt == "function" && (wt = gt, gt = null), Te.open(ut, b, !0), R == null || "accept" in xe || (xe.accept = R + ",*/*"), Te.setRequestHeader) for (var Et in xe) Te.setRequestHeader(Et, xe[Et]);
              return R != null && Te.overrideMimeType && Te.overrideMimeType(R), ze != null && (Te.responseType = ze), wt != null && ie.on("error", wt).on("load", function(zt) {
                wt(null, zt);
              }), fe.beforesend.call(ie, Te), Te.send(gt ?? null), ie;
            }, ie.abort = function() {
              return Te.abort(), ie;
            }, i.rebind(ie, fe, "on"), G == null ? ie : ie.get(function(ut) {
              return ut.length === 1 ? function(gt, wt) {
                ut(gt == null ? wt : null);
              } : ut;
            }(G));
          }
          lr.forEach(function(b, R) {
            lr.set(b, Pn(R));
          }), i.functor = cr, i.xhr = zr(re), i.dsv = function(b, R) {
            var j = new RegExp('["' + b + `
]`), G = b.charCodeAt(0);
            function ie(Ve, ut, gt) {
              arguments.length < 3 && (gt = ut, ut = null);
              var wt = Wr(Ve, R, ut == null ? fe : xe(ut), gt);
              return wt.row = function(Et) {
                return arguments.length ? wt.response((ut = Et) == null ? fe : xe(Et)) : ut;
              }, wt;
            }
            function fe(Ve) {
              return ie.parse(Ve.responseText);
            }
            function xe(Ve) {
              return function(ut) {
                return ie.parse(ut.responseText, Ve);
              };
            }
            function Te(Ve) {
              return Ve.map(ze).join(b);
            }
            function ze(Ve) {
              return j.test(Ve) ? '"' + Ve.replace(/\"/g, '""') + '"' : Ve;
            }
            return ie.parse = function(Ve, ut) {
              var gt;
              return ie.parseRows(Ve, function(wt, Et) {
                if (gt) return gt(wt, Et - 1);
                var zt = function(It) {
                  for (var jt = {}, Lt = wt.length, Zt = 0; Zt < Lt; ++Zt) jt[wt[Zt]] = It[Zt];
                  return jt;
                };
                gt = ut ? function(It, jt) {
                  return ut(zt(It), jt);
                } : zt;
              });
            }, ie.parseRows = function(Ve, ut) {
              var gt, wt, Et = {}, zt = {}, It = [], jt = Ve.length, Lt = 0, Zt = 0;
              function Qt() {
                if (Lt >= jt) return zt;
                if (wt) return wt = !1, Et;
                var yn = Lt;
                if (Ve.charCodeAt(yn) === 34) {
                  for (var Sn = yn; Sn++ < jt; ) if (Ve.charCodeAt(Sn) === 34) {
                    if (Ve.charCodeAt(Sn + 1) !== 34) break;
                    ++Sn;
                  }
                  return Lt = Sn + 2, (Un = Ve.charCodeAt(Sn + 1)) === 13 ? (wt = !0, Ve.charCodeAt(Sn + 2) === 10 && ++Lt) : Un === 10 && (wt = !0), Ve.slice(yn + 1, Sn).replace(/""/g, '"');
                }
                for (; Lt < jt; ) {
                  var Un, Vn = 1;
                  if ((Un = Ve.charCodeAt(Lt++)) === 10) wt = !0;
                  else if (Un === 13) wt = !0, Ve.charCodeAt(Lt) === 10 && (++Lt, ++Vn);
                  else if (Un !== G) continue;
                  return Ve.slice(yn, Lt - Vn);
                }
                return Ve.slice(yn);
              }
              for (; (gt = Qt()) !== zt; ) {
                for (var Xt = []; gt !== Et && gt !== zt; ) Xt.push(gt), gt = Qt();
                ut && (Xt = ut(Xt, Zt++)) == null || It.push(Xt);
              }
              return It;
            }, ie.format = function(Ve) {
              if (Array.isArray(Ve[0])) return ie.formatRows(Ve);
              var ut = new K(), gt = [];
              return Ve.forEach(function(wt) {
                for (var Et in wt) ut.has(Et) || gt.push(ut.add(Et));
              }), [gt.map(ze).join(b)].concat(Ve.map(function(wt) {
                return gt.map(function(Et) {
                  return ze(wt[Et]);
                }).join(b);
              })).join(`
`);
            }, ie.formatRows = function(Ve) {
              return Ve.map(Te).join(`
`);
            }, ie;
          }, i.csv = i.dsv(",", "text/csv"), i.tsv = i.dsv("	", "text/tab-separated-values");
          var mr, Ir, yr, Vr, rn = this[te(this, "requestAnimationFrame")] || function(b) {
            setTimeout(b, 17);
          };
          function Tn(b, R, j) {
            var G = arguments.length;
            G < 2 && (R = 0), G < 3 && (j = Date.now());
            var ie = { c: b, t: j + R, n: null };
            return Ir ? Ir.n = ie : mr = ie, Ir = ie, yr || (Vr = clearTimeout(Vr), yr = 1, rn(sr)), ie;
          }
          function sr() {
            var b = $n(), R = ur() - b;
            R > 24 ? (isFinite(R) && (clearTimeout(Vr), Vr = setTimeout(sr, R)), yr = 0) : (yr = 1, rn(sr));
          }
          function $n() {
            for (var b = Date.now(), R = mr; R; ) b >= R.t && R.c(b - R.t) && (R.c = null), R = R.n;
            return b;
          }
          function ur() {
            for (var b, R = mr, j = 1 / 0; R; ) R.c ? (R.t < j && (j = R.t), R = (b = R).n) : R = b ? b.n = R.n : mr = R.n;
            return Ir = b, j;
          }
          function Tr(b) {
            return b[0];
          }
          function wr(b) {
            return b[1];
          }
          function Fr(b) {
            for (var R, j, G, ie = b.length, fe = [0, 1], xe = 2, Te = 2; Te < ie; Te++) {
              for (; xe > 1 && (R = b[fe[xe - 2]], j = b[fe[xe - 1]], G = b[Te], (j[0] - R[0]) * (G[1] - R[1]) - (j[1] - R[1]) * (G[0] - R[0]) <= 0); ) --xe;
              fe[xe++] = Te;
            }
            return fe.slice(0, xe);
          }
          function Xr(b, R) {
            return b[0] - R[0] || b[1] - R[1];
          }
          i.timer = function() {
            Tn.apply(this, arguments);
          }, i.timer.flush = function() {
            $n(), ur();
          }, i.round = function(b, R) {
            return R ? Math.round(b * (R = Math.pow(10, R))) / R : Math.round(b);
          }, i.geom = {}, i.geom.hull = function(b) {
            var R = Tr, j = wr;
            if (arguments.length) return G(b);
            function G(ie) {
              if (ie.length < 3) return [];
              var fe, xe = cr(R), Te = cr(j), ze = ie.length, Ve = [], ut = [];
              for (fe = 0; fe < ze; fe++) Ve.push([+xe.call(this, ie[fe], fe), +Te.call(this, ie[fe], fe), fe]);
              for (Ve.sort(Xr), fe = 0; fe < ze; fe++) ut.push([Ve[fe][0], -Ve[fe][1]]);
              var gt = Fr(Ve), wt = Fr(ut), Et = wt[0] === gt[0], zt = wt[wt.length - 1] === gt[gt.length - 1], It = [];
              for (fe = gt.length - 1; fe >= 0; --fe) It.push(ie[Ve[gt[fe]][2]]);
              for (fe = +Et; fe < wt.length - zt; ++fe) It.push(ie[Ve[wt[fe]][2]]);
              return It;
            }
            return G.x = function(ie) {
              return arguments.length ? (R = ie, G) : R;
            }, G.y = function(ie) {
              return arguments.length ? (j = ie, G) : j;
            }, G;
          }, i.geom.polygon = function(b) {
            return ae(b, un), b;
          };
          var un = i.geom.polygon.prototype = [];
          function Gn(b, R, j) {
            return (j[0] - R[0]) * (b[1] - R[1]) < (j[1] - R[1]) * (b[0] - R[0]);
          }
          function on(b, R, j, G) {
            var ie = b[0], fe = j[0], xe = R[0] - ie, Te = G[0] - fe, ze = b[1], Ve = j[1], ut = R[1] - ze, gt = G[1] - Ve, wt = (Te * (ze - Ve) - gt * (ie - fe)) / (gt * xe - Te * ut);
            return [ie + wt * xe, ze + wt * ut];
          }
          function ln(b) {
            var R = b[0], j = b[b.length - 1];
            return !(R[0] - j[0] || R[1] - j[1]);
          }
          un.area = function() {
            for (var b, R = -1, j = this.length, G = this[j - 1], ie = 0; ++R < j; ) b = G, G = this[R], ie += b[1] * G[0] - b[0] * G[1];
            return 0.5 * ie;
          }, un.centroid = function(b) {
            var R, j, G = -1, ie = this.length, fe = 0, xe = 0, Te = this[ie - 1];
            for (arguments.length || (b = -1 / (6 * this.area())); ++G < ie; ) R = Te, Te = this[G], j = R[0] * Te[1] - Te[0] * R[1], fe += (R[0] + Te[0]) * j, xe += (R[1] + Te[1]) * j;
            return [fe * b, xe * b];
          }, un.clip = function(b) {
            for (var R, j, G, ie, fe, xe, Te = ln(b), ze = -1, Ve = this.length - ln(this), ut = this[Ve - 1]; ++ze < Ve; ) {
              for (R = b.slice(), b.length = 0, ie = this[ze], fe = R[(G = R.length - Te) - 1], j = -1; ++j < G; ) Gn(xe = R[j], ut, ie) ? (Gn(fe, ut, ie) || b.push(on(fe, xe, ut, ie)), b.push(xe)) : Gn(fe, ut, ie) && b.push(on(fe, xe, ut, ie)), fe = xe;
              Te && b.push(b[0]), ut = ie;
            }
            return b;
          };
          var bn, Nn, jn, Jn, Hn, Ln = [], pn = [];
          function dn() {
            Pa(this), this.edge = this.site = this.circle = null;
          }
          function Dn(b) {
            var R = Ln.pop() || new dn();
            return R.site = b, R;
          }
          function nr(b) {
            Qn(b), jn.remove(b), Ln.push(b), Pa(b);
          }
          function pr(b) {
            var R = b.circle, j = R.x, G = R.cy, ie = { x: j, y: G }, fe = b.P, xe = b.N, Te = [b];
            nr(b);
            for (var ze = fe; ze.circle && E(j - ze.circle.x) < at && E(G - ze.circle.cy) < at; ) fe = ze.P, Te.unshift(ze), nr(ze), ze = fe;
            Te.unshift(ze), Qn(ze);
            for (var Ve = xe; Ve.circle && E(j - Ve.circle.x) < at && E(G - Ve.circle.cy) < at; ) xe = Ve.N, Te.push(Ve), nr(Ve), Ve = xe;
            Te.push(Ve), Qn(Ve);
            var ut, gt = Te.length;
            for (ut = 1; ut < gt; ++ut) Ve = Te[ut], ze = Te[ut - 1], Yr(Ve.edge, ze.site, Ve.site, ie);
            ze = Te[0], (Ve = Te[gt - 1]).edge = Br(ze.site, Ve.site, null, ie), Dr(ze), Dr(Ve);
          }
          function ir(b) {
            for (var R, j, G, ie, fe = b.x, xe = b.y, Te = jn._; Te; ) if ((G = gr(Te, xe) - fe) > at) Te = Te.L;
            else {
              if (!((ie = fe - Pr(Te, xe)) > at)) {
                G > -at ? (R = Te.P, j = Te) : ie > -at ? (R = Te, j = Te.N) : R = j = Te;
                break;
              }
              if (!Te.R) {
                R = Te;
                break;
              }
              Te = Te.R;
            }
            var ze = Dn(b);
            if (jn.insert(R, ze), R || j) {
              if (R === j) return Qn(R), j = Dn(R.site), jn.insert(ze, j), ze.edge = j.edge = Br(R.site, ze.site), Dr(R), void Dr(j);
              if (j) {
                Qn(R), Qn(j);
                var Ve = R.site, ut = Ve.x, gt = Ve.y, wt = b.x - ut, Et = b.y - gt, zt = j.site, It = zt.x - ut, jt = zt.y - gt, Lt = 2 * (wt * jt - Et * It), Zt = wt * wt + Et * Et, Qt = It * It + jt * jt, Xt = { x: (jt * Zt - Et * Qt) / Lt + ut, y: (wt * Qt - It * Zt) / Lt + gt };
                Yr(j.edge, Ve, zt, Xt), ze.edge = Br(Ve, b, null, Xt), j.edge = Br(b, zt, null, Xt), Dr(R), Dr(j);
              } else ze.edge = Br(R.site, ze.site);
            }
          }
          function gr(b, R) {
            var j = b.site, G = j.x, ie = j.y, fe = ie - R;
            if (!fe) return G;
            var xe = b.P;
            if (!xe) return -1 / 0;
            var Te = (j = xe.site).x, ze = j.y, Ve = ze - R;
            if (!Ve) return Te;
            var ut = Te - G, gt = 1 / fe - 1 / Ve, wt = ut / Ve;
            return gt ? (-wt + Math.sqrt(wt * wt - 2 * gt * (ut * ut / (-2 * Ve) - ze + Ve / 2 + ie - fe / 2))) / gt + G : (G + Te) / 2;
          }
          function Pr(b, R) {
            var j = b.N;
            if (j) return gr(j, R);
            var G = b.site;
            return G.y === R ? G.x : 1 / 0;
          }
          function Cr(b) {
            this.site = b, this.edges = [];
          }
          function Er(b, R) {
            return R.angle - b.angle;
          }
          function Sr() {
            Pa(this), this.x = this.y = this.arc = this.site = this.cy = null;
          }
          function Dr(b) {
            var R = b.P, j = b.N;
            if (R && j) {
              var G = R.site, ie = b.site, fe = j.site;
              if (G !== fe) {
                var xe = ie.x, Te = ie.y, ze = G.x - xe, Ve = G.y - Te, ut = fe.x - xe, gt = 2 * (ze * (jt = fe.y - Te) - Ve * ut);
                if (!(gt >= -vt)) {
                  var wt = ze * ze + Ve * Ve, Et = ut * ut + jt * jt, zt = (jt * wt - Ve * Et) / gt, It = (ze * Et - ut * wt) / gt, jt = It + Te, Lt = pn.pop() || new Sr();
                  Lt.arc = b, Lt.site = ie, Lt.x = zt + xe, Lt.y = jt + Math.sqrt(zt * zt + It * It), Lt.cy = jt, b.circle = Lt;
                  for (var Zt = null, Qt = Hn._; Qt; ) if (Lt.y < Qt.y || Lt.y === Qt.y && Lt.x <= Qt.x) {
                    if (!Qt.L) {
                      Zt = Qt.P;
                      break;
                    }
                    Qt = Qt.L;
                  } else {
                    if (!Qt.R) {
                      Zt = Qt;
                      break;
                    }
                    Qt = Qt.R;
                  }
                  Hn.insert(Zt, Lt), Zt || (Jn = Lt);
                }
              }
            }
          }
          function Qn(b) {
            var R = b.circle;
            R && (R.P || (Jn = R.N), Hn.remove(R), pn.push(R), Pa(R), b.circle = null);
          }
          function ri(b, R) {
            var j = b.b;
            if (j) return !0;
            var G, ie, fe = b.a, xe = R[0][0], Te = R[1][0], ze = R[0][1], Ve = R[1][1], ut = b.l, gt = b.r, wt = ut.x, Et = ut.y, zt = gt.x, It = gt.y, jt = (wt + zt) / 2, Lt = (Et + It) / 2;
            if (It === Et) {
              if (jt < xe || jt >= Te) return;
              if (wt > zt) {
                if (fe) {
                  if (fe.y >= Ve) return;
                } else fe = { x: jt, y: ze };
                j = { x: jt, y: Ve };
              } else {
                if (fe) {
                  if (fe.y < ze) return;
                } else fe = { x: jt, y: Ve };
                j = { x: jt, y: ze };
              }
            } else if (ie = Lt - (G = (wt - zt) / (It - Et)) * jt, G < -1 || G > 1) if (wt > zt) {
              if (fe) {
                if (fe.y >= Ve) return;
              } else fe = { x: (ze - ie) / G, y: ze };
              j = { x: (Ve - ie) / G, y: Ve };
            } else {
              if (fe) {
                if (fe.y < ze) return;
              } else fe = { x: (Ve - ie) / G, y: Ve };
              j = { x: (ze - ie) / G, y: ze };
            }
            else if (Et < It) {
              if (fe) {
                if (fe.x >= Te) return;
              } else fe = { x: xe, y: G * xe + ie };
              j = { x: Te, y: G * Te + ie };
            } else {
              if (fe) {
                if (fe.x < xe) return;
              } else fe = { x: Te, y: G * Te + ie };
              j = { x: xe, y: G * xe + ie };
            }
            return b.a = fe, b.b = j, !0;
          }
          function Zr(b, R) {
            this.l = b, this.r = R, this.a = this.b = null;
          }
          function Br(b, R, j, G) {
            var ie = new Zr(b, R);
            return bn.push(ie), j && Yr(ie, b, R, j), G && Yr(ie, R, b, G), Nn[b.i].edges.push(new yi(ie, b, R)), Nn[R.i].edges.push(new yi(ie, R, b)), ie;
          }
          function Yr(b, R, j, G) {
            b.a || b.b ? b.l === j ? b.b = G : b.a = G : (b.a = G, b.l = R, b.r = j);
          }
          function yi(b, R, j) {
            var G = b.a, ie = b.b;
            this.edge = b, this.site = R, this.angle = j ? Math.atan2(j.y - R.y, j.x - R.x) : b.l === R ? Math.atan2(ie.x - G.x, G.y - ie.y) : Math.atan2(G.x - ie.x, ie.y - G.y);
          }
          function si() {
            this._ = null;
          }
          function Pa(b) {
            b.U = b.C = b.L = b.R = b.P = b.N = null;
          }
          function Ni(b, R) {
            var j = R, G = R.R, ie = j.U;
            ie ? ie.L === j ? ie.L = G : ie.R = G : b._ = G, G.U = ie, j.U = G, j.R = G.L, j.R && (j.R.U = j), G.L = j;
          }
          function To(b, R) {
            var j = R, G = R.L, ie = j.U;
            ie ? ie.L === j ? ie.L = G : ie.R = G : b._ = G, G.U = ie, j.U = G, j.L = G.R, j.L && (j.L.U = j), G.R = j;
          }
          function Ba(b) {
            for (; b.L; ) b = b.L;
            return b;
          }
          function eo(b, R) {
            var j, G, ie, fe = b.sort(Ds).pop();
            for (bn = [], Nn = new Array(b.length), jn = new si(), Hn = new si(); ; ) if (ie = Jn, fe && (!ie || fe.y < ie.y || fe.y === ie.y && fe.x < ie.x)) fe.x === j && fe.y === G || (Nn[fe.i] = new Cr(fe), ir(fe), j = fe.x, G = fe.y), fe = b.pop();
            else {
              if (!ie) break;
              pr(ie.arc);
            }
            R && (function(Te) {
              for (var ze, Ve, ut, gt, wt, Et = bn, zt = (Ve = Te[0][0], ut = Te[0][1], gt = Te[1][0], wt = Te[1][1], function(jt) {
                var Lt, Zt = jt.a, Qt = jt.b, Xt = Zt.x, yn = Zt.y, Sn = 0, Un = 1, Vn = Qt.x - Xt, Yn = Qt.y - yn;
                if (Lt = Ve - Xt, Vn || !(Lt > 0)) {
                  if (Lt /= Vn, Vn < 0) {
                    if (Lt < Sn) return;
                    Lt < Un && (Un = Lt);
                  } else if (Vn > 0) {
                    if (Lt > Un) return;
                    Lt > Sn && (Sn = Lt);
                  }
                  if (Lt = gt - Xt, Vn || !(Lt < 0)) {
                    if (Lt /= Vn, Vn < 0) {
                      if (Lt > Un) return;
                      Lt > Sn && (Sn = Lt);
                    } else if (Vn > 0) {
                      if (Lt < Sn) return;
                      Lt < Un && (Un = Lt);
                    }
                    if (Lt = ut - yn, Yn || !(Lt > 0)) {
                      if (Lt /= Yn, Yn < 0) {
                        if (Lt < Sn) return;
                        Lt < Un && (Un = Lt);
                      } else if (Yn > 0) {
                        if (Lt > Un) return;
                        Lt > Sn && (Sn = Lt);
                      }
                      if (Lt = wt - yn, Yn || !(Lt < 0)) {
                        if (Lt /= Yn, Yn < 0) {
                          if (Lt > Un) return;
                          Lt > Sn && (Sn = Lt);
                        } else if (Yn > 0) {
                          if (Lt < Sn) return;
                          Lt < Un && (Un = Lt);
                        }
                        return Sn > 0 && (jt.a = { x: Xt + Sn * Vn, y: yn + Sn * Yn }), Un < 1 && (jt.b = { x: Xt + Un * Vn, y: yn + Un * Yn }), jt;
                      }
                    }
                  }
                }
              }), It = Et.length; It--; ) (!ri(ze = Et[It], Te) || !zt(ze) || E(ze.a.x - ze.b.x) < at && E(ze.a.y - ze.b.y) < at) && (ze.a = ze.b = null, Et.splice(It, 1));
            }(R), function(Te) {
              for (var ze, Ve, ut, gt, wt, Et, zt, It, jt, Lt, Zt = Te[0][0], Qt = Te[1][0], Xt = Te[0][1], yn = Te[1][1], Sn = Nn, Un = Sn.length; Un--; ) if ((wt = Sn[Un]) && wt.prepare()) for (It = (zt = wt.edges).length, Et = 0; Et < It; ) ut = (Lt = zt[Et].end()).x, gt = Lt.y, ze = (jt = zt[++Et % It].start()).x, Ve = jt.y, (E(ut - ze) > at || E(gt - Ve) > at) && (zt.splice(Et, 0, new yi((Vn = wt.site, Yn = Lt, er = E(ut - Zt) < at && yn - gt > at ? { x: Zt, y: E(ze - Zt) < at ? Ve : yn } : E(gt - yn) < at && Qt - ut > at ? { x: E(Ve - yn) < at ? ze : Qt, y: yn } : E(ut - Qt) < at && gt - Xt > at ? { x: Qt, y: E(ze - Qt) < at ? Ve : Xt } : E(gt - Xt) < at && ut - Zt > at ? { x: E(Ve - Xt) < at ? ze : Zt, y: Xt } : null, kr = void 0, (kr = new Zr(Vn, null)).a = Yn, kr.b = er, bn.push(kr), kr), wt.site, null)), ++It);
              var Vn, Yn, er, kr;
            }(R));
            var xe = { cells: Nn, edges: bn };
            return jn = Hn = bn = Nn = null, xe;
          }
          function Ds(b, R) {
            return R.y - b.y || R.x - b.x;
          }
          Cr.prototype.prepare = function() {
            for (var b, R = this.edges, j = R.length; j--; ) (b = R[j].edge).b && b.a || R.splice(j, 1);
            return R.sort(Er), R.length;
          }, yi.prototype = { start: function() {
            return this.edge.l === this.site ? this.edge.a : this.edge.b;
          }, end: function() {
            return this.edge.l === this.site ? this.edge.b : this.edge.a;
          } }, si.prototype = { insert: function(b, R) {
            var j, G, ie;
            if (b) {
              if (R.P = b, R.N = b.N, b.N && (b.N.P = R), b.N = R, b.R) {
                for (b = b.R; b.L; ) b = b.L;
                b.L = R;
              } else b.R = R;
              j = b;
            } else this._ ? (b = Ba(this._), R.P = null, R.N = b, b.P = b.L = R, j = b) : (R.P = R.N = null, this._ = R, j = null);
            for (R.L = R.R = null, R.U = j, R.C = !0, b = R; j && j.C; ) j === (G = j.U).L ? (ie = G.R) && ie.C ? (j.C = ie.C = !1, G.C = !0, b = G) : (b === j.R && (Ni(this, j), j = (b = j).U), j.C = !1, G.C = !0, To(this, G)) : (ie = G.L) && ie.C ? (j.C = ie.C = !1, G.C = !0, b = G) : (b === j.L && (To(this, j), j = (b = j).U), j.C = !1, G.C = !0, Ni(this, G)), j = b.U;
            this._.C = !1;
          }, remove: function(b) {
            b.N && (b.N.P = b.P), b.P && (b.P.N = b.N), b.N = b.P = null;
            var R, j, G, ie = b.U, fe = b.L, xe = b.R;
            if (j = fe ? xe ? Ba(xe) : fe : xe, ie ? ie.L === b ? ie.L = j : ie.R = j : this._ = j, fe && xe ? (G = j.C, j.C = b.C, j.L = fe, fe.U = j, j !== xe ? (ie = j.U, j.U = b.U, b = j.R, ie.L = b, j.R = xe, xe.U = j) : (j.U = ie, ie = j, b = j.R)) : (G = b.C, b = j), b && (b.U = ie), !G) if (b && b.C) b.C = !1;
            else {
              do {
                if (b === this._) break;
                if (b === ie.L) {
                  if ((R = ie.R).C && (R.C = !1, ie.C = !0, Ni(this, ie), R = ie.R), R.L && R.L.C || R.R && R.R.C) {
                    R.R && R.R.C || (R.L.C = !1, R.C = !0, To(this, R), R = ie.R), R.C = ie.C, ie.C = R.R.C = !1, Ni(this, ie), b = this._;
                    break;
                  }
                } else if ((R = ie.L).C && (R.C = !1, ie.C = !0, To(this, ie), R = ie.L), R.L && R.L.C || R.R && R.R.C) {
                  R.L && R.L.C || (R.R.C = !1, R.C = !0, Ni(this, R), R = ie.L), R.C = ie.C, ie.C = R.L.C = !1, To(this, ie), b = this._;
                  break;
                }
                R.C = !0, b = ie, ie = ie.U;
              } while (!b.C);
              b && (b.C = !1);
            }
          } }, i.geom.voronoi = function(b) {
            var R = Tr, j = wr, G = R, ie = j, fe = ji;
            if (b) return xe(b);
            function xe(ze) {
              var Ve = new Array(ze.length), ut = fe[0][0], gt = fe[0][1], wt = fe[1][0], Et = fe[1][1];
              return eo(Te(ze), fe).cells.forEach(function(zt, It) {
                var jt = zt.edges, Lt = zt.site;
                (Ve[It] = jt.length ? jt.map(function(Zt) {
                  var Qt = Zt.start();
                  return [Qt.x, Qt.y];
                }) : Lt.x >= ut && Lt.x <= wt && Lt.y >= gt && Lt.y <= Et ? [[ut, Et], [wt, Et], [wt, gt], [ut, gt]] : []).point = ze[It];
              }), Ve;
            }
            function Te(ze) {
              return ze.map(function(Ve, ut) {
                return { x: Math.round(G(Ve, ut) / at) * at, y: Math.round(ie(Ve, ut) / at) * at, i: ut };
              });
            }
            return xe.links = function(ze) {
              return eo(Te(ze)).edges.filter(function(Ve) {
                return Ve.l && Ve.r;
              }).map(function(Ve) {
                return { source: ze[Ve.l.i], target: ze[Ve.r.i] };
              });
            }, xe.triangles = function(ze) {
              var Ve = [];
              return eo(Te(ze)).cells.forEach(function(ut, gt) {
                for (var wt, Et, zt, It, jt = ut.site, Lt = ut.edges.sort(Er), Zt = -1, Qt = Lt.length, Xt = Lt[Qt - 1].edge, yn = Xt.l === jt ? Xt.r : Xt.l; ++Zt < Qt; ) wt = yn, yn = (Xt = Lt[Zt].edge).l === jt ? Xt.r : Xt.l, gt < wt.i && gt < yn.i && (zt = wt, It = yn, ((Et = jt).x - It.x) * (zt.y - Et.y) - (Et.x - zt.x) * (It.y - Et.y) < 0) && Ve.push([ze[gt], ze[wt.i], ze[yn.i]]);
              }), Ve;
            }, xe.x = function(ze) {
              return arguments.length ? (G = cr(R = ze), xe) : R;
            }, xe.y = function(ze) {
              return arguments.length ? (ie = cr(j = ze), xe) : j;
            }, xe.clipExtent = function(ze) {
              return arguments.length ? (fe = ze ?? ji, xe) : fe === ji ? null : fe;
            }, xe.size = function(ze) {
              return arguments.length ? xe.clipExtent(ze && [[0, 0], ze]) : fe === ji ? null : fe && fe[1];
            }, xe;
          };
          var ji = [[-1e6, -1e6], [1e6, 1e6]];
          function Ao(b) {
            return b.x;
          }
          function dl(b) {
            return b.y;
          }
          function So(b, R, j, G, ie, fe) {
            if (!b(R, j, G, ie, fe)) {
              var xe = 0.5 * (j + ie), Te = 0.5 * (G + fe), ze = R.nodes;
              ze[0] && So(b, ze[0], j, G, xe, Te), ze[1] && So(b, ze[1], xe, G, ie, Te), ze[2] && So(b, ze[2], j, Te, xe, fe), ze[3] && So(b, ze[3], xe, Te, ie, fe);
            }
          }
          function Pu(b, R) {
            b = i.rgb(b), R = i.rgb(R);
            var j = b.r, G = b.g, ie = b.b, fe = R.r - j, xe = R.g - G, Te = R.b - ie;
            return function(ze) {
              return "#" + _n(Math.round(j + fe * ze)) + _n(Math.round(G + xe * ze)) + _n(Math.round(ie + Te * ze));
            };
          }
          function go(b, R) {
            var j, G = {}, ie = {};
            for (j in b) j in R ? G[j] = vs(b[j], R[j]) : ie[j] = b[j];
            for (j in R) j in b || (ie[j] = R[j]);
            return function(fe) {
              for (j in G) ie[j] = G[j](fe);
              return ie;
            };
          }
          function Vi(b, R) {
            return b = +b, R = +R, function(j) {
              return b * (1 - j) + R * j;
            };
          }
          function Ml(b, R) {
            var j, G, ie, fe = pl.lastIndex = Zl.lastIndex = 0, xe = -1, Te = [], ze = [];
            for (b += "", R += ""; (j = pl.exec(b)) && (G = Zl.exec(R)); ) (ie = G.index) > fe && (ie = R.slice(fe, ie), Te[xe] ? Te[xe] += ie : Te[++xe] = ie), (j = j[0]) === (G = G[0]) ? Te[xe] ? Te[xe] += G : Te[++xe] = G : (Te[++xe] = null, ze.push({ i: xe, x: Vi(j, G) })), fe = Zl.lastIndex;
            return fe < R.length && (ie = R.slice(fe), Te[xe] ? Te[xe] += ie : Te[++xe] = ie), Te.length < 2 ? ze[0] ? (R = ze[0].x, function(Ve) {
              return R(Ve) + "";
            }) : function() {
              return R;
            } : (R = ze.length, function(Ve) {
              for (var ut, gt = 0; gt < R; ++gt) Te[(ut = ze[gt]).i] = ut.x(Ve);
              return Te.join("");
            });
          }
          i.geom.delaunay = function(b) {
            return i.geom.voronoi().triangles(b);
          }, i.geom.quadtree = function(b, R, j, G, ie) {
            var fe, xe = Tr, Te = wr;
            if (fe = arguments.length) return xe = Ao, Te = dl, fe === 3 && (ie = j, G = R, j = R = 0), ze(b);
            function ze(Ve) {
              var ut, gt, wt, Et, zt, It, jt, Lt, Zt, Qt = cr(xe), Xt = cr(Te);
              if (R != null) It = R, jt = j, Lt = G, Zt = ie;
              else if (Lt = Zt = -(It = jt = 1 / 0), gt = [], wt = [], zt = Ve.length, fe) for (Et = 0; Et < zt; ++Et) (ut = Ve[Et]).x < It && (It = ut.x), ut.y < jt && (jt = ut.y), ut.x > Lt && (Lt = ut.x), ut.y > Zt && (Zt = ut.y), gt.push(ut.x), wt.push(ut.y);
              else for (Et = 0; Et < zt; ++Et) {
                var yn = +Qt(ut = Ve[Et], Et), Sn = +Xt(ut, Et);
                yn < It && (It = yn), Sn < jt && (jt = Sn), yn > Lt && (Lt = yn), Sn > Zt && (Zt = Sn), gt.push(yn), wt.push(Sn);
              }
              var Un = Lt - It, Vn = Zt - jt;
              function Yn(or, Mr, fr, Or, br, Nr, ii, Rr) {
                if (!isNaN(fr) && !isNaN(Or)) if (or.leaf) {
                  var ei = or.x, pi = or.y;
                  if (ei != null) if (E(ei - fr) + E(pi - Or) < 0.01) er(or, Mr, fr, Or, br, Nr, ii, Rr);
                  else {
                    var qi = or.point;
                    or.x = or.y = or.point = null, er(or, qi, ei, pi, br, Nr, ii, Rr), er(or, Mr, fr, Or, br, Nr, ii, Rr);
                  }
                  else or.x = fr, or.y = Or, or.point = Mr;
                } else er(or, Mr, fr, Or, br, Nr, ii, Rr);
              }
              function er(or, Mr, fr, Or, br, Nr, ii, Rr) {
                var ei = 0.5 * (br + ii), pi = 0.5 * (Nr + Rr), qi = fr >= ei, Li = Or >= pi, Yi = Li << 1 | qi;
                or.leaf = !1, qi ? br = ei : ii = ei, Li ? Nr = pi : Rr = pi, Yn(or = or.nodes[Yi] || (or.nodes[Yi] = { leaf: !0, nodes: [], point: null, x: null, y: null }), Mr, fr, Or, br, Nr, ii, Rr);
              }
              Un > Vn ? Zt = jt + Un : Lt = It + Vn;
              var kr = { leaf: !0, nodes: [], point: null, x: null, y: null, add: function(or) {
                Yn(kr, or, +Qt(or, ++Et), +Xt(or, Et), It, jt, Lt, Zt);
              } };
              if (kr.visit = function(or) {
                So(or, kr, It, jt, Lt, Zt);
              }, kr.find = function(or) {
                return function(Mr, fr, Or, br, Nr, ii, Rr) {
                  var ei, pi = 1 / 0;
                  return function qi(Li, Yi, Gi, ra, wa) {
                    if (!(Yi > ii || Gi > Rr || ra < br || wa < Nr)) {
                      if (uo = Li.point) {
                        var uo, no = fr - Li.x, Ko = Or - Li.y, Ia = no * no + Ko * Ko;
                        if (Ia < pi) {
                          var ca = Math.sqrt(pi = Ia);
                          br = fr - ca, Nr = Or - ca, ii = fr + ca, Rr = Or + ca, ei = uo;
                        }
                      }
                      for (var Ga = Li.nodes, Oa = 0.5 * (Yi + ra), ba = 0.5 * (Gi + wa), Da = (Or >= ba) << 1 | fr >= Oa, Ua = Da + 4; Da < Ua; ++Da) if (Li = Ga[3 & Da]) switch (3 & Da) {
                        case 0:
                          qi(Li, Yi, Gi, Oa, ba);
                          break;
                        case 1:
                          qi(Li, Oa, Gi, ra, ba);
                          break;
                        case 2:
                          qi(Li, Yi, ba, Oa, wa);
                          break;
                        case 3:
                          qi(Li, Oa, ba, ra, wa);
                      }
                    }
                  }(Mr, br, Nr, ii, Rr), ei;
                }(kr, or[0], or[1], It, jt, Lt, Zt);
              }, Et = -1, R == null) {
                for (; ++Et < zt; ) Yn(kr, Ve[Et], gt[Et], wt[Et], It, jt, Lt, Zt);
                --Et;
              } else Ve.forEach(kr.add);
              return gt = wt = Ve = ut = null, kr;
            }
            return ze.x = function(Ve) {
              return arguments.length ? (xe = Ve, ze) : xe;
            }, ze.y = function(Ve) {
              return arguments.length ? (Te = Ve, ze) : Te;
            }, ze.extent = function(Ve) {
              return arguments.length ? (Ve == null ? R = j = G = ie = null : (R = +Ve[0][0], j = +Ve[0][1], G = +Ve[1][0], ie = +Ve[1][1]), ze) : R == null ? null : [[R, j], [G, ie]];
            }, ze.size = function(Ve) {
              return arguments.length ? (Ve == null ? R = j = G = ie = null : (R = j = 0, G = +Ve[0], ie = +Ve[1]), ze) : R == null ? null : [G - R, ie - j];
            }, ze;
          }, i.interpolateRgb = Pu, i.interpolateObject = go, i.interpolateNumber = Vi, i.interpolateString = Ml;
          var pl = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Zl = new RegExp(pl.source, "g");
          function vs(b, R) {
            for (var j, G = i.interpolators.length; --G >= 0 && !(j = i.interpolators[G](b, R)); ) ;
            return j;
          }
          function Xl(b, R) {
            var j, G = [], ie = [], fe = b.length, xe = R.length, Te = Math.min(b.length, R.length);
            for (j = 0; j < Te; ++j) G.push(vs(b[j], R[j]));
            for (; j < fe; ++j) ie[j] = b[j];
            for (; j < xe; ++j) ie[j] = R[j];
            return function(ze) {
              for (j = 0; j < Te; ++j) ie[j] = G[j](ze);
              return ie;
            };
          }
          i.interpolate = vs, i.interpolators = [function(b, R) {
            var j = typeof R;
            return (j === "string" ? lr.has(R.toLowerCase()) || /^(#|rgb\(|hsl\()/i.test(R) ? Pu : Ml : R instanceof st ? Pu : Array.isArray(R) ? Xl : j === "object" && isNaN(R) ? go : Vi)(b, R);
          }], i.interpolateArray = Xl;
          var xs = function() {
            return re;
          }, ja = i.map({ linear: xs, poly: function(b) {
            return function(R) {
              return Math.pow(R, b);
            };
          }, quad: function() {
            return El;
          }, cubic: function() {
            return Jl;
          }, sin: function() {
            return mu;
          }, exp: function() {
            return gu;
          }, circle: function() {
            return Ql;
          }, elastic: function(b, R) {
            var j;
            return arguments.length < 2 && (R = 0.45), arguments.length ? j = R / Je * Math.asin(1 / b) : (b = 1, j = R / 4), function(G) {
              return 1 + b * Math.pow(2, -10 * G) * Math.sin((G - j) * Je / R);
            };
          }, back: function(b) {
            return b || (b = 1.70158), function(R) {
              return R * R * ((b + 1) * R - b);
            };
          }, bounce: function() {
            return Wo;
          } }), Mo = i.map({ in: re, out: Kl, "in-out": Xs, "out-in": function(b) {
            return Xs(Kl(b));
          } });
          function Kl(b) {
            return function(R) {
              return 1 - b(1 - R);
            };
          }
          function Xs(b) {
            return function(R) {
              return 0.5 * (R < 0.5 ? b(2 * R) : 2 - b(2 - 2 * R));
            };
          }
          function El(b) {
            return b * b;
          }
          function Jl(b) {
            return b * b * b;
          }
          function ml(b) {
            if (b <= 0) return 0;
            if (b >= 1) return 1;
            var R = b * b, j = R * b;
            return 4 * (b < 0.5 ? j : 3 * (b - R) + j - 0.75);
          }
          function mu(b) {
            return 1 - Math.cos(b * ot);
          }
          function gu(b) {
            return Math.pow(2, 10 * (b - 1));
          }
          function Ql(b) {
            return 1 - Math.sqrt(1 - b * b);
          }
          function Wo(b) {
            return b < 0.36363636363636365 ? 7.5625 * b * b : b < 0.7272727272727273 ? 7.5625 * (b -= 0.5454545454545454) * b + 0.75 : b < 0.9090909090909091 ? 7.5625 * (b -= 0.8181818181818182) * b + 0.9375 : 7.5625 * (b -= 0.9545454545454546) * b + 0.984375;
          }
          function Mc(b, R) {
            return R -= b, function(j) {
              return Math.round(b + R * j);
            };
          }
          function Xu(b) {
            var R, j, G, ie = [b.a, b.b], fe = [b.c, b.d], xe = ef(ie), Te = yu(ie, fe), ze = ef(((R = fe)[0] += (G = -Te) * (j = ie)[0], R[1] += G * j[1], R)) || 0;
            ie[0] * fe[1] < fe[0] * ie[1] && (ie[0] *= -1, ie[1] *= -1, xe *= -1, Te *= -1), this.rotate = (xe ? Math.atan2(ie[1], ie[0]) : Math.atan2(-fe[0], fe[1])) * Fe, this.translate = [b.e, b.f], this.scale = [xe, ze], this.skew = ze ? Math.atan2(Te, ze) * Fe : 0;
          }
          function yu(b, R) {
            return b[0] * R[0] + b[1] * R[1];
          }
          function ef(b) {
            var R = Math.sqrt(yu(b, b));
            return R && (b[0] /= R, b[1] /= R), R;
          }
          i.ease = function(b) {
            var R, j = b.indexOf("-"), G = j >= 0 ? b.slice(0, j) : b, ie = j >= 0 ? b.slice(j + 1) : "in";
            return G = ja.get(G) || xs, ie = Mo.get(ie) || re, R = ie(G.apply(null, h.call(arguments, 1))), function(fe) {
              return fe <= 0 ? 0 : fe >= 1 ? 1 : R(fe);
            };
          }, i.interpolateHcl = function(b, R) {
            b = i.hcl(b), R = i.hcl(R);
            var j = b.h, G = b.c, ie = b.l, fe = R.h - j, xe = R.c - G, Te = R.l - ie;
            return isNaN(xe) && (xe = 0, G = isNaN(G) ? R.c : G), isNaN(fe) ? (fe = 0, j = isNaN(j) ? R.h : j) : fe > 180 ? fe -= 360 : fe < -180 && (fe += 360), function(ze) {
              return qt(j + fe * ze, G + xe * ze, ie + Te * ze) + "";
            };
          }, i.interpolateHsl = function(b, R) {
            b = i.hsl(b), R = i.hsl(R);
            var j = b.h, G = b.s, ie = b.l, fe = R.h - j, xe = R.s - G, Te = R.l - ie;
            return isNaN(xe) && (xe = 0, G = isNaN(G) ? R.s : G), isNaN(fe) ? (fe = 0, j = isNaN(j) ? R.h : j) : fe > 180 ? fe -= 360 : fe < -180 && (fe += 360), function(ze) {
              return Bt(j + fe * ze, G + xe * ze, ie + Te * ze) + "";
            };
          }, i.interpolateLab = function(b, R) {
            b = i.lab(b), R = i.lab(R);
            var j = b.l, G = b.a, ie = b.b, fe = R.l - j, xe = R.a - G, Te = R.b - ie;
            return function(ze) {
              return zn(j + fe * ze, G + xe * ze, ie + Te * ze) + "";
            };
          }, i.interpolateRound = Mc, i.transform = function(b) {
            var R = _.createElementNS(i.ns.prefix.svg, "g");
            return (i.transform = function(j) {
              if (j != null) {
                R.setAttribute("transform", j);
                var G = R.transform.baseVal.consolidate();
              }
              return new Xu(G ? G.matrix : tf);
            })(b);
          }, Xu.prototype.toString = function() {
            return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
          };
          var tf = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };
          function bs(b) {
            return b.length ? b.pop() + "," : "";
          }
          function Ec(b, R) {
            var j = [], G = [];
            return b = i.transform(b), R = i.transform(R), function(ie, fe, xe, Te) {
              if (ie[0] !== fe[0] || ie[1] !== fe[1]) {
                var ze = xe.push("translate(", null, ",", null, ")");
                Te.push({ i: ze - 4, x: Vi(ie[0], fe[0]) }, { i: ze - 2, x: Vi(ie[1], fe[1]) });
              } else (fe[0] || fe[1]) && xe.push("translate(" + fe + ")");
            }(b.translate, R.translate, j, G), function(ie, fe, xe, Te) {
              ie !== fe ? (ie - fe > 180 ? fe += 360 : fe - ie > 180 && (ie += 360), Te.push({ i: xe.push(bs(xe) + "rotate(", null, ")") - 2, x: Vi(ie, fe) })) : fe && xe.push(bs(xe) + "rotate(" + fe + ")");
            }(b.rotate, R.rotate, j, G), function(ie, fe, xe, Te) {
              ie !== fe ? Te.push({ i: xe.push(bs(xe) + "skewX(", null, ")") - 2, x: Vi(ie, fe) }) : fe && xe.push(bs(xe) + "skewX(" + fe + ")");
            }(b.skew, R.skew, j, G), function(ie, fe, xe, Te) {
              if (ie[0] !== fe[0] || ie[1] !== fe[1]) {
                var ze = xe.push(bs(xe) + "scale(", null, ",", null, ")");
                Te.push({ i: ze - 4, x: Vi(ie[0], fe[0]) }, { i: ze - 2, x: Vi(ie[1], fe[1]) });
              } else fe[0] === 1 && fe[1] === 1 || xe.push(bs(xe) + "scale(" + fe + ")");
            }(b.scale, R.scale, j, G), b = R = null, function(ie) {
              for (var fe, xe = -1, Te = G.length; ++xe < Te; ) j[(fe = G[xe]).i] = fe.x(ie);
              return j.join("");
            };
          }
          function mh(b, R) {
            return R = (R -= b = +b) || 1 / R, function(j) {
              return (j - b) / R;
            };
          }
          function Eo(b, R) {
            return R = (R -= b = +b) || 1 / R, function(j) {
              return Math.max(0, Math.min(1, (j - b) / R));
            };
          }
          function ac(b) {
            for (var R = b.source, j = b.target, G = function(xe, Te) {
              if (xe === Te) return xe;
              for (var ze = Xi(xe), Ve = Xi(Te), ut = ze.pop(), gt = Ve.pop(), wt = null; ut === gt; ) wt = ut, ut = ze.pop(), gt = Ve.pop();
              return wt;
            }(R, j), ie = [R]; R !== G; ) R = R.parent, ie.push(R);
            for (var fe = ie.length; j !== G; ) ie.splice(fe, 0, j), j = j.parent;
            return ie;
          }
          function Xi(b) {
            for (var R = [], j = b.parent; j != null; ) R.push(b), b = j, j = j.parent;
            return R.push(b), R;
          }
          function eu(b) {
            b.fixed |= 2;
          }
          function Ma(b) {
            b.fixed &= -7;
          }
          function Ea(b) {
            b.fixed |= 4, b.px = b.x, b.py = b.y;
          }
          function Ls(b) {
            b.fixed &= -5;
          }
          function Bs(b, R, j) {
            var G = 0, ie = 0;
            if (b.charge = 0, !b.leaf) for (var fe, xe = b.nodes, Te = xe.length, ze = -1; ++ze < Te; ) (fe = xe[ze]) != null && (Bs(fe, R, j), b.charge += fe.charge, G += fe.charge * fe.cx, ie += fe.charge * fe.cy);
            if (b.point) {
              b.leaf || (b.point.x += Math.random() - 0.5, b.point.y += Math.random() - 0.5);
              var Ve = R * j[b.point.index];
              b.charge += b.pointCharge = Ve, G += Ve * b.point.x, ie += Ve * b.point.y;
            }
            b.cx = G / b.charge, b.cy = ie / b.charge;
          }
          i.interpolateTransform = Ec, i.layout = {}, i.layout.bundle = function() {
            return function(b) {
              for (var R = [], j = -1, G = b.length; ++j < G; ) R.push(ac(b[j]));
              return R;
            };
          }, i.layout.chord = function() {
            var b, R, j, G, ie, fe, xe, Te = {}, ze = 0;
            function Ve() {
              var gt, wt, Et, zt, It, jt = {}, Lt = [], Zt = i.range(G), Qt = [];
              for (b = [], R = [], gt = 0, zt = -1; ++zt < G; ) {
                for (wt = 0, It = -1; ++It < G; ) wt += j[zt][It];
                Lt.push(wt), Qt.push(i.range(G)), gt += wt;
              }
              for (ie && Zt.sort(function(kr, or) {
                return ie(Lt[kr], Lt[or]);
              }), fe && Qt.forEach(function(kr, or) {
                kr.sort(function(Mr, fr) {
                  return fe(j[or][Mr], j[or][fr]);
                });
              }), gt = (Je - ze * G) / gt, wt = 0, zt = -1; ++zt < G; ) {
                for (Et = wt, It = -1; ++It < G; ) {
                  var Xt = Zt[zt], yn = Qt[Xt][It], Sn = j[Xt][yn], Un = wt, Vn = wt += Sn * gt;
                  jt[Xt + "-" + yn] = { index: Xt, subindex: yn, startAngle: Un, endAngle: Vn, value: Sn };
                }
                R[Xt] = { index: Xt, startAngle: Et, endAngle: wt, value: Lt[Xt] }, wt += ze;
              }
              for (zt = -1; ++zt < G; ) for (It = zt - 1; ++It < G; ) {
                var Yn = jt[zt + "-" + It], er = jt[It + "-" + zt];
                (Yn.value || er.value) && b.push(Yn.value < er.value ? { source: er, target: Yn } : { source: Yn, target: er });
              }
              xe && ut();
            }
            function ut() {
              b.sort(function(gt, wt) {
                return xe((gt.source.value + gt.target.value) / 2, (wt.source.value + wt.target.value) / 2);
              });
            }
            return Te.matrix = function(gt) {
              return arguments.length ? (G = (j = gt) && j.length, b = R = null, Te) : j;
            }, Te.padding = function(gt) {
              return arguments.length ? (ze = gt, b = R = null, Te) : ze;
            }, Te.sortGroups = function(gt) {
              return arguments.length ? (ie = gt, b = R = null, Te) : ie;
            }, Te.sortSubgroups = function(gt) {
              return arguments.length ? (fe = gt, b = null, Te) : fe;
            }, Te.sortChords = function(gt) {
              return arguments.length ? (xe = gt, b && ut(), Te) : xe;
            }, Te.chords = function() {
              return b || Ve(), b;
            }, Te.groups = function() {
              return R || Ve(), R;
            }, Te;
          }, i.layout.force = function() {
            var b, R, j, G, ie, fe, xe = {}, Te = i.dispatch("start", "tick", "end"), ze = [1, 1], Ve = 0.9, ut = oc, gt = tu, wt = -30, Et = _s, zt = 0.1, It = 0.64, jt = [], Lt = [];
            function Zt(Xt) {
              return function(yn, Sn, Un, Vn) {
                if (yn.point !== Xt) {
                  var Yn = yn.cx - Xt.x, er = yn.cy - Xt.y, kr = Vn - Sn, or = Yn * Yn + er * er;
                  if (kr * kr / It < or) {
                    if (or < Et) {
                      var Mr = yn.charge / or;
                      Xt.px -= Yn * Mr, Xt.py -= er * Mr;
                    }
                    return !0;
                  }
                  yn.point && or && or < Et && (Mr = yn.pointCharge / or, Xt.px -= Yn * Mr, Xt.py -= er * Mr);
                }
                return !yn.charge;
              };
            }
            function Qt(Xt) {
              Xt.px = i.event.x, Xt.py = i.event.y, xe.resume();
            }
            return xe.tick = function() {
              if ((j *= 0.99) < 5e-3) return b = null, Te.end({ type: "end", alpha: j = 0 }), !0;
              var Xt, yn, Sn, Un, Vn, Yn, er, kr, or, Mr = jt.length, fr = Lt.length;
              for (yn = 0; yn < fr; ++yn) Un = (Sn = Lt[yn]).source, (Yn = (kr = (Vn = Sn.target).x - Un.x) * kr + (or = Vn.y - Un.y) * or) && (kr *= Yn = j * ie[yn] * ((Yn = Math.sqrt(Yn)) - G[yn]) / Yn, or *= Yn, Vn.x -= kr * (er = Un.weight + Vn.weight ? Un.weight / (Un.weight + Vn.weight) : 0.5), Vn.y -= or * er, Un.x += kr * (er = 1 - er), Un.y += or * er);
              if ((er = j * zt) && (kr = ze[0] / 2, or = ze[1] / 2, yn = -1, er)) for (; ++yn < Mr; ) (Sn = jt[yn]).x += (kr - Sn.x) * er, Sn.y += (or - Sn.y) * er;
              if (wt) for (Bs(Xt = i.geom.quadtree(jt), j, fe), yn = -1; ++yn < Mr; ) (Sn = jt[yn]).fixed || Xt.visit(Zt(Sn));
              for (yn = -1; ++yn < Mr; ) (Sn = jt[yn]).fixed ? (Sn.x = Sn.px, Sn.y = Sn.py) : (Sn.x -= (Sn.px - (Sn.px = Sn.x)) * Ve, Sn.y -= (Sn.py - (Sn.py = Sn.y)) * Ve);
              Te.tick({ type: "tick", alpha: j });
            }, xe.nodes = function(Xt) {
              return arguments.length ? (jt = Xt, xe) : jt;
            }, xe.links = function(Xt) {
              return arguments.length ? (Lt = Xt, xe) : Lt;
            }, xe.size = function(Xt) {
              return arguments.length ? (ze = Xt, xe) : ze;
            }, xe.linkDistance = function(Xt) {
              return arguments.length ? (ut = typeof Xt == "function" ? Xt : +Xt, xe) : ut;
            }, xe.distance = xe.linkDistance, xe.linkStrength = function(Xt) {
              return arguments.length ? (gt = typeof Xt == "function" ? Xt : +Xt, xe) : gt;
            }, xe.friction = function(Xt) {
              return arguments.length ? (Ve = +Xt, xe) : Ve;
            }, xe.charge = function(Xt) {
              return arguments.length ? (wt = typeof Xt == "function" ? Xt : +Xt, xe) : wt;
            }, xe.chargeDistance = function(Xt) {
              return arguments.length ? (Et = Xt * Xt, xe) : Math.sqrt(Et);
            }, xe.gravity = function(Xt) {
              return arguments.length ? (zt = +Xt, xe) : zt;
            }, xe.theta = function(Xt) {
              return arguments.length ? (It = Xt * Xt, xe) : Math.sqrt(It);
            }, xe.alpha = function(Xt) {
              return arguments.length ? (Xt = +Xt, j ? Xt > 0 ? j = Xt : (b.c = null, b.t = NaN, b = null, Te.end({ type: "end", alpha: j = 0 })) : Xt > 0 && (Te.start({ type: "start", alpha: j = Xt }), b = Tn(xe.tick)), xe) : j;
            }, xe.start = function() {
              var Xt, yn, Sn, Un = jt.length, Vn = Lt.length, Yn = ze[0], er = ze[1];
              for (Xt = 0; Xt < Un; ++Xt) (Sn = jt[Xt]).index = Xt, Sn.weight = 0;
              for (Xt = 0; Xt < Vn; ++Xt) typeof (Sn = Lt[Xt]).source == "number" && (Sn.source = jt[Sn.source]), typeof Sn.target == "number" && (Sn.target = jt[Sn.target]), ++Sn.source.weight, ++Sn.target.weight;
              for (Xt = 0; Xt < Un; ++Xt) Sn = jt[Xt], isNaN(Sn.x) && (Sn.x = kr("x", Yn)), isNaN(Sn.y) && (Sn.y = kr("y", er)), isNaN(Sn.px) && (Sn.px = Sn.x), isNaN(Sn.py) && (Sn.py = Sn.y);
              if (G = [], typeof ut == "function") for (Xt = 0; Xt < Vn; ++Xt) G[Xt] = +ut.call(this, Lt[Xt], Xt);
              else for (Xt = 0; Xt < Vn; ++Xt) G[Xt] = ut;
              if (ie = [], typeof gt == "function") for (Xt = 0; Xt < Vn; ++Xt) ie[Xt] = +gt.call(this, Lt[Xt], Xt);
              else for (Xt = 0; Xt < Vn; ++Xt) ie[Xt] = gt;
              if (fe = [], typeof wt == "function") for (Xt = 0; Xt < Un; ++Xt) fe[Xt] = +wt.call(this, jt[Xt], Xt);
              else for (Xt = 0; Xt < Un; ++Xt) fe[Xt] = wt;
              function kr(or, Mr) {
                if (!yn) {
                  for (yn = new Array(Un), Nr = 0; Nr < Un; ++Nr) yn[Nr] = [];
                  for (Nr = 0; Nr < Vn; ++Nr) {
                    var fr = Lt[Nr];
                    yn[fr.source.index].push(fr.target), yn[fr.target.index].push(fr.source);
                  }
                }
                for (var Or, br = yn[Xt], Nr = -1, ii = br.length; ++Nr < ii; ) if (!isNaN(Or = br[Nr][or])) return Or;
                return Math.random() * Mr;
              }
              return xe.resume();
            }, xe.resume = function() {
              return xe.alpha(0.1);
            }, xe.stop = function() {
              return xe.alpha(0);
            }, xe.drag = function() {
              if (R || (R = i.behavior.drag().origin(re).on("dragstart.force", eu).on("drag.force", Qt).on("dragend.force", Ma)), !arguments.length) return R;
              this.on("mouseover.force", Ea).on("mouseout.force", Ls).call(R);
            }, i.rebind(xe, Te, "on");
          };
          var oc = 20, tu = 1, _s = 1 / 0;
          function Ps(b, R) {
            return i.rebind(b, R, "sort", "children", "value"), b.nodes = b, b.links = Ks, b;
          }
          function Co(b, R) {
            for (var j = [b]; (b = j.pop()) != null; ) if (R(b), (ie = b.children) && (G = ie.length)) for (var G, ie; --G >= 0; ) j.push(ie[G]);
          }
          function da(b, R) {
            for (var j = [b], G = []; (b = j.pop()) != null; ) if (G.push(b), (fe = b.children) && (ie = fe.length)) for (var ie, fe, xe = -1; ++xe < ie; ) j.push(fe[xe]);
            for (; (b = G.pop()) != null; ) R(b);
          }
          function Ou(b) {
            return b.children;
          }
          function pf(b) {
            return b.value;
          }
          function nu(b, R) {
            return R.value - b.value;
          }
          function Ks(b) {
            return i.merge(b.map(function(R) {
              return (R.children || []).map(function(j) {
                return { source: R, target: j };
              });
            }));
          }
          i.layout.hierarchy = function() {
            var b = nu, R = Ou, j = pf;
            function G(ie) {
              var fe, xe = [ie], Te = [];
              for (ie.depth = 0; (fe = xe.pop()) != null; ) if (Te.push(fe), (Ve = R.call(G, fe, fe.depth)) && (ze = Ve.length)) {
                for (var ze, Ve, ut; --ze >= 0; ) xe.push(ut = Ve[ze]), ut.parent = fe, ut.depth = fe.depth + 1;
                j && (fe.value = 0), fe.children = Ve;
              } else j && (fe.value = +j.call(G, fe, fe.depth) || 0), delete fe.children;
              return da(ie, function(gt) {
                var wt, Et;
                b && (wt = gt.children) && wt.sort(b), j && (Et = gt.parent) && (Et.value += gt.value);
              }), Te;
            }
            return G.sort = function(ie) {
              return arguments.length ? (b = ie, G) : b;
            }, G.children = function(ie) {
              return arguments.length ? (R = ie, G) : R;
            }, G.value = function(ie) {
              return arguments.length ? (j = ie, G) : j;
            }, G.revalue = function(ie) {
              return j && (Co(ie, function(fe) {
                fe.children && (fe.value = 0);
              }), da(ie, function(fe) {
                var xe;
                fe.children || (fe.value = +j.call(G, fe, fe.depth) || 0), (xe = fe.parent) && (xe.value += fe.value);
              })), ie;
            }, G;
          }, i.layout.partition = function() {
            var b = i.layout.hierarchy(), R = [1, 1];
            function j(fe, xe, Te, ze) {
              var Ve = fe.children;
              if (fe.x = xe, fe.y = fe.depth * ze, fe.dx = Te, fe.dy = ze, Ve && (ut = Ve.length)) {
                var ut, gt, wt, Et = -1;
                for (Te = fe.value ? Te / fe.value : 0; ++Et < ut; ) j(gt = Ve[Et], xe, wt = gt.value * Te, ze), xe += wt;
              }
            }
            function G(fe) {
              var xe = fe.children, Te = 0;
              if (xe && (ze = xe.length)) for (var ze, Ve = -1; ++Ve < ze; ) Te = Math.max(Te, G(xe[Ve]));
              return 1 + Te;
            }
            function ie(fe, xe) {
              var Te = b.call(this, fe, xe);
              return j(Te[0], 0, R[0], R[1] / G(Te[0])), Te;
            }
            return ie.size = function(fe) {
              return arguments.length ? (R = fe, ie) : R;
            }, Ps(ie, b);
          }, i.layout.pie = function() {
            var b = Number, R = Cc, j = 0, G = Je, ie = 0;
            function fe(xe) {
              var Te, ze = xe.length, Ve = xe.map(function(Zt, Qt) {
                return +b.call(fe, Zt, Qt);
              }), ut = +(typeof j == "function" ? j.apply(this, arguments) : j), gt = (typeof G == "function" ? G.apply(this, arguments) : G) - ut, wt = Math.min(Math.abs(gt) / ze, +(typeof ie == "function" ? ie.apply(this, arguments) : ie)), Et = wt * (gt < 0 ? -1 : 1), zt = i.sum(Ve), It = zt ? (gt - ze * Et) / zt : 0, jt = i.range(ze), Lt = [];
              return R != null && jt.sort(R === Cc ? function(Zt, Qt) {
                return Ve[Qt] - Ve[Zt];
              } : function(Zt, Qt) {
                return R(xe[Zt], xe[Qt]);
              }), jt.forEach(function(Zt) {
                Lt[Zt] = { data: xe[Zt], value: Te = Ve[Zt], startAngle: ut, endAngle: ut += Te * It + Et, padAngle: wt };
              }), Lt;
            }
            return fe.value = function(xe) {
              return arguments.length ? (b = xe, fe) : b;
            }, fe.sort = function(xe) {
              return arguments.length ? (R = xe, fe) : R;
            }, fe.startAngle = function(xe) {
              return arguments.length ? (j = xe, fe) : j;
            }, fe.endAngle = function(xe) {
              return arguments.length ? (G = xe, fe) : G;
            }, fe.padAngle = function(xe) {
              return arguments.length ? (ie = xe, fe) : ie;
            }, fe;
          };
          var Cc = {};
          function sc(b) {
            return b.x;
          }
          function lc(b) {
            return b.y;
          }
          function mf(b, R, j) {
            b.y0 = R, b.y = j;
          }
          i.layout.stack = function() {
            var b = re, R = ru, j = Cl, G = mf, ie = sc, fe = lc;
            function xe(Te, ze) {
              if (!(wt = Te.length)) return Te;
              var Ve = Te.map(function(Zt, Qt) {
                return b.call(xe, Zt, Qt);
              }), ut = Ve.map(function(Zt) {
                return Zt.map(function(Qt, Xt) {
                  return [ie.call(xe, Qt, Xt), fe.call(xe, Qt, Xt)];
                });
              }), gt = R.call(xe, ut, ze);
              Ve = i.permute(Ve, gt), ut = i.permute(ut, gt);
              var wt, Et, zt, It, jt = j.call(xe, ut, ze), Lt = Ve[0].length;
              for (zt = 0; zt < Lt; ++zt) for (G.call(xe, Ve[0][zt], It = jt[zt], ut[0][zt][1]), Et = 1; Et < wt; ++Et) G.call(xe, Ve[Et][zt], It += ut[Et - 1][zt][1], ut[Et][zt][1]);
              return Te;
            }
            return xe.values = function(Te) {
              return arguments.length ? (b = Te, xe) : b;
            }, xe.order = function(Te) {
              return arguments.length ? (R = typeof Te == "function" ? Te : yl.get(Te) || ru, xe) : R;
            }, xe.offset = function(Te) {
              return arguments.length ? (j = typeof Te == "function" ? Te : vl.get(Te) || Cl, xe) : j;
            }, xe.x = function(Te) {
              return arguments.length ? (ie = Te, xe) : ie;
            }, xe.y = function(Te) {
              return arguments.length ? (fe = Te, xe) : fe;
            }, xe.out = function(Te) {
              return arguments.length ? (G = Te, xe) : G;
            }, xe;
          };
          var yl = i.map({ "inside-out": function(b) {
            var R, j, G = b.length, ie = b.map(ea), fe = b.map(Ic), xe = i.range(G).sort(function(gt, wt) {
              return ie[gt] - ie[wt];
            }), Te = 0, ze = 0, Ve = [], ut = [];
            for (R = 0; R < G; ++R) j = xe[R], Te < ze ? (Te += fe[j], Ve.push(j)) : (ze += fe[j], ut.push(j));
            return ut.reverse().concat(Ve);
          }, reverse: function(b) {
            return i.range(b.length).reverse();
          }, default: ru }), vl = i.map({ silhouette: function(b) {
            var R, j, G, ie = b.length, fe = b[0].length, xe = [], Te = 0, ze = [];
            for (j = 0; j < fe; ++j) {
              for (R = 0, G = 0; R < ie; R++) G += b[R][j][1];
              G > Te && (Te = G), xe.push(G);
            }
            for (j = 0; j < fe; ++j) ze[j] = (Te - xe[j]) / 2;
            return ze;
          }, wiggle: function(b) {
            var R, j, G, ie, fe, xe, Te, ze, Ve, ut = b.length, gt = b[0], wt = gt.length, Et = [];
            for (Et[0] = ze = Ve = 0, j = 1; j < wt; ++j) {
              for (R = 0, ie = 0; R < ut; ++R) ie += b[R][j][1];
              for (R = 0, fe = 0, Te = gt[j][0] - gt[j - 1][0]; R < ut; ++R) {
                for (G = 0, xe = (b[R][j][1] - b[R][j - 1][1]) / (2 * Te); G < R; ++G) xe += (b[G][j][1] - b[G][j - 1][1]) / Te;
                fe += xe * b[R][j][1];
              }
              Et[j] = ze -= ie ? fe / ie * Te : 0, ze < Ve && (Ve = ze);
            }
            for (j = 0; j < wt; ++j) Et[j] -= Ve;
            return Et;
          }, expand: function(b) {
            var R, j, G, ie = b.length, fe = b[0].length, xe = 1 / ie, Te = [];
            for (j = 0; j < fe; ++j) {
              for (R = 0, G = 0; R < ie; R++) G += b[R][j][1];
              if (G) for (R = 0; R < ie; R++) b[R][j][1] /= G;
              else for (R = 0; R < ie; R++) b[R][j][1] = xe;
            }
            for (j = 0; j < fe; ++j) Te[j] = 0;
            return Te;
          }, zero: Cl });
          function ru(b) {
            return i.range(b.length);
          }
          function Cl(b) {
            for (var R = -1, j = b[0].length, G = []; ++R < j; ) G[R] = 0;
            return G;
          }
          function ea(b) {
            for (var R, j = 1, G = 0, ie = b[0][1], fe = b.length; j < fe; ++j) (R = b[j][1]) > ie && (G = j, ie = R);
            return G;
          }
          function Ic(b) {
            return b.reduce(nf, 0);
          }
          function nf(b, R) {
            return b + R[1];
          }
          function zu(b, R) {
            return Yo(b, Math.ceil(Math.log(R.length) / Math.LN2 + 1));
          }
          function Yo(b, R) {
            for (var j = -1, G = +b[0], ie = (b[1] - G) / R, fe = []; ++j <= R; ) fe[j] = ie * j + G;
            return fe;
          }
          function Ru(b) {
            return [i.min(b), i.max(b)];
          }
          function gf(b, R) {
            return b.value - R.value;
          }
          function Fu(b, R) {
            var j = b._pack_next;
            b._pack_next = R, R._pack_prev = b, R._pack_next = j, j._pack_prev = R;
          }
          function ws(b, R) {
            b._pack_next = R, R._pack_prev = b;
          }
          function Nu(b, R) {
            var j = R.x - b.x, G = R.y - b.y, ie = b.r + R.r;
            return 0.999 * ie * ie > j * j + G * G;
          }
          function An(b) {
            if ((R = b.children) && (ze = R.length)) {
              var R, j, G, ie, fe, xe, Te, ze, Ve = 1 / 0, ut = -1 / 0, gt = 1 / 0, wt = -1 / 0;
              if (R.forEach(to), (j = R[0]).x = -j.r, j.y = 0, Qt(j), ze > 1 && ((G = R[1]).x = G.r, G.y = 0, Qt(G), ze > 2)) for (va(j, G, ie = R[2]), Qt(ie), Fu(j, ie), j._pack_prev = ie, Fu(ie, G), G = j._pack_next, fe = 3; fe < ze; fe++) {
                va(j, G, ie = R[fe]);
                var Et = 0, zt = 1, It = 1;
                for (xe = G._pack_next; xe !== G; xe = xe._pack_next, zt++) if (Nu(xe, ie)) {
                  Et = 1;
                  break;
                }
                if (Et == 1) for (Te = j._pack_prev; Te !== xe._pack_prev && !Nu(Te, ie); Te = Te._pack_prev, It++) ;
                Et ? (zt < It || zt == It && G.r < j.r ? ws(j, G = xe) : ws(j = Te, G), fe--) : (Fu(j, ie), G = ie, Qt(ie));
              }
              var jt = (Ve + ut) / 2, Lt = (gt + wt) / 2, Zt = 0;
              for (fe = 0; fe < ze; fe++) (ie = R[fe]).x -= jt, ie.y -= Lt, Zt = Math.max(Zt, ie.r + Math.sqrt(ie.x * ie.x + ie.y * ie.y));
              b.r = Zt, R.forEach(Io);
            }
            function Qt(Xt) {
              Ve = Math.min(Xt.x - Xt.r, Ve), ut = Math.max(Xt.x + Xt.r, ut), gt = Math.min(Xt.y - Xt.r, gt), wt = Math.max(Xt.y + Xt.r, wt);
            }
          }
          function to(b) {
            b._pack_next = b._pack_prev = b;
          }
          function Io(b) {
            delete b._pack_next, delete b._pack_prev;
          }
          function Ku(b, R, j, G) {
            var ie = b.children;
            if (b.x = R += G * b.x, b.y = j += G * b.y, b.r *= G, ie) for (var fe = -1, xe = ie.length; ++fe < xe; ) Ku(ie[fe], R, j, G);
          }
          function va(b, R, j) {
            var G = b.r + j.r, ie = R.x - b.x, fe = R.y - b.y;
            if (G && (ie || fe)) {
              var xe = R.r + j.r, Te = ie * ie + fe * fe, ze = 0.5 + ((G *= G) - (xe *= xe)) / (2 * Te), Ve = Math.sqrt(Math.max(0, 2 * xe * (G + Te) - (G -= Te) * G - xe * xe)) / (2 * Te);
              j.x = b.x + ze * ie + Ve * fe, j.y = b.y + ze * fe - Ve * ie;
            } else j.x = b.x + G, j.y = b.y;
          }
          function Js(b, R) {
            return b.parent == R.parent ? 1 : 2;
          }
          function Ha(b) {
            var R = b.children;
            return R.length ? R[0] : b.t;
          }
          function as(b) {
            var R, j = b.children;
            return (R = j.length) ? j[R - 1] : b.t;
          }
          function aa(b, R, j) {
            var G = j / (R.i - b.i);
            R.c -= G, R.s += j, b.c += G, R.z += j, R.m += j;
          }
          function Aa(b, R, j) {
            return b.a.parent === R.parent ? b.a : j;
          }
          function yo(b) {
            var R = b.children;
            return R && R.length ? yo(R[0]) : b;
          }
          function Ju(b) {
            var R, j = b.children;
            return j && (R = j.length) ? Ju(j[R - 1]) : b;
          }
          function uc(b) {
            return { x: b.x, y: b.y, dx: b.dx, dy: b.dy };
          }
          function vu(b, R) {
            var j = b.x + R[3], G = b.y + R[0], ie = b.dx - R[1] - R[3], fe = b.dy - R[0] - R[2];
            return ie < 0 && (j += ie / 2, ie = 0), fe < 0 && (G += fe / 2, fe = 0), { x: j, y: G, dx: ie, dy: fe };
          }
          function xu(b) {
            var R = b[0], j = b[b.length - 1];
            return R < j ? [R, j] : [j, R];
          }
          function Zo(b) {
            return b.rangeExtent ? b.rangeExtent() : xu(b.range());
          }
          function Fo(b, R, j, G) {
            var ie = j(b[0], b[1]), fe = G(R[0], R[1]);
            return function(xe) {
              return fe(ie(xe));
            };
          }
          function Il(b, R) {
            var j, G = 0, ie = b.length - 1, fe = b[G], xe = b[ie];
            return xe < fe && (j = G, G = ie, ie = j, j = fe, fe = xe, xe = j), b[G] = R.floor(fe), b[ie] = R.ceil(xe), b;
          }
          function bu(b) {
            return b ? { floor: function(R) {
              return Math.floor(R / b) * b;
            }, ceil: function(R) {
              return Math.ceil(R / b) * b;
            } } : Xo;
          }
          i.layout.histogram = function() {
            var b = !0, R = Number, j = Ru, G = zu;
            function ie(fe, xe) {
              for (var Te, ze, Ve = [], ut = fe.map(R, this), gt = j.call(this, ut, xe), wt = G.call(this, gt, ut, xe), Et = (xe = -1, ut.length), zt = wt.length - 1, It = b ? 1 : 1 / Et; ++xe < zt; ) (Te = Ve[xe] = []).dx = wt[xe + 1] - (Te.x = wt[xe]), Te.y = 0;
              if (zt > 0) for (xe = -1; ++xe < Et; ) (ze = ut[xe]) >= gt[0] && ze <= gt[1] && ((Te = Ve[i.bisect(wt, ze, 1, zt) - 1]).y += It, Te.push(fe[xe]));
              return Ve;
            }
            return ie.value = function(fe) {
              return arguments.length ? (R = fe, ie) : R;
            }, ie.range = function(fe) {
              return arguments.length ? (j = cr(fe), ie) : j;
            }, ie.bins = function(fe) {
              return arguments.length ? (G = typeof fe == "number" ? function(xe) {
                return Yo(xe, fe);
              } : cr(fe), ie) : G;
            }, ie.frequency = function(fe) {
              return arguments.length ? (b = !!fe, ie) : b;
            }, ie;
          }, i.layout.pack = function() {
            var b, R = i.layout.hierarchy().sort(gf), j = 0, G = [1, 1];
            function ie(fe, xe) {
              var Te = R.call(this, fe, xe), ze = Te[0], Ve = G[0], ut = G[1], gt = b == null ? Math.sqrt : typeof b == "function" ? b : function() {
                return b;
              };
              if (ze.x = ze.y = 0, da(ze, function(Et) {
                Et.r = +gt(Et.value);
              }), da(ze, An), j) {
                var wt = j * (b ? 1 : Math.max(2 * ze.r / Ve, 2 * ze.r / ut)) / 2;
                da(ze, function(Et) {
                  Et.r += wt;
                }), da(ze, An), da(ze, function(Et) {
                  Et.r -= wt;
                });
              }
              return Ku(ze, Ve / 2, ut / 2, b ? 1 : 1 / Math.max(2 * ze.r / Ve, 2 * ze.r / ut)), Te;
            }
            return ie.size = function(fe) {
              return arguments.length ? (G = fe, ie) : G;
            }, ie.radius = function(fe) {
              return arguments.length ? (b = fe == null || typeof fe == "function" ? fe : +fe, ie) : b;
            }, ie.padding = function(fe) {
              return arguments.length ? (j = +fe, ie) : j;
            }, Ps(ie, R);
          }, i.layout.tree = function() {
            var b = i.layout.hierarchy().sort(null).value(null), R = Js, j = [1, 1], G = null;
            function ie(ze, Ve) {
              var ut = b.call(this, ze, Ve), gt = ut[0], wt = function(Qt) {
                for (var Xt, yn = { A: null, children: [Qt] }, Sn = [yn]; (Xt = Sn.pop()) != null; ) for (var Un, Vn = Xt.children, Yn = 0, er = Vn.length; Yn < er; ++Yn) Sn.push((Vn[Yn] = Un = { _: Vn[Yn], parent: Xt, children: (Un = Vn[Yn].children) && Un.slice() || [], A: null, a: null, z: 0, m: 0, c: 0, s: 0, t: null, i: Yn }).a = Un);
                return yn.children[0];
              }(gt);
              if (da(wt, fe), wt.parent.m = -wt.z, Co(wt, xe), G) Co(gt, Te);
              else {
                var Et = gt, zt = gt, It = gt;
                Co(gt, function(Qt) {
                  Qt.x < Et.x && (Et = Qt), Qt.x > zt.x && (zt = Qt), Qt.depth > It.depth && (It = Qt);
                });
                var jt = R(Et, zt) / 2 - Et.x, Lt = j[0] / (zt.x + R(zt, Et) / 2 + jt), Zt = j[1] / (It.depth || 1);
                Co(gt, function(Qt) {
                  Qt.x = (Qt.x + jt) * Lt, Qt.y = Qt.depth * Zt;
                });
              }
              return ut;
            }
            function fe(ze) {
              var Ve = ze.children, ut = ze.parent.children, gt = ze.i ? ut[ze.i - 1] : null;
              if (Ve.length) {
                (function(Et) {
                  for (var zt, It = 0, jt = 0, Lt = Et.children, Zt = Lt.length; --Zt >= 0; ) (zt = Lt[Zt]).z += It, zt.m += It, It += zt.s + (jt += zt.c);
                })(ze);
                var wt = (Ve[0].z + Ve[Ve.length - 1].z) / 2;
                gt ? (ze.z = gt.z + R(ze._, gt._), ze.m = ze.z - wt) : ze.z = wt;
              } else gt && (ze.z = gt.z + R(ze._, gt._));
              ze.parent.A = function(Et, zt, It) {
                if (zt) {
                  for (var jt, Lt = Et, Zt = Et, Qt = zt, Xt = Lt.parent.children[0], yn = Lt.m, Sn = Zt.m, Un = Qt.m, Vn = Xt.m; Qt = as(Qt), Lt = Ha(Lt), Qt && Lt; ) Xt = Ha(Xt), (Zt = as(Zt)).a = Et, (jt = Qt.z + Un - Lt.z - yn + R(Qt._, Lt._)) > 0 && (aa(Aa(Qt, Et, It), Et, jt), yn += jt, Sn += jt), Un += Qt.m, yn += Lt.m, Vn += Xt.m, Sn += Zt.m;
                  Qt && !as(Zt) && (Zt.t = Qt, Zt.m += Un - Sn), Lt && !Ha(Xt) && (Xt.t = Lt, Xt.m += yn - Vn, It = Et);
                }
                return It;
              }(ze, gt, ze.parent.A || ut[0]);
            }
            function xe(ze) {
              ze._.x = ze.z + ze.parent.m, ze.m += ze.parent.m;
            }
            function Te(ze) {
              ze.x *= j[0], ze.y = ze.depth * j[1];
            }
            return ie.separation = function(ze) {
              return arguments.length ? (R = ze, ie) : R;
            }, ie.size = function(ze) {
              return arguments.length ? (G = (j = ze) == null ? Te : null, ie) : G ? null : j;
            }, ie.nodeSize = function(ze) {
              return arguments.length ? (G = (j = ze) == null ? null : Te, ie) : G ? j : null;
            }, Ps(ie, b);
          }, i.layout.cluster = function() {
            var b = i.layout.hierarchy().sort(null).value(null), R = Js, j = [1, 1], G = !1;
            function ie(fe, xe) {
              var Te, ze = b.call(this, fe, xe), Ve = ze[0], ut = 0;
              da(Ve, function(It) {
                var jt = It.children;
                jt && jt.length ? (It.x = function(Lt) {
                  return Lt.reduce(function(Zt, Qt) {
                    return Zt + Qt.x;
                  }, 0) / Lt.length;
                }(jt), It.y = function(Lt) {
                  return 1 + i.max(Lt, function(Zt) {
                    return Zt.y;
                  });
                }(jt)) : (It.x = Te ? ut += R(It, Te) : 0, It.y = 0, Te = It);
              });
              var gt = yo(Ve), wt = Ju(Ve), Et = gt.x - R(gt, wt) / 2, zt = wt.x + R(wt, gt) / 2;
              return da(Ve, G ? function(It) {
                It.x = (It.x - Ve.x) * j[0], It.y = (Ve.y - It.y) * j[1];
              } : function(It) {
                It.x = (It.x - Et) / (zt - Et) * j[0], It.y = (1 - (Ve.y ? It.y / Ve.y : 1)) * j[1];
              }), ze;
            }
            return ie.separation = function(fe) {
              return arguments.length ? (R = fe, ie) : R;
            }, ie.size = function(fe) {
              return arguments.length ? (G = (j = fe) == null, ie) : G ? null : j;
            }, ie.nodeSize = function(fe) {
              return arguments.length ? (G = (j = fe) != null, ie) : G ? j : null;
            }, Ps(ie, b);
          }, i.layout.treemap = function() {
            var b, R = i.layout.hierarchy(), j = Math.round, G = [1, 1], ie = null, fe = uc, xe = !1, Te = "squarify", ze = 0.5 * (1 + Math.sqrt(5));
            function Ve(It, jt) {
              for (var Lt, Zt, Qt = -1, Xt = It.length; ++Qt < Xt; ) Zt = (Lt = It[Qt]).value * (jt < 0 ? 0 : jt), Lt.area = isNaN(Zt) || Zt <= 0 ? 0 : Zt;
            }
            function ut(It) {
              var jt = It.children;
              if (jt && jt.length) {
                var Lt, Zt, Qt, Xt = fe(It), yn = [], Sn = jt.slice(), Un = 1 / 0, Vn = Te === "slice" ? Xt.dx : Te === "dice" ? Xt.dy : Te === "slice-dice" ? 1 & It.depth ? Xt.dy : Xt.dx : Math.min(Xt.dx, Xt.dy);
                for (Ve(Sn, Xt.dx * Xt.dy / It.value), yn.area = 0; (Qt = Sn.length) > 0; ) yn.push(Lt = Sn[Qt - 1]), yn.area += Lt.area, Te !== "squarify" || (Zt = wt(yn, Vn)) <= Un ? (Sn.pop(), Un = Zt) : (yn.area -= yn.pop().area, Et(yn, Vn, Xt, !1), Vn = Math.min(Xt.dx, Xt.dy), yn.length = yn.area = 0, Un = 1 / 0);
                yn.length && (Et(yn, Vn, Xt, !0), yn.length = yn.area = 0), jt.forEach(ut);
              }
            }
            function gt(It) {
              var jt = It.children;
              if (jt && jt.length) {
                var Lt, Zt = fe(It), Qt = jt.slice(), Xt = [];
                for (Ve(Qt, Zt.dx * Zt.dy / It.value), Xt.area = 0; Lt = Qt.pop(); ) Xt.push(Lt), Xt.area += Lt.area, Lt.z != null && (Et(Xt, Lt.z ? Zt.dx : Zt.dy, Zt, !Qt.length), Xt.length = Xt.area = 0);
                jt.forEach(gt);
              }
            }
            function wt(It, jt) {
              for (var Lt, Zt = It.area, Qt = 0, Xt = 1 / 0, yn = -1, Sn = It.length; ++yn < Sn; ) (Lt = It[yn].area) && (Lt < Xt && (Xt = Lt), Lt > Qt && (Qt = Lt));
              return jt *= jt, (Zt *= Zt) ? Math.max(jt * Qt * ze / Zt, Zt / (jt * Xt * ze)) : 1 / 0;
            }
            function Et(It, jt, Lt, Zt) {
              var Qt, Xt = -1, yn = It.length, Sn = Lt.x, Un = Lt.y, Vn = jt ? j(It.area / jt) : 0;
              if (jt == Lt.dx) {
                for ((Zt || Vn > Lt.dy) && (Vn = Lt.dy); ++Xt < yn; ) (Qt = It[Xt]).x = Sn, Qt.y = Un, Qt.dy = Vn, Sn += Qt.dx = Math.min(Lt.x + Lt.dx - Sn, Vn ? j(Qt.area / Vn) : 0);
                Qt.z = !0, Qt.dx += Lt.x + Lt.dx - Sn, Lt.y += Vn, Lt.dy -= Vn;
              } else {
                for ((Zt || Vn > Lt.dx) && (Vn = Lt.dx); ++Xt < yn; ) (Qt = It[Xt]).x = Sn, Qt.y = Un, Qt.dx = Vn, Un += Qt.dy = Math.min(Lt.y + Lt.dy - Un, Vn ? j(Qt.area / Vn) : 0);
                Qt.z = !1, Qt.dy += Lt.y + Lt.dy - Un, Lt.x += Vn, Lt.dx -= Vn;
              }
            }
            function zt(It) {
              var jt = b || R(It), Lt = jt[0];
              return Lt.x = Lt.y = 0, Lt.value ? (Lt.dx = G[0], Lt.dy = G[1]) : Lt.dx = Lt.dy = 0, b && R.revalue(Lt), Ve([Lt], Lt.dx * Lt.dy / Lt.value), (b ? gt : ut)(Lt), xe && (b = jt), jt;
            }
            return zt.size = function(It) {
              return arguments.length ? (G = It, zt) : G;
            }, zt.padding = function(It) {
              if (!arguments.length) return ie;
              function jt(Zt) {
                return vu(Zt, It);
              }
              var Lt;
              return fe = (ie = It) == null ? uc : (Lt = typeof It) == "function" ? function(Zt) {
                var Qt = It.call(zt, Zt, Zt.depth);
                return Qt == null ? uc(Zt) : vu(Zt, typeof Qt == "number" ? [Qt, Qt, Qt, Qt] : Qt);
              } : (Lt === "number" && (It = [It, It, It, It]), jt), zt;
            }, zt.round = function(It) {
              return arguments.length ? (j = It ? Math.round : Number, zt) : j != Number;
            }, zt.sticky = function(It) {
              return arguments.length ? (xe = It, b = null, zt) : xe;
            }, zt.ratio = function(It) {
              return arguments.length ? (ze = It, zt) : ze;
            }, zt.mode = function(It) {
              return arguments.length ? (Te = It + "", zt) : Te;
            }, Ps(zt, R);
          }, i.random = { normal: function(b, R) {
            var j = arguments.length;
            return j < 2 && (R = 1), j < 1 && (b = 0), function() {
              var G, ie, fe;
              do
                fe = (G = 2 * Math.random() - 1) * G + (ie = 2 * Math.random() - 1) * ie;
              while (!fe || fe > 1);
              return b + R * G * Math.sqrt(-2 * Math.log(fe) / fe);
            };
          }, logNormal: function() {
            var b = i.random.normal.apply(i, arguments);
            return function() {
              return Math.exp(b());
            };
          }, bates: function(b) {
            var R = i.random.irwinHall(b);
            return function() {
              return R() / b;
            };
          }, irwinHall: function(b) {
            return function() {
              for (var R = 0, j = 0; j < b; j++) R += Math.random();
              return R;
            };
          } }, i.scale = {};
          var Xo = { floor: re, ceil: re };
          function Ra(b, R, j, G) {
            var ie = [], fe = [], xe = 0, Te = Math.min(b.length, R.length) - 1;
            for (b[Te] < b[0] && (b = b.slice().reverse(), R = R.slice().reverse()); ++xe <= Te; ) ie.push(j(b[xe - 1], b[xe])), fe.push(G(R[xe - 1], R[xe]));
            return function(ze) {
              var Ve = i.bisect(b, ze, 1, Te) - 1;
              return fe[Ve](ie[Ve](ze));
            };
          }
          function No(b, R, j, G) {
            var ie, fe;
            function xe() {
              var ze = Math.min(b.length, R.length) > 2 ? Ra : Fo, Ve = G ? Eo : mh;
              return ie = ze(b, R, Ve, j), fe = ze(R, b, Ve, vs), Te;
            }
            function Te(ze) {
              return ie(ze);
            }
            return Te.invert = function(ze) {
              return fe(ze);
            }, Te.domain = function(ze) {
              return arguments.length ? (b = ze.map(Number), xe()) : b;
            }, Te.range = function(ze) {
              return arguments.length ? (R = ze, xe()) : R;
            }, Te.rangeRound = function(ze) {
              return Te.range(ze).interpolate(Mc);
            }, Te.clamp = function(ze) {
              return arguments.length ? (G = ze, xe()) : G;
            }, Te.interpolate = function(ze) {
              return arguments.length ? (j = ze, xe()) : j;
            }, Te.ticks = function(ze) {
              return Do(b, ze);
            }, Te.tickFormat = function(ze, Ve) {
              return d3_scale_linearTickFormat(b, ze, Ve);
            }, Te.nice = function(ze) {
              return Bo(b, ze), xe();
            }, Te.copy = function() {
              return No(b, R, j, G);
            }, xe();
          }
          function Sa(b, R) {
            return i.rebind(b, R, "range", "rangeRound", "interpolate", "clamp");
          }
          function Bo(b, R) {
            return Il(b, bu(_a(b, R)[2])), Il(b, bu(_a(b, R)[2])), b;
          }
          function _a(b, R) {
            R == null && (R = 10);
            var j = xu(b), G = j[1] - j[0], ie = Math.pow(10, Math.floor(Math.log(G / R) / Math.LN10)), fe = R / G * ie;
            return fe <= 0.15 ? ie *= 10 : fe <= 0.35 ? ie *= 5 : fe <= 0.75 && (ie *= 2), j[0] = Math.ceil(j[0] / ie) * ie, j[1] = Math.floor(j[1] / ie) * ie + 0.5 * ie, j[2] = ie, j;
          }
          function Do(b, R) {
            return i.range.apply(i, _a(b, R));
          }
          function jo(b, R, j, G) {
            function ie(Te) {
              return (j ? Math.log(Te < 0 ? 0 : Te) : -Math.log(Te > 0 ? 0 : -Te)) / Math.log(R);
            }
            function fe(Te) {
              return j ? Math.pow(R, Te) : -Math.pow(R, -Te);
            }
            function xe(Te) {
              return b(ie(Te));
            }
            return xe.invert = function(Te) {
              return fe(b.invert(Te));
            }, xe.domain = function(Te) {
              return arguments.length ? (j = Te[0] >= 0, b.domain((G = Te.map(Number)).map(ie)), xe) : G;
            }, xe.base = function(Te) {
              return arguments.length ? (R = +Te, b.domain(G.map(ie)), xe) : R;
            }, xe.nice = function() {
              var Te = Il(G.map(ie), j ? Math : Dl);
              return b.domain(Te), G = Te.map(fe), xe;
            }, xe.ticks = function() {
              var Te = xu(G), ze = [], Ve = Te[0], ut = Te[1], gt = Math.floor(ie(Ve)), wt = Math.ceil(ie(ut)), Et = R % 1 ? 2 : R;
              if (isFinite(wt - gt)) {
                if (j) {
                  for (; gt < wt; gt++) for (var zt = 1; zt < Et; zt++) ze.push(fe(gt) * zt);
                  ze.push(fe(gt));
                } else for (ze.push(fe(gt)); gt++ < wt; ) for (zt = Et - 1; zt > 0; zt--) ze.push(fe(gt) * zt);
                for (gt = 0; ze[gt] < Ve; gt++) ;
                for (wt = ze.length; ze[wt - 1] > ut; wt--) ;
                ze = ze.slice(gt, wt);
              }
              return ze;
            }, xe.copy = function() {
              return jo(b.copy(), R, j, G);
            }, Sa(xe, b);
          }
          i.scale.linear = function() {
            return No([0, 1], [0, 1], vs, !1);
          }, i.scale.log = function() {
            return jo(i.scale.linear().domain([0, 1]), 10, !0, [1, 10]);
          };
          var Dl = { floor: function(b) {
            return -Math.ceil(-b);
          }, ceil: function(b) {
            return -Math.floor(-b);
          } };
          function Uo(b, R, j) {
            var G = Qs(R), ie = Qs(1 / R);
            function fe(xe) {
              return b(G(xe));
            }
            return fe.invert = function(xe) {
              return ie(b.invert(xe));
            }, fe.domain = function(xe) {
              return arguments.length ? (b.domain((j = xe.map(Number)).map(G)), fe) : j;
            }, fe.ticks = function(xe) {
              return Do(j, xe);
            }, fe.tickFormat = function(xe, Te) {
              return d3_scale_linearTickFormat(j, xe, Te);
            }, fe.nice = function(xe) {
              return fe.domain(Bo(j, xe));
            }, fe.exponent = function(xe) {
              return arguments.length ? (G = Qs(R = xe), ie = Qs(1 / R), b.domain(j.map(G)), fe) : R;
            }, fe.copy = function() {
              return Uo(b.copy(), R, j);
            }, Sa(fe, b);
          }
          function Qs(b) {
            return function(R) {
              return R < 0 ? -Math.pow(-R, b) : Math.pow(R, b);
            };
          }
          function os(b, R) {
            var j, G, ie;
            function fe(Te) {
              return G[((j.get(Te) || (R.t === "range" ? j.set(Te, b.push(Te)) : NaN)) - 1) % G.length];
            }
            function xe(Te, ze) {
              return i.range(b.length).map(function(Ve) {
                return Te + ze * Ve;
              });
            }
            return fe.domain = function(Te) {
              if (!arguments.length) return b;
              b = [], j = new I();
              for (var ze, Ve = -1, ut = Te.length; ++Ve < ut; ) j.has(ze = Te[Ve]) || j.set(ze, b.push(ze));
              return fe[R.t].apply(fe, R.a);
            }, fe.range = function(Te) {
              return arguments.length ? (G = Te, ie = 0, R = { t: "range", a: arguments }, fe) : G;
            }, fe.rangePoints = function(Te, ze) {
              arguments.length < 2 && (ze = 0);
              var Ve = Te[0], ut = Te[1], gt = b.length < 2 ? (Ve = (Ve + ut) / 2, 0) : (ut - Ve) / (b.length - 1 + ze);
              return G = xe(Ve + gt * ze / 2, gt), ie = 0, R = { t: "rangePoints", a: arguments }, fe;
            }, fe.rangeRoundPoints = function(Te, ze) {
              arguments.length < 2 && (ze = 0);
              var Ve = Te[0], ut = Te[1], gt = b.length < 2 ? (Ve = ut = Math.round((Ve + ut) / 2), 0) : (ut - Ve) / (b.length - 1 + ze) | 0;
              return G = xe(Ve + Math.round(gt * ze / 2 + (ut - Ve - (b.length - 1 + ze) * gt) / 2), gt), ie = 0, R = { t: "rangeRoundPoints", a: arguments }, fe;
            }, fe.rangeBands = function(Te, ze, Ve) {
              arguments.length < 2 && (ze = 0), arguments.length < 3 && (Ve = ze);
              var ut = Te[1] < Te[0], gt = Te[ut - 0], wt = (Te[1 - ut] - gt) / (b.length - ze + 2 * Ve);
              return G = xe(gt + wt * Ve, wt), ut && G.reverse(), ie = wt * (1 - ze), R = { t: "rangeBands", a: arguments }, fe;
            }, fe.rangeRoundBands = function(Te, ze, Ve) {
              arguments.length < 2 && (ze = 0), arguments.length < 3 && (Ve = ze);
              var ut = Te[1] < Te[0], gt = Te[ut - 0], wt = Te[1 - ut], Et = Math.floor((wt - gt) / (b.length - ze + 2 * Ve));
              return G = xe(gt + Math.round((wt - gt - (b.length - ze) * Et) / 2), Et), ut && G.reverse(), ie = Math.round(Et * (1 - ze)), R = { t: "rangeRoundBands", a: arguments }, fe;
            }, fe.rangeBand = function() {
              return ie;
            }, fe.rangeExtent = function() {
              return xu(R.a[0]);
            }, fe.copy = function() {
              return os(b, R);
            }, fe.domain(b);
          }
          i.scale.pow = function() {
            return Uo(i.scale.linear(), 1, [0, 1]);
          }, i.scale.sqrt = function() {
            return i.scale.pow().exponent(0.5);
          }, i.scale.ordinal = function() {
            return os([], { t: "range", a: [[]] });
          }, i.scale.category10 = function() {
            return i.scale.ordinal().range(Bu);
          }, i.scale.category20 = function() {
            return i.scale.ordinal().range(Ll);
          }, i.scale.category20b = function() {
            return i.scale.ordinal().range(Pl);
          }, i.scale.category20c = function() {
            return i.scale.ordinal().range(Lo);
          };
          var Bu = [2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175].map(wn), Ll = [2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725].map(wn), Pl = [3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654].map(wn), Lo = [3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081].map(wn);
          function Ca(b, R) {
            var j;
            function G() {
              var fe = 0, xe = R.length;
              for (j = []; ++fe < xe; ) j[fe - 1] = i.quantile(b, fe / xe);
              return ie;
            }
            function ie(fe) {
              if (!isNaN(fe = +fe)) return R[i.bisect(j, fe)];
            }
            return ie.domain = function(fe) {
              return arguments.length ? (b = fe.map(S).filter(A).sort(k), G()) : b;
            }, ie.range = function(fe) {
              return arguments.length ? (R = fe, G()) : R;
            }, ie.quantiles = function() {
              return j;
            }, ie.invertExtent = function(fe) {
              return (fe = R.indexOf(fe)) < 0 ? [NaN, NaN] : [fe > 0 ? j[fe - 1] : b[0], fe < j.length ? j[fe] : b[b.length - 1]];
            }, ie.copy = function() {
              return Ca(b, R);
            }, G();
          }
          function Ol(b, R, j) {
            var G, ie;
            function fe(Te) {
              return j[Math.max(0, Math.min(ie, Math.floor(G * (Te - b))))];
            }
            function xe() {
              return G = j.length / (R - b), ie = j.length - 1, fe;
            }
            return fe.domain = function(Te) {
              return arguments.length ? (b = +Te[0], R = +Te[Te.length - 1], xe()) : [b, R];
            }, fe.range = function(Te) {
              return arguments.length ? (j = Te, xe()) : j;
            }, fe.invertExtent = function(Te) {
              return [Te = (Te = j.indexOf(Te)) < 0 ? NaN : Te / G + b, Te + 1 / G];
            }, fe.copy = function() {
              return Ol(b, R, j);
            }, xe();
          }
          function xi(b, R) {
            function j(G) {
              if (G <= G) return R[i.bisect(b, G)];
            }
            return j.domain = function(G) {
              return arguments.length ? (b = G, j) : b;
            }, j.range = function(G) {
              return arguments.length ? (R = G, j) : R;
            }, j.invertExtent = function(G) {
              return G = R.indexOf(G), [b[G - 1], b[G]];
            }, j.copy = function() {
              return xi(b, R);
            }, j;
          }
          function cc(b) {
            function R(j) {
              return +j;
            }
            return R.invert = R, R.domain = R.range = function(j) {
              return arguments.length ? (b = j.map(R), R) : b;
            }, R.ticks = function(j) {
              return Do(b, j);
            }, R.tickFormat = function(j, G) {
              return d3_scale_linearTickFormat(b, j, G);
            }, R.copy = function() {
              return cc(b);
            }, R;
          }
          function Dc() {
            return 0;
          }
          i.scale.quantile = function() {
            return Ca([], []);
          }, i.scale.quantize = function() {
            return Ol(0, 1, [0, 1]);
          }, i.scale.threshold = function() {
            return xi([0.5], [0, 1]);
          }, i.scale.identity = function() {
            return cc([0, 1]);
          }, i.svg = {}, i.svg.arc = function() {
            var b = zl, R = Rl, j = Dc, G = xl, ie = ju, fe = ti, xe = js;
            function Te() {
              var Ve = Math.max(0, +b.apply(this, arguments)), ut = Math.max(0, +R.apply(this, arguments)), gt = ie.apply(this, arguments) - ot, wt = fe.apply(this, arguments) - ot, Et = Math.abs(wt - gt), zt = gt > wt ? 0 : 1;
              if (ut < Ve && (It = ut, ut = Ve, Ve = It), Et >= nt) return ze(ut, zt) + (Ve ? ze(Ve, 1 - zt) : "") + "Z";
              var It, jt, Lt, Zt, Qt, Xt, yn, Sn, Un, Vn, Yn, er, kr = 0, or = 0, Mr = [];
              if ((Zt = (+xe.apply(this, arguments) || 0) / 2) && (Lt = G === xl ? Math.sqrt(Ve * Ve + ut * ut) : +G.apply(this, arguments), zt || (or *= -1), ut && (or = pt(Lt / ut * Math.sin(Zt))), Ve && (kr = pt(Lt / Ve * Math.sin(Zt)))), ut) {
                Qt = ut * Math.cos(gt + or), Xt = ut * Math.sin(gt + or), yn = ut * Math.cos(wt - or), Sn = ut * Math.sin(wt - or);
                var fr = Math.abs(wt - gt - 2 * or) <= St ? 0 : 1;
                if (or && Fl(Qt, Xt, yn, Sn) === zt ^ fr) {
                  var Or = (gt + wt) / 2;
                  Qt = ut * Math.cos(Or), Xt = ut * Math.sin(Or), yn = Sn = null;
                }
              } else Qt = Xt = 0;
              if (Ve) {
                Un = Ve * Math.cos(wt - kr), Vn = Ve * Math.sin(wt - kr), Yn = Ve * Math.cos(gt + kr), er = Ve * Math.sin(gt + kr);
                var br = Math.abs(gt - wt + 2 * kr) <= St ? 0 : 1;
                if (kr && Fl(Un, Vn, Yn, er) === 1 - zt ^ br) {
                  var Nr = (gt + wt) / 2;
                  Un = Ve * Math.cos(Nr), Vn = Ve * Math.sin(Nr), Yn = er = null;
                }
              } else Un = Vn = 0;
              if (Et > at && (It = Math.min(Math.abs(ut - Ve) / 2, +j.apply(this, arguments))) > 1e-3) {
                jt = Ve < ut ^ zt ? 0 : 1;
                var ii = It, Rr = It;
                if (Et < St) {
                  var ei = Yn == null ? [Un, Vn] : yn == null ? [Qt, Xt] : on([Qt, Xt], [Yn, er], [yn, Sn], [Un, Vn]), pi = Qt - ei[0], qi = Xt - ei[1], Li = yn - ei[0], Yi = Sn - ei[1], Gi = 1 / Math.sin(Math.acos((pi * Li + qi * Yi) / (Math.sqrt(pi * pi + qi * qi) * Math.sqrt(Li * Li + Yi * Yi))) / 2), ra = Math.sqrt(ei[0] * ei[0] + ei[1] * ei[1]);
                  Rr = Math.min(It, (Ve - ra) / (Gi - 1)), ii = Math.min(It, (ut - ra) / (Gi + 1));
                }
                if (yn != null) {
                  var wa = Fa(Yn == null ? [Un, Vn] : [Yn, er], [Qt, Xt], ut, ii, zt), uo = Fa([yn, Sn], [Un, Vn], ut, ii, zt);
                  It === ii ? Mr.push("M", wa[0], "A", ii, ",", ii, " 0 0,", jt, " ", wa[1], "A", ut, ",", ut, " 0 ", 1 - zt ^ Fl(wa[1][0], wa[1][1], uo[1][0], uo[1][1]), ",", zt, " ", uo[1], "A", ii, ",", ii, " 0 0,", jt, " ", uo[0]) : Mr.push("M", wa[0], "A", ii, ",", ii, " 0 1,", jt, " ", uo[0]);
                } else Mr.push("M", Qt, ",", Xt);
                if (Yn != null) {
                  var no = Fa([Qt, Xt], [Yn, er], Ve, -Rr, zt), Ko = Fa([Un, Vn], yn == null ? [Qt, Xt] : [yn, Sn], Ve, -Rr, zt);
                  It === Rr ? Mr.push("L", Ko[0], "A", Rr, ",", Rr, " 0 0,", jt, " ", Ko[1], "A", Ve, ",", Ve, " 0 ", zt ^ Fl(Ko[1][0], Ko[1][1], no[1][0], no[1][1]), ",", 1 - zt, " ", no[1], "A", Rr, ",", Rr, " 0 0,", jt, " ", no[0]) : Mr.push("L", Ko[0], "A", Rr, ",", Rr, " 0 0,", jt, " ", no[0]);
                } else Mr.push("L", Un, ",", Vn);
              } else Mr.push("M", Qt, ",", Xt), yn != null && Mr.push("A", ut, ",", ut, " 0 ", fr, ",", zt, " ", yn, ",", Sn), Mr.push("L", Un, ",", Vn), Yn != null && Mr.push("A", Ve, ",", Ve, " 0 ", br, ",", 1 - zt, " ", Yn, ",", er);
              return Mr.push("Z"), Mr.join("");
            }
            function ze(Ve, ut) {
              return "M0," + Ve + "A" + Ve + "," + Ve + " 0 1," + ut + " 0," + -Ve + "A" + Ve + "," + Ve + " 0 1," + ut + " 0," + Ve;
            }
            return Te.innerRadius = function(Ve) {
              return arguments.length ? (b = cr(Ve), Te) : b;
            }, Te.outerRadius = function(Ve) {
              return arguments.length ? (R = cr(Ve), Te) : R;
            }, Te.cornerRadius = function(Ve) {
              return arguments.length ? (j = cr(Ve), Te) : j;
            }, Te.padRadius = function(Ve) {
              return arguments.length ? (G = Ve == xl ? xl : cr(Ve), Te) : G;
            }, Te.startAngle = function(Ve) {
              return arguments.length ? (ie = cr(Ve), Te) : ie;
            }, Te.endAngle = function(Ve) {
              return arguments.length ? (fe = cr(Ve), Te) : fe;
            }, Te.padAngle = function(Ve) {
              return arguments.length ? (xe = cr(Ve), Te) : xe;
            }, Te.centroid = function() {
              var Ve = (+b.apply(this, arguments) + +R.apply(this, arguments)) / 2, ut = (+ie.apply(this, arguments) + +fe.apply(this, arguments)) / 2 - ot;
              return [Math.cos(ut) * Ve, Math.sin(ut) * Ve];
            }, Te;
          };
          var xl = "auto";
          function zl(b) {
            return b.innerRadius;
          }
          function Rl(b) {
            return b.outerRadius;
          }
          function ju(b) {
            return b.startAngle;
          }
          function ti(b) {
            return b.endAngle;
          }
          function js(b) {
            return b && b.padAngle;
          }
          function Fl(b, R, j, G) {
            return (b - j) * R - (R - G) * b > 0 ? 0 : 1;
          }
          function Fa(b, R, j, G, ie) {
            var fe = b[0] - R[0], xe = b[1] - R[1], Te = (ie ? G : -G) / Math.sqrt(fe * fe + xe * xe), ze = Te * xe, Ve = -Te * fe, ut = b[0] + ze, gt = b[1] + Ve, wt = R[0] + ze, Et = R[1] + Ve, zt = (ut + wt) / 2, It = (gt + Et) / 2, jt = wt - ut, Lt = Et - gt, Zt = jt * jt + Lt * Lt, Qt = j - G, Xt = ut * Et - wt * gt, yn = (Lt < 0 ? -1 : 1) * Math.sqrt(Math.max(0, Qt * Qt * Zt - Xt * Xt)), Sn = (Xt * Lt - jt * yn) / Zt, Un = (-Xt * jt - Lt * yn) / Zt, Vn = (Xt * Lt + jt * yn) / Zt, Yn = (-Xt * jt + Lt * yn) / Zt, er = Sn - zt, kr = Un - It, or = Vn - zt, Mr = Yn - It;
            return er * er + kr * kr > or * or + Mr * Mr && (Sn = Vn, Un = Yn), [[Sn - ze, Un - Ve], [Sn * j / Qt, Un * j / Qt]];
          }
          function Us() {
            return !0;
          }
          function ss(b) {
            var R = Tr, j = wr, G = Us, ie = ks, fe = ie.key, xe = 0.7;
            function Te(ze) {
              var Ve, ut = [], gt = [], wt = -1, Et = ze.length, zt = cr(R), It = cr(j);
              function jt() {
                ut.push("M", ie(b(gt), xe));
              }
              for (; ++wt < Et; ) G.call(this, Ve = ze[wt], wt) ? gt.push([+zt.call(this, Ve, wt), +It.call(this, Ve, wt)]) : gt.length && (jt(), gt = []);
              return gt.length && jt(), ut.length ? ut.join("") : null;
            }
            return Te.x = function(ze) {
              return arguments.length ? (R = ze, Te) : R;
            }, Te.y = function(ze) {
              return arguments.length ? (j = ze, Te) : j;
            }, Te.defined = function(ze) {
              return arguments.length ? (G = ze, Te) : G;
            }, Te.interpolate = function(ze) {
              return arguments.length ? (fe = typeof ze == "function" ? ie = ze : (ie = el.get(ze) || ks).key, Te) : fe;
            }, Te.tension = function(ze) {
              return arguments.length ? (xe = ze, Te) : xe;
            }, Te;
          }
          i.svg.line = function() {
            return ss(re);
          };
          var el = i.map({ linear: ks, "linear-closed": iu, step: function(b) {
            for (var R = 0, j = b.length, G = b[0], ie = [G[0], ",", G[1]]; ++R < j; ) ie.push("H", (G[0] + (G = b[R])[0]) / 2, "V", G[1]);
            return j > 1 && ie.push("H", G[0]), ie.join("");
          }, "step-before": tl, "step-after": Os, basis: xa, "basis-open": function(b) {
            if (b.length < 4) return ks(b);
            for (var R, j = [], G = -1, ie = b.length, fe = [0], xe = [0]; ++G < 3; ) R = b[G], fe.push(R[0]), xe.push(R[1]);
            for (j.push(vo(Vo, fe) + "," + vo(Vo, xe)), --G; ++G < ie; ) R = b[G], fe.shift(), fe.push(R[0]), xe.shift(), xe.push(R[1]), Qu(j, fe, xe);
            return j.join("");
          }, "basis-closed": function(b) {
            for (var R, j, G = -1, ie = b.length, fe = ie + 4, xe = [], Te = []; ++G < 4; ) j = b[G % ie], xe.push(j[0]), Te.push(j[1]);
            for (R = [vo(Vo, xe), ",", vo(Vo, Te)], --G; ++G < fe; ) j = b[G % ie], xe.shift(), xe.push(j[0]), Te.shift(), Te.push(j[1]), Qu(R, xe, Te);
            return R.join("");
          }, bundle: function(b, R) {
            var j = b.length - 1;
            if (j) for (var G, ie, fe = b[0][0], xe = b[0][1], Te = b[j][0] - fe, ze = b[j][1] - xe, Ve = -1; ++Ve <= j; ) ie = Ve / j, (G = b[Ve])[0] = R * G[0] + (1 - R) * (fe + ie * Te), G[1] = R * G[1] + (1 - R) * (xe + ie * ze);
            return xa(b);
          }, cardinal: function(b, R) {
            return b.length < 3 ? ks(b) : b[0] + Vs(b, di(b, R));
          }, "cardinal-open": function(b, R) {
            return b.length < 4 ? ks(b) : b[1] + Vs(b.slice(1, -1), di(b, R));
          }, "cardinal-closed": function(b, R) {
            return b.length < 3 ? iu(b) : b[0] + Vs((b.push(b[0]), b), di([b[b.length - 2]].concat(b, [b[1]]), R));
          }, monotone: function(b) {
            return b.length < 3 ? ks(b) : b[0] + Vs(b, function(R) {
              for (var j, G, ie, fe, xe = [], Te = function(ut) {
                for (var gt = 0, wt = ut.length - 1, Et = [], zt = ut[0], It = ut[1], jt = Et[0] = li(zt, It); ++gt < wt; ) Et[gt] = (jt + (jt = li(zt = It, It = ut[gt + 1]))) / 2;
                return Et[gt] = jt, Et;
              }(R), ze = -1, Ve = R.length - 1; ++ze < Ve; ) j = li(R[ze], R[ze + 1]), E(j) < at ? Te[ze] = Te[ze + 1] = 0 : (fe = (G = Te[ze] / j) * G + (ie = Te[ze + 1] / j) * ie) > 9 && (fe = 3 * j / Math.sqrt(fe), Te[ze] = fe * G, Te[ze + 1] = fe * ie);
              for (ze = -1; ++ze <= Ve; ) fe = (R[Math.min(Ve, ze + 1)][0] - R[Math.max(0, ze - 1)][0]) / (6 * (1 + Te[ze] * Te[ze])), xe.push([fe || 0, Te[ze] * fe || 0]);
              return xe;
            }(b));
          } });
          function ks(b) {
            return b.length > 1 ? b.join("L") : b + "Z";
          }
          function iu(b) {
            return b.join("L") + "Z";
          }
          function tl(b) {
            for (var R = 0, j = b.length, G = b[0], ie = [G[0], ",", G[1]]; ++R < j; ) ie.push("V", (G = b[R])[1], "H", G[0]);
            return ie.join("");
          }
          function Os(b) {
            for (var R = 0, j = b.length, G = b[0], ie = [G[0], ",", G[1]]; ++R < j; ) ie.push("H", (G = b[R])[0], "V", G[1]);
            return ie.join("");
          }
          function Vs(b, R) {
            if (R.length < 1 || b.length != R.length && b.length != R.length + 2) return ks(b);
            var j = b.length != R.length, G = "", ie = b[0], fe = b[1], xe = R[0], Te = xe, ze = 1;
            if (j && (G += "Q" + (fe[0] - 2 * xe[0] / 3) + "," + (fe[1] - 2 * xe[1] / 3) + "," + fe[0] + "," + fe[1], ie = b[1], ze = 2), R.length > 1) {
              Te = R[1], fe = b[ze], ze++, G += "C" + (ie[0] + xe[0]) + "," + (ie[1] + xe[1]) + "," + (fe[0] - Te[0]) + "," + (fe[1] - Te[1]) + "," + fe[0] + "," + fe[1];
              for (var Ve = 2; Ve < R.length; Ve++, ze++) fe = b[ze], Te = R[Ve], G += "S" + (fe[0] - Te[0]) + "," + (fe[1] - Te[1]) + "," + fe[0] + "," + fe[1];
            }
            if (j) {
              var ut = b[ze];
              G += "Q" + (fe[0] + 2 * Te[0] / 3) + "," + (fe[1] + 2 * Te[1] / 3) + "," + ut[0] + "," + ut[1];
            }
            return G;
          }
          function di(b, R) {
            for (var j, G = [], ie = (1 - R) / 2, fe = b[0], xe = b[1], Te = 1, ze = b.length; ++Te < ze; ) j = fe, fe = xe, xe = b[Te], G.push([ie * (xe[0] - j[0]), ie * (xe[1] - j[1])]);
            return G;
          }
          function xa(b) {
            if (b.length < 3) return ks(b);
            var R = 1, j = b.length, G = b[0], ie = G[0], fe = G[1], xe = [ie, ie, ie, (G = b[1])[0]], Te = [fe, fe, fe, G[1]], ze = [ie, ",", fe, "L", vo(Vo, xe), ",", vo(Vo, Te)];
            for (b.push(b[j - 1]); ++R <= j; ) G = b[R], xe.shift(), xe.push(G[0]), Te.shift(), Te.push(G[1]), Qu(ze, xe, Te);
            return b.pop(), ze.push("L", G), ze.join("");
          }
          function vo(b, R) {
            return b[0] * R[0] + b[1] * R[1] + b[2] * R[2] + b[3] * R[3];
          }
          el.forEach(function(b, R) {
            R.key = b, R.closed = /-closed$/.test(b);
          });
          var Ts = [0, 2 / 3, 1 / 3, 0], nl = [0, 1 / 3, 2 / 3, 0], Vo = [0, 1 / 6, 2 / 3, 1 / 6];
          function Qu(b, R, j) {
            b.push("C", vo(Ts, R), ",", vo(Ts, j), ",", vo(nl, R), ",", vo(nl, j), ",", vo(Vo, R), ",", vo(Vo, j));
          }
          function li(b, R) {
            return (R[1] - b[1]) / (R[0] - b[0]);
          }
          function ls(b) {
            for (var R, j, G, ie = -1, fe = b.length; ++ie < fe; ) j = (R = b[ie])[0], G = R[1] - ot, R[0] = j * Math.cos(G), R[1] = j * Math.sin(G);
            return b;
          }
          function ma(b) {
            var R = Tr, j = Tr, G = 0, ie = wr, fe = Us, xe = ks, Te = xe.key, ze = xe, Ve = "L", ut = 0.7;
            function gt(wt) {
              var Et, zt, It, jt = [], Lt = [], Zt = [], Qt = -1, Xt = wt.length, yn = cr(R), Sn = cr(G), Un = R === j ? function() {
                return zt;
              } : cr(j), Vn = G === ie ? function() {
                return It;
              } : cr(ie);
              function Yn() {
                jt.push("M", xe(b(Zt), ut), Ve, ze(b(Lt.reverse()), ut), "Z");
              }
              for (; ++Qt < Xt; ) fe.call(this, Et = wt[Qt], Qt) ? (Lt.push([zt = +yn.call(this, Et, Qt), It = +Sn.call(this, Et, Qt)]), Zt.push([+Un.call(this, Et, Qt), +Vn.call(this, Et, Qt)])) : Lt.length && (Yn(), Lt = [], Zt = []);
              return Lt.length && Yn(), jt.length ? jt.join("") : null;
            }
            return gt.x = function(wt) {
              return arguments.length ? (R = j = wt, gt) : j;
            }, gt.x0 = function(wt) {
              return arguments.length ? (R = wt, gt) : R;
            }, gt.x1 = function(wt) {
              return arguments.length ? (j = wt, gt) : j;
            }, gt.y = function(wt) {
              return arguments.length ? (G = ie = wt, gt) : ie;
            }, gt.y0 = function(wt) {
              return arguments.length ? (G = wt, gt) : G;
            }, gt.y1 = function(wt) {
              return arguments.length ? (ie = wt, gt) : ie;
            }, gt.defined = function(wt) {
              return arguments.length ? (fe = wt, gt) : fe;
            }, gt.interpolate = function(wt) {
              return arguments.length ? (Te = typeof wt == "function" ? xe = wt : (xe = el.get(wt) || ks).key, ze = xe.reverse || xe, Ve = xe.closed ? "M" : "L", gt) : Te;
            }, gt.tension = function(wt) {
              return arguments.length ? (ut = wt, gt) : ut;
            }, gt;
          }
          function au(b) {
            return b.source;
          }
          function $s(b) {
            return b.target;
          }
          function bl(b) {
            return b.radius;
          }
          function Lc(b) {
            return [b.x, b.y];
          }
          function ec() {
            return 64;
          }
          function rl() {
            return "circle";
          }
          function Na(b) {
            var R = Math.sqrt(b / St);
            return "M0," + R + "A" + R + "," + R + " 0 1,1 0," + -R + "A" + R + "," + R + " 0 1,1 0," + R + "Z";
          }
          i.svg.line.radial = function() {
            var b = ss(ls);
            return b.radius = b.x, delete b.x, b.angle = b.y, delete b.y, b;
          }, tl.reverse = Os, Os.reverse = tl, i.svg.area = function() {
            return ma(re);
          }, i.svg.area.radial = function() {
            var b = ma(ls);
            return b.radius = b.x, delete b.x, b.innerRadius = b.x0, delete b.x0, b.outerRadius = b.x1, delete b.x1, b.angle = b.y, delete b.y, b.startAngle = b.y0, delete b.y0, b.endAngle = b.y1, delete b.y1, b;
          }, i.svg.chord = function() {
            var b = au, R = $s, j = bl, G = ju, ie = ti;
            function fe(Ve, ut) {
              var gt, wt, Et = xe(this, b, Ve, ut), zt = xe(this, R, Ve, ut);
              return "M" + Et.p0 + Te(Et.r, Et.p1, Et.a1 - Et.a0) + (wt = zt, ((gt = Et).a0 == wt.a0 && gt.a1 == wt.a1 ? ze(Et.r, Et.p1, Et.r, Et.p0) : ze(Et.r, Et.p1, zt.r, zt.p0) + Te(zt.r, zt.p1, zt.a1 - zt.a0) + ze(zt.r, zt.p1, Et.r, Et.p0)) + "Z");
            }
            function xe(Ve, ut, gt, wt) {
              var Et = ut.call(Ve, gt, wt), zt = j.call(Ve, Et, wt), It = G.call(Ve, Et, wt) - ot, jt = ie.call(Ve, Et, wt) - ot;
              return { r: zt, a0: It, a1: jt, p0: [zt * Math.cos(It), zt * Math.sin(It)], p1: [zt * Math.cos(jt), zt * Math.sin(jt)] };
            }
            function Te(Ve, ut, gt) {
              return "A" + Ve + "," + Ve + " 0 " + +(gt > St) + ",1 " + ut;
            }
            function ze(Ve, ut, gt, wt) {
              return "Q 0,0 " + wt;
            }
            return fe.radius = function(Ve) {
              return arguments.length ? (j = cr(Ve), fe) : j;
            }, fe.source = function(Ve) {
              return arguments.length ? (b = cr(Ve), fe) : b;
            }, fe.target = function(Ve) {
              return arguments.length ? (R = cr(Ve), fe) : R;
            }, fe.startAngle = function(Ve) {
              return arguments.length ? (G = cr(Ve), fe) : G;
            }, fe.endAngle = function(Ve) {
              return arguments.length ? (ie = cr(Ve), fe) : ie;
            }, fe;
          }, i.svg.diagonal = function() {
            var b = au, R = $s, j = Lc;
            function G(ie, fe) {
              var xe = b.call(this, ie, fe), Te = R.call(this, ie, fe), ze = (xe.y + Te.y) / 2, Ve = [xe, { x: xe.x, y: ze }, { x: Te.x, y: ze }, Te];
              return "M" + (Ve = Ve.map(j))[0] + "C" + Ve[1] + " " + Ve[2] + " " + Ve[3];
            }
            return G.source = function(ie) {
              return arguments.length ? (b = cr(ie), G) : b;
            }, G.target = function(ie) {
              return arguments.length ? (R = cr(ie), G) : R;
            }, G.projection = function(ie) {
              return arguments.length ? (j = ie, G) : j;
            }, G;
          }, i.svg.diagonal.radial = function() {
            var b = i.svg.diagonal(), R = Lc, j = b.projection;
            return b.projection = function(G) {
              return arguments.length ? j(/* @__PURE__ */ function(ie) {
                return function() {
                  var fe = ie.apply(this, arguments), xe = fe[0], Te = fe[1] - ot;
                  return [xe * Math.cos(Te), xe * Math.sin(Te)];
                };
              }(R = G)) : R;
            }, b;
          }, i.svg.symbol = function() {
            var b = rl, R = ec;
            function j(G, ie) {
              return (il.get(b.call(this, G, ie)) || Na)(R.call(this, G, ie));
            }
            return j.type = function(G) {
              return arguments.length ? (b = cr(G), j) : b;
            }, j.size = function(G) {
              return arguments.length ? (R = cr(G), j) : R;
            }, j;
          };
          var il = i.map({ circle: Na, cross: function(b) {
            var R = Math.sqrt(b / 5) / 2;
            return "M" + -3 * R + "," + -R + "H" + -R + "V" + -3 * R + "H" + R + "V" + -R + "H" + 3 * R + "V" + R + "H" + R + "V" + 3 * R + "H" + -R + "V" + R + "H" + -3 * R + "Z";
          }, diamond: function(b) {
            var R = Math.sqrt(b / (2 * Ci)), j = R * Ci;
            return "M0," + -R + "L" + j + ",0 0," + R + " " + -j + ",0Z";
          }, square: function(b) {
            var R = Math.sqrt(b) / 2;
            return "M" + -R + "," + -R + "L" + R + "," + -R + " " + R + "," + R + " " + -R + "," + R + "Z";
          }, "triangle-down": function(b) {
            var R = Math.sqrt(b / ni), j = R * ni / 2;
            return "M0," + j + "L" + R + "," + -j + " " + -R + "," + -j + "Z";
          }, "triangle-up": function(b) {
            var R = Math.sqrt(b / ni), j = R * ni / 2;
            return "M0," + -j + "L" + R + "," + j + " " + -R + "," + j + "Z";
          } });
          i.svg.symbolTypes = il.keys();
          var ni = Math.sqrt(3), Ci = Math.tan(30 * Ye);
          be.transition = function(b) {
            for (var R, j, G = Za || ++tc, ie = He(b), fe = [], xe = su || { time: Date.now(), ease: ml, delay: 0, duration: 250 }, Te = -1, ze = this.length; ++Te < ze; ) {
              fe.push(R = []);
              for (var Ve = this[Te], ut = -1, gt = Ve.length; ++ut < gt; ) (j = Ve[ut]) && Pe(j, ut, ie, G, xe), R.push(j);
            }
            return ou(fe, ie, G);
          }, be.interrupt = function(b) {
            return this.each(b == null ? us : al(He(b)));
          };
          var us = al(He());
          function al(b) {
            return function() {
              var R, j, G;
              (R = this[b]) && (G = R[j = R.active]) && (G.timer.c = null, G.timer.t = NaN, --R.count ? delete R[j] : delete this[b], R.active += 0.5, G.event && G.event.interrupt.call(this, this.__data__, G.index));
            };
          }
          function ou(b, R, j) {
            return ae(b, na), b.namespace = R, b.id = j, b;
          }
          var Za, su, na = [], tc = 0;
          function bi(b, R, j, G) {
            var ie = b.id, fe = b.namespace;
            return _e(b, typeof j == "function" ? function(xe, Te, ze) {
              xe[fe][ie].tween.set(R, G(j.call(xe, xe.__data__, Te, ze)));
            } : (j = G(j), function(xe) {
              xe[fe][ie].tween.set(R, j);
            }));
          }
          function ci(b) {
            return b == null && (b = ""), function() {
              this.textContent = b;
            };
          }
          function He(b) {
            return b == null ? "__transition__" : "__transition_" + b + "__";
          }
          function Pe(b, R, j, G, ie) {
            var fe, xe, Te, ze, Ve, ut = b[j] || (b[j] = { active: 0, count: 0 }), gt = ut[G];
            function wt(zt) {
              var It = ut.active, jt = ut[It];
              for (var Lt in jt && (jt.timer.c = null, jt.timer.t = NaN, --ut.count, delete ut[It], jt.event && jt.event.interrupt.call(b, b.__data__, jt.index)), ut) if (+Lt < G) {
                var Zt = ut[Lt];
                Zt.timer.c = null, Zt.timer.t = NaN, --ut.count, delete ut[Lt];
              }
              xe.c = Et, Tn(function() {
                return xe.c && Et(zt || 1) && (xe.c = null, xe.t = NaN), 1;
              }, 0, fe), ut.active = G, gt.event && gt.event.start.call(b, b.__data__, R), Ve = [], gt.tween.forEach(function(Qt, Xt) {
                (Xt = Xt.call(b, b.__data__, R)) && Ve.push(Xt);
              }), ze = gt.ease, Te = gt.duration;
            }
            function Et(zt) {
              for (var It = zt / Te, jt = ze(It), Lt = Ve.length; Lt > 0; ) Ve[--Lt].call(b, jt);
              if (It >= 1) return gt.event && gt.event.end.call(b, b.__data__, R), --ut.count ? delete ut[G] : delete b[j], 1;
            }
            gt || (fe = ie.time, xe = Tn(function(zt) {
              var It = gt.delay;
              if (xe.t = It + fe, It <= zt) return wt(zt - It);
              xe.c = wt;
            }, 0, fe), gt = ut[G] = { tween: new I(), time: fe, timer: xe, delay: ie.delay, duration: ie.duration, ease: ie.ease, index: R }, ie = null, ++ut.count);
          }
          na.call = be.call, na.empty = be.empty, na.node = be.node, na.size = be.size, i.transition = function(b, R) {
            return b && b.transition ? Za ? b.transition(R) : b : i.selection().transition(b);
          }, i.transition.prototype = na, na.select = function(b) {
            var R, j, G, ie = this.id, fe = this.namespace, xe = [];
            b = Ae(b);
            for (var Te = -1, ze = this.length; ++Te < ze; ) {
              xe.push(R = []);
              for (var Ve = this[Te], ut = -1, gt = Ve.length; ++ut < gt; ) (G = Ve[ut]) && (j = b.call(G, G.__data__, ut, Te)) ? ("__data__" in G && (j.__data__ = G.__data__), Pe(j, ut, fe, ie, G[fe][ie]), R.push(j)) : R.push(null);
            }
            return ou(xe, fe, ie);
          }, na.selectAll = function(b) {
            var R, j, G, ie, fe, xe = this.id, Te = this.namespace, ze = [];
            b = Se(b);
            for (var Ve = -1, ut = this.length; ++Ve < ut; ) for (var gt = this[Ve], wt = -1, Et = gt.length; ++wt < Et; ) if (G = gt[wt]) {
              fe = G[Te][xe], j = b.call(G, G.__data__, wt, Ve), ze.push(R = []);
              for (var zt = -1, It = j.length; ++zt < It; ) (ie = j[zt]) && Pe(ie, zt, Te, xe, fe), R.push(ie);
            }
            return ou(ze, Te, xe);
          }, na.filter = function(b) {
            var R, j, G = [];
            typeof b != "function" && (b = Ke(b));
            for (var ie = 0, fe = this.length; ie < fe; ie++) {
              G.push(R = []);
              for (var xe, Te = 0, ze = (xe = this[ie]).length; Te < ze; Te++) (j = xe[Te]) && b.call(j, j.__data__, Te, ie) && R.push(j);
            }
            return ou(G, this.namespace, this.id);
          }, na.tween = function(b, R) {
            var j = this.id, G = this.namespace;
            return arguments.length < 2 ? this.node()[G][j].tween.get(b) : _e(this, R == null ? function(ie) {
              ie[G][j].tween.remove(b);
            } : function(ie) {
              ie[G][j].tween.set(b, R);
            });
          }, na.attr = function(b, R) {
            if (arguments.length < 2) {
              for (R in b) this.attr(R, b[R]);
              return this;
            }
            var j = b == "transform" ? Ec : vs, G = i.ns.qualify(b);
            function ie() {
              this.removeAttribute(G);
            }
            function fe() {
              this.removeAttributeNS(G.space, G.local);
            }
            return bi(this, "attr." + b, R, G.local ? function(xe) {
              return xe == null ? fe : (xe += "", function() {
                var Te, ze = this.getAttributeNS(G.space, G.local);
                return ze !== xe && (Te = j(ze, xe), function(Ve) {
                  this.setAttributeNS(G.space, G.local, Te(Ve));
                });
              });
            } : function(xe) {
              return xe == null ? ie : (xe += "", function() {
                var Te, ze = this.getAttribute(G);
                return ze !== xe && (Te = j(ze, xe), function(Ve) {
                  this.setAttribute(G, Te(Ve));
                });
              });
            });
          }, na.attrTween = function(b, R) {
            var j = i.ns.qualify(b);
            return this.tween("attr." + b, j.local ? function(G, ie) {
              var fe = R.call(this, G, ie, this.getAttributeNS(j.space, j.local));
              return fe && function(xe) {
                this.setAttributeNS(j.space, j.local, fe(xe));
              };
            } : function(G, ie) {
              var fe = R.call(this, G, ie, this.getAttribute(j));
              return fe && function(xe) {
                this.setAttribute(j, fe(xe));
              };
            });
          }, na.style = function(b, R, j) {
            var G = arguments.length;
            if (G < 3) {
              if (typeof b != "string") {
                for (j in G < 2 && (R = ""), b) this.style(j, b[j], R);
                return this;
              }
              j = "";
            }
            function ie() {
              this.style.removeProperty(b);
            }
            return bi(this, "style." + b, R, function(fe) {
              return fe == null ? ie : (fe += "", function() {
                var xe, Te = f(this).getComputedStyle(this, null).getPropertyValue(b);
                return Te !== fe && (xe = vs(Te, fe), function(ze) {
                  this.style.setProperty(b, xe(ze), j);
                });
              });
            });
          }, na.styleTween = function(b, R, j) {
            return arguments.length < 3 && (j = ""), this.tween("style." + b, function(G, ie) {
              var fe = R.call(this, G, ie, f(this).getComputedStyle(this, null).getPropertyValue(b));
              return fe && function(xe) {
                this.style.setProperty(b, fe(xe), j);
              };
            });
          }, na.text = function(b) {
            return bi(this, "text", b, ci);
          }, na.remove = function() {
            var b = this.namespace;
            return this.each("end.transition", function() {
              var R;
              this[b].count < 2 && (R = this.parentNode) && R.removeChild(this);
            });
          }, na.ease = function(b) {
            var R = this.id, j = this.namespace;
            return arguments.length < 1 ? this.node()[j][R].ease : (typeof b != "function" && (b = i.ease.apply(i, arguments)), _e(this, function(G) {
              G[j][R].ease = b;
            }));
          }, na.delay = function(b) {
            var R = this.id, j = this.namespace;
            return arguments.length < 1 ? this.node()[j][R].delay : _e(this, typeof b == "function" ? function(G, ie, fe) {
              G[j][R].delay = +b.call(G, G.__data__, ie, fe);
            } : (b = +b, function(G) {
              G[j][R].delay = b;
            }));
          }, na.duration = function(b) {
            var R = this.id, j = this.namespace;
            return arguments.length < 1 ? this.node()[j][R].duration : _e(this, typeof b == "function" ? function(G, ie, fe) {
              G[j][R].duration = Math.max(1, b.call(G, G.__data__, ie, fe));
            } : (b = Math.max(1, b), function(G) {
              G[j][R].duration = b;
            }));
          }, na.each = function(b, R) {
            var j = this.id, G = this.namespace;
            if (arguments.length < 2) {
              var ie = su, fe = Za;
              try {
                Za = j, _e(this, function(xe, Te, ze) {
                  su = xe[G][j], b.call(xe, xe.__data__, Te, ze);
                });
              } finally {
                su = ie, Za = fe;
              }
            } else _e(this, function(xe) {
              var Te = xe[G][j];
              (Te.event || (Te.event = i.dispatch("start", "end", "interrupt"))).on(b, R);
            });
            return this;
          }, na.transition = function() {
            for (var b, R, j, G = this.id, ie = ++tc, fe = this.namespace, xe = [], Te = 0, ze = this.length; Te < ze; Te++) {
              xe.push(b = []);
              for (var Ve, ut = 0, gt = (Ve = this[Te]).length; ut < gt; ut++) (R = Ve[ut]) && Pe(R, ut, fe, ie, { time: (j = R[fe][G]).time, ease: j.ease, delay: j.delay + j.duration, duration: j.duration }), b.push(R);
            }
            return ou(xe, fe, ie);
          }, i.svg.axis = function() {
            var b, R = i.scale.linear(), j = it, G = 6, ie = 6, fe = 3, xe = [10], Te = null;
            function ze(Ve) {
              Ve.each(function() {
                var ut, gt = i.select(this), wt = this.__chart__ || R, Et = this.__chart__ = R.copy(), zt = Te ?? (Et.ticks ? Et.ticks.apply(Et, xe) : Et.domain()), It = b ?? (Et.tickFormat ? Et.tickFormat.apply(Et, xe) : re), jt = gt.selectAll(".tick").data(zt, Et), Lt = jt.enter().insert("g", ".domain").attr("class", "tick").style("opacity", at), Zt = i.transition(jt.exit()).style("opacity", at).remove(), Qt = i.transition(jt.order()).style("opacity", 1), Xt = Math.max(G, 0) + fe, yn = Zo(Et), Sn = gt.selectAll(".domain").data([0]), Un = (Sn.enter().append("path").attr("class", "domain"), i.transition(Sn));
                Lt.append("line"), Lt.append("text");
                var Vn, Yn, er, kr, or = Lt.select("line"), Mr = Qt.select("line"), fr = jt.select("text").text(It), Or = Lt.select("text"), br = Qt.select("text"), Nr = j === "top" || j === "left" ? -1 : 1;
                if (j === "bottom" || j === "top" ? (ut = Ue, Vn = "x", er = "y", Yn = "x2", kr = "y2", fr.attr("dy", Nr < 0 ? "0em" : ".71em").style("text-anchor", "middle"), Un.attr("d", "M" + yn[0] + "," + Nr * ie + "V0H" + yn[1] + "V" + Nr * ie)) : (ut = Qe, Vn = "y", er = "x", Yn = "y2", kr = "x2", fr.attr("dy", ".32em").style("text-anchor", Nr < 0 ? "end" : "start"), Un.attr("d", "M" + Nr * ie + "," + yn[0] + "H0V" + yn[1] + "H" + Nr * ie)), or.attr(kr, Nr * G), Or.attr(er, Nr * Xt), Mr.attr(Yn, 0).attr(kr, Nr * G), br.attr(Vn, 0).attr(er, Nr * Xt), Et.rangeBand) {
                  var ii = Et, Rr = ii.rangeBand() / 2;
                  wt = Et = function(ei) {
                    return ii(ei) + Rr;
                  };
                } else wt.rangeBand ? wt = Et : Zt.call(ut, Et, wt);
                Lt.call(ut, wt, Et), Qt.call(ut, Et, Et);
              });
            }
            return ze.scale = function(Ve) {
              return arguments.length ? (R = Ve, ze) : R;
            }, ze.orient = function(Ve) {
              return arguments.length ? (j = Ve in bt ? Ve + "" : it, ze) : j;
            }, ze.ticks = function() {
              return arguments.length ? (xe = p(arguments), ze) : xe;
            }, ze.tickValues = function(Ve) {
              return arguments.length ? (Te = Ve, ze) : Te;
            }, ze.tickFormat = function(Ve) {
              return arguments.length ? (b = Ve, ze) : b;
            }, ze.tickSize = function(Ve) {
              var ut = arguments.length;
              return ut ? (G = +Ve, ie = +arguments[ut - 1], ze) : G;
            }, ze.innerTickSize = function(Ve) {
              return arguments.length ? (G = +Ve, ze) : G;
            }, ze.outerTickSize = function(Ve) {
              return arguments.length ? (ie = +Ve, ze) : ie;
            }, ze.tickPadding = function(Ve) {
              return arguments.length ? (fe = +Ve, ze) : fe;
            }, ze.tickSubdivide = function() {
              return arguments.length && ze;
            }, ze;
          };
          var it = "bottom", bt = { top: 1, right: 1, bottom: 1, left: 1 };
          function Ue(b, R, j) {
            b.attr("transform", function(G) {
              var ie = R(G);
              return "translate(" + (isFinite(ie) ? ie : j(G)) + ",0)";
            });
          }
          function Qe(b, R, j) {
            b.attr("transform", function(G) {
              var ie = R(G);
              return "translate(0," + (isFinite(ie) ? ie : j(G)) + ")";
            });
          }
          i.svg.brush = function() {
            var b, R, j = de(ut, "brushstart", "brush", "brushend"), G = null, ie = null, fe = [0, 0], xe = [0, 0], Te = !0, ze = !0, Ve = Z[0];
            function ut(It) {
              It.each(function() {
                var jt = i.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", zt).on("touchstart.brush", zt), Lt = jt.selectAll(".background").data([0]);
                Lt.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair"), jt.selectAll(".extent").data([0]).enter().append("rect").attr("class", "extent").style("cursor", "move");
                var Zt = jt.selectAll(".resize").data(Ve, re);
                Zt.exit().remove(), Zt.enter().append("g").attr("class", function(Sn) {
                  return "resize " + Sn;
                }).style("cursor", function(Sn) {
                  return ht[Sn];
                }).append("rect").attr("x", function(Sn) {
                  return /[ew]$/.test(Sn) ? -3 : null;
                }).attr("y", function(Sn) {
                  return /^[ns]/.test(Sn) ? -3 : null;
                }).attr("width", 6).attr("height", 6).style("visibility", "hidden"), Zt.style("display", ut.empty() ? "none" : null);
                var Qt, Xt = i.transition(jt), yn = i.transition(Lt);
                G && (Qt = Zo(G), yn.attr("x", Qt[0]).attr("width", Qt[1] - Qt[0]), wt(Xt)), ie && (Qt = Zo(ie), yn.attr("y", Qt[0]).attr("height", Qt[1] - Qt[0]), Et(Xt)), gt(Xt);
              });
            }
            function gt(It) {
              It.selectAll(".resize").attr("transform", function(jt) {
                return "translate(" + fe[+/e$/.test(jt)] + "," + xe[+/^s/.test(jt)] + ")";
              });
            }
            function wt(It) {
              It.select(".extent").attr("x", fe[0]), It.selectAll(".extent,.n>rect,.s>rect").attr("width", fe[1] - fe[0]);
            }
            function Et(It) {
              It.select(".extent").attr("y", xe[0]), It.selectAll(".extent,.e>rect,.w>rect").attr("height", xe[1] - xe[0]);
            }
            function zt() {
              var It, jt, Lt = this, Zt = i.select(i.event.target), Qt = j.of(Lt, arguments), Xt = i.select(Lt), yn = Zt.datum(), Sn = !/^(n|s)$/.test(yn) && G, Un = !/^(e|w)$/.test(yn) && ie, Vn = Zt.classed("extent"), Yn = $t(Lt), er = i.mouse(Lt), kr = i.select(f(Lt)).on("keydown.brush", function() {
                i.event.keyCode == 32 && (Vn || (It = null, er[0] -= fe[1], er[1] -= xe[1], Vn = 2), ce());
              }).on("keyup.brush", function() {
                i.event.keyCode == 32 && Vn == 2 && (er[0] += fe[1], er[1] += xe[1], Vn = 0, ce());
              });
              if (i.event.changedTouches ? kr.on("touchmove.brush", fr).on("touchend.brush", br) : kr.on("mousemove.brush", fr).on("mouseup.brush", br), Xt.interrupt().selectAll("*").interrupt(), Vn) er[0] = fe[0] - er[0], er[1] = xe[0] - er[1];
              else if (yn) {
                var or = +/w$/.test(yn), Mr = +/^n/.test(yn);
                jt = [fe[1 - or] - er[0], xe[1 - Mr] - er[1]], er[0] = fe[or], er[1] = xe[Mr];
              } else i.event.altKey && (It = er.slice());
              function fr() {
                var Nr = i.mouse(Lt), ii = !1;
                jt && (Nr[0] += jt[0], Nr[1] += jt[1]), Vn || (i.event.altKey ? (It || (It = [(fe[0] + fe[1]) / 2, (xe[0] + xe[1]) / 2]), er[0] = fe[+(Nr[0] < It[0])], er[1] = xe[+(Nr[1] < It[1])]) : It = null), Sn && Or(Nr, G, 0) && (wt(Xt), ii = !0), Un && Or(Nr, ie, 1) && (Et(Xt), ii = !0), ii && (gt(Xt), Qt({ type: "brush", mode: Vn ? "move" : "resize" }));
              }
              function Or(Nr, ii, Rr) {
                var ei, pi, qi = Zo(ii), Li = qi[0], Yi = qi[1], Gi = er[Rr], ra = Rr ? xe : fe, wa = ra[1] - ra[0];
                if (Vn && (Li -= Gi, Yi -= wa + Gi), ei = (Rr ? ze : Te) ? Math.max(Li, Math.min(Yi, Nr[Rr])) : Nr[Rr], Vn ? pi = (ei += Gi) + wa : (It && (Gi = Math.max(Li, Math.min(Yi, 2 * It[Rr] - ei))), Gi < ei ? (pi = ei, ei = Gi) : pi = Gi), ra[0] != ei || ra[1] != pi) return Rr ? R = null : b = null, ra[0] = ei, ra[1] = pi, !0;
              }
              function br() {
                fr(), Xt.style("pointer-events", "all").selectAll(".resize").style("display", ut.empty() ? "none" : null), i.select("body").style("cursor", null), kr.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null), Yn(), Qt({ type: "brushend" });
              }
              Xt.style("pointer-events", "none").selectAll(".resize").style("display", null), i.select("body").style("cursor", Zt.style("cursor")), Qt({ type: "brushstart" }), fr();
            }
            return ut.event = function(It) {
              It.each(function() {
                var jt = j.of(this, arguments), Lt = { x: fe, y: xe, i: b, j: R }, Zt = this.__chart__ || Lt;
                this.__chart__ = Lt, Za ? i.select(this).transition().each("start.brush", function() {
                  b = Zt.i, R = Zt.j, fe = Zt.x, xe = Zt.y, jt({ type: "brushstart" });
                }).tween("brush:brush", function() {
                  var Qt = Xl(fe, Lt.x), Xt = Xl(xe, Lt.y);
                  return b = R = null, function(yn) {
                    fe = Lt.x = Qt(yn), xe = Lt.y = Xt(yn), jt({ type: "brush", mode: "resize" });
                  };
                }).each("end.brush", function() {
                  b = Lt.i, R = Lt.j, jt({ type: "brush", mode: "resize" }), jt({ type: "brushend" });
                }) : (jt({ type: "brushstart" }), jt({ type: "brush", mode: "resize" }), jt({ type: "brushend" }));
              });
            }, ut.x = function(It) {
              return arguments.length ? (Ve = Z[!(G = It) << 1 | !ie], ut) : G;
            }, ut.y = function(It) {
              return arguments.length ? (Ve = Z[!G << 1 | !(ie = It)], ut) : ie;
            }, ut.clamp = function(It) {
              return arguments.length ? (G && ie ? (Te = !!It[0], ze = !!It[1]) : G ? Te = !!It : ie && (ze = !!It), ut) : G && ie ? [Te, ze] : G ? Te : ie ? ze : null;
            }, ut.extent = function(It) {
              var jt, Lt, Zt, Qt, Xt;
              return arguments.length ? (G && (jt = It[0], Lt = It[1], ie && (jt = jt[0], Lt = Lt[0]), b = [jt, Lt], G.invert && (jt = G(jt), Lt = G(Lt)), Lt < jt && (Xt = jt, jt = Lt, Lt = Xt), jt == fe[0] && Lt == fe[1] || (fe = [jt, Lt])), ie && (Zt = It[0], Qt = It[1], G && (Zt = Zt[1], Qt = Qt[1]), R = [Zt, Qt], ie.invert && (Zt = ie(Zt), Qt = ie(Qt)), Qt < Zt && (Xt = Zt, Zt = Qt, Qt = Xt), Zt == xe[0] && Qt == xe[1] || (xe = [Zt, Qt])), ut) : (G && (b ? (jt = b[0], Lt = b[1]) : (jt = fe[0], Lt = fe[1], G.invert && (jt = G.invert(jt), Lt = G.invert(Lt)), Lt < jt && (Xt = jt, jt = Lt, Lt = Xt))), ie && (R ? (Zt = R[0], Qt = R[1]) : (Zt = xe[0], Qt = xe[1], ie.invert && (Zt = ie.invert(Zt), Qt = ie.invert(Qt)), Qt < Zt && (Xt = Zt, Zt = Qt, Qt = Xt))), G && ie ? [[jt, Zt], [Lt, Qt]] : G ? [jt, Lt] : ie && [Zt, Qt]);
            }, ut.clear = function() {
              return ut.empty() || (fe = [0, 0], xe = [0, 0], b = R = null), ut;
            }, ut.empty = function() {
              return !!G && fe[0] == fe[1] || !!ie && xe[0] == xe[1];
            }, i.rebind(ut, j, "on");
          };
          var ht = { n: "ns-resize", e: "ew-resize", s: "ns-resize", w: "ew-resize", nw: "nwse-resize", ne: "nesw-resize", se: "nwse-resize", sw: "nesw-resize" }, Z = [["n", "e", "s", "w", "nw", "ne", "se", "sw"], ["e", "w"], ["n", "s"], []];
          function B(b) {
            return JSON.parse(b.responseText);
          }
          function y(b) {
            var R = _.createRange();
            return R.selectNode(_.body), R.createContextualFragment(b.responseText);
          }
          i.text = zr(function(b) {
            return b.responseText;
          }), i.json = function(b, R) {
            return Wr(b, "application/json", B, R);
          }, i.html = function(b, R) {
            return Wr(b, "text/html", y, R);
          }, i.xml = zr(function(b) {
            return b.responseXML;
          }), (u = typeof (l = i) == "function" ? l.call(s, n, s, o) : l) === void 0 || (o.exports = u);
        }).apply(self);
      }, 32280: function(o) {
        o.exports = function() {
          var s, n, l;
          function u(i, h) {
            if (s) if (n) {
              var p = "var sharedChunk = {}; (" + s + ")(sharedChunk); (" + n + ")(sharedChunk);", _ = {};
              s(_), l = h(_), typeof window < "u" && (l.workerUrl = window.URL.createObjectURL(new Blob([p], { type: "text/javascript" })));
            } else n = h;
            else s = h;
          }
          return u(0, function(i) {
            function h(N, W) {
              return N(W = { exports: {} }, W.exports), W.exports;
            }
            var p = "1.13.4", _ = d;
            function d(N, W, le, ke) {
              this.cx = 3 * N, this.bx = 3 * (le - N) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * W, this.by = 3 * (ke - W) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = N, this.p1y = ke, this.p2x = le, this.p2y = ke;
            }
            d.prototype.sampleCurveX = function(N) {
              return ((this.ax * N + this.bx) * N + this.cx) * N;
            }, d.prototype.sampleCurveY = function(N) {
              return ((this.ay * N + this.by) * N + this.cy) * N;
            }, d.prototype.sampleCurveDerivativeX = function(N) {
              return (3 * this.ax * N + 2 * this.bx) * N + this.cx;
            }, d.prototype.solveCurveX = function(N, W) {
              var le, ke, qe, et, dt;
              for (W === void 0 && (W = 1e-6), qe = N, dt = 0; dt < 8; dt++) {
                if (et = this.sampleCurveX(qe) - N, Math.abs(et) < W) return qe;
                var Ct = this.sampleCurveDerivativeX(qe);
                if (Math.abs(Ct) < 1e-6) break;
                qe -= et / Ct;
              }
              if ((qe = N) < (le = 0)) return le;
              if (qe > (ke = 1)) return ke;
              for (; le < ke; ) {
                if (et = this.sampleCurveX(qe), Math.abs(et - N) < W) return qe;
                N > et ? le = qe : ke = qe, qe = 0.5 * (ke - le) + le;
              }
              return qe;
            }, d.prototype.solve = function(N, W) {
              return this.sampleCurveY(this.solveCurveX(N, W));
            };
            var f = c;
            function c(N, W) {
              this.x = N, this.y = W;
            }
            c.prototype = { clone: function() {
              return new c(this.x, this.y);
            }, add: function(N) {
              return this.clone()._add(N);
            }, sub: function(N) {
              return this.clone()._sub(N);
            }, multByPoint: function(N) {
              return this.clone()._multByPoint(N);
            }, divByPoint: function(N) {
              return this.clone()._divByPoint(N);
            }, mult: function(N) {
              return this.clone()._mult(N);
            }, div: function(N) {
              return this.clone()._div(N);
            }, rotate: function(N) {
              return this.clone()._rotate(N);
            }, rotateAround: function(N, W) {
              return this.clone()._rotateAround(N, W);
            }, matMult: function(N) {
              return this.clone()._matMult(N);
            }, unit: function() {
              return this.clone()._unit();
            }, perp: function() {
              return this.clone()._perp();
            }, round: function() {
              return this.clone()._round();
            }, mag: function() {
              return Math.sqrt(this.x * this.x + this.y * this.y);
            }, equals: function(N) {
              return this.x === N.x && this.y === N.y;
            }, dist: function(N) {
              return Math.sqrt(this.distSqr(N));
            }, distSqr: function(N) {
              var W = N.x - this.x, le = N.y - this.y;
              return W * W + le * le;
            }, angle: function() {
              return Math.atan2(this.y, this.x);
            }, angleTo: function(N) {
              return Math.atan2(this.y - N.y, this.x - N.x);
            }, angleWith: function(N) {
              return this.angleWithSep(N.x, N.y);
            }, angleWithSep: function(N, W) {
              return Math.atan2(this.x * W - this.y * N, this.x * N + this.y * W);
            }, _matMult: function(N) {
              var W = N[0] * this.x + N[1] * this.y, le = N[2] * this.x + N[3] * this.y;
              return this.x = W, this.y = le, this;
            }, _add: function(N) {
              return this.x += N.x, this.y += N.y, this;
            }, _sub: function(N) {
              return this.x -= N.x, this.y -= N.y, this;
            }, _mult: function(N) {
              return this.x *= N, this.y *= N, this;
            }, _div: function(N) {
              return this.x /= N, this.y /= N, this;
            }, _multByPoint: function(N) {
              return this.x *= N.x, this.y *= N.y, this;
            }, _divByPoint: function(N) {
              return this.x /= N.x, this.y /= N.y, this;
            }, _unit: function() {
              return this._div(this.mag()), this;
            }, _perp: function() {
              var N = this.y;
              return this.y = this.x, this.x = -N, this;
            }, _rotate: function(N) {
              var W = Math.cos(N), le = Math.sin(N), ke = W * this.x - le * this.y, qe = le * this.x + W * this.y;
              return this.x = ke, this.y = qe, this;
            }, _rotateAround: function(N, W) {
              var le = Math.cos(N), ke = Math.sin(N), qe = W.x + le * (this.x - W.x) - ke * (this.y - W.y), et = W.y + ke * (this.x - W.x) + le * (this.y - W.y);
              return this.x = qe, this.y = et, this;
            }, _round: function() {
              return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
            } }, c.convert = function(N) {
              return N instanceof c ? N : Array.isArray(N) ? new c(N[0], N[1]) : N;
            };
            var g = typeof self < "u" ? self : {}, m = Math.pow(2, 53) - 1;
            function x(N, W, le, ke) {
              var qe = new _(N, W, le, ke);
              return function(et) {
                return qe.solve(et);
              };
            }
            var w = x(0.25, 0.1, 0.25, 1);
            function k(N, W, le) {
              return Math.min(le, Math.max(W, N));
            }
            function S(N, W, le) {
              var ke = le - W, qe = ((N - W) % ke + ke) % ke + W;
              return qe === W ? le : qe;
            }
            function A(N) {
              for (var W = [], le = arguments.length - 1; le-- > 0; ) W[le] = arguments[le + 1];
              for (var ke = 0, qe = W; ke < qe.length; ke += 1) {
                var et = qe[ke];
                for (var dt in et) N[dt] = et[dt];
              }
              return N;
            }
            var C = 1;
            function D() {
              return C++;
            }
            function L() {
              return function N(W) {
                return W ? (W ^ 16 * Math.random() >> W / 4).toString(16) : ([1e7] + -[1e3] + -4e3 + -8e3 + -1e11).replace(/[018]/g, N);
              }();
            }
            function E(N) {
              return !!N && /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(N);
            }
            function P(N, W) {
              N.forEach(function(le) {
                W[le] && (W[le] = W[le].bind(W));
              });
            }
            function I(N, W) {
              return N.indexOf(W, N.length - W.length) !== -1;
            }
            function M(N, W, le) {
              var ke = {};
              for (var qe in N) ke[qe] = W.call(le || this, N[qe], qe, N);
              return ke;
            }
            function O(N, W, le) {
              var ke = {};
              for (var qe in N) W.call(le || this, N[qe], qe, N) && (ke[qe] = N[qe]);
              return ke;
            }
            function T(N) {
              return Array.isArray(N) ? N.map(T) : typeof N == "object" && N ? M(N, T) : N;
            }
            var z = {};
            function F(N) {
              z[N] || (typeof console < "u" && console.warn(N), z[N] = !0);
            }
            function U(N, W, le) {
              return (le.y - N.y) * (W.x - N.x) > (W.y - N.y) * (le.x - N.x);
            }
            function V(N) {
              for (var W = 0, le = 0, ke = N.length, qe = ke - 1, et = void 0, dt = void 0; le < ke; qe = le++) et = N[le], W += ((dt = N[qe]).x - et.x) * (et.y + dt.y);
              return W;
            }
            function $() {
              return typeof WorkerGlobalScope < "u" && typeof self < "u" && self instanceof WorkerGlobalScope;
            }
            function q(N) {
              var W = {};
              if (N.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, function(ke, qe, et, dt) {
                var Ct = et || dt;
                return W[qe] = !Ct || Ct.toLowerCase(), "";
              }), W["max-age"]) {
                var le = parseInt(W["max-age"], 10);
                isNaN(le) ? delete W["max-age"] : W["max-age"] = le;
              }
              return W;
            }
            var K = null;
            function re(N) {
              if (K == null) {
                var W = N.navigator ? N.navigator.userAgent : null;
                K = !!N.safari || !(!W || !(/\b(iPad|iPhone|iPod)\b/.test(W) || W.match("Safari") && !W.match("Chrome")));
              }
              return K;
            }
            function Y(N) {
              try {
                var W = g[N];
                return W.setItem("_mapbox_test_", 1), W.removeItem("_mapbox_test_"), !0;
              } catch {
                return !1;
              }
            }
            var te, ee, X, Q, ue = g.performance && g.performance.now ? g.performance.now.bind(g.performance) : Date.now.bind(Date), ce = g.requestAnimationFrame || g.mozRequestAnimationFrame || g.webkitRequestAnimationFrame || g.msRequestAnimationFrame, he = g.cancelAnimationFrame || g.mozCancelAnimationFrame || g.webkitCancelAnimationFrame || g.msCancelAnimationFrame, de = { now: ue, frame: function(N) {
              var W = ce(N);
              return { cancel: function() {
                return he(W);
              } };
            }, getImageData: function(N, W) {
              W === void 0 && (W = 0);
              var le = g.document.createElement("canvas"), ke = le.getContext("2d");
              if (!ke) throw new Error("failed to create canvas 2d context");
              return le.width = N.width, le.height = N.height, ke.drawImage(N, 0, 0, N.width, N.height), ke.getImageData(-W, -W, N.width + 2 * W, N.height + 2 * W);
            }, resolveURL: function(N) {
              return te || (te = g.document.createElement("a")), te.href = N, te.href;
            }, hardwareConcurrency: g.navigator && g.navigator.hardwareConcurrency || 4, get devicePixelRatio() {
              return g.devicePixelRatio;
            }, get prefersReducedMotion() {
              return !!g.matchMedia && (ee == null && (ee = g.matchMedia("(prefers-reduced-motion: reduce)")), ee.matches);
            } }, ne = { API_URL: "https://api.mapbox.com", get EVENTS_URL() {
              return this.API_URL ? this.API_URL.indexOf("https://api.mapbox.cn") === 0 ? "https://events.mapbox.cn/events/v2" : this.API_URL.indexOf("https://api.mapbox.com") === 0 ? "https://events.mapbox.com/events/v2" : null : null;
            }, FEEDBACK_URL: "https://apps.mapbox.com/feedback", REQUIRE_ACCESS_TOKEN: !0, ACCESS_TOKEN: null, MAX_PARALLEL_IMAGE_REQUESTS: 16 }, ae = { supported: !1, testSupport: function(N) {
              !se && Q && (me ? ye(N) : X = N);
            } }, se = !1, me = !1;
            function ye(N) {
              var W = N.createTexture();
              N.bindTexture(N.TEXTURE_2D, W);
              try {
                if (N.texImage2D(N.TEXTURE_2D, 0, N.RGBA, N.RGBA, N.UNSIGNED_BYTE, Q), N.isContextLost()) return;
                ae.supported = !0;
              } catch {
              }
              N.deleteTexture(W), se = !0;
            }
            g.document && ((Q = g.document.createElement("img")).onload = function() {
              X && ye(X), X = null, me = !0;
            }, Q.onerror = function() {
              se = !0, X = null;
            }, Q.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");
            var pe = "01", be = function(N, W) {
              this._transformRequestFn = N, this._customAccessToken = W, this._createSkuToken();
            };
            function Ae(N) {
              return N.indexOf("mapbox:") === 0;
            }
            be.prototype._createSkuToken = function() {
              var N = function() {
                for (var W = "", le = 0; le < 10; le++) W += "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62 * Math.random())];
                return { token: ["1", pe, W].join(""), tokenExpiresAt: Date.now() + 432e5 };
              }();
              this._skuToken = N.token, this._skuTokenExpiresAt = N.tokenExpiresAt;
            }, be.prototype._isSkuTokenExpired = function() {
              return Date.now() > this._skuTokenExpiresAt;
            }, be.prototype.transformRequest = function(N, W) {
              return this._transformRequestFn && this._transformRequestFn(N, W) || { url: N };
            }, be.prototype.normalizeStyleURL = function(N, W) {
              if (!Ae(N)) return N;
              var le = Le(N);
              return le.path = "/styles/v1" + le.path, this._makeAPIURL(le, this._customAccessToken || W);
            }, be.prototype.normalizeGlyphsURL = function(N, W) {
              if (!Ae(N)) return N;
              var le = Le(N);
              return le.path = "/fonts/v1" + le.path, this._makeAPIURL(le, this._customAccessToken || W);
            }, be.prototype.normalizeSourceURL = function(N, W) {
              if (!Ae(N)) return N;
              var le = Le(N);
              return le.path = "/v4/" + le.authority + ".json", le.params.push("secure"), this._makeAPIURL(le, this._customAccessToken || W);
            }, be.prototype.normalizeSpriteURL = function(N, W, le, ke) {
              var qe = Le(N);
              return Ae(N) ? (qe.path = "/styles/v1" + qe.path + "/sprite" + W + le, this._makeAPIURL(qe, this._customAccessToken || ke)) : (qe.path += "" + W + le, We(qe));
            }, be.prototype.normalizeTileURL = function(N, W) {
              if (this._isSkuTokenExpired() && this._createSkuToken(), N && !Ae(N)) return N;
              var le = Le(N), ke = de.devicePixelRatio >= 2 || W === 512 ? "@2x" : "", qe = ae.supported ? ".webp" : "$1";
              le.path = le.path.replace(/(\.(png|jpg)\d*)(?=$)/, "" + ke + qe), le.path = le.path.replace(/^.+\/v4\//, "/"), le.path = "/v4" + le.path;
              var et = this._customAccessToken || function(dt) {
                for (var Ct = 0, Ut = dt; Ct < Ut.length; Ct += 1) {
                  var tn = Ut[Ct].match(/^access_token=(.*)$/);
                  if (tn) return tn[1];
                }
                return null;
              }(le.params) || ne.ACCESS_TOKEN;
              return ne.REQUIRE_ACCESS_TOKEN && et && this._skuToken && le.params.push("sku=" + this._skuToken), this._makeAPIURL(le, et);
            }, be.prototype.canonicalizeTileURL = function(N, W) {
              var le = Le(N);
              if (!le.path.match(/(^\/v4\/)/) || !le.path.match(/\.[\w]+$/)) return N;
              var ke = "mapbox://tiles/";
              ke += le.path.replace("/v4/", "");
              var qe = le.params;
              return W && (qe = qe.filter(function(et) {
                return !et.match(/^access_token=/);
              })), qe.length && (ke += "?" + qe.join("&")), ke;
            }, be.prototype.canonicalizeTileset = function(N, W) {
              for (var le = !!W && Ae(W), ke = [], qe = 0, et = N.tiles || []; qe < et.length; qe += 1) {
                var dt = et[qe];
                Me(dt) ? ke.push(this.canonicalizeTileURL(dt, le)) : ke.push(dt);
              }
              return ke;
            }, be.prototype._makeAPIURL = function(N, W) {
              var le = "See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes", ke = Le(ne.API_URL);
              if (N.protocol = ke.protocol, N.authority = ke.authority, N.protocol === "http") {
                var qe = N.params.indexOf("secure");
                qe >= 0 && N.params.splice(qe, 1);
              }
              if (ke.path !== "/" && (N.path = "" + ke.path + N.path), !ne.REQUIRE_ACCESS_TOKEN) return We(N);
              if (!(W = W || ne.ACCESS_TOKEN)) throw new Error("An API access token is required to use Mapbox GL. " + le);
              if (W[0] === "s") throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). " + le);
              return N.params = N.params.filter(function(et) {
                return et.indexOf("access_token") === -1;
              }), N.params.push("access_token=" + W), We(N);
            };
            var Se = /^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;
            function Me(N) {
              return Se.test(N);
            }
            var De = /^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;
            function Le(N) {
              var W = N.match(De);
              if (!W) throw new Error("Unable to parse URL object");
              return { protocol: W[1], authority: W[2], path: W[3] || "/", params: W[4] ? W[4].split("&") : [] };
            }
            function We(N) {
              var W = N.params.length ? "?" + N.params.join("&") : "";
              return N.protocol + "://" + N.authority + N.path + W;
            }
            var Ee = "mapbox.eventData";
            function Ne(N) {
              if (!N) return null;
              var W, le = N.split(".");
              if (!le || le.length !== 3) return null;
              try {
                return JSON.parse((W = le[1], decodeURIComponent(g.atob(W).split("").map(function(ke) {
                  return "%" + ("00" + ke.charCodeAt(0).toString(16)).slice(-2);
                }).join(""))));
              } catch {
                return null;
              }
            }
            var Ie = function(N) {
              this.type = N, this.anonId = null, this.eventData = {}, this.queue = [], this.pendingRequest = null;
            };
            Ie.prototype.getStorageKey = function(N) {
              var W, le, ke = Ne(ne.ACCESS_TOKEN);
              return W = ke && ke.u ? (le = ke.u, g.btoa(encodeURIComponent(le).replace(/%([0-9A-F]{2})/g, function(qe, et) {
                return String.fromCharCode(+("0x" + et));
              }))) : ne.ACCESS_TOKEN || "", N ? Ee + "." + N + ":" + W : Ee + ":" + W;
            }, Ie.prototype.fetchEventData = function() {
              var N = Y("localStorage"), W = this.getStorageKey(), le = this.getStorageKey("uuid");
              if (N) try {
                var ke = g.localStorage.getItem(W);
                ke && (this.eventData = JSON.parse(ke));
                var qe = g.localStorage.getItem(le);
                qe && (this.anonId = qe);
              } catch {
                F("Unable to read from LocalStorage");
              }
            }, Ie.prototype.saveEventData = function() {
              var N = Y("localStorage"), W = this.getStorageKey(), le = this.getStorageKey("uuid");
              if (N) try {
                g.localStorage.setItem(le, this.anonId), Object.keys(this.eventData).length >= 1 && g.localStorage.setItem(W, JSON.stringify(this.eventData));
              } catch {
                F("Unable to write to LocalStorage");
              }
            }, Ie.prototype.processRequests = function(N) {
            }, Ie.prototype.postEvent = function(N, W, le, ke) {
              var qe = this;
              if (ne.EVENTS_URL) {
                var et = Le(ne.EVENTS_URL);
                et.params.push("access_token=" + (ke || ne.ACCESS_TOKEN || ""));
                var dt = { event: this.type, created: new Date(N).toISOString(), sdkIdentifier: "mapbox-gl-js", sdkVersion: p, skuId: pe, userId: this.anonId }, Ct = W ? A(dt, W) : dt, Ut = { url: We(et), headers: { "Content-Type": "text/plain" }, body: JSON.stringify([Ct]) };
                this.pendingRequest = nt(Ut, function(tn) {
                  qe.pendingRequest = null, le(tn), qe.saveEventData(), qe.processRequests(ke);
                });
              }
            }, Ie.prototype.queueRequest = function(N, W) {
              this.queue.push(N), this.processRequests(W);
            };
            var ge, Ce, we = function(N) {
              function W() {
                N.call(this, "map.load"), this.success = {}, this.skuToken = "";
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.postMapLoadEvent = function(le, ke, qe, et) {
                this.skuToken = qe, (ne.EVENTS_URL && et || ne.ACCESS_TOKEN && Array.isArray(le) && le.some(function(dt) {
                  return Ae(dt) || Me(dt);
                })) && this.queueRequest({ id: ke, timestamp: Date.now() }, et);
              }, W.prototype.processRequests = function(le) {
                var ke = this;
                if (!this.pendingRequest && this.queue.length !== 0) {
                  var qe = this.queue.shift(), et = qe.id, dt = qe.timestamp;
                  et && this.success[et] || (this.anonId || this.fetchEventData(), E(this.anonId) || (this.anonId = L()), this.postEvent(dt, { skuToken: this.skuToken }, function(Ct) {
                    Ct || et && (ke.success[et] = !0);
                  }, le));
                }
              }, W;
            }(Ie), Ge = function(N) {
              function W(le) {
                N.call(this, "appUserTurnstile"), this._customAccessToken = le;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.postTurnstileEvent = function(le, ke) {
                ne.EVENTS_URL && ne.ACCESS_TOKEN && Array.isArray(le) && le.some(function(qe) {
                  return Ae(qe) || Me(qe);
                }) && this.queueRequest(Date.now(), ke);
              }, W.prototype.processRequests = function(le) {
                var ke = this;
                if (!this.pendingRequest && this.queue.length !== 0) {
                  this.anonId && this.eventData.lastSuccess && this.eventData.tokenU || this.fetchEventData();
                  var qe = Ne(ne.ACCESS_TOKEN), et = qe ? qe.u : ne.ACCESS_TOKEN, dt = et !== this.eventData.tokenU;
                  E(this.anonId) || (this.anonId = L(), dt = !0);
                  var Ct = this.queue.shift();
                  if (this.eventData.lastSuccess) {
                    var Ut = new Date(this.eventData.lastSuccess), tn = new Date(Ct), nn = (Ct - this.eventData.lastSuccess) / 864e5;
                    dt = dt || nn >= 1 || nn < -1 || Ut.getDate() !== tn.getDate();
                  } else dt = !0;
                  if (!dt) return this.processRequests();
                  this.postEvent(Ct, { "enabled.telemetry": !1 }, function(cn) {
                    cn || (ke.eventData.lastSuccess = Ct, ke.eventData.tokenU = et);
                  }, le);
                }
              }, W;
            }(Ie), Re = new Ge(), je = Re.postTurnstileEvent.bind(Re), Ke = new we(), tt = Ke.postMapLoadEvent.bind(Ke), _e = "mapbox-tiles", Be = 500, $e = 50, Ze = 42e4;
            function ct() {
              g.caches && !ge && (ge = g.caches.open(_e));
            }
            function ft(N, W, le) {
              if (ct(), ge) {
                var ke = { status: W.status, statusText: W.statusText, headers: new g.Headers() };
                W.headers.forEach(function(et, dt) {
                  return ke.headers.set(dt, et);
                });
                var qe = q(W.headers.get("Cache-Control") || "");
                qe["no-store"] || (qe["max-age"] && ke.headers.set("Expires", new Date(le + 1e3 * qe["max-age"]).toUTCString()), new Date(ke.headers.get("Expires")).getTime() - le < Ze || function(et, dt) {
                  if (Ce === void 0) try {
                    new Response(new ReadableStream()), Ce = !0;
                  } catch {
                    Ce = !1;
                  }
                  Ce ? dt(et.body) : et.blob().then(dt);
                }(W, function(et) {
                  var dt = new g.Response(et, ke);
                  ct(), ge && ge.then(function(Ct) {
                    return Ct.put(_t(N.url), dt);
                  }).catch(function(Ct) {
                    return F(Ct.message);
                  });
                }));
              }
            }
            function _t(N) {
              var W = N.indexOf("?");
              return W < 0 ? N : N.slice(0, W);
            }
            function Pt(N, W) {
              if (ct(), !ge) return W(null);
              var le = _t(N.url);
              ge.then(function(ke) {
                ke.match(le).then(function(qe) {
                  var et = function(dt) {
                    if (!dt) return !1;
                    var Ct = new Date(dt.headers.get("Expires") || 0), Ut = q(dt.headers.get("Cache-Control") || "");
                    return Ct > Date.now() && !Ut["no-cache"];
                  }(qe);
                  ke.delete(le), et && ke.put(le, qe.clone()), W(null, qe, et);
                }).catch(W);
              }).catch(W);
            }
            var Dt, $t = 1 / 0;
            function Gt() {
              return Dt == null && (Dt = g.OffscreenCanvas && new g.OffscreenCanvas(1, 1).getContext("2d") && typeof g.createImageBitmap == "function"), Dt;
            }
            var Wt = { Unknown: "Unknown", Style: "Style", Source: "Source", Tile: "Tile", Glyphs: "Glyphs", SpriteImage: "SpriteImage", SpriteJSON: "SpriteJSON", Image: "Image" };
            typeof Object.freeze == "function" && Object.freeze(Wt);
            var mt = function(N) {
              function W(le, ke, qe) {
                ke === 401 && Me(qe) && (le += ": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"), N.call(this, le), this.status = ke, this.url = qe, this.name = this.constructor.name, this.message = le;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.toString = function() {
                return this.name + ": " + this.message + " (" + this.status + "): " + this.url;
              }, W;
            }(Error), at = $() ? function() {
              return self.worker && self.worker.referrer;
            } : function() {
              return (g.location.protocol === "blob:" ? g.parent : g).location.href;
            };
            function vt(N, W) {
              var le, ke = new g.AbortController(), qe = new g.Request(N.url, { method: N.method || "GET", body: N.body, credentials: N.credentials, headers: N.headers, referrer: at(), signal: ke.signal }), et = !1, dt = !1, Ct = (le = qe.url).indexOf("sku=") > 0 && Me(le);
              N.type === "json" && qe.headers.set("Accept", "application/json");
              var Ut = function(nn, cn, vn) {
                if (!dt) {
                  if (nn && nn.message !== "SecurityError" && F(nn), cn && vn) return tn(cn);
                  var mn = Date.now();
                  g.fetch(qe).then(function(On) {
                    if (On.ok) {
                      var Bn = Ct ? On.clone() : null;
                      return tn(On, Bn, mn);
                    }
                    return W(new mt(On.statusText, On.status, N.url));
                  }).catch(function(On) {
                    On.code !== 20 && W(new Error(On.message));
                  });
                }
              }, tn = function(nn, cn, vn) {
                (N.type === "arrayBuffer" ? nn.arrayBuffer() : N.type === "json" ? nn.json() : nn.text()).then(function(mn) {
                  dt || (cn && vn && ft(qe, cn, vn), et = !0, W(null, mn, nn.headers.get("Cache-Control"), nn.headers.get("Expires")));
                }).catch(function(mn) {
                  dt || W(new Error(mn.message));
                });
              };
              return Ct ? Pt(qe, Ut) : Ut(null, null), { cancel: function() {
                dt = !0, et || ke.abort();
              } };
            }
            var St = function(N, W) {
              if (le = N.url, !(/^file:/.test(le) || /^file:/.test(at()) && !/^\w+:/.test(le))) {
                if (g.fetch && g.Request && g.AbortController && g.Request.prototype.hasOwnProperty("signal")) return vt(N, W);
                if ($() && self.worker && self.worker.actor)
                  return self.worker.actor.send("getResource", N, W, void 0, !0);
              }
              var le;
              return function(ke, qe) {
                var et = new g.XMLHttpRequest();
                for (var dt in et.open(ke.method || "GET", ke.url, !0), ke.type === "arrayBuffer" && (et.responseType = "arraybuffer"), ke.headers) et.setRequestHeader(dt, ke.headers[dt]);
                return ke.type === "json" && (et.responseType = "text", et.setRequestHeader("Accept", "application/json")), et.withCredentials = ke.credentials === "include", et.onerror = function() {
                  qe(new Error(et.statusText));
                }, et.onload = function() {
                  if ((et.status >= 200 && et.status < 300 || et.status === 0) && et.response !== null) {
                    var Ct = et.response;
                    if (ke.type === "json") try {
                      Ct = JSON.parse(et.response);
                    } catch (Ut) {
                      return qe(Ut);
                    }
                    qe(null, Ct, et.getResponseHeader("Cache-Control"), et.getResponseHeader("Expires"));
                  } else qe(new mt(et.statusText, et.status, ke.url));
                }, et.send(ke.body), { cancel: function() {
                  return et.abort();
                } };
              }(N, W);
            }, Je = function(N, W) {
              return St(A(N, { type: "arrayBuffer" }), W);
            }, nt = function(N, W) {
              return St(A(N, { method: "POST" }), W);
            }, ot, Ye, Fe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";
            ot = [], Ye = 0;
            var pt = function(N, W) {
              if (ae.supported && (N.headers || (N.headers = {}), N.headers.accept = "image/webp,*/*"), Ye >= ne.MAX_PARALLEL_IMAGE_REQUESTS) {
                var le = { requestParameters: N, callback: W, cancelled: !1, cancel: function() {
                  this.cancelled = !0;
                } };
                return ot.push(le), le;
              }
              Ye++;
              var ke = !1, qe = function() {
                if (!ke) for (ke = !0, Ye--; ot.length && Ye < ne.MAX_PARALLEL_IMAGE_REQUESTS; ) {
                  var dt = ot.shift(), Ct = dt.requestParameters, Ut = dt.callback;
                  dt.cancelled || (dt.cancel = pt(Ct, Ut).cancel);
                }
              }, et = Je(N, function(dt, Ct, Ut, tn) {
                qe(), dt ? W(dt) : Ct && (Gt() ? function(nn, cn) {
                  var vn = new g.Blob([new Uint8Array(nn)], { type: "image/png" });
                  g.createImageBitmap(vn).then(function(mn) {
                    cn(null, mn);
                  }).catch(function(mn) {
                    cn(new Error("Could not load image because of " + mn.message + ". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
                  });
                }(Ct, W) : function(nn, cn, vn, mn) {
                  var On = new g.Image(), Bn = g.URL;
                  On.onload = function() {
                    cn(null, On), Bn.revokeObjectURL(On.src), On.onload = null, g.requestAnimationFrame(function() {
                      On.src = Fe;
                    });
                  }, On.onerror = function() {
                    return cn(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."));
                  };
                  var ar = new g.Blob([new Uint8Array(nn)], { type: "image/png" });
                  On.cacheControl = vn, On.expires = mn, On.src = nn.byteLength ? Bn.createObjectURL(ar) : Fe;
                }(Ct, W, Ut, tn));
              });
              return { cancel: function() {
                et.cancel(), qe();
              } };
            };
            function Mt(N, W, le) {
              le[N] && le[N].indexOf(W) !== -1 || (le[N] = le[N] || [], le[N].push(W));
            }
            function At(N, W, le) {
              if (le && le[N]) {
                var ke = le[N].indexOf(W);
                ke !== -1 && le[N].splice(ke, 1);
              }
            }
            var Rt = function(N, W) {
              W === void 0 && (W = {}), A(this, W), this.type = N;
            }, Ft = function(N) {
              function W(le, ke) {
                ke === void 0 && (ke = {}), N.call(this, "error", A({ error: le }, ke));
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W;
            }(Rt), lt = function() {
            };
            lt.prototype.on = function(N, W) {
              return this._listeners = this._listeners || {}, Mt(N, W, this._listeners), this;
            }, lt.prototype.off = function(N, W) {
              return At(N, W, this._listeners), At(N, W, this._oneTimeListeners), this;
            }, lt.prototype.once = function(N, W) {
              return this._oneTimeListeners = this._oneTimeListeners || {}, Mt(N, W, this._oneTimeListeners), this;
            }, lt.prototype.fire = function(N, W) {
              typeof N == "string" && (N = new Rt(N, W || {}));
              var le = N.type;
              if (this.listens(le)) {
                N.target = this;
                for (var ke = 0, qe = this._listeners && this._listeners[le] ? this._listeners[le].slice() : []; ke < qe.length; ke += 1) qe[ke].call(this, N);
                for (var et = 0, dt = this._oneTimeListeners && this._oneTimeListeners[le] ? this._oneTimeListeners[le].slice() : []; et < dt.length; et += 1) {
                  var Ct = dt[et];
                  At(le, Ct, this._oneTimeListeners), Ct.call(this, N);
                }
                var Ut = this._eventedParent;
                Ut && (A(N, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), Ut.fire(N));
              } else N instanceof Ft && console.error(N.error);
              return this;
            }, lt.prototype.listens = function(N) {
              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);
            }, lt.prototype.setEventedParent = function(N, W) {
              return this._eventedParent = N, this._eventedParentData = W, this;
            };
            var st = { $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" }, sources: { required: !0, type: "sources" }, sprite: { type: "string" }, 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: {} }, default: "mapbox" }, volatile: { type: "boolean", default: !1 }, "*": { type: "*" } }, source_geojson: { type: { required: !0, type: "enum", values: { geojson: {} } }, data: { 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 }, 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", "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"], 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: "number", default: 2, minimum: 0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "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: {}, 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-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"], 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" } }, filter: { type: "array", value: "*" }, filter_operator: { type: "enum", values: { "==": {}, "!=": {}, ">": {}, ">=": {}, "<": {}, "<=": {}, in: {}, "!in": {}, all: {}, any: {}, none: {}, has: {}, "!has": {}, within: {} } }, 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 } }, 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" }, { "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" } } }, Ot = function(N, W, le, ke) {
              this.message = (N ? N + ": " : "") + le, ke && (this.identifier = ke), W != null && W.__line__ && (this.line = W.__line__);
            };
            function kt(N) {
              var W = N.key, le = N.value;
              return le ? [new Ot(W, le, "constants have been deprecated as of v8")] : [];
            }
            function Bt(N) {
              for (var W = [], le = arguments.length - 1; le-- > 0; ) W[le] = arguments[le + 1];
              for (var ke = 0, qe = W; ke < qe.length; ke += 1) {
                var et = qe[ke];
                for (var dt in et) N[dt] = et[dt];
              }
              return N;
            }
            function xt(N) {
              return N instanceof Number || N instanceof String || N instanceof Boolean ? N.valueOf() : N;
            }
            function Jt(N) {
              if (Array.isArray(N)) return N.map(Jt);
              if (N instanceof Object && !(N instanceof Number || N instanceof String || N instanceof Boolean)) {
                var W = {};
                for (var le in N) W[le] = Jt(N[le]);
                return W;
              }
              return xt(N);
            }
            var qt = function(N) {
              function W(le, ke) {
                N.call(this, ke), this.message = ke, this.key = le;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W;
            }(Error), en = function(N, W) {
              W === void 0 && (W = []), this.parent = N, this.bindings = {};
              for (var le = 0, ke = W; le < ke.length; le += 1) {
                var qe = ke[le], et = qe[0], dt = qe[1];
                this.bindings[et] = dt;
              }
            };
            en.prototype.concat = function(N) {
              return new en(this, N);
            }, en.prototype.get = function(N) {
              if (this.bindings[N]) return this.bindings[N];
              if (this.parent) return this.parent.get(N);
              throw new Error(N + " not found in scope.");
            }, en.prototype.has = function(N) {
              return !!this.bindings[N] || !!this.parent && this.parent.has(N);
            };
            var Yt = { kind: "null" }, Ht = { kind: "number" }, sn = { kind: "string" }, fn = { kind: "boolean" }, In = { kind: "color" }, zn = { kind: "object" }, Cn = { kind: "value" }, gn = { kind: "collator" }, Mn = { kind: "formatted" }, Xn = { kind: "resolvedImage" };
            function Pn(N, W) {
              return { kind: "array", itemType: N, N: W };
            }
            function wn(N) {
              if (N.kind === "array") {
                var W = wn(N.itemType);
                return typeof N.N == "number" ? "array<" + W + ", " + N.N + ">" : N.itemType.kind === "value" ? "array" : "array<" + W + ">";
              }
              return N.kind;
            }
            var Rn = [Yt, Ht, sn, fn, In, Mn, zn, Pn(Cn), Xn];
            function _n(N, W) {
              if (W.kind === "error") return null;
              if (N.kind === "array") {
                if (W.kind === "array" && (W.N === 0 && W.itemType.kind === "value" || !_n(N.itemType, W.itemType)) && (typeof N.N != "number" || N.N === W.N)) return null;
              } else {
                if (N.kind === W.kind) return null;
                if (N.kind === "value") {
                  for (var le = 0, ke = Rn; le < ke.length; le += 1) if (!_n(ke[le], W)) return null;
                }
              }
              return "Expected " + wn(N) + " but found " + wn(W) + " instead.";
            }
            function En(N, W) {
              return W.some(function(le) {
                return le.kind === N.kind;
              });
            }
            function Kn(N, W) {
              return W.some(function(le) {
                return le === "null" ? N === null : le === "array" ? Array.isArray(N) : le === "object" ? N && !Array.isArray(N) && typeof N == "object" : le === typeof N;
              });
            }
            var Wn = h(function(N, W) {
              var le = { transparent: [0, 0, 0, 0], aliceblue: [240, 248, 255, 1], antiquewhite: [250, 235, 215, 1], aqua: [0, 255, 255, 1], aquamarine: [127, 255, 212, 1], azure: [240, 255, 255, 1], beige: [245, 245, 220, 1], bisque: [255, 228, 196, 1], black: [0, 0, 0, 1], blanchedalmond: [255, 235, 205, 1], blue: [0, 0, 255, 1], blueviolet: [138, 43, 226, 1], brown: [165, 42, 42, 1], burlywood: [222, 184, 135, 1], cadetblue: [95, 158, 160, 1], chartreuse: [127, 255, 0, 1], chocolate: [210, 105, 30, 1], coral: [255, 127, 80, 1], cornflowerblue: [100, 149, 237, 1], cornsilk: [255, 248, 220, 1], crimson: [220, 20, 60, 1], cyan: [0, 255, 255, 1], darkblue: [0, 0, 139, 1], darkcyan: [0, 139, 139, 1], darkgoldenrod: [184, 134, 11, 1], darkgray: [169, 169, 169, 1], darkgreen: [0, 100, 0, 1], darkgrey: [169, 169, 169, 1], darkkhaki: [189, 183, 107, 1], darkmagenta: [139, 0, 139, 1], darkolivegreen: [85, 107, 47, 1], darkorange: [255, 140, 0, 1], darkorchid: [153, 50, 204, 1], darkred: [139, 0, 0, 1], darksalmon: [233, 150, 122, 1], darkseagreen: [143, 188, 143, 1], darkslateblue: [72, 61, 139, 1], darkslategray: [47, 79, 79, 1], darkslategrey: [47, 79, 79, 1], darkturquoise: [0, 206, 209, 1], darkviolet: [148, 0, 211, 1], deeppink: [255, 20, 147, 1], deepskyblue: [0, 191, 255, 1], dimgray: [105, 105, 105, 1], dimgrey: [105, 105, 105, 1], dodgerblue: [30, 144, 255, 1], firebrick: [178, 34, 34, 1], floralwhite: [255, 250, 240, 1], forestgreen: [34, 139, 34, 1], fuchsia: [255, 0, 255, 1], gainsboro: [220, 220, 220, 1], ghostwhite: [248, 248, 255, 1], gold: [255, 215, 0, 1], goldenrod: [218, 165, 32, 1], gray: [128, 128, 128, 1], green: [0, 128, 0, 1], greenyellow: [173, 255, 47, 1], grey: [128, 128, 128, 1], honeydew: [240, 255, 240, 1], hotpink: [255, 105, 180, 1], indianred: [205, 92, 92, 1], indigo: [75, 0, 130, 1], ivory: [255, 255, 240, 1], khaki: [240, 230, 140, 1], lavender: [230, 230, 250, 1], lavenderblush: [255, 240, 245, 1], lawngreen: [124, 252, 0, 1], lemonchiffon: [255, 250, 205, 1], lightblue: [173, 216, 230, 1], lightcoral: [240, 128, 128, 1], lightcyan: [224, 255, 255, 1], lightgoldenrodyellow: [250, 250, 210, 1], lightgray: [211, 211, 211, 1], lightgreen: [144, 238, 144, 1], lightgrey: [211, 211, 211, 1], lightpink: [255, 182, 193, 1], lightsalmon: [255, 160, 122, 1], lightseagreen: [32, 178, 170, 1], lightskyblue: [135, 206, 250, 1], lightslategray: [119, 136, 153, 1], lightslategrey: [119, 136, 153, 1], lightsteelblue: [176, 196, 222, 1], lightyellow: [255, 255, 224, 1], lime: [0, 255, 0, 1], limegreen: [50, 205, 50, 1], linen: [250, 240, 230, 1], magenta: [255, 0, 255, 1], maroon: [128, 0, 0, 1], mediumaquamarine: [102, 205, 170, 1], mediumblue: [0, 0, 205, 1], mediumorchid: [186, 85, 211, 1], mediumpurple: [147, 112, 219, 1], mediumseagreen: [60, 179, 113, 1], mediumslateblue: [123, 104, 238, 1], mediumspringgreen: [0, 250, 154, 1], mediumturquoise: [72, 209, 204, 1], mediumvioletred: [199, 21, 133, 1], midnightblue: [25, 25, 112, 1], mintcream: [245, 255, 250, 1], mistyrose: [255, 228, 225, 1], moccasin: [255, 228, 181, 1], navajowhite: [255, 222, 173, 1], navy: [0, 0, 128, 1], oldlace: [253, 245, 230, 1], olive: [128, 128, 0, 1], olivedrab: [107, 142, 35, 1], orange: [255, 165, 0, 1], orangered: [255, 69, 0, 1], orchid: [218, 112, 214, 1], palegoldenrod: [238, 232, 170, 1], palegreen: [152, 251, 152, 1], paleturquoise: [175, 238, 238, 1], palevioletred: [219, 112, 147, 1], papayawhip: [255, 239, 213, 1], peachpuff: [255, 218, 185, 1], peru: [205, 133, 63, 1], pink: [255, 192, 203, 1], plum: [221, 160, 221, 1], powderblue: [176, 224, 230, 1], purple: [128, 0, 128, 1], rebeccapurple: [102, 51, 153, 1], red: [255, 0, 0, 1], rosybrown: [188, 143, 143, 1], royalblue: [65, 105, 225, 1], saddlebrown: [139, 69, 19, 1], salmon: [250, 128, 114, 1], sandybrown: [244, 164, 96, 1], seagreen: [46, 139, 87, 1], seashell: [255, 245, 238, 1], sienna: [160, 82, 45, 1], silver: [192, 192, 192, 1], skyblue: [135, 206, 235, 1], slateblue: [106, 90, 205, 1], slategray: [112, 128, 144, 1], slategrey: [112, 128, 144, 1], snow: [255, 250, 250, 1], springgreen: [0, 255, 127, 1], steelblue: [70, 130, 180, 1], tan: [210, 180, 140, 1], teal: [0, 128, 128, 1], thistle: [216, 191, 216, 1], tomato: [255, 99, 71, 1], turquoise: [64, 224, 208, 1], violet: [238, 130, 238, 1], wheat: [245, 222, 179, 1], white: [255, 255, 255, 1], whitesmoke: [245, 245, 245, 1], yellow: [255, 255, 0, 1], yellowgreen: [154, 205, 50, 1] };
              function ke(Ut) {
                return (Ut = Math.round(Ut)) < 0 ? 0 : Ut > 255 ? 255 : Ut;
              }
              function qe(Ut) {
                return Ut < 0 ? 0 : Ut > 1 ? 1 : Ut;
              }
              function et(Ut) {
                return Ut[Ut.length - 1] === "%" ? ke(parseFloat(Ut) / 100 * 255) : ke(parseInt(Ut));
              }
              function dt(Ut) {
                return Ut[Ut.length - 1] === "%" ? qe(parseFloat(Ut) / 100) : qe(parseFloat(Ut));
              }
              function Ct(Ut, tn, nn) {
                return nn < 0 ? nn += 1 : nn > 1 && (nn -= 1), 6 * nn < 1 ? Ut + (tn - Ut) * nn * 6 : 2 * nn < 1 ? tn : 3 * nn < 2 ? Ut + (tn - Ut) * (2 / 3 - nn) * 6 : Ut;
              }
              try {
                W.parseCSSColor = function(Ut) {
                  var tn, nn = Ut.replace(/ /g, "").toLowerCase();
                  if (nn in le) return le[nn].slice();
                  if (nn[0] === "#") return nn.length === 4 ? (tn = parseInt(nn.substr(1), 16)) >= 0 && tn <= 4095 ? [(3840 & tn) >> 4 | (3840 & tn) >> 8, 240 & tn | (240 & tn) >> 4, 15 & tn | (15 & tn) << 4, 1] : null : nn.length === 7 && (tn = parseInt(nn.substr(1), 16)) >= 0 && tn <= 16777215 ? [(16711680 & tn) >> 16, (65280 & tn) >> 8, 255 & tn, 1] : null;
                  var cn = nn.indexOf("("), vn = nn.indexOf(")");
                  if (cn !== -1 && vn + 1 === nn.length) {
                    var mn = nn.substr(0, cn), On = nn.substr(cn + 1, vn - (cn + 1)).split(","), Bn = 1;
                    switch (mn) {
                      case "rgba":
                        if (On.length !== 4) return null;
                        Bn = dt(On.pop());
                      case "rgb":
                        return On.length !== 3 ? null : [et(On[0]), et(On[1]), et(On[2]), Bn];
                      case "hsla":
                        if (On.length !== 4) return null;
                        Bn = dt(On.pop());
                      case "hsl":
                        if (On.length !== 3) return null;
                        var ar = (parseFloat(On[0]) % 360 + 360) % 360 / 360, tr = dt(On[1]), xr = dt(On[2]), _r = xr <= 0.5 ? xr * (tr + 1) : xr + tr - xr * tr, Lr = 2 * xr - _r;
                        return [ke(255 * Ct(Lr, _r, ar + 1 / 3)), ke(255 * Ct(Lr, _r, ar)), ke(255 * Ct(Lr, _r, ar - 1 / 3)), Bn];
                      default:
                        return null;
                    }
                  }
                  return null;
                };
              } catch {
              }
            }), hr = Wn.parseCSSColor, Zn = function(N, W, le, ke) {
              ke === void 0 && (ke = 1), this.r = N, this.g = W, this.b = le, this.a = ke;
            };
            Zn.parse = function(N) {
              if (N) {
                if (N instanceof Zn) return N;
                if (typeof N == "string") {
                  var W = hr(N);
                  if (W) return new Zn(W[0] / 255 * W[3], W[1] / 255 * W[3], W[2] / 255 * W[3], W[3]);
                }
              }
            }, Zn.prototype.toString = function() {
              var N = this.toArray(), W = N[0], le = N[1], ke = N[2], qe = N[3];
              return "rgba(" + Math.round(W) + "," + Math.round(le) + "," + Math.round(ke) + "," + qe + ")";
            }, Zn.prototype.toArray = function() {
              var N = this, W = N.r, le = N.g, ke = N.b, qe = N.a;
              return qe === 0 ? [0, 0, 0, 0] : [255 * W / qe, 255 * le / qe, 255 * ke / qe, qe];
            }, Zn.black = new Zn(0, 0, 0, 1), Zn.white = new Zn(1, 1, 1, 1), Zn.transparent = new Zn(0, 0, 0, 0), Zn.red = new Zn(1, 0, 0, 1);
            var lr = function(N, W, le) {
              this.sensitivity = N ? W ? "variant" : "case" : W ? "accent" : "base", this.locale = le, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
            };
            lr.prototype.compare = function(N, W) {
              return this.collator.compare(N, W);
            }, lr.prototype.resolvedLocale = function() {
              return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
            };
            var cr = function(N, W, le, ke, qe) {
              this.text = N, this.image = W, this.scale = le, this.fontStack = ke, this.textColor = qe;
            }, zr = function(N) {
              this.sections = N;
            };
            zr.fromString = function(N) {
              return new zr([new cr(N, null, null, null, null)]);
            }, zr.prototype.isEmpty = function() {
              return this.sections.length === 0 || !this.sections.some(function(N) {
                return N.text.length !== 0 || N.image && N.image.name.length !== 0;
              });
            }, zr.factory = function(N) {
              return N instanceof zr ? N : zr.fromString(N);
            }, zr.prototype.toString = function() {
              return this.sections.length === 0 ? "" : this.sections.map(function(N) {
                return N.text;
              }).join("");
            }, zr.prototype.serialize = function() {
              for (var N = ["format"], W = 0, le = this.sections; W < le.length; W += 1) {
                var ke = le[W];
                if (ke.image) N.push(["image", ke.image.name]);
                else {
                  N.push(ke.text);
                  var qe = {};
                  ke.fontStack && (qe["text-font"] = ["literal", ke.fontStack.split(",")]), ke.scale && (qe["font-scale"] = ke.scale), ke.textColor && (qe["text-color"] = ["rgba"].concat(ke.textColor.toArray())), N.push(qe);
                }
              }
              return N;
            };
            var Wr = function(N) {
              this.name = N.name, this.available = N.available;
            };
            function mr(N, W, le, ke) {
              return typeof N == "number" && N >= 0 && N <= 255 && typeof W == "number" && W >= 0 && W <= 255 && typeof le == "number" && le >= 0 && le <= 255 ? ke === void 0 || typeof ke == "number" && ke >= 0 && ke <= 1 ? null : "Invalid rgba value [" + [N, W, le, ke].join(", ") + "]: 'a' must be between 0 and 1." : "Invalid rgba value [" + (typeof ke == "number" ? [N, W, le, ke] : [N, W, le]).join(", ") + "]: 'r', 'g', and 'b' must be between 0 and 255.";
            }
            function Ir(N) {
              if (N === null || typeof N == "string" || typeof N == "boolean" || typeof N == "number" || N instanceof Zn || N instanceof lr || N instanceof zr || N instanceof Wr) return !0;
              if (Array.isArray(N)) {
                for (var W = 0, le = N; W < le.length; W += 1) if (!Ir(le[W])) return !1;
                return !0;
              }
              if (typeof N == "object") {
                for (var ke in N) if (!Ir(N[ke])) return !1;
                return !0;
              }
              return !1;
            }
            function yr(N) {
              if (N === null) return Yt;
              if (typeof N == "string") return sn;
              if (typeof N == "boolean") return fn;
              if (typeof N == "number") return Ht;
              if (N instanceof Zn) return In;
              if (N instanceof lr) return gn;
              if (N instanceof zr) return Mn;
              if (N instanceof Wr) return Xn;
              if (Array.isArray(N)) {
                for (var W, le = N.length, ke = 0, qe = N; ke < qe.length; ke += 1) {
                  var et = yr(qe[ke]);
                  if (W) {
                    if (W === et) continue;
                    W = Cn;
                    break;
                  }
                  W = et;
                }
                return Pn(W || Cn, le);
              }
              return zn;
            }
            function Vr(N) {
              var W = typeof N;
              return N === null ? "" : W === "string" || W === "number" || W === "boolean" ? String(N) : N instanceof Zn || N instanceof zr || N instanceof Wr ? N.toString() : JSON.stringify(N);
            }
            Wr.prototype.toString = function() {
              return this.name;
            }, Wr.fromString = function(N) {
              return N ? new Wr({ name: N, available: !1 }) : null;
            }, Wr.prototype.serialize = function() {
              return ["image", this.name];
            };
            var rn = function(N, W) {
              this.type = N, this.value = W;
            };
            rn.parse = function(N, W) {
              if (N.length !== 2) return W.error("'literal' expression requires exactly one argument, but found " + (N.length - 1) + " instead.");
              if (!Ir(N[1])) return W.error("invalid value");
              var le = N[1], ke = yr(le), qe = W.expectedType;
              return ke.kind !== "array" || ke.N !== 0 || !qe || qe.kind !== "array" || typeof qe.N == "number" && qe.N !== 0 || (ke = qe), new rn(ke, le);
            }, rn.prototype.evaluate = function() {
              return this.value;
            }, rn.prototype.eachChild = function() {
            }, rn.prototype.outputDefined = function() {
              return !0;
            }, rn.prototype.serialize = function() {
              return this.type.kind === "array" || this.type.kind === "object" ? ["literal", this.value] : this.value instanceof Zn ? ["rgba"].concat(this.value.toArray()) : this.value instanceof zr ? this.value.serialize() : this.value;
            };
            var Tn = function(N) {
              this.name = "ExpressionEvaluationError", this.message = N;
            };
            Tn.prototype.toJSON = function() {
              return this.message;
            };
            var sr = { string: sn, number: Ht, boolean: fn, object: zn }, $n = function(N, W) {
              this.type = N, this.args = W;
            };
            $n.parse = function(N, W) {
              if (N.length < 2) return W.error("Expected at least one argument.");
              var le, ke = 1, qe = N[0];
              if (qe === "array") {
                var et, dt;
                if (N.length > 2) {
                  var Ct = N[1];
                  if (typeof Ct != "string" || !(Ct in sr) || Ct === "object") return W.error('The item type argument of "array" must be one of string, number, boolean', 1);
                  et = sr[Ct], ke++;
                } else et = Cn;
                if (N.length > 3) {
                  if (N[2] !== null && (typeof N[2] != "number" || N[2] < 0 || N[2] !== Math.floor(N[2]))) return W.error('The length argument to "array" must be a positive integer literal', 2);
                  dt = N[2], ke++;
                }
                le = Pn(et, dt);
              } else le = sr[qe];
              for (var Ut = []; ke < N.length; ke++) {
                var tn = W.parse(N[ke], ke, Cn);
                if (!tn) return null;
                Ut.push(tn);
              }
              return new $n(le, Ut);
            }, $n.prototype.evaluate = function(N) {
              for (var W = 0; W < this.args.length; W++) {
                var le = this.args[W].evaluate(N);
                if (!_n(this.type, yr(le))) return le;
                if (W === this.args.length - 1) throw new Tn("Expected value to be of type " + wn(this.type) + ", but found " + wn(yr(le)) + " instead.");
              }
              return null;
            }, $n.prototype.eachChild = function(N) {
              this.args.forEach(N);
            }, $n.prototype.outputDefined = function() {
              return this.args.every(function(N) {
                return N.outputDefined();
              });
            }, $n.prototype.serialize = function() {
              var N = this.type, W = [N.kind];
              if (N.kind === "array") {
                var le = N.itemType;
                if (le.kind === "string" || le.kind === "number" || le.kind === "boolean") {
                  W.push(le.kind);
                  var ke = N.N;
                  (typeof ke == "number" || this.args.length > 1) && W.push(ke);
                }
              }
              return W.concat(this.args.map(function(qe) {
                return qe.serialize();
              }));
            };
            var ur = function(N) {
              this.type = Mn, this.sections = N;
            };
            ur.parse = function(N, W) {
              if (N.length < 2) return W.error("Expected at least one argument.");
              var le = N[1];
              if (!Array.isArray(le) && typeof le == "object") return W.error("First argument must be an image or text section.");
              for (var ke = [], qe = !1, et = 1; et <= N.length - 1; ++et) {
                var dt = N[et];
                if (qe && typeof dt == "object" && !Array.isArray(dt)) {
                  qe = !1;
                  var Ct = null;
                  if (dt["font-scale"] && !(Ct = W.parse(dt["font-scale"], 1, Ht))) return null;
                  var Ut = null;
                  if (dt["text-font"] && !(Ut = W.parse(dt["text-font"], 1, Pn(sn)))) return null;
                  var tn = null;
                  if (dt["text-color"] && !(tn = W.parse(dt["text-color"], 1, In))) return null;
                  var nn = ke[ke.length - 1];
                  nn.scale = Ct, nn.font = Ut, nn.textColor = tn;
                } else {
                  var cn = W.parse(N[et], 1, Cn);
                  if (!cn) return null;
                  var vn = cn.type.kind;
                  if (vn !== "string" && vn !== "value" && vn !== "null" && vn !== "resolvedImage") return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
                  qe = !0, ke.push({ content: cn, scale: null, font: null, textColor: null });
                }
              }
              return new ur(ke);
            }, ur.prototype.evaluate = function(N) {
              return new zr(this.sections.map(function(W) {
                var le = W.content.evaluate(N);
                return yr(le) === Xn ? new cr("", le, null, null, null) : new cr(Vr(le), null, W.scale ? W.scale.evaluate(N) : null, W.font ? W.font.evaluate(N).join(",") : null, W.textColor ? W.textColor.evaluate(N) : null);
              }));
            }, ur.prototype.eachChild = function(N) {
              for (var W = 0, le = this.sections; W < le.length; W += 1) {
                var ke = le[W];
                N(ke.content), ke.scale && N(ke.scale), ke.font && N(ke.font), ke.textColor && N(ke.textColor);
              }
            }, ur.prototype.outputDefined = function() {
              return !1;
            }, ur.prototype.serialize = function() {
              for (var N = ["format"], W = 0, le = this.sections; W < le.length; W += 1) {
                var ke = le[W];
                N.push(ke.content.serialize());
                var qe = {};
                ke.scale && (qe["font-scale"] = ke.scale.serialize()), ke.font && (qe["text-font"] = ke.font.serialize()), ke.textColor && (qe["text-color"] = ke.textColor.serialize()), N.push(qe);
              }
              return N;
            };
            var Tr = function(N) {
              this.type = Xn, this.input = N;
            };
            Tr.parse = function(N, W) {
              if (N.length !== 2) return W.error("Expected two arguments.");
              var le = W.parse(N[1], 1, sn);
              return le ? new Tr(le) : W.error("No image name provided.");
            }, Tr.prototype.evaluate = function(N) {
              var W = this.input.evaluate(N), le = Wr.fromString(W);
              return le && N.availableImages && (le.available = N.availableImages.indexOf(W) > -1), le;
            }, Tr.prototype.eachChild = function(N) {
              N(this.input);
            }, Tr.prototype.outputDefined = function() {
              return !1;
            }, Tr.prototype.serialize = function() {
              return ["image", this.input.serialize()];
            };
            var wr = { "to-boolean": fn, "to-color": In, "to-number": Ht, "to-string": sn }, Fr = function(N, W) {
              this.type = N, this.args = W;
            };
            Fr.parse = function(N, W) {
              if (N.length < 2) return W.error("Expected at least one argument.");
              var le = N[0];
              if ((le === "to-boolean" || le === "to-string") && N.length !== 2) return W.error("Expected one argument.");
              for (var ke = wr[le], qe = [], et = 1; et < N.length; et++) {
                var dt = W.parse(N[et], et, Cn);
                if (!dt) return null;
                qe.push(dt);
              }
              return new Fr(ke, qe);
            }, Fr.prototype.evaluate = function(N) {
              if (this.type.kind === "boolean") return !!this.args[0].evaluate(N);
              if (this.type.kind === "color") {
                for (var W, le, ke = 0, qe = this.args; ke < qe.length; ke += 1) {
                  if (le = null, (W = qe[ke].evaluate(N)) instanceof Zn) return W;
                  if (typeof W == "string") {
                    var et = N.parseColor(W);
                    if (et) return et;
                  } else if (Array.isArray(W) && !(le = W.length < 3 || W.length > 4 ? "Invalid rbga value " + JSON.stringify(W) + ": expected an array containing either three or four numeric values." : mr(W[0], W[1], W[2], W[3]))) return new Zn(W[0] / 255, W[1] / 255, W[2] / 255, W[3]);
                }
                throw new Tn(le || "Could not parse color from value '" + (typeof W == "string" ? W : String(JSON.stringify(W))) + "'");
              }
              if (this.type.kind === "number") {
                for (var dt = null, Ct = 0, Ut = this.args; Ct < Ut.length; Ct += 1) {
                  if ((dt = Ut[Ct].evaluate(N)) === null) return 0;
                  var tn = Number(dt);
                  if (!isNaN(tn)) return tn;
                }
                throw new Tn("Could not convert " + JSON.stringify(dt) + " to number.");
              }
              return this.type.kind === "formatted" ? zr.fromString(Vr(this.args[0].evaluate(N))) : this.type.kind === "resolvedImage" ? Wr.fromString(Vr(this.args[0].evaluate(N))) : Vr(this.args[0].evaluate(N));
            }, Fr.prototype.eachChild = function(N) {
              this.args.forEach(N);
            }, Fr.prototype.outputDefined = function() {
              return this.args.every(function(N) {
                return N.outputDefined();
              });
            }, Fr.prototype.serialize = function() {
              if (this.type.kind === "formatted") return new ur([{ content: this.args[0], scale: null, font: null, textColor: null }]).serialize();
              if (this.type.kind === "resolvedImage") return new Tr(this.args[0]).serialize();
              var N = ["to-" + this.type.kind];
              return this.eachChild(function(W) {
                N.push(W.serialize());
              }), N;
            };
            var Xr = ["Unknown", "Point", "LineString", "Polygon"], un = function() {
              this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
            };
            un.prototype.id = function() {
              return this.feature && "id" in this.feature ? this.feature.id : null;
            }, un.prototype.geometryType = function() {
              return this.feature ? typeof this.feature.type == "number" ? Xr[this.feature.type] : this.feature.type : null;
            }, un.prototype.geometry = function() {
              return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
            }, un.prototype.canonicalID = function() {
              return this.canonical;
            }, un.prototype.properties = function() {
              return this.feature && this.feature.properties || {};
            }, un.prototype.parseColor = function(N) {
              var W = this._parseColorCache[N];
              return W || (W = this._parseColorCache[N] = Zn.parse(N)), W;
            };
            var Gn = function(N, W, le, ke) {
              this.name = N, this.type = W, this._evaluate = le, this.args = ke;
            };
            Gn.prototype.evaluate = function(N) {
              return this._evaluate(N, this.args);
            }, Gn.prototype.eachChild = function(N) {
              this.args.forEach(N);
            }, Gn.prototype.outputDefined = function() {
              return !1;
            }, Gn.prototype.serialize = function() {
              return [this.name].concat(this.args.map(function(N) {
                return N.serialize();
              }));
            }, Gn.parse = function(N, W) {
              var le, ke = N[0], qe = Gn.definitions[ke];
              if (!qe) return W.error('Unknown expression "' + ke + '". If you wanted a literal array, use ["literal", [...]].', 0);
              for (var et = Array.isArray(qe) ? qe[0] : qe.type, dt = Array.isArray(qe) ? [[qe[1], qe[2]]] : qe.overloads, Ct = dt.filter(function(ta) {
                var zi = ta[0];
                return !Array.isArray(zi) || zi.length === N.length - 1;
              }), Ut = null, tn = 0, nn = Ct; tn < nn.length; tn += 1) {
                var cn = nn[tn], vn = cn[0], mn = cn[1];
                Ut = new Zr(W.registry, W.path, null, W.scope);
                for (var On = [], Bn = !1, ar = 1; ar < N.length; ar++) {
                  var tr = N[ar], xr = Array.isArray(vn) ? vn[ar - 1] : vn.type, _r = Ut.parse(tr, 1 + On.length, xr);
                  if (!_r) {
                    Bn = !0;
                    break;
                  }
                  On.push(_r);
                }
                if (!Bn) if (Array.isArray(vn) && vn.length !== On.length) Ut.error("Expected " + vn.length + " arguments, but found " + On.length + " instead.");
                else {
                  for (var Lr = 0; Lr < On.length; Lr++) {
                    var Ur = Array.isArray(vn) ? vn[Lr] : vn.type, $r = On[Lr];
                    Ut.concat(Lr + 1).checkSubtype(Ur, $r.type);
                  }
                  if (Ut.errors.length === 0) return new Gn(ke, et, mn, On);
                }
              }
              if (Ct.length === 1) (le = W.errors).push.apply(le, Ut.errors);
              else {
                for (var ai = (Ct.length ? Ct : dt).map(function(ta) {
                  return zi = ta[0], Array.isArray(zi) ? "(" + zi.map(wn).join(", ") + ")" : "(" + wn(zi.type) + "...)";
                  var zi;
                }).join(" | "), Hr = [], hi = 1; hi < N.length; hi++) {
                  var Ti = W.parse(N[hi], 1 + Hr.length);
                  if (!Ti) return null;
                  Hr.push(wn(Ti.type));
                }
                W.error("Expected arguments of type " + ai + ", but found (" + Hr.join(", ") + ") instead.");
              }
              return null;
            }, Gn.register = function(N, W) {
              for (var le in Gn.definitions = W, W) N[le] = Gn;
            };
            var on = function(N, W, le) {
              this.type = gn, this.locale = le, this.caseSensitive = N, this.diacriticSensitive = W;
            };
            on.parse = function(N, W) {
              if (N.length !== 2) return W.error("Expected one argument.");
              var le = N[1];
              if (typeof le != "object" || Array.isArray(le)) return W.error("Collator options argument must be an object.");
              var ke = W.parse(le["case-sensitive"] !== void 0 && le["case-sensitive"], 1, fn);
              if (!ke) return null;
              var qe = W.parse(le["diacritic-sensitive"] !== void 0 && le["diacritic-sensitive"], 1, fn);
              if (!qe) return null;
              var et = null;
              return le.locale && !(et = W.parse(le.locale, 1, sn)) ? null : new on(ke, qe, et);
            }, on.prototype.evaluate = function(N) {
              return new lr(this.caseSensitive.evaluate(N), this.diacriticSensitive.evaluate(N), this.locale ? this.locale.evaluate(N) : null);
            }, on.prototype.eachChild = function(N) {
              N(this.caseSensitive), N(this.diacriticSensitive), this.locale && N(this.locale);
            }, on.prototype.outputDefined = function() {
              return !1;
            }, on.prototype.serialize = function() {
              var N = {};
              return N["case-sensitive"] = this.caseSensitive.serialize(), N["diacritic-sensitive"] = this.diacriticSensitive.serialize(), this.locale && (N.locale = this.locale.serialize()), ["collator", N];
            };
            var ln = 8192;
            function bn(N, W) {
              N[0] = Math.min(N[0], W[0]), N[1] = Math.min(N[1], W[1]), N[2] = Math.max(N[2], W[0]), N[3] = Math.max(N[3], W[1]);
            }
            function Nn(N, W) {
              return !(N[0] <= W[0] || N[2] >= W[2] || N[1] <= W[1] || N[3] >= W[3]);
            }
            function jn(N, W) {
              var le, ke = (180 + N[0]) / 360, qe = (le = N[1], (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + le * Math.PI / 360))) / 360), et = Math.pow(2, W.z);
              return [Math.round(ke * et * ln), Math.round(qe * et * ln)];
            }
            function Jn(N, W, le) {
              return W[1] > N[1] != le[1] > N[1] && N[0] < (le[0] - W[0]) * (N[1] - W[1]) / (le[1] - W[1]) + W[0];
            }
            function Hn(N, W) {
              for (var le = !1, ke = 0, qe = W.length; ke < qe; ke++) for (var et = W[ke], dt = 0, Ct = et.length; dt < Ct - 1; dt++) {
                if (Ut = N, tn = et[dt], nn = et[dt + 1], cn = void 0, vn = void 0, mn = void 0, On = void 0, cn = Ut[0] - tn[0], vn = Ut[1] - tn[1], mn = Ut[0] - nn[0], On = Ut[1] - nn[1], cn * On - mn * vn == 0 && cn * mn <= 0 && vn * On <= 0) return !1;
                Jn(N, et[dt], et[dt + 1]) && (le = !le);
              }
              var Ut, tn, nn, cn, vn, mn, On;
              return le;
            }
            function Ln(N, W) {
              for (var le = 0; le < W.length; le++) if (Hn(N, W[le])) return !0;
              return !1;
            }
            function pn(N, W, le, ke) {
              var qe = N[0] - le[0], et = N[1] - le[1], dt = W[0] - le[0], Ct = W[1] - le[1], Ut = ke[0] - le[0], tn = ke[1] - le[1], nn = qe * tn - Ut * et, cn = dt * tn - Ut * Ct;
              return nn > 0 && cn < 0 || nn < 0 && cn > 0;
            }
            function dn(N, W, le) {
              for (var ke = 0, qe = le; ke < qe.length; ke += 1) for (var et = qe[ke], dt = 0; dt < et.length - 1; ++dt) if (Ct = N, Ut = W, tn = et[dt], nn = et[dt + 1], cn = void 0, vn = void 0, mn = void 0, mn = [Ut[0] - Ct[0], Ut[1] - Ct[1]], cn = [nn[0] - tn[0], nn[1] - tn[1]], vn = mn, cn[0] * vn[1] - cn[1] * vn[0] != 0 && pn(Ct, Ut, tn, nn) && pn(tn, nn, Ct, Ut)) return !0;
              var Ct, Ut, tn, nn, cn, vn, mn;
              return !1;
            }
            function Dn(N, W) {
              for (var le = 0; le < N.length; ++le) if (!Hn(N[le], W)) return !1;
              for (var ke = 0; ke < N.length - 1; ++ke) if (dn(N[ke], N[ke + 1], W)) return !1;
              return !0;
            }
            function nr(N, W) {
              for (var le = 0; le < W.length; le++) if (Dn(N, W[le])) return !0;
              return !1;
            }
            function pr(N, W, le) {
              for (var ke = [], qe = 0; qe < N.length; qe++) {
                for (var et = [], dt = 0; dt < N[qe].length; dt++) {
                  var Ct = jn(N[qe][dt], le);
                  bn(W, Ct), et.push(Ct);
                }
                ke.push(et);
              }
              return ke;
            }
            function ir(N, W, le) {
              for (var ke = [], qe = 0; qe < N.length; qe++) {
                var et = pr(N[qe], W, le);
                ke.push(et);
              }
              return ke;
            }
            function gr(N, W, le, ke) {
              if (N[0] < le[0] || N[0] > le[2]) {
                var qe = 0.5 * ke, et = N[0] - le[0] > qe ? -ke : le[0] - N[0] > qe ? ke : 0;
                et === 0 && (et = N[0] - le[2] > qe ? -ke : le[2] - N[0] > qe ? ke : 0), N[0] += et;
              }
              bn(W, N);
            }
            function Pr(N, W, le, ke) {
              for (var qe = Math.pow(2, ke.z) * ln, et = [ke.x * ln, ke.y * ln], dt = [], Ct = 0, Ut = N; Ct < Ut.length; Ct += 1) for (var tn = 0, nn = Ut[Ct]; tn < nn.length; tn += 1) {
                var cn = nn[tn], vn = [cn.x + et[0], cn.y + et[1]];
                gr(vn, W, le, qe), dt.push(vn);
              }
              return dt;
            }
            function Cr(N, W, le, ke) {
              for (var qe = Math.pow(2, ke.z) * ln, et = [ke.x * ln, ke.y * ln], dt = [], Ct = 0, Ut = N; Ct < Ut.length; Ct += 1) {
                for (var tn = [], nn = 0, cn = Ut[Ct]; nn < cn.length; nn += 1) {
                  var vn = cn[nn], mn = [vn.x + et[0], vn.y + et[1]];
                  bn(W, mn), tn.push(mn);
                }
                dt.push(tn);
              }
              if (W[2] - W[0] <= qe / 2) {
                (xr = W)[0] = xr[1] = 1 / 0, xr[2] = xr[3] = -1 / 0;
                for (var On = 0, Bn = dt; On < Bn.length; On += 1) for (var ar = 0, tr = Bn[On]; ar < tr.length; ar += 1) gr(tr[ar], W, le, qe);
              }
              var xr;
              return dt;
            }
            var Er = function(N, W) {
              this.type = fn, this.geojson = N, this.geometries = W;
            };
            function Sr(N) {
              if (N instanceof Gn && (N.name === "get" && N.args.length === 1 || N.name === "feature-state" || N.name === "has" && N.args.length === 1 || N.name === "properties" || N.name === "geometry-type" || N.name === "id" || /^filter-/.test(N.name)) || N instanceof Er) return !1;
              var W = !0;
              return N.eachChild(function(le) {
                W && !Sr(le) && (W = !1);
              }), W;
            }
            function Dr(N) {
              if (N instanceof Gn && N.name === "feature-state") return !1;
              var W = !0;
              return N.eachChild(function(le) {
                W && !Dr(le) && (W = !1);
              }), W;
            }
            function Qn(N, W) {
              if (N instanceof Gn && W.indexOf(N.name) >= 0) return !1;
              var le = !0;
              return N.eachChild(function(ke) {
                le && !Qn(ke, W) && (le = !1);
              }), le;
            }
            Er.parse = function(N, W) {
              if (N.length !== 2) return W.error("'within' expression requires exactly one argument, but found " + (N.length - 1) + " instead.");
              if (Ir(N[1])) {
                var le = N[1];
                if (le.type === "FeatureCollection") for (var ke = 0; ke < le.features.length; ++ke) {
                  var qe = le.features[ke].geometry.type;
                  if (qe === "Polygon" || qe === "MultiPolygon") return new Er(le, le.features[ke].geometry);
                }
                else if (le.type === "Feature") {
                  var et = le.geometry.type;
                  if (et === "Polygon" || et === "MultiPolygon") return new Er(le, le.geometry);
                } else if (le.type === "Polygon" || le.type === "MultiPolygon") return new Er(le, le);
              }
              return W.error("'within' expression requires valid geojson object that contains polygon geometry type.");
            }, Er.prototype.evaluate = function(N) {
              if (N.geometry() != null && N.canonicalID() != null) {
                if (N.geometryType() === "Point") return function(W, le) {
                  var ke = [1 / 0, 1 / 0, -1 / 0, -1 / 0], qe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], et = W.canonicalID();
                  if (le.type === "Polygon") {
                    var dt = pr(le.coordinates, qe, et), Ct = Pr(W.geometry(), ke, qe, et);
                    if (!Nn(ke, qe)) return !1;
                    for (var Ut = 0, tn = Ct; Ut < tn.length; Ut += 1) if (!Hn(tn[Ut], dt)) return !1;
                  }
                  if (le.type === "MultiPolygon") {
                    var nn = ir(le.coordinates, qe, et), cn = Pr(W.geometry(), ke, qe, et);
                    if (!Nn(ke, qe)) return !1;
                    for (var vn = 0, mn = cn; vn < mn.length; vn += 1) if (!Ln(mn[vn], nn)) return !1;
                  }
                  return !0;
                }(N, this.geometries);
                if (N.geometryType() === "LineString") return function(W, le) {
                  var ke = [1 / 0, 1 / 0, -1 / 0, -1 / 0], qe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], et = W.canonicalID();
                  if (le.type === "Polygon") {
                    var dt = pr(le.coordinates, qe, et), Ct = Cr(W.geometry(), ke, qe, et);
                    if (!Nn(ke, qe)) return !1;
                    for (var Ut = 0, tn = Ct; Ut < tn.length; Ut += 1) if (!Dn(tn[Ut], dt)) return !1;
                  }
                  if (le.type === "MultiPolygon") {
                    var nn = ir(le.coordinates, qe, et), cn = Cr(W.geometry(), ke, qe, et);
                    if (!Nn(ke, qe)) return !1;
                    for (var vn = 0, mn = cn; vn < mn.length; vn += 1) if (!nr(mn[vn], nn)) return !1;
                  }
                  return !0;
                }(N, this.geometries);
              }
              return !1;
            }, Er.prototype.eachChild = function() {
            }, Er.prototype.outputDefined = function() {
              return !0;
            }, Er.prototype.serialize = function() {
              return ["within", this.geojson];
            };
            var ri = function(N, W) {
              this.type = W.type, this.name = N, this.boundExpression = W;
            };
            ri.parse = function(N, W) {
              if (N.length !== 2 || typeof N[1] != "string") return W.error("'var' expression requires exactly one string literal argument.");
              var le = N[1];
              return W.scope.has(le) ? new ri(le, W.scope.get(le)) : W.error('Unknown variable "' + le + '". Make sure "' + le + '" has been bound in an enclosing "let" expression before using it.', 1);
            }, ri.prototype.evaluate = function(N) {
              return this.boundExpression.evaluate(N);
            }, ri.prototype.eachChild = function() {
            }, ri.prototype.outputDefined = function() {
              return !1;
            }, ri.prototype.serialize = function() {
              return ["var", this.name];
            };
            var Zr = function(N, W, le, ke, qe) {
              W === void 0 && (W = []), ke === void 0 && (ke = new en()), qe === void 0 && (qe = []), this.registry = N, this.path = W, this.key = W.map(function(et) {
                return "[" + et + "]";
              }).join(""), this.scope = ke, this.errors = qe, this.expectedType = le;
            };
            function Br(N) {
              if (N instanceof ri) return Br(N.boundExpression);
              if (N instanceof Gn && N.name === "error" || N instanceof on || N instanceof Er) return !1;
              var W = N instanceof Fr || N instanceof $n, le = !0;
              return N.eachChild(function(ke) {
                le = W ? le && Br(ke) : le && ke instanceof rn;
              }), !!le && Sr(N) && Qn(N, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]);
            }
            function Yr(N, W) {
              for (var le, ke, qe = N.length - 1, et = 0, dt = qe, Ct = 0; et <= dt; ) if (le = N[Ct = Math.floor((et + dt) / 2)], ke = N[Ct + 1], le <= W) {
                if (Ct === qe || W < ke) return Ct;
                et = Ct + 1;
              } else {
                if (!(le > W)) throw new Tn("Input is not a number.");
                dt = Ct - 1;
              }
              return 0;
            }
            Zr.prototype.parse = function(N, W, le, ke, qe) {
              return qe === void 0 && (qe = {}), W ? this.concat(W, le, ke)._parse(N, qe) : this._parse(N, qe);
            }, Zr.prototype._parse = function(N, W) {
              function le(tn, nn, cn) {
                return cn === "assert" ? new $n(nn, [tn]) : cn === "coerce" ? new Fr(nn, [tn]) : tn;
              }
              if (N !== null && typeof N != "string" && typeof N != "boolean" && typeof N != "number" || (N = ["literal", N]), Array.isArray(N)) {
                if (N.length === 0) return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');
                var ke = N[0];
                if (typeof ke != "string") return this.error("Expression name must be a string, but found " + typeof ke + ' instead. If you wanted a literal array, use ["literal", [...]].', 0), null;
                var qe = this.registry[ke];
                if (qe) {
                  var et = qe.parse(N, this);
                  if (!et) return null;
                  if (this.expectedType) {
                    var dt = this.expectedType, Ct = et.type;
                    if (dt.kind !== "string" && dt.kind !== "number" && dt.kind !== "boolean" && dt.kind !== "object" && dt.kind !== "array" || Ct.kind !== "value") if (dt.kind !== "color" && dt.kind !== "formatted" && dt.kind !== "resolvedImage" || Ct.kind !== "value" && Ct.kind !== "string") {
                      if (this.checkSubtype(dt, Ct)) return null;
                    } else et = le(et, dt, W.typeAnnotation || "coerce");
                    else et = le(et, dt, W.typeAnnotation || "assert");
                  }
                  if (!(et instanceof rn) && et.type.kind !== "resolvedImage" && Br(et)) {
                    var Ut = new un();
                    try {
                      et = new rn(et.type, et.evaluate(Ut));
                    } catch (tn) {
                      return this.error(tn.message), null;
                    }
                  }
                  return et;
                }
                return this.error('Unknown expression "' + ke + '". If you wanted a literal array, use ["literal", [...]].', 0);
              }
              return N === void 0 ? this.error("'undefined' value invalid. Use null instead.") : typeof N == "object" ? this.error('Bare objects invalid. Use ["literal", {...}] instead.') : this.error("Expected an array, but found " + typeof N + " instead.");
            }, Zr.prototype.concat = function(N, W, le) {
              var ke = typeof N == "number" ? this.path.concat(N) : this.path, qe = le ? this.scope.concat(le) : this.scope;
              return new Zr(this.registry, ke, W || null, qe, this.errors);
            }, Zr.prototype.error = function(N) {
              for (var W = [], le = arguments.length - 1; le-- > 0; ) W[le] = arguments[le + 1];
              var ke = "" + this.key + W.map(function(qe) {
                return "[" + qe + "]";
              }).join("");
              this.errors.push(new qt(ke, N));
            }, Zr.prototype.checkSubtype = function(N, W) {
              var le = _n(N, W);
              return le && this.error(le), le;
            };
            var yi = function(N, W, le) {
              this.type = N, this.input = W, this.labels = [], this.outputs = [];
              for (var ke = 0, qe = le; ke < qe.length; ke += 1) {
                var et = qe[ke], dt = et[0], Ct = et[1];
                this.labels.push(dt), this.outputs.push(Ct);
              }
            };
            function si(N, W, le) {
              return N * (1 - le) + W * le;
            }
            yi.parse = function(N, W) {
              if (N.length - 1 < 4) return W.error("Expected at least 4 arguments, but found only " + (N.length - 1) + ".");
              if ((N.length - 1) % 2 != 0) return W.error("Expected an even number of arguments.");
              var le = W.parse(N[1], 1, Ht);
              if (!le) return null;
              var ke = [], qe = null;
              W.expectedType && W.expectedType.kind !== "value" && (qe = W.expectedType);
              for (var et = 1; et < N.length; et += 2) {
                var dt = et === 1 ? -1 / 0 : N[et], Ct = N[et + 1], Ut = et, tn = et + 1;
                if (typeof dt != "number") return W.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', Ut);
                if (ke.length && ke[ke.length - 1][0] >= dt) return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', Ut);
                var nn = W.parse(Ct, tn, qe);
                if (!nn) return null;
                qe = qe || nn.type, ke.push([dt, nn]);
              }
              return new yi(qe, le, ke);
            }, yi.prototype.evaluate = function(N) {
              var W = this.labels, le = this.outputs;
              if (W.length === 1) return le[0].evaluate(N);
              var ke = this.input.evaluate(N);
              if (ke <= W[0]) return le[0].evaluate(N);
              var qe = W.length;
              return ke >= W[qe - 1] ? le[qe - 1].evaluate(N) : le[Yr(W, ke)].evaluate(N);
            }, yi.prototype.eachChild = function(N) {
              N(this.input);
              for (var W = 0, le = this.outputs; W < le.length; W += 1) N(le[W]);
            }, yi.prototype.outputDefined = function() {
              return this.outputs.every(function(N) {
                return N.outputDefined();
              });
            }, yi.prototype.serialize = function() {
              for (var N = ["step", this.input.serialize()], W = 0; W < this.labels.length; W++) W > 0 && N.push(this.labels[W]), N.push(this.outputs[W].serialize());
              return N;
            };
            var Pa = Object.freeze({ __proto__: null, number: si, color: function(N, W, le) {
              return new Zn(si(N.r, W.r, le), si(N.g, W.g, le), si(N.b, W.b, le), si(N.a, W.a, le));
            }, array: function(N, W, le) {
              return N.map(function(ke, qe) {
                return si(ke, W[qe], le);
              });
            } }), Ni = 0.95047, To = 1, Ba = 1.08883, eo = 4 / 29, Ds = 6 / 29, ji = 3 * Ds * Ds, Ao = Ds * Ds * Ds, dl = Math.PI / 180, So = 180 / Math.PI;
            function Pu(N) {
              return N > Ao ? Math.pow(N, 0.3333333333333333) : N / ji + eo;
            }
            function go(N) {
              return N > Ds ? N * N * N : ji * (N - eo);
            }
            function Vi(N) {
              return 255 * (N <= 31308e-7 ? 12.92 * N : 1.055 * Math.pow(N, 0.4166666666666667) - 0.055);
            }
            function Ml(N) {
              return (N /= 255) <= 0.04045 ? N / 12.92 : Math.pow((N + 0.055) / 1.055, 2.4);
            }
            function pl(N) {
              var W = Ml(N.r), le = Ml(N.g), ke = Ml(N.b), qe = Pu((0.4124564 * W + 0.3575761 * le + 0.1804375 * ke) / Ni), et = Pu((0.2126729 * W + 0.7151522 * le + 0.072175 * ke) / To);
              return { l: 116 * et - 16, a: 500 * (qe - et), b: 200 * (et - Pu((0.0193339 * W + 0.119192 * le + 0.9503041 * ke) / Ba)), alpha: N.a };
            }
            function Zl(N) {
              var W = (N.l + 16) / 116, le = isNaN(N.a) ? W : W + N.a / 500, ke = isNaN(N.b) ? W : W - N.b / 200;
              return W = To * go(W), le = Ni * go(le), ke = Ba * go(ke), new Zn(Vi(3.2404542 * le - 1.5371385 * W - 0.4985314 * ke), Vi(-0.969266 * le + 1.8760108 * W + 0.041556 * ke), Vi(0.0556434 * le - 0.2040259 * W + 1.0572252 * ke), N.alpha);
            }
            function vs(N, W, le) {
              var ke = W - N;
              return N + le * (ke > 180 || ke < -180 ? ke - 360 * Math.round(ke / 360) : ke);
            }
            var Xl = { forward: pl, reverse: Zl, interpolate: function(N, W, le) {
              return { l: si(N.l, W.l, le), a: si(N.a, W.a, le), b: si(N.b, W.b, le), alpha: si(N.alpha, W.alpha, le) };
            } }, xs = { forward: function(N) {
              var W = pl(N), le = W.l, ke = W.a, qe = W.b, et = Math.atan2(qe, ke) * So;
              return { h: et < 0 ? et + 360 : et, c: Math.sqrt(ke * ke + qe * qe), l: le, alpha: N.a };
            }, reverse: function(N) {
              var W = N.h * dl, le = N.c;
              return Zl({ l: N.l, a: Math.cos(W) * le, b: Math.sin(W) * le, alpha: N.alpha });
            }, interpolate: function(N, W, le) {
              return { h: vs(N.h, W.h, le), c: si(N.c, W.c, le), l: si(N.l, W.l, le), alpha: si(N.alpha, W.alpha, le) };
            } }, ja = Object.freeze({ __proto__: null, lab: Xl, hcl: xs }), Mo = function(N, W, le, ke, qe) {
              this.type = N, this.operator = W, this.interpolation = le, this.input = ke, this.labels = [], this.outputs = [];
              for (var et = 0, dt = qe; et < dt.length; et += 1) {
                var Ct = dt[et], Ut = Ct[0], tn = Ct[1];
                this.labels.push(Ut), this.outputs.push(tn);
              }
            };
            function Kl(N, W, le, ke) {
              var qe = ke - le, et = N - le;
              return qe === 0 ? 0 : W === 1 ? et / qe : (Math.pow(W, et) - 1) / (Math.pow(W, qe) - 1);
            }
            Mo.interpolationFactor = function(N, W, le, ke) {
              var qe = 0;
              if (N.name === "exponential") qe = Kl(W, N.base, le, ke);
              else if (N.name === "linear") qe = Kl(W, 1, le, ke);
              else if (N.name === "cubic-bezier") {
                var et = N.controlPoints;
                qe = new _(et[0], et[1], et[2], et[3]).solve(Kl(W, 1, le, ke));
              }
              return qe;
            }, Mo.parse = function(N, W) {
              var le = N[0], ke = N[1], qe = N[2], et = N.slice(3);
              if (!Array.isArray(ke) || ke.length === 0) return W.error("Expected an interpolation type expression.", 1);
              if (ke[0] === "linear") ke = { name: "linear" };
              else if (ke[0] === "exponential") {
                var dt = ke[1];
                if (typeof dt != "number") return W.error("Exponential interpolation requires a numeric base.", 1, 1);
                ke = { name: "exponential", base: dt };
              } else {
                if (ke[0] !== "cubic-bezier") return W.error("Unknown interpolation type " + String(ke[0]), 1, 0);
                var Ct = ke.slice(1);
                if (Ct.length !== 4 || Ct.some(function(ar) {
                  return typeof ar != "number" || ar < 0 || ar > 1;
                })) return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1);
                ke = { name: "cubic-bezier", controlPoints: Ct };
              }
              if (N.length - 1 < 4) return W.error("Expected at least 4 arguments, but found only " + (N.length - 1) + ".");
              if ((N.length - 1) % 2 != 0) return W.error("Expected an even number of arguments.");
              if (!(qe = W.parse(qe, 2, Ht))) return null;
              var Ut = [], tn = null;
              le === "interpolate-hcl" || le === "interpolate-lab" ? tn = In : W.expectedType && W.expectedType.kind !== "value" && (tn = W.expectedType);
              for (var nn = 0; nn < et.length; nn += 2) {
                var cn = et[nn], vn = et[nn + 1], mn = nn + 3, On = nn + 4;
                if (typeof cn != "number") return W.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', mn);
                if (Ut.length && Ut[Ut.length - 1][0] >= cn) return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', mn);
                var Bn = W.parse(vn, On, tn);
                if (!Bn) return null;
                tn = tn || Bn.type, Ut.push([cn, Bn]);
              }
              return tn.kind === "number" || tn.kind === "color" || tn.kind === "array" && tn.itemType.kind === "number" && typeof tn.N == "number" ? new Mo(tn, le, ke, qe, Ut) : W.error("Type " + wn(tn) + " is not interpolatable.");
            }, Mo.prototype.evaluate = function(N) {
              var W = this.labels, le = this.outputs;
              if (W.length === 1) return le[0].evaluate(N);
              var ke = this.input.evaluate(N);
              if (ke <= W[0]) return le[0].evaluate(N);
              var qe = W.length;
              if (ke >= W[qe - 1]) return le[qe - 1].evaluate(N);
              var et = Yr(W, ke), dt = W[et], Ct = W[et + 1], Ut = Mo.interpolationFactor(this.interpolation, ke, dt, Ct), tn = le[et].evaluate(N), nn = le[et + 1].evaluate(N);
              return this.operator === "interpolate" ? Pa[this.type.kind.toLowerCase()](tn, nn, Ut) : this.operator === "interpolate-hcl" ? xs.reverse(xs.interpolate(xs.forward(tn), xs.forward(nn), Ut)) : Xl.reverse(Xl.interpolate(Xl.forward(tn), Xl.forward(nn), Ut));
            }, Mo.prototype.eachChild = function(N) {
              N(this.input);
              for (var W = 0, le = this.outputs; W < le.length; W += 1) N(le[W]);
            }, Mo.prototype.outputDefined = function() {
              return this.outputs.every(function(N) {
                return N.outputDefined();
              });
            }, Mo.prototype.serialize = function() {
              var N;
              N = this.interpolation.name === "linear" ? ["linear"] : this.interpolation.name === "exponential" ? this.interpolation.base === 1 ? ["linear"] : ["exponential", this.interpolation.base] : ["cubic-bezier"].concat(this.interpolation.controlPoints);
              for (var W = [this.operator, N, this.input.serialize()], le = 0; le < this.labels.length; le++) W.push(this.labels[le], this.outputs[le].serialize());
              return W;
            };
            var Xs = function(N, W) {
              this.type = N, this.args = W;
            };
            Xs.parse = function(N, W) {
              if (N.length < 2) return W.error("Expectected at least one argument.");
              var le = null, ke = W.expectedType;
              ke && ke.kind !== "value" && (le = ke);
              for (var qe = [], et = 0, dt = N.slice(1); et < dt.length; et += 1) {
                var Ct = dt[et], Ut = W.parse(Ct, 1 + qe.length, le, void 0, { typeAnnotation: "omit" });
                if (!Ut) return null;
                le = le || Ut.type, qe.push(Ut);
              }
              var tn = ke && qe.some(function(nn) {
                return _n(ke, nn.type);
              });
              return new Xs(tn ? Cn : le, qe);
            }, Xs.prototype.evaluate = function(N) {
              for (var W, le = null, ke = 0, qe = 0, et = this.args; qe < et.length && (ke++, (le = et[qe].evaluate(N)) && le instanceof Wr && !le.available && (W || (W = le.name), le = null, ke === this.args.length && (le = W)), le === null); qe += 1) ;
              return le;
            }, Xs.prototype.eachChild = function(N) {
              this.args.forEach(N);
            }, Xs.prototype.outputDefined = function() {
              return this.args.every(function(N) {
                return N.outputDefined();
              });
            }, Xs.prototype.serialize = function() {
              var N = ["coalesce"];
              return this.eachChild(function(W) {
                N.push(W.serialize());
              }), N;
            };
            var El = function(N, W) {
              this.type = W.type, this.bindings = [].concat(N), this.result = W;
            };
            El.prototype.evaluate = function(N) {
              return this.result.evaluate(N);
            }, El.prototype.eachChild = function(N) {
              for (var W = 0, le = this.bindings; W < le.length; W += 1) N(le[W][1]);
              N(this.result);
            }, El.parse = function(N, W) {
              if (N.length < 4) return W.error("Expected at least 3 arguments, but found " + (N.length - 1) + " instead.");
              for (var le = [], ke = 1; ke < N.length - 1; ke += 2) {
                var qe = N[ke];
                if (typeof qe != "string") return W.error("Expected string, but found " + typeof qe + " instead.", ke);
                if (/[^a-zA-Z0-9_]/.test(qe)) return W.error("Variable names must contain only alphanumeric characters or '_'.", ke);
                var et = W.parse(N[ke + 1], ke + 1);
                if (!et) return null;
                le.push([qe, et]);
              }
              var dt = W.parse(N[N.length - 1], N.length - 1, W.expectedType, le);
              return dt ? new El(le, dt) : null;
            }, El.prototype.outputDefined = function() {
              return this.result.outputDefined();
            }, El.prototype.serialize = function() {
              for (var N = ["let"], W = 0, le = this.bindings; W < le.length; W += 1) {
                var ke = le[W], qe = ke[0], et = ke[1];
                N.push(qe, et.serialize());
              }
              return N.push(this.result.serialize()), N;
            };
            var Jl = function(N, W, le) {
              this.type = N, this.index = W, this.input = le;
            };
            Jl.parse = function(N, W) {
              if (N.length !== 3) return W.error("Expected 2 arguments, but found " + (N.length - 1) + " instead.");
              var le = W.parse(N[1], 1, Ht), ke = W.parse(N[2], 2, Pn(W.expectedType || Cn));
              if (!le || !ke) return null;
              var qe = ke.type;
              return new Jl(qe.itemType, le, ke);
            }, Jl.prototype.evaluate = function(N) {
              var W = this.index.evaluate(N), le = this.input.evaluate(N);
              if (W < 0) throw new Tn("Array index out of bounds: " + W + " < 0.");
              if (W >= le.length) throw new Tn("Array index out of bounds: " + W + " > " + (le.length - 1) + ".");
              if (W !== Math.floor(W)) throw new Tn("Array index must be an integer, but found " + W + " instead.");
              return le[W];
            }, Jl.prototype.eachChild = function(N) {
              N(this.index), N(this.input);
            }, Jl.prototype.outputDefined = function() {
              return !1;
            }, Jl.prototype.serialize = function() {
              return ["at", this.index.serialize(), this.input.serialize()];
            };
            var ml = function(N, W) {
              this.type = fn, this.needle = N, this.haystack = W;
            };
            ml.parse = function(N, W) {
              if (N.length !== 3) return W.error("Expected 2 arguments, but found " + (N.length - 1) + " instead.");
              var le = W.parse(N[1], 1, Cn), ke = W.parse(N[2], 2, Cn);
              return le && ke ? En(le.type, [fn, sn, Ht, Yt, Cn]) ? new ml(le, ke) : W.error("Expected first argument to be of type boolean, string, number or null, but found " + wn(le.type) + " instead") : null;
            }, ml.prototype.evaluate = function(N) {
              var W = this.needle.evaluate(N), le = this.haystack.evaluate(N);
              if (!le) return !1;
              if (!Kn(W, ["boolean", "string", "number", "null"])) throw new Tn("Expected first argument to be of type boolean, string, number or null, but found " + wn(yr(W)) + " instead.");
              if (!Kn(le, ["string", "array"])) throw new Tn("Expected second argument to be of type array or string, but found " + wn(yr(le)) + " instead.");
              return le.indexOf(W) >= 0;
            }, ml.prototype.eachChild = function(N) {
              N(this.needle), N(this.haystack);
            }, ml.prototype.outputDefined = function() {
              return !0;
            }, ml.prototype.serialize = function() {
              return ["in", this.needle.serialize(), this.haystack.serialize()];
            };
            var mu = function(N, W, le) {
              this.type = Ht, this.needle = N, this.haystack = W, this.fromIndex = le;
            };
            mu.parse = function(N, W) {
              if (N.length <= 2 || N.length >= 5) return W.error("Expected 3 or 4 arguments, but found " + (N.length - 1) + " instead.");
              var le = W.parse(N[1], 1, Cn), ke = W.parse(N[2], 2, Cn);
              if (!le || !ke) return null;
              if (!En(le.type, [fn, sn, Ht, Yt, Cn])) return W.error("Expected first argument to be of type boolean, string, number or null, but found " + wn(le.type) + " instead");
              if (N.length === 4) {
                var qe = W.parse(N[3], 3, Ht);
                return qe ? new mu(le, ke, qe) : null;
              }
              return new mu(le, ke);
            }, mu.prototype.evaluate = function(N) {
              var W = this.needle.evaluate(N), le = this.haystack.evaluate(N);
              if (!Kn(W, ["boolean", "string", "number", "null"])) throw new Tn("Expected first argument to be of type boolean, string, number or null, but found " + wn(yr(W)) + " instead.");
              if (!Kn(le, ["string", "array"])) throw new Tn("Expected second argument to be of type array or string, but found " + wn(yr(le)) + " instead.");
              if (this.fromIndex) {
                var ke = this.fromIndex.evaluate(N);
                return le.indexOf(W, ke);
              }
              return le.indexOf(W);
            }, mu.prototype.eachChild = function(N) {
              N(this.needle), N(this.haystack), this.fromIndex && N(this.fromIndex);
            }, mu.prototype.outputDefined = function() {
              return !1;
            }, mu.prototype.serialize = function() {
              if (this.fromIndex != null && this.fromIndex !== void 0) {
                var N = this.fromIndex.serialize();
                return ["index-of", this.needle.serialize(), this.haystack.serialize(), N];
              }
              return ["index-of", this.needle.serialize(), this.haystack.serialize()];
            };
            var gu = function(N, W, le, ke, qe, et) {
              this.inputType = N, this.type = W, this.input = le, this.cases = ke, this.outputs = qe, this.otherwise = et;
            };
            gu.parse = function(N, W) {
              if (N.length < 5) return W.error("Expected at least 4 arguments, but found only " + (N.length - 1) + ".");
              if (N.length % 2 != 1) return W.error("Expected an even number of arguments.");
              var le, ke;
              W.expectedType && W.expectedType.kind !== "value" && (ke = W.expectedType);
              for (var qe = {}, et = [], dt = 2; dt < N.length - 1; dt += 2) {
                var Ct = N[dt], Ut = N[dt + 1];
                Array.isArray(Ct) || (Ct = [Ct]);
                var tn = W.concat(dt);
                if (Ct.length === 0) return tn.error("Expected at least one branch label.");
                for (var nn = 0, cn = Ct; nn < cn.length; nn += 1) {
                  var vn = cn[nn];
                  if (typeof vn != "number" && typeof vn != "string") return tn.error("Branch labels must be numbers or strings.");
                  if (typeof vn == "number" && Math.abs(vn) > Number.MAX_SAFE_INTEGER) return tn.error("Branch labels must be integers no larger than " + Number.MAX_SAFE_INTEGER + ".");
                  if (typeof vn == "number" && Math.floor(vn) !== vn) return tn.error("Numeric branch labels must be integer values.");
                  if (le) {
                    if (tn.checkSubtype(le, yr(vn))) return null;
                  } else le = yr(vn);
                  if (qe[String(vn)] !== void 0) return tn.error("Branch labels must be unique.");
                  qe[String(vn)] = et.length;
                }
                var mn = W.parse(Ut, dt, ke);
                if (!mn) return null;
                ke = ke || mn.type, et.push(mn);
              }
              var On = W.parse(N[1], 1, Cn);
              if (!On) return null;
              var Bn = W.parse(N[N.length - 1], N.length - 1, ke);
              return Bn ? On.type.kind !== "value" && W.concat(1).checkSubtype(le, On.type) ? null : new gu(le, ke, On, qe, et, Bn) : null;
            }, gu.prototype.evaluate = function(N) {
              var W = this.input.evaluate(N);
              return (yr(W) === this.inputType && this.outputs[this.cases[W]] || this.otherwise).evaluate(N);
            }, gu.prototype.eachChild = function(N) {
              N(this.input), this.outputs.forEach(N), N(this.otherwise);
            }, gu.prototype.outputDefined = function() {
              return this.outputs.every(function(N) {
                return N.outputDefined();
              }) && this.otherwise.outputDefined();
            }, gu.prototype.serialize = function() {
              for (var N = this, W = ["match", this.input.serialize()], le = [], ke = {}, qe = 0, et = Object.keys(this.cases).sort(); qe < et.length; qe += 1) {
                var dt = et[qe];
                (cn = ke[this.cases[dt]]) === void 0 ? (ke[this.cases[dt]] = le.length, le.push([this.cases[dt], [dt]])) : le[cn][1].push(dt);
              }
              for (var Ct = function(mn) {
                return N.inputType.kind === "number" ? Number(mn) : mn;
              }, Ut = 0, tn = le; Ut < tn.length; Ut += 1) {
                var nn = tn[Ut], cn = nn[0], vn = nn[1];
                vn.length === 1 ? W.push(Ct(vn[0])) : W.push(vn.map(Ct)), W.push(this.outputs[outputIndex$1].serialize());
              }
              return W.push(this.otherwise.serialize()), W;
            };
            var Ql = function(N, W, le) {
              this.type = N, this.branches = W, this.otherwise = le;
            };
            Ql.parse = function(N, W) {
              if (N.length < 4) return W.error("Expected at least 3 arguments, but found only " + (N.length - 1) + ".");
              if (N.length % 2 != 0) return W.error("Expected an odd number of arguments.");
              var le;
              W.expectedType && W.expectedType.kind !== "value" && (le = W.expectedType);
              for (var ke = [], qe = 1; qe < N.length - 1; qe += 2) {
                var et = W.parse(N[qe], qe, fn);
                if (!et) return null;
                var dt = W.parse(N[qe + 1], qe + 1, le);
                if (!dt) return null;
                ke.push([et, dt]), le = le || dt.type;
              }
              var Ct = W.parse(N[N.length - 1], N.length - 1, le);
              return Ct ? new Ql(le, ke, Ct) : null;
            }, Ql.prototype.evaluate = function(N) {
              for (var W = 0, le = this.branches; W < le.length; W += 1) {
                var ke = le[W], qe = ke[0], et = ke[1];
                if (qe.evaluate(N)) return et.evaluate(N);
              }
              return this.otherwise.evaluate(N);
            }, Ql.prototype.eachChild = function(N) {
              for (var W = 0, le = this.branches; W < le.length; W += 1) {
                var ke = le[W], qe = ke[0], et = ke[1];
                N(qe), N(et);
              }
              N(this.otherwise);
            }, Ql.prototype.outputDefined = function() {
              return this.branches.every(function(N) {
                return N[0], N[1].outputDefined();
              }) && this.otherwise.outputDefined();
            }, Ql.prototype.serialize = function() {
              var N = ["case"];
              return this.eachChild(function(W) {
                N.push(W.serialize());
              }), N;
            };
            var Wo = function(N, W, le, ke) {
              this.type = N, this.input = W, this.beginIndex = le, this.endIndex = ke;
            };
            function Mc(N, W) {
              return N === "==" || N === "!=" ? W.kind === "boolean" || W.kind === "string" || W.kind === "number" || W.kind === "null" || W.kind === "value" : W.kind === "string" || W.kind === "number" || W.kind === "value";
            }
            function Xu(N, W, le, ke) {
              return ke.compare(W, le) === 0;
            }
            function yu(N, W, le) {
              var ke = N !== "==" && N !== "!=";
              return function() {
                function qe(et, dt, Ct) {
                  this.type = fn, this.lhs = et, this.rhs = dt, this.collator = Ct, this.hasUntypedArgument = et.type.kind === "value" || dt.type.kind === "value";
                }
                return qe.parse = function(et, dt) {
                  if (et.length !== 3 && et.length !== 4) return dt.error("Expected two or three arguments.");
                  var Ct = et[0], Ut = dt.parse(et[1], 1, Cn);
                  if (!Ut) return null;
                  if (!Mc(Ct, Ut.type)) return dt.concat(1).error('"' + Ct + `" comparisons are not supported for type '` + wn(Ut.type) + "'.");
                  var tn = dt.parse(et[2], 2, Cn);
                  if (!tn) return null;
                  if (!Mc(Ct, tn.type)) return dt.concat(2).error('"' + Ct + `" comparisons are not supported for type '` + wn(tn.type) + "'.");
                  if (Ut.type.kind !== tn.type.kind && Ut.type.kind !== "value" && tn.type.kind !== "value") return dt.error("Cannot compare types '" + wn(Ut.type) + "' and '" + wn(tn.type) + "'.");
                  ke && (Ut.type.kind === "value" && tn.type.kind !== "value" ? Ut = new $n(tn.type, [Ut]) : Ut.type.kind !== "value" && tn.type.kind === "value" && (tn = new $n(Ut.type, [tn])));
                  var nn = null;
                  if (et.length === 4) {
                    if (Ut.type.kind !== "string" && tn.type.kind !== "string" && Ut.type.kind !== "value" && tn.type.kind !== "value") return dt.error("Cannot use collator to compare non-string types.");
                    if (!(nn = dt.parse(et[3], 3, gn))) return null;
                  }
                  return new qe(Ut, tn, nn);
                }, qe.prototype.evaluate = function(et) {
                  var dt = this.lhs.evaluate(et), Ct = this.rhs.evaluate(et);
                  if (ke && this.hasUntypedArgument) {
                    var Ut = yr(dt), tn = yr(Ct);
                    if (Ut.kind !== tn.kind || Ut.kind !== "string" && Ut.kind !== "number") throw new Tn('Expected arguments for "' + N + '" to be (string, string) or (number, number), but found (' + Ut.kind + ", " + tn.kind + ") instead.");
                  }
                  if (this.collator && !ke && this.hasUntypedArgument) {
                    var nn = yr(dt), cn = yr(Ct);
                    if (nn.kind !== "string" || cn.kind !== "string") return W(et, dt, Ct);
                  }
                  return this.collator ? le(et, dt, Ct, this.collator.evaluate(et)) : W(et, dt, Ct);
                }, qe.prototype.eachChild = function(et) {
                  et(this.lhs), et(this.rhs), this.collator && et(this.collator);
                }, qe.prototype.outputDefined = function() {
                  return !0;
                }, qe.prototype.serialize = function() {
                  var et = [N];
                  return this.eachChild(function(dt) {
                    et.push(dt.serialize());
                  }), et;
                }, qe;
              }();
            }
            Wo.parse = function(N, W) {
              if (N.length <= 2 || N.length >= 5) return W.error("Expected 3 or 4 arguments, but found " + (N.length - 1) + " instead.");
              var le = W.parse(N[1], 1, Cn), ke = W.parse(N[2], 2, Ht);
              if (!le || !ke) return null;
              if (!En(le.type, [Pn(Cn), sn, Cn])) return W.error("Expected first argument to be of type array or string, but found " + wn(le.type) + " instead");
              if (N.length === 4) {
                var qe = W.parse(N[3], 3, Ht);
                return qe ? new Wo(le.type, le, ke, qe) : null;
              }
              return new Wo(le.type, le, ke);
            }, Wo.prototype.evaluate = function(N) {
              var W = this.input.evaluate(N), le = this.beginIndex.evaluate(N);
              if (!Kn(W, ["string", "array"])) throw new Tn("Expected first argument to be of type array or string, but found " + wn(yr(W)) + " instead.");
              if (this.endIndex) {
                var ke = this.endIndex.evaluate(N);
                return W.slice(le, ke);
              }
              return W.slice(le);
            }, Wo.prototype.eachChild = function(N) {
              N(this.input), N(this.beginIndex), this.endIndex && N(this.endIndex);
            }, Wo.prototype.outputDefined = function() {
              return !1;
            }, Wo.prototype.serialize = function() {
              if (this.endIndex != null && this.endIndex !== void 0) {
                var N = this.endIndex.serialize();
                return ["slice", this.input.serialize(), this.beginIndex.serialize(), N];
              }
              return ["slice", this.input.serialize(), this.beginIndex.serialize()];
            };
            var ef = yu("==", function(N, W, le) {
              return W === le;
            }, Xu), tf = yu("!=", function(N, W, le) {
              return W !== le;
            }, function(N, W, le, ke) {
              return !Xu(0, W, le, ke);
            }), bs = yu("<", function(N, W, le) {
              return W < le;
            }, function(N, W, le, ke) {
              return ke.compare(W, le) < 0;
            }), Ec = yu(">", function(N, W, le) {
              return W > le;
            }, function(N, W, le, ke) {
              return ke.compare(W, le) > 0;
            }), mh = yu("<=", function(N, W, le) {
              return W <= le;
            }, function(N, W, le, ke) {
              return ke.compare(W, le) <= 0;
            }), Eo = yu(">=", function(N, W, le) {
              return W >= le;
            }, function(N, W, le, ke) {
              return ke.compare(W, le) >= 0;
            }), ac = function(N, W, le, ke, qe) {
              this.type = sn, this.number = N, this.locale = W, this.currency = le, this.minFractionDigits = ke, this.maxFractionDigits = qe;
            };
            ac.parse = function(N, W) {
              if (N.length !== 3) return W.error("Expected two arguments.");
              var le = W.parse(N[1], 1, Ht);
              if (!le) return null;
              var ke = N[2];
              if (typeof ke != "object" || Array.isArray(ke)) return W.error("NumberFormat options argument must be an object.");
              var qe = null;
              if (ke.locale && !(qe = W.parse(ke.locale, 1, sn))) return null;
              var et = null;
              if (ke.currency && !(et = W.parse(ke.currency, 1, sn))) return null;
              var dt = null;
              if (ke["min-fraction-digits"] && !(dt = W.parse(ke["min-fraction-digits"], 1, Ht))) return null;
              var Ct = null;
              return ke["max-fraction-digits"] && !(Ct = W.parse(ke["max-fraction-digits"], 1, Ht)) ? null : new ac(le, qe, et, dt, Ct);
            }, ac.prototype.evaluate = function(N) {
              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));
            }, ac.prototype.eachChild = function(N) {
              N(this.number), this.locale && N(this.locale), this.currency && N(this.currency), this.minFractionDigits && N(this.minFractionDigits), this.maxFractionDigits && N(this.maxFractionDigits);
            }, ac.prototype.outputDefined = function() {
              return !1;
            }, ac.prototype.serialize = function() {
              var N = {};
              return this.locale && (N.locale = this.locale.serialize()), this.currency && (N.currency = this.currency.serialize()), this.minFractionDigits && (N["min-fraction-digits"] = this.minFractionDigits.serialize()), this.maxFractionDigits && (N["max-fraction-digits"] = this.maxFractionDigits.serialize()), ["number-format", this.number.serialize(), N];
            };
            var Xi = function(N) {
              this.type = Ht, this.input = N;
            };
            Xi.parse = function(N, W) {
              if (N.length !== 2) return W.error("Expected 1 argument, but found " + (N.length - 1) + " instead.");
              var le = W.parse(N[1], 1);
              return le ? le.type.kind !== "array" && le.type.kind !== "string" && le.type.kind !== "value" ? W.error("Expected argument of type string or array, but found " + wn(le.type) + " instead.") : new Xi(le) : null;
            }, Xi.prototype.evaluate = function(N) {
              var W = this.input.evaluate(N);
              if (typeof W == "string" || Array.isArray(W)) return W.length;
              throw new Tn("Expected value to be of type string or array, but found " + wn(yr(W)) + " instead.");
            }, Xi.prototype.eachChild = function(N) {
              N(this.input);
            }, Xi.prototype.outputDefined = function() {
              return !1;
            }, Xi.prototype.serialize = function() {
              var N = ["length"];
              return this.eachChild(function(W) {
                N.push(W.serialize());
              }), N;
            };
            var eu = { "==": ef, "!=": tf, ">": Ec, "<": bs, ">=": Eo, "<=": mh, array: $n, at: Jl, boolean: $n, case: Ql, coalesce: Xs, collator: on, format: ur, image: Tr, in: ml, "index-of": mu, interpolate: Mo, "interpolate-hcl": Mo, "interpolate-lab": Mo, length: Xi, let: El, literal: rn, match: gu, number: $n, "number-format": ac, object: $n, slice: Wo, step: yi, string: $n, "to-boolean": Fr, "to-color": Fr, "to-number": Fr, "to-string": Fr, var: ri, within: Er };
            function Ma(N, W) {
              var le = W[0], ke = W[1], qe = W[2], et = W[3];
              le = le.evaluate(N), ke = ke.evaluate(N), qe = qe.evaluate(N);
              var dt = et ? et.evaluate(N) : 1, Ct = mr(le, ke, qe, dt);
              if (Ct) throw new Tn(Ct);
              return new Zn(le / 255 * dt, ke / 255 * dt, qe / 255 * dt, dt);
            }
            function Ea(N, W) {
              return N in W;
            }
            function Ls(N, W) {
              var le = W[N];
              return le === void 0 ? null : le;
            }
            function Bs(N) {
              return { type: N };
            }
            function oc(N) {
              return { result: "success", value: N };
            }
            function tu(N) {
              return { result: "error", value: N };
            }
            function _s(N) {
              return N["property-type"] === "data-driven" || N["property-type"] === "cross-faded-data-driven";
            }
            function Ps(N) {
              return !!N.expression && N.expression.parameters.indexOf("zoom") > -1;
            }
            function Co(N) {
              return !!N.expression && N.expression.interpolated;
            }
            function da(N) {
              return N instanceof Number ? "number" : N instanceof String ? "string" : N instanceof Boolean ? "boolean" : Array.isArray(N) ? "array" : N === null ? "null" : typeof N;
            }
            function Ou(N) {
              return typeof N == "object" && N !== null && !Array.isArray(N);
            }
            function pf(N) {
              return N;
            }
            function nu(N, W) {
              var le, ke, qe, et = W.type === "color", dt = N.stops && typeof N.stops[0][0] == "object", Ct = dt || N.property !== void 0, Ut = dt || !Ct, tn = N.type || (Co(W) ? "exponential" : "interval");
              if (et && ((N = Bt({}, N)).stops && (N.stops = N.stops.map(function(Hr) {
                return [Hr[0], Zn.parse(Hr[1])];
              })), N.default ? N.default = Zn.parse(N.default) : N.default = Zn.parse(W.default)), N.colorSpace && N.colorSpace !== "rgb" && !ja[N.colorSpace]) throw new Error("Unknown color space: " + N.colorSpace);
              if (tn === "exponential") le = lc;
              else if (tn === "interval") le = sc;
              else if (tn === "categorical") {
                le = Cc, ke = /* @__PURE__ */ Object.create(null);
                for (var nn = 0, cn = N.stops; nn < cn.length; nn += 1) {
                  var vn = cn[nn];
                  ke[vn[0]] = vn[1];
                }
                qe = typeof N.stops[0][0];
              } else {
                if (tn !== "identity") throw new Error('Unknown function type "' + tn + '"');
                le = mf;
              }
              if (dt) {
                for (var mn = {}, On = [], Bn = 0; Bn < N.stops.length; Bn++) {
                  var ar = N.stops[Bn], tr = ar[0].zoom;
                  mn[tr] === void 0 && (mn[tr] = { zoom: tr, type: N.type, property: N.property, default: N.default, stops: [] }, On.push(tr)), mn[tr].stops.push([ar[0].value, ar[1]]);
                }
                for (var xr = [], _r = 0, Lr = On; _r < Lr.length; _r += 1) {
                  var Ur = Lr[_r];
                  xr.push([mn[Ur].zoom, nu(mn[Ur], W)]);
                }
                var $r = { name: "linear" };
                return { kind: "composite", interpolationType: $r, interpolationFactor: Mo.interpolationFactor.bind(void 0, $r), zoomStops: xr.map(function(Hr) {
                  return Hr[0];
                }), evaluate: function(Hr, hi) {
                  var Ti = Hr.zoom;
                  return lc({ stops: xr, base: N.base }, W, Ti).evaluate(Ti, hi);
                } };
              }
              if (Ut) {
                var ai = tn === "exponential" ? { name: "exponential", base: N.base !== void 0 ? N.base : 1 } : null;
                return { kind: "camera", interpolationType: ai, interpolationFactor: Mo.interpolationFactor.bind(void 0, ai), zoomStops: N.stops.map(function(Hr) {
                  return Hr[0];
                }), evaluate: function(Hr) {
                  var hi = Hr.zoom;
                  return le(N, W, hi, ke, qe);
                } };
              }
              return { kind: "source", evaluate: function(Hr, hi) {
                var Ti = hi && hi.properties ? hi.properties[N.property] : void 0;
                return Ti === void 0 ? Ks(N.default, W.default) : le(N, W, Ti, ke, qe);
              } };
            }
            function Ks(N, W, le) {
              return N !== void 0 ? N : W !== void 0 ? W : le !== void 0 ? le : void 0;
            }
            function Cc(N, W, le, ke, qe) {
              return Ks(typeof le === qe ? ke[le] : void 0, N.default, W.default);
            }
            function sc(N, W, le) {
              if (da(le) !== "number") return Ks(N.default, W.default);
              var ke = N.stops.length;
              if (ke === 1 || le <= N.stops[0][0]) return N.stops[0][1];
              if (le >= N.stops[ke - 1][0]) return N.stops[ke - 1][1];
              var qe = Yr(N.stops.map(function(et) {
                return et[0];
              }), le);
              return N.stops[qe][1];
            }
            function lc(N, W, le) {
              var ke = N.base !== void 0 ? N.base : 1;
              if (da(le) !== "number") return Ks(N.default, W.default);
              var qe = N.stops.length;
              if (qe === 1 || le <= N.stops[0][0]) return N.stops[0][1];
              if (le >= N.stops[qe - 1][0]) return N.stops[qe - 1][1];
              var et = Yr(N.stops.map(function(cn) {
                return cn[0];
              }), le), dt = function(cn, vn, mn, On) {
                var Bn = On - mn, ar = cn - mn;
                return Bn === 0 ? 0 : vn === 1 ? ar / Bn : (Math.pow(vn, ar) - 1) / (Math.pow(vn, Bn) - 1);
              }(le, ke, N.stops[et][0], N.stops[et + 1][0]), Ct = N.stops[et][1], Ut = N.stops[et + 1][1], tn = Pa[W.type] || pf;
              if (N.colorSpace && N.colorSpace !== "rgb") {
                var nn = ja[N.colorSpace];
                tn = function(cn, vn) {
                  return nn.reverse(nn.interpolate(nn.forward(cn), nn.forward(vn), dt));
                };
              }
              return typeof Ct.evaluate == "function" ? { evaluate: function() {
                for (var cn = [], vn = arguments.length; vn--; ) cn[vn] = arguments[vn];
                var mn = Ct.evaluate.apply(void 0, cn), On = Ut.evaluate.apply(void 0, cn);
                if (mn !== void 0 && On !== void 0) return tn(mn, On, dt);
              } } : tn(Ct, Ut, dt);
            }
            function mf(N, W, le) {
              return W.type === "color" ? le = Zn.parse(le) : W.type === "formatted" ? le = zr.fromString(le.toString()) : W.type === "resolvedImage" ? le = Wr.fromString(le.toString()) : da(le) === W.type || W.type === "enum" && W.values[le] || (le = void 0), Ks(le, N.default, W.default);
            }
            Gn.register(eu, { error: [{ kind: "error" }, [sn], function(N, W) {
              var le = W[0];
              throw new Tn(le.evaluate(N));
            }], typeof: [sn, [Cn], function(N, W) {
              return wn(yr(W[0].evaluate(N)));
            }], "to-rgba": [Pn(Ht, 4), [In], function(N, W) {
              return W[0].evaluate(N).toArray();
            }], rgb: [In, [Ht, Ht, Ht], Ma], rgba: [In, [Ht, Ht, Ht, Ht], Ma], has: { type: fn, overloads: [[[sn], function(N, W) {
              return Ea(W[0].evaluate(N), N.properties());
            }], [[sn, zn], function(N, W) {
              var le = W[0], ke = W[1];
              return Ea(le.evaluate(N), ke.evaluate(N));
            }]] }, get: { type: Cn, overloads: [[[sn], function(N, W) {
              return Ls(W[0].evaluate(N), N.properties());
            }], [[sn, zn], function(N, W) {
              var le = W[0], ke = W[1];
              return Ls(le.evaluate(N), ke.evaluate(N));
            }]] }, "feature-state": [Cn, [sn], function(N, W) {
              return Ls(W[0].evaluate(N), N.featureState || {});
            }], properties: [zn, [], function(N) {
              return N.properties();
            }], "geometry-type": [sn, [], function(N) {
              return N.geometryType();
            }], id: [Cn, [], function(N) {
              return N.id();
            }], zoom: [Ht, [], function(N) {
              return N.globals.zoom;
            }], "heatmap-density": [Ht, [], function(N) {
              return N.globals.heatmapDensity || 0;
            }], "line-progress": [Ht, [], function(N) {
              return N.globals.lineProgress || 0;
            }], accumulated: [Cn, [], function(N) {
              return N.globals.accumulated === void 0 ? null : N.globals.accumulated;
            }], "+": [Ht, Bs(Ht), function(N, W) {
              for (var le = 0, ke = 0, qe = W; ke < qe.length; ke += 1) le += qe[ke].evaluate(N);
              return le;
            }], "*": [Ht, Bs(Ht), function(N, W) {
              for (var le = 1, ke = 0, qe = W; ke < qe.length; ke += 1) le *= qe[ke].evaluate(N);
              return le;
            }], "-": { type: Ht, overloads: [[[Ht, Ht], function(N, W) {
              var le = W[0], ke = W[1];
              return le.evaluate(N) - ke.evaluate(N);
            }], [[Ht], function(N, W) {
              return -W[0].evaluate(N);
            }]] }, "/": [Ht, [Ht, Ht], function(N, W) {
              var le = W[0], ke = W[1];
              return le.evaluate(N) / ke.evaluate(N);
            }], "%": [Ht, [Ht, Ht], function(N, W) {
              var le = W[0], ke = W[1];
              return le.evaluate(N) % ke.evaluate(N);
            }], ln2: [Ht, [], function() {
              return Math.LN2;
            }], pi: [Ht, [], function() {
              return Math.PI;
            }], e: [Ht, [], function() {
              return Math.E;
            }], "^": [Ht, [Ht, Ht], function(N, W) {
              var le = W[0], ke = W[1];
              return Math.pow(le.evaluate(N), ke.evaluate(N));
            }], sqrt: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.sqrt(le.evaluate(N));
            }], log10: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.log(le.evaluate(N)) / Math.LN10;
            }], ln: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.log(le.evaluate(N));
            }], log2: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.log(le.evaluate(N)) / Math.LN2;
            }], sin: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.sin(le.evaluate(N));
            }], cos: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.cos(le.evaluate(N));
            }], tan: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.tan(le.evaluate(N));
            }], asin: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.asin(le.evaluate(N));
            }], acos: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.acos(le.evaluate(N));
            }], atan: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.atan(le.evaluate(N));
            }], min: [Ht, Bs(Ht), function(N, W) {
              return Math.min.apply(Math, W.map(function(le) {
                return le.evaluate(N);
              }));
            }], max: [Ht, Bs(Ht), function(N, W) {
              return Math.max.apply(Math, W.map(function(le) {
                return le.evaluate(N);
              }));
            }], abs: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.abs(le.evaluate(N));
            }], round: [Ht, [Ht], function(N, W) {
              var le = W[0].evaluate(N);
              return le < 0 ? -Math.round(-le) : Math.round(le);
            }], floor: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.floor(le.evaluate(N));
            }], ceil: [Ht, [Ht], function(N, W) {
              var le = W[0];
              return Math.ceil(le.evaluate(N));
            }], "filter-==": [fn, [sn, Cn], function(N, W) {
              var le = W[0], ke = W[1];
              return N.properties()[le.value] === ke.value;
            }], "filter-id-==": [fn, [Cn], function(N, W) {
              var le = W[0];
              return N.id() === le.value;
            }], "filter-type-==": [fn, [sn], function(N, W) {
              var le = W[0];
              return N.geometryType() === le.value;
            }], "filter-<": [fn, [sn, Cn], function(N, W) {
              var le = W[0], ke = W[1], qe = N.properties()[le.value], et = ke.value;
              return typeof qe == typeof et && qe < et;
            }], "filter-id-<": [fn, [Cn], function(N, W) {
              var le = W[0], ke = N.id(), qe = le.value;
              return typeof ke == typeof qe && ke < qe;
            }], "filter->": [fn, [sn, Cn], function(N, W) {
              var le = W[0], ke = W[1], qe = N.properties()[le.value], et = ke.value;
              return typeof qe == typeof et && qe > et;
            }], "filter-id->": [fn, [Cn], function(N, W) {
              var le = W[0], ke = N.id(), qe = le.value;
              return typeof ke == typeof qe && ke > qe;
            }], "filter-<=": [fn, [sn, Cn], function(N, W) {
              var le = W[0], ke = W[1], qe = N.properties()[le.value], et = ke.value;
              return typeof qe == typeof et && qe <= et;
            }], "filter-id-<=": [fn, [Cn], function(N, W) {
              var le = W[0], ke = N.id(), qe = le.value;
              return typeof ke == typeof qe && ke <= qe;
            }], "filter->=": [fn, [sn, Cn], function(N, W) {
              var le = W[0], ke = W[1], qe = N.properties()[le.value], et = ke.value;
              return typeof qe == typeof et && qe >= et;
            }], "filter-id->=": [fn, [Cn], function(N, W) {
              var le = W[0], ke = N.id(), qe = le.value;
              return typeof ke == typeof qe && ke >= qe;
            }], "filter-has": [fn, [Cn], function(N, W) {
              return W[0].value in N.properties();
            }], "filter-has-id": [fn, [], function(N) {
              return N.id() !== null && N.id() !== void 0;
            }], "filter-type-in": [fn, [Pn(sn)], function(N, W) {
              return W[0].value.indexOf(N.geometryType()) >= 0;
            }], "filter-id-in": [fn, [Pn(Cn)], function(N, W) {
              return W[0].value.indexOf(N.id()) >= 0;
            }], "filter-in-small": [fn, [sn, Pn(Cn)], function(N, W) {
              var le = W[0];
              return W[1].value.indexOf(N.properties()[le.value]) >= 0;
            }], "filter-in-large": [fn, [sn, Pn(Cn)], function(N, W) {
              var le = W[0], ke = W[1];
              return function(qe, et, dt, Ct) {
                for (; dt <= Ct; ) {
                  var Ut = dt + Ct >> 1;
                  if (et[Ut] === qe) return !0;
                  et[Ut] > qe ? Ct = Ut - 1 : dt = Ut + 1;
                }
                return !1;
              }(N.properties()[le.value], ke.value, 0, ke.value.length - 1);
            }], all: { type: fn, overloads: [[[fn, fn], function(N, W) {
              var le = W[0], ke = W[1];
              return le.evaluate(N) && ke.evaluate(N);
            }], [Bs(fn), function(N, W) {
              for (var le = 0, ke = W; le < ke.length; le += 1) if (!ke[le].evaluate(N)) return !1;
              return !0;
            }]] }, any: { type: fn, overloads: [[[fn, fn], function(N, W) {
              var le = W[0], ke = W[1];
              return le.evaluate(N) || ke.evaluate(N);
            }], [Bs(fn), function(N, W) {
              for (var le = 0, ke = W; le < ke.length; le += 1) if (ke[le].evaluate(N)) return !0;
              return !1;
            }]] }, "!": [fn, [fn], function(N, W) {
              return !W[0].evaluate(N);
            }], "is-supported-script": [fn, [sn], function(N, W) {
              var le = W[0], ke = N.globals && N.globals.isSupportedScript;
              return !ke || ke(le.evaluate(N));
            }], upcase: [sn, [sn], function(N, W) {
              return W[0].evaluate(N).toUpperCase();
            }], downcase: [sn, [sn], function(N, W) {
              return W[0].evaluate(N).toLowerCase();
            }], concat: [sn, Bs(Cn), function(N, W) {
              return W.map(function(le) {
                return Vr(le.evaluate(N));
              }).join("");
            }], "resolved-locale": [sn, [gn], function(N, W) {
              return W[0].evaluate(N).resolvedLocale();
            }] });
            var yl = function(N, W) {
              this.expression = N, this._warningHistory = {}, this._evaluator = new un(), this._defaultValue = W ? function(le) {
                return le.type === "color" && Ou(le.default) ? new Zn(0, 0, 0, 0) : le.type === "color" ? Zn.parse(le.default) || null : le.default === void 0 ? null : le.default;
              }(W) : null, this._enumValues = W && W.type === "enum" ? W.values : null;
            };
            function vl(N) {
              return Array.isArray(N) && N.length > 0 && typeof N[0] == "string" && N[0] in eu;
            }
            function ru(N, W) {
              var le = new Zr(eu, [], W ? function(qe) {
                var et = { color: In, string: sn, number: Ht, enum: sn, boolean: fn, formatted: Mn, resolvedImage: Xn };
                return qe.type === "array" ? Pn(et[qe.value] || Cn, qe.length) : et[qe.type];
              }(W) : void 0), ke = le.parse(N, void 0, void 0, void 0, W && W.type === "string" ? { typeAnnotation: "coerce" } : void 0);
              return ke ? oc(new yl(ke, W)) : tu(le.errors);
            }
            yl.prototype.evaluateWithoutErrorHandling = function(N, W, le, ke, qe, et) {
              return this._evaluator.globals = N, this._evaluator.feature = W, this._evaluator.featureState = le, this._evaluator.canonical = ke, this._evaluator.availableImages = qe || null, this._evaluator.formattedSection = et, this.expression.evaluate(this._evaluator);
            }, yl.prototype.evaluate = function(N, W, le, ke, qe, et) {
              this._evaluator.globals = N, this._evaluator.feature = W || null, this._evaluator.featureState = le || null, this._evaluator.canonical = ke, this._evaluator.availableImages = qe || null, this._evaluator.formattedSection = et || null;
              try {
                var dt = this.expression.evaluate(this._evaluator);
                if (dt == null || typeof dt == "number" && dt != dt) return this._defaultValue;
                if (this._enumValues && !(dt in this._enumValues)) throw new Tn("Expected value to be one of " + Object.keys(this._enumValues).map(function(Ct) {
                  return JSON.stringify(Ct);
                }).join(", ") + ", but found " + JSON.stringify(dt) + " instead.");
                return dt;
              } catch (Ct) {
                return this._warningHistory[Ct.message] || (this._warningHistory[Ct.message] = !0, typeof console < "u" && console.warn(Ct.message)), this._defaultValue;
              }
            };
            var Cl = function(N, W) {
              this.kind = N, this._styleExpression = W, this.isStateDependent = N !== "constant" && !Dr(W.expression);
            };
            Cl.prototype.evaluateWithoutErrorHandling = function(N, W, le, ke, qe, et) {
              return this._styleExpression.evaluateWithoutErrorHandling(N, W, le, ke, qe, et);
            }, Cl.prototype.evaluate = function(N, W, le, ke, qe, et) {
              return this._styleExpression.evaluate(N, W, le, ke, qe, et);
            };
            var ea = function(N, W, le, ke) {
              this.kind = N, this.zoomStops = le, this._styleExpression = W, this.isStateDependent = N !== "camera" && !Dr(W.expression), this.interpolationType = ke;
            };
            function Ic(N, W) {
              if ((N = ru(N, W)).result === "error") return N;
              var le = N.value.expression, ke = Sr(le);
              if (!ke && !_s(W)) return tu([new qt("", "data expressions not supported")]);
              var qe = Qn(le, ["zoom"]);
              if (!qe && !Ps(W)) return tu([new qt("", "zoom expressions not supported")]);
              var et = zu(le);
              if (!et && !qe) return tu([new qt("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
              if (et instanceof qt) return tu([et]);
              if (et instanceof Mo && !Co(W)) return tu([new qt("", '"interpolate" expressions cannot be used with this property')]);
              if (!et) return oc(new Cl(ke ? "constant" : "source", N.value));
              var dt = et instanceof Mo ? et.interpolation : void 0;
              return oc(new ea(ke ? "camera" : "composite", N.value, et.labels, dt));
            }
            ea.prototype.evaluateWithoutErrorHandling = function(N, W, le, ke, qe, et) {
              return this._styleExpression.evaluateWithoutErrorHandling(N, W, le, ke, qe, et);
            }, ea.prototype.evaluate = function(N, W, le, ke, qe, et) {
              return this._styleExpression.evaluate(N, W, le, ke, qe, et);
            }, ea.prototype.interpolationFactor = function(N, W, le) {
              return this.interpolationType ? Mo.interpolationFactor(this.interpolationType, N, W, le) : 0;
            };
            var nf = function(N, W) {
              this._parameters = N, this._specification = W, Bt(this, nu(this._parameters, this._specification));
            };
            function zu(N) {
              var W = null;
              if (N instanceof El) W = zu(N.result);
              else if (N instanceof Xs) for (var le = 0, ke = N.args; le < ke.length; le += 1) {
                var qe = ke[le];
                if (W = zu(qe)) break;
              }
              else (N instanceof yi || N instanceof Mo) && N.input instanceof Gn && N.input.name === "zoom" && (W = N);
              return W instanceof qt || N.eachChild(function(et) {
                var dt = zu(et);
                dt instanceof qt ? W = dt : !W && dt ? W = new qt("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : W && dt && W !== dt && (W = new qt("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
              }), W;
            }
            function Yo(N) {
              var W = N.key, le = N.value, ke = N.valueSpec || {}, qe = N.objectElementValidators || {}, et = N.style, dt = N.styleSpec, Ct = [], Ut = da(le);
              if (Ut !== "object") return [new Ot(W, le, "object expected, " + Ut + " found")];
              for (var tn in le) {
                var nn = tn.split(".")[0], cn = ke[nn] || ke["*"], vn = void 0;
                if (qe[nn]) vn = qe[nn];
                else if (ke[nn]) vn = No;
                else if (qe["*"]) vn = qe["*"];
                else {
                  if (!ke["*"]) {
                    Ct.push(new Ot(W, le[tn], 'unknown property "' + tn + '"'));
                    continue;
                  }
                  vn = No;
                }
                Ct = Ct.concat(vn({ key: (W && W + ".") + tn, value: le[tn], valueSpec: cn, style: et, styleSpec: dt, object: le, objectKey: tn }, le));
              }
              for (var mn in ke) qe[mn] || ke[mn].required && ke[mn].default === void 0 && le[mn] === void 0 && Ct.push(new Ot(W, le, 'missing required property "' + mn + '"'));
              return Ct;
            }
            function Ru(N) {
              var W = N.value, le = N.valueSpec, ke = N.style, qe = N.styleSpec, et = N.key, dt = N.arrayElementValidator || No;
              if (da(W) !== "array") return [new Ot(et, W, "array expected, " + da(W) + " found")];
              if (le.length && W.length !== le.length) return [new Ot(et, W, "array length " + le.length + " expected, length " + W.length + " found")];
              if (le["min-length"] && W.length < le["min-length"]) return [new Ot(et, W, "array length at least " + le["min-length"] + " expected, length " + W.length + " found")];
              var Ct = { type: le.value, values: le.values };
              qe.$version < 7 && (Ct.function = le.function), da(le.value) === "object" && (Ct = le.value);
              for (var Ut = [], tn = 0; tn < W.length; tn++) Ut = Ut.concat(dt({ array: W, arrayIndex: tn, value: W[tn], valueSpec: Ct, style: ke, styleSpec: qe, key: et + "[" + tn + "]" }));
              return Ut;
            }
            function gf(N) {
              var W = N.key, le = N.value, ke = N.valueSpec, qe = da(le);
              return qe === "number" && le != le && (qe = "NaN"), qe !== "number" ? [new Ot(W, le, "number expected, " + qe + " found")] : "minimum" in ke && le < ke.minimum ? [new Ot(W, le, le + " is less than the minimum value " + ke.minimum)] : "maximum" in ke && le > ke.maximum ? [new Ot(W, le, le + " is greater than the maximum value " + ke.maximum)] : [];
            }
            function Fu(N) {
              var W, le, ke, qe = N.valueSpec, et = xt(N.value.type), dt = {}, Ct = et !== "categorical" && N.value.property === void 0, Ut = !Ct, tn = da(N.value.stops) === "array" && da(N.value.stops[0]) === "array" && da(N.value.stops[0][0]) === "object", nn = Yo({ key: N.key, value: N.value, valueSpec: N.styleSpec.function, style: N.style, styleSpec: N.styleSpec, objectElementValidators: { stops: function(mn) {
                if (et === "identity") return [new Ot(mn.key, mn.value, 'identity function may not have a "stops" property')];
                var On = [], Bn = mn.value;
                return On = On.concat(Ru({ key: mn.key, value: Bn, valueSpec: mn.valueSpec, style: mn.style, styleSpec: mn.styleSpec, arrayElementValidator: cn })), da(Bn) === "array" && Bn.length === 0 && On.push(new Ot(mn.key, Bn, "array must have at least one stop")), On;
              }, default: function(mn) {
                return No({ key: mn.key, value: mn.value, valueSpec: qe, style: mn.style, styleSpec: mn.styleSpec });
              } } });
              return et === "identity" && Ct && nn.push(new Ot(N.key, N.value, 'missing required property "property"')), et === "identity" || N.value.stops || nn.push(new Ot(N.key, N.value, 'missing required property "stops"')), et === "exponential" && N.valueSpec.expression && !Co(N.valueSpec) && nn.push(new Ot(N.key, N.value, "exponential functions not supported")), N.styleSpec.$version >= 8 && (Ut && !_s(N.valueSpec) ? nn.push(new Ot(N.key, N.value, "property functions not supported")) : Ct && !Ps(N.valueSpec) && nn.push(new Ot(N.key, N.value, "zoom functions not supported"))), et !== "categorical" && !tn || N.value.property !== void 0 || nn.push(new Ot(N.key, N.value, '"property" property is required')), nn;
              function cn(mn) {
                var On = [], Bn = mn.value, ar = mn.key;
                if (da(Bn) !== "array") return [new Ot(ar, Bn, "array expected, " + da(Bn) + " found")];
                if (Bn.length !== 2) return [new Ot(ar, Bn, "array length 2 expected, length " + Bn.length + " found")];
                if (tn) {
                  if (da(Bn[0]) !== "object") return [new Ot(ar, Bn, "object expected, " + da(Bn[0]) + " found")];
                  if (Bn[0].zoom === void 0) return [new Ot(ar, Bn, "object stop key must have zoom")];
                  if (Bn[0].value === void 0) return [new Ot(ar, Bn, "object stop key must have value")];
                  if (ke && ke > xt(Bn[0].zoom)) return [new Ot(ar, Bn[0].zoom, "stop zoom values must appear in ascending order")];
                  xt(Bn[0].zoom) !== ke && (ke = xt(Bn[0].zoom), le = void 0, dt = {}), On = On.concat(Yo({ key: ar + "[0]", value: Bn[0], valueSpec: { zoom: {} }, style: mn.style, styleSpec: mn.styleSpec, objectElementValidators: { zoom: gf, value: vn } }));
                } else On = On.concat(vn({ key: ar + "[0]", value: Bn[0], valueSpec: {}, style: mn.style, styleSpec: mn.styleSpec }, Bn));
                return vl(Jt(Bn[1])) ? On.concat([new Ot(ar + "[1]", Bn[1], "expressions are not allowed in function stops.")]) : On.concat(No({ key: ar + "[1]", value: Bn[1], valueSpec: qe, style: mn.style, styleSpec: mn.styleSpec }));
              }
              function vn(mn, On) {
                var Bn = da(mn.value), ar = xt(mn.value), tr = mn.value !== null ? mn.value : On;
                if (W) {
                  if (Bn !== W) return [new Ot(mn.key, tr, Bn + " stop domain type must match previous stop domain type " + W)];
                } else W = Bn;
                if (Bn !== "number" && Bn !== "string" && Bn !== "boolean") return [new Ot(mn.key, tr, "stop domain value must be a number, string, or boolean")];
                if (Bn !== "number" && et !== "categorical") {
                  var xr = "number expected, " + Bn + " found";
                  return _s(qe) && et === void 0 && (xr += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new Ot(mn.key, tr, xr)];
                }
                return et !== "categorical" || Bn !== "number" || isFinite(ar) && Math.floor(ar) === ar ? et !== "categorical" && Bn === "number" && le !== void 0 && ar < le ? [new Ot(mn.key, tr, "stop domain values must appear in ascending order")] : (le = ar, et === "categorical" && ar in dt ? [new Ot(mn.key, tr, "stop domain values must be unique")] : (dt[ar] = !0, [])) : [new Ot(mn.key, tr, "integer expected, found " + ar)];
              }
            }
            function ws(N) {
              var W = (N.expressionContext === "property" ? Ic : ru)(Jt(N.value), N.valueSpec);
              if (W.result === "error") return W.value.map(function(ke) {
                return new Ot("" + N.key + ke.key, N.value, ke.message);
              });
              var le = W.value.expression || W.value._styleExpression.expression;
              if (N.expressionContext === "property" && N.propertyKey === "text-font" && !le.outputDefined()) return [new Ot(N.key, N.value, 'Invalid data expression for "' + N.propertyKey + '". Output values must be contained as literals within the expression.')];
              if (N.expressionContext === "property" && N.propertyType === "layout" && !Dr(le)) return [new Ot(N.key, N.value, '"feature-state" data expressions are not supported with layout properties.')];
              if (N.expressionContext === "filter" && !Dr(le)) return [new Ot(N.key, N.value, '"feature-state" data expressions are not supported with filters.')];
              if (N.expressionContext && N.expressionContext.indexOf("cluster") === 0) {
                if (!Qn(le, ["zoom", "feature-state"])) return [new Ot(N.key, N.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
                if (N.expressionContext === "cluster-initial" && !Sr(le)) return [new Ot(N.key, N.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
              }
              return [];
            }
            function Nu(N) {
              var W = N.key, le = N.value, ke = N.valueSpec, qe = [];
              return Array.isArray(ke.values) ? ke.values.indexOf(xt(le)) === -1 && qe.push(new Ot(W, le, "expected one of [" + ke.values.join(", ") + "], " + JSON.stringify(le) + " found")) : Object.keys(ke.values).indexOf(xt(le)) === -1 && qe.push(new Ot(W, le, "expected one of [" + Object.keys(ke.values).join(", ") + "], " + JSON.stringify(le) + " found")), qe;
            }
            function An(N) {
              if (N === !0 || N === !1) return !0;
              if (!Array.isArray(N) || N.length === 0) return !1;
              switch (N[0]) {
                case "has":
                  return N.length >= 2 && N[1] !== "$id" && N[1] !== "$type";
                case "in":
                  return N.length >= 3 && (typeof N[1] != "string" || Array.isArray(N[2]));
                case "!in":
                case "!has":
                case "none":
                  return !1;
                case "==":
                case "!=":
                case ">":
                case ">=":
                case "<":
                case "<=":
                  return N.length !== 3 || Array.isArray(N[1]) || Array.isArray(N[2]);
                case "any":
                case "all":
                  for (var W = 0, le = N.slice(1); W < le.length; W += 1) {
                    var ke = le[W];
                    if (!An(ke) && typeof ke != "boolean") return !1;
                  }
                  return !0;
                default:
                  return !0;
              }
            }
            nf.deserialize = function(N) {
              return new nf(N._parameters, N._specification);
            }, nf.serialize = function(N) {
              return { _parameters: N._parameters, _specification: N._specification };
            };
            var to = { type: "boolean", default: !1, transition: !1, "property-type": "data-driven", expression: { interpolated: !1, parameters: ["zoom", "feature"] } };
            function Io(N) {
              if (N == null) return { filter: function() {
                return !0;
              }, needGeometry: !1 };
              An(N) || (N = Js(N));
              var W = ru(N, to);
              if (W.result === "error") throw new Error(W.value.map(function(le) {
                return le.key + ": " + le.message;
              }).join(", "));
              return { filter: function(le, ke, qe) {
                return W.value.evaluate(le, ke, {}, qe);
              }, needGeometry: va(N) };
            }
            function Ku(N, W) {
              return N < W ? -1 : N > W ? 1 : 0;
            }
            function va(N) {
              if (!Array.isArray(N)) return !1;
              if (N[0] === "within") return !0;
              for (var W = 1; W < N.length; W++) if (va(N[W])) return !0;
              return !1;
            }
            function Js(N) {
              if (!N) return !0;
              var W, le = N[0];
              return N.length <= 1 ? le !== "any" : le === "==" ? Ha(N[1], N[2], "==") : le === "!=" ? Aa(Ha(N[1], N[2], "==")) : le === "<" || le === ">" || le === "<=" || le === ">=" ? Ha(N[1], N[2], le) : le === "any" ? (W = N.slice(1), ["any"].concat(W.map(Js))) : le === "all" ? ["all"].concat(N.slice(1).map(Js)) : le === "none" ? ["all"].concat(N.slice(1).map(Js).map(Aa)) : le === "in" ? as(N[1], N.slice(2)) : le === "!in" ? Aa(as(N[1], N.slice(2))) : le === "has" ? aa(N[1]) : le === "!has" ? Aa(aa(N[1])) : le !== "within" || N;
            }
            function Ha(N, W, le) {
              switch (N) {
                case "$type":
                  return ["filter-type-" + le, W];
                case "$id":
                  return ["filter-id-" + le, W];
                default:
                  return ["filter-" + le, N, W];
              }
            }
            function as(N, W) {
              if (W.length === 0) return !1;
              switch (N) {
                case "$type":
                  return ["filter-type-in", ["literal", W]];
                case "$id":
                  return ["filter-id-in", ["literal", W]];
                default:
                  return W.length > 200 && !W.some(function(le) {
                    return typeof le != typeof W[0];
                  }) ? ["filter-in-large", N, ["literal", W.sort(Ku)]] : ["filter-in-small", N, ["literal", W]];
              }
            }
            function aa(N) {
              switch (N) {
                case "$type":
                  return !0;
                case "$id":
                  return ["filter-has-id"];
                default:
                  return ["filter-has", N];
              }
            }
            function Aa(N) {
              return ["!", N];
            }
            function yo(N) {
              return An(Jt(N.value)) ? ws(Bt({}, N, { expressionContext: "filter", valueSpec: { value: "boolean" } })) : Ju(N);
            }
            function Ju(N) {
              var W = N.value, le = N.key;
              if (da(W) !== "array") return [new Ot(le, W, "array expected, " + da(W) + " found")];
              var ke, qe = N.styleSpec, et = [];
              if (W.length < 1) return [new Ot(le, W, "filter array must have at least 1 element")];
              switch (et = et.concat(Nu({ key: le + "[0]", value: W[0], valueSpec: qe.filter_operator, style: N.style, styleSpec: N.styleSpec })), xt(W[0])) {
                case "<":
                case "<=":
                case ">":
                case ">=":
                  W.length >= 2 && xt(W[1]) === "$type" && et.push(new Ot(le, W, '"$type" cannot be use with operator "' + W[0] + '"'));
                case "==":
                case "!=":
                  W.length !== 3 && et.push(new Ot(le, W, 'filter array for operator "' + W[0] + '" must have 3 elements'));
                case "in":
                case "!in":
                  W.length >= 2 && (ke = da(W[1])) !== "string" && et.push(new Ot(le + "[1]", W[1], "string expected, " + ke + " found"));
                  for (var dt = 2; dt < W.length; dt++) ke = da(W[dt]), xt(W[1]) === "$type" ? et = et.concat(Nu({ key: le + "[" + dt + "]", value: W[dt], valueSpec: qe.geometry_type, style: N.style, styleSpec: N.styleSpec })) : ke !== "string" && ke !== "number" && ke !== "boolean" && et.push(new Ot(le + "[" + dt + "]", W[dt], "string, number, or boolean expected, " + ke + " found"));
                  break;
                case "any":
                case "all":
                case "none":
                  for (var Ct = 1; Ct < W.length; Ct++) et = et.concat(Ju({ key: le + "[" + Ct + "]", value: W[Ct], style: N.style, styleSpec: N.styleSpec }));
                  break;
                case "has":
                case "!has":
                  ke = da(W[1]), W.length !== 2 ? et.push(new Ot(le, W, 'filter array for "' + W[0] + '" operator must have 2 elements')) : ke !== "string" && et.push(new Ot(le + "[1]", W[1], "string expected, " + ke + " found"));
                  break;
                case "within":
                  ke = da(W[1]), W.length !== 2 ? et.push(new Ot(le, W, 'filter array for "' + W[0] + '" operator must have 2 elements')) : ke !== "object" && et.push(new Ot(le + "[1]", W[1], "object expected, " + ke + " found"));
              }
              return et;
            }
            function uc(N, W) {
              var le = N.key, ke = N.style, qe = N.styleSpec, et = N.value, dt = N.objectKey, Ct = qe[W + "_" + N.layerType];
              if (!Ct) return [];
              var Ut = dt.match(/^(.*)-transition$/);
              if (W === "paint" && Ut && Ct[Ut[1]] && Ct[Ut[1]].transition) return No({ key: le, value: et, valueSpec: qe.transition, style: ke, styleSpec: qe });
              var tn, nn = N.valueSpec || Ct[dt];
              if (!nn) return [new Ot(le, et, 'unknown property "' + dt + '"')];
              if (da(et) === "string" && _s(nn) && !nn.tokens && (tn = /^{([^}]+)}$/.exec(et))) return [new Ot(le, et, '"' + dt + '" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": ' + JSON.stringify(tn[1]) + " }`.")];
              var cn = [];
              return N.layerType === "symbol" && (dt === "text-field" && ke && !ke.glyphs && cn.push(new Ot(le, et, 'use of "text-field" requires a style "glyphs" property')), dt === "text-font" && Ou(Jt(et)) && xt(et.type) === "identity" && cn.push(new Ot(le, et, '"text-font" does not support identity functions'))), cn.concat(No({ key: N.key, value: et, valueSpec: nn, style: ke, styleSpec: qe, expressionContext: "property", propertyType: W, propertyKey: dt }));
            }
            function vu(N) {
              return uc(N, "paint");
            }
            function xu(N) {
              return uc(N, "layout");
            }
            function Zo(N) {
              var W = [], le = N.value, ke = N.key, qe = N.style, et = N.styleSpec;
              le.type || le.ref || W.push(new Ot(ke, le, 'either "type" or "ref" is required'));
              var dt, Ct = xt(le.type), Ut = xt(le.ref);
              if (le.id) for (var tn = xt(le.id), nn = 0; nn < N.arrayIndex; nn++) {
                var cn = qe.layers[nn];
                xt(cn.id) === tn && W.push(new Ot(ke, le.id, 'duplicate layer id "' + le.id + '", previously used at line ' + cn.id.__line__));
              }
              if ("ref" in le) ["type", "source", "source-layer", "filter", "layout"].forEach(function(On) {
                On in le && W.push(new Ot(ke, le[On], '"' + On + '" is prohibited for ref layers'));
              }), qe.layers.forEach(function(On) {
                xt(On.id) === Ut && (dt = On);
              }), dt ? dt.ref ? W.push(new Ot(ke, le.ref, "ref cannot reference another ref layer")) : Ct = xt(dt.type) : W.push(new Ot(ke, le.ref, 'ref layer "' + Ut + '" not found'));
              else if (Ct !== "background") if (le.source) {
                var vn = qe.sources && qe.sources[le.source], mn = vn && xt(vn.type);
                vn ? mn === "vector" && Ct === "raster" ? W.push(new Ot(ke, le.source, 'layer "' + le.id + '" requires a raster source')) : mn === "raster" && Ct !== "raster" ? W.push(new Ot(ke, le.source, 'layer "' + le.id + '" requires a vector source')) : mn !== "vector" || le["source-layer"] ? mn === "raster-dem" && Ct !== "hillshade" ? W.push(new Ot(ke, le.source, "raster-dem source can only be used with layer type 'hillshade'.")) : Ct !== "line" || !le.paint || !le.paint["line-gradient"] || mn === "geojson" && vn.lineMetrics || W.push(new Ot(ke, le, 'layer "' + le.id + '" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')) : W.push(new Ot(ke, le, 'layer "' + le.id + '" must specify a "source-layer"')) : W.push(new Ot(ke, le.source, 'source "' + le.source + '" not found'));
              } else W.push(new Ot(ke, le, 'missing required property "source"'));
              return W = W.concat(Yo({ key: ke, value: le, valueSpec: et.layer, style: N.style, styleSpec: N.styleSpec, objectElementValidators: { "*": function() {
                return [];
              }, type: function() {
                return No({ key: ke + ".type", value: le.type, valueSpec: et.layer.type, style: N.style, styleSpec: N.styleSpec, object: le, objectKey: "type" });
              }, filter: yo, layout: function(On) {
                return Yo({ layer: le, key: On.key, value: On.value, style: On.style, styleSpec: On.styleSpec, objectElementValidators: { "*": function(Bn) {
                  return xu(Bt({ layerType: Ct }, Bn));
                } } });
              }, paint: function(On) {
                return Yo({ layer: le, key: On.key, value: On.value, style: On.style, styleSpec: On.styleSpec, objectElementValidators: { "*": function(Bn) {
                  return vu(Bt({ layerType: Ct }, Bn));
                } } });
              } } })), W;
            }
            function Fo(N) {
              var W = N.value, le = N.key, ke = da(W);
              return ke !== "string" ? [new Ot(le, W, "string expected, " + ke + " found")] : [];
            }
            var Il = { promoteId: function(N) {
              var W = N.key, le = N.value;
              if (da(le) === "string") return Fo({ key: W, value: le });
              var ke = [];
              for (var qe in le) ke.push.apply(ke, Fo({ key: W + "." + qe, value: le[qe] }));
              return ke;
            } };
            function bu(N) {
              var W = N.value, le = N.key, ke = N.styleSpec, qe = N.style;
              if (!W.type) return [new Ot(le, W, '"type" is required')];
              var et, dt = xt(W.type);
              switch (dt) {
                case "vector":
                case "raster":
                case "raster-dem":
                  return Yo({ key: le, value: W, valueSpec: ke["source_" + dt.replace("-", "_")], style: N.style, styleSpec: ke, objectElementValidators: Il });
                case "geojson":
                  if (et = Yo({ key: le, value: W, valueSpec: ke.source_geojson, style: qe, styleSpec: ke, objectElementValidators: Il }), W.cluster) for (var Ct in W.clusterProperties) {
                    var Ut = W.clusterProperties[Ct], tn = Ut[0], nn = Ut[1], cn = typeof tn == "string" ? [tn, ["accumulated"], ["get", Ct]] : tn;
                    et.push.apply(et, ws({ key: le + "." + Ct + ".map", value: nn, expressionContext: "cluster-map" })), et.push.apply(et, ws({ key: le + "." + Ct + ".reduce", value: cn, expressionContext: "cluster-reduce" }));
                  }
                  return et;
                case "video":
                  return Yo({ key: le, value: W, valueSpec: ke.source_video, style: qe, styleSpec: ke });
                case "image":
                  return Yo({ key: le, value: W, valueSpec: ke.source_image, style: qe, styleSpec: ke });
                case "canvas":
                  return [new Ot(le, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
                default:
                  return Nu({ key: le + ".type", value: W.type, valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] }, style: qe, styleSpec: ke });
              }
            }
            function Xo(N) {
              var W = N.value, le = N.styleSpec, ke = le.light, qe = N.style, et = [], dt = da(W);
              if (W === void 0) return et;
              if (dt !== "object") return et.concat([new Ot("light", W, "object expected, " + dt + " found")]);
              for (var Ct in W) {
                var Ut = Ct.match(/^(.*)-transition$/);
                et = Ut && ke[Ut[1]] && ke[Ut[1]].transition ? et.concat(No({ key: Ct, value: W[Ct], valueSpec: le.transition, style: qe, styleSpec: le })) : ke[Ct] ? et.concat(No({ key: Ct, value: W[Ct], valueSpec: ke[Ct], style: qe, styleSpec: le })) : et.concat([new Ot(Ct, W[Ct], 'unknown property "' + Ct + '"')]);
              }
              return et;
            }
            var Ra = { "*": function() {
              return [];
            }, array: Ru, boolean: function(N) {
              var W = N.value, le = N.key, ke = da(W);
              return ke !== "boolean" ? [new Ot(le, W, "boolean expected, " + ke + " found")] : [];
            }, number: gf, color: function(N) {
              var W = N.key, le = N.value, ke = da(le);
              return ke !== "string" ? [new Ot(W, le, "color expected, " + ke + " found")] : hr(le) === null ? [new Ot(W, le, 'color expected, "' + le + '" found')] : [];
            }, constants: kt, enum: Nu, filter: yo, function: Fu, layer: Zo, object: Yo, source: bu, light: Xo, string: Fo, formatted: function(N) {
              return Fo(N).length === 0 ? [] : ws(N);
            }, resolvedImage: function(N) {
              return Fo(N).length === 0 ? [] : ws(N);
            } };
            function No(N) {
              var W = N.value, le = N.valueSpec, ke = N.styleSpec;
              return le.expression && Ou(xt(W)) ? Fu(N) : le.expression && vl(Jt(W)) ? ws(N) : le.type && Ra[le.type] ? Ra[le.type](N) : Yo(Bt({}, N, { valueSpec: le.type ? ke[le.type] : le }));
            }
            function Sa(N) {
              var W = N.value, le = N.key, ke = Fo(N);
              return ke.length || (W.indexOf("{fontstack}") === -1 && ke.push(new Ot(le, W, '"glyphs" url must include a "{fontstack}" token')), W.indexOf("{range}") === -1 && ke.push(new Ot(le, W, '"glyphs" url must include a "{range}" token'))), ke;
            }
            function Bo(N, W) {
              W === void 0 && (W = st);
              var le = [];
              return le = le.concat(No({ key: "", value: N, valueSpec: W.$root, styleSpec: W, style: N, objectElementValidators: { glyphs: Sa, "*": function() {
                return [];
              } } })), N.constants && (le = le.concat(kt({ key: "constants", value: N.constants, style: N, styleSpec: W }))), _a(le);
            }
            function _a(N) {
              return [].concat(N).sort(function(W, le) {
                return W.line - le.line;
              });
            }
            function Do(N) {
              return function() {
                for (var W = [], le = arguments.length; le--; ) W[le] = arguments[le];
                return _a(N.apply(this, W));
              };
            }
            Bo.source = Do(bu), Bo.light = Do(Xo), Bo.layer = Do(Zo), Bo.filter = Do(yo), Bo.paintProperty = Do(vu), Bo.layoutProperty = Do(xu);
            var jo = Bo, Dl = jo.light, Uo = jo.paintProperty, Qs = jo.layoutProperty;
            function os(N, W) {
              var le = !1;
              if (W && W.length) for (var ke = 0, qe = W; ke < qe.length; ke += 1) {
                var et = qe[ke];
                N.fire(new Ft(new Error(et.message))), le = !0;
              }
              return le;
            }
            var Bu = Pl, Ll = 3;
            function Pl(N, W, le) {
              var ke = this.cells = [];
              if (N instanceof ArrayBuffer) {
                this.arrayBuffer = N;
                var qe = new Int32Array(this.arrayBuffer);
                N = qe[0], W = qe[1], le = qe[2], this.d = W + 2 * le;
                for (var et = 0; et < this.d * this.d; et++) {
                  var dt = qe[Ll + et], Ct = qe[Ll + et + 1];
                  ke.push(dt === Ct ? null : qe.subarray(dt, Ct));
                }
                var Ut = qe[Ll + ke.length], tn = qe[Ll + ke.length + 1];
                this.keys = qe.subarray(Ut, tn), this.bboxes = qe.subarray(tn), this.insert = this._insertReadonly;
              } else {
                this.d = W + 2 * le;
                for (var nn = 0; nn < this.d * this.d; nn++) ke.push([]);
                this.keys = [], this.bboxes = [];
              }
              this.n = W, this.extent = N, this.padding = le, this.scale = W / N, this.uid = 0;
              var cn = le / W * N;
              this.min = -cn, this.max = N + cn;
            }
            Pl.prototype.insert = function(N, W, le, ke, qe) {
              this._forEachCell(W, le, ke, qe, this._insertCell, this.uid++), this.keys.push(N), this.bboxes.push(W), this.bboxes.push(le), this.bboxes.push(ke), this.bboxes.push(qe);
            }, Pl.prototype._insertReadonly = function() {
              throw "Cannot insert into a GridIndex created from an ArrayBuffer.";
            }, Pl.prototype._insertCell = function(N, W, le, ke, qe, et) {
              this.cells[qe].push(et);
            }, Pl.prototype.query = function(N, W, le, ke, qe) {
              var et = this.min, dt = this.max;
              if (N <= et && W <= et && dt <= le && dt <= ke && !qe) return Array.prototype.slice.call(this.keys);
              var Ct = [];
              return this._forEachCell(N, W, le, ke, this._queryCell, Ct, {}, qe), Ct;
            }, Pl.prototype._queryCell = function(N, W, le, ke, qe, et, dt, Ct) {
              var Ut = this.cells[qe];
              if (Ut !== null) for (var tn = this.keys, nn = this.bboxes, cn = 0; cn < Ut.length; cn++) {
                var vn = Ut[cn];
                if (dt[vn] === void 0) {
                  var mn = 4 * vn;
                  (Ct ? Ct(nn[mn + 0], nn[mn + 1], nn[mn + 2], nn[mn + 3]) : N <= nn[mn + 2] && W <= nn[mn + 3] && le >= nn[mn + 0] && ke >= nn[mn + 1]) ? (dt[vn] = !0, et.push(tn[vn])) : dt[vn] = !1;
                }
              }
            }, Pl.prototype._forEachCell = function(N, W, le, ke, qe, et, dt, Ct) {
              for (var Ut = this._convertToCellCoord(N), tn = this._convertToCellCoord(W), nn = this._convertToCellCoord(le), cn = this._convertToCellCoord(ke), vn = Ut; vn <= nn; vn++) for (var mn = tn; mn <= cn; mn++) {
                var On = this.d * mn + vn;
                if ((!Ct || Ct(this._convertFromCellCoord(vn), this._convertFromCellCoord(mn), this._convertFromCellCoord(vn + 1), this._convertFromCellCoord(mn + 1))) && qe.call(this, N, W, le, ke, On, et, dt, Ct)) return;
              }
            }, Pl.prototype._convertFromCellCoord = function(N) {
              return (N - this.padding) / this.scale;
            }, Pl.prototype._convertToCellCoord = function(N) {
              return Math.max(0, Math.min(this.d - 1, Math.floor(N * this.scale) + this.padding));
            }, Pl.prototype.toArrayBuffer = function() {
              if (this.arrayBuffer) return this.arrayBuffer;
              for (var N = this.cells, W = Ll + this.cells.length + 1 + 1, le = 0, ke = 0; ke < this.cells.length; ke++) le += this.cells[ke].length;
              var qe = new Int32Array(W + le + this.keys.length + this.bboxes.length);
              qe[0] = this.extent, qe[1] = this.n, qe[2] = this.padding;
              for (var et = W, dt = 0; dt < N.length; dt++) {
                var Ct = N[dt];
                qe[Ll + dt] = et, qe.set(Ct, et), et += Ct.length;
              }
              return qe[Ll + N.length] = et, qe.set(this.keys, et), et += this.keys.length, qe[Ll + N.length + 1] = et, qe.set(this.bboxes, et), et += this.bboxes.length, qe.buffer;
            };
            var Lo = g.ImageData, Ca = g.ImageBitmap, Ol = {};
            function xi(N, W, le) {
              le === void 0 && (le = {}), Object.defineProperty(W, "_classRegistryKey", { value: N, writeable: !1 }), Ol[N] = { klass: W, omit: le.omit || [], shallow: le.shallow || [] };
            }
            for (var cc in xi("Object", Object), Bu.serialize = function(N, W) {
              var le = N.toArrayBuffer();
              return W && W.push(le), { buffer: le };
            }, Bu.deserialize = function(N) {
              return new Bu(N.buffer);
            }, xi("Grid", Bu), xi("Color", Zn), xi("Error", Error), xi("ResolvedImage", Wr), xi("StylePropertyFunction", nf), xi("StyleExpression", yl, { omit: ["_evaluator"] }), xi("ZoomDependentExpression", ea), xi("ZoomConstantExpression", Cl), xi("CompoundExpression", Gn, { omit: ["_evaluate"] }), eu) eu[cc]._classRegistryKey || xi("Expression_" + cc, eu[cc]);
            function Dc(N) {
              return N && typeof ArrayBuffer < "u" && (N instanceof ArrayBuffer || N.constructor && N.constructor.name === "ArrayBuffer");
            }
            function xl(N) {
              return Ca && N instanceof Ca;
            }
            function zl(N, W) {
              if (N == null || typeof N == "boolean" || typeof N == "number" || typeof N == "string" || N instanceof Boolean || N instanceof Number || N instanceof String || N instanceof Date || N instanceof RegExp) return N;
              if (Dc(N) || xl(N)) return W && W.push(N), N;
              if (ArrayBuffer.isView(N)) {
                var le = N;
                return W && W.push(le.buffer), le;
              }
              if (N instanceof Lo) return W && W.push(N.data.buffer), N;
              if (Array.isArray(N)) {
                for (var ke = [], qe = 0, et = N; qe < et.length; qe += 1) {
                  var dt = et[qe];
                  ke.push(zl(dt, W));
                }
                return ke;
              }
              if (typeof N == "object") {
                var Ct = N.constructor, Ut = Ct._classRegistryKey;
                if (!Ut) throw new Error("can't serialize object of unregistered class");
                var tn = Ct.serialize ? Ct.serialize(N, W) : {};
                if (!Ct.serialize) {
                  for (var nn in N) if (N.hasOwnProperty(nn) && !(Ol[Ut].omit.indexOf(nn) >= 0)) {
                    var cn = N[nn];
                    tn[nn] = Ol[Ut].shallow.indexOf(nn) >= 0 ? cn : zl(cn, W);
                  }
                  N instanceof Error && (tn.message = N.message);
                }
                if (tn.$name) throw new Error("$name property is reserved for worker serialization logic.");
                return Ut !== "Object" && (tn.$name = Ut), tn;
              }
              throw new Error("can't serialize object of type " + typeof N);
            }
            function Rl(N) {
              if (N == null || typeof N == "boolean" || typeof N == "number" || typeof N == "string" || N instanceof Boolean || N instanceof Number || N instanceof String || N instanceof Date || N instanceof RegExp || Dc(N) || xl(N) || ArrayBuffer.isView(N) || N instanceof Lo) return N;
              if (Array.isArray(N)) return N.map(Rl);
              if (typeof N == "object") {
                var W = N.$name || "Object", le = Ol[W].klass;
                if (!le) throw new Error("can't deserialize unregistered class " + W);
                if (le.deserialize) return le.deserialize(N);
                for (var ke = Object.create(le.prototype), qe = 0, et = Object.keys(N); qe < et.length; qe += 1) {
                  var dt = et[qe];
                  if (dt !== "$name") {
                    var Ct = N[dt];
                    ke[dt] = Ol[W].shallow.indexOf(dt) >= 0 ? Ct : Rl(Ct);
                  }
                }
                return ke;
              }
              throw new Error("can't deserialize object of type " + typeof N);
            }
            var ju = function() {
              this.first = !0;
            };
            ju.prototype.update = function(N, W) {
              var le = Math.floor(N);
              return this.first ? (this.first = !1, this.lastIntegerZoom = le, this.lastIntegerZoomTime = 0, this.lastZoom = N, this.lastFloorZoom = le, !0) : (this.lastFloorZoom > le ? (this.lastIntegerZoom = le + 1, this.lastIntegerZoomTime = W) : this.lastFloorZoom < le && (this.lastIntegerZoom = le, this.lastIntegerZoomTime = W), N !== this.lastZoom && (this.lastZoom = N, this.lastFloorZoom = le, !0));
            };
            var ti = { "Latin-1 Supplement": function(N) {
              return N >= 128 && N <= 255;
            }, Arabic: function(N) {
              return N >= 1536 && N <= 1791;
            }, "Arabic Supplement": function(N) {
              return N >= 1872 && N <= 1919;
            }, "Arabic Extended-A": function(N) {
              return N >= 2208 && N <= 2303;
            }, "Hangul Jamo": function(N) {
              return N >= 4352 && N <= 4607;
            }, "Unified Canadian Aboriginal Syllabics": function(N) {
              return N >= 5120 && N <= 5759;
            }, Khmer: function(N) {
              return N >= 6016 && N <= 6143;
            }, "Unified Canadian Aboriginal Syllabics Extended": function(N) {
              return N >= 6320 && N <= 6399;
            }, "General Punctuation": function(N) {
              return N >= 8192 && N <= 8303;
            }, "Letterlike Symbols": function(N) {
              return N >= 8448 && N <= 8527;
            }, "Number Forms": function(N) {
              return N >= 8528 && N <= 8591;
            }, "Miscellaneous Technical": function(N) {
              return N >= 8960 && N <= 9215;
            }, "Control Pictures": function(N) {
              return N >= 9216 && N <= 9279;
            }, "Optical Character Recognition": function(N) {
              return N >= 9280 && N <= 9311;
            }, "Enclosed Alphanumerics": function(N) {
              return N >= 9312 && N <= 9471;
            }, "Geometric Shapes": function(N) {
              return N >= 9632 && N <= 9727;
            }, "Miscellaneous Symbols": function(N) {
              return N >= 9728 && N <= 9983;
            }, "Miscellaneous Symbols and Arrows": function(N) {
              return N >= 11008 && N <= 11263;
            }, "CJK Radicals Supplement": function(N) {
              return N >= 11904 && N <= 12031;
            }, "Kangxi Radicals": function(N) {
              return N >= 12032 && N <= 12255;
            }, "Ideographic Description Characters": function(N) {
              return N >= 12272 && N <= 12287;
            }, "CJK Symbols and Punctuation": function(N) {
              return N >= 12288 && N <= 12351;
            }, Hiragana: function(N) {
              return N >= 12352 && N <= 12447;
            }, Katakana: function(N) {
              return N >= 12448 && N <= 12543;
            }, Bopomofo: function(N) {
              return N >= 12544 && N <= 12591;
            }, "Hangul Compatibility Jamo": function(N) {
              return N >= 12592 && N <= 12687;
            }, Kanbun: function(N) {
              return N >= 12688 && N <= 12703;
            }, "Bopomofo Extended": function(N) {
              return N >= 12704 && N <= 12735;
            }, "CJK Strokes": function(N) {
              return N >= 12736 && N <= 12783;
            }, "Katakana Phonetic Extensions": function(N) {
              return N >= 12784 && N <= 12799;
            }, "Enclosed CJK Letters and Months": function(N) {
              return N >= 12800 && N <= 13055;
            }, "CJK Compatibility": function(N) {
              return N >= 13056 && N <= 13311;
            }, "CJK Unified Ideographs Extension A": function(N) {
              return N >= 13312 && N <= 19903;
            }, "Yijing Hexagram Symbols": function(N) {
              return N >= 19904 && N <= 19967;
            }, "CJK Unified Ideographs": function(N) {
              return N >= 19968 && N <= 40959;
            }, "Yi Syllables": function(N) {
              return N >= 40960 && N <= 42127;
            }, "Yi Radicals": function(N) {
              return N >= 42128 && N <= 42191;
            }, "Hangul Jamo Extended-A": function(N) {
              return N >= 43360 && N <= 43391;
            }, "Hangul Syllables": function(N) {
              return N >= 44032 && N <= 55215;
            }, "Hangul Jamo Extended-B": function(N) {
              return N >= 55216 && N <= 55295;
            }, "Private Use Area": function(N) {
              return N >= 57344 && N <= 63743;
            }, "CJK Compatibility Ideographs": function(N) {
              return N >= 63744 && N <= 64255;
            }, "Arabic Presentation Forms-A": function(N) {
              return N >= 64336 && N <= 65023;
            }, "Vertical Forms": function(N) {
              return N >= 65040 && N <= 65055;
            }, "CJK Compatibility Forms": function(N) {
              return N >= 65072 && N <= 65103;
            }, "Small Form Variants": function(N) {
              return N >= 65104 && N <= 65135;
            }, "Arabic Presentation Forms-B": function(N) {
              return N >= 65136 && N <= 65279;
            }, "Halfwidth and Fullwidth Forms": function(N) {
              return N >= 65280 && N <= 65519;
            } };
            function js(N) {
              for (var W = 0, le = N; W < le.length; W += 1) if (Fl(le[W].charCodeAt(0))) return !0;
              return !1;
            }
            function Fl(N) {
              return !(N !== 746 && N !== 747 && (N < 4352 || !(ti["Bopomofo Extended"](N) || ti.Bopomofo(N) || ti["CJK Compatibility Forms"](N) && !(N >= 65097 && N <= 65103) || ti["CJK Compatibility Ideographs"](N) || ti["CJK Compatibility"](N) || ti["CJK Radicals Supplement"](N) || ti["CJK Strokes"](N) || !(!ti["CJK Symbols and Punctuation"](N) || N >= 12296 && N <= 12305 || N >= 12308 && N <= 12319 || N === 12336) || ti["CJK Unified Ideographs Extension A"](N) || ti["CJK Unified Ideographs"](N) || ti["Enclosed CJK Letters and Months"](N) || ti["Hangul Compatibility Jamo"](N) || ti["Hangul Jamo Extended-A"](N) || ti["Hangul Jamo Extended-B"](N) || ti["Hangul Jamo"](N) || ti["Hangul Syllables"](N) || ti.Hiragana(N) || ti["Ideographic Description Characters"](N) || ti.Kanbun(N) || ti["Kangxi Radicals"](N) || ti["Katakana Phonetic Extensions"](N) || ti.Katakana(N) && N !== 12540 || !(!ti["Halfwidth and Fullwidth Forms"](N) || N === 65288 || N === 65289 || N === 65293 || N >= 65306 && N <= 65310 || N === 65339 || N === 65341 || N === 65343 || N >= 65371 && N <= 65503 || N === 65507 || N >= 65512 && N <= 65519) || !(!ti["Small Form Variants"](N) || N >= 65112 && N <= 65118 || N >= 65123 && N <= 65126) || ti["Unified Canadian Aboriginal Syllabics"](N) || ti["Unified Canadian Aboriginal Syllabics Extended"](N) || ti["Vertical Forms"](N) || ti["Yijing Hexagram Symbols"](N) || ti["Yi Syllables"](N) || ti["Yi Radicals"](N))));
            }
            function Fa(N) {
              return !(Fl(N) || function(W) {
                return !!(ti["Latin-1 Supplement"](W) && (W === 167 || W === 169 || W === 174 || W === 177 || W === 188 || W === 189 || W === 190 || W === 215 || W === 247) || ti["General Punctuation"](W) && (W === 8214 || W === 8224 || W === 8225 || W === 8240 || W === 8241 || W === 8251 || W === 8252 || W === 8258 || W === 8263 || W === 8264 || W === 8265 || W === 8273) || ti["Letterlike Symbols"](W) || ti["Number Forms"](W) || ti["Miscellaneous Technical"](W) && (W >= 8960 && W <= 8967 || W >= 8972 && W <= 8991 || W >= 8996 && W <= 9e3 || W === 9003 || W >= 9085 && W <= 9114 || W >= 9150 && W <= 9165 || W === 9167 || W >= 9169 && W <= 9179 || W >= 9186 && W <= 9215) || ti["Control Pictures"](W) && W !== 9251 || ti["Optical Character Recognition"](W) || ti["Enclosed Alphanumerics"](W) || ti["Geometric Shapes"](W) || ti["Miscellaneous Symbols"](W) && !(W >= 9754 && W <= 9759) || ti["Miscellaneous Symbols and Arrows"](W) && (W >= 11026 && W <= 11055 || W >= 11088 && W <= 11097 || W >= 11192 && W <= 11243) || ti["CJK Symbols and Punctuation"](W) || ti.Katakana(W) || ti["Private Use Area"](W) || ti["CJK Compatibility Forms"](W) || ti["Small Form Variants"](W) || ti["Halfwidth and Fullwidth Forms"](W) || W === 8734 || W === 8756 || W === 8757 || W >= 9984 && W <= 10087 || W >= 10102 && W <= 10131 || W === 65532 || W === 65533);
              }(N));
            }
            function Us(N) {
              return ti.Arabic(N) || ti["Arabic Supplement"](N) || ti["Arabic Extended-A"](N) || ti["Arabic Presentation Forms-A"](N) || ti["Arabic Presentation Forms-B"](N);
            }
            function ss(N) {
              return N >= 1424 && N <= 2303 || ti["Arabic Presentation Forms-A"](N) || ti["Arabic Presentation Forms-B"](N);
            }
            function el(N, W) {
              return !(!W && ss(N) || N >= 2304 && N <= 3583 || N >= 3840 && N <= 4255 || ti.Khmer(N));
            }
            function ks(N) {
              for (var W = 0, le = N; W < le.length; W += 1) if (ss(le[W].charCodeAt(0))) return !0;
              return !1;
            }
            var iu = "deferred", tl = "loading", Os = "loaded", Vs = "error", di = null, xa = "unavailable", vo = null, Ts = function(N) {
              N && typeof N == "string" && N.indexOf("NetworkError") > -1 && (xa = Vs), di && di(N);
            };
            function nl() {
              Vo.fire(new Rt("pluginStateChange", { pluginStatus: xa, pluginURL: vo }));
            }
            var Vo = new lt(), Qu = function() {
              return xa;
            }, li = function() {
              if (xa !== iu || !vo) throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");
              xa = tl, nl(), vo && Je({ url: vo }, function(N) {
                N ? Ts(N) : (xa = Os, nl());
              });
            }, ls = { applyArabicShaping: null, processBidirectionalText: null, processStyledBidirectionalText: null, isLoaded: function() {
              return xa === Os || ls.applyArabicShaping != null;
            }, isLoading: function() {
              return xa === tl;
            }, setState: function(N) {
              xa = N.pluginStatus, vo = N.pluginURL;
            }, isParsed: function() {
              return ls.applyArabicShaping != null && ls.processBidirectionalText != null && ls.processStyledBidirectionalText != null;
            }, getPluginURL: function() {
              return vo;
            } }, ma = function(N, W) {
              this.zoom = N, W ? (this.now = W.now, this.fadeDuration = W.fadeDuration, this.zoomHistory = W.zoomHistory, this.transition = W.transition) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new ju(), this.transition = {});
            };
            ma.prototype.isSupportedScript = function(N) {
              return function(W, le) {
                for (var ke = 0, qe = W; ke < qe.length; ke += 1) if (!el(qe[ke].charCodeAt(0), le)) return !1;
                return !0;
              }(N, ls.isLoaded());
            }, ma.prototype.crossFadingFactor = function() {
              return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);
            }, ma.prototype.getCrossfadeParameters = function() {
              var N = this.zoom, W = N - Math.floor(N), le = this.crossFadingFactor();
              return N > this.zoomHistory.lastIntegerZoom ? { fromScale: 2, toScale: 1, t: W + (1 - W) * le } : { fromScale: 0.5, toScale: 1, t: 1 - (1 - le) * W };
            };
            var au = function(N, W) {
              this.property = N, this.value = W, this.expression = function(le, ke) {
                if (Ou(le)) return new nf(le, ke);
                if (vl(le)) {
                  var qe = Ic(le, ke);
                  if (qe.result === "error") throw new Error(qe.value.map(function(dt) {
                    return dt.key + ": " + dt.message;
                  }).join(", "));
                  return qe.value;
                }
                var et = le;
                return typeof le == "string" && ke.type === "color" && (et = Zn.parse(le)), { kind: "constant", evaluate: function() {
                  return et;
                } };
              }(W === void 0 ? N.specification.default : W, N.specification);
            };
            au.prototype.isDataDriven = function() {
              return this.expression.kind === "source" || this.expression.kind === "composite";
            }, au.prototype.possiblyEvaluate = function(N, W, le) {
              return this.property.possiblyEvaluate(this, N, W, le);
            };
            var $s = function(N) {
              this.property = N, this.value = new au(N, void 0);
            };
            $s.prototype.transitioned = function(N, W) {
              return new Lc(this.property, this.value, W, A({}, N.transition, this.transition), N.now);
            }, $s.prototype.untransitioned = function() {
              return new Lc(this.property, this.value, null, {}, 0);
            };
            var bl = function(N) {
              this._properties = N, this._values = Object.create(N.defaultTransitionablePropertyValues);
            };
            bl.prototype.getValue = function(N) {
              return T(this._values[N].value.value);
            }, bl.prototype.setValue = function(N, W) {
              this._values.hasOwnProperty(N) || (this._values[N] = new $s(this._values[N].property)), this._values[N].value = new au(this._values[N].property, W === null ? void 0 : T(W));
            }, bl.prototype.getTransition = function(N) {
              return T(this._values[N].transition);
            }, bl.prototype.setTransition = function(N, W) {
              this._values.hasOwnProperty(N) || (this._values[N] = new $s(this._values[N].property)), this._values[N].transition = T(W) || void 0;
            }, bl.prototype.serialize = function() {
              for (var N = {}, W = 0, le = Object.keys(this._values); W < le.length; W += 1) {
                var ke = le[W], qe = this.getValue(ke);
                qe !== void 0 && (N[ke] = qe);
                var et = this.getTransition(ke);
                et !== void 0 && (N[ke + "-transition"] = et);
              }
              return N;
            }, bl.prototype.transitioned = function(N, W) {
              for (var le = new ec(this._properties), ke = 0, qe = Object.keys(this._values); ke < qe.length; ke += 1) {
                var et = qe[ke];
                le._values[et] = this._values[et].transitioned(N, W._values[et]);
              }
              return le;
            }, bl.prototype.untransitioned = function() {
              for (var N = new ec(this._properties), W = 0, le = Object.keys(this._values); W < le.length; W += 1) {
                var ke = le[W];
                N._values[ke] = this._values[ke].untransitioned();
              }
              return N;
            };
            var Lc = function(N, W, le, ke, qe) {
              this.property = N, this.value = W, this.begin = qe + ke.delay || 0, this.end = this.begin + ke.duration || 0, N.specification.transition && (ke.delay || ke.duration) && (this.prior = le);
            };
            Lc.prototype.possiblyEvaluate = function(N, W, le) {
              var ke = N.now || 0, qe = this.value.possiblyEvaluate(N, W, le), et = this.prior;
              if (et) {
                if (ke > this.end) return this.prior = null, qe;
                if (this.value.isDataDriven()) return this.prior = null, qe;
                if (ke < this.begin) return et.possiblyEvaluate(N, W, le);
                var dt = (ke - this.begin) / (this.end - this.begin);
                return this.property.interpolate(et.possiblyEvaluate(N, W, le), qe, function(Ct) {
                  if (Ct <= 0) return 0;
                  if (Ct >= 1) return 1;
                  var Ut = Ct * Ct, tn = Ut * Ct;
                  return 4 * (Ct < 0.5 ? tn : 3 * (Ct - Ut) + tn - 0.75);
                }(dt));
              }
              return qe;
            };
            var ec = function(N) {
              this._properties = N, this._values = Object.create(N.defaultTransitioningPropertyValues);
            };
            ec.prototype.possiblyEvaluate = function(N, W, le) {
              for (var ke = new il(this._properties), qe = 0, et = Object.keys(this._values); qe < et.length; qe += 1) {
                var dt = et[qe];
                ke._values[dt] = this._values[dt].possiblyEvaluate(N, W, le);
              }
              return ke;
            }, ec.prototype.hasTransition = function() {
              for (var N = 0, W = Object.keys(this._values); N < W.length; N += 1) {
                var le = W[N];
                if (this._values[le].prior) return !0;
              }
              return !1;
            };
            var rl = function(N) {
              this._properties = N, this._values = Object.create(N.defaultPropertyValues);
            };
            rl.prototype.getValue = function(N) {
              return T(this._values[N].value);
            }, rl.prototype.setValue = function(N, W) {
              this._values[N] = new au(this._values[N].property, W === null ? void 0 : T(W));
            }, rl.prototype.serialize = function() {
              for (var N = {}, W = 0, le = Object.keys(this._values); W < le.length; W += 1) {
                var ke = le[W], qe = this.getValue(ke);
                qe !== void 0 && (N[ke] = qe);
              }
              return N;
            }, rl.prototype.possiblyEvaluate = function(N, W, le) {
              for (var ke = new il(this._properties), qe = 0, et = Object.keys(this._values); qe < et.length; qe += 1) {
                var dt = et[qe];
                ke._values[dt] = this._values[dt].possiblyEvaluate(N, W, le);
              }
              return ke;
            };
            var Na = function(N, W, le) {
              this.property = N, this.value = W, this.parameters = le;
            };
            Na.prototype.isConstant = function() {
              return this.value.kind === "constant";
            }, Na.prototype.constantOr = function(N) {
              return this.value.kind === "constant" ? this.value.value : N;
            }, Na.prototype.evaluate = function(N, W, le, ke) {
              return this.property.evaluate(this.value, this.parameters, N, W, le, ke);
            };
            var il = function(N) {
              this._properties = N, this._values = Object.create(N.defaultPossiblyEvaluatedValues);
            };
            il.prototype.get = function(N) {
              return this._values[N];
            };
            var ni = function(N) {
              this.specification = N;
            };
            ni.prototype.possiblyEvaluate = function(N, W) {
              return N.expression.evaluate(W);
            }, ni.prototype.interpolate = function(N, W, le) {
              var ke = Pa[this.specification.type];
              return ke ? ke(N, W, le) : N;
            };
            var Ci = function(N, W) {
              this.specification = N, this.overrides = W;
            };
            Ci.prototype.possiblyEvaluate = function(N, W, le, ke) {
              return N.expression.kind === "constant" || N.expression.kind === "camera" ? new Na(this, { kind: "constant", value: N.expression.evaluate(W, null, {}, le, ke) }, W) : new Na(this, N.expression, W);
            }, Ci.prototype.interpolate = function(N, W, le) {
              if (N.value.kind !== "constant" || W.value.kind !== "constant") return N;
              if (N.value.value === void 0 || W.value.value === void 0) return new Na(this, { kind: "constant", value: void 0 }, N.parameters);
              var ke = Pa[this.specification.type];
              return ke ? new Na(this, { kind: "constant", value: ke(N.value.value, W.value.value, le) }, N.parameters) : N;
            }, Ci.prototype.evaluate = function(N, W, le, ke, qe, et) {
              return N.kind === "constant" ? N.value : N.evaluate(W, le, ke, qe, et);
            };
            var us = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.possiblyEvaluate = function(le, ke, qe, et) {
                if (le.value === void 0) return new Na(this, { kind: "constant", value: void 0 }, ke);
                if (le.expression.kind === "constant") {
                  var dt = le.expression.evaluate(ke, null, {}, qe, et), Ct = le.property.specification.type === "resolvedImage" && typeof dt != "string" ? dt.name : dt, Ut = this._calculate(Ct, Ct, Ct, ke);
                  return new Na(this, { kind: "constant", value: Ut }, ke);
                }
                if (le.expression.kind === "camera") {
                  var tn = this._calculate(le.expression.evaluate({ zoom: ke.zoom - 1 }), le.expression.evaluate({ zoom: ke.zoom }), le.expression.evaluate({ zoom: ke.zoom + 1 }), ke);
                  return new Na(this, { kind: "constant", value: tn }, ke);
                }
                return new Na(this, le.expression, ke);
              }, W.prototype.evaluate = function(le, ke, qe, et, dt, Ct) {
                if (le.kind === "source") {
                  var Ut = le.evaluate(ke, qe, et, dt, Ct);
                  return this._calculate(Ut, Ut, Ut, ke);
                }
                return le.kind === "composite" ? this._calculate(le.evaluate({ zoom: Math.floor(ke.zoom) - 1 }, qe, et), le.evaluate({ zoom: Math.floor(ke.zoom) }, qe, et), le.evaluate({ zoom: Math.floor(ke.zoom) + 1 }, qe, et), ke) : le.value;
              }, W.prototype._calculate = function(le, ke, qe, et) {
                return et.zoom > et.zoomHistory.lastIntegerZoom ? { from: le, to: ke } : { from: qe, to: ke };
              }, W.prototype.interpolate = function(le) {
                return le;
              }, W;
            }(Ci), al = function(N) {
              this.specification = N;
            };
            al.prototype.possiblyEvaluate = function(N, W, le, ke) {
              if (N.value !== void 0) {
                if (N.expression.kind === "constant") {
                  var qe = N.expression.evaluate(W, null, {}, le, ke);
                  return this._calculate(qe, qe, qe, W);
                }
                return this._calculate(N.expression.evaluate(new ma(Math.floor(W.zoom - 1), W)), N.expression.evaluate(new ma(Math.floor(W.zoom), W)), N.expression.evaluate(new ma(Math.floor(W.zoom + 1), W)), W);
              }
            }, al.prototype._calculate = function(N, W, le, ke) {
              return ke.zoom > ke.zoomHistory.lastIntegerZoom ? { from: N, to: W } : { from: le, to: W };
            }, al.prototype.interpolate = function(N) {
              return N;
            };
            var ou = function(N) {
              this.specification = N;
            };
            ou.prototype.possiblyEvaluate = function(N, W, le, ke) {
              return !!N.expression.evaluate(W, null, {}, le, ke);
            }, ou.prototype.interpolate = function() {
              return !1;
            };
            var Za = function(N) {
              for (var W in this.properties = N, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = [], N) {
                var le = N[W];
                le.specification.overridable && this.overridableProperties.push(W);
                var ke = this.defaultPropertyValues[W] = new au(le, void 0), qe = this.defaultTransitionablePropertyValues[W] = new $s(le);
                this.defaultTransitioningPropertyValues[W] = qe.untransitioned(), this.defaultPossiblyEvaluatedValues[W] = ke.possiblyEvaluate({});
              }
            };
            xi("DataDrivenProperty", Ci), xi("DataConstantProperty", ni), xi("CrossFadedDataDrivenProperty", us), xi("CrossFadedProperty", al), xi("ColorRampProperty", ou);
            var su = "-transition", na = function(N) {
              function W(le, ke) {
                if (N.call(this), this.id = le.id, this.type = le.type, this._featureFilter = { filter: function() {
                  return !0;
                }, needGeometry: !1 }, le.type !== "custom" && (this.metadata = le.metadata, this.minzoom = le.minzoom, this.maxzoom = le.maxzoom, le.type !== "background" && (this.source = le.source, this.sourceLayer = le["source-layer"], this.filter = le.filter), ke.layout && (this._unevaluatedLayout = new rl(ke.layout)), ke.paint)) {
                  for (var qe in this._transitionablePaint = new bl(ke.paint), le.paint) this.setPaintProperty(qe, le.paint[qe], { validate: !1 });
                  for (var et in le.layout) this.setLayoutProperty(et, le.layout[et], { validate: !1 });
                  this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new il(ke.paint);
                }
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.getCrossfadeParameters = function() {
                return this._crossfadeParameters;
              }, W.prototype.getLayoutProperty = function(le) {
                return le === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(le);
              }, W.prototype.setLayoutProperty = function(le, ke, qe) {
                if (qe === void 0 && (qe = {}), ke != null) {
                  var et = "layers." + this.id + ".layout." + le;
                  if (this._validate(Qs, et, le, ke, qe)) return;
                }
                le !== "visibility" ? this._unevaluatedLayout.setValue(le, ke) : this.visibility = ke;
              }, W.prototype.getPaintProperty = function(le) {
                return I(le, su) ? this._transitionablePaint.getTransition(le.slice(0, -11)) : this._transitionablePaint.getValue(le);
              }, W.prototype.setPaintProperty = function(le, ke, qe) {
                if (qe === void 0 && (qe = {}), ke != null) {
                  var et = "layers." + this.id + ".paint." + le;
                  if (this._validate(Uo, et, le, ke, qe)) return !1;
                }
                if (I(le, su)) return this._transitionablePaint.setTransition(le.slice(0, -11), ke || void 0), !1;
                var dt = this._transitionablePaint._values[le], Ct = dt.property.specification["property-type"] === "cross-faded-data-driven", Ut = dt.value.isDataDriven(), tn = dt.value;
                this._transitionablePaint.setValue(le, ke), this._handleSpecialPaintPropertyUpdate(le);
                var nn = this._transitionablePaint._values[le].value;
                return nn.isDataDriven() || Ut || Ct || this._handleOverridablePaintPropertyUpdate(le, tn, nn);
              }, W.prototype._handleSpecialPaintPropertyUpdate = function(le) {
              }, W.prototype._handleOverridablePaintPropertyUpdate = function(le, ke, qe) {
                return !1;
              }, W.prototype.isHidden = function(le) {
                return !!(this.minzoom && le < this.minzoom) || !!(this.maxzoom && le >= this.maxzoom) || this.visibility === "none";
              }, W.prototype.updateTransitions = function(le) {
                this._transitioningPaint = this._transitionablePaint.transitioned(le, this._transitioningPaint);
              }, W.prototype.hasTransition = function() {
                return this._transitioningPaint.hasTransition();
              }, W.prototype.recalculate = function(le, ke) {
                le.getCrossfadeParameters && (this._crossfadeParameters = le.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(le, void 0, ke)), this.paint = this._transitioningPaint.possiblyEvaluate(le, void 0, ke);
              }, W.prototype.serialize = function() {
                var le = { 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() };
                return this.visibility && (le.layout = le.layout || {}, le.layout.visibility = this.visibility), O(le, function(ke, qe) {
                  return !(ke === void 0 || qe === "layout" && !Object.keys(ke).length || qe === "paint" && !Object.keys(ke).length);
                });
              }, W.prototype._validate = function(le, ke, qe, et, dt) {
                return dt === void 0 && (dt = {}), (!dt || dt.validate !== !1) && os(this, le.call(jo, { key: ke, layerType: this.type, objectKey: qe, value: et, styleSpec: st, style: { glyphs: !0, sprite: !0 } }));
              }, W.prototype.is3D = function() {
                return !1;
              }, W.prototype.isTileClipped = function() {
                return !1;
              }, W.prototype.hasOffscreenPass = function() {
                return !1;
              }, W.prototype.resize = function() {
              }, W.prototype.isStateDependent = function() {
                for (var le in this.paint._values) {
                  var ke = this.paint.get(le);
                  if (ke instanceof Na && _s(ke.property.specification) && (ke.value.kind === "source" || ke.value.kind === "composite") && ke.value.isStateDependent) return !0;
                }
                return !1;
              }, W;
            }(lt), tc = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array }, bi = function(N, W) {
              this._structArray = N, this._pos1 = W * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;
            }, ci = function() {
              this.isTransferred = !1, this.capacity = -1, this.resize(0);
            };
            function He(N, W) {
              W === void 0 && (W = 1);
              var le = 0, ke = 0;
              return { members: N.map(function(qe) {
                var et, dt = (et = qe.type, tc[et].BYTES_PER_ELEMENT), Ct = le = Pe(le, Math.max(W, dt)), Ut = qe.components || 1;
                return ke = Math.max(ke, dt), le += dt * Ut, { name: qe.name, type: qe.type, components: Ut, offset: Ct };
              }), size: Pe(le, Math.max(ke, W)), alignment: W };
            }
            function Pe(N, W) {
              return Math.ceil(N / W) * W;
            }
            ci.serialize = function(N, W) {
              return N._trim(), W && (N.isTransferred = !0, W.push(N.arrayBuffer)), { length: N.length, arrayBuffer: N.arrayBuffer };
            }, ci.deserialize = function(N) {
              var W = Object.create(this.prototype);
              return W.arrayBuffer = N.arrayBuffer, W.length = N.length, W.capacity = N.arrayBuffer.byteLength / W.bytesPerElement, W._refreshViews(), W;
            }, ci.prototype._trim = function() {
              this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews());
            }, ci.prototype.clear = function() {
              this.length = 0;
            }, ci.prototype.resize = function(N) {
              this.reserve(N), this.length = N;
            }, ci.prototype.reserve = function(N) {
              if (N > this.capacity) {
                this.capacity = Math.max(N, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);
                var W = this.uint8;
                this._refreshViews(), W && this.uint8.set(W);
              }
            }, ci.prototype._refreshViews = function() {
              throw new Error("_refreshViews() must be implemented by each concrete StructArray layout");
            };
            var it = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke) {
                var qe = this.length;
                return this.resize(qe + 1), this.emplace(qe, le, ke);
              }, W.prototype.emplace = function(le, ke, qe) {
                var et = 2 * le;
                return this.int16[et + 0] = ke, this.int16[et + 1] = qe, le;
              }, W;
            }(ci);
            it.prototype.bytesPerElement = 4, xi("StructArrayLayout2i4", it);
            var bt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et) {
                var dt = this.length;
                return this.resize(dt + 1), this.emplace(dt, le, ke, qe, et);
              }, W.prototype.emplace = function(le, ke, qe, et, dt) {
                var Ct = 4 * le;
                return this.int16[Ct + 0] = ke, this.int16[Ct + 1] = qe, this.int16[Ct + 2] = et, this.int16[Ct + 3] = dt, le;
              }, W;
            }(ci);
            bt.prototype.bytesPerElement = 8, xi("StructArrayLayout4i8", bt);
            var Ue = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct) {
                var Ut = this.length;
                return this.resize(Ut + 1), this.emplace(Ut, le, ke, qe, et, dt, Ct);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut) {
                var tn = 6 * le;
                return this.int16[tn + 0] = ke, this.int16[tn + 1] = qe, this.int16[tn + 2] = et, this.int16[tn + 3] = dt, this.int16[tn + 4] = Ct, this.int16[tn + 5] = Ut, le;
              }, W;
            }(ci);
            Ue.prototype.bytesPerElement = 12, xi("StructArrayLayout2i4i12", Ue);
            var Qe = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct) {
                var Ut = this.length;
                return this.resize(Ut + 1), this.emplace(Ut, le, ke, qe, et, dt, Ct);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut) {
                var tn = 4 * le, nn = 8 * le;
                return this.int16[tn + 0] = ke, this.int16[tn + 1] = qe, this.uint8[nn + 4] = et, this.uint8[nn + 5] = dt, this.uint8[nn + 6] = Ct, this.uint8[nn + 7] = Ut, le;
              }, W;
            }(ci);
            Qe.prototype.bytesPerElement = 8, xi("StructArrayLayout2i4ub8", Qe);
            var ht = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke) {
                var qe = this.length;
                return this.resize(qe + 1), this.emplace(qe, le, ke);
              }, W.prototype.emplace = function(le, ke, qe) {
                var et = 2 * le;
                return this.float32[et + 0] = ke, this.float32[et + 1] = qe, le;
              }, W;
            }(ci);
            ht.prototype.bytesPerElement = 8, xi("StructArrayLayout2f8", ht);
            var Z = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn) {
                var vn = this.length;
                return this.resize(vn + 1), this.emplace(vn, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn) {
                var mn = 10 * le;
                return this.uint16[mn + 0] = ke, this.uint16[mn + 1] = qe, this.uint16[mn + 2] = et, this.uint16[mn + 3] = dt, this.uint16[mn + 4] = Ct, this.uint16[mn + 5] = Ut, this.uint16[mn + 6] = tn, this.uint16[mn + 7] = nn, this.uint16[mn + 8] = cn, this.uint16[mn + 9] = vn, le;
              }, W;
            }(ci);
            Z.prototype.bytesPerElement = 20, xi("StructArrayLayout10ui20", Z);
            var B = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn) {
                var On = this.length;
                return this.resize(On + 1), this.emplace(On, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On) {
                var Bn = 12 * le;
                return this.int16[Bn + 0] = ke, this.int16[Bn + 1] = qe, this.int16[Bn + 2] = et, this.int16[Bn + 3] = dt, this.uint16[Bn + 4] = Ct, this.uint16[Bn + 5] = Ut, this.uint16[Bn + 6] = tn, this.uint16[Bn + 7] = nn, this.int16[Bn + 8] = cn, this.int16[Bn + 9] = vn, this.int16[Bn + 10] = mn, this.int16[Bn + 11] = On, le;
              }, W;
            }(ci);
            B.prototype.bytesPerElement = 24, xi("StructArrayLayout4i4ui4i24", B);
            var y = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe) {
                var et = this.length;
                return this.resize(et + 1), this.emplace(et, le, ke, qe);
              }, W.prototype.emplace = function(le, ke, qe, et) {
                var dt = 3 * le;
                return this.float32[dt + 0] = ke, this.float32[dt + 1] = qe, this.float32[dt + 2] = et, le;
              }, W;
            }(ci);
            y.prototype.bytesPerElement = 12, xi("StructArrayLayout3f12", y);
            var b = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le) {
                var ke = this.length;
                return this.resize(ke + 1), this.emplace(ke, le);
              }, W.prototype.emplace = function(le, ke) {
                var qe = 1 * le;
                return this.uint32[qe + 0] = ke, le;
              }, W;
            }(ci);
            b.prototype.bytesPerElement = 4, xi("StructArrayLayout1ul4", b);
            var R = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct, Ut, tn, nn) {
                var cn = this.length;
                return this.resize(cn + 1), this.emplace(cn, le, ke, qe, et, dt, Ct, Ut, tn, nn);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn) {
                var vn = 10 * le, mn = 5 * le;
                return this.int16[vn + 0] = ke, this.int16[vn + 1] = qe, this.int16[vn + 2] = et, this.int16[vn + 3] = dt, this.int16[vn + 4] = Ct, this.int16[vn + 5] = Ut, this.uint32[mn + 3] = tn, this.uint16[vn + 8] = nn, this.uint16[vn + 9] = cn, le;
              }, W;
            }(ci);
            R.prototype.bytesPerElement = 20, xi("StructArrayLayout6i1ul2ui20", R);
            var j = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct) {
                var Ut = this.length;
                return this.resize(Ut + 1), this.emplace(Ut, le, ke, qe, et, dt, Ct);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut) {
                var tn = 6 * le;
                return this.int16[tn + 0] = ke, this.int16[tn + 1] = qe, this.int16[tn + 2] = et, this.int16[tn + 3] = dt, this.int16[tn + 4] = Ct, this.int16[tn + 5] = Ut, le;
              }, W;
            }(ci);
            j.prototype.bytesPerElement = 12, xi("StructArrayLayout2i2i2i12", j);
            var G = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt) {
                var Ct = this.length;
                return this.resize(Ct + 1), this.emplace(Ct, le, ke, qe, et, dt);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct) {
                var Ut = 4 * le, tn = 8 * le;
                return this.float32[Ut + 0] = ke, this.float32[Ut + 1] = qe, this.float32[Ut + 2] = et, this.int16[tn + 6] = dt, this.int16[tn + 7] = Ct, le;
              }, W;
            }(ci);
            G.prototype.bytesPerElement = 16, xi("StructArrayLayout2f1f2i16", G);
            var ie = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et) {
                var dt = this.length;
                return this.resize(dt + 1), this.emplace(dt, le, ke, qe, et);
              }, W.prototype.emplace = function(le, ke, qe, et, dt) {
                var Ct = 12 * le, Ut = 3 * le;
                return this.uint8[Ct + 0] = ke, this.uint8[Ct + 1] = qe, this.float32[Ut + 1] = et, this.float32[Ut + 2] = dt, le;
              }, W;
            }(ci);
            ie.prototype.bytesPerElement = 12, xi("StructArrayLayout2ub2f12", ie);
            var fe = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe) {
                var et = this.length;
                return this.resize(et + 1), this.emplace(et, le, ke, qe);
              }, W.prototype.emplace = function(le, ke, qe, et) {
                var dt = 3 * le;
                return this.uint16[dt + 0] = ke, this.uint16[dt + 1] = qe, this.uint16[dt + 2] = et, le;
              }, W;
            }(ci);
            fe.prototype.bytesPerElement = 6, xi("StructArrayLayout3ui6", fe);
            var xe = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                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);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr) {
                var _r = this.length;
                return this.resize(_r + 1), this.emplace(_r, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr, _r) {
                var Lr = 24 * le, Ur = 12 * le, $r = 48 * le;
                return this.int16[Lr + 0] = ke, this.int16[Lr + 1] = qe, this.uint16[Lr + 2] = et, this.uint16[Lr + 3] = dt, this.uint32[Ur + 2] = Ct, this.uint32[Ur + 3] = Ut, this.uint32[Ur + 4] = tn, this.uint16[Lr + 10] = nn, this.uint16[Lr + 11] = cn, this.uint16[Lr + 12] = vn, this.float32[Ur + 7] = mn, this.float32[Ur + 8] = On, this.uint8[$r + 36] = Bn, this.uint8[$r + 37] = ar, this.uint8[$r + 38] = tr, this.uint32[Ur + 10] = xr, this.int16[Lr + 22] = _r, le;
              }, W;
            }(ci);
            xe.prototype.bytesPerElement = 48, xi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", xe);
            var Te = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                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);
              }, W.prototype.emplaceBack = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr, _r, Lr, Ur, $r, ai, Hr, hi, Ti, ta, zi, Ki) {
                var $i = this.length;
                return this.resize($i + 1), this.emplace($i, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr, _r, Lr, Ur, $r, ai, Hr, hi, Ti, ta, zi, Ki);
              }, W.prototype.emplace = function(le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn, ar, tr, xr, _r, Lr, Ur, $r, ai, Hr, hi, Ti, ta, zi, Ki, $i) {
                var Ii = 34 * le, za = 17 * le;
                return this.int16[Ii + 0] = ke, this.int16[Ii + 1] = qe, this.int16[Ii + 2] = et, this.int16[Ii + 3] = dt, this.int16[Ii + 4] = Ct, this.int16[Ii + 5] = Ut, this.int16[Ii + 6] = tn, this.int16[Ii + 7] = nn, this.uint16[Ii + 8] = cn, this.uint16[Ii + 9] = vn, this.uint16[Ii + 10] = mn, this.uint16[Ii + 11] = On, this.uint16[Ii + 12] = Bn, this.uint16[Ii + 13] = ar, this.uint16[Ii + 14] = tr, this.uint16[Ii + 15] = xr, this.uint16[Ii + 16] = _r, this.uint16[Ii + 17] = Lr, this.uint16[Ii + 18] = Ur, this.uint16[Ii + 19] = $r, this.uint16[Ii + 20] = ai, this.uint16[Ii + 21] = Hr, this.uint16[Ii + 22] = hi, this.uint32[za + 12] = Ti, this.float32[za + 13] = ta, this.float32[za + 14] = zi, this.float32[za + 15] = Ki, this.float32[za + 16] = $i, le;
              }, W;
            }(ci);
            Te.prototype.bytesPerElement = 68, xi("StructArrayLayout8i15ui1ul4f68", Te);
            var ze = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le) {
                var ke = this.length;
                return this.resize(ke + 1), this.emplace(ke, le);
              }, W.prototype.emplace = function(le, ke) {
                var qe = 1 * le;
                return this.float32[qe + 0] = ke, le;
              }, W;
            }(ci);
            ze.prototype.bytesPerElement = 4, xi("StructArrayLayout1f4", ze);
            var Ve = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe) {
                var et = this.length;
                return this.resize(et + 1), this.emplace(et, le, ke, qe);
              }, W.prototype.emplace = function(le, ke, qe, et) {
                var dt = 3 * le;
                return this.int16[dt + 0] = ke, this.int16[dt + 1] = qe, this.int16[dt + 2] = et, le;
              }, W;
            }(ci);
            Ve.prototype.bytesPerElement = 6, xi("StructArrayLayout3i6", Ve);
            var ut = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe) {
                var et = this.length;
                return this.resize(et + 1), this.emplace(et, le, ke, qe);
              }, W.prototype.emplace = function(le, ke, qe, et) {
                var dt = 2 * le, Ct = 4 * le;
                return this.uint32[dt + 0] = ke, this.uint16[Ct + 2] = qe, this.uint16[Ct + 3] = et, le;
              }, W;
            }(ci);
            ut.prototype.bytesPerElement = 8, xi("StructArrayLayout1ul2ui8", ut);
            var gt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke) {
                var qe = this.length;
                return this.resize(qe + 1), this.emplace(qe, le, ke);
              }, W.prototype.emplace = function(le, ke, qe) {
                var et = 2 * le;
                return this.uint16[et + 0] = ke, this.uint16[et + 1] = qe, le;
              }, W;
            }(ci);
            gt.prototype.bytesPerElement = 4, xi("StructArrayLayout2ui4", gt);
            var wt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le) {
                var ke = this.length;
                return this.resize(ke + 1), this.emplace(ke, le);
              }, W.prototype.emplace = function(le, ke) {
                var qe = 1 * le;
                return this.uint16[qe + 0] = ke, le;
              }, W;
            }(ci);
            wt.prototype.bytesPerElement = 2, xi("StructArrayLayout1ui2", wt);
            var Et = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._refreshViews = function() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }, W.prototype.emplaceBack = function(le, ke, qe, et) {
                var dt = this.length;
                return this.resize(dt + 1), this.emplace(dt, le, ke, qe, et);
              }, W.prototype.emplace = function(le, ke, qe, et, dt) {
                var Ct = 4 * le;
                return this.float32[Ct + 0] = ke, this.float32[Ct + 1] = qe, this.float32[Ct + 2] = et, this.float32[Ct + 3] = dt, le;
              }, W;
            }(ci);
            Et.prototype.bytesPerElement = 16, xi("StructArrayLayout4f16", Et);
            var zt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W;
              var le = { anchorPointX: { configurable: !0 }, anchorPointY: { configurable: !0 }, x1: { configurable: !0 }, y1: { configurable: !0 }, x2: { configurable: !0 }, y2: { configurable: !0 }, featureIndex: { configurable: !0 }, sourceLayerIndex: { configurable: !0 }, bucketIndex: { configurable: !0 }, anchorPoint: { configurable: !0 } };
              return le.anchorPointX.get = function() {
                return this._structArray.int16[this._pos2 + 0];
              }, le.anchorPointY.get = function() {
                return this._structArray.int16[this._pos2 + 1];
              }, le.x1.get = function() {
                return this._structArray.int16[this._pos2 + 2];
              }, le.y1.get = function() {
                return this._structArray.int16[this._pos2 + 3];
              }, le.x2.get = function() {
                return this._structArray.int16[this._pos2 + 4];
              }, le.y2.get = function() {
                return this._structArray.int16[this._pos2 + 5];
              }, le.featureIndex.get = function() {
                return this._structArray.uint32[this._pos4 + 3];
              }, le.sourceLayerIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 8];
              }, le.bucketIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 9];
              }, le.anchorPoint.get = function() {
                return new f(this.anchorPointX, this.anchorPointY);
              }, Object.defineProperties(W.prototype, le), W;
            }(bi);
            zt.prototype.size = 20;
            var It = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.get = function(le) {
                return new zt(this, le);
              }, W;
            }(R);
            xi("CollisionBoxArray", It);
            var jt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W;
              var le = { anchorX: { configurable: !0 }, anchorY: { configurable: !0 }, glyphStartIndex: { configurable: !0 }, numGlyphs: { configurable: !0 }, vertexStartIndex: { configurable: !0 }, lineStartIndex: { configurable: !0 }, lineLength: { configurable: !0 }, segment: { configurable: !0 }, lowerSize: { configurable: !0 }, upperSize: { configurable: !0 }, lineOffsetX: { configurable: !0 }, lineOffsetY: { configurable: !0 }, writingMode: { configurable: !0 }, placedOrientation: { configurable: !0 }, hidden: { configurable: !0 }, crossTileID: { configurable: !0 }, associatedIconIndex: { configurable: !0 } };
              return le.anchorX.get = function() {
                return this._structArray.int16[this._pos2 + 0];
              }, le.anchorY.get = function() {
                return this._structArray.int16[this._pos2 + 1];
              }, le.glyphStartIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 2];
              }, le.numGlyphs.get = function() {
                return this._structArray.uint16[this._pos2 + 3];
              }, le.vertexStartIndex.get = function() {
                return this._structArray.uint32[this._pos4 + 2];
              }, le.lineStartIndex.get = function() {
                return this._structArray.uint32[this._pos4 + 3];
              }, le.lineLength.get = function() {
                return this._structArray.uint32[this._pos4 + 4];
              }, le.segment.get = function() {
                return this._structArray.uint16[this._pos2 + 10];
              }, le.lowerSize.get = function() {
                return this._structArray.uint16[this._pos2 + 11];
              }, le.upperSize.get = function() {
                return this._structArray.uint16[this._pos2 + 12];
              }, le.lineOffsetX.get = function() {
                return this._structArray.float32[this._pos4 + 7];
              }, le.lineOffsetY.get = function() {
                return this._structArray.float32[this._pos4 + 8];
              }, le.writingMode.get = function() {
                return this._structArray.uint8[this._pos1 + 36];
              }, le.placedOrientation.get = function() {
                return this._structArray.uint8[this._pos1 + 37];
              }, le.placedOrientation.set = function(ke) {
                this._structArray.uint8[this._pos1 + 37] = ke;
              }, le.hidden.get = function() {
                return this._structArray.uint8[this._pos1 + 38];
              }, le.hidden.set = function(ke) {
                this._structArray.uint8[this._pos1 + 38] = ke;
              }, le.crossTileID.get = function() {
                return this._structArray.uint32[this._pos4 + 10];
              }, le.crossTileID.set = function(ke) {
                this._structArray.uint32[this._pos4 + 10] = ke;
              }, le.associatedIconIndex.get = function() {
                return this._structArray.int16[this._pos2 + 22];
              }, Object.defineProperties(W.prototype, le), W;
            }(bi);
            jt.prototype.size = 48;
            var Lt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.get = function(le) {
                return new jt(this, le);
              }, W;
            }(xe);
            xi("PlacedSymbolArray", Lt);
            var Zt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W;
              var le = { anchorX: { configurable: !0 }, anchorY: { configurable: !0 }, rightJustifiedTextSymbolIndex: { configurable: !0 }, centerJustifiedTextSymbolIndex: { configurable: !0 }, leftJustifiedTextSymbolIndex: { configurable: !0 }, verticalPlacedTextSymbolIndex: { configurable: !0 }, placedIconSymbolIndex: { configurable: !0 }, verticalPlacedIconSymbolIndex: { configurable: !0 }, key: { configurable: !0 }, textBoxStartIndex: { configurable: !0 }, textBoxEndIndex: { configurable: !0 }, verticalTextBoxStartIndex: { configurable: !0 }, verticalTextBoxEndIndex: { configurable: !0 }, iconBoxStartIndex: { configurable: !0 }, iconBoxEndIndex: { configurable: !0 }, verticalIconBoxStartIndex: { configurable: !0 }, verticalIconBoxEndIndex: { configurable: !0 }, featureIndex: { configurable: !0 }, numHorizontalGlyphVertices: { configurable: !0 }, numVerticalGlyphVertices: { configurable: !0 }, numIconVertices: { configurable: !0 }, numVerticalIconVertices: { configurable: !0 }, useRuntimeCollisionCircles: { configurable: !0 }, crossTileID: { configurable: !0 }, textBoxScale: { configurable: !0 }, textOffset0: { configurable: !0 }, textOffset1: { configurable: !0 }, collisionCircleDiameter: { configurable: !0 } };
              return le.anchorX.get = function() {
                return this._structArray.int16[this._pos2 + 0];
              }, le.anchorY.get = function() {
                return this._structArray.int16[this._pos2 + 1];
              }, le.rightJustifiedTextSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 2];
              }, le.centerJustifiedTextSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 3];
              }, le.leftJustifiedTextSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 4];
              }, le.verticalPlacedTextSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 5];
              }, le.placedIconSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 6];
              }, le.verticalPlacedIconSymbolIndex.get = function() {
                return this._structArray.int16[this._pos2 + 7];
              }, le.key.get = function() {
                return this._structArray.uint16[this._pos2 + 8];
              }, le.textBoxStartIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 9];
              }, le.textBoxEndIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 10];
              }, le.verticalTextBoxStartIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 11];
              }, le.verticalTextBoxEndIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 12];
              }, le.iconBoxStartIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 13];
              }, le.iconBoxEndIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 14];
              }, le.verticalIconBoxStartIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 15];
              }, le.verticalIconBoxEndIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 16];
              }, le.featureIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 17];
              }, le.numHorizontalGlyphVertices.get = function() {
                return this._structArray.uint16[this._pos2 + 18];
              }, le.numVerticalGlyphVertices.get = function() {
                return this._structArray.uint16[this._pos2 + 19];
              }, le.numIconVertices.get = function() {
                return this._structArray.uint16[this._pos2 + 20];
              }, le.numVerticalIconVertices.get = function() {
                return this._structArray.uint16[this._pos2 + 21];
              }, le.useRuntimeCollisionCircles.get = function() {
                return this._structArray.uint16[this._pos2 + 22];
              }, le.crossTileID.get = function() {
                return this._structArray.uint32[this._pos4 + 12];
              }, le.crossTileID.set = function(ke) {
                this._structArray.uint32[this._pos4 + 12] = ke;
              }, le.textBoxScale.get = function() {
                return this._structArray.float32[this._pos4 + 13];
              }, le.textOffset0.get = function() {
                return this._structArray.float32[this._pos4 + 14];
              }, le.textOffset1.get = function() {
                return this._structArray.float32[this._pos4 + 15];
              }, le.collisionCircleDiameter.get = function() {
                return this._structArray.float32[this._pos4 + 16];
              }, Object.defineProperties(W.prototype, le), W;
            }(bi);
            Zt.prototype.size = 68;
            var Qt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.get = function(le) {
                return new Zt(this, le);
              }, W;
            }(Te);
            xi("SymbolInstanceArray", Qt);
            var Xt = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.getoffsetX = function(le) {
                return this.float32[1 * le + 0];
              }, W;
            }(ze);
            xi("GlyphOffsetArray", Xt);
            var yn = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.getx = function(le) {
                return this.int16[3 * le + 0];
              }, W.prototype.gety = function(le) {
                return this.int16[3 * le + 1];
              }, W.prototype.gettileUnitDistanceFromAnchor = function(le) {
                return this.int16[3 * le + 2];
              }, W;
            }(Ve);
            xi("SymbolLineVertexArray", yn);
            var Sn = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W;
              var le = { featureIndex: { configurable: !0 }, sourceLayerIndex: { configurable: !0 }, bucketIndex: { configurable: !0 } };
              return le.featureIndex.get = function() {
                return this._structArray.uint32[this._pos4 + 0];
              }, le.sourceLayerIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 2];
              }, le.bucketIndex.get = function() {
                return this._structArray.uint16[this._pos2 + 3];
              }, Object.defineProperties(W.prototype, le), W;
            }(bi);
            Sn.prototype.size = 8;
            var Un = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.get = function(le) {
                return new Sn(this, le);
              }, W;
            }(ut);
            xi("FeatureIndexArray", Un);
            var Vn = He([{ name: "a_pos", components: 2, type: "Int16" }], 4).members, Yn = function(N) {
              N === void 0 && (N = []), this.segments = N;
            };
            function er(N, W) {
              return 256 * (N = k(Math.floor(N), 0, 255)) + k(Math.floor(W), 0, 255);
            }
            Yn.prototype.prepareSegment = function(N, W, le, ke) {
              var qe = this.segments[this.segments.length - 1];
              return N > Yn.MAX_VERTEX_ARRAY_LENGTH && F("Max vertices per segment is " + Yn.MAX_VERTEX_ARRAY_LENGTH + ": bucket requested " + N), (!qe || qe.vertexLength + N > Yn.MAX_VERTEX_ARRAY_LENGTH || qe.sortKey !== ke) && (qe = { vertexOffset: W.length, primitiveOffset: le.length, vertexLength: 0, primitiveLength: 0 }, ke !== void 0 && (qe.sortKey = ke), this.segments.push(qe)), qe;
            }, Yn.prototype.get = function() {
              return this.segments;
            }, Yn.prototype.destroy = function() {
              for (var N = 0, W = this.segments; N < W.length; N += 1) {
                var le = W[N];
                for (var ke in le.vaos) le.vaos[ke].destroy();
              }
            }, Yn.simpleSegment = function(N, W, le, ke) {
              return new Yn([{ vertexOffset: N, primitiveOffset: W, vertexLength: le, primitiveLength: ke, vaos: {}, sortKey: 0 }]);
            }, Yn.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, xi("SegmentVector", Yn);
            var kr = He([{ 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" }]), or = h(function(N) {
              N.exports = function(W, le) {
                var ke, qe, et, dt, Ct, Ut, tn, nn;
                for (ke = 3 & W.length, qe = W.length - ke, et = le, Ct = 3432918353, Ut = 461845907, nn = 0; nn < qe; ) tn = 255 & W.charCodeAt(nn) | (255 & W.charCodeAt(++nn)) << 8 | (255 & W.charCodeAt(++nn)) << 16 | (255 & W.charCodeAt(++nn)) << 24, ++nn, et = 27492 + (65535 & (dt = 5 * (65535 & (et = (et ^= tn = (65535 & (tn = (tn = (65535 & tn) * Ct + (((tn >>> 16) * Ct & 65535) << 16) & 4294967295) << 15 | tn >>> 17)) * Ut + (((tn >>> 16) * Ut & 65535) << 16) & 4294967295) << 13 | et >>> 19)) + ((5 * (et >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (dt >>> 16) & 65535) << 16);
                switch (tn = 0, ke) {
                  case 3:
                    tn ^= (255 & W.charCodeAt(nn + 2)) << 16;
                  case 2:
                    tn ^= (255 & W.charCodeAt(nn + 1)) << 8;
                  case 1:
                    et ^= tn = (65535 & (tn = (tn = (65535 & (tn ^= 255 & W.charCodeAt(nn))) * Ct + (((tn >>> 16) * Ct & 65535) << 16) & 4294967295) << 15 | tn >>> 17)) * Ut + (((tn >>> 16) * Ut & 65535) << 16) & 4294967295;
                }
                return et ^= W.length, et = 2246822507 * (65535 & (et ^= et >>> 16)) + ((2246822507 * (et >>> 16) & 65535) << 16) & 4294967295, et = 3266489909 * (65535 & (et ^= et >>> 13)) + ((3266489909 * (et >>> 16) & 65535) << 16) & 4294967295, (et ^= et >>> 16) >>> 0;
              };
            }), Mr = h(function(N) {
              N.exports = function(W, le) {
                for (var ke, qe = W.length, et = le ^ qe, dt = 0; qe >= 4; ) ke = 1540483477 * (65535 & (ke = 255 & W.charCodeAt(dt) | (255 & W.charCodeAt(++dt)) << 8 | (255 & W.charCodeAt(++dt)) << 16 | (255 & W.charCodeAt(++dt)) << 24)) + ((1540483477 * (ke >>> 16) & 65535) << 16), et = 1540483477 * (65535 & et) + ((1540483477 * (et >>> 16) & 65535) << 16) ^ (ke = 1540483477 * (65535 & (ke ^= ke >>> 24)) + ((1540483477 * (ke >>> 16) & 65535) << 16)), qe -= 4, ++dt;
                switch (qe) {
                  case 3:
                    et ^= (255 & W.charCodeAt(dt + 2)) << 16;
                  case 2:
                    et ^= (255 & W.charCodeAt(dt + 1)) << 8;
                  case 1:
                    et = 1540483477 * (65535 & (et ^= 255 & W.charCodeAt(dt))) + ((1540483477 * (et >>> 16) & 65535) << 16);
                }
                return et = 1540483477 * (65535 & (et ^= et >>> 13)) + ((1540483477 * (et >>> 16) & 65535) << 16), (et ^= et >>> 15) >>> 0;
              };
            }), fr = or, Or = or, br = Mr;
            fr.murmur3 = Or, fr.murmur2 = br;
            var Nr = function() {
              this.ids = [], this.positions = [], this.indexed = !1;
            };
            Nr.prototype.add = function(N, W, le, ke) {
              this.ids.push(Rr(N)), this.positions.push(W, le, ke);
            }, Nr.prototype.getPositions = function(N) {
              for (var W = Rr(N), le = 0, ke = this.ids.length - 1; le < ke; ) {
                var qe = le + ke >> 1;
                this.ids[qe] >= W ? ke = qe : le = qe + 1;
              }
              for (var et = []; this.ids[le] === W; ) {
                var dt = this.positions[3 * le], Ct = this.positions[3 * le + 1], Ut = this.positions[3 * le + 2];
                et.push({ index: dt, start: Ct, end: Ut }), le++;
              }
              return et;
            }, Nr.serialize = function(N, W) {
              var le = new Float64Array(N.ids), ke = new Uint32Array(N.positions);
              return ei(le, ke, 0, le.length - 1), W && W.push(le.buffer, ke.buffer), { ids: le, positions: ke };
            }, Nr.deserialize = function(N) {
              var W = new Nr();
              return W.ids = N.ids, W.positions = N.positions, W.indexed = !0, W;
            };
            var ii = Math.pow(2, 53) - 1;
            function Rr(N) {
              var W = +N;
              return !isNaN(W) && W <= ii ? W : fr(String(N));
            }
            function ei(N, W, le, ke) {
              for (; le < ke; ) {
                for (var qe = N[le + ke >> 1], et = le - 1, dt = ke + 1; ; ) {
                  do
                    et++;
                  while (N[et] < qe);
                  do
                    dt--;
                  while (N[dt] > qe);
                  if (et >= dt) break;
                  pi(N, et, dt), pi(W, 3 * et, 3 * dt), pi(W, 3 * et + 1, 3 * dt + 1), pi(W, 3 * et + 2, 3 * dt + 2);
                }
                dt - le < ke - dt ? (ei(N, W, le, dt), le = dt + 1) : (ei(N, W, dt + 1, ke), ke = dt);
              }
            }
            function pi(N, W, le) {
              var ke = N[W];
              N[W] = N[le], N[le] = ke;
            }
            xi("FeaturePositionMap", Nr);
            var qi = function(N, W) {
              this.gl = N.gl, this.location = W;
            }, Li = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = 0;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                this.current !== le && (this.current = le, this.gl.uniform1i(this.location, le));
              }, W;
            }(qi), Yi = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = 0;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                this.current !== le && (this.current = le, this.gl.uniform1f(this.location, le));
              }, W;
            }(qi), Gi = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = [0, 0];
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                le[0] === this.current[0] && le[1] === this.current[1] || (this.current = le, this.gl.uniform2f(this.location, le[0], le[1]));
              }, W;
            }(qi), ra = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = [0, 0, 0];
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                le[0] === this.current[0] && le[1] === this.current[1] && le[2] === this.current[2] || (this.current = le, this.gl.uniform3f(this.location, le[0], le[1], le[2]));
              }, W;
            }(qi), wa = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = [0, 0, 0, 0];
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                le[0] === this.current[0] && le[1] === this.current[1] && le[2] === this.current[2] && le[3] === this.current[3] || (this.current = le, this.gl.uniform4f(this.location, le[0], le[1], le[2], le[3]));
              }, W;
            }(qi), uo = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = Zn.transparent;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                le.r === this.current.r && le.g === this.current.g && le.b === this.current.b && le.a === this.current.a || (this.current = le, this.gl.uniform4f(this.location, le.r, le.g, le.b, le.a));
              }, W;
            }(qi), no = new Float32Array(16), Ko = function(N) {
              function W(le, ke) {
                N.call(this, le, ke), this.current = no;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.set = function(le) {
                if (le[12] !== this.current[12] || le[0] !== this.current[0]) return this.current = le, void this.gl.uniformMatrix4fv(this.location, !1, le);
                for (var ke = 1; ke < 16; ke++) if (le[ke] !== this.current[ke]) {
                  this.current = le, this.gl.uniformMatrix4fv(this.location, !1, le);
                  break;
                }
              }, W;
            }(qi);
            function Ia(N) {
              return [er(255 * N.r, 255 * N.g), er(255 * N.b, 255 * N.a)];
            }
            var ca = function(N, W, le) {
              this.value = N, this.uniformNames = W.map(function(ke) {
                return "u_" + ke;
              }), this.type = le;
            };
            ca.prototype.setUniform = function(N, W, le) {
              N.set(le.constantOr(this.value));
            }, ca.prototype.getBinding = function(N, W, le) {
              return this.type === "color" ? new uo(N, W) : new Yi(N, W);
            };
            var Ga = function(N, W) {
              this.uniformNames = W.map(function(le) {
                return "u_" + le;
              }), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1;
            };
            Ga.prototype.setConstantPatternPositions = function(N, W) {
              this.pixelRatioFrom = W.pixelRatio, this.pixelRatioTo = N.pixelRatio, this.patternFrom = W.tlbr, this.patternTo = N.tlbr;
            }, Ga.prototype.setUniform = function(N, W, le, ke) {
              var qe = ke === "u_pattern_to" ? this.patternTo : ke === "u_pattern_from" ? this.patternFrom : ke === "u_pixel_ratio_to" ? this.pixelRatioTo : ke === "u_pixel_ratio_from" ? this.pixelRatioFrom : null;
              qe && N.set(qe);
            }, Ga.prototype.getBinding = function(N, W, le) {
              return le.substr(0, 9) === "u_pattern" ? new wa(N, W) : new Yi(N, W);
            };
            var Oa = function(N, W, le, ke) {
              this.expression = N, this.type = le, this.maxValue = 0, this.paintVertexAttributes = W.map(function(qe) {
                return { name: "a_" + qe, type: "Float32", components: le === "color" ? 2 : 1, offset: 0 };
              }), this.paintVertexArray = new ke();
            };
            Oa.prototype.populatePaintArray = function(N, W, le, ke, qe) {
              var et = this.paintVertexArray.length, dt = this.expression.evaluate(new ma(0), W, {}, ke, [], qe);
              this.paintVertexArray.resize(N), this._setPaintValue(et, N, dt);
            }, Oa.prototype.updatePaintArray = function(N, W, le, ke) {
              var qe = this.expression.evaluate({ zoom: 0 }, le, ke);
              this._setPaintValue(N, W, qe);
            }, Oa.prototype._setPaintValue = function(N, W, le) {
              if (this.type === "color") for (var ke = Ia(le), qe = N; qe < W; qe++) this.paintVertexArray.emplace(qe, ke[0], ke[1]);
              else {
                for (var et = N; et < W; et++) this.paintVertexArray.emplace(et, le);
                this.maxValue = Math.max(this.maxValue, Math.abs(le));
              }
            }, Oa.prototype.upload = function(N) {
              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));
            }, Oa.prototype.destroy = function() {
              this.paintVertexBuffer && this.paintVertexBuffer.destroy();
            };
            var ba = function(N, W, le, ke, qe, et) {
              this.expression = N, this.uniformNames = W.map(function(dt) {
                return "u_" + dt + "_t";
              }), this.type = le, this.useIntegerZoom = ke, this.zoom = qe, this.maxValue = 0, this.paintVertexAttributes = W.map(function(dt) {
                return { name: "a_" + dt, type: "Float32", components: le === "color" ? 4 : 2, offset: 0 };
              }), this.paintVertexArray = new et();
            };
            ba.prototype.populatePaintArray = function(N, W, le, ke, qe) {
              var et = this.expression.evaluate(new ma(this.zoom), W, {}, ke, [], qe), dt = this.expression.evaluate(new ma(this.zoom + 1), W, {}, ke, [], qe), Ct = this.paintVertexArray.length;
              this.paintVertexArray.resize(N), this._setPaintValue(Ct, N, et, dt);
            }, ba.prototype.updatePaintArray = function(N, W, le, ke) {
              var qe = this.expression.evaluate({ zoom: this.zoom }, le, ke), et = this.expression.evaluate({ zoom: this.zoom + 1 }, le, ke);
              this._setPaintValue(N, W, qe, et);
            }, ba.prototype._setPaintValue = function(N, W, le, ke) {
              if (this.type === "color") for (var qe = Ia(le), et = Ia(ke), dt = N; dt < W; dt++) this.paintVertexArray.emplace(dt, qe[0], qe[1], et[0], et[1]);
              else {
                for (var Ct = N; Ct < W; Ct++) this.paintVertexArray.emplace(Ct, le, ke);
                this.maxValue = Math.max(this.maxValue, Math.abs(le), Math.abs(ke));
              }
            }, ba.prototype.upload = function(N) {
              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));
            }, ba.prototype.destroy = function() {
              this.paintVertexBuffer && this.paintVertexBuffer.destroy();
            }, ba.prototype.setUniform = function(N, W) {
              var le = this.useIntegerZoom ? Math.floor(W.zoom) : W.zoom, ke = k(this.expression.interpolationFactor(le, this.zoom, this.zoom + 1), 0, 1);
              N.set(ke);
            }, ba.prototype.getBinding = function(N, W, le) {
              return new Yi(N, W);
            };
            var Da = function(N, W, le, ke, qe, et) {
              this.expression = N, this.type = W, this.useIntegerZoom = le, this.zoom = ke, this.layerId = et, this.zoomInPaintVertexArray = new qe(), this.zoomOutPaintVertexArray = new qe();
            };
            Da.prototype.populatePaintArray = function(N, W, le) {
              var ke = this.zoomInPaintVertexArray.length;
              this.zoomInPaintVertexArray.resize(N), this.zoomOutPaintVertexArray.resize(N), this._setPaintValues(ke, N, W.patterns && W.patterns[this.layerId], le);
            }, Da.prototype.updatePaintArray = function(N, W, le, ke, qe) {
              this._setPaintValues(N, W, le.patterns && le.patterns[this.layerId], qe);
            }, Da.prototype._setPaintValues = function(N, W, le, ke) {
              if (ke && le) {
                var qe = le.min, et = le.mid, dt = le.max, Ct = ke[qe], Ut = ke[et], tn = ke[dt];
                if (Ct && Ut && tn) for (var nn = N; nn < W; nn++) this.zoomInPaintVertexArray.emplace(nn, Ut.tl[0], Ut.tl[1], Ut.br[0], Ut.br[1], Ct.tl[0], Ct.tl[1], Ct.br[0], Ct.br[1], Ut.pixelRatio, Ct.pixelRatio), this.zoomOutPaintVertexArray.emplace(nn, Ut.tl[0], Ut.tl[1], Ut.br[0], Ut.br[1], tn.tl[0], tn.tl[1], tn.br[0], tn.br[1], Ut.pixelRatio, tn.pixelRatio);
              }
            }, Da.prototype.upload = function(N) {
              this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = N.createVertexBuffer(this.zoomInPaintVertexArray, kr.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = N.createVertexBuffer(this.zoomOutPaintVertexArray, kr.members, this.expression.isStateDependent));
            }, Da.prototype.destroy = function() {
              this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();
            };
            var Ua = function(N, W, le) {
              this.binders = {}, this._buffers = [];
              var ke = [];
              for (var qe in N.paint._values) if (le(qe)) {
                var et = N.paint.get(qe);
                if (et instanceof Na && _s(et.property.specification)) {
                  var dt = lu(qe, N.type), Ct = et.value, Ut = et.property.specification.type, tn = et.property.useIntegerZoom, nn = et.property.specification["property-type"], cn = nn === "cross-faded" || nn === "cross-faded-data-driven";
                  if (Ct.kind === "constant") this.binders[qe] = cn ? new Ga(Ct.value, dt) : new ca(Ct.value, dt, Ut), ke.push("/u_" + qe);
                  else if (Ct.kind === "source" || cn) {
                    var vn = xo(qe, Ut, "source");
                    this.binders[qe] = cn ? new Da(Ct, Ut, tn, W, vn, N.id) : new Oa(Ct, dt, Ut, vn), ke.push("/a_" + qe);
                  } else {
                    var mn = xo(qe, Ut, "composite");
                    this.binders[qe] = new ba(Ct, dt, Ut, tn, W, mn), ke.push("/z_" + qe);
                  }
                }
              }
              this.cacheKey = ke.sort().join("");
            };
            Ua.prototype.getMaxValue = function(N) {
              var W = this.binders[N];
              return W instanceof Oa || W instanceof ba ? W.maxValue : 0;
            }, Ua.prototype.populatePaintArrays = function(N, W, le, ke, qe) {
              for (var et in this.binders) {
                var dt = this.binders[et];
                (dt instanceof Oa || dt instanceof ba || dt instanceof Da) && dt.populatePaintArray(N, W, le, ke, qe);
              }
            }, Ua.prototype.setConstantPatternPositions = function(N, W) {
              for (var le in this.binders) {
                var ke = this.binders[le];
                ke instanceof Ga && ke.setConstantPatternPositions(N, W);
              }
            }, Ua.prototype.updatePaintArrays = function(N, W, le, ke, qe) {
              var et = !1;
              for (var dt in N) for (var Ct = 0, Ut = W.getPositions(dt); Ct < Ut.length; Ct += 1) {
                var tn = Ut[Ct], nn = le.feature(tn.index);
                for (var cn in this.binders) {
                  var vn = this.binders[cn];
                  if ((vn instanceof Oa || vn instanceof ba || vn instanceof Da) && vn.expression.isStateDependent === !0) {
                    var mn = ke.paint.get(cn);
                    vn.expression = mn.value, vn.updatePaintArray(tn.start, tn.end, nn, N[dt], qe), et = !0;
                  }
                }
              }
              return et;
            }, Ua.prototype.defines = function() {
              var N = [];
              for (var W in this.binders) {
                var le = this.binders[W];
                (le instanceof ca || le instanceof Ga) && N.push.apply(N, le.uniformNames.map(function(ke) {
                  return "#define HAS_UNIFORM_" + ke;
                }));
              }
              return N;
            }, Ua.prototype.getBinderAttributes = function() {
              var N = [];
              for (var W in this.binders) {
                var le = this.binders[W];
                if (le instanceof Oa || le instanceof ba) for (var ke = 0; ke < le.paintVertexAttributes.length; ke++) N.push(le.paintVertexAttributes[ke].name);
                else if (le instanceof Da) for (var qe = 0; qe < kr.members.length; qe++) N.push(kr.members[qe].name);
              }
              return N;
            }, Ua.prototype.getBinderUniforms = function() {
              var N = [];
              for (var W in this.binders) {
                var le = this.binders[W];
                if (le instanceof ca || le instanceof Ga || le instanceof ba) for (var ke = 0, qe = le.uniformNames; ke < qe.length; ke += 1) {
                  var et = qe[ke];
                  N.push(et);
                }
              }
              return N;
            }, Ua.prototype.getPaintVertexBuffers = function() {
              return this._buffers;
            }, Ua.prototype.getUniforms = function(N, W) {
              var le = [];
              for (var ke in this.binders) {
                var qe = this.binders[ke];
                if (qe instanceof ca || qe instanceof Ga || qe instanceof ba) for (var et = 0, dt = qe.uniformNames; et < dt.length; et += 1) {
                  var Ct = dt[et];
                  if (W[Ct]) {
                    var Ut = qe.getBinding(N, W[Ct], Ct);
                    le.push({ name: Ct, property: ke, binding: Ut });
                  }
                }
              }
              return le;
            }, Ua.prototype.setUniforms = function(N, W, le, ke) {
              for (var qe = 0, et = W; qe < et.length; qe += 1) {
                var dt = et[qe], Ct = dt.name, Ut = dt.property, tn = dt.binding;
                this.binders[Ut].setUniform(tn, ke, le.get(Ut), Ct);
              }
            }, Ua.prototype.updatePaintBuffers = function(N) {
              for (var W in this._buffers = [], this.binders) {
                var le = this.binders[W];
                if (N && le instanceof Da) {
                  var ke = N.fromScale === 2 ? le.zoomInPaintVertexBuffer : le.zoomOutPaintVertexBuffer;
                  ke && this._buffers.push(ke);
                } else (le instanceof Oa || le instanceof ba) && le.paintVertexBuffer && this._buffers.push(le.paintVertexBuffer);
              }
            }, Ua.prototype.upload = function(N) {
              for (var W in this.binders) {
                var le = this.binders[W];
                (le instanceof Oa || le instanceof ba || le instanceof Da) && le.upload(N);
              }
              this.updatePaintBuffers();
            }, Ua.prototype.destroy = function() {
              for (var N in this.binders) {
                var W = this.binders[N];
                (W instanceof Oa || W instanceof ba || W instanceof Da) && W.destroy();
              }
            };
            var pa = function(N, W, le) {
              le === void 0 && (le = function() {
                return !0;
              }), this.programConfigurations = {};
              for (var ke = 0, qe = N; ke < qe.length; ke += 1) {
                var et = qe[ke];
                this.programConfigurations[et.id] = new Ua(et, W, le);
              }
              this.needsUpload = !1, this._featureMap = new Nr(), this._bufferOffset = 0;
            };
            function lu(N, W) {
              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"] }[N] || [N.replace(W + "-", "").replace(/-/g, "_")];
            }
            function xo(N, W, le) {
              var ke = { color: { source: ht, composite: Et }, number: { source: ze, composite: ht } }, qe = function(et) {
                return { "line-pattern": { source: Z, composite: Z }, "fill-pattern": { source: Z, composite: Z }, "fill-extrusion-pattern": { source: Z, composite: Z } }[et];
              }(N);
              return qe && qe[le] || ke[W][le];
            }
            pa.prototype.populatePaintArrays = function(N, W, le, ke, qe, et) {
              for (var dt in this.programConfigurations) this.programConfigurations[dt].populatePaintArrays(N, W, ke, qe, et);
              W.id !== void 0 && this._featureMap.add(W.id, le, this._bufferOffset, N), this._bufferOffset = N, this.needsUpload = !0;
            }, pa.prototype.updatePaintArrays = function(N, W, le, ke) {
              for (var qe = 0, et = le; qe < et.length; qe += 1) {
                var dt = et[qe];
                this.needsUpload = this.programConfigurations[dt.id].updatePaintArrays(N, this._featureMap, W, dt, ke) || this.needsUpload;
              }
            }, pa.prototype.get = function(N) {
              return this.programConfigurations[N];
            }, pa.prototype.upload = function(N) {
              if (this.needsUpload) {
                for (var W in this.programConfigurations) this.programConfigurations[W].upload(N);
                this.needsUpload = !1;
              }
            }, pa.prototype.destroy = function() {
              for (var N in this.programConfigurations) this.programConfigurations[N].destroy();
            }, xi("ConstantBinder", ca), xi("CrossFadedConstantBinder", Ga), xi("SourceExpressionBinder", Oa), xi("CrossFadedCompositeBinder", Da), xi("CompositeExpressionBinder", ba), xi("ProgramConfiguration", Ua, { omit: ["_buffers"] }), xi("ProgramConfigurationSet", pa);
            var Hi = 8192, As = Math.pow(2, 14) - 1, $o = -As - 1;
            function Nl(N) {
              for (var W = Hi / N.extent, le = N.loadGeometry(), ke = 0; ke < le.length; ke++) for (var qe = le[ke], et = 0; et < qe.length; et++) {
                var dt = qe[et], Ct = Math.round(dt.x * W), Ut = Math.round(dt.y * W);
                dt.x = k(Ct, $o, As), dt.y = k(Ut, $o, As), (Ct < dt.x || Ct > dt.x + 1 || Ut < dt.y || Ut > dt.y + 1) && F("Geometry exceeds allowed extent, reduce your vector tile buffer size");
              }
              return le;
            }
            function io(N, W) {
              return { type: N.type, id: N.id, properties: N.properties, geometry: W ? Nl(N) : [] };
            }
            function uu(N, W, le, ke, qe) {
              N.emplaceBack(2 * W + (ke + 1) / 2, 2 * le + (qe + 1) / 2);
            }
            var Jo = function(N) {
              this.zoom = N.zoom, this.overscaling = N.overscaling, this.layers = N.layers, this.layerIds = this.layers.map(function(W) {
                return W.id;
              }), this.index = N.index, this.hasPattern = !1, this.layoutVertexArray = new it(), this.indexArray = new fe(), this.segments = new Yn(), this.programConfigurations = new pa(N.layers, N.zoom), this.stateDependentLayerIds = this.layers.filter(function(W) {
                return W.isStateDependent();
              }).map(function(W) {
                return W.id;
              });
            };
            function gh(N, W) {
              for (var le = 0; le < N.length; le++) if (yh(W, N[le])) return !0;
              for (var ke = 0; ke < W.length; ke++) if (yh(N, W[ke])) return !0;
              return !!fc(N, W);
            }
            function a1(N, W, le) {
              return !!yh(N, W) || !!$f(W, N, le);
            }
            function yf(N, W) {
              if (N.length === 1) return Rp(W, N[0]);
              for (var le = 0; le < W.length; le++) for (var ke = W[le], qe = 0; qe < ke.length; qe++) if (yh(N, ke[qe])) return !0;
              for (var et = 0; et < N.length; et++) if (Rp(W, N[et])) return !0;
              for (var dt = 0; dt < W.length; dt++) if (fc(N, W[dt])) return !0;
              return !1;
            }
            function Ud(N, W, le) {
              if (N.length > 1) {
                if (fc(N, W)) return !0;
                for (var ke = 0; ke < W.length; ke++) if ($f(W[ke], N, le)) return !0;
              }
              for (var qe = 0; qe < N.length; qe++) if ($f(N[qe], W, le)) return !0;
              return !1;
            }
            function fc(N, W) {
              if (N.length === 0 || W.length === 0) return !1;
              for (var le = 0; le < N.length - 1; le++) for (var ke = N[le], qe = N[le + 1], et = 0; et < W.length - 1; et++) if (Vd(ke, qe, W[et], W[et + 1])) return !0;
              return !1;
            }
            function Vd(N, W, le, ke) {
              return U(N, le, ke) !== U(W, le, ke) && U(N, W, le) !== U(N, W, ke);
            }
            function $f(N, W, le) {
              var ke = le * le;
              if (W.length === 1) return N.distSqr(W[0]) < ke;
              for (var qe = 1; qe < W.length; qe++) if (zp(N, W[qe - 1], W[qe]) < ke) return !0;
              return !1;
            }
            function zp(N, W, le) {
              var ke = W.distSqr(le);
              if (ke === 0) return N.distSqr(W);
              var qe = ((N.x - W.x) * (le.x - W.x) + (N.y - W.y) * (le.y - W.y)) / ke;
              return qe < 0 ? N.distSqr(W) : qe > 1 ? N.distSqr(le) : N.distSqr(le.sub(W)._mult(qe)._add(W));
            }
            function Rp(N, W) {
              for (var le, ke, qe, et = !1, dt = 0; dt < N.length; dt++) for (var Ct = 0, Ut = (le = N[dt]).length - 1; Ct < le.length; Ut = Ct++) ke = le[Ct], qe = le[Ut], ke.y > W.y != qe.y > W.y && W.x < (qe.x - ke.x) * (W.y - ke.y) / (qe.y - ke.y) + ke.x && (et = !et);
              return et;
            }
            function yh(N, W) {
              for (var le = !1, ke = 0, qe = N.length - 1; ke < N.length; qe = ke++) {
                var et = N[ke], dt = N[qe];
                et.y > W.y != dt.y > W.y && W.x < (dt.x - et.x) * (W.y - et.y) / (dt.y - et.y) + et.x && (le = !le);
              }
              return le;
            }
            function Kg(N, W, le) {
              var ke = le[0], qe = le[2];
              if (N.x < ke.x && W.x < ke.x || N.x > qe.x && W.x > qe.x || N.y < ke.y && W.y < ke.y || N.y > qe.y && W.y > qe.y) return !1;
              var et = U(N, W, le[0]);
              return et !== U(N, W, le[1]) || et !== U(N, W, le[2]) || et !== U(N, W, le[3]);
            }
            function ud(N, W, le) {
              var ke = W.paint.get(N).value;
              return ke.kind === "constant" ? ke.value : le.programConfigurations.get(W.id).getMaxValue(N);
            }
            function vh(N) {
              return Math.sqrt(N[0] * N[0] + N[1] * N[1]);
            }
            function vf(N, W, le, ke, qe) {
              if (!W[0] && !W[1]) return N;
              var et = f.convert(W)._mult(qe);
              le === "viewport" && et._rotate(-ke);
              for (var dt = [], Ct = 0; Ct < N.length; Ct++) {
                var Ut = N[Ct];
                dt.push(Ut.sub(et));
              }
              return dt;
            }
            Jo.prototype.populate = function(N, W, le) {
              var ke = this.layers[0], qe = [], et = null;
              ke.type === "circle" && (et = ke.layout.get("circle-sort-key"));
              for (var dt = 0, Ct = N; dt < Ct.length; dt += 1) {
                var Ut = Ct[dt], tn = Ut.feature, nn = Ut.id, cn = Ut.index, vn = Ut.sourceLayerIndex, mn = this.layers[0]._featureFilter.needGeometry, On = io(tn, mn);
                if (this.layers[0]._featureFilter.filter(new ma(this.zoom), On, le)) {
                  var Bn = et ? et.evaluate(On, {}, le) : void 0, ar = { id: nn, properties: tn.properties, type: tn.type, sourceLayerIndex: vn, index: cn, geometry: mn ? On.geometry : Nl(tn), patterns: {}, sortKey: Bn };
                  qe.push(ar);
                }
              }
              et && qe.sort(function(hi, Ti) {
                return hi.sortKey - Ti.sortKey;
              });
              for (var tr = 0, xr = qe; tr < xr.length; tr += 1) {
                var _r = xr[tr], Lr = _r, Ur = Lr.geometry, $r = Lr.index, ai = Lr.sourceLayerIndex, Hr = N[$r].feature;
                this.addFeature(_r, Ur, $r, le), W.featureIndex.insert(Hr, Ur, $r, ai, this.index);
              }
            }, Jo.prototype.update = function(N, W, le) {
              this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(N, W, this.stateDependentLayers, le);
            }, Jo.prototype.isEmpty = function() {
              return this.layoutVertexArray.length === 0;
            }, Jo.prototype.uploadPending = function() {
              return !this.uploaded || this.programConfigurations.needsUpload;
            }, Jo.prototype.upload = function(N) {
              this.uploaded || (this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, Vn), this.indexBuffer = N.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(N), this.uploaded = !0;
            }, Jo.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
            }, Jo.prototype.addFeature = function(N, W, le, ke) {
              for (var qe = 0, et = W; qe < et.length; qe += 1) for (var dt = 0, Ct = et[qe]; dt < Ct.length; dt += 1) {
                var Ut = Ct[dt], tn = Ut.x, nn = Ut.y;
                if (!(tn < 0 || tn >= Hi || nn < 0 || nn >= Hi)) {
                  var cn = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray, N.sortKey), vn = cn.vertexLength;
                  uu(this.layoutVertexArray, tn, nn, -1, -1), uu(this.layoutVertexArray, tn, nn, 1, -1), uu(this.layoutVertexArray, tn, nn, 1, 1), uu(this.layoutVertexArray, tn, nn, -1, 1), this.indexArray.emplaceBack(vn, vn + 1, vn + 2), this.indexArray.emplaceBack(vn, vn + 3, vn + 2), cn.vertexLength += 4, cn.primitiveLength += 2;
                }
              }
              this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, N, le, {}, ke);
            }, xi("CircleBucket", Jo, { omit: ["layers"] });
            var Fp = new Za({ "circle-sort-key": new Ci(st.layout_circle["circle-sort-key"]) }), K4 = { paint: new Za({ "circle-radius": new Ci(st.paint_circle["circle-radius"]), "circle-color": new Ci(st.paint_circle["circle-color"]), "circle-blur": new Ci(st.paint_circle["circle-blur"]), "circle-opacity": new Ci(st.paint_circle["circle-opacity"]), "circle-translate": new ni(st.paint_circle["circle-translate"]), "circle-translate-anchor": new ni(st.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new ni(st.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new ni(st.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Ci(st.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Ci(st.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Ci(st.paint_circle["circle-stroke-opacity"]) }), layout: Fp }, _u = typeof Float32Array < "u" ? Float32Array : Array;
            function qb(N) {
              return N[0] = 1, N[1] = 0, N[2] = 0, N[3] = 0, N[4] = 0, N[5] = 1, N[6] = 0, N[7] = 0, N[8] = 0, N[9] = 0, N[10] = 1, N[11] = 0, N[12] = 0, N[13] = 0, N[14] = 0, N[15] = 1, N;
            }
            function Hb(N, W, le) {
              var ke = W[0], qe = W[1], et = W[2], dt = W[3], Ct = W[4], Ut = W[5], tn = W[6], nn = W[7], cn = W[8], vn = W[9], mn = W[10], On = W[11], Bn = W[12], ar = W[13], tr = W[14], xr = W[15], _r = le[0], Lr = le[1], Ur = le[2], $r = le[3];
              return N[0] = _r * ke + Lr * Ct + Ur * cn + $r * Bn, N[1] = _r * qe + Lr * Ut + Ur * vn + $r * ar, N[2] = _r * et + Lr * tn + Ur * mn + $r * tr, N[3] = _r * dt + Lr * nn + Ur * On + $r * xr, _r = le[4], Lr = le[5], Ur = le[6], $r = le[7], N[4] = _r * ke + Lr * Ct + Ur * cn + $r * Bn, N[5] = _r * qe + Lr * Ut + Ur * vn + $r * ar, N[6] = _r * et + Lr * tn + Ur * mn + $r * tr, N[7] = _r * dt + Lr * nn + Ur * On + $r * xr, _r = le[8], Lr = le[9], Ur = le[10], $r = le[11], N[8] = _r * ke + Lr * Ct + Ur * cn + $r * Bn, N[9] = _r * qe + Lr * Ut + Ur * vn + $r * ar, N[10] = _r * et + Lr * tn + Ur * mn + $r * tr, N[11] = _r * dt + Lr * nn + Ur * On + $r * xr, _r = le[12], Lr = le[13], Ur = le[14], $r = le[15], N[12] = _r * ke + Lr * Ct + Ur * cn + $r * Bn, N[13] = _r * qe + Lr * Ut + Ur * vn + $r * ar, N[14] = _r * et + Lr * tn + Ur * mn + $r * tr, N[15] = _r * dt + Lr * nn + Ur * On + $r * xr, N;
            }
            Math.hypot || (Math.hypot = function() {
              for (var N = arguments, W = 0, le = arguments.length; le--; ) W += N[le] * N[le];
              return Math.sqrt(W);
            });
            var Bl = Hb, o1, J4 = function(N, W, le) {
              return N[0] = W[0] - le[0], N[1] = W[1] - le[1], N[2] = W[2] - le[2], N;
            };
            function cd(N, W, le) {
              var ke = W[0], qe = W[1], et = W[2], dt = W[3];
              return N[0] = le[0] * ke + le[4] * qe + le[8] * et + le[12] * dt, N[1] = le[1] * ke + le[5] * qe + le[9] * et + le[13] * dt, N[2] = le[2] * ke + le[6] * qe + le[10] * et + le[14] * dt, N[3] = le[3] * ke + le[7] * qe + le[11] * et + le[15] * dt, N;
            }
            o1 = new _u(3), _u != Float32Array && (o1[0] = 0, o1[1] = 0, o1[2] = 0), function() {
              var N = new _u(4);
              _u != Float32Array && (N[0] = 0, N[1] = 0, N[2] = 0, N[3] = 0);
            }();
            var J0 = function(N) {
              var W = N[0], le = N[1];
              return W * W + le * le;
            }, a2 = (function() {
              var N = new _u(2);
              _u != Float32Array && (N[0] = 0, N[1] = 0);
            }(), function(N) {
              function W(le) {
                N.call(this, le, K4);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.createBucket = function(le) {
                return new Jo(le);
              }, W.prototype.queryRadius = function(le) {
                var ke = le;
                return ud("circle-radius", this, ke) + ud("circle-stroke-width", this, ke) + vh(this.paint.get("circle-translate"));
              }, W.prototype.queryIntersectsFeature = function(le, ke, qe, et, dt, Ct, Ut, tn) {
                for (var nn = vf(le, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), Ct.angle, Ut), cn = this.paint.get("circle-radius").evaluate(ke, qe) + this.paint.get("circle-stroke-width").evaluate(ke, qe), vn = this.paint.get("circle-pitch-alignment") === "map", mn = vn ? nn : function(ai, Hr) {
                  return ai.map(function(hi) {
                    return o2(hi, Hr);
                  });
                }(nn, tn), On = vn ? cn * Ut : cn, Bn = 0, ar = et; Bn < ar.length; Bn += 1) for (var tr = 0, xr = ar[Bn]; tr < xr.length; tr += 1) {
                  var _r = xr[tr], Lr = vn ? _r : o2(_r, tn), Ur = On, $r = cd([], [_r.x, _r.y, 0, 1], tn);
                  if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? Ur *= $r[3] / Ct.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (Ur *= Ct.cameraToCenterDistance / $r[3]), a1(mn, Lr, Ur)) return !0;
                }
                return !1;
              }, W;
            }(na));
            function o2(N, W) {
              var le = cd([], [N.x, N.y, 0, 1], W);
              return new f(le[0] / le[3], le[1] / le[3]);
            }
            var Gb = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W;
            }(Jo);
            function Wb(N, W, le, ke) {
              var qe = W.width, et = W.height;
              if (ke) {
                if (ke instanceof Uint8ClampedArray) ke = new Uint8Array(ke.buffer);
                else if (ke.length !== qe * et * le) throw new RangeError("mismatched image size");
              } else ke = new Uint8Array(qe * et * le);
              return N.width = qe, N.height = et, N.data = ke, N;
            }
            function Yb(N, W, le) {
              var ke = W.width, qe = W.height;
              if (ke !== N.width || qe !== N.height) {
                var et = Wb({}, { width: ke, height: qe }, le);
                Zb(N, et, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(N.width, ke), height: Math.min(N.height, qe) }, le), N.width = ke, N.height = qe, N.data = et.data;
              }
            }
            function Zb(N, W, le, ke, qe, et) {
              if (qe.width === 0 || qe.height === 0) return W;
              if (qe.width > N.width || qe.height > N.height || le.x > N.width - qe.width || le.y > N.height - qe.height) throw new RangeError("out of range source coordinates for image copy");
              if (qe.width > W.width || qe.height > W.height || ke.x > W.width - qe.width || ke.y > W.height - qe.height) throw new RangeError("out of range destination coordinates for image copy");
              for (var dt = N.data, Ct = W.data, Ut = 0; Ut < qe.height; Ut++) for (var tn = ((le.y + Ut) * N.width + le.x) * et, nn = ((ke.y + Ut) * W.width + ke.x) * et, cn = 0; cn < qe.width * et; cn++) Ct[nn + cn] = dt[tn + cn];
              return W;
            }
            xi("HeatmapBucket", Gb, { omit: ["layers"] });
            var $d = function(N, W) {
              Wb(this, N, 1, W);
            };
            $d.prototype.resize = function(N) {
              Yb(this, N, 1);
            }, $d.prototype.clone = function() {
              return new $d({ width: this.width, height: this.height }, new Uint8Array(this.data));
            }, $d.copy = function(N, W, le, ke, qe) {
              Zb(N, W, le, ke, qe, 1);
            };
            var Pc = function(N, W) {
              Wb(this, N, 4, W);
            };
            Pc.prototype.resize = function(N) {
              Yb(this, N, 4);
            }, Pc.prototype.replace = function(N, W) {
              W ? this.data.set(N) : N instanceof Uint8ClampedArray ? this.data = new Uint8Array(N.buffer) : this.data = N;
            }, Pc.prototype.clone = function() {
              return new Pc({ width: this.width, height: this.height }, new Uint8Array(this.data));
            }, Pc.copy = function(N, W, le, ke, qe) {
              Zb(N, W, le, ke, qe, 4);
            }, xi("AlphaImage", $d), xi("RGBAImage", Pc);
            var Xb = { paint: new Za({ "heatmap-radius": new Ci(st.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Ci(st.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new ni(st.paint_heatmap["heatmap-intensity"]), "heatmap-color": new ou(st.paint_heatmap["heatmap-color"]), "heatmap-opacity": new ni(st.paint_heatmap["heatmap-opacity"]) }) };
            function Kb(N) {
              var W = {}, le = N.resolution || 256, ke = N.clips ? N.clips.length : 1, qe = N.image || new Pc({ width: le, height: ke }), et = function(On, Bn, ar) {
                W[N.evaluationKey] = ar;
                var tr = N.expression.evaluate(W);
                qe.data[On + Bn + 0] = Math.floor(255 * tr.r / tr.a), qe.data[On + Bn + 1] = Math.floor(255 * tr.g / tr.a), qe.data[On + Bn + 2] = Math.floor(255 * tr.b / tr.a), qe.data[On + Bn + 3] = Math.floor(255 * tr.a);
              };
              if (N.clips) for (var dt = 0, Ct = 0; dt < ke; ++dt, Ct += 4 * le) for (var Ut = 0, tn = 0; Ut < le; Ut++, tn += 4) {
                var nn = Ut / (le - 1), cn = N.clips[dt];
                et(Ct, tn, cn.start * (1 - nn) + cn.end * nn);
              }
              else for (var vn = 0, mn = 0; vn < le; vn++, mn += 4) et(0, mn, vn / (le - 1));
              return qe;
            }
            var Q4 = function(N) {
              function W(le) {
                N.call(this, le, Xb), this._updateColorRamp();
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.createBucket = function(le) {
                return new Gb(le);
              }, W.prototype._handleSpecialPaintPropertyUpdate = function(le) {
                le === "heatmap-color" && this._updateColorRamp();
              }, W.prototype._updateColorRamp = function() {
                var le = this._transitionablePaint._values["heatmap-color"].value.expression;
                this.colorRamp = Kb({ expression: le, evaluationKey: "heatmapDensity", image: this.colorRamp }), this.colorRampTexture = null;
              }, W.prototype.resize = function() {
                this.heatmapFbo && (this.heatmapFbo.destroy(), this.heatmapFbo = null);
              }, W.prototype.queryRadius = function() {
                return 0;
              }, W.prototype.queryIntersectsFeature = function() {
                return !1;
              }, W.prototype.hasOffscreenPass = function() {
                return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
              }, W;
            }(na), s1 = { paint: new Za({ "hillshade-illumination-direction": new ni(st.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-anchor": new ni(st.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new ni(st.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new ni(st.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new ni(st.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new ni(st.paint_hillshade["hillshade-accent-color"]) }) }, mA = function(N) {
              function W(le) {
                N.call(this, le, s1);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.hasOffscreenPass = function() {
                return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none";
              }, W;
            }(na), Jg = He([{ name: "a_pos", components: 2, type: "Int16" }], 4).members, l1 = Qg, s2 = Qg;
            function Qg(N, W, le) {
              le = le || 2;
              var ke, qe, et, dt, Ct, Ut, tn, nn = W && W.length, cn = nn ? W[0] * le : N.length, vn = Jb(N, 0, cn, le, !0), mn = [];
              if (!vn || vn.next === vn.prev) return mn;
              if (nn && (vn = function(Bn, ar, tr, xr) {
                var _r, Lr, Ur, $r = [];
                for (_r = 0, Lr = ar.length; _r < Lr; _r++) (Ur = Jb(Bn, ar[_r] * xr, _r < Lr - 1 ? ar[_r + 1] * xr : Bn.length, xr, !1)) === Ur.next && (Ur.steiner = !0), $r.push(xA(Ur));
                for ($r.sort(yA), _r = 0; _r < $r.length; _r++) vA($r[_r], tr), tr = Np(tr, tr.next);
                return tr;
              }(N, W, vn, le)), N.length > 80 * le) {
                ke = et = N[0], qe = dt = N[1];
                for (var On = le; On < cn; On += le) (Ct = N[On]) < ke && (ke = Ct), (Ut = N[On + 1]) < qe && (qe = Ut), Ct > et && (et = Ct), Ut > dt && (dt = Ut);
                tn = (tn = Math.max(et - ke, dt - qe)) !== 0 ? 1 / tn : 0;
              }
              return wu(vn, mn, le, ke, qe, tn), mn;
            }
            function Jb(N, W, le, ke, qe) {
              var et, dt;
              if (qe === u2(N, W, le, ke) > 0) for (et = W; et < le; et += ke) dt = xf(et, N[et], N[et + 1], dt);
              else for (et = le - ke; et >= W; et -= ke) dt = xf(et, N[et], N[et + 1], dt);
              return dt && ey(dt, dt.next) && (d1(dt), dt = dt.next), dt;
            }
            function Np(N, W) {
              if (!N) return N;
              W || (W = N);
              var le, ke = N;
              do
                if (le = !1, ke.steiner || !ey(ke, ke.next) && ol(ke.prev, ke, ke.next) !== 0) ke = ke.next;
                else {
                  if (d1(ke), (ke = W = ke.prev) === ke.next) break;
                  le = !0;
                }
              while (le || ke !== W);
              return W;
            }
            function wu(N, W, le, ke, qe, et, dt) {
              if (N) {
                !dt && et && function(nn, cn, vn, mn) {
                  var On = nn;
                  do
                    On.z === null && (On.z = Q0(On.x, On.y, cn, vn, mn)), On.prevZ = On.prev, On.nextZ = On.next, On = On.next;
                  while (On !== nn);
                  On.prevZ.nextZ = null, On.prevZ = null, function(Bn) {
                    var ar, tr, xr, _r, Lr, Ur, $r, ai, Hr = 1;
                    do {
                      for (tr = Bn, Bn = null, Lr = null, Ur = 0; tr; ) {
                        for (Ur++, xr = tr, $r = 0, ar = 0; ar < Hr && ($r++, xr = xr.nextZ); ar++) ;
                        for (ai = Hr; $r > 0 || ai > 0 && xr; ) $r !== 0 && (ai === 0 || !xr || tr.z <= xr.z) ? (_r = tr, tr = tr.nextZ, $r--) : (_r = xr, xr = xr.nextZ, ai--), Lr ? Lr.nextZ = _r : Bn = _r, _r.prevZ = Lr, Lr = _r;
                        tr = xr;
                      }
                      Lr.nextZ = null, Hr *= 2;
                    } while (Ur > 1);
                  }(On);
                }(N, ke, qe, et);
                for (var Ct, Ut, tn = N; N.prev !== N.next; ) if (Ct = N.prev, Ut = N.next, et ? Qb(N, ke, qe, et) : u1(N)) W.push(Ct.i / le), W.push(N.i / le), W.push(Ut.i / le), d1(N), N = Ut.next, tn = Ut.next;
                else if ((N = Ut) === tn) {
                  dt ? dt === 1 ? wu(N = e5(Np(N), W, le), W, le, ke, qe, et, 2) : dt === 2 && gA(N, W, le, ke, qe, et) : wu(Np(N), W, le, ke, qe, et, 1);
                  break;
                }
              }
            }
            function u1(N) {
              var W = N.prev, le = N, ke = N.next;
              if (ol(W, le, ke) >= 0) return !1;
              for (var qe = N.next.next; qe !== N.prev; ) {
                if (c1(W.x, W.y, le.x, le.y, ke.x, ke.y, qe.x, qe.y) && ol(qe.prev, qe, qe.next) >= 0) return !1;
                qe = qe.next;
              }
              return !0;
            }
            function Qb(N, W, le, ke) {
              var qe = N.prev, et = N, dt = N.next;
              if (ol(qe, et, dt) >= 0) return !1;
              for (var Ct = qe.x < et.x ? qe.x < dt.x ? qe.x : dt.x : et.x < dt.x ? et.x : dt.x, Ut = qe.y < et.y ? qe.y < dt.y ? qe.y : dt.y : et.y < dt.y ? et.y : dt.y, tn = qe.x > et.x ? qe.x > dt.x ? qe.x : dt.x : et.x > dt.x ? et.x : dt.x, nn = qe.y > et.y ? qe.y > dt.y ? qe.y : dt.y : et.y > dt.y ? et.y : dt.y, cn = Q0(Ct, Ut, W, le, ke), vn = Q0(tn, nn, W, le, ke), mn = N.prevZ, On = N.nextZ; mn && mn.z >= cn && On && On.z <= vn; ) {
                if (mn !== N.prev && mn !== N.next && c1(qe.x, qe.y, et.x, et.y, dt.x, dt.y, mn.x, mn.y) && ol(mn.prev, mn, mn.next) >= 0 || (mn = mn.prevZ, On !== N.prev && On !== N.next && c1(qe.x, qe.y, et.x, et.y, dt.x, dt.y, On.x, On.y) && ol(On.prev, On, On.next) >= 0)) return !1;
                On = On.nextZ;
              }
              for (; mn && mn.z >= cn; ) {
                if (mn !== N.prev && mn !== N.next && c1(qe.x, qe.y, et.x, et.y, dt.x, dt.y, mn.x, mn.y) && ol(mn.prev, mn, mn.next) >= 0) return !1;
                mn = mn.prevZ;
              }
              for (; On && On.z <= vn; ) {
                if (On !== N.prev && On !== N.next && c1(qe.x, qe.y, et.x, et.y, dt.x, dt.y, On.x, On.y) && ol(On.prev, On, On.next) >= 0) return !1;
                On = On.nextZ;
              }
              return !0;
            }
            function e5(N, W, le) {
              var ke = N;
              do {
                var qe = ke.prev, et = ke.next.next;
                !ey(qe, et) && n5(qe, ke, ke.next, et) && em(qe, et) && em(et, qe) && (W.push(qe.i / le), W.push(ke.i / le), W.push(et.i / le), d1(ke), d1(ke.next), ke = N = et), ke = ke.next;
              } while (ke !== N);
              return Np(ke);
            }
            function gA(N, W, le, ke, qe, et) {
              var dt = N;
              do {
                for (var Ct = dt.next.next; Ct !== dt.prev; ) {
                  if (dt.i !== Ct.i && t5(dt, Ct)) {
                    var Ut = h1(dt, Ct);
                    return dt = Np(dt, dt.next), Ut = Np(Ut, Ut.next), wu(dt, W, le, ke, qe, et), void wu(Ut, W, le, ke, qe, et);
                  }
                  Ct = Ct.next;
                }
                dt = dt.next;
              } while (dt !== N);
            }
            function yA(N, W) {
              return N.x - W.x;
            }
            function vA(N, W) {
              if (W = function(ke, qe) {
                var et, dt = qe, Ct = ke.x, Ut = ke.y, tn = -1 / 0;
                do {
                  if (Ut <= dt.y && Ut >= dt.next.y && dt.next.y !== dt.y) {
                    var nn = dt.x + (Ut - dt.y) * (dt.next.x - dt.x) / (dt.next.y - dt.y);
                    if (nn <= Ct && nn > tn) {
                      if (tn = nn, nn === Ct) {
                        if (Ut === dt.y) return dt;
                        if (Ut === dt.next.y) return dt.next;
                      }
                      et = dt.x < dt.next.x ? dt : dt.next;
                    }
                  }
                  dt = dt.next;
                } while (dt !== qe);
                if (!et) return null;
                if (Ct === tn) return et;
                var cn, vn = et, mn = et.x, On = et.y, Bn = 1 / 0;
                dt = et;
                do
                  Ct >= dt.x && dt.x >= mn && Ct !== dt.x && c1(Ut < On ? Ct : tn, Ut, mn, On, Ut < On ? tn : Ct, Ut, dt.x, dt.y) && (cn = Math.abs(Ut - dt.y) / (Ct - dt.x), em(dt, ke) && (cn < Bn || cn === Bn && (dt.x > et.x || dt.x === et.x && l2(et, dt))) && (et = dt, Bn = cn)), dt = dt.next;
                while (dt !== vn);
                return et;
              }(N, W)) {
                var le = h1(W, N);
                Np(W, W.next), Np(le, le.next);
              }
            }
            function l2(N, W) {
              return ol(N.prev, N, W.prev) < 0 && ol(W.next, N, N.next) < 0;
            }
            function Q0(N, W, le, ke, qe) {
              return (N = 1431655765 & ((N = 858993459 & ((N = 252645135 & ((N = 16711935 & ((N = 32767 * (N - le) * qe) | N << 8)) | N << 4)) | N << 2)) | N << 1)) | (W = 1431655765 & ((W = 858993459 & ((W = 252645135 & ((W = 16711935 & ((W = 32767 * (W - ke) * qe) | W << 8)) | W << 4)) | W << 2)) | W << 1)) << 1;
            }
            function xA(N) {
              var W = N, le = N;
              do
                (W.x < le.x || W.x === le.x && W.y < le.y) && (le = W), W = W.next;
              while (W !== N);
              return le;
            }
            function c1(N, W, le, ke, qe, et, dt, Ct) {
              return (qe - dt) * (W - Ct) - (N - dt) * (et - Ct) >= 0 && (N - dt) * (ke - Ct) - (le - dt) * (W - Ct) >= 0 && (le - dt) * (et - Ct) - (qe - dt) * (ke - Ct) >= 0;
            }
            function t5(N, W) {
              return N.next.i !== W.i && N.prev.i !== W.i && !function(le, ke) {
                var qe = le;
                do {
                  if (qe.i !== le.i && qe.next.i !== le.i && qe.i !== ke.i && qe.next.i !== ke.i && n5(qe, qe.next, le, ke)) return !0;
                  qe = qe.next;
                } while (qe !== le);
                return !1;
              }(N, W) && (em(N, W) && em(W, N) && function(le, ke) {
                var qe = le, et = !1, dt = (le.x + ke.x) / 2, Ct = (le.y + ke.y) / 2;
                do
                  qe.y > Ct != qe.next.y > Ct && qe.next.y !== qe.y && dt < (qe.next.x - qe.x) * (Ct - qe.y) / (qe.next.y - qe.y) + qe.x && (et = !et), qe = qe.next;
                while (qe !== le);
                return et;
              }(N, W) && (ol(N.prev, N, W.prev) || ol(N, W.prev, W)) || ey(N, W) && ol(N.prev, N, N.next) > 0 && ol(W.prev, W, W.next) > 0);
            }
            function ol(N, W, le) {
              return (W.y - N.y) * (le.x - W.x) - (W.x - N.x) * (le.y - W.y);
            }
            function ey(N, W) {
              return N.x === W.x && N.y === W.y;
            }
            function n5(N, W, le, ke) {
              var qe = ty(ol(N, W, le)), et = ty(ol(N, W, ke)), dt = ty(ol(le, ke, N)), Ct = ty(ol(le, ke, W));
              return qe !== et && dt !== Ct || !(qe !== 0 || !f1(N, le, W)) || !(et !== 0 || !f1(N, ke, W)) || !(dt !== 0 || !f1(le, N, ke)) || !(Ct !== 0 || !f1(le, W, ke));
            }
            function f1(N, W, le) {
              return W.x <= Math.max(N.x, le.x) && W.x >= Math.min(N.x, le.x) && W.y <= Math.max(N.y, le.y) && W.y >= Math.min(N.y, le.y);
            }
            function ty(N) {
              return N > 0 ? 1 : N < 0 ? -1 : 0;
            }
            function em(N, W) {
              return ol(N.prev, N, N.next) < 0 ? ol(N, W, N.next) >= 0 && ol(N, N.prev, W) >= 0 : ol(N, W, N.prev) < 0 || ol(N, N.next, W) < 0;
            }
            function h1(N, W) {
              var le = new e_(N.i, N.x, N.y), ke = new e_(W.i, W.x, W.y), qe = N.next, et = W.prev;
              return N.next = W, W.prev = N, le.next = qe, qe.prev = le, ke.next = le, le.prev = ke, et.next = ke, ke.prev = et, ke;
            }
            function xf(N, W, le, ke) {
              var qe = new e_(N, W, le);
              return ke ? (qe.next = ke.next, qe.prev = ke, ke.next.prev = qe, ke.next = qe) : (qe.prev = qe, qe.next = qe), qe;
            }
            function d1(N) {
              N.next.prev = N.prev, N.prev.next = N.next, N.prevZ && (N.prevZ.nextZ = N.nextZ), N.nextZ && (N.nextZ.prevZ = N.prevZ);
            }
            function e_(N, W, le) {
              this.i = N, this.x = W, this.y = le, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ = null, this.steiner = !1;
            }
            function u2(N, W, le, ke) {
              for (var qe = 0, et = W, dt = le - ke; et < le; et += ke) qe += (N[dt] - N[et]) * (N[et + 1] + N[dt + 1]), dt = et;
              return qe;
            }
            function bA(N, W, le, ke, qe) {
              r5(N, W, le, ke || N.length - 1, qe || _A);
            }
            function r5(N, W, le, ke, qe) {
              for (; ke > le; ) {
                if (ke - le > 600) {
                  var et = ke - le + 1, dt = W - le + 1, Ct = Math.log(et), Ut = 0.5 * Math.exp(2 * Ct / 3), tn = 0.5 * Math.sqrt(Ct * Ut * (et - Ut) / et) * (dt - et / 2 < 0 ? -1 : 1);
                  r5(N, W, Math.max(le, Math.floor(W - dt * Ut / et + tn)), Math.min(ke, Math.floor(W + (et - dt) * Ut / et + tn)), qe);
                }
                var nn = N[W], cn = le, vn = ke;
                for (ny(N, le, W), qe(N[ke], nn) > 0 && ny(N, le, ke); cn < vn; ) {
                  for (ny(N, cn, vn), cn++, vn--; qe(N[cn], nn) < 0; ) cn++;
                  for (; qe(N[vn], nn) > 0; ) vn--;
                }
                qe(N[le], nn) === 0 ? ny(N, le, vn) : ny(N, ++vn, ke), vn <= W && (le = vn + 1), W <= vn && (ke = vn - 1);
              }
            }
            function ny(N, W, le) {
              var ke = N[W];
              N[W] = N[le], N[le] = ke;
            }
            function _A(N, W) {
              return N < W ? -1 : N > W ? 1 : 0;
            }
            function i5(N, W) {
              var le = N.length;
              if (le <= 1) return [N];
              for (var ke, qe, et = [], dt = 0; dt < le; dt++) {
                var Ct = V(N[dt]);
                Ct !== 0 && (N[dt].area = Math.abs(Ct), qe === void 0 && (qe = Ct < 0), qe === Ct < 0 ? (ke && et.push(ke), ke = [N[dt]]) : ke.push(N[dt]));
              }
              if (ke && et.push(ke), W > 1) for (var Ut = 0; Ut < et.length; Ut++) et[Ut].length <= W || (bA(et[Ut], W, 1, et[Ut].length - 1, QR), et[Ut] = et[Ut].slice(0, W));
              return et;
            }
            function QR(N, W) {
              return W.area - N.area;
            }
            function c2(N, W, le) {
              for (var ke = le.patternDependencies, qe = !1, et = 0, dt = W; et < dt.length; et += 1) {
                var Ct = dt[et].paint.get(N + "-pattern");
                Ct.isConstant() || (qe = !0);
                var Ut = Ct.constantOr(null);
                Ut && (qe = !0, ke[Ut.to] = !0, ke[Ut.from] = !0);
              }
              return qe;
            }
            function f2(N, W, le, ke, qe) {
              for (var et = qe.patternDependencies, dt = 0, Ct = W; dt < Ct.length; dt += 1) {
                var Ut = Ct[dt], tn = Ut.paint.get(N + "-pattern").value;
                if (tn.kind !== "constant") {
                  var nn = tn.evaluate({ zoom: ke - 1 }, le, {}, qe.availableImages), cn = tn.evaluate({ zoom: ke }, le, {}, qe.availableImages), vn = tn.evaluate({ zoom: ke + 1 }, le, {}, qe.availableImages);
                  nn = nn && nn.name ? nn.name : nn, cn = cn && cn.name ? cn.name : cn, vn = vn && vn.name ? vn.name : vn, et[nn] = !0, et[cn] = !0, et[vn] = !0, le.patterns[Ut.id] = { min: nn, mid: cn, max: vn };
                }
              }
              return le;
            }
            Qg.deviation = function(N, W, le, ke) {
              var qe = W && W.length, et = qe ? W[0] * le : N.length, dt = Math.abs(u2(N, 0, et, le));
              if (qe) for (var Ct = 0, Ut = W.length; Ct < Ut; Ct++) {
                var tn = W[Ct] * le, nn = Ct < Ut - 1 ? W[Ct + 1] * le : N.length;
                dt -= Math.abs(u2(N, tn, nn, le));
              }
              var cn = 0;
              for (Ct = 0; Ct < ke.length; Ct += 3) {
                var vn = ke[Ct] * le, mn = ke[Ct + 1] * le, On = ke[Ct + 2] * le;
                cn += Math.abs((N[vn] - N[On]) * (N[mn + 1] - N[vn + 1]) - (N[vn] - N[mn]) * (N[On + 1] - N[vn + 1]));
              }
              return dt === 0 && cn === 0 ? 0 : Math.abs((cn - dt) / dt);
            }, Qg.flatten = function(N) {
              for (var W = N[0][0].length, le = { vertices: [], holes: [], dimensions: W }, ke = 0, qe = 0; qe < N.length; qe++) {
                for (var et = 0; et < N[qe].length; et++) for (var dt = 0; dt < W; dt++) le.vertices.push(N[qe][et][dt]);
                qe > 0 && (ke += N[qe - 1].length, le.holes.push(ke));
              }
              return le;
            }, l1.default = s2;
            var hc = function(N) {
              this.zoom = N.zoom, this.overscaling = N.overscaling, this.layers = N.layers, this.layerIds = this.layers.map(function(W) {
                return W.id;
              }), this.index = N.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new it(), this.indexArray = new fe(), this.indexArray2 = new gt(), this.programConfigurations = new pa(N.layers, N.zoom), this.segments = new Yn(), this.segments2 = new Yn(), this.stateDependentLayerIds = this.layers.filter(function(W) {
                return W.isStateDependent();
              }).map(function(W) {
                return W.id;
              });
            };
            hc.prototype.populate = function(N, W, le) {
              this.hasPattern = c2("fill", this.layers, W);
              for (var ke = this.layers[0].layout.get("fill-sort-key"), qe = [], et = 0, dt = N; et < dt.length; et += 1) {
                var Ct = dt[et], Ut = Ct.feature, tn = Ct.id, nn = Ct.index, cn = Ct.sourceLayerIndex, vn = this.layers[0]._featureFilter.needGeometry, mn = io(Ut, vn);
                if (this.layers[0]._featureFilter.filter(new ma(this.zoom), mn, le)) {
                  var On = ke ? ke.evaluate(mn, {}, le, W.availableImages) : void 0, Bn = { id: tn, properties: Ut.properties, type: Ut.type, sourceLayerIndex: cn, index: nn, geometry: vn ? mn.geometry : Nl(Ut), patterns: {}, sortKey: On };
                  qe.push(Bn);
                }
              }
              ke && qe.sort(function(hi, Ti) {
                return hi.sortKey - Ti.sortKey;
              });
              for (var ar = 0, tr = qe; ar < tr.length; ar += 1) {
                var xr = tr[ar], _r = xr, Lr = _r.geometry, Ur = _r.index, $r = _r.sourceLayerIndex;
                if (this.hasPattern) {
                  var ai = f2("fill", this.layers, xr, this.zoom, W);
                  this.patternFeatures.push(ai);
                } else this.addFeature(xr, Lr, Ur, le, {});
                var Hr = N[Ur].feature;
                W.featureIndex.insert(Hr, Lr, Ur, $r, this.index);
              }
            }, hc.prototype.update = function(N, W, le) {
              this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(N, W, this.stateDependentLayers, le);
            }, hc.prototype.addFeatures = function(N, W, le) {
              for (var ke = 0, qe = this.patternFeatures; ke < qe.length; ke += 1) {
                var et = qe[ke];
                this.addFeature(et, et.geometry, et.index, W, le);
              }
            }, hc.prototype.isEmpty = function() {
              return this.layoutVertexArray.length === 0;
            }, hc.prototype.uploadPending = function() {
              return !this.uploaded || this.programConfigurations.needsUpload;
            }, hc.prototype.upload = function(N) {
              this.uploaded || (this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, Jg), this.indexBuffer = N.createIndexBuffer(this.indexArray), this.indexBuffer2 = N.createIndexBuffer(this.indexArray2)), this.programConfigurations.upload(N), this.uploaded = !0;
            }, hc.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.indexBuffer2.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.segments2.destroy());
            }, hc.prototype.addFeature = function(N, W, le, ke, qe) {
              for (var et = 0, dt = i5(W, 500); et < dt.length; et += 1) {
                for (var Ct = dt[et], Ut = 0, tn = 0, nn = Ct; tn < nn.length; tn += 1) Ut += nn[tn].length;
                for (var cn = this.segments.prepareSegment(Ut, this.layoutVertexArray, this.indexArray), vn = cn.vertexLength, mn = [], On = [], Bn = 0, ar = Ct; Bn < ar.length; Bn += 1) {
                  var tr = ar[Bn];
                  if (tr.length !== 0) {
                    tr !== Ct[0] && On.push(mn.length / 2);
                    var xr = this.segments2.prepareSegment(tr.length, this.layoutVertexArray, this.indexArray2), _r = xr.vertexLength;
                    this.layoutVertexArray.emplaceBack(tr[0].x, tr[0].y), this.indexArray2.emplaceBack(_r + tr.length - 1, _r), mn.push(tr[0].x), mn.push(tr[0].y);
                    for (var Lr = 1; Lr < tr.length; Lr++) this.layoutVertexArray.emplaceBack(tr[Lr].x, tr[Lr].y), this.indexArray2.emplaceBack(_r + Lr - 1, _r + Lr), mn.push(tr[Lr].x), mn.push(tr[Lr].y);
                    xr.vertexLength += tr.length, xr.primitiveLength += tr.length;
                  }
                }
                for (var Ur = l1(mn, On), $r = 0; $r < Ur.length; $r += 3) this.indexArray.emplaceBack(vn + Ur[$r], vn + Ur[$r + 1], vn + Ur[$r + 2]);
                cn.vertexLength += Ut, cn.primitiveLength += Ur.length / 3;
              }
              this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, N, le, qe, ke);
            }, xi("FillBucket", hc, { omit: ["layers", "patternFeatures"] });
            var ry = new Za({ "fill-sort-key": new Ci(st.layout_fill["fill-sort-key"]) }), wA = { paint: new Za({ "fill-antialias": new ni(st.paint_fill["fill-antialias"]), "fill-opacity": new Ci(st.paint_fill["fill-opacity"]), "fill-color": new Ci(st.paint_fill["fill-color"]), "fill-outline-color": new Ci(st.paint_fill["fill-outline-color"]), "fill-translate": new ni(st.paint_fill["fill-translate"]), "fill-translate-anchor": new ni(st.paint_fill["fill-translate-anchor"]), "fill-pattern": new us(st.paint_fill["fill-pattern"]) }), layout: ry }, kA = function(N) {
              function W(le) {
                N.call(this, le, wA);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.recalculate = function(le, ke) {
                N.prototype.recalculate.call(this, le, ke);
                var qe = this.paint._values["fill-outline-color"];
                qe.value.kind === "constant" && qe.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]);
              }, W.prototype.createBucket = function(le) {
                return new hc(le);
              }, W.prototype.queryRadius = function() {
                return vh(this.paint.get("fill-translate"));
              }, W.prototype.queryIntersectsFeature = function(le, ke, qe, et, dt, Ct, Ut) {
                return yf(vf(le, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), Ct.angle, Ut), et);
              }, W.prototype.isTileClipped = function() {
                return !0;
              }, W;
            }(na), TA = He([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_normal_ed", components: 4, type: "Int16" }], 4).members, a5 = p1;
            function p1(N, W, le, ke, qe) {
              this.properties = {}, this.extent = le, this.type = 0, this._pbf = N, this._geometry = -1, this._keys = ke, this._values = qe, N.readFields(AA, this, W);
            }
            function AA(N, W, le) {
              N == 1 ? W.id = le.readVarint() : N == 2 ? function(ke, qe) {
                for (var et = ke.readVarint() + ke.pos; ke.pos < et; ) {
                  var dt = qe._keys[ke.readVarint()], Ct = qe._values[ke.readVarint()];
                  qe.properties[dt] = Ct;
                }
              }(le, W) : N == 3 ? W.type = le.readVarint() : N == 4 && (W._geometry = le.pos);
            }
            function SA(N) {
              for (var W, le, ke = 0, qe = 0, et = N.length, dt = et - 1; qe < et; dt = qe++) W = N[qe], ke += ((le = N[dt]).x - W.x) * (W.y + le.y);
              return ke;
            }
            p1.types = ["Unknown", "Point", "LineString", "Polygon"], p1.prototype.loadGeometry = function() {
              var N = this._pbf;
              N.pos = this._geometry;
              for (var W, le = N.readVarint() + N.pos, ke = 1, qe = 0, et = 0, dt = 0, Ct = []; N.pos < le; ) {
                if (qe <= 0) {
                  var Ut = N.readVarint();
                  ke = 7 & Ut, qe = Ut >> 3;
                }
                if (qe--, ke === 1 || ke === 2) et += N.readSVarint(), dt += N.readSVarint(), ke === 1 && (W && Ct.push(W), W = []), W.push(new f(et, dt));
                else {
                  if (ke !== 7) throw new Error("unknown command " + ke);
                  W && W.push(W[0].clone());
                }
              }
              return W && Ct.push(W), Ct;
            }, p1.prototype.bbox = function() {
              var N = this._pbf;
              N.pos = this._geometry;
              for (var W = N.readVarint() + N.pos, le = 1, ke = 0, qe = 0, et = 0, dt = 1 / 0, Ct = -1 / 0, Ut = 1 / 0, tn = -1 / 0; N.pos < W; ) {
                if (ke <= 0) {
                  var nn = N.readVarint();
                  le = 7 & nn, ke = nn >> 3;
                }
                if (ke--, le === 1 || le === 2) (qe += N.readSVarint()) < dt && (dt = qe), qe > Ct && (Ct = qe), (et += N.readSVarint()) < Ut && (Ut = et), et > tn && (tn = et);
                else if (le !== 7) throw new Error("unknown command " + le);
              }
              return [dt, Ut, Ct, tn];
            }, p1.prototype.toGeoJSON = function(N, W, le) {
              var ke, qe, et = this.extent * Math.pow(2, le), dt = this.extent * N, Ct = this.extent * W, Ut = this.loadGeometry(), tn = p1.types[this.type];
              function nn(mn) {
                for (var On = 0; On < mn.length; On++) {
                  var Bn = mn[On], ar = 180 - 360 * (Bn.y + Ct) / et;
                  mn[On] = [360 * (Bn.x + dt) / et - 180, 360 / Math.PI * Math.atan(Math.exp(ar * Math.PI / 180)) - 90];
                }
              }
              switch (this.type) {
                case 1:
                  var cn = [];
                  for (ke = 0; ke < Ut.length; ke++) cn[ke] = Ut[ke][0];
                  nn(Ut = cn);
                  break;
                case 2:
                  for (ke = 0; ke < Ut.length; ke++) nn(Ut[ke]);
                  break;
                case 3:
                  for (Ut = function(mn) {
                    var On = mn.length;
                    if (On <= 1) return [mn];
                    for (var Bn, ar, tr = [], xr = 0; xr < On; xr++) {
                      var _r = SA(mn[xr]);
                      _r !== 0 && (ar === void 0 && (ar = _r < 0), ar === _r < 0 ? (Bn && tr.push(Bn), Bn = [mn[xr]]) : Bn.push(mn[xr]));
                    }
                    return Bn && tr.push(Bn), tr;
                  }(Ut), ke = 0; ke < Ut.length; ke++) for (qe = 0; qe < Ut[ke].length; qe++) nn(Ut[ke][qe]);
              }
              Ut.length === 1 ? Ut = Ut[0] : tn = "Multi" + tn;
              var vn = { type: "Feature", geometry: { type: tn, coordinates: Ut }, properties: this.properties };
              return "id" in this && (vn.id = this.id), vn;
            };
            var h2 = o5;
            function o5(N, W) {
              this.version = 1, this.name = null, this.extent = 4096, this.length = 0, this._pbf = N, this._keys = [], this._values = [], this._features = [], N.readFields(m1, this, W), this.length = this._features.length;
            }
            function m1(N, W, le) {
              N === 15 ? W.version = le.readVarint() : N === 1 ? W.name = le.readString() : N === 5 ? W.extent = le.readVarint() : N === 2 ? W._features.push(le.pos) : N === 3 ? W._keys.push(le.readString()) : N === 4 && W._values.push(function(ke) {
                for (var qe = null, et = ke.readVarint() + ke.pos; ke.pos < et; ) {
                  var dt = ke.readVarint() >> 3;
                  qe = dt === 1 ? ke.readString() : dt === 2 ? ke.readFloat() : dt === 3 ? ke.readDouble() : dt === 4 ? ke.readVarint64() : dt === 5 ? ke.readVarint() : dt === 6 ? ke.readSVarint() : dt === 7 ? ke.readBoolean() : null;
                }
                return qe;
              }(le));
            }
            function MA(N, W, le) {
              if (N === 3) {
                var ke = new h2(le, le.readVarint() + le.pos);
                ke.length && (W[ke.name] = ke);
              }
            }
            o5.prototype.feature = function(N) {
              if (N < 0 || N >= this._features.length) throw new Error("feature index out of bounds");
              this._pbf.pos = this._features[N];
              var W = this._pbf.readVarint() + this._pbf.pos;
              return new a5(this._pbf, W, this.extent, this._keys, this._values);
            };
            var cs = { VectorTile: function(N, W) {
              this.layers = N.readFields(MA, {}, W);
            }, VectorTileFeature: a5, VectorTileLayer: h2 }, d2 = cs.VectorTileFeature.types, p2 = Math.pow(2, 13);
            function Bp(N, W, le, ke, qe, et, dt, Ct) {
              N.emplaceBack(W, le, 2 * Math.floor(ke * p2) + dt, qe * p2 * 2, et * p2 * 2, Math.round(Ct));
            }
            var bf = function(N) {
              this.zoom = N.zoom, this.overscaling = N.overscaling, this.layers = N.layers, this.layerIds = this.layers.map(function(W) {
                return W.id;
              }), this.index = N.index, this.hasPattern = !1, this.layoutVertexArray = new Ue(), this.indexArray = new fe(), this.programConfigurations = new pa(N.layers, N.zoom), this.segments = new Yn(), this.stateDependentLayerIds = this.layers.filter(function(W) {
                return W.isStateDependent();
              }).map(function(W) {
                return W.id;
              });
            };
            function iy(N, W) {
              return N.x === W.x && (N.x < 0 || N.x > Hi) || N.y === W.y && (N.y < 0 || N.y > Hi);
            }
            bf.prototype.populate = function(N, W, le) {
              this.features = [], this.hasPattern = c2("fill-extrusion", this.layers, W);
              for (var ke = 0, qe = N; ke < qe.length; ke += 1) {
                var et = qe[ke], dt = et.feature, Ct = et.id, Ut = et.index, tn = et.sourceLayerIndex, nn = this.layers[0]._featureFilter.needGeometry, cn = io(dt, nn);
                if (this.layers[0]._featureFilter.filter(new ma(this.zoom), cn, le)) {
                  var vn = { id: Ct, sourceLayerIndex: tn, index: Ut, geometry: nn ? cn.geometry : Nl(dt), properties: dt.properties, type: dt.type, patterns: {} };
                  this.hasPattern ? this.features.push(f2("fill-extrusion", this.layers, vn, this.zoom, W)) : this.addFeature(vn, vn.geometry, Ut, le, {}), W.featureIndex.insert(dt, vn.geometry, Ut, tn, this.index, !0);
                }
              }
            }, bf.prototype.addFeatures = function(N, W, le) {
              for (var ke = 0, qe = this.features; ke < qe.length; ke += 1) {
                var et = qe[ke], dt = et.geometry;
                this.addFeature(et, dt, et.index, W, le);
              }
            }, bf.prototype.update = function(N, W, le) {
              this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(N, W, this.stateDependentLayers, le);
            }, bf.prototype.isEmpty = function() {
              return this.layoutVertexArray.length === 0;
            }, bf.prototype.uploadPending = function() {
              return !this.uploaded || this.programConfigurations.needsUpload;
            }, bf.prototype.upload = function(N) {
              this.uploaded || (this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, TA), this.indexBuffer = N.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(N), this.uploaded = !0;
            }, bf.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
            }, bf.prototype.addFeature = function(N, W, le, ke, qe) {
              for (var et = 0, dt = i5(W, 500); et < dt.length; et += 1) {
                for (var Ct = dt[et], Ut = 0, tn = 0, nn = Ct; tn < nn.length; tn += 1) Ut += nn[tn].length;
                for (var cn = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray), vn = 0, mn = Ct; vn < mn.length; vn += 1) {
                  var On = mn[vn];
                  if (On.length !== 0 && !((za = On).every(function(ga) {
                    return ga.x < 0;
                  }) || za.every(function(ga) {
                    return ga.x > Hi;
                  }) || za.every(function(ga) {
                    return ga.y < 0;
                  }) || za.every(function(ga) {
                    return ga.y > Hi;
                  }))) for (var Bn = 0, ar = 0; ar < On.length; ar++) {
                    var tr = On[ar];
                    if (ar >= 1) {
                      var xr = On[ar - 1];
                      if (!iy(tr, xr)) {
                        cn.vertexLength + 4 > Yn.MAX_VERTEX_ARRAY_LENGTH && (cn = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
                        var _r = tr.sub(xr)._perp()._unit(), Lr = xr.dist(tr);
                        Bn + Lr > 32768 && (Bn = 0), Bp(this.layoutVertexArray, tr.x, tr.y, _r.x, _r.y, 0, 0, Bn), Bp(this.layoutVertexArray, tr.x, tr.y, _r.x, _r.y, 0, 1, Bn), Bn += Lr, Bp(this.layoutVertexArray, xr.x, xr.y, _r.x, _r.y, 0, 0, Bn), Bp(this.layoutVertexArray, xr.x, xr.y, _r.x, _r.y, 0, 1, Bn);
                        var Ur = cn.vertexLength;
                        this.indexArray.emplaceBack(Ur, Ur + 2, Ur + 1), this.indexArray.emplaceBack(Ur + 1, Ur + 2, Ur + 3), cn.vertexLength += 4, cn.primitiveLength += 2;
                      }
                    }
                  }
                }
                if (cn.vertexLength + Ut > Yn.MAX_VERTEX_ARRAY_LENGTH && (cn = this.segments.prepareSegment(Ut, this.layoutVertexArray, this.indexArray)), d2[N.type] === "Polygon") {
                  for (var $r = [], ai = [], Hr = cn.vertexLength, hi = 0, Ti = Ct; hi < Ti.length; hi += 1) {
                    var ta = Ti[hi];
                    if (ta.length !== 0) {
                      ta !== Ct[0] && ai.push($r.length / 2);
                      for (var zi = 0; zi < ta.length; zi++) {
                        var Ki = ta[zi];
                        Bp(this.layoutVertexArray, Ki.x, Ki.y, 0, 0, 1, 1, 0), $r.push(Ki.x), $r.push(Ki.y);
                      }
                    }
                  }
                  for (var $i = l1($r, ai), Ii = 0; Ii < $i.length; Ii += 3) this.indexArray.emplaceBack(Hr + $i[Ii], Hr + $i[Ii + 2], Hr + $i[Ii + 1]);
                  cn.primitiveLength += $i.length / 3, cn.vertexLength += Ut;
                }
              }
              var za;
              this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, N, le, qe, ke);
            }, xi("FillExtrusionBucket", bf, { omit: ["layers", "features"] });
            var s5 = { paint: new Za({ "fill-extrusion-opacity": new ni(st["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Ci(st["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new ni(st["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new ni(st["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new us(st["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Ci(st["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Ci(st["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new ni(st["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) }) }, l5 = function(N) {
              function W(le) {
                N.call(this, le, s5);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.createBucket = function(le) {
                return new bf(le);
              }, W.prototype.queryRadius = function() {
                return vh(this.paint.get("fill-extrusion-translate"));
              }, W.prototype.is3D = function() {
                return !0;
              }, W.prototype.queryIntersectsFeature = function(le, ke, qe, et, dt, Ct, Ut, tn) {
                var nn = vf(le, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), Ct.angle, Ut), cn = this.paint.get("fill-extrusion-height").evaluate(ke, qe), vn = this.paint.get("fill-extrusion-base").evaluate(ke, qe), mn = function(Bn, ar, tr, xr) {
                  for (var _r = [], Lr = 0, Ur = Bn; Lr < Ur.length; Lr += 1) {
                    var $r = Ur[Lr], ai = [$r.x, $r.y, xr, 1];
                    cd(ai, ai, ar), _r.push(new f(ai[0] / ai[3], ai[1] / ai[3]));
                  }
                  return _r;
                }(nn, tn, 0, 0), On = function(Bn, ar, tr, xr) {
                  for (var _r = [], Lr = [], Ur = xr[8] * ar, $r = xr[9] * ar, ai = xr[10] * ar, Hr = xr[11] * ar, hi = xr[8] * tr, Ti = xr[9] * tr, ta = xr[10] * tr, zi = xr[11] * tr, Ki = 0, $i = Bn; Ki < $i.length; Ki += 1) {
                    for (var Ii = [], za = [], ga = 0, fo = $i[Ki]; ga < fo.length; ga += 1) {
                      var Wi = fo[ga], Xa = Wi.x, bo = Wi.y, oo = xr[0] * Xa + xr[4] * bo + xr[12], _o = xr[1] * Xa + xr[5] * bo + xr[13], ho = xr[2] * Xa + xr[6] * bo + xr[14], qs = xr[3] * Xa + xr[7] * bo + xr[15], Oo = ho + ai, Hs = qs + Hr, fu = oo + hi, Vl = _o + Ti, Vu = ho + ta, ku = qs + zi, J = new f((oo + Ur) / Hs, (_o + $r) / Hs);
                      J.z = Oo / Hs, Ii.push(J);
                      var H = new f(fu / ku, Vl / ku);
                      H.z = Vu / ku, za.push(H);
                    }
                    _r.push(Ii), Lr.push(za);
                  }
                  return [_r, Lr];
                }(et, vn, cn, tn);
                return function(Bn, ar, tr) {
                  var xr = 1 / 0;
                  yf(tr, ar) && (xr = m2(tr, ar[0]));
                  for (var _r = 0; _r < ar.length; _r++) for (var Lr = ar[_r], Ur = Bn[_r], $r = 0; $r < Lr.length - 1; $r++) {
                    var ai = Lr[$r], Hr = Lr[$r + 1], hi = Ur[$r], Ti = [ai, Hr, Ur[$r + 1], hi, ai];
                    gh(tr, Ti) && (xr = Math.min(xr, m2(tr, Ti)));
                  }
                  return xr !== 1 / 0 && xr;
                }(On[0], On[1], mn);
              }, W;
            }(na);
            function qd(N, W) {
              return N.x * W.x + N.y * W.y;
            }
            function m2(N, W) {
              if (N.length === 1) {
                for (var le, ke = 0, qe = W[ke++]; !le || qe.equals(le); ) if (!(le = W[ke++])) return 1 / 0;
                for (; ke < W.length; ke++) {
                  var et = W[ke], dt = N[0], Ct = le.sub(qe), Ut = et.sub(qe), tn = dt.sub(qe), nn = qd(Ct, Ct), cn = qd(Ct, Ut), vn = qd(Ut, Ut), mn = qd(tn, Ct), On = qd(tn, Ut), Bn = nn * vn - cn * cn, ar = (vn * mn - cn * On) / Bn, tr = (nn * On - cn * mn) / Bn, xr = 1 - ar - tr, _r = qe.z * xr + le.z * ar + et.z * tr;
                  if (isFinite(_r)) return _r;
                }
                return 1 / 0;
              }
              for (var Lr = 1 / 0, Ur = 0, $r = W; Ur < $r.length; Ur += 1) {
                var ai = $r[Ur];
                Lr = Math.min(Lr, ai.z);
              }
              return Lr;
            }
            var t_ = He([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4).members, n_ = He([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]).members, r_ = cs.VectorTileFeature.types, u5 = Math.cos(Math.PI / 180 * 37.5), i_ = Math.pow(2, 14) / 0.5, dc = function(N) {
              var W = this;
              this.zoom = N.zoom, this.overscaling = N.overscaling, this.layers = N.layers, this.layerIds = this.layers.map(function(le) {
                return le.id;
              }), this.index = N.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach(function(le) {
                W.gradients[le.id] = {};
              }), this.layoutVertexArray = new Qe(), this.layoutVertexArray2 = new ht(), this.indexArray = new fe(), this.programConfigurations = new pa(N.layers, N.zoom), this.segments = new Yn(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter(function(le) {
                return le.isStateDependent();
              }).map(function(le) {
                return le.id;
              });
            };
            dc.prototype.populate = function(N, W, le) {
              this.hasPattern = c2("line", this.layers, W);
              for (var ke = this.layers[0].layout.get("line-sort-key"), qe = [], et = 0, dt = N; et < dt.length; et += 1) {
                var Ct = dt[et], Ut = Ct.feature, tn = Ct.id, nn = Ct.index, cn = Ct.sourceLayerIndex, vn = this.layers[0]._featureFilter.needGeometry, mn = io(Ut, vn);
                if (this.layers[0]._featureFilter.filter(new ma(this.zoom), mn, le)) {
                  var On = ke ? ke.evaluate(mn, {}, le) : void 0, Bn = { id: tn, properties: Ut.properties, type: Ut.type, sourceLayerIndex: cn, index: nn, geometry: vn ? mn.geometry : Nl(Ut), patterns: {}, sortKey: On };
                  qe.push(Bn);
                }
              }
              ke && qe.sort(function(hi, Ti) {
                return hi.sortKey - Ti.sortKey;
              });
              for (var ar = 0, tr = qe; ar < tr.length; ar += 1) {
                var xr = tr[ar], _r = xr, Lr = _r.geometry, Ur = _r.index, $r = _r.sourceLayerIndex;
                if (this.hasPattern) {
                  var ai = f2("line", this.layers, xr, this.zoom, W);
                  this.patternFeatures.push(ai);
                } else this.addFeature(xr, Lr, Ur, le, {});
                var Hr = N[Ur].feature;
                W.featureIndex.insert(Hr, Lr, Ur, $r, this.index);
              }
            }, dc.prototype.update = function(N, W, le) {
              this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(N, W, this.stateDependentLayers, le);
            }, dc.prototype.addFeatures = function(N, W, le) {
              for (var ke = 0, qe = this.patternFeatures; ke < qe.length; ke += 1) {
                var et = qe[ke];
                this.addFeature(et, et.geometry, et.index, W, le);
              }
            }, dc.prototype.isEmpty = function() {
              return this.layoutVertexArray.length === 0;
            }, dc.prototype.uploadPending = function() {
              return !this.uploaded || this.programConfigurations.needsUpload;
            }, dc.prototype.upload = function(N) {
              this.uploaded || (this.layoutVertexArray2.length !== 0 && (this.layoutVertexBuffer2 = N.createVertexBuffer(this.layoutVertexArray2, n_)), this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, t_), this.indexBuffer = N.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(N), this.uploaded = !0;
            }, dc.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
            }, dc.prototype.lineFeatureClips = function(N) {
              if (N.properties && N.properties.hasOwnProperty("mapbox_clip_start") && N.properties.hasOwnProperty("mapbox_clip_end")) return { start: +N.properties.mapbox_clip_start, end: +N.properties.mapbox_clip_end };
            }, dc.prototype.addFeature = function(N, W, le, ke, qe) {
              var et = this.layers[0].layout, dt = et.get("line-join").evaluate(N, {}), Ct = et.get("line-cap"), Ut = et.get("line-miter-limit"), tn = et.get("line-round-limit");
              this.lineClips = this.lineFeatureClips(N);
              for (var nn = 0, cn = W; nn < cn.length; nn += 1) {
                var vn = cn[nn];
                this.addLine(vn, N, dt, Ct, Ut, tn);
              }
              this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, N, le, qe, ke);
            }, dc.prototype.addLine = function(N, W, le, ke, qe, et) {
              if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, this.lineClips) {
                this.lineClipsArray.push(this.lineClips);
                for (var dt = 0; dt < N.length - 1; dt++) this.totalDistance += N[dt].dist(N[dt + 1]);
                this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);
              }
              for (var Ct = r_[W.type] === "Polygon", Ut = N.length; Ut >= 2 && N[Ut - 1].equals(N[Ut - 2]); ) Ut--;
              for (var tn = 0; tn < Ut - 1 && N[tn].equals(N[tn + 1]); ) tn++;
              if (!(Ut < (Ct ? 3 : 2))) {
                le === "bevel" && (qe = 1.05);
                var nn, cn = this.overscaling <= 16 ? 15 * Hi / (512 * this.overscaling) : 0, vn = this.segments.prepareSegment(10 * Ut, this.layoutVertexArray, this.indexArray), mn = void 0, On = void 0, Bn = void 0, ar = void 0;
                this.e1 = this.e2 = -1, Ct && (nn = N[Ut - 2], ar = N[tn].sub(nn)._unit()._perp());
                for (var tr = tn; tr < Ut; tr++) if (!(On = tr === Ut - 1 ? Ct ? N[tn + 1] : void 0 : N[tr + 1]) || !N[tr].equals(On)) {
                  ar && (Bn = ar), nn && (mn = nn), nn = N[tr], ar = On ? On.sub(nn)._unit()._perp() : Bn;
                  var xr = (Bn = Bn || ar).add(ar);
                  xr.x === 0 && xr.y === 0 || xr._unit();
                  var _r = Bn.x * ar.x + Bn.y * ar.y, Lr = xr.x * ar.x + xr.y * ar.y, Ur = Lr !== 0 ? 1 / Lr : 1 / 0, $r = 2 * Math.sqrt(2 - 2 * Lr), ai = Lr < u5 && mn && On, Hr = Bn.x * ar.y - Bn.y * ar.x > 0;
                  if (ai && tr > tn) {
                    var hi = nn.dist(mn);
                    if (hi > 2 * cn) {
                      var Ti = nn.sub(nn.sub(mn)._mult(cn / hi)._round());
                      this.updateDistance(mn, Ti), this.addCurrentVertex(Ti, Bn, 0, 0, vn), mn = Ti;
                    }
                  }
                  var ta = mn && On, zi = ta ? le : Ct ? "butt" : ke;
                  if (ta && zi === "round" && (Ur < et ? zi = "miter" : Ur <= 2 && (zi = "fakeround")), zi === "miter" && Ur > qe && (zi = "bevel"), zi === "bevel" && (Ur > 2 && (zi = "flipbevel"), Ur < qe && (zi = "miter")), mn && this.updateDistance(mn, nn), zi === "miter") xr._mult(Ur), this.addCurrentVertex(nn, xr, 0, 0, vn);
                  else if (zi === "flipbevel") {
                    if (Ur > 100) xr = ar.mult(-1);
                    else {
                      var Ki = Ur * Bn.add(ar).mag() / Bn.sub(ar).mag();
                      xr._perp()._mult(Ki * (Hr ? -1 : 1));
                    }
                    this.addCurrentVertex(nn, xr, 0, 0, vn), this.addCurrentVertex(nn, xr.mult(-1), 0, 0, vn);
                  } else if (zi === "bevel" || zi === "fakeround") {
                    var $i = -Math.sqrt(Ur * Ur - 1), Ii = Hr ? $i : 0, za = Hr ? 0 : $i;
                    if (mn && this.addCurrentVertex(nn, Bn, Ii, za, vn), zi === "fakeround") for (var ga = Math.round(180 * $r / Math.PI / 20), fo = 1; fo < ga; fo++) {
                      var Wi = fo / ga;
                      if (Wi !== 0.5) {
                        var Xa = Wi - 0.5;
                        Wi += Wi * Xa * (Wi - 1) * ((1.0904 + _r * (_r * (3.55645 - 1.43519 * _r) - 3.2452)) * Xa * Xa + (0.848013 + _r * (0.215638 * _r - 1.06021)));
                      }
                      var bo = ar.sub(Bn)._mult(Wi)._add(Bn)._unit()._mult(Hr ? -1 : 1);
                      this.addHalfVertex(nn, bo.x, bo.y, !1, Hr, 0, vn);
                    }
                    On && this.addCurrentVertex(nn, ar, -Ii, -za, vn);
                  } else if (zi === "butt") this.addCurrentVertex(nn, xr, 0, 0, vn);
                  else if (zi === "square") {
                    var oo = mn ? 1 : -1;
                    this.addCurrentVertex(nn, xr, oo, oo, vn);
                  } else zi === "round" && (mn && (this.addCurrentVertex(nn, Bn, 0, 0, vn), this.addCurrentVertex(nn, Bn, 1, 1, vn, !0)), On && (this.addCurrentVertex(nn, ar, -1, -1, vn, !0), this.addCurrentVertex(nn, ar, 0, 0, vn)));
                  if (ai && tr < Ut - 1) {
                    var _o = nn.dist(On);
                    if (_o > 2 * cn) {
                      var ho = nn.add(On.sub(nn)._mult(cn / _o)._round());
                      this.updateDistance(nn, ho), this.addCurrentVertex(ho, ar, 0, 0, vn), nn = ho;
                    }
                  }
                }
              }
            }, dc.prototype.addCurrentVertex = function(N, W, le, ke, qe, et) {
              et === void 0 && (et = !1);
              var dt = W.x + W.y * le, Ct = W.y - W.x * le, Ut = -W.x + W.y * ke, tn = -W.y - W.x * ke;
              this.addHalfVertex(N, dt, Ct, et, !1, le, qe), this.addHalfVertex(N, Ut, tn, et, !0, -ke, qe), this.distance > i_ / 2 && this.totalDistance === 0 && (this.distance = 0, this.addCurrentVertex(N, W, le, ke, qe, et));
            }, dc.prototype.addHalfVertex = function(N, W, le, ke, qe, et, dt) {
              var Ct = N.x, Ut = N.y, tn = 0.5 * (this.lineClips ? this.scaledDistance * (i_ - 1) : this.scaledDistance);
              if (this.layoutVertexArray.emplaceBack((Ct << 1) + (ke ? 1 : 0), (Ut << 1) + (qe ? 1 : 0), Math.round(63 * W) + 128, Math.round(63 * le) + 128, 1 + (et === 0 ? 0 : et < 0 ? -1 : 1) | (63 & tn) << 2, tn >> 6), this.lineClips) {
                var nn = (this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start);
                this.layoutVertexArray2.emplaceBack(nn, this.lineClipsArray.length);
              }
              var cn = dt.vertexLength++;
              this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, this.e2, cn), dt.primitiveLength++), qe ? this.e2 = cn : this.e1 = cn;
            }, dc.prototype.updateScaledDistance = function() {
              this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance;
            }, dc.prototype.updateDistance = function(N, W) {
              this.distance += N.dist(W), this.updateScaledDistance();
            }, xi("LineBucket", dc, { omit: ["layers", "patternFeatures"] });
            var EA = new Za({ "line-cap": new ni(st.layout_line["line-cap"]), "line-join": new Ci(st.layout_line["line-join"]), "line-miter-limit": new ni(st.layout_line["line-miter-limit"]), "line-round-limit": new ni(st.layout_line["line-round-limit"]), "line-sort-key": new Ci(st.layout_line["line-sort-key"]) }), c5 = { paint: new Za({ "line-opacity": new Ci(st.paint_line["line-opacity"]), "line-color": new Ci(st.paint_line["line-color"]), "line-translate": new ni(st.paint_line["line-translate"]), "line-translate-anchor": new ni(st.paint_line["line-translate-anchor"]), "line-width": new Ci(st.paint_line["line-width"]), "line-gap-width": new Ci(st.paint_line["line-gap-width"]), "line-offset": new Ci(st.paint_line["line-offset"]), "line-blur": new Ci(st.paint_line["line-blur"]), "line-dasharray": new al(st.paint_line["line-dasharray"]), "line-pattern": new us(st.paint_line["line-pattern"]), "line-gradient": new ou(st.paint_line["line-gradient"]) }), layout: EA }, CA = function(N) {
              function W() {
                N.apply(this, arguments);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.possiblyEvaluate = function(le, ke) {
                return ke = new ma(Math.floor(ke.zoom), { now: ke.now, fadeDuration: ke.fadeDuration, zoomHistory: ke.zoomHistory, transition: ke.transition }), N.prototype.possiblyEvaluate.call(this, le, ke);
              }, W.prototype.evaluate = function(le, ke, qe, et) {
                return ke = A({}, ke, { zoom: Math.floor(ke.zoom) }), N.prototype.evaluate.call(this, le, ke, qe, et);
              }, W;
            }(Ci), f5 = new CA(c5.paint.properties["line-width"].specification);
            f5.useIntegerZoom = !0;
            var eF = function(N) {
              function W(le) {
                N.call(this, le, c5), this.gradientVersion = 0;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype._handleSpecialPaintPropertyUpdate = function(le) {
                if (le === "line-gradient") {
                  var ke = this._transitionablePaint._values["line-gradient"].value.expression;
                  this.stepInterpolant = ke._styleExpression.expression instanceof yi, this.gradientVersion = (this.gradientVersion + 1) % m;
                }
              }, W.prototype.gradientExpression = function() {
                return this._transitionablePaint._values["line-gradient"].value.expression;
              }, W.prototype.recalculate = function(le, ke) {
                N.prototype.recalculate.call(this, le, ke), this.paint._values["line-floorwidth"] = f5.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, le);
              }, W.prototype.createBucket = function(le) {
                return new dc(le);
              }, W.prototype.queryRadius = function(le) {
                var ke = le, qe = IA(ud("line-width", this, ke), ud("line-gap-width", this, ke)), et = ud("line-offset", this, ke);
                return qe / 2 + Math.abs(et) + vh(this.paint.get("line-translate"));
              }, W.prototype.queryIntersectsFeature = function(le, ke, qe, et, dt, Ct, Ut) {
                var tn = vf(le, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), Ct.angle, Ut), nn = Ut / 2 * IA(this.paint.get("line-width").evaluate(ke, qe), this.paint.get("line-gap-width").evaluate(ke, qe)), cn = this.paint.get("line-offset").evaluate(ke, qe);
                return cn && (et = function(vn, mn) {
                  for (var On = [], Bn = new f(0, 0), ar = 0; ar < vn.length; ar++) {
                    for (var tr = vn[ar], xr = [], _r = 0; _r < tr.length; _r++) {
                      var Lr = tr[_r - 1], Ur = tr[_r], $r = tr[_r + 1], ai = _r === 0 ? Bn : Ur.sub(Lr)._unit()._perp(), Hr = _r === tr.length - 1 ? Bn : $r.sub(Ur)._unit()._perp(), hi = ai._add(Hr)._unit(), Ti = hi.x * Hr.x + hi.y * Hr.y;
                      hi._mult(1 / Ti), xr.push(hi._mult(mn)._add(Ur));
                    }
                    On.push(xr);
                  }
                  return On;
                }(et, cn * Ut)), function(vn, mn, On) {
                  for (var Bn = 0; Bn < mn.length; Bn++) {
                    var ar = mn[Bn];
                    if (vn.length >= 3) {
                      for (var tr = 0; tr < ar.length; tr++) if (yh(vn, ar[tr])) return !0;
                    }
                    if (Ud(vn, ar, On)) return !0;
                  }
                  return !1;
                }(tn, et, nn);
              }, W.prototype.isTileClipped = function() {
                return !0;
              }, W;
            }(na);
            function IA(N, W) {
              return W > 0 ? W + 2 * N : N;
            }
            var jp = He([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), DA = He([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4), h5 = (He([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4), He([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }])), tm = (He([{ 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" }]), He([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4)), LA = He([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
            function PA(N, W, le) {
              return N.sections.forEach(function(ke) {
                ke.text = function(qe, et, dt) {
                  var Ct = et.layout.get("text-transform").evaluate(dt, {});
                  return Ct === "uppercase" ? qe = qe.toLocaleUpperCase() : Ct === "lowercase" && (qe = qe.toLocaleLowerCase()), ls.applyArabicShaping && (qe = ls.applyArabicShaping(qe)), qe;
                }(ke.text, W, le);
              }), N;
            }
            He([{ name: "triangle", components: 3, type: "Uint16" }]), He([{ 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" }, { type: "Uint8", name: "writingMode" }, { type: "Uint8", name: "placedOrientation" }, { type: "Uint8", name: "hidden" }, { type: "Uint32", name: "crossTileID" }, { type: "Int16", name: "associatedIconIndex" }]), He([{ 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", components: 2, name: "textOffset" }, { type: "Float32", name: "collisionCircleDiameter" }]), He([{ type: "Float32", name: "offsetX" }]), He([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]);
            var ay = { "!": "︕", "#": "＃", $: "＄", "%": "％", "&": "＆", "(": "︵", ")": "︶", "*": "＊", "+": "＋", ",": "︐", "-": "︲", ".": "・", "/": "／", ":": "︓", ";": "︔", "<": "︿", "=": "＝", ">": "﹀", "?": "︖", "@": "＠", "[": "﹇", "\\": "＼", "]": "﹈", "^": "＾", _: "︳", "`": "｀", "{": "︷", "|": "―", "}": "︸", "~": "～", "¢": "￠", "£": "￡", "¥": "￥", "¦": "￤", "¬": "￢", "¯": "￣", "–": "︲", "—": "︱", "‘": "﹃", "’": "﹄", "“": "﹁", "”": "﹂", "…": "︙", "‧": "・", "₩": "￦", "、": "︑", "。": "︒", "〈": "︿", "〉": "﹀", "《": "︽", "》": "︾", "「": "﹁", "」": "﹂", "『": "﹃", "』": "﹄", "【": "︻", "】": "︼", "〔": "︹", "〕": "︺", "〖": "︗", "〗": "︘", "！": "︕", "（": "︵", "）": "︶", "，": "︐", "－": "︲", "．": "・", "：": "︓", "；": "︔", "＜": "︿", "＞": "﹀", "？": "︖", "［": "﹇", "］": "﹈", "＿": "︳", "｛": "︷", "｜": "―", "｝": "︸", "｟": "︵", "｠": "︶", "｡": "︒", "｢": "﹁", "｣": "﹂" }, cu = 24, a_ = function(N, W, le, ke, qe) {
              var et, dt, Ct = 8 * qe - ke - 1, Ut = (1 << Ct) - 1, tn = Ut >> 1, nn = -7, cn = qe - 1, vn = -1, mn = N[W + cn];
              for (cn += vn, et = mn & (1 << -nn) - 1, mn >>= -nn, nn += Ct; nn > 0; et = 256 * et + N[W + cn], cn += vn, nn -= 8) ;
              for (dt = et & (1 << -nn) - 1, et >>= -nn, nn += ke; nn > 0; dt = 256 * dt + N[W + cn], cn += vn, nn -= 8) ;
              if (et === 0) et = 1 - tn;
              else {
                if (et === Ut) return dt ? NaN : 1 / 0 * (mn ? -1 : 1);
                dt += Math.pow(2, ke), et -= tn;
              }
              return (mn ? -1 : 1) * dt * Math.pow(2, et - ke);
            }, d5 = function(N, W, le, ke, qe, et) {
              var dt, Ct, Ut, tn = 8 * et - qe - 1, nn = (1 << tn) - 1, cn = nn >> 1, vn = qe === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, mn = 0, On = 1, Bn = W < 0 || W === 0 && 1 / W < 0 ? 1 : 0;
              for (W = Math.abs(W), isNaN(W) || W === 1 / 0 ? (Ct = isNaN(W) ? 1 : 0, dt = nn) : (dt = Math.floor(Math.log(W) / Math.LN2), W * (Ut = Math.pow(2, -dt)) < 1 && (dt--, Ut *= 2), (W += dt + cn >= 1 ? vn / Ut : vn * Math.pow(2, 1 - cn)) * Ut >= 2 && (dt++, Ut /= 2), dt + cn >= nn ? (Ct = 0, dt = nn) : dt + cn >= 1 ? (Ct = (W * Ut - 1) * Math.pow(2, qe), dt += cn) : (Ct = W * Math.pow(2, cn - 1) * Math.pow(2, qe), dt = 0)); qe >= 8; N[le + mn] = 255 & Ct, mn += On, Ct /= 256, qe -= 8) ;
              for (dt = dt << qe | Ct, tn += qe; tn > 0; N[le + mn] = 255 & dt, mn += On, dt /= 256, tn -= 8) ;
              N[le + mn - On] |= 128 * Bn;
            }, g2 = Po;
            function Po(N) {
              this.buf = ArrayBuffer.isView && ArrayBuffer.isView(N) ? N : new Uint8Array(N || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
            }
            Po.Varint = 0, Po.Fixed64 = 1, Po.Bytes = 2, Po.Fixed32 = 5;
            var o_ = 4294967296, p5 = 1 / o_, y2 = typeof TextDecoder > "u" ? null : new TextDecoder("utf8");
            function qf(N) {
              return N.type === Po.Bytes ? N.readVarint() + N.pos : N.pos + 1;
            }
            function Up(N, W, le) {
              return le ? 4294967296 * W + (N >>> 0) : 4294967296 * (W >>> 0) + (N >>> 0);
            }
            function m5(N, W, le) {
              var ke = W <= 16383 ? 1 : W <= 2097151 ? 2 : W <= 268435455 ? 3 : Math.floor(Math.log(W) / (7 * Math.LN2));
              le.realloc(ke);
              for (var qe = le.pos - 1; qe >= N; qe--) le.buf[qe + ke] = le.buf[qe];
            }
            function OA(N, W) {
              for (var le = 0; le < N.length; le++) W.writeVarint(N[le]);
            }
            function g5(N, W) {
              for (var le = 0; le < N.length; le++) W.writeSVarint(N[le]);
            }
            function zA(N, W) {
              for (var le = 0; le < N.length; le++) W.writeFloat(N[le]);
            }
            function RA(N, W) {
              for (var le = 0; le < N.length; le++) W.writeDouble(N[le]);
            }
            function oy(N, W) {
              for (var le = 0; le < N.length; le++) W.writeBoolean(N[le]);
            }
            function y5(N, W) {
              for (var le = 0; le < N.length; le++) W.writeFixed32(N[le]);
            }
            function FA(N, W) {
              for (var le = 0; le < N.length; le++) W.writeSFixed32(N[le]);
            }
            function NA(N, W) {
              for (var le = 0; le < N.length; le++) W.writeFixed64(N[le]);
            }
            function tF(N, W) {
              for (var le = 0; le < N.length; le++) W.writeSFixed64(N[le]);
            }
            function s_(N, W) {
              return (N[W] | N[W + 1] << 8 | N[W + 2] << 16) + 16777216 * N[W + 3];
            }
            function g1(N, W, le) {
              N[le] = W, N[le + 1] = W >>> 8, N[le + 2] = W >>> 16, N[le + 3] = W >>> 24;
            }
            function v5(N, W) {
              return (N[W] | N[W + 1] << 8 | N[W + 2] << 16) + (N[W + 3] << 24);
            }
            Po.prototype = { destroy: function() {
              this.buf = null;
            }, readFields: function(N, W, le) {
              for (le = le || this.length; this.pos < le; ) {
                var ke = this.readVarint(), qe = ke >> 3, et = this.pos;
                this.type = 7 & ke, N(qe, W, this), this.pos === et && this.skip(ke);
              }
              return W;
            }, readMessage: function(N, W) {
              return this.readFields(N, W, this.readVarint() + this.pos);
            }, readFixed32: function() {
              var N = s_(this.buf, this.pos);
              return this.pos += 4, N;
            }, readSFixed32: function() {
              var N = v5(this.buf, this.pos);
              return this.pos += 4, N;
            }, readFixed64: function() {
              var N = s_(this.buf, this.pos) + s_(this.buf, this.pos + 4) * o_;
              return this.pos += 8, N;
            }, readSFixed64: function() {
              var N = s_(this.buf, this.pos) + v5(this.buf, this.pos + 4) * o_;
              return this.pos += 8, N;
            }, readFloat: function() {
              var N = a_(this.buf, this.pos, !0, 23, 4);
              return this.pos += 4, N;
            }, readDouble: function() {
              var N = a_(this.buf, this.pos, !0, 52, 8);
              return this.pos += 8, N;
            }, readVarint: function(N) {
              var W, le, ke = this.buf;
              return W = 127 & (le = ke[this.pos++]), le < 128 ? W : (W |= (127 & (le = ke[this.pos++])) << 7, le < 128 ? W : (W |= (127 & (le = ke[this.pos++])) << 14, le < 128 ? W : (W |= (127 & (le = ke[this.pos++])) << 21, le < 128 ? W : function(qe, et, dt) {
                var Ct, Ut, tn = dt.buf;
                if (Ct = (112 & (Ut = tn[dt.pos++])) >> 4, Ut < 128 || (Ct |= (127 & (Ut = tn[dt.pos++])) << 3, Ut < 128) || (Ct |= (127 & (Ut = tn[dt.pos++])) << 10, Ut < 128) || (Ct |= (127 & (Ut = tn[dt.pos++])) << 17, Ut < 128) || (Ct |= (127 & (Ut = tn[dt.pos++])) << 24, Ut < 128) || (Ct |= (1 & (Ut = tn[dt.pos++])) << 31, Ut < 128)) return Up(qe, Ct, et);
                throw new Error("Expected varint not more than 10 bytes");
              }(W |= (15 & (le = ke[this.pos])) << 28, N, this))));
            }, readVarint64: function() {
              return this.readVarint(!0);
            }, readSVarint: function() {
              var N = this.readVarint();
              return N % 2 == 1 ? (N + 1) / -2 : N / 2;
            }, readBoolean: function() {
              return !!this.readVarint();
            }, readString: function() {
              var N = this.readVarint() + this.pos, W = this.pos;
              return this.pos = N, N - W >= 12 && y2 ? function(le, ke, qe) {
                return y2.decode(le.subarray(ke, qe));
              }(this.buf, W, N) : function(le, ke, qe) {
                for (var et = "", dt = ke; dt < qe; ) {
                  var Ct, Ut, tn, nn = le[dt], cn = null, vn = nn > 239 ? 4 : nn > 223 ? 3 : nn > 191 ? 2 : 1;
                  if (dt + vn > qe) break;
                  vn === 1 ? nn < 128 && (cn = nn) : vn === 2 ? (192 & (Ct = le[dt + 1])) == 128 && (cn = (31 & nn) << 6 | 63 & Ct) <= 127 && (cn = null) : vn === 3 ? (Ct = le[dt + 1], Ut = le[dt + 2], (192 & Ct) == 128 && (192 & Ut) == 128 && ((cn = (15 & nn) << 12 | (63 & Ct) << 6 | 63 & Ut) <= 2047 || cn >= 55296 && cn <= 57343) && (cn = null)) : vn === 4 && (Ct = le[dt + 1], Ut = le[dt + 2], tn = le[dt + 3], (192 & Ct) == 128 && (192 & Ut) == 128 && (192 & tn) == 128 && ((cn = (15 & nn) << 18 | (63 & Ct) << 12 | (63 & Ut) << 6 | 63 & tn) <= 65535 || cn >= 1114112) && (cn = null)), cn === null ? (cn = 65533, vn = 1) : cn > 65535 && (cn -= 65536, et += String.fromCharCode(cn >>> 10 & 1023 | 55296), cn = 56320 | 1023 & cn), et += String.fromCharCode(cn), dt += vn;
                }
                return et;
              }(this.buf, W, N);
            }, readBytes: function() {
              var N = this.readVarint() + this.pos, W = this.buf.subarray(this.pos, N);
              return this.pos = N, W;
            }, readPackedVarint: function(N, W) {
              if (this.type !== Po.Bytes) return N.push(this.readVarint(W));
              var le = qf(this);
              for (N = N || []; this.pos < le; ) N.push(this.readVarint(W));
              return N;
            }, readPackedSVarint: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readSVarint());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readSVarint());
              return N;
            }, readPackedBoolean: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readBoolean());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readBoolean());
              return N;
            }, readPackedFloat: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readFloat());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readFloat());
              return N;
            }, readPackedDouble: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readDouble());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readDouble());
              return N;
            }, readPackedFixed32: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readFixed32());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readFixed32());
              return N;
            }, readPackedSFixed32: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readSFixed32());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readSFixed32());
              return N;
            }, readPackedFixed64: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readFixed64());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readFixed64());
              return N;
            }, readPackedSFixed64: function(N) {
              if (this.type !== Po.Bytes) return N.push(this.readSFixed64());
              var W = qf(this);
              for (N = N || []; this.pos < W; ) N.push(this.readSFixed64());
              return N;
            }, skip: function(N) {
              var W = 7 & N;
              if (W === Po.Varint) for (; this.buf[this.pos++] > 127; ) ;
              else if (W === Po.Bytes) this.pos = this.readVarint() + this.pos;
              else if (W === Po.Fixed32) this.pos += 4;
              else {
                if (W !== Po.Fixed64) throw new Error("Unimplemented type: " + W);
                this.pos += 8;
              }
            }, writeTag: function(N, W) {
              this.writeVarint(N << 3 | W);
            }, realloc: function(N) {
              for (var W = this.length || 16; W < this.pos + N; ) W *= 2;
              if (W !== this.length) {
                var le = new Uint8Array(W);
                le.set(this.buf), this.buf = le, this.length = W;
              }
            }, finish: function() {
              return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
            }, writeFixed32: function(N) {
              this.realloc(4), g1(this.buf, N, this.pos), this.pos += 4;
            }, writeSFixed32: function(N) {
              this.realloc(4), g1(this.buf, N, this.pos), this.pos += 4;
            }, writeFixed64: function(N) {
              this.realloc(8), g1(this.buf, -1 & N, this.pos), g1(this.buf, Math.floor(N * p5), this.pos + 4), this.pos += 8;
            }, writeSFixed64: function(N) {
              this.realloc(8), g1(this.buf, -1 & N, this.pos), g1(this.buf, Math.floor(N * p5), this.pos + 4), this.pos += 8;
            }, writeVarint: function(N) {
              (N = +N || 0) > 268435455 || N < 0 ? function(W, le) {
                var ke, qe;
                if (W >= 0 ? (ke = W % 4294967296 | 0, qe = W / 4294967296 | 0) : (qe = ~(-W / 4294967296), 4294967295 ^ (ke = ~(-W % 4294967296)) ? ke = ke + 1 | 0 : (ke = 0, qe = qe + 1 | 0)), W >= 18446744073709552e3 || W < -18446744073709552e3) throw new Error("Given varint doesn't fit into 10 bytes");
                le.realloc(10), function(et, dt, Ct) {
                  Ct.buf[Ct.pos++] = 127 & et | 128, et >>>= 7, Ct.buf[Ct.pos++] = 127 & et | 128, et >>>= 7, Ct.buf[Ct.pos++] = 127 & et | 128, et >>>= 7, Ct.buf[Ct.pos++] = 127 & et | 128, et >>>= 7, Ct.buf[Ct.pos] = 127 & et;
                }(ke, 0, le), function(et, dt) {
                  var Ct = (7 & et) << 4;
                  dt.buf[dt.pos++] |= Ct | ((et >>>= 3) ? 128 : 0), et && (dt.buf[dt.pos++] = 127 & et | ((et >>>= 7) ? 128 : 0), et && (dt.buf[dt.pos++] = 127 & et | ((et >>>= 7) ? 128 : 0), et && (dt.buf[dt.pos++] = 127 & et | ((et >>>= 7) ? 128 : 0), et && (dt.buf[dt.pos++] = 127 & et | ((et >>>= 7) ? 128 : 0), et && (dt.buf[dt.pos++] = 127 & et)))));
                }(qe, le);
              }(N, this) : (this.realloc(4), this.buf[this.pos++] = 127 & N | (N > 127 ? 128 : 0), N <= 127 || (this.buf[this.pos++] = 127 & (N >>>= 7) | (N > 127 ? 128 : 0), N <= 127 || (this.buf[this.pos++] = 127 & (N >>>= 7) | (N > 127 ? 128 : 0), N <= 127 || (this.buf[this.pos++] = N >>> 7 & 127))));
            }, writeSVarint: function(N) {
              this.writeVarint(N < 0 ? 2 * -N - 1 : 2 * N);
            }, writeBoolean: function(N) {
              this.writeVarint(!!N);
            }, writeString: function(N) {
              N = String(N), this.realloc(4 * N.length), this.pos++;
              var W = this.pos;
              this.pos = function(ke, qe, et) {
                for (var dt, Ct, Ut = 0; Ut < qe.length; Ut++) {
                  if ((dt = qe.charCodeAt(Ut)) > 55295 && dt < 57344) {
                    if (!Ct) {
                      dt > 56319 || Ut + 1 === qe.length ? (ke[et++] = 239, ke[et++] = 191, ke[et++] = 189) : Ct = dt;
                      continue;
                    }
                    if (dt < 56320) {
                      ke[et++] = 239, ke[et++] = 191, ke[et++] = 189, Ct = dt;
                      continue;
                    }
                    dt = Ct - 55296 << 10 | dt - 56320 | 65536, Ct = null;
                  } else Ct && (ke[et++] = 239, ke[et++] = 191, ke[et++] = 189, Ct = null);
                  dt < 128 ? ke[et++] = dt : (dt < 2048 ? ke[et++] = dt >> 6 | 192 : (dt < 65536 ? ke[et++] = dt >> 12 | 224 : (ke[et++] = dt >> 18 | 240, ke[et++] = dt >> 12 & 63 | 128), ke[et++] = dt >> 6 & 63 | 128), ke[et++] = 63 & dt | 128);
                }
                return et;
              }(this.buf, N, this.pos);
              var le = this.pos - W;
              le >= 128 && m5(W, le, this), this.pos = W - 1, this.writeVarint(le), this.pos += le;
            }, writeFloat: function(N) {
              this.realloc(4), d5(this.buf, N, this.pos, !0, 23, 4), this.pos += 4;
            }, writeDouble: function(N) {
              this.realloc(8), d5(this.buf, N, this.pos, !0, 52, 8), this.pos += 8;
            }, writeBytes: function(N) {
              var W = N.length;
              this.writeVarint(W), this.realloc(W);
              for (var le = 0; le < W; le++) this.buf[this.pos++] = N[le];
            }, writeRawMessage: function(N, W) {
              this.pos++;
              var le = this.pos;
              N(W, this);
              var ke = this.pos - le;
              ke >= 128 && m5(le, ke, this), this.pos = le - 1, this.writeVarint(ke), this.pos += ke;
            }, writeMessage: function(N, W, le) {
              this.writeTag(N, Po.Bytes), this.writeRawMessage(W, le);
            }, writePackedVarint: function(N, W) {
              W.length && this.writeMessage(N, OA, W);
            }, writePackedSVarint: function(N, W) {
              W.length && this.writeMessage(N, g5, W);
            }, writePackedBoolean: function(N, W) {
              W.length && this.writeMessage(N, oy, W);
            }, writePackedFloat: function(N, W) {
              W.length && this.writeMessage(N, zA, W);
            }, writePackedDouble: function(N, W) {
              W.length && this.writeMessage(N, RA, W);
            }, writePackedFixed32: function(N, W) {
              W.length && this.writeMessage(N, y5, W);
            }, writePackedSFixed32: function(N, W) {
              W.length && this.writeMessage(N, FA, W);
            }, writePackedFixed64: function(N, W) {
              W.length && this.writeMessage(N, NA, W);
            }, writePackedSFixed64: function(N, W) {
              W.length && this.writeMessage(N, tF, W);
            }, writeBytesField: function(N, W) {
              this.writeTag(N, Po.Bytes), this.writeBytes(W);
            }, writeFixed32Field: function(N, W) {
              this.writeTag(N, Po.Fixed32), this.writeFixed32(W);
            }, writeSFixed32Field: function(N, W) {
              this.writeTag(N, Po.Fixed32), this.writeSFixed32(W);
            }, writeFixed64Field: function(N, W) {
              this.writeTag(N, Po.Fixed64), this.writeFixed64(W);
            }, writeSFixed64Field: function(N, W) {
              this.writeTag(N, Po.Fixed64), this.writeSFixed64(W);
            }, writeVarintField: function(N, W) {
              this.writeTag(N, Po.Varint), this.writeVarint(W);
            }, writeSVarintField: function(N, W) {
              this.writeTag(N, Po.Varint), this.writeSVarint(W);
            }, writeStringField: function(N, W) {
              this.writeTag(N, Po.Bytes), this.writeString(W);
            }, writeFloatField: function(N, W) {
              this.writeTag(N, Po.Fixed32), this.writeFloat(W);
            }, writeDoubleField: function(N, W) {
              this.writeTag(N, Po.Fixed64), this.writeDouble(W);
            }, writeBooleanField: function(N, W) {
              this.writeVarintField(N, !!W);
            } };
            var x5 = 3;
            function nF(N, W, le) {
              N === 1 && le.readMessage(BA, W);
            }
            function BA(N, W, le) {
              if (N === 3) {
                var ke = le.readMessage(jA, {}), qe = ke.id, et = ke.bitmap, dt = ke.width, Ct = ke.height, Ut = ke.left, tn = ke.top, nn = ke.advance;
                W.push({ id: qe, bitmap: new $d({ width: dt + 2 * x5, height: Ct + 2 * x5 }, et), metrics: { width: dt, height: Ct, left: Ut, top: tn, advance: nn } });
              }
            }
            function jA(N, W, le) {
              N === 1 ? W.id = le.readVarint() : N === 2 ? W.bitmap = le.readBytes() : N === 3 ? W.width = le.readVarint() : N === 4 ? W.height = le.readVarint() : N === 5 ? W.left = le.readSVarint() : N === 6 ? W.top = le.readSVarint() : N === 7 && (W.advance = le.readVarint());
            }
            var l_ = x5;
            function v2(N) {
              for (var W = 0, le = 0, ke = 0, qe = N; ke < qe.length; ke += 1) {
                var et = qe[ke];
                W += et.w * et.h, le = Math.max(le, et.w);
              }
              N.sort(function(Bn, ar) {
                return ar.h - Bn.h;
              });
              for (var dt = [{ x: 0, y: 0, w: Math.max(Math.ceil(Math.sqrt(W / 0.95)), le), h: 1 / 0 }], Ct = 0, Ut = 0, tn = 0, nn = N; tn < nn.length; tn += 1) for (var cn = nn[tn], vn = dt.length - 1; vn >= 0; vn--) {
                var mn = dt[vn];
                if (!(cn.w > mn.w || cn.h > mn.h)) {
                  if (cn.x = mn.x, cn.y = mn.y, Ut = Math.max(Ut, cn.y + cn.h), Ct = Math.max(Ct, cn.x + cn.w), cn.w === mn.w && cn.h === mn.h) {
                    var On = dt.pop();
                    vn < dt.length && (dt[vn] = On);
                  } else cn.h === mn.h ? (mn.x += cn.w, mn.w -= cn.w) : cn.w === mn.w ? (mn.y += cn.h, mn.h -= cn.h) : (dt.push({ x: mn.x + cn.w, y: mn.y, w: mn.w - cn.w, h: cn.h }), mn.y += cn.h, mn.h -= cn.h);
                  break;
                }
              }
              return { w: Ct, h: Ut, fill: W / (Ct * Ut) || 0 };
            }
            var Oc = 1, sy = function(N, W) {
              var le = W.pixelRatio, ke = W.version, qe = W.stretchX, et = W.stretchY, dt = W.content;
              this.paddedRect = N, this.pixelRatio = le, this.stretchX = qe, this.stretchY = et, this.content = dt, this.version = ke;
            }, y1 = { tl: { configurable: !0 }, br: { configurable: !0 }, tlbr: { configurable: !0 }, displaySize: { configurable: !0 } };
            y1.tl.get = function() {
              return [this.paddedRect.x + Oc, this.paddedRect.y + Oc];
            }, y1.br.get = function() {
              return [this.paddedRect.x + this.paddedRect.w - Oc, this.paddedRect.y + this.paddedRect.h - Oc];
            }, y1.tlbr.get = function() {
              return this.tl.concat(this.br);
            }, y1.displaySize.get = function() {
              return [(this.paddedRect.w - 2 * Oc) / this.pixelRatio, (this.paddedRect.h - 2 * Oc) / this.pixelRatio];
            }, Object.defineProperties(sy.prototype, y1);
            var ly = function(N, W) {
              var le = {}, ke = {};
              this.haveRenderCallbacks = [];
              var qe = [];
              this.addImages(N, le, qe), this.addImages(W, ke, qe);
              var et = v2(qe), dt = et.w, Ct = et.h, Ut = new Pc({ width: dt || 1, height: Ct || 1 });
              for (var tn in N) {
                var nn = N[tn], cn = le[tn].paddedRect;
                Pc.copy(nn.data, Ut, { x: 0, y: 0 }, { x: cn.x + Oc, y: cn.y + Oc }, nn.data);
              }
              for (var vn in W) {
                var mn = W[vn], On = ke[vn].paddedRect, Bn = On.x + Oc, ar = On.y + Oc, tr = mn.data.width, xr = mn.data.height;
                Pc.copy(mn.data, Ut, { x: 0, y: 0 }, { x: Bn, y: ar }, mn.data), Pc.copy(mn.data, Ut, { x: 0, y: xr - 1 }, { x: Bn, y: ar - 1 }, { width: tr, height: 1 }), Pc.copy(mn.data, Ut, { x: 0, y: 0 }, { x: Bn, y: ar + xr }, { width: tr, height: 1 }), Pc.copy(mn.data, Ut, { x: tr - 1, y: 0 }, { x: Bn - 1, y: ar }, { width: 1, height: xr }), Pc.copy(mn.data, Ut, { x: 0, y: 0 }, { x: Bn + tr, y: ar }, { width: 1, height: xr });
              }
              this.image = Ut, this.iconPositions = le, this.patternPositions = ke;
            };
            ly.prototype.addImages = function(N, W, le) {
              for (var ke in N) {
                var qe = N[ke], et = { x: 0, y: 0, w: qe.data.width + 2 * Oc, h: qe.data.height + 2 * Oc };
                le.push(et), W[ke] = new sy(et, qe), qe.hasRenderCallback && this.haveRenderCallbacks.push(ke);
              }
            }, ly.prototype.patchUpdatedImages = function(N, W) {
              for (var le in N.dispatchRenderCallbacks(this.haveRenderCallbacks), N.updatedImages) this.patchUpdatedImage(this.iconPositions[le], N.getImage(le), W), this.patchUpdatedImage(this.patternPositions[le], N.getImage(le), W);
            }, ly.prototype.patchUpdatedImage = function(N, W, le) {
              if (N && W && N.version !== W.version) {
                N.version = W.version;
                var ke = N.tl, qe = ke[0], et = ke[1];
                le.update(W.data, void 0, { x: qe, y: et });
              }
            }, xi("ImagePosition", sy), xi("ImageAtlas", ly);
            var pc = { horizontal: 1, vertical: 2, horizontalOnly: 3 }, uy = -17, nm = function() {
              this.scale = 1, this.fontStack = "", this.imageName = null;
            };
            nm.forText = function(N, W) {
              var le = new nm();
              return le.scale = N || 1, le.fontStack = W, le;
            }, nm.forImage = function(N) {
              var W = new nm();
              return W.imageName = N, W;
            };
            var nc = function() {
              this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null;
            };
            function x2(N, W, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn) {
              var ar, tr = nc.fromFeature(N, qe);
              cn === pc.vertical && tr.verticalizePunctuation();
              var xr = ls.processBidirectionalText, _r = ls.processStyledBidirectionalText;
              if (xr && tr.sections.length === 1) {
                ar = [];
                for (var Lr = 0, Ur = xr(tr.toString(), v1(tr, tn, et, W, ke, mn, On)); Lr < Ur.length; Lr += 1) {
                  var $r = Ur[Lr], ai = new nc();
                  ai.text = $r, ai.sections = tr.sections;
                  for (var Hr = 0; Hr < $r.length; Hr++) ai.sectionIndex.push(0);
                  ar.push(ai);
                }
              } else if (_r) {
                ar = [];
                for (var hi = 0, Ti = _r(tr.text, tr.sectionIndex, v1(tr, tn, et, W, ke, mn, On)); hi < Ti.length; hi += 1) {
                  var ta = Ti[hi], zi = new nc();
                  zi.text = ta[0], zi.sectionIndex = ta[1], zi.sections = tr.sections, ar.push(zi);
                }
              } else ar = function(Ii, za) {
                for (var ga = [], fo = Ii.text, Wi = 0, Xa = 0, bo = za; Xa < bo.length; Xa += 1) {
                  var oo = bo[Xa];
                  ga.push(Ii.substring(Wi, oo)), Wi = oo;
                }
                return Wi < fo.length && ga.push(Ii.substring(Wi, fo.length)), ga;
              }(tr, v1(tr, tn, et, W, ke, mn, On));
              var Ki = [], $i = { positionedLines: Ki, text: tr.toString(), top: nn[1], bottom: nn[1], left: nn[0], right: nn[0], writingMode: cn, iconsInText: !1, verticalizable: !1 };
              return function(Ii, za, ga, fo, Wi, Xa, bo, oo, _o, ho, qs, Oo) {
                for (var Hs = 0, fu = uy, Vl = 0, Vu = 0, ku = oo === "right" ? 1 : oo === "left" ? 0 : 0.5, J = 0, H = 0, oe = Wi; H < oe.length; H += 1) {
                  var ve = oe[H];
                  ve.trim();
                  var Oe = ve.getMaxScale(), Xe = (Oe - 1) * cu, rt = { positionedGlyphs: [], lineOffset: 0 };
                  Ii.positionedLines[J] = rt;
                  var yt = rt.positionedGlyphs, Tt = 0;
                  if (ve.length()) {
                    for (var Nt = 0; Nt < ve.length(); Nt++) {
                      var Vt = ve.getSection(Nt), Kt = ve.getSectionIndex(Nt), an = ve.getCharCode(Nt), hn = 0, kn = null, xn = null, Fn = null, qn = cu, vr = !(_o === pc.horizontal || !qs && !Fl(an) || qs && (b2[an] || Us(an)));
                      if (Vt.imageName) {
                        var rr = fo[Vt.imageName];
                        if (!rr) continue;
                        Fn = Vt.imageName, Ii.iconsInText = Ii.iconsInText || !0, xn = rr.paddedRect;
                        var dr = rr.displaySize;
                        Vt.scale = Vt.scale * cu / Oo, kn = { width: dr[0], height: dr[1], left: Oc, top: -l_, advance: vr ? dr[1] : dr[0] }, hn = Xe + (cu - dr[1] * Vt.scale), qn = kn.advance;
                        var jr = vr ? dr[0] * Vt.scale - cu * Oe : dr[1] * Vt.scale - cu * Oe;
                        jr > 0 && jr > Tt && (Tt = jr);
                      } else {
                        var oi = ga[Vt.fontStack], Ai = oi && oi[an];
                        if (Ai && Ai.rect) xn = Ai.rect, kn = Ai.metrics;
                        else {
                          var Ui = za[Vt.fontStack], _i = Ui && Ui[an];
                          if (!_i) continue;
                          kn = _i.metrics;
                        }
                        hn = (Oe - Vt.scale) * cu;
                      }
                      vr ? (Ii.verticalizable = !0, yt.push({ glyph: an, imageName: Fn, x: Hs, y: fu + hn, vertical: vr, scale: Vt.scale, fontStack: Vt.fontStack, sectionIndex: Kt, metrics: kn, rect: xn }), Hs += qn * Vt.scale + ho) : (yt.push({ glyph: an, imageName: Fn, x: Hs, y: fu + hn, vertical: vr, scale: Vt.scale, fontStack: Vt.fontStack, sectionIndex: Kt, metrics: kn, rect: xn }), Hs += kn.advance * Vt.scale + ho);
                    }
                    if (yt.length !== 0) {
                      var fi = Hs - ho;
                      Vl = Math.max(fi, Vl), c_(yt, 0, yt.length - 1, ku, Tt);
                    }
                    Hs = 0;
                    var Bi = Xa * Oe + Tt;
                    rt.lineOffset = Math.max(Tt, Xe), fu += Bi, Vu = Math.max(Bi, Vu), ++J;
                  } else fu += Xa, ++J;
                }
                var Ei = fu - uy, ki = co(bo), Gr = ki.horizontalAlign, Di = ki.verticalAlign;
                (function(Pi, Qi, Ka, Ja, Gs, mc, _l, ll, rc) {
                  var Tu = (Qi - Ka) * Gs, Ss = 0;
                  Ss = mc !== _l ? -ll * Ja - uy : (-Ja * rc + 0.5) * _l;
                  for (var fs = 0, hu = Pi; fs < hu.length; fs += 1) for (var Ws = 0, wl = hu[fs].positionedGlyphs; Ws < wl.length; Ws += 1) {
                    var Au = wl[Ws];
                    Au.x += Tu, Au.y += Ss;
                  }
                })(Ii.positionedLines, ku, Gr, Di, Vl, Vu, Xa, Ei, Wi.length), Ii.top += -Di * Ei, Ii.bottom = Ii.top + Ei, Ii.left += -Gr * Vl, Ii.right = Ii.left + Vl;
              }($i, W, le, ke, ar, dt, Ct, Ut, cn, tn, vn, Bn), !function(Ii) {
                for (var za = 0, ga = Ii; za < ga.length; za += 1) if (ga[za].positionedGlyphs.length !== 0) return !1;
                return !0;
              }(Ki) && $i;
            }
            nc.fromFeature = function(N, W) {
              for (var le = new nc(), ke = 0; ke < N.sections.length; ke++) {
                var qe = N.sections[ke];
                qe.image ? le.addImageSection(qe) : le.addTextSection(qe, W);
              }
              return le;
            }, nc.prototype.length = function() {
              return this.text.length;
            }, nc.prototype.getSection = function(N) {
              return this.sections[this.sectionIndex[N]];
            }, nc.prototype.getSectionIndex = function(N) {
              return this.sectionIndex[N];
            }, nc.prototype.getCharCode = function(N) {
              return this.text.charCodeAt(N);
            }, nc.prototype.verticalizePunctuation = function() {
              this.text = function(N) {
                for (var W = "", le = 0; le < N.length; le++) {
                  var ke = N.charCodeAt(le + 1) || null, qe = N.charCodeAt(le - 1) || null;
                  ke && Fa(ke) && !ay[N[le + 1]] || qe && Fa(qe) && !ay[N[le - 1]] || !ay[N[le]] ? W += N[le] : W += ay[N[le]];
                }
                return W;
              }(this.text);
            }, nc.prototype.trim = function() {
              for (var N = 0, W = 0; W < this.text.length && b2[this.text.charCodeAt(W)]; W++) N++;
              for (var le = this.text.length, ke = this.text.length - 1; ke >= 0 && ke >= N && b2[this.text.charCodeAt(ke)]; ke--) le--;
              this.text = this.text.substring(N, le), this.sectionIndex = this.sectionIndex.slice(N, le);
            }, nc.prototype.substring = function(N, W) {
              var le = new nc();
              return le.text = this.text.substring(N, W), le.sectionIndex = this.sectionIndex.slice(N, W), le.sections = this.sections, le;
            }, nc.prototype.toString = function() {
              return this.text;
            }, nc.prototype.getMaxScale = function() {
              var N = this;
              return this.sectionIndex.reduce(function(W, le) {
                return Math.max(W, N.sections[le].scale);
              }, 0);
            }, nc.prototype.addTextSection = function(N, W) {
              this.text += N.text, this.sections.push(nm.forText(N.scale, N.fontStack || W));
              for (var le = this.sections.length - 1, ke = 0; ke < N.text.length; ++ke) this.sectionIndex.push(le);
            }, nc.prototype.addImageSection = function(N) {
              var W = N.image ? N.image.name : "";
              if (W.length !== 0) {
                var le = this.getNextImageSectionCharCode();
                le ? (this.text += String.fromCharCode(le), this.sections.push(nm.forImage(W)), this.sectionIndex.push(this.sections.length - 1)) : F("Reached maximum number of images 6401");
              } else F("Can't add FormattedSection with an empty image.");
            }, nc.prototype.getNextImageSectionCharCode = function() {
              return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
            };
            var b2 = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, zc = {};
            function b5(N, W, le, ke, qe, et) {
              if (W.imageName) {
                var dt = ke[W.imageName];
                return dt ? dt.displaySize[0] * W.scale * cu / et + qe : 0;
              }
              var Ct = le[W.fontStack], Ut = Ct && Ct[N];
              return Ut ? Ut.metrics.advance * W.scale + qe : 0;
            }
            function _5(N, W, le, ke) {
              var qe = Math.pow(N - W, 2);
              return ke ? N < W ? qe / 2 : 2 * qe : qe + Math.abs(le) * le;
            }
            function cy(N, W, le) {
              var ke = 0;
              return N === 10 && (ke -= 1e4), le && (ke += 150), N !== 40 && N !== 65288 || (ke += 50), W !== 41 && W !== 65289 || (ke += 50), ke;
            }
            function jl(N, W, le, ke, qe, et) {
              for (var dt = null, Ct = _5(W, le, qe, et), Ut = 0, tn = ke; Ut < tn.length; Ut += 1) {
                var nn = tn[Ut], cn = _5(W - nn.x, le, qe, et) + nn.badness;
                cn <= Ct && (dt = nn, Ct = cn);
              }
              return { index: N, x: W, priorBreak: dt, badness: Ct };
            }
            function u_(N) {
              return N ? u_(N.priorBreak).concat(N.index) : [];
            }
            function v1(N, W, le, ke, qe, et, dt) {
              if (et !== "point") return [];
              if (!N) return [];
              for (var Ct = [], Ut = function(ar, tr, xr, _r, Lr, Ur) {
                for (var $r = 0, ai = 0; ai < ar.length(); ai++) {
                  var Hr = ar.getSection(ai);
                  $r += b5(ar.getCharCode(ai), Hr, _r, Lr, tr, Ur);
                }
                return $r / Math.max(1, Math.ceil($r / xr));
              }(N, W, le, ke, qe, dt), tn = N.text.indexOf("​") >= 0, nn = 0, cn = 0; cn < N.length(); cn++) {
                var vn = N.getSection(cn), mn = N.getCharCode(cn);
                if (b2[mn] || (nn += b5(mn, vn, ke, qe, W, dt)), cn < N.length() - 1) {
                  var On = !((Bn = mn) < 11904 || !(ti["Bopomofo Extended"](Bn) || ti.Bopomofo(Bn) || ti["CJK Compatibility Forms"](Bn) || ti["CJK Compatibility Ideographs"](Bn) || ti["CJK Compatibility"](Bn) || ti["CJK Radicals Supplement"](Bn) || ti["CJK Strokes"](Bn) || ti["CJK Symbols and Punctuation"](Bn) || ti["CJK Unified Ideographs Extension A"](Bn) || ti["CJK Unified Ideographs"](Bn) || ti["Enclosed CJK Letters and Months"](Bn) || ti["Halfwidth and Fullwidth Forms"](Bn) || ti.Hiragana(Bn) || ti["Ideographic Description Characters"](Bn) || ti["Kangxi Radicals"](Bn) || ti["Katakana Phonetic Extensions"](Bn) || ti.Katakana(Bn) || ti["Vertical Forms"](Bn) || ti["Yi Radicals"](Bn) || ti["Yi Syllables"](Bn)));
                  (zc[mn] || On || vn.imageName) && Ct.push(jl(cn + 1, nn, Ut, Ct, cy(mn, N.getCharCode(cn + 1), On && tn), !1));
                }
              }
              var Bn;
              return u_(jl(N.length(), nn, Ut, Ct, 0, !0));
            }
            function co(N) {
              var W = 0.5, le = 0.5;
              switch (N) {
                case "right":
                case "top-right":
                case "bottom-right":
                  W = 1;
                  break;
                case "left":
                case "top-left":
                case "bottom-left":
                  W = 0;
              }
              switch (N) {
                case "bottom":
                case "bottom-right":
                case "bottom-left":
                  le = 1;
                  break;
                case "top":
                case "top-right":
                case "top-left":
                  le = 0;
              }
              return { horizontalAlign: W, verticalAlign: le };
            }
            function c_(N, W, le, ke, qe) {
              if (ke || qe) for (var et = N[le], dt = et.metrics.advance * et.scale, Ct = (N[le].x + dt) * ke, Ut = W; Ut <= le; Ut++) N[Ut].x -= Ct, N[Ut].y += qe;
            }
            function f_(N, W, le, ke, qe, et) {
              var dt, Ct = N.image;
              if (Ct.content) {
                var Ut = Ct.content, tn = Ct.pixelRatio || 1;
                dt = [Ut[0] / tn, Ut[1] / tn, Ct.displaySize[0] - Ut[2] / tn, Ct.displaySize[1] - Ut[3] / tn];
              }
              var nn, cn, vn, mn, On = W.left * et, Bn = W.right * et;
              le === "width" || le === "both" ? (mn = qe[0] + On - ke[3], cn = qe[0] + Bn + ke[1]) : cn = (mn = qe[0] + (On + Bn - Ct.displaySize[0]) / 2) + Ct.displaySize[0];
              var ar = W.top * et, tr = W.bottom * et;
              return le === "height" || le === "both" ? (nn = qe[1] + ar - ke[0], vn = qe[1] + tr + ke[2]) : vn = (nn = qe[1] + (ar + tr - Ct.displaySize[1]) / 2) + Ct.displaySize[1], { image: Ct, top: nn, right: cn, bottom: vn, left: mn, collisionPadding: dt };
            }
            zc[10] = !0, zc[32] = !0, zc[38] = !0, zc[40] = !0, zc[41] = !0, zc[43] = !0, zc[45] = !0, zc[47] = !0, zc[173] = !0, zc[183] = !0, zc[8203] = !0, zc[8208] = !0, zc[8211] = !0, zc[8231] = !0;
            var rm = function(N) {
              function W(le, ke, qe, et) {
                N.call(this, le, ke), this.angle = qe, et !== void 0 && (this.segment = et);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.clone = function() {
                return new W(this.x, this.y, this.angle, this.segment);
              }, W;
            }(f);
            xi("Anchor", rm);
            var Uu = 128;
            function Vp(N, W) {
              var le = W.expression;
              if (le.kind === "constant") return { kind: "constant", layoutSize: le.evaluate(new ma(N + 1)) };
              if (le.kind === "source") return { kind: "source" };
              for (var ke = le.zoomStops, qe = le.interpolationType, et = 0; et < ke.length && ke[et] <= N; ) et++;
              for (var dt = et = Math.max(0, et - 1); dt < ke.length && ke[dt] < N + 1; ) dt++;
              dt = Math.min(ke.length - 1, dt);
              var Ct = ke[et], Ut = ke[dt];
              return le.kind === "composite" ? { kind: "composite", minZoom: Ct, maxZoom: Ut, interpolationType: qe } : { kind: "camera", minZoom: Ct, maxZoom: Ut, minSize: le.evaluate(new ma(Ct)), maxSize: le.evaluate(new ma(Ut)), interpolationType: qe };
            }
            function h_(N, W, le) {
              var ke = W.uSize, qe = W.uSizeT, et = le.lowerSize, dt = le.upperSize;
              return N.kind === "source" ? et / Uu : N.kind === "composite" ? si(et / Uu, dt / Uu, qe) : ke;
            }
            function w5(N, W) {
              var le = 0, ke = 0;
              if (N.kind === "constant") ke = N.layoutSize;
              else if (N.kind !== "source") {
                var qe = N.interpolationType, et = N.minZoom, dt = N.maxZoom, Ct = qe ? k(Mo.interpolationFactor(qe, W, et, dt), 0, 1) : 0;
                N.kind === "camera" ? ke = si(N.minSize, N.maxSize, Ct) : le = Ct;
              }
              return { uSizeT: le, uSize: ke };
            }
            var UA = Object.freeze({ __proto__: null, getSizeData: Vp, evaluateSizeForFeature: h_, evaluateSizeForZoom: w5, SIZE_PACK_FACTOR: Uu });
            function k5(N, W, le, ke, qe) {
              if (W.segment === void 0) return !0;
              for (var et = W, dt = W.segment + 1, Ct = 0; Ct > -le / 2; ) {
                if (--dt < 0) return !1;
                Ct -= N[dt].dist(et), et = N[dt];
              }
              Ct += N[dt].dist(N[dt + 1]), dt++;
              for (var Ut = [], tn = 0; Ct < le / 2; ) {
                var nn = N[dt - 1], cn = N[dt], vn = N[dt + 1];
                if (!vn) return !1;
                var mn = nn.angleTo(cn) - cn.angleTo(vn);
                for (mn = Math.abs((mn + 3 * Math.PI) % (2 * Math.PI) - Math.PI), Ut.push({ distance: Ct, angleDelta: mn }), tn += mn; Ct - Ut[0].distance > ke; ) tn -= Ut.shift().angleDelta;
                if (tn > qe) return !1;
                dt++, Ct += cn.dist(vn);
              }
              return !0;
            }
            function T5(N) {
              for (var W = 0, le = 0; le < N.length - 1; le++) W += N[le].dist(N[le + 1]);
              return W;
            }
            function A5(N, W, le) {
              return N ? 0.6 * W * le : 0;
            }
            function S5(N, W) {
              return Math.max(N ? N.right - N.left : 0, W ? W.right - W.left : 0);
            }
            function VA(N, W, le, ke, qe, et) {
              for (var dt = A5(le, qe, et), Ct = S5(le, ke) * et, Ut = 0, tn = T5(N) / 2, nn = 0; nn < N.length - 1; nn++) {
                var cn = N[nn], vn = N[nn + 1], mn = cn.dist(vn);
                if (Ut + mn > tn) {
                  var On = (tn - Ut) / mn, Bn = si(cn.x, vn.x, On), ar = si(cn.y, vn.y, On), tr = new rm(Bn, ar, vn.angleTo(cn), nn);
                  return tr._round(), !dt || k5(N, tr, Ct, dt, W) ? tr : void 0;
                }
                Ut += mn;
              }
            }
            function $A(N, W, le, ke, qe, et, dt, Ct, Ut) {
              var tn = A5(ke, et, dt), nn = S5(ke, qe), cn = nn * dt, vn = N[0].x === 0 || N[0].x === Ut || N[0].y === 0 || N[0].y === Ut;
              return W - cn < W / 4 && (W = cn + W / 4), M5(N, vn ? W / 2 * Ct % W : (nn / 2 + 2 * et) * dt * Ct % W, W, tn, le, cn, vn, !1, Ut);
            }
            function M5(N, W, le, ke, qe, et, dt, Ct, Ut) {
              for (var tn = et / 2, nn = T5(N), cn = 0, vn = W - le, mn = [], On = 0; On < N.length - 1; On++) {
                for (var Bn = N[On], ar = N[On + 1], tr = Bn.dist(ar), xr = ar.angleTo(Bn); vn + le < cn + tr; ) {
                  var _r = ((vn += le) - cn) / tr, Lr = si(Bn.x, ar.x, _r), Ur = si(Bn.y, ar.y, _r);
                  if (Lr >= 0 && Lr < Ut && Ur >= 0 && Ur < Ut && vn - tn >= 0 && vn + tn <= nn) {
                    var $r = new rm(Lr, Ur, xr, On);
                    $r._round(), ke && !k5(N, $r, et, ke, qe) || mn.push($r);
                  }
                }
                cn += tr;
              }
              return Ct || mn.length || dt || (mn = M5(N, cn / 2, le, ke, qe, et, dt, !0, Ut)), mn;
            }
            function fy(N, W, le, ke, qe) {
              for (var et = [], dt = 0; dt < N.length; dt++) for (var Ct = N[dt], Ut = void 0, tn = 0; tn < Ct.length - 1; tn++) {
                var nn = Ct[tn], cn = Ct[tn + 1];
                nn.x < W && cn.x < W || (nn.x < W ? nn = new f(W, nn.y + (cn.y - nn.y) * ((W - nn.x) / (cn.x - nn.x)))._round() : cn.x < W && (cn = new f(W, nn.y + (cn.y - nn.y) * ((W - nn.x) / (cn.x - nn.x)))._round()), nn.y < le && cn.y < le || (nn.y < le ? nn = new f(nn.x + (cn.x - nn.x) * ((le - nn.y) / (cn.y - nn.y)), le)._round() : cn.y < le && (cn = new f(nn.x + (cn.x - nn.x) * ((le - nn.y) / (cn.y - nn.y)), le)._round()), nn.x >= ke && cn.x >= ke || (nn.x >= ke ? nn = new f(ke, nn.y + (cn.y - nn.y) * ((ke - nn.x) / (cn.x - nn.x)))._round() : cn.x >= ke && (cn = new f(ke, nn.y + (cn.y - nn.y) * ((ke - nn.x) / (cn.x - nn.x)))._round()), nn.y >= qe && cn.y >= qe || (nn.y >= qe ? nn = new f(nn.x + (cn.x - nn.x) * ((qe - nn.y) / (cn.y - nn.y)), qe)._round() : cn.y >= qe && (cn = new f(nn.x + (cn.x - nn.x) * ((qe - nn.y) / (cn.y - nn.y)), qe)._round()), Ut && nn.equals(Ut[Ut.length - 1]) || (Ut = [nn], et.push(Ut)), Ut.push(cn)))));
              }
              return et;
            }
            var Vh = Oc;
            function d_(N, W, le, ke) {
              var qe = [], et = N.image, dt = et.pixelRatio, Ct = et.paddedRect.w - 2 * Vh, Ut = et.paddedRect.h - 2 * Vh, tn = N.right - N.left, nn = N.bottom - N.top, cn = et.stretchX || [[0, Ct]], vn = et.stretchY || [[0, Ut]], mn = function(Xa, bo) {
                return Xa + bo[1] - bo[0];
              }, On = cn.reduce(mn, 0), Bn = vn.reduce(mn, 0), ar = Ct - On, tr = Ut - Bn, xr = 0, _r = On, Lr = 0, Ur = Bn, $r = 0, ai = ar, Hr = 0, hi = tr;
              if (et.content && ke) {
                var Ti = et.content;
                xr = x1(cn, 0, Ti[0]), Lr = x1(vn, 0, Ti[1]), _r = x1(cn, Ti[0], Ti[2]), Ur = x1(vn, Ti[1], Ti[3]), $r = Ti[0] - xr, Hr = Ti[1] - Lr, ai = Ti[2] - Ti[0] - _r, hi = Ti[3] - Ti[1] - Ur;
              }
              var ta = function(Xa, bo, oo, _o) {
                var ho = w2(Xa.stretch - xr, _r, tn, N.left), qs = k2(Xa.fixed - $r, ai, Xa.stretch, On), Oo = w2(bo.stretch - Lr, Ur, nn, N.top), Hs = k2(bo.fixed - Hr, hi, bo.stretch, Bn), fu = w2(oo.stretch - xr, _r, tn, N.left), Vl = k2(oo.fixed - $r, ai, oo.stretch, On), Vu = w2(_o.stretch - Lr, Ur, nn, N.top), ku = k2(_o.fixed - Hr, hi, _o.stretch, Bn), J = new f(ho, Oo), H = new f(fu, Oo), oe = new f(fu, Vu), ve = new f(ho, Vu), Oe = new f(qs / dt, Hs / dt), Xe = new f(Vl / dt, ku / dt), rt = W * Math.PI / 180;
                if (rt) {
                  var yt = Math.sin(rt), Tt = Math.cos(rt), Nt = [Tt, -yt, yt, Tt];
                  J._matMult(Nt), H._matMult(Nt), ve._matMult(Nt), oe._matMult(Nt);
                }
                var Vt = Xa.stretch + Xa.fixed, Kt = oo.stretch + oo.fixed, an = bo.stretch + bo.fixed, hn = _o.stretch + _o.fixed;
                return { tl: J, tr: H, bl: ve, br: oe, tex: { x: et.paddedRect.x + Vh + Vt, y: et.paddedRect.y + Vh + an, w: Kt - Vt, h: hn - an }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: Oe, pixelOffsetBR: Xe, minFontScaleX: ai / dt / tn, minFontScaleY: hi / dt / nn, isSDF: le };
              };
              if (ke && (et.stretchX || et.stretchY)) for (var zi = _2(cn, ar, On), Ki = _2(vn, tr, Bn), $i = 0; $i < zi.length - 1; $i++) for (var Ii = zi[$i], za = zi[$i + 1], ga = 0; ga < Ki.length - 1; ga++) {
                var fo = Ki[ga], Wi = Ki[ga + 1];
                qe.push(ta(Ii, fo, za, Wi));
              }
              else qe.push(ta({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: Ct + 1 }, { fixed: 0, stretch: Ut + 1 }));
              return qe;
            }
            function x1(N, W, le) {
              for (var ke = 0, qe = 0, et = N; qe < et.length; qe += 1) {
                var dt = et[qe];
                ke += Math.max(W, Math.min(le, dt[1])) - Math.max(W, Math.min(le, dt[0]));
              }
              return ke;
            }
            function _2(N, W, le) {
              for (var ke = [{ fixed: -Vh, stretch: 0 }], qe = 0, et = N; qe < et.length; qe += 1) {
                var dt = et[qe], Ct = dt[0], Ut = dt[1], tn = ke[ke.length - 1];
                ke.push({ fixed: Ct - tn.stretch, stretch: tn.stretch }), ke.push({ fixed: Ct - tn.stretch, stretch: tn.stretch + (Ut - Ct) });
              }
              return ke.push({ fixed: W + Vh, stretch: le }), ke;
            }
            function w2(N, W, le, ke) {
              return N / W * le + ke;
            }
            function k2(N, W, le, ke) {
              return N - W * le / ke;
            }
            var T2 = function(N, W, le, ke, qe, et, dt, Ct, Ut, tn) {
              if (this.boxStartIndex = N.length, Ut) {
                var nn = et.top, cn = et.bottom, vn = et.collisionPadding;
                vn && (nn -= vn[1], cn += vn[3]);
                var mn = cn - nn;
                mn > 0 && (mn = Math.max(10, mn), this.circleDiameter = mn);
              } else {
                var On = et.top * dt - Ct, Bn = et.bottom * dt + Ct, ar = et.left * dt - Ct, tr = et.right * dt + Ct, xr = et.collisionPadding;
                if (xr && (ar -= xr[0] * dt, On -= xr[1] * dt, tr += xr[2] * dt, Bn += xr[3] * dt), tn) {
                  var _r = new f(ar, On), Lr = new f(tr, On), Ur = new f(ar, Bn), $r = new f(tr, Bn), ai = tn * Math.PI / 180;
                  _r._rotate(ai), Lr._rotate(ai), Ur._rotate(ai), $r._rotate(ai), ar = Math.min(_r.x, Lr.x, Ur.x, $r.x), tr = Math.max(_r.x, Lr.x, Ur.x, $r.x), On = Math.min(_r.y, Lr.y, Ur.y, $r.y), Bn = Math.max(_r.y, Lr.y, Ur.y, $r.y);
                }
                N.emplaceBack(W.x, W.y, ar, On, tr, Bn, le, ke, qe);
              }
              this.boxEndIndex = N.length;
            }, im = function(N, W) {
              if (N === void 0 && (N = []), W === void 0 && (W = E5), this.data = N, this.length = this.data.length, this.compare = W, this.length > 0) for (var le = (this.length >> 1) - 1; le >= 0; le--) this._down(le);
            };
            function E5(N, W) {
              return N < W ? -1 : N > W ? 1 : 0;
            }
            function rf(N, W, le) {
              le === void 0 && (le = !1);
              for (var ke = 1 / 0, qe = 1 / 0, et = -1 / 0, dt = -1 / 0, Ct = N[0], Ut = 0; Ut < Ct.length; Ut++) {
                var tn = Ct[Ut];
                (!Ut || tn.x < ke) && (ke = tn.x), (!Ut || tn.y < qe) && (qe = tn.y), (!Ut || tn.x > et) && (et = tn.x), (!Ut || tn.y > dt) && (dt = tn.y);
              }
              var nn = et - ke, cn = dt - qe, vn = Math.min(nn, cn), mn = vn / 2, On = new im([], p_);
              if (vn === 0) return new f(ke, qe);
              for (var Bn = ke; Bn < et; Bn += vn) for (var ar = qe; ar < dt; ar += vn) On.push(new am(Bn + mn, ar + mn, mn, N));
              for (var tr = function(Lr) {
                for (var Ur = 0, $r = 0, ai = 0, Hr = Lr[0], hi = 0, Ti = Hr.length, ta = Ti - 1; hi < Ti; ta = hi++) {
                  var zi = Hr[hi], Ki = Hr[ta], $i = zi.x * Ki.y - Ki.x * zi.y;
                  $r += (zi.x + Ki.x) * $i, ai += (zi.y + Ki.y) * $i, Ur += 3 * $i;
                }
                return new am($r / Ur, ai / Ur, 0, Lr);
              }(N), xr = On.length; On.length; ) {
                var _r = On.pop();
                (_r.d > tr.d || !tr.d) && (tr = _r, le && console.log("found best %d after %d probes", Math.round(1e4 * _r.d) / 1e4, xr)), _r.max - tr.d <= W || (mn = _r.h / 2, On.push(new am(_r.p.x - mn, _r.p.y - mn, mn, N)), On.push(new am(_r.p.x + mn, _r.p.y - mn, mn, N)), On.push(new am(_r.p.x - mn, _r.p.y + mn, mn, N)), On.push(new am(_r.p.x + mn, _r.p.y + mn, mn, N)), xr += 4);
              }
              return le && (console.log("num probes: " + xr), console.log("best distance: " + tr.d)), tr.p;
            }
            function p_(N, W) {
              return W.max - N.max;
            }
            function am(N, W, le, ke) {
              this.p = new f(N, W), this.h = le, this.d = function(qe, et) {
                for (var dt = !1, Ct = 1 / 0, Ut = 0; Ut < et.length; Ut++) for (var tn = et[Ut], nn = 0, cn = tn.length, vn = cn - 1; nn < cn; vn = nn++) {
                  var mn = tn[nn], On = tn[vn];
                  mn.y > qe.y != On.y > qe.y && qe.x < (On.x - mn.x) * (qe.y - mn.y) / (On.y - mn.y) + mn.x && (dt = !dt), Ct = Math.min(Ct, zp(qe, mn, On));
                }
                return (dt ? 1 : -1) * Math.sqrt(Ct);
              }(this.p, ke), this.max = this.d + this.h * Math.SQRT2;
            }
            im.prototype.push = function(N) {
              this.data.push(N), this.length++, this._up(this.length - 1);
            }, im.prototype.pop = function() {
              if (this.length !== 0) {
                var N = this.data[0], W = this.data.pop();
                return this.length--, this.length > 0 && (this.data[0] = W, this._down(0)), N;
              }
            }, im.prototype.peek = function() {
              return this.data[0];
            }, im.prototype._up = function(N) {
              for (var W = this.data, le = this.compare, ke = W[N]; N > 0; ) {
                var qe = N - 1 >> 1, et = W[qe];
                if (le(ke, et) >= 0) break;
                W[N] = et, N = qe;
              }
              W[N] = ke;
            }, im.prototype._down = function(N) {
              for (var W = this.data, le = this.compare, ke = this.length >> 1, qe = W[N]; N < ke; ) {
                var et = 1 + (N << 1), dt = W[et], Ct = et + 1;
                if (Ct < this.length && le(W[Ct], dt) < 0 && (et = Ct, dt = W[Ct]), le(dt, qe) >= 0) break;
                W[N] = dt, N = et;
              }
              W[N] = qe;
            };
            var Hf = 7, om = Number.POSITIVE_INFINITY;
            function b1(N, W) {
              return W[1] !== om ? function(le, ke, qe) {
                var et = 0, dt = 0;
                switch (ke = Math.abs(ke), qe = Math.abs(qe), le) {
                  case "top-right":
                  case "top-left":
                  case "top":
                    dt = qe - Hf;
                    break;
                  case "bottom-right":
                  case "bottom-left":
                  case "bottom":
                    dt = -qe + Hf;
                }
                switch (le) {
                  case "top-right":
                  case "bottom-right":
                  case "right":
                    et = -ke;
                    break;
                  case "top-left":
                  case "bottom-left":
                  case "left":
                    et = ke;
                }
                return [et, dt];
              }(N, W[0], W[1]) : function(le, ke) {
                var qe = 0, et = 0;
                ke < 0 && (ke = 0);
                var dt = ke / Math.sqrt(2);
                switch (le) {
                  case "top-right":
                  case "top-left":
                    et = dt - Hf;
                    break;
                  case "bottom-right":
                  case "bottom-left":
                    et = -dt + Hf;
                    break;
                  case "bottom":
                    et = -ke + Hf;
                    break;
                  case "top":
                    et = ke - Hf;
                }
                switch (le) {
                  case "top-right":
                  case "bottom-right":
                    qe = -dt;
                    break;
                  case "top-left":
                  case "bottom-left":
                    qe = dt;
                    break;
                  case "left":
                    qe = ke;
                    break;
                  case "right":
                    qe = -ke;
                }
                return [qe, et];
              }(N, W[0]);
            }
            function $p(N) {
              switch (N) {
                case "right":
                case "top-right":
                case "bottom-right":
                  return "right";
                case "left":
                case "top-left":
                case "bottom-left":
                  return "left";
              }
              return "center";
            }
            var qp = 255, $h = qp * Uu;
            function C5(N, W, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On) {
              var Bn = function(Lr, Ur, $r, ai, Hr, hi, Ti, ta) {
                for (var zi = ai.layout.get("text-rotate").evaluate(hi, {}) * Math.PI / 180, Ki = [], $i = 0, Ii = Ur.positionedLines; $i < Ii.length; $i += 1) for (var za = Ii[$i], ga = 0, fo = za.positionedGlyphs; ga < fo.length; ga += 1) {
                  var Wi = fo[ga];
                  if (Wi.rect) {
                    var Xa = Wi.rect || {}, bo = l_ + 1, oo = !0, _o = 1, ho = 0, qs = (Hr || ta) && Wi.vertical, Oo = Wi.metrics.advance * Wi.scale / 2;
                    if (ta && Ur.verticalizable) {
                      var Hs = (Wi.scale - 1) * cu, fu = (cu - Wi.metrics.width * Wi.scale) / 2;
                      ho = za.lineOffset / 2 - (Wi.imageName ? -fu : Hs);
                    }
                    if (Wi.imageName) {
                      var Vl = Ti[Wi.imageName];
                      oo = Vl.sdf, _o = Vl.pixelRatio, bo = Oc / _o;
                    }
                    var Vu = Hr ? [Wi.x + Oo, Wi.y] : [0, 0], ku = Hr ? [0, 0] : [Wi.x + Oo + $r[0], Wi.y + $r[1] - ho], J = [0, 0];
                    qs && (J = ku, ku = [0, 0]);
                    var H = (Wi.metrics.left - bo) * Wi.scale - Oo + ku[0], oe = (-Wi.metrics.top - bo) * Wi.scale + ku[1], ve = H + Xa.w * Wi.scale / _o, Oe = oe + Xa.h * Wi.scale / _o, Xe = new f(H, oe), rt = new f(ve, oe), yt = new f(H, Oe), Tt = new f(ve, Oe);
                    if (qs) {
                      var Nt = new f(-Oo, Oo - uy), Vt = -Math.PI / 2, Kt = cu / 2 - Oo, an = Wi.imageName ? Kt : 0, hn = new f(5 - uy - Kt, -an), kn = new (Function.prototype.bind.apply(f, [null].concat(J)))();
                      Xe._rotateAround(Vt, Nt)._add(hn)._add(kn), rt._rotateAround(Vt, Nt)._add(hn)._add(kn), yt._rotateAround(Vt, Nt)._add(hn)._add(kn), Tt._rotateAround(Vt, Nt)._add(hn)._add(kn);
                    }
                    if (zi) {
                      var xn = Math.sin(zi), Fn = Math.cos(zi), qn = [Fn, -xn, xn, Fn];
                      Xe._matMult(qn), rt._matMult(qn), yt._matMult(qn), Tt._matMult(qn);
                    }
                    var vr = new f(0, 0), rr = new f(0, 0);
                    Ki.push({ tl: Xe, tr: rt, bl: yt, br: Tt, tex: Xa, writingMode: Ur.writingMode, glyphOffset: Vu, sectionIndex: Wi.sectionIndex, isSDF: oo, pixelOffsetTL: vr, pixelOffsetBR: rr, minFontScaleX: 0, minFontScaleY: 0 });
                  }
                }
                return Ki;
              }(0, le, Ct, qe, et, dt, ke, N.allowVerticalPlacement), ar = N.textSizeData, tr = null;
              ar.kind === "source" ? (tr = [Uu * qe.layout.get("text-size").evaluate(dt, {})])[0] > $h && F(N.layerIds[0] + ': Value for "text-size" is >= ' + qp + '. Reduce your "text-size".') : ar.kind === "composite" && ((tr = [Uu * mn.compositeTextSizes[0].evaluate(dt, {}, On), Uu * mn.compositeTextSizes[1].evaluate(dt, {}, On)])[0] > $h || tr[1] > $h) && F(N.layerIds[0] + ': Value for "text-size" is >= ' + qp + '. Reduce your "text-size".'), N.addSymbols(N.text, Bn, tr, Ct, et, dt, tn, W, Ut.lineStartIndex, Ut.lineLength, vn, On);
              for (var xr = 0, _r = nn; xr < _r.length; xr += 1) cn[_r[xr]] = N.text.placedSymbolArray.length - 1;
              return 4 * Bn.length;
            }
            function I5(N) {
              for (var W in N) return N[W];
              return null;
            }
            function D5(N, W, le, ke) {
              var qe = N.compareText;
              if (W in qe) {
                for (var et = qe[W], dt = et.length - 1; dt >= 0; dt--) if (ke.dist(et[dt]) < le) return !0;
              } else qe[W] = [];
              return qe[W].push(ke), !1;
            }
            var L5 = cs.VectorTileFeature.types, qA = [{ name: "a_fade_opacity", components: 1, type: "Uint8", offset: 0 }];
            function hy(N, W, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn) {
              var mn = Ct ? Math.min($h, Math.round(Ct[0])) : 0, On = Ct ? Math.min($h, Math.round(Ct[1])) : 0;
              N.emplaceBack(W, le, Math.round(32 * ke), Math.round(32 * qe), et, dt, (mn << 1) + (Ut ? 1 : 0), On, 16 * tn, 16 * nn, 256 * cn, 256 * vn);
            }
            function A2(N, W, le) {
              N.emplaceBack(W.x, W.y, le), N.emplaceBack(W.x, W.y, le), N.emplaceBack(W.x, W.y, le), N.emplaceBack(W.x, W.y, le);
            }
            function m_(N) {
              for (var W = 0, le = N.sections; W < le.length; W += 1) if (ks(le[W].text)) return !0;
              return !1;
            }
            var Hp = function(N) {
              this.layoutVertexArray = new B(), this.indexArray = new fe(), this.programConfigurations = N, this.segments = new Yn(), this.dynamicLayoutVertexArray = new y(), this.opacityVertexArray = new b(), this.placedSymbolArray = new Lt();
            };
            Hp.prototype.isEmpty = function() {
              return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
            }, Hp.prototype.upload = function(N, W, le, ke) {
              this.isEmpty() || (le && (this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, jp.members), this.indexBuffer = N.createIndexBuffer(this.indexArray, W), this.dynamicLayoutVertexBuffer = N.createVertexBuffer(this.dynamicLayoutVertexArray, DA.members, !0), this.opacityVertexBuffer = N.createVertexBuffer(this.opacityVertexArray, qA, !0), this.opacityVertexBuffer.itemSize = 1), (le || ke) && this.programConfigurations.upload(N));
            }, Hp.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
            }, xi("SymbolBuffers", Hp);
            var dy = function(N, W, le) {
              this.layoutVertexArray = new N(), this.layoutAttributes = W, this.indexArray = new le(), this.segments = new Yn(), this.collisionVertexArray = new ie();
            };
            dy.prototype.upload = function(N) {
              this.layoutVertexBuffer = N.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = N.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = N.createVertexBuffer(this.collisionVertexArray, h5.members, !0);
            }, dy.prototype.destroy = function() {
              this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
            }, xi("CollisionBuffers", dy);
            var ao = function(N) {
              this.collisionBoxArray = N.collisionBoxArray, this.zoom = N.zoom, this.overscaling = N.overscaling, this.layers = N.layers, this.layerIds = this.layers.map(function(dt) {
                return dt.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 = qb([]), this.placementViewportMatrix = qb([]);
              var W = this.layers[0]._unevaluatedLayout._values;
              this.textSizeData = Vp(this.zoom, W["text-size"]), this.iconSizeData = Vp(this.zoom, W["icon-size"]);
              var le = this.layers[0].layout, ke = le.get("symbol-sort-key"), qe = le.get("symbol-z-order");
              this.canOverlap = le.get("text-allow-overlap") || le.get("icon-allow-overlap") || le.get("text-ignore-placement") || le.get("icon-ignore-placement"), this.sortFeaturesByKey = qe !== "viewport-y" && ke.constantOr(1) !== void 0;
              var et = qe === "viewport-y" || qe === "auto" && !this.sortFeaturesByKey;
              this.sortFeaturesByY = et && this.canOverlap, le.get("symbol-placement") === "point" && (this.writingModes = le.get("text-writing-mode").map(function(dt) {
                return pc[dt];
              })), this.stateDependentLayerIds = this.layers.filter(function(dt) {
                return dt.isStateDependent();
              }).map(function(dt) {
                return dt.id;
              }), this.sourceID = N.sourceID;
            };
            ao.prototype.createArrays = function() {
              this.text = new Hp(new pa(this.layers, this.zoom, function(N) {
                return /^text/.test(N);
              })), this.icon = new Hp(new pa(this.layers, this.zoom, function(N) {
                return /^icon/.test(N);
              })), this.glyphOffsetArray = new Xt(), this.lineVertexArray = new yn(), this.symbolInstances = new Qt();
            }, ao.prototype.calculateGlyphDependencies = function(N, W, le, ke, qe) {
              for (var et = 0; et < N.length; et++) if (W[N.charCodeAt(et)] = !0, (le || ke) && qe) {
                var dt = ay[N.charAt(et)];
                dt && (W[dt.charCodeAt(0)] = !0);
              }
            }, ao.prototype.populate = function(N, W, le) {
              var ke = this.layers[0], qe = ke.layout, et = qe.get("text-font"), dt = qe.get("text-field"), Ct = qe.get("icon-image"), Ut = (dt.value.kind !== "constant" || dt.value.value instanceof zr && !dt.value.value.isEmpty() || dt.value.value.toString().length > 0) && (et.value.kind !== "constant" || et.value.value.length > 0), tn = Ct.value.kind !== "constant" || !!Ct.value.value || Object.keys(Ct.parameters).length > 0, nn = qe.get("symbol-sort-key");
              if (this.features = [], Ut || tn) {
                for (var cn = W.iconDependencies, vn = W.glyphDependencies, mn = W.availableImages, On = new ma(this.zoom), Bn = 0, ar = N; Bn < ar.length; Bn += 1) {
                  var tr = ar[Bn], xr = tr.feature, _r = tr.id, Lr = tr.index, Ur = tr.sourceLayerIndex, $r = ke._featureFilter.needGeometry, ai = io(xr, $r);
                  if (ke._featureFilter.filter(On, ai, le)) {
                    $r || (ai.geometry = Nl(xr));
                    var Hr = void 0;
                    if (Ut) {
                      var hi = ke.getValueAndResolveTokens("text-field", ai, le, mn), Ti = zr.factory(hi);
                      m_(Ti) && (this.hasRTLText = !0), (!this.hasRTLText || Qu() === "unavailable" || this.hasRTLText && ls.isParsed()) && (Hr = PA(Ti, ke, ai));
                    }
                    var ta = void 0;
                    if (tn) {
                      var zi = ke.getValueAndResolveTokens("icon-image", ai, le, mn);
                      ta = zi instanceof Wr ? zi : Wr.fromString(zi);
                    }
                    if (Hr || ta) {
                      var Ki = this.sortFeaturesByKey ? nn.evaluate(ai, {}, le) : void 0, $i = { id: _r, text: Hr, icon: ta, index: Lr, sourceLayerIndex: Ur, geometry: ai.geometry, properties: xr.properties, type: L5[xr.type], sortKey: Ki };
                      if (this.features.push($i), ta && (cn[ta.name] = !0), Hr) {
                        var Ii = et.evaluate(ai, {}, le).join(","), za = qe.get("text-rotation-alignment") === "map" && qe.get("symbol-placement") !== "point";
                        this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(pc.vertical) >= 0;
                        for (var ga = 0, fo = Hr.sections; ga < fo.length; ga += 1) {
                          var Wi = fo[ga];
                          if (Wi.image) cn[Wi.image.name] = !0;
                          else {
                            var Xa = js(Hr.toString()), bo = Wi.fontStack || Ii, oo = vn[bo] = vn[bo] || {};
                            this.calculateGlyphDependencies(Wi.text, oo, za, this.allowVerticalPlacement, Xa);
                          }
                        }
                      }
                    }
                  }
                }
                qe.get("symbol-placement") === "line" && (this.features = function(_o) {
                  var ho = {}, qs = {}, Oo = [], Hs = 0;
                  function fu(Tt) {
                    Oo.push(_o[Tt]), Hs++;
                  }
                  function Vl(Tt, Nt, Vt) {
                    var Kt = qs[Tt];
                    return delete qs[Tt], qs[Nt] = Kt, Oo[Kt].geometry[0].pop(), Oo[Kt].geometry[0] = Oo[Kt].geometry[0].concat(Vt[0]), Kt;
                  }
                  function Vu(Tt, Nt, Vt) {
                    var Kt = ho[Nt];
                    return delete ho[Nt], ho[Tt] = Kt, Oo[Kt].geometry[0].shift(), Oo[Kt].geometry[0] = Vt[0].concat(Oo[Kt].geometry[0]), Kt;
                  }
                  function ku(Tt, Nt, Vt) {
                    var Kt = Vt ? Nt[0][Nt[0].length - 1] : Nt[0][0];
                    return Tt + ":" + Kt.x + ":" + Kt.y;
                  }
                  for (var J = 0; J < _o.length; J++) {
                    var H = _o[J], oe = H.geometry, ve = H.text ? H.text.toString() : null;
                    if (ve) {
                      var Oe = ku(ve, oe), Xe = ku(ve, oe, !0);
                      if (Oe in qs && Xe in ho && qs[Oe] !== ho[Xe]) {
                        var rt = Vu(Oe, Xe, oe), yt = Vl(Oe, Xe, Oo[rt].geometry);
                        delete ho[Oe], delete qs[Xe], qs[ku(ve, Oo[yt].geometry, !0)] = yt, Oo[rt].geometry = null;
                      } else Oe in qs ? Vl(Oe, Xe, oe) : Xe in ho ? Vu(Oe, Xe, oe) : (fu(J), ho[Oe] = Hs - 1, qs[Xe] = Hs - 1);
                    } else fu(J);
                  }
                  return Oo.filter(function(Tt) {
                    return Tt.geometry;
                  });
                }(this.features)), this.sortFeaturesByKey && this.features.sort(function(_o, ho) {
                  return _o.sortKey - ho.sortKey;
                });
              }
            }, ao.prototype.update = function(N, W, le) {
              this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(N, W, this.layers, le), this.icon.programConfigurations.updatePaintArrays(N, W, this.layers, le));
            }, ao.prototype.isEmpty = function() {
              return this.symbolInstances.length === 0 && !this.hasRTLText;
            }, ao.prototype.uploadPending = function() {
              return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;
            }, ao.prototype.upload = function(N) {
              !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;
            }, ao.prototype.destroyDebugData = function() {
              this.textCollisionBox.destroy(), this.iconCollisionBox.destroy();
            }, ao.prototype.destroy = function() {
              this.text.destroy(), this.icon.destroy(), this.hasDebugData() && this.destroyDebugData();
            }, ao.prototype.addToLineVertexArray = function(N, W) {
              var le = this.lineVertexArray.length;
              if (N.segment !== void 0) {
                for (var ke = N.dist(W[N.segment + 1]), qe = N.dist(W[N.segment]), et = {}, dt = N.segment + 1; dt < W.length; dt++) et[dt] = { x: W[dt].x, y: W[dt].y, tileUnitDistanceFromAnchor: ke }, dt < W.length - 1 && (ke += W[dt + 1].dist(W[dt]));
                for (var Ct = N.segment || 0; Ct >= 0; Ct--) et[Ct] = { x: W[Ct].x, y: W[Ct].y, tileUnitDistanceFromAnchor: qe }, Ct > 0 && (qe += W[Ct - 1].dist(W[Ct]));
                for (var Ut = 0; Ut < W.length; Ut++) {
                  var tn = et[Ut];
                  this.lineVertexArray.emplaceBack(tn.x, tn.y, tn.tileUnitDistanceFromAnchor);
                }
              }
              return { lineStartIndex: le, lineLength: this.lineVertexArray.length - le };
            }, ao.prototype.addSymbols = function(N, W, le, ke, qe, et, dt, Ct, Ut, tn, nn, cn) {
              for (var vn = N.indexArray, mn = N.layoutVertexArray, On = N.segments.prepareSegment(4 * W.length, mn, vn, this.canOverlap ? et.sortKey : void 0), Bn = this.glyphOffsetArray.length, ar = On.vertexLength, tr = this.allowVerticalPlacement && dt === pc.vertical ? Math.PI / 2 : 0, xr = et.text && et.text.sections, _r = 0; _r < W.length; _r++) {
                var Lr = W[_r], Ur = Lr.tl, $r = Lr.tr, ai = Lr.bl, Hr = Lr.br, hi = Lr.tex, Ti = Lr.pixelOffsetTL, ta = Lr.pixelOffsetBR, zi = Lr.minFontScaleX, Ki = Lr.minFontScaleY, $i = Lr.glyphOffset, Ii = Lr.isSDF, za = Lr.sectionIndex, ga = On.vertexLength, fo = $i[1];
                hy(mn, Ct.x, Ct.y, Ur.x, fo + Ur.y, hi.x, hi.y, le, Ii, Ti.x, Ti.y, zi, Ki), hy(mn, Ct.x, Ct.y, $r.x, fo + $r.y, hi.x + hi.w, hi.y, le, Ii, ta.x, Ti.y, zi, Ki), hy(mn, Ct.x, Ct.y, ai.x, fo + ai.y, hi.x, hi.y + hi.h, le, Ii, Ti.x, ta.y, zi, Ki), hy(mn, Ct.x, Ct.y, Hr.x, fo + Hr.y, hi.x + hi.w, hi.y + hi.h, le, Ii, ta.x, ta.y, zi, Ki), A2(N.dynamicLayoutVertexArray, Ct, tr), vn.emplaceBack(ga, ga + 1, ga + 2), vn.emplaceBack(ga + 1, ga + 2, ga + 3), On.vertexLength += 4, On.primitiveLength += 2, this.glyphOffsetArray.emplaceBack($i[0]), _r !== W.length - 1 && za === W[_r + 1].sectionIndex || N.programConfigurations.populatePaintArrays(mn.length, et, et.index, {}, cn, xr && xr[za]);
              }
              N.placedSymbolArray.emplaceBack(Ct.x, Ct.y, Bn, this.glyphOffsetArray.length - Bn, ar, Ut, tn, Ct.segment, le ? le[0] : 0, le ? le[1] : 0, ke[0], ke[1], dt, 0, !1, 0, nn);
            }, ao.prototype._addCollisionDebugVertex = function(N, W, le, ke, qe, et) {
              return W.emplaceBack(0, 0), N.emplaceBack(le.x, le.y, ke, qe, Math.round(et.x), Math.round(et.y));
            }, ao.prototype.addCollisionDebugVertices = function(N, W, le, ke, qe, et, dt) {
              var Ct = qe.segments.prepareSegment(4, qe.layoutVertexArray, qe.indexArray), Ut = Ct.vertexLength, tn = qe.layoutVertexArray, nn = qe.collisionVertexArray, cn = dt.anchorX, vn = dt.anchorY;
              this._addCollisionDebugVertex(tn, nn, et, cn, vn, new f(N, W)), this._addCollisionDebugVertex(tn, nn, et, cn, vn, new f(le, W)), this._addCollisionDebugVertex(tn, nn, et, cn, vn, new f(le, ke)), this._addCollisionDebugVertex(tn, nn, et, cn, vn, new f(N, ke)), Ct.vertexLength += 4;
              var mn = qe.indexArray;
              mn.emplaceBack(Ut, Ut + 1), mn.emplaceBack(Ut + 1, Ut + 2), mn.emplaceBack(Ut + 2, Ut + 3), mn.emplaceBack(Ut + 3, Ut), Ct.primitiveLength += 4;
            }, ao.prototype.addDebugCollisionBoxes = function(N, W, le, ke) {
              for (var qe = N; qe < W; qe++) {
                var et = this.collisionBoxArray.get(qe), dt = et.x1, Ct = et.y1, Ut = et.x2, tn = et.y2;
                this.addCollisionDebugVertices(dt, Ct, Ut, tn, ke ? this.textCollisionBox : this.iconCollisionBox, et.anchorPoint, le);
              }
            }, ao.prototype.generateCollisionDebugBuffers = function() {
              this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new dy(j, tm.members, gt), this.iconCollisionBox = new dy(j, tm.members, gt);
              for (var N = 0; N < this.symbolInstances.length; N++) {
                var W = this.symbolInstances.get(N);
                this.addDebugCollisionBoxes(W.textBoxStartIndex, W.textBoxEndIndex, W, !0), this.addDebugCollisionBoxes(W.verticalTextBoxStartIndex, W.verticalTextBoxEndIndex, W, !0), this.addDebugCollisionBoxes(W.iconBoxStartIndex, W.iconBoxEndIndex, W, !1), this.addDebugCollisionBoxes(W.verticalIconBoxStartIndex, W.verticalIconBoxEndIndex, W, !1);
              }
            }, ao.prototype._deserializeCollisionBoxesForSymbol = function(N, W, le, ke, qe, et, dt, Ct, Ut) {
              for (var tn = {}, nn = W; nn < le; nn++) {
                var cn = N.get(nn);
                tn.textBox = { x1: cn.x1, y1: cn.y1, x2: cn.x2, y2: cn.y2, anchorPointX: cn.anchorPointX, anchorPointY: cn.anchorPointY }, tn.textFeatureIndex = cn.featureIndex;
                break;
              }
              for (var vn = ke; vn < qe; vn++) {
                var mn = N.get(vn);
                tn.verticalTextBox = { x1: mn.x1, y1: mn.y1, x2: mn.x2, y2: mn.y2, anchorPointX: mn.anchorPointX, anchorPointY: mn.anchorPointY }, tn.verticalTextFeatureIndex = mn.featureIndex;
                break;
              }
              for (var On = et; On < dt; On++) {
                var Bn = N.get(On);
                tn.iconBox = { x1: Bn.x1, y1: Bn.y1, x2: Bn.x2, y2: Bn.y2, anchorPointX: Bn.anchorPointX, anchorPointY: Bn.anchorPointY }, tn.iconFeatureIndex = Bn.featureIndex;
                break;
              }
              for (var ar = Ct; ar < Ut; ar++) {
                var tr = N.get(ar);
                tn.verticalIconBox = { x1: tr.x1, y1: tr.y1, x2: tr.x2, y2: tr.y2, anchorPointX: tr.anchorPointX, anchorPointY: tr.anchorPointY }, tn.verticalIconFeatureIndex = tr.featureIndex;
                break;
              }
              return tn;
            }, ao.prototype.deserializeCollisionBoxes = function(N) {
              this.collisionArrays = [];
              for (var W = 0; W < this.symbolInstances.length; W++) {
                var le = this.symbolInstances.get(W);
                this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(N, le.textBoxStartIndex, le.textBoxEndIndex, le.verticalTextBoxStartIndex, le.verticalTextBoxEndIndex, le.iconBoxStartIndex, le.iconBoxEndIndex, le.verticalIconBoxStartIndex, le.verticalIconBoxEndIndex));
              }
            }, ao.prototype.hasTextData = function() {
              return this.text.segments.get().length > 0;
            }, ao.prototype.hasIconData = function() {
              return this.icon.segments.get().length > 0;
            }, ao.prototype.hasDebugData = function() {
              return this.textCollisionBox && this.iconCollisionBox;
            }, ao.prototype.hasTextCollisionBoxData = function() {
              return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;
            }, ao.prototype.hasIconCollisionBoxData = function() {
              return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;
            }, ao.prototype.addIndicesForPlacedSymbol = function(N, W) {
              for (var le = N.placedSymbolArray.get(W), ke = le.vertexStartIndex + 4 * le.numGlyphs, qe = le.vertexStartIndex; qe < ke; qe += 4) N.indexArray.emplaceBack(qe, qe + 1, qe + 2), N.indexArray.emplaceBack(qe + 1, qe + 2, qe + 3);
            }, ao.prototype.getSortedSymbolIndexes = function(N) {
              if (this.sortedAngle === N && this.symbolInstanceIndexes !== void 0) return this.symbolInstanceIndexes;
              for (var W = Math.sin(N), le = Math.cos(N), ke = [], qe = [], et = [], dt = 0; dt < this.symbolInstances.length; ++dt) {
                et.push(dt);
                var Ct = this.symbolInstances.get(dt);
                ke.push(0 | Math.round(W * Ct.anchorX + le * Ct.anchorY)), qe.push(Ct.featureIndex);
              }
              return et.sort(function(Ut, tn) {
                return ke[Ut] - ke[tn] || qe[tn] - qe[Ut];
              }), et;
            }, ao.prototype.addToSortKeyRanges = function(N, W) {
              var le = this.sortKeyRanges[this.sortKeyRanges.length - 1];
              le && le.sortKey === W ? le.symbolInstanceEnd = N + 1 : this.sortKeyRanges.push({ sortKey: W, symbolInstanceStart: N, symbolInstanceEnd: N + 1 });
            }, ao.prototype.sortFeatures = function(N) {
              var W = this;
              if (this.sortFeaturesByY && this.sortedAngle !== N && !(this.text.segments.get().length > 1 || this.icon.segments.get().length > 1)) {
                this.symbolInstanceIndexes = this.getSortedSymbolIndexes(N), this.sortedAngle = N, this.text.indexArray.clear(), this.icon.indexArray.clear(), this.featureSortOrder = [];
                for (var le = 0, ke = this.symbolInstanceIndexes; le < ke.length; le += 1) {
                  var qe = ke[le], et = this.symbolInstances.get(qe);
                  this.featureSortOrder.push(et.featureIndex), [et.rightJustifiedTextSymbolIndex, et.centerJustifiedTextSymbolIndex, et.leftJustifiedTextSymbolIndex].forEach(function(dt, Ct, Ut) {
                    dt >= 0 && Ut.indexOf(dt) === Ct && W.addIndicesForPlacedSymbol(W.text, dt);
                  }), et.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, et.verticalPlacedTextSymbolIndex), et.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, et.placedIconSymbolIndex), et.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, et.verticalPlacedIconSymbolIndex);
                }
                this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray);
              }
            }, xi("SymbolBucket", ao, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), ao.MAX_GLYPHS = 65535, ao.addDynamicAttributes = A2;
            var P5 = new Za({ "symbol-placement": new ni(st.layout_symbol["symbol-placement"]), "symbol-spacing": new ni(st.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new ni(st.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Ci(st.layout_symbol["symbol-sort-key"]), "symbol-z-order": new ni(st.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new ni(st.layout_symbol["icon-allow-overlap"]), "icon-ignore-placement": new ni(st.layout_symbol["icon-ignore-placement"]), "icon-optional": new ni(st.layout_symbol["icon-optional"]), "icon-rotation-alignment": new ni(st.layout_symbol["icon-rotation-alignment"]), "icon-size": new Ci(st.layout_symbol["icon-size"]), "icon-text-fit": new ni(st.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new ni(st.layout_symbol["icon-text-fit-padding"]), "icon-image": new Ci(st.layout_symbol["icon-image"]), "icon-rotate": new Ci(st.layout_symbol["icon-rotate"]), "icon-padding": new ni(st.layout_symbol["icon-padding"]), "icon-keep-upright": new ni(st.layout_symbol["icon-keep-upright"]), "icon-offset": new Ci(st.layout_symbol["icon-offset"]), "icon-anchor": new Ci(st.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new ni(st.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new ni(st.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new ni(st.layout_symbol["text-rotation-alignment"]), "text-field": new Ci(st.layout_symbol["text-field"]), "text-font": new Ci(st.layout_symbol["text-font"]), "text-size": new Ci(st.layout_symbol["text-size"]), "text-max-width": new Ci(st.layout_symbol["text-max-width"]), "text-line-height": new ni(st.layout_symbol["text-line-height"]), "text-letter-spacing": new Ci(st.layout_symbol["text-letter-spacing"]), "text-justify": new Ci(st.layout_symbol["text-justify"]), "text-radial-offset": new Ci(st.layout_symbol["text-radial-offset"]), "text-variable-anchor": new ni(st.layout_symbol["text-variable-anchor"]), "text-anchor": new Ci(st.layout_symbol["text-anchor"]), "text-max-angle": new ni(st.layout_symbol["text-max-angle"]), "text-writing-mode": new ni(st.layout_symbol["text-writing-mode"]), "text-rotate": new Ci(st.layout_symbol["text-rotate"]), "text-padding": new ni(st.layout_symbol["text-padding"]), "text-keep-upright": new ni(st.layout_symbol["text-keep-upright"]), "text-transform": new Ci(st.layout_symbol["text-transform"]), "text-offset": new Ci(st.layout_symbol["text-offset"]), "text-allow-overlap": new ni(st.layout_symbol["text-allow-overlap"]), "text-ignore-placement": new ni(st.layout_symbol["text-ignore-placement"]), "text-optional": new ni(st.layout_symbol["text-optional"]) }), S2 = { paint: new Za({ "icon-opacity": new Ci(st.paint_symbol["icon-opacity"]), "icon-color": new Ci(st.paint_symbol["icon-color"]), "icon-halo-color": new Ci(st.paint_symbol["icon-halo-color"]), "icon-halo-width": new Ci(st.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Ci(st.paint_symbol["icon-halo-blur"]), "icon-translate": new ni(st.paint_symbol["icon-translate"]), "icon-translate-anchor": new ni(st.paint_symbol["icon-translate-anchor"]), "text-opacity": new Ci(st.paint_symbol["text-opacity"]), "text-color": new Ci(st.paint_symbol["text-color"], { runtimeType: In, getOverride: function(N) {
              return N.textColor;
            }, hasOverride: function(N) {
              return !!N.textColor;
            } }), "text-halo-color": new Ci(st.paint_symbol["text-halo-color"]), "text-halo-width": new Ci(st.paint_symbol["text-halo-width"]), "text-halo-blur": new Ci(st.paint_symbol["text-halo-blur"]), "text-translate": new ni(st.paint_symbol["text-translate"]), "text-translate-anchor": new ni(st.paint_symbol["text-translate-anchor"]) }), layout: P5 }, fd = function(N) {
              this.type = N.property.overrides ? N.property.overrides.runtimeType : Yt, this.defaultValue = N;
            };
            fd.prototype.evaluate = function(N) {
              if (N.formattedSection) {
                var W = this.defaultValue.property.overrides;
                if (W && W.hasOverride(N.formattedSection)) return W.getOverride(N.formattedSection);
              }
              return N.feature && N.featureState ? this.defaultValue.evaluate(N.feature, N.featureState) : this.defaultValue.property.specification.default;
            }, fd.prototype.eachChild = function(N) {
              this.defaultValue.isConstant() || N(this.defaultValue.value._styleExpression.expression);
            }, fd.prototype.outputDefined = function() {
              return !1;
            }, fd.prototype.serialize = function() {
              return null;
            }, xi("FormatSectionOverride", fd, { omit: ["defaultValue"] });
            var hd = function(N) {
              function W(le) {
                N.call(this, le, S2);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.recalculate = function(le, ke) {
                if (N.prototype.recalculate.call(this, le, ke), this.layout.get("icon-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["icon-rotation-alignment"] = "map" : this.layout._values["icon-rotation-alignment"] = "viewport"), this.layout.get("text-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["text-rotation-alignment"] = "map" : this.layout._values["text-rotation-alignment"] = "viewport"), this.layout.get("text-pitch-alignment") === "auto" && (this.layout._values["text-pitch-alignment"] = this.layout.get("text-rotation-alignment")), 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") {
                  var qe = this.layout.get("text-writing-mode");
                  if (qe) {
                    for (var et = [], dt = 0, Ct = qe; dt < Ct.length; dt += 1) {
                      var Ut = Ct[dt];
                      et.indexOf(Ut) < 0 && et.push(Ut);
                    }
                    this.layout._values["text-writing-mode"] = et;
                  } else this.layout._values["text-writing-mode"] = ["horizontal"];
                }
                this._setPaintOverrides();
              }, W.prototype.getValueAndResolveTokens = function(le, ke, qe, et) {
                var dt = this.layout.get(le).evaluate(ke, {}, qe, et), Ct = this._unevaluatedLayout._values[le];
                return Ct.isDataDriven() || vl(Ct.value) || !dt ? dt : function(Ut, tn) {
                  return tn.replace(/{([^{}]+)}/g, function(nn, cn) {
                    return cn in Ut ? String(Ut[cn]) : "";
                  });
                }(ke.properties, dt);
              }, W.prototype.createBucket = function(le) {
                return new ao(le);
              }, W.prototype.queryRadius = function() {
                return 0;
              }, W.prototype.queryIntersectsFeature = function() {
                return !1;
              }, W.prototype._setPaintOverrides = function() {
                for (var le = 0, ke = S2.paint.overridableProperties; le < ke.length; le += 1) {
                  var qe = ke[le];
                  if (W.hasPaintOverride(this.layout, qe)) {
                    var et, dt = this.paint.get(qe), Ct = new fd(dt), Ut = new yl(Ct, dt.property.specification);
                    et = dt.value.kind === "constant" || dt.value.kind === "source" ? new Cl("source", Ut) : new ea("composite", Ut, dt.value.zoomStops, dt.value._interpolationType), this.paint._values[qe] = new Na(dt.property, et, dt.parameters);
                  }
                }
              }, W.prototype._handleOverridablePaintPropertyUpdate = function(le, ke, qe) {
                return !(!this.layout || ke.isDataDriven() || qe.isDataDriven()) && W.hasPaintOverride(this.layout, le);
              }, W.hasPaintOverride = function(le, ke) {
                var qe = le.get("text-field"), et = S2.paint.properties[ke], dt = !1, Ct = function(nn) {
                  for (var cn = 0, vn = nn; cn < vn.length; cn += 1) {
                    var mn = vn[cn];
                    if (et.overrides && et.overrides.hasOverride(mn)) return void (dt = !0);
                  }
                };
                if (qe.value.kind === "constant" && qe.value.value instanceof zr) Ct(qe.value.value.sections);
                else if (qe.value.kind === "source") {
                  var Ut = function(nn) {
                    if (!dt) if (nn instanceof rn && yr(nn.value) === Mn) {
                      var cn = nn.value;
                      Ct(cn.sections);
                    } else nn instanceof ur ? Ct(nn.sections) : nn.eachChild(Ut);
                  }, tn = qe.value;
                  tn._styleExpression && Ut(tn._styleExpression.expression);
                }
                return dt;
              }, W;
            }(na), Gp = { paint: new Za({ "background-color": new ni(st.paint_background["background-color"]), "background-pattern": new al(st.paint_background["background-pattern"]), "background-opacity": new ni(st.paint_background["background-opacity"]) }) }, O5 = function(N) {
              function W(le) {
                N.call(this, le, Gp);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W;
            }(na), g_ = { paint: new Za({ "raster-opacity": new ni(st.paint_raster["raster-opacity"]), "raster-hue-rotate": new ni(st.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new ni(st.paint_raster["raster-brightness-min"]), "raster-brightness-max": new ni(st.paint_raster["raster-brightness-max"]), "raster-saturation": new ni(st.paint_raster["raster-saturation"]), "raster-contrast": new ni(st.paint_raster["raster-contrast"]), "raster-resampling": new ni(st.paint_raster["raster-resampling"]), "raster-fade-duration": new ni(st.paint_raster["raster-fade-duration"]) }) }, HA = function(N) {
              function W(le) {
                N.call(this, le, g_);
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W;
            }(na), GA = function(N) {
              function W(le) {
                N.call(this, le, {}), this.implementation = le;
              }
              return N && (W.__proto__ = N), W.prototype = Object.create(N && N.prototype), W.prototype.constructor = W, W.prototype.is3D = function() {
                return this.implementation.renderingMode === "3d";
              }, W.prototype.hasOffscreenPass = function() {
                return this.implementation.prerender !== void 0;
              }, W.prototype.recalculate = function() {
              }, W.prototype.updateTransitions = function() {
              }, W.prototype.hasTransition = function() {
              }, W.prototype.serialize = function() {
              }, W.prototype.onAdd = function(le) {
                this.implementation.onAdd && this.implementation.onAdd(le, le.painter.context.gl);
              }, W.prototype.onRemove = function(le) {
                this.implementation.onRemove && this.implementation.onRemove(le, le.painter.context.gl);
              }, W;
            }(na), M2 = { circle: a2, heatmap: Q4, hillshade: mA, fill: kA, "fill-extrusion": l5, line: eF, symbol: hd, background: O5, raster: HA }, E2 = g.HTMLImageElement, z5 = g.HTMLCanvasElement, C2 = g.HTMLVideoElement, I2 = g.ImageData, Hd = g.ImageBitmap, Wp = function(N, W, le, ke) {
              this.context = N, this.format = le, this.texture = N.gl.createTexture(), this.update(W, ke);
            };
            Wp.prototype.update = function(N, W, le) {
              var ke = N.width, qe = N.height, et = !(this.size && this.size[0] === ke && this.size[1] === qe || le), dt = this.context, Ct = dt.gl;
              if (this.useMipmap = !!(W && W.useMipmap), Ct.bindTexture(Ct.TEXTURE_2D, this.texture), dt.pixelStoreUnpackFlipY.set(!1), dt.pixelStoreUnpack.set(1), dt.pixelStoreUnpackPremultiplyAlpha.set(this.format === Ct.RGBA && (!W || W.premultiply !== !1)), et) this.size = [ke, qe], N instanceof E2 || N instanceof z5 || N instanceof C2 || N instanceof I2 || Hd && N instanceof Hd ? Ct.texImage2D(Ct.TEXTURE_2D, 0, this.format, this.format, Ct.UNSIGNED_BYTE, N) : Ct.texImage2D(Ct.TEXTURE_2D, 0, this.format, ke, qe, 0, this.format, Ct.UNSIGNED_BYTE, N.data);
              else {
                var Ut = le || { x: 0, y: 0 }, tn = Ut.x, nn = Ut.y;
                N instanceof E2 || N instanceof z5 || N instanceof C2 || N instanceof I2 || Hd && N instanceof Hd ? Ct.texSubImage2D(Ct.TEXTURE_2D, 0, tn, nn, Ct.RGBA, Ct.UNSIGNED_BYTE, N) : Ct.texSubImage2D(Ct.TEXTURE_2D, 0, tn, nn, ke, qe, Ct.RGBA, Ct.UNSIGNED_BYTE, N.data);
              }
              this.useMipmap && this.isSizePowerOfTwo() && Ct.generateMipmap(Ct.TEXTURE_2D);
            }, Wp.prototype.bind = function(N, W, le) {
              var ke = this.context.gl;
              ke.bindTexture(ke.TEXTURE_2D, this.texture), le !== ke.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (le = ke.LINEAR), N !== this.filter && (ke.texParameteri(ke.TEXTURE_2D, ke.TEXTURE_MAG_FILTER, N), ke.texParameteri(ke.TEXTURE_2D, ke.TEXTURE_MIN_FILTER, le || N), this.filter = N), W !== this.wrap && (ke.texParameteri(ke.TEXTURE_2D, ke.TEXTURE_WRAP_S, W), ke.texParameteri(ke.TEXTURE_2D, ke.TEXTURE_WRAP_T, W), this.wrap = W);
            }, Wp.prototype.isSizePowerOfTwo = function() {
              return this.size[0] === this.size[1] && Math.log(this.size[0]) / Math.LN2 % 1 == 0;
            }, Wp.prototype.destroy = function() {
              this.context.gl.deleteTexture(this.texture), this.texture = null;
            };
            var D2 = function(N) {
              var W = this;
              this._callback = N, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel(), this._channel.port2.onmessage = function() {
                W._triggered = !1, W._callback();
              });
            };
            D2.prototype.trigger = function() {
              var N = this;
              this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout(function() {
                N._triggered = !1, N._callback();
              }, 0));
            }, D2.prototype.remove = function() {
              delete this._channel, this._callback = function() {
              };
            };
            var Yp = function(N, W, le) {
              this.target = N, this.parent = W, this.mapId = le, this.callbacks = {}, this.tasks = {}, this.taskQueue = [], this.cancelCallbacks = {}, P(["receive", "process"], this), this.invoker = new D2(this.process), this.target.addEventListener("message", this.receive, !1), this.globalScope = $() ? N : g;
            };
            function y_(N, W, le) {
              var ke = 2 * Math.PI * 6378137 / 256 / Math.pow(2, le);
              return [N * ke - 2 * Math.PI * 6378137 / 2, W * ke - 2 * Math.PI * 6378137 / 2];
            }
            Yp.prototype.send = function(N, W, le, ke, qe) {
              var et = this;
              qe === void 0 && (qe = !1);
              var dt = Math.round(1e18 * Math.random()).toString(36).substring(0, 10);
              le && (this.callbacks[dt] = le);
              var Ct = re(this.globalScope) ? void 0 : [];
              return this.target.postMessage({ id: dt, type: N, hasCallback: !!le, targetMapId: ke, mustQueue: qe, sourceMapId: this.mapId, data: zl(W, Ct) }, Ct), { cancel: function() {
                le && delete et.callbacks[dt], et.target.postMessage({ id: dt, type: "<cancel>", targetMapId: ke, sourceMapId: et.mapId });
              } };
            }, Yp.prototype.receive = function(N) {
              var W = N.data, le = W.id;
              if (le && (!W.targetMapId || this.mapId === W.targetMapId)) if (W.type === "<cancel>") {
                delete this.tasks[le];
                var ke = this.cancelCallbacks[le];
                delete this.cancelCallbacks[le], ke && ke();
              } else $() || W.mustQueue ? (this.tasks[le] = W, this.taskQueue.push(le), this.invoker.trigger()) : this.processTask(le, W);
            }, Yp.prototype.process = function() {
              if (this.taskQueue.length) {
                var N = this.taskQueue.shift(), W = this.tasks[N];
                delete this.tasks[N], this.taskQueue.length && this.invoker.trigger(), W && this.processTask(N, W);
              }
            }, Yp.prototype.processTask = function(N, W) {
              var le = this;
              if (W.type === "<response>") {
                var ke = this.callbacks[N];
                delete this.callbacks[N], ke && (W.error ? ke(Rl(W.error)) : ke(null, Rl(W.data)));
              } else {
                var qe = !1, et = re(this.globalScope) ? void 0 : [], dt = W.hasCallback ? function(nn, cn) {
                  qe = !0, delete le.cancelCallbacks[N], le.target.postMessage({ id: N, type: "<response>", sourceMapId: le.mapId, error: nn ? zl(nn) : null, data: zl(cn, et) }, et);
                } : function(nn) {
                  qe = !0;
                }, Ct = null, Ut = Rl(W.data);
                if (this.parent[W.type]) Ct = this.parent[W.type](W.sourceMapId, Ut, dt);
                else if (this.parent.getWorkerSource) {
                  var tn = W.type.split(".");
                  Ct = this.parent.getWorkerSource(W.sourceMapId, tn[0], Ut.source)[tn[1]](Ut, dt);
                } else dt(new Error("Could not find function " + W.type));
                !qe && Ct && Ct.cancel && (this.cancelCallbacks[N] = Ct.cancel);
              }
            }, Yp.prototype.remove = function() {
              this.invoker.remove(), this.target.removeEventListener("message", this.receive, !1);
            };
            var zs = function(N, W) {
              N && (W ? this.setSouthWest(N).setNorthEast(W) : N.length === 4 ? this.setSouthWest([N[0], N[1]]).setNorthEast([N[2], N[3]]) : this.setSouthWest(N[0]).setNorthEast(N[1]));
            };
            zs.prototype.setNorthEast = function(N) {
              return this._ne = N instanceof Qo ? new Qo(N.lng, N.lat) : Qo.convert(N), this;
            }, zs.prototype.setSouthWest = function(N) {
              return this._sw = N instanceof Qo ? new Qo(N.lng, N.lat) : Qo.convert(N), this;
            }, zs.prototype.extend = function(N) {
              var W, le, ke = this._sw, qe = this._ne;
              if (N instanceof Qo) W = N, le = N;
              else {
                if (!(N instanceof zs)) {
                  if (Array.isArray(N)) {
                    if (N.length === 4 || N.every(Array.isArray)) {
                      var et = N;
                      return this.extend(zs.convert(et));
                    }
                    var dt = N;
                    return this.extend(Qo.convert(dt));
                  }
                  return this;
                }
                if (W = N._sw, le = N._ne, !W || !le) return this;
              }
              return ke || qe ? (ke.lng = Math.min(W.lng, ke.lng), ke.lat = Math.min(W.lat, ke.lat), qe.lng = Math.max(le.lng, qe.lng), qe.lat = Math.max(le.lat, qe.lat)) : (this._sw = new Qo(W.lng, W.lat), this._ne = new Qo(le.lng, le.lat)), this;
            }, zs.prototype.getCenter = function() {
              return new Qo((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);
            }, zs.prototype.getSouthWest = function() {
              return this._sw;
            }, zs.prototype.getNorthEast = function() {
              return this._ne;
            }, zs.prototype.getNorthWest = function() {
              return new Qo(this.getWest(), this.getNorth());
            }, zs.prototype.getSouthEast = function() {
              return new Qo(this.getEast(), this.getSouth());
            }, zs.prototype.getWest = function() {
              return this._sw.lng;
            }, zs.prototype.getSouth = function() {
              return this._sw.lat;
            }, zs.prototype.getEast = function() {
              return this._ne.lng;
            }, zs.prototype.getNorth = function() {
              return this._ne.lat;
            }, zs.prototype.toArray = function() {
              return [this._sw.toArray(), this._ne.toArray()];
            }, zs.prototype.toString = function() {
              return "LngLatBounds(" + this._sw.toString() + ", " + this._ne.toString() + ")";
            }, zs.prototype.isEmpty = function() {
              return !(this._sw && this._ne);
            }, zs.prototype.contains = function(N) {
              var W = Qo.convert(N), le = W.lng, ke = W.lat, qe = this._sw.lat <= ke && ke <= this._ne.lat, et = this._sw.lng <= le && le <= this._ne.lng;
              return this._sw.lng > this._ne.lng && (et = this._sw.lng >= le && le >= this._ne.lng), qe && et;
            }, zs.convert = function(N) {
              return !N || N instanceof zs ? N : new zs(N);
            };
            var v_ = 63710088e-1, Qo = function(N, W) {
              if (isNaN(N) || isNaN(W)) throw new Error("Invalid LngLat object: (" + N + ", " + W + ")");
              if (this.lng = +N, this.lat = +W, this.lat > 90 || this.lat < -90) throw new Error("Invalid LngLat latitude value: must be between -90 and 90");
            };
            Qo.prototype.wrap = function() {
              return new Qo(S(this.lng, -180, 180), this.lat);
            }, Qo.prototype.toArray = function() {
              return [this.lng, this.lat];
            }, Qo.prototype.toString = function() {
              return "LngLat(" + this.lng + ", " + this.lat + ")";
            }, Qo.prototype.distanceTo = function(N) {
              var W = Math.PI / 180, le = this.lat * W, ke = N.lat * W, qe = Math.sin(le) * Math.sin(ke) + Math.cos(le) * Math.cos(ke) * Math.cos((N.lng - this.lng) * W);
              return v_ * Math.acos(Math.min(qe, 1));
            }, Qo.prototype.toBounds = function(N) {
              N === void 0 && (N = 0);
              var W = 360 * N / 40075017, le = W / Math.cos(Math.PI / 180 * this.lat);
              return new zs(new Qo(this.lng - le, this.lat - W), new Qo(this.lng + le, this.lat + W));
            }, Qo.convert = function(N) {
              if (N instanceof Qo) return N;
              if (Array.isArray(N) && (N.length === 2 || N.length === 3)) return new Qo(Number(N[0]), Number(N[1]));
              if (!Array.isArray(N) && typeof N == "object" && N !== null) return new Qo(Number("lng" in N ? N.lng : N.lon), Number(N.lat));
              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>]");
            };
            var R5 = 2 * Math.PI * v_;
            function x_(N) {
              return R5 * Math.cos(N * Math.PI / 180);
            }
            function F5(N) {
              return (180 + N) / 360;
            }
            function N5(N) {
              return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + N * Math.PI / 360))) / 360;
            }
            function B5(N, W) {
              return N / x_(W);
            }
            function b_(N) {
              var W = 180 - 360 * N;
              return 360 / Math.PI * Math.atan(Math.exp(W * Math.PI / 180)) - 90;
            }
            var Gd = function(N, W, le) {
              le === void 0 && (le = 0), this.x = +N, this.y = +W, this.z = +le;
            };
            Gd.fromLngLat = function(N, W) {
              W === void 0 && (W = 0);
              var le = Qo.convert(N);
              return new Gd(F5(le.lng), N5(le.lat), B5(W, le.lat));
            }, Gd.prototype.toLngLat = function() {
              return new Qo(360 * this.x - 180, b_(this.y));
            }, Gd.prototype.toAltitude = function() {
              return N = this.z, W = this.y, N * x_(b_(W));
              var N, W;
            }, Gd.prototype.meterInMercatorCoordinateUnits = function() {
              return 1 / R5 * (N = b_(this.y), 1 / Math.cos(N * Math.PI / 180));
              var N;
            };
            var _f = function(N, W, le) {
              this.z = N, this.x = W, this.y = le, this.key = _1(0, N, N, W, le);
            };
            _f.prototype.equals = function(N) {
              return this.z === N.z && this.x === N.x && this.y === N.y;
            }, _f.prototype.url = function(N, W) {
              var le, ke, qe, et, dt, Ct = (le = this.x, ke = this.y, qe = this.z, et = y_(256 * le, 256 * (ke = Math.pow(2, qe) - ke - 1), qe), dt = y_(256 * (le + 1), 256 * (ke + 1), qe), et[0] + "," + et[1] + "," + dt[0] + "," + dt[1]), Ut = function(tn, nn, cn) {
                for (var vn, mn = "", On = tn; On > 0; On--) mn += (nn & (vn = 1 << On - 1) ? 1 : 0) + (cn & vn ? 2 : 0);
                return mn;
              }(this.z, this.x, this.y);
              return N[(this.x + this.y) % N.length].replace("{prefix}", (this.x % 16).toString(16) + (this.y % 16).toString(16)).replace("{z}", String(this.z)).replace("{x}", String(this.x)).replace("{y}", String(W === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace("{quadkey}", Ut).replace("{bbox-epsg-3857}", Ct);
            }, _f.prototype.getTilePoint = function(N) {
              var W = Math.pow(2, this.z);
              return new f((N.x * W - this.x) * Hi, (N.y * W - this.y) * Hi);
            }, _f.prototype.toString = function() {
              return this.z + "/" + this.x + "/" + this.y;
            };
            var __ = function(N, W) {
              this.wrap = N, this.canonical = W, this.key = _1(N, W.z, W.z, W.x, W.y);
            }, sl = function(N, W, le, ke, qe) {
              this.overscaledZ = N, this.wrap = W, this.canonical = new _f(le, +ke, +qe), this.key = _1(W, N, le, ke, qe);
            };
            function _1(N, W, le, ke, qe) {
              (N *= 2) < 0 && (N = -1 * N - 1);
              var et = 1 << le;
              return (et * et * N + et * qe + ke).toString(36) + le.toString(36) + W.toString(36);
            }
            sl.prototype.equals = function(N) {
              return this.overscaledZ === N.overscaledZ && this.wrap === N.wrap && this.canonical.equals(N.canonical);
            }, sl.prototype.scaledTo = function(N) {
              var W = this.canonical.z - N;
              return N > this.canonical.z ? new sl(N, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new sl(N, this.wrap, N, this.canonical.x >> W, this.canonical.y >> W);
            }, sl.prototype.calculateScaledKey = function(N, W) {
              var le = this.canonical.z - N;
              return N > this.canonical.z ? _1(this.wrap * +W, N, this.canonical.z, this.canonical.x, this.canonical.y) : _1(this.wrap * +W, N, N, this.canonical.x >> le, this.canonical.y >> le);
            }, sl.prototype.isChildOf = function(N) {
              if (N.wrap !== this.wrap) return !1;
              var W = this.canonical.z - N.canonical.z;
              return N.overscaledZ === 0 || N.overscaledZ < this.overscaledZ && N.canonical.x === this.canonical.x >> W && N.canonical.y === this.canonical.y >> W;
            }, sl.prototype.children = function(N) {
              if (this.overscaledZ >= N) return [new sl(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];
              var W = this.canonical.z + 1, le = 2 * this.canonical.x, ke = 2 * this.canonical.y;
              return [new sl(W, this.wrap, W, le, ke), new sl(W, this.wrap, W, le + 1, ke), new sl(W, this.wrap, W, le, ke + 1), new sl(W, this.wrap, W, le + 1, ke + 1)];
            }, sl.prototype.isLessThan = function(N) {
              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));
            }, sl.prototype.wrapped = function() {
              return new sl(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);
            }, sl.prototype.unwrapTo = function(N) {
              return new sl(this.overscaledZ, N, this.canonical.z, this.canonical.x, this.canonical.y);
            }, sl.prototype.overscaleFactor = function() {
              return Math.pow(2, this.overscaledZ - this.canonical.z);
            }, sl.prototype.toUnwrapped = function() {
              return new __(this.wrap, this.canonical);
            }, sl.prototype.toString = function() {
              return this.overscaledZ + "/" + this.canonical.x + "/" + this.canonical.y;
            }, sl.prototype.getTilePoint = function(N) {
              return this.canonical.getTilePoint(new Gd(N.x - this.wrap, N.y));
            }, xi("CanonicalTileID", _f), xi("OverscaledTileID", sl, { omit: ["posMatrix"] });
            var dd = function(N, W, le) {
              if (this.uid = N, W.height !== W.width) throw new RangeError("DEM tiles must be square");
              if (le && le !== "mapbox" && le !== "terrarium") return F('"' + le + '" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');
              this.stride = W.height;
              var ke = this.dim = W.height - 2;
              this.data = new Uint32Array(W.data.buffer), this.encoding = le || "mapbox";
              for (var qe = 0; qe < ke; qe++) this.data[this._idx(-1, qe)] = this.data[this._idx(0, qe)], this.data[this._idx(ke, qe)] = this.data[this._idx(ke - 1, qe)], this.data[this._idx(qe, -1)] = this.data[this._idx(qe, 0)], this.data[this._idx(qe, ke)] = this.data[this._idx(qe, ke - 1)];
              this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(ke, -1)] = this.data[this._idx(ke - 1, 0)], this.data[this._idx(-1, ke)] = this.data[this._idx(0, ke - 1)], this.data[this._idx(ke, ke)] = this.data[this._idx(ke - 1, ke - 1)];
            };
            dd.prototype.get = function(N, W) {
              var le = new Uint8Array(this.data.buffer), ke = 4 * this._idx(N, W);
              return (this.encoding === "terrarium" ? this._unpackTerrarium : this._unpackMapbox)(le[ke], le[ke + 1], le[ke + 2]);
            }, dd.prototype.getUnpackVector = function() {
              return this.encoding === "terrarium" ? [256, 1, 390625e-8, 32768] : [6553.6, 25.6, 0.1, 1e4];
            }, dd.prototype._idx = function(N, W) {
              if (N < -1 || N >= this.dim + 1 || W < -1 || W >= this.dim + 1) throw new RangeError("out of range source coordinates for DEM data");
              return (W + 1) * this.stride + (N + 1);
            }, dd.prototype._unpackMapbox = function(N, W, le) {
              return (256 * N * 256 + 256 * W + le) / 10 - 1e4;
            }, dd.prototype._unpackTerrarium = function(N, W, le) {
              return 256 * N + W + le / 256 - 32768;
            }, dd.prototype.getPixels = function() {
              return new Pc({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
            }, dd.prototype.backfillBorder = function(N, W, le) {
              if (this.dim !== N.dim) throw new Error("dem dimension mismatch");
              var ke = W * this.dim, qe = W * this.dim + this.dim, et = le * this.dim, dt = le * this.dim + this.dim;
              switch (W) {
                case -1:
                  ke = qe - 1;
                  break;
                case 1:
                  qe = ke + 1;
              }
              switch (le) {
                case -1:
                  et = dt - 1;
                  break;
                case 1:
                  dt = et + 1;
              }
              for (var Ct = -W * this.dim, Ut = -le * this.dim, tn = et; tn < dt; tn++) for (var nn = ke; nn < qe; nn++) this.data[this._idx(nn, tn)] = N.data[this._idx(nn + Ct, tn + Ut)];
            }, xi("DEMData", dd);
            var py = function(N) {
              this._stringToNumber = {}, this._numberToString = [];
              for (var W = 0; W < N.length; W++) {
                var le = N[W];
                this._stringToNumber[le] = W, this._numberToString[W] = le;
              }
            };
            py.prototype.encode = function(N) {
              return this._stringToNumber[N];
            }, py.prototype.decode = function(N) {
              return this._numberToString[N];
            };
            var w1 = function(N, W, le, ke, qe) {
              this.type = "Feature", this._vectorTileFeature = N, N._z = W, N._x = le, N._y = ke, this.properties = N.properties, this.id = qe;
            }, k1 = { geometry: { configurable: !0 } };
            k1.geometry.get = function() {
              return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry;
            }, k1.geometry.set = function(N) {
              this._geometry = N;
            }, w1.prototype.toJSON = function() {
              var N = { geometry: this.geometry };
              for (var W in this) W !== "_geometry" && W !== "_vectorTileFeature" && (N[W] = this[W]);
              return N;
            }, Object.defineProperties(w1.prototype, k1);
            var sm = function() {
              this.state = {}, this.stateChanges = {}, this.deletedStates = {};
            };
            sm.prototype.updateState = function(N, W, le) {
              var ke = String(W);
              if (this.stateChanges[N] = this.stateChanges[N] || {}, this.stateChanges[N][ke] = this.stateChanges[N][ke] || {}, A(this.stateChanges[N][ke], le), this.deletedStates[N] === null) for (var qe in this.deletedStates[N] = {}, this.state[N]) qe !== ke && (this.deletedStates[N][qe] = null);
              else if (this.deletedStates[N] && this.deletedStates[N][ke] === null) for (var et in this.deletedStates[N][ke] = {}, this.state[N][ke]) le[et] || (this.deletedStates[N][ke][et] = null);
              else for (var dt in le) this.deletedStates[N] && this.deletedStates[N][ke] && this.deletedStates[N][ke][dt] === null && delete this.deletedStates[N][ke][dt];
            }, sm.prototype.removeFeatureState = function(N, W, le) {
              if (this.deletedStates[N] !== null) {
                var ke = String(W);
                if (this.deletedStates[N] = this.deletedStates[N] || {}, le && W !== void 0) this.deletedStates[N][ke] !== null && (this.deletedStates[N][ke] = this.deletedStates[N][ke] || {}, this.deletedStates[N][ke][le] = null);
                else if (W !== void 0) if (this.stateChanges[N] && this.stateChanges[N][ke]) for (le in this.deletedStates[N][ke] = {}, this.stateChanges[N][ke]) this.deletedStates[N][ke][le] = null;
                else this.deletedStates[N][ke] = null;
                else this.deletedStates[N] = null;
              }
            }, sm.prototype.getState = function(N, W) {
              var le = String(W), ke = this.state[N] || {}, qe = this.stateChanges[N] || {}, et = A({}, ke[le], qe[le]);
              if (this.deletedStates[N] === null) return {};
              if (this.deletedStates[N]) {
                var dt = this.deletedStates[N][W];
                if (dt === null) return {};
                for (var Ct in dt) delete et[Ct];
              }
              return et;
            }, sm.prototype.initializeTileState = function(N, W) {
              N.setFeatureState(this.state, W);
            }, sm.prototype.coalesceChanges = function(N, W) {
              var le = {};
              for (var ke in this.stateChanges) {
                this.state[ke] = this.state[ke] || {};
                var qe = {};
                for (var et in this.stateChanges[ke]) this.state[ke][et] || (this.state[ke][et] = {}), A(this.state[ke][et], this.stateChanges[ke][et]), qe[et] = this.state[ke][et];
                le[ke] = qe;
              }
              for (var dt in this.deletedStates) {
                this.state[dt] = this.state[dt] || {};
                var Ct = {};
                if (this.deletedStates[dt] === null) for (var Ut in this.state[dt]) Ct[Ut] = {}, this.state[dt][Ut] = {};
                else for (var tn in this.deletedStates[dt]) {
                  if (this.deletedStates[dt][tn] === null) this.state[dt][tn] = {};
                  else for (var nn = 0, cn = Object.keys(this.deletedStates[dt][tn]); nn < cn.length; nn += 1) {
                    var vn = cn[nn];
                    delete this.state[dt][tn][vn];
                  }
                  Ct[tn] = this.state[dt][tn];
                }
                le[dt] = le[dt] || {}, A(le[dt], Ct);
              }
              if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(le).length !== 0) for (var mn in N) N[mn].setFeatureState(le, W);
            };
            var qh = function(N, W) {
              this.tileID = N, this.x = N.canonical.x, this.y = N.canonical.y, this.z = N.canonical.z, this.grid = new Bu(Hi, 16, 0), this.grid3D = new Bu(Hi, 16, 0), this.featureIndexArray = new Un(), this.promoteId = W;
            };
            function w_(N, W, le, ke, qe) {
              return M(N, function(et, dt) {
                var Ct = W instanceof il ? W.get(dt) : null;
                return Ct && Ct.evaluate ? Ct.evaluate(le, ke, qe) : Ct;
              });
            }
            function wf(N) {
              for (var W = 1 / 0, le = 1 / 0, ke = -1 / 0, qe = -1 / 0, et = 0, dt = N; et < dt.length; et += 1) {
                var Ct = dt[et];
                W = Math.min(W, Ct.x), le = Math.min(le, Ct.y), ke = Math.max(ke, Ct.x), qe = Math.max(qe, Ct.y);
              }
              return { minX: W, minY: le, maxX: ke, maxY: qe };
            }
            function my(N, W) {
              return W - N;
            }
            qh.prototype.insert = function(N, W, le, ke, qe, et) {
              var dt = this.featureIndexArray.length;
              this.featureIndexArray.emplaceBack(le, ke, qe);
              for (var Ct = et ? this.grid3D : this.grid, Ut = 0; Ut < W.length; Ut++) {
                for (var tn = W[Ut], nn = [1 / 0, 1 / 0, -1 / 0, -1 / 0], cn = 0; cn < tn.length; cn++) {
                  var vn = tn[cn];
                  nn[0] = Math.min(nn[0], vn.x), nn[1] = Math.min(nn[1], vn.y), nn[2] = Math.max(nn[2], vn.x), nn[3] = Math.max(nn[3], vn.y);
                }
                nn[0] < Hi && nn[1] < Hi && nn[2] >= 0 && nn[3] >= 0 && Ct.insert(dt, nn[0], nn[1], nn[2], nn[3]);
              }
            }, qh.prototype.loadVTLayers = function() {
              return this.vtLayers || (this.vtLayers = new cs.VectorTile(new g2(this.rawTileData)).layers, this.sourceLayerCoder = new py(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
            }, qh.prototype.query = function(N, W, le, ke) {
              var qe = this;
              this.loadVTLayers();
              for (var et = N.params || {}, dt = Hi / N.tileSize / N.scale, Ct = Io(et.filter), Ut = N.queryGeometry, tn = N.queryPadding * dt, nn = wf(Ut), cn = this.grid.query(nn.minX - tn, nn.minY - tn, nn.maxX + tn, nn.maxY + tn), vn = wf(N.cameraQueryGeometry), mn = 0, On = this.grid3D.query(vn.minX - tn, vn.minY - tn, vn.maxX + tn, vn.maxY + tn, function(Lr, Ur, $r, ai) {
                return function(Hr, hi, Ti, ta, zi) {
                  for (var Ki = 0, $i = Hr; Ki < $i.length; Ki += 1) {
                    var Ii = $i[Ki];
                    if (hi <= Ii.x && Ti <= Ii.y && ta >= Ii.x && zi >= Ii.y) return !0;
                  }
                  var za = [new f(hi, Ti), new f(hi, zi), new f(ta, zi), new f(ta, Ti)];
                  if (Hr.length > 2) {
                    for (var ga = 0, fo = za; ga < fo.length; ga += 1) if (yh(Hr, fo[ga])) return !0;
                  }
                  for (var Wi = 0; Wi < Hr.length - 1; Wi++) if (Kg(Hr[Wi], Hr[Wi + 1], za)) return !0;
                  return !1;
                }(N.cameraQueryGeometry, Lr - tn, Ur - tn, $r + tn, ai + tn);
              }); mn < On.length; mn += 1) {
                var Bn = On[mn];
                cn.push(Bn);
              }
              cn.sort(my);
              for (var ar, tr = {}, xr = function(Lr) {
                var Ur = cn[Lr];
                if (Ur !== ar) {
                  ar = Ur;
                  var $r = qe.featureIndexArray.get(Ur), ai = null;
                  qe.loadMatchingFeature(tr, $r.bucketIndex, $r.sourceLayerIndex, $r.featureIndex, Ct, et.layers, et.availableImages, W, le, ke, function(Hr, hi, Ti) {
                    return ai || (ai = Nl(Hr)), hi.queryIntersectsFeature(Ut, Hr, Ti, ai, qe.z, N.transform, dt, N.pixelPosMatrix);
                  });
                }
              }, _r = 0; _r < cn.length; _r++) xr(_r);
              return tr;
            }, qh.prototype.loadMatchingFeature = function(N, W, le, ke, qe, et, dt, Ct, Ut, tn, nn) {
              var cn = this.bucketLayerIDs[W];
              if (!et || function(Hr, hi) {
                for (var Ti = 0; Ti < Hr.length; Ti++) if (hi.indexOf(Hr[Ti]) >= 0) return !0;
                return !1;
              }(et, cn)) {
                var vn = this.sourceLayerCoder.decode(le), mn = this.vtLayers[vn].feature(ke);
                if (qe.needGeometry) {
                  var On = io(mn, !0);
                  if (!qe.filter(new ma(this.tileID.overscaledZ), On, this.tileID.canonical)) return;
                } else if (!qe.filter(new ma(this.tileID.overscaledZ), mn)) return;
                for (var Bn = this.getId(mn, vn), ar = 0; ar < cn.length; ar++) {
                  var tr = cn[ar];
                  if (!(et && et.indexOf(tr) < 0)) {
                    var xr = Ct[tr];
                    if (xr) {
                      var _r = {};
                      Bn !== void 0 && tn && (_r = tn.getState(xr.sourceLayer || "_geojsonTileLayer", Bn));
                      var Lr = A({}, Ut[tr]);
                      Lr.paint = w_(Lr.paint, xr.paint, mn, _r, dt), Lr.layout = w_(Lr.layout, xr.layout, mn, _r, dt);
                      var Ur = !nn || nn(mn, xr, _r);
                      if (Ur) {
                        var $r = new w1(mn, this.z, this.x, this.y, Bn);
                        $r.layer = Lr;
                        var ai = N[tr];
                        ai === void 0 && (ai = N[tr] = []), ai.push({ featureIndex: ke, feature: $r, intersectionZ: Ur });
                      }
                    }
                  }
                }
              }
            }, qh.prototype.lookupSymbolFeatures = function(N, W, le, ke, qe, et, dt, Ct) {
              var Ut = {};
              this.loadVTLayers();
              for (var tn = Io(qe), nn = 0, cn = N; nn < cn.length; nn += 1) {
                var vn = cn[nn];
                this.loadMatchingFeature(Ut, le, ke, vn, tn, et, dt, Ct, W);
              }
              return Ut;
            }, qh.prototype.hasLayer = function(N) {
              for (var W = 0, le = this.bucketLayerIDs; W < le.length; W += 1) for (var ke = 0, qe = le[W]; ke < qe.length; ke += 1) if (N === qe[ke]) return !0;
              return !1;
            }, qh.prototype.getId = function(N, W) {
              var le = N.id;
              if (this.promoteId) {
                var ke = typeof this.promoteId == "string" ? this.promoteId : this.promoteId[W];
                typeof (le = N.properties[ke]) == "boolean" && (le = Number(le));
              }
              return le;
            }, xi("FeatureIndex", qh, { omit: ["rawTileData", "sourceLayerCoder"] });
            var Ul = function(N, W) {
              this.tileID = N, this.uid = D(), this.uses = 0, this.tileSize = W, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = !1, this.hasRTLText = !1, this.dependencies = {}, this.expiredRequestCount = 0, this.state = "loading";
            };
            Ul.prototype.registerFadeDuration = function(N) {
              var W = N + this.timeAdded;
              W < de.now() || this.fadeEndTime && W < this.fadeEndTime || (this.fadeEndTime = W);
            }, Ul.prototype.wasRequested = function() {
              return this.state === "errored" || this.state === "loaded" || this.state === "reloading";
            }, Ul.prototype.loadVectorData = function(N, W, le) {
              if (this.hasData() && this.unloadVectorData(), this.state = "loaded", N) {
                for (var ke in N.featureIndex && (this.latestFeatureIndex = N.featureIndex, N.rawTileData ? (this.latestRawTileData = N.rawTileData, this.latestFeatureIndex.rawTileData = N.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = N.collisionBoxArray, this.buckets = function(tn, nn) {
                  var cn = {};
                  if (!nn) return cn;
                  for (var vn = function() {
                    var Bn = On[mn], ar = Bn.layerIds.map(function(Lr) {
                      return nn.getLayer(Lr);
                    }).filter(Boolean);
                    if (ar.length !== 0) {
                      Bn.layers = ar, Bn.stateDependentLayerIds && (Bn.stateDependentLayers = Bn.stateDependentLayerIds.map(function(Lr) {
                        return ar.filter(function(Ur) {
                          return Ur.id === Lr;
                        })[0];
                      }));
                      for (var tr = 0, xr = ar; tr < xr.length; tr += 1) {
                        var _r = xr[tr];
                        cn[_r.id] = Bn;
                      }
                    }
                  }, mn = 0, On = tn; mn < On.length; mn += 1) vn();
                  return cn;
                }(N.buckets, W.style), this.hasSymbolBuckets = !1, this.buckets) {
                  var qe = this.buckets[ke];
                  if (qe instanceof ao) {
                    if (this.hasSymbolBuckets = !0, !le) break;
                    qe.justReloaded = !0;
                  }
                }
                if (this.hasRTLText = !1, this.hasSymbolBuckets) for (var et in this.buckets) {
                  var dt = this.buckets[et];
                  if (dt instanceof ao && dt.hasRTLText) {
                    this.hasRTLText = !0, ls.isLoading() || ls.isLoaded() || Qu() !== "deferred" || li();
                    break;
                  }
                }
                for (var Ct in this.queryPadding = 0, this.buckets) {
                  var Ut = this.buckets[Ct];
                  this.queryPadding = Math.max(this.queryPadding, W.style.getLayer(Ct).queryRadius(Ut));
                }
                N.imageAtlas && (this.imageAtlas = N.imageAtlas), N.glyphAtlasImage && (this.glyphAtlasImage = N.glyphAtlasImage);
              } else this.collisionBoxArray = new It();
            }, Ul.prototype.unloadVectorData = function() {
              for (var N in this.buckets) this.buckets[N].destroy();
              this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded";
            }, Ul.prototype.getBucket = function(N) {
              return this.buckets[N.id];
            }, Ul.prototype.upload = function(N) {
              for (var W in this.buckets) {
                var le = this.buckets[W];
                le.uploadPending() && le.upload(N);
              }
              var ke = N.gl;
              this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new Wp(N, this.imageAtlas.image, ke.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new Wp(N, this.glyphAtlasImage, ke.ALPHA), this.glyphAtlasImage = null);
            }, Ul.prototype.prepare = function(N) {
              this.imageAtlas && this.imageAtlas.patchUpdatedImages(N, this.imageAtlasTexture);
            }, Ul.prototype.queryRenderedFeatures = function(N, W, le, ke, qe, et, dt, Ct, Ut, tn) {
              return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: ke, cameraQueryGeometry: qe, scale: et, tileSize: this.tileSize, pixelPosMatrix: tn, transform: Ct, params: dt, queryPadding: this.queryPadding * Ut }, N, W, le) : {};
            }, Ul.prototype.querySourceFeatures = function(N, W) {
              var le = this.latestFeatureIndex;
              if (le && le.rawTileData) {
                var ke = le.loadVTLayers(), qe = W ? W.sourceLayer : "", et = ke._geojsonTileLayer || ke[qe];
                if (et) for (var dt = Io(W && W.filter), Ct = this.tileID.canonical, Ut = Ct.z, tn = Ct.x, nn = Ct.y, cn = { z: Ut, x: tn, y: nn }, vn = 0; vn < et.length; vn++) {
                  var mn = et.feature(vn);
                  if (dt.needGeometry) {
                    var On = io(mn, !0);
                    if (!dt.filter(new ma(this.tileID.overscaledZ), On, this.tileID.canonical)) continue;
                  } else if (!dt.filter(new ma(this.tileID.overscaledZ), mn)) continue;
                  var Bn = le.getId(mn, qe), ar = new w1(mn, Ut, tn, nn, Bn);
                  ar.tile = cn, N.push(ar);
                }
              }
            }, Ul.prototype.hasData = function() {
              return this.state === "loaded" || this.state === "reloading" || this.state === "expired";
            }, Ul.prototype.patternsLoaded = function() {
              return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;
            }, Ul.prototype.setExpiryData = function(N) {
              var W = this.expirationTime;
              if (N.cacheControl) {
                var le = q(N.cacheControl);
                le["max-age"] && (this.expirationTime = Date.now() + 1e3 * le["max-age"]);
              } else N.expires && (this.expirationTime = new Date(N.expires).getTime());
              if (this.expirationTime) {
                var ke = Date.now(), qe = !1;
                if (this.expirationTime > ke) qe = !1;
                else if (W) if (this.expirationTime < W) qe = !0;
                else {
                  var et = this.expirationTime - W;
                  et ? this.expirationTime = ke + Math.max(et, 3e4) : qe = !0;
                }
                else qe = !0;
                qe ? (this.expiredRequestCount++, this.state = "expired") : this.expiredRequestCount = 0;
              }
            }, Ul.prototype.getExpiryTimeout = function() {
              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);
            }, Ul.prototype.setFeatureState = function(N, W) {
              if (this.latestFeatureIndex && this.latestFeatureIndex.rawTileData && Object.keys(N).length !== 0) {
                var le = this.latestFeatureIndex.loadVTLayers();
                for (var ke in this.buckets) if (W.style.hasLayer(ke)) {
                  var qe = this.buckets[ke], et = qe.layers[0].sourceLayer || "_geojsonTileLayer", dt = le[et], Ct = N[et];
                  if (dt && Ct && Object.keys(Ct).length !== 0) {
                    qe.update(Ct, dt, this.imageAtlas && this.imageAtlas.patternPositions || {});
                    var Ut = W && W.style && W.style.getLayer(ke);
                    Ut && (this.queryPadding = Math.max(this.queryPadding, Ut.queryRadius(qe)));
                  }
                }
              }
            }, Ul.prototype.holdingForFade = function() {
              return this.symbolFadeHoldUntil !== void 0;
            }, Ul.prototype.symbolFadeFinished = function() {
              return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < de.now();
            }, Ul.prototype.clearFadeHold = function() {
              this.symbolFadeHoldUntil = void 0;
            }, Ul.prototype.setHoldDuration = function(N) {
              this.symbolFadeHoldUntil = de.now() + N;
            }, Ul.prototype.setDependencies = function(N, W) {
              for (var le = {}, ke = 0, qe = W; ke < qe.length; ke += 1) le[qe[ke]] = !0;
              this.dependencies[N] = le;
            }, Ul.prototype.hasDependency = function(N, W) {
              for (var le = 0, ke = N; le < ke.length; le += 1) {
                var qe = ke[le], et = this.dependencies[qe];
                if (et) {
                  for (var dt = 0, Ct = W; dt < Ct.length; dt += 1) if (et[Ct[dt]]) return !0;
                }
              }
              return !1;
            };
            var Wd = g.performance, k_ = function(N) {
              this._marks = { start: [N.url, "start"].join("#"), end: [N.url, "end"].join("#"), measure: N.url.toString() }, Wd.mark(this._marks.start);
            };
            k_.prototype.finish = function() {
              Wd.mark(this._marks.end);
              var N = Wd.getEntriesByName(this._marks.measure);
              return N.length === 0 && (Wd.measure(this._marks.measure, this._marks.start, this._marks.end), N = Wd.getEntriesByName(this._marks.measure), Wd.clearMarks(this._marks.start), Wd.clearMarks(this._marks.end), Wd.clearMeasures(this._marks.measure)), N;
            }, i.Actor = Yp, i.AlphaImage = $d, i.CanonicalTileID = _f, i.CollisionBoxArray = It, i.Color = Zn, i.DEMData = dd, i.DataConstantProperty = ni, i.DictionaryCoder = py, i.EXTENT = Hi, i.ErrorEvent = Ft, i.EvaluationParameters = ma, i.Event = Rt, i.Evented = lt, i.FeatureIndex = qh, i.FillBucket = hc, i.FillExtrusionBucket = bf, i.ImageAtlas = ly, i.ImagePosition = sy, i.LineBucket = dc, i.LngLat = Qo, i.LngLatBounds = zs, i.MercatorCoordinate = Gd, i.ONE_EM = cu, i.OverscaledTileID = sl, i.Point = f, i.Point$1 = f, i.Properties = Za, i.Protobuf = g2, i.RGBAImage = Pc, i.RequestManager = be, i.RequestPerformance = k_, i.ResourceType = Wt, i.SegmentVector = Yn, i.SourceFeatureState = sm, i.StructArrayLayout1ui2 = wt, i.StructArrayLayout2f1f2i16 = G, i.StructArrayLayout2i4 = it, i.StructArrayLayout3ui6 = fe, i.StructArrayLayout4i8 = bt, i.SymbolBucket = ao, i.Texture = Wp, i.Tile = Ul, i.Transitionable = bl, i.Uniform1f = Yi, i.Uniform1i = Li, i.Uniform2f = Gi, i.Uniform3f = ra, i.Uniform4f = wa, i.UniformColor = uo, i.UniformMatrix4f = Ko, i.UnwrappedTileID = __, i.ValidationError = Ot, i.WritingMode = pc, i.ZoomHistory = ju, i.add = function(N, W, le) {
              return N[0] = W[0] + le[0], N[1] = W[1] + le[1], N[2] = W[2] + le[2], N;
            }, i.addDynamicAttributes = A2, i.asyncAll = function(N, W, le) {
              if (!N.length) return le(null, []);
              var ke = N.length, qe = new Array(N.length), et = null;
              N.forEach(function(dt, Ct) {
                W(dt, function(Ut, tn) {
                  Ut && (et = Ut), qe[Ct] = tn, --ke == 0 && le(et, qe);
                });
              });
            }, i.bezier = x, i.bindAll = P, i.browser = de, i.cacheEntryPossiblyAdded = function(N) {
              ++$t > $e && (N.getActor().send("enforceCacheSizeLimit", Be), $t = 0);
            }, i.clamp = k, i.clearTileCache = function(N) {
              var W = g.caches.delete(_e);
              N && W.catch(N).then(function() {
                return N();
              });
            }, i.clipLine = fy, i.clone = function(N) {
              var W = new _u(16);
              return W[0] = N[0], W[1] = N[1], W[2] = N[2], W[3] = N[3], W[4] = N[4], W[5] = N[5], W[6] = N[6], W[7] = N[7], W[8] = N[8], W[9] = N[9], W[10] = N[10], W[11] = N[11], W[12] = N[12], W[13] = N[13], W[14] = N[14], W[15] = N[15], W;
            }, i.clone$1 = T, i.clone$2 = function(N) {
              var W = new _u(3);
              return W[0] = N[0], W[1] = N[1], W[2] = N[2], W;
            }, i.collisionCircleLayout = LA, i.config = ne, i.create = function() {
              var N = new _u(16);
              return _u != Float32Array && (N[1] = 0, N[2] = 0, N[3] = 0, N[4] = 0, N[6] = 0, N[7] = 0, N[8] = 0, N[9] = 0, N[11] = 0, N[12] = 0, N[13] = 0, N[14] = 0), N[0] = 1, N[5] = 1, N[10] = 1, N[15] = 1, N;
            }, i.create$1 = function() {
              var N = new _u(9);
              return _u != Float32Array && (N[1] = 0, N[2] = 0, N[3] = 0, N[5] = 0, N[6] = 0, N[7] = 0), N[0] = 1, N[4] = 1, N[8] = 1, N;
            }, i.create$2 = function() {
              var N = new _u(4);
              return _u != Float32Array && (N[1] = 0, N[2] = 0), N[0] = 1, N[3] = 1, N;
            }, i.createCommonjsModule = h, i.createExpression = ru, i.createLayout = He, i.createStyleLayer = function(N) {
              return N.type === "custom" ? new GA(N) : new M2[N.type](N);
            }, i.cross = function(N, W, le) {
              var ke = W[0], qe = W[1], et = W[2], dt = le[0], Ct = le[1], Ut = le[2];
              return N[0] = qe * Ut - et * Ct, N[1] = et * dt - ke * Ut, N[2] = ke * Ct - qe * dt, N;
            }, i.deepEqual = function N(W, le) {
              if (Array.isArray(W)) {
                if (!Array.isArray(le) || W.length !== le.length) return !1;
                for (var ke = 0; ke < W.length; ke++) if (!N(W[ke], le[ke])) return !1;
                return !0;
              }
              if (typeof W == "object" && W !== null && le !== null) {
                if (typeof le != "object" || Object.keys(W).length !== Object.keys(le).length) return !1;
                for (var qe in W) if (!N(W[qe], le[qe])) return !1;
                return !0;
              }
              return W === le;
            }, i.dot = function(N, W) {
              return N[0] * W[0] + N[1] * W[1] + N[2] * W[2];
            }, i.dot$1 = function(N, W) {
              return N[0] * W[0] + N[1] * W[1] + N[2] * W[2] + N[3] * W[3];
            }, i.ease = w, i.emitValidationErrors = os, i.endsWith = I, i.enforceCacheSizeLimit = function(N) {
              ct(), ge && ge.then(function(W) {
                W.keys().then(function(le) {
                  for (var ke = 0; ke < le.length - N; ke++) W.delete(le[ke]);
                });
              });
            }, i.evaluateSizeForFeature = h_, i.evaluateSizeForZoom = w5, i.evaluateVariableOffset = b1, i.evented = Vo, i.extend = A, i.featureFilter = Io, i.filterObject = O, i.fromRotation = function(N, W) {
              var le = Math.sin(W), ke = Math.cos(W);
              return N[0] = ke, N[1] = le, N[2] = 0, N[3] = -le, N[4] = ke, N[5] = 0, N[6] = 0, N[7] = 0, N[8] = 1, N;
            }, i.getAnchorAlignment = co, i.getAnchorJustification = $p, i.getArrayBuffer = Je, i.getImage = pt, i.getJSON = function(N, W) {
              return St(A(N, { type: "json" }), W);
            }, i.getRTLTextPluginStatus = Qu, i.getReferrer = at, i.getVideo = function(N, W) {
              var le, ke, qe = g.document.createElement("video");
              qe.muted = !0, qe.onloadstart = function() {
                W(null, qe);
              };
              for (var et = 0; et < N.length; et++) {
                var dt = g.document.createElement("source");
                le = N[et], ke = void 0, (ke = g.document.createElement("a")).href = le, ke.protocol === g.document.location.protocol && ke.host === g.document.location.host || (qe.crossOrigin = "Anonymous"), dt.src = N[et], qe.appendChild(dt);
              }
              return { cancel: function() {
              } };
            }, i.identity = qb, i.invert = function(N, W) {
              var le = W[0], ke = W[1], qe = W[2], et = W[3], dt = W[4], Ct = W[5], Ut = W[6], tn = W[7], nn = W[8], cn = W[9], vn = W[10], mn = W[11], On = W[12], Bn = W[13], ar = W[14], tr = W[15], xr = le * Ct - ke * dt, _r = le * Ut - qe * dt, Lr = le * tn - et * dt, Ur = ke * Ut - qe * Ct, $r = ke * tn - et * Ct, ai = qe * tn - et * Ut, Hr = nn * Bn - cn * On, hi = nn * ar - vn * On, Ti = nn * tr - mn * On, ta = cn * ar - vn * Bn, zi = cn * tr - mn * Bn, Ki = vn * tr - mn * ar, $i = xr * Ki - _r * zi + Lr * ta + Ur * Ti - $r * hi + ai * Hr;
              return $i ? ($i = 1 / $i, N[0] = (Ct * Ki - Ut * zi + tn * ta) * $i, N[1] = (qe * zi - ke * Ki - et * ta) * $i, N[2] = (Bn * ai - ar * $r + tr * Ur) * $i, N[3] = (vn * $r - cn * ai - mn * Ur) * $i, N[4] = (Ut * Ti - dt * Ki - tn * hi) * $i, N[5] = (le * Ki - qe * Ti + et * hi) * $i, N[6] = (ar * Lr - On * ai - tr * _r) * $i, N[7] = (nn * ai - vn * Lr + mn * _r) * $i, N[8] = (dt * zi - Ct * Ti + tn * Hr) * $i, N[9] = (ke * Ti - le * zi - et * Hr) * $i, N[10] = (On * $r - Bn * Lr + tr * xr) * $i, N[11] = (cn * Lr - nn * $r - mn * xr) * $i, N[12] = (Ct * hi - dt * ta - Ut * Hr) * $i, N[13] = (le * ta - ke * hi + qe * Hr) * $i, N[14] = (Bn * _r - On * Ur - ar * xr) * $i, N[15] = (nn * Ur - cn * _r + vn * xr) * $i, N) : null;
            }, i.isChar = ti, i.isMapboxURL = Ae, i.keysDifference = function(N, W) {
              var le = [];
              for (var ke in N) ke in W || le.push(ke);
              return le;
            }, i.makeRequest = St, i.mapObject = M, i.mercatorXfromLng = F5, i.mercatorYfromLat = N5, i.mercatorZfromAltitude = B5, i.mul = Bl, i.multiply = Hb, i.mvt = cs, i.nextPowerOfTwo = function(N) {
              return N <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(N) / Math.LN2));
            }, i.normalize = function(N, W) {
              var le = W[0], ke = W[1], qe = W[2], et = le * le + ke * ke + qe * qe;
              return et > 0 && (et = 1 / Math.sqrt(et)), N[0] = W[0] * et, N[1] = W[1] * et, N[2] = W[2] * et, N;
            }, i.number = si, i.offscreenCanvasSupported = Gt, i.ortho = function(N, W, le, ke, qe, et, dt) {
              var Ct = 1 / (W - le), Ut = 1 / (ke - qe), tn = 1 / (et - dt);
              return N[0] = -2 * Ct, N[1] = 0, N[2] = 0, N[3] = 0, N[4] = 0, N[5] = -2 * Ut, N[6] = 0, N[7] = 0, N[8] = 0, N[9] = 0, N[10] = 2 * tn, N[11] = 0, N[12] = (W + le) * Ct, N[13] = (qe + ke) * Ut, N[14] = (dt + et) * tn, N[15] = 1, N;
            }, i.parseGlyphPBF = function(N) {
              return new g2(N).readFields(nF, []);
            }, i.pbf = g2, i.performSymbolLayout = function(N, W, le, ke, qe, et, dt) {
              N.createArrays();
              var Ct = 512 * N.overscaling;
              N.tilePixelRatio = Hi / Ct, N.compareText = {}, N.iconsNeedLinear = !1;
              var Ut = N.layers[0].layout, tn = N.layers[0]._unevaluatedLayout._values, nn = {};
              if (N.textSizeData.kind === "composite") {
                var cn = N.textSizeData, vn = cn.minZoom, mn = cn.maxZoom;
                nn.compositeTextSizes = [tn["text-size"].possiblyEvaluate(new ma(vn), dt), tn["text-size"].possiblyEvaluate(new ma(mn), dt)];
              }
              if (N.iconSizeData.kind === "composite") {
                var On = N.iconSizeData, Bn = On.minZoom, ar = On.maxZoom;
                nn.compositeIconSizes = [tn["icon-size"].possiblyEvaluate(new ma(Bn), dt), tn["icon-size"].possiblyEvaluate(new ma(ar), dt)];
              }
              nn.layoutTextSize = tn["text-size"].possiblyEvaluate(new ma(N.zoom + 1), dt), nn.layoutIconSize = tn["icon-size"].possiblyEvaluate(new ma(N.zoom + 1), dt), nn.textMaxSize = tn["text-size"].possiblyEvaluate(new ma(18));
              for (var tr = Ut.get("text-line-height") * cu, xr = Ut.get("text-rotation-alignment") === "map" && Ut.get("symbol-placement") !== "point", _r = Ut.get("text-keep-upright"), Lr = Ut.get("text-size"), Ur = function() {
                var Hr = ai[$r], hi = Ut.get("text-font").evaluate(Hr, {}, dt).join(","), Ti = Lr.evaluate(Hr, {}, dt), ta = nn.layoutTextSize.evaluate(Hr, {}, dt), zi = nn.layoutIconSize.evaluate(Hr, {}, dt), Ki = { horizontal: {}, vertical: void 0 }, $i = Hr.text, Ii = [0, 0];
                if ($i) {
                  var za = $i.toString(), ga = Ut.get("text-letter-spacing").evaluate(Hr, {}, dt) * cu, fo = function(Oe) {
                    for (var Xe = 0, rt = Oe; Xe < rt.length; Xe += 1) if (yt = rt[Xe].charCodeAt(0), ti.Arabic(yt) || ti["Arabic Supplement"](yt) || ti["Arabic Extended-A"](yt) || ti["Arabic Presentation Forms-A"](yt) || ti["Arabic Presentation Forms-B"](yt)) return !1;
                    var yt;
                    return !0;
                  }(za) ? ga : 0, Wi = Ut.get("text-anchor").evaluate(Hr, {}, dt), Xa = Ut.get("text-variable-anchor");
                  if (!Xa) {
                    var bo = Ut.get("text-radial-offset").evaluate(Hr, {}, dt);
                    Ii = bo ? b1(Wi, [bo * cu, om]) : Ut.get("text-offset").evaluate(Hr, {}, dt).map(function(Oe) {
                      return Oe * cu;
                    });
                  }
                  var oo = xr ? "center" : Ut.get("text-justify").evaluate(Hr, {}, dt), _o = Ut.get("symbol-placement"), ho = _o === "point" ? Ut.get("text-max-width").evaluate(Hr, {}, dt) * cu : 0, qs = function() {
                    N.allowVerticalPlacement && js(za) && (Ki.vertical = x2($i, W, le, qe, hi, ho, tr, Wi, "left", fo, Ii, pc.vertical, !0, _o, ta, Ti));
                  };
                  if (!xr && Xa) {
                    for (var Oo = oo === "auto" ? Xa.map(function(Oe) {
                      return $p(Oe);
                    }) : [oo], Hs = !1, fu = 0; fu < Oo.length; fu++) {
                      var Vl = Oo[fu];
                      if (!Ki.horizontal[Vl]) if (Hs) Ki.horizontal[Vl] = Ki.horizontal[0];
                      else {
                        var Vu = x2($i, W, le, qe, hi, ho, tr, "center", Vl, fo, Ii, pc.horizontal, !1, _o, ta, Ti);
                        Vu && (Ki.horizontal[Vl] = Vu, Hs = Vu.positionedLines.length === 1);
                      }
                    }
                    qs();
                  } else {
                    oo === "auto" && (oo = $p(Wi));
                    var ku = x2($i, W, le, qe, hi, ho, tr, Wi, oo, fo, Ii, pc.horizontal, !1, _o, ta, Ti);
                    ku && (Ki.horizontal[oo] = ku), qs(), js(za) && xr && _r && (Ki.vertical = x2($i, W, le, qe, hi, ho, tr, Wi, oo, fo, Ii, pc.vertical, !1, _o, ta, Ti));
                  }
                }
                var J = void 0, H = !1;
                if (Hr.icon && Hr.icon.name) {
                  var oe = ke[Hr.icon.name];
                  oe && (J = function(Oe, Xe, rt) {
                    var yt = co(rt), Tt = yt.horizontalAlign, Nt = yt.verticalAlign, Vt = Xe[0], Kt = Xe[1], an = Vt - Oe.displaySize[0] * Tt, hn = an + Oe.displaySize[0], kn = Kt - Oe.displaySize[1] * Nt;
                    return { image: Oe, top: kn, bottom: kn + Oe.displaySize[1], left: an, right: hn };
                  }(qe[Hr.icon.name], Ut.get("icon-offset").evaluate(Hr, {}, dt), Ut.get("icon-anchor").evaluate(Hr, {}, dt)), H = oe.sdf, N.sdfIcons === void 0 ? N.sdfIcons = oe.sdf : N.sdfIcons !== oe.sdf && F("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (oe.pixelRatio !== N.pixelRatio || Ut.get("icon-rotate").constantOr(1) !== 0) && (N.iconsNeedLinear = !0));
                }
                var ve = I5(Ki.horizontal) || Ki.vertical;
                N.iconsInText = !!ve && ve.iconsInText, (ve || J) && function(Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn) {
                  var xn = Nt.textMaxSize.evaluate(Xe, {});
                  xn === void 0 && (xn = Vt);
                  var Fn, qn = Oe.layers[0].layout, vr = qn.get("icon-offset").evaluate(Xe, {}, kn), rr = I5(rt.horizontal), dr = 24, jr = Vt / dr, oi = Oe.tilePixelRatio * jr, Ai = Oe.tilePixelRatio * xn / dr, Ui = Oe.tilePixelRatio * Kt, _i = Oe.tilePixelRatio * qn.get("symbol-spacing"), fi = qn.get("text-padding") * Oe.tilePixelRatio, Bi = qn.get("icon-padding") * Oe.tilePixelRatio, Ei = qn.get("text-max-angle") / 180 * Math.PI, ki = qn.get("text-rotation-alignment") === "map" && qn.get("symbol-placement") !== "point", Gr = qn.get("icon-rotation-alignment") === "map" && qn.get("symbol-placement") !== "point", Di = qn.get("symbol-placement"), Pi = _i / 2, Qi = qn.get("icon-text-fit");
                  yt && Qi !== "none" && (Oe.allowVerticalPlacement && rt.vertical && (Fn = f_(yt, rt.vertical, Qi, qn.get("icon-text-fit-padding"), vr, jr)), rr && (yt = f_(yt, rr, Qi, qn.get("icon-text-fit-padding"), vr, jr)));
                  var Ka = function(kf, $l) {
                    $l.x < 0 || $l.x >= Hi || $l.y < 0 || $l.y >= Hi || function(Wa, ts, Wf, xh, L2, T_, gy, bh, T1, Yf, yy, vy, A_, j5, xy, U5, V5, $5, q5, H5, ul, lm, S_, pd, WA) {
                      var G5, kl, Su, _h, Rc, wh = Wa.addToLineVertexArray(ts, Wf), md = 0, M_ = 0, rF = 0, iF = 0, YA = -1, ZA = -1, um = {}, aF = fr(""), XA = 0, KA = 0;
                      if (bh._unevaluatedLayout.getValue("text-radial-offset") === void 0 ? (XA = (G5 = bh.layout.get("text-offset").evaluate(ul, {}, pd).map(function(C_) {
                        return C_ * cu;
                      }))[0], KA = G5[1]) : (XA = bh.layout.get("text-radial-offset").evaluate(ul, {}, pd) * cu, KA = om), Wa.allowVerticalPlacement && xh.vertical) {
                        var oF = bh.layout.get("text-rotate").evaluate(ul, {}, pd) + 90, wae = xh.vertical;
                        _h = new T2(T1, ts, Yf, yy, vy, wae, A_, j5, xy, oF), gy && (Rc = new T2(T1, ts, Yf, yy, vy, gy, V5, $5, xy, oF));
                      }
                      if (L2) {
                        var JA = bh.layout.get("icon-rotate").evaluate(ul, {}), sF = bh.layout.get("icon-text-fit") !== "none", lF = d_(L2, JA, S_, sF), QA = gy ? d_(gy, JA, S_, sF) : void 0;
                        Su = new T2(T1, ts, Yf, yy, vy, L2, V5, $5, !1, JA), md = 4 * lF.length;
                        var uF = Wa.iconSizeData, E_ = null;
                        uF.kind === "source" ? (E_ = [Uu * bh.layout.get("icon-size").evaluate(ul, {})])[0] > $h && F(Wa.layerIds[0] + ': Value for "icon-size" is >= ' + qp + '. Reduce your "icon-size".') : uF.kind === "composite" && ((E_ = [Uu * lm.compositeIconSizes[0].evaluate(ul, {}, pd), Uu * lm.compositeIconSizes[1].evaluate(ul, {}, pd)])[0] > $h || E_[1] > $h) && F(Wa.layerIds[0] + ': Value for "icon-size" is >= ' + qp + '. Reduce your "icon-size".'), Wa.addSymbols(Wa.icon, lF, E_, H5, q5, ul, !1, ts, wh.lineStartIndex, wh.lineLength, -1, pd), YA = Wa.icon.placedSymbolArray.length - 1, QA && (M_ = 4 * QA.length, Wa.addSymbols(Wa.icon, QA, E_, H5, q5, ul, pc.vertical, ts, wh.lineStartIndex, wh.lineLength, -1, pd), ZA = Wa.icon.placedSymbolArray.length - 1);
                      }
                      for (var cF in xh.horizontal) {
                        var W5 = xh.horizontal[cF];
                        if (!kl) {
                          aF = fr(W5.text);
                          var kae = bh.layout.get("text-rotate").evaluate(ul, {}, pd);
                          kl = new T2(T1, ts, Yf, yy, vy, W5, A_, j5, xy, kae);
                        }
                        var fF = W5.positionedLines.length === 1;
                        if (rF += C5(Wa, ts, W5, T_, bh, xy, ul, U5, wh, xh.vertical ? pc.horizontal : pc.horizontalOnly, fF ? Object.keys(xh.horizontal) : [cF], um, YA, lm, pd), fF) break;
                      }
                      xh.vertical && (iF += C5(Wa, ts, xh.vertical, T_, bh, xy, ul, U5, wh, pc.vertical, ["vertical"], um, ZA, lm, pd));
                      var Tae = kl ? kl.boxStartIndex : Wa.collisionBoxArray.length, Aae = kl ? kl.boxEndIndex : Wa.collisionBoxArray.length, Sae = _h ? _h.boxStartIndex : Wa.collisionBoxArray.length, Mae = _h ? _h.boxEndIndex : Wa.collisionBoxArray.length, Eae = Su ? Su.boxStartIndex : Wa.collisionBoxArray.length, Cae = Su ? Su.boxEndIndex : Wa.collisionBoxArray.length, Iae = Rc ? Rc.boxStartIndex : Wa.collisionBoxArray.length, Dae = Rc ? Rc.boxEndIndex : Wa.collisionBoxArray.length, Zp = -1, Y5 = function(C_, dF) {
                        return C_ && C_.circleDiameter ? Math.max(C_.circleDiameter, dF) : dF;
                      };
                      Zp = Y5(kl, Zp), Zp = Y5(_h, Zp), Zp = Y5(Su, Zp);
                      var hF = (Zp = Y5(Rc, Zp)) > -1 ? 1 : 0;
                      hF && (Zp *= WA / cu), Wa.glyphOffsetArray.length >= ao.MAX_GLYPHS && F("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), ul.sortKey !== void 0 && Wa.addToSortKeyRanges(Wa.symbolInstances.length, ul.sortKey), Wa.symbolInstances.emplaceBack(ts.x, ts.y, um.right >= 0 ? um.right : -1, um.center >= 0 ? um.center : -1, um.left >= 0 ? um.left : -1, um.vertical || -1, YA, ZA, aF, Tae, Aae, Sae, Mae, Eae, Cae, Iae, Dae, Yf, rF, iF, md, M_, hF, 0, A_, XA, KA, Zp);
                    }(Oe, $l, kf, rt, yt, Tt, Fn, Oe.layers[0], Oe.collisionBoxArray, Xe.index, Xe.sourceLayerIndex, Oe.index, oi, fi, ki, an, Ui, Bi, Gr, vr, Xe, Nt, hn, kn, Vt);
                  };
                  if (Di === "line") for (var Ja = 0, Gs = fy(Xe.geometry, 0, 0, Hi, Hi); Ja < Gs.length; Ja += 1) for (var mc = Gs[Ja], _l = 0, ll = $A(mc, _i, Ei, rt.vertical || rr, yt, dr, Ai, Oe.overscaling, Hi); _l < ll.length; _l += 1) {
                    var rc = ll[_l];
                    rr && D5(Oe, rr.text, Pi, rc) || Ka(mc, rc);
                  }
                  else if (Di === "line-center") for (var Tu = 0, Ss = Xe.geometry; Tu < Ss.length; Tu += 1) {
                    var fs = Ss[Tu];
                    if (fs.length > 1) {
                      var hu = VA(fs, Ei, rt.vertical || rr, yt, dr, Ai);
                      hu && Ka(fs, hu);
                    }
                  }
                  else if (Xe.type === "Polygon") for (var Ws = 0, wl = i5(Xe.geometry, 0); Ws < wl.length; Ws += 1) {
                    var Au = wl[Ws], gc = rf(Au, 16);
                    Ka(Au[0], new rm(gc.x, gc.y, 0));
                  }
                  else if (Xe.type === "LineString") for (var $u = 0, Ms = Xe.geometry; $u < Ms.length; $u += 1) {
                    var Gf = Ms[$u];
                    Ka(Gf, new rm(Gf[0].x, Gf[0].y, 0));
                  }
                  else if (Xe.type === "Point") for (var es = 0, hs = Xe.geometry; es < hs.length; es += 1) for (var ds = 0, ps = hs[es]; ds < ps.length; ds += 1) {
                    var Yd = ps[ds];
                    Ka([Yd], new rm(Yd.x, Yd.y, 0));
                  }
                }(N, Hr, Ki, J, ke, nn, ta, zi, Ii, H, dt);
              }, $r = 0, ai = N.features; $r < ai.length; $r += 1) Ur();
              et && N.generateCollisionDebugBuffers();
            }, i.perspective = function(N, W, le, ke, qe) {
              var et, dt = 1 / Math.tan(W / 2);
              return N[0] = dt / le, N[1] = 0, N[2] = 0, N[3] = 0, N[4] = 0, N[5] = dt, N[6] = 0, N[7] = 0, N[8] = 0, N[9] = 0, N[11] = -1, N[12] = 0, N[13] = 0, N[15] = 0, qe != null && qe !== 1 / 0 ? (et = 1 / (ke - qe), N[10] = (qe + ke) * et, N[14] = 2 * qe * ke * et) : (N[10] = -1, N[14] = -2 * ke), N;
            }, i.pick = function(N, W) {
              for (var le = {}, ke = 0; ke < W.length; ke++) {
                var qe = W[ke];
                qe in N && (le[qe] = N[qe]);
              }
              return le;
            }, i.plugin = ls, i.polygonIntersectsPolygon = gh, i.postMapLoadEvent = tt, i.postTurnstileEvent = je, i.potpack = v2, i.refProperties = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"], i.register = xi, i.registerForPluginStateChange = function(N) {
              return N({ pluginStatus: xa, pluginURL: vo }), Vo.on("pluginStateChange", N), N;
            }, i.renderColorRamp = Kb, i.rotate = function(N, W, le) {
              var ke = W[0], qe = W[1], et = W[2], dt = W[3], Ct = Math.sin(le), Ut = Math.cos(le);
              return N[0] = ke * Ut + et * Ct, N[1] = qe * Ut + dt * Ct, N[2] = ke * -Ct + et * Ut, N[3] = qe * -Ct + dt * Ut, N;
            }, i.rotateX = function(N, W, le) {
              var ke = Math.sin(le), qe = Math.cos(le), et = W[4], dt = W[5], Ct = W[6], Ut = W[7], tn = W[8], nn = W[9], cn = W[10], vn = W[11];
              return W !== N && (N[0] = W[0], N[1] = W[1], N[2] = W[2], N[3] = W[3], N[12] = W[12], N[13] = W[13], N[14] = W[14], N[15] = W[15]), N[4] = et * qe + tn * ke, N[5] = dt * qe + nn * ke, N[6] = Ct * qe + cn * ke, N[7] = Ut * qe + vn * ke, N[8] = tn * qe - et * ke, N[9] = nn * qe - dt * ke, N[10] = cn * qe - Ct * ke, N[11] = vn * qe - Ut * ke, N;
            }, i.rotateZ = function(N, W, le) {
              var ke = Math.sin(le), qe = Math.cos(le), et = W[0], dt = W[1], Ct = W[2], Ut = W[3], tn = W[4], nn = W[5], cn = W[6], vn = W[7];
              return W !== N && (N[8] = W[8], N[9] = W[9], N[10] = W[10], N[11] = W[11], N[12] = W[12], N[13] = W[13], N[14] = W[14], N[15] = W[15]), N[0] = et * qe + tn * ke, N[1] = dt * qe + nn * ke, N[2] = Ct * qe + cn * ke, N[3] = Ut * qe + vn * ke, N[4] = tn * qe - et * ke, N[5] = nn * qe - dt * ke, N[6] = cn * qe - Ct * ke, N[7] = vn * qe - Ut * ke, N;
            }, i.scale = function(N, W, le) {
              var ke = le[0], qe = le[1], et = le[2];
              return N[0] = W[0] * ke, N[1] = W[1] * ke, N[2] = W[2] * ke, N[3] = W[3] * ke, N[4] = W[4] * qe, N[5] = W[5] * qe, N[6] = W[6] * qe, N[7] = W[7] * qe, N[8] = W[8] * et, N[9] = W[9] * et, N[10] = W[10] * et, N[11] = W[11] * et, N[12] = W[12], N[13] = W[13], N[14] = W[14], N[15] = W[15], N;
            }, i.scale$1 = function(N, W, le) {
              return N[0] = W[0] * le, N[1] = W[1] * le, N[2] = W[2] * le, N[3] = W[3] * le, N;
            }, i.scale$2 = function(N, W, le) {
              return N[0] = W[0] * le, N[1] = W[1] * le, N[2] = W[2] * le, N;
            }, i.setCacheLimits = function(N, W) {
              Be = N, $e = W;
            }, i.setRTLTextPlugin = function(N, W, le) {
              if (le === void 0 && (le = !1), xa === iu || xa === tl || xa === Os) throw new Error("setRTLTextPlugin cannot be called multiple times.");
              vo = de.resolveURL(N), xa = iu, di = W, nl(), le || li();
            }, i.sphericalToCartesian = function(N) {
              var W = N[0], le = N[1], ke = N[2];
              return le += 90, le *= Math.PI / 180, ke *= Math.PI / 180, { x: W * Math.cos(le) * Math.sin(ke), y: W * Math.sin(le) * Math.sin(ke), z: W * Math.cos(ke) };
            }, i.sqrLen = J0, i.styleSpec = st, i.sub = J4, i.symbolSize = UA, i.transformMat3 = function(N, W, le) {
              var ke = W[0], qe = W[1], et = W[2];
              return N[0] = ke * le[0] + qe * le[3] + et * le[6], N[1] = ke * le[1] + qe * le[4] + et * le[7], N[2] = ke * le[2] + qe * le[5] + et * le[8], N;
            }, i.transformMat4 = cd, i.translate = function(N, W, le) {
              var ke, qe, et, dt, Ct, Ut, tn, nn, cn, vn, mn, On, Bn = le[0], ar = le[1], tr = le[2];
              return W === N ? (N[12] = W[0] * Bn + W[4] * ar + W[8] * tr + W[12], N[13] = W[1] * Bn + W[5] * ar + W[9] * tr + W[13], N[14] = W[2] * Bn + W[6] * ar + W[10] * tr + W[14], N[15] = W[3] * Bn + W[7] * ar + W[11] * tr + W[15]) : (ke = W[0], qe = W[1], et = W[2], dt = W[3], Ct = W[4], Ut = W[5], tn = W[6], nn = W[7], cn = W[8], vn = W[9], mn = W[10], On = W[11], N[0] = ke, N[1] = qe, N[2] = et, N[3] = dt, N[4] = Ct, N[5] = Ut, N[6] = tn, N[7] = nn, N[8] = cn, N[9] = vn, N[10] = mn, N[11] = On, N[12] = ke * Bn + Ct * ar + cn * tr + W[12], N[13] = qe * Bn + Ut * ar + vn * tr + W[13], N[14] = et * Bn + tn * ar + mn * tr + W[14], N[15] = dt * Bn + nn * ar + On * tr + W[15]), N;
            }, i.triggerPluginCompletionEvent = Ts, i.uniqueId = D, i.validateCustomStyleLayer = function(N) {
              var W = [], le = N.id;
              return le === void 0 && W.push({ message: "layers." + le + ': missing required property "id"' }), N.render === void 0 && W.push({ message: "layers." + le + ': missing required method "render"' }), N.renderingMode && N.renderingMode !== "2d" && N.renderingMode !== "3d" && W.push({ message: "layers." + le + ': property "renderingMode" must be either "2d" or "3d"' }), W;
            }, i.validateLight = Dl, i.validateStyle = jo, i.values = function(N) {
              var W = [];
              for (var le in N) W.push(N[le]);
              return W;
            }, i.vectorTile = cs, i.version = p, i.warnOnce = F, i.webpSupported = ae, i.window = g, i.wrap = S;
          }), u(0, function(i) {
            function h(ot) {
              var Ye = typeof ot;
              if (Ye === "number" || Ye === "boolean" || Ye === "string" || ot == null) return JSON.stringify(ot);
              if (Array.isArray(ot)) {
                for (var Fe = "[", pt = 0, Mt = ot; pt < Mt.length; pt += 1) Fe += h(Mt[pt]) + ",";
                return Fe + "]";
              }
              for (var At = Object.keys(ot).sort(), Rt = "{", Ft = 0; Ft < At.length; Ft++) Rt += JSON.stringify(At[Ft]) + ":" + h(ot[At[Ft]]) + ",";
              return Rt + "}";
            }
            function p(ot) {
              for (var Ye = "", Fe = 0, pt = i.refProperties; Fe < pt.length; Fe += 1) Ye += "/" + h(ot[pt[Fe]]);
              return Ye;
            }
            var _ = function(ot) {
              this.keyCache = {}, ot && this.replace(ot);
            };
            _.prototype.replace = function(ot) {
              this._layerConfigs = {}, this._layers = {}, this.update(ot, []);
            }, _.prototype.update = function(ot, Ye) {
              for (var Fe = this, pt = 0, Mt = ot; pt < Mt.length; pt += 1) {
                var At = Mt[pt];
                this._layerConfigs[At.id] = At;
                var Rt = this._layers[At.id] = i.createStyleLayer(At);
                Rt._featureFilter = i.featureFilter(Rt.filter), this.keyCache[At.id] && delete this.keyCache[At.id];
              }
              for (var Ft = 0, lt = Ye; Ft < lt.length; Ft += 1) {
                var st = lt[Ft];
                delete this.keyCache[st], delete this._layerConfigs[st], delete this._layers[st];
              }
              this.familiesBySource = {};
              for (var Ot = 0, kt = function(Ht, sn) {
                for (var fn = {}, In = 0; In < Ht.length; In++) {
                  var zn = sn && sn[Ht[In].id] || p(Ht[In]);
                  sn && (sn[Ht[In].id] = zn);
                  var Cn = fn[zn];
                  Cn || (Cn = fn[zn] = []), Cn.push(Ht[In]);
                }
                var gn = [];
                for (var Mn in fn) gn.push(fn[Mn]);
                return gn;
              }(i.values(this._layerConfigs), this.keyCache); Ot < kt.length; Ot += 1) {
                var Bt = kt[Ot].map(function(Ht) {
                  return Fe._layers[Ht.id];
                }), xt = Bt[0];
                if (xt.visibility !== "none") {
                  var Jt = xt.source || "", qt = this.familiesBySource[Jt];
                  qt || (qt = this.familiesBySource[Jt] = {});
                  var en = xt.sourceLayer || "_geojsonTileLayer", Yt = qt[en];
                  Yt || (Yt = qt[en] = []), Yt.push(Bt);
                }
              }
            };
            var d = function(ot) {
              var Ye = {}, Fe = [];
              for (var pt in ot) {
                var Mt = ot[pt], At = Ye[pt] = {};
                for (var Rt in Mt) {
                  var Ft = Mt[+Rt];
                  if (Ft && Ft.bitmap.width !== 0 && Ft.bitmap.height !== 0) {
                    var lt = { x: 0, y: 0, w: Ft.bitmap.width + 2, h: Ft.bitmap.height + 2 };
                    Fe.push(lt), At[Rt] = { rect: lt, metrics: Ft.metrics };
                  }
                }
              }
              var st = i.potpack(Fe), Ot = st.w, kt = st.h, Bt = new i.AlphaImage({ width: Ot || 1, height: kt || 1 });
              for (var xt in ot) {
                var Jt = ot[xt];
                for (var qt in Jt) {
                  var en = Jt[+qt];
                  if (en && en.bitmap.width !== 0 && en.bitmap.height !== 0) {
                    var Yt = Ye[xt][qt].rect;
                    i.AlphaImage.copy(en.bitmap, Bt, { x: 0, y: 0 }, { x: Yt.x + 1, y: Yt.y + 1 }, en.bitmap);
                  }
                }
              }
              this.image = Bt, this.positions = Ye;
            };
            i.register("GlyphAtlas", d);
            var f = function(ot) {
              this.tileID = new i.OverscaledTileID(ot.tileID.overscaledZ, ot.tileID.wrap, ot.tileID.canonical.z, ot.tileID.canonical.x, ot.tileID.canonical.y), this.uid = ot.uid, this.zoom = ot.zoom, this.pixelRatio = ot.pixelRatio, this.tileSize = ot.tileSize, this.source = ot.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = ot.showCollisionBoxes, this.collectResourceTiming = !!ot.collectResourceTiming, this.returnDependencies = !!ot.returnDependencies, this.promoteId = ot.promoteId;
            };
            function c(ot, Ye, Fe) {
              for (var pt = new i.EvaluationParameters(Ye), Mt = 0, At = ot; Mt < At.length; Mt += 1) At[Mt].recalculate(pt, Fe);
            }
            function g(ot, Ye) {
              var Fe = i.getArrayBuffer(ot.request, function(pt, Mt, At, Rt) {
                pt ? Ye(pt) : Mt && Ye(null, { vectorTile: new i.vectorTile.VectorTile(new i.pbf(Mt)), rawData: Mt, cacheControl: At, expires: Rt });
              });
              return function() {
                Fe.cancel(), Ye();
              };
            }
            f.prototype.parse = function(ot, Ye, Fe, pt, Mt) {
              var At = this;
              this.status = "parsing", this.data = ot, this.collisionBoxArray = new i.CollisionBoxArray();
              var Rt = new i.DictionaryCoder(Object.keys(ot.layers).sort()), Ft = new i.FeatureIndex(this.tileID, this.promoteId);
              Ft.bucketLayerIDs = [];
              var lt, st, Ot, kt, Bt = {}, xt = { featureIndex: Ft, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: Fe }, Jt = Ye.familiesBySource[this.source];
              for (var qt in Jt) {
                var en = ot.layers[qt];
                if (en) {
                  en.version === 1 && i.warnOnce('Vector tile source "' + this.source + '" layer "' + qt + '" does not use vector tile spec v2 and therefore may have some rendering errors.');
                  for (var Yt = Rt.encode(qt), Ht = [], sn = 0; sn < en.length; sn++) {
                    var fn = en.feature(sn), In = Ft.getId(fn, qt);
                    Ht.push({ feature: fn, id: In, index: sn, sourceLayerIndex: Yt });
                  }
                  for (var zn = 0, Cn = Jt[qt]; zn < Cn.length; zn += 1) {
                    var gn = Cn[zn], Mn = gn[0];
                    Mn.minzoom && this.zoom < Math.floor(Mn.minzoom) || Mn.maxzoom && this.zoom >= Mn.maxzoom || Mn.visibility !== "none" && (c(gn, this.zoom, Fe), (Bt[Mn.id] = Mn.createBucket({ index: Ft.bucketLayerIDs.length, layers: gn, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Yt, sourceID: this.source })).populate(Ht, xt, this.tileID.canonical), Ft.bucketLayerIDs.push(gn.map(function(_n) {
                      return _n.id;
                    })));
                  }
                }
              }
              var Xn = i.mapObject(xt.glyphDependencies, function(_n) {
                return Object.keys(_n).map(Number);
              });
              Object.keys(Xn).length ? pt.send("getGlyphs", { uid: this.uid, stacks: Xn }, function(_n, En) {
                lt || (lt = _n, st = En, Rn.call(At));
              }) : st = {};
              var Pn = Object.keys(xt.iconDependencies);
              Pn.length ? pt.send("getImages", { icons: Pn, source: this.source, tileID: this.tileID, type: "icons" }, function(_n, En) {
                lt || (lt = _n, Ot = En, Rn.call(At));
              }) : Ot = {};
              var wn = Object.keys(xt.patternDependencies);
              function Rn() {
                if (lt) return Mt(lt);
                if (st && Ot && kt) {
                  var _n = new d(st), En = new i.ImageAtlas(Ot, kt);
                  for (var Kn in Bt) {
                    var Wn = Bt[Kn];
                    Wn instanceof i.SymbolBucket ? (c(Wn.layers, this.zoom, Fe), i.performSymbolLayout(Wn, st, _n.positions, Ot, En.iconPositions, this.showCollisionBoxes, this.tileID.canonical)) : Wn.hasPattern && (Wn instanceof i.LineBucket || Wn instanceof i.FillBucket || Wn instanceof i.FillExtrusionBucket) && (c(Wn.layers, this.zoom, Fe), Wn.addFeatures(xt, this.tileID.canonical, En.patternPositions));
                  }
                  this.status = "done", Mt(null, { buckets: i.values(Bt).filter(function(hr) {
                    return !hr.isEmpty();
                  }), featureIndex: Ft, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: _n.image, imageAtlas: En, glyphMap: this.returnDependencies ? st : null, iconMap: this.returnDependencies ? Ot : null, glyphPositions: this.returnDependencies ? _n.positions : null });
                }
              }
              wn.length ? pt.send("getImages", { icons: wn, source: this.source, tileID: this.tileID, type: "patterns" }, function(_n, En) {
                lt || (lt = _n, kt = En, Rn.call(At));
              }) : kt = {}, Rn.call(this);
            };
            var m = function(ot, Ye, Fe, pt) {
              this.actor = ot, this.layerIndex = Ye, this.availableImages = Fe, this.loadVectorData = pt || g, this.loading = {}, this.loaded = {};
            };
            m.prototype.loadTile = function(ot, Ye) {
              var Fe = this, pt = ot.uid;
              this.loading || (this.loading = {});
              var Mt = !!(ot && ot.request && ot.request.collectResourceTiming) && new i.RequestPerformance(ot.request), At = this.loading[pt] = new f(ot);
              At.abort = this.loadVectorData(ot, function(Rt, Ft) {
                if (delete Fe.loading[pt], Rt || !Ft) return At.status = "done", Fe.loaded[pt] = At, Ye(Rt);
                var lt = Ft.rawData, st = {};
                Ft.expires && (st.expires = Ft.expires), Ft.cacheControl && (st.cacheControl = Ft.cacheControl);
                var Ot = {};
                if (Mt) {
                  var kt = Mt.finish();
                  kt && (Ot.resourceTiming = JSON.parse(JSON.stringify(kt)));
                }
                At.vectorTile = Ft.vectorTile, At.parse(Ft.vectorTile, Fe.layerIndex, Fe.availableImages, Fe.actor, function(Bt, xt) {
                  if (Bt || !xt) return Ye(Bt);
                  Ye(null, i.extend({ rawTileData: lt.slice(0) }, xt, st, Ot));
                }), Fe.loaded = Fe.loaded || {}, Fe.loaded[pt] = At;
              });
            }, m.prototype.reloadTile = function(ot, Ye) {
              var Fe = this, pt = this.loaded, Mt = ot.uid, At = this;
              if (pt && pt[Mt]) {
                var Rt = pt[Mt];
                Rt.showCollisionBoxes = ot.showCollisionBoxes;
                var Ft = function(lt, st) {
                  var Ot = Rt.reloadCallback;
                  Ot && (delete Rt.reloadCallback, Rt.parse(Rt.vectorTile, At.layerIndex, Fe.availableImages, At.actor, Ot)), Ye(lt, st);
                };
                Rt.status === "parsing" ? Rt.reloadCallback = Ft : Rt.status === "done" && (Rt.vectorTile ? Rt.parse(Rt.vectorTile, this.layerIndex, this.availableImages, this.actor, Ft) : Ft());
              }
            }, m.prototype.abortTile = function(ot, Ye) {
              var Fe = this.loading, pt = ot.uid;
              Fe && Fe[pt] && Fe[pt].abort && (Fe[pt].abort(), delete Fe[pt]), Ye();
            }, m.prototype.removeTile = function(ot, Ye) {
              var Fe = this.loaded, pt = ot.uid;
              Fe && Fe[pt] && delete Fe[pt], Ye();
            };
            var x = i.window.ImageBitmap, w = function() {
              this.loaded = {};
            };
            w.prototype.loadTile = function(ot, Ye) {
              var Fe = ot.uid, pt = ot.encoding, Mt = ot.rawImageData, At = x && Mt instanceof x ? this.getImageData(Mt) : Mt, Rt = new i.DEMData(Fe, At, pt);
              this.loaded = this.loaded || {}, this.loaded[Fe] = Rt, Ye(null, Rt);
            }, w.prototype.getImageData = function(ot) {
              this.offscreenCanvas && this.offscreenCanvasContext || (this.offscreenCanvas = new OffscreenCanvas(ot.width, ot.height), this.offscreenCanvasContext = this.offscreenCanvas.getContext("2d")), this.offscreenCanvas.width = ot.width, this.offscreenCanvas.height = ot.height, this.offscreenCanvasContext.drawImage(ot, 0, 0, ot.width, ot.height);
              var Ye = this.offscreenCanvasContext.getImageData(-1, -1, ot.width + 2, ot.height + 2);
              return this.offscreenCanvasContext.clearRect(0, 0, this.offscreenCanvas.width, this.offscreenCanvas.height), new i.RGBAImage({ width: Ye.width, height: Ye.height }, Ye.data);
            }, w.prototype.removeTile = function(ot) {
              var Ye = this.loaded, Fe = ot.uid;
              Ye && Ye[Fe] && delete Ye[Fe];
            };
            var k = function ot(Ye, Fe) {
              var pt, Mt = Ye && Ye.type;
              if (Mt === "FeatureCollection") for (pt = 0; pt < Ye.features.length; pt++) ot(Ye.features[pt], Fe);
              else if (Mt === "GeometryCollection") for (pt = 0; pt < Ye.geometries.length; pt++) ot(Ye.geometries[pt], Fe);
              else if (Mt === "Feature") ot(Ye.geometry, Fe);
              else if (Mt === "Polygon") S(Ye.coordinates, Fe);
              else if (Mt === "MultiPolygon") for (pt = 0; pt < Ye.coordinates.length; pt++) S(Ye.coordinates[pt], Fe);
              return Ye;
            };
            function S(ot, Ye) {
              if (ot.length !== 0) {
                A(ot[0], Ye);
                for (var Fe = 1; Fe < ot.length; Fe++) A(ot[Fe], !Ye);
              }
            }
            function A(ot, Ye) {
              for (var Fe = 0, pt = 0, Mt = ot.length, At = Mt - 1; pt < Mt; At = pt++) Fe += (ot[pt][0] - ot[At][0]) * (ot[At][1] + ot[pt][1]);
              Fe >= 0 != !!Ye && ot.reverse();
            }
            var C = i.vectorTile.VectorTileFeature.prototype.toGeoJSON, D = function(ot) {
              this._feature = ot, this.extent = i.EXTENT, this.type = ot.type, this.properties = ot.tags, "id" in ot && !isNaN(ot.id) && (this.id = parseInt(ot.id, 10));
            };
            D.prototype.loadGeometry = function() {
              if (this._feature.type === 1) {
                for (var ot = [], Ye = 0, Fe = this._feature.geometry; Ye < Fe.length; Ye += 1) {
                  var pt = Fe[Ye];
                  ot.push([new i.Point$1(pt[0], pt[1])]);
                }
                return ot;
              }
              for (var Mt = [], At = 0, Rt = this._feature.geometry; At < Rt.length; At += 1) {
                for (var Ft = [], lt = 0, st = Rt[At]; lt < st.length; lt += 1) {
                  var Ot = st[lt];
                  Ft.push(new i.Point$1(Ot[0], Ot[1]));
                }
                Mt.push(Ft);
              }
              return Mt;
            }, D.prototype.toGeoJSON = function(ot, Ye, Fe) {
              return C.call(this, ot, Ye, Fe);
            };
            var L = function(ot) {
              this.layers = { _geojsonTileLayer: this }, this.name = "_geojsonTileLayer", this.extent = i.EXTENT, this.length = ot.length, this._features = ot;
            };
            L.prototype.feature = function(ot) {
              return new D(this._features[ot]);
            };
            var E = i.vectorTile.VectorTileFeature, P = I;
            function I(ot, Ye) {
              this.options = Ye || {}, this.features = ot, this.length = ot.length;
            }
            function M(ot, Ye) {
              this.id = typeof ot.id == "number" ? ot.id : void 0, this.type = ot.type, this.rawGeometry = ot.type === 1 ? [ot.geometry] : ot.geometry, this.properties = ot.tags, this.extent = Ye || 4096;
            }
            I.prototype.feature = function(ot) {
              return new M(this.features[ot], this.options.extent);
            }, M.prototype.loadGeometry = function() {
              var ot = this.rawGeometry;
              this.geometry = [];
              for (var Ye = 0; Ye < ot.length; Ye++) {
                for (var Fe = ot[Ye], pt = [], Mt = 0; Mt < Fe.length; Mt++) pt.push(new i.Point$1(Fe[Mt][0], Fe[Mt][1]));
                this.geometry.push(pt);
              }
              return this.geometry;
            }, M.prototype.bbox = function() {
              this.geometry || this.loadGeometry();
              for (var ot = this.geometry, Ye = 1 / 0, Fe = -1 / 0, pt = 1 / 0, Mt = -1 / 0, At = 0; At < ot.length; At++) for (var Rt = ot[At], Ft = 0; Ft < Rt.length; Ft++) {
                var lt = Rt[Ft];
                Ye = Math.min(Ye, lt.x), Fe = Math.max(Fe, lt.x), pt = Math.min(pt, lt.y), Mt = Math.max(Mt, lt.y);
              }
              return [Ye, pt, Fe, Mt];
            }, M.prototype.toGeoJSON = E.prototype.toGeoJSON;
            var O = U, T = U, z = function(ot, Ye) {
              Ye = Ye || {};
              var Fe = {};
              for (var pt in ot) Fe[pt] = new P(ot[pt].features, Ye), Fe[pt].name = pt, Fe[pt].version = Ye.version, Fe[pt].extent = Ye.extent;
              return U({ layers: Fe });
            }, F = P;
            function U(ot) {
              var Ye = new i.pbf();
              return function(Fe, pt) {
                for (var Mt in Fe.layers) pt.writeMessage(3, V, Fe.layers[Mt]);
              }(ot, Ye), Ye.finish();
            }
            function V(ot, Ye) {
              var Fe;
              Ye.writeVarintField(15, ot.version || 1), Ye.writeStringField(1, ot.name || ""), Ye.writeVarintField(5, ot.extent || 4096);
              var pt = { keys: [], values: [], keycache: {}, valuecache: {} };
              for (Fe = 0; Fe < ot.length; Fe++) pt.feature = ot.feature(Fe), Ye.writeMessage(2, $, pt);
              var Mt = pt.keys;
              for (Fe = 0; Fe < Mt.length; Fe++) Ye.writeStringField(3, Mt[Fe]);
              var At = pt.values;
              for (Fe = 0; Fe < At.length; Fe++) Ye.writeMessage(4, te, At[Fe]);
            }
            function $(ot, Ye) {
              var Fe = ot.feature;
              Fe.id !== void 0 && Ye.writeVarintField(1, Fe.id), Ye.writeMessage(2, q, ot), Ye.writeVarintField(3, Fe.type), Ye.writeMessage(4, Y, Fe);
            }
            function q(ot, Ye) {
              var Fe = ot.feature, pt = ot.keys, Mt = ot.values, At = ot.keycache, Rt = ot.valuecache;
              for (var Ft in Fe.properties) {
                var lt = At[Ft];
                lt === void 0 && (pt.push(Ft), lt = pt.length - 1, At[Ft] = lt), Ye.writeVarint(lt);
                var st = Fe.properties[Ft], Ot = typeof st;
                Ot !== "string" && Ot !== "boolean" && Ot !== "number" && (st = JSON.stringify(st));
                var kt = Ot + ":" + st, Bt = Rt[kt];
                Bt === void 0 && (Mt.push(st), Bt = Mt.length - 1, Rt[kt] = Bt), Ye.writeVarint(Bt);
              }
            }
            function K(ot, Ye) {
              return (Ye << 3) + (7 & ot);
            }
            function re(ot) {
              return ot << 1 ^ ot >> 31;
            }
            function Y(ot, Ye) {
              for (var Fe = ot.loadGeometry(), pt = ot.type, Mt = 0, At = 0, Rt = Fe.length, Ft = 0; Ft < Rt; Ft++) {
                var lt = Fe[Ft], st = 1;
                pt === 1 && (st = lt.length), Ye.writeVarint(K(1, st));
                for (var Ot = pt === 3 ? lt.length - 1 : lt.length, kt = 0; kt < Ot; kt++) {
                  kt === 1 && pt !== 1 && Ye.writeVarint(K(2, Ot - 1));
                  var Bt = lt[kt].x - Mt, xt = lt[kt].y - At;
                  Ye.writeVarint(re(Bt)), Ye.writeVarint(re(xt)), Mt += Bt, At += xt;
                }
                pt === 3 && Ye.writeVarint(K(7, 1));
              }
            }
            function te(ot, Ye) {
              var Fe = typeof ot;
              Fe === "string" ? Ye.writeStringField(1, ot) : Fe === "boolean" ? Ye.writeBooleanField(7, ot) : Fe === "number" && (ot % 1 != 0 ? Ye.writeDoubleField(3, ot) : ot < 0 ? Ye.writeSVarintField(6, ot) : Ye.writeVarintField(5, ot));
            }
            function ee(ot, Ye, Fe, pt, Mt, At) {
              if (!(Mt - pt <= Fe)) {
                var Rt = pt + Mt >> 1;
                X(ot, Ye, Rt, pt, Mt, At % 2), ee(ot, Ye, Fe, pt, Rt - 1, At + 1), ee(ot, Ye, Fe, Rt + 1, Mt, At + 1);
              }
            }
            function X(ot, Ye, Fe, pt, Mt, At) {
              for (; Mt > pt; ) {
                if (Mt - pt > 600) {
                  var Rt = Mt - pt + 1, Ft = Fe - pt + 1, lt = Math.log(Rt), st = 0.5 * Math.exp(2 * lt / 3), Ot = 0.5 * Math.sqrt(lt * st * (Rt - st) / Rt) * (Ft - Rt / 2 < 0 ? -1 : 1);
                  X(ot, Ye, Fe, Math.max(pt, Math.floor(Fe - Ft * st / Rt + Ot)), Math.min(Mt, Math.floor(Fe + (Rt - Ft) * st / Rt + Ot)), At);
                }
                var kt = Ye[2 * Fe + At], Bt = pt, xt = Mt;
                for (Q(ot, Ye, pt, Fe), Ye[2 * Mt + At] > kt && Q(ot, Ye, pt, Mt); Bt < xt; ) {
                  for (Q(ot, Ye, Bt, xt), Bt++, xt--; Ye[2 * Bt + At] < kt; ) Bt++;
                  for (; Ye[2 * xt + At] > kt; ) xt--;
                }
                Ye[2 * pt + At] === kt ? Q(ot, Ye, pt, xt) : Q(ot, Ye, ++xt, Mt), xt <= Fe && (pt = xt + 1), Fe <= xt && (Mt = xt - 1);
              }
            }
            function Q(ot, Ye, Fe, pt) {
              ue(ot, Fe, pt), ue(Ye, 2 * Fe, 2 * pt), ue(Ye, 2 * Fe + 1, 2 * pt + 1);
            }
            function ue(ot, Ye, Fe) {
              var pt = ot[Ye];
              ot[Ye] = ot[Fe], ot[Fe] = pt;
            }
            function ce(ot, Ye, Fe, pt) {
              var Mt = ot - Fe, At = Ye - pt;
              return Mt * Mt + At * At;
            }
            O.fromVectorTileJs = T, O.fromGeojsonVt = z, O.GeoJSONWrapper = F;
            var he = function(ot) {
              return ot[0];
            }, de = function(ot) {
              return ot[1];
            }, ne = function(ot, Ye, Fe, pt, Mt) {
              Ye === void 0 && (Ye = he), Fe === void 0 && (Fe = de), pt === void 0 && (pt = 64), Mt === void 0 && (Mt = Float64Array), this.nodeSize = pt, this.points = ot;
              for (var At = ot.length < 65536 ? Uint16Array : Uint32Array, Rt = this.ids = new At(ot.length), Ft = this.coords = new Mt(2 * ot.length), lt = 0; lt < ot.length; lt++) Rt[lt] = lt, Ft[2 * lt] = Ye(ot[lt]), Ft[2 * lt + 1] = Fe(ot[lt]);
              ee(Rt, Ft, pt, 0, Rt.length - 1, 0);
            };
            ne.prototype.range = function(ot, Ye, Fe, pt) {
              return function(Mt, At, Rt, Ft, lt, st, Ot) {
                for (var kt, Bt, xt = [0, Mt.length - 1, 0], Jt = []; xt.length; ) {
                  var qt = xt.pop(), en = xt.pop(), Yt = xt.pop();
                  if (en - Yt <= Ot) for (var Ht = Yt; Ht <= en; Ht++) kt = At[2 * Ht], Bt = At[2 * Ht + 1], kt >= Rt && kt <= lt && Bt >= Ft && Bt <= st && Jt.push(Mt[Ht]);
                  else {
                    var sn = Math.floor((Yt + en) / 2);
                    kt = At[2 * sn], Bt = At[2 * sn + 1], kt >= Rt && kt <= lt && Bt >= Ft && Bt <= st && Jt.push(Mt[sn]);
                    var fn = (qt + 1) % 2;
                    (qt === 0 ? Rt <= kt : Ft <= Bt) && (xt.push(Yt), xt.push(sn - 1), xt.push(fn)), (qt === 0 ? lt >= kt : st >= Bt) && (xt.push(sn + 1), xt.push(en), xt.push(fn));
                  }
                }
                return Jt;
              }(this.ids, this.coords, ot, Ye, Fe, pt, this.nodeSize);
            }, ne.prototype.within = function(ot, Ye, Fe) {
              return function(pt, Mt, At, Rt, Ft, lt) {
                for (var st = [0, pt.length - 1, 0], Ot = [], kt = Ft * Ft; st.length; ) {
                  var Bt = st.pop(), xt = st.pop(), Jt = st.pop();
                  if (xt - Jt <= lt) for (var qt = Jt; qt <= xt; qt++) ce(Mt[2 * qt], Mt[2 * qt + 1], At, Rt) <= kt && Ot.push(pt[qt]);
                  else {
                    var en = Math.floor((Jt + xt) / 2), Yt = Mt[2 * en], Ht = Mt[2 * en + 1];
                    ce(Yt, Ht, At, Rt) <= kt && Ot.push(pt[en]);
                    var sn = (Bt + 1) % 2;
                    (Bt === 0 ? At - Ft <= Yt : Rt - Ft <= Ht) && (st.push(Jt), st.push(en - 1), st.push(sn)), (Bt === 0 ? At + Ft >= Yt : Rt + Ft >= Ht) && (st.push(en + 1), st.push(xt), st.push(sn));
                  }
                }
                return Ot;
              }(this.ids, this.coords, ot, Ye, Fe, this.nodeSize);
            };
            var ae = { minZoom: 0, maxZoom: 16, minPoints: 2, radius: 40, extent: 512, nodeSize: 64, log: !1, generateId: !1, reduce: null, map: function(ot) {
              return ot;
            } }, se = function(ot) {
              this.options = Me(Object.create(ae), ot), this.trees = new Array(this.options.maxZoom + 1);
            };
            function me(ot, Ye, Fe, pt, Mt) {
              return { x: ot, y: Ye, zoom: 1 / 0, id: Fe, parentId: -1, numPoints: pt, properties: Mt };
            }
            function ye(ot, Ye) {
              var Fe = ot.geometry.coordinates, pt = Fe[0], Mt = Fe[1];
              return { x: Ae(pt), y: Se(Mt), zoom: 1 / 0, index: Ye, parentId: -1 };
            }
            function pe(ot) {
              return { type: "Feature", id: ot.id, properties: be(ot), geometry: { type: "Point", coordinates: [(pt = ot.x, 360 * (pt - 0.5)), (Ye = ot.y, Fe = (180 - 360 * Ye) * Math.PI / 180, 360 * Math.atan(Math.exp(Fe)) / Math.PI - 90)] } };
              var Ye, Fe, pt;
            }
            function be(ot) {
              var Ye = ot.numPoints, Fe = Ye >= 1e4 ? Math.round(Ye / 1e3) + "k" : Ye >= 1e3 ? Math.round(Ye / 100) / 10 + "k" : Ye;
              return Me(Me({}, ot.properties), { cluster: !0, cluster_id: ot.id, point_count: Ye, point_count_abbreviated: Fe });
            }
            function Ae(ot) {
              return ot / 360 + 0.5;
            }
            function Se(ot) {
              var Ye = Math.sin(ot * Math.PI / 180), Fe = 0.5 - 0.25 * Math.log((1 + Ye) / (1 - Ye)) / Math.PI;
              return Fe < 0 ? 0 : Fe > 1 ? 1 : Fe;
            }
            function Me(ot, Ye) {
              for (var Fe in Ye) ot[Fe] = Ye[Fe];
              return ot;
            }
            function De(ot) {
              return ot.x;
            }
            function Le(ot) {
              return ot.y;
            }
            function We(ot, Ye, Fe, pt) {
              for (var Mt, At = pt, Rt = Fe - Ye >> 1, Ft = Fe - Ye, lt = ot[Ye], st = ot[Ye + 1], Ot = ot[Fe], kt = ot[Fe + 1], Bt = Ye + 3; Bt < Fe; Bt += 3) {
                var xt = Ee(ot[Bt], ot[Bt + 1], lt, st, Ot, kt);
                if (xt > At) Mt = Bt, At = xt;
                else if (xt === At) {
                  var Jt = Math.abs(Bt - Rt);
                  Jt < Ft && (Mt = Bt, Ft = Jt);
                }
              }
              At > pt && (Mt - Ye > 3 && We(ot, Ye, Mt, pt), ot[Mt + 2] = At, Fe - Mt > 3 && We(ot, Mt, Fe, pt));
            }
            function Ee(ot, Ye, Fe, pt, Mt, At) {
              var Rt = Mt - Fe, Ft = At - pt;
              if (Rt !== 0 || Ft !== 0) {
                var lt = ((ot - Fe) * Rt + (Ye - pt) * Ft) / (Rt * Rt + Ft * Ft);
                lt > 1 ? (Fe = Mt, pt = At) : lt > 0 && (Fe += Rt * lt, pt += Ft * lt);
              }
              return (Rt = ot - Fe) * Rt + (Ft = Ye - pt) * Ft;
            }
            function Ne(ot, Ye, Fe, pt) {
              var Mt = { id: ot === void 0 ? null : ot, type: Ye, geometry: Fe, tags: pt, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
              return function(At) {
                var Rt = At.geometry, Ft = At.type;
                if (Ft === "Point" || Ft === "MultiPoint" || Ft === "LineString") Ie(At, Rt);
                else if (Ft === "Polygon" || Ft === "MultiLineString") for (var lt = 0; lt < Rt.length; lt++) Ie(At, Rt[lt]);
                else if (Ft === "MultiPolygon") for (lt = 0; lt < Rt.length; lt++) for (var st = 0; st < Rt[lt].length; st++) Ie(At, Rt[lt][st]);
              }(Mt), Mt;
            }
            function Ie(ot, Ye) {
              for (var Fe = 0; Fe < Ye.length; Fe += 3) ot.minX = Math.min(ot.minX, Ye[Fe]), ot.minY = Math.min(ot.minY, Ye[Fe + 1]), ot.maxX = Math.max(ot.maxX, Ye[Fe]), ot.maxY = Math.max(ot.maxY, Ye[Fe + 1]);
            }
            function ge(ot, Ye, Fe, pt) {
              if (Ye.geometry) {
                var Mt = Ye.geometry.coordinates, At = Ye.geometry.type, Rt = Math.pow(Fe.tolerance / ((1 << Fe.maxZoom) * Fe.extent), 2), Ft = [], lt = Ye.id;
                if (Fe.promoteId ? lt = Ye.properties[Fe.promoteId] : Fe.generateId && (lt = pt || 0), At === "Point") Ce(Mt, Ft);
                else if (At === "MultiPoint") for (var st = 0; st < Mt.length; st++) Ce(Mt[st], Ft);
                else if (At === "LineString") we(Mt, Ft, Rt, !1);
                else if (At === "MultiLineString") {
                  if (Fe.lineMetrics) {
                    for (st = 0; st < Mt.length; st++) Ft = [], we(Mt[st], Ft, Rt, !1), ot.push(Ne(lt, "LineString", Ft, Ye.properties));
                    return;
                  }
                  Ge(Mt, Ft, Rt, !1);
                } else if (At === "Polygon") Ge(Mt, Ft, Rt, !0);
                else {
                  if (At !== "MultiPolygon") {
                    if (At === "GeometryCollection") {
                      for (st = 0; st < Ye.geometry.geometries.length; st++) ge(ot, { id: lt, geometry: Ye.geometry.geometries[st], properties: Ye.properties }, Fe, pt);
                      return;
                    }
                    throw new Error("Input data is not a valid GeoJSON object.");
                  }
                  for (st = 0; st < Mt.length; st++) {
                    var Ot = [];
                    Ge(Mt[st], Ot, Rt, !0), Ft.push(Ot);
                  }
                }
                ot.push(Ne(lt, At, Ft, Ye.properties));
              }
            }
            function Ce(ot, Ye) {
              Ye.push(Re(ot[0])), Ye.push(je(ot[1])), Ye.push(0);
            }
            function we(ot, Ye, Fe, pt) {
              for (var Mt, At, Rt = 0, Ft = 0; Ft < ot.length; Ft++) {
                var lt = Re(ot[Ft][0]), st = je(ot[Ft][1]);
                Ye.push(lt), Ye.push(st), Ye.push(0), Ft > 0 && (Rt += pt ? (Mt * st - lt * At) / 2 : Math.sqrt(Math.pow(lt - Mt, 2) + Math.pow(st - At, 2))), Mt = lt, At = st;
              }
              var Ot = Ye.length - 3;
              Ye[2] = 1, We(Ye, 0, Ot, Fe), Ye[Ot + 2] = 1, Ye.size = Math.abs(Rt), Ye.start = 0, Ye.end = Ye.size;
            }
            function Ge(ot, Ye, Fe, pt) {
              for (var Mt = 0; Mt < ot.length; Mt++) {
                var At = [];
                we(ot[Mt], At, Fe, pt), Ye.push(At);
              }
            }
            function Re(ot) {
              return ot / 360 + 0.5;
            }
            function je(ot) {
              var Ye = Math.sin(ot * Math.PI / 180), Fe = 0.5 - 0.25 * Math.log((1 + Ye) / (1 - Ye)) / Math.PI;
              return Fe < 0 ? 0 : Fe > 1 ? 1 : Fe;
            }
            function Ke(ot, Ye, Fe, pt, Mt, At, Rt, Ft) {
              if (pt /= Ye, At >= (Fe /= Ye) && Rt < pt) return ot;
              if (Rt < Fe || At >= pt) return null;
              for (var lt = [], st = 0; st < ot.length; st++) {
                var Ot = ot[st], kt = Ot.geometry, Bt = Ot.type, xt = Mt === 0 ? Ot.minX : Ot.minY, Jt = Mt === 0 ? Ot.maxX : Ot.maxY;
                if (xt >= Fe && Jt < pt) lt.push(Ot);
                else if (!(Jt < Fe || xt >= pt)) {
                  var qt = [];
                  if (Bt === "Point" || Bt === "MultiPoint") tt(kt, qt, Fe, pt, Mt);
                  else if (Bt === "LineString") _e(kt, qt, Fe, pt, Mt, !1, Ft.lineMetrics);
                  else if (Bt === "MultiLineString") $e(kt, qt, Fe, pt, Mt, !1);
                  else if (Bt === "Polygon") $e(kt, qt, Fe, pt, Mt, !0);
                  else if (Bt === "MultiPolygon") for (var en = 0; en < kt.length; en++) {
                    var Yt = [];
                    $e(kt[en], Yt, Fe, pt, Mt, !0), Yt.length && qt.push(Yt);
                  }
                  if (qt.length) {
                    if (Ft.lineMetrics && Bt === "LineString") {
                      for (en = 0; en < qt.length; en++) lt.push(Ne(Ot.id, Bt, qt[en], Ot.tags));
                      continue;
                    }
                    Bt !== "LineString" && Bt !== "MultiLineString" || (qt.length === 1 ? (Bt = "LineString", qt = qt[0]) : Bt = "MultiLineString"), Bt !== "Point" && Bt !== "MultiPoint" || (Bt = qt.length === 3 ? "Point" : "MultiPoint"), lt.push(Ne(Ot.id, Bt, qt, Ot.tags));
                  }
                }
              }
              return lt.length ? lt : null;
            }
            function tt(ot, Ye, Fe, pt, Mt) {
              for (var At = 0; At < ot.length; At += 3) {
                var Rt = ot[At + Mt];
                Rt >= Fe && Rt <= pt && (Ye.push(ot[At]), Ye.push(ot[At + 1]), Ye.push(ot[At + 2]));
              }
            }
            function _e(ot, Ye, Fe, pt, Mt, At, Rt) {
              for (var Ft, lt, st = Be(ot), Ot = Mt === 0 ? ct : ft, kt = ot.start, Bt = 0; Bt < ot.length - 3; Bt += 3) {
                var xt = ot[Bt], Jt = ot[Bt + 1], qt = ot[Bt + 2], en = ot[Bt + 3], Yt = ot[Bt + 4], Ht = Mt === 0 ? xt : Jt, sn = Mt === 0 ? en : Yt, fn = !1;
                Rt && (Ft = Math.sqrt(Math.pow(xt - en, 2) + Math.pow(Jt - Yt, 2))), Ht < Fe ? sn > Fe && (lt = Ot(st, xt, Jt, en, Yt, Fe), Rt && (st.start = kt + Ft * lt)) : Ht > pt ? sn < pt && (lt = Ot(st, xt, Jt, en, Yt, pt), Rt && (st.start = kt + Ft * lt)) : Ze(st, xt, Jt, qt), sn < Fe && Ht >= Fe && (lt = Ot(st, xt, Jt, en, Yt, Fe), fn = !0), sn > pt && Ht <= pt && (lt = Ot(st, xt, Jt, en, Yt, pt), fn = !0), !At && fn && (Rt && (st.end = kt + Ft * lt), Ye.push(st), st = Be(ot)), Rt && (kt += Ft);
              }
              var In = ot.length - 3;
              xt = ot[In], Jt = ot[In + 1], qt = ot[In + 2], (Ht = Mt === 0 ? xt : Jt) >= Fe && Ht <= pt && Ze(st, xt, Jt, qt), In = st.length - 3, At && In >= 3 && (st[In] !== st[0] || st[In + 1] !== st[1]) && Ze(st, st[0], st[1], st[2]), st.length && Ye.push(st);
            }
            function Be(ot) {
              var Ye = [];
              return Ye.size = ot.size, Ye.start = ot.start, Ye.end = ot.end, Ye;
            }
            function $e(ot, Ye, Fe, pt, Mt, At) {
              for (var Rt = 0; Rt < ot.length; Rt++) _e(ot[Rt], Ye, Fe, pt, Mt, At, !1);
            }
            function Ze(ot, Ye, Fe, pt) {
              ot.push(Ye), ot.push(Fe), ot.push(pt);
            }
            function ct(ot, Ye, Fe, pt, Mt, At) {
              var Rt = (At - Ye) / (pt - Ye);
              return ot.push(At), ot.push(Fe + (Mt - Fe) * Rt), ot.push(1), Rt;
            }
            function ft(ot, Ye, Fe, pt, Mt, At) {
              var Rt = (At - Fe) / (Mt - Fe);
              return ot.push(Ye + (pt - Ye) * Rt), ot.push(At), ot.push(1), Rt;
            }
            function _t(ot, Ye) {
              for (var Fe = [], pt = 0; pt < ot.length; pt++) {
                var Mt, At = ot[pt], Rt = At.type;
                if (Rt === "Point" || Rt === "MultiPoint" || Rt === "LineString") Mt = Pt(At.geometry, Ye);
                else if (Rt === "MultiLineString" || Rt === "Polygon") {
                  Mt = [];
                  for (var Ft = 0; Ft < At.geometry.length; Ft++) Mt.push(Pt(At.geometry[Ft], Ye));
                } else if (Rt === "MultiPolygon") for (Mt = [], Ft = 0; Ft < At.geometry.length; Ft++) {
                  for (var lt = [], st = 0; st < At.geometry[Ft].length; st++) lt.push(Pt(At.geometry[Ft][st], Ye));
                  Mt.push(lt);
                }
                Fe.push(Ne(At.id, Rt, Mt, At.tags));
              }
              return Fe;
            }
            function Pt(ot, Ye) {
              var Fe = [];
              Fe.size = ot.size, ot.start !== void 0 && (Fe.start = ot.start, Fe.end = ot.end);
              for (var pt = 0; pt < ot.length; pt += 3) Fe.push(ot[pt] + Ye, ot[pt + 1], ot[pt + 2]);
              return Fe;
            }
            function Dt(ot, Ye) {
              if (ot.transformed) return ot;
              var Fe, pt, Mt, At = 1 << ot.z, Rt = ot.x, Ft = ot.y;
              for (Fe = 0; Fe < ot.features.length; Fe++) {
                var lt = ot.features[Fe], st = lt.geometry, Ot = lt.type;
                if (lt.geometry = [], Ot === 1) for (pt = 0; pt < st.length; pt += 2) lt.geometry.push($t(st[pt], st[pt + 1], Ye, At, Rt, Ft));
                else for (pt = 0; pt < st.length; pt++) {
                  var kt = [];
                  for (Mt = 0; Mt < st[pt].length; Mt += 2) kt.push($t(st[pt][Mt], st[pt][Mt + 1], Ye, At, Rt, Ft));
                  lt.geometry.push(kt);
                }
              }
              return ot.transformed = !0, ot;
            }
            function $t(ot, Ye, Fe, pt, Mt, At) {
              return [Math.round(Fe * (ot * pt - Mt)), Math.round(Fe * (Ye * pt - At))];
            }
            function Gt(ot, Ye, Fe, pt, Mt) {
              for (var At = Ye === Mt.maxZoom ? 0 : Mt.tolerance / ((1 << Ye) * Mt.extent), Rt = { features: [], numPoints: 0, numSimplified: 0, numFeatures: 0, source: null, x: Fe, y: pt, z: Ye, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 }, Ft = 0; Ft < ot.length; Ft++) {
                Rt.numFeatures++, Wt(Rt, ot[Ft], At, Mt);
                var lt = ot[Ft].minX, st = ot[Ft].minY, Ot = ot[Ft].maxX, kt = ot[Ft].maxY;
                lt < Rt.minX && (Rt.minX = lt), st < Rt.minY && (Rt.minY = st), Ot > Rt.maxX && (Rt.maxX = Ot), kt > Rt.maxY && (Rt.maxY = kt);
              }
              return Rt;
            }
            function Wt(ot, Ye, Fe, pt) {
              var Mt = Ye.geometry, At = Ye.type, Rt = [];
              if (At === "Point" || At === "MultiPoint") for (var Ft = 0; Ft < Mt.length; Ft += 3) Rt.push(Mt[Ft]), Rt.push(Mt[Ft + 1]), ot.numPoints++, ot.numSimplified++;
              else if (At === "LineString") mt(Rt, Mt, ot, Fe, !1, !1);
              else if (At === "MultiLineString" || At === "Polygon") for (Ft = 0; Ft < Mt.length; Ft++) mt(Rt, Mt[Ft], ot, Fe, At === "Polygon", Ft === 0);
              else if (At === "MultiPolygon") for (var lt = 0; lt < Mt.length; lt++) {
                var st = Mt[lt];
                for (Ft = 0; Ft < st.length; Ft++) mt(Rt, st[Ft], ot, Fe, !0, Ft === 0);
              }
              if (Rt.length) {
                var Ot = Ye.tags || null;
                if (At === "LineString" && pt.lineMetrics) {
                  for (var kt in Ot = {}, Ye.tags) Ot[kt] = Ye.tags[kt];
                  Ot.mapbox_clip_start = Mt.start / Mt.size, Ot.mapbox_clip_end = Mt.end / Mt.size;
                }
                var Bt = { geometry: Rt, type: At === "Polygon" || At === "MultiPolygon" ? 3 : At === "LineString" || At === "MultiLineString" ? 2 : 1, tags: Ot };
                Ye.id !== null && (Bt.id = Ye.id), ot.features.push(Bt);
              }
            }
            function mt(ot, Ye, Fe, pt, Mt, At) {
              var Rt = pt * pt;
              if (pt > 0 && Ye.size < (Mt ? Rt : pt)) Fe.numPoints += Ye.length / 3;
              else {
                for (var Ft = [], lt = 0; lt < Ye.length; lt += 3) (pt === 0 || Ye[lt + 2] > Rt) && (Fe.numSimplified++, Ft.push(Ye[lt]), Ft.push(Ye[lt + 1])), Fe.numPoints++;
                Mt && function(st, Ot) {
                  for (var kt = 0, Bt = 0, xt = st.length, Jt = xt - 2; Bt < xt; Jt = Bt, Bt += 2) kt += (st[Bt] - st[Jt]) * (st[Bt + 1] + st[Jt + 1]);
                  if (kt > 0 === Ot) for (Bt = 0, xt = st.length; Bt < xt / 2; Bt += 2) {
                    var qt = st[Bt], en = st[Bt + 1];
                    st[Bt] = st[xt - 2 - Bt], st[Bt + 1] = st[xt - 1 - Bt], st[xt - 2 - Bt] = qt, st[xt - 1 - Bt] = en;
                  }
                }(Ft, At), ot.push(Ft);
              }
            }
            function at(ot, Ye) {
              var Fe = (Ye = this.options = function(Mt, At) {
                for (var Rt in At) Mt[Rt] = At[Rt];
                return Mt;
              }(Object.create(this.options), Ye)).debug;
              if (Fe && console.time("preprocess data"), Ye.maxZoom < 0 || Ye.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range");
              if (Ye.promoteId && Ye.generateId) throw new Error("promoteId and generateId cannot be used together.");
              var pt = function(Mt, At) {
                var Rt = [];
                if (Mt.type === "FeatureCollection") for (var Ft = 0; Ft < Mt.features.length; Ft++) ge(Rt, Mt.features[Ft], At, Ft);
                else Mt.type === "Feature" ? ge(Rt, Mt, At) : ge(Rt, { geometry: Mt }, At);
                return Rt;
              }(ot, Ye);
              this.tiles = {}, this.tileCoords = [], Fe && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", Ye.indexMaxZoom, Ye.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), (pt = function(Mt, At) {
                var Rt = At.buffer / At.extent, Ft = Mt, lt = Ke(Mt, 1, -1 - Rt, Rt, 0, -1, 2, At), st = Ke(Mt, 1, 1 - Rt, 2 + Rt, 0, -1, 2, At);
                return (lt || st) && (Ft = Ke(Mt, 1, -Rt, 1 + Rt, 0, -1, 2, At) || [], lt && (Ft = _t(lt, 1).concat(Ft)), st && (Ft = Ft.concat(_t(st, -1)))), Ft;
              }(pt, Ye)).length && this.splitTile(pt, 0, 0, 0), Fe && (pt.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)));
            }
            function vt(ot, Ye, Fe) {
              return 32 * ((1 << ot) * Fe + Ye) + ot;
            }
            function St(ot, Ye) {
              var Fe = ot.tileID.canonical;
              if (!this._geoJSONIndex) return Ye(null, null);
              var pt = this._geoJSONIndex.getTile(Fe.z, Fe.x, Fe.y);
              if (!pt) return Ye(null, null);
              var Mt = new L(pt.features), At = O(Mt);
              At.byteOffset === 0 && At.byteLength === At.buffer.byteLength || (At = new Uint8Array(At)), Ye(null, { vectorTile: Mt, rawData: At.buffer });
            }
            se.prototype.load = function(ot) {
              var Ye = this.options, Fe = Ye.log, pt = Ye.minZoom, Mt = Ye.maxZoom, At = Ye.nodeSize;
              Fe && console.time("total time");
              var Rt = "prepare " + ot.length + " points";
              Fe && console.time(Rt), this.points = ot;
              for (var Ft = [], lt = 0; lt < ot.length; lt++) ot[lt].geometry && Ft.push(ye(ot[lt], lt));
              this.trees[Mt + 1] = new ne(Ft, De, Le, At, Float32Array), Fe && console.timeEnd(Rt);
              for (var st = Mt; st >= pt; st--) {
                var Ot = +Date.now();
                Ft = this._cluster(Ft, st), this.trees[st] = new ne(Ft, De, Le, At, Float32Array), Fe && console.log("z%d: %d clusters in %dms", st, Ft.length, +Date.now() - Ot);
              }
              return Fe && console.timeEnd("total time"), this;
            }, se.prototype.getClusters = function(ot, Ye) {
              var Fe = ((ot[0] + 180) % 360 + 360) % 360 - 180, pt = Math.max(-90, Math.min(90, ot[1])), Mt = ot[2] === 180 ? 180 : ((ot[2] + 180) % 360 + 360) % 360 - 180, At = Math.max(-90, Math.min(90, ot[3]));
              if (ot[2] - ot[0] >= 360) Fe = -180, Mt = 180;
              else if (Fe > Mt) {
                var Rt = this.getClusters([Fe, pt, 180, At], Ye), Ft = this.getClusters([-180, pt, Mt, At], Ye);
                return Rt.concat(Ft);
              }
              for (var lt = this.trees[this._limitZoom(Ye)], st = [], Ot = 0, kt = lt.range(Ae(Fe), Se(At), Ae(Mt), Se(pt)); Ot < kt.length; Ot += 1) {
                var Bt = kt[Ot], xt = lt.points[Bt];
                st.push(xt.numPoints ? pe(xt) : this.points[xt.index]);
              }
              return st;
            }, se.prototype.getChildren = function(ot) {
              var Ye = this._getOriginId(ot), Fe = this._getOriginZoom(ot), pt = "No cluster with the specified id.", Mt = this.trees[Fe];
              if (!Mt) throw new Error(pt);
              var At = Mt.points[Ye];
              if (!At) throw new Error(pt);
              for (var Rt = this.options.radius / (this.options.extent * Math.pow(2, Fe - 1)), Ft = [], lt = 0, st = Mt.within(At.x, At.y, Rt); lt < st.length; lt += 1) {
                var Ot = st[lt], kt = Mt.points[Ot];
                kt.parentId === ot && Ft.push(kt.numPoints ? pe(kt) : this.points[kt.index]);
              }
              if (Ft.length === 0) throw new Error(pt);
              return Ft;
            }, se.prototype.getLeaves = function(ot, Ye, Fe) {
              Ye = Ye || 10, Fe = Fe || 0;
              var pt = [];
              return this._appendLeaves(pt, ot, Ye, Fe, 0), pt;
            }, se.prototype.getTile = function(ot, Ye, Fe) {
              var pt = this.trees[this._limitZoom(ot)], Mt = Math.pow(2, ot), At = this.options, Rt = At.extent, Ft = At.radius / Rt, lt = (Fe - Ft) / Mt, st = (Fe + 1 + Ft) / Mt, Ot = { features: [] };
              return this._addTileFeatures(pt.range((Ye - Ft) / Mt, lt, (Ye + 1 + Ft) / Mt, st), pt.points, Ye, Fe, Mt, Ot), Ye === 0 && this._addTileFeatures(pt.range(1 - Ft / Mt, lt, 1, st), pt.points, Mt, Fe, Mt, Ot), Ye === Mt - 1 && this._addTileFeatures(pt.range(0, lt, Ft / Mt, st), pt.points, -1, Fe, Mt, Ot), Ot.features.length ? Ot : null;
            }, se.prototype.getClusterExpansionZoom = function(ot) {
              for (var Ye = this._getOriginZoom(ot) - 1; Ye <= this.options.maxZoom; ) {
                var Fe = this.getChildren(ot);
                if (Ye++, Fe.length !== 1) break;
                ot = Fe[0].properties.cluster_id;
              }
              return Ye;
            }, se.prototype._appendLeaves = function(ot, Ye, Fe, pt, Mt) {
              for (var At = 0, Rt = this.getChildren(Ye); At < Rt.length; At += 1) {
                var Ft = Rt[At], lt = Ft.properties;
                if (lt && lt.cluster ? Mt + lt.point_count <= pt ? Mt += lt.point_count : Mt = this._appendLeaves(ot, lt.cluster_id, Fe, pt, Mt) : Mt < pt ? Mt++ : ot.push(Ft), ot.length === Fe) break;
              }
              return Mt;
            }, se.prototype._addTileFeatures = function(ot, Ye, Fe, pt, Mt, At) {
              for (var Rt = 0, Ft = ot; Rt < Ft.length; Rt += 1) {
                var lt = Ye[Ft[Rt]], st = lt.numPoints, Ot = { type: 1, geometry: [[Math.round(this.options.extent * (lt.x * Mt - Fe)), Math.round(this.options.extent * (lt.y * Mt - pt))]], tags: st ? be(lt) : this.points[lt.index].properties }, kt = void 0;
                st ? kt = lt.id : this.options.generateId ? kt = lt.index : this.points[lt.index].id && (kt = this.points[lt.index].id), kt !== void 0 && (Ot.id = kt), At.features.push(Ot);
              }
            }, se.prototype._limitZoom = function(ot) {
              return Math.max(this.options.minZoom, Math.min(+ot, this.options.maxZoom + 1));
            }, se.prototype._cluster = function(ot, Ye) {
              for (var Fe = [], pt = this.options, Mt = pt.radius, At = pt.extent, Rt = pt.reduce, Ft = pt.minPoints, lt = Mt / (At * Math.pow(2, Ye)), st = 0; st < ot.length; st++) {
                var Ot = ot[st];
                if (!(Ot.zoom <= Ye)) {
                  Ot.zoom = Ye;
                  for (var kt = this.trees[Ye + 1], Bt = kt.within(Ot.x, Ot.y, lt), xt = Ot.numPoints || 1, Jt = xt, qt = 0, en = Bt; qt < en.length; qt += 1) {
                    var Yt = en[qt], Ht = kt.points[Yt];
                    Ht.zoom > Ye && (Jt += Ht.numPoints || 1);
                  }
                  if (Jt >= Ft) {
                    for (var sn = Ot.x * xt, fn = Ot.y * xt, In = Rt && xt > 1 ? this._map(Ot, !0) : null, zn = (st << 5) + (Ye + 1) + this.points.length, Cn = 0, gn = Bt; Cn < gn.length; Cn += 1) {
                      var Mn = gn[Cn], Xn = kt.points[Mn];
                      if (!(Xn.zoom <= Ye)) {
                        Xn.zoom = Ye;
                        var Pn = Xn.numPoints || 1;
                        sn += Xn.x * Pn, fn += Xn.y * Pn, Xn.parentId = zn, Rt && (In || (In = this._map(Ot, !0)), Rt(In, this._map(Xn)));
                      }
                    }
                    Ot.parentId = zn, Fe.push(me(sn / Jt, fn / Jt, zn, Jt, In));
                  } else if (Fe.push(Ot), Jt > 1) for (var wn = 0, Rn = Bt; wn < Rn.length; wn += 1) {
                    var _n = Rn[wn], En = kt.points[_n];
                    En.zoom <= Ye || (En.zoom = Ye, Fe.push(En));
                  }
                }
              }
              return Fe;
            }, se.prototype._getOriginId = function(ot) {
              return ot - this.points.length >> 5;
            }, se.prototype._getOriginZoom = function(ot) {
              return (ot - this.points.length) % 32;
            }, se.prototype._map = function(ot, Ye) {
              if (ot.numPoints) return Ye ? Me({}, ot.properties) : ot.properties;
              var Fe = this.points[ot.index].properties, pt = this.options.map(Fe);
              return Ye && pt === Fe ? Me({}, pt) : pt;
            }, at.prototype.options = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 }, at.prototype.splitTile = function(ot, Ye, Fe, pt, Mt, At, Rt) {
              for (var Ft = [ot, Ye, Fe, pt], lt = this.options, st = lt.debug; Ft.length; ) {
                pt = Ft.pop(), Fe = Ft.pop(), Ye = Ft.pop(), ot = Ft.pop();
                var Ot = 1 << Ye, kt = vt(Ye, Fe, pt), Bt = this.tiles[kt];
                if (!Bt && (st > 1 && console.time("creation"), Bt = this.tiles[kt] = Gt(ot, Ye, Fe, pt, lt), this.tileCoords.push({ z: Ye, x: Fe, y: pt }), st)) {
                  st > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", Ye, Fe, pt, Bt.numFeatures, Bt.numPoints, Bt.numSimplified), console.timeEnd("creation"));
                  var xt = "z" + Ye;
                  this.stats[xt] = (this.stats[xt] || 0) + 1, this.total++;
                }
                if (Bt.source = ot, Mt) {
                  if (Ye === lt.maxZoom || Ye === Mt) continue;
                  var Jt = 1 << Mt - Ye;
                  if (Fe !== Math.floor(At / Jt) || pt !== Math.floor(Rt / Jt)) continue;
                } else if (Ye === lt.indexMaxZoom || Bt.numPoints <= lt.indexMaxPoints) continue;
                if (Bt.source = null, ot.length !== 0) {
                  st > 1 && console.time("clipping");
                  var qt, en, Yt, Ht, sn, fn, In = 0.5 * lt.buffer / lt.extent, zn = 0.5 - In, Cn = 0.5 + In, gn = 1 + In;
                  qt = en = Yt = Ht = null, sn = Ke(ot, Ot, Fe - In, Fe + Cn, 0, Bt.minX, Bt.maxX, lt), fn = Ke(ot, Ot, Fe + zn, Fe + gn, 0, Bt.minX, Bt.maxX, lt), ot = null, sn && (qt = Ke(sn, Ot, pt - In, pt + Cn, 1, Bt.minY, Bt.maxY, lt), en = Ke(sn, Ot, pt + zn, pt + gn, 1, Bt.minY, Bt.maxY, lt), sn = null), fn && (Yt = Ke(fn, Ot, pt - In, pt + Cn, 1, Bt.minY, Bt.maxY, lt), Ht = Ke(fn, Ot, pt + zn, pt + gn, 1, Bt.minY, Bt.maxY, lt), fn = null), st > 1 && console.timeEnd("clipping"), Ft.push(qt || [], Ye + 1, 2 * Fe, 2 * pt), Ft.push(en || [], Ye + 1, 2 * Fe, 2 * pt + 1), Ft.push(Yt || [], Ye + 1, 2 * Fe + 1, 2 * pt), Ft.push(Ht || [], Ye + 1, 2 * Fe + 1, 2 * pt + 1);
                }
              }
            }, at.prototype.getTile = function(ot, Ye, Fe) {
              var pt = this.options, Mt = pt.extent, At = pt.debug;
              if (ot < 0 || ot > 24) return null;
              var Rt = 1 << ot, Ft = vt(ot, Ye = (Ye % Rt + Rt) % Rt, Fe);
              if (this.tiles[Ft]) return Dt(this.tiles[Ft], Mt);
              At > 1 && console.log("drilling down to z%d-%d-%d", ot, Ye, Fe);
              for (var lt, st = ot, Ot = Ye, kt = Fe; !lt && st > 0; ) st--, Ot = Math.floor(Ot / 2), kt = Math.floor(kt / 2), lt = this.tiles[vt(st, Ot, kt)];
              return lt && lt.source ? (At > 1 && console.log("found parent tile z%d-%d-%d", st, Ot, kt), At > 1 && console.time("drilling down"), this.splitTile(lt.source, st, Ot, kt, ot, Ye, Fe), At > 1 && console.timeEnd("drilling down"), this.tiles[Ft] ? Dt(this.tiles[Ft], Mt) : null) : null;
            };
            var Je = function(ot) {
              function Ye(Fe, pt, Mt, At) {
                ot.call(this, Fe, pt, Mt, St), At && (this.loadGeoJSON = At);
              }
              return ot && (Ye.__proto__ = ot), Ye.prototype = Object.create(ot && ot.prototype), Ye.prototype.constructor = Ye, Ye.prototype.loadData = function(Fe, pt) {
                this._pendingCallback && this._pendingCallback(null, { abandoned: !0 }), this._pendingCallback = pt, this._pendingLoadDataParams = Fe, this._state && this._state !== "Idle" ? this._state = "NeedsLoadData" : (this._state = "Coalescing", this._loadData());
              }, Ye.prototype._loadData = function() {
                var Fe = this;
                if (this._pendingCallback && this._pendingLoadDataParams) {
                  var pt = this._pendingCallback, Mt = this._pendingLoadDataParams;
                  delete this._pendingCallback, delete this._pendingLoadDataParams;
                  var At = !!(Mt && Mt.request && Mt.request.collectResourceTiming) && new i.RequestPerformance(Mt.request);
                  this.loadGeoJSON(Mt, function(Rt, Ft) {
                    if (Rt || !Ft) return pt(Rt);
                    if (typeof Ft != "object") return pt(new Error("Input data given to '" + Mt.source + "' is not a valid GeoJSON object."));
                    k(Ft, !0);
                    try {
                      if (Mt.filter) {
                        var lt = i.createExpression(Mt.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
                        if (lt.result === "error") throw new Error(lt.value.map(function(Bt) {
                          return Bt.key + ": " + Bt.message;
                        }).join(", "));
                        var st = Ft.features.filter(function(Bt) {
                          return lt.value.evaluate({ zoom: 0 }, Bt);
                        });
                        Ft = { type: "FeatureCollection", features: st };
                      }
                      Fe._geoJSONIndex = Mt.cluster ? new se(function(Bt) {
                        var xt = Bt.superclusterOptions, Jt = Bt.clusterProperties;
                        if (!Jt || !xt) return xt;
                        for (var qt = {}, en = {}, Yt = { accumulated: null, zoom: 0 }, Ht = { properties: null }, sn = Object.keys(Jt), fn = 0, In = sn; fn < In.length; fn += 1) {
                          var zn = In[fn], Cn = Jt[zn], gn = Cn[0], Mn = Cn[1], Xn = i.createExpression(Mn), Pn = i.createExpression(typeof gn == "string" ? [gn, ["accumulated"], ["get", zn]] : gn);
                          qt[zn] = Xn.value, en[zn] = Pn.value;
                        }
                        return xt.map = function(wn) {
                          Ht.properties = wn;
                          for (var Rn = {}, _n = 0, En = sn; _n < En.length; _n += 1) {
                            var Kn = En[_n];
                            Rn[Kn] = qt[Kn].evaluate(Yt, Ht);
                          }
                          return Rn;
                        }, xt.reduce = function(wn, Rn) {
                          Ht.properties = Rn;
                          for (var _n = 0, En = sn; _n < En.length; _n += 1) {
                            var Kn = En[_n];
                            Yt.accumulated = wn[Kn], wn[Kn] = en[Kn].evaluate(Yt, Ht);
                          }
                        }, xt;
                      }(Mt)).load(Ft.features) : function(Bt, xt) {
                        return new at(Bt, xt);
                      }(Ft, Mt.geojsonVtOptions);
                    } catch (Bt) {
                      return pt(Bt);
                    }
                    Fe.loaded = {};
                    var Ot = {};
                    if (At) {
                      var kt = At.finish();
                      kt && (Ot.resourceTiming = {}, Ot.resourceTiming[Mt.source] = JSON.parse(JSON.stringify(kt)));
                    }
                    pt(null, Ot);
                  });
                }
              }, Ye.prototype.coalesce = function() {
                this._state === "Coalescing" ? this._state = "Idle" : this._state === "NeedsLoadData" && (this._state = "Coalescing", this._loadData());
              }, Ye.prototype.reloadTile = function(Fe, pt) {
                var Mt = this.loaded, At = Fe.uid;
                return Mt && Mt[At] ? ot.prototype.reloadTile.call(this, Fe, pt) : this.loadTile(Fe, pt);
              }, Ye.prototype.loadGeoJSON = function(Fe, pt) {
                if (Fe.request) i.getJSON(Fe.request, pt);
                else {
                  if (typeof Fe.data != "string") return pt(new Error("Input data given to '" + Fe.source + "' is not a valid GeoJSON object."));
                  try {
                    return pt(null, JSON.parse(Fe.data));
                  } catch {
                    return pt(new Error("Input data given to '" + Fe.source + "' is not a valid GeoJSON object."));
                  }
                }
              }, Ye.prototype.removeSource = function(Fe, pt) {
                this._pendingCallback && this._pendingCallback(null, { abandoned: !0 }), pt();
              }, Ye.prototype.getClusterExpansionZoom = function(Fe, pt) {
                try {
                  pt(null, this._geoJSONIndex.getClusterExpansionZoom(Fe.clusterId));
                } catch (Mt) {
                  pt(Mt);
                }
              }, Ye.prototype.getClusterChildren = function(Fe, pt) {
                try {
                  pt(null, this._geoJSONIndex.getChildren(Fe.clusterId));
                } catch (Mt) {
                  pt(Mt);
                }
              }, Ye.prototype.getClusterLeaves = function(Fe, pt) {
                try {
                  pt(null, this._geoJSONIndex.getLeaves(Fe.clusterId, Fe.limit, Fe.offset));
                } catch (Mt) {
                  pt(Mt);
                }
              }, Ye;
            }(m), nt = function(ot) {
              var Ye = this;
              this.self = ot, this.actor = new i.Actor(ot, this), this.layerIndexes = {}, this.availableImages = {}, this.workerSourceTypes = { vector: m, geojson: Je }, this.workerSources = {}, this.demWorkerSources = {}, this.self.registerWorkerSource = function(Fe, pt) {
                if (Ye.workerSourceTypes[Fe]) throw new Error('Worker source with name "' + Fe + '" already registered.');
                Ye.workerSourceTypes[Fe] = pt;
              }, this.self.registerRTLTextPlugin = function(Fe) {
                if (i.plugin.isParsed()) throw new Error("RTL text plugin already registered.");
                i.plugin.applyArabicShaping = Fe.applyArabicShaping, i.plugin.processBidirectionalText = Fe.processBidirectionalText, i.plugin.processStyledBidirectionalText = Fe.processStyledBidirectionalText;
              };
            };
            return nt.prototype.setReferrer = function(ot, Ye) {
              this.referrer = Ye;
            }, nt.prototype.setImages = function(ot, Ye, Fe) {
              for (var pt in this.availableImages[ot] = Ye, this.workerSources[ot]) {
                var Mt = this.workerSources[ot][pt];
                for (var At in Mt) Mt[At].availableImages = Ye;
              }
              Fe();
            }, nt.prototype.setLayers = function(ot, Ye, Fe) {
              this.getLayerIndex(ot).replace(Ye), Fe();
            }, nt.prototype.updateLayers = function(ot, Ye, Fe) {
              this.getLayerIndex(ot).update(Ye.layers, Ye.removedIds), Fe();
            }, nt.prototype.loadTile = function(ot, Ye, Fe) {
              this.getWorkerSource(ot, Ye.type, Ye.source).loadTile(Ye, Fe);
            }, nt.prototype.loadDEMTile = function(ot, Ye, Fe) {
              this.getDEMWorkerSource(ot, Ye.source).loadTile(Ye, Fe);
            }, nt.prototype.reloadTile = function(ot, Ye, Fe) {
              this.getWorkerSource(ot, Ye.type, Ye.source).reloadTile(Ye, Fe);
            }, nt.prototype.abortTile = function(ot, Ye, Fe) {
              this.getWorkerSource(ot, Ye.type, Ye.source).abortTile(Ye, Fe);
            }, nt.prototype.removeTile = function(ot, Ye, Fe) {
              this.getWorkerSource(ot, Ye.type, Ye.source).removeTile(Ye, Fe);
            }, nt.prototype.removeDEMTile = function(ot, Ye) {
              this.getDEMWorkerSource(ot, Ye.source).removeTile(Ye);
            }, nt.prototype.removeSource = function(ot, Ye, Fe) {
              if (this.workerSources[ot] && this.workerSources[ot][Ye.type] && this.workerSources[ot][Ye.type][Ye.source]) {
                var pt = this.workerSources[ot][Ye.type][Ye.source];
                delete this.workerSources[ot][Ye.type][Ye.source], pt.removeSource !== void 0 ? pt.removeSource(Ye, Fe) : Fe();
              }
            }, nt.prototype.loadWorkerSource = function(ot, Ye, Fe) {
              try {
                this.self.importScripts(Ye.url), Fe();
              } catch (pt) {
                Fe(pt.toString());
              }
            }, nt.prototype.syncRTLPluginState = function(ot, Ye, Fe) {
              try {
                i.plugin.setState(Ye);
                var pt = i.plugin.getPluginURL();
                if (i.plugin.isLoaded() && !i.plugin.isParsed() && pt != null) {
                  this.self.importScripts(pt);
                  var Mt = i.plugin.isParsed();
                  Fe(Mt ? void 0 : new Error("RTL Text Plugin failed to import scripts from " + pt), Mt);
                }
              } catch (At) {
                Fe(At.toString());
              }
            }, nt.prototype.getAvailableImages = function(ot) {
              var Ye = this.availableImages[ot];
              return Ye || (Ye = []), Ye;
            }, nt.prototype.getLayerIndex = function(ot) {
              var Ye = this.layerIndexes[ot];
              return Ye || (Ye = this.layerIndexes[ot] = new _()), Ye;
            }, nt.prototype.getWorkerSource = function(ot, Ye, Fe) {
              var pt = this;
              if (this.workerSources[ot] || (this.workerSources[ot] = {}), this.workerSources[ot][Ye] || (this.workerSources[ot][Ye] = {}), !this.workerSources[ot][Ye][Fe]) {
                var Mt = { send: function(At, Rt, Ft) {
                  pt.actor.send(At, Rt, Ft, ot);
                } };
                this.workerSources[ot][Ye][Fe] = new this.workerSourceTypes[Ye](Mt, this.getLayerIndex(ot), this.getAvailableImages(ot));
              }
              return this.workerSources[ot][Ye][Fe];
            }, nt.prototype.getDEMWorkerSource = function(ot, Ye) {
              return this.demWorkerSources[ot] || (this.demWorkerSources[ot] = {}), this.demWorkerSources[ot][Ye] || (this.demWorkerSources[ot][Ye] = new w()), this.demWorkerSources[ot][Ye];
            }, nt.prototype.enforceCacheSizeLimit = function(ot, Ye) {
              i.enforceCacheSizeLimit(Ye);
            }, typeof WorkerGlobalScope < "u" && typeof self < "u" && self instanceof WorkerGlobalScope && (self.worker = new nt(self)), nt;
          }), u(0, function(i) {
            var h = i.createCommonjsModule(function(Z) {
              function B(R) {
                return !y(R);
              }
              function y(R) {
                return typeof window < "u" && typeof document < "u" ? Array.prototype && Array.prototype.every && Array.prototype.filter && Array.prototype.forEach && Array.prototype.indexOf && Array.prototype.lastIndexOf && Array.prototype.map && Array.prototype.some && Array.prototype.reduce && Array.prototype.reduceRight && Array.isArray ? Function.prototype && Function.prototype.bind ? Object.keys && Object.create && Object.getPrototypeOf && Object.getOwnPropertyNames && Object.isSealed && Object.isFrozen && Object.isExtensible && Object.getOwnPropertyDescriptor && Object.defineProperty && Object.defineProperties && Object.seal && Object.freeze && Object.preventExtensions ? "JSON" in window && "parse" in JSON && "stringify" in JSON ? function() {
                  if (!("Worker" in window && "Blob" in window && "URL" in window)) return !1;
                  var G, ie, fe = new Blob([""], { type: "text/javascript" }), xe = URL.createObjectURL(fe);
                  try {
                    ie = new Worker(xe), G = !0;
                  } catch {
                    G = !1;
                  }
                  return ie && ie.terminate(), URL.revokeObjectURL(xe), G;
                }() ? "Uint8ClampedArray" in window ? ArrayBuffer.isView ? function() {
                  var G = document.createElement("canvas");
                  G.width = G.height = 1;
                  var ie = G.getContext("2d");
                  if (!ie) return !1;
                  var fe = ie.getImageData(0, 0, 1, 1);
                  return fe && fe.width === G.width;
                }() ? (j = R && R.failIfMajorPerformanceCaveat, b[j] === void 0 && (b[j] = function(G) {
                  var ie = function(xe) {
                    var Te = document.createElement("canvas"), ze = Object.create(B.webGLContextAttributes);
                    return ze.failIfMajorPerformanceCaveat = xe, Te.probablySupportsContext ? Te.probablySupportsContext("webgl", ze) || Te.probablySupportsContext("experimental-webgl", ze) : Te.supportsContext ? Te.supportsContext("webgl", ze) || Te.supportsContext("experimental-webgl", ze) : Te.getContext("webgl", ze) || Te.getContext("experimental-webgl", ze);
                  }(G);
                  if (!ie) return !1;
                  var fe = ie.createShader(ie.VERTEX_SHADER);
                  return !(!fe || ie.isContextLost()) && (ie.shaderSource(fe, "void main() {}"), ie.compileShader(fe), ie.getShaderParameter(fe, ie.COMPILE_STATUS) === !0);
                }(j)), b[j] ? void 0 : "insufficient WebGL support") : "insufficient Canvas/getImageData support" : "insufficient ArrayBuffer support" : "insufficient Uint8ClampedArray support" : "insufficient worker support" : "insufficient JSON support" : "insufficient Object support" : "insufficient Function support" : "insufficent Array support" : "not a browser";
                var j;
              }
              Z.exports ? Z.exports = B : window && (window.mapboxgl = window.mapboxgl || {}, window.mapboxgl.supported = B, window.mapboxgl.notSupportedReason = y);
              var b = {};
              B.webGLContextAttributes = { antialias: !1, alpha: !0, stencil: !0, depth: !0 };
            }), p = { create: function(Z, B, y) {
              var b = i.window.document.createElement(Z);
              return B !== void 0 && (b.className = B), y && y.appendChild(b), b;
            }, createNS: function(Z, B) {
              return i.window.document.createElementNS(Z, B);
            } }, _ = i.window.document && i.window.document.documentElement.style;
            function d(Z) {
              if (!_) return Z[0];
              for (var B = 0; B < Z.length; B++) if (Z[B] in _) return Z[B];
              return Z[0];
            }
            var f, c = d(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]);
            p.disableDrag = function() {
              _ && c && (f = _[c], _[c] = "none");
            }, p.enableDrag = function() {
              _ && c && (_[c] = f);
            };
            var g = d(["transform", "WebkitTransform"]);
            p.setTransform = function(Z, B) {
              Z.style[g] = B;
            };
            var m = !1;
            try {
              var x = Object.defineProperty({}, "passive", { get: function() {
                m = !0;
              } });
              i.window.addEventListener("test", x, x), i.window.removeEventListener("test", x, x);
            } catch {
              m = !1;
            }
            p.addEventListener = function(Z, B, y, b) {
              b === void 0 && (b = {}), "passive" in b && m ? Z.addEventListener(B, y, b) : Z.addEventListener(B, y, b.capture);
            }, p.removeEventListener = function(Z, B, y, b) {
              b === void 0 && (b = {}), "passive" in b && m ? Z.removeEventListener(B, y, b) : Z.removeEventListener(B, y, b.capture);
            };
            var w = function(Z) {
              Z.preventDefault(), Z.stopPropagation(), i.window.removeEventListener("click", w, !0);
            };
            function k(Z) {
              var B = Z.userImage;
              return !!(B && B.render && B.render()) && (Z.data.replace(new Uint8Array(B.data.buffer)), !0);
            }
            p.suppressClick = function() {
              i.window.addEventListener("click", w, !0), i.window.setTimeout(function() {
                i.window.removeEventListener("click", w, !0);
              }, 0);
            }, p.mousePos = function(Z, B) {
              var y = Z.getBoundingClientRect();
              return new i.Point(B.clientX - y.left - Z.clientLeft, B.clientY - y.top - Z.clientTop);
            }, p.touchPos = function(Z, B) {
              for (var y = Z.getBoundingClientRect(), b = [], R = 0; R < B.length; R++) b.push(new i.Point(B[R].clientX - y.left - Z.clientLeft, B[R].clientY - y.top - Z.clientTop));
              return b;
            }, p.mouseButton = function(Z) {
              return i.window.InstallTrigger !== void 0 && Z.button === 2 && Z.ctrlKey && i.window.navigator.platform.toUpperCase().indexOf("MAC") >= 0 ? 0 : Z.button;
            }, p.remove = function(Z) {
              Z.parentNode && Z.parentNode.removeChild(Z);
            };
            var S = function(Z) {
              function B() {
                Z.call(this), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new i.RGBAImage({ width: 1, height: 1 }), this.dirty = !0;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.isLoaded = function() {
                return this.loaded;
              }, B.prototype.setLoaded = function(y) {
                if (this.loaded !== y && (this.loaded = y, y)) {
                  for (var b = 0, R = this.requestors; b < R.length; b += 1) {
                    var j = R[b], G = j.ids, ie = j.callback;
                    this._notify(G, ie);
                  }
                  this.requestors = [];
                }
              }, B.prototype.getImage = function(y) {
                return this.images[y];
              }, B.prototype.addImage = function(y, b) {
                this._validate(y, b) && (this.images[y] = b);
              }, B.prototype._validate = function(y, b) {
                var R = !0;
                return this._validateStretch(b.stretchX, b.data && b.data.width) || (this.fire(new i.ErrorEvent(new Error('Image "' + y + '" has invalid "stretchX" value'))), R = !1), this._validateStretch(b.stretchY, b.data && b.data.height) || (this.fire(new i.ErrorEvent(new Error('Image "' + y + '" has invalid "stretchY" value'))), R = !1), this._validateContent(b.content, b) || (this.fire(new i.ErrorEvent(new Error('Image "' + y + '" has invalid "content" value'))), R = !1), R;
              }, B.prototype._validateStretch = function(y, b) {
                if (!y) return !0;
                for (var R = 0, j = 0, G = y; j < G.length; j += 1) {
                  var ie = G[j];
                  if (ie[0] < R || ie[1] < ie[0] || b < ie[1]) return !1;
                  R = ie[1];
                }
                return !0;
              }, B.prototype._validateContent = function(y, b) {
                return !(y && (y.length !== 4 || y[0] < 0 || b.data.width < y[0] || y[1] < 0 || b.data.height < y[1] || y[2] < 0 || b.data.width < y[2] || y[3] < 0 || b.data.height < y[3] || y[2] < y[0] || y[3] < y[1]));
              }, B.prototype.updateImage = function(y, b) {
                var R = this.images[y];
                b.version = R.version + 1, this.images[y] = b, this.updatedImages[y] = !0;
              }, B.prototype.removeImage = function(y) {
                var b = this.images[y];
                delete this.images[y], delete this.patterns[y], b.userImage && b.userImage.onRemove && b.userImage.onRemove();
              }, B.prototype.listImages = function() {
                return Object.keys(this.images);
              }, B.prototype.getImages = function(y, b) {
                var R = !0;
                if (!this.isLoaded()) for (var j = 0, G = y; j < G.length; j += 1) {
                  var ie = G[j];
                  this.images[ie] || (R = !1);
                }
                this.isLoaded() || R ? this._notify(y, b) : this.requestors.push({ ids: y, callback: b });
              }, B.prototype._notify = function(y, b) {
                for (var R = {}, j = 0, G = y; j < G.length; j += 1) {
                  var ie = G[j];
                  this.images[ie] || this.fire(new i.Event("styleimagemissing", { id: ie }));
                  var fe = this.images[ie];
                  fe ? R[ie] = { data: fe.data.clone(), pixelRatio: fe.pixelRatio, sdf: fe.sdf, version: fe.version, stretchX: fe.stretchX, stretchY: fe.stretchY, content: fe.content, hasRenderCallback: !!(fe.userImage && fe.userImage.render) } : i.warnOnce('Image "' + ie + '" 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.');
                }
                b(null, R);
              }, B.prototype.getPixelSize = function() {
                var y = this.atlasImage;
                return { width: y.width, height: y.height };
              }, B.prototype.getPattern = function(y) {
                var b = this.patterns[y], R = this.getImage(y);
                if (!R) return null;
                if (b && b.position.version === R.version) return b.position;
                if (b) b.position.version = R.version;
                else {
                  var j = { w: R.data.width + 2, h: R.data.height + 2, x: 0, y: 0 }, G = new i.ImagePosition(j, R);
                  this.patterns[y] = { bin: j, position: G };
                }
                return this._updatePatternAtlas(), this.patterns[y].position;
              }, B.prototype.bind = function(y) {
                var b = y.gl;
                this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new i.Texture(y, this.atlasImage, b.RGBA), this.atlasTexture.bind(b.LINEAR, b.CLAMP_TO_EDGE);
              }, B.prototype._updatePatternAtlas = function() {
                var y = [];
                for (var b in this.patterns) y.push(this.patterns[b].bin);
                var R = i.potpack(y), j = R.w, G = R.h, ie = this.atlasImage;
                for (var fe in ie.resize({ width: j || 1, height: G || 1 }), this.patterns) {
                  var xe = this.patterns[fe].bin, Te = xe.x + 1, ze = xe.y + 1, Ve = this.images[fe].data, ut = Ve.width, gt = Ve.height;
                  i.RGBAImage.copy(Ve, ie, { x: 0, y: 0 }, { x: Te, y: ze }, { width: ut, height: gt }), i.RGBAImage.copy(Ve, ie, { x: 0, y: gt - 1 }, { x: Te, y: ze - 1 }, { width: ut, height: 1 }), i.RGBAImage.copy(Ve, ie, { x: 0, y: 0 }, { x: Te, y: ze + gt }, { width: ut, height: 1 }), i.RGBAImage.copy(Ve, ie, { x: ut - 1, y: 0 }, { x: Te - 1, y: ze }, { width: 1, height: gt }), i.RGBAImage.copy(Ve, ie, { x: 0, y: 0 }, { x: Te + ut, y: ze }, { width: 1, height: gt });
                }
                this.dirty = !0;
              }, B.prototype.beginFrame = function() {
                this.callbackDispatchedThisFrame = {};
              }, B.prototype.dispatchRenderCallbacks = function(y) {
                for (var b = 0, R = y; b < R.length; b += 1) {
                  var j = R[b];
                  if (!this.callbackDispatchedThisFrame[j]) {
                    this.callbackDispatchedThisFrame[j] = !0;
                    var G = this.images[j];
                    k(G) && this.updateImage(j, G);
                  }
                }
              }, B;
            }(i.Evented), A = L, C = L, D = 1e20;
            function L(Z, B, y, b, R, j) {
              this.fontSize = Z || 24, this.buffer = B === void 0 ? 3 : B, this.cutoff = b || 0.25, this.fontFamily = R || "sans-serif", this.fontWeight = j || "normal", this.radius = y || 8;
              var G = this.size = this.fontSize + 2 * this.buffer;
              this.canvas = document.createElement("canvas"), this.canvas.width = this.canvas.height = G, this.ctx = this.canvas.getContext("2d"), this.ctx.font = this.fontWeight + " " + this.fontSize + "px " + this.fontFamily, this.ctx.textBaseline = "middle", this.ctx.fillStyle = "black", this.gridOuter = new Float64Array(G * G), this.gridInner = new Float64Array(G * G), this.f = new Float64Array(G), this.d = new Float64Array(G), this.z = new Float64Array(G + 1), this.v = new Int16Array(G), this.middle = Math.round(G / 2 * (navigator.userAgent.indexOf("Gecko/") >= 0 ? 1.2 : 1));
            }
            function E(Z, B, y, b, R, j, G) {
              for (var ie = 0; ie < B; ie++) {
                for (var fe = 0; fe < y; fe++) b[fe] = Z[fe * B + ie];
                for (P(b, R, j, G, y), fe = 0; fe < y; fe++) Z[fe * B + ie] = R[fe];
              }
              for (fe = 0; fe < y; fe++) {
                for (ie = 0; ie < B; ie++) b[ie] = Z[fe * B + ie];
                for (P(b, R, j, G, B), ie = 0; ie < B; ie++) Z[fe * B + ie] = Math.sqrt(R[ie]);
              }
            }
            function P(Z, B, y, b, R) {
              y[0] = 0, b[0] = -D, b[1] = +D;
              for (var j = 1, G = 0; j < R; j++) {
                for (var ie = (Z[j] + j * j - (Z[y[G]] + y[G] * y[G])) / (2 * j - 2 * y[G]); ie <= b[G]; ) G--, ie = (Z[j] + j * j - (Z[y[G]] + y[G] * y[G])) / (2 * j - 2 * y[G]);
                y[++G] = j, b[G] = ie, b[G + 1] = +D;
              }
              for (j = 0, G = 0; j < R; j++) {
                for (; b[G + 1] < j; ) G++;
                B[j] = (j - y[G]) * (j - y[G]) + Z[y[G]];
              }
            }
            L.prototype.draw = function(Z) {
              this.ctx.clearRect(0, 0, this.size, this.size), this.ctx.fillText(Z, this.buffer, this.middle);
              for (var B = this.ctx.getImageData(0, 0, this.size, this.size), y = new Uint8ClampedArray(this.size * this.size), b = 0; b < this.size * this.size; b++) {
                var R = B.data[4 * b + 3] / 255;
                this.gridOuter[b] = R === 1 ? 0 : R === 0 ? D : Math.pow(Math.max(0, 0.5 - R), 2), this.gridInner[b] = R === 1 ? D : R === 0 ? 0 : Math.pow(Math.max(0, R - 0.5), 2);
              }
              for (E(this.gridOuter, this.size, this.size, this.f, this.d, this.v, this.z), E(this.gridInner, this.size, this.size, this.f, this.d, this.v, this.z), b = 0; b < this.size * this.size; b++) {
                var j = this.gridOuter[b] - this.gridInner[b];
                y[b] = Math.max(0, Math.min(255, Math.round(255 - 255 * (j / this.radius + this.cutoff))));
              }
              return y;
            }, A.default = C;
            var I = function(Z, B) {
              this.requestManager = Z, this.localIdeographFontFamily = B, this.entries = {};
            };
            I.prototype.setURL = function(Z) {
              this.url = Z;
            }, I.prototype.getGlyphs = function(Z, B) {
              var y = this, b = [];
              for (var R in Z) for (var j = 0, G = Z[R]; j < G.length; j += 1) {
                var ie = G[j];
                b.push({ stack: R, id: ie });
              }
              i.asyncAll(b, function(fe, xe) {
                var Te = fe.stack, ze = fe.id, Ve = y.entries[Te];
                Ve || (Ve = y.entries[Te] = { glyphs: {}, requests: {}, ranges: {} });
                var ut = Ve.glyphs[ze];
                if (ut === void 0) {
                  if (ut = y._tinySDF(Ve, Te, ze)) return Ve.glyphs[ze] = ut, void xe(null, { stack: Te, id: ze, glyph: ut });
                  var gt = Math.floor(ze / 256);
                  if (256 * gt > 65535) xe(new Error("glyphs > 65535 not supported"));
                  else if (Ve.ranges[gt]) xe(null, { stack: Te, id: ze, glyph: ut });
                  else {
                    var wt = Ve.requests[gt];
                    wt || (wt = Ve.requests[gt] = [], I.loadGlyphRange(Te, gt, y.url, y.requestManager, function(Et, zt) {
                      if (zt) {
                        for (var It in zt) y._doesCharSupportLocalGlyph(+It) || (Ve.glyphs[+It] = zt[+It]);
                        Ve.ranges[gt] = !0;
                      }
                      for (var jt = 0, Lt = wt; jt < Lt.length; jt += 1) (0, Lt[jt])(Et, zt);
                      delete Ve.requests[gt];
                    })), wt.push(function(Et, zt) {
                      Et ? xe(Et) : zt && xe(null, { stack: Te, id: ze, glyph: zt[ze] || null });
                    });
                  }
                } else xe(null, { stack: Te, id: ze, glyph: ut });
              }, function(fe, xe) {
                if (fe) B(fe);
                else if (xe) {
                  for (var Te = {}, ze = 0, Ve = xe; ze < Ve.length; ze += 1) {
                    var ut = Ve[ze], gt = ut.stack, wt = ut.id, Et = ut.glyph;
                    (Te[gt] || (Te[gt] = {}))[wt] = Et && { id: Et.id, bitmap: Et.bitmap.clone(), metrics: Et.metrics };
                  }
                  B(null, Te);
                }
              });
            }, I.prototype._doesCharSupportLocalGlyph = function(Z) {
              return !!this.localIdeographFontFamily && (i.isChar["CJK Unified Ideographs"](Z) || i.isChar["Hangul Syllables"](Z) || i.isChar.Hiragana(Z) || i.isChar.Katakana(Z));
            }, I.prototype._tinySDF = function(Z, B, y) {
              var b = this.localIdeographFontFamily;
              if (b && this._doesCharSupportLocalGlyph(y)) {
                var R = Z.tinySDF;
                if (!R) {
                  var j = "400";
                  /bold/i.test(B) ? j = "900" : /medium/i.test(B) ? j = "500" : /light/i.test(B) && (j = "200"), R = Z.tinySDF = new I.TinySDF(24, 3, 8, 0.25, b, j);
                }
                return { id: y, bitmap: new i.AlphaImage({ width: 30, height: 30 }, R.draw(String.fromCharCode(y))), metrics: { width: 24, height: 24, left: 0, top: -8, advance: 24 } };
              }
            }, I.loadGlyphRange = function(Z, B, y, b, R) {
              var j = 256 * B, G = j + 255, ie = b.transformRequest(b.normalizeGlyphsURL(y).replace("{fontstack}", Z).replace("{range}", j + "-" + G), i.ResourceType.Glyphs);
              i.getArrayBuffer(ie, function(fe, xe) {
                if (fe) R(fe);
                else if (xe) {
                  for (var Te = {}, ze = 0, Ve = i.parseGlyphPBF(xe); ze < Ve.length; ze += 1) {
                    var ut = Ve[ze];
                    Te[ut.id] = ut;
                  }
                  R(null, Te);
                }
              });
            }, I.TinySDF = A;
            var M = function() {
              this.specification = i.styleSpec.light.position;
            };
            M.prototype.possiblyEvaluate = function(Z, B) {
              return i.sphericalToCartesian(Z.expression.evaluate(B));
            }, M.prototype.interpolate = function(Z, B, y) {
              return { x: i.number(Z.x, B.x, y), y: i.number(Z.y, B.y, y), z: i.number(Z.z, B.z, y) };
            };
            var O = new i.Properties({ anchor: new i.DataConstantProperty(i.styleSpec.light.anchor), position: new M(), color: new i.DataConstantProperty(i.styleSpec.light.color), intensity: new i.DataConstantProperty(i.styleSpec.light.intensity) }), T = "-transition", z = function(Z) {
              function B(y) {
                Z.call(this), this._transitionable = new i.Transitionable(O), this.setLight(y), this._transitioning = this._transitionable.untransitioned();
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getLight = function() {
                return this._transitionable.serialize();
              }, B.prototype.setLight = function(y, b) {
                if (b === void 0 && (b = {}), !this._validate(i.validateLight, y, b)) for (var R in y) {
                  var j = y[R];
                  i.endsWith(R, T) ? this._transitionable.setTransition(R.slice(0, -11), j) : this._transitionable.setValue(R, j);
                }
              }, B.prototype.updateTransitions = function(y) {
                this._transitioning = this._transitionable.transitioned(y, this._transitioning);
              }, B.prototype.hasTransition = function() {
                return this._transitioning.hasTransition();
              }, B.prototype.recalculate = function(y) {
                this.properties = this._transitioning.possiblyEvaluate(y);
              }, B.prototype._validate = function(y, b, R) {
                return (!R || R.validate !== !1) && i.emitValidationErrors(this, y.call(i.validateStyle, i.extend({ value: b, style: { glyphs: !0, sprite: !0 }, styleSpec: i.styleSpec })));
              }, B;
            }(i.Evented), F = function(Z, B) {
              this.width = Z, this.height = B, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {};
            };
            F.prototype.getDash = function(Z, B) {
              var y = Z.join(",") + String(B);
              return this.dashEntry[y] || (this.dashEntry[y] = this.addDash(Z, B)), this.dashEntry[y];
            }, F.prototype.getDashRanges = function(Z, B, y) {
              var b = [], R = Z.length % 2 == 1 ? -Z[Z.length - 1] * y : 0, j = Z[0] * y, G = !0;
              b.push({ left: R, right: j, isDash: G, zeroLength: Z[0] === 0 });
              for (var ie = Z[0], fe = 1; fe < Z.length; fe++) {
                G = !G;
                var xe = Z[fe];
                R = ie * y, j = (ie += xe) * y, b.push({ left: R, right: j, isDash: G, zeroLength: xe === 0 });
              }
              return b;
            }, F.prototype.addRoundDash = function(Z, B, y) {
              for (var b = B / 2, R = -y; R <= y; R++) for (var j = this.nextRow + y + R, G = this.width * j, ie = 0, fe = Z[ie], xe = 0; xe < this.width; xe++) {
                xe / fe.right > 1 && (fe = Z[++ie]);
                var Te = Math.abs(xe - fe.left), ze = Math.abs(xe - fe.right), Ve = Math.min(Te, ze), ut = void 0, gt = R / y * (b + 1);
                if (fe.isDash) {
                  var wt = b - Math.abs(gt);
                  ut = Math.sqrt(Ve * Ve + wt * wt);
                } else ut = b - Math.sqrt(Ve * Ve + gt * gt);
                this.data[G + xe] = Math.max(0, Math.min(255, ut + 128));
              }
            }, F.prototype.addRegularDash = function(Z) {
              for (var B = Z.length - 1; B >= 0; --B) {
                var y = Z[B], b = Z[B + 1];
                y.zeroLength ? Z.splice(B, 1) : b && b.isDash === y.isDash && (b.left = y.left, Z.splice(B, 1));
              }
              var R = Z[0], j = Z[Z.length - 1];
              R.isDash === j.isDash && (R.left = j.left - this.width, j.right = R.right + this.width);
              for (var G = this.width * this.nextRow, ie = 0, fe = Z[ie], xe = 0; xe < this.width; xe++) {
                xe / fe.right > 1 && (fe = Z[++ie]);
                var Te = Math.abs(xe - fe.left), ze = Math.abs(xe - fe.right), Ve = Math.min(Te, ze), ut = fe.isDash ? Ve : -Ve;
                this.data[G + xe] = Math.max(0, Math.min(255, ut + 128));
              }
            }, F.prototype.addDash = function(Z, B) {
              var y = B ? 7 : 0, b = 2 * y + 1;
              if (this.nextRow + b > this.height) return i.warnOnce("LineAtlas out of space"), null;
              for (var R = 0, j = 0; j < Z.length; j++) R += Z[j];
              if (R !== 0) {
                var G = this.width / R, ie = this.getDashRanges(Z, this.width, G);
                B ? this.addRoundDash(ie, G, y) : this.addRegularDash(ie);
              }
              var fe = { y: (this.nextRow + y + 0.5) / this.height, height: 2 * y / this.height, width: R };
              return this.nextRow += b, this.dirty = !0, fe;
            }, F.prototype.bind = function(Z) {
              var B = Z.gl;
              this.texture ? (B.bindTexture(B.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, B.texSubImage2D(B.TEXTURE_2D, 0, 0, 0, this.width, this.height, B.ALPHA, B.UNSIGNED_BYTE, this.data))) : (this.texture = B.createTexture(), B.bindTexture(B.TEXTURE_2D, this.texture), B.texParameteri(B.TEXTURE_2D, B.TEXTURE_WRAP_S, B.REPEAT), B.texParameteri(B.TEXTURE_2D, B.TEXTURE_WRAP_T, B.REPEAT), B.texParameteri(B.TEXTURE_2D, B.TEXTURE_MIN_FILTER, B.LINEAR), B.texParameteri(B.TEXTURE_2D, B.TEXTURE_MAG_FILTER, B.LINEAR), B.texImage2D(B.TEXTURE_2D, 0, B.ALPHA, this.width, this.height, 0, B.ALPHA, B.UNSIGNED_BYTE, this.data));
            };
            var U = function Z(B, y) {
              this.workerPool = B, this.actors = [], this.currentActor = 0, this.id = i.uniqueId();
              for (var b = this.workerPool.acquire(this.id), R = 0; R < b.length; R++) {
                var j = b[R], G = new Z.Actor(j, y, this.id);
                G.name = "Worker " + R, this.actors.push(G);
              }
            };
            function V(Z, B, y) {
              var b = function(R, j) {
                if (R) return y(R);
                if (j) {
                  var G = i.pick(i.extend(j, Z), ["tiles", "minzoom", "maxzoom", "attribution", "mapbox_logo", "bounds", "scheme", "tileSize", "encoding"]);
                  j.vector_layers && (G.vectorLayers = j.vector_layers, G.vectorLayerIds = G.vectorLayers.map(function(ie) {
                    return ie.id;
                  })), G.tiles = B.canonicalizeTileset(G, Z.url), y(null, G);
                }
              };
              return Z.url ? i.getJSON(B.transformRequest(B.normalizeSourceURL(Z.url), i.ResourceType.Source), b) : i.browser.frame(function() {
                return b(null, Z);
              });
            }
            U.prototype.broadcast = function(Z, B, y) {
              y = y || function() {
              }, i.asyncAll(this.actors, function(b, R) {
                b.send(Z, B, R);
              }, y);
            }, U.prototype.getActor = function() {
              return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor];
            }, U.prototype.remove = function() {
              this.actors.forEach(function(Z) {
                Z.remove();
              }), this.actors = [], this.workerPool.release(this.id);
            }, U.Actor = i.Actor;
            var $ = function(Z, B, y) {
              this.bounds = i.LngLatBounds.convert(this.validateBounds(Z)), this.minzoom = B || 0, this.maxzoom = y || 24;
            };
            $.prototype.validateBounds = function(Z) {
              return Array.isArray(Z) && Z.length === 4 ? [Math.max(-180, Z[0]), Math.max(-90, Z[1]), Math.min(180, Z[2]), Math.min(90, Z[3])] : [-180, -90, 180, 90];
            }, $.prototype.contains = function(Z) {
              var B = Math.pow(2, Z.z), y = Math.floor(i.mercatorXfromLng(this.bounds.getWest()) * B), b = Math.floor(i.mercatorYfromLat(this.bounds.getNorth()) * B), R = Math.ceil(i.mercatorXfromLng(this.bounds.getEast()) * B), j = Math.ceil(i.mercatorYfromLat(this.bounds.getSouth()) * B);
              return Z.x >= y && Z.x < R && Z.y >= b && Z.y < j;
            };
            var q = function(Z) {
              function B(y, b, R, j) {
                if (Z.call(this), this.id = y, this.dispatcher = R, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, i.extend(this, i.pick(b, ["url", "scheme", "tileSize", "promoteId"])), this._options = i.extend({ type: "vector" }, b), this._collectResourceTiming = b.collectResourceTiming, this.tileSize !== 512) throw new Error("vector tile sources must have a tileSize of 512");
                this.setEventedParent(j);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function() {
                var y = this;
                this._loaded = !1, this.fire(new i.Event("dataloading", { dataType: "source" })), this._tileJSONRequest = V(this._options, this.map._requestManager, function(b, R) {
                  y._tileJSONRequest = null, y._loaded = !0, b ? y.fire(new i.ErrorEvent(b)) : R && (i.extend(y, R), R.bounds && (y.tileBounds = new $(R.bounds, y.minzoom, y.maxzoom)), i.postTurnstileEvent(R.tiles, y.map._requestManager._customAccessToken), i.postMapLoadEvent(R.tiles, y.map._getMapId(), y.map._requestManager._skuToken, y.map._requestManager._customAccessToken), y.fire(new i.Event("data", { dataType: "source", sourceDataType: "metadata" })), y.fire(new i.Event("data", { dataType: "source", sourceDataType: "content" })));
                });
              }, B.prototype.loaded = function() {
                return this._loaded;
              }, B.prototype.hasTile = function(y) {
                return !this.tileBounds || this.tileBounds.contains(y.canonical);
              }, B.prototype.onAdd = function(y) {
                this.map = y, this.load();
              }, B.prototype.setSourceProperty = function(y) {
                this._tileJSONRequest && this._tileJSONRequest.cancel(), y(), this.map.style.sourceCaches[this.id].clearTiles(), this.load();
              }, B.prototype.setTiles = function(y) {
                var b = this;
                return this.setSourceProperty(function() {
                  b._options.tiles = y;
                }), this;
              }, B.prototype.setUrl = function(y) {
                var b = this;
                return this.setSourceProperty(function() {
                  b.url = y, b._options.url = y;
                }), this;
              }, B.prototype.onRemove = function() {
                this._tileJSONRequest && (this._tileJSONRequest.cancel(), this._tileJSONRequest = null);
              }, B.prototype.serialize = function() {
                return i.extend({}, this._options);
              }, B.prototype.loadTile = function(y, b) {
                var R = this.map._requestManager.normalizeTileURL(y.tileID.canonical.url(this.tiles, this.scheme)), j = { request: this.map._requestManager.transformRequest(R, i.ResourceType.Tile), uid: y.uid, tileID: y.tileID, zoom: y.tileID.overscaledZ, tileSize: this.tileSize * y.tileID.overscaleFactor(), type: this.type, source: this.id, pixelRatio: i.browser.devicePixelRatio, showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
                function G(ie, fe) {
                  return delete y.request, y.aborted ? b(null) : ie && ie.status !== 404 ? b(ie) : (fe && fe.resourceTiming && (y.resourceTiming = fe.resourceTiming), this.map._refreshExpiredTiles && fe && y.setExpiryData(fe), y.loadVectorData(fe, this.map.painter), i.cacheEntryPossiblyAdded(this.dispatcher), b(null), void (y.reloadCallback && (this.loadTile(y, y.reloadCallback), y.reloadCallback = null)));
                }
                j.request.collectResourceTiming = this._collectResourceTiming, y.actor && y.state !== "expired" ? y.state === "loading" ? y.reloadCallback = b : y.request = y.actor.send("reloadTile", j, G.bind(this)) : (y.actor = this.dispatcher.getActor(), y.request = y.actor.send("loadTile", j, G.bind(this)));
              }, B.prototype.abortTile = function(y) {
                y.request && (y.request.cancel(), delete y.request), y.actor && y.actor.send("abortTile", { uid: y.uid, type: this.type, source: this.id }, void 0);
              }, B.prototype.unloadTile = function(y) {
                y.unloadVectorData(), y.actor && y.actor.send("removeTile", { uid: y.uid, type: this.type, source: this.id }, void 0);
              }, B.prototype.hasTransition = function() {
                return !1;
              }, B;
            }(i.Evented), K = function(Z) {
              function B(y, b, R, j) {
                Z.call(this), this.id = y, this.dispatcher = R, this.setEventedParent(j), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = i.extend({ type: "raster" }, b), i.extend(this, i.pick(b, ["url", "scheme", "tileSize"]));
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function() {
                var y = this;
                this._loaded = !1, this.fire(new i.Event("dataloading", { dataType: "source" })), this._tileJSONRequest = V(this._options, this.map._requestManager, function(b, R) {
                  y._tileJSONRequest = null, y._loaded = !0, b ? y.fire(new i.ErrorEvent(b)) : R && (i.extend(y, R), R.bounds && (y.tileBounds = new $(R.bounds, y.minzoom, y.maxzoom)), i.postTurnstileEvent(R.tiles), i.postMapLoadEvent(R.tiles, y.map._getMapId(), y.map._requestManager._skuToken), y.fire(new i.Event("data", { dataType: "source", sourceDataType: "metadata" })), y.fire(new i.Event("data", { dataType: "source", sourceDataType: "content" })));
                });
              }, B.prototype.loaded = function() {
                return this._loaded;
              }, B.prototype.onAdd = function(y) {
                this.map = y, this.load();
              }, B.prototype.onRemove = function() {
                this._tileJSONRequest && (this._tileJSONRequest.cancel(), this._tileJSONRequest = null);
              }, B.prototype.serialize = function() {
                return i.extend({}, this._options);
              }, B.prototype.hasTile = function(y) {
                return !this.tileBounds || this.tileBounds.contains(y.canonical);
              }, B.prototype.loadTile = function(y, b) {
                var R = this, j = this.map._requestManager.normalizeTileURL(y.tileID.canonical.url(this.tiles, this.scheme), this.tileSize);
                y.request = i.getImage(this.map._requestManager.transformRequest(j, i.ResourceType.Tile), function(G, ie) {
                  if (delete y.request, y.aborted) y.state = "unloaded", b(null);
                  else if (G) y.state = "errored", b(G);
                  else if (ie) {
                    R.map._refreshExpiredTiles && y.setExpiryData(ie), delete ie.cacheControl, delete ie.expires;
                    var fe = R.map.painter.context, xe = fe.gl;
                    y.texture = R.map.painter.getTileTexture(ie.width), y.texture ? y.texture.update(ie, { useMipmap: !0 }) : (y.texture = new i.Texture(fe, ie, xe.RGBA, { useMipmap: !0 }), y.texture.bind(xe.LINEAR, xe.CLAMP_TO_EDGE, xe.LINEAR_MIPMAP_NEAREST), fe.extTextureFilterAnisotropic && xe.texParameterf(xe.TEXTURE_2D, fe.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, fe.extTextureFilterAnisotropicMax)), y.state = "loaded", i.cacheEntryPossiblyAdded(R.dispatcher), b(null);
                  }
                });
              }, B.prototype.abortTile = function(y, b) {
                y.request && (y.request.cancel(), delete y.request), b();
              }, B.prototype.unloadTile = function(y, b) {
                y.texture && this.map.painter.saveTileTexture(y.texture), b();
              }, B.prototype.hasTransition = function() {
                return !1;
              }, B;
            }(i.Evented), re = function(Z) {
              function B(y, b, R, j) {
                Z.call(this, y, b, R, j), this.type = "raster-dem", this.maxzoom = 22, this._options = i.extend({ type: "raster-dem" }, b), this.encoding = b.encoding || "mapbox";
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.serialize = function() {
                return { type: "raster-dem", url: this.url, tileSize: this.tileSize, tiles: this.tiles, bounds: this.bounds, encoding: this.encoding };
              }, B.prototype.loadTile = function(y, b) {
                var R = this.map._requestManager.normalizeTileURL(y.tileID.canonical.url(this.tiles, this.scheme), this.tileSize);
                function j(G, ie) {
                  G && (y.state = "errored", b(G)), ie && (y.dem = ie, y.needsHillshadePrepare = !0, y.state = "loaded", b(null));
                }
                y.request = i.getImage(this.map._requestManager.transformRequest(R, i.ResourceType.Tile), (function(G, ie) {
                  if (delete y.request, y.aborted) y.state = "unloaded", b(null);
                  else if (G) y.state = "errored", b(G);
                  else if (ie) {
                    this.map._refreshExpiredTiles && y.setExpiryData(ie), delete ie.cacheControl, delete ie.expires;
                    var fe = i.window.ImageBitmap && ie instanceof i.window.ImageBitmap && i.offscreenCanvasSupported() ? ie : i.browser.getImageData(ie, 1), xe = { uid: y.uid, coord: y.tileID, source: this.id, rawImageData: fe, encoding: this.encoding };
                    y.actor && y.state !== "expired" || (y.actor = this.dispatcher.getActor(), y.actor.send("loadDEMTile", xe, j.bind(this)));
                  }
                }).bind(this)), y.neighboringTiles = this._getNeighboringTiles(y.tileID);
              }, B.prototype._getNeighboringTiles = function(y) {
                var b = y.canonical, R = Math.pow(2, b.z), j = (b.x - 1 + R) % R, G = b.x === 0 ? y.wrap - 1 : y.wrap, ie = (b.x + 1 + R) % R, fe = b.x + 1 === R ? y.wrap + 1 : y.wrap, xe = {};
                return xe[new i.OverscaledTileID(y.overscaledZ, G, b.z, j, b.y).key] = { backfilled: !1 }, xe[new i.OverscaledTileID(y.overscaledZ, fe, b.z, ie, b.y).key] = { backfilled: !1 }, b.y > 0 && (xe[new i.OverscaledTileID(y.overscaledZ, G, b.z, j, b.y - 1).key] = { backfilled: !1 }, xe[new i.OverscaledTileID(y.overscaledZ, y.wrap, b.z, b.x, b.y - 1).key] = { backfilled: !1 }, xe[new i.OverscaledTileID(y.overscaledZ, fe, b.z, ie, b.y - 1).key] = { backfilled: !1 }), b.y + 1 < R && (xe[new i.OverscaledTileID(y.overscaledZ, G, b.z, j, b.y + 1).key] = { backfilled: !1 }, xe[new i.OverscaledTileID(y.overscaledZ, y.wrap, b.z, b.x, b.y + 1).key] = { backfilled: !1 }, xe[new i.OverscaledTileID(y.overscaledZ, fe, b.z, ie, b.y + 1).key] = { backfilled: !1 }), xe;
              }, B.prototype.unloadTile = function(y) {
                y.demTexture && this.map.painter.saveTileTexture(y.demTexture), y.fbo && (y.fbo.destroy(), delete y.fbo), y.dem && delete y.dem, delete y.neighboringTiles, y.state = "unloaded", y.actor && y.actor.send("removeDEMTile", { uid: y.uid, source: this.id });
              }, B;
            }(K), Y = function(Z) {
              function B(y, b, R, j) {
                Z.call(this), this.id = y, this.type = "geojson", this.minzoom = 0, this.maxzoom = 18, this.tileSize = 512, this.isTileClipped = !0, this.reparseOverscaled = !0, this._removed = !1, this._loaded = !1, this.actor = R.getActor(), this.setEventedParent(j), this._data = b.data, this._options = i.extend({}, b), this._collectResourceTiming = b.collectResourceTiming, this._resourceTiming = [], b.maxzoom !== void 0 && (this.maxzoom = b.maxzoom), b.type && (this.type = b.type), b.attribution && (this.attribution = b.attribution), this.promoteId = b.promoteId;
                var G = i.EXTENT / this.tileSize;
                this.workerOptions = i.extend({ source: this.id, cluster: b.cluster || !1, geojsonVtOptions: { buffer: (b.buffer !== void 0 ? b.buffer : 128) * G, tolerance: (b.tolerance !== void 0 ? b.tolerance : 0.375) * G, extent: i.EXTENT, maxZoom: this.maxzoom, lineMetrics: b.lineMetrics || !1, generateId: b.generateId || !1 }, superclusterOptions: { maxZoom: b.clusterMaxZoom !== void 0 ? Math.min(b.clusterMaxZoom, this.maxzoom - 1) : this.maxzoom - 1, minPoints: Math.max(2, b.clusterMinPoints || 2), extent: i.EXTENT, radius: (b.clusterRadius || 50) * G, log: !1, generateId: b.generateId || !1 }, clusterProperties: b.clusterProperties, filter: b.filter }, b.workerOptions);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function() {
                var y = this;
                this.fire(new i.Event("dataloading", { dataType: "source" })), this._updateWorkerData(function(b) {
                  if (b) y.fire(new i.ErrorEvent(b));
                  else {
                    var R = { dataType: "source", sourceDataType: "metadata" };
                    y._collectResourceTiming && y._resourceTiming && y._resourceTiming.length > 0 && (R.resourceTiming = y._resourceTiming, y._resourceTiming = []), y.fire(new i.Event("data", R));
                  }
                });
              }, B.prototype.onAdd = function(y) {
                this.map = y, this.load();
              }, B.prototype.setData = function(y) {
                var b = this;
                return this._data = y, this.fire(new i.Event("dataloading", { dataType: "source" })), this._updateWorkerData(function(R) {
                  if (R) b.fire(new i.ErrorEvent(R));
                  else {
                    var j = { dataType: "source", sourceDataType: "content" };
                    b._collectResourceTiming && b._resourceTiming && b._resourceTiming.length > 0 && (j.resourceTiming = b._resourceTiming, b._resourceTiming = []), b.fire(new i.Event("data", j));
                  }
                }), this;
              }, B.prototype.getClusterExpansionZoom = function(y, b) {
                return this.actor.send("geojson.getClusterExpansionZoom", { clusterId: y, source: this.id }, b), this;
              }, B.prototype.getClusterChildren = function(y, b) {
                return this.actor.send("geojson.getClusterChildren", { clusterId: y, source: this.id }, b), this;
              }, B.prototype.getClusterLeaves = function(y, b, R, j) {
                return this.actor.send("geojson.getClusterLeaves", { source: this.id, clusterId: y, limit: b, offset: R }, j), this;
              }, B.prototype._updateWorkerData = function(y) {
                var b = this;
                this._loaded = !1;
                var R = i.extend({}, this.workerOptions), j = this._data;
                typeof j == "string" ? (R.request = this.map._requestManager.transformRequest(i.browser.resolveURL(j), i.ResourceType.Source), R.request.collectResourceTiming = this._collectResourceTiming) : R.data = JSON.stringify(j), this.actor.send(this.type + ".loadData", R, function(G, ie) {
                  b._removed || ie && ie.abandoned || (b._loaded = !0, ie && ie.resourceTiming && ie.resourceTiming[b.id] && (b._resourceTiming = ie.resourceTiming[b.id].slice(0)), b.actor.send(b.type + ".coalesce", { source: R.source }, null), y(G));
                });
              }, B.prototype.loaded = function() {
                return this._loaded;
              }, B.prototype.loadTile = function(y, b) {
                var R = this, j = y.actor ? "reloadTile" : "loadTile";
                y.actor = this.actor;
                var G = { type: this.type, uid: y.uid, tileID: y.tileID, zoom: y.tileID.overscaledZ, maxZoom: this.maxzoom, tileSize: this.tileSize, source: this.id, pixelRatio: i.browser.devicePixelRatio, showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
                y.request = this.actor.send(j, G, function(ie, fe) {
                  return delete y.request, y.unloadVectorData(), y.aborted ? b(null) : ie ? b(ie) : (y.loadVectorData(fe, R.map.painter, j === "reloadTile"), b(null));
                });
              }, B.prototype.abortTile = function(y) {
                y.request && (y.request.cancel(), delete y.request), y.aborted = !0;
              }, B.prototype.unloadTile = function(y) {
                y.unloadVectorData(), this.actor.send("removeTile", { uid: y.uid, type: this.type, source: this.id });
              }, B.prototype.onRemove = function() {
                this._removed = !0, this.actor.send("removeSource", { type: this.type, source: this.id });
              }, B.prototype.serialize = function() {
                return i.extend({}, this._options, { type: this.type, data: this._data });
              }, B.prototype.hasTransition = function() {
                return !1;
              }, B;
            }(i.Evented), te = i.createLayout([{ name: "a_pos", type: "Int16", components: 2 }, { name: "a_texture_pos", type: "Int16", components: 2 }]), ee = function(Z) {
              function B(y, b, R, j) {
                Z.call(this), this.id = y, this.dispatcher = R, this.coordinates = b.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(j), this.options = b;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function(y, b) {
                var R = this;
                this._loaded = !1, this.fire(new i.Event("dataloading", { dataType: "source" })), this.url = this.options.url, i.getImage(this.map._requestManager.transformRequest(this.url, i.ResourceType.Image), function(j, G) {
                  R._loaded = !0, j ? R.fire(new i.ErrorEvent(j)) : G && (R.image = G, y && (R.coordinates = y), b && b(), R._finishLoading());
                });
              }, B.prototype.loaded = function() {
                return this._loaded;
              }, B.prototype.updateImage = function(y) {
                var b = this;
                return this.image && y.url ? (this.options.url = y.url, this.load(y.coordinates, function() {
                  b.texture = null;
                }), this) : this;
              }, B.prototype._finishLoading = function() {
                this.map && (this.setCoordinates(this.coordinates), this.fire(new i.Event("data", { dataType: "source", sourceDataType: "metadata" })));
              }, B.prototype.onAdd = function(y) {
                this.map = y, this.load();
              }, B.prototype.setCoordinates = function(y) {
                var b = this;
                this.coordinates = y;
                var R = y.map(i.MercatorCoordinate.fromLngLat);
                this.tileID = function(G) {
                  for (var ie = 1 / 0, fe = 1 / 0, xe = -1 / 0, Te = -1 / 0, ze = 0, Ve = G; ze < Ve.length; ze += 1) {
                    var ut = Ve[ze];
                    ie = Math.min(ie, ut.x), fe = Math.min(fe, ut.y), xe = Math.max(xe, ut.x), Te = Math.max(Te, ut.y);
                  }
                  var gt = xe - ie, wt = Te - fe, Et = Math.max(gt, wt), zt = Math.max(0, Math.floor(-Math.log(Et) / Math.LN2)), It = Math.pow(2, zt);
                  return new i.CanonicalTileID(zt, Math.floor((ie + xe) / 2 * It), Math.floor((fe + Te) / 2 * It));
                }(R), this.minzoom = this.maxzoom = this.tileID.z;
                var j = R.map(function(G) {
                  return b.tileID.getTilePoint(G)._round();
                });
                return this._boundsArray = new i.StructArrayLayout4i8(), this._boundsArray.emplaceBack(j[0].x, j[0].y, 0, 0), this._boundsArray.emplaceBack(j[1].x, j[1].y, i.EXTENT, 0), this._boundsArray.emplaceBack(j[3].x, j[3].y, 0, i.EXTENT), this._boundsArray.emplaceBack(j[2].x, j[2].y, i.EXTENT, i.EXTENT), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new i.Event("data", { dataType: "source", sourceDataType: "content" })), this;
              }, B.prototype.prepare = function() {
                if (Object.keys(this.tiles).length !== 0 && this.image) {
                  var y = this.map.painter.context, b = y.gl;
                  for (var R in this.boundsBuffer || (this.boundsBuffer = y.createVertexBuffer(this._boundsArray, te.members)), this.boundsSegments || (this.boundsSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture || (this.texture = new i.Texture(y, this.image, b.RGBA), this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE)), this.tiles) {
                    var j = this.tiles[R];
                    j.state !== "loaded" && (j.state = "loaded", j.texture = this.texture);
                  }
                }
              }, B.prototype.loadTile = function(y, b) {
                this.tileID && this.tileID.equals(y.tileID.canonical) ? (this.tiles[String(y.tileID.wrap)] = y, y.buckets = {}, b(null)) : (y.state = "errored", b(null));
              }, B.prototype.serialize = function() {
                return { type: "image", url: this.options.url, coordinates: this.coordinates };
              }, B.prototype.hasTransition = function() {
                return !1;
              }, B;
            }(i.Evented), X = function(Z) {
              function B(y, b, R, j) {
                Z.call(this, y, b, R, j), this.roundZoom = !0, this.type = "video", this.options = b;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function() {
                var y = this;
                this._loaded = !1;
                var b = this.options;
                this.urls = [];
                for (var R = 0, j = b.urls; R < j.length; R += 1) {
                  var G = j[R];
                  this.urls.push(this.map._requestManager.transformRequest(G, i.ResourceType.Source).url);
                }
                i.getVideo(this.urls, function(ie, fe) {
                  y._loaded = !0, ie ? y.fire(new i.ErrorEvent(ie)) : fe && (y.video = fe, y.video.loop = !0, y.video.addEventListener("playing", function() {
                    y.map.triggerRepaint();
                  }), y.map && y.video.play(), y._finishLoading());
                });
              }, B.prototype.pause = function() {
                this.video && this.video.pause();
              }, B.prototype.play = function() {
                this.video && this.video.play();
              }, B.prototype.seek = function(y) {
                if (this.video) {
                  var b = this.video.seekable;
                  y < b.start(0) || y > b.end(0) ? this.fire(new i.ErrorEvent(new i.ValidationError("sources." + this.id, null, "Playback for this video can be set only between the " + b.start(0) + " and " + b.end(0) + "-second mark."))) : this.video.currentTime = y;
                }
              }, B.prototype.getVideo = function() {
                return this.video;
              }, B.prototype.onAdd = function(y) {
                this.map || (this.map = y, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates)));
              }, B.prototype.prepare = function() {
                if (!(Object.keys(this.tiles).length === 0 || this.video.readyState < 2)) {
                  var y = this.map.painter.context, b = y.gl;
                  for (var R in this.boundsBuffer || (this.boundsBuffer = y.createVertexBuffer(this._boundsArray, te.members)), this.boundsSegments || (this.boundsSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture ? this.video.paused || (this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE), b.texSubImage2D(b.TEXTURE_2D, 0, 0, 0, b.RGBA, b.UNSIGNED_BYTE, this.video)) : (this.texture = new i.Texture(y, this.video, b.RGBA), this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE)), this.tiles) {
                    var j = this.tiles[R];
                    j.state !== "loaded" && (j.state = "loaded", j.texture = this.texture);
                  }
                }
              }, B.prototype.serialize = function() {
                return { type: "video", urls: this.urls, coordinates: this.coordinates };
              }, B.prototype.hasTransition = function() {
                return this.video && !this.video.paused;
              }, B;
            }(ee), Q = function(Z) {
              function B(y, b, R, j) {
                Z.call(this, y, b, R, j), b.coordinates ? Array.isArray(b.coordinates) && b.coordinates.length === 4 && !b.coordinates.some(function(G) {
                  return !Array.isArray(G) || G.length !== 2 || G.some(function(ie) {
                    return typeof ie != "number";
                  });
                }) || this.fire(new i.ErrorEvent(new i.ValidationError("sources." + y, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new i.ErrorEvent(new i.ValidationError("sources." + y, null, 'missing required property "coordinates"'))), b.animate && typeof b.animate != "boolean" && this.fire(new i.ErrorEvent(new i.ValidationError("sources." + y, null, 'optional "animate" property must be a boolean value'))), b.canvas ? typeof b.canvas == "string" || b.canvas instanceof i.window.HTMLCanvasElement || this.fire(new i.ErrorEvent(new i.ValidationError("sources." + y, 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 i.ErrorEvent(new i.ValidationError("sources." + y, null, 'missing required property "canvas"'))), this.options = b, this.animate = b.animate === void 0 || b.animate;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.load = function() {
                this._loaded = !0, this.canvas || (this.canvas = this.options.canvas instanceof i.window.HTMLCanvasElement ? this.options.canvas : i.window.document.getElementById(this.options.canvas)), this.width = this.canvas.width, this.height = this.canvas.height, this._hasInvalidDimensions() ? this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))) : (this.play = function() {
                  this._playing = !0, this.map.triggerRepaint();
                }, this.pause = function() {
                  this._playing && (this.prepare(), this._playing = !1);
                }, this._finishLoading());
              }, B.prototype.getCanvas = function() {
                return this.canvas;
              }, B.prototype.onAdd = function(y) {
                this.map = y, this.load(), this.canvas && this.animate && this.play();
              }, B.prototype.onRemove = function() {
                this.pause();
              }, B.prototype.prepare = function() {
                var y = !1;
                if (this.canvas.width !== this.width && (this.width = this.canvas.width, y = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, y = !0), !this._hasInvalidDimensions() && Object.keys(this.tiles).length !== 0) {
                  var b = this.map.painter.context, R = b.gl;
                  for (var j in this.boundsBuffer || (this.boundsBuffer = b.createVertexBuffer(this._boundsArray, te.members)), this.boundsSegments || (this.boundsSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2)), this.texture ? (y || this._playing) && this.texture.update(this.canvas, { premultiply: !0 }) : this.texture = new i.Texture(b, this.canvas, R.RGBA, { premultiply: !0 }), this.tiles) {
                    var G = this.tiles[j];
                    G.state !== "loaded" && (G.state = "loaded", G.texture = this.texture);
                  }
                }
              }, B.prototype.serialize = function() {
                return { type: "canvas", coordinates: this.coordinates };
              }, B.prototype.hasTransition = function() {
                return this._playing;
              }, B.prototype._hasInvalidDimensions = function() {
                for (var y = 0, b = [this.canvas.width, this.canvas.height]; y < b.length; y += 1) {
                  var R = b[y];
                  if (isNaN(R) || R <= 0) return !0;
                }
                return !1;
              }, B;
            }(ee), ue = { vector: q, raster: K, "raster-dem": re, geojson: Y, video: X, image: ee, canvas: Q };
            function ce(Z, B) {
              var y = i.identity([]);
              return i.translate(y, y, [1, 1, 0]), i.scale(y, y, [0.5 * Z.width, 0.5 * Z.height, 1]), i.multiply(y, y, Z.calculatePosMatrix(B.toUnwrapped()));
            }
            function he(Z, B, y, b, R, j) {
              var G = function(wt, Et, zt) {
                if (wt) for (var It = 0, jt = wt; It < jt.length; It += 1) {
                  var Lt = Et[jt[It]];
                  if (Lt && Lt.source === zt && Lt.type === "fill-extrusion") return !0;
                }
                else for (var Zt in Et) {
                  var Qt = Et[Zt];
                  if (Qt.source === zt && Qt.type === "fill-extrusion") return !0;
                }
                return !1;
              }(R && R.layers, B, Z.id), ie = j.maxPitchScaleFactor(), fe = Z.tilesIn(b, ie, G);
              fe.sort(de);
              for (var xe = [], Te = 0, ze = fe; Te < ze.length; Te += 1) {
                var Ve = ze[Te];
                xe.push({ wrappedTileID: Ve.tileID.wrapped().key, queryResults: Ve.tile.queryRenderedFeatures(B, y, Z._state, Ve.queryGeometry, Ve.cameraQueryGeometry, Ve.scale, R, j, ie, ce(Z.transform, Ve.tileID)) });
              }
              var ut = function(wt) {
                for (var Et = {}, zt = {}, It = 0, jt = wt; It < jt.length; It += 1) {
                  var Lt = jt[It], Zt = Lt.queryResults, Qt = Lt.wrappedTileID, Xt = zt[Qt] = zt[Qt] || {};
                  for (var yn in Zt) for (var Sn = Zt[yn], Un = Xt[yn] = Xt[yn] || {}, Vn = Et[yn] = Et[yn] || [], Yn = 0, er = Sn; Yn < er.length; Yn += 1) {
                    var kr = er[Yn];
                    Un[kr.featureIndex] || (Un[kr.featureIndex] = !0, Vn.push(kr));
                  }
                }
                return Et;
              }(xe);
              for (var gt in ut) ut[gt].forEach(function(wt) {
                var Et = wt.feature, zt = Z.getFeatureState(Et.layer["source-layer"], Et.id);
                Et.source = Et.layer.source, Et.layer["source-layer"] && (Et.sourceLayer = Et.layer["source-layer"]), Et.state = zt;
              });
              return ut;
            }
            function de(Z, B) {
              var y = Z.tileID, b = B.tileID;
              return y.overscaledZ - b.overscaledZ || y.canonical.y - b.canonical.y || y.wrap - b.wrap || y.canonical.x - b.canonical.x;
            }
            var ne = function(Z, B) {
              this.max = Z, this.onRemove = B, this.reset();
            };
            ne.prototype.reset = function() {
              for (var Z in this.data) for (var B = 0, y = this.data[Z]; B < y.length; B += 1) {
                var b = y[B];
                b.timeout && clearTimeout(b.timeout), this.onRemove(b.value);
              }
              return this.data = {}, this.order = [], this;
            }, ne.prototype.add = function(Z, B, y) {
              var b = this, R = Z.wrapped().key;
              this.data[R] === void 0 && (this.data[R] = []);
              var j = { value: B, timeout: void 0 };
              if (y !== void 0 && (j.timeout = setTimeout(function() {
                b.remove(Z, j);
              }, y)), this.data[R].push(j), this.order.push(R), this.order.length > this.max) {
                var G = this._getAndRemoveByKey(this.order[0]);
                G && this.onRemove(G);
              }
              return this;
            }, ne.prototype.has = function(Z) {
              return Z.wrapped().key in this.data;
            }, ne.prototype.getAndRemove = function(Z) {
              return this.has(Z) ? this._getAndRemoveByKey(Z.wrapped().key) : null;
            }, ne.prototype._getAndRemoveByKey = function(Z) {
              var B = this.data[Z].shift();
              return B.timeout && clearTimeout(B.timeout), this.data[Z].length === 0 && delete this.data[Z], this.order.splice(this.order.indexOf(Z), 1), B.value;
            }, ne.prototype.getByKey = function(Z) {
              var B = this.data[Z];
              return B ? B[0].value : null;
            }, ne.prototype.get = function(Z) {
              return this.has(Z) ? this.data[Z.wrapped().key][0].value : null;
            }, ne.prototype.remove = function(Z, B) {
              if (!this.has(Z)) return this;
              var y = Z.wrapped().key, b = B === void 0 ? 0 : this.data[y].indexOf(B), R = this.data[y][b];
              return this.data[y].splice(b, 1), R.timeout && clearTimeout(R.timeout), this.data[y].length === 0 && delete this.data[y], this.onRemove(R.value), this.order.splice(this.order.indexOf(y), 1), this;
            }, ne.prototype.setMaxSize = function(Z) {
              for (this.max = Z; this.order.length > this.max; ) {
                var B = this._getAndRemoveByKey(this.order[0]);
                B && this.onRemove(B);
              }
              return this;
            }, ne.prototype.filter = function(Z) {
              var B = [];
              for (var y in this.data) for (var b = 0, R = this.data[y]; b < R.length; b += 1) {
                var j = R[b];
                Z(j.value) || B.push(j);
              }
              for (var G = 0, ie = B; G < ie.length; G += 1) {
                var fe = ie[G];
                this.remove(fe.value.tileID, fe);
              }
            };
            var ae = function(Z, B, y) {
              this.context = Z;
              var b = Z.gl;
              this.buffer = b.createBuffer(), this.dynamicDraw = !!y, this.context.unbindVAO(), Z.bindElementBuffer.set(this.buffer), b.bufferData(b.ELEMENT_ARRAY_BUFFER, B.arrayBuffer, this.dynamicDraw ? b.DYNAMIC_DRAW : b.STATIC_DRAW), this.dynamicDraw || delete B.arrayBuffer;
            };
            ae.prototype.bind = function() {
              this.context.bindElementBuffer.set(this.buffer);
            }, ae.prototype.updateData = function(Z) {
              var B = this.context.gl;
              this.context.unbindVAO(), this.bind(), B.bufferSubData(B.ELEMENT_ARRAY_BUFFER, 0, Z.arrayBuffer);
            }, ae.prototype.destroy = function() {
              var Z = this.context.gl;
              this.buffer && (Z.deleteBuffer(this.buffer), delete this.buffer);
            };
            var se = { Int8: "BYTE", Uint8: "UNSIGNED_BYTE", Int16: "SHORT", Uint16: "UNSIGNED_SHORT", Int32: "INT", Uint32: "UNSIGNED_INT", Float32: "FLOAT" }, me = function(Z, B, y, b) {
              this.length = B.length, this.attributes = y, this.itemSize = B.bytesPerElement, this.dynamicDraw = b, this.context = Z;
              var R = Z.gl;
              this.buffer = R.createBuffer(), Z.bindVertexBuffer.set(this.buffer), R.bufferData(R.ARRAY_BUFFER, B.arrayBuffer, this.dynamicDraw ? R.DYNAMIC_DRAW : R.STATIC_DRAW), this.dynamicDraw || delete B.arrayBuffer;
            };
            me.prototype.bind = function() {
              this.context.bindVertexBuffer.set(this.buffer);
            }, me.prototype.updateData = function(Z) {
              var B = this.context.gl;
              this.bind(), B.bufferSubData(B.ARRAY_BUFFER, 0, Z.arrayBuffer);
            }, me.prototype.enableAttributes = function(Z, B) {
              for (var y = 0; y < this.attributes.length; y++) {
                var b = this.attributes[y], R = B.attributes[b.name];
                R !== void 0 && Z.enableVertexAttribArray(R);
              }
            }, me.prototype.setVertexAttribPointers = function(Z, B, y) {
              for (var b = 0; b < this.attributes.length; b++) {
                var R = this.attributes[b], j = B.attributes[R.name];
                j !== void 0 && Z.vertexAttribPointer(j, R.components, Z[se[R.type]], !1, this.itemSize, R.offset + this.itemSize * (y || 0));
              }
            }, me.prototype.destroy = function() {
              var Z = this.context.gl;
              this.buffer && (Z.deleteBuffer(this.buffer), delete this.buffer);
            };
            var ye = function(Z) {
              this.gl = Z.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1;
            };
            ye.prototype.get = function() {
              return this.current;
            }, ye.prototype.set = function(Z) {
            }, ye.prototype.getDefault = function() {
              return this.default;
            }, ye.prototype.setDefault = function() {
              this.set(this.default);
            };
            var pe = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return i.Color.transparent;
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y.r !== b.r || y.g !== b.g || y.b !== b.b || y.a !== b.a || this.dirty) && (this.gl.clearColor(y.r, y.g, y.b, y.a), this.current = y, this.dirty = !1);
              }, B;
            }(ye), be = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return 1;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.clearDepth(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ae = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return 0;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.clearStencil(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Se = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return [!0, !0, !0, !0];
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || y[3] !== b[3] || this.dirty) && (this.gl.colorMask(y[0], y[1], y[2], y[3]), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Me = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !0;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.depthMask(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), De = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return 255;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.stencilMask(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Le = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return { func: this.gl.ALWAYS, ref: 0, mask: 255 };
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y.func !== b.func || y.ref !== b.ref || y.mask !== b.mask || this.dirty) && (this.gl.stencilFunc(y.func, y.ref, y.mask), this.current = y, this.dirty = !1);
              }, B;
            }(ye), We = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                var y = this.gl;
                return [y.KEEP, y.KEEP, y.KEEP];
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || this.dirty) && (this.gl.stencilOp(y[0], y[1], y[2]), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ee = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  y ? b.enable(b.STENCIL_TEST) : b.disable(b.STENCIL_TEST), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), Ne = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return [0, 1];
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || this.dirty) && (this.gl.depthRange(y[0], y[1]), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ie = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  y ? b.enable(b.DEPTH_TEST) : b.disable(b.DEPTH_TEST), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), ge = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return this.gl.LESS;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.depthFunc(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ce = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  y ? b.enable(b.BLEND) : b.disable(b.BLEND), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), we = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                var y = this.gl;
                return [y.ONE, y.ZERO];
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || this.dirty) && (this.gl.blendFunc(y[0], y[1]), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ge = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return i.Color.transparent;
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y.r !== b.r || y.g !== b.g || y.b !== b.b || y.a !== b.a || this.dirty) && (this.gl.blendColor(y.r, y.g, y.b, y.a), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Re = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return this.gl.FUNC_ADD;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.blendEquation(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), je = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  y ? b.enable(b.CULL_FACE) : b.disable(b.CULL_FACE), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), Ke = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return this.gl.BACK;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.cullFace(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), tt = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return this.gl.CCW;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.frontFace(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), _e = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.useProgram(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Be = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return this.gl.TEXTURE0;
              }, B.prototype.set = function(y) {
                (y !== this.current || this.dirty) && (this.gl.activeTexture(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), $e = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                var y = this.gl;
                return [0, 0, y.drawingBufferWidth, y.drawingBufferHeight];
              }, B.prototype.set = function(y) {
                var b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || y[3] !== b[3] || this.dirty) && (this.gl.viewport(y[0], y[1], y[2], y[3]), this.current = y, this.dirty = !1);
              }, B;
            }(ye), Ze = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.bindFramebuffer(b.FRAMEBUFFER, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), ct = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.bindRenderbuffer(b.RENDERBUFFER, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), ft = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.bindTexture(b.TEXTURE_2D, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), _t = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.bindBuffer(b.ARRAY_BUFFER, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), Pt = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                var b = this.gl;
                b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, y), this.current = y, this.dirty = !1;
              }, B;
            }(ye), Dt = function(Z) {
              function B(y) {
                Z.call(this, y), this.vao = y.extVertexArrayObject;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B.prototype.set = function(y) {
                this.vao && (y !== this.current || this.dirty) && (this.vao.bindVertexArrayOES(y), this.current = y, this.dirty = !1);
              }, B;
            }(ye), $t = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return 4;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.pixelStorei(b.UNPACK_ALIGNMENT, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), Gt = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), Wt = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return !1;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  var b = this.gl;
                  b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(ye), mt = function(Z) {
              function B(y, b) {
                Z.call(this, y), this.context = y, this.parent = b;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getDefault = function() {
                return null;
              }, B;
            }(ye), at = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.setDirty = function() {
                this.dirty = !0;
              }, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  this.context.bindFramebuffer.set(this.parent);
                  var b = this.gl;
                  b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, y, 0), this.current = y, this.dirty = !1;
                }
              }, B;
            }(mt), vt = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.set = function(y) {
                if (y !== this.current || this.dirty) {
                  this.context.bindFramebuffer.set(this.parent);
                  var b = this.gl;
                  b.framebufferRenderbuffer(b.FRAMEBUFFER, b.DEPTH_ATTACHMENT, b.RENDERBUFFER, y), this.current = y, this.dirty = !1;
                }
              }, B;
            }(mt), St = function(Z, B, y, b) {
              this.context = Z, this.width = B, this.height = y;
              var R = Z.gl, j = this.framebuffer = R.createFramebuffer();
              this.colorAttachment = new at(Z, j), b && (this.depthAttachment = new vt(Z, j));
            };
            St.prototype.destroy = function() {
              var Z = this.context.gl, B = this.colorAttachment.get();
              if (B && Z.deleteTexture(B), this.depthAttachment) {
                var y = this.depthAttachment.get();
                y && Z.deleteRenderbuffer(y);
              }
              Z.deleteFramebuffer(this.framebuffer);
            };
            var Je = function(Z, B, y) {
              this.func = Z, this.mask = B, this.range = y;
            };
            Je.ReadOnly = !1, Je.ReadWrite = !0, Je.disabled = new Je(519, Je.ReadOnly, [0, 1]);
            var nt = 7680, ot = function(Z, B, y, b, R, j) {
              this.test = Z, this.ref = B, this.mask = y, this.fail = b, this.depthFail = R, this.pass = j;
            };
            ot.disabled = new ot({ func: 519, mask: 0 }, 0, 0, nt, nt, nt);
            var Ye = function(Z, B, y) {
              this.blendFunction = Z, this.blendColor = B, this.mask = y;
            };
            Ye.Replace = [1, 0], Ye.disabled = new Ye(Ye.Replace, i.Color.transparent, [!1, !1, !1, !1]), Ye.unblended = new Ye(Ye.Replace, i.Color.transparent, [!0, !0, !0, !0]), Ye.alphaBlended = new Ye([1, 771], i.Color.transparent, [!0, !0, !0, !0]);
            var Fe = function(Z, B, y) {
              this.enable = Z, this.mode = B, this.frontFace = y;
            };
            Fe.disabled = new Fe(!1, 1029, 2305), Fe.backCCW = new Fe(!0, 1029, 2305);
            var pt = function(Z) {
              this.gl = Z, this.extVertexArrayObject = this.gl.getExtension("OES_vertex_array_object"), this.clearColor = new pe(this), this.clearDepth = new be(this), this.clearStencil = new Ae(this), this.colorMask = new Se(this), this.depthMask = new Me(this), this.stencilMask = new De(this), this.stencilFunc = new Le(this), this.stencilOp = new We(this), this.stencilTest = new Ee(this), this.depthRange = new Ne(this), this.depthTest = new Ie(this), this.depthFunc = new ge(this), this.blend = new Ce(this), this.blendFunc = new we(this), this.blendColor = new Ge(this), this.blendEquation = new Re(this), this.cullFace = new je(this), this.cullFaceSide = new Ke(this), this.frontFace = new tt(this), this.program = new _e(this), this.activeTexture = new Be(this), this.viewport = new $e(this), this.bindFramebuffer = new Ze(this), this.bindRenderbuffer = new ct(this), this.bindTexture = new ft(this), this.bindVertexBuffer = new _t(this), this.bindElementBuffer = new Pt(this), this.bindVertexArrayOES = this.extVertexArrayObject && new Dt(this), this.pixelStoreUnpack = new $t(this), this.pixelStoreUnpackPremultiplyAlpha = new Gt(this), this.pixelStoreUnpackFlipY = new Wt(this), this.extTextureFilterAnisotropic = Z.getExtension("EXT_texture_filter_anisotropic") || Z.getExtension("MOZ_EXT_texture_filter_anisotropic") || Z.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = Z.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.extTextureHalfFloat = Z.getExtension("OES_texture_half_float"), this.extTextureHalfFloat && (Z.getExtension("OES_texture_half_float_linear"), this.extRenderToTextureHalfFloat = Z.getExtension("EXT_color_buffer_half_float")), this.extTimerQuery = Z.getExtension("EXT_disjoint_timer_query"), this.maxTextureSize = Z.getParameter(Z.MAX_TEXTURE_SIZE);
            };
            pt.prototype.setDefault = function() {
              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();
            }, pt.prototype.setDirty = function() {
              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.extVertexArrayObject && (this.bindVertexArrayOES.dirty = !0), this.pixelStoreUnpack.dirty = !0, this.pixelStoreUnpackPremultiplyAlpha.dirty = !0, this.pixelStoreUnpackFlipY.dirty = !0;
            }, pt.prototype.createIndexBuffer = function(Z, B) {
              return new ae(this, Z, B);
            }, pt.prototype.createVertexBuffer = function(Z, B, y) {
              return new me(this, Z, B, y);
            }, pt.prototype.createRenderbuffer = function(Z, B, y) {
              var b = this.gl, R = b.createRenderbuffer();
              return this.bindRenderbuffer.set(R), b.renderbufferStorage(b.RENDERBUFFER, Z, B, y), this.bindRenderbuffer.set(null), R;
            }, pt.prototype.createFramebuffer = function(Z, B, y) {
              return new St(this, Z, B, y);
            }, pt.prototype.clear = function(Z) {
              var B = Z.color, y = Z.depth, b = this.gl, R = 0;
              B && (R |= b.COLOR_BUFFER_BIT, this.clearColor.set(B), this.colorMask.set([!0, !0, !0, !0])), y !== void 0 && (R |= b.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(y), this.depthMask.set(!0)), b.clear(R);
            }, pt.prototype.setCullFace = function(Z) {
              Z.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(Z.mode), this.frontFace.set(Z.frontFace));
            }, pt.prototype.setDepthMode = function(Z) {
              Z.func !== this.gl.ALWAYS || Z.mask ? (this.depthTest.set(!0), this.depthFunc.set(Z.func), this.depthMask.set(Z.mask), this.depthRange.set(Z.range)) : this.depthTest.set(!1);
            }, pt.prototype.setStencilMode = function(Z) {
              Z.test.func !== this.gl.ALWAYS || Z.mask ? (this.stencilTest.set(!0), this.stencilMask.set(Z.mask), this.stencilOp.set([Z.fail, Z.depthFail, Z.pass]), this.stencilFunc.set({ func: Z.test.func, ref: Z.ref, mask: Z.test.mask })) : this.stencilTest.set(!1);
            }, pt.prototype.setColorMode = function(Z) {
              i.deepEqual(Z.blendFunction, Ye.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(Z.blendFunction), this.blendColor.set(Z.blendColor)), this.colorMask.set(Z.mask);
            }, pt.prototype.unbindVAO = function() {
              this.extVertexArrayObject && this.bindVertexArrayOES.set(null);
            };
            var Mt = function(Z) {
              function B(y, b, R) {
                var j = this;
                Z.call(this), this.id = y, this.dispatcher = R, this.on("data", function(G) {
                  G.dataType === "source" && G.sourceDataType === "metadata" && (j._sourceLoaded = !0), j._sourceLoaded && !j._paused && G.dataType === "source" && G.sourceDataType === "content" && (j.reload(), j.transform && j.update(j.transform));
                }), this.on("error", function() {
                  j._sourceErrored = !0;
                }), this._source = function(G, ie, fe, xe) {
                  var Te = new ue[ie.type](G, ie, fe, xe);
                  if (Te.id !== G) throw new Error("Expected Source id to be " + G + " instead of " + Te.id);
                  return i.bindAll(["load", "abort", "unload", "serialize", "prepare"], Te), Te;
                }(y, b, R, this), this._tiles = {}, this._cache = new ne(0, this._unloadTile.bind(this)), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new i.SourceFeatureState();
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.onAdd = function(y) {
                this.map = y, this._maxTileCacheSize = y ? y._maxTileCacheSize : null, this._source && this._source.onAdd && this._source.onAdd(y);
              }, B.prototype.onRemove = function(y) {
                this._source && this._source.onRemove && this._source.onRemove(y);
              }, B.prototype.loaded = function() {
                if (this._sourceErrored) return !0;
                if (!this._sourceLoaded || !this._source.loaded()) return !1;
                for (var y in this._tiles) {
                  var b = this._tiles[y];
                  if (b.state !== "loaded" && b.state !== "errored") return !1;
                }
                return !0;
              }, B.prototype.getSource = function() {
                return this._source;
              }, B.prototype.pause = function() {
                this._paused = !0;
              }, B.prototype.resume = function() {
                if (this._paused) {
                  var y = this._shouldReloadOnResume;
                  this._paused = !1, this._shouldReloadOnResume = !1, y && this.reload(), this.transform && this.update(this.transform);
                }
              }, B.prototype._loadTile = function(y, b) {
                return this._source.loadTile(y, b);
              }, B.prototype._unloadTile = function(y) {
                if (this._source.unloadTile) return this._source.unloadTile(y, function() {
                });
              }, B.prototype._abortTile = function(y) {
                if (this._source.abortTile) return this._source.abortTile(y, function() {
                });
              }, B.prototype.serialize = function() {
                return this._source.serialize();
              }, B.prototype.prepare = function(y) {
                for (var b in this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null), this._tiles) {
                  var R = this._tiles[b];
                  R.upload(y), R.prepare(this.map.style.imageManager);
                }
              }, B.prototype.getIds = function() {
                return i.values(this._tiles).map(function(y) {
                  return y.tileID;
                }).sort(At).map(function(y) {
                  return y.key;
                });
              }, B.prototype.getRenderableIds = function(y) {
                var b = this, R = [];
                for (var j in this._tiles) this._isIdRenderable(j, y) && R.push(this._tiles[j]);
                return y ? R.sort(function(G, ie) {
                  var fe = G.tileID, xe = ie.tileID, Te = new i.Point(fe.canonical.x, fe.canonical.y)._rotate(b.transform.angle), ze = new i.Point(xe.canonical.x, xe.canonical.y)._rotate(b.transform.angle);
                  return fe.overscaledZ - xe.overscaledZ || ze.y - Te.y || ze.x - Te.x;
                }).map(function(G) {
                  return G.tileID.key;
                }) : R.map(function(G) {
                  return G.tileID;
                }).sort(At).map(function(G) {
                  return G.key;
                });
              }, B.prototype.hasRenderableParent = function(y) {
                var b = this.findLoadedParent(y, 0);
                return !!b && this._isIdRenderable(b.tileID.key);
              }, B.prototype._isIdRenderable = function(y, b) {
                return this._tiles[y] && this._tiles[y].hasData() && !this._coveredTiles[y] && (b || !this._tiles[y].holdingForFade());
              }, B.prototype.reload = function() {
                if (this._paused) this._shouldReloadOnResume = !0;
                else for (var y in this._cache.reset(), this._tiles) this._tiles[y].state !== "errored" && this._reloadTile(y, "reloading");
              }, B.prototype._reloadTile = function(y, b) {
                var R = this._tiles[y];
                R && (R.state !== "loading" && (R.state = b), this._loadTile(R, this._tileLoaded.bind(this, R, y, b)));
              }, B.prototype._tileLoaded = function(y, b, R, j) {
                if (j) return y.state = "errored", void (j.status !== 404 ? this._source.fire(new i.ErrorEvent(j, { tile: y })) : this.update(this.transform));
                y.timeAdded = i.browser.now(), R === "expired" && (y.refreshedUponExpiration = !0), this._setTileReloadTimer(b, y), this.getSource().type === "raster-dem" && y.dem && this._backfillDEM(y), this._state.initializeTileState(y, this.map ? this.map.painter : null), this._source.fire(new i.Event("data", { dataType: "source", tile: y, coord: y.tileID }));
              }, B.prototype._backfillDEM = function(y) {
                for (var b = this.getRenderableIds(), R = 0; R < b.length; R++) {
                  var j = b[R];
                  if (y.neighboringTiles && y.neighboringTiles[j]) {
                    var G = this.getTileByID(j);
                    ie(y, G), ie(G, y);
                  }
                }
                function ie(fe, xe) {
                  fe.needsHillshadePrepare = !0;
                  var Te = xe.tileID.canonical.x - fe.tileID.canonical.x, ze = xe.tileID.canonical.y - fe.tileID.canonical.y, Ve = Math.pow(2, fe.tileID.canonical.z), ut = xe.tileID.key;
                  Te === 0 && ze === 0 || Math.abs(ze) > 1 || (Math.abs(Te) > 1 && (Math.abs(Te + Ve) === 1 ? Te += Ve : Math.abs(Te - Ve) === 1 && (Te -= Ve)), xe.dem && fe.dem && (fe.dem.backfillBorder(xe.dem, Te, ze), fe.neighboringTiles && fe.neighboringTiles[ut] && (fe.neighboringTiles[ut].backfilled = !0)));
                }
              }, B.prototype.getTile = function(y) {
                return this.getTileByID(y.key);
              }, B.prototype.getTileByID = function(y) {
                return this._tiles[y];
              }, B.prototype._retainLoadedChildren = function(y, b, R, j) {
                for (var G in this._tiles) {
                  var ie = this._tiles[G];
                  if (!(j[G] || !ie.hasData() || ie.tileID.overscaledZ <= b || ie.tileID.overscaledZ > R)) {
                    for (var fe = ie.tileID; ie && ie.tileID.overscaledZ > b + 1; ) {
                      var xe = ie.tileID.scaledTo(ie.tileID.overscaledZ - 1);
                      (ie = this._tiles[xe.key]) && ie.hasData() && (fe = xe);
                    }
                    for (var Te = fe; Te.overscaledZ > b; ) if (y[(Te = Te.scaledTo(Te.overscaledZ - 1)).key]) {
                      j[fe.key] = fe;
                      break;
                    }
                  }
                }
              }, B.prototype.findLoadedParent = function(y, b) {
                if (y.key in this._loadedParentTiles) {
                  var R = this._loadedParentTiles[y.key];
                  return R && R.tileID.overscaledZ >= b ? R : null;
                }
                for (var j = y.overscaledZ - 1; j >= b; j--) {
                  var G = y.scaledTo(j), ie = this._getLoadedTile(G);
                  if (ie) return ie;
                }
              }, B.prototype._getLoadedTile = function(y) {
                var b = this._tiles[y.key];
                return b && b.hasData() ? b : this._cache.getByKey(y.wrapped().key);
              }, B.prototype.updateCacheSize = function(y) {
                var b = (Math.ceil(y.width / this._source.tileSize) + 1) * (Math.ceil(y.height / this._source.tileSize) + 1), R = Math.floor(5 * b), j = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, R) : R;
                this._cache.setMaxSize(j);
              }, B.prototype.handleWrapJump = function(y) {
                var b = (y - (this._prevLng === void 0 ? y : this._prevLng)) / 360, R = Math.round(b);
                if (this._prevLng = y, R) {
                  var j = {};
                  for (var G in this._tiles) {
                    var ie = this._tiles[G];
                    ie.tileID = ie.tileID.unwrapTo(ie.tileID.wrap + R), j[ie.tileID.key] = ie;
                  }
                  for (var fe in this._tiles = j, this._timers) clearTimeout(this._timers[fe]), delete this._timers[fe];
                  for (var xe in this._tiles) {
                    var Te = this._tiles[xe];
                    this._setTileReloadTimer(xe, Te);
                  }
                }
              }, B.prototype.update = function(y) {
                var b = this;
                if (this.transform = y, this._sourceLoaded && !this._paused) {
                  var R;
                  this.updateCacheSize(y), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used ? this._source.tileID ? R = y.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Xt) {
                    return new i.OverscaledTileID(Xt.canonical.z, Xt.wrap, Xt.canonical.z, Xt.canonical.x, Xt.canonical.y);
                  }) : (R = y.coveringTiles({ tileSize: this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled }), this._source.hasTile && (R = R.filter(function(Xt) {
                    return b._source.hasTile(Xt);
                  }))) : R = [];
                  var j = y.coveringZoomLevel(this._source), G = Math.max(j - B.maxOverzooming, this._source.minzoom), ie = Math.max(j + B.maxUnderzooming, this._source.minzoom), fe = this._updateRetainedTiles(R, j);
                  if (Rt(this._source.type)) {
                    for (var xe = {}, Te = {}, ze = 0, Ve = Object.keys(fe); ze < Ve.length; ze += 1) {
                      var ut = Ve[ze], gt = fe[ut], wt = this._tiles[ut];
                      if (wt && !(wt.fadeEndTime && wt.fadeEndTime <= i.browser.now())) {
                        var Et = this.findLoadedParent(gt, G);
                        Et && (this._addTile(Et.tileID), xe[Et.tileID.key] = Et.tileID), Te[ut] = gt;
                      }
                    }
                    for (var zt in this._retainLoadedChildren(Te, j, ie, fe), xe) fe[zt] || (this._coveredTiles[zt] = !0, fe[zt] = xe[zt]);
                  }
                  for (var It in fe) this._tiles[It].clearFadeHold();
                  for (var jt = 0, Lt = i.keysDifference(this._tiles, fe); jt < Lt.length; jt += 1) {
                    var Zt = Lt[jt], Qt = this._tiles[Zt];
                    Qt.hasSymbolBuckets && !Qt.holdingForFade() ? Qt.setHoldDuration(this.map._fadeDuration) : Qt.hasSymbolBuckets && !Qt.symbolFadeFinished() || this._removeTile(Zt);
                  }
                  this._updateLoadedParentTileCache();
                }
              }, B.prototype.releaseSymbolFadeTiles = function() {
                for (var y in this._tiles) this._tiles[y].holdingForFade() && this._removeTile(y);
              }, B.prototype._updateRetainedTiles = function(y, b) {
                for (var R = {}, j = {}, G = Math.max(b - B.maxOverzooming, this._source.minzoom), ie = Math.max(b + B.maxUnderzooming, this._source.minzoom), fe = {}, xe = 0, Te = y; xe < Te.length; xe += 1) {
                  var ze = Te[xe], Ve = this._addTile(ze);
                  R[ze.key] = ze, Ve.hasData() || b < this._source.maxzoom && (fe[ze.key] = ze);
                }
                this._retainLoadedChildren(fe, b, ie, R);
                for (var ut = 0, gt = y; ut < gt.length; ut += 1) {
                  var wt = gt[ut], Et = this._tiles[wt.key];
                  if (!Et.hasData()) {
                    if (b + 1 > this._source.maxzoom) {
                      var zt = wt.children(this._source.maxzoom)[0], It = this.getTile(zt);
                      if (It && It.hasData()) {
                        R[zt.key] = zt;
                        continue;
                      }
                    } else {
                      var jt = wt.children(this._source.maxzoom);
                      if (R[jt[0].key] && R[jt[1].key] && R[jt[2].key] && R[jt[3].key]) continue;
                    }
                    for (var Lt = Et.wasRequested(), Zt = wt.overscaledZ - 1; Zt >= G; --Zt) {
                      var Qt = wt.scaledTo(Zt);
                      if (j[Qt.key] || (j[Qt.key] = !0, !(Et = this.getTile(Qt)) && Lt && (Et = this._addTile(Qt)), Et && (R[Qt.key] = Qt, Lt = Et.wasRequested(), Et.hasData()))) break;
                    }
                  }
                }
                return R;
              }, B.prototype._updateLoadedParentTileCache = function() {
                for (var y in this._loadedParentTiles = {}, this._tiles) {
                  for (var b = [], R = void 0, j = this._tiles[y].tileID; j.overscaledZ > 0; ) {
                    if (j.key in this._loadedParentTiles) {
                      R = this._loadedParentTiles[j.key];
                      break;
                    }
                    b.push(j.key);
                    var G = j.scaledTo(j.overscaledZ - 1);
                    if (R = this._getLoadedTile(G)) break;
                    j = G;
                  }
                  for (var ie = 0, fe = b; ie < fe.length; ie += 1) {
                    var xe = fe[ie];
                    this._loadedParentTiles[xe] = R;
                  }
                }
              }, B.prototype._addTile = function(y) {
                var b = this._tiles[y.key];
                if (b) return b;
                (b = this._cache.getAndRemove(y)) && (this._setTileReloadTimer(y.key, b), b.tileID = y, this._state.initializeTileState(b, this.map ? this.map.painter : null), this._cacheTimers[y.key] && (clearTimeout(this._cacheTimers[y.key]), delete this._cacheTimers[y.key], this._setTileReloadTimer(y.key, b)));
                var R = !!b;
                return R || (b = new i.Tile(y, this._source.tileSize * y.overscaleFactor()), this._loadTile(b, this._tileLoaded.bind(this, b, y.key, b.state))), b ? (b.uses++, this._tiles[y.key] = b, R || this._source.fire(new i.Event("dataloading", { tile: b, coord: b.tileID, dataType: "source" })), b) : null;
              }, B.prototype._setTileReloadTimer = function(y, b) {
                var R = this;
                y in this._timers && (clearTimeout(this._timers[y]), delete this._timers[y]);
                var j = b.getExpiryTimeout();
                j && (this._timers[y] = setTimeout(function() {
                  R._reloadTile(y, "expired"), delete R._timers[y];
                }, j));
              }, B.prototype._removeTile = function(y) {
                var b = this._tiles[y];
                b && (b.uses--, delete this._tiles[y], this._timers[y] && (clearTimeout(this._timers[y]), delete this._timers[y]), b.uses > 0 || (b.hasData() && b.state !== "reloading" ? this._cache.add(b.tileID, b, b.getExpiryTimeout()) : (b.aborted = !0, this._abortTile(b), this._unloadTile(b))));
              }, B.prototype.clearTiles = function() {
                for (var y in this._shouldReloadOnResume = !1, this._paused = !1, this._tiles) this._removeTile(y);
                this._cache.reset();
              }, B.prototype.tilesIn = function(y, b, R) {
                var j = this, G = [], ie = this.transform;
                if (!ie) return G;
                for (var fe = R ? ie.getCameraQueryGeometry(y) : y, xe = y.map(function(Zt) {
                  return ie.pointCoordinate(Zt);
                }), Te = fe.map(function(Zt) {
                  return ie.pointCoordinate(Zt);
                }), ze = this.getIds(), Ve = 1 / 0, ut = 1 / 0, gt = -1 / 0, wt = -1 / 0, Et = 0, zt = Te; Et < zt.length; Et += 1) {
                  var It = zt[Et];
                  Ve = Math.min(Ve, It.x), ut = Math.min(ut, It.y), gt = Math.max(gt, It.x), wt = Math.max(wt, It.y);
                }
                for (var jt = function(Zt) {
                  var Qt = j._tiles[ze[Zt]];
                  if (!Qt.holdingForFade()) {
                    var Xt = Qt.tileID, yn = Math.pow(2, ie.zoom - Qt.tileID.overscaledZ), Sn = b * Qt.queryPadding * i.EXTENT / Qt.tileSize / yn, Un = [Xt.getTilePoint(new i.MercatorCoordinate(Ve, ut)), Xt.getTilePoint(new i.MercatorCoordinate(gt, wt))];
                    if (Un[0].x - Sn < i.EXTENT && Un[0].y - Sn < i.EXTENT && Un[1].x + Sn >= 0 && Un[1].y + Sn >= 0) {
                      var Vn = xe.map(function(er) {
                        return Xt.getTilePoint(er);
                      }), Yn = Te.map(function(er) {
                        return Xt.getTilePoint(er);
                      });
                      G.push({ tile: Qt, tileID: Xt, queryGeometry: Vn, cameraQueryGeometry: Yn, scale: yn });
                    }
                  }
                }, Lt = 0; Lt < ze.length; Lt++) jt(Lt);
                return G;
              }, B.prototype.getVisibleCoordinates = function(y) {
                for (var b = this, R = this.getRenderableIds(y).map(function(fe) {
                  return b._tiles[fe].tileID;
                }), j = 0, G = R; j < G.length; j += 1) {
                  var ie = G[j];
                  ie.posMatrix = this.transform.calculatePosMatrix(ie.toUnwrapped());
                }
                return R;
              }, B.prototype.hasTransition = function() {
                if (this._source.hasTransition()) return !0;
                if (Rt(this._source.type)) for (var y in this._tiles) {
                  var b = this._tiles[y];
                  if (b.fadeEndTime !== void 0 && b.fadeEndTime >= i.browser.now()) return !0;
                }
                return !1;
              }, B.prototype.setFeatureState = function(y, b, R) {
                y = y || "_geojsonTileLayer", this._state.updateState(y, b, R);
              }, B.prototype.removeFeatureState = function(y, b, R) {
                y = y || "_geojsonTileLayer", this._state.removeFeatureState(y, b, R);
              }, B.prototype.getFeatureState = function(y, b) {
                return y = y || "_geojsonTileLayer", this._state.getState(y, b);
              }, B.prototype.setDependencies = function(y, b, R) {
                var j = this._tiles[y];
                j && j.setDependencies(b, R);
              }, B.prototype.reloadTilesForDependencies = function(y, b) {
                for (var R in this._tiles) this._tiles[R].hasDependency(y, b) && this._reloadTile(R, "reloading");
                this._cache.filter(function(j) {
                  return !j.hasDependency(y, b);
                });
              }, B;
            }(i.Evented);
            function At(Z, B) {
              var y = Math.abs(2 * Z.wrap) - +(Z.wrap < 0), b = Math.abs(2 * B.wrap) - +(B.wrap < 0);
              return Z.overscaledZ - B.overscaledZ || b - y || B.canonical.y - Z.canonical.y || B.canonical.x - Z.canonical.x;
            }
            function Rt(Z) {
              return Z === "raster" || Z === "image" || Z === "video";
            }
            function Ft() {
              return new i.window.Worker(ht.workerUrl);
            }
            Mt.maxOverzooming = 10, Mt.maxUnderzooming = 3;
            var lt = "mapboxgl_preloaded_worker_pool", st = function() {
              this.active = {};
            };
            st.prototype.acquire = function(Z) {
              if (!this.workers) for (this.workers = []; this.workers.length < st.workerCount; ) this.workers.push(new Ft());
              return this.active[Z] = !0, this.workers.slice();
            }, st.prototype.release = function(Z) {
              delete this.active[Z], this.numActive() === 0 && (this.workers.forEach(function(B) {
                B.terminate();
              }), this.workers = null);
            }, st.prototype.isPreloaded = function() {
              return !!this.active[lt];
            }, st.prototype.numActive = function() {
              return Object.keys(this.active).length;
            };
            var Ot, kt = Math.floor(i.browser.hardwareConcurrency / 2);
            function Bt() {
              return Ot || (Ot = new st()), Ot;
            }
            function xt(Z, B) {
              var y = {};
              for (var b in Z) b !== "ref" && (y[b] = Z[b]);
              return i.refProperties.forEach(function(R) {
                R in B && (y[R] = B[R]);
              }), y;
            }
            function Jt(Z) {
              Z = Z.slice();
              for (var B = /* @__PURE__ */ Object.create(null), y = 0; y < Z.length; y++) B[Z[y].id] = Z[y];
              for (var b = 0; b < Z.length; b++) "ref" in Z[b] && (Z[b] = xt(Z[b], B[Z[b].ref]));
              return Z;
            }
            st.workerCount = Math.max(Math.min(kt, 6), 1);
            var qt = { setStyle: "setStyle", addLayer: "addLayer", removeLayer: "removeLayer", setPaintProperty: "setPaintProperty", setLayoutProperty: "setLayoutProperty", setFilter: "setFilter", addSource: "addSource", removeSource: "removeSource", setGeoJSONSourceData: "setGeoJSONSourceData", setLayerZoomRange: "setLayerZoomRange", setLayerProperty: "setLayerProperty", setCenter: "setCenter", setZoom: "setZoom", setBearing: "setBearing", setPitch: "setPitch", setSprite: "setSprite", setGlyphs: "setGlyphs", setTransition: "setTransition", setLight: "setLight" };
            function en(Z, B, y) {
              y.push({ command: qt.addSource, args: [Z, B[Z]] });
            }
            function Yt(Z, B, y) {
              B.push({ command: qt.removeSource, args: [Z] }), y[Z] = !0;
            }
            function Ht(Z, B, y, b) {
              Yt(Z, y, b), en(Z, B, y);
            }
            function sn(Z, B, y) {
              var b;
              for (b in Z[y]) if (Z[y].hasOwnProperty(b) && b !== "data" && !i.deepEqual(Z[y][b], B[y][b])) return !1;
              for (b in B[y]) if (B[y].hasOwnProperty(b) && b !== "data" && !i.deepEqual(Z[y][b], B[y][b])) return !1;
              return !0;
            }
            function fn(Z, B, y, b, R, j) {
              var G;
              for (G in B = B || {}, Z = Z || {}) Z.hasOwnProperty(G) && (i.deepEqual(Z[G], B[G]) || y.push({ command: j, args: [b, G, B[G], R] }));
              for (G in B) B.hasOwnProperty(G) && !Z.hasOwnProperty(G) && (i.deepEqual(Z[G], B[G]) || y.push({ command: j, args: [b, G, B[G], R] }));
            }
            function In(Z) {
              return Z.id;
            }
            function zn(Z, B) {
              return Z[B.id] = B, Z;
            }
            function Cn(Z, B) {
              if (!Z) return [{ command: qt.setStyle, args: [B] }];
              var y = [];
              try {
                if (!i.deepEqual(Z.version, B.version)) return [{ command: qt.setStyle, args: [B] }];
                i.deepEqual(Z.center, B.center) || y.push({ command: qt.setCenter, args: [B.center] }), i.deepEqual(Z.zoom, B.zoom) || y.push({ command: qt.setZoom, args: [B.zoom] }), i.deepEqual(Z.bearing, B.bearing) || y.push({ command: qt.setBearing, args: [B.bearing] }), i.deepEqual(Z.pitch, B.pitch) || y.push({ command: qt.setPitch, args: [B.pitch] }), i.deepEqual(Z.sprite, B.sprite) || y.push({ command: qt.setSprite, args: [B.sprite] }), i.deepEqual(Z.glyphs, B.glyphs) || y.push({ command: qt.setGlyphs, args: [B.glyphs] }), i.deepEqual(Z.transition, B.transition) || y.push({ command: qt.setTransition, args: [B.transition] }), i.deepEqual(Z.light, B.light) || y.push({ command: qt.setLight, args: [B.light] });
                var b = {}, R = [];
                (function(G, ie, fe, xe) {
                  var Te;
                  for (Te in ie = ie || {}, G = G || {}) G.hasOwnProperty(Te) && (ie.hasOwnProperty(Te) || Yt(Te, fe, xe));
                  for (Te in ie) ie.hasOwnProperty(Te) && (G.hasOwnProperty(Te) ? i.deepEqual(G[Te], ie[Te]) || (G[Te].type === "geojson" && ie[Te].type === "geojson" && sn(G, ie, Te) ? fe.push({ command: qt.setGeoJSONSourceData, args: [Te, ie[Te].data] }) : Ht(Te, ie, fe, xe)) : en(Te, ie, fe));
                })(Z.sources, B.sources, R, b);
                var j = [];
                Z.layers && Z.layers.forEach(function(G) {
                  b[G.source] ? y.push({ command: qt.removeLayer, args: [G.id] }) : j.push(G);
                }), y = y.concat(R), function(G, ie, fe) {
                  ie = ie || [];
                  var xe, Te, ze, Ve, ut, gt, wt, Et = (G = G || []).map(In), zt = ie.map(In), It = G.reduce(zn, {}), jt = ie.reduce(zn, {}), Lt = Et.slice(), Zt = /* @__PURE__ */ Object.create(null);
                  for (xe = 0, Te = 0; xe < Et.length; xe++) ze = Et[xe], jt.hasOwnProperty(ze) ? Te++ : (fe.push({ command: qt.removeLayer, args: [ze] }), Lt.splice(Lt.indexOf(ze, Te), 1));
                  for (xe = 0, Te = 0; xe < zt.length; xe++) ze = zt[zt.length - 1 - xe], Lt[Lt.length - 1 - xe] !== ze && (It.hasOwnProperty(ze) ? (fe.push({ command: qt.removeLayer, args: [ze] }), Lt.splice(Lt.lastIndexOf(ze, Lt.length - Te), 1)) : Te++, gt = Lt[Lt.length - xe], fe.push({ command: qt.addLayer, args: [jt[ze], gt] }), Lt.splice(Lt.length - xe, 0, ze), Zt[ze] = !0);
                  for (xe = 0; xe < zt.length; xe++) if (Ve = It[ze = zt[xe]], ut = jt[ze], !Zt[ze] && !i.deepEqual(Ve, ut)) if (i.deepEqual(Ve.source, ut.source) && i.deepEqual(Ve["source-layer"], ut["source-layer"]) && i.deepEqual(Ve.type, ut.type)) {
                    for (wt in fn(Ve.layout, ut.layout, fe, ze, null, qt.setLayoutProperty), fn(Ve.paint, ut.paint, fe, ze, null, qt.setPaintProperty), i.deepEqual(Ve.filter, ut.filter) || fe.push({ command: qt.setFilter, args: [ze, ut.filter] }), i.deepEqual(Ve.minzoom, ut.minzoom) && i.deepEqual(Ve.maxzoom, ut.maxzoom) || fe.push({ command: qt.setLayerZoomRange, args: [ze, ut.minzoom, ut.maxzoom] }), Ve) Ve.hasOwnProperty(wt) && wt !== "layout" && wt !== "paint" && wt !== "filter" && wt !== "metadata" && wt !== "minzoom" && wt !== "maxzoom" && (wt.indexOf("paint.") === 0 ? fn(Ve[wt], ut[wt], fe, ze, wt.slice(6), qt.setPaintProperty) : i.deepEqual(Ve[wt], ut[wt]) || fe.push({ command: qt.setLayerProperty, args: [ze, wt, ut[wt]] }));
                    for (wt in ut) ut.hasOwnProperty(wt) && !Ve.hasOwnProperty(wt) && wt !== "layout" && wt !== "paint" && wt !== "filter" && wt !== "metadata" && wt !== "minzoom" && wt !== "maxzoom" && (wt.indexOf("paint.") === 0 ? fn(Ve[wt], ut[wt], fe, ze, wt.slice(6), qt.setPaintProperty) : i.deepEqual(Ve[wt], ut[wt]) || fe.push({ command: qt.setLayerProperty, args: [ze, wt, ut[wt]] }));
                  } else fe.push({ command: qt.removeLayer, args: [ze] }), gt = Lt[Lt.lastIndexOf(ze) + 1], fe.push({ command: qt.addLayer, args: [ut, gt] });
                }(j, B.layers, y);
              } catch (G) {
                console.warn("Unable to compute style diff:", G), y = [{ command: qt.setStyle, args: [B] }];
              }
              return y;
            }
            var gn = function(Z, B) {
              this.reset(Z, B);
            };
            gn.prototype.reset = function(Z, B) {
              this.points = Z || [], this._distances = [0];
              for (var y = 1; y < this.points.length; y++) this._distances[y] = this._distances[y - 1] + this.points[y].dist(this.points[y - 1]);
              this.length = this._distances[this._distances.length - 1], this.padding = Math.min(B || 0, 0.5 * this.length), this.paddedLength = this.length - 2 * this.padding;
            }, gn.prototype.lerp = function(Z) {
              if (this.points.length === 1) return this.points[0];
              Z = i.clamp(Z, 0, 1);
              for (var B = 1, y = this._distances[B], b = Z * this.paddedLength + this.padding; y < b && B < this._distances.length; ) y = this._distances[++B];
              var R = B - 1, j = this._distances[R], G = y - j, ie = G > 0 ? (b - j) / G : 0;
              return this.points[R].mult(1 - ie).add(this.points[B].mult(ie));
            };
            var Mn = function(Z, B, y) {
              var b = this.boxCells = [], R = this.circleCells = [];
              this.xCellCount = Math.ceil(Z / y), this.yCellCount = Math.ceil(B / y);
              for (var j = 0; j < this.xCellCount * this.yCellCount; j++) b.push([]), R.push([]);
              this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = Z, this.height = B, this.xScale = this.xCellCount / Z, this.yScale = this.yCellCount / B, this.boxUid = 0, this.circleUid = 0;
            };
            function Xn(Z, B, y, b, R) {
              var j = i.create();
              return B ? (i.scale(j, j, [1 / R, 1 / R, 1]), y || i.rotateZ(j, j, b.angle)) : i.multiply(j, b.labelPlaneMatrix, Z), j;
            }
            function Pn(Z, B, y, b, R) {
              if (B) {
                var j = i.clone(Z);
                return i.scale(j, j, [R, R, 1]), y || i.rotateZ(j, j, -b.angle), j;
              }
              return b.glCoordMatrix;
            }
            function wn(Z, B) {
              var y = [Z.x, Z.y, 0, 1];
              Wr(y, y, B);
              var b = y[3];
              return { point: new i.Point(y[0] / b, y[1] / b), signedDistanceFromCamera: b };
            }
            function Rn(Z, B) {
              return 0.5 + Z / B * 0.5;
            }
            function _n(Z, B) {
              var y = Z[0] / Z[3], b = Z[1] / Z[3];
              return y >= -B[0] && y <= B[0] && b >= -B[1] && b <= B[1];
            }
            function En(Z, B, y, b, R, j, G, ie) {
              var fe = b ? Z.textSizeData : Z.iconSizeData, xe = i.evaluateSizeForZoom(fe, y.transform.zoom), Te = [256 / y.width * 2 + 1, 256 / y.height * 2 + 1], ze = b ? Z.text.dynamicLayoutVertexArray : Z.icon.dynamicLayoutVertexArray;
              ze.clear();
              for (var Ve = Z.lineVertexArray, ut = b ? Z.text.placedSymbolArray : Z.icon.placedSymbolArray, gt = y.transform.width / y.transform.height, wt = !1, Et = 0; Et < ut.length; Et++) {
                var zt = ut.get(Et);
                if (zt.hidden || zt.writingMode === i.WritingMode.vertical && !wt) zr(zt.numGlyphs, ze);
                else {
                  wt = !1;
                  var It = [zt.anchorX, zt.anchorY, 0, 1];
                  if (i.transformMat4(It, It, B), _n(It, Te)) {
                    var jt = It[3], Lt = Rn(y.transform.cameraToCenterDistance, jt), Zt = i.evaluateSizeForFeature(fe, xe, zt), Qt = G ? Zt / Lt : Zt * Lt, Xt = new i.Point(zt.anchorX, zt.anchorY), yn = wn(Xt, R).point, Sn = {}, Un = hr(zt, Qt, !1, ie, B, R, j, Z.glyphOffsetArray, Ve, ze, yn, Xt, Sn, gt);
                    wt = Un.useVertical, (Un.notEnoughRoom || wt || Un.needsFlipping && hr(zt, Qt, !0, ie, B, R, j, Z.glyphOffsetArray, Ve, ze, yn, Xt, Sn, gt).notEnoughRoom) && zr(zt.numGlyphs, ze);
                  } else zr(zt.numGlyphs, ze);
                }
              }
              b ? Z.text.dynamicLayoutVertexBuffer.updateData(ze) : Z.icon.dynamicLayoutVertexBuffer.updateData(ze);
            }
            function Kn(Z, B, y, b, R, j, G, ie, fe, xe, Te) {
              var ze = ie.glyphStartIndex + ie.numGlyphs, Ve = ie.lineStartIndex, ut = ie.lineStartIndex + ie.lineLength, gt = B.getoffsetX(ie.glyphStartIndex), wt = B.getoffsetX(ze - 1), Et = lr(Z * gt, y, b, R, j, G, ie.segment, Ve, ut, fe, xe, Te);
              if (!Et) return null;
              var zt = lr(Z * wt, y, b, R, j, G, ie.segment, Ve, ut, fe, xe, Te);
              return zt ? { first: Et, last: zt } : null;
            }
            function Wn(Z, B, y, b) {
              return Z === i.WritingMode.horizontal && Math.abs(y.y - B.y) > Math.abs(y.x - B.x) * b ? { useVertical: !0 } : (Z === i.WritingMode.vertical ? B.y < y.y : B.x > y.x) ? { needsFlipping: !0 } : null;
            }
            function hr(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut) {
              var gt, wt = B / 24, Et = Z.lineOffsetX * wt, zt = Z.lineOffsetY * wt;
              if (Z.numGlyphs > 1) {
                var It = Z.glyphStartIndex + Z.numGlyphs, jt = Z.lineStartIndex, Lt = Z.lineStartIndex + Z.lineLength, Zt = Kn(wt, ie, Et, zt, y, Te, ze, Z, fe, j, Ve);
                if (!Zt) return { notEnoughRoom: !0 };
                var Qt = wn(Zt.first.point, G).point, Xt = wn(Zt.last.point, G).point;
                if (b && !y) {
                  var yn = Wn(Z.writingMode, Qt, Xt, ut);
                  if (yn) return yn;
                }
                gt = [Zt.first];
                for (var Sn = Z.glyphStartIndex + 1; Sn < It - 1; Sn++) gt.push(lr(wt * ie.getoffsetX(Sn), Et, zt, y, Te, ze, Z.segment, jt, Lt, fe, j, Ve));
                gt.push(Zt.last);
              } else {
                if (b && !y) {
                  var Un = wn(ze, R).point, Vn = Z.lineStartIndex + Z.segment + 1, Yn = new i.Point(fe.getx(Vn), fe.gety(Vn)), er = wn(Yn, R), kr = er.signedDistanceFromCamera > 0 ? er.point : Zn(ze, Yn, Un, 1, R), or = Wn(Z.writingMode, Un, kr, ut);
                  if (or) return or;
                }
                var Mr = lr(wt * ie.getoffsetX(Z.glyphStartIndex), Et, zt, y, Te, ze, Z.segment, Z.lineStartIndex, Z.lineStartIndex + Z.lineLength, fe, j, Ve);
                if (!Mr) return { notEnoughRoom: !0 };
                gt = [Mr];
              }
              for (var fr = 0, Or = gt; fr < Or.length; fr += 1) {
                var br = Or[fr];
                i.addDynamicAttributes(xe, br.point, br.angle);
              }
              return {};
            }
            function Zn(Z, B, y, b, R) {
              var j = wn(Z.add(Z.sub(B)._unit()), R).point, G = y.sub(j);
              return y.add(G._mult(b / G.mag()));
            }
            function lr(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze) {
              var Ve = b ? Z - B : Z + B, ut = Ve > 0 ? 1 : -1, gt = 0;
              b && (ut *= -1, gt = Math.PI), ut < 0 && (gt += Math.PI);
              for (var wt = ut > 0 ? ie + G : ie + G + 1, Et = R, zt = R, It = 0, jt = 0, Lt = Math.abs(Ve), Zt = []; It + jt <= Lt; ) {
                if ((wt += ut) < ie || wt >= fe) return null;
                if (zt = Et, Zt.push(Et), (Et = ze[wt]) === void 0) {
                  var Qt = new i.Point(xe.getx(wt), xe.gety(wt)), Xt = wn(Qt, Te);
                  if (Xt.signedDistanceFromCamera > 0) Et = ze[wt] = Xt.point;
                  else {
                    var yn = wt - ut;
                    Et = Zn(It === 0 ? j : new i.Point(xe.getx(yn), xe.gety(yn)), Qt, zt, Lt - It + 1, Te);
                  }
                }
                It += jt, jt = zt.dist(Et);
              }
              var Sn = (Lt - It) / jt, Un = Et.sub(zt), Vn = Un.mult(Sn)._add(zt);
              Vn._add(Un._unit()._perp()._mult(y * ut));
              var Yn = gt + Math.atan2(Et.y - zt.y, Et.x - zt.x);
              return Zt.push(Vn), { point: Vn, angle: Yn, path: Zt };
            }
            Mn.prototype.keysLength = function() {
              return this.boxKeys.length + this.circleKeys.length;
            }, Mn.prototype.insert = function(Z, B, y, b, R) {
              this._forEachCell(B, y, b, R, this._insertBoxCell, this.boxUid++), this.boxKeys.push(Z), this.bboxes.push(B), this.bboxes.push(y), this.bboxes.push(b), this.bboxes.push(R);
            }, Mn.prototype.insertCircle = function(Z, B, y, b) {
              this._forEachCell(B - b, y - b, B + b, y + b, this._insertCircleCell, this.circleUid++), this.circleKeys.push(Z), this.circles.push(B), this.circles.push(y), this.circles.push(b);
            }, Mn.prototype._insertBoxCell = function(Z, B, y, b, R, j) {
              this.boxCells[R].push(j);
            }, Mn.prototype._insertCircleCell = function(Z, B, y, b, R, j) {
              this.circleCells[R].push(j);
            }, Mn.prototype._query = function(Z, B, y, b, R, j) {
              if (y < 0 || Z > this.width || b < 0 || B > this.height) return !R && [];
              var G = [];
              if (Z <= 0 && B <= 0 && this.width <= y && this.height <= b) {
                if (R) return !0;
                for (var ie = 0; ie < this.boxKeys.length; ie++) G.push({ key: this.boxKeys[ie], x1: this.bboxes[4 * ie], y1: this.bboxes[4 * ie + 1], x2: this.bboxes[4 * ie + 2], y2: this.bboxes[4 * ie + 3] });
                for (var fe = 0; fe < this.circleKeys.length; fe++) {
                  var xe = this.circles[3 * fe], Te = this.circles[3 * fe + 1], ze = this.circles[3 * fe + 2];
                  G.push({ key: this.circleKeys[fe], x1: xe - ze, y1: Te - ze, x2: xe + ze, y2: Te + ze });
                }
                return j ? G.filter(j) : G;
              }
              var Ve = { hitTest: R, seenUids: { box: {}, circle: {} } };
              return this._forEachCell(Z, B, y, b, this._queryCell, G, Ve, j), R ? G.length > 0 : G;
            }, Mn.prototype._queryCircle = function(Z, B, y, b, R) {
              var j = Z - y, G = Z + y, ie = B - y, fe = B + y;
              if (G < 0 || j > this.width || fe < 0 || ie > this.height) return !b && [];
              var xe = [], Te = { hitTest: b, circle: { x: Z, y: B, radius: y }, seenUids: { box: {}, circle: {} } };
              return this._forEachCell(j, ie, G, fe, this._queryCellCircle, xe, Te, R), b ? xe.length > 0 : xe;
            }, Mn.prototype.query = function(Z, B, y, b, R) {
              return this._query(Z, B, y, b, !1, R);
            }, Mn.prototype.hitTest = function(Z, B, y, b, R) {
              return this._query(Z, B, y, b, !0, R);
            }, Mn.prototype.hitTestCircle = function(Z, B, y, b) {
              return this._queryCircle(Z, B, y, !0, b);
            }, Mn.prototype._queryCell = function(Z, B, y, b, R, j, G, ie) {
              var fe = G.seenUids, xe = this.boxCells[R];
              if (xe !== null) for (var Te = this.bboxes, ze = 0, Ve = xe; ze < Ve.length; ze += 1) {
                var ut = Ve[ze];
                if (!fe.box[ut]) {
                  fe.box[ut] = !0;
                  var gt = 4 * ut;
                  if (Z <= Te[gt + 2] && B <= Te[gt + 3] && y >= Te[gt + 0] && b >= Te[gt + 1] && (!ie || ie(this.boxKeys[ut]))) {
                    if (G.hitTest) return j.push(!0), !0;
                    j.push({ key: this.boxKeys[ut], x1: Te[gt], y1: Te[gt + 1], x2: Te[gt + 2], y2: Te[gt + 3] });
                  }
                }
              }
              var wt = this.circleCells[R];
              if (wt !== null) for (var Et = this.circles, zt = 0, It = wt; zt < It.length; zt += 1) {
                var jt = It[zt];
                if (!fe.circle[jt]) {
                  fe.circle[jt] = !0;
                  var Lt = 3 * jt;
                  if (this._circleAndRectCollide(Et[Lt], Et[Lt + 1], Et[Lt + 2], Z, B, y, b) && (!ie || ie(this.circleKeys[jt]))) {
                    if (G.hitTest) return j.push(!0), !0;
                    var Zt = Et[Lt], Qt = Et[Lt + 1], Xt = Et[Lt + 2];
                    j.push({ key: this.circleKeys[jt], x1: Zt - Xt, y1: Qt - Xt, x2: Zt + Xt, y2: Qt + Xt });
                  }
                }
              }
            }, Mn.prototype._queryCellCircle = function(Z, B, y, b, R, j, G, ie) {
              var fe = G.circle, xe = G.seenUids, Te = this.boxCells[R];
              if (Te !== null) for (var ze = this.bboxes, Ve = 0, ut = Te; Ve < ut.length; Ve += 1) {
                var gt = ut[Ve];
                if (!xe.box[gt]) {
                  xe.box[gt] = !0;
                  var wt = 4 * gt;
                  if (this._circleAndRectCollide(fe.x, fe.y, fe.radius, ze[wt + 0], ze[wt + 1], ze[wt + 2], ze[wt + 3]) && (!ie || ie(this.boxKeys[gt]))) return j.push(!0), !0;
                }
              }
              var Et = this.circleCells[R];
              if (Et !== null) for (var zt = this.circles, It = 0, jt = Et; It < jt.length; It += 1) {
                var Lt = jt[It];
                if (!xe.circle[Lt]) {
                  xe.circle[Lt] = !0;
                  var Zt = 3 * Lt;
                  if (this._circlesCollide(zt[Zt], zt[Zt + 1], zt[Zt + 2], fe.x, fe.y, fe.radius) && (!ie || ie(this.circleKeys[Lt]))) return j.push(!0), !0;
                }
              }
            }, Mn.prototype._forEachCell = function(Z, B, y, b, R, j, G, ie) {
              for (var fe = this._convertToXCellCoord(Z), xe = this._convertToYCellCoord(B), Te = this._convertToXCellCoord(y), ze = this._convertToYCellCoord(b), Ve = fe; Ve <= Te; Ve++) for (var ut = xe; ut <= ze; ut++) {
                var gt = this.xCellCount * ut + Ve;
                if (R.call(this, Z, B, y, b, gt, j, G, ie)) return;
              }
            }, Mn.prototype._convertToXCellCoord = function(Z) {
              return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(Z * this.xScale)));
            }, Mn.prototype._convertToYCellCoord = function(Z) {
              return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(Z * this.yScale)));
            }, Mn.prototype._circlesCollide = function(Z, B, y, b, R, j) {
              var G = b - Z, ie = R - B, fe = y + j;
              return fe * fe > G * G + ie * ie;
            }, Mn.prototype._circleAndRectCollide = function(Z, B, y, b, R, j, G) {
              var ie = (j - b) / 2, fe = Math.abs(Z - (b + ie));
              if (fe > ie + y) return !1;
              var xe = (G - R) / 2, Te = Math.abs(B - (R + xe));
              if (Te > xe + y) return !1;
              if (fe <= ie || Te <= xe) return !0;
              var ze = fe - ie, Ve = Te - xe;
              return ze * ze + Ve * Ve <= y * y;
            };
            var cr = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
            function zr(Z, B) {
              for (var y = 0; y < Z; y++) {
                var b = B.length;
                B.resize(b + 4), B.float32.set(cr, 3 * b);
              }
            }
            function Wr(Z, B, y) {
              var b = B[0], R = B[1];
              return Z[0] = y[0] * b + y[4] * R + y[12], Z[1] = y[1] * b + y[5] * R + y[13], Z[3] = y[3] * b + y[7] * R + y[15], Z;
            }
            var mr = 100, Ir = function(Z, B, y) {
              B === void 0 && (B = new Mn(Z.width + 200, Z.height + 200, 25)), y === void 0 && (y = new Mn(Z.width + 200, Z.height + 200, 25)), this.transform = Z, this.grid = B, this.ignoredGrid = y, this.pitchfactor = Math.cos(Z._pitch) * Z.cameraToCenterDistance, this.screenRightBoundary = Z.width + mr, this.screenBottomBoundary = Z.height + mr, this.gridRightBoundary = Z.width + 200, this.gridBottomBoundary = Z.height + 200;
            };
            function yr(Z, B, y) {
              return B * (i.EXTENT / (Z.tileSize * Math.pow(2, y - Z.tileID.overscaledZ)));
            }
            Ir.prototype.placeCollisionBox = function(Z, B, y, b, R) {
              var j = this.projectAndGetPerspectiveRatio(b, Z.anchorPointX, Z.anchorPointY), G = y * j.perspectiveRatio, ie = Z.x1 * G + j.point.x, fe = Z.y1 * G + j.point.y, xe = Z.x2 * G + j.point.x, Te = Z.y2 * G + j.point.y;
              return !this.isInsideGrid(ie, fe, xe, Te) || !B && this.grid.hitTest(ie, fe, xe, Te, R) ? { box: [], offscreen: !1 } : { box: [ie, fe, xe, Te], offscreen: this.isOffscreen(ie, fe, xe, Te) };
            }, Ir.prototype.placeCollisionCircles = function(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve) {
              var ut = [], gt = new i.Point(B.anchorX, B.anchorY), wt = wn(gt, j), Et = Rn(this.transform.cameraToCenterDistance, wt.signedDistanceFromCamera), zt = (xe ? R / Et : R * Et) / i.ONE_EM, It = wn(gt, G).point, jt = Kn(zt, b, B.lineOffsetX * zt, B.lineOffsetY * zt, !1, It, gt, B, y, G, {}), Lt = !1, Zt = !1, Qt = !0;
              if (jt) {
                for (var Xt = 0.5 * ze * Et + Ve, yn = new i.Point(-100, -100), Sn = new i.Point(this.screenRightBoundary, this.screenBottomBoundary), Un = new gn(), Vn = jt.first, Yn = jt.last, er = [], kr = Vn.path.length - 1; kr >= 1; kr--) er.push(Vn.path[kr]);
                for (var or = 1; or < Yn.path.length; or++) er.push(Yn.path[or]);
                var Mr = 2.5 * Xt;
                if (ie) {
                  var fr = er.map(function(ca) {
                    return wn(ca, ie);
                  });
                  er = fr.some(function(ca) {
                    return ca.signedDistanceFromCamera <= 0;
                  }) ? [] : fr.map(function(ca) {
                    return ca.point;
                  });
                }
                var Or = [];
                if (er.length > 0) {
                  for (var br = er[0].clone(), Nr = er[0].clone(), ii = 1; ii < er.length; ii++) br.x = Math.min(br.x, er[ii].x), br.y = Math.min(br.y, er[ii].y), Nr.x = Math.max(Nr.x, er[ii].x), Nr.y = Math.max(Nr.y, er[ii].y);
                  Or = br.x >= yn.x && Nr.x <= Sn.x && br.y >= yn.y && Nr.y <= Sn.y ? [er] : Nr.x < yn.x || br.x > Sn.x || Nr.y < yn.y || br.y > Sn.y ? [] : i.clipLine([er], yn.x, yn.y, Sn.x, Sn.y);
                }
                for (var Rr = 0, ei = Or; Rr < ei.length; Rr += 1) {
                  var pi = ei[Rr];
                  Un.reset(pi, 0.25 * Xt);
                  var qi;
                  qi = Un.length <= 0.5 * Xt ? 1 : Math.ceil(Un.paddedLength / Mr) + 1;
                  for (var Li = 0; Li < qi; Li++) {
                    var Yi = Li / Math.max(qi - 1, 1), Gi = Un.lerp(Yi), ra = Gi.x + mr, wa = Gi.y + mr;
                    ut.push(ra, wa, Xt, 0);
                    var uo = ra - Xt, no = wa - Xt, Ko = ra + Xt, Ia = wa + Xt;
                    if (Qt = Qt && this.isOffscreen(uo, no, Ko, Ia), Zt = Zt || this.isInsideGrid(uo, no, Ko, Ia), !Z && this.grid.hitTestCircle(ra, wa, Xt, Te) && (Lt = !0, !fe)) return { circles: [], offscreen: !1, collisionDetected: Lt };
                  }
                }
              }
              return { circles: !fe && Lt || !Zt ? [] : ut, offscreen: Qt, collisionDetected: Lt };
            }, Ir.prototype.queryRenderedSymbols = function(Z) {
              if (Z.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
              for (var B = [], y = 1 / 0, b = 1 / 0, R = -1 / 0, j = -1 / 0, G = 0, ie = Z; G < ie.length; G += 1) {
                var fe = ie[G], xe = new i.Point(fe.x + mr, fe.y + mr);
                y = Math.min(y, xe.x), b = Math.min(b, xe.y), R = Math.max(R, xe.x), j = Math.max(j, xe.y), B.push(xe);
              }
              for (var Te = {}, ze = {}, Ve = 0, ut = this.grid.query(y, b, R, j).concat(this.ignoredGrid.query(y, b, R, j)); Ve < ut.length; Ve += 1) {
                var gt = ut[Ve], wt = gt.key;
                if (Te[wt.bucketInstanceId] === void 0 && (Te[wt.bucketInstanceId] = {}), !Te[wt.bucketInstanceId][wt.featureIndex]) {
                  var Et = [new i.Point(gt.x1, gt.y1), new i.Point(gt.x2, gt.y1), new i.Point(gt.x2, gt.y2), new i.Point(gt.x1, gt.y2)];
                  i.polygonIntersectsPolygon(B, Et) && (Te[wt.bucketInstanceId][wt.featureIndex] = !0, ze[wt.bucketInstanceId] === void 0 && (ze[wt.bucketInstanceId] = []), ze[wt.bucketInstanceId].push(wt.featureIndex));
                }
              }
              return ze;
            }, Ir.prototype.insertCollisionBox = function(Z, B, y, b, R) {
              var j = { bucketInstanceId: y, featureIndex: b, collisionGroupID: R };
              (B ? this.ignoredGrid : this.grid).insert(j, Z[0], Z[1], Z[2], Z[3]);
            }, Ir.prototype.insertCollisionCircles = function(Z, B, y, b, R) {
              for (var j = B ? this.ignoredGrid : this.grid, G = { bucketInstanceId: y, featureIndex: b, collisionGroupID: R }, ie = 0; ie < Z.length; ie += 4) j.insertCircle(G, Z[ie], Z[ie + 1], Z[ie + 2]);
            }, Ir.prototype.projectAndGetPerspectiveRatio = function(Z, B, y) {
              var b = [B, y, 0, 1];
              return Wr(b, b, Z), { point: new i.Point((b[0] / b[3] + 1) / 2 * this.transform.width + mr, (-b[1] / b[3] + 1) / 2 * this.transform.height + mr), perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / b[3] * 0.5 };
            }, Ir.prototype.isOffscreen = function(Z, B, y, b) {
              return y < mr || Z >= this.screenRightBoundary || b < mr || B > this.screenBottomBoundary;
            }, Ir.prototype.isInsideGrid = function(Z, B, y, b) {
              return y >= 0 && Z < this.gridRightBoundary && b >= 0 && B < this.gridBottomBoundary;
            }, Ir.prototype.getViewportMatrix = function() {
              var Z = i.identity([]);
              return i.translate(Z, Z, [-100, -100, 0]), Z;
            };
            var Vr = function(Z, B, y, b) {
              this.opacity = Z ? Math.max(0, Math.min(1, Z.opacity + (Z.placed ? B : -B))) : b && y ? 1 : 0, this.placed = y;
            };
            Vr.prototype.isHidden = function() {
              return this.opacity === 0 && !this.placed;
            };
            var rn = function(Z, B, y, b, R) {
              this.text = new Vr(Z ? Z.text : null, B, y, R), this.icon = new Vr(Z ? Z.icon : null, B, b, R);
            };
            rn.prototype.isHidden = function() {
              return this.text.isHidden() && this.icon.isHidden();
            };
            var Tn = function(Z, B, y) {
              this.text = Z, this.icon = B, this.skipFade = y;
            }, sr = function() {
              this.invProjMatrix = i.create(), this.viewportMatrix = i.create(), this.circles = [];
            }, $n = function(Z, B, y, b, R) {
              this.bucketInstanceId = Z, this.featureIndex = B, this.sourceLayerIndex = y, this.bucketIndex = b, this.tileID = R;
            }, ur = function(Z) {
              this.crossSourceCollisions = Z, this.maxGroupID = 0, this.collisionGroups = {};
            };
            function Tr(Z, B, y, b, R) {
              var j = i.getAnchorAlignment(Z), G = -(j.horizontalAlign - 0.5) * B, ie = -(j.verticalAlign - 0.5) * y, fe = i.evaluateVariableOffset(Z, b);
              return new i.Point(G + fe[0] * R, ie + fe[1] * R);
            }
            function wr(Z, B, y, b, R, j) {
              var G = Z.x1, ie = Z.x2, fe = Z.y1, xe = Z.y2, Te = Z.anchorPointX, ze = Z.anchorPointY, Ve = new i.Point(B, y);
              return b && Ve._rotate(R ? j : -j), { x1: G + Ve.x, y1: fe + Ve.y, x2: ie + Ve.x, y2: xe + Ve.y, anchorPointX: Te, anchorPointY: ze };
            }
            ur.prototype.get = function(Z) {
              if (this.crossSourceCollisions) return { ID: 0, predicate: null };
              if (!this.collisionGroups[Z]) {
                var B = ++this.maxGroupID;
                this.collisionGroups[Z] = { ID: B, predicate: function(y) {
                  return y.collisionGroupID === B;
                } };
              }
              return this.collisionGroups[Z];
            };
            var Fr = function(Z, B, y, b) {
              this.transform = Z.clone(), this.collisionIndex = new Ir(this.transform), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = B, this.retainedQueryData = {}, this.collisionGroups = new ur(y), this.collisionCircleArrays = {}, this.prevPlacement = b, b && (b.prevPlacement = void 0), this.placedOrientations = {};
            };
            function Xr(Z, B, y, b, R) {
              Z.emplaceBack(B ? 1 : 0, y ? 1 : 0, b || 0, R || 0), Z.emplaceBack(B ? 1 : 0, y ? 1 : 0, b || 0, R || 0), Z.emplaceBack(B ? 1 : 0, y ? 1 : 0, b || 0, R || 0), Z.emplaceBack(B ? 1 : 0, y ? 1 : 0, b || 0, R || 0);
            }
            Fr.prototype.getBucketParts = function(Z, B, y, b) {
              var R = y.getBucket(B), j = y.latestFeatureIndex;
              if (R && j && B.id === R.layerIds[0]) {
                var G = y.collisionBoxArray, ie = R.layers[0].layout, fe = Math.pow(2, this.transform.zoom - y.tileID.overscaledZ), xe = y.tileSize / i.EXTENT, Te = this.transform.calculatePosMatrix(y.tileID.toUnwrapped()), ze = ie.get("text-pitch-alignment") === "map", Ve = ie.get("text-rotation-alignment") === "map", ut = yr(y, 1, this.transform.zoom), gt = Xn(Te, ze, Ve, this.transform, ut), wt = null;
                if (ze) {
                  var Et = Pn(Te, ze, Ve, this.transform, ut);
                  wt = i.multiply([], this.transform.labelPlaneMatrix, Et);
                }
                this.retainedQueryData[R.bucketInstanceId] = new $n(R.bucketInstanceId, j, R.sourceLayerIndex, R.index, y.tileID);
                var zt = { bucket: R, layout: ie, posMatrix: Te, textLabelPlaneMatrix: gt, labelToScreenMatrix: wt, scale: fe, textPixelRatio: xe, holdingForFade: y.holdingForFade(), collisionBoxArray: G, partiallyEvaluatedTextSize: i.evaluateSizeForZoom(R.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(R.sourceID) };
                if (b) for (var It = 0, jt = R.sortKeyRanges; It < jt.length; It += 1) {
                  var Lt = jt[It], Zt = Lt.sortKey, Qt = Lt.symbolInstanceStart, Xt = Lt.symbolInstanceEnd;
                  Z.push({ sortKey: Zt, symbolInstanceStart: Qt, symbolInstanceEnd: Xt, parameters: zt });
                }
                else Z.push({ symbolInstanceStart: 0, symbolInstanceEnd: R.symbolInstances.length, parameters: zt });
              }
            }, Fr.prototype.attemptAnchorPlacement = function(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt) {
              var wt, Et = [ze.textOffset0, ze.textOffset1], zt = Tr(Z, y, b, Et, R), It = this.collisionIndex.placeCollisionBox(wr(B, zt.x, zt.y, j, G, this.transform.angle), Te, ie, fe, xe.predicate);
              if (!gt || this.collisionIndex.placeCollisionBox(wr(gt, zt.x, zt.y, j, G, this.transform.angle), Te, ie, fe, xe.predicate).box.length !== 0) return It.box.length > 0 ? (this.prevPlacement && this.prevPlacement.variableOffsets[ze.crossTileID] && this.prevPlacement.placements[ze.crossTileID] && this.prevPlacement.placements[ze.crossTileID].text && (wt = this.prevPlacement.variableOffsets[ze.crossTileID].anchor), this.variableOffsets[ze.crossTileID] = { textOffset: Et, width: y, height: b, anchor: Z, textBoxScale: R, prevAnchor: wt }, this.markUsedJustification(Ve, Z, ze, ut), Ve.allowVerticalPlacement && (this.markUsedOrientation(Ve, ut, ze), this.placedOrientations[ze.crossTileID] = ut), { shift: zt, placedGlyphBoxes: It }) : void 0;
            }, Fr.prototype.placeLayerBucketPart = function(Z, B, y) {
              var b = this, R = Z.parameters, j = R.bucket, G = R.layout, ie = R.posMatrix, fe = R.textLabelPlaneMatrix, xe = R.labelToScreenMatrix, Te = R.textPixelRatio, ze = R.holdingForFade, Ve = R.collisionBoxArray, ut = R.partiallyEvaluatedTextSize, gt = R.collisionGroup, wt = G.get("text-optional"), Et = G.get("icon-optional"), zt = G.get("text-allow-overlap"), It = G.get("icon-allow-overlap"), jt = G.get("text-rotation-alignment") === "map", Lt = G.get("text-pitch-alignment") === "map", Zt = G.get("icon-text-fit") !== "none", Qt = G.get("symbol-z-order") === "viewport-y", Xt = zt && (It || !j.hasIconData() || Et), yn = It && (zt || !j.hasTextData() || wt);
              !j.collisionArrays && Ve && j.deserializeCollisionBoxes(Ve);
              var Sn = function(or, Mr) {
                if (!B[or.crossTileID]) if (ze) b.placements[or.crossTileID] = new Tn(!1, !1, !1);
                else {
                  var fr, Or = !1, br = !1, Nr = !0, ii = null, Rr = { box: null, offscreen: null }, ei = { box: null, offscreen: null }, pi = null, qi = null, Li = 0, Yi = 0, Gi = 0;
                  Mr.textFeatureIndex ? Li = Mr.textFeatureIndex : or.useRuntimeCollisionCircles && (Li = or.featureIndex), Mr.verticalTextFeatureIndex && (Yi = Mr.verticalTextFeatureIndex);
                  var ra = Mr.textBox;
                  if (ra) {
                    var wa = function(io) {
                      var uu = i.WritingMode.horizontal;
                      if (j.allowVerticalPlacement && !io && b.prevPlacement) {
                        var Jo = b.prevPlacement.placedOrientations[or.crossTileID];
                        Jo && (b.placedOrientations[or.crossTileID] = Jo, uu = Jo, b.markUsedOrientation(j, uu, or));
                      }
                      return uu;
                    }, uo = function(io, uu) {
                      if (j.allowVerticalPlacement && or.numVerticalGlyphVertices > 0 && Mr.verticalTextBox) for (var Jo = 0, gh = j.writingModes; Jo < gh.length && (gh[Jo] === i.WritingMode.vertical ? (Rr = uu(), ei = Rr) : Rr = io(), !(Rr && Rr.box && Rr.box.length)); Jo += 1) ;
                      else Rr = io();
                    };
                    if (G.get("text-variable-anchor")) {
                      var no = G.get("text-variable-anchor");
                      if (b.prevPlacement && b.prevPlacement.variableOffsets[or.crossTileID]) {
                        var Ko = b.prevPlacement.variableOffsets[or.crossTileID];
                        no.indexOf(Ko.anchor) > 0 && (no = no.filter(function(io) {
                          return io !== Ko.anchor;
                        })).unshift(Ko.anchor);
                      }
                      var Ia = function(io, uu, Jo) {
                        for (var gh = io.x2 - io.x1, a1 = io.y2 - io.y1, yf = or.textBoxScale, Ud = Zt && !It ? uu : null, fc = { box: [], offscreen: !1 }, Vd = zt ? 2 * no.length : no.length, $f = 0; $f < Vd; ++$f) {
                          var zp = no[$f % no.length], Rp = $f >= no.length, yh = b.attemptAnchorPlacement(zp, io, gh, a1, yf, jt, Lt, Te, ie, gt, Rp, or, j, Jo, Ud);
                          if (yh && (fc = yh.placedGlyphBoxes) && fc.box && fc.box.length) {
                            Or = !0, ii = yh.shift;
                            break;
                          }
                        }
                        return fc;
                      };
                      uo(function() {
                        return Ia(ra, Mr.iconBox, i.WritingMode.horizontal);
                      }, function() {
                        var io = Mr.verticalTextBox, uu = Rr && Rr.box && Rr.box.length;
                        return j.allowVerticalPlacement && !uu && or.numVerticalGlyphVertices > 0 && io ? Ia(io, Mr.verticalIconBox, i.WritingMode.vertical) : { box: null, offscreen: null };
                      }), Rr && (Or = Rr.box, Nr = Rr.offscreen);
                      var ca = wa(Rr && Rr.box);
                      if (!Or && b.prevPlacement) {
                        var Ga = b.prevPlacement.variableOffsets[or.crossTileID];
                        Ga && (b.variableOffsets[or.crossTileID] = Ga, b.markUsedJustification(j, Ga.anchor, or, ca));
                      }
                    } else {
                      var Oa = function(io, uu) {
                        var Jo = b.collisionIndex.placeCollisionBox(io, zt, Te, ie, gt.predicate);
                        return Jo && Jo.box && Jo.box.length && (b.markUsedOrientation(j, uu, or), b.placedOrientations[or.crossTileID] = uu), Jo;
                      };
                      uo(function() {
                        return Oa(ra, i.WritingMode.horizontal);
                      }, function() {
                        var io = Mr.verticalTextBox;
                        return j.allowVerticalPlacement && or.numVerticalGlyphVertices > 0 && io ? Oa(io, i.WritingMode.vertical) : { box: null, offscreen: null };
                      }), wa(Rr && Rr.box && Rr.box.length);
                    }
                  }
                  if (Or = (fr = Rr) && fr.box && fr.box.length > 0, Nr = fr && fr.offscreen, or.useRuntimeCollisionCircles) {
                    var ba = j.text.placedSymbolArray.get(or.centerJustifiedTextSymbolIndex), Da = i.evaluateSizeForFeature(j.textSizeData, ut, ba), Ua = G.get("text-padding"), pa = or.collisionCircleDiameter;
                    pi = b.collisionIndex.placeCollisionCircles(zt, ba, j.lineVertexArray, j.glyphOffsetArray, Da, ie, fe, xe, y, Lt, gt.predicate, pa, Ua), Or = zt || pi.circles.length > 0 && !pi.collisionDetected, Nr = Nr && pi.offscreen;
                  }
                  if (Mr.iconFeatureIndex && (Gi = Mr.iconFeatureIndex), Mr.iconBox) {
                    var lu = function(io) {
                      var uu = Zt && ii ? wr(io, ii.x, ii.y, jt, Lt, b.transform.angle) : io;
                      return b.collisionIndex.placeCollisionBox(uu, It, Te, ie, gt.predicate);
                    };
                    br = ei && ei.box && ei.box.length && Mr.verticalIconBox ? (qi = lu(Mr.verticalIconBox)).box.length > 0 : (qi = lu(Mr.iconBox)).box.length > 0, Nr = Nr && qi.offscreen;
                  }
                  var xo = wt || or.numHorizontalGlyphVertices === 0 && or.numVerticalGlyphVertices === 0, Hi = Et || or.numIconVertices === 0;
                  if (xo || Hi ? Hi ? xo || (br = br && Or) : Or = br && Or : br = Or = br && Or, Or && fr && fr.box && (ei && ei.box && Yi ? b.collisionIndex.insertCollisionBox(fr.box, G.get("text-ignore-placement"), j.bucketInstanceId, Yi, gt.ID) : b.collisionIndex.insertCollisionBox(fr.box, G.get("text-ignore-placement"), j.bucketInstanceId, Li, gt.ID)), br && qi && b.collisionIndex.insertCollisionBox(qi.box, G.get("icon-ignore-placement"), j.bucketInstanceId, Gi, gt.ID), pi && (Or && b.collisionIndex.insertCollisionCircles(pi.circles, G.get("text-ignore-placement"), j.bucketInstanceId, Li, gt.ID), y)) {
                    var As = j.bucketInstanceId, $o = b.collisionCircleArrays[As];
                    $o === void 0 && ($o = b.collisionCircleArrays[As] = new sr());
                    for (var Nl = 0; Nl < pi.circles.length; Nl += 4) $o.circles.push(pi.circles[Nl + 0]), $o.circles.push(pi.circles[Nl + 1]), $o.circles.push(pi.circles[Nl + 2]), $o.circles.push(pi.collisionDetected ? 1 : 0);
                  }
                  b.placements[or.crossTileID] = new Tn(Or || Xt, br || yn, Nr || j.justReloaded), B[or.crossTileID] = !0;
                }
              };
              if (Qt) for (var Un = j.getSortedSymbolIndexes(this.transform.angle), Vn = Un.length - 1; Vn >= 0; --Vn) {
                var Yn = Un[Vn];
                Sn(j.symbolInstances.get(Yn), j.collisionArrays[Yn]);
              }
              else for (var er = Z.symbolInstanceStart; er < Z.symbolInstanceEnd; er++) Sn(j.symbolInstances.get(er), j.collisionArrays[er]);
              if (y && j.bucketInstanceId in this.collisionCircleArrays) {
                var kr = this.collisionCircleArrays[j.bucketInstanceId];
                i.invert(kr.invProjMatrix, ie), kr.viewportMatrix = this.collisionIndex.getViewportMatrix();
              }
              j.justReloaded = !1;
            }, Fr.prototype.markUsedJustification = function(Z, B, y, b) {
              var R, j = { left: y.leftJustifiedTextSymbolIndex, center: y.centerJustifiedTextSymbolIndex, right: y.rightJustifiedTextSymbolIndex };
              R = b === i.WritingMode.vertical ? y.verticalPlacedTextSymbolIndex : j[i.getAnchorJustification(B)];
              for (var G = 0, ie = [y.leftJustifiedTextSymbolIndex, y.centerJustifiedTextSymbolIndex, y.rightJustifiedTextSymbolIndex, y.verticalPlacedTextSymbolIndex]; G < ie.length; G += 1) {
                var fe = ie[G];
                fe >= 0 && (Z.text.placedSymbolArray.get(fe).crossTileID = R >= 0 && fe !== R ? 0 : y.crossTileID);
              }
            }, Fr.prototype.markUsedOrientation = function(Z, B, y) {
              for (var b = B === i.WritingMode.horizontal || B === i.WritingMode.horizontalOnly ? B : 0, R = B === i.WritingMode.vertical ? B : 0, j = 0, G = [y.leftJustifiedTextSymbolIndex, y.centerJustifiedTextSymbolIndex, y.rightJustifiedTextSymbolIndex]; j < G.length; j += 1) {
                var ie = G[j];
                Z.text.placedSymbolArray.get(ie).placedOrientation = b;
              }
              y.verticalPlacedTextSymbolIndex && (Z.text.placedSymbolArray.get(y.verticalPlacedTextSymbolIndex).placedOrientation = R);
            }, Fr.prototype.commit = function(Z) {
              this.commitTime = Z, this.zoomAtLastRecencyCheck = this.transform.zoom;
              var B = this.prevPlacement, y = !1;
              this.prevZoomAdjustment = B ? B.zoomAdjustment(this.transform.zoom) : 0;
              var b = B ? B.symbolFadeChange(Z) : 1, R = B ? B.opacities : {}, j = B ? B.variableOffsets : {}, G = B ? B.placedOrientations : {};
              for (var ie in this.placements) {
                var fe = this.placements[ie], xe = R[ie];
                xe ? (this.opacities[ie] = new rn(xe, b, fe.text, fe.icon), y = y || fe.text !== xe.text.placed || fe.icon !== xe.icon.placed) : (this.opacities[ie] = new rn(null, b, fe.text, fe.icon, fe.skipFade), y = y || fe.text || fe.icon);
              }
              for (var Te in R) {
                var ze = R[Te];
                if (!this.opacities[Te]) {
                  var Ve = new rn(ze, b, !1, !1);
                  Ve.isHidden() || (this.opacities[Te] = Ve, y = y || ze.text.placed || ze.icon.placed);
                }
              }
              for (var ut in j) this.variableOffsets[ut] || !this.opacities[ut] || this.opacities[ut].isHidden() || (this.variableOffsets[ut] = j[ut]);
              for (var gt in G) this.placedOrientations[gt] || !this.opacities[gt] || this.opacities[gt].isHidden() || (this.placedOrientations[gt] = G[gt]);
              y ? this.lastPlacementChangeTime = Z : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = B ? B.lastPlacementChangeTime : Z);
            }, Fr.prototype.updateLayerOpacities = function(Z, B) {
              for (var y = {}, b = 0, R = B; b < R.length; b += 1) {
                var j = R[b], G = j.getBucket(Z);
                G && j.latestFeatureIndex && Z.id === G.layerIds[0] && this.updateBucketOpacities(G, y, j.collisionBoxArray);
              }
            }, Fr.prototype.updateBucketOpacities = function(Z, B, y) {
              var b = this;
              Z.hasTextData() && Z.text.opacityVertexArray.clear(), Z.hasIconData() && Z.icon.opacityVertexArray.clear(), Z.hasIconCollisionBoxData() && Z.iconCollisionBox.collisionVertexArray.clear(), Z.hasTextCollisionBoxData() && Z.textCollisionBox.collisionVertexArray.clear();
              var R = Z.layers[0].layout, j = new rn(null, 0, !1, !1, !0), G = R.get("text-allow-overlap"), ie = R.get("icon-allow-overlap"), fe = R.get("text-variable-anchor"), xe = R.get("text-rotation-alignment") === "map", Te = R.get("text-pitch-alignment") === "map", ze = R.get("icon-text-fit") !== "none", Ve = new rn(null, 0, G && (ie || !Z.hasIconData() || R.get("icon-optional")), ie && (G || !Z.hasTextData() || R.get("text-optional")), !0);
              !Z.collisionArrays && y && (Z.hasIconCollisionBoxData() || Z.hasTextCollisionBoxData()) && Z.deserializeCollisionBoxes(y);
              for (var ut = function(zt, It, jt) {
                for (var Lt = 0; Lt < It / 4; Lt++) zt.opacityVertexArray.emplaceBack(jt);
              }, gt = function(zt) {
                var It = Z.symbolInstances.get(zt), jt = It.numHorizontalGlyphVertices, Lt = It.numVerticalGlyphVertices, Zt = It.crossTileID, Qt = B[Zt], Xt = b.opacities[Zt];
                Qt ? Xt = j : Xt || (Xt = Ve, b.opacities[Zt] = Xt), B[Zt] = !0;
                var yn = jt > 0 || Lt > 0, Sn = It.numIconVertices > 0, Un = b.placedOrientations[It.crossTileID], Vn = Un === i.WritingMode.vertical, Yn = Un === i.WritingMode.horizontal || Un === i.WritingMode.horizontalOnly;
                if (yn) {
                  var er = Jn(Xt.text), kr = Vn ? Hn : er;
                  ut(Z.text, jt, kr);
                  var or = Yn ? Hn : er;
                  ut(Z.text, Lt, or);
                  var Mr = Xt.text.isHidden();
                  [It.rightJustifiedTextSymbolIndex, It.centerJustifiedTextSymbolIndex, It.leftJustifiedTextSymbolIndex].forEach(function(Gi) {
                    Gi >= 0 && (Z.text.placedSymbolArray.get(Gi).hidden = Mr || Vn ? 1 : 0);
                  }), It.verticalPlacedTextSymbolIndex >= 0 && (Z.text.placedSymbolArray.get(It.verticalPlacedTextSymbolIndex).hidden = Mr || Yn ? 1 : 0);
                  var fr = b.variableOffsets[It.crossTileID];
                  fr && b.markUsedJustification(Z, fr.anchor, It, Un);
                  var Or = b.placedOrientations[It.crossTileID];
                  Or && (b.markUsedJustification(Z, "left", It, Or), b.markUsedOrientation(Z, Or, It));
                }
                if (Sn) {
                  var br = Jn(Xt.icon), Nr = !(ze && It.verticalPlacedIconSymbolIndex && Vn);
                  if (It.placedIconSymbolIndex >= 0) {
                    var ii = Nr ? br : Hn;
                    ut(Z.icon, It.numIconVertices, ii), Z.icon.placedSymbolArray.get(It.placedIconSymbolIndex).hidden = Xt.icon.isHidden();
                  }
                  if (It.verticalPlacedIconSymbolIndex >= 0) {
                    var Rr = Nr ? Hn : br;
                    ut(Z.icon, It.numVerticalIconVertices, Rr), Z.icon.placedSymbolArray.get(It.verticalPlacedIconSymbolIndex).hidden = Xt.icon.isHidden();
                  }
                }
                if (Z.hasIconCollisionBoxData() || Z.hasTextCollisionBoxData()) {
                  var ei = Z.collisionArrays[zt];
                  if (ei) {
                    var pi = new i.Point(0, 0);
                    if (ei.textBox || ei.verticalTextBox) {
                      var qi = !0;
                      if (fe) {
                        var Li = b.variableOffsets[Zt];
                        Li ? (pi = Tr(Li.anchor, Li.width, Li.height, Li.textOffset, Li.textBoxScale), xe && pi._rotate(Te ? b.transform.angle : -b.transform.angle)) : qi = !1;
                      }
                      ei.textBox && Xr(Z.textCollisionBox.collisionVertexArray, Xt.text.placed, !qi || Vn, pi.x, pi.y), ei.verticalTextBox && Xr(Z.textCollisionBox.collisionVertexArray, Xt.text.placed, !qi || Yn, pi.x, pi.y);
                    }
                    var Yi = !!(!Yn && ei.verticalIconBox);
                    ei.iconBox && Xr(Z.iconCollisionBox.collisionVertexArray, Xt.icon.placed, Yi, ze ? pi.x : 0, ze ? pi.y : 0), ei.verticalIconBox && Xr(Z.iconCollisionBox.collisionVertexArray, Xt.icon.placed, !Yi, ze ? pi.x : 0, ze ? pi.y : 0);
                  }
                }
              }, wt = 0; wt < Z.symbolInstances.length; wt++) gt(wt);
              if (Z.sortFeatures(this.transform.angle), this.retainedQueryData[Z.bucketInstanceId] && (this.retainedQueryData[Z.bucketInstanceId].featureSortOrder = Z.featureSortOrder), Z.hasTextData() && Z.text.opacityVertexBuffer && Z.text.opacityVertexBuffer.updateData(Z.text.opacityVertexArray), Z.hasIconData() && Z.icon.opacityVertexBuffer && Z.icon.opacityVertexBuffer.updateData(Z.icon.opacityVertexArray), Z.hasIconCollisionBoxData() && Z.iconCollisionBox.collisionVertexBuffer && Z.iconCollisionBox.collisionVertexBuffer.updateData(Z.iconCollisionBox.collisionVertexArray), Z.hasTextCollisionBoxData() && Z.textCollisionBox.collisionVertexBuffer && Z.textCollisionBox.collisionVertexBuffer.updateData(Z.textCollisionBox.collisionVertexArray), Z.bucketInstanceId in this.collisionCircleArrays) {
                var Et = this.collisionCircleArrays[Z.bucketInstanceId];
                Z.placementInvProjMatrix = Et.invProjMatrix, Z.placementViewportMatrix = Et.viewportMatrix, Z.collisionCircleArray = Et.circles, delete this.collisionCircleArrays[Z.bucketInstanceId];
              }
            }, Fr.prototype.symbolFadeChange = function(Z) {
              return this.fadeDuration === 0 ? 1 : (Z - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment;
            }, Fr.prototype.zoomAdjustment = function(Z) {
              return Math.max(0, (this.transform.zoom - Z) / 1.5);
            }, Fr.prototype.hasTransitions = function(Z) {
              return this.stale || Z - this.lastPlacementChangeTime < this.fadeDuration;
            }, Fr.prototype.stillRecent = function(Z, B) {
              var y = this.zoomAtLastRecencyCheck === B ? 1 - this.zoomAdjustment(B) : 1;
              return this.zoomAtLastRecencyCheck = B, this.commitTime + this.fadeDuration * y > Z;
            }, Fr.prototype.setStale = function() {
              this.stale = !0;
            };
            var un = Math.pow(2, 25), Gn = Math.pow(2, 24), on = Math.pow(2, 17), ln = Math.pow(2, 16), bn = Math.pow(2, 9), Nn = Math.pow(2, 8), jn = Math.pow(2, 1);
            function Jn(Z) {
              if (Z.opacity === 0 && !Z.placed) return 0;
              if (Z.opacity === 1 && Z.placed) return 4294967295;
              var B = Z.placed ? 1 : 0, y = Math.floor(127 * Z.opacity);
              return y * un + B * Gn + y * on + B * ln + y * bn + B * Nn + y * jn + B;
            }
            var Hn = 0, Ln = function(Z) {
              this._sortAcrossTiles = Z.layout.get("symbol-z-order") !== "viewport-y" && Z.layout.get("symbol-sort-key").constantOr(1) !== void 0, this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [];
            };
            Ln.prototype.continuePlacement = function(Z, B, y, b, R) {
              for (var j = this._bucketParts; this._currentTileIndex < Z.length; ) {
                var G = Z[this._currentTileIndex];
                if (B.getBucketParts(j, b, G, this._sortAcrossTiles), this._currentTileIndex++, R()) return !0;
              }
              for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, j.sort(function(fe, xe) {
                return fe.sortKey - xe.sortKey;
              })); this._currentPartIndex < j.length; ) {
                var ie = j[this._currentPartIndex];
                if (B.placeLayerBucketPart(ie, this._seenCrossTileIDs, y), this._currentPartIndex++, R()) return !0;
              }
              return !1;
            };
            var pn = function(Z, B, y, b, R, j, G) {
              this.placement = new Fr(Z, R, j, G), this._currentPlacementIndex = B.length - 1, this._forceFullPlacement = y, this._showCollisionBoxes = b, this._done = !1;
            };
            pn.prototype.isDone = function() {
              return this._done;
            }, pn.prototype.continuePlacement = function(Z, B, y) {
              for (var b = this, R = i.browser.now(), j = function() {
                var fe = i.browser.now() - R;
                return !b._forceFullPlacement && fe > 2;
              }; this._currentPlacementIndex >= 0; ) {
                var G = B[Z[this._currentPlacementIndex]], ie = this.placement.collisionIndex.transform.zoom;
                if (G.type === "symbol" && (!G.minzoom || G.minzoom <= ie) && (!G.maxzoom || G.maxzoom > ie)) {
                  if (this._inProgressLayer || (this._inProgressLayer = new Ln(G)), this._inProgressLayer.continuePlacement(y[G.source], this.placement, this._showCollisionBoxes, G, j)) return;
                  delete this._inProgressLayer;
                }
                this._currentPlacementIndex--;
              }
              this._done = !0;
            }, pn.prototype.commit = function(Z) {
              return this.placement.commit(Z), this.placement;
            };
            var dn = 512 / i.EXTENT / 2, Dn = function(Z, B, y) {
              this.tileID = Z, this.indexedSymbolInstances = {}, this.bucketInstanceId = y;
              for (var b = 0; b < B.length; b++) {
                var R = B.get(b), j = R.key;
                this.indexedSymbolInstances[j] || (this.indexedSymbolInstances[j] = []), this.indexedSymbolInstances[j].push({ crossTileID: R.crossTileID, coord: this.getScaledCoordinates(R, Z) });
              }
            };
            Dn.prototype.getScaledCoordinates = function(Z, B) {
              var y = B.canonical.z - this.tileID.canonical.z, b = dn / Math.pow(2, y);
              return { x: Math.floor((B.canonical.x * i.EXTENT + Z.anchorX) * b), y: Math.floor((B.canonical.y * i.EXTENT + Z.anchorY) * b) };
            }, Dn.prototype.findMatches = function(Z, B, y) {
              for (var b = this.tileID.canonical.z < B.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - B.canonical.z), R = 0; R < Z.length; R++) {
                var j = Z.get(R);
                if (!j.crossTileID) {
                  var G = this.indexedSymbolInstances[j.key];
                  if (G) for (var ie = this.getScaledCoordinates(j, B), fe = 0, xe = G; fe < xe.length; fe += 1) {
                    var Te = xe[fe];
                    if (Math.abs(Te.coord.x - ie.x) <= b && Math.abs(Te.coord.y - ie.y) <= b && !y[Te.crossTileID]) {
                      y[Te.crossTileID] = !0, j.crossTileID = Te.crossTileID;
                      break;
                    }
                  }
                }
              }
            };
            var nr = function() {
              this.maxCrossTileID = 0;
            };
            nr.prototype.generate = function() {
              return ++this.maxCrossTileID;
            };
            var pr = function() {
              this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0;
            };
            pr.prototype.handleWrapJump = function(Z) {
              var B = Math.round((Z - this.lng) / 360);
              if (B !== 0) for (var y in this.indexes) {
                var b = this.indexes[y], R = {};
                for (var j in b) {
                  var G = b[j];
                  G.tileID = G.tileID.unwrapTo(G.tileID.wrap + B), R[G.tileID.key] = G;
                }
                this.indexes[y] = R;
              }
              this.lng = Z;
            }, pr.prototype.addBucket = function(Z, B, y) {
              if (this.indexes[Z.overscaledZ] && this.indexes[Z.overscaledZ][Z.key]) {
                if (this.indexes[Z.overscaledZ][Z.key].bucketInstanceId === B.bucketInstanceId) return !1;
                this.removeBucketCrossTileIDs(Z.overscaledZ, this.indexes[Z.overscaledZ][Z.key]);
              }
              for (var b = 0; b < B.symbolInstances.length; b++) B.symbolInstances.get(b).crossTileID = 0;
              this.usedCrossTileIDs[Z.overscaledZ] || (this.usedCrossTileIDs[Z.overscaledZ] = {});
              var R = this.usedCrossTileIDs[Z.overscaledZ];
              for (var j in this.indexes) {
                var G = this.indexes[j];
                if (Number(j) > Z.overscaledZ) for (var ie in G) {
                  var fe = G[ie];
                  fe.tileID.isChildOf(Z) && fe.findMatches(B.symbolInstances, Z, R);
                }
                else {
                  var xe = G[Z.scaledTo(Number(j)).key];
                  xe && xe.findMatches(B.symbolInstances, Z, R);
                }
              }
              for (var Te = 0; Te < B.symbolInstances.length; Te++) {
                var ze = B.symbolInstances.get(Te);
                ze.crossTileID || (ze.crossTileID = y.generate(), R[ze.crossTileID] = !0);
              }
              return this.indexes[Z.overscaledZ] === void 0 && (this.indexes[Z.overscaledZ] = {}), this.indexes[Z.overscaledZ][Z.key] = new Dn(Z, B.symbolInstances, B.bucketInstanceId), !0;
            }, pr.prototype.removeBucketCrossTileIDs = function(Z, B) {
              for (var y in B.indexedSymbolInstances) for (var b = 0, R = B.indexedSymbolInstances[y]; b < R.length; b += 1) {
                var j = R[b];
                delete this.usedCrossTileIDs[Z][j.crossTileID];
              }
            }, pr.prototype.removeStaleBuckets = function(Z) {
              var B = !1;
              for (var y in this.indexes) {
                var b = this.indexes[y];
                for (var R in b) Z[b[R].bucketInstanceId] || (this.removeBucketCrossTileIDs(y, b[R]), delete b[R], B = !0);
              }
              return B;
            };
            var ir = function() {
              this.layerIndexes = {}, this.crossTileIDs = new nr(), this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {};
            };
            ir.prototype.addLayer = function(Z, B, y) {
              var b = this.layerIndexes[Z.id];
              b === void 0 && (b = this.layerIndexes[Z.id] = new pr());
              var R = !1, j = {};
              b.handleWrapJump(y);
              for (var G = 0, ie = B; G < ie.length; G += 1) {
                var fe = ie[G], xe = fe.getBucket(Z);
                xe && Z.id === xe.layerIds[0] && (xe.bucketInstanceId || (xe.bucketInstanceId = ++this.maxBucketInstanceId), b.addBucket(fe.tileID, xe, this.crossTileIDs) && (R = !0), j[xe.bucketInstanceId] = !0);
              }
              return b.removeStaleBuckets(j) && (R = !0), R;
            }, ir.prototype.pruneUnusedLayers = function(Z) {
              var B = {};
              for (var y in Z.forEach(function(b) {
                B[b] = !0;
              }), this.layerIndexes) B[y] || delete this.layerIndexes[y];
            };
            var gr = function(Z, B) {
              return i.emitValidationErrors(Z, B && B.filter(function(y) {
                return y.identifier !== "source.canvas";
              }));
            }, Pr = i.pick(qt, ["addLayer", "removeLayer", "setPaintProperty", "setLayoutProperty", "setFilter", "addSource", "removeSource", "setLayerZoomRange", "setLight", "setTransition", "setGeoJSONSourceData"]), Cr = i.pick(qt, ["setCenter", "setZoom", "setBearing", "setPitch"]), Er = function() {
              var Z = {}, B = i.styleSpec.$version;
              for (var y in i.styleSpec.$root) {
                var b = i.styleSpec.$root[y];
                if (b.required) {
                  var R;
                  (R = y === "version" ? B : b.type === "array" ? [] : {}) != null && (Z[y] = R);
                }
              }
              return Z;
            }(), Sr = function(Z) {
              function B(y, b) {
                var R = this;
                b === void 0 && (b = {}), Z.call(this), this.map = y, this.dispatcher = new U(Bt(), this), this.imageManager = new S(), this.imageManager.setEventedParent(this), this.glyphManager = new I(y._requestManager, b.localIdeographFontFamily), this.lineAtlas = new F(256, 512), this.crossTileSymbolIndex = new ir(), this._layers = {}, this._serializedLayers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new i.ZoomHistory(), this._loaded = !1, this._availableImages = [], this._resetUpdates(), this.dispatcher.broadcast("setReferrer", i.getReferrer());
                var j = this;
                this._rtlTextPluginCallback = B.registerForPluginStateChange(function(G) {
                  var ie = { pluginStatus: G.pluginStatus, pluginURL: G.pluginURL };
                  j.dispatcher.broadcast("syncRTLPluginState", ie, function(fe, xe) {
                    if (i.triggerPluginCompletionEvent(fe), xe && xe.every(function(ze) {
                      return ze;
                    })) for (var Te in j.sourceCaches) j.sourceCaches[Te].reload();
                  });
                }), this.on("data", function(G) {
                  if (G.dataType === "source" && G.sourceDataType === "metadata") {
                    var ie = R.sourceCaches[G.sourceId];
                    if (ie) {
                      var fe = ie.getSource();
                      if (fe && fe.vectorLayerIds) for (var xe in R._layers) {
                        var Te = R._layers[xe];
                        Te.source === fe.id && R._validateLayer(Te);
                      }
                    }
                  }
                });
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.loadURL = function(y, b) {
                var R = this;
                b === void 0 && (b = {}), this.fire(new i.Event("dataloading", { dataType: "style" }));
                var j = typeof b.validate == "boolean" ? b.validate : !i.isMapboxURL(y);
                y = this.map._requestManager.normalizeStyleURL(y, b.accessToken);
                var G = this.map._requestManager.transformRequest(y, i.ResourceType.Style);
                this._request = i.getJSON(G, function(ie, fe) {
                  R._request = null, ie ? R.fire(new i.ErrorEvent(ie)) : fe && R._load(fe, j);
                });
              }, B.prototype.loadJSON = function(y, b) {
                var R = this;
                b === void 0 && (b = {}), this.fire(new i.Event("dataloading", { dataType: "style" })), this._request = i.browser.frame(function() {
                  R._request = null, R._load(y, b.validate !== !1);
                });
              }, B.prototype.loadEmpty = function() {
                this.fire(new i.Event("dataloading", { dataType: "style" })), this._load(Er, !1);
              }, B.prototype._load = function(y, b) {
                if (!b || !gr(this, i.validateStyle(y))) {
                  for (var R in this._loaded = !0, this.stylesheet = y, y.sources) this.addSource(R, y.sources[R], { validate: !1 });
                  y.sprite ? this._loadSprite(y.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(y.glyphs);
                  var j = Jt(this.stylesheet.layers);
                  this._order = j.map(function(xe) {
                    return xe.id;
                  }), this._layers = {}, this._serializedLayers = {};
                  for (var G = 0, ie = j; G < ie.length; G += 1) {
                    var fe = ie[G];
                    (fe = i.createStyleLayer(fe)).setEventedParent(this, { layer: { id: fe.id } }), this._layers[fe.id] = fe, this._serializedLayers[fe.id] = fe.serialize();
                  }
                  this.dispatcher.broadcast("setLayers", this._serializeLayers(this._order)), this.light = new z(this.stylesheet.light), this.fire(new i.Event("data", { dataType: "style" })), this.fire(new i.Event("style.load"));
                }
              }, B.prototype._loadSprite = function(y) {
                var b = this;
                this._spriteRequest = function(R, j, G) {
                  var ie, fe, xe, Te = i.browser.devicePixelRatio > 1 ? "@2x" : "", ze = i.getJSON(j.transformRequest(j.normalizeSpriteURL(R, Te, ".json"), i.ResourceType.SpriteJSON), function(gt, wt) {
                    ze = null, xe || (xe = gt, ie = wt, ut());
                  }), Ve = i.getImage(j.transformRequest(j.normalizeSpriteURL(R, Te, ".png"), i.ResourceType.SpriteImage), function(gt, wt) {
                    Ve = null, xe || (xe = gt, fe = wt, ut());
                  });
                  function ut() {
                    if (xe) G(xe);
                    else if (ie && fe) {
                      var gt = i.browser.getImageData(fe), wt = {};
                      for (var Et in ie) {
                        var zt = ie[Et], It = zt.width, jt = zt.height, Lt = zt.x, Zt = zt.y, Qt = zt.sdf, Xt = zt.pixelRatio, yn = zt.stretchX, Sn = zt.stretchY, Un = zt.content, Vn = new i.RGBAImage({ width: It, height: jt });
                        i.RGBAImage.copy(gt, Vn, { x: Lt, y: Zt }, { x: 0, y: 0 }, { width: It, height: jt }), wt[Et] = { data: Vn, pixelRatio: Xt, sdf: Qt, stretchX: yn, stretchY: Sn, content: Un };
                      }
                      G(null, wt);
                    }
                  }
                  return { cancel: function() {
                    ze && (ze.cancel(), ze = null), Ve && (Ve.cancel(), Ve = null);
                  } };
                }(y, this.map._requestManager, function(R, j) {
                  if (b._spriteRequest = null, R) b.fire(new i.ErrorEvent(R));
                  else if (j) for (var G in j) b.imageManager.addImage(G, j[G]);
                  b.imageManager.setLoaded(!0), b._availableImages = b.imageManager.listImages(), b.dispatcher.broadcast("setImages", b._availableImages), b.fire(new i.Event("data", { dataType: "style" }));
                });
              }, B.prototype._validateLayer = function(y) {
                var b = this.sourceCaches[y.source];
                if (b) {
                  var R = y.sourceLayer;
                  if (R) {
                    var j = b.getSource();
                    (j.type === "geojson" || j.vectorLayerIds && j.vectorLayerIds.indexOf(R) === -1) && this.fire(new i.ErrorEvent(new Error('Source layer "' + R + '" does not exist on source "' + j.id + '" as specified by style layer "' + y.id + '"')));
                  }
                }
              }, B.prototype.loaded = function() {
                if (!this._loaded || Object.keys(this._updatedSources).length) return !1;
                for (var y in this.sourceCaches) if (!this.sourceCaches[y].loaded()) return !1;
                return !!this.imageManager.isLoaded();
              }, B.prototype._serializeLayers = function(y) {
                for (var b = [], R = 0, j = y; R < j.length; R += 1) {
                  var G = j[R], ie = this._layers[G];
                  ie.type !== "custom" && b.push(ie.serialize());
                }
                return b;
              }, B.prototype.hasTransitions = function() {
                if (this.light && this.light.hasTransition()) return !0;
                for (var y in this.sourceCaches) if (this.sourceCaches[y].hasTransition()) return !0;
                for (var b in this._layers) if (this._layers[b].hasTransition()) return !0;
                return !1;
              }, B.prototype._checkLoaded = function() {
                if (!this._loaded) throw new Error("Style is not done loading");
              }, B.prototype.update = function(y) {
                if (this._loaded) {
                  var b = this._changed;
                  if (this._changed) {
                    var R = Object.keys(this._updatedLayers), j = Object.keys(this._removedLayers);
                    for (var G in (R.length || j.length) && this._updateWorkerLayers(R, j), this._updatedSources) {
                      var ie = this._updatedSources[G];
                      ie === "reload" ? this._reloadSource(G) : ie === "clear" && this._clearSource(G);
                    }
                    for (var fe in this._updateTilesForChangedImages(), this._updatedPaintProps) this._layers[fe].updateTransitions(y);
                    this.light.updateTransitions(y), this._resetUpdates();
                  }
                  var xe = {};
                  for (var Te in this.sourceCaches) {
                    var ze = this.sourceCaches[Te];
                    xe[Te] = ze.used, ze.used = !1;
                  }
                  for (var Ve = 0, ut = this._order; Ve < ut.length; Ve += 1) {
                    var gt = ut[Ve], wt = this._layers[gt];
                    wt.recalculate(y, this._availableImages), !wt.isHidden(y.zoom) && wt.source && (this.sourceCaches[wt.source].used = !0);
                  }
                  for (var Et in xe) {
                    var zt = this.sourceCaches[Et];
                    xe[Et] !== zt.used && zt.fire(new i.Event("data", { sourceDataType: "visibility", dataType: "source", sourceId: Et }));
                  }
                  this.light.recalculate(y), this.z = y.zoom, b && this.fire(new i.Event("data", { dataType: "style" }));
                }
              }, B.prototype._updateTilesForChangedImages = function() {
                var y = Object.keys(this._changedImages);
                if (y.length) {
                  for (var b in this.sourceCaches) this.sourceCaches[b].reloadTilesForDependencies(["icons", "patterns"], y);
                  this._changedImages = {};
                }
              }, B.prototype._updateWorkerLayers = function(y, b) {
                this.dispatcher.broadcast("updateLayers", { layers: this._serializeLayers(y), removedIds: b });
              }, B.prototype._resetUpdates = function() {
                this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {};
              }, B.prototype.setState = function(y) {
                var b = this;
                if (this._checkLoaded(), gr(this, i.validateStyle(y))) return !1;
                (y = i.clone$1(y)).layers = Jt(y.layers);
                var R = Cn(this.serialize(), y).filter(function(G) {
                  return !(G.command in Cr);
                });
                if (R.length === 0) return !1;
                var j = R.filter(function(G) {
                  return !(G.command in Pr);
                });
                if (j.length > 0) throw new Error("Unimplemented: " + j.map(function(G) {
                  return G.command;
                }).join(", ") + ".");
                return R.forEach(function(G) {
                  G.command !== "setTransition" && b[G.command].apply(b, G.args);
                }), this.stylesheet = y, !0;
              }, B.prototype.addImage = function(y, b) {
                if (this.getImage(y)) return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));
                this.imageManager.addImage(y, b), this._afterImageUpdated(y);
              }, B.prototype.updateImage = function(y, b) {
                this.imageManager.updateImage(y, b);
              }, B.prototype.getImage = function(y) {
                return this.imageManager.getImage(y);
              }, B.prototype.removeImage = function(y) {
                if (!this.getImage(y)) return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));
                this.imageManager.removeImage(y), this._afterImageUpdated(y);
              }, B.prototype._afterImageUpdated = function(y) {
                this._availableImages = this.imageManager.listImages(), this._changedImages[y] = !0, this._changed = !0, this.dispatcher.broadcast("setImages", this._availableImages), this.fire(new i.Event("data", { dataType: "style" }));
              }, B.prototype.listImages = function() {
                return this._checkLoaded(), this.imageManager.listImages();
              }, B.prototype.addSource = function(y, b, R) {
                var j = this;
                if (R === void 0 && (R = {}), this._checkLoaded(), this.sourceCaches[y] !== void 0) throw new Error("There is already a source with this ID");
                if (!b.type) throw new Error("The type property must be defined, but only the following properties were given: " + Object.keys(b).join(", ") + ".");
                if (!(["vector", "raster", "geojson", "video", "image"].indexOf(b.type) >= 0 && this._validate(i.validateStyle.source, "sources." + y, b, null, R))) {
                  this.map && this.map._collectResourceTiming && (b.collectResourceTiming = !0);
                  var G = this.sourceCaches[y] = new Mt(y, b, this.dispatcher);
                  G.style = this, G.setEventedParent(this, function() {
                    return { isSourceLoaded: j.loaded(), source: G.serialize(), sourceId: y };
                  }), G.onAdd(this.map), this._changed = !0;
                }
              }, B.prototype.removeSource = function(y) {
                if (this._checkLoaded(), this.sourceCaches[y] === void 0) throw new Error("There is no source with this ID");
                for (var b in this._layers) if (this._layers[b].source === y) return this.fire(new i.ErrorEvent(new Error('Source "' + y + '" cannot be removed while layer "' + b + '" is using it.')));
                var R = this.sourceCaches[y];
                delete this.sourceCaches[y], delete this._updatedSources[y], R.fire(new i.Event("data", { sourceDataType: "metadata", dataType: "source", sourceId: y })), R.setEventedParent(null), R.clearTiles(), R.onRemove && R.onRemove(this.map), this._changed = !0;
              }, B.prototype.setGeoJSONSourceData = function(y, b) {
                this._checkLoaded(), this.sourceCaches[y].getSource().setData(b), this._changed = !0;
              }, B.prototype.getSource = function(y) {
                return this.sourceCaches[y] && this.sourceCaches[y].getSource();
              }, B.prototype.addLayer = function(y, b, R) {
                R === void 0 && (R = {}), this._checkLoaded();
                var j = y.id;
                if (this.getLayer(j)) this.fire(new i.ErrorEvent(new Error('Layer with id "' + j + '" already exists on this map')));
                else {
                  var G;
                  if (y.type === "custom") {
                    if (gr(this, i.validateCustomStyleLayer(y))) return;
                    G = i.createStyleLayer(y);
                  } else {
                    if (typeof y.source == "object" && (this.addSource(j, y.source), y = i.clone$1(y), y = i.extend(y, { source: j })), this._validate(i.validateStyle.layer, "layers." + j, y, { arrayIndex: -1 }, R)) return;
                    G = i.createStyleLayer(y), this._validateLayer(G), G.setEventedParent(this, { layer: { id: j } }), this._serializedLayers[G.id] = G.serialize();
                  }
                  var ie = b ? this._order.indexOf(b) : this._order.length;
                  if (b && ie === -1) this.fire(new i.ErrorEvent(new Error('Layer with id "' + b + '" does not exist on this map.')));
                  else {
                    if (this._order.splice(ie, 0, j), this._layerOrderChanged = !0, this._layers[j] = G, this._removedLayers[j] && G.source && G.type !== "custom") {
                      var fe = this._removedLayers[j];
                      delete this._removedLayers[j], fe.type !== G.type ? this._updatedSources[G.source] = "clear" : (this._updatedSources[G.source] = "reload", this.sourceCaches[G.source].pause());
                    }
                    this._updateLayer(G), G.onAdd && G.onAdd(this.map);
                  }
                }
              }, B.prototype.moveLayer = function(y, b) {
                if (this._checkLoaded(), this._changed = !0, this._layers[y]) {
                  if (y !== b) {
                    var R = this._order.indexOf(y);
                    this._order.splice(R, 1);
                    var j = b ? this._order.indexOf(b) : this._order.length;
                    b && j === -1 ? this.fire(new i.ErrorEvent(new Error('Layer with id "' + b + '" does not exist on this map.'))) : (this._order.splice(j, 0, y), this._layerOrderChanged = !0);
                  }
                } else this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot be moved.")));
              }, B.prototype.removeLayer = function(y) {
                this._checkLoaded();
                var b = this._layers[y];
                if (b) {
                  b.setEventedParent(null);
                  var R = this._order.indexOf(y);
                  this._order.splice(R, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[y] = b, delete this._layers[y], delete this._serializedLayers[y], delete this._updatedLayers[y], delete this._updatedPaintProps[y], b.onRemove && b.onRemove(this.map);
                } else this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot be removed.")));
              }, B.prototype.getLayer = function(y) {
                return this._layers[y];
              }, B.prototype.hasLayer = function(y) {
                return y in this._layers;
              }, B.prototype.setLayerZoomRange = function(y, b, R) {
                this._checkLoaded();
                var j = this.getLayer(y);
                j ? j.minzoom === b && j.maxzoom === R || (b != null && (j.minzoom = b), R != null && (j.maxzoom = R), this._updateLayer(j)) : this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot have zoom extent.")));
              }, B.prototype.setFilter = function(y, b, R) {
                R === void 0 && (R = {}), this._checkLoaded();
                var j = this.getLayer(y);
                if (j) {
                  if (!i.deepEqual(j.filter, b)) return b == null ? (j.filter = void 0, void this._updateLayer(j)) : void (this._validate(i.validateStyle.filter, "layers." + j.id + ".filter", b, null, R) || (j.filter = i.clone$1(b), this._updateLayer(j)));
                } else this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot be filtered.")));
              }, B.prototype.getFilter = function(y) {
                return i.clone$1(this.getLayer(y).filter);
              }, B.prototype.setLayoutProperty = function(y, b, R, j) {
                j === void 0 && (j = {}), this._checkLoaded();
                var G = this.getLayer(y);
                G ? i.deepEqual(G.getLayoutProperty(b), R) || (G.setLayoutProperty(b, R, j), this._updateLayer(G)) : this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot be styled.")));
              }, B.prototype.getLayoutProperty = function(y, b) {
                var R = this.getLayer(y);
                if (R) return R.getLayoutProperty(b);
                this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style.")));
              }, B.prototype.setPaintProperty = function(y, b, R, j) {
                j === void 0 && (j = {}), this._checkLoaded();
                var G = this.getLayer(y);
                G ? i.deepEqual(G.getPaintProperty(b), R) || (G.setPaintProperty(b, R, j) && this._updateLayer(G), this._changed = !0, this._updatedPaintProps[y] = !0) : this.fire(new i.ErrorEvent(new Error("The layer '" + y + "' does not exist in the map's style and cannot be styled.")));
              }, B.prototype.getPaintProperty = function(y, b) {
                return this.getLayer(y).getPaintProperty(b);
              }, B.prototype.setFeatureState = function(y, b) {
                this._checkLoaded();
                var R = y.source, j = y.sourceLayer, G = this.sourceCaches[R];
                if (G !== void 0) {
                  var ie = G.getSource().type;
                  ie === "geojson" && j ? this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : ie !== "vector" || j ? (y.id === void 0 && this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))), G.setFeatureState(j, y.id, b)) : this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
                } else this.fire(new i.ErrorEvent(new Error("The source '" + R + "' does not exist in the map's style.")));
              }, B.prototype.removeFeatureState = function(y, b) {
                this._checkLoaded();
                var R = y.source, j = this.sourceCaches[R];
                if (j !== void 0) {
                  var G = j.getSource().type, ie = G === "vector" ? y.sourceLayer : void 0;
                  G !== "vector" || ie ? b && typeof y.id != "string" && typeof y.id != "number" ? this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property."))) : j.removeFeatureState(ie, y.id, b) : this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
                } else this.fire(new i.ErrorEvent(new Error("The source '" + R + "' does not exist in the map's style.")));
              }, B.prototype.getFeatureState = function(y) {
                this._checkLoaded();
                var b = y.source, R = y.sourceLayer, j = this.sourceCaches[b];
                if (j !== void 0) {
                  if (j.getSource().type !== "vector" || R) return y.id === void 0 && this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))), j.getFeatureState(R, y.id);
                  this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));
                } else this.fire(new i.ErrorEvent(new Error("The source '" + b + "' does not exist in the map's style.")));
              }, B.prototype.getTransition = function() {
                return i.extend({ duration: 300, delay: 0 }, this.stylesheet && this.stylesheet.transition);
              }, B.prototype.serialize = function() {
                return i.filterObject({ version: this.stylesheet.version, name: this.stylesheet.name, metadata: this.stylesheet.metadata, light: this.stylesheet.light, center: this.stylesheet.center, zoom: this.stylesheet.zoom, bearing: this.stylesheet.bearing, pitch: this.stylesheet.pitch, sprite: this.stylesheet.sprite, glyphs: this.stylesheet.glyphs, transition: this.stylesheet.transition, sources: i.mapObject(this.sourceCaches, function(y) {
                  return y.serialize();
                }), layers: this._serializeLayers(this._order) }, function(y) {
                  return y !== void 0;
                });
              }, B.prototype._updateLayer = function(y) {
                this._updatedLayers[y.id] = !0, y.source && !this._updatedSources[y.source] && this.sourceCaches[y.source].getSource().type !== "raster" && (this._updatedSources[y.source] = "reload", this.sourceCaches[y.source].pause()), this._changed = !0;
              }, B.prototype._flattenAndSortRenderedFeatures = function(y) {
                for (var b = this, R = function(Un) {
                  return b._layers[Un].type === "fill-extrusion";
                }, j = {}, G = [], ie = this._order.length - 1; ie >= 0; ie--) {
                  var fe = this._order[ie];
                  if (R(fe)) {
                    j[fe] = ie;
                    for (var xe = 0, Te = y; xe < Te.length; xe += 1) {
                      var ze = Te[xe][fe];
                      if (ze) for (var Ve = 0, ut = ze; Ve < ut.length; Ve += 1) {
                        var gt = ut[Ve];
                        G.push(gt);
                      }
                    }
                  }
                }
                G.sort(function(Un, Vn) {
                  return Vn.intersectionZ - Un.intersectionZ;
                });
                for (var wt = [], Et = this._order.length - 1; Et >= 0; Et--) {
                  var zt = this._order[Et];
                  if (R(zt)) for (var It = G.length - 1; It >= 0; It--) {
                    var jt = G[It].feature;
                    if (j[jt.layer.id] < Et) break;
                    wt.push(jt), G.pop();
                  }
                  else for (var Lt = 0, Zt = y; Lt < Zt.length; Lt += 1) {
                    var Qt = Zt[Lt][zt];
                    if (Qt) for (var Xt = 0, yn = Qt; Xt < yn.length; Xt += 1) {
                      var Sn = yn[Xt];
                      wt.push(Sn.feature);
                    }
                  }
                }
                return wt;
              }, B.prototype.queryRenderedFeatures = function(y, b, R) {
                b && b.filter && this._validate(i.validateStyle.filter, "queryRenderedFeatures.filter", b.filter, null, b);
                var j = {};
                if (b && b.layers) {
                  if (!Array.isArray(b.layers)) return this.fire(new i.ErrorEvent(new Error("parameters.layers must be an Array."))), [];
                  for (var G = 0, ie = b.layers; G < ie.length; G += 1) {
                    var fe = ie[G], xe = this._layers[fe];
                    if (!xe) return this.fire(new i.ErrorEvent(new Error("The layer '" + fe + "' does not exist in the map's style and cannot be queried for features."))), [];
                    j[xe.source] = !0;
                  }
                }
                var Te = [];
                for (var ze in b.availableImages = this._availableImages, this.sourceCaches) b.layers && !j[ze] || Te.push(he(this.sourceCaches[ze], this._layers, this._serializedLayers, y, b, R));
                return this.placement && Te.push(function(Ve, ut, gt, wt, Et, zt, It) {
                  for (var jt = {}, Lt = zt.queryRenderedSymbols(wt), Zt = [], Qt = 0, Xt = Object.keys(Lt).map(Number); Qt < Xt.length; Qt += 1) {
                    var yn = Xt[Qt];
                    Zt.push(It[yn]);
                  }
                  Zt.sort(de);
                  for (var Sn = function() {
                    var kr = Vn[Un], or = kr.featureIndex.lookupSymbolFeatures(Lt[kr.bucketInstanceId], ut, kr.bucketIndex, kr.sourceLayerIndex, Et.filter, Et.layers, Et.availableImages, Ve);
                    for (var Mr in or) {
                      var fr = jt[Mr] = jt[Mr] || [], Or = or[Mr];
                      Or.sort(function(Rr, ei) {
                        var pi = kr.featureSortOrder;
                        if (pi) {
                          var qi = pi.indexOf(Rr.featureIndex);
                          return pi.indexOf(ei.featureIndex) - qi;
                        }
                        return ei.featureIndex - Rr.featureIndex;
                      });
                      for (var br = 0, Nr = Or; br < Nr.length; br += 1) {
                        var ii = Nr[br];
                        fr.push(ii);
                      }
                    }
                  }, Un = 0, Vn = Zt; Un < Vn.length; Un += 1) Sn();
                  var Yn = function(kr) {
                    jt[kr].forEach(function(or) {
                      var Mr = or.feature, fr = Ve[kr], Or = gt[fr.source].getFeatureState(Mr.layer["source-layer"], Mr.id);
                      Mr.source = Mr.layer.source, Mr.layer["source-layer"] && (Mr.sourceLayer = Mr.layer["source-layer"]), Mr.state = Or;
                    });
                  };
                  for (var er in jt) Yn(er);
                  return jt;
                }(this._layers, this._serializedLayers, this.sourceCaches, y, b, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(Te);
              }, B.prototype.querySourceFeatures = function(y, b) {
                b && b.filter && this._validate(i.validateStyle.filter, "querySourceFeatures.filter", b.filter, null, b);
                var R = this.sourceCaches[y];
                return R ? function(j, G) {
                  for (var ie = j.getRenderableIds().map(function(ut) {
                    return j.getTileByID(ut);
                  }), fe = [], xe = {}, Te = 0; Te < ie.length; Te++) {
                    var ze = ie[Te], Ve = ze.tileID.canonical.key;
                    xe[Ve] || (xe[Ve] = !0, ze.querySourceFeatures(fe, G));
                  }
                  return fe;
                }(R, b) : [];
              }, B.prototype.addSourceType = function(y, b, R) {
                return B.getSourceType(y) ? R(new Error('A source type called "' + y + '" already exists.')) : (B.setSourceType(y, b), b.workerSourceURL ? void this.dispatcher.broadcast("loadWorkerSource", { name: y, url: b.workerSourceURL }, R) : R(null, null));
              }, B.prototype.getLight = function() {
                return this.light.getLight();
              }, B.prototype.setLight = function(y, b) {
                b === void 0 && (b = {}), this._checkLoaded();
                var R = this.light.getLight(), j = !1;
                for (var G in y) if (!i.deepEqual(y[G], R[G])) {
                  j = !0;
                  break;
                }
                if (j) {
                  var ie = { now: i.browser.now(), transition: i.extend({ duration: 300, delay: 0 }, this.stylesheet.transition) };
                  this.light.setLight(y, b), this.light.updateTransitions(ie);
                }
              }, B.prototype._validate = function(y, b, R, j, G) {
                return G === void 0 && (G = {}), (!G || G.validate !== !1) && gr(this, y.call(i.validateStyle, i.extend({ key: b, style: this.serialize(), value: R, styleSpec: i.styleSpec }, j)));
              }, B.prototype._remove = function() {
                for (var y in this._request && (this._request.cancel(), this._request = null), this._spriteRequest && (this._spriteRequest.cancel(), this._spriteRequest = null), i.evented.off("pluginStateChange", this._rtlTextPluginCallback), this._layers) this._layers[y].setEventedParent(null);
                for (var b in this.sourceCaches) this.sourceCaches[b].clearTiles(), this.sourceCaches[b].setEventedParent(null);
                this.imageManager.setEventedParent(null), this.setEventedParent(null), this.dispatcher.remove();
              }, B.prototype._clearSource = function(y) {
                this.sourceCaches[y].clearTiles();
              }, B.prototype._reloadSource = function(y) {
                this.sourceCaches[y].resume(), this.sourceCaches[y].reload();
              }, B.prototype._updateSources = function(y) {
                for (var b in this.sourceCaches) this.sourceCaches[b].update(y);
              }, B.prototype._generateCollisionBoxes = function() {
                for (var y in this.sourceCaches) this._reloadSource(y);
              }, B.prototype._updatePlacement = function(y, b, R, j, G) {
                G === void 0 && (G = !1);
                for (var ie = !1, fe = !1, xe = {}, Te = 0, ze = this._order; Te < ze.length; Te += 1) {
                  var Ve = ze[Te], ut = this._layers[Ve];
                  if (ut.type === "symbol") {
                    if (!xe[ut.source]) {
                      var gt = this.sourceCaches[ut.source];
                      xe[ut.source] = gt.getRenderableIds(!0).map(function(Lt) {
                        return gt.getTileByID(Lt);
                      }).sort(function(Lt, Zt) {
                        return Zt.tileID.overscaledZ - Lt.tileID.overscaledZ || (Lt.tileID.isLessThan(Zt.tileID) ? -1 : 1);
                      });
                    }
                    var wt = this.crossTileSymbolIndex.addLayer(ut, xe[ut.source], y.center.lng);
                    ie = ie || wt;
                  }
                }
                if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((G = G || this._layerOrderChanged || R === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(i.browser.now(), y.zoom)) && (this.pauseablePlacement = new pn(y, this._order, G, b, R, j, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, xe), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(i.browser.now()), fe = !0), ie && this.pauseablePlacement.placement.setStale()), fe || ie) for (var Et = 0, zt = this._order; Et < zt.length; Et += 1) {
                  var It = zt[Et], jt = this._layers[It];
                  jt.type === "symbol" && this.placement.updateLayerOpacities(jt, xe[jt.source]);
                }
                return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(i.browser.now());
              }, B.prototype._releaseSymbolFadeTiles = function() {
                for (var y in this.sourceCaches) this.sourceCaches[y].releaseSymbolFadeTiles();
              }, B.prototype.getImages = function(y, b, R) {
                this.imageManager.getImages(b.icons, R), this._updateTilesForChangedImages();
                var j = this.sourceCaches[b.source];
                j && j.setDependencies(b.tileID.key, b.type, b.icons);
              }, B.prototype.getGlyphs = function(y, b, R) {
                this.glyphManager.getGlyphs(b.stacks, R);
              }, B.prototype.getResource = function(y, b, R) {
                return i.makeRequest(b, R);
              }, B;
            }(i.Evented);
            Sr.getSourceType = function(Z) {
              return ue[Z];
            }, Sr.setSourceType = function(Z, B) {
              ue[Z] = B;
            }, Sr.registerForPluginStateChange = i.registerForPluginStateChange;
            var Dr = i.createLayout([{ name: "a_pos", type: "Int16", components: 2 }]), Qn = ja(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`, `#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 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
);}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;}`), ri = ja(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), Zr = ja(`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;uniform 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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);}"), Br = ja(`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);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=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);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,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,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;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`), Yr = ja("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);}"), yi = ja(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 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,0,1);gl_Position=u_matrix*pos;}`), si = ja(`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`, "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;}"), Pa = ja("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_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"), Ni = ja("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);}"), To = ja("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,0,1);}"), Ba = ja(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`), eo = ja(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), Ds = ja(`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;}`), ji = ja(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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);}`), Ao = ja(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);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+=ambientlight;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;}`), dl = ja(`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;base=max(0.0,base);height=max(0.0,height);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
? a_pos
: 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;}`), So = ja(`#ifdef GL_ES
precision highp float;
#endif
uniform 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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;}"), Pu = ja(`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;
#define PI 3.141592653589793
void 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;float 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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;}"), go = ja(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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;float 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;v_width2=vec2(outset,inset);}`), Vi = ja(`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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
attribute 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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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;float 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;v_width2=vec2(outset,inset);}`), Ml = ja(`uniform 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;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float 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;float 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;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), pl = ja(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float 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;float 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;v_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);}`), Zl = ja(`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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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;}"), vs = ja(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;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;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);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;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`), Xl = ja(`#define SDF_PX 8.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float 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 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;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 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;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`), xs = ja(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `const float PI=3.141592653589793;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;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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;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;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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=u_matrix*vec4(a_pos+vec2(1,0),0,1);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=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,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);}`);
            function ja(Z, B) {
              var y = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, b = B.match(/attribute ([\w]+) ([\w]+)/g), R = Z.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), j = B.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), G = j ? j.concat(R) : R, ie = {};
              return { fragmentSource: Z = Z.replace(y, function(fe, xe, Te, ze, Ve) {
                return ie[Ve] = !0, xe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Ve + `
varying ` + Te + " " + ze + " " + Ve + `;
#else
uniform ` + Te + " " + ze + " u_" + Ve + `;
#endif
` : `
#ifdef HAS_UNIFORM_u_` + Ve + `
    ` + Te + " " + ze + " " + Ve + " = u_" + Ve + `;
#endif
`;
              }), vertexSource: B = B.replace(y, function(fe, xe, Te, ze, Ve) {
                var ut = ze === "float" ? "vec2" : "vec4", gt = Ve.match(/color/) ? "color" : ut;
                return ie[Ve] ? xe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Ve + `
uniform lowp float u_` + Ve + `_t;
attribute ` + Te + " " + ut + " a_" + Ve + `;
varying ` + Te + " " + ze + " " + Ve + `;
#else
uniform ` + Te + " " + ze + " u_" + Ve + `;
#endif
` : gt === "vec4" ? `
#ifndef HAS_UNIFORM_u_` + Ve + `
    ` + Ve + " = a_" + Ve + `;
#else
    ` + Te + " " + ze + " " + Ve + " = u_" + Ve + `;
#endif
` : `
#ifndef HAS_UNIFORM_u_` + Ve + `
    ` + Ve + " = unpack_mix_" + gt + "(a_" + Ve + ", u_" + Ve + `_t);
#else
    ` + Te + " " + ze + " " + Ve + " = u_" + Ve + `;
#endif
` : xe === "define" ? `
#ifndef HAS_UNIFORM_u_` + Ve + `
uniform lowp float u_` + Ve + `_t;
attribute ` + Te + " " + ut + " a_" + Ve + `;
#else
uniform ` + Te + " " + ze + " u_" + Ve + `;
#endif
` : gt === "vec4" ? `
#ifndef HAS_UNIFORM_u_` + Ve + `
    ` + Te + " " + ze + " " + Ve + " = a_" + Ve + `;
#else
    ` + Te + " " + ze + " " + Ve + " = u_" + Ve + `;
#endif
` : `
#ifndef HAS_UNIFORM_u_` + Ve + `
    ` + Te + " " + ze + " " + Ve + " = unpack_mix_" + gt + "(a_" + Ve + ", u_" + Ve + `_t);
#else
    ` + Te + " " + ze + " " + Ve + " = u_" + Ve + `;
#endif
`;
              }), staticAttributes: b, staticUniforms: G };
            }
            var Mo = Object.freeze({ __proto__: null, prelude: Qn, background: ri, backgroundPattern: Zr, circle: Br, clippingMask: Yr, heatmap: yi, heatmapTexture: si, collisionBox: Pa, collisionCircle: Ni, debug: To, fill: Ba, fillOutline: eo, fillOutlinePattern: Ds, fillPattern: ji, fillExtrusion: Ao, fillExtrusionPattern: dl, hillshadePrepare: So, hillshade: Pu, line: go, lineGradient: Vi, linePattern: Ml, lineSDF: pl, raster: Zl, symbolIcon: vs, symbolSDF: Xl, symbolTextAndIcon: xs }), Kl = function() {
              this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null;
            };
            function Xs(Z) {
              for (var B = [], y = 0; y < Z.length; y++) if (Z[y] !== null) {
                var b = Z[y].split(" ");
                B.push(b.pop());
              }
              return B;
            }
            Kl.prototype.bind = function(Z, B, y, b, R, j, G, ie) {
              this.context = Z;
              for (var fe = this.boundPaintVertexBuffers.length !== b.length, xe = 0; !fe && xe < b.length; xe++) this.boundPaintVertexBuffers[xe] !== b[xe] && (fe = !0);
              var Te = !this.vao || this.boundProgram !== B || this.boundLayoutVertexBuffer !== y || fe || this.boundIndexBuffer !== R || this.boundVertexOffset !== j || this.boundDynamicVertexBuffer !== G || this.boundDynamicVertexBuffer2 !== ie;
              !Z.extVertexArrayObject || Te ? this.freshBind(B, y, b, R, j, G, ie) : (Z.bindVertexArrayOES.set(this.vao), G && G.bind(), R && R.dynamicDraw && R.bind(), ie && ie.bind());
            }, Kl.prototype.freshBind = function(Z, B, y, b, R, j, G) {
              var ie, fe = Z.numAttributes, xe = this.context, Te = xe.gl;
              if (xe.extVertexArrayObject) this.vao && this.destroy(), this.vao = xe.extVertexArrayObject.createVertexArrayOES(), xe.bindVertexArrayOES.set(this.vao), ie = 0, this.boundProgram = Z, this.boundLayoutVertexBuffer = B, this.boundPaintVertexBuffers = y, this.boundIndexBuffer = b, this.boundVertexOffset = R, this.boundDynamicVertexBuffer = j, this.boundDynamicVertexBuffer2 = G;
              else {
                ie = xe.currentNumAttributes || 0;
                for (var ze = fe; ze < ie; ze++) Te.disableVertexAttribArray(ze);
              }
              B.enableAttributes(Te, Z);
              for (var Ve = 0, ut = y; Ve < ut.length; Ve += 1) ut[Ve].enableAttributes(Te, Z);
              j && j.enableAttributes(Te, Z), G && G.enableAttributes(Te, Z), B.bind(), B.setVertexAttribPointers(Te, Z, R);
              for (var gt = 0, wt = y; gt < wt.length; gt += 1) {
                var Et = wt[gt];
                Et.bind(), Et.setVertexAttribPointers(Te, Z, R);
              }
              j && (j.bind(), j.setVertexAttribPointers(Te, Z, R)), b && b.bind(), G && (G.bind(), G.setVertexAttribPointers(Te, Z, R)), xe.currentNumAttributes = fe;
            }, Kl.prototype.destroy = function() {
              this.vao && (this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao), this.vao = null);
            };
            var El = function(Z, B, y, b, R, j) {
              var G = Z.gl;
              this.program = G.createProgram();
              for (var ie = Xs(y.staticAttributes), fe = b ? b.getBinderAttributes() : [], xe = ie.concat(fe), Te = y.staticUniforms ? Xs(y.staticUniforms) : [], ze = b ? b.getBinderUniforms() : [], Ve = [], ut = 0, gt = Te.concat(ze); ut < gt.length; ut += 1) {
                var wt = gt[ut];
                Ve.indexOf(wt) < 0 && Ve.push(wt);
              }
              var Et = b ? b.defines() : [];
              j && Et.push("#define OVERDRAW_INSPECTOR;");
              var zt = Et.concat(Qn.fragmentSource, y.fragmentSource).join(`
`), It = Et.concat(Qn.vertexSource, y.vertexSource).join(`
`), jt = G.createShader(G.FRAGMENT_SHADER);
              if (G.isContextLost()) this.failedToCreate = !0;
              else {
                G.shaderSource(jt, zt), G.compileShader(jt), G.attachShader(this.program, jt);
                var Lt = G.createShader(G.VERTEX_SHADER);
                if (G.isContextLost()) this.failedToCreate = !0;
                else {
                  G.shaderSource(Lt, It), G.compileShader(Lt), G.attachShader(this.program, Lt), this.attributes = {};
                  var Zt = {};
                  this.numAttributes = xe.length;
                  for (var Qt = 0; Qt < this.numAttributes; Qt++) xe[Qt] && (G.bindAttribLocation(this.program, Qt, xe[Qt]), this.attributes[xe[Qt]] = Qt);
                  G.linkProgram(this.program), G.deleteShader(Lt), G.deleteShader(jt);
                  for (var Xt = 0; Xt < Ve.length; Xt++) {
                    var yn = Ve[Xt];
                    if (yn && !Zt[yn]) {
                      var Sn = G.getUniformLocation(this.program, yn);
                      Sn && (Zt[yn] = Sn);
                    }
                  }
                  this.fixedUniforms = R(Z, Zt), this.binderUniforms = b ? b.getUniforms(Z, Zt) : [];
                }
              }
            };
            function Jl(Z, B, y) {
              var b = 1 / yr(y, 1, B.transform.tileZoom), R = Math.pow(2, y.tileID.overscaledZ), j = y.tileSize * Math.pow(2, B.transform.tileZoom) / R, G = j * (y.tileID.canonical.x + y.tileID.wrap * R), ie = j * y.tileID.canonical.y;
              return { u_image: 0, u_texsize: y.imageAtlasTexture.size, u_scale: [b, Z.fromScale, Z.toScale], u_fade: Z.t, u_pixel_coord_upper: [G >> 16, ie >> 16], u_pixel_coord_lower: [65535 & G, 65535 & ie] };
            }
            El.prototype.draw = function(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt) {
              var Et, zt = Z.gl;
              if (!this.failedToCreate) {
                for (var It in Z.program.set(this.program), Z.setDepthMode(y), Z.setStencilMode(b), Z.setColorMode(R), Z.setCullFace(j), this.fixedUniforms) this.fixedUniforms[It].set(G[It]);
                ut && ut.setUniforms(Z, this.binderUniforms, ze, { zoom: Ve });
                for (var jt = (Et = {}, Et[zt.LINES] = 2, Et[zt.TRIANGLES] = 3, Et[zt.LINE_STRIP] = 1, Et)[B], Lt = 0, Zt = Te.get(); Lt < Zt.length; Lt += 1) {
                  var Qt = Zt[Lt], Xt = Qt.vaos || (Qt.vaos = {});
                  (Xt[ie] || (Xt[ie] = new Kl())).bind(Z, this, fe, ut ? ut.getPaintVertexBuffers() : [], xe, Qt.vertexOffset, gt, wt), zt.drawElements(B, Qt.primitiveLength * jt, zt.UNSIGNED_SHORT, Qt.primitiveOffset * jt * 2);
                }
              }
            };
            var ml = function(Z, B, y, b) {
              var R = B.style.light, j = R.properties.get("position"), G = [j.x, j.y, j.z], ie = i.create$1();
              R.properties.get("anchor") === "viewport" && i.fromRotation(ie, -B.transform.angle), i.transformMat3(G, G, ie);
              var fe = R.properties.get("color");
              return { u_matrix: Z, u_lightpos: G, u_lightintensity: R.properties.get("intensity"), u_lightcolor: [fe.r, fe.g, fe.b], u_vertical_gradient: +y, u_opacity: b };
            }, mu = function(Z, B, y, b, R, j, G) {
              return i.extend(ml(Z, B, y, b), Jl(j, B, G), { u_height_factor: -Math.pow(2, R.overscaledZ) / G.tileSize / 8 });
            }, gu = function(Z) {
              return { u_matrix: Z };
            }, Ql = function(Z, B, y, b) {
              return i.extend(gu(Z), Jl(y, B, b));
            }, Wo = function(Z, B) {
              return { u_matrix: Z, u_world: B };
            }, Mc = function(Z, B, y, b, R) {
              return i.extend(Ql(Z, B, y, b), { u_world: R });
            }, Xu = function(Z, B, y, b) {
              var R, j, G = Z.transform;
              if (b.paint.get("circle-pitch-alignment") === "map") {
                var ie = yr(y, 1, G.zoom);
                R = !0, j = [ie, ie];
              } else R = !1, j = G.pixelsToGLUnits;
              return { u_camera_to_center_distance: G.cameraToCenterDistance, u_scale_with_map: +(b.paint.get("circle-pitch-scale") === "map"), u_matrix: Z.translatePosMatrix(B.posMatrix, y, b.paint.get("circle-translate"), b.paint.get("circle-translate-anchor")), u_pitch_with_map: +R, u_device_pixel_ratio: i.browser.devicePixelRatio, u_extrude_scale: j };
            }, yu = function(Z, B, y) {
              var b = yr(y, 1, B.zoom), R = Math.pow(2, B.zoom - y.tileID.overscaledZ), j = y.tileID.overscaleFactor();
              return { u_matrix: Z, u_camera_to_center_distance: B.cameraToCenterDistance, u_pixels_to_tile_units: b, u_extrude_scale: [B.pixelsToGLUnits[0] / (b * R), B.pixelsToGLUnits[1] / (b * R)], u_overscale_factor: j };
            }, ef = function(Z, B, y) {
              return { u_matrix: Z, u_inv_matrix: B, u_camera_to_center_distance: y.cameraToCenterDistance, u_viewport_size: [y.width, y.height] };
            }, tf = function(Z, B, y) {
              return y === void 0 && (y = 1), { u_matrix: Z, u_color: B, u_overlay: 0, u_overlay_scale: y };
            }, bs = function(Z) {
              return { u_matrix: Z };
            }, Ec = function(Z, B, y, b) {
              return { u_matrix: Z, u_extrude_scale: yr(B, 1, y), u_intensity: b };
            }, mh = function(Z, B, y, b) {
              var R = i.create();
              i.ortho(R, 0, Z.width, Z.height, 0, 0, 1);
              var j = Z.context.gl;
              return { u_matrix: R, u_world: [j.drawingBufferWidth, j.drawingBufferHeight], u_image: y, u_color_ramp: b, u_opacity: B.paint.get("heatmap-opacity") };
            }, Eo = function(Z, B, y) {
              var b = y.paint.get("hillshade-shadow-color"), R = y.paint.get("hillshade-highlight-color"), j = y.paint.get("hillshade-accent-color"), G = y.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
              y.paint.get("hillshade-illumination-anchor") === "viewport" && (G -= Z.transform.angle);
              var ie, fe, xe, Te = !Z.options.moving;
              return { u_matrix: Z.transform.calculatePosMatrix(B.tileID.toUnwrapped(), Te), u_image: 0, u_latrange: (ie = B.tileID, fe = Math.pow(2, ie.canonical.z), xe = ie.canonical.y, [new i.MercatorCoordinate(0, xe / fe).toLngLat().lat, new i.MercatorCoordinate(0, (xe + 1) / fe).toLngLat().lat]), u_light: [y.paint.get("hillshade-exaggeration"), G], u_shadow: b, u_highlight: R, u_accent: j };
            }, ac = function(Z, B) {
              var y = B.stride, b = i.create();
              return i.ortho(b, 0, i.EXTENT, -i.EXTENT, 0, 0, 1), i.translate(b, b, [0, -i.EXTENT, 0]), { u_matrix: b, u_image: 1, u_dimension: [y, y], u_zoom: Z.overscaledZ, u_unpack: B.getUnpackVector() };
            }, Xi = function(Z, B, y) {
              var b = Z.transform;
              return { u_matrix: Bs(Z, B, y), u_ratio: 1 / yr(B, 1, b.zoom), u_device_pixel_ratio: i.browser.devicePixelRatio, u_units_to_pixels: [1 / b.pixelsToGLUnits[0], 1 / b.pixelsToGLUnits[1]] };
            }, eu = function(Z, B, y, b) {
              return i.extend(Xi(Z, B, y), { u_image: 0, u_image_height: b });
            }, Ma = function(Z, B, y, b) {
              var R = Z.transform, j = Ls(B, R);
              return { u_matrix: Bs(Z, B, y), u_texsize: B.imageAtlasTexture.size, u_ratio: 1 / yr(B, 1, R.zoom), u_device_pixel_ratio: i.browser.devicePixelRatio, u_image: 0, u_scale: [j, b.fromScale, b.toScale], u_fade: b.t, u_units_to_pixels: [1 / R.pixelsToGLUnits[0], 1 / R.pixelsToGLUnits[1]] };
            }, Ea = function(Z, B, y, b, R) {
              var j = Z.transform, G = Z.lineAtlas, ie = Ls(B, j), fe = y.layout.get("line-cap") === "round", xe = G.getDash(b.from, fe), Te = G.getDash(b.to, fe), ze = xe.width * R.fromScale, Ve = Te.width * R.toScale;
              return i.extend(Xi(Z, B, y), { u_patternscale_a: [ie / ze, -xe.height / 2], u_patternscale_b: [ie / Ve, -Te.height / 2], u_sdfgamma: G.width / (256 * Math.min(ze, Ve) * i.browser.devicePixelRatio) / 2, u_image: 0, u_tex_y_a: xe.y, u_tex_y_b: Te.y, u_mix: R.t });
            };
            function Ls(Z, B) {
              return 1 / yr(Z, 1, B.tileZoom);
            }
            function Bs(Z, B, y) {
              return Z.translatePosMatrix(B.tileID.posMatrix, B, y.paint.get("line-translate"), y.paint.get("line-translate-anchor"));
            }
            var oc = function(Z, B, y, b, R) {
              return { u_matrix: Z, u_tl_parent: B, u_scale_parent: y, u_buffer_scale: 1, u_fade_t: b.mix, u_opacity: b.opacity * R.paint.get("raster-opacity"), u_image0: 0, u_image1: 1, u_brightness_low: R.paint.get("raster-brightness-min"), u_brightness_high: R.paint.get("raster-brightness-max"), u_saturation_factor: (G = R.paint.get("raster-saturation"), G > 0 ? 1 - 1 / (1.001 - G) : -G), u_contrast_factor: (j = R.paint.get("raster-contrast"), j > 0 ? 1 / (1 - j) : 1 + j), u_spin_weights: tu(R.paint.get("raster-hue-rotate")) };
              var j, G;
            };
            function tu(Z) {
              Z *= Math.PI / 180;
              var B = Math.sin(Z), y = Math.cos(Z);
              return [(2 * y + 1) / 3, (-Math.sqrt(3) * B - y + 1) / 3, (Math.sqrt(3) * B - y + 1) / 3];
            }
            var _s, Ps = function(Z, B, y, b, R, j, G, ie, fe, xe) {
              var Te = R.transform;
              return { u_is_size_zoom_constant: +(Z === "constant" || Z === "source"), u_is_size_feature_constant: +(Z === "constant" || Z === "camera"), u_size_t: B ? B.uSizeT : 0, u_size: B ? B.uSize : 0, u_camera_to_center_distance: Te.cameraToCenterDistance, u_pitch: Te.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +y, u_aspect_ratio: Te.width / Te.height, u_fade_change: R.options.fadeDuration ? R.symbolFadeChange : 1, u_matrix: j, u_label_plane_matrix: G, u_coord_matrix: ie, u_is_text: +fe, u_pitch_with_map: +b, u_texsize: xe, u_texture: 0 };
            }, Co = function(Z, B, y, b, R, j, G, ie, fe, xe, Te) {
              var ze = R.transform;
              return i.extend(Ps(Z, B, y, b, R, j, G, ie, fe, xe), { u_gamma_scale: b ? Math.cos(ze._pitch) * ze.cameraToCenterDistance : 1, u_device_pixel_ratio: i.browser.devicePixelRatio, u_is_halo: +Te });
            }, da = function(Z, B, y, b, R, j, G, ie, fe, xe) {
              return i.extend(Co(Z, B, y, b, R, j, G, ie, !0, fe, !0), { u_texsize_icon: xe, u_texture_icon: 1 });
            }, Ou = function(Z, B, y) {
              return { u_matrix: Z, u_opacity: B, u_color: y };
            }, pf = function(Z, B, y, b, R, j) {
              return i.extend(function(G, ie, fe, xe) {
                var Te = fe.imageManager.getPattern(G.from.toString()), ze = fe.imageManager.getPattern(G.to.toString()), Ve = fe.imageManager.getPixelSize(), ut = Ve.width, gt = Ve.height, wt = Math.pow(2, xe.tileID.overscaledZ), Et = xe.tileSize * Math.pow(2, fe.transform.tileZoom) / wt, zt = Et * (xe.tileID.canonical.x + xe.tileID.wrap * wt), It = Et * xe.tileID.canonical.y;
                return { u_image: 0, u_pattern_tl_a: Te.tl, u_pattern_br_a: Te.br, u_pattern_tl_b: ze.tl, u_pattern_br_b: ze.br, u_texsize: [ut, gt], u_mix: ie.t, u_pattern_size_a: Te.displaySize, u_pattern_size_b: ze.displaySize, u_scale_a: ie.fromScale, u_scale_b: ie.toScale, u_tile_units_to_pixels: 1 / yr(xe, 1, fe.transform.tileZoom), u_pixel_coord_upper: [zt >> 16, It >> 16], u_pixel_coord_lower: [65535 & zt, 65535 & It] };
              }(b, j, y, R), { u_matrix: Z, u_opacity: B });
            }, nu = { fillExtrusion: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_lightpos: new i.Uniform3f(Z, B.u_lightpos), u_lightintensity: new i.Uniform1f(Z, B.u_lightintensity), u_lightcolor: new i.Uniform3f(Z, B.u_lightcolor), u_vertical_gradient: new i.Uniform1f(Z, B.u_vertical_gradient), u_opacity: new i.Uniform1f(Z, B.u_opacity) };
            }, fillExtrusionPattern: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_lightpos: new i.Uniform3f(Z, B.u_lightpos), u_lightintensity: new i.Uniform1f(Z, B.u_lightintensity), u_lightcolor: new i.Uniform3f(Z, B.u_lightcolor), u_vertical_gradient: new i.Uniform1f(Z, B.u_vertical_gradient), u_height_factor: new i.Uniform1f(Z, B.u_height_factor), u_image: new i.Uniform1i(Z, B.u_image), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_pixel_coord_upper: new i.Uniform2f(Z, B.u_pixel_coord_upper), u_pixel_coord_lower: new i.Uniform2f(Z, B.u_pixel_coord_lower), u_scale: new i.Uniform3f(Z, B.u_scale), u_fade: new i.Uniform1f(Z, B.u_fade), u_opacity: new i.Uniform1f(Z, B.u_opacity) };
            }, fill: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix) };
            }, fillPattern: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_image: new i.Uniform1i(Z, B.u_image), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_pixel_coord_upper: new i.Uniform2f(Z, B.u_pixel_coord_upper), u_pixel_coord_lower: new i.Uniform2f(Z, B.u_pixel_coord_lower), u_scale: new i.Uniform3f(Z, B.u_scale), u_fade: new i.Uniform1f(Z, B.u_fade) };
            }, fillOutline: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_world: new i.Uniform2f(Z, B.u_world) };
            }, fillOutlinePattern: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_world: new i.Uniform2f(Z, B.u_world), u_image: new i.Uniform1i(Z, B.u_image), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_pixel_coord_upper: new i.Uniform2f(Z, B.u_pixel_coord_upper), u_pixel_coord_lower: new i.Uniform2f(Z, B.u_pixel_coord_lower), u_scale: new i.Uniform3f(Z, B.u_scale), u_fade: new i.Uniform1f(Z, B.u_fade) };
            }, circle: function(Z, B) {
              return { u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_scale_with_map: new i.Uniform1i(Z, B.u_scale_with_map), u_pitch_with_map: new i.Uniform1i(Z, B.u_pitch_with_map), u_extrude_scale: new i.Uniform2f(Z, B.u_extrude_scale), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix) };
            }, collisionBox: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_pixels_to_tile_units: new i.Uniform1f(Z, B.u_pixels_to_tile_units), u_extrude_scale: new i.Uniform2f(Z, B.u_extrude_scale), u_overscale_factor: new i.Uniform1f(Z, B.u_overscale_factor) };
            }, collisionCircle: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_inv_matrix: new i.UniformMatrix4f(Z, B.u_inv_matrix), u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_viewport_size: new i.Uniform2f(Z, B.u_viewport_size) };
            }, debug: function(Z, B) {
              return { u_color: new i.UniformColor(Z, B.u_color), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_overlay: new i.Uniform1i(Z, B.u_overlay), u_overlay_scale: new i.Uniform1f(Z, B.u_overlay_scale) };
            }, clippingMask: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix) };
            }, heatmap: function(Z, B) {
              return { u_extrude_scale: new i.Uniform1f(Z, B.u_extrude_scale), u_intensity: new i.Uniform1f(Z, B.u_intensity), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix) };
            }, heatmapTexture: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_world: new i.Uniform2f(Z, B.u_world), u_image: new i.Uniform1i(Z, B.u_image), u_color_ramp: new i.Uniform1i(Z, B.u_color_ramp), u_opacity: new i.Uniform1f(Z, B.u_opacity) };
            }, hillshade: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_image: new i.Uniform1i(Z, B.u_image), u_latrange: new i.Uniform2f(Z, B.u_latrange), u_light: new i.Uniform2f(Z, B.u_light), u_shadow: new i.UniformColor(Z, B.u_shadow), u_highlight: new i.UniformColor(Z, B.u_highlight), u_accent: new i.UniformColor(Z, B.u_accent) };
            }, hillshadePrepare: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_image: new i.Uniform1i(Z, B.u_image), u_dimension: new i.Uniform2f(Z, B.u_dimension), u_zoom: new i.Uniform1f(Z, B.u_zoom), u_unpack: new i.Uniform4f(Z, B.u_unpack) };
            }, line: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_ratio: new i.Uniform1f(Z, B.u_ratio), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_units_to_pixels: new i.Uniform2f(Z, B.u_units_to_pixels) };
            }, lineGradient: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_ratio: new i.Uniform1f(Z, B.u_ratio), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_units_to_pixels: new i.Uniform2f(Z, B.u_units_to_pixels), u_image: new i.Uniform1i(Z, B.u_image), u_image_height: new i.Uniform1f(Z, B.u_image_height) };
            }, linePattern: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_ratio: new i.Uniform1f(Z, B.u_ratio), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_image: new i.Uniform1i(Z, B.u_image), u_units_to_pixels: new i.Uniform2f(Z, B.u_units_to_pixels), u_scale: new i.Uniform3f(Z, B.u_scale), u_fade: new i.Uniform1f(Z, B.u_fade) };
            }, lineSDF: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_ratio: new i.Uniform1f(Z, B.u_ratio), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_units_to_pixels: new i.Uniform2f(Z, B.u_units_to_pixels), u_patternscale_a: new i.Uniform2f(Z, B.u_patternscale_a), u_patternscale_b: new i.Uniform2f(Z, B.u_patternscale_b), u_sdfgamma: new i.Uniform1f(Z, B.u_sdfgamma), u_image: new i.Uniform1i(Z, B.u_image), u_tex_y_a: new i.Uniform1f(Z, B.u_tex_y_a), u_tex_y_b: new i.Uniform1f(Z, B.u_tex_y_b), u_mix: new i.Uniform1f(Z, B.u_mix) };
            }, raster: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_tl_parent: new i.Uniform2f(Z, B.u_tl_parent), u_scale_parent: new i.Uniform1f(Z, B.u_scale_parent), u_buffer_scale: new i.Uniform1f(Z, B.u_buffer_scale), u_fade_t: new i.Uniform1f(Z, B.u_fade_t), u_opacity: new i.Uniform1f(Z, B.u_opacity), u_image0: new i.Uniform1i(Z, B.u_image0), u_image1: new i.Uniform1i(Z, B.u_image1), u_brightness_low: new i.Uniform1f(Z, B.u_brightness_low), u_brightness_high: new i.Uniform1f(Z, B.u_brightness_high), u_saturation_factor: new i.Uniform1f(Z, B.u_saturation_factor), u_contrast_factor: new i.Uniform1f(Z, B.u_contrast_factor), u_spin_weights: new i.Uniform3f(Z, B.u_spin_weights) };
            }, symbolIcon: function(Z, B) {
              return { u_is_size_zoom_constant: new i.Uniform1i(Z, B.u_is_size_zoom_constant), u_is_size_feature_constant: new i.Uniform1i(Z, B.u_is_size_feature_constant), u_size_t: new i.Uniform1f(Z, B.u_size_t), u_size: new i.Uniform1f(Z, B.u_size), u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_pitch: new i.Uniform1f(Z, B.u_pitch), u_rotate_symbol: new i.Uniform1i(Z, B.u_rotate_symbol), u_aspect_ratio: new i.Uniform1f(Z, B.u_aspect_ratio), u_fade_change: new i.Uniform1f(Z, B.u_fade_change), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_label_plane_matrix: new i.UniformMatrix4f(Z, B.u_label_plane_matrix), u_coord_matrix: new i.UniformMatrix4f(Z, B.u_coord_matrix), u_is_text: new i.Uniform1i(Z, B.u_is_text), u_pitch_with_map: new i.Uniform1i(Z, B.u_pitch_with_map), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_texture: new i.Uniform1i(Z, B.u_texture) };
            }, symbolSDF: function(Z, B) {
              return { u_is_size_zoom_constant: new i.Uniform1i(Z, B.u_is_size_zoom_constant), u_is_size_feature_constant: new i.Uniform1i(Z, B.u_is_size_feature_constant), u_size_t: new i.Uniform1f(Z, B.u_size_t), u_size: new i.Uniform1f(Z, B.u_size), u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_pitch: new i.Uniform1f(Z, B.u_pitch), u_rotate_symbol: new i.Uniform1i(Z, B.u_rotate_symbol), u_aspect_ratio: new i.Uniform1f(Z, B.u_aspect_ratio), u_fade_change: new i.Uniform1f(Z, B.u_fade_change), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_label_plane_matrix: new i.UniformMatrix4f(Z, B.u_label_plane_matrix), u_coord_matrix: new i.UniformMatrix4f(Z, B.u_coord_matrix), u_is_text: new i.Uniform1i(Z, B.u_is_text), u_pitch_with_map: new i.Uniform1i(Z, B.u_pitch_with_map), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_texture: new i.Uniform1i(Z, B.u_texture), u_gamma_scale: new i.Uniform1f(Z, B.u_gamma_scale), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_is_halo: new i.Uniform1i(Z, B.u_is_halo) };
            }, symbolTextAndIcon: function(Z, B) {
              return { u_is_size_zoom_constant: new i.Uniform1i(Z, B.u_is_size_zoom_constant), u_is_size_feature_constant: new i.Uniform1i(Z, B.u_is_size_feature_constant), u_size_t: new i.Uniform1f(Z, B.u_size_t), u_size: new i.Uniform1f(Z, B.u_size), u_camera_to_center_distance: new i.Uniform1f(Z, B.u_camera_to_center_distance), u_pitch: new i.Uniform1f(Z, B.u_pitch), u_rotate_symbol: new i.Uniform1i(Z, B.u_rotate_symbol), u_aspect_ratio: new i.Uniform1f(Z, B.u_aspect_ratio), u_fade_change: new i.Uniform1f(Z, B.u_fade_change), u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_label_plane_matrix: new i.UniformMatrix4f(Z, B.u_label_plane_matrix), u_coord_matrix: new i.UniformMatrix4f(Z, B.u_coord_matrix), u_is_text: new i.Uniform1i(Z, B.u_is_text), u_pitch_with_map: new i.Uniform1i(Z, B.u_pitch_with_map), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_texsize_icon: new i.Uniform2f(Z, B.u_texsize_icon), u_texture: new i.Uniform1i(Z, B.u_texture), u_texture_icon: new i.Uniform1i(Z, B.u_texture_icon), u_gamma_scale: new i.Uniform1f(Z, B.u_gamma_scale), u_device_pixel_ratio: new i.Uniform1f(Z, B.u_device_pixel_ratio), u_is_halo: new i.Uniform1i(Z, B.u_is_halo) };
            }, background: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_opacity: new i.Uniform1f(Z, B.u_opacity), u_color: new i.UniformColor(Z, B.u_color) };
            }, backgroundPattern: function(Z, B) {
              return { u_matrix: new i.UniformMatrix4f(Z, B.u_matrix), u_opacity: new i.Uniform1f(Z, B.u_opacity), u_image: new i.Uniform1i(Z, B.u_image), u_pattern_tl_a: new i.Uniform2f(Z, B.u_pattern_tl_a), u_pattern_br_a: new i.Uniform2f(Z, B.u_pattern_br_a), u_pattern_tl_b: new i.Uniform2f(Z, B.u_pattern_tl_b), u_pattern_br_b: new i.Uniform2f(Z, B.u_pattern_br_b), u_texsize: new i.Uniform2f(Z, B.u_texsize), u_mix: new i.Uniform1f(Z, B.u_mix), u_pattern_size_a: new i.Uniform2f(Z, B.u_pattern_size_a), u_pattern_size_b: new i.Uniform2f(Z, B.u_pattern_size_b), u_scale_a: new i.Uniform1f(Z, B.u_scale_a), u_scale_b: new i.Uniform1f(Z, B.u_scale_b), u_pixel_coord_upper: new i.Uniform2f(Z, B.u_pixel_coord_upper), u_pixel_coord_lower: new i.Uniform2f(Z, B.u_pixel_coord_lower), u_tile_units_to_pixels: new i.Uniform1f(Z, B.u_tile_units_to_pixels) };
            } };
            function Ks(Z, B, y, b, R, j, G) {
              for (var ie = Z.context, fe = ie.gl, xe = Z.useProgram("collisionBox"), Te = [], ze = 0, Ve = 0, ut = 0; ut < b.length; ut++) {
                var gt = b[ut], wt = B.getTile(gt), Et = wt.getBucket(y);
                if (Et) {
                  var zt = gt.posMatrix;
                  R[0] === 0 && R[1] === 0 || (zt = Z.translatePosMatrix(gt.posMatrix, wt, R, j));
                  var It = G ? Et.textCollisionBox : Et.iconCollisionBox, jt = Et.collisionCircleArray;
                  if (jt.length > 0) {
                    var Lt = i.create(), Zt = zt;
                    i.mul(Lt, Et.placementInvProjMatrix, Z.transform.glCoordMatrix), i.mul(Lt, Lt, Et.placementViewportMatrix), Te.push({ circleArray: jt, circleOffset: Ve, transform: Zt, invTransform: Lt }), Ve = ze += jt.length / 4;
                  }
                  It && xe.draw(ie, fe.LINES, Je.disabled, ot.disabled, Z.colorModeForRenderPass(), Fe.disabled, yu(zt, Z.transform, wt), y.id, It.layoutVertexBuffer, It.indexBuffer, It.segments, null, Z.transform.zoom, null, null, It.collisionVertexBuffer);
                }
              }
              if (G && Te.length) {
                var Qt = Z.useProgram("collisionCircle"), Xt = new i.StructArrayLayout2f1f2i16();
                Xt.resize(4 * ze), Xt._trim();
                for (var yn = 0, Sn = 0, Un = Te; Sn < Un.length; Sn += 1) for (var Vn = Un[Sn], Yn = 0; Yn < Vn.circleArray.length / 4; Yn++) {
                  var er = 4 * Yn, kr = Vn.circleArray[er + 0], or = Vn.circleArray[er + 1], Mr = Vn.circleArray[er + 2], fr = Vn.circleArray[er + 3];
                  Xt.emplace(yn++, kr, or, Mr, fr, 0), Xt.emplace(yn++, kr, or, Mr, fr, 1), Xt.emplace(yn++, kr, or, Mr, fr, 2), Xt.emplace(yn++, kr, or, Mr, fr, 3);
                }
                (!_s || _s.length < 2 * ze) && (_s = function(pi) {
                  var qi = 2 * pi, Li = new i.StructArrayLayout3ui6();
                  Li.resize(qi), Li._trim();
                  for (var Yi = 0; Yi < qi; Yi++) {
                    var Gi = 6 * Yi;
                    Li.uint16[Gi + 0] = 4 * Yi + 0, Li.uint16[Gi + 1] = 4 * Yi + 1, Li.uint16[Gi + 2] = 4 * Yi + 2, Li.uint16[Gi + 3] = 4 * Yi + 2, Li.uint16[Gi + 4] = 4 * Yi + 3, Li.uint16[Gi + 5] = 4 * Yi + 0;
                  }
                  return Li;
                }(ze));
                for (var Or = ie.createIndexBuffer(_s, !0), br = ie.createVertexBuffer(Xt, i.collisionCircleLayout.members, !0), Nr = 0, ii = Te; Nr < ii.length; Nr += 1) {
                  var Rr = ii[Nr], ei = ef(Rr.transform, Rr.invTransform, Z.transform);
                  Qt.draw(ie, fe.TRIANGLES, Je.disabled, ot.disabled, Z.colorModeForRenderPass(), Fe.disabled, ei, y.id, br, Or, i.SegmentVector.simpleSegment(0, 2 * Rr.circleOffset, Rr.circleArray.length, Rr.circleArray.length / 2), null, Z.transform.zoom, null, null, null);
                }
                br.destroy(), Or.destroy();
              }
            }
            var Cc = i.identity(new Float32Array(16));
            function sc(Z, B, y, b, R, j) {
              var G = i.getAnchorAlignment(Z), ie = -(G.horizontalAlign - 0.5) * B, fe = -(G.verticalAlign - 0.5) * y, xe = i.evaluateVariableOffset(Z, b);
              return new i.Point((ie / R + xe[0]) * j, (fe / R + xe[1]) * j);
            }
            function lc(Z, B, y, b, R, j, G, ie, fe, xe, Te) {
              var ze = Z.text.placedSymbolArray, Ve = Z.text.dynamicLayoutVertexArray, ut = Z.icon.dynamicLayoutVertexArray, gt = {};
              Ve.clear();
              for (var wt = 0; wt < ze.length; wt++) {
                var Et = ze.get(wt), zt = Z.allowVerticalPlacement && !Et.placedOrientation, It = Et.hidden || !Et.crossTileID || zt ? null : b[Et.crossTileID];
                if (It) {
                  var jt = new i.Point(Et.anchorX, Et.anchorY), Lt = wn(jt, y ? ie : G), Zt = Rn(j.cameraToCenterDistance, Lt.signedDistanceFromCamera), Qt = R.evaluateSizeForFeature(Z.textSizeData, xe, Et) * Zt / i.ONE_EM;
                  y && (Qt *= Z.tilePixelRatio / fe);
                  for (var Xt = It.width, yn = It.height, Sn = sc(It.anchor, Xt, yn, It.textOffset, It.textBoxScale, Qt), Un = y ? wn(jt.add(Sn), G).point : Lt.point.add(B ? Sn.rotate(-j.angle) : Sn), Vn = Z.allowVerticalPlacement && Et.placedOrientation === i.WritingMode.vertical ? Math.PI / 2 : 0, Yn = 0; Yn < Et.numGlyphs; Yn++) i.addDynamicAttributes(Ve, Un, Vn);
                  Te && Et.associatedIconIndex >= 0 && (gt[Et.associatedIconIndex] = { shiftedAnchor: Un, angle: Vn });
                } else zr(Et.numGlyphs, Ve);
              }
              if (Te) {
                ut.clear();
                for (var er = Z.icon.placedSymbolArray, kr = 0; kr < er.length; kr++) {
                  var or = er.get(kr);
                  if (or.hidden) zr(or.numGlyphs, ut);
                  else {
                    var Mr = gt[kr];
                    if (Mr) for (var fr = 0; fr < or.numGlyphs; fr++) i.addDynamicAttributes(ut, Mr.shiftedAnchor, Mr.angle);
                    else zr(or.numGlyphs, ut);
                  }
                }
                Z.icon.dynamicLayoutVertexBuffer.updateData(ut);
              }
              Z.text.dynamicLayoutVertexBuffer.updateData(Ve);
            }
            function mf(Z, B, y) {
              return y.iconsInText && B ? "symbolTextAndIcon" : Z ? "symbolSDF" : "symbolIcon";
            }
            function yl(Z, B, y, b, R, j, G, ie, fe, xe, Te, ze) {
              for (var Ve = Z.context, ut = Ve.gl, gt = Z.transform, wt = ie === "map", Et = fe === "map", zt = wt && y.layout.get("symbol-placement") !== "point", It = wt && !Et && !zt, jt = y.layout.get("symbol-sort-key").constantOr(1) !== void 0, Lt = !1, Zt = Z.depthModeForSublayer(0, Je.ReadOnly), Qt = y.layout.get("text-variable-anchor"), Xt = [], yn = 0, Sn = b; yn < Sn.length; yn += 1) {
                var Un = Sn[yn], Vn = B.getTile(Un), Yn = Vn.getBucket(y);
                if (Yn) {
                  var er = R ? Yn.text : Yn.icon;
                  if (er && er.segments.get().length) {
                    var kr = er.programConfigurations.get(y.id), or = R || Yn.sdfIcons, Mr = R ? Yn.textSizeData : Yn.iconSizeData, fr = Et || gt.pitch !== 0, Or = Z.useProgram(mf(or, R, Yn), kr), br = i.evaluateSizeForZoom(Mr, gt.zoom), Nr = void 0, ii = [0, 0], Rr = void 0, ei = void 0, pi = null, qi = void 0;
                    if (R) {
                      if (Rr = Vn.glyphAtlasTexture, ei = ut.LINEAR, Nr = Vn.glyphAtlasTexture.size, Yn.iconsInText) {
                        ii = Vn.imageAtlasTexture.size, pi = Vn.imageAtlasTexture;
                        var Li = Mr.kind === "composite" || Mr.kind === "camera";
                        qi = fr || Z.options.rotating || Z.options.zooming || Li ? ut.LINEAR : ut.NEAREST;
                      }
                    } else {
                      var Yi = y.layout.get("icon-size").constantOr(0) !== 1 || Yn.iconsNeedLinear;
                      Rr = Vn.imageAtlasTexture, ei = or || Z.options.rotating || Z.options.zooming || Yi || fr ? ut.LINEAR : ut.NEAREST, Nr = Vn.imageAtlasTexture.size;
                    }
                    var Gi = yr(Vn, 1, Z.transform.zoom), ra = Xn(Un.posMatrix, Et, wt, Z.transform, Gi), wa = Pn(Un.posMatrix, Et, wt, Z.transform, Gi), uo = Qt && Yn.hasTextData(), no = y.layout.get("icon-text-fit") !== "none" && uo && Yn.hasIconData();
                    zt && En(Yn, Un.posMatrix, Z, R, ra, wa, Et, xe);
                    var Ko = Z.translatePosMatrix(Un.posMatrix, Vn, j, G), Ia = zt || R && Qt || no ? Cc : ra, ca = Z.translatePosMatrix(wa, Vn, j, G, !0), Ga = or && y.paint.get(R ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0, Oa = { program: Or, buffers: er, uniformValues: or ? Yn.iconsInText ? da(Mr.kind, br, It, Et, Z, Ko, Ia, ca, Nr, ii) : Co(Mr.kind, br, It, Et, Z, Ko, Ia, ca, R, Nr, !0) : Ps(Mr.kind, br, It, Et, Z, Ko, Ia, ca, R, Nr), atlasTexture: Rr, atlasTextureIcon: pi, atlasInterpolation: ei, atlasInterpolationIcon: qi, isSDF: or, hasHalo: Ga };
                    if (jt && Yn.canOverlap) {
                      Lt = !0;
                      for (var ba = 0, Da = er.segments.get(); ba < Da.length; ba += 1) {
                        var Ua = Da[ba];
                        Xt.push({ segments: new i.SegmentVector([Ua]), sortKey: Ua.sortKey, state: Oa });
                      }
                    } else Xt.push({ segments: er.segments, sortKey: 0, state: Oa });
                  }
                }
              }
              Lt && Xt.sort(function($o, Nl) {
                return $o.sortKey - Nl.sortKey;
              });
              for (var pa = 0, lu = Xt; pa < lu.length; pa += 1) {
                var xo = lu[pa], Hi = xo.state;
                if (Ve.activeTexture.set(ut.TEXTURE0), Hi.atlasTexture.bind(Hi.atlasInterpolation, ut.CLAMP_TO_EDGE), Hi.atlasTextureIcon && (Ve.activeTexture.set(ut.TEXTURE1), Hi.atlasTextureIcon && Hi.atlasTextureIcon.bind(Hi.atlasInterpolationIcon, ut.CLAMP_TO_EDGE)), Hi.isSDF) {
                  var As = Hi.uniformValues;
                  Hi.hasHalo && (As.u_is_halo = 1, vl(Hi.buffers, xo.segments, y, Z, Hi.program, Zt, Te, ze, As)), As.u_is_halo = 0;
                }
                vl(Hi.buffers, xo.segments, y, Z, Hi.program, Zt, Te, ze, Hi.uniformValues);
              }
            }
            function vl(Z, B, y, b, R, j, G, ie, fe) {
              var xe = b.context, Te = xe.gl;
              R.draw(xe, Te.TRIANGLES, j, G, ie, Fe.disabled, fe, y.id, Z.layoutVertexBuffer, Z.indexBuffer, B, y.paint, b.transform.zoom, Z.programConfigurations.get(y.id), Z.dynamicLayoutVertexBuffer, Z.opacityVertexBuffer);
            }
            function ru(Z, B, y, b, R, j, G) {
              var ie, fe, xe, Te, ze, Ve = Z.context.gl, ut = y.paint.get("fill-pattern"), gt = ut && ut.constantOr(1), wt = y.getCrossfadeParameters();
              G ? (fe = gt && !y.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", ie = Ve.LINES) : (fe = gt ? "fillPattern" : "fill", ie = Ve.TRIANGLES);
              for (var Et = 0, zt = b; Et < zt.length; Et += 1) {
                var It = zt[Et], jt = B.getTile(It);
                if (!gt || jt.patternsLoaded()) {
                  var Lt = jt.getBucket(y);
                  if (Lt) {
                    var Zt = Lt.programConfigurations.get(y.id), Qt = Z.useProgram(fe, Zt);
                    gt && (Z.context.activeTexture.set(Ve.TEXTURE0), jt.imageAtlasTexture.bind(Ve.LINEAR, Ve.CLAMP_TO_EDGE), Zt.updatePaintBuffers(wt));
                    var Xt = ut.constantOr(null);
                    if (Xt && jt.imageAtlas) {
                      var yn = jt.imageAtlas, Sn = yn.patternPositions[Xt.to.toString()], Un = yn.patternPositions[Xt.from.toString()];
                      Sn && Un && Zt.setConstantPatternPositions(Sn, Un);
                    }
                    var Vn = Z.translatePosMatrix(It.posMatrix, jt, y.paint.get("fill-translate"), y.paint.get("fill-translate-anchor"));
                    if (G) {
                      Te = Lt.indexBuffer2, ze = Lt.segments2;
                      var Yn = [Ve.drawingBufferWidth, Ve.drawingBufferHeight];
                      xe = fe === "fillOutlinePattern" && gt ? Mc(Vn, Z, wt, jt, Yn) : Wo(Vn, Yn);
                    } else Te = Lt.indexBuffer, ze = Lt.segments, xe = gt ? Ql(Vn, Z, wt, jt) : gu(Vn);
                    Qt.draw(Z.context, ie, R, Z.stencilModeForClipping(It), j, Fe.disabled, xe, y.id, Lt.layoutVertexBuffer, Te, ze, y.paint, Z.transform.zoom, Zt);
                  }
                }
              }
            }
            function Cl(Z, B, y, b, R, j, G) {
              for (var ie = Z.context, fe = ie.gl, xe = y.paint.get("fill-extrusion-pattern"), Te = xe.constantOr(1), ze = y.getCrossfadeParameters(), Ve = y.paint.get("fill-extrusion-opacity"), ut = 0, gt = b; ut < gt.length; ut += 1) {
                var wt = gt[ut], Et = B.getTile(wt), zt = Et.getBucket(y);
                if (zt) {
                  var It = zt.programConfigurations.get(y.id), jt = Z.useProgram(Te ? "fillExtrusionPattern" : "fillExtrusion", It);
                  Te && (Z.context.activeTexture.set(fe.TEXTURE0), Et.imageAtlasTexture.bind(fe.LINEAR, fe.CLAMP_TO_EDGE), It.updatePaintBuffers(ze));
                  var Lt = xe.constantOr(null);
                  if (Lt && Et.imageAtlas) {
                    var Zt = Et.imageAtlas, Qt = Zt.patternPositions[Lt.to.toString()], Xt = Zt.patternPositions[Lt.from.toString()];
                    Qt && Xt && It.setConstantPatternPositions(Qt, Xt);
                  }
                  var yn = Z.translatePosMatrix(wt.posMatrix, Et, y.paint.get("fill-extrusion-translate"), y.paint.get("fill-extrusion-translate-anchor")), Sn = y.paint.get("fill-extrusion-vertical-gradient"), Un = Te ? mu(yn, Z, Sn, Ve, wt, ze, Et) : ml(yn, Z, Sn, Ve);
                  jt.draw(ie, ie.gl.TRIANGLES, R, j, G, Fe.backCCW, Un, y.id, zt.layoutVertexBuffer, zt.indexBuffer, zt.segments, y.paint, Z.transform.zoom, It);
                }
              }
            }
            function ea(Z, B, y, b, R, j) {
              var G = Z.context, ie = G.gl, fe = B.fbo;
              if (fe) {
                var xe = Z.useProgram("hillshade");
                G.activeTexture.set(ie.TEXTURE0), ie.bindTexture(ie.TEXTURE_2D, fe.colorAttachment.get());
                var Te = Eo(Z, B, y);
                xe.draw(G, ie.TRIANGLES, b, R, j, Fe.disabled, Te, y.id, Z.rasterBoundsBuffer, Z.quadTriangleIndexBuffer, Z.rasterBoundsSegments);
              }
            }
            function Ic(Z, B, y, b, R, j) {
              var G = Z.context, ie = G.gl, fe = B.dem;
              if (fe && fe.data) {
                var xe = fe.dim, Te = fe.stride, ze = fe.getPixels();
                if (G.activeTexture.set(ie.TEXTURE1), G.pixelStoreUnpackPremultiplyAlpha.set(!1), B.demTexture = B.demTexture || Z.getTileTexture(Te), B.demTexture) {
                  var Ve = B.demTexture;
                  Ve.update(ze, { premultiply: !1 }), Ve.bind(ie.NEAREST, ie.CLAMP_TO_EDGE);
                } else B.demTexture = new i.Texture(G, ze, ie.RGBA, { premultiply: !1 }), B.demTexture.bind(ie.NEAREST, ie.CLAMP_TO_EDGE);
                G.activeTexture.set(ie.TEXTURE0);
                var ut = B.fbo;
                if (!ut) {
                  var gt = new i.Texture(G, { width: xe, height: xe, data: null }, ie.RGBA);
                  gt.bind(ie.LINEAR, ie.CLAMP_TO_EDGE), (ut = B.fbo = G.createFramebuffer(xe, xe, !0)).colorAttachment.set(gt.texture);
                }
                G.bindFramebuffer.set(ut.framebuffer), G.viewport.set([0, 0, xe, xe]), Z.useProgram("hillshadePrepare").draw(G, ie.TRIANGLES, b, R, j, Fe.disabled, ac(B.tileID, fe), y.id, Z.rasterBoundsBuffer, Z.quadTriangleIndexBuffer, Z.rasterBoundsSegments), B.needsHillshadePrepare = !1;
              }
            }
            function nf(Z, B, y, b, R) {
              var j = b.paint.get("raster-fade-duration");
              if (j > 0) {
                var G = i.browser.now(), ie = (G - Z.timeAdded) / j, fe = B ? (G - B.timeAdded) / j : -1, xe = y.getSource(), Te = R.coveringZoomLevel({ tileSize: xe.tileSize, roundZoom: xe.roundZoom }), ze = !B || Math.abs(B.tileID.overscaledZ - Te) > Math.abs(Z.tileID.overscaledZ - Te), Ve = ze && Z.refreshedUponExpiration ? 1 : i.clamp(ze ? ie : 1 - fe, 0, 1);
                return Z.refreshedUponExpiration && ie >= 1 && (Z.refreshedUponExpiration = !1), B ? { opacity: 1, mix: 1 - Ve } : { opacity: Ve, mix: 0 };
              }
              return { opacity: 1, mix: 0 };
            }
            var zu = new i.Color(1, 0, 0, 1), Yo = new i.Color(0, 1, 0, 1), Ru = new i.Color(0, 0, 1, 1), gf = new i.Color(1, 0, 1, 1), Fu = new i.Color(0, 1, 1, 1);
            function ws(Z) {
              var B = Z.transform.padding;
              Nu(Z, Z.transform.height - (B.top || 0), 3, zu), Nu(Z, B.bottom || 0, 3, Yo), An(Z, B.left || 0, 3, Ru), An(Z, Z.transform.width - (B.right || 0), 3, gf);
              var y = Z.transform.centerPoint;
              (function(b, R, j, G) {
                var ie = 20, fe = 2;
                to(b, R - fe / 2, j - ie / 2, fe, ie, G), to(b, R - ie / 2, j - fe / 2, ie, fe, G);
              })(Z, y.x, Z.transform.height - y.y, Fu);
            }
            function Nu(Z, B, y, b) {
              to(Z, 0, B + y / 2, Z.transform.width, y, b);
            }
            function An(Z, B, y, b) {
              to(Z, B - y / 2, 0, y, Z.transform.height, b);
            }
            function to(Z, B, y, b, R, j) {
              var G = Z.context, ie = G.gl;
              ie.enable(ie.SCISSOR_TEST), ie.scissor(B * i.browser.devicePixelRatio, y * i.browser.devicePixelRatio, b * i.browser.devicePixelRatio, R * i.browser.devicePixelRatio), G.clear({ color: j }), ie.disable(ie.SCISSOR_TEST);
            }
            function Io(Z, B, y) {
              var b = Z.context, R = b.gl, j = y.posMatrix, G = Z.useProgram("debug"), ie = Je.disabled, fe = ot.disabled, xe = Z.colorModeForRenderPass(), Te = "$debug";
              b.activeTexture.set(R.TEXTURE0), Z.emptyTexture.bind(R.LINEAR, R.CLAMP_TO_EDGE), G.draw(b, R.LINE_STRIP, ie, fe, xe, Fe.disabled, tf(j, i.Color.red), Te, Z.debugBuffer, Z.tileBorderIndexBuffer, Z.debugSegments);
              var ze = B.getTileByID(y.key).latestRawTileData, Ve = ze && ze.byteLength || 0, ut = Math.floor(Ve / 1024), gt = B.getTile(y).tileSize, wt = 512 / Math.min(gt, 512) * (y.overscaledZ / Z.transform.zoom) * 0.5, Et = y.canonical.toString();
              y.overscaledZ !== y.canonical.z && (Et += " => " + y.overscaledZ), function(zt, It) {
                zt.initDebugOverlayCanvas();
                var jt = zt.debugOverlayCanvas, Lt = zt.context.gl, Zt = zt.debugOverlayCanvas.getContext("2d");
                Zt.clearRect(0, 0, jt.width, jt.height), Zt.shadowColor = "white", Zt.shadowBlur = 2, Zt.lineWidth = 1.5, Zt.strokeStyle = "white", Zt.textBaseline = "top", Zt.font = "bold 36px Open Sans, sans-serif", Zt.fillText(It, 5, 5), Zt.strokeText(It, 5, 5), zt.debugOverlayTexture.update(jt), zt.debugOverlayTexture.bind(Lt.LINEAR, Lt.CLAMP_TO_EDGE);
              }(Z, Et + " " + ut + "kb"), G.draw(b, R.TRIANGLES, ie, fe, Ye.alphaBlended, Fe.disabled, tf(j, i.Color.transparent, wt), Te, Z.debugBuffer, Z.quadTriangleIndexBuffer, Z.debugSegments);
            }
            var Ku = { symbol: function(Z, B, y, b, R) {
              if (Z.renderPass === "translucent") {
                var j = ot.disabled, G = Z.colorModeForRenderPass();
                y.layout.get("text-variable-anchor") && function(ie, fe, xe, Te, ze, Ve, ut) {
                  for (var gt = fe.transform, wt = ze === "map", Et = Ve === "map", zt = 0, It = ie; zt < It.length; zt += 1) {
                    var jt = It[zt], Lt = Te.getTile(jt), Zt = Lt.getBucket(xe);
                    if (Zt && Zt.text && Zt.text.segments.get().length) {
                      var Qt = Zt.textSizeData, Xt = i.evaluateSizeForZoom(Qt, gt.zoom), yn = yr(Lt, 1, fe.transform.zoom), Sn = Xn(jt.posMatrix, Et, wt, fe.transform, yn), Un = xe.layout.get("icon-text-fit") !== "none" && Zt.hasIconData();
                      if (Xt) {
                        var Vn = Math.pow(2, gt.zoom - Lt.tileID.overscaledZ);
                        lc(Zt, wt, Et, ut, i.symbolSize, gt, Sn, jt.posMatrix, Vn, Xt, Un);
                      }
                    }
                  }
                }(b, Z, y, B, y.layout.get("text-rotation-alignment"), y.layout.get("text-pitch-alignment"), R), y.paint.get("icon-opacity").constantOr(1) !== 0 && yl(Z, B, y, b, !1, y.paint.get("icon-translate"), y.paint.get("icon-translate-anchor"), y.layout.get("icon-rotation-alignment"), y.layout.get("icon-pitch-alignment"), y.layout.get("icon-keep-upright"), j, G), y.paint.get("text-opacity").constantOr(1) !== 0 && yl(Z, B, y, b, !0, y.paint.get("text-translate"), y.paint.get("text-translate-anchor"), y.layout.get("text-rotation-alignment"), y.layout.get("text-pitch-alignment"), y.layout.get("text-keep-upright"), j, G), B.map.showCollisionBoxes && (Ks(Z, B, y, b, y.paint.get("text-translate"), y.paint.get("text-translate-anchor"), !0), Ks(Z, B, y, b, y.paint.get("icon-translate"), y.paint.get("icon-translate-anchor"), !1));
              }
            }, circle: function(Z, B, y, b) {
              if (Z.renderPass === "translucent") {
                var R = y.paint.get("circle-opacity"), j = y.paint.get("circle-stroke-width"), G = y.paint.get("circle-stroke-opacity"), ie = y.layout.get("circle-sort-key").constantOr(1) !== void 0;
                if (R.constantOr(1) !== 0 || j.constantOr(1) !== 0 && G.constantOr(1) !== 0) {
                  for (var fe = Z.context, xe = fe.gl, Te = Z.depthModeForSublayer(0, Je.ReadOnly), ze = ot.disabled, Ve = Z.colorModeForRenderPass(), ut = [], gt = 0; gt < b.length; gt++) {
                    var wt = b[gt], Et = B.getTile(wt), zt = Et.getBucket(y);
                    if (zt) {
                      var It = zt.programConfigurations.get(y.id), jt = { programConfiguration: It, program: Z.useProgram("circle", It), layoutVertexBuffer: zt.layoutVertexBuffer, indexBuffer: zt.indexBuffer, uniformValues: Xu(Z, wt, Et, y) };
                      if (ie) for (var Lt = 0, Zt = zt.segments.get(); Lt < Zt.length; Lt += 1) {
                        var Qt = Zt[Lt];
                        ut.push({ segments: new i.SegmentVector([Qt]), sortKey: Qt.sortKey, state: jt });
                      }
                      else ut.push({ segments: zt.segments, sortKey: 0, state: jt });
                    }
                  }
                  ie && ut.sort(function(fr, Or) {
                    return fr.sortKey - Or.sortKey;
                  });
                  for (var Xt = 0, yn = ut; Xt < yn.length; Xt += 1) {
                    var Sn = yn[Xt], Un = Sn.state, Vn = Un.programConfiguration, Yn = Un.program, er = Un.layoutVertexBuffer, kr = Un.indexBuffer, or = Un.uniformValues, Mr = Sn.segments;
                    Yn.draw(fe, xe.TRIANGLES, Te, ze, Ve, Fe.disabled, or, y.id, er, kr, Mr, y.paint, Z.transform.zoom, Vn);
                  }
                }
              }
            }, heatmap: function(Z, B, y, b) {
              if (y.paint.get("heatmap-opacity") !== 0) if (Z.renderPass === "offscreen") {
                var R = Z.context, j = R.gl, G = ot.disabled, ie = new Ye([j.ONE, j.ONE], i.Color.transparent, [!0, !0, !0, !0]);
                (function(wt, Et, zt) {
                  var It = wt.gl;
                  wt.activeTexture.set(It.TEXTURE1), wt.viewport.set([0, 0, Et.width / 4, Et.height / 4]);
                  var jt = zt.heatmapFbo;
                  if (jt) It.bindTexture(It.TEXTURE_2D, jt.colorAttachment.get()), wt.bindFramebuffer.set(jt.framebuffer);
                  else {
                    var Lt = It.createTexture();
                    It.bindTexture(It.TEXTURE_2D, Lt), It.texParameteri(It.TEXTURE_2D, It.TEXTURE_WRAP_S, It.CLAMP_TO_EDGE), It.texParameteri(It.TEXTURE_2D, It.TEXTURE_WRAP_T, It.CLAMP_TO_EDGE), It.texParameteri(It.TEXTURE_2D, It.TEXTURE_MIN_FILTER, It.LINEAR), It.texParameteri(It.TEXTURE_2D, It.TEXTURE_MAG_FILTER, It.LINEAR), jt = zt.heatmapFbo = wt.createFramebuffer(Et.width / 4, Et.height / 4, !1), function(Zt, Qt, Xt, yn) {
                      var Sn = Zt.gl, Un = Zt.extRenderToTextureHalfFloat ? Zt.extTextureHalfFloat.HALF_FLOAT_OES : Sn.UNSIGNED_BYTE;
                      Sn.texImage2D(Sn.TEXTURE_2D, 0, Sn.RGBA, Qt.width / 4, Qt.height / 4, 0, Sn.RGBA, Un, null), yn.colorAttachment.set(Xt);
                    }(wt, Et, Lt, jt);
                  }
                })(R, Z, y), R.clear({ color: i.Color.transparent });
                for (var fe = 0; fe < b.length; fe++) {
                  var xe = b[fe];
                  if (!B.hasRenderableParent(xe)) {
                    var Te = B.getTile(xe), ze = Te.getBucket(y);
                    if (ze) {
                      var Ve = ze.programConfigurations.get(y.id), ut = Z.useProgram("heatmap", Ve), gt = Z.transform.zoom;
                      ut.draw(R, j.TRIANGLES, Je.disabled, G, ie, Fe.disabled, Ec(xe.posMatrix, Te, gt, y.paint.get("heatmap-intensity")), y.id, ze.layoutVertexBuffer, ze.indexBuffer, ze.segments, y.paint, Z.transform.zoom, Ve);
                    }
                  }
                }
                R.viewport.set([0, 0, Z.width, Z.height]);
              } else Z.renderPass === "translucent" && (Z.context.setColorMode(Z.colorModeForRenderPass()), function(wt, Et) {
                var zt = wt.context, It = zt.gl, jt = Et.heatmapFbo;
                if (jt) {
                  zt.activeTexture.set(It.TEXTURE0), It.bindTexture(It.TEXTURE_2D, jt.colorAttachment.get()), zt.activeTexture.set(It.TEXTURE1);
                  var Lt = Et.colorRampTexture;
                  Lt || (Lt = Et.colorRampTexture = new i.Texture(zt, Et.colorRamp, It.RGBA)), Lt.bind(It.LINEAR, It.CLAMP_TO_EDGE), wt.useProgram("heatmapTexture").draw(zt, It.TRIANGLES, Je.disabled, ot.disabled, wt.colorModeForRenderPass(), Fe.disabled, mh(wt, Et, 0, 1), Et.id, wt.viewportBuffer, wt.quadTriangleIndexBuffer, wt.viewportSegments, Et.paint, wt.transform.zoom);
                }
              }(Z, y));
            }, line: function(Z, B, y, b) {
              if (Z.renderPass === "translucent") {
                var R = y.paint.get("line-opacity"), j = y.paint.get("line-width");
                if (R.constantOr(1) !== 0 && j.constantOr(1) !== 0) for (var G = Z.depthModeForSublayer(0, Je.ReadOnly), ie = Z.colorModeForRenderPass(), fe = y.paint.get("line-dasharray"), xe = y.paint.get("line-pattern"), Te = xe.constantOr(1), ze = y.paint.get("line-gradient"), Ve = y.getCrossfadeParameters(), ut = Te ? "linePattern" : fe ? "lineSDF" : ze ? "lineGradient" : "line", gt = Z.context, wt = gt.gl, Et = !0, zt = 0, It = b; zt < It.length; zt += 1) {
                  var jt = It[zt], Lt = B.getTile(jt);
                  if (!Te || Lt.patternsLoaded()) {
                    var Zt = Lt.getBucket(y);
                    if (Zt) {
                      var Qt = Zt.programConfigurations.get(y.id), Xt = Z.context.program.get(), yn = Z.useProgram(ut, Qt), Sn = Et || yn.program !== Xt, Un = xe.constantOr(null);
                      if (Un && Lt.imageAtlas) {
                        var Vn = Lt.imageAtlas, Yn = Vn.patternPositions[Un.to.toString()], er = Vn.patternPositions[Un.from.toString()];
                        Yn && er && Qt.setConstantPatternPositions(Yn, er);
                      }
                      var kr = Te ? Ma(Z, Lt, y, Ve) : fe ? Ea(Z, Lt, y, fe, Ve) : ze ? eu(Z, Lt, y, Zt.lineClipsArray.length) : Xi(Z, Lt, y);
                      if (Te) gt.activeTexture.set(wt.TEXTURE0), Lt.imageAtlasTexture.bind(wt.LINEAR, wt.CLAMP_TO_EDGE), Qt.updatePaintBuffers(Ve);
                      else if (fe && (Sn || Z.lineAtlas.dirty)) gt.activeTexture.set(wt.TEXTURE0), Z.lineAtlas.bind(gt);
                      else if (ze) {
                        var or = Zt.gradients[y.id], Mr = or.texture;
                        if (y.gradientVersion !== or.version) {
                          var fr = 256;
                          if (y.stepInterpolant) {
                            var Or = B.getSource().maxzoom, br = jt.canonical.z === Or ? Math.ceil(1 << Z.transform.maxZoom - jt.canonical.z) : 1, Nr = Zt.maxLineLength / i.EXTENT * 1024 * br;
                            fr = i.clamp(i.nextPowerOfTwo(Nr), 256, gt.maxTextureSize);
                          }
                          or.gradient = i.renderColorRamp({ expression: y.gradientExpression(), evaluationKey: "lineProgress", resolution: fr, image: or.gradient || void 0, clips: Zt.lineClipsArray }), or.texture ? or.texture.update(or.gradient) : or.texture = new i.Texture(gt, or.gradient, wt.RGBA), or.version = y.gradientVersion, Mr = or.texture;
                        }
                        gt.activeTexture.set(wt.TEXTURE0), Mr.bind(y.stepInterpolant ? wt.NEAREST : wt.LINEAR, wt.CLAMP_TO_EDGE);
                      }
                      yn.draw(gt, wt.TRIANGLES, G, Z.stencilModeForClipping(jt), ie, Fe.disabled, kr, y.id, Zt.layoutVertexBuffer, Zt.indexBuffer, Zt.segments, y.paint, Z.transform.zoom, Qt, Zt.layoutVertexBuffer2), Et = !1;
                    }
                  }
                }
              }
            }, fill: function(Z, B, y, b) {
              var R = y.paint.get("fill-color"), j = y.paint.get("fill-opacity");
              if (j.constantOr(1) !== 0) {
                var G = Z.colorModeForRenderPass(), ie = y.paint.get("fill-pattern"), fe = Z.opaquePassEnabledForLayer() && !ie.constantOr(1) && R.constantOr(i.Color.transparent).a === 1 && j.constantOr(0) === 1 ? "opaque" : "translucent";
                if (Z.renderPass === fe) {
                  var xe = Z.depthModeForSublayer(1, Z.renderPass === "opaque" ? Je.ReadWrite : Je.ReadOnly);
                  ru(Z, B, y, b, xe, G, !1);
                }
                if (Z.renderPass === "translucent" && y.paint.get("fill-antialias")) {
                  var Te = Z.depthModeForSublayer(y.getPaintProperty("fill-outline-color") ? 2 : 0, Je.ReadOnly);
                  ru(Z, B, y, b, Te, G, !0);
                }
              }
            }, "fill-extrusion": function(Z, B, y, b) {
              var R = y.paint.get("fill-extrusion-opacity");
              if (R !== 0 && Z.renderPass === "translucent") {
                var j = new Je(Z.context.gl.LEQUAL, Je.ReadWrite, Z.depthRangeFor3D);
                if (R !== 1 || y.paint.get("fill-extrusion-pattern").constantOr(1)) Cl(Z, B, y, b, j, ot.disabled, Ye.disabled), Cl(Z, B, y, b, j, Z.stencilModeFor3D(), Z.colorModeForRenderPass());
                else {
                  var G = Z.colorModeForRenderPass();
                  Cl(Z, B, y, b, j, ot.disabled, G);
                }
              }
            }, hillshade: function(Z, B, y, b) {
              if (Z.renderPass === "offscreen" || Z.renderPass === "translucent") {
                for (var R = Z.context, j = Z.depthModeForSublayer(0, Je.ReadOnly), G = Z.colorModeForRenderPass(), ie = Z.renderPass === "translucent" ? Z.stencilConfigForOverlap(b) : [{}, b], fe = ie[0], xe = 0, Te = ie[1]; xe < Te.length; xe += 1) {
                  var ze = Te[xe], Ve = B.getTile(ze);
                  Ve.needsHillshadePrepare && Z.renderPass === "offscreen" ? Ic(Z, Ve, y, j, ot.disabled, G) : Z.renderPass === "translucent" && ea(Z, Ve, y, j, fe[ze.overscaledZ], G);
                }
                R.viewport.set([0, 0, Z.width, Z.height]);
              }
            }, raster: function(Z, B, y, b) {
              if (Z.renderPass === "translucent" && y.paint.get("raster-opacity") !== 0 && b.length) for (var R = Z.context, j = R.gl, G = B.getSource(), ie = Z.useProgram("raster"), fe = Z.colorModeForRenderPass(), xe = G instanceof ee ? [{}, b] : Z.stencilConfigForOverlap(b), Te = xe[0], ze = xe[1], Ve = ze[ze.length - 1].overscaledZ, ut = !Z.options.moving, gt = 0, wt = ze; gt < wt.length; gt += 1) {
                var Et = wt[gt], zt = Z.depthModeForSublayer(Et.overscaledZ - Ve, y.paint.get("raster-opacity") === 1 ? Je.ReadWrite : Je.ReadOnly, j.LESS), It = B.getTile(Et), jt = Z.transform.calculatePosMatrix(Et.toUnwrapped(), ut);
                It.registerFadeDuration(y.paint.get("raster-fade-duration"));
                var Lt = B.findLoadedParent(Et, 0), Zt = nf(It, Lt, B, y, Z.transform), Qt = void 0, Xt = void 0, yn = y.paint.get("raster-resampling") === "nearest" ? j.NEAREST : j.LINEAR;
                R.activeTexture.set(j.TEXTURE0), It.texture.bind(yn, j.CLAMP_TO_EDGE, j.LINEAR_MIPMAP_NEAREST), R.activeTexture.set(j.TEXTURE1), Lt ? (Lt.texture.bind(yn, j.CLAMP_TO_EDGE, j.LINEAR_MIPMAP_NEAREST), Qt = Math.pow(2, Lt.tileID.overscaledZ - It.tileID.overscaledZ), Xt = [It.tileID.canonical.x * Qt % 1, It.tileID.canonical.y * Qt % 1]) : It.texture.bind(yn, j.CLAMP_TO_EDGE, j.LINEAR_MIPMAP_NEAREST);
                var Sn = oc(jt, Xt || [0, 0], Qt || 1, Zt, y);
                G instanceof ee ? ie.draw(R, j.TRIANGLES, zt, ot.disabled, fe, Fe.disabled, Sn, y.id, G.boundsBuffer, Z.quadTriangleIndexBuffer, G.boundsSegments) : ie.draw(R, j.TRIANGLES, zt, Te[Et.overscaledZ], fe, Fe.disabled, Sn, y.id, Z.rasterBoundsBuffer, Z.quadTriangleIndexBuffer, Z.rasterBoundsSegments);
              }
            }, background: function(Z, B, y) {
              var b = y.paint.get("background-color"), R = y.paint.get("background-opacity");
              if (R !== 0) {
                var j = Z.context, G = j.gl, ie = Z.transform, fe = ie.tileSize, xe = y.paint.get("background-pattern");
                if (!Z.isPatternMissing(xe)) {
                  var Te = !xe && b.a === 1 && R === 1 && Z.opaquePassEnabledForLayer() ? "opaque" : "translucent";
                  if (Z.renderPass === Te) {
                    var ze = ot.disabled, Ve = Z.depthModeForSublayer(0, Te === "opaque" ? Je.ReadWrite : Je.ReadOnly), ut = Z.colorModeForRenderPass(), gt = Z.useProgram(xe ? "backgroundPattern" : "background"), wt = ie.coveringTiles({ tileSize: fe });
                    xe && (j.activeTexture.set(G.TEXTURE0), Z.imageManager.bind(Z.context));
                    for (var Et = y.getCrossfadeParameters(), zt = 0, It = wt; zt < It.length; zt += 1) {
                      var jt = It[zt], Lt = Z.transform.calculatePosMatrix(jt.toUnwrapped()), Zt = xe ? pf(Lt, R, Z, xe, { tileID: jt, tileSize: fe }, Et) : Ou(Lt, R, b);
                      gt.draw(j, G.TRIANGLES, Ve, ze, ut, Fe.disabled, Zt, y.id, Z.tileExtentBuffer, Z.quadTriangleIndexBuffer, Z.tileExtentSegments);
                    }
                  }
                }
              }
            }, debug: function(Z, B, y) {
              for (var b = 0; b < y.length; b++) Io(Z, B, y[b]);
            }, custom: function(Z, B, y) {
              var b = Z.context, R = y.implementation;
              if (Z.renderPass === "offscreen") {
                var j = R.prerender;
                j && (Z.setCustomLayerDefaults(), b.setColorMode(Z.colorModeForRenderPass()), j.call(R, b.gl, Z.transform.customLayerMatrix()), b.setDirty(), Z.setBaseState());
              } else if (Z.renderPass === "translucent") {
                Z.setCustomLayerDefaults(), b.setColorMode(Z.colorModeForRenderPass()), b.setStencilMode(ot.disabled);
                var G = R.renderingMode === "3d" ? new Je(Z.context.gl.LEQUAL, Je.ReadWrite, Z.depthRangeFor3D) : Z.depthModeForSublayer(0, Je.ReadOnly);
                b.setDepthMode(G), R.render(b.gl, Z.transform.customLayerMatrix()), b.setDirty(), Z.setBaseState(), b.bindFramebuffer.set(null);
              }
            } }, va = function(Z, B) {
              this.context = new pt(Z), this.transform = B, this._tileTextures = {}, this.setup(), this.numSublayers = Mt.maxUnderzooming + Mt.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new ir(), this.gpuTimers = {};
            };
            va.prototype.resize = function(Z, B) {
              if (this.width = Z * i.browser.devicePixelRatio, this.height = B * i.browser.devicePixelRatio, this.context.viewport.set([0, 0, this.width, this.height]), this.style) for (var y = 0, b = this.style._order; y < b.length; y += 1) {
                var R = b[y];
                this.style._layers[R].resize();
              }
            }, va.prototype.setup = function() {
              var Z = this.context, B = new i.StructArrayLayout2i4();
              B.emplaceBack(0, 0), B.emplaceBack(i.EXTENT, 0), B.emplaceBack(0, i.EXTENT), B.emplaceBack(i.EXTENT, i.EXTENT), this.tileExtentBuffer = Z.createVertexBuffer(B, Dr.members), this.tileExtentSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2);
              var y = new i.StructArrayLayout2i4();
              y.emplaceBack(0, 0), y.emplaceBack(i.EXTENT, 0), y.emplaceBack(0, i.EXTENT), y.emplaceBack(i.EXTENT, i.EXTENT), this.debugBuffer = Z.createVertexBuffer(y, Dr.members), this.debugSegments = i.SegmentVector.simpleSegment(0, 0, 4, 5);
              var b = new i.StructArrayLayout4i8();
              b.emplaceBack(0, 0, 0, 0), b.emplaceBack(i.EXTENT, 0, i.EXTENT, 0), b.emplaceBack(0, i.EXTENT, 0, i.EXTENT), b.emplaceBack(i.EXTENT, i.EXTENT, i.EXTENT, i.EXTENT), this.rasterBoundsBuffer = Z.createVertexBuffer(b, te.members), this.rasterBoundsSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2);
              var R = new i.StructArrayLayout2i4();
              R.emplaceBack(0, 0), R.emplaceBack(1, 0), R.emplaceBack(0, 1), R.emplaceBack(1, 1), this.viewportBuffer = Z.createVertexBuffer(R, Dr.members), this.viewportSegments = i.SegmentVector.simpleSegment(0, 0, 4, 2);
              var j = new i.StructArrayLayout1ui2();
              j.emplaceBack(0), j.emplaceBack(1), j.emplaceBack(3), j.emplaceBack(2), j.emplaceBack(0), this.tileBorderIndexBuffer = Z.createIndexBuffer(j);
              var G = new i.StructArrayLayout3ui6();
              G.emplaceBack(0, 1, 2), G.emplaceBack(2, 1, 3), this.quadTriangleIndexBuffer = Z.createIndexBuffer(G), this.emptyTexture = new i.Texture(Z, { width: 1, height: 1, data: new Uint8Array([0, 0, 0, 0]) }, Z.gl.RGBA);
              var ie = this.context.gl;
              this.stencilClearMode = new ot({ func: ie.ALWAYS, mask: 0 }, 0, 255, ie.ZERO, ie.ZERO, ie.ZERO);
            }, va.prototype.clearStencil = function() {
              var Z = this.context, B = Z.gl;
              this.nextStencilID = 1, this.currentStencilSource = void 0;
              var y = i.create();
              i.ortho(y, 0, this.width, this.height, 0, 0, 1), i.scale(y, y, [B.drawingBufferWidth, B.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(Z, B.TRIANGLES, Je.disabled, this.stencilClearMode, Ye.disabled, Fe.disabled, bs(y), "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
            }, va.prototype._renderTileClippingMasks = function(Z, B) {
              if (this.currentStencilSource !== Z.source && Z.isTileClipped() && B && B.length) {
                this.currentStencilSource = Z.source;
                var y = this.context, b = y.gl;
                this.nextStencilID + B.length > 256 && this.clearStencil(), y.setColorMode(Ye.disabled), y.setDepthMode(Je.disabled);
                var R = this.useProgram("clippingMask");
                this._tileClippingMaskIDs = {};
                for (var j = 0, G = B; j < G.length; j += 1) {
                  var ie = G[j], fe = this._tileClippingMaskIDs[ie.key] = this.nextStencilID++;
                  R.draw(y, b.TRIANGLES, Je.disabled, new ot({ func: b.ALWAYS, mask: 0 }, fe, 255, b.KEEP, b.KEEP, b.REPLACE), Ye.disabled, Fe.disabled, bs(ie.posMatrix), "$clipping", this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);
                }
              }
            }, va.prototype.stencilModeFor3D = function() {
              this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil();
              var Z = this.nextStencilID++, B = this.context.gl;
              return new ot({ func: B.NOTEQUAL, mask: 255 }, Z, 255, B.KEEP, B.KEEP, B.REPLACE);
            }, va.prototype.stencilModeForClipping = function(Z) {
              var B = this.context.gl;
              return new ot({ func: B.EQUAL, mask: 255 }, this._tileClippingMaskIDs[Z.key], 0, B.KEEP, B.KEEP, B.REPLACE);
            }, va.prototype.stencilConfigForOverlap = function(Z) {
              var B, y = this.context.gl, b = Z.sort(function(fe, xe) {
                return xe.overscaledZ - fe.overscaledZ;
              }), R = b[b.length - 1].overscaledZ, j = b[0].overscaledZ - R + 1;
              if (j > 1) {
                this.currentStencilSource = void 0, this.nextStencilID + j > 256 && this.clearStencil();
                for (var G = {}, ie = 0; ie < j; ie++) G[ie + R] = new ot({ func: y.GEQUAL, mask: 255 }, ie + this.nextStencilID, 255, y.KEEP, y.KEEP, y.REPLACE);
                return this.nextStencilID += j, [G, b];
              }
              return [(B = {}, B[R] = ot.disabled, B), b];
            }, va.prototype.colorModeForRenderPass = function() {
              var Z = this.context.gl;
              if (this._showOverdrawInspector) {
                var B = 0.125;
                return new Ye([Z.CONSTANT_COLOR, Z.ONE], new i.Color(B, B, B, 0), [!0, !0, !0, !0]);
              }
              return this.renderPass === "opaque" ? Ye.unblended : Ye.alphaBlended;
            }, va.prototype.depthModeForSublayer = function(Z, B, y) {
              if (!this.opaquePassEnabledForLayer()) return Je.disabled;
              var b = 1 - ((1 + this.currentLayer) * this.numSublayers + Z) * this.depthEpsilon;
              return new Je(y || this.context.gl.LEQUAL, B, [b, b]);
            }, va.prototype.opaquePassEnabledForLayer = function() {
              return this.currentLayer < this.opaquePassCutoff;
            }, va.prototype.render = function(Z, B) {
              var y = this;
              this.style = Z, this.options = B, this.lineAtlas = Z.lineAtlas, this.imageManager = Z.imageManager, this.glyphManager = Z.glyphManager, this.symbolFadeChange = Z.placement.symbolFadeChange(i.browser.now()), this.imageManager.beginFrame();
              var b = this.style._order, R = this.style.sourceCaches;
              for (var j in R) {
                var G = R[j];
                G.used && G.prepare(this.context);
              }
              var ie, fe, xe = {}, Te = {}, ze = {};
              for (var Ve in R) {
                var ut = R[Ve];
                xe[Ve] = ut.getVisibleCoordinates(), Te[Ve] = xe[Ve].slice().reverse(), ze[Ve] = ut.getVisibleCoordinates(!0).reverse();
              }
              this.opaquePassCutoff = 1 / 0;
              for (var gt = 0; gt < b.length; gt++) {
                var wt = b[gt];
                if (this.style._layers[wt].is3D()) {
                  this.opaquePassCutoff = gt;
                  break;
                }
              }
              this.renderPass = "offscreen";
              for (var Et = 0, zt = b; Et < zt.length; Et += 1) {
                var It = zt[Et], jt = this.style._layers[It];
                if (jt.hasOffscreenPass() && !jt.isHidden(this.transform.zoom)) {
                  var Lt = Te[jt.source];
                  (jt.type === "custom" || Lt.length) && this.renderLayer(this, R[jt.source], jt, Lt);
                }
              }
              for (this.context.bindFramebuffer.set(null), this.context.clear({ color: B.showOverdrawInspector ? i.Color.black : i.Color.transparent, depth: 1 }), this.clearStencil(), this._showOverdrawInspector = B.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (Z._order.length + 2) * this.numSublayers * this.depthEpsilon], this.renderPass = "opaque", this.currentLayer = b.length - 1; this.currentLayer >= 0; this.currentLayer--) {
                var Zt = this.style._layers[b[this.currentLayer]], Qt = R[Zt.source], Xt = xe[Zt.source];
                this._renderTileClippingMasks(Zt, Xt), this.renderLayer(this, Qt, Zt, Xt);
              }
              for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < b.length; this.currentLayer++) {
                var yn = this.style._layers[b[this.currentLayer]], Sn = R[yn.source], Un = (yn.type === "symbol" ? ze : Te)[yn.source];
                this._renderTileClippingMasks(yn, xe[yn.source]), this.renderLayer(this, Sn, yn, Un);
              }
              this.options.showTileBoundaries && (i.values(this.style._layers).forEach(function(Vn) {
                Vn.source && !Vn.isHidden(y.transform.zoom) && (Vn.source !== (fe && fe.id) && (fe = y.style.sourceCaches[Vn.source]), (!ie || ie.getSource().maxzoom < fe.getSource().maxzoom) && (ie = fe));
              }), ie && Ku.debug(this, ie, ie.getVisibleCoordinates())), this.options.showPadding && ws(this), this.context.setDefault();
            }, va.prototype.renderLayer = function(Z, B, y, b) {
              y.isHidden(this.transform.zoom) || (y.type === "background" || y.type === "custom" || b.length) && (this.id = y.id, this.gpuTimingStart(y), Ku[y.type](Z, B, y, b, this.style.placement.variableOffsets), this.gpuTimingEnd());
            }, va.prototype.gpuTimingStart = function(Z) {
              if (this.options.gpuTiming) {
                var B = this.context.extTimerQuery, y = this.gpuTimers[Z.id];
                y || (y = this.gpuTimers[Z.id] = { calls: 0, cpuTime: 0, query: B.createQueryEXT() }), y.calls++, B.beginQueryEXT(B.TIME_ELAPSED_EXT, y.query);
              }
            }, va.prototype.gpuTimingEnd = function() {
              if (this.options.gpuTiming) {
                var Z = this.context.extTimerQuery;
                Z.endQueryEXT(Z.TIME_ELAPSED_EXT);
              }
            }, va.prototype.collectGpuTimers = function() {
              var Z = this.gpuTimers;
              return this.gpuTimers = {}, Z;
            }, va.prototype.queryGpuTimers = function(Z) {
              var B = {};
              for (var y in Z) {
                var b = Z[y], R = this.context.extTimerQuery, j = R.getQueryObjectEXT(b.query, R.QUERY_RESULT_EXT) / 1e6;
                R.deleteQueryEXT(b.query), B[y] = j;
              }
              return B;
            }, va.prototype.translatePosMatrix = function(Z, B, y, b, R) {
              if (!y[0] && !y[1]) return Z;
              var j = R ? b === "map" ? this.transform.angle : 0 : b === "viewport" ? -this.transform.angle : 0;
              if (j) {
                var G = Math.sin(j), ie = Math.cos(j);
                y = [y[0] * ie - y[1] * G, y[0] * G + y[1] * ie];
              }
              var fe = [R ? y[0] : yr(B, y[0], this.transform.zoom), R ? y[1] : yr(B, y[1], this.transform.zoom), 0], xe = new Float32Array(16);
              return i.translate(xe, Z, fe), xe;
            }, va.prototype.saveTileTexture = function(Z) {
              var B = this._tileTextures[Z.size[0]];
              B ? B.push(Z) : this._tileTextures[Z.size[0]] = [Z];
            }, va.prototype.getTileTexture = function(Z) {
              var B = this._tileTextures[Z];
              return B && B.length > 0 ? B.pop() : null;
            }, va.prototype.isPatternMissing = function(Z) {
              if (!Z) return !1;
              if (!Z.from || !Z.to) return !0;
              var B = this.imageManager.getPattern(Z.from.toString()), y = this.imageManager.getPattern(Z.to.toString());
              return !B || !y;
            }, va.prototype.useProgram = function(Z, B) {
              this.cache = this.cache || {};
              var y = "" + Z + (B ? B.cacheKey : "") + (this._showOverdrawInspector ? "/overdraw" : "");
              return this.cache[y] || (this.cache[y] = new El(this.context, Z, Mo[Z], B, nu[Z], this._showOverdrawInspector)), this.cache[y];
            }, va.prototype.setCustomLayerDefaults = function() {
              this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();
            }, va.prototype.setBaseState = function() {
              var Z = this.context.gl;
              this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(Z.FUNC_ADD);
            }, va.prototype.initDebugOverlayCanvas = function() {
              if (this.debugOverlayCanvas == null) {
                this.debugOverlayCanvas = i.window.document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512;
                var Z = this.context.gl;
                this.debugOverlayTexture = new i.Texture(this.context, this.debugOverlayCanvas, Z.RGBA);
              }
            }, va.prototype.destroy = function() {
              this.emptyTexture.destroy(), this.debugOverlayTexture && this.debugOverlayTexture.destroy();
            };
            var Js = function(Z, B) {
              this.points = Z, this.planes = B;
            };
            Js.fromInvProjectionMatrix = function(Z, B, y) {
              var b = Math.pow(2, y), R = [[-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(function(G) {
                return i.transformMat4([], G, Z);
              }).map(function(G) {
                return i.scale$1([], G, 1 / G[3] / B * b);
              }), j = [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]].map(function(G) {
                var ie = i.sub([], R[G[0]], R[G[1]]), fe = i.sub([], R[G[2]], R[G[1]]), xe = i.normalize([], i.cross([], ie, fe)), Te = -i.dot(xe, R[G[1]]);
                return xe.concat(Te);
              });
              return new Js(R, j);
            };
            var Ha = function(Z, B) {
              this.min = Z, this.max = B, this.center = i.scale$2([], i.add([], this.min, this.max), 0.5);
            };
            Ha.prototype.quadrant = function(Z) {
              for (var B = [Z % 2 == 0, Z < 2], y = i.clone$2(this.min), b = i.clone$2(this.max), R = 0; R < B.length; R++) y[R] = B[R] ? this.min[R] : this.center[R], b[R] = B[R] ? this.center[R] : this.max[R];
              return b[2] = this.max[2], new Ha(y, b);
            }, Ha.prototype.distanceX = function(Z) {
              return Math.max(Math.min(this.max[0], Z[0]), this.min[0]) - Z[0];
            }, Ha.prototype.distanceY = function(Z) {
              return Math.max(Math.min(this.max[1], Z[1]), this.min[1]) - Z[1];
            }, Ha.prototype.intersects = function(Z) {
              for (var B = [[this.min[0], this.min[1], 0, 1], [this.max[0], this.min[1], 0, 1], [this.max[0], this.max[1], 0, 1], [this.min[0], this.max[1], 0, 1]], y = !0, b = 0; b < Z.planes.length; b++) {
                for (var R = Z.planes[b], j = 0, G = 0; G < B.length; G++) j += i.dot$1(R, B[G]) >= 0;
                if (j === 0) return 0;
                j !== B.length && (y = !1);
              }
              if (y) return 2;
              for (var ie = 0; ie < 3; ie++) {
                for (var fe = Number.MAX_VALUE, xe = -Number.MAX_VALUE, Te = 0; Te < Z.points.length; Te++) {
                  var ze = Z.points[Te][ie] - this.min[ie];
                  fe = Math.min(fe, ze), xe = Math.max(xe, ze);
                }
                if (xe < 0 || fe > this.max[ie] - this.min[ie]) return 0;
              }
              return 1;
            };
            var as = function(Z, B, y, b) {
              if (Z === void 0 && (Z = 0), B === void 0 && (B = 0), y === void 0 && (y = 0), b === void 0 && (b = 0), isNaN(Z) || Z < 0 || isNaN(B) || B < 0 || isNaN(y) || y < 0 || isNaN(b) || b < 0) throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");
              this.top = Z, this.bottom = B, this.left = y, this.right = b;
            };
            as.prototype.interpolate = function(Z, B, y) {
              return B.top != null && Z.top != null && (this.top = i.number(Z.top, B.top, y)), B.bottom != null && Z.bottom != null && (this.bottom = i.number(Z.bottom, B.bottom, y)), B.left != null && Z.left != null && (this.left = i.number(Z.left, B.left, y)), B.right != null && Z.right != null && (this.right = i.number(Z.right, B.right, y)), this;
            }, as.prototype.getCenter = function(Z, B) {
              var y = i.clamp((this.left + Z - this.right) / 2, 0, Z), b = i.clamp((this.top + B - this.bottom) / 2, 0, B);
              return new i.Point(y, b);
            }, as.prototype.equals = function(Z) {
              return this.top === Z.top && this.bottom === Z.bottom && this.left === Z.left && this.right === Z.right;
            }, as.prototype.clone = function() {
              return new as(this.top, this.bottom, this.left, this.right);
            }, as.prototype.toJSON = function() {
              return { top: this.top, bottom: this.bottom, left: this.left, right: this.right };
            };
            var aa = function(Z, B, y, b, R) {
              this.tileSize = 512, this.maxValidLatitude = 85.051129, this._renderWorldCopies = R === void 0 || R, this._minZoom = Z || 0, this._maxZoom = B || 22, this._minPitch = y ?? 0, this._maxPitch = b ?? 60, this.setMaxBounds(), this.width = 0, this.height = 0, this._center = new i.LngLat(0, 0), this.zoom = 0, this.angle = 0, this._fov = 0.6435011087932844, this._pitch = 0, this._unmodified = !0, this._edgeInsets = new as(), this._posMatrixCache = {}, this._alignedPosMatrixCache = {};
            }, Aa = { minZoom: { configurable: !0 }, maxZoom: { configurable: !0 }, minPitch: { configurable: !0 }, maxPitch: { configurable: !0 }, renderWorldCopies: { configurable: !0 }, worldSize: { configurable: !0 }, centerOffset: { configurable: !0 }, size: { configurable: !0 }, bearing: { configurable: !0 }, pitch: { configurable: !0 }, fov: { configurable: !0 }, zoom: { configurable: !0 }, center: { configurable: !0 }, padding: { configurable: !0 }, centerPoint: { configurable: !0 }, unmodified: { configurable: !0 }, point: { configurable: !0 } };
            aa.prototype.clone = function() {
              var Z = new aa(this._minZoom, this._maxZoom, this._minPitch, this.maxPitch, this._renderWorldCopies);
              return Z.tileSize = this.tileSize, Z.latRange = this.latRange, Z.width = this.width, Z.height = this.height, Z._center = this._center, Z.zoom = this.zoom, Z.angle = this.angle, Z._fov = this._fov, Z._pitch = this._pitch, Z._unmodified = this._unmodified, Z._edgeInsets = this._edgeInsets.clone(), Z._calcMatrices(), Z;
            }, Aa.minZoom.get = function() {
              return this._minZoom;
            }, Aa.minZoom.set = function(Z) {
              this._minZoom !== Z && (this._minZoom = Z, this.zoom = Math.max(this.zoom, Z));
            }, Aa.maxZoom.get = function() {
              return this._maxZoom;
            }, Aa.maxZoom.set = function(Z) {
              this._maxZoom !== Z && (this._maxZoom = Z, this.zoom = Math.min(this.zoom, Z));
            }, Aa.minPitch.get = function() {
              return this._minPitch;
            }, Aa.minPitch.set = function(Z) {
              this._minPitch !== Z && (this._minPitch = Z, this.pitch = Math.max(this.pitch, Z));
            }, Aa.maxPitch.get = function() {
              return this._maxPitch;
            }, Aa.maxPitch.set = function(Z) {
              this._maxPitch !== Z && (this._maxPitch = Z, this.pitch = Math.min(this.pitch, Z));
            }, Aa.renderWorldCopies.get = function() {
              return this._renderWorldCopies;
            }, Aa.renderWorldCopies.set = function(Z) {
              Z === void 0 ? Z = !0 : Z === null && (Z = !1), this._renderWorldCopies = Z;
            }, Aa.worldSize.get = function() {
              return this.tileSize * this.scale;
            }, Aa.centerOffset.get = function() {
              return this.centerPoint._sub(this.size._div(2));
            }, Aa.size.get = function() {
              return new i.Point(this.width, this.height);
            }, Aa.bearing.get = function() {
              return -this.angle / Math.PI * 180;
            }, Aa.bearing.set = function(Z) {
              var B = -i.wrap(Z, -180, 180) * Math.PI / 180;
              this.angle !== B && (this._unmodified = !1, this.angle = B, this._calcMatrices(), this.rotationMatrix = i.create$2(), i.rotate(this.rotationMatrix, this.rotationMatrix, this.angle));
            }, Aa.pitch.get = function() {
              return this._pitch / Math.PI * 180;
            }, Aa.pitch.set = function(Z) {
              var B = i.clamp(Z, this.minPitch, this.maxPitch) / 180 * Math.PI;
              this._pitch !== B && (this._unmodified = !1, this._pitch = B, this._calcMatrices());
            }, Aa.fov.get = function() {
              return this._fov / Math.PI * 180;
            }, Aa.fov.set = function(Z) {
              Z = Math.max(0.01, Math.min(60, Z)), this._fov !== Z && (this._unmodified = !1, this._fov = Z / 180 * Math.PI, this._calcMatrices());
            }, Aa.zoom.get = function() {
              return this._zoom;
            }, Aa.zoom.set = function(Z) {
              var B = Math.min(Math.max(Z, this.minZoom), this.maxZoom);
              this._zoom !== B && (this._unmodified = !1, this._zoom = B, this.scale = this.zoomScale(B), this.tileZoom = Math.floor(B), this.zoomFraction = B - this.tileZoom, this._constrain(), this._calcMatrices());
            }, Aa.center.get = function() {
              return this._center;
            }, Aa.center.set = function(Z) {
              Z.lat === this._center.lat && Z.lng === this._center.lng || (this._unmodified = !1, this._center = Z, this._constrain(), this._calcMatrices());
            }, Aa.padding.get = function() {
              return this._edgeInsets.toJSON();
            }, Aa.padding.set = function(Z) {
              this._edgeInsets.equals(Z) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, Z, 1), this._calcMatrices());
            }, Aa.centerPoint.get = function() {
              return this._edgeInsets.getCenter(this.width, this.height);
            }, aa.prototype.isPaddingEqual = function(Z) {
              return this._edgeInsets.equals(Z);
            }, aa.prototype.interpolatePadding = function(Z, B, y) {
              this._unmodified = !1, this._edgeInsets.interpolate(Z, B, y), this._constrain(), this._calcMatrices();
            }, aa.prototype.coveringZoomLevel = function(Z) {
              var B = (Z.roundZoom ? Math.round : Math.floor)(this.zoom + this.scaleZoom(this.tileSize / Z.tileSize));
              return Math.max(0, B);
            }, aa.prototype.getVisibleUnwrappedCoordinates = function(Z) {
              var B = [new i.UnwrappedTileID(0, Z)];
              if (this._renderWorldCopies) for (var y = this.pointCoordinate(new i.Point(0, 0)), b = this.pointCoordinate(new i.Point(this.width, 0)), R = this.pointCoordinate(new i.Point(this.width, this.height)), j = this.pointCoordinate(new i.Point(0, this.height)), G = Math.floor(Math.min(y.x, b.x, R.x, j.x)), ie = Math.floor(Math.max(y.x, b.x, R.x, j.x)), fe = G - 1; fe <= ie + 1; fe++) fe !== 0 && B.push(new i.UnwrappedTileID(fe, Z));
              return B;
            }, aa.prototype.coveringTiles = function(Z) {
              var B = this.coveringZoomLevel(Z), y = B;
              if (Z.minzoom !== void 0 && B < Z.minzoom) return [];
              Z.maxzoom !== void 0 && B > Z.maxzoom && (B = Z.maxzoom);
              var b = i.MercatorCoordinate.fromLngLat(this.center), R = Math.pow(2, B), j = [R * b.x, R * b.y, 0], G = Js.fromInvProjectionMatrix(this.invProjMatrix, this.worldSize, B), ie = Z.minzoom || 0;
              this.pitch <= 60 && this._edgeInsets.top < 0.1 && (ie = B);
              var fe = function(Un) {
                return { aabb: new Ha([Un * R, 0, 0], [(Un + 1) * R, R, 0]), zoom: 0, x: 0, y: 0, wrap: Un, fullyVisible: !1 };
              }, xe = [], Te = [], ze = B, Ve = Z.reparseOverscaled ? y : B;
              if (this._renderWorldCopies) for (var ut = 1; ut <= 3; ut++) xe.push(fe(-ut)), xe.push(fe(ut));
              for (xe.push(fe(0)); xe.length > 0; ) {
                var gt = xe.pop(), wt = gt.x, Et = gt.y, zt = gt.fullyVisible;
                if (!zt) {
                  var It = gt.aabb.intersects(G);
                  if (It === 0) continue;
                  zt = It === 2;
                }
                var jt = gt.aabb.distanceX(j), Lt = gt.aabb.distanceY(j), Zt = Math.max(Math.abs(jt), Math.abs(Lt)), Qt = 3 + (1 << ze - gt.zoom) - 2;
                if (gt.zoom === ze || Zt > Qt && gt.zoom >= ie) Te.push({ tileID: new i.OverscaledTileID(gt.zoom === ze ? Ve : gt.zoom, gt.wrap, gt.zoom, wt, Et), distanceSq: i.sqrLen([j[0] - 0.5 - wt, j[1] - 0.5 - Et]) });
                else for (var Xt = 0; Xt < 4; Xt++) {
                  var yn = (wt << 1) + Xt % 2, Sn = (Et << 1) + (Xt >> 1);
                  xe.push({ aabb: gt.aabb.quadrant(Xt), zoom: gt.zoom + 1, x: yn, y: Sn, wrap: gt.wrap, fullyVisible: zt });
                }
              }
              return Te.sort(function(Un, Vn) {
                return Un.distanceSq - Vn.distanceSq;
              }).map(function(Un) {
                return Un.tileID;
              });
            }, aa.prototype.resize = function(Z, B) {
              this.width = Z, this.height = B, this.pixelsToGLUnits = [2 / Z, -2 / B], this._constrain(), this._calcMatrices();
            }, Aa.unmodified.get = function() {
              return this._unmodified;
            }, aa.prototype.zoomScale = function(Z) {
              return Math.pow(2, Z);
            }, aa.prototype.scaleZoom = function(Z) {
              return Math.log(Z) / Math.LN2;
            }, aa.prototype.project = function(Z) {
              var B = i.clamp(Z.lat, -this.maxValidLatitude, this.maxValidLatitude);
              return new i.Point(i.mercatorXfromLng(Z.lng) * this.worldSize, i.mercatorYfromLat(B) * this.worldSize);
            }, aa.prototype.unproject = function(Z) {
              return new i.MercatorCoordinate(Z.x / this.worldSize, Z.y / this.worldSize).toLngLat();
            }, Aa.point.get = function() {
              return this.project(this.center);
            }, aa.prototype.setLocationAtPoint = function(Z, B) {
              var y = this.pointCoordinate(B), b = this.pointCoordinate(this.centerPoint), R = this.locationCoordinate(Z), j = new i.MercatorCoordinate(R.x - (y.x - b.x), R.y - (y.y - b.y));
              this.center = this.coordinateLocation(j), this._renderWorldCopies && (this.center = this.center.wrap());
            }, aa.prototype.locationPoint = function(Z) {
              return this.coordinatePoint(this.locationCoordinate(Z));
            }, aa.prototype.pointLocation = function(Z) {
              return this.coordinateLocation(this.pointCoordinate(Z));
            }, aa.prototype.locationCoordinate = function(Z) {
              return i.MercatorCoordinate.fromLngLat(Z);
            }, aa.prototype.coordinateLocation = function(Z) {
              return Z.toLngLat();
            }, aa.prototype.pointCoordinate = function(Z) {
              var B = [Z.x, Z.y, 0, 1], y = [Z.x, Z.y, 1, 1];
              i.transformMat4(B, B, this.pixelMatrixInverse), i.transformMat4(y, y, this.pixelMatrixInverse);
              var b = B[3], R = y[3], j = B[0] / b, G = y[0] / R, ie = B[1] / b, fe = y[1] / R, xe = B[2] / b, Te = y[2] / R, ze = xe === Te ? 0 : (0 - xe) / (Te - xe);
              return new i.MercatorCoordinate(i.number(j, G, ze) / this.worldSize, i.number(ie, fe, ze) / this.worldSize);
            }, aa.prototype.coordinatePoint = function(Z) {
              var B = [Z.x * this.worldSize, Z.y * this.worldSize, 0, 1];
              return i.transformMat4(B, B, this.pixelMatrix), new i.Point(B[0] / B[3], B[1] / B[3]);
            }, aa.prototype.getBounds = function() {
              return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0, 0))).extend(this.pointLocation(new i.Point(this.width, 0))).extend(this.pointLocation(new i.Point(this.width, this.height))).extend(this.pointLocation(new i.Point(0, this.height)));
            }, aa.prototype.getMaxBounds = function() {
              return this.latRange && this.latRange.length === 2 && this.lngRange && this.lngRange.length === 2 ? new i.LngLatBounds([this.lngRange[0], this.latRange[0]], [this.lngRange[1], this.latRange[1]]) : null;
            }, aa.prototype.setMaxBounds = function(Z) {
              Z ? (this.lngRange = [Z.getWest(), Z.getEast()], this.latRange = [Z.getSouth(), Z.getNorth()], this._constrain()) : (this.lngRange = null, this.latRange = [-this.maxValidLatitude, this.maxValidLatitude]);
            }, aa.prototype.calculatePosMatrix = function(Z, B) {
              B === void 0 && (B = !1);
              var y = Z.key, b = B ? this._alignedPosMatrixCache : this._posMatrixCache;
              if (b[y]) return b[y];
              var R = Z.canonical, j = this.worldSize / this.zoomScale(R.z), G = R.x + Math.pow(2, R.z) * Z.wrap, ie = i.identity(new Float64Array(16));
              return i.translate(ie, ie, [G * j, R.y * j, 0]), i.scale(ie, ie, [j / i.EXTENT, j / i.EXTENT, 1]), i.multiply(ie, B ? this.alignedProjMatrix : this.projMatrix, ie), b[y] = new Float32Array(ie), b[y];
            }, aa.prototype.customLayerMatrix = function() {
              return this.mercatorMatrix.slice();
            }, aa.prototype._constrain = function() {
              if (this.center && this.width && this.height && !this._constraining) {
                this._constraining = !0;
                var Z, B, y, b, R = -90, j = 90, G = -180, ie = 180, fe = this.size, xe = this._unmodified;
                if (this.latRange) {
                  var Te = this.latRange;
                  R = i.mercatorYfromLat(Te[1]) * this.worldSize, Z = (j = i.mercatorYfromLat(Te[0]) * this.worldSize) - R < fe.y ? fe.y / (j - R) : 0;
                }
                if (this.lngRange) {
                  var ze = this.lngRange;
                  G = i.mercatorXfromLng(ze[0]) * this.worldSize, B = (ie = i.mercatorXfromLng(ze[1]) * this.worldSize) - G < fe.x ? fe.x / (ie - G) : 0;
                }
                var Ve = this.point, ut = Math.max(B || 0, Z || 0);
                if (ut) return this.center = this.unproject(new i.Point(B ? (ie + G) / 2 : Ve.x, Z ? (j + R) / 2 : Ve.y)), this.zoom += this.scaleZoom(ut), this._unmodified = xe, void (this._constraining = !1);
                if (this.latRange) {
                  var gt = Ve.y, wt = fe.y / 2;
                  gt - wt < R && (b = R + wt), gt + wt > j && (b = j - wt);
                }
                if (this.lngRange) {
                  var Et = Ve.x, zt = fe.x / 2;
                  Et - zt < G && (y = G + zt), Et + zt > ie && (y = ie - zt);
                }
                y === void 0 && b === void 0 || (this.center = this.unproject(new i.Point(y !== void 0 ? y : Ve.x, b !== void 0 ? b : Ve.y))), this._unmodified = xe, this._constraining = !1;
              }
            }, aa.prototype._calcMatrices = function() {
              if (this.height) {
                var Z = this._fov / 2, B = this.centerOffset;
                this.cameraToCenterDistance = 0.5 / Math.tan(Z) * this.height;
                var y = Math.PI / 2 + this._pitch, b = this._fov * (0.5 + B.y / this.height), R = Math.sin(b) * this.cameraToCenterDistance / Math.sin(i.clamp(Math.PI - y - b, 0.01, Math.PI - 0.01)), j = this.point, G = j.x, ie = j.y, fe = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * R + this.cameraToCenterDistance), xe = this.height / 50, Te = new Float64Array(16);
                i.perspective(Te, this._fov, this.width / this.height, xe, fe), Te[8] = 2 * -B.x / this.width, Te[9] = 2 * B.y / this.height, i.scale(Te, Te, [1, -1, 1]), i.translate(Te, Te, [0, 0, -this.cameraToCenterDistance]), i.rotateX(Te, Te, this._pitch), i.rotateZ(Te, Te, this.angle), i.translate(Te, Te, [-G, -ie, 0]), this.mercatorMatrix = i.scale([], Te, [this.worldSize, this.worldSize, this.worldSize]), i.scale(Te, Te, [1, 1, i.mercatorZfromAltitude(1, this.center.lat) * this.worldSize, 1]), this.projMatrix = Te, this.invProjMatrix = i.invert([], this.projMatrix);
                var ze = this.width % 2 / 2, Ve = this.height % 2 / 2, ut = Math.cos(this.angle), gt = Math.sin(this.angle), wt = G - Math.round(G) + ut * ze + gt * Ve, Et = ie - Math.round(ie) + ut * Ve + gt * ze, zt = new Float64Array(Te);
                if (i.translate(zt, zt, [wt > 0.5 ? wt - 1 : wt, Et > 0.5 ? Et - 1 : Et, 0]), this.alignedProjMatrix = zt, Te = i.create(), i.scale(Te, Te, [this.width / 2, -this.height / 2, 1]), i.translate(Te, Te, [1, -1, 0]), this.labelPlaneMatrix = Te, Te = i.create(), i.scale(Te, Te, [1, -1, 1]), i.translate(Te, Te, [-1, -1, 0]), i.scale(Te, Te, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = Te, this.pixelMatrix = i.multiply(new Float64Array(16), this.labelPlaneMatrix, this.projMatrix), !(Te = i.invert(new Float64Array(16), this.pixelMatrix))) throw new Error("failed to invert matrix");
                this.pixelMatrixInverse = Te, this._posMatrixCache = {}, this._alignedPosMatrixCache = {};
              }
            }, aa.prototype.maxPitchScaleFactor = function() {
              if (!this.pixelMatrixInverse) return 1;
              var Z = this.pointCoordinate(new i.Point(0, 0)), B = [Z.x * this.worldSize, Z.y * this.worldSize, 0, 1];
              return i.transformMat4(B, B, this.pixelMatrix)[3] / this.cameraToCenterDistance;
            }, aa.prototype.getCameraPoint = function() {
              var Z = this._pitch, B = Math.tan(Z) * (this.cameraToCenterDistance || 1);
              return this.centerPoint.add(new i.Point(0, B));
            }, aa.prototype.getCameraQueryGeometry = function(Z) {
              var B = this.getCameraPoint();
              if (Z.length === 1) return [Z[0], B];
              for (var y = B.x, b = B.y, R = B.x, j = B.y, G = 0, ie = Z; G < ie.length; G += 1) {
                var fe = ie[G];
                y = Math.min(y, fe.x), b = Math.min(b, fe.y), R = Math.max(R, fe.x), j = Math.max(j, fe.y);
              }
              return [new i.Point(y, b), new i.Point(R, b), new i.Point(R, j), new i.Point(y, j), new i.Point(y, b)];
            }, Object.defineProperties(aa.prototype, Aa);
            var yo = function(Z) {
              var B, y, b, R, j;
              this._hashName = Z && encodeURIComponent(Z), i.bindAll(["_getCurrentHash", "_onHashChange", "_updateHash"], this), this._updateHash = (B = this._updateHashUnthrottled.bind(this), y = 300, b = !1, R = null, j = function() {
                R = null, b && (B(), R = setTimeout(j, y), b = !1);
              }, function() {
                return b = !0, R || j(), R;
              });
            };
            yo.prototype.addTo = function(Z) {
              return this._map = Z, i.window.addEventListener("hashchange", this._onHashChange, !1), this._map.on("moveend", this._updateHash), this;
            }, yo.prototype.remove = function() {
              return i.window.removeEventListener("hashchange", this._onHashChange, !1), this._map.off("moveend", this._updateHash), clearTimeout(this._updateHash()), delete this._map, this;
            }, yo.prototype.getHashString = function(Z) {
              var B = this._map.getCenter(), y = Math.round(100 * this._map.getZoom()) / 100, b = Math.ceil((y * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), R = Math.pow(10, b), j = Math.round(B.lng * R) / R, G = Math.round(B.lat * R) / R, ie = this._map.getBearing(), fe = this._map.getPitch(), xe = "";
              if (xe += Z ? "/" + j + "/" + G + "/" + y : y + "/" + G + "/" + j, (ie || fe) && (xe += "/" + Math.round(10 * ie) / 10), fe && (xe += "/" + Math.round(fe)), this._hashName) {
                var Te = this._hashName, ze = !1, Ve = i.window.location.hash.slice(1).split("&").map(function(ut) {
                  var gt = ut.split("=")[0];
                  return gt === Te ? (ze = !0, gt + "=" + xe) : ut;
                }).filter(function(ut) {
                  return ut;
                });
                return ze || Ve.push(Te + "=" + xe), "#" + Ve.join("&");
              }
              return "#" + xe;
            }, yo.prototype._getCurrentHash = function() {
              var Z, B = this, y = i.window.location.hash.replace("#", "");
              return this._hashName ? (y.split("&").map(function(b) {
                return b.split("=");
              }).forEach(function(b) {
                b[0] === B._hashName && (Z = b);
              }), (Z && Z[1] || "").split("/")) : y.split("/");
            }, yo.prototype._onHashChange = function() {
              var Z = this._getCurrentHash();
              if (Z.length >= 3 && !Z.some(function(y) {
                return isNaN(y);
              })) {
                var B = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(Z[3] || 0) : this._map.getBearing();
                return this._map.jumpTo({ center: [+Z[2], +Z[1]], zoom: +Z[0], bearing: B, pitch: +(Z[4] || 0) }), !0;
              }
              return !1;
            }, yo.prototype._updateHashUnthrottled = function() {
              var Z = i.window.location.href.replace(/(#.+)?$/, this.getHashString());
              try {
                i.window.history.replaceState(i.window.history.state, null, Z);
              } catch {
              }
            };
            var Ju = { linearity: 0.3, easing: i.bezier(0, 0, 0.3, 1) }, uc = i.extend({ deceleration: 2500, maxSpeed: 1400 }, Ju), vu = i.extend({ deceleration: 20, maxSpeed: 1400 }, Ju), xu = i.extend({ deceleration: 1e3, maxSpeed: 360 }, Ju), Zo = i.extend({ deceleration: 1e3, maxSpeed: 90 }, Ju), Fo = function(Z) {
              this._map = Z, this.clear();
            };
            function Il(Z, B) {
              (!Z.duration || Z.duration < B.duration) && (Z.duration = B.duration, Z.easing = B.easing);
            }
            function bu(Z, B, y) {
              var b = y.maxSpeed, R = y.linearity, j = y.deceleration, G = i.clamp(Z * R / (B / 1e3), -b, b), ie = Math.abs(G) / (j * R);
              return { easing: y.easing, duration: 1e3 * ie, amount: G * (ie / 2) };
            }
            Fo.prototype.clear = function() {
              this._inertiaBuffer = [];
            }, Fo.prototype.record = function(Z) {
              this._drainInertiaBuffer(), this._inertiaBuffer.push({ time: i.browser.now(), settings: Z });
            }, Fo.prototype._drainInertiaBuffer = function() {
              for (var Z = this._inertiaBuffer, B = i.browser.now(); Z.length > 0 && B - Z[0].time > 160; ) Z.shift();
            }, Fo.prototype._onMoveEnd = function(Z) {
              if (this._drainInertiaBuffer(), !(this._inertiaBuffer.length < 2)) {
                for (var B = { zoom: 0, bearing: 0, pitch: 0, pan: new i.Point(0, 0), pinchAround: void 0, around: void 0 }, y = 0, b = this._inertiaBuffer; y < b.length; y += 1) {
                  var R = b[y].settings;
                  B.zoom += R.zoomDelta || 0, B.bearing += R.bearingDelta || 0, B.pitch += R.pitchDelta || 0, R.panDelta && B.pan._add(R.panDelta), R.around && (B.around = R.around), R.pinchAround && (B.pinchAround = R.pinchAround);
                }
                var j = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, G = {};
                if (B.pan.mag()) {
                  var ie = bu(B.pan.mag(), j, i.extend({}, uc, Z || {}));
                  G.offset = B.pan.mult(ie.amount / B.pan.mag()), G.center = this._map.transform.center, Il(G, ie);
                }
                if (B.zoom) {
                  var fe = bu(B.zoom, j, vu);
                  G.zoom = this._map.transform.zoom + fe.amount, Il(G, fe);
                }
                if (B.bearing) {
                  var xe = bu(B.bearing, j, xu);
                  G.bearing = this._map.transform.bearing + i.clamp(xe.amount, -179, 179), Il(G, xe);
                }
                if (B.pitch) {
                  var Te = bu(B.pitch, j, Zo);
                  G.pitch = this._map.transform.pitch + Te.amount, Il(G, Te);
                }
                if (G.zoom || G.bearing) {
                  var ze = B.pinchAround === void 0 ? B.around : B.pinchAround;
                  G.around = ze ? this._map.unproject(ze) : this._map.getCenter();
                }
                return this.clear(), i.extend(G, { noMoveStart: !0 });
              }
            };
            var Xo = function(Z) {
              function B(b, R, j, G) {
                G === void 0 && (G = {});
                var ie = p.mousePos(R.getCanvasContainer(), j), fe = R.unproject(ie);
                Z.call(this, b, i.extend({ point: ie, lngLat: fe, originalEvent: j }, G)), this._defaultPrevented = !1, this.target = R;
              }
              Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B;
              var y = { defaultPrevented: { configurable: !0 } };
              return B.prototype.preventDefault = function() {
                this._defaultPrevented = !0;
              }, y.defaultPrevented.get = function() {
                return this._defaultPrevented;
              }, Object.defineProperties(B.prototype, y), B;
            }(i.Event), Ra = function(Z) {
              function B(b, R, j) {
                var G = b === "touchend" ? j.changedTouches : j.touches, ie = p.touchPos(R.getCanvasContainer(), G), fe = ie.map(function(ze) {
                  return R.unproject(ze);
                }), xe = ie.reduce(function(ze, Ve, ut, gt) {
                  return ze.add(Ve.div(gt.length));
                }, new i.Point(0, 0)), Te = R.unproject(xe);
                Z.call(this, b, { points: ie, point: xe, lngLats: fe, lngLat: Te, originalEvent: j }), this._defaultPrevented = !1;
              }
              Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B;
              var y = { defaultPrevented: { configurable: !0 } };
              return B.prototype.preventDefault = function() {
                this._defaultPrevented = !0;
              }, y.defaultPrevented.get = function() {
                return this._defaultPrevented;
              }, Object.defineProperties(B.prototype, y), B;
            }(i.Event), No = function(Z) {
              function B(b, R, j) {
                Z.call(this, b, { originalEvent: j }), this._defaultPrevented = !1;
              }
              Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B;
              var y = { defaultPrevented: { configurable: !0 } };
              return B.prototype.preventDefault = function() {
                this._defaultPrevented = !0;
              }, y.defaultPrevented.get = function() {
                return this._defaultPrevented;
              }, Object.defineProperties(B.prototype, y), B;
            }(i.Event), Sa = function(Z, B) {
              this._map = Z, this._clickTolerance = B.clickTolerance;
            };
            Sa.prototype.reset = function() {
              delete this._mousedownPos;
            }, Sa.prototype.wheel = function(Z) {
              return this._firePreventable(new No(Z.type, this._map, Z));
            }, Sa.prototype.mousedown = function(Z, B) {
              return this._mousedownPos = B, this._firePreventable(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.mouseup = function(Z) {
              this._map.fire(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.click = function(Z, B) {
              this._mousedownPos && this._mousedownPos.dist(B) >= this._clickTolerance || this._map.fire(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.dblclick = function(Z) {
              return this._firePreventable(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.mouseover = function(Z) {
              this._map.fire(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.mouseout = function(Z) {
              this._map.fire(new Xo(Z.type, this._map, Z));
            }, Sa.prototype.touchstart = function(Z) {
              return this._firePreventable(new Ra(Z.type, this._map, Z));
            }, Sa.prototype.touchmove = function(Z) {
              this._map.fire(new Ra(Z.type, this._map, Z));
            }, Sa.prototype.touchend = function(Z) {
              this._map.fire(new Ra(Z.type, this._map, Z));
            }, Sa.prototype.touchcancel = function(Z) {
              this._map.fire(new Ra(Z.type, this._map, Z));
            }, Sa.prototype._firePreventable = function(Z) {
              if (this._map.fire(Z), Z.defaultPrevented) return {};
            }, Sa.prototype.isEnabled = function() {
              return !0;
            }, Sa.prototype.isActive = function() {
              return !1;
            }, Sa.prototype.enable = function() {
            }, Sa.prototype.disable = function() {
            };
            var Bo = function(Z) {
              this._map = Z;
            };
            Bo.prototype.reset = function() {
              this._delayContextMenu = !1, delete this._contextMenuEvent;
            }, Bo.prototype.mousemove = function(Z) {
              this._map.fire(new Xo(Z.type, this._map, Z));
            }, Bo.prototype.mousedown = function() {
              this._delayContextMenu = !0;
            }, Bo.prototype.mouseup = function() {
              this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Xo("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent);
            }, Bo.prototype.contextmenu = function(Z) {
              this._delayContextMenu ? this._contextMenuEvent = Z : this._map.fire(new Xo(Z.type, this._map, Z)), this._map.listens("contextmenu") && Z.preventDefault();
            }, Bo.prototype.isEnabled = function() {
              return !0;
            }, Bo.prototype.isActive = function() {
              return !1;
            }, Bo.prototype.enable = function() {
            }, Bo.prototype.disable = function() {
            };
            var _a = function(Z, B) {
              this._map = Z, this._el = Z.getCanvasContainer(), this._container = Z.getContainer(), this._clickTolerance = B.clickTolerance || 1;
            };
            function Do(Z, B) {
              for (var y = {}, b = 0; b < Z.length; b++) y[Z[b].identifier] = B[b];
              return y;
            }
            _a.prototype.isEnabled = function() {
              return !!this._enabled;
            }, _a.prototype.isActive = function() {
              return !!this._active;
            }, _a.prototype.enable = function() {
              this.isEnabled() || (this._enabled = !0);
            }, _a.prototype.disable = function() {
              this.isEnabled() && (this._enabled = !1);
            }, _a.prototype.mousedown = function(Z, B) {
              this.isEnabled() && Z.shiftKey && Z.button === 0 && (p.disableDrag(), this._startPos = this._lastPos = B, this._active = !0);
            }, _a.prototype.mousemoveWindow = function(Z, B) {
              if (this._active) {
                var y = B;
                if (!(this._lastPos.equals(y) || !this._box && y.dist(this._startPos) < this._clickTolerance)) {
                  var b = this._startPos;
                  this._lastPos = y, this._box || (this._box = p.create("div", "mapboxgl-boxzoom", this._container), this._container.classList.add("mapboxgl-crosshair"), this._fireEvent("boxzoomstart", Z));
                  var R = Math.min(b.x, y.x), j = Math.max(b.x, y.x), G = Math.min(b.y, y.y), ie = Math.max(b.y, y.y);
                  p.setTransform(this._box, "translate(" + R + "px," + G + "px)"), this._box.style.width = j - R + "px", this._box.style.height = ie - G + "px";
                }
              }
            }, _a.prototype.mouseupWindow = function(Z, B) {
              var y = this;
              if (this._active && Z.button === 0) {
                var b = this._startPos, R = B;
                if (this.reset(), p.suppressClick(), b.x !== R.x || b.y !== R.y) return this._map.fire(new i.Event("boxzoomend", { originalEvent: Z })), { cameraAnimation: function(j) {
                  return j.fitScreenCoordinates(b, R, y._map.getBearing(), { linear: !0 });
                } };
                this._fireEvent("boxzoomcancel", Z);
              }
            }, _a.prototype.keydown = function(Z) {
              this._active && Z.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", Z));
            }, _a.prototype.reset = function() {
              this._active = !1, this._container.classList.remove("mapboxgl-crosshair"), this._box && (p.remove(this._box), this._box = null), p.enableDrag(), delete this._startPos, delete this._lastPos;
            }, _a.prototype._fireEvent = function(Z, B) {
              return this._map.fire(new i.Event(Z, { originalEvent: B }));
            };
            var jo = function(Z) {
              this.reset(), this.numTouches = Z.numTouches;
            };
            jo.prototype.reset = function() {
              delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1;
            }, jo.prototype.touchstart = function(Z, B, y) {
              (this.centroid || y.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = Z.timeStamp), y.length === this.numTouches && (this.centroid = function(b) {
                for (var R = new i.Point(0, 0), j = 0, G = b; j < G.length; j += 1) {
                  var ie = G[j];
                  R._add(ie);
                }
                return R.div(b.length);
              }(B), this.touches = Do(y, B)));
            }, jo.prototype.touchmove = function(Z, B, y) {
              if (!this.aborted && this.centroid) {
                var b = Do(y, B);
                for (var R in this.touches) {
                  var j = this.touches[R], G = b[R];
                  (!G || G.dist(j) > 30) && (this.aborted = !0);
                }
              }
            }, jo.prototype.touchend = function(Z, B, y) {
              if ((!this.centroid || Z.timeStamp - this.startTime > 500) && (this.aborted = !0), y.length === 0) {
                var b = !this.aborted && this.centroid;
                if (this.reset(), b) return b;
              }
            };
            var Dl = function(Z) {
              this.singleTap = new jo(Z), this.numTaps = Z.numTaps, this.reset();
            };
            Dl.prototype.reset = function() {
              this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset();
            }, Dl.prototype.touchstart = function(Z, B, y) {
              this.singleTap.touchstart(Z, B, y);
            }, Dl.prototype.touchmove = function(Z, B, y) {
              this.singleTap.touchmove(Z, B, y);
            }, Dl.prototype.touchend = function(Z, B, y) {
              var b = this.singleTap.touchend(Z, B, y);
              if (b) {
                var R = Z.timeStamp - this.lastTime < 500, j = !this.lastTap || this.lastTap.dist(b) < 30;
                if (R && j || this.reset(), this.count++, this.lastTime = Z.timeStamp, this.lastTap = b, this.count === this.numTaps) return this.reset(), b;
              }
            };
            var Uo = function() {
              this._zoomIn = new Dl({ numTouches: 1, numTaps: 2 }), this._zoomOut = new Dl({ numTouches: 2, numTaps: 1 }), this.reset();
            };
            Uo.prototype.reset = function() {
              this._active = !1, this._zoomIn.reset(), this._zoomOut.reset();
            }, Uo.prototype.touchstart = function(Z, B, y) {
              this._zoomIn.touchstart(Z, B, y), this._zoomOut.touchstart(Z, B, y);
            }, Uo.prototype.touchmove = function(Z, B, y) {
              this._zoomIn.touchmove(Z, B, y), this._zoomOut.touchmove(Z, B, y);
            }, Uo.prototype.touchend = function(Z, B, y) {
              var b = this, R = this._zoomIn.touchend(Z, B, y), j = this._zoomOut.touchend(Z, B, y);
              return R ? (this._active = !0, Z.preventDefault(), setTimeout(function() {
                return b.reset();
              }, 0), { cameraAnimation: function(G) {
                return G.easeTo({ duration: 300, zoom: G.getZoom() + 1, around: G.unproject(R) }, { originalEvent: Z });
              } }) : j ? (this._active = !0, Z.preventDefault(), setTimeout(function() {
                return b.reset();
              }, 0), { cameraAnimation: function(G) {
                return G.easeTo({ duration: 300, zoom: G.getZoom() - 1, around: G.unproject(j) }, { originalEvent: Z });
              } }) : void 0;
            }, Uo.prototype.touchcancel = function() {
              this.reset();
            }, Uo.prototype.enable = function() {
              this._enabled = !0;
            }, Uo.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, Uo.prototype.isEnabled = function() {
              return this._enabled;
            }, Uo.prototype.isActive = function() {
              return this._active;
            };
            var Qs = {};
            Qs[0] = 1, Qs[2] = 2;
            var os = function(Z) {
              this.reset(), this._clickTolerance = Z.clickTolerance || 1;
            };
            os.prototype.reset = function() {
              this._active = !1, this._moved = !1, delete this._lastPoint, delete this._eventButton;
            }, os.prototype._correctButton = function(Z, B) {
              return !1;
            }, os.prototype._move = function(Z, B) {
              return {};
            }, os.prototype.mousedown = function(Z, B) {
              if (!this._lastPoint) {
                var y = p.mouseButton(Z);
                this._correctButton(Z, y) && (this._lastPoint = B, this._eventButton = y);
              }
            }, os.prototype.mousemoveWindow = function(Z, B) {
              var y = this._lastPoint;
              if (y) {
                if (Z.preventDefault(), function(b, R) {
                  var j = Qs[R];
                  return b.buttons === void 0 || (b.buttons & j) !== j;
                }(Z, this._eventButton)) this.reset();
                else if (this._moved || !(B.dist(y) < this._clickTolerance)) return this._moved = !0, this._lastPoint = B, this._move(y, B);
              }
            }, os.prototype.mouseupWindow = function(Z) {
              this._lastPoint && p.mouseButton(Z) === this._eventButton && (this._moved && p.suppressClick(), this.reset());
            }, os.prototype.enable = function() {
              this._enabled = !0;
            }, os.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, os.prototype.isEnabled = function() {
              return this._enabled;
            }, os.prototype.isActive = function() {
              return this._active;
            };
            var Bu = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.mousedown = function(y, b) {
                Z.prototype.mousedown.call(this, y, b), this._lastPoint && (this._active = !0);
              }, B.prototype._correctButton = function(y, b) {
                return b === 0 && !y.ctrlKey;
              }, B.prototype._move = function(y, b) {
                return { around: b, panDelta: b.sub(y) };
              }, B;
            }(os), Ll = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype._correctButton = function(y, b) {
                return b === 0 && y.ctrlKey || b === 2;
              }, B.prototype._move = function(y, b) {
                var R = 0.8 * (b.x - y.x);
                if (R) return this._active = !0, { bearingDelta: R };
              }, B.prototype.contextmenu = function(y) {
                y.preventDefault();
              }, B;
            }(os), Pl = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype._correctButton = function(y, b) {
                return b === 0 && y.ctrlKey || b === 2;
              }, B.prototype._move = function(y, b) {
                var R = -0.5 * (b.y - y.y);
                if (R) return this._active = !0, { pitchDelta: R };
              }, B.prototype.contextmenu = function(y) {
                y.preventDefault();
              }, B;
            }(os), Lo = function(Z) {
              this._minTouches = 1, this._clickTolerance = Z.clickTolerance || 1, this.reset();
            };
            Lo.prototype.reset = function() {
              this._active = !1, this._touches = {}, this._sum = new i.Point(0, 0);
            }, Lo.prototype.touchstart = function(Z, B, y) {
              return this._calculateTransform(Z, B, y);
            }, Lo.prototype.touchmove = function(Z, B, y) {
              if (this._active && !(y.length < this._minTouches)) return Z.preventDefault(), this._calculateTransform(Z, B, y);
            }, Lo.prototype.touchend = function(Z, B, y) {
              this._calculateTransform(Z, B, y), this._active && y.length < this._minTouches && this.reset();
            }, Lo.prototype.touchcancel = function() {
              this.reset();
            }, Lo.prototype._calculateTransform = function(Z, B, y) {
              y.length > 0 && (this._active = !0);
              var b = Do(y, B), R = new i.Point(0, 0), j = new i.Point(0, 0), G = 0;
              for (var ie in b) {
                var fe = b[ie], xe = this._touches[ie];
                xe && (R._add(fe), j._add(fe.sub(xe)), G++, b[ie] = fe);
              }
              if (this._touches = b, !(G < this._minTouches) && j.mag()) {
                var Te = j.div(G);
                if (this._sum._add(Te), !(this._sum.mag() < this._clickTolerance)) return { around: R.div(G), panDelta: Te };
              }
            }, Lo.prototype.enable = function() {
              this._enabled = !0;
            }, Lo.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, Lo.prototype.isEnabled = function() {
              return this._enabled;
            }, Lo.prototype.isActive = function() {
              return this._active;
            };
            var Ca = function() {
              this.reset();
            };
            function Ol(Z, B, y) {
              for (var b = 0; b < Z.length; b++) if (Z[b].identifier === y) return B[b];
            }
            Ca.prototype.reset = function() {
              this._active = !1, delete this._firstTwoTouches;
            }, Ca.prototype._start = function(Z) {
            }, Ca.prototype._move = function(Z, B, y) {
              return {};
            }, Ca.prototype.touchstart = function(Z, B, y) {
              this._firstTwoTouches || y.length < 2 || (this._firstTwoTouches = [y[0].identifier, y[1].identifier], this._start([B[0], B[1]]));
            }, Ca.prototype.touchmove = function(Z, B, y) {
              if (this._firstTwoTouches) {
                Z.preventDefault();
                var b = this._firstTwoTouches, R = b[0], j = b[1], G = Ol(y, B, R), ie = Ol(y, B, j);
                if (G && ie) {
                  var fe = this._aroundCenter ? null : G.add(ie).div(2);
                  return this._move([G, ie], fe, Z);
                }
              }
            }, Ca.prototype.touchend = function(Z, B, y) {
              if (this._firstTwoTouches) {
                var b = this._firstTwoTouches, R = b[0], j = b[1], G = Ol(y, B, R), ie = Ol(y, B, j);
                G && ie || (this._active && p.suppressClick(), this.reset());
              }
            }, Ca.prototype.touchcancel = function() {
              this.reset();
            }, Ca.prototype.enable = function(Z) {
              this._enabled = !0, this._aroundCenter = !!Z && Z.around === "center";
            }, Ca.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, Ca.prototype.isEnabled = function() {
              return this._enabled;
            }, Ca.prototype.isActive = function() {
              return this._active;
            };
            function xi(Z, B) {
              return Math.log(Z / B) / Math.LN2;
            }
            var cc = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.reset = function() {
                Z.prototype.reset.call(this), delete this._distance, delete this._startDistance;
              }, B.prototype._start = function(y) {
                this._startDistance = this._distance = y[0].dist(y[1]);
              }, B.prototype._move = function(y, b) {
                var R = this._distance;
                if (this._distance = y[0].dist(y[1]), this._active || !(Math.abs(xi(this._distance, this._startDistance)) < 0.1)) return this._active = !0, { zoomDelta: xi(this._distance, R), pinchAround: b };
              }, B;
            }(Ca);
            function Dc(Z, B) {
              return 180 * Z.angleWith(B) / Math.PI;
            }
            var xl = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.reset = function() {
                Z.prototype.reset.call(this), delete this._minDiameter, delete this._startVector, delete this._vector;
              }, B.prototype._start = function(y) {
                this._startVector = this._vector = y[0].sub(y[1]), this._minDiameter = y[0].dist(y[1]);
              }, B.prototype._move = function(y, b) {
                var R = this._vector;
                if (this._vector = y[0].sub(y[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, { bearingDelta: Dc(this._vector, R), pinchAround: b };
              }, B.prototype._isBelowThreshold = function(y) {
                this._minDiameter = Math.min(this._minDiameter, y.mag());
                var b = 25 / (Math.PI * this._minDiameter) * 360, R = Dc(y, this._startVector);
                return Math.abs(R) < b;
              }, B;
            }(Ca);
            function zl(Z) {
              return Math.abs(Z.y) > Math.abs(Z.x);
            }
            var Rl = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.reset = function() {
                Z.prototype.reset.call(this), this._valid = void 0, delete this._firstMove, delete this._lastPoints;
              }, B.prototype._start = function(y) {
                this._lastPoints = y, zl(y[0].sub(y[1])) && (this._valid = !1);
              }, B.prototype._move = function(y, b, R) {
                var j = y[0].sub(this._lastPoints[0]), G = y[1].sub(this._lastPoints[1]);
                if (this._valid = this.gestureBeginsVertically(j, G, R.timeStamp), this._valid) return this._lastPoints = y, this._active = !0, { pitchDelta: (j.y + G.y) / 2 * -0.5 };
              }, B.prototype.gestureBeginsVertically = function(y, b, R) {
                if (this._valid !== void 0) return this._valid;
                var j = y.mag() >= 2, G = b.mag() >= 2;
                if (j || G) {
                  if (!j || !G) return this._firstMove === void 0 && (this._firstMove = R), R - this._firstMove < 100 && void 0;
                  var ie = y.y > 0 == b.y > 0;
                  return zl(y) && zl(b) && ie;
                }
              }, B;
            }(Ca), ju = { panStep: 100, bearingStep: 15, pitchStep: 10 }, ti = function() {
              var Z = ju;
              this._panStep = Z.panStep, this._bearingStep = Z.bearingStep, this._pitchStep = Z.pitchStep, this._rotationDisabled = !1;
            };
            function js(Z) {
              return Z * (2 - Z);
            }
            ti.prototype.reset = function() {
              this._active = !1;
            }, ti.prototype.keydown = function(Z) {
              var B = this;
              if (!(Z.altKey || Z.ctrlKey || Z.metaKey)) {
                var y = 0, b = 0, R = 0, j = 0, G = 0;
                switch (Z.keyCode) {
                  case 61:
                  case 107:
                  case 171:
                  case 187:
                    y = 1;
                    break;
                  case 189:
                  case 109:
                  case 173:
                    y = -1;
                    break;
                  case 37:
                    Z.shiftKey ? b = -1 : (Z.preventDefault(), j = -1);
                    break;
                  case 39:
                    Z.shiftKey ? b = 1 : (Z.preventDefault(), j = 1);
                    break;
                  case 38:
                    Z.shiftKey ? R = 1 : (Z.preventDefault(), G = -1);
                    break;
                  case 40:
                    Z.shiftKey ? R = -1 : (Z.preventDefault(), G = 1);
                    break;
                  default:
                    return;
                }
                return this._rotationDisabled && (b = 0, R = 0), { cameraAnimation: function(ie) {
                  var fe = ie.getZoom();
                  ie.easeTo({ duration: 300, easeId: "keyboardHandler", easing: js, zoom: y ? Math.round(fe) + y * (Z.shiftKey ? 2 : 1) : fe, bearing: ie.getBearing() + b * B._bearingStep, pitch: ie.getPitch() + R * B._pitchStep, offset: [-j * B._panStep, -G * B._panStep], center: ie.getCenter() }, { originalEvent: Z });
                } };
              }
            }, ti.prototype.enable = function() {
              this._enabled = !0;
            }, ti.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, ti.prototype.isEnabled = function() {
              return this._enabled;
            }, ti.prototype.isActive = function() {
              return this._active;
            }, ti.prototype.disableRotation = function() {
              this._rotationDisabled = !0;
            }, ti.prototype.enableRotation = function() {
              this._rotationDisabled = !1;
            };
            var Fl = 4.000244140625, Fa = function(Z, B) {
              this._map = Z, this._el = Z.getCanvasContainer(), this._handler = B, this._delta = 0, this._defaultZoomRate = 0.01, this._wheelZoomRate = 0.0022222222222222222, i.bindAll(["_onTimeout"], this);
            };
            Fa.prototype.setZoomRate = function(Z) {
              this._defaultZoomRate = Z;
            }, Fa.prototype.setWheelZoomRate = function(Z) {
              this._wheelZoomRate = Z;
            }, Fa.prototype.isEnabled = function() {
              return !!this._enabled;
            }, Fa.prototype.isActive = function() {
              return !!this._active || this._finishTimeout !== void 0;
            }, Fa.prototype.isZooming = function() {
              return !!this._zooming;
            }, Fa.prototype.enable = function(Z) {
              this.isEnabled() || (this._enabled = !0, this._aroundCenter = Z && Z.around === "center");
            }, Fa.prototype.disable = function() {
              this.isEnabled() && (this._enabled = !1);
            }, Fa.prototype.wheel = function(Z) {
              if (this.isEnabled()) {
                var B = Z.deltaMode === i.window.WheelEvent.DOM_DELTA_LINE ? 40 * Z.deltaY : Z.deltaY, y = i.browser.now(), b = y - (this._lastWheelEventTime || 0);
                this._lastWheelEventTime = y, B !== 0 && B % Fl == 0 ? this._type = "wheel" : B !== 0 && Math.abs(B) < 4 ? this._type = "trackpad" : b > 400 ? (this._type = null, this._lastValue = B, this._timeout = setTimeout(this._onTimeout, 40, Z)) : this._type || (this._type = Math.abs(b * B) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, B += this._lastValue)), Z.shiftKey && B && (B /= 4), this._type && (this._lastWheelEvent = Z, this._delta -= B, this._active || this._start(Z)), Z.preventDefault();
              }
            }, Fa.prototype._onTimeout = function(Z) {
              this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(Z);
            }, Fa.prototype._start = function(Z) {
              if (this._delta) {
                this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
                var B = p.mousePos(this._el, Z);
                this._around = i.LngLat.convert(this._aroundCenter ? this._map.getCenter() : this._map.unproject(B)), this._aroundPoint = this._map.transform.locationPoint(this._around), this._frameId || (this._frameId = !0, this._handler._triggerRenderFrame());
              }
            }, Fa.prototype.renderFrame = function() {
              var Z = this;
              if (this._frameId && (this._frameId = null, this.isActive())) {
                var B = this._map.transform;
                if (this._delta !== 0) {
                  var y = this._type === "wheel" && Math.abs(this._delta) > Fl ? this._wheelZoomRate : this._defaultZoomRate, b = 2 / (1 + Math.exp(-Math.abs(this._delta * y)));
                  this._delta < 0 && b !== 0 && (b = 1 / b);
                  var R = typeof this._targetZoom == "number" ? B.zoomScale(this._targetZoom) : B.scale;
                  this._targetZoom = Math.min(B.maxZoom, Math.max(B.minZoom, B.scaleZoom(R * b))), this._type === "wheel" && (this._startZoom = B.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
                }
                var j, G = typeof this._targetZoom == "number" ? this._targetZoom : B.zoom, ie = this._startZoom, fe = this._easing, xe = !1;
                if (this._type === "wheel" && ie && fe) {
                  var Te = Math.min((i.browser.now() - this._lastWheelEventTime) / 200, 1), ze = fe(Te);
                  j = i.number(ie, G, ze), Te < 1 ? this._frameId || (this._frameId = !0) : xe = !0;
                } else j = G, xe = !0;
                return this._active = !0, xe && (this._active = !1, this._finishTimeout = setTimeout(function() {
                  Z._zooming = !1, Z._handler._triggerRenderFrame(), delete Z._targetZoom, delete Z._finishTimeout;
                }, 200)), { noInertia: !0, needsRenderFrame: !xe, zoomDelta: j - B.zoom, around: this._aroundPoint, originalEvent: this._lastWheelEvent };
              }
            }, Fa.prototype._smoothOutEasing = function(Z) {
              var B = i.ease;
              if (this._prevEase) {
                var y = this._prevEase, b = (i.browser.now() - y.start) / y.duration, R = y.easing(b + 0.01) - y.easing(b), j = 0.27 / Math.sqrt(R * R + 1e-4) * 0.01, G = Math.sqrt(0.0729 - j * j);
                B = i.bezier(j, G, 0.25, 1);
              }
              return this._prevEase = { start: i.browser.now(), duration: Z, easing: B }, B;
            }, Fa.prototype.reset = function() {
              this._active = !1;
            };
            var Us = function(Z, B) {
              this._clickZoom = Z, this._tapZoom = B;
            };
            Us.prototype.enable = function() {
              this._clickZoom.enable(), this._tapZoom.enable();
            }, Us.prototype.disable = function() {
              this._clickZoom.disable(), this._tapZoom.disable();
            }, Us.prototype.isEnabled = function() {
              return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();
            }, Us.prototype.isActive = function() {
              return this._clickZoom.isActive() || this._tapZoom.isActive();
            };
            var ss = function() {
              this.reset();
            };
            ss.prototype.reset = function() {
              this._active = !1;
            }, ss.prototype.dblclick = function(Z, B) {
              return Z.preventDefault(), { cameraAnimation: function(y) {
                y.easeTo({ duration: 300, zoom: y.getZoom() + (Z.shiftKey ? -1 : 1), around: y.unproject(B) }, { originalEvent: Z });
              } };
            }, ss.prototype.enable = function() {
              this._enabled = !0;
            }, ss.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, ss.prototype.isEnabled = function() {
              return this._enabled;
            }, ss.prototype.isActive = function() {
              return this._active;
            };
            var el = function() {
              this._tap = new Dl({ numTouches: 1, numTaps: 1 }), this.reset();
            };
            el.prototype.reset = function() {
              this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, this._tap.reset();
            }, el.prototype.touchstart = function(Z, B, y) {
              this._swipePoint || (this._tapTime && Z.timeStamp - this._tapTime > 500 && this.reset(), this._tapTime ? y.length > 0 && (this._swipePoint = B[0], this._swipeTouch = y[0].identifier) : this._tap.touchstart(Z, B, y));
            }, el.prototype.touchmove = function(Z, B, y) {
              if (this._tapTime) {
                if (this._swipePoint) {
                  if (y[0].identifier !== this._swipeTouch) return;
                  var b = B[0], R = b.y - this._swipePoint.y;
                  return this._swipePoint = b, Z.preventDefault(), this._active = !0, { zoomDelta: R / 128 };
                }
              } else this._tap.touchmove(Z, B, y);
            }, el.prototype.touchend = function(Z, B, y) {
              this._tapTime ? this._swipePoint && y.length === 0 && this.reset() : this._tap.touchend(Z, B, y) && (this._tapTime = Z.timeStamp);
            }, el.prototype.touchcancel = function() {
              this.reset();
            }, el.prototype.enable = function() {
              this._enabled = !0;
            }, el.prototype.disable = function() {
              this._enabled = !1, this.reset();
            }, el.prototype.isEnabled = function() {
              return this._enabled;
            }, el.prototype.isActive = function() {
              return this._active;
            };
            var ks = function(Z, B, y) {
              this._el = Z, this._mousePan = B, this._touchPan = y;
            };
            ks.prototype.enable = function(Z) {
              this._inertiaOptions = Z || {}, this._mousePan.enable(), this._touchPan.enable(), this._el.classList.add("mapboxgl-touch-drag-pan");
            }, ks.prototype.disable = function() {
              this._mousePan.disable(), this._touchPan.disable(), this._el.classList.remove("mapboxgl-touch-drag-pan");
            }, ks.prototype.isEnabled = function() {
              return this._mousePan.isEnabled() && this._touchPan.isEnabled();
            }, ks.prototype.isActive = function() {
              return this._mousePan.isActive() || this._touchPan.isActive();
            };
            var iu = function(Z, B, y) {
              this._pitchWithRotate = Z.pitchWithRotate, this._mouseRotate = B, this._mousePitch = y;
            };
            iu.prototype.enable = function() {
              this._mouseRotate.enable(), this._pitchWithRotate && this._mousePitch.enable();
            }, iu.prototype.disable = function() {
              this._mouseRotate.disable(), this._mousePitch.disable();
            }, iu.prototype.isEnabled = function() {
              return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled());
            }, iu.prototype.isActive = function() {
              return this._mouseRotate.isActive() || this._mousePitch.isActive();
            };
            var tl = function(Z, B, y, b) {
              this._el = Z, this._touchZoom = B, this._touchRotate = y, this._tapDragZoom = b, this._rotationDisabled = !1, this._enabled = !0;
            };
            tl.prototype.enable = function(Z) {
              this._touchZoom.enable(Z), this._rotationDisabled || this._touchRotate.enable(Z), this._tapDragZoom.enable(), this._el.classList.add("mapboxgl-touch-zoom-rotate");
            }, tl.prototype.disable = function() {
              this._touchZoom.disable(), this._touchRotate.disable(), this._tapDragZoom.disable(), this._el.classList.remove("mapboxgl-touch-zoom-rotate");
            }, tl.prototype.isEnabled = function() {
              return this._touchZoom.isEnabled() && (this._rotationDisabled || this._touchRotate.isEnabled()) && this._tapDragZoom.isEnabled();
            }, tl.prototype.isActive = function() {
              return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();
            }, tl.prototype.disableRotation = function() {
              this._rotationDisabled = !0, this._touchRotate.disable();
            }, tl.prototype.enableRotation = function() {
              this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable();
            };
            var Os = function(Z) {
              return Z.zoom || Z.drag || Z.pitch || Z.rotate;
            }, Vs = function(Z) {
              function B() {
                Z.apply(this, arguments);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B;
            }(i.Event);
            function di(Z) {
              return Z.panDelta && Z.panDelta.mag() || Z.zoomDelta || Z.bearingDelta || Z.pitchDelta;
            }
            var xa = function(Z, B) {
              this._map = Z, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new Fo(Z), this._bearingSnap = B.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(B), i.bindAll(["handleEvent", "handleWindowEvent"], this);
              var y = this._el;
              this._listeners = [[y, "touchstart", { passive: !0 }], [y, "touchmove", { passive: !1 }], [y, "touchend", void 0], [y, "touchcancel", void 0], [y, "mousedown", void 0], [y, "mousemove", void 0], [y, "mouseup", void 0], [i.window.document, "mousemove", { capture: !0 }], [i.window.document, "mouseup", void 0], [y, "mouseover", void 0], [y, "mouseout", void 0], [y, "dblclick", void 0], [y, "click", void 0], [y, "keydown", { capture: !1 }], [y, "keyup", void 0], [y, "wheel", { passive: !1 }], [y, "contextmenu", void 0], [i.window, "blur", void 0]];
              for (var b = 0, R = this._listeners; b < R.length; b += 1) {
                var j = R[b], G = j[0], ie = j[1], fe = j[2];
                p.addEventListener(G, ie, G === i.window.document ? this.handleWindowEvent : this.handleEvent, fe);
              }
            };
            xa.prototype.destroy = function() {
              for (var Z = 0, B = this._listeners; Z < B.length; Z += 1) {
                var y = B[Z], b = y[0], R = y[1], j = y[2];
                p.removeEventListener(b, R, b === i.window.document ? this.handleWindowEvent : this.handleEvent, j);
              }
            }, xa.prototype._addDefaultHandlers = function(Z) {
              var B = this._map, y = B.getCanvasContainer();
              this._add("mapEvent", new Sa(B, Z));
              var b = B.boxZoom = new _a(B, Z);
              this._add("boxZoom", b);
              var R = new Uo(), j = new ss();
              B.doubleClickZoom = new Us(j, R), this._add("tapZoom", R), this._add("clickZoom", j);
              var G = new el();
              this._add("tapDragZoom", G);
              var ie = B.touchPitch = new Rl();
              this._add("touchPitch", ie);
              var fe = new Ll(Z), xe = new Pl(Z);
              B.dragRotate = new iu(Z, fe, xe), this._add("mouseRotate", fe, ["mousePitch"]), this._add("mousePitch", xe, ["mouseRotate"]);
              var Te = new Bu(Z), ze = new Lo(Z);
              B.dragPan = new ks(y, Te, ze), this._add("mousePan", Te), this._add("touchPan", ze, ["touchZoom", "touchRotate"]);
              var Ve = new xl(), ut = new cc();
              B.touchZoomRotate = new tl(y, ut, Ve, G), this._add("touchRotate", Ve, ["touchPan", "touchZoom"]), this._add("touchZoom", ut, ["touchPan", "touchRotate"]);
              var gt = B.scrollZoom = new Fa(B, this);
              this._add("scrollZoom", gt, ["mousePan"]);
              var wt = B.keyboard = new ti();
              this._add("keyboard", wt), this._add("blockableMapEvent", new Bo(B));
              for (var Et = 0, zt = ["boxZoom", "doubleClickZoom", "tapDragZoom", "touchPitch", "dragRotate", "dragPan", "touchZoomRotate", "scrollZoom", "keyboard"]; Et < zt.length; Et += 1) {
                var It = zt[Et];
                Z.interactive && Z[It] && B[It].enable(Z[It]);
              }
            }, xa.prototype._add = function(Z, B, y) {
              this._handlers.push({ handlerName: Z, handler: B, allowed: y }), this._handlersById[Z] = B;
            }, xa.prototype.stop = function(Z) {
              if (!this._updatingCamera) {
                for (var B = 0, y = this._handlers; B < y.length; B += 1) y[B].handler.reset();
                this._inertia.clear(), this._fireEvents({}, {}, Z), this._changes = [];
              }
            }, xa.prototype.isActive = function() {
              for (var Z = 0, B = this._handlers; Z < B.length; Z += 1) if (B[Z].handler.isActive()) return !0;
              return !1;
            }, xa.prototype.isZooming = function() {
              return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();
            }, xa.prototype.isRotating = function() {
              return !!this._eventsInProgress.rotate;
            }, xa.prototype.isMoving = function() {
              return !!Os(this._eventsInProgress) || this.isZooming();
            }, xa.prototype._blockedByActive = function(Z, B, y) {
              for (var b in Z) if (b !== y && (!B || B.indexOf(b) < 0)) return !0;
              return !1;
            }, xa.prototype.handleWindowEvent = function(Z) {
              this.handleEvent(Z, Z.type + "Window");
            }, xa.prototype._getMapTouches = function(Z) {
              for (var B = [], y = 0, b = Z; y < b.length; y += 1) {
                var R = b[y], j = R.target;
                this._el.contains(j) && B.push(R);
              }
              return B;
            }, xa.prototype.handleEvent = function(Z, B) {
              if (Z.type !== "blur") {
                this._updatingCamera = !0;
                for (var y = Z.type === "renderFrame" ? void 0 : Z, b = { needsRenderFrame: !1 }, R = {}, j = {}, G = Z.touches ? this._getMapTouches(Z.touches) : void 0, ie = G ? p.touchPos(this._el, G) : p.mousePos(this._el, Z), fe = 0, xe = this._handlers; fe < xe.length; fe += 1) {
                  var Te = xe[fe], ze = Te.handlerName, Ve = Te.handler, ut = Te.allowed;
                  if (Ve.isEnabled()) {
                    var gt = void 0;
                    this._blockedByActive(j, ut, ze) ? Ve.reset() : Ve[B || Z.type] && (gt = Ve[B || Z.type](Z, ie, G), this.mergeHandlerResult(b, R, gt, ze, y), gt && gt.needsRenderFrame && this._triggerRenderFrame()), (gt || Ve.isActive()) && (j[ze] = Ve);
                  }
                }
                var wt = {};
                for (var Et in this._previousActiveHandlers) j[Et] || (wt[Et] = y);
                this._previousActiveHandlers = j, (Object.keys(wt).length || di(b)) && (this._changes.push([b, R, wt]), this._triggerRenderFrame()), (Object.keys(j).length || di(b)) && this._map._stop(!0), this._updatingCamera = !1;
                var zt = b.cameraAnimation;
                zt && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], zt(this._map));
              } else this.stop(!0);
            }, xa.prototype.mergeHandlerResult = function(Z, B, y, b, R) {
              if (y) {
                i.extend(Z, y);
                var j = { handlerName: b, originalEvent: y.originalEvent || R };
                y.zoomDelta !== void 0 && (B.zoom = j), y.panDelta !== void 0 && (B.drag = j), y.pitchDelta !== void 0 && (B.pitch = j), y.bearingDelta !== void 0 && (B.rotate = j);
              }
            }, xa.prototype._applyChanges = function() {
              for (var Z = {}, B = {}, y = {}, b = 0, R = this._changes; b < R.length; b += 1) {
                var j = R[b], G = j[0], ie = j[1], fe = j[2];
                G.panDelta && (Z.panDelta = (Z.panDelta || new i.Point(0, 0))._add(G.panDelta)), G.zoomDelta && (Z.zoomDelta = (Z.zoomDelta || 0) + G.zoomDelta), G.bearingDelta && (Z.bearingDelta = (Z.bearingDelta || 0) + G.bearingDelta), G.pitchDelta && (Z.pitchDelta = (Z.pitchDelta || 0) + G.pitchDelta), G.around !== void 0 && (Z.around = G.around), G.pinchAround !== void 0 && (Z.pinchAround = G.pinchAround), G.noInertia && (Z.noInertia = G.noInertia), i.extend(B, ie), i.extend(y, fe);
              }
              this._updateMapTransform(Z, B, y), this._changes = [];
            }, xa.prototype._updateMapTransform = function(Z, B, y) {
              var b = this._map, R = b.transform;
              if (!di(Z)) return this._fireEvents(B, y, !0);
              var j = Z.panDelta, G = Z.zoomDelta, ie = Z.bearingDelta, fe = Z.pitchDelta, xe = Z.around, Te = Z.pinchAround;
              Te !== void 0 && (xe = Te), b._stop(!0), xe = xe || b.transform.centerPoint;
              var ze = R.pointLocation(j ? xe.sub(j) : xe);
              ie && (R.bearing += ie), fe && (R.pitch += fe), G && (R.zoom += G), R.setLocationAtPoint(ze, xe), this._map._update(), Z.noInertia || this._inertia.record(Z), this._fireEvents(B, y, !0);
            }, xa.prototype._fireEvents = function(Z, B, y) {
              var b = this, R = Os(this._eventsInProgress), j = Os(Z), G = {};
              for (var ie in Z) {
                var fe = Z[ie].originalEvent;
                this._eventsInProgress[ie] || (G[ie + "start"] = fe), this._eventsInProgress[ie] = Z[ie];
              }
              for (var xe in !R && j && this._fireEvent("movestart", j.originalEvent), G) this._fireEvent(xe, G[xe]);
              for (var Te in j && this._fireEvent("move", j.originalEvent), Z) {
                var ze = Z[Te].originalEvent;
                this._fireEvent(Te, ze);
              }
              var Ve, ut = {};
              for (var gt in this._eventsInProgress) {
                var wt = this._eventsInProgress[gt], Et = wt.handlerName, zt = wt.originalEvent;
                this._handlersById[Et].isActive() || (delete this._eventsInProgress[gt], Ve = B[Et] || zt, ut[gt + "end"] = Ve);
              }
              for (var It in ut) this._fireEvent(It, ut[It]);
              var jt = Os(this._eventsInProgress);
              if (y && (R || j) && !jt) {
                this._updatingCamera = !0;
                var Lt = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), Zt = function(Qt) {
                  return Qt !== 0 && -b._bearingSnap < Qt && Qt < b._bearingSnap;
                };
                Lt ? (Zt(Lt.bearing || this._map.getBearing()) && (Lt.bearing = 0), this._map.easeTo(Lt, { originalEvent: Ve })) : (this._map.fire(new i.Event("moveend", { originalEvent: Ve })), Zt(this._map.getBearing()) && this._map.resetNorth()), this._updatingCamera = !1;
              }
            }, xa.prototype._fireEvent = function(Z, B) {
              this._map.fire(new i.Event(Z, B ? { originalEvent: B } : {}));
            }, xa.prototype._requestFrame = function() {
              var Z = this;
              return this._map.triggerRepaint(), this._map._renderTaskQueue.add(function(B) {
                delete Z._frameId, Z.handleEvent(new Vs("renderFrame", { timeStamp: B })), Z._applyChanges();
              });
            }, xa.prototype._triggerRenderFrame = function() {
              this._frameId === void 0 && (this._frameId = this._requestFrame());
            };
            var vo = function(Z) {
              function B(y, b) {
                Z.call(this), this._moving = !1, this._zooming = !1, this.transform = y, this._bearingSnap = b.bearingSnap, i.bindAll(["_renderFrameCallback"], this);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.getCenter = function() {
                return new i.LngLat(this.transform.center.lng, this.transform.center.lat);
              }, B.prototype.setCenter = function(y, b) {
                return this.jumpTo({ center: y }, b);
              }, B.prototype.panBy = function(y, b, R) {
                return y = i.Point.convert(y).mult(-1), this.panTo(this.transform.center, i.extend({ offset: y }, b), R);
              }, B.prototype.panTo = function(y, b, R) {
                return this.easeTo(i.extend({ center: y }, b), R);
              }, B.prototype.getZoom = function() {
                return this.transform.zoom;
              }, B.prototype.setZoom = function(y, b) {
                return this.jumpTo({ zoom: y }, b), this;
              }, B.prototype.zoomTo = function(y, b, R) {
                return this.easeTo(i.extend({ zoom: y }, b), R);
              }, B.prototype.zoomIn = function(y, b) {
                return this.zoomTo(this.getZoom() + 1, y, b), this;
              }, B.prototype.zoomOut = function(y, b) {
                return this.zoomTo(this.getZoom() - 1, y, b), this;
              }, B.prototype.getBearing = function() {
                return this.transform.bearing;
              }, B.prototype.setBearing = function(y, b) {
                return this.jumpTo({ bearing: y }, b), this;
              }, B.prototype.getPadding = function() {
                return this.transform.padding;
              }, B.prototype.setPadding = function(y, b) {
                return this.jumpTo({ padding: y }, b), this;
              }, B.prototype.rotateTo = function(y, b, R) {
                return this.easeTo(i.extend({ bearing: y }, b), R);
              }, B.prototype.resetNorth = function(y, b) {
                return this.rotateTo(0, i.extend({ duration: 1e3 }, y), b), this;
              }, B.prototype.resetNorthPitch = function(y, b) {
                return this.easeTo(i.extend({ bearing: 0, pitch: 0, duration: 1e3 }, y), b), this;
              }, B.prototype.snapToNorth = function(y, b) {
                return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(y, b) : this;
              }, B.prototype.getPitch = function() {
                return this.transform.pitch;
              }, B.prototype.setPitch = function(y, b) {
                return this.jumpTo({ pitch: y }, b), this;
              }, B.prototype.cameraForBounds = function(y, b) {
                y = i.LngLatBounds.convert(y);
                var R = b && b.bearing || 0;
                return this._cameraForBoxAndBearing(y.getNorthWest(), y.getSouthEast(), R, b);
              }, B.prototype._cameraForBoxAndBearing = function(y, b, R, j) {
                var G = { top: 0, bottom: 0, right: 0, left: 0 };
                if (typeof (j = i.extend({ padding: G, offset: [0, 0], maxZoom: this.transform.maxZoom }, j)).padding == "number") {
                  var ie = j.padding;
                  j.padding = { top: ie, bottom: ie, right: ie, left: ie };
                }
                j.padding = i.extend(G, j.padding);
                var fe = this.transform, xe = fe.padding, Te = fe.project(i.LngLat.convert(y)), ze = fe.project(i.LngLat.convert(b)), Ve = Te.rotate(-R * Math.PI / 180), ut = ze.rotate(-R * Math.PI / 180), gt = new i.Point(Math.max(Ve.x, ut.x), Math.max(Ve.y, ut.y)), wt = new i.Point(Math.min(Ve.x, ut.x), Math.min(Ve.y, ut.y)), Et = gt.sub(wt), zt = (fe.width - (xe.left + xe.right + j.padding.left + j.padding.right)) / Et.x, It = (fe.height - (xe.top + xe.bottom + j.padding.top + j.padding.bottom)) / Et.y;
                if (!(It < 0 || zt < 0)) {
                  var jt = Math.min(fe.scaleZoom(fe.scale * Math.min(zt, It)), j.maxZoom), Lt = typeof j.offset.x == "number" ? new i.Point(j.offset.x, j.offset.y) : i.Point.convert(j.offset), Zt = (j.padding.left - j.padding.right) / 2, Qt = (j.padding.top - j.padding.bottom) / 2, Xt = new i.Point(Zt, Qt).rotate(R * Math.PI / 180), yn = Lt.add(Xt).mult(fe.scale / fe.zoomScale(jt));
                  return { center: fe.unproject(Te.add(ze).div(2).sub(yn)), zoom: jt, bearing: R };
                }
                i.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
              }, B.prototype.fitBounds = function(y, b, R) {
                return this._fitInternal(this.cameraForBounds(y, b), b, R);
              }, B.prototype.fitScreenCoordinates = function(y, b, R, j, G) {
                return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.Point.convert(y)), this.transform.pointLocation(i.Point.convert(b)), R, j), j, G);
              }, B.prototype._fitInternal = function(y, b, R) {
                return y ? (delete (b = i.extend(y, b)).padding, b.linear ? this.easeTo(b, R) : this.flyTo(b, R)) : this;
              }, B.prototype.jumpTo = function(y, b) {
                this.stop();
                var R = this.transform, j = !1, G = !1, ie = !1;
                return "zoom" in y && R.zoom !== +y.zoom && (j = !0, R.zoom = +y.zoom), y.center !== void 0 && (R.center = i.LngLat.convert(y.center)), "bearing" in y && R.bearing !== +y.bearing && (G = !0, R.bearing = +y.bearing), "pitch" in y && R.pitch !== +y.pitch && (ie = !0, R.pitch = +y.pitch), y.padding == null || R.isPaddingEqual(y.padding) || (R.padding = y.padding), this.fire(new i.Event("movestart", b)).fire(new i.Event("move", b)), j && this.fire(new i.Event("zoomstart", b)).fire(new i.Event("zoom", b)).fire(new i.Event("zoomend", b)), G && this.fire(new i.Event("rotatestart", b)).fire(new i.Event("rotate", b)).fire(new i.Event("rotateend", b)), ie && this.fire(new i.Event("pitchstart", b)).fire(new i.Event("pitch", b)).fire(new i.Event("pitchend", b)), this.fire(new i.Event("moveend", b));
              }, B.prototype.easeTo = function(y, b) {
                var R = this;
                this._stop(!1, y.easeId), ((y = i.extend({ offset: [0, 0], duration: 500, easing: i.ease }, y)).animate === !1 || !y.essential && i.browser.prefersReducedMotion) && (y.duration = 0);
                var j = this.transform, G = this.getZoom(), ie = this.getBearing(), fe = this.getPitch(), xe = this.getPadding(), Te = "zoom" in y ? +y.zoom : G, ze = "bearing" in y ? this._normalizeBearing(y.bearing, ie) : ie, Ve = "pitch" in y ? +y.pitch : fe, ut = "padding" in y ? y.padding : j.padding, gt = i.Point.convert(y.offset), wt = j.centerPoint.add(gt), Et = j.pointLocation(wt), zt = i.LngLat.convert(y.center || Et);
                this._normalizeCenter(zt);
                var It, jt, Lt = j.project(Et), Zt = j.project(zt).sub(Lt), Qt = j.zoomScale(Te - G);
                y.around && (It = i.LngLat.convert(y.around), jt = j.locationPoint(It));
                var Xt = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
                return this._zooming = this._zooming || Te !== G, this._rotating = this._rotating || ie !== ze, this._pitching = this._pitching || Ve !== fe, this._padding = !j.isPaddingEqual(ut), this._easeId = y.easeId, this._prepareEase(b, y.noMoveStart, Xt), this._ease(function(yn) {
                  if (R._zooming && (j.zoom = i.number(G, Te, yn)), R._rotating && (j.bearing = i.number(ie, ze, yn)), R._pitching && (j.pitch = i.number(fe, Ve, yn)), R._padding && (j.interpolatePadding(xe, ut, yn), wt = j.centerPoint.add(gt)), It) j.setLocationAtPoint(It, jt);
                  else {
                    var Sn = j.zoomScale(j.zoom - G), Un = Te > G ? Math.min(2, Qt) : Math.max(0.5, Qt), Vn = Math.pow(Un, 1 - yn), Yn = j.unproject(Lt.add(Zt.mult(yn * Vn)).mult(Sn));
                    j.setLocationAtPoint(j.renderWorldCopies ? Yn.wrap() : Yn, wt);
                  }
                  R._fireMoveEvents(b);
                }, function(yn) {
                  R._afterEase(b, yn);
                }, y), this;
              }, B.prototype._prepareEase = function(y, b, R) {
                R === void 0 && (R = {}), this._moving = !0, b || R.moving || this.fire(new i.Event("movestart", y)), this._zooming && !R.zooming && this.fire(new i.Event("zoomstart", y)), this._rotating && !R.rotating && this.fire(new i.Event("rotatestart", y)), this._pitching && !R.pitching && this.fire(new i.Event("pitchstart", y));
              }, B.prototype._fireMoveEvents = function(y) {
                this.fire(new i.Event("move", y)), this._zooming && this.fire(new i.Event("zoom", y)), this._rotating && this.fire(new i.Event("rotate", y)), this._pitching && this.fire(new i.Event("pitch", y));
              }, B.prototype._afterEase = function(y, b) {
                if (!this._easeId || !b || this._easeId !== b) {
                  delete this._easeId;
                  var R = this._zooming, j = this._rotating, G = this._pitching;
                  this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._padding = !1, R && this.fire(new i.Event("zoomend", y)), j && this.fire(new i.Event("rotateend", y)), G && this.fire(new i.Event("pitchend", y)), this.fire(new i.Event("moveend", y));
                }
              }, B.prototype.flyTo = function(y, b) {
                var R = this;
                if (!y.essential && i.browser.prefersReducedMotion) {
                  var j = i.pick(y, ["center", "zoom", "bearing", "pitch", "around"]);
                  return this.jumpTo(j, b);
                }
                this.stop(), y = i.extend({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: i.ease }, y);
                var G = this.transform, ie = this.getZoom(), fe = this.getBearing(), xe = this.getPitch(), Te = this.getPadding(), ze = "zoom" in y ? i.clamp(+y.zoom, G.minZoom, G.maxZoom) : ie, Ve = "bearing" in y ? this._normalizeBearing(y.bearing, fe) : fe, ut = "pitch" in y ? +y.pitch : xe, gt = "padding" in y ? y.padding : G.padding, wt = G.zoomScale(ze - ie), Et = i.Point.convert(y.offset), zt = G.centerPoint.add(Et), It = G.pointLocation(zt), jt = i.LngLat.convert(y.center || It);
                this._normalizeCenter(jt);
                var Lt = G.project(It), Zt = G.project(jt).sub(Lt), Qt = y.curve, Xt = Math.max(G.width, G.height), yn = Xt / wt, Sn = Zt.mag();
                if ("minZoom" in y) {
                  var Un = i.clamp(Math.min(y.minZoom, ie, ze), G.minZoom, G.maxZoom), Vn = Xt / G.zoomScale(Un - ie);
                  Qt = Math.sqrt(Vn / Sn * 2);
                }
                var Yn = Qt * Qt;
                function er(Rr) {
                  var ei = (yn * yn - Xt * Xt + (Rr ? -1 : 1) * Yn * Yn * Sn * Sn) / (2 * (Rr ? yn : Xt) * Yn * Sn);
                  return Math.log(Math.sqrt(ei * ei + 1) - ei);
                }
                function kr(Rr) {
                  return (Math.exp(Rr) - Math.exp(-Rr)) / 2;
                }
                function or(Rr) {
                  return (Math.exp(Rr) + Math.exp(-Rr)) / 2;
                }
                var Mr = er(0), fr = function(Rr) {
                  return or(Mr) / or(Mr + Qt * Rr);
                }, Or = function(Rr) {
                  return Xt * ((or(Mr) * (kr(ei = Mr + Qt * Rr) / or(ei)) - kr(Mr)) / Yn) / Sn;
                  var ei;
                }, br = (er(1) - Mr) / Qt;
                if (Math.abs(Sn) < 1e-6 || !isFinite(br)) {
                  if (Math.abs(Xt - yn) < 1e-6) return this.easeTo(y, b);
                  var Nr = yn < Xt ? -1 : 1;
                  br = Math.abs(Math.log(yn / Xt)) / Qt, Or = function() {
                    return 0;
                  }, fr = function(Rr) {
                    return Math.exp(Nr * Qt * Rr);
                  };
                }
                if ("duration" in y) y.duration = +y.duration;
                else {
                  var ii = "screenSpeed" in y ? +y.screenSpeed / Qt : +y.speed;
                  y.duration = 1e3 * br / ii;
                }
                return y.maxDuration && y.duration > y.maxDuration && (y.duration = 0), this._zooming = !0, this._rotating = fe !== Ve, this._pitching = ut !== xe, this._padding = !G.isPaddingEqual(gt), this._prepareEase(b, !1), this._ease(function(Rr) {
                  var ei = Rr * br, pi = 1 / fr(ei);
                  G.zoom = Rr === 1 ? ze : ie + G.scaleZoom(pi), R._rotating && (G.bearing = i.number(fe, Ve, Rr)), R._pitching && (G.pitch = i.number(xe, ut, Rr)), R._padding && (G.interpolatePadding(Te, gt, Rr), zt = G.centerPoint.add(Et));
                  var qi = Rr === 1 ? jt : G.unproject(Lt.add(Zt.mult(Or(ei))).mult(pi));
                  G.setLocationAtPoint(G.renderWorldCopies ? qi.wrap() : qi, zt), R._fireMoveEvents(b);
                }, function() {
                  return R._afterEase(b);
                }, y), this;
              }, B.prototype.isEasing = function() {
                return !!this._easeFrameId;
              }, B.prototype.stop = function() {
                return this._stop();
              }, B.prototype._stop = function(y, b) {
                if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) {
                  var R = this._onEaseEnd;
                  delete this._onEaseEnd, R.call(this, b);
                }
                if (!y) {
                  var j = this.handlers;
                  j && j.stop(!1);
                }
                return this;
              }, B.prototype._ease = function(y, b, R) {
                R.animate === !1 || R.duration === 0 ? (y(1), b()) : (this._easeStart = i.browser.now(), this._easeOptions = R, this._onEaseFrame = y, this._onEaseEnd = b, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback));
              }, B.prototype._renderFrameCallback = function() {
                var y = Math.min((i.browser.now() - this._easeStart) / this._easeOptions.duration, 1);
                this._onEaseFrame(this._easeOptions.easing(y)), y < 1 ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop();
              }, B.prototype._normalizeBearing = function(y, b) {
                y = i.wrap(y, -180, 180);
                var R = Math.abs(y - b);
                return Math.abs(y - 360 - b) < R && (y -= 360), Math.abs(y + 360 - b) < R && (y += 360), y;
              }, B.prototype._normalizeCenter = function(y) {
                var b = this.transform;
                if (b.renderWorldCopies && !b.lngRange) {
                  var R = y.lng - b.center.lng;
                  y.lng += R > 180 ? -360 : R < -180 ? 360 : 0;
                }
              }, B;
            }(i.Evented), Ts = function(Z) {
              Z === void 0 && (Z = {}), this.options = Z, i.bindAll(["_toggleAttribution", "_updateEditLink", "_updateData", "_updateCompact"], this);
            };
            Ts.prototype.getDefaultPosition = function() {
              return "bottom-right";
            }, Ts.prototype.onAdd = function(Z) {
              var B = this.options && this.options.compact;
              return this._map = Z, this._container = p.create("div", "mapboxgl-ctrl mapboxgl-ctrl-attrib"), this._compactButton = p.create("button", "mapboxgl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = p.create("div", "mapboxgl-ctrl-attrib-inner", this._container), this._innerContainer.setAttribute("role", "list"), B && this._container.classList.add("mapboxgl-compact"), this._updateAttributions(), this._updateEditLink(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("moveend", this._updateEditLink), B === void 0 && (this._map.on("resize", this._updateCompact), this._updateCompact()), this._container;
            }, Ts.prototype.onRemove = function() {
              p.remove(this._container), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("moveend", this._updateEditLink), this._map.off("resize", this._updateCompact), this._map = void 0, this._attribHTML = void 0;
            }, Ts.prototype._setElementTitle = function(Z, B) {
              var y = this._map._getUIString("AttributionControl." + B);
              Z.title = y, Z.setAttribute("aria-label", y);
            }, Ts.prototype._toggleAttribution = function() {
              this._container.classList.contains("mapboxgl-compact-show") ? (this._container.classList.remove("mapboxgl-compact-show"), this._compactButton.setAttribute("aria-pressed", "false")) : (this._container.classList.add("mapboxgl-compact-show"), this._compactButton.setAttribute("aria-pressed", "true"));
            }, Ts.prototype._updateEditLink = function() {
              var Z = this._editLink;
              Z || (Z = this._editLink = this._container.querySelector(".mapbox-improve-map"));
              var B = [{ key: "owner", value: this.styleOwner }, { key: "id", value: this.styleId }, { key: "access_token", value: this._map._requestManager._customAccessToken || i.config.ACCESS_TOKEN }];
              if (Z) {
                var y = B.reduce(function(b, R, j) {
                  return R.value && (b += R.key + "=" + R.value + (j < B.length - 1 ? "&" : "")), b;
                }, "?");
                Z.href = i.config.FEEDBACK_URL + "/" + y + (this._map._hash ? this._map._hash.getHashString(!0) : ""), Z.rel = "noopener nofollow", this._setElementTitle(Z, "MapFeedback");
              }
            }, Ts.prototype._updateData = function(Z) {
              !Z || Z.sourceDataType !== "metadata" && Z.sourceDataType !== "visibility" && Z.dataType !== "style" || (this._updateAttributions(), this._updateEditLink());
            }, Ts.prototype._updateAttributions = function() {
              if (this._map.style) {
                var Z = [];
                if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? Z = Z.concat(this.options.customAttribution.map(function(ie) {
                  return typeof ie != "string" ? "" : ie;
                })) : typeof this.options.customAttribution == "string" && Z.push(this.options.customAttribution)), this._map.style.stylesheet) {
                  var B = this._map.style.stylesheet;
                  this.styleOwner = B.owner, this.styleId = B.id;
                }
                var y = this._map.style.sourceCaches;
                for (var b in y) {
                  var R = y[b];
                  if (R.used) {
                    var j = R.getSource();
                    j.attribution && Z.indexOf(j.attribution) < 0 && Z.push(j.attribution);
                  }
                }
                Z.sort(function(ie, fe) {
                  return ie.length - fe.length;
                });
                var G = (Z = Z.filter(function(ie, fe) {
                  for (var xe = fe + 1; xe < Z.length; xe++) if (Z[xe].indexOf(ie) >= 0) return !1;
                  return !0;
                })).join(" | ");
                G !== this._attribHTML && (this._attribHTML = G, Z.length ? (this._innerContainer.innerHTML = G, this._container.classList.remove("mapboxgl-attrib-empty")) : this._container.classList.add("mapboxgl-attrib-empty"), this._editLink = null);
              }
            }, Ts.prototype._updateCompact = function() {
              this._map.getCanvasContainer().offsetWidth <= 640 ? this._container.classList.add("mapboxgl-compact") : this._container.classList.remove("mapboxgl-compact", "mapboxgl-compact-show");
            };
            var nl = function() {
              i.bindAll(["_updateLogo"], this), i.bindAll(["_updateCompact"], this);
            };
            nl.prototype.onAdd = function(Z) {
              this._map = Z, this._container = p.create("div", "mapboxgl-ctrl");
              var B = p.create("a", "mapboxgl-ctrl-logo");
              return B.target = "_blank", B.rel = "noopener nofollow", B.href = "https://www.mapbox.com/", B.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), B.setAttribute("rel", "noopener nofollow"), this._container.appendChild(B), this._container.style.display = "none", this._map.on("sourcedata", this._updateLogo), this._updateLogo(), this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
            }, nl.prototype.onRemove = function() {
              p.remove(this._container), this._map.off("sourcedata", this._updateLogo), this._map.off("resize", this._updateCompact);
            }, nl.prototype.getDefaultPosition = function() {
              return "bottom-left";
            }, nl.prototype._updateLogo = function(Z) {
              Z && Z.sourceDataType !== "metadata" || (this._container.style.display = this._logoRequired() ? "block" : "none");
            }, nl.prototype._logoRequired = function() {
              if (this._map.style) {
                var Z = this._map.style.sourceCaches;
                for (var B in Z) if (Z[B].getSource().mapbox_logo) return !0;
                return !1;
              }
            }, nl.prototype._updateCompact = function() {
              var Z = this._container.children;
              if (Z.length) {
                var B = Z[0];
                this._map.getCanvasContainer().offsetWidth < 250 ? B.classList.add("mapboxgl-compact") : B.classList.remove("mapboxgl-compact");
              }
            };
            var Vo = function() {
              this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1;
            };
            Vo.prototype.add = function(Z) {
              var B = ++this._id;
              return this._queue.push({ callback: Z, id: B, cancelled: !1 }), B;
            }, Vo.prototype.remove = function(Z) {
              for (var B = this._currentlyRunning, y = 0, b = B ? this._queue.concat(B) : this._queue; y < b.length; y += 1) {
                var R = b[y];
                if (R.id === Z) return void (R.cancelled = !0);
              }
            }, Vo.prototype.run = function(Z) {
              Z === void 0 && (Z = 0);
              var B = this._currentlyRunning = this._queue;
              this._queue = [];
              for (var y = 0, b = B; y < b.length; y += 1) {
                var R = b[y];
                if (!R.cancelled && (R.callback(Z), this._cleared)) break;
              }
              this._cleared = !1, this._currentlyRunning = !1;
            }, Vo.prototype.clear = function() {
              this._currentlyRunning && (this._cleared = !0), this._queue = [];
            };
            var Qu = { "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": "Mapbox logo", "NavigationControl.ResetBearing": "Reset bearing to north", "NavigationControl.ZoomIn": "Zoom in", "NavigationControl.ZoomOut": "Zoom out", "ScaleControl.Feet": "ft", "ScaleControl.Meters": "m", "ScaleControl.Kilometers": "km", "ScaleControl.Miles": "mi", "ScaleControl.NauticalMiles": "nm" }, li = i.window.HTMLImageElement, ls = i.window.HTMLElement, ma = i.window.ImageBitmap, au = 60, $s = { center: [0, 0], zoom: 0, bearing: 0, pitch: 0, minZoom: -2, maxZoom: 22, minPitch: 0, maxPitch: au, interactive: !0, scrollZoom: !0, boxZoom: !0, dragRotate: !0, dragPan: !0, keyboard: !0, doubleClickZoom: !0, touchZoomRotate: !0, touchPitch: !0, bearingSnap: 7, clickTolerance: 3, pitchWithRotate: !0, hash: !1, attributionControl: !0, failIfMajorPerformanceCaveat: !1, preserveDrawingBuffer: !1, trackResize: !0, renderWorldCopies: !0, refreshExpiredTiles: !0, maxTileCacheSize: null, localIdeographFontFamily: "sans-serif", transformRequest: null, accessToken: null, fadeDuration: 300, crossSourceCollisions: !0 }, bl = function(Z) {
              function B(b) {
                var R = this;
                if ((b = i.extend({}, $s, b)).minZoom != null && b.maxZoom != null && b.minZoom > b.maxZoom) throw new Error("maxZoom must be greater than or equal to minZoom");
                if (b.minPitch != null && b.maxPitch != null && b.minPitch > b.maxPitch) throw new Error("maxPitch must be greater than or equal to minPitch");
                if (b.minPitch != null && b.minPitch < 0) throw new Error("minPitch must be greater than or equal to 0");
                if (b.maxPitch != null && b.maxPitch > au) throw new Error("maxPitch must be less than or equal to 60");
                var j = new aa(b.minZoom, b.maxZoom, b.minPitch, b.maxPitch, b.renderWorldCopies);
                if (Z.call(this, j, b), this._interactive = b.interactive, this._maxTileCacheSize = b.maxTileCacheSize, this._failIfMajorPerformanceCaveat = b.failIfMajorPerformanceCaveat, this._preserveDrawingBuffer = b.preserveDrawingBuffer, this._antialias = b.antialias, this._trackResize = b.trackResize, this._bearingSnap = b.bearingSnap, this._refreshExpiredTiles = b.refreshExpiredTiles, this._fadeDuration = b.fadeDuration, this._crossSourceCollisions = b.crossSourceCollisions, this._crossFadingFactor = 1, this._collectResourceTiming = b.collectResourceTiming, this._renderTaskQueue = new Vo(), this._controls = [], this._mapId = i.uniqueId(), this._locale = i.extend({}, Qu, b.locale), this._clickTolerance = b.clickTolerance, this._requestManager = new i.RequestManager(b.transformRequest, b.accessToken), typeof b.container == "string") {
                  if (this._container = i.window.document.getElementById(b.container), !this._container) throw new Error("Container '" + b.container + "' not found.");
                } else {
                  if (!(b.container instanceof ls)) throw new Error("Invalid type: 'container' must be a String or HTMLElement.");
                  this._container = b.container;
                }
                if (b.maxBounds && this.setMaxBounds(b.maxBounds), i.bindAll(["_onWindowOnline", "_onWindowResize", "_onMapScroll", "_contextLost", "_contextRestored"], this), this._setupContainer(), this._setupPainter(), this.painter === void 0) throw new Error("Failed to initialize WebGL.");
                this.on("move", function() {
                  return R._update(!1);
                }), this.on("moveend", function() {
                  return R._update(!1);
                }), this.on("zoom", function() {
                  return R._update(!0);
                }), i.window !== void 0 && (i.window.addEventListener("online", this._onWindowOnline, !1), i.window.addEventListener("resize", this._onWindowResize, !1), i.window.addEventListener("orientationchange", this._onWindowResize, !1)), this.handlers = new xa(this, b);
                var G = typeof b.hash == "string" && b.hash || void 0;
                this._hash = b.hash && new yo(G).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ center: b.center, zoom: b.zoom, bearing: b.bearing, pitch: b.pitch }), b.bounds && (this.resize(), this.fitBounds(b.bounds, i.extend({}, b.fitBoundsOptions, { duration: 0 })))), this.resize(), this._localIdeographFontFamily = b.localIdeographFontFamily, b.style && this.setStyle(b.style, { localIdeographFontFamily: b.localIdeographFontFamily }), b.attributionControl && this.addControl(new Ts({ customAttribution: b.customAttribution })), this.addControl(new nl(), b.logoPosition), this.on("style.load", function() {
                  R.transform.unmodified && R.jumpTo(R.style.stylesheet);
                }), this.on("data", function(ie) {
                  R._update(ie.dataType === "style"), R.fire(new i.Event(ie.dataType + "data", ie));
                }), this.on("dataloading", function(ie) {
                  R.fire(new i.Event(ie.dataType + "dataloading", ie));
                });
              }
              Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B;
              var y = { showTileBoundaries: { configurable: !0 }, showPadding: { configurable: !0 }, showCollisionBoxes: { configurable: !0 }, showOverdrawInspector: { configurable: !0 }, repaint: { configurable: !0 }, vertices: { configurable: !0 }, version: { configurable: !0 } };
              return B.prototype._getMapId = function() {
                return this._mapId;
              }, B.prototype.addControl = function(b, R) {
                if (R === void 0 && (R = b.getDefaultPosition ? b.getDefaultPosition() : "top-right"), !b || !b.onAdd) return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));
                var j = b.onAdd(this);
                this._controls.push(b);
                var G = this._controlPositions[R];
                return R.indexOf("bottom") !== -1 ? G.insertBefore(j, G.firstChild) : G.appendChild(j), this;
              }, B.prototype.removeControl = function(b) {
                if (!b || !b.onRemove) return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));
                var R = this._controls.indexOf(b);
                return R > -1 && this._controls.splice(R, 1), b.onRemove(this), this;
              }, B.prototype.hasControl = function(b) {
                return this._controls.indexOf(b) > -1;
              }, B.prototype.resize = function(b) {
                var R = this._containerDimensions(), j = R[0], G = R[1];
                this._resizeCanvas(j, G), this.transform.resize(j, G), this.painter.resize(j, G);
                var ie = !this._moving;
                return ie && (this.stop(), this.fire(new i.Event("movestart", b)).fire(new i.Event("move", b))), this.fire(new i.Event("resize", b)), ie && this.fire(new i.Event("moveend", b)), this;
              }, B.prototype.getBounds = function() {
                return this.transform.getBounds();
              }, B.prototype.getMaxBounds = function() {
                return this.transform.getMaxBounds();
              }, B.prototype.setMaxBounds = function(b) {
                return this.transform.setMaxBounds(i.LngLatBounds.convert(b)), this._update();
              }, B.prototype.setMinZoom = function(b) {
                if ((b = b ?? -2) >= -2 && b <= this.transform.maxZoom) return this.transform.minZoom = b, this._update(), this.getZoom() < b && this.setZoom(b), this;
                throw new Error("minZoom must be between -2 and the current maxZoom, inclusive");
              }, B.prototype.getMinZoom = function() {
                return this.transform.minZoom;
              }, B.prototype.setMaxZoom = function(b) {
                if ((b = b ?? 22) >= this.transform.minZoom) return this.transform.maxZoom = b, this._update(), this.getZoom() > b && this.setZoom(b), this;
                throw new Error("maxZoom must be greater than the current minZoom");
              }, B.prototype.getMaxZoom = function() {
                return this.transform.maxZoom;
              }, B.prototype.setMinPitch = function(b) {
                if ((b = b ?? 0) < 0) throw new Error("minPitch must be greater than or equal to 0");
                if (b >= 0 && b <= this.transform.maxPitch) return this.transform.minPitch = b, this._update(), this.getPitch() < b && this.setPitch(b), this;
                throw new Error("minPitch must be between 0 and the current maxPitch, inclusive");
              }, B.prototype.getMinPitch = function() {
                return this.transform.minPitch;
              }, B.prototype.setMaxPitch = function(b) {
                if ((b = b ?? au) > au) throw new Error("maxPitch must be less than or equal to 60");
                if (b >= this.transform.minPitch) return this.transform.maxPitch = b, this._update(), this.getPitch() > b && this.setPitch(b), this;
                throw new Error("maxPitch must be greater than the current minPitch");
              }, B.prototype.getMaxPitch = function() {
                return this.transform.maxPitch;
              }, B.prototype.getRenderWorldCopies = function() {
                return this.transform.renderWorldCopies;
              }, B.prototype.setRenderWorldCopies = function(b) {
                return this.transform.renderWorldCopies = b, this._update();
              }, B.prototype.project = function(b) {
                return this.transform.locationPoint(i.LngLat.convert(b));
              }, B.prototype.unproject = function(b) {
                return this.transform.pointLocation(i.Point.convert(b));
              }, B.prototype.isMoving = function() {
                return this._moving || this.handlers.isMoving();
              }, B.prototype.isZooming = function() {
                return this._zooming || this.handlers.isZooming();
              }, B.prototype.isRotating = function() {
                return this._rotating || this.handlers.isRotating();
              }, B.prototype._createDelegatedListener = function(b, R, j) {
                var G, ie = this;
                if (b === "mouseenter" || b === "mouseover") {
                  var fe = !1;
                  return { layer: R, listener: j, delegates: { mousemove: function(Te) {
                    var ze = ie.getLayer(R) ? ie.queryRenderedFeatures(Te.point, { layers: [R] }) : [];
                    ze.length ? fe || (fe = !0, j.call(ie, new Xo(b, ie, Te.originalEvent, { features: ze }))) : fe = !1;
                  }, mouseout: function() {
                    fe = !1;
                  } } };
                }
                if (b === "mouseleave" || b === "mouseout") {
                  var xe = !1;
                  return { layer: R, listener: j, delegates: { mousemove: function(Te) {
                    (ie.getLayer(R) ? ie.queryRenderedFeatures(Te.point, { layers: [R] }) : []).length ? xe = !0 : xe && (xe = !1, j.call(ie, new Xo(b, ie, Te.originalEvent)));
                  }, mouseout: function(Te) {
                    xe && (xe = !1, j.call(ie, new Xo(b, ie, Te.originalEvent)));
                  } } };
                }
                return { layer: R, listener: j, delegates: (G = {}, G[b] = function(Te) {
                  var ze = ie.getLayer(R) ? ie.queryRenderedFeatures(Te.point, { layers: [R] }) : [];
                  ze.length && (Te.features = ze, j.call(ie, Te), delete Te.features);
                }, G) };
              }, B.prototype.on = function(b, R, j) {
                if (j === void 0) return Z.prototype.on.call(this, b, R);
                var G = this._createDelegatedListener(b, R, j);
                for (var ie in this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[b] = this._delegatedListeners[b] || [], this._delegatedListeners[b].push(G), G.delegates) this.on(ie, G.delegates[ie]);
                return this;
              }, B.prototype.once = function(b, R, j) {
                if (j === void 0) return Z.prototype.once.call(this, b, R);
                var G = this._createDelegatedListener(b, R, j);
                for (var ie in G.delegates) this.once(ie, G.delegates[ie]);
                return this;
              }, B.prototype.off = function(b, R, j) {
                var G = this;
                return j === void 0 ? Z.prototype.off.call(this, b, R) : (this._delegatedListeners && this._delegatedListeners[b] && function(ie) {
                  for (var fe = ie[b], xe = 0; xe < fe.length; xe++) {
                    var Te = fe[xe];
                    if (Te.layer === R && Te.listener === j) {
                      for (var ze in Te.delegates) G.off(ze, Te.delegates[ze]);
                      return fe.splice(xe, 1), G;
                    }
                  }
                }(this._delegatedListeners), this);
              }, B.prototype.queryRenderedFeatures = function(b, R) {
                if (!this.style) return [];
                var j;
                if (R !== void 0 || b === void 0 || b instanceof i.Point || Array.isArray(b) || (R = b, b = void 0), R = R || {}, (b = b || [[0, 0], [this.transform.width, this.transform.height]]) instanceof i.Point || typeof b[0] == "number") j = [i.Point.convert(b)];
                else {
                  var G = i.Point.convert(b[0]), ie = i.Point.convert(b[1]);
                  j = [G, new i.Point(ie.x, G.y), ie, new i.Point(G.x, ie.y), G];
                }
                return this.style.queryRenderedFeatures(j, R, this.transform);
              }, B.prototype.querySourceFeatures = function(b, R) {
                return this.style.querySourceFeatures(b, R);
              }, B.prototype.setStyle = function(b, R) {
                return (R = i.extend({}, { localIdeographFontFamily: this._localIdeographFontFamily }, R)).diff !== !1 && R.localIdeographFontFamily === this._localIdeographFontFamily && this.style && b ? (this._diffStyle(b, R), this) : (this._localIdeographFontFamily = R.localIdeographFontFamily, this._updateStyle(b, R));
              }, B.prototype._getUIString = function(b) {
                var R = this._locale[b];
                if (R == null) throw new Error("Missing UI string '" + b + "'");
                return R;
              }, B.prototype._updateStyle = function(b, R) {
                return this.style && (this.style.setEventedParent(null), this.style._remove()), b ? (this.style = new Sr(this, R || {}), this.style.setEventedParent(this, { style: this.style }), typeof b == "string" ? this.style.loadURL(b) : this.style.loadJSON(b), this) : (delete this.style, this);
              }, B.prototype._lazyInitEmptyStyle = function() {
                this.style || (this.style = new Sr(this, {}), this.style.setEventedParent(this, { style: this.style }), this.style.loadEmpty());
              }, B.prototype._diffStyle = function(b, R) {
                var j = this;
                if (typeof b == "string") {
                  var G = this._requestManager.normalizeStyleURL(b), ie = this._requestManager.transformRequest(G, i.ResourceType.Style);
                  i.getJSON(ie, function(fe, xe) {
                    fe ? j.fire(new i.ErrorEvent(fe)) : xe && j._updateDiff(xe, R);
                  });
                } else typeof b == "object" && this._updateDiff(b, R);
              }, B.prototype._updateDiff = function(b, R) {
                try {
                  this.style.setState(b) && this._update(!0);
                } catch (j) {
                  i.warnOnce("Unable to perform style diff: " + (j.message || j.error || j) + ".  Rebuilding the style from scratch."), this._updateStyle(b, R);
                }
              }, B.prototype.getStyle = function() {
                if (this.style) return this.style.serialize();
              }, B.prototype.isStyleLoaded = function() {
                return this.style ? this.style.loaded() : i.warnOnce("There is no style added to the map.");
              }, B.prototype.addSource = function(b, R) {
                return this._lazyInitEmptyStyle(), this.style.addSource(b, R), this._update(!0);
              }, B.prototype.isSourceLoaded = function(b) {
                var R = this.style && this.style.sourceCaches[b];
                if (R !== void 0) return R.loaded();
                this.fire(new i.ErrorEvent(new Error("There is no source with ID '" + b + "'")));
              }, B.prototype.areTilesLoaded = function() {
                var b = this.style && this.style.sourceCaches;
                for (var R in b) {
                  var j = b[R]._tiles;
                  for (var G in j) {
                    var ie = j[G];
                    if (ie.state !== "loaded" && ie.state !== "errored") return !1;
                  }
                }
                return !0;
              }, B.prototype.addSourceType = function(b, R, j) {
                return this._lazyInitEmptyStyle(), this.style.addSourceType(b, R, j);
              }, B.prototype.removeSource = function(b) {
                return this.style.removeSource(b), this._update(!0);
              }, B.prototype.getSource = function(b) {
                return this.style.getSource(b);
              }, B.prototype.addImage = function(b, R, j) {
                j === void 0 && (j = {});
                var G = j.pixelRatio;
                G === void 0 && (G = 1);
                var ie = j.sdf;
                ie === void 0 && (ie = !1);
                var fe = j.stretchX, xe = j.stretchY, Te = j.content;
                if (this._lazyInitEmptyStyle(), R instanceof li || ma && R instanceof ma) {
                  var ze = i.browser.getImageData(R), Ve = ze.width, ut = ze.height, gt = ze.data;
                  this.style.addImage(b, { data: new i.RGBAImage({ width: Ve, height: ut }, gt), pixelRatio: G, stretchX: fe, stretchY: xe, content: Te, sdf: ie, version: 0 });
                } else {
                  if (R.width === void 0 || R.height === void 0) return this.fire(new i.ErrorEvent(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`")));
                  var wt = R.width, Et = R.height, zt = R.data, It = R;
                  this.style.addImage(b, { data: new i.RGBAImage({ width: wt, height: Et }, new Uint8Array(zt)), pixelRatio: G, stretchX: fe, stretchY: xe, content: Te, sdf: ie, version: 0, userImage: It }), It.onAdd && It.onAdd(this, b);
                }
              }, B.prototype.updateImage = function(b, R) {
                var j = this.style.getImage(b);
                if (!j) return this.fire(new i.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));
                var G = R instanceof li || ma && R instanceof ma ? i.browser.getImageData(R) : R, ie = G.width, fe = G.height, xe = G.data;
                if (ie === void 0 || fe === void 0) return this.fire(new i.ErrorEvent(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`")));
                if (ie !== j.data.width || fe !== j.data.height) return this.fire(new i.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));
                var Te = !(R instanceof li || ma && R instanceof ma);
                j.data.replace(xe, Te), this.style.updateImage(b, j);
              }, B.prototype.hasImage = function(b) {
                return b ? !!this.style.getImage(b) : (this.fire(new i.ErrorEvent(new Error("Missing required image id"))), !1);
              }, B.prototype.removeImage = function(b) {
                this.style.removeImage(b);
              }, B.prototype.loadImage = function(b, R) {
                i.getImage(this._requestManager.transformRequest(b, i.ResourceType.Image), R);
              }, B.prototype.listImages = function() {
                return this.style.listImages();
              }, B.prototype.addLayer = function(b, R) {
                return this._lazyInitEmptyStyle(), this.style.addLayer(b, R), this._update(!0);
              }, B.prototype.moveLayer = function(b, R) {
                return this.style.moveLayer(b, R), this._update(!0);
              }, B.prototype.removeLayer = function(b) {
                return this.style.removeLayer(b), this._update(!0);
              }, B.prototype.getLayer = function(b) {
                return this.style.getLayer(b);
              }, B.prototype.setLayerZoomRange = function(b, R, j) {
                return this.style.setLayerZoomRange(b, R, j), this._update(!0);
              }, B.prototype.setFilter = function(b, R, j) {
                return j === void 0 && (j = {}), this.style.setFilter(b, R, j), this._update(!0);
              }, B.prototype.getFilter = function(b) {
                return this.style.getFilter(b);
              }, B.prototype.setPaintProperty = function(b, R, j, G) {
                return G === void 0 && (G = {}), this.style.setPaintProperty(b, R, j, G), this._update(!0);
              }, B.prototype.getPaintProperty = function(b, R) {
                return this.style.getPaintProperty(b, R);
              }, B.prototype.setLayoutProperty = function(b, R, j, G) {
                return G === void 0 && (G = {}), this.style.setLayoutProperty(b, R, j, G), this._update(!0);
              }, B.prototype.getLayoutProperty = function(b, R) {
                return this.style.getLayoutProperty(b, R);
              }, B.prototype.setLight = function(b, R) {
                return R === void 0 && (R = {}), this._lazyInitEmptyStyle(), this.style.setLight(b, R), this._update(!0);
              }, B.prototype.getLight = function() {
                return this.style.getLight();
              }, B.prototype.setFeatureState = function(b, R) {
                return this.style.setFeatureState(b, R), this._update();
              }, B.prototype.removeFeatureState = function(b, R) {
                return this.style.removeFeatureState(b, R), this._update();
              }, B.prototype.getFeatureState = function(b) {
                return this.style.getFeatureState(b);
              }, B.prototype.getContainer = function() {
                return this._container;
              }, B.prototype.getCanvasContainer = function() {
                return this._canvasContainer;
              }, B.prototype.getCanvas = function() {
                return this._canvas;
              }, B.prototype._containerDimensions = function() {
                var b = 0, R = 0;
                return this._container && (b = this._container.clientWidth || 400, R = this._container.clientHeight || 300), [b, R];
              }, B.prototype._detectMissingCSS = function() {
                i.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color") !== "rgb(250, 128, 114)" && i.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.");
              }, B.prototype._setupContainer = function() {
                var b = this._container;
                b.classList.add("mapboxgl-map"), (this._missingCSSCanary = p.create("div", "mapboxgl-canary", b)).style.visibility = "hidden", this._detectMissingCSS();
                var R = this._canvasContainer = p.create("div", "mapboxgl-canvas-container", b);
                this._interactive && R.classList.add("mapboxgl-interactive"), this._canvas = p.create("canvas", "mapboxgl-canvas", R), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", "0"), this._canvas.setAttribute("aria-label", "Map"), this._canvas.setAttribute("role", "region");
                var j = this._containerDimensions();
                this._resizeCanvas(j[0], j[1]);
                var G = this._controlContainer = p.create("div", "mapboxgl-control-container", b), ie = this._controlPositions = {};
                ["top-left", "top-right", "bottom-left", "bottom-right"].forEach(function(fe) {
                  ie[fe] = p.create("div", "mapboxgl-ctrl-" + fe, G);
                }), this._container.addEventListener("scroll", this._onMapScroll, !1);
              }, B.prototype._resizeCanvas = function(b, R) {
                var j = i.browser.devicePixelRatio || 1;
                this._canvas.width = j * b, this._canvas.height = j * R, this._canvas.style.width = b + "px", this._canvas.style.height = R + "px";
              }, B.prototype._setupPainter = function() {
                var b = i.extend({}, h.webGLContextAttributes, { failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat, preserveDrawingBuffer: this._preserveDrawingBuffer, antialias: this._antialias || !1 }), R = this._canvas.getContext("webgl", b) || this._canvas.getContext("experimental-webgl", b);
                R ? (this.painter = new va(R, this.transform), i.webpSupported.testSupport(R)) : this.fire(new i.ErrorEvent(new Error("Failed to initialize WebGL")));
              }, B.prototype._contextLost = function(b) {
                b.preventDefault(), this._frame && (this._frame.cancel(), this._frame = null), this.fire(new i.Event("webglcontextlost", { originalEvent: b }));
              }, B.prototype._contextRestored = function(b) {
                this._setupPainter(), this.resize(), this._update(), this.fire(new i.Event("webglcontextrestored", { originalEvent: b }));
              }, B.prototype._onMapScroll = function(b) {
                if (b.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, !1;
              }, B.prototype.loaded = function() {
                return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
              }, B.prototype._update = function(b) {
                return this.style ? (this._styleDirty = this._styleDirty || b, this._sourcesDirty = !0, this.triggerRepaint(), this) : this;
              }, B.prototype._requestRenderFrame = function(b) {
                return this._update(), this._renderTaskQueue.add(b);
              }, B.prototype._cancelRenderFrame = function(b) {
                this._renderTaskQueue.remove(b);
              }, B.prototype._render = function(b) {
                var R, j = this, G = 0, ie = this.painter.context.extTimerQuery;
                if (this.listens("gpu-timing-frame") && (R = ie.createQueryEXT(), ie.beginQueryEXT(ie.TIME_ELAPSED_EXT, R), G = i.browser.now()), this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(b), !this._removed) {
                  var fe = !1;
                  if (this.style && this._styleDirty) {
                    this._styleDirty = !1;
                    var xe = this.transform.zoom, Te = i.browser.now();
                    this.style.zoomHistory.update(xe, Te);
                    var ze = new i.EvaluationParameters(xe, { now: Te, fadeDuration: this._fadeDuration, zoomHistory: this.style.zoomHistory, transition: this.style.getTransition() }), Ve = ze.crossFadingFactor();
                    Ve === 1 && Ve === this._crossFadingFactor || (fe = !0, this._crossFadingFactor = Ve), this.style.update(ze);
                  }
                  if (this.style && this._sourcesDirty && (this._sourcesDirty = !1, this.style._updateSources(this.transform)), this._placementDirty = this.style && this.style._updatePlacement(this.painter.transform, this.showCollisionBoxes, this._fadeDuration, this._crossSourceCollisions), this.painter.render(this.style, { showTileBoundaries: this.showTileBoundaries, showOverdrawInspector: this._showOverdrawInspector, rotating: this.isRotating(), zooming: this.isZooming(), moving: this.isMoving(), fadeDuration: this._fadeDuration, showPadding: this.showPadding, gpuTiming: !!this.listens("gpu-timing-layer") }), this.fire(new i.Event("render")), this.loaded() && !this._loaded && (this._loaded = !0, this.fire(new i.Event("load"))), this.style && (this.style.hasTransitions() || fe) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles(), this.listens("gpu-timing-frame")) {
                    var ut = i.browser.now() - G;
                    ie.endQueryEXT(ie.TIME_ELAPSED_EXT, R), setTimeout(function() {
                      var Et = ie.getQueryObjectEXT(R, ie.QUERY_RESULT_EXT) / 1e6;
                      ie.deleteQueryEXT(R), j.fire(new i.Event("gpu-timing-frame", { cpuTime: ut, gpuTime: Et }));
                    }, 50);
                  }
                  if (this.listens("gpu-timing-layer")) {
                    var gt = this.painter.collectGpuTimers();
                    setTimeout(function() {
                      var Et = j.painter.queryGpuTimers(gt);
                      j.fire(new i.Event("gpu-timing-layer", { layerTimes: Et }));
                    }, 50);
                  }
                  var wt = this._sourcesDirty || this._styleDirty || this._placementDirty;
                  return wt || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new i.Event("idle")), !this._loaded || this._fullyLoaded || wt || (this._fullyLoaded = !0), this;
                }
              }, B.prototype.remove = function() {
                this._hash && this._hash.remove();
                for (var b = 0, R = this._controls; b < R.length; b += 1) R[b].onRemove(this);
                this._controls = [], this._frame && (this._frame.cancel(), this._frame = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), i.window !== void 0 && (i.window.removeEventListener("resize", this._onWindowResize, !1), i.window.removeEventListener("orientationchange", this._onWindowResize, !1), i.window.removeEventListener("online", this._onWindowOnline, !1));
                var j = this.painter.context.gl.getExtension("WEBGL_lose_context");
                j && j.loseContext && j.loseContext(), Lc(this._canvasContainer), Lc(this._controlContainer), Lc(this._missingCSSCanary), this._container.classList.remove("mapboxgl-map"), this._removed = !0, this.fire(new i.Event("remove"));
              }, B.prototype.triggerRepaint = function() {
                var b = this;
                this.style && !this._frame && (this._frame = i.browser.frame(function(R) {
                  b._frame = null, b._render(R);
                }));
              }, B.prototype._onWindowOnline = function() {
                this._update();
              }, B.prototype._onWindowResize = function(b) {
                this._trackResize && this.resize({ originalEvent: b })._update();
              }, y.showTileBoundaries.get = function() {
                return !!this._showTileBoundaries;
              }, y.showTileBoundaries.set = function(b) {
                this._showTileBoundaries !== b && (this._showTileBoundaries = b, this._update());
              }, y.showPadding.get = function() {
                return !!this._showPadding;
              }, y.showPadding.set = function(b) {
                this._showPadding !== b && (this._showPadding = b, this._update());
              }, y.showCollisionBoxes.get = function() {
                return !!this._showCollisionBoxes;
              }, y.showCollisionBoxes.set = function(b) {
                this._showCollisionBoxes !== b && (this._showCollisionBoxes = b, b ? this.style._generateCollisionBoxes() : this._update());
              }, y.showOverdrawInspector.get = function() {
                return !!this._showOverdrawInspector;
              }, y.showOverdrawInspector.set = function(b) {
                this._showOverdrawInspector !== b && (this._showOverdrawInspector = b, this._update());
              }, y.repaint.get = function() {
                return !!this._repaint;
              }, y.repaint.set = function(b) {
                this._repaint !== b && (this._repaint = b, this.triggerRepaint());
              }, y.vertices.get = function() {
                return !!this._vertices;
              }, y.vertices.set = function(b) {
                this._vertices = b, this._update();
              }, B.prototype._setCacheLimits = function(b, R) {
                i.setCacheLimits(b, R);
              }, y.version.get = function() {
                return i.version;
              }, Object.defineProperties(B.prototype, y), B;
            }(vo);
            function Lc(Z) {
              Z.parentNode && Z.parentNode.removeChild(Z);
            }
            var ec = { showCompass: !0, showZoom: !0, visualizePitch: !1 }, rl = function(Z) {
              var B = this;
              this.options = i.extend({}, ec, Z), this._container = p.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), this._container.addEventListener("contextmenu", function(y) {
                return y.preventDefault();
              }), this.options.showZoom && (i.bindAll(["_setButtonTitle", "_updateZoomButtons"], this), this._zoomInButton = this._createButton("mapboxgl-ctrl-zoom-in", function(y) {
                return B._map.zoomIn({}, { originalEvent: y });
              }), p.create("span", "mapboxgl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", !0), this._zoomOutButton = this._createButton("mapboxgl-ctrl-zoom-out", function(y) {
                return B._map.zoomOut({}, { originalEvent: y });
              }), p.create("span", "mapboxgl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", !0)), this.options.showCompass && (i.bindAll(["_rotateCompassArrow"], this), this._compass = this._createButton("mapboxgl-ctrl-compass", function(y) {
                B.options.visualizePitch ? B._map.resetNorthPitch({}, { originalEvent: y }) : B._map.resetNorth({}, { originalEvent: y });
              }), this._compassIcon = p.create("span", "mapboxgl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", !0));
            };
            rl.prototype._updateZoomButtons = function() {
              var Z = this._map.getZoom(), B = Z === this._map.getMaxZoom(), y = Z === this._map.getMinZoom();
              this._zoomInButton.disabled = B, this._zoomOutButton.disabled = y, this._zoomInButton.setAttribute("aria-disabled", B.toString()), this._zoomOutButton.setAttribute("aria-disabled", y.toString());
            }, rl.prototype._rotateCompassArrow = function() {
              var Z = 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)";
              this._compassIcon.style.transform = Z;
            }, rl.prototype.onAdd = function(Z) {
              return this._map = Z, 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 Na(this._map, this._compass, this.options.visualizePitch)), this._container;
            }, rl.prototype.onRemove = function() {
              p.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;
            }, rl.prototype._createButton = function(Z, B) {
              var y = p.create("button", Z, this._container);
              return y.type = "button", y.addEventListener("click", B), y;
            }, rl.prototype._setButtonTitle = function(Z, B) {
              var y = this._map._getUIString("NavigationControl." + B);
              Z.title = y, Z.setAttribute("aria-label", y);
            };
            var Na = function(Z, B, y) {
              y === void 0 && (y = !1), this._clickTolerance = 10, this.element = B, this.mouseRotate = new Ll({ clickTolerance: Z.dragRotate._mouseRotate._clickTolerance }), this.map = Z, y && (this.mousePitch = new Pl({ clickTolerance: Z.dragRotate._mousePitch._clickTolerance })), i.bindAll(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "reset"], this), p.addEventListener(B, "mousedown", this.mousedown), p.addEventListener(B, "touchstart", this.touchstart, { passive: !1 }), p.addEventListener(B, "touchmove", this.touchmove), p.addEventListener(B, "touchend", this.touchend), p.addEventListener(B, "touchcancel", this.reset);
            };
            function il(Z, B, y) {
              if (Z = new i.LngLat(Z.lng, Z.lat), B) {
                var b = new i.LngLat(Z.lng - 360, Z.lat), R = new i.LngLat(Z.lng + 360, Z.lat), j = y.locationPoint(Z).distSqr(B);
                y.locationPoint(b).distSqr(B) < j ? Z = b : y.locationPoint(R).distSqr(B) < j && (Z = R);
              }
              for (; Math.abs(Z.lng - y.center.lng) > 180; ) {
                var G = y.locationPoint(Z);
                if (G.x >= 0 && G.y >= 0 && G.x <= y.width && G.y <= y.height) break;
                Z.lng > y.center.lng ? Z.lng -= 360 : Z.lng += 360;
              }
              return Z;
            }
            Na.prototype.down = function(Z, B) {
              this.mouseRotate.mousedown(Z, B), this.mousePitch && this.mousePitch.mousedown(Z, B), p.disableDrag();
            }, Na.prototype.move = function(Z, B) {
              var y = this.map, b = this.mouseRotate.mousemoveWindow(Z, B);
              if (b && b.bearingDelta && y.setBearing(y.getBearing() + b.bearingDelta), this.mousePitch) {
                var R = this.mousePitch.mousemoveWindow(Z, B);
                R && R.pitchDelta && y.setPitch(y.getPitch() + R.pitchDelta);
              }
            }, Na.prototype.off = function() {
              var Z = this.element;
              p.removeEventListener(Z, "mousedown", this.mousedown), p.removeEventListener(Z, "touchstart", this.touchstart, { passive: !1 }), p.removeEventListener(Z, "touchmove", this.touchmove), p.removeEventListener(Z, "touchend", this.touchend), p.removeEventListener(Z, "touchcancel", this.reset), this.offTemp();
            }, Na.prototype.offTemp = function() {
              p.enableDrag(), p.removeEventListener(i.window, "mousemove", this.mousemove), p.removeEventListener(i.window, "mouseup", this.mouseup);
            }, Na.prototype.mousedown = function(Z) {
              this.down(i.extend({}, Z, { ctrlKey: !0, preventDefault: function() {
                return Z.preventDefault();
              } }), p.mousePos(this.element, Z)), p.addEventListener(i.window, "mousemove", this.mousemove), p.addEventListener(i.window, "mouseup", this.mouseup);
            }, Na.prototype.mousemove = function(Z) {
              this.move(Z, p.mousePos(this.element, Z));
            }, Na.prototype.mouseup = function(Z) {
              this.mouseRotate.mouseupWindow(Z), this.mousePitch && this.mousePitch.mouseupWindow(Z), this.offTemp();
            }, Na.prototype.touchstart = function(Z) {
              Z.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = p.touchPos(this.element, Z.targetTouches)[0], this.down({ type: "mousedown", button: 0, ctrlKey: !0, preventDefault: function() {
                return Z.preventDefault();
              } }, this._startPos));
            }, Na.prototype.touchmove = function(Z) {
              Z.targetTouches.length !== 1 ? this.reset() : (this._lastPos = p.touchPos(this.element, Z.targetTouches)[0], this.move({ preventDefault: function() {
                return Z.preventDefault();
              } }, this._lastPos));
            }, Na.prototype.touchend = function(Z) {
              Z.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), this.reset();
            }, Na.prototype.reset = function() {
              this.mouseRotate.reset(), this.mousePitch && this.mousePitch.reset(), delete this._startPos, delete this._lastPos, this.offTemp();
            };
            var ni = { 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%)" };
            function Ci(Z, B, y) {
              var b = Z.classList;
              for (var R in ni) b.remove("mapboxgl-" + y + "-anchor-" + R);
              b.add("mapboxgl-" + y + "-anchor-" + B);
            }
            var us, al = function(Z) {
              function B(y, b) {
                if (Z.call(this), (y instanceof i.window.HTMLElement || b) && (y = i.extend({ element: y }, b)), i.bindAll(["_update", "_onMove", "_onUp", "_addDragHandler", "_onMapClick", "_onKeyPress"], this), this._anchor = y && y.anchor || "center", this._color = y && y.color || "#3FB1CE", this._scale = y && y.scale || 1, this._draggable = y && y.draggable || !1, this._clickTolerance = y && y.clickTolerance || 0, this._isDragging = !1, this._state = "inactive", this._rotation = y && y.rotation || 0, this._rotationAlignment = y && y.rotationAlignment || "auto", this._pitchAlignment = y && y.pitchAlignment && y.pitchAlignment !== "auto" ? y.pitchAlignment : this._rotationAlignment, y && y.element) this._element = y.element, this._offset = i.Point.convert(y && y.offset || [0, 0]);
                else {
                  this._defaultMarker = !0, this._element = p.create("div"), this._element.setAttribute("aria-label", "Map marker");
                  var R = p.createNS("http://www.w3.org/2000/svg", "svg");
                  R.setAttributeNS(null, "display", "block"), R.setAttributeNS(null, "height", "41px"), R.setAttributeNS(null, "width", "27px"), R.setAttributeNS(null, "viewBox", "0 0 27 41");
                  var j = p.createNS("http://www.w3.org/2000/svg", "g");
                  j.setAttributeNS(null, "stroke", "none"), j.setAttributeNS(null, "stroke-width", "1"), j.setAttributeNS(null, "fill", "none"), j.setAttributeNS(null, "fill-rule", "evenodd");
                  var G = p.createNS("http://www.w3.org/2000/svg", "g");
                  G.setAttributeNS(null, "fill-rule", "nonzero");
                  var ie = p.createNS("http://www.w3.org/2000/svg", "g");
                  ie.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), ie.setAttributeNS(null, "fill", "#000000");
                  for (var fe = 0, xe = [{ 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" }]; fe < xe.length; fe += 1) {
                    var Te = xe[fe], ze = p.createNS("http://www.w3.org/2000/svg", "ellipse");
                    ze.setAttributeNS(null, "opacity", "0.04"), ze.setAttributeNS(null, "cx", "10.5"), ze.setAttributeNS(null, "cy", "5.80029008"), ze.setAttributeNS(null, "rx", Te.rx), ze.setAttributeNS(null, "ry", Te.ry), ie.appendChild(ze);
                  }
                  var Ve = p.createNS("http://www.w3.org/2000/svg", "g");
                  Ve.setAttributeNS(null, "fill", this._color);
                  var ut = p.createNS("http://www.w3.org/2000/svg", "path");
                  ut.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"), Ve.appendChild(ut);
                  var gt = p.createNS("http://www.w3.org/2000/svg", "g");
                  gt.setAttributeNS(null, "opacity", "0.25"), gt.setAttributeNS(null, "fill", "#000000");
                  var wt = p.createNS("http://www.w3.org/2000/svg", "path");
                  wt.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"), gt.appendChild(wt);
                  var Et = p.createNS("http://www.w3.org/2000/svg", "g");
                  Et.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), Et.setAttributeNS(null, "fill", "#FFFFFF");
                  var zt = p.createNS("http://www.w3.org/2000/svg", "g");
                  zt.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
                  var It = p.createNS("http://www.w3.org/2000/svg", "circle");
                  It.setAttributeNS(null, "fill", "#000000"), It.setAttributeNS(null, "opacity", "0.25"), It.setAttributeNS(null, "cx", "5.5"), It.setAttributeNS(null, "cy", "5.5"), It.setAttributeNS(null, "r", "5.4999962");
                  var jt = p.createNS("http://www.w3.org/2000/svg", "circle");
                  jt.setAttributeNS(null, "fill", "#FFFFFF"), jt.setAttributeNS(null, "cx", "5.5"), jt.setAttributeNS(null, "cy", "5.5"), jt.setAttributeNS(null, "r", "5.4999962"), zt.appendChild(It), zt.appendChild(jt), G.appendChild(ie), G.appendChild(Ve), G.appendChild(gt), G.appendChild(Et), G.appendChild(zt), R.appendChild(G), R.setAttributeNS(null, "height", 41 * this._scale + "px"), R.setAttributeNS(null, "width", 27 * this._scale + "px"), this._element.appendChild(R), this._offset = i.Point.convert(y && y.offset || [0, -14]);
                }
                this._element.classList.add("mapboxgl-marker"), this._element.addEventListener("dragstart", function(Lt) {
                  Lt.preventDefault();
                }), this._element.addEventListener("mousedown", function(Lt) {
                  Lt.preventDefault();
                }), Ci(this._element, this._anchor, "marker"), this._popup = null;
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.addTo = function(y) {
                return this.remove(), this._map = y, y.getCanvasContainer().appendChild(this._element), y.on("move", this._update), y.on("moveend", this._update), this.setDraggable(this._draggable), this._update(), this._map.on("click", this._onMapClick), this;
              }, B.prototype.remove = function() {
                return this._map && (this._map.off("click", this._onMapClick), this._map.off("move", this._update), this._map.off("moveend", 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), p.remove(this._element), this._popup && this._popup.remove(), this;
              }, B.prototype.getLngLat = function() {
                return this._lngLat;
              }, B.prototype.setLngLat = function(y) {
                return this._lngLat = i.LngLat.convert(y), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this;
              }, B.prototype.getElement = function() {
                return this._element;
              }, B.prototype.setPopup = function(y) {
                if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), y) {
                  if (!("offset" in y.options)) {
                    var b = 13.5, R = Math.sqrt(Math.pow(b, 2) / 2);
                    y.options.offset = this._defaultMarker ? { top: [0, 0], "top-left": [0, 0], "top-right": [0, 0], bottom: [0, -38.1], "bottom-left": [R, -1 * (24.6 + R)], "bottom-right": [-R, -1 * (24.6 + R)], left: [b, -24.6], right: [-13.5, -24.6] } : this._offset;
                  }
                  this._popup = y, this._lngLat && this._popup.setLngLat(this._lngLat), this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress);
                }
                return this;
              }, B.prototype._onKeyPress = function(y) {
                var b = y.code, R = y.charCode || y.keyCode;
                b !== "Space" && b !== "Enter" && R !== 32 && R !== 13 || this.togglePopup();
              }, B.prototype._onMapClick = function(y) {
                var b = y.originalEvent.target, R = this._element;
                this._popup && (b === R || R.contains(b)) && this.togglePopup();
              }, B.prototype.getPopup = function() {
                return this._popup;
              }, B.prototype.togglePopup = function() {
                var y = this._popup;
                return y ? (y.isOpen() ? y.remove() : y.addTo(this._map), this) : this;
              }, B.prototype._update = function(y) {
                if (this._map) {
                  this._map.transform.renderWorldCopies && (this._lngLat = il(this._lngLat, this._pos, this._map.transform)), this._pos = this._map.project(this._lngLat)._add(this._offset);
                  var b = "";
                  this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? b = "rotateZ(" + this._rotation + "deg)" : this._rotationAlignment === "map" && (b = "rotateZ(" + (this._rotation - this._map.getBearing()) + "deg)");
                  var R = "";
                  this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? R = "rotateX(0deg)" : this._pitchAlignment === "map" && (R = "rotateX(" + this._map.getPitch() + "deg)"), y && y.type !== "moveend" || (this._pos = this._pos.round()), p.setTransform(this._element, ni[this._anchor] + " translate(" + this._pos.x + "px, " + this._pos.y + "px) " + R + " " + b);
                }
              }, B.prototype.getOffset = function() {
                return this._offset;
              }, B.prototype.setOffset = function(y) {
                return this._offset = i.Point.convert(y), this._update(), this;
              }, B.prototype._onMove = function(y) {
                if (!this._isDragging) {
                  var b = this._clickTolerance || this._map._clickTolerance;
                  this._isDragging = y.point.dist(this._pointerdownPos) >= b;
                }
                this._isDragging && (this._pos = y.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 i.Event("dragstart"))), this.fire(new i.Event("drag")));
              }, B.prototype._onUp = function() {
                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 i.Event("dragend")), this._state = "inactive";
              }, B.prototype._addDragHandler = function(y) {
                this._element.contains(y.originalEvent.target) && (y.preventDefault(), this._positionDelta = y.point.sub(this._pos).add(this._offset), this._pointerdownPos = y.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));
              }, B.prototype.setDraggable = function(y) {
                return this._draggable = !!y, this._map && (y ? (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;
              }, B.prototype.isDraggable = function() {
                return this._draggable;
              }, B.prototype.setRotation = function(y) {
                return this._rotation = y || 0, this._update(), this;
              }, B.prototype.getRotation = function() {
                return this._rotation;
              }, B.prototype.setRotationAlignment = function(y) {
                return this._rotationAlignment = y || "auto", this._update(), this;
              }, B.prototype.getRotationAlignment = function() {
                return this._rotationAlignment;
              }, B.prototype.setPitchAlignment = function(y) {
                return this._pitchAlignment = y && y !== "auto" ? y : this._rotationAlignment, this._update(), this;
              }, B.prototype.getPitchAlignment = function() {
                return this._pitchAlignment;
              }, B;
            }(i.Evented), ou = { positionOptions: { enableHighAccuracy: !1, maximumAge: 0, timeout: 6e3 }, fitBoundsOptions: { maxZoom: 15 }, trackUserLocation: !1, showAccuracyCircle: !0, showUserLocation: !0 }, Za = 0, su = !1, na = function(Z) {
              function B(y) {
                Z.call(this), this.options = i.extend({}, ou, y), i.bindAll(["_onSuccess", "_onError", "_onZoom", "_finish", "_setupUI", "_updateCamera", "_updateMarker"], this);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.onAdd = function(y) {
                return this._map = y, this._container = p.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), b = this._setupUI, us !== void 0 ? b(us) : i.window.navigator.permissions !== void 0 ? i.window.navigator.permissions.query({ name: "geolocation" }).then(function(R) {
                  us = R.state !== "denied", b(us);
                }) : (us = !!i.window.navigator.geolocation, b(us)), this._container;
                var b;
              }, B.prototype.onRemove = function() {
                this._geolocationWatchID !== void 0 && (i.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(), p.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, Za = 0, su = !1;
              }, B.prototype._isOutOfMapMaxBounds = function(y) {
                var b = this._map.getMaxBounds(), R = y.coords;
                return b && (R.longitude < b.getWest() || R.longitude > b.getEast() || R.latitude < b.getSouth() || R.latitude > b.getNorth());
              }, B.prototype._setErrorState = function() {
                switch (this._watchState) {
                  case "WAITING_ACTIVE":
                    this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");
                    break;
                  case "ACTIVE_LOCK":
                    this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");
                    break;
                  case "BACKGROUND":
                    this._watchState = "BACKGROUND_ERROR", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");
                }
              }, B.prototype._onSuccess = function(y) {
                if (this._map) {
                  if (this._isOutOfMapMaxBounds(y)) return this._setErrorState(), this.fire(new i.Event("outofmaxbounds", y)), this._updateMarker(), void this._finish();
                  if (this.options.trackUserLocation) switch (this._lastKnownPosition = y, this._watchState) {
                    case "WAITING_ACTIVE":
                    case "ACTIVE_LOCK":
                    case "ACTIVE_ERROR":
                      this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                      break;
                    case "BACKGROUND":
                    case "BACKGROUND_ERROR":
                      this._watchState = "BACKGROUND", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");
                  }
                  this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(y), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(y), this.options.showUserLocation && this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"), this.fire(new i.Event("geolocate", y)), this._finish();
                }
              }, B.prototype._updateCamera = function(y) {
                var b = new i.LngLat(y.coords.longitude, y.coords.latitude), R = y.coords.accuracy, j = this._map.getBearing(), G = i.extend({ bearing: j }, this.options.fitBoundsOptions);
                this._map.fitBounds(b.toBounds(R), G, { geolocateSource: !0 });
              }, B.prototype._updateMarker = function(y) {
                if (y) {
                  var b = new i.LngLat(y.coords.longitude, y.coords.latitude);
                  this._accuracyCircleMarker.setLngLat(b).addTo(this._map), this._userLocationDotMarker.setLngLat(b).addTo(this._map), this._accuracy = y.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
                } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove();
              }, B.prototype._updateCircleRadius = function() {
                var y = this._map._container.clientHeight / 2, b = this._map.unproject([0, y]), R = this._map.unproject([1, y]), j = b.distanceTo(R), G = Math.ceil(2 * this._accuracy / j);
                this._circleElement.style.width = G + "px", this._circleElement.style.height = G + "px";
              }, B.prototype._onZoom = function() {
                this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
              }, B.prototype._onError = function(y) {
                if (this._map) {
                  if (this.options.trackUserLocation) if (y.code === 1) {
                    this._watchState = "OFF", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this._geolocateButton.disabled = !0;
                    var b = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                    this._geolocateButton.title = b, this._geolocateButton.setAttribute("aria-label", b), this._geolocationWatchID !== void 0 && this._clearWatch();
                  } else {
                    if (y.code === 3 && su) return;
                    this._setErrorState();
                  }
                  this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("mapboxgl-user-location-dot-stale"), this.fire(new i.Event("error", y)), this._finish();
                }
              }, B.prototype._finish = function() {
                this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0;
              }, B.prototype._setupUI = function(y) {
                var b = this;
                if (this._container.addEventListener("contextmenu", function(G) {
                  return G.preventDefault();
                }), this._geolocateButton = p.create("button", "mapboxgl-ctrl-geolocate", this._container), p.create("span", "mapboxgl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", !0), this._geolocateButton.type = "button", y === !1) {
                  i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");
                  var R = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                  this._geolocateButton.disabled = !0, this._geolocateButton.title = R, this._geolocateButton.setAttribute("aria-label", R);
                } else {
                  var j = this._map._getUIString("GeolocateControl.FindMyLocation");
                  this._geolocateButton.title = j, this._geolocateButton.setAttribute("aria-label", j);
                }
                this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = p.create("div", "mapboxgl-user-location-dot"), this._userLocationDotMarker = new al(this._dotElement), this._circleElement = p.create("div", "mapboxgl-user-location-accuracy-circle"), this._accuracyCircleMarker = new al({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onZoom)), this._geolocateButton.addEventListener("click", this.trigger.bind(this)), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", function(G) {
                  var ie = G.originalEvent && G.originalEvent.type === "resize";
                  G.geolocateSource || b._watchState !== "ACTIVE_LOCK" || ie || (b._watchState = "BACKGROUND", b._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"), b._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), b.fire(new i.Event("trackuserlocationend")));
                });
              }, B.prototype.trigger = function() {
                if (!this._setup) return i.warnOnce("Geolocate control triggered before added to a map"), !1;
                if (this.options.trackUserLocation) {
                  switch (this._watchState) {
                    case "OFF":
                      this._watchState = "WAITING_ACTIVE", this.fire(new i.Event("trackuserlocationstart"));
                      break;
                    case "WAITING_ACTIVE":
                    case "ACTIVE_LOCK":
                    case "ACTIVE_ERROR":
                    case "BACKGROUND_ERROR":
                      Za--, su = !1, this._watchState = "OFF", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"), this.fire(new i.Event("trackuserlocationend"));
                      break;
                    case "BACKGROUND":
                      this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"), this._lastKnownPosition && this._updateCamera(this._lastKnownPosition), this.fire(new i.Event("trackuserlocationstart"));
                  }
                  switch (this._watchState) {
                    case "WAITING_ACTIVE":
                      this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                      break;
                    case "ACTIVE_LOCK":
                      this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");
                      break;
                    case "ACTIVE_ERROR":
                      this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");
                      break;
                    case "BACKGROUND":
                      this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");
                      break;
                    case "BACKGROUND_ERROR":
                      this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");
                  }
                  if (this._watchState === "OFF" && this._geolocationWatchID !== void 0) this._clearWatch();
                  else if (this._geolocationWatchID === void 0) {
                    var y;
                    this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), ++Za > 1 ? (y = { maximumAge: 6e5, timeout: 0 }, su = !0) : (y = this.options.positionOptions, su = !1), this._geolocationWatchID = i.window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, y);
                  }
                } else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess, this._onError, this.options.positionOptions), this._timeoutId = setTimeout(this._finish, 1e4);
                return !0;
              }, B.prototype._clearWatch = function() {
                i.window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0, this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "false"), this.options.showUserLocation && this._updateMarker(null);
              }, B;
            }(i.Evented), tc = { maxWidth: 100, unit: "metric" }, bi = function(Z) {
              this.options = i.extend({}, tc, Z), i.bindAll(["_onMove", "setUnit"], this);
            };
            function ci(Z, B, y) {
              var b = y && y.maxWidth || 100, R = Z._container.clientHeight / 2, j = Z.unproject([0, R]), G = Z.unproject([b, R]), ie = j.distanceTo(G);
              if (y && y.unit === "imperial") {
                var fe = 3.2808 * ie;
                fe > 5280 ? He(B, b, fe / 5280, Z._getUIString("ScaleControl.Miles")) : He(B, b, fe, Z._getUIString("ScaleControl.Feet"));
              } else y && y.unit === "nautical" ? He(B, b, ie / 1852, Z._getUIString("ScaleControl.NauticalMiles")) : ie >= 1e3 ? He(B, b, ie / 1e3, Z._getUIString("ScaleControl.Kilometers")) : He(B, b, ie, Z._getUIString("ScaleControl.Meters"));
            }
            function He(Z, B, y, b) {
              var R, j, G, ie = (R = y, (j = Math.pow(10, ("" + Math.floor(R)).length - 1)) * ((G = R / j) >= 10 ? 10 : G >= 5 ? 5 : G >= 3 ? 3 : G >= 2 ? 2 : G >= 1 ? 1 : function(xe) {
                var Te = Math.pow(10, Math.ceil(-Math.log(xe) / Math.LN10));
                return Math.round(xe * Te) / Te;
              }(G))), fe = ie / y;
              Z.style.width = B * fe + "px", Z.innerHTML = ie + "&nbsp;" + b;
            }
            bi.prototype.getDefaultPosition = function() {
              return "bottom-left";
            }, bi.prototype._onMove = function() {
              ci(this._map, this._container, this.options);
            }, bi.prototype.onAdd = function(Z) {
              return this._map = Z, this._container = p.create("div", "mapboxgl-ctrl mapboxgl-ctrl-scale", Z.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
            }, bi.prototype.onRemove = function() {
              p.remove(this._container), this._map.off("move", this._onMove), this._map = void 0;
            }, bi.prototype.setUnit = function(Z) {
              this.options.unit = Z, ci(this._map, this._container, this.options);
            };
            var Pe = function(Z) {
              this._fullscreen = !1, Z && Z.container && (Z.container instanceof i.window.HTMLElement ? this._container = Z.container : i.warnOnce("Full screen control 'container' must be a DOM element.")), i.bindAll(["_onClickFullscreen", "_changeIcon"], this), "onfullscreenchange" in i.window.document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in i.window.document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in i.window.document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in i.window.document && (this._fullscreenchange = "MSFullscreenChange");
            };
            Pe.prototype.onAdd = function(Z) {
              return this._map = Z, this._container || (this._container = this._map.getContainer()), this._controlContainer = p.create("div", "mapboxgl-ctrl mapboxgl-ctrl-group"), this._checkFullscreenSupport() ? this._setupUI() : (this._controlContainer.style.display = "none", i.warnOnce("This device does not support fullscreen mode.")), this._controlContainer;
            }, Pe.prototype.onRemove = function() {
              p.remove(this._controlContainer), this._map = null, i.window.document.removeEventListener(this._fullscreenchange, this._changeIcon);
            }, Pe.prototype._checkFullscreenSupport = function() {
              return !!(i.window.document.fullscreenEnabled || i.window.document.mozFullScreenEnabled || i.window.document.msFullscreenEnabled || i.window.document.webkitFullscreenEnabled);
            }, Pe.prototype._setupUI = function() {
              var Z = this._fullscreenButton = p.create("button", "mapboxgl-ctrl-fullscreen", this._controlContainer);
              p.create("span", "mapboxgl-ctrl-icon", Z).setAttribute("aria-hidden", !0), Z.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), i.window.document.addEventListener(this._fullscreenchange, this._changeIcon);
            }, Pe.prototype._updateTitle = function() {
              var Z = this._getTitle();
              this._fullscreenButton.setAttribute("aria-label", Z), this._fullscreenButton.title = Z;
            }, Pe.prototype._getTitle = function() {
              return this._map._getUIString(this._isFullscreen() ? "FullscreenControl.Exit" : "FullscreenControl.Enter");
            }, Pe.prototype._isFullscreen = function() {
              return this._fullscreen;
            }, Pe.prototype._changeIcon = function() {
              (i.window.document.fullscreenElement || i.window.document.mozFullScreenElement || i.window.document.webkitFullscreenElement || i.window.document.msFullscreenElement) === this._container !== this._fullscreen && (this._fullscreen = !this._fullscreen, this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"), this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"), this._updateTitle());
            }, Pe.prototype._onClickFullscreen = function() {
              this._isFullscreen() ? i.window.document.exitFullscreen ? i.window.document.exitFullscreen() : i.window.document.mozCancelFullScreen ? i.window.document.mozCancelFullScreen() : i.window.document.msExitFullscreen ? i.window.document.msExitFullscreen() : i.window.document.webkitCancelFullScreen && i.window.document.webkitCancelFullScreen() : this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen && this._container.webkitRequestFullscreen();
            };
            var it = { closeButton: !0, closeOnClick: !0, focusAfterOpen: !0, className: "", maxWidth: "240px" }, bt = ["a[href]", "[tabindex]:not([tabindex='-1'])", "[contenteditable]:not([contenteditable='false'])", "button:not([disabled])", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].join(", "), Ue = function(Z) {
              function B(y) {
                Z.call(this), this.options = i.extend(Object.create(it), y), i.bindAll(["_update", "_onClose", "remove", "_onMouseMove", "_onMouseUp", "_onDrag"], this);
              }
              return Z && (B.__proto__ = Z), B.prototype = Object.create(Z && Z.prototype), B.prototype.constructor = B, B.prototype.addTo = function(y) {
                return this._map && this.remove(), this._map = y, 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("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.add("mapboxgl-track-pointer")) : this._map.on("move", this._update), this.fire(new i.Event("open")), this;
              }, B.prototype.isOpen = function() {
                return !!this._map;
              }, B.prototype.remove = function() {
                return this._content && p.remove(this._content), this._container && (p.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), delete this._map), this.fire(new i.Event("close")), this;
              }, B.prototype.getLngLat = function() {
                return this._lngLat;
              }, B.prototype.setLngLat = function(y) {
                return this._lngLat = i.LngLat.convert(y), this._pos = 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("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")), this;
              }, B.prototype.trackPointer = function() {
                return this._trackPointer = !0, this._pos = 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("mapboxgl-popup-track-pointer"), this._map._canvasContainer.classList.add("mapboxgl-track-pointer")), this;
              }, B.prototype.getElement = function() {
                return this._container;
              }, B.prototype.setText = function(y) {
                return this.setDOMContent(i.window.document.createTextNode(y));
              }, B.prototype.setHTML = function(y) {
                var b, R = i.window.document.createDocumentFragment(), j = i.window.document.createElement("body");
                for (j.innerHTML = y; b = j.firstChild; ) R.appendChild(b);
                return this.setDOMContent(R);
              }, B.prototype.getMaxWidth = function() {
                return this._container && this._container.style.maxWidth;
              }, B.prototype.setMaxWidth = function(y) {
                return this.options.maxWidth = y, this._update(), this;
              }, B.prototype.setDOMContent = function(y) {
                if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
                else this._content = p.create("div", "mapboxgl-popup-content", this._container);
                return this._content.appendChild(y), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
              }, B.prototype.addClassName = function(y) {
                this._container && this._container.classList.add(y);
              }, B.prototype.removeClassName = function(y) {
                this._container && this._container.classList.remove(y);
              }, B.prototype.setOffset = function(y) {
                return this.options.offset = y, this._update(), this;
              }, B.prototype.toggleClassName = function(y) {
                if (this._container) return this._container.classList.toggle(y);
              }, B.prototype._createCloseButton = function() {
                this.options.closeButton && (this._closeButton = p.create("button", "mapboxgl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.setAttribute("aria-label", "Close popup"), this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
              }, B.prototype._onMouseUp = function(y) {
                this._update(y.point);
              }, B.prototype._onMouseMove = function(y) {
                this._update(y.point);
              }, B.prototype._onDrag = function(y) {
                this._update(y.point);
              }, B.prototype._update = function(y) {
                var b = this, R = this._lngLat || this._trackPointer;
                if (this._map && R && this._content && (this._container || (this._container = p.create("div", "mapboxgl-popup", this._map.getContainer()), this._tip = p.create("div", "mapboxgl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className && this.options.className.split(" ").forEach(function(Ve) {
                  return b._container.classList.add(Ve);
                }), this._trackPointer && this._container.classList.add("mapboxgl-popup-track-pointer")), this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._map.transform.renderWorldCopies && !this._trackPointer && (this._lngLat = il(this._lngLat, this._pos, this._map.transform)), !this._trackPointer || y)) {
                  var j = this._pos = this._trackPointer && y ? y : this._map.project(this._lngLat), G = this.options.anchor, ie = Qe(this.options.offset);
                  if (!G) {
                    var fe, xe = this._container.offsetWidth, Te = this._container.offsetHeight;
                    fe = j.y + ie.bottom.y < Te ? ["top"] : j.y > this._map.transform.height - Te ? ["bottom"] : [], j.x < xe / 2 ? fe.push("left") : j.x > this._map.transform.width - xe / 2 && fe.push("right"), G = fe.length === 0 ? "bottom" : fe.join("-");
                  }
                  var ze = j.add(ie[G]).round();
                  p.setTransform(this._container, ni[G] + " translate(" + ze.x + "px," + ze.y + "px)"), Ci(this._container, G, "popup");
                }
              }, B.prototype._focusFirstElement = function() {
                if (this.options.focusAfterOpen && this._container) {
                  var y = this._container.querySelector(bt);
                  y && y.focus();
                }
              }, B.prototype._onClose = function() {
                this.remove();
              }, B;
            }(i.Evented);
            function Qe(Z) {
              if (Z) {
                if (typeof Z == "number") {
                  var B = Math.round(Math.sqrt(0.5 * Math.pow(Z, 2)));
                  return { center: new i.Point(0, 0), top: new i.Point(0, Z), "top-left": new i.Point(B, B), "top-right": new i.Point(-B, B), bottom: new i.Point(0, -Z), "bottom-left": new i.Point(B, -B), "bottom-right": new i.Point(-B, -B), left: new i.Point(Z, 0), right: new i.Point(-Z, 0) };
                }
                if (Z instanceof i.Point || Array.isArray(Z)) {
                  var y = i.Point.convert(Z);
                  return { center: y, top: y, "top-left": y, "top-right": y, bottom: y, "bottom-left": y, "bottom-right": y, left: y, right: y };
                }
                return { center: i.Point.convert(Z.center || [0, 0]), top: i.Point.convert(Z.top || [0, 0]), "top-left": i.Point.convert(Z["top-left"] || [0, 0]), "top-right": i.Point.convert(Z["top-right"] || [0, 0]), bottom: i.Point.convert(Z.bottom || [0, 0]), "bottom-left": i.Point.convert(Z["bottom-left"] || [0, 0]), "bottom-right": i.Point.convert(Z["bottom-right"] || [0, 0]), left: i.Point.convert(Z.left || [0, 0]), right: i.Point.convert(Z.right || [0, 0]) };
              }
              return Qe(new i.Point(0, 0));
            }
            var ht = { version: i.version, supported: h, setRTLTextPlugin: i.setRTLTextPlugin, getRTLTextPluginStatus: i.getRTLTextPluginStatus, Map: bl, NavigationControl: rl, GeolocateControl: na, AttributionControl: Ts, ScaleControl: bi, FullscreenControl: Pe, Popup: Ue, Marker: al, Style: Sr, LngLat: i.LngLat, LngLatBounds: i.LngLatBounds, Point: i.Point, MercatorCoordinate: i.MercatorCoordinate, Evented: i.Evented, config: i.config, prewarm: function() {
              Bt().acquire(lt);
            }, clearPrewarmedResources: function() {
              var Z = Ot;
              Z && (Z.isPreloaded() && Z.numActive() === 1 ? (Z.release(lt), Ot = 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()"));
            }, get accessToken() {
              return i.config.ACCESS_TOKEN;
            }, set accessToken(Z) {
              i.config.ACCESS_TOKEN = Z;
            }, get baseApiUrl() {
              return i.config.API_URL;
            }, set baseApiUrl(Z) {
              i.config.API_URL = Z;
            }, get workerCount() {
              return st.workerCount;
            }, set workerCount(Z) {
              st.workerCount = Z;
            }, get maxParallelImageRequests() {
              return i.config.MAX_PARALLEL_IMAGE_REQUESTS;
            }, set maxParallelImageRequests(Z) {
              i.config.MAX_PARALLEL_IMAGE_REQUESTS = Z;
            }, clearStorage: function(Z) {
              i.clearTileCache(Z);
            }, workerUrl: "" };
            return ht;
          }), l;
        }();
      }, 27549: function(o, s, n) {
        o.exports = n(55366);
      }, 55366: function(o, s, n) {
        var l = n(31625), u = n(75144), i = n(5137), h = n(78112), p = n(6807), _ = n(68650), d = n(83473), f = n(60201), c = n(10275), g = n(62914);
        function m(x, w) {
          for (var k = w[0], S = w[1], A = 1 / (w[2] - k), C = 1 / (w[3] - S), D = new Array(x.length), L = 0, E = x.length / 2; L < E; L++) D[2 * L] = u((x[2 * L] - k) * A, 0, 1), D[2 * L + 1] = u((x[2 * L + 1] - S) * C, 0, 1);
          return D;
        }
        o.exports = function(x, w) {
          w || (w = {}), x = d(x, "float64"), w = p(w, { bounds: "range bounds dataBox databox", maxDepth: "depth maxDepth maxdepth level maxLevel maxlevel levels", dtype: "type dtype format out dst output destination" });
          var k = _(w.maxDepth, 255), S = _(w.bounds, h(x, 2));
          S[0] === S[2] && S[2]++, S[1] === S[3] && S[3]++;
          var A, C = m(x, S), D = x.length >>> 1;
          w.dtype || (w.dtype = "array"), typeof w.dtype == "string" ? A = new (c(w.dtype))(D) : w.dtype && (A = w.dtype, Array.isArray(A) && (A.length = D));
          for (var L = 0; L < D; ++L) A[L] = L;
          var E = [], P = [], I = [], M = [];
          (function q(K, re, Y, te, ee, X) {
            if (!te.length) return null;
            var Q = E[ee] || (E[ee] = []), ue = I[ee] || (I[ee] = []), ce = P[ee] || (P[ee] = []), he = Q.length;
            if (++ee > k || X > 1073741824) {
              for (var de = 0; de < te.length; de++) Q.push(te[de]), ue.push(X), ce.push(null, null, null, null);
              return he;
            }
            if (Q.push(te[0]), ue.push(X), te.length <= 1) return ce.push(null, null, null, null), he;
            for (var ne = 0.5 * Y, ae = K + ne, se = re + ne, me = [], ye = [], pe = [], be = [], Ae = 1, Se = te.length; Ae < Se; Ae++) {
              var Me = te[Ae], De = C[2 * Me], Le = C[2 * Me + 1];
              De < ae ? Le < se ? me.push(Me) : ye.push(Me) : Le < se ? pe.push(Me) : be.push(Me);
            }
            return X <<= 2, ce.push(q(K, re, ne, me, ee, X), q(K, se, ne, ye, ee, X + 1), q(ae, re, ne, pe, ee, X + 2), q(ae, se, ne, be, ee, X + 3)), he;
          })(0, 0, 1, A, 0, 1);
          for (var O = 0, T = 0; T < E.length; T++) {
            var z = E[T];
            if (A.set) A.set(z, O);
            else for (var F = 0, U = z.length; F < U; F++) A[F + O] = z[F];
            var V = O + E[T].length;
            M[T] = [O, V], O = V;
          }
          return A.range = function() {
            for (var q, K = [], re = arguments.length; re--; ) K[re] = arguments[re];
            if (f(K[K.length - 1])) {
              var Y = K.pop();
              K.length || Y.x == null && Y.l == null && Y.left == null || (K = [Y], q = {}), q = p(Y, { level: "level maxLevel", d: "d diam diameter r radius px pxSize pixel pixelSize maxD size minSize", lod: "lod details ranges offsets" });
            } else q = {};
            K.length || (K = S);
            var te, ee = i.apply(void 0, K), X = [Math.min(ee.x, ee.x + ee.width), Math.min(ee.y, ee.y + ee.height), Math.max(ee.x, ee.x + ee.width), Math.max(ee.y, ee.y + ee.height)], Q = X[0], ue = X[1], ce = X[2], he = X[3], de = m([Q, ue, ce, he], S), ne = de[0], ae = de[1], se = de[2], me = de[3], ye = _(q.level, E.length);
            if (q.d != null && (typeof q.d == "number" ? te = [q.d, q.d] : q.d.length && (te = q.d), ye = Math.min(Math.max(Math.ceil(-g(Math.abs(te[0]) / (S[2] - S[0]))), Math.ceil(-g(Math.abs(te[1]) / (S[3] - S[1])))), ye)), ye = Math.min(ye, E.length), q.lod) return function(be, Ae, Se, Me, De) {
              for (var Le = [], We = 0; We < De; We++) {
                var Ee = I[We], Ne = M[We][0], Ie = $(be, Ae, We), ge = $(Se, Me, We), Ce = l.ge(Ee, Ie), we = l.gt(Ee, ge, Ce, Ee.length - 1);
                Le[We] = [Ce + Ne, we + Ne];
              }
              return Le;
            }(ne, ae, se, me, ye);
            var pe = [];
            return function be(Ae, Se, Me, De, Le, We) {
              if (Le !== null && We !== null && !(ne > Ae + Me || ae > Se + Me || se < Ae || me < Se || De >= ye || Le === We)) {
                var Ee = E[De];
                We === void 0 && (We = Ee.length);
                for (var Ne = Le; Ne < We; Ne++) {
                  var Ie = Ee[Ne], ge = x[2 * Ie], Ce = x[2 * Ie + 1];
                  ge >= Q && ge <= ce && Ce >= ue && Ce <= he && pe.push(Ie);
                }
                var we = P[De], Ge = we[4 * Le + 0], Re = we[4 * Le + 1], je = we[4 * Le + 2], Ke = we[4 * Le + 3], tt = function($e, Ze) {
                  for (var ct = null, ft = 0; ct === null; ) if (ct = $e[4 * Ze + ft], ++ft > $e.length) return null;
                  return ct;
                }(we, Le + 1), _e = 0.5 * Me, Be = De + 1;
                be(Ae, Se, _e, Be, Ge, Re || je || Ke || tt), be(Ae, Se + _e, _e, Be, Re, je || Ke || tt), be(Ae + _e, Se, _e, Be, je, Ke || tt), be(Ae + _e, Se + _e, _e, Be, Ke, tt);
              }
            }(0, 0, 1, 0, 0, 1), pe;
          }, A;
          function $(q, K, re) {
            for (var Y = 1, te = 0.5, ee = 0.5, X = 0.5, Q = 0; Q < re; Q++) Y <<= 2, Y += q < te ? K < ee ? 0 : 1 : K < ee ? 2 : 3, X *= 0.5, te += q < te ? -X : X, ee += K < ee ? -X : X;
            return Y;
          }
        };
      }, 16844: function(o) {
        o.exports = function(s) {
          var n = 0, l = 0, u = 0, i = 0;
          return s.map(function(h) {
            var p = (h = h.slice())[0], _ = p.toUpperCase();
            if (p != _) switch (h[0] = _, p) {
              case "a":
                h[6] += u, h[7] += i;
                break;
              case "v":
                h[1] += i;
                break;
              case "h":
                h[1] += u;
                break;
              default:
                for (var d = 1; d < h.length; ) h[d++] += u, h[d++] += i;
            }
            switch (_) {
              case "Z":
                u = n, i = l;
                break;
              case "H":
                u = h[1];
                break;
              case "V":
                i = h[1];
                break;
              case "M":
                u = n = h[1], i = l = h[2];
                break;
              default:
                u = h[h.length - 2], i = h[h.length - 1];
            }
            return h;
          });
        };
      }, 78112: function(o) {
        o.exports = function(s, n) {
          if (!s || s.length == null) throw Error("Argument should be an array");
          n = n == null ? 1 : Math.floor(n);
          for (var l = Array(2 * n), u = 0; u < n; u++) {
            for (var i = -1 / 0, h = 1 / 0, p = u, _ = s.length; p < _; p += n) s[p] > i && (i = s[p]), s[p] < h && (h = s[p]);
            l[u] = h, l[n + u] = i;
          }
          return l;
        };
      }, 33055: function(o) {
        o.exports = function(s, n, l) {
          if (typeof Array.prototype.findIndex == "function") return s.findIndex(n, l);
          if (typeof n != "function") throw new TypeError("predicate must be a function");
          var u = Object(s), i = u.length;
          if (i === 0) return -1;
          for (var h = 0; h < i; h++) if (n.call(l, u[h], h, u)) return h;
          return -1;
        };
      }, 90956: function(o, s, n) {
        var l = n(78112);
        o.exports = function(u, i, h) {
          if (!u || u.length == null) throw Error("Argument should be an array");
          i == null && (i = 1), h == null && (h = l(u, i));
          for (var p = 0; p < i; p++) {
            var _ = h[i + p], d = h[p], f = p, c = u.length;
            if (_ === 1 / 0 && d === -1 / 0) for (f = p; f < c; f += i) u[f] = u[f] === _ ? 1 : u[f] === d ? 0 : 0.5;
            else if (_ === 1 / 0) for (f = p; f < c; f += i) u[f] = u[f] === _ ? 1 : 0;
            else if (d === -1 / 0) for (f = p; f < c; f += i) u[f] = u[f] === d ? 0 : 1;
            else {
              var g = _ - d;
              for (f = p; f < c; f += i) isNaN(u[f]) || (u[f] = g === 0 ? 0.5 : (u[f] - d) / g);
            }
          }
          return u;
        };
      }, 27902: function(o) {
        o.exports = function(s, n) {
          var l = typeof s == "number", u = typeof n == "number";
          l && !u ? (n = s, s = 0) : l || u || (s = 0, n = 0);
          var i = (n |= 0) - (s |= 0);
          if (i < 0) throw new Error("array length must be positive");
          for (var h = new Array(i), p = 0, _ = s; p < i; p++, _++) h[p] = _;
          return h;
        };
      }, 85672: function(o, s, n) {
        var l = n(33282);
        function u(ee) {
          return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(X) {
            return typeof X;
          } : function(X) {
            return X && typeof Symbol == "function" && X.constructor === Symbol && X !== Symbol.prototype ? "symbol" : typeof X;
          }, u(ee);
        }
        function i(ee, X, Q) {
          return Object.defineProperty(ee, "prototype", { writable: !1 }), ee;
        }
        var h, p, _ = n(34585).codes, d = _.ERR_AMBIGUOUS_ARGUMENT, f = _.ERR_INVALID_ARG_TYPE, c = _.ERR_INVALID_ARG_VALUE, g = _.ERR_INVALID_RETURN_VALUE, m = _.ERR_MISSING_ARGS, x = n(68586), w = n(56557).inspect, k = n(56557).types, S = k.isPromise, A = k.isRegExp, C = n(68686)(), D = n(9622)(), L = n(63063)("RegExp.prototype.test");
        function E() {
          var ee = n(23879);
          h = ee.isDeepEqual, p = ee.isDeepStrictEqual;
        }
        var P = !1, I = o.exports = z, M = {};
        function O(ee) {
          throw ee.message instanceof Error ? ee.message : new x(ee);
        }
        function T(ee, X, Q, ue) {
          if (!Q) {
            var ce = !1;
            if (X === 0) ce = !0, ue = "No value argument passed to `assert.ok()`";
            else if (ue instanceof Error) throw ue;
            var he = new x({ actual: Q, expected: !0, message: ue, operator: "==", stackStartFn: ee });
            throw he.generatedMessage = ce, he;
          }
        }
        function z() {
          for (var ee = arguments.length, X = new Array(ee), Q = 0; Q < ee; Q++) X[Q] = arguments[Q];
          T.apply(void 0, [z, X.length].concat(X));
        }
        I.fail = function ee(X, Q, ue, ce, he) {
          var de, ne = arguments.length;
          if (ne === 0 ? de = "Failed" : ne === 1 ? (ue = X, X = void 0) : (P === !1 && (P = !0, (l.emitWarning ? l.emitWarning : console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094")), ne === 2 && (ce = "!=")), ue instanceof Error) throw ue;
          var ae = { actual: X, expected: Q, operator: ce === void 0 ? "fail" : ce, stackStartFn: he || ee };
          ue !== void 0 && (ae.message = ue);
          var se = new x(ae);
          throw de && (se.message = de, se.generatedMessage = !0), se;
        }, I.AssertionError = x, I.ok = z, I.equal = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          X != Q && O({ actual: X, expected: Q, message: ue, operator: "==", stackStartFn: ee });
        }, I.notEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          X == Q && O({ actual: X, expected: Q, message: ue, operator: "!=", stackStartFn: ee });
        }, I.deepEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          h === void 0 && E(), h(X, Q) || O({ actual: X, expected: Q, message: ue, operator: "deepEqual", stackStartFn: ee });
        }, I.notDeepEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          h === void 0 && E(), h(X, Q) && O({ actual: X, expected: Q, message: ue, operator: "notDeepEqual", stackStartFn: ee });
        }, I.deepStrictEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          h === void 0 && E(), p(X, Q) || O({ actual: X, expected: Q, message: ue, operator: "deepStrictEqual", stackStartFn: ee });
        }, I.notDeepStrictEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          h === void 0 && E(), p(X, Q) && O({ actual: X, expected: Q, message: ue, operator: "notDeepStrictEqual", stackStartFn: ee });
        }, I.strictEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          D(X, Q) || O({ actual: X, expected: Q, message: ue, operator: "strictEqual", stackStartFn: ee });
        }, I.notStrictEqual = function ee(X, Q, ue) {
          if (arguments.length < 2) throw new m("actual", "expected");
          D(X, Q) && O({ actual: X, expected: Q, message: ue, operator: "notStrictEqual", stackStartFn: ee });
        };
        var F = i(function ee(X, Q, ue) {
          var ce = this;
          (function(he, de) {
            if (!(he instanceof de)) throw new TypeError("Cannot call a class as a function");
          })(this, ee), Q.forEach(function(he) {
            he in X && (ue !== void 0 && typeof ue[he] == "string" && A(X[he]) && L(X[he], ue[he]) ? ce[he] = ue[he] : ce[he] = X[he]);
          });
        });
        function U(ee, X, Q, ue) {
          if (typeof X != "function") {
            if (A(X)) return L(X, ee);
            if (arguments.length === 2) throw new f("expected", ["Function", "RegExp"], X);
            if (u(ee) !== "object" || ee === null) {
              var ce = new x({ actual: ee, expected: X, message: Q, operator: "deepStrictEqual", stackStartFn: ue });
              throw ce.operator = ue.name, ce;
            }
            var he = Object.keys(X);
            if (X instanceof Error) he.push("name", "message");
            else if (he.length === 0) throw new c("error", X, "may not be an empty object");
            return h === void 0 && E(), he.forEach(function(de) {
              typeof ee[de] == "string" && A(X[de]) && L(X[de], ee[de]) || function(ne, ae, se, me, ye, pe) {
                if (!(se in ne) || !p(ne[se], ae[se])) {
                  if (!me) {
                    var be = new F(ne, ye), Ae = new F(ae, ye, ne), Se = new x({ actual: be, expected: Ae, operator: "deepStrictEqual", stackStartFn: pe });
                    throw Se.actual = ne, Se.expected = ae, Se.operator = pe.name, Se;
                  }
                  O({ actual: ne, expected: ae, message: me, operator: pe.name, stackStartFn: pe });
                }
              }(ee, X, de, Q, he, ue);
            }), !0;
          }
          return X.prototype !== void 0 && ee instanceof X || !Error.isPrototypeOf(X) && X.call({}, ee) === !0;
        }
        function V(ee) {
          if (typeof ee != "function") throw new f("fn", "Function", ee);
          try {
            ee();
          } catch (X) {
            return X;
          }
          return M;
        }
        function $(ee) {
          return S(ee) || ee !== null && u(ee) === "object" && typeof ee.then == "function" && typeof ee.catch == "function";
        }
        function q(ee) {
          return Promise.resolve().then(function() {
            var X;
            if (typeof ee == "function") {
              if (!$(X = ee())) throw new g("instance of Promise", "promiseFn", X);
            } else {
              if (!$(ee)) throw new f("promiseFn", ["Function", "Promise"], ee);
              X = ee;
            }
            return Promise.resolve().then(function() {
              return X;
            }).then(function() {
              return M;
            }).catch(function(Q) {
              return Q;
            });
          });
        }
        function K(ee, X, Q, ue) {
          if (typeof Q == "string") {
            if (arguments.length === 4) throw new f("error", ["Object", "Error", "Function", "RegExp"], Q);
            if (u(X) === "object" && X !== null) {
              if (X.message === Q) throw new d("error/message", 'The error message "'.concat(X.message, '" is identical to the message.'));
            } else if (X === Q) throw new d("error/message", 'The error "'.concat(X, '" is identical to the message.'));
            ue = Q, Q = void 0;
          } else if (Q != null && u(Q) !== "object" && typeof Q != "function") throw new f("error", ["Object", "Error", "Function", "RegExp"], Q);
          if (X === M) {
            var ce = "";
            Q && Q.name && (ce += " (".concat(Q.name, ")")), ce += ue ? ": ".concat(ue) : ".";
            var he = ee.name === "rejects" ? "rejection" : "exception";
            O({ actual: void 0, expected: Q, operator: ee.name, message: "Missing expected ".concat(he).concat(ce), stackStartFn: ee });
          }
          if (Q && !U(X, Q, ue, ee)) throw X;
        }
        function re(ee, X, Q, ue) {
          if (X !== M) {
            if (typeof Q == "string" && (ue = Q, Q = void 0), !Q || U(X, Q)) {
              var ce = ue ? ": ".concat(ue) : ".", he = ee.name === "doesNotReject" ? "rejection" : "exception";
              O({ actual: X, expected: Q, operator: ee.name, message: "Got unwanted ".concat(he).concat(ce, `
`) + 'Actual message: "'.concat(X && X.message, '"'), stackStartFn: ee });
            }
            throw X;
          }
        }
        function Y(ee, X, Q, ue, ce) {
          if (!A(X)) throw new f("regexp", "RegExp", X);
          var he = ce === "match";
          if (typeof ee != "string" || L(X, ee) !== he) {
            if (Q instanceof Error) throw Q;
            var de = !Q;
            Q = Q || (typeof ee != "string" ? 'The "string" argument must be of type string. Received type ' + "".concat(u(ee), " (").concat(w(ee), ")") : (he ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + "".concat(w(X), `. Input:

`).concat(w(ee), `
`));
            var ne = new x({ actual: ee, expected: X, message: Q, operator: ce, stackStartFn: ue });
            throw ne.generatedMessage = de, ne;
          }
        }
        function te() {
          for (var ee = arguments.length, X = new Array(ee), Q = 0; Q < ee; Q++) X[Q] = arguments[Q];
          T.apply(void 0, [te, X.length].concat(X));
        }
        I.throws = function ee(X) {
          for (var Q = arguments.length, ue = new Array(Q > 1 ? Q - 1 : 0), ce = 1; ce < Q; ce++) ue[ce - 1] = arguments[ce];
          K.apply(void 0, [ee, V(X)].concat(ue));
        }, I.rejects = function ee(X) {
          for (var Q = arguments.length, ue = new Array(Q > 1 ? Q - 1 : 0), ce = 1; ce < Q; ce++) ue[ce - 1] = arguments[ce];
          return q(X).then(function(he) {
            return K.apply(void 0, [ee, he].concat(ue));
          });
        }, I.doesNotThrow = function ee(X) {
          for (var Q = arguments.length, ue = new Array(Q > 1 ? Q - 1 : 0), ce = 1; ce < Q; ce++) ue[ce - 1] = arguments[ce];
          re.apply(void 0, [ee, V(X)].concat(ue));
        }, I.doesNotReject = function ee(X) {
          for (var Q = arguments.length, ue = new Array(Q > 1 ? Q - 1 : 0), ce = 1; ce < Q; ce++) ue[ce - 1] = arguments[ce];
          return q(X).then(function(he) {
            return re.apply(void 0, [ee, he].concat(ue));
          });
        }, I.ifError = function ee(X) {
          if (X != null) {
            var Q = "ifError got unwanted exception: ";
            u(X) === "object" && typeof X.message == "string" ? X.message.length === 0 && X.constructor ? Q += X.constructor.name : Q += X.message : Q += w(X);
            var ue = new x({ actual: X, expected: null, operator: "ifError", message: Q, stackStartFn: ee }), ce = X.stack;
            if (typeof ce == "string") {
              var he = ce.split(`
`);
              he.shift();
              for (var de = ue.stack.split(`
`), ne = 0; ne < he.length; ne++) {
                var ae = de.indexOf(he[ne]);
                if (ae !== -1) {
                  de = de.slice(0, ae);
                  break;
                }
              }
              ue.stack = "".concat(de.join(`
`), `
`).concat(he.join(`
`));
            }
            throw ue;
          }
        }, I.match = function ee(X, Q, ue) {
          Y(X, Q, ue, ee, "match");
        }, I.doesNotMatch = function ee(X, Q, ue) {
          Y(X, Q, ue, ee, "doesNotMatch");
        }, I.strict = C(te, I, { equal: I.strictEqual, deepEqual: I.deepStrictEqual, notEqual: I.notStrictEqual, notDeepEqual: I.notDeepStrictEqual }), I.strict.strict = I.strict;
      }, 68586: function(o, s, n) {
        var l = n(33282);
        function u(T, z) {
          var F = Object.keys(T);
          if (Object.getOwnPropertySymbols) {
            var U = Object.getOwnPropertySymbols(T);
            z && (U = U.filter(function(V) {
              return Object.getOwnPropertyDescriptor(T, V).enumerable;
            })), F.push.apply(F, U);
          }
          return F;
        }
        function i(T) {
          for (var z = 1; z < arguments.length; z++) {
            var F = arguments[z] != null ? arguments[z] : {};
            z % 2 ? u(Object(F), !0).forEach(function(U) {
              var V, $, q;
              V = T, $ = U, q = F[U], ($ = p($)) in V ? Object.defineProperty(V, $, { value: q, enumerable: !0, configurable: !0, writable: !0 }) : V[$] = q;
            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(T, Object.getOwnPropertyDescriptors(F)) : u(Object(F)).forEach(function(U) {
              Object.defineProperty(T, U, Object.getOwnPropertyDescriptor(F, U));
            });
          }
          return T;
        }
        function h(T, z) {
          for (var F = 0; F < z.length; F++) {
            var U = z[F];
            U.enumerable = U.enumerable || !1, U.configurable = !0, "value" in U && (U.writable = !0), Object.defineProperty(T, p(U.key), U);
          }
        }
        function p(T) {
          var z = function(F, U) {
            if (w(F) !== "object" || F === null) return F;
            var V = F[Symbol.toPrimitive];
            if (V !== void 0) {
              var $ = V.call(F, "string");
              if (w($) !== "object") return $;
              throw new TypeError("@@toPrimitive must return a primitive value.");
            }
            return String(F);
          }(T);
          return w(z) === "symbol" ? z : String(z);
        }
        function _(T, z) {
          if (z && (w(z) === "object" || typeof z == "function")) return z;
          if (z !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
          return d(T);
        }
        function d(T) {
          if (T === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
          return T;
        }
        function f(T) {
          var z = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
          return f = function(F) {
            if (F === null || (U = F, Function.toString.call(U).indexOf("[native code]") === -1)) return F;
            var U;
            if (typeof F != "function") throw new TypeError("Super expression must either be null or a function");
            if (z !== void 0) {
              if (z.has(F)) return z.get(F);
              z.set(F, V);
            }
            function V() {
              return c(F, arguments, x(this).constructor);
            }
            return V.prototype = Object.create(F.prototype, { constructor: { value: V, enumerable: !1, writable: !0, configurable: !0 } }), m(V, F);
          }, f(T);
        }
        function c(T, z, F) {
          return c = g() ? Reflect.construct.bind() : function(U, V, $) {
            var q = [null];
            q.push.apply(q, V);
            var K = new (Function.bind.apply(U, q))();
            return $ && m(K, $.prototype), K;
          }, c.apply(null, arguments);
        }
        function g() {
          if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
          if (typeof Proxy == "function") return !0;
          try {
            return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
            })), !0;
          } catch {
            return !1;
          }
        }
        function m(T, z) {
          return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(F, U) {
            return F.__proto__ = U, F;
          }, m(T, z);
        }
        function x(T) {
          return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(z) {
            return z.__proto__ || Object.getPrototypeOf(z);
          }, x(T);
        }
        function w(T) {
          return w = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(z) {
            return typeof z;
          } : function(z) {
            return z && typeof Symbol == "function" && z.constructor === Symbol && z !== Symbol.prototype ? "symbol" : typeof z;
          }, w(T);
        }
        var k = n(56557).inspect, S = n(34585).codes.ERR_INVALID_ARG_TYPE;
        function A(T, z, F) {
          return (F === void 0 || F > T.length) && (F = T.length), T.substring(F - z.length, F) === z;
        }
        var C = "", D = "", L = "", E = "", P = { deepStrictEqual: "Expected values to be strictly deep-equal:", strictEqual: "Expected values to be strictly equal:", strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', deepEqual: "Expected values to be loosely deep-equal:", equal: "Expected values to be loosely equal:", notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', notStrictEqual: 'Expected "actual" to be strictly unequal to:', notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', notEqual: 'Expected "actual" to be loosely unequal to:', notIdentical: "Values identical but not reference-equal:" };
        function I(T) {
          var z = Object.keys(T), F = Object.create(Object.getPrototypeOf(T));
          return z.forEach(function(U) {
            F[U] = T[U];
          }), Object.defineProperty(F, "message", { value: T.message }), F;
        }
        function M(T) {
          return k(T, { compact: !1, customInspect: !1, depth: 1e3, maxArrayLength: 1 / 0, showHidden: !1, breakLength: 1 / 0, showProxy: !1, sorted: !0, getters: !0 });
        }
        var O = function(T, z) {
          (function(re, Y) {
            if (typeof Y != "function" && Y !== null) throw new TypeError("Super expression must either be null or a function");
            re.prototype = Object.create(Y && Y.prototype, { constructor: { value: re, writable: !0, configurable: !0 } }), Object.defineProperty(re, "prototype", { writable: !1 }), Y && m(re, Y);
          })(K, T);
          var F, U, V, $, q = (F = K, U = g(), function() {
            var re, Y = x(F);
            if (U) {
              var te = x(this).constructor;
              re = Reflect.construct(Y, arguments, te);
            } else re = Y.apply(this, arguments);
            return _(this, re);
          });
          function K(re) {
            var Y;
            if (function(me, ye) {
              if (!(me instanceof ye)) throw new TypeError("Cannot call a class as a function");
            }(this, K), w(re) !== "object" || re === null) throw new S("options", "Object", re);
            var te = re.message, ee = re.operator, X = re.stackStartFn, Q = re.actual, ue = re.expected, ce = Error.stackTraceLimit;
            if (Error.stackTraceLimit = 0, te != null) Y = q.call(this, String(te));
            else if (l.stderr && l.stderr.isTTY && (l.stderr && l.stderr.getColorDepth && l.stderr.getColorDepth() !== 1 ? (C = "\x1B[34m", D = "\x1B[32m", E = "\x1B[39m", L = "\x1B[31m") : (C = "", D = "", E = "", L = "")), w(Q) === "object" && Q !== null && w(ue) === "object" && ue !== null && "stack" in Q && Q instanceof Error && "stack" in ue && ue instanceof Error && (Q = I(Q), ue = I(ue)), ee === "deepStrictEqual" || ee === "strictEqual") Y = q.call(this, function(me, ye, pe) {
              var be = "", Ae = "", Se = 0, Me = "", De = !1, Le = M(me), We = Le.split(`
`), Ee = M(ye).split(`
`), Ne = 0, Ie = "";
              if (pe === "strictEqual" && w(me) === "object" && w(ye) === "object" && me !== null && ye !== null && (pe = "strictEqualObject"), We.length === 1 && Ee.length === 1 && We[0] !== Ee[0]) {
                var ge = We[0].length + Ee[0].length;
                if (ge <= 10) {
                  if (!(w(me) === "object" && me !== null || w(ye) === "object" && ye !== null || me === 0 && ye === 0)) return "".concat(P[pe], `

`) + "".concat(We[0], " !== ").concat(Ee[0], `
`);
                } else if (pe !== "strictEqualObject" && ge < (l.stderr && l.stderr.isTTY ? l.stderr.columns : 80)) {
                  for (; We[0][Ne] === Ee[0][Ne]; ) Ne++;
                  Ne > 2 && (Ie = `
  `.concat(function(ct, ft) {
                    if (ft = Math.floor(ft), ct.length == 0 || ft == 0) return "";
                    var _t = ct.length * ft;
                    for (ft = Math.floor(Math.log(ft) / Math.log(2)); ft; ) ct += ct, ft--;
                    return ct + ct.substring(0, _t - ct.length);
                  }(" ", Ne), "^"), Ne = 0);
                }
              }
              for (var Ce = We[We.length - 1], we = Ee[Ee.length - 1]; Ce === we && (Ne++ < 2 ? Me = `
  `.concat(Ce).concat(Me) : be = Ce, We.pop(), Ee.pop(), We.length !== 0 && Ee.length !== 0); ) Ce = We[We.length - 1], we = Ee[Ee.length - 1];
              var Ge = Math.max(We.length, Ee.length);
              if (Ge === 0) {
                var Re = Le.split(`
`);
                if (Re.length > 30) for (Re[26] = "".concat(C, "...").concat(E); Re.length > 27; ) Re.pop();
                return "".concat(P.notIdentical, `

`).concat(Re.join(`
`), `
`);
              }
              Ne > 3 && (Me = `
`.concat(C, "...").concat(E).concat(Me), De = !0), be !== "" && (Me = `
  `.concat(be).concat(Me), be = "");
              var je = 0, Ke = P[pe] + `
`.concat(D, "+ actual").concat(E, " ").concat(L, "- expected").concat(E), tt = " ".concat(C, "...").concat(E, " Lines skipped");
              for (Ne = 0; Ne < Ge; Ne++) {
                var _e = Ne - Se;
                if (We.length < Ne + 1) _e > 1 && Ne > 2 && (_e > 4 ? (Ae += `
`.concat(C, "...").concat(E), De = !0) : _e > 3 && (Ae += `
  `.concat(Ee[Ne - 2]), je++), Ae += `
  `.concat(Ee[Ne - 1]), je++), Se = Ne, be += `
`.concat(L, "-").concat(E, " ").concat(Ee[Ne]), je++;
                else if (Ee.length < Ne + 1) _e > 1 && Ne > 2 && (_e > 4 ? (Ae += `
`.concat(C, "...").concat(E), De = !0) : _e > 3 && (Ae += `
  `.concat(We[Ne - 2]), je++), Ae += `
  `.concat(We[Ne - 1]), je++), Se = Ne, Ae += `
`.concat(D, "+").concat(E, " ").concat(We[Ne]), je++;
                else {
                  var Be = Ee[Ne], $e = We[Ne], Ze = $e !== Be && (!A($e, ",") || $e.slice(0, -1) !== Be);
                  Ze && A(Be, ",") && Be.slice(0, -1) === $e && (Ze = !1, $e += ","), Ze ? (_e > 1 && Ne > 2 && (_e > 4 ? (Ae += `
`.concat(C, "...").concat(E), De = !0) : _e > 3 && (Ae += `
  `.concat(We[Ne - 2]), je++), Ae += `
  `.concat(We[Ne - 1]), je++), Se = Ne, Ae += `
`.concat(D, "+").concat(E, " ").concat($e), be += `
`.concat(L, "-").concat(E, " ").concat(Be), je += 2) : (Ae += be, be = "", _e !== 1 && Ne !== 0 || (Ae += `
  `.concat($e), je++));
                }
                if (je > 20 && Ne < Ge - 2) return "".concat(Ke).concat(tt, `
`).concat(Ae, `
`).concat(C, "...").concat(E).concat(be, `
`) + "".concat(C, "...").concat(E);
              }
              return "".concat(Ke).concat(De ? tt : "", `
`).concat(Ae).concat(be).concat(Me).concat(Ie);
            }(Q, ue, ee));
            else if (ee === "notDeepStrictEqual" || ee === "notStrictEqual") {
              var he = P[ee], de = M(Q).split(`
`);
              if (ee === "notStrictEqual" && w(Q) === "object" && Q !== null && (he = P.notStrictEqualObject), de.length > 30) for (de[26] = "".concat(C, "...").concat(E); de.length > 27; ) de.pop();
              Y = de.length === 1 ? q.call(this, "".concat(he, " ").concat(de[0])) : q.call(this, "".concat(he, `

`).concat(de.join(`
`), `
`));
            } else {
              var ne = M(Q), ae = "", se = P[ee];
              ee === "notDeepEqual" || ee === "notEqual" ? (ne = "".concat(P[ee], `

`).concat(ne)).length > 1024 && (ne = "".concat(ne.slice(0, 1021), "...")) : (ae = "".concat(M(ue)), ne.length > 512 && (ne = "".concat(ne.slice(0, 509), "...")), ae.length > 512 && (ae = "".concat(ae.slice(0, 509), "...")), ee === "deepEqual" || ee === "equal" ? ne = "".concat(se, `

`).concat(ne, `

should equal

`) : ae = " ".concat(ee, " ").concat(ae)), Y = q.call(this, "".concat(ne).concat(ae));
            }
            return Error.stackTraceLimit = ce, Y.generatedMessage = !te, Object.defineProperty(d(Y), "name", { value: "AssertionError [ERR_ASSERTION]", enumerable: !1, writable: !0, configurable: !0 }), Y.code = "ERR_ASSERTION", Y.actual = Q, Y.expected = ue, Y.operator = ee, Error.captureStackTrace && Error.captureStackTrace(d(Y), X), Y.stack, Y.name = "AssertionError", _(Y);
          }
          return V = K, ($ = [{ key: "toString", value: function() {
            return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
          } }, { key: z, value: function(re, Y) {
            return k(this, i(i({}, Y), {}, { customInspect: !1, depth: 0 }));
          } }]) && h(V.prototype, $), Object.defineProperty(V, "prototype", { writable: !1 }), K;
        }(f(Error), k.custom);
        o.exports = O;
      }, 34585: function(o, s, n) {
        function l(c) {
          return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(g) {
            return typeof g;
          } : function(g) {
            return g && typeof Symbol == "function" && g.constructor === Symbol && g !== Symbol.prototype ? "symbol" : typeof g;
          }, l(c);
        }
        function u(c, g) {
          return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(m, x) {
            return m.__proto__ = x, m;
          }, u(c, g);
        }
        function i(c) {
          return i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(g) {
            return g.__proto__ || Object.getPrototypeOf(g);
          }, i(c);
        }
        var h, p, _ = {};
        function d(c, g, m) {
          m || (m = Error);
          var x = function(w) {
            (function(L, E) {
              if (typeof E != "function" && E !== null) throw new TypeError("Super expression must either be null or a function");
              L.prototype = Object.create(E && E.prototype, { constructor: { value: L, writable: !0, configurable: !0 } }), Object.defineProperty(L, "prototype", { writable: !1 }), E && u(L, E);
            })(D, w);
            var k, S, A, C = (S = D, A = function() {
              if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
              if (typeof Proxy == "function") return !0;
              try {
                return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
                })), !0;
              } catch {
                return !1;
              }
            }(), function() {
              var L, E = i(S);
              if (A) {
                var P = i(this).constructor;
                L = Reflect.construct(E, arguments, P);
              } else L = E.apply(this, arguments);
              return function(I, M) {
                if (M && (l(M) === "object" || typeof M == "function")) return M;
                if (M !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
                return function(O) {
                  if (O === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
                  return O;
                }(I);
              }(this, L);
            });
            function D(L, E, P) {
              var I;
              return function(M, O) {
                if (!(M instanceof O)) throw new TypeError("Cannot call a class as a function");
              }(this, D), I = C.call(this, function(M, O, T) {
                return typeof g == "string" ? g : g(M, O, T);
              }(L, E, P)), I.code = c, I;
            }
            return k = D, Object.defineProperty(k, "prototype", { writable: !1 }), k;
          }(m);
          _[c] = x;
        }
        function f(c, g) {
          if (Array.isArray(c)) {
            var m = c.length;
            return c = c.map(function(x) {
              return String(x);
            }), m > 2 ? "one of ".concat(g, " ").concat(c.slice(0, m - 1).join(", "), ", or ") + c[m - 1] : m === 2 ? "one of ".concat(g, " ").concat(c[0], " or ").concat(c[1]) : "of ".concat(g, " ").concat(c[0]);
          }
          return "of ".concat(g, " ").concat(String(c));
        }
        d("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError), d("ERR_INVALID_ARG_TYPE", function(c, g, m) {
          var x, w, k, S, A;
          if (h === void 0 && (h = n(85672)), h(typeof c == "string", "'name' must be a string"), typeof g == "string" && (w = "not ", g.substr(0, 4) === w) ? (x = "must not be", g = g.replace(/^not /, "")) : x = "must be", function(D, L, E) {
            return (E === void 0 || E > D.length) && (E = D.length), D.substring(E - 9, E) === L;
          }(c, " argument")) k = "The ".concat(c, " ").concat(x, " ").concat(f(g, "type"));
          else {
            var C = (typeof A != "number" && (A = 0), A + 1 > (S = c).length || S.indexOf(".", A) === -1 ? "argument" : "property");
            k = 'The "'.concat(c, '" ').concat(C, " ").concat(x, " ").concat(f(g, "type"));
          }
          return k + ". Received type ".concat(l(m));
        }, TypeError), d("ERR_INVALID_ARG_VALUE", function(c, g) {
          var m = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
          p === void 0 && (p = n(56557));
          var x = p.inspect(g);
          return x.length > 128 && (x = "".concat(x.slice(0, 128), "...")), "The argument '".concat(c, "' ").concat(m, ". Received ").concat(x);
        }, TypeError), d("ERR_INVALID_RETURN_VALUE", function(c, g, m) {
          var x;
          return x = m && m.constructor && m.constructor.name ? "instance of ".concat(m.constructor.name) : "type ".concat(l(m)), "Expected ".concat(c, ' to be returned from the "').concat(g, '"') + " function but got ".concat(x, ".");
        }, TypeError), d("ERR_MISSING_ARGS", function() {
          for (var c = arguments.length, g = new Array(c), m = 0; m < c; m++) g[m] = arguments[m];
          h === void 0 && (h = n(85672)), h(g.length > 0, "At least one arg needs to be specified");
          var x = "The ", w = g.length;
          switch (g = g.map(function(k) {
            return '"'.concat(k, '"');
          }), w) {
            case 1:
              x += "".concat(g[0], " argument");
              break;
            case 2:
              x += "".concat(g[0], " and ").concat(g[1], " arguments");
              break;
            default:
              x += g.slice(0, w - 1).join(", "), x += ", and ".concat(g[w - 1], " arguments");
          }
          return "".concat(x, " must be specified");
        }, TypeError), o.exports.codes = _;
      }, 23879: function(o, s, n) {
        function l(se, me) {
          return function(ye) {
            if (Array.isArray(ye)) return ye;
          }(se) || function(ye, pe) {
            var be = ye == null ? null : typeof Symbol < "u" && ye[Symbol.iterator] || ye["@@iterator"];
            if (be != null) {
              var Ae, Se, Me, De, Le = [], We = !0, Ee = !1;
              try {
                if (Me = (be = be.call(ye)).next, pe !== 0) for (; !(We = (Ae = Me.call(be)).done) && (Le.push(Ae.value), Le.length !== pe); We = !0) ;
              } catch (Ne) {
                Ee = !0, Se = Ne;
              } finally {
                try {
                  if (!We && be.return != null && (De = be.return(), Object(De) !== De)) return;
                } finally {
                  if (Ee) throw Se;
                }
              }
              return Le;
            }
          }(se, me) || function(ye, pe) {
            if (ye) {
              if (typeof ye == "string") return u(ye, pe);
              var be = Object.prototype.toString.call(ye).slice(8, -1);
              return be === "Object" && ye.constructor && (be = ye.constructor.name), be === "Map" || be === "Set" ? Array.from(ye) : be === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(be) ? u(ye, pe) : void 0;
            }
          }(se, me) || function() {
            throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
          }();
        }
        function u(se, me) {
          (me == null || me > se.length) && (me = se.length);
          for (var ye = 0, pe = new Array(me); ye < me; ye++) pe[ye] = se[ye];
          return pe;
        }
        function i(se) {
          return i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(me) {
            return typeof me;
          } : function(me) {
            return me && typeof Symbol == "function" && me.constructor === Symbol && me !== Symbol.prototype ? "symbol" : typeof me;
          }, i(se);
        }
        var h = /a/g.flags !== void 0, p = function(se) {
          var me = [];
          return se.forEach(function(ye) {
            return me.push(ye);
          }), me;
        }, _ = function(se) {
          var me = [];
          return se.forEach(function(ye, pe) {
            return me.push([pe, ye]);
          }), me;
        }, d = Object.is ? Object.is : n(13969), f = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
          return [];
        }, c = Number.isNaN ? Number.isNaN : n(63057);
        function g(se) {
          return se.call.bind(se);
        }
        var m = g(Object.prototype.hasOwnProperty), x = g(Object.prototype.propertyIsEnumerable), w = g(Object.prototype.toString), k = n(56557).types, S = k.isAnyArrayBuffer, A = k.isArrayBufferView, C = k.isDate, D = k.isMap, L = k.isRegExp, E = k.isSet, P = k.isNativeError, I = k.isBoxedPrimitive, M = k.isNumberObject, O = k.isStringObject, T = k.isBooleanObject, z = k.isBigIntObject, F = k.isSymbolObject, U = k.isFloat32Array, V = k.isFloat64Array;
        function $(se) {
          if (se.length === 0 || se.length > 10) return !0;
          for (var me = 0; me < se.length; me++) {
            var ye = se.charCodeAt(me);
            if (ye < 48 || ye > 57) return !0;
          }
          return se.length === 10 && se >= Math.pow(2, 32);
        }
        function q(se) {
          return Object.keys(se).filter($).concat(f(se).filter(Object.prototype.propertyIsEnumerable.bind(se)));
        }
        function K(se, me) {
          if (se === me) return 0;
          for (var ye = se.length, pe = me.length, be = 0, Ae = Math.min(ye, pe); be < Ae; ++be) if (se[be] !== me[be]) {
            ye = se[be], pe = me[be];
            break;
          }
          return ye < pe ? -1 : pe < ye ? 1 : 0;
        }
        var re = 0, Y = 1, te = 2, ee = 3;
        function X(se, me, ye, pe) {
          if (se === me) return se !== 0 || !ye || d(se, me);
          if (ye) {
            if (i(se) !== "object") return typeof se == "number" && c(se) && c(me);
            if (i(me) !== "object" || se === null || me === null || Object.getPrototypeOf(se) !== Object.getPrototypeOf(me)) return !1;
          } else {
            if (se === null || i(se) !== "object") return (me === null || i(me) !== "object") && se == me;
            if (me === null || i(me) !== "object") return !1;
          }
          var be, Ae, Se, Me, De = w(se);
          if (De !== w(me)) return !1;
          if (Array.isArray(se)) {
            if (se.length !== me.length) return !1;
            var Le = q(se), We = q(me);
            return Le.length === We.length && ue(se, me, ye, pe, Y, Le);
          }
          if (De === "[object Object]" && (!D(se) && D(me) || !E(se) && E(me))) return !1;
          if (C(se)) {
            if (!C(me) || Date.prototype.getTime.call(se) !== Date.prototype.getTime.call(me)) return !1;
          } else if (L(se)) {
            if (!L(me) || (Se = se, Me = me, !(h ? Se.source === Me.source && Se.flags === Me.flags : RegExp.prototype.toString.call(Se) === RegExp.prototype.toString.call(Me)))) return !1;
          } else if (P(se) || se instanceof Error) {
            if (se.message !== me.message || se.name !== me.name) return !1;
          } else {
            if (A(se)) {
              if (ye || !U(se) && !V(se)) {
                if (!function(Ie, ge) {
                  return Ie.byteLength === ge.byteLength && K(new Uint8Array(Ie.buffer, Ie.byteOffset, Ie.byteLength), new Uint8Array(ge.buffer, ge.byteOffset, ge.byteLength)) === 0;
                }(se, me)) return !1;
              } else if (!function(Ie, ge) {
                if (Ie.byteLength !== ge.byteLength) return !1;
                for (var Ce = 0; Ce < Ie.byteLength; Ce++) if (Ie[Ce] !== ge[Ce]) return !1;
                return !0;
              }(se, me)) return !1;
              var Ee = q(se), Ne = q(me);
              return Ee.length === Ne.length && ue(se, me, ye, pe, re, Ee);
            }
            if (E(se)) return !(!E(me) || se.size !== me.size) && ue(se, me, ye, pe, te);
            if (D(se)) return !(!D(me) || se.size !== me.size) && ue(se, me, ye, pe, ee);
            if (S(se)) {
              if (Ae = me, (be = se).byteLength !== Ae.byteLength || K(new Uint8Array(be), new Uint8Array(Ae)) !== 0) return !1;
            } else if (I(se) && !function(Ie, ge) {
              return M(Ie) ? M(ge) && d(Number.prototype.valueOf.call(Ie), Number.prototype.valueOf.call(ge)) : O(Ie) ? O(ge) && String.prototype.valueOf.call(Ie) === String.prototype.valueOf.call(ge) : T(Ie) ? T(ge) && Boolean.prototype.valueOf.call(Ie) === Boolean.prototype.valueOf.call(ge) : z(Ie) ? z(ge) && BigInt.prototype.valueOf.call(Ie) === BigInt.prototype.valueOf.call(ge) : F(ge) && Symbol.prototype.valueOf.call(Ie) === Symbol.prototype.valueOf.call(ge);
            }(se, me)) return !1;
          }
          return ue(se, me, ye, pe, re);
        }
        function Q(se, me) {
          return me.filter(function(ye) {
            return x(se, ye);
          });
        }
        function ue(se, me, ye, pe, be, Ae) {
          if (arguments.length === 5) {
            Ae = Object.keys(se);
            var Se = Object.keys(me);
            if (Ae.length !== Se.length) return !1;
          }
          for (var Me = 0; Me < Ae.length; Me++) if (!m(me, Ae[Me])) return !1;
          if (ye && arguments.length === 5) {
            var De = f(se);
            if (De.length !== 0) {
              var Le = 0;
              for (Me = 0; Me < De.length; Me++) {
                var We = De[Me];
                if (x(se, We)) {
                  if (!x(me, We)) return !1;
                  Ae.push(We), Le++;
                } else if (x(me, We)) return !1;
              }
              var Ee = f(me);
              if (De.length !== Ee.length && Q(me, Ee).length !== Le) return !1;
            } else {
              var Ne = f(me);
              if (Ne.length !== 0 && Q(me, Ne).length !== 0) return !1;
            }
          }
          if (Ae.length === 0 && (be === re || be === Y && se.length === 0 || se.size === 0)) return !0;
          if (pe === void 0) pe = { val1: /* @__PURE__ */ new Map(), val2: /* @__PURE__ */ new Map(), position: 0 };
          else {
            var Ie = pe.val1.get(se);
            if (Ie !== void 0) {
              var ge = pe.val2.get(me);
              if (ge !== void 0) return Ie === ge;
            }
            pe.position++;
          }
          pe.val1.set(se, pe.position), pe.val2.set(me, pe.position);
          var Ce = function(we, Ge, Re, je, Ke, tt) {
            var _e = 0;
            if (tt === te) {
              if (!function(ct, ft, _t, Pt) {
                for (var Dt = null, $t = p(ct), Gt = 0; Gt < $t.length; Gt++) {
                  var Wt = $t[Gt];
                  if (i(Wt) === "object" && Wt !== null) Dt === null && (Dt = /* @__PURE__ */ new Set()), Dt.add(Wt);
                  else if (!ft.has(Wt)) {
                    if (_t || !de(ct, ft, Wt)) return !1;
                    Dt === null && (Dt = /* @__PURE__ */ new Set()), Dt.add(Wt);
                  }
                }
                if (Dt !== null) {
                  for (var mt = p(ft), at = 0; at < mt.length; at++) {
                    var vt = mt[at];
                    if (i(vt) === "object" && vt !== null) {
                      if (!ce(Dt, vt, _t, Pt)) return !1;
                    } else if (!_t && !ct.has(vt) && !ce(Dt, vt, _t, Pt)) return !1;
                  }
                  return Dt.size === 0;
                }
                return !0;
              }(we, Ge, Re, Ke)) return !1;
            } else if (tt === ee) {
              if (!function(ct, ft, _t, Pt) {
                for (var Dt = null, $t = _(ct), Gt = 0; Gt < $t.length; Gt++) {
                  var Wt = l($t[Gt], 2), mt = Wt[0], at = Wt[1];
                  if (i(mt) === "object" && mt !== null) Dt === null && (Dt = /* @__PURE__ */ new Set()), Dt.add(mt);
                  else {
                    var vt = ft.get(mt);
                    if (vt === void 0 && !ft.has(mt) || !X(at, vt, _t, Pt)) {
                      if (_t || !ne(ct, ft, mt, at, Pt)) return !1;
                      Dt === null && (Dt = /* @__PURE__ */ new Set()), Dt.add(mt);
                    }
                  }
                }
                if (Dt !== null) {
                  for (var St = _(ft), Je = 0; Je < St.length; Je++) {
                    var nt = l(St[Je], 2), ot = nt[0], Ye = nt[1];
                    if (i(ot) === "object" && ot !== null) {
                      if (!ae(Dt, ct, ot, Ye, _t, Pt)) return !1;
                    } else if (!(_t || ct.has(ot) && X(ct.get(ot), Ye, !1, Pt) || ae(Dt, ct, ot, Ye, !1, Pt))) return !1;
                  }
                  return Dt.size === 0;
                }
                return !0;
              }(we, Ge, Re, Ke)) return !1;
            } else if (tt === Y) for (; _e < we.length; _e++) {
              if (!m(we, _e)) {
                if (m(Ge, _e)) return !1;
                for (var Be = Object.keys(we); _e < Be.length; _e++) {
                  var $e = Be[_e];
                  if (!m(Ge, $e) || !X(we[$e], Ge[$e], Re, Ke)) return !1;
                }
                return Be.length === Object.keys(Ge).length;
              }
              if (!m(Ge, _e) || !X(we[_e], Ge[_e], Re, Ke)) return !1;
            }
            for (_e = 0; _e < je.length; _e++) {
              var Ze = je[_e];
              if (!X(we[Ze], Ge[Ze], Re, Ke)) return !1;
            }
            return !0;
          }(se, me, ye, Ae, pe, be);
          return pe.val1.delete(se), pe.val2.delete(me), Ce;
        }
        function ce(se, me, ye, pe) {
          for (var be = p(se), Ae = 0; Ae < be.length; Ae++) {
            var Se = be[Ae];
            if (X(me, Se, ye, pe)) return se.delete(Se), !0;
          }
          return !1;
        }
        function he(se) {
          switch (i(se)) {
            case "undefined":
              return null;
            case "object":
              return;
            case "symbol":
              return !1;
            case "string":
              se = +se;
            case "number":
              if (c(se)) return !1;
          }
          return !0;
        }
        function de(se, me, ye) {
          var pe = he(ye);
          return pe ?? (me.has(pe) && !se.has(pe));
        }
        function ne(se, me, ye, pe, be) {
          var Ae = he(ye);
          if (Ae != null) return Ae;
          var Se = me.get(Ae);
          return !(Se === void 0 && !me.has(Ae) || !X(pe, Se, !1, be)) && !se.has(Ae) && X(pe, Se, !1, be);
        }
        function ae(se, me, ye, pe, be, Ae) {
          for (var Se = p(se), Me = 0; Me < Se.length; Me++) {
            var De = Se[Me];
            if (X(ye, De, be, Ae) && X(pe, me.get(De), be, Ae)) return se.delete(De), !0;
          }
          return !1;
        }
        o.exports = { isDeepEqual: function(se, me) {
          return X(se, me, !1);
        }, isDeepStrictEqual: function(se, me) {
          return X(se, me, !0);
        } };
      }, 93229: function(o, s, n) {
        n.r(s), n.d(s, { decode: function() {
          return p;
        }, encode: function() {
          return h;
        } });
        for (var l = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", u = typeof Uint8Array > "u" ? [] : new Uint8Array(256), i = 0; i < 64; i++) u[l.charCodeAt(i)] = i;
        var h = function(_) {
          var d, f = new Uint8Array(_), c = f.length, g = "";
          for (d = 0; d < c; d += 3) g += l[f[d] >> 2], g += l[(3 & f[d]) << 4 | f[d + 1] >> 4], g += l[(15 & f[d + 1]) << 2 | f[d + 2] >> 6], g += l[63 & f[d + 2]];
          return c % 3 == 2 ? g = g.substring(0, g.length - 1) + "=" : c % 3 == 1 && (g = g.substring(0, g.length - 2) + "=="), g;
        }, p = function(_) {
          var d, f, c, g, m, x = 0.75 * _.length, w = _.length, k = 0;
          _[_.length - 1] === "=" && (x--, _[_.length - 2] === "=" && x--);
          var S = new ArrayBuffer(x), A = new Uint8Array(S);
          for (d = 0; d < w; d += 4) f = u[_.charCodeAt(d)], c = u[_.charCodeAt(d + 1)], g = u[_.charCodeAt(d + 2)], m = u[_.charCodeAt(d + 3)], A[k++] = f << 2 | c >> 4, A[k++] = (15 & c) << 4 | g >> 2, A[k++] = (3 & g) << 6 | 63 & m;
          return S;
        };
      }, 76226: function(o, s) {
        s.byteLength = function(d) {
          var f = p(d), c = f[0], g = f[1];
          return 3 * (c + g) / 4 - g;
        }, s.toByteArray = function(d) {
          var f, c, g = p(d), m = g[0], x = g[1], w = new u(function(A, C, D) {
            return 3 * (C + D) / 4 - D;
          }(0, m, x)), k = 0, S = x > 0 ? m - 4 : m;
          for (c = 0; c < S; c += 4) f = l[d.charCodeAt(c)] << 18 | l[d.charCodeAt(c + 1)] << 12 | l[d.charCodeAt(c + 2)] << 6 | l[d.charCodeAt(c + 3)], w[k++] = f >> 16 & 255, w[k++] = f >> 8 & 255, w[k++] = 255 & f;
          return x === 2 && (f = l[d.charCodeAt(c)] << 2 | l[d.charCodeAt(c + 1)] >> 4, w[k++] = 255 & f), x === 1 && (f = l[d.charCodeAt(c)] << 10 | l[d.charCodeAt(c + 1)] << 4 | l[d.charCodeAt(c + 2)] >> 2, w[k++] = f >> 8 & 255, w[k++] = 255 & f), w;
        }, s.fromByteArray = function(d) {
          for (var f, c = d.length, g = c % 3, m = [], x = 16383, w = 0, k = c - g; w < k; w += x) m.push(_(d, w, w + x > k ? k : w + x));
          return g === 1 ? (f = d[c - 1], m.push(n[f >> 2] + n[f << 4 & 63] + "==")) : g === 2 && (f = (d[c - 2] << 8) + d[c - 1], m.push(n[f >> 10] + n[f >> 4 & 63] + n[f << 2 & 63] + "=")), m.join("");
        };
        for (var n = [], l = [], u = typeof Uint8Array < "u" ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", h = 0; h < 64; ++h) n[h] = i[h], l[i.charCodeAt(h)] = h;
        function p(d) {
          var f = d.length;
          if (f % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
          var c = d.indexOf("=");
          return c === -1 && (c = f), [c, c === f ? 0 : 4 - c % 4];
        }
        function _(d, f, c) {
          for (var g, m, x = [], w = f; w < c; w += 3) g = (d[w] << 16 & 16711680) + (d[w + 1] << 8 & 65280) + (255 & d[w + 2]), x.push(n[(m = g) >> 18 & 63] + n[m >> 12 & 63] + n[m >> 6 & 63] + n[63 & m]);
          return x.join("");
        }
        l[45] = 62, l[95] = 63;
      }, 31625: function(o) {
        function s(p, _, d, f, c) {
          for (var g = c + 1; f <= c; ) {
            var m = f + c >>> 1, x = p[m];
            (d !== void 0 ? d(x, _) : x - _) >= 0 ? (g = m, c = m - 1) : f = m + 1;
          }
          return g;
        }
        function n(p, _, d, f, c) {
          for (var g = c + 1; f <= c; ) {
            var m = f + c >>> 1, x = p[m];
            (d !== void 0 ? d(x, _) : x - _) > 0 ? (g = m, c = m - 1) : f = m + 1;
          }
          return g;
        }
        function l(p, _, d, f, c) {
          for (var g = f - 1; f <= c; ) {
            var m = f + c >>> 1, x = p[m];
            (d !== void 0 ? d(x, _) : x - _) < 0 ? (g = m, f = m + 1) : c = m - 1;
          }
          return g;
        }
        function u(p, _, d, f, c) {
          for (var g = f - 1; f <= c; ) {
            var m = f + c >>> 1, x = p[m];
            (d !== void 0 ? d(x, _) : x - _) <= 0 ? (g = m, f = m + 1) : c = m - 1;
          }
          return g;
        }
        function i(p, _, d, f, c) {
          for (; f <= c; ) {
            var g = f + c >>> 1, m = p[g], x = d !== void 0 ? d(m, _) : m - _;
            if (x === 0) return g;
            x <= 0 ? f = g + 1 : c = g - 1;
          }
          return -1;
        }
        function h(p, _, d, f, c, g) {
          return typeof d == "function" ? g(p, _, d, f === void 0 ? 0 : 0 | f, c === void 0 ? p.length - 1 : 0 | c) : g(p, _, void 0, d === void 0 ? 0 : 0 | d, f === void 0 ? p.length - 1 : 0 | f);
        }
        o.exports = { ge: function(p, _, d, f, c) {
          return h(p, _, d, f, c, s);
        }, gt: function(p, _, d, f, c) {
          return h(p, _, d, f, c, n);
        }, lt: function(p, _, d, f, c) {
          return h(p, _, d, f, c, l);
        }, le: function(p, _, d, f, c) {
          return h(p, _, d, f, c, u);
        }, eq: function(p, _, d, f, c) {
          return h(p, _, d, f, c, i);
        } };
      }, 54689: function(o, s) {
        function n(u) {
          var i = 32;
          return (u &= -u) && i--, 65535 & u && (i -= 16), 16711935 & u && (i -= 8), 252645135 & u && (i -= 4), 858993459 & u && (i -= 2), 1431655765 & u && (i -= 1), i;
        }
        s.INT_BITS = 32, s.INT_MAX = 2147483647, s.INT_MIN = -2147483648, s.sign = function(u) {
          return (u > 0) - (u < 0);
        }, s.abs = function(u) {
          var i = u >> 31;
          return (u ^ i) - i;
        }, s.min = function(u, i) {
          return i ^ (u ^ i) & -(u < i);
        }, s.max = function(u, i) {
          return u ^ (u ^ i) & -(u < i);
        }, s.isPow2 = function(u) {
          return !(u & u - 1 || !u);
        }, s.log2 = function(u) {
          var i, h;
          return i = (u > 65535) << 4, i |= h = ((u >>>= i) > 255) << 3, i |= h = ((u >>>= h) > 15) << 2, (i |= h = ((u >>>= h) > 3) << 1) | (u >>>= h) >> 1;
        }, s.log10 = function(u) {
          return u >= 1e9 ? 9 : u >= 1e8 ? 8 : u >= 1e7 ? 7 : u >= 1e6 ? 6 : u >= 1e5 ? 5 : u >= 1e4 ? 4 : u >= 1e3 ? 3 : u >= 100 ? 2 : u >= 10 ? 1 : 0;
        }, s.popCount = function(u) {
          return 16843009 * ((u = (858993459 & (u -= u >>> 1 & 1431655765)) + (u >>> 2 & 858993459)) + (u >>> 4) & 252645135) >>> 24;
        }, s.countTrailingZeros = n, s.nextPow2 = function(u) {
          return u += u === 0, --u, u |= u >>> 1, u |= u >>> 2, u |= u >>> 4, u |= u >>> 8, 1 + (u |= u >>> 16);
        }, s.prevPow2 = function(u) {
          return u |= u >>> 1, u |= u >>> 2, u |= u >>> 4, u |= u >>> 8, (u |= u >>> 16) - (u >>> 1);
        }, s.parity = function(u) {
          return u ^= u >>> 16, u ^= u >>> 8, u ^= u >>> 4, 27030 >>> (u &= 15) & 1;
        };
        var l = new Array(256);
        (function(u) {
          for (var i = 0; i < 256; ++i) {
            var h = i, p = i, _ = 7;
            for (h >>>= 1; h; h >>>= 1) p <<= 1, p |= 1 & h, --_;
            u[i] = p << _ & 255;
          }
        })(l), s.reverse = function(u) {
          return l[255 & u] << 24 | l[u >>> 8 & 255] << 16 | l[u >>> 16 & 255] << 8 | l[u >>> 24 & 255];
        }, s.interleave2 = function(u, i) {
          return (u = 1431655765 & ((u = 858993459 & ((u = 252645135 & ((u = 16711935 & ((u &= 65535) | u << 8)) | u << 4)) | u << 2)) | u << 1)) | (i = 1431655765 & ((i = 858993459 & ((i = 252645135 & ((i = 16711935 & ((i &= 65535) | i << 8)) | i << 4)) | i << 2)) | i << 1)) << 1;
        }, s.deinterleave2 = function(u, i) {
          return (u = 65535 & ((u = 16711935 & ((u = 252645135 & ((u = 858993459 & ((u = u >>> i & 1431655765) | u >>> 1)) | u >>> 2)) | u >>> 4)) | u >>> 16)) << 16 >> 16;
        }, s.interleave3 = function(u, i, h) {
          return u = 1227133513 & ((u = 3272356035 & ((u = 251719695 & ((u = 4278190335 & ((u &= 1023) | u << 16)) | u << 8)) | u << 4)) | u << 2), (u |= (i = 1227133513 & ((i = 3272356035 & ((i = 251719695 & ((i = 4278190335 & ((i &= 1023) | i << 16)) | i << 8)) | i << 4)) | i << 2)) << 1) | (h = 1227133513 & ((h = 3272356035 & ((h = 251719695 & ((h = 4278190335 & ((h &= 1023) | h << 16)) | h << 8)) | h << 4)) | h << 2)) << 2;
        }, s.deinterleave3 = function(u, i) {
          return (u = 1023 & ((u = 4278190335 & ((u = 251719695 & ((u = 3272356035 & ((u = u >>> i & 1227133513) | u >>> 2)) | u >>> 4)) | u >>> 8)) | u >>> 16)) << 22 >> 22;
        }, s.nextCombination = function(u) {
          var i = u | u - 1;
          return i + 1 | (~i & -~i) - 1 >>> n(u) + 1;
        };
      }, 88772: function(o, s, n) {
        var l = n(75144);
        o.exports = function(p, _) {
          _ || (_ = {});
          var d, f, c, g, m, x, w, k, S, A, C, D = _.cutoff == null ? 0.25 : _.cutoff, L = _.radius == null ? 8 : _.radius, E = _.channel || 0;
          if (ArrayBuffer.isView(p) || Array.isArray(p)) {
            if (!_.width || !_.height) throw Error("For raw data width and height should be provided by options");
            d = _.width, f = _.height, g = p, x = _.stride ? _.stride : Math.floor(p.length / d / f);
          } else window.HTMLCanvasElement && p instanceof window.HTMLCanvasElement ? (w = (k = p).getContext("2d"), d = k.width, f = k.height, g = (S = w.getImageData(0, 0, d, f)).data, x = 4) : window.CanvasRenderingContext2D && p instanceof window.CanvasRenderingContext2D ? (w = p, d = (k = p.canvas).width, f = k.height, g = (S = w.getImageData(0, 0, d, f)).data, x = 4) : window.ImageData && p instanceof window.ImageData && (S = p, d = p.width, f = p.height, g = S.data, x = 4);
          if (c = Math.max(d, f), window.Uint8ClampedArray && g instanceof window.Uint8ClampedArray || window.Uint8Array && g instanceof window.Uint8Array) for (m = g, g = Array(d * f), A = 0, C = m.length; A < C; A++) g[A] = m[A * x + E] / 255;
          else if (x !== 1) throw Error("Raw data can have only 1 value per pixel");
          var P = Array(d * f), I = Array(d * f), M = Array(c), O = Array(c), T = Array(c + 1), z = Array(c);
          for (A = 0, C = d * f; A < C; A++) {
            var F = g[A];
            P[A] = F === 1 ? 0 : F === 0 ? u : Math.pow(Math.max(0, 0.5 - F), 2), I[A] = F === 1 ? u : F === 0 ? 0 : Math.pow(Math.max(0, F - 0.5), 2);
          }
          i(P, d, f, M, O, z, T), i(I, d, f, M, O, z, T);
          var U = window.Float32Array ? new Float32Array(d * f) : new Array(d * f);
          for (A = 0, C = d * f; A < C; A++) U[A] = l(1 - ((P[A] - I[A]) / L + D), 0, 1);
          return U;
        };
        var u = 1e20;
        function i(p, _, d, f, c, g, m) {
          for (var x = 0; x < _; x++) {
            for (var w = 0; w < d; w++) f[w] = p[w * _ + x];
            for (h(f, c, g, m, d), w = 0; w < d; w++) p[w * _ + x] = c[w];
          }
          for (w = 0; w < d; w++) {
            for (x = 0; x < _; x++) f[x] = p[w * _ + x];
            for (h(f, c, g, m, _), x = 0; x < _; x++) p[w * _ + x] = Math.sqrt(c[x]);
          }
        }
        function h(p, _, d, f, c) {
          d[0] = 0, f[0] = -u, f[1] = +u;
          for (var g = 1, m = 0; g < c; g++) {
            for (var x = (p[g] + g * g - (p[d[m]] + d[m] * d[m])) / (2 * g - 2 * d[m]); x <= f[m]; ) m--, x = (p[g] + g * g - (p[d[m]] + d[m] * d[m])) / (2 * g - 2 * d[m]);
            d[++m] = g, f[m] = x, f[m + 1] = +u;
          }
          for (g = 0, m = 0; g < c; g++) {
            for (; f[m + 1] < g; ) m++;
            _[g] = (g - d[m]) * (g - d[m]) + p[d[m]];
          }
        }
      }, 63063: function(o, s, n) {
        var l = n(71129), u = n(87227), i = u(l("String.prototype.indexOf"));
        o.exports = function(h, p) {
          var _ = l(h, !!p);
          return typeof _ == "function" && i(h, ".prototype.") > -1 ? u(_) : _;
        };
      }, 87227: function(o, s, n) {
        var l = n(87547), u = n(71129), i = n(73285), h = n(48631), p = u("%Function.prototype.apply%"), _ = u("%Function.prototype.call%"), d = u("%Reflect.apply%", !0) || l.call(_, p), f = n(40891), c = u("%Math.max%");
        o.exports = function(m) {
          if (typeof m != "function") throw new h("a function is required");
          var x = d(l, _, arguments);
          return i(x, 1 + c(0, m.length - (arguments.length - 1)), !0);
        };
        var g = function() {
          return d(l, p, arguments);
        };
        f ? f(o.exports, "apply", { value: g }) : o.exports.apply = g;
      }, 75144: function(o) {
        o.exports = function(s, n, l) {
          return n < l ? s < n ? n : s > l ? l : s : s < l ? l : s > n ? n : s;
        };
      }, 46762: function(o, s, n) {
        var l = n(75144);
        function u(i, h) {
          h == null && (h = !0);
          var p = i[0], _ = i[1], d = i[2], f = i[3];
          return f == null && (f = h ? 1 : 255), h && (p *= 255, _ *= 255, d *= 255, f *= 255), 16777216 * (p = 255 & l(p, 0, 255)) + ((_ = 255 & l(_, 0, 255)) << 16) + ((d = 255 & l(d, 0, 255)) << 8) + (255 & l(f, 0, 255));
        }
        o.exports = u, o.exports.to = u, o.exports.from = function(i, h) {
          var p = (i = +i) >>> 24, _ = (16711680 & i) >>> 16, d = (65280 & i) >>> 8, f = 255 & i;
          return h === !1 ? [p, _, d, f] : [p / 255, _ / 255, d / 255, f / 255];
        };
      }, 86040: function(o) {
        o.exports = { 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] };
      }, 162: function(o, s, n) {
        var l = n(16401), u = n(75144), i = n(10275);
        o.exports = function(h, p) {
          p !== "float" && p || (p = "array"), p === "uint" && (p = "uint8"), p === "uint_clamped" && (p = "uint8_clamped");
          var _ = new (i(p))(4), d = p !== "uint8" && p !== "uint8_clamped";
          return h.length && typeof h != "string" || ((h = l(h))[0] /= 255, h[1] /= 255, h[2] /= 255), function(f) {
            return f instanceof Uint8Array || f instanceof Uint8ClampedArray || !!(Array.isArray(f) && (f[0] > 1 || f[0] === 0) && (f[1] > 1 || f[1] === 0) && (f[2] > 1 || f[2] === 0) && (!f[3] || f[3] > 1));
          }(h) ? (_[0] = h[0], _[1] = h[1], _[2] = h[2], _[3] = h[3] != null ? h[3] : 255, d && (_[0] /= 255, _[1] /= 255, _[2] /= 255, _[3] /= 255), _) : (d ? (_[0] = h[0], _[1] = h[1], _[2] = h[2], _[3] = h[3] != null ? h[3] : 1) : (_[0] = u(Math.floor(255 * h[0]), 0, 255), _[1] = u(Math.floor(255 * h[1]), 0, 255), _[2] = u(Math.floor(255 * h[2]), 0, 255), _[3] = h[3] == null ? 255 : u(Math.floor(255 * h[3]), 0, 255)), _);
        };
      }, 16401: function(o, s, n) {
        var l = n(10826), u = n(52132), i = n(75144);
        o.exports = function(h) {
          var p, _ = l(h);
          return _.space ? ((p = Array(3))[0] = i(_.values[0], 0, 255), p[1] = i(_.values[1], 0, 255), p[2] = i(_.values[2], 0, 255), _.space[0] === "h" && (p = u.rgb(p)), p.push(i(_.alpha, 0, 1)), p) : [];
        };
      }, 10826: function(o, s, n) {
        var l = n(86040);
        o.exports = function(i) {
          var h, p, _ = [], d = 1;
          if (typeof i == "string") if (i = i.toLowerCase(), l[i]) _ = l[i].slice(), p = "rgb";
          else if (i === "transparent") d = 0, p = "rgb", _ = [0, 0, 0];
          else if (/^#[A-Fa-f0-9]+$/.test(i)) {
            var f = i.slice(1);
            d = 1, (m = f.length) <= 4 ? (_ = [parseInt(f[0] + f[0], 16), parseInt(f[1] + f[1], 16), parseInt(f[2] + f[2], 16)], m === 4 && (d = parseInt(f[3] + f[3], 16) / 255)) : (_ = [parseInt(f[0] + f[1], 16), parseInt(f[2] + f[3], 16), parseInt(f[4] + f[5], 16)], m === 8 && (d = parseInt(f[6] + f[7], 16) / 255)), _[0] || (_[0] = 0), _[1] || (_[1] = 0), _[2] || (_[2] = 0), p = "rgb";
          } else if (h = /^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(i)) {
            var c = h[1], g = c === "rgb";
            p = f = c.replace(/a$/, "");
            var m = f === "cmyk" ? 4 : f === "gray" ? 1 : 3;
            _ = h[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(x, w) {
              if (/%$/.test(x)) return w === m ? parseFloat(x) / 100 : f === "rgb" ? 255 * parseFloat(x) / 100 : parseFloat(x);
              if (f[w] === "h") {
                if (/deg$/.test(x)) return parseFloat(x);
                if (u[x] !== void 0) return u[x];
              }
              return parseFloat(x);
            }), c === f && _.push(1), d = g || _[m] === void 0 ? 1 : _[m], _ = _.slice(0, m);
          } else i.length > 10 && /[0-9](?:\s|\/)/.test(i) && (_ = i.match(/([0-9]+)/g).map(function(x) {
            return parseFloat(x);
          }), p = i.match(/([a-z])/gi).join("").toLowerCase());
          else isNaN(i) ? Array.isArray(i) || i.length ? (_ = [i[0], i[1], i[2]], p = "rgb", d = i.length === 4 ? i[3] : 1) : i instanceof Object && (i.r != null || i.red != null || i.R != null ? (p = "rgb", _ = [i.r || i.red || i.R || 0, i.g || i.green || i.G || 0, i.b || i.blue || i.B || 0]) : (p = "hsl", _ = [i.h || i.hue || i.H || 0, i.s || i.saturation || i.S || 0, i.l || i.lightness || i.L || i.b || i.brightness]), d = i.a || i.alpha || i.opacity || 1, i.opacity != null && (d /= 100)) : (p = "rgb", _ = [i >>> 16, (65280 & i) >>> 8, 255 & i]);
          return { space: p, values: _, alpha: d };
        };
        var u = { red: 0, orange: 60, yellow: 120, green: 180, blue: 240, purple: 300 };
      }, 52132: function(o, s, n) {
        var l = n(10520);
        o.exports = { name: "hsl", min: [0, 0, 0], max: [360, 100, 100], channel: ["hue", "saturation", "lightness"], alias: ["HSL"], rgb: function(u) {
          var i, h, p, _, d, f = u[0] / 360, c = u[1] / 100, g = u[2] / 100;
          if (c === 0) return [d = 255 * g, d, d];
          i = 2 * g - (h = g < 0.5 ? g * (1 + c) : g + c - g * c), _ = [0, 0, 0];
          for (var m = 0; m < 3; m++) (p = f + 0.3333333333333333 * -(m - 1)) < 0 ? p++ : p > 1 && p--, d = 6 * p < 1 ? i + 6 * (h - i) * p : 2 * p < 1 ? h : 3 * p < 2 ? i + (h - i) * (0.6666666666666666 - p) * 6 : i, _[m] = 255 * d;
          return _;
        } }, l.hsl = function(u) {
          var i, h, p = u[0] / 255, _ = u[1] / 255, d = u[2] / 255, f = Math.min(p, _, d), c = Math.max(p, _, d), g = c - f;
          return c === f ? i = 0 : p === c ? i = (_ - d) / g : _ === c ? i = 2 + (d - p) / g : d === c && (i = 4 + (p - _) / g), (i = Math.min(60 * i, 360)) < 0 && (i += 360), h = (f + c) / 2, [i, 100 * (c === f ? 0 : h <= 0.5 ? g / (c + f) : g / (2 - c - f)), 100 * h];
        };
      }, 10520: function(o) {
        o.exports = { name: "rgb", min: [0, 0, 0], max: [255, 255, 255], channel: ["red", "green", "blue"], alias: ["RGB"] };
      }, 78171: function(o) {
        o.exports = { AFG: "afghan", ALA: "\\b\\wland", ALB: "albania", DZA: "algeria", ASM: "^(?=.*americ).*samoa", AND: "andorra", AGO: "angola", AIA: "anguill?a", ATA: "antarctica", ATG: "antigua", ARG: "argentin", ARM: "armenia", ABW: "^(?!.*bonaire).*\\baruba", AUS: "australia", AUT: "^(?!.*hungary).*austria|\\baustri.*\\bemp", AZE: "azerbaijan", BHS: "bahamas", BHR: "bahrain", BGD: "bangladesh|^(?=.*east).*paki?stan", BRB: "barbados", BLR: "belarus|byelo", BEL: "^(?!.*luxem).*belgium", BLZ: "belize|^(?=.*british).*honduras", BEN: "benin|dahome", BMU: "bermuda", BTN: "bhutan", BOL: "bolivia", BES: "^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands", BIH: "herzegovina|bosnia", BWA: "botswana|bechuana", BVT: "bouvet", BRA: "brazil", IOT: "british.?indian.?ocean", BRN: "brunei", BGR: "bulgaria", BFA: "burkina|\\bfaso|upper.?volta", BDI: "burundi", CPV: "verde", KHM: "cambodia|kampuchea|khmer", CMR: "cameroon", CAN: "canada", CYM: "cayman", CAF: "\\bcentral.african.republic", TCD: "\\bchad", CHL: "\\bchile", CHN: "^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china", CXR: "christmas", CCK: "\\bcocos|keeling", COL: "colombia", COM: "comoro", COG: "^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo", COK: "\\bcook", CRI: "costa.?rica", CIV: "ivoire|ivory", HRV: "croatia", CUB: "\\bcuba", CUW: "^(?!.*bonaire).*\\bcura(c|ç)ao", CYP: "cyprus", CSK: "czechoslovakia", CZE: "^(?=.*rep).*czech|czechia|bohemia", COD: "\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc", DNK: "denmark", DJI: "djibouti", DMA: "dominica(?!n)", DOM: "dominican.rep", ECU: "ecuador", EGY: "egypt", SLV: "el.?salvador", GNQ: "guine.*eq|eq.*guine|^(?=.*span).*guinea", ERI: "eritrea", EST: "estonia", ETH: "ethiopia|abyssinia", FLK: "falkland|malvinas", FRO: "faroe|faeroe", FJI: "fiji", FIN: "finland", FRA: "^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul", GUF: "^(?=.*french).*guiana", PYF: "french.?polynesia|tahiti", ATF: "french.?southern", GAB: "gabon", GMB: "gambia", GEO: "^(?!.*south).*georgia", DDR: "german.?democratic.?republic|democratic.?republic.*germany|east.germany", DEU: "^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german", GHA: "ghana|gold.?coast", GIB: "gibraltar", GRC: "greece|hellenic|hellas", GRL: "greenland", GRD: "grenada", GLP: "guadeloupe", GUM: "\\bguam", GTM: "guatemala", GGY: "guernsey", GIN: "^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea", GNB: "bissau|^(?=.*portu).*guinea", GUY: "guyana|british.?guiana", HTI: "haiti", HMD: "heard.*mcdonald", VAT: "holy.?see|vatican|papal.?st", HND: "^(?!.*brit).*honduras", HKG: "hong.?kong", HUN: "^(?!.*austr).*hungary", ISL: "iceland", IND: "india(?!.*ocea)", IDN: "indonesia", IRN: "\\biran|persia", IRQ: "\\biraq|mesopotamia", IRL: "(^ireland)|(^republic.*ireland)", IMN: "^(?=.*isle).*\\bman", ISR: "israel", ITA: "italy", JAM: "jamaica", JPN: "japan", JEY: "jersey", JOR: "jordan", KAZ: "kazak", KEN: "kenya|british.?east.?africa|east.?africa.?prot", KIR: "kiribati", PRK: "^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)", KWT: "kuwait", KGZ: "kyrgyz|kirghiz", LAO: "\\blaos?\\b", LVA: "latvia", LBN: "lebanon", LSO: "lesotho|basuto", LBR: "liberia", LBY: "libya", LIE: "liechtenstein", LTU: "lithuania", LUX: "^(?!.*belg).*luxem", MAC: "maca(o|u)", MDG: "madagascar|malagasy", MWI: "malawi|nyasa", MYS: "malaysia", MDV: "maldive", MLI: "\\bmali\\b", MLT: "\\bmalta", MHL: "marshall", MTQ: "martinique", MRT: "mauritania", MUS: "mauritius", MYT: "\\bmayotte", MEX: "\\bmexic", FSM: "fed.*micronesia|micronesia.*fed", MCO: "monaco", MNG: "mongolia", MNE: "^(?!.*serbia).*montenegro", MSR: "montserrat", MAR: "morocco|\\bmaroc", MOZ: "mozambique", MMR: "myanmar|burma", NAM: "namibia", NRU: "nauru", NPL: "nepal", NLD: "^(?!.*\\bant)(?!.*\\bcarib).*netherlands", ANT: "^(?=.*\\bant).*(nether|dutch)", NCL: "new.?caledonia", NZL: "new.?zealand", NIC: "nicaragua", NER: "\\bniger(?!ia)", NGA: "nigeria", NIU: "niue", NFK: "norfolk", MNP: "mariana", NOR: "norway", OMN: "\\boman|trucial", PAK: "^(?!.*east).*paki?stan", PLW: "palau", PSE: "palestin|\\bgaza|west.?bank", PAN: "panama", PNG: "papua|new.?guinea", PRY: "paraguay", PER: "peru", PHL: "philippines", PCN: "pitcairn", POL: "poland", PRT: "portugal", PRI: "puerto.?rico", QAT: "qatar", KOR: "^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)", MDA: "moldov|b(a|e)ssarabia", REU: "r(e|é)union", ROU: "r(o|u|ou)mania", RUS: "\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics", RWA: "rwanda", BLM: "barth(e|é)lemy", SHN: "helena", KNA: "kitts|\\bnevis", LCA: "\\blucia", MAF: "^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)", SPM: "miquelon", VCT: "vincent", WSM: "^(?!.*amer).*samoa", SMR: "san.?marino", STP: "\\bs(a|ã)o.?tom(e|é)", SAU: "\\bsa\\w*.?arabia", SEN: "senegal", SRB: "^(?!.*monte).*serbia", SYC: "seychell", SLE: "sierra", SGP: "singapore", SXM: "^(?!.*martin)(?!.*saba).*maarten", SVK: "^(?!.*cze).*slovak", SVN: "slovenia", SLB: "solomon", SOM: "somali", ZAF: "south.africa|s\\\\..?africa", SGS: "south.?georgia|sandwich", SSD: "\\bs\\w*.?sudan", ESP: "spain", LKA: "sri.?lanka|ceylon", SDN: "^(?!.*\\bs(?!u)).*sudan", SUR: "surinam|dutch.?guiana", SJM: "svalbard", SWZ: "swaziland", SWE: "sweden", CHE: "switz|swiss", SYR: "syria", TWN: "taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china", TJK: "tajik", THA: "thailand|\\bsiam", MKD: "macedonia|fyrom", TLS: "^(?=.*leste).*timor|^(?=.*east).*timor", TGO: "togo", TKL: "tokelau", TON: "tonga", TTO: "trinidad|tobago", TUN: "tunisia", TUR: "turkey", TKM: "turkmen", TCA: "turks", TUV: "tuvalu", UGA: "uganda", UKR: "ukrain", ARE: "emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em", GBR: "united.?kingdom|britain|^u\\.?k\\.?$", TZA: "tanzania", USA: "united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)", UMI: "minor.?outlying.?is", URY: "uruguay", UZB: "uzbek", VUT: "vanuatu|new.?hebrides", VEN: "venezuela", VNM: "^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam", VGB: "^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin", VIR: "^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin", WLF: "futuna|wallis", ESH: "western.sahara", YEM: "^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen", YMD: "^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen", YUG: "yugoslavia", ZMB: "zambia|northern.?rhodesia", EAZ: "zanzibar", ZWE: "zimbabwe|^(?!.*northern).*rhodesia" };
      }, 59518: function(o, s, n) {
        o.exports = { parse: n(86029), stringify: n(38211) };
      }, 87724: function(o, s, n) {
        var l = n(23648);
        o.exports = { isSize: function(u) {
          return /^[\d\.]/.test(u) || u.indexOf("/") !== -1 || l.indexOf(u) !== -1;
        } };
      }, 86029: function(o, s, n) {
        var l = n(80886), u = n(54324), i = n(94316), h = n(99803), p = n(87486), _ = n(2362), d = n(28089), f = n(87724).isSize;
        o.exports = g;
        var c = g.cache = {};
        function g(x) {
          if (typeof x != "string") throw new Error("Font argument must be a string.");
          if (c[x]) return c[x];
          if (x === "") throw new Error("Cannot parse an empty string.");
          if (i.indexOf(x) !== -1) return c[x] = { system: x };
          for (var w, k = { style: "normal", variant: "normal", weight: "normal", stretch: "normal", lineHeight: "normal", size: "1rem", family: ["serif"] }, S = d(x, /\s+/); w = S.shift(); ) {
            if (u.indexOf(w) !== -1) return ["style", "variant", "weight", "stretch"].forEach(function(C) {
              k[C] = w;
            }), c[x] = k;
            if (p.indexOf(w) === -1) if (w !== "normal" && w !== "small-caps") if (_.indexOf(w) === -1) {
              if (h.indexOf(w) === -1) {
                if (f(w)) {
                  var A = d(w, "/");
                  if (k.size = A[0], A[1] != null ? k.lineHeight = m(A[1]) : S[0] === "/" && (S.shift(), k.lineHeight = m(S.shift())), !S.length) throw new Error("Missing required font-family.");
                  return k.family = d(S.join(" "), /\s*,\s*/).map(l), c[x] = k;
                }
                throw new Error("Unknown or unsupported font token: " + w);
              }
              k.weight = w;
            } else k.stretch = w;
            else k.variant = w;
            else k.style = w;
          }
          throw new Error("Missing required font-size.");
        }
        function m(x) {
          var w = parseFloat(x);
          return w.toString() === x ? w : x;
        }
      }, 38211: function(o, s, n) {
        var l = n(6807), u = n(87724).isSize, i = x(n(54324)), h = x(n(94316)), p = x(n(99803)), _ = x(n(87486)), d = x(n(2362)), f = { normal: 1, "small-caps": 1 }, c = { serif: 1, "sans-serif": 1, monospace: 1, cursive: 1, fantasy: 1, "system-ui": 1 }, g = "serif";
        function m(w, k) {
          if (w && !k[w] && !i[w]) throw Error("Unknown keyword `" + w + "`");
          return w;
        }
        function x(w) {
          for (var k = {}, S = 0; S < w.length; S++) k[w[S]] = 1;
          return k;
        }
        o.exports = function(w) {
          if ((w = l(w, { style: "style fontstyle fontStyle font-style slope distinction", variant: "variant font-variant fontVariant fontvariant var capitalization", weight: "weight w font-weight fontWeight fontweight", stretch: "stretch font-stretch fontStretch fontstretch width", size: "size s font-size fontSize fontsize height em emSize", lineHeight: "lh line-height lineHeight lineheight leading", family: "font family fontFamily font-family fontfamily type typeface face", system: "system reserved default global" })).system) return w.system && m(w.system, h), w.system;
          if (m(w.style, _), m(w.variant, f), m(w.weight, p), m(w.stretch, d), w.size == null && (w.size = "1rem"), typeof w.size == "number" && (w.size += "px"), !u) throw Error("Bad size value `" + w.size + "`");
          w.family || (w.family = g), Array.isArray(w.family) && (w.family.length || (w.family = [g]), w.family = w.family.map(function(S) {
            return c[S] ? S : '"' + S + '"';
          }).join(", "));
          var k = [];
          return k.push(w.style), w.variant !== w.style && k.push(w.variant), w.weight !== w.variant && w.weight !== w.style && k.push(w.weight), w.stretch !== w.weight && w.stretch !== w.variant && w.stretch !== w.style && k.push(w.stretch), k.push(w.size + (w.lineHeight == null || w.lineHeight === "normal" || w.lineHeight + "" == "1" ? "" : "/" + w.lineHeight)), k.push(w.family), k.filter(Boolean).join(" ");
        };
      }, 51070: function(o) {
        o.exports = function(s) {
          var n = [];
          return n.toString = function() {
            return this.map(function(l) {
              var u = "", i = l[5] !== void 0;
              return l[4] && (u += "@supports (".concat(l[4], ") {")), l[2] && (u += "@media ".concat(l[2], " {")), i && (u += "@layer".concat(l[5].length > 0 ? " ".concat(l[5]) : "", " {")), u += s(l), i && (u += "}"), l[2] && (u += "}"), l[4] && (u += "}"), u;
            }).join("");
          }, n.i = function(l, u, i, h, p) {
            typeof l == "string" && (l = [[null, l, void 0]]);
            var _ = {};
            if (i) for (var d = 0; d < this.length; d++) {
              var f = this[d][0];
              f != null && (_[f] = !0);
            }
            for (var c = 0; c < l.length; c++) {
              var g = [].concat(l[c]);
              i && _[g[0]] || (p !== void 0 && (g[5] === void 0 || (g[1] = "@layer".concat(g[5].length > 0 ? " ".concat(g[5]) : "", " {").concat(g[1], "}")), g[5] = p), u && (g[2] && (g[1] = "@media ".concat(g[2], " {").concat(g[1], "}")), g[2] = u), h && (g[4] ? (g[1] = "@supports (".concat(g[4], ") {").concat(g[1], "}"), g[4] = h) : g[4] = "".concat(h)), n.push(g));
            }
          }, n;
        };
      }, 62133: function(o) {
        o.exports = function(s, n) {
          return n || (n = {}), s && (s = String(s.__esModule ? s.default : s), /^['"].*['"]$/.test(s) && (s = s.slice(1, -1)), n.hash && (s += n.hash), /["'() \t\n]|(%20)/.test(s) || n.needQuotes ? '"'.concat(s.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : s);
        };
      }, 22413: function(o) {
        o.exports = function(s) {
          return s[1];
        };
      }, 84510: function(o, s, n) {
        var l, u = n(80299), i = n(9557), h = n(6887), p = n(86591), _ = n(76504), d = n(29854), f = Function.prototype.bind, c = Object.defineProperty, g = Object.prototype.hasOwnProperty;
        l = function(m, x, w) {
          var k, S = i(x) && h(x.value);
          return delete (k = p(x)).writable, delete k.value, k.get = function() {
            return !w.overwriteDefinition && g.call(this, m) ? S : (x.value = f.call(S, w.resolveContext ? w.resolveContext(this) : this), c(this, m, x), this[m]);
          }, k;
        }, o.exports = function(m) {
          var x = _(arguments[1]);
          return u(x.resolveContext) && h(x.resolveContext), d(m, function(w, k) {
            return l(k, w, x);
          });
        };
      }, 91819: function(o, s, n) {
        var l = n(80299), u = n(63461), i = n(1920), h = n(76504), p = n(2338), _ = o.exports = function(d, f) {
          var c, g, m, x, w;
          return arguments.length < 2 || typeof d != "string" ? (x = f, f = d, d = null) : x = arguments[2], l(d) ? (c = p.call(d, "c"), g = p.call(d, "e"), m = p.call(d, "w")) : (c = m = !0, g = !1), w = { value: f, configurable: c, enumerable: g, writable: m }, x ? i(h(x), w) : w;
        };
        _.gs = function(d, f, c) {
          var g, m, x, w;
          return typeof d != "string" ? (x = c, c = f, f = d, d = null) : x = arguments[3], l(f) ? u(f) ? l(c) ? u(c) || (x = c, c = void 0) : c = void 0 : (x = f, f = c = void 0) : f = void 0, l(d) ? (g = p.call(d, "c"), m = p.call(d, "e")) : (g = !0, m = !1), w = { get: f, set: c, configurable: g, enumerable: m }, x ? i(h(x), w) : w;
        };
      }, 29725: function(o, s, n) {
        function l(m, x) {
          return m < x ? -1 : m > x ? 1 : m >= x ? 0 : NaN;
        }
        n.d(s, { V_: function() {
          return l;
        }, T9: function() {
          return h;
        }, i2: function() {
          return _;
        }, Am: function() {
          return d;
        }, jk: function() {
          return f;
        }, y1: function() {
          return c;
        }, cz: function() {
          return g;
        } }), (u = l).length === 1 && (i = u, u = function(m, x) {
          return l(i(m), x);
        });
        var u, i;
        function h(m, x) {
          var w, k, S = m.length, A = -1;
          if (x == null) {
            for (; ++A < S; ) if ((w = m[A]) != null && w >= w) for (k = w; ++A < S; ) (w = m[A]) != null && w > k && (k = w);
          } else for (; ++A < S; ) if ((w = x(m[A], A, m)) != null && w >= w) for (k = w; ++A < S; ) (w = x(m[A], A, m)) != null && w > k && (k = w);
          return k;
        }
        function p(m) {
          return m === null ? NaN : +m;
        }
        function _(m, x) {
          var w, k = m.length, S = k, A = -1, C = 0;
          if (x == null) for (; ++A < k; ) isNaN(w = p(m[A])) ? --S : C += w;
          else for (; ++A < k; ) isNaN(w = p(x(m[A], A, m))) ? --S : C += w;
          if (S) return C / S;
        }
        function d(m) {
          for (var x, w, k, S = m.length, A = -1, C = 0; ++A < S; ) C += m[A].length;
          for (w = new Array(C); --S >= 0; ) for (x = (k = m[S]).length; --x >= 0; ) w[--C] = k[x];
          return w;
        }
        function f(m, x) {
          var w, k, S = m.length, A = -1;
          if (x == null) {
            for (; ++A < S; ) if ((w = m[A]) != null && w >= w) for (k = w; ++A < S; ) (w = m[A]) != null && k > w && (k = w);
          } else for (; ++A < S; ) if ((w = x(m[A], A, m)) != null && w >= w) for (k = w; ++A < S; ) (w = x(m[A], A, m)) != null && k > w && (k = w);
          return k;
        }
        function c(m, x, w) {
          m = +m, x = +x, w = (S = arguments.length) < 2 ? (x = m, m = 0, 1) : S < 3 ? 1 : +w;
          for (var k = -1, S = 0 | Math.max(0, Math.ceil((x - m) / w)), A = new Array(S); ++k < S; ) A[k] = m + k * w;
          return A;
        }
        function g(m, x) {
          var w, k = m.length, S = -1, A = 0;
          if (x == null) for (; ++S < k; ) (w = +m[S]) && (A += w);
          else for (; ++S < k; ) (w = +x(m[S], S, m)) && (A += w);
          return A;
        }
      }, 4575: function(o, s, n) {
        n.d(s, { Tj: function() {
          return h;
        }, $I: function() {
          return p;
        } });
        var l = "$";
        function u() {
        }
        function i(x, w) {
          var k = new u();
          if (x instanceof u) x.each(function(L, E) {
            k.set(E, L);
          });
          else if (Array.isArray(x)) {
            var S, A = -1, C = x.length;
            if (w == null) for (; ++A < C; ) k.set(A, x[A]);
            else for (; ++A < C; ) k.set(w(S = x[A], A, x), S);
          } else if (x) for (var D in x) k.set(D, x[D]);
          return k;
        }
        u.prototype = i.prototype = { constructor: u, has: function(x) {
          return l + x in this;
        }, get: function(x) {
          return this[l + x];
        }, set: function(x, w) {
          return this[l + x] = w, this;
        }, remove: function(x) {
          var w = l + x;
          return w in this && delete this[w];
        }, clear: function() {
          for (var x in this) x[0] === l && delete this[x];
        }, keys: function() {
          var x = [];
          for (var w in this) w[0] === l && x.push(w.slice(1));
          return x;
        }, values: function() {
          var x = [];
          for (var w in this) w[0] === l && x.push(this[w]);
          return x;
        }, entries: function() {
          var x = [];
          for (var w in this) w[0] === l && x.push({ key: w.slice(1), value: this[w] });
          return x;
        }, size: function() {
          var x = 0;
          for (var w in this) w[0] === l && ++x;
          return x;
        }, empty: function() {
          for (var x in this) if (x[0] === l) return !1;
          return !0;
        }, each: function(x) {
          for (var w in this) w[0] === l && x(this[w], w.slice(1), this);
        } };
        var h = i;
        function p() {
          var x, w, k, S = [], A = [];
          function C(L, E, P, I) {
            if (E >= S.length) return x != null && L.sort(x), w != null ? w(L) : L;
            for (var M, O, T, z = -1, F = L.length, U = S[E++], V = h(), $ = P(); ++z < F; ) (T = V.get(M = U(O = L[z]) + "")) ? T.push(O) : V.set(M, [O]);
            return V.each(function(q, K) {
              I($, K, C(q, E, P, I));
            }), $;
          }
          function D(L, E) {
            if (++E > S.length) return L;
            var P, I = A[E - 1];
            return w != null && E >= S.length ? P = L.entries() : (P = [], L.each(function(M, O) {
              P.push({ key: O, values: D(M, E) });
            })), I != null ? P.sort(function(M, O) {
              return I(M.key, O.key);
            }) : P;
          }
          return k = { object: function(L) {
            return C(L, 0, _, d);
          }, map: function(L) {
            return C(L, 0, f, c);
          }, entries: function(L) {
            return D(C(L, 0, f, c), 0);
          }, key: function(L) {
            return S.push(L), k;
          }, sortKeys: function(L) {
            return A[S.length - 1] = L, k;
          }, sortValues: function(L) {
            return x = L, k;
          }, rollup: function(L) {
            return w = L, k;
          } };
        }
        function _() {
          return {};
        }
        function d(x, w, k) {
          x[w] = k;
        }
        function f() {
          return h();
        }
        function c(x, w, k) {
          x.set(w, k);
        }
        function g() {
        }
        var m = h.prototype;
        g.prototype = { constructor: g, has: m.has, add: function(x) {
          return this[l + (x += "")] = x, this;
        }, remove: m.remove, clear: m.clear, values: m.keys, size: m.size, empty: m.empty, each: m.each };
      }, 32702: function(o, s, n) {
        function l(Me, De) {
          var Le;
          function We() {
            var Ee, Ne, Ie = Le.length, ge = 0, Ce = 0;
            for (Ee = 0; Ee < Ie; ++Ee) ge += (Ne = Le[Ee]).x, Ce += Ne.y;
            for (ge = ge / Ie - Me, Ce = Ce / Ie - De, Ee = 0; Ee < Ie; ++Ee) (Ne = Le[Ee]).x -= ge, Ne.y -= Ce;
          }
          return Me == null && (Me = 0), De == null && (De = 0), We.initialize = function(Ee) {
            Le = Ee;
          }, We.x = function(Ee) {
            return arguments.length ? (Me = +Ee, We) : Me;
          }, We.y = function(Ee) {
            return arguments.length ? (De = +Ee, We) : De;
          }, We;
        }
        function u(Me) {
          return function() {
            return Me;
          };
        }
        function i() {
          return 1e-6 * (Math.random() - 0.5);
        }
        function h(Me, De, Le, We) {
          if (isNaN(De) || isNaN(Le)) return Me;
          var Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke = Me._root, tt = { data: We }, _e = Me._x0, Be = Me._y0, $e = Me._x1, Ze = Me._y1;
          if (!Ke) return Me._root = tt, Me;
          for (; Ke.length; ) if ((we = De >= (Ne = (_e + $e) / 2)) ? _e = Ne : $e = Ne, (Ge = Le >= (Ie = (Be + Ze) / 2)) ? Be = Ie : Ze = Ie, Ee = Ke, !(Ke = Ke[Re = Ge << 1 | we])) return Ee[Re] = tt, Me;
          if (ge = +Me._x.call(null, Ke.data), Ce = +Me._y.call(null, Ke.data), De === ge && Le === Ce) return tt.next = Ke, Ee ? Ee[Re] = tt : Me._root = tt, Me;
          do
            Ee = Ee ? Ee[Re] = new Array(4) : Me._root = new Array(4), (we = De >= (Ne = (_e + $e) / 2)) ? _e = Ne : $e = Ne, (Ge = Le >= (Ie = (Be + Ze) / 2)) ? Be = Ie : Ze = Ie;
          while ((Re = Ge << 1 | we) == (je = (Ce >= Ie) << 1 | ge >= Ne));
          return Ee[je] = Ke, Ee[Re] = tt, Me;
        }
        function p(Me, De, Le, We, Ee) {
          this.node = Me, this.x0 = De, this.y0 = Le, this.x1 = We, this.y1 = Ee;
        }
        function _(Me) {
          return Me[0];
        }
        function d(Me) {
          return Me[1];
        }
        function f(Me, De, Le) {
          var We = new c(De ?? _, Le ?? d, NaN, NaN, NaN, NaN);
          return Me == null ? We : We.addAll(Me);
        }
        function c(Me, De, Le, We, Ee, Ne) {
          this._x = Me, this._y = De, this._x0 = Le, this._y0 = We, this._x1 = Ee, this._y1 = Ne, this._root = void 0;
        }
        function g(Me) {
          for (var De = { data: Me.data }, Le = De; Me = Me.next; ) Le = Le.next = { data: Me.data };
          return De;
        }
        n.r(s), n.d(s, { forceCenter: function() {
          return l;
        }, forceCollide: function() {
          return k;
        }, forceLink: function() {
          return D;
        }, forceManyBody: function() {
          return pe;
        }, forceRadial: function() {
          return be;
        }, forceSimulation: function() {
          return ye;
        }, forceX: function() {
          return Ae;
        }, forceY: function() {
          return Se;
        } });
        var m = f.prototype = c.prototype;
        function x(Me) {
          return Me.x + Me.vx;
        }
        function w(Me) {
          return Me.y + Me.vy;
        }
        function k(Me) {
          var De, Le, We = 1, Ee = 1;
          function Ne() {
            for (var Ce, we, Ge, Re, je, Ke, tt, _e = De.length, Be = 0; Be < Ee; ++Be) for (we = f(De, x, w).visitAfter(Ie), Ce = 0; Ce < _e; ++Ce) Ge = De[Ce], Ke = Le[Ge.index], tt = Ke * Ke, Re = Ge.x + Ge.vx, je = Ge.y + Ge.vy, we.visit($e);
            function $e(Ze, ct, ft, _t, Pt) {
              var Dt = Ze.data, $t = Ze.r, Gt = Ke + $t;
              if (!Dt) return ct > Re + Gt || _t < Re - Gt || ft > je + Gt || Pt < je - Gt;
              if (Dt.index > Ge.index) {
                var Wt = Re - Dt.x - Dt.vx, mt = je - Dt.y - Dt.vy, at = Wt * Wt + mt * mt;
                at < Gt * Gt && (Wt === 0 && (at += (Wt = i()) * Wt), mt === 0 && (at += (mt = i()) * mt), at = (Gt - (at = Math.sqrt(at))) / at * We, Ge.vx += (Wt *= at) * (Gt = ($t *= $t) / (tt + $t)), Ge.vy += (mt *= at) * Gt, Dt.vx -= Wt * (Gt = 1 - Gt), Dt.vy -= mt * Gt);
              }
            }
          }
          function Ie(Ce) {
            if (Ce.data) return Ce.r = Le[Ce.data.index];
            for (var we = Ce.r = 0; we < 4; ++we) Ce[we] && Ce[we].r > Ce.r && (Ce.r = Ce[we].r);
          }
          function ge() {
            if (De) {
              var Ce, we, Ge = De.length;
              for (Le = new Array(Ge), Ce = 0; Ce < Ge; ++Ce) we = De[Ce], Le[we.index] = +Me(we, Ce, De);
            }
          }
          return typeof Me != "function" && (Me = u(Me == null ? 1 : +Me)), Ne.initialize = function(Ce) {
            De = Ce, ge();
          }, Ne.iterations = function(Ce) {
            return arguments.length ? (Ee = +Ce, Ne) : Ee;
          }, Ne.strength = function(Ce) {
            return arguments.length ? (We = +Ce, Ne) : We;
          }, Ne.radius = function(Ce) {
            return arguments.length ? (Me = typeof Ce == "function" ? Ce : u(+Ce), ge(), Ne) : Me;
          }, Ne;
        }
        m.copy = function() {
          var Me, De, Le = new c(this._x, this._y, this._x0, this._y0, this._x1, this._y1), We = this._root;
          if (!We) return Le;
          if (!We.length) return Le._root = g(We), Le;
          for (Me = [{ source: We, target: Le._root = new Array(4) }]; We = Me.pop(); ) for (var Ee = 0; Ee < 4; ++Ee) (De = We.source[Ee]) && (De.length ? Me.push({ source: De, target: We.target[Ee] = new Array(4) }) : We.target[Ee] = g(De));
          return Le;
        }, m.add = function(Me) {
          var De = +this._x.call(null, Me), Le = +this._y.call(null, Me);
          return h(this.cover(De, Le), De, Le, Me);
        }, m.addAll = function(Me) {
          var De, Le, We, Ee, Ne = Me.length, Ie = new Array(Ne), ge = new Array(Ne), Ce = 1 / 0, we = 1 / 0, Ge = -1 / 0, Re = -1 / 0;
          for (Le = 0; Le < Ne; ++Le) isNaN(We = +this._x.call(null, De = Me[Le])) || isNaN(Ee = +this._y.call(null, De)) || (Ie[Le] = We, ge[Le] = Ee, We < Ce && (Ce = We), We > Ge && (Ge = We), Ee < we && (we = Ee), Ee > Re && (Re = Ee));
          if (Ce > Ge || we > Re) return this;
          for (this.cover(Ce, we).cover(Ge, Re), Le = 0; Le < Ne; ++Le) h(this, Ie[Le], ge[Le], Me[Le]);
          return this;
        }, m.cover = function(Me, De) {
          if (isNaN(Me = +Me) || isNaN(De = +De)) return this;
          var Le = this._x0, We = this._y0, Ee = this._x1, Ne = this._y1;
          if (isNaN(Le)) Ee = (Le = Math.floor(Me)) + 1, Ne = (We = Math.floor(De)) + 1;
          else {
            for (var Ie, ge, Ce = Ee - Le, we = this._root; Le > Me || Me >= Ee || We > De || De >= Ne; ) switch (ge = (De < We) << 1 | Me < Le, (Ie = new Array(4))[ge] = we, we = Ie, Ce *= 2, ge) {
              case 0:
                Ee = Le + Ce, Ne = We + Ce;
                break;
              case 1:
                Le = Ee - Ce, Ne = We + Ce;
                break;
              case 2:
                Ee = Le + Ce, We = Ne - Ce;
                break;
              case 3:
                Le = Ee - Ce, We = Ne - Ce;
            }
            this._root && this._root.length && (this._root = we);
          }
          return this._x0 = Le, this._y0 = We, this._x1 = Ee, this._y1 = Ne, this;
        }, m.data = function() {
          var Me = [];
          return this.visit(function(De) {
            if (!De.length) do
              Me.push(De.data);
            while (De = De.next);
          }), Me;
        }, m.extent = function(Me) {
          return arguments.length ? this.cover(+Me[0][0], +Me[0][1]).cover(+Me[1][0], +Me[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
        }, m.find = function(Me, De, Le) {
          var We, Ee, Ne, Ie, ge, Ce, we, Ge = this._x0, Re = this._y0, je = this._x1, Ke = this._y1, tt = [], _e = this._root;
          for (_e && tt.push(new p(_e, Ge, Re, je, Ke)), Le == null ? Le = 1 / 0 : (Ge = Me - Le, Re = De - Le, je = Me + Le, Ke = De + Le, Le *= Le); Ce = tt.pop(); ) if (!(!(_e = Ce.node) || (Ee = Ce.x0) > je || (Ne = Ce.y0) > Ke || (Ie = Ce.x1) < Ge || (ge = Ce.y1) < Re)) if (_e.length) {
            var Be = (Ee + Ie) / 2, $e = (Ne + ge) / 2;
            tt.push(new p(_e[3], Be, $e, Ie, ge), new p(_e[2], Ee, $e, Be, ge), new p(_e[1], Be, Ne, Ie, $e), new p(_e[0], Ee, Ne, Be, $e)), (we = (De >= $e) << 1 | Me >= Be) && (Ce = tt[tt.length - 1], tt[tt.length - 1] = tt[tt.length - 1 - we], tt[tt.length - 1 - we] = Ce);
          } else {
            var Ze = Me - +this._x.call(null, _e.data), ct = De - +this._y.call(null, _e.data), ft = Ze * Ze + ct * ct;
            if (ft < Le) {
              var _t = Math.sqrt(Le = ft);
              Ge = Me - _t, Re = De - _t, je = Me + _t, Ke = De + _t, We = _e.data;
            }
          }
          return We;
        }, m.remove = function(Me) {
          if (isNaN(Ne = +this._x.call(null, Me)) || isNaN(Ie = +this._y.call(null, Me))) return this;
          var De, Le, We, Ee, Ne, Ie, ge, Ce, we, Ge, Re, je, Ke = this._root, tt = this._x0, _e = this._y0, Be = this._x1, $e = this._y1;
          if (!Ke) return this;
          if (Ke.length) for (; ; ) {
            if ((we = Ne >= (ge = (tt + Be) / 2)) ? tt = ge : Be = ge, (Ge = Ie >= (Ce = (_e + $e) / 2)) ? _e = Ce : $e = Ce, De = Ke, !(Ke = Ke[Re = Ge << 1 | we])) return this;
            if (!Ke.length) break;
            (De[Re + 1 & 3] || De[Re + 2 & 3] || De[Re + 3 & 3]) && (Le = De, je = Re);
          }
          for (; Ke.data !== Me; ) if (We = Ke, !(Ke = Ke.next)) return this;
          return (Ee = Ke.next) && delete Ke.next, We ? (Ee ? We.next = Ee : delete We.next, this) : De ? (Ee ? De[Re] = Ee : delete De[Re], (Ke = De[0] || De[1] || De[2] || De[3]) && Ke === (De[3] || De[2] || De[1] || De[0]) && !Ke.length && (Le ? Le[je] = Ke : this._root = Ke), this) : (this._root = Ee, this);
        }, m.removeAll = function(Me) {
          for (var De = 0, Le = Me.length; De < Le; ++De) this.remove(Me[De]);
          return this;
        }, m.root = function() {
          return this._root;
        }, m.size = function() {
          var Me = 0;
          return this.visit(function(De) {
            if (!De.length) do
              ++Me;
            while (De = De.next);
          }), Me;
        }, m.visit = function(Me) {
          var De, Le, We, Ee, Ne, Ie, ge = [], Ce = this._root;
          for (Ce && ge.push(new p(Ce, this._x0, this._y0, this._x1, this._y1)); De = ge.pop(); ) if (!Me(Ce = De.node, We = De.x0, Ee = De.y0, Ne = De.x1, Ie = De.y1) && Ce.length) {
            var we = (We + Ne) / 2, Ge = (Ee + Ie) / 2;
            (Le = Ce[3]) && ge.push(new p(Le, we, Ge, Ne, Ie)), (Le = Ce[2]) && ge.push(new p(Le, We, Ge, we, Ie)), (Le = Ce[1]) && ge.push(new p(Le, we, Ee, Ne, Ge)), (Le = Ce[0]) && ge.push(new p(Le, We, Ee, we, Ge));
          }
          return this;
        }, m.visitAfter = function(Me) {
          var De, Le = [], We = [];
          for (this._root && Le.push(new p(this._root, this._x0, this._y0, this._x1, this._y1)); De = Le.pop(); ) {
            var Ee = De.node;
            if (Ee.length) {
              var Ne, Ie = De.x0, ge = De.y0, Ce = De.x1, we = De.y1, Ge = (Ie + Ce) / 2, Re = (ge + we) / 2;
              (Ne = Ee[0]) && Le.push(new p(Ne, Ie, ge, Ge, Re)), (Ne = Ee[1]) && Le.push(new p(Ne, Ge, ge, Ce, Re)), (Ne = Ee[2]) && Le.push(new p(Ne, Ie, Re, Ge, we)), (Ne = Ee[3]) && Le.push(new p(Ne, Ge, Re, Ce, we));
            }
            We.push(De);
          }
          for (; De = We.pop(); ) Me(De.node, De.x0, De.y0, De.x1, De.y1);
          return this;
        }, m.x = function(Me) {
          return arguments.length ? (this._x = Me, this) : this._x;
        }, m.y = function(Me) {
          return arguments.length ? (this._y = Me, this) : this._y;
        };
        var S = n(4575);
        function A(Me) {
          return Me.index;
        }
        function C(Me, De) {
          var Le = Me.get(De);
          if (!Le) throw new Error("missing: " + De);
          return Le;
        }
        function D(Me) {
          var De, Le, We, Ee, Ne, Ie = A, ge = function(tt) {
            return 1 / Math.min(Ee[tt.source.index], Ee[tt.target.index]);
          }, Ce = u(30), we = 1;
          function Ge(tt) {
            for (var _e = 0, Be = Me.length; _e < we; ++_e) for (var $e, Ze, ct, ft, _t, Pt, Dt, $t = 0; $t < Be; ++$t) Ze = ($e = Me[$t]).source, ft = (ct = $e.target).x + ct.vx - Ze.x - Ze.vx || i(), _t = ct.y + ct.vy - Ze.y - Ze.vy || i(), ft *= Pt = ((Pt = Math.sqrt(ft * ft + _t * _t)) - Le[$t]) / Pt * tt * De[$t], _t *= Pt, ct.vx -= ft * (Dt = Ne[$t]), ct.vy -= _t * Dt, Ze.vx += ft * (Dt = 1 - Dt), Ze.vy += _t * Dt;
          }
          function Re() {
            if (We) {
              var tt, _e, Be = We.length, $e = Me.length, Ze = (0, S.Tj)(We, Ie);
              for (tt = 0, Ee = new Array(Be); tt < $e; ++tt) (_e = Me[tt]).index = tt, typeof _e.source != "object" && (_e.source = C(Ze, _e.source)), typeof _e.target != "object" && (_e.target = C(Ze, _e.target)), Ee[_e.source.index] = (Ee[_e.source.index] || 0) + 1, Ee[_e.target.index] = (Ee[_e.target.index] || 0) + 1;
              for (tt = 0, Ne = new Array($e); tt < $e; ++tt) _e = Me[tt], Ne[tt] = Ee[_e.source.index] / (Ee[_e.source.index] + Ee[_e.target.index]);
              De = new Array($e), je(), Le = new Array($e), Ke();
            }
          }
          function je() {
            if (We) for (var tt = 0, _e = Me.length; tt < _e; ++tt) De[tt] = +ge(Me[tt], tt, Me);
          }
          function Ke() {
            if (We) for (var tt = 0, _e = Me.length; tt < _e; ++tt) Le[tt] = +Ce(Me[tt], tt, Me);
          }
          return Me == null && (Me = []), Ge.initialize = function(tt) {
            We = tt, Re();
          }, Ge.links = function(tt) {
            return arguments.length ? (Me = tt, Re(), Ge) : Me;
          }, Ge.id = function(tt) {
            return arguments.length ? (Ie = tt, Ge) : Ie;
          }, Ge.iterations = function(tt) {
            return arguments.length ? (we = +tt, Ge) : we;
          }, Ge.strength = function(tt) {
            return arguments.length ? (ge = typeof tt == "function" ? tt : u(+tt), je(), Ge) : ge;
          }, Ge.distance = function(tt) {
            return arguments.length ? (Ce = typeof tt == "function" ? tt : u(+tt), Ke(), Ge) : Ce;
          }, Ge;
        }
        var L = { value: function() {
        } };
        function E() {
          for (var Me, De = 0, Le = arguments.length, We = {}; De < Le; ++De) {
            if (!(Me = arguments[De] + "") || Me in We || /[\s.]/.test(Me)) throw new Error("illegal type: " + Me);
            We[Me] = [];
          }
          return new P(We);
        }
        function P(Me) {
          this._ = Me;
        }
        function I(Me, De) {
          for (var Le, We = 0, Ee = Me.length; We < Ee; ++We) if ((Le = Me[We]).name === De) return Le.value;
        }
        function M(Me, De, Le) {
          for (var We = 0, Ee = Me.length; We < Ee; ++We) if (Me[We].name === De) {
            Me[We] = L, Me = Me.slice(0, We).concat(Me.slice(We + 1));
            break;
          }
          return Le != null && Me.push({ name: De, value: Le }), Me;
        }
        P.prototype = E.prototype = { constructor: P, on: function(Me, De) {
          var Le, We, Ee = this._, Ne = (We = Ee, (Me + "").trim().split(/^|\s+/).map(function(Ce) {
            var we = "", Ge = Ce.indexOf(".");
            if (Ge >= 0 && (we = Ce.slice(Ge + 1), Ce = Ce.slice(0, Ge)), Ce && !We.hasOwnProperty(Ce)) throw new Error("unknown type: " + Ce);
            return { type: Ce, name: we };
          })), Ie = -1, ge = Ne.length;
          if (!(arguments.length < 2)) {
            if (De != null && typeof De != "function") throw new Error("invalid callback: " + De);
            for (; ++Ie < ge; ) if (Le = (Me = Ne[Ie]).type) Ee[Le] = M(Ee[Le], Me.name, De);
            else if (De == null) for (Le in Ee) Ee[Le] = M(Ee[Le], Me.name, null);
            return this;
          }
          for (; ++Ie < ge; ) if ((Le = (Me = Ne[Ie]).type) && (Le = I(Ee[Le], Me.name))) return Le;
        }, copy: function() {
          var Me = {}, De = this._;
          for (var Le in De) Me[Le] = De[Le].slice();
          return new P(Me);
        }, call: function(Me, De) {
          if ((Le = arguments.length - 2) > 0) for (var Le, We, Ee = new Array(Le), Ne = 0; Ne < Le; ++Ne) Ee[Ne] = arguments[Ne + 2];
          if (!this._.hasOwnProperty(Me)) throw new Error("unknown type: " + Me);
          for (Ne = 0, Le = (We = this._[Me]).length; Ne < Le; ++Ne) We[Ne].value.apply(De, Ee);
        }, apply: function(Me, De, Le) {
          if (!this._.hasOwnProperty(Me)) throw new Error("unknown type: " + Me);
          for (var We = this._[Me], Ee = 0, Ne = We.length; Ee < Ne; ++Ee) We[Ee].value.apply(De, Le);
        } };
        var O, T, z = E, F = 0, U = 0, V = 0, $ = 1e3, q = 0, K = 0, re = 0, Y = typeof performance == "object" && performance.now ? performance : Date, te = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(Me) {
          setTimeout(Me, 17);
        };
        function ee() {
          return K || (te(X), K = Y.now() + re);
        }
        function X() {
          K = 0;
        }
        function Q() {
          this._call = this._time = this._next = null;
        }
        function ue(Me, De, Le) {
          var We = new Q();
          return We.restart(Me, De, Le), We;
        }
        function ce() {
          K = (q = Y.now()) + re, F = U = 0;
          try {
            (function() {
              ee(), ++F;
              for (var Me, De = O; De; ) (Me = K - De._time) >= 0 && De._call.call(null, Me), De = De._next;
              --F;
            })();
          } finally {
            F = 0, function() {
              for (var Me, De, Le = O, We = 1 / 0; Le; ) Le._call ? (We > Le._time && (We = Le._time), Me = Le, Le = Le._next) : (De = Le._next, Le._next = null, Le = Me ? Me._next = De : O = De);
              T = Me, de(We);
            }(), K = 0;
          }
        }
        function he() {
          var Me = Y.now(), De = Me - q;
          De > $ && (re -= De, q = Me);
        }
        function de(Me) {
          F || (U && (U = clearTimeout(U)), Me - K > 24 ? (Me < 1 / 0 && (U = setTimeout(ce, Me - Y.now() - re)), V && (V = clearInterval(V))) : (V || (q = Y.now(), V = setInterval(he, $)), F = 1, te(ce)));
        }
        function ne(Me) {
          return Me.x;
        }
        function ae(Me) {
          return Me.y;
        }
        Q.prototype = ue.prototype = { constructor: Q, restart: function(Me, De, Le) {
          if (typeof Me != "function") throw new TypeError("callback is not a function");
          Le = (Le == null ? ee() : +Le) + (De == null ? 0 : +De), this._next || T === this || (T ? T._next = this : O = this, T = this), this._call = Me, this._time = Le, de();
        }, stop: function() {
          this._call && (this._call = null, this._time = 1 / 0, de());
        } };
        var se = 10, me = Math.PI * (3 - Math.sqrt(5));
        function ye(Me) {
          var De, Le = 1, We = 1e-3, Ee = 1 - Math.pow(We, 1 / 300), Ne = 0, Ie = 0.6, ge = (0, S.Tj)(), Ce = ue(Ge), we = z("tick", "end");
          function Ge() {
            Re(), we.call("tick", De), Le < We && (Ce.stop(), we.call("end", De));
          }
          function Re(tt) {
            var _e, Be, $e = Me.length;
            tt === void 0 && (tt = 1);
            for (var Ze = 0; Ze < tt; ++Ze) for (Le += (Ne - Le) * Ee, ge.each(function(ct) {
              ct(Le);
            }), _e = 0; _e < $e; ++_e) (Be = Me[_e]).fx == null ? Be.x += Be.vx *= Ie : (Be.x = Be.fx, Be.vx = 0), Be.fy == null ? Be.y += Be.vy *= Ie : (Be.y = Be.fy, Be.vy = 0);
            return De;
          }
          function je() {
            for (var tt, _e = 0, Be = Me.length; _e < Be; ++_e) {
              if ((tt = Me[_e]).index = _e, tt.fx != null && (tt.x = tt.fx), tt.fy != null && (tt.y = tt.fy), isNaN(tt.x) || isNaN(tt.y)) {
                var $e = se * Math.sqrt(_e), Ze = _e * me;
                tt.x = $e * Math.cos(Ze), tt.y = $e * Math.sin(Ze);
              }
              (isNaN(tt.vx) || isNaN(tt.vy)) && (tt.vx = tt.vy = 0);
            }
          }
          function Ke(tt) {
            return tt.initialize && tt.initialize(Me), tt;
          }
          return Me == null && (Me = []), je(), De = { tick: Re, restart: function() {
            return Ce.restart(Ge), De;
          }, stop: function() {
            return Ce.stop(), De;
          }, nodes: function(tt) {
            return arguments.length ? (Me = tt, je(), ge.each(Ke), De) : Me;
          }, alpha: function(tt) {
            return arguments.length ? (Le = +tt, De) : Le;
          }, alphaMin: function(tt) {
            return arguments.length ? (We = +tt, De) : We;
          }, alphaDecay: function(tt) {
            return arguments.length ? (Ee = +tt, De) : +Ee;
          }, alphaTarget: function(tt) {
            return arguments.length ? (Ne = +tt, De) : Ne;
          }, velocityDecay: function(tt) {
            return arguments.length ? (Ie = 1 - tt, De) : 1 - Ie;
          }, force: function(tt, _e) {
            return arguments.length > 1 ? (_e == null ? ge.remove(tt) : ge.set(tt, Ke(_e)), De) : ge.get(tt);
          }, find: function(tt, _e, Be) {
            var $e, Ze, ct, ft, _t, Pt = 0, Dt = Me.length;
            for (Be == null ? Be = 1 / 0 : Be *= Be, Pt = 0; Pt < Dt; ++Pt) (ct = ($e = tt - (ft = Me[Pt]).x) * $e + (Ze = _e - ft.y) * Ze) < Be && (_t = ft, Be = ct);
            return _t;
          }, on: function(tt, _e) {
            return arguments.length > 1 ? (we.on(tt, _e), De) : we.on(tt);
          } };
        }
        function pe() {
          var Me, De, Le, We, Ee = u(-30), Ne = 1, Ie = 1 / 0, ge = 0.81;
          function Ce(je) {
            var Ke, tt = Me.length, _e = f(Me, ne, ae).visitAfter(Ge);
            for (Le = je, Ke = 0; Ke < tt; ++Ke) De = Me[Ke], _e.visit(Re);
          }
          function we() {
            if (Me) {
              var je, Ke, tt = Me.length;
              for (We = new Array(tt), je = 0; je < tt; ++je) Ke = Me[je], We[Ke.index] = +Ee(Ke, je, Me);
            }
          }
          function Ge(je) {
            var Ke, tt, _e, Be, $e, Ze = 0, ct = 0;
            if (je.length) {
              for (_e = Be = $e = 0; $e < 4; ++$e) (Ke = je[$e]) && (tt = Math.abs(Ke.value)) && (Ze += Ke.value, ct += tt, _e += tt * Ke.x, Be += tt * Ke.y);
              je.x = _e / ct, je.y = Be / ct;
            } else {
              (Ke = je).x = Ke.data.x, Ke.y = Ke.data.y;
              do
                Ze += We[Ke.data.index];
              while (Ke = Ke.next);
            }
            je.value = Ze;
          }
          function Re(je, Ke, tt, _e) {
            if (!je.value) return !0;
            var Be = je.x - De.x, $e = je.y - De.y, Ze = _e - Ke, ct = Be * Be + $e * $e;
            if (Ze * Ze / ge < ct) return ct < Ie && (Be === 0 && (ct += (Be = i()) * Be), $e === 0 && (ct += ($e = i()) * $e), ct < Ne && (ct = Math.sqrt(Ne * ct)), De.vx += Be * je.value * Le / ct, De.vy += $e * je.value * Le / ct), !0;
            if (!(je.length || ct >= Ie)) {
              (je.data !== De || je.next) && (Be === 0 && (ct += (Be = i()) * Be), $e === 0 && (ct += ($e = i()) * $e), ct < Ne && (ct = Math.sqrt(Ne * ct)));
              do
                je.data !== De && (Ze = We[je.data.index] * Le / ct, De.vx += Be * Ze, De.vy += $e * Ze);
              while (je = je.next);
            }
          }
          return Ce.initialize = function(je) {
            Me = je, we();
          }, Ce.strength = function(je) {
            return arguments.length ? (Ee = typeof je == "function" ? je : u(+je), we(), Ce) : Ee;
          }, Ce.distanceMin = function(je) {
            return arguments.length ? (Ne = je * je, Ce) : Math.sqrt(Ne);
          }, Ce.distanceMax = function(je) {
            return arguments.length ? (Ie = je * je, Ce) : Math.sqrt(Ie);
          }, Ce.theta = function(je) {
            return arguments.length ? (ge = je * je, Ce) : Math.sqrt(ge);
          }, Ce;
        }
        function be(Me, De, Le) {
          var We, Ee, Ne, Ie = u(0.1);
          function ge(we) {
            for (var Ge = 0, Re = We.length; Ge < Re; ++Ge) {
              var je = We[Ge], Ke = je.x - De || 1e-6, tt = je.y - Le || 1e-6, _e = Math.sqrt(Ke * Ke + tt * tt), Be = (Ne[Ge] - _e) * Ee[Ge] * we / _e;
              je.vx += Ke * Be, je.vy += tt * Be;
            }
          }
          function Ce() {
            if (We) {
              var we, Ge = We.length;
              for (Ee = new Array(Ge), Ne = new Array(Ge), we = 0; we < Ge; ++we) Ne[we] = +Me(We[we], we, We), Ee[we] = isNaN(Ne[we]) ? 0 : +Ie(We[we], we, We);
            }
          }
          return typeof Me != "function" && (Me = u(+Me)), De == null && (De = 0), Le == null && (Le = 0), ge.initialize = function(we) {
            We = we, Ce();
          }, ge.strength = function(we) {
            return arguments.length ? (Ie = typeof we == "function" ? we : u(+we), Ce(), ge) : Ie;
          }, ge.radius = function(we) {
            return arguments.length ? (Me = typeof we == "function" ? we : u(+we), Ce(), ge) : Me;
          }, ge.x = function(we) {
            return arguments.length ? (De = +we, ge) : De;
          }, ge.y = function(we) {
            return arguments.length ? (Le = +we, ge) : Le;
          }, ge;
        }
        function Ae(Me) {
          var De, Le, We, Ee = u(0.1);
          function Ne(ge) {
            for (var Ce, we = 0, Ge = De.length; we < Ge; ++we) (Ce = De[we]).vx += (We[we] - Ce.x) * Le[we] * ge;
          }
          function Ie() {
            if (De) {
              var ge, Ce = De.length;
              for (Le = new Array(Ce), We = new Array(Ce), ge = 0; ge < Ce; ++ge) Le[ge] = isNaN(We[ge] = +Me(De[ge], ge, De)) ? 0 : +Ee(De[ge], ge, De);
            }
          }
          return typeof Me != "function" && (Me = u(Me == null ? 0 : +Me)), Ne.initialize = function(ge) {
            De = ge, Ie();
          }, Ne.strength = function(ge) {
            return arguments.length ? (Ee = typeof ge == "function" ? ge : u(+ge), Ie(), Ne) : Ee;
          }, Ne.x = function(ge) {
            return arguments.length ? (Me = typeof ge == "function" ? ge : u(+ge), Ie(), Ne) : Me;
          }, Ne;
        }
        function Se(Me) {
          var De, Le, We, Ee = u(0.1);
          function Ne(ge) {
            for (var Ce, we = 0, Ge = De.length; we < Ge; ++we) (Ce = De[we]).vy += (We[we] - Ce.y) * Le[we] * ge;
          }
          function Ie() {
            if (De) {
              var ge, Ce = De.length;
              for (Le = new Array(Ce), We = new Array(Ce), ge = 0; ge < Ce; ++ge) Le[ge] = isNaN(We[ge] = +Me(De[ge], ge, De)) ? 0 : +Ee(De[ge], ge, De);
            }
          }
          return typeof Me != "function" && (Me = u(Me == null ? 0 : +Me)), Ne.initialize = function(ge) {
            De = ge, Ie();
          }, Ne.strength = function(ge) {
            return arguments.length ? (Ee = typeof ge == "function" ? ge : u(+ge), Ie(), Ne) : Ee;
          }, Ne.y = function(ge) {
            return arguments.length ? (Me = typeof ge == "function" ? ge : u(+ge), Ie(), Ne) : Me;
          }, Ne;
        }
      }, 36464: function(o, s, n) {
        function l(k, S) {
          if ((A = (k = S ? k.toExponential(S - 1) : k.toExponential()).indexOf("e")) < 0) return null;
          var A, C = k.slice(0, A);
          return [C.length > 1 ? C[0] + C.slice(2) : C, +k.slice(A + 1)];
        }
        n.d(s, { GP: function() {
          return g;
        }, OE: function() {
          return w;
        } });
        var u, i = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
        function h(k) {
          if (!(S = i.exec(k))) throw new Error("invalid format: " + k);
          var S;
          return new p({ fill: S[1], align: S[2], sign: S[3], symbol: S[4], zero: S[5], width: S[6], comma: S[7], precision: S[8] && S[8].slice(1), trim: S[9], type: S[10] });
        }
        function p(k) {
          this.fill = k.fill === void 0 ? " " : k.fill + "", this.align = k.align === void 0 ? ">" : k.align + "", this.sign = k.sign === void 0 ? "-" : k.sign + "", this.symbol = k.symbol === void 0 ? "" : k.symbol + "", this.zero = !!k.zero, this.width = k.width === void 0 ? void 0 : +k.width, this.comma = !!k.comma, this.precision = k.precision === void 0 ? void 0 : +k.precision, this.trim = !!k.trim, this.type = k.type === void 0 ? "" : k.type + "";
        }
        function _(k, S) {
          var A = l(k, S);
          if (!A) return k + "";
          var C = A[0], D = A[1];
          return D < 0 ? "0." + new Array(-D).join("0") + C : C.length > D + 1 ? C.slice(0, D + 1) + "." + C.slice(D + 1) : C + new Array(D - C.length + 2).join("0");
        }
        h.prototype = p.prototype, p.prototype.toString = function() {
          return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, 0 | this.width)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, 0 | this.precision)) + (this.trim ? "~" : "") + this.type;
        };
        var d = { "%": function(k, S) {
          return (100 * k).toFixed(S);
        }, b: function(k) {
          return Math.round(k).toString(2);
        }, c: function(k) {
          return k + "";
        }, d: function(k) {
          return Math.abs(k = Math.round(k)) >= 1e21 ? k.toLocaleString("en").replace(/,/g, "") : k.toString(10);
        }, e: function(k, S) {
          return k.toExponential(S);
        }, f: function(k, S) {
          return k.toFixed(S);
        }, g: function(k, S) {
          return k.toPrecision(S);
        }, o: function(k) {
          return Math.round(k).toString(8);
        }, p: function(k, S) {
          return _(100 * k, S);
        }, r: _, s: function(k, S) {
          var A = l(k, S);
          if (!A) return k + "";
          var C = A[0], D = A[1], L = D - (u = 3 * Math.max(-8, Math.min(8, Math.floor(D / 3)))) + 1, E = C.length;
          return L === E ? C : L > E ? C + new Array(L - E + 1).join("0") : L > 0 ? C.slice(0, L) + "." + C.slice(L) : "0." + new Array(1 - L).join("0") + l(k, Math.max(0, S + L - 1))[0];
        }, X: function(k) {
          return Math.round(k).toString(16).toUpperCase();
        }, x: function(k) {
          return Math.round(k).toString(16);
        } };
        function f(k) {
          return k;
        }
        var c, g, m = Array.prototype.map, x = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
        function w(k) {
          var S, A, C = k.grouping === void 0 || k.thousands === void 0 ? f : (S = m.call(k.grouping, Number), A = k.thousands + "", function(z, F) {
            for (var U = z.length, V = [], $ = 0, q = S[0], K = 0; U > 0 && q > 0 && (K + q + 1 > F && (q = Math.max(1, F - K)), V.push(z.substring(U -= q, U + q)), !((K += q + 1) > F)); ) q = S[$ = ($ + 1) % S.length];
            return V.reverse().join(A);
          }), D = k.currency === void 0 ? "" : k.currency[0] + "", L = k.currency === void 0 ? "" : k.currency[1] + "", E = k.decimal === void 0 ? "." : k.decimal + "", P = k.numerals === void 0 ? f : /* @__PURE__ */ function(z) {
            return function(F) {
              return F.replace(/[0-9]/g, function(U) {
                return z[+U];
              });
            };
          }(m.call(k.numerals, String)), I = k.percent === void 0 ? "%" : k.percent + "", M = k.minus === void 0 ? "-" : k.minus + "", O = k.nan === void 0 ? "NaN" : k.nan + "";
          function T(z) {
            var F = (z = h(z)).fill, U = z.align, V = z.sign, $ = z.symbol, q = z.zero, K = z.width, re = z.comma, Y = z.precision, te = z.trim, ee = z.type;
            ee === "n" ? (re = !0, ee = "g") : d[ee] || (Y === void 0 && (Y = 12), te = !0, ee = "g"), (q || F === "0" && U === "=") && (q = !0, F = "0", U = "=");
            var X = $ === "$" ? D : $ === "#" && /[boxX]/.test(ee) ? "0" + ee.toLowerCase() : "", Q = $ === "$" ? L : /[%p]/.test(ee) ? I : "", ue = d[ee], ce = /[defgprs%]/.test(ee);
            function he(de) {
              var ne, ae, se, me = X, ye = Q;
              if (ee === "c") ye = ue(de) + ye, de = "";
              else {
                var pe = (de = +de) < 0 || 1 / de < 0;
                if (de = isNaN(de) ? O : ue(Math.abs(de), Y), te && (de = function(Se) {
                  e: for (var Me, De = Se.length, Le = 1, We = -1; Le < De; ++Le) switch (Se[Le]) {
                    case ".":
                      We = Me = Le;
                      break;
                    case "0":
                      We === 0 && (We = Le), Me = Le;
                      break;
                    default:
                      if (!+Se[Le]) break e;
                      We > 0 && (We = 0);
                  }
                  return We > 0 ? Se.slice(0, We) + Se.slice(Me + 1) : Se;
                }(de)), pe && +de == 0 && V !== "+" && (pe = !1), me = (pe ? V === "(" ? V : M : V === "-" || V === "(" ? "" : V) + me, ye = (ee === "s" ? x[8 + u / 3] : "") + ye + (pe && V === "(" ? ")" : ""), ce) {
                  for (ne = -1, ae = de.length; ++ne < ae; ) if (48 > (se = de.charCodeAt(ne)) || se > 57) {
                    ye = (se === 46 ? E + de.slice(ne + 1) : de.slice(ne)) + ye, de = de.slice(0, ne);
                    break;
                  }
                }
              }
              re && !q && (de = C(de, 1 / 0));
              var be = me.length + de.length + ye.length, Ae = be < K ? new Array(K - be + 1).join(F) : "";
              switch (re && q && (de = C(Ae + de, Ae.length ? K - ye.length : 1 / 0), Ae = ""), U) {
                case "<":
                  de = me + de + ye + Ae;
                  break;
                case "=":
                  de = me + Ae + de + ye;
                  break;
                case "^":
                  de = Ae.slice(0, be = Ae.length >> 1) + me + de + ye + Ae.slice(be);
                  break;
                default:
                  de = Ae + me + de + ye;
              }
              return P(de);
            }
            return Y = Y === void 0 ? 6 : /[gprs]/.test(ee) ? Math.max(1, Math.min(21, Y)) : Math.max(0, Math.min(20, Y)), he.toString = function() {
              return z + "";
            }, he;
          }
          return { format: T, formatPrefix: function(z, F) {
            var U, V = T(((z = h(z)).type = "f", z)), $ = 3 * Math.max(-8, Math.min(8, Math.floor((U = F, ((U = l(Math.abs(U))) ? U[1] : NaN) / 3)))), q = Math.pow(10, -$), K = x[8 + $ / 3];
            return function(re) {
              return V(q * re) + K;
            };
          } };
        }
        c = w({ decimal: ".", thousands: ",", grouping: [3], currency: ["$", ""], minus: "-" }), g = c.format, c.formatPrefix;
      }, 75987: function(o, s, n) {
        n.r(s), n.d(s, { geoAiry: function() {
          return re;
        }, geoAiryRaw: function() {
          return K;
        }, geoAitoff: function() {
          return te;
        }, geoAitoffRaw: function() {
          return Y;
        }, geoArmadillo: function() {
          return X;
        }, geoArmadilloRaw: function() {
          return ee;
        }, geoAugust: function() {
          return ue;
        }, geoAugustRaw: function() {
          return Q;
        }, geoBaker: function() {
          return ne;
        }, geoBakerRaw: function() {
          return de;
        }, geoBerghaus: function() {
          return me;
        }, geoBerghausRaw: function() {
          return se;
        }, geoBertin1953: function() {
          return Le;
        }, geoBertin1953Raw: function() {
          return De;
        }, geoBoggs: function() {
          return Ge;
        }, geoBoggsRaw: function() {
          return we;
        }, geoBonne: function() {
          return _e;
        }, geoBonneRaw: function() {
          return tt;
        }, geoBottomley: function() {
          return $e;
        }, geoBottomleyRaw: function() {
          return Be;
        }, geoBromley: function() {
          return ct;
        }, geoBromleyRaw: function() {
          return Ze;
        }, geoChamberlin: function() {
          return at;
        }, geoChamberlinAfrica: function() {
          return mt;
        }, geoChamberlinRaw: function() {
          return Gt;
        }, geoCollignon: function() {
          return St;
        }, geoCollignonRaw: function() {
          return vt;
        }, geoCraig: function() {
          return nt;
        }, geoCraigRaw: function() {
          return Je;
        }, geoCraster: function() {
          return Fe;
        }, geoCrasterRaw: function() {
          return Ye;
        }, geoCylindricalEqualArea: function() {
          return Mt;
        }, geoCylindricalEqualAreaRaw: function() {
          return pt;
        }, geoCylindricalStereographic: function() {
          return Rt;
        }, geoCylindricalStereographicRaw: function() {
          return At;
        }, geoEckert1: function() {
          return lt;
        }, geoEckert1Raw: function() {
          return Ft;
        }, geoEckert2: function() {
          return Ot;
        }, geoEckert2Raw: function() {
          return st;
        }, geoEckert3: function() {
          return Bt;
        }, geoEckert3Raw: function() {
          return kt;
        }, geoEckert4: function() {
          return Jt;
        }, geoEckert4Raw: function() {
          return xt;
        }, geoEckert5: function() {
          return en;
        }, geoEckert5Raw: function() {
          return qt;
        }, geoEckert6: function() {
          return Ht;
        }, geoEckert6Raw: function() {
          return Yt;
        }, geoEisenlohr: function() {
          return In;
        }, geoEisenlohrRaw: function() {
          return fn;
        }, geoFahey: function() {
          return gn;
        }, geoFaheyRaw: function() {
          return Cn;
        }, geoFoucaut: function() {
          return Xn;
        }, geoFoucautRaw: function() {
          return Mn;
        }, geoFoucautSinusoidal: function() {
          return wn;
        }, geoFoucautSinusoidalRaw: function() {
          return Pn;
        }, geoGilbert: function() {
          return Wn;
        }, geoGingery: function() {
          return cr;
        }, geoGingeryRaw: function() {
          return hr;
        }, geoGinzburg4: function() {
          return mr;
        }, geoGinzburg4Raw: function() {
          return Wr;
        }, geoGinzburg5: function() {
          return yr;
        }, geoGinzburg5Raw: function() {
          return Ir;
        }, geoGinzburg6: function() {
          return rn;
        }, geoGinzburg6Raw: function() {
          return Vr;
        }, geoGinzburg8: function() {
          return sr;
        }, geoGinzburg8Raw: function() {
          return Tn;
        }, geoGinzburg9: function() {
          return ur;
        }, geoGinzburg9Raw: function() {
          return $n;
        }, geoGringorten: function() {
          return Fr;
        }, geoGringortenQuincuncial: function() {
          return os;
        }, geoGringortenRaw: function() {
          return wr;
        }, geoGuyou: function() {
          return on;
        }, geoGuyouRaw: function() {
          return Gn;
        }, geoHammer: function() {
          return Ae;
        }, geoHammerRaw: function() {
          return pe;
        }, geoHammerRetroazimuthal: function() {
          return jn;
        }, geoHammerRetroazimuthalRaw: function() {
          return bn;
        }, geoHealpix: function() {
          return ir;
        }, geoHealpixRaw: function() {
          return dn;
        }, geoHill: function() {
          return Pr;
        }, geoHillRaw: function() {
          return gr;
        }, geoHomolosine: function() {
          return ri;
        }, geoHomolosineRaw: function() {
          return Qn;
        }, geoHufnagel: function() {
          return Br;
        }, geoHufnagelRaw: function() {
          return Zr;
        }, geoHyperelliptical: function() {
          return Pa;
        }, geoHyperellipticalRaw: function() {
          return si;
        }, geoInterrupt: function() {
          return Ba;
        }, geoInterruptedBoggs: function() {
          return Ds;
        }, geoInterruptedHomolosine: function() {
          return Ao;
        }, geoInterruptedMollweide: function() {
          return So;
        }, geoInterruptedMollweideHemispheres: function() {
          return go;
        }, geoInterruptedQuarticAuthalic: function() {
          return sc;
        }, geoInterruptedSinuMollweide: function() {
          return Ml;
        }, geoInterruptedSinusoidal: function() {
          return Zl;
        }, geoKavrayskiy7: function() {
          return Xl;
        }, geoKavrayskiy7Raw: function() {
          return vs;
        }, geoLagrange: function() {
          return ja;
        }, geoLagrangeRaw: function() {
          return xs;
        }, geoLarrivee: function() {
          return Xs;
        }, geoLarriveeRaw: function() {
          return Kl;
        }, geoLaskowski: function() {
          return Jl;
        }, geoLaskowskiRaw: function() {
          return El;
        }, geoLittrow: function() {
          return mu;
        }, geoLittrowRaw: function() {
          return ml;
        }, geoLoximuthal: function() {
          return Ql;
        }, geoLoximuthalRaw: function() {
          return gu;
        }, geoMiller: function() {
          return Mc;
        }, geoMillerRaw: function() {
          return Wo;
        }, geoModifiedStereographic: function() {
          return Ma;
        }, geoModifiedStereographicAlaska: function() {
          return mh;
        }, geoModifiedStereographicGs48: function() {
          return Eo;
        }, geoModifiedStereographicGs50: function() {
          return ac;
        }, geoModifiedStereographicLee: function() {
          return eu;
        }, geoModifiedStereographicMiller: function() {
          return Xi;
        }, geoModifiedStereographicRaw: function() {
          return Xu;
        }, geoMollweide: function() {
          return Ie;
        }, geoMollweideRaw: function() {
          return Ne;
        }, geoMtFlatPolarParabolic: function() {
          return oc;
        }, geoMtFlatPolarParabolicRaw: function() {
          return Bs;
        }, geoMtFlatPolarQuartic: function() {
          return _s;
        }, geoMtFlatPolarQuarticRaw: function() {
          return tu;
        }, geoMtFlatPolarSinusoidal: function() {
          return Co;
        }, geoMtFlatPolarSinusoidalRaw: function() {
          return Ps;
        }, geoNaturalEarth: function() {
          return da.A;
        }, geoNaturalEarth2: function() {
          return pf;
        }, geoNaturalEarth2Raw: function() {
          return Ou;
        }, geoNaturalEarthRaw: function() {
          return da.P;
        }, geoNellHammer: function() {
          return Ks;
        }, geoNellHammerRaw: function() {
          return nu;
        }, geoNicolosi: function() {
          return mf;
        }, geoNicolosiRaw: function() {
          return lc;
        }, geoPatterson: function() {
          return gf;
        }, geoPattersonRaw: function() {
          return Ru;
        }, geoPeirceQuincuncial: function() {
          return Bu;
        }, geoPierceQuincuncial: function() {
          return Bu;
        }, geoPolyconic: function() {
          return ws;
        }, geoPolyconicRaw: function() {
          return Fu;
        }, geoPolyhedral: function() {
          return va;
        }, geoPolyhedralButterfly: function() {
          return Ju;
        }, geoPolyhedralCollignon: function() {
          return xu;
        }, geoPolyhedralWaterman: function() {
          return Zo;
        }, geoProject: function() {
          return Ra;
        }, geoQuantize: function() {
          return Ll;
        }, geoQuincuncial: function() {
          return Qs;
        }, geoRectangularPolyconic: function() {
          return Lo;
        }, geoRectangularPolyconicRaw: function() {
          return Pl;
        }, geoRobinson: function() {
          return xi;
        }, geoRobinsonRaw: function() {
          return Ol;
        }, geoSatellite: function() {
          return Dc;
        }, geoSatelliteRaw: function() {
          return cc;
        }, geoSinuMollweide: function() {
          return Dr;
        }, geoSinuMollweideRaw: function() {
          return Sr;
        }, geoSinusoidal: function() {
          return Ke;
        }, geoSinusoidalRaw: function() {
          return je;
        }, geoStitch: function() {
          return vo;
        }, geoTimes: function() {
          return nl;
        }, geoTimesRaw: function() {
          return Ts;
        }, geoTwoPointAzimuthal: function() {
          return ls;
        }, geoTwoPointAzimuthalRaw: function() {
          return Qu;
        }, geoTwoPointAzimuthalUsa: function() {
          return li;
        }, geoTwoPointEquidistant: function() {
          return $s;
        }, geoTwoPointEquidistantRaw: function() {
          return ma;
        }, geoTwoPointEquidistantUsa: function() {
          return au;
        }, geoVanDerGrinten: function() {
          return Lc;
        }, geoVanDerGrinten2: function() {
          return rl;
        }, geoVanDerGrinten2Raw: function() {
          return ec;
        }, geoVanDerGrinten3: function() {
          return il;
        }, geoVanDerGrinten3Raw: function() {
          return Na;
        }, geoVanDerGrinten4: function() {
          return Ci;
        }, geoVanDerGrinten4Raw: function() {
          return ni;
        }, geoVanDerGrintenRaw: function() {
          return bl;
        }, geoWagner: function() {
          return al;
        }, geoWagner4: function() {
          return tc;
        }, geoWagner4Raw: function() {
          return na;
        }, geoWagner6: function() {
          return ci;
        }, geoWagner6Raw: function() {
          return bi;
        }, geoWagner7: function() {
          return ou;
        }, geoWagnerRaw: function() {
          return us;
        }, geoWiechel: function() {
          return Pe;
        }, geoWiechelRaw: function() {
          return He;
        }, geoWinkel3: function() {
          return bt;
        }, geoWinkel3Raw: function() {
          return it;
        } });
        var l = n(94684), u = Math.abs, i = Math.atan, h = Math.atan2, p = Math.cos, _ = Math.exp, d = Math.floor, f = Math.log, c = Math.max, g = Math.min, m = Math.pow, x = Math.round, w = Math.sign || function(Ue) {
          return Ue > 0 ? 1 : Ue < 0 ? -1 : 0;
        }, k = Math.sin, S = Math.tan, A = 1e-6, C = 1e-12, D = Math.PI, L = D / 2, E = D / 4, P = Math.SQRT1_2, I = V(2), M = V(D), O = 2 * D, T = 180 / D, z = D / 180;
        function F(Ue) {
          return Ue > 1 ? L : Ue < -1 ? -L : Math.asin(Ue);
        }
        function U(Ue) {
          return Ue > 1 ? 0 : Ue < -1 ? D : Math.acos(Ue);
        }
        function V(Ue) {
          return Ue > 0 ? Math.sqrt(Ue) : 0;
        }
        function $(Ue) {
          return (_(Ue) - _(-Ue)) / 2;
        }
        function q(Ue) {
          return (_(Ue) + _(-Ue)) / 2;
        }
        function K(Ue) {
          var Qe = S(Ue / 2), ht = 2 * f(p(Ue / 2)) / (Qe * Qe);
          function Z(B, y) {
            var b = p(B), R = p(y), j = k(y), G = R * b, ie = -((1 - G ? f((1 + G) / 2) / (1 - G) : -0.5) + ht / (1 + G));
            return [ie * R * k(B), ie * j];
          }
          return Z.invert = function(B, y) {
            var b, R = V(B * B + y * y), j = -Ue / 2, G = 50;
            if (!R) return [0, 0];
            do {
              var ie = j / 2, fe = p(ie), xe = k(ie), Te = xe / fe, ze = -f(u(fe));
              j -= b = (2 / Te * ze - ht * Te - R) / (-ze / (xe * xe) + 1 - ht / (2 * fe * fe)) * (fe < 0 ? 0.7 : 1);
            } while (u(b) > A && --G > 0);
            var Ve = k(j);
            return [h(B * Ve, R * p(j)), F(y * Ve / R)];
          }, Z;
        }
        function re() {
          var Ue = L, Qe = (0, l.U)(K), ht = Qe(Ue);
          return ht.radius = function(Z) {
            return arguments.length ? Qe(Ue = Z * z) : Ue * T;
          }, ht.scale(179.976).clipAngle(147);
        }
        function Y(Ue, Qe) {
          var ht = p(Qe), Z = function(B) {
            return B ? B / Math.sin(B) : 1;
          }(U(ht * p(Ue /= 2)));
          return [2 * ht * k(Ue) * Z, k(Qe) * Z];
        }
        function te() {
          return (0, l.A)(Y).scale(152.63);
        }
        function ee(Ue) {
          var Qe = k(Ue), ht = p(Ue), Z = Ue >= 0 ? 1 : -1, B = S(Z * Ue), y = (1 + Qe - ht) / 2;
          function b(R, j) {
            var G = p(j), ie = p(R /= 2);
            return [(1 + G) * k(R), (Z * j > -h(ie, B) - 1e-3 ? 0 : 10 * -Z) + y + k(j) * ht - (1 + G) * Qe * ie];
          }
          return b.invert = function(R, j) {
            var G = 0, ie = 0, fe = 50;
            do {
              var xe = p(G), Te = k(G), ze = p(ie), Ve = k(ie), ut = 1 + ze, gt = ut * Te - R, wt = y + Ve * ht - ut * Qe * xe - j, Et = ut * xe / 2, zt = -Te * Ve, It = Qe * ut * Te / 2, jt = ht * ze + Qe * xe * Ve, Lt = zt * It - jt * Et, Zt = (wt * zt - gt * jt) / Lt / 2, Qt = (gt * It - wt * Et) / Lt;
              u(Qt) > 2 && (Qt /= 2), G -= Zt, ie -= Qt;
            } while ((u(Zt) > A || u(Qt) > A) && --fe > 0);
            return Z * ie > -h(p(G), B) - 1e-3 ? [2 * G, ie] : null;
          }, b;
        }
        function X() {
          var Ue = 20 * z, Qe = Ue >= 0 ? 1 : -1, ht = S(Qe * Ue), Z = (0, l.U)(ee), B = Z(Ue), y = B.stream;
          return B.parallel = function(b) {
            return arguments.length ? (ht = S((Qe = (Ue = b * z) >= 0 ? 1 : -1) * Ue), Z(Ue)) : Ue * T;
          }, B.stream = function(b) {
            var R = B.rotate(), j = y(b), G = (B.rotate([0, 0]), y(b)), ie = B.precision();
            return B.rotate(R), j.sphere = function() {
              G.polygonStart(), G.lineStart();
              for (var fe = -180 * Qe; Qe * fe < 180; fe += 90 * Qe) G.point(fe, 90 * Qe);
              if (Ue) for (; Qe * (fe -= 3 * Qe * ie) >= -180; ) G.point(fe, Qe * -h(p(fe * z / 2), ht) * T);
              G.lineEnd(), G.polygonEnd();
            }, j;
          }, B.scale(218.695).center([0, 28.0974]);
        }
        function Q(Ue, Qe) {
          var ht = S(Qe / 2), Z = V(1 - ht * ht), B = 1 + Z * p(Ue /= 2), y = k(Ue) * Z / B, b = ht / B, R = y * y, j = b * b;
          return [1.3333333333333333 * y * (3 + R - 3 * j), 1.3333333333333333 * b * (3 + 3 * R - j)];
        }
        function ue() {
          return (0, l.A)(Q).scale(66.1603);
        }
        Y.invert = function(Ue, Qe) {
          if (!(Ue * Ue + 4 * Qe * Qe > D * D + A)) {
            var ht = Ue, Z = Qe, B = 25;
            do {
              var y, b = k(ht), R = k(ht / 2), j = p(ht / 2), G = k(Z), ie = p(Z), fe = k(2 * Z), xe = G * G, Te = ie * ie, ze = R * R, Ve = 1 - Te * j * j, ut = Ve ? U(ie * j) * V(y = 1 / Ve) : y = 0, gt = 2 * ut * ie * R - Ue, wt = ut * G - Qe, Et = y * (Te * ze + ut * ie * j * xe), zt = y * (0.5 * b * fe - 2 * ut * G * R), It = 0.25 * y * (fe * R - ut * G * Te * b), jt = y * (xe * j + ut * ze * ie), Lt = zt * It - jt * Et;
              if (!Lt) break;
              var Zt = (wt * zt - gt * jt) / Lt, Qt = (gt * It - wt * Et) / Lt;
              ht -= Zt, Z -= Qt;
            } while ((u(Zt) > A || u(Qt) > A) && --B > 0);
            return [ht, Z];
          }
        }, Q.invert = function(Ue, Qe) {
          if (Qe *= 0.375, !(Ue *= 0.375) && u(Qe) > 1) return null;
          var ht = 1 + Ue * Ue + Qe * Qe, Z = V((ht - V(ht * ht - 4 * Qe * Qe)) / 2), B = F(Z) / 3, y = Z ? function(G) {
            return f(G + V(G * G - 1));
          }(u(Qe / Z)) / 3 : function(G) {
            return f(G + V(G * G + 1));
          }(u(Ue)) / 3, b = p(B), R = q(y), j = R * R - b * b;
          return [2 * w(Ue) * h($(y) * b, 0.25 - j), 2 * w(Qe) * h(R * k(B), 0.25 + j)];
        };
        var ce = V(8), he = f(1 + I);
        function de(Ue, Qe) {
          var ht = u(Qe);
          return ht < E ? [Ue, f(S(E + Qe / 2))] : [Ue * p(ht) * (2 * I - 1 / k(ht)), w(Qe) * (2 * I * (ht - E) - f(S(ht / 2)))];
        }
        function ne() {
          return (0, l.A)(de).scale(112.314);
        }
        de.invert = function(Ue, Qe) {
          if ((Z = u(Qe)) < he) return [Ue, 2 * i(_(Qe)) - L];
          var ht, Z, B = E, y = 25;
          do {
            var b = p(B / 2), R = S(B / 2);
            B -= ht = (ce * (B - E) - f(R) - Z) / (ce - b * b / (2 * R));
          } while (u(ht) > C && --y > 0);
          return [Ue / (p(B) * (ce - 1 / k(B))), w(Qe) * B];
        };
        var ae = n(61957);
        function se(Ue) {
          var Qe = 2 * D / Ue;
          function ht(Z, B) {
            var y = (0, ae.j)(Z, B);
            if (u(Z) > L) {
              var b = h(y[1], y[0]), R = V(y[0] * y[0] + y[1] * y[1]), j = Qe * x((b - L) / Qe) + L, G = h(k(b -= j), 2 - p(b));
              b = j + F(D / R * k(G)) - G, y[0] = R * p(b), y[1] = R * k(b);
            }
            return y;
          }
          return ht.invert = function(Z, B) {
            var y = V(Z * Z + B * B);
            if (y > L) {
              var b = h(B, Z), R = Qe * x((b - L) / Qe) + L, j = b > R ? -1 : 1, G = y * p(R - b), ie = 1 / S(j * U((G - D) / V(D * (D - 2 * G) + y * y)));
              b = R + 2 * i((ie + j * V(ie * ie - 3)) / 3), Z = y * p(b), B = y * k(b);
            }
            return ae.j.invert(Z, B);
          }, ht;
        }
        function me() {
          var Ue = 5, Qe = (0, l.U)(se), ht = Qe(Ue), Z = ht.stream, B = 0.01, y = -p(B * z), b = k(B * z);
          return ht.lobes = function(R) {
            return arguments.length ? Qe(Ue = +R) : Ue;
          }, ht.stream = function(R) {
            var j = ht.rotate(), G = Z(R), ie = (ht.rotate([0, 0]), Z(R));
            return ht.rotate(j), G.sphere = function() {
              ie.polygonStart(), ie.lineStart();
              for (var fe = 0, xe = 360 / Ue, Te = 2 * D / Ue, ze = 90 - 180 / Ue, Ve = L; fe < Ue; ++fe, ze -= xe, Ve -= Te) ie.point(h(b * p(Ve), y) * T, F(b * k(Ve)) * T), ze < -90 ? (ie.point(-90, -180 - ze - B), ie.point(-90, -180 - ze + B)) : (ie.point(90, ze + B), ie.point(90, ze - B));
              ie.lineEnd(), ie.polygonEnd();
            }, G;
          }, ht.scale(87.8076).center([0, 17.1875]).clipAngle(179.999);
        }
        var ye = n(30729);
        function pe(Ue, Qe) {
          if (arguments.length < 2 && (Qe = Ue), Qe === 1) return ye.n;
          if (Qe === 1 / 0) return be;
          function ht(Z, B) {
            var y = (0, ye.n)(Z / Qe, B);
            return y[0] *= Ue, y;
          }
          return ht.invert = function(Z, B) {
            var y = ye.n.invert(Z / Ue, B);
            return y[0] *= Qe, y;
          }, ht;
        }
        function be(Ue, Qe) {
          return [Ue * p(Qe) / p(Qe /= 2), 2 * k(Qe)];
        }
        function Ae() {
          var Ue = 2, Qe = (0, l.U)(pe), ht = Qe(Ue);
          return ht.coefficient = function(Z) {
            return arguments.length ? Qe(Ue = +Z) : Ue;
          }, ht.scale(169.529);
        }
        function Se(Ue, Qe, ht) {
          var Z, B, y, b = 100;
          ht = ht === void 0 ? 0 : +ht, Qe = +Qe;
          do
            (B = Ue(ht)) === (y = Ue(ht + A)) && (y = B + A), ht -= Z = -1 * A * (B - Qe) / (B - y);
          while (b-- > 0 && u(Z) > A);
          return b < 0 ? NaN : ht;
        }
        function Me(Ue, Qe, ht) {
          return Qe === void 0 && (Qe = 40), ht === void 0 && (ht = C), function(Z, B, y, b) {
            var R, j, G;
            y = y === void 0 ? 0 : +y, b = b === void 0 ? 0 : +b;
            for (var ie = 0; ie < Qe; ie++) {
              var fe = Ue(y, b), xe = fe[0] - Z, Te = fe[1] - B;
              if (u(xe) < ht && u(Te) < ht) break;
              var ze = xe * xe + Te * Te;
              if (ze > R) y -= j /= 2, b -= G /= 2;
              else {
                R = ze;
                var Ve = (y > 0 ? -1 : 1) * ht, ut = (b > 0 ? -1 : 1) * ht, gt = Ue(y + Ve, b), wt = Ue(y, b + ut), Et = (gt[0] - fe[0]) / Ve, zt = (gt[1] - fe[1]) / Ve, It = (wt[0] - fe[0]) / ut, jt = (wt[1] - fe[1]) / ut, Lt = jt * Et - zt * It, Zt = (u(Lt) < 0.5 ? 0.5 : 1) / Lt;
                if (y += j = (Te * It - xe * jt) * Zt, b += G = (xe * zt - Te * Et) * Zt, u(j) < ht && u(G) < ht) break;
              }
            }
            return [y, b];
          };
        }
        function De() {
          var Ue = pe(1.68, 2);
          function Qe(ht, Z) {
            if (ht + Z < -1.4) {
              var B = (ht - Z + 1.6) * (ht + Z + 1.4) / 8;
              ht += B, Z -= 0.8 * B * k(Z + D / 2);
            }
            var y = Ue(ht, Z), b = (1 - p(ht * Z)) / 12;
            return y[1] < 0 && (y[0] *= 1 + b), y[1] > 0 && (y[1] *= 1 + b / 1.5 * y[0] * y[0]), y;
          }
          return Qe.invert = Me(Qe), Qe;
        }
        function Le() {
          return (0, l.A)(De()).rotate([-16.5, -42]).scale(176.57).center([7.93, 0.09]);
        }
        function We(Ue, Qe) {
          var ht, Z = Ue * k(Qe), B = 30;
          do
            Qe -= ht = (Qe + k(Qe) - Z) / (1 + p(Qe));
          while (u(ht) > A && --B > 0);
          return Qe / 2;
        }
        function Ee(Ue, Qe, ht) {
          function Z(B, y) {
            return [Ue * B * p(y = We(ht, y)), Qe * k(y)];
          }
          return Z.invert = function(B, y) {
            return y = F(y / Qe), [B / (Ue * p(y)), F((2 * y + k(2 * y)) / ht)];
          }, Z;
        }
        be.invert = function(Ue, Qe) {
          var ht = 2 * F(Qe / 2);
          return [Ue * p(ht / 2) / p(ht), ht];
        };
        var Ne = Ee(I / L, I, D);
        function Ie() {
          return (0, l.A)(Ne).scale(169.529);
        }
        var ge = 2.00276, Ce = 1.11072;
        function we(Ue, Qe) {
          var ht = We(D, Qe);
          return [ge * Ue / (1 / p(Qe) + Ce / p(ht)), (Qe + I * k(ht)) / ge];
        }
        function Ge() {
          return (0, l.A)(we).scale(160.857);
        }
        function Re(Ue) {
          var Qe = 0, ht = (0, l.U)(Ue), Z = ht(Qe);
          return Z.parallel = function(B) {
            return arguments.length ? ht(Qe = B * z) : Qe * T;
          }, Z;
        }
        function je(Ue, Qe) {
          return [Ue * p(Qe), Qe];
        }
        function Ke() {
          return (0, l.A)(je).scale(152.63);
        }
        function tt(Ue) {
          if (!Ue) return je;
          var Qe = 1 / S(Ue);
          function ht(Z, B) {
            var y = Qe + Ue - B, b = y && Z * p(B) / y;
            return [y * k(b), Qe - y * p(b)];
          }
          return ht.invert = function(Z, B) {
            var y = V(Z * Z + (B = Qe - B) * B), b = Qe + Ue - y;
            return [y / p(b) * h(Z, B), b];
          }, ht;
        }
        function _e() {
          return Re(tt).scale(123.082).center([0, 26.1441]).parallel(45);
        }
        function Be(Ue) {
          function Qe(ht, Z) {
            var B = L - Z, y = B && ht * Ue * k(B) / B;
            return [B * k(y) / Ue, L - B * p(y)];
          }
          return Qe.invert = function(ht, Z) {
            var B = ht * Ue, y = L - Z, b = V(B * B + y * y), R = h(B, y);
            return [(b ? b / k(b) : 1) * R / Ue, L - b];
          }, Qe;
        }
        function $e() {
          var Ue = 0.5, Qe = (0, l.U)(Be), ht = Qe(Ue);
          return ht.fraction = function(Z) {
            return arguments.length ? Qe(Ue = +Z) : Ue;
          }, ht.scale(158.837);
        }
        we.invert = function(Ue, Qe) {
          var ht, Z, B = ge * Qe, y = Qe < 0 ? -E : E, b = 25;
          do
            Z = B - I * k(y), y -= ht = (k(2 * y) + 2 * y - D * k(Z)) / (2 * p(2 * y) + 2 + D * p(Z) * I * p(y));
          while (u(ht) > A && --b > 0);
          return Z = B - I * k(y), [Ue * (1 / p(Z) + Ce / p(y)) / ge, Z];
        }, je.invert = function(Ue, Qe) {
          return [Ue / p(Qe), Qe];
        };
        var Ze = Ee(1, 4 / D, D);
        function ct() {
          return (0, l.A)(Ze).scale(152.63);
        }
        var ft = n(30021), _t = n(30915);
        function Pt(Ue, Qe, ht, Z, B, y) {
          var b, R = p(y);
          if (u(Ue) > 1 || u(y) > 1) b = U(ht * B + Qe * Z * R);
          else {
            var j = k(Ue / 2), G = k(y / 2);
            b = 2 * F(V(j * j + Qe * Z * G * G));
          }
          return u(b) > A ? [b, h(Z * k(y), Qe * B - ht * Z * R)] : [0, 0];
        }
        function Dt(Ue, Qe, ht) {
          return U((Ue * Ue + Qe * Qe - ht * ht) / (2 * Ue * Qe));
        }
        function $t(Ue) {
          return Ue - 2 * D * d((Ue + D) / (2 * D));
        }
        function Gt(Ue, Qe, ht) {
          for (var Z, B = [[Ue[0], Ue[1], k(Ue[1]), p(Ue[1])], [Qe[0], Qe[1], k(Qe[1]), p(Qe[1])], [ht[0], ht[1], k(ht[1]), p(ht[1])]], y = B[2], b = 0; b < 3; ++b, y = Z) Z = B[b], y.v = Pt(Z[1] - y[1], y[3], y[2], Z[3], Z[2], Z[0] - y[0]), y.point = [0, 0];
          var R = Dt(B[0].v[0], B[2].v[0], B[1].v[0]), j = Dt(B[0].v[0], B[1].v[0], B[2].v[0]), G = D - R;
          B[2].point[1] = 0, B[0].point[0] = -(B[1].point[0] = B[0].v[0] / 2);
          var ie = [B[2].point[0] = B[0].point[0] + B[2].v[0] * p(R), 2 * (B[0].point[1] = B[1].point[1] = B[2].v[0] * k(R))];
          return function(fe, xe) {
            var Te, ze = k(xe), Ve = p(xe), ut = new Array(3);
            for (Te = 0; Te < 3; ++Te) {
              var gt = B[Te];
              if (ut[Te] = Pt(xe - gt[1], gt[3], gt[2], Ve, ze, fe - gt[0]), !ut[Te][0]) return gt.point;
              ut[Te][1] = $t(ut[Te][1] - gt.v[1]);
            }
            var wt = ie.slice();
            for (Te = 0; Te < 3; ++Te) {
              var Et = Te == 2 ? 0 : Te + 1, zt = Dt(B[Te].v[0], ut[Te][0], ut[Et][0]);
              ut[Te][1] < 0 && (zt = -zt), Te ? Te == 1 ? (zt = j - zt, wt[0] -= ut[Te][0] * p(zt), wt[1] -= ut[Te][0] * k(zt)) : (zt = G - zt, wt[0] += ut[Te][0] * p(zt), wt[1] += ut[Te][0] * k(zt)) : (wt[0] += ut[Te][0] * p(zt), wt[1] -= ut[Te][0] * k(zt));
            }
            return wt[0] /= 3, wt[1] /= 3, wt;
          };
        }
        function Wt(Ue) {
          return Ue[0] *= z, Ue[1] *= z, Ue;
        }
        function mt() {
          return at([0, 22], [45, 22], [22.5, -22]).scale(380).center([22.5, 2]);
        }
        function at(Ue, Qe, ht) {
          var Z = (0, ft.A)({ type: "MultiPoint", coordinates: [Ue, Qe, ht] }), B = [-Z[0], -Z[1]], y = (0, _t.A)(B), b = Gt(Wt(y(Ue)), Wt(y(Qe)), Wt(y(ht)));
          b.invert = Me(b);
          var R = (0, l.A)(b).rotate(B), j = R.center;
          return delete R.rotate, R.center = function(G) {
            return arguments.length ? j(y(G)) : y.invert(j());
          }, R.clipAngle(90);
        }
        function vt(Ue, Qe) {
          var ht = V(1 - k(Qe));
          return [2 / M * Ue * ht, M * (1 - ht)];
        }
        function St() {
          return (0, l.A)(vt).scale(95.6464).center([0, 30]);
        }
        function Je(Ue) {
          var Qe = S(Ue);
          function ht(Z, B) {
            return [Z, (Z ? Z / k(Z) : 1) * (k(B) * p(Z) - Qe * p(B))];
          }
          return ht.invert = Qe ? function(Z, B) {
            Z && (B *= k(Z) / Z);
            var y = p(Z);
            return [Z, 2 * h(V(y * y + Qe * Qe - B * B) - y, Qe - B)];
          } : function(Z, B) {
            return [Z, F(Z ? B * S(Z) / Z : B)];
          }, ht;
        }
        function nt() {
          return Re(Je).scale(249.828).clipAngle(90);
        }
        vt.invert = function(Ue, Qe) {
          var ht = (ht = Qe / M - 1) * ht;
          return [ht > 0 ? Ue * V(D / ht) / 2 : 0, F(1 - ht)];
        };
        var ot = V(3);
        function Ye(Ue, Qe) {
          return [ot * Ue * (2 * p(2 * Qe / 3) - 1) / M, ot * M * k(Qe / 3)];
        }
        function Fe() {
          return (0, l.A)(Ye).scale(156.19);
        }
        function pt(Ue) {
          var Qe = p(Ue);
          function ht(Z, B) {
            return [Z * Qe, k(B) / Qe];
          }
          return ht.invert = function(Z, B) {
            return [Z / Qe, F(B * Qe)];
          }, ht;
        }
        function Mt() {
          return Re(pt).parallel(38.58).scale(195.044);
        }
        function At(Ue) {
          var Qe = p(Ue);
          function ht(Z, B) {
            return [Z * Qe, (1 + Qe) * S(B / 2)];
          }
          return ht.invert = function(Z, B) {
            return [Z / Qe, 2 * i(B / (1 + Qe))];
          }, ht;
        }
        function Rt() {
          return Re(At).scale(124.75);
        }
        function Ft(Ue, Qe) {
          var ht = V(8 / (3 * D));
          return [ht * Ue * (1 - u(Qe) / D), ht * Qe];
        }
        function lt() {
          return (0, l.A)(Ft).scale(165.664);
        }
        function st(Ue, Qe) {
          var ht = V(4 - 3 * k(u(Qe)));
          return [2 / V(6 * D) * Ue * ht, w(Qe) * V(2 * D / 3) * (2 - ht)];
        }
        function Ot() {
          return (0, l.A)(st).scale(165.664);
        }
        function kt(Ue, Qe) {
          var ht = V(D * (4 + D));
          return [2 / ht * Ue * (1 + V(1 - 4 * Qe * Qe / (D * D))), 4 / ht * Qe];
        }
        function Bt() {
          return (0, l.A)(kt).scale(180.739);
        }
        function xt(Ue, Qe) {
          var ht = (2 + L) * k(Qe);
          Qe /= 2;
          for (var Z = 0, B = 1 / 0; Z < 10 && u(B) > A; Z++) {
            var y = p(Qe);
            Qe -= B = (Qe + k(Qe) * (y + 2) - ht) / (2 * y * (1 + y));
          }
          return [2 / V(D * (4 + D)) * Ue * (1 + p(Qe)), 2 * V(D / (4 + D)) * k(Qe)];
        }
        function Jt() {
          return (0, l.A)(xt).scale(180.739);
        }
        function qt(Ue, Qe) {
          return [Ue * (1 + p(Qe)) / V(2 + D), 2 * Qe / V(2 + D)];
        }
        function en() {
          return (0, l.A)(qt).scale(173.044);
        }
        function Yt(Ue, Qe) {
          for (var ht = (1 + L) * k(Qe), Z = 0, B = 1 / 0; Z < 10 && u(B) > A; Z++) Qe -= B = (Qe + k(Qe) - ht) / (1 + p(Qe));
          return ht = V(2 + D), [Ue * (1 + p(Qe)) / ht, 2 * Qe / ht];
        }
        function Ht() {
          return (0, l.A)(Yt).scale(173.044);
        }
        Ye.invert = function(Ue, Qe) {
          var ht = 3 * F(Qe / (ot * M));
          return [M * Ue / (ot * (2 * p(2 * ht / 3) - 1)), ht];
        }, Ft.invert = function(Ue, Qe) {
          var ht = V(8 / (3 * D)), Z = Qe / ht;
          return [Ue / (ht * (1 - u(Z) / D)), Z];
        }, st.invert = function(Ue, Qe) {
          var ht = 2 - u(Qe) / V(2 * D / 3);
          return [Ue * V(6 * D) / (2 * ht), w(Qe) * F((4 - ht * ht) / 3)];
        }, kt.invert = function(Ue, Qe) {
          var ht = V(D * (4 + D)) / 2;
          return [Ue * ht / (1 + V(1 - Qe * Qe * (4 + D) / (4 * D))), Qe * ht / 2];
        }, xt.invert = function(Ue, Qe) {
          var ht = Qe * V((4 + D) / D) / 2, Z = F(ht), B = p(Z);
          return [Ue / (2 / V(D * (4 + D)) * (1 + B)), F((Z + ht * (B + 2)) / (2 + L))];
        }, qt.invert = function(Ue, Qe) {
          var ht = V(2 + D), Z = Qe * ht / 2;
          return [ht * Ue / (1 + p(Z)), Z];
        }, Yt.invert = function(Ue, Qe) {
          var ht = 1 + L, Z = V(ht / 2);
          return [2 * Ue * Z / (1 + p(Qe *= Z)), F((Qe + k(Qe)) / ht)];
        };
        var sn = 3 + 2 * I;
        function fn(Ue, Qe) {
          var ht = k(Ue /= 2), Z = p(Ue), B = V(p(Qe)), y = p(Qe /= 2), b = k(Qe) / (y + I * Z * B), R = V(2 / (1 + b * b)), j = V((I * y + (Z + ht) * B) / (I * y + (Z - ht) * B));
          return [sn * (R * (j - 1 / j) - 2 * f(j)), sn * (R * b * (j + 1 / j) - 2 * i(b))];
        }
        function In() {
          return (0, l.A)(fn).scale(62.5271);
        }
        fn.invert = function(Ue, Qe) {
          if (!(ht = Q.invert(Ue / 1.2, 1.065 * Qe))) return null;
          var ht, Z = ht[0], B = ht[1], y = 20;
          Ue /= sn, Qe /= sn;
          do {
            var b = Z / 2, R = B / 2, j = k(b), G = p(b), ie = k(R), fe = p(R), xe = p(B), Te = V(xe), ze = ie / (fe + I * G * Te), Ve = ze * ze, ut = V(2 / (1 + Ve)), gt = (I * fe + (G + j) * Te) / (I * fe + (G - j) * Te), wt = V(gt), Et = wt - 1 / wt, zt = wt + 1 / wt, It = ut * Et - 2 * f(wt) - Ue, jt = ut * ze * zt - 2 * i(ze) - Qe, Lt = ie && P * Te * j * Ve / ie, Zt = (I * G * fe + Te) / (2 * (fe + I * G * Te) * (fe + I * G * Te) * Te), Qt = -0.5 * ze * ut * ut * ut, Xt = Qt * Lt, yn = Qt * Zt, Sn = (Sn = 2 * fe + I * Te * (G - j)) * Sn * wt, Un = (I * G * fe * Te + xe) / Sn, Vn = -I * j * ie / (Te * Sn), Yn = Et * Xt - 2 * Un / wt + ut * (Un + Un / gt), er = Et * yn - 2 * Vn / wt + ut * (Vn + Vn / gt), kr = ze * zt * Xt - 2 * Lt / (1 + Ve) + ut * zt * Lt + ut * ze * (Un - Un / gt), or = ze * zt * yn - 2 * Zt / (1 + Ve) + ut * zt * Zt + ut * ze * (Vn - Vn / gt), Mr = er * kr - or * Yn;
            if (!Mr) break;
            var fr = (jt * er - It * or) / Mr, Or = (It * kr - jt * Yn) / Mr;
            Z -= fr, B = c(-L, g(L, B - Or));
          } while ((u(fr) > A || u(Or) > A) && --y > 0);
          return u(u(B) - L) < A ? [0, B] : y && [Z, B];
        };
        var zn = p(35 * z);
        function Cn(Ue, Qe) {
          var ht = S(Qe / 2);
          return [Ue * zn * V(1 - ht * ht), (1 + zn) * ht];
        }
        function gn() {
          return (0, l.A)(Cn).scale(137.152);
        }
        function Mn(Ue, Qe) {
          var ht = Qe / 2, Z = p(ht);
          return [2 * Ue / M * p(Qe) * Z * Z, M * S(ht)];
        }
        function Xn() {
          return (0, l.A)(Mn).scale(135.264);
        }
        function Pn(Ue) {
          var Qe = 1 - Ue, ht = B(D, 0)[0] - B(-D, 0)[0], Z = V(2 * (B(0, L)[1] - B(0, -L)[1]) / ht);
          function B(R, j) {
            var G = p(j), ie = k(j);
            return [G / (Qe + Ue * G) * R, Qe * j + Ue * ie];
          }
          function y(R, j) {
            var G = B(R, j);
            return [G[0] * Z, G[1] / Z];
          }
          function b(R) {
            return y(0, R)[1];
          }
          return y.invert = function(R, j) {
            var G = Se(b, j);
            return [R / Z * (Ue + Qe / p(G)), G];
          }, y;
        }
        function wn() {
          var Ue = 0.5, Qe = (0, l.U)(Pn), ht = Qe(Ue);
          return ht.alpha = function(Z) {
            return arguments.length ? Qe(Ue = +Z) : Ue;
          }, ht.scale(168.725);
        }
        Cn.invert = function(Ue, Qe) {
          var ht = Qe / (1 + zn);
          return [Ue && Ue / (zn * V(1 - ht * ht)), 2 * i(ht)];
        }, Mn.invert = function(Ue, Qe) {
          var ht = i(Qe / M), Z = p(ht), B = 2 * ht;
          return [Ue * M / 2 / (p(B) * Z * Z), B];
        };
        var Rn = n(53253), _n = n(18139);
        function En(Ue) {
          return [Ue[0] / 2, F(S(Ue[1] / 2 * z)) * T];
        }
        function Kn(Ue) {
          return [2 * Ue[0], 2 * i(k(Ue[1] * z)) * T];
        }
        function Wn(Ue) {
          Ue == null && (Ue = Rn.A);
          var Qe = Ue(), ht = (0, _n.A)().scale(T).precision(0).clipAngle(null).translate([0, 0]);
          function Z(y) {
            return Qe(En(y));
          }
          function B(y) {
            Z[y] = function() {
              return arguments.length ? (Qe[y].apply(Qe, arguments), Z) : Qe[y]();
            };
          }
          return Qe.invert && (Z.invert = function(y) {
            return Kn(Qe.invert(y));
          }), Z.stream = function(y) {
            var b = Qe.stream(y), R = ht.stream({ point: function(j, G) {
              b.point(j / 2, F(S(-G / 2 * z)) * T);
            }, lineStart: function() {
              b.lineStart();
            }, lineEnd: function() {
              b.lineEnd();
            }, polygonStart: function() {
              b.polygonStart();
            }, polygonEnd: function() {
              b.polygonEnd();
            } });
            return R.sphere = b.sphere, R;
          }, Z.rotate = function(y) {
            return arguments.length ? (ht.rotate(y), Z) : ht.rotate();
          }, Z.center = function(y) {
            return arguments.length ? (Qe.center(En(y)), Z) : Kn(Qe.center());
          }, B("angle"), B("clipAngle"), B("clipExtent"), B("fitExtent"), B("fitHeight"), B("fitSize"), B("fitWidth"), B("scale"), B("translate"), B("precision"), Z.scale(249.5);
        }
        function hr(Ue, Qe) {
          var ht = 2 * D / Qe, Z = Ue * Ue;
          function B(y, b) {
            var R = (0, ae.j)(y, b), j = R[0], G = R[1], ie = j * j + G * G;
            if (ie > Z) {
              var fe = V(ie), xe = h(G, j), Te = ht * x(xe / ht), ze = xe - Te, Ve = Ue * p(ze), ut = (Ue * k(ze) - ze * k(Ve)) / (L - Ve), gt = Zn(ze, ut), wt = (D - Ue) / lr(gt, Ve, D);
              j = fe;
              var Et, zt = 50;
              do
                j -= Et = (Ue + lr(gt, Ve, j) * wt - fe) / (gt(j) * wt);
              while (u(Et) > A && --zt > 0);
              G = ze * k(j), j < L && (G -= ut * (j - L));
              var It = k(Te), jt = p(Te);
              R[0] = j * jt - G * It, R[1] = j * It + G * jt;
            }
            return R;
          }
          return B.invert = function(y, b) {
            var R = y * y + b * b;
            if (R > Z) {
              var j = V(R), G = h(b, y), ie = ht * x(G / ht), fe = G - ie;
              y = j * p(fe), b = j * k(fe);
              for (var xe = y - L, Te = k(y), ze = b / Te, Ve = y < L ? 1 / 0 : 0, ut = 10; ; ) {
                var gt = Ue * k(ze), wt = Ue * p(ze), Et = k(wt), zt = L - wt, It = (gt - ze * Et) / zt, jt = Zn(ze, It);
                if (u(Ve) < C || !--ut) break;
                ze -= Ve = (ze * Te - It * xe - b) / (Te - 2 * xe * (zt * (wt + ze * gt * p(wt) - Et) - gt * (gt - ze * Et)) / (zt * zt));
              }
              y = (j = Ue + lr(jt, wt, y) * (D - Ue) / lr(jt, wt, D)) * p(G = ie + ze), b = j * k(G);
            }
            return ae.j.invert(y, b);
          }, B;
        }
        function Zn(Ue, Qe) {
          return function(ht) {
            var Z = Ue * p(ht);
            return ht < L && (Z -= Qe), V(1 + Z * Z);
          };
        }
        function lr(Ue, Qe, ht) {
          for (var Z = (ht - Qe) / 50, B = Ue(Qe) + Ue(ht), y = 1, b = Qe; y < 50; ++y) B += 2 * Ue(b += Z);
          return 0.5 * B * Z;
        }
        function cr() {
          var Ue = 6, Qe = 30 * z, ht = p(Qe), Z = k(Qe), B = (0, l.U)(hr), y = B(Qe, Ue), b = y.stream, R = -p(0.01 * z), j = k(0.01 * z);
          return y.radius = function(G) {
            return arguments.length ? (ht = p(Qe = G * z), Z = k(Qe), B(Qe, Ue)) : Qe * T;
          }, y.lobes = function(G) {
            return arguments.length ? B(Qe, Ue = +G) : Ue;
          }, y.stream = function(G) {
            var ie = y.rotate(), fe = b(G), xe = (y.rotate([0, 0]), b(G));
            return y.rotate(ie), fe.sphere = function() {
              xe.polygonStart(), xe.lineStart();
              for (var Te = 0, ze = 2 * D / Ue, Ve = 0; Te < Ue; ++Te, Ve -= ze) xe.point(h(j * p(Ve), R) * T, F(j * k(Ve)) * T), xe.point(h(Z * p(Ve - ze / 2), ht) * T, F(Z * k(Ve - ze / 2)) * T);
              xe.lineEnd(), xe.polygonEnd();
            }, fe;
          }, y.rotate([90, -40]).scale(91.7095).clipAngle(179.999);
        }
        function zr(Ue, Qe, ht, Z, B, y, b, R) {
          function j(G, ie) {
            if (!ie) return [Ue * G / D, 0];
            var fe = ie * ie, xe = Ue + fe * (Qe + fe * (ht + fe * Z)), Te = ie * (B - 1 + fe * (y - R + fe * b)), ze = (xe * xe + Te * Te) / (2 * Te), Ve = G * F(xe / ze) / D;
            return [ze * k(Ve), ie * (1 + fe * R) + ze * (1 - p(Ve))];
          }
          return arguments.length < 8 && (R = 0), j.invert = function(G, ie) {
            var fe, xe, Te = D * G / Ue, ze = ie, Ve = 50;
            do {
              var ut = ze * ze, gt = Ue + ut * (Qe + ut * (ht + ut * Z)), wt = ze * (B - 1 + ut * (y - R + ut * b)), Et = gt * gt + wt * wt, zt = 2 * wt, It = Et / zt, jt = It * It, Lt = F(gt / It) / D, Zt = Te * Lt, Qt = gt * gt, Xt = (2 * Qe + ut * (4 * ht + 6 * ut * Z)) * ze, yn = B + ut * (3 * y + 5 * ut * b), Sn = (2 * (gt * Xt + wt * (yn - 1)) * zt - Et * (2 * (yn - 1))) / (zt * zt), Un = p(Zt), Vn = k(Zt), Yn = It * Un, er = It * Vn, kr = Te / D * (1 / V(1 - Qt / jt)) * (Xt * It - gt * Sn) / jt, or = er - G, Mr = ze * (1 + ut * R) + It - Yn - ie, fr = Sn * Vn + Yn * kr, Or = Yn * Lt, br = 1 + Sn - (Sn * Un - er * kr), Nr = er * Lt, ii = fr * Nr - br * Or;
              if (!ii) break;
              Te -= fe = (Mr * fr - or * br) / ii, ze -= xe = (or * Nr - Mr * Or) / ii;
            } while ((u(fe) > A || u(xe) > A) && --Ve > 0);
            return [Te, ze];
          }, j;
        }
        var Wr = zr(2.8284, -1.6988, 0.75432, -0.18071, 1.76003, -0.38914, 0.042555);
        function mr() {
          return (0, l.A)(Wr).scale(149.995);
        }
        var Ir = zr(2.583819, -0.835827, 0.170354, -0.038094, 1.543313, -0.411435, 0.082742);
        function yr() {
          return (0, l.A)(Ir).scale(153.93);
        }
        var Vr = zr(5 / 6 * D, -0.62636, -0.0344, 0, 1.3493, -0.05524, 0, 0.045);
        function rn() {
          return (0, l.A)(Vr).scale(130.945);
        }
        function Tn(Ue, Qe) {
          var ht = Ue * Ue, Z = Qe * Qe;
          return [Ue * (1 - 0.162388 * Z) * (0.87 - 952426e-9 * ht * ht), Qe * (1 + Z / 12)];
        }
        function sr() {
          return (0, l.A)(Tn).scale(131.747);
        }
        Tn.invert = function(Ue, Qe) {
          var ht, Z = Ue, B = Qe, y = 50;
          do {
            var b = B * B;
            B -= ht = (B * (1 + b / 12) - Qe) / (1 + b / 4);
          } while (u(ht) > A && --y > 0);
          y = 50, Ue /= 1 - 0.162388 * b;
          do {
            var R = (R = Z * Z) * R;
            Z -= ht = (Z * (0.87 - 952426e-9 * R) - Ue) / (0.87 - 476213e-8 * R);
          } while (u(ht) > A && --y > 0);
          return [Z, B];
        };
        var $n = zr(2.6516, -0.76534, 0.19123, -0.047094, 1.36289, -0.13965, 0.031762);
        function ur() {
          return (0, l.A)($n).scale(131.087);
        }
        function Tr(Ue) {
          var Qe = Ue(L, 0)[0] - Ue(-L, 0)[0];
          function ht(Z, B) {
            var y = Z > 0 ? -0.5 : 0.5, b = Ue(Z + y * D, B);
            return b[0] -= y * Qe, b;
          }
          return Ue.invert && (ht.invert = function(Z, B) {
            var y = Z > 0 ? -0.5 : 0.5, b = Ue.invert(Z + y * Qe, B), R = b[0] - y * D;
            return R < -D ? R += 2 * D : R > D && (R -= 2 * D), b[0] = R, b;
          }), ht;
        }
        function wr(Ue, Qe) {
          var ht = w(Ue), Z = w(Qe), B = p(Qe), y = p(Ue) * B, b = k(Ue) * B, R = k(Z * Qe);
          Ue = u(h(b, R)), Qe = F(y), u(Ue - L) > A && (Ue %= L);
          var j = function(G, ie) {
            if (ie === L) return [0, 0];
            var fe, xe, Te = k(ie), ze = Te * Te, Ve = ze * ze, ut = 1 + Ve, gt = 1 + 3 * Ve, wt = 1 - Ve, Et = F(1 / V(ut)), zt = wt + ze * ut * Et, It = (1 - Te) / zt, jt = V(It), Lt = It * ut, Zt = V(Lt), Qt = jt * wt;
            if (G === 0) return [0, -(Qt + ze * Zt)];
            var Xt, yn = p(ie), Sn = 1 / yn, Un = 2 * Te * yn, Vn = (-zt * yn - (1 - Te) * ((-3 * ze + Et * gt) * Un)) / (zt * zt), Yn = -Sn * Un, er = -Sn * (ze * ut * Vn + It * gt * Un), kr = -2 * Sn * (wt * (0.5 * Vn / jt) - 2 * ze * jt * Un), or = 4 * G / D;
            if (G > 0.222 * D || ie < D / 4 && G > 0.175 * D) {
              if (fe = (Qt + ze * V(Lt * (1 + Ve) - Qt * Qt)) / (1 + Ve), G > D / 4) return [fe, fe];
              var Mr = fe, fr = 0.5 * fe;
              fe = 0.5 * (fr + Mr), xe = 50;
              do {
                var Or = fe * (kr + Yn * V(Lt - fe * fe)) + er * F(fe / Zt) - or;
                if (!Or) break;
                Or < 0 ? fr = fe : Mr = fe, fe = 0.5 * (fr + Mr);
              } while (u(Mr - fr) > A && --xe > 0);
            } else {
              fe = A, xe = 25;
              do {
                var br = fe * fe, Nr = V(Lt - br), ii = kr + Yn * Nr, Rr = fe * ii + er * F(fe / Zt) - or;
                fe -= Xt = Nr ? Rr / (ii + (er - Yn * br) / Nr) : 0;
              } while (u(Xt) > A && --xe > 0);
            }
            return [fe, -Qt - ze * V(Lt - fe * fe)];
          }(Ue > D / 4 ? L - Ue : Ue, Qe);
          return Ue > D / 4 && (R = j[0], j[0] = -j[1], j[1] = -R), j[0] *= ht, j[1] *= -Z, j;
        }
        function Fr() {
          return (0, l.A)(Tr(wr)).scale(239.75);
        }
        function Xr(Ue, Qe) {
          var ht, Z, B, y, b, R;
          if (Qe < A) return [(y = k(Ue)) - (ht = Qe * (Ue - y * (Z = p(Ue))) / 4) * Z, Z + ht * y, 1 - Qe * y * y / 2, Ue - ht];
          if (Qe >= 1 - A) return ht = (1 - Qe) / 4, B = 1 / (Z = q(Ue)), [(y = ((R = _(2 * (R = Ue))) - 1) / (R + 1)) + ht * ((b = Z * $(Ue)) - Ue) / (Z * Z), B - ht * y * B * (b - Ue), B + ht * y * B * (b + Ue), 2 * i(_(Ue)) - L + ht * (b - Ue) / Z];
          var j = [1, 0, 0, 0, 0, 0, 0, 0, 0], G = [V(Qe), 0, 0, 0, 0, 0, 0, 0, 0], ie = 0;
          for (Z = V(1 - Qe), b = 1; u(G[ie] / j[ie]) > A && ie < 8; ) ht = j[ie++], G[ie] = (ht - Z) / 2, j[ie] = (ht + Z) / 2, Z = V(ht * Z), b *= 2;
          B = b * j[ie] * Ue;
          do
            B = (F(y = G[ie] * k(Z = B) / j[ie]) + B) / 2;
          while (--ie);
          return [k(B), y = p(B), y / p(B - Z), B];
        }
        function un(Ue, Qe) {
          if (!Qe) return Ue;
          if (Qe === 1) return f(S(Ue / 2 + E));
          for (var ht = 1, Z = V(1 - Qe), B = V(Qe), y = 0; u(B) > A; y++) {
            if (Ue % D) {
              var b = i(Z * S(Ue) / ht);
              b < 0 && (b += D), Ue += b + ~~(Ue / D) * D;
            } else Ue += Ue;
            B = (ht + Z) / 2, Z = V(ht * Z), B = ((ht = B) - Z) / 2;
          }
          return Ue / (m(2, y) * ht);
        }
        function Gn(Ue, Qe) {
          var ht = (I - 1) / (I + 1), Z = V(1 - ht * ht), B = un(L, Z * Z), y = f(S(D / 4 + u(Qe) / 2)), b = _(-1 * y) / V(ht), R = function(G, ie) {
            var fe = G * G, xe = ie + 1, Te = 1 - fe - ie * ie;
            return [0.5 * ((G >= 0 ? L : -L) - h(Te, 2 * G)), -0.25 * f(Te * Te + 4 * fe) + 0.5 * f(xe * xe + fe)];
          }(b * p(-1 * Ue), b * k(-1 * Ue)), j = function(G, ie, fe) {
            var xe = u(G), Te = $(u(ie));
            if (xe) {
              var ze = 1 / k(xe), Ve = 1 / (S(xe) * S(xe)), ut = -(Ve + fe * (Te * Te * ze * ze) - 1 + fe), gt = (-ut + V(ut * ut - (fe - 1) * Ve * 4)) / 2;
              return [un(i(1 / V(gt)), fe) * w(G), un(i(V((gt / Ve - 1) / fe)), 1 - fe) * w(ie)];
            }
            return [0, un(i(Te), 1 - fe) * w(ie)];
          }(R[0], R[1], Z * Z);
          return [-j[1], (Qe >= 0 ? 1 : -1) * (0.5 * B - j[0])];
        }
        function on() {
          return (0, l.A)(Tr(Gn)).scale(151.496);
        }
        wr.invert = function(Ue, Qe) {
          u(Ue) > 1 && (Ue = 2 * w(Ue) - Ue), u(Qe) > 1 && (Qe = 2 * w(Qe) - Qe);
          var ht = w(Ue), Z = w(Qe), B = -ht * Ue, y = -Z * Qe, b = y / B < 1, R = function(fe, xe) {
            for (var Te = 0, ze = 1, Ve = 0.5, ut = 50; ; ) {
              var gt = Ve * Ve, wt = V(Ve), Et = F(1 / V(1 + gt)), zt = 1 - gt + Ve * (1 + gt) * Et, It = (1 - wt) / zt, jt = V(It), Lt = It * (1 + gt), Zt = jt * (1 - gt), Qt = V(Lt - fe * fe), Xt = xe + Zt + Ve * Qt;
              if (u(ze - Te) < C || --ut == 0 || Xt === 0) break;
              Xt > 0 ? Te = Ve : ze = Ve, Ve = 0.5 * (Te + ze);
            }
            if (!ut) return null;
            var yn = F(wt), Sn = p(yn), Un = 1 / Sn, Vn = 2 * wt * Sn, Yn = (-zt * Sn - (-3 * Ve + Et * (1 + 3 * gt)) * Vn * (1 - wt)) / (zt * zt);
            return [D / 4 * (fe * (-2 * Un * ((1 - gt) * (0.5 * Yn / jt) - 2 * Ve * jt * Vn) + -Un * Vn * Qt) + -Un * (Ve * (1 + gt) * Yn + It * (1 + 3 * gt) * Vn) * F(fe / V(Lt))), yn];
          }(b ? y : B, b ? B : y), j = R[0], G = R[1], ie = p(G);
          return b && (j = -L - j), [ht * (h(k(j) * ie, -k(G)) + D), Z * F(p(j) * ie)];
        }, Gn.invert = function(Ue, Qe) {
          var ht, Z, B, y, b, R, j = (I - 1) / (I + 1), G = V(1 - j * j), ie = (Z = -Ue, B = G * G, (ht = 0.5 * un(L, G * G) - Qe) ? (y = Xr(ht, B), Z ? (R = (b = Xr(Z, 1 - B))[1] * b[1] + B * y[0] * y[0] * b[0] * b[0], [[y[0] * b[2] / R, y[1] * y[2] * b[0] * b[1] / R], [y[1] * b[1] / R, -y[0] * y[2] * b[0] * b[2] / R], [y[2] * b[1] * b[2] / R, -B * y[0] * y[1] * b[0] / R]]) : [[y[0], 0], [y[1], 0], [y[2], 0]]) : [[0, (b = Xr(Z, 1 - B))[0] / b[1]], [1 / b[1], 0], [b[2] / b[1], 0]]), fe = function(xe, Te) {
            var ze = Te[0] * Te[0] + Te[1] * Te[1];
            return [(xe[0] * Te[0] + xe[1] * Te[1]) / ze, (xe[1] * Te[0] - xe[0] * Te[1]) / ze];
          }(ie[0], ie[1]);
          return [h(fe[1], fe[0]) / -1, 2 * i(_(-0.5 * f(j * fe[0] * fe[0] + j * fe[1] * fe[1]))) - L];
        };
        var ln = n(39127);
        function bn(Ue) {
          var Qe = k(Ue), ht = p(Ue), Z = Nn(Ue);
          function B(y, b) {
            var R = Z(y, b);
            y = R[0], b = R[1];
            var j = k(b), G = p(b), ie = p(y), fe = U(Qe * j + ht * G * ie), xe = k(fe), Te = u(xe) > A ? fe / xe : 1;
            return [Te * ht * k(y), (u(y) > L ? Te : -Te) * (Qe * G - ht * j * ie)];
          }
          return Z.invert = Nn(-Ue), B.invert = function(y, b) {
            var R = V(y * y + b * b), j = -k(R), G = p(R), ie = R * G, fe = -b * j, xe = R * Qe, Te = V(ie * ie + fe * fe - xe * xe), ze = h(ie * xe + fe * Te, fe * xe - ie * Te), Ve = (R > L ? -1 : 1) * h(y * j, R * p(ze) * G + b * k(ze) * j);
            return Z.invert(Ve, ze);
          }, B;
        }
        function Nn(Ue) {
          var Qe = k(Ue), ht = p(Ue);
          return function(Z, B) {
            var y = p(B), b = p(Z) * y, R = k(Z) * y, j = k(B);
            return [h(R, b * ht - j * Qe), F(j * ht + b * Qe)];
          };
        }
        function jn() {
          var Ue = 0, Qe = (0, l.U)(bn), ht = Qe(Ue), Z = ht.rotate, B = ht.stream, y = (0, ln.A)();
          return ht.parallel = function(b) {
            if (!arguments.length) return Ue * T;
            var R = ht.rotate();
            return Qe(Ue = b * z).rotate(R);
          }, ht.rotate = function(b) {
            return arguments.length ? (Z.call(ht, [b[0], b[1] - Ue * T]), y.center([-b[0], -b[1]]), ht) : ((b = Z.call(ht))[1] += Ue * T, b);
          }, ht.stream = function(b) {
            return (b = B(b)).sphere = function() {
              b.polygonStart();
              var R, j = y.radius(89.99)().coordinates[0], G = j.length - 1, ie = -1;
              for (b.lineStart(); ++ie < G; ) b.point((R = j[ie])[0], R[1]);
              for (b.lineEnd(), G = (j = y.radius(90.01)().coordinates[0]).length - 1, b.lineStart(); --ie >= 0; ) b.point((R = j[ie])[0], R[1]);
              b.lineEnd(), b.polygonEnd();
            }, b;
          }, ht.scale(79.4187).parallel(45).clipAngle(179.999);
        }
        var Jn = n(29725), Hn = n(20465), Ln = F(1 - 1 / 3) * T, pn = pt(0);
        function dn(Ue) {
          var Qe = Ln * z, ht = vt(D, Qe)[0] - vt(-D, Qe)[0], Z = pn(0, Qe)[1], B = vt(0, Qe)[1], y = M - B, b = O / Ue, R = 4 / O, j = Z + y * y * 4 / O;
          function G(ie, fe) {
            var xe, Te = u(fe);
            if (Te > Qe) {
              var ze = g(Ue - 1, c(0, d((ie + D) / b)));
              (xe = vt(ie += D * (Ue - 1) / Ue - ze * b, Te))[0] = xe[0] * O / ht - O * (Ue - 1) / (2 * Ue) + ze * O / Ue, xe[1] = Z + 4 * (xe[1] - B) * y / O, fe < 0 && (xe[1] = -xe[1]);
            } else xe = pn(ie, fe);
            return xe[0] *= R, xe[1] /= j, xe;
          }
          return G.invert = function(ie, fe) {
            ie /= R;
            var xe = u(fe *= j);
            if (xe > Z) {
              var Te = g(Ue - 1, c(0, d((ie + D) / b)));
              ie = (ie + D * (Ue - 1) / Ue - Te * b) * ht / O;
              var ze = vt.invert(ie, 0.25 * (xe - Z) * O / y + B);
              return ze[0] -= D * (Ue - 1) / Ue - Te * b, fe < 0 && (ze[1] = -ze[1]), ze;
            }
            return pn.invert(ie, fe);
          }, G;
        }
        function Dn(Ue, Qe) {
          return [Ue, 1 & Qe ? 90 - A : Ln];
        }
        function nr(Ue, Qe) {
          return [Ue, 1 & Qe ? -90 + A : -Ln];
        }
        function pr(Ue) {
          return [Ue[0] * (1 - A), Ue[1]];
        }
        function ir() {
          var Ue = 4, Qe = (0, l.U)(dn), ht = Qe(Ue), Z = ht.stream;
          return ht.lobes = function(B) {
            return arguments.length ? Qe(Ue = +B) : Ue;
          }, ht.stream = function(B) {
            var y = ht.rotate(), b = Z(B), R = (ht.rotate([0, 0]), Z(B));
            return ht.rotate(y), b.sphere = function() {
              var j, G;
              (0, Hn.A)((j = 180 / Ue, G = [].concat((0, Jn.y1)(-180, 180 + j / 2, j).map(Dn), (0, Jn.y1)(180, -180 - j / 2, -j).map(nr)), { type: "Polygon", coordinates: [j === 180 ? G.map(pr) : G] }), R);
            }, b;
          }, ht.scale(239.75);
        }
        function gr(Ue) {
          var Qe, ht = 1 + Ue, Z = F(k(1 / ht)), B = 2 * V(D / (Qe = D + 4 * Z * ht)), y = 0.5 * B * (ht + V(Ue * (2 + Ue))), b = Ue * Ue, R = ht * ht;
          function j(G, ie) {
            var fe, xe, Te = 1 - k(ie);
            if (Te && Te < 2) {
              var ze, Ve = L - ie, ut = 25;
              do {
                var gt = k(Ve), wt = p(Ve), Et = Z + h(gt, ht - wt), zt = 1 + R - 2 * ht * wt;
                Ve -= ze = (Ve - b * Z - ht * gt + zt * Et - 0.5 * Te * Qe) / (2 * ht * gt * Et);
              } while (u(ze) > C && --ut > 0);
              fe = B * V(zt), xe = G * Et / D;
            } else fe = B * (Ue + Te), xe = G * Z / D;
            return [fe * k(xe), y - fe * p(xe)];
          }
          return j.invert = function(G, ie) {
            var fe = G * G + (ie -= y) * ie, xe = (1 + R - fe / (B * B)) / (2 * ht), Te = U(xe), ze = k(Te), Ve = Z + h(ze, ht - xe);
            return [F(G / V(fe)) * D / Ve, F(1 - 2 * (Te - b * Z - ht * ze + (1 + R - 2 * ht * xe) * Ve) / Qe)];
          }, j;
        }
        function Pr() {
          var Ue = 1, Qe = (0, l.U)(gr), ht = Qe(Ue);
          return ht.ratio = function(Z) {
            return arguments.length ? Qe(Ue = +Z) : Ue;
          }, ht.scale(167.774).center([0, 18.67]);
        }
        var Cr = 0.7109889596207567, Er = 0.0528035274542;
        function Sr(Ue, Qe) {
          return Qe > -Cr ? ((Ue = Ne(Ue, Qe))[1] += Er, Ue) : je(Ue, Qe);
        }
        function Dr() {
          return (0, l.A)(Sr).rotate([-20, -55]).scale(164.263).center([0, -5.4036]);
        }
        function Qn(Ue, Qe) {
          return u(Qe) > Cr ? ((Ue = Ne(Ue, Qe))[1] -= Qe > 0 ? Er : -Er, Ue) : je(Ue, Qe);
        }
        function ri() {
          return (0, l.A)(Qn).scale(152.63);
        }
        function Zr(Ue, Qe, ht, Z) {
          var B = V(4 * D / (2 * ht + (1 + Ue - Qe / 2) * k(2 * ht) + (Ue + Qe) / 2 * k(4 * ht) + Qe / 2 * k(6 * ht))), y = V(Z * k(ht) * V((1 + Ue * p(2 * ht) + Qe * p(4 * ht)) / (1 + Ue + Qe))), b = ht * j(1);
          function R(fe) {
            return V(1 + Ue * p(2 * fe) + Qe * p(4 * fe));
          }
          function j(fe) {
            var xe = fe * ht;
            return (2 * xe + (1 + Ue - Qe / 2) * k(2 * xe) + (Ue + Qe) / 2 * k(4 * xe) + Qe / 2 * k(6 * xe)) / ht;
          }
          function G(fe) {
            return R(fe) * k(fe);
          }
          var ie = function(fe, xe) {
            var Te = ht * Se(j, b * k(xe) / ht, xe / D);
            isNaN(Te) && (Te = ht * w(xe));
            var ze = B * R(Te);
            return [ze * y * fe / D * p(Te), ze / y * k(Te)];
          };
          return ie.invert = function(fe, xe) {
            var Te = Se(G, xe * y / B);
            return [fe * D / (p(Te) * B * y * R(Te)), F(ht * j(Te / ht) / b)];
          }, ht === 0 && (B = V(Z / D), (ie = function(fe, xe) {
            return [fe * B, k(xe) / B];
          }).invert = function(fe, xe) {
            return [fe / B, F(xe * B)];
          }), ie;
        }
        function Br() {
          var Ue = 1, Qe = 0, ht = 45 * z, Z = 2, B = (0, l.U)(Zr), y = B(Ue, Qe, ht, Z);
          return y.a = function(b) {
            return arguments.length ? B(Ue = +b, Qe, ht, Z) : Ue;
          }, y.b = function(b) {
            return arguments.length ? B(Ue, Qe = +b, ht, Z) : Qe;
          }, y.psiMax = function(b) {
            return arguments.length ? B(Ue, Qe, ht = +b * z, Z) : ht * T;
          }, y.ratio = function(b) {
            return arguments.length ? B(Ue, Qe, ht, Z = +b) : Z;
          }, y.scale(180.739);
        }
        function Yr(Ue, Qe, ht, Z, B, y, b, R, j, G, ie) {
          if (ie.nanEncountered) return NaN;
          var fe, xe, Te, ze, Ve, ut, gt, wt, Et, zt;
          if (xe = Ue(Qe + 0.25 * (fe = ht - Qe)), Te = Ue(ht - 0.25 * fe), isNaN(xe)) ie.nanEncountered = !0;
          else {
            if (!isNaN(Te)) return zt = ((ut = (ze = fe * (Z + 4 * xe + B) / 12) + (Ve = fe * (B + 4 * Te + y) / 12)) - b) / 15, G > j ? (ie.maxDepthCount++, ut + zt) : Math.abs(zt) < R ? ut + zt : (wt = Yr(Ue, Qe, gt = Qe + 0.5 * fe, Z, xe, B, ze, 0.5 * R, j, G + 1, ie), isNaN(wt) ? (ie.nanEncountered = !0, NaN) : (Et = Yr(Ue, gt, ht, B, Te, y, Ve, 0.5 * R, j, G + 1, ie), isNaN(Et) ? (ie.nanEncountered = !0, NaN) : wt + Et));
            ie.nanEncountered = !0;
          }
        }
        function yi(Ue, Qe, ht, Z, B) {
          B === void 0 && (B = 20);
          var y = Ue(Qe), b = Ue(0.5 * (Qe + ht)), R = Ue(ht);
          return Yr(Ue, Qe, ht, y, b, R, (y + 4 * b + R) * (ht - Qe) / 6, Z, B, 1, { maxDepthCount: 0, nanEncountered: !1 });
        }
        function si(Ue, Qe, ht) {
          function Z(Te) {
            return Ue + (1 - Ue) * m(1 - m(Te, Qe), 1 / Qe);
          }
          function B(Te) {
            return yi(Z, 0, Te, 1e-4);
          }
          for (var y = 1 / B(1), b = 1e3, R = 1.00000001 * y, j = [], G = 0; G <= b; G++) j.push(B(G / b) * R);
          function ie(Te) {
            var ze = 0, Ve = b, ut = 500;
            do
              j[ut] > Te ? Ve = ut : ze = ut, ut = ze + Ve >> 1;
            while (ut > ze);
            var gt = j[ut + 1] - j[ut];
            return gt && (gt = (Te - j[ut + 1]) / gt), (ut + 1 + gt) / b;
          }
          var fe = 2 * ie(1) / D * y / ht, xe = function(Te, ze) {
            var Ve = ie(u(k(ze))), ut = Z(Ve) * Te;
            return Ve /= fe, [ut, ze >= 0 ? Ve : -Ve];
          };
          return xe.invert = function(Te, ze) {
            var Ve;
            return u(ze *= fe) < 1 && (Ve = w(ze) * F(B(u(ze)) * y)), [Te / Z(u(ze)), Ve];
          }, xe;
        }
        function Pa() {
          var Ue = 0, Qe = 2.5, ht = 1.183136, Z = (0, l.U)(si), B = Z(Ue, Qe, ht);
          return B.alpha = function(y) {
            return arguments.length ? Z(Ue = +y, Qe, ht) : Ue;
          }, B.k = function(y) {
            return arguments.length ? Z(Ue, Qe = +y, ht) : Qe;
          }, B.gamma = function(y) {
            return arguments.length ? Z(Ue, Qe, ht = +y) : ht;
          }, B.scale(152.63);
        }
        function Ni(Ue, Qe) {
          return u(Ue[0] - Qe[0]) < A && u(Ue[1] - Qe[1]) < A;
        }
        function To(Ue, Qe) {
          for (var ht, Z, B, y = -1, b = Ue.length, R = Ue[0], j = []; ++y < b; ) {
            Z = ((ht = Ue[y])[0] - R[0]) / Qe, B = (ht[1] - R[1]) / Qe;
            for (var G = 0; G < Qe; ++G) j.push([R[0] + G * Z, R[1] + G * B]);
            R = ht;
          }
          return j.push(ht), j;
        }
        function Ba(Ue, Qe, ht) {
          var Z, B;
          function y(j, G) {
            for (var ie = G < 0 ? -1 : 1, fe = Qe[+(G < 0)], xe = 0, Te = fe.length - 1; xe < Te && j > fe[xe][2][0]; ++xe) ;
            var ze = Ue(j - fe[xe][1][0], G);
            return ze[0] += Ue(fe[xe][1][0], ie * G > ie * fe[xe][0][1] ? fe[xe][0][1] : G)[0], ze;
          }
          ht ? y.invert = ht(y) : Ue.invert && (y.invert = function(j, G) {
            for (var ie = B[+(G < 0)], fe = Qe[+(G < 0)], xe = 0, Te = ie.length; xe < Te; ++xe) {
              var ze = ie[xe];
              if (ze[0][0] <= j && j < ze[1][0] && ze[0][1] <= G && G < ze[1][1]) {
                var Ve = Ue.invert(j - Ue(fe[xe][1][0], 0)[0], G);
                return Ve[0] += fe[xe][1][0], Ni(y(Ve[0], Ve[1]), [j, G]) ? Ve : null;
              }
            }
          });
          var b = (0, l.A)(y), R = b.stream;
          return b.stream = function(j) {
            var G = b.rotate(), ie = R(j), fe = (b.rotate([0, 0]), R(j));
            return b.rotate(G), ie.sphere = function() {
              (0, Hn.A)(Z, fe);
            }, ie;
          }, b.lobes = function(j) {
            return arguments.length ? (Z = function(G) {
              var ie, fe, xe, Te, ze, Ve, ut, gt = [], wt = G[0].length;
              for (ut = 0; ut < wt; ++ut) fe = (ie = G[0][ut])[0][0], xe = ie[0][1], Te = ie[1][1], ze = ie[2][0], Ve = ie[2][1], gt.push(To([[fe + A, xe + A], [fe + A, Te - A], [ze - A, Te - A], [ze - A, Ve + A]], 30));
              for (ut = G[1].length - 1; ut >= 0; --ut) fe = (ie = G[1][ut])[0][0], xe = ie[0][1], Te = ie[1][1], ze = ie[2][0], Ve = ie[2][1], gt.push(To([[ze - A, Ve - A], [ze - A, Te + A], [fe + A, Te + A], [fe + A, xe - A]], 30));
              return { type: "Polygon", coordinates: [(0, Jn.Am)(gt)] };
            }(j), Qe = j.map(function(G) {
              return G.map(function(ie) {
                return [[ie[0][0] * z, ie[0][1] * z], [ie[1][0] * z, ie[1][1] * z], [ie[2][0] * z, ie[2][1] * z]];
              });
            }), B = Qe.map(function(G) {
              return G.map(function(ie) {
                var fe, xe = Ue(ie[0][0], ie[0][1])[0], Te = Ue(ie[2][0], ie[2][1])[0], ze = Ue(ie[1][0], ie[0][1])[1], Ve = Ue(ie[1][0], ie[1][1])[1];
                return ze > Ve && (fe = ze, ze = Ve, Ve = fe), [[xe, ze], [Te, Ve]];
              });
            }), b) : Qe.map(function(G) {
              return G.map(function(ie) {
                return [[ie[0][0] * T, ie[0][1] * T], [ie[1][0] * T, ie[1][1] * T], [ie[2][0] * T, ie[2][1] * T]];
              });
            });
          }, Qe != null && b.lobes(Qe), b;
        }
        Sr.invert = function(Ue, Qe) {
          return Qe > -Cr ? Ne.invert(Ue, Qe - Er) : je.invert(Ue, Qe);
        }, Qn.invert = function(Ue, Qe) {
          return u(Qe) > Cr ? Ne.invert(Ue, Qe + (Qe > 0 ? Er : -Er)) : je.invert(Ue, Qe);
        };
        var eo = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]];
        function Ds() {
          return Ba(we, eo).scale(160.857);
        }
        var ji = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]];
        function Ao() {
          return Ba(Qn, ji).scale(152.63);
        }
        var dl = [[[[-180, 0], [-100, 90], [-40, 0]], [[-40, 0], [30, 90], [180, 0]]], [[[-180, 0], [-160, -90], [-100, 0]], [[-100, 0], [-60, -90], [-20, 0]], [[-20, 0], [20, -90], [80, 0]], [[80, 0], [140, -90], [180, 0]]]];
        function So() {
          return Ba(Ne, dl).scale(169.529);
        }
        var Pu = [[[[-180, 0], [-90, 90], [0, 0]], [[0, 0], [90, 90], [180, 0]]], [[[-180, 0], [-90, -90], [0, 0]], [[0, 0], [90, -90], [180, 0]]]];
        function go() {
          return Ba(Ne, Pu).scale(169.529).rotate([20, 0]);
        }
        var Vi = [[[[-180, 35], [-30, 90], [0, 35]], [[0, 35], [30, 90], [180, 35]]], [[[-180, -10], [-102, -90], [-65, -10]], [[-65, -10], [5, -90], [77, -10]], [[77, -10], [103, -90], [180, -10]]]];
        function Ml() {
          return Ba(Sr, Vi, Me).rotate([-20, -55]).scale(164.263).center([0, -5.4036]);
        }
        var pl = [[[[-180, 0], [-110, 90], [-40, 0]], [[-40, 0], [0, 90], [40, 0]], [[40, 0], [110, 90], [180, 0]]], [[[-180, 0], [-110, -90], [-40, 0]], [[-40, 0], [0, -90], [40, 0]], [[40, 0], [110, -90], [180, 0]]]];
        function Zl() {
          return Ba(je, pl).scale(152.63).rotate([-20, 0]);
        }
        function vs(Ue, Qe) {
          return [3 / O * Ue * V(D * D / 3 - Qe * Qe), Qe];
        }
        function Xl() {
          return (0, l.A)(vs).scale(158.837);
        }
        function xs(Ue) {
          function Qe(ht, Z) {
            if (u(u(Z) - L) < A) return [0, Z < 0 ? -2 : 2];
            var B = k(Z), y = m((1 + B) / (1 - B), Ue / 2), b = 0.5 * (y + 1 / y) + p(ht *= Ue);
            return [2 * k(ht) / b, (y - 1 / y) / b];
          }
          return Qe.invert = function(ht, Z) {
            var B = u(Z);
            if (u(B - 2) < A) return ht ? null : [0, w(Z) * L];
            if (B > 2) return null;
            var y = (ht /= 2) * ht, b = (Z /= 2) * Z, R = 2 * Z / (1 + y + b);
            return R = m((1 + R) / (1 - R), 1 / Ue), [h(2 * ht, 1 - y - b) / Ue, F((R - 1) / (R + 1))];
          }, Qe;
        }
        function ja() {
          var Ue = 0.5, Qe = (0, l.U)(xs), ht = Qe(Ue);
          return ht.spacing = function(Z) {
            return arguments.length ? Qe(Ue = +Z) : Ue;
          }, ht.scale(124.75);
        }
        vs.invert = function(Ue, Qe) {
          return [O / 3 * Ue / V(D * D / 3 - Qe * Qe), Qe];
        };
        var Mo = D / I;
        function Kl(Ue, Qe) {
          return [Ue * (1 + V(p(Qe))) / 2, Qe / (p(Qe / 2) * p(Ue / 6))];
        }
        function Xs() {
          return (0, l.A)(Kl).scale(97.2672);
        }
        function El(Ue, Qe) {
          var ht = Ue * Ue, Z = Qe * Qe;
          return [Ue * (0.975534 + Z * (-0.0143059 * ht - 0.119161 + -0.0547009 * Z)), Qe * (1.00384 + ht * (0.0802894 + -0.02855 * Z + 199025e-9 * ht) + Z * (0.0998909 + -0.0491032 * Z))];
        }
        function Jl() {
          return (0, l.A)(El).scale(139.98);
        }
        function ml(Ue, Qe) {
          return [k(Ue) / p(Qe), S(Qe) * p(Ue)];
        }
        function mu() {
          return (0, l.A)(ml).scale(144.049).clipAngle(89.999);
        }
        function gu(Ue) {
          var Qe = p(Ue), ht = S(E + Ue / 2);
          function Z(B, y) {
            var b = y - Ue, R = u(b) < A ? B * Qe : u(R = E + y / 2) < A || u(u(R) - L) < A ? 0 : B * b / f(S(R) / ht);
            return [R, b];
          }
          return Z.invert = function(B, y) {
            var b, R = y + Ue;
            return [u(y) < A ? B / Qe : u(b = E + R / 2) < A || u(u(b) - L) < A ? 0 : B * f(S(b) / ht) / y, R];
          }, Z;
        }
        function Ql() {
          return Re(gu).parallel(40).scale(158.837);
        }
        function Wo(Ue, Qe) {
          return [Ue, 1.25 * f(S(E + 0.4 * Qe))];
        }
        function Mc() {
          return (0, l.A)(Wo).scale(108.318);
        }
        function Xu(Ue) {
          var Qe = Ue.length - 1;
          function ht(Z, B) {
            for (var y, b = p(B), R = 2 / (1 + b * p(Z)), j = R * b * k(Z), G = R * k(B), ie = Qe, fe = Ue[ie], xe = fe[0], Te = fe[1]; --ie >= 0; ) xe = (fe = Ue[ie])[0] + j * (y = xe) - G * Te, Te = fe[1] + j * Te + G * y;
            return [xe = j * (y = xe) - G * Te, Te = j * Te + G * y];
          }
          return ht.invert = function(Z, B) {
            var y = 20, b = Z, R = B;
            do {
              for (var j, G = Qe, ie = Ue[G], fe = ie[0], xe = ie[1], Te = 0, ze = 0; --G >= 0; ) Te = fe + b * (j = Te) - R * ze, ze = xe + b * ze + R * j, fe = (ie = Ue[G])[0] + b * (j = fe) - R * xe, xe = ie[1] + b * xe + R * j;
              var Ve, ut, gt = (Te = fe + b * (j = Te) - R * ze) * Te + (ze = xe + b * ze + R * j) * ze;
              b -= Ve = ((fe = b * (j = fe) - R * xe - Z) * Te + (xe = b * xe + R * j - B) * ze) / gt, R -= ut = (xe * Te - fe * ze) / gt;
            } while (u(Ve) + u(ut) > A * A && --y > 0);
            if (y) {
              var wt = V(b * b + R * R), Et = 2 * i(0.5 * wt), zt = k(Et);
              return [h(b * zt, wt * p(Et)), wt ? F(R * zt / wt) : 0];
            }
          }, ht;
        }
        Kl.invert = function(Ue, Qe) {
          var ht = u(Ue), Z = u(Qe), B = A, y = L;
          Z < Mo ? y *= Z / Mo : B += 6 * U(Mo / Z);
          for (var b = 0; b < 25; b++) {
            var R = k(y), j = V(p(y)), G = k(y / 2), ie = p(y / 2), fe = k(B / 6), xe = p(B / 6), Te = 0.5 * B * (1 + j) - ht, ze = y / (ie * xe) - Z, Ve = j ? -0.25 * B * R / j : 0, ut = 0.5 * (1 + j), gt = (1 + 0.5 * y * G / ie) / (ie * xe), wt = y / ie * (fe / 6) / (xe * xe), Et = Ve * wt - gt * ut, zt = (Te * wt - ze * ut) / Et, It = (ze * Ve - Te * gt) / Et;
            if (y -= zt, B -= It, u(zt) < A && u(It) < A) break;
          }
          return [Ue < 0 ? -B : B, Qe < 0 ? -y : y];
        }, El.invert = function(Ue, Qe) {
          var ht = w(Ue) * D, Z = Qe / 2, B = 50;
          do {
            var y = ht * ht, b = Z * Z, R = ht * Z, j = ht * (0.975534 + b * (-0.0143059 * y - 0.119161 + -0.0547009 * b)) - Ue, G = Z * (1.00384 + y * (0.0802894 + -0.02855 * b + 199025e-9 * y) + b * (0.0998909 + -0.0491032 * b)) - Qe, ie = 0.975534 - b * (0.119161 + 3 * y * 0.0143059 + 0.0547009 * b), fe = -R * (0.238322 + 0.2188036 * b + 0.0286118 * y), xe = R * (0.1605788 + 7961e-7 * y + -0.0571 * b), Te = 1.00384 + y * (0.0802894 + 199025e-9 * y) + b * (3 * (0.0998909 - 0.02855 * y) - 0.245516 * b), ze = fe * xe - Te * ie, Ve = (G * fe - j * Te) / ze, ut = (j * xe - G * ie) / ze;
            ht -= Ve, Z -= ut;
          } while ((u(Ve) > A || u(ut) > A) && --B > 0);
          return B && [ht, Z];
        }, ml.invert = function(Ue, Qe) {
          var ht = Ue * Ue, Z = Qe * Qe + 1, B = ht + Z, y = Ue ? P * V((B - V(B * B - 4 * ht)) / ht) : 1 / V(Z);
          return [F(Ue * y), w(Qe) * U(y)];
        }, Wo.invert = function(Ue, Qe) {
          return [Ue, 2.5 * i(_(0.8 * Qe)) - 0.625 * D];
        };
        var yu = [[0.9972523, 0], [52513e-7, -41175e-7], [74606e-7, 48125e-7], [-0.0153783, -0.1968253], [0.0636871, -0.1408027], [0.3660976, -0.2937382]], ef = [[0.98879, 0], [0, 0], [-0.050909, 0], [0, 0], [0.075528, 0]], tf = [[0.984299, 0], [0.0211642, 37608e-7], [-0.1036018, -0.0575102], [-0.0329095, -0.0320119], [0.0499471, 0.1223335], [0.026046, 0.0899805], [7388e-7, -0.1435792], [75848e-7, -0.1334108], [-0.0216473, 0.0776645], [-0.0225161, 0.0853673]], bs = [[0.9245, 0], [0, 0], [0.01943, 0]], Ec = [[0.721316, 0], [0, 0], [-881625e-8, -617325e-8]];
        function mh() {
          return Ma(yu, [152, -64]).scale(1400).center([-160.908, 62.4864]).clipAngle(30).angle(7.8);
        }
        function Eo() {
          return Ma(ef, [95, -38]).scale(1e3).clipAngle(55).center([-96.5563, 38.8675]);
        }
        function ac() {
          return Ma(tf, [120, -45]).scale(359.513).clipAngle(55).center([-117.474, 53.0628]);
        }
        function Xi() {
          return Ma(bs, [-20, -18]).scale(209.091).center([20, 16.7214]).clipAngle(82);
        }
        function eu() {
          return Ma(Ec, [165, 10]).scale(250).clipAngle(130).center([-165, -10]);
        }
        function Ma(Ue, Qe) {
          var ht = (0, l.A)(Xu(Ue)).rotate(Qe).clipAngle(90), Z = (0, _t.A)(Qe), B = ht.center;
          return delete ht.rotate, ht.center = function(y) {
            return arguments.length ? B(Z(y)) : Z.invert(B());
          }, ht;
        }
        var Ea = V(6), Ls = V(7);
        function Bs(Ue, Qe) {
          var ht = F(7 * k(Qe) / (3 * Ea));
          return [Ea * Ue * (2 * p(2 * ht / 3) - 1) / Ls, 9 * k(ht / 3) / Ls];
        }
        function oc() {
          return (0, l.A)(Bs).scale(164.859);
        }
        function tu(Ue, Qe) {
          for (var ht, Z = (1 + P) * k(Qe), B = Qe, y = 0; y < 25 && (B -= ht = (k(B / 2) + k(B) - Z) / (0.5 * p(B / 2) + p(B)), !(u(ht) < A)); y++) ;
          return [Ue * (1 + 2 * p(B) / p(B / 2)) / (3 * I), 2 * V(3) * k(B / 2) / V(2 + I)];
        }
        function _s() {
          return (0, l.A)(tu).scale(188.209);
        }
        function Ps(Ue, Qe) {
          for (var ht, Z = V(6 / (4 + D)), B = (1 + D / 4) * k(Qe), y = Qe / 2, b = 0; b < 25 && (y -= ht = (y / 2 + k(y) - B) / (0.5 + p(y)), !(u(ht) < A)); b++) ;
          return [Z * (0.5 + p(y)) * Ue / 1.5, Z * y];
        }
        function Co() {
          return (0, l.A)(Ps).scale(166.518);
        }
        Bs.invert = function(Ue, Qe) {
          var ht = 3 * F(Qe * Ls / 9);
          return [Ue * Ls / (Ea * (2 * p(2 * ht / 3) - 1)), F(3 * k(ht) * Ea / 7)];
        }, tu.invert = function(Ue, Qe) {
          var ht = Qe * V(2 + I) / (2 * V(3)), Z = 2 * F(ht);
          return [3 * I * Ue / (1 + 2 * p(Z) / p(Z / 2)), F((ht + k(Z)) / (1 + P))];
        }, Ps.invert = function(Ue, Qe) {
          var ht = V(6 / (4 + D)), Z = Qe / ht;
          return u(u(Z) - L) < A && (Z = Z < 0 ? -L : L), [1.5 * Ue / (ht * (0.5 + p(Z))), F((Z / 2 + k(Z)) / (1 + D / 4))];
        };
        var da = n(57949);
        function Ou(Ue, Qe) {
          var ht = Qe * Qe, Z = ht * ht, B = ht * Z;
          return [Ue * (0.84719 - 0.13063 * ht + B * B * (0.05494 * ht - 0.04515 - 0.02326 * Z + 331e-5 * B)), Qe * (1.01183 + Z * Z * (0.01926 * ht - 0.02625 - 396e-5 * Z))];
        }
        function pf() {
          return (0, l.A)(Ou).scale(175.295);
        }
        function nu(Ue, Qe) {
          return [Ue * (1 + p(Qe)) / 2, 2 * (Qe - S(Qe / 2))];
        }
        function Ks() {
          return (0, l.A)(nu).scale(152.63);
        }
        Ou.invert = function(Ue, Qe) {
          var ht, Z, B, y, b = Qe, R = 25;
          do
            b -= ht = (b * (1.01183 + (B = (Z = b * b) * Z) * B * (0.01926 * Z - 0.02625 - 396e-5 * B)) - Qe) / (1.01183 + B * B * (0.21186 * Z - 0.23625 + -0.05148 * B));
          while (u(ht) > C && --R > 0);
          return [Ue / (0.84719 - 0.13063 * (Z = b * b) + (y = Z * (B = Z * Z)) * y * (0.05494 * Z - 0.04515 - 0.02326 * B + 331e-5 * y)), b];
        }, nu.invert = function(Ue, Qe) {
          for (var ht = Qe / 2, Z = 0, B = 1 / 0; Z < 10 && u(B) > A; ++Z) {
            var y = p(Qe / 2);
            Qe -= B = (Qe - S(Qe / 2) - ht) / (1 - 0.5 / (y * y));
          }
          return [2 * Ue / (1 + p(Qe)), Qe];
        };
        var Cc = [[[[-180, 0], [-90, 90], [0, 0]], [[0, 0], [90, 90], [180, 0]]], [[[-180, 0], [-90, -90], [0, 0]], [[0, 0], [90, -90], [180, 0]]]];
        function sc() {
          return Ba(pe(1 / 0), Cc).rotate([20, 0]).scale(152.63);
        }
        function lc(Ue, Qe) {
          var ht = k(Qe), Z = p(Qe), B = w(Ue);
          if (Ue === 0 || u(Qe) === L) return [0, Qe];
          if (Qe === 0) return [Ue, 0];
          if (u(Ue) === L) return [Ue * Z, L * ht];
          var y = D / (2 * Ue) - 2 * Ue / D, b = 2 * Qe / D, R = (1 - b * b) / (ht - b), j = y * y, G = R * R, ie = 1 + j / G, fe = 1 + G / j, xe = (y * ht / R - y / 2) / ie, Te = (G * ht / j + R / 2) / fe, ze = Te * Te - (G * ht * ht / j + R * ht - 1) / fe;
          return [L * (xe + V(xe * xe + Z * Z / ie) * B), L * (Te + V(ze < 0 ? 0 : ze) * w(-Qe * y) * B)];
        }
        function mf() {
          return (0, l.A)(lc).scale(127.267);
        }
        lc.invert = function(Ue, Qe) {
          var ht = (Ue /= L) * Ue, Z = ht + (Qe /= L) * Qe, B = D * D;
          return [Ue ? (Z - 1 + V((1 - Z) * (1 - Z) + 4 * ht)) / (2 * Ue) * L : 0, Se(function(y) {
            return Z * (D * k(y) - 2 * y) * D + 4 * y * y * (Qe - k(y)) + 2 * D * y - B * Qe;
          }, 0)];
        };
        var yl = 1.0148, vl = 0.23185, ru = -0.14499, Cl = 0.02406, ea = yl, Ic = 5 * vl, nf = 7 * ru, zu = 9 * Cl, Yo = 1.790857183;
        function Ru(Ue, Qe) {
          var ht = Qe * Qe;
          return [Ue, Qe * (yl + ht * ht * (vl + ht * (ru + Cl * ht)))];
        }
        function gf() {
          return (0, l.A)(Ru).scale(139.319);
        }
        function Fu(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          var ht = S(Qe), Z = Ue * k(Qe);
          return [k(Z) / ht, Qe + (1 - p(Z)) / ht];
        }
        function ws() {
          return (0, l.A)(Fu).scale(103.74);
        }
        Ru.invert = function(Ue, Qe) {
          Qe > Yo ? Qe = Yo : Qe < -1.790857183 && (Qe = -1.790857183);
          var ht, Z = Qe;
          do {
            var B = Z * Z;
            Z -= ht = (Z * (yl + B * B * (vl + B * (ru + Cl * B))) - Qe) / (ea + B * B * (Ic + B * (nf + zu * B)));
          } while (u(ht) > A);
          return [Ue, Z];
        }, Fu.invert = function(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          var ht, Z = Ue * Ue + Qe * Qe, B = 0.5 * Qe, y = 10;
          do {
            var b = S(B), R = 1 / p(B), j = Z - 2 * Qe * B + B * B;
            B -= ht = (b * j + 2 * (B - Qe)) / (2 + j * R * R + 2 * (B - Qe) * b);
          } while (u(ht) > A && --y > 0);
          return b = S(B), [(u(Qe) < u(B + 1 / b) ? F(Ue * b) : w(Qe) * w(Ue) * (U(u(Ue * b)) + L)) / k(B), B];
        };
        var Nu = n(43212), An = n(81758);
        function to(Ue, Qe) {
          return [Ue[0] * Qe[0] + Ue[1] * Qe[3], Ue[0] * Qe[1] + Ue[1] * Qe[4], Ue[0] * Qe[2] + Ue[1] * Qe[5] + Ue[2], Ue[3] * Qe[0] + Ue[4] * Qe[3], Ue[3] * Qe[1] + Ue[4] * Qe[4], Ue[3] * Qe[2] + Ue[4] * Qe[5] + Ue[5]];
        }
        function Io(Ue, Qe) {
          return [Ue[0] - Qe[0], Ue[1] - Qe[1]];
        }
        function Ku(Ue) {
          return V(Ue[0] * Ue[0] + Ue[1] * Ue[1]);
        }
        function va(Ue, Qe, ht) {
          function Z(R, j) {
            var G, ie = Qe(R, j), fe = ie.project([R * T, j * T]);
            return (G = ie.transform) ? [G[0] * fe[0] + G[1] * fe[1] + G[2], -(G[3] * fe[0] + G[4] * fe[1] + G[5])] : (fe[1] = -fe[1], fe);
          }
          function B(R, j) {
            var G = R.project.invert, ie = R.transform, fe = j;
            if (ie && (ie = function(ut) {
              var gt = 1 / (ut[0] * ut[4] - ut[1] * ut[3]);
              return [gt * ut[4], -gt * ut[1], gt * (ut[1] * ut[5] - ut[2] * ut[4]), -gt * ut[3], gt * ut[0], gt * (ut[2] * ut[3] - ut[0] * ut[5])];
            }(ie), fe = [ie[0] * fe[0] + ie[1] * fe[1] + ie[2], ie[3] * fe[0] + ie[4] * fe[1] + ie[5]]), G && R === function(ut) {
              return Qe(ut[0] * z, ut[1] * z);
            }(xe = G(fe))) return xe;
            for (var xe, Te = R.children, ze = 0, Ve = Te && Te.length; ze < Ve; ++ze) if (xe = B(Te[ze], j)) return xe;
          }
          (function R(j, G) {
            if (j.edges = function(It) {
              for (var jt = It.length, Lt = [], Zt = It[jt - 1], Qt = 0; Qt < jt; ++Qt) Lt.push([Zt, Zt = It[Qt]]);
              return Lt;
            }(j.face), G.face) {
              var ie = j.shared = function(It, jt) {
                for (var Lt, Zt, Qt = It.length, Xt = null, yn = 0; yn < Qt; ++yn) {
                  Lt = It[yn];
                  for (var Sn = jt.length; --Sn >= 0; ) if (Zt = jt[Sn], Lt[0] === Zt[0] && Lt[1] === Zt[1]) {
                    if (Xt) return [Xt, Lt];
                    Xt = Lt;
                  }
                }
              }(j.face, G.face), fe = (Ve = ie.map(G.project), ut = ie.map(j.project), gt = Io(Ve[1], Ve[0]), wt = Io(ut[1], ut[0]), Et = function(It, jt) {
                return h(It[0] * jt[1] - It[1] * jt[0], It[0] * jt[0] + It[1] * jt[1]);
              }(gt, wt), zt = Ku(gt) / Ku(wt), to([1, 0, Ve[0][0], 0, 1, Ve[0][1]], to([zt, 0, 0, 0, zt, 0], to([p(Et), k(Et), 0, -k(Et), p(Et), 0], [1, 0, -ut[0][0], 0, 1, -ut[0][1]]))));
              j.transform = G.transform ? to(G.transform, fe) : fe;
              for (var xe = G.edges, Te = 0, ze = xe.length; Te < ze; ++Te) Ha(ie[0], xe[Te][1]) && Ha(ie[1], xe[Te][0]) && (xe[Te] = j), Ha(ie[0], xe[Te][0]) && Ha(ie[1], xe[Te][1]) && (xe[Te] = j);
              for (Te = 0, ze = (xe = j.edges).length; Te < ze; ++Te) Ha(ie[0], xe[Te][0]) && Ha(ie[1], xe[Te][1]) && (xe[Te] = G), Ha(ie[0], xe[Te][1]) && Ha(ie[1], xe[Te][0]) && (xe[Te] = G);
            } else j.transform = G.transform;
            var Ve, ut, gt, wt, Et, zt;
            return j.children && j.children.forEach(function(It) {
              R(It, j);
            }), j;
          })(Ue, { transform: null }), as(Ue) && (Z.invert = function(R, j) {
            var G = B(Ue, [R, -j]);
            return G && (G[0] *= z, G[1] *= z, G);
          });
          var y = (0, l.A)(Z), b = y.stream;
          return y.stream = function(R) {
            var j = y.rotate(), G = b(R), ie = (y.rotate([0, 0]), b(R));
            return y.rotate(j), G.sphere = function() {
              ie.polygonStart(), ie.lineStart(), Js(ie, Ue), ie.lineEnd(), ie.polygonEnd();
            }, G;
          }, y.angle(ht == null ? -30 : ht * T);
        }
        function Js(Ue, Qe, ht) {
          var Z, B, y = Qe.edges, b = y.length, R = { type: "MultiPoint", coordinates: Qe.face }, j = Qe.face.filter(function(Ve) {
            return u(Ve[1]) !== 90;
          }), G = (0, Nu.A)({ type: "MultiPoint", coordinates: j }), ie = !1, fe = -1, xe = G[1][0] - G[0][0], Te = xe === 180 || xe === 360 ? [(G[0][0] + G[1][0]) / 2, (G[0][1] + G[1][1]) / 2] : (0, ft.A)(R);
          if (ht) for (; ++fe < b && y[fe] !== ht; ) ;
          ++fe;
          for (var ze = 0; ze < b; ++ze) B = y[(ze + fe) % b], Array.isArray(B) ? (ie || (Ue.point((Z = (0, An.A)(B[0], Te)(A))[0], Z[1]), ie = !0), Ue.point((Z = (0, An.A)(B[1], Te)(A))[0], Z[1])) : (ie = !1, B !== ht && Js(Ue, B, Qe));
        }
        function Ha(Ue, Qe) {
          return Ue && Qe && Ue[0] === Qe[0] && Ue[1] === Qe[1];
        }
        function as(Ue) {
          return Ue.project.invert || Ue.children && Ue.children.some(as);
        }
        var aa = n(48419), Aa = [[0, 90], [-90, 0], [0, 0], [90, 0], [180, 0], [0, -90]], yo = [[0, 2, 1], [0, 3, 2], [5, 1, 2], [5, 2, 3], [0, 1, 4], [0, 4, 3], [5, 4, 1], [5, 3, 4]].map(function(Ue) {
          return Ue.map(function(Qe) {
            return Aa[Qe];
          });
        });
        function Ju(Ue) {
          Ue = Ue || function(ht) {
            var Z = (0, ft.A)({ type: "MultiPoint", coordinates: ht });
            return (0, aa.A)().scale(1).translate([0, 0]).rotate([-Z[0], -Z[1]]);
          };
          var Qe = yo.map(function(ht) {
            return { face: ht, project: Ue(ht) };
          });
          return [-1, 0, 0, 1, 0, 1, 4, 5].forEach(function(ht, Z) {
            var B = Qe[ht];
            B && (B.children || (B.children = [])).push(Qe[Z]);
          }), va(Qe[0], function(ht, Z) {
            return Qe[ht < -D / 2 ? Z < 0 ? 6 : 4 : ht < 0 ? Z < 0 ? 2 : 0 : ht < D / 2 ? Z < 0 ? 3 : 1 : Z < 0 ? 7 : 5];
          }).angle(-30).scale(101.858).center([0, 45]);
        }
        var uc = 2 / V(3);
        function vu(Ue, Qe) {
          var ht = vt(Ue, Qe);
          return [ht[0] * uc, ht[1]];
        }
        function xu(Ue) {
          Ue = Ue || function(ht) {
            var Z = (0, ft.A)({ type: "MultiPoint", coordinates: ht });
            return (0, l.A)(vu).translate([0, 0]).scale(1).rotate(Z[1] > 0 ? [-Z[0], 0] : [180 - Z[0], 180]);
          };
          var Qe = yo.map(function(ht) {
            return { face: ht, project: Ue(ht) };
          });
          return [-1, 0, 0, 1, 0, 1, 4, 5].forEach(function(ht, Z) {
            var B = Qe[ht];
            B && (B.children || (B.children = [])).push(Qe[Z]);
          }), va(Qe[0], function(ht, Z) {
            return Qe[ht < -D / 2 ? Z < 0 ? 6 : 4 : ht < 0 ? Z < 0 ? 2 : 0 : ht < D / 2 ? Z < 0 ? 3 : 1 : Z < 0 ? 7 : 5];
          }).angle(-30).scale(121.906).center([0, 48.5904]);
        }
        function Zo(Ue) {
          Ue = Ue || function(y) {
            var b = y.length === 6 ? (0, ft.A)({ type: "MultiPoint", coordinates: y }) : y[0];
            return (0, aa.A)().scale(1).translate([0, 0]).rotate([-b[0], -b[1]]);
          };
          var Qe = yo.map(function(y) {
            for (var b, R = y.map(bu), j = R.length, G = R[j - 1], ie = [], fe = 0; fe < j; ++fe) b = R[fe], ie.push(Il([0.9486832980505138 * G[0] + 0.31622776601683794 * b[0], 0.9486832980505138 * G[1] + 0.31622776601683794 * b[1], 0.9486832980505138 * G[2] + 0.31622776601683794 * b[2]]), Il([0.9486832980505138 * b[0] + 0.31622776601683794 * G[0], 0.9486832980505138 * b[1] + 0.31622776601683794 * G[1], 0.9486832980505138 * b[2] + 0.31622776601683794 * G[2]])), G = b;
            return ie;
          }), ht = [], Z = [-1, 0, 0, 1, 0, 1, 4, 5];
          Qe.forEach(function(y, b) {
            for (var R, j, G = yo[b], ie = G.length, fe = ht[b] = [], xe = 0; xe < ie; ++xe) Qe.push([G[xe], y[(2 * xe + 2) % (2 * ie)], y[(2 * xe + 1) % (2 * ie)]]), Z.push(b), fe.push((R = bu(y[(2 * xe + 2) % (2 * ie)]), j = bu(y[(2 * xe + 1) % (2 * ie)]), [R[1] * j[2] - R[2] * j[1], R[2] * j[0] - R[0] * j[2], R[0] * j[1] - R[1] * j[0]]));
          });
          var B = Qe.map(function(y) {
            return { project: Ue(y), face: y };
          });
          return Z.forEach(function(y, b) {
            var R = B[y];
            R && (R.children || (R.children = [])).push(B[b]);
          }), va(B[0], function(y, b) {
            var R = p(b), j = [R * p(y), R * k(y), k(b)], G = y < -D / 2 ? b < 0 ? 6 : 4 : y < 0 ? b < 0 ? 2 : 0 : y < D / 2 ? b < 0 ? 3 : 1 : b < 0 ? 7 : 5, ie = ht[G];
            return B[Fo(ie[0], j) < 0 ? 8 + 3 * G : Fo(ie[1], j) < 0 ? 8 + 3 * G + 1 : Fo(ie[2], j) < 0 ? 8 + 3 * G + 2 : G];
          }).angle(-30).scale(110.625).center([0, 45]);
        }
        function Fo(Ue, Qe) {
          for (var ht = 0, Z = Ue.length, B = 0; ht < Z; ++ht) B += Ue[ht] * Qe[ht];
          return B;
        }
        function Il(Ue) {
          return [h(Ue[1], Ue[0]) * T, F(c(-1, g(1, Ue[2]))) * T];
        }
        function bu(Ue) {
          var Qe = Ue[0] * z, ht = Ue[1] * z, Z = p(ht);
          return [Z * p(Qe), Z * k(Qe), k(ht)];
        }
        function Xo() {
        }
        function Ra(Ue, Qe) {
          var ht, Z = Qe.stream;
          if (!Z) throw new Error("invalid projection");
          switch (Ue && Ue.type) {
            case "Feature":
              ht = Sa;
              break;
            case "FeatureCollection":
              ht = No;
              break;
            default:
              ht = Bo;
          }
          return ht(Ue, Z);
        }
        function No(Ue, Qe) {
          return { type: "FeatureCollection", features: Ue.features.map(function(ht) {
            return Sa(ht, Qe);
          }) };
        }
        function Sa(Ue, Qe) {
          return { type: "Feature", id: Ue.id, properties: Ue.properties, geometry: Bo(Ue.geometry, Qe) };
        }
        function Bo(Ue, Qe) {
          if (!Ue) return null;
          if (Ue.type === "GeometryCollection") return function(Z, B) {
            return { type: "GeometryCollection", geometries: Z.geometries.map(function(y) {
              return Bo(y, B);
            }) };
          }(Ue, Qe);
          var ht;
          switch (Ue.type) {
            case "Point":
            case "MultiPoint":
              ht = jo;
              break;
            case "LineString":
            case "MultiLineString":
              ht = Dl;
              break;
            case "Polygon":
            case "MultiPolygon":
            case "Sphere":
              ht = Uo;
              break;
            default:
              return null;
          }
          return (0, Hn.A)(Ue, Qe(ht)), ht.result();
        }
        vu.invert = function(Ue, Qe) {
          return vt.invert(Ue / uc, Qe);
        };
        var _a = [], Do = [], jo = { point: function(Ue, Qe) {
          _a.push([Ue, Qe]);
        }, result: function() {
          var Ue = _a.length ? _a.length < 2 ? { type: "Point", coordinates: _a[0] } : { type: "MultiPoint", coordinates: _a } : null;
          return _a = [], Ue;
        } }, Dl = { lineStart: Xo, point: function(Ue, Qe) {
          _a.push([Ue, Qe]);
        }, lineEnd: function() {
          _a.length && (Do.push(_a), _a = []);
        }, result: function() {
          var Ue = Do.length ? Do.length < 2 ? { type: "LineString", coordinates: Do[0] } : { type: "MultiLineString", coordinates: Do } : null;
          return Do = [], Ue;
        } }, Uo = { polygonStart: Xo, lineStart: Xo, point: function(Ue, Qe) {
          _a.push([Ue, Qe]);
        }, lineEnd: function() {
          var Ue = _a.length;
          if (Ue) {
            do
              _a.push(_a[0].slice());
            while (++Ue < 4);
            Do.push(_a), _a = [];
          }
        }, polygonEnd: Xo, result: function() {
          if (!Do.length) return null;
          var Ue = [], Qe = [];
          return Do.forEach(function(ht) {
            (function(Z) {
              if ((B = Z.length) < 4) return !1;
              for (var B, y = 0, b = Z[B - 1][1] * Z[0][0] - Z[B - 1][0] * Z[0][1]; ++y < B; ) b += Z[y - 1][1] * Z[y][0] - Z[y - 1][0] * Z[y][1];
              return b <= 0;
            })(ht) ? Ue.push([ht]) : Qe.push(ht);
          }), Qe.forEach(function(ht) {
            var Z = ht[0];
            Ue.some(function(B) {
              if (function(y, b) {
                for (var R = b[0], j = b[1], G = !1, ie = 0, fe = y.length, xe = fe - 1; ie < fe; xe = ie++) {
                  var Te = y[ie], ze = Te[0], Ve = Te[1], ut = y[xe], gt = ut[0], wt = ut[1];
                  Ve > j ^ wt > j && R < (gt - ze) * (j - Ve) / (wt - Ve) + ze && (G = !G);
                }
                return G;
              }(B[0], Z)) return B.push(ht), !0;
            }) || Ue.push([ht]);
          }), Do = [], Ue.length ? Ue.length > 1 ? { type: "MultiPolygon", coordinates: Ue } : { type: "Polygon", coordinates: Ue[0] } : null;
        } };
        function Qs(Ue) {
          var Qe = Ue(L, 0)[0] - Ue(-L, 0)[0];
          function ht(Z, B) {
            var y = u(Z) < L, b = Ue(y ? Z : Z > 0 ? Z - D : Z + D, B), R = (b[0] - b[1]) * P, j = (b[0] + b[1]) * P;
            if (y) return [R, j];
            var G = Qe * P, ie = R > 0 ^ j > 0 ? -1 : 1;
            return [ie * R - w(j) * G, ie * j - w(R) * G];
          }
          return Ue.invert && (ht.invert = function(Z, B) {
            var y = (Z + B) * P, b = (B - Z) * P, R = u(y) < 0.5 * Qe && u(b) < 0.5 * Qe;
            if (!R) {
              var j = Qe * P, G = y > 0 ^ b > 0 ? -1 : 1, ie = -G * Z + (b > 0 ? 1 : -1) * j, fe = -G * B + (y > 0 ? 1 : -1) * j;
              y = (-ie - fe) * P, b = (ie - fe) * P;
            }
            var xe = Ue.invert(y, b);
            return R || (xe[0] += y > 0 ? D : -D), xe;
          }), (0, l.A)(ht).rotate([-90, -90, 45]).clipAngle(179.999);
        }
        function os() {
          return Qs(wr).scale(176.423);
        }
        function Bu() {
          return Qs(Gn).scale(111.48);
        }
        function Ll(Ue, Qe) {
          if (!(0 <= (Qe = +Qe) && Qe <= 20)) throw new Error("invalid digits");
          function ht(G) {
            var ie = G.length, fe = 2, xe = new Array(ie);
            for (xe[0] = +G[0].toFixed(Qe), xe[1] = +G[1].toFixed(Qe); fe < ie; ) xe[fe] = G[fe], ++fe;
            return xe;
          }
          function Z(G) {
            return G.map(ht);
          }
          function B(G) {
            for (var ie = ht(G[0]), fe = [ie], xe = 1; xe < G.length; xe++) {
              var Te = ht(G[xe]);
              (Te.length > 2 || Te[0] != ie[0] || Te[1] != ie[1]) && (fe.push(Te), ie = Te);
            }
            return fe.length === 1 && G.length > 1 && fe.push(ht(G[G.length - 1])), fe;
          }
          function y(G) {
            return G.map(B);
          }
          function b(G) {
            if (G == null) return G;
            var ie;
            switch (G.type) {
              case "GeometryCollection":
                ie = { type: "GeometryCollection", geometries: G.geometries.map(b) };
                break;
              case "Point":
                ie = { type: "Point", coordinates: ht(G.coordinates) };
                break;
              case "MultiPoint":
                ie = { type: G.type, coordinates: Z(G.coordinates) };
                break;
              case "LineString":
                ie = { type: G.type, coordinates: B(G.coordinates) };
                break;
              case "MultiLineString":
              case "Polygon":
                ie = { type: G.type, coordinates: y(G.coordinates) };
                break;
              case "MultiPolygon":
                ie = { type: "MultiPolygon", coordinates: G.coordinates.map(y) };
                break;
              default:
                return G;
            }
            return G.bbox != null && (ie.bbox = G.bbox), ie;
          }
          function R(G) {
            var ie = { type: "Feature", properties: G.properties, geometry: b(G.geometry) };
            return G.id != null && (ie.id = G.id), G.bbox != null && (ie.bbox = G.bbox), ie;
          }
          if (Ue != null) switch (Ue.type) {
            case "Feature":
              return R(Ue);
            case "FeatureCollection":
              var j = { type: "FeatureCollection", features: Ue.features.map(R) };
              return Ue.bbox != null && (j.bbox = Ue.bbox), j;
            default:
              return b(Ue);
          }
          return Ue;
        }
        function Pl(Ue) {
          var Qe = k(Ue);
          function ht(Z, B) {
            var y = Qe ? S(Z * Qe / 2) / Qe : Z / 2;
            if (!B) return [2 * y, -Ue];
            var b = 2 * i(y * k(B)), R = 1 / S(B);
            return [k(b) * R, B + (1 - p(b)) * R - Ue];
          }
          return ht.invert = function(Z, B) {
            if (u(B += Ue) < A) return [Qe ? 2 * i(Qe * Z / 2) / Qe : Z, 0];
            var y, b = Z * Z + B * B, R = 0, j = 10;
            do {
              var G = S(R), ie = 1 / p(R), fe = b - 2 * B * R + R * R;
              R -= y = (G * fe + 2 * (R - B)) / (2 + fe * ie * ie + 2 * (R - B) * G);
            } while (u(y) > A && --j > 0);
            var xe = Z * (G = S(R)), Te = S(u(B) < u(R + 1 / G) ? 0.5 * F(xe) : 0.5 * U(xe) + D / 4) / k(R);
            return [Qe ? 2 * i(Qe * Te) / Qe : 2 * Te, R];
          }, ht;
        }
        function Lo() {
          return Re(Pl).scale(131.215);
        }
        var Ca = [[0.9986, -0.062], [1, 0], [0.9986, 0.062], [0.9954, 0.124], [0.99, 0.186], [0.9822, 0.248], [0.973, 0.31], [0.96, 0.372], [0.9427, 0.434], [0.9216, 0.4958], [0.8962, 0.5571], [0.8679, 0.6176], [0.835, 0.6769], [0.7986, 0.7346], [0.7597, 0.7903], [0.7186, 0.8435], [0.6732, 0.8936], [0.6213, 0.9394], [0.5722, 0.9761], [0.5322, 1]];
        function Ol(Ue, Qe) {
          var ht, Z = g(18, 36 * u(Qe) / D), B = d(Z), y = Z - B, b = (ht = Ca[B])[0], R = ht[1], j = (ht = Ca[++B])[0], G = ht[1], ie = (ht = Ca[g(19, ++B)])[0], fe = ht[1];
          return [Ue * (j + y * (ie - b) / 2 + y * y * (ie - 2 * j + b) / 2), (Qe > 0 ? L : -L) * (G + y * (fe - R) / 2 + y * y * (fe - 2 * G + R) / 2)];
        }
        function xi() {
          return (0, l.A)(Ol).scale(152.63);
        }
        function cc(Ue, Qe) {
          var ht = function(b) {
            function R(j, G) {
              var ie = p(G), fe = (b - 1) / (b - ie * p(j));
              return [fe * ie * k(j), fe * k(G)];
            }
            return R.invert = function(j, G) {
              var ie = j * j + G * G, fe = V(ie), xe = (b - V(1 - ie * (b + 1) / (b - 1))) / ((b - 1) / fe + fe / (b - 1));
              return [h(j * xe, fe * V(1 - xe * xe)), fe ? F(G * xe / fe) : 0];
            }, R;
          }(Ue);
          if (!Qe) return ht;
          var Z = p(Qe), B = k(Qe);
          function y(b, R) {
            var j = ht(b, R), G = j[1], ie = G * B / (Ue - 1) + Z;
            return [j[0] * Z / ie, G / ie];
          }
          return y.invert = function(b, R) {
            var j = (Ue - 1) / (Ue - 1 - R * B);
            return ht.invert(j * b, j * R * Z);
          }, y;
        }
        function Dc() {
          var Ue = 2, Qe = 0, ht = (0, l.U)(cc), Z = ht(Ue, Qe);
          return Z.distance = function(B) {
            return arguments.length ? ht(Ue = +B, Qe) : Ue;
          }, Z.tilt = function(B) {
            return arguments.length ? ht(Ue, Qe = B * z) : Qe * T;
          }, Z.scale(432.147).clipAngle(U(1 / Ue) * T - 1e-6);
        }
        Ca.forEach(function(Ue) {
          Ue[1] *= 1.0144;
        }), Ol.invert = function(Ue, Qe) {
          var ht = Qe / L, Z = 90 * ht, B = g(18, u(Z / 5)), y = c(0, d(B));
          do {
            var b = Ca[y][1], R = Ca[y + 1][1], j = Ca[g(19, y + 2)][1], G = j - b, ie = j - 2 * R + b, fe = 2 * (u(ht) - R) / G, xe = ie / G, Te = fe * (1 - xe * fe * (1 - 2 * xe * fe));
            if (Te >= 0 || y === 1) {
              Z = (Qe >= 0 ? 5 : -5) * (Te + B);
              var ze, Ve = 50;
              do
                Te = (B = g(18, u(Z) / 5)) - (y = d(B)), b = Ca[y][1], R = Ca[y + 1][1], j = Ca[g(19, y + 2)][1], Z -= (ze = (Qe >= 0 ? L : -L) * (R + Te * (j - b) / 2 + Te * Te * (j - 2 * R + b) / 2) - Qe) * T;
              while (u(ze) > C && --Ve > 0);
              break;
            }
          } while (--y >= 0);
          var ut = Ca[y][0], gt = Ca[y + 1][0], wt = Ca[g(19, y + 2)][0];
          return [Ue / (gt + Te * (wt - ut) / 2 + Te * Te * (wt - 2 * gt + ut) / 2), Z * z];
        };
        var xl = 1e-4, zl = 1e4, Rl = -180, ju = Rl + xl, ti = 180, js = ti - xl, Fl = -90, Fa = Fl + xl, Us = 90, ss = Us - xl;
        function el(Ue) {
          return Ue.length > 0;
        }
        function ks(Ue) {
          return Ue === Fl || Ue === Us ? [0, Ue] : [Rl, (Qe = Ue, Math.floor(Qe * zl) / zl)];
          var Qe;
        }
        function iu(Ue) {
          var Qe = Ue[0], ht = Ue[1], Z = !1;
          return Qe <= ju ? (Qe = Rl, Z = !0) : Qe >= js && (Qe = ti, Z = !0), ht <= Fa ? (ht = Fl, Z = !0) : ht >= ss && (ht = Us, Z = !0), Z ? [Qe, ht] : Ue;
        }
        function tl(Ue) {
          return Ue.map(iu);
        }
        function Os(Ue, Qe, ht) {
          for (var Z = 0, B = Ue.length; Z < B; ++Z) {
            var y = Ue[Z].slice();
            ht.push({ index: -1, polygon: Qe, ring: y });
            for (var b = 0, R = y.length; b < R; ++b) {
              var j = y[b], G = j[0], ie = j[1];
              if (G <= ju || G >= js || ie <= Fa || ie >= ss) {
                y[b] = iu(j);
                for (var fe = b + 1; fe < R; ++fe) {
                  var xe = y[fe], Te = xe[0], ze = xe[1];
                  if (Te > ju && Te < js && ze > Fa && ze < ss) break;
                }
                if (fe === b + 1) continue;
                if (b) {
                  var Ve = { index: -1, polygon: Qe, ring: y.slice(0, b + 1) };
                  Ve.ring[Ve.ring.length - 1] = ks(ie), ht[ht.length - 1] = Ve;
                } else ht.pop();
                if (fe >= R) break;
                ht.push({ index: -1, polygon: Qe, ring: y = y.slice(fe - 1) }), y[0] = ks(y[0][1]), b = -1, R = y.length;
              }
            }
          }
        }
        function Vs(Ue) {
          var Qe, ht, Z, B, y, b, R = Ue.length, j = {}, G = {};
          for (Qe = 0; Qe < R; ++Qe) Z = (ht = Ue[Qe]).ring[0], y = ht.ring[ht.ring.length - 1], Z[0] !== y[0] || Z[1] !== y[1] ? (ht.index = Qe, j[Z] = G[y] = ht) : (ht.polygon.push(ht.ring), Ue[Qe] = null);
          for (Qe = 0; Qe < R; ++Qe) if (ht = Ue[Qe]) {
            if (Z = ht.ring[0], y = ht.ring[ht.ring.length - 1], B = G[Z], b = j[y], delete j[Z], delete G[y], Z[0] === y[0] && Z[1] === y[1]) {
              ht.polygon.push(ht.ring);
              continue;
            }
            B ? (delete G[Z], delete j[B.ring[0]], B.ring.pop(), Ue[B.index] = null, ht = { index: -1, polygon: B.polygon, ring: B.ring.concat(ht.ring) }, B === b ? ht.polygon.push(ht.ring) : (ht.index = R++, Ue.push(j[ht.ring[0]] = G[ht.ring[ht.ring.length - 1]] = ht))) : b ? (delete j[y], delete G[b.ring[b.ring.length - 1]], ht.ring.pop(), ht = { index: R++, polygon: b.polygon, ring: ht.ring.concat(b.ring) }, Ue[b.index] = null, Ue.push(j[ht.ring[0]] = G[ht.ring[ht.ring.length - 1]] = ht)) : (ht.ring.push(ht.ring[0]), ht.polygon.push(ht.ring));
          }
        }
        function di(Ue) {
          var Qe = { type: "Feature", geometry: xa(Ue.geometry) };
          return Ue.id != null && (Qe.id = Ue.id), Ue.bbox != null && (Qe.bbox = Ue.bbox), Ue.properties != null && (Qe.properties = Ue.properties), Qe;
        }
        function xa(Ue) {
          if (Ue == null) return Ue;
          var Qe, ht, Z, B;
          switch (Ue.type) {
            case "GeometryCollection":
              Qe = { type: "GeometryCollection", geometries: Ue.geometries.map(xa) };
              break;
            case "Point":
              Qe = { type: "Point", coordinates: iu(Ue.coordinates) };
              break;
            case "MultiPoint":
            case "LineString":
              Qe = { type: Ue.type, coordinates: tl(Ue.coordinates) };
              break;
            case "MultiLineString":
              Qe = { type: "MultiLineString", coordinates: Ue.coordinates.map(tl) };
              break;
            case "Polygon":
              var y = [];
              Os(Ue.coordinates, y, ht = []), Vs(ht), Qe = { type: "Polygon", coordinates: y };
              break;
            case "MultiPolygon":
              ht = [], Z = -1, B = Ue.coordinates.length;
              for (var b = new Array(B); ++Z < B; ) Os(Ue.coordinates[Z], b[Z] = [], ht);
              Vs(ht), Qe = { type: "MultiPolygon", coordinates: b.filter(el) };
              break;
            default:
              return Ue;
          }
          return Ue.bbox != null && (Qe.bbox = Ue.bbox), Qe;
        }
        function vo(Ue) {
          if (Ue == null) return Ue;
          switch (Ue.type) {
            case "Feature":
              return di(Ue);
            case "FeatureCollection":
              var Qe = { type: "FeatureCollection", features: Ue.features.map(di) };
              return Ue.bbox != null && (Qe.bbox = Ue.bbox), Qe;
            default:
              return xa(Ue);
          }
        }
        function Ts(Ue, Qe) {
          var ht = S(Qe / 2), Z = k(E * ht);
          return [Ue * (0.74482 - 0.34588 * Z * Z), 1.70711 * ht];
        }
        function nl() {
          return (0, l.A)(Ts).scale(146.153);
        }
        function Vo(Ue, Qe, ht) {
          var Z = (0, An.A)(Qe, ht), B = Z(0.5), y = (0, _t.A)([-B[0], -B[1]])(Qe), b = Z.distance / 2, R = -F(k(y[1] * z) / k(b)), j = [-B[0], -B[1], -(y[0] > 0 ? D - R : R) * T], G = (0, l.A)(Ue(b)).rotate(j), ie = (0, _t.A)(j), fe = G.center;
          return delete G.rotate, G.center = function(xe) {
            return arguments.length ? fe(ie(xe)) : ie.invert(fe());
          }, G.clipAngle(90);
        }
        function Qu(Ue) {
          var Qe = p(Ue);
          function ht(Z, B) {
            var y = (0, aa.T)(Z, B);
            return y[0] *= Qe, y;
          }
          return ht.invert = function(Z, B) {
            return aa.T.invert(Z / Qe, B);
          }, ht;
        }
        function li() {
          return ls([-158, 21.5], [-77, 39]).clipAngle(60).scale(400);
        }
        function ls(Ue, Qe) {
          return Vo(Qu, Ue, Qe);
        }
        function ma(Ue) {
          if (!(Ue *= 2)) return ae.j;
          var Qe = -Ue / 2, ht = -Qe, Z = Ue * Ue, B = S(ht), y = 0.5 / k(ht);
          function b(R, j) {
            var G = U(p(j) * p(R - Qe)), ie = U(p(j) * p(R - ht));
            return [((G *= G) - (ie *= ie)) / (2 * Ue), (j < 0 ? -1 : 1) * V(4 * Z * ie - (Z - G + ie) * (Z - G + ie)) / (2 * Ue)];
          }
          return b.invert = function(R, j) {
            var G, ie, fe = j * j, xe = p(V(fe + (G = R + Qe) * G)), Te = p(V(fe + (G = R + ht) * G));
            return [h(ie = xe - Te, G = (xe + Te) * B), (j < 0 ? -1 : 1) * U(V(G * G + ie * ie) * y)];
          }, b;
        }
        function au() {
          return $s([-158, 21.5], [-77, 39]).clipAngle(130).scale(122.571);
        }
        function $s(Ue, Qe) {
          return Vo(ma, Ue, Qe);
        }
        function bl(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          var ht = u(Qe / L), Z = F(ht);
          if (u(Ue) < A || u(u(Qe) - L) < A) return [0, w(Qe) * D * S(Z / 2)];
          var B = p(Z), y = u(D / Ue - Ue / D) / 2, b = y * y, R = B / (ht + B - 1), j = R * (2 / ht - 1), G = j * j, ie = G + b, fe = R - G, xe = b + R;
          return [w(Ue) * D * (y * fe + V(b * fe * fe - ie * (R * R - G))) / ie, w(Qe) * D * (j * xe - y * V((b + 1) * ie - xe * xe)) / ie];
        }
        function Lc() {
          return (0, l.A)(bl).scale(79.4183);
        }
        function ec(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          var ht = u(Qe / L), Z = F(ht);
          if (u(Ue) < A || u(u(Qe) - L) < A) return [0, w(Qe) * D * S(Z / 2)];
          var B = p(Z), y = u(D / Ue - Ue / D) / 2, b = y * y, R = B * (V(1 + b) - y * B) / (1 + b * ht * ht);
          return [w(Ue) * D * R, w(Qe) * D * V(1 - R * (2 * y + R))];
        }
        function rl() {
          return (0, l.A)(ec).scale(79.4183);
        }
        function Na(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          var ht = Qe / L, Z = F(ht);
          if (u(Ue) < A || u(u(Qe) - L) < A) return [0, D * S(Z / 2)];
          var B = (D / Ue - Ue / D) / 2, y = ht / (1 + p(Z));
          return [D * (w(Ue) * V(B * B + 1 - y * y) - B), D * y];
        }
        function il() {
          return (0, l.A)(Na).scale(79.4183);
        }
        function ni(Ue, Qe) {
          if (!Qe) return [Ue, 0];
          var ht = u(Qe);
          if (!Ue || ht === L) return [0, Qe];
          var Z = ht / L, B = Z * Z, y = (8 * Z - B * (B + 2) - 5) / (2 * B * (Z - 1)), b = y * y, R = Z * y, j = B + b + 2 * R, G = Z + 3 * y, ie = Ue / L, fe = ie + 1 / ie, xe = w(u(Ue) - L) * V(fe * fe - 4), Te = xe * xe, ze = (xe * (j + b - 1) + 2 * V(j * (B + b * Te - 1) + (1 - B) * (B * (G * G + 4 * b) + 12 * R * b + 4 * b * b))) / (4 * j + Te);
          return [w(Ue) * L * ze, w(Qe) * L * V(1 + xe * u(ze) - ze * ze)];
        }
        function Ci() {
          return (0, l.A)(ni).scale(127.16);
        }
        function us(Ue, Qe, ht, Z) {
          var B = D / 3;
          Ue = c(Ue, A), Qe = c(Qe, A), Ue = g(Ue, L), Qe = g(Qe, D - A), ht = c(ht, 0), ht = g(ht, 100 - A);
          var y = (Z = c(Z, A)) / 100, b = U((ht / 100 + 1) * p(B)) / B, R = k(Ue) / k(b * L), j = Qe / D, G = V(y * k(Ue / 2) / k(Qe / 2));
          return function(ie, fe, xe, Te, ze) {
            function Ve(ut, gt) {
              var wt = xe * k(Te * gt), Et = V(1 - wt * wt), zt = V(2 / (1 + Et * p(ut *= ze)));
              return [ie * Et * zt * k(ut), fe * wt * zt];
            }
            return Ve.invert = function(ut, gt) {
              var wt = ut / ie, Et = gt / fe, zt = V(wt * wt + Et * Et), It = 2 * F(zt / 2);
              return [h(ut * S(It), ie * zt) / ze, zt && F(gt * k(It) / (fe * xe * zt)) / Te];
            }, Ve;
          }(G / V(j * R * b), 1 / (G * V(j * R * b)), R, b, j);
        }
        function al() {
          var Ue = 65 * z, Qe = 60 * z, ht = 20, Z = 200, B = (0, l.U)(us), y = B(Ue, Qe, ht, Z);
          return y.poleline = function(b) {
            return arguments.length ? B(Ue = +b * z, Qe, ht, Z) : Ue * T;
          }, y.parallels = function(b) {
            return arguments.length ? B(Ue, Qe = +b * z, ht, Z) : Qe * T;
          }, y.inflation = function(b) {
            return arguments.length ? B(Ue, Qe, ht = +b, Z) : ht;
          }, y.ratio = function(b) {
            return arguments.length ? B(Ue, Qe, ht, Z = +b) : Z;
          }, y.scale(163.775);
        }
        function ou() {
          return al().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633);
        }
        Ts.invert = function(Ue, Qe) {
          var ht = Qe / 1.70711, Z = k(E * ht);
          return [Ue / (0.74482 - 0.34588 * Z * Z), 2 * i(ht)];
        }, bl.invert = function(Ue, Qe) {
          if (u(Qe) < A) return [Ue, 0];
          if (u(Ue) < A) return [0, L * k(2 * i(Qe / D))];
          var ht = (Ue /= D) * Ue, Z = (Qe /= D) * Qe, B = ht + Z, y = B * B, b = -u(Qe) * (1 + B), R = b - 2 * Z + ht, j = -2 * b + 1 + 2 * Z + y, G = Z / j + (2 * R * R * R / (j * j * j) - 9 * b * R / (j * j)) / 27, ie = (b - R * R / (3 * j)) / j, fe = 2 * V(-ie / 3), xe = U(3 * G / (ie * fe)) / 3;
          return [D * (B - 1 + V(1 + 2 * (ht - Z) + y)) / (2 * Ue), w(Qe) * D * (-fe * p(xe + D / 3) - R / (3 * j))];
        }, ec.invert = function(Ue, Qe) {
          if (!Ue) return [0, L * k(2 * i(Qe / D))];
          var ht = u(Ue / D), Z = (1 - ht * ht - (Qe /= D) * Qe) / (2 * ht), B = V(Z * Z + 1);
          return [w(Ue) * D * (B - Z), w(Qe) * L * k(2 * h(V((1 - 2 * Z * ht) * (Z + B) - ht), V(B + Z + ht)))];
        }, Na.invert = function(Ue, Qe) {
          if (!Qe) return [Ue, 0];
          var ht = Qe / D, Z = (D * D * (1 - ht * ht) - Ue * Ue) / (2 * D * Ue);
          return [Ue ? D * (w(Ue) * V(Z * Z + 1) - Z) : 0, L * k(2 * i(ht))];
        }, ni.invert = function(Ue, Qe) {
          var ht;
          if (!Ue || !Qe) return [Ue, Qe];
          Qe /= D;
          var Z = w(Ue) * Ue / L, B = (Z * Z - 1 + 4 * Qe * Qe) / u(Z), y = B * B, b = 2 * Qe, R = 50;
          do {
            var j = b * b, G = (8 * b - j * (j + 2) - 5) / (2 * j * (b - 1)), ie = (3 * b - j * b - 10) / (2 * j * b), fe = G * G, xe = b * G, Te = b + G, ze = Te * Te, Ve = b + 3 * G, ut = -2 * Te * (4 * xe * fe + (1 - 4 * j + 3 * j * j) * (1 + ie) + fe * (14 * j - 6 - y + (8 * j - 8 - 2 * y) * ie) + xe * (12 * j - 8 + (10 * j - 10 - y) * ie)), gt = V(ze * (j + fe * y - 1) + (1 - j) * (j * (Ve * Ve + 4 * fe) + fe * (12 * xe + 4 * fe)));
            b -= ht = (B * (ze + fe - 1) + 2 * gt - Z * (4 * ze + y)) / (B * (2 * G * ie + 2 * Te * (1 + ie)) + ut / gt - 8 * Te * (B * (-1 + fe + ze) + 2 * gt) * (1 + ie) / (y + 4 * ze));
          } while (ht > A && --R > 0);
          return [w(Ue) * (V(B * B + 4) + B) * D / 4, L * b];
        };
        var Za = 4 * D + 3 * V(3), su = 2 * V(2 * D * V(3) / Za), na = Ee(su * V(3) / D, su, Za / 6);
        function tc() {
          return (0, l.A)(na).scale(176.84);
        }
        function bi(Ue, Qe) {
          return [Ue * V(1 - 3 * Qe * Qe / (D * D)), Qe];
        }
        function ci() {
          return (0, l.A)(bi).scale(152.63);
        }
        function He(Ue, Qe) {
          var ht = p(Qe), Z = p(Ue) * ht, B = 1 - Z, y = p(Ue = h(k(Ue) * ht, -k(Qe))), b = k(Ue);
          return [b * (ht = V(1 - Z * Z)) - y * B, -y * ht - b * B];
        }
        function Pe() {
          return (0, l.A)(He).rotate([0, -90, 45]).scale(124.75).clipAngle(179.999);
        }
        function it(Ue, Qe) {
          var ht = Y(Ue, Qe);
          return [(ht[0] + Ue / L) / 2, (ht[1] + Qe) / 2];
        }
        function bt() {
          return (0, l.A)(it).scale(158.837);
        }
        bi.invert = function(Ue, Qe) {
          return [Ue / V(1 - 3 * Qe * Qe / (D * D)), Qe];
        }, He.invert = function(Ue, Qe) {
          var ht = (Ue * Ue + Qe * Qe) / -2, Z = V(-ht * (2 + ht)), B = Qe * ht + Ue * Z, y = Ue * ht - Qe * Z, b = V(y * y + B * B);
          return [h(Z * B, b * (1 + ht)), b ? -F(Z * y / b) : 0];
        }, it.invert = function(Ue, Qe) {
          var ht = Ue, Z = Qe, B = 25;
          do {
            var y, b = p(Z), R = k(Z), j = k(2 * Z), G = R * R, ie = b * b, fe = k(ht), xe = p(ht / 2), Te = k(ht / 2), ze = Te * Te, Ve = 1 - ie * xe * xe, ut = Ve ? U(b * xe) * V(y = 1 / Ve) : y = 0, gt = 0.5 * (2 * ut * b * Te + ht / L) - Ue, wt = 0.5 * (ut * R + Z) - Qe, Et = 0.5 * y * (ie * ze + ut * b * xe * G) + 0.5 / L, zt = y * (fe * j / 4 - ut * R * Te), It = 0.125 * y * (j * Te - ut * R * ie * fe), jt = 0.5 * y * (G * xe + ut * ze * b) + 0.5, Lt = zt * It - jt * Et, Zt = (wt * zt - gt * jt) / Lt, Qt = (gt * It - wt * Et) / Lt;
            ht -= Zt, Z -= Qt;
          } while ((u(Zt) > A || u(Qt) > A) && --B > 0);
          return [ht, Z];
        };
      }, 49353: function(o, s, n) {
        function l() {
          return new u();
        }
        function u() {
          this.reset();
        }
        n.d(s, { A: function() {
          return l;
        } }), u.prototype = { constructor: u, reset: function() {
          this.s = this.t = 0;
        }, add: function(p) {
          h(i, p, this.t), h(this, i.s, this.s), this.s ? this.t += i.t : this.s = i.t;
        }, valueOf: function() {
          return this.s;
        } };
        var i = new u();
        function h(p, _, d) {
          var f = p.s = _ + d, c = f - _, g = f - c;
          p.t = _ - g + (d - c);
        }
      }, 43976: function(o, s, n) {
        n.d(s, { Ay: function() {
          return C;
        }, B0: function() {
          return g;
        }, Y7: function() {
          return x;
        } });
        var l, u, i, h, p, _ = n(49353), d = n(61323), f = n(53341), c = n(20465), g = (0, _.A)(), m = (0, _.A)(), x = { point: f.A, lineStart: f.A, lineEnd: f.A, polygonStart: function() {
          g.reset(), x.lineStart = w, x.lineEnd = k;
        }, polygonEnd: function() {
          var D = +g;
          m.add(D < 0 ? d.FA + D : D), this.lineStart = this.lineEnd = this.point = f.A;
        }, sphere: function() {
          m.add(d.FA);
        } };
        function w() {
          x.point = S;
        }
        function k() {
          A(l, u);
        }
        function S(D, L) {
          x.point = A, l = D, u = L, D *= d.F2, L *= d.F2, i = D, h = (0, d.gn)(L = L / 2 + d.gz), p = (0, d.F8)(L);
        }
        function A(D, L) {
          D *= d.F2, L = (L *= d.F2) / 2 + d.gz;
          var E = D - i, P = E >= 0 ? 1 : -1, I = P * E, M = (0, d.gn)(L), O = (0, d.F8)(L), T = p * O, z = h * M + T * (0, d.gn)(I), F = T * P * (0, d.F8)(I);
          g.add((0, d.FP)(F, z)), i = D, h = M, p = O;
        }
        function C(D) {
          return m.reset(), (0, c.A)(D, x), 2 * m;
        }
      }, 43212: function(o, s, n) {
        n.d(s, { A: function() {
          return U;
        } });
        var l, u, i, h, p, _, d, f, c, g, m = n(49353), x = n(43976), w = n(20375), k = n(61323), S = n(20465), A = (0, m.A)(), C = { point: D, lineStart: E, lineEnd: P, polygonStart: function() {
          C.point = I, C.lineStart = M, C.lineEnd = O, A.reset(), x.Y7.polygonStart();
        }, polygonEnd: function() {
          x.Y7.polygonEnd(), C.point = D, C.lineStart = E, C.lineEnd = P, x.B0 < 0 ? (l = -(i = 180), u = -(h = 90)) : A > k.Ni ? h = 90 : A < -k.Ni && (u = -90), g[0] = l, g[1] = i;
        }, sphere: function() {
          l = -(i = 180), u = -(h = 90);
        } };
        function D(V, $) {
          c.push(g = [l = V, i = V]), $ < u && (u = $), $ > h && (h = $);
        }
        function L(V, $) {
          var q = (0, w.jf)([V * k.F2, $ * k.F2]);
          if (f) {
            var K = (0, w.r8)(f, q), re = [K[1], -K[0], 0], Y = (0, w.r8)(re, K);
            (0, w.Cx)(Y), Y = (0, w.EV)(Y);
            var te, ee = V - p, X = ee > 0 ? 1 : -1, Q = Y[0] * k.uj * X, ue = (0, k.tn)(ee) > 180;
            ue ^ (X * p < Q && Q < X * V) ? (te = Y[1] * k.uj) > h && (h = te) : ue ^ (X * p < (Q = (Q + 360) % 360 - 180) && Q < X * V) ? (te = -Y[1] * k.uj) < u && (u = te) : ($ < u && (u = $), $ > h && (h = $)), ue ? V < p ? T(l, V) > T(l, i) && (i = V) : T(V, i) > T(l, i) && (l = V) : i >= l ? (V < l && (l = V), V > i && (i = V)) : V > p ? T(l, V) > T(l, i) && (i = V) : T(V, i) > T(l, i) && (l = V);
          } else c.push(g = [l = V, i = V]);
          $ < u && (u = $), $ > h && (h = $), f = q, p = V;
        }
        function E() {
          C.point = L;
        }
        function P() {
          g[0] = l, g[1] = i, C.point = D, f = null;
        }
        function I(V, $) {
          if (f) {
            var q = V - p;
            A.add((0, k.tn)(q) > 180 ? q + (q > 0 ? 360 : -360) : q);
          } else _ = V, d = $;
          x.Y7.point(V, $), L(V, $);
        }
        function M() {
          x.Y7.lineStart();
        }
        function O() {
          I(_, d), x.Y7.lineEnd(), (0, k.tn)(A) > k.Ni && (l = -(i = 180)), g[0] = l, g[1] = i, f = null;
        }
        function T(V, $) {
          return ($ -= V) < 0 ? $ + 360 : $;
        }
        function z(V, $) {
          return V[0] - $[0];
        }
        function F(V, $) {
          return V[0] <= V[1] ? V[0] <= $ && $ <= V[1] : $ < V[0] || V[1] < $;
        }
        function U(V) {
          var $, q, K, re, Y, te, ee;
          if (h = i = -(l = u = 1 / 0), c = [], (0, S.A)(V, C), q = c.length) {
            for (c.sort(z), $ = 1, Y = [K = c[0]]; $ < q; ++$) F(K, (re = c[$])[0]) || F(K, re[1]) ? (T(K[0], re[1]) > T(K[0], K[1]) && (K[1] = re[1]), T(re[0], K[1]) > T(K[0], K[1]) && (K[0] = re[0])) : Y.push(K = re);
            for (te = -1 / 0, $ = 0, K = Y[q = Y.length - 1]; $ <= q; K = re, ++$) re = Y[$], (ee = T(K[1], re[0])) > te && (te = ee, l = re[0], i = K[1]);
          }
          return c = g = null, l === 1 / 0 || u === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[l, u], [i, h]];
        }
      }, 20375: function(o, s, n) {
        n.d(s, { Cx: function() {
          return f;
        }, EV: function() {
          return u;
        }, W8: function() {
          return h;
        }, ep: function() {
          return _;
        }, jf: function() {
          return i;
        }, ly: function() {
          return d;
        }, r8: function() {
          return p;
        } });
        var l = n(61323);
        function u(c) {
          return [(0, l.FP)(c[1], c[0]), (0, l.qR)(c[2])];
        }
        function i(c) {
          var g = c[0], m = c[1], x = (0, l.gn)(m);
          return [x * (0, l.gn)(g), x * (0, l.F8)(g), (0, l.F8)(m)];
        }
        function h(c, g) {
          return c[0] * g[0] + c[1] * g[1] + c[2] * g[2];
        }
        function p(c, g) {
          return [c[1] * g[2] - c[2] * g[1], c[2] * g[0] - c[0] * g[2], c[0] * g[1] - c[1] * g[0]];
        }
        function _(c, g) {
          c[0] += g[0], c[1] += g[1], c[2] += g[2];
        }
        function d(c, g) {
          return [c[0] * g, c[1] * g, c[2] * g];
        }
        function f(c) {
          var g = (0, l.RZ)(c[0] * c[0] + c[1] * c[1] + c[2] * c[2]);
          c[0] /= g, c[1] /= g, c[2] /= g;
        }
      }, 30021: function(o, s, n) {
        n.d(s, { A: function() {
          return q;
        } });
        var l, u, i, h, p, _, d, f, c, g, m, x, w, k, S, A, C = n(61323), D = n(53341), L = n(20465), E = { sphere: D.A, point: P, lineStart: M, lineEnd: z, polygonStart: function() {
          E.lineStart = F, E.lineEnd = U;
        }, polygonEnd: function() {
          E.lineStart = M, E.lineEnd = z;
        } };
        function P(K, re) {
          K *= C.F2, re *= C.F2;
          var Y = (0, C.gn)(re);
          I(Y * (0, C.gn)(K), Y * (0, C.F8)(K), (0, C.F8)(re));
        }
        function I(K, re, Y) {
          ++l, i += (K - i) / l, h += (re - h) / l, p += (Y - p) / l;
        }
        function M() {
          E.point = O;
        }
        function O(K, re) {
          K *= C.F2, re *= C.F2;
          var Y = (0, C.gn)(re);
          k = Y * (0, C.gn)(K), S = Y * (0, C.F8)(K), A = (0, C.F8)(re), E.point = T, I(k, S, A);
        }
        function T(K, re) {
          K *= C.F2, re *= C.F2;
          var Y = (0, C.gn)(re), te = Y * (0, C.gn)(K), ee = Y * (0, C.F8)(K), X = (0, C.F8)(re), Q = (0, C.FP)((0, C.RZ)((Q = S * X - A * ee) * Q + (Q = A * te - k * X) * Q + (Q = k * ee - S * te) * Q), k * te + S * ee + A * X);
          u += Q, _ += Q * (k + (k = te)), d += Q * (S + (S = ee)), f += Q * (A + (A = X)), I(k, S, A);
        }
        function z() {
          E.point = P;
        }
        function F() {
          E.point = V;
        }
        function U() {
          $(x, w), E.point = P;
        }
        function V(K, re) {
          x = K, w = re, K *= C.F2, re *= C.F2, E.point = $;
          var Y = (0, C.gn)(re);
          k = Y * (0, C.gn)(K), S = Y * (0, C.F8)(K), A = (0, C.F8)(re), I(k, S, A);
        }
        function $(K, re) {
          K *= C.F2, re *= C.F2;
          var Y = (0, C.gn)(re), te = Y * (0, C.gn)(K), ee = Y * (0, C.F8)(K), X = (0, C.F8)(re), Q = S * X - A * ee, ue = A * te - k * X, ce = k * ee - S * te, he = (0, C.RZ)(Q * Q + ue * ue + ce * ce), de = (0, C.qR)(he), ne = he && -de / he;
          c += ne * Q, g += ne * ue, m += ne * ce, u += de, _ += de * (k + (k = te)), d += de * (S + (S = ee)), f += de * (A + (A = X)), I(k, S, A);
        }
        function q(K) {
          l = u = i = h = p = _ = d = f = c = g = m = 0, (0, L.A)(K, E);
          var re = c, Y = g, te = m, ee = re * re + Y * Y + te * te;
          return ee < C.$t && (re = _, Y = d, te = f, u < C.Ni && (re = i, Y = h, te = p), (ee = re * re + Y * Y + te * te) < C.$t) ? [NaN, NaN] : [(0, C.FP)(Y, re) * C.uj, (0, C.qR)(te / (0, C.RZ)(ee)) * C.uj];
        }
      }, 39127: function(o, s, n) {
        n.d(s, { J: function() {
          return p;
        }, A: function() {
          return d;
        } });
        var l = n(20375);
        function u(f) {
          return function() {
            return f;
          };
        }
        var i = n(61323), h = n(30915);
        function p(f, c, g, m, x, w) {
          if (g) {
            var k = (0, i.gn)(c), S = (0, i.F8)(c), A = m * g;
            x == null ? (x = c + m * i.FA, w = c - A / 2) : (x = _(k, x), w = _(k, w), (m > 0 ? x < w : x > w) && (x += m * i.FA));
            for (var C, D = x; m > 0 ? D > w : D < w; D -= A) C = (0, l.EV)([k, -S * (0, i.gn)(D), -S * (0, i.F8)(D)]), f.point(C[0], C[1]);
          }
        }
        function _(f, c) {
          (c = (0, l.jf)(c))[0] -= f, (0, l.Cx)(c);
          var g = (0, i.HQ)(-c[1]);
          return ((-c[2] < 0 ? -g : g) + i.FA - i.Ni) % i.FA;
        }
        function d() {
          var f, c, g = u([0, 0]), m = u(90), x = u(6), w = { point: function(S, A) {
            f.push(S = c(S, A)), S[0] *= i.uj, S[1] *= i.uj;
          } };
          function k() {
            var S = g.apply(this, arguments), A = m.apply(this, arguments) * i.F2, C = x.apply(this, arguments) * i.F2;
            return f = [], c = (0, h.y)(-S[0] * i.F2, -S[1] * i.F2, 0).invert, p(w, A, C, 1), S = { type: "Polygon", coordinates: [f] }, f = c = null, S;
          }
          return k.center = function(S) {
            return arguments.length ? (g = typeof S == "function" ? S : u([+S[0], +S[1]]), k) : g;
          }, k.radius = function(S) {
            return arguments.length ? (m = typeof S == "function" ? S : u(+S), k) : m;
          }, k.precision = function(S) {
            return arguments.length ? (x = typeof S == "function" ? S : u(+S), k) : x;
          }, k;
        }
      }, 42413: function(o, s, n) {
        var l = n(13720), u = n(61323);
        s.A = (0, l.A)(function() {
          return !0;
        }, function(i) {
          var h, p = NaN, _ = NaN, d = NaN;
          return { lineStart: function() {
            i.lineStart(), h = 1;
          }, point: function(f, c) {
            var g = f > 0 ? u.pi : -u.pi, m = (0, u.tn)(f - p);
            (0, u.tn)(m - u.pi) < u.Ni ? (i.point(p, _ = (_ + c) / 2 > 0 ? u.TW : -u.TW), i.point(d, _), i.lineEnd(), i.lineStart(), i.point(g, _), i.point(f, _), h = 0) : d !== g && m >= u.pi && ((0, u.tn)(p - d) < u.Ni && (p -= d * u.Ni), (0, u.tn)(f - g) < u.Ni && (f -= g * u.Ni), _ = function(x, w, k, S) {
              var A, C, D = (0, u.F8)(x - k);
              return (0, u.tn)(D) > u.Ni ? (0, u.rY)(((0, u.F8)(w) * (C = (0, u.gn)(S)) * (0, u.F8)(k) - (0, u.F8)(S) * (A = (0, u.gn)(w)) * (0, u.F8)(x)) / (A * C * D)) : (w + S) / 2;
            }(p, _, f, c), i.point(d, _), i.lineEnd(), i.lineStart(), i.point(g, _), h = 0), i.point(p = f, _ = c), d = g;
          }, lineEnd: function() {
            i.lineEnd(), p = _ = NaN;
          }, clean: function() {
            return 2 - h;
          } };
        }, function(i, h, p, _) {
          var d;
          if (i == null) d = p * u.TW, _.point(-u.pi, d), _.point(0, d), _.point(u.pi, d), _.point(u.pi, 0), _.point(u.pi, -d), _.point(0, -d), _.point(-u.pi, -d), _.point(-u.pi, 0), _.point(-u.pi, d);
          else if ((0, u.tn)(i[0] - h[0]) > u.Ni) {
            var f = i[0] < h[0] ? u.pi : -u.pi;
            d = p * f / 2, _.point(-f, d), _.point(0, d), _.point(f, d);
          } else _.point(h[0], h[1]);
        }, [-u.pi, -u.TW]);
      }, 39608: function(o, s, n) {
        n.d(s, { A: function() {
          return u;
        } });
        var l = n(53341);
        function u() {
          var i, h = [];
          return { point: function(p, _, d) {
            i.push([p, _, d]);
          }, lineStart: function() {
            h.push(i = []);
          }, lineEnd: l.A, rejoin: function() {
            h.length > 1 && h.push(h.pop().concat(h.shift()));
          }, result: function() {
            var p = h;
            return h = [], i = null, p;
          } };
        }
      }, 47402: function(o, s, n) {
        n.d(s, { A: function() {
          return _;
        } });
        var l = n(20375), u = n(39127), i = n(61323), h = n(28759), p = n(13720);
        function _(d) {
          var f = (0, i.gn)(d), c = 6 * i.F2, g = f > 0, m = (0, i.tn)(f) > i.Ni;
          function x(S, A) {
            return (0, i.gn)(S) * (0, i.gn)(A) > f;
          }
          function w(S, A, C) {
            var D = (0, l.jf)(S), L = (0, l.jf)(A), E = [1, 0, 0], P = (0, l.r8)(D, L), I = (0, l.W8)(P, P), M = P[0], O = I - M * M;
            if (!O) return !C && S;
            var T = f * I / O, z = -f * M / O, F = (0, l.r8)(E, P), U = (0, l.ly)(E, T), V = (0, l.ly)(P, z);
            (0, l.ep)(U, V);
            var $ = F, q = (0, l.W8)(U, $), K = (0, l.W8)($, $), re = q * q - K * ((0, l.W8)(U, U) - 1);
            if (!(re < 0)) {
              var Y = (0, i.RZ)(re), te = (0, l.ly)($, (-q - Y) / K);
              if ((0, l.ep)(te, U), te = (0, l.EV)(te), !C) return te;
              var ee, X = S[0], Q = A[0], ue = S[1], ce = A[1];
              Q < X && (ee = X, X = Q, Q = ee);
              var he = Q - X, de = (0, i.tn)(he - i.pi) < i.Ni;
              if (!de && ce < ue && (ee = ue, ue = ce, ce = ee), de || he < i.Ni ? de ? ue + ce > 0 ^ te[1] < ((0, i.tn)(te[0] - X) < i.Ni ? ue : ce) : ue <= te[1] && te[1] <= ce : he > i.pi ^ (X <= te[0] && te[0] <= Q)) {
                var ne = (0, l.ly)($, (-q + Y) / K);
                return (0, l.ep)(ne, U), [te, (0, l.EV)(ne)];
              }
            }
          }
          function k(S, A) {
            var C = g ? d : i.pi - d, D = 0;
            return S < -C ? D |= 1 : S > C && (D |= 2), A < -C ? D |= 4 : A > C && (D |= 8), D;
          }
          return (0, p.A)(x, function(S) {
            var A, C, D, L, E;
            return { lineStart: function() {
              L = D = !1, E = 1;
            }, point: function(P, I) {
              var M, O = [P, I], T = x(P, I), z = g ? T ? 0 : k(P, I) : T ? k(P + (P < 0 ? i.pi : -i.pi), I) : 0;
              if (!A && (L = D = T) && S.lineStart(), T !== D && (!(M = w(A, O)) || (0, h.A)(A, M) || (0, h.A)(O, M)) && (O[2] = 1), T !== D) E = 0, T ? (S.lineStart(), M = w(O, A), S.point(M[0], M[1])) : (M = w(A, O), S.point(M[0], M[1], 2), S.lineEnd()), A = M;
              else if (m && A && g ^ T) {
                var F;
                z & C || !(F = w(O, A, !0)) || (E = 0, g ? (S.lineStart(), S.point(F[0][0], F[0][1]), S.point(F[1][0], F[1][1]), S.lineEnd()) : (S.point(F[1][0], F[1][1]), S.lineEnd(), S.lineStart(), S.point(F[0][0], F[0][1], 3)));
              }
              !T || A && (0, h.A)(A, O) || S.point(O[0], O[1]), A = O, D = T, C = z;
            }, lineEnd: function() {
              D && S.lineEnd(), A = null;
            }, clean: function() {
              return E | (L && D) << 1;
            } };
          }, function(S, A, C, D) {
            (0, u.J)(D, d, c, C, S, A);
          }, g ? [0, -d] : [-i.pi, d - i.pi]);
        }
      }, 13720: function(o, s, n) {
        n.d(s, { A: function() {
          return _;
        } });
        var l = n(39608), u = n(19119), i = n(61323), h = n(2274), p = n(29725);
        function _(c, g, m, x) {
          return function(w) {
            var k, S, A, C = g(w), D = (0, l.A)(), L = g(D), E = !1, P = { point: I, lineStart: O, lineEnd: T, polygonStart: function() {
              P.point = z, P.lineStart = F, P.lineEnd = U, S = [], k = [];
            }, polygonEnd: function() {
              P.point = I, P.lineStart = O, P.lineEnd = T, S = (0, p.Am)(S);
              var V = (0, h.A)(k, x);
              S.length ? (E || (w.polygonStart(), E = !0), (0, u.A)(S, f, V, m, w)) : V && (E || (w.polygonStart(), E = !0), w.lineStart(), m(null, null, 1, w), w.lineEnd()), E && (w.polygonEnd(), E = !1), S = k = null;
            }, sphere: function() {
              w.polygonStart(), w.lineStart(), m(null, null, 1, w), w.lineEnd(), w.polygonEnd();
            } };
            function I(V, $) {
              c(V, $) && w.point(V, $);
            }
            function M(V, $) {
              C.point(V, $);
            }
            function O() {
              P.point = M, C.lineStart();
            }
            function T() {
              P.point = I, C.lineEnd();
            }
            function z(V, $) {
              A.push([V, $]), L.point(V, $);
            }
            function F() {
              L.lineStart(), A = [];
            }
            function U() {
              z(A[0][0], A[0][1]), L.lineEnd();
              var V, $, q, K, re = L.clean(), Y = D.result(), te = Y.length;
              if (A.pop(), k.push(A), A = null, te) if (1 & re) {
                if (($ = (q = Y[0]).length - 1) > 0) {
                  for (E || (w.polygonStart(), E = !0), w.lineStart(), V = 0; V < $; ++V) w.point((K = q[V])[0], K[1]);
                  w.lineEnd();
                }
              } else te > 1 && 2 & re && Y.push(Y.pop().concat(Y.shift())), S.push(Y.filter(d));
            }
            return P;
          };
        }
        function d(c) {
          return c.length > 1;
        }
        function f(c, g) {
          return ((c = c.x)[0] < 0 ? c[1] - i.TW - i.Ni : i.TW - c[1]) - ((g = g.x)[0] < 0 ? g[1] - i.TW - i.Ni : i.TW - g[1]);
        }
      }, 21503: function(o, s, n) {
        n.d(s, { A: function() {
          return d;
        } });
        var l = n(61323), u = n(39608), i = n(19119), h = n(29725), p = 1e9, _ = -p;
        function d(f, c, g, m) {
          function x(C, D) {
            return f <= C && C <= g && c <= D && D <= m;
          }
          function w(C, D, L, E) {
            var P = 0, I = 0;
            if (C == null || (P = k(C, L)) !== (I = k(D, L)) || A(C, D) < 0 ^ L > 0) do
              E.point(P === 0 || P === 3 ? f : g, P > 1 ? m : c);
            while ((P = (P + L + 4) % 4) !== I);
            else E.point(D[0], D[1]);
          }
          function k(C, D) {
            return (0, l.tn)(C[0] - f) < l.Ni ? D > 0 ? 0 : 3 : (0, l.tn)(C[0] - g) < l.Ni ? D > 0 ? 2 : 1 : (0, l.tn)(C[1] - c) < l.Ni ? D > 0 ? 1 : 0 : D > 0 ? 3 : 2;
          }
          function S(C, D) {
            return A(C.x, D.x);
          }
          function A(C, D) {
            var L = k(C, 1), E = k(D, 1);
            return L !== E ? L - E : L === 0 ? D[1] - C[1] : L === 1 ? C[0] - D[0] : L === 2 ? C[1] - D[1] : D[0] - C[0];
          }
          return function(C) {
            var D, L, E, P, I, M, O, T, z, F, U, V = C, $ = (0, u.A)(), q = { point: K, lineStart: function() {
              q.point = re, L && L.push(E = []), F = !0, z = !1, O = T = NaN;
            }, lineEnd: function() {
              D && (re(P, I), M && z && $.rejoin(), D.push($.result())), q.point = K, z && V.lineEnd();
            }, polygonStart: function() {
              V = $, D = [], L = [], U = !0;
            }, polygonEnd: function() {
              var Y = function() {
                for (var X = 0, Q = 0, ue = L.length; Q < ue; ++Q) for (var ce, he, de = L[Q], ne = 1, ae = de.length, se = de[0], me = se[0], ye = se[1]; ne < ae; ++ne) ce = me, he = ye, me = (se = de[ne])[0], ye = se[1], he <= m ? ye > m && (me - ce) * (m - he) > (ye - he) * (f - ce) && ++X : ye <= m && (me - ce) * (m - he) < (ye - he) * (f - ce) && --X;
                return X;
              }(), te = U && Y, ee = (D = (0, h.Am)(D)).length;
              (te || ee) && (C.polygonStart(), te && (C.lineStart(), w(null, null, 1, C), C.lineEnd()), ee && (0, i.A)(D, S, Y, w, C), C.polygonEnd()), V = C, D = L = E = null;
            } };
            function K(Y, te) {
              x(Y, te) && V.point(Y, te);
            }
            function re(Y, te) {
              var ee = x(Y, te);
              if (L && E.push([Y, te]), F) P = Y, I = te, M = ee, F = !1, ee && (V.lineStart(), V.point(Y, te));
              else if (ee && z) V.point(Y, te);
              else {
                var X = [O = Math.max(_, Math.min(p, O)), T = Math.max(_, Math.min(p, T))], Q = [Y = Math.max(_, Math.min(p, Y)), te = Math.max(_, Math.min(p, te))];
                (function(ue, ce, he, de, ne, ae) {
                  var se, me = ue[0], ye = ue[1], pe = 0, be = 1, Ae = ce[0] - me, Se = ce[1] - ye;
                  if (se = he - me, Ae || !(se > 0)) {
                    if (se /= Ae, Ae < 0) {
                      if (se < pe) return;
                      se < be && (be = se);
                    } else if (Ae > 0) {
                      if (se > be) return;
                      se > pe && (pe = se);
                    }
                    if (se = ne - me, Ae || !(se < 0)) {
                      if (se /= Ae, Ae < 0) {
                        if (se > be) return;
                        se > pe && (pe = se);
                      } else if (Ae > 0) {
                        if (se < pe) return;
                        se < be && (be = se);
                      }
                      if (se = de - ye, Se || !(se > 0)) {
                        if (se /= Se, Se < 0) {
                          if (se < pe) return;
                          se < be && (be = se);
                        } else if (Se > 0) {
                          if (se > be) return;
                          se > pe && (pe = se);
                        }
                        if (se = ae - ye, Se || !(se < 0)) {
                          if (se /= Se, Se < 0) {
                            if (se > be) return;
                            se > pe && (pe = se);
                          } else if (Se > 0) {
                            if (se < pe) return;
                            se < be && (be = se);
                          }
                          return pe > 0 && (ue[0] = me + pe * Ae, ue[1] = ye + pe * Se), be < 1 && (ce[0] = me + be * Ae, ce[1] = ye + be * Se), !0;
                        }
                      }
                    }
                  }
                })(X, Q, f, c, g, m) ? (z || (V.lineStart(), V.point(X[0], X[1])), V.point(Q[0], Q[1]), ee || V.lineEnd(), U = !1) : ee && (V.lineStart(), V.point(Y, te), U = !1);
              }
              O = Y, T = te, z = ee;
            }
            return q;
          };
        }
      }, 19119: function(o, s, n) {
        n.d(s, { A: function() {
          return h;
        } });
        var l = n(28759), u = n(61323);
        function i(_, d, f, c) {
          this.x = _, this.z = d, this.o = f, this.e = c, this.v = !1, this.n = this.p = null;
        }
        function h(_, d, f, c, g) {
          var m, x, w = [], k = [];
          if (_.forEach(function(E) {
            if (!((P = E.length - 1) <= 0)) {
              var P, I, M = E[0], O = E[P];
              if ((0, l.A)(M, O)) {
                if (!M[2] && !O[2]) {
                  for (g.lineStart(), m = 0; m < P; ++m) g.point((M = E[m])[0], M[1]);
                  return void g.lineEnd();
                }
                O[0] += 2 * u.Ni;
              }
              w.push(I = new i(M, E, null, !0)), k.push(I.o = new i(M, null, I, !1)), w.push(I = new i(O, E, null, !1)), k.push(I.o = new i(O, null, I, !0));
            }
          }), w.length) {
            for (k.sort(d), p(w), p(k), m = 0, x = k.length; m < x; ++m) k[m].e = f = !f;
            for (var S, A, C = w[0]; ; ) {
              for (var D = C, L = !0; D.v; ) if ((D = D.n) === C) return;
              S = D.z, g.lineStart();
              do {
                if (D.v = D.o.v = !0, D.e) {
                  if (L) for (m = 0, x = S.length; m < x; ++m) g.point((A = S[m])[0], A[1]);
                  else c(D.x, D.n.x, 1, g);
                  D = D.n;
                } else {
                  if (L) for (S = D.p.z, m = S.length - 1; m >= 0; --m) g.point((A = S[m])[0], A[1]);
                  else c(D.x, D.p.x, -1, g);
                  D = D.p;
                }
                S = (D = D.o).z, L = !L;
              } while (!D.v);
              g.lineEnd();
            }
          }
        }
        function p(_) {
          if (d = _.length) {
            for (var d, f, c = 0, g = _[0]; ++c < d; ) g.n = f = _[c], f.p = g, g = f;
            g.n = f = _[0], f.p = g;
          }
        }
      }, 19057: function(o, s, n) {
        function l(u, i) {
          function h(p, _) {
            return p = u(p, _), i(p[0], p[1]);
          }
          return u.invert && i.invert && (h.invert = function(p, _) {
            return (p = i.invert(p, _)) && u.invert(p[0], p[1]);
          }), h;
        }
        n.d(s, { A: function() {
          return l;
        } });
      }, 26827: function(o, s, n) {
        function l(u) {
          return u;
        }
        n.d(s, { A: function() {
          return l;
        } });
      }, 70884: function(o, s, n) {
        n.r(s), n.d(s, { geoAlbers: function() {
          return Bt;
        }, geoAlbersUsa: function() {
          return Jt;
        }, geoArea: function() {
          return l.Ay;
        }, geoAzimuthalEqualArea: function() {
          return qt.A;
        }, geoAzimuthalEqualAreaRaw: function() {
          return qt.n;
        }, geoAzimuthalEquidistant: function() {
          return en.A;
        }, geoAzimuthalEquidistantRaw: function() {
          return en.j;
        }, geoBounds: function() {
          return u.A;
        }, geoCentroid: function() {
          return i.A;
        }, geoCircle: function() {
          return h.A;
        }, geoClipAntimeridian: function() {
          return p.A;
        }, geoClipCircle: function() {
          return _.A;
        }, geoClipExtent: function() {
          return f;
        }, geoClipRectangle: function() {
          return d.A;
        }, geoConicConformal: function() {
          return Cn;
        }, geoConicConformalRaw: function() {
          return zn;
        }, geoConicEqualArea: function() {
          return kt;
        }, geoConicEqualAreaRaw: function() {
          return Ot;
        }, geoConicEquidistant: function() {
          return Xn;
        }, geoConicEquidistantRaw: function() {
          return Mn;
        }, geoContains: function() {
          return Y;
        }, geoDistance: function() {
          return T;
        }, geoEqualEarth: function() {
          return Wn;
        }, geoEqualEarthRaw: function() {
          return Kn;
        }, geoEquirectangular: function() {
          return gn.A;
        }, geoEquirectangularRaw: function() {
          return gn.f;
        }, geoGnomonic: function() {
          return hr.A;
        }, geoGnomonicRaw: function() {
          return hr.T;
        }, geoGraticule: function() {
          return Q;
        }, geoGraticule10: function() {
          return ue;
        }, geoIdentity: function() {
          return lr;
        }, geoInterpolate: function() {
          return ae.A;
        }, geoLength: function() {
          return I;
        }, geoMercator: function() {
          return sn;
        }, geoMercatorRaw: function() {
          return Ht;
        }, geoNaturalEarth1: function() {
          return cr.A;
        }, geoNaturalEarth1Raw: function() {
          return cr.P;
        }, geoOrthographic: function() {
          return zr.A;
        }, geoOrthographicRaw: function() {
          return zr.x;
        }, geoPath: function() {
          return Ft;
        }, geoProjection: function() {
          return lt.A;
        }, geoProjectionMutator: function() {
          return lt.U;
        }, geoRotation: function() {
          return Yt.A;
        }, geoStereographic: function() {
          return Ir;
        }, geoStereographicRaw: function() {
          return mr;
        }, geoStream: function() {
          return A.A;
        }, geoTransform: function() {
          return Zn.A;
        }, geoTransverseMercator: function() {
          return Vr;
        }, geoTransverseMercatorRaw: function() {
          return yr;
        } });
        var l = n(43976), u = n(43212), i = n(30021), h = n(39127), p = n(42413), _ = n(47402), d = n(21503);
        function f() {
          var rn, Tn, sr, $n = 0, ur = 0, Tr = 960, wr = 500;
          return sr = { stream: function(Fr) {
            return rn && Tn === Fr ? rn : rn = (0, d.A)($n, ur, Tr, wr)(Tn = Fr);
          }, extent: function(Fr) {
            return arguments.length ? ($n = +Fr[0][0], ur = +Fr[0][1], Tr = +Fr[1][0], wr = +Fr[1][1], rn = Tn = null, sr) : [[$n, ur], [Tr, wr]];
          } };
        }
        var c, g, m, x = n(2274), w = n(49353), k = n(61323), S = n(53341), A = n(20465), C = (0, w.A)(), D = { sphere: S.A, point: S.A, lineStart: function() {
          D.point = E, D.lineEnd = L;
        }, lineEnd: S.A, polygonStart: S.A, polygonEnd: S.A };
        function L() {
          D.point = D.lineEnd = S.A;
        }
        function E(rn, Tn) {
          rn *= k.F2, Tn *= k.F2, c = rn, g = (0, k.F8)(Tn), m = (0, k.gn)(Tn), D.point = P;
        }
        function P(rn, Tn) {
          rn *= k.F2, Tn *= k.F2;
          var sr = (0, k.F8)(Tn), $n = (0, k.gn)(Tn), ur = (0, k.tn)(rn - c), Tr = (0, k.gn)(ur), wr = $n * (0, k.F8)(ur), Fr = m * sr - g * $n * Tr, Xr = g * sr + m * $n * Tr;
          C.add((0, k.FP)((0, k.RZ)(wr * wr + Fr * Fr), Xr)), c = rn, g = sr, m = $n;
        }
        function I(rn) {
          return C.reset(), (0, A.A)(rn, D), +C;
        }
        var M = [null, null], O = { type: "LineString", coordinates: M };
        function T(rn, Tn) {
          return M[0] = rn, M[1] = Tn, I(O);
        }
        var z = { Feature: function(rn, Tn) {
          return U(rn.geometry, Tn);
        }, FeatureCollection: function(rn, Tn) {
          for (var sr = rn.features, $n = -1, ur = sr.length; ++$n < ur; ) if (U(sr[$n].geometry, Tn)) return !0;
          return !1;
        } }, F = { Sphere: function() {
          return !0;
        }, Point: function(rn, Tn) {
          return V(rn.coordinates, Tn);
        }, MultiPoint: function(rn, Tn) {
          for (var sr = rn.coordinates, $n = -1, ur = sr.length; ++$n < ur; ) if (V(sr[$n], Tn)) return !0;
          return !1;
        }, LineString: function(rn, Tn) {
          return $(rn.coordinates, Tn);
        }, MultiLineString: function(rn, Tn) {
          for (var sr = rn.coordinates, $n = -1, ur = sr.length; ++$n < ur; ) if ($(sr[$n], Tn)) return !0;
          return !1;
        }, Polygon: function(rn, Tn) {
          return q(rn.coordinates, Tn);
        }, MultiPolygon: function(rn, Tn) {
          for (var sr = rn.coordinates, $n = -1, ur = sr.length; ++$n < ur; ) if (q(sr[$n], Tn)) return !0;
          return !1;
        }, GeometryCollection: function(rn, Tn) {
          for (var sr = rn.geometries, $n = -1, ur = sr.length; ++$n < ur; ) if (U(sr[$n], Tn)) return !0;
          return !1;
        } };
        function U(rn, Tn) {
          return !(!rn || !F.hasOwnProperty(rn.type)) && F[rn.type](rn, Tn);
        }
        function V(rn, Tn) {
          return T(rn, Tn) === 0;
        }
        function $(rn, Tn) {
          for (var sr, $n, ur, Tr = 0, wr = rn.length; Tr < wr; Tr++) {
            if (($n = T(rn[Tr], Tn)) === 0 || Tr > 0 && (ur = T(rn[Tr], rn[Tr - 1])) > 0 && sr <= ur && $n <= ur && (sr + $n - ur) * (1 - Math.pow((sr - $n) / ur, 2)) < k.$t * ur) return !0;
            sr = $n;
          }
          return !1;
        }
        function q(rn, Tn) {
          return !!(0, x.A)(rn.map(K), re(Tn));
        }
        function K(rn) {
          return (rn = rn.map(re)).pop(), rn;
        }
        function re(rn) {
          return [rn[0] * k.F2, rn[1] * k.F2];
        }
        function Y(rn, Tn) {
          return (rn && z.hasOwnProperty(rn.type) ? z[rn.type] : U)(rn, Tn);
        }
        var te = n(29725);
        function ee(rn, Tn, sr) {
          var $n = (0, te.y1)(rn, Tn - k.Ni, sr).concat(Tn);
          return function(ur) {
            return $n.map(function(Tr) {
              return [ur, Tr];
            });
          };
        }
        function X(rn, Tn, sr) {
          var $n = (0, te.y1)(rn, Tn - k.Ni, sr).concat(Tn);
          return function(ur) {
            return $n.map(function(Tr) {
              return [Tr, ur];
            });
          };
        }
        function Q() {
          var rn, Tn, sr, $n, ur, Tr, wr, Fr, Xr, un, Gn, on, ln = 10, bn = ln, Nn = 90, jn = 360, Jn = 2.5;
          function Hn() {
            return { type: "MultiLineString", coordinates: Ln() };
          }
          function Ln() {
            return (0, te.y1)((0, k.mk)($n / Nn) * Nn, sr, Nn).map(Gn).concat((0, te.y1)((0, k.mk)(Fr / jn) * jn, wr, jn).map(on)).concat((0, te.y1)((0, k.mk)(Tn / ln) * ln, rn, ln).filter(function(pn) {
              return (0, k.tn)(pn % Nn) > k.Ni;
            }).map(Xr)).concat((0, te.y1)((0, k.mk)(Tr / bn) * bn, ur, bn).filter(function(pn) {
              return (0, k.tn)(pn % jn) > k.Ni;
            }).map(un));
          }
          return Hn.lines = function() {
            return Ln().map(function(pn) {
              return { type: "LineString", coordinates: pn };
            });
          }, Hn.outline = function() {
            return { type: "Polygon", coordinates: [Gn($n).concat(on(wr).slice(1), Gn(sr).reverse().slice(1), on(Fr).reverse().slice(1))] };
          }, Hn.extent = function(pn) {
            return arguments.length ? Hn.extentMajor(pn).extentMinor(pn) : Hn.extentMinor();
          }, Hn.extentMajor = function(pn) {
            return arguments.length ? ($n = +pn[0][0], sr = +pn[1][0], Fr = +pn[0][1], wr = +pn[1][1], $n > sr && (pn = $n, $n = sr, sr = pn), Fr > wr && (pn = Fr, Fr = wr, wr = pn), Hn.precision(Jn)) : [[$n, Fr], [sr, wr]];
          }, Hn.extentMinor = function(pn) {
            return arguments.length ? (Tn = +pn[0][0], rn = +pn[1][0], Tr = +pn[0][1], ur = +pn[1][1], Tn > rn && (pn = Tn, Tn = rn, rn = pn), Tr > ur && (pn = Tr, Tr = ur, ur = pn), Hn.precision(Jn)) : [[Tn, Tr], [rn, ur]];
          }, Hn.step = function(pn) {
            return arguments.length ? Hn.stepMajor(pn).stepMinor(pn) : Hn.stepMinor();
          }, Hn.stepMajor = function(pn) {
            return arguments.length ? (Nn = +pn[0], jn = +pn[1], Hn) : [Nn, jn];
          }, Hn.stepMinor = function(pn) {
            return arguments.length ? (ln = +pn[0], bn = +pn[1], Hn) : [ln, bn];
          }, Hn.precision = function(pn) {
            return arguments.length ? (Jn = +pn, Xr = ee(Tr, ur, 90), un = X(Tn, rn, Jn), Gn = ee(Fr, wr, 90), on = X($n, sr, Jn), Hn) : Jn;
          }, Hn.extentMajor([[-180, -90 + k.Ni], [180, 90 - k.Ni]]).extentMinor([[-180, -80 - k.Ni], [180, 80 + k.Ni]]);
        }
        function ue() {
          return Q()();
        }
        var ce, he, de, ne, ae = n(81758), se = n(26827), me = (0, w.A)(), ye = (0, w.A)(), pe = { point: S.A, lineStart: S.A, lineEnd: S.A, polygonStart: function() {
          pe.lineStart = be, pe.lineEnd = Me;
        }, polygonEnd: function() {
          pe.lineStart = pe.lineEnd = pe.point = S.A, me.add((0, k.tn)(ye)), ye.reset();
        }, result: function() {
          var rn = me / 2;
          return me.reset(), rn;
        } };
        function be() {
          pe.point = Ae;
        }
        function Ae(rn, Tn) {
          pe.point = Se, ce = de = rn, he = ne = Tn;
        }
        function Se(rn, Tn) {
          ye.add(ne * rn - de * Tn), de = rn, ne = Tn;
        }
        function Me() {
          Se(ce, he);
        }
        var De, Le, We, Ee, Ne = pe, Ie = n(33028), ge = 0, Ce = 0, we = 0, Ge = 0, Re = 0, je = 0, Ke = 0, tt = 0, _e = 0, Be = { point: $e, lineStart: Ze, lineEnd: _t, polygonStart: function() {
          Be.lineStart = Pt, Be.lineEnd = Dt;
        }, polygonEnd: function() {
          Be.point = $e, Be.lineStart = Ze, Be.lineEnd = _t;
        }, result: function() {
          var rn = _e ? [Ke / _e, tt / _e] : je ? [Ge / je, Re / je] : we ? [ge / we, Ce / we] : [NaN, NaN];
          return ge = Ce = we = Ge = Re = je = Ke = tt = _e = 0, rn;
        } };
        function $e(rn, Tn) {
          ge += rn, Ce += Tn, ++we;
        }
        function Ze() {
          Be.point = ct;
        }
        function ct(rn, Tn) {
          Be.point = ft, $e(We = rn, Ee = Tn);
        }
        function ft(rn, Tn) {
          var sr = rn - We, $n = Tn - Ee, ur = (0, k.RZ)(sr * sr + $n * $n);
          Ge += ur * (We + rn) / 2, Re += ur * (Ee + Tn) / 2, je += ur, $e(We = rn, Ee = Tn);
        }
        function _t() {
          Be.point = $e;
        }
        function Pt() {
          Be.point = $t;
        }
        function Dt() {
          Gt(De, Le);
        }
        function $t(rn, Tn) {
          Be.point = Gt, $e(De = We = rn, Le = Ee = Tn);
        }
        function Gt(rn, Tn) {
          var sr = rn - We, $n = Tn - Ee, ur = (0, k.RZ)(sr * sr + $n * $n);
          Ge += ur * (We + rn) / 2, Re += ur * (Ee + Tn) / 2, je += ur, Ke += (ur = Ee * rn - We * Tn) * (We + rn), tt += ur * (Ee + Tn), _e += 3 * ur, $e(We = rn, Ee = Tn);
        }
        var Wt = Be;
        function mt(rn) {
          this._context = rn;
        }
        mt.prototype = { _radius: 4.5, pointRadius: function(rn) {
          return this._radius = rn, this;
        }, polygonStart: function() {
          this._line = 0;
        }, polygonEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          this._line === 0 && this._context.closePath(), this._point = NaN;
        }, point: function(rn, Tn) {
          switch (this._point) {
            case 0:
              this._context.moveTo(rn, Tn), this._point = 1;
              break;
            case 1:
              this._context.lineTo(rn, Tn);
              break;
            default:
              this._context.moveTo(rn + this._radius, Tn), this._context.arc(rn, Tn, this._radius, 0, k.FA);
          }
        }, result: S.A };
        var at, vt, St, Je, nt, ot = (0, w.A)(), Ye = { point: S.A, lineStart: function() {
          Ye.point = Fe;
        }, lineEnd: function() {
          at && pt(vt, St), Ye.point = S.A;
        }, polygonStart: function() {
          at = !0;
        }, polygonEnd: function() {
          at = null;
        }, result: function() {
          var rn = +ot;
          return ot.reset(), rn;
        } };
        function Fe(rn, Tn) {
          Ye.point = pt, vt = Je = rn, St = nt = Tn;
        }
        function pt(rn, Tn) {
          Je -= rn, nt -= Tn, ot.add((0, k.RZ)(Je * Je + nt * nt)), Je = rn, nt = Tn;
        }
        var Mt = Ye;
        function At() {
          this._string = [];
        }
        function Rt(rn) {
          return "m0," + rn + "a" + rn + "," + rn + " 0 1,1 0," + -2 * rn + "a" + rn + "," + rn + " 0 1,1 0," + 2 * rn + "z";
        }
        function Ft(rn, Tn) {
          var sr, $n, ur = 4.5;
          function Tr(wr) {
            return wr && (typeof ur == "function" && $n.pointRadius(+ur.apply(this, arguments)), (0, A.A)(wr, sr($n))), $n.result();
          }
          return Tr.area = function(wr) {
            return (0, A.A)(wr, sr(Ne)), Ne.result();
          }, Tr.measure = function(wr) {
            return (0, A.A)(wr, sr(Mt)), Mt.result();
          }, Tr.bounds = function(wr) {
            return (0, A.A)(wr, sr(Ie.A)), Ie.A.result();
          }, Tr.centroid = function(wr) {
            return (0, A.A)(wr, sr(Wt)), Wt.result();
          }, Tr.projection = function(wr) {
            return arguments.length ? (sr = wr == null ? (rn = null, se.A) : (rn = wr).stream, Tr) : rn;
          }, Tr.context = function(wr) {
            return arguments.length ? ($n = wr == null ? (Tn = null, new At()) : new mt(Tn = wr), typeof ur != "function" && $n.pointRadius(ur), Tr) : Tn;
          }, Tr.pointRadius = function(wr) {
            return arguments.length ? (ur = typeof wr == "function" ? wr : ($n.pointRadius(+wr), +wr), Tr) : ur;
          }, Tr.projection(rn).context(Tn);
        }
        At.prototype = { _radius: 4.5, _circle: Rt(4.5), pointRadius: function(rn) {
          return (rn = +rn) !== this._radius && (this._radius = rn, this._circle = null), this;
        }, polygonStart: function() {
          this._line = 0;
        }, polygonEnd: function() {
          this._line = NaN;
        }, lineStart: function() {
          this._point = 0;
        }, lineEnd: function() {
          this._line === 0 && this._string.push("Z"), this._point = NaN;
        }, point: function(rn, Tn) {
          switch (this._point) {
            case 0:
              this._string.push("M", rn, ",", Tn), this._point = 1;
              break;
            case 1:
              this._string.push("L", rn, ",", Tn);
              break;
            default:
              this._circle == null && (this._circle = Rt(this._radius)), this._string.push("M", rn, ",", Tn, this._circle);
          }
        }, result: function() {
          if (this._string.length) {
            var rn = this._string.join("");
            return this._string = [], rn;
          }
          return null;
        } };
        var lt = n(94684);
        function st(rn) {
          var Tn = 0, sr = k.pi / 3, $n = (0, lt.U)(rn), ur = $n(Tn, sr);
          return ur.parallels = function(Tr) {
            return arguments.length ? $n(Tn = Tr[0] * k.F2, sr = Tr[1] * k.F2) : [Tn * k.uj, sr * k.uj];
          }, ur;
        }
        function Ot(rn, Tn) {
          var sr = (0, k.F8)(rn), $n = (sr + (0, k.F8)(Tn)) / 2;
          if ((0, k.tn)($n) < k.Ni) return function(Fr) {
            var Xr = (0, k.gn)(Fr);
            function un(Gn, on) {
              return [Gn * Xr, (0, k.F8)(on) / Xr];
            }
            return un.invert = function(Gn, on) {
              return [Gn / Xr, (0, k.qR)(on * Xr)];
            }, un;
          }(rn);
          var ur = 1 + sr * (2 * $n - sr), Tr = (0, k.RZ)(ur) / $n;
          function wr(Fr, Xr) {
            var un = (0, k.RZ)(ur - 2 * $n * (0, k.F8)(Xr)) / $n;
            return [un * (0, k.F8)(Fr *= $n), Tr - un * (0, k.gn)(Fr)];
          }
          return wr.invert = function(Fr, Xr) {
            var un = Tr - Xr, Gn = (0, k.FP)(Fr, (0, k.tn)(un)) * (0, k._S)(un);
            return un * $n < 0 && (Gn -= k.pi * (0, k._S)(Fr) * (0, k._S)(un)), [Gn / $n, (0, k.qR)((ur - (Fr * Fr + un * un) * $n * $n) / (2 * $n))];
          }, wr;
        }
        function kt() {
          return st(Ot).scale(155.424).center([0, 33.6442]);
        }
        function Bt() {
          return kt().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);
        }
        var xt = n(7944);
        function Jt() {
          var rn, Tn, sr, $n, ur, Tr, wr = Bt(), Fr = kt().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), Xr = kt().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), un = { point: function(ln, bn) {
            Tr = [ln, bn];
          } };
          function Gn(ln) {
            var bn = ln[0], Nn = ln[1];
            return Tr = null, sr.point(bn, Nn), Tr || ($n.point(bn, Nn), Tr) || (ur.point(bn, Nn), Tr);
          }
          function on() {
            return rn = Tn = null, Gn;
          }
          return Gn.invert = function(ln) {
            var bn = wr.scale(), Nn = wr.translate(), jn = (ln[0] - Nn[0]) / bn, Jn = (ln[1] - Nn[1]) / bn;
            return (Jn >= 0.12 && Jn < 0.234 && jn >= -0.425 && jn < -0.214 ? Fr : Jn >= 0.166 && Jn < 0.234 && jn >= -0.214 && jn < -0.115 ? Xr : wr).invert(ln);
          }, Gn.stream = function(ln) {
            return rn && Tn === ln ? rn : (bn = [wr.stream(Tn = ln), Fr.stream(ln), Xr.stream(ln)], Nn = bn.length, rn = { point: function(jn, Jn) {
              for (var Hn = -1; ++Hn < Nn; ) bn[Hn].point(jn, Jn);
            }, sphere: function() {
              for (var jn = -1; ++jn < Nn; ) bn[jn].sphere();
            }, lineStart: function() {
              for (var jn = -1; ++jn < Nn; ) bn[jn].lineStart();
            }, lineEnd: function() {
              for (var jn = -1; ++jn < Nn; ) bn[jn].lineEnd();
            }, polygonStart: function() {
              for (var jn = -1; ++jn < Nn; ) bn[jn].polygonStart();
            }, polygonEnd: function() {
              for (var jn = -1; ++jn < Nn; ) bn[jn].polygonEnd();
            } });
            var bn, Nn;
          }, Gn.precision = function(ln) {
            return arguments.length ? (wr.precision(ln), Fr.precision(ln), Xr.precision(ln), on()) : wr.precision();
          }, Gn.scale = function(ln) {
            return arguments.length ? (wr.scale(ln), Fr.scale(0.35 * ln), Xr.scale(ln), Gn.translate(wr.translate())) : wr.scale();
          }, Gn.translate = function(ln) {
            if (!arguments.length) return wr.translate();
            var bn = wr.scale(), Nn = +ln[0], jn = +ln[1];
            return sr = wr.translate(ln).clipExtent([[Nn - 0.455 * bn, jn - 0.238 * bn], [Nn + 0.455 * bn, jn + 0.238 * bn]]).stream(un), $n = Fr.translate([Nn - 0.307 * bn, jn + 0.201 * bn]).clipExtent([[Nn - 0.425 * bn + k.Ni, jn + 0.12 * bn + k.Ni], [Nn - 0.214 * bn - k.Ni, jn + 0.234 * bn - k.Ni]]).stream(un), ur = Xr.translate([Nn - 0.205 * bn, jn + 0.212 * bn]).clipExtent([[Nn - 0.214 * bn + k.Ni, jn + 0.166 * bn + k.Ni], [Nn - 0.115 * bn - k.Ni, jn + 0.234 * bn - k.Ni]]).stream(un), on();
          }, Gn.fitExtent = function(ln, bn) {
            return (0, xt.sp)(Gn, ln, bn);
          }, Gn.fitSize = function(ln, bn) {
            return (0, xt.Hv)(Gn, ln, bn);
          }, Gn.fitWidth = function(ln, bn) {
            return (0, xt.G0)(Gn, ln, bn);
          }, Gn.fitHeight = function(ln, bn) {
            return (0, xt.FL)(Gn, ln, bn);
          }, Gn.scale(1070);
        }
        var qt = n(30729), en = n(61957), Yt = n(30915);
        function Ht(rn, Tn) {
          return [rn, (0, k.Rm)((0, k.Ml)((k.TW + Tn) / 2))];
        }
        function sn() {
          return fn(Ht).scale(961 / k.FA);
        }
        function fn(rn) {
          var Tn, sr, $n, ur = (0, lt.A)(rn), Tr = ur.center, wr = ur.scale, Fr = ur.translate, Xr = ur.clipExtent, un = null;
          function Gn() {
            var on = k.pi * wr(), ln = ur((0, Yt.A)(ur.rotate()).invert([0, 0]));
            return Xr(un == null ? [[ln[0] - on, ln[1] - on], [ln[0] + on, ln[1] + on]] : rn === Ht ? [[Math.max(ln[0] - on, un), Tn], [Math.min(ln[0] + on, sr), $n]] : [[un, Math.max(ln[1] - on, Tn)], [sr, Math.min(ln[1] + on, $n)]]);
          }
          return ur.scale = function(on) {
            return arguments.length ? (wr(on), Gn()) : wr();
          }, ur.translate = function(on) {
            return arguments.length ? (Fr(on), Gn()) : Fr();
          }, ur.center = function(on) {
            return arguments.length ? (Tr(on), Gn()) : Tr();
          }, ur.clipExtent = function(on) {
            return arguments.length ? (on == null ? un = Tn = sr = $n = null : (un = +on[0][0], Tn = +on[0][1], sr = +on[1][0], $n = +on[1][1]), Gn()) : un == null ? null : [[un, Tn], [sr, $n]];
          }, Gn();
        }
        function In(rn) {
          return (0, k.Ml)((k.TW + rn) / 2);
        }
        function zn(rn, Tn) {
          var sr = (0, k.gn)(rn), $n = rn === Tn ? (0, k.F8)(rn) : (0, k.Rm)(sr / (0, k.gn)(Tn)) / (0, k.Rm)(In(Tn) / In(rn)), ur = sr * (0, k.n7)(In(rn), $n) / $n;
          if (!$n) return Ht;
          function Tr(wr, Fr) {
            ur > 0 ? Fr < -k.TW + k.Ni && (Fr = -k.TW + k.Ni) : Fr > k.TW - k.Ni && (Fr = k.TW - k.Ni);
            var Xr = ur / (0, k.n7)(In(Fr), $n);
            return [Xr * (0, k.F8)($n * wr), ur - Xr * (0, k.gn)($n * wr)];
          }
          return Tr.invert = function(wr, Fr) {
            var Xr = ur - Fr, un = (0, k._S)($n) * (0, k.RZ)(wr * wr + Xr * Xr), Gn = (0, k.FP)(wr, (0, k.tn)(Xr)) * (0, k._S)(Xr);
            return Xr * $n < 0 && (Gn -= k.pi * (0, k._S)(wr) * (0, k._S)(Xr)), [Gn / $n, 2 * (0, k.rY)((0, k.n7)(ur / un, 1 / $n)) - k.TW];
          }, Tr;
        }
        function Cn() {
          return st(zn).scale(109.5).parallels([30, 30]);
        }
        Ht.invert = function(rn, Tn) {
          return [rn, 2 * (0, k.rY)((0, k.oN)(Tn)) - k.TW];
        };
        var gn = n(18139);
        function Mn(rn, Tn) {
          var sr = (0, k.gn)(rn), $n = rn === Tn ? (0, k.F8)(rn) : (sr - (0, k.gn)(Tn)) / (Tn - rn), ur = sr / $n + rn;
          if ((0, k.tn)($n) < k.Ni) return gn.f;
          function Tr(wr, Fr) {
            var Xr = ur - Fr, un = $n * wr;
            return [Xr * (0, k.F8)(un), ur - Xr * (0, k.gn)(un)];
          }
          return Tr.invert = function(wr, Fr) {
            var Xr = ur - Fr, un = (0, k.FP)(wr, (0, k.tn)(Xr)) * (0, k._S)(Xr);
            return Xr * $n < 0 && (un -= k.pi * (0, k._S)(wr) * (0, k._S)(Xr)), [un / $n, ur - (0, k._S)($n) * (0, k.RZ)(wr * wr + Xr * Xr)];
          }, Tr;
        }
        function Xn() {
          return st(Mn).scale(131.154).center([0, 13.9389]);
        }
        var Pn = 1.340264, wn = -0.081106, Rn = 893e-6, _n = 3796e-6, En = (0, k.RZ)(3) / 2;
        function Kn(rn, Tn) {
          var sr = (0, k.qR)(En * (0, k.F8)(Tn)), $n = sr * sr, ur = $n * $n * $n;
          return [rn * (0, k.gn)(sr) / (En * (Pn + 3 * wn * $n + ur * (7 * Rn + 9 * _n * $n))), sr * (Pn + wn * $n + ur * (Rn + _n * $n))];
        }
        function Wn() {
          return (0, lt.A)(Kn).scale(177.158);
        }
        Kn.invert = function(rn, Tn) {
          for (var sr, $n = Tn, ur = $n * $n, Tr = ur * ur * ur, wr = 0; wr < 12 && (Tr = (ur = ($n -= sr = ($n * (Pn + wn * ur + Tr * (Rn + _n * ur)) - Tn) / (Pn + 3 * wn * ur + Tr * (7 * Rn + 9 * _n * ur))) * $n) * ur * ur, !((0, k.tn)(sr) < k.$t)); ++wr) ;
          return [En * rn * (Pn + 3 * wn * ur + Tr * (7 * Rn + 9 * _n * ur)) / (0, k.gn)($n), (0, k.qR)((0, k.F8)($n) / En)];
        };
        var hr = n(48419), Zn = n(913);
        function lr() {
          var rn, Tn, sr, $n, ur, Tr, wr, Fr = 1, Xr = 0, un = 0, Gn = 1, on = 1, ln = 0, bn = null, Nn = 1, jn = 1, Jn = (0, Zn.G)({ point: function(dn, Dn) {
            var nr = pn([dn, Dn]);
            this.stream.point(nr[0], nr[1]);
          } }), Hn = se.A;
          function Ln() {
            return Nn = Fr * Gn, jn = Fr * on, Tr = wr = null, pn;
          }
          function pn(dn) {
            var Dn = dn[0] * Nn, nr = dn[1] * jn;
            if (ln) {
              var pr = nr * rn - Dn * Tn;
              Dn = Dn * rn + nr * Tn, nr = pr;
            }
            return [Dn + Xr, nr + un];
          }
          return pn.invert = function(dn) {
            var Dn = dn[0] - Xr, nr = dn[1] - un;
            if (ln) {
              var pr = nr * rn + Dn * Tn;
              Dn = Dn * rn - nr * Tn, nr = pr;
            }
            return [Dn / Nn, nr / jn];
          }, pn.stream = function(dn) {
            return Tr && wr === dn ? Tr : Tr = Jn(Hn(wr = dn));
          }, pn.postclip = function(dn) {
            return arguments.length ? (Hn = dn, bn = sr = $n = ur = null, Ln()) : Hn;
          }, pn.clipExtent = function(dn) {
            return arguments.length ? (Hn = dn == null ? (bn = sr = $n = ur = null, se.A) : (0, d.A)(bn = +dn[0][0], sr = +dn[0][1], $n = +dn[1][0], ur = +dn[1][1]), Ln()) : bn == null ? null : [[bn, sr], [$n, ur]];
          }, pn.scale = function(dn) {
            return arguments.length ? (Fr = +dn, Ln()) : Fr;
          }, pn.translate = function(dn) {
            return arguments.length ? (Xr = +dn[0], un = +dn[1], Ln()) : [Xr, un];
          }, pn.angle = function(dn) {
            return arguments.length ? (ln = dn % 360 * k.F2, Tn = (0, k.F8)(ln), rn = (0, k.gn)(ln), Ln()) : ln * k.uj;
          }, pn.reflectX = function(dn) {
            return arguments.length ? (Gn = dn ? -1 : 1, Ln()) : Gn < 0;
          }, pn.reflectY = function(dn) {
            return arguments.length ? (on = dn ? -1 : 1, Ln()) : on < 0;
          }, pn.fitExtent = function(dn, Dn) {
            return (0, xt.sp)(pn, dn, Dn);
          }, pn.fitSize = function(dn, Dn) {
            return (0, xt.Hv)(pn, dn, Dn);
          }, pn.fitWidth = function(dn, Dn) {
            return (0, xt.G0)(pn, dn, Dn);
          }, pn.fitHeight = function(dn, Dn) {
            return (0, xt.FL)(pn, dn, Dn);
          }, pn;
        }
        var cr = n(57949), zr = n(53253), Wr = n(57738);
        function mr(rn, Tn) {
          var sr = (0, k.gn)(Tn), $n = 1 + (0, k.gn)(rn) * sr;
          return [sr * (0, k.F8)(rn) / $n, (0, k.F8)(Tn) / $n];
        }
        function Ir() {
          return (0, lt.A)(mr).scale(250).clipAngle(142);
        }
        function yr(rn, Tn) {
          return [(0, k.Rm)((0, k.Ml)((k.TW + Tn) / 2)), -rn];
        }
        function Vr() {
          var rn = fn(yr), Tn = rn.center, sr = rn.rotate;
          return rn.center = function($n) {
            return arguments.length ? Tn([-$n[1], $n[0]]) : [($n = Tn())[1], -$n[0]];
          }, rn.rotate = function($n) {
            return arguments.length ? sr([$n[0], $n[1], $n.length > 2 ? $n[2] + 90 : 90]) : [($n = sr())[0], $n[1], $n[2] - 90];
          }, sr([0, 0, 90]).scale(159.155);
        }
        mr.invert = (0, Wr.I)(function(rn) {
          return 2 * (0, k.rY)(rn);
        }), yr.invert = function(rn, Tn) {
          return [-Tn, 2 * (0, k.rY)((0, k.oN)(rn)) - k.TW];
        };
      }, 81758: function(o, s, n) {
        n.d(s, { A: function() {
          return u;
        } });
        var l = n(61323);
        function u(i, h) {
          var p = i[0] * l.F2, _ = i[1] * l.F2, d = h[0] * l.F2, f = h[1] * l.F2, c = (0, l.gn)(_), g = (0, l.F8)(_), m = (0, l.gn)(f), x = (0, l.F8)(f), w = c * (0, l.gn)(p), k = c * (0, l.F8)(p), S = m * (0, l.gn)(d), A = m * (0, l.F8)(d), C = 2 * (0, l.qR)((0, l.RZ)((0, l.bo)(f - _) + c * m * (0, l.bo)(d - p))), D = (0, l.F8)(C), L = C ? function(E) {
            var P = (0, l.F8)(E *= C) / D, I = (0, l.F8)(C - E) / D, M = I * w + P * S, O = I * k + P * A, T = I * g + P * x;
            return [(0, l.FP)(O, M) * l.uj, (0, l.FP)(T, (0, l.RZ)(M * M + O * O)) * l.uj];
          } : function() {
            return [p * l.uj, _ * l.uj];
          };
          return L.distance = C, L;
        }
      }, 61323: function(o, s, n) {
        n.d(s, { $t: function() {
          return u;
        }, F2: function() {
          return f;
        }, F8: function() {
          return C;
        }, FA: function() {
          return _;
        }, FP: function() {
          return m;
        }, HQ: function() {
          return P;
        }, Ml: function() {
          return E;
        }, Ni: function() {
          return l;
        }, RZ: function() {
          return L;
        }, Rm: function() {
          return S;
        }, TW: function() {
          return h;
        }, _S: function() {
          return D;
        }, bo: function() {
          return M;
        }, gn: function() {
          return x;
        }, gz: function() {
          return p;
        }, mk: function() {
          return w;
        }, n7: function() {
          return A;
        }, oN: function() {
          return k;
        }, pi: function() {
          return i;
        }, qR: function() {
          return I;
        }, rY: function() {
          return g;
        }, tn: function() {
          return c;
        }, uj: function() {
          return d;
        } });
        var l = 1e-6, u = 1e-12, i = Math.PI, h = i / 2, p = i / 4, _ = 2 * i, d = 180 / i, f = i / 180, c = Math.abs, g = Math.atan, m = Math.atan2, x = Math.cos, w = Math.ceil, k = Math.exp, S = Math.log, A = Math.pow, C = Math.sin, D = Math.sign || function(O) {
          return O > 0 ? 1 : O < 0 ? -1 : 0;
        }, L = Math.sqrt, E = Math.tan;
        function P(O) {
          return O > 1 ? 0 : O < -1 ? i : Math.acos(O);
        }
        function I(O) {
          return O > 1 ? h : O < -1 ? -h : Math.asin(O);
        }
        function M(O) {
          return (O = C(O / 2)) * O;
        }
      }, 53341: function(o, s, n) {
        function l() {
        }
        n.d(s, { A: function() {
          return l;
        } });
      }, 33028: function(o, s, n) {
        var l = n(53341), u = 1 / 0, i = u, h = -u, p = h, _ = { point: function(d, f) {
          d < u && (u = d), d > h && (h = d), f < i && (i = f), f > p && (p = f);
        }, lineStart: l.A, lineEnd: l.A, polygonStart: l.A, polygonEnd: l.A, result: function() {
          var d = [[u, i], [h, p]];
          return h = p = -(i = u = 1 / 0), d;
        } };
        s.A = _;
      }, 28759: function(o, s, n) {
        n.d(s, { A: function() {
          return u;
        } });
        var l = n(61323);
        function u(i, h) {
          return (0, l.tn)(i[0] - h[0]) < l.Ni && (0, l.tn)(i[1] - h[1]) < l.Ni;
        }
      }, 2274: function(o, s, n) {
        n.d(s, { A: function() {
          return _;
        } });
        var l = n(49353), u = n(20375), i = n(61323), h = (0, l.A)();
        function p(d) {
          return (0, i.tn)(d[0]) <= i.pi ? d[0] : (0, i._S)(d[0]) * (((0, i.tn)(d[0]) + i.pi) % i.FA - i.pi);
        }
        function _(d, f) {
          var c = p(f), g = f[1], m = (0, i.F8)(g), x = [(0, i.F8)(c), -(0, i.gn)(c), 0], w = 0, k = 0;
          h.reset(), m === 1 ? g = i.TW + i.Ni : m === -1 && (g = -i.TW - i.Ni);
          for (var S = 0, A = d.length; S < A; ++S) if (D = (C = d[S]).length) for (var C, D, L = C[D - 1], E = p(L), P = L[1] / 2 + i.gz, I = (0, i.F8)(P), M = (0, i.gn)(P), O = 0; O < D; ++O, E = z, I = U, M = V, L = T) {
            var T = C[O], z = p(T), F = T[1] / 2 + i.gz, U = (0, i.F8)(F), V = (0, i.gn)(F), $ = z - E, q = $ >= 0 ? 1 : -1, K = q * $, re = K > i.pi, Y = I * U;
            if (h.add((0, i.FP)(Y * q * (0, i.F8)(K), M * V + Y * (0, i.gn)(K))), w += re ? $ + q * i.FA : $, re ^ E >= c ^ z >= c) {
              var te = (0, u.r8)((0, u.jf)(L), (0, u.jf)(T));
              (0, u.Cx)(te);
              var ee = (0, u.r8)(x, te);
              (0, u.Cx)(ee);
              var X = (re ^ $ >= 0 ? -1 : 1) * (0, i.qR)(ee[2]);
              (g > X || g === X && (te[0] || te[1])) && (k += re ^ $ >= 0 ? 1 : -1);
            }
          }
          return (w < -i.Ni || w < i.Ni && h < -i.Ni) ^ 1 & k;
        }
      }, 57738: function(o, s, n) {
        n.d(s, { I: function() {
          return i;
        }, c: function() {
          return u;
        } });
        var l = n(61323);
        function u(h) {
          return function(p, _) {
            var d = (0, l.gn)(p), f = (0, l.gn)(_), c = h(d * f);
            return [c * f * (0, l.F8)(p), c * (0, l.F8)(_)];
          };
        }
        function i(h) {
          return function(p, _) {
            var d = (0, l.RZ)(p * p + _ * _), f = h(d), c = (0, l.F8)(f), g = (0, l.gn)(f);
            return [(0, l.FP)(p * c, d * g), (0, l.qR)(d && _ * c / d)];
          };
        }
      }, 30729: function(o, s, n) {
        n.d(s, { A: function() {
          return p;
        }, n: function() {
          return h;
        } });
        var l = n(61323), u = n(57738), i = n(94684), h = (0, u.c)(function(_) {
          return (0, l.RZ)(2 / (1 + _));
        });
        function p() {
          return (0, i.A)(h).scale(124.75).clipAngle(179.999);
        }
        h.invert = (0, u.I)(function(_) {
          return 2 * (0, l.qR)(_ / 2);
        });
      }, 61957: function(o, s, n) {
        n.d(s, { A: function() {
          return p;
        }, j: function() {
          return h;
        } });
        var l = n(61323), u = n(57738), i = n(94684), h = (0, u.c)(function(_) {
          return (_ = (0, l.HQ)(_)) && _ / (0, l.F8)(_);
        });
        function p() {
          return (0, i.A)(h).scale(79.4188).clipAngle(179.999);
        }
        h.invert = (0, u.I)(function(_) {
          return _;
        });
      }, 18139: function(o, s, n) {
        n.d(s, { A: function() {
          return i;
        }, f: function() {
          return u;
        } });
        var l = n(94684);
        function u(h, p) {
          return [h, p];
        }
        function i() {
          return (0, l.A)(u).scale(152.63);
        }
        u.invert = u;
      }, 7944: function(o, s, n) {
        n.d(s, { FL: function() {
          return d;
        }, G0: function() {
          return _;
        }, Hv: function() {
          return p;
        }, sp: function() {
          return h;
        } });
        var l = n(20465), u = n(33028);
        function i(f, c, g) {
          var m = f.clipExtent && f.clipExtent();
          return f.scale(150).translate([0, 0]), m != null && f.clipExtent(null), (0, l.A)(g, f.stream(u.A)), c(u.A.result()), m != null && f.clipExtent(m), f;
        }
        function h(f, c, g) {
          return i(f, function(m) {
            var x = c[1][0] - c[0][0], w = c[1][1] - c[0][1], k = Math.min(x / (m[1][0] - m[0][0]), w / (m[1][1] - m[0][1])), S = +c[0][0] + (x - k * (m[1][0] + m[0][0])) / 2, A = +c[0][1] + (w - k * (m[1][1] + m[0][1])) / 2;
            f.scale(150 * k).translate([S, A]);
          }, g);
        }
        function p(f, c, g) {
          return h(f, [[0, 0], c], g);
        }
        function _(f, c, g) {
          return i(f, function(m) {
            var x = +c, w = x / (m[1][0] - m[0][0]), k = (x - w * (m[1][0] + m[0][0])) / 2, S = -w * m[0][1];
            f.scale(150 * w).translate([k, S]);
          }, g);
        }
        function d(f, c, g) {
          return i(f, function(m) {
            var x = +c, w = x / (m[1][1] - m[0][1]), k = -w * m[0][0], S = (x - w * (m[1][1] + m[0][1])) / 2;
            f.scale(150 * w).translate([k, S]);
          }, g);
        }
      }, 48419: function(o, s, n) {
        n.d(s, { A: function() {
          return p;
        }, T: function() {
          return h;
        } });
        var l = n(61323), u = n(57738), i = n(94684);
        function h(_, d) {
          var f = (0, l.gn)(d), c = (0, l.gn)(_) * f;
          return [f * (0, l.F8)(_) / c, (0, l.F8)(d) / c];
        }
        function p() {
          return (0, i.A)(h).scale(144.049).clipAngle(60);
        }
        h.invert = (0, u.I)(l.rY);
      }, 94684: function(o, s, n) {
        n.d(s, { A: function() {
          return C;
        }, U: function() {
          return D;
        } });
        var l = n(42413), u = n(47402), i = n(21503), h = n(19057), p = n(26827), _ = n(61323), d = n(30915), f = n(913), c = n(7944), g = n(20375), m = 16, x = (0, _.gn)(30 * _.F2);
        function w(L, E) {
          return +E ? /* @__PURE__ */ function(P, I) {
            function M(O, T, z, F, U, V, $, q, K, re, Y, te, ee, X) {
              var Q = $ - O, ue = q - T, ce = Q * Q + ue * ue;
              if (ce > 4 * I && ee--) {
                var he = F + re, de = U + Y, ne = V + te, ae = (0, _.RZ)(he * he + de * de + ne * ne), se = (0, _.qR)(ne /= ae), me = (0, _.tn)((0, _.tn)(ne) - 1) < _.Ni || (0, _.tn)(z - K) < _.Ni ? (z + K) / 2 : (0, _.FP)(de, he), ye = P(me, se), pe = ye[0], be = ye[1], Ae = pe - O, Se = be - T, Me = ue * Ae - Q * Se;
                (Me * Me / ce > I || (0, _.tn)((Q * Ae + ue * Se) / ce - 0.5) > 0.3 || F * re + U * Y + V * te < x) && (M(O, T, z, F, U, V, pe, be, me, he /= ae, de /= ae, ne, ee, X), X.point(pe, be), M(pe, be, me, he, de, ne, $, q, K, re, Y, te, ee, X));
              }
            }
            return function(O) {
              var T, z, F, U, V, $, q, K, re, Y, te, ee, X = { point: Q, lineStart: ue, lineEnd: he, polygonStart: function() {
                O.polygonStart(), X.lineStart = de;
              }, polygonEnd: function() {
                O.polygonEnd(), X.lineStart = ue;
              } };
              function Q(se, me) {
                se = P(se, me), O.point(se[0], se[1]);
              }
              function ue() {
                K = NaN, X.point = ce, O.lineStart();
              }
              function ce(se, me) {
                var ye = (0, g.jf)([se, me]), pe = P(se, me);
                M(K, re, q, Y, te, ee, K = pe[0], re = pe[1], q = se, Y = ye[0], te = ye[1], ee = ye[2], m, O), O.point(K, re);
              }
              function he() {
                X.point = Q, O.lineEnd();
              }
              function de() {
                ue(), X.point = ne, X.lineEnd = ae;
              }
              function ne(se, me) {
                ce(T = se, me), z = K, F = re, U = Y, V = te, $ = ee, X.point = ce;
              }
              function ae() {
                M(K, re, q, Y, te, ee, z, F, T, U, V, $, m, O), X.lineEnd = he, he();
              }
              return X;
            };
          }(L, E) : function(P) {
            return (0, f.G)({ point: function(I, M) {
              I = P(I, M), this.stream.point(I[0], I[1]);
            } });
          }(L);
        }
        var k = (0, f.G)({ point: function(L, E) {
          this.stream.point(L * _.F2, E * _.F2);
        } });
        function S(L, E, P, I, M) {
          function O(T, z) {
            return [E + L * (T *= I), P - L * (z *= M)];
          }
          return O.invert = function(T, z) {
            return [(T - E) / L * I, (P - z) / L * M];
          }, O;
        }
        function A(L, E, P, I, M, O) {
          var T = (0, _.gn)(O), z = (0, _.F8)(O), F = T * L, U = z * L, V = T / L, $ = z / L, q = (z * P - T * E) / L, K = (z * E + T * P) / L;
          function re(Y, te) {
            return [F * (Y *= I) - U * (te *= M) + E, P - U * Y - F * te];
          }
          return re.invert = function(Y, te) {
            return [I * (V * Y - $ * te + q), M * (K - $ * Y - V * te)];
          }, re;
        }
        function C(L) {
          return D(function() {
            return L;
          })();
        }
        function D(L) {
          var E, P, I, M, O, T, z, F, U, V, $ = 150, q = 480, K = 250, re = 0, Y = 0, te = 0, ee = 0, X = 0, Q = 0, ue = 1, ce = 1, he = null, de = l.A, ne = null, ae = p.A, se = 0.5;
          function me(Ae) {
            return F(Ae[0] * _.F2, Ae[1] * _.F2);
          }
          function ye(Ae) {
            return (Ae = F.invert(Ae[0], Ae[1])) && [Ae[0] * _.uj, Ae[1] * _.uj];
          }
          function pe() {
            var Ae = A($, 0, 0, ue, ce, Q).apply(null, E(re, Y)), Se = (Q ? A : S)($, q - Ae[0], K - Ae[1], ue, ce, Q);
            return P = (0, d.y)(te, ee, X), z = (0, h.A)(E, Se), F = (0, h.A)(P, z), T = w(z, se), be();
          }
          function be() {
            return U = V = null, me;
          }
          return me.stream = function(Ae) {
            return U && V === Ae ? U : U = k(function(Se) {
              return (0, f.G)({ point: function(Me, De) {
                var Le = Se(Me, De);
                return this.stream.point(Le[0], Le[1]);
              } });
            }(P)(de(T(ae(V = Ae)))));
          }, me.preclip = function(Ae) {
            return arguments.length ? (de = Ae, he = void 0, be()) : de;
          }, me.postclip = function(Ae) {
            return arguments.length ? (ae = Ae, ne = I = M = O = null, be()) : ae;
          }, me.clipAngle = function(Ae) {
            return arguments.length ? (de = +Ae ? (0, u.A)(he = Ae * _.F2) : (he = null, l.A), be()) : he * _.uj;
          }, me.clipExtent = function(Ae) {
            return arguments.length ? (ae = Ae == null ? (ne = I = M = O = null, p.A) : (0, i.A)(ne = +Ae[0][0], I = +Ae[0][1], M = +Ae[1][0], O = +Ae[1][1]), be()) : ne == null ? null : [[ne, I], [M, O]];
          }, me.scale = function(Ae) {
            return arguments.length ? ($ = +Ae, pe()) : $;
          }, me.translate = function(Ae) {
            return arguments.length ? (q = +Ae[0], K = +Ae[1], pe()) : [q, K];
          }, me.center = function(Ae) {
            return arguments.length ? (re = Ae[0] % 360 * _.F2, Y = Ae[1] % 360 * _.F2, pe()) : [re * _.uj, Y * _.uj];
          }, me.rotate = function(Ae) {
            return arguments.length ? (te = Ae[0] % 360 * _.F2, ee = Ae[1] % 360 * _.F2, X = Ae.length > 2 ? Ae[2] % 360 * _.F2 : 0, pe()) : [te * _.uj, ee * _.uj, X * _.uj];
          }, me.angle = function(Ae) {
            return arguments.length ? (Q = Ae % 360 * _.F2, pe()) : Q * _.uj;
          }, me.reflectX = function(Ae) {
            return arguments.length ? (ue = Ae ? -1 : 1, pe()) : ue < 0;
          }, me.reflectY = function(Ae) {
            return arguments.length ? (ce = Ae ? -1 : 1, pe()) : ce < 0;
          }, me.precision = function(Ae) {
            return arguments.length ? (T = w(z, se = Ae * Ae), be()) : (0, _.RZ)(se);
          }, me.fitExtent = function(Ae, Se) {
            return (0, c.sp)(me, Ae, Se);
          }, me.fitSize = function(Ae, Se) {
            return (0, c.Hv)(me, Ae, Se);
          }, me.fitWidth = function(Ae, Se) {
            return (0, c.G0)(me, Ae, Se);
          }, me.fitHeight = function(Ae, Se) {
            return (0, c.FL)(me, Ae, Se);
          }, function() {
            return E = L.apply(this, arguments), me.invert = E.invert && ye, pe();
          };
        }
      }, 57949: function(o, s, n) {
        n.d(s, { A: function() {
          return h;
        }, P: function() {
          return i;
        } });
        var l = n(94684), u = n(61323);
        function i(p, _) {
          var d = _ * _, f = d * d;
          return [p * (0.8707 - 0.131979 * d + f * (f * (3971e-6 * d - 1529e-6 * f) - 0.013791)), _ * (1.007226 + d * (0.015085 + f * (0.028874 * d - 0.044475 - 5916e-6 * f)))];
        }
        function h() {
          return (0, l.A)(i).scale(175.295);
        }
        i.invert = function(p, _) {
          var d, f = _, c = 25;
          do {
            var g = f * f, m = g * g;
            f -= d = (f * (1.007226 + g * (0.015085 + m * (0.028874 * g - 0.044475 - 5916e-6 * m))) - _) / (1.007226 + g * (0.045255 + m * (0.259866 * g - 0.311325 - 0.06507600000000001 * m)));
          } while ((0, u.tn)(d) > u.Ni && --c > 0);
          return [p / (0.8707 + (g = f * f) * (g * (g * g * g * (3971e-6 - 1529e-6 * g) - 0.013791) - 0.131979)), f];
        };
      }, 53253: function(o, s, n) {
        n.d(s, { A: function() {
          return p;
        }, x: function() {
          return h;
        } });
        var l = n(61323), u = n(57738), i = n(94684);
        function h(_, d) {
          return [(0, l.gn)(d) * (0, l.F8)(_), (0, l.F8)(d)];
        }
        function p() {
          return (0, i.A)(h).scale(249.5).clipAngle(90 + l.Ni);
        }
        h.invert = (0, u.I)(l.qR);
      }, 30915: function(o, s, n) {
        n.d(s, { A: function() {
          return f;
        }, y: function() {
          return h;
        } });
        var l = n(19057), u = n(61323);
        function i(c, g) {
          return [(0, u.tn)(c) > u.pi ? c + Math.round(-c / u.FA) * u.FA : c, g];
        }
        function h(c, g, m) {
          return (c %= u.FA) ? g || m ? (0, l.A)(_(c), d(g, m)) : _(c) : g || m ? d(g, m) : i;
        }
        function p(c) {
          return function(g, m) {
            return [(g += c) > u.pi ? g - u.FA : g < -u.pi ? g + u.FA : g, m];
          };
        }
        function _(c) {
          var g = p(c);
          return g.invert = p(-c), g;
        }
        function d(c, g) {
          var m = (0, u.gn)(c), x = (0, u.F8)(c), w = (0, u.gn)(g), k = (0, u.F8)(g);
          function S(A, C) {
            var D = (0, u.gn)(C), L = (0, u.gn)(A) * D, E = (0, u.F8)(A) * D, P = (0, u.F8)(C), I = P * m + L * x;
            return [(0, u.FP)(E * w - I * k, L * m - P * x), (0, u.qR)(I * w + E * k)];
          }
          return S.invert = function(A, C) {
            var D = (0, u.gn)(C), L = (0, u.gn)(A) * D, E = (0, u.F8)(A) * D, P = (0, u.F8)(C), I = P * w - E * k;
            return [(0, u.FP)(E * w + P * k, L * m + I * x), (0, u.qR)(I * m - L * x)];
          }, S;
        }
        function f(c) {
          function g(m) {
            return (m = c(m[0] * u.F2, m[1] * u.F2))[0] *= u.uj, m[1] *= u.uj, m;
          }
          return c = h(c[0] * u.F2, c[1] * u.F2, c.length > 2 ? c[2] * u.F2 : 0), g.invert = function(m) {
            return (m = c.invert(m[0] * u.F2, m[1] * u.F2))[0] *= u.uj, m[1] *= u.uj, m;
          }, g;
        }
        i.invert = i;
      }, 20465: function(o, s, n) {
        function l(d, f) {
          d && i.hasOwnProperty(d.type) && i[d.type](d, f);
        }
        n.d(s, { A: function() {
          return _;
        } });
        var u = { Feature: function(d, f) {
          l(d.geometry, f);
        }, FeatureCollection: function(d, f) {
          for (var c = d.features, g = -1, m = c.length; ++g < m; ) l(c[g].geometry, f);
        } }, i = { Sphere: function(d, f) {
          f.sphere();
        }, Point: function(d, f) {
          d = d.coordinates, f.point(d[0], d[1], d[2]);
        }, MultiPoint: function(d, f) {
          for (var c = d.coordinates, g = -1, m = c.length; ++g < m; ) d = c[g], f.point(d[0], d[1], d[2]);
        }, LineString: function(d, f) {
          h(d.coordinates, f, 0);
        }, MultiLineString: function(d, f) {
          for (var c = d.coordinates, g = -1, m = c.length; ++g < m; ) h(c[g], f, 0);
        }, Polygon: function(d, f) {
          p(d.coordinates, f);
        }, MultiPolygon: function(d, f) {
          for (var c = d.coordinates, g = -1, m = c.length; ++g < m; ) p(c[g], f);
        }, GeometryCollection: function(d, f) {
          for (var c = d.geometries, g = -1, m = c.length; ++g < m; ) l(c[g], f);
        } };
        function h(d, f, c) {
          var g, m = -1, x = d.length - c;
          for (f.lineStart(); ++m < x; ) g = d[m], f.point(g[0], g[1], g[2]);
          f.lineEnd();
        }
        function p(d, f) {
          var c = -1, g = d.length;
          for (f.polygonStart(); ++c < g; ) h(d[c], f, 1);
          f.polygonEnd();
        }
        function _(d, f) {
          d && u.hasOwnProperty(d.type) ? u[d.type](d, f) : l(d, f);
        }
      }, 913: function(o, s, n) {
        function l(h) {
          return { stream: u(h) };
        }
        function u(h) {
          return function(p) {
            var _ = new i();
            for (var d in h) _[d] = h[d];
            return _.stream = p, _;
          };
        }
        function i() {
        }
        n.d(s, { A: function() {
          return l;
        }, G: function() {
          return u;
        } }), i.prototype = { constructor: i, point: function(h, p) {
          this.stream.point(h, p);
        }, sphere: function() {
          this.stream.sphere();
        }, lineStart: function() {
          this.stream.lineStart();
        }, lineEnd: function() {
          this.stream.lineEnd();
        }, polygonStart: function() {
          this.stream.polygonStart();
        }, polygonEnd: function() {
          this.stream.polygonEnd();
        } };
      }, 92264: function(o, s, n) {
        function l(Ie, ge) {
          return Ie.parent === ge.parent ? 1 : 2;
        }
        function u(Ie, ge) {
          return Ie + ge.x;
        }
        function i(Ie, ge) {
          return Math.max(Ie, ge.y);
        }
        function h() {
          var Ie = l, ge = 1, Ce = 1, we = !1;
          function Ge(Re) {
            var je, Ke = 0;
            Re.eachAfter(function(Ze) {
              var ct = Ze.children;
              ct ? (Ze.x = function(ft) {
                return ft.reduce(u, 0) / ft.length;
              }(ct), Ze.y = function(ft) {
                return 1 + ft.reduce(i, 0);
              }(ct)) : (Ze.x = je ? Ke += Ie(Ze, je) : 0, Ze.y = 0, je = Ze);
            });
            var tt = function(Ze) {
              for (var ct; ct = Ze.children; ) Ze = ct[0];
              return Ze;
            }(Re), _e = function(Ze) {
              for (var ct; ct = Ze.children; ) Ze = ct[ct.length - 1];
              return Ze;
            }(Re), Be = tt.x - Ie(tt, _e) / 2, $e = _e.x + Ie(_e, tt) / 2;
            return Re.eachAfter(we ? function(Ze) {
              Ze.x = (Ze.x - Re.x) * ge, Ze.y = (Re.y - Ze.y) * Ce;
            } : function(Ze) {
              Ze.x = (Ze.x - Be) / ($e - Be) * ge, Ze.y = (1 - (Re.y ? Ze.y / Re.y : 1)) * Ce;
            });
          }
          return Ge.separation = function(Re) {
            return arguments.length ? (Ie = Re, Ge) : Ie;
          }, Ge.size = function(Re) {
            return arguments.length ? (we = !1, ge = +Re[0], Ce = +Re[1], Ge) : we ? null : [ge, Ce];
          }, Ge.nodeSize = function(Re) {
            return arguments.length ? (we = !0, ge = +Re[0], Ce = +Re[1], Ge) : we ? [ge, Ce] : null;
          }, Ge;
        }
        function p(Ie) {
          var ge = 0, Ce = Ie.children, we = Ce && Ce.length;
          if (we) for (; --we >= 0; ) ge += Ce[we].value;
          else ge = 1;
          Ie.value = ge;
        }
        function _(Ie, ge) {
          var Ce, we, Ge, Re, je, Ke = new g(Ie), tt = +Ie.value && (Ke.value = Ie.value), _e = [Ke];
          for (ge == null && (ge = d); Ce = _e.pop(); ) if (tt && (Ce.value = +Ce.data.value), (Ge = ge(Ce.data)) && (je = Ge.length)) for (Ce.children = new Array(je), Re = je - 1; Re >= 0; --Re) _e.push(we = Ce.children[Re] = new g(Ge[Re])), we.parent = Ce, we.depth = Ce.depth + 1;
          return Ke.eachBefore(c);
        }
        function d(Ie) {
          return Ie.children;
        }
        function f(Ie) {
          Ie.data = Ie.data.data;
        }
        function c(Ie) {
          var ge = 0;
          do
            Ie.height = ge;
          while ((Ie = Ie.parent) && Ie.height < ++ge);
        }
        function g(Ie) {
          this.data = Ie, this.depth = this.height = 0, this.parent = null;
        }
        n.r(s), n.d(s, { cluster: function() {
          return h;
        }, hierarchy: function() {
          return _;
        }, pack: function() {
          return $;
        }, packEnclose: function() {
          return x;
        }, packSiblings: function() {
          return T;
        }, partition: function() {
          return ee;
        }, stratify: function() {
          return de;
        }, tree: function() {
          return be;
        }, treemap: function() {
          return Le;
        }, treemapBinary: function() {
          return We;
        }, treemapDice: function() {
          return te;
        }, treemapResquarify: function() {
          return Ne;
        }, treemapSlice: function() {
          return Ae;
        }, treemapSliceDice: function() {
          return Ee;
        }, treemapSquarify: function() {
          return De;
        } }), g.prototype = _.prototype = { constructor: g, count: function() {
          return this.eachAfter(p);
        }, each: function(Ie) {
          var ge, Ce, we, Ge, Re = this, je = [Re];
          do
            for (ge = je.reverse(), je = []; Re = ge.pop(); ) if (Ie(Re), Ce = Re.children) for (we = 0, Ge = Ce.length; we < Ge; ++we) je.push(Ce[we]);
          while (je.length);
          return this;
        }, eachAfter: function(Ie) {
          for (var ge, Ce, we, Ge = this, Re = [Ge], je = []; Ge = Re.pop(); ) if (je.push(Ge), ge = Ge.children) for (Ce = 0, we = ge.length; Ce < we; ++Ce) Re.push(ge[Ce]);
          for (; Ge = je.pop(); ) Ie(Ge);
          return this;
        }, eachBefore: function(Ie) {
          for (var ge, Ce, we = this, Ge = [we]; we = Ge.pop(); ) if (Ie(we), ge = we.children) for (Ce = ge.length - 1; Ce >= 0; --Ce) Ge.push(ge[Ce]);
          return this;
        }, sum: function(Ie) {
          return this.eachAfter(function(ge) {
            for (var Ce = +Ie(ge.data) || 0, we = ge.children, Ge = we && we.length; --Ge >= 0; ) Ce += we[Ge].value;
            ge.value = Ce;
          });
        }, sort: function(Ie) {
          return this.eachBefore(function(ge) {
            ge.children && ge.children.sort(Ie);
          });
        }, path: function(Ie) {
          for (var ge = this, Ce = function(Re, je) {
            if (Re === je) return Re;
            var Ke = Re.ancestors(), tt = je.ancestors(), _e = null;
            for (Re = Ke.pop(), je = tt.pop(); Re === je; ) _e = Re, Re = Ke.pop(), je = tt.pop();
            return _e;
          }(ge, Ie), we = [ge]; ge !== Ce; ) ge = ge.parent, we.push(ge);
          for (var Ge = we.length; Ie !== Ce; ) we.splice(Ge, 0, Ie), Ie = Ie.parent;
          return we;
        }, ancestors: function() {
          for (var Ie = this, ge = [Ie]; Ie = Ie.parent; ) ge.push(Ie);
          return ge;
        }, descendants: function() {
          var Ie = [];
          return this.each(function(ge) {
            Ie.push(ge);
          }), Ie;
        }, leaves: function() {
          var Ie = [];
          return this.eachBefore(function(ge) {
            ge.children || Ie.push(ge);
          }), Ie;
        }, links: function() {
          var Ie = this, ge = [];
          return Ie.each(function(Ce) {
            Ce !== Ie && ge.push({ source: Ce.parent, target: Ce });
          }), ge;
        }, copy: function() {
          return _(this).eachBefore(f);
        } };
        var m = Array.prototype.slice;
        function x(Ie) {
          for (var ge, Ce, we = 0, Ge = (Ie = function(je) {
            for (var Ke, tt, _e = je.length; _e; ) tt = Math.random() * _e-- | 0, Ke = je[_e], je[_e] = je[tt], je[tt] = Ke;
            return je;
          }(m.call(Ie))).length, Re = []; we < Ge; ) ge = Ie[we], Ce && S(Ce, ge) ? ++we : (Ce = C(Re = w(Re, ge)), we = 0);
          return Ce;
        }
        function w(Ie, ge) {
          var Ce, we;
          if (A(ge, Ie)) return [ge];
          for (Ce = 0; Ce < Ie.length; ++Ce) if (k(ge, Ie[Ce]) && A(D(Ie[Ce], ge), Ie)) return [Ie[Ce], ge];
          for (Ce = 0; Ce < Ie.length - 1; ++Ce) for (we = Ce + 1; we < Ie.length; ++we) if (k(D(Ie[Ce], Ie[we]), ge) && k(D(Ie[Ce], ge), Ie[we]) && k(D(Ie[we], ge), Ie[Ce]) && A(L(Ie[Ce], Ie[we], ge), Ie)) return [Ie[Ce], Ie[we], ge];
          throw new Error();
        }
        function k(Ie, ge) {
          var Ce = Ie.r - ge.r, we = ge.x - Ie.x, Ge = ge.y - Ie.y;
          return Ce < 0 || Ce * Ce < we * we + Ge * Ge;
        }
        function S(Ie, ge) {
          var Ce = Ie.r - ge.r + 1e-6, we = ge.x - Ie.x, Ge = ge.y - Ie.y;
          return Ce > 0 && Ce * Ce > we * we + Ge * Ge;
        }
        function A(Ie, ge) {
          for (var Ce = 0; Ce < ge.length; ++Ce) if (!S(Ie, ge[Ce])) return !1;
          return !0;
        }
        function C(Ie) {
          switch (Ie.length) {
            case 1:
              return { x: (ge = Ie[0]).x, y: ge.y, r: ge.r };
            case 2:
              return D(Ie[0], Ie[1]);
            case 3:
              return L(Ie[0], Ie[1], Ie[2]);
          }
          var ge;
        }
        function D(Ie, ge) {
          var Ce = Ie.x, we = Ie.y, Ge = Ie.r, Re = ge.x, je = ge.y, Ke = ge.r, tt = Re - Ce, _e = je - we, Be = Ke - Ge, $e = Math.sqrt(tt * tt + _e * _e);
          return { x: (Ce + Re + tt / $e * Be) / 2, y: (we + je + _e / $e * Be) / 2, r: ($e + Ge + Ke) / 2 };
        }
        function L(Ie, ge, Ce) {
          var we = Ie.x, Ge = Ie.y, Re = Ie.r, je = ge.x, Ke = ge.y, tt = ge.r, _e = Ce.x, Be = Ce.y, $e = Ce.r, Ze = we - je, ct = we - _e, ft = Ge - Ke, _t = Ge - Be, Pt = tt - Re, Dt = $e - Re, $t = we * we + Ge * Ge - Re * Re, Gt = $t - je * je - Ke * Ke + tt * tt, Wt = $t - _e * _e - Be * Be + $e * $e, mt = ct * ft - Ze * _t, at = (ft * Wt - _t * Gt) / (2 * mt) - we, vt = (_t * Pt - ft * Dt) / mt, St = (ct * Gt - Ze * Wt) / (2 * mt) - Ge, Je = (Ze * Dt - ct * Pt) / mt, nt = vt * vt + Je * Je - 1, ot = 2 * (Re + at * vt + St * Je), Ye = at * at + St * St - Re * Re, Fe = -(nt ? (ot + Math.sqrt(ot * ot - 4 * nt * Ye)) / (2 * nt) : Ye / ot);
          return { x: we + at + vt * Fe, y: Ge + St + Je * Fe, r: Fe };
        }
        function E(Ie, ge, Ce) {
          var we, Ge, Re, je, Ke = Ie.x - ge.x, tt = Ie.y - ge.y, _e = Ke * Ke + tt * tt;
          _e ? (Ge = ge.r + Ce.r, Ge *= Ge, je = Ie.r + Ce.r, Ge > (je *= je) ? (we = (_e + je - Ge) / (2 * _e), Re = Math.sqrt(Math.max(0, je / _e - we * we)), Ce.x = Ie.x - we * Ke - Re * tt, Ce.y = Ie.y - we * tt + Re * Ke) : (we = (_e + Ge - je) / (2 * _e), Re = Math.sqrt(Math.max(0, Ge / _e - we * we)), Ce.x = ge.x + we * Ke - Re * tt, Ce.y = ge.y + we * tt + Re * Ke)) : (Ce.x = ge.x + Ce.r, Ce.y = ge.y);
        }
        function P(Ie, ge) {
          var Ce = Ie.r + ge.r - 1e-6, we = ge.x - Ie.x, Ge = ge.y - Ie.y;
          return Ce > 0 && Ce * Ce > we * we + Ge * Ge;
        }
        function I(Ie) {
          var ge = Ie._, Ce = Ie.next._, we = ge.r + Ce.r, Ge = (ge.x * Ce.r + Ce.x * ge.r) / we, Re = (ge.y * Ce.r + Ce.y * ge.r) / we;
          return Ge * Ge + Re * Re;
        }
        function M(Ie) {
          this._ = Ie, this.next = null, this.previous = null;
        }
        function O(Ie) {
          if (!(Ge = Ie.length)) return 0;
          var ge, Ce, we, Ge, Re, je, Ke, tt, _e, Be, $e;
          if ((ge = Ie[0]).x = 0, ge.y = 0, !(Ge > 1)) return ge.r;
          if (Ce = Ie[1], ge.x = -Ce.r, Ce.x = ge.r, Ce.y = 0, !(Ge > 2)) return ge.r + Ce.r;
          E(Ce, ge, we = Ie[2]), ge = new M(ge), Ce = new M(Ce), we = new M(we), ge.next = we.previous = Ce, Ce.next = ge.previous = we, we.next = Ce.previous = ge;
          e: for (Ke = 3; Ke < Ge; ++Ke) {
            E(ge._, Ce._, we = Ie[Ke]), we = new M(we), tt = Ce.next, _e = ge.previous, Be = Ce._.r, $e = ge._.r;
            do
              if (Be <= $e) {
                if (P(tt._, we._)) {
                  Ce = tt, ge.next = Ce, Ce.previous = ge, --Ke;
                  continue e;
                }
                Be += tt._.r, tt = tt.next;
              } else {
                if (P(_e._, we._)) {
                  (ge = _e).next = Ce, Ce.previous = ge, --Ke;
                  continue e;
                }
                $e += _e._.r, _e = _e.previous;
              }
            while (tt !== _e.next);
            for (we.previous = ge, we.next = Ce, ge.next = Ce.previous = Ce = we, Re = I(ge); (we = we.next) !== Ce; ) (je = I(we)) < Re && (ge = we, Re = je);
            Ce = ge.next;
          }
          for (ge = [Ce._], we = Ce; (we = we.next) !== Ce; ) ge.push(we._);
          for (we = x(ge), Ke = 0; Ke < Ge; ++Ke) (ge = Ie[Ke]).x -= we.x, ge.y -= we.y;
          return we.r;
        }
        function T(Ie) {
          return O(Ie), Ie;
        }
        function z(Ie) {
          if (typeof Ie != "function") throw new Error();
          return Ie;
        }
        function F() {
          return 0;
        }
        function U(Ie) {
          return function() {
            return Ie;
          };
        }
        function V(Ie) {
          return Math.sqrt(Ie.value);
        }
        function $() {
          var Ie = null, ge = 1, Ce = 1, we = F;
          function Ge(Re) {
            return Re.x = ge / 2, Re.y = Ce / 2, Ie ? Re.eachBefore(q(Ie)).eachAfter(K(we, 0.5)).eachBefore(re(1)) : Re.eachBefore(q(V)).eachAfter(K(F, 1)).eachAfter(K(we, Re.r / Math.min(ge, Ce))).eachBefore(re(Math.min(ge, Ce) / (2 * Re.r))), Re;
          }
          return Ge.radius = function(Re) {
            return arguments.length ? (Ie = (je = Re) == null ? null : z(je), Ge) : Ie;
            var je;
          }, Ge.size = function(Re) {
            return arguments.length ? (ge = +Re[0], Ce = +Re[1], Ge) : [ge, Ce];
          }, Ge.padding = function(Re) {
            return arguments.length ? (we = typeof Re == "function" ? Re : U(+Re), Ge) : we;
          }, Ge;
        }
        function q(Ie) {
          return function(ge) {
            ge.children || (ge.r = Math.max(0, +Ie(ge) || 0));
          };
        }
        function K(Ie, ge) {
          return function(Ce) {
            if (we = Ce.children) {
              var we, Ge, Re, je = we.length, Ke = Ie(Ce) * ge || 0;
              if (Ke) for (Ge = 0; Ge < je; ++Ge) we[Ge].r += Ke;
              if (Re = O(we), Ke) for (Ge = 0; Ge < je; ++Ge) we[Ge].r -= Ke;
              Ce.r = Re + Ke;
            }
          };
        }
        function re(Ie) {
          return function(ge) {
            var Ce = ge.parent;
            ge.r *= Ie, Ce && (ge.x = Ce.x + Ie * ge.x, ge.y = Ce.y + Ie * ge.y);
          };
        }
        function Y(Ie) {
          Ie.x0 = Math.round(Ie.x0), Ie.y0 = Math.round(Ie.y0), Ie.x1 = Math.round(Ie.x1), Ie.y1 = Math.round(Ie.y1);
        }
        function te(Ie, ge, Ce, we, Ge) {
          for (var Re, je = Ie.children, Ke = -1, tt = je.length, _e = Ie.value && (we - ge) / Ie.value; ++Ke < tt; ) (Re = je[Ke]).y0 = Ce, Re.y1 = Ge, Re.x0 = ge, Re.x1 = ge += Re.value * _e;
        }
        function ee() {
          var Ie = 1, ge = 1, Ce = 0, we = !1;
          function Ge(Re) {
            var je = Re.height + 1;
            return Re.x0 = Re.y0 = Ce, Re.x1 = Ie, Re.y1 = ge / je, Re.eachBefore(/* @__PURE__ */ function(Ke, tt) {
              return function(_e) {
                _e.children && te(_e, _e.x0, Ke * (_e.depth + 1) / tt, _e.x1, Ke * (_e.depth + 2) / tt);
                var Be = _e.x0, $e = _e.y0, Ze = _e.x1 - Ce, ct = _e.y1 - Ce;
                Ze < Be && (Be = Ze = (Be + Ze) / 2), ct < $e && ($e = ct = ($e + ct) / 2), _e.x0 = Be, _e.y0 = $e, _e.x1 = Ze, _e.y1 = ct;
              };
            }(ge, je)), we && Re.eachBefore(Y), Re;
          }
          return Ge.round = function(Re) {
            return arguments.length ? (we = !!Re, Ge) : we;
          }, Ge.size = function(Re) {
            return arguments.length ? (Ie = +Re[0], ge = +Re[1], Ge) : [Ie, ge];
          }, Ge.padding = function(Re) {
            return arguments.length ? (Ce = +Re, Ge) : Ce;
          }, Ge;
        }
        var X = "$", Q = { depth: -1 }, ue = {};
        function ce(Ie) {
          return Ie.id;
        }
        function he(Ie) {
          return Ie.parentId;
        }
        function de() {
          var Ie = ce, ge = he;
          function Ce(we) {
            var Ge, Re, je, Ke, tt, _e, Be, $e = we.length, Ze = new Array($e), ct = {};
            for (Re = 0; Re < $e; ++Re) Ge = we[Re], tt = Ze[Re] = new g(Ge), (_e = Ie(Ge, Re, we)) != null && (_e += "") && (ct[Be = X + (tt.id = _e)] = Be in ct ? ue : tt);
            for (Re = 0; Re < $e; ++Re) if (tt = Ze[Re], (_e = ge(we[Re], Re, we)) != null && (_e += "")) {
              if (!(Ke = ct[X + _e])) throw new Error("missing: " + _e);
              if (Ke === ue) throw new Error("ambiguous: " + _e);
              Ke.children ? Ke.children.push(tt) : Ke.children = [tt], tt.parent = Ke;
            } else {
              if (je) throw new Error("multiple roots");
              je = tt;
            }
            if (!je) throw new Error("no root");
            if (je.parent = Q, je.eachBefore(function(ft) {
              ft.depth = ft.parent.depth + 1, --$e;
            }).eachBefore(c), je.parent = null, $e > 0) throw new Error("cycle");
            return je;
          }
          return Ce.id = function(we) {
            return arguments.length ? (Ie = z(we), Ce) : Ie;
          }, Ce.parentId = function(we) {
            return arguments.length ? (ge = z(we), Ce) : ge;
          }, Ce;
        }
        function ne(Ie, ge) {
          return Ie.parent === ge.parent ? 1 : 2;
        }
        function ae(Ie) {
          var ge = Ie.children;
          return ge ? ge[0] : Ie.t;
        }
        function se(Ie) {
          var ge = Ie.children;
          return ge ? ge[ge.length - 1] : Ie.t;
        }
        function me(Ie, ge, Ce) {
          var we = Ce / (ge.i - Ie.i);
          ge.c -= we, ge.s += Ce, Ie.c += we, ge.z += Ce, ge.m += Ce;
        }
        function ye(Ie, ge, Ce) {
          return Ie.a.parent === ge.parent ? Ie.a : Ce;
        }
        function pe(Ie, ge) {
          this._ = Ie, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = ge;
        }
        function be() {
          var Ie = ne, ge = 1, Ce = 1, we = null;
          function Ge(tt) {
            var _e = function(Dt) {
              for (var $t, Gt, Wt, mt, at, vt = new pe(Dt, 0), St = [vt]; $t = St.pop(); ) if (Wt = $t._.children) for ($t.children = new Array(at = Wt.length), mt = at - 1; mt >= 0; --mt) St.push(Gt = $t.children[mt] = new pe(Wt[mt], mt)), Gt.parent = $t;
              return (vt.parent = new pe(null, 0)).children = [vt], vt;
            }(tt);
            if (_e.eachAfter(Re), _e.parent.m = -_e.z, _e.eachBefore(je), we) tt.eachBefore(Ke);
            else {
              var Be = tt, $e = tt, Ze = tt;
              tt.eachBefore(function(Dt) {
                Dt.x < Be.x && (Be = Dt), Dt.x > $e.x && ($e = Dt), Dt.depth > Ze.depth && (Ze = Dt);
              });
              var ct = Be === $e ? 1 : Ie(Be, $e) / 2, ft = ct - Be.x, _t = ge / ($e.x + ct + ft), Pt = Ce / (Ze.depth || 1);
              tt.eachBefore(function(Dt) {
                Dt.x = (Dt.x + ft) * _t, Dt.y = Dt.depth * Pt;
              });
            }
            return tt;
          }
          function Re(tt) {
            var _e = tt.children, Be = tt.parent.children, $e = tt.i ? Be[tt.i - 1] : null;
            if (_e) {
              (function(ct) {
                for (var ft, _t = 0, Pt = 0, Dt = ct.children, $t = Dt.length; --$t >= 0; ) (ft = Dt[$t]).z += _t, ft.m += _t, _t += ft.s + (Pt += ft.c);
              })(tt);
              var Ze = (_e[0].z + _e[_e.length - 1].z) / 2;
              $e ? (tt.z = $e.z + Ie(tt._, $e._), tt.m = tt.z - Ze) : tt.z = Ze;
            } else $e && (tt.z = $e.z + Ie(tt._, $e._));
            tt.parent.A = function(ct, ft, _t) {
              if (ft) {
                for (var Pt, Dt = ct, $t = ct, Gt = ft, Wt = Dt.parent.children[0], mt = Dt.m, at = $t.m, vt = Gt.m, St = Wt.m; Gt = se(Gt), Dt = ae(Dt), Gt && Dt; ) Wt = ae(Wt), ($t = se($t)).a = ct, (Pt = Gt.z + vt - Dt.z - mt + Ie(Gt._, Dt._)) > 0 && (me(ye(Gt, ct, _t), ct, Pt), mt += Pt, at += Pt), vt += Gt.m, mt += Dt.m, St += Wt.m, at += $t.m;
                Gt && !se($t) && ($t.t = Gt, $t.m += vt - at), Dt && !ae(Wt) && (Wt.t = Dt, Wt.m += mt - St, _t = ct);
              }
              return _t;
            }(tt, $e, tt.parent.A || Be[0]);
          }
          function je(tt) {
            tt._.x = tt.z + tt.parent.m, tt.m += tt.parent.m;
          }
          function Ke(tt) {
            tt.x *= ge, tt.y = tt.depth * Ce;
          }
          return Ge.separation = function(tt) {
            return arguments.length ? (Ie = tt, Ge) : Ie;
          }, Ge.size = function(tt) {
            return arguments.length ? (we = !1, ge = +tt[0], Ce = +tt[1], Ge) : we ? null : [ge, Ce];
          }, Ge.nodeSize = function(tt) {
            return arguments.length ? (we = !0, ge = +tt[0], Ce = +tt[1], Ge) : we ? [ge, Ce] : null;
          }, Ge;
        }
        function Ae(Ie, ge, Ce, we, Ge) {
          for (var Re, je = Ie.children, Ke = -1, tt = je.length, _e = Ie.value && (Ge - Ce) / Ie.value; ++Ke < tt; ) (Re = je[Ke]).x0 = ge, Re.x1 = we, Re.y0 = Ce, Re.y1 = Ce += Re.value * _e;
        }
        pe.prototype = Object.create(g.prototype);
        var Se = (1 + Math.sqrt(5)) / 2;
        function Me(Ie, ge, Ce, we, Ge, Re) {
          for (var je, Ke, tt, _e, Be, $e, Ze, ct, ft, _t, Pt, Dt = [], $t = ge.children, Gt = 0, Wt = 0, mt = $t.length, at = ge.value; Gt < mt; ) {
            tt = Ge - Ce, _e = Re - we;
            do
              Be = $t[Wt++].value;
            while (!Be && Wt < mt);
            for ($e = Ze = Be, Pt = Be * Be * (_t = Math.max(_e / tt, tt / _e) / (at * Ie)), ft = Math.max(Ze / Pt, Pt / $e); Wt < mt; ++Wt) {
              if (Be += Ke = $t[Wt].value, Ke < $e && ($e = Ke), Ke > Ze && (Ze = Ke), Pt = Be * Be * _t, (ct = Math.max(Ze / Pt, Pt / $e)) > ft) {
                Be -= Ke;
                break;
              }
              ft = ct;
            }
            Dt.push(je = { value: Be, dice: tt < _e, children: $t.slice(Gt, Wt) }), je.dice ? te(je, Ce, we, Ge, at ? we += _e * Be / at : Re) : Ae(je, Ce, we, at ? Ce += tt * Be / at : Ge, Re), at -= Be, Gt = Wt;
          }
          return Dt;
        }
        var De = function Ie(ge) {
          function Ce(we, Ge, Re, je, Ke) {
            Me(ge, we, Ge, Re, je, Ke);
          }
          return Ce.ratio = function(we) {
            return Ie((we = +we) > 1 ? we : 1);
          }, Ce;
        }(Se);
        function Le() {
          var Ie = De, ge = !1, Ce = 1, we = 1, Ge = [0], Re = F, je = F, Ke = F, tt = F, _e = F;
          function Be(Ze) {
            return Ze.x0 = Ze.y0 = 0, Ze.x1 = Ce, Ze.y1 = we, Ze.eachBefore($e), Ge = [0], ge && Ze.eachBefore(Y), Ze;
          }
          function $e(Ze) {
            var ct = Ge[Ze.depth], ft = Ze.x0 + ct, _t = Ze.y0 + ct, Pt = Ze.x1 - ct, Dt = Ze.y1 - ct;
            Pt < ft && (ft = Pt = (ft + Pt) / 2), Dt < _t && (_t = Dt = (_t + Dt) / 2), Ze.x0 = ft, Ze.y0 = _t, Ze.x1 = Pt, Ze.y1 = Dt, Ze.children && (ct = Ge[Ze.depth + 1] = Re(Ze) / 2, ft += _e(Ze) - ct, _t += je(Ze) - ct, (Pt -= Ke(Ze) - ct) < ft && (ft = Pt = (ft + Pt) / 2), (Dt -= tt(Ze) - ct) < _t && (_t = Dt = (_t + Dt) / 2), Ie(Ze, ft, _t, Pt, Dt));
          }
          return Be.round = function(Ze) {
            return arguments.length ? (ge = !!Ze, Be) : ge;
          }, Be.size = function(Ze) {
            return arguments.length ? (Ce = +Ze[0], we = +Ze[1], Be) : [Ce, we];
          }, Be.tile = function(Ze) {
            return arguments.length ? (Ie = z(Ze), Be) : Ie;
          }, Be.padding = function(Ze) {
            return arguments.length ? Be.paddingInner(Ze).paddingOuter(Ze) : Be.paddingInner();
          }, Be.paddingInner = function(Ze) {
            return arguments.length ? (Re = typeof Ze == "function" ? Ze : U(+Ze), Be) : Re;
          }, Be.paddingOuter = function(Ze) {
            return arguments.length ? Be.paddingTop(Ze).paddingRight(Ze).paddingBottom(Ze).paddingLeft(Ze) : Be.paddingTop();
          }, Be.paddingTop = function(Ze) {
            return arguments.length ? (je = typeof Ze == "function" ? Ze : U(+Ze), Be) : je;
          }, Be.paddingRight = function(Ze) {
            return arguments.length ? (Ke = typeof Ze == "function" ? Ze : U(+Ze), Be) : Ke;
          }, Be.paddingBottom = function(Ze) {
            return arguments.length ? (tt = typeof Ze == "function" ? Ze : U(+Ze), Be) : tt;
          }, Be.paddingLeft = function(Ze) {
            return arguments.length ? (_e = typeof Ze == "function" ? Ze : U(+Ze), Be) : _e;
          }, Be;
        }
        function We(Ie, ge, Ce, we, Ge) {
          var Re, je, Ke = Ie.children, tt = Ke.length, _e = new Array(tt + 1);
          for (_e[0] = je = Re = 0; Re < tt; ++Re) _e[Re + 1] = je += Ke[Re].value;
          (function Be($e, Ze, ct, ft, _t, Pt, Dt) {
            if ($e >= Ze - 1) {
              var $t = Ke[$e];
              return $t.x0 = ft, $t.y0 = _t, $t.x1 = Pt, void ($t.y1 = Dt);
            }
            for (var Gt = _e[$e], Wt = ct / 2 + Gt, mt = $e + 1, at = Ze - 1; mt < at; ) {
              var vt = mt + at >>> 1;
              _e[vt] < Wt ? mt = vt + 1 : at = vt;
            }
            Wt - _e[mt - 1] < _e[mt] - Wt && $e + 1 < mt && --mt;
            var St = _e[mt] - Gt, Je = ct - St;
            if (Pt - ft > Dt - _t) {
              var nt = (ft * Je + Pt * St) / ct;
              Be($e, mt, St, ft, _t, nt, Dt), Be(mt, Ze, Je, nt, _t, Pt, Dt);
            } else {
              var ot = (_t * Je + Dt * St) / ct;
              Be($e, mt, St, ft, _t, Pt, ot), Be(mt, Ze, Je, ft, ot, Pt, Dt);
            }
          })(0, tt, Ie.value, ge, Ce, we, Ge);
        }
        function Ee(Ie, ge, Ce, we, Ge) {
          (1 & Ie.depth ? Ae : te)(Ie, ge, Ce, we, Ge);
        }
        var Ne = function Ie(ge) {
          function Ce(we, Ge, Re, je, Ke) {
            if ((tt = we._squarify) && tt.ratio === ge) for (var tt, _e, Be, $e, Ze, ct = -1, ft = tt.length, _t = we.value; ++ct < ft; ) {
              for (Be = (_e = tt[ct]).children, $e = _e.value = 0, Ze = Be.length; $e < Ze; ++$e) _e.value += Be[$e].value;
              _e.dice ? te(_e, Ge, Re, je, Re += (Ke - Re) * _e.value / _t) : Ae(_e, Ge, Re, Ge += (je - Ge) * _e.value / _t, Ke), _t -= _e.value;
            }
            else we._squarify = tt = Me(ge, we, Ge, Re, je, Ke), tt.ratio = ge;
          }
          return Ce.ratio = function(we) {
            return Ie((we = +we) > 1 ? we : 1);
          }, Ce;
        }(Se);
      }, 48544: function(o, s, n) {
        n.d(s, { pq: function() {
          return S;
        } });
        var l = Math.PI, u = 2 * l, i = 1e-6, h = u - i;
        function p() {
          this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
        }
        function _() {
          return new p();
        }
        p.prototype = _.prototype = { constructor: p, moveTo: function(A, C) {
          this._ += "M" + (this._x0 = this._x1 = +A) + "," + (this._y0 = this._y1 = +C);
        }, closePath: function() {
          this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
        }, lineTo: function(A, C) {
          this._ += "L" + (this._x1 = +A) + "," + (this._y1 = +C);
        }, quadraticCurveTo: function(A, C, D, L) {
          this._ += "Q" + +A + "," + +C + "," + (this._x1 = +D) + "," + (this._y1 = +L);
        }, bezierCurveTo: function(A, C, D, L, E, P) {
          this._ += "C" + +A + "," + +C + "," + +D + "," + +L + "," + (this._x1 = +E) + "," + (this._y1 = +P);
        }, arcTo: function(A, C, D, L, E) {
          A = +A, C = +C, D = +D, L = +L, E = +E;
          var P = this._x1, I = this._y1, M = D - A, O = L - C, T = P - A, z = I - C, F = T * T + z * z;
          if (E < 0) throw new Error("negative radius: " + E);
          if (this._x1 === null) this._ += "M" + (this._x1 = A) + "," + (this._y1 = C);
          else if (F > i) if (Math.abs(z * M - O * T) > i && E) {
            var U = D - P, V = L - I, $ = M * M + O * O, q = U * U + V * V, K = Math.sqrt($), re = Math.sqrt(F), Y = E * Math.tan((l - Math.acos(($ + F - q) / (2 * K * re))) / 2), te = Y / re, ee = Y / K;
            Math.abs(te - 1) > i && (this._ += "L" + (A + te * T) + "," + (C + te * z)), this._ += "A" + E + "," + E + ",0,0," + +(z * U > T * V) + "," + (this._x1 = A + ee * M) + "," + (this._y1 = C + ee * O);
          } else this._ += "L" + (this._x1 = A) + "," + (this._y1 = C);
        }, arc: function(A, C, D, L, E, P) {
          A = +A, C = +C, P = !!P;
          var I = (D = +D) * Math.cos(L), M = D * Math.sin(L), O = A + I, T = C + M, z = 1 ^ P, F = P ? L - E : E - L;
          if (D < 0) throw new Error("negative radius: " + D);
          this._x1 === null ? this._ += "M" + O + "," + T : (Math.abs(this._x1 - O) > i || Math.abs(this._y1 - T) > i) && (this._ += "L" + O + "," + T), D && (F < 0 && (F = F % u + u), F > h ? this._ += "A" + D + "," + D + ",0,1," + z + "," + (A - I) + "," + (C - M) + "A" + D + "," + D + ",0,1," + z + "," + (this._x1 = O) + "," + (this._y1 = T) : F > i && (this._ += "A" + D + "," + D + ",0," + +(F >= l) + "," + z + "," + (this._x1 = A + D * Math.cos(E)) + "," + (this._y1 = C + D * Math.sin(E))));
        }, rect: function(A, C, D, L) {
          this._ += "M" + (this._x0 = this._x1 = +A) + "," + (this._y0 = this._y1 = +C) + "h" + +D + "v" + +L + "h" + -D + "Z";
        }, toString: function() {
          return this._;
        } };
        var d = _, f = Array.prototype.slice;
        function c(A) {
          return function() {
            return A;
          };
        }
        function g(A) {
          return A[0];
        }
        function m(A) {
          return A[1];
        }
        function x(A) {
          return A.source;
        }
        function w(A) {
          return A.target;
        }
        function k(A, C, D, L, E) {
          A.moveTo(C, D), A.bezierCurveTo(C = (C + L) / 2, D, C, E, L, E);
        }
        function S() {
          return function(A) {
            var C = x, D = w, L = g, E = m, P = null;
            function I() {
              var M, O = f.call(arguments), T = C.apply(this, O), z = D.apply(this, O);
              if (P || (P = M = d()), A(P, +L.apply(this, (O[0] = T, O)), +E.apply(this, O), +L.apply(this, (O[0] = z, O)), +E.apply(this, O)), M) return P = null, M + "" || null;
            }
            return I.source = function(M) {
              return arguments.length ? (C = M, I) : C;
            }, I.target = function(M) {
              return arguments.length ? (D = M, I) : D;
            }, I.x = function(M) {
              return arguments.length ? (L = typeof M == "function" ? M : c(+M), I) : L;
            }, I.y = function(M) {
              return arguments.length ? (E = typeof M == "function" ? M : c(+M), I) : E;
            }, I.context = function(M) {
              return arguments.length ? (P = M ?? null, I) : P;
            }, I;
          }(k);
        }
      }, 42696: function(o, s, n) {
        n.d(s, { DC: function() {
          return x;
        }, de: function() {
          return g;
        }, aL: function() {
          return w;
        } });
        var l = n(1681), u = n(72543), i = n(55735), h = n(47265), p = n(9830), _ = n(59764);
        function d(mt) {
          if (0 <= mt.y && mt.y < 100) {
            var at = new Date(-1, mt.m, mt.d, mt.H, mt.M, mt.S, mt.L);
            return at.setFullYear(mt.y), at;
          }
          return new Date(mt.y, mt.m, mt.d, mt.H, mt.M, mt.S, mt.L);
        }
        function f(mt) {
          if (0 <= mt.y && mt.y < 100) {
            var at = new Date(Date.UTC(-1, mt.m, mt.d, mt.H, mt.M, mt.S, mt.L));
            return at.setUTCFullYear(mt.y), at;
          }
          return new Date(Date.UTC(mt.y, mt.m, mt.d, mt.H, mt.M, mt.S, mt.L));
        }
        function c(mt, at, vt) {
          return { y: mt, m: at, d: vt, H: 0, M: 0, S: 0, L: 0 };
        }
        function g(mt) {
          var at = mt.dateTime, vt = mt.date, St = mt.time, Je = mt.periods, nt = mt.days, ot = mt.shortDays, Ye = mt.months, Fe = mt.shortMonths, pt = E(Je), Mt = P(Je), At = E(nt), Rt = P(nt), Ft = E(ot), lt = P(ot), st = E(Ye), Ot = P(Ye), kt = E(Fe), Bt = P(Fe), xt = { a: function(sn) {
            return ot[sn.getDay()];
          }, A: function(sn) {
            return nt[sn.getDay()];
          }, b: function(sn) {
            return Fe[sn.getMonth()];
          }, B: function(sn) {
            return Ye[sn.getMonth()];
          }, c: null, d: de, e: de, f: ye, H: ne, I: ae, j: se, L: me, m: pe, M: be, p: function(sn) {
            return Je[+(sn.getHours() >= 12)];
          }, q: function(sn) {
            return 1 + ~~(sn.getMonth() / 3);
          }, Q: Gt, s: Wt, S: Ae, u: Se, U: Me, V: De, w: Le, W: We, x: null, X: null, y: Ee, Y: Ne, Z: Ie, "%": $t }, Jt = { a: function(sn) {
            return ot[sn.getUTCDay()];
          }, A: function(sn) {
            return nt[sn.getUTCDay()];
          }, b: function(sn) {
            return Fe[sn.getUTCMonth()];
          }, B: function(sn) {
            return Ye[sn.getUTCMonth()];
          }, c: null, d: ge, e: ge, f: je, H: Ce, I: we, j: Ge, L: Re, m: Ke, M: tt, p: function(sn) {
            return Je[+(sn.getUTCHours() >= 12)];
          }, q: function(sn) {
            return 1 + ~~(sn.getUTCMonth() / 3);
          }, Q: Gt, s: Wt, S: _e, u: Be, U: $e, V: Ze, w: ct, W: ft, x: null, X: null, y: _t, Y: Pt, Z: Dt, "%": $t }, qt = { a: function(sn, fn, In) {
            var zn = Ft.exec(fn.slice(In));
            return zn ? (sn.w = lt[zn[0].toLowerCase()], In + zn[0].length) : -1;
          }, A: function(sn, fn, In) {
            var zn = At.exec(fn.slice(In));
            return zn ? (sn.w = Rt[zn[0].toLowerCase()], In + zn[0].length) : -1;
          }, b: function(sn, fn, In) {
            var zn = kt.exec(fn.slice(In));
            return zn ? (sn.m = Bt[zn[0].toLowerCase()], In + zn[0].length) : -1;
          }, B: function(sn, fn, In) {
            var zn = st.exec(fn.slice(In));
            return zn ? (sn.m = Ot[zn[0].toLowerCase()], In + zn[0].length) : -1;
          }, c: function(sn, fn, In) {
            return Ht(sn, at, fn, In);
          }, d: K, e: K, f: Q, H: Y, I: Y, j: re, L: X, m: q, M: te, p: function(sn, fn, In) {
            var zn = pt.exec(fn.slice(In));
            return zn ? (sn.p = Mt[zn[0].toLowerCase()], In + zn[0].length) : -1;
          }, q: $, Q: ce, s: he, S: ee, u: M, U: O, V: T, w: I, W: z, x: function(sn, fn, In) {
            return Ht(sn, vt, fn, In);
          }, X: function(sn, fn, In) {
            return Ht(sn, St, fn, In);
          }, y: U, Y: F, Z: V, "%": ue };
          function en(sn, fn) {
            return function(In) {
              var zn, Cn, gn, Mn = [], Xn = -1, Pn = 0, wn = sn.length;
              for (In instanceof Date || (In = /* @__PURE__ */ new Date(+In)); ++Xn < wn; ) sn.charCodeAt(Xn) === 37 && (Mn.push(sn.slice(Pn, Xn)), (Cn = k[zn = sn.charAt(++Xn)]) != null ? zn = sn.charAt(++Xn) : Cn = zn === "e" ? " " : "0", (gn = fn[zn]) && (zn = gn(In, Cn)), Mn.push(zn), Pn = Xn + 1);
              return Mn.push(sn.slice(Pn, Xn)), Mn.join("");
            };
          }
          function Yt(sn, fn) {
            return function(In) {
              var zn, Cn, gn = c(1900, void 0, 1);
              if (Ht(gn, sn, In += "", 0) != In.length) return null;
              if ("Q" in gn) return new Date(gn.Q);
              if ("s" in gn) return new Date(1e3 * gn.s + ("L" in gn ? gn.L : 0));
              if (fn && !("Z" in gn) && (gn.Z = 0), "p" in gn && (gn.H = gn.H % 12 + 12 * gn.p), gn.m === void 0 && (gn.m = "q" in gn ? gn.q : 0), "V" in gn) {
                if (gn.V < 1 || gn.V > 53) return null;
                "w" in gn || (gn.w = 1), "Z" in gn ? (Cn = (zn = f(c(gn.y, 0, 1))).getUTCDay(), zn = Cn > 4 || Cn === 0 ? l.rt.ceil(zn) : (0, l.rt)(zn), zn = u.A.offset(zn, 7 * (gn.V - 1)), gn.y = zn.getUTCFullYear(), gn.m = zn.getUTCMonth(), gn.d = zn.getUTCDate() + (gn.w + 6) % 7) : (Cn = (zn = d(c(gn.y, 0, 1))).getDay(), zn = Cn > 4 || Cn === 0 ? i.By.ceil(zn) : (0, i.By)(zn), zn = h.A.offset(zn, 7 * (gn.V - 1)), gn.y = zn.getFullYear(), gn.m = zn.getMonth(), gn.d = zn.getDate() + (gn.w + 6) % 7);
              } else ("W" in gn || "U" in gn) && ("w" in gn || (gn.w = "u" in gn ? gn.u % 7 : "W" in gn ? 1 : 0), Cn = "Z" in gn ? f(c(gn.y, 0, 1)).getUTCDay() : d(c(gn.y, 0, 1)).getDay(), gn.m = 0, gn.d = "W" in gn ? (gn.w + 6) % 7 + 7 * gn.W - (Cn + 5) % 7 : gn.w + 7 * gn.U - (Cn + 6) % 7);
              return "Z" in gn ? (gn.H += gn.Z / 100 | 0, gn.M += gn.Z % 100, f(gn)) : d(gn);
            };
          }
          function Ht(sn, fn, In, zn) {
            for (var Cn, gn, Mn = 0, Xn = fn.length, Pn = In.length; Mn < Xn; ) {
              if (zn >= Pn) return -1;
              if ((Cn = fn.charCodeAt(Mn++)) === 37) {
                if (Cn = fn.charAt(Mn++), !(gn = qt[Cn in k ? fn.charAt(Mn++) : Cn]) || (zn = gn(sn, In, zn)) < 0) return -1;
              } else if (Cn != In.charCodeAt(zn++)) return -1;
            }
            return zn;
          }
          return xt.x = en(vt, xt), xt.X = en(St, xt), xt.c = en(at, xt), Jt.x = en(vt, Jt), Jt.X = en(St, Jt), Jt.c = en(at, Jt), { format: function(sn) {
            var fn = en(sn += "", xt);
            return fn.toString = function() {
              return sn;
            }, fn;
          }, parse: function(sn) {
            var fn = Yt(sn += "", !1);
            return fn.toString = function() {
              return sn;
            }, fn;
          }, utcFormat: function(sn) {
            var fn = en(sn += "", Jt);
            return fn.toString = function() {
              return sn;
            }, fn;
          }, utcParse: function(sn) {
            var fn = Yt(sn += "", !0);
            return fn.toString = function() {
              return sn;
            }, fn;
          } };
        }
        var m, x, w, k = { "-": "", _: " ", 0: "0" }, S = /^\s*\d+/, A = /^%/, C = /[\\^$*+?|[\]().{}]/g;
        function D(mt, at, vt) {
          var St = mt < 0 ? "-" : "", Je = (St ? -mt : mt) + "", nt = Je.length;
          return St + (nt < vt ? new Array(vt - nt + 1).join(at) + Je : Je);
        }
        function L(mt) {
          return mt.replace(C, "\\$&");
        }
        function E(mt) {
          return new RegExp("^(?:" + mt.map(L).join("|") + ")", "i");
        }
        function P(mt) {
          for (var at = {}, vt = -1, St = mt.length; ++vt < St; ) at[mt[vt].toLowerCase()] = vt;
          return at;
        }
        function I(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 1));
          return St ? (mt.w = +St[0], vt + St[0].length) : -1;
        }
        function M(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 1));
          return St ? (mt.u = +St[0], vt + St[0].length) : -1;
        }
        function O(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.U = +St[0], vt + St[0].length) : -1;
        }
        function T(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.V = +St[0], vt + St[0].length) : -1;
        }
        function z(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.W = +St[0], vt + St[0].length) : -1;
        }
        function F(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 4));
          return St ? (mt.y = +St[0], vt + St[0].length) : -1;
        }
        function U(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.y = +St[0] + (+St[0] > 68 ? 1900 : 2e3), vt + St[0].length) : -1;
        }
        function V(mt, at, vt) {
          var St = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(at.slice(vt, vt + 6));
          return St ? (mt.Z = St[1] ? 0 : -(St[2] + (St[3] || "00")), vt + St[0].length) : -1;
        }
        function $(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 1));
          return St ? (mt.q = 3 * St[0] - 3, vt + St[0].length) : -1;
        }
        function q(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.m = St[0] - 1, vt + St[0].length) : -1;
        }
        function K(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.d = +St[0], vt + St[0].length) : -1;
        }
        function re(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 3));
          return St ? (mt.m = 0, mt.d = +St[0], vt + St[0].length) : -1;
        }
        function Y(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.H = +St[0], vt + St[0].length) : -1;
        }
        function te(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.M = +St[0], vt + St[0].length) : -1;
        }
        function ee(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 2));
          return St ? (mt.S = +St[0], vt + St[0].length) : -1;
        }
        function X(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 3));
          return St ? (mt.L = +St[0], vt + St[0].length) : -1;
        }
        function Q(mt, at, vt) {
          var St = S.exec(at.slice(vt, vt + 6));
          return St ? (mt.L = Math.floor(St[0] / 1e3), vt + St[0].length) : -1;
        }
        function ue(mt, at, vt) {
          var St = A.exec(at.slice(vt, vt + 1));
          return St ? vt + St[0].length : -1;
        }
        function ce(mt, at, vt) {
          var St = S.exec(at.slice(vt));
          return St ? (mt.Q = +St[0], vt + St[0].length) : -1;
        }
        function he(mt, at, vt) {
          var St = S.exec(at.slice(vt));
          return St ? (mt.s = +St[0], vt + St[0].length) : -1;
        }
        function de(mt, at) {
          return D(mt.getDate(), at, 2);
        }
        function ne(mt, at) {
          return D(mt.getHours(), at, 2);
        }
        function ae(mt, at) {
          return D(mt.getHours() % 12 || 12, at, 2);
        }
        function se(mt, at) {
          return D(1 + h.A.count((0, p.A)(mt), mt), at, 3);
        }
        function me(mt, at) {
          return D(mt.getMilliseconds(), at, 3);
        }
        function ye(mt, at) {
          return me(mt, at) + "000";
        }
        function pe(mt, at) {
          return D(mt.getMonth() + 1, at, 2);
        }
        function be(mt, at) {
          return D(mt.getMinutes(), at, 2);
        }
        function Ae(mt, at) {
          return D(mt.getSeconds(), at, 2);
        }
        function Se(mt) {
          var at = mt.getDay();
          return at === 0 ? 7 : at;
        }
        function Me(mt, at) {
          return D(i.fz.count((0, p.A)(mt) - 1, mt), at, 2);
        }
        function De(mt, at) {
          var vt = mt.getDay();
          return mt = vt >= 4 || vt === 0 ? (0, i.dt)(mt) : i.dt.ceil(mt), D(i.dt.count((0, p.A)(mt), mt) + ((0, p.A)(mt).getDay() === 4), at, 2);
        }
        function Le(mt) {
          return mt.getDay();
        }
        function We(mt, at) {
          return D(i.By.count((0, p.A)(mt) - 1, mt), at, 2);
        }
        function Ee(mt, at) {
          return D(mt.getFullYear() % 100, at, 2);
        }
        function Ne(mt, at) {
          return D(mt.getFullYear() % 1e4, at, 4);
        }
        function Ie(mt) {
          var at = mt.getTimezoneOffset();
          return (at > 0 ? "-" : (at *= -1, "+")) + D(at / 60 | 0, "0", 2) + D(at % 60, "0", 2);
        }
        function ge(mt, at) {
          return D(mt.getUTCDate(), at, 2);
        }
        function Ce(mt, at) {
          return D(mt.getUTCHours(), at, 2);
        }
        function we(mt, at) {
          return D(mt.getUTCHours() % 12 || 12, at, 2);
        }
        function Ge(mt, at) {
          return D(1 + u.A.count((0, _.A)(mt), mt), at, 3);
        }
        function Re(mt, at) {
          return D(mt.getUTCMilliseconds(), at, 3);
        }
        function je(mt, at) {
          return Re(mt, at) + "000";
        }
        function Ke(mt, at) {
          return D(mt.getUTCMonth() + 1, at, 2);
        }
        function tt(mt, at) {
          return D(mt.getUTCMinutes(), at, 2);
        }
        function _e(mt, at) {
          return D(mt.getUTCSeconds(), at, 2);
        }
        function Be(mt) {
          var at = mt.getUTCDay();
          return at === 0 ? 7 : at;
        }
        function $e(mt, at) {
          return D(l.Hl.count((0, _.A)(mt) - 1, mt), at, 2);
        }
        function Ze(mt, at) {
          var vt = mt.getUTCDay();
          return mt = vt >= 4 || vt === 0 ? (0, l.pT)(mt) : l.pT.ceil(mt), D(l.pT.count((0, _.A)(mt), mt) + ((0, _.A)(mt).getUTCDay() === 4), at, 2);
        }
        function ct(mt) {
          return mt.getUTCDay();
        }
        function ft(mt, at) {
          return D(l.rt.count((0, _.A)(mt) - 1, mt), at, 2);
        }
        function _t(mt, at) {
          return D(mt.getUTCFullYear() % 100, at, 2);
        }
        function Pt(mt, at) {
          return D(mt.getUTCFullYear() % 1e4, at, 4);
        }
        function Dt() {
          return "+0000";
        }
        function $t() {
          return "%";
        }
        function Gt(mt) {
          return +mt;
        }
        function Wt(mt) {
          return Math.floor(+mt / 1e3);
        }
        m = g({ dateTime: "%x, %X", date: "%-m/%-d/%Y", time: "%-I:%M:%S %p", periods: ["AM", "PM"], days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }), x = m.format, m.parse, w = m.utcFormat, m.utcParse;
      }, 47265: function(o, s, n) {
        n.d(s, { _: function() {
          return h;
        } });
        var l = n(53398), u = n(66291), i = (0, l.A)(function(p) {
          p.setHours(0, 0, 0, 0);
        }, function(p, _) {
          p.setDate(p.getDate() + _);
        }, function(p, _) {
          return (_ - p - (_.getTimezoneOffset() - p.getTimezoneOffset()) * u.rR) / u.Nm;
        }, function(p) {
          return p.getDate() - 1;
        });
        s.A = i;
        var h = i.range;
      }, 66291: function(o, s, n) {
        n.d(s, { Fq: function() {
          return p;
        }, JJ: function() {
          return i;
        }, Nm: function() {
          return h;
        }, Tt: function() {
          return l;
        }, rR: function() {
          return u;
        } });
        var l = 1e3, u = 6e4, i = 36e5, h = 864e5, p = 6048e5;
      }, 50936: function(o, s, n) {
        n.r(s), n.d(s, { timeDay: function() {
          return S.A;
        }, timeDays: function() {
          return S._;
        }, timeFriday: function() {
          return A.Sh;
        }, timeFridays: function() {
          return A.tz;
        }, timeHour: function() {
          return w;
        }, timeHours: function() {
          return k;
        }, timeInterval: function() {
          return l.A;
        }, timeMillisecond: function() {
          return i;
        }, timeMilliseconds: function() {
          return h;
        }, timeMinute: function() {
          return g;
        }, timeMinutes: function() {
          return m;
        }, timeMonday: function() {
          return A.By;
        }, timeMondays: function() {
          return A.KP;
        }, timeMonth: function() {
          return D;
        }, timeMonths: function() {
          return L;
        }, timeSaturday: function() {
          return A.kS;
        }, timeSaturdays: function() {
          return A.t$;
        }, timeSecond: function() {
          return d;
        }, timeSeconds: function() {
          return f;
        }, timeSunday: function() {
          return A.fz;
        }, timeSundays: function() {
          return A.se;
        }, timeThursday: function() {
          return A.dt;
        }, timeThursdays: function() {
          return A.Q$;
        }, timeTuesday: function() {
          return A.eQ;
        }, timeTuesdays: function() {
          return A.yW;
        }, timeWednesday: function() {
          return A.l3;
        }, timeWednesdays: function() {
          return A.gf;
        }, timeWeek: function() {
          return A.fz;
        }, timeWeeks: function() {
          return A.se;
        }, timeYear: function() {
          return E.A;
        }, timeYears: function() {
          return E.V;
        }, utcDay: function() {
          return F.A;
        }, utcDays: function() {
          return F.o;
        }, utcFriday: function() {
          return U.a1;
        }, utcFridays: function() {
          return U.Zn;
        }, utcHour: function() {
          return T;
        }, utcHours: function() {
          return z;
        }, utcMillisecond: function() {
          return i;
        }, utcMilliseconds: function() {
          return h;
        }, utcMinute: function() {
          return I;
        }, utcMinutes: function() {
          return M;
        }, utcMonday: function() {
          return U.rt;
        }, utcMondays: function() {
          return U.ON;
        }, utcMonth: function() {
          return $;
        }, utcMonths: function() {
          return q;
        }, utcSaturday: function() {
          return U.c8;
        }, utcSaturdays: function() {
          return U.Xo;
        }, utcSecond: function() {
          return d;
        }, utcSeconds: function() {
          return f;
        }, utcSunday: function() {
          return U.Hl;
        }, utcSundays: function() {
          return U.aZ;
        }, utcThursday: function() {
          return U.pT;
        }, utcThursdays: function() {
          return U.wr;
        }, utcTuesday: function() {
          return U.sr;
        }, utcTuesdays: function() {
          return U.jN;
        }, utcWednesday: function() {
          return U.z2;
        }, utcWednesdays: function() {
          return U.G6;
        }, utcWeek: function() {
          return U.Hl;
        }, utcWeeks: function() {
          return U.aZ;
        }, utcYear: function() {
          return K.A;
        }, utcYears: function() {
          return K.j;
        } });
        var l = n(53398), u = (0, l.A)(function() {
        }, function(re, Y) {
          re.setTime(+re + Y);
        }, function(re, Y) {
          return Y - re;
        });
        u.every = function(re) {
          return re = Math.floor(re), isFinite(re) && re > 0 ? re > 1 ? (0, l.A)(function(Y) {
            Y.setTime(Math.floor(Y / re) * re);
          }, function(Y, te) {
            Y.setTime(+Y + te * re);
          }, function(Y, te) {
            return (te - Y) / re;
          }) : u : null;
        };
        var i = u, h = u.range, p = n(66291), _ = (0, l.A)(function(re) {
          re.setTime(re - re.getMilliseconds());
        }, function(re, Y) {
          re.setTime(+re + Y * p.Tt);
        }, function(re, Y) {
          return (Y - re) / p.Tt;
        }, function(re) {
          return re.getUTCSeconds();
        }), d = _, f = _.range, c = (0, l.A)(function(re) {
          re.setTime(re - re.getMilliseconds() - re.getSeconds() * p.Tt);
        }, function(re, Y) {
          re.setTime(+re + Y * p.rR);
        }, function(re, Y) {
          return (Y - re) / p.rR;
        }, function(re) {
          return re.getMinutes();
        }), g = c, m = c.range, x = (0, l.A)(function(re) {
          re.setTime(re - re.getMilliseconds() - re.getSeconds() * p.Tt - re.getMinutes() * p.rR);
        }, function(re, Y) {
          re.setTime(+re + Y * p.JJ);
        }, function(re, Y) {
          return (Y - re) / p.JJ;
        }, function(re) {
          return re.getHours();
        }), w = x, k = x.range, S = n(47265), A = n(55735), C = (0, l.A)(function(re) {
          re.setDate(1), re.setHours(0, 0, 0, 0);
        }, function(re, Y) {
          re.setMonth(re.getMonth() + Y);
        }, function(re, Y) {
          return Y.getMonth() - re.getMonth() + 12 * (Y.getFullYear() - re.getFullYear());
        }, function(re) {
          return re.getMonth();
        }), D = C, L = C.range, E = n(9830), P = (0, l.A)(function(re) {
          re.setUTCSeconds(0, 0);
        }, function(re, Y) {
          re.setTime(+re + Y * p.rR);
        }, function(re, Y) {
          return (Y - re) / p.rR;
        }, function(re) {
          return re.getUTCMinutes();
        }), I = P, M = P.range, O = (0, l.A)(function(re) {
          re.setUTCMinutes(0, 0, 0);
        }, function(re, Y) {
          re.setTime(+re + Y * p.JJ);
        }, function(re, Y) {
          return (Y - re) / p.JJ;
        }, function(re) {
          return re.getUTCHours();
        }), T = O, z = O.range, F = n(72543), U = n(1681), V = (0, l.A)(function(re) {
          re.setUTCDate(1), re.setUTCHours(0, 0, 0, 0);
        }, function(re, Y) {
          re.setUTCMonth(re.getUTCMonth() + Y);
        }, function(re, Y) {
          return Y.getUTCMonth() - re.getUTCMonth() + 12 * (Y.getUTCFullYear() - re.getUTCFullYear());
        }, function(re) {
          return re.getUTCMonth();
        }), $ = V, q = V.range, K = n(59764);
      }, 53398: function(o, s, n) {
        n.d(s, { A: function() {
          return i;
        } });
        var l = /* @__PURE__ */ new Date(), u = /* @__PURE__ */ new Date();
        function i(h, p, _, d) {
          function f(c) {
            return h(c = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+c)), c;
          }
          return f.floor = function(c) {
            return h(c = /* @__PURE__ */ new Date(+c)), c;
          }, f.ceil = function(c) {
            return h(c = new Date(c - 1)), p(c, 1), h(c), c;
          }, f.round = function(c) {
            var g = f(c), m = f.ceil(c);
            return c - g < m - c ? g : m;
          }, f.offset = function(c, g) {
            return p(c = /* @__PURE__ */ new Date(+c), g == null ? 1 : Math.floor(g)), c;
          }, f.range = function(c, g, m) {
            var x, w = [];
            if (c = f.ceil(c), m = m == null ? 1 : Math.floor(m), !(c < g && m > 0)) return w;
            do
              w.push(x = /* @__PURE__ */ new Date(+c)), p(c, m), h(c);
            while (x < c && c < g);
            return w;
          }, f.filter = function(c) {
            return i(function(g) {
              if (g >= g) for (; h(g), !c(g); ) g.setTime(g - 1);
            }, function(g, m) {
              if (g >= g) if (m < 0) for (; ++m <= 0; ) for (; p(g, -1), !c(g); ) ;
              else for (; --m >= 0; ) for (; p(g, 1), !c(g); ) ;
            });
          }, _ && (f.count = function(c, g) {
            return l.setTime(+c), u.setTime(+g), h(l), h(u), Math.floor(_(l, u));
          }, f.every = function(c) {
            return c = Math.floor(c), isFinite(c) && c > 0 ? c > 1 ? f.filter(d ? function(g) {
              return d(g) % c == 0;
            } : function(g) {
              return f.count(0, g) % c == 0;
            }) : f : null;
          }), f;
        }
      }, 72543: function(o, s, n) {
        n.d(s, { o: function() {
          return h;
        } });
        var l = n(53398), u = n(66291), i = (0, l.A)(function(p) {
          p.setUTCHours(0, 0, 0, 0);
        }, function(p, _) {
          p.setUTCDate(p.getUTCDate() + _);
        }, function(p, _) {
          return (_ - p) / u.Nm;
        }, function(p) {
          return p.getUTCDate() - 1;
        });
        s.A = i;
        var h = i.range;
      }, 1681: function(o, s, n) {
        n.d(s, { G6: function() {
          return k;
        }, Hl: function() {
          return h;
        }, ON: function() {
          return x;
        }, Xo: function() {
          return C;
        }, Zn: function() {
          return A;
        }, a1: function() {
          return c;
        }, aZ: function() {
          return m;
        }, c8: function() {
          return g;
        }, jN: function() {
          return w;
        }, pT: function() {
          return f;
        }, rt: function() {
          return p;
        }, sr: function() {
          return _;
        }, wr: function() {
          return S;
        }, z2: function() {
          return d;
        } });
        var l = n(53398), u = n(66291);
        function i(D) {
          return (0, l.A)(function(L) {
            L.setUTCDate(L.getUTCDate() - (L.getUTCDay() + 7 - D) % 7), L.setUTCHours(0, 0, 0, 0);
          }, function(L, E) {
            L.setUTCDate(L.getUTCDate() + 7 * E);
          }, function(L, E) {
            return (E - L) / u.Fq;
          });
        }
        var h = i(0), p = i(1), _ = i(2), d = i(3), f = i(4), c = i(5), g = i(6), m = h.range, x = p.range, w = _.range, k = d.range, S = f.range, A = c.range, C = g.range;
      }, 59764: function(o, s, n) {
        n.d(s, { j: function() {
          return i;
        } });
        var l = n(53398), u = (0, l.A)(function(h) {
          h.setUTCMonth(0, 1), h.setUTCHours(0, 0, 0, 0);
        }, function(h, p) {
          h.setUTCFullYear(h.getUTCFullYear() + p);
        }, function(h, p) {
          return p.getUTCFullYear() - h.getUTCFullYear();
        }, function(h) {
          return h.getUTCFullYear();
        });
        u.every = function(h) {
          return isFinite(h = Math.floor(h)) && h > 0 ? (0, l.A)(function(p) {
            p.setUTCFullYear(Math.floor(p.getUTCFullYear() / h) * h), p.setUTCMonth(0, 1), p.setUTCHours(0, 0, 0, 0);
          }, function(p, _) {
            p.setUTCFullYear(p.getUTCFullYear() + _ * h);
          }) : null;
        }, s.A = u;
        var i = u.range;
      }, 55735: function(o, s, n) {
        n.d(s, { By: function() {
          return p;
        }, KP: function() {
          return x;
        }, Q$: function() {
          return S;
        }, Sh: function() {
          return c;
        }, dt: function() {
          return f;
        }, eQ: function() {
          return _;
        }, fz: function() {
          return h;
        }, gf: function() {
          return k;
        }, kS: function() {
          return g;
        }, l3: function() {
          return d;
        }, se: function() {
          return m;
        }, t$: function() {
          return C;
        }, tz: function() {
          return A;
        }, yW: function() {
          return w;
        } });
        var l = n(53398), u = n(66291);
        function i(D) {
          return (0, l.A)(function(L) {
            L.setDate(L.getDate() - (L.getDay() + 7 - D) % 7), L.setHours(0, 0, 0, 0);
          }, function(L, E) {
            L.setDate(L.getDate() + 7 * E);
          }, function(L, E) {
            return (E - L - (E.getTimezoneOffset() - L.getTimezoneOffset()) * u.rR) / u.Fq;
          });
        }
        var h = i(0), p = i(1), _ = i(2), d = i(3), f = i(4), c = i(5), g = i(6), m = h.range, x = p.range, w = _.range, k = d.range, S = f.range, A = c.range, C = g.range;
      }, 9830: function(o, s, n) {
        n.d(s, { V: function() {
          return i;
        } });
        var l = n(53398), u = (0, l.A)(function(h) {
          h.setMonth(0, 1), h.setHours(0, 0, 0, 0);
        }, function(h, p) {
          h.setFullYear(h.getFullYear() + p);
        }, function(h, p) {
          return p.getFullYear() - h.getFullYear();
        }, function(h) {
          return h.getFullYear();
        });
        u.every = function(h) {
          return isFinite(h = Math.floor(h)) && h > 0 ? (0, l.A)(function(p) {
            p.setFullYear(Math.floor(p.getFullYear() / h) * h), p.setMonth(0, 1), p.setHours(0, 0, 0, 0);
          }, function(p, _) {
            p.setFullYear(p.getFullYear() + _ * h);
          }) : null;
        }, s.A = u;
        var i = u.range;
      }, 70973: function(o, s, n) {
        var l = n(40891), u = n(98800), i = n(48631), h = n(52991);
        o.exports = function(p, _, d) {
          if (!p || typeof p != "object" && typeof p != "function") throw new i("`obj` must be an object or a function`");
          if (typeof _ != "string" && typeof _ != "symbol") throw new i("`property` must be a string or a symbol`");
          if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null) throw new i("`nonEnumerable`, if provided, must be a boolean or null");
          if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null) throw new i("`nonWritable`, if provided, must be a boolean or null");
          if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null) throw new i("`nonConfigurable`, if provided, must be a boolean or null");
          if (arguments.length > 6 && typeof arguments[6] != "boolean") throw new i("`loose`, if provided, must be a boolean");
          var f = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, g = arguments.length > 5 ? arguments[5] : null, m = arguments.length > 6 && arguments[6], x = !!h && h(p, _);
          if (l) l(p, _, { configurable: g === null && x ? x.configurable : !g, enumerable: f === null && x ? x.enumerable : !f, value: d, writable: c === null && x ? x.writable : !c });
          else {
            if (!m && (f || c || g)) throw new u("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
            p[_] = d;
          }
        };
      }, 97936: function(o, s, n) {
        var l = n(99433), u = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", i = Object.prototype.toString, h = Array.prototype.concat, p = Object.defineProperty, _ = n(74268)(), d = p && _, f = function(g, m, x, w) {
          if (m in g) {
            if (w === !0) {
              if (g[m] === x) return;
            } else if (typeof (k = w) != "function" || i.call(k) !== "[object Function]" || !w()) return;
          }
          var k;
          d ? p(g, m, { configurable: !0, enumerable: !1, value: x, writable: !0 }) : g[m] = x;
        }, c = function(g, m) {
          var x = arguments.length > 2 ? arguments[2] : {}, w = l(m);
          u && (w = h.call(w, Object.getOwnPropertySymbols(m)));
          for (var k = 0; k < w.length; k += 1) f(g, w[k], m[w[k]], x[w[k]]);
        };
        c.supportsDescriptors = !!d, o.exports = c;
      }, 68650: function(o) {
        o.exports = function() {
          for (var s = 0; s < arguments.length; s++) if (arguments[s] !== void 0) return arguments[s];
        };
      }, 44431: function(o) {
        o.exports = l;
        var s = (l.canvas = document.createElement("canvas")).getContext("2d"), n = u([32, 126]);
        function l(i, h) {
          Array.isArray(i) && (i = i.join(", "));
          var p, _ = {}, d = 16, f = 0.05;
          h && (h.length === 2 && typeof h[0] == "number" ? p = u(h) : Array.isArray(h) ? p = h : (h.o ? p = u(h.o) : h.pairs && (p = h.pairs), h.fontSize && (d = h.fontSize), h.threshold != null && (f = h.threshold))), p || (p = n), s.font = d + "px " + i;
          for (var c = 0; c < p.length; c++) {
            var g = p[c], m = s.measureText(g[0]).width + s.measureText(g[1]).width, x = s.measureText(g).width;
            if (Math.abs(m - x) > d * f) {
              var w = (x - m) / d;
              _[g] = 1e3 * w;
            }
          }
          return _;
        }
        function u(i) {
          for (var h = [], p = i[0]; p <= i[1]; p++) for (var _ = String.fromCharCode(p), d = i[0]; d < i[1]; d++) {
            var f = _ + String.fromCharCode(d);
            h.push(f);
          }
          return h;
        }
        l.createPairs = u, l.ascii = n;
      }, 95620: function(o, s, n) {
        var l = n(16844), u = n(60265), i = { M: "moveTo", C: "bezierCurveTo" };
        o.exports = function(h, p) {
          h.beginPath(), u(l(p)).forEach(function(_) {
            var d = _[0], f = _.slice(1);
            h[i[d]].apply(h, f);
          }), h.closePath();
        };
      }, 10275: function(o) {
        o.exports = function(s) {
          switch (s) {
            case "int8":
              return Int8Array;
            case "int16":
              return Int16Array;
            case "int32":
              return Int32Array;
            case "uint8":
              return Uint8Array;
            case "uint16":
              return Uint16Array;
            case "uint32":
              return Uint32Array;
            case "float32":
              return Float32Array;
            case "float64":
              return Float64Array;
            case "array":
              return Array;
            case "uint8_clamped":
              return Uint8ClampedArray;
          }
        };
      }, 49523: function(o) {
        function s(n, l, u) {
          var i = 0 | n[u];
          if (i <= 0) return [];
          var h, p = new Array(i);
          if (u === n.length - 1) for (h = 0; h < i; ++h) p[h] = l;
          else for (h = 0; h < i; ++h) p[h] = s(n, l, u + 1);
          return p;
        }
        o.exports = function(n, l) {
          switch (l === void 0 && (l = 0), typeof n) {
            case "number":
              if (n > 0) return function(u, i) {
                var h, p;
                for (h = new Array(u), p = 0; p < u; ++p) h[p] = i;
                return h;
              }(0 | n, l);
              break;
            case "object":
              if (typeof n.length == "number") return s(n, l, 0);
          }
          return [];
        };
      }, 25782: function(o) {
        function s(T, z, F) {
          F = F || 2;
          var U, V, $, q, K, re, Y, te = z && z.length, ee = te ? z[0] * F : T.length, X = n(T, 0, ee, F, !0), Q = [];
          if (!X || X.next === X.prev) return Q;
          if (te && (X = function(ce, he, de, ne) {
            var ae, se, me, ye = [];
            for (ae = 0, se = he.length; ae < se; ae++) (me = n(ce, he[ae] * ne, ae < se - 1 ? he[ae + 1] * ne : ce.length, ne, !1)) === me.next && (me.steiner = !0), ye.push(m(me));
            for (ye.sort(d), ae = 0; ae < ye.length; ae++) de = f(ye[ae], de);
            return de;
          }(T, z, X, F)), T.length > 80 * F) {
            U = $ = T[0], V = q = T[1];
            for (var ue = F; ue < ee; ue += F) (K = T[ue]) < U && (U = K), (re = T[ue + 1]) < V && (V = re), K > $ && ($ = K), re > q && (q = re);
            Y = (Y = Math.max($ - U, q - V)) !== 0 ? 32767 / Y : 0;
          }
          return u(X, Q, F, U, V, Y, 0), Q;
        }
        function n(T, z, F, U, V) {
          var $, q;
          if (V === O(T, z, F, U) > 0) for ($ = z; $ < F; $ += U) q = P($, T[$], T[$ + 1], q);
          else for ($ = F - U; $ >= z; $ -= U) q = P($, T[$], T[$ + 1], q);
          return q && S(q, q.next) && (I(q), q = q.next), q;
        }
        function l(T, z) {
          if (!T) return T;
          z || (z = T);
          var F, U = T;
          do
            if (F = !1, U.steiner || !S(U, U.next) && k(U.prev, U, U.next) !== 0) U = U.next;
            else {
              if (I(U), (U = z = U.prev) === U.next) break;
              F = !0;
            }
          while (F || U !== z);
          return z;
        }
        function u(T, z, F, U, V, $, q) {
          if (T) {
            !q && $ && function(te, ee, X, Q) {
              var ue = te;
              do
                ue.z === 0 && (ue.z = g(ue.x, ue.y, ee, X, Q)), ue.prevZ = ue.prev, ue.nextZ = ue.next, ue = ue.next;
              while (ue !== te);
              ue.prevZ.nextZ = null, ue.prevZ = null, function(ce) {
                var he, de, ne, ae, se, me, ye, pe, be = 1;
                do {
                  for (de = ce, ce = null, se = null, me = 0; de; ) {
                    for (me++, ne = de, ye = 0, he = 0; he < be && (ye++, ne = ne.nextZ); he++) ;
                    for (pe = be; ye > 0 || pe > 0 && ne; ) ye !== 0 && (pe === 0 || !ne || de.z <= ne.z) ? (ae = de, de = de.nextZ, ye--) : (ae = ne, ne = ne.nextZ, pe--), se ? se.nextZ = ae : ce = ae, ae.prevZ = se, se = ae;
                    de = ne;
                  }
                  se.nextZ = null, be *= 2;
                } while (me > 1);
              }(ue);
            }(T, U, V, $);
            for (var K, re, Y = T; T.prev !== T.next; ) if (K = T.prev, re = T.next, $ ? h(T, U, V, $) : i(T)) z.push(K.i / F | 0), z.push(T.i / F | 0), z.push(re.i / F | 0), I(T), T = re.next, Y = re.next;
            else if ((T = re) === Y) {
              q ? q === 1 ? u(T = p(l(T), z, F), z, F, U, V, $, 2) : q === 2 && _(T, z, F, U, V, $) : u(l(T), z, F, U, V, $, 1);
              break;
            }
          }
        }
        function i(T) {
          var z = T.prev, F = T, U = T.next;
          if (k(z, F, U) >= 0) return !1;
          for (var V = z.x, $ = F.x, q = U.x, K = z.y, re = F.y, Y = U.y, te = V < $ ? V < q ? V : q : $ < q ? $ : q, ee = K < re ? K < Y ? K : Y : re < Y ? re : Y, X = V > $ ? V > q ? V : q : $ > q ? $ : q, Q = K > re ? K > Y ? K : Y : re > Y ? re : Y, ue = U.next; ue !== z; ) {
            if (ue.x >= te && ue.x <= X && ue.y >= ee && ue.y <= Q && x(V, K, $, re, q, Y, ue.x, ue.y) && k(ue.prev, ue, ue.next) >= 0) return !1;
            ue = ue.next;
          }
          return !0;
        }
        function h(T, z, F, U) {
          var V = T.prev, $ = T, q = T.next;
          if (k(V, $, q) >= 0) return !1;
          for (var K = V.x, re = $.x, Y = q.x, te = V.y, ee = $.y, X = q.y, Q = K < re ? K < Y ? K : Y : re < Y ? re : Y, ue = te < ee ? te < X ? te : X : ee < X ? ee : X, ce = K > re ? K > Y ? K : Y : re > Y ? re : Y, he = te > ee ? te > X ? te : X : ee > X ? ee : X, de = g(Q, ue, z, F, U), ne = g(ce, he, z, F, U), ae = T.prevZ, se = T.nextZ; ae && ae.z >= de && se && se.z <= ne; ) {
            if (ae.x >= Q && ae.x <= ce && ae.y >= ue && ae.y <= he && ae !== V && ae !== q && x(K, te, re, ee, Y, X, ae.x, ae.y) && k(ae.prev, ae, ae.next) >= 0 || (ae = ae.prevZ, se.x >= Q && se.x <= ce && se.y >= ue && se.y <= he && se !== V && se !== q && x(K, te, re, ee, Y, X, se.x, se.y) && k(se.prev, se, se.next) >= 0)) return !1;
            se = se.nextZ;
          }
          for (; ae && ae.z >= de; ) {
            if (ae.x >= Q && ae.x <= ce && ae.y >= ue && ae.y <= he && ae !== V && ae !== q && x(K, te, re, ee, Y, X, ae.x, ae.y) && k(ae.prev, ae, ae.next) >= 0) return !1;
            ae = ae.prevZ;
          }
          for (; se && se.z <= ne; ) {
            if (se.x >= Q && se.x <= ce && se.y >= ue && se.y <= he && se !== V && se !== q && x(K, te, re, ee, Y, X, se.x, se.y) && k(se.prev, se, se.next) >= 0) return !1;
            se = se.nextZ;
          }
          return !0;
        }
        function p(T, z, F) {
          var U = T;
          do {
            var V = U.prev, $ = U.next.next;
            !S(V, $) && A(V, U, U.next, $) && L(V, $) && L($, V) && (z.push(V.i / F | 0), z.push(U.i / F | 0), z.push($.i / F | 0), I(U), I(U.next), U = T = $), U = U.next;
          } while (U !== T);
          return l(U);
        }
        function _(T, z, F, U, V, $) {
          var q = T;
          do {
            for (var K = q.next.next; K !== q.prev; ) {
              if (q.i !== K.i && w(q, K)) {
                var re = E(q, K);
                return q = l(q, q.next), re = l(re, re.next), u(q, z, F, U, V, $, 0), void u(re, z, F, U, V, $, 0);
              }
              K = K.next;
            }
            q = q.next;
          } while (q !== T);
        }
        function d(T, z) {
          return T.x - z.x;
        }
        function f(T, z) {
          var F = function(V, $) {
            var q, K = $, re = V.x, Y = V.y, te = -1 / 0;
            do {
              if (Y <= K.y && Y >= K.next.y && K.next.y !== K.y) {
                var ee = K.x + (Y - K.y) * (K.next.x - K.x) / (K.next.y - K.y);
                if (ee <= re && ee > te && (te = ee, q = K.x < K.next.x ? K : K.next, ee === re)) return q;
              }
              K = K.next;
            } while (K !== $);
            if (!q) return null;
            var X, Q = q, ue = q.x, ce = q.y, he = 1 / 0;
            K = q;
            do
              re >= K.x && K.x >= ue && re !== K.x && x(Y < ce ? re : te, Y, ue, ce, Y < ce ? te : re, Y, K.x, K.y) && (X = Math.abs(Y - K.y) / (re - K.x), L(K, V) && (X < he || X === he && (K.x > q.x || K.x === q.x && c(q, K))) && (q = K, he = X)), K = K.next;
            while (K !== Q);
            return q;
          }(T, z);
          if (!F) return z;
          var U = E(F, T);
          return l(U, U.next), l(F, F.next);
        }
        function c(T, z) {
          return k(T.prev, T, z.prev) < 0 && k(z.next, T, T.next) < 0;
        }
        function g(T, z, F, U, V) {
          return (T = 1431655765 & ((T = 858993459 & ((T = 252645135 & ((T = 16711935 & ((T = (T - F) * V | 0) | T << 8)) | T << 4)) | T << 2)) | T << 1)) | (z = 1431655765 & ((z = 858993459 & ((z = 252645135 & ((z = 16711935 & ((z = (z - U) * V | 0) | z << 8)) | z << 4)) | z << 2)) | z << 1)) << 1;
        }
        function m(T) {
          var z = T, F = T;
          do
            (z.x < F.x || z.x === F.x && z.y < F.y) && (F = z), z = z.next;
          while (z !== T);
          return F;
        }
        function x(T, z, F, U, V, $, q, K) {
          return (V - q) * (z - K) >= (T - q) * ($ - K) && (T - q) * (U - K) >= (F - q) * (z - K) && (F - q) * ($ - K) >= (V - q) * (U - K);
        }
        function w(T, z) {
          return T.next.i !== z.i && T.prev.i !== z.i && !function(F, U) {
            var V = F;
            do {
              if (V.i !== F.i && V.next.i !== F.i && V.i !== U.i && V.next.i !== U.i && A(V, V.next, F, U)) return !0;
              V = V.next;
            } while (V !== F);
            return !1;
          }(T, z) && (L(T, z) && L(z, T) && function(F, U) {
            var V = F, $ = !1, q = (F.x + U.x) / 2, K = (F.y + U.y) / 2;
            do
              V.y > K != V.next.y > K && V.next.y !== V.y && q < (V.next.x - V.x) * (K - V.y) / (V.next.y - V.y) + V.x && ($ = !$), V = V.next;
            while (V !== F);
            return $;
          }(T, z) && (k(T.prev, T, z.prev) || k(T, z.prev, z)) || S(T, z) && k(T.prev, T, T.next) > 0 && k(z.prev, z, z.next) > 0);
        }
        function k(T, z, F) {
          return (z.y - T.y) * (F.x - z.x) - (z.x - T.x) * (F.y - z.y);
        }
        function S(T, z) {
          return T.x === z.x && T.y === z.y;
        }
        function A(T, z, F, U) {
          var V = D(k(T, z, F)), $ = D(k(T, z, U)), q = D(k(F, U, T)), K = D(k(F, U, z));
          return V !== $ && q !== K || !(V !== 0 || !C(T, F, z)) || !($ !== 0 || !C(T, U, z)) || !(q !== 0 || !C(F, T, U)) || !(K !== 0 || !C(F, z, U));
        }
        function C(T, z, F) {
          return z.x <= Math.max(T.x, F.x) && z.x >= Math.min(T.x, F.x) && z.y <= Math.max(T.y, F.y) && z.y >= Math.min(T.y, F.y);
        }
        function D(T) {
          return T > 0 ? 1 : T < 0 ? -1 : 0;
        }
        function L(T, z) {
          return k(T.prev, T, T.next) < 0 ? k(T, z, T.next) >= 0 && k(T, T.prev, z) >= 0 : k(T, z, T.prev) < 0 || k(T, T.next, z) < 0;
        }
        function E(T, z) {
          var F = new M(T.i, T.x, T.y), U = new M(z.i, z.x, z.y), V = T.next, $ = z.prev;
          return T.next = z, z.prev = T, F.next = V, V.prev = F, U.next = F, F.prev = U, $.next = U, U.prev = $, U;
        }
        function P(T, z, F, U) {
          var V = new M(T, z, F);
          return U ? (V.next = U.next, V.prev = U, U.next.prev = V, U.next = V) : (V.prev = V, V.next = V), V;
        }
        function I(T) {
          T.next.prev = T.prev, T.prev.next = T.next, T.prevZ && (T.prevZ.nextZ = T.nextZ), T.nextZ && (T.nextZ.prevZ = T.prevZ);
        }
        function M(T, z, F) {
          this.i = T, this.x = z, this.y = F, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
        }
        function O(T, z, F, U) {
          for (var V = 0, $ = z, q = F - U; $ < F; $ += U) V += (T[q] - T[$]) * (T[$ + 1] + T[q + 1]), q = $;
          return V;
        }
        o.exports = s, o.exports.default = s, s.deviation = function(T, z, F, U) {
          var V = z && z.length, $ = V ? z[0] * F : T.length, q = Math.abs(O(T, 0, $, F));
          if (V) for (var K = 0, re = z.length; K < re; K++) {
            var Y = z[K] * F, te = K < re - 1 ? z[K + 1] * F : T.length;
            q -= Math.abs(O(T, Y, te, F));
          }
          var ee = 0;
          for (K = 0; K < U.length; K += 3) {
            var X = U[K] * F, Q = U[K + 1] * F, ue = U[K + 2] * F;
            ee += Math.abs((T[X] - T[ue]) * (T[Q + 1] - T[X + 1]) - (T[X] - T[Q]) * (T[ue + 1] - T[X + 1]));
          }
          return q === 0 && ee === 0 ? 0 : Math.abs((ee - q) / q);
        }, s.flatten = function(T) {
          for (var z = T[0][0].length, F = { vertices: [], holes: [], dimensions: z }, U = 0, V = 0; V < T.length; V++) {
            for (var $ = 0; $ < T[V].length; $++) for (var q = 0; q < z; q++) F.vertices.push(T[V][$][q]);
            V > 0 && (U += T[V - 1].length, F.holes.push(U));
          }
          return F;
        };
      }, 96143: function(o, s, n) {
        var l = n(26381);
        o.exports = function(u, i) {
          var h, p = [], _ = [], d = [], f = {}, c = [];
          function g(L) {
            d[L] = !1, f.hasOwnProperty(L) && Object.keys(f[L]).forEach(function(E) {
              delete f[L][E], d[E] && g(E);
            });
          }
          function m(L) {
            var E, P, I = !1;
            for (_.push(L), d[L] = !0, E = 0; E < c[L].length; E++) (P = c[L][E]) === h ? (x(h, _), I = !0) : d[P] || (I = m(P));
            if (I) g(L);
            else for (E = 0; E < c[L].length; E++) {
              P = c[L][E];
              var M = f[P];
              M || (M = {}, f[P] = M), M[P] = !0;
            }
            return _.pop(), I;
          }
          function x(L, E) {
            var P = [].concat(E).concat(L);
            i ? i(m) : p.push(P);
          }
          function w(L) {
            (function(F) {
              for (var U = 0; U < u.length; U++) U < F && (u[U] = []), u[U] = u[U].filter(function(V) {
                return V >= F;
              });
            })(L);
            for (var E, P = l(u).components.filter(function(F) {
              return F.length > 1;
            }), I = 1 / 0, M = 0; M < P.length; M++) for (var O = 0; O < P[M].length; O++) P[M][O] < I && (I = P[M][O], E = M);
            var T = P[E];
            if (!T) return !1;
            var z = u.map(function(F, U) {
              return T.indexOf(U) === -1 ? [] : F.filter(function(V) {
                return T.indexOf(V) !== -1;
              });
            });
            return { leastVertex: I, adjList: z };
          }
          h = 0;
          for (var k = u.length; h < k; ) {
            var S = w(h);
            if (h = S.leastVertex, c = S.adjList) {
              for (var A = 0; A < c.length; A++) for (var C = 0; C < c[A].length; C++) {
                var D = c[A][C];
                d[+D] = !1, f[D] = {};
              }
              m(h), h += 1;
            } else h = k;
          }
          return i ? void 0 : p;
        };
      }, 40891: function(o, s, n) {
        var l = n(71129)("%Object.defineProperty%", !0) || !1;
        if (l) try {
          l({}, "a", { value: 1 });
        } catch {
          l = !1;
        }
        o.exports = l;
      }, 35465: function(o) {
        o.exports = EvalError;
      }, 77731: function(o) {
        o.exports = Error;
      }, 30582: function(o) {
        o.exports = RangeError;
      }, 50294: function(o) {
        o.exports = ReferenceError;
      }, 98800: function(o) {
        o.exports = SyntaxError;
      }, 48631: function(o) {
        o.exports = TypeError;
      }, 33149: function(o) {
        o.exports = URIError;
      }, 91445: function(o, s, n) {
        var l = n(69746);
        o.exports = function() {
          return l(this).length = 0, this;
        };
      }, 82377: function(o, s, n) {
        o.exports = n(57712)() ? Array.from : n(33468);
      }, 57712: function(o) {
        o.exports = function() {
          var s, n, l = Array.from;
          return typeof l == "function" && (n = l(s = ["raz", "dwa"]), !!(n && n !== s && n[1] === "dwa"));
        };
      }, 33468: function(o, s, n) {
        var l = n(63008).iterator, u = n(82262), i = n(59356), h = n(54653), p = n(52359), _ = n(69746), d = n(1974), f = n(48488), c = Array.isArray, g = Function.prototype.call, m = { configurable: !0, enumerable: !0, writable: !0, value: null }, x = Object.defineProperty;
        o.exports = function(w) {
          var k, S, A, C, D, L, E, P, I, M, O = arguments[1], T = arguments[2];
          if (w = Object(_(w)), d(O) && p(O), this && this !== Array && i(this)) k = this;
          else {
            if (!O) {
              if (u(w)) return (D = w.length) !== 1 ? Array.apply(null, w) : ((C = new Array(1))[0] = w[0], C);
              if (c(w)) {
                for (C = new Array(D = w.length), S = 0; S < D; ++S) C[S] = w[S];
                return C;
              }
            }
            C = [];
          }
          if (!c(w)) {
            if ((I = w[l]) !== void 0) {
              for (E = p(I).call(w), k && (C = new k()), P = E.next(), S = 0; !P.done; ) M = O ? g.call(O, T, P.value, S) : P.value, k ? (m.value = M, x(C, S, m)) : C[S] = M, P = E.next(), ++S;
              D = S;
            } else if (f(w)) {
              for (D = w.length, k && (C = new k()), S = 0, A = 0; S < D; ++S) M = w[S], S + 1 < D && (L = M.charCodeAt(0)) >= 55296 && L <= 56319 && (M += w[++S]), M = O ? g.call(O, T, M, A) : M, k ? (m.value = M, x(C, A, m)) : C[A] = M, ++A;
              D = A;
            }
          }
          if (D === void 0) for (D = h(w.length), k && (C = new k(D)), S = 0; S < D; ++S) M = O ? g.call(O, T, w[S], S) : w[S], k ? (m.value = M, x(C, S, m)) : C[S] = M;
          return k && (m.value = null, C.length = D), C;
        };
      }, 82262: function(o) {
        var s = Object.prototype.toString, n = s.call(/* @__PURE__ */ function() {
          return arguments;
        }());
        o.exports = function(l) {
          return s.call(l) === n;
        };
      }, 59356: function(o) {
        var s = Object.prototype.toString, n = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
        o.exports = function(l) {
          return typeof l == "function" && n(s.call(l));
        };
      }, 62039: function(o) {
        o.exports = function() {
        };
      }, 53579: function(o, s, n) {
        o.exports = n(67394)() ? Math.sign : n(37122);
      }, 67394: function(o) {
        o.exports = function() {
          var s = Math.sign;
          return typeof s == "function" && s(10) === 1 && s(-20) === -1;
        };
      }, 37122: function(o) {
        o.exports = function(s) {
          return s = Number(s), isNaN(s) || s === 0 ? s : s > 0 ? 1 : -1;
        };
      }, 10226: function(o, s, n) {
        var l = n(53579), u = Math.abs, i = Math.floor;
        o.exports = function(h) {
          return isNaN(h) ? 0 : (h = Number(h)) !== 0 && isFinite(h) ? l(h) * i(u(h)) : h;
        };
      }, 54653: function(o, s, n) {
        var l = n(10226), u = Math.max;
        o.exports = function(i) {
          return u(0, l(i));
        };
      }, 39395: function(o, s, n) {
        var l = n(52359), u = n(69746), i = Function.prototype.bind, h = Function.prototype.call, p = Object.keys, _ = Object.prototype.propertyIsEnumerable;
        o.exports = function(d, f) {
          return function(c, g) {
            var m, x = arguments[2], w = arguments[3];
            return c = Object(u(c)), l(g), m = p(c), w && m.sort(typeof w == "function" ? i.call(w, c) : void 0), typeof d != "function" && (d = m[d]), h.call(d, m, function(k, S) {
              return _.call(c, k) ? h.call(g, x, c[k], k, c, S) : f;
            });
          };
        };
      }, 1920: function(o, s, n) {
        o.exports = n(41271)() ? Object.assign : n(26399);
      }, 41271: function(o) {
        o.exports = function() {
          var s, n = Object.assign;
          return typeof n == "function" && (n(s = { foo: "raz" }, { bar: "dwa" }, { trzy: "trzy" }), s.foo + s.bar + s.trzy === "razdwatrzy");
        };
      }, 26399: function(o, s, n) {
        var l = n(36353), u = n(69746), i = Math.max;
        o.exports = function(h, p) {
          var _, d, f, c = i(arguments.length, 2);
          for (h = Object(u(h)), f = function(g) {
            try {
              h[g] = p[g];
            } catch (m) {
              _ || (_ = m);
            }
          }, d = 1; d < c; ++d) l(p = arguments[d]).forEach(f);
          if (_ !== void 0) throw _;
          return h;
        };
      }, 86591: function(o, s, n) {
        var l = n(82377), u = n(1920), i = n(69746);
        o.exports = function(h) {
          var p = Object(i(h)), _ = arguments[1], d = Object(arguments[2]);
          if (p !== h && !_) return p;
          var f = {};
          return _ ? l(_, function(c) {
            (d.ensure || c in h) && (f[c] = h[c]);
          }) : u(f, h), f;
        };
      }, 57842: function(o, s, n) {
        var l, u, i, h, p = Object.create;
        n(90361)() || (l = n(45765)), o.exports = l ? l.level !== 1 ? p : (u = {}, i = {}, h = { configurable: !1, enumerable: !1, writable: !0, value: void 0 }, Object.getOwnPropertyNames(Object.prototype).forEach(function(_) {
          i[_] = _ !== "__proto__" ? h : { configurable: !0, enumerable: !1, writable: !0, value: void 0 };
        }), Object.defineProperties(u, i), Object.defineProperty(l, "nullPolyfill", { configurable: !1, enumerable: !1, writable: !1, value: u }), function(_, d) {
          return p(_ === null ? u : _, d);
        }) : p;
      }, 82813: function(o, s, n) {
        o.exports = n(39395)("forEach");
      }, 76064: function(o, s, n) {
        var l = n(1974), u = { function: !0, object: !0 };
        o.exports = function(i) {
          return l(i) && u[typeof i] || !1;
        };
      }, 1974: function(o, s, n) {
        var l = n(62039)();
        o.exports = function(u) {
          return u !== l && u !== null;
        };
      }, 36353: function(o, s, n) {
        o.exports = n(83800)() ? Object.keys : n(67044);
      }, 83800: function(o) {
        o.exports = function() {
          try {
            return Object.keys("primitive"), !0;
          } catch {
            return !1;
          }
        };
      }, 67044: function(o, s, n) {
        var l = n(1974), u = Object.keys;
        o.exports = function(i) {
          return u(l(i) ? Object(i) : i);
        };
      }, 29854: function(o, s, n) {
        var l = n(52359), u = n(82813), i = Function.prototype.call;
        o.exports = function(h, p) {
          var _ = {}, d = arguments[2];
          return l(p), u(h, function(f, c, g, m) {
            _[c] = i.call(p, d, f, c, g, m);
          }), _;
        };
      }, 76504: function(o, s, n) {
        var l = n(1974), u = Array.prototype.forEach, i = Object.create;
        o.exports = function(h) {
          var p = i(null);
          return u.call(arguments, function(_) {
            l(_) && function(d, f) {
              var c;
              for (c in d) f[c] = d[c];
            }(Object(_), p);
          }), p;
        };
      }, 22834: function(o, s, n) {
        o.exports = n(90361)() ? Object.setPrototypeOf : n(45765);
      }, 90361: function(o) {
        var s = Object.create, n = Object.getPrototypeOf, l = {};
        o.exports = function() {
          var u = Object.setPrototypeOf;
          return typeof u == "function" && n(u((arguments[0] || s)(null), l)) === l;
        };
      }, 45765: function(o, s, n) {
        var l, u, i, h, p = n(76064), _ = n(69746), d = Object.prototype.isPrototypeOf, f = Object.defineProperty, c = { configurable: !0, enumerable: !1, writable: !0, value: void 0 };
        l = function(g, m) {
          if (_(g), m === null || p(m)) return g;
          throw new TypeError("Prototype must be null or an object");
        }, o.exports = (u = function() {
          var g, m = /* @__PURE__ */ Object.create(null), x = {}, w = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
          if (w) {
            try {
              (g = w.set).call(m, x);
            } catch {
            }
            if (Object.getPrototypeOf(m) === x) return { set: g, level: 2 };
          }
          return m.__proto__ = x, Object.getPrototypeOf(m) === x ? { level: 2 } : ((m = {}).__proto__ = x, Object.getPrototypeOf(m) === x && { level: 1 });
        }(), u ? (u.level === 2 ? u.set ? (h = u.set, i = function(g, m) {
          return h.call(l(g, m), m), g;
        }) : i = function(g, m) {
          return l(g, m).__proto__ = m, g;
        } : i = function g(m, x) {
          var w;
          return l(m, x), (w = d.call(g.nullPolyfill, m)) && delete g.nullPolyfill.__proto__, x === null && (x = g.nullPolyfill), m.__proto__ = x, w && f(g.nullPolyfill, "__proto__", c), m;
        }, Object.defineProperty(i, "level", { configurable: !1, enumerable: !1, writable: !1, value: u.level })) : null), n(57842);
      }, 52359: function(o) {
        o.exports = function(s) {
          if (typeof s != "function") throw new TypeError(s + " is not a function");
          return s;
        };
      }, 11004: function(o, s, n) {
        var l = n(76064);
        o.exports = function(u) {
          if (!l(u)) throw new TypeError(u + " is not an Object");
          return u;
        };
      }, 69746: function(o, s, n) {
        var l = n(1974);
        o.exports = function(u) {
          if (!l(u)) throw new TypeError("Cannot use null or undefined");
          return u;
        };
      }, 2338: function(o, s, n) {
        o.exports = n(65961)() ? String.prototype.contains : n(9461);
      }, 65961: function(o) {
        var s = "razdwatrzy";
        o.exports = function() {
          return typeof s.contains == "function" && s.contains("dwa") === !0 && s.contains("foo") === !1;
        };
      }, 9461: function(o) {
        var s = String.prototype.indexOf;
        o.exports = function(n) {
          return s.call(this, n, arguments[1]) > -1;
        };
      }, 48488: function(o) {
        var s = Object.prototype.toString, n = s.call("");
        o.exports = function(l) {
          return typeof l == "string" || l && typeof l == "object" && (l instanceof String || s.call(l) === n) || !1;
        };
      }, 43497: function(o) {
        var s = /* @__PURE__ */ Object.create(null), n = Math.random;
        o.exports = function() {
          var l;
          do
            l = n().toString(36).slice(2);
          while (s[l]);
          return l;
        };
      }, 71343: function(o, s, n) {
        var l, u = n(22834), i = n(2338), h = n(91819), p = n(63008), _ = n(85490), d = Object.defineProperty;
        l = o.exports = function(f, c) {
          if (!(this instanceof l)) throw new TypeError("Constructor requires 'new'");
          _.call(this, f), c = c ? i.call(c, "key+value") ? "key+value" : i.call(c, "key") ? "key" : "value" : "value", d(this, "__kind__", h("", c));
        }, u && u(l, _), delete l.prototype.constructor, l.prototype = Object.create(_.prototype, { _resolve: h(function(f) {
          return this.__kind__ === "value" ? this.__list__[f] : this.__kind__ === "key+value" ? [f, this.__list__[f]] : f;
        }) }), d(l.prototype, p.toStringTag, h("c", "Array Iterator"));
      }, 58755: function(o, s, n) {
        var l = n(82262), u = n(52359), i = n(48488), h = n(34494), p = Array.isArray, _ = Function.prototype.call, d = Array.prototype.some;
        o.exports = function(f, c) {
          var g, m, x, w, k, S, A, C, D = arguments[2];
          if (p(f) || l(f) ? g = "array" : i(f) ? g = "string" : f = h(f), u(c), x = function() {
            w = !0;
          }, g !== "array") if (g !== "string") for (m = f.next(); !m.done; ) {
            if (_.call(c, D, m.value, x), w) return;
            m = f.next();
          }
          else for (S = f.length, k = 0; k < S && (A = f[k], k + 1 < S && (C = A.charCodeAt(0)) >= 55296 && C <= 56319 && (A += f[++k]), _.call(c, D, A, x), !w); ++k) ;
          else d.call(f, function(L) {
            return _.call(c, D, L, x), w;
          });
        };
      }, 34494: function(o, s, n) {
        var l = n(82262), u = n(48488), i = n(71343), h = n(23417), p = n(82831), _ = n(63008).iterator;
        o.exports = function(d) {
          return typeof p(d)[_] == "function" ? d[_]() : l(d) ? new i(d) : u(d) ? new h(d) : new i(d);
        };
      }, 85490: function(o, s, n) {
        var l, u = n(91445), i = n(1920), h = n(52359), p = n(69746), _ = n(91819), d = n(84510), f = n(63008), c = Object.defineProperty, g = Object.defineProperties;
        o.exports = l = function(m, x) {
          if (!(this instanceof l)) throw new TypeError("Constructor requires 'new'");
          g(this, { __list__: _("w", p(m)), __context__: _("w", x), __nextIndex__: _("w", 0) }), x && (h(x.on), x.on("_add", this._onAdd), x.on("_delete", this._onDelete), x.on("_clear", this._onClear));
        }, delete l.prototype.constructor, g(l.prototype, i({ _next: _(function() {
          var m;
          if (this.__list__) return this.__redo__ && (m = this.__redo__.shift()) !== void 0 ? m : this.__nextIndex__ < this.__list__.length ? this.__nextIndex__++ : void this._unBind();
        }), next: _(function() {
          return this._createResult(this._next());
        }), _createResult: _(function(m) {
          return m === void 0 ? { done: !0, value: void 0 } : { done: !1, value: this._resolve(m) };
        }), _resolve: _(function(m) {
          return this.__list__[m];
        }), _unBind: _(function() {
          this.__list__ = null, delete this.__redo__, this.__context__ && (this.__context__.off("_add", this._onAdd), this.__context__.off("_delete", this._onDelete), this.__context__.off("_clear", this._onClear), this.__context__ = null);
        }), toString: _(function() {
          return "[object " + (this[f.toStringTag] || "Object") + "]";
        }) }, d({ _onAdd: _(function(m) {
          m >= this.__nextIndex__ || (++this.__nextIndex__, this.__redo__ ? (this.__redo__.forEach(function(x, w) {
            x >= m && (this.__redo__[w] = ++x);
          }, this), this.__redo__.push(m)) : c(this, "__redo__", _("c", [m])));
        }), _onDelete: _(function(m) {
          var x;
          m >= this.__nextIndex__ || (--this.__nextIndex__, this.__redo__ && ((x = this.__redo__.indexOf(m)) !== -1 && this.__redo__.splice(x, 1), this.__redo__.forEach(function(w, k) {
            w > m && (this.__redo__[k] = --w);
          }, this)));
        }), _onClear: _(function() {
          this.__redo__ && u.call(this.__redo__), this.__nextIndex__ = 0;
        }) }))), c(l.prototype, f.iterator, _(function() {
          return this;
        }));
      }, 50567: function(o, s, n) {
        var l = n(82262), u = n(1974), i = n(48488), h = n(63008).iterator, p = Array.isArray;
        o.exports = function(_) {
          return !(!u(_) || !p(_) && !i(_) && !l(_) && typeof _[h] != "function");
        };
      }, 23417: function(o, s, n) {
        var l, u = n(22834), i = n(91819), h = n(63008), p = n(85490), _ = Object.defineProperty;
        l = o.exports = function(d) {
          if (!(this instanceof l)) throw new TypeError("Constructor requires 'new'");
          d = String(d), p.call(this, d), _(this, "__length__", i("", d.length));
        }, u && u(l, p), delete l.prototype.constructor, l.prototype = Object.create(p.prototype, { _next: i(function() {
          if (this.__list__) return this.__nextIndex__ < this.__length__ ? this.__nextIndex__++ : void this._unBind();
        }), _resolve: i(function(d) {
          var f, c = this.__list__[d];
          return this.__nextIndex__ === this.__length__ ? c : (f = c.charCodeAt(0)) >= 55296 && f <= 56319 ? c + this.__list__[this.__nextIndex__++] : c;
        }) }), _(l.prototype, h.toStringTag, i("c", "String Iterator"));
      }, 82831: function(o, s, n) {
        var l = n(50567);
        o.exports = function(u) {
          if (!l(u)) throw new TypeError(u + " is not iterable");
          return u;
        };
      }, 63008: function(o, s, n) {
        o.exports = n(25143)() ? n(64725).Symbol : n(81905);
      }, 25143: function(o, s, n) {
        var l = n(64725), u = { object: !0, symbol: !0 };
        o.exports = function() {
          var i, h = l.Symbol;
          if (typeof h != "function") return !1;
          i = h("test symbol");
          try {
            String(i);
          } catch {
            return !1;
          }
          return !!u[typeof h.iterator] && !!u[typeof h.toPrimitive] && !!u[typeof h.toStringTag];
        };
      }, 41707: function(o) {
        o.exports = function(s) {
          return !!s && (typeof s == "symbol" || !!s.constructor && s.constructor.name === "Symbol" && s[s.constructor.toStringTag] === "Symbol");
        };
      }, 74009: function(o, s, n) {
        var l = n(91819), u = Object.create, i = Object.defineProperty, h = Object.prototype, p = u(null);
        o.exports = function(_) {
          for (var d, f, c = 0; p[_ + (c || "")]; ) ++c;
          return p[_ += c || ""] = !0, i(h, d = "@@" + _, l.gs(null, function(g) {
            f || (f = !0, i(this, d, l(g)), f = !1);
          })), d;
        };
      }, 40313: function(o, s, n) {
        var l = n(91819), u = n(64725).Symbol;
        o.exports = function(i) {
          return Object.defineProperties(i, { hasInstance: l("", u && u.hasInstance || i("hasInstance")), isConcatSpreadable: l("", u && u.isConcatSpreadable || i("isConcatSpreadable")), iterator: l("", u && u.iterator || i("iterator")), match: l("", u && u.match || i("match")), replace: l("", u && u.replace || i("replace")), search: l("", u && u.search || i("search")), species: l("", u && u.species || i("species")), split: l("", u && u.split || i("split")), toPrimitive: l("", u && u.toPrimitive || i("toPrimitive")), toStringTag: l("", u && u.toStringTag || i("toStringTag")), unscopables: l("", u && u.unscopables || i("unscopables")) });
        };
      }, 21290: function(o, s, n) {
        var l = n(91819), u = n(91765), i = /* @__PURE__ */ Object.create(null);
        o.exports = function(h) {
          return Object.defineProperties(h, { for: l(function(p) {
            return i[p] ? i[p] : i[p] = h(String(p));
          }), keyFor: l(function(p) {
            var _;
            for (_ in u(p), i) if (i[_] === p) return _;
          }) });
        };
      }, 81905: function(o, s, n) {
        var l, u, i, h = n(91819), p = n(91765), _ = n(64725).Symbol, d = n(74009), f = n(40313), c = n(21290), g = Object.create, m = Object.defineProperties, x = Object.defineProperty;
        if (typeof _ == "function") try {
          String(_()), i = !0;
        } catch {
        }
        else _ = null;
        u = function(w) {
          if (this instanceof u) throw new TypeError("Symbol is not a constructor");
          return l(w);
        }, o.exports = l = function w(k) {
          var S;
          if (this instanceof w) throw new TypeError("Symbol is not a constructor");
          return i ? _(k) : (S = g(u.prototype), k = k === void 0 ? "" : String(k), m(S, { __description__: h("", k), __name__: h("", d(k)) }));
        }, f(l), c(l), m(u.prototype, { constructor: h(l), toString: h("", function() {
          return this.__name__;
        }) }), m(l.prototype, { toString: h(function() {
          return "Symbol (" + p(this).__description__ + ")";
        }), valueOf: h(function() {
          return p(this);
        }) }), x(l.prototype, l.toPrimitive, h("", function() {
          var w = p(this);
          return typeof w == "symbol" ? w : w.toString();
        })), x(l.prototype, l.toStringTag, h("c", "Symbol")), x(u.prototype, l.toStringTag, h("c", l.prototype[l.toStringTag])), x(u.prototype, l.toPrimitive, h("c", l.prototype[l.toPrimitive]));
      }, 91765: function(o, s, n) {
        var l = n(41707);
        o.exports = function(u) {
          if (!l(u)) throw new TypeError(u + " is not a symbol");
          return u;
        };
      }, 93103: function(o, s, n) {
        o.exports = n(22742)() ? WeakMap : n(21780);
      }, 22742: function(o) {
        o.exports = function() {
          var s, n;
          if (typeof WeakMap != "function") return !1;
          try {
            s = new WeakMap([[n = {}, "one"], [{}, "two"], [{}, "three"]]);
          } catch {
            return !1;
          }
          return String(s) === "[object WeakMap]" && typeof s.set == "function" && s.set({}, 1) === s && typeof s.delete == "function" && typeof s.has == "function" && s.get(n) === "one";
        };
      }, 81810: function(o) {
        o.exports = typeof WeakMap == "function" && Object.prototype.toString.call(/* @__PURE__ */ new WeakMap()) === "[object WeakMap]";
      }, 21780: function(o, s, n) {
        var l, u = n(1974), i = n(22834), h = n(11004), p = n(69746), _ = n(43497), d = n(91819), f = n(34494), c = n(58755), g = n(63008).toStringTag, m = n(81810), x = Array.isArray, w = Object.defineProperty, k = Object.prototype.hasOwnProperty, S = Object.getPrototypeOf;
        o.exports = l = function() {
          var A, C = arguments[0];
          if (!(this instanceof l)) throw new TypeError("Constructor requires 'new'");
          return A = m && i && WeakMap !== l ? i(/* @__PURE__ */ new WeakMap(), S(this)) : this, u(C) && (x(C) || (C = f(C))), w(A, "__weakMapData__", d("c", "$weakMap$" + _())), C && c(C, function(D) {
            p(D), A.set(D[0], D[1]);
          }), A;
        }, m && (i && i(l, WeakMap), l.prototype = Object.create(WeakMap.prototype, { constructor: d(l) })), Object.defineProperties(l.prototype, { delete: d(function(A) {
          return !!k.call(h(A), this.__weakMapData__) && (delete A[this.__weakMapData__], !0);
        }), get: d(function(A) {
          if (k.call(h(A), this.__weakMapData__)) return A[this.__weakMapData__];
        }), has: d(function(A) {
          return k.call(h(A), this.__weakMapData__);
        }), set: d(function(A, C) {
          return w(h(A), this.__weakMapData__, d("c", C)), this;
        }), toString: d(function() {
          return "[object WeakMap]";
        }) }), w(l.prototype, g, d("c", "WeakMap"));
      }, 7683: function(o) {
        var s, n = typeof Reflect == "object" ? Reflect : null, l = n && typeof n.apply == "function" ? n.apply : function(k, S, A) {
          return Function.prototype.apply.call(k, S, A);
        };
        s = n && typeof n.ownKeys == "function" ? n.ownKeys : Object.getOwnPropertySymbols ? function(k) {
          return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k));
        } : function(k) {
          return Object.getOwnPropertyNames(k);
        };
        var u = Number.isNaN || function(k) {
          return k != k;
        };
        function i() {
          i.init.call(this);
        }
        o.exports = i, o.exports.once = function(k, S) {
          return new Promise(function(A, C) {
            function D(E) {
              k.removeListener(S, L), C(E);
            }
            function L() {
              typeof k.removeListener == "function" && k.removeListener("error", D), A([].slice.call(arguments));
            }
            w(k, S, L, { once: !0 }), S !== "error" && function(E, P, I) {
              typeof E.on == "function" && w(E, "error", P, { once: !0 });
            }(k, D);
          });
        }, i.EventEmitter = i, i.prototype._events = void 0, i.prototype._eventsCount = 0, i.prototype._maxListeners = void 0;
        var h = 10;
        function p(k) {
          if (typeof k != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof k);
        }
        function _(k) {
          return k._maxListeners === void 0 ? i.defaultMaxListeners : k._maxListeners;
        }
        function d(k, S, A, C) {
          var D, L, E, P;
          if (p(A), (L = k._events) === void 0 ? (L = k._events = /* @__PURE__ */ Object.create(null), k._eventsCount = 0) : (L.newListener !== void 0 && (k.emit("newListener", S, A.listener ? A.listener : A), L = k._events), E = L[S]), E === void 0) E = L[S] = A, ++k._eventsCount;
          else if (typeof E == "function" ? E = L[S] = C ? [A, E] : [E, A] : C ? E.unshift(A) : E.push(A), (D = _(k)) > 0 && E.length > D && !E.warned) {
            E.warned = !0;
            var I = new Error("Possible EventEmitter memory leak detected. " + E.length + " " + String(S) + " listeners added. Use emitter.setMaxListeners() to increase limit");
            I.name = "MaxListenersExceededWarning", I.emitter = k, I.type = S, I.count = E.length, P = I, console && console.warn && console.warn(P);
          }
          return k;
        }
        function f() {
          if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
        }
        function c(k, S, A) {
          var C = { fired: !1, wrapFn: void 0, target: k, type: S, listener: A }, D = f.bind(C);
          return D.listener = A, C.wrapFn = D, D;
        }
        function g(k, S, A) {
          var C = k._events;
          if (C === void 0) return [];
          var D = C[S];
          return D === void 0 ? [] : typeof D == "function" ? A ? [D.listener || D] : [D] : A ? function(L) {
            for (var E = new Array(L.length), P = 0; P < E.length; ++P) E[P] = L[P].listener || L[P];
            return E;
          }(D) : x(D, D.length);
        }
        function m(k) {
          var S = this._events;
          if (S !== void 0) {
            var A = S[k];
            if (typeof A == "function") return 1;
            if (A !== void 0) return A.length;
          }
          return 0;
        }
        function x(k, S) {
          for (var A = new Array(S), C = 0; C < S; ++C) A[C] = k[C];
          return A;
        }
        function w(k, S, A, C) {
          if (typeof k.on == "function") C.once ? k.once(S, A) : k.on(S, A);
          else {
            if (typeof k.addEventListener != "function") throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof k);
            k.addEventListener(S, function D(L) {
              C.once && k.removeEventListener(S, D), A(L);
            });
          }
        }
        Object.defineProperty(i, "defaultMaxListeners", { enumerable: !0, get: function() {
          return h;
        }, set: function(k) {
          if (typeof k != "number" || k < 0 || u(k)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + k + ".");
          h = k;
        } }), i.init = function() {
          this._events !== void 0 && this._events !== Object.getPrototypeOf(this)._events || (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
        }, i.prototype.setMaxListeners = function(k) {
          if (typeof k != "number" || k < 0 || u(k)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + k + ".");
          return this._maxListeners = k, this;
        }, i.prototype.getMaxListeners = function() {
          return _(this);
        }, i.prototype.emit = function(k) {
          for (var S = [], A = 1; A < arguments.length; A++) S.push(arguments[A]);
          var C = k === "error", D = this._events;
          if (D !== void 0) C = C && D.error === void 0;
          else if (!C) return !1;
          if (C) {
            var L;
            if (S.length > 0 && (L = S[0]), L instanceof Error) throw L;
            var E = new Error("Unhandled error." + (L ? " (" + L.message + ")" : ""));
            throw E.context = L, E;
          }
          var P = D[k];
          if (P === void 0) return !1;
          if (typeof P == "function") l(P, this, S);
          else {
            var I = P.length, M = x(P, I);
            for (A = 0; A < I; ++A) l(M[A], this, S);
          }
          return !0;
        }, i.prototype.addListener = function(k, S) {
          return d(this, k, S, !1);
        }, i.prototype.on = i.prototype.addListener, i.prototype.prependListener = function(k, S) {
          return d(this, k, S, !0);
        }, i.prototype.once = function(k, S) {
          return p(S), this.on(k, c(this, k, S)), this;
        }, i.prototype.prependOnceListener = function(k, S) {
          return p(S), this.prependListener(k, c(this, k, S)), this;
        }, i.prototype.removeListener = function(k, S) {
          var A, C, D, L, E;
          if (p(S), (C = this._events) === void 0) return this;
          if ((A = C[k]) === void 0) return this;
          if (A === S || A.listener === S) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete C[k], C.removeListener && this.emit("removeListener", k, A.listener || S));
          else if (typeof A != "function") {
            for (D = -1, L = A.length - 1; L >= 0; L--) if (A[L] === S || A[L].listener === S) {
              E = A[L].listener, D = L;
              break;
            }
            if (D < 0) return this;
            D === 0 ? A.shift() : function(P, I) {
              for (; I + 1 < P.length; I++) P[I] = P[I + 1];
              P.pop();
            }(A, D), A.length === 1 && (C[k] = A[0]), C.removeListener !== void 0 && this.emit("removeListener", k, E || S);
          }
          return this;
        }, i.prototype.off = i.prototype.removeListener, i.prototype.removeAllListeners = function(k) {
          var S, A, C;
          if ((A = this._events) === void 0) return this;
          if (A.removeListener === void 0) return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : A[k] !== void 0 && (--this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete A[k]), this;
          if (arguments.length === 0) {
            var D, L = Object.keys(A);
            for (C = 0; C < L.length; ++C) (D = L[C]) !== "removeListener" && this.removeAllListeners(D);
            return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
          }
          if (typeof (S = A[k]) == "function") this.removeListener(k, S);
          else if (S !== void 0) for (C = S.length - 1; C >= 0; C--) this.removeListener(k, S[C]);
          return this;
        }, i.prototype.listeners = function(k) {
          return g(this, k, !0);
        }, i.prototype.rawListeners = function(k) {
          return g(this, k, !1);
        }, i.listenerCount = function(k, S) {
          return typeof k.listenerCount == "function" ? k.listenerCount(S) : m.call(k, S);
        }, i.prototype.listenerCount = m, i.prototype.eventNames = function() {
          return this._eventsCount > 0 ? s(this._events) : [];
        };
      }, 77083: function(o) {
        var s = function() {
          if (typeof self == "object" && self) return self;
          if (typeof window == "object" && window) return window;
          throw new Error("Unable to resolve global `this`");
        };
        o.exports = function() {
          if (this) return this;
          try {
            Object.defineProperty(Object.prototype, "__global__", { get: function() {
              return this;
            }, configurable: !0 });
          } catch {
            return s();
          }
          try {
            return __global__ || s();
          } finally {
            delete Object.prototype.__global__;
          }
        }();
      }, 64725: function(o, s, n) {
        o.exports = n(17804)() ? globalThis : n(77083);
      }, 17804: function(o) {
        o.exports = function() {
          return typeof globalThis == "object" && !!globalThis && globalThis.Array === Array;
        };
      }, 10721: function(o, s, n) {
        var l = n(9914);
        o.exports = function(u) {
          var i = typeof u;
          if (i === "string") {
            var h = u;
            if ((u = +u) == 0 && l(h)) return !1;
          } else if (i !== "number") return !1;
          return u - u < 1;
        };
      }, 83473: function(o, s, n) {
        var l = n(10275);
        o.exports = function(u, i, h) {
          if (!u) throw new TypeError("must specify data as first parameter");
          if (h = 0 | +(h || 0), Array.isArray(u) && u[0] && typeof u[0][0] == "number") {
            var p, _, d, f, c = u[0].length, g = u.length * c;
            i && typeof i != "string" || (i = new (l(i || "float32"))(g + h));
            var m = i.length - h;
            if (g !== m) throw new Error("source length " + g + " (" + c + "x" + u.length + ") does not match destination length " + m);
            for (p = 0, d = h; p < u.length; p++) for (_ = 0; _ < c; _++) i[d++] = u[p][_] === null ? NaN : u[p][_];
          } else if (i && typeof i != "string") i.set(u, h);
          else {
            var x = l(i || "float32");
            if (Array.isArray(u) || i === "array") for (p = 0, d = h, f = (i = new x(u.length + h)).length; d < f; d++, p++) i[d] = u[p] === null ? NaN : u[p];
            else h === 0 ? i = new x(u) : (i = new x(u.length + h)).set(u, h);
          }
          return i;
        };
      }, 68950: function(o, s, n) {
        var l = n(38211), u = [32, 126];
        o.exports = function(i) {
          var h = (i = i || {}).shape ? i.shape : i.canvas ? [i.canvas.width, i.canvas.height] : [512, 512], p = i.canvas || document.createElement("canvas"), _ = i.font, d = typeof i.step == "number" ? [i.step, i.step] : i.step || [32, 32], f = i.chars || u;
          if (_ && typeof _ != "string" && (_ = l(_)), Array.isArray(f)) {
            if (f.length === 2 && typeof f[0] == "number" && typeof f[1] == "number") {
              for (var c = [], g = f[0], m = 0; g <= f[1]; g++) c[m++] = String.fromCharCode(g);
              f = c;
            }
          } else f = String(f).split("");
          h = h.slice(), p.width = h[0], p.height = h[1];
          var x = p.getContext("2d");
          x.fillStyle = "#000", x.fillRect(0, 0, p.width, p.height), x.font = _, x.textAlign = "center", x.textBaseline = "middle", x.fillStyle = "#fff";
          var w = d[0] / 2, k = d[1] / 2;
          for (g = 0; g < f.length; g++) x.fillText(f[g], w, k), (w += d[0]) > h[0] - d[0] / 2 && (w = d[0] / 2, k += d[1]);
          return p;
        };
      }, 12673: function(o) {
        function s(i, h) {
          h || (h = {}), (typeof i == "string" || Array.isArray(i)) && (h.family = i);
          var p = Array.isArray(h.family) ? h.family.join(", ") : h.family;
          if (!p) throw Error("`family` must be defined");
          var _ = h.size || h.fontSize || h.em || 48, d = h.weight || h.fontWeight || "", f = (i = [h.style || h.fontStyle || "", d, _].join(" ") + "px " + p, h.origin || "top");
          if (s.cache[p] && _ <= s.cache[p].em) return n(s.cache[p], f);
          var c = h.canvas || s.canvas, g = c.getContext("2d"), m = { upper: h.upper !== void 0 ? h.upper : "H", lower: h.lower !== void 0 ? h.lower : "x", descent: h.descent !== void 0 ? h.descent : "p", ascent: h.ascent !== void 0 ? h.ascent : "h", tittle: h.tittle !== void 0 ? h.tittle : "i", overshoot: h.overshoot !== void 0 ? h.overshoot : "O" }, x = Math.ceil(1.5 * _);
          c.height = x, c.width = 0.5 * x, g.font = i;
          var w = "H", k = { top: 0 };
          g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillStyle = "black", g.fillText(w, 0, 0);
          var S = l(g.getImageData(0, 0, x, x));
          g.clearRect(0, 0, x, x), g.textBaseline = "bottom", g.fillText(w, 0, x);
          var A = l(g.getImageData(0, 0, x, x));
          k.lineHeight = k.bottom = x - A + S, g.clearRect(0, 0, x, x), g.textBaseline = "alphabetic", g.fillText(w, 0, x);
          var C = x - l(g.getImageData(0, 0, x, x)) - 1 + S;
          k.baseline = k.alphabetic = C, g.clearRect(0, 0, x, x), g.textBaseline = "middle", g.fillText(w, 0, 0.5 * x);
          var D = l(g.getImageData(0, 0, x, x));
          k.median = k.middle = x - D - 1 + S - 0.5 * x, g.clearRect(0, 0, x, x), g.textBaseline = "hanging", g.fillText(w, 0, 0.5 * x);
          var L = l(g.getImageData(0, 0, x, x));
          k.hanging = x - L - 1 + S - 0.5 * x, g.clearRect(0, 0, x, x), g.textBaseline = "ideographic", g.fillText(w, 0, x);
          var E = l(g.getImageData(0, 0, x, x));
          if (k.ideographic = x - E - 1 + S, m.upper && (g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.upper, 0, 0), k.upper = l(g.getImageData(0, 0, x, x)), k.capHeight = k.baseline - k.upper), m.lower && (g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.lower, 0, 0), k.lower = l(g.getImageData(0, 0, x, x)), k.xHeight = k.baseline - k.lower), m.tittle && (g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.tittle, 0, 0), k.tittle = l(g.getImageData(0, 0, x, x))), m.ascent && (g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.ascent, 0, 0), k.ascent = l(g.getImageData(0, 0, x, x))), m.descent && (g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.descent, 0, 0), k.descent = u(g.getImageData(0, 0, x, x))), m.overshoot) {
            g.clearRect(0, 0, x, x), g.textBaseline = "top", g.fillText(m.overshoot, 0, 0);
            var P = u(g.getImageData(0, 0, x, x));
            k.overshoot = P - C;
          }
          for (var I in k) k[I] /= _;
          return k.em = _, s.cache[p] = k, n(k, f);
        }
        function n(i, h) {
          var p = {};
          for (var _ in typeof h == "string" && (h = i[h]), i) _ !== "em" && (p[_] = i[_] - h);
          return p;
        }
        function l(i) {
          for (var h = i.height, p = i.data, _ = 3; _ < p.length; _ += 4) if (p[_] !== 0) return Math.floor(0.25 * (_ - 3) / h);
        }
        function u(i) {
          for (var h = i.height, p = i.data, _ = p.length - 1; _ > 0; _ -= 4) if (p[_] !== 0) return Math.floor(0.25 * (_ - 3) / h);
        }
        o.exports = s, s.canvas = document.createElement("canvas"), s.cache = {};
      }, 61262: function(o, s, n) {
        var l = n(82756), u = Object.prototype.toString, i = Object.prototype.hasOwnProperty;
        o.exports = function(h, p, _) {
          if (!l(p)) throw new TypeError("iterator must be a function");
          var d;
          arguments.length >= 3 && (d = _), u.call(h) === "[object Array]" ? function(f, c, g) {
            for (var m = 0, x = f.length; m < x; m++) i.call(f, m) && (g == null ? c(f[m], m, f) : c.call(g, f[m], m, f));
          }(h, p, d) : typeof h == "string" ? function(f, c, g) {
            for (var m = 0, x = f.length; m < x; m++) g == null ? c(f.charAt(m), m, f) : c.call(g, f.charAt(m), m, f);
          }(h, p, d) : function(f, c, g) {
            for (var m in f) i.call(f, m) && (g == null ? c(f[m], m, f) : c.call(g, f[m], m, f));
          }(h, p, d);
        };
      }, 31917: function(o) {
        var s = Object.prototype.toString, n = Math.max, l = function(u, i) {
          for (var h = [], p = 0; p < u.length; p += 1) h[p] = u[p];
          for (var _ = 0; _ < i.length; _ += 1) h[_ + u.length] = i[_];
          return h;
        };
        o.exports = function(u) {
          var i = this;
          if (typeof i != "function" || s.apply(i) !== "[object Function]") throw new TypeError("Function.prototype.bind called on incompatible " + i);
          for (var h, p = function(g, m) {
            for (var x = [], w = 1, k = 0; w < g.length; w += 1, k += 1) x[k] = g[w];
            return x;
          }(arguments), _ = n(0, i.length - p.length), d = [], f = 0; f < _; f++) d[f] = "$" + f;
          if (h = Function("binder", "return function (" + function(g, m) {
            for (var x = "", w = 0; w < g.length; w += 1) x += g[w], w + 1 < g.length && (x += ",");
            return x;
          }(d) + "){ return binder.apply(this,arguments); }")(function() {
            if (this instanceof h) {
              var g = i.apply(this, l(p, arguments));
              return Object(g) === g ? g : this;
            }
            return i.apply(u, l(p, arguments));
          }), i.prototype) {
            var c = function() {
            };
            c.prototype = i.prototype, h.prototype = new c(), c.prototype = null;
          }
          return h;
        };
      }, 87547: function(o, s, n) {
        var l = n(31917);
        o.exports = Function.prototype.bind || l;
      }, 72880: function(o) {
        o.exports = function(s, n) {
          if (typeof s != "string") throw new TypeError("must specify type string");
          if (n = n || {}, typeof document > "u" && !n.canvas) return null;
          var l = n.canvas || document.createElement("canvas");
          typeof n.width == "number" && (l.width = n.width), typeof n.height == "number" && (l.height = n.height);
          var u, i = n;
          try {
            var h = [s];
            s.indexOf("webgl") === 0 && h.push("experimental-" + s);
            for (var p = 0; p < h.length; p++) if (u = l.getContext(h[p], i)) return u;
          } catch {
            u = null;
          }
          return u || null;
        };
      }, 71129: function(o, s, n) {
        var l, u = n(77731), i = n(35465), h = n(30582), p = n(50294), _ = n(98800), d = n(48631), f = n(33149), c = Function, g = function(re) {
          try {
            return c('"use strict"; return (' + re + ").constructor;")();
          } catch {
          }
        }, m = Object.getOwnPropertyDescriptor;
        if (m) try {
          m({}, "");
        } catch {
          m = null;
        }
        var x = function() {
          throw new d();
        }, w = m ? function() {
          try {
            return x;
          } catch {
            try {
              return m(arguments, "callee").get;
            } catch {
              return x;
            }
          }
        }() : x, k = n(8771)(), S = n(58436)(), A = Object.getPrototypeOf || (S ? function(re) {
          return re.__proto__;
        } : null), C = {}, D = typeof Uint8Array < "u" && A ? A(Uint8Array) : l, L = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? l : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? l : ArrayBuffer, "%ArrayIteratorPrototype%": k && A ? A([][Symbol.iterator]()) : l, "%AsyncFromSyncIteratorPrototype%": l, "%AsyncFunction%": C, "%AsyncGenerator%": C, "%AsyncGeneratorFunction%": C, "%AsyncIteratorPrototype%": C, "%Atomics%": typeof Atomics > "u" ? l : Atomics, "%BigInt%": typeof BigInt > "u" ? l : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? l : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? l : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? l : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": u, "%eval%": eval, "%EvalError%": i, "%Float32Array%": typeof Float32Array > "u" ? l : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? l : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? l : FinalizationRegistry, "%Function%": c, "%GeneratorFunction%": C, "%Int8Array%": typeof Int8Array > "u" ? l : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? l : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? l : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": k && A ? A(A([][Symbol.iterator]())) : l, "%JSON%": typeof JSON == "object" ? JSON : l, "%Map%": typeof Map > "u" ? l : Map, "%MapIteratorPrototype%": typeof Map < "u" && k && A ? A((/* @__PURE__ */ new Map())[Symbol.iterator]()) : l, "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? l : Promise, "%Proxy%": typeof Proxy > "u" ? l : Proxy, "%RangeError%": h, "%ReferenceError%": p, "%Reflect%": typeof Reflect > "u" ? l : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? l : Set, "%SetIteratorPrototype%": typeof Set < "u" && k && A ? A((/* @__PURE__ */ new Set())[Symbol.iterator]()) : l, "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? l : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": k && A ? A(""[Symbol.iterator]()) : l, "%Symbol%": k ? Symbol : l, "%SyntaxError%": _, "%ThrowTypeError%": w, "%TypedArray%": D, "%TypeError%": d, "%Uint8Array%": typeof Uint8Array > "u" ? l : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? l : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? l : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? l : Uint32Array, "%URIError%": f, "%WeakMap%": typeof WeakMap > "u" ? l : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? l : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? l : WeakSet };
        if (A) try {
          null.error;
        } catch (re) {
          var E = A(A(re));
          L["%Error.prototype%"] = E;
        }
        var P = function re(Y) {
          var te;
          if (Y === "%AsyncFunction%") te = g("async function () {}");
          else if (Y === "%GeneratorFunction%") te = g("function* () {}");
          else if (Y === "%AsyncGeneratorFunction%") te = g("async function* () {}");
          else if (Y === "%AsyncGenerator%") {
            var ee = re("%AsyncGeneratorFunction%");
            ee && (te = ee.prototype);
          } else if (Y === "%AsyncIteratorPrototype%") {
            var X = re("%AsyncGenerator%");
            X && A && (te = A(X.prototype));
          }
          return L[Y] = te, te;
        }, I = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, M = n(87547), O = n(80753), T = M.call(Function.call, Array.prototype.concat), z = M.call(Function.apply, Array.prototype.splice), F = M.call(Function.call, String.prototype.replace), U = M.call(Function.call, String.prototype.slice), V = M.call(Function.call, RegExp.prototype.exec), $ = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, q = /\\(\\)?/g, K = function(re, Y) {
          var te, ee = re;
          if (O(I, ee) && (ee = "%" + (te = I[ee])[0] + "%"), O(L, ee)) {
            var X = L[ee];
            if (X === C && (X = P(ee)), X === void 0 && !Y) throw new d("intrinsic " + re + " exists, but is not available. Please file an issue!");
            return { alias: te, name: ee, value: X };
          }
          throw new _("intrinsic " + re + " does not exist!");
        };
        o.exports = function(re, Y) {
          if (typeof re != "string" || re.length === 0) throw new d("intrinsic name must be a non-empty string");
          if (arguments.length > 1 && typeof Y != "boolean") throw new d('"allowMissing" argument must be a boolean');
          if (V(/^%?[^%]*%?$/, re) === null) throw new _("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
          var te = function(pe) {
            var be = U(pe, 0, 1), Ae = U(pe, -1);
            if (be === "%" && Ae !== "%") throw new _("invalid intrinsic syntax, expected closing `%`");
            if (Ae === "%" && be !== "%") throw new _("invalid intrinsic syntax, expected opening `%`");
            var Se = [];
            return F(pe, $, function(Me, De, Le, We) {
              Se[Se.length] = Le ? F(We, q, "$1") : De || Me;
            }), Se;
          }(re), ee = te.length > 0 ? te[0] : "", X = K("%" + ee + "%", Y), Q = X.name, ue = X.value, ce = !1, he = X.alias;
          he && (ee = he[0], z(te, T([0, 1], he)));
          for (var de = 1, ne = !0; de < te.length; de += 1) {
            var ae = te[de], se = U(ae, 0, 1), me = U(ae, -1);
            if ((se === '"' || se === "'" || se === "`" || me === '"' || me === "'" || me === "`") && se !== me) throw new _("property names with quotes must have matching quotes");
            if (ae !== "constructor" && ne || (ce = !0), O(L, Q = "%" + (ee += "." + ae) + "%")) ue = L[Q];
            else if (ue != null) {
              if (!(ae in ue)) {
                if (!Y) throw new d("base intrinsic for " + re + " exists, but the property is not available.");
                return;
              }
              if (m && de + 1 >= te.length) {
                var ye = m(ue, ae);
                ue = (ne = !!ye) && "get" in ye && !("originalValue" in ye.get) ? ye.get : ue[ae];
              } else ne = O(ue, ae), ue = ue[ae];
              ne && !ce && (L[Q] = ue);
            }
          }
          return ue;
        };
      }, 84840: function(o) {
        o.exports = function(s, n) {
          var l = n[0], u = n[1], i = n[2], h = n[3], p = n[4], _ = n[5], d = n[6], f = n[7], c = n[8], g = n[9], m = n[10], x = n[11], w = n[12], k = n[13], S = n[14], A = n[15];
          return s[0] = _ * (m * A - x * S) - g * (d * A - f * S) + k * (d * x - f * m), s[1] = -(u * (m * A - x * S) - g * (i * A - h * S) + k * (i * x - h * m)), s[2] = u * (d * A - f * S) - _ * (i * A - h * S) + k * (i * f - h * d), s[3] = -(u * (d * x - f * m) - _ * (i * x - h * m) + g * (i * f - h * d)), s[4] = -(p * (m * A - x * S) - c * (d * A - f * S) + w * (d * x - f * m)), s[5] = l * (m * A - x * S) - c * (i * A - h * S) + w * (i * x - h * m), s[6] = -(l * (d * A - f * S) - p * (i * A - h * S) + w * (i * f - h * d)), s[7] = l * (d * x - f * m) - p * (i * x - h * m) + c * (i * f - h * d), s[8] = p * (g * A - x * k) - c * (_ * A - f * k) + w * (_ * x - f * g), s[9] = -(l * (g * A - x * k) - c * (u * A - h * k) + w * (u * x - h * g)), s[10] = l * (_ * A - f * k) - p * (u * A - h * k) + w * (u * f - h * _), s[11] = -(l * (_ * x - f * g) - p * (u * x - h * g) + c * (u * f - h * _)), s[12] = -(p * (g * S - m * k) - c * (_ * S - d * k) + w * (_ * m - d * g)), s[13] = l * (g * S - m * k) - c * (u * S - i * k) + w * (u * m - i * g), s[14] = -(l * (_ * S - d * k) - p * (u * S - i * k) + w * (u * d - i * _)), s[15] = l * (_ * m - d * g) - p * (u * m - i * g) + c * (u * d - i * _), s;
        };
      }, 99698: function(o) {
        o.exports = function(s) {
          var n = new Float32Array(16);
          return n[0] = s[0], n[1] = s[1], n[2] = s[2], n[3] = s[3], n[4] = s[4], n[5] = s[5], n[6] = s[6], n[7] = s[7], n[8] = s[8], n[9] = s[9], n[10] = s[10], n[11] = s[11], n[12] = s[12], n[13] = s[13], n[14] = s[14], n[15] = s[15], n;
        };
      }, 57938: function(o) {
        o.exports = function(s, n) {
          return s[0] = n[0], s[1] = n[1], s[2] = n[2], s[3] = n[3], s[4] = n[4], s[5] = n[5], s[6] = n[6], s[7] = n[7], s[8] = n[8], s[9] = n[9], s[10] = n[10], s[11] = n[11], s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15], s;
        };
      }, 87519: function(o) {
        o.exports = function() {
          var s = new Float32Array(16);
          return s[0] = 1, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = 1, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = 1, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 6900: function(o) {
        o.exports = function(s) {
          var n = s[0], l = s[1], u = s[2], i = s[3], h = s[4], p = s[5], _ = s[6], d = s[7], f = s[8], c = s[9], g = s[10], m = s[11], x = s[12], w = s[13], k = s[14], S = s[15];
          return (n * p - l * h) * (g * S - m * k) - (n * _ - u * h) * (c * S - m * w) + (n * d - i * h) * (c * k - g * w) + (l * _ - u * p) * (f * S - m * x) - (l * d - i * p) * (f * k - g * x) + (u * d - i * _) * (f * w - c * x);
        };
      }, 36472: function(o) {
        o.exports = function(s, n) {
          var l = n[0], u = n[1], i = n[2], h = n[3], p = l + l, _ = u + u, d = i + i, f = l * p, c = u * p, g = u * _, m = i * p, x = i * _, w = i * d, k = h * p, S = h * _, A = h * d;
          return s[0] = 1 - g - w, s[1] = c + A, s[2] = m - S, s[3] = 0, s[4] = c - A, s[5] = 1 - f - w, s[6] = x + k, s[7] = 0, s[8] = m + S, s[9] = x - k, s[10] = 1 - f - g, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 43061: function(o) {
        o.exports = function(s, n, l) {
          var u, i, h, p = l[0], _ = l[1], d = l[2], f = Math.sqrt(p * p + _ * _ + d * d);
          return Math.abs(f) < 1e-6 ? null : (p *= f = 1 / f, _ *= f, d *= f, u = Math.sin(n), h = 1 - (i = Math.cos(n)), s[0] = p * p * h + i, s[1] = _ * p * h + d * u, s[2] = d * p * h - _ * u, s[3] = 0, s[4] = p * _ * h - d * u, s[5] = _ * _ * h + i, s[6] = d * _ * h + p * u, s[7] = 0, s[8] = p * d * h + _ * u, s[9] = _ * d * h - p * u, s[10] = d * d * h + i, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s);
        };
      }, 33606: function(o) {
        o.exports = function(s, n, l) {
          var u = n[0], i = n[1], h = n[2], p = n[3], _ = u + u, d = i + i, f = h + h, c = u * _, g = u * d, m = u * f, x = i * d, w = i * f, k = h * f, S = p * _, A = p * d, C = p * f;
          return s[0] = 1 - (x + k), s[1] = g + C, s[2] = m - A, s[3] = 0, s[4] = g - C, s[5] = 1 - (c + k), s[6] = w + S, s[7] = 0, s[8] = m + A, s[9] = w - S, s[10] = 1 - (c + x), s[11] = 0, s[12] = l[0], s[13] = l[1], s[14] = l[2], s[15] = 1, s;
        };
      }, 98698: function(o) {
        o.exports = function(s, n) {
          return s[0] = n[0], s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = n[1], s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = n[2], s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 6924: function(o) {
        o.exports = function(s, n) {
          return s[0] = 1, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = 1, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = 1, s[11] = 0, s[12] = n[0], s[13] = n[1], s[14] = n[2], s[15] = 1, s;
        };
      }, 81181: function(o) {
        o.exports = function(s, n) {
          var l = Math.sin(n), u = Math.cos(n);
          return s[0] = 1, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = u, s[6] = l, s[7] = 0, s[8] = 0, s[9] = -l, s[10] = u, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 95258: function(o) {
        o.exports = function(s, n) {
          var l = Math.sin(n), u = Math.cos(n);
          return s[0] = u, s[1] = 0, s[2] = -l, s[3] = 0, s[4] = 0, s[5] = 1, s[6] = 0, s[7] = 0, s[8] = l, s[9] = 0, s[10] = u, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 94815: function(o) {
        o.exports = function(s, n) {
          var l = Math.sin(n), u = Math.cos(n);
          return s[0] = u, s[1] = l, s[2] = 0, s[3] = 0, s[4] = -l, s[5] = u, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = 1, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 87301: function(o) {
        o.exports = function(s, n, l, u, i, h, p) {
          var _ = 1 / (l - n), d = 1 / (i - u), f = 1 / (h - p);
          return s[0] = 2 * h * _, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = 2 * h * d, s[6] = 0, s[7] = 0, s[8] = (l + n) * _, s[9] = (i + u) * d, s[10] = (p + h) * f, s[11] = -1, s[12] = 0, s[13] = 0, s[14] = p * h * 2 * f, s[15] = 0, s;
        };
      }, 87193: function(o) {
        o.exports = function(s) {
          return s[0] = 1, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = 1, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = 1, s[11] = 0, s[12] = 0, s[13] = 0, s[14] = 0, s[15] = 1, s;
        };
      }, 11191: function(o, s, n) {
        o.exports = { create: n(87519), clone: n(99698), copy: n(57938), identity: n(87193), transpose: n(10256), invert: n(96559), adjoint: n(84840), determinant: n(6900), multiply: n(14787), translate: n(4165), scale: n(8697), rotate: n(32416), rotateX: n(81066), rotateY: n(54201), rotateZ: n(33920), fromRotation: n(43061), fromRotationTranslation: n(33606), fromScaling: n(98698), fromTranslation: n(6924), fromXRotation: n(81181), fromYRotation: n(95258), fromZRotation: n(94815), fromQuat: n(36472), frustum: n(87301), perspective: n(5313), perspectiveFromFieldOfView: n(22253), ortho: n(4633), lookAt: n(26645), str: n(66992) };
      }, 96559: function(o) {
        o.exports = function(s, n) {
          var l = n[0], u = n[1], i = n[2], h = n[3], p = n[4], _ = n[5], d = n[6], f = n[7], c = n[8], g = n[9], m = n[10], x = n[11], w = n[12], k = n[13], S = n[14], A = n[15], C = l * _ - u * p, D = l * d - i * p, L = l * f - h * p, E = u * d - i * _, P = u * f - h * _, I = i * f - h * d, M = c * k - g * w, O = c * S - m * w, T = c * A - x * w, z = g * S - m * k, F = g * A - x * k, U = m * A - x * S, V = C * U - D * F + L * z + E * T - P * O + I * M;
          return V ? (V = 1 / V, s[0] = (_ * U - d * F + f * z) * V, s[1] = (i * F - u * U - h * z) * V, s[2] = (k * I - S * P + A * E) * V, s[3] = (m * P - g * I - x * E) * V, s[4] = (d * T - p * U - f * O) * V, s[5] = (l * U - i * T + h * O) * V, s[6] = (S * L - w * I - A * D) * V, s[7] = (c * I - m * L + x * D) * V, s[8] = (p * F - _ * T + f * M) * V, s[9] = (u * T - l * F - h * M) * V, s[10] = (w * P - k * L + A * C) * V, s[11] = (g * L - c * P - x * C) * V, s[12] = (_ * O - p * z - d * M) * V, s[13] = (l * z - u * O + i * M) * V, s[14] = (k * D - w * E - S * C) * V, s[15] = (c * E - g * D + m * C) * V, s) : null;
        };
      }, 26645: function(o, s, n) {
        var l = n(87193);
        o.exports = function(u, i, h, p) {
          var _, d, f, c, g, m, x, w, k, S, A = i[0], C = i[1], D = i[2], L = p[0], E = p[1], P = p[2], I = h[0], M = h[1], O = h[2];
          return Math.abs(A - I) < 1e-6 && Math.abs(C - M) < 1e-6 && Math.abs(D - O) < 1e-6 ? l(u) : (x = A - I, w = C - M, k = D - O, _ = E * (k *= S = 1 / Math.sqrt(x * x + w * w + k * k)) - P * (w *= S), d = P * (x *= S) - L * k, f = L * w - E * x, (S = Math.sqrt(_ * _ + d * d + f * f)) ? (_ *= S = 1 / S, d *= S, f *= S) : (_ = 0, d = 0, f = 0), c = w * f - k * d, g = k * _ - x * f, m = x * d - w * _, (S = Math.sqrt(c * c + g * g + m * m)) ? (c *= S = 1 / S, g *= S, m *= S) : (c = 0, g = 0, m = 0), u[0] = _, u[1] = c, u[2] = x, u[3] = 0, u[4] = d, u[5] = g, u[6] = w, u[7] = 0, u[8] = f, u[9] = m, u[10] = k, u[11] = 0, u[12] = -(_ * A + d * C + f * D), u[13] = -(c * A + g * C + m * D), u[14] = -(x * A + w * C + k * D), u[15] = 1, u);
        };
      }, 14787: function(o) {
        o.exports = function(s, n, l) {
          var u = n[0], i = n[1], h = n[2], p = n[3], _ = n[4], d = n[5], f = n[6], c = n[7], g = n[8], m = n[9], x = n[10], w = n[11], k = n[12], S = n[13], A = n[14], C = n[15], D = l[0], L = l[1], E = l[2], P = l[3];
          return s[0] = D * u + L * _ + E * g + P * k, s[1] = D * i + L * d + E * m + P * S, s[2] = D * h + L * f + E * x + P * A, s[3] = D * p + L * c + E * w + P * C, D = l[4], L = l[5], E = l[6], P = l[7], s[4] = D * u + L * _ + E * g + P * k, s[5] = D * i + L * d + E * m + P * S, s[6] = D * h + L * f + E * x + P * A, s[7] = D * p + L * c + E * w + P * C, D = l[8], L = l[9], E = l[10], P = l[11], s[8] = D * u + L * _ + E * g + P * k, s[9] = D * i + L * d + E * m + P * S, s[10] = D * h + L * f + E * x + P * A, s[11] = D * p + L * c + E * w + P * C, D = l[12], L = l[13], E = l[14], P = l[15], s[12] = D * u + L * _ + E * g + P * k, s[13] = D * i + L * d + E * m + P * S, s[14] = D * h + L * f + E * x + P * A, s[15] = D * p + L * c + E * w + P * C, s;
        };
      }, 4633: function(o) {
        o.exports = function(s, n, l, u, i, h, p) {
          var _ = 1 / (n - l), d = 1 / (u - i), f = 1 / (h - p);
          return s[0] = -2 * _, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = -2 * d, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = 2 * f, s[11] = 0, s[12] = (n + l) * _, s[13] = (i + u) * d, s[14] = (p + h) * f, s[15] = 1, s;
        };
      }, 5313: function(o) {
        o.exports = function(s, n, l, u, i) {
          var h = 1 / Math.tan(n / 2), p = 1 / (u - i);
          return s[0] = h / l, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = h, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = (i + u) * p, s[11] = -1, s[12] = 0, s[13] = 0, s[14] = 2 * i * u * p, s[15] = 0, s;
        };
      }, 22253: function(o) {
        o.exports = function(s, n, l, u) {
          var i = Math.tan(n.upDegrees * Math.PI / 180), h = Math.tan(n.downDegrees * Math.PI / 180), p = Math.tan(n.leftDegrees * Math.PI / 180), _ = Math.tan(n.rightDegrees * Math.PI / 180), d = 2 / (p + _), f = 2 / (i + h);
          return s[0] = d, s[1] = 0, s[2] = 0, s[3] = 0, s[4] = 0, s[5] = f, s[6] = 0, s[7] = 0, s[8] = -(p - _) * d * 0.5, s[9] = (i - h) * f * 0.5, s[10] = u / (l - u), s[11] = -1, s[12] = 0, s[13] = 0, s[14] = u * l / (l - u), s[15] = 0, s;
        };
      }, 32416: function(o) {
        o.exports = function(s, n, l, u) {
          var i, h, p, _, d, f, c, g, m, x, w, k, S, A, C, D, L, E, P, I, M, O, T, z, F = u[0], U = u[1], V = u[2], $ = Math.sqrt(F * F + U * U + V * V);
          return Math.abs($) < 1e-6 ? null : (F *= $ = 1 / $, U *= $, V *= $, i = Math.sin(l), p = 1 - (h = Math.cos(l)), _ = n[0], d = n[1], f = n[2], c = n[3], g = n[4], m = n[5], x = n[6], w = n[7], k = n[8], S = n[9], A = n[10], C = n[11], D = F * F * p + h, L = U * F * p + V * i, E = V * F * p - U * i, P = F * U * p - V * i, I = U * U * p + h, M = V * U * p + F * i, O = F * V * p + U * i, T = U * V * p - F * i, z = V * V * p + h, s[0] = _ * D + g * L + k * E, s[1] = d * D + m * L + S * E, s[2] = f * D + x * L + A * E, s[3] = c * D + w * L + C * E, s[4] = _ * P + g * I + k * M, s[5] = d * P + m * I + S * M, s[6] = f * P + x * I + A * M, s[7] = c * P + w * I + C * M, s[8] = _ * O + g * T + k * z, s[9] = d * O + m * T + S * z, s[10] = f * O + x * T + A * z, s[11] = c * O + w * T + C * z, n !== s && (s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15]), s);
        };
      }, 81066: function(o) {
        o.exports = function(s, n, l) {
          var u = Math.sin(l), i = Math.cos(l), h = n[4], p = n[5], _ = n[6], d = n[7], f = n[8], c = n[9], g = n[10], m = n[11];
          return n !== s && (s[0] = n[0], s[1] = n[1], s[2] = n[2], s[3] = n[3], s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15]), s[4] = h * i + f * u, s[5] = p * i + c * u, s[6] = _ * i + g * u, s[7] = d * i + m * u, s[8] = f * i - h * u, s[9] = c * i - p * u, s[10] = g * i - _ * u, s[11] = m * i - d * u, s;
        };
      }, 54201: function(o) {
        o.exports = function(s, n, l) {
          var u = Math.sin(l), i = Math.cos(l), h = n[0], p = n[1], _ = n[2], d = n[3], f = n[8], c = n[9], g = n[10], m = n[11];
          return n !== s && (s[4] = n[4], s[5] = n[5], s[6] = n[6], s[7] = n[7], s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15]), s[0] = h * i - f * u, s[1] = p * i - c * u, s[2] = _ * i - g * u, s[3] = d * i - m * u, s[8] = h * u + f * i, s[9] = p * u + c * i, s[10] = _ * u + g * i, s[11] = d * u + m * i, s;
        };
      }, 33920: function(o) {
        o.exports = function(s, n, l) {
          var u = Math.sin(l), i = Math.cos(l), h = n[0], p = n[1], _ = n[2], d = n[3], f = n[4], c = n[5], g = n[6], m = n[7];
          return n !== s && (s[8] = n[8], s[9] = n[9], s[10] = n[10], s[11] = n[11], s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15]), s[0] = h * i + f * u, s[1] = p * i + c * u, s[2] = _ * i + g * u, s[3] = d * i + m * u, s[4] = f * i - h * u, s[5] = c * i - p * u, s[6] = g * i - _ * u, s[7] = m * i - d * u, s;
        };
      }, 8697: function(o) {
        o.exports = function(s, n, l) {
          var u = l[0], i = l[1], h = l[2];
          return s[0] = n[0] * u, s[1] = n[1] * u, s[2] = n[2] * u, s[3] = n[3] * u, s[4] = n[4] * i, s[5] = n[5] * i, s[6] = n[6] * i, s[7] = n[7] * i, s[8] = n[8] * h, s[9] = n[9] * h, s[10] = n[10] * h, s[11] = n[11] * h, s[12] = n[12], s[13] = n[13], s[14] = n[14], s[15] = n[15], s;
        };
      }, 66992: function(o) {
        o.exports = function(s) {
          return "mat4(" + s[0] + ", " + s[1] + ", " + s[2] + ", " + s[3] + ", " + s[4] + ", " + s[5] + ", " + s[6] + ", " + s[7] + ", " + s[8] + ", " + s[9] + ", " + s[10] + ", " + s[11] + ", " + s[12] + ", " + s[13] + ", " + s[14] + ", " + s[15] + ")";
        };
      }, 4165: function(o) {
        o.exports = function(s, n, l) {
          var u, i, h, p, _, d, f, c, g, m, x, w, k = l[0], S = l[1], A = l[2];
          return n === s ? (s[12] = n[0] * k + n[4] * S + n[8] * A + n[12], s[13] = n[1] * k + n[5] * S + n[9] * A + n[13], s[14] = n[2] * k + n[6] * S + n[10] * A + n[14], s[15] = n[3] * k + n[7] * S + n[11] * A + n[15]) : (u = n[0], i = n[1], h = n[2], p = n[3], _ = n[4], d = n[5], f = n[6], c = n[7], g = n[8], m = n[9], x = n[10], w = n[11], s[0] = u, s[1] = i, s[2] = h, s[3] = p, s[4] = _, s[5] = d, s[6] = f, s[7] = c, s[8] = g, s[9] = m, s[10] = x, s[11] = w, s[12] = u * k + _ * S + g * A + n[12], s[13] = i * k + d * S + m * A + n[13], s[14] = h * k + f * S + x * A + n[14], s[15] = p * k + c * S + w * A + n[15]), s;
        };
      }, 10256: function(o) {
        o.exports = function(s, n) {
          if (s === n) {
            var l = n[1], u = n[2], i = n[3], h = n[6], p = n[7], _ = n[11];
            s[1] = n[4], s[2] = n[8], s[3] = n[12], s[4] = l, s[6] = n[9], s[7] = n[13], s[8] = u, s[9] = h, s[11] = n[14], s[12] = i, s[13] = p, s[14] = _;
          } else s[0] = n[0], s[1] = n[4], s[2] = n[8], s[3] = n[12], s[4] = n[1], s[5] = n[5], s[6] = n[9], s[7] = n[13], s[8] = n[2], s[9] = n[6], s[10] = n[10], s[11] = n[14], s[12] = n[3], s[13] = n[7], s[14] = n[11], s[15] = n[15];
          return s;
        };
      }, 74024: function(o, s, n) {
        var l = n(59518), u = n(6807), i = n(81330), h = n(38862), p = n(93103), _ = n(162), d = n(68950), f = n(66127), c = n(5137), g = n(29388), m = n(4957), x = n(44626), w = n(44431), k = n(27976), S = n(12673), A = n(83473), C = n(54689).nextPow2, D = new p(), L = !1;
        if (document.body) {
          var E = document.body.appendChild(document.createElement("div"));
          E.style.font = "italic small-caps bold condensed 16px/2 cursive", getComputedStyle(E).fontStretch && (L = !0), document.body.removeChild(E);
        }
        var P = function(I) {
          (function(M) {
            return typeof M == "function" && M._gl && M.prop && M.texture && M.buffer;
          })(I) ? (I = { regl: I }, this.gl = I.regl._gl) : this.gl = h(I), this.shader = D.get(this.gl), this.shader ? this.regl = this.shader.regl : this.regl = I.regl || i({ gl: this.gl }), this.charBuffer = this.regl.buffer({ type: "uint8", usage: "stream" }), this.sizeBuffer = this.regl.buffer({ type: "float", usage: "stream" }), this.shader || (this.shader = this.createShader(), D.set(this.gl, this.shader)), this.batch = [], this.fontSize = [], this.font = [], this.fontAtlas = [], this.draw = this.shader.draw.bind(this), this.render = function() {
            this.regl._refresh(), this.draw(this.batch);
          }, this.canvas = this.gl.canvas, this.update(g(I) ? I : {});
        };
        P.prototype.createShader = function() {
          var I = this.regl, M = I({ blend: { enable: !0, color: [0, 0, 0, 1], func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, stencil: { enable: !1 }, depth: { enable: !1 }, count: I.prop("count"), offset: I.prop("offset"), attributes: { charOffset: { offset: 4, stride: 8, buffer: I.this("sizeBuffer") }, width: { offset: 0, stride: 8, buffer: I.this("sizeBuffer") }, char: I.this("charBuffer"), position: I.this("position") }, uniforms: { atlasSize: function(O, T) {
            return [T.atlas.width, T.atlas.height];
          }, atlasDim: function(O, T) {
            return [T.atlas.cols, T.atlas.rows];
          }, atlas: function(O, T) {
            return T.atlas.texture;
          }, charStep: function(O, T) {
            return T.atlas.step;
          }, em: function(O, T) {
            return T.atlas.em;
          }, color: I.prop("color"), opacity: I.prop("opacity"), viewport: I.this("viewportArray"), scale: I.this("scale"), align: I.prop("align"), baseline: I.prop("baseline"), translate: I.this("translate"), positionOffset: I.prop("positionOffset") }, primitive: "points", viewport: I.this("viewport"), vert: `
			precision highp float;
			attribute float width, charOffset, char;
			attribute vec2 position;
			uniform float fontSize, charStep, em, align, baseline;
			uniform vec4 viewport;
			uniform vec4 color;
			uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
			varying vec2 charCoord, charId;
			varying float charWidth;
			varying vec4 fontColor;
			void main () {
				vec2 offset = floor(em * (vec2(align + charOffset, baseline)
					+ vec2(positionOffset.x, -positionOffset.y)))
					/ (viewport.zw * scale.xy);

				vec2 position = (position + translate) * scale;
				position += offset * scale;

				charCoord = position * viewport.zw + viewport.xy;

				gl_Position = vec4(position * 2. - 1., 0, 1);

				gl_PointSize = charStep;

				charId.x = mod(char, atlasDim.x);
				charId.y = floor(char / atlasDim.x);

				charWidth = width * em;

				fontColor = color / 255.;
			}`, frag: `
			precision highp float;
			uniform float fontSize, charStep, opacity;
			uniform vec2 atlasSize;
			uniform vec4 viewport;
			uniform sampler2D atlas;
			varying vec4 fontColor;
			varying vec2 charCoord, charId;
			varying float charWidth;

			float lightness(vec4 color) {
				return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
			}

			void main () {
				vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
				float halfCharStep = floor(charStep * .5 + .5);

				// invert y and shift by 1px (FF expecially needs that)
				uv.y = charStep - uv.y;

				// ignore points outside of character bounding box
				float halfCharWidth = ceil(charWidth * .5);
				if (floor(uv.x) > halfCharStep + halfCharWidth ||
					floor(uv.x) < halfCharStep - halfCharWidth) return;

				uv += charId * charStep;
				uv = uv / atlasSize;

				vec4 color = fontColor;
				vec4 mask = texture2D(atlas, uv);

				float maskY = lightness(mask);
				// float colorY = lightness(color);
				color.a *= maskY;
				color.a *= opacity;

				// color.a += .1;

				// antialiasing, see yiq color space y-channel formula
				// color.rgb += (1. - color.rgb) * (1. - mask.rgb);

				gl_FragColor = color;
			}` });
          return { regl: I, draw: M, atlas: {} };
        }, P.prototype.update = function(I) {
          var M = this;
          if (typeof I == "string") I = { text: I };
          else if (!I) return;
          (I = u(I, { position: "position positions coord coords coordinates", font: "font fontFace fontface typeface cssFont css-font family fontFamily", fontSize: "fontSize fontsize size font-size", text: "text texts chars characters value values symbols", align: "align alignment textAlign textbaseline", baseline: "baseline textBaseline textbaseline", direction: "dir direction textDirection", color: "color colour fill fill-color fillColor textColor textcolor", kerning: "kerning kern", range: "range dataBox", viewport: "vp viewport viewBox viewbox viewPort", opacity: "opacity alpha transparency visible visibility opaque", offset: "offset positionOffset padding shift indent indentation" }, !0)).opacity != null && (Array.isArray(I.opacity) ? this.opacity = I.opacity.map(function(ge) {
            return parseFloat(ge);
          }) : this.opacity = parseFloat(I.opacity)), I.viewport != null && (this.viewport = c(I.viewport), this.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]), this.viewport == null && (this.viewport = { x: 0, y: 0, width: this.gl.drawingBufferWidth, height: this.gl.drawingBufferHeight }, this.viewportArray = [this.viewport.x, this.viewport.y, this.viewport.width, this.viewport.height]), I.kerning != null && (this.kerning = I.kerning), I.offset != null && (typeof I.offset == "number" && (I.offset = [I.offset, 0]), this.positionOffset = A(I.offset)), I.direction && (this.direction = I.direction), I.range && (this.range = I.range, this.scale = [1 / (I.range[2] - I.range[0]), 1 / (I.range[3] - I.range[1])], this.translate = [-I.range[0], -I.range[1]]), I.scale && (this.scale = I.scale), I.translate && (this.translate = I.translate), this.scale || (this.scale = [1 / this.viewport.width, 1 / this.viewport.height]), this.translate || (this.translate = [0, 0]), this.font.length || I.font || (I.font = P.baseFontSize + "px sans-serif");
          var O, T = !1, z = !1;
          if (I.font && (Array.isArray(I.font) ? I.font : [I.font]).forEach(function(ge, Ce) {
            if (typeof ge == "string") try {
              ge = l.parse(ge);
            } catch {
              ge = l.parse(P.baseFontSize + "px " + ge);
            }
            else {
              var we = ge.style, Ge = ge.weight, Re = ge.stretch, je = ge.variant;
              ge = l.parse(l.stringify(ge)), we && (ge.style = we), Ge && (ge.weight = Ge), Re && (ge.stretch = Re), je && (ge.variant = je);
            }
            var Ke = l.stringify({ size: P.baseFontSize, family: ge.family, stretch: L ? ge.stretch : void 0, variant: ge.variant, weight: ge.weight, style: ge.style }), tt = m(ge.size), _e = Math.round(tt[0] * x(tt[1]));
            if (_e !== M.fontSize[Ce] && (z = !0, M.fontSize[Ce] = _e), !(M.font[Ce] && Ke == M.font[Ce].baseString || (T = !0, M.font[Ce] = P.fonts[Ke], M.font[Ce]))) {
              var Be = ge.family.join(", "), $e = [ge.style];
              ge.style != ge.variant && $e.push(ge.variant), ge.variant != ge.weight && $e.push(ge.weight), L && ge.weight != ge.stretch && $e.push(ge.stretch), M.font[Ce] = { baseString: Ke, family: Be, weight: ge.weight, stretch: ge.stretch, style: ge.style, variant: ge.variant, width: {}, kerning: {}, metrics: S(Be, { origin: "top", fontSize: P.baseFontSize, fontStyle: $e.join(" ") }) }, P.fonts[Ke] = M.font[Ce];
            }
          }), (T || z) && this.font.forEach(function(ge, Ce) {
            var we = l.stringify({ size: M.fontSize[Ce], family: ge.family, stretch: L ? ge.stretch : void 0, variant: ge.variant, weight: ge.weight, style: ge.style });
            if (M.fontAtlas[Ce] = M.shader.atlas[we], !M.fontAtlas[Ce]) {
              var Ge = ge.metrics;
              M.shader.atlas[we] = M.fontAtlas[Ce] = { fontString: we, step: 2 * Math.ceil(M.fontSize[Ce] * Ge.bottom * 0.5), em: M.fontSize[Ce], cols: 0, rows: 0, height: 0, width: 0, chars: [], ids: {}, texture: M.regl.texture() };
            }
            I.text == null && (I.text = M.text);
          }), typeof I.text == "string" && I.position && I.position.length > 2) {
            for (var F = Array(0.5 * I.position.length), U = 0; U < F.length; U++) F[U] = I.text;
            I.text = F;
          }
          if (I.text != null || T) {
            if (this.textOffsets = [0], Array.isArray(I.text)) {
              this.count = I.text[0].length, this.counts = [this.count];
              for (var V = 1; V < I.text.length; V++) this.textOffsets[V] = this.textOffsets[V - 1] + I.text[V - 1].length, this.count += I.text[V].length, this.counts.push(I.text[V].length);
              this.text = I.text.join("");
            } else this.text = I.text, this.count = this.text.length, this.counts = [this.count];
            O = [], this.font.forEach(function(ge, Ce) {
              P.atlasContext.font = ge.baseString;
              for (var we = M.fontAtlas[Ce], Ge = 0; Ge < M.text.length; Ge++) {
                var Re = M.text.charAt(Ge);
                if (we.ids[Re] == null && (we.ids[Re] = we.chars.length, we.chars.push(Re), O.push(Re)), ge.width[Re] == null && (ge.width[Re] = P.atlasContext.measureText(Re).width / P.baseFontSize, M.kerning)) {
                  var je = [];
                  for (var Ke in ge.width) je.push(Ke + Re, Re + Ke);
                  k(ge.kerning, w(ge.family, { pairs: je }));
                }
              }
            });
          }
          if (I.position) if (I.position.length > 2) {
            for (var $ = !I.position[0].length, q = f.mallocFloat(2 * this.count), K = 0, re = 0; K < this.counts.length; K++) {
              var Y = this.counts[K];
              if ($) for (var te = 0; te < Y; te++) q[re++] = I.position[2 * K], q[re++] = I.position[2 * K + 1];
              else for (var ee = 0; ee < Y; ee++) q[re++] = I.position[K][0], q[re++] = I.position[K][1];
            }
            this.position.call ? this.position({ type: "float", data: q }) : this.position = this.regl.buffer({ type: "float", data: q }), f.freeFloat(q);
          } else this.position.destroy && this.position.destroy(), this.position = { constant: I.position };
          if (I.text || T) {
            var X = f.mallocUint8(this.count), Q = f.mallocFloat(2 * this.count);
            this.textWidth = [];
            for (var ue = 0, ce = 0; ue < this.counts.length; ue++) {
              for (var he = this.counts[ue], de = this.font[ue] || this.font[0], ne = this.fontAtlas[ue] || this.fontAtlas[0], ae = 0; ae < he; ae++) {
                var se = this.text.charAt(ce), me = this.text.charAt(ce - 1);
                if (X[ce] = ne.ids[se], Q[2 * ce] = de.width[se], ae) {
                  var ye = Q[2 * ce - 2], pe = Q[2 * ce], be = Q[2 * ce - 1] + 0.5 * ye + 0.5 * pe;
                  if (this.kerning) {
                    var Ae = de.kerning[me + se];
                    Ae && (be += 1e-3 * Ae);
                  }
                  Q[2 * ce + 1] = be;
                } else Q[2 * ce + 1] = 0.5 * Q[2 * ce];
                ce++;
              }
              this.textWidth.push(Q.length ? 0.5 * Q[2 * ce - 2] + Q[2 * ce - 1] : 0);
            }
            I.align || (I.align = this.align), this.charBuffer({ data: X, type: "uint8", usage: "stream" }), this.sizeBuffer({ data: Q, type: "float", usage: "stream" }), f.freeUint8(X), f.freeFloat(Q), O.length && this.font.forEach(function(ge, Ce) {
              var we = M.fontAtlas[Ce], Ge = we.step, Re = Math.floor(P.maxAtlasSize / Ge), je = Math.min(Re, we.chars.length), Ke = Math.ceil(we.chars.length / je), tt = C(je * Ge), _e = C(Ke * Ge);
              we.width = tt, we.height = _e, we.rows = Ke, we.cols = je, we.em && we.texture({ data: d({ canvas: P.atlasCanvas, font: we.fontString, chars: we.chars, shape: [tt, _e], step: [Ge, Ge] }) });
            });
          }
          if (I.align && (this.align = I.align, this.alignOffset = this.textWidth.map(function(ge, Ce) {
            var we = Array.isArray(M.align) ? M.align.length > 1 ? M.align[Ce] : M.align[0] : M.align;
            if (typeof we == "number") return we;
            switch (we) {
              case "right":
              case "end":
                return -ge;
              case "center":
              case "centre":
              case "middle":
                return 0.5 * -ge;
            }
            return 0;
          })), this.baseline == null && I.baseline == null && (I.baseline = 0), I.baseline != null && (this.baseline = I.baseline, Array.isArray(this.baseline) || (this.baseline = [this.baseline]), this.baselineOffset = this.baseline.map(function(ge, Ce) {
            var we = (M.font[Ce] || M.font[0]).metrics, Ge = 0;
            return Ge += 0.5 * we.bottom, -1 * (Ge += typeof ge == "number" ? ge - we.baseline : -we[ge]);
          })), I.color != null) if (I.color || (I.color = "transparent"), typeof I.color != "string" && isNaN(I.color)) {
            var Se;
            if (typeof I.color[0] == "number" && I.color.length > this.counts.length) {
              var Me = I.color.length;
              Se = f.mallocUint8(Me);
              for (var De = (I.color.subarray || I.color.slice).bind(I.color), Le = 0; Le < Me; Le += 4) Se.set(_(De(Le, Le + 4), "uint8"), Le);
            } else {
              var We = I.color.length;
              Se = f.mallocUint8(4 * We);
              for (var Ee = 0; Ee < We; Ee++) Se.set(_(I.color[Ee] || 0, "uint8"), 4 * Ee);
            }
            this.color = Se;
          } else this.color = _(I.color, "uint8");
          if (I.position || I.text || I.color || I.baseline || I.align || I.font || I.offset || I.opacity) if (this.color.length > 4 || this.baselineOffset.length > 1 || this.align && this.align.length > 1 || this.fontAtlas.length > 1 || this.positionOffset.length > 2) {
            var Ne = Math.max(0.5 * this.position.length || 0, 0.25 * this.color.length || 0, this.baselineOffset.length || 0, this.alignOffset.length || 0, this.font.length || 0, this.opacity.length || 0, 0.5 * this.positionOffset.length || 0);
            this.batch = Array(Ne);
            for (var Ie = 0; Ie < this.batch.length; Ie++) this.batch[Ie] = { count: this.counts.length > 1 ? this.counts[Ie] : this.counts[0], offset: this.textOffsets.length > 1 ? this.textOffsets[Ie] : this.textOffsets[0], color: this.color ? this.color.length <= 4 ? this.color : this.color.subarray(4 * Ie, 4 * Ie + 4) : [0, 0, 0, 255], opacity: Array.isArray(this.opacity) ? this.opacity[Ie] : this.opacity, baseline: this.baselineOffset[Ie] != null ? this.baselineOffset[Ie] : this.baselineOffset[0], align: this.align ? this.alignOffset[Ie] != null ? this.alignOffset[Ie] : this.alignOffset[0] : 0, atlas: this.fontAtlas[Ie] || this.fontAtlas[0], positionOffset: this.positionOffset.length > 2 ? this.positionOffset.subarray(2 * Ie, 2 * Ie + 2) : this.positionOffset };
          } else this.count ? this.batch = [{ count: this.count, offset: 0, color: this.color || [0, 0, 0, 255], opacity: Array.isArray(this.opacity) ? this.opacity[0] : this.opacity, baseline: this.baselineOffset[0], align: this.alignOffset ? this.alignOffset[0] : 0, atlas: this.fontAtlas[0], positionOffset: this.positionOffset }] : this.batch = [];
        }, P.prototype.destroy = function() {
        }, P.prototype.kerning = !0, P.prototype.position = { constant: new Float32Array(2) }, P.prototype.translate = null, P.prototype.scale = null, P.prototype.font = null, P.prototype.text = "", P.prototype.positionOffset = [0, 0], P.prototype.opacity = 1, P.prototype.color = new Uint8Array([0, 0, 0, 255]), P.prototype.alignOffset = [0, 0], P.maxAtlasSize = 1024, P.atlasCanvas = document.createElement("canvas"), P.atlasContext = P.atlasCanvas.getContext("2d", { alpha: !1 }), P.baseFontSize = 64, P.fonts = {}, o.exports = P;
      }, 38862: function(o, s, n) {
        var l = n(6807);
        function u(p) {
          if (p.container) if (p.container == document.body) document.body.style.width || (p.canvas.width = p.width || p.pixelRatio * n.g.innerWidth), document.body.style.height || (p.canvas.height = p.height || p.pixelRatio * n.g.innerHeight);
          else {
            var _ = p.container.getBoundingClientRect();
            p.canvas.width = p.width || _.right - _.left, p.canvas.height = p.height || _.bottom - _.top;
          }
        }
        function i(p) {
          return typeof p.getContext == "function" && "width" in p && "height" in p;
        }
        function h() {
          var p = document.createElement("canvas");
          return p.style.position = "absolute", p.style.top = 0, p.style.left = 0, p;
        }
        o.exports = function(p) {
          var _;
          if (p ? typeof p == "string" && (p = { container: p }) : p = {}, (p = i(p) || typeof (_ = p).nodeName == "string" && typeof _.appendChild == "function" && typeof _.getBoundingClientRect == "function" ? { container: p } : function(f) {
            return typeof f.drawArrays == "function" || typeof f.drawElements == "function";
          }(p) ? { gl: p } : l(p, { container: "container target element el canvas holder parent parentNode wrapper use ref root node", gl: "gl context webgl glContext", attrs: "attributes attrs contextAttributes", pixelRatio: "pixelRatio pxRatio px ratio pxratio pixelratio", width: "w width", height: "h height" }, !0)).pixelRatio || (p.pixelRatio = n.g.pixelRatio || 1), p.gl) return p.gl;
          if (p.canvas && (p.container = p.canvas.parentNode), p.container) {
            if (typeof p.container == "string") {
              var d = document.querySelector(p.container);
              if (!d) throw Error("Element " + p.container + " is not found");
              p.container = d;
            }
            i(p.container) ? (p.canvas = p.container, p.container = p.canvas.parentNode) : p.canvas || (p.canvas = h(), p.container.appendChild(p.canvas), u(p));
          } else if (!p.canvas) {
            if (typeof document > "u") throw Error("Not DOM environment. Use headless-gl.");
            p.container = document.body || document.documentElement, p.canvas = h(), p.container.appendChild(p.canvas), u(p);
          }
          return p.gl || ["webgl", "experimental-webgl", "webgl-experimental"].some(function(f) {
            try {
              p.gl = p.canvas.getContext(f, p.attrs);
            } catch {
            }
            return p.gl;
          }), p.gl;
        };
      }, 76765: function(o) {
        o.exports = function(s) {
          typeof s == "string" && (s = [s]);
          for (var n = [].slice.call(arguments, 1), l = [], u = 0; u < s.length - 1; u++) l.push(s[u], n[u] || "");
          return l.push(s[u]), l.join("");
        };
      }, 52991: function(o, s, n) {
        var l = n(71129)("%Object.getOwnPropertyDescriptor%", !0);
        if (l) try {
          l([], "length");
        } catch {
          l = null;
        }
        o.exports = l;
      }, 39784: function(o, s, n) {
        var l, u = n(78253);
        l = typeof n.g.matchMedia == "function" ? !n.g.matchMedia("(hover: none)").matches : u, o.exports = l;
      }, 74043: function(o, s, n) {
        var l = n(78253);
        o.exports = l && function() {
          var u = !1;
          try {
            var i = Object.defineProperty({}, "passive", { get: function() {
              u = !0;
            } });
            window.addEventListener("test", null, i), window.removeEventListener("test", null, i);
          } catch {
            u = !1;
          }
          return u;
        }();
      }, 74268: function(o, s, n) {
        var l = n(40891), u = function() {
          return !!l;
        };
        u.hasArrayLengthDefineBug = function() {
          if (!l) return null;
          try {
            return l([], "length", { value: 1 }).length !== 1;
          } catch {
            return !0;
          }
        }, o.exports = u;
      }, 58436: function(o) {
        var s = { foo: {} }, n = Object;
        o.exports = function() {
          return { __proto__: s }.foo === s.foo && !({ __proto__: null } instanceof n);
        };
      }, 8771: function(o, s, n) {
        var l = typeof Symbol < "u" && Symbol, u = n(59457);
        o.exports = function() {
          return typeof l == "function" && typeof Symbol == "function" && typeof l("foo") == "symbol" && typeof Symbol("bar") == "symbol" && u();
        };
      }, 59457: function(o) {
        o.exports = function() {
          if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
          if (typeof Symbol.iterator == "symbol") return !0;
          var s = {}, n = Symbol("test"), l = Object(n);
          if (typeof n == "string" || Object.prototype.toString.call(n) !== "[object Symbol]" || Object.prototype.toString.call(l) !== "[object Symbol]") return !1;
          for (n in s[n] = 42, s) return !1;
          if (typeof Object.keys == "function" && Object.keys(s).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(s).length !== 0) return !1;
          var u = Object.getOwnPropertySymbols(s);
          if (u.length !== 1 || u[0] !== n || !Object.prototype.propertyIsEnumerable.call(s, n)) return !1;
          if (typeof Object.getOwnPropertyDescriptor == "function") {
            var i = Object.getOwnPropertyDescriptor(s, n);
            if (i.value !== 42 || i.enumerable !== !0) return !1;
          }
          return !0;
        };
      }, 36912: function(o, s, n) {
        var l = n(59457);
        o.exports = function() {
          return l() && !!Symbol.toStringTag;
        };
      }, 80753: function(o, s, n) {
        var l = Function.prototype.call, u = Object.prototype.hasOwnProperty, i = n(87547);
        o.exports = i.call(l, u);
      }, 27415: function(o, s) {
        s.read = function(n, l, u, i, h) {
          var p, _, d = 8 * h - i - 1, f = (1 << d) - 1, c = f >> 1, g = -7, m = u ? h - 1 : 0, x = u ? -1 : 1, w = n[l + m];
          for (m += x, p = w & (1 << -g) - 1, w >>= -g, g += d; g > 0; p = 256 * p + n[l + m], m += x, g -= 8) ;
          for (_ = p & (1 << -g) - 1, p >>= -g, g += i; g > 0; _ = 256 * _ + n[l + m], m += x, g -= 8) ;
          if (p === 0) p = 1 - c;
          else {
            if (p === f) return _ ? NaN : 1 / 0 * (w ? -1 : 1);
            _ += Math.pow(2, i), p -= c;
          }
          return (w ? -1 : 1) * _ * Math.pow(2, p - i);
        }, s.write = function(n, l, u, i, h, p) {
          var _, d, f, c = 8 * p - h - 1, g = (1 << c) - 1, m = g >> 1, x = h === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, w = i ? 0 : p - 1, k = i ? 1 : -1, S = l < 0 || l === 0 && 1 / l < 0 ? 1 : 0;
          for (l = Math.abs(l), isNaN(l) || l === 1 / 0 ? (d = isNaN(l) ? 1 : 0, _ = g) : (_ = Math.floor(Math.log(l) / Math.LN2), l * (f = Math.pow(2, -_)) < 1 && (_--, f *= 2), (l += _ + m >= 1 ? x / f : x * Math.pow(2, 1 - m)) * f >= 2 && (_++, f /= 2), _ + m >= g ? (d = 0, _ = g) : _ + m >= 1 ? (d = (l * f - 1) * Math.pow(2, h), _ += m) : (d = l * Math.pow(2, m - 1) * Math.pow(2, h), _ = 0)); h >= 8; n[u + w] = 255 & d, w += k, d /= 256, h -= 8) ;
          for (_ = _ << h | d, c += h; c > 0; n[u + w] = 255 & _, w += k, _ /= 256, c -= 8) ;
          n[u + w - k] |= 128 * S;
        };
      }, 28062: function(o) {
        typeof Object.create == "function" ? o.exports = function(s, n) {
          n && (s.super_ = n, s.prototype = Object.create(n.prototype, { constructor: { value: s, enumerable: !1, writable: !0, configurable: !0 } }));
        } : o.exports = function(s, n) {
          if (n) {
            s.super_ = n;
            var l = function() {
            };
            l.prototype = n.prototype, s.prototype = new l(), s.prototype.constructor = s;
          }
        };
      }, 40280: function(o, s, n) {
        var l = n(36912)(), u = n(63063)("Object.prototype.toString"), i = function(_) {
          return !(l && _ && typeof _ == "object" && Symbol.toStringTag in _) && u(_) === "[object Arguments]";
        }, h = function(_) {
          return !!i(_) || _ !== null && typeof _ == "object" && typeof _.length == "number" && _.length >= 0 && u(_) !== "[object Array]" && u(_.callee) === "[object Function]";
        }, p = function() {
          return i(arguments);
        }();
        i.isLegacyArguments = h, o.exports = p ? i : h;
      }, 78253: function(o) {
        o.exports = !0;
      }, 82756: function(o) {
        var s, n, l = Function.prototype.toString, u = typeof Reflect == "object" && Reflect !== null && Reflect.apply;
        if (typeof u == "function" && typeof Object.defineProperty == "function") try {
          s = Object.defineProperty({}, "length", { get: function() {
            throw n;
          } }), n = {}, u(function() {
            throw 42;
          }, null, s);
        } catch (m) {
          m !== n && (u = null);
        }
        else u = null;
        var i = /^\s*class\b/, h = function(m) {
          try {
            var x = l.call(m);
            return i.test(x);
          } catch {
            return !1;
          }
        }, p = function(m) {
          try {
            return !h(m) && (l.call(m), !0);
          } catch {
            return !1;
          }
        }, _ = Object.prototype.toString, d = typeof Symbol == "function" && !!Symbol.toStringTag, f = !(0 in [,]), c = function() {
          return !1;
        };
        if (typeof document == "object") {
          var g = document.all;
          _.call(g) === _.call(document.all) && (c = function(m) {
            if ((f || !m) && (m === void 0 || typeof m == "object")) try {
              var x = _.call(m);
              return (x === "[object HTMLAllCollection]" || x === "[object HTML document.all class]" || x === "[object HTMLCollection]" || x === "[object Object]") && m("") == null;
            } catch {
            }
            return !1;
          });
        }
        o.exports = u ? function(m) {
          if (c(m)) return !0;
          if (!m || typeof m != "function" && typeof m != "object") return !1;
          try {
            u(m, null, s);
          } catch (x) {
            if (x !== n) return !1;
          }
          return !h(m) && p(m);
        } : function(m) {
          if (c(m)) return !0;
          if (!m || typeof m != "function" && typeof m != "object") return !1;
          if (d) return p(m);
          if (h(m)) return !1;
          var x = _.call(m);
          return !(x !== "[object Function]" && x !== "[object GeneratorFunction]" && !/^\[object HTML/.test(x)) && p(m);
        };
      }, 80340: function(o, s, n) {
        var l, u = Object.prototype.toString, i = Function.prototype.toString, h = /^\s*(?:function)?\*/, p = n(36912)(), _ = Object.getPrototypeOf;
        o.exports = function(d) {
          if (typeof d != "function") return !1;
          if (h.test(i.call(d))) return !0;
          if (!p) return u.call(d) === "[object GeneratorFunction]";
          if (!_) return !1;
          if (l === void 0) {
            var f = function() {
              if (!p) return !1;
              try {
                return Function("return function*() {}")();
              } catch {
              }
            }();
            l = !!f && _(f);
          }
          return _(d) === l;
        };
      }, 39488: function(o) {
        o.exports = typeof navigator < "u" && (/MSIE/.test(navigator.userAgent) || /Trident\//.test(navigator.appVersion));
      }, 73287: function(o) {
        o.exports = function(s) {
          return s != s;
        };
      }, 63057: function(o, s, n) {
        var l = n(87227), u = n(97936), i = n(73287), h = n(60758), p = n(85684), _ = l(h(), Number);
        u(_, { getPolyfill: h, implementation: i, shim: p }), o.exports = _;
      }, 60758: function(o, s, n) {
        var l = n(73287);
        o.exports = function() {
          return Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ? Number.isNaN : l;
        };
      }, 85684: function(o, s, n) {
        var l = n(97936), u = n(60758);
        o.exports = function() {
          var i = u();
          return l(Number, { isNaN: i }, { isNaN: function() {
            return Number.isNaN !== i;
          } }), i;
        };
      }, 60201: function(o) {
        o.exports = function(s) {
          var n = typeof s;
          return s !== null && (n === "object" || n === "function");
        };
      }, 29388: function(o) {
        var s = Object.prototype.toString;
        o.exports = function(n) {
          var l;
          return s.call(n) === "[object Object]" && ((l = Object.getPrototypeOf(n)) === null || l === Object.getPrototypeOf({}));
        };
      }, 9914: function(o) {
        o.exports = function(s) {
          for (var n, l = s.length, u = 0; u < l; u++) if (((n = s.charCodeAt(u)) < 9 || n > 13) && n !== 32 && n !== 133 && n !== 160 && n !== 5760 && n !== 6158 && (n < 8192 || n > 8205) && n !== 8232 && n !== 8233 && n !== 8239 && n !== 8287 && n !== 8288 && n !== 12288 && n !== 65279) return !1;
          return !0;
        };
      }, 13986: function(o) {
        o.exports = function(s) {
          return typeof s == "string" && (s = s.trim(), !!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(s) && /[\dz]$/i.test(s) && s.length > 4));
        };
      }, 15628: function(o, s, n) {
        var l = n(61262), u = n(70085), i = n(63063), h = i("Object.prototype.toString"), p = n(36912)(), _ = n(52991), d = typeof globalThis > "u" ? n.g : globalThis, f = u(), c = i("Array.prototype.indexOf", !0) || function(w, k) {
          for (var S = 0; S < w.length; S += 1) if (w[S] === k) return S;
          return -1;
        }, g = i("String.prototype.slice"), m = {}, x = Object.getPrototypeOf;
        p && _ && x && l(f, function(w) {
          var k = new d[w]();
          if (Symbol.toStringTag in k) {
            var S = x(k), A = _(S, Symbol.toStringTag);
            if (!A) {
              var C = x(S);
              A = _(C, Symbol.toStringTag);
            }
            m[w] = A.get;
          }
        }), o.exports = function(w) {
          if (!w || typeof w != "object") return !1;
          if (!p || !(Symbol.toStringTag in w)) {
            var k = g(h(w), 8, -1);
            return c(f, k) > -1;
          }
          return !!_ && function(S) {
            var A = !1;
            return l(m, function(C, D) {
              if (!A) try {
                A = C.call(S) === D;
              } catch {
              }
            }), A;
          }(w);
        };
      }, 62914: function(o) {
        o.exports = Math.log2 || function(s) {
          return Math.log(s) * Math.LOG2E;
        };
      }, 99978: function(o, s, n) {
        o.exports = function(u, i) {
          i || (i = u, u = window);
          var h = 0, p = 0, _ = 0, d = { shift: !1, alt: !1, control: !1, meta: !1 }, f = !1;
          function c(L) {
            var E = !1;
            return "altKey" in L && (E = E || L.altKey !== d.alt, d.alt = !!L.altKey), "shiftKey" in L && (E = E || L.shiftKey !== d.shift, d.shift = !!L.shiftKey), "ctrlKey" in L && (E = E || L.ctrlKey !== d.control, d.control = !!L.ctrlKey), "metaKey" in L && (E = E || L.metaKey !== d.meta, d.meta = !!L.metaKey), E;
          }
          function g(L, E) {
            var P = l.x(E), I = l.y(E);
            "buttons" in E && (L = 0 | E.buttons), (L !== h || P !== p || I !== _ || c(E)) && (h = 0 | L, p = P || 0, _ = I || 0, i && i(h, p, _, d));
          }
          function m(L) {
            g(0, L);
          }
          function x() {
            (h || p || _ || d.shift || d.alt || d.meta || d.control) && (p = _ = 0, h = 0, d.shift = d.alt = d.control = d.meta = !1, i && i(0, 0, 0, d));
          }
          function w(L) {
            c(L) && i && i(h, p, _, d);
          }
          function k(L) {
            l.buttons(L) === 0 ? g(0, L) : g(h, L);
          }
          function S(L) {
            g(h | l.buttons(L), L);
          }
          function A(L) {
            g(h & ~l.buttons(L), L);
          }
          function C() {
            f || (f = !0, u.addEventListener("mousemove", k), u.addEventListener("mousedown", S), u.addEventListener("mouseup", A), u.addEventListener("mouseleave", m), u.addEventListener("mouseenter", m), u.addEventListener("mouseout", m), u.addEventListener("mouseover", m), u.addEventListener("blur", x), u.addEventListener("keyup", w), u.addEventListener("keydown", w), u.addEventListener("keypress", w), u !== window && (window.addEventListener("blur", x), window.addEventListener("keyup", w), window.addEventListener("keydown", w), window.addEventListener("keypress", w)));
          }
          C();
          var D = { element: u };
          return Object.defineProperties(D, { enabled: { get: function() {
            return f;
          }, set: function(L) {
            L ? C() : f && (f = !1, u.removeEventListener("mousemove", k), u.removeEventListener("mousedown", S), u.removeEventListener("mouseup", A), u.removeEventListener("mouseleave", m), u.removeEventListener("mouseenter", m), u.removeEventListener("mouseout", m), u.removeEventListener("mouseover", m), u.removeEventListener("blur", x), u.removeEventListener("keyup", w), u.removeEventListener("keydown", w), u.removeEventListener("keypress", w), u !== window && (window.removeEventListener("blur", x), window.removeEventListener("keyup", w), window.removeEventListener("keydown", w), window.removeEventListener("keypress", w)));
          }, enumerable: !0 }, buttons: { get: function() {
            return h;
          }, enumerable: !0 }, x: { get: function() {
            return p;
          }, enumerable: !0 }, y: { get: function() {
            return _;
          }, enumerable: !0 }, mods: { get: function() {
            return d;
          }, enumerable: !0 } }), D;
        };
        var l = n(41926);
      }, 44039: function(o) {
        var s = { left: 0, top: 0 };
        o.exports = function(n, l, u) {
          l = l || n.currentTarget || n.srcElement, Array.isArray(u) || (u = [0, 0]);
          var i, h = n.clientX || 0, p = n.clientY || 0, _ = (i = l) === window || i === document || i === document.body ? s : i.getBoundingClientRect();
          return u[0] = h - _.left, u[1] = p - _.top, u;
        };
      }, 41926: function(o, s) {
        function n(l) {
          return l.target || l.srcElement || window;
        }
        s.buttons = function(l) {
          if (typeof l == "object") {
            if ("buttons" in l) return l.buttons;
            if ("which" in l) {
              if ((u = l.which) === 2) return 4;
              if (u === 3) return 2;
              if (u > 0) return 1 << u - 1;
            } else if ("button" in l) {
              var u;
              if ((u = l.button) === 1) return 4;
              if (u === 2) return 2;
              if (u >= 0) return 1 << u;
            }
          }
          return 0;
        }, s.element = n, s.x = function(l) {
          if (typeof l == "object") {
            if ("offsetX" in l) return l.offsetX;
            var u = n(l).getBoundingClientRect();
            return l.clientX - u.left;
          }
          return 0;
        }, s.y = function(l) {
          if (typeof l == "object") {
            if ("offsetY" in l) return l.offsetY;
            var u = n(l).getBoundingClientRect();
            return l.clientY - u.top;
          }
          return 0;
        };
      }, 20573: function(o, s, n) {
        var l = n(44626);
        o.exports = function(u, i, h) {
          typeof u == "function" && (h = !!i, i = u, u = window);
          var p = l("ex", u), _ = function(d) {
            h && d.preventDefault();
            var f = d.deltaX || 0, c = d.deltaY || 0, g = d.deltaZ || 0, m = 1;
            switch (d.deltaMode) {
              case 1:
                m = p;
                break;
              case 2:
                m = window.innerHeight;
            }
            if (c *= m, g *= m, (f *= m) || c || g) return i(f, c, g, d);
          };
          return u.addEventListener("wheel", _), _;
        };
      }, 71116: function(o, s, n) {
        var l;
        (function(u, i, h) {
          i[u] = i[u] || function() {
            var p, _, d, f = Object.prototype.toString, c = typeof setImmediate < "u" ? function(P) {
              return setImmediate(P);
            } : setTimeout;
            try {
              Object.defineProperty({}, "x", {}), p = function(P, I, M, O) {
                return Object.defineProperty(P, I, { value: M, writable: !0, configurable: O !== !1 });
              };
            } catch {
              p = function(I, M, O) {
                return I[M] = O, I;
              };
            }
            function g(P, I) {
              d.add(P, I), _ || (_ = c(d.drain));
            }
            function m(P) {
              var I, M = typeof P;
              return P == null || M != "object" && M != "function" || (I = P.then), typeof I == "function" && I;
            }
            function x() {
              for (var P = 0; P < this.chain.length; P++) w(this, this.state === 1 ? this.chain[P].success : this.chain[P].failure, this.chain[P]);
              this.chain.length = 0;
            }
            function w(P, I, M) {
              var O, T;
              try {
                I === !1 ? M.reject(P.msg) : (O = I === !0 ? P.msg : I.call(void 0, P.msg)) === M.promise ? M.reject(TypeError("Promise-chain cycle")) : (T = m(O)) ? T.call(O, M.resolve, M.reject) : M.resolve(O);
              } catch (z) {
                M.reject(z);
              }
            }
            function k(P) {
              var I, M = this;
              if (!M.triggered) {
                M.triggered = !0, M.def && (M = M.def);
                try {
                  (I = m(P)) ? g(function() {
                    var O = new C(M);
                    try {
                      I.call(P, function() {
                        k.apply(O, arguments);
                      }, function() {
                        S.apply(O, arguments);
                      });
                    } catch (T) {
                      S.call(O, T);
                    }
                  }) : (M.msg = P, M.state = 1, M.chain.length > 0 && g(x, M));
                } catch (O) {
                  S.call(new C(M), O);
                }
              }
            }
            function S(P) {
              var I = this;
              I.triggered || (I.triggered = !0, I.def && (I = I.def), I.msg = P, I.state = 2, I.chain.length > 0 && g(x, I));
            }
            function A(P, I, M, O) {
              for (var T = 0; T < I.length; T++) (function(z) {
                P.resolve(I[z]).then(function(F) {
                  M(z, F);
                }, O);
              })(T);
            }
            function C(P) {
              this.def = P, this.triggered = !1;
            }
            function D(P) {
              this.promise = P, this.state = 0, this.triggered = !1, this.chain = [], this.msg = void 0;
            }
            function L(P) {
              if (typeof P != "function") throw TypeError("Not a function");
              if (this.__NPO__ !== 0) throw TypeError("Not a promise");
              this.__NPO__ = 1;
              var I = new D(this);
              this.then = function(M, O) {
                var T = { success: typeof M != "function" || M, failure: typeof O == "function" && O };
                return T.promise = new this.constructor(function(z, F) {
                  if (typeof z != "function" || typeof F != "function") throw TypeError("Not a function");
                  T.resolve = z, T.reject = F;
                }), I.chain.push(T), I.state !== 0 && g(x, I), T.promise;
              }, this.catch = function(M) {
                return this.then(void 0, M);
              };
              try {
                P.call(void 0, function(M) {
                  k.call(I, M);
                }, function(M) {
                  S.call(I, M);
                });
              } catch (M) {
                S.call(I, M);
              }
            }
            d = /* @__PURE__ */ function() {
              var P, I, M;
              function O(T, z) {
                this.fn = T, this.self = z, this.next = void 0;
              }
              return { add: function(T, z) {
                M = new O(T, z), I ? I.next = M : P = M, I = M, M = void 0;
              }, drain: function() {
                var T = P;
                for (P = I = _ = void 0; T; ) T.fn.call(T.self), T = T.next;
              } };
            }();
            var E = p({}, "constructor", L, !1);
            return L.prototype = E, p(E, "__NPO__", 0, !1), p(L, "resolve", function(P) {
              return P && typeof P == "object" && P.__NPO__ === 1 ? P : new this(function(I, M) {
                if (typeof I != "function" || typeof M != "function") throw TypeError("Not a function");
                I(P);
              });
            }), p(L, "reject", function(P) {
              return new this(function(I, M) {
                if (typeof I != "function" || typeof M != "function") throw TypeError("Not a function");
                M(P);
              });
            }), p(L, "all", function(P) {
              var I = this;
              return f.call(P) != "[object Array]" ? I.reject(TypeError("Not an array")) : P.length === 0 ? I.resolve([]) : new I(function(M, O) {
                if (typeof M != "function" || typeof O != "function") throw TypeError("Not a function");
                var T = P.length, z = Array(T), F = 0;
                A(I, P, function(U, V) {
                  z[U] = V, ++F === T && M(z);
                }, O);
              });
            }), p(L, "race", function(P) {
              var I = this;
              return f.call(P) != "[object Array]" ? I.reject(TypeError("Not an array")) : new I(function(M, O) {
                if (typeof M != "function" || typeof O != "function") throw TypeError("Not a function");
                A(I, P, function(T, z) {
                  M(z);
                }, O);
              });
            }), L;
          }(), o.exports ? o.exports = i[u] : (l = (function() {
            return i[u];
          }).call(s, n, s, o)) === void 0 || (o.exports = l);
        })("Promise", n.g !== void 0 ? n.g : this);
      }, 60265: function(o) {
        var s = Math.PI, n = p(120);
        function l(_, d, f, c) {
          return ["C", _, d, f, c, f, c];
        }
        function u(_, d, f, c, g, m) {
          return ["C", _ / 3 + 0.6666666666666666 * f, d / 3 + 0.6666666666666666 * c, g / 3 + 0.6666666666666666 * f, m / 3 + 0.6666666666666666 * c, g, m];
        }
        function i(_, d, f, c, g, m, x, w, k, S) {
          if (S) T = S[0], z = S[1], M = S[2], O = S[3];
          else {
            var A = h(_, d, -g);
            _ = A.x, d = A.y;
            var C = (_ - (w = (A = h(w, k, -g)).x)) / 2, D = (d - (k = A.y)) / 2, L = C * C / (f * f) + D * D / (c * c);
            L > 1 && (f *= L = Math.sqrt(L), c *= L);
            var E = f * f, P = c * c, I = (m == x ? -1 : 1) * Math.sqrt(Math.abs((E * P - E * D * D - P * C * C) / (E * D * D + P * C * C)));
            I == 1 / 0 && (I = 1);
            var M = I * f * D / c + (_ + w) / 2, O = I * -c * C / f + (d + k) / 2, T = Math.asin(((d - O) / c).toFixed(9)), z = Math.asin(((k - O) / c).toFixed(9));
            (T = _ < M ? s - T : T) < 0 && (T = 2 * s + T), (z = w < M ? s - z : z) < 0 && (z = 2 * s + z), x && T > z && (T -= 2 * s), !x && z > T && (z -= 2 * s);
          }
          if (Math.abs(z - T) > n) {
            var F = z, U = w, V = k;
            z = T + n * (x && z > T ? 1 : -1);
            var $ = i(w = M + f * Math.cos(z), k = O + c * Math.sin(z), f, c, g, 0, x, U, V, [z, F, M, O]);
          }
          var q = Math.tan((z - T) / 4), K = 4 / 3 * f * q, re = 4 / 3 * c * q, Y = [2 * _ - (_ + K * Math.sin(T)), 2 * d - (d - re * Math.cos(T)), w + K * Math.sin(z), k - re * Math.cos(z), w, k];
          if (S) return Y;
          $ && (Y = Y.concat($));
          for (var te = 0; te < Y.length; ) {
            var ee = h(Y[te], Y[te + 1], g);
            Y[te++] = ee.x, Y[te++] = ee.y;
          }
          return Y;
        }
        function h(_, d, f) {
          return { x: _ * Math.cos(f) - d * Math.sin(f), y: _ * Math.sin(f) + d * Math.cos(f) };
        }
        function p(_) {
          return _ * (s / 180);
        }
        o.exports = function(_) {
          for (var d, f = [], c = 0, g = 0, m = 0, x = 0, w = null, k = null, S = 0, A = 0, C = 0, D = _.length; C < D; C++) {
            var L = _[C], E = L[0];
            switch (E) {
              case "M":
                m = L[1], x = L[2];
                break;
              case "A":
                (L = i(S, A, L[1], L[2], p(L[3]), L[4], L[5], L[6], L[7])).unshift("C"), L.length > 7 && (f.push(L.splice(0, 7)), L.unshift("C"));
                break;
              case "S":
                var P = S, I = A;
                d != "C" && d != "S" || (P += P - c, I += I - g), L = ["C", P, I, L[1], L[2], L[3], L[4]];
                break;
              case "T":
                d == "Q" || d == "T" ? (w = 2 * S - w, k = 2 * A - k) : (w = S, k = A), L = u(S, A, w, k, L[1], L[2]);
                break;
              case "Q":
                w = L[1], k = L[2], L = u(S, A, L[1], L[2], L[3], L[4]);
                break;
              case "L":
                L = l(S, A, L[1], L[2]);
                break;
              case "H":
                L = l(S, A, L[1], A);
                break;
              case "V":
                L = l(S, A, S, L[1]);
                break;
              case "Z":
                L = l(S, A, m, x);
            }
            d = E, S = L[L.length - 2], A = L[L.length - 1], L.length > 4 ? (c = L[L.length - 4], g = L[L.length - 3]) : (c = S, g = A), f.push(L);
          }
          return f;
        };
      }, 27976: function(o) {
        var s = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
        o.exports = function() {
          try {
            if (!Object.assign) return !1;
            var u = new String("abc");
            if (u[5] = "de", Object.getOwnPropertyNames(u)[0] === "5") return !1;
            for (var i = {}, h = 0; h < 10; h++) i["_" + String.fromCharCode(h)] = h;
            if (Object.getOwnPropertyNames(i).map(function(_) {
              return i[_];
            }).join("") !== "0123456789") return !1;
            var p = {};
            return "abcdefghijklmnopqrst".split("").forEach(function(_) {
              p[_] = _;
            }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
          } catch {
            return !1;
          }
        }() ? Object.assign : function(u, i) {
          for (var h, p, _ = function(g) {
            if (g == null) throw new TypeError("Object.assign cannot be called with null or undefined");
            return Object(g);
          }(u), d = 1; d < arguments.length; d++) {
            for (var f in h = Object(arguments[d])) n.call(h, f) && (_[f] = h[f]);
            if (s) {
              p = s(h);
              for (var c = 0; c < p.length; c++) l.call(h, p[c]) && (_[p[c]] = h[p[c]]);
            }
          }
          return _;
        };
      }, 93063: function(o) {
        var s = function(n) {
          return n != n;
        };
        o.exports = function(n, l) {
          return n === 0 && l === 0 ? 1 / n == 1 / l : n === l || !(!s(n) || !s(l));
        };
      }, 13969: function(o, s, n) {
        var l = n(97936), u = n(87227), i = n(93063), h = n(9622), p = n(79796), _ = u(h(), Object);
        l(_, { getPolyfill: h, implementation: i, shim: p }), o.exports = _;
      }, 9622: function(o, s, n) {
        var l = n(93063);
        o.exports = function() {
          return typeof Object.is == "function" ? Object.is : l;
        };
      }, 79796: function(o, s, n) {
        var l = n(9622), u = n(97936);
        o.exports = function() {
          var i = l();
          return u(Object, { is: i }, { is: function() {
            return Object.is !== i;
          } }), i;
        };
      }, 61663: function(o, s, n) {
        var l;
        if (!Object.keys) {
          var u = Object.prototype.hasOwnProperty, i = Object.prototype.toString, h = n(52385), p = Object.prototype.propertyIsEnumerable, _ = !p.call({ toString: null }, "toString"), d = p.call(function() {
          }, "prototype"), f = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"], c = function(x) {
            var w = x.constructor;
            return w && w.prototype === x;
          }, g = { $applicationCache: !0, $console: !0, $external: !0, $frame: !0, $frameElement: !0, $frames: !0, $innerHeight: !0, $innerWidth: !0, $onmozfullscreenchange: !0, $onmozfullscreenerror: !0, $outerHeight: !0, $outerWidth: !0, $pageXOffset: !0, $pageYOffset: !0, $parent: !0, $scrollLeft: !0, $scrollTop: !0, $scrollX: !0, $scrollY: !0, $self: !0, $webkitIndexedDB: !0, $webkitStorageInfo: !0, $window: !0 }, m = function() {
            if (typeof window > "u") return !1;
            for (var x in window) try {
              if (!g["$" + x] && u.call(window, x) && window[x] !== null && typeof window[x] == "object") try {
                c(window[x]);
              } catch {
                return !0;
              }
            } catch {
              return !0;
            }
            return !1;
          }();
          l = function(x) {
            var w = x !== null && typeof x == "object", k = i.call(x) === "[object Function]", S = h(x), A = w && i.call(x) === "[object String]", C = [];
            if (!w && !k && !S) throw new TypeError("Object.keys called on a non-object");
            var D = d && k;
            if (A && x.length > 0 && !u.call(x, 0)) for (var L = 0; L < x.length; ++L) C.push(String(L));
            if (S && x.length > 0) for (var E = 0; E < x.length; ++E) C.push(String(E));
            else for (var P in x) D && P === "prototype" || !u.call(x, P) || C.push(String(P));
            if (_) for (var I = function(O) {
              if (typeof window > "u" || !m) return c(O);
              try {
                return c(O);
              } catch {
                return !1;
              }
            }(x), M = 0; M < f.length; ++M) I && f[M] === "constructor" || !u.call(x, f[M]) || C.push(f[M]);
            return C;
          };
        }
        o.exports = l;
      }, 99433: function(o, s, n) {
        var l = Array.prototype.slice, u = n(52385), i = Object.keys, h = i ? function(_) {
          return i(_);
        } : n(61663), p = Object.keys;
        h.shim = function() {
          if (Object.keys) {
            var _ = function() {
              var d = Object.keys(arguments);
              return d && d.length === arguments.length;
            }(1, 2);
            _ || (Object.keys = function(d) {
              return u(d) ? p(l.call(d)) : p(d);
            });
          } else Object.keys = h;
          return Object.keys || h;
        }, o.exports = h;
      }, 52385: function(o) {
        var s = Object.prototype.toString;
        o.exports = function(n) {
          var l = s.call(n), u = l === "[object Arguments]";
          return u || (u = l !== "[object Array]" && n !== null && typeof n == "object" && typeof n.length == "number" && n.length >= 0 && s.call(n.callee) === "[object Function]"), u;
        };
      }, 96927: function(o, s, n) {
        var l = n(99433), u = n(59457)(), i = n(63063), h = Object, p = i("Array.prototype.push"), _ = i("Object.prototype.propertyIsEnumerable"), d = u ? Object.getOwnPropertySymbols : null;
        o.exports = function(f, c) {
          if (f == null) throw new TypeError("target must be an object");
          var g = h(f);
          if (arguments.length === 1) return g;
          for (var m = 1; m < arguments.length; ++m) {
            var x = h(arguments[m]), w = l(x), k = u && (Object.getOwnPropertySymbols || d);
            if (k) for (var S = k(x), A = 0; A < S.length; ++A) {
              var C = S[A];
              _(x, C) && p(w, C);
            }
            for (var D = 0; D < w.length; ++D) {
              var L = w[D];
              if (_(x, L)) {
                var E = x[L];
                g[L] = E;
              }
            }
          }
          return g;
        };
      }, 68686: function(o, s, n) {
        var l = n(96927);
        o.exports = function() {
          return Object.assign ? function() {
            if (!Object.assign) return !1;
            for (var u = "abcdefghijklmnopqrst", i = u.split(""), h = {}, p = 0; p < i.length; ++p) h[i[p]] = i[p];
            var _ = Object.assign({}, h), d = "";
            for (var f in _) d += f;
            return u !== d;
          }() || function() {
            if (!Object.assign || !Object.preventExtensions) return !1;
            var u = Object.preventExtensions({ 1: 2 });
            try {
              Object.assign(u, "xy");
            } catch {
              return u[1] === "y";
            }
            return !1;
          }() ? l : Object.assign : l;
        };
      }, 59811: function(o) {
        function s(u, i) {
          if (typeof u != "string") return [u];
          var h = [u];
          typeof i == "string" || Array.isArray(i) ? i = { brackets: i } : i || (i = {});
          var p = i.brackets ? Array.isArray(i.brackets) ? i.brackets : [i.brackets] : ["{}", "[]", "()"], _ = i.escape || "___", d = !!i.flat;
          p.forEach(function(c) {
            var g = new RegExp(["\\", c[0], "[^\\", c[0], "\\", c[1], "]*\\", c[1]].join("")), m = [];
            function x(w, k, S) {
              var A = h.push(w.slice(c[0].length, -c[1].length)) - 1;
              return m.push(A), _ + A + _;
            }
            h.forEach(function(w, k) {
              for (var S, A = 0; w != S; ) if (S = w, w = w.replace(g, x), A++ > 1e4) throw Error("References have circular dependency. Please, check them.");
              h[k] = w;
            }), m = m.reverse(), h = h.map(function(w) {
              return m.forEach(function(k) {
                w = w.replace(new RegExp("(\\" + _ + k + "\\" + _ + ")", "g"), c[0] + "$1" + c[1]);
              }), w;
            });
          });
          var f = new RegExp("\\" + _ + "([0-9]+)\\" + _);
          return d ? h : function c(g, m, x) {
            for (var w, k = [], S = 0; w = f.exec(g); ) {
              if (S++ > 1e4) throw Error("Circular references in parenthesis");
              k.push(g.slice(0, w.index)), k.push(c(m[w[1]], m)), g = g.slice(w.index + w[0].length);
            }
            return k.push(g), k;
          }(h[0], h);
        }
        function n(u, i) {
          if (i && i.flat) {
            var h, p = i && i.escape || "___", _ = u[0];
            if (!_) return "";
            for (var d = new RegExp("\\" + p + "([0-9]+)\\" + p), f = 0; _ != h; ) {
              if (f++ > 1e4) throw Error("Circular references in " + u);
              h = _, _ = _.replace(d, c);
            }
            return _;
          }
          return u.reduce(function g(m, x) {
            return Array.isArray(x) && (x = x.reduce(g, "")), m + x;
          }, "");
          function c(g, m) {
            if (u[m] == null) throw Error("Reference " + m + "is undefined");
            return u[m];
          }
        }
        function l(u, i) {
          return Array.isArray(u) ? n(u, i) : s(u, i);
        }
        l.parse = s, l.stringify = n, o.exports = l;
      }, 5137: function(o, s, n) {
        var l = n(6807);
        o.exports = function(u) {
          var i;
          return arguments.length > 1 && (u = arguments), typeof u == "string" ? u = u.split(/\s/).map(parseFloat) : typeof u == "number" && (u = [u]), u.length && typeof u[0] == "number" ? i = u.length === 1 ? { width: u[0], height: u[0], x: 0, y: 0 } : u.length === 2 ? { width: u[0], height: u[1], x: 0, y: 0 } : { x: u[0], y: u[1], width: u[2] - u[0] || 0, height: u[3] - u[1] || 0 } : u && (i = { x: (u = l(u, { left: "x l left Left", top: "y t top Top", width: "w width W Width", height: "h height W Width", bottom: "b bottom Bottom", right: "r right Right" })).left || 0, y: u.top || 0 }, u.width == null ? u.right ? i.width = u.right - i.x : i.width = 0 : i.width = u.width, u.height == null ? u.bottom ? i.height = u.bottom - i.y : i.height = 0 : i.height = u.height), i;
        };
      }, 26953: function(o) {
        o.exports = function(u) {
          var i = [];
          return u.replace(n, function(h, p, _) {
            var d = p.toLowerCase();
            for (_ = function(f) {
              var c = f.match(l);
              return c ? c.map(Number) : [];
            }(_), d == "m" && _.length > 2 && (i.push([p].concat(_.splice(0, 2))), d = "l", p = p == "m" ? "l" : "L"); ; ) {
              if (_.length == s[d]) return _.unshift(p), i.push(_);
              if (_.length < s[d]) throw new Error("malformed path data");
              i.push([p].concat(_.splice(0, s[d])));
            }
          }), i;
        };
        var s = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, n = /([astvzqmhlc])([^astvzqmhlc]*)/gi, l = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;
      }, 4957: function(o) {
        o.exports = function(s, n) {
          n || (n = [0, ""]), s = String(s);
          var l = parseFloat(s, 10);
          return n[0] = l, n[1] = s.match(/[\d.\-\+]*\s*(.*)/)[1] || "", n;
        };
      }, 71879: function(o, s, n) {
        var l = n(33282);
        (function() {
          var u, i, h, p, _, d;
          typeof performance < "u" && performance !== null && performance.now ? o.exports = function() {
            return performance.now();
          } : l != null && l.hrtime ? (o.exports = function() {
            return (u() - _) / 1e6;
          }, i = l.hrtime, p = (u = function() {
            var f;
            return 1e9 * (f = i())[0] + f[1];
          })(), d = 1e9 * l.uptime(), _ = p - d) : Date.now ? (o.exports = function() {
            return Date.now() - h;
          }, h = Date.now()) : (o.exports = function() {
            return (/* @__PURE__ */ new Date()).getTime() - h;
          }, h = (/* @__PURE__ */ new Date()).getTime());
        }).call(this);
      }, 6807: function(o) {
        o.exports = function(l, u, i) {
          var h, p, _ = {};
          if (typeof u == "string" && (u = n(u)), Array.isArray(u)) {
            var d = {};
            for (p = 0; p < u.length; p++) d[u[p]] = !0;
            u = d;
          }
          for (h in u) u[h] = n(u[h]);
          var f = {};
          for (h in u) {
            var c = u[h];
            if (Array.isArray(c)) for (p = 0; p < c.length; p++) {
              var g = c[p];
              if (i && (f[g] = !0), g in l) {
                if (_[h] = l[g], i) for (var m = p; m < c.length; m++) f[c[m]] = !0;
                break;
              }
            }
            else h in l && (u[h] && (_[h] = l[h]), i && (f[h] = !0));
          }
          if (i) for (h in l) f[h] || (_[h] = l[h]);
          return _;
        };
        var s = {};
        function n(l) {
          return s[l] ? s[l] : (typeof l == "string" && (l = s[l] = l.split(/\s*,\s*|\s+/)), l);
        }
      }, 52773: function(o) {
        o.exports = function(s, n, l, u) {
          var i = s[0], h = s[1], p = !1;
          l === void 0 && (l = 0), u === void 0 && (u = n.length);
          for (var _ = u - l, d = 0, f = _ - 1; d < _; f = d++) {
            var c = n[d + l][0], g = n[d + l][1], m = n[f + l][0], x = n[f + l][1];
            g > h != x > h && i < (m - c) * (h - g) / (x - g) + c && (p = !p);
          }
          return p;
        };
      }, 11516: function(o, s, n) {
        var l, u = n(42391), i = n(92990), h = n(26202), p = n(22222), _ = n(17527), d = n(24491), f = !1, c = i();
        function g(m, x, w) {
          var k = l.segments(m), S = l.segments(x), A = w(l.combine(k, S));
          return l.polygon(A);
        }
        l = { buildLog: function(m) {
          return m === !0 ? f = u() : m === !1 && (f = !1), f !== !1 && f.list;
        }, epsilon: function(m) {
          return c.epsilon(m);
        }, segments: function(m) {
          var x = h(!0, c, f);
          return m.regions.forEach(x.addRegion), { segments: x.calculate(m.inverted), inverted: m.inverted };
        }, combine: function(m, x) {
          return { combined: h(!1, c, f).calculate(m.segments, m.inverted, x.segments, x.inverted), inverted1: m.inverted, inverted2: x.inverted };
        }, selectUnion: function(m) {
          return { segments: _.union(m.combined, f), inverted: m.inverted1 || m.inverted2 };
        }, selectIntersect: function(m) {
          return { segments: _.intersect(m.combined, f), inverted: m.inverted1 && m.inverted2 };
        }, selectDifference: function(m) {
          return { segments: _.difference(m.combined, f), inverted: m.inverted1 && !m.inverted2 };
        }, selectDifferenceRev: function(m) {
          return { segments: _.differenceRev(m.combined, f), inverted: !m.inverted1 && m.inverted2 };
        }, selectXor: function(m) {
          return { segments: _.xor(m.combined, f), inverted: m.inverted1 !== m.inverted2 };
        }, polygon: function(m) {
          return { regions: p(m.segments, c, f), inverted: m.inverted };
        }, polygonFromGeoJSON: function(m) {
          return d.toPolygon(l, m);
        }, polygonToGeoJSON: function(m) {
          return d.fromPolygon(l, c, m);
        }, union: function(m, x) {
          return g(m, x, l.selectUnion);
        }, intersect: function(m, x) {
          return g(m, x, l.selectIntersect);
        }, difference: function(m, x) {
          return g(m, x, l.selectDifference);
        }, differenceRev: function(m, x) {
          return g(m, x, l.selectDifferenceRev);
        }, xor: function(m, x) {
          return g(m, x, l.selectXor);
        } }, typeof window == "object" && (window.PolyBool = l), o.exports = l;
      }, 42391: function(o) {
        o.exports = function() {
          var s, n = 0, l = !1;
          function u(i, h) {
            return s.list.push({ type: i, data: h ? JSON.parse(JSON.stringify(h)) : void 0 }), s;
          }
          return s = { list: [], segmentId: function() {
            return n++;
          }, checkIntersection: function(i, h) {
            return u("check", { seg1: i, seg2: h });
          }, segmentChop: function(i, h) {
            return u("div_seg", { seg: i, pt: h }), u("chop", { seg: i, pt: h });
          }, statusRemove: function(i) {
            return u("pop_seg", { seg: i });
          }, segmentUpdate: function(i) {
            return u("seg_update", { seg: i });
          }, segmentNew: function(i, h) {
            return u("new_seg", { seg: i, primary: h });
          }, segmentRemove: function(i) {
            return u("rem_seg", { seg: i });
          }, tempStatus: function(i, h, p) {
            return u("temp_status", { seg: i, above: h, below: p });
          }, rewind: function(i) {
            return u("rewind", { seg: i });
          }, status: function(i, h, p) {
            return u("status", { seg: i, above: h, below: p });
          }, vert: function(i) {
            return i === l ? s : (l = i, u("vert", { x: i }));
          }, log: function(i) {
            return typeof i != "string" && (i = JSON.stringify(i, !1, "  ")), u("log", { txt: i });
          }, reset: function() {
            return u("reset");
          }, selected: function(i) {
            return u("selected", { segs: i });
          }, chainStart: function(i) {
            return u("chain_start", { seg: i });
          }, chainRemoveHead: function(i, h) {
            return u("chain_rem_head", { index: i, pt: h });
          }, chainRemoveTail: function(i, h) {
            return u("chain_rem_tail", { index: i, pt: h });
          }, chainNew: function(i, h) {
            return u("chain_new", { pt1: i, pt2: h });
          }, chainMatch: function(i) {
            return u("chain_match", { index: i });
          }, chainClose: function(i) {
            return u("chain_close", { index: i });
          }, chainAddHead: function(i, h) {
            return u("chain_add_head", { index: i, pt: h });
          }, chainAddTail: function(i, h) {
            return u("chain_add_tail", { index: i, pt: h });
          }, chainConnect: function(i, h) {
            return u("chain_con", { index1: i, index2: h });
          }, chainReverse: function(i) {
            return u("chain_rev", { index: i });
          }, chainJoin: function(i, h) {
            return u("chain_join", { index1: i, index2: h });
          }, done: function() {
            return u("done");
          } };
        };
      }, 92990: function(o) {
        o.exports = function(s) {
          typeof s != "number" && (s = 1e-10);
          var n = { epsilon: function(l) {
            return typeof l == "number" && (s = l), s;
          }, pointAboveOrOnLine: function(l, u, i) {
            var h = u[0], p = u[1], _ = i[0], d = i[1], f = l[0];
            return (_ - h) * (l[1] - p) - (d - p) * (f - h) >= -s;
          }, pointBetween: function(l, u, i) {
            var h = l[1] - u[1], p = i[0] - u[0], _ = l[0] - u[0], d = i[1] - u[1], f = _ * p + h * d;
            return !(f < s || f - (p * p + d * d) > -s);
          }, pointsSameX: function(l, u) {
            return Math.abs(l[0] - u[0]) < s;
          }, pointsSameY: function(l, u) {
            return Math.abs(l[1] - u[1]) < s;
          }, pointsSame: function(l, u) {
            return n.pointsSameX(l, u) && n.pointsSameY(l, u);
          }, pointsCompare: function(l, u) {
            return n.pointsSameX(l, u) ? n.pointsSameY(l, u) ? 0 : l[1] < u[1] ? -1 : 1 : l[0] < u[0] ? -1 : 1;
          }, pointsCollinear: function(l, u, i) {
            var h = l[0] - u[0], p = l[1] - u[1], _ = u[0] - i[0], d = u[1] - i[1];
            return Math.abs(h * d - _ * p) < s;
          }, linesIntersect: function(l, u, i, h) {
            var p = u[0] - l[0], _ = u[1] - l[1], d = h[0] - i[0], f = h[1] - i[1], c = p * f - _ * d;
            if (Math.abs(c) < s) return !1;
            var g = l[0] - i[0], m = l[1] - i[1], x = (d * m - f * g) / c, w = (p * m - _ * g) / c, k = { alongA: 0, alongB: 0, pt: [l[0] + x * p, l[1] + x * _] };
            return k.alongA = x <= -s ? -2 : x < s ? -1 : x - 1 <= -s ? 0 : x - 1 < s ? 1 : 2, k.alongB = w <= -s ? -2 : w < s ? -1 : w - 1 <= -s ? 0 : w - 1 < s ? 1 : 2, k;
          }, pointInsideRegion: function(l, u) {
            for (var i = l[0], h = l[1], p = u[u.length - 1][0], _ = u[u.length - 1][1], d = !1, f = 0; f < u.length; f++) {
              var c = u[f][0], g = u[f][1];
              g - h > s != _ - h > s && (p - c) * (h - g) / (_ - g) + c - i > s && (d = !d), p = c, _ = g;
            }
            return d;
          } };
          return n;
        };
      }, 24491: function(o) {
        var s = { toPolygon: function(n, l) {
          function u(p) {
            if (p.length <= 0) return n.segments({ inverted: !1, regions: [] });
            function _(c) {
              var g = c.slice(0, c.length - 1);
              return n.segments({ inverted: !1, regions: [g] });
            }
            for (var d = _(p[0]), f = 1; f < p.length; f++) d = n.selectDifference(n.combine(d, _(p[f])));
            return d;
          }
          if (l.type === "Polygon") return n.polygon(u(l.coordinates));
          if (l.type === "MultiPolygon") {
            for (var i = n.segments({ inverted: !1, regions: [] }), h = 0; h < l.coordinates.length; h++) i = n.selectUnion(n.combine(i, u(l.coordinates[h])));
            return n.polygon(i);
          }
          throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon");
        }, fromPolygon: function(n, l, u) {
          function i(w, k) {
            return l.pointInsideRegion([0.5 * (w[0][0] + w[1][0]), 0.5 * (w[0][1] + w[1][1])], k);
          }
          function h(w) {
            return { region: w, children: [] };
          }
          u = n.polygon(n.segments(u));
          var p = h(null);
          function _(w, k) {
            for (var S = 0; S < w.children.length; S++) if (i(k, (C = w.children[S]).region)) return void _(C, k);
            var A = h(k);
            for (S = 0; S < w.children.length; S++) {
              var C;
              i((C = w.children[S]).region, k) && (A.children.push(C), w.children.splice(S, 1), S--);
            }
            w.children.push(A);
          }
          for (var d = 0; d < u.regions.length; d++) {
            var f = u.regions[d];
            f.length < 3 || _(p, f);
          }
          function c(w, k) {
            for (var S = 0, A = w[w.length - 1][0], C = w[w.length - 1][1], D = [], L = 0; L < w.length; L++) {
              var E = w[L][0], P = w[L][1];
              D.push([E, P]), S += P * A - E * C, A = E, C = P;
            }
            return S < 0 !== k && D.reverse(), D.push([D[0][0], D[0][1]]), D;
          }
          var g = [];
          function m(w) {
            var k = [c(w.region, !1)];
            g.push(k);
            for (var S = 0; S < w.children.length; S++) k.push(x(w.children[S]));
          }
          function x(w) {
            for (var k = 0; k < w.children.length; k++) m(w.children[k]);
            return c(w.region, !0);
          }
          for (d = 0; d < p.children.length; d++) m(p.children[d]);
          return g.length <= 0 ? { type: "Polygon", coordinates: [] } : g.length == 1 ? { type: "Polygon", coordinates: g[0] } : { type: "MultiPolygon", coordinates: g };
        } };
        o.exports = s;
      }, 26202: function(o, s, n) {
        var l = n(48916);
        o.exports = function(u, i, h) {
          function p(m, x, w) {
            return { id: h ? h.segmentId() : -1, start: m, end: x, myFill: { above: w.myFill.above, below: w.myFill.below }, otherFill: null };
          }
          var _ = l.create();
          function d(m, x) {
            _.insertBefore(m, function(w) {
              return k = m.isStart, S = m.pt, A = x, C = w.isStart, D = w.pt, L = w.other.pt, ((E = i.pointsCompare(S, D)) !== 0 ? E : i.pointsSame(A, L) ? 0 : k !== C ? k ? 1 : -1 : i.pointAboveOrOnLine(A, C ? D : L, C ? L : D) ? 1 : -1) < 0;
              var k, S, A, C, D, L, E;
            });
          }
          function f(m, x) {
            var w = function(k, S) {
              var A = l.node({ isStart: !0, pt: k.start, seg: k, primary: S, other: null, status: null });
              return d(A, k.end), A;
            }(m, x);
            return function(k, S, A) {
              var C = l.node({ isStart: !1, pt: S.end, seg: S, primary: A, other: k, status: null });
              k.other = C, d(C, k.pt);
            }(w, m, x), w;
          }
          function c(m, x) {
            var w = p(x, m.seg.end, m.seg);
            return function(k, S) {
              h && h.segmentChop(k.seg, S), k.other.remove(), k.seg.end = S, k.other.pt = S, d(k.other, k.pt);
            }(m, x), f(w, m.primary);
          }
          function g(m, x) {
            var w = l.create();
            function k(z) {
              return w.findTransition(function(F) {
                var U, V, $, q, K, re;
                return U = z, V = F.ev, $ = U.seg.start, q = U.seg.end, K = V.seg.start, re = V.seg.end, (i.pointsCollinear($, K, re) ? i.pointsCollinear(q, K, re) || i.pointAboveOrOnLine(q, K, re) ? 1 : -1 : i.pointAboveOrOnLine($, K, re) ? 1 : -1) > 0;
              });
            }
            function S(z, F) {
              var U = z.seg, V = F.seg, $ = U.start, q = U.end, K = V.start, re = V.end;
              h && h.checkIntersection(U, V);
              var Y = i.linesIntersect($, q, K, re);
              if (Y === !1) {
                if (!i.pointsCollinear($, q, K) || i.pointsSame($, re) || i.pointsSame(q, K)) return !1;
                var te = i.pointsSame($, K), ee = i.pointsSame(q, re);
                if (te && ee) return F;
                var X = !te && i.pointBetween($, K, re), Q = !ee && i.pointBetween(q, K, re);
                if (te) return Q ? c(F, q) : c(z, re), F;
                X && (ee || (Q ? c(F, q) : c(z, re)), c(F, $));
              } else Y.alongA === 0 && (Y.alongB === -1 ? c(z, K) : Y.alongB === 0 ? c(z, Y.pt) : Y.alongB === 1 && c(z, re)), Y.alongB === 0 && (Y.alongA === -1 ? c(F, $) : Y.alongA === 0 ? c(F, Y.pt) : Y.alongA === 1 && c(F, q));
              return !1;
            }
            for (var A = []; !_.isEmpty(); ) {
              var C = _.getHead();
              if (h && h.vert(C.pt[0]), C.isStart) {
                let z = function() {
                  if (L) {
                    var F = S(C, L);
                    if (F) return F;
                  }
                  return !!E && S(C, E);
                };
                h && h.segmentNew(C.seg, C.primary);
                var D = k(C), L = D.before ? D.before.ev : null, E = D.after ? D.after.ev : null;
                h && h.tempStatus(C.seg, !!L && L.seg, !!E && E.seg);
                var P, I, M = z();
                if (M && (u ? (I = C.seg.myFill.below === null || C.seg.myFill.above !== C.seg.myFill.below) && (M.seg.myFill.above = !M.seg.myFill.above) : M.seg.otherFill = C.seg.myFill, h && h.segmentUpdate(M.seg), C.other.remove(), C.remove()), _.getHead() !== C) {
                  h && h.rewind(C.seg);
                  continue;
                }
                u ? (I = C.seg.myFill.below === null || C.seg.myFill.above !== C.seg.myFill.below, C.seg.myFill.below = E ? E.seg.myFill.above : m, C.seg.myFill.above = I ? !C.seg.myFill.below : C.seg.myFill.below) : C.seg.otherFill === null && (P = E ? C.primary === E.primary ? E.seg.otherFill.above : E.seg.myFill.above : C.primary ? x : m, C.seg.otherFill = { above: P, below: P }), h && h.status(C.seg, !!L && L.seg, !!E && E.seg), C.other.status = D.insert(l.node({ ev: C }));
              } else {
                var O = C.status;
                if (O === null) throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");
                if (w.exists(O.prev) && w.exists(O.next) && S(O.prev.ev, O.next.ev), h && h.statusRemove(O.ev.seg), O.remove(), !C.primary) {
                  var T = C.seg.myFill;
                  C.seg.myFill = C.seg.otherFill, C.seg.otherFill = T;
                }
                A.push(C.seg);
              }
              _.getHead().remove();
            }
            return h && h.done(), A;
          }
          return u ? { addRegion: function(m) {
            for (var x, w, k, S = m[m.length - 1], A = 0; A < m.length; A++) {
              x = S, S = m[A];
              var C = i.pointsCompare(x, S);
              C !== 0 && f((w = C < 0 ? x : S, k = C < 0 ? S : x, { id: h ? h.segmentId() : -1, start: w, end: k, myFill: { above: null, below: null }, otherFill: null }), !0);
            }
          }, calculate: function(m) {
            return g(m, !1);
          } } : { calculate: function(m, x, w, k) {
            return m.forEach(function(S) {
              f(p(S.start, S.end, S), !0);
            }), w.forEach(function(S) {
              f(p(S.start, S.end, S), !1);
            }), g(x, k);
          } };
        };
      }, 48916: function(o) {
        o.exports = { create: function() {
          var s = { root: { root: !0, next: null }, exists: function(n) {
            return n !== null && n !== s.root;
          }, isEmpty: function() {
            return s.root.next === null;
          }, getHead: function() {
            return s.root.next;
          }, insertBefore: function(n, l) {
            for (var u = s.root, i = s.root.next; i !== null; ) {
              if (l(i)) return n.prev = i.prev, n.next = i, i.prev.next = n, void (i.prev = n);
              u = i, i = i.next;
            }
            u.next = n, n.prev = u, n.next = null;
          }, findTransition: function(n) {
            for (var l = s.root, u = s.root.next; u !== null && !n(u); ) l = u, u = u.next;
            return { before: l === s.root ? null : l, after: u, insert: function(i) {
              return i.prev = l, i.next = u, l.next = i, u !== null && (u.prev = i), i;
            } };
          } };
          return s;
        }, node: function(s) {
          return s.prev = null, s.next = null, s.remove = function() {
            s.prev.next = s.next, s.next && (s.next.prev = s.prev), s.prev = null, s.next = null;
          }, s;
        } };
      }, 22222: function(o) {
        o.exports = function(s, n, l) {
          var u = [], i = [];
          return s.forEach(function(h) {
            var p = h.start, _ = h.end;
            if (n.pointsSame(p, _)) console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");
            else {
              l && l.chainStart(h);
              for (var d = { index: 0, matches_head: !1, matches_pt1: !1 }, f = { index: 0, matches_head: !1, matches_pt1: !1 }, c = d, g = 0; g < u.length; g++) {
                var m = (A = u[g])[0], x = (A[1], A[A.length - 1]);
                if (A[A.length - 2], n.pointsSame(m, p)) {
                  if (O(g, !0, !0)) break;
                } else if (n.pointsSame(m, _)) {
                  if (O(g, !0, !1)) break;
                } else if (n.pointsSame(x, p)) {
                  if (O(g, !1, !0)) break;
                } else if (n.pointsSame(x, _) && O(g, !1, !1)) break;
              }
              if (c === d) return u.push([p, _]), void (l && l.chainNew(p, _));
              if (c === f) {
                l && l.chainMatch(d.index);
                var w = d.index, k = d.matches_pt1 ? _ : p, S = d.matches_head, A = u[w], C = S ? A[0] : A[A.length - 1], D = S ? A[1] : A[A.length - 2], L = S ? A[A.length - 1] : A[0], E = S ? A[A.length - 2] : A[1];
                return n.pointsCollinear(D, C, k) && (S ? (l && l.chainRemoveHead(d.index, k), A.shift()) : (l && l.chainRemoveTail(d.index, k), A.pop()), C = D), n.pointsSame(L, k) ? (u.splice(w, 1), n.pointsCollinear(E, L, C) && (S ? (l && l.chainRemoveTail(d.index, C), A.pop()) : (l && l.chainRemoveHead(d.index, C), A.shift())), l && l.chainClose(d.index), void i.push(A)) : void (S ? (l && l.chainAddHead(d.index, k), A.unshift(k)) : (l && l.chainAddTail(d.index, k), A.push(k)));
              }
              var P = d.index, I = f.index;
              l && l.chainConnect(P, I);
              var M = u[P].length < u[I].length;
              d.matches_head ? f.matches_head ? M ? (T(P), z(P, I)) : (T(I), z(I, P)) : z(I, P) : f.matches_head ? z(P, I) : M ? (T(P), z(I, P)) : (T(I), z(P, I));
            }
            function O(F, U, V) {
              return c.index = F, c.matches_head = U, c.matches_pt1 = V, c === d ? (c = f, !1) : (c = null, !0);
            }
            function T(F) {
              l && l.chainReverse(F), u[F].reverse();
            }
            function z(F, U) {
              var V = u[F], $ = u[U], q = V[V.length - 1], K = V[V.length - 2], re = $[0], Y = $[1];
              n.pointsCollinear(K, q, re) && (l && l.chainRemoveTail(F, q), V.pop(), q = K), n.pointsCollinear(q, re, Y) && (l && l.chainRemoveHead(U, re), $.shift()), l && l.chainJoin(F, U), u[F] = V.concat($), u.splice(U, 1);
            }
          }), i;
        };
      }, 17527: function(o) {
        function s(l, u, i) {
          var h = [];
          return l.forEach(function(p) {
            var _ = (p.myFill.above ? 8 : 0) + (p.myFill.below ? 4 : 0) + (p.otherFill && p.otherFill.above ? 2 : 0) + (p.otherFill && p.otherFill.below ? 1 : 0);
            u[_] !== 0 && h.push({ id: i ? i.segmentId() : -1, start: p.start, end: p.end, myFill: { above: u[_] === 1, below: u[_] === 2 }, otherFill: null });
          }), i && i.selected(h), h;
        }
        var n = { union: function(l, u) {
          return s(l, [0, 2, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], u);
        }, intersect: function(l, u) {
          return s(l, [0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 0], u);
        }, difference: function(l, u) {
          return s(l, [0, 0, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 1, 2, 0], u);
        }, differenceRev: function(l, u) {
          return s(l, [0, 2, 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0], u);
        }, xor: function(l, u) {
          return s(l, [0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0], u);
        } };
        o.exports = n;
      }, 3944: function(o, s, n) {
        var l = n(90386).Transform, u = n(79743);
        function i() {
          l.call(this, { readableObjectMode: !0 });
        }
        function h(p, _, d) {
          Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "", this.name = this.constructor.name, this.message = p, _ && (this.code = _), d && (this.statusCode = d);
        }
        i.prototype = Object.create(l.prototype), i.prototype.constructor = i, u(i.prototype), s.rU = function(p, _, d) {
          for (var f = _, c = 0; c < d.length; ) if (p[f++] !== d[c++]) return !1;
          return !0;
        }, s.VG = function(p, _) {
          var d = [], f = 0;
          if (_ && _ === "hex") for (; f < p.length; ) d.push(parseInt(p.slice(f, f + 2), 16)), f += 2;
          else for (; f < p.length; f++) d.push(255 & p.charCodeAt(f));
          return d;
        }, s.$l = function(p, _) {
          return p[_] | p[_ + 1] << 8;
        }, s.bc = function(p, _) {
          return p[_ + 1] | p[_] << 8;
        }, s.tF = function(p, _) {
          return p[_] | p[_ + 1] << 8 | p[_ + 2] << 16 | 16777216 * p[_ + 3];
        }, s.bb = function(p, _) {
          return p[_ + 3] | p[_ + 2] << 8 | p[_ + 1] << 16 | 16777216 * p[_];
        }, h.prototype = Object.create(Error.prototype), h.prototype.constructor = h;
      }, 19789: function(o) {
        function s(u, i) {
          var h = new Error(u);
          return h.code = i, h;
        }
        function n(u) {
          try {
            return decodeURIComponent(escape(u));
          } catch {
            return u;
          }
        }
        function l(u, i, h) {
          this.input = u.subarray(i, h), this.start = i;
          var p = String.fromCharCode.apply(null, this.input.subarray(0, 4));
          if (p !== "II*\0" && p !== "MM\0*") throw s("invalid TIFF signature", "EBADDATA");
          this.big_endian = p[0] === "M";
        }
        l.prototype.each = function(u) {
          this.aborted = !1;
          var i = this.read_uint32(4);
          for (this.ifds_to_read = [{ id: 0, offset: i }]; this.ifds_to_read.length > 0 && !this.aborted; ) {
            var h = this.ifds_to_read.shift();
            h.offset && this.scan_ifd(h.id, h.offset, u);
          }
        }, l.prototype.read_uint16 = function(u) {
          var i = this.input;
          if (u + 2 > i.length) throw s("unexpected EOF", "EBADDATA");
          return this.big_endian ? 256 * i[u] + i[u + 1] : i[u] + 256 * i[u + 1];
        }, l.prototype.read_uint32 = function(u) {
          var i = this.input;
          if (u + 4 > i.length) throw s("unexpected EOF", "EBADDATA");
          return this.big_endian ? 16777216 * i[u] + 65536 * i[u + 1] + 256 * i[u + 2] + i[u + 3] : i[u] + 256 * i[u + 1] + 65536 * i[u + 2] + 16777216 * i[u + 3];
        }, l.prototype.is_subifd_link = function(u, i) {
          return u === 0 && i === 34665 || u === 0 && i === 34853 || u === 34665 && i === 40965;
        }, l.prototype.exif_format_length = function(u) {
          switch (u) {
            case 1:
            case 2:
            case 6:
            case 7:
              return 1;
            case 3:
            case 8:
              return 2;
            case 4:
            case 9:
            case 11:
              return 4;
            case 5:
            case 10:
            case 12:
              return 8;
            default:
              return 0;
          }
        }, l.prototype.exif_format_read = function(u, i) {
          var h;
          switch (u) {
            case 1:
            case 2:
              return this.input[i];
            case 6:
              return (h = this.input[i]) | 33554430 * (128 & h);
            case 3:
              return this.read_uint16(i);
            case 8:
              return (h = this.read_uint16(i)) | 131070 * (32768 & h);
            case 4:
              return this.read_uint32(i);
            case 9:
              return 0 | this.read_uint32(i);
            default:
              return null;
          }
        }, l.prototype.scan_ifd = function(u, i, h) {
          var p = this.read_uint16(i);
          i += 2;
          for (var _ = 0; _ < p; _++) {
            var d = this.read_uint16(i), f = this.read_uint16(i + 2), c = this.read_uint32(i + 4), g = this.exif_format_length(f), m = c * g, x = m <= 4 ? i + 8 : this.read_uint32(i + 8), w = !1;
            if (x + m > this.input.length) throw s("unexpected EOF", "EBADDATA");
            for (var k = [], S = x, A = 0; A < c; A++, S += g) {
              var C = this.exif_format_read(f, S);
              if (C === null) {
                k = null;
                break;
              }
              k.push(C);
            }
            if (Array.isArray(k) && f === 2 && (k = n(String.fromCharCode.apply(null, k))) && k[k.length - 1] === "\0" && (k = k.slice(0, -1)), this.is_subifd_link(u, d) && Array.isArray(k) && Number.isInteger(k[0]) && k[0] > 0 && (this.ifds_to_read.push({ id: d, offset: k[0] }), w = !0), h({ is_big_endian: this.big_endian, ifd: u, tag: d, format: f, count: c, entry_offset: i + this.start, data_length: m, data_offset: x + this.start, value: k, is_subifd_link: w }) === !1) return void (this.aborted = !0);
            i += 12;
          }
          u === 0 && this.ifds_to_read.push({ id: 1, offset: this.read_uint32(i) });
        }, o.exports.ExifParser = l, o.exports.get_orientation = function(u) {
          var i = 0;
          try {
            return new l(u, 0, u.length).each(function(h) {
              if (h.ifd === 0 && h.tag === 274 && Array.isArray(h.value)) return i = h.value[0], !1;
            }), i;
          } catch {
            return -1;
          }
        };
      }, 20186: function(o, s, n) {
        var l = n(3944).bc, u = n(3944).bb;
        function i(c, g) {
          if (c.length < 4 + g) return null;
          var m = u(c, g);
          return c.length < m + g || m < 8 ? null : { boxtype: String.fromCharCode.apply(null, c.slice(g + 4, g + 8)), data: c.slice(g + 8, g + m), end: g + m };
        }
        function h(c, g) {
          for (var m = 0; ; ) {
            var x = i(c, m);
            if (!x) break;
            switch (x.boxtype) {
              case "ispe":
                g.sizes.push({ width: u(x.data, 4), height: u(x.data, 8) });
                break;
              case "irot":
                g.transforms.push({ type: "irot", value: 3 & x.data[0] });
                break;
              case "imir":
                g.transforms.push({ type: "imir", value: 1 & x.data[0] });
            }
            m = x.end;
          }
        }
        function p(c, g, m) {
          for (var x = 0, w = 0; w < m; w++) x = 256 * x + (c[g + w] || 0);
          return x;
        }
        function _(c, g) {
          for (var m = c[4] >> 4 & 15, x = 15 & c[4], w = c[5] >> 4 & 15, k = l(c, 6), S = 8, A = 0; A < k; A++) {
            var C = l(c, S), D = l(c, S += 2), L = p(c, S += 2, w), E = l(c, S += w);
            if (S += 2, D === 0 && E === 1) {
              var P = p(c, S, m), I = p(c, S + m, x);
              g.item_loc[C] = { length: I, offset: P + L };
            }
            S += E * (m + x);
          }
        }
        function d(c, g) {
          for (var m = l(c, 4), x = 6, w = 0; w < m; w++) {
            var k = i(c, x);
            if (!k) break;
            if (k.boxtype === "infe") {
              for (var S = l(k.data, 4), A = "", C = 8; C < k.data.length && k.data[C]; C++) A += String.fromCharCode(k.data[C]);
              g.item_inf[A] = S;
            }
            x = k.end;
          }
        }
        function f(c, g) {
          for (var m = 0; ; ) {
            var x = i(c, m);
            if (!x) break;
            x.boxtype === "ipco" && h(x.data, g), m = x.end;
          }
        }
        o.exports.unbox = i, o.exports.readSizeFromMeta = function(c) {
          var g = { sizes: [], transforms: [], item_inf: {}, item_loc: {} };
          if (function(C, D) {
            for (var L = 4; ; ) {
              var E = i(C, L);
              if (!E) break;
              E.boxtype === "iprp" && f(E.data, D), E.boxtype === "iloc" && _(E.data, D), E.boxtype === "iinf" && d(E.data, D), L = E.end;
            }
          }(c, g), g.sizes.length) {
            var m, x, w, k = (x = (m = g.sizes).reduce(function(C, D) {
              return C.width > D.width || C.width === D.width && C.height > D.height ? C : D;
            }), w = m.reduce(function(C, D) {
              return C.height > D.height || C.height === D.height && C.width > D.width ? C : D;
            }), x.width > w.height || x.width === w.height && x.height > w.width ? x : w), S = 1;
            g.transforms.forEach(function(C) {
              var D = { 1: 6, 2: 5, 3: 8, 4: 7, 5: 4, 6: 3, 7: 2, 8: 1 }, L = { 1: 4, 2: 3, 3: 2, 4: 1, 5: 6, 6: 5, 7: 8, 8: 7 };
              if (C.type === "imir" && (S = C.value === 0 ? L[S] : D[S = D[S = L[S]]]), C.type === "irot") for (var E = 0; E < C.value; E++) S = D[S];
            });
            var A = null;
            return g.item_inf.Exif && (A = g.item_loc[g.item_inf.Exif]), { width: k.width, height: k.height, orientation: g.transforms.length ? S : null, variants: g.sizes, exif_location: A };
          }
        }, o.exports.getMimeType = function(c) {
          var g = String.fromCharCode.apply(null, c.slice(0, 4)), m = {};
          m[g] = !0;
          for (var x = 8; x < c.length; x += 4) m[String.fromCharCode.apply(null, c.slice(x, x + 4))] = !0;
          if (m.mif1 || m.msf1 || m.miaf) return g === "avif" || g === "avis" || g === "avio" ? { type: "avif", mime: "image/avif" } : g === "heic" || g === "heix" ? { type: "heic", mime: "image/heic" } : g === "hevc" || g === "hevx" ? { type: "heic", mime: "image/heic-sequence" } : m.avif || m.avis ? { type: "avif", mime: "image/avif" } : m.heic || m.heix || m.hevc || m.hevx || m.heis ? m.msf1 ? { type: "heif", mime: "image/heif-sequence" } : { type: "heif", mime: "image/heif" } : { type: "avif", mime: "image/avif" };
        };
      }, 31149: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).bb, h = n(20186), p = n(19789), _ = l("ftyp");
        o.exports = function(d) {
          if (u(d, 4, _)) {
            var f = h.unbox(d, 0);
            if (f) {
              var c = h.getMimeType(f.data);
              if (c) {
                for (var g, m = f.end; ; ) {
                  var x = h.unbox(d, m);
                  if (!x) break;
                  if (m = x.end, x.boxtype === "mdat") return;
                  if (x.boxtype === "meta") {
                    g = x.data;
                    break;
                  }
                }
                if (g) {
                  var w = h.readSizeFromMeta(g);
                  if (w) {
                    var k = { width: w.width, height: w.height, type: c.type, mime: c.mime, wUnits: "px", hUnits: "px" };
                    if (w.variants.length > 1 && (k.variants = w.variants), w.orientation && (k.orientation = w.orientation), w.exif_location && w.exif_location.offset + w.exif_location.length <= d.length) {
                      var S = i(d, w.exif_location.offset), A = d.slice(w.exif_location.offset + S + 4, w.exif_location.offset + w.exif_location.length), C = p.get_orientation(A);
                      C > 0 && (k.orientation = C);
                    }
                    return k;
                  }
                }
              }
            }
          }
        };
      }, 78218: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).$l, h = l("BM");
        o.exports = function(p) {
          if (!(p.length < 26) && u(p, 0, h)) return { width: i(p, 18), height: i(p, 22), type: "bmp", mime: "image/bmp", wUnits: "px", hUnits: "px" };
        };
      }, 37495: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).$l, h = l("GIF87a"), p = l("GIF89a");
        o.exports = function(_) {
          if (!(_.length < 10) && (u(_, 0, h) || u(_, 0, p))) return { width: i(_, 6), height: i(_, 8), type: "gif", mime: "image/gif", wUnits: "px", hUnits: "px" };
        };
      }, 88708: function(o, s, n) {
        var l = n(3944).$l;
        o.exports = function(u) {
          var i = l(u, 0), h = l(u, 2), p = l(u, 4);
          if (i === 0 && h === 1 && p) {
            for (var _ = [], d = { width: 0, height: 0 }, f = 0; f < p; f++) {
              var c = u[6 + 16 * f] || 256, g = u[6 + 16 * f + 1] || 256, m = { width: c, height: g };
              _.push(m), (c > d.width || g > d.height) && (d = m);
            }
            return { width: d.width, height: d.height, variants: _, type: "ico", mime: "image/x-icon", wUnits: "px", hUnits: "px" };
          }
        };
      }, 13827: function(o, s, n) {
        var l = n(3944).bc, u = n(3944).VG, i = n(3944).rU, h = n(19789), p = u("Exif\0\0");
        o.exports = function(_) {
          if (!(_.length < 2) && _[0] === 255 && _[1] === 216 && _[2] === 255) for (var d = 2; ; ) {
            for (; ; ) {
              if (_.length - d < 2) return;
              if (_[d++] === 255) break;
            }
            for (var f, c, g = _[d++]; g === 255; ) g = _[d++];
            if (208 <= g && g <= 217 || g === 1) f = 0;
            else {
              if (!(192 <= g && g <= 254) || _.length - d < 2) return;
              f = l(_, d) - 2, d += 2;
            }
            if (g === 217 || g === 218) return;
            if (g === 225 && f >= 10 && i(_, d, p) && (c = h.get_orientation(_.slice(d + 6, d + f))), f >= 5 && 192 <= g && g <= 207 && g !== 196 && g !== 200 && g !== 204) {
              if (_.length - d < f) return;
              var m = { width: l(_, d + 3), height: l(_, d + 1), type: "jpg", mime: "image/jpeg", wUnits: "px", hUnits: "px" };
              return c > 0 && (m.orientation = c), m;
            }
            d += f;
          }
        };
      }, 46594: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).bb, h = l(`PNG\r

`), p = l("IHDR");
        o.exports = function(_) {
          if (!(_.length < 24) && u(_, 0, h) && u(_, 12, p)) return { width: i(_, 16), height: i(_, 20), type: "png", mime: "image/png", wUnits: "px", hUnits: "px" };
        };
      }, 13198: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).bb, h = l("8BPS\0");
        o.exports = function(p) {
          if (!(p.length < 22) && u(p, 0, h)) return { width: i(p, 18), height: i(p, 14), type: "psd", mime: "image/vnd.adobe.photoshop", wUnits: "px", hUnits: "px" };
        };
      }, 94203: function(o) {
        function s(d) {
          return typeof d == "number" && isFinite(d) && d > 0;
        }
        var n = /<[-_.:a-zA-Z0-9][^>]*>/, l = /^<([-_.:a-zA-Z0-9]+:)?svg\s/, u = /[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/, i = /\bheight="([^%]+?)"|\bheight='([^%]+?)'/, h = /\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/, p = /in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;
        function _(d) {
          return p.test(d) ? d.match(p)[0] : "px";
        }
        o.exports = function(d) {
          if (function(L) {
            var E, P = 0, I = L.length;
            for (L[0] === 239 && L[1] === 187 && L[2] === 191 && (P = 3); P < I && ((E = L[P]) === 32 || E === 9 || E === 13 || E === 10); ) P++;
            return P !== I && L[P] === 60;
          }(d)) {
            for (var f = "", c = 0; c < d.length; c++) f += String.fromCharCode(d[c]);
            var g = (f.match(n) || [""])[0];
            if (l.test(g)) {
              var m = function(L) {
                var E = L.match(u), P = L.match(i), I = L.match(h);
                return { width: E && (E[1] || E[2]), height: P && (P[1] || P[2]), viewbox: I && (I[1] || I[2]) };
              }(g), x = parseFloat(m.width), w = parseFloat(m.height);
              if (m.width && m.height)
                return !s(x) || !s(w) ? void 0 : { width: x, height: w, type: "svg", mime: "image/svg+xml", wUnits: _(m.width), hUnits: _(m.height) };
              var k = (m.viewbox || "").split(" "), S = { width: k[2], height: k[3] }, A = parseFloat(S.width), C = parseFloat(S.height);
              if (s(A) && s(C) && _(S.width) === _(S.height)) {
                var D = A / C;
                return m.width ? s(x) ? { width: x, height: x / D, type: "svg", mime: "image/svg+xml", wUnits: _(m.width), hUnits: _(m.width) } : void 0 : m.height ? s(w) ? { width: w * D, height: w, type: "svg", mime: "image/svg+xml", wUnits: _(m.height), hUnits: _(m.height) } : void 0 : { width: A, height: C, type: "svg", mime: "image/svg+xml", wUnits: _(S.width), hUnits: _(S.height) };
              }
            }
          }
        };
      }, 46966: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).$l, h = n(3944).bc, p = n(3944).tF, _ = n(3944).bb, d = l("II*\0"), f = l("MM\0*");
        function c(x, w, k) {
          return k ? h(x, w) : i(x, w);
        }
        function g(x, w, k) {
          return k ? _(x, w) : p(x, w);
        }
        function m(x, w, k) {
          var S = c(x, w + 2, k);
          return g(x, w + 4, k) !== 1 || S !== 3 && S !== 4 ? null : S === 3 ? c(x, w + 8, k) : g(x, w + 8, k);
        }
        o.exports = function(x) {
          if (!(x.length < 8) && (u(x, 0, d) || u(x, 0, f))) {
            var w = x[0] === 77, k = g(x, 4, w) - 8;
            if (!(k < 0)) {
              var S = k + 8;
              if (!(x.length - S < 2)) {
                var A = 12 * c(x, S + 0, w);
                if (!(A <= 0 || (S += 2, x.length - S < A))) {
                  var C, D, L, E;
                  for (C = 0; C < A; C += 12) (E = c(x, S + C, w)) === 256 ? D = m(x, S + C, w) : E === 257 && (L = m(x, S + C, w));
                  return D && L ? { width: D, height: L, type: "tiff", mime: "image/tiff", wUnits: "px", hUnits: "px" } : void 0;
                }
              }
            }
          }
        };
      }, 88023: function(o, s, n) {
        var l = n(3944).VG, u = n(3944).rU, i = n(3944).$l, h = n(3944).tF, p = n(19789), _ = l("RIFF"), d = l("WEBP");
        function f(m, x) {
          if (m[x + 3] === 157 && m[x + 4] === 1 && m[x + 5] === 42) return { width: 16383 & i(m, x + 6), height: 16383 & i(m, x + 8), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
        }
        function c(m, x) {
          if (m[x] === 47) {
            var w = h(m, x + 1);
            return { width: 1 + (16383 & w), height: 1 + (w >> 14 & 16383), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
          }
        }
        function g(m, x) {
          return { width: 1 + (m[x + 6] << 16 | m[x + 5] << 8 | m[x + 4]), height: 1 + (m[x + 9] << x | m[x + 8] << 8 | m[x + 7]), type: "webp", mime: "image/webp", wUnits: "px", hUnits: "px" };
        }
        o.exports = function(m) {
          if (!(m.length < 16) && (u(m, 0, _) || u(m, 8, d))) {
            var x = 12, w = null, k = 0, S = h(m, 4) + 8;
            if (!(S > m.length)) {
              for (; x + 8 < S; ) if (m[x] !== 0) {
                var A = String.fromCharCode.apply(null, m.slice(x, x + 4)), C = h(m, x + 4);
                A === "VP8 " && C >= 10 ? w = w || f(m, x + 8) : A === "VP8L" && C >= 9 ? w = w || c(m, x + 8) : A === "VP8X" && C >= 10 ? w = w || g(m, x + 8) : A === "EXIF" && (k = p.get_orientation(m.slice(x + 8, x + 8 + C)), x = 1 / 0), x += 8 + C;
              } else x++;
              if (w) return k > 0 && (w.orientation = k), w;
            }
          }
        };
      }, 43751: function(o, s, n) {
        o.exports = { avif: n(31149), bmp: n(78218), gif: n(37495), ico: n(88708), jpeg: n(13827), png: n(46594), psd: n(13198), svg: n(94203), tiff: n(46966), webp: n(88023) };
      }, 19490: function(o, s, n) {
        var l = n(43751);
        o.exports = function(u) {
          return function(i) {
            for (var h = Object.keys(l), p = 0; p < h.length; p++) {
              var _ = l[h[p]](i);
              if (_) return _;
            }
            return null;
          }(u);
        }, o.exports.parsers = l;
      }, 33282: function(o) {
        var s, n, l = o.exports = {};
        function u() {
          throw new Error("setTimeout has not been defined");
        }
        function i() {
          throw new Error("clearTimeout has not been defined");
        }
        function h(w) {
          if (s === setTimeout) return setTimeout(w, 0);
          if ((s === u || !s) && setTimeout) return s = setTimeout, setTimeout(w, 0);
          try {
            return s(w, 0);
          } catch {
            try {
              return s.call(null, w, 0);
            } catch {
              return s.call(this, w, 0);
            }
          }
        }
        (function() {
          try {
            s = typeof setTimeout == "function" ? setTimeout : u;
          } catch {
            s = u;
          }
          try {
            n = typeof clearTimeout == "function" ? clearTimeout : i;
          } catch {
            n = i;
          }
        })();
        var p, _ = [], d = !1, f = -1;
        function c() {
          d && p && (d = !1, p.length ? _ = p.concat(_) : f = -1, _.length && g());
        }
        function g() {
          if (!d) {
            var w = h(c);
            d = !0;
            for (var k = _.length; k; ) {
              for (p = _, _ = []; ++f < k; ) p && p[f].run();
              f = -1, k = _.length;
            }
            p = null, d = !1, function(S) {
              if (n === clearTimeout) return clearTimeout(S);
              if ((n === i || !n) && clearTimeout) return n = clearTimeout, clearTimeout(S);
              try {
                return n(S);
              } catch {
                try {
                  return n.call(null, S);
                } catch {
                  return n.call(this, S);
                }
              }
            }(w);
          }
        }
        function m(w, k) {
          this.fun = w, this.array = k;
        }
        function x() {
        }
        l.nextTick = function(w) {
          var k = new Array(arguments.length - 1);
          if (arguments.length > 1) for (var S = 1; S < arguments.length; S++) k[S - 1] = arguments[S];
          _.push(new m(w, k)), _.length !== 1 || d || h(g);
        }, m.prototype.run = function() {
          this.fun.apply(null, this.array);
        }, l.title = "browser", l.browser = !0, l.env = {}, l.argv = [], l.version = "", l.versions = {}, l.on = x, l.addListener = x, l.once = x, l.off = x, l.removeListener = x, l.removeAllListeners = x, l.emit = x, l.prependListener = x, l.prependOnceListener = x, l.listeners = function(w) {
          return [];
        }, l.binding = function(w) {
          throw new Error("process.binding is not supported");
        }, l.cwd = function() {
          return "/";
        }, l.chdir = function(w) {
          throw new Error("process.chdir is not supported");
        }, l.umask = function() {
          return 0;
        };
      }, 16494: function(o, s, n) {
        for (var l = n(71879), u = typeof window > "u" ? n.g : window, i = ["moz", "webkit"], h = "AnimationFrame", p = u["request" + h], _ = u["cancel" + h] || u["cancelRequest" + h], d = 0; !p && d < i.length; d++) p = u[i[d] + "Request" + h], _ = u[i[d] + "Cancel" + h] || u[i[d] + "CancelRequest" + h];
        if (!p || !_) {
          var f = 0, c = 0, g = [];
          p = function(m) {
            if (g.length === 0) {
              var x = l(), w = Math.max(0, 16.666666666666668 - (x - f));
              f = w + x, setTimeout(function() {
                var k = g.slice(0);
                g.length = 0;
                for (var S = 0; S < k.length; S++) if (!k[S].cancelled) try {
                  k[S].callback(f);
                } catch (A) {
                  setTimeout(function() {
                    throw A;
                  }, 0);
                }
              }, Math.round(w));
            }
            return g.push({ handle: ++c, callback: m, cancelled: !1 }), c;
          }, _ = function(m) {
            for (var x = 0; x < g.length; x++) g[x].handle === m && (g[x].cancelled = !0);
          };
        }
        o.exports = function(m) {
          return p.call(u, m);
        }, o.exports.cancel = function() {
          _.apply(u, arguments);
        }, o.exports.polyfill = function(m) {
          m || (m = u), m.requestAnimationFrame = p, m.cancelAnimationFrame = _;
        };
      }, 29978: function(o, s, n) {
        var l = n(78112), u = n(162), i = n(79788), h = n(6807), p = n(27976), _ = n(83473), d = n(51498), f = d.float32, c = d.fract32;
        o.exports = function(m, x) {
          if (typeof m == "function" ? (x || (x = {}), x.regl = m) : x = m, x.length && (x.positions = x), !(m = x.regl).hasExtension("ANGLE_instanced_arrays")) throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");
          var w, k, S, A, C, D, L = m._gl, E = { color: "black", capSize: 5, lineWidth: 1, opacity: 1, viewport: null, range: null, offset: 0, count: 0, bounds: null, positions: [], errors: [] }, P = [];
          return A = m.buffer({ usage: "dynamic", type: "uint8", data: new Uint8Array(0) }), k = m.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), S = m.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), C = m.buffer({ usage: "dynamic", type: "float", data: new Uint8Array(0) }), D = m.buffer({ usage: "static", type: "float", data: g }), T(x), w = m({ vert: `
		precision highp float;

		attribute vec2 position, positionFract;
		attribute vec4 error;
		attribute vec4 color;

		attribute vec2 direction, lineOffset, capOffset;

		uniform vec4 viewport;
		uniform float lineWidth, capSize;
		uniform vec2 scale, scaleFract, translate, translateFract;

		varying vec4 fragColor;

		void main() {
			fragColor = color / 255.;

			vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;

			vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;

			vec2 position = position + dxy;

			vec2 pos = (position + translate) * scale
				+ (positionFract + translateFract) * scale
				+ (position + translate) * scaleFract
				+ (positionFract + translateFract) * scaleFract;

			pos += pixelOffset / viewport.zw;

			gl_Position = vec4(pos * 2. - 1., 0, 1);
		}
		`, frag: `
		precision highp float;

		varying vec4 fragColor;

		uniform float opacity;

		void main() {
			gl_FragColor = fragColor;
			gl_FragColor.a *= opacity;
		}
		`, uniforms: { range: m.prop("range"), lineWidth: m.prop("lineWidth"), capSize: m.prop("capSize"), opacity: m.prop("opacity"), scale: m.prop("scale"), translate: m.prop("translate"), scaleFract: m.prop("scaleFract"), translateFract: m.prop("translateFract"), viewport: function(F, U) {
            return [U.viewport.x, U.viewport.y, F.viewportWidth, F.viewportHeight];
          } }, attributes: { color: { buffer: A, offset: function(F, U) {
            return 4 * U.offset;
          }, divisor: 1 }, position: { buffer: k, offset: function(F, U) {
            return 8 * U.offset;
          }, divisor: 1 }, positionFract: { buffer: S, offset: function(F, U) {
            return 8 * U.offset;
          }, divisor: 1 }, error: { buffer: C, offset: function(F, U) {
            return 16 * U.offset;
          }, divisor: 1 }, direction: { buffer: D, stride: 24, offset: 0 }, lineOffset: { buffer: D, stride: 24, offset: 8 }, capOffset: { buffer: D, stride: 24, offset: 16 } }, primitive: "triangles", blend: { enable: !0, color: [0, 0, 0, 0], equation: { rgb: "add", alpha: "add" }, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, depth: { enable: !1 }, scissor: { enable: !0, box: m.prop("viewport") }, viewport: m.prop("viewport"), stencil: !1, instances: m.prop("count"), count: g.length }), p(I, { update: T, draw: M, destroy: z, regl: m, gl: L, canvas: L.canvas, groups: P }), I;
          function I(F) {
            F ? T(F) : F === null && z(), M();
          }
          function M(F) {
            if (typeof F == "number") return O(F);
            F && !Array.isArray(F) && (F = [F]), m._refresh(), P.forEach(function(U, V) {
              U && (F && (F[V] ? U.draw = !0 : U.draw = !1), U.draw ? O(V) : U.draw = !0);
            });
          }
          function O(F) {
            typeof F == "number" && (F = P[F]), F != null && F && F.count && F.color && F.opacity && F.positions && F.positions.length > 1 && (F.scaleRatio = [F.scale[0] * F.viewport.width, F.scale[1] * F.viewport.height], w(F), F.after && F.after(F));
          }
          function T(F) {
            if (F) {
              F.length != null ? typeof F[0] == "number" && (F = [{ positions: F }]) : Array.isArray(F) || (F = [F]);
              var U = 0, V = 0;
              if (I.groups = P = F.map(function(ee, X) {
                var Q = P[X];
                return ee && (typeof ee == "function" ? ee = { after: ee } : typeof ee[0] == "number" && (ee = { positions: ee }), ee = h(ee, { color: "color colors fill", capSize: "capSize cap capsize cap-size", lineWidth: "lineWidth line-width width line thickness", opacity: "opacity alpha", range: "range dataBox", viewport: "viewport viewBox", errors: "errors error", positions: "positions position data points" }), Q || (P[X] = Q = { id: X, scale: null, translate: null, scaleFract: null, translateFract: null, draw: !0 }, ee = p({}, E, ee)), i(Q, ee, [{ lineWidth: function(ue) {
                  return 0.5 * +ue;
                }, capSize: function(ue) {
                  return 0.5 * +ue;
                }, opacity: parseFloat, errors: function(ue) {
                  return ue = _(ue), V += ue.length, ue;
                }, positions: function(ue, ce) {
                  return ue = _(ue, "float64"), ce.count = Math.floor(ue.length / 2), ce.bounds = l(ue, 2), ce.offset = U, U += ce.count, ue;
                } }, { color: function(ue, ce) {
                  var he = ce.count;
                  if (ue || (ue = "transparent"), !Array.isArray(ue) || typeof ue[0] == "number") {
                    var de = ue;
                    ue = Array(he);
                    for (var ne = 0; ne < he; ne++) ue[ne] = de;
                  }
                  if (ue.length < he) throw Error("Not enough colors");
                  for (var ae = new Uint8Array(4 * he), se = 0; se < he; se++) {
                    var me = u(ue[se], "uint8");
                    ae.set(me, 4 * se);
                  }
                  return ae;
                }, range: function(ue, ce, he) {
                  var de = ce.bounds;
                  return ue || (ue = de), ce.scale = [1 / (ue[2] - ue[0]), 1 / (ue[3] - ue[1])], ce.translate = [-ue[0], -ue[1]], ce.scaleFract = c(ce.scale), ce.translateFract = c(ce.translate), ue;
                }, viewport: function(ue) {
                  var ce;
                  return Array.isArray(ue) ? ce = { x: ue[0], y: ue[1], width: ue[2] - ue[0], height: ue[3] - ue[1] } : ue ? (ce = { x: ue.x || ue.left || 0, y: ue.y || ue.top || 0 }, ue.right ? ce.width = ue.right - ce.x : ce.width = ue.w || ue.width || 0, ue.bottom ? ce.height = ue.bottom - ce.y : ce.height = ue.h || ue.height || 0) : ce = { x: 0, y: 0, width: L.drawingBufferWidth, height: L.drawingBufferHeight }, ce;
                } }])), Q;
              }), U || V) {
                var $ = P.reduce(function(ee, X, Q) {
                  return ee + (X ? X.count : 0);
                }, 0), q = new Float64Array(2 * $), K = new Uint8Array(4 * $), re = new Float32Array(4 * $);
                P.forEach(function(ee, X) {
                  if (ee) {
                    var Q = ee.positions, ue = ee.count, ce = ee.offset, he = ee.color, de = ee.errors;
                    ue && (K.set(he, 4 * ce), re.set(de, 4 * ce), q.set(Q, 2 * ce));
                  }
                });
                var Y = f(q);
                k(Y);
                var te = c(q, Y);
                S(te), A(K), C(re);
              }
            }
          }
          function z() {
            k.destroy(), S.destroy(), A.destroy(), C.destroy(), D.destroy();
          }
        };
        var g = [[1, 0, 0, 1, 0, 0], [1, 0, 0, -1, 0, 0], [-1, 0, 0, -1, 0, 0], [-1, 0, 0, -1, 0, 0], [-1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, -1, 0, 0, 1], [1, 0, -1, 0, 0, -1], [1, 0, 1, 0, 0, -1], [1, 0, 1, 0, 0, -1], [1, 0, 1, 0, 0, 1], [1, 0, -1, 0, 0, 1], [-1, 0, -1, 0, 0, 1], [-1, 0, -1, 0, 0, -1], [-1, 0, 1, 0, 0, -1], [-1, 0, 1, 0, 0, -1], [-1, 0, 1, 0, 0, 1], [-1, 0, -1, 0, 0, 1], [0, 1, 1, 0, 0, 0], [0, 1, -1, 0, 0, 0], [0, -1, -1, 0, 0, 0], [0, -1, -1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, -1, 1, 0, 0, 0], [0, 1, 0, -1, 1, 0], [0, 1, 0, -1, -1, 0], [0, 1, 0, 1, -1, 0], [0, 1, 0, 1, 1, 0], [0, 1, 0, -1, 1, 0], [0, 1, 0, 1, -1, 0], [0, -1, 0, -1, 1, 0], [0, -1, 0, -1, -1, 0], [0, -1, 0, 1, -1, 0], [0, -1, 0, 1, 1, 0], [0, -1, 0, -1, 1, 0], [0, -1, 0, 1, -1, 0]];
      }, 49478: function(o, s, n) {
        var l = n(162), u = n(78112), i = n(27976), h = n(6807), p = n(83473), _ = n(25782), d = n(90956), f = n(51498), c = f.float32, g = f.fract32, m = n(93103), x = n(5137), w = n(33055);
        function k(S, A) {
          if (!(this instanceof k)) return new k(S, A);
          if (typeof S == "function" ? (A || (A = {}), A.regl = S) : A = S, A.length && (A.positions = A), !(S = A.regl).hasExtension("ANGLE_instanced_arrays")) throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");
          this.gl = S._gl, this.regl = S, this.passes = [], this.shaders = k.shaders.has(S) ? k.shaders.get(S) : k.shaders.set(S, k.createShaders(S)).get(S), this.update(A);
        }
        o.exports = k, k.dashMult = 2, k.maxPatternLength = 256, k.precisionThreshold = 3e6, k.maxPoints = 1e4, k.maxLines = 2048, k.shaders = new m(), k.createShaders = function(S) {
          var A, C = S.buffer({ usage: "static", type: "float", data: [0, 1, 0, 0, 1, 1, 1, 0] }), D = { primitive: "triangle strip", instances: S.prop("count"), count: 4, offset: 0, uniforms: { miterMode: function(E, P) {
            return P.join === "round" ? 2 : 1;
          }, miterLimit: S.prop("miterLimit"), scale: S.prop("scale"), scaleFract: S.prop("scaleFract"), translateFract: S.prop("translateFract"), translate: S.prop("translate"), thickness: S.prop("thickness"), dashTexture: S.prop("dashTexture"), opacity: S.prop("opacity"), pixelRatio: S.context("pixelRatio"), id: S.prop("id"), dashLength: S.prop("dashLength"), viewport: function(E, P) {
            return [P.viewport.x, P.viewport.y, E.viewportWidth, E.viewportHeight];
          }, depth: S.prop("depth") }, blend: { enable: !0, color: [0, 0, 0, 0], equation: { rgb: "add", alpha: "add" }, func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, depth: { enable: function(E, P) {
            return !P.overlay;
          } }, stencil: { enable: !1 }, scissor: { enable: !0, box: S.prop("viewport") }, viewport: S.prop("viewport") }, L = S(i({ vert: `
precision highp float;

attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;
attribute vec4 color;
attribute float lineEnd, lineTop;

uniform vec2 scale, scaleFract, translate, translateFract;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;

varying vec4 fragColor;
varying vec2 tangent;

vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {
	// the order is important
	return position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;
}

void main() {
	float lineStart = 1. - lineEnd;
	float lineOffset = lineTop * 2. - 1.;

	vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);
	tangent = normalize(diff * scale * viewport.zw);
	vec2 normal = vec2(-tangent.y, tangent.x);

	vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart
		+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd

		+ thickness * normal * .5 * lineOffset / viewport.zw;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
}
`, frag: `
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;

void main() {
	float alpha = 1.;

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`, attributes: { lineEnd: { buffer: C, divisor: 0, stride: 8, offset: 0 }, lineTop: { buffer: C, divisor: 0, stride: 8, offset: 4 }, aCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 16, divisor: 1 }, aCoordFract: { buffer: S.prop("positionFractBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoordFract: { buffer: S.prop("positionFractBuffer"), stride: 8, offset: 16, divisor: 1 }, color: { buffer: S.prop("colorBuffer"), stride: 4, offset: 0, divisor: 1 } } }, D));
          try {
            A = S(i({ cull: { enable: !0, face: "back" }, vert: `
precision highp float;

attribute vec2 aCoord, bCoord, nextCoord, prevCoord;
attribute vec4 aColor, bColor;
attribute float lineEnd, lineTop;

uniform vec2 scale, translate;
uniform float thickness, pixelRatio, id, depth;
uniform vec4 viewport;
uniform float miterLimit, miterMode;

varying vec4 fragColor;
varying vec4 startCutoff, endCutoff;
varying vec2 tangent;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

const float REVERSE_THRESHOLD = -.875;
const float MIN_DIFF = 1e-6;

// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead
// TODO: precalculate dot products, normalize things beforehead etc.
// TODO: refactor to rectangular algorithm

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

bool isNaN( float val ){
  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;
}

void main() {
	vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;

  vec2 adjustedScale;
  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;
  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;

  vec2 scaleRatio = adjustedScale * viewport.zw;
	vec2 normalWidth = thickness / scaleRatio;

	float lineStart = 1. - lineEnd;
	float lineBot = 1. - lineTop;

	fragColor = (lineStart * aColor + lineEnd * bColor) / 255.;

	if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;

	if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);
	if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);


	vec2 prevDiff = aCoord - prevCoord;
	vec2 currDiff = bCoord - aCoord;
	vec2 nextDiff = nextCoord - bCoord;

	vec2 prevTangent = normalize(prevDiff * scaleRatio);
	vec2 currTangent = normalize(currDiff * scaleRatio);
	vec2 nextTangent = normalize(nextDiff * scaleRatio);

	vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);
	vec2 currNormal = vec2(-currTangent.y, currTangent.x);
	vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);

	vec2 startJoinDirection = normalize(prevTangent - currTangent);
	vec2 endJoinDirection = normalize(currTangent - nextTangent);

	// collapsed/unidirectional segment cases
	// FIXME: there should be more elegant solution
	vec2 prevTanDiff = abs(prevTangent - currTangent);
	vec2 nextTanDiff = abs(nextTangent - currTangent);
	if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {
		startJoinDirection = currNormal;
	}
	if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {
		endJoinDirection = currNormal;
	}
	if (aCoord == bCoord) {
		endJoinDirection = startJoinDirection;
		currNormal = prevNormal;
		currTangent = prevTangent;
	}

	tangent = currTangent;

	//calculate join shifts relative to normals
	float startJoinShift = dot(currNormal, startJoinDirection);
	float endJoinShift = dot(currNormal, endJoinDirection);

	float startMiterRatio = abs(1. / startJoinShift);
	float endMiterRatio = abs(1. / endJoinShift);

	vec2 startJoin = startJoinDirection * startMiterRatio;
	vec2 endJoin = endJoinDirection * endMiterRatio;

	vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;
	startTopJoin = sign(startJoinShift) * startJoin * .5;
	startBotJoin = -startTopJoin;

	endTopJoin = sign(endJoinShift) * endJoin * .5;
	endBotJoin = -endTopJoin;

	vec2 aTopCoord = aCoord + normalWidth * startTopJoin;
	vec2 bTopCoord = bCoord + normalWidth * endTopJoin;
	vec2 aBotCoord = aCoord + normalWidth * startBotJoin;
	vec2 bBotCoord = bCoord + normalWidth * endBotJoin;

	//miter anti-clipping
	float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));
	float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));

	//prevent close to reverse direction switch
	bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);
	bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);

	if (prevReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);
		aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {
		//handle miter clipping
		bTopCoord -= normalWidth * endTopJoin;
		bTopCoord += normalize(endTopJoin * normalWidth) * baClipping;
	}

	if (nextReverse) {
		//make join rectangular
		vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;
		float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);
		bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;
		bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;
	}
	else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {
		//handle miter clipping
		aBotCoord -= normalWidth * startBotJoin;
		aBotCoord += normalize(startBotJoin * normalWidth) * abClipping;
	}

	vec2 aTopPosition = (aTopCoord) * adjustedScale + translate;
	vec2 aBotPosition = (aBotCoord) * adjustedScale + translate;

	vec2 bTopPosition = (bTopCoord) * adjustedScale + translate;
	vec2 bBotPosition = (bBotCoord) * adjustedScale + translate;

	//position is normalized 0..1 coord on the screen
	vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;

	startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;
	endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;

	gl_Position = vec4(position  * 2.0 - 1.0, depth, 1);

	enableStartMiter = step(dot(currTangent, prevTangent), .5);
	enableEndMiter = step(dot(currTangent, nextTangent), .5);

	//bevel miter cutoffs
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}

	//round miter cutoffs
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;
			startCutoff = vec4(aCoord, aCoord);
			startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;
			startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			startCutoff += viewport.xyxy;
			startCutoff += startMiterWidth.xyxy;
		}

		if (enableEndMiter == 1.) {
			vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;
			endCutoff = vec4(bCoord, bCoord);
			endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;
			endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;
			endCutoff += viewport.xyxy;
			endCutoff += endMiterWidth.xyxy;
		}
	}
}
`, frag: `
precision highp float;

uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;
uniform sampler2D dashTexture;

varying vec4 fragColor;
varying vec2 tangent;
varying vec4 startCutoff, endCutoff;
varying vec2 startCoord, endCoord;
varying float enableStartMiter, enableEndMiter;

float distToLine(vec2 p, vec2 a, vec2 b) {
	vec2 diff = b - a;
	vec2 perp = normalize(vec2(-diff.y, diff.x));
	return dot(p - a, perp);
}

void main() {
	float alpha = 1., distToStart, distToEnd;
	float cutoff = thickness * .5;

	//bevel miter
	if (miterMode == 1.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToStart + 1., 0.), 1.);
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < -1.) {
				discard;
				return;
			}
			alpha *= min(max(distToEnd + 1., 0.), 1.);
		}
	}

	// round miter
	else if (miterMode == 2.) {
		if (enableStartMiter == 1.) {
			distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);
			if (distToStart < 0.) {
				float radius = length(gl_FragCoord.xy - startCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}

		if (enableEndMiter == 1.) {
			distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);
			if (distToEnd < 0.) {
				float radius = length(gl_FragCoord.xy - endCoord);

				if(radius > cutoff + .5) {
					discard;
					return;
				}

				alpha -= smoothstep(cutoff - .5, cutoff + .5, radius);
			}
		}
	}

	float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;
	float dash = texture2D(dashTexture, vec2(t, .5)).r;

	gl_FragColor = fragColor;
	gl_FragColor.a *= alpha * opacity * dash;
}
`, attributes: { lineEnd: { buffer: C, divisor: 0, stride: 8, offset: 0 }, lineTop: { buffer: C, divisor: 0, stride: 8, offset: 4 }, aColor: { buffer: S.prop("colorBuffer"), stride: 4, offset: 0, divisor: 1 }, bColor: { buffer: S.prop("colorBuffer"), stride: 4, offset: 4, divisor: 1 }, prevCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 0, divisor: 1 }, aCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 8, divisor: 1 }, bCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 16, divisor: 1 }, nextCoord: { buffer: S.prop("positionBuffer"), stride: 8, offset: 24, divisor: 1 } } }, D));
          } catch {
            A = L;
          }
          return { fill: S({ primitive: "triangle", elements: function(E, P) {
            return P.triangles;
          }, offset: 0, vert: `
precision highp float;

attribute vec2 position, positionFract;

uniform vec4 color;
uniform vec2 scale, scaleFract, translate, translateFract;
uniform float pixelRatio, id;
uniform vec4 viewport;
uniform float opacity;

varying vec4 fragColor;

const float MAX_LINES = 256.;

void main() {
	float depth = (MAX_LINES - 4. - id) / (MAX_LINES);

	vec2 position = position * scale + translate
       + positionFract * scale + translateFract
       + position * scaleFract
       + positionFract * scaleFract;

	gl_Position = vec4(position * 2.0 - 1.0, depth, 1);

	fragColor = color / 255.;
	fragColor.a *= opacity;
}
`, frag: `
precision highp float;
varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`, uniforms: { scale: S.prop("scale"), color: S.prop("fill"), scaleFract: S.prop("scaleFract"), translateFract: S.prop("translateFract"), translate: S.prop("translate"), opacity: S.prop("opacity"), pixelRatio: S.context("pixelRatio"), id: S.prop("id"), viewport: function(E, P) {
            return [P.viewport.x, P.viewport.y, E.viewportWidth, E.viewportHeight];
          } }, attributes: { position: { buffer: S.prop("positionBuffer"), stride: 8, offset: 8 }, positionFract: { buffer: S.prop("positionFractBuffer"), stride: 8, offset: 8 } }, blend: D.blend, depth: { enable: !1 }, scissor: D.scissor, stencil: D.stencil, viewport: D.viewport }), rect: L, miter: A };
        }, k.defaults = { dashes: null, join: "miter", miterLimit: 1, thickness: 10, cap: "square", color: "black", opacity: 1, overlay: !1, viewport: null, range: null, close: !1, fill: null }, k.prototype.render = function() {
          for (var S, A = [], C = arguments.length; C--; ) A[C] = arguments[C];
          A.length && (S = this).update.apply(S, A), this.draw();
        }, k.prototype.draw = function() {
          for (var S = this, A = [], C = arguments.length; C--; ) A[C] = arguments[C];
          return (A.length ? A : this.passes).forEach(function(D, L) {
            var E;
            if (D && Array.isArray(D)) return (E = S).draw.apply(E, D);
            typeof D == "number" && (D = S.passes[D]), D && D.count > 1 && D.opacity && (S.regl._refresh(), D.fill && D.triangles && D.triangles.length > 2 && S.shaders.fill(D), D.thickness && (D.scale[0] * D.viewport.width > k.precisionThreshold || D.scale[1] * D.viewport.height > k.precisionThreshold || D.join === "rect" || !D.join && (D.thickness <= 2 || D.count >= k.maxPoints) ? S.shaders.rect(D) : S.shaders.miter(D)));
          }), this;
        }, k.prototype.update = function(S) {
          var A = this;
          if (S) {
            S.length != null ? typeof S[0] == "number" && (S = [{ positions: S }]) : Array.isArray(S) || (S = [S]);
            var C = this.regl, D = this.gl;
            if (S.forEach(function(M, O) {
              var T = A.passes[O];
              if (M !== void 0) if (M !== null) {
                if (typeof M[0] == "number" && (M = { positions: M }), M = h(M, { positions: "positions points data coords", thickness: "thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth", join: "lineJoin linejoin join type mode", miterLimit: "miterlimit miterLimit", dashes: "dash dashes dasharray dash-array dashArray", color: "color colour stroke colors colours stroke-color strokeColor", fill: "fill fill-color fillColor", opacity: "alpha opacity", overlay: "overlay crease overlap intersect", close: "closed close closed-path closePath", range: "range dataBox", viewport: "viewport viewBox", hole: "holes hole hollow", splitNull: "splitNull" }), T || (A.passes[O] = T = { id: O, scale: null, scaleFract: null, translate: null, translateFract: null, count: 0, hole: [], depth: 0, dashLength: 1, dashTexture: C.texture({ channels: 1, data: new Uint8Array([255]), width: 1, height: 1, mag: "linear", min: "linear" }), colorBuffer: C.buffer({ usage: "dynamic", type: "uint8", data: new Uint8Array() }), positionBuffer: C.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }), positionFractBuffer: C.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }) }, M = i({}, k.defaults, M)), M.thickness != null && (T.thickness = parseFloat(M.thickness)), M.opacity != null && (T.opacity = parseFloat(M.opacity)), M.miterLimit != null && (T.miterLimit = parseFloat(M.miterLimit)), M.overlay != null && (T.overlay = !!M.overlay, O < k.maxLines && (T.depth = 2 * (k.maxLines - 1 - O % k.maxLines) / k.maxLines - 1)), M.join != null && (T.join = M.join), M.hole != null && (T.hole = M.hole), M.fill != null && (T.fill = M.fill ? l(M.fill, "uint8") : null), M.viewport != null && (T.viewport = x(M.viewport)), T.viewport || (T.viewport = x([D.drawingBufferWidth, D.drawingBufferHeight])), M.close != null && (T.close = M.close), M.positions === null && (M.positions = []), M.positions) {
                  var z, F;
                  if (M.positions.x && M.positions.y) {
                    var U = M.positions.x, V = M.positions.y;
                    F = T.count = Math.max(U.length, V.length), z = new Float64Array(2 * F);
                    for (var $ = 0; $ < F; $++) z[2 * $] = U[$], z[2 * $ + 1] = V[$];
                  } else z = p(M.positions, "float64"), F = T.count = Math.floor(z.length / 2);
                  var q = T.bounds = u(z, 2);
                  if (T.fill) {
                    for (var K = [], re = {}, Y = 0, te = 0, ee = 0, X = T.count; te < X; te++) {
                      var Q = z[2 * te], ue = z[2 * te + 1];
                      isNaN(Q) || isNaN(ue) || Q == null || ue == null ? (Q = z[2 * Y], ue = z[2 * Y + 1], re[te] = Y) : Y = te, K[ee++] = Q, K[ee++] = ue;
                    }
                    if (M.splitNull) {
                      T.count - 1 in re || (re[T.count] = T.count - 1);
                      var ce = Object.keys(re).map(Number).sort(function(Gt, Wt) {
                        return Gt - Wt;
                      }), he = [], de = 0, ne = T.hole != null ? T.hole[0] : null;
                      if (ne != null) {
                        var ae = w(ce, function(Gt) {
                          return Gt >= ne;
                        });
                        (ce = ce.slice(0, ae)).push(ne);
                      }
                      for (var se = function(Gt) {
                        var Wt = K.slice(2 * de, 2 * ce[Gt]).concat(ne ? K.slice(2 * ne) : []), mt = (T.hole || []).map(function(vt) {
                          return vt - ne + (ce[Gt] - de);
                        }), at = _(Wt, mt);
                        at = at.map(function(vt) {
                          return vt + de + (vt + de < ce[Gt] ? 0 : ne - ce[Gt]);
                        }), he.push.apply(he, at), de = ce[Gt] + 1;
                      }, me = 0; me < ce.length; me++) se(me);
                      for (var ye = 0, pe = he.length; ye < pe; ye++) re[he[ye]] != null && (he[ye] = re[he[ye]]);
                      T.triangles = he;
                    } else {
                      for (var be = _(K, T.hole || []), Ae = 0, Se = be.length; Ae < Se; Ae++) re[be[Ae]] != null && (be[Ae] = re[be[Ae]]);
                      T.triangles = be;
                    }
                  }
                  var Me = new Float64Array(z);
                  d(Me, 2, q);
                  var De = new Float64Array(2 * F + 6);
                  T.close ? z[0] === z[2 * F - 2] && z[1] === z[2 * F - 1] ? (De[0] = Me[2 * F - 4], De[1] = Me[2 * F - 3]) : (De[0] = Me[2 * F - 2], De[1] = Me[2 * F - 1]) : (De[0] = Me[0], De[1] = Me[1]), De.set(Me, 2), T.close ? z[0] === z[2 * F - 2] && z[1] === z[2 * F - 1] ? (De[2 * F + 2] = Me[2], De[2 * F + 3] = Me[3], T.count -= 1) : (De[2 * F + 2] = Me[0], De[2 * F + 3] = Me[1], De[2 * F + 4] = Me[2], De[2 * F + 5] = Me[3]) : (De[2 * F + 2] = Me[2 * F - 2], De[2 * F + 3] = Me[2 * F - 1], De[2 * F + 4] = Me[2 * F - 2], De[2 * F + 5] = Me[2 * F - 1]);
                  var Le = c(De);
                  T.positionBuffer(Le);
                  var We = g(De, Le);
                  T.positionFractBuffer(We);
                }
                if (M.range ? T.range = M.range : T.range || (T.range = T.bounds), (M.range || M.positions) && T.count) {
                  var Ee = T.bounds, Ne = Ee[2] - Ee[0], Ie = Ee[3] - Ee[1], ge = T.range[2] - T.range[0], Ce = T.range[3] - T.range[1];
                  T.scale = [Ne / ge, Ie / Ce], T.translate = [-T.range[0] / ge + Ee[0] / ge || 0, -T.range[1] / Ce + Ee[1] / Ce || 0], T.scaleFract = g(T.scale), T.translateFract = g(T.translate);
                }
                if (M.dashes) {
                  var we, Ge = 0;
                  if (!M.dashes || M.dashes.length < 2) Ge = 1, we = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]);
                  else {
                    Ge = 0;
                    for (var Re = 0; Re < M.dashes.length; ++Re) Ge += M.dashes[Re];
                    we = new Uint8Array(Ge * k.dashMult);
                    for (var je = 0, Ke = 255, tt = 0; tt < 2; tt++) for (var _e = 0; _e < M.dashes.length; ++_e) {
                      for (var Be = 0, $e = M.dashes[_e] * k.dashMult * 0.5; Be < $e; ++Be) we[je++] = Ke;
                      Ke ^= 255;
                    }
                  }
                  T.dashLength = Ge, T.dashTexture({ channels: 1, data: we, width: we.length, height: 1, mag: "linear", min: "linear" }, 0, 0);
                }
                if (M.color) {
                  var Ze = T.count, ct = M.color;
                  ct || (ct = "transparent");
                  var ft = new Uint8Array(4 * Ze + 4);
                  if (Array.isArray(ct) && typeof ct[0] != "number") {
                    for (var _t = 0; _t < Ze; _t++) {
                      var Pt = l(ct[_t], "uint8");
                      ft.set(Pt, 4 * _t);
                    }
                    ft.set(l(ct[0], "uint8"), 4 * Ze);
                  } else for (var Dt = l(ct, "uint8"), $t = 0; $t < Ze + 1; $t++) ft.set(Dt, 4 * $t);
                  T.colorBuffer({ usage: "dynamic", type: "uint8", data: ft });
                }
              } else A.passes[O] = null;
            }), S.length < this.passes.length) {
              for (var L = S.length; L < this.passes.length; L++) {
                var E = this.passes[L];
                E && (E.colorBuffer.destroy(), E.positionBuffer.destroy(), E.dashTexture.destroy());
              }
              this.passes.length = S.length;
            }
            for (var P = [], I = 0; I < this.passes.length; I++) this.passes[I] !== null && P.push(this.passes[I]);
            return this.passes = P, this;
          }
        }, k.prototype.destroy = function() {
          return this.passes.forEach(function(S) {
            S.colorBuffer.destroy(), S.positionBuffer.destroy(), S.dashTexture.destroy();
          }), this.passes.length = 0, this;
        };
      }, 62172: function(o, s, n) {
        function l(L, E) {
          return function(P) {
            if (Array.isArray(P)) return P;
          }(L) || function(P, I) {
            var M = P == null ? null : typeof Symbol < "u" && P[Symbol.iterator] || P["@@iterator"];
            if (M != null) {
              var O, T, z, F, U = [], V = !0, $ = !1;
              try {
                if (z = (M = M.call(P)).next, I !== 0) for (; !(V = (O = z.call(M)).done) && (U.push(O.value), U.length !== I); V = !0) ;
              } catch (q) {
                $ = !0, T = q;
              } finally {
                try {
                  if (!V && M.return != null && (F = M.return(), Object(F) !== F)) return;
                } finally {
                  if ($) throw T;
                }
              }
              return U;
            }
          }(L, E) || u(L, E) || function() {
            throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
          }();
        }
        function u(L, E) {
          if (L) {
            if (typeof L == "string") return i(L, E);
            var P = Object.prototype.toString.call(L).slice(8, -1);
            return P === "Object" && L.constructor && (P = L.constructor.name), P === "Map" || P === "Set" ? Array.from(L) : P === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P) ? i(L, E) : void 0;
          }
        }
        function i(L, E) {
          (E == null || E > L.length) && (E = L.length);
          for (var P = 0, I = new Array(E); P < E; P++) I[P] = L[P];
          return I;
        }
        var h = n(162), p = n(78112), _ = n(46762), d = n(27549), f = n(27976), c = n(76765), g = n(6807), m = n(79788), x = n(83473), w = n(39488), k = n(51498), S = n(5137), A = C;
        function C(L, E) {
          var P = this;
          if (!(this instanceof C)) return new C(L, E);
          typeof L == "function" ? (E || (E = {}), E.regl = L) : (E = L, L = null), E && E.length && (E.positions = E);
          var I, M = (L = E.regl)._gl, O = [];
          this.tooManyColors = w, I = L.texture({ data: new Uint8Array(1020), width: 255, height: 1, type: "uint8", format: "rgba", wrapS: "clamp", wrapT: "clamp", mag: "nearest", min: "nearest" }), f(this, { regl: L, gl: M, groups: [], markerCache: [null], markerTextures: [null], palette: O, paletteIds: {}, paletteTexture: I, maxColors: 255, maxSize: 100, canvas: M.canvas }), this.update(E);
          var T = { uniforms: { constPointSize: !!E.constPointSize, opacity: L.prop("opacity"), paletteSize: function(U, V) {
            return [P.tooManyColors ? 0 : 255, I.height];
          }, pixelRatio: L.context("pixelRatio"), scale: L.prop("scale"), scaleFract: L.prop("scaleFract"), translate: L.prop("translate"), translateFract: L.prop("translateFract"), markerTexture: L.prop("markerTexture"), paletteTexture: I }, attributes: { x: function(U, V) {
            return V.xAttr || { buffer: V.positionBuffer, stride: 8, offset: 0 };
          }, y: function(U, V) {
            return V.yAttr || { buffer: V.positionBuffer, stride: 8, offset: 4 };
          }, xFract: function(U, V) {
            return V.xAttr ? { constant: [0, 0] } : { buffer: V.positionFractBuffer, stride: 8, offset: 0 };
          }, yFract: function(U, V) {
            return V.yAttr ? { constant: [0, 0] } : { buffer: V.positionFractBuffer, stride: 8, offset: 4 };
          }, size: function(U, V) {
            return V.size.length ? { buffer: V.sizeBuffer, stride: 2, offset: 0 } : { constant: [Math.round(255 * V.size / P.maxSize)] };
          }, borderSize: function(U, V) {
            return V.borderSize.length ? { buffer: V.sizeBuffer, stride: 2, offset: 1 } : { constant: [Math.round(255 * V.borderSize / P.maxSize)] };
          }, colorId: function(U, V) {
            return V.color.length ? { buffer: V.colorBuffer, stride: P.tooManyColors ? 8 : 4, offset: 0 } : { constant: P.tooManyColors ? O.slice(4 * V.color, 4 * V.color + 4) : [V.color] };
          }, borderColorId: function(U, V) {
            return V.borderColor.length ? { buffer: V.colorBuffer, stride: P.tooManyColors ? 8 : 4, offset: P.tooManyColors ? 4 : 2 } : { constant: P.tooManyColors ? O.slice(4 * V.borderColor, 4 * V.borderColor + 4) : [V.borderColor] };
          }, isActive: function(U, V) {
            return V.activation === !0 ? { constant: [1] } : V.activation ? V.activation : { constant: [0] };
          } }, blend: { enable: !0, color: [0, 0, 0, 1], func: { srcRGB: "src alpha", dstRGB: "one minus src alpha", srcAlpha: "one minus dst alpha", dstAlpha: "one" } }, scissor: { enable: !0, box: L.prop("viewport") }, viewport: L.prop("viewport"), stencil: { enable: !1 }, depth: { enable: !1 }, elements: L.prop("elements"), count: L.prop("count"), offset: L.prop("offset"), primitive: "points" }, z = f({}, T);
          z.frag = c([`precision highp float;
#define GLSLIFY 1

uniform float opacity;
uniform sampler2D markerTexture;

varying vec4 fragColor, fragBorderColor;
varying float fragWidth, fragBorderColorLevel, fragColorLevel;

float smoothStep(float x, float y) {
  return 1.0 / (1.0 + exp(50.0*(x - y)));
}

void main() {
  float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth;

  // max-distance alpha
  if (dist < 0.003) discard;

  // null-border case
  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {
    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);
    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);
  }
  else {
    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);
    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);

    vec4 color = fragBorderColor;
    color.a *= borderColorAmt;
    color = mix(color, fragColor, colorAmt);
    color.a *= opacity;

    gl_FragColor = color;
  }

}
`]), z.vert = c([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;

const float maxSize = 100.;
const float borderLevel = .5;

varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = 2. * size * pointSizeScale;
  fragPointSize = size * pixelRatio;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragColor = color;
  fragBorderColor = borderColor;
  fragWidth = 1. / gl_PointSize;

  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}
`]), this.drawMarker = L(z);
          var F = f({}, T);
          F.frag = c([`precision highp float;
#define GLSLIFY 1

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

uniform float opacity;

float smoothStep(float edge0, float edge1, float x) {
	float t;
	t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
	return t * t * (3.0 - 2.0 * t);
}

void main() {
	float radius, alpha = 1.0, delta = fragWidth;

	radius = length(2.0 * gl_PointCoord.xy - 1.0);

	if (radius > 1.0 + delta) {
		discard;
	}

	alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);

	float borderRadius = fragBorderRadius;
	float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);
	vec4 color = mix(fragColor, fragBorderColor, ratio);
	color.a *= alpha * opacity;
	gl_FragColor = color;
}
`]), F.vert = c([`precision highp float;
#define GLSLIFY 1

attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;

// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;

uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;

const float maxSize = 100.;

varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;

float pointSizeScale = (constPointSize) ? 2. : pixelRatio;

bool isDirect = (paletteSize.x < 1.);

vec4 getColor(vec4 id) {
  return isDirect ? id / 255. : texture2D(paletteTexture,
    vec2(
      (id.x + .5) / paletteSize.x,
      (id.y + .5) / paletteSize.y
    )
  );
}

void main() {
  // ignore inactive points
  if (isActive == 0.) return;

  vec2 position = vec2(x, y);
  vec2 positionFract = vec2(xFract, yFract);

  vec4 color = getColor(colorId);
  vec4 borderColor = getColor(borderColorId);

  float size = size * maxSize / 255.;
  float borderSize = borderSize * maxSize / 255.;

  gl_PointSize = (size + borderSize) * pointSizeScale;

  vec2 pos = (position + translate) * scale
      + (positionFract + translateFract) * scale
      + (position + translate) * scaleFract
      + (positionFract + translateFract) * scaleFract;

  gl_Position = vec4(pos * 2. - 1., 0., 1.);

  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
  fragColor = color;
  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
  fragWidth = 1. / gl_PointSize;
}
`]), w && (F.frag = F.frag.replace("smoothstep", "smoothStep"), z.frag = z.frag.replace("smoothstep", "smoothStep")), this.drawCircle = L(F);
        }
        C.defaults = { color: "black", borderColor: "transparent", borderSize: 0, size: 12, opacity: 1, marker: void 0, viewport: null, range: null, pixelSize: null, count: 0, offset: 0, bounds: null, positions: [], snap: 1e4 }, C.prototype.render = function() {
          return arguments.length && this.update.apply(this, arguments), this.draw(), this;
        }, C.prototype.draw = function() {
          for (var L = this, E = arguments.length, P = new Array(E), I = 0; I < E; I++) P[I] = arguments[I];
          var M = this.groups;
          if (P.length === 1 && Array.isArray(P[0]) && (P[0][0] === null || Array.isArray(P[0][0])) && (P = P[0]), this.regl._refresh(), P.length) for (var O = 0; O < P.length; O++) this.drawItem(O, P[O]);
          else M.forEach(function(T, z) {
            L.drawItem(z);
          });
          return this;
        }, C.prototype.drawItem = function(L, E) {
          var P, I = this.groups, M = I[L];
          if (typeof E == "number" && (L = E, M = I[E], E = null), M && M.count && M.opacity) {
            M.activation[0] && this.drawCircle(this.getMarkerDrawOptions(0, M, E));
            for (var O = [], T = 1; T < M.activation.length; T++) M.activation[T] && (M.activation[T] === !0 || M.activation[T].data.length) && O.push.apply(O, function(z) {
              if (Array.isArray(z)) return i(z);
            }(P = this.getMarkerDrawOptions(T, M, E)) || function(z) {
              if (typeof Symbol < "u" && z[Symbol.iterator] != null || z["@@iterator"] != null) return Array.from(z);
            }(P) || u(P) || function() {
              throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
            }());
            O.length && this.drawMarker(O);
          }
        }, C.prototype.getMarkerDrawOptions = function(L, E, P) {
          var I = E.range, M = E.tree, O = E.viewport, T = E.activation, z = E.selectionBuffer, F = E.count;
          if (this.regl, !M) return P ? [f({}, E, { markerTexture: this.markerTextures[L], activation: T[L], count: P.length, elements: P, offset: 0 })] : [f({}, E, { markerTexture: this.markerTextures[L], activation: T[L], offset: 0 })];
          var U = [], V = M.range(I, { lod: !0, px: [(I[2] - I[0]) / O.width, (I[3] - I[1]) / O.height] });
          if (P) {
            for (var $ = T[L].data, q = new Uint8Array(F), K = 0; K < P.length; K++) {
              var re = P[K];
              q[re] = $ ? $[re] : 1;
            }
            z.subdata(q);
          }
          for (var Y = V.length; Y--; ) {
            var te = l(V[Y], 2), ee = te[0], X = te[1];
            U.push(f({}, E, { markerTexture: this.markerTextures[L], activation: P ? z : T[L], offset: ee, count: X - ee }));
          }
          return U;
        }, C.prototype.update = function() {
          for (var L = this, E = arguments.length, P = new Array(E), I = 0; I < E; I++) P[I] = arguments[I];
          if (P.length) {
            P.length === 1 && Array.isArray(P[0]) && (P = P[0]);
            var M = this.groups, O = this.gl, T = this.regl, z = this.maxSize, F = this.maxColors, U = this.palette;
            this.groups = M = P.map(function(V, $) {
              var q = M[$];
              if (V === void 0) return q;
              V === null ? V = { positions: null } : typeof V == "function" ? V = { ondraw: V } : typeof V[0] == "number" && (V = { positions: V }), (V = g(V, { positions: "positions data points", snap: "snap cluster lod tree", size: "sizes size radius", borderSize: "borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline", color: "colors color fill fill-color fillColor", borderColor: "borderColors borderColor stroke stroke-color strokeColor", marker: "markers marker shape", range: "range dataBox databox", viewport: "viewport viewPort viewBox viewbox", opacity: "opacity alpha transparency", bounds: "bound bounds boundaries limits", tooManyColors: "tooManyColors palette paletteMode optimizePalette enablePalette" })).positions === null && (V.positions = []), V.tooManyColors != null && (L.tooManyColors = V.tooManyColors), q || (M[$] = q = { id: $, scale: null, translate: null, scaleFract: null, translateFract: null, activation: [], selectionBuffer: T.buffer({ data: new Uint8Array(0), usage: "stream", type: "uint8" }), sizeBuffer: T.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "uint8" }), colorBuffer: T.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "uint8" }), positionBuffer: T.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "float" }), positionFractBuffer: T.buffer({ data: new Uint8Array(0), usage: "dynamic", type: "float" }) }, V = f({}, C.defaults, V)), V.positions && !("marker" in V) && (V.marker = q.marker, delete q.marker), V.marker && !("positions" in V) && (V.positions = q.positions, delete q.positions);
              var K = 0, re = 0;
              if (m(q, V, [{ snap: !0, size: function(Se, Me) {
                return Se == null && (Se = C.defaults.size), K += Se && Se.length ? 1 : 0, Se;
              }, borderSize: function(Se, Me) {
                return Se == null && (Se = C.defaults.borderSize), K += Se && Se.length ? 1 : 0, Se;
              }, opacity: parseFloat, color: function(Se, Me) {
                return Se == null && (Se = C.defaults.color), Se = L.updateColor(Se), re++, Se;
              }, borderColor: function(Se, Me) {
                return Se == null && (Se = C.defaults.borderColor), Se = L.updateColor(Se), re++, Se;
              }, bounds: function(Se, Me, De) {
                return "range" in De || (De.range = null), Se;
              }, positions: function(Se, Me, De) {
                var Le = Me.snap, We = Me.positionBuffer, Ee = Me.positionFractBuffer, Ne = Me.selectionBuffer;
                if (Se.x || Se.y) return Se.x.length ? Me.xAttr = { buffer: T.buffer(Se.x), offset: 0, stride: 4, count: Se.x.length } : Me.xAttr = { buffer: Se.x.buffer, offset: 4 * Se.x.offset || 0, stride: 4 * (Se.x.stride || 1), count: Se.x.count }, Se.y.length ? Me.yAttr = { buffer: T.buffer(Se.y), offset: 0, stride: 4, count: Se.y.length } : Me.yAttr = { buffer: Se.y.buffer, offset: 4 * Se.y.offset || 0, stride: 4 * (Se.y.stride || 1), count: Se.y.count }, Me.count = Math.max(Me.xAttr.count, Me.yAttr.count), Se;
                Se = x(Se, "float64");
                var Ie = Me.count = Math.floor(Se.length / 2), ge = Me.bounds = Ie ? p(Se, 2) : null;
                if (De.range || Me.range || (delete Me.range, De.range = ge), De.marker || Me.marker || (delete Me.marker, De.marker = null), Le && (Le === !0 || Ie > Le) ? Me.tree = d(Se, { bounds: ge }) : Le && Le.length && (Me.tree = Le), Me.tree) {
                  var Ce = { primitive: "points", usage: "static", data: Me.tree, type: "uint32" };
                  Me.elements ? Me.elements(Ce) : Me.elements = T.elements(Ce);
                }
                var we = k.float32(Se);
                return We({ data: we, usage: "dynamic" }), Ee({ data: k.fract32(Se, we), usage: "dynamic" }), Ne({ data: new Uint8Array(Ie), type: "uint8", usage: "stream" }), Se;
              } }, { marker: function(Se, Me, De) {
                var Le = Me.activation;
                if (Le.forEach(function(we) {
                  return we && we.destroy && we.destroy();
                }), Le.length = 0, Se && typeof Se[0] != "number") {
                  for (var We = [], Ee = 0, Ne = Math.min(Se.length, Me.count); Ee < Ne; Ee++) {
                    var Ie = L.addMarker(Se[Ee]);
                    We[Ie] || (We[Ie] = new Uint8Array(Me.count)), We[Ie][Ee] = 1;
                  }
                  for (var ge = 0; ge < We.length; ge++) if (We[ge]) {
                    var Ce = { data: We[ge], type: "uint8", usage: "static" };
                    Le[ge] ? Le[ge](Ce) : Le[ge] = T.buffer(Ce), Le[ge].data = We[ge];
                  }
                } else Le[L.addMarker(Se)] = !0;
                return Se;
              }, range: function(Se, Me, De) {
                var Le = Me.bounds;
                if (Le) return Se || (Se = Le), Me.scale = [1 / (Se[2] - Se[0]), 1 / (Se[3] - Se[1])], Me.translate = [-Se[0], -Se[1]], Me.scaleFract = k.fract(Me.scale), Me.translateFract = k.fract(Me.translate), Se;
              }, viewport: function(Se) {
                return S(Se || [O.drawingBufferWidth, O.drawingBufferHeight]);
              } }]), K) {
                var Y = q, te = Y.count, ee = Y.size, X = Y.borderSize, Q = Y.sizeBuffer, ue = new Uint8Array(2 * te);
                if (ee.length || X.length) for (var ce = 0; ce < te; ce++) ue[2 * ce] = Math.round(255 * (ee[ce] == null ? ee : ee[ce]) / z), ue[2 * ce + 1] = Math.round(255 * (X[ce] == null ? X : X[ce]) / z);
                Q({ data: ue, usage: "dynamic" });
              }
              if (re) {
                var he, de = q, ne = de.count, ae = de.color, se = de.borderColor, me = de.colorBuffer;
                if (L.tooManyColors) {
                  if (ae.length || se.length) {
                    he = new Uint8Array(8 * ne);
                    for (var ye = 0; ye < ne; ye++) {
                      var pe = ae[ye];
                      he[8 * ye] = U[4 * pe], he[8 * ye + 1] = U[4 * pe + 1], he[8 * ye + 2] = U[4 * pe + 2], he[8 * ye + 3] = U[4 * pe + 3];
                      var be = se[ye];
                      he[8 * ye + 4] = U[4 * be], he[8 * ye + 5] = U[4 * be + 1], he[8 * ye + 6] = U[4 * be + 2], he[8 * ye + 7] = U[4 * be + 3];
                    }
                  }
                } else if (ae.length || se.length) {
                  he = new Uint8Array(4 * ne + 2);
                  for (var Ae = 0; Ae < ne; Ae++) ae[Ae] != null && (he[4 * Ae] = ae[Ae] % F, he[4 * Ae + 1] = Math.floor(ae[Ae] / F)), se[Ae] != null && (he[4 * Ae + 2] = se[Ae] % F, he[4 * Ae + 3] = Math.floor(se[Ae] / F));
                }
                me({ data: he || new Uint8Array(0), type: "uint8", usage: "dynamic" });
              }
              return q;
            });
          }
        }, C.prototype.addMarker = function(L) {
          var E, P = this.markerTextures, I = this.regl, M = this.markerCache, O = L == null ? 0 : M.indexOf(L);
          if (O >= 0) return O;
          if (L instanceof Uint8Array || L instanceof Uint8ClampedArray) E = L;
          else {
            E = new Uint8Array(L.length);
            for (var T = 0, z = L.length; T < z; T++) E[T] = 255 * L[T];
          }
          var F = Math.floor(Math.sqrt(E.length));
          return O = P.length, M.push(L), P.push(I.texture({ channels: 1, data: E, radius: F, mag: "linear", min: "linear" })), O;
        }, C.prototype.updateColor = function(L) {
          var E = this.paletteIds, P = this.palette, I = this.maxColors;
          Array.isArray(L) || (L = [L]);
          var M = [];
          if (typeof L[0] == "number") {
            var O = [];
            if (Array.isArray(L)) for (var T = 0; T < L.length; T += 4) O.push(L.slice(T, T + 4));
            else for (var z = 0; z < L.length; z += 4) O.push(L.subarray(z, z + 4));
            L = O;
          }
          for (var F = 0; F < L.length; F++) {
            var U = L[F];
            U = h(U, "uint8");
            var V = _(U, !1);
            if (E[V] == null) {
              var $ = P.length;
              E[V] = Math.floor($ / 4), P[$] = U[0], P[$ + 1] = U[1], P[$ + 2] = U[2], P[$ + 3] = U[3];
            }
            M[F] = E[V];
          }
          return !this.tooManyColors && P.length > 4 * I && (this.tooManyColors = !0), this.updatePalette(P), M.length === 1 ? M[0] : M;
        }, C.prototype.updatePalette = function(L) {
          if (!this.tooManyColors) {
            var E = this.maxColors, P = this.paletteTexture, I = Math.ceil(0.25 * L.length / E);
            if (I > 1) for (var M = 0.25 * (L = L.slice()).length % E; M < I * E; M++) L.push(0, 0, 0, 0);
            P.height < I && P.resize(E, I), P.subimage({ width: Math.min(0.25 * L.length, E), height: I, data: L }, 0, 0);
          }
        }, C.prototype.destroy = function() {
          return this.groups.forEach(function(L) {
            L.sizeBuffer.destroy(), L.positionBuffer.destroy(), L.positionFractBuffer.destroy(), L.colorBuffer.destroy(), L.activation.forEach(function(E) {
              return E && E.destroy && E.destroy();
            }), L.selectionBuffer.destroy(), L.elements && L.elements.destroy();
          }), this.groups.length = 0, this.paletteTexture.destroy(), this.markerTextures.forEach(function(L) {
            return L && L.destroy && L.destroy();
          }), this;
        };
        var D = n(27976);
        o.exports = function(L, E) {
          var P = new A(L, E), I = P.render.bind(P);
          return D(I, { render: I, update: P.update.bind(P), draw: P.draw.bind(P), destroy: P.destroy.bind(P), regl: P.regl, gl: P.gl, canvas: P.gl.canvas, groups: P.groups, markers: P.markerCache, palette: P.palette }), I;
        };
      }, 31239: function(o, s, n) {
        var l = n(62172), u = n(6807), i = n(78112), h = n(16494), p = n(27902), _ = n(5137), d = n(83473);
        function f(x, w) {
          if (!(this instanceof f)) return new f(x);
          this.traces = [], this.passes = {}, this.regl = x, this.scatter = l(x), this.canvas = this.scatter.canvas;
        }
        function c(x, w, k) {
          return (x.id != null ? x.id : x) << 16 | (255 & w) << 8 | 255 & k;
        }
        function g(x, w, k) {
          var S, A, C, D, L = x[w], E = x[k];
          return L.length > 2 ? (L[0], L[2], S = L[1], A = L[3]) : L.length ? (S = L[0], A = L[1]) : (L.x, S = L.y, L.x, L.width, A = L.y + L.height), E.length > 2 ? (C = E[0], D = E[2], E[1], E[3]) : E.length ? (C = E[0], D = E[1]) : (C = E.x, E.y, D = E.x + E.width, E.y, E.height), [C, S, D, A];
        }
        function m(x) {
          if (typeof x == "number") return [x, x, x, x];
          if (x.length === 2) return [x[0], x[1], x[0], x[1]];
          var w = _(x);
          return [w.x, w.y, w.x + w.width, w.y + w.height];
        }
        o.exports = f, f.prototype.render = function() {
          for (var x, w = this, k = [], S = arguments.length; S--; ) k[S] = arguments[S];
          return k.length && (x = this).update.apply(x, k), this.regl.attributes.preserveDrawingBuffer ? this.draw() : (this.dirty ? this.planned == null && (this.planned = h(function() {
            w.draw(), w.dirty = !0, w.planned = null;
          })) : (this.draw(), this.dirty = !0, h(function() {
            w.dirty = !1;
          })), this);
        }, f.prototype.update = function() {
          for (var x, w = [], k = arguments.length; k--; ) w[k] = arguments[k];
          if (w.length) {
            for (var S = 0; S < w.length; S++) this.updateItem(S, w[S]);
            this.traces = this.traces.filter(Boolean);
            for (var A = [], C = 0, D = 0; D < this.traces.length; D++) {
              for (var L = this.traces[D], E = this.traces[D].passes, P = 0; P < E.length; P++) A.push(this.passes[E[P]]);
              L.passOffset = C, C += L.passes.length;
            }
            return (x = this.scatter).update.apply(x, A), this;
          }
        }, f.prototype.updateItem = function(x, w) {
          var k = this.regl;
          if (w === null) return this.traces[x] = null, this;
          if (!w) return this;
          var S, A = u(w, { data: "data items columns rows values dimensions samples x", snap: "snap cluster", size: "sizes size radius", color: "colors color fill fill-color fillColor", opacity: "opacity alpha transparency opaque", borderSize: "borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline", borderColor: "borderColors borderColor bordercolor stroke stroke-color strokeColor", marker: "markers marker shape", range: "range ranges databox dataBox", viewport: "viewport viewBox viewbox", domain: "domain domains area areas", padding: "pad padding paddings pads margin margins", transpose: "transpose transposed", diagonal: "diagonal diag showDiagonal", upper: "upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf", lower: "lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower" }), C = this.traces[x] || (this.traces[x] = { id: x, buffer: k.buffer({ usage: "dynamic", type: "float", data: new Uint8Array() }), color: "black", marker: null, size: 12, borderColor: "transparent", borderSize: 1, viewport: _([k._gl.drawingBufferWidth, k._gl.drawingBufferHeight]), padding: [0, 0, 0, 0], opacity: 1, diagonal: !0, upper: !0, lower: !0 });
          if (A.color != null && (C.color = A.color), A.size != null && (C.size = A.size), A.marker != null && (C.marker = A.marker), A.borderColor != null && (C.borderColor = A.borderColor), A.borderSize != null && (C.borderSize = A.borderSize), A.opacity != null && (C.opacity = A.opacity), A.viewport && (C.viewport = _(A.viewport)), A.diagonal != null && (C.diagonal = A.diagonal), A.upper != null && (C.upper = A.upper), A.lower != null && (C.lower = A.lower), A.data) {
            C.buffer(d(A.data)), C.columns = A.data.length, C.count = A.data[0].length, C.bounds = [];
            for (var D = 0; D < C.columns; D++) C.bounds[D] = i(A.data[D], 1);
          }
          A.range && (C.range = A.range, S = C.range && typeof C.range[0] != "number"), A.domain && (C.domain = A.domain);
          var L = !1;
          A.padding != null && (Array.isArray(A.padding) && A.padding.length === C.columns && typeof A.padding[A.padding.length - 1] == "number" ? (C.padding = A.padding.map(m), L = !0) : C.padding = m(A.padding));
          var E = C.columns, P = C.count, I = C.viewport.width, M = C.viewport.height, O = C.viewport.x, T = C.viewport.y, z = I / E, F = M / E;
          C.passes = [];
          for (var U = 0; U < E; U++) for (var V = 0; V < E; V++) if ((C.diagonal || V !== U) && (C.upper || !(U > V)) && (C.lower || !(U < V))) {
            var $ = c(C.id, U, V), q = this.passes[$] || (this.passes[$] = {});
            if (A.data && (A.transpose ? q.positions = { x: { buffer: C.buffer, offset: V, count: P, stride: E }, y: { buffer: C.buffer, offset: U, count: P, stride: E } } : q.positions = { x: { buffer: C.buffer, offset: V * P, count: P }, y: { buffer: C.buffer, offset: U * P, count: P } }, q.bounds = g(C.bounds, U, V)), A.domain || A.viewport || A.data) {
              var K = L ? g(C.padding, U, V) : C.padding;
              if (C.domain) {
                var re = g(C.domain, U, V), Y = re[0], te = re[1], ee = re[2], X = re[3];
                q.viewport = [O + Y * I + K[0], T + te * M + K[1], O + ee * I - K[2], T + X * M - K[3]];
              } else q.viewport = [O + V * z + z * K[0], T + U * F + F * K[1], O + (V + 1) * z - z * K[2], T + (U + 1) * F - F * K[3]];
            }
            A.color && (q.color = C.color), A.size && (q.size = C.size), A.marker && (q.marker = C.marker), A.borderSize && (q.borderSize = C.borderSize), A.borderColor && (q.borderColor = C.borderColor), A.opacity && (q.opacity = C.opacity), A.range && (q.range = S ? g(C.range, U, V) : C.range || q.bounds), C.passes.push($);
          }
          return this;
        }, f.prototype.draw = function() {
          for (var x, w = [], k = arguments.length; k--; ) w[k] = arguments[k];
          if (w.length) {
            for (var S = [], A = 0; A < w.length; A++) if (typeof w[A] == "number") {
              var C = this.traces[w[A]], D = C.passes, L = C.passOffset;
              S.push.apply(S, p(L, L + D.length));
            } else if (w[A].length) {
              var E = w[A], P = this.traces[A], I = P.passes, M = P.passOffset;
              I = I.map(function(O, T) {
                S[M + T] = E;
              });
            }
            (x = this.scatter).draw.apply(x, S);
          } else this.scatter.draw();
          return this;
        }, f.prototype.destroy = function() {
          return this.traces.forEach(function(x) {
            x.buffer && x.buffer.destroy && x.buffer.destroy();
          }), this.traces = null, this.passes = null, this.scatter.destroy(), this;
        };
      }, 81330: function(o) {
        o.exports = function() {
          function s(Fe, pt) {
            this.id = se++, this.type = Fe, this.data = pt;
          }
          function n(Fe) {
            if (Fe.length === 0) return [];
            var pt = Fe.charAt(0), Mt = Fe.charAt(Fe.length - 1);
            if (1 < Fe.length && pt === Mt && (pt === '"' || pt === "'")) return ['"' + Fe.substr(1, Fe.length - 2).replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'];
            if (pt = /\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Fe)) return n(Fe.substr(0, pt.index)).concat(n(pt[1])).concat(n(Fe.substr(pt.index + pt[0].length)));
            if ((pt = Fe.split(".")).length === 1) return ['"' + Fe.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'];
            for (Fe = [], Mt = 0; Mt < pt.length; ++Mt) Fe = Fe.concat(n(pt[Mt]));
            return Fe;
          }
          function l(Fe) {
            return "[" + n(Fe).join("][") + "]";
          }
          function u(Fe) {
            return typeof Fe == "string" ? Fe.split() : Fe;
          }
          function i(Fe) {
            return typeof Fe == "string" ? document.querySelector(Fe) : Fe;
          }
          function h(Fe) {
            var pt, Mt, At, Rt, Ft = Fe || {};
            Fe = {};
            var lt = [], st = [], Ot = typeof window > "u" ? 1 : window.devicePixelRatio, kt = !1, Bt = {}, xt = function(qt) {
            }, Jt = function() {
            };
            if (typeof Ft == "string" ? pt = document.querySelector(Ft) : typeof Ft == "object" && (typeof Ft.nodeName == "string" && typeof Ft.appendChild == "function" && typeof Ft.getBoundingClientRect == "function" ? pt = Ft : typeof Ft.drawArrays == "function" || typeof Ft.drawElements == "function" ? At = (Rt = Ft).canvas : ("gl" in Ft ? Rt = Ft.gl : "canvas" in Ft ? At = i(Ft.canvas) : "container" in Ft && (Mt = i(Ft.container)), "attributes" in Ft && (Fe = Ft.attributes), "extensions" in Ft && (lt = u(Ft.extensions)), "optionalExtensions" in Ft && (st = u(Ft.optionalExtensions)), "onDone" in Ft && (xt = Ft.onDone), "profile" in Ft && (kt = !!Ft.profile), "pixelRatio" in Ft && (Ot = +Ft.pixelRatio), "cachedCode" in Ft && (Bt = Ft.cachedCode))), pt && (pt.nodeName.toLowerCase() === "canvas" ? At = pt : Mt = pt), !Rt) {
              if (!At) {
                if (!(pt = function(qt, en, Yt) {
                  function Ht() {
                    var In = window.innerWidth, zn = window.innerHeight;
                    qt !== document.body && (In = (zn = fn.getBoundingClientRect()).right - zn.left, zn = zn.bottom - zn.top), fn.width = Yt * In, fn.height = Yt * zn;
                  }
                  var sn, fn = document.createElement("canvas");
                  return ae(fn.style, { border: 0, margin: 0, padding: 0, top: 0, left: 0, width: "100%", height: "100%" }), qt.appendChild(fn), qt === document.body && (fn.style.position = "absolute", ae(qt.style, { margin: 0, padding: 0 })), qt !== document.body && typeof ResizeObserver == "function" ? (sn = new ResizeObserver(function() {
                    setTimeout(Ht);
                  })).observe(qt) : window.addEventListener("resize", Ht, !1), Ht(), { canvas: fn, onDestroy: function() {
                    sn ? sn.disconnect() : window.removeEventListener("resize", Ht), qt.removeChild(fn);
                  } };
                }(Mt || document.body, 0, Ot))) return null;
                At = pt.canvas, Jt = pt.onDestroy;
              }
              Fe.premultipliedAlpha === void 0 && (Fe.premultipliedAlpha = !0), Rt = function(qt, en) {
                function Yt(Ht) {
                  try {
                    return qt.getContext(Ht, en);
                  } catch {
                    return null;
                  }
                }
                return Yt("webgl") || Yt("experimental-webgl") || Yt("webgl-experimental");
              }(At, Fe);
            }
            return Rt ? { gl: Rt, canvas: At, container: Mt, extensions: lt, optionalExtensions: st, pixelRatio: Ot, profile: kt, cachedCode: Bt, onDone: xt, onDestroy: Jt } : (Jt(), xt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"), null);
          }
          function p(Fe, pt) {
            for (var Mt = Array(Fe), At = 0; At < Fe; ++At) Mt[At] = pt(At);
            return Mt;
          }
          function _(Fe) {
            var pt, Mt;
            return pt = (65535 < Fe) << 4, pt |= Mt = (255 < (Fe >>>= pt)) << 3, (pt |= Mt = (15 < (Fe >>>= Mt)) << 2) | (Mt = (3 < (Fe >>>= Mt)) << 1) | Fe >>> Mt >> 1;
          }
          function d() {
            function Fe(At) {
              e: {
                for (var Rt = 16; 268435456 >= Rt; Rt *= 16) if (At <= Rt) {
                  At = Rt;
                  break e;
                }
                At = 0;
              }
              return 0 < (Rt = Mt[_(At) >> 2]).length ? Rt.pop() : new ArrayBuffer(At);
            }
            function pt(At) {
              Mt[_(At.byteLength) >> 2].push(At);
            }
            var Mt = p(8, function() {
              return [];
            });
            return { alloc: Fe, free: pt, allocType: function(At, Rt) {
              var Ft = null;
              switch (At) {
                case 5120:
                  Ft = new Int8Array(Fe(Rt), 0, Rt);
                  break;
                case 5121:
                  Ft = new Uint8Array(Fe(Rt), 0, Rt);
                  break;
                case 5122:
                  Ft = new Int16Array(Fe(2 * Rt), 0, Rt);
                  break;
                case 5123:
                  Ft = new Uint16Array(Fe(2 * Rt), 0, Rt);
                  break;
                case 5124:
                  Ft = new Int32Array(Fe(4 * Rt), 0, Rt);
                  break;
                case 5125:
                  Ft = new Uint32Array(Fe(4 * Rt), 0, Rt);
                  break;
                case 5126:
                  Ft = new Float32Array(Fe(4 * Rt), 0, Rt);
                  break;
                default:
                  return null;
              }
              return Ft.length !== Rt ? Ft.subarray(0, Rt) : Ft;
            }, freeType: function(At) {
              pt(At.buffer);
            } };
          }
          function f(Fe) {
            return !!Fe && typeof Fe == "object" && Array.isArray(Fe.shape) && Array.isArray(Fe.stride) && typeof Fe.offset == "number" && Fe.shape.length === Fe.stride.length && (Array.isArray(Fe.data) || Se(Fe.data));
          }
          function c(Fe, pt, Mt, At, Rt, Ft) {
            for (var lt = 0; lt < pt; ++lt) for (var st = Fe[lt], Ot = 0; Ot < Mt; ++Ot) for (var kt = st[Ot], Bt = 0; Bt < At; ++Bt) Rt[Ft++] = kt[Bt];
          }
          function g(Fe, pt, Mt, At, Rt) {
            for (var Ft = 1, lt = Mt + 1; lt < pt.length; ++lt) Ft *= pt[lt];
            var st = pt[Mt];
            if (pt.length - Mt == 4) {
              var Ot = pt[Mt + 1], kt = pt[Mt + 2];
              for (pt = pt[Mt + 3], lt = 0; lt < st; ++lt) c(Fe[lt], Ot, kt, pt, At, Rt), Rt += Ft;
            } else for (lt = 0; lt < st; ++lt) g(Fe[lt], pt, Mt + 1, At, Rt), Rt += Ft;
          }
          function m(Fe) {
            return 0 | Le[Object.prototype.toString.call(Fe)];
          }
          function x(Fe, pt) {
            for (var Mt = 0; Mt < pt.length; ++Mt) Fe[Mt] = pt[Mt];
          }
          function w(Fe, pt, Mt, At, Rt, Ft, lt) {
            for (var st = 0, Ot = 0; Ot < Mt; ++Ot) for (var kt = 0; kt < At; ++kt) Fe[st++] = pt[Rt * Ot + Ft * kt + lt];
          }
          function k(Fe, pt, Mt, At) {
            function Rt(xt) {
              this.id = Ot++, this.buffer = Fe.createBuffer(), this.type = xt, this.usage = 35044, this.byteLength = 0, this.dimension = 1, this.dtype = 5121, this.persistentData = null, Mt.profile && (this.stats = { size: 0 });
            }
            function Ft(xt, Jt, qt) {
              xt.byteLength = Jt.byteLength, Fe.bufferData(xt.type, Jt, qt);
            }
            function lt(xt, Jt, qt, en, Yt, Ht) {
              if (xt.usage = qt, Array.isArray(Jt)) {
                if (xt.dtype = en || 5126, 0 < Jt.length) if (Array.isArray(Jt[0])) {
                  Yt = Ie(Jt);
                  for (var sn = en = 1; sn < Yt.length; ++sn) en *= Yt[sn];
                  xt.dimension = en, Ft(xt, Jt = Ne(Jt, Yt, xt.dtype), qt), Ht ? xt.persistentData = Jt : be.freeType(Jt);
                } else typeof Jt[0] == "number" ? (xt.dimension = Yt, x(Yt = be.allocType(xt.dtype, Jt.length), Jt), Ft(xt, Yt, qt), Ht ? xt.persistentData = Yt : be.freeType(Yt)) : Se(Jt[0]) && (xt.dimension = Jt[0].length, xt.dtype = en || m(Jt[0]) || 5126, Ft(xt, Jt = Ne(Jt, [Jt.length, Jt[0].length], xt.dtype), qt), Ht ? xt.persistentData = Jt : be.freeType(Jt));
              } else if (Se(Jt)) xt.dtype = en || m(Jt), xt.dimension = Yt, Ft(xt, Jt, qt), Ht && (xt.persistentData = new Uint8Array(new Uint8Array(Jt.buffer)));
              else if (f(Jt)) {
                Yt = Jt.shape;
                var fn = Jt.stride, In = (sn = Jt.offset, 0), zn = 0, Cn = 0, gn = 0;
                Yt.length === 1 ? (In = Yt[0], zn = 1, Cn = fn[0], gn = 0) : Yt.length === 2 && (In = Yt[0], zn = Yt[1], Cn = fn[0], gn = fn[1]), xt.dtype = en || m(Jt.data) || 5126, xt.dimension = zn, w(Yt = be.allocType(xt.dtype, In * zn), Jt.data, In, zn, Cn, gn, sn), Ft(xt, Yt, qt), Ht ? xt.persistentData = Yt : be.freeType(Yt);
              } else Jt instanceof ArrayBuffer && (xt.dtype = 5121, xt.dimension = Yt, Ft(xt, Jt, qt), Ht && (xt.persistentData = new Uint8Array(new Uint8Array(Jt))));
            }
            function st(xt) {
              pt.bufferCount--, At(xt), Fe.deleteBuffer(xt.buffer), xt.buffer = null, delete kt[xt.id];
            }
            var Ot = 0, kt = {};
            Rt.prototype.bind = function() {
              Fe.bindBuffer(this.type, this.buffer);
            }, Rt.prototype.destroy = function() {
              st(this);
            };
            var Bt = [];
            return Mt.profile && (pt.getTotalBufferSize = function() {
              var xt = 0;
              return Object.keys(kt).forEach(function(Jt) {
                xt += kt[Jt].stats.size;
              }), xt;
            }), { create: function(xt, Jt, qt, en) {
              function Yt(sn) {
                var fn = 35044, In = null, zn = 0, Cn = 0, gn = 1;
                return Array.isArray(sn) || Se(sn) || f(sn) || sn instanceof ArrayBuffer ? In = sn : typeof sn == "number" ? zn = 0 | sn : sn && ("data" in sn && (In = sn.data), "usage" in sn && (fn = Ee[sn.usage]), "type" in sn && (Cn = We[sn.type]), "dimension" in sn && (gn = 0 | sn.dimension), "length" in sn && (zn = 0 | sn.length)), Ht.bind(), In ? lt(Ht, In, fn, Cn, gn, en) : (zn && Fe.bufferData(Ht.type, zn, fn), Ht.dtype = Cn || 5121, Ht.usage = fn, Ht.dimension = gn, Ht.byteLength = zn), Mt.profile && (Ht.stats.size = Ht.byteLength * ge[Ht.dtype]), Yt;
              }
              pt.bufferCount++;
              var Ht = new Rt(Jt);
              return kt[Ht.id] = Ht, qt || Yt(xt), Yt._reglType = "buffer", Yt._buffer = Ht, Yt.subdata = function(sn, fn) {
                var In, zn = 0 | (fn || 0);
                if (Ht.bind(), Se(sn) || sn instanceof ArrayBuffer) Fe.bufferSubData(Ht.type, zn, sn);
                else if (Array.isArray(sn)) {
                  if (0 < sn.length) if (typeof sn[0] == "number") {
                    var Cn = be.allocType(Ht.dtype, sn.length);
                    x(Cn, sn), Fe.bufferSubData(Ht.type, zn, Cn), be.freeType(Cn);
                  } else (Array.isArray(sn[0]) || Se(sn[0])) && (In = Ie(sn), Cn = Ne(sn, In, Ht.dtype), Fe.bufferSubData(Ht.type, zn, Cn), be.freeType(Cn));
                } else if (f(sn)) {
                  In = sn.shape;
                  var gn = sn.stride, Mn = Cn = 0, Xn = 0, Pn = 0;
                  In.length === 1 ? (Cn = In[0], Mn = 1, Xn = gn[0], Pn = 0) : In.length === 2 && (Cn = In[0], Mn = In[1], Xn = gn[0], Pn = gn[1]), In = Array.isArray(sn.data) ? Ht.dtype : m(sn.data), w(In = be.allocType(In, Cn * Mn), sn.data, Cn, Mn, Xn, Pn, sn.offset), Fe.bufferSubData(Ht.type, zn, In), be.freeType(In);
                }
                return Yt;
              }, Mt.profile && (Yt.stats = Ht.stats), Yt.destroy = function() {
                st(Ht);
              }, Yt;
            }, createStream: function(xt, Jt) {
              var qt = Bt.pop();
              return qt || (qt = new Rt(xt)), qt.bind(), lt(qt, Jt, 35040, 0, 1, !1), qt;
            }, destroyStream: function(xt) {
              Bt.push(xt);
            }, clear: function() {
              Me(kt).forEach(st), Bt.forEach(st);
            }, getBuffer: function(xt) {
              return xt && xt._buffer instanceof Rt ? xt._buffer : null;
            }, restore: function() {
              Me(kt).forEach(function(xt) {
                xt.buffer = Fe.createBuffer(), Fe.bindBuffer(xt.type, xt.buffer), Fe.bufferData(xt.type, xt.persistentData || xt.byteLength, xt.usage);
              });
            }, _initBuffer: lt };
          }
          function S(Fe, pt, Mt, At) {
            function Rt(xt) {
              this.id = Ot++, st[this.id] = this, this.buffer = xt, this.primType = 4, this.type = this.vertCount = 0;
            }
            function Ft(xt, Jt, qt, en, Yt, Ht, sn) {
              var fn;
              if (xt.buffer.bind(), Jt ? ((fn = sn) || Se(Jt) && (!f(Jt) || Se(Jt.data)) || (fn = pt.oes_element_index_uint ? 5125 : 5123), Mt._initBuffer(xt.buffer, Jt, qt, fn, 3)) : (Fe.bufferData(34963, Ht, qt), xt.buffer.dtype = fn || 5121, xt.buffer.usage = qt, xt.buffer.dimension = 3, xt.buffer.byteLength = Ht), fn = sn, !sn) {
                switch (xt.buffer.dtype) {
                  case 5121:
                  case 5120:
                    fn = 5121;
                    break;
                  case 5123:
                  case 5122:
                    fn = 5123;
                    break;
                  case 5125:
                  case 5124:
                    fn = 5125;
                }
                xt.buffer.dtype = fn;
              }
              xt.type = fn, 0 > (Jt = Yt) && (Jt = xt.buffer.byteLength, fn === 5123 ? Jt >>= 1 : fn === 5125 && (Jt >>= 2)), xt.vertCount = Jt, Jt = en, 0 > en && (Jt = 4, (en = xt.buffer.dimension) === 1 && (Jt = 0), en === 2 && (Jt = 1), en === 3 && (Jt = 4)), xt.primType = Jt;
            }
            function lt(xt) {
              At.elementsCount--, delete st[xt.id], xt.buffer.destroy(), xt.buffer = null;
            }
            var st = {}, Ot = 0, kt = { uint8: 5121, uint16: 5123 };
            pt.oes_element_index_uint && (kt.uint32 = 5125), Rt.prototype.bind = function() {
              this.buffer.bind();
            };
            var Bt = [];
            return { create: function(xt, Jt) {
              function qt(Ht) {
                if (Ht) if (typeof Ht == "number") en(Ht), Yt.primType = 4, Yt.vertCount = 0 | Ht, Yt.type = 5121;
                else {
                  var sn = null, fn = 35044, In = -1, zn = -1, Cn = 0, gn = 0;
                  Array.isArray(Ht) || Se(Ht) || f(Ht) ? sn = Ht : ("data" in Ht && (sn = Ht.data), "usage" in Ht && (fn = Ee[Ht.usage]), "primitive" in Ht && (In = Ce[Ht.primitive]), "count" in Ht && (zn = 0 | Ht.count), "type" in Ht && (gn = kt[Ht.type]), "length" in Ht ? Cn = 0 | Ht.length : (Cn = zn, gn === 5123 || gn === 5122 ? Cn *= 2 : gn !== 5125 && gn !== 5124 || (Cn *= 4))), Ft(Yt, sn, fn, In, zn, Cn, gn);
                }
                else en(), Yt.primType = 4, Yt.vertCount = 0, Yt.type = 5121;
                return qt;
              }
              var en = Mt.create(null, 34963, !0), Yt = new Rt(en._buffer);
              return At.elementsCount++, qt(xt), qt._reglType = "elements", qt._elements = Yt, qt.subdata = function(Ht, sn) {
                return en.subdata(Ht, sn), qt;
              }, qt.destroy = function() {
                lt(Yt);
              }, qt;
            }, createStream: function(xt) {
              var Jt = Bt.pop();
              return Jt || (Jt = new Rt(Mt.create(null, 34963, !0, !1)._buffer)), Ft(Jt, xt, 35040, -1, -1, 0, 0), Jt;
            }, destroyStream: function(xt) {
              Bt.push(xt);
            }, getElements: function(xt) {
              return typeof xt == "function" && xt._elements instanceof Rt ? xt._elements : null;
            }, clear: function() {
              Me(st).forEach(lt);
            } };
          }
          function A(Fe) {
            for (var pt = be.allocType(5123, Fe.length), Mt = 0; Mt < Fe.length; ++Mt) if (isNaN(Fe[Mt])) pt[Mt] = 65535;
            else if (Fe[Mt] === 1 / 0) pt[Mt] = 31744;
            else if (Fe[Mt] === -1 / 0) pt[Mt] = 64512;
            else {
              we[0] = Fe[Mt];
              var At = (Ft = Ge[0]) >>> 31 << 15, Rt = (Ft << 1 >>> 24) - 127, Ft = Ft >> 13 & 1023;
              pt[Mt] = -24 > Rt ? At : -14 > Rt ? At + (Ft + 1024 >> -14 - Rt) : 15 < Rt ? At + 31744 : At + (Rt + 15 << 10) + Ft;
            }
            return pt;
          }
          function C(Fe) {
            return Array.isArray(Fe) || Se(Fe);
          }
          function D(Fe) {
            return "[object " + Fe + "]";
          }
          function L(Fe) {
            return Array.isArray(Fe) && (Fe.length === 0 || typeof Fe[0] == "number");
          }
          function E(Fe) {
            return !(!Array.isArray(Fe) || Fe.length === 0 || !C(Fe[0]));
          }
          function P(Fe) {
            return Object.prototype.toString.call(Fe);
          }
          function I(Fe) {
            if (!Fe) return !1;
            var pt = P(Fe);
            return 0 <= ft.indexOf(pt) || L(Fe) || E(Fe) || f(Fe);
          }
          function M(Fe, pt) {
            Fe.type === 36193 ? (Fe.data = A(pt), be.freeType(pt)) : Fe.data = pt;
          }
          function O(Fe, pt, Mt, At, Rt, Ft) {
            if (Fe = Pt[Fe] !== void 0 ? Pt[Fe] : Ke[Fe] * _t[pt], Ft && (Fe *= 6), Rt) {
              for (At = 0; 1 <= Mt; ) At += Fe * Mt * Mt, Mt /= 2;
              return At;
            }
            return Fe * Mt * At;
          }
          function T(Fe, pt, Mt, At, Rt, Ft, lt) {
            function st() {
              this.format = this.internalformat = 6408, this.type = 5121, this.flipY = this.premultiplyAlpha = this.compressed = !1, this.unpackAlignment = 1, this.colorSpace = 37444, this.channels = this.height = this.width = 0;
            }
            function Ot(un, Gn) {
              un.internalformat = Gn.internalformat, un.format = Gn.format, un.type = Gn.type, un.compressed = Gn.compressed, un.premultiplyAlpha = Gn.premultiplyAlpha, un.flipY = Gn.flipY, un.unpackAlignment = Gn.unpackAlignment, un.colorSpace = Gn.colorSpace, un.width = Gn.width, un.height = Gn.height, un.channels = Gn.channels;
            }
            function kt(un, Gn) {
              if (typeof Gn == "object" && Gn) {
                "premultiplyAlpha" in Gn && (un.premultiplyAlpha = Gn.premultiplyAlpha), "flipY" in Gn && (un.flipY = Gn.flipY), "alignment" in Gn && (un.unpackAlignment = Gn.alignment), "colorSpace" in Gn && (un.colorSpace = Zn[Gn.colorSpace]), "type" in Gn && (un.type = lr[Gn.type]);
                var on = un.width, ln = un.height, bn = un.channels, Nn = !1;
                "shape" in Gn ? (on = Gn.shape[0], ln = Gn.shape[1], Gn.shape.length === 3 && (bn = Gn.shape[2], Nn = !0)) : ("radius" in Gn && (on = ln = Gn.radius), "width" in Gn && (on = Gn.width), "height" in Gn && (ln = Gn.height), "channels" in Gn && (bn = Gn.channels, Nn = !0)), un.width = 0 | on, un.height = 0 | ln, un.channels = 0 | bn, on = !1, "format" in Gn && (on = Gn.format, ln = un.internalformat = cr[on], un.format = sr[ln], on in lr && !("type" in Gn) && (un.type = lr[on]), on in zr && (un.compressed = !0), on = !0), !Nn && on ? un.channels = Ke[un.format] : Nn && !on && un.channels !== je[un.format] && (un.format = un.internalformat = je[un.channels]);
              }
            }
            function Bt(un) {
              Fe.pixelStorei(37440, un.flipY), Fe.pixelStorei(37441, un.premultiplyAlpha), Fe.pixelStorei(37443, un.colorSpace), Fe.pixelStorei(3317, un.unpackAlignment);
            }
            function xt() {
              st.call(this), this.yOffset = this.xOffset = 0, this.data = null, this.needsFree = !1, this.element = null, this.needsCopy = !1;
            }
            function Jt(un, Gn) {
              var on = null;
              if (I(Gn) ? on = Gn : Gn && (kt(un, Gn), "x" in Gn && (un.xOffset = 0 | Gn.x), "y" in Gn && (un.yOffset = 0 | Gn.y), I(Gn.data) && (on = Gn.data)), Gn.copy) {
                var ln = Rt.viewportWidth, bn = Rt.viewportHeight;
                un.width = un.width || ln - un.xOffset, un.height = un.height || bn - un.yOffset, un.needsCopy = !0;
              } else if (on) {
                if (Se(on)) un.channels = un.channels || 4, un.data = on, "type" in Gn || un.type !== 5121 || (un.type = 0 | Le[Object.prototype.toString.call(on)]);
                else if (L(on)) {
                  switch (un.channels = un.channels || 4, bn = (ln = on).length, un.type) {
                    case 5121:
                    case 5123:
                    case 5125:
                    case 5126:
                      (bn = be.allocType(un.type, bn)).set(ln), un.data = bn;
                      break;
                    case 36193:
                      un.data = A(ln);
                  }
                  un.alignment = 1, un.needsFree = !0;
                } else if (f(on)) {
                  ln = on.data, Array.isArray(ln) || un.type !== 5121 || (un.type = 0 | Le[Object.prototype.toString.call(ln)]), bn = on.shape;
                  var Nn, jn, Jn, Hn, Ln = on.stride;
                  bn.length === 3 ? (Jn = bn[2], Hn = Ln[2]) : Hn = Jn = 1, Nn = bn[0], jn = bn[1], bn = Ln[0], Ln = Ln[1], un.alignment = 1, un.width = Nn, un.height = jn, un.channels = Jn, un.format = un.internalformat = je[Jn], un.needsFree = !0, Nn = Hn, on = on.offset, Jn = un.width, Hn = un.height, jn = un.channels;
                  for (var pn = be.allocType(un.type === 36193 ? 5126 : un.type, Jn * Hn * jn), dn = 0, Dn = 0; Dn < Hn; ++Dn) for (var nr = 0; nr < Jn; ++nr) for (var pr = 0; pr < jn; ++pr) pn[dn++] = ln[bn * nr + Ln * Dn + Nn * pr + on];
                  M(un, pn);
                } else if (P(on) === tt || P(on) === _e || P(on) === Be) P(on) === tt || P(on) === _e ? un.element = on : un.element = on.canvas, un.width = un.element.width, un.height = un.element.height, un.channels = 4;
                else if (P(on) === $e) un.element = on, un.width = on.width, un.height = on.height, un.channels = 4;
                else if (P(on) === Ze) un.element = on, un.width = on.naturalWidth, un.height = on.naturalHeight, un.channels = 4;
                else if (P(on) === ct) un.element = on, un.width = on.videoWidth, un.height = on.videoHeight, un.channels = 4;
                else if (E(on)) {
                  for (ln = un.width || on[0].length, bn = un.height || on.length, Ln = un.channels, Ln = C(on[0][0]) ? Ln || on[0][0].length : Ln || 1, Nn = De.shape(on), Jn = 1, Hn = 0; Hn < Nn.length; ++Hn) Jn *= Nn[Hn];
                  Jn = be.allocType(un.type === 36193 ? 5126 : un.type, Jn), De.flatten(on, Nn, "", Jn), M(un, Jn), un.alignment = 1, un.width = ln, un.height = bn, un.channels = Ln, un.format = un.internalformat = je[Ln], un.needsFree = !0;
                }
              } else un.width = un.width || 1, un.height = un.height || 1, un.channels = un.channels || 4;
            }
            function qt(un, Gn, on, ln, bn) {
              var Nn = un.element, jn = un.data, Jn = un.internalformat, Hn = un.format, Ln = un.type, pn = un.width, dn = un.height;
              Bt(un), Nn ? Fe.texSubImage2D(Gn, bn, on, ln, Hn, Ln, Nn) : un.compressed ? Fe.compressedTexSubImage2D(Gn, bn, on, ln, Jn, pn, dn, jn) : un.needsCopy ? (At(), Fe.copyTexSubImage2D(Gn, bn, on, ln, un.xOffset, un.yOffset, pn, dn)) : Fe.texSubImage2D(Gn, bn, on, ln, pn, dn, Hn, Ln, jn);
            }
            function en() {
              return $n.pop() || new xt();
            }
            function Yt(un) {
              un.needsFree && be.freeType(un.data), xt.call(un), $n.push(un);
            }
            function Ht() {
              st.call(this), this.genMipmaps = !1, this.mipmapHint = 4352, this.mipmask = 0, this.images = Array(16);
            }
            function sn(un, Gn, on) {
              var ln = un.images[0] = en();
              un.mipmask = 1, ln.width = un.width = Gn, ln.height = un.height = on, ln.channels = un.channels = 4;
            }
            function fn(un, Gn) {
              var on = null;
              if (I(Gn)) Ot(on = un.images[0] = en(), un), Jt(on, Gn), un.mipmask = 1;
              else if (kt(un, Gn), Array.isArray(Gn.mipmap)) for (var ln = Gn.mipmap, bn = 0; bn < ln.length; ++bn) Ot(on = un.images[bn] = en(), un), on.width >>= bn, on.height >>= bn, Jt(on, ln[bn]), un.mipmask |= 1 << bn;
              else Ot(on = un.images[0] = en(), un), Jt(on, Gn), un.mipmask = 1;
              Ot(un, un.images[0]);
            }
            function In(un, Gn) {
              for (var on = un.images, ln = 0; ln < on.length && on[ln]; ++ln) {
                var bn = on[ln], Nn = Gn, jn = ln, Jn = bn.element, Hn = bn.data, Ln = bn.internalformat, pn = bn.format, dn = bn.type, Dn = bn.width, nr = bn.height;
                Bt(bn), Jn ? Fe.texImage2D(Nn, jn, pn, pn, dn, Jn) : bn.compressed ? Fe.compressedTexImage2D(Nn, jn, Ln, Dn, nr, 0, Hn) : bn.needsCopy ? (At(), Fe.copyTexImage2D(Nn, jn, pn, bn.xOffset, bn.yOffset, Dn, nr, 0)) : Fe.texImage2D(Nn, jn, pn, Dn, nr, 0, pn, dn, Hn || null);
              }
            }
            function zn() {
              var un = ur.pop() || new Ht();
              st.call(un);
              for (var Gn = un.mipmask = 0; 16 > Gn; ++Gn) un.images[Gn] = null;
              return un;
            }
            function Cn(un) {
              for (var Gn = un.images, on = 0; on < Gn.length; ++on) Gn[on] && Yt(Gn[on]), Gn[on] = null;
              ur.push(un);
            }
            function gn() {
              this.magFilter = this.minFilter = 9728, this.wrapT = this.wrapS = 33071, this.anisotropic = 1, this.genMipmaps = !1, this.mipmapHint = 4352;
            }
            function Mn(un, Gn) {
              "min" in Gn && (un.minFilter = hr[Gn.min], 0 <= Re.indexOf(un.minFilter) && !("faces" in Gn) && (un.genMipmaps = !0)), "mag" in Gn && (un.magFilter = Wn[Gn.mag]);
              var on = un.wrapS, ln = un.wrapT;
              if ("wrap" in Gn) {
                var bn = Gn.wrap;
                typeof bn == "string" ? on = ln = Kn[bn] : Array.isArray(bn) && (on = Kn[bn[0]], ln = Kn[bn[1]]);
              } else "wrapS" in Gn && (on = Kn[Gn.wrapS]), "wrapT" in Gn && (ln = Kn[Gn.wrapT]);
              if (un.wrapS = on, un.wrapT = ln, "anisotropic" in Gn && (un.anisotropic = Gn.anisotropic), "mipmap" in Gn) {
                switch (on = !1, typeof Gn.mipmap) {
                  case "string":
                    un.mipmapHint = En[Gn.mipmap], on = un.genMipmaps = !0;
                    break;
                  case "boolean":
                    on = un.genMipmaps = Gn.mipmap;
                    break;
                  case "object":
                    un.genMipmaps = !1, on = !0;
                }
                !on || "min" in Gn || (un.minFilter = 9984);
              }
            }
            function Xn(un, Gn) {
              Fe.texParameteri(Gn, 10241, un.minFilter), Fe.texParameteri(Gn, 10240, un.magFilter), Fe.texParameteri(Gn, 10242, un.wrapS), Fe.texParameteri(Gn, 10243, un.wrapT), pt.ext_texture_filter_anisotropic && Fe.texParameteri(Gn, 34046, un.anisotropic), un.genMipmaps && (Fe.hint(33170, un.mipmapHint), Fe.generateMipmap(Gn));
            }
            function Pn(un) {
              st.call(this), this.mipmask = 0, this.internalformat = 6408, this.id = Tr++, this.refCount = 1, this.target = un, this.texture = Fe.createTexture(), this.unit = -1, this.bindCount = 0, this.texInfo = new gn(), lt.profile && (this.stats = { size: 0 });
            }
            function wn(un) {
              Fe.activeTexture(33984), Fe.bindTexture(un.target, un.texture);
            }
            function Rn() {
              var un = Xr[0];
              un ? Fe.bindTexture(un.target, un.texture) : Fe.bindTexture(3553, null);
            }
            function _n(un) {
              var Gn = un.texture, on = un.unit, ln = un.target;
              0 <= on && (Fe.activeTexture(33984 + on), Fe.bindTexture(ln, null), Xr[on] = null), Fe.deleteTexture(Gn), un.texture = null, un.params = null, un.pixels = null, un.refCount = 0, delete wr[un.id], Ft.textureCount--;
            }
            var En = { "don't care": 4352, "dont care": 4352, nice: 4354, fast: 4353 }, Kn = { repeat: 10497, clamp: 33071, mirror: 33648 }, Wn = { nearest: 9728, linear: 9729 }, hr = ae({ mipmap: 9987, "nearest mipmap nearest": 9984, "linear mipmap nearest": 9985, "nearest mipmap linear": 9986, "linear mipmap linear": 9987 }, Wn), Zn = { none: 0, browser: 37444 }, lr = { uint8: 5121, rgba4: 32819, rgb565: 33635, "rgb5 a1": 32820 }, cr = { alpha: 6406, luminance: 6409, "luminance alpha": 6410, rgb: 6407, rgba: 6408, rgba4: 32854, "rgb5 a1": 32855, rgb565: 36194 }, zr = {};
            pt.ext_srgb && (cr.srgb = 35904, cr.srgba = 35906), pt.oes_texture_float && (lr.float32 = lr.float = 5126), pt.oes_texture_half_float && (lr.float16 = lr["half float"] = 36193), pt.webgl_depth_texture && (ae(cr, { depth: 6402, "depth stencil": 34041 }), ae(lr, { uint16: 5123, uint32: 5125, "depth stencil": 34042 })), pt.webgl_compressed_texture_s3tc && ae(zr, { "rgb s3tc dxt1": 33776, "rgba s3tc dxt1": 33777, "rgba s3tc dxt3": 33778, "rgba s3tc dxt5": 33779 }), pt.webgl_compressed_texture_atc && ae(zr, { "rgb atc": 35986, "rgba atc explicit alpha": 35987, "rgba atc interpolated alpha": 34798 }), pt.webgl_compressed_texture_pvrtc && ae(zr, { "rgb pvrtc 4bppv1": 35840, "rgb pvrtc 2bppv1": 35841, "rgba pvrtc 4bppv1": 35842, "rgba pvrtc 2bppv1": 35843 }), pt.webgl_compressed_texture_etc1 && (zr["rgb etc1"] = 36196);
            var Wr = Array.prototype.slice.call(Fe.getParameter(34467));
            Object.keys(zr).forEach(function(un) {
              var Gn = zr[un];
              0 <= Wr.indexOf(Gn) && (cr[un] = Gn);
            });
            var mr = Object.keys(cr);
            Mt.textureFormats = mr;
            var Ir = [];
            Object.keys(cr).forEach(function(un) {
              Ir[cr[un]] = un;
            });
            var yr = [];
            Object.keys(lr).forEach(function(un) {
              yr[lr[un]] = un;
            });
            var Vr = [];
            Object.keys(Wn).forEach(function(un) {
              Vr[Wn[un]] = un;
            });
            var rn = [];
            Object.keys(hr).forEach(function(un) {
              rn[hr[un]] = un;
            });
            var Tn = [];
            Object.keys(Kn).forEach(function(un) {
              Tn[Kn[un]] = un;
            });
            var sr = mr.reduce(function(un, Gn) {
              var on = cr[Gn];
              return on === 6409 || on === 6406 || on === 6409 || on === 6410 || on === 6402 || on === 34041 || pt.ext_srgb && (on === 35904 || on === 35906) ? un[on] = on : on === 32855 || 0 <= Gn.indexOf("rgba") ? un[on] = 6408 : un[on] = 6407, un;
            }, {}), $n = [], ur = [], Tr = 0, wr = {}, Fr = Mt.maxTextureUnits, Xr = Array(Fr).map(function() {
              return null;
            });
            return ae(Pn.prototype, { bind: function() {
              this.bindCount += 1;
              var un = this.unit;
              if (0 > un) {
                for (var Gn = 0; Gn < Fr; ++Gn) {
                  var on = Xr[Gn];
                  if (on) {
                    if (0 < on.bindCount) continue;
                    on.unit = -1;
                  }
                  Xr[Gn] = this, un = Gn;
                  break;
                }
                lt.profile && Ft.maxTextureUnits < un + 1 && (Ft.maxTextureUnits = un + 1), this.unit = un, Fe.activeTexture(33984 + un), Fe.bindTexture(this.target, this.texture);
              }
              return un;
            }, unbind: function() {
              --this.bindCount;
            }, decRef: function() {
              0 >= --this.refCount && _n(this);
            } }), lt.profile && (Ft.getTotalTextureSize = function() {
              var un = 0;
              return Object.keys(wr).forEach(function(Gn) {
                un += wr[Gn].stats.size;
              }), un;
            }), { create2D: function(un, Gn) {
              function on(bn, Nn) {
                var jn = ln.texInfo;
                gn.call(jn);
                var Jn = zn();
                return typeof bn == "number" ? sn(Jn, 0 | bn, typeof Nn == "number" ? 0 | Nn : 0 | bn) : bn ? (Mn(jn, bn), fn(Jn, bn)) : sn(Jn, 1, 1), jn.genMipmaps && (Jn.mipmask = (Jn.width << 1) - 1), ln.mipmask = Jn.mipmask, Ot(ln, Jn), ln.internalformat = Jn.internalformat, on.width = Jn.width, on.height = Jn.height, wn(ln), In(Jn, 3553), Xn(jn, 3553), Rn(), Cn(Jn), lt.profile && (ln.stats.size = O(ln.internalformat, ln.type, Jn.width, Jn.height, jn.genMipmaps, !1)), on.format = Ir[ln.internalformat], on.type = yr[ln.type], on.mag = Vr[jn.magFilter], on.min = rn[jn.minFilter], on.wrapS = Tn[jn.wrapS], on.wrapT = Tn[jn.wrapT], on;
              }
              var ln = new Pn(3553);
              return wr[ln.id] = ln, Ft.textureCount++, on(un, Gn), on.subimage = function(bn, Nn, jn, Jn) {
                Nn |= 0, jn |= 0, Jn |= 0;
                var Hn = en();
                return Ot(Hn, ln), Hn.width = 0, Hn.height = 0, Jt(Hn, bn), Hn.width = Hn.width || (ln.width >> Jn) - Nn, Hn.height = Hn.height || (ln.height >> Jn) - jn, wn(ln), qt(Hn, 3553, Nn, jn, Jn), Rn(), Yt(Hn), on;
              }, on.resize = function(bn, Nn) {
                var jn = 0 | bn, Jn = 0 | Nn || jn;
                if (jn === ln.width && Jn === ln.height) return on;
                on.width = ln.width = jn, on.height = ln.height = Jn, wn(ln);
                for (var Hn = 0; ln.mipmask >> Hn; ++Hn) {
                  var Ln = jn >> Hn, pn = Jn >> Hn;
                  if (!Ln || !pn) break;
                  Fe.texImage2D(3553, Hn, ln.format, Ln, pn, 0, ln.format, ln.type, null);
                }
                return Rn(), lt.profile && (ln.stats.size = O(ln.internalformat, ln.type, jn, Jn, !1, !1)), on;
              }, on._reglType = "texture2d", on._texture = ln, lt.profile && (on.stats = ln.stats), on.destroy = function() {
                ln.decRef();
              }, on;
            }, createCube: function(un, Gn, on, ln, bn, Nn) {
              function jn(Ln, pn, dn, Dn, nr, pr) {
                var ir, gr = Jn.texInfo;
                for (gn.call(gr), ir = 0; 6 > ir; ++ir) Hn[ir] = zn();
                if (typeof Ln != "number" && Ln) {
                  if (typeof Ln == "object") if (pn) fn(Hn[0], Ln), fn(Hn[1], pn), fn(Hn[2], dn), fn(Hn[3], Dn), fn(Hn[4], nr), fn(Hn[5], pr);
                  else if (Mn(gr, Ln), kt(Jn, Ln), "faces" in Ln) for (Ln = Ln.faces, ir = 0; 6 > ir; ++ir) Ot(Hn[ir], Jn), fn(Hn[ir], Ln[ir]);
                  else for (ir = 0; 6 > ir; ++ir) fn(Hn[ir], Ln);
                } else for (Ln = 0 | Ln || 1, ir = 0; 6 > ir; ++ir) sn(Hn[ir], Ln, Ln);
                for (Ot(Jn, Hn[0]), Jn.mipmask = gr.genMipmaps ? (Hn[0].width << 1) - 1 : Hn[0].mipmask, Jn.internalformat = Hn[0].internalformat, jn.width = Hn[0].width, jn.height = Hn[0].height, wn(Jn), ir = 0; 6 > ir; ++ir) In(Hn[ir], 34069 + ir);
                for (Xn(gr, 34067), Rn(), lt.profile && (Jn.stats.size = O(Jn.internalformat, Jn.type, jn.width, jn.height, gr.genMipmaps, !0)), jn.format = Ir[Jn.internalformat], jn.type = yr[Jn.type], jn.mag = Vr[gr.magFilter], jn.min = rn[gr.minFilter], jn.wrapS = Tn[gr.wrapS], jn.wrapT = Tn[gr.wrapT], ir = 0; 6 > ir; ++ir) Cn(Hn[ir]);
                return jn;
              }
              var Jn = new Pn(34067);
              wr[Jn.id] = Jn, Ft.cubeCount++;
              var Hn = Array(6);
              return jn(un, Gn, on, ln, bn, Nn), jn.subimage = function(Ln, pn, dn, Dn, nr) {
                dn |= 0, Dn |= 0, nr |= 0;
                var pr = en();
                return Ot(pr, Jn), pr.width = 0, pr.height = 0, Jt(pr, pn), pr.width = pr.width || (Jn.width >> nr) - dn, pr.height = pr.height || (Jn.height >> nr) - Dn, wn(Jn), qt(pr, 34069 + Ln, dn, Dn, nr), Rn(), Yt(pr), jn;
              }, jn.resize = function(Ln) {
                if ((Ln |= 0) !== Jn.width) {
                  jn.width = Jn.width = Ln, jn.height = Jn.height = Ln, wn(Jn);
                  for (var pn = 0; 6 > pn; ++pn) for (var dn = 0; Jn.mipmask >> dn; ++dn) Fe.texImage2D(34069 + pn, dn, Jn.format, Ln >> dn, Ln >> dn, 0, Jn.format, Jn.type, null);
                  return Rn(), lt.profile && (Jn.stats.size = O(Jn.internalformat, Jn.type, jn.width, jn.height, !1, !0)), jn;
                }
              }, jn._reglType = "textureCube", jn._texture = Jn, lt.profile && (jn.stats = Jn.stats), jn.destroy = function() {
                Jn.decRef();
              }, jn;
            }, clear: function() {
              for (var un = 0; un < Fr; ++un) Fe.activeTexture(33984 + un), Fe.bindTexture(3553, null), Xr[un] = null;
              Me(wr).forEach(_n), Ft.cubeCount = 0, Ft.textureCount = 0;
            }, getTexture: function(un) {
              return null;
            }, restore: function() {
              for (var un = 0; un < Fr; ++un) {
                var Gn = Xr[un];
                Gn && (Gn.bindCount = 0, Gn.unit = -1, Xr[un] = null);
              }
              Me(wr).forEach(function(on) {
                on.texture = Fe.createTexture(), Fe.bindTexture(on.target, on.texture);
                for (var ln = 0; 32 > ln; ++ln) if (on.mipmask & 1 << ln) if (on.target === 3553) Fe.texImage2D(3553, ln, on.internalformat, on.width >> ln, on.height >> ln, 0, on.internalformat, on.type, null);
                else for (var bn = 0; 6 > bn; ++bn) Fe.texImage2D(34069 + bn, ln, on.internalformat, on.width >> ln, on.height >> ln, 0, on.internalformat, on.type, null);
                Xn(on.texInfo, on.target);
              });
            }, refresh: function() {
              for (var un = 0; un < Fr; ++un) {
                var Gn = Xr[un];
                Gn && (Gn.bindCount = 0, Gn.unit = -1, Xr[un] = null), Fe.activeTexture(33984 + un), Fe.bindTexture(3553, null), Fe.bindTexture(34067, null);
              }
            } };
          }
          function z(Fe, pt, Mt, At, Rt, Ft) {
            function lt(Pn, wn, Rn) {
              this.target = Pn, this.texture = wn, this.renderbuffer = Rn;
              var _n = Pn = 0;
              wn ? (Pn = wn.width, _n = wn.height) : Rn && (Pn = Rn.width, _n = Rn.height), this.width = Pn, this.height = _n;
            }
            function st(Pn) {
              Pn && (Pn.texture && Pn.texture._texture.decRef(), Pn.renderbuffer && Pn.renderbuffer._renderbuffer.decRef());
            }
            function Ot(Pn, wn, Rn) {
              Pn && (Pn.texture ? Pn.texture._texture.refCount += 1 : Pn.renderbuffer._renderbuffer.refCount += 1);
            }
            function kt(Pn, wn) {
              wn && (wn.texture ? Fe.framebufferTexture2D(36160, Pn, wn.target, wn.texture._texture.texture, 0) : Fe.framebufferRenderbuffer(36160, Pn, 36161, wn.renderbuffer._renderbuffer.renderbuffer));
            }
            function Bt(Pn) {
              var wn = 3553, Rn = null, _n = null, En = Pn;
              return typeof Pn == "object" && (En = Pn.data, "target" in Pn && (wn = 0 | Pn.target)), (Pn = En._reglType) === "texture2d" || Pn === "textureCube" ? Rn = En : Pn === "renderbuffer" && (_n = En, wn = 36161), new lt(wn, Rn, _n);
            }
            function xt(Pn, wn, Rn, _n, En) {
              return Rn ? ((Pn = At.create2D({ width: Pn, height: wn, format: _n, type: En }))._texture.refCount = 0, new lt(3553, Pn, null)) : ((Pn = Rt.create({ width: Pn, height: wn, format: _n }))._renderbuffer.refCount = 0, new lt(36161, null, Pn));
            }
            function Jt(Pn) {
              return Pn && (Pn.texture || Pn.renderbuffer);
            }
            function qt(Pn, wn, Rn) {
              Pn && (Pn.texture ? Pn.texture.resize(wn, Rn) : Pn.renderbuffer && Pn.renderbuffer.resize(wn, Rn), Pn.width = wn, Pn.height = Rn);
            }
            function en() {
              this.id = Mn++, Xn[this.id] = this, this.framebuffer = Fe.createFramebuffer(), this.height = this.width = 0, this.colorAttachments = [], this.depthStencilAttachment = this.stencilAttachment = this.depthAttachment = null;
            }
            function Yt(Pn) {
              Pn.colorAttachments.forEach(st), st(Pn.depthAttachment), st(Pn.stencilAttachment), st(Pn.depthStencilAttachment);
            }
            function Ht(Pn) {
              Fe.deleteFramebuffer(Pn.framebuffer), Pn.framebuffer = null, Ft.framebufferCount--, delete Xn[Pn.id];
            }
            function sn(Pn) {
              var wn;
              Fe.bindFramebuffer(36160, Pn.framebuffer);
              var Rn = Pn.colorAttachments;
              for (wn = 0; wn < Rn.length; ++wn) kt(36064 + wn, Rn[wn]);
              for (wn = Rn.length; wn < Mt.maxColorAttachments; ++wn) Fe.framebufferTexture2D(36160, 36064 + wn, 3553, null, 0);
              Fe.framebufferTexture2D(36160, 33306, 3553, null, 0), Fe.framebufferTexture2D(36160, 36096, 3553, null, 0), Fe.framebufferTexture2D(36160, 36128, 3553, null, 0), kt(36096, Pn.depthAttachment), kt(36128, Pn.stencilAttachment), kt(33306, Pn.depthStencilAttachment), Fe.checkFramebufferStatus(36160), Fe.isContextLost(), Fe.bindFramebuffer(36160, In.next ? In.next.framebuffer : null), In.cur = In.next, Fe.getError();
            }
            function fn(Pn, wn) {
              function Rn(En, Kn) {
                var Wn, hr = 0, Zn = 0, lr = !0, cr = !0;
                Wn = null;
                var zr = !0, Wr = "rgba", mr = "uint8", Ir = 1, yr = null, Vr = null, rn = null, Tn = !1;
                typeof En == "number" ? (hr = 0 | En, Zn = 0 | Kn || hr) : En ? ("shape" in En ? (hr = (Zn = En.shape)[0], Zn = Zn[1]) : ("radius" in En && (hr = Zn = En.radius), "width" in En && (hr = En.width), "height" in En && (Zn = En.height)), ("color" in En || "colors" in En) && (Wn = En.color || En.colors, Array.isArray(Wn)), Wn || ("colorCount" in En && (Ir = 0 | En.colorCount), "colorTexture" in En && (zr = !!En.colorTexture, Wr = "rgba4"), "colorType" in En && (mr = En.colorType, !zr) && (mr === "half float" || mr === "float16" ? Wr = "rgba16f" : mr !== "float" && mr !== "float32" || (Wr = "rgba32f")), "colorFormat" in En && (Wr = En.colorFormat, 0 <= zn.indexOf(Wr) ? zr = !0 : 0 <= Cn.indexOf(Wr) && (zr = !1))), ("depthTexture" in En || "depthStencilTexture" in En) && (Tn = !(!En.depthTexture && !En.depthStencilTexture)), "depth" in En && (typeof En.depth == "boolean" ? lr = En.depth : (yr = En.depth, cr = !1)), "stencil" in En && (typeof En.stencil == "boolean" ? cr = En.stencil : (Vr = En.stencil, lr = !1)), "depthStencil" in En && (typeof En.depthStencil == "boolean" ? lr = cr = En.depthStencil : (rn = En.depthStencil, cr = lr = !1))) : hr = Zn = 1;
                var sr = null, $n = null, ur = null, Tr = null;
                if (Array.isArray(Wn)) sr = Wn.map(Bt);
                else if (Wn) sr = [Bt(Wn)];
                else for (sr = Array(Ir), Wn = 0; Wn < Ir; ++Wn) sr[Wn] = xt(hr, Zn, zr, Wr, mr);
                for (hr = hr || sr[0].width, Zn = Zn || sr[0].height, yr ? $n = Bt(yr) : lr && !cr && ($n = xt(hr, Zn, Tn, "depth", "uint32")), Vr ? ur = Bt(Vr) : cr && !lr && (ur = xt(hr, Zn, !1, "stencil", "uint8")), rn ? Tr = Bt(rn) : !yr && !Vr && cr && lr && (Tr = xt(hr, Zn, Tn, "depth stencil", "depth stencil")), lr = null, Wn = 0; Wn < sr.length; ++Wn) Ot(sr[Wn]), sr[Wn] && sr[Wn].texture && (cr = Gt[sr[Wn].texture._texture.format] * Wt[sr[Wn].texture._texture.type], lr === null && (lr = cr));
                return Ot($n), Ot(ur), Ot(Tr), Yt(_n), _n.width = hr, _n.height = Zn, _n.colorAttachments = sr, _n.depthAttachment = $n, _n.stencilAttachment = ur, _n.depthStencilAttachment = Tr, Rn.color = sr.map(Jt), Rn.depth = Jt($n), Rn.stencil = Jt(ur), Rn.depthStencil = Jt(Tr), Rn.width = _n.width, Rn.height = _n.height, sn(_n), Rn;
              }
              var _n = new en();
              return Ft.framebufferCount++, Rn(Pn, wn), ae(Rn, { resize: function(En, Kn) {
                var Wn = Math.max(0 | En, 1), hr = Math.max(0 | Kn || Wn, 1);
                if (Wn === _n.width && hr === _n.height) return Rn;
                for (var Zn = _n.colorAttachments, lr = 0; lr < Zn.length; ++lr) qt(Zn[lr], Wn, hr);
                return qt(_n.depthAttachment, Wn, hr), qt(_n.stencilAttachment, Wn, hr), qt(_n.depthStencilAttachment, Wn, hr), _n.width = Rn.width = Wn, _n.height = Rn.height = hr, sn(_n), Rn;
              }, _reglType: "framebuffer", _framebuffer: _n, destroy: function() {
                Ht(_n), Yt(_n);
              }, use: function(En) {
                In.setFBO({ framebuffer: Rn }, En);
              } });
            }
            var In = { cur: null, next: null, dirty: !1, setFBO: null }, zn = ["rgba"], Cn = ["rgba4", "rgb565", "rgb5 a1"];
            pt.ext_srgb && Cn.push("srgba"), pt.ext_color_buffer_half_float && Cn.push("rgba16f", "rgb16f"), pt.webgl_color_buffer_float && Cn.push("rgba32f");
            var gn = ["uint8"];
            pt.oes_texture_half_float && gn.push("half float", "float16"), pt.oes_texture_float && gn.push("float", "float32");
            var Mn = 0, Xn = {};
            return ae(In, { getFramebuffer: function(Pn) {
              return typeof Pn == "function" && Pn._reglType === "framebuffer" && (Pn = Pn._framebuffer) instanceof en ? Pn : null;
            }, create: fn, createCube: function(Pn) {
              function wn(_n) {
                var En, Kn = { color: null }, Wn = 0, hr = null;
                En = "rgba";
                var Zn = "uint8", lr = 1;
                if (typeof _n == "number" ? Wn = 0 | _n : _n ? ("shape" in _n ? Wn = _n.shape[0] : ("radius" in _n && (Wn = 0 | _n.radius), "width" in _n ? Wn = 0 | _n.width : "height" in _n && (Wn = 0 | _n.height)), ("color" in _n || "colors" in _n) && (hr = _n.color || _n.colors, Array.isArray(hr)), hr || ("colorCount" in _n && (lr = 0 | _n.colorCount), "colorType" in _n && (Zn = _n.colorType), "colorFormat" in _n && (En = _n.colorFormat)), "depth" in _n && (Kn.depth = _n.depth), "stencil" in _n && (Kn.stencil = _n.stencil), "depthStencil" in _n && (Kn.depthStencil = _n.depthStencil)) : Wn = 1, hr) if (Array.isArray(hr)) for (_n = [], En = 0; En < hr.length; ++En) _n[En] = hr[En];
                else _n = [hr];
                else for (_n = Array(lr), hr = { radius: Wn, format: En, type: Zn }, En = 0; En < lr; ++En) _n[En] = At.createCube(hr);
                for (Kn.color = Array(_n.length), En = 0; En < _n.length; ++En) lr = _n[En], Wn = Wn || lr.width, Kn.color[En] = { target: 34069, data: _n[En] };
                for (En = 0; 6 > En; ++En) {
                  for (lr = 0; lr < _n.length; ++lr) Kn.color[lr].target = 34069 + En;
                  0 < En && (Kn.depth = Rn[0].depth, Kn.stencil = Rn[0].stencil, Kn.depthStencil = Rn[0].depthStencil), Rn[En] ? Rn[En](Kn) : Rn[En] = fn(Kn);
                }
                return ae(wn, { width: Wn, height: Wn, color: _n });
              }
              var Rn = Array(6);
              return wn(Pn), ae(wn, { faces: Rn, resize: function(_n) {
                var En = 0 | _n;
                if (En === wn.width) return wn;
                var Kn = wn.color;
                for (_n = 0; _n < Kn.length; ++_n) Kn[_n].resize(En);
                for (_n = 0; 6 > _n; ++_n) Rn[_n].resize(En);
                return wn.width = wn.height = En, wn;
              }, _reglType: "framebufferCube", destroy: function() {
                Rn.forEach(function(_n) {
                  _n.destroy();
                });
              } });
            }, clear: function() {
              Me(Xn).forEach(Ht);
            }, restore: function() {
              In.cur = null, In.next = null, In.dirty = !0, Me(Xn).forEach(function(Pn) {
                Pn.framebuffer = Fe.createFramebuffer(), sn(Pn);
              });
            } });
          }
          function F() {
            this.w = this.z = this.y = this.x = this.state = 0, this.buffer = null, this.size = 0, this.normalized = !1, this.type = 5126, this.divisor = this.stride = this.offset = 0;
          }
          function U(Fe, pt, Mt, At, Rt, Ft, lt) {
            function st() {
              this.id = ++Bt, this.attributes = [], this.elements = null, this.ownsElements = !1, this.offset = this.count = 0, this.instances = -1, this.primitive = 4;
              var qt = pt.oes_vertex_array_object;
              this.vao = qt ? qt.createVertexArrayOES() : null, xt[this.id] = this, this.buffers = [];
            }
            var Ot = Mt.maxAttributes, kt = Array(Ot);
            for (Mt = 0; Mt < Ot; ++Mt) kt[Mt] = new F();
            var Bt = 0, xt = {}, Jt = { Record: F, scope: {}, state: kt, currentVAO: null, targetVAO: null, restore: pt.oes_vertex_array_object ? function() {
              pt.oes_vertex_array_object && Me(xt).forEach(function(qt) {
                qt.refresh();
              });
            } : function() {
            }, createVAO: function(qt) {
              function en(Ht) {
                var sn;
                Array.isArray(Ht) ? (sn = Ht, Yt.elements && Yt.ownsElements && Yt.elements.destroy(), Yt.elements = null, Yt.ownsElements = !1, Yt.offset = 0, Yt.count = 0, Yt.instances = -1, Yt.primitive = 4) : (Ht.elements ? (sn = Ht.elements, Yt.ownsElements ? (typeof sn == "function" && sn._reglType === "elements" ? Yt.elements.destroy() : Yt.elements(sn), Yt.ownsElements = !1) : Ft.getElements(Ht.elements) ? (Yt.elements = Ht.elements, Yt.ownsElements = !1) : (Yt.elements = Ft.create(Ht.elements), Yt.ownsElements = !0)) : (Yt.elements = null, Yt.ownsElements = !1), sn = Ht.attributes, Yt.offset = 0, Yt.count = -1, Yt.instances = -1, Yt.primitive = 4, Yt.elements && (Yt.count = Yt.elements._elements.vertCount, Yt.primitive = Yt.elements._elements.primType), "offset" in Ht && (Yt.offset = 0 | Ht.offset), "count" in Ht && (Yt.count = 0 | Ht.count), "instances" in Ht && (Yt.instances = 0 | Ht.instances), "primitive" in Ht && (Yt.primitive = Ce[Ht.primitive])), Ht = {};
                var fn = Yt.attributes;
                fn.length = sn.length;
                for (var In = 0; In < sn.length; ++In) {
                  var zn, Cn = sn[In], gn = fn[In] = new F(), Mn = Cn.data || Cn;
                  Array.isArray(Mn) || Se(Mn) || f(Mn) ? (Yt.buffers[In] && (zn = Yt.buffers[In], Se(Mn) && zn._buffer.byteLength >= Mn.byteLength ? zn.subdata(Mn) : (zn.destroy(), Yt.buffers[In] = null)), Yt.buffers[In] || (zn = Yt.buffers[In] = Rt.create(Cn, 34962, !1, !0)), gn.buffer = Rt.getBuffer(zn), gn.size = 0 | gn.buffer.dimension, gn.normalized = !1, gn.type = gn.buffer.dtype, gn.offset = 0, gn.stride = 0, gn.divisor = 0, gn.state = 1, Ht[In] = 1) : Rt.getBuffer(Cn) ? (gn.buffer = Rt.getBuffer(Cn), gn.size = 0 | gn.buffer.dimension, gn.normalized = !1, gn.type = gn.buffer.dtype, gn.offset = 0, gn.stride = 0, gn.divisor = 0, gn.state = 1) : Rt.getBuffer(Cn.buffer) ? (gn.buffer = Rt.getBuffer(Cn.buffer), gn.size = 0 | (+Cn.size || gn.buffer.dimension), gn.normalized = !!Cn.normalized || !1, gn.type = "type" in Cn ? We[Cn.type] : gn.buffer.dtype, gn.offset = 0 | (Cn.offset || 0), gn.stride = 0 | (Cn.stride || 0), gn.divisor = 0 | (Cn.divisor || 0), gn.state = 1) : "x" in Cn && (gn.x = +Cn.x || 0, gn.y = +Cn.y || 0, gn.z = +Cn.z || 0, gn.w = +Cn.w || 0, gn.state = 2);
                }
                for (zn = 0; zn < Yt.buffers.length; ++zn) !Ht[zn] && Yt.buffers[zn] && (Yt.buffers[zn].destroy(), Yt.buffers[zn] = null);
                return Yt.refresh(), en;
              }
              var Yt = new st();
              return At.vaoCount += 1, en.destroy = function() {
                for (var Ht = 0; Ht < Yt.buffers.length; ++Ht) Yt.buffers[Ht] && Yt.buffers[Ht].destroy();
                Yt.buffers.length = 0, Yt.ownsElements && (Yt.elements.destroy(), Yt.elements = null, Yt.ownsElements = !1), Yt.destroy();
              }, en._vao = Yt, en._reglType = "vao", en(qt);
            }, getVAO: function(qt) {
              return typeof qt == "function" && qt._vao ? qt._vao : null;
            }, destroyBuffer: function(qt) {
              for (var en = 0; en < kt.length; ++en) {
                var Yt = kt[en];
                Yt.buffer === qt && (Fe.disableVertexAttribArray(en), Yt.buffer = null);
              }
            }, setVAO: pt.oes_vertex_array_object ? function(qt) {
              if (qt !== Jt.currentVAO) {
                var en = pt.oes_vertex_array_object;
                qt ? en.bindVertexArrayOES(qt.vao) : en.bindVertexArrayOES(null), Jt.currentVAO = qt;
              }
            } : function(qt) {
              if (qt !== Jt.currentVAO) {
                if (qt) qt.bindAttrs();
                else {
                  for (var en = pt.angle_instanced_arrays, Yt = 0; Yt < kt.length; ++Yt) {
                    var Ht = kt[Yt];
                    Ht.buffer ? (Fe.enableVertexAttribArray(Yt), Ht.buffer.bind(), Fe.vertexAttribPointer(Yt, Ht.size, Ht.type, Ht.normalized, Ht.stride, Ht.offfset), en && Ht.divisor && en.vertexAttribDivisorANGLE(Yt, Ht.divisor)) : (Fe.disableVertexAttribArray(Yt), Fe.vertexAttrib4f(Yt, Ht.x, Ht.y, Ht.z, Ht.w));
                  }
                  lt.elements ? Fe.bindBuffer(34963, lt.elements.buffer.buffer) : Fe.bindBuffer(34963, null);
                }
                Jt.currentVAO = qt;
              }
            }, clear: pt.oes_vertex_array_object ? function() {
              Me(xt).forEach(function(qt) {
                qt.destroy();
              });
            } : function() {
            } };
            return st.prototype.bindAttrs = function() {
              for (var qt = pt.angle_instanced_arrays, en = this.attributes, Yt = 0; Yt < en.length; ++Yt) {
                var Ht = en[Yt];
                Ht.buffer ? (Fe.enableVertexAttribArray(Yt), Fe.bindBuffer(34962, Ht.buffer.buffer), Fe.vertexAttribPointer(Yt, Ht.size, Ht.type, Ht.normalized, Ht.stride, Ht.offset), qt && Ht.divisor && qt.vertexAttribDivisorANGLE(Yt, Ht.divisor)) : (Fe.disableVertexAttribArray(Yt), Fe.vertexAttrib4f(Yt, Ht.x, Ht.y, Ht.z, Ht.w));
              }
              for (qt = en.length; qt < Ot; ++qt) Fe.disableVertexAttribArray(qt);
              (qt = Ft.getElements(this.elements)) ? Fe.bindBuffer(34963, qt.buffer.buffer) : Fe.bindBuffer(34963, null);
            }, st.prototype.refresh = function() {
              var qt = pt.oes_vertex_array_object;
              qt && (qt.bindVertexArrayOES(this.vao), this.bindAttrs(), Jt.currentVAO = null, qt.bindVertexArrayOES(null));
            }, st.prototype.destroy = function() {
              if (this.vao) {
                var qt = pt.oes_vertex_array_object;
                this === Jt.currentVAO && (Jt.currentVAO = null, qt.bindVertexArrayOES(null)), qt.deleteVertexArrayOES(this.vao), this.vao = null;
              }
              this.ownsElements && (this.elements.destroy(), this.elements = null, this.ownsElements = !1), xt[this.id] && (delete xt[this.id], --At.vaoCount);
            }, Jt;
          }
          function V(Fe, pt, Mt, At) {
            function Rt(en, Yt, Ht, sn) {
              this.name = en, this.id = Yt, this.location = Ht, this.info = sn;
            }
            function Ft(en, Yt) {
              for (var Ht = 0; Ht < en.length; ++Ht) if (en[Ht].id === Yt.id) return void (en[Ht].location = Yt.location);
              en.push(Yt);
            }
            function lt(en, Yt, Ht) {
              if (!(fn = (Ht = en === 35632 ? kt : Bt)[Yt])) {
                var sn = pt.str(Yt), fn = Fe.createShader(en);
                Fe.shaderSource(fn, sn), Fe.compileShader(fn), Ht[Yt] = fn;
              }
              return fn;
            }
            function st(en, Yt) {
              this.id = qt++, this.fragId = en, this.vertId = Yt, this.program = null, this.uniforms = [], this.attributes = [], this.refCount = 1, At.profile && (this.stats = { uniformsCount: 0, attributesCount: 0 });
            }
            function Ot(en, Yt, Ht) {
              var sn;
              sn = lt(35632, en.fragId);
              var fn = lt(35633, en.vertId);
              if (Yt = en.program = Fe.createProgram(), Fe.attachShader(Yt, sn), Fe.attachShader(Yt, fn), Ht) for (sn = 0; sn < Ht.length; ++sn) fn = Ht[sn], Fe.bindAttribLocation(Yt, fn[0], fn[1]);
              Fe.linkProgram(Yt), fn = Fe.getProgramParameter(Yt, 35718), At.profile && (en.stats.uniformsCount = fn);
              var In = en.uniforms;
              for (sn = 0; sn < fn; ++sn) if (Ht = Fe.getActiveUniform(Yt, sn)) if (1 < Ht.size) for (var zn = 0; zn < Ht.size; ++zn) {
                var Cn = Ht.name.replace("[0]", "[" + zn + "]");
                Ft(In, new Rt(Cn, pt.id(Cn), Fe.getUniformLocation(Yt, Cn), Ht));
              }
              else Ft(In, new Rt(Ht.name, pt.id(Ht.name), Fe.getUniformLocation(Yt, Ht.name), Ht));
              for (fn = Fe.getProgramParameter(Yt, 35721), At.profile && (en.stats.attributesCount = fn), en = en.attributes, sn = 0; sn < fn; ++sn) (Ht = Fe.getActiveAttrib(Yt, sn)) && Ft(en, new Rt(Ht.name, pt.id(Ht.name), Fe.getAttribLocation(Yt, Ht.name), Ht));
            }
            var kt = {}, Bt = {}, xt = {}, Jt = [], qt = 0;
            return At.profile && (Mt.getMaxUniformsCount = function() {
              var en = 0;
              return Jt.forEach(function(Yt) {
                Yt.stats.uniformsCount > en && (en = Yt.stats.uniformsCount);
              }), en;
            }, Mt.getMaxAttributesCount = function() {
              var en = 0;
              return Jt.forEach(function(Yt) {
                Yt.stats.attributesCount > en && (en = Yt.stats.attributesCount);
              }), en;
            }), { clear: function() {
              var en = Fe.deleteShader.bind(Fe);
              Me(kt).forEach(en), kt = {}, Me(Bt).forEach(en), Bt = {}, Jt.forEach(function(Yt) {
                Fe.deleteProgram(Yt.program);
              }), Jt.length = 0, xt = {}, Mt.shaderCount = 0;
            }, program: function(en, Yt, Ht, sn) {
              var fn = xt[Yt];
              fn || (fn = xt[Yt] = {});
              var In = fn[en];
              if (In && (In.refCount++, !sn)) return In;
              var zn = new st(Yt, en);
              return Mt.shaderCount++, Ot(zn, Ht, sn), In || (fn[en] = zn), Jt.push(zn), ae(zn, { destroy: function() {
                if (zn.refCount--, 0 >= zn.refCount) {
                  Fe.deleteProgram(zn.program);
                  var Cn = Jt.indexOf(zn);
                  Jt.splice(Cn, 1), Mt.shaderCount--;
                }
                0 >= fn[zn.vertId].refCount && (Fe.deleteShader(Bt[zn.vertId]), delete Bt[zn.vertId], delete xt[zn.fragId][zn.vertId]), Object.keys(xt[zn.fragId]).length || (Fe.deleteShader(kt[zn.fragId]), delete kt[zn.fragId], delete xt[zn.fragId]);
              } });
            }, restore: function() {
              kt = {}, Bt = {};
              for (var en = 0; en < Jt.length; ++en) Ot(Jt[en], null, Jt[en].attributes.map(function(Yt) {
                return [Yt.location, Yt.name];
              }));
            }, shader: lt, frag: -1, vert: -1 };
          }
          function $(Fe, pt, Mt, At, Rt, Ft, lt) {
            function st(Ot) {
              var kt;
              kt = pt.next === null ? 5121 : pt.next.colorAttachments[0].texture._texture.type;
              var Bt = 0, xt = 0, Jt = At.framebufferWidth, qt = At.framebufferHeight, en = null;
              return Se(Ot) ? en = Ot : Ot && (Bt = 0 | Ot.x, xt = 0 | Ot.y, Jt = 0 | (Ot.width || At.framebufferWidth - Bt), qt = 0 | (Ot.height || At.framebufferHeight - xt), en = Ot.data || null), Mt(), Ot = Jt * qt * 4, en || (kt === 5121 ? en = new Uint8Array(Ot) : kt === 5126 && (en = en || new Float32Array(Ot))), Fe.pixelStorei(3333, 4), Fe.readPixels(Bt, xt, Jt, qt, 6408, kt, en), en;
            }
            return function(Ot) {
              return Ot && "framebuffer" in Ot ? function(kt) {
                var Bt;
                return pt.setFBO({ framebuffer: kt.framebuffer }, function() {
                  Bt = st(kt);
                }), Bt;
              }(Ot) : st(Ot);
            };
          }
          function q(Fe, pt) {
            return Fe >>> pt | Fe << 32 - pt;
          }
          function K(Fe, pt) {
            var Mt = (65535 & Fe) + (65535 & pt);
            return (Fe >> 16) + (pt >> 16) + (Mt >> 16) << 16 | 65535 & Mt;
          }
          function re(Fe) {
            return Array.prototype.slice.call(Fe);
          }
          function Y(Fe) {
            return re(Fe).join("");
          }
          function te(Fe) {
            function pt() {
              var Bt = [], xt = [];
              return ae(function() {
                Bt.push.apply(Bt, re(arguments));
              }, { def: function() {
                var Jt = "v" + Rt++;
                return xt.push(Jt), 0 < arguments.length && (Bt.push(Jt, "="), Bt.push.apply(Bt, re(arguments)), Bt.push(";")), Jt;
              }, toString: function() {
                return Y([0 < xt.length ? "var " + xt.join(",") + ";" : "", Y(Bt)]);
              } });
            }
            function Mt() {
              function Bt(Yt, Ht) {
                Jt(Yt, Ht, "=", xt.def(Yt, Ht), ";");
              }
              var xt = pt(), Jt = pt(), qt = xt.toString, en = Jt.toString;
              return ae(function() {
                xt.apply(xt, re(arguments));
              }, { def: xt.def, entry: xt, exit: Jt, save: Bt, set: function(Yt, Ht, sn) {
                Bt(Yt, Ht), xt(Yt, Ht, "=", sn, ";");
              }, toString: function() {
                return qt() + en();
              } });
            }
            var At = Fe && Fe.cache, Rt = 0, Ft = [], lt = [], st = [], Ot = pt(), kt = {};
            return { global: Ot, link: function(Bt, xt) {
              var Jt = xt && xt.stable;
              if (!Jt) {
                for (var qt = 0; qt < lt.length; ++qt) if (lt[qt] === Bt && !st[qt]) return Ft[qt];
              }
              return qt = "g" + Rt++, Ft.push(qt), lt.push(Bt), st.push(Jt), qt;
            }, block: pt, proc: function(Bt, xt) {
              function Jt() {
                var Ht = "a" + qt.length;
                return qt.push(Ht), Ht;
              }
              var qt = [];
              xt = xt || 0;
              for (var en = 0; en < xt; ++en) Jt();
              var Yt = (en = Mt()).toString;
              return kt[Bt] = ae(en, { arg: Jt, toString: function() {
                return Y(["function(", qt.join(), "){", Yt(), "}"]);
              } });
            }, scope: Mt, cond: function() {
              var Bt = Y(arguments), xt = Mt(), Jt = Mt(), qt = xt.toString, en = Jt.toString;
              return ae(xt, { then: function() {
                return xt.apply(xt, re(arguments)), this;
              }, else: function() {
                return Jt.apply(Jt, re(arguments)), this;
              }, toString: function() {
                var Yt = en();
                return Yt && (Yt = "else{" + Yt + "}"), Y(["if(", Bt, "){", qt(), "}", Yt]);
              } });
            }, compile: function() {
              var Bt = ['"use strict";', Ot, "return {"];
              Object.keys(kt).forEach(function(qt) {
                Bt.push('"', qt, '":', kt[qt].toString(), ",");
              }), Bt.push("}");
              var xt, Jt = Y(Bt).replace(/;/g, `;
`).replace(/}/g, `}
`).replace(/{/g, `{
`);
              return At && (xt = function(qt) {
                for (var en, Yt = "", Ht = 0; Ht < qt.length; Ht++) en = qt.charCodeAt(Ht), Yt += "0123456789abcdef".charAt(en >>> 4 & 15) + "0123456789abcdef".charAt(15 & en);
                return Yt;
              }(function(qt) {
                for (var en = Array(qt.length >> 2), Yt = 0; Yt < en.length; Yt++) en[Yt] = 0;
                for (Yt = 0; Yt < 8 * qt.length; Yt += 8) en[Yt >> 5] |= (255 & qt.charCodeAt(Yt / 8)) << 24 - Yt % 32;
                var Ht, sn, fn, In, zn, Cn, gn, Mn, Xn, Pn, wn, Rn = 8 * qt.length;
                for (qt = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225], Yt = Array(64), en[Rn >> 5] |= 128 << 24 - Rn % 32, en[15 + (Rn + 64 >> 9 << 4)] = Rn, Mn = 0; Mn < en.length; Mn += 16) {
                  for (Rn = qt[0], Ht = qt[1], sn = qt[2], fn = qt[3], In = qt[4], zn = qt[5], Cn = qt[6], gn = qt[7], Xn = 0; 64 > Xn; Xn++) {
                    var _n;
                    16 > Xn ? Yt[Xn] = en[Xn + Mn] : (Pn = Xn, wn = K(wn = q(wn = Yt[Xn - 2], 17) ^ q(wn, 19) ^ wn >>> 10, Yt[Xn - 7]), _n = q(_n = Yt[Xn - 15], 7) ^ q(_n, 18) ^ _n >>> 3, Yt[Pn] = K(K(wn, _n), Yt[Xn - 16])), Pn = K(K(K(K(gn, Pn = q(Pn = In, 6) ^ q(Pn, 11) ^ q(Pn, 25)), In & zn ^ ~In & Cn), mt[Xn]), Yt[Xn]), wn = K(gn = q(gn = Rn, 2) ^ q(gn, 13) ^ q(gn, 22), Rn & Ht ^ Rn & sn ^ Ht & sn), gn = Cn, Cn = zn, zn = In, In = K(fn, Pn), fn = sn, sn = Ht, Ht = Rn, Rn = K(Pn, wn);
                  }
                  qt[0] = K(Rn, qt[0]), qt[1] = K(Ht, qt[1]), qt[2] = K(sn, qt[2]), qt[3] = K(fn, qt[3]), qt[4] = K(In, qt[4]), qt[5] = K(zn, qt[5]), qt[6] = K(Cn, qt[6]), qt[7] = K(gn, qt[7]);
                }
                for (en = "", Yt = 0; Yt < 32 * qt.length; Yt += 8) en += String.fromCharCode(qt[Yt >> 5] >>> 24 - Yt % 32 & 255);
                return en;
              }(function(qt) {
                for (var en, Yt, Ht = "", sn = -1; ++sn < qt.length; ) en = qt.charCodeAt(sn), Yt = sn + 1 < qt.length ? qt.charCodeAt(sn + 1) : 0, 55296 <= en && 56319 >= en && 56320 <= Yt && 57343 >= Yt && (en = 65536 + ((1023 & en) << 10) + (1023 & Yt), sn++), 127 >= en ? Ht += String.fromCharCode(en) : 2047 >= en ? Ht += String.fromCharCode(192 | en >>> 6 & 31, 128 | 63 & en) : 65535 >= en ? Ht += String.fromCharCode(224 | en >>> 12 & 15, 128 | en >>> 6 & 63, 128 | 63 & en) : 2097151 >= en && (Ht += String.fromCharCode(240 | en >>> 18 & 7, 128 | en >>> 12 & 63, 128 | en >>> 6 & 63, 128 | 63 & en));
                return Ht;
              }(Jt))), At[xt]) ? At[xt].apply(null, lt) : (Jt = Function.apply(null, Ft.concat(Jt)), At && (At[xt] = Jt), Jt.apply(null, lt));
            } };
          }
          function ee(Fe) {
            return Array.isArray(Fe) || Se(Fe) || f(Fe);
          }
          function X(Fe) {
            return Fe.sort(function(pt, Mt) {
              return pt === "viewport" ? -1 : Mt === "viewport" ? 1 : pt < Mt ? -1 : 1;
            });
          }
          function Q(Fe, pt, Mt, At) {
            this.thisDep = Fe, this.contextDep = pt, this.propDep = Mt, this.append = At;
          }
          function ue(Fe) {
            return Fe && !(Fe.thisDep || Fe.contextDep || Fe.propDep);
          }
          function ce(Fe) {
            return new Q(!1, !1, !1, Fe);
          }
          function he(Fe, pt) {
            var Mt = Fe.type;
            if (Mt === 0) return new Q(!0, 1 <= (Mt = Fe.data.length), 2 <= Mt, pt);
            if (Mt === 4) return new Q((Mt = Fe.data).thisDep, Mt.contextDep, Mt.propDep, pt);
            if (Mt === 5) return new Q(!1, !1, !1, pt);
            if (Mt === 6) {
              for (var At = Mt = !1, Rt = !1, Ft = 0; Ft < Fe.data.length; ++Ft) {
                var lt = Fe.data[Ft];
                lt.type === 1 ? Rt = !0 : lt.type === 2 ? At = !0 : lt.type === 3 ? Mt = !0 : lt.type === 0 ? (Mt = !0, 1 <= (lt = lt.data) && (At = !0), 2 <= lt && (Rt = !0)) : lt.type === 4 && (Mt = Mt || lt.data.thisDep, At = At || lt.data.contextDep, Rt = Rt || lt.data.propDep);
              }
              return new Q(Mt, At, Rt, pt);
            }
            return new Q(Mt === 3, Mt === 2, Mt === 1, pt);
          }
          function de(Fe, pt, Mt, At, Rt, Ft, lt, st, Ot, kt, Bt, xt, Jt, qt, en, Yt) {
            function Ht(on) {
              return on.replace(".", "_");
            }
            function sn(on, ln, bn) {
              var Nn = Ht(on);
              Tr.push(on), ur[Nn] = $n[Nn] = !!bn, wr[Nn] = ln;
            }
            function fn(on, ln, bn) {
              var Nn = Ht(on);
              Tr.push(on), Array.isArray(bn) ? ($n[Nn] = bn.slice(), ur[Nn] = bn.slice()) : $n[Nn] = ur[Nn] = bn, Fr[Nn] = ln;
            }
            function In() {
              var on = te({ cache: en }), ln = on.link, bn = on.global;
              on.id = Gn++, on.batchId = "0";
              var Nn = ln(Xr), jn = on.shared = { props: "a0" };
              Object.keys(Xr).forEach(function(dn) {
                jn[dn] = bn.def(Nn, ".", dn);
              });
              var Jn = on.next = {}, Hn = on.current = {};
              Object.keys(Fr).forEach(function(dn) {
                Array.isArray($n[dn]) && (Jn[dn] = bn.def(jn.next, ".", dn), Hn[dn] = bn.def(jn.current, ".", dn));
              });
              var Ln = on.constants = {};
              Object.keys(un).forEach(function(dn) {
                Ln[dn] = bn.def(JSON.stringify(un[dn]));
              }), on.invoke = function(dn, Dn) {
                switch (Dn.type) {
                  case 0:
                    var nr = ["this", jn.context, jn.props, on.batchId];
                    return dn.def(ln(Dn.data), ".call(", nr.slice(0, Math.max(Dn.data.length + 1, 4)), ")");
                  case 1:
                    return dn.def(jn.props, Dn.data);
                  case 2:
                    return dn.def(jn.context, Dn.data);
                  case 3:
                    return dn.def("this", Dn.data);
                  case 4:
                    return Dn.data.append(on, dn), Dn.data.ref;
                  case 5:
                    return Dn.data.toString();
                  case 6:
                    return Dn.data.map(function(pr) {
                      return on.invoke(dn, pr);
                    });
                }
              }, on.attribCache = {};
              var pn = {};
              return on.scopeAttrib = function(dn) {
                if ((dn = pt.id(dn)) in pn) return pn[dn];
                var Dn = kt.scope[dn];
                return Dn || (Dn = kt.scope[dn] = new yr()), pn[dn] = ln(Dn);
              }, on;
            }
            function zn(on, ln) {
              var bn = on.static, Nn = on.dynamic;
              if ("framebuffer" in bn) {
                var jn = bn.framebuffer;
                return jn ? (jn = st.getFramebuffer(jn), ce(function(Hn, Ln) {
                  var pn = Hn.link(jn), dn = Hn.shared;
                  return Ln.set(dn.framebuffer, ".next", pn), dn = dn.context, Ln.set(dn, ".framebufferWidth", pn + ".width"), Ln.set(dn, ".framebufferHeight", pn + ".height"), pn;
                })) : ce(function(Hn, Ln) {
                  var pn = Hn.shared;
                  return Ln.set(pn.framebuffer, ".next", "null"), pn = pn.context, Ln.set(pn, ".framebufferWidth", pn + ".drawingBufferWidth"), Ln.set(pn, ".framebufferHeight", pn + ".drawingBufferHeight"), "null";
                });
              }
              if ("framebuffer" in Nn) {
                var Jn = Nn.framebuffer;
                return he(Jn, function(Hn, Ln) {
                  var pn = Hn.invoke(Ln, Jn), dn = Hn.shared, Dn = dn.framebuffer;
                  return pn = Ln.def(Dn, ".getFramebuffer(", pn, ")"), Ln.set(Dn, ".next", pn), dn = dn.context, Ln.set(dn, ".framebufferWidth", pn + "?" + pn + ".width:" + dn + ".drawingBufferWidth"), Ln.set(dn, ".framebufferHeight", pn + "?" + pn + ".height:" + dn + ".drawingBufferHeight"), pn;
                });
              }
              return null;
            }
            function Cn(on, ln, bn) {
              function Nn(dn) {
                if (dn in jn) {
                  var Dn = pt.id(jn[dn]);
                  return (dn = ce(function() {
                    return Dn;
                  })).id = Dn, dn;
                }
                if (dn in Jn) {
                  var nr = Jn[dn];
                  return he(nr, function(pr, ir) {
                    var gr = pr.invoke(ir, nr);
                    return ir.def(pr.shared.strings, ".id(", gr, ")");
                  });
                }
                return null;
              }
              var jn = on.static, Jn = on.dynamic, Hn = Nn("frag"), Ln = Nn("vert"), pn = null;
              return ue(Hn) && ue(Ln) ? (pn = Bt.program(Ln.id, Hn.id, null, bn), on = ce(function(dn, Dn) {
                return dn.link(pn);
              })) : on = new Q(Hn && Hn.thisDep || Ln && Ln.thisDep, Hn && Hn.contextDep || Ln && Ln.contextDep, Hn && Hn.propDep || Ln && Ln.propDep, function(dn, Dn) {
                var nr, pr, ir = dn.shared.shader;
                return nr = Hn ? Hn.append(dn, Dn) : Dn.def(ir, ".", "frag"), pr = Ln ? Ln.append(dn, Dn) : Dn.def(ir, ".", "vert"), Dn.def(ir + ".program(" + pr + "," + nr + ")");
              }), { frag: Hn, vert: Ln, progVar: on, program: pn };
            }
            function gn(on, ln) {
              function bn(gr, Pr) {
                if (gr in Nn) {
                  var Cr = 0 | Nn[gr];
                  return Pr ? Jn.offset = Cr : Jn.instances = Cr, ce(function(Sr, Dr) {
                    return Pr && (Sr.OFFSET = Cr), Cr;
                  });
                }
                if (gr in jn) {
                  var Er = jn[gr];
                  return he(Er, function(Sr, Dr) {
                    var Qn = Sr.invoke(Dr, Er);
                    return Pr && (Sr.OFFSET = Qn), Qn;
                  });
                }
                if (Pr) {
                  if (pn) return ce(function(Sr, Dr) {
                    return Sr.OFFSET = 0;
                  });
                  if (Hn) return new Q(Ln.thisDep, Ln.contextDep, Ln.propDep, function(Sr, Dr) {
                    return Dr.def(Sr.shared.vao + ".currentVAO?" + Sr.shared.vao + ".currentVAO.offset:0");
                  });
                } else if (Hn) return new Q(Ln.thisDep, Ln.contextDep, Ln.propDep, function(Sr, Dr) {
                  return Dr.def(Sr.shared.vao + ".currentVAO?" + Sr.shared.vao + ".currentVAO.instances:-1");
                });
                return null;
              }
              var Nn = on.static, jn = on.dynamic, Jn = {}, Hn = !1, Ln = function() {
                if ("vao" in Nn) {
                  var gr = Nn.vao;
                  return gr !== null && kt.getVAO(gr) === null && (gr = kt.createVAO(gr)), Hn = !0, Jn.vao = gr, ce(function(Cr) {
                    var Er = kt.getVAO(gr);
                    return Er ? Cr.link(Er) : "null";
                  });
                }
                if ("vao" in jn) {
                  Hn = !0;
                  var Pr = jn.vao;
                  return he(Pr, function(Cr, Er) {
                    var Sr = Cr.invoke(Er, Pr);
                    return Er.def(Cr.shared.vao + ".getVAO(" + Sr + ")");
                  });
                }
                return null;
              }(), pn = !1, dn = function() {
                if ("elements" in Nn) {
                  var gr = Nn.elements;
                  if (Jn.elements = gr, ee(gr)) {
                    var Pr = Jn.elements = Ft.create(gr, !0);
                    gr = Ft.getElements(Pr), pn = !0;
                  } else gr && (gr = Ft.getElements(gr), pn = !0);
                  return Pr = ce(function(Er, Sr) {
                    if (gr) {
                      var Dr = Er.link(gr);
                      return Er.ELEMENTS = Dr;
                    }
                    return Er.ELEMENTS = null;
                  }), Pr.value = gr, Pr;
                }
                if ("elements" in jn) {
                  pn = !0;
                  var Cr = jn.elements;
                  return he(Cr, function(Er, Sr) {
                    var Dr = (Qn = Er.shared).isBufferArgs, Qn = Qn.elements, ri = Er.invoke(Sr, Cr), Zr = Sr.def("null");
                    return Dr = Sr.def(Dr, "(", ri, ")"), ri = Er.cond(Dr).then(Zr, "=", Qn, ".createStream(", ri, ");").else(Zr, "=", Qn, ".getElements(", ri, ");"), Sr.entry(ri), Sr.exit(Er.cond(Dr).then(Qn, ".destroyStream(", Zr, ");")), Er.ELEMENTS = Zr;
                  });
                }
                return Hn ? new Q(Ln.thisDep, Ln.contextDep, Ln.propDep, function(Er, Sr) {
                  return Sr.def(Er.shared.vao + ".currentVAO?" + Er.shared.elements + ".getElements(" + Er.shared.vao + ".currentVAO.elements):null");
                }) : null;
              }(), Dn = bn("offset", !0), nr = function() {
                if ("primitive" in Nn) {
                  var gr = Nn.primitive;
                  return Jn.primitive = gr, ce(function(Cr, Er) {
                    return Ce[gr];
                  });
                }
                if ("primitive" in jn) {
                  var Pr = jn.primitive;
                  return he(Pr, function(Cr, Er) {
                    var Sr = Cr.constants.primTypes, Dr = Cr.invoke(Er, Pr);
                    return Er.def(Sr, "[", Dr, "]");
                  });
                }
                return pn ? ue(dn) ? dn.value ? ce(function(Cr, Er) {
                  return Er.def(Cr.ELEMENTS, ".primType");
                }) : ce(function() {
                  return 4;
                }) : new Q(dn.thisDep, dn.contextDep, dn.propDep, function(Cr, Er) {
                  var Sr = Cr.ELEMENTS;
                  return Er.def(Sr, "?", Sr, ".primType:", 4);
                }) : Hn ? new Q(Ln.thisDep, Ln.contextDep, Ln.propDep, function(Cr, Er) {
                  return Er.def(Cr.shared.vao + ".currentVAO?" + Cr.shared.vao + ".currentVAO.primitive:4");
                }) : null;
              }(), pr = function() {
                if ("count" in Nn) {
                  var gr = 0 | Nn.count;
                  return Jn.count = gr, ce(function() {
                    return gr;
                  });
                }
                if ("count" in jn) {
                  var Pr = jn.count;
                  return he(Pr, function(Cr, Er) {
                    return Cr.invoke(Er, Pr);
                  });
                }
                return pn ? ue(dn) ? dn ? Dn ? new Q(Dn.thisDep, Dn.contextDep, Dn.propDep, function(Cr, Er) {
                  return Er.def(Cr.ELEMENTS, ".vertCount-", Cr.OFFSET);
                }) : ce(function(Cr, Er) {
                  return Er.def(Cr.ELEMENTS, ".vertCount");
                }) : ce(function() {
                  return -1;
                }) : new Q(dn.thisDep || Dn.thisDep, dn.contextDep || Dn.contextDep, dn.propDep || Dn.propDep, function(Cr, Er) {
                  var Sr = Cr.ELEMENTS;
                  return Cr.OFFSET ? Er.def(Sr, "?", Sr, ".vertCount-", Cr.OFFSET, ":-1") : Er.def(Sr, "?", Sr, ".vertCount:-1");
                }) : Hn ? new Q(Ln.thisDep, Ln.contextDep, Ln.propDep, function(Cr, Er) {
                  return Er.def(Cr.shared.vao, ".currentVAO?", Cr.shared.vao, ".currentVAO.count:-1");
                }) : null;
              }(), ir = bn("instances", !1);
              return { elements: dn, primitive: nr, count: pr, instances: ir, offset: Dn, vao: Ln, vaoActive: Hn, elementsActive: pn, static: Jn };
            }
            function Mn(on, ln) {
              var bn = on.static, Nn = on.dynamic, jn = {};
              return Object.keys(bn).forEach(function(Jn) {
                var Hn = bn[Jn], Ln = pt.id(Jn), pn = new yr();
                if (ee(Hn)) pn.state = 1, pn.buffer = Rt.getBuffer(Rt.create(Hn, 34962, !1, !0)), pn.type = 0;
                else if (Dn = Rt.getBuffer(Hn)) pn.state = 1, pn.buffer = Dn, pn.type = 0;
                else if ("constant" in Hn) {
                  var dn = Hn.constant;
                  pn.buffer = "null", pn.state = 2, typeof dn == "number" ? pn.x = dn : at.forEach(function(Cr, Er) {
                    Er < dn.length && (pn[Cr] = dn[Er]);
                  });
                } else {
                  var Dn = ee(Hn.buffer) ? Rt.getBuffer(Rt.create(Hn.buffer, 34962, !1, !0)) : Rt.getBuffer(Hn.buffer), nr = 0 | Hn.offset, pr = 0 | Hn.stride, ir = 0 | Hn.size, gr = !!Hn.normalized, Pr = 0;
                  "type" in Hn && (Pr = We[Hn.type]), Hn = 0 | Hn.divisor, pn.buffer = Dn, pn.state = 1, pn.size = ir, pn.normalized = gr, pn.type = Pr || Dn.dtype, pn.offset = nr, pn.stride = pr, pn.divisor = Hn;
                }
                jn[Jn] = ce(function(Cr, Er) {
                  var Sr = Cr.attribCache;
                  if (Ln in Sr) return Sr[Ln];
                  var Dr = { isStream: !1 };
                  return Object.keys(pn).forEach(function(Qn) {
                    Dr[Qn] = pn[Qn];
                  }), pn.buffer && (Dr.buffer = Cr.link(pn.buffer), Dr.type = Dr.type || Dr.buffer + ".dtype"), Sr[Ln] = Dr;
                });
              }), Object.keys(Nn).forEach(function(Jn) {
                var Hn = Nn[Jn];
                jn[Jn] = he(Hn, function(Ln, pn) {
                  function dn(Sr) {
                    pn(gr[Sr], "=", Dn, ".", Sr, "|0;");
                  }
                  var Dn = Ln.invoke(pn, Hn), nr = Ln.shared, pr = Ln.constants, ir = nr.isBufferArgs, gr = (nr = nr.buffer, { isStream: pn.def(!1) }), Pr = new yr();
                  Pr.state = 1, Object.keys(Pr).forEach(function(Sr) {
                    gr[Sr] = pn.def("" + Pr[Sr]);
                  });
                  var Cr = gr.buffer, Er = gr.type;
                  return pn("if(", ir, "(", Dn, ")){", gr.isStream, "=true;", Cr, "=", nr, ".createStream(", 34962, ",", Dn, ");", Er, "=", Cr, ".dtype;", "}else{", Cr, "=", nr, ".getBuffer(", Dn, ");", "if(", Cr, "){", Er, "=", Cr, ".dtype;", '}else if("constant" in ', Dn, "){", gr.state, "=", 2, ";", "if(typeof " + Dn + '.constant === "number"){', gr[at[0]], "=", Dn, ".constant;", at.slice(1).map(function(Sr) {
                    return gr[Sr];
                  }).join("="), "=0;", "}else{", at.map(function(Sr, Dr) {
                    return gr[Sr] + "=" + Dn + ".constant.length>" + Dr + "?" + Dn + ".constant[" + Dr + "]:0;";
                  }).join(""), "}}else{", "if(", ir, "(", Dn, ".buffer)){", Cr, "=", nr, ".createStream(", 34962, ",", Dn, ".buffer);", "}else{", Cr, "=", nr, ".getBuffer(", Dn, ".buffer);", "}", Er, '="type" in ', Dn, "?", pr.glTypes, "[", Dn, ".type]:", Cr, ".dtype;", gr.normalized, "=!!", Dn, ".normalized;"), dn("size"), dn("offset"), dn("stride"), dn("divisor"), pn("}}"), pn.exit("if(", gr.isStream, "){", nr, ".destroyStream(", Cr, ");", "}"), gr;
                });
              }), jn;
            }
            function Xn(on, ln, bn, Nn, jn) {
              function Jn(Pr) {
                var Cr = Ln[Pr];
                Cr && (dn[Pr] = Cr);
              }
              var Hn = function(Pr, Cr) {
                if (typeof (Er = Pr.static).frag == "string" && typeof Er.vert == "string") {
                  if (0 < Object.keys(Cr.dynamic).length) return null;
                  var Er = Cr.static, Sr = Object.keys(Er);
                  if (0 < Sr.length && typeof Er[Sr[0]] == "number") {
                    for (var Dr = [], Qn = 0; Qn < Sr.length; ++Qn) Dr.push([0 | Er[Sr[Qn]], Sr[Qn]]);
                    return Dr;
                  }
                }
                return null;
              }(on, ln), Ln = function(Pr, Cr, Er) {
                function Sr(Zr) {
                  if (Zr in Dr) {
                    var Br = Dr[Zr];
                    Zr = !0;
                    var Yr, yi, si = 0 | Br.x, Pa = 0 | Br.y;
                    return "width" in Br ? Yr = 0 | Br.width : Zr = !1, "height" in Br ? yi = 0 | Br.height : Zr = !1, new Q(!Zr && Cr && Cr.thisDep, !Zr && Cr && Cr.contextDep, !Zr && Cr && Cr.propDep, function(To, Ba) {
                      var eo = To.shared.context, Ds = Yr;
                      "width" in Br || (Ds = Ba.def(eo, ".", "framebufferWidth", "-", si));
                      var ji = yi;
                      return "height" in Br || (ji = Ba.def(eo, ".", "framebufferHeight", "-", Pa)), [si, Pa, Ds, ji];
                    });
                  }
                  if (Zr in Qn) {
                    var Ni = Qn[Zr];
                    return Zr = he(Ni, function(To, Ba) {
                      var eo = To.invoke(Ba, Ni), Ds = To.shared.context, ji = Ba.def(eo, ".x|0"), Ao = Ba.def(eo, ".y|0");
                      return [ji, Ao, Ba.def('"width" in ', eo, "?", eo, ".width|0:", "(", Ds, ".", "framebufferWidth", "-", ji, ")"), eo = Ba.def('"height" in ', eo, "?", eo, ".height|0:", "(", Ds, ".", "framebufferHeight", "-", Ao, ")")];
                    }), Cr && (Zr.thisDep = Zr.thisDep || Cr.thisDep, Zr.contextDep = Zr.contextDep || Cr.contextDep, Zr.propDep = Zr.propDep || Cr.propDep), Zr;
                  }
                  return Cr ? new Q(Cr.thisDep, Cr.contextDep, Cr.propDep, function(To, Ba) {
                    var eo = To.shared.context;
                    return [0, 0, Ba.def(eo, ".", "framebufferWidth"), Ba.def(eo, ".", "framebufferHeight")];
                  }) : null;
                }
                var Dr = Pr.static, Qn = Pr.dynamic;
                if (Pr = Sr("viewport")) {
                  var ri = Pr;
                  Pr = new Q(Pr.thisDep, Pr.contextDep, Pr.propDep, function(Zr, Br) {
                    var Yr = ri.append(Zr, Br), yi = Zr.shared.context;
                    return Br.set(yi, ".viewportWidth", Yr[2]), Br.set(yi, ".viewportHeight", Yr[3]), Yr;
                  });
                }
                return { viewport: Pr, scissor_box: Sr("scissor.box") };
              }(on, nr = zn(on)), pn = gn(on), dn = function(Pr, Cr) {
                var Er = Pr.static, Sr = Pr.dynamic, Dr = {};
                return Tr.forEach(function(Qn) {
                  function ri(Br, Yr) {
                    if (Qn in Er) {
                      var yi = Br(Er[Qn]);
                      Dr[Zr] = ce(function() {
                        return yi;
                      });
                    } else if (Qn in Sr) {
                      var si = Sr[Qn];
                      Dr[Zr] = he(si, function(Pa, Ni) {
                        return Yr(Pa, Ni, Pa.invoke(Ni, si));
                      });
                    }
                  }
                  var Zr = Ht(Qn);
                  switch (Qn) {
                    case "cull.enable":
                    case "blend.enable":
                    case "dither":
                    case "stencil.enable":
                    case "depth.enable":
                    case "scissor.enable":
                    case "polygonOffset.enable":
                    case "sample.alpha":
                    case "sample.enable":
                    case "depth.mask":
                    case "lineWidth":
                      return ri(function(Br) {
                        return Br;
                      }, function(Br, Yr, yi) {
                        return yi;
                      });
                    case "depth.func":
                      return ri(function(Br) {
                        return Je[Br];
                      }, function(Br, Yr, yi) {
                        return Yr.def(Br.constants.compareFuncs, "[", yi, "]");
                      });
                    case "depth.range":
                      return ri(function(Br) {
                        return Br;
                      }, function(Br, Yr, yi) {
                        return [Yr.def("+", yi, "[0]"), Yr = Yr.def("+", yi, "[1]")];
                      });
                    case "blend.func":
                      return ri(function(Br) {
                        return [St["srcRGB" in Br ? Br.srcRGB : Br.src], St["dstRGB" in Br ? Br.dstRGB : Br.dst], St["srcAlpha" in Br ? Br.srcAlpha : Br.src], St["dstAlpha" in Br ? Br.dstAlpha : Br.dst]];
                      }, function(Br, Yr, yi) {
                        function si(Ba, eo) {
                          return Yr.def('"', Ba, eo, '" in ', yi, "?", yi, ".", Ba, eo, ":", yi, ".", Ba);
                        }
                        Br = Br.constants.blendFuncs;
                        var Pa = si("src", "RGB"), Ni = si("dst", "RGB"), To = (Pa = Yr.def(Br, "[", Pa, "]"), Yr.def(Br, "[", si("src", "Alpha"), "]"));
                        return [Pa, Ni = Yr.def(Br, "[", Ni, "]"), To, Br = Yr.def(Br, "[", si("dst", "Alpha"), "]")];
                      });
                    case "blend.equation":
                      return ri(function(Br) {
                        return typeof Br == "string" ? [Vr[Br], Vr[Br]] : typeof Br == "object" ? [Vr[Br.rgb], Vr[Br.alpha]] : void 0;
                      }, function(Br, Yr, yi) {
                        var si = Br.constants.blendEquations, Pa = Yr.def(), Ni = Yr.def();
                        return (Br = Br.cond("typeof ", yi, '==="string"')).then(Pa, "=", Ni, "=", si, "[", yi, "];"), Br.else(Pa, "=", si, "[", yi, ".rgb];", Ni, "=", si, "[", yi, ".alpha];"), Yr(Br), [Pa, Ni];
                      });
                    case "blend.color":
                      return ri(function(Br) {
                        return p(4, function(Yr) {
                          return +Br[Yr];
                        });
                      }, function(Br, Yr, yi) {
                        return p(4, function(si) {
                          return Yr.def("+", yi, "[", si, "]");
                        });
                      });
                    case "stencil.mask":
                      return ri(function(Br) {
                        return 0 | Br;
                      }, function(Br, Yr, yi) {
                        return Yr.def(yi, "|0");
                      });
                    case "stencil.func":
                      return ri(function(Br) {
                        return [Je[Br.cmp || "keep"], Br.ref || 0, "mask" in Br ? Br.mask : -1];
                      }, function(Br, Yr, yi) {
                        return [Br = Yr.def('"cmp" in ', yi, "?", Br.constants.compareFuncs, "[", yi, ".cmp]", ":", 7680), Yr.def(yi, ".ref|0"), Yr = Yr.def('"mask" in ', yi, "?", yi, ".mask|0:-1")];
                      });
                    case "stencil.opFront":
                    case "stencil.opBack":
                      return ri(function(Br) {
                        return [Qn === "stencil.opBack" ? 1029 : 1028, nt[Br.fail || "keep"], nt[Br.zfail || "keep"], nt[Br.zpass || "keep"]];
                      }, function(Br, Yr, yi) {
                        function si(Ni) {
                          return Yr.def('"', Ni, '" in ', yi, "?", Pa, "[", yi, ".", Ni, "]:", 7680);
                        }
                        var Pa = Br.constants.stencilOps;
                        return [Qn === "stencil.opBack" ? 1029 : 1028, si("fail"), si("zfail"), si("zpass")];
                      });
                    case "polygonOffset.offset":
                      return ri(function(Br) {
                        return [0 | Br.factor, 0 | Br.units];
                      }, function(Br, Yr, yi) {
                        return [Yr.def(yi, ".factor|0"), Yr = Yr.def(yi, ".units|0")];
                      });
                    case "cull.face":
                      return ri(function(Br) {
                        var Yr = 0;
                        return Br === "front" ? Yr = 1028 : Br === "back" && (Yr = 1029), Yr;
                      }, function(Br, Yr, yi) {
                        return Yr.def(yi, '==="front"?', 1028, ":", 1029);
                      });
                    case "frontFace":
                      return ri(function(Br) {
                        return ot[Br];
                      }, function(Br, Yr, yi) {
                        return Yr.def(yi + '==="cw"?2304:2305');
                      });
                    case "colorMask":
                      return ri(function(Br) {
                        return Br.map(function(Yr) {
                          return !!Yr;
                        });
                      }, function(Br, Yr, yi) {
                        return p(4, function(si) {
                          return "!!" + yi + "[" + si + "]";
                        });
                      });
                    case "sample.coverage":
                      return ri(function(Br) {
                        return ["value" in Br ? Br.value : 1, !!Br.invert];
                      }, function(Br, Yr, yi) {
                        return [Yr.def('"value" in ', yi, "?+", yi, ".value:1"), Yr = Yr.def("!!", yi, ".invert")];
                      });
                  }
                }), Dr;
              }(on), Dn = Cn(on, 0, Hn);
              Jn("viewport"), Jn(Ht("scissor.box"));
              var nr, pr = 0 < Object.keys(dn).length;
              if ((nr = { framebuffer: nr, draw: pn, shader: Dn, state: dn, dirty: pr, scopeVAO: null, drawVAO: null, useVAO: !1, attributes: {} }).profile = function(Pr) {
                var Cr, Er = Pr.static;
                if (Pr = Pr.dynamic, "profile" in Er) {
                  var Sr = !!Er.profile;
                  (Cr = ce(function(Qn, ri) {
                    return Sr;
                  })).enable = Sr;
                } else if ("profile" in Pr) {
                  var Dr = Pr.profile;
                  Cr = he(Dr, function(Qn, ri) {
                    return Qn.invoke(ri, Dr);
                  });
                }
                return Cr;
              }(on), nr.uniforms = function(Pr, Cr) {
                var Er = Pr.static, Sr = Pr.dynamic, Dr = {};
                return Object.keys(Er).forEach(function(Qn) {
                  var ri, Zr = Er[Qn];
                  if (typeof Zr == "number" || typeof Zr == "boolean") ri = ce(function() {
                    return Zr;
                  });
                  else if (typeof Zr == "function") {
                    var Br = Zr._reglType;
                    Br === "texture2d" || Br === "textureCube" ? ri = ce(function(Yr) {
                      return Yr.link(Zr);
                    }) : Br !== "framebuffer" && Br !== "framebufferCube" || (ri = ce(function(Yr) {
                      return Yr.link(Zr.color[0]);
                    }));
                  } else C(Zr) && (ri = ce(function(Yr) {
                    return Yr.global.def("[", p(Zr.length, function(yi) {
                      return Zr[yi];
                    }), "]");
                  }));
                  ri.value = Zr, Dr[Qn] = ri;
                }), Object.keys(Sr).forEach(function(Qn) {
                  var ri = Sr[Qn];
                  Dr[Qn] = he(ri, function(Zr, Br) {
                    return Zr.invoke(Br, ri);
                  });
                }), Dr;
              }(bn), nr.drawVAO = nr.scopeVAO = pn.vao, !nr.drawVAO && Dn.program && !Hn && Mt.angle_instanced_arrays && pn.static.elements) {
                var ir = !0;
                if (on = Dn.program.attributes.map(function(Pr) {
                  return Pr = ln.static[Pr], ir = ir && !!Pr, Pr;
                }), ir && 0 < on.length) {
                  var gr = kt.getVAO(kt.createVAO({ attributes: on, elements: pn.static.elements }));
                  nr.drawVAO = new Q(null, null, null, function(Pr, Cr) {
                    return Pr.link(gr);
                  }), nr.useVAO = !0;
                }
              }
              return Hn ? nr.useVAO = !0 : nr.attributes = Mn(ln), nr.context = function(Pr) {
                var Cr = Pr.static, Er = Pr.dynamic, Sr = {};
                return Object.keys(Cr).forEach(function(Dr) {
                  var Qn = Cr[Dr];
                  Sr[Dr] = ce(function(ri, Zr) {
                    return typeof Qn == "number" || typeof Qn == "boolean" ? "" + Qn : ri.link(Qn);
                  });
                }), Object.keys(Er).forEach(function(Dr) {
                  var Qn = Er[Dr];
                  Sr[Dr] = he(Qn, function(ri, Zr) {
                    return ri.invoke(Zr, Qn);
                  });
                }), Sr;
              }(Nn), nr;
            }
            function Pn(on, ln, bn) {
              var Nn = on.shared.context, jn = on.scope();
              Object.keys(bn).forEach(function(Jn) {
                ln.save(Nn, "." + Jn);
                var Hn = bn[Jn].append(on, ln);
                Array.isArray(Hn) ? jn(Nn, ".", Jn, "=[", Hn.join(), "];") : jn(Nn, ".", Jn, "=", Hn, ";");
              }), ln(jn);
            }
            function wn(on, ln, bn, Nn) {
              var jn, Jn = (Ln = on.shared).gl, Hn = Ln.framebuffer;
              Tn && (jn = ln.def(Ln.extensions, ".webgl_draw_buffers"));
              var Ln = (pn = on.constants).drawBuffer, pn = pn.backBuffer;
              on = bn ? bn.append(on, ln) : ln.def(Hn, ".next"), Nn || ln("if(", on, "!==", Hn, ".cur){"), ln("if(", on, "){", Jn, ".bindFramebuffer(", 36160, ",", on, ".framebuffer);"), Tn && ln(jn, ".drawBuffersWEBGL(", Ln, "[", on, ".colorAttachments.length]);"), ln("}else{", Jn, ".bindFramebuffer(", 36160, ",null);"), Tn && ln(jn, ".drawBuffersWEBGL(", pn, ");"), ln("}", Hn, ".cur=", on, ";"), Nn || ln("}");
            }
            function Rn(on, ln, bn) {
              var Nn = on.shared, jn = Nn.gl, Jn = on.current, Hn = on.next, Ln = Nn.current, pn = Nn.next, dn = on.cond(Ln, ".dirty");
              Tr.forEach(function(Dn) {
                var nr, pr;
                if (!((Dn = Ht(Dn)) in bn.state)) if (Dn in Hn) {
                  nr = Hn[Dn], pr = Jn[Dn];
                  var ir = p($n[Dn].length, function(gr) {
                    return dn.def(nr, "[", gr, "]");
                  });
                  dn(on.cond(ir.map(function(gr, Pr) {
                    return gr + "!==" + pr + "[" + Pr + "]";
                  }).join("||")).then(jn, ".", Fr[Dn], "(", ir, ");", ir.map(function(gr, Pr) {
                    return pr + "[" + Pr + "]=" + gr;
                  }).join(";"), ";"));
                } else nr = dn.def(pn, ".", Dn), ir = on.cond(nr, "!==", Ln, ".", Dn), dn(ir), Dn in wr ? ir(on.cond(nr).then(jn, ".enable(", wr[Dn], ");").else(jn, ".disable(", wr[Dn], ");"), Ln, ".", Dn, "=", nr, ";") : ir(jn, ".", Fr[Dn], "(", nr, ");", Ln, ".", Dn, "=", nr, ";");
              }), Object.keys(bn.state).length === 0 && dn(Ln, ".dirty=false;"), ln(dn);
            }
            function _n(on, ln, bn, Nn) {
              var jn, Jn = on.shared, Hn = on.current, Ln = Jn.current, pn = Jn.gl;
              X(Object.keys(bn)).forEach(function(dn) {
                var Dn = bn[dn];
                if (!Nn || Nn(Dn)) {
                  var nr = Dn.append(on, ln);
                  if (wr[dn]) {
                    var pr = wr[dn];
                    ue(Dn) ? (jn = on.link(nr, { stable: !0 }), ln(on.cond(jn).then(pn, ".enable(", pr, ");").else(pn, ".disable(", pr, ");")), ln(Ln, ".", dn, "=", jn, ";")) : (ln(on.cond(nr).then(pn, ".enable(", pr, ");").else(pn, ".disable(", pr, ");")), ln(Ln, ".", dn, "=", nr, ";"));
                  } else if (C(nr)) {
                    var ir = Hn[dn];
                    ln(pn, ".", Fr[dn], "(", nr, ");", nr.map(function(gr, Pr) {
                      return ir + "[" + Pr + "]=" + gr;
                    }).join(";"), ";");
                  } else ue(Dn) ? (jn = on.link(nr, { stable: !0 }), ln(pn, ".", Fr[dn], "(", jn, ");", Ln, ".", dn, "=", jn, ";")) : ln(pn, ".", Fr[dn], "(", nr, ");", Ln, ".", dn, "=", nr, ";");
                }
              });
            }
            function En(on, ln) {
              rn && (on.instancing = ln.def(on.shared.extensions, ".angle_instanced_arrays"));
            }
            function Kn(on, ln, bn, Nn, jn) {
              function Jn() {
                return typeof performance > "u" ? "Date.now()" : "performance.now()";
              }
              function Hn(Pr) {
                Pr(dn = ln.def(), "=", Jn(), ";"), typeof jn == "string" ? Pr(pr, ".count+=", jn, ";") : Pr(pr, ".count++;"), qt && (Nn ? Pr(Dn = ln.def(), "=", gr, ".getNumPendingQueries();") : Pr(gr, ".beginQuery(", pr, ");"));
              }
              function Ln(Pr) {
                Pr(pr, ".cpuTime+=", Jn(), "-", dn, ";"), qt && (Nn ? Pr(gr, ".pushScopeStats(", Dn, ",", gr, ".getNumPendingQueries(),", pr, ");") : Pr(gr, ".endQuery();"));
              }
              function pn(Pr) {
                var Cr = ln.def(ir, ".profile");
                ln(ir, ".profile=", Pr, ";"), ln.exit(ir, ".profile=", Cr, ";");
              }
              var dn, Dn, nr = on.shared, pr = on.stats, ir = nr.current, gr = nr.timer;
              if (bn = bn.profile) {
                if (ue(bn)) return void (bn.enable ? (Hn(ln), Ln(ln.exit), pn("true")) : pn("false"));
                pn(bn = bn.append(on, ln));
              } else bn = ln.def(ir, ".profile");
              Hn(nr = on.block()), ln("if(", bn, "){", nr, "}"), Ln(on = on.block()), ln.exit("if(", bn, "){", on, "}");
            }
            function Wn(on, ln, bn, Nn, jn) {
              function Jn(Ln, pn, dn) {
                function Dn() {
                  ln("if(!", gr, ".buffer){", pr, ".enableVertexAttribArray(", ir, ");}");
                  var Sr, Dr = dn.type;
                  Sr = dn.size ? ln.def(dn.size, "||", pn) : pn, ln("if(", gr, ".type!==", Dr, "||", gr, ".size!==", Sr, "||", Er.map(function(Qn) {
                    return gr + "." + Qn + "!==" + dn[Qn];
                  }).join("||"), "){", pr, ".bindBuffer(", 34962, ",", Pr, ".buffer);", pr, ".vertexAttribPointer(", [ir, Sr, Dr, dn.normalized, dn.stride, dn.offset], ");", gr, ".type=", Dr, ";", gr, ".size=", Sr, ";", Er.map(function(Qn) {
                    return gr + "." + Qn + "=" + dn[Qn] + ";";
                  }).join(""), "}"), rn && (Dr = dn.divisor, ln("if(", gr, ".divisor!==", Dr, "){", on.instancing, ".vertexAttribDivisorANGLE(", [ir, Dr], ");", gr, ".divisor=", Dr, ";}"));
                }
                function nr() {
                  ln("if(", gr, ".buffer){", pr, ".disableVertexAttribArray(", ir, ");", gr, ".buffer=null;", "}if(", at.map(function(Sr, Dr) {
                    return gr + "." + Sr + "!==" + Cr[Dr];
                  }).join("||"), "){", pr, ".vertexAttrib4f(", ir, ",", Cr, ");", at.map(function(Sr, Dr) {
                    return gr + "." + Sr + "=" + Cr[Dr] + ";";
                  }).join(""), "}");
                }
                var pr = Hn.gl, ir = ln.def(Ln, ".location"), gr = ln.def(Hn.attributes, "[", ir, "]");
                Ln = dn.state;
                var Pr = dn.buffer, Cr = [dn.x, dn.y, dn.z, dn.w], Er = ["buffer", "normalized", "offset", "stride"];
                Ln === 1 ? Dn() : Ln === 2 ? nr() : (ln("if(", Ln, "===", 1, "){"), Dn(), ln("}else{"), nr(), ln("}"));
              }
              var Hn = on.shared;
              Nn.forEach(function(Ln) {
                var pn, dn = Ln.name, Dn = bn.attributes[dn];
                if (Dn) {
                  if (!jn(Dn)) return;
                  pn = Dn.append(on, ln);
                } else {
                  if (!jn(Ye)) return;
                  var nr = on.scopeAttrib(dn);
                  pn = {}, Object.keys(new yr()).forEach(function(pr) {
                    pn[pr] = ln.def(nr, ".", pr);
                  });
                }
                Jn(on.link(Ln), function(pr) {
                  switch (pr) {
                    case 35664:
                    case 35667:
                    case 35671:
                      return 2;
                    case 35665:
                    case 35668:
                    case 35672:
                      return 3;
                    case 35666:
                    case 35669:
                    case 35673:
                      return 4;
                    default:
                      return 1;
                  }
                }(Ln.info.type), pn);
              });
            }
            function hr(on, ln, bn, Nn, jn, Jn) {
              for (var Hn, Ln = on.shared, pn = Ln.gl, dn = 0; dn < Nn.length; ++dn) {
                var Dn, nr = (gr = Nn[dn]).name, pr = gr.info.type, ir = bn.uniforms[nr], gr = on.link(gr) + ".location";
                if (ir) {
                  if (!jn(ir)) continue;
                  if (ue(ir)) {
                    if (nr = ir.value, pr === 35678 || pr === 35680) ln(pn, ".uniform1i(", gr, ",", (pr = on.link(nr._texture || nr.color[0]._texture)) + ".bind());"), ln.exit(pr, ".unbind();");
                    else if (pr === 35674 || pr === 35675 || pr === 35676) ir = 2, pr === 35675 ? ir = 3 : pr === 35676 && (ir = 4), ln(pn, ".uniformMatrix", ir, "fv(", gr, ",false,", nr = on.global.def("new Float32Array([" + Array.prototype.slice.call(nr) + "])"), ");");
                    else {
                      switch (pr) {
                        case 5126:
                          Hn = "1f";
                          break;
                        case 35664:
                          Hn = "2f";
                          break;
                        case 35665:
                          Hn = "3f";
                          break;
                        case 35666:
                          Hn = "4f";
                          break;
                        case 35670:
                        case 5124:
                          Hn = "1i";
                          break;
                        case 35671:
                        case 35667:
                          Hn = "2i";
                          break;
                        case 35672:
                        case 35668:
                          Hn = "3i";
                          break;
                        case 35673:
                        case 35669:
                          Hn = "4i";
                      }
                      ln(pn, ".uniform", Hn, "(", gr, ",", C(nr) ? Array.prototype.slice.call(nr) : nr, ");");
                    }
                    continue;
                  }
                  Dn = ir.append(on, ln);
                } else {
                  if (!jn(Ye)) continue;
                  Dn = ln.def(Ln.uniforms, "[", pt.id(nr), "]");
                }
                switch (pr === 35678 ? ln("if(", Dn, "&&", Dn, '._reglType==="framebuffer"){', Dn, "=", Dn, ".color[0];", "}") : pr === 35680 && ln("if(", Dn, "&&", Dn, '._reglType==="framebufferCube"){', Dn, "=", Dn, ".color[0];", "}"), nr = 1, pr) {
                  case 35678:
                  case 35680:
                    pr = ln.def(Dn, "._texture"), ln(pn, ".uniform1i(", gr, ",", pr, ".bind());"), ln.exit(pr, ".unbind();");
                    continue;
                  case 5124:
                  case 35670:
                    Hn = "1i";
                    break;
                  case 35667:
                  case 35671:
                    Hn = "2i", nr = 2;
                    break;
                  case 35668:
                  case 35672:
                    Hn = "3i", nr = 3;
                    break;
                  case 35669:
                  case 35673:
                    Hn = "4i", nr = 4;
                    break;
                  case 5126:
                    Hn = "1f";
                    break;
                  case 35664:
                    Hn = "2f", nr = 2;
                    break;
                  case 35665:
                    Hn = "3f", nr = 3;
                    break;
                  case 35666:
                    Hn = "4f", nr = 4;
                    break;
                  case 35674:
                    Hn = "Matrix2fv";
                    break;
                  case 35675:
                    Hn = "Matrix3fv";
                    break;
                  case 35676:
                    Hn = "Matrix4fv";
                }
                if (Hn.charAt(0) === "M") {
                  ln(pn, ".uniform", Hn, "(", gr, ","), gr = Math.pow(pr - 35674 + 2, 2);
                  var Pr = on.global.def("new Float32Array(", gr, ")");
                  Array.isArray(Dn) ? ln("false,(", p(gr, function(Er) {
                    return Pr + "[" + Er + "]=" + Dn[Er];
                  }), ",", Pr, ")") : ln("false,(Array.isArray(", Dn, ")||", Dn, " instanceof Float32Array)?", Dn, ":(", p(gr, function(Er) {
                    return Pr + "[" + Er + "]=" + Dn + "[" + Er + "]";
                  }), ",", Pr, ")"), ln(");");
                } else {
                  if (1 < nr) {
                    pr = [];
                    var Cr = [];
                    for (ir = 0; ir < nr; ++ir) Array.isArray(Dn) ? Cr.push(Dn[ir]) : Cr.push(ln.def(Dn + "[" + ir + "]")), Jn && pr.push(ln.def());
                    Jn && ln("if(!", on.batchId, "||", pr.map(function(Er, Sr) {
                      return Er + "!==" + Cr[Sr];
                    }).join("||"), "){", pr.map(function(Er, Sr) {
                      return Er + "=" + Cr[Sr] + ";";
                    }).join("")), ln(pn, ".uniform", Hn, "(", gr, ",", Cr.join(","), ");");
                  } else Jn && (pr = ln.def(), ln("if(!", on.batchId, "||", pr, "!==", Dn, "){", pr, "=", Dn, ";")), ln(pn, ".uniform", Hn, "(", gr, ",", Dn, ");");
                  Jn && ln("}");
                }
              }
            }
            function Zn(on, ln, bn, Nn) {
              function jn(Dr) {
                var Qn = pr[Dr];
                return Qn ? Qn.contextDep && Nn.contextDynamic || Qn.propDep ? Qn.append(on, bn) : Qn.append(on, ln) : ln.def(nr, ".", Dr);
              }
              function Jn() {
                function Dr() {
                  bn(pn, ".drawElementsInstancedANGLE(", [gr, Cr, Er, Pr + "<<((" + Er + "-5121)>>1)", Ln], ");");
                }
                function Qn() {
                  bn(pn, ".drawArraysInstancedANGLE(", [gr, Pr, Cr, Ln], ");");
                }
                ir && ir !== "null" ? Sr ? Dr() : (bn("if(", ir, "){"), Dr(), bn("}else{"), Qn(), bn("}")) : Qn();
              }
              function Hn() {
                function Dr() {
                  bn(Dn + ".drawElements(" + [gr, Cr, Er, Pr + "<<((" + Er + "-5121)>>1)"] + ");");
                }
                function Qn() {
                  bn(Dn + ".drawArrays(" + [gr, Pr, Cr] + ");");
                }
                ir && ir !== "null" ? Sr ? Dr() : (bn("if(", ir, "){"), Dr(), bn("}else{"), Qn(), bn("}")) : Qn();
              }
              var Ln, pn, dn = on.shared, Dn = dn.gl, nr = dn.draw, pr = Nn.draw, ir = function() {
                var Dr = pr.elements, Qn = ln;
                return Dr ? ((Dr.contextDep && Nn.contextDynamic || Dr.propDep) && (Qn = bn), Dr = Dr.append(on, Qn), pr.elementsActive && Qn("if(" + Dr + ")" + Dn + ".bindBuffer(34963," + Dr + ".buffer.buffer);")) : (Dr = Qn.def(), Qn(Dr, "=", nr, ".", "elements", ";", "if(", Dr, "){", Dn, ".bindBuffer(", 34963, ",", Dr, ".buffer.buffer);}", "else if(", dn.vao, ".currentVAO){", Dr, "=", on.shared.elements + ".getElements(" + dn.vao, ".currentVAO.elements);", sr ? "" : "if(" + Dr + ")" + Dn + ".bindBuffer(34963," + Dr + ".buffer.buffer);", "}")), Dr;
              }(), gr = jn("primitive"), Pr = jn("offset"), Cr = function() {
                var Dr = pr.count, Qn = ln;
                return Dr ? ((Dr.contextDep && Nn.contextDynamic || Dr.propDep) && (Qn = bn), Dr = Dr.append(on, Qn)) : Dr = Qn.def(nr, ".", "count"), Dr;
              }();
              if (typeof Cr == "number") {
                if (Cr === 0) return;
              } else bn("if(", Cr, "){"), bn.exit("}");
              rn && (Ln = jn("instances"), pn = on.instancing);
              var Er = ir + ".type", Sr = pr.elements && ue(pr.elements) && !pr.vaoActive;
              rn && (typeof Ln != "number" || 0 <= Ln) ? typeof Ln == "string" ? (bn("if(", Ln, ">0){"), Jn(), bn("}else if(", Ln, "<0){"), Hn(), bn("}")) : Jn() : Hn();
            }
            function lr(on, ln, bn, Nn, jn) {
              return jn = (ln = In()).proc("body", jn), rn && (ln.instancing = jn.def(ln.shared.extensions, ".angle_instanced_arrays")), on(ln, jn, bn, Nn), ln.compile().body;
            }
            function cr(on, ln, bn, Nn) {
              En(on, ln), bn.useVAO ? bn.drawVAO ? ln(on.shared.vao, ".setVAO(", bn.drawVAO.append(on, ln), ");") : ln(on.shared.vao, ".setVAO(", on.shared.vao, ".targetVAO);") : (ln(on.shared.vao, ".setVAO(null);"), Wn(on, ln, bn, Nn.attributes, function() {
                return !0;
              })), hr(on, ln, bn, Nn.uniforms, function() {
                return !0;
              }, !1), Zn(on, ln, ln, bn);
            }
            function zr(on, ln, bn, Nn) {
              function jn() {
                return !0;
              }
              on.batchId = "a1", En(on, ln), Wn(on, ln, bn, Nn.attributes, jn), hr(on, ln, bn, Nn.uniforms, jn, !1), Zn(on, ln, ln, bn);
            }
            function Wr(on, ln, bn, Nn) {
              function jn(nr) {
                return nr.contextDep && Hn || nr.propDep;
              }
              function Jn(nr) {
                return !jn(nr);
              }
              En(on, ln);
              var Hn = bn.contextDep, Ln = ln.def(), pn = ln.def();
              on.shared.props = pn, on.batchId = Ln;
              var dn = on.scope(), Dn = on.scope();
              ln(dn.entry, "for(", Ln, "=0;", Ln, "<", "a1", ";++", Ln, "){", pn, "=", "a0", "[", Ln, "];", Dn, "}", dn.exit), bn.needsContext && Pn(on, Dn, bn.context), bn.needsFramebuffer && wn(on, Dn, bn.framebuffer), _n(on, Dn, bn.state, jn), bn.profile && jn(bn.profile) && Kn(on, Dn, bn, !1, !0), Nn ? (bn.useVAO ? bn.drawVAO ? jn(bn.drawVAO) ? Dn(on.shared.vao, ".setVAO(", bn.drawVAO.append(on, Dn), ");") : dn(on.shared.vao, ".setVAO(", bn.drawVAO.append(on, dn), ");") : dn(on.shared.vao, ".setVAO(", on.shared.vao, ".targetVAO);") : (dn(on.shared.vao, ".setVAO(null);"), Wn(on, dn, bn, Nn.attributes, Jn), Wn(on, Dn, bn, Nn.attributes, jn)), hr(on, dn, bn, Nn.uniforms, Jn, !1), hr(on, Dn, bn, Nn.uniforms, jn, !0), Zn(on, dn, Dn, bn)) : (ln = on.global.def("{}"), Nn = bn.shader.progVar.append(on, Dn), pn = Dn.def(Nn, ".id"), dn = Dn.def(ln, "[", pn, "]"), Dn(on.shared.gl, ".useProgram(", Nn, ".program);", "if(!", dn, "){", dn, "=", ln, "[", pn, "]=", on.link(function(nr) {
                return lr(zr, on, bn, nr, 2);
              }), "(", Nn, ");}", dn, ".call(this,a0[", Ln, "],", Ln, ");"));
            }
            function mr(on, ln) {
              function bn(Ln) {
                var pn = ln.shader[Ln];
                pn && (pn = pn.append(on, Nn), isNaN(pn) ? Nn.set(jn.shader, "." + Ln, pn) : Nn.set(jn.shader, "." + Ln, on.link(pn, { stable: !0 })));
              }
              var Nn = on.proc("scope", 3);
              on.batchId = "a2";
              var jn = on.shared, Jn = jn.current;
              if (Pn(on, Nn, ln.context), ln.framebuffer && ln.framebuffer.append(on, Nn), X(Object.keys(ln.state)).forEach(function(Ln) {
                var pn = ln.state[Ln], dn = pn.append(on, Nn);
                C(dn) ? dn.forEach(function(Dn, nr) {
                  isNaN(Dn) ? Nn.set(on.next[Ln], "[" + nr + "]", Dn) : Nn.set(on.next[Ln], "[" + nr + "]", on.link(Dn, { stable: !0 }));
                }) : ue(pn) ? Nn.set(jn.next, "." + Ln, on.link(dn, { stable: !0 })) : Nn.set(jn.next, "." + Ln, dn);
              }), Kn(on, Nn, ln, !0, !0), ["elements", "offset", "count", "instances", "primitive"].forEach(function(Ln) {
                var pn = ln.draw[Ln];
                pn && (pn = pn.append(on, Nn), isNaN(pn) ? Nn.set(jn.draw, "." + Ln, pn) : Nn.set(jn.draw, "." + Ln, on.link(pn), { stable: !0 }));
              }), Object.keys(ln.uniforms).forEach(function(Ln) {
                var pn = ln.uniforms[Ln].append(on, Nn);
                Array.isArray(pn) && (pn = "[" + pn.map(function(dn) {
                  return isNaN(dn) ? dn : on.link(dn, { stable: !0 });
                }) + "]"), Nn.set(jn.uniforms, "[" + on.link(pt.id(Ln), { stable: !0 }) + "]", pn);
              }), Object.keys(ln.attributes).forEach(function(Ln) {
                var pn = ln.attributes[Ln].append(on, Nn), dn = on.scopeAttrib(Ln);
                Object.keys(new yr()).forEach(function(Dn) {
                  Nn.set(dn, "." + Dn, pn[Dn]);
                });
              }), ln.scopeVAO) {
                var Hn = ln.scopeVAO.append(on, Nn);
                isNaN(Hn) ? Nn.set(jn.vao, ".targetVAO", Hn) : Nn.set(jn.vao, ".targetVAO", on.link(Hn, { stable: !0 }));
              }
              bn("vert"), bn("frag"), 0 < Object.keys(ln.state).length && (Nn(Jn, ".dirty=true;"), Nn.exit(Jn, ".dirty=true;")), Nn("a1(", on.shared.context, ",a0,", on.batchId, ");");
            }
            function Ir(on, ln, bn) {
              var Nn = ln.static[bn];
              if (Nn && function(Dn) {
                if (typeof Dn == "object" && !C(Dn)) {
                  for (var nr = Object.keys(Dn), pr = 0; pr < nr.length; ++pr) if (me.isDynamic(Dn[nr[pr]])) return !0;
                  return !1;
                }
              }(Nn)) {
                var jn = on.global, Jn = Object.keys(Nn), Hn = !1, Ln = !1, pn = !1, dn = on.global.def("{}");
                Jn.forEach(function(Dn) {
                  var nr = Nn[Dn];
                  if (me.isDynamic(nr)) typeof nr == "function" && (nr = Nn[Dn] = me.unbox(nr)), Dn = he(nr, null), Hn = Hn || Dn.thisDep, pn = pn || Dn.propDep, Ln = Ln || Dn.contextDep;
                  else {
                    switch (jn(dn, ".", Dn, "="), typeof nr) {
                      case "number":
                        jn(nr);
                        break;
                      case "string":
                        jn('"', nr, '"');
                        break;
                      case "object":
                        Array.isArray(nr) && jn("[", nr.join(), "]");
                        break;
                      default:
                        jn(on.link(nr));
                    }
                    jn(";");
                  }
                }), ln.dynamic[bn] = new me.DynamicVariable(4, { thisDep: Hn, contextDep: Ln, propDep: pn, ref: dn, append: function(Dn, nr) {
                  Jn.forEach(function(pr) {
                    var ir = Nn[pr];
                    me.isDynamic(ir) && (ir = Dn.invoke(nr, ir), nr(dn, ".", pr, "=", ir, ";"));
                  });
                } }), delete ln.static[bn];
              }
            }
            var yr = kt.Record, Vr = { add: 32774, subtract: 32778, "reverse subtract": 32779 };
            Mt.ext_blend_minmax && (Vr.min = 32775, Vr.max = 32776);
            var rn = Mt.angle_instanced_arrays, Tn = Mt.webgl_draw_buffers, sr = Mt.oes_vertex_array_object, $n = { dirty: !0, profile: Yt.profile }, ur = {}, Tr = [], wr = {}, Fr = {};
            sn("dither", 3024), sn("blend.enable", 3042), fn("blend.color", "blendColor", [0, 0, 0, 0]), fn("blend.equation", "blendEquationSeparate", [32774, 32774]), fn("blend.func", "blendFuncSeparate", [1, 0, 1, 0]), sn("depth.enable", 2929, !0), fn("depth.func", "depthFunc", 513), fn("depth.range", "depthRange", [0, 1]), fn("depth.mask", "depthMask", !0), fn("colorMask", "colorMask", [!0, !0, !0, !0]), sn("cull.enable", 2884), fn("cull.face", "cullFace", 1029), fn("frontFace", "frontFace", 2305), fn("lineWidth", "lineWidth", 1), sn("polygonOffset.enable", 32823), fn("polygonOffset.offset", "polygonOffset", [0, 0]), sn("sample.alpha", 32926), sn("sample.enable", 32928), fn("sample.coverage", "sampleCoverage", [1, !1]), sn("stencil.enable", 2960), fn("stencil.mask", "stencilMask", -1), fn("stencil.func", "stencilFunc", [519, 0, -1]), fn("stencil.opFront", "stencilOpSeparate", [1028, 7680, 7680, 7680]), fn("stencil.opBack", "stencilOpSeparate", [1029, 7680, 7680, 7680]), sn("scissor.enable", 3089), fn("scissor.box", "scissor", [0, 0, Fe.drawingBufferWidth, Fe.drawingBufferHeight]), fn("viewport", "viewport", [0, 0, Fe.drawingBufferWidth, Fe.drawingBufferHeight]);
            var Xr = { gl: Fe, context: Jt, strings: pt, next: ur, current: $n, draw: xt, elements: Ft, buffer: Rt, shader: Bt, attributes: kt.state, vao: kt, uniforms: Ot, framebuffer: st, extensions: Mt, timer: qt, isBufferArgs: ee }, un = { primTypes: Ce, compareFuncs: Je, blendFuncs: St, blendEquations: Vr, stencilOps: nt, glTypes: We, orientationType: ot };
            Tn && (un.backBuffer = [1029], un.drawBuffer = p(At.maxDrawbuffers, function(on) {
              return on === 0 ? [0] : p(on, function(ln) {
                return 36064 + ln;
              });
            }));
            var Gn = 0;
            return { next: ur, current: $n, procs: function() {
              var on = In(), ln = on.proc("poll"), bn = on.proc("refresh"), Nn = on.block();
              ln(Nn), bn(Nn);
              var jn, Jn = (pn = on.shared).gl, Hn = pn.next, Ln = pn.current;
              Nn(Ln, ".dirty=false;"), wn(on, ln), wn(on, bn, null, !0), rn && (jn = on.link(rn)), Mt.oes_vertex_array_object && bn(on.link(Mt.oes_vertex_array_object), ".bindVertexArrayOES(null);");
              var pn = bn.def(pn.attributes), dn = bn.def(0), Dn = on.cond(dn, ".buffer");
              Dn.then(Jn, ".enableVertexAttribArray(i);", Jn, ".bindBuffer(", 34962, ",", dn, ".buffer.buffer);", Jn, ".vertexAttribPointer(i,", dn, ".size,", dn, ".type,", dn, ".normalized,", dn, ".stride,", dn, ".offset);").else(Jn, ".disableVertexAttribArray(i);", Jn, ".vertexAttrib4f(i,", dn, ".x,", dn, ".y,", dn, ".z,", dn, ".w);", dn, ".buffer=null;");
              var nr = on.link(At.maxAttributes, { stable: !0 });
              return bn("for(var i=0;i<", nr, ";++i){", dn, "=", pn, "[i];", Dn, "}"), rn && bn("for(var i=0;i<", nr, ";++i){", jn, ".vertexAttribDivisorANGLE(i,", pn, "[i].divisor);", "}"), bn(on.shared.vao, ".currentVAO=null;", on.shared.vao, ".setVAO(", on.shared.vao, ".targetVAO);"), Object.keys(wr).forEach(function(pr) {
                var ir = wr[pr], gr = Nn.def(Hn, ".", pr), Pr = on.block();
                Pr("if(", gr, "){", Jn, ".enable(", ir, ")}else{", Jn, ".disable(", ir, ")}", Ln, ".", pr, "=", gr, ";"), bn(Pr), ln("if(", gr, "!==", Ln, ".", pr, "){", Pr, "}");
              }), Object.keys(Fr).forEach(function(pr) {
                var ir, gr, Pr = Fr[pr], Cr = $n[pr], Er = on.block();
                Er(Jn, ".", Pr, "("), C(Cr) ? (Pr = Cr.length, ir = on.global.def(Hn, ".", pr), gr = on.global.def(Ln, ".", pr), Er(p(Pr, function(Sr) {
                  return ir + "[" + Sr + "]";
                }), ");", p(Pr, function(Sr) {
                  return gr + "[" + Sr + "]=" + ir + "[" + Sr + "];";
                }).join("")), ln("if(", p(Pr, function(Sr) {
                  return ir + "[" + Sr + "]!==" + gr + "[" + Sr + "]";
                }).join("||"), "){", Er, "}")) : (ir = Nn.def(Hn, ".", pr), gr = Nn.def(Ln, ".", pr), Er(ir, ");", Ln, ".", pr, "=", ir, ";"), ln("if(", ir, "!==", gr, "){", Er, "}")), bn(Er);
              }), on.compile();
            }(), compile: function(on, ln, bn, Nn, jn) {
              var Jn = In();
              Jn.stats = Jn.link(jn), Object.keys(ln.static).forEach(function(Ln) {
                Ir(Jn, ln, Ln);
              }), vt.forEach(function(Ln) {
                Ir(Jn, on, Ln);
              });
              var Hn = Xn(on, ln, bn, Nn);
              return Hn.shader.program && (Hn.shader.program.attributes.sort(function(Ln, pn) {
                return Ln.name < pn.name ? -1 : 1;
              }), Hn.shader.program.uniforms.sort(function(Ln, pn) {
                return Ln.name < pn.name ? -1 : 1;
              })), function(Ln, pn) {
                var dn = Ln.proc("draw", 1);
                En(Ln, dn), Pn(Ln, dn, pn.context), wn(Ln, dn, pn.framebuffer), Rn(Ln, dn, pn), _n(Ln, dn, pn.state), Kn(Ln, dn, pn, !1, !0);
                var Dn = pn.shader.progVar.append(Ln, dn);
                if (dn(Ln.shared.gl, ".useProgram(", Dn, ".program);"), pn.shader.program) cr(Ln, dn, pn, pn.shader.program);
                else {
                  dn(Ln.shared.vao, ".setVAO(null);");
                  var nr = Ln.global.def("{}"), pr = dn.def(Dn, ".id"), ir = dn.def(nr, "[", pr, "]");
                  dn(Ln.cond(ir).then(ir, ".call(this,a0);").else(ir, "=", nr, "[", pr, "]=", Ln.link(function(gr) {
                    return lr(cr, Ln, pn, gr, 1);
                  }), "(", Dn, ");", ir, ".call(this,a0);"));
                }
                0 < Object.keys(pn.state).length && dn(Ln.shared.current, ".dirty=true;"), Ln.shared.vao && dn(Ln.shared.vao, ".setVAO(null);");
              }(Jn, Hn), mr(Jn, Hn), function(Ln, pn) {
                function dn(Cr) {
                  return Cr.contextDep && nr || Cr.propDep;
                }
                var Dn = Ln.proc("batch", 2);
                Ln.batchId = "0", En(Ln, Dn);
                var nr = !1, pr = !0;
                Object.keys(pn.context).forEach(function(Cr) {
                  nr = nr || pn.context[Cr].propDep;
                }), nr || (Pn(Ln, Dn, pn.context), pr = !1);
                var ir = !1;
                if ((gr = pn.framebuffer) ? (gr.propDep ? nr = ir = !0 : gr.contextDep && nr && (ir = !0), ir || wn(Ln, Dn, gr)) : wn(Ln, Dn, null), pn.state.viewport && pn.state.viewport.propDep && (nr = !0), Rn(Ln, Dn, pn), _n(Ln, Dn, pn.state, function(Cr) {
                  return !dn(Cr);
                }), pn.profile && dn(pn.profile) || Kn(Ln, Dn, pn, !1, "a1"), pn.contextDep = nr, pn.needsContext = pr, pn.needsFramebuffer = ir, (pr = pn.shader.progVar).contextDep && nr || pr.propDep) Wr(Ln, Dn, pn, null);
                else if (pr = pr.append(Ln, Dn), Dn(Ln.shared.gl, ".useProgram(", pr, ".program);"), pn.shader.program) Wr(Ln, Dn, pn, pn.shader.program);
                else {
                  Dn(Ln.shared.vao, ".setVAO(null);");
                  var gr = Ln.global.def("{}"), Pr = (ir = Dn.def(pr, ".id"), Dn.def(gr, "[", ir, "]"));
                  Dn(Ln.cond(Pr).then(Pr, ".call(this,a0,a1);").else(Pr, "=", gr, "[", ir, "]=", Ln.link(function(Cr) {
                    return lr(Wr, Ln, pn, Cr, 2);
                  }), "(", pr, ");", Pr, ".call(this,a0,a1);"));
                }
                0 < Object.keys(pn.state).length && Dn(Ln.shared.current, ".dirty=true;"), Ln.shared.vao && Dn(Ln.shared.vao, ".setVAO(null);");
              }(Jn, Hn), ae(Jn.compile(), { destroy: function() {
                Hn.shader.program.destroy();
              } });
            } };
          }
          function ne(Fe, pt) {
            for (var Mt = 0; Mt < Fe.length; ++Mt) if (Fe[Mt] === pt) return Mt;
            return -1;
          }
          var ae = function(Fe, pt) {
            for (var Mt = Object.keys(pt), At = 0; At < Mt.length; ++At) Fe[Mt[At]] = pt[Mt[At]];
            return Fe;
          }, se = 0, me = { DynamicVariable: s, define: function(Fe, pt) {
            return new s(Fe, l(pt + ""));
          }, isDynamic: function(Fe) {
            return typeof Fe == "function" && !Fe._reglType || Fe instanceof s;
          }, unbox: function Fe(pt, Mt) {
            return typeof pt == "function" ? new s(0, pt) : typeof pt == "number" || typeof pt == "boolean" ? new s(5, pt) : Array.isArray(pt) ? new s(6, pt.map(function(At, Rt) {
              return Fe(At);
            })) : pt instanceof s ? pt : void 0;
          }, accessor: l }, ye = { next: typeof requestAnimationFrame == "function" ? function(Fe) {
            return requestAnimationFrame(Fe);
          } : function(Fe) {
            return setTimeout(Fe, 16);
          }, cancel: typeof cancelAnimationFrame == "function" ? function(Fe) {
            return cancelAnimationFrame(Fe);
          } : clearTimeout }, pe = typeof performance < "u" && performance.now ? function() {
            return performance.now();
          } : function() {
            return +/* @__PURE__ */ new Date();
          }, be = d();
          be.zero = d();
          var Ae = function(Fe, pt) {
            var Mt = 1;
            pt.ext_texture_filter_anisotropic && (Mt = Fe.getParameter(34047));
            var At = 1, Rt = 1;
            pt.webgl_draw_buffers && (At = Fe.getParameter(34852), Rt = Fe.getParameter(36063));
            var Ft = !!pt.oes_texture_float;
            if (Ft) {
              Ft = Fe.createTexture(), Fe.bindTexture(3553, Ft), Fe.texImage2D(3553, 0, 6408, 1, 1, 0, 6408, 5126, null);
              var lt = Fe.createFramebuffer();
              if (Fe.bindFramebuffer(36160, lt), Fe.framebufferTexture2D(36160, 36064, 3553, Ft, 0), Fe.bindTexture(3553, null), Fe.checkFramebufferStatus(36160) !== 36053) Ft = !1;
              else {
                Fe.viewport(0, 0, 1, 1), Fe.clearColor(1, 0, 0, 1), Fe.clear(16384);
                var st = be.allocType(5126, 4);
                Fe.readPixels(0, 0, 1, 1, 6408, 5126, st), Fe.getError() ? Ft = !1 : (Fe.deleteFramebuffer(lt), Fe.deleteTexture(Ft), Ft = st[0] === 1), be.freeType(st);
              }
            }
            return st = !0, typeof navigator < "u" && (/MSIE/.test(navigator.userAgent) || /Trident\//.test(navigator.appVersion) || /Edge/.test(navigator.userAgent)) || (st = Fe.createTexture(), lt = be.allocType(5121, 36), Fe.activeTexture(33984), Fe.bindTexture(34067, st), Fe.texImage2D(34069, 0, 6408, 3, 3, 0, 6408, 5121, lt), be.freeType(lt), Fe.bindTexture(34067, null), Fe.deleteTexture(st), st = !Fe.getError()), { colorBits: [Fe.getParameter(3410), Fe.getParameter(3411), Fe.getParameter(3412), Fe.getParameter(3413)], depthBits: Fe.getParameter(3414), stencilBits: Fe.getParameter(3415), subpixelBits: Fe.getParameter(3408), extensions: Object.keys(pt).filter(function(Ot) {
              return !!pt[Ot];
            }), maxAnisotropic: Mt, maxDrawbuffers: At, maxColorAttachments: Rt, pointSizeDims: Fe.getParameter(33901), lineWidthDims: Fe.getParameter(33902), maxViewportDims: Fe.getParameter(3386), maxCombinedTextureUnits: Fe.getParameter(35661), maxCubeMapSize: Fe.getParameter(34076), maxRenderbufferSize: Fe.getParameter(34024), maxTextureUnits: Fe.getParameter(34930), maxTextureSize: Fe.getParameter(3379), maxAttributes: Fe.getParameter(34921), maxVertexUniforms: Fe.getParameter(36347), maxVertexTextureUnits: Fe.getParameter(35660), maxVaryingVectors: Fe.getParameter(36348), maxFragmentUniforms: Fe.getParameter(36349), glsl: Fe.getParameter(35724), renderer: Fe.getParameter(7937), vendor: Fe.getParameter(7936), version: Fe.getParameter(7938), readFloat: Ft, npotTextureCube: st };
          }, Se = function(Fe) {
            return Fe instanceof Uint8Array || Fe instanceof Uint16Array || Fe instanceof Uint32Array || Fe instanceof Int8Array || Fe instanceof Int16Array || Fe instanceof Int32Array || Fe instanceof Float32Array || Fe instanceof Float64Array || Fe instanceof Uint8ClampedArray;
          }, Me = function(Fe) {
            return Object.keys(Fe).map(function(pt) {
              return Fe[pt];
            });
          }, De = { shape: function(Fe) {
            for (var pt = []; Fe.length; Fe = Fe[0]) pt.push(Fe.length);
            return pt;
          }, flatten: function(Fe, pt, Mt, At) {
            var Rt = 1;
            if (pt.length) for (var Ft = 0; Ft < pt.length; ++Ft) Rt *= pt[Ft];
            else Rt = 0;
            switch (Mt = At || be.allocType(Mt, Rt), pt.length) {
              case 0:
                break;
              case 1:
                for (At = pt[0], pt = 0; pt < At; ++pt) Mt[pt] = Fe[pt];
                break;
              case 2:
                for (At = pt[0], pt = pt[1], Ft = Rt = 0; Ft < At; ++Ft) for (var lt = Fe[Ft], st = 0; st < pt; ++st) Mt[Rt++] = lt[st];
                break;
              case 3:
                c(Fe, pt[0], pt[1], pt[2], Mt, 0);
                break;
              default:
                g(Fe, pt, 0, Mt, 0);
            }
            return Mt;
          } }, Le = { "[object Int8Array]": 5120, "[object Int16Array]": 5122, "[object Int32Array]": 5124, "[object Uint8Array]": 5121, "[object Uint8ClampedArray]": 5121, "[object Uint16Array]": 5123, "[object Uint32Array]": 5125, "[object Float32Array]": 5126, "[object Float64Array]": 5121, "[object ArrayBuffer]": 5121 }, We = { int8: 5120, int16: 5122, int32: 5124, uint8: 5121, uint16: 5123, uint32: 5125, float: 5126, float32: 5126 }, Ee = { dynamic: 35048, stream: 35040, static: 35044 }, Ne = De.flatten, Ie = De.shape, ge = [];
          ge[5120] = 1, ge[5122] = 2, ge[5124] = 4, ge[5121] = 1, ge[5123] = 2, ge[5125] = 4, ge[5126] = 4;
          var Ce = { points: 0, point: 0, lines: 1, line: 1, triangles: 4, triangle: 4, "line loop": 2, "line strip": 3, "triangle strip": 5, "triangle fan": 6 }, we = new Float32Array(1), Ge = new Uint32Array(we.buffer), Re = [9984, 9986, 9985, 9987], je = [0, 6409, 6410, 6407, 6408], Ke = {};
          Ke[6409] = Ke[6406] = Ke[6402] = 1, Ke[34041] = Ke[6410] = 2, Ke[6407] = Ke[35904] = 3, Ke[6408] = Ke[35906] = 4;
          var tt = D("HTMLCanvasElement"), _e = D("OffscreenCanvas"), Be = D("CanvasRenderingContext2D"), $e = D("ImageBitmap"), Ze = D("HTMLImageElement"), ct = D("HTMLVideoElement"), ft = Object.keys(Le).concat([tt, _e, Be, $e, Ze, ct]), _t = [];
          _t[5121] = 1, _t[5126] = 4, _t[36193] = 2, _t[5123] = 2, _t[5125] = 4;
          var Pt = [];
          Pt[32854] = 2, Pt[32855] = 2, Pt[36194] = 2, Pt[34041] = 4, Pt[33776] = 0.5, Pt[33777] = 0.5, Pt[33778] = 1, Pt[33779] = 1, Pt[35986] = 0.5, Pt[35987] = 1, Pt[34798] = 1, Pt[35840] = 0.5, Pt[35841] = 0.25, Pt[35842] = 0.5, Pt[35843] = 0.25, Pt[36196] = 0.5;
          var Dt = [];
          Dt[32854] = 2, Dt[32855] = 2, Dt[36194] = 2, Dt[33189] = 2, Dt[36168] = 1, Dt[34041] = 4, Dt[35907] = 4, Dt[34836] = 16, Dt[34842] = 8, Dt[34843] = 6;
          var $t = function(Fe, pt, Mt, At, Rt) {
            function Ft(xt) {
              this.id = kt++, this.refCount = 1, this.renderbuffer = xt, this.format = 32854, this.height = this.width = 0, Rt.profile && (this.stats = { size: 0 });
            }
            function lt(xt) {
              var Jt = xt.renderbuffer;
              Fe.bindRenderbuffer(36161, null), Fe.deleteRenderbuffer(Jt), xt.renderbuffer = null, xt.refCount = 0, delete Bt[xt.id], At.renderbufferCount--;
            }
            var st = { rgba4: 32854, rgb565: 36194, "rgb5 a1": 32855, depth: 33189, stencil: 36168, "depth stencil": 34041 };
            pt.ext_srgb && (st.srgba = 35907), pt.ext_color_buffer_half_float && (st.rgba16f = 34842, st.rgb16f = 34843), pt.webgl_color_buffer_float && (st.rgba32f = 34836);
            var Ot = [];
            Object.keys(st).forEach(function(xt) {
              Ot[st[xt]] = xt;
            });
            var kt = 0, Bt = {};
            return Ft.prototype.decRef = function() {
              0 >= --this.refCount && lt(this);
            }, Rt.profile && (At.getTotalRenderbufferSize = function() {
              var xt = 0;
              return Object.keys(Bt).forEach(function(Jt) {
                xt += Bt[Jt].stats.size;
              }), xt;
            }), { create: function(xt, Jt) {
              function qt(Yt, Ht) {
                var sn = 0, fn = 0, In = 32854;
                if (typeof Yt == "object" && Yt ? ("shape" in Yt ? (sn = 0 | (fn = Yt.shape)[0], fn = 0 | fn[1]) : ("radius" in Yt && (sn = fn = 0 | Yt.radius), "width" in Yt && (sn = 0 | Yt.width), "height" in Yt && (fn = 0 | Yt.height)), "format" in Yt && (In = st[Yt.format])) : typeof Yt == "number" ? (sn = 0 | Yt, fn = typeof Ht == "number" ? 0 | Ht : sn) : Yt || (sn = fn = 1), sn !== en.width || fn !== en.height || In !== en.format) return qt.width = en.width = sn, qt.height = en.height = fn, en.format = In, Fe.bindRenderbuffer(36161, en.renderbuffer), Fe.renderbufferStorage(36161, In, sn, fn), Rt.profile && (en.stats.size = Dt[en.format] * en.width * en.height), qt.format = Ot[en.format], qt;
              }
              var en = new Ft(Fe.createRenderbuffer());
              return Bt[en.id] = en, At.renderbufferCount++, qt(xt, Jt), qt.resize = function(Yt, Ht) {
                var sn = 0 | Yt, fn = 0 | Ht || sn;
                return sn === en.width && fn === en.height || (qt.width = en.width = sn, qt.height = en.height = fn, Fe.bindRenderbuffer(36161, en.renderbuffer), Fe.renderbufferStorage(36161, en.format, sn, fn), Rt.profile && (en.stats.size = Dt[en.format] * en.width * en.height)), qt;
              }, qt._reglType = "renderbuffer", qt._renderbuffer = en, Rt.profile && (qt.stats = en.stats), qt.destroy = function() {
                en.decRef();
              }, qt;
            }, clear: function() {
              Me(Bt).forEach(lt);
            }, restore: function() {
              Me(Bt).forEach(function(xt) {
                xt.renderbuffer = Fe.createRenderbuffer(), Fe.bindRenderbuffer(36161, xt.renderbuffer), Fe.renderbufferStorage(36161, xt.format, xt.width, xt.height);
              }), Fe.bindRenderbuffer(36161, null);
            } };
          }, Gt = [];
          Gt[6408] = 4, Gt[6407] = 3;
          var Wt = [];
          Wt[5121] = 1, Wt[5126] = 4, Wt[36193] = 2;
          var mt = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998], at = ["x", "y", "z", "w"], vt = "blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "), St = { 0: 0, 1: 1, zero: 0, one: 1, "src color": 768, "one minus src color": 769, "src alpha": 770, "one minus src alpha": 771, "dst color": 774, "one minus dst color": 775, "dst alpha": 772, "one minus dst alpha": 773, "constant color": 32769, "one minus constant color": 32770, "constant alpha": 32771, "one minus constant alpha": 32772, "src alpha saturate": 776 }, Je = { never: 512, less: 513, "<": 513, equal: 514, "=": 514, "==": 514, "===": 514, lequal: 515, "<=": 515, greater: 516, ">": 516, notequal: 517, "!=": 517, "!==": 517, gequal: 518, ">=": 518, always: 519 }, nt = { 0: 0, zero: 0, keep: 7680, replace: 7681, increment: 7682, decrement: 7683, "increment wrap": 34055, "decrement wrap": 34056, invert: 5386 }, ot = { cw: 2304, ccw: 2305 }, Ye = new Q(!1, !1, !1, function() {
          });
          return function(Fe) {
            function pt() {
              if (zr.length === 0) zn && zn.update(), yr = null;
              else {
                yr = ye.next(pt), Bt();
                for (var rn = zr.length - 1; 0 <= rn; --rn) {
                  var Tn = zr[rn];
                  Tn && Tn(Xn, null, 0);
                }
                qt.flush(), zn && zn.update();
              }
            }
            function Mt() {
              !yr && 0 < zr.length && (yr = ye.next(pt));
            }
            function At() {
              yr && (ye.cancel(pt), yr = null);
            }
            function Rt(rn) {
              rn.preventDefault(), At(), Wr.forEach(function(Tn) {
                Tn();
              });
            }
            function Ft(rn) {
              qt.getError(), Yt.restore(), En.restore(), wn.restore(), Kn.restore(), Wn.restore(), hr.restore(), _n.restore(), zn && zn.restore(), Zn.procs.refresh(), Mt(), mr.forEach(function(Tn) {
                Tn();
              });
            }
            function lt(rn) {
              function Tn(on, ln) {
                var bn = {}, Nn = {};
                return Object.keys(on).forEach(function(jn) {
                  var Jn = on[jn];
                  if (me.isDynamic(Jn)) Nn[jn] = me.unbox(Jn, jn);
                  else {
                    if (ln && Array.isArray(Jn)) {
                      for (var Hn = 0; Hn < Jn.length; ++Hn) if (me.isDynamic(Jn[Hn])) return void (Nn[jn] = me.unbox(Jn, jn));
                    }
                    bn[jn] = Jn;
                  }
                }), { dynamic: Nn, static: bn };
              }
              var sr = Tn(rn.context || {}, !0), $n = Tn(rn.uniforms || {}, !0), ur = Tn(rn.attributes || {}, !1);
              rn = Tn(function(on) {
                function ln(Nn) {
                  if (Nn in bn) {
                    var jn = bn[Nn];
                    delete bn[Nn], Object.keys(jn).forEach(function(Jn) {
                      bn[Nn + "." + Jn] = jn[Jn];
                    });
                  }
                }
                var bn = ae({}, on);
                return delete bn.uniforms, delete bn.attributes, delete bn.context, delete bn.vao, "stencil" in bn && bn.stencil.op && (bn.stencil.opBack = bn.stencil.opFront = bn.stencil.op, delete bn.stencil.op), ln("blend"), ln("depth"), ln("cull"), ln("stencil"), ln("polygonOffset"), ln("scissor"), ln("sample"), "vao" in on && (bn.vao = on.vao), bn;
              }(rn), !1);
              var Tr = { gpuTime: 0, cpuTime: 0, count: 0 }, wr = Zn.compile(rn, ur, $n, sr, Tr), Fr = wr.draw, Xr = wr.batch, un = wr.scope, Gn = [];
              return ae(function(on, ln) {
                var bn;
                if (typeof on == "function") return un.call(this, null, on, 0);
                if (typeof ln == "function") if (typeof on == "number") for (bn = 0; bn < on; ++bn) un.call(this, null, ln, bn);
                else {
                  if (!Array.isArray(on)) return un.call(this, on, ln, 0);
                  for (bn = 0; bn < on.length; ++bn) un.call(this, on[bn], ln, bn);
                }
                else if (typeof on == "number") {
                  if (0 < on) return Xr.call(this, function(Nn) {
                    for (; Gn.length < Nn; ) Gn.push(null);
                    return Gn;
                  }(0 | on), 0 | on);
                } else {
                  if (!Array.isArray(on)) return Fr.call(this, on);
                  if (on.length) return Xr.call(this, on, on.length);
                }
              }, { stats: Tr, destroy: function() {
                wr.destroy();
              } });
            }
            function st(rn, Tn) {
              var sr = 0;
              Zn.procs.poll();
              var $n = Tn.color;
              $n && (qt.clearColor(+$n[0] || 0, +$n[1] || 0, +$n[2] || 0, +$n[3] || 0), sr |= 16384), "depth" in Tn && (qt.clearDepth(+Tn.depth), sr |= 256), "stencil" in Tn && (qt.clearStencil(0 | Tn.stencil), sr |= 1024), qt.clear(sr);
            }
            function Ot(rn) {
              return zr.push(rn), Mt(), { cancel: function() {
                var Tn = ne(zr, rn);
                zr[Tn] = function sr() {
                  var $n = ne(zr, sr);
                  zr[$n] = zr[zr.length - 1], --zr.length, 0 >= zr.length && At();
                };
              } };
            }
            function kt() {
              var rn = lr.viewport, Tn = lr.scissor_box;
              rn[0] = rn[1] = Tn[0] = Tn[1] = 0, Xn.viewportWidth = Xn.framebufferWidth = Xn.drawingBufferWidth = rn[2] = Tn[2] = qt.drawingBufferWidth, Xn.viewportHeight = Xn.framebufferHeight = Xn.drawingBufferHeight = rn[3] = Tn[3] = qt.drawingBufferHeight;
            }
            function Bt() {
              Xn.tick += 1, Xn.time = Jt(), kt(), Zn.procs.poll();
            }
            function xt() {
              Kn.refresh(), kt(), Zn.procs.refresh(), zn && zn.update();
            }
            function Jt() {
              return (pe() - Cn) / 1e3;
            }
            if (!(Fe = h(Fe))) return null;
            var qt = Fe.gl, en = qt.getContextAttributes();
            qt.isContextLost();
            var Yt = function(rn, Tn) {
              function sr(wr) {
                var Fr;
                wr = wr.toLowerCase();
                try {
                  Fr = $n[wr] = rn.getExtension(wr);
                } catch {
                }
                return !!Fr;
              }
              for (var $n = {}, ur = 0; ur < Tn.extensions.length; ++ur) {
                var Tr = Tn.extensions[ur];
                if (!sr(Tr)) return Tn.onDestroy(), Tn.onDone('"' + Tr + '" extension is not supported by the current WebGL context, try upgrading your system or a different browser'), null;
              }
              return Tn.optionalExtensions.forEach(sr), { extensions: $n, restore: function() {
                Object.keys($n).forEach(function(wr) {
                  if ($n[wr] && !sr(wr)) throw Error("(regl): error restoring extension " + wr);
                });
              } };
            }(qt, Fe);
            if (!Yt) return null;
            var Ht = /* @__PURE__ */ function() {
              var rn = { "": 0 }, Tn = [""];
              return { id: function(sr) {
                var $n = rn[sr];
                return $n || ($n = rn[sr] = Tn.length, Tn.push(sr), $n);
              }, str: function(sr) {
                return Tn[sr];
              } };
            }(), sn = { vaoCount: 0, bufferCount: 0, elementsCount: 0, framebufferCount: 0, shaderCount: 0, textureCount: 0, cubeCount: 0, renderbufferCount: 0, maxTextureUnits: 0 }, fn = Fe.cachedCode || {}, In = Yt.extensions, zn = function(rn, Tn) {
              function sr() {
                this.endQueryIndex = this.startQueryIndex = -1, this.sum = 0, this.stats = null;
              }
              function $n(Gn, on, ln) {
                var bn = wr.pop() || new sr();
                bn.startQueryIndex = Gn, bn.endQueryIndex = on, bn.sum = 0, bn.stats = ln, Fr.push(bn);
              }
              if (!Tn.ext_disjoint_timer_query) return null;
              var ur = [], Tr = [], wr = [], Fr = [], Xr = [], un = [];
              return { beginQuery: function(Gn) {
                var on = ur.pop() || Tn.ext_disjoint_timer_query.createQueryEXT();
                Tn.ext_disjoint_timer_query.beginQueryEXT(35007, on), Tr.push(on), $n(Tr.length - 1, Tr.length, Gn);
              }, endQuery: function() {
                Tn.ext_disjoint_timer_query.endQueryEXT(35007);
              }, pushScopeStats: $n, update: function() {
                var Gn, on;
                if ((Gn = Tr.length) !== 0) {
                  un.length = Math.max(un.length, Gn + 1), Xr.length = Math.max(Xr.length, Gn + 1), Xr[0] = 0;
                  var ln = un[0] = 0;
                  for (on = Gn = 0; on < Tr.length; ++on) {
                    var bn = Tr[on];
                    Tn.ext_disjoint_timer_query.getQueryObjectEXT(bn, 34919) ? (ln += Tn.ext_disjoint_timer_query.getQueryObjectEXT(bn, 34918), ur.push(bn)) : Tr[Gn++] = bn, Xr[on + 1] = ln, un[on + 1] = Gn;
                  }
                  for (Tr.length = Gn, on = Gn = 0; on < Fr.length; ++on) {
                    var Nn = (ln = Fr[on]).startQueryIndex;
                    bn = ln.endQueryIndex, ln.sum += Xr[bn] - Xr[Nn], Nn = un[Nn], (bn = un[bn]) === Nn ? (ln.stats.gpuTime += ln.sum / 1e6, wr.push(ln)) : (ln.startQueryIndex = Nn, ln.endQueryIndex = bn, Fr[Gn++] = ln);
                  }
                  Fr.length = Gn;
                }
              }, getNumPendingQueries: function() {
                return Tr.length;
              }, clear: function() {
                ur.push.apply(ur, Tr);
                for (var Gn = 0; Gn < ur.length; Gn++) Tn.ext_disjoint_timer_query.deleteQueryEXT(ur[Gn]);
                Tr.length = 0, ur.length = 0;
              }, restore: function() {
                Tr.length = 0, ur.length = 0;
              } };
            }(0, In), Cn = pe(), gn = qt.drawingBufferWidth, Mn = qt.drawingBufferHeight, Xn = { tick: 0, time: 0, viewportWidth: gn, viewportHeight: Mn, framebufferWidth: gn, framebufferHeight: Mn, drawingBufferWidth: gn, drawingBufferHeight: Mn, pixelRatio: Fe.pixelRatio }, Pn = (gn = { elements: null, primitive: 4, count: -1, offset: 0, instances: -1 }, Ae(qt, In)), wn = k(qt, sn, Fe, function(rn) {
              return _n.destroyBuffer(rn);
            }), Rn = S(qt, In, wn, sn), _n = U(qt, In, Pn, sn, wn, Rn, gn), En = V(qt, Ht, sn, Fe), Kn = T(qt, In, Pn, function() {
              Zn.procs.poll();
            }, Xn, sn, Fe), Wn = $t(qt, In, 0, sn, Fe), hr = z(qt, In, Pn, Kn, Wn, sn), Zn = de(qt, Ht, In, Pn, wn, Rn, 0, hr, {}, _n, En, gn, Xn, zn, fn, Fe), lr = (Ht = $(qt, hr, Zn.procs.poll, Xn), Zn.next), cr = qt.canvas, zr = [], Wr = [], mr = [], Ir = [Fe.onDestroy], yr = null;
            cr && (cr.addEventListener("webglcontextlost", Rt, !1), cr.addEventListener("webglcontextrestored", Ft, !1));
            var Vr = hr.setFBO = lt({ framebuffer: me.define.call(null, 1, "framebuffer") });
            return xt(), en = ae(lt, { clear: function(rn) {
              if ("framebuffer" in rn) if (rn.framebuffer && rn.framebuffer_reglType === "framebufferCube") for (var Tn = 0; 6 > Tn; ++Tn) Vr(ae({ framebuffer: rn.framebuffer.faces[Tn] }, rn), st);
              else Vr(rn, st);
              else st(0, rn);
            }, prop: me.define.bind(null, 1), context: me.define.bind(null, 2), this: me.define.bind(null, 3), draw: lt({}), buffer: function(rn) {
              return wn.create(rn, 34962, !1, !1);
            }, elements: function(rn) {
              return Rn.create(rn, !1);
            }, texture: Kn.create2D, cube: Kn.createCube, renderbuffer: Wn.create, framebuffer: hr.create, framebufferCube: hr.createCube, vao: _n.createVAO, attributes: en, frame: Ot, on: function(rn, Tn) {
              var sr;
              switch (rn) {
                case "frame":
                  return Ot(Tn);
                case "lost":
                  sr = Wr;
                  break;
                case "restore":
                  sr = mr;
                  break;
                case "destroy":
                  sr = Ir;
              }
              return sr.push(Tn), { cancel: function() {
                for (var $n = 0; $n < sr.length; ++$n) if (sr[$n] === Tn) {
                  sr[$n] = sr[sr.length - 1], sr.pop();
                  break;
                }
              } };
            }, limits: Pn, hasExtension: function(rn) {
              return 0 <= Pn.extensions.indexOf(rn.toLowerCase());
            }, read: Ht, destroy: function() {
              zr.length = 0, At(), cr && (cr.removeEventListener("webglcontextlost", Rt), cr.removeEventListener("webglcontextrestored", Ft)), En.clear(), hr.clear(), Wn.clear(), _n.clear(), Kn.clear(), Rn.clear(), wn.clear(), zn && zn.clear(), Ir.forEach(function(rn) {
                rn();
              });
            }, _gl: qt, _refresh: xt, poll: function() {
              Bt(), zn && zn.update();
            }, now: Jt, stats: sn, getCachedCode: function() {
              return fn;
            }, preloadCachedCode: function(rn) {
              Object.entries(rn).forEach(function(Tn) {
                fn[Tn[0]] = Tn[1];
              });
            } }), Fe.onDone(null, en), en;
          };
        }();
      }, 41041: function(o, s, n) {
        var l = n(45708), u = l.Buffer;
        function i(p, _) {
          for (var d in p) _[d] = p[d];
        }
        function h(p, _, d) {
          return u(p, _, d);
        }
        u.from && u.alloc && u.allocUnsafe && u.allocUnsafeSlow ? o.exports = l : (i(l, s), s.Buffer = h), h.prototype = Object.create(u.prototype), i(u, h), h.from = function(p, _, d) {
          if (typeof p == "number") throw new TypeError("Argument must not be a number");
          return u(p, _, d);
        }, h.alloc = function(p, _, d) {
          if (typeof p != "number") throw new TypeError("Argument must be a number");
          var f = u(p);
          return _ !== void 0 ? typeof d == "string" ? f.fill(_, d) : f.fill(_) : f.fill(0), f;
        }, h.allocUnsafe = function(p) {
          if (typeof p != "number") throw new TypeError("Argument must be a number");
          return u(p);
        }, h.allocUnsafeSlow = function(p) {
          if (typeof p != "number") throw new TypeError("Argument must be a number");
          return l.SlowBuffer(p);
        };
      }, 73285: function(o, s, n) {
        var l = n(71129), u = n(70973), i = n(74268)(), h = n(52991), p = n(48631), _ = l("%Math.floor%");
        o.exports = function(d, f) {
          if (typeof d != "function") throw new p("`fn` is not a function");
          if (typeof f != "number" || f < 0 || f > 4294967295 || _(f) !== f) throw new p("`length` must be a positive 32-bit integer");
          var c = arguments.length > 2 && !!arguments[2], g = !0, m = !0;
          if ("length" in d && h) {
            var x = h(d, "length");
            x && !x.configurable && (g = !1), x && !x.writable && (m = !1);
          }
          return (g || m || !c) && (i ? u(d, "length", f, !0, !0) : u(d, "length", f)), d;
        };
      }, 90386: function(o, s, n) {
        o.exports = u;
        var l = n(7683).EventEmitter;
        function u() {
          l.call(this);
        }
        n(28062)(u, l), u.Readable = n(44639), u.Writable = n(84627), u.Duplex = n(71977), u.Transform = n(40255), u.PassThrough = n(28765), u.finished = n(37165), u.pipeline = n(6772), u.Stream = u, u.prototype.pipe = function(i, h) {
          var p = this;
          function _(w) {
            i.writable && i.write(w) === !1 && p.pause && p.pause();
          }
          function d() {
            p.readable && p.resume && p.resume();
          }
          p.on("data", _), i.on("drain", d), i._isStdio || h && h.end === !1 || (p.on("end", c), p.on("close", g));
          var f = !1;
          function c() {
            f || (f = !0, i.end());
          }
          function g() {
            f || (f = !0, typeof i.destroy == "function" && i.destroy());
          }
          function m(w) {
            if (x(), l.listenerCount(this, "error") === 0) throw w;
          }
          function x() {
            p.removeListener("data", _), i.removeListener("drain", d), p.removeListener("end", c), p.removeListener("close", g), p.removeListener("error", m), i.removeListener("error", m), p.removeListener("end", x), p.removeListener("close", x), i.removeListener("close", x);
          }
          return p.on("error", m), i.on("error", m), p.on("end", x), p.on("close", x), i.on("close", x), i.emit("pipe", p), i;
        };
      }, 44059: function(o) {
        var s = {};
        function n(u, i, h) {
          h || (h = Error);
          var p = function(_) {
            var d, f;
            function c(g, m, x) {
              return _.call(this, function(w, k, S) {
                return typeof i == "string" ? i : i(w, k, S);
              }(g, m, x)) || this;
            }
            return f = _, (d = c).prototype = Object.create(f.prototype), d.prototype.constructor = d, d.__proto__ = f, c;
          }(h);
          p.prototype.name = h.name, p.prototype.code = u, s[u] = p;
        }
        function l(u, i) {
          if (Array.isArray(u)) {
            var h = u.length;
            return u = u.map(function(p) {
              return String(p);
            }), h > 2 ? "one of ".concat(i, " ").concat(u.slice(0, h - 1).join(", "), ", or ") + u[h - 1] : h === 2 ? "one of ".concat(i, " ").concat(u[0], " or ").concat(u[1]) : "of ".concat(i, " ").concat(u[0]);
          }
          return "of ".concat(i, " ").concat(String(u));
        }
        n("ERR_INVALID_OPT_VALUE", function(u, i) {
          return 'The value "' + i + '" is invalid for option "' + u + '"';
        }, TypeError), n("ERR_INVALID_ARG_TYPE", function(u, i, h) {
          var p, _, d, f, c;
          if (typeof i == "string" && (_ = "not ", i.substr(0, 4) === _) ? (p = "must not be", i = i.replace(/^not /, "")) : p = "must be", function(m, x, w) {
            return (w === void 0 || w > m.length) && (w = m.length), m.substring(w - 9, w) === x;
          }(u, " argument")) d = "The ".concat(u, " ").concat(p, " ").concat(l(i, "type"));
          else {
            var g = (typeof c != "number" && (c = 0), c + 1 > (f = u).length || f.indexOf(".", c) === -1 ? "argument" : "property");
            d = 'The "'.concat(u, '" ').concat(g, " ").concat(p, " ").concat(l(i, "type"));
          }
          return d + ". Received type ".concat(typeof h);
        }, TypeError), n("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"), n("ERR_METHOD_NOT_IMPLEMENTED", function(u) {
          return "The " + u + " method is not implemented";
        }), n("ERR_STREAM_PREMATURE_CLOSE", "Premature close"), n("ERR_STREAM_DESTROYED", function(u) {
          return "Cannot call " + u + " after a stream was destroyed";
        }), n("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), n("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), n("ERR_STREAM_WRITE_AFTER_END", "write after end"), n("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), n("ERR_UNKNOWN_ENCODING", function(u) {
          return "Unknown encoding: " + u;
        }, TypeError), n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), o.exports.F = s;
      }, 71977: function(o, s, n) {
        var l = n(33282), u = Object.keys || function(m) {
          var x = [];
          for (var w in m) x.push(w);
          return x;
        };
        o.exports = f;
        var i = n(44639), h = n(84627);
        n(28062)(f, i);
        for (var p = u(h.prototype), _ = 0; _ < p.length; _++) {
          var d = p[_];
          f.prototype[d] || (f.prototype[d] = h.prototype[d]);
        }
        function f(m) {
          if (!(this instanceof f)) return new f(m);
          i.call(this, m), h.call(this, m), this.allowHalfOpen = !0, m && (m.readable === !1 && (this.readable = !1), m.writable === !1 && (this.writable = !1), m.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", c)));
        }
        function c() {
          this._writableState.ended || l.nextTick(g, this);
        }
        function g(m) {
          m.end();
        }
        Object.defineProperty(f.prototype, "writableHighWaterMark", { enumerable: !1, get: function() {
          return this._writableState.highWaterMark;
        } }), Object.defineProperty(f.prototype, "writableBuffer", { enumerable: !1, get: function() {
          return this._writableState && this._writableState.getBuffer();
        } }), Object.defineProperty(f.prototype, "writableLength", { enumerable: !1, get: function() {
          return this._writableState.length;
        } }), Object.defineProperty(f.prototype, "destroyed", { enumerable: !1, get: function() {
          return this._readableState !== void 0 && this._writableState !== void 0 && this._readableState.destroyed && this._writableState.destroyed;
        }, set: function(m) {
          this._readableState !== void 0 && this._writableState !== void 0 && (this._readableState.destroyed = m, this._writableState.destroyed = m);
        } });
      }, 28765: function(o, s, n) {
        o.exports = u;
        var l = n(40255);
        function u(i) {
          if (!(this instanceof u)) return new u(i);
          l.call(this, i);
        }
        n(28062)(u, l), u.prototype._transform = function(i, h, p) {
          p(null, i);
        };
      }, 44639: function(o, s, n) {
        var l, u = n(33282);
        o.exports = M, M.ReadableState = I, n(7683).EventEmitter;
        var i, h = function(ce, he) {
          return ce.listeners(he).length;
        }, p = n(60032), _ = n(45708).Buffer, d = n.g.Uint8Array || function() {
        }, f = n(77199);
        i = f && f.debuglog ? f.debuglog("stream") : function() {
        };
        var c, g, m, x = n(29930), w = n(52023), k = n(31976).getHighWaterMark, S = n(44059).F, A = S.ERR_INVALID_ARG_TYPE, C = S.ERR_STREAM_PUSH_AFTER_EOF, D = S.ERR_METHOD_NOT_IMPLEMENTED, L = S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
        n(28062)(M, p);
        var E = w.errorOrDestroy, P = ["error", "close", "destroy", "pause", "resume"];
        function I(ce, he, de) {
          l = l || n(71977), ce = ce || {}, typeof de != "boolean" && (de = he instanceof l), this.objectMode = !!ce.objectMode, de && (this.objectMode = this.objectMode || !!ce.readableObjectMode), this.highWaterMark = k(this, ce, "readableHighWaterMark", de), this.buffer = new x(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = ce.emitClose !== !1, this.autoDestroy = !!ce.autoDestroy, this.destroyed = !1, this.defaultEncoding = ce.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, ce.encoding && (c || (c = n(54304).I), this.decoder = new c(ce.encoding), this.encoding = ce.encoding);
        }
        function M(ce) {
          if (l = l || n(71977), !(this instanceof M)) return new M(ce);
          var he = this instanceof l;
          this._readableState = new I(ce, this, he), this.readable = !0, ce && (typeof ce.read == "function" && (this._read = ce.read), typeof ce.destroy == "function" && (this._destroy = ce.destroy)), p.call(this);
        }
        function O(ce, he, de, ne, ae) {
          i("readableAddChunk", he);
          var se, me = ce._readableState;
          if (he === null) me.reading = !1, function(ye, pe) {
            if (i("onEofChunk"), !pe.ended) {
              if (pe.decoder) {
                var be = pe.decoder.end();
                be && be.length && (pe.buffer.push(be), pe.length += pe.objectMode ? 1 : be.length);
              }
              pe.ended = !0, pe.sync ? U(ye) : (pe.needReadable = !1, pe.emittedReadable || (pe.emittedReadable = !0, V(ye)));
            }
          }(ce, me);
          else if (ae || (se = function(ye, pe) {
            var be, Ae;
            return Ae = pe, _.isBuffer(Ae) || Ae instanceof d || typeof pe == "string" || pe === void 0 || ye.objectMode || (be = new A("chunk", ["string", "Buffer", "Uint8Array"], pe)), be;
          }(me, he)), se) E(ce, se);
          else if (me.objectMode || he && he.length > 0) if (typeof he == "string" || me.objectMode || Object.getPrototypeOf(he) === _.prototype || (he = function(ye) {
            return _.from(ye);
          }(he)), ne) me.endEmitted ? E(ce, new L()) : T(ce, me, he, !0);
          else if (me.ended) E(ce, new C());
          else {
            if (me.destroyed) return !1;
            me.reading = !1, me.decoder && !de ? (he = me.decoder.write(he), me.objectMode || he.length !== 0 ? T(ce, me, he, !1) : $(ce, me)) : T(ce, me, he, !1);
          }
          else ne || (me.reading = !1, $(ce, me));
          return !me.ended && (me.length < me.highWaterMark || me.length === 0);
        }
        function T(ce, he, de, ne) {
          he.flowing && he.length === 0 && !he.sync ? (he.awaitDrain = 0, ce.emit("data", de)) : (he.length += he.objectMode ? 1 : de.length, ne ? he.buffer.unshift(de) : he.buffer.push(de), he.needReadable && U(ce)), $(ce, he);
        }
        Object.defineProperty(M.prototype, "destroyed", { enumerable: !1, get: function() {
          return this._readableState !== void 0 && this._readableState.destroyed;
        }, set: function(ce) {
          this._readableState && (this._readableState.destroyed = ce);
        } }), M.prototype.destroy = w.destroy, M.prototype._undestroy = w.undestroy, M.prototype._destroy = function(ce, he) {
          he(ce);
        }, M.prototype.push = function(ce, he) {
          var de, ne = this._readableState;
          return ne.objectMode ? de = !0 : typeof ce == "string" && ((he = he || ne.defaultEncoding) !== ne.encoding && (ce = _.from(ce, he), he = ""), de = !0), O(this, ce, he, !1, de);
        }, M.prototype.unshift = function(ce) {
          return O(this, ce, null, !0, !1);
        }, M.prototype.isPaused = function() {
          return this._readableState.flowing === !1;
        }, M.prototype.setEncoding = function(ce) {
          c || (c = n(54304).I);
          var he = new c(ce);
          this._readableState.decoder = he, this._readableState.encoding = this._readableState.decoder.encoding;
          for (var de = this._readableState.buffer.head, ne = ""; de !== null; ) ne += he.write(de.data), de = de.next;
          return this._readableState.buffer.clear(), ne !== "" && this._readableState.buffer.push(ne), this._readableState.length = ne.length, this;
        };
        var z = 1073741824;
        function F(ce, he) {
          return ce <= 0 || he.length === 0 && he.ended ? 0 : he.objectMode ? 1 : ce != ce ? he.flowing && he.length ? he.buffer.head.data.length : he.length : (ce > he.highWaterMark && (he.highWaterMark = function(de) {
            return de >= z ? de = z : (de--, de |= de >>> 1, de |= de >>> 2, de |= de >>> 4, de |= de >>> 8, de |= de >>> 16, de++), de;
          }(ce)), ce <= he.length ? ce : he.ended ? he.length : (he.needReadable = !0, 0));
        }
        function U(ce) {
          var he = ce._readableState;
          i("emitReadable", he.needReadable, he.emittedReadable), he.needReadable = !1, he.emittedReadable || (i("emitReadable", he.flowing), he.emittedReadable = !0, u.nextTick(V, ce));
        }
        function V(ce) {
          var he = ce._readableState;
          i("emitReadable_", he.destroyed, he.length, he.ended), he.destroyed || !he.length && !he.ended || (ce.emit("readable"), he.emittedReadable = !1), he.needReadable = !he.flowing && !he.ended && he.length <= he.highWaterMark, te(ce);
        }
        function $(ce, he) {
          he.readingMore || (he.readingMore = !0, u.nextTick(q, ce, he));
        }
        function q(ce, he) {
          for (; !he.reading && !he.ended && (he.length < he.highWaterMark || he.flowing && he.length === 0); ) {
            var de = he.length;
            if (i("maybeReadMore read 0"), ce.read(0), de === he.length) break;
          }
          he.readingMore = !1;
        }
        function K(ce) {
          var he = ce._readableState;
          he.readableListening = ce.listenerCount("readable") > 0, he.resumeScheduled && !he.paused ? he.flowing = !0 : ce.listenerCount("data") > 0 && ce.resume();
        }
        function re(ce) {
          i("readable nexttick read 0"), ce.read(0);
        }
        function Y(ce, he) {
          i("resume", he.reading), he.reading || ce.read(0), he.resumeScheduled = !1, ce.emit("resume"), te(ce), he.flowing && !he.reading && ce.read(0);
        }
        function te(ce) {
          var he = ce._readableState;
          for (i("flow", he.flowing); he.flowing && ce.read() !== null; ) ;
        }
        function ee(ce, he) {
          return he.length === 0 ? null : (he.objectMode ? de = he.buffer.shift() : !ce || ce >= he.length ? (de = he.decoder ? he.buffer.join("") : he.buffer.length === 1 ? he.buffer.first() : he.buffer.concat(he.length), he.buffer.clear()) : de = he.buffer.consume(ce, he.decoder), de);
          var de;
        }
        function X(ce) {
          var he = ce._readableState;
          i("endReadable", he.endEmitted), he.endEmitted || (he.ended = !0, u.nextTick(Q, he, ce));
        }
        function Q(ce, he) {
          if (i("endReadableNT", ce.endEmitted, ce.length), !ce.endEmitted && ce.length === 0 && (ce.endEmitted = !0, he.readable = !1, he.emit("end"), ce.autoDestroy)) {
            var de = he._writableState;
            (!de || de.autoDestroy && de.finished) && he.destroy();
          }
        }
        function ue(ce, he) {
          for (var de = 0, ne = ce.length; de < ne; de++) if (ce[de] === he) return de;
          return -1;
        }
        M.prototype.read = function(ce) {
          i("read", ce), ce = parseInt(ce, 10);
          var he = this._readableState, de = ce;
          if (ce !== 0 && (he.emittedReadable = !1), ce === 0 && he.needReadable && ((he.highWaterMark !== 0 ? he.length >= he.highWaterMark : he.length > 0) || he.ended)) return i("read: emitReadable", he.length, he.ended), he.length === 0 && he.ended ? X(this) : U(this), null;
          if ((ce = F(ce, he)) === 0 && he.ended) return he.length === 0 && X(this), null;
          var ne, ae = he.needReadable;
          return i("need readable", ae), (he.length === 0 || he.length - ce < he.highWaterMark) && i("length less than watermark", ae = !0), he.ended || he.reading ? i("reading or ended", ae = !1) : ae && (i("do read"), he.reading = !0, he.sync = !0, he.length === 0 && (he.needReadable = !0), this._read(he.highWaterMark), he.sync = !1, he.reading || (ce = F(de, he))), (ne = ce > 0 ? ee(ce, he) : null) === null ? (he.needReadable = he.length <= he.highWaterMark, ce = 0) : (he.length -= ce, he.awaitDrain = 0), he.length === 0 && (he.ended || (he.needReadable = !0), de !== ce && he.ended && X(this)), ne !== null && this.emit("data", ne), ne;
        }, M.prototype._read = function(ce) {
          E(this, new D("_read()"));
        }, M.prototype.pipe = function(ce, he) {
          var de = this, ne = this._readableState;
          switch (ne.pipesCount) {
            case 0:
              ne.pipes = ce;
              break;
            case 1:
              ne.pipes = [ne.pipes, ce];
              break;
            default:
              ne.pipes.push(ce);
          }
          ne.pipesCount += 1, i("pipe count=%d opts=%j", ne.pipesCount, he);
          var ae = he && he.end === !1 || ce === u.stdout || ce === u.stderr ? Me : se;
          function se() {
            i("onend"), ce.end();
          }
          ne.endEmitted ? u.nextTick(ae) : de.once("end", ae), ce.on("unpipe", function De(Le, We) {
            i("onunpipe"), Le === de && We && We.hasUnpiped === !1 && (We.hasUnpiped = !0, i("cleanup"), ce.removeListener("close", Ae), ce.removeListener("finish", Se), ce.removeListener("drain", me), ce.removeListener("error", be), ce.removeListener("unpipe", De), de.removeListener("end", se), de.removeListener("end", Me), de.removeListener("data", pe), ye = !0, !ne.awaitDrain || ce._writableState && !ce._writableState.needDrain || me());
          });
          var me = /* @__PURE__ */ function(De) {
            return function() {
              var Le = De._readableState;
              i("pipeOnDrain", Le.awaitDrain), Le.awaitDrain && Le.awaitDrain--, Le.awaitDrain === 0 && h(De, "data") && (Le.flowing = !0, te(De));
            };
          }(de);
          ce.on("drain", me);
          var ye = !1;
          function pe(De) {
            i("ondata");
            var Le = ce.write(De);
            i("dest.write", Le), Le === !1 && ((ne.pipesCount === 1 && ne.pipes === ce || ne.pipesCount > 1 && ue(ne.pipes, ce) !== -1) && !ye && (i("false write response, pause", ne.awaitDrain), ne.awaitDrain++), de.pause());
          }
          function be(De) {
            i("onerror", De), Me(), ce.removeListener("error", be), h(ce, "error") === 0 && E(ce, De);
          }
          function Ae() {
            ce.removeListener("finish", Se), Me();
          }
          function Se() {
            i("onfinish"), ce.removeListener("close", Ae), Me();
          }
          function Me() {
            i("unpipe"), de.unpipe(ce);
          }
          return de.on("data", pe), function(De, Le, We) {
            if (typeof De.prependListener == "function") return De.prependListener(Le, We);
            De._events && De._events[Le] ? Array.isArray(De._events[Le]) ? De._events[Le].unshift(We) : De._events[Le] = [We, De._events[Le]] : De.on(Le, We);
          }(ce, "error", be), ce.once("close", Ae), ce.once("finish", Se), ce.emit("pipe", de), ne.flowing || (i("pipe resume"), de.resume()), ce;
        }, M.prototype.unpipe = function(ce) {
          var he = this._readableState, de = { hasUnpiped: !1 };
          if (he.pipesCount === 0) return this;
          if (he.pipesCount === 1) return ce && ce !== he.pipes || (ce || (ce = he.pipes), he.pipes = null, he.pipesCount = 0, he.flowing = !1, ce && ce.emit("unpipe", this, de)), this;
          if (!ce) {
            var ne = he.pipes, ae = he.pipesCount;
            he.pipes = null, he.pipesCount = 0, he.flowing = !1;
            for (var se = 0; se < ae; se++) ne[se].emit("unpipe", this, { hasUnpiped: !1 });
            return this;
          }
          var me = ue(he.pipes, ce);
          return me === -1 || (he.pipes.splice(me, 1), he.pipesCount -= 1, he.pipesCount === 1 && (he.pipes = he.pipes[0]), ce.emit("unpipe", this, de)), this;
        }, M.prototype.on = function(ce, he) {
          var de = p.prototype.on.call(this, ce, he), ne = this._readableState;
          return ce === "data" ? (ne.readableListening = this.listenerCount("readable") > 0, ne.flowing !== !1 && this.resume()) : ce === "readable" && (ne.endEmitted || ne.readableListening || (ne.readableListening = ne.needReadable = !0, ne.flowing = !1, ne.emittedReadable = !1, i("on readable", ne.length, ne.reading), ne.length ? U(this) : ne.reading || u.nextTick(re, this))), de;
        }, M.prototype.addListener = M.prototype.on, M.prototype.removeListener = function(ce, he) {
          var de = p.prototype.removeListener.call(this, ce, he);
          return ce === "readable" && u.nextTick(K, this), de;
        }, M.prototype.removeAllListeners = function(ce) {
          var he = p.prototype.removeAllListeners.apply(this, arguments);
          return ce !== "readable" && ce !== void 0 || u.nextTick(K, this), he;
        }, M.prototype.resume = function() {
          var ce = this._readableState;
          return ce.flowing || (i("resume"), ce.flowing = !ce.readableListening, function(he, de) {
            de.resumeScheduled || (de.resumeScheduled = !0, u.nextTick(Y, he, de));
          }(this, ce)), ce.paused = !1, this;
        }, M.prototype.pause = function() {
          return i("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (i("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
        }, M.prototype.wrap = function(ce) {
          var he = this, de = this._readableState, ne = !1;
          for (var ae in ce.on("end", function() {
            if (i("wrapped end"), de.decoder && !de.ended) {
              var me = de.decoder.end();
              me && me.length && he.push(me);
            }
            he.push(null);
          }), ce.on("data", function(me) {
            i("wrapped data"), de.decoder && (me = de.decoder.write(me)), de.objectMode && me == null || (de.objectMode || me && me.length) && (he.push(me) || (ne = !0, ce.pause()));
          }), ce) this[ae] === void 0 && typeof ce[ae] == "function" && (this[ae] = /* @__PURE__ */ function(me) {
            return function() {
              return ce[me].apply(ce, arguments);
            };
          }(ae));
          for (var se = 0; se < P.length; se++) ce.on(P[se], this.emit.bind(this, P[se]));
          return this._read = function(me) {
            i("wrapped _read", me), ne && (ne = !1, ce.resume());
          }, this;
        }, typeof Symbol == "function" && (M.prototype[Symbol.asyncIterator] = function() {
          return g === void 0 && (g = n(73726)), g(this);
        }), Object.defineProperty(M.prototype, "readableHighWaterMark", { enumerable: !1, get: function() {
          return this._readableState.highWaterMark;
        } }), Object.defineProperty(M.prototype, "readableBuffer", { enumerable: !1, get: function() {
          return this._readableState && this._readableState.buffer;
        } }), Object.defineProperty(M.prototype, "readableFlowing", { enumerable: !1, get: function() {
          return this._readableState.flowing;
        }, set: function(ce) {
          this._readableState && (this._readableState.flowing = ce);
        } }), M._fromList = ee, Object.defineProperty(M.prototype, "readableLength", { enumerable: !1, get: function() {
          return this._readableState.length;
        } }), typeof Symbol == "function" && (M.from = function(ce, he) {
          return m === void 0 && (m = n(37108)), m(M, ce, he);
        });
      }, 40255: function(o, s, n) {
        o.exports = f;
        var l = n(44059).F, u = l.ERR_METHOD_NOT_IMPLEMENTED, i = l.ERR_MULTIPLE_CALLBACK, h = l.ERR_TRANSFORM_ALREADY_TRANSFORMING, p = l.ERR_TRANSFORM_WITH_LENGTH_0, _ = n(71977);
        function d(m, x) {
          var w = this._transformState;
          w.transforming = !1;
          var k = w.writecb;
          if (k === null) return this.emit("error", new i());
          w.writechunk = null, w.writecb = null, x != null && this.push(x), k(m);
          var S = this._readableState;
          S.reading = !1, (S.needReadable || S.length < S.highWaterMark) && this._read(S.highWaterMark);
        }
        function f(m) {
          if (!(this instanceof f)) return new f(m);
          _.call(this, m), this._transformState = { afterTransform: d.bind(this), needTransform: !1, transforming: !1, writecb: null, writechunk: null, writeencoding: null }, this._readableState.needReadable = !0, this._readableState.sync = !1, m && (typeof m.transform == "function" && (this._transform = m.transform), typeof m.flush == "function" && (this._flush = m.flush)), this.on("prefinish", c);
        }
        function c() {
          var m = this;
          typeof this._flush != "function" || this._readableState.destroyed ? g(this, null, null) : this._flush(function(x, w) {
            g(m, x, w);
          });
        }
        function g(m, x, w) {
          if (x) return m.emit("error", x);
          if (w != null && m.push(w), m._writableState.length) throw new p();
          if (m._transformState.transforming) throw new h();
          return m.push(null);
        }
        n(28062)(f, _), f.prototype.push = function(m, x) {
          return this._transformState.needTransform = !1, _.prototype.push.call(this, m, x);
        }, f.prototype._transform = function(m, x, w) {
          w(new u("_transform()"));
        }, f.prototype._write = function(m, x, w) {
          var k = this._transformState;
          if (k.writecb = w, k.writechunk = m, k.writeencoding = x, !k.transforming) {
            var S = this._readableState;
            (k.needTransform || S.needReadable || S.length < S.highWaterMark) && this._read(S.highWaterMark);
          }
        }, f.prototype._read = function(m) {
          var x = this._transformState;
          x.writechunk === null || x.transforming ? x.needTransform = !0 : (x.transforming = !0, this._transform(x.writechunk, x.writeencoding, x.afterTransform));
        }, f.prototype._destroy = function(m, x) {
          _.prototype._destroy.call(this, m, function(w) {
            x(w);
          });
        };
      }, 84627: function(o, s, n) {
        var l, u = n(33282);
        function i($) {
          var q = this;
          this.next = null, this.entry = null, this.finish = function() {
            (function(K, re, Y) {
              var te = K.entry;
              for (K.entry = null; te; ) {
                var ee = te.callback;
                re.pendingcb--, ee(void 0), te = te.next;
              }
              re.corkedRequestsFree.next = K;
            })(q, $);
          };
        }
        o.exports = M, M.WritableState = I;
        var h, p = { deprecate: n(71103) }, _ = n(60032), d = n(45708).Buffer, f = n.g.Uint8Array || function() {
        }, c = n(52023), g = n(31976).getHighWaterMark, m = n(44059).F, x = m.ERR_INVALID_ARG_TYPE, w = m.ERR_METHOD_NOT_IMPLEMENTED, k = m.ERR_MULTIPLE_CALLBACK, S = m.ERR_STREAM_CANNOT_PIPE, A = m.ERR_STREAM_DESTROYED, C = m.ERR_STREAM_NULL_VALUES, D = m.ERR_STREAM_WRITE_AFTER_END, L = m.ERR_UNKNOWN_ENCODING, E = c.errorOrDestroy;
        function P() {
        }
        function I($, q, K) {
          l = l || n(71977), $ = $ || {}, typeof K != "boolean" && (K = q instanceof l), this.objectMode = !!$.objectMode, K && (this.objectMode = this.objectMode || !!$.writableObjectMode), this.highWaterMark = g(this, $, "writableHighWaterMark", K), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
          var re = $.decodeStrings === !1;
          this.decodeStrings = !re, this.defaultEncoding = $.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(Y) {
            (function(te, ee) {
              var X = te._writableState, Q = X.sync, ue = X.writecb;
              if (typeof ue != "function") throw new k();
              if (function(he) {
                he.writing = !1, he.writecb = null, he.length -= he.writelen, he.writelen = 0;
              }(X), ee) (function(he, de, ne, ae, se) {
                --de.pendingcb, ne ? (u.nextTick(se, ae), u.nextTick(V, he, de), he._writableState.errorEmitted = !0, E(he, ae)) : (se(ae), he._writableState.errorEmitted = !0, E(he, ae), V(he, de));
              })(te, X, Q, ee, ue);
              else {
                var ce = F(X) || te.destroyed;
                ce || X.corked || X.bufferProcessing || !X.bufferedRequest || z(te, X), Q ? u.nextTick(T, te, X, ce, ue) : T(te, X, ce, ue);
              }
            })(q, Y);
          }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = $.emitClose !== !1, this.autoDestroy = !!$.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new i(this);
        }
        function M($) {
          var q = this instanceof (l = l || n(71977));
          if (!q && !h.call(M, this)) return new M($);
          this._writableState = new I($, this, q), this.writable = !0, $ && (typeof $.write == "function" && (this._write = $.write), typeof $.writev == "function" && (this._writev = $.writev), typeof $.destroy == "function" && (this._destroy = $.destroy), typeof $.final == "function" && (this._final = $.final)), _.call(this);
        }
        function O($, q, K, re, Y, te, ee) {
          q.writelen = re, q.writecb = ee, q.writing = !0, q.sync = !0, q.destroyed ? q.onwrite(new A("write")) : K ? $._writev(Y, q.onwrite) : $._write(Y, te, q.onwrite), q.sync = !1;
        }
        function T($, q, K, re) {
          K || function(Y, te) {
            te.length === 0 && te.needDrain && (te.needDrain = !1, Y.emit("drain"));
          }($, q), q.pendingcb--, re(), V($, q);
        }
        function z($, q) {
          q.bufferProcessing = !0;
          var K = q.bufferedRequest;
          if ($._writev && K && K.next) {
            var re = q.bufferedRequestCount, Y = new Array(re), te = q.corkedRequestsFree;
            te.entry = K;
            for (var ee = 0, X = !0; K; ) Y[ee] = K, K.isBuf || (X = !1), K = K.next, ee += 1;
            Y.allBuffers = X, O($, q, !0, q.length, Y, "", te.finish), q.pendingcb++, q.lastBufferedRequest = null, te.next ? (q.corkedRequestsFree = te.next, te.next = null) : q.corkedRequestsFree = new i(q), q.bufferedRequestCount = 0;
          } else {
            for (; K; ) {
              var Q = K.chunk, ue = K.encoding, ce = K.callback;
              if (O($, q, !1, q.objectMode ? 1 : Q.length, Q, ue, ce), K = K.next, q.bufferedRequestCount--, q.writing) break;
            }
            K === null && (q.lastBufferedRequest = null);
          }
          q.bufferedRequest = K, q.bufferProcessing = !1;
        }
        function F($) {
          return $.ending && $.length === 0 && $.bufferedRequest === null && !$.finished && !$.writing;
        }
        function U($, q) {
          $._final(function(K) {
            q.pendingcb--, K && E($, K), q.prefinished = !0, $.emit("prefinish"), V($, q);
          });
        }
        function V($, q) {
          var K = F(q);
          if (K && (function(Y, te) {
            te.prefinished || te.finalCalled || (typeof Y._final != "function" || te.destroyed ? (te.prefinished = !0, Y.emit("prefinish")) : (te.pendingcb++, te.finalCalled = !0, u.nextTick(U, Y, te)));
          }($, q), q.pendingcb === 0 && (q.finished = !0, $.emit("finish"), q.autoDestroy))) {
            var re = $._readableState;
            (!re || re.autoDestroy && re.endEmitted) && $.destroy();
          }
          return K;
        }
        n(28062)(M, _), I.prototype.getBuffer = function() {
          for (var $ = this.bufferedRequest, q = []; $; ) q.push($), $ = $.next;
          return q;
        }, function() {
          try {
            Object.defineProperty(I.prototype, "buffer", { get: p.deprecate(function() {
              return this.getBuffer();
            }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") });
          } catch {
          }
        }(), typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (h = Function.prototype[Symbol.hasInstance], Object.defineProperty(M, Symbol.hasInstance, { value: function($) {
          return !!h.call(this, $) || this === M && $ && $._writableState instanceof I;
        } })) : h = function($) {
          return $ instanceof this;
        }, M.prototype.pipe = function() {
          E(this, new S());
        }, M.prototype.write = function($, q, K) {
          var re, Y = this._writableState, te = !1, ee = !Y.objectMode && (re = $, d.isBuffer(re) || re instanceof f);
          return ee && !d.isBuffer($) && ($ = function(X) {
            return d.from(X);
          }($)), typeof q == "function" && (K = q, q = null), ee ? q = "buffer" : q || (q = Y.defaultEncoding), typeof K != "function" && (K = P), Y.ending ? function(X, Q) {
            var ue = new D();
            E(X, ue), u.nextTick(Q, ue);
          }(this, K) : (ee || function(X, Q, ue, ce) {
            var he;
            return ue === null ? he = new C() : typeof ue == "string" || Q.objectMode || (he = new x("chunk", ["string", "Buffer"], ue)), !he || (E(X, he), u.nextTick(ce, he), !1);
          }(this, Y, $, K)) && (Y.pendingcb++, te = function(X, Q, ue, ce, he, de) {
            if (!ue) {
              var ne = function(ye, pe, be) {
                return ye.objectMode || ye.decodeStrings === !1 || typeof pe != "string" || (pe = d.from(pe, be)), pe;
              }(Q, ce, he);
              ce !== ne && (ue = !0, he = "buffer", ce = ne);
            }
            var ae = Q.objectMode ? 1 : ce.length;
            Q.length += ae;
            var se = Q.length < Q.highWaterMark;
            if (se || (Q.needDrain = !0), Q.writing || Q.corked) {
              var me = Q.lastBufferedRequest;
              Q.lastBufferedRequest = { chunk: ce, encoding: he, isBuf: ue, callback: de, next: null }, me ? me.next = Q.lastBufferedRequest : Q.bufferedRequest = Q.lastBufferedRequest, Q.bufferedRequestCount += 1;
            } else O(X, Q, !1, ae, ce, he, de);
            return se;
          }(this, Y, ee, $, q, K)), te;
        }, M.prototype.cork = function() {
          this._writableState.corked++;
        }, M.prototype.uncork = function() {
          var $ = this._writableState;
          $.corked && ($.corked--, $.writing || $.corked || $.bufferProcessing || !$.bufferedRequest || z(this, $));
        }, M.prototype.setDefaultEncoding = function($) {
          if (typeof $ == "string" && ($ = $.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf(($ + "").toLowerCase()) > -1)) throw new L($);
          return this._writableState.defaultEncoding = $, this;
        }, Object.defineProperty(M.prototype, "writableBuffer", { enumerable: !1, get: function() {
          return this._writableState && this._writableState.getBuffer();
        } }), Object.defineProperty(M.prototype, "writableHighWaterMark", { enumerable: !1, get: function() {
          return this._writableState.highWaterMark;
        } }), M.prototype._write = function($, q, K) {
          K(new w("_write()"));
        }, M.prototype._writev = null, M.prototype.end = function($, q, K) {
          var re = this._writableState;
          return typeof $ == "function" ? (K = $, $ = null, q = null) : typeof q == "function" && (K = q, q = null), $ != null && this.write($, q), re.corked && (re.corked = 1, this.uncork()), re.ending || function(Y, te, ee) {
            te.ending = !0, V(Y, te), ee && (te.finished ? u.nextTick(ee) : Y.once("finish", ee)), te.ended = !0, Y.writable = !1;
          }(this, re, K), this;
        }, Object.defineProperty(M.prototype, "writableLength", { enumerable: !1, get: function() {
          return this._writableState.length;
        } }), Object.defineProperty(M.prototype, "destroyed", { enumerable: !1, get: function() {
          return this._writableState !== void 0 && this._writableState.destroyed;
        }, set: function($) {
          this._writableState && (this._writableState.destroyed = $);
        } }), M.prototype.destroy = c.destroy, M.prototype._undestroy = c.undestroy, M.prototype._destroy = function($, q) {
          q($);
        };
      }, 73726: function(o, s, n) {
        var l, u = n(33282);
        function i(C, D, L) {
          return D in C ? Object.defineProperty(C, D, { value: L, enumerable: !0, configurable: !0, writable: !0 }) : C[D] = L, C;
        }
        var h = n(37165), p = Symbol("lastResolve"), _ = Symbol("lastReject"), d = Symbol("error"), f = Symbol("ended"), c = Symbol("lastPromise"), g = Symbol("handlePromise"), m = Symbol("stream");
        function x(C, D) {
          return { value: C, done: D };
        }
        function w(C) {
          var D = C[p];
          if (D !== null) {
            var L = C[m].read();
            L !== null && (C[c] = null, C[p] = null, C[_] = null, D(x(L, !1)));
          }
        }
        function k(C) {
          u.nextTick(w, C);
        }
        var S = Object.getPrototypeOf(function() {
        }), A = Object.setPrototypeOf((i(l = { get stream() {
          return this[m];
        }, next: function() {
          var C = this, D = this[d];
          if (D !== null) return Promise.reject(D);
          if (this[f]) return Promise.resolve(x(void 0, !0));
          if (this[m].destroyed) return new Promise(function(I, M) {
            u.nextTick(function() {
              C[d] ? M(C[d]) : I(x(void 0, !0));
            });
          });
          var L, E = this[c];
          if (E) L = new Promise(/* @__PURE__ */ function(I, M) {
            return function(O, T) {
              I.then(function() {
                M[f] ? O(x(void 0, !0)) : M[g](O, T);
              }, T);
            };
          }(E, this));
          else {
            var P = this[m].read();
            if (P !== null) return Promise.resolve(x(P, !1));
            L = new Promise(this[g]);
          }
          return this[c] = L, L;
        } }, Symbol.asyncIterator, function() {
          return this;
        }), i(l, "return", function() {
          var C = this;
          return new Promise(function(D, L) {
            C[m].destroy(null, function(E) {
              E ? L(E) : D(x(void 0, !0));
            });
          });
        }), l), S);
        o.exports = function(C) {
          var D, L = Object.create(A, (i(D = {}, m, { value: C, writable: !0 }), i(D, p, { value: null, writable: !0 }), i(D, _, { value: null, writable: !0 }), i(D, d, { value: null, writable: !0 }), i(D, f, { value: C._readableState.endEmitted, writable: !0 }), i(D, g, { value: function(E, P) {
            var I = L[m].read();
            I ? (L[c] = null, L[p] = null, L[_] = null, E(x(I, !1))) : (L[p] = E, L[_] = P);
          }, writable: !0 }), D));
          return L[c] = null, h(C, function(E) {
            if (E && E.code !== "ERR_STREAM_PREMATURE_CLOSE") {
              var P = L[_];
              return P !== null && (L[c] = null, L[p] = null, L[_] = null, P(E)), void (L[d] = E);
            }
            var I = L[p];
            I !== null && (L[c] = null, L[p] = null, L[_] = null, I(x(void 0, !0))), L[f] = !0;
          }), C.on("readable", k.bind(null, L)), L;
        };
      }, 29930: function(o, s, n) {
        function l(d, f) {
          var c = Object.keys(d);
          if (Object.getOwnPropertySymbols) {
            var g = Object.getOwnPropertySymbols(d);
            f && (g = g.filter(function(m) {
              return Object.getOwnPropertyDescriptor(d, m).enumerable;
            })), c.push.apply(c, g);
          }
          return c;
        }
        function u(d, f, c) {
          return f in d ? Object.defineProperty(d, f, { value: c, enumerable: !0, configurable: !0, writable: !0 }) : d[f] = c, d;
        }
        function i(d, f) {
          for (var c = 0; c < f.length; c++) {
            var g = f[c];
            g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(d, g.key, g);
          }
        }
        var h = n(45708).Buffer, p = n(63779).inspect, _ = p && p.custom || "inspect";
        o.exports = function() {
          function d() {
            (function(g, m) {
              if (!(g instanceof m)) throw new TypeError("Cannot call a class as a function");
            })(this, d), this.head = null, this.tail = null, this.length = 0;
          }
          var f, c;
          return f = d, c = [{ key: "push", value: function(g) {
            var m = { data: g, next: null };
            this.length > 0 ? this.tail.next = m : this.head = m, this.tail = m, ++this.length;
          } }, { key: "unshift", value: function(g) {
            var m = { data: g, next: this.head };
            this.length === 0 && (this.tail = m), this.head = m, ++this.length;
          } }, { key: "shift", value: function() {
            if (this.length !== 0) {
              var g = this.head.data;
              return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, g;
            }
          } }, { key: "clear", value: function() {
            this.head = this.tail = null, this.length = 0;
          } }, { key: "join", value: function(g) {
            if (this.length === 0) return "";
            for (var m = this.head, x = "" + m.data; m = m.next; ) x += g + m.data;
            return x;
          } }, { key: "concat", value: function(g) {
            if (this.length === 0) return h.alloc(0);
            for (var m, x, w, k = h.allocUnsafe(g >>> 0), S = this.head, A = 0; S; ) m = S.data, x = k, w = A, h.prototype.copy.call(m, x, w), A += S.data.length, S = S.next;
            return k;
          } }, { key: "consume", value: function(g, m) {
            var x;
            return g < this.head.data.length ? (x = this.head.data.slice(0, g), this.head.data = this.head.data.slice(g)) : x = g === this.head.data.length ? this.shift() : m ? this._getString(g) : this._getBuffer(g), x;
          } }, { key: "first", value: function() {
            return this.head.data;
          } }, { key: "_getString", value: function(g) {
            var m = this.head, x = 1, w = m.data;
            for (g -= w.length; m = m.next; ) {
              var k = m.data, S = g > k.length ? k.length : g;
              if (S === k.length ? w += k : w += k.slice(0, g), (g -= S) == 0) {
                S === k.length ? (++x, m.next ? this.head = m.next : this.head = this.tail = null) : (this.head = m, m.data = k.slice(S));
                break;
              }
              ++x;
            }
            return this.length -= x, w;
          } }, { key: "_getBuffer", value: function(g) {
            var m = h.allocUnsafe(g), x = this.head, w = 1;
            for (x.data.copy(m), g -= x.data.length; x = x.next; ) {
              var k = x.data, S = g > k.length ? k.length : g;
              if (k.copy(m, m.length - g, 0, S), (g -= S) == 0) {
                S === k.length ? (++w, x.next ? this.head = x.next : this.head = this.tail = null) : (this.head = x, x.data = k.slice(S));
                break;
              }
              ++w;
            }
            return this.length -= w, m;
          } }, { key: _, value: function(g, m) {
            return p(this, function(x) {
              for (var w = 1; w < arguments.length; w++) {
                var k = arguments[w] != null ? arguments[w] : {};
                w % 2 ? l(Object(k), !0).forEach(function(S) {
                  u(x, S, k[S]);
                }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(x, Object.getOwnPropertyDescriptors(k)) : l(Object(k)).forEach(function(S) {
                  Object.defineProperty(x, S, Object.getOwnPropertyDescriptor(k, S));
                });
              }
              return x;
            }({}, m, { depth: 0, customInspect: !1 }));
          } }], c && i(f.prototype, c), d;
        }();
      }, 52023: function(o, s, n) {
        var l = n(33282);
        function u(p, _) {
          h(p, _), i(p);
        }
        function i(p) {
          p._writableState && !p._writableState.emitClose || p._readableState && !p._readableState.emitClose || p.emit("close");
        }
        function h(p, _) {
          p.emit("error", _);
        }
        o.exports = { destroy: function(p, _) {
          var d = this, f = this._readableState && this._readableState.destroyed, c = this._writableState && this._writableState.destroyed;
          return f || c ? (_ ? _(p) : p && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, l.nextTick(h, this, p)) : l.nextTick(h, this, p)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(p || null, function(g) {
            !_ && g ? d._writableState ? d._writableState.errorEmitted ? l.nextTick(i, d) : (d._writableState.errorEmitted = !0, l.nextTick(u, d, g)) : l.nextTick(u, d, g) : _ ? (l.nextTick(i, d), _(g)) : l.nextTick(i, d);
          }), this);
        }, undestroy: function() {
          this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
        }, errorOrDestroy: function(p, _) {
          var d = p._readableState, f = p._writableState;
          d && d.autoDestroy || f && f.autoDestroy ? p.destroy(_) : p.emit("error", _);
        } };
      }, 37165: function(o, s, n) {
        var l = n(44059).F.ERR_STREAM_PREMATURE_CLOSE;
        function u() {
        }
        o.exports = function i(h, p, _) {
          if (typeof p == "function") return i(h, null, p);
          p || (p = {}), _ = /* @__PURE__ */ function(C) {
            var D = !1;
            return function() {
              if (!D) {
                D = !0;
                for (var L = arguments.length, E = new Array(L), P = 0; P < L; P++) E[P] = arguments[P];
                C.apply(this, E);
              }
            };
          }(_ || u);
          var d = p.readable || p.readable !== !1 && h.readable, f = p.writable || p.writable !== !1 && h.writable, c = function() {
            h.writable || m();
          }, g = h._writableState && h._writableState.finished, m = function() {
            f = !1, g = !0, d || _.call(h);
          }, x = h._readableState && h._readableState.endEmitted, w = function() {
            d = !1, x = !0, f || _.call(h);
          }, k = function(C) {
            _.call(h, C);
          }, S = function() {
            var C;
            return d && !x ? (h._readableState && h._readableState.ended || (C = new l()), _.call(h, C)) : f && !g ? (h._writableState && h._writableState.ended || (C = new l()), _.call(h, C)) : void 0;
          }, A = function() {
            h.req.on("finish", m);
          };
          return function(C) {
            return C.setHeader && typeof C.abort == "function";
          }(h) ? (h.on("complete", m), h.on("abort", S), h.req ? A() : h.on("request", A)) : f && !h._writableState && (h.on("end", c), h.on("close", c)), h.on("end", w), h.on("finish", m), p.error !== !1 && h.on("error", k), h.on("close", S), function() {
            h.removeListener("complete", m), h.removeListener("abort", S), h.removeListener("request", A), h.req && h.req.removeListener("finish", m), h.removeListener("end", c), h.removeListener("close", c), h.removeListener("finish", m), h.removeListener("end", w), h.removeListener("error", k), h.removeListener("close", S);
          };
        };
      }, 37108: function(o) {
        o.exports = function() {
          throw new Error("Readable.from is not available in the browser");
        };
      }, 6772: function(o, s, n) {
        var l, u = n(44059).F, i = u.ERR_MISSING_ARGS, h = u.ERR_STREAM_DESTROYED;
        function p(f) {
          if (f) throw f;
        }
        function _(f) {
          f();
        }
        function d(f, c) {
          return f.pipe(c);
        }
        o.exports = function() {
          for (var f = arguments.length, c = new Array(f), g = 0; g < f; g++) c[g] = arguments[g];
          var m, x = function(k) {
            return k.length ? typeof k[k.length - 1] != "function" ? p : k.pop() : p;
          }(c);
          if (Array.isArray(c[0]) && (c = c[0]), c.length < 2) throw new i("streams");
          var w = c.map(function(k, S) {
            var A = S < c.length - 1;
            return function(C, D, L, E) {
              E = /* @__PURE__ */ function(M) {
                var O = !1;
                return function() {
                  O || (O = !0, M.apply(void 0, arguments));
                };
              }(E);
              var P = !1;
              C.on("close", function() {
                P = !0;
              }), l === void 0 && (l = n(37165)), l(C, { readable: D, writable: L }, function(M) {
                if (M) return E(M);
                P = !0, E();
              });
              var I = !1;
              return function(M) {
                if (!P && !I) return I = !0, function(O) {
                  return O.setHeader && typeof O.abort == "function";
                }(C) ? C.abort() : typeof C.destroy == "function" ? C.destroy() : void E(M || new h("pipe"));
              };
            }(k, A, S > 0, function(C) {
              m || (m = C), C && w.forEach(_), A || (w.forEach(_), x(m));
            });
          });
          return c.reduce(d);
        };
      }, 31976: function(o, s, n) {
        var l = n(44059).F.ERR_INVALID_OPT_VALUE;
        o.exports = { getHighWaterMark: function(u, i, h, p) {
          var _ = function(d, f, c) {
            return d.highWaterMark != null ? d.highWaterMark : f ? d[c] : null;
          }(i, p, h);
          if (_ != null) {
            if (!isFinite(_) || Math.floor(_) !== _ || _ < 0) throw new l(p ? h : "highWaterMark", _);
            return Math.floor(_);
          }
          return u.objectMode ? 16 : 16384;
        } };
      }, 60032: function(o, s, n) {
        o.exports = n(7683).EventEmitter;
      }, 54304: function(o, s, n) {
        var l = n(41041).Buffer, u = l.isEncoding || function(x) {
          switch ((x = "" + x) && x.toLowerCase()) {
            case "hex":
            case "utf8":
            case "utf-8":
            case "ascii":
            case "binary":
            case "base64":
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
            case "raw":
              return !0;
            default:
              return !1;
          }
        };
        function i(x) {
          var w;
          switch (this.encoding = function(k) {
            var S = function(A) {
              if (!A) return "utf8";
              for (var C; ; ) switch (A) {
                case "utf8":
                case "utf-8":
                  return "utf8";
                case "ucs2":
                case "ucs-2":
                case "utf16le":
                case "utf-16le":
                  return "utf16le";
                case "latin1":
                case "binary":
                  return "latin1";
                case "base64":
                case "ascii":
                case "hex":
                  return A;
                default:
                  if (C) return;
                  A = ("" + A).toLowerCase(), C = !0;
              }
            }(k);
            if (typeof S != "string" && (l.isEncoding === u || !u(k))) throw new Error("Unknown encoding: " + k);
            return S || k;
          }(x), this.encoding) {
            case "utf16le":
              this.text = _, this.end = d, w = 4;
              break;
            case "utf8":
              this.fillLast = p, w = 4;
              break;
            case "base64":
              this.text = f, this.end = c, w = 3;
              break;
            default:
              return this.write = g, void (this.end = m);
          }
          this.lastNeed = 0, this.lastTotal = 0, this.lastChar = l.allocUnsafe(w);
        }
        function h(x) {
          return x <= 127 ? 0 : x >> 5 == 6 ? 2 : x >> 4 == 14 ? 3 : x >> 3 == 30 ? 4 : x >> 6 == 2 ? -1 : -2;
        }
        function p(x) {
          var w = this.lastTotal - this.lastNeed, k = function(S, A, C) {
            if ((192 & A[0]) != 128) return S.lastNeed = 0, "�";
            if (S.lastNeed > 1 && A.length > 1) {
              if ((192 & A[1]) != 128) return S.lastNeed = 1, "�";
              if (S.lastNeed > 2 && A.length > 2 && (192 & A[2]) != 128) return S.lastNeed = 2, "�";
            }
          }(this, x);
          return k !== void 0 ? k : this.lastNeed <= x.length ? (x.copy(this.lastChar, w, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) : (x.copy(this.lastChar, w, 0, x.length), void (this.lastNeed -= x.length));
        }
        function _(x, w) {
          if ((x.length - w) % 2 == 0) {
            var k = x.toString("utf16le", w);
            if (k) {
              var S = k.charCodeAt(k.length - 1);
              if (S >= 55296 && S <= 56319) return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = x[x.length - 2], this.lastChar[1] = x[x.length - 1], k.slice(0, -1);
            }
            return k;
          }
          return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = x[x.length - 1], x.toString("utf16le", w, x.length - 1);
        }
        function d(x) {
          var w = x && x.length ? this.write(x) : "";
          if (this.lastNeed) {
            var k = this.lastTotal - this.lastNeed;
            return w + this.lastChar.toString("utf16le", 0, k);
          }
          return w;
        }
        function f(x, w) {
          var k = (x.length - w) % 3;
          return k === 0 ? x.toString("base64", w) : (this.lastNeed = 3 - k, this.lastTotal = 3, k === 1 ? this.lastChar[0] = x[x.length - 1] : (this.lastChar[0] = x[x.length - 2], this.lastChar[1] = x[x.length - 1]), x.toString("base64", w, x.length - k));
        }
        function c(x) {
          var w = x && x.length ? this.write(x) : "";
          return this.lastNeed ? w + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : w;
        }
        function g(x) {
          return x.toString(this.encoding);
        }
        function m(x) {
          return x && x.length ? this.write(x) : "";
        }
        s.I = i, i.prototype.write = function(x) {
          if (x.length === 0) return "";
          var w, k;
          if (this.lastNeed) {
            if ((w = this.fillLast(x)) === void 0) return "";
            k = this.lastNeed, this.lastNeed = 0;
          } else k = 0;
          return k < x.length ? w ? w + this.text(x, k) : this.text(x, k) : w || "";
        }, i.prototype.end = function(x) {
          var w = x && x.length ? this.write(x) : "";
          return this.lastNeed ? w + "�" : w;
        }, i.prototype.text = function(x, w) {
          var k = function(A, C, D) {
            var L = C.length - 1;
            if (L < D) return 0;
            var E = h(C[L]);
            return E >= 0 ? (E > 0 && (A.lastNeed = E - 1), E) : --L < D || E === -2 ? 0 : (E = h(C[L])) >= 0 ? (E > 0 && (A.lastNeed = E - 2), E) : --L < D || E === -2 ? 0 : (E = h(C[L])) >= 0 ? (E > 0 && (E === 2 ? E = 0 : A.lastNeed = E - 3), E) : 0;
          }(this, x, w);
          if (!this.lastNeed) return x.toString("utf8", w);
          this.lastTotal = k;
          var S = x.length - (k - this.lastNeed);
          return x.copy(this.lastChar, 0, S), x.toString("utf8", w, S);
        }, i.prototype.fillLast = function(x) {
          if (this.lastNeed <= x.length) return x.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
          x.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, x.length), this.lastNeed -= x.length;
        };
      }, 79743: function(o, s, n) {
        var l = n(45708).Buffer, u = n(85672), i = n(79399)("stream-parser");
        o.exports = function(C) {
          var D = C && typeof C._transform == "function", L = C && typeof C._write == "function";
          if (!D && !L) throw new Error("must pass a Writable or Transform stream in");
          i("extending Parser into stream"), C._bytes = c, C._skipBytes = g, D && (C._passthrough = m), D ? C._transform = w : C._write = x;
        };
        var h = -1, p = 0, _ = 1, d = 2;
        function f(C) {
          i("initializing parser stream"), C._parserBytesLeft = 0, C._parserBuffers = [], C._parserBuffered = 0, C._parserState = h, C._parserCallback = null, typeof C.push == "function" && (C._parserOutput = C.push.bind(C)), C._parserInit = !0;
        }
        function c(C, D) {
          u(!this._parserCallback, 'there is already a "callback" set!'), u(isFinite(C) && C > 0, 'can only buffer a finite number of bytes > 0, got "' + C + '"'), this._parserInit || f(this), i("buffering %o bytes", C), this._parserBytesLeft = C, this._parserCallback = D, this._parserState = p;
        }
        function g(C, D) {
          u(!this._parserCallback, 'there is already a "callback" set!'), u(C > 0, 'can only skip > 0 bytes, got "' + C + '"'), this._parserInit || f(this), i("skipping %o bytes", C), this._parserBytesLeft = C, this._parserCallback = D, this._parserState = _;
        }
        function m(C, D) {
          u(!this._parserCallback, 'There is already a "callback" set!'), u(C > 0, 'can only pass through > 0 bytes, got "' + C + '"'), this._parserInit || f(this), i("passing through %o bytes", C), this._parserBytesLeft = C, this._parserCallback = D, this._parserState = d;
        }
        function x(C, D, L) {
          this._parserInit || f(this), i("write(%o bytes)", C.length), typeof D == "function" && (L = D), S(this, C, null, L);
        }
        function w(C, D, L) {
          this._parserInit || f(this), i("transform(%o bytes)", C.length), typeof D != "function" && (D = this._parserOutput), S(this, C, D, L);
        }
        function k(C, D, L, E) {
          if (C._parserBytesLeft -= D.length, i("%o bytes left for stream piece", C._parserBytesLeft), C._parserState === p ? (C._parserBuffers.push(D), C._parserBuffered += D.length) : C._parserState === d && L(D), C._parserBytesLeft !== 0) return E;
          var P = C._parserCallback;
          if (P && C._parserState === p && C._parserBuffers.length > 1 && (D = l.concat(C._parserBuffers, C._parserBuffered)), C._parserState !== p && (D = null), C._parserCallback = null, C._parserBuffered = 0, C._parserState = h, C._parserBuffers.splice(0), P) {
            var I = [];
            D && I.push(D), L && I.push(L);
            var M = P.length > I.length;
            M && I.push(A(E));
            var O = P.apply(C, I);
            if (!M || E === O) return E;
          }
        }
        var S = A(function C(D, L, E, P) {
          return D._parserBytesLeft <= 0 ? P(new Error("got data but not currently parsing anything")) : L.length <= D._parserBytesLeft ? function() {
            return k(D, L, E, P);
          } : function() {
            var I = L.slice(0, D._parserBytesLeft);
            return k(D, I, E, function(M) {
              return M ? P(M) : L.length > I.length ? function() {
                return C(D, L.slice(I.length), E, P);
              } : void 0;
            });
          };
        });
        function A(C) {
          return function() {
            for (var D = C.apply(this, arguments); typeof D == "function"; ) D = D();
            return D;
          };
        }
      }, 79399: function(o, s, n) {
        var l = n(33282);
        function u() {
          var i;
          try {
            i = s.storage.debug;
          } catch {
          }
          return !i && l !== void 0 && "env" in l && (i = l.env.DEBUG), i;
        }
        (s = o.exports = n(43228)).log = function() {
          return typeof console == "object" && console.log && Function.prototype.apply.call(console.log, console, arguments);
        }, s.formatArgs = function(i) {
          var h = this.useColors;
          if (i[0] = (h ? "%c" : "") + this.namespace + (h ? " %c" : " ") + i[0] + (h ? "%c " : " ") + "+" + s.humanize(this.diff), h) {
            var p = "color: " + this.color;
            i.splice(1, 0, p, "color: inherit");
            var _ = 0, d = 0;
            i[0].replace(/%[a-zA-Z%]/g, function(f) {
              f !== "%%" && (_++, f === "%c" && (d = _));
            }), i.splice(d, 0, p);
          }
        }, s.save = function(i) {
          try {
            i == null ? s.storage.removeItem("debug") : s.storage.debug = i;
          } catch {
          }
        }, s.load = u, s.useColors = function() {
          return !(typeof window > "u" || !window.process || window.process.type !== "renderer") || typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
        }, s.storage = typeof chrome < "u" && chrome.storage !== void 0 ? chrome.storage.local : function() {
          try {
            return window.localStorage;
          } catch {
          }
        }(), s.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], s.formatters.j = function(i) {
          try {
            return JSON.stringify(i);
          } catch (h) {
            return "[UnexpectedJSONParseError]: " + h.message;
          }
        }, s.enable(u());
      }, 43228: function(o, s, n) {
        var l;
        function u(i) {
          function h() {
            if (h.enabled) {
              var p = h, _ = +/* @__PURE__ */ new Date(), d = _ - (l || _);
              p.diff = d, p.prev = l, p.curr = _, l = _;
              for (var f = new Array(arguments.length), c = 0; c < f.length; c++) f[c] = arguments[c];
              f[0] = s.coerce(f[0]), typeof f[0] != "string" && f.unshift("%O");
              var g = 0;
              f[0] = f[0].replace(/%([a-zA-Z%])/g, function(m, x) {
                if (m === "%%") return m;
                g++;
                var w = s.formatters[x];
                if (typeof w == "function") {
                  var k = f[g];
                  m = w.call(p, k), f.splice(g, 1), g--;
                }
                return m;
              }), s.formatArgs.call(p, f), (h.log || s.log || console.log.bind(console)).apply(p, f);
            }
          }
          return h.namespace = i, h.enabled = s.enabled(i), h.useColors = s.useColors(), h.color = function(p) {
            var _, d = 0;
            for (_ in p) d = (d << 5) - d + p.charCodeAt(_), d |= 0;
            return s.colors[Math.abs(d) % s.colors.length];
          }(i), typeof s.init == "function" && s.init(h), h;
        }
        (s = o.exports = u.debug = u.default = u).coerce = function(i) {
          return i instanceof Error ? i.stack || i.message : i;
        }, s.disable = function() {
          s.enable("");
        }, s.enable = function(i) {
          s.save(i), s.names = [], s.skips = [];
          for (var h = (typeof i == "string" ? i : "").split(/[\s,]+/), p = h.length, _ = 0; _ < p; _++) h[_] && ((i = h[_].replace(/\*/g, ".*?"))[0] === "-" ? s.skips.push(new RegExp("^" + i.substr(1) + "$")) : s.names.push(new RegExp("^" + i + "$")));
        }, s.enabled = function(i) {
          var h, p;
          for (h = 0, p = s.skips.length; h < p; h++) if (s.skips[h].test(i)) return !1;
          for (h = 0, p = s.names.length; h < p; h++) if (s.names[h].test(i)) return !0;
          return !1;
        }, s.humanize = n(13883), s.names = [], s.skips = [], s.formatters = {};
      }, 13883: function(o) {
        var s = 1e3, n = 60 * s, l = 60 * n, u = 24 * l;
        function i(h, p, _) {
          if (!(h < p)) return h < 1.5 * p ? Math.floor(h / p) + " " + _ : Math.ceil(h / p) + " " + _ + "s";
        }
        o.exports = function(h, p) {
          p = p || {};
          var _, d = typeof h;
          if (d === "string" && h.length > 0) return function(f) {
            if (!((f = String(f)).length > 100)) {
              var c = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);
              if (c) {
                var g = parseFloat(c[1]);
                switch ((c[2] || "ms").toLowerCase()) {
                  case "years":
                  case "year":
                  case "yrs":
                  case "yr":
                  case "y":
                    return 315576e5 * g;
                  case "days":
                  case "day":
                  case "d":
                    return g * u;
                  case "hours":
                  case "hour":
                  case "hrs":
                  case "hr":
                  case "h":
                    return g * l;
                  case "minutes":
                  case "minute":
                  case "mins":
                  case "min":
                  case "m":
                    return g * n;
                  case "seconds":
                  case "second":
                  case "secs":
                  case "sec":
                  case "s":
                    return g * s;
                  case "milliseconds":
                  case "millisecond":
                  case "msecs":
                  case "msec":
                  case "ms":
                    return g;
                  default:
                    return;
                }
              }
            }
          }(h);
          if (d === "number" && isNaN(h) === !1) return p.long ? i(_ = h, u, "day") || i(_, l, "hour") || i(_, n, "minute") || i(_, s, "second") || _ + " ms" : function(f) {
            return f >= u ? Math.round(f / u) + "d" : f >= l ? Math.round(f / l) + "h" : f >= n ? Math.round(f / n) + "m" : f >= s ? Math.round(f / s) + "s" : f + "ms";
          }(h);
          throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(h));
        };
      }, 28089: function(o, s, n) {
        var l = n(59811);
        o.exports = function(u, i, h) {
          if (u == null) throw Error("First argument should be a string");
          if (i == null) throw Error("Separator should be a string or a RegExp");
          h ? (typeof h == "string" || Array.isArray(h)) && (h = { ignore: h }) : h = {}, h.escape == null && (h.escape = !0), h.ignore == null ? h.ignore = ["[]", "()", "{}", "<>", '""', "''", "``", "“”", "«»"] : (typeof h.ignore == "string" && (h.ignore = [h.ignore]), h.ignore = h.ignore.map(function(m) {
            return m.length === 1 && (m += m), m;
          }));
          var p = l.parse(u, { flat: !0, brackets: h.ignore }), _ = p[0].split(i);
          if (h.escape) {
            for (var d = [], f = 0; f < _.length; f++) {
              var c = _[f], g = _[f + 1];
              c[c.length - 1] === "\\" && c[c.length - 2] !== "\\" ? (d.push(c + i + g), f++) : d.push(c);
            }
            _ = d;
          }
          for (f = 0; f < _.length; f++) p[0] = _[f], _[f] = l.stringify(p, { flat: !0 });
          return _;
        };
      }, 26381: function(o) {
        o.exports = function(s) {
          for (var n = s.length, l = new Array(n), u = new Array(n), i = new Array(n), h = new Array(n), p = new Array(n), _ = new Array(n), d = 0; d < n; ++d) l[d] = -1, u[d] = 0, i[d] = !1, h[d] = 0, p[d] = -1, _[d] = [];
          var f, c = 0, g = [], m = [];
          function x(S) {
            var A = [S], C = [S];
            for (l[S] = u[S] = c, i[S] = !0, c += 1; C.length > 0; ) {
              S = C[C.length - 1];
              var D = s[S];
              if (h[S] < D.length) {
                for (var L = h[S]; L < D.length; ++L) {
                  var E = D[L];
                  if (l[E] < 0) {
                    l[E] = u[E] = c, i[E] = !0, c += 1, A.push(E), C.push(E);
                    break;
                  }
                  i[E] && (u[S] = 0 | Math.min(u[S], u[E])), p[E] >= 0 && _[S].push(p[E]);
                }
                h[S] = L;
              } else {
                if (u[S] === l[S]) {
                  var P = [], I = [], M = 0;
                  for (L = A.length - 1; L >= 0; --L) {
                    var O = A[L];
                    if (i[O] = !1, P.push(O), I.push(_[O]), M += _[O].length, p[O] = g.length, O === S) {
                      A.length = L;
                      break;
                    }
                  }
                  g.push(P);
                  var T = new Array(M);
                  for (L = 0; L < I.length; L++) for (var z = 0; z < I[L].length; z++) T[--M] = I[L][z];
                  m.push(T);
                }
                C.pop();
              }
            }
          }
          for (d = 0; d < n; ++d) l[d] < 0 && x(d);
          for (d = 0; d < m.length; d++) {
            var w = m[d];
            if (w.length !== 0) {
              w.sort(function(S, A) {
                return S - A;
              }), f = [w[0]];
              for (var k = 1; k < w.length; k++) w[k] !== w[k - 1] && f.push(w[k]);
              m[d] = f;
            }
          }
          return { components: g, adjacencyList: m };
        };
      }, 13193: function(o, s, n) {
        n.r(s);
        var l = 2 * Math.PI, u = function(p, _, d, f, c, g, m) {
          var x = p.x, w = p.y;
          return { x: f * (x *= _) - c * (w *= d) + g, y: c * x + f * w + m };
        }, i = function(p, _) {
          var d = _ === 1.5707963267948966 ? 0.551915024494 : _ === -1.5707963267948966 ? -0.551915024494 : 1.3333333333333333 * Math.tan(_ / 4), f = Math.cos(p), c = Math.sin(p), g = Math.cos(p + _), m = Math.sin(p + _);
          return [{ x: f - c * d, y: c + f * d }, { x: g + m * d, y: m - g * d }, { x: g, y: m }];
        }, h = function(p, _, d, f) {
          var c = p * d + _ * f;
          return c > 1 && (c = 1), c < -1 && (c = -1), (p * f - _ * d < 0 ? -1 : 1) * Math.acos(c);
        };
        s.default = function(p) {
          var _ = p.px, d = p.py, f = p.cx, c = p.cy, g = p.rx, m = p.ry, x = p.xAxisRotation, w = x === void 0 ? 0 : x, k = p.largeArcFlag, S = k === void 0 ? 0 : k, A = p.sweepFlag, C = A === void 0 ? 0 : A, D = [];
          if (g === 0 || m === 0) return [];
          var L = Math.sin(w * l / 360), E = Math.cos(w * l / 360), P = E * (_ - f) / 2 + L * (d - c) / 2, I = -L * (_ - f) / 2 + E * (d - c) / 2;
          if (P === 0 && I === 0) return [];
          g = Math.abs(g), m = Math.abs(m);
          var M = Math.pow(P, 2) / Math.pow(g, 2) + Math.pow(I, 2) / Math.pow(m, 2);
          M > 1 && (g *= Math.sqrt(M), m *= Math.sqrt(M));
          var O = function(re, Y, te, ee, X, Q, ue, ce, he, de, ne, ae) {
            var se = Math.pow(X, 2), me = Math.pow(Q, 2), ye = Math.pow(ne, 2), pe = Math.pow(ae, 2), be = se * me - se * pe - me * ye;
            be < 0 && (be = 0), be /= se * pe + me * ye;
            var Ae = (be = Math.sqrt(be) * (ue === ce ? -1 : 1)) * X / Q * ae, Se = be * -Q / X * ne, Me = de * Ae - he * Se + (re + te) / 2, De = he * Ae + de * Se + (Y + ee) / 2, Le = (ne - Ae) / X, We = (ae - Se) / Q, Ee = (-ne - Ae) / X, Ne = (-ae - Se) / Q, Ie = h(1, 0, Le, We), ge = h(Le, We, Ee, Ne);
            return ce === 0 && ge > 0 && (ge -= l), ce === 1 && ge < 0 && (ge += l), [Me, De, Ie, ge];
          }(_, d, f, c, g, m, S, C, L, E, P, I), T = function(re, Y) {
            if (Array.isArray(re)) return re;
            if (Symbol.iterator in Object(re)) return function(te, ee) {
              var X = [], Q = !0, ue = !1, ce = void 0;
              try {
                for (var he, de = te[Symbol.iterator](); !(Q = (he = de.next()).done) && (X.push(he.value), !ee || X.length !== ee); Q = !0) ;
              } catch (ne) {
                ue = !0, ce = ne;
              } finally {
                try {
                  !Q && de.return && de.return();
                } finally {
                  if (ue) throw ce;
                }
              }
              return X;
            }(re, Y);
            throw new TypeError("Invalid attempt to destructure non-iterable instance");
          }(O, 4), z = T[0], F = T[1], U = T[2], V = T[3], $ = Math.abs(V) / (l / 4);
          Math.abs(1 - $) < 1e-7 && ($ = 1);
          var q = Math.max(Math.ceil($), 1);
          V /= q;
          for (var K = 0; K < q; K++) D.push(i(U, V)), U += V;
          return D.map(function(re) {
            var Y = u(re[0], g, m, E, L, z, F), te = Y.x, ee = Y.y, X = u(re[1], g, m, E, L, z, F), Q = X.x, ue = X.y, ce = u(re[2], g, m, E, L, z, F);
            return { x1: te, y1: ee, x2: Q, y2: ue, x: ce.x, y: ce.y };
          });
        };
      }, 97251: function(o, s, n) {
        var l = n(26953), u = n(16844), i = n(41883), h = n(13986), p = n(85672);
        o.exports = function(_) {
          if (Array.isArray(_) && _.length === 1 && typeof _[0] == "string" && (_ = _[0]), typeof _ == "string" && (p(h(_), "String is not an SVG path."), _ = l(_)), p(Array.isArray(_), "Argument should be a string or an array of path segments."), _ = u(_), !(_ = i(_)).length) return [0, 0, 0, 0];
          for (var d = [1 / 0, 1 / 0, -1 / 0, -1 / 0], f = 0, c = _.length; f < c; f++) for (var g = _[f].slice(1), m = 0; m < g.length; m += 2) g[m + 0] < d[0] && (d[0] = g[m + 0]), g[m + 1] < d[1] && (d[1] = g[m + 1]), g[m + 0] > d[2] && (d[2] = g[m + 0]), g[m + 1] > d[3] && (d[3] = g[m + 1]);
          return d;
        };
      }, 41883: function(o, s, n) {
        o.exports = function(h) {
          for (var p, _ = [], d = 0, f = 0, c = 0, g = 0, m = null, x = null, w = 0, k = 0, S = 0, A = h.length; S < A; S++) {
            var C = h[S], D = C[0];
            switch (D) {
              case "M":
                c = C[1], g = C[2];
                break;
              case "A":
                var L = l({ px: w, py: k, cx: C[6], cy: C[7], rx: C[1], ry: C[2], xAxisRotation: C[3], largeArcFlag: C[4], sweepFlag: C[5] });
                if (!L.length) continue;
                for (var E, P = 0; P < L.length; P++) C = ["C", (E = L[P]).x1, E.y1, E.x2, E.y2, E.x, E.y], P < L.length - 1 && _.push(C);
                break;
              case "S":
                var I = w, M = k;
                p != "C" && p != "S" || (I += I - d, M += M - f), C = ["C", I, M, C[1], C[2], C[3], C[4]];
                break;
              case "T":
                p == "Q" || p == "T" ? (m = 2 * w - m, x = 2 * k - x) : (m = w, x = k), C = i(w, k, m, x, C[1], C[2]);
                break;
              case "Q":
                m = C[1], x = C[2], C = i(w, k, C[1], C[2], C[3], C[4]);
                break;
              case "L":
                C = u(w, k, C[1], C[2]);
                break;
              case "H":
                C = u(w, k, C[1], k);
                break;
              case "V":
                C = u(w, k, w, C[1]);
                break;
              case "Z":
                C = u(w, k, c, g);
            }
            p = D, w = C[C.length - 2], k = C[C.length - 1], C.length > 4 ? (d = C[C.length - 4], f = C[C.length - 3]) : (d = w, f = k), _.push(C);
          }
          return _;
        };
        var l = n(13193);
        function u(h, p, _, d) {
          return ["C", h, p, _, d, _, d];
        }
        function i(h, p, _, d, f, c) {
          return ["C", h / 3 + 0.6666666666666666 * _, p / 3 + 0.6666666666666666 * d, f / 3 + 0.6666666666666666 * _, c / 3 + 0.6666666666666666 * d, f, c];
        }
      }, 96021: function(o, s, n) {
        var l, u = n(97251), i = n(26953), h = n(95620), p = n(13986), _ = n(88772), d = document.createElement("canvas"), f = d.getContext("2d");
        o.exports = function(c, g) {
          if (!p(c)) throw Error("Argument should be valid svg path string");
          var m, x;
          g || (g = {}), g.shape ? (m = g.shape[0], x = g.shape[1]) : (m = d.width = g.w || g.width || 200, x = d.height = g.h || g.height || 200);
          var w = Math.min(m, x), k = g.stroke || 0, S = g.viewbox || g.viewBox || u(c), A = [m / (S[2] - S[0]), x / (S[3] - S[1])], C = Math.min(A[0] || 0, A[1] || 0) / 2;
          if (f.fillStyle = "black", f.fillRect(0, 0, m, x), f.fillStyle = "white", k && (typeof k != "number" && (k = 1), f.strokeStyle = k > 0 ? "white" : "black", f.lineWidth = Math.abs(k)), f.translate(0.5 * m, 0.5 * x), f.scale(C, C), function() {
            if (l != null) return l;
            var E = document.createElement("canvas").getContext("2d");
            if (E.canvas.width = E.canvas.height = 1, !window.Path2D) return l = !1;
            var P = new Path2D("M0,0h1v1h-1v-1Z");
            E.fillStyle = "black", E.fill(P);
            var I = E.getImageData(0, 0, 1, 1);
            return l = I && I.data && I.data[3] === 255;
          }()) {
            var D = new Path2D(c);
            f.fill(D), k && f.stroke(D);
          } else {
            var L = i(c);
            h(f, L), f.fill(), k && f.stroke();
          }
          return f.setTransform(1, 0, 0, 1, 0, 0), _(f, { cutoff: g.cutoff != null ? g.cutoff : 0.5, radius: g.radius != null ? g.radius : 0.5 * w });
        };
      }, 65657: function(o, s, n) {
        var l;
        (function(u) {
          var i = /^\s+/, h = /\s+$/, p = 0, _ = u.round, d = u.min, f = u.max, c = u.random;
          function g(ne, ae) {
            if (ae = ae || {}, (ne = ne || "") instanceof g) return ne;
            if (!(this instanceof g)) return new g(ne, ae);
            var se = function(me) {
              var ye, pe, be, Ae = { r: 0, g: 0, b: 0 }, Se = 1, Me = null, De = null, Le = null, We = !1, Ee = !1;
              return typeof me == "string" && (me = function(Ne) {
                Ne = Ne.replace(i, "").replace(h, "").toLowerCase();
                var Ie, ge = !1;
                if (U[Ne]) Ne = U[Ne], ge = !0;
                else if (Ne == "transparent") return { r: 0, g: 0, b: 0, a: 0, format: "name" };
                return (Ie = he.rgb.exec(Ne)) ? { r: Ie[1], g: Ie[2], b: Ie[3] } : (Ie = he.rgba.exec(Ne)) ? { r: Ie[1], g: Ie[2], b: Ie[3], a: Ie[4] } : (Ie = he.hsl.exec(Ne)) ? { h: Ie[1], s: Ie[2], l: Ie[3] } : (Ie = he.hsla.exec(Ne)) ? { h: Ie[1], s: Ie[2], l: Ie[3], a: Ie[4] } : (Ie = he.hsv.exec(Ne)) ? { h: Ie[1], s: Ie[2], v: Ie[3] } : (Ie = he.hsva.exec(Ne)) ? { h: Ie[1], s: Ie[2], v: Ie[3], a: Ie[4] } : (Ie = he.hex8.exec(Ne)) ? { r: re(Ie[1]), g: re(Ie[2]), b: re(Ie[3]), a: X(Ie[4]), format: ge ? "name" : "hex8" } : (Ie = he.hex6.exec(Ne)) ? { r: re(Ie[1]), g: re(Ie[2]), b: re(Ie[3]), format: ge ? "name" : "hex" } : (Ie = he.hex4.exec(Ne)) ? { r: re(Ie[1] + "" + Ie[1]), g: re(Ie[2] + "" + Ie[2]), b: re(Ie[3] + "" + Ie[3]), a: X(Ie[4] + "" + Ie[4]), format: ge ? "name" : "hex8" } : !!(Ie = he.hex3.exec(Ne)) && { r: re(Ie[1] + "" + Ie[1]), g: re(Ie[2] + "" + Ie[2]), b: re(Ie[3] + "" + Ie[3]), format: ge ? "name" : "hex" };
              }(me)), typeof me == "object" && (de(me.r) && de(me.g) && de(me.b) ? (ye = me.r, pe = me.g, be = me.b, Ae = { r: 255 * q(ye, 255), g: 255 * q(pe, 255), b: 255 * q(be, 255) }, We = !0, Ee = String(me.r).substr(-1) === "%" ? "prgb" : "rgb") : de(me.h) && de(me.s) && de(me.v) ? (Me = te(me.s), De = te(me.v), Ae = function(Ne, Ie, ge) {
                Ne = 6 * q(Ne, 360), Ie = q(Ie, 100), ge = q(ge, 100);
                var Ce = u.floor(Ne), we = Ne - Ce, Ge = ge * (1 - Ie), Re = ge * (1 - we * Ie), je = ge * (1 - (1 - we) * Ie), Ke = Ce % 6;
                return { r: 255 * [ge, Re, Ge, Ge, je, ge][Ke], g: 255 * [je, ge, ge, Re, Ge, Ge][Ke], b: 255 * [Ge, Ge, je, ge, ge, Re][Ke] };
              }(me.h, Me, De), We = !0, Ee = "hsv") : de(me.h) && de(me.s) && de(me.l) && (Me = te(me.s), Le = te(me.l), Ae = function(Ne, Ie, ge) {
                var Ce, we, Ge;
                function Re(tt, _e, Be) {
                  return Be < 0 && (Be += 1), Be > 1 && (Be -= 1), Be < 1 / 6 ? tt + 6 * (_e - tt) * Be : Be < 0.5 ? _e : Be < 2 / 3 ? tt + (_e - tt) * (2 / 3 - Be) * 6 : tt;
                }
                if (Ne = q(Ne, 360), Ie = q(Ie, 100), ge = q(ge, 100), Ie === 0) Ce = we = Ge = ge;
                else {
                  var je = ge < 0.5 ? ge * (1 + Ie) : ge + Ie - ge * Ie, Ke = 2 * ge - je;
                  Ce = Re(Ke, je, Ne + 1 / 3), we = Re(Ke, je, Ne), Ge = Re(Ke, je, Ne - 1 / 3);
                }
                return { r: 255 * Ce, g: 255 * we, b: 255 * Ge };
              }(me.h, Me, Le), We = !0, Ee = "hsl"), me.hasOwnProperty("a") && (Se = me.a)), Se = $(Se), { ok: We, format: me.format || Ee, r: d(255, f(Ae.r, 0)), g: d(255, f(Ae.g, 0)), b: d(255, f(Ae.b, 0)), a: Se };
            }(ne);
            this._originalInput = ne, this._r = se.r, this._g = se.g, this._b = se.b, this._a = se.a, this._roundA = _(100 * this._a) / 100, this._format = ae.format || se.format, this._gradientType = ae.gradientType, this._r < 1 && (this._r = _(this._r)), this._g < 1 && (this._g = _(this._g)), this._b < 1 && (this._b = _(this._b)), this._ok = se.ok, this._tc_id = p++;
          }
          function m(ne, ae, se) {
            ne = q(ne, 255), ae = q(ae, 255), se = q(se, 255);
            var me, ye, pe = f(ne, ae, se), be = d(ne, ae, se), Ae = (pe + be) / 2;
            if (pe == be) me = ye = 0;
            else {
              var Se = pe - be;
              switch (ye = Ae > 0.5 ? Se / (2 - pe - be) : Se / (pe + be), pe) {
                case ne:
                  me = (ae - se) / Se + (ae < se ? 6 : 0);
                  break;
                case ae:
                  me = (se - ne) / Se + 2;
                  break;
                case se:
                  me = (ne - ae) / Se + 4;
              }
              me /= 6;
            }
            return { h: me, s: ye, l: Ae };
          }
          function x(ne, ae, se) {
            ne = q(ne, 255), ae = q(ae, 255), se = q(se, 255);
            var me, ye, pe = f(ne, ae, se), be = d(ne, ae, se), Ae = pe, Se = pe - be;
            if (ye = pe === 0 ? 0 : Se / pe, pe == be) me = 0;
            else {
              switch (pe) {
                case ne:
                  me = (ae - se) / Se + (ae < se ? 6 : 0);
                  break;
                case ae:
                  me = (se - ne) / Se + 2;
                  break;
                case se:
                  me = (ne - ae) / Se + 4;
              }
              me /= 6;
            }
            return { h: me, s: ye, v: Ae };
          }
          function w(ne, ae, se, me) {
            var ye = [Y(_(ne).toString(16)), Y(_(ae).toString(16)), Y(_(se).toString(16))];
            return me && ye[0].charAt(0) == ye[0].charAt(1) && ye[1].charAt(0) == ye[1].charAt(1) && ye[2].charAt(0) == ye[2].charAt(1) ? ye[0].charAt(0) + ye[1].charAt(0) + ye[2].charAt(0) : ye.join("");
          }
          function k(ne, ae, se, me) {
            return [Y(ee(me)), Y(_(ne).toString(16)), Y(_(ae).toString(16)), Y(_(se).toString(16))].join("");
          }
          function S(ne, ae) {
            ae = ae === 0 ? 0 : ae || 10;
            var se = g(ne).toHsl();
            return se.s -= ae / 100, se.s = K(se.s), g(se);
          }
          function A(ne, ae) {
            ae = ae === 0 ? 0 : ae || 10;
            var se = g(ne).toHsl();
            return se.s += ae / 100, se.s = K(se.s), g(se);
          }
          function C(ne) {
            return g(ne).desaturate(100);
          }
          function D(ne, ae) {
            ae = ae === 0 ? 0 : ae || 10;
            var se = g(ne).toHsl();
            return se.l += ae / 100, se.l = K(se.l), g(se);
          }
          function L(ne, ae) {
            ae = ae === 0 ? 0 : ae || 10;
            var se = g(ne).toRgb();
            return se.r = f(0, d(255, se.r - _(-ae / 100 * 255))), se.g = f(0, d(255, se.g - _(-ae / 100 * 255))), se.b = f(0, d(255, se.b - _(-ae / 100 * 255))), g(se);
          }
          function E(ne, ae) {
            ae = ae === 0 ? 0 : ae || 10;
            var se = g(ne).toHsl();
            return se.l -= ae / 100, se.l = K(se.l), g(se);
          }
          function P(ne, ae) {
            var se = g(ne).toHsl(), me = (se.h + ae) % 360;
            return se.h = me < 0 ? 360 + me : me, g(se);
          }
          function I(ne) {
            var ae = g(ne).toHsl();
            return ae.h = (ae.h + 180) % 360, g(ae);
          }
          function M(ne) {
            var ae = g(ne).toHsl(), se = ae.h;
            return [g(ne), g({ h: (se + 120) % 360, s: ae.s, l: ae.l }), g({ h: (se + 240) % 360, s: ae.s, l: ae.l })];
          }
          function O(ne) {
            var ae = g(ne).toHsl(), se = ae.h;
            return [g(ne), g({ h: (se + 90) % 360, s: ae.s, l: ae.l }), g({ h: (se + 180) % 360, s: ae.s, l: ae.l }), g({ h: (se + 270) % 360, s: ae.s, l: ae.l })];
          }
          function T(ne) {
            var ae = g(ne).toHsl(), se = ae.h;
            return [g(ne), g({ h: (se + 72) % 360, s: ae.s, l: ae.l }), g({ h: (se + 216) % 360, s: ae.s, l: ae.l })];
          }
          function z(ne, ae, se) {
            ae = ae || 6, se = se || 30;
            var me = g(ne).toHsl(), ye = 360 / se, pe = [g(ne)];
            for (me.h = (me.h - (ye * ae >> 1) + 720) % 360; --ae; ) me.h = (me.h + ye) % 360, pe.push(g(me));
            return pe;
          }
          function F(ne, ae) {
            ae = ae || 6;
            for (var se = g(ne).toHsv(), me = se.h, ye = se.s, pe = se.v, be = [], Ae = 1 / ae; ae--; ) be.push(g({ h: me, s: ye, v: pe })), pe = (pe + Ae) % 1;
            return be;
          }
          g.prototype = { isDark: function() {
            return this.getBrightness() < 128;
          }, isLight: function() {
            return !this.isDark();
          }, isValid: function() {
            return this._ok;
          }, getOriginalInput: function() {
            return this._originalInput;
          }, getFormat: function() {
            return this._format;
          }, getAlpha: function() {
            return this._a;
          }, getBrightness: function() {
            var ne = this.toRgb();
            return (299 * ne.r + 587 * ne.g + 114 * ne.b) / 1e3;
          }, getLuminance: function() {
            var ne, ae, se, me = this.toRgb();
            return ne = me.r / 255, ae = me.g / 255, se = me.b / 255, 0.2126 * (ne <= 0.03928 ? ne / 12.92 : u.pow((ne + 0.055) / 1.055, 2.4)) + 0.7152 * (ae <= 0.03928 ? ae / 12.92 : u.pow((ae + 0.055) / 1.055, 2.4)) + 0.0722 * (se <= 0.03928 ? se / 12.92 : u.pow((se + 0.055) / 1.055, 2.4));
          }, setAlpha: function(ne) {
            return this._a = $(ne), this._roundA = _(100 * this._a) / 100, this;
          }, toHsv: function() {
            var ne = x(this._r, this._g, this._b);
            return { h: 360 * ne.h, s: ne.s, v: ne.v, a: this._a };
          }, toHsvString: function() {
            var ne = x(this._r, this._g, this._b), ae = _(360 * ne.h), se = _(100 * ne.s), me = _(100 * ne.v);
            return this._a == 1 ? "hsv(" + ae + ", " + se + "%, " + me + "%)" : "hsva(" + ae + ", " + se + "%, " + me + "%, " + this._roundA + ")";
          }, toHsl: function() {
            var ne = m(this._r, this._g, this._b);
            return { h: 360 * ne.h, s: ne.s, l: ne.l, a: this._a };
          }, toHslString: function() {
            var ne = m(this._r, this._g, this._b), ae = _(360 * ne.h), se = _(100 * ne.s), me = _(100 * ne.l);
            return this._a == 1 ? "hsl(" + ae + ", " + se + "%, " + me + "%)" : "hsla(" + ae + ", " + se + "%, " + me + "%, " + this._roundA + ")";
          }, toHex: function(ne) {
            return w(this._r, this._g, this._b, ne);
          }, toHexString: function(ne) {
            return "#" + this.toHex(ne);
          }, toHex8: function(ne) {
            return function(ae, se, me, ye, pe) {
              var be = [Y(_(ae).toString(16)), Y(_(se).toString(16)), Y(_(me).toString(16)), Y(ee(ye))];
              return pe && be[0].charAt(0) == be[0].charAt(1) && be[1].charAt(0) == be[1].charAt(1) && be[2].charAt(0) == be[2].charAt(1) && be[3].charAt(0) == be[3].charAt(1) ? be[0].charAt(0) + be[1].charAt(0) + be[2].charAt(0) + be[3].charAt(0) : be.join("");
            }(this._r, this._g, this._b, this._a, ne);
          }, toHex8String: function(ne) {
            return "#" + this.toHex8(ne);
          }, toRgb: function() {
            return { r: _(this._r), g: _(this._g), b: _(this._b), a: this._a };
          }, toRgbString: function() {
            return this._a == 1 ? "rgb(" + _(this._r) + ", " + _(this._g) + ", " + _(this._b) + ")" : "rgba(" + _(this._r) + ", " + _(this._g) + ", " + _(this._b) + ", " + this._roundA + ")";
          }, toPercentageRgb: function() {
            return { r: _(100 * q(this._r, 255)) + "%", g: _(100 * q(this._g, 255)) + "%", b: _(100 * q(this._b, 255)) + "%", a: this._a };
          }, toPercentageRgbString: function() {
            return this._a == 1 ? "rgb(" + _(100 * q(this._r, 255)) + "%, " + _(100 * q(this._g, 255)) + "%, " + _(100 * q(this._b, 255)) + "%)" : "rgba(" + _(100 * q(this._r, 255)) + "%, " + _(100 * q(this._g, 255)) + "%, " + _(100 * q(this._b, 255)) + "%, " + this._roundA + ")";
          }, toName: function() {
            return this._a === 0 ? "transparent" : !(this._a < 1) && (V[w(this._r, this._g, this._b, !0)] || !1);
          }, toFilter: function(ne) {
            var ae = "#" + k(this._r, this._g, this._b, this._a), se = ae, me = this._gradientType ? "GradientType = 1, " : "";
            if (ne) {
              var ye = g(ne);
              se = "#" + k(ye._r, ye._g, ye._b, ye._a);
            }
            return "progid:DXImageTransform.Microsoft.gradient(" + me + "startColorstr=" + ae + ",endColorstr=" + se + ")";
          }, toString: function(ne) {
            var ae = !!ne;
            ne = ne || this._format;
            var se = !1, me = this._a < 1 && this._a >= 0;
            return ae || !me || ne !== "hex" && ne !== "hex6" && ne !== "hex3" && ne !== "hex4" && ne !== "hex8" && ne !== "name" ? (ne === "rgb" && (se = this.toRgbString()), ne === "prgb" && (se = this.toPercentageRgbString()), ne !== "hex" && ne !== "hex6" || (se = this.toHexString()), ne === "hex3" && (se = this.toHexString(!0)), ne === "hex4" && (se = this.toHex8String(!0)), ne === "hex8" && (se = this.toHex8String()), ne === "name" && (se = this.toName()), ne === "hsl" && (se = this.toHslString()), ne === "hsv" && (se = this.toHsvString()), se || this.toHexString()) : ne === "name" && this._a === 0 ? this.toName() : this.toRgbString();
          }, clone: function() {
            return g(this.toString());
          }, _applyModification: function(ne, ae) {
            var se = ne.apply(null, [this].concat([].slice.call(ae)));
            return this._r = se._r, this._g = se._g, this._b = se._b, this.setAlpha(se._a), this;
          }, lighten: function() {
            return this._applyModification(D, arguments);
          }, brighten: function() {
            return this._applyModification(L, arguments);
          }, darken: function() {
            return this._applyModification(E, arguments);
          }, desaturate: function() {
            return this._applyModification(S, arguments);
          }, saturate: function() {
            return this._applyModification(A, arguments);
          }, greyscale: function() {
            return this._applyModification(C, arguments);
          }, spin: function() {
            return this._applyModification(P, arguments);
          }, _applyCombination: function(ne, ae) {
            return ne.apply(null, [this].concat([].slice.call(ae)));
          }, analogous: function() {
            return this._applyCombination(z, arguments);
          }, complement: function() {
            return this._applyCombination(I, arguments);
          }, monochromatic: function() {
            return this._applyCombination(F, arguments);
          }, splitcomplement: function() {
            return this._applyCombination(T, arguments);
          }, triad: function() {
            return this._applyCombination(M, arguments);
          }, tetrad: function() {
            return this._applyCombination(O, arguments);
          } }, g.fromRatio = function(ne, ae) {
            if (typeof ne == "object") {
              var se = {};
              for (var me in ne) ne.hasOwnProperty(me) && (se[me] = me === "a" ? ne[me] : te(ne[me]));
              ne = se;
            }
            return g(ne, ae);
          }, g.equals = function(ne, ae) {
            return !(!ne || !ae) && g(ne).toRgbString() == g(ae).toRgbString();
          }, g.random = function() {
            return g.fromRatio({ r: c(), g: c(), b: c() });
          }, g.mix = function(ne, ae, se) {
            se = se === 0 ? 0 : se || 50;
            var me = g(ne).toRgb(), ye = g(ae).toRgb(), pe = se / 100;
            return g({ r: (ye.r - me.r) * pe + me.r, g: (ye.g - me.g) * pe + me.g, b: (ye.b - me.b) * pe + me.b, a: (ye.a - me.a) * pe + me.a });
          }, g.readability = function(ne, ae) {
            var se = g(ne), me = g(ae);
            return (u.max(se.getLuminance(), me.getLuminance()) + 0.05) / (u.min(se.getLuminance(), me.getLuminance()) + 0.05);
          }, g.isReadable = function(ne, ae, se) {
            var me, ye, pe, be, Ae, Se = g.readability(ne, ae);
            switch (ye = !1, (pe = se, (be = ((pe = pe || { level: "AA", size: "small" }).level || "AA").toUpperCase()) !== "AA" && be !== "AAA" && (be = "AA"), (Ae = (pe.size || "small").toLowerCase()) !== "small" && Ae !== "large" && (Ae = "small"), me = { level: be, size: Ae }).level + me.size) {
              case "AAsmall":
              case "AAAlarge":
                ye = Se >= 4.5;
                break;
              case "AAlarge":
                ye = Se >= 3;
                break;
              case "AAAsmall":
                ye = Se >= 7;
            }
            return ye;
          }, g.mostReadable = function(ne, ae, se) {
            var me, ye, pe, be, Ae = null, Se = 0;
            ye = (se = se || {}).includeFallbackColors, pe = se.level, be = se.size;
            for (var Me = 0; Me < ae.length; Me++) (me = g.readability(ne, ae[Me])) > Se && (Se = me, Ae = g(ae[Me]));
            return g.isReadable(ne, Ae, { level: pe, size: be }) || !ye ? Ae : (se.includeFallbackColors = !1, g.mostReadable(ne, ["#fff", "#000"], se));
          };
          var U = g.names = { aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }, V = g.hexNames = function(ne) {
            var ae = {};
            for (var se in ne) ne.hasOwnProperty(se) && (ae[ne[se]] = se);
            return ae;
          }(U);
          function $(ne) {
            return ne = parseFloat(ne), (isNaN(ne) || ne < 0 || ne > 1) && (ne = 1), ne;
          }
          function q(ne, ae) {
            (function(me) {
              return typeof me == "string" && me.indexOf(".") != -1 && parseFloat(me) === 1;
            })(ne) && (ne = "100%");
            var se = function(me) {
              return typeof me == "string" && me.indexOf("%") != -1;
            }(ne);
            return ne = d(ae, f(0, parseFloat(ne))), se && (ne = parseInt(ne * ae, 10) / 100), u.abs(ne - ae) < 1e-6 ? 1 : ne % ae / parseFloat(ae);
          }
          function K(ne) {
            return d(1, f(0, ne));
          }
          function re(ne) {
            return parseInt(ne, 16);
          }
          function Y(ne) {
            return ne.length == 1 ? "0" + ne : "" + ne;
          }
          function te(ne) {
            return ne <= 1 && (ne = 100 * ne + "%"), ne;
          }
          function ee(ne) {
            return u.round(255 * parseFloat(ne)).toString(16);
          }
          function X(ne) {
            return re(ne) / 255;
          }
          var Q, ue, ce, he = (ue = "[\\s|\\(]+(" + (Q = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)") + ")[,|\\s]+(" + Q + ")[,|\\s]+(" + Q + ")\\s*\\)?", ce = "[\\s|\\(]+(" + Q + ")[,|\\s]+(" + Q + ")[,|\\s]+(" + Q + ")[,|\\s]+(" + Q + ")\\s*\\)?", { CSS_UNIT: new RegExp(Q), rgb: new RegExp("rgb" + ue), rgba: new RegExp("rgba" + ce), hsl: new RegExp("hsl" + ue), hsla: new RegExp("hsla" + ce), hsv: new RegExp("hsv" + ue), hsva: new RegExp("hsva" + ce), hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ });
          function de(ne) {
            return !!he.CSS_UNIT.exec(ne);
          }
          o.exports ? o.exports = g : (l = (function() {
            return g;
          }).call(s, n, s, o)) === void 0 || (o.exports = l);
        })(Math);
      }, 51498: function(o) {
        o.exports = n, o.exports.float32 = o.exports.float = n, o.exports.fract32 = o.exports.fract = function(l, u) {
          if (l.length) {
            if (l instanceof Float32Array) return new Float32Array(l.length);
            u instanceof Float32Array || (u = n(l));
            for (var i = 0, h = u.length; i < h; i++) u[i] = l[i] - u[i];
            return u;
          }
          return n(l - n(l));
        };
        var s = new Float32Array(1);
        function n(l) {
          return l.length ? l instanceof Float32Array ? l : new Float32Array(l) : (s[0] = l, s[0]);
        }
      }, 44626: function(o, s, n) {
        var l = n(4957);
        o.exports = h;
        var u = 96;
        function i(p, _) {
          var d = l(getComputedStyle(p).getPropertyValue(_));
          return d[0] * h(d[1], p);
        }
        function h(p, _) {
          switch (_ = _ || document.body, p = (p || "px").trim().toLowerCase(), _ !== window && _ !== document || (_ = document.body), p) {
            case "%":
              return _.clientHeight / 100;
            case "ch":
            case "ex":
              return function(d, f) {
                var c = document.createElement("div");
                c.style["font-size"] = "128" + d, f.appendChild(c);
                var g = i(c, "font-size") / 128;
                return f.removeChild(c), g;
              }(p, _);
            case "em":
              return i(_, "font-size");
            case "rem":
              return i(document.body, "font-size");
            case "vw":
              return window.innerWidth / 100;
            case "vh":
              return window.innerHeight / 100;
            case "vmin":
              return Math.min(window.innerWidth, window.innerHeight) / 100;
            case "vmax":
              return Math.max(window.innerWidth, window.innerHeight) / 100;
            case "in":
              return u;
            case "cm":
              return u / 2.54;
            case "mm":
              return u / 25.4;
            case "pt":
              return u / 72;
            case "pc":
              return u / 6;
          }
          return 1;
        }
      }, 48640: function(o, s, n) {
        function l(h) {
          return h;
        }
        function u(h, p) {
          return typeof p == "string" && (p = h.objects[p]), p.type === "GeometryCollection" ? { type: "FeatureCollection", features: p.geometries.map(function(_) {
            return i(h, _);
          }) } : i(h, p);
        }
        function i(h, p) {
          var _ = p.id, d = p.bbox, f = p.properties == null ? {} : p.properties, c = function(g, m) {
            var x = function(L) {
              if (L == null) return l;
              var E, P, I = L.scale[0], M = L.scale[1], O = L.translate[0], T = L.translate[1];
              return function(z, F) {
                F || (E = P = 0);
                var U = 2, V = z.length, $ = new Array(V);
                for ($[0] = (E += z[0]) * I + O, $[1] = (P += z[1]) * M + T; U < V; ) $[U] = z[U], ++U;
                return $;
              };
            }(g.transform), w = g.arcs;
            function k(L, E) {
              E.length && E.pop();
              for (var P = w[L < 0 ? ~L : L], I = 0, M = P.length; I < M; ++I) E.push(x(P[I], I));
              L < 0 && function(O, T) {
                for (var z, F = O.length, U = F - T; U < --F; ) z = O[U], O[U++] = O[F], O[F] = z;
              }(E, M);
            }
            function S(L) {
              return x(L);
            }
            function A(L) {
              for (var E = [], P = 0, I = L.length; P < I; ++P) k(L[P], E);
              return E.length < 2 && E.push(E[0]), E;
            }
            function C(L) {
              for (var E = A(L); E.length < 4; ) E.push(E[0]);
              return E;
            }
            function D(L) {
              return L.map(C);
            }
            return function L(E) {
              var P, I = E.type;
              switch (I) {
                case "GeometryCollection":
                  return { type: I, geometries: E.geometries.map(L) };
                case "Point":
                  P = S(E.coordinates);
                  break;
                case "MultiPoint":
                  P = E.coordinates.map(S);
                  break;
                case "LineString":
                  P = A(E.arcs);
                  break;
                case "MultiLineString":
                  P = E.arcs.map(A);
                  break;
                case "Polygon":
                  P = D(E.arcs);
                  break;
                case "MultiPolygon":
                  P = E.arcs.map(D);
                  break;
                default:
                  return null;
              }
              return { type: I, coordinates: P };
            }(m);
          }(h, p);
          return _ == null && d == null ? { type: "Feature", properties: f, geometry: c } : d == null ? { type: "Feature", id: _, properties: f, geometry: c } : { type: "Feature", id: _, bbox: d, properties: f, geometry: c };
        }
        n.d(s, { N4: function() {
          return u;
        } });
      }, 64276: function(o, s, n) {
        var l = n(31350);
        o.exports = function(u) {
          if (typeof u != "function" || !hasOwnProperty.call(u, "length")) return !1;
          try {
            if (typeof u.length != "number" || typeof u.call != "function" || typeof u.apply != "function") return !1;
          } catch {
            return !1;
          }
          return !l(u);
        };
      }, 99497: function(o, s, n) {
        var l = n(80299), u = n(76481), i = n(58698), h = n(60461), p = function(_, d) {
          return _.replace("%v", h(d));
        };
        o.exports = function(_, d, f) {
          if (!u(f)) throw new TypeError(p(d, _));
          if (!l(_)) {
            if ("default" in f) return f.default;
            if (f.isOptional) return null;
          }
          var c = i(f.errorMessage);
          throw l(c) || (c = d), new TypeError(p(c, _));
        };
      }, 78696: function(o) {
        o.exports = function(s) {
          try {
            return s.toString();
          } catch {
            try {
              return String(s);
            } catch {
              return null;
            }
          }
        };
      }, 60461: function(o, s, n) {
        var l = n(78696), u = /[\n\r\u2028\u2029]/g;
        o.exports = function(i) {
          var h = l(i);
          return h === null ? "<Non-coercible to string value>" : (h.length > 100 && (h = h.slice(0, 99) + "…"), h = h.replace(u, function(p) {
            switch (p) {
              case `
`:
                return "\\n";
              case "\r":
                return "\\r";
              case "\u2028":
                return "\\u2028";
              case "\u2029":
                return "\\u2029";
              default:
                throw new Error("Unexpected character");
            }
          }));
        };
      }, 76481: function(o, s, n) {
        var l = n(80299), u = { object: !0, function: !0, undefined: !0 };
        o.exports = function(i) {
          return !!l(i) && hasOwnProperty.call(u, typeof i);
        };
      }, 6887: function(o, s, n) {
        var l = n(99497), u = n(63461);
        o.exports = function(i) {
          return u(i) ? i : l(i, "%v is not a plain function", arguments[1]);
        };
      }, 63461: function(o, s, n) {
        var l = n(64276), u = /^\s*class[\s{/}]/, i = Function.prototype.toString;
        o.exports = function(h) {
          return !!l(h) && !u.test(i.call(h));
        };
      }, 31350: function(o, s, n) {
        var l = n(76481);
        o.exports = function(u) {
          if (!l(u)) return !1;
          try {
            return !!u.constructor && u.constructor.prototype === u;
          } catch {
            return !1;
          }
        };
      }, 58698: function(o, s, n) {
        var l = n(80299), u = n(76481), i = Object.prototype.toString;
        o.exports = function(h) {
          if (!l(h)) return null;
          if (u(h)) {
            var p = h.toString;
            if (typeof p != "function" || p === i) return null;
          }
          try {
            return "" + h;
          } catch {
            return null;
          }
        };
      }, 9557: function(o, s, n) {
        var l = n(99497), u = n(80299);
        o.exports = function(i) {
          return u(i) ? i : l(i, "Cannot use %v", arguments[1]);
        };
      }, 80299: function(o) {
        o.exports = function(s) {
          return s != null;
        };
      }, 66127: function(o, s, n) {
        var l = n(54689), u = n(49523), i = n(45708).Buffer;
        n.g.__TYPEDARRAY_POOL || (n.g.__TYPEDARRAY_POOL = { UINT8: u([32, 0]), UINT16: u([32, 0]), UINT32: u([32, 0]), BIGUINT64: u([32, 0]), INT8: u([32, 0]), INT16: u([32, 0]), INT32: u([32, 0]), BIGINT64: u([32, 0]), FLOAT: u([32, 0]), DOUBLE: u([32, 0]), DATA: u([32, 0]), UINT8C: u([32, 0]), BUFFER: u([32, 0]) });
        var h = typeof Uint8ClampedArray < "u", p = typeof BigUint64Array < "u", _ = typeof BigInt64Array < "u", d = n.g.__TYPEDARRAY_POOL;
        d.UINT8C || (d.UINT8C = u([32, 0])), d.BIGUINT64 || (d.BIGUINT64 = u([32, 0])), d.BIGINT64 || (d.BIGINT64 = u([32, 0])), d.BUFFER || (d.BUFFER = u([32, 0]));
        var f = d.DATA, c = d.BUFFER;
        function g(T) {
          if (T) {
            var z = T.length || T.byteLength, F = l.log2(z);
            f[F].push(T);
          }
        }
        function m(T) {
          T = l.nextPow2(T);
          var z = l.log2(T), F = f[z];
          return F.length > 0 ? F.pop() : new ArrayBuffer(T);
        }
        function x(T) {
          return new Uint8Array(m(T), 0, T);
        }
        function w(T) {
          return new Uint16Array(m(2 * T), 0, T);
        }
        function k(T) {
          return new Uint32Array(m(4 * T), 0, T);
        }
        function S(T) {
          return new Int8Array(m(T), 0, T);
        }
        function A(T) {
          return new Int16Array(m(2 * T), 0, T);
        }
        function C(T) {
          return new Int32Array(m(4 * T), 0, T);
        }
        function D(T) {
          return new Float32Array(m(4 * T), 0, T);
        }
        function L(T) {
          return new Float64Array(m(8 * T), 0, T);
        }
        function E(T) {
          return h ? new Uint8ClampedArray(m(T), 0, T) : x(T);
        }
        function P(T) {
          return p ? new BigUint64Array(m(8 * T), 0, T) : null;
        }
        function I(T) {
          return _ ? new BigInt64Array(m(8 * T), 0, T) : null;
        }
        function M(T) {
          return new DataView(m(T), 0, T);
        }
        function O(T) {
          T = l.nextPow2(T);
          var z = l.log2(T), F = c[z];
          return F.length > 0 ? F.pop() : new i(T);
        }
        s.free = function(T) {
          if (i.isBuffer(T)) c[l.log2(T.length)].push(T);
          else {
            if (Object.prototype.toString.call(T) !== "[object ArrayBuffer]" && (T = T.buffer), !T) return;
            var z = T.length || T.byteLength, F = 0 | l.log2(z);
            f[F].push(T);
          }
        }, s.freeUint8 = s.freeUint16 = s.freeUint32 = s.freeBigUint64 = s.freeInt8 = s.freeInt16 = s.freeInt32 = s.freeBigInt64 = s.freeFloat32 = s.freeFloat = s.freeFloat64 = s.freeDouble = s.freeUint8Clamped = s.freeDataView = function(T) {
          g(T.buffer);
        }, s.freeArrayBuffer = g, s.freeBuffer = function(T) {
          c[l.log2(T.length)].push(T);
        }, s.malloc = function(T, z) {
          if (z === void 0 || z === "arraybuffer") return m(T);
          switch (z) {
            case "uint8":
              return x(T);
            case "uint16":
              return w(T);
            case "uint32":
              return k(T);
            case "int8":
              return S(T);
            case "int16":
              return A(T);
            case "int32":
              return C(T);
            case "float":
            case "float32":
              return D(T);
            case "double":
            case "float64":
              return L(T);
            case "uint8_clamped":
              return E(T);
            case "bigint64":
              return I(T);
            case "biguint64":
              return P(T);
            case "buffer":
              return O(T);
            case "data":
            case "dataview":
              return M(T);
            default:
              return null;
          }
          return null;
        }, s.mallocArrayBuffer = m, s.mallocUint8 = x, s.mallocUint16 = w, s.mallocUint32 = k, s.mallocInt8 = S, s.mallocInt16 = A, s.mallocInt32 = C, s.mallocFloat32 = s.mallocFloat = D, s.mallocFloat64 = s.mallocDouble = L, s.mallocUint8Clamped = E, s.mallocBigUint64 = P, s.mallocBigInt64 = I, s.mallocDataView = M, s.mallocBuffer = O, s.clearCache = function() {
          for (var T = 0; T < 32; ++T) d.UINT8[T].length = 0, d.UINT16[T].length = 0, d.UINT32[T].length = 0, d.INT8[T].length = 0, d.INT16[T].length = 0, d.INT32[T].length = 0, d.FLOAT[T].length = 0, d.DOUBLE[T].length = 0, d.BIGUINT64[T].length = 0, d.BIGINT64[T].length = 0, d.UINT8C[T].length = 0, f[T].length = 0, c[T].length = 0;
        };
      }, 80886: function(o) {
        var s = /[\'\"]/;
        o.exports = function(n) {
          return n ? (s.test(n.charAt(0)) && (n = n.substr(1)), s.test(n.charAt(n.length - 1)) && (n = n.substr(0, n.length - 1)), n) : "";
        };
      }, 79788: function(o) {
        o.exports = function(s, n, l) {
          Array.isArray(l) || (l = [].slice.call(arguments, 2));
          for (var u = 0, i = l.length; u < i; u++) {
            var h = l[u];
            for (var p in h) if ((n[p] === void 0 || Array.isArray(n[p]) || s[p] !== n[p]) && p in n) {
              var _;
              if (h[p] === !0) _ = n[p];
              else if (h[p] === !1 || typeof h[p] == "function" && (_ = h[p](n[p], s, n)) === void 0) continue;
              s[p] = _;
            }
          }
          return s;
        };
      }, 71103: function(o, s, n) {
        function l(u) {
          try {
            if (!n.g.localStorage) return !1;
          } catch {
            return !1;
          }
          var i = n.g.localStorage[u];
          return i != null && String(i).toLowerCase() === "true";
        }
        o.exports = function(u, i) {
          if (l("noDeprecation")) return u;
          var h = !1;
          return function() {
            if (!h) {
              if (l("throwDeprecation")) throw new Error(i);
              l("traceDeprecation") ? console.trace(i) : console.warn(i), h = !0;
            }
            return u.apply(this, arguments);
          };
        };
      }, 44123: function(o) {
        o.exports = function(s) {
          return s && typeof s == "object" && typeof s.copy == "function" && typeof s.fill == "function" && typeof s.readUInt8 == "function";
        };
      }, 15724: function(o, s, n) {
        var l = n(40280), u = n(80340), i = n(96835), h = n(15628);
        function p(q) {
          return q.call.bind(q);
        }
        var _ = typeof BigInt < "u", d = typeof Symbol < "u", f = p(Object.prototype.toString), c = p(Number.prototype.valueOf), g = p(String.prototype.valueOf), m = p(Boolean.prototype.valueOf);
        if (_) var x = p(BigInt.prototype.valueOf);
        if (d) var w = p(Symbol.prototype.valueOf);
        function k(q, K) {
          if (typeof q != "object") return !1;
          try {
            return K(q), !0;
          } catch {
            return !1;
          }
        }
        function S(q) {
          return f(q) === "[object Map]";
        }
        function A(q) {
          return f(q) === "[object Set]";
        }
        function C(q) {
          return f(q) === "[object WeakMap]";
        }
        function D(q) {
          return f(q) === "[object WeakSet]";
        }
        function L(q) {
          return f(q) === "[object ArrayBuffer]";
        }
        function E(q) {
          return typeof ArrayBuffer < "u" && (L.working ? L(q) : q instanceof ArrayBuffer);
        }
        function P(q) {
          return f(q) === "[object DataView]";
        }
        function I(q) {
          return typeof DataView < "u" && (P.working ? P(q) : q instanceof DataView);
        }
        s.isArgumentsObject = l, s.isGeneratorFunction = u, s.isTypedArray = h, s.isPromise = function(q) {
          return typeof Promise < "u" && q instanceof Promise || q !== null && typeof q == "object" && typeof q.then == "function" && typeof q.catch == "function";
        }, s.isArrayBufferView = function(q) {
          return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(q) : h(q) || I(q);
        }, s.isUint8Array = function(q) {
          return i(q) === "Uint8Array";
        }, s.isUint8ClampedArray = function(q) {
          return i(q) === "Uint8ClampedArray";
        }, s.isUint16Array = function(q) {
          return i(q) === "Uint16Array";
        }, s.isUint32Array = function(q) {
          return i(q) === "Uint32Array";
        }, s.isInt8Array = function(q) {
          return i(q) === "Int8Array";
        }, s.isInt16Array = function(q) {
          return i(q) === "Int16Array";
        }, s.isInt32Array = function(q) {
          return i(q) === "Int32Array";
        }, s.isFloat32Array = function(q) {
          return i(q) === "Float32Array";
        }, s.isFloat64Array = function(q) {
          return i(q) === "Float64Array";
        }, s.isBigInt64Array = function(q) {
          return i(q) === "BigInt64Array";
        }, s.isBigUint64Array = function(q) {
          return i(q) === "BigUint64Array";
        }, S.working = typeof Map < "u" && S(/* @__PURE__ */ new Map()), s.isMap = function(q) {
          return typeof Map < "u" && (S.working ? S(q) : q instanceof Map);
        }, A.working = typeof Set < "u" && A(/* @__PURE__ */ new Set()), s.isSet = function(q) {
          return typeof Set < "u" && (A.working ? A(q) : q instanceof Set);
        }, C.working = typeof WeakMap < "u" && C(/* @__PURE__ */ new WeakMap()), s.isWeakMap = function(q) {
          return typeof WeakMap < "u" && (C.working ? C(q) : q instanceof WeakMap);
        }, D.working = typeof WeakSet < "u" && D(/* @__PURE__ */ new WeakSet()), s.isWeakSet = function(q) {
          return D(q);
        }, L.working = typeof ArrayBuffer < "u" && L(new ArrayBuffer()), s.isArrayBuffer = E, P.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && P(new DataView(new ArrayBuffer(1), 0, 1)), s.isDataView = I;
        var M = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
        function O(q) {
          return f(q) === "[object SharedArrayBuffer]";
        }
        function T(q) {
          return M !== void 0 && (O.working === void 0 && (O.working = O(new M())), O.working ? O(q) : q instanceof M);
        }
        function z(q) {
          return k(q, c);
        }
        function F(q) {
          return k(q, g);
        }
        function U(q) {
          return k(q, m);
        }
        function V(q) {
          return _ && k(q, x);
        }
        function $(q) {
          return d && k(q, w);
        }
        s.isSharedArrayBuffer = T, s.isAsyncFunction = function(q) {
          return f(q) === "[object AsyncFunction]";
        }, s.isMapIterator = function(q) {
          return f(q) === "[object Map Iterator]";
        }, s.isSetIterator = function(q) {
          return f(q) === "[object Set Iterator]";
        }, s.isGeneratorObject = function(q) {
          return f(q) === "[object Generator]";
        }, s.isWebAssemblyCompiledModule = function(q) {
          return f(q) === "[object WebAssembly.Module]";
        }, s.isNumberObject = z, s.isStringObject = F, s.isBooleanObject = U, s.isBigIntObject = V, s.isSymbolObject = $, s.isBoxedPrimitive = function(q) {
          return z(q) || F(q) || U(q) || V(q) || $(q);
        }, s.isAnyArrayBuffer = function(q) {
          return typeof Uint8Array < "u" && (E(q) || T(q));
        }, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(q) {
          Object.defineProperty(s, q, { enumerable: !1, value: function() {
            throw new Error(q + " is not supported in userland");
          } });
        });
      }, 56557: function(o, s, n) {
        var l = n(33282), u = Object.getOwnPropertyDescriptors || function($) {
          for (var q = Object.keys($), K = {}, re = 0; re < q.length; re++) K[q[re]] = Object.getOwnPropertyDescriptor($, q[re]);
          return K;
        }, i = /%[sdj%]/g;
        s.format = function($) {
          if (!C($)) {
            for (var q = [], K = 0; K < arguments.length; K++) q.push(d(arguments[K]));
            return q.join(" ");
          }
          K = 1;
          for (var re = arguments, Y = re.length, te = String($).replace(i, function(X) {
            if (X === "%%") return "%";
            if (K >= Y) return X;
            switch (X) {
              case "%s":
                return String(re[K++]);
              case "%d":
                return Number(re[K++]);
              case "%j":
                try {
                  return JSON.stringify(re[K++]);
                } catch {
                  return "[Circular]";
                }
              default:
                return X;
            }
          }), ee = re[K]; K < Y; ee = re[++K]) S(ee) || !E(ee) ? te += " " + ee : te += " " + d(ee);
          return te;
        }, s.deprecate = function($, q) {
          if (l !== void 0 && l.noDeprecation === !0) return $;
          if (l === void 0) return function() {
            return s.deprecate($, q).apply(this, arguments);
          };
          var K = !1;
          return function() {
            if (!K) {
              if (l.throwDeprecation) throw new Error(q);
              l.traceDeprecation ? console.trace(q) : console.error(q), K = !0;
            }
            return $.apply(this, arguments);
          };
        };
        var h = {}, p = /^$/;
        if (l.env.NODE_DEBUG) {
          var _ = l.env.NODE_DEBUG;
          _ = _.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), p = new RegExp("^" + _ + "$", "i");
        }
        function d($, q) {
          var K = { seen: [], stylize: c };
          return arguments.length >= 3 && (K.depth = arguments[2]), arguments.length >= 4 && (K.colors = arguments[3]), k(q) ? K.showHidden = q : q && s._extend(K, q), D(K.showHidden) && (K.showHidden = !1), D(K.depth) && (K.depth = 2), D(K.colors) && (K.colors = !1), D(K.customInspect) && (K.customInspect = !0), K.colors && (K.stylize = f), g(K, $, K.depth);
        }
        function f($, q) {
          var K = d.styles[q];
          return K ? "\x1B[" + d.colors[K][0] + "m" + $ + "\x1B[" + d.colors[K][1] + "m" : $;
        }
        function c($, q) {
          return $;
        }
        function g($, q, K) {
          if ($.customInspect && q && M(q.inspect) && q.inspect !== s.inspect && (!q.constructor || q.constructor.prototype !== q)) {
            var re = q.inspect(K, $);
            return C(re) || (re = g($, re, K)), re;
          }
          var Y = function(de, ne) {
            if (D(ne)) return de.stylize("undefined", "undefined");
            if (C(ne)) {
              var ae = "'" + JSON.stringify(ne).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
              return de.stylize(ae, "string");
            }
            return A(ne) ? de.stylize("" + ne, "number") : k(ne) ? de.stylize("" + ne, "boolean") : S(ne) ? de.stylize("null", "null") : void 0;
          }($, q);
          if (Y) return Y;
          var te = Object.keys(q), ee = function(de) {
            var ne = {};
            return de.forEach(function(ae, se) {
              ne[ae] = !0;
            }), ne;
          }(te);
          if ($.showHidden && (te = Object.getOwnPropertyNames(q)), I(q) && (te.indexOf("message") >= 0 || te.indexOf("description") >= 0)) return m(q);
          if (te.length === 0) {
            if (M(q)) {
              var X = q.name ? ": " + q.name : "";
              return $.stylize("[Function" + X + "]", "special");
            }
            if (L(q)) return $.stylize(RegExp.prototype.toString.call(q), "regexp");
            if (P(q)) return $.stylize(Date.prototype.toString.call(q), "date");
            if (I(q)) return m(q);
          }
          var Q, ue = "", ce = !1, he = ["{", "}"];
          return w(q) && (ce = !0, he = ["[", "]"]), M(q) && (ue = " [Function" + (q.name ? ": " + q.name : "") + "]"), L(q) && (ue = " " + RegExp.prototype.toString.call(q)), P(q) && (ue = " " + Date.prototype.toUTCString.call(q)), I(q) && (ue = " " + m(q)), te.length !== 0 || ce && q.length != 0 ? K < 0 ? L(q) ? $.stylize(RegExp.prototype.toString.call(q), "regexp") : $.stylize("[Object]", "special") : ($.seen.push(q), Q = ce ? function(de, ne, ae, se, me) {
            for (var ye = [], pe = 0, be = ne.length; pe < be; ++pe) F(ne, String(pe)) ? ye.push(x(de, ne, ae, se, String(pe), !0)) : ye.push("");
            return me.forEach(function(Ae) {
              Ae.match(/^\d+$/) || ye.push(x(de, ne, ae, se, Ae, !0));
            }), ye;
          }($, q, K, ee, te) : te.map(function(de) {
            return x($, q, K, ee, de, ce);
          }), $.seen.pop(), function(de, ne, ae) {
            return de.reduce(function(se, me) {
              return me.indexOf(`
`), se + me.replace(/\u001b\[\d\d?m/g, "").length + 1;
            }, 0) > 60 ? ae[0] + (ne === "" ? "" : ne + `
 `) + " " + de.join(`,
  `) + " " + ae[1] : ae[0] + ne + " " + de.join(", ") + " " + ae[1];
          }(Q, ue, he)) : he[0] + ue + he[1];
        }
        function m($) {
          return "[" + Error.prototype.toString.call($) + "]";
        }
        function x($, q, K, re, Y, te) {
          var ee, X, Q;
          if ((Q = Object.getOwnPropertyDescriptor(q, Y) || { value: q[Y] }).get ? X = Q.set ? $.stylize("[Getter/Setter]", "special") : $.stylize("[Getter]", "special") : Q.set && (X = $.stylize("[Setter]", "special")), F(re, Y) || (ee = "[" + Y + "]"), X || ($.seen.indexOf(Q.value) < 0 ? (X = S(K) ? g($, Q.value, null) : g($, Q.value, K - 1)).indexOf(`
`) > -1 && (X = te ? X.split(`
`).map(function(ue) {
            return "  " + ue;
          }).join(`
`).slice(2) : `
` + X.split(`
`).map(function(ue) {
            return "   " + ue;
          }).join(`
`)) : X = $.stylize("[Circular]", "special")), D(ee)) {
            if (te && Y.match(/^\d+$/)) return X;
            (ee = JSON.stringify("" + Y)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (ee = ee.slice(1, -1), ee = $.stylize(ee, "name")) : (ee = ee.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), ee = $.stylize(ee, "string"));
          }
          return ee + ": " + X;
        }
        function w($) {
          return Array.isArray($);
        }
        function k($) {
          return typeof $ == "boolean";
        }
        function S($) {
          return $ === null;
        }
        function A($) {
          return typeof $ == "number";
        }
        function C($) {
          return typeof $ == "string";
        }
        function D($) {
          return $ === void 0;
        }
        function L($) {
          return E($) && O($) === "[object RegExp]";
        }
        function E($) {
          return typeof $ == "object" && $ !== null;
        }
        function P($) {
          return E($) && O($) === "[object Date]";
        }
        function I($) {
          return E($) && (O($) === "[object Error]" || $ instanceof Error);
        }
        function M($) {
          return typeof $ == "function";
        }
        function O($) {
          return Object.prototype.toString.call($);
        }
        function T($) {
          return $ < 10 ? "0" + $.toString(10) : $.toString(10);
        }
        s.debuglog = function($) {
          if ($ = $.toUpperCase(), !h[$]) if (p.test($)) {
            var q = l.pid;
            h[$] = function() {
              var K = s.format.apply(s, arguments);
              console.error("%s %d: %s", $, q, K);
            };
          } else h[$] = function() {
          };
          return h[$];
        }, s.inspect = d, d.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, d.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, s.types = n(15724), s.isArray = w, s.isBoolean = k, s.isNull = S, s.isNullOrUndefined = function($) {
          return $ == null;
        }, s.isNumber = A, s.isString = C, s.isSymbol = function($) {
          return typeof $ == "symbol";
        }, s.isUndefined = D, s.isRegExp = L, s.types.isRegExp = L, s.isObject = E, s.isDate = P, s.types.isDate = P, s.isError = I, s.types.isNativeError = I, s.isFunction = M, s.isPrimitive = function($) {
          return $ === null || typeof $ == "boolean" || typeof $ == "number" || typeof $ == "string" || typeof $ == "symbol" || $ === void 0;
        }, s.isBuffer = n(44123);
        var z = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
        function F($, q) {
          return Object.prototype.hasOwnProperty.call($, q);
        }
        s.log = function() {
          var $, q;
          console.log("%s - %s", (q = [T(($ = /* @__PURE__ */ new Date()).getHours()), T($.getMinutes()), T($.getSeconds())].join(":"), [$.getDate(), z[$.getMonth()], q].join(" ")), s.format.apply(s, arguments));
        }, s.inherits = n(28062), s._extend = function($, q) {
          if (!q || !E(q)) return $;
          for (var K = Object.keys(q), re = K.length; re--; ) $[K[re]] = q[K[re]];
          return $;
        };
        var U = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
        function V($, q) {
          if (!$) {
            var K = new Error("Promise was rejected with a falsy value");
            K.reason = $, $ = K;
          }
          return q($);
        }
        s.promisify = function($) {
          if (typeof $ != "function") throw new TypeError('The "original" argument must be of type Function');
          if (U && $[U]) {
            var q;
            if (typeof (q = $[U]) != "function") throw new TypeError('The "util.promisify.custom" argument must be of type Function');
            return Object.defineProperty(q, U, { value: q, enumerable: !1, writable: !1, configurable: !0 }), q;
          }
          function q() {
            for (var K, re, Y = new Promise(function(X, Q) {
              K = X, re = Q;
            }), te = [], ee = 0; ee < arguments.length; ee++) te.push(arguments[ee]);
            te.push(function(X, Q) {
              X ? re(X) : K(Q);
            });
            try {
              $.apply(this, te);
            } catch (X) {
              re(X);
            }
            return Y;
          }
          return Object.setPrototypeOf(q, Object.getPrototypeOf($)), U && Object.defineProperty(q, U, { value: q, enumerable: !1, writable: !1, configurable: !0 }), Object.defineProperties(q, u($));
        }, s.promisify.custom = U, s.callbackify = function($) {
          if (typeof $ != "function") throw new TypeError('The "original" argument must be of type Function');
          function q() {
            for (var K = [], re = 0; re < arguments.length; re++) K.push(arguments[re]);
            var Y = K.pop();
            if (typeof Y != "function") throw new TypeError("The last argument must be of type Function");
            var te = this, ee = function() {
              return Y.apply(te, arguments);
            };
            $.apply(this, K).then(function(X) {
              l.nextTick(ee.bind(null, null, X));
            }, function(X) {
              l.nextTick(V.bind(null, X, ee));
            });
          }
          return Object.setPrototypeOf(q, Object.getPrototypeOf($)), Object.defineProperties(q, u($)), q;
        };
      }, 22248: function(o, s, n) {
        var l = n(72880);
        o.exports = function(u) {
          return l("webgl", u);
        };
      }, 96835: function(o, s, n) {
        var l = n(61262), u = n(70085), i = n(87227), h = n(63063), p = n(52991), _ = h("Object.prototype.toString"), d = n(36912)(), f = typeof globalThis > "u" ? n.g : globalThis, c = u(), g = h("String.prototype.slice"), m = Object.getPrototypeOf, x = h("Array.prototype.indexOf", !0) || function(k, S) {
          for (var A = 0; A < k.length; A += 1) if (k[A] === S) return A;
          return -1;
        }, w = { __proto__: null };
        l(c, d && p && m ? function(k) {
          var S = new f[k]();
          if (Symbol.toStringTag in S) {
            var A = m(S), C = p(A, Symbol.toStringTag);
            if (!C) {
              var D = m(A);
              C = p(D, Symbol.toStringTag);
            }
            w["$" + k] = i(C.get);
          }
        } : function(k) {
          var S = new f[k](), A = S.slice || S.set;
          A && (w["$" + k] = i(A));
        }), o.exports = function(k) {
          if (!k || typeof k != "object") return !1;
          if (!d) {
            var S = g(_(k), 8, -1);
            return x(c, S) > -1 ? S : S === "Object" && function(A) {
              var C = !1;
              return l(w, function(D, L) {
                if (!C) try {
                  D(A), C = g(L, 1);
                } catch {
                }
              }), C;
            }(k);
          }
          return p ? function(A) {
            var C = !1;
            return l(w, function(D, L) {
              if (!C) try {
                "$" + D(A) === L && (C = g(L, 1));
              } catch {
              }
            }), C;
          }(k) : null;
        };
      }, 1401: function(o, s, n) {
        var l = n(24453), u = n(27976), i = l.instance();
        function h(m) {
          this.local = this.regionalOptions[m || ""] || this.regionalOptions[""];
        }
        h.prototype = new l.baseCalendar(), u(h.prototype, { name: "Chinese", jdEpoch: 17214255e-1, hasYearZero: !1, minMonth: 0, firstMonth: 0, minDay: 1, regionalOptions: { "": { name: "Chinese", epochs: ["BEC", "EC"], monthNumbers: function(m, x) {
          if (typeof m == "string") {
            var w = m.match(_);
            return w ? w[0] : "";
          }
          var k = this._validateYear(m), S = m.month(), A = "" + this.toChineseMonth(k, S);
          return x && A.length < 2 && (A = "0" + A), this.isIntercalaryMonth(k, S) && (A += "i"), A;
        }, monthNames: function(m) {
          if (typeof m == "string") {
            var x = m.match(d);
            return x ? x[0] : "";
          }
          var w = this._validateYear(m), k = m.month(), S = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"][this.toChineseMonth(w, k) - 1];
          return this.isIntercalaryMonth(w, k) && (S = "闰" + S), S;
        }, monthNamesShort: function(m) {
          if (typeof m == "string") {
            var x = m.match(f);
            return x ? x[0] : "";
          }
          var w = this._validateYear(m), k = m.month(), S = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"][this.toChineseMonth(w, k) - 1];
          return this.isIntercalaryMonth(w, k) && (S = "闰" + S), S;
        }, parseMonth: function(m, x) {
          m = this._validateYear(m);
          var w, k = parseInt(x);
          if (isNaN(k)) x[0] === "闰" && (w = !0, x = x.substring(1)), x[x.length - 1] === "月" && (x = x.substring(0, x.length - 1)), k = 1 + ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"].indexOf(x);
          else {
            var S = x[x.length - 1];
            w = S === "i" || S === "I";
          }
          return this.toMonthIndex(m, k, w);
        }, dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 1, isRTL: !1 } }, _validateYear: function(m, x) {
          if (m.year && (m = m.year()), typeof m != "number" || m < 1888 || m > 2111) throw x.replace(/\{0\}/, this.local.name);
          return m;
        }, toMonthIndex: function(m, x, w) {
          var k = this.intercalaryMonth(m);
          if (w && x !== k || x < 1 || x > 12) throw l.local.invalidMonth.replace(/\{0\}/, this.local.name);
          return k ? !w && x <= k ? x - 1 : x : x - 1;
        }, toChineseMonth: function(m, x) {
          m.year && (x = (m = m.year()).month());
          var w = this.intercalaryMonth(m);
          if (x < 0 || x > (w ? 12 : 11)) throw l.local.invalidMonth.replace(/\{0\}/, this.local.name);
          return w ? x < w ? x + 1 : x : x + 1;
        }, intercalaryMonth: function(m) {
          return m = this._validateYear(m), c[m - c[0]] >> 13;
        }, isIntercalaryMonth: function(m, x) {
          m.year && (x = (m = m.year()).month());
          var w = this.intercalaryMonth(m);
          return !!w && w === x;
        }, leapYear: function(m) {
          return this.intercalaryMonth(m) !== 0;
        }, weekOfYear: function(m, x, w) {
          var k, S = this._validateYear(m, l.local.invalidyear), A = g[S - g[0]], C = A >> 9 & 4095, D = A >> 5 & 15, L = 31 & A;
          (k = i.newDate(C, D, L)).add(4 - (k.dayOfWeek() || 7), "d");
          var E = this.toJD(m, x, w) - k.toJD();
          return 1 + Math.floor(E / 7);
        }, monthsInYear: function(m) {
          return this.leapYear(m) ? 13 : 12;
        }, daysInMonth: function(m, x) {
          m.year && (x = m.month(), m = m.year()), m = this._validateYear(m);
          var w = c[m - c[0]];
          if (x > (w >> 13 ? 12 : 11)) throw l.local.invalidMonth.replace(/\{0\}/, this.local.name);
          return w & 1 << 12 - x ? 30 : 29;
        }, weekDay: function(m, x, w) {
          return (this.dayOfWeek(m, x, w) || 7) < 6;
        }, toJD: function(m, x, w) {
          var k = this._validate(m, A, w, l.local.invalidDate);
          m = this._validateYear(k.year()), x = k.month(), w = k.day();
          var S = this.isIntercalaryMonth(m, x), A = this.toChineseMonth(m, x), C = function(D, L, E, P, I) {
            var M, O, T;
            if (typeof D == "object") O = D, M = L || {};
            else {
              var z;
              if (!(typeof D == "number" && D >= 1888 && D <= 2111)) throw new Error("Lunar year outside range 1888-2111");
              if (!(typeof L == "number" && L >= 1 && L <= 12)) throw new Error("Lunar month outside range 1 - 12");
              if (!(typeof E == "number" && E >= 1 && E <= 30)) throw new Error("Lunar day outside range 1 - 30");
              typeof P == "object" ? (z = !1, M = P) : (z = !!P, M = {}), O = { year: D, month: L, day: E, isIntercalary: z };
            }
            T = O.day - 1;
            var F, U = c[O.year - c[0]], V = U >> 13;
            F = V && (O.month > V || O.isIntercalary) ? O.month : O.month - 1;
            for (var $ = 0; $ < F; $++) T += U & 1 << 12 - $ ? 30 : 29;
            var q = g[O.year - g[0]], K = new Date(q >> 9 & 4095, (q >> 5 & 15) - 1, (31 & q) + T);
            return M.year = K.getFullYear(), M.month = 1 + K.getMonth(), M.day = K.getDate(), M;
          }(m, A, w, S);
          return i.toJD(C.year, C.month, C.day);
        }, fromJD: function(m) {
          var x = i.fromJD(m), w = function(S, A, C, D) {
            var L, E;
            if (typeof S == "object") L = S, E = A || {};
            else {
              if (!(typeof S == "number" && S >= 1888 && S <= 2111)) throw new Error("Solar year outside range 1888-2111");
              if (!(typeof A == "number" && A >= 1 && A <= 12)) throw new Error("Solar month outside range 1 - 12");
              if (!(typeof C == "number" && C >= 1 && C <= 31)) throw new Error("Solar day outside range 1 - 31");
              L = { year: S, month: A, day: C }, E = {};
            }
            var P = g[L.year - g[0]], I = L.year << 9 | L.month << 5 | L.day;
            E.year = I >= P ? L.year : L.year - 1, P = g[E.year - g[0]];
            var M, O = new Date(P >> 9 & 4095, (P >> 5 & 15) - 1, 31 & P), T = new Date(L.year, L.month - 1, L.day);
            M = Math.round((T - O) / 864e5);
            var z, F = c[E.year - c[0]];
            for (z = 0; z < 13; z++) {
              var U = F & 1 << 12 - z ? 30 : 29;
              if (M < U) break;
              M -= U;
            }
            var V = F >> 13;
            return !V || z < V ? (E.isIntercalary = !1, E.month = 1 + z) : z === V ? (E.isIntercalary = !0, E.month = z) : (E.isIntercalary = !1, E.month = z), E.day = 1 + M, E;
          }(x.year(), x.month(), x.day()), k = this.toMonthIndex(w.year, w.month, w.isIntercalary);
          return this.newDate(w.year, k, w.day);
        }, fromString: function(m) {
          var x = m.match(p), w = this._validateYear(+x[1]), k = +x[2], S = !!x[3], A = this.toMonthIndex(w, k, S), C = +x[4];
          return this.newDate(w, A, C);
        }, add: function(m, x, w) {
          var k = m.year(), S = m.month(), A = this.isIntercalaryMonth(k, S), C = this.toChineseMonth(k, S), D = Object.getPrototypeOf(h.prototype).add.call(this, m, x, w);
          if (w === "y") {
            var L = D.year(), E = D.month(), P = this.isIntercalaryMonth(L, C), I = A && P ? this.toMonthIndex(L, C, !0) : this.toMonthIndex(L, C, !1);
            I !== E && D.month(I);
          }
          return D;
        } });
        var p = /^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m, _ = /^\d?\d[iI]?/m, d = /^闰?十?[一二三四五六七八九]?月/m, f = /^闰?十?[一二三四五六七八九]?/m;
        l.calendars.chinese = h;
        var c = [1887, 5780, 5802, 19157, 2742, 50359, 1198, 2646, 46378, 7466, 3412, 30122, 5482, 67949, 2396, 5294, 43597, 6732, 6954, 36181, 2772, 4954, 18781, 2396, 54427, 5274, 6730, 47781, 5800, 6868, 21210, 4790, 59703, 2350, 5270, 46667, 3402, 3496, 38325, 1388, 4782, 18735, 2350, 52374, 6804, 7498, 44457, 2906, 1388, 29294, 4700, 63789, 6442, 6804, 56138, 5802, 2772, 38235, 1210, 4698, 22827, 5418, 63125, 3476, 5802, 43701, 2484, 5302, 27223, 2646, 70954, 7466, 3412, 54698, 5482, 2412, 38062, 5294, 2636, 32038, 6954, 60245, 2772, 4826, 43357, 2394, 5274, 39501, 6730, 72357, 5800, 5844, 53978, 4790, 2358, 38039, 5270, 87627, 3402, 3496, 54708, 5484, 4782, 43311, 2350, 3222, 27978, 7498, 68965, 2904, 5484, 45677, 4700, 6444, 39573, 6804, 6986, 19285, 2772, 62811, 1210, 4698, 47403, 5418, 5780, 38570, 5546, 76469, 2420, 5302, 51799, 2646, 5414, 36501, 3412, 5546, 18869, 2412, 54446, 5276, 6732, 48422, 6822, 2900, 28010, 4826, 92509, 2394, 5274, 55883, 6730, 6820, 47956, 5812, 2778, 18779, 2358, 62615, 5270, 5450, 46757, 3492, 5556, 27318, 4718, 67887, 2350, 3222, 52554, 7498, 3428, 38252, 5468, 4700, 31022, 6444, 64149, 6804, 6986, 43861, 2772, 5338, 35421, 2650, 70955, 5418, 5780, 54954, 5546, 2740, 38074, 5302, 2646, 29991, 3366, 61011, 3412, 5546, 43445, 2412, 5294, 35406, 6732, 72998, 6820, 6996, 52586, 2778, 2396, 38045, 5274, 6698, 23333, 6820, 64338, 5812, 2746, 43355, 2358, 5270, 39499, 5450, 79525, 3492, 5548], g = [1887, 966732, 967231, 967733, 968265, 968766, 969297, 969798, 970298, 970829, 971330, 971830, 972362, 972863, 973395, 973896, 974397, 974928, 975428, 975929, 976461, 976962, 977462, 977994, 978494, 979026, 979526, 980026, 980558, 981059, 981559, 982091, 982593, 983124, 983624, 984124, 984656, 985157, 985656, 986189, 986690, 987191, 987722, 988222, 988753, 989254, 989754, 990286, 990788, 991288, 991819, 992319, 992851, 993352, 993851, 994383, 994885, 995385, 995917, 996418, 996918, 997450, 997949, 998481, 998982, 999483, 1000014, 1000515, 1001016, 1001548, 1002047, 1002578, 1003080, 1003580, 1004111, 1004613, 1005113, 1005645, 1006146, 1006645, 1007177, 1007678, 1008209, 1008710, 1009211, 1009743, 1010243, 1010743, 1011275, 1011775, 1012306, 1012807, 1013308, 1013840, 1014341, 1014841, 1015373, 1015874, 1016404, 1016905, 1017405, 1017937, 1018438, 1018939, 1019471, 1019972, 1020471, 1021002, 1021503, 1022035, 1022535, 1023036, 1023568, 1024069, 1024568, 1025100, 1025601, 1026102, 1026633, 1027133, 1027666, 1028167, 1028666, 1029198, 1029699, 1030199, 1030730, 1031231, 1031763, 1032264, 1032764, 1033296, 1033797, 1034297, 1034828, 1035329, 1035830, 1036362, 1036861, 1037393, 1037894, 1038394, 1038925, 1039427, 1039927, 1040459, 1040959, 1041491, 1041992, 1042492, 1043023, 1043524, 1044024, 1044556, 1045057, 1045558, 1046090, 1046590, 1047121, 1047622, 1048122, 1048654, 1049154, 1049655, 1050187, 1050689, 1051219, 1051720, 1052220, 1052751, 1053252, 1053752, 1054284, 1054786, 1055285, 1055817, 1056317, 1056849, 1057349, 1057850, 1058382, 1058883, 1059383, 1059915, 1060415, 1060947, 1061447, 1061947, 1062479, 1062981, 1063480, 1064012, 1064514, 1065014, 1065545, 1066045, 1066577, 1067078, 1067578, 1068110, 1068611, 1069112, 1069642, 1070142, 1070674, 1071175, 1071675, 1072207, 1072709, 1073209, 1073740, 1074241, 1074741, 1075273, 1075773, 1076305, 1076807, 1077308, 1077839, 1078340, 1078840, 1079372, 1079871, 1080403, 1080904];
      }, 72210: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(h) {
          this.local = this.regionalOptions[h || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Coptic", jdEpoch: 18250295e-1, daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Coptic", epochs: ["BAM", "AM"], monthNames: ["Thout", "Paopi", "Hathor", "Koiak", "Tobi", "Meshir", "Paremhat", "Paremoude", "Pashons", "Paoni", "Epip", "Mesori", "Pi Kogi Enavot"], monthNamesShort: ["Tho", "Pao", "Hath", "Koi", "Tob", "Mesh", "Pat", "Pad", "Pash", "Pao", "Epi", "Meso", "PiK"], dayNames: ["Tkyriaka", "Pesnau", "Pshoment", "Peftoou", "Ptiou", "Psoou", "Psabbaton"], dayNamesShort: ["Tky", "Pes", "Psh", "Pef", "Pti", "Pso", "Psa"], dayNamesMin: ["Tk", "Pes", "Psh", "Pef", "Pt", "Pso", "Psa"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(h) {
          var p = this._validate(h, this.minMonth, this.minDay, l.local.invalidYear);
          return (h = p.year() + (p.year() < 0 ? 1 : 0)) % 4 == 3 || h % 4 == -1;
        }, monthsInYear: function(h) {
          return this._validate(h, this.minMonth, this.minDay, l.local.invalidYear || l.regionalOptions[""].invalidYear), 13;
        }, weekOfYear: function(h, p, _) {
          var d = this.newDate(h, p, _);
          return d.add(-d.dayOfWeek(), "d"), Math.floor((d.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(h, p) {
          var _ = this._validate(h, p, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[_.month() - 1] + (_.month() === 13 && this.leapYear(_.year()) ? 1 : 0);
        }, weekDay: function(h, p, _) {
          return (this.dayOfWeek(h, p, _) || 7) < 6;
        }, toJD: function(h, p, _) {
          var d = this._validate(h, p, _, l.local.invalidDate);
          return (h = d.year()) < 0 && h++, d.day() + 30 * (d.month() - 1) + 365 * (h - 1) + Math.floor(h / 4) + this.jdEpoch - 1;
        }, fromJD: function(h) {
          var p = Math.floor(h) + 0.5 - this.jdEpoch, _ = Math.floor((p - Math.floor((p + 366) / 1461)) / 365) + 1;
          _ <= 0 && _--, p = Math.floor(h) + 0.5 - this.newDate(_, 1, 1).toJD();
          var d = Math.floor(p / 30) + 1, f = p - 30 * (d - 1) + 1;
          return this.newDate(_, d, f);
        } }), l.calendars.coptic = i;
      }, 28569: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Discworld", jdEpoch: 17214255e-1, daysPerMonth: [16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Discworld", epochs: ["BUC", "UC"], monthNames: ["Ick", "Offle", "February", "March", "April", "May", "June", "Grune", "August", "Spune", "Sektober", "Ember", "December"], monthNamesShort: ["Ick", "Off", "Feb", "Mar", "Apr", "May", "Jun", "Gru", "Aug", "Spu", "Sek", "Emb", "Dec"], dayNames: ["Sunday", "Octeday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Oct", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Oc", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 2, isRTL: !1 } }, leapYear: function(p) {
          return this._validate(p, this.minMonth, this.minDay, l.local.invalidYear), !1;
        }, monthsInYear: function(p) {
          return this._validate(p, this.minMonth, this.minDay, l.local.invalidYear), 13;
        }, daysInYear: function(p) {
          return this._validate(p, this.minMonth, this.minDay, l.local.invalidYear), 400;
        }, weekOfYear: function(p, _, d) {
          var f = this.newDate(p, _, d);
          return f.add(-f.dayOfWeek(), "d"), Math.floor((f.dayOfYear() - 1) / 8) + 1;
        }, daysInMonth: function(p, _) {
          var d = this._validate(p, _, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[d.month() - 1];
        }, daysInWeek: function() {
          return 8;
        }, dayOfWeek: function(p, _, d) {
          return (this._validate(p, _, d, l.local.invalidDate).day() + 1) % 8;
        }, weekDay: function(p, _, d) {
          var f = this.dayOfWeek(p, _, d);
          return f >= 2 && f <= 6;
        }, extraInfo: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          return { century: h[Math.floor((f.year() - 1) / 100) + 1] || "" };
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          return p = f.year() + (f.year() < 0 ? 1 : 0), _ = f.month(), (d = f.day()) + (_ > 1 ? 16 : 0) + (_ > 2 ? 32 * (_ - 2) : 0) + 400 * (p - 1) + this.jdEpoch - 1;
        }, fromJD: function(p) {
          p = Math.floor(p + 0.5) - Math.floor(this.jdEpoch) - 1;
          var _ = Math.floor(p / 400) + 1;
          p -= 400 * (_ - 1), p += p > 15 ? 16 : 0;
          var d = Math.floor(p / 32) + 1, f = p - 32 * (d - 1) + 1;
          return this.newDate(_ <= 0 ? _ - 1 : _, d, f);
        } });
        var h = { 20: "Fruitbat", 21: "Anchovy" };
        l.calendars.discworld = i;
      }, 81133: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(h) {
          this.local = this.regionalOptions[h || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Ethiopian", jdEpoch: 17242205e-1, daysPerMonth: [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 5], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Ethiopian", epochs: ["BEE", "EE"], monthNames: ["Meskerem", "Tikemet", "Hidar", "Tahesas", "Tir", "Yekatit", "Megabit", "Miazia", "Genbot", "Sene", "Hamle", "Nehase", "Pagume"], monthNamesShort: ["Mes", "Tik", "Hid", "Tah", "Tir", "Yek", "Meg", "Mia", "Gen", "Sen", "Ham", "Neh", "Pag"], dayNames: ["Ehud", "Segno", "Maksegno", "Irob", "Hamus", "Arb", "Kidame"], dayNamesShort: ["Ehu", "Seg", "Mak", "Iro", "Ham", "Arb", "Kid"], dayNamesMin: ["Eh", "Se", "Ma", "Ir", "Ha", "Ar", "Ki"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(h) {
          var p = this._validate(h, this.minMonth, this.minDay, l.local.invalidYear);
          return (h = p.year() + (p.year() < 0 ? 1 : 0)) % 4 == 3 || h % 4 == -1;
        }, monthsInYear: function(h) {
          return this._validate(h, this.minMonth, this.minDay, l.local.invalidYear || l.regionalOptions[""].invalidYear), 13;
        }, weekOfYear: function(h, p, _) {
          var d = this.newDate(h, p, _);
          return d.add(-d.dayOfWeek(), "d"), Math.floor((d.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(h, p) {
          var _ = this._validate(h, p, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[_.month() - 1] + (_.month() === 13 && this.leapYear(_.year()) ? 1 : 0);
        }, weekDay: function(h, p, _) {
          return (this.dayOfWeek(h, p, _) || 7) < 6;
        }, toJD: function(h, p, _) {
          var d = this._validate(h, p, _, l.local.invalidDate);
          return (h = d.year()) < 0 && h++, d.day() + 30 * (d.month() - 1) + 365 * (h - 1) + Math.floor(h / 4) + this.jdEpoch - 1;
        }, fromJD: function(h) {
          var p = Math.floor(h) + 0.5 - this.jdEpoch, _ = Math.floor((p - Math.floor((p + 366) / 1461)) / 365) + 1;
          _ <= 0 && _--, p = Math.floor(h) + 0.5 - this.newDate(_, 1, 1).toJD();
          var d = Math.floor(p / 30) + 1, f = p - 30 * (d - 1) + 1;
          return this.newDate(_, d, f);
        } }), l.calendars.ethiopian = i;
      }, 78295: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        function h(p, _) {
          return p - _ * Math.floor(p / _);
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Hebrew", jdEpoch: 347995.5, daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29], hasYearZero: !1, minMonth: 1, firstMonth: 7, minDay: 1, regionalOptions: { "": { name: "Hebrew", epochs: ["BAM", "AM"], monthNames: ["Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II"], monthNamesShort: ["Nis", "Iya", "Siv", "Tam", "Av", "Elu", "Tis", "Che", "Kis", "Tev", "She", "Ada", "Ad2"], dayNames: ["Yom Rishon", "Yom Sheni", "Yom Shlishi", "Yom Revi'i", "Yom Chamishi", "Yom Shishi", "Yom Shabbat"], dayNamesShort: ["Ris", "She", "Shl", "Rev", "Cha", "Shi", "Sha"], dayNamesMin: ["Ri", "She", "Shl", "Re", "Ch", "Shi", "Sha"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return this._leapYear(_.year());
        }, _leapYear: function(p) {
          return h(7 * (p = p < 0 ? p + 1 : p) + 1, 19) < 7;
        }, monthsInYear: function(p) {
          return this._validate(p, this.minMonth, this.minDay, l.local.invalidYear), this._leapYear(p.year ? p.year() : p) ? 13 : 12;
        }, weekOfYear: function(p, _, d) {
          var f = this.newDate(p, _, d);
          return f.add(-f.dayOfWeek(), "d"), Math.floor((f.dayOfYear() - 1) / 7) + 1;
        }, daysInYear: function(p) {
          return p = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear).year(), this.toJD(p === -1 ? 1 : p + 1, 7, 1) - this.toJD(p, 7, 1);
        }, daysInMonth: function(p, _) {
          return p.year && (_ = p.month(), p = p.year()), this._validate(p, _, this.minDay, l.local.invalidMonth), _ === 12 && this.leapYear(p) || _ === 8 && h(this.daysInYear(p), 10) === 5 ? 30 : _ === 9 && h(this.daysInYear(p), 10) === 3 ? 29 : this.daysPerMonth[_ - 1];
        }, weekDay: function(p, _, d) {
          return this.dayOfWeek(p, _, d) !== 6;
        }, extraInfo: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          return { yearType: (this.leapYear(f) ? "embolismic" : "common") + " " + ["deficient", "regular", "complete"][this.daysInYear(f) % 10 - 3] };
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          p = f.year(), _ = f.month(), d = f.day();
          var c = p <= 0 ? p + 1 : p, g = this.jdEpoch + this._delay1(c) + this._delay2(c) + d + 1;
          if (_ < 7) {
            for (var m = 7; m <= this.monthsInYear(p); m++) g += this.daysInMonth(p, m);
            for (m = 1; m < _; m++) g += this.daysInMonth(p, m);
          } else for (m = 7; m < _; m++) g += this.daysInMonth(p, m);
          return g;
        }, _delay1: function(p) {
          var _ = Math.floor((235 * p - 234) / 19), d = 12084 + 13753 * _, f = 29 * _ + Math.floor(d / 25920);
          return h(3 * (f + 1), 7) < 3 && f++, f;
        }, _delay2: function(p) {
          var _ = this._delay1(p - 1), d = this._delay1(p);
          return this._delay1(p + 1) - d == 356 ? 2 : d - _ == 382 ? 1 : 0;
        }, fromJD: function(p) {
          p = Math.floor(p) + 0.5;
          for (var _ = Math.floor(98496 * (p - this.jdEpoch) / 35975351) - 1; p >= this.toJD(_ === -1 ? 1 : _ + 1, 7, 1); ) _++;
          for (var d = p < this.toJD(_, 1, 1) ? 7 : 1; p > this.toJD(_, d, this.daysInMonth(_, d)); ) d++;
          var f = p - this.toJD(_, d, 1) + 1;
          return this.newDate(_, d, f);
        } }), l.calendars.hebrew = i;
      }, 25512: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(h) {
          this.local = this.regionalOptions[h || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Islamic", jdEpoch: 19484395e-1, daysPerMonth: [30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Islamic", epochs: ["BH", "AH"], monthNames: ["Muharram", "Safar", "Rabi' al-awwal", "Rabi' al-thani", "Jumada al-awwal", "Jumada al-thani", "Rajab", "Sha'aban", "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah"], monthNamesShort: ["Muh", "Saf", "Rab1", "Rab2", "Jum1", "Jum2", "Raj", "Sha'", "Ram", "Shaw", "DhuQ", "DhuH"], dayNames: ["Yawm al-ahad", "Yawm al-ithnayn", "Yawm ath-thulaathaa'", "Yawm al-arbi'aa'", "Yawm al-khamīs", "Yawm al-jum'a", "Yawm as-sabt"], dayNamesShort: ["Aha", "Ith", "Thu", "Arb", "Kha", "Jum", "Sab"], dayNamesMin: ["Ah", "It", "Th", "Ar", "Kh", "Ju", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !1 } }, leapYear: function(h) {
          return (11 * this._validate(h, this.minMonth, this.minDay, l.local.invalidYear).year() + 14) % 30 < 11;
        }, weekOfYear: function(h, p, _) {
          var d = this.newDate(h, p, _);
          return d.add(-d.dayOfWeek(), "d"), Math.floor((d.dayOfYear() - 1) / 7) + 1;
        }, daysInYear: function(h) {
          return this.leapYear(h) ? 355 : 354;
        }, daysInMonth: function(h, p) {
          var _ = this._validate(h, p, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[_.month() - 1] + (_.month() === 12 && this.leapYear(_.year()) ? 1 : 0);
        }, weekDay: function(h, p, _) {
          return this.dayOfWeek(h, p, _) !== 5;
        }, toJD: function(h, p, _) {
          var d = this._validate(h, p, _, l.local.invalidDate);
          return h = d.year(), p = d.month(), h = h <= 0 ? h + 1 : h, (_ = d.day()) + Math.ceil(29.5 * (p - 1)) + 354 * (h - 1) + Math.floor((3 + 11 * h) / 30) + this.jdEpoch - 1;
        }, fromJD: function(h) {
          h = Math.floor(h) + 0.5;
          var p = Math.floor((30 * (h - this.jdEpoch) + 10646) / 10631);
          p = p <= 0 ? p - 1 : p;
          var _ = Math.min(12, Math.ceil((h - 29 - this.toJD(p, 1, 1)) / 29.5) + 1), d = h - this.toJD(p, _, 1) + 1;
          return this.newDate(p, _, d);
        } }), l.calendars.islamic = i;
      }, 42645: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(h) {
          this.local = this.regionalOptions[h || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Julian", jdEpoch: 17214235e-1, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Julian", epochs: ["BC", "AD"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "mm/dd/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(h) {
          var p = this._validate(h, this.minMonth, this.minDay, l.local.invalidYear);
          return (h = p.year() < 0 ? p.year() + 1 : p.year()) % 4 == 0;
        }, weekOfYear: function(h, p, _) {
          var d = this.newDate(h, p, _);
          return d.add(4 - (d.dayOfWeek() || 7), "d"), Math.floor((d.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(h, p) {
          var _ = this._validate(h, p, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[_.month() - 1] + (_.month() === 2 && this.leapYear(_.year()) ? 1 : 0);
        }, weekDay: function(h, p, _) {
          return (this.dayOfWeek(h, p, _) || 7) < 6;
        }, toJD: function(h, p, _) {
          var d = this._validate(h, p, _, l.local.invalidDate);
          return h = d.year(), p = d.month(), _ = d.day(), h < 0 && h++, p <= 2 && (h--, p += 12), Math.floor(365.25 * (h + 4716)) + Math.floor(30.6001 * (p + 1)) + _ - 1524.5;
        }, fromJD: function(h) {
          var p = Math.floor(h + 0.5) + 1524, _ = Math.floor((p - 122.1) / 365.25), d = Math.floor(365.25 * _), f = Math.floor((p - d) / 30.6001), c = f - Math.floor(f < 14 ? 1 : 13), g = _ - Math.floor(c > 2 ? 4716 : 4715), m = p - d - Math.floor(30.6001 * f);
          return g <= 0 && g--, this.newDate(g, c, m);
        } }), l.calendars.julian = i;
      }, 62324: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(_) {
          this.local = this.regionalOptions[_ || ""] || this.regionalOptions[""];
        }
        function h(_, d) {
          return _ - d * Math.floor(_ / d);
        }
        function p(_, d) {
          return h(_ - 1, d) + 1;
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Mayan", jdEpoch: 584282.5, hasYearZero: !0, minMonth: 0, firstMonth: 0, minDay: 0, regionalOptions: { "": { name: "Mayan", epochs: ["", ""], monthNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"], monthNamesShort: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17"], dayNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], dayNamesShort: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], dayNamesMin: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"], digits: null, dateFormat: "YYYY.m.d", firstDay: 0, isRTL: !1, haabMonths: ["Pop", "Uo", "Zip", "Zotz", "Tzec", "Xul", "Yaxkin", "Mol", "Chen", "Yax", "Zac", "Ceh", "Mac", "Kankin", "Muan", "Pax", "Kayab", "Cumku", "Uayeb"], tzolkinMonths: ["Imix", "Ik", "Akbal", "Kan", "Chicchan", "Cimi", "Manik", "Lamat", "Muluc", "Oc", "Chuen", "Eb", "Ben", "Ix", "Men", "Cib", "Caban", "Etznab", "Cauac", "Ahau"] } }, leapYear: function(_) {
          return this._validate(_, this.minMonth, this.minDay, l.local.invalidYear), !1;
        }, formatYear: function(_) {
          _ = this._validate(_, this.minMonth, this.minDay, l.local.invalidYear).year();
          var d = Math.floor(_ / 400);
          return _ %= 400, _ += _ < 0 ? 400 : 0, d + "." + Math.floor(_ / 20) + "." + _ % 20;
        }, forYear: function(_) {
          if ((_ = _.split(".")).length < 3) throw "Invalid Mayan year";
          for (var d = 0, f = 0; f < _.length; f++) {
            var c = parseInt(_[f], 10);
            if (Math.abs(c) > 19 || f > 0 && c < 0) throw "Invalid Mayan year";
            d = 20 * d + c;
          }
          return d;
        }, monthsInYear: function(_) {
          return this._validate(_, this.minMonth, this.minDay, l.local.invalidYear), 18;
        }, weekOfYear: function(_, d, f) {
          return this._validate(_, d, f, l.local.invalidDate), 0;
        }, daysInYear: function(_) {
          return this._validate(_, this.minMonth, this.minDay, l.local.invalidYear), 360;
        }, daysInMonth: function(_, d) {
          return this._validate(_, d, this.minDay, l.local.invalidMonth), 20;
        }, daysInWeek: function() {
          return 5;
        }, dayOfWeek: function(_, d, f) {
          return this._validate(_, d, f, l.local.invalidDate).day();
        }, weekDay: function(_, d, f) {
          return this._validate(_, d, f, l.local.invalidDate), !0;
        }, extraInfo: function(_, d, f) {
          var c = this._validate(_, d, f, l.local.invalidDate).toJD(), g = this._toHaab(c), m = this._toTzolkin(c);
          return { haabMonthName: this.local.haabMonths[g[0] - 1], haabMonth: g[0], haabDay: g[1], tzolkinDayName: this.local.tzolkinMonths[m[0] - 1], tzolkinDay: m[0], tzolkinTrecena: m[1] };
        }, _toHaab: function(_) {
          var d = h(8 + (_ -= this.jdEpoch) + 340, 365);
          return [Math.floor(d / 20) + 1, h(d, 20)];
        }, _toTzolkin: function(_) {
          return [p(20 + (_ -= this.jdEpoch), 20), p(_ + 4, 13)];
        }, toJD: function(_, d, f) {
          var c = this._validate(_, d, f, l.local.invalidDate);
          return c.day() + 20 * c.month() + 360 * c.year() + this.jdEpoch;
        }, fromJD: function(_) {
          _ = Math.floor(_) + 0.5 - this.jdEpoch;
          var d = Math.floor(_ / 360);
          _ %= 360, _ += _ < 0 ? 360 : 0;
          var f = Math.floor(_ / 20), c = _ % 20;
          return this.newDate(d, f, c);
        } }), l.calendars.mayan = i;
      }, 91662: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar();
        var h = l.instance("gregorian");
        u(i.prototype, { name: "Nanakshahi", jdEpoch: 22576735e-1, daysPerMonth: [31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 30, 30], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Nanakshahi", epochs: ["BN", "AN"], monthNames: ["Chet", "Vaisakh", "Jeth", "Harh", "Sawan", "Bhadon", "Assu", "Katak", "Maghar", "Poh", "Magh", "Phagun"], monthNamesShort: ["Che", "Vai", "Jet", "Har", "Saw", "Bha", "Ass", "Kat", "Mgr", "Poh", "Mgh", "Pha"], dayNames: ["Somvaar", "Mangalvar", "Budhvaar", "Veervaar", "Shukarvaar", "Sanicharvaar", "Etvaar"], dayNamesShort: ["Som", "Mangal", "Budh", "Veer", "Shukar", "Sanichar", "Et"], dayNamesMin: ["So", "Ma", "Bu", "Ve", "Sh", "Sa", "Et"], digits: null, dateFormat: "dd-mm-yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear || l.regionalOptions[""].invalidYear);
          return h.leapYear(_.year() + (_.year() < 1 ? 1 : 0) + 1469);
        }, weekOfYear: function(p, _, d) {
          var f = this.newDate(p, _, d);
          return f.add(1 - (f.dayOfWeek() || 7), "d"), Math.floor((f.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(p, _) {
          var d = this._validate(p, _, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[d.month() - 1] + (d.month() === 12 && this.leapYear(d.year()) ? 1 : 0);
        }, weekDay: function(p, _, d) {
          return (this.dayOfWeek(p, _, d) || 7) < 6;
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidMonth);
          (p = f.year()) < 0 && p++;
          for (var c = f.day(), g = 1; g < f.month(); g++) c += this.daysPerMonth[g - 1];
          return c + h.toJD(p + 1468, 3, 13);
        }, fromJD: function(p) {
          p = Math.floor(p + 0.5);
          for (var _ = Math.floor((p - (this.jdEpoch - 1)) / 366); p >= this.toJD(_ + 1, 1, 1); ) _++;
          for (var d = p - Math.floor(this.toJD(_, 1, 1) + 0.5) + 1, f = 1; d > this.daysInMonth(_, f); ) d -= this.daysInMonth(_, f), f++;
          return this.newDate(_, f, d);
        } }), l.calendars.nanakshahi = i;
      }, 66445: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(h) {
          this.local = this.regionalOptions[h || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Nepali", jdEpoch: 17007095e-1, daysPerMonth: [31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, daysPerYear: 365, regionalOptions: { "": { name: "Nepali", epochs: ["BBS", "ABS"], monthNames: ["Baisakh", "Jestha", "Ashadh", "Shrawan", "Bhadra", "Ashwin", "Kartik", "Mangsir", "Paush", "Mangh", "Falgun", "Chaitra"], monthNamesShort: ["Bai", "Je", "As", "Shra", "Bha", "Ash", "Kar", "Mang", "Pau", "Ma", "Fal", "Chai"], dayNames: ["Aaitabaar", "Sombaar", "Manglbaar", "Budhabaar", "Bihibaar", "Shukrabaar", "Shanibaar"], dayNamesShort: ["Aaita", "Som", "Mangl", "Budha", "Bihi", "Shukra", "Shani"], dayNamesMin: ["Aai", "So", "Man", "Bu", "Bi", "Shu", "Sha"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 1, isRTL: !1 } }, leapYear: function(h) {
          return this.daysInYear(h) !== this.daysPerYear;
        }, weekOfYear: function(h, p, _) {
          var d = this.newDate(h, p, _);
          return d.add(-d.dayOfWeek(), "d"), Math.floor((d.dayOfYear() - 1) / 7) + 1;
        }, daysInYear: function(h) {
          if (h = this._validate(h, this.minMonth, this.minDay, l.local.invalidYear).year(), this.NEPALI_CALENDAR_DATA[h] === void 0) return this.daysPerYear;
          for (var p = 0, _ = this.minMonth; _ <= 12; _++) p += this.NEPALI_CALENDAR_DATA[h][_];
          return p;
        }, daysInMonth: function(h, p) {
          return h.year && (p = h.month(), h = h.year()), this._validate(h, p, this.minDay, l.local.invalidMonth), this.NEPALI_CALENDAR_DATA[h] === void 0 ? this.daysPerMonth[p - 1] : this.NEPALI_CALENDAR_DATA[h][p];
        }, weekDay: function(h, p, _) {
          return this.dayOfWeek(h, p, _) !== 6;
        }, toJD: function(h, p, _) {
          var d = this._validate(h, p, _, l.local.invalidDate);
          h = d.year(), p = d.month(), _ = d.day();
          var f = l.instance(), c = 0, g = p, m = h;
          this._createMissingCalendarData(h);
          var x = h - (g > 9 || g === 9 && _ >= this.NEPALI_CALENDAR_DATA[m][0] ? 56 : 57);
          for (p !== 9 && (c = _, g--); g !== 9; ) g <= 0 && (g = 12, m--), c += this.NEPALI_CALENDAR_DATA[m][g], g--;
          return p === 9 ? (c += _ - this.NEPALI_CALENDAR_DATA[m][0]) < 0 && (c += f.daysInYear(x)) : c += this.NEPALI_CALENDAR_DATA[m][9] - this.NEPALI_CALENDAR_DATA[m][0], f.newDate(x, 1, 1).add(c, "d").toJD();
        }, fromJD: function(h) {
          var p = l.instance().fromJD(h), _ = p.year(), d = p.dayOfYear(), f = _ + 56;
          this._createMissingCalendarData(f);
          for (var c = 9, g = this.NEPALI_CALENDAR_DATA[f][0], m = this.NEPALI_CALENDAR_DATA[f][c] - g + 1; d > m; ) ++c > 12 && (c = 1, f++), m += this.NEPALI_CALENDAR_DATA[f][c];
          var x = this.NEPALI_CALENDAR_DATA[f][c] - (m - d);
          return this.newDate(f, c, x);
        }, _createMissingCalendarData: function(h) {
          var p = this.daysPerMonth.slice(0);
          p.unshift(17);
          for (var _ = h - 1; _ < h + 2; _++) this.NEPALI_CALENDAR_DATA[_] === void 0 && (this.NEPALI_CALENDAR_DATA[_] = p);
        }, NEPALI_CALENDAR_DATA: { 1970: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1971: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 1972: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 1973: [19, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1974: [19, 31, 31, 32, 30, 31, 31, 30, 29, 30, 29, 30, 30], 1975: [18, 31, 31, 32, 32, 30, 31, 30, 29, 30, 29, 30, 30], 1976: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1977: [18, 31, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], 1978: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1979: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1980: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1981: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 1982: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1983: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1984: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1985: [18, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 1986: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1987: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1988: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 1989: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 1990: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1991: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 1992: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1993: [18, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 1994: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1995: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 1996: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 1997: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1998: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 1999: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2e3: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2001: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2002: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2003: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2004: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2005: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2006: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2007: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2008: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2009: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2010: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2011: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2012: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2013: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2014: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2015: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2016: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2017: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2018: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2019: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2020: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2021: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2022: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2023: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2024: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2025: [18, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2026: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2027: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2028: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2029: [18, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 2030: [17, 31, 32, 31, 32, 31, 30, 30, 30, 30, 30, 30, 31], 2031: [17, 31, 32, 31, 32, 31, 31, 31, 31, 31, 31, 31, 31], 2032: [17, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32], 2033: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2034: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2035: [17, 30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2036: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2037: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2038: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2039: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2040: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2041: [18, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2042: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2043: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2044: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2045: [18, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2046: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2047: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2048: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2049: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2050: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2051: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2052: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2053: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2054: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2055: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 29, 30], 2056: [17, 31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 2057: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2058: [17, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2059: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2060: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2061: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2062: [17, 30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], 2063: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2064: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2065: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2066: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 2067: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2068: [17, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2069: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2070: [17, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 2071: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2072: [17, 31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2073: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 2074: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2075: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2076: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2077: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 2078: [17, 31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 2079: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 2080: [16, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 2081: [17, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2082: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2083: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2084: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2085: [17, 31, 32, 31, 32, 31, 31, 30, 30, 29, 30, 30, 30], 2086: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2087: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], 2088: [16, 30, 31, 32, 32, 30, 31, 30, 30, 29, 30, 30, 30], 2089: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2090: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2091: [16, 31, 31, 32, 31, 31, 31, 30, 30, 29, 30, 30, 30], 2092: [16, 31, 31, 32, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2093: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2094: [17, 31, 31, 32, 31, 31, 30, 30, 30, 29, 30, 30, 30], 2095: [17, 31, 31, 32, 31, 31, 31, 30, 29, 30, 30, 30, 30], 2096: [17, 30, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 2097: [17, 31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 30, 30], 2098: [17, 31, 31, 32, 31, 31, 31, 29, 30, 29, 30, 30, 31], 2099: [17, 31, 31, 32, 31, 31, 31, 30, 29, 29, 30, 30, 30], 2100: [17, 31, 32, 31, 32, 30, 31, 30, 29, 30, 29, 30, 30] } }), l.calendars.nepali = i;
      }, 50506: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        function h(p, _) {
          return p - _ * Math.floor(p / _);
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "Persian", jdEpoch: 19483205e-1, daysPerMonth: [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Persian", epochs: ["BP", "AP"], monthNames: ["Farvardin", "Ordibehesht", "Khordad", "Tir", "Mordad", "Shahrivar", "Mehr", "Aban", "Azar", "Day", "Bahman", "Esfand"], monthNamesShort: ["Far", "Ord", "Kho", "Tir", "Mor", "Sha", "Meh", "Aba", "Aza", "Day", "Bah", "Esf"], dayNames: ["Yekshambe", "Doshambe", "Seshambe", "Chæharshambe", "Panjshambe", "Jom'e", "Shambe"], dayNamesShort: ["Yek", "Do", "Se", "Chæ", "Panj", "Jom", "Sha"], dayNamesMin: ["Ye", "Do", "Se", "Ch", "Pa", "Jo", "Sh"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !1 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return 682 * ((_.year() - (_.year() > 0 ? 474 : 473)) % 2820 + 474 + 38) % 2816 < 682;
        }, weekOfYear: function(p, _, d) {
          var f = this.newDate(p, _, d);
          return f.add(-(f.dayOfWeek() + 1) % 7, "d"), Math.floor((f.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(p, _) {
          var d = this._validate(p, _, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[d.month() - 1] + (d.month() === 12 && this.leapYear(d.year()) ? 1 : 0);
        }, weekDay: function(p, _, d) {
          return this.dayOfWeek(p, _, d) !== 5;
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          p = f.year(), _ = f.month(), d = f.day();
          var c = p - (p >= 0 ? 474 : 473), g = 474 + h(c, 2820);
          return d + (_ <= 7 ? 31 * (_ - 1) : 30 * (_ - 1) + 6) + Math.floor((682 * g - 110) / 2816) + 365 * (g - 1) + 1029983 * Math.floor(c / 2820) + this.jdEpoch - 1;
        }, fromJD: function(p) {
          var _ = (p = Math.floor(p) + 0.5) - this.toJD(475, 1, 1), d = Math.floor(_ / 1029983), f = h(_, 1029983), c = 2820;
          if (f !== 1029982) {
            var g = Math.floor(f / 366), m = h(f, 366);
            c = Math.floor((2134 * g + 2816 * m + 2815) / 1028522) + g + 1;
          }
          var x = c + 2820 * d + 474;
          x = x <= 0 ? x - 1 : x;
          var w = p - this.toJD(x, 1, 1) + 1, k = w <= 186 ? Math.ceil(w / 31) : Math.ceil((w - 6) / 30), S = p - this.toJD(x, k, 1) + 1;
          return this.newDate(x, k, S);
        } }), l.calendars.persian = i, l.calendars.jalali = i;
      }, 84756: function(o, s, n) {
        var l = n(24453), u = n(27976), i = l.instance();
        function h(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        h.prototype = new l.baseCalendar(), u(h.prototype, { name: "Taiwan", jdEpoch: 24194025e-1, yearsOffset: 1911, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Taiwan", epochs: ["BROC", "ROC"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 1, isRTL: !1 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return p = this._t2gYear(_.year()), i.leapYear(p);
        }, weekOfYear: function(p, _, d) {
          var f = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return p = this._t2gYear(f.year()), i.weekOfYear(p, f.month(), f.day());
        }, daysInMonth: function(p, _) {
          var d = this._validate(p, _, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[d.month() - 1] + (d.month() === 2 && this.leapYear(d.year()) ? 1 : 0);
        }, weekDay: function(p, _, d) {
          return (this.dayOfWeek(p, _, d) || 7) < 6;
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          return p = this._t2gYear(f.year()), i.toJD(p, f.month(), f.day());
        }, fromJD: function(p) {
          var _ = i.fromJD(p), d = this._g2tYear(_.year());
          return this.newDate(d, _.month(), _.day());
        }, _t2gYear: function(p) {
          return p + this.yearsOffset + (p >= -this.yearsOffset && p <= -1 ? 1 : 0);
        }, _g2tYear: function(p) {
          return p - this.yearsOffset - (p >= 1 && p <= this.yearsOffset ? 1 : 0);
        } }), l.calendars.taiwan = h;
      }, 41858: function(o, s, n) {
        var l = n(24453), u = n(27976), i = l.instance();
        function h(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        h.prototype = new l.baseCalendar(), u(h.prototype, { name: "Thai", jdEpoch: 15230985e-1, yearsOffset: 543, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Thai", epochs: ["BBE", "BE"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "dd/mm/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return p = this._t2gYear(_.year()), i.leapYear(p);
        }, weekOfYear: function(p, _, d) {
          var f = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return p = this._t2gYear(f.year()), i.weekOfYear(p, f.month(), f.day());
        }, daysInMonth: function(p, _) {
          var d = this._validate(p, _, this.minDay, l.local.invalidMonth);
          return this.daysPerMonth[d.month() - 1] + (d.month() === 2 && this.leapYear(d.year()) ? 1 : 0);
        }, weekDay: function(p, _, d) {
          return (this.dayOfWeek(p, _, d) || 7) < 6;
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate);
          return p = this._t2gYear(f.year()), i.toJD(p, f.month(), f.day());
        }, fromJD: function(p) {
          var _ = i.fromJD(p), d = this._g2tYear(_.year());
          return this.newDate(d, _.month(), _.day());
        }, _t2gYear: function(p) {
          return p - this.yearsOffset - (p >= 1 && p <= this.yearsOffset ? 1 : 0);
        }, _g2tYear: function(p) {
          return p + this.yearsOffset + (p >= -this.yearsOffset && p <= -1 ? 1 : 0);
        } }), l.calendars.thai = h;
      }, 57985: function(o, s, n) {
        var l = n(24453), u = n(27976);
        function i(p) {
          this.local = this.regionalOptions[p || ""] || this.regionalOptions[""];
        }
        i.prototype = new l.baseCalendar(), u(i.prototype, { name: "UmmAlQura", hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Umm al-Qura", epochs: ["BH", "AH"], monthNames: ["Al-Muharram", "Safar", "Rabi' al-awwal", "Rabi' Al-Thani", "Jumada Al-Awwal", "Jumada Al-Thani", "Rajab", "Sha'aban", "Ramadan", "Shawwal", "Dhu al-Qi'dah", "Dhu al-Hijjah"], monthNamesShort: ["Muh", "Saf", "Rab1", "Rab2", "Jum1", "Jum2", "Raj", "Sha'", "Ram", "Shaw", "DhuQ", "DhuH"], dayNames: ["Yawm al-Ahad", "Yawm al-Ithnain", "Yawm al-Thalāthā’", "Yawm al-Arba‘ā’", "Yawm al-Khamīs", "Yawm al-Jum‘a", "Yawm al-Sabt"], dayNamesMin: ["Ah", "Ith", "Th", "Ar", "Kh", "Ju", "Sa"], digits: null, dateFormat: "yyyy/mm/dd", firstDay: 6, isRTL: !0 } }, leapYear: function(p) {
          var _ = this._validate(p, this.minMonth, this.minDay, l.local.invalidYear);
          return this.daysInYear(_.year()) === 355;
        }, weekOfYear: function(p, _, d) {
          var f = this.newDate(p, _, d);
          return f.add(-f.dayOfWeek(), "d"), Math.floor((f.dayOfYear() - 1) / 7) + 1;
        }, daysInYear: function(p) {
          for (var _ = 0, d = 1; d <= 12; d++) _ += this.daysInMonth(p, d);
          return _;
        }, daysInMonth: function(p, _) {
          for (var d = this._validate(p, _, this.minDay, l.local.invalidMonth).toJD() - 24e5 + 0.5, f = 0, c = 0; c < h.length; c++) {
            if (h[c] > d) return h[f] - h[f - 1];
            f++;
          }
          return 30;
        }, weekDay: function(p, _, d) {
          return this.dayOfWeek(p, _, d) !== 5;
        }, toJD: function(p, _, d) {
          var f = this._validate(p, _, d, l.local.invalidDate), c = 12 * (f.year() - 1) + f.month() - 15292;
          return f.day() + h[c - 1] - 1 + 24e5 - 0.5;
        }, fromJD: function(p) {
          for (var _ = p - 24e5 + 0.5, d = 0, f = 0; f < h.length && !(h[f] > _); f++) d++;
          var c = d + 15292, g = Math.floor((c - 1) / 12), m = g + 1, x = c - 12 * g, w = _ - h[d - 1] + 1;
          return this.newDate(m, x, w);
        }, isValid: function(p, _, d) {
          var f = l.baseCalendar.prototype.isValid.apply(this, arguments);
          return f && (f = (p = p.year != null ? p.year : p) >= 1276 && p <= 1500), f;
        }, _validate: function(p, _, d, f) {
          var c = l.baseCalendar.prototype._validate.apply(this, arguments);
          if (c.year < 1276 || c.year > 1500) throw f.replace(/\{0\}/, this.local.name);
          return c;
        } }), l.calendars.ummalqura = i;
        var h = [20, 50, 79, 109, 138, 168, 197, 227, 256, 286, 315, 345, 374, 404, 433, 463, 492, 522, 551, 581, 611, 641, 670, 700, 729, 759, 788, 818, 847, 877, 906, 936, 965, 995, 1024, 1054, 1083, 1113, 1142, 1172, 1201, 1231, 1260, 1290, 1320, 1350, 1379, 1409, 1438, 1468, 1497, 1527, 1556, 1586, 1615, 1645, 1674, 1704, 1733, 1763, 1792, 1822, 1851, 1881, 1910, 1940, 1969, 1999, 2028, 2058, 2087, 2117, 2146, 2176, 2205, 2235, 2264, 2294, 2323, 2353, 2383, 2413, 2442, 2472, 2501, 2531, 2560, 2590, 2619, 2649, 2678, 2708, 2737, 2767, 2796, 2826, 2855, 2885, 2914, 2944, 2973, 3003, 3032, 3062, 3091, 3121, 3150, 3180, 3209, 3239, 3268, 3298, 3327, 3357, 3386, 3416, 3446, 3476, 3505, 3535, 3564, 3594, 3623, 3653, 3682, 3712, 3741, 3771, 3800, 3830, 3859, 3889, 3918, 3948, 3977, 4007, 4036, 4066, 4095, 4125, 4155, 4185, 4214, 4244, 4273, 4303, 4332, 4362, 4391, 4421, 4450, 4480, 4509, 4539, 4568, 4598, 4627, 4657, 4686, 4716, 4745, 4775, 4804, 4834, 4863, 4893, 4922, 4952, 4981, 5011, 5040, 5070, 5099, 5129, 5158, 5188, 5218, 5248, 5277, 5307, 5336, 5366, 5395, 5425, 5454, 5484, 5513, 5543, 5572, 5602, 5631, 5661, 5690, 5720, 5749, 5779, 5808, 5838, 5867, 5897, 5926, 5956, 5985, 6015, 6044, 6074, 6103, 6133, 6162, 6192, 6221, 6251, 6281, 6311, 6340, 6370, 6399, 6429, 6458, 6488, 6517, 6547, 6576, 6606, 6635, 6665, 6694, 6724, 6753, 6783, 6812, 6842, 6871, 6901, 6930, 6960, 6989, 7019, 7048, 7078, 7107, 7137, 7166, 7196, 7225, 7255, 7284, 7314, 7344, 7374, 7403, 7433, 7462, 7492, 7521, 7551, 7580, 7610, 7639, 7669, 7698, 7728, 7757, 7787, 7816, 7846, 7875, 7905, 7934, 7964, 7993, 8023, 8053, 8083, 8112, 8142, 8171, 8201, 8230, 8260, 8289, 8319, 8348, 8378, 8407, 8437, 8466, 8496, 8525, 8555, 8584, 8614, 8643, 8673, 8702, 8732, 8761, 8791, 8821, 8850, 8880, 8909, 8938, 8968, 8997, 9027, 9056, 9086, 9115, 9145, 9175, 9205, 9234, 9264, 9293, 9322, 9352, 9381, 9410, 9440, 9470, 9499, 9529, 9559, 9589, 9618, 9648, 9677, 9706, 9736, 9765, 9794, 9824, 9853, 9883, 9913, 9943, 9972, 10002, 10032, 10061, 10090, 10120, 10149, 10178, 10208, 10237, 10267, 10297, 10326, 10356, 10386, 10415, 10445, 10474, 10504, 10533, 10562, 10592, 10621, 10651, 10680, 10710, 10740, 10770, 10799, 10829, 10858, 10888, 10917, 10947, 10976, 11005, 11035, 11064, 11094, 11124, 11153, 11183, 11213, 11242, 11272, 11301, 11331, 11360, 11389, 11419, 11448, 11478, 11507, 11537, 11567, 11596, 11626, 11655, 11685, 11715, 11744, 11774, 11803, 11832, 11862, 11891, 11921, 11950, 11980, 12010, 12039, 12069, 12099, 12128, 12158, 12187, 12216, 12246, 12275, 12304, 12334, 12364, 12393, 12423, 12453, 12483, 12512, 12542, 12571, 12600, 12630, 12659, 12688, 12718, 12747, 12777, 12807, 12837, 12866, 12896, 12926, 12955, 12984, 13014, 13043, 13072, 13102, 13131, 13161, 13191, 13220, 13250, 13280, 13310, 13339, 13368, 13398, 13427, 13456, 13486, 13515, 13545, 13574, 13604, 13634, 13664, 13693, 13723, 13752, 13782, 13811, 13840, 13870, 13899, 13929, 13958, 13988, 14018, 14047, 14077, 14107, 14136, 14166, 14195, 14224, 14254, 14283, 14313, 14342, 14372, 14401, 14431, 14461, 14490, 14520, 14550, 14579, 14609, 14638, 14667, 14697, 14726, 14756, 14785, 14815, 14844, 14874, 14904, 14933, 14963, 14993, 15021, 15051, 15081, 15110, 15140, 15169, 15199, 15228, 15258, 15287, 15317, 15347, 15377, 15406, 15436, 15465, 15494, 15524, 15553, 15582, 15612, 15641, 15671, 15701, 15731, 15760, 15790, 15820, 15849, 15878, 15908, 15937, 15966, 15996, 16025, 16055, 16085, 16114, 16144, 16174, 16204, 16233, 16262, 16292, 16321, 16350, 16380, 16409, 16439, 16468, 16498, 16528, 16558, 16587, 16617, 16646, 16676, 16705, 16734, 16764, 16793, 16823, 16852, 16882, 16912, 16941, 16971, 17001, 17030, 17060, 17089, 17118, 17148, 17177, 17207, 17236, 17266, 17295, 17325, 17355, 17384, 17414, 17444, 17473, 17502, 17532, 17561, 17591, 17620, 17650, 17679, 17709, 17738, 17768, 17798, 17827, 17857, 17886, 17916, 17945, 17975, 18004, 18034, 18063, 18093, 18122, 18152, 18181, 18211, 18241, 18270, 18300, 18330, 18359, 18388, 18418, 18447, 18476, 18506, 18535, 18565, 18595, 18625, 18654, 18684, 18714, 18743, 18772, 18802, 18831, 18860, 18890, 18919, 18949, 18979, 19008, 19038, 19068, 19098, 19127, 19156, 19186, 19215, 19244, 19274, 19303, 19333, 19362, 19392, 19422, 19452, 19481, 19511, 19540, 19570, 19599, 19628, 19658, 19687, 19717, 19746, 19776, 19806, 19836, 19865, 19895, 19924, 19954, 19983, 20012, 20042, 20071, 20101, 20130, 20160, 20190, 20219, 20249, 20279, 20308, 20338, 20367, 20396, 20426, 20455, 20485, 20514, 20544, 20573, 20603, 20633, 20662, 20692, 20721, 20751, 20780, 20810, 20839, 20869, 20898, 20928, 20957, 20987, 21016, 21046, 21076, 21105, 21135, 21164, 21194, 21223, 21253, 21282, 21312, 21341, 21371, 21400, 21430, 21459, 21489, 21519, 21548, 21578, 21607, 21637, 21666, 21696, 21725, 21754, 21784, 21813, 21843, 21873, 21902, 21932, 21962, 21991, 22021, 22050, 22080, 22109, 22138, 22168, 22197, 22227, 22256, 22286, 22316, 22346, 22375, 22405, 22434, 22464, 22493, 22522, 22552, 22581, 22611, 22640, 22670, 22700, 22730, 22759, 22789, 22818, 22848, 22877, 22906, 22936, 22965, 22994, 23024, 23054, 23083, 23113, 23143, 23173, 23202, 23232, 23261, 23290, 23320, 23349, 23379, 23408, 23438, 23467, 23497, 23527, 23556, 23586, 23616, 23645, 23674, 23704, 23733, 23763, 23792, 23822, 23851, 23881, 23910, 23940, 23970, 23999, 24029, 24058, 24088, 24117, 24147, 24176, 24206, 24235, 24265, 24294, 24324, 24353, 24383, 24413, 24442, 24472, 24501, 24531, 24560, 24590, 24619, 24648, 24678, 24707, 24737, 24767, 24796, 24826, 24856, 24885, 24915, 24944, 24974, 25003, 25032, 25062, 25091, 25121, 25150, 25180, 25210, 25240, 25269, 25299, 25328, 25358, 25387, 25416, 25446, 25475, 25505, 25534, 25564, 25594, 25624, 25653, 25683, 25712, 25742, 25771, 25800, 25830, 25859, 25888, 25918, 25948, 25977, 26007, 26037, 26067, 26096, 26126, 26155, 26184, 26214, 26243, 26272, 26302, 26332, 26361, 26391, 26421, 26451, 26480, 26510, 26539, 26568, 26598, 26627, 26656, 26686, 26715, 26745, 26775, 26805, 26834, 26864, 26893, 26923, 26952, 26982, 27011, 27041, 27070, 27099, 27129, 27159, 27188, 27218, 27248, 27277, 27307, 27336, 27366, 27395, 27425, 27454, 27484, 27513, 27542, 27572, 27602, 27631, 27661, 27691, 27720, 27750, 27779, 27809, 27838, 27868, 27897, 27926, 27956, 27985, 28015, 28045, 28074, 28104, 28134, 28163, 28193, 28222, 28252, 28281, 28310, 28340, 28369, 28399, 28428, 28458, 28488, 28517, 28547, 28577, 28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, 29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, 29788, 29818, 29847, 29876, 29906, 29935, 29964, 29994, 30023, 30053, 30082, 30112, 30141, 30171, 30200, 30230, 30259, 30289, 30318, 30348, 30378, 30408, 30437, 30467, 30496, 30526, 30555, 30585, 30614, 30644, 30673, 30703, 30732, 30762, 30791, 30821, 30850, 30880, 30909, 30939, 30968, 30998, 31027, 31057, 31086, 31116, 31145, 31175, 31204, 31234, 31263, 31293, 31322, 31352, 31381, 31411, 31441, 31471, 31500, 31530, 31559, 31589, 31618, 31648, 31676, 31706, 31736, 31766, 31795, 31825, 31854, 31884, 31913, 31943, 31972, 32002, 32031, 32061, 32090, 32120, 32150, 32180, 32209, 32239, 32268, 32298, 32327, 32357, 32386, 32416, 32445, 32475, 32504, 32534, 32563, 32593, 32622, 32652, 32681, 32711, 32740, 32770, 32799, 32829, 32858, 32888, 32917, 32947, 32976, 33006, 33035, 33065, 33094, 33124, 33153, 33183, 33213, 33243, 33272, 33302, 33331, 33361, 33390, 33420, 33450, 33479, 33509, 33539, 33568, 33598, 33627, 33657, 33686, 33716, 33745, 33775, 33804, 33834, 33863, 33893, 33922, 33952, 33981, 34011, 34040, 34069, 34099, 34128, 34158, 34187, 34217, 34247, 34277, 34306, 34336, 34365, 34395, 34424, 34454, 34483, 34512, 34542, 34571, 34601, 34631, 34660, 34690, 34719, 34749, 34778, 34808, 34837, 34867, 34896, 34926, 34955, 34985, 35015, 35044, 35074, 35103, 35133, 35162, 35192, 35222, 35251, 35280, 35310, 35340, 35370, 35399, 35429, 35458, 35488, 35517, 35547, 35576, 35605, 35635, 35665, 35694, 35723, 35753, 35782, 35811, 35841, 35871, 35901, 35930, 35960, 35989, 36019, 36048, 36078, 36107, 36136, 36166, 36195, 36225, 36254, 36284, 36314, 36343, 36373, 36403, 36433, 36462, 36492, 36521, 36551, 36580, 36610, 36639, 36669, 36698, 36728, 36757, 36786, 36816, 36845, 36875, 36904, 36934, 36963, 36993, 37022, 37052, 37081, 37111, 37141, 37170, 37200, 37229, 37259, 37288, 37318, 37347, 37377, 37406, 37436, 37465, 37495, 37524, 37554, 37584, 37613, 37643, 37672, 37701, 37731, 37760, 37790, 37819, 37849, 37878, 37908, 37938, 37967, 37997, 38027, 38056, 38085, 38115, 38144, 38174, 38203, 38233, 38262, 38292, 38322, 38351, 38381, 38410, 38440, 38469, 38499, 38528, 38558, 38587, 38617, 38646, 38676, 38705, 38735, 38764, 38794, 38823, 38853, 38882, 38912, 38941, 38971, 39001, 39030, 39059, 39089, 39118, 39148, 39178, 39208, 39237, 39267, 39297, 39326, 39355, 39385, 39414, 39444, 39473, 39503, 39532, 39562, 39592, 39621, 39650, 39680, 39709, 39739, 39768, 39798, 39827, 39857, 39886, 39916, 39946, 39975, 40005, 40035, 40064, 40094, 40123, 40153, 40182, 40212, 40241, 40271, 40300, 40330, 40359, 40389, 40418, 40448, 40477, 40507, 40536, 40566, 40595, 40625, 40655, 40685, 40714, 40744, 40773, 40803, 40832, 40862, 40892, 40921, 40951, 40980, 41009, 41039, 41068, 41098, 41127, 41157, 41186, 41216, 41245, 41275, 41304, 41334, 41364, 41393, 41422, 41452, 41481, 41511, 41540, 41570, 41599, 41629, 41658, 41688, 41718, 41748, 41777, 41807, 41836, 41865, 41894, 41924, 41953, 41983, 42012, 42042, 42072, 42102, 42131, 42161, 42190, 42220, 42249, 42279, 42308, 42337, 42367, 42397, 42426, 42456, 42485, 42515, 42545, 42574, 42604, 42633, 42662, 42692, 42721, 42751, 42780, 42810, 42839, 42869, 42899, 42929, 42958, 42988, 43017, 43046, 43076, 43105, 43135, 43164, 43194, 43223, 43253, 43283, 43312, 43342, 43371, 43401, 43430, 43460, 43489, 43519, 43548, 43578, 43607, 43637, 43666, 43696, 43726, 43755, 43785, 43814, 43844, 43873, 43903, 43932, 43962, 43991, 44021, 44050, 44080, 44109, 44139, 44169, 44198, 44228, 44258, 44287, 44317, 44346, 44375, 44405, 44434, 44464, 44493, 44523, 44553, 44582, 44612, 44641, 44671, 44700, 44730, 44759, 44788, 44818, 44847, 44877, 44906, 44936, 44966, 44996, 45025, 45055, 45084, 45114, 45143, 45172, 45202, 45231, 45261, 45290, 45320, 45350, 45380, 45409, 45439, 45468, 45498, 45527, 45556, 45586, 45615, 45644, 45674, 45704, 45733, 45763, 45793, 45823, 45852, 45882, 45911, 45940, 45970, 45999, 46028, 46058, 46088, 46117, 46147, 46177, 46206, 46236, 46265, 46295, 46324, 46354, 46383, 46413, 46442, 46472, 46501, 46531, 46560, 46590, 46620, 46649, 46679, 46708, 46738, 46767, 46797, 46826, 46856, 46885, 46915, 46944, 46974, 47003, 47033, 47063, 47092, 47122, 47151, 47181, 47210, 47240, 47269, 47298, 47328, 47357, 47387, 47417, 47446, 47476, 47506, 47535, 47565, 47594, 47624, 47653, 47682, 47712, 47741, 47771, 47800, 47830, 47860, 47890, 47919, 47949, 47978, 48008, 48037, 48066, 48096, 48125, 48155, 48184, 48214, 48244, 48273, 48303, 48333, 48362, 48392, 48421, 48450, 48480, 48509, 48538, 48568, 48598, 48627, 48657, 48687, 48717, 48746, 48776, 48805, 48834, 48864, 48893, 48922, 48952, 48982, 49011, 49041, 49071, 49100, 49130, 49160, 49189, 49218, 49248, 49277, 49306, 49336, 49365, 49395, 49425, 49455, 49484, 49514, 49543, 49573, 49602, 49632, 49661, 49690, 49720, 49749, 49779, 49809, 49838, 49868, 49898, 49927, 49957, 49986, 50016, 50045, 50075, 50104, 50133, 50163, 50192, 50222, 50252, 50281, 50311, 50340, 50370, 50400, 50429, 50459, 50488, 50518, 50547, 50576, 50606, 50635, 50665, 50694, 50724, 50754, 50784, 50813, 50843, 50872, 50902, 50931, 50960, 50990, 51019, 51049, 51078, 51108, 51138, 51167, 51197, 51227, 51256, 51286, 51315, 51345, 51374, 51403, 51433, 51462, 51492, 51522, 51552, 51582, 51611, 51641, 51670, 51699, 51729, 51758, 51787, 51816, 51846, 51876, 51906, 51936, 51965, 51995, 52025, 52054, 52083, 52113, 52142, 52171, 52200, 52230, 52260, 52290, 52319, 52349, 52379, 52408, 52438, 52467, 52497, 52526, 52555, 52585, 52614, 52644, 52673, 52703, 52733, 52762, 52792, 52822, 52851, 52881, 52910, 52939, 52969, 52998, 53028, 53057, 53087, 53116, 53146, 53176, 53205, 53235, 53264, 53294, 53324, 53353, 53383, 53412, 53441, 53471, 53500, 53530, 53559, 53589, 53619, 53648, 53678, 53708, 53737, 53767, 53796, 53825, 53855, 53884, 53913, 53943, 53973, 54003, 54032, 54062, 54092, 54121, 54151, 54180, 54209, 54239, 54268, 54297, 54327, 54357, 54387, 54416, 54446, 54476, 54505, 54535, 54564, 54593, 54623, 54652, 54681, 54711, 54741, 54770, 54800, 54830, 54859, 54889, 54919, 54948, 54977, 55007, 55036, 55066, 55095, 55125, 55154, 55184, 55213, 55243, 55273, 55302, 55332, 55361, 55391, 55420, 55450, 55479, 55508, 55538, 55567, 55597, 55627, 55657, 55686, 55716, 55745, 55775, 55804, 55834, 55863, 55892, 55922, 55951, 55981, 56011, 56040, 56070, 56100, 56129, 56159, 56188, 56218, 56247, 56276, 56306, 56335, 56365, 56394, 56424, 56454, 56483, 56513, 56543, 56572, 56601, 56631, 56660, 56690, 56719, 56749, 56778, 56808, 56837, 56867, 56897, 56926, 56956, 56985, 57015, 57044, 57074, 57103, 57133, 57162, 57192, 57221, 57251, 57280, 57310, 57340, 57369, 57399, 57429, 57458, 57487, 57517, 57546, 57576, 57605, 57634, 57664, 57694, 57723, 57753, 57783, 57813, 57842, 57871, 57901, 57930, 57959, 57989, 58018, 58048, 58077, 58107, 58137, 58167, 58196, 58226, 58255, 58285, 58314, 58343, 58373, 58402, 58432, 58461, 58491, 58521, 58551, 58580, 58610, 58639, 58669, 58698, 58727, 58757, 58786, 58816, 58845, 58875, 58905, 58934, 58964, 58994, 59023, 59053, 59082, 59111, 59141, 59170, 59200, 59229, 59259, 59288, 59318, 59348, 59377, 59407, 59436, 59466, 59495, 59525, 59554, 59584, 59613, 59643, 59672, 59702, 59731, 59761, 59791, 59820, 59850, 59879, 59909, 59939, 59968, 59997, 60027, 60056, 60086, 60115, 60145, 60174, 60204, 60234, 60264, 60293, 60323, 60352, 60381, 60411, 60440, 60469, 60499, 60528, 60558, 60588, 60618, 60648, 60677, 60707, 60736, 60765, 60795, 60824, 60853, 60883, 60912, 60942, 60972, 61002, 61031, 61061, 61090, 61120, 61149, 61179, 61208, 61237, 61267, 61296, 61326, 61356, 61385, 61415, 61445, 61474, 61504, 61533, 61563, 61592, 61621, 61651, 61680, 61710, 61739, 61769, 61799, 61828, 61858, 61888, 61917, 61947, 61976, 62006, 62035, 62064, 62094, 62123, 62153, 62182, 62212, 62242, 62271, 62301, 62331, 62360, 62390, 62419, 62448, 62478, 62507, 62537, 62566, 62596, 62625, 62655, 62685, 62715, 62744, 62774, 62803, 62832, 62862, 62891, 62921, 62950, 62980, 63009, 63039, 63069, 63099, 63128, 63157, 63187, 63216, 63246, 63275, 63305, 63334, 63363, 63393, 63423, 63453, 63482, 63512, 63541, 63571, 63600, 63630, 63659, 63689, 63718, 63747, 63777, 63807, 63836, 63866, 63895, 63925, 63955, 63984, 64014, 64043, 64073, 64102, 64131, 64161, 64190, 64220, 64249, 64279, 64309, 64339, 64368, 64398, 64427, 64457, 64486, 64515, 64545, 64574, 64603, 64633, 64663, 64692, 64722, 64752, 64782, 64811, 64841, 64870, 64899, 64929, 64958, 64987, 65017, 65047, 65076, 65106, 65136, 65166, 65195, 65225, 65254, 65283, 65313, 65342, 65371, 65401, 65431, 65460, 65490, 65520, 65549, 65579, 65608, 65638, 65667, 65697, 65726, 65755, 65785, 65815, 65844, 65874, 65903, 65933, 65963, 65992, 66022, 66051, 66081, 66110, 66140, 66169, 66199, 66228, 66258, 66287, 66317, 66346, 66376, 66405, 66435, 66465, 66494, 66524, 66553, 66583, 66612, 66641, 66671, 66700, 66730, 66760, 66789, 66819, 66849, 66878, 66908, 66937, 66967, 66996, 67025, 67055, 67084, 67114, 67143, 67173, 67203, 67233, 67262, 67292, 67321, 67351, 67380, 67409, 67439, 67468, 67497, 67527, 67557, 67587, 67617, 67646, 67676, 67705, 67735, 67764, 67793, 67823, 67852, 67882, 67911, 67941, 67971, 68e3, 68030, 68060, 68089, 68119, 68148, 68177, 68207, 68236, 68266, 68295, 68325, 68354, 68384, 68414, 68443, 68473, 68502, 68532, 68561, 68591, 68620, 68650, 68679, 68708, 68738, 68768, 68797, 68827, 68857, 68886, 68916, 68946, 68975, 69004, 69034, 69063, 69092, 69122, 69152, 69181, 69211, 69240, 69270, 69300, 69330, 69359, 69388, 69418, 69447, 69476, 69506, 69535, 69565, 69595, 69624, 69654, 69684, 69713, 69743, 69772, 69802, 69831, 69861, 69890, 69919, 69949, 69978, 70008, 70038, 70067, 70097, 70126, 70156, 70186, 70215, 70245, 70274, 70303, 70333, 70362, 70392, 70421, 70451, 70481, 70510, 70540, 70570, 70599, 70629, 70658, 70687, 70717, 70746, 70776, 70805, 70835, 70864, 70894, 70924, 70954, 70983, 71013, 71042, 71071, 71101, 71130, 71159, 71189, 71218, 71248, 71278, 71308, 71337, 71367, 71397, 71426, 71455, 71485, 71514, 71543, 71573, 71602, 71632, 71662, 71691, 71721, 71751, 71781, 71810, 71839, 71869, 71898, 71927, 71957, 71986, 72016, 72046, 72075, 72105, 72135, 72164, 72194, 72223, 72253, 72282, 72311, 72341, 72370, 72400, 72429, 72459, 72489, 72518, 72548, 72577, 72607, 72637, 72666, 72695, 72725, 72754, 72784, 72813, 72843, 72872, 72902, 72931, 72961, 72991, 73020, 73050, 73080, 73109, 73139, 73168, 73197, 73227, 73256, 73286, 73315, 73345, 73375, 73404, 73434, 73464, 73493, 73523, 73552, 73581, 73611, 73640, 73669, 73699, 73729, 73758, 73788, 73818, 73848, 73877, 73907, 73936, 73965, 73995, 74024, 74053, 74083, 74113, 74142, 74172, 74202, 74231, 74261, 74291, 74320, 74349, 74379, 74408, 74437, 74467, 74497, 74526, 74556, 74586, 74615, 74645, 74675, 74704, 74733, 74763, 74792, 74822, 74851, 74881, 74910, 74940, 74969, 74999, 75029, 75058, 75088, 75117, 75147, 75176, 75206, 75235, 75264, 75294, 75323, 75353, 75383, 75412, 75442, 75472, 75501, 75531, 75560, 75590, 75619, 75648, 75678, 75707, 75737, 75766, 75796, 75826, 75856, 75885, 75915, 75944, 75974, 76003, 76032, 76062, 76091, 76121, 76150, 76180, 76210, 76239, 76269, 76299, 76328, 76358, 76387, 76416, 76446, 76475, 76505, 76534, 76564, 76593, 76623, 76653, 76682, 76712, 76741, 76771, 76801, 76830, 76859, 76889, 76918, 76948, 76977, 77007, 77036, 77066, 77096, 77125, 77155, 77185, 77214, 77243, 77273, 77302, 77332, 77361, 77390, 77420, 77450, 77479, 77509, 77539, 77569, 77598, 77627, 77657, 77686, 77715, 77745, 77774, 77804, 77833, 77863, 77893, 77923, 77952, 77982, 78011, 78041, 78070, 78099, 78129, 78158, 78188, 78217, 78247, 78277, 78307, 78336, 78366, 78395, 78425, 78454, 78483, 78513, 78542, 78572, 78601, 78631, 78661, 78690, 78720, 78750, 78779, 78808, 78838, 78867, 78897, 78926, 78956, 78985, 79015, 79044, 79074, 79104, 79133, 79163, 79192, 79222, 79251, 79281, 79310, 79340, 79369, 79399, 79428, 79458, 79487, 79517, 79546, 79576, 79606, 79635, 79665, 79695, 79724, 79753, 79783, 79812, 79841, 79871, 79900, 79930, 79960, 79990];
      }, 24453: function(o, s, n) {
        var l = n(27976);
        function u() {
          this.regionalOptions = [], this.regionalOptions[""] = { invalidCalendar: "Calendar {0} not found", invalidDate: "Invalid {0} date", invalidMonth: "Invalid {0} month", invalidYear: "Invalid {0} year", differentCalendars: "Cannot mix {0} and {1} dates" }, this.local = this.regionalOptions[""], this.calendars = {}, this._localCals = {};
        }
        function i(f, c, g, m) {
          if (this._calendar = f, this._year = c, this._month = g, this._day = m, this._calendar._validateLevel === 0 && !this._calendar.isValid(this._year, this._month, this._day)) throw (d.local.invalidDate || d.regionalOptions[""].invalidDate).replace(/\{0\}/, this._calendar.local.name);
        }
        function h(f, c) {
          return "000000".substring(0, c - (f = "" + f).length) + f;
        }
        function p() {
          this.shortYearCutoff = "+10";
        }
        function _(f) {
          this.local = this.regionalOptions[f] || this.regionalOptions[""];
        }
        l(u.prototype, { instance: function(f, c) {
          f = (f || "gregorian").toLowerCase(), c = c || "";
          var g = this._localCals[f + "-" + c];
          if (!g && this.calendars[f] && (g = new this.calendars[f](c), this._localCals[f + "-" + c] = g), !g) throw (this.local.invalidCalendar || this.regionalOptions[""].invalidCalendar).replace(/\{0\}/, f);
          return g;
        }, newDate: function(f, c, g, m, x) {
          return (m = (f != null && f.year ? f.calendar() : typeof m == "string" ? this.instance(m, x) : m) || this.instance()).newDate(f, c, g);
        }, substituteDigits: function(f) {
          return function(c) {
            return (c + "").replace(/[0-9]/g, function(g) {
              return f[g];
            });
          };
        }, substituteChineseDigits: function(f, c) {
          return function(g) {
            for (var m = "", x = 0; g > 0; ) {
              var w = g % 10;
              m = (w === 0 ? "" : f[w] + c[x]) + m, x++, g = Math.floor(g / 10);
            }
            return m.indexOf(f[1] + c[1]) === 0 && (m = m.substr(1)), m || f[0];
          };
        } }), l(i.prototype, { newDate: function(f, c, g) {
          return this._calendar.newDate(f ?? this, c, g);
        }, year: function(f) {
          return arguments.length === 0 ? this._year : this.set(f, "y");
        }, month: function(f) {
          return arguments.length === 0 ? this._month : this.set(f, "m");
        }, day: function(f) {
          return arguments.length === 0 ? this._day : this.set(f, "d");
        }, date: function(f, c, g) {
          if (!this._calendar.isValid(f, c, g)) throw (d.local.invalidDate || d.regionalOptions[""].invalidDate).replace(/\{0\}/, this._calendar.local.name);
          return this._year = f, this._month = c, this._day = g, this;
        }, leapYear: function() {
          return this._calendar.leapYear(this);
        }, epoch: function() {
          return this._calendar.epoch(this);
        }, formatYear: function() {
          return this._calendar.formatYear(this);
        }, monthOfYear: function() {
          return this._calendar.monthOfYear(this);
        }, weekOfYear: function() {
          return this._calendar.weekOfYear(this);
        }, daysInYear: function() {
          return this._calendar.daysInYear(this);
        }, dayOfYear: function() {
          return this._calendar.dayOfYear(this);
        }, daysInMonth: function() {
          return this._calendar.daysInMonth(this);
        }, dayOfWeek: function() {
          return this._calendar.dayOfWeek(this);
        }, weekDay: function() {
          return this._calendar.weekDay(this);
        }, extraInfo: function() {
          return this._calendar.extraInfo(this);
        }, add: function(f, c) {
          return this._calendar.add(this, f, c);
        }, set: function(f, c) {
          return this._calendar.set(this, f, c);
        }, compareTo: function(f) {
          if (this._calendar.name !== f._calendar.name) throw (d.local.differentCalendars || d.regionalOptions[""].differentCalendars).replace(/\{0\}/, this._calendar.local.name).replace(/\{1\}/, f._calendar.local.name);
          var c = this._year !== f._year ? this._year - f._year : this._month !== f._month ? this.monthOfYear() - f.monthOfYear() : this._day - f._day;
          return c === 0 ? 0 : c < 0 ? -1 : 1;
        }, calendar: function() {
          return this._calendar;
        }, toJD: function() {
          return this._calendar.toJD(this);
        }, fromJD: function(f) {
          return this._calendar.fromJD(f);
        }, toJSDate: function() {
          return this._calendar.toJSDate(this);
        }, fromJSDate: function(f) {
          return this._calendar.fromJSDate(f);
        }, toString: function() {
          return (this.year() < 0 ? "-" : "") + h(Math.abs(this.year()), 4) + "-" + h(this.month(), 2) + "-" + h(this.day(), 2);
        } }), l(p.prototype, { _validateLevel: 0, newDate: function(f, c, g) {
          return f == null ? this.today() : (f.year && (this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate), g = f.day(), c = f.month(), f = f.year()), new i(this, f, c, g));
        }, today: function() {
          return this.fromJSDate(/* @__PURE__ */ new Date());
        }, epoch: function(f) {
          return this._validate(f, this.minMonth, this.minDay, d.local.invalidYear || d.regionalOptions[""].invalidYear).year() < 0 ? this.local.epochs[0] : this.local.epochs[1];
        }, formatYear: function(f) {
          var c = this._validate(f, this.minMonth, this.minDay, d.local.invalidYear || d.regionalOptions[""].invalidYear);
          return (c.year() < 0 ? "-" : "") + h(Math.abs(c.year()), 4);
        }, monthsInYear: function(f) {
          return this._validate(f, this.minMonth, this.minDay, d.local.invalidYear || d.regionalOptions[""].invalidYear), 12;
        }, monthOfYear: function(f, c) {
          var g = this._validate(f, c, this.minDay, d.local.invalidMonth || d.regionalOptions[""].invalidMonth);
          return (g.month() + this.monthsInYear(g) - this.firstMonth) % this.monthsInYear(g) + this.minMonth;
        }, fromMonthOfYear: function(f, c) {
          var g = (c + this.firstMonth - 2 * this.minMonth) % this.monthsInYear(f) + this.minMonth;
          return this._validate(f, g, this.minDay, d.local.invalidMonth || d.regionalOptions[""].invalidMonth), g;
        }, daysInYear: function(f) {
          var c = this._validate(f, this.minMonth, this.minDay, d.local.invalidYear || d.regionalOptions[""].invalidYear);
          return this.leapYear(c) ? 366 : 365;
        }, dayOfYear: function(f, c, g) {
          var m = this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate);
          return m.toJD() - this.newDate(m.year(), this.fromMonthOfYear(m.year(), this.minMonth), this.minDay).toJD() + 1;
        }, daysInWeek: function() {
          return 7;
        }, dayOfWeek: function(f, c, g) {
          var m = this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate);
          return (Math.floor(this.toJD(m)) + 2) % this.daysInWeek();
        }, extraInfo: function(f, c, g) {
          return this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate), {};
        }, add: function(f, c, g) {
          return this._validate(f, this.minMonth, this.minDay, d.local.invalidDate || d.regionalOptions[""].invalidDate), this._correctAdd(f, this._add(f, c, g), c, g);
        }, _add: function(f, c, g) {
          if (this._validateLevel++, g === "d" || g === "w") {
            var m = f.toJD() + c * (g === "w" ? this.daysInWeek() : 1), x = f.calendar().fromJD(m);
            return this._validateLevel--, [x.year(), x.month(), x.day()];
          }
          try {
            var w = f.year() + (g === "y" ? c : 0), k = f.monthOfYear() + (g === "m" ? c : 0);
            x = f.day(), g === "y" ? (f.month() !== this.fromMonthOfYear(w, k) && (k = this.newDate(w, f.month(), this.minDay).monthOfYear()), k = Math.min(k, this.monthsInYear(w)), x = Math.min(x, this.daysInMonth(w, this.fromMonthOfYear(w, k)))) : g === "m" && (function(A) {
              for (; k < A.minMonth; ) w--, k += A.monthsInYear(w);
              for (var C = A.monthsInYear(w); k > C - 1 + A.minMonth; ) w++, k -= C, C = A.monthsInYear(w);
            }(this), x = Math.min(x, this.daysInMonth(w, this.fromMonthOfYear(w, k))));
            var S = [w, this.fromMonthOfYear(w, k), x];
            return this._validateLevel--, S;
          } catch (A) {
            throw this._validateLevel--, A;
          }
        }, _correctAdd: function(f, c, g, m) {
          if (!(this.hasYearZero || m !== "y" && m !== "m" || c[0] !== 0 && f.year() > 0 == c[0] > 0)) {
            var x = { y: [1, 1, "y"], m: [1, this.monthsInYear(-1), "m"], w: [this.daysInWeek(), this.daysInYear(-1), "d"], d: [1, this.daysInYear(-1), "d"] }[m], w = g < 0 ? -1 : 1;
            c = this._add(f, g * x[0] + w * x[1], x[2]);
          }
          return f.date(c[0], c[1], c[2]);
        }, set: function(f, c, g) {
          this._validate(f, this.minMonth, this.minDay, d.local.invalidDate || d.regionalOptions[""].invalidDate);
          var m = g === "y" ? c : f.year(), x = g === "m" ? c : f.month(), w = g === "d" ? c : f.day();
          return g !== "y" && g !== "m" || (w = Math.min(w, this.daysInMonth(m, x))), f.date(m, x, w);
        }, isValid: function(f, c, g) {
          this._validateLevel++;
          var m = this.hasYearZero || f !== 0;
          if (m) {
            var x = this.newDate(f, c, this.minDay);
            m = c >= this.minMonth && c - this.minMonth < this.monthsInYear(x) && g >= this.minDay && g - this.minDay < this.daysInMonth(x);
          }
          return this._validateLevel--, m;
        }, toJSDate: function(f, c, g) {
          var m = this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate);
          return d.instance().fromJD(this.toJD(m)).toJSDate();
        }, fromJSDate: function(f) {
          return this.fromJD(d.instance().fromJSDate(f).toJD());
        }, _validate: function(f, c, g, m) {
          if (f.year) {
            if (this._validateLevel === 0 && this.name !== f.calendar().name) throw (d.local.differentCalendars || d.regionalOptions[""].differentCalendars).replace(/\{0\}/, this.local.name).replace(/\{1\}/, f.calendar().local.name);
            return f;
          }
          try {
            if (this._validateLevel++, this._validateLevel === 1 && !this.isValid(f, c, g)) throw m.replace(/\{0\}/, this.local.name);
            var x = this.newDate(f, c, g);
            return this._validateLevel--, x;
          } catch (w) {
            throw this._validateLevel--, w;
          }
        } }), _.prototype = new p(), l(_.prototype, { name: "Gregorian", jdEpoch: 17214255e-1, daysPerMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], hasYearZero: !1, minMonth: 1, firstMonth: 1, minDay: 1, regionalOptions: { "": { name: "Gregorian", epochs: ["BCE", "CE"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], digits: null, dateFormat: "mm/dd/yyyy", firstDay: 0, isRTL: !1 } }, leapYear: function(f) {
          var c = this._validate(f, this.minMonth, this.minDay, d.local.invalidYear || d.regionalOptions[""].invalidYear);
          return (f = c.year() + (c.year() < 0 ? 1 : 0)) % 4 == 0 && (f % 100 != 0 || f % 400 == 0);
        }, weekOfYear: function(f, c, g) {
          var m = this.newDate(f, c, g);
          return m.add(4 - (m.dayOfWeek() || 7), "d"), Math.floor((m.dayOfYear() - 1) / 7) + 1;
        }, daysInMonth: function(f, c) {
          var g = this._validate(f, c, this.minDay, d.local.invalidMonth || d.regionalOptions[""].invalidMonth);
          return this.daysPerMonth[g.month() - 1] + (g.month() === 2 && this.leapYear(g.year()) ? 1 : 0);
        }, weekDay: function(f, c, g) {
          return (this.dayOfWeek(f, c, g) || 7) < 6;
        }, toJD: function(f, c, g) {
          var m = this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate);
          f = m.year(), c = m.month(), g = m.day(), f < 0 && f++, c < 3 && (c += 12, f--);
          var x = Math.floor(f / 100), w = 2 - x + Math.floor(x / 4);
          return Math.floor(365.25 * (f + 4716)) + Math.floor(30.6001 * (c + 1)) + g + w - 1524.5;
        }, fromJD: function(f) {
          var c = Math.floor(f + 0.5), g = Math.floor((c - 186721625e-2) / 36524.25), m = 1524 + (g = c + 1 + g - Math.floor(g / 4)), x = Math.floor((m - 122.1) / 365.25), w = Math.floor(365.25 * x), k = Math.floor((m - w) / 30.6001), S = m - w - Math.floor(30.6001 * k), A = k - (k > 13.5 ? 13 : 1), C = x - (A > 2.5 ? 4716 : 4715);
          return C <= 0 && C--, this.newDate(C, A, S);
        }, toJSDate: function(f, c, g) {
          var m = this._validate(f, c, g, d.local.invalidDate || d.regionalOptions[""].invalidDate), x = new Date(m.year(), m.month() - 1, m.day());
          return x.setHours(0), x.setMinutes(0), x.setSeconds(0), x.setMilliseconds(0), x.setHours(x.getHours() > 12 ? x.getHours() + 2 : 0), x;
        }, fromJSDate: function(f) {
          return this.newDate(f.getFullYear(), f.getMonth() + 1, f.getDate());
        } });
        var d = o.exports = new u();
        d.cdate = i, d.baseCalendar = p, d.calendars.gregorian = _;
      }, 23428: function(o, s, n) {
        var l = n(27976), u = n(24453);
        l(u.regionalOptions[""], { invalidArguments: "Invalid arguments", invalidFormat: "Cannot format a date from another calendar", missingNumberAt: "Missing number at position {0}", unknownNameAt: "Unknown name at position {0}", unexpectedLiteralAt: "Unexpected literal at position {0}", unexpectedText: "Additional text found at end" }), u.local = u.regionalOptions[""], l(u.cdate.prototype, { formatDate: function(i, h) {
          return typeof i != "string" && (h = i, i = ""), this._calendar.formatDate(i || "", this, h);
        } }), l(u.baseCalendar.prototype, { UNIX_EPOCH: u.instance().newDate(1970, 1, 1).toJD(), SECS_PER_DAY: 86400, TICKS_EPOCH: u.instance().jdEpoch, TICKS_PER_DAY: 864e9, ATOM: "yyyy-mm-dd", COOKIE: "D, dd M yyyy", FULL: "DD, MM d, yyyy", ISO_8601: "yyyy-mm-dd", JULIAN: "J", RFC_822: "D, d M yy", RFC_850: "DD, dd-M-yy", RFC_1036: "D, d M yy", RFC_1123: "D, d M yyyy", RFC_2822: "D, d M yyyy", RSS: "D, d M yy", TICKS: "!", TIMESTAMP: "@", W3C: "yyyy-mm-dd", formatDate: function(i, h, p) {
          if (typeof i != "string" && (p = h, h = i, i = ""), !h) return "";
          if (h.calendar() !== this) throw u.local.invalidFormat || u.regionalOptions[""].invalidFormat;
          i = i || this.local.dateFormat;
          for (var _, d, f, c = (p = p || {}).dayNamesShort || this.local.dayNamesShort, g = p.dayNames || this.local.dayNames, m = p.monthNumbers || this.local.monthNumbers, x = p.monthNamesShort || this.local.monthNamesShort, w = p.monthNames || this.local.monthNames, k = (p.calculateWeek || this.local.calculateWeek, function(O, T) {
            for (var z = 1; M + z < i.length && i.charAt(M + z) === O; ) z++;
            return M += z - 1, Math.floor(z / (T || 1)) > 1;
          }), S = function(O, T, z, F) {
            var U = "" + T;
            if (k(O, F)) for (; U.length < z; ) U = "0" + U;
            return U;
          }, A = this, C = function(O) {
            return typeof m == "function" ? m.call(A, O, k("m")) : E(S("m", O.month(), 2));
          }, D = function(O, T) {
            return T ? typeof w == "function" ? w.call(A, O) : w[O.month() - A.minMonth] : typeof x == "function" ? x.call(A, O) : x[O.month() - A.minMonth];
          }, L = this.local.digits, E = function(O) {
            return p.localNumbers && L ? L(O) : O;
          }, P = "", I = !1, M = 0; M < i.length; M++) if (I) i.charAt(M) !== "'" || k("'") ? P += i.charAt(M) : I = !1;
          else switch (i.charAt(M)) {
            case "d":
              P += E(S("d", h.day(), 2));
              break;
            case "D":
              P += (_ = h.dayOfWeek(), d = c, f = g, k("D") ? f[_] : d[_]);
              break;
            case "o":
              P += S("o", h.dayOfYear(), 3);
              break;
            case "w":
              P += S("w", h.weekOfYear(), 2);
              break;
            case "m":
              P += C(h);
              break;
            case "M":
              P += D(h, k("M"));
              break;
            case "y":
              P += k("y", 2) ? h.year() : (h.year() % 100 < 10 ? "0" : "") + h.year() % 100;
              break;
            case "Y":
              k("Y", 2), P += h.formatYear();
              break;
            case "J":
              P += h.toJD();
              break;
            case "@":
              P += (h.toJD() - this.UNIX_EPOCH) * this.SECS_PER_DAY;
              break;
            case "!":
              P += (h.toJD() - this.TICKS_EPOCH) * this.TICKS_PER_DAY;
              break;
            case "'":
              k("'") ? P += "'" : I = !0;
              break;
            default:
              P += i.charAt(M);
          }
          return P;
        }, parseDate: function(i, h, p) {
          if (h == null) throw u.local.invalidArguments || u.regionalOptions[""].invalidArguments;
          if ((h = typeof h == "object" ? h.toString() : h + "") === "") return null;
          i = i || this.local.dateFormat;
          var _ = (p = p || {}).shortYearCutoff || this.shortYearCutoff;
          _ = typeof _ != "string" ? _ : this.today().year() % 100 + parseInt(_, 10);
          for (var d = p.dayNamesShort || this.local.dayNamesShort, f = p.dayNames || this.local.dayNames, c = p.parseMonth || this.local.parseMonth, g = p.monthNumbers || this.local.monthNumbers, m = p.monthNamesShort || this.local.monthNamesShort, x = p.monthNames || this.local.monthNames, w = -1, k = -1, S = -1, A = -1, C = -1, D = !1, L = !1, E = function(q, K) {
            for (var re = 1; U + re < i.length && i.charAt(U + re) === q; ) re++;
            return U += re - 1, Math.floor(re / (K || 1)) > 1;
          }, P = function(q, K) {
            var re = E(q, K), Y = [2, 3, re ? 4 : 2, re ? 4 : 2, 10, 11, 20]["oyYJ@!".indexOf(q) + 1], te = new RegExp("^-?\\d{1," + Y + "}"), ee = h.substring(F).match(te);
            if (!ee) throw (u.local.missingNumberAt || u.regionalOptions[""].missingNumberAt).replace(/\{0\}/, F);
            return F += ee[0].length, parseInt(ee[0], 10);
          }, I = this, M = function() {
            if (typeof g == "function") {
              E("m");
              var q = g.call(I, h.substring(F));
              return F += q.length, q;
            }
            return P("m");
          }, O = function(q, K, re, Y) {
            for (var te = E(q, Y) ? re : K, ee = 0; ee < te.length; ee++) if (h.substr(F, te[ee].length).toLowerCase() === te[ee].toLowerCase()) return F += te[ee].length, ee + I.minMonth;
            throw (u.local.unknownNameAt || u.regionalOptions[""].unknownNameAt).replace(/\{0\}/, F);
          }, T = function() {
            if (typeof x == "function") {
              var q = E("M") ? x.call(I, h.substring(F)) : m.call(I, h.substring(F));
              return F += q.length, q;
            }
            return O("M", m, x);
          }, z = function() {
            if (h.charAt(F) !== i.charAt(U)) throw (u.local.unexpectedLiteralAt || u.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/, F);
            F++;
          }, F = 0, U = 0; U < i.length; U++) if (L) i.charAt(U) !== "'" || E("'") ? z() : L = !1;
          else switch (i.charAt(U)) {
            case "d":
              A = P("d");
              break;
            case "D":
              O("D", d, f);
              break;
            case "o":
              C = P("o");
              break;
            case "w":
              P("w");
              break;
            case "m":
              S = M();
              break;
            case "M":
              S = T();
              break;
            case "y":
              var V = U;
              D = !E("y", 2), U = V, k = P("y", 2);
              break;
            case "Y":
              k = P("Y", 2);
              break;
            case "J":
              w = P("J") + 0.5, h.charAt(F) === "." && (F++, P("J"));
              break;
            case "@":
              w = P("@") / this.SECS_PER_DAY + this.UNIX_EPOCH;
              break;
            case "!":
              w = P("!") / this.TICKS_PER_DAY + this.TICKS_EPOCH;
              break;
            case "*":
              F = h.length;
              break;
            case "'":
              E("'") ? z() : L = !0;
              break;
            default:
              z();
          }
          if (F < h.length) throw u.local.unexpectedText || u.regionalOptions[""].unexpectedText;
          if (k === -1 ? k = this.today().year() : k < 100 && D && (k += _ === -1 ? 1900 : this.today().year() - this.today().year() % 100 - (k <= _ ? 0 : 100)), typeof S == "string" && (S = c.call(this, k, S)), C > -1) {
            S = 1, A = C;
            for (var $ = this.daysInMonth(k, S); A > $; $ = this.daysInMonth(k, S)) S++, A -= $;
          }
          return w > -1 ? this.fromJD(w) : this.newDate(k, S, A);
        }, determineDate: function(i, h, p, _, d) {
          p && typeof p != "object" && (d = _, _ = p, p = null), typeof _ != "string" && (d = _, _ = "");
          var f = this;
          return h = h ? h.newDate() : null, i == null ? h : typeof i == "string" ? function(c) {
            try {
              return f.parseDate(_, c, d);
            } catch {
            }
            for (var g = ((c = c.toLowerCase()).match(/^c/) && p ? p.newDate() : null) || f.today(), m = /([+-]?[0-9]+)\s*(d|w|m|y)?/g, x = m.exec(c); x; ) g.add(parseInt(x[1], 10), x[2] || "d"), x = m.exec(c);
            return g;
          }(i) : typeof i == "number" ? isNaN(i) || i === 1 / 0 || i === -1 / 0 ? h : f.today().add(i, "d") : f.newDate(i);
        } });
      }, 96144: function(o, s, n) {
        n.r(s);
        var l = n(85072), u = n.n(l), i = n(97825), h = n.n(i), p = n(77659), _ = n.n(p), d = n(55056), f = n.n(d), c = n(10540), g = n.n(c), m = n(41113), x = n.n(m), w = n(5955), k = {};
        k.styleTagTransform = x(), k.setAttributes = f(), k.insert = _().bind(null, "head"), k.domAPI = h(), k.insertStyleElement = g(), u()(w.A, k), s.default = w.A && w.A.locals ? w.A.locals : void 0;
      }, 85072: function(o) {
        var s = [];
        function n(i) {
          for (var h = -1, p = 0; p < s.length; p++) if (s[p].identifier === i) {
            h = p;
            break;
          }
          return h;
        }
        function l(i, h) {
          for (var p = {}, _ = [], d = 0; d < i.length; d++) {
            var f = i[d], c = h.base ? f[0] + h.base : f[0], g = p[c] || 0, m = "".concat(c, " ").concat(g);
            p[c] = g + 1;
            var x = n(m), w = { css: f[1], media: f[2], sourceMap: f[3], supports: f[4], layer: f[5] };
            if (x !== -1) s[x].references++, s[x].updater(w);
            else {
              var k = u(w, h);
              h.byIndex = d, s.splice(d, 0, { identifier: m, updater: k, references: 1 });
            }
            _.push(m);
          }
          return _;
        }
        function u(i, h) {
          var p = h.domAPI(h);
          return p.update(i), function(_) {
            if (_) {
              if (_.css === i.css && _.media === i.media && _.sourceMap === i.sourceMap && _.supports === i.supports && _.layer === i.layer) return;
              p.update(i = _);
            } else p.remove();
          };
        }
        o.exports = function(i, h) {
          var p = l(i = i || [], h = h || {});
          return function(_) {
            _ = _ || [];
            for (var d = 0; d < p.length; d++) {
              var f = n(p[d]);
              s[f].references--;
            }
            for (var c = l(_, h), g = 0; g < p.length; g++) {
              var m = n(p[g]);
              s[m].references === 0 && (s[m].updater(), s.splice(m, 1));
            }
            p = c;
          };
        };
      }, 77659: function(o) {
        var s = {};
        o.exports = function(n, l) {
          var u = function(i) {
            if (s[i] === void 0) {
              var h = document.querySelector(i);
              if (window.HTMLIFrameElement && h instanceof window.HTMLIFrameElement) try {
                h = h.contentDocument.head;
              } catch {
                h = null;
              }
              s[i] = h;
            }
            return s[i];
          }(n);
          if (!u) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
          u.appendChild(l);
        };
      }, 10540: function(o) {
        o.exports = function(s) {
          var n = document.createElement("style");
          return s.setAttributes(n, s.attributes), s.insert(n, s.options), n;
        };
      }, 55056: function(o, s, n) {
        o.exports = function(l) {
          var u = n.nc;
          u && l.setAttribute("nonce", u);
        };
      }, 97825: function(o) {
        o.exports = function(s) {
          if (typeof document > "u") return { update: function() {
          }, remove: function() {
          } };
          var n = s.insertStyleElement(s);
          return { update: function(l) {
            (function(u, i, h) {
              var p = "";
              h.supports && (p += "@supports (".concat(h.supports, ") {")), h.media && (p += "@media ".concat(h.media, " {"));
              var _ = h.layer !== void 0;
              _ && (p += "@layer".concat(h.layer.length > 0 ? " ".concat(h.layer) : "", " {")), p += h.css, _ && (p += "}"), h.media && (p += "}"), h.supports && (p += "}");
              var d = h.sourceMap;
              d && typeof btoa < "u" && (p += `
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(d)))), " */")), i.styleTagTransform(p, u, i.options);
            })(n, s, l);
          }, remove: function() {
            (function(l) {
              if (l.parentNode === null) return !1;
              l.parentNode.removeChild(l);
            })(n);
          } };
        };
      }, 41113: function(o) {
        o.exports = function(s, n) {
          if (n.styleSheet) n.styleSheet.cssText = s;
          else {
            for (; n.firstChild; ) n.removeChild(n.firstChild);
            n.appendChild(document.createTextNode(s));
          }
        };
      }, 25446: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%23333%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E";
      }, 56694: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2722%27 height=%2722%27 fill=%27%2333b5e5%27 viewBox=%270 0 22 22%27%3E%3Cpath d=%27m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0%27/%3E%3C/svg%3E";
      }, 26117: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E";
      }, 66311: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27 fill=%27%23fff%27 fill-rule=%27evenodd%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0%27/%3E%3C/svg%3E";
      }, 24420: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E";
      }, 77035: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E";
      }, 43470: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E";
      }, 13490: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E";
      }, 80216: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23333%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E";
      }, 47695: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E";
      }, 92228: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%2333b5e5%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E";
      }, 43737: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23666%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E";
      }, 48460: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23999%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E";
      }, 75796: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23aaa%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3Cpath fill=%27red%27 d=%27m14 5 1 1-9 9-1-1z%27/%3E%3C/svg%3E";
      }, 28869: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e54e33%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3C/svg%3E";
      }, 9819: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23e58978%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E";
      }, 30557: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E";
      }, 68164: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E";
      }, 64665: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E";
      }, 91413: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E";
      }, 13913: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E";
      }, 61907: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 fill=%27%23fff%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E";
      }, 56539: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 20 20%27%3E%3Cpath d=%27M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7%27/%3E%3Ccircle cx=%2710%27 cy=%2710%27 r=%272%27/%3E%3C/svg%3E";
      }, 4890: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z%27/%3E%3C/svg%3E";
      }, 13363: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5%27/%3E%3C/svg%3E";
      }, 47603: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z%27/%3E%3C/svg%3E";
      }, 64643: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z%27/%3E%3C/svg%3E";
      }, 68605: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2729%27 height=%2729%27 viewBox=%270 0 29 29%27%3E%3Cpath d=%27m10.5 14 4-8 4 8z%27/%3E%3Cpath fill=%27%23ccc%27 d=%27m10.5 16 4 8 4-8z%27/%3E%3C/svg%3E";
      }, 47914: function(o) {
        o.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2788%27 height=%2723%27 fill=%27none%27%3E%3Cpath fill=%27%23000%27 fill-opacity=%27.4%27 fill-rule=%27evenodd%27 d=%27M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%27/%3E%3Cpath fill=%27%23fff%27 d=%27m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z%27/%3E%3Cpath fill=%27%23e1e3e9%27 d=%27M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z%27/%3E%3Cpath d=%27M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z%27 style=%27fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001%27/%3E%3Cg style=%27stroke-width:1.12603545%27%3E%3Cpath d=%27M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668%27 style=%27color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3%27 style=%27clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3Cpath d=%27M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%27 style=%27clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4%27 transform=%27translate%2815.553 2.85%29scale%28.88807%29%27/%3E%3C/g%3E%3C/svg%3E";
      }, 63779: function() {
      }, 77199: function() {
      }, 61990: function(o, s, n) {
        Object.defineProperty(s, "__esModule", { value: !0 });
        var l = n(85846), u = n(66030);
        function i(c) {
          return u.geomReduce.call(void 0, c, (g, m) => g + function(x) {
            let w, k = 0;
            switch (x.type) {
              case "Polygon":
                return h(x.coordinates);
              case "MultiPolygon":
                for (w = 0; w < x.coordinates.length; w++) k += h(x.coordinates[w]);
                return k;
              case "Point":
              case "MultiPoint":
              case "LineString":
              case "MultiLineString":
                return 0;
            }
            return 0;
          }(m), 0);
        }
        function h(c) {
          let g = 0;
          if (c && c.length > 0) {
            g += Math.abs(d(c[0]));
            for (let m = 1; m < c.length; m++) g -= Math.abs(d(c[m]));
          }
          return g;
        }
        var p = l.earthRadius * l.earthRadius / 2, _ = Math.PI / 180;
        function d(c) {
          const g = c.length - 1;
          if (g <= 2) return 0;
          let m = 0, x = 0;
          for (; x < g; ) {
            const w = c[x], k = c[x + 1 === g ? 0 : x + 1], S = c[x + 2 >= g ? (x + 2) % g : x + 2], A = w[0] * _, C = k[1] * _;
            m += (S[0] * _ - A) * Math.sin(C), x++;
          }
          return m * p;
        }
        var f = i;
        s.area = i, s.default = f;
      }, 25368: function(o, s, n) {
        Object.defineProperty(s, "__esModule", { value: !0 });
        var l = n(66030);
        function u(h, p = {}) {
          if (h.bbox != null && p.recompute !== !0) return h.bbox;
          const _ = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
          return l.coordEach.call(void 0, h, (d) => {
            _[0] > d[0] && (_[0] = d[0]), _[1] > d[1] && (_[1] = d[1]), _[2] < d[0] && (_[2] = d[0]), _[3] < d[1] && (_[3] = d[1]);
          }), _;
        }
        var i = u;
        s.bbox = u, s.default = i;
      }, 30035: function(o, s, n) {
        Object.defineProperty(s, "__esModule", { value: !0 });
        var l = n(85846), u = n(66030);
        function i(p, _ = {}) {
          let d = 0, f = 0, c = 0;
          return u.coordEach.call(void 0, p, function(g) {
            d += g[0], f += g[1], c++;
          }, !0), l.point.call(void 0, [d / c, f / c], _.properties);
        }
        var h = i;
        s.centroid = i, s.default = h;
      }, 85846: function(o, s) {
        Object.defineProperty(s, "__esModule", { value: !0 });
        var n = 63710088e-1, l = { centimeters: 637100880, centimetres: 637100880, degrees: 360 / (2 * Math.PI), feet: 20902260511392e-6, inches: 39.37 * n, kilometers: 6371.0088, kilometres: 6371.0088, meters: n, metres: n, miles: 3958.761333810546, millimeters: 6371008800, millimetres: 6371008800, nauticalmiles: n / 1852, radians: 1, yards: 6967335223679999e-9 }, u = { acres: 247105e-9, centimeters: 1e4, centimetres: 1e4, feet: 10.763910417, hectares: 1e-4, inches: 1550.003100006, kilometers: 1e-6, kilometres: 1e-6, meters: 1, metres: 1, miles: 386e-9, nauticalmiles: 29155334959812285e-23, millimeters: 1e6, millimetres: 1e6, yards: 1.195990046 };
        function i(S, A, C = {}) {
          const D = { type: "Feature" };
          return (C.id === 0 || C.id) && (D.id = C.id), C.bbox && (D.bbox = C.bbox), D.properties = A || {}, D.geometry = S, D;
        }
        function h(S, A, C = {}) {
          if (!S) throw new Error("coordinates is required");
          if (!Array.isArray(S)) throw new Error("coordinates must be an Array");
          if (S.length < 2) throw new Error("coordinates must be at least 2 numbers long");
          if (!k(S[0]) || !k(S[1])) throw new Error("coordinates must contain numbers");
          return i({ type: "Point", coordinates: S }, A, C);
        }
        function p(S, A, C = {}) {
          for (const D of S) {
            if (D.length < 4) throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
            if (D[D.length - 1].length !== D[0].length) throw new Error("First and last Position are not equivalent.");
            for (let L = 0; L < D[D.length - 1].length; L++) if (D[D.length - 1][L] !== D[0][L]) throw new Error("First and last Position are not equivalent.");
          }
          return i({ type: "Polygon", coordinates: S }, A, C);
        }
        function _(S, A, C = {}) {
          if (S.length < 2) throw new Error("coordinates must be an array of two or more positions");
          return i({ type: "LineString", coordinates: S }, A, C);
        }
        function d(S, A = {}) {
          const C = { type: "FeatureCollection" };
          return A.id && (C.id = A.id), A.bbox && (C.bbox = A.bbox), C.features = S, C;
        }
        function f(S, A, C = {}) {
          return i({ type: "MultiLineString", coordinates: S }, A, C);
        }
        function c(S, A, C = {}) {
          return i({ type: "MultiPoint", coordinates: S }, A, C);
        }
        function g(S, A, C = {}) {
          return i({ type: "MultiPolygon", coordinates: S }, A, C);
        }
        function m(S, A = "kilometers") {
          const C = l[A];
          if (!C) throw new Error(A + " units is invalid");
          return S * C;
        }
        function x(S, A = "kilometers") {
          const C = l[A];
          if (!C) throw new Error(A + " units is invalid");
          return S / C;
        }
        function w(S) {
          return S % (2 * Math.PI) * 180 / Math.PI;
        }
        function k(S) {
          return !isNaN(S) && S !== null && !Array.isArray(S);
        }
        s.areaFactors = u, s.azimuthToBearing = function(S) {
          return (S %= 360) > 0 ? S > 180 ? S - 360 : S : S < -180 ? S + 360 : S;
        }, s.bearingToAzimuth = function(S) {
          let A = S % 360;
          return A < 0 && (A += 360), A;
        }, s.convertArea = function(S, A = "meters", C = "kilometers") {
          if (!(S >= 0)) throw new Error("area must be a positive number");
          const D = u[A];
          if (!D) throw new Error("invalid original units");
          const L = u[C];
          if (!L) throw new Error("invalid final units");
          return S / D * L;
        }, s.convertLength = function(S, A = "kilometers", C = "kilometers") {
          if (!(S >= 0)) throw new Error("length must be a positive number");
          return m(x(S, A), C);
        }, s.degreesToRadians = function(S) {
          return S % 360 * Math.PI / 180;
        }, s.earthRadius = n, s.factors = l, s.feature = i, s.featureCollection = d, s.geometry = function(S, A, C = {}) {
          switch (S) {
            case "Point":
              return h(A).geometry;
            case "LineString":
              return _(A).geometry;
            case "Polygon":
              return p(A).geometry;
            case "MultiPoint":
              return c(A).geometry;
            case "MultiLineString":
              return f(A).geometry;
            case "MultiPolygon":
              return g(A).geometry;
            default:
              throw new Error(S + " is invalid");
          }
        }, s.geometryCollection = function(S, A, C = {}) {
          return i({ type: "GeometryCollection", geometries: S }, A, C);
        }, s.isNumber = k, s.isObject = function(S) {
          return S !== null && typeof S == "object" && !Array.isArray(S);
        }, s.lengthToDegrees = function(S, A) {
          return w(x(S, A));
        }, s.lengthToRadians = x, s.lineString = _, s.lineStrings = function(S, A, C = {}) {
          return d(S.map((D) => _(D, A)), C);
        }, s.multiLineString = f, s.multiPoint = c, s.multiPolygon = g, s.point = h, s.points = function(S, A, C = {}) {
          return d(S.map((D) => h(D, A)), C);
        }, s.polygon = p, s.polygons = function(S, A, C = {}) {
          return d(S.map((D) => p(D, A)), C);
        }, s.radiansToDegrees = w, s.radiansToLength = m, s.round = function(S, A = 0) {
          if (A && !(A >= 0)) throw new Error("precision must be a positive number");
          const C = Math.pow(10, A || 0);
          return Math.round(S * C) / C;
        }, s.validateBBox = function(S) {
          if (!S) throw new Error("bbox is required");
          if (!Array.isArray(S)) throw new Error("bbox must be an Array");
          if (S.length !== 4 && S.length !== 6) throw new Error("bbox must be an Array of 4 or 6 numbers");
          S.forEach((A) => {
            if (!k(A)) throw new Error("bbox must only contain numbers");
          });
        }, s.validateId = function(S) {
          if (!S) throw new Error("id is required");
          if (["string", "number"].indexOf(typeof S) === -1) throw new Error("id must be a number or a string");
        };
      }, 66030: function(o, s, n) {
        Object.defineProperty(s, "__esModule", { value: !0 });
        var l = n(85846);
        function u(c, g, m) {
          if (c !== null) for (var x, w, k, S, A, C, D, L, E = 0, P = 0, I = c.type, M = I === "FeatureCollection", O = I === "Feature", T = M ? c.features.length : 1, z = 0; z < T; z++) {
            A = (L = !!(D = M ? c.features[z].geometry : O ? c.geometry : c) && D.type === "GeometryCollection") ? D.geometries.length : 1;
            for (var F = 0; F < A; F++) {
              var U = 0, V = 0;
              if ((S = L ? D.geometries[F] : D) !== null) {
                C = S.coordinates;
                var $ = S.type;
                switch (E = !m || $ !== "Polygon" && $ !== "MultiPolygon" ? 0 : 1, $) {
                  case null:
                    break;
                  case "Point":
                    if (g(C, P, z, U, V) === !1) return !1;
                    P++, U++;
                    break;
                  case "LineString":
                  case "MultiPoint":
                    for (x = 0; x < C.length; x++) {
                      if (g(C[x], P, z, U, V) === !1) return !1;
                      P++, $ === "MultiPoint" && U++;
                    }
                    $ === "LineString" && U++;
                    break;
                  case "Polygon":
                  case "MultiLineString":
                    for (x = 0; x < C.length; x++) {
                      for (w = 0; w < C[x].length - E; w++) {
                        if (g(C[x][w], P, z, U, V) === !1) return !1;
                        P++;
                      }
                      $ === "MultiLineString" && U++, $ === "Polygon" && V++;
                    }
                    $ === "Polygon" && U++;
                    break;
                  case "MultiPolygon":
                    for (x = 0; x < C.length; x++) {
                      for (V = 0, w = 0; w < C[x].length; w++) {
                        for (k = 0; k < C[x][w].length - E; k++) {
                          if (g(C[x][w][k], P, z, U, V) === !1) return !1;
                          P++;
                        }
                        V++;
                      }
                      U++;
                    }
                    break;
                  case "GeometryCollection":
                    for (x = 0; x < S.geometries.length; x++) if (u(S.geometries[x], g, m) === !1) return !1;
                    break;
                  default:
                    throw new Error("Unknown Geometry Type");
                }
              }
            }
          }
        }
        function i(c, g) {
          var m;
          switch (c.type) {
            case "FeatureCollection":
              for (m = 0; m < c.features.length && g(c.features[m].properties, m) !== !1; m++) ;
              break;
            case "Feature":
              g(c.properties, 0);
          }
        }
        function h(c, g) {
          if (c.type === "Feature") g(c, 0);
          else if (c.type === "FeatureCollection") for (var m = 0; m < c.features.length && g(c.features[m], m) !== !1; m++) ;
        }
        function p(c, g) {
          var m, x, w, k, S, A, C, D, L, E, P = 0, I = c.type === "FeatureCollection", M = c.type === "Feature", O = I ? c.features.length : 1;
          for (m = 0; m < O; m++) {
            for (A = I ? c.features[m].geometry : M ? c.geometry : c, D = I ? c.features[m].properties : M ? c.properties : {}, L = I ? c.features[m].bbox : M ? c.bbox : void 0, E = I ? c.features[m].id : M ? c.id : void 0, S = (C = !!A && A.type === "GeometryCollection") ? A.geometries.length : 1, w = 0; w < S; w++) if ((k = C ? A.geometries[w] : A) !== null) switch (k.type) {
              case "Point":
              case "LineString":
              case "MultiPoint":
              case "Polygon":
              case "MultiLineString":
              case "MultiPolygon":
                if (g(k, P, D, L, E) === !1) return !1;
                break;
              case "GeometryCollection":
                for (x = 0; x < k.geometries.length; x++) if (g(k.geometries[x], P, D, L, E) === !1) return !1;
                break;
              default:
                throw new Error("Unknown Geometry Type");
            }
            else if (g(null, P, D, L, E) === !1) return !1;
            P++;
          }
        }
        function _(c, g) {
          p(c, function(m, x, w, k, S) {
            var A, C = m === null ? null : m.type;
            switch (C) {
              case null:
              case "Point":
              case "LineString":
              case "Polygon":
                return g(l.feature.call(void 0, m, w, { bbox: k, id: S }), x, 0) !== !1 && void 0;
            }
            switch (C) {
              case "MultiPoint":
                A = "Point";
                break;
              case "MultiLineString":
                A = "LineString";
                break;
              case "MultiPolygon":
                A = "Polygon";
            }
            for (var D = 0; D < m.coordinates.length; D++) {
              var L = { type: A, coordinates: m.coordinates[D] };
              if (g(l.feature.call(void 0, L, w), x, D) === !1) return !1;
            }
          });
        }
        function d(c, g) {
          _(c, function(m, x, w) {
            var k = 0;
            if (m.geometry) {
              var S = m.geometry.type;
              if (S !== "Point" && S !== "MultiPoint") {
                var A, C = 0, D = 0, L = 0;
                return u(m, function(E, P, I, M, O) {
                  if (A === void 0 || x > C || M > D || O > L) return A = E, C = x, D = M, L = O, void (k = 0);
                  var T = l.lineString.call(void 0, [A, E], m.properties);
                  if (g(T, x, w, O, k) === !1) return !1;
                  k++, A = E;
                }) !== !1 && void 0;
              }
            }
          });
        }
        function f(c, g) {
          if (!c) throw new Error("geojson is required");
          _(c, function(m, x, w) {
            if (m.geometry !== null) {
              var k = m.geometry.type, S = m.geometry.coordinates;
              switch (k) {
                case "LineString":
                  if (g(m, x, w, 0, 0) === !1) return !1;
                  break;
                case "Polygon":
                  for (var A = 0; A < S.length; A++) if (g(l.lineString.call(void 0, S[A], m.properties), x, w, A) === !1) return !1;
              }
            }
          });
        }
        s.coordAll = function(c) {
          var g = [];
          return u(c, function(m) {
            g.push(m);
          }), g;
        }, s.coordEach = u, s.coordReduce = function(c, g, m, x) {
          var w = m;
          return u(c, function(k, S, A, C, D) {
            w = S === 0 && m === void 0 ? k : g(w, k, S, A, C, D);
          }, x), w;
        }, s.featureEach = h, s.featureReduce = function(c, g, m) {
          var x = m;
          return h(c, function(w, k) {
            x = k === 0 && m === void 0 ? w : g(x, w, k);
          }), x;
        }, s.findPoint = function(c, g) {
          if (g = g || {}, !l.isObject.call(void 0, g)) throw new Error("options is invalid");
          var m, x = g.featureIndex || 0, w = g.multiFeatureIndex || 0, k = g.geometryIndex || 0, S = g.coordIndex || 0, A = g.properties;
          switch (c.type) {
            case "FeatureCollection":
              x < 0 && (x = c.features.length + x), A = A || c.features[x].properties, m = c.features[x].geometry;
              break;
            case "Feature":
              A = A || c.properties, m = c.geometry;
              break;
            case "Point":
            case "MultiPoint":
              return null;
            case "LineString":
            case "Polygon":
            case "MultiLineString":
            case "MultiPolygon":
              m = c;
              break;
            default:
              throw new Error("geojson is invalid");
          }
          if (m === null) return null;
          var C = m.coordinates;
          switch (m.type) {
            case "Point":
              return l.point.call(void 0, C, A, g);
            case "MultiPoint":
              return w < 0 && (w = C.length + w), l.point.call(void 0, C[w], A, g);
            case "LineString":
              return S < 0 && (S = C.length + S), l.point.call(void 0, C[S], A, g);
            case "Polygon":
              return k < 0 && (k = C.length + k), S < 0 && (S = C[k].length + S), l.point.call(void 0, C[k][S], A, g);
            case "MultiLineString":
              return w < 0 && (w = C.length + w), S < 0 && (S = C[w].length + S), l.point.call(void 0, C[w][S], A, g);
            case "MultiPolygon":
              return w < 0 && (w = C.length + w), k < 0 && (k = C[w].length + k), S < 0 && (S = C[w][k].length - S), l.point.call(void 0, C[w][k][S], A, g);
          }
          throw new Error("geojson is invalid");
        }, s.findSegment = function(c, g) {
          if (g = g || {}, !l.isObject.call(void 0, g)) throw new Error("options is invalid");
          var m, x = g.featureIndex || 0, w = g.multiFeatureIndex || 0, k = g.geometryIndex || 0, S = g.segmentIndex || 0, A = g.properties;
          switch (c.type) {
            case "FeatureCollection":
              x < 0 && (x = c.features.length + x), A = A || c.features[x].properties, m = c.features[x].geometry;
              break;
            case "Feature":
              A = A || c.properties, m = c.geometry;
              break;
            case "Point":
            case "MultiPoint":
              return null;
            case "LineString":
            case "Polygon":
            case "MultiLineString":
            case "MultiPolygon":
              m = c;
              break;
            default:
              throw new Error("geojson is invalid");
          }
          if (m === null) return null;
          var C = m.coordinates;
          switch (m.type) {
            case "Point":
            case "MultiPoint":
              return null;
            case "LineString":
              return S < 0 && (S = C.length + S - 1), l.lineString.call(void 0, [C[S], C[S + 1]], A, g);
            case "Polygon":
              return k < 0 && (k = C.length + k), S < 0 && (S = C[k].length + S - 1), l.lineString.call(void 0, [C[k][S], C[k][S + 1]], A, g);
            case "MultiLineString":
              return w < 0 && (w = C.length + w), S < 0 && (S = C[w].length + S - 1), l.lineString.call(void 0, [C[w][S], C[w][S + 1]], A, g);
            case "MultiPolygon":
              return w < 0 && (w = C.length + w), k < 0 && (k = C[w].length + k), S < 0 && (S = C[w][k].length - S - 1), l.lineString.call(void 0, [C[w][k][S], C[w][k][S + 1]], A, g);
          }
          throw new Error("geojson is invalid");
        }, s.flattenEach = _, s.flattenReduce = function(c, g, m) {
          var x = m;
          return _(c, function(w, k, S) {
            x = k === 0 && S === 0 && m === void 0 ? w : g(x, w, k, S);
          }), x;
        }, s.geomEach = p, s.geomReduce = function(c, g, m) {
          var x = m;
          return p(c, function(w, k, S, A, C) {
            x = k === 0 && m === void 0 ? w : g(x, w, k, S, A, C);
          }), x;
        }, s.lineEach = f, s.lineReduce = function(c, g, m) {
          var x = m;
          return f(c, function(w, k, S, A) {
            x = k === 0 && m === void 0 ? w : g(x, w, k, S, A);
          }), x;
        }, s.propEach = i, s.propReduce = function(c, g, m) {
          var x = m;
          return i(c, function(w, k) {
            x = k === 0 && m === void 0 ? w : g(x, w, k);
          }), x;
        }, s.segmentEach = d, s.segmentReduce = function(c, g, m) {
          var x = m, w = !1;
          return d(c, function(k, S, A, C, D) {
            x = w === !1 && m === void 0 ? k : g(x, k, S, A, C, D), w = !0;
          }), x;
        };
      }, 70085: function(o, s, n) {
        var l = ["BigInt64Array", "BigUint64Array", "Float32Array", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray"], u = typeof globalThis > "u" ? n.g : globalThis;
        o.exports = function() {
          for (var i = [], h = 0; h < l.length; h++) typeof u[l[h]] == "function" && (i[i.length] = l[h]);
          return i;
        };
      }, 89380: function(o) {
        o.exports = function() {
          var s = {}, n = {};
          function l(u, i, h) {
            if (n[u] = h, u === "index") {
              var p = "var sharedModule = {}; (" + n.shared + ")(sharedModule); (" + n.worker + ")(sharedModule);", _ = {};
              return n.shared(_), n.index(s, _), typeof window < "u" && s.setWorkerUrl(window.URL.createObjectURL(new Blob([p], { type: "text/javascript" }))), s;
            }
          }
          return l("shared", 0, function(u) {
            function i(J, H, oe, ve) {
              return new (oe || (oe = Promise))(function(Oe, Xe) {
                function rt(Nt) {
                  try {
                    Tt(ve.next(Nt));
                  } catch (Vt) {
                    Xe(Vt);
                  }
                }
                function yt(Nt) {
                  try {
                    Tt(ve.throw(Nt));
                  } catch (Vt) {
                    Xe(Vt);
                  }
                }
                function Tt(Nt) {
                  var Vt;
                  Nt.done ? Oe(Nt.value) : (Vt = Nt.value, Vt instanceof oe ? Vt : new oe(function(Kt) {
                    Kt(Vt);
                  })).then(rt, yt);
                }
                Tt((ve = ve.apply(J, H || [])).next());
              });
            }
            function h(J) {
              return J && J.__esModule && Object.prototype.hasOwnProperty.call(J, "default") ? J.default : J;
            }
            typeof SuppressedError == "function" && SuppressedError;
            var p = _;
            function _(J, H) {
              this.x = J, this.y = H;
            }
            _.prototype = { clone: function() {
              return new _(this.x, this.y);
            }, add: function(J) {
              return this.clone()._add(J);
            }, sub: function(J) {
              return this.clone()._sub(J);
            }, multByPoint: function(J) {
              return this.clone()._multByPoint(J);
            }, divByPoint: function(J) {
              return this.clone()._divByPoint(J);
            }, mult: function(J) {
              return this.clone()._mult(J);
            }, div: function(J) {
              return this.clone()._div(J);
            }, rotate: function(J) {
              return this.clone()._rotate(J);
            }, rotateAround: function(J, H) {
              return this.clone()._rotateAround(J, H);
            }, matMult: function(J) {
              return this.clone()._matMult(J);
            }, unit: function() {
              return this.clone()._unit();
            }, perp: function() {
              return this.clone()._perp();
            }, round: function() {
              return this.clone()._round();
            }, mag: function() {
              return Math.sqrt(this.x * this.x + this.y * this.y);
            }, equals: function(J) {
              return this.x === J.x && this.y === J.y;
            }, dist: function(J) {
              return Math.sqrt(this.distSqr(J));
            }, distSqr: function(J) {
              var H = J.x - this.x, oe = J.y - this.y;
              return H * H + oe * oe;
            }, angle: function() {
              return Math.atan2(this.y, this.x);
            }, angleTo: function(J) {
              return Math.atan2(this.y - J.y, this.x - J.x);
            }, angleWith: function(J) {
              return this.angleWithSep(J.x, J.y);
            }, angleWithSep: function(J, H) {
              return Math.atan2(this.x * H - this.y * J, this.x * J + this.y * H);
            }, _matMult: function(J) {
              var H = J[0] * this.x + J[1] * this.y, oe = J[2] * this.x + J[3] * this.y;
              return this.x = H, this.y = oe, this;
            }, _add: function(J) {
              return this.x += J.x, this.y += J.y, this;
            }, _sub: function(J) {
              return this.x -= J.x, this.y -= J.y, this;
            }, _mult: function(J) {
              return this.x *= J, this.y *= J, this;
            }, _div: function(J) {
              return this.x /= J, this.y /= J, this;
            }, _multByPoint: function(J) {
              return this.x *= J.x, this.y *= J.y, this;
            }, _divByPoint: function(J) {
              return this.x /= J.x, this.y /= J.y, this;
            }, _unit: function() {
              return this._div(this.mag()), this;
            }, _perp: function() {
              var J = this.y;
              return this.y = this.x, this.x = -J, this;
            }, _rotate: function(J) {
              var H = Math.cos(J), oe = Math.sin(J), ve = H * this.x - oe * this.y, Oe = oe * this.x + H * this.y;
              return this.x = ve, this.y = Oe, this;
            }, _rotateAround: function(J, H) {
              var oe = Math.cos(J), ve = Math.sin(J), Oe = H.x + oe * (this.x - H.x) - ve * (this.y - H.y), Xe = H.y + ve * (this.x - H.x) + oe * (this.y - H.y);
              return this.x = Oe, this.y = Xe, this;
            }, _round: function() {
              return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
            } }, _.convert = function(J) {
              return J instanceof _ ? J : Array.isArray(J) ? new _(J[0], J[1]) : J;
            };
            var d = h(p), f = c;
            function c(J, H, oe, ve) {
              this.cx = 3 * J, this.bx = 3 * (oe - J) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * H, this.by = 3 * (ve - H) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = J, this.p1y = H, this.p2x = oe, this.p2y = ve;
            }
            c.prototype = { sampleCurveX: function(J) {
              return ((this.ax * J + this.bx) * J + this.cx) * J;
            }, sampleCurveY: function(J) {
              return ((this.ay * J + this.by) * J + this.cy) * J;
            }, sampleCurveDerivativeX: function(J) {
              return (3 * this.ax * J + 2 * this.bx) * J + this.cx;
            }, solveCurveX: function(J, H) {
              if (H === void 0 && (H = 1e-6), J < 0) return 0;
              if (J > 1) return 1;
              for (var oe = J, ve = 0; ve < 8; ve++) {
                var Oe = this.sampleCurveX(oe) - J;
                if (Math.abs(Oe) < H) return oe;
                var Xe = this.sampleCurveDerivativeX(oe);
                if (Math.abs(Xe) < 1e-6) break;
                oe -= Oe / Xe;
              }
              var rt = 0, yt = 1;
              for (oe = J, ve = 0; ve < 20 && (Oe = this.sampleCurveX(oe), !(Math.abs(Oe - J) < H)); ve++) J > Oe ? rt = oe : yt = oe, oe = 0.5 * (yt - rt) + rt;
              return oe;
            }, solve: function(J, H) {
              return this.sampleCurveY(this.solveCurveX(J, H));
            } };
            var g = h(f);
            let m, x;
            function w() {
              return m == null && (m = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), m;
            }
            function k() {
              if (x == null && (x = !1, w())) {
                const H = new OffscreenCanvas(5, 5).getContext("2d", { willReadFrequently: !0 });
                if (H) {
                  for (let ve = 0; ve < 25; ve++) {
                    const Oe = 4 * ve;
                    H.fillStyle = `rgb(${Oe},${Oe + 1},${Oe + 2})`, H.fillRect(ve % 5, Math.floor(ve / 5), 1, 1);
                  }
                  const oe = H.getImageData(0, 0, 5, 5).data;
                  for (let ve = 0; ve < 100; ve++) if (ve % 4 != 3 && oe[ve] !== ve) {
                    x = !0;
                    break;
                  }
                }
              }
              return x || !1;
            }
            function S(J, H, oe, ve) {
              const Oe = new g(J, H, oe, ve);
              return (Xe) => Oe.solve(Xe);
            }
            const A = S(0.25, 0.1, 0.25, 1);
            function C(J, H, oe) {
              return Math.min(oe, Math.max(H, J));
            }
            function D(J, H, oe) {
              const ve = oe - H, Oe = ((J - H) % ve + ve) % ve + H;
              return Oe === H ? oe : Oe;
            }
            function L(J, ...H) {
              for (const oe of H) for (const ve in oe) J[ve] = oe[ve];
              return J;
            }
            let E = 1;
            function P(J, H, oe) {
              const ve = {};
              for (const Oe in J) ve[Oe] = H.call(this, J[Oe], Oe, J);
              return ve;
            }
            function I(J, H, oe) {
              const ve = {};
              for (const Oe in J) H.call(this, J[Oe], Oe, J) && (ve[Oe] = J[Oe]);
              return ve;
            }
            function M(J) {
              return Array.isArray(J) ? J.map(M) : typeof J == "object" && J ? P(J, M) : J;
            }
            const O = {};
            function T(J) {
              O[J] || (typeof console < "u" && console.warn(J), O[J] = !0);
            }
            function z(J, H, oe) {
              return (oe.y - J.y) * (H.x - J.x) > (H.y - J.y) * (oe.x - J.x);
            }
            function F(J) {
              return typeof WorkerGlobalScope < "u" && J !== void 0 && J instanceof WorkerGlobalScope;
            }
            let U = null;
            function V(J) {
              return typeof ImageBitmap < "u" && J instanceof ImageBitmap;
            }
            const $ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";
            function q(J, H, oe, ve, Oe) {
              return i(this, void 0, void 0, function* () {
                if (typeof VideoFrame > "u") throw new Error("VideoFrame not supported");
                const Xe = new VideoFrame(J, { timestamp: 0 });
                try {
                  const rt = Xe == null ? void 0 : Xe.format;
                  if (!rt || !rt.startsWith("BGR") && !rt.startsWith("RGB")) throw new Error(`Unrecognized format ${rt}`);
                  const yt = rt.startsWith("BGR"), Tt = new Uint8ClampedArray(ve * Oe * 4);
                  if (yield Xe.copyTo(Tt, function(Nt, Vt, Kt, an, hn) {
                    const kn = 4 * Math.max(-Vt, 0), xn = (Math.max(0, Kt) - Kt) * an * 4 + kn, Fn = 4 * an, qn = Math.max(0, Vt), vr = Math.max(0, Kt);
                    return { rect: { x: qn, y: vr, width: Math.min(Nt.width, Vt + an) - qn, height: Math.min(Nt.height, Kt + hn) - vr }, layout: [{ offset: xn, stride: Fn }] };
                  }(J, H, oe, ve, Oe)), yt) for (let Nt = 0; Nt < Tt.length; Nt += 4) {
                    const Vt = Tt[Nt];
                    Tt[Nt] = Tt[Nt + 2], Tt[Nt + 2] = Vt;
                  }
                  return Tt;
                } finally {
                  Xe.close();
                }
              });
            }
            let K, re;
            const Y = "AbortError";
            function te() {
              return new Error(Y);
            }
            const ee = { MAX_PARALLEL_IMAGE_REQUESTS: 16, MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, MAX_TILE_CACHE_ZOOM_LEVELS: 5, REGISTERED_PROTOCOLS: {}, WORKER_URL: "" };
            function X(J) {
              return ee.REGISTERED_PROTOCOLS[J.substring(0, J.indexOf("://"))];
            }
            const Q = "global-dispatcher";
            class ue extends Error {
              constructor(H, oe, ve, Oe) {
                super(`AJAXError: ${oe} (${H}): ${ve}`), this.status = H, this.statusText = oe, this.url = ve, this.body = Oe;
              }
            }
            const ce = () => F(self) ? self.worker && self.worker.referrer : (window.location.protocol === "blob:" ? window.parent : window).location.href, he = function(J, H) {
              if (/:\/\//.test(J.url) && !/^https?:|^file:/.test(J.url)) {
                const ve = X(J.url);
                if (ve) return ve(J, H);
                if (F(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: "GR", data: J, targetMapId: Q }, H);
              }
              if (oe = J.url, !(/^file:/.test(oe) || /^file:/.test(ce()) && !/^\w+:/.test(oe))) {
                if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, "signal")) return function(ve, Oe) {
                  return i(this, void 0, void 0, function* () {
                    const Xe = new Request(ve.url, { method: ve.method || "GET", body: ve.body, credentials: ve.credentials, headers: ve.headers, cache: ve.cache, referrer: ce(), signal: Oe.signal });
                    ve.type !== "json" || Xe.headers.has("Accept") || Xe.headers.set("Accept", "application/json");
                    const rt = yield fetch(Xe);
                    if (!rt.ok) {
                      const Nt = yield rt.blob();
                      throw new ue(rt.status, rt.statusText, ve.url, Nt);
                    }
                    let yt;
                    yt = ve.type === "arrayBuffer" || ve.type === "image" ? rt.arrayBuffer() : ve.type === "json" ? rt.json() : rt.text();
                    const Tt = yield yt;
                    if (Oe.signal.aborted) throw te();
                    return { data: Tt, cacheControl: rt.headers.get("Cache-Control"), expires: rt.headers.get("Expires") };
                  });
                }(J, H);
                if (F(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: "GR", data: J, mustQueue: !0, targetMapId: Q }, H);
              }
              var oe;
              return function(ve, Oe) {
                return new Promise((Xe, rt) => {
                  var yt;
                  const Tt = new XMLHttpRequest();
                  Tt.open(ve.method || "GET", ve.url, !0), ve.type !== "arrayBuffer" && ve.type !== "image" || (Tt.responseType = "arraybuffer");
                  for (const Nt in ve.headers) Tt.setRequestHeader(Nt, ve.headers[Nt]);
                  ve.type === "json" && (Tt.responseType = "text", !((yt = ve.headers) === null || yt === void 0) && yt.Accept || Tt.setRequestHeader("Accept", "application/json")), Tt.withCredentials = ve.credentials === "include", Tt.onerror = () => {
                    rt(new Error(Tt.statusText));
                  }, Tt.onload = () => {
                    if (!Oe.signal.aborted) if ((Tt.status >= 200 && Tt.status < 300 || Tt.status === 0) && Tt.response !== null) {
                      let Nt = Tt.response;
                      if (ve.type === "json") try {
                        Nt = JSON.parse(Tt.response);
                      } catch (Vt) {
                        return void rt(Vt);
                      }
                      Xe({ data: Nt, cacheControl: Tt.getResponseHeader("Cache-Control"), expires: Tt.getResponseHeader("Expires") });
                    } else {
                      const Nt = new Blob([Tt.response], { type: Tt.getResponseHeader("Content-Type") });
                      rt(new ue(Tt.status, Tt.statusText, ve.url, Nt));
                    }
                  }, Oe.signal.addEventListener("abort", () => {
                    Tt.abort(), rt(te());
                  }), Tt.send(ve.body);
                });
              }(J, H);
            };
            function de(J) {
              if (!J || J.indexOf("://") <= 0 || J.indexOf("data:image/") === 0 || J.indexOf("blob:") === 0) return !0;
              const H = new URL(J), oe = window.location;
              return H.protocol === oe.protocol && H.host === oe.host;
            }
            function ne(J, H, oe) {
              oe[J] && oe[J].indexOf(H) !== -1 || (oe[J] = oe[J] || [], oe[J].push(H));
            }
            function ae(J, H, oe) {
              if (oe && oe[J]) {
                const ve = oe[J].indexOf(H);
                ve !== -1 && oe[J].splice(ve, 1);
              }
            }
            class se {
              constructor(H, oe = {}) {
                L(this, oe), this.type = H;
              }
            }
            class me extends se {
              constructor(H, oe = {}) {
                super("error", L({ error: H }, oe));
              }
            }
            class ye {
              on(H, oe) {
                return this._listeners = this._listeners || {}, ne(H, oe, this._listeners), this;
              }
              off(H, oe) {
                return ae(H, oe, this._listeners), ae(H, oe, this._oneTimeListeners), this;
              }
              once(H, oe) {
                return oe ? (this._oneTimeListeners = this._oneTimeListeners || {}, ne(H, oe, this._oneTimeListeners), this) : new Promise((ve) => this.once(H, ve));
              }
              fire(H, oe) {
                typeof H == "string" && (H = new se(H, oe || {}));
                const ve = H.type;
                if (this.listens(ve)) {
                  H.target = this;
                  const Oe = this._listeners && this._listeners[ve] ? this._listeners[ve].slice() : [];
                  for (const yt of Oe) yt.call(this, H);
                  const Xe = this._oneTimeListeners && this._oneTimeListeners[ve] ? this._oneTimeListeners[ve].slice() : [];
                  for (const yt of Xe) ae(ve, yt, this._oneTimeListeners), yt.call(this, H);
                  const rt = this._eventedParent;
                  rt && (L(H, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), rt.fire(H));
                } else H instanceof me && console.error(H.error);
                return this;
              }
              listens(H) {
                return this._listeners && this._listeners[H] && this._listeners[H].length > 0 || this._oneTimeListeners && this._oneTimeListeners[H] && this._oneTimeListeners[H].length > 0 || this._eventedParent && this._eventedParent.listens(H);
              }
              setEventedParent(H, oe) {
                return this._eventedParent = H, this._eventedParentData = oe, this;
              }
            }
            var pe = { $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 }, 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", "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" } }, filter: { 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" }, { "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" } } };
            const be = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
            function Ae(J, H) {
              const oe = {};
              for (const ve in J) ve !== "ref" && (oe[ve] = J[ve]);
              return be.forEach((ve) => {
                ve in H && (oe[ve] = H[ve]);
              }), oe;
            }
            function Se(J, H) {
              if (Array.isArray(J)) {
                if (!Array.isArray(H) || J.length !== H.length) return !1;
                for (let oe = 0; oe < J.length; oe++) if (!Se(J[oe], H[oe])) return !1;
                return !0;
              }
              if (typeof J == "object" && J !== null && H !== null) {
                if (typeof H != "object" || Object.keys(J).length !== Object.keys(H).length) return !1;
                for (const oe in J) if (!Se(J[oe], H[oe])) return !1;
                return !0;
              }
              return J === H;
            }
            function Me(J, H) {
              J.push(H);
            }
            function De(J, H, oe) {
              Me(oe, { command: "addSource", args: [J, H[J]] });
            }
            function Le(J, H, oe) {
              Me(H, { command: "removeSource", args: [J] }), oe[J] = !0;
            }
            function We(J, H, oe, ve) {
              Le(J, oe, ve), De(J, H, oe);
            }
            function Ee(J, H, oe) {
              let ve;
              for (ve in J[oe]) if (Object.prototype.hasOwnProperty.call(J[oe], ve) && ve !== "data" && !Se(J[oe][ve], H[oe][ve])) return !1;
              for (ve in H[oe]) if (Object.prototype.hasOwnProperty.call(H[oe], ve) && ve !== "data" && !Se(J[oe][ve], H[oe][ve])) return !1;
              return !0;
            }
            function Ne(J, H, oe, ve, Oe, Xe) {
              J = J || {}, H = H || {};
              for (const rt in J) Object.prototype.hasOwnProperty.call(J, rt) && (Se(J[rt], H[rt]) || oe.push({ command: Xe, args: [ve, rt, H[rt], Oe] }));
              for (const rt in H) Object.prototype.hasOwnProperty.call(H, rt) && !Object.prototype.hasOwnProperty.call(J, rt) && (Se(J[rt], H[rt]) || oe.push({ command: Xe, args: [ve, rt, H[rt], Oe] }));
            }
            function Ie(J) {
              return J.id;
            }
            function ge(J, H) {
              return J[H.id] = H, J;
            }
            class Ce {
              constructor(H, oe, ve, Oe) {
                this.message = (H ? `${H}: ` : "") + ve, Oe && (this.identifier = Oe), oe != null && oe.__line__ && (this.line = oe.__line__);
              }
            }
            function we(J, ...H) {
              for (const oe of H) for (const ve in oe) J[ve] = oe[ve];
              return J;
            }
            class Ge extends Error {
              constructor(H, oe) {
                super(oe), this.message = oe, this.key = H;
              }
            }
            class Re {
              constructor(H, oe = []) {
                this.parent = H, this.bindings = {};
                for (const [ve, Oe] of oe) this.bindings[ve] = Oe;
              }
              concat(H) {
                return new Re(this, H);
              }
              get(H) {
                if (this.bindings[H]) return this.bindings[H];
                if (this.parent) return this.parent.get(H);
                throw new Error(`${H} not found in scope.`);
              }
              has(H) {
                return !!this.bindings[H] || !!this.parent && this.parent.has(H);
              }
            }
            const je = { kind: "null" }, Ke = { kind: "number" }, tt = { kind: "string" }, _e = { kind: "boolean" }, Be = { kind: "color" }, $e = { kind: "object" }, Ze = { kind: "value" }, ct = { kind: "collator" }, ft = { kind: "formatted" }, _t = { kind: "padding" }, Pt = { kind: "resolvedImage" }, Dt = { kind: "variableAnchorOffsetCollection" };
            function $t(J, H) {
              return { kind: "array", itemType: J, N: H };
            }
            function Gt(J) {
              if (J.kind === "array") {
                const H = Gt(J.itemType);
                return typeof J.N == "number" ? `array<${H}, ${J.N}>` : J.itemType.kind === "value" ? "array" : `array<${H}>`;
              }
              return J.kind;
            }
            const Wt = [je, Ke, tt, _e, Be, ft, $e, $t(Ze), _t, Pt, Dt];
            function mt(J, H) {
              if (H.kind === "error") return null;
              if (J.kind === "array") {
                if (H.kind === "array" && (H.N === 0 && H.itemType.kind === "value" || !mt(J.itemType, H.itemType)) && (typeof J.N != "number" || J.N === H.N)) return null;
              } else {
                if (J.kind === H.kind) return null;
                if (J.kind === "value") {
                  for (const oe of Wt) if (!mt(oe, H)) return null;
                }
              }
              return `Expected ${Gt(J)} but found ${Gt(H)} instead.`;
            }
            function at(J, H) {
              return H.some((oe) => oe.kind === J.kind);
            }
            function vt(J, H) {
              return H.some((oe) => oe === "null" ? J === null : oe === "array" ? Array.isArray(J) : oe === "object" ? J && !Array.isArray(J) && typeof J == "object" : oe === typeof J);
            }
            function St(J, H) {
              return J.kind === "array" && H.kind === "array" ? J.itemType.kind === H.itemType.kind && typeof J.N == "number" : J.kind === H.kind;
            }
            const Je = 0.96422, nt = 1, ot = 0.82521, Ye = 4 / 29, Fe = 6 / 29, pt = 3 * Fe * Fe, Mt = Fe * Fe * Fe, At = Math.PI / 180, Rt = 180 / Math.PI;
            function Ft(J) {
              return (J %= 360) < 0 && (J += 360), J;
            }
            function lt([J, H, oe, ve]) {
              let Oe, Xe;
              const rt = Ot((0.2225045 * (J = st(J)) + 0.7168786 * (H = st(H)) + 0.0606169 * (oe = st(oe))) / nt);
              J === H && H === oe ? Oe = Xe = rt : (Oe = Ot((0.4360747 * J + 0.3850649 * H + 0.1430804 * oe) / Je), Xe = Ot((0.0139322 * J + 0.0971045 * H + 0.7141733 * oe) / ot));
              const yt = 116 * rt - 16;
              return [yt < 0 ? 0 : yt, 500 * (Oe - rt), 200 * (rt - Xe), ve];
            }
            function st(J) {
              return J <= 0.04045 ? J / 12.92 : Math.pow((J + 0.055) / 1.055, 2.4);
            }
            function Ot(J) {
              return J > Mt ? Math.pow(J, 0.3333333333333333) : J / pt + Ye;
            }
            function kt([J, H, oe, ve]) {
              let Oe = (J + 16) / 116, Xe = isNaN(H) ? Oe : Oe + H / 500, rt = isNaN(oe) ? Oe : Oe - oe / 200;
              return Oe = nt * xt(Oe), Xe = Je * xt(Xe), rt = ot * xt(rt), [Bt(3.1338561 * Xe - 1.6168667 * Oe - 0.4906146 * rt), Bt(-0.9787684 * Xe + 1.9161415 * Oe + 0.033454 * rt), Bt(0.0719453 * Xe - 0.2289914 * Oe + 1.4052427 * rt), ve];
            }
            function Bt(J) {
              return (J = J <= 304e-5 ? 12.92 * J : 1.055 * Math.pow(J, 0.4166666666666667) - 0.055) < 0 ? 0 : J > 1 ? 1 : J;
            }
            function xt(J) {
              return J > Fe ? J * J * J : pt * (J - Ye);
            }
            function Jt(J) {
              if ((J = J.toLowerCase().trim()) === "transparent") return [0, 0, 0, 0];
              const H = sn[J];
              if (H) {
                const [ve, Oe, Xe] = H;
                return [ve / 255, Oe / 255, Xe / 255, 1];
              }
              if (J.startsWith("#") && /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(J)) {
                const ve = J.length < 6 ? 1 : 2;
                let Oe = 1;
                return [qt(J.slice(Oe, Oe += ve)), qt(J.slice(Oe, Oe += ve)), qt(J.slice(Oe, Oe += ve)), qt(J.slice(Oe, Oe + ve) || "ff")];
              }
              if (J.startsWith("rgb")) {
                const ve = /^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/, Oe = J.match(ve);
                if (Oe) {
                  const [Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn] = Oe, qn = [Tt || " ", Kt || " ", kn].join("");
                  if (qn === "  " || qn === "  /" || qn === ",," || qn === ",,,") {
                    const vr = [yt, Vt, hn].join(""), rr = vr === "%%%" ? 100 : vr === "" ? 255 : 0;
                    if (rr) {
                      const dr = [Yt(+rt / rr, 0, 1), Yt(+Nt / rr, 0, 1), Yt(+an / rr, 0, 1), xn ? en(+xn, Fn) : 1];
                      if (Ht(dr)) return dr;
                    }
                  }
                  return;
                }
              }
              const oe = J.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);
              if (oe) {
                const [ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt] = oe, an = [Xe || " ", yt || " ", Nt].join("");
                if (an === "  " || an === "  /" || an === ",," || an === ",,,") {
                  const hn = [+Oe, Yt(+rt, 0, 100), Yt(+Tt, 0, 100), Vt ? en(+Vt, Kt) : 1];
                  if (Ht(hn)) return function([kn, xn, Fn, qn]) {
                    function vr(rr) {
                      const dr = (rr + kn / 30) % 12, jr = xn * Math.min(Fn, 1 - Fn);
                      return Fn - jr * Math.max(-1, Math.min(dr - 3, 9 - dr, 1));
                    }
                    return kn = Ft(kn), xn /= 100, Fn /= 100, [vr(0), vr(8), vr(4), qn];
                  }(hn);
                }
              }
            }
            function qt(J) {
              return parseInt(J.padEnd(2, J), 16) / 255;
            }
            function en(J, H) {
              return Yt(H ? J / 100 : J, 0, 1);
            }
            function Yt(J, H, oe) {
              return Math.min(Math.max(H, J), oe);
            }
            function Ht(J) {
              return !J.some(Number.isNaN);
            }
            const sn = { 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] };
            class fn {
              constructor(H, oe, ve, Oe = 1, Xe = !0) {
                this.r = H, this.g = oe, this.b = ve, this.a = Oe, Xe || (this.r *= Oe, this.g *= Oe, this.b *= Oe, Oe || this.overwriteGetter("rgb", [H, oe, ve, Oe]));
              }
              static parse(H) {
                if (H instanceof fn) return H;
                if (typeof H != "string") return;
                const oe = Jt(H);
                return oe ? new fn(...oe, !1) : void 0;
              }
              get rgb() {
                const { r: H, g: oe, b: ve, a: Oe } = this, Xe = Oe || 1 / 0;
                return this.overwriteGetter("rgb", [H / Xe, oe / Xe, ve / Xe, Oe]);
              }
              get hcl() {
                return this.overwriteGetter("hcl", function(H) {
                  const [oe, ve, Oe, Xe] = lt(H), rt = Math.sqrt(ve * ve + Oe * Oe);
                  return [Math.round(1e4 * rt) ? Ft(Math.atan2(Oe, ve) * Rt) : NaN, rt, oe, Xe];
                }(this.rgb));
              }
              get lab() {
                return this.overwriteGetter("lab", lt(this.rgb));
              }
              overwriteGetter(H, oe) {
                return Object.defineProperty(this, H, { value: oe }), oe;
              }
              toString() {
                const [H, oe, ve, Oe] = this.rgb;
                return `rgba(${[H, oe, ve].map((Xe) => Math.round(255 * Xe)).join(",")},${Oe})`;
              }
            }
            fn.black = new fn(0, 0, 0, 1), fn.white = new fn(1, 1, 1, 1), fn.transparent = new fn(0, 0, 0, 0), fn.red = new fn(1, 0, 0, 1);
            class In {
              constructor(H, oe, ve) {
                this.sensitivity = H ? oe ? "variant" : "case" : oe ? "accent" : "base", this.locale = ve, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
              }
              compare(H, oe) {
                return this.collator.compare(H, oe);
              }
              resolvedLocale() {
                return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
              }
            }
            class zn {
              constructor(H, oe, ve, Oe, Xe) {
                this.text = H, this.image = oe, this.scale = ve, this.fontStack = Oe, this.textColor = Xe;
              }
            }
            class Cn {
              constructor(H) {
                this.sections = H;
              }
              static fromString(H) {
                return new Cn([new zn(H, null, null, null, null)]);
              }
              isEmpty() {
                return this.sections.length === 0 || !this.sections.some((H) => H.text.length !== 0 || H.image && H.image.name.length !== 0);
              }
              static factory(H) {
                return H instanceof Cn ? H : Cn.fromString(H);
              }
              toString() {
                return this.sections.length === 0 ? "" : this.sections.map((H) => H.text).join("");
              }
            }
            class gn {
              constructor(H) {
                this.values = H.slice();
              }
              static parse(H) {
                if (H instanceof gn) return H;
                if (typeof H == "number") return new gn([H, H, H, H]);
                if (Array.isArray(H) && !(H.length < 1 || H.length > 4)) {
                  for (const oe of H) if (typeof oe != "number") return;
                  switch (H.length) {
                    case 1:
                      H = [H[0], H[0], H[0], H[0]];
                      break;
                    case 2:
                      H = [H[0], H[1], H[0], H[1]];
                      break;
                    case 3:
                      H = [H[0], H[1], H[2], H[1]];
                  }
                  return new gn(H);
                }
              }
              toString() {
                return JSON.stringify(this.values);
              }
            }
            const Mn = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
            class Xn {
              constructor(H) {
                this.values = H.slice();
              }
              static parse(H) {
                if (H instanceof Xn) return H;
                if (Array.isArray(H) && !(H.length < 1) && H.length % 2 == 0) {
                  for (let oe = 0; oe < H.length; oe += 2) {
                    const ve = H[oe], Oe = H[oe + 1];
                    if (typeof ve != "string" || !Mn.has(ve) || !Array.isArray(Oe) || Oe.length !== 2 || typeof Oe[0] != "number" || typeof Oe[1] != "number") return;
                  }
                  return new Xn(H);
                }
              }
              toString() {
                return JSON.stringify(this.values);
              }
            }
            class Pn {
              constructor(H) {
                this.name = H.name, this.available = H.available;
              }
              toString() {
                return this.name;
              }
              static fromString(H) {
                return H ? new Pn({ name: H, available: !1 }) : null;
              }
            }
            function wn(J, H, oe, ve) {
              return typeof J == "number" && J >= 0 && J <= 255 && typeof H == "number" && H >= 0 && H <= 255 && typeof oe == "number" && oe >= 0 && oe <= 255 ? ve === void 0 || typeof ve == "number" && ve >= 0 && ve <= 1 ? null : `Invalid rgba value [${[J, H, oe, ve].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof ve == "number" ? [J, H, oe, ve] : [J, H, oe]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
            }
            function Rn(J) {
              if (J === null || typeof J == "string" || typeof J == "boolean" || typeof J == "number" || J instanceof fn || J instanceof In || J instanceof Cn || J instanceof gn || J instanceof Xn || J instanceof Pn) return !0;
              if (Array.isArray(J)) {
                for (const H of J) if (!Rn(H)) return !1;
                return !0;
              }
              if (typeof J == "object") {
                for (const H in J) if (!Rn(J[H])) return !1;
                return !0;
              }
              return !1;
            }
            function _n(J) {
              if (J === null) return je;
              if (typeof J == "string") return tt;
              if (typeof J == "boolean") return _e;
              if (typeof J == "number") return Ke;
              if (J instanceof fn) return Be;
              if (J instanceof In) return ct;
              if (J instanceof Cn) return ft;
              if (J instanceof gn) return _t;
              if (J instanceof Xn) return Dt;
              if (J instanceof Pn) return Pt;
              if (Array.isArray(J)) {
                const H = J.length;
                let oe;
                for (const ve of J) {
                  const Oe = _n(ve);
                  if (oe) {
                    if (oe === Oe) continue;
                    oe = Ze;
                    break;
                  }
                  oe = Oe;
                }
                return $t(oe || Ze, H);
              }
              return $e;
            }
            function En(J) {
              const H = typeof J;
              return J === null ? "" : H === "string" || H === "number" || H === "boolean" ? String(J) : J instanceof fn || J instanceof Cn || J instanceof gn || J instanceof Xn || J instanceof Pn ? J.toString() : JSON.stringify(J);
            }
            class Kn {
              constructor(H, oe) {
                this.type = H, this.value = oe;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error(`'literal' expression requires exactly one argument, but found ${H.length - 1} instead.`);
                if (!Rn(H[1])) return oe.error("invalid value");
                const ve = H[1];
                let Oe = _n(ve);
                const Xe = oe.expectedType;
                return Oe.kind !== "array" || Oe.N !== 0 || !Xe || Xe.kind !== "array" || typeof Xe.N == "number" && Xe.N !== 0 || (Oe = Xe), new Kn(Oe, ve);
              }
              evaluate() {
                return this.value;
              }
              eachChild() {
              }
              outputDefined() {
                return !0;
              }
            }
            class Wn {
              constructor(H) {
                this.name = "ExpressionEvaluationError", this.message = H;
              }
              toJSON() {
                return this.message;
              }
            }
            const hr = { string: tt, number: Ke, boolean: _e, object: $e };
            class Zn {
              constructor(H, oe) {
                this.type = H, this.args = oe;
              }
              static parse(H, oe) {
                if (H.length < 2) return oe.error("Expected at least one argument.");
                let ve, Oe = 1;
                const Xe = H[0];
                if (Xe === "array") {
                  let yt, Tt;
                  if (H.length > 2) {
                    const Nt = H[1];
                    if (typeof Nt != "string" || !(Nt in hr) || Nt === "object") return oe.error('The item type argument of "array" must be one of string, number, boolean', 1);
                    yt = hr[Nt], Oe++;
                  } else yt = Ze;
                  if (H.length > 3) {
                    if (H[2] !== null && (typeof H[2] != "number" || H[2] < 0 || H[2] !== Math.floor(H[2]))) return oe.error('The length argument to "array" must be a positive integer literal', 2);
                    Tt = H[2], Oe++;
                  }
                  ve = $t(yt, Tt);
                } else {
                  if (!hr[Xe]) throw new Error(`Types doesn't contain name = ${Xe}`);
                  ve = hr[Xe];
                }
                const rt = [];
                for (; Oe < H.length; Oe++) {
                  const yt = oe.parse(H[Oe], Oe, Ze);
                  if (!yt) return null;
                  rt.push(yt);
                }
                return new Zn(ve, rt);
              }
              evaluate(H) {
                for (let oe = 0; oe < this.args.length; oe++) {
                  const ve = this.args[oe].evaluate(H);
                  if (!mt(this.type, _n(ve))) return ve;
                  if (oe === this.args.length - 1) throw new Wn(`Expected value to be of type ${Gt(this.type)}, but found ${Gt(_n(ve))} instead.`);
                }
                throw new Error();
              }
              eachChild(H) {
                this.args.forEach(H);
              }
              outputDefined() {
                return this.args.every((H) => H.outputDefined());
              }
            }
            const lr = { "to-boolean": _e, "to-color": Be, "to-number": Ke, "to-string": tt };
            class cr {
              constructor(H, oe) {
                this.type = H, this.args = oe;
              }
              static parse(H, oe) {
                if (H.length < 2) return oe.error("Expected at least one argument.");
                const ve = H[0];
                if (!lr[ve]) throw new Error(`Can't parse ${ve} as it is not part of the known types`);
                if ((ve === "to-boolean" || ve === "to-string") && H.length !== 2) return oe.error("Expected one argument.");
                const Oe = lr[ve], Xe = [];
                for (let rt = 1; rt < H.length; rt++) {
                  const yt = oe.parse(H[rt], rt, Ze);
                  if (!yt) return null;
                  Xe.push(yt);
                }
                return new cr(Oe, Xe);
              }
              evaluate(H) {
                switch (this.type.kind) {
                  case "boolean":
                    return !!this.args[0].evaluate(H);
                  case "color": {
                    let oe, ve;
                    for (const Oe of this.args) {
                      if (oe = Oe.evaluate(H), ve = null, oe instanceof fn) return oe;
                      if (typeof oe == "string") {
                        const Xe = H.parseColor(oe);
                        if (Xe) return Xe;
                      } else if (Array.isArray(oe) && (ve = oe.length < 3 || oe.length > 4 ? `Invalid rbga value ${JSON.stringify(oe)}: expected an array containing either three or four numeric values.` : wn(oe[0], oe[1], oe[2], oe[3]), !ve)) return new fn(oe[0] / 255, oe[1] / 255, oe[2] / 255, oe[3]);
                    }
                    throw new Wn(ve || `Could not parse color from value '${typeof oe == "string" ? oe : JSON.stringify(oe)}'`);
                  }
                  case "padding": {
                    let oe;
                    for (const ve of this.args) {
                      oe = ve.evaluate(H);
                      const Oe = gn.parse(oe);
                      if (Oe) return Oe;
                    }
                    throw new Wn(`Could not parse padding from value '${typeof oe == "string" ? oe : JSON.stringify(oe)}'`);
                  }
                  case "variableAnchorOffsetCollection": {
                    let oe;
                    for (const ve of this.args) {
                      oe = ve.evaluate(H);
                      const Oe = Xn.parse(oe);
                      if (Oe) return Oe;
                    }
                    throw new Wn(`Could not parse variableAnchorOffsetCollection from value '${typeof oe == "string" ? oe : JSON.stringify(oe)}'`);
                  }
                  case "number": {
                    let oe = null;
                    for (const ve of this.args) {
                      if (oe = ve.evaluate(H), oe === null) return 0;
                      const Oe = Number(oe);
                      if (!isNaN(Oe)) return Oe;
                    }
                    throw new Wn(`Could not convert ${JSON.stringify(oe)} to number.`);
                  }
                  case "formatted":
                    return Cn.fromString(En(this.args[0].evaluate(H)));
                  case "resolvedImage":
                    return Pn.fromString(En(this.args[0].evaluate(H)));
                  default:
                    return En(this.args[0].evaluate(H));
                }
              }
              eachChild(H) {
                this.args.forEach(H);
              }
              outputDefined() {
                return this.args.every((H) => H.outputDefined());
              }
            }
            const zr = ["Unknown", "Point", "LineString", "Polygon"];
            class Wr {
              constructor() {
                this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
              }
              id() {
                return this.feature && "id" in this.feature ? this.feature.id : null;
              }
              geometryType() {
                return this.feature ? typeof this.feature.type == "number" ? zr[this.feature.type] : this.feature.type : null;
              }
              geometry() {
                return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
              }
              canonicalID() {
                return this.canonical;
              }
              properties() {
                return this.feature && this.feature.properties || {};
              }
              parseColor(H) {
                let oe = this._parseColorCache[H];
                return oe || (oe = this._parseColorCache[H] = fn.parse(H)), oe;
              }
            }
            class mr {
              constructor(H, oe, ve = [], Oe, Xe = new Re(), rt = []) {
                this.registry = H, this.path = ve, this.key = ve.map((yt) => `[${yt}]`).join(""), this.scope = Xe, this.errors = rt, this.expectedType = Oe, this._isConstant = oe;
              }
              parse(H, oe, ve, Oe, Xe = {}) {
                return oe ? this.concat(oe, ve, Oe)._parse(H, Xe) : this._parse(H, Xe);
              }
              _parse(H, oe) {
                function ve(Oe, Xe, rt) {
                  return rt === "assert" ? new Zn(Xe, [Oe]) : rt === "coerce" ? new cr(Xe, [Oe]) : Oe;
                }
                if (H !== null && typeof H != "string" && typeof H != "boolean" && typeof H != "number" || (H = ["literal", H]), Array.isArray(H)) {
                  if (H.length === 0) return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');
                  const Oe = H[0];
                  if (typeof Oe != "string") return this.error(`Expression name must be a string, but found ${typeof Oe} instead. If you wanted a literal array, use ["literal", [...]].`, 0), null;
                  const Xe = this.registry[Oe];
                  if (Xe) {
                    let rt = Xe.parse(H, this);
                    if (!rt) return null;
                    if (this.expectedType) {
                      const yt = this.expectedType, Tt = rt.type;
                      if (yt.kind !== "string" && yt.kind !== "number" && yt.kind !== "boolean" && yt.kind !== "object" && yt.kind !== "array" || Tt.kind !== "value") if (yt.kind !== "color" && yt.kind !== "formatted" && yt.kind !== "resolvedImage" || Tt.kind !== "value" && Tt.kind !== "string") if (yt.kind !== "padding" || Tt.kind !== "value" && Tt.kind !== "number" && Tt.kind !== "array") if (yt.kind !== "variableAnchorOffsetCollection" || Tt.kind !== "value" && Tt.kind !== "array") {
                        if (this.checkSubtype(yt, Tt)) return null;
                      } else rt = ve(rt, yt, oe.typeAnnotation || "coerce");
                      else rt = ve(rt, yt, oe.typeAnnotation || "coerce");
                      else rt = ve(rt, yt, oe.typeAnnotation || "coerce");
                      else rt = ve(rt, yt, oe.typeAnnotation || "assert");
                    }
                    if (!(rt instanceof Kn) && rt.type.kind !== "resolvedImage" && this._isConstant(rt)) {
                      const yt = new Wr();
                      try {
                        rt = new Kn(rt.type, rt.evaluate(yt));
                      } catch (Tt) {
                        return this.error(Tt.message), null;
                      }
                    }
                    return rt;
                  }
                  return this.error(`Unknown expression "${Oe}". If you wanted a literal array, use ["literal", [...]].`, 0);
                }
                return H === void 0 ? this.error("'undefined' value invalid. Use null instead.") : typeof H == "object" ? this.error('Bare objects invalid. Use ["literal", {...}] instead.') : this.error(`Expected an array, but found ${typeof H} instead.`);
              }
              concat(H, oe, ve) {
                const Oe = typeof H == "number" ? this.path.concat(H) : this.path, Xe = ve ? this.scope.concat(ve) : this.scope;
                return new mr(this.registry, this._isConstant, Oe, oe || null, Xe, this.errors);
              }
              error(H, ...oe) {
                const ve = `${this.key}${oe.map((Oe) => `[${Oe}]`).join("")}`;
                this.errors.push(new Ge(ve, H));
              }
              checkSubtype(H, oe) {
                const ve = mt(H, oe);
                return ve && this.error(ve), ve;
              }
            }
            class Ir {
              constructor(H, oe) {
                this.type = oe.type, this.bindings = [].concat(H), this.result = oe;
              }
              evaluate(H) {
                return this.result.evaluate(H);
              }
              eachChild(H) {
                for (const oe of this.bindings) H(oe[1]);
                H(this.result);
              }
              static parse(H, oe) {
                if (H.length < 4) return oe.error(`Expected at least 3 arguments, but found ${H.length - 1} instead.`);
                const ve = [];
                for (let Xe = 1; Xe < H.length - 1; Xe += 2) {
                  const rt = H[Xe];
                  if (typeof rt != "string") return oe.error(`Expected string, but found ${typeof rt} instead.`, Xe);
                  if (/[^a-zA-Z0-9_]/.test(rt)) return oe.error("Variable names must contain only alphanumeric characters or '_'.", Xe);
                  const yt = oe.parse(H[Xe + 1], Xe + 1);
                  if (!yt) return null;
                  ve.push([rt, yt]);
                }
                const Oe = oe.parse(H[H.length - 1], H.length - 1, oe.expectedType, ve);
                return Oe ? new Ir(ve, Oe) : null;
              }
              outputDefined() {
                return this.result.outputDefined();
              }
            }
            class yr {
              constructor(H, oe) {
                this.type = oe.type, this.name = H, this.boundExpression = oe;
              }
              static parse(H, oe) {
                if (H.length !== 2 || typeof H[1] != "string") return oe.error("'var' expression requires exactly one string literal argument.");
                const ve = H[1];
                return oe.scope.has(ve) ? new yr(ve, oe.scope.get(ve)) : oe.error(`Unknown variable "${ve}". Make sure "${ve}" has been bound in an enclosing "let" expression before using it.`, 1);
              }
              evaluate(H) {
                return this.boundExpression.evaluate(H);
              }
              eachChild() {
              }
              outputDefined() {
                return !1;
              }
            }
            class Vr {
              constructor(H, oe, ve) {
                this.type = H, this.index = oe, this.input = ve;
              }
              static parse(H, oe) {
                if (H.length !== 3) return oe.error(`Expected 2 arguments, but found ${H.length - 1} instead.`);
                const ve = oe.parse(H[1], 1, Ke), Oe = oe.parse(H[2], 2, $t(oe.expectedType || Ze));
                if (!ve || !Oe) return null;
                const Xe = Oe.type;
                return new Vr(Xe.itemType, ve, Oe);
              }
              evaluate(H) {
                const oe = this.index.evaluate(H), ve = this.input.evaluate(H);
                if (oe < 0) throw new Wn(`Array index out of bounds: ${oe} < 0.`);
                if (oe >= ve.length) throw new Wn(`Array index out of bounds: ${oe} > ${ve.length - 1}.`);
                if (oe !== Math.floor(oe)) throw new Wn(`Array index must be an integer, but found ${oe} instead.`);
                return ve[oe];
              }
              eachChild(H) {
                H(this.index), H(this.input);
              }
              outputDefined() {
                return !1;
              }
            }
            class rn {
              constructor(H, oe) {
                this.type = _e, this.needle = H, this.haystack = oe;
              }
              static parse(H, oe) {
                if (H.length !== 3) return oe.error(`Expected 2 arguments, but found ${H.length - 1} instead.`);
                const ve = oe.parse(H[1], 1, Ze), Oe = oe.parse(H[2], 2, Ze);
                return ve && Oe ? at(ve.type, [_e, tt, Ke, je, Ze]) ? new rn(ve, Oe) : oe.error(`Expected first argument to be of type boolean, string, number or null, but found ${Gt(ve.type)} instead`) : null;
              }
              evaluate(H) {
                const oe = this.needle.evaluate(H), ve = this.haystack.evaluate(H);
                if (!ve) return !1;
                if (!vt(oe, ["boolean", "string", "number", "null"])) throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${Gt(_n(oe))} instead.`);
                if (!vt(ve, ["string", "array"])) throw new Wn(`Expected second argument to be of type array or string, but found ${Gt(_n(ve))} instead.`);
                return ve.indexOf(oe) >= 0;
              }
              eachChild(H) {
                H(this.needle), H(this.haystack);
              }
              outputDefined() {
                return !0;
              }
            }
            class Tn {
              constructor(H, oe, ve) {
                this.type = Ke, this.needle = H, this.haystack = oe, this.fromIndex = ve;
              }
              static parse(H, oe) {
                if (H.length <= 2 || H.length >= 5) return oe.error(`Expected 3 or 4 arguments, but found ${H.length - 1} instead.`);
                const ve = oe.parse(H[1], 1, Ze), Oe = oe.parse(H[2], 2, Ze);
                if (!ve || !Oe) return null;
                if (!at(ve.type, [_e, tt, Ke, je, Ze])) return oe.error(`Expected first argument to be of type boolean, string, number or null, but found ${Gt(ve.type)} instead`);
                if (H.length === 4) {
                  const Xe = oe.parse(H[3], 3, Ke);
                  return Xe ? new Tn(ve, Oe, Xe) : null;
                }
                return new Tn(ve, Oe);
              }
              evaluate(H) {
                const oe = this.needle.evaluate(H), ve = this.haystack.evaluate(H);
                if (!vt(oe, ["boolean", "string", "number", "null"])) throw new Wn(`Expected first argument to be of type boolean, string, number or null, but found ${Gt(_n(oe))} instead.`);
                if (!vt(ve, ["string", "array"])) throw new Wn(`Expected second argument to be of type array or string, but found ${Gt(_n(ve))} instead.`);
                if (this.fromIndex) {
                  const Oe = this.fromIndex.evaluate(H);
                  return ve.indexOf(oe, Oe);
                }
                return ve.indexOf(oe);
              }
              eachChild(H) {
                H(this.needle), H(this.haystack), this.fromIndex && H(this.fromIndex);
              }
              outputDefined() {
                return !1;
              }
            }
            class sr {
              constructor(H, oe, ve, Oe, Xe, rt) {
                this.inputType = H, this.type = oe, this.input = ve, this.cases = Oe, this.outputs = Xe, this.otherwise = rt;
              }
              static parse(H, oe) {
                if (H.length < 5) return oe.error(`Expected at least 4 arguments, but found only ${H.length - 1}.`);
                if (H.length % 2 != 1) return oe.error("Expected an even number of arguments.");
                let ve, Oe;
                oe.expectedType && oe.expectedType.kind !== "value" && (Oe = oe.expectedType);
                const Xe = {}, rt = [];
                for (let Nt = 2; Nt < H.length - 1; Nt += 2) {
                  let Vt = H[Nt];
                  const Kt = H[Nt + 1];
                  Array.isArray(Vt) || (Vt = [Vt]);
                  const an = oe.concat(Nt);
                  if (Vt.length === 0) return an.error("Expected at least one branch label.");
                  for (const kn of Vt) {
                    if (typeof kn != "number" && typeof kn != "string") return an.error("Branch labels must be numbers or strings.");
                    if (typeof kn == "number" && Math.abs(kn) > Number.MAX_SAFE_INTEGER) return an.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);
                    if (typeof kn == "number" && Math.floor(kn) !== kn) return an.error("Numeric branch labels must be integer values.");
                    if (ve) {
                      if (an.checkSubtype(ve, _n(kn))) return null;
                    } else ve = _n(kn);
                    if (Xe[String(kn)] !== void 0) return an.error("Branch labels must be unique.");
                    Xe[String(kn)] = rt.length;
                  }
                  const hn = oe.parse(Kt, Nt, Oe);
                  if (!hn) return null;
                  Oe = Oe || hn.type, rt.push(hn);
                }
                const yt = oe.parse(H[1], 1, Ze);
                if (!yt) return null;
                const Tt = oe.parse(H[H.length - 1], H.length - 1, Oe);
                return Tt ? yt.type.kind !== "value" && oe.concat(1).checkSubtype(ve, yt.type) ? null : new sr(ve, Oe, yt, Xe, rt, Tt) : null;
              }
              evaluate(H) {
                const oe = this.input.evaluate(H);
                return (_n(oe) === this.inputType && this.outputs[this.cases[oe]] || this.otherwise).evaluate(H);
              }
              eachChild(H) {
                H(this.input), this.outputs.forEach(H), H(this.otherwise);
              }
              outputDefined() {
                return this.outputs.every((H) => H.outputDefined()) && this.otherwise.outputDefined();
              }
            }
            class $n {
              constructor(H, oe, ve) {
                this.type = H, this.branches = oe, this.otherwise = ve;
              }
              static parse(H, oe) {
                if (H.length < 4) return oe.error(`Expected at least 3 arguments, but found only ${H.length - 1}.`);
                if (H.length % 2 != 0) return oe.error("Expected an odd number of arguments.");
                let ve;
                oe.expectedType && oe.expectedType.kind !== "value" && (ve = oe.expectedType);
                const Oe = [];
                for (let rt = 1; rt < H.length - 1; rt += 2) {
                  const yt = oe.parse(H[rt], rt, _e);
                  if (!yt) return null;
                  const Tt = oe.parse(H[rt + 1], rt + 1, ve);
                  if (!Tt) return null;
                  Oe.push([yt, Tt]), ve = ve || Tt.type;
                }
                const Xe = oe.parse(H[H.length - 1], H.length - 1, ve);
                if (!Xe) return null;
                if (!ve) throw new Error("Can't infer output type");
                return new $n(ve, Oe, Xe);
              }
              evaluate(H) {
                for (const [oe, ve] of this.branches) if (oe.evaluate(H)) return ve.evaluate(H);
                return this.otherwise.evaluate(H);
              }
              eachChild(H) {
                for (const [oe, ve] of this.branches) H(oe), H(ve);
                H(this.otherwise);
              }
              outputDefined() {
                return this.branches.every(([H, oe]) => oe.outputDefined()) && this.otherwise.outputDefined();
              }
            }
            class ur {
              constructor(H, oe, ve, Oe) {
                this.type = H, this.input = oe, this.beginIndex = ve, this.endIndex = Oe;
              }
              static parse(H, oe) {
                if (H.length <= 2 || H.length >= 5) return oe.error(`Expected 3 or 4 arguments, but found ${H.length - 1} instead.`);
                const ve = oe.parse(H[1], 1, Ze), Oe = oe.parse(H[2], 2, Ke);
                if (!ve || !Oe) return null;
                if (!at(ve.type, [$t(Ze), tt, Ze])) return oe.error(`Expected first argument to be of type array or string, but found ${Gt(ve.type)} instead`);
                if (H.length === 4) {
                  const Xe = oe.parse(H[3], 3, Ke);
                  return Xe ? new ur(ve.type, ve, Oe, Xe) : null;
                }
                return new ur(ve.type, ve, Oe);
              }
              evaluate(H) {
                const oe = this.input.evaluate(H), ve = this.beginIndex.evaluate(H);
                if (!vt(oe, ["string", "array"])) throw new Wn(`Expected first argument to be of type array or string, but found ${Gt(_n(oe))} instead.`);
                if (this.endIndex) {
                  const Oe = this.endIndex.evaluate(H);
                  return oe.slice(ve, Oe);
                }
                return oe.slice(ve);
              }
              eachChild(H) {
                H(this.input), H(this.beginIndex), this.endIndex && H(this.endIndex);
              }
              outputDefined() {
                return !1;
              }
            }
            function Tr(J, H) {
              const oe = J.length - 1;
              let ve, Oe, Xe = 0, rt = oe, yt = 0;
              for (; Xe <= rt; ) if (yt = Math.floor((Xe + rt) / 2), ve = J[yt], Oe = J[yt + 1], ve <= H) {
                if (yt === oe || H < Oe) return yt;
                Xe = yt + 1;
              } else {
                if (!(ve > H)) throw new Wn("Input is not a number.");
                rt = yt - 1;
              }
              return 0;
            }
            class wr {
              constructor(H, oe, ve) {
                this.type = H, this.input = oe, this.labels = [], this.outputs = [];
                for (const [Oe, Xe] of ve) this.labels.push(Oe), this.outputs.push(Xe);
              }
              static parse(H, oe) {
                if (H.length - 1 < 4) return oe.error(`Expected at least 4 arguments, but found only ${H.length - 1}.`);
                if ((H.length - 1) % 2 != 0) return oe.error("Expected an even number of arguments.");
                const ve = oe.parse(H[1], 1, Ke);
                if (!ve) return null;
                const Oe = [];
                let Xe = null;
                oe.expectedType && oe.expectedType.kind !== "value" && (Xe = oe.expectedType);
                for (let rt = 1; rt < H.length; rt += 2) {
                  const yt = rt === 1 ? -1 / 0 : H[rt], Tt = H[rt + 1], Nt = rt, Vt = rt + 1;
                  if (typeof yt != "number") return oe.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', Nt);
                  if (Oe.length && Oe[Oe.length - 1][0] >= yt) return oe.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', Nt);
                  const Kt = oe.parse(Tt, Vt, Xe);
                  if (!Kt) return null;
                  Xe = Xe || Kt.type, Oe.push([yt, Kt]);
                }
                return new wr(Xe, ve, Oe);
              }
              evaluate(H) {
                const oe = this.labels, ve = this.outputs;
                if (oe.length === 1) return ve[0].evaluate(H);
                const Oe = this.input.evaluate(H);
                if (Oe <= oe[0]) return ve[0].evaluate(H);
                const Xe = oe.length;
                return Oe >= oe[Xe - 1] ? ve[Xe - 1].evaluate(H) : ve[Tr(oe, Oe)].evaluate(H);
              }
              eachChild(H) {
                H(this.input);
                for (const oe of this.outputs) H(oe);
              }
              outputDefined() {
                return this.outputs.every((H) => H.outputDefined());
              }
            }
            function Fr(J) {
              return J && J.__esModule && Object.prototype.hasOwnProperty.call(J, "default") ? J.default : J;
            }
            var Xr = un;
            function un(J, H, oe, ve) {
              this.cx = 3 * J, this.bx = 3 * (oe - J) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * H, this.by = 3 * (ve - H) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = J, this.p1y = H, this.p2x = oe, this.p2y = ve;
            }
            un.prototype = { sampleCurveX: function(J) {
              return ((this.ax * J + this.bx) * J + this.cx) * J;
            }, sampleCurveY: function(J) {
              return ((this.ay * J + this.by) * J + this.cy) * J;
            }, sampleCurveDerivativeX: function(J) {
              return (3 * this.ax * J + 2 * this.bx) * J + this.cx;
            }, solveCurveX: function(J, H) {
              if (H === void 0 && (H = 1e-6), J < 0) return 0;
              if (J > 1) return 1;
              for (var oe = J, ve = 0; ve < 8; ve++) {
                var Oe = this.sampleCurveX(oe) - J;
                if (Math.abs(Oe) < H) return oe;
                var Xe = this.sampleCurveDerivativeX(oe);
                if (Math.abs(Xe) < 1e-6) break;
                oe -= Oe / Xe;
              }
              var rt = 0, yt = 1;
              for (oe = J, ve = 0; ve < 20 && (Oe = this.sampleCurveX(oe), !(Math.abs(Oe - J) < H)); ve++) J > Oe ? rt = oe : yt = oe, oe = 0.5 * (yt - rt) + rt;
              return oe;
            }, solve: function(J, H) {
              return this.sampleCurveY(this.solveCurveX(J, H));
            } };
            var Gn = Fr(Xr);
            function on(J, H, oe) {
              return J + oe * (H - J);
            }
            function ln(J, H, oe) {
              return J.map((ve, Oe) => on(ve, H[Oe], oe));
            }
            const bn = { number: on, color: function(J, H, oe, ve = "rgb") {
              switch (ve) {
                case "rgb": {
                  const [Oe, Xe, rt, yt] = ln(J.rgb, H.rgb, oe);
                  return new fn(Oe, Xe, rt, yt, !1);
                }
                case "hcl": {
                  const [Oe, Xe, rt, yt] = J.hcl, [Tt, Nt, Vt, Kt] = H.hcl;
                  let an, hn;
                  if (isNaN(Oe) || isNaN(Tt)) isNaN(Oe) ? isNaN(Tt) ? an = NaN : (an = Tt, rt !== 1 && rt !== 0 || (hn = Nt)) : (an = Oe, Vt !== 1 && Vt !== 0 || (hn = Xe));
                  else {
                    let vr = Tt - Oe;
                    Tt > Oe && vr > 180 ? vr -= 360 : Tt < Oe && Oe - Tt > 180 && (vr += 360), an = Oe + oe * vr;
                  }
                  const [kn, xn, Fn, qn] = function([vr, rr, dr, jr]) {
                    return vr = isNaN(vr) ? 0 : vr * At, kt([dr, Math.cos(vr) * rr, Math.sin(vr) * rr, jr]);
                  }([an, hn ?? on(Xe, Nt, oe), on(rt, Vt, oe), on(yt, Kt, oe)]);
                  return new fn(kn, xn, Fn, qn, !1);
                }
                case "lab": {
                  const [Oe, Xe, rt, yt] = kt(ln(J.lab, H.lab, oe));
                  return new fn(Oe, Xe, rt, yt, !1);
                }
              }
            }, array: ln, padding: function(J, H, oe) {
              return new gn(ln(J.values, H.values, oe));
            }, variableAnchorOffsetCollection: function(J, H, oe) {
              const ve = J.values, Oe = H.values;
              if (ve.length !== Oe.length) throw new Wn(`Cannot interpolate values of different length. from: ${J.toString()}, to: ${H.toString()}`);
              const Xe = [];
              for (let rt = 0; rt < ve.length; rt += 2) {
                if (ve[rt] !== Oe[rt]) throw new Wn(`Cannot interpolate values containing mismatched anchors. from[${rt}]: ${ve[rt]}, to[${rt}]: ${Oe[rt]}`);
                Xe.push(ve[rt]);
                const [yt, Tt] = ve[rt + 1], [Nt, Vt] = Oe[rt + 1];
                Xe.push([on(yt, Nt, oe), on(Tt, Vt, oe)]);
              }
              return new Xn(Xe);
            } };
            class Nn {
              constructor(H, oe, ve, Oe, Xe) {
                this.type = H, this.operator = oe, this.interpolation = ve, this.input = Oe, this.labels = [], this.outputs = [];
                for (const [rt, yt] of Xe) this.labels.push(rt), this.outputs.push(yt);
              }
              static interpolationFactor(H, oe, ve, Oe) {
                let Xe = 0;
                if (H.name === "exponential") Xe = jn(oe, H.base, ve, Oe);
                else if (H.name === "linear") Xe = jn(oe, 1, ve, Oe);
                else if (H.name === "cubic-bezier") {
                  const rt = H.controlPoints;
                  Xe = new Gn(rt[0], rt[1], rt[2], rt[3]).solve(jn(oe, 1, ve, Oe));
                }
                return Xe;
              }
              static parse(H, oe) {
                let [ve, Oe, Xe, ...rt] = H;
                if (!Array.isArray(Oe) || Oe.length === 0) return oe.error("Expected an interpolation type expression.", 1);
                if (Oe[0] === "linear") Oe = { name: "linear" };
                else if (Oe[0] === "exponential") {
                  const Nt = Oe[1];
                  if (typeof Nt != "number") return oe.error("Exponential interpolation requires a numeric base.", 1, 1);
                  Oe = { name: "exponential", base: Nt };
                } else {
                  if (Oe[0] !== "cubic-bezier") return oe.error(`Unknown interpolation type ${String(Oe[0])}`, 1, 0);
                  {
                    const Nt = Oe.slice(1);
                    if (Nt.length !== 4 || Nt.some((Vt) => typeof Vt != "number" || Vt < 0 || Vt > 1)) return oe.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1);
                    Oe = { name: "cubic-bezier", controlPoints: Nt };
                  }
                }
                if (H.length - 1 < 4) return oe.error(`Expected at least 4 arguments, but found only ${H.length - 1}.`);
                if ((H.length - 1) % 2 != 0) return oe.error("Expected an even number of arguments.");
                if (Xe = oe.parse(Xe, 2, Ke), !Xe) return null;
                const yt = [];
                let Tt = null;
                ve === "interpolate-hcl" || ve === "interpolate-lab" ? Tt = Be : oe.expectedType && oe.expectedType.kind !== "value" && (Tt = oe.expectedType);
                for (let Nt = 0; Nt < rt.length; Nt += 2) {
                  const Vt = rt[Nt], Kt = rt[Nt + 1], an = Nt + 3, hn = Nt + 4;
                  if (typeof Vt != "number") return oe.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', an);
                  if (yt.length && yt[yt.length - 1][0] >= Vt) return oe.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', an);
                  const kn = oe.parse(Kt, hn, Tt);
                  if (!kn) return null;
                  Tt = Tt || kn.type, yt.push([Vt, kn]);
                }
                return St(Tt, Ke) || St(Tt, Be) || St(Tt, _t) || St(Tt, Dt) || St(Tt, $t(Ke)) ? new Nn(Tt, ve, Oe, Xe, yt) : oe.error(`Type ${Gt(Tt)} is not interpolatable.`);
              }
              evaluate(H) {
                const oe = this.labels, ve = this.outputs;
                if (oe.length === 1) return ve[0].evaluate(H);
                const Oe = this.input.evaluate(H);
                if (Oe <= oe[0]) return ve[0].evaluate(H);
                const Xe = oe.length;
                if (Oe >= oe[Xe - 1]) return ve[Xe - 1].evaluate(H);
                const rt = Tr(oe, Oe), yt = oe[rt], Tt = oe[rt + 1], Nt = Nn.interpolationFactor(this.interpolation, Oe, yt, Tt), Vt = ve[rt].evaluate(H), Kt = ve[rt + 1].evaluate(H);
                switch (this.operator) {
                  case "interpolate":
                    return bn[this.type.kind](Vt, Kt, Nt);
                  case "interpolate-hcl":
                    return bn.color(Vt, Kt, Nt, "hcl");
                  case "interpolate-lab":
                    return bn.color(Vt, Kt, Nt, "lab");
                }
              }
              eachChild(H) {
                H(this.input);
                for (const oe of this.outputs) H(oe);
              }
              outputDefined() {
                return this.outputs.every((H) => H.outputDefined());
              }
            }
            function jn(J, H, oe, ve) {
              const Oe = ve - oe, Xe = J - oe;
              return Oe === 0 ? 0 : H === 1 ? Xe / Oe : (Math.pow(H, Xe) - 1) / (Math.pow(H, Oe) - 1);
            }
            class Jn {
              constructor(H, oe) {
                this.type = H, this.args = oe;
              }
              static parse(H, oe) {
                if (H.length < 2) return oe.error("Expectected at least one argument.");
                let ve = null;
                const Oe = oe.expectedType;
                Oe && Oe.kind !== "value" && (ve = Oe);
                const Xe = [];
                for (const yt of H.slice(1)) {
                  const Tt = oe.parse(yt, 1 + Xe.length, ve, void 0, { typeAnnotation: "omit" });
                  if (!Tt) return null;
                  ve = ve || Tt.type, Xe.push(Tt);
                }
                if (!ve) throw new Error("No output type");
                const rt = Oe && Xe.some((yt) => mt(Oe, yt.type));
                return new Jn(rt ? Ze : ve, Xe);
              }
              evaluate(H) {
                let oe, ve = null, Oe = 0;
                for (const Xe of this.args) if (Oe++, ve = Xe.evaluate(H), ve && ve instanceof Pn && !ve.available && (oe || (oe = ve.name), ve = null, Oe === this.args.length && (ve = oe)), ve !== null) break;
                return ve;
              }
              eachChild(H) {
                this.args.forEach(H);
              }
              outputDefined() {
                return this.args.every((H) => H.outputDefined());
              }
            }
            function Hn(J, H) {
              return J === "==" || J === "!=" ? H.kind === "boolean" || H.kind === "string" || H.kind === "number" || H.kind === "null" || H.kind === "value" : H.kind === "string" || H.kind === "number" || H.kind === "value";
            }
            function Ln(J, H, oe, ve) {
              return ve.compare(H, oe) === 0;
            }
            function pn(J, H, oe) {
              const ve = J !== "==" && J !== "!=";
              return class wW {
                constructor(Xe, rt, yt) {
                  this.type = _e, this.lhs = Xe, this.rhs = rt, this.collator = yt, this.hasUntypedArgument = Xe.type.kind === "value" || rt.type.kind === "value";
                }
                static parse(Xe, rt) {
                  if (Xe.length !== 3 && Xe.length !== 4) return rt.error("Expected two or three arguments.");
                  const yt = Xe[0];
                  let Tt = rt.parse(Xe[1], 1, Ze);
                  if (!Tt) return null;
                  if (!Hn(yt, Tt.type)) return rt.concat(1).error(`"${yt}" comparisons are not supported for type '${Gt(Tt.type)}'.`);
                  let Nt = rt.parse(Xe[2], 2, Ze);
                  if (!Nt) return null;
                  if (!Hn(yt, Nt.type)) return rt.concat(2).error(`"${yt}" comparisons are not supported for type '${Gt(Nt.type)}'.`);
                  if (Tt.type.kind !== Nt.type.kind && Tt.type.kind !== "value" && Nt.type.kind !== "value") return rt.error(`Cannot compare types '${Gt(Tt.type)}' and '${Gt(Nt.type)}'.`);
                  ve && (Tt.type.kind === "value" && Nt.type.kind !== "value" ? Tt = new Zn(Nt.type, [Tt]) : Tt.type.kind !== "value" && Nt.type.kind === "value" && (Nt = new Zn(Tt.type, [Nt])));
                  let Vt = null;
                  if (Xe.length === 4) {
                    if (Tt.type.kind !== "string" && Nt.type.kind !== "string" && Tt.type.kind !== "value" && Nt.type.kind !== "value") return rt.error("Cannot use collator to compare non-string types.");
                    if (Vt = rt.parse(Xe[3], 3, ct), !Vt) return null;
                  }
                  return new wW(Tt, Nt, Vt);
                }
                evaluate(Xe) {
                  const rt = this.lhs.evaluate(Xe), yt = this.rhs.evaluate(Xe);
                  if (ve && this.hasUntypedArgument) {
                    const Tt = _n(rt), Nt = _n(yt);
                    if (Tt.kind !== Nt.kind || Tt.kind !== "string" && Tt.kind !== "number") throw new Wn(`Expected arguments for "${J}" to be (string, string) or (number, number), but found (${Tt.kind}, ${Nt.kind}) instead.`);
                  }
                  if (this.collator && !ve && this.hasUntypedArgument) {
                    const Tt = _n(rt), Nt = _n(yt);
                    if (Tt.kind !== "string" || Nt.kind !== "string") return H(Xe, rt, yt);
                  }
                  return this.collator ? oe(Xe, rt, yt, this.collator.evaluate(Xe)) : H(Xe, rt, yt);
                }
                eachChild(Xe) {
                  Xe(this.lhs), Xe(this.rhs), this.collator && Xe(this.collator);
                }
                outputDefined() {
                  return !0;
                }
              };
            }
            const dn = pn("==", function(J, H, oe) {
              return H === oe;
            }, Ln), Dn = pn("!=", function(J, H, oe) {
              return H !== oe;
            }, function(J, H, oe, ve) {
              return !Ln(0, H, oe, ve);
            }), nr = pn("<", function(J, H, oe) {
              return H < oe;
            }, function(J, H, oe, ve) {
              return ve.compare(H, oe) < 0;
            }), pr = pn(">", function(J, H, oe) {
              return H > oe;
            }, function(J, H, oe, ve) {
              return ve.compare(H, oe) > 0;
            }), ir = pn("<=", function(J, H, oe) {
              return H <= oe;
            }, function(J, H, oe, ve) {
              return ve.compare(H, oe) <= 0;
            }), gr = pn(">=", function(J, H, oe) {
              return H >= oe;
            }, function(J, H, oe, ve) {
              return ve.compare(H, oe) >= 0;
            });
            class Pr {
              constructor(H, oe, ve) {
                this.type = ct, this.locale = ve, this.caseSensitive = H, this.diacriticSensitive = oe;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error("Expected one argument.");
                const ve = H[1];
                if (typeof ve != "object" || Array.isArray(ve)) return oe.error("Collator options argument must be an object.");
                const Oe = oe.parse(ve["case-sensitive"] !== void 0 && ve["case-sensitive"], 1, _e);
                if (!Oe) return null;
                const Xe = oe.parse(ve["diacritic-sensitive"] !== void 0 && ve["diacritic-sensitive"], 1, _e);
                if (!Xe) return null;
                let rt = null;
                return ve.locale && (rt = oe.parse(ve.locale, 1, tt), !rt) ? null : new Pr(Oe, Xe, rt);
              }
              evaluate(H) {
                return new In(this.caseSensitive.evaluate(H), this.diacriticSensitive.evaluate(H), this.locale ? this.locale.evaluate(H) : null);
              }
              eachChild(H) {
                H(this.caseSensitive), H(this.diacriticSensitive), this.locale && H(this.locale);
              }
              outputDefined() {
                return !1;
              }
            }
            class Cr {
              constructor(H, oe, ve, Oe, Xe) {
                this.type = tt, this.number = H, this.locale = oe, this.currency = ve, this.minFractionDigits = Oe, this.maxFractionDigits = Xe;
              }
              static parse(H, oe) {
                if (H.length !== 3) return oe.error("Expected two arguments.");
                const ve = oe.parse(H[1], 1, Ke);
                if (!ve) return null;
                const Oe = H[2];
                if (typeof Oe != "object" || Array.isArray(Oe)) return oe.error("NumberFormat options argument must be an object.");
                let Xe = null;
                if (Oe.locale && (Xe = oe.parse(Oe.locale, 1, tt), !Xe)) return null;
                let rt = null;
                if (Oe.currency && (rt = oe.parse(Oe.currency, 1, tt), !rt)) return null;
                let yt = null;
                if (Oe["min-fraction-digits"] && (yt = oe.parse(Oe["min-fraction-digits"], 1, Ke), !yt)) return null;
                let Tt = null;
                return Oe["max-fraction-digits"] && (Tt = oe.parse(Oe["max-fraction-digits"], 1, Ke), !Tt) ? null : new Cr(ve, Xe, rt, yt, Tt);
              }
              evaluate(H) {
                return new Intl.NumberFormat(this.locale ? this.locale.evaluate(H) : [], { style: this.currency ? "currency" : "decimal", currency: this.currency ? this.currency.evaluate(H) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(H) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(H) : void 0 }).format(this.number.evaluate(H));
              }
              eachChild(H) {
                H(this.number), this.locale && H(this.locale), this.currency && H(this.currency), this.minFractionDigits && H(this.minFractionDigits), this.maxFractionDigits && H(this.maxFractionDigits);
              }
              outputDefined() {
                return !1;
              }
            }
            class Er {
              constructor(H) {
                this.type = ft, this.sections = H;
              }
              static parse(H, oe) {
                if (H.length < 2) return oe.error("Expected at least one argument.");
                const ve = H[1];
                if (!Array.isArray(ve) && typeof ve == "object") return oe.error("First argument must be an image or text section.");
                const Oe = [];
                let Xe = !1;
                for (let rt = 1; rt <= H.length - 1; ++rt) {
                  const yt = H[rt];
                  if (Xe && typeof yt == "object" && !Array.isArray(yt)) {
                    Xe = !1;
                    let Tt = null;
                    if (yt["font-scale"] && (Tt = oe.parse(yt["font-scale"], 1, Ke), !Tt)) return null;
                    let Nt = null;
                    if (yt["text-font"] && (Nt = oe.parse(yt["text-font"], 1, $t(tt)), !Nt)) return null;
                    let Vt = null;
                    if (yt["text-color"] && (Vt = oe.parse(yt["text-color"], 1, Be), !Vt)) return null;
                    const Kt = Oe[Oe.length - 1];
                    Kt.scale = Tt, Kt.font = Nt, Kt.textColor = Vt;
                  } else {
                    const Tt = oe.parse(H[rt], 1, Ze);
                    if (!Tt) return null;
                    const Nt = Tt.type.kind;
                    if (Nt !== "string" && Nt !== "value" && Nt !== "null" && Nt !== "resolvedImage") return oe.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
                    Xe = !0, Oe.push({ content: Tt, scale: null, font: null, textColor: null });
                  }
                }
                return new Er(Oe);
              }
              evaluate(H) {
                return new Cn(this.sections.map((oe) => {
                  const ve = oe.content.evaluate(H);
                  return _n(ve) === Pt ? new zn("", ve, null, null, null) : new zn(En(ve), null, oe.scale ? oe.scale.evaluate(H) : null, oe.font ? oe.font.evaluate(H).join(",") : null, oe.textColor ? oe.textColor.evaluate(H) : null);
                }));
              }
              eachChild(H) {
                for (const oe of this.sections) H(oe.content), oe.scale && H(oe.scale), oe.font && H(oe.font), oe.textColor && H(oe.textColor);
              }
              outputDefined() {
                return !1;
              }
            }
            class Sr {
              constructor(H) {
                this.type = Pt, this.input = H;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error("Expected two arguments.");
                const ve = oe.parse(H[1], 1, tt);
                return ve ? new Sr(ve) : oe.error("No image name provided.");
              }
              evaluate(H) {
                const oe = this.input.evaluate(H), ve = Pn.fromString(oe);
                return ve && H.availableImages && (ve.available = H.availableImages.indexOf(oe) > -1), ve;
              }
              eachChild(H) {
                H(this.input);
              }
              outputDefined() {
                return !1;
              }
            }
            class Dr {
              constructor(H) {
                this.type = Ke, this.input = H;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error(`Expected 1 argument, but found ${H.length - 1} instead.`);
                const ve = oe.parse(H[1], 1);
                return ve ? ve.type.kind !== "array" && ve.type.kind !== "string" && ve.type.kind !== "value" ? oe.error(`Expected argument of type string or array, but found ${Gt(ve.type)} instead.`) : new Dr(ve) : null;
              }
              evaluate(H) {
                const oe = this.input.evaluate(H);
                if (typeof oe == "string" || Array.isArray(oe)) return oe.length;
                throw new Wn(`Expected value to be of type string or array, but found ${Gt(_n(oe))} instead.`);
              }
              eachChild(H) {
                H(this.input);
              }
              outputDefined() {
                return !1;
              }
            }
            const Qn = 8192;
            function ri(J, H) {
              const oe = (180 + J[0]) / 360, ve = (Xe = J[1], (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + Xe * Math.PI / 360))) / 360), Oe = Math.pow(2, H.z);
              var Xe;
              return [Math.round(oe * Oe * Qn), Math.round(ve * Oe * Qn)];
            }
            function Zr(J, H) {
              const oe = Math.pow(2, H.z), ve = (J[0] / Qn + H.x) / oe, Oe = (J[1] / Qn + H.y) / oe;
              return [(rt = ve, 360 * rt - 180), (Xe = Oe, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * Xe) * Math.PI / 180)) - 90)];
              var Xe, rt;
            }
            function Br(J, H) {
              J[0] = Math.min(J[0], H[0]), J[1] = Math.min(J[1], H[1]), J[2] = Math.max(J[2], H[0]), J[3] = Math.max(J[3], H[1]);
            }
            function Yr(J, H) {
              return !(J[0] <= H[0] || J[2] >= H[2] || J[1] <= H[1] || J[3] >= H[3]);
            }
            function yi(J, H, oe) {
              const ve = J[0] - H[0], Oe = J[1] - H[1], Xe = J[0] - oe[0], rt = J[1] - oe[1];
              return ve * rt - Xe * Oe == 0 && ve * Xe <= 0 && Oe * rt <= 0;
            }
            function si(J, H, oe, ve) {
              const Oe = [H[0] - J[0], H[1] - J[1]];
              return Xe = [ve[0] - oe[0], ve[1] - oe[1]], rt = Oe, Xe[0] * rt[1] - Xe[1] * rt[0] != 0 && !(!Ds(J, H, oe, ve) || !Ds(oe, ve, J, H));
              var Xe, rt;
            }
            function Pa(J, H, oe) {
              for (const ve of oe) for (let Oe = 0; Oe < ve.length - 1; ++Oe) if (si(J, H, ve[Oe], ve[Oe + 1])) return !0;
              return !1;
            }
            function Ni(J, H, oe = !1) {
              let ve = !1;
              for (const yt of H) for (let Tt = 0; Tt < yt.length - 1; Tt++) {
                if (yi(J, yt[Tt], yt[Tt + 1])) return oe;
                Oe = J, Xe = yt[Tt], rt = yt[Tt + 1], Xe[1] > Oe[1] != rt[1] > Oe[1] && Oe[0] < (rt[0] - Xe[0]) * (Oe[1] - Xe[1]) / (rt[1] - Xe[1]) + Xe[0] && (ve = !ve);
              }
              var Oe, Xe, rt;
              return ve;
            }
            function To(J, H) {
              for (const oe of H) if (Ni(J, oe)) return !0;
              return !1;
            }
            function Ba(J, H) {
              for (const oe of J) if (!Ni(oe, H)) return !1;
              for (let oe = 0; oe < J.length - 1; ++oe) if (Pa(J[oe], J[oe + 1], H)) return !1;
              return !0;
            }
            function eo(J, H) {
              for (const oe of H) if (Ba(J, oe)) return !0;
              return !1;
            }
            function Ds(J, H, oe, ve) {
              const Oe = J[0] - oe[0], Xe = J[1] - oe[1], rt = H[0] - oe[0], yt = H[1] - oe[1], Tt = ve[0] - oe[0], Nt = ve[1] - oe[1], Vt = Oe * Nt - Tt * Xe, Kt = rt * Nt - Tt * yt;
              return Vt > 0 && Kt < 0 || Vt < 0 && Kt > 0;
            }
            function ji(J, H, oe) {
              const ve = [];
              for (let Oe = 0; Oe < J.length; Oe++) {
                const Xe = [];
                for (let rt = 0; rt < J[Oe].length; rt++) {
                  const yt = ri(J[Oe][rt], oe);
                  Br(H, yt), Xe.push(yt);
                }
                ve.push(Xe);
              }
              return ve;
            }
            function Ao(J, H, oe) {
              const ve = [];
              for (let Oe = 0; Oe < J.length; Oe++) {
                const Xe = ji(J[Oe], H, oe);
                ve.push(Xe);
              }
              return ve;
            }
            function dl(J, H, oe, ve) {
              if (J[0] < oe[0] || J[0] > oe[2]) {
                const Oe = 0.5 * ve;
                let Xe = J[0] - oe[0] > Oe ? -ve : oe[0] - J[0] > Oe ? ve : 0;
                Xe === 0 && (Xe = J[0] - oe[2] > Oe ? -ve : oe[2] - J[0] > Oe ? ve : 0), J[0] += Xe;
              }
              Br(H, J);
            }
            function So(J, H, oe, ve) {
              const Oe = Math.pow(2, ve.z) * Qn, Xe = [ve.x * Qn, ve.y * Qn], rt = [];
              for (const yt of J) for (const Tt of yt) {
                const Nt = [Tt.x + Xe[0], Tt.y + Xe[1]];
                dl(Nt, H, oe, Oe), rt.push(Nt);
              }
              return rt;
            }
            function Pu(J, H, oe, ve) {
              const Oe = Math.pow(2, ve.z) * Qn, Xe = [ve.x * Qn, ve.y * Qn], rt = [];
              for (const Tt of J) {
                const Nt = [];
                for (const Vt of Tt) {
                  const Kt = [Vt.x + Xe[0], Vt.y + Xe[1]];
                  Br(H, Kt), Nt.push(Kt);
                }
                rt.push(Nt);
              }
              if (H[2] - H[0] <= Oe / 2) {
                (yt = H)[0] = yt[1] = 1 / 0, yt[2] = yt[3] = -1 / 0;
                for (const Tt of rt) for (const Nt of Tt) dl(Nt, H, oe, Oe);
              }
              var yt;
              return rt;
            }
            class go {
              constructor(H, oe) {
                this.type = _e, this.geojson = H, this.geometries = oe;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error(`'within' expression requires exactly one argument, but found ${H.length - 1} instead.`);
                if (Rn(H[1])) {
                  const ve = H[1];
                  if (ve.type === "FeatureCollection") {
                    const Oe = [];
                    for (const Xe of ve.features) {
                      const { type: rt, coordinates: yt } = Xe.geometry;
                      rt === "Polygon" && Oe.push(yt), rt === "MultiPolygon" && Oe.push(...yt);
                    }
                    if (Oe.length) return new go(ve, { type: "MultiPolygon", coordinates: Oe });
                  } else if (ve.type === "Feature") {
                    const Oe = ve.geometry.type;
                    if (Oe === "Polygon" || Oe === "MultiPolygon") return new go(ve, ve.geometry);
                  } else if (ve.type === "Polygon" || ve.type === "MultiPolygon") return new go(ve, ve);
                }
                return oe.error("'within' expression requires valid geojson object that contains polygon geometry type.");
              }
              evaluate(H) {
                if (H.geometry() != null && H.canonicalID() != null) {
                  if (H.geometryType() === "Point") return function(oe, ve) {
                    const Oe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], Xe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], rt = oe.canonicalID();
                    if (ve.type === "Polygon") {
                      const yt = ji(ve.coordinates, Xe, rt), Tt = So(oe.geometry(), Oe, Xe, rt);
                      if (!Yr(Oe, Xe)) return !1;
                      for (const Nt of Tt) if (!Ni(Nt, yt)) return !1;
                    }
                    if (ve.type === "MultiPolygon") {
                      const yt = Ao(ve.coordinates, Xe, rt), Tt = So(oe.geometry(), Oe, Xe, rt);
                      if (!Yr(Oe, Xe)) return !1;
                      for (const Nt of Tt) if (!To(Nt, yt)) return !1;
                    }
                    return !0;
                  }(H, this.geometries);
                  if (H.geometryType() === "LineString") return function(oe, ve) {
                    const Oe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], Xe = [1 / 0, 1 / 0, -1 / 0, -1 / 0], rt = oe.canonicalID();
                    if (ve.type === "Polygon") {
                      const yt = ji(ve.coordinates, Xe, rt), Tt = Pu(oe.geometry(), Oe, Xe, rt);
                      if (!Yr(Oe, Xe)) return !1;
                      for (const Nt of Tt) if (!Ba(Nt, yt)) return !1;
                    }
                    if (ve.type === "MultiPolygon") {
                      const yt = Ao(ve.coordinates, Xe, rt), Tt = Pu(oe.geometry(), Oe, Xe, rt);
                      if (!Yr(Oe, Xe)) return !1;
                      for (const Nt of Tt) if (!eo(Nt, yt)) return !1;
                    }
                    return !0;
                  }(H, this.geometries);
                }
                return !1;
              }
              eachChild() {
              }
              outputDefined() {
                return !0;
              }
            }
            let Vi = class {
              constructor(J = [], H = Ml) {
                if (this.data = J, this.length = this.data.length, this.compare = H, this.length > 0) for (let oe = (this.length >> 1) - 1; oe >= 0; oe--) this._down(oe);
              }
              push(J) {
                this.data.push(J), this.length++, this._up(this.length - 1);
              }
              pop() {
                if (this.length === 0) return;
                const J = this.data[0], H = this.data.pop();
                return this.length--, this.length > 0 && (this.data[0] = H, this._down(0)), J;
              }
              peek() {
                return this.data[0];
              }
              _up(J) {
                const { data: H, compare: oe } = this, ve = H[J];
                for (; J > 0; ) {
                  const Oe = J - 1 >> 1, Xe = H[Oe];
                  if (oe(ve, Xe) >= 0) break;
                  H[J] = Xe, J = Oe;
                }
                H[J] = ve;
              }
              _down(J) {
                const { data: H, compare: oe } = this, ve = this.length >> 1, Oe = H[J];
                for (; J < ve; ) {
                  let Xe = 1 + (J << 1), rt = H[Xe];
                  const yt = Xe + 1;
                  if (yt < this.length && oe(H[yt], rt) < 0 && (Xe = yt, rt = H[yt]), oe(rt, Oe) >= 0) break;
                  H[J] = rt, J = Xe;
                }
                H[J] = Oe;
              }
            };
            function Ml(J, H) {
              return J < H ? -1 : J > H ? 1 : 0;
            }
            function pl(J, H, oe, ve, Oe) {
              Zl(J, H, oe, ve || J.length - 1, Oe || Xl);
            }
            function Zl(J, H, oe, ve, Oe) {
              for (; ve > oe; ) {
                if (ve - oe > 600) {
                  var Xe = ve - oe + 1, rt = H - oe + 1, yt = Math.log(Xe), Tt = 0.5 * Math.exp(2 * yt / 3), Nt = 0.5 * Math.sqrt(yt * Tt * (Xe - Tt) / Xe) * (rt - Xe / 2 < 0 ? -1 : 1);
                  Zl(J, H, Math.max(oe, Math.floor(H - rt * Tt / Xe + Nt)), Math.min(ve, Math.floor(H + (Xe - rt) * Tt / Xe + Nt)), Oe);
                }
                var Vt = J[H], Kt = oe, an = ve;
                for (vs(J, oe, H), Oe(J[ve], Vt) > 0 && vs(J, oe, ve); Kt < an; ) {
                  for (vs(J, Kt, an), Kt++, an--; Oe(J[Kt], Vt) < 0; ) Kt++;
                  for (; Oe(J[an], Vt) > 0; ) an--;
                }
                Oe(J[oe], Vt) === 0 ? vs(J, oe, an) : vs(J, ++an, ve), an <= H && (oe = an + 1), H <= an && (ve = an - 1);
              }
            }
            function vs(J, H, oe) {
              var ve = J[H];
              J[H] = J[oe], J[oe] = ve;
            }
            function Xl(J, H) {
              return J < H ? -1 : J > H ? 1 : 0;
            }
            function xs(J, H) {
              if (J.length <= 1) return [J];
              const oe = [];
              let ve, Oe;
              for (const Xe of J) {
                const rt = Mo(Xe);
                rt !== 0 && (Xe.area = Math.abs(rt), Oe === void 0 && (Oe = rt < 0), Oe === rt < 0 ? (ve && oe.push(ve), ve = [Xe]) : ve.push(Xe));
              }
              if (ve && oe.push(ve), H > 1) for (let Xe = 0; Xe < oe.length; Xe++) oe[Xe].length <= H || (pl(oe[Xe], H, 1, oe[Xe].length - 1, ja), oe[Xe] = oe[Xe].slice(0, H));
              return oe;
            }
            function ja(J, H) {
              return H.area - J.area;
            }
            function Mo(J) {
              let H = 0;
              for (let oe, ve, Oe = 0, Xe = J.length, rt = Xe - 1; Oe < Xe; rt = Oe++) oe = J[Oe], ve = J[rt], H += (ve.x - oe.x) * (oe.y + ve.y);
              return H;
            }
            const Kl = 1 / 298.257223563, Xs = Kl * (2 - Kl), El = Math.PI / 180;
            class Jl {
              constructor(H) {
                const oe = 6378.137 * El * 1e3, ve = Math.cos(H * El), Oe = 1 / (1 - Xs * (1 - ve * ve)), Xe = Math.sqrt(Oe);
                this.kx = oe * Xe * ve, this.ky = oe * Xe * Oe * (1 - Xs);
              }
              distance(H, oe) {
                const ve = this.wrap(H[0] - oe[0]) * this.kx, Oe = (H[1] - oe[1]) * this.ky;
                return Math.sqrt(ve * ve + Oe * Oe);
              }
              pointOnLine(H, oe) {
                let ve, Oe, Xe, rt, yt = 1 / 0;
                for (let Tt = 0; Tt < H.length - 1; Tt++) {
                  let Nt = H[Tt][0], Vt = H[Tt][1], Kt = this.wrap(H[Tt + 1][0] - Nt) * this.kx, an = (H[Tt + 1][1] - Vt) * this.ky, hn = 0;
                  Kt === 0 && an === 0 || (hn = (this.wrap(oe[0] - Nt) * this.kx * Kt + (oe[1] - Vt) * this.ky * an) / (Kt * Kt + an * an), hn > 1 ? (Nt = H[Tt + 1][0], Vt = H[Tt + 1][1]) : hn > 0 && (Nt += Kt / this.kx * hn, Vt += an / this.ky * hn)), Kt = this.wrap(oe[0] - Nt) * this.kx, an = (oe[1] - Vt) * this.ky;
                  const kn = Kt * Kt + an * an;
                  kn < yt && (yt = kn, ve = Nt, Oe = Vt, Xe = Tt, rt = hn);
                }
                return { point: [ve, Oe], index: Xe, t: Math.max(0, Math.min(1, rt)) };
              }
              wrap(H) {
                for (; H < -180; ) H += 360;
                for (; H > 180; ) H -= 360;
                return H;
              }
            }
            const ml = 100, mu = 50;
            function gu(J, H) {
              return H[0] - J[0];
            }
            function Ql(J) {
              return J[1] - J[0] + 1;
            }
            function Wo(J, H) {
              return J[1] >= J[0] && J[1] < H;
            }
            function Mc(J, H) {
              if (J[0] > J[1]) return [null, null];
              const oe = Ql(J);
              if (H) {
                if (oe === 2) return [J, null];
                const Oe = Math.floor(oe / 2);
                return [[J[0], J[0] + Oe], [J[0] + Oe, J[1]]];
              }
              if (oe === 1) return [J, null];
              const ve = Math.floor(oe / 2) - 1;
              return [[J[0], J[0] + ve], [J[0] + ve + 1, J[1]]];
            }
            function Xu(J, H) {
              if (!Wo(H, J.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
              const oe = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
              for (let ve = H[0]; ve <= H[1]; ++ve) Br(oe, J[ve]);
              return oe;
            }
            function yu(J) {
              const H = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
              for (const oe of J) for (const ve of oe) Br(H, ve);
              return H;
            }
            function ef(J) {
              return J[0] !== -1 / 0 && J[1] !== -1 / 0 && J[2] !== 1 / 0 && J[3] !== 1 / 0;
            }
            function tf(J, H, oe) {
              if (!ef(J) || !ef(H)) return NaN;
              let ve = 0, Oe = 0;
              return J[2] < H[0] && (ve = H[0] - J[2]), J[0] > H[2] && (ve = J[0] - H[2]), J[1] > H[3] && (Oe = J[1] - H[3]), J[3] < H[1] && (Oe = H[1] - J[3]), oe.distance([0, 0], [ve, Oe]);
            }
            function bs(J, H, oe) {
              const ve = oe.pointOnLine(H, J);
              return oe.distance(J, ve.point);
            }
            function Ec(J, H, oe, ve, Oe) {
              const Xe = Math.min(bs(J, [oe, ve], Oe), bs(H, [oe, ve], Oe)), rt = Math.min(bs(oe, [J, H], Oe), bs(ve, [J, H], Oe));
              return Math.min(Xe, rt);
            }
            function mh(J, H, oe, ve, Oe) {
              if (!Wo(H, J.length) || !Wo(ve, oe.length)) return 1 / 0;
              let Xe = 1 / 0;
              for (let rt = H[0]; rt < H[1]; ++rt) {
                const yt = J[rt], Tt = J[rt + 1];
                for (let Nt = ve[0]; Nt < ve[1]; ++Nt) {
                  const Vt = oe[Nt], Kt = oe[Nt + 1];
                  if (si(yt, Tt, Vt, Kt)) return 0;
                  Xe = Math.min(Xe, Ec(yt, Tt, Vt, Kt, Oe));
                }
              }
              return Xe;
            }
            function Eo(J, H, oe, ve, Oe) {
              if (!Wo(H, J.length) || !Wo(ve, oe.length)) return NaN;
              let Xe = 1 / 0;
              for (let rt = H[0]; rt <= H[1]; ++rt) for (let yt = ve[0]; yt <= ve[1]; ++yt) if (Xe = Math.min(Xe, Oe.distance(J[rt], oe[yt])), Xe === 0) return Xe;
              return Xe;
            }
            function ac(J, H, oe) {
              if (Ni(J, H, !0)) return 0;
              let ve = 1 / 0;
              for (const Oe of H) {
                const Xe = Oe[0], rt = Oe[Oe.length - 1];
                if (Xe !== rt && (ve = Math.min(ve, bs(J, [rt, Xe], oe)), ve === 0)) return ve;
                const yt = oe.pointOnLine(Oe, J);
                if (ve = Math.min(ve, oe.distance(J, yt.point)), ve === 0) return ve;
              }
              return ve;
            }
            function Xi(J, H, oe, ve) {
              if (!Wo(H, J.length)) return NaN;
              for (let Xe = H[0]; Xe <= H[1]; ++Xe) if (Ni(J[Xe], oe, !0)) return 0;
              let Oe = 1 / 0;
              for (let Xe = H[0]; Xe < H[1]; ++Xe) {
                const rt = J[Xe], yt = J[Xe + 1];
                for (const Tt of oe) for (let Nt = 0, Vt = Tt.length, Kt = Vt - 1; Nt < Vt; Kt = Nt++) {
                  const an = Tt[Kt], hn = Tt[Nt];
                  if (si(rt, yt, an, hn)) return 0;
                  Oe = Math.min(Oe, Ec(rt, yt, an, hn, ve));
                }
              }
              return Oe;
            }
            function eu(J, H) {
              for (const oe of J) for (const ve of oe) if (Ni(ve, H, !0)) return !0;
              return !1;
            }
            function Ma(J, H, oe, ve = 1 / 0) {
              const Oe = yu(J), Xe = yu(H);
              if (ve !== 1 / 0 && tf(Oe, Xe, oe) >= ve) return ve;
              if (Yr(Oe, Xe)) {
                if (eu(J, H)) return 0;
              } else if (eu(H, J)) return 0;
              let rt = 1 / 0;
              for (const yt of J) for (let Tt = 0, Nt = yt.length, Vt = Nt - 1; Tt < Nt; Vt = Tt++) {
                const Kt = yt[Vt], an = yt[Tt];
                for (const hn of H) for (let kn = 0, xn = hn.length, Fn = xn - 1; kn < xn; Fn = kn++) {
                  const qn = hn[Fn], vr = hn[kn];
                  if (si(Kt, an, qn, vr)) return 0;
                  rt = Math.min(rt, Ec(Kt, an, qn, vr, oe));
                }
              }
              return rt;
            }
            function Ea(J, H, oe, ve, Oe, Xe) {
              if (!Xe) return;
              const rt = tf(Xu(ve, Xe), Oe, oe);
              rt < H && J.push([rt, Xe, [0, 0]]);
            }
            function Ls(J, H, oe, ve, Oe, Xe, rt) {
              if (!Xe || !rt) return;
              const yt = tf(Xu(ve, Xe), Xu(Oe, rt), oe);
              yt < H && J.push([yt, Xe, rt]);
            }
            function Bs(J, H, oe, ve, Oe = 1 / 0) {
              let Xe = Math.min(ve.distance(J[0], oe[0][0]), Oe);
              if (Xe === 0) return Xe;
              const rt = new Vi([[0, [0, J.length - 1], [0, 0]]], gu), yt = yu(oe);
              for (; rt.length > 0; ) {
                const Tt = rt.pop();
                if (Tt[0] >= Xe) continue;
                const Nt = Tt[1], Vt = H ? mu : ml;
                if (Ql(Nt) <= Vt) {
                  if (!Wo(Nt, J.length)) return NaN;
                  if (H) {
                    const Kt = Xi(J, Nt, oe, ve);
                    if (isNaN(Kt) || Kt === 0) return Kt;
                    Xe = Math.min(Xe, Kt);
                  } else for (let Kt = Nt[0]; Kt <= Nt[1]; ++Kt) {
                    const an = ac(J[Kt], oe, ve);
                    if (Xe = Math.min(Xe, an), Xe === 0) return 0;
                  }
                } else {
                  const Kt = Mc(Nt, H);
                  Ea(rt, Xe, ve, J, yt, Kt[0]), Ea(rt, Xe, ve, J, yt, Kt[1]);
                }
              }
              return Xe;
            }
            function oc(J, H, oe, ve, Oe, Xe = 1 / 0) {
              let rt = Math.min(Xe, Oe.distance(J[0], oe[0]));
              if (rt === 0) return rt;
              const yt = new Vi([[0, [0, J.length - 1], [0, oe.length - 1]]], gu);
              for (; yt.length > 0; ) {
                const Tt = yt.pop();
                if (Tt[0] >= rt) continue;
                const Nt = Tt[1], Vt = Tt[2], Kt = H ? mu : ml, an = ve ? mu : ml;
                if (Ql(Nt) <= Kt && Ql(Vt) <= an) {
                  if (!Wo(Nt, J.length) && Wo(Vt, oe.length)) return NaN;
                  let hn;
                  if (H && ve) hn = mh(J, Nt, oe, Vt, Oe), rt = Math.min(rt, hn);
                  else if (H && !ve) {
                    const kn = J.slice(Nt[0], Nt[1] + 1);
                    for (let xn = Vt[0]; xn <= Vt[1]; ++xn) if (hn = bs(oe[xn], kn, Oe), rt = Math.min(rt, hn), rt === 0) return rt;
                  } else if (!H && ve) {
                    const kn = oe.slice(Vt[0], Vt[1] + 1);
                    for (let xn = Nt[0]; xn <= Nt[1]; ++xn) if (hn = bs(J[xn], kn, Oe), rt = Math.min(rt, hn), rt === 0) return rt;
                  } else hn = Eo(J, Nt, oe, Vt, Oe), rt = Math.min(rt, hn);
                } else {
                  const hn = Mc(Nt, H), kn = Mc(Vt, ve);
                  Ls(yt, rt, Oe, J, oe, hn[0], kn[0]), Ls(yt, rt, Oe, J, oe, hn[0], kn[1]), Ls(yt, rt, Oe, J, oe, hn[1], kn[0]), Ls(yt, rt, Oe, J, oe, hn[1], kn[1]);
                }
              }
              return rt;
            }
            function tu(J) {
              return J.type === "MultiPolygon" ? J.coordinates.map((H) => ({ type: "Polygon", coordinates: H })) : J.type === "MultiLineString" ? J.coordinates.map((H) => ({ type: "LineString", coordinates: H })) : J.type === "MultiPoint" ? J.coordinates.map((H) => ({ type: "Point", coordinates: H })) : [J];
            }
            class _s {
              constructor(H, oe) {
                this.type = Ke, this.geojson = H, this.geometries = oe;
              }
              static parse(H, oe) {
                if (H.length !== 2) return oe.error(`'distance' expression requires exactly one argument, but found ${H.length - 1} instead.`);
                if (Rn(H[1])) {
                  const ve = H[1];
                  if (ve.type === "FeatureCollection") return new _s(ve, ve.features.map((Oe) => tu(Oe.geometry)).flat());
                  if (ve.type === "Feature") return new _s(ve, tu(ve.geometry));
                  if ("type" in ve && "coordinates" in ve) return new _s(ve, tu(ve));
                }
                return oe.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
              }
              evaluate(H) {
                if (H.geometry() != null && H.canonicalID() != null) {
                  if (H.geometryType() === "Point") return function(oe, ve) {
                    const Oe = oe.geometry(), Xe = Oe.flat().map((Tt) => Zr([Tt.x, Tt.y], oe.canonical));
                    if (Oe.length === 0) return NaN;
                    const rt = new Jl(Xe[0][1]);
                    let yt = 1 / 0;
                    for (const Tt of ve) {
                      switch (Tt.type) {
                        case "Point":
                          yt = Math.min(yt, oc(Xe, !1, [Tt.coordinates], !1, rt, yt));
                          break;
                        case "LineString":
                          yt = Math.min(yt, oc(Xe, !1, Tt.coordinates, !0, rt, yt));
                          break;
                        case "Polygon":
                          yt = Math.min(yt, Bs(Xe, !1, Tt.coordinates, rt, yt));
                      }
                      if (yt === 0) return yt;
                    }
                    return yt;
                  }(H, this.geometries);
                  if (H.geometryType() === "LineString") return function(oe, ve) {
                    const Oe = oe.geometry(), Xe = Oe.flat().map((Tt) => Zr([Tt.x, Tt.y], oe.canonical));
                    if (Oe.length === 0) return NaN;
                    const rt = new Jl(Xe[0][1]);
                    let yt = 1 / 0;
                    for (const Tt of ve) {
                      switch (Tt.type) {
                        case "Point":
                          yt = Math.min(yt, oc(Xe, !0, [Tt.coordinates], !1, rt, yt));
                          break;
                        case "LineString":
                          yt = Math.min(yt, oc(Xe, !0, Tt.coordinates, !0, rt, yt));
                          break;
                        case "Polygon":
                          yt = Math.min(yt, Bs(Xe, !0, Tt.coordinates, rt, yt));
                      }
                      if (yt === 0) return yt;
                    }
                    return yt;
                  }(H, this.geometries);
                  if (H.geometryType() === "Polygon") return function(oe, ve) {
                    const Oe = oe.geometry();
                    if (Oe.length === 0 || Oe[0].length === 0) return NaN;
                    const Xe = xs(Oe, 0).map((Tt) => Tt.map((Nt) => Nt.map((Vt) => Zr([Vt.x, Vt.y], oe.canonical)))), rt = new Jl(Xe[0][0][0][1]);
                    let yt = 1 / 0;
                    for (const Tt of ve) for (const Nt of Xe) {
                      switch (Tt.type) {
                        case "Point":
                          yt = Math.min(yt, Bs([Tt.coordinates], !1, Nt, rt, yt));
                          break;
                        case "LineString":
                          yt = Math.min(yt, Bs(Tt.coordinates, !0, Nt, rt, yt));
                          break;
                        case "Polygon":
                          yt = Math.min(yt, Ma(Nt, Tt.coordinates, rt, yt));
                      }
                      if (yt === 0) return yt;
                    }
                    return yt;
                  }(H, this.geometries);
                }
                return NaN;
              }
              eachChild() {
              }
              outputDefined() {
                return !0;
              }
            }
            const Ps = { "==": dn, "!=": Dn, ">": pr, "<": nr, ">=": gr, "<=": ir, array: Zn, at: Vr, boolean: Zn, case: $n, coalesce: Jn, collator: Pr, format: Er, image: Sr, in: rn, "index-of": Tn, interpolate: Nn, "interpolate-hcl": Nn, "interpolate-lab": Nn, length: Dr, let: Ir, literal: Kn, match: sr, number: Zn, "number-format": Cr, object: Zn, slice: ur, step: wr, string: Zn, "to-boolean": cr, "to-color": cr, "to-number": cr, "to-string": cr, var: yr, within: go, distance: _s };
            class Co {
              constructor(H, oe, ve, Oe) {
                this.name = H, this.type = oe, this._evaluate = ve, this.args = Oe;
              }
              evaluate(H) {
                return this._evaluate(H, this.args);
              }
              eachChild(H) {
                this.args.forEach(H);
              }
              outputDefined() {
                return !1;
              }
              static parse(H, oe) {
                const ve = H[0], Oe = Co.definitions[ve];
                if (!Oe) return oe.error(`Unknown expression "${ve}". If you wanted a literal array, use ["literal", [...]].`, 0);
                const Xe = Array.isArray(Oe) ? Oe[0] : Oe.type, rt = Array.isArray(Oe) ? [[Oe[1], Oe[2]]] : Oe.overloads, yt = rt.filter(([Nt]) => !Array.isArray(Nt) || Nt.length === H.length - 1);
                let Tt = null;
                for (const [Nt, Vt] of yt) {
                  Tt = new mr(oe.registry, Ks, oe.path, null, oe.scope);
                  const Kt = [];
                  let an = !1;
                  for (let hn = 1; hn < H.length; hn++) {
                    const kn = H[hn], xn = Array.isArray(Nt) ? Nt[hn - 1] : Nt.type, Fn = Tt.parse(kn, 1 + Kt.length, xn);
                    if (!Fn) {
                      an = !0;
                      break;
                    }
                    Kt.push(Fn);
                  }
                  if (!an) if (Array.isArray(Nt) && Nt.length !== Kt.length) Tt.error(`Expected ${Nt.length} arguments, but found ${Kt.length} instead.`);
                  else {
                    for (let hn = 0; hn < Kt.length; hn++) {
                      const kn = Array.isArray(Nt) ? Nt[hn] : Nt.type, xn = Kt[hn];
                      Tt.concat(hn + 1).checkSubtype(kn, xn.type);
                    }
                    if (Tt.errors.length === 0) return new Co(ve, Xe, Vt, Kt);
                  }
                }
                if (yt.length === 1) oe.errors.push(...Tt.errors);
                else {
                  const Nt = (yt.length ? yt : rt).map(([Kt]) => {
                    return an = Kt, Array.isArray(an) ? `(${an.map(Gt).join(", ")})` : `(${Gt(an.type)}...)`;
                    var an;
                  }).join(" | "), Vt = [];
                  for (let Kt = 1; Kt < H.length; Kt++) {
                    const an = oe.parse(H[Kt], 1 + Vt.length);
                    if (!an) return null;
                    Vt.push(Gt(an.type));
                  }
                  oe.error(`Expected arguments of type ${Nt}, but found (${Vt.join(", ")}) instead.`);
                }
                return null;
              }
              static register(H, oe) {
                Co.definitions = oe;
                for (const ve in oe) H[ve] = Co;
              }
            }
            function da(J, [H, oe, ve, Oe]) {
              H = H.evaluate(J), oe = oe.evaluate(J), ve = ve.evaluate(J);
              const Xe = Oe ? Oe.evaluate(J) : 1, rt = wn(H, oe, ve, Xe);
              if (rt) throw new Wn(rt);
              return new fn(H / 255, oe / 255, ve / 255, Xe, !1);
            }
            function Ou(J, H) {
              return J in H;
            }
            function pf(J, H) {
              const oe = H[J];
              return oe === void 0 ? null : oe;
            }
            function nu(J) {
              return { type: J };
            }
            function Ks(J) {
              if (J instanceof yr) return Ks(J.boundExpression);
              if (J instanceof Co && J.name === "error" || J instanceof Pr || J instanceof go || J instanceof _s) return !1;
              const H = J instanceof cr || J instanceof Zn;
              let oe = !0;
              return J.eachChild((ve) => {
                oe = H ? oe && Ks(ve) : oe && ve instanceof Kn;
              }), !!oe && Cc(J) && lc(J, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]);
            }
            function Cc(J) {
              if (J instanceof Co && (J.name === "get" && J.args.length === 1 || J.name === "feature-state" || J.name === "has" && J.args.length === 1 || J.name === "properties" || J.name === "geometry-type" || J.name === "id" || /^filter-/.test(J.name)) || J instanceof go || J instanceof _s) return !1;
              let H = !0;
              return J.eachChild((oe) => {
                H && !Cc(oe) && (H = !1);
              }), H;
            }
            function sc(J) {
              if (J instanceof Co && J.name === "feature-state") return !1;
              let H = !0;
              return J.eachChild((oe) => {
                H && !sc(oe) && (H = !1);
              }), H;
            }
            function lc(J, H) {
              if (J instanceof Co && H.indexOf(J.name) >= 0) return !1;
              let oe = !0;
              return J.eachChild((ve) => {
                oe && !lc(ve, H) && (oe = !1);
              }), oe;
            }
            function mf(J) {
              return { result: "success", value: J };
            }
            function yl(J) {
              return { result: "error", value: J };
            }
            function vl(J) {
              return J["property-type"] === "data-driven" || J["property-type"] === "cross-faded-data-driven";
            }
            function ru(J) {
              return !!J.expression && J.expression.parameters.indexOf("zoom") > -1;
            }
            function Cl(J) {
              return !!J.expression && J.expression.interpolated;
            }
            function ea(J) {
              return J instanceof Number ? "number" : J instanceof String ? "string" : J instanceof Boolean ? "boolean" : Array.isArray(J) ? "array" : J === null ? "null" : typeof J;
            }
            function Ic(J) {
              return typeof J == "object" && J !== null && !Array.isArray(J);
            }
            function nf(J) {
              return J;
            }
            function zu(J, H) {
              const oe = H.type === "color", ve = J.stops && typeof J.stops[0][0] == "object", Oe = ve || J.property !== void 0, Xe = ve || !Oe, rt = J.type || (Cl(H) ? "exponential" : "interval");
              if (oe || H.type === "padding") {
                const Kt = oe ? fn.parse : gn.parse;
                (J = we({}, J)).stops && (J.stops = J.stops.map((an) => [an[0], Kt(an[1])])), J.default ? J.default = Kt(J.default) : J.default = Kt(H.default);
              }
              if (J.colorSpace && (yt = J.colorSpace) !== "rgb" && yt !== "hcl" && yt !== "lab") throw new Error(`Unknown color space: "${J.colorSpace}"`);
              var yt;
              let Tt, Nt, Vt;
              if (rt === "exponential") Tt = Fu;
              else if (rt === "interval") Tt = gf;
              else if (rt === "categorical") {
                Tt = Ru, Nt = /* @__PURE__ */ Object.create(null);
                for (const Kt of J.stops) Nt[Kt[0]] = Kt[1];
                Vt = typeof J.stops[0][0];
              } else {
                if (rt !== "identity") throw new Error(`Unknown function type "${rt}"`);
                Tt = ws;
              }
              if (ve) {
                const Kt = {}, an = [];
                for (let xn = 0; xn < J.stops.length; xn++) {
                  const Fn = J.stops[xn], qn = Fn[0].zoom;
                  Kt[qn] === void 0 && (Kt[qn] = { zoom: qn, type: J.type, property: J.property, default: J.default, stops: [] }, an.push(qn)), Kt[qn].stops.push([Fn[0].value, Fn[1]]);
                }
                const hn = [];
                for (const xn of an) hn.push([Kt[xn].zoom, zu(Kt[xn], H)]);
                const kn = { name: "linear" };
                return { kind: "composite", interpolationType: kn, interpolationFactor: Nn.interpolationFactor.bind(void 0, kn), zoomStops: hn.map((xn) => xn[0]), evaluate({ zoom: xn }, Fn) {
                  return Fu({ stops: hn, base: J.base }, H, xn).evaluate(xn, Fn);
                } };
              }
              if (Xe) {
                const Kt = rt === "exponential" ? { name: "exponential", base: J.base !== void 0 ? J.base : 1 } : null;
                return { kind: "camera", interpolationType: Kt, interpolationFactor: Nn.interpolationFactor.bind(void 0, Kt), zoomStops: J.stops.map((an) => an[0]), evaluate: ({ zoom: an }) => Tt(J, H, an, Nt, Vt) };
              }
              return { kind: "source", evaluate(Kt, an) {
                const hn = an && an.properties ? an.properties[J.property] : void 0;
                return hn === void 0 ? Yo(J.default, H.default) : Tt(J, H, hn, Nt, Vt);
              } };
            }
            function Yo(J, H, oe) {
              return J !== void 0 ? J : H !== void 0 ? H : oe !== void 0 ? oe : void 0;
            }
            function Ru(J, H, oe, ve, Oe) {
              return Yo(typeof oe === Oe ? ve[oe] : void 0, J.default, H.default);
            }
            function gf(J, H, oe) {
              if (ea(oe) !== "number") return Yo(J.default, H.default);
              const ve = J.stops.length;
              if (ve === 1 || oe <= J.stops[0][0]) return J.stops[0][1];
              if (oe >= J.stops[ve - 1][0]) return J.stops[ve - 1][1];
              const Oe = Tr(J.stops.map((Xe) => Xe[0]), oe);
              return J.stops[Oe][1];
            }
            function Fu(J, H, oe) {
              const ve = J.base !== void 0 ? J.base : 1;
              if (ea(oe) !== "number") return Yo(J.default, H.default);
              const Oe = J.stops.length;
              if (Oe === 1 || oe <= J.stops[0][0]) return J.stops[0][1];
              if (oe >= J.stops[Oe - 1][0]) return J.stops[Oe - 1][1];
              const Xe = Tr(J.stops.map((Vt) => Vt[0]), oe), rt = function(Vt, Kt, an, hn) {
                const kn = hn - an, xn = Vt - an;
                return kn === 0 ? 0 : Kt === 1 ? xn / kn : (Math.pow(Kt, xn) - 1) / (Math.pow(Kt, kn) - 1);
              }(oe, ve, J.stops[Xe][0], J.stops[Xe + 1][0]), yt = J.stops[Xe][1], Tt = J.stops[Xe + 1][1], Nt = bn[H.type] || nf;
              return typeof yt.evaluate == "function" ? { evaluate(...Vt) {
                const Kt = yt.evaluate.apply(void 0, Vt), an = Tt.evaluate.apply(void 0, Vt);
                if (Kt !== void 0 && an !== void 0) return Nt(Kt, an, rt, J.colorSpace);
              } } : Nt(yt, Tt, rt, J.colorSpace);
            }
            function ws(J, H, oe) {
              switch (H.type) {
                case "color":
                  oe = fn.parse(oe);
                  break;
                case "formatted":
                  oe = Cn.fromString(oe.toString());
                  break;
                case "resolvedImage":
                  oe = Pn.fromString(oe.toString());
                  break;
                case "padding":
                  oe = gn.parse(oe);
                  break;
                default:
                  ea(oe) === H.type || H.type === "enum" && H.values[oe] || (oe = void 0);
              }
              return Yo(oe, J.default, H.default);
            }
            Co.register(Ps, { error: [{ kind: "error" }, [tt], (J, [H]) => {
              throw new Wn(H.evaluate(J));
            }], typeof: [tt, [Ze], (J, [H]) => Gt(_n(H.evaluate(J)))], "to-rgba": [$t(Ke, 4), [Be], (J, [H]) => {
              const [oe, ve, Oe, Xe] = H.evaluate(J).rgb;
              return [255 * oe, 255 * ve, 255 * Oe, Xe];
            }], rgb: [Be, [Ke, Ke, Ke], da], rgba: [Be, [Ke, Ke, Ke, Ke], da], has: { type: _e, overloads: [[[tt], (J, [H]) => Ou(H.evaluate(J), J.properties())], [[tt, $e], (J, [H, oe]) => Ou(H.evaluate(J), oe.evaluate(J))]] }, get: { type: Ze, overloads: [[[tt], (J, [H]) => pf(H.evaluate(J), J.properties())], [[tt, $e], (J, [H, oe]) => pf(H.evaluate(J), oe.evaluate(J))]] }, "feature-state": [Ze, [tt], (J, [H]) => pf(H.evaluate(J), J.featureState || {})], properties: [$e, [], (J) => J.properties()], "geometry-type": [tt, [], (J) => J.geometryType()], id: [Ze, [], (J) => J.id()], zoom: [Ke, [], (J) => J.globals.zoom], "heatmap-density": [Ke, [], (J) => J.globals.heatmapDensity || 0], "line-progress": [Ke, [], (J) => J.globals.lineProgress || 0], accumulated: [Ze, [], (J) => J.globals.accumulated === void 0 ? null : J.globals.accumulated], "+": [Ke, nu(Ke), (J, H) => {
              let oe = 0;
              for (const ve of H) oe += ve.evaluate(J);
              return oe;
            }], "*": [Ke, nu(Ke), (J, H) => {
              let oe = 1;
              for (const ve of H) oe *= ve.evaluate(J);
              return oe;
            }], "-": { type: Ke, overloads: [[[Ke, Ke], (J, [H, oe]) => H.evaluate(J) - oe.evaluate(J)], [[Ke], (J, [H]) => -H.evaluate(J)]] }, "/": [Ke, [Ke, Ke], (J, [H, oe]) => H.evaluate(J) / oe.evaluate(J)], "%": [Ke, [Ke, Ke], (J, [H, oe]) => H.evaluate(J) % oe.evaluate(J)], ln2: [Ke, [], () => Math.LN2], pi: [Ke, [], () => Math.PI], e: [Ke, [], () => Math.E], "^": [Ke, [Ke, Ke], (J, [H, oe]) => Math.pow(H.evaluate(J), oe.evaluate(J))], sqrt: [Ke, [Ke], (J, [H]) => Math.sqrt(H.evaluate(J))], log10: [Ke, [Ke], (J, [H]) => Math.log(H.evaluate(J)) / Math.LN10], ln: [Ke, [Ke], (J, [H]) => Math.log(H.evaluate(J))], log2: [Ke, [Ke], (J, [H]) => Math.log(H.evaluate(J)) / Math.LN2], sin: [Ke, [Ke], (J, [H]) => Math.sin(H.evaluate(J))], cos: [Ke, [Ke], (J, [H]) => Math.cos(H.evaluate(J))], tan: [Ke, [Ke], (J, [H]) => Math.tan(H.evaluate(J))], asin: [Ke, [Ke], (J, [H]) => Math.asin(H.evaluate(J))], acos: [Ke, [Ke], (J, [H]) => Math.acos(H.evaluate(J))], atan: [Ke, [Ke], (J, [H]) => Math.atan(H.evaluate(J))], min: [Ke, nu(Ke), (J, H) => Math.min(...H.map((oe) => oe.evaluate(J)))], max: [Ke, nu(Ke), (J, H) => Math.max(...H.map((oe) => oe.evaluate(J)))], abs: [Ke, [Ke], (J, [H]) => Math.abs(H.evaluate(J))], round: [Ke, [Ke], (J, [H]) => {
              const oe = H.evaluate(J);
              return oe < 0 ? -Math.round(-oe) : Math.round(oe);
            }], floor: [Ke, [Ke], (J, [H]) => Math.floor(H.evaluate(J))], ceil: [Ke, [Ke], (J, [H]) => Math.ceil(H.evaluate(J))], "filter-==": [_e, [tt, Ze], (J, [H, oe]) => J.properties()[H.value] === oe.value], "filter-id-==": [_e, [Ze], (J, [H]) => J.id() === H.value], "filter-type-==": [_e, [tt], (J, [H]) => J.geometryType() === H.value], "filter-<": [_e, [tt, Ze], (J, [H, oe]) => {
              const ve = J.properties()[H.value], Oe = oe.value;
              return typeof ve == typeof Oe && ve < Oe;
            }], "filter-id-<": [_e, [Ze], (J, [H]) => {
              const oe = J.id(), ve = H.value;
              return typeof oe == typeof ve && oe < ve;
            }], "filter->": [_e, [tt, Ze], (J, [H, oe]) => {
              const ve = J.properties()[H.value], Oe = oe.value;
              return typeof ve == typeof Oe && ve > Oe;
            }], "filter-id->": [_e, [Ze], (J, [H]) => {
              const oe = J.id(), ve = H.value;
              return typeof oe == typeof ve && oe > ve;
            }], "filter-<=": [_e, [tt, Ze], (J, [H, oe]) => {
              const ve = J.properties()[H.value], Oe = oe.value;
              return typeof ve == typeof Oe && ve <= Oe;
            }], "filter-id-<=": [_e, [Ze], (J, [H]) => {
              const oe = J.id(), ve = H.value;
              return typeof oe == typeof ve && oe <= ve;
            }], "filter->=": [_e, [tt, Ze], (J, [H, oe]) => {
              const ve = J.properties()[H.value], Oe = oe.value;
              return typeof ve == typeof Oe && ve >= Oe;
            }], "filter-id->=": [_e, [Ze], (J, [H]) => {
              const oe = J.id(), ve = H.value;
              return typeof oe == typeof ve && oe >= ve;
            }], "filter-has": [_e, [Ze], (J, [H]) => H.value in J.properties()], "filter-has-id": [_e, [], (J) => J.id() !== null && J.id() !== void 0], "filter-type-in": [_e, [$t(tt)], (J, [H]) => H.value.indexOf(J.geometryType()) >= 0], "filter-id-in": [_e, [$t(Ze)], (J, [H]) => H.value.indexOf(J.id()) >= 0], "filter-in-small": [_e, [tt, $t(Ze)], (J, [H, oe]) => oe.value.indexOf(J.properties()[H.value]) >= 0], "filter-in-large": [_e, [tt, $t(Ze)], (J, [H, oe]) => function(ve, Oe, Xe, rt) {
              for (; Xe <= rt; ) {
                const yt = Xe + rt >> 1;
                if (Oe[yt] === ve) return !0;
                Oe[yt] > ve ? rt = yt - 1 : Xe = yt + 1;
              }
              return !1;
            }(J.properties()[H.value], oe.value, 0, oe.value.length - 1)], all: { type: _e, overloads: [[[_e, _e], (J, [H, oe]) => H.evaluate(J) && oe.evaluate(J)], [nu(_e), (J, H) => {
              for (const oe of H) if (!oe.evaluate(J)) return !1;
              return !0;
            }]] }, any: { type: _e, overloads: [[[_e, _e], (J, [H, oe]) => H.evaluate(J) || oe.evaluate(J)], [nu(_e), (J, H) => {
              for (const oe of H) if (oe.evaluate(J)) return !0;
              return !1;
            }]] }, "!": [_e, [_e], (J, [H]) => !H.evaluate(J)], "is-supported-script": [_e, [tt], (J, [H]) => {
              const oe = J.globals && J.globals.isSupportedScript;
              return !oe || oe(H.evaluate(J));
            }], upcase: [tt, [tt], (J, [H]) => H.evaluate(J).toUpperCase()], downcase: [tt, [tt], (J, [H]) => H.evaluate(J).toLowerCase()], concat: [tt, nu(Ze), (J, H) => H.map((oe) => En(oe.evaluate(J))).join("")], "resolved-locale": [tt, [ct], (J, [H]) => H.evaluate(J).resolvedLocale()] });
            class Nu {
              constructor(H, oe) {
                var ve;
                this.expression = H, this._warningHistory = {}, this._evaluator = new Wr(), this._defaultValue = oe ? (ve = oe).type === "color" && Ic(ve.default) ? new fn(0, 0, 0, 0) : ve.type === "color" ? fn.parse(ve.default) || null : ve.type === "padding" ? gn.parse(ve.default) || null : ve.type === "variableAnchorOffsetCollection" ? Xn.parse(ve.default) || null : ve.default === void 0 ? null : ve.default : null, this._enumValues = oe && oe.type === "enum" ? oe.values : null;
              }
              evaluateWithoutErrorHandling(H, oe, ve, Oe, Xe, rt) {
                return this._evaluator.globals = H, this._evaluator.feature = oe, this._evaluator.featureState = ve, this._evaluator.canonical = Oe, this._evaluator.availableImages = Xe || null, this._evaluator.formattedSection = rt, this.expression.evaluate(this._evaluator);
              }
              evaluate(H, oe, ve, Oe, Xe, rt) {
                this._evaluator.globals = H, this._evaluator.feature = oe || null, this._evaluator.featureState = ve || null, this._evaluator.canonical = Oe, this._evaluator.availableImages = Xe || null, this._evaluator.formattedSection = rt || null;
                try {
                  const yt = this.expression.evaluate(this._evaluator);
                  if (yt == null || typeof yt == "number" && yt != yt) return this._defaultValue;
                  if (this._enumValues && !(yt in this._enumValues)) throw new Wn(`Expected value to be one of ${Object.keys(this._enumValues).map((Tt) => JSON.stringify(Tt)).join(", ")}, but found ${JSON.stringify(yt)} instead.`);
                  return yt;
                } catch (yt) {
                  return this._warningHistory[yt.message] || (this._warningHistory[yt.message] = !0, typeof console < "u" && console.warn(yt.message)), this._defaultValue;
                }
              }
            }
            function An(J) {
              return Array.isArray(J) && J.length > 0 && typeof J[0] == "string" && J[0] in Ps;
            }
            function to(J, H) {
              const oe = new mr(Ps, Ks, [], H ? function(Oe) {
                const Xe = { color: Be, string: tt, number: Ke, enum: tt, boolean: _e, formatted: ft, padding: _t, resolvedImage: Pt, variableAnchorOffsetCollection: Dt };
                return Oe.type === "array" ? $t(Xe[Oe.value] || Ze, Oe.length) : Xe[Oe.type];
              }(H) : void 0), ve = oe.parse(J, void 0, void 0, void 0, H && H.type === "string" ? { typeAnnotation: "coerce" } : void 0);
              return ve ? mf(new Nu(ve, H)) : yl(oe.errors);
            }
            class Io {
              constructor(H, oe) {
                this.kind = H, this._styleExpression = oe, this.isStateDependent = H !== "constant" && !sc(oe.expression);
              }
              evaluateWithoutErrorHandling(H, oe, ve, Oe, Xe, rt) {
                return this._styleExpression.evaluateWithoutErrorHandling(H, oe, ve, Oe, Xe, rt);
              }
              evaluate(H, oe, ve, Oe, Xe, rt) {
                return this._styleExpression.evaluate(H, oe, ve, Oe, Xe, rt);
              }
            }
            class Ku {
              constructor(H, oe, ve, Oe) {
                this.kind = H, this.zoomStops = ve, this._styleExpression = oe, this.isStateDependent = H !== "camera" && !sc(oe.expression), this.interpolationType = Oe;
              }
              evaluateWithoutErrorHandling(H, oe, ve, Oe, Xe, rt) {
                return this._styleExpression.evaluateWithoutErrorHandling(H, oe, ve, Oe, Xe, rt);
              }
              evaluate(H, oe, ve, Oe, Xe, rt) {
                return this._styleExpression.evaluate(H, oe, ve, Oe, Xe, rt);
              }
              interpolationFactor(H, oe, ve) {
                return this.interpolationType ? Nn.interpolationFactor(this.interpolationType, H, oe, ve) : 0;
              }
            }
            function va(J, H) {
              const oe = to(J, H);
              if (oe.result === "error") return oe;
              const ve = oe.value.expression, Oe = Cc(ve);
              if (!Oe && !vl(H)) return yl([new Ge("", "data expressions not supported")]);
              const Xe = lc(ve, ["zoom"]);
              if (!Xe && !ru(H)) return yl([new Ge("", "zoom expressions not supported")]);
              const rt = Ha(ve);
              if (!rt && !Xe) return yl([new Ge("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
              if (rt instanceof Ge) return yl([rt]);
              if (rt instanceof Nn && !Cl(H)) return yl([new Ge("", '"interpolate" expressions cannot be used with this property')]);
              if (!rt) return mf(new Io(Oe ? "constant" : "source", oe.value));
              const yt = rt instanceof Nn ? rt.interpolation : void 0;
              return mf(new Ku(Oe ? "camera" : "composite", oe.value, rt.labels, yt));
            }
            class Js {
              constructor(H, oe) {
                this._parameters = H, this._specification = oe, we(this, zu(this._parameters, this._specification));
              }
              static deserialize(H) {
                return new Js(H._parameters, H._specification);
              }
              static serialize(H) {
                return { _parameters: H._parameters, _specification: H._specification };
              }
            }
            function Ha(J) {
              let H = null;
              if (J instanceof Ir) H = Ha(J.result);
              else if (J instanceof Jn) {
                for (const oe of J.args) if (H = Ha(oe), H) break;
              } else (J instanceof wr || J instanceof Nn) && J.input instanceof Co && J.input.name === "zoom" && (H = J);
              return H instanceof Ge || J.eachChild((oe) => {
                const ve = Ha(oe);
                ve instanceof Ge ? H = ve : !H && ve ? H = new Ge("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : H && ve && H !== ve && (H = new Ge("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
              }), H;
            }
            function as(J) {
              if (J === !0 || J === !1) return !0;
              if (!Array.isArray(J) || J.length === 0) return !1;
              switch (J[0]) {
                case "has":
                  return J.length >= 2 && J[1] !== "$id" && J[1] !== "$type";
                case "in":
                  return J.length >= 3 && (typeof J[1] != "string" || Array.isArray(J[2]));
                case "!in":
                case "!has":
                case "none":
                  return !1;
                case "==":
                case "!=":
                case ">":
                case ">=":
                case "<":
                case "<=":
                  return J.length !== 3 || Array.isArray(J[1]) || Array.isArray(J[2]);
                case "any":
                case "all":
                  for (const H of J.slice(1)) if (!as(H) && typeof H != "boolean") return !1;
                  return !0;
                default:
                  return !0;
              }
            }
            const aa = { type: "boolean", default: !1, transition: !1, "property-type": "data-driven", expression: { interpolated: !1, parameters: ["zoom", "feature"] } };
            function Aa(J) {
              if (J == null) return { filter: () => !0, needGeometry: !1 };
              as(J) || (J = uc(J));
              const H = to(J, aa);
              if (H.result === "error") throw new Error(H.value.map((oe) => `${oe.key}: ${oe.message}`).join(", "));
              return { filter: (oe, ve, Oe) => H.value.evaluate(oe, ve, {}, Oe), needGeometry: Ju(J) };
            }
            function yo(J, H) {
              return J < H ? -1 : J > H ? 1 : 0;
            }
            function Ju(J) {
              if (!Array.isArray(J)) return !1;
              if (J[0] === "within" || J[0] === "distance") return !0;
              for (let H = 1; H < J.length; H++) if (Ju(J[H])) return !0;
              return !1;
            }
            function uc(J) {
              if (!J) return !0;
              const H = J[0];
              return J.length <= 1 ? H !== "any" : H === "==" ? vu(J[1], J[2], "==") : H === "!=" ? Fo(vu(J[1], J[2], "==")) : H === "<" || H === ">" || H === "<=" || H === ">=" ? vu(J[1], J[2], H) : H === "any" ? (oe = J.slice(1), ["any"].concat(oe.map(uc))) : H === "all" ? ["all"].concat(J.slice(1).map(uc)) : H === "none" ? ["all"].concat(J.slice(1).map(uc).map(Fo)) : H === "in" ? xu(J[1], J.slice(2)) : H === "!in" ? Fo(xu(J[1], J.slice(2))) : H === "has" ? Zo(J[1]) : H !== "!has" || Fo(Zo(J[1]));
              var oe;
            }
            function vu(J, H, oe) {
              switch (J) {
                case "$type":
                  return [`filter-type-${oe}`, H];
                case "$id":
                  return [`filter-id-${oe}`, H];
                default:
                  return [`filter-${oe}`, J, H];
              }
            }
            function xu(J, H) {
              if (H.length === 0) return !1;
              switch (J) {
                case "$type":
                  return ["filter-type-in", ["literal", H]];
                case "$id":
                  return ["filter-id-in", ["literal", H]];
                default:
                  return H.length > 200 && !H.some((oe) => typeof oe != typeof H[0]) ? ["filter-in-large", J, ["literal", H.sort(yo)]] : ["filter-in-small", J, ["literal", H]];
              }
            }
            function Zo(J) {
              switch (J) {
                case "$type":
                  return !0;
                case "$id":
                  return ["filter-has-id"];
                default:
                  return ["filter-has", J];
              }
            }
            function Fo(J) {
              return ["!", J];
            }
            function Il(J) {
              const H = typeof J;
              if (H === "number" || H === "boolean" || H === "string" || J == null) return JSON.stringify(J);
              if (Array.isArray(J)) {
                let Oe = "[";
                for (const Xe of J) Oe += `${Il(Xe)},`;
                return `${Oe}]`;
              }
              const oe = Object.keys(J).sort();
              let ve = "{";
              for (let Oe = 0; Oe < oe.length; Oe++) ve += `${JSON.stringify(oe[Oe])}:${Il(J[oe[Oe]])},`;
              return `${ve}}`;
            }
            function bu(J) {
              let H = "";
              for (const oe of be) H += `/${Il(J[oe])}`;
              return H;
            }
            function Xo(J) {
              const H = J.key, oe = J.value;
              return oe ? [new Ce(H, oe, "constants have been deprecated as of v8")] : [];
            }
            function Ra(J) {
              return J instanceof Number || J instanceof String || J instanceof Boolean ? J.valueOf() : J;
            }
            function No(J) {
              if (Array.isArray(J)) return J.map(No);
              if (J instanceof Object && !(J instanceof Number || J instanceof String || J instanceof Boolean)) {
                const H = {};
                for (const oe in J) H[oe] = No(J[oe]);
                return H;
              }
              return Ra(J);
            }
            function Sa(J) {
              const H = J.key, oe = J.value, ve = J.valueSpec || {}, Oe = J.objectElementValidators || {}, Xe = J.style, rt = J.styleSpec, yt = J.validateSpec;
              let Tt = [];
              const Nt = ea(oe);
              if (Nt !== "object") return [new Ce(H, oe, `object expected, ${Nt} found`)];
              for (const Vt in oe) {
                const Kt = Vt.split(".")[0], an = ve[Kt] || ve["*"];
                let hn;
                if (Oe[Kt]) hn = Oe[Kt];
                else if (ve[Kt]) hn = yt;
                else if (Oe["*"]) hn = Oe["*"];
                else {
                  if (!ve["*"]) {
                    Tt.push(new Ce(H, oe[Vt], `unknown property "${Vt}"`));
                    continue;
                  }
                  hn = yt;
                }
                Tt = Tt.concat(hn({ key: (H && `${H}.`) + Vt, value: oe[Vt], valueSpec: an, style: Xe, styleSpec: rt, object: oe, objectKey: Vt, validateSpec: yt }, oe));
              }
              for (const Vt in ve) Oe[Vt] || ve[Vt].required && ve[Vt].default === void 0 && oe[Vt] === void 0 && Tt.push(new Ce(H, oe, `missing required property "${Vt}"`));
              return Tt;
            }
            function Bo(J) {
              const H = J.value, oe = J.valueSpec, ve = J.validateSpec, Oe = J.style, Xe = J.styleSpec, rt = J.key, yt = J.arrayElementValidator || ve;
              if (ea(H) !== "array") return [new Ce(rt, H, `array expected, ${ea(H)} found`)];
              if (oe.length && H.length !== oe.length) return [new Ce(rt, H, `array length ${oe.length} expected, length ${H.length} found`)];
              if (oe["min-length"] && H.length < oe["min-length"]) return [new Ce(rt, H, `array length at least ${oe["min-length"]} expected, length ${H.length} found`)];
              let Tt = { type: oe.value, values: oe.values };
              Xe.$version < 7 && (Tt.function = oe.function), ea(oe.value) === "object" && (Tt = oe.value);
              let Nt = [];
              for (let Vt = 0; Vt < H.length; Vt++) Nt = Nt.concat(yt({ array: H, arrayIndex: Vt, value: H[Vt], valueSpec: Tt, validateSpec: J.validateSpec, style: Oe, styleSpec: Xe, key: `${rt}[${Vt}]` }));
              return Nt;
            }
            function _a(J) {
              const H = J.key, oe = J.value, ve = J.valueSpec;
              let Oe = ea(oe);
              return Oe === "number" && oe != oe && (Oe = "NaN"), Oe !== "number" ? [new Ce(H, oe, `number expected, ${Oe} found`)] : "minimum" in ve && oe < ve.minimum ? [new Ce(H, oe, `${oe} is less than the minimum value ${ve.minimum}`)] : "maximum" in ve && oe > ve.maximum ? [new Ce(H, oe, `${oe} is greater than the maximum value ${ve.maximum}`)] : [];
            }
            function Do(J) {
              const H = J.valueSpec, oe = Ra(J.value.type);
              let ve, Oe, Xe, rt = {};
              const yt = oe !== "categorical" && J.value.property === void 0, Tt = !yt, Nt = ea(J.value.stops) === "array" && ea(J.value.stops[0]) === "array" && ea(J.value.stops[0][0]) === "object", Vt = Sa({ key: J.key, value: J.value, valueSpec: J.styleSpec.function, validateSpec: J.validateSpec, style: J.style, styleSpec: J.styleSpec, objectElementValidators: { stops: function(hn) {
                if (oe === "identity") return [new Ce(hn.key, hn.value, 'identity function may not have a "stops" property')];
                let kn = [];
                const xn = hn.value;
                return kn = kn.concat(Bo({ key: hn.key, value: xn, valueSpec: hn.valueSpec, validateSpec: hn.validateSpec, style: hn.style, styleSpec: hn.styleSpec, arrayElementValidator: Kt })), ea(xn) === "array" && xn.length === 0 && kn.push(new Ce(hn.key, xn, "array must have at least one stop")), kn;
              }, default: function(hn) {
                return hn.validateSpec({ key: hn.key, value: hn.value, valueSpec: H, validateSpec: hn.validateSpec, style: hn.style, styleSpec: hn.styleSpec });
              } } });
              return oe === "identity" && yt && Vt.push(new Ce(J.key, J.value, 'missing required property "property"')), oe === "identity" || J.value.stops || Vt.push(new Ce(J.key, J.value, 'missing required property "stops"')), oe === "exponential" && J.valueSpec.expression && !Cl(J.valueSpec) && Vt.push(new Ce(J.key, J.value, "exponential functions not supported")), J.styleSpec.$version >= 8 && (Tt && !vl(J.valueSpec) ? Vt.push(new Ce(J.key, J.value, "property functions not supported")) : yt && !ru(J.valueSpec) && Vt.push(new Ce(J.key, J.value, "zoom functions not supported"))), oe !== "categorical" && !Nt || J.value.property !== void 0 || Vt.push(new Ce(J.key, J.value, '"property" property is required')), Vt;
              function Kt(hn) {
                let kn = [];
                const xn = hn.value, Fn = hn.key;
                if (ea(xn) !== "array") return [new Ce(Fn, xn, `array expected, ${ea(xn)} found`)];
                if (xn.length !== 2) return [new Ce(Fn, xn, `array length 2 expected, length ${xn.length} found`)];
                if (Nt) {
                  if (ea(xn[0]) !== "object") return [new Ce(Fn, xn, `object expected, ${ea(xn[0])} found`)];
                  if (xn[0].zoom === void 0) return [new Ce(Fn, xn, "object stop key must have zoom")];
                  if (xn[0].value === void 0) return [new Ce(Fn, xn, "object stop key must have value")];
                  if (Xe && Xe > Ra(xn[0].zoom)) return [new Ce(Fn, xn[0].zoom, "stop zoom values must appear in ascending order")];
                  Ra(xn[0].zoom) !== Xe && (Xe = Ra(xn[0].zoom), Oe = void 0, rt = {}), kn = kn.concat(Sa({ key: `${Fn}[0]`, value: xn[0], valueSpec: { zoom: {} }, validateSpec: hn.validateSpec, style: hn.style, styleSpec: hn.styleSpec, objectElementValidators: { zoom: _a, value: an } }));
                } else kn = kn.concat(an({ key: `${Fn}[0]`, value: xn[0], valueSpec: {}, validateSpec: hn.validateSpec, style: hn.style, styleSpec: hn.styleSpec }, xn));
                return An(No(xn[1])) ? kn.concat([new Ce(`${Fn}[1]`, xn[1], "expressions are not allowed in function stops.")]) : kn.concat(hn.validateSpec({ key: `${Fn}[1]`, value: xn[1], valueSpec: H, validateSpec: hn.validateSpec, style: hn.style, styleSpec: hn.styleSpec }));
              }
              function an(hn, kn) {
                const xn = ea(hn.value), Fn = Ra(hn.value), qn = hn.value !== null ? hn.value : kn;
                if (ve) {
                  if (xn !== ve) return [new Ce(hn.key, qn, `${xn} stop domain type must match previous stop domain type ${ve}`)];
                } else ve = xn;
                if (xn !== "number" && xn !== "string" && xn !== "boolean") return [new Ce(hn.key, qn, "stop domain value must be a number, string, or boolean")];
                if (xn !== "number" && oe !== "categorical") {
                  let vr = `number expected, ${xn} found`;
                  return vl(H) && oe === void 0 && (vr += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new Ce(hn.key, qn, vr)];
                }
                return oe !== "categorical" || xn !== "number" || isFinite(Fn) && Math.floor(Fn) === Fn ? oe !== "categorical" && xn === "number" && Oe !== void 0 && Fn < Oe ? [new Ce(hn.key, qn, "stop domain values must appear in ascending order")] : (Oe = Fn, oe === "categorical" && Fn in rt ? [new Ce(hn.key, qn, "stop domain values must be unique")] : (rt[Fn] = !0, [])) : [new Ce(hn.key, qn, `integer expected, found ${Fn}`)];
              }
            }
            function jo(J) {
              const H = (J.expressionContext === "property" ? va : to)(No(J.value), J.valueSpec);
              if (H.result === "error") return H.value.map((ve) => new Ce(`${J.key}${ve.key}`, J.value, ve.message));
              const oe = H.value.expression || H.value._styleExpression.expression;
              if (J.expressionContext === "property" && J.propertyKey === "text-font" && !oe.outputDefined()) return [new Ce(J.key, J.value, `Invalid data expression for "${J.propertyKey}". Output values must be contained as literals within the expression.`)];
              if (J.expressionContext === "property" && J.propertyType === "layout" && !sc(oe)) return [new Ce(J.key, J.value, '"feature-state" data expressions are not supported with layout properties.')];
              if (J.expressionContext === "filter" && !sc(oe)) return [new Ce(J.key, J.value, '"feature-state" data expressions are not supported with filters.')];
              if (J.expressionContext && J.expressionContext.indexOf("cluster") === 0) {
                if (!lc(oe, ["zoom", "feature-state"])) return [new Ce(J.key, J.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
                if (J.expressionContext === "cluster-initial" && !Cc(oe)) return [new Ce(J.key, J.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
              }
              return [];
            }
            function Dl(J) {
              const H = J.key, oe = J.value, ve = J.valueSpec, Oe = [];
              return Array.isArray(ve.values) ? ve.values.indexOf(Ra(oe)) === -1 && Oe.push(new Ce(H, oe, `expected one of [${ve.values.join(", ")}], ${JSON.stringify(oe)} found`)) : Object.keys(ve.values).indexOf(Ra(oe)) === -1 && Oe.push(new Ce(H, oe, `expected one of [${Object.keys(ve.values).join(", ")}], ${JSON.stringify(oe)} found`)), Oe;
            }
            function Uo(J) {
              return as(No(J.value)) ? jo(we({}, J, { expressionContext: "filter", valueSpec: { value: "boolean" } })) : Qs(J);
            }
            function Qs(J) {
              const H = J.value, oe = J.key;
              if (ea(H) !== "array") return [new Ce(oe, H, `array expected, ${ea(H)} found`)];
              const ve = J.styleSpec;
              let Oe, Xe = [];
              if (H.length < 1) return [new Ce(oe, H, "filter array must have at least 1 element")];
              switch (Xe = Xe.concat(Dl({ key: `${oe}[0]`, value: H[0], valueSpec: ve.filter_operator, style: J.style, styleSpec: J.styleSpec })), Ra(H[0])) {
                case "<":
                case "<=":
                case ">":
                case ">=":
                  H.length >= 2 && Ra(H[1]) === "$type" && Xe.push(new Ce(oe, H, `"$type" cannot be use with operator "${H[0]}"`));
                case "==":
                case "!=":
                  H.length !== 3 && Xe.push(new Ce(oe, H, `filter array for operator "${H[0]}" must have 3 elements`));
                case "in":
                case "!in":
                  H.length >= 2 && (Oe = ea(H[1]), Oe !== "string" && Xe.push(new Ce(`${oe}[1]`, H[1], `string expected, ${Oe} found`)));
                  for (let rt = 2; rt < H.length; rt++) Oe = ea(H[rt]), Ra(H[1]) === "$type" ? Xe = Xe.concat(Dl({ key: `${oe}[${rt}]`, value: H[rt], valueSpec: ve.geometry_type, style: J.style, styleSpec: J.styleSpec })) : Oe !== "string" && Oe !== "number" && Oe !== "boolean" && Xe.push(new Ce(`${oe}[${rt}]`, H[rt], `string, number, or boolean expected, ${Oe} found`));
                  break;
                case "any":
                case "all":
                case "none":
                  for (let rt = 1; rt < H.length; rt++) Xe = Xe.concat(Qs({ key: `${oe}[${rt}]`, value: H[rt], style: J.style, styleSpec: J.styleSpec }));
                  break;
                case "has":
                case "!has":
                  Oe = ea(H[1]), H.length !== 2 ? Xe.push(new Ce(oe, H, `filter array for "${H[0]}" operator must have 2 elements`)) : Oe !== "string" && Xe.push(new Ce(`${oe}[1]`, H[1], `string expected, ${Oe} found`));
              }
              return Xe;
            }
            function os(J, H) {
              const oe = J.key, ve = J.validateSpec, Oe = J.style, Xe = J.styleSpec, rt = J.value, yt = J.objectKey, Tt = Xe[`${H}_${J.layerType}`];
              if (!Tt) return [];
              const Nt = yt.match(/^(.*)-transition$/);
              if (H === "paint" && Nt && Tt[Nt[1]] && Tt[Nt[1]].transition) return ve({ key: oe, value: rt, valueSpec: Xe.transition, style: Oe, styleSpec: Xe });
              const Vt = J.valueSpec || Tt[yt];
              if (!Vt) return [new Ce(oe, rt, `unknown property "${yt}"`)];
              let Kt;
              if (ea(rt) === "string" && vl(Vt) && !Vt.tokens && (Kt = /^{([^}]+)}$/.exec(rt))) return [new Ce(oe, rt, `"${yt}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Kt[1])} }\`.`)];
              const an = [];
              return J.layerType === "symbol" && (yt === "text-field" && Oe && !Oe.glyphs && an.push(new Ce(oe, rt, 'use of "text-field" requires a style "glyphs" property')), yt === "text-font" && Ic(No(rt)) && Ra(rt.type) === "identity" && an.push(new Ce(oe, rt, '"text-font" does not support identity functions'))), an.concat(ve({ key: J.key, value: rt, valueSpec: Vt, style: Oe, styleSpec: Xe, expressionContext: "property", propertyType: H, propertyKey: yt }));
            }
            function Bu(J) {
              return os(J, "paint");
            }
            function Ll(J) {
              return os(J, "layout");
            }
            function Pl(J) {
              let H = [];
              const oe = J.value, ve = J.key, Oe = J.style, Xe = J.styleSpec;
              oe.type || oe.ref || H.push(new Ce(ve, oe, 'either "type" or "ref" is required'));
              let rt = Ra(oe.type);
              const yt = Ra(oe.ref);
              if (oe.id) {
                const Tt = Ra(oe.id);
                for (let Nt = 0; Nt < J.arrayIndex; Nt++) {
                  const Vt = Oe.layers[Nt];
                  Ra(Vt.id) === Tt && H.push(new Ce(ve, oe.id, `duplicate layer id "${oe.id}", previously used at line ${Vt.id.__line__}`));
                }
              }
              if ("ref" in oe) {
                let Tt;
                ["type", "source", "source-layer", "filter", "layout"].forEach((Nt) => {
                  Nt in oe && H.push(new Ce(ve, oe[Nt], `"${Nt}" is prohibited for ref layers`));
                }), Oe.layers.forEach((Nt) => {
                  Ra(Nt.id) === yt && (Tt = Nt);
                }), Tt ? Tt.ref ? H.push(new Ce(ve, oe.ref, "ref cannot reference another ref layer")) : rt = Ra(Tt.type) : H.push(new Ce(ve, oe.ref, `ref layer "${yt}" not found`));
              } else if (rt !== "background") if (oe.source) {
                const Tt = Oe.sources && Oe.sources[oe.source], Nt = Tt && Ra(Tt.type);
                Tt ? Nt === "vector" && rt === "raster" ? H.push(new Ce(ve, oe.source, `layer "${oe.id}" requires a raster source`)) : Nt !== "raster-dem" && rt === "hillshade" ? H.push(new Ce(ve, oe.source, `layer "${oe.id}" requires a raster-dem source`)) : Nt === "raster" && rt !== "raster" ? H.push(new Ce(ve, oe.source, `layer "${oe.id}" requires a vector source`)) : Nt !== "vector" || oe["source-layer"] ? Nt === "raster-dem" && rt !== "hillshade" ? H.push(new Ce(ve, oe.source, "raster-dem source can only be used with layer type 'hillshade'.")) : rt !== "line" || !oe.paint || !oe.paint["line-gradient"] || Nt === "geojson" && Tt.lineMetrics || H.push(new Ce(ve, oe, `layer "${oe.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : H.push(new Ce(ve, oe, `layer "${oe.id}" must specify a "source-layer"`)) : H.push(new Ce(ve, oe.source, `source "${oe.source}" not found`));
              } else H.push(new Ce(ve, oe, 'missing required property "source"'));
              return H = H.concat(Sa({ key: ve, value: oe, valueSpec: Xe.layer, style: J.style, styleSpec: J.styleSpec, validateSpec: J.validateSpec, objectElementValidators: { "*"() {
                return [];
              }, type() {
                return J.validateSpec({ key: `${ve}.type`, value: oe.type, valueSpec: Xe.layer.type, style: J.style, styleSpec: J.styleSpec, validateSpec: J.validateSpec, object: oe, objectKey: "type" });
              }, filter: Uo, layout(Tt) {
                return Sa({ layer: oe, key: Tt.key, value: Tt.value, style: Tt.style, styleSpec: Tt.styleSpec, validateSpec: Tt.validateSpec, objectElementValidators: { "*"(Nt) {
                  return Ll(we({ layerType: rt }, Nt));
                } } });
              }, paint(Tt) {
                return Sa({ layer: oe, key: Tt.key, value: Tt.value, style: Tt.style, styleSpec: Tt.styleSpec, validateSpec: Tt.validateSpec, objectElementValidators: { "*"(Nt) {
                  return Bu(we({ layerType: rt }, Nt));
                } } });
              } } })), H;
            }
            function Lo(J) {
              const H = J.value, oe = J.key, ve = ea(H);
              return ve !== "string" ? [new Ce(oe, H, `string expected, ${ve} found`)] : [];
            }
            const Ca = { promoteId: function({ key: J, value: H }) {
              if (ea(H) === "string") return Lo({ key: J, value: H });
              {
                const oe = [];
                for (const ve in H) oe.push(...Lo({ key: `${J}.${ve}`, value: H[ve] }));
                return oe;
              }
            } };
            function Ol(J) {
              const H = J.value, oe = J.key, ve = J.styleSpec, Oe = J.style, Xe = J.validateSpec;
              if (!H.type) return [new Ce(oe, H, '"type" is required')];
              const rt = Ra(H.type);
              let yt;
              switch (rt) {
                case "vector":
                case "raster":
                  return yt = Sa({ key: oe, value: H, valueSpec: ve[`source_${rt.replace("-", "_")}`], style: J.style, styleSpec: ve, objectElementValidators: Ca, validateSpec: Xe }), yt;
                case "raster-dem":
                  return yt = function(Tt) {
                    var Nt;
                    const Vt = (Nt = Tt.sourceName) !== null && Nt !== void 0 ? Nt : "", Kt = Tt.value, an = Tt.styleSpec, hn = an.source_raster_dem, kn = Tt.style;
                    let xn = [];
                    const Fn = ea(Kt);
                    if (Kt === void 0) return xn;
                    if (Fn !== "object") return xn.push(new Ce("source_raster_dem", Kt, `object expected, ${Fn} found`)), xn;
                    const qn = Ra(Kt.encoding) === "custom", vr = ["redFactor", "greenFactor", "blueFactor", "baseShift"], rr = Tt.value.encoding ? `"${Tt.value.encoding}"` : "Default";
                    for (const dr in Kt) !qn && vr.includes(dr) ? xn.push(new Ce(dr, Kt[dr], `In "${Vt}": "${dr}" is only valid when "encoding" is set to "custom". ${rr} encoding found`)) : hn[dr] ? xn = xn.concat(Tt.validateSpec({ key: dr, value: Kt[dr], valueSpec: hn[dr], validateSpec: Tt.validateSpec, style: kn, styleSpec: an })) : xn.push(new Ce(dr, Kt[dr], `unknown property "${dr}"`));
                    return xn;
                  }({ sourceName: oe, value: H, style: J.style, styleSpec: ve, validateSpec: Xe }), yt;
                case "geojson":
                  if (yt = Sa({ key: oe, value: H, valueSpec: ve.source_geojson, style: Oe, styleSpec: ve, validateSpec: Xe, objectElementValidators: Ca }), H.cluster) for (const Tt in H.clusterProperties) {
                    const [Nt, Vt] = H.clusterProperties[Tt], Kt = typeof Nt == "string" ? [Nt, ["accumulated"], ["get", Tt]] : Nt;
                    yt.push(...jo({ key: `${oe}.${Tt}.map`, value: Vt, validateSpec: Xe, expressionContext: "cluster-map" })), yt.push(...jo({ key: `${oe}.${Tt}.reduce`, value: Kt, validateSpec: Xe, expressionContext: "cluster-reduce" }));
                  }
                  return yt;
                case "video":
                  return Sa({ key: oe, value: H, valueSpec: ve.source_video, style: Oe, validateSpec: Xe, styleSpec: ve });
                case "image":
                  return Sa({ key: oe, value: H, valueSpec: ve.source_image, style: Oe, validateSpec: Xe, styleSpec: ve });
                case "canvas":
                  return [new Ce(oe, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
                default:
                  return Dl({ key: `${oe}.type`, value: H.type, valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] }, style: Oe, validateSpec: Xe, styleSpec: ve });
              }
            }
            function xi(J) {
              const H = J.value, oe = J.styleSpec, ve = oe.light, Oe = J.style;
              let Xe = [];
              const rt = ea(H);
              if (H === void 0) return Xe;
              if (rt !== "object") return Xe = Xe.concat([new Ce("light", H, `object expected, ${rt} found`)]), Xe;
              for (const yt in H) {
                const Tt = yt.match(/^(.*)-transition$/);
                Xe = Tt && ve[Tt[1]] && ve[Tt[1]].transition ? Xe.concat(J.validateSpec({ key: yt, value: H[yt], valueSpec: oe.transition, validateSpec: J.validateSpec, style: Oe, styleSpec: oe })) : ve[yt] ? Xe.concat(J.validateSpec({ key: yt, value: H[yt], valueSpec: ve[yt], validateSpec: J.validateSpec, style: Oe, styleSpec: oe })) : Xe.concat([new Ce(yt, H[yt], `unknown property "${yt}"`)]);
              }
              return Xe;
            }
            function cc(J) {
              const H = J.value, oe = J.styleSpec, ve = oe.sky, Oe = J.style, Xe = ea(H);
              if (H === void 0) return [];
              if (Xe !== "object") return [new Ce("sky", H, `object expected, ${Xe} found`)];
              let rt = [];
              for (const yt in H) rt = ve[yt] ? rt.concat(J.validateSpec({ key: yt, value: H[yt], valueSpec: ve[yt], style: Oe, styleSpec: oe })) : rt.concat([new Ce(yt, H[yt], `unknown property "${yt}"`)]);
              return rt;
            }
            function Dc(J) {
              const H = J.value, oe = J.styleSpec, ve = oe.terrain, Oe = J.style;
              let Xe = [];
              const rt = ea(H);
              if (H === void 0) return Xe;
              if (rt !== "object") return Xe = Xe.concat([new Ce("terrain", H, `object expected, ${rt} found`)]), Xe;
              for (const yt in H) Xe = ve[yt] ? Xe.concat(J.validateSpec({ key: yt, value: H[yt], valueSpec: ve[yt], validateSpec: J.validateSpec, style: Oe, styleSpec: oe })) : Xe.concat([new Ce(yt, H[yt], `unknown property "${yt}"`)]);
              return Xe;
            }
            function xl(J) {
              let H = [];
              const oe = J.value, ve = J.key;
              if (Array.isArray(oe)) {
                const Oe = [], Xe = [];
                for (const rt in oe) {
                  oe[rt].id && Oe.includes(oe[rt].id) && H.push(new Ce(ve, oe, `all the sprites' ids must be unique, but ${oe[rt].id} is duplicated`)), Oe.push(oe[rt].id), oe[rt].url && Xe.includes(oe[rt].url) && H.push(new Ce(ve, oe, `all the sprites' URLs must be unique, but ${oe[rt].url} is duplicated`)), Xe.push(oe[rt].url);
                  const yt = { id: { type: "string", required: !0 }, url: { type: "string", required: !0 } };
                  H = H.concat(Sa({ key: `${ve}[${rt}]`, value: oe[rt], valueSpec: yt, validateSpec: J.validateSpec }));
                }
                return H;
              }
              return Lo({ key: ve, value: oe });
            }
            const zl = { "*"() {
              return [];
            }, array: Bo, boolean: function(J) {
              const H = J.value, oe = J.key, ve = ea(H);
              return ve !== "boolean" ? [new Ce(oe, H, `boolean expected, ${ve} found`)] : [];
            }, number: _a, color: function(J) {
              const H = J.key, oe = J.value, ve = ea(oe);
              return ve !== "string" ? [new Ce(H, oe, `color expected, ${ve} found`)] : fn.parse(String(oe)) ? [] : [new Ce(H, oe, `color expected, "${oe}" found`)];
            }, constants: Xo, enum: Dl, filter: Uo, function: Do, layer: Pl, object: Sa, source: Ol, light: xi, sky: cc, terrain: Dc, projection: function(J) {
              const H = J.value, oe = J.styleSpec, ve = oe.projection, Oe = J.style, Xe = ea(H);
              if (H === void 0) return [];
              if (Xe !== "object") return [new Ce("projection", H, `object expected, ${Xe} found`)];
              let rt = [];
              for (const yt in H) rt = ve[yt] ? rt.concat(J.validateSpec({ key: yt, value: H[yt], valueSpec: ve[yt], style: Oe, styleSpec: oe })) : rt.concat([new Ce(yt, H[yt], `unknown property "${yt}"`)]);
              return rt;
            }, string: Lo, formatted: function(J) {
              return Lo(J).length === 0 ? [] : jo(J);
            }, resolvedImage: function(J) {
              return Lo(J).length === 0 ? [] : jo(J);
            }, padding: function(J) {
              const H = J.key, oe = J.value;
              if (ea(oe) === "array") {
                if (oe.length < 1 || oe.length > 4) return [new Ce(H, oe, `padding requires 1 to 4 values; ${oe.length} values found`)];
                const ve = { type: "number" };
                let Oe = [];
                for (let Xe = 0; Xe < oe.length; Xe++) Oe = Oe.concat(J.validateSpec({ key: `${H}[${Xe}]`, value: oe[Xe], validateSpec: J.validateSpec, valueSpec: ve }));
                return Oe;
              }
              return _a({ key: H, value: oe, valueSpec: {} });
            }, variableAnchorOffsetCollection: function(J) {
              const H = J.key, oe = J.value, ve = ea(oe), Oe = J.styleSpec;
              if (ve !== "array" || oe.length < 1 || oe.length % 2 != 0) return [new Ce(H, oe, "variableAnchorOffsetCollection requires a non-empty array of even length")];
              let Xe = [];
              for (let rt = 0; rt < oe.length; rt += 2) Xe = Xe.concat(Dl({ key: `${H}[${rt}]`, value: oe[rt], valueSpec: Oe.layout_symbol["text-anchor"] })), Xe = Xe.concat(Bo({ key: `${H}[${rt + 1}]`, value: oe[rt + 1], valueSpec: { length: 2, value: "number" }, validateSpec: J.validateSpec, style: J.style, styleSpec: Oe }));
              return Xe;
            }, sprite: xl };
            function Rl(J) {
              const H = J.value, oe = J.valueSpec, ve = J.styleSpec;
              return J.validateSpec = Rl, oe.expression && Ic(Ra(H)) ? Do(J) : oe.expression && An(No(H)) ? jo(J) : oe.type && zl[oe.type] ? zl[oe.type](J) : Sa(we({}, J, { valueSpec: oe.type ? ve[oe.type] : oe }));
            }
            function ju(J) {
              const H = J.value, oe = J.key, ve = Lo(J);
              return ve.length || (H.indexOf("{fontstack}") === -1 && ve.push(new Ce(oe, H, '"glyphs" url must include a "{fontstack}" token')), H.indexOf("{range}") === -1 && ve.push(new Ce(oe, H, '"glyphs" url must include a "{range}" token'))), ve;
            }
            function ti(J, H = pe) {
              let oe = [];
              return oe = oe.concat(Rl({ key: "", value: J, valueSpec: H.$root, styleSpec: H, style: J, validateSpec: Rl, objectElementValidators: { glyphs: ju, "*"() {
                return [];
              } } })), J.constants && (oe = oe.concat(Xo({ key: "constants", value: J.constants, style: J, styleSpec: H, validateSpec: Rl }))), Fl(oe);
            }
            function js(J) {
              return function(H) {
                return J({ ...H, validateSpec: Rl });
              };
            }
            function Fl(J) {
              return [].concat(J).sort((H, oe) => H.line - oe.line);
            }
            function Fa(J) {
              return function(...H) {
                return Fl(J.apply(this, H));
              };
            }
            ti.source = Fa(js(Ol)), ti.sprite = Fa(js(xl)), ti.glyphs = Fa(js(ju)), ti.light = Fa(js(xi)), ti.sky = Fa(js(cc)), ti.terrain = Fa(js(Dc)), ti.layer = Fa(js(Pl)), ti.filter = Fa(js(Uo)), ti.paintProperty = Fa(js(Bu)), ti.layoutProperty = Fa(js(Ll));
            const Us = ti;
            Us.source;
            const ss = Us.light, el = Us.sky;
            Us.terrain, Us.filter;
            const ks = Us.paintProperty, iu = Us.layoutProperty;
            function tl(J, H) {
              let oe = !1;
              if (H && H.length) for (const ve of H) J.fire(new me(new Error(ve.message))), oe = !0;
              return oe;
            }
            class Os {
              constructor(H, oe, ve) {
                const Oe = this.cells = [];
                if (H instanceof ArrayBuffer) {
                  this.arrayBuffer = H;
                  const rt = new Int32Array(this.arrayBuffer);
                  H = rt[0], oe = rt[1], ve = rt[2], this.d = oe + 2 * ve;
                  for (let Nt = 0; Nt < this.d * this.d; Nt++) {
                    const Vt = rt[3 + Nt], Kt = rt[3 + Nt + 1];
                    Oe.push(Vt === Kt ? null : rt.subarray(Vt, Kt));
                  }
                  const yt = rt[3 + Oe.length], Tt = rt[3 + Oe.length + 1];
                  this.keys = rt.subarray(yt, Tt), this.bboxes = rt.subarray(Tt), this.insert = this._insertReadonly;
                } else {
                  this.d = oe + 2 * ve;
                  for (let rt = 0; rt < this.d * this.d; rt++) Oe.push([]);
                  this.keys = [], this.bboxes = [];
                }
                this.n = oe, this.extent = H, this.padding = ve, this.scale = oe / H, this.uid = 0;
                const Xe = ve / oe * H;
                this.min = -Xe, this.max = H + Xe;
              }
              insert(H, oe, ve, Oe, Xe) {
                this._forEachCell(oe, ve, Oe, Xe, this._insertCell, this.uid++, void 0, void 0), this.keys.push(H), this.bboxes.push(oe), this.bboxes.push(ve), this.bboxes.push(Oe), this.bboxes.push(Xe);
              }
              _insertReadonly() {
                throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.");
              }
              _insertCell(H, oe, ve, Oe, Xe, rt) {
                this.cells[Xe].push(rt);
              }
              query(H, oe, ve, Oe, Xe) {
                const rt = this.min, yt = this.max;
                if (H <= rt && oe <= rt && yt <= ve && yt <= Oe && !Xe) return Array.prototype.slice.call(this.keys);
                {
                  const Tt = [], Nt = {};
                  return this._forEachCell(H, oe, ve, Oe, this._queryCell, Tt, Nt, Xe), Tt;
                }
              }
              _queryCell(H, oe, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = this.cells[Xe];
                if (Nt !== null) {
                  const Vt = this.keys, Kt = this.bboxes;
                  for (let an = 0; an < Nt.length; an++) {
                    const hn = Nt[an];
                    if (yt[hn] === void 0) {
                      const kn = 4 * hn;
                      (Tt ? Tt(Kt[kn + 0], Kt[kn + 1], Kt[kn + 2], Kt[kn + 3]) : H <= Kt[kn + 2] && oe <= Kt[kn + 3] && ve >= Kt[kn + 0] && Oe >= Kt[kn + 1]) ? (yt[hn] = !0, rt.push(Vt[hn])) : yt[hn] = !1;
                    }
                  }
                }
              }
              _forEachCell(H, oe, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = this._convertToCellCoord(H), Vt = this._convertToCellCoord(oe), Kt = this._convertToCellCoord(ve), an = this._convertToCellCoord(Oe);
                for (let hn = Nt; hn <= Kt; hn++) for (let kn = Vt; kn <= an; kn++) {
                  const xn = this.d * kn + hn;
                  if ((!Tt || Tt(this._convertFromCellCoord(hn), this._convertFromCellCoord(kn), this._convertFromCellCoord(hn + 1), this._convertFromCellCoord(kn + 1))) && Xe.call(this, H, oe, ve, Oe, xn, rt, yt, Tt)) return;
                }
              }
              _convertFromCellCoord(H) {
                return (H - this.padding) / this.scale;
              }
              _convertToCellCoord(H) {
                return Math.max(0, Math.min(this.d - 1, Math.floor(H * this.scale) + this.padding));
              }
              toArrayBuffer() {
                if (this.arrayBuffer) return this.arrayBuffer;
                const H = this.cells, oe = 3 + this.cells.length + 1 + 1;
                let ve = 0;
                for (let rt = 0; rt < this.cells.length; rt++) ve += this.cells[rt].length;
                const Oe = new Int32Array(oe + ve + this.keys.length + this.bboxes.length);
                Oe[0] = this.extent, Oe[1] = this.n, Oe[2] = this.padding;
                let Xe = oe;
                for (let rt = 0; rt < H.length; rt++) {
                  const yt = H[rt];
                  Oe[3 + rt] = Xe, Oe.set(yt, Xe), Xe += yt.length;
                }
                return Oe[3 + H.length] = Xe, Oe.set(this.keys, Xe), Xe += this.keys.length, Oe[3 + H.length + 1] = Xe, Oe.set(this.bboxes, Xe), Xe += this.bboxes.length, Oe.buffer;
              }
              static serialize(H, oe) {
                const ve = H.toArrayBuffer();
                return oe && oe.push(ve), { buffer: ve };
              }
              static deserialize(H) {
                return new Os(H.buffer);
              }
            }
            const Vs = {};
            function di(J, H, oe = {}) {
              if (Vs[J]) throw new Error(`${J} is already registered.`);
              Object.defineProperty(H, "_classRegistryKey", { value: J, writeable: !1 }), Vs[J] = { klass: H, omit: oe.omit || [], shallow: oe.shallow || [] };
            }
            di("Object", Object), di("TransferableGridIndex", Os), di("Color", fn), di("Error", Error), di("AJAXError", ue), di("ResolvedImage", Pn), di("StylePropertyFunction", Js), di("StyleExpression", Nu, { omit: ["_evaluator"] }), di("ZoomDependentExpression", Ku), di("ZoomConstantExpression", Io), di("CompoundExpression", Co, { omit: ["_evaluate"] });
            for (const J in Ps) Ps[J]._classRegistryKey || di(`Expression_${J}`, Ps[J]);
            function xa(J) {
              return J && typeof ArrayBuffer < "u" && (J instanceof ArrayBuffer || J.constructor && J.constructor.name === "ArrayBuffer");
            }
            function vo(J) {
              const H = J.constructor;
              return J.$name || H._classRegistryKey;
            }
            function Ts(J) {
              return !function(H) {
                if (H === null || typeof H != "object") return !1;
                const oe = vo(H);
                return !(!oe || oe === "Object");
              }(J) && (J == null || typeof J == "boolean" || typeof J == "number" || typeof J == "string" || J instanceof Boolean || J instanceof Number || J instanceof String || J instanceof Date || J instanceof RegExp || J instanceof Blob || J instanceof Error || xa(J) || V(J) || ArrayBuffer.isView(J) || J instanceof ImageData);
            }
            function nl(J, H) {
              if (Ts(J)) {
                if ((xa(J) || V(J)) && H && H.push(J), ArrayBuffer.isView(J)) {
                  const Xe = J;
                  H && H.push(Xe.buffer);
                }
                return J instanceof ImageData && H && H.push(J.data.buffer), J;
              }
              if (Array.isArray(J)) {
                const Xe = [];
                for (const rt of J) Xe.push(nl(rt, H));
                return Xe;
              }
              if (typeof J != "object") throw new Error("can't serialize object of type " + typeof J);
              const oe = vo(J);
              if (!oe) throw new Error(`can't serialize object of unregistered class ${J.constructor.name}`);
              if (!Vs[oe]) throw new Error(`${oe} is not registered.`);
              const { klass: ve } = Vs[oe], Oe = ve.serialize ? ve.serialize(J, H) : {};
              if (ve.serialize) {
                if (H && Oe === H[H.length - 1]) throw new Error("statically serialized object won't survive transfer of $name property");
              } else {
                for (const Xe in J) {
                  if (!J.hasOwnProperty(Xe) || Vs[oe].omit.indexOf(Xe) >= 0) continue;
                  const rt = J[Xe];
                  Oe[Xe] = Vs[oe].shallow.indexOf(Xe) >= 0 ? rt : nl(rt, H);
                }
                J instanceof Error && (Oe.message = J.message);
              }
              if (Oe.$name) throw new Error("$name property is reserved for worker serialization logic.");
              return oe !== "Object" && (Oe.$name = oe), Oe;
            }
            function Vo(J) {
              if (Ts(J)) return J;
              if (Array.isArray(J)) return J.map(Vo);
              if (typeof J != "object") throw new Error("can't deserialize object of type " + typeof J);
              const H = vo(J) || "Object";
              if (!Vs[H]) throw new Error(`can't deserialize unregistered class ${H}`);
              const { klass: oe } = Vs[H];
              if (!oe) throw new Error(`can't deserialize unregistered class ${H}`);
              if (oe.deserialize) return oe.deserialize(J);
              const ve = Object.create(oe.prototype);
              for (const Oe of Object.keys(J)) {
                if (Oe === "$name") continue;
                const Xe = J[Oe];
                ve[Oe] = Vs[H].shallow.indexOf(Oe) >= 0 ? Xe : Vo(Xe);
              }
              return ve;
            }
            class Qu {
              constructor() {
                this.first = !0;
              }
              update(H, oe) {
                const ve = Math.floor(H);
                return this.first ? (this.first = !1, this.lastIntegerZoom = ve, this.lastIntegerZoomTime = 0, this.lastZoom = H, this.lastFloorZoom = ve, !0) : (this.lastFloorZoom > ve ? (this.lastIntegerZoom = ve + 1, this.lastIntegerZoomTime = oe) : this.lastFloorZoom < ve && (this.lastIntegerZoom = ve, this.lastIntegerZoomTime = oe), H !== this.lastZoom && (this.lastZoom = H, this.lastFloorZoom = ve, !0));
              }
            }
            const li = { "Latin-1 Supplement": (J) => J >= 128 && J <= 255, Arabic: (J) => J >= 1536 && J <= 1791, "Arabic Supplement": (J) => J >= 1872 && J <= 1919, "Arabic Extended-A": (J) => J >= 2208 && J <= 2303, "Hangul Jamo": (J) => J >= 4352 && J <= 4607, "Unified Canadian Aboriginal Syllabics": (J) => J >= 5120 && J <= 5759, Khmer: (J) => J >= 6016 && J <= 6143, "Unified Canadian Aboriginal Syllabics Extended": (J) => J >= 6320 && J <= 6399, "General Punctuation": (J) => J >= 8192 && J <= 8303, "Letterlike Symbols": (J) => J >= 8448 && J <= 8527, "Number Forms": (J) => J >= 8528 && J <= 8591, "Miscellaneous Technical": (J) => J >= 8960 && J <= 9215, "Control Pictures": (J) => J >= 9216 && J <= 9279, "Optical Character Recognition": (J) => J >= 9280 && J <= 9311, "Enclosed Alphanumerics": (J) => J >= 9312 && J <= 9471, "Geometric Shapes": (J) => J >= 9632 && J <= 9727, "Miscellaneous Symbols": (J) => J >= 9728 && J <= 9983, "Miscellaneous Symbols and Arrows": (J) => J >= 11008 && J <= 11263, "CJK Radicals Supplement": (J) => J >= 11904 && J <= 12031, "Kangxi Radicals": (J) => J >= 12032 && J <= 12255, "Ideographic Description Characters": (J) => J >= 12272 && J <= 12287, "CJK Symbols and Punctuation": (J) => J >= 12288 && J <= 12351, Hiragana: (J) => J >= 12352 && J <= 12447, Katakana: (J) => J >= 12448 && J <= 12543, Bopomofo: (J) => J >= 12544 && J <= 12591, "Hangul Compatibility Jamo": (J) => J >= 12592 && J <= 12687, Kanbun: (J) => J >= 12688 && J <= 12703, "Bopomofo Extended": (J) => J >= 12704 && J <= 12735, "CJK Strokes": (J) => J >= 12736 && J <= 12783, "Katakana Phonetic Extensions": (J) => J >= 12784 && J <= 12799, "Enclosed CJK Letters and Months": (J) => J >= 12800 && J <= 13055, "CJK Compatibility": (J) => J >= 13056 && J <= 13311, "CJK Unified Ideographs Extension A": (J) => J >= 13312 && J <= 19903, "Yijing Hexagram Symbols": (J) => J >= 19904 && J <= 19967, "CJK Unified Ideographs": (J) => J >= 19968 && J <= 40959, "Yi Syllables": (J) => J >= 40960 && J <= 42127, "Yi Radicals": (J) => J >= 42128 && J <= 42191, "Hangul Jamo Extended-A": (J) => J >= 43360 && J <= 43391, "Hangul Syllables": (J) => J >= 44032 && J <= 55215, "Hangul Jamo Extended-B": (J) => J >= 55216 && J <= 55295, "Private Use Area": (J) => J >= 57344 && J <= 63743, "CJK Compatibility Ideographs": (J) => J >= 63744 && J <= 64255, "Arabic Presentation Forms-A": (J) => J >= 64336 && J <= 65023, "Vertical Forms": (J) => J >= 65040 && J <= 65055, "CJK Compatibility Forms": (J) => J >= 65072 && J <= 65103, "Small Form Variants": (J) => J >= 65104 && J <= 65135, "Arabic Presentation Forms-B": (J) => J >= 65136 && J <= 65279, "Halfwidth and Fullwidth Forms": (J) => J >= 65280 && J <= 65519 };
            function ls(J) {
              for (const H of J) if ($s(H.charCodeAt(0))) return !0;
              return !1;
            }
            function ma(J) {
              for (const H of J) if (!au(H.charCodeAt(0))) return !1;
              return !0;
            }
            function au(J) {
              return !(li.Arabic(J) || li["Arabic Supplement"](J) || li["Arabic Extended-A"](J) || li["Arabic Presentation Forms-A"](J) || li["Arabic Presentation Forms-B"](J));
            }
            function $s(J) {
              return !(J !== 746 && J !== 747 && (J < 4352 || !(li["Bopomofo Extended"](J) || li.Bopomofo(J) || li["CJK Compatibility Forms"](J) && !(J >= 65097 && J <= 65103) || li["CJK Compatibility Ideographs"](J) || li["CJK Compatibility"](J) || li["CJK Radicals Supplement"](J) || li["CJK Strokes"](J) || !(!li["CJK Symbols and Punctuation"](J) || J >= 12296 && J <= 12305 || J >= 12308 && J <= 12319 || J === 12336) || li["CJK Unified Ideographs Extension A"](J) || li["CJK Unified Ideographs"](J) || li["Enclosed CJK Letters and Months"](J) || li["Hangul Compatibility Jamo"](J) || li["Hangul Jamo Extended-A"](J) || li["Hangul Jamo Extended-B"](J) || li["Hangul Jamo"](J) || li["Hangul Syllables"](J) || li.Hiragana(J) || li["Ideographic Description Characters"](J) || li.Kanbun(J) || li["Kangxi Radicals"](J) || li["Katakana Phonetic Extensions"](J) || li.Katakana(J) && J !== 12540 || !(!li["Halfwidth and Fullwidth Forms"](J) || J === 65288 || J === 65289 || J === 65293 || J >= 65306 && J <= 65310 || J === 65339 || J === 65341 || J === 65343 || J >= 65371 && J <= 65503 || J === 65507 || J >= 65512 && J <= 65519) || !(!li["Small Form Variants"](J) || J >= 65112 && J <= 65118 || J >= 65123 && J <= 65126) || li["Unified Canadian Aboriginal Syllabics"](J) || li["Unified Canadian Aboriginal Syllabics Extended"](J) || li["Vertical Forms"](J) || li["Yijing Hexagram Symbols"](J) || li["Yi Syllables"](J) || li["Yi Radicals"](J))));
            }
            function bl(J) {
              return !($s(J) || function(H) {
                return !!(li["Latin-1 Supplement"](H) && (H === 167 || H === 169 || H === 174 || H === 177 || H === 188 || H === 189 || H === 190 || H === 215 || H === 247) || li["General Punctuation"](H) && (H === 8214 || H === 8224 || H === 8225 || H === 8240 || H === 8241 || H === 8251 || H === 8252 || H === 8258 || H === 8263 || H === 8264 || H === 8265 || H === 8273) || li["Letterlike Symbols"](H) || li["Number Forms"](H) || li["Miscellaneous Technical"](H) && (H >= 8960 && H <= 8967 || H >= 8972 && H <= 8991 || H >= 8996 && H <= 9e3 || H === 9003 || H >= 9085 && H <= 9114 || H >= 9150 && H <= 9165 || H === 9167 || H >= 9169 && H <= 9179 || H >= 9186 && H <= 9215) || li["Control Pictures"](H) && H !== 9251 || li["Optical Character Recognition"](H) || li["Enclosed Alphanumerics"](H) || li["Geometric Shapes"](H) || li["Miscellaneous Symbols"](H) && !(H >= 9754 && H <= 9759) || li["Miscellaneous Symbols and Arrows"](H) && (H >= 11026 && H <= 11055 || H >= 11088 && H <= 11097 || H >= 11192 && H <= 11243) || li["CJK Symbols and Punctuation"](H) || li.Katakana(H) || li["Private Use Area"](H) || li["CJK Compatibility Forms"](H) || li["Small Form Variants"](H) || li["Halfwidth and Fullwidth Forms"](H) || H === 8734 || H === 8756 || H === 8757 || H >= 9984 && H <= 10087 || H >= 10102 && H <= 10131 || H === 65532 || H === 65533);
              }(J));
            }
            function Lc(J) {
              return li.Arabic(J) || li["Arabic Supplement"](J) || li["Arabic Extended-A"](J) || li["Arabic Presentation Forms-A"](J) || li["Arabic Presentation Forms-B"](J);
            }
            function ec(J) {
              return J >= 1424 && J <= 2303 || li["Arabic Presentation Forms-A"](J) || li["Arabic Presentation Forms-B"](J);
            }
            function rl(J, H) {
              return !(!H && ec(J) || J >= 2304 && J <= 3583 || J >= 3840 && J <= 4255 || li.Khmer(J));
            }
            function Na(J) {
              for (const H of J) if (ec(H.charCodeAt(0))) return !0;
              return !1;
            }
            const il = new class {
              constructor() {
                this.applyArabicShaping = null, this.processBidirectionalText = null, this.processStyledBidirectionalText = null, this.pluginStatus = "unavailable", this.pluginURL = null;
              }
              setState(J) {
                this.pluginStatus = J.pluginStatus, this.pluginURL = J.pluginURL;
              }
              getState() {
                return { pluginStatus: this.pluginStatus, pluginURL: this.pluginURL };
              }
              setMethods(J) {
                this.applyArabicShaping = J.applyArabicShaping, this.processBidirectionalText = J.processBidirectionalText, this.processStyledBidirectionalText = J.processStyledBidirectionalText;
              }
              isParsed() {
                return this.applyArabicShaping != null && this.processBidirectionalText != null && this.processStyledBidirectionalText != null;
              }
              getPluginURL() {
                return this.pluginURL;
              }
              getRTLTextPluginStatus() {
                return this.pluginStatus;
              }
            }();
            class ni {
              constructor(H, oe) {
                this.zoom = H, oe ? (this.now = oe.now, this.fadeDuration = oe.fadeDuration, this.zoomHistory = oe.zoomHistory, this.transition = oe.transition) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new Qu(), this.transition = {});
              }
              isSupportedScript(H) {
                return function(oe, ve) {
                  for (const Oe of oe) if (!rl(Oe.charCodeAt(0), ve)) return !1;
                  return !0;
                }(H, il.getRTLTextPluginStatus() === "loaded");
              }
              crossFadingFactor() {
                return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);
              }
              getCrossfadeParameters() {
                const H = this.zoom, oe = H - Math.floor(H), ve = this.crossFadingFactor();
                return H > this.zoomHistory.lastIntegerZoom ? { fromScale: 2, toScale: 1, t: oe + (1 - oe) * ve } : { fromScale: 0.5, toScale: 1, t: 1 - (1 - ve) * oe };
              }
            }
            class Ci {
              constructor(H, oe) {
                this.property = H, this.value = oe, this.expression = function(ve, Oe) {
                  if (Ic(ve)) return new Js(ve, Oe);
                  if (An(ve)) {
                    const Xe = va(ve, Oe);
                    if (Xe.result === "error") throw new Error(Xe.value.map((rt) => `${rt.key}: ${rt.message}`).join(", "));
                    return Xe.value;
                  }
                  {
                    let Xe = ve;
                    return Oe.type === "color" && typeof ve == "string" ? Xe = fn.parse(ve) : Oe.type !== "padding" || typeof ve != "number" && !Array.isArray(ve) ? Oe.type === "variableAnchorOffsetCollection" && Array.isArray(ve) && (Xe = Xn.parse(ve)) : Xe = gn.parse(ve), { kind: "constant", evaluate: () => Xe };
                  }
                }(oe === void 0 ? H.specification.default : oe, H.specification);
              }
              isDataDriven() {
                return this.expression.kind === "source" || this.expression.kind === "composite";
              }
              possiblyEvaluate(H, oe, ve) {
                return this.property.possiblyEvaluate(this, H, oe, ve);
              }
            }
            class us {
              constructor(H) {
                this.property = H, this.value = new Ci(H, void 0);
              }
              transitioned(H, oe) {
                return new ou(this.property, this.value, oe, L({}, H.transition, this.transition), H.now);
              }
              untransitioned() {
                return new ou(this.property, this.value, null, {}, 0);
              }
            }
            class al {
              constructor(H) {
                this._properties = H, this._values = Object.create(H.defaultTransitionablePropertyValues);
              }
              getValue(H) {
                return M(this._values[H].value.value);
              }
              setValue(H, oe) {
                Object.prototype.hasOwnProperty.call(this._values, H) || (this._values[H] = new us(this._values[H].property)), this._values[H].value = new Ci(this._values[H].property, oe === null ? void 0 : M(oe));
              }
              getTransition(H) {
                return M(this._values[H].transition);
              }
              setTransition(H, oe) {
                Object.prototype.hasOwnProperty.call(this._values, H) || (this._values[H] = new us(this._values[H].property)), this._values[H].transition = M(oe) || void 0;
              }
              serialize() {
                const H = {};
                for (const oe of Object.keys(this._values)) {
                  const ve = this.getValue(oe);
                  ve !== void 0 && (H[oe] = ve);
                  const Oe = this.getTransition(oe);
                  Oe !== void 0 && (H[`${oe}-transition`] = Oe);
                }
                return H;
              }
              transitioned(H, oe) {
                const ve = new Za(this._properties);
                for (const Oe of Object.keys(this._values)) ve._values[Oe] = this._values[Oe].transitioned(H, oe._values[Oe]);
                return ve;
              }
              untransitioned() {
                const H = new Za(this._properties);
                for (const oe of Object.keys(this._values)) H._values[oe] = this._values[oe].untransitioned();
                return H;
              }
            }
            class ou {
              constructor(H, oe, ve, Oe, Xe) {
                this.property = H, this.value = oe, this.begin = Xe + Oe.delay || 0, this.end = this.begin + Oe.duration || 0, H.specification.transition && (Oe.delay || Oe.duration) && (this.prior = ve);
              }
              possiblyEvaluate(H, oe, ve) {
                const Oe = H.now || 0, Xe = this.value.possiblyEvaluate(H, oe, ve), rt = this.prior;
                if (rt) {
                  if (Oe > this.end) return this.prior = null, Xe;
                  if (this.value.isDataDriven()) return this.prior = null, Xe;
                  if (Oe < this.begin) return rt.possiblyEvaluate(H, oe, ve);
                  {
                    const yt = (Oe - this.begin) / (this.end - this.begin);
                    return this.property.interpolate(rt.possiblyEvaluate(H, oe, ve), Xe, function(Tt) {
                      if (Tt <= 0) return 0;
                      if (Tt >= 1) return 1;
                      const Nt = Tt * Tt, Vt = Nt * Tt;
                      return 4 * (Tt < 0.5 ? Vt : 3 * (Tt - Nt) + Vt - 0.75);
                    }(yt));
                  }
                }
                return Xe;
              }
            }
            class Za {
              constructor(H) {
                this._properties = H, this._values = Object.create(H.defaultTransitioningPropertyValues);
              }
              possiblyEvaluate(H, oe, ve) {
                const Oe = new tc(this._properties);
                for (const Xe of Object.keys(this._values)) Oe._values[Xe] = this._values[Xe].possiblyEvaluate(H, oe, ve);
                return Oe;
              }
              hasTransition() {
                for (const H of Object.keys(this._values)) if (this._values[H].prior) return !0;
                return !1;
              }
            }
            class su {
              constructor(H) {
                this._properties = H, this._values = Object.create(H.defaultPropertyValues);
              }
              hasValue(H) {
                return this._values[H].value !== void 0;
              }
              getValue(H) {
                return M(this._values[H].value);
              }
              setValue(H, oe) {
                this._values[H] = new Ci(this._values[H].property, oe === null ? void 0 : M(oe));
              }
              serialize() {
                const H = {};
                for (const oe of Object.keys(this._values)) {
                  const ve = this.getValue(oe);
                  ve !== void 0 && (H[oe] = ve);
                }
                return H;
              }
              possiblyEvaluate(H, oe, ve) {
                const Oe = new tc(this._properties);
                for (const Xe of Object.keys(this._values)) Oe._values[Xe] = this._values[Xe].possiblyEvaluate(H, oe, ve);
                return Oe;
              }
            }
            class na {
              constructor(H, oe, ve) {
                this.property = H, this.value = oe, this.parameters = ve;
              }
              isConstant() {
                return this.value.kind === "constant";
              }
              constantOr(H) {
                return this.value.kind === "constant" ? this.value.value : H;
              }
              evaluate(H, oe, ve, Oe) {
                return this.property.evaluate(this.value, this.parameters, H, oe, ve, Oe);
              }
            }
            class tc {
              constructor(H) {
                this._properties = H, this._values = Object.create(H.defaultPossiblyEvaluatedValues);
              }
              get(H) {
                return this._values[H];
              }
            }
            class bi {
              constructor(H) {
                this.specification = H;
              }
              possiblyEvaluate(H, oe) {
                if (H.isDataDriven()) throw new Error("Value should not be data driven");
                return H.expression.evaluate(oe);
              }
              interpolate(H, oe, ve) {
                const Oe = this.specification.type, Xe = bn[Oe];
                return Xe ? Xe(H, oe, ve) : H;
              }
            }
            class ci {
              constructor(H, oe) {
                this.specification = H, this.overrides = oe;
              }
              possiblyEvaluate(H, oe, ve, Oe) {
                return H.expression.kind === "constant" || H.expression.kind === "camera" ? new na(this, { kind: "constant", value: H.expression.evaluate(oe, null, {}, ve, Oe) }, oe) : new na(this, H.expression, oe);
              }
              interpolate(H, oe, ve) {
                if (H.value.kind !== "constant" || oe.value.kind !== "constant") return H;
                if (H.value.value === void 0 || oe.value.value === void 0) return new na(this, { kind: "constant", value: void 0 }, H.parameters);
                const Oe = this.specification.type, Xe = bn[Oe];
                if (Xe) {
                  const rt = Xe(H.value.value, oe.value.value, ve);
                  return new na(this, { kind: "constant", value: rt }, H.parameters);
                }
                return H;
              }
              evaluate(H, oe, ve, Oe, Xe, rt) {
                return H.kind === "constant" ? H.value : H.evaluate(oe, ve, Oe, Xe, rt);
              }
            }
            class He extends ci {
              possiblyEvaluate(H, oe, ve, Oe) {
                if (H.value === void 0) return new na(this, { kind: "constant", value: void 0 }, oe);
                if (H.expression.kind === "constant") {
                  const Xe = H.expression.evaluate(oe, null, {}, ve, Oe), rt = H.property.specification.type === "resolvedImage" && typeof Xe != "string" ? Xe.name : Xe, yt = this._calculate(rt, rt, rt, oe);
                  return new na(this, { kind: "constant", value: yt }, oe);
                }
                if (H.expression.kind === "camera") {
                  const Xe = this._calculate(H.expression.evaluate({ zoom: oe.zoom - 1 }), H.expression.evaluate({ zoom: oe.zoom }), H.expression.evaluate({ zoom: oe.zoom + 1 }), oe);
                  return new na(this, { kind: "constant", value: Xe }, oe);
                }
                return new na(this, H.expression, oe);
              }
              evaluate(H, oe, ve, Oe, Xe, rt) {
                if (H.kind === "source") {
                  const yt = H.evaluate(oe, ve, Oe, Xe, rt);
                  return this._calculate(yt, yt, yt, oe);
                }
                return H.kind === "composite" ? this._calculate(H.evaluate({ zoom: Math.floor(oe.zoom) - 1 }, ve, Oe), H.evaluate({ zoom: Math.floor(oe.zoom) }, ve, Oe), H.evaluate({ zoom: Math.floor(oe.zoom) + 1 }, ve, Oe), oe) : H.value;
              }
              _calculate(H, oe, ve, Oe) {
                return Oe.zoom > Oe.zoomHistory.lastIntegerZoom ? { from: H, to: oe } : { from: ve, to: oe };
              }
              interpolate(H) {
                return H;
              }
            }
            class Pe {
              constructor(H) {
                this.specification = H;
              }
              possiblyEvaluate(H, oe, ve, Oe) {
                if (H.value !== void 0) {
                  if (H.expression.kind === "constant") {
                    const Xe = H.expression.evaluate(oe, null, {}, ve, Oe);
                    return this._calculate(Xe, Xe, Xe, oe);
                  }
                  return this._calculate(H.expression.evaluate(new ni(Math.floor(oe.zoom - 1), oe)), H.expression.evaluate(new ni(Math.floor(oe.zoom), oe)), H.expression.evaluate(new ni(Math.floor(oe.zoom + 1), oe)), oe);
                }
              }
              _calculate(H, oe, ve, Oe) {
                return Oe.zoom > Oe.zoomHistory.lastIntegerZoom ? { from: H, to: oe } : { from: ve, to: oe };
              }
              interpolate(H) {
                return H;
              }
            }
            class it {
              constructor(H) {
                this.specification = H;
              }
              possiblyEvaluate(H, oe, ve, Oe) {
                return !!H.expression.evaluate(oe, null, {}, ve, Oe);
              }
              interpolate() {
                return !1;
              }
            }
            class bt {
              constructor(H) {
                this.properties = H, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = [];
                for (const oe in H) {
                  const ve = H[oe];
                  ve.specification.overridable && this.overridableProperties.push(oe);
                  const Oe = this.defaultPropertyValues[oe] = new Ci(ve, void 0), Xe = this.defaultTransitionablePropertyValues[oe] = new us(ve);
                  this.defaultTransitioningPropertyValues[oe] = Xe.untransitioned(), this.defaultPossiblyEvaluatedValues[oe] = Oe.possiblyEvaluate({});
                }
              }
            }
            di("DataDrivenProperty", ci), di("DataConstantProperty", bi), di("CrossFadedDataDrivenProperty", He), di("CrossFadedProperty", Pe), di("ColorRampProperty", it);
            const Ue = "-transition";
            class Qe extends ye {
              constructor(H, oe) {
                if (super(), this.id = H.id, this.type = H.type, this._featureFilter = { filter: () => !0, needGeometry: !1 }, H.type !== "custom" && (this.metadata = H.metadata, this.minzoom = H.minzoom, this.maxzoom = H.maxzoom, H.type !== "background" && (this.source = H.source, this.sourceLayer = H["source-layer"], this.filter = H.filter), oe.layout && (this._unevaluatedLayout = new su(oe.layout)), oe.paint)) {
                  this._transitionablePaint = new al(oe.paint);
                  for (const ve in H.paint) this.setPaintProperty(ve, H.paint[ve], { validate: !1 });
                  for (const ve in H.layout) this.setLayoutProperty(ve, H.layout[ve], { validate: !1 });
                  this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new tc(oe.paint);
                }
              }
              getCrossfadeParameters() {
                return this._crossfadeParameters;
              }
              getLayoutProperty(H) {
                return H === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(H);
              }
              setLayoutProperty(H, oe, ve = {}) {
                if (oe != null) {
                  const Oe = `layers.${this.id}.layout.${H}`;
                  if (this._validate(iu, Oe, H, oe, ve)) return;
                }
                H !== "visibility" ? this._unevaluatedLayout.setValue(H, oe) : this.visibility = oe;
              }
              getPaintProperty(H) {
                return H.endsWith(Ue) ? this._transitionablePaint.getTransition(H.slice(0, -11)) : this._transitionablePaint.getValue(H);
              }
              setPaintProperty(H, oe, ve = {}) {
                if (oe != null) {
                  const Oe = `layers.${this.id}.paint.${H}`;
                  if (this._validate(ks, Oe, H, oe, ve)) return !1;
                }
                if (H.endsWith(Ue)) return this._transitionablePaint.setTransition(H.slice(0, -11), oe || void 0), !1;
                {
                  const Oe = this._transitionablePaint._values[H], Xe = Oe.property.specification["property-type"] === "cross-faded-data-driven", rt = Oe.value.isDataDriven(), yt = Oe.value;
                  this._transitionablePaint.setValue(H, oe), this._handleSpecialPaintPropertyUpdate(H);
                  const Tt = this._transitionablePaint._values[H].value;
                  return Tt.isDataDriven() || rt || Xe || this._handleOverridablePaintPropertyUpdate(H, yt, Tt);
                }
              }
              _handleSpecialPaintPropertyUpdate(H) {
              }
              _handleOverridablePaintPropertyUpdate(H, oe, ve) {
                return !1;
              }
              isHidden(H) {
                return !!(this.minzoom && H < this.minzoom) || !!(this.maxzoom && H >= this.maxzoom) || this.visibility === "none";
              }
              updateTransitions(H) {
                this._transitioningPaint = this._transitionablePaint.transitioned(H, this._transitioningPaint);
              }
              hasTransition() {
                return this._transitioningPaint.hasTransition();
              }
              recalculate(H, oe) {
                H.getCrossfadeParameters && (this._crossfadeParameters = H.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(H, void 0, oe)), this.paint = this._transitioningPaint.possiblyEvaluate(H, void 0, oe);
              }
              serialize() {
                const H = { 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() };
                return this.visibility && (H.layout = H.layout || {}, H.layout.visibility = this.visibility), I(H, (oe, ve) => !(oe === void 0 || ve === "layout" && !Object.keys(oe).length || ve === "paint" && !Object.keys(oe).length));
              }
              _validate(H, oe, ve, Oe, Xe = {}) {
                return (!Xe || Xe.validate !== !1) && tl(this, H.call(Us, { key: oe, layerType: this.type, objectKey: ve, value: Oe, styleSpec: pe, style: { glyphs: !0, sprite: !0 } }));
              }
              is3D() {
                return !1;
              }
              isTileClipped() {
                return !1;
              }
              hasOffscreenPass() {
                return !1;
              }
              resize() {
              }
              isStateDependent() {
                for (const H in this.paint._values) {
                  const oe = this.paint.get(H);
                  if (oe instanceof na && vl(oe.property.specification) && (oe.value.kind === "source" || oe.value.kind === "composite") && oe.value.isStateDependent) return !0;
                }
                return !1;
              }
            }
            const ht = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array };
            class Z {
              constructor(H, oe) {
                this._structArray = H, this._pos1 = oe * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;
              }
            }
            class B {
              constructor() {
                this.isTransferred = !1, this.capacity = -1, this.resize(0);
              }
              static serialize(H, oe) {
                return H._trim(), oe && (H.isTransferred = !0, oe.push(H.arrayBuffer)), { length: H.length, arrayBuffer: H.arrayBuffer };
              }
              static deserialize(H) {
                const oe = Object.create(this.prototype);
                return oe.arrayBuffer = H.arrayBuffer, oe.length = H.length, oe.capacity = H.arrayBuffer.byteLength / oe.bytesPerElement, oe._refreshViews(), oe;
              }
              _trim() {
                this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews());
              }
              clear() {
                this.length = 0;
              }
              resize(H) {
                this.reserve(H), this.length = H;
              }
              reserve(H) {
                if (H > this.capacity) {
                  this.capacity = Math.max(H, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);
                  const oe = this.uint8;
                  this._refreshViews(), oe && this.uint8.set(oe);
                }
              }
              _refreshViews() {
                throw new Error("_refreshViews() must be implemented by each concrete StructArray layout");
              }
            }
            function y(J, H = 1) {
              let oe = 0, ve = 0;
              return { members: J.map((Oe) => {
                const Xe = (Tt = Oe.type, ht[Tt].BYTES_PER_ELEMENT), rt = oe = b(oe, Math.max(H, Xe)), yt = Oe.components || 1;
                var Tt;
                return ve = Math.max(ve, Xe), oe += Xe * yt, { name: Oe.name, type: Oe.type, components: yt, offset: rt };
              }), size: b(oe, Math.max(ve, H)), alignment: H };
            }
            function b(J, H) {
              return Math.ceil(J / H) * H;
            }
            class R extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe) {
                const ve = this.length;
                return this.resize(ve + 1), this.emplace(ve, H, oe);
              }
              emplace(H, oe, ve) {
                const Oe = 2 * H;
                return this.int16[Oe + 0] = oe, this.int16[Oe + 1] = ve, H;
              }
            }
            R.prototype.bytesPerElement = 4, di("StructArrayLayout2i4", R);
            class j extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve) {
                const Oe = this.length;
                return this.resize(Oe + 1), this.emplace(Oe, H, oe, ve);
              }
              emplace(H, oe, ve, Oe) {
                const Xe = 3 * H;
                return this.int16[Xe + 0] = oe, this.int16[Xe + 1] = ve, this.int16[Xe + 2] = Oe, H;
              }
            }
            j.prototype.bytesPerElement = 6, di("StructArrayLayout3i6", j);
            class G extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe) {
                const Xe = this.length;
                return this.resize(Xe + 1), this.emplace(Xe, H, oe, ve, Oe);
              }
              emplace(H, oe, ve, Oe, Xe) {
                const rt = 4 * H;
                return this.int16[rt + 0] = oe, this.int16[rt + 1] = ve, this.int16[rt + 2] = Oe, this.int16[rt + 3] = Xe, H;
              }
            }
            G.prototype.bytesPerElement = 8, di("StructArrayLayout4i8", G);
            class ie extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt) {
                const yt = this.length;
                return this.resize(yt + 1), this.emplace(yt, H, oe, ve, Oe, Xe, rt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = 6 * H;
                return this.int16[Tt + 0] = oe, this.int16[Tt + 1] = ve, this.int16[Tt + 2] = Oe, this.int16[Tt + 3] = Xe, this.int16[Tt + 4] = rt, this.int16[Tt + 5] = yt, H;
              }
            }
            ie.prototype.bytesPerElement = 12, di("StructArrayLayout2i4i12", ie);
            class fe extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt) {
                const yt = this.length;
                return this.resize(yt + 1), this.emplace(yt, H, oe, ve, Oe, Xe, rt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = 4 * H, Nt = 8 * H;
                return this.int16[Tt + 0] = oe, this.int16[Tt + 1] = ve, this.uint8[Nt + 4] = Oe, this.uint8[Nt + 5] = Xe, this.uint8[Nt + 6] = rt, this.uint8[Nt + 7] = yt, H;
              }
            }
            fe.prototype.bytesPerElement = 8, di("StructArrayLayout2i4ub8", fe);
            class xe extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }
              emplaceBack(H, oe) {
                const ve = this.length;
                return this.resize(ve + 1), this.emplace(ve, H, oe);
              }
              emplace(H, oe, ve) {
                const Oe = 2 * H;
                return this.float32[Oe + 0] = oe, this.float32[Oe + 1] = ve, H;
              }
            }
            xe.prototype.bytesPerElement = 8, di("StructArrayLayout2f8", xe);
            class Te extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt) {
                const Kt = this.length;
                return this.resize(Kt + 1), this.emplace(Kt, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt) {
                const an = 10 * H;
                return this.uint16[an + 0] = oe, this.uint16[an + 1] = ve, this.uint16[an + 2] = Oe, this.uint16[an + 3] = Xe, this.uint16[an + 4] = rt, this.uint16[an + 5] = yt, this.uint16[an + 6] = Tt, this.uint16[an + 7] = Nt, this.uint16[an + 8] = Vt, this.uint16[an + 9] = Kt, H;
              }
            }
            Te.prototype.bytesPerElement = 20, di("StructArrayLayout10ui20", Te);
            class ze extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an) {
                const hn = this.length;
                return this.resize(hn + 1), this.emplace(hn, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn) {
                const kn = 12 * H;
                return this.int16[kn + 0] = oe, this.int16[kn + 1] = ve, this.int16[kn + 2] = Oe, this.int16[kn + 3] = Xe, this.uint16[kn + 4] = rt, this.uint16[kn + 5] = yt, this.uint16[kn + 6] = Tt, this.uint16[kn + 7] = Nt, this.int16[kn + 8] = Vt, this.int16[kn + 9] = Kt, this.int16[kn + 10] = an, this.int16[kn + 11] = hn, H;
              }
            }
            ze.prototype.bytesPerElement = 24, di("StructArrayLayout4i4ui4i24", ze);
            class Ve extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve) {
                const Oe = this.length;
                return this.resize(Oe + 1), this.emplace(Oe, H, oe, ve);
              }
              emplace(H, oe, ve, Oe) {
                const Xe = 3 * H;
                return this.float32[Xe + 0] = oe, this.float32[Xe + 1] = ve, this.float32[Xe + 2] = Oe, H;
              }
            }
            Ve.prototype.bytesPerElement = 12, di("StructArrayLayout3f12", Ve);
            class ut extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
              }
              emplaceBack(H) {
                const oe = this.length;
                return this.resize(oe + 1), this.emplace(oe, H);
              }
              emplace(H, oe) {
                const ve = 1 * H;
                return this.uint32[ve + 0] = oe, H;
              }
            }
            ut.prototype.bytesPerElement = 4, di("StructArrayLayout1ul4", ut);
            class gt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt) {
                const Vt = this.length;
                return this.resize(Vt + 1), this.emplace(Vt, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt) {
                const Kt = 10 * H, an = 5 * H;
                return this.int16[Kt + 0] = oe, this.int16[Kt + 1] = ve, this.int16[Kt + 2] = Oe, this.int16[Kt + 3] = Xe, this.int16[Kt + 4] = rt, this.int16[Kt + 5] = yt, this.uint32[an + 3] = Tt, this.uint16[Kt + 8] = Nt, this.uint16[Kt + 9] = Vt, H;
              }
            }
            gt.prototype.bytesPerElement = 20, di("StructArrayLayout6i1ul2ui20", gt);
            class wt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt) {
                const yt = this.length;
                return this.resize(yt + 1), this.emplace(yt, H, oe, ve, Oe, Xe, rt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = 6 * H;
                return this.int16[Tt + 0] = oe, this.int16[Tt + 1] = ve, this.int16[Tt + 2] = Oe, this.int16[Tt + 3] = Xe, this.int16[Tt + 4] = rt, this.int16[Tt + 5] = yt, H;
              }
            }
            wt.prototype.bytesPerElement = 12, di("StructArrayLayout2i2i2i12", wt);
            class Et extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe) {
                const rt = this.length;
                return this.resize(rt + 1), this.emplace(rt, H, oe, ve, Oe, Xe);
              }
              emplace(H, oe, ve, Oe, Xe, rt) {
                const yt = 4 * H, Tt = 8 * H;
                return this.float32[yt + 0] = oe, this.float32[yt + 1] = ve, this.float32[yt + 2] = Oe, this.int16[Tt + 6] = Xe, this.int16[Tt + 7] = rt, H;
              }
            }
            Et.prototype.bytesPerElement = 16, di("StructArrayLayout2f1f2i16", Et);
            class zt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt) {
                const yt = this.length;
                return this.resize(yt + 1), this.emplace(yt, H, oe, ve, Oe, Xe, rt);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = 16 * H, Nt = 4 * H, Vt = 8 * H;
                return this.uint8[Tt + 0] = oe, this.uint8[Tt + 1] = ve, this.float32[Nt + 1] = Oe, this.float32[Nt + 2] = Xe, this.int16[Vt + 6] = rt, this.int16[Vt + 7] = yt, H;
              }
            }
            zt.prototype.bytesPerElement = 16, di("StructArrayLayout2ub2f2i16", zt);
            class It extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve) {
                const Oe = this.length;
                return this.resize(Oe + 1), this.emplace(Oe, H, oe, ve);
              }
              emplace(H, oe, ve, Oe) {
                const Xe = 3 * H;
                return this.uint16[Xe + 0] = oe, this.uint16[Xe + 1] = ve, this.uint16[Xe + 2] = Oe, H;
              }
            }
            It.prototype.bytesPerElement = 6, di("StructArrayLayout3ui6", It);
            class jt extends B {
              _refreshViews() {
                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);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn) {
                const vr = this.length;
                return this.resize(vr + 1), this.emplace(vr, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn, vr) {
                const rr = 24 * H, dr = 12 * H, jr = 48 * H;
                return this.int16[rr + 0] = oe, this.int16[rr + 1] = ve, this.uint16[rr + 2] = Oe, this.uint16[rr + 3] = Xe, this.uint32[dr + 2] = rt, this.uint32[dr + 3] = yt, this.uint32[dr + 4] = Tt, this.uint16[rr + 10] = Nt, this.uint16[rr + 11] = Vt, this.uint16[rr + 12] = Kt, this.float32[dr + 7] = an, this.float32[dr + 8] = hn, this.uint8[jr + 36] = kn, this.uint8[jr + 37] = xn, this.uint8[jr + 38] = Fn, this.uint32[dr + 10] = qn, this.int16[rr + 22] = vr, H;
              }
            }
            jt.prototype.bytesPerElement = 48, di("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", jt);
            class Lt extends B {
              _refreshViews() {
                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);
              }
              emplaceBack(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn, vr, rr, dr, jr, oi, Ai, Ui, _i, fi, Bi, Ei) {
                const ki = this.length;
                return this.resize(ki + 1), this.emplace(ki, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn, vr, rr, dr, jr, oi, Ai, Ui, _i, fi, Bi, Ei);
              }
              emplace(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn, Fn, qn, vr, rr, dr, jr, oi, Ai, Ui, _i, fi, Bi, Ei, ki) {
                const Gr = 32 * H, Di = 16 * H;
                return this.int16[Gr + 0] = oe, this.int16[Gr + 1] = ve, this.int16[Gr + 2] = Oe, this.int16[Gr + 3] = Xe, this.int16[Gr + 4] = rt, this.int16[Gr + 5] = yt, this.int16[Gr + 6] = Tt, this.int16[Gr + 7] = Nt, this.uint16[Gr + 8] = Vt, this.uint16[Gr + 9] = Kt, this.uint16[Gr + 10] = an, this.uint16[Gr + 11] = hn, this.uint16[Gr + 12] = kn, this.uint16[Gr + 13] = xn, this.uint16[Gr + 14] = Fn, this.uint16[Gr + 15] = qn, this.uint16[Gr + 16] = vr, this.uint16[Gr + 17] = rr, this.uint16[Gr + 18] = dr, this.uint16[Gr + 19] = jr, this.uint16[Gr + 20] = oi, this.uint16[Gr + 21] = Ai, this.uint16[Gr + 22] = Ui, this.uint32[Di + 12] = _i, this.float32[Di + 13] = fi, this.float32[Di + 14] = Bi, this.uint16[Gr + 30] = Ei, this.uint16[Gr + 31] = ki, H;
              }
            }
            Lt.prototype.bytesPerElement = 64, di("StructArrayLayout8i15ui1ul2f2ui64", Lt);
            class Zt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }
              emplaceBack(H) {
                const oe = this.length;
                return this.resize(oe + 1), this.emplace(oe, H);
              }
              emplace(H, oe) {
                const ve = 1 * H;
                return this.float32[ve + 0] = oe, H;
              }
            }
            Zt.prototype.bytesPerElement = 4, di("StructArrayLayout1f4", Zt);
            class Qt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve) {
                const Oe = this.length;
                return this.resize(Oe + 1), this.emplace(Oe, H, oe, ve);
              }
              emplace(H, oe, ve, Oe) {
                const Xe = 6 * H, rt = 3 * H;
                return this.uint16[Xe + 0] = oe, this.float32[rt + 1] = ve, this.float32[rt + 2] = Oe, H;
              }
            }
            Qt.prototype.bytesPerElement = 12, di("StructArrayLayout1ui2f12", Qt);
            class Xt extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve) {
                const Oe = this.length;
                return this.resize(Oe + 1), this.emplace(Oe, H, oe, ve);
              }
              emplace(H, oe, ve, Oe) {
                const Xe = 2 * H, rt = 4 * H;
                return this.uint32[Xe + 0] = oe, this.uint16[rt + 2] = ve, this.uint16[rt + 3] = Oe, H;
              }
            }
            Xt.prototype.bytesPerElement = 8, di("StructArrayLayout1ul2ui8", Xt);
            class yn extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H, oe) {
                const ve = this.length;
                return this.resize(ve + 1), this.emplace(ve, H, oe);
              }
              emplace(H, oe, ve) {
                const Oe = 2 * H;
                return this.uint16[Oe + 0] = oe, this.uint16[Oe + 1] = ve, H;
              }
            }
            yn.prototype.bytesPerElement = 4, di("StructArrayLayout2ui4", yn);
            class Sn extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
              }
              emplaceBack(H) {
                const oe = this.length;
                return this.resize(oe + 1), this.emplace(oe, H);
              }
              emplace(H, oe) {
                const ve = 1 * H;
                return this.uint16[ve + 0] = oe, H;
              }
            }
            Sn.prototype.bytesPerElement = 2, di("StructArrayLayout1ui2", Sn);
            class Un extends B {
              _refreshViews() {
                this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
              }
              emplaceBack(H, oe, ve, Oe) {
                const Xe = this.length;
                return this.resize(Xe + 1), this.emplace(Xe, H, oe, ve, Oe);
              }
              emplace(H, oe, ve, Oe, Xe) {
                const rt = 4 * H;
                return this.float32[rt + 0] = oe, this.float32[rt + 1] = ve, this.float32[rt + 2] = Oe, this.float32[rt + 3] = Xe, H;
              }
            }
            Un.prototype.bytesPerElement = 16, di("StructArrayLayout4f16", Un);
            class Vn extends Z {
              get anchorPointX() {
                return this._structArray.int16[this._pos2 + 0];
              }
              get anchorPointY() {
                return this._structArray.int16[this._pos2 + 1];
              }
              get x1() {
                return this._structArray.int16[this._pos2 + 2];
              }
              get y1() {
                return this._structArray.int16[this._pos2 + 3];
              }
              get x2() {
                return this._structArray.int16[this._pos2 + 4];
              }
              get y2() {
                return this._structArray.int16[this._pos2 + 5];
              }
              get featureIndex() {
                return this._structArray.uint32[this._pos4 + 3];
              }
              get sourceLayerIndex() {
                return this._structArray.uint16[this._pos2 + 8];
              }
              get bucketIndex() {
                return this._structArray.uint16[this._pos2 + 9];
              }
              get anchorPoint() {
                return new d(this.anchorPointX, this.anchorPointY);
              }
            }
            Vn.prototype.size = 20;
            class Yn extends gt {
              get(H) {
                return new Vn(this, H);
              }
            }
            di("CollisionBoxArray", Yn);
            class er extends Z {
              get anchorX() {
                return this._structArray.int16[this._pos2 + 0];
              }
              get anchorY() {
                return this._structArray.int16[this._pos2 + 1];
              }
              get glyphStartIndex() {
                return this._structArray.uint16[this._pos2 + 2];
              }
              get numGlyphs() {
                return this._structArray.uint16[this._pos2 + 3];
              }
              get vertexStartIndex() {
                return this._structArray.uint32[this._pos4 + 2];
              }
              get lineStartIndex() {
                return this._structArray.uint32[this._pos4 + 3];
              }
              get lineLength() {
                return this._structArray.uint32[this._pos4 + 4];
              }
              get segment() {
                return this._structArray.uint16[this._pos2 + 10];
              }
              get lowerSize() {
                return this._structArray.uint16[this._pos2 + 11];
              }
              get upperSize() {
                return this._structArray.uint16[this._pos2 + 12];
              }
              get lineOffsetX() {
                return this._structArray.float32[this._pos4 + 7];
              }
              get lineOffsetY() {
                return this._structArray.float32[this._pos4 + 8];
              }
              get writingMode() {
                return this._structArray.uint8[this._pos1 + 36];
              }
              get placedOrientation() {
                return this._structArray.uint8[this._pos1 + 37];
              }
              set placedOrientation(H) {
                this._structArray.uint8[this._pos1 + 37] = H;
              }
              get hidden() {
                return this._structArray.uint8[this._pos1 + 38];
              }
              set hidden(H) {
                this._structArray.uint8[this._pos1 + 38] = H;
              }
              get crossTileID() {
                return this._structArray.uint32[this._pos4 + 10];
              }
              set crossTileID(H) {
                this._structArray.uint32[this._pos4 + 10] = H;
              }
              get associatedIconIndex() {
                return this._structArray.int16[this._pos2 + 22];
              }
            }
            er.prototype.size = 48;
            class kr extends jt {
              get(H) {
                return new er(this, H);
              }
            }
            di("PlacedSymbolArray", kr);
            class or extends Z {
              get anchorX() {
                return this._structArray.int16[this._pos2 + 0];
              }
              get anchorY() {
                return this._structArray.int16[this._pos2 + 1];
              }
              get rightJustifiedTextSymbolIndex() {
                return this._structArray.int16[this._pos2 + 2];
              }
              get centerJustifiedTextSymbolIndex() {
                return this._structArray.int16[this._pos2 + 3];
              }
              get leftJustifiedTextSymbolIndex() {
                return this._structArray.int16[this._pos2 + 4];
              }
              get verticalPlacedTextSymbolIndex() {
                return this._structArray.int16[this._pos2 + 5];
              }
              get placedIconSymbolIndex() {
                return this._structArray.int16[this._pos2 + 6];
              }
              get verticalPlacedIconSymbolIndex() {
                return this._structArray.int16[this._pos2 + 7];
              }
              get key() {
                return this._structArray.uint16[this._pos2 + 8];
              }
              get textBoxStartIndex() {
                return this._structArray.uint16[this._pos2 + 9];
              }
              get textBoxEndIndex() {
                return this._structArray.uint16[this._pos2 + 10];
              }
              get verticalTextBoxStartIndex() {
                return this._structArray.uint16[this._pos2 + 11];
              }
              get verticalTextBoxEndIndex() {
                return this._structArray.uint16[this._pos2 + 12];
              }
              get iconBoxStartIndex() {
                return this._structArray.uint16[this._pos2 + 13];
              }
              get iconBoxEndIndex() {
                return this._structArray.uint16[this._pos2 + 14];
              }
              get verticalIconBoxStartIndex() {
                return this._structArray.uint16[this._pos2 + 15];
              }
              get verticalIconBoxEndIndex() {
                return this._structArray.uint16[this._pos2 + 16];
              }
              get featureIndex() {
                return this._structArray.uint16[this._pos2 + 17];
              }
              get numHorizontalGlyphVertices() {
                return this._structArray.uint16[this._pos2 + 18];
              }
              get numVerticalGlyphVertices() {
                return this._structArray.uint16[this._pos2 + 19];
              }
              get numIconVertices() {
                return this._structArray.uint16[this._pos2 + 20];
              }
              get numVerticalIconVertices() {
                return this._structArray.uint16[this._pos2 + 21];
              }
              get useRuntimeCollisionCircles() {
                return this._structArray.uint16[this._pos2 + 22];
              }
              get crossTileID() {
                return this._structArray.uint32[this._pos4 + 12];
              }
              set crossTileID(H) {
                this._structArray.uint32[this._pos4 + 12] = H;
              }
              get textBoxScale() {
                return this._structArray.float32[this._pos4 + 13];
              }
              get collisionCircleDiameter() {
                return this._structArray.float32[this._pos4 + 14];
              }
              get textAnchorOffsetStartIndex() {
                return this._structArray.uint16[this._pos2 + 30];
              }
              get textAnchorOffsetEndIndex() {
                return this._structArray.uint16[this._pos2 + 31];
              }
            }
            or.prototype.size = 64;
            class Mr extends Lt {
              get(H) {
                return new or(this, H);
              }
            }
            di("SymbolInstanceArray", Mr);
            class fr extends Zt {
              getoffsetX(H) {
                return this.float32[1 * H + 0];
              }
            }
            di("GlyphOffsetArray", fr);
            class Or extends j {
              getx(H) {
                return this.int16[3 * H + 0];
              }
              gety(H) {
                return this.int16[3 * H + 1];
              }
              gettileUnitDistanceFromAnchor(H) {
                return this.int16[3 * H + 2];
              }
            }
            di("SymbolLineVertexArray", Or);
            class br extends Z {
              get textAnchor() {
                return this._structArray.uint16[this._pos2 + 0];
              }
              get textOffset0() {
                return this._structArray.float32[this._pos4 + 1];
              }
              get textOffset1() {
                return this._structArray.float32[this._pos4 + 2];
              }
            }
            br.prototype.size = 12;
            class Nr extends Qt {
              get(H) {
                return new br(this, H);
              }
            }
            di("TextAnchorOffsetArray", Nr);
            class ii extends Z {
              get featureIndex() {
                return this._structArray.uint32[this._pos4 + 0];
              }
              get sourceLayerIndex() {
                return this._structArray.uint16[this._pos2 + 2];
              }
              get bucketIndex() {
                return this._structArray.uint16[this._pos2 + 3];
              }
            }
            ii.prototype.size = 8;
            class Rr extends Xt {
              get(H) {
                return new ii(this, H);
              }
            }
            di("FeatureIndexArray", Rr);
            class ei extends R {
            }
            class pi extends R {
            }
            class qi extends R {
            }
            class Li extends ie {
            }
            class Yi extends fe {
            }
            class Gi extends xe {
            }
            class ra extends Te {
            }
            class wa extends ze {
            }
            class uo extends Ve {
            }
            class no extends ut {
            }
            class Ko extends wt {
            }
            class Ia extends zt {
            }
            class ca extends It {
            }
            class Ga extends yn {
            }
            const Oa = y([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: ba, size: Da, alignment: Ua } = Oa;
            class pa {
              constructor(H = []) {
                this.segments = H;
              }
              prepareSegment(H, oe, ve, Oe) {
                let Xe = this.segments[this.segments.length - 1];
                return H > pa.MAX_VERTEX_ARRAY_LENGTH && T(`Max vertices per segment is ${pa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${H}`), (!Xe || Xe.vertexLength + H > pa.MAX_VERTEX_ARRAY_LENGTH || Xe.sortKey !== Oe) && (Xe = { vertexOffset: oe.length, primitiveOffset: ve.length, vertexLength: 0, primitiveLength: 0 }, Oe !== void 0 && (Xe.sortKey = Oe), this.segments.push(Xe)), Xe;
              }
              get() {
                return this.segments;
              }
              destroy() {
                for (const H of this.segments) for (const oe in H.vaos) H.vaos[oe].destroy();
              }
              static simpleSegment(H, oe, ve, Oe) {
                return new pa([{ vertexOffset: H, primitiveOffset: oe, vertexLength: ve, primitiveLength: Oe, vaos: {}, sortKey: 0 }]);
              }
            }
            function lu(J, H) {
              return 256 * (J = C(Math.floor(J), 0, 255)) + C(Math.floor(H), 0, 255);
            }
            pa.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, di("SegmentVector", pa);
            const xo = y([{ 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" }]);
            var Hi = { exports: {} }, As = { exports: {} };
            (function(J) {
              J.exports = function(H, oe) {
                var ve, Oe, Xe, rt, yt, Tt, Nt, Vt;
                for (ve = 3 & H.length, Oe = H.length - ve, Xe = oe, yt = 3432918353, Tt = 461845907, Vt = 0; Vt < Oe; ) Nt = 255 & H.charCodeAt(Vt) | (255 & H.charCodeAt(++Vt)) << 8 | (255 & H.charCodeAt(++Vt)) << 16 | (255 & H.charCodeAt(++Vt)) << 24, ++Vt, Xe = 27492 + (65535 & (rt = 5 * (65535 & (Xe = (Xe ^= Nt = (65535 & (Nt = (Nt = (65535 & Nt) * yt + (((Nt >>> 16) * yt & 65535) << 16) & 4294967295) << 15 | Nt >>> 17)) * Tt + (((Nt >>> 16) * Tt & 65535) << 16) & 4294967295) << 13 | Xe >>> 19)) + ((5 * (Xe >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (rt >>> 16) & 65535) << 16);
                switch (Nt = 0, ve) {
                  case 3:
                    Nt ^= (255 & H.charCodeAt(Vt + 2)) << 16;
                  case 2:
                    Nt ^= (255 & H.charCodeAt(Vt + 1)) << 8;
                  case 1:
                    Xe ^= Nt = (65535 & (Nt = (Nt = (65535 & (Nt ^= 255 & H.charCodeAt(Vt))) * yt + (((Nt >>> 16) * yt & 65535) << 16) & 4294967295) << 15 | Nt >>> 17)) * Tt + (((Nt >>> 16) * Tt & 65535) << 16) & 4294967295;
                }
                return Xe ^= H.length, Xe = 2246822507 * (65535 & (Xe ^= Xe >>> 16)) + ((2246822507 * (Xe >>> 16) & 65535) << 16) & 4294967295, Xe = 3266489909 * (65535 & (Xe ^= Xe >>> 13)) + ((3266489909 * (Xe >>> 16) & 65535) << 16) & 4294967295, (Xe ^= Xe >>> 16) >>> 0;
              };
            })(As);
            var $o = As.exports, Nl = { exports: {} };
            (function(J) {
              J.exports = function(H, oe) {
                for (var ve, Oe = H.length, Xe = oe ^ Oe, rt = 0; Oe >= 4; ) ve = 1540483477 * (65535 & (ve = 255 & H.charCodeAt(rt) | (255 & H.charCodeAt(++rt)) << 8 | (255 & H.charCodeAt(++rt)) << 16 | (255 & H.charCodeAt(++rt)) << 24)) + ((1540483477 * (ve >>> 16) & 65535) << 16), Xe = 1540483477 * (65535 & Xe) + ((1540483477 * (Xe >>> 16) & 65535) << 16) ^ (ve = 1540483477 * (65535 & (ve ^= ve >>> 24)) + ((1540483477 * (ve >>> 16) & 65535) << 16)), Oe -= 4, ++rt;
                switch (Oe) {
                  case 3:
                    Xe ^= (255 & H.charCodeAt(rt + 2)) << 16;
                  case 2:
                    Xe ^= (255 & H.charCodeAt(rt + 1)) << 8;
                  case 1:
                    Xe = 1540483477 * (65535 & (Xe ^= 255 & H.charCodeAt(rt))) + ((1540483477 * (Xe >>> 16) & 65535) << 16);
                }
                return Xe = 1540483477 * (65535 & (Xe ^= Xe >>> 13)) + ((1540483477 * (Xe >>> 16) & 65535) << 16), (Xe ^= Xe >>> 15) >>> 0;
              };
            })(Nl);
            var io = $o, uu = Nl.exports;
            Hi.exports = io, Hi.exports.murmur3 = io, Hi.exports.murmur2 = uu;
            var Jo = h(Hi.exports);
            class gh {
              constructor() {
                this.ids = [], this.positions = [], this.indexed = !1;
              }
              add(H, oe, ve, Oe) {
                this.ids.push(a1(H)), this.positions.push(oe, ve, Oe);
              }
              getPositions(H) {
                if (!this.indexed) throw new Error("Trying to get index, but feature positions are not indexed");
                const oe = a1(H);
                let ve = 0, Oe = this.ids.length - 1;
                for (; ve < Oe; ) {
                  const rt = ve + Oe >> 1;
                  this.ids[rt] >= oe ? Oe = rt : ve = rt + 1;
                }
                const Xe = [];
                for (; this.ids[ve] === oe; ) {
                  const rt = this.positions[3 * ve], yt = this.positions[3 * ve + 1], Tt = this.positions[3 * ve + 2];
                  Xe.push({ index: rt, start: yt, end: Tt }), ve++;
                }
                return Xe;
              }
              static serialize(H, oe) {
                const ve = new Float64Array(H.ids), Oe = new Uint32Array(H.positions);
                return yf(ve, Oe, 0, ve.length - 1), oe && oe.push(ve.buffer, Oe.buffer), { ids: ve, positions: Oe };
              }
              static deserialize(H) {
                const oe = new gh();
                return oe.ids = H.ids, oe.positions = H.positions, oe.indexed = !0, oe;
              }
            }
            function a1(J) {
              const H = +J;
              return !isNaN(H) && H <= Number.MAX_SAFE_INTEGER ? H : Jo(String(J));
            }
            function yf(J, H, oe, ve) {
              for (; oe < ve; ) {
                const Oe = J[oe + ve >> 1];
                let Xe = oe - 1, rt = ve + 1;
                for (; ; ) {
                  do
                    Xe++;
                  while (J[Xe] < Oe);
                  do
                    rt--;
                  while (J[rt] > Oe);
                  if (Xe >= rt) break;
                  Ud(J, Xe, rt), Ud(H, 3 * Xe, 3 * rt), Ud(H, 3 * Xe + 1, 3 * rt + 1), Ud(H, 3 * Xe + 2, 3 * rt + 2);
                }
                rt - oe < ve - rt ? (yf(J, H, oe, rt), oe = rt + 1) : (yf(J, H, rt + 1, ve), ve = rt);
              }
            }
            function Ud(J, H, oe) {
              const ve = J[H];
              J[H] = J[oe], J[oe] = ve;
            }
            di("FeaturePositionMap", gh);
            class fc {
              constructor(H, oe) {
                this.gl = H.gl, this.location = oe;
              }
            }
            class Vd extends fc {
              constructor(H, oe) {
                super(H, oe), this.current = 0;
              }
              set(H) {
                this.current !== H && (this.current = H, this.gl.uniform1f(this.location, H));
              }
            }
            class $f extends fc {
              constructor(H, oe) {
                super(H, oe), this.current = [0, 0, 0, 0];
              }
              set(H) {
                H[0] === this.current[0] && H[1] === this.current[1] && H[2] === this.current[2] && H[3] === this.current[3] || (this.current = H, this.gl.uniform4f(this.location, H[0], H[1], H[2], H[3]));
              }
            }
            class zp extends fc {
              constructor(H, oe) {
                super(H, oe), this.current = fn.transparent;
              }
              set(H) {
                H.r === this.current.r && H.g === this.current.g && H.b === this.current.b && H.a === this.current.a || (this.current = H, this.gl.uniform4f(this.location, H.r, H.g, H.b, H.a));
              }
            }
            const Rp = new Float32Array(16);
            function yh(J) {
              return [lu(255 * J.r, 255 * J.g), lu(255 * J.b, 255 * J.a)];
            }
            class Kg {
              constructor(H, oe, ve) {
                this.value = H, this.uniformNames = oe.map((Oe) => `u_${Oe}`), this.type = ve;
              }
              setUniform(H, oe, ve) {
                H.set(ve.constantOr(this.value));
              }
              getBinding(H, oe, ve) {
                return this.type === "color" ? new zp(H, oe) : new Vd(H, oe);
              }
            }
            class ud {
              constructor(H, oe) {
                this.uniformNames = oe.map((ve) => `u_${ve}`), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1;
              }
              setConstantPatternPositions(H, oe) {
                this.pixelRatioFrom = oe.pixelRatio, this.pixelRatioTo = H.pixelRatio, this.patternFrom = oe.tlbr, this.patternTo = H.tlbr;
              }
              setUniform(H, oe, ve, Oe) {
                const Xe = Oe === "u_pattern_to" ? this.patternTo : Oe === "u_pattern_from" ? this.patternFrom : Oe === "u_pixel_ratio_to" ? this.pixelRatioTo : Oe === "u_pixel_ratio_from" ? this.pixelRatioFrom : null;
                Xe && H.set(Xe);
              }
              getBinding(H, oe, ve) {
                return ve.substr(0, 9) === "u_pattern" ? new $f(H, oe) : new Vd(H, oe);
              }
            }
            class vh {
              constructor(H, oe, ve, Oe) {
                this.expression = H, this.type = ve, this.maxValue = 0, this.paintVertexAttributes = oe.map((Xe) => ({ name: `a_${Xe}`, type: "Float32", components: ve === "color" ? 2 : 1, offset: 0 })), this.paintVertexArray = new Oe();
              }
              populatePaintArray(H, oe, ve, Oe, Xe) {
                const rt = this.paintVertexArray.length, yt = this.expression.evaluate(new ni(0), oe, {}, Oe, [], Xe);
                this.paintVertexArray.resize(H), this._setPaintValue(rt, H, yt);
              }
              updatePaintArray(H, oe, ve, Oe) {
                const Xe = this.expression.evaluate({ zoom: 0 }, ve, Oe);
                this._setPaintValue(H, oe, Xe);
              }
              _setPaintValue(H, oe, ve) {
                if (this.type === "color") {
                  const Oe = yh(ve);
                  for (let Xe = H; Xe < oe; Xe++) this.paintVertexArray.emplace(Xe, Oe[0], Oe[1]);
                } else {
                  for (let Oe = H; Oe < oe; Oe++) this.paintVertexArray.emplace(Oe, ve);
                  this.maxValue = Math.max(this.maxValue, Math.abs(ve));
                }
              }
              upload(H) {
                this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = H.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
              }
              destroy() {
                this.paintVertexBuffer && this.paintVertexBuffer.destroy();
              }
            }
            class vf {
              constructor(H, oe, ve, Oe, Xe, rt) {
                this.expression = H, this.uniformNames = oe.map((yt) => `u_${yt}_t`), this.type = ve, this.useIntegerZoom = Oe, this.zoom = Xe, this.maxValue = 0, this.paintVertexAttributes = oe.map((yt) => ({ name: `a_${yt}`, type: "Float32", components: ve === "color" ? 4 : 2, offset: 0 })), this.paintVertexArray = new rt();
              }
              populatePaintArray(H, oe, ve, Oe, Xe) {
                const rt = this.expression.evaluate(new ni(this.zoom), oe, {}, Oe, [], Xe), yt = this.expression.evaluate(new ni(this.zoom + 1), oe, {}, Oe, [], Xe), Tt = this.paintVertexArray.length;
                this.paintVertexArray.resize(H), this._setPaintValue(Tt, H, rt, yt);
              }
              updatePaintArray(H, oe, ve, Oe) {
                const Xe = this.expression.evaluate({ zoom: this.zoom }, ve, Oe), rt = this.expression.evaluate({ zoom: this.zoom + 1 }, ve, Oe);
                this._setPaintValue(H, oe, Xe, rt);
              }
              _setPaintValue(H, oe, ve, Oe) {
                if (this.type === "color") {
                  const Xe = yh(ve), rt = yh(Oe);
                  for (let yt = H; yt < oe; yt++) this.paintVertexArray.emplace(yt, Xe[0], Xe[1], rt[0], rt[1]);
                } else {
                  for (let Xe = H; Xe < oe; Xe++) this.paintVertexArray.emplace(Xe, ve, Oe);
                  this.maxValue = Math.max(this.maxValue, Math.abs(ve), Math.abs(Oe));
                }
              }
              upload(H) {
                this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = H.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
              }
              destroy() {
                this.paintVertexBuffer && this.paintVertexBuffer.destroy();
              }
              setUniform(H, oe) {
                const ve = this.useIntegerZoom ? Math.floor(oe.zoom) : oe.zoom, Oe = C(this.expression.interpolationFactor(ve, this.zoom, this.zoom + 1), 0, 1);
                H.set(Oe);
              }
              getBinding(H, oe, ve) {
                return new Vd(H, oe);
              }
            }
            class Fp {
              constructor(H, oe, ve, Oe, Xe, rt) {
                this.expression = H, this.type = oe, this.useIntegerZoom = ve, this.zoom = Oe, this.layerId = rt, this.zoomInPaintVertexArray = new Xe(), this.zoomOutPaintVertexArray = new Xe();
              }
              populatePaintArray(H, oe, ve) {
                const Oe = this.zoomInPaintVertexArray.length;
                this.zoomInPaintVertexArray.resize(H), this.zoomOutPaintVertexArray.resize(H), this._setPaintValues(Oe, H, oe.patterns && oe.patterns[this.layerId], ve);
              }
              updatePaintArray(H, oe, ve, Oe, Xe) {
                this._setPaintValues(H, oe, ve.patterns && ve.patterns[this.layerId], Xe);
              }
              _setPaintValues(H, oe, ve, Oe) {
                if (!Oe || !ve) return;
                const { min: Xe, mid: rt, max: yt } = ve, Tt = Oe[Xe], Nt = Oe[rt], Vt = Oe[yt];
                if (Tt && Nt && Vt) for (let Kt = H; Kt < oe; Kt++) this.zoomInPaintVertexArray.emplace(Kt, Nt.tl[0], Nt.tl[1], Nt.br[0], Nt.br[1], Tt.tl[0], Tt.tl[1], Tt.br[0], Tt.br[1], Nt.pixelRatio, Tt.pixelRatio), this.zoomOutPaintVertexArray.emplace(Kt, Nt.tl[0], Nt.tl[1], Nt.br[0], Nt.br[1], Vt.tl[0], Vt.tl[1], Vt.br[0], Vt.br[1], Nt.pixelRatio, Vt.pixelRatio);
              }
              upload(H) {
                this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = H.createVertexBuffer(this.zoomInPaintVertexArray, xo.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = H.createVertexBuffer(this.zoomOutPaintVertexArray, xo.members, this.expression.isStateDependent));
              }
              destroy() {
                this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();
              }
            }
            class K4 {
              constructor(H, oe, ve) {
                this.binders = {}, this._buffers = [];
                const Oe = [];
                for (const Xe in H.paint._values) {
                  if (!ve(Xe)) continue;
                  const rt = H.paint.get(Xe);
                  if (!(rt instanceof na && vl(rt.property.specification))) continue;
                  const yt = qb(Xe, H.type), Tt = rt.value, Nt = rt.property.specification.type, Vt = rt.property.useIntegerZoom, Kt = rt.property.specification["property-type"], an = Kt === "cross-faded" || Kt === "cross-faded-data-driven";
                  if (Tt.kind === "constant") this.binders[Xe] = an ? new ud(Tt.value, yt) : new Kg(Tt.value, yt, Nt), Oe.push(`/u_${Xe}`);
                  else if (Tt.kind === "source" || an) {
                    const hn = Hb(Xe, Nt, "source");
                    this.binders[Xe] = an ? new Fp(Tt, Nt, Vt, oe, hn, H.id) : new vh(Tt, yt, Nt, hn), Oe.push(`/a_${Xe}`);
                  } else {
                    const hn = Hb(Xe, Nt, "composite");
                    this.binders[Xe] = new vf(Tt, yt, Nt, Vt, oe, hn), Oe.push(`/z_${Xe}`);
                  }
                }
                this.cacheKey = Oe.sort().join("");
              }
              getMaxValue(H) {
                const oe = this.binders[H];
                return oe instanceof vh || oe instanceof vf ? oe.maxValue : 0;
              }
              populatePaintArrays(H, oe, ve, Oe, Xe) {
                for (const rt in this.binders) {
                  const yt = this.binders[rt];
                  (yt instanceof vh || yt instanceof vf || yt instanceof Fp) && yt.populatePaintArray(H, oe, ve, Oe, Xe);
                }
              }
              setConstantPatternPositions(H, oe) {
                for (const ve in this.binders) {
                  const Oe = this.binders[ve];
                  Oe instanceof ud && Oe.setConstantPatternPositions(H, oe);
                }
              }
              updatePaintArrays(H, oe, ve, Oe, Xe) {
                let rt = !1;
                for (const yt in H) {
                  const Tt = oe.getPositions(yt);
                  for (const Nt of Tt) {
                    const Vt = ve.feature(Nt.index);
                    for (const Kt in this.binders) {
                      const an = this.binders[Kt];
                      if ((an instanceof vh || an instanceof vf || an instanceof Fp) && an.expression.isStateDependent === !0) {
                        const hn = Oe.paint.get(Kt);
                        an.expression = hn.value, an.updatePaintArray(Nt.start, Nt.end, Vt, H[yt], Xe), rt = !0;
                      }
                    }
                  }
                }
                return rt;
              }
              defines() {
                const H = [];
                for (const oe in this.binders) {
                  const ve = this.binders[oe];
                  (ve instanceof Kg || ve instanceof ud) && H.push(...ve.uniformNames.map((Oe) => `#define HAS_UNIFORM_${Oe}`));
                }
                return H;
              }
              getBinderAttributes() {
                const H = [];
                for (const oe in this.binders) {
                  const ve = this.binders[oe];
                  if (ve instanceof vh || ve instanceof vf) for (let Oe = 0; Oe < ve.paintVertexAttributes.length; Oe++) H.push(ve.paintVertexAttributes[Oe].name);
                  else if (ve instanceof Fp) for (let Oe = 0; Oe < xo.members.length; Oe++) H.push(xo.members[Oe].name);
                }
                return H;
              }
              getBinderUniforms() {
                const H = [];
                for (const oe in this.binders) {
                  const ve = this.binders[oe];
                  if (ve instanceof Kg || ve instanceof ud || ve instanceof vf) for (const Oe of ve.uniformNames) H.push(Oe);
                }
                return H;
              }
              getPaintVertexBuffers() {
                return this._buffers;
              }
              getUniforms(H, oe) {
                const ve = [];
                for (const Oe in this.binders) {
                  const Xe = this.binders[Oe];
                  if (Xe instanceof Kg || Xe instanceof ud || Xe instanceof vf) {
                    for (const rt of Xe.uniformNames) if (oe[rt]) {
                      const yt = Xe.getBinding(H, oe[rt], rt);
                      ve.push({ name: rt, property: Oe, binding: yt });
                    }
                  }
                }
                return ve;
              }
              setUniforms(H, oe, ve, Oe) {
                for (const { name: Xe, property: rt, binding: yt } of oe) this.binders[rt].setUniform(yt, Oe, ve.get(rt), Xe);
              }
              updatePaintBuffers(H) {
                this._buffers = [];
                for (const oe in this.binders) {
                  const ve = this.binders[oe];
                  if (H && ve instanceof Fp) {
                    const Oe = H.fromScale === 2 ? ve.zoomInPaintVertexBuffer : ve.zoomOutPaintVertexBuffer;
                    Oe && this._buffers.push(Oe);
                  } else (ve instanceof vh || ve instanceof vf) && ve.paintVertexBuffer && this._buffers.push(ve.paintVertexBuffer);
                }
              }
              upload(H) {
                for (const oe in this.binders) {
                  const ve = this.binders[oe];
                  (ve instanceof vh || ve instanceof vf || ve instanceof Fp) && ve.upload(H);
                }
                this.updatePaintBuffers();
              }
              destroy() {
                for (const H in this.binders) {
                  const oe = this.binders[H];
                  (oe instanceof vh || oe instanceof vf || oe instanceof Fp) && oe.destroy();
                }
              }
            }
            class _u {
              constructor(H, oe, ve = () => !0) {
                this.programConfigurations = {};
                for (const Oe of H) this.programConfigurations[Oe.id] = new K4(Oe, oe, ve);
                this.needsUpload = !1, this._featureMap = new gh(), this._bufferOffset = 0;
              }
              populatePaintArrays(H, oe, ve, Oe, Xe, rt) {
                for (const yt in this.programConfigurations) this.programConfigurations[yt].populatePaintArrays(H, oe, Oe, Xe, rt);
                oe.id !== void 0 && this._featureMap.add(oe.id, ve, this._bufferOffset, H), this._bufferOffset = H, this.needsUpload = !0;
              }
              updatePaintArrays(H, oe, ve, Oe) {
                for (const Xe of ve) this.needsUpload = this.programConfigurations[Xe.id].updatePaintArrays(H, this._featureMap, oe, Xe, Oe) || this.needsUpload;
              }
              get(H) {
                return this.programConfigurations[H];
              }
              upload(H) {
                if (this.needsUpload) {
                  for (const oe in this.programConfigurations) this.programConfigurations[oe].upload(H);
                  this.needsUpload = !1;
                }
              }
              destroy() {
                for (const H in this.programConfigurations) this.programConfigurations[H].destroy();
              }
            }
            function qb(J, H) {
              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"] }[J] || [J.replace(`${H}-`, "").replace(/-/g, "_")];
            }
            function Hb(J, H, oe) {
              const ve = { color: { source: xe, composite: Un }, number: { source: Zt, composite: xe } }, Oe = function(Xe) {
                return { "line-pattern": { source: ra, composite: ra }, "fill-pattern": { source: ra, composite: ra }, "fill-extrusion-pattern": { source: ra, composite: ra } }[Xe];
              }(J);
              return Oe && Oe[oe] || ve[H][oe];
            }
            di("ConstantBinder", Kg), di("CrossFadedConstantBinder", ud), di("SourceExpressionBinder", vh), di("CrossFadedCompositeBinder", Fp), di("CompositeExpressionBinder", vf), di("ProgramConfiguration", K4, { omit: ["_buffers"] }), di("ProgramConfigurationSet", _u);
            const Bl = 8192, o1 = Math.pow(2, 14) - 1, J4 = -o1 - 1;
            function cd(J) {
              const H = Bl / J.extent, oe = J.loadGeometry();
              for (let ve = 0; ve < oe.length; ve++) {
                const Oe = oe[ve];
                for (let Xe = 0; Xe < Oe.length; Xe++) {
                  const rt = Oe[Xe], yt = Math.round(rt.x * H), Tt = Math.round(rt.y * H);
                  rt.x = C(yt, J4, o1), rt.y = C(Tt, J4, o1), (yt < rt.x || yt > rt.x + 1 || Tt < rt.y || Tt > rt.y + 1) && T("Geometry exceeds allowed extent, reduce your vector tile buffer size");
                }
              }
              return oe;
            }
            function J0(J, H) {
              return { type: J.type, id: J.id, properties: J.properties, geometry: H ? cd(J) : [] };
            }
            function a2(J, H, oe, ve, Oe) {
              J.emplaceBack(2 * H + (ve + 1) / 2, 2 * oe + (Oe + 1) / 2);
            }
            class o2 {
              constructor(H) {
                this.zoom = H.zoom, this.overscaling = H.overscaling, this.layers = H.layers, this.layerIds = this.layers.map((oe) => oe.id), this.index = H.index, this.hasPattern = !1, this.layoutVertexArray = new pi(), this.indexArray = new ca(), this.segments = new pa(), this.programConfigurations = new _u(H.layers, H.zoom), this.stateDependentLayerIds = this.layers.filter((oe) => oe.isStateDependent()).map((oe) => oe.id);
              }
              populate(H, oe, ve) {
                const Oe = this.layers[0], Xe = [];
                let rt = null, yt = !1;
                Oe.type === "circle" && (rt = Oe.layout.get("circle-sort-key"), yt = !rt.isConstant());
                for (const { feature: Tt, id: Nt, index: Vt, sourceLayerIndex: Kt } of H) {
                  const an = this.layers[0]._featureFilter.needGeometry, hn = J0(Tt, an);
                  if (!this.layers[0]._featureFilter.filter(new ni(this.zoom), hn, ve)) continue;
                  const kn = yt ? rt.evaluate(hn, {}, ve) : void 0, xn = { id: Nt, properties: Tt.properties, type: Tt.type, sourceLayerIndex: Kt, index: Vt, geometry: an ? hn.geometry : cd(Tt), patterns: {}, sortKey: kn };
                  Xe.push(xn);
                }
                yt && Xe.sort((Tt, Nt) => Tt.sortKey - Nt.sortKey);
                for (const Tt of Xe) {
                  const { geometry: Nt, index: Vt, sourceLayerIndex: Kt } = Tt, an = H[Vt].feature;
                  this.addFeature(Tt, Nt, Vt, ve), oe.featureIndex.insert(an, Nt, Vt, Kt, this.index);
                }
              }
              update(H, oe, ve) {
                this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(H, oe, this.stateDependentLayers, ve);
              }
              isEmpty() {
                return this.layoutVertexArray.length === 0;
              }
              uploadPending() {
                return !this.uploaded || this.programConfigurations.needsUpload;
              }
              upload(H) {
                this.uploaded || (this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, ba), this.indexBuffer = H.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(H), this.uploaded = !0;
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
              }
              addFeature(H, oe, ve, Oe) {
                for (const Xe of oe) for (const rt of Xe) {
                  const yt = rt.x, Tt = rt.y;
                  if (yt < 0 || yt >= Bl || Tt < 0 || Tt >= Bl) continue;
                  const Nt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray, H.sortKey), Vt = Nt.vertexLength;
                  a2(this.layoutVertexArray, yt, Tt, -1, -1), a2(this.layoutVertexArray, yt, Tt, 1, -1), a2(this.layoutVertexArray, yt, Tt, 1, 1), a2(this.layoutVertexArray, yt, Tt, -1, 1), this.indexArray.emplaceBack(Vt, Vt + 1, Vt + 2), this.indexArray.emplaceBack(Vt, Vt + 3, Vt + 2), Nt.vertexLength += 4, Nt.primitiveLength += 2;
                }
                this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, H, ve, {}, Oe);
              }
            }
            function Gb(J, H) {
              for (let oe = 0; oe < J.length; oe++) if (s1(H, J[oe])) return !0;
              for (let oe = 0; oe < H.length; oe++) if (s1(J, H[oe])) return !0;
              return !!$d(J, H);
            }
            function Wb(J, H, oe) {
              return !!s1(J, H) || !!Xb(H, J, oe);
            }
            function Yb(J, H) {
              if (J.length === 1) return Q4(H, J[0]);
              for (let oe = 0; oe < H.length; oe++) {
                const ve = H[oe];
                for (let Oe = 0; Oe < ve.length; Oe++) if (s1(J, ve[Oe])) return !0;
              }
              for (let oe = 0; oe < J.length; oe++) if (Q4(H, J[oe])) return !0;
              for (let oe = 0; oe < H.length; oe++) if ($d(J, H[oe])) return !0;
              return !1;
            }
            function Zb(J, H, oe) {
              if (J.length > 1) {
                if ($d(J, H)) return !0;
                for (let ve = 0; ve < H.length; ve++) if (Xb(H[ve], J, oe)) return !0;
              }
              for (let ve = 0; ve < J.length; ve++) if (Xb(J[ve], H, oe)) return !0;
              return !1;
            }
            function $d(J, H) {
              if (J.length === 0 || H.length === 0) return !1;
              for (let oe = 0; oe < J.length - 1; oe++) {
                const ve = J[oe], Oe = J[oe + 1];
                for (let Xe = 0; Xe < H.length - 1; Xe++) if (Pc(ve, Oe, H[Xe], H[Xe + 1])) return !0;
              }
              return !1;
            }
            function Pc(J, H, oe, ve) {
              return z(J, oe, ve) !== z(H, oe, ve) && z(J, H, oe) !== z(J, H, ve);
            }
            function Xb(J, H, oe) {
              const ve = oe * oe;
              if (H.length === 1) return J.distSqr(H[0]) < ve;
              for (let Oe = 1; Oe < H.length; Oe++) if (Kb(J, H[Oe - 1], H[Oe]) < ve) return !0;
              return !1;
            }
            function Kb(J, H, oe) {
              const ve = H.distSqr(oe);
              if (ve === 0) return J.distSqr(H);
              const Oe = ((J.x - H.x) * (oe.x - H.x) + (J.y - H.y) * (oe.y - H.y)) / ve;
              return Oe < 0 ? J.distSqr(H) : Oe > 1 ? J.distSqr(oe) : J.distSqr(oe.sub(H)._mult(Oe)._add(H));
            }
            function Q4(J, H) {
              let oe, ve, Oe, Xe = !1;
              for (let rt = 0; rt < J.length; rt++) {
                oe = J[rt];
                for (let yt = 0, Tt = oe.length - 1; yt < oe.length; Tt = yt++) ve = oe[yt], Oe = oe[Tt], ve.y > H.y != Oe.y > H.y && H.x < (Oe.x - ve.x) * (H.y - ve.y) / (Oe.y - ve.y) + ve.x && (Xe = !Xe);
              }
              return Xe;
            }
            function s1(J, H) {
              let oe = !1;
              for (let ve = 0, Oe = J.length - 1; ve < J.length; Oe = ve++) {
                const Xe = J[ve], rt = J[Oe];
                Xe.y > H.y != rt.y > H.y && H.x < (rt.x - Xe.x) * (H.y - Xe.y) / (rt.y - Xe.y) + Xe.x && (oe = !oe);
              }
              return oe;
            }
            function mA(J, H, oe) {
              const ve = oe[0], Oe = oe[2];
              if (J.x < ve.x && H.x < ve.x || J.x > Oe.x && H.x > Oe.x || J.y < ve.y && H.y < ve.y || J.y > Oe.y && H.y > Oe.y) return !1;
              const Xe = z(J, H, oe[0]);
              return Xe !== z(J, H, oe[1]) || Xe !== z(J, H, oe[2]) || Xe !== z(J, H, oe[3]);
            }
            function Jg(J, H, oe) {
              const ve = H.paint.get(J).value;
              return ve.kind === "constant" ? ve.value : oe.programConfigurations.get(H.id).getMaxValue(J);
            }
            function l1(J) {
              return Math.sqrt(J[0] * J[0] + J[1] * J[1]);
            }
            function s2(J, H, oe, ve, Oe) {
              if (!H[0] && !H[1]) return J;
              const Xe = d.convert(H)._mult(Oe);
              oe === "viewport" && Xe._rotate(-ve);
              const rt = [];
              for (let yt = 0; yt < J.length; yt++) {
                const Tt = J[yt];
                rt.push(Tt.sub(Xe));
              }
              return rt;
            }
            let Qg;
            di("CircleBucket", o2, { omit: ["layers"] });
            let Jb;
            var Np = { get paint() {
              return Jb = Jb || new bt({ "circle-radius": new ci(pe.paint_circle["circle-radius"]), "circle-color": new ci(pe.paint_circle["circle-color"]), "circle-blur": new ci(pe.paint_circle["circle-blur"]), "circle-opacity": new ci(pe.paint_circle["circle-opacity"]), "circle-translate": new bi(pe.paint_circle["circle-translate"]), "circle-translate-anchor": new bi(pe.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new bi(pe.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new bi(pe.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new ci(pe.paint_circle["circle-stroke-width"]), "circle-stroke-color": new ci(pe.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new ci(pe.paint_circle["circle-stroke-opacity"]) });
            }, get layout() {
              return Qg = Qg || new bt({ "circle-sort-key": new ci(pe.layout_circle["circle-sort-key"]) });
            } }, wu = 1e-6, u1 = typeof Float32Array < "u" ? Float32Array : Array;
            function Qb(J) {
              return J[0] = 1, J[1] = 0, J[2] = 0, J[3] = 0, J[4] = 0, J[5] = 1, J[6] = 0, J[7] = 0, J[8] = 0, J[9] = 0, J[10] = 1, J[11] = 0, J[12] = 0, J[13] = 0, J[14] = 0, J[15] = 1, J;
            }
            function e5(J, H, oe) {
              var ve = H[0], Oe = H[1], Xe = H[2], rt = H[3], yt = H[4], Tt = H[5], Nt = H[6], Vt = H[7], Kt = H[8], an = H[9], hn = H[10], kn = H[11], xn = H[12], Fn = H[13], qn = H[14], vr = H[15], rr = oe[0], dr = oe[1], jr = oe[2], oi = oe[3];
              return J[0] = rr * ve + dr * yt + jr * Kt + oi * xn, J[1] = rr * Oe + dr * Tt + jr * an + oi * Fn, J[2] = rr * Xe + dr * Nt + jr * hn + oi * qn, J[3] = rr * rt + dr * Vt + jr * kn + oi * vr, rr = oe[4], dr = oe[5], jr = oe[6], oi = oe[7], J[4] = rr * ve + dr * yt + jr * Kt + oi * xn, J[5] = rr * Oe + dr * Tt + jr * an + oi * Fn, J[6] = rr * Xe + dr * Nt + jr * hn + oi * qn, J[7] = rr * rt + dr * Vt + jr * kn + oi * vr, rr = oe[8], dr = oe[9], jr = oe[10], oi = oe[11], J[8] = rr * ve + dr * yt + jr * Kt + oi * xn, J[9] = rr * Oe + dr * Tt + jr * an + oi * Fn, J[10] = rr * Xe + dr * Nt + jr * hn + oi * qn, J[11] = rr * rt + dr * Vt + jr * kn + oi * vr, rr = oe[12], dr = oe[13], jr = oe[14], oi = oe[15], J[12] = rr * ve + dr * yt + jr * Kt + oi * xn, J[13] = rr * Oe + dr * Tt + jr * an + oi * Fn, J[14] = rr * Xe + dr * Nt + jr * hn + oi * qn, J[15] = rr * rt + dr * Vt + jr * kn + oi * vr, J;
            }
            Math.hypot || (Math.hypot = function() {
              for (var J = 0, H = arguments.length; H--; ) J += arguments[H] * arguments[H];
              return Math.sqrt(J);
            });
            var gA = function(J, H, oe, ve, Oe) {
              var Xe, rt = 1 / Math.tan(H / 2);
              return J[0] = rt / oe, J[1] = 0, J[2] = 0, J[3] = 0, J[4] = 0, J[5] = rt, J[6] = 0, J[7] = 0, J[8] = 0, J[9] = 0, J[11] = -1, J[12] = 0, J[13] = 0, J[15] = 0, Oe != null && Oe !== 1 / 0 ? (Xe = 1 / (ve - Oe), J[10] = (Oe + ve) * Xe, J[14] = 2 * Oe * ve * Xe) : (J[10] = -1, J[14] = -2 * ve), J;
            }, yA = function(J, H, oe, ve, Oe, Xe, rt) {
              var yt = 1 / (H - oe), Tt = 1 / (ve - Oe), Nt = 1 / (Xe - rt);
              return J[0] = -2 * yt, J[1] = 0, J[2] = 0, J[3] = 0, J[4] = 0, J[5] = -2 * Tt, J[6] = 0, J[7] = 0, J[8] = 0, J[9] = 0, J[10] = 2 * Nt, J[11] = 0, J[12] = (H + oe) * yt, J[13] = (Oe + ve) * Tt, J[14] = (rt + Xe) * Nt, J[15] = 1, J;
            }, vA = e5;
            function l2(J, H, oe) {
              var ve = H[0], Oe = H[1], Xe = H[2], rt = H[3];
              return J[0] = oe[0] * ve + oe[4] * Oe + oe[8] * Xe + oe[12] * rt, J[1] = oe[1] * ve + oe[5] * Oe + oe[9] * Xe + oe[13] * rt, J[2] = oe[2] * ve + oe[6] * Oe + oe[10] * Xe + oe[14] * rt, J[3] = oe[3] * ve + oe[7] * Oe + oe[11] * Xe + oe[15] * rt, J;
            }
            var Q0, xA = function(J, H, oe) {
              return J[0] = H[0] * oe[0], J[1] = H[1] * oe[1], J[2] = H[2] * oe[2], J[3] = H[3] * oe[3], J;
            };
            Q0 = new u1(4), u1 != Float32Array && (Q0[0] = 0, Q0[1] = 0, Q0[2] = 0, Q0[3] = 0);
            class c1 extends Qe {
              constructor(H) {
                super(H, Np);
              }
              createBucket(H) {
                return new o2(H);
              }
              queryRadius(H) {
                const oe = H;
                return Jg("circle-radius", this, oe) + Jg("circle-stroke-width", this, oe) + l1(this.paint.get("circle-translate"));
              }
              queryIntersectsFeature(H, oe, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = s2(H, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), rt.angle, yt), Vt = this.paint.get("circle-radius").evaluate(oe, ve) + this.paint.get("circle-stroke-width").evaluate(oe, ve), Kt = this.paint.get("circle-pitch-alignment") === "map", an = Kt ? Nt : function(kn, xn) {
                  return kn.map((Fn) => t5(Fn, xn));
                }(Nt, Tt), hn = Kt ? Vt * yt : Vt;
                for (const kn of Oe) for (const xn of kn) {
                  const Fn = Kt ? xn : t5(xn, Tt);
                  let qn = hn;
                  const vr = l2([], [xn.x, xn.y, 0, 1], Tt);
                  if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? qn *= vr[3] / rt.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (qn *= rt.cameraToCenterDistance / vr[3]), Wb(an, Fn, qn)) return !0;
                }
                return !1;
              }
            }
            function t5(J, H) {
              const oe = l2([], [J.x, J.y, 0, 1], H);
              return new d(oe[0] / oe[3], oe[1] / oe[3]);
            }
            class ol extends o2 {
            }
            let ey;
            di("HeatmapBucket", ol, { omit: ["layers"] });
            var n5 = { get paint() {
              return ey = ey || new bt({ "heatmap-radius": new ci(pe.paint_heatmap["heatmap-radius"]), "heatmap-weight": new ci(pe.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new bi(pe.paint_heatmap["heatmap-intensity"]), "heatmap-color": new it(pe.paint_heatmap["heatmap-color"]), "heatmap-opacity": new bi(pe.paint_heatmap["heatmap-opacity"]) });
            } };
            function f1(J, { width: H, height: oe }, ve, Oe) {
              if (Oe) {
                if (Oe instanceof Uint8ClampedArray) Oe = new Uint8Array(Oe.buffer);
                else if (Oe.length !== H * oe * ve) throw new RangeError(`mismatched image size. expected: ${Oe.length} but got: ${H * oe * ve}`);
              } else Oe = new Uint8Array(H * oe * ve);
              return J.width = H, J.height = oe, J.data = Oe, J;
            }
            function ty(J, { width: H, height: oe }, ve) {
              if (H === J.width && oe === J.height) return;
              const Oe = f1({}, { width: H, height: oe }, ve);
              em(J, Oe, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(J.width, H), height: Math.min(J.height, oe) }, ve), J.width = H, J.height = oe, J.data = Oe.data;
            }
            function em(J, H, oe, ve, Oe, Xe) {
              if (Oe.width === 0 || Oe.height === 0) return H;
              if (Oe.width > J.width || Oe.height > J.height || oe.x > J.width - Oe.width || oe.y > J.height - Oe.height) throw new RangeError("out of range source coordinates for image copy");
              if (Oe.width > H.width || Oe.height > H.height || ve.x > H.width - Oe.width || ve.y > H.height - Oe.height) throw new RangeError("out of range destination coordinates for image copy");
              const rt = J.data, yt = H.data;
              if (rt === yt) throw new Error("srcData equals dstData, so image is already copied");
              for (let Tt = 0; Tt < Oe.height; Tt++) {
                const Nt = ((oe.y + Tt) * J.width + oe.x) * Xe, Vt = ((ve.y + Tt) * H.width + ve.x) * Xe;
                for (let Kt = 0; Kt < Oe.width * Xe; Kt++) yt[Vt + Kt] = rt[Nt + Kt];
              }
              return H;
            }
            class h1 {
              constructor(H, oe) {
                f1(this, H, 1, oe);
              }
              resize(H) {
                ty(this, H, 1);
              }
              clone() {
                return new h1({ width: this.width, height: this.height }, new Uint8Array(this.data));
              }
              static copy(H, oe, ve, Oe, Xe) {
                em(H, oe, ve, Oe, Xe, 1);
              }
            }
            class xf {
              constructor(H, oe) {
                f1(this, H, 4, oe);
              }
              resize(H) {
                ty(this, H, 4);
              }
              replace(H, oe) {
                oe ? this.data.set(H) : H instanceof Uint8ClampedArray ? this.data = new Uint8Array(H.buffer) : this.data = H;
              }
              clone() {
                return new xf({ width: this.width, height: this.height }, new Uint8Array(this.data));
              }
              static copy(H, oe, ve, Oe, Xe) {
                em(H, oe, ve, Oe, Xe, 4);
              }
            }
            function d1(J) {
              const H = {}, oe = J.resolution || 256, ve = J.clips ? J.clips.length : 1, Oe = J.image || new xf({ width: oe, height: ve });
              if (Xe = oe, Math.log(Xe) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${oe}`);
              var Xe;
              const rt = (yt, Tt, Nt) => {
                H[J.evaluationKey] = Nt;
                const Vt = J.expression.evaluate(H);
                Oe.data[yt + Tt + 0] = Math.floor(255 * Vt.r / Vt.a), Oe.data[yt + Tt + 1] = Math.floor(255 * Vt.g / Vt.a), Oe.data[yt + Tt + 2] = Math.floor(255 * Vt.b / Vt.a), Oe.data[yt + Tt + 3] = Math.floor(255 * Vt.a);
              };
              if (J.clips) for (let yt = 0, Tt = 0; yt < ve; ++yt, Tt += 4 * oe) for (let Nt = 0, Vt = 0; Nt < oe; Nt++, Vt += 4) {
                const Kt = Nt / (oe - 1), { start: an, end: hn } = J.clips[yt];
                rt(Tt, Vt, an * (1 - Kt) + hn * Kt);
              }
              else for (let yt = 0, Tt = 0; yt < oe; yt++, Tt += 4) rt(0, Tt, yt / (oe - 1));
              return Oe;
            }
            di("AlphaImage", h1), di("RGBAImage", xf);
            class e_ extends Qe {
              createBucket(H) {
                return new ol(H);
              }
              constructor(H) {
                super(H, n5), this._updateColorRamp();
              }
              _handleSpecialPaintPropertyUpdate(H) {
                H === "heatmap-color" && this._updateColorRamp();
              }
              _updateColorRamp() {
                const H = this._transitionablePaint._values["heatmap-color"].value.expression;
                this.colorRamp = d1({ expression: H, evaluationKey: "heatmapDensity", image: this.colorRamp }), this.colorRampTexture = null;
              }
              resize() {
                this.heatmapFbo && (this.heatmapFbo.destroy(), this.heatmapFbo = null);
              }
              queryRadius() {
                return 0;
              }
              queryIntersectsFeature() {
                return !1;
              }
              hasOffscreenPass() {
                return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
              }
            }
            let u2;
            var bA = { get paint() {
              return u2 = u2 || new bt({ "hillshade-illumination-direction": new bi(pe.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-anchor": new bi(pe.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new bi(pe.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new bi(pe.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new bi(pe.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new bi(pe.paint_hillshade["hillshade-accent-color"]) });
            } };
            class r5 extends Qe {
              constructor(H) {
                super(H, bA);
              }
              hasOffscreenPass() {
                return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none";
              }
            }
            const ny = y([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: _A, size: i5, alignment: QR } = ny;
            function c2(J, H, oe = 2) {
              const ve = H && H.length, Oe = ve ? H[0] * oe : J.length;
              let Xe = f2(J, 0, Oe, oe, !0);
              const rt = [];
              if (!Xe || Xe.next === Xe.prev) return rt;
              let yt, Tt, Nt;
              if (ve && (Xe = function(Vt, Kt, an, hn) {
                const kn = [];
                for (let xn = 0, Fn = Kt.length; xn < Fn; xn++) {
                  const qn = f2(Vt, Kt[xn] * hn, xn < Fn - 1 ? Kt[xn + 1] * hn : Vt.length, hn, !1);
                  qn === qn.next && (qn.steiner = !0), kn.push(o5(qn));
                }
                kn.sort(p1);
                for (let xn = 0; xn < kn.length; xn++) an = AA(kn[xn], an);
                return an;
              }(J, H, Xe, oe)), J.length > 80 * oe) {
                yt = 1 / 0, Tt = 1 / 0;
                let Vt = -1 / 0, Kt = -1 / 0;
                for (let an = oe; an < Oe; an += oe) {
                  const hn = J[an], kn = J[an + 1];
                  hn < yt && (yt = hn), kn < Tt && (Tt = kn), hn > Vt && (Vt = hn), kn > Kt && (Kt = kn);
                }
                Nt = Math.max(Vt - yt, Kt - Tt), Nt = Nt !== 0 ? 32767 / Nt : 0;
              }
              return ry(Xe, rt, oe, yt, Tt, Nt, 0), rt;
            }
            function f2(J, H, oe, ve, Oe) {
              let Xe;
              if (Oe === function(rt, yt, Tt, Nt) {
                let Vt = 0;
                for (let Kt = yt, an = Tt - Nt; Kt < Tt; Kt += Nt) Vt += (rt[an] - rt[Kt]) * (rt[Kt + 1] + rt[an + 1]), an = Kt;
                return Vt;
              }(J, H, oe, ve) > 0) for (let rt = H; rt < oe; rt += ve) Xe = l5(rt / ve | 0, J[rt], J[rt + 1], Xe);
              else for (let rt = oe - ve; rt >= H; rt -= ve) Xe = l5(rt / ve | 0, J[rt], J[rt + 1], Xe);
              return Xe && d2(Xe, Xe.next) && (qd(Xe), Xe = Xe.next), Xe;
            }
            function hc(J, H) {
              if (!J) return J;
              H || (H = J);
              let oe, ve = J;
              do
                if (oe = !1, ve.steiner || !d2(ve, ve.next) && cs(ve.prev, ve, ve.next) !== 0) ve = ve.next;
                else {
                  if (qd(ve), ve = H = ve.prev, ve === ve.next) break;
                  oe = !0;
                }
              while (oe || ve !== H);
              return H;
            }
            function ry(J, H, oe, ve, Oe, Xe, rt) {
              if (!J) return;
              !rt && Xe && function(Tt, Nt, Vt, Kt) {
                let an = Tt;
                do
                  an.z === 0 && (an.z = h2(an.x, an.y, Nt, Vt, Kt)), an.prevZ = an.prev, an.nextZ = an.next, an = an.next;
                while (an !== Tt);
                an.prevZ.nextZ = null, an.prevZ = null, function(hn) {
                  let kn, xn = 1;
                  do {
                    let Fn, qn = hn;
                    hn = null;
                    let vr = null;
                    for (kn = 0; qn; ) {
                      kn++;
                      let rr = qn, dr = 0;
                      for (let oi = 0; oi < xn && (dr++, rr = rr.nextZ, rr); oi++) ;
                      let jr = xn;
                      for (; dr > 0 || jr > 0 && rr; ) dr !== 0 && (jr === 0 || !rr || qn.z <= rr.z) ? (Fn = qn, qn = qn.nextZ, dr--) : (Fn = rr, rr = rr.nextZ, jr--), vr ? vr.nextZ = Fn : hn = Fn, Fn.prevZ = vr, vr = Fn;
                      qn = rr;
                    }
                    vr.nextZ = null, xn *= 2;
                  } while (kn > 1);
                }(an);
              }(J, ve, Oe, Xe);
              let yt = J;
              for (; J.prev !== J.next; ) {
                const Tt = J.prev, Nt = J.next;
                if (Xe ? kA(J, ve, Oe, Xe) : wA(J)) H.push(Tt.i, J.i, Nt.i), qd(J), J = Nt.next, yt = Nt.next;
                else if ((J = Nt) === yt) {
                  rt ? rt === 1 ? ry(J = TA(hc(J), H), H, oe, ve, Oe, Xe, 2) : rt === 2 && a5(J, H, oe, ve, Oe, Xe) : ry(hc(J), H, oe, ve, Oe, Xe, 1);
                  break;
                }
              }
            }
            function wA(J) {
              const H = J.prev, oe = J, ve = J.next;
              if (cs(H, oe, ve) >= 0) return !1;
              const Oe = H.x, Xe = oe.x, rt = ve.x, yt = H.y, Tt = oe.y, Nt = ve.y, Vt = Oe < Xe ? Oe < rt ? Oe : rt : Xe < rt ? Xe : rt, Kt = yt < Tt ? yt < Nt ? yt : Nt : Tt < Nt ? Tt : Nt, an = Oe > Xe ? Oe > rt ? Oe : rt : Xe > rt ? Xe : rt, hn = yt > Tt ? yt > Nt ? yt : Nt : Tt > Nt ? Tt : Nt;
              let kn = ve.next;
              for (; kn !== H; ) {
                if (kn.x >= Vt && kn.x <= an && kn.y >= Kt && kn.y <= hn && m1(Oe, yt, Xe, Tt, rt, Nt, kn.x, kn.y) && cs(kn.prev, kn, kn.next) >= 0) return !1;
                kn = kn.next;
              }
              return !0;
            }
            function kA(J, H, oe, ve) {
              const Oe = J.prev, Xe = J, rt = J.next;
              if (cs(Oe, Xe, rt) >= 0) return !1;
              const yt = Oe.x, Tt = Xe.x, Nt = rt.x, Vt = Oe.y, Kt = Xe.y, an = rt.y, hn = yt < Tt ? yt < Nt ? yt : Nt : Tt < Nt ? Tt : Nt, kn = Vt < Kt ? Vt < an ? Vt : an : Kt < an ? Kt : an, xn = yt > Tt ? yt > Nt ? yt : Nt : Tt > Nt ? Tt : Nt, Fn = Vt > Kt ? Vt > an ? Vt : an : Kt > an ? Kt : an, qn = h2(hn, kn, H, oe, ve), vr = h2(xn, Fn, H, oe, ve);
              let rr = J.prevZ, dr = J.nextZ;
              for (; rr && rr.z >= qn && dr && dr.z <= vr; ) {
                if (rr.x >= hn && rr.x <= xn && rr.y >= kn && rr.y <= Fn && rr !== Oe && rr !== rt && m1(yt, Vt, Tt, Kt, Nt, an, rr.x, rr.y) && cs(rr.prev, rr, rr.next) >= 0 || (rr = rr.prevZ, dr.x >= hn && dr.x <= xn && dr.y >= kn && dr.y <= Fn && dr !== Oe && dr !== rt && m1(yt, Vt, Tt, Kt, Nt, an, dr.x, dr.y) && cs(dr.prev, dr, dr.next) >= 0)) return !1;
                dr = dr.nextZ;
              }
              for (; rr && rr.z >= qn; ) {
                if (rr.x >= hn && rr.x <= xn && rr.y >= kn && rr.y <= Fn && rr !== Oe && rr !== rt && m1(yt, Vt, Tt, Kt, Nt, an, rr.x, rr.y) && cs(rr.prev, rr, rr.next) >= 0) return !1;
                rr = rr.prevZ;
              }
              for (; dr && dr.z <= vr; ) {
                if (dr.x >= hn && dr.x <= xn && dr.y >= kn && dr.y <= Fn && dr !== Oe && dr !== rt && m1(yt, Vt, Tt, Kt, Nt, an, dr.x, dr.y) && cs(dr.prev, dr, dr.next) >= 0) return !1;
                dr = dr.nextZ;
              }
              return !0;
            }
            function TA(J, H) {
              let oe = J;
              do {
                const ve = oe.prev, Oe = oe.next.next;
                !d2(ve, Oe) && p2(ve, oe, oe.next, Oe) && iy(ve, Oe) && iy(Oe, ve) && (H.push(ve.i, oe.i, Oe.i), qd(oe), qd(oe.next), oe = J = Oe), oe = oe.next;
              } while (oe !== J);
              return hc(oe);
            }
            function a5(J, H, oe, ve, Oe, Xe) {
              let rt = J;
              do {
                let yt = rt.next.next;
                for (; yt !== rt.prev; ) {
                  if (rt.i !== yt.i && MA(rt, yt)) {
                    let Tt = s5(rt, yt);
                    return rt = hc(rt, rt.next), Tt = hc(Tt, Tt.next), ry(rt, H, oe, ve, Oe, Xe, 0), void ry(Tt, H, oe, ve, Oe, Xe, 0);
                  }
                  yt = yt.next;
                }
                rt = rt.next;
              } while (rt !== J);
            }
            function p1(J, H) {
              return J.x - H.x;
            }
            function AA(J, H) {
              const oe = function(Oe, Xe) {
                let rt = Xe;
                const yt = Oe.x, Tt = Oe.y;
                let Nt, Vt = -1 / 0;
                do {
                  if (Tt <= rt.y && Tt >= rt.next.y && rt.next.y !== rt.y) {
                    const xn = rt.x + (Tt - rt.y) * (rt.next.x - rt.x) / (rt.next.y - rt.y);
                    if (xn <= yt && xn > Vt && (Vt = xn, Nt = rt.x < rt.next.x ? rt : rt.next, xn === yt)) return Nt;
                  }
                  rt = rt.next;
                } while (rt !== Xe);
                if (!Nt) return null;
                const Kt = Nt, an = Nt.x, hn = Nt.y;
                let kn = 1 / 0;
                rt = Nt;
                do {
                  if (yt >= rt.x && rt.x >= an && yt !== rt.x && m1(Tt < hn ? yt : Vt, Tt, an, hn, Tt < hn ? Vt : yt, Tt, rt.x, rt.y)) {
                    const xn = Math.abs(Tt - rt.y) / (yt - rt.x);
                    iy(rt, Oe) && (xn < kn || xn === kn && (rt.x > Nt.x || rt.x === Nt.x && SA(Nt, rt))) && (Nt = rt, kn = xn);
                  }
                  rt = rt.next;
                } while (rt !== Kt);
                return Nt;
              }(J, H);
              if (!oe) return H;
              const ve = s5(oe, J);
              return hc(ve, ve.next), hc(oe, oe.next);
            }
            function SA(J, H) {
              return cs(J.prev, J, H.prev) < 0 && cs(H.next, J, J.next) < 0;
            }
            function h2(J, H, oe, ve, Oe) {
              return (J = 1431655765 & ((J = 858993459 & ((J = 252645135 & ((J = 16711935 & ((J = (J - oe) * Oe | 0) | J << 8)) | J << 4)) | J << 2)) | J << 1)) | (H = 1431655765 & ((H = 858993459 & ((H = 252645135 & ((H = 16711935 & ((H = (H - ve) * Oe | 0) | H << 8)) | H << 4)) | H << 2)) | H << 1)) << 1;
            }
            function o5(J) {
              let H = J, oe = J;
              do
                (H.x < oe.x || H.x === oe.x && H.y < oe.y) && (oe = H), H = H.next;
              while (H !== J);
              return oe;
            }
            function m1(J, H, oe, ve, Oe, Xe, rt, yt) {
              return (Oe - rt) * (H - yt) >= (J - rt) * (Xe - yt) && (J - rt) * (ve - yt) >= (oe - rt) * (H - yt) && (oe - rt) * (Xe - yt) >= (Oe - rt) * (ve - yt);
            }
            function MA(J, H) {
              return J.next.i !== H.i && J.prev.i !== H.i && !function(oe, ve) {
                let Oe = oe;
                do {
                  if (Oe.i !== oe.i && Oe.next.i !== oe.i && Oe.i !== ve.i && Oe.next.i !== ve.i && p2(Oe, Oe.next, oe, ve)) return !0;
                  Oe = Oe.next;
                } while (Oe !== oe);
                return !1;
              }(J, H) && (iy(J, H) && iy(H, J) && function(oe, ve) {
                let Oe = oe, Xe = !1;
                const rt = (oe.x + ve.x) / 2, yt = (oe.y + ve.y) / 2;
                do
                  Oe.y > yt != Oe.next.y > yt && Oe.next.y !== Oe.y && rt < (Oe.next.x - Oe.x) * (yt - Oe.y) / (Oe.next.y - Oe.y) + Oe.x && (Xe = !Xe), Oe = Oe.next;
                while (Oe !== oe);
                return Xe;
              }(J, H) && (cs(J.prev, J, H.prev) || cs(J, H.prev, H)) || d2(J, H) && cs(J.prev, J, J.next) > 0 && cs(H.prev, H, H.next) > 0);
            }
            function cs(J, H, oe) {
              return (H.y - J.y) * (oe.x - H.x) - (H.x - J.x) * (oe.y - H.y);
            }
            function d2(J, H) {
              return J.x === H.x && J.y === H.y;
            }
            function p2(J, H, oe, ve) {
              const Oe = bf(cs(J, H, oe)), Xe = bf(cs(J, H, ve)), rt = bf(cs(oe, ve, J)), yt = bf(cs(oe, ve, H));
              return Oe !== Xe && rt !== yt || !(Oe !== 0 || !Bp(J, oe, H)) || !(Xe !== 0 || !Bp(J, ve, H)) || !(rt !== 0 || !Bp(oe, J, ve)) || !(yt !== 0 || !Bp(oe, H, ve));
            }
            function Bp(J, H, oe) {
              return H.x <= Math.max(J.x, oe.x) && H.x >= Math.min(J.x, oe.x) && H.y <= Math.max(J.y, oe.y) && H.y >= Math.min(J.y, oe.y);
            }
            function bf(J) {
              return J > 0 ? 1 : J < 0 ? -1 : 0;
            }
            function iy(J, H) {
              return cs(J.prev, J, J.next) < 0 ? cs(J, H, J.next) >= 0 && cs(J, J.prev, H) >= 0 : cs(J, H, J.prev) < 0 || cs(J, J.next, H) < 0;
            }
            function s5(J, H) {
              const oe = m2(J.i, J.x, J.y), ve = m2(H.i, H.x, H.y), Oe = J.next, Xe = H.prev;
              return J.next = H, H.prev = J, oe.next = Oe, Oe.prev = oe, ve.next = oe, oe.prev = ve, Xe.next = ve, ve.prev = Xe, ve;
            }
            function l5(J, H, oe, ve) {
              const Oe = m2(J, H, oe);
              return ve ? (Oe.next = ve.next, Oe.prev = ve, ve.next.prev = Oe, ve.next = Oe) : (Oe.prev = Oe, Oe.next = Oe), Oe;
            }
            function qd(J) {
              J.next.prev = J.prev, J.prev.next = J.next, J.prevZ && (J.prevZ.nextZ = J.nextZ), J.nextZ && (J.nextZ.prevZ = J.prevZ);
            }
            function m2(J, H, oe) {
              return { i: J, x: H, y: oe, prev: null, next: null, z: 0, prevZ: null, nextZ: null, steiner: !1 };
            }
            function t_(J, H, oe) {
              const ve = oe.patternDependencies;
              let Oe = !1;
              for (const Xe of H) {
                const rt = Xe.paint.get(`${J}-pattern`);
                rt.isConstant() || (Oe = !0);
                const yt = rt.constantOr(null);
                yt && (Oe = !0, ve[yt.to] = !0, ve[yt.from] = !0);
              }
              return Oe;
            }
            function n_(J, H, oe, ve, Oe) {
              const Xe = Oe.patternDependencies;
              for (const rt of H) {
                const yt = rt.paint.get(`${J}-pattern`).value;
                if (yt.kind !== "constant") {
                  let Tt = yt.evaluate({ zoom: ve - 1 }, oe, {}, Oe.availableImages), Nt = yt.evaluate({ zoom: ve }, oe, {}, Oe.availableImages), Vt = yt.evaluate({ zoom: ve + 1 }, oe, {}, Oe.availableImages);
                  Tt = Tt && Tt.name ? Tt.name : Tt, Nt = Nt && Nt.name ? Nt.name : Nt, Vt = Vt && Vt.name ? Vt.name : Vt, Xe[Tt] = !0, Xe[Nt] = !0, Xe[Vt] = !0, oe.patterns[rt.id] = { min: Tt, mid: Nt, max: Vt };
                }
              }
              return oe;
            }
            class r_ {
              constructor(H) {
                this.zoom = H.zoom, this.overscaling = H.overscaling, this.layers = H.layers, this.layerIds = this.layers.map((oe) => oe.id), this.index = H.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new qi(), this.indexArray = new ca(), this.indexArray2 = new Ga(), this.programConfigurations = new _u(H.layers, H.zoom), this.segments = new pa(), this.segments2 = new pa(), this.stateDependentLayerIds = this.layers.filter((oe) => oe.isStateDependent()).map((oe) => oe.id);
              }
              populate(H, oe, ve) {
                this.hasPattern = t_("fill", this.layers, oe);
                const Oe = this.layers[0].layout.get("fill-sort-key"), Xe = !Oe.isConstant(), rt = [];
                for (const { feature: yt, id: Tt, index: Nt, sourceLayerIndex: Vt } of H) {
                  const Kt = this.layers[0]._featureFilter.needGeometry, an = J0(yt, Kt);
                  if (!this.layers[0]._featureFilter.filter(new ni(this.zoom), an, ve)) continue;
                  const hn = Xe ? Oe.evaluate(an, {}, ve, oe.availableImages) : void 0, kn = { id: Tt, properties: yt.properties, type: yt.type, sourceLayerIndex: Vt, index: Nt, geometry: Kt ? an.geometry : cd(yt), patterns: {}, sortKey: hn };
                  rt.push(kn);
                }
                Xe && rt.sort((yt, Tt) => yt.sortKey - Tt.sortKey);
                for (const yt of rt) {
                  const { geometry: Tt, index: Nt, sourceLayerIndex: Vt } = yt;
                  if (this.hasPattern) {
                    const an = n_("fill", this.layers, yt, this.zoom, oe);
                    this.patternFeatures.push(an);
                  } else this.addFeature(yt, Tt, Nt, ve, {});
                  const Kt = H[Nt].feature;
                  oe.featureIndex.insert(Kt, Tt, Nt, Vt, this.index);
                }
              }
              update(H, oe, ve) {
                this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(H, oe, this.stateDependentLayers, ve);
              }
              addFeatures(H, oe, ve) {
                for (const Oe of this.patternFeatures) this.addFeature(Oe, Oe.geometry, Oe.index, oe, ve);
              }
              isEmpty() {
                return this.layoutVertexArray.length === 0;
              }
              uploadPending() {
                return !this.uploaded || this.programConfigurations.needsUpload;
              }
              upload(H) {
                this.uploaded || (this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, _A), this.indexBuffer = H.createIndexBuffer(this.indexArray), this.indexBuffer2 = H.createIndexBuffer(this.indexArray2)), this.programConfigurations.upload(H), this.uploaded = !0;
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.indexBuffer2.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.segments2.destroy());
              }
              addFeature(H, oe, ve, Oe, Xe) {
                for (const rt of xs(oe, 500)) {
                  let yt = 0;
                  for (const hn of rt) yt += hn.length;
                  const Tt = this.segments.prepareSegment(yt, this.layoutVertexArray, this.indexArray), Nt = Tt.vertexLength, Vt = [], Kt = [];
                  for (const hn of rt) {
                    if (hn.length === 0) continue;
                    hn !== rt[0] && Kt.push(Vt.length / 2);
                    const kn = this.segments2.prepareSegment(hn.length, this.layoutVertexArray, this.indexArray2), xn = kn.vertexLength;
                    this.layoutVertexArray.emplaceBack(hn[0].x, hn[0].y), this.indexArray2.emplaceBack(xn + hn.length - 1, xn), Vt.push(hn[0].x), Vt.push(hn[0].y);
                    for (let Fn = 1; Fn < hn.length; Fn++) this.layoutVertexArray.emplaceBack(hn[Fn].x, hn[Fn].y), this.indexArray2.emplaceBack(xn + Fn - 1, xn + Fn), Vt.push(hn[Fn].x), Vt.push(hn[Fn].y);
                    kn.vertexLength += hn.length, kn.primitiveLength += hn.length;
                  }
                  const an = c2(Vt, Kt);
                  for (let hn = 0; hn < an.length; hn += 3) this.indexArray.emplaceBack(Nt + an[hn], Nt + an[hn + 1], Nt + an[hn + 2]);
                  Tt.vertexLength += yt, Tt.primitiveLength += an.length / 3;
                }
                this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, H, ve, Xe, Oe);
              }
            }
            let u5;
            di("FillBucket", r_, { omit: ["layers", "patternFeatures"] });
            let i_;
            var dc = { get paint() {
              return i_ = i_ || new bt({ "fill-antialias": new bi(pe.paint_fill["fill-antialias"]), "fill-opacity": new ci(pe.paint_fill["fill-opacity"]), "fill-color": new ci(pe.paint_fill["fill-color"]), "fill-outline-color": new ci(pe.paint_fill["fill-outline-color"]), "fill-translate": new bi(pe.paint_fill["fill-translate"]), "fill-translate-anchor": new bi(pe.paint_fill["fill-translate-anchor"]), "fill-pattern": new He(pe.paint_fill["fill-pattern"]) });
            }, get layout() {
              return u5 = u5 || new bt({ "fill-sort-key": new ci(pe.layout_fill["fill-sort-key"]) });
            } };
            class EA extends Qe {
              constructor(H) {
                super(H, dc);
              }
              recalculate(H, oe) {
                super.recalculate(H, oe);
                const ve = this.paint._values["fill-outline-color"];
                ve.value.kind === "constant" && ve.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]);
              }
              createBucket(H) {
                return new r_(H);
              }
              queryRadius() {
                return l1(this.paint.get("fill-translate"));
              }
              queryIntersectsFeature(H, oe, ve, Oe, Xe, rt, yt) {
                return Yb(s2(H, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), rt.angle, yt), Oe);
              }
              isTileClipped() {
                return !0;
              }
            }
            const c5 = y([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_normal_ed", components: 4, type: "Int16" }], 4), CA = y([{ name: "a_centroid", components: 2, type: "Int16" }], 4), { members: f5, size: eF, alignment: IA } = c5;
            var jp = {}, DA = p, h5 = tm;
            function tm(J, H, oe, ve, Oe) {
              this.properties = {}, this.extent = oe, this.type = 0, this._pbf = J, this._geometry = -1, this._keys = ve, this._values = Oe, J.readFields(LA, this, H);
            }
            function LA(J, H, oe) {
              J == 1 ? H.id = oe.readVarint() : J == 2 ? function(ve, Oe) {
                for (var Xe = ve.readVarint() + ve.pos; ve.pos < Xe; ) {
                  var rt = Oe._keys[ve.readVarint()], yt = Oe._values[ve.readVarint()];
                  Oe.properties[rt] = yt;
                }
              }(oe, H) : J == 3 ? H.type = oe.readVarint() : J == 4 && (H._geometry = oe.pos);
            }
            function PA(J) {
              for (var H, oe, ve = 0, Oe = 0, Xe = J.length, rt = Xe - 1; Oe < Xe; rt = Oe++) H = J[Oe], ve += ((oe = J[rt]).x - H.x) * (H.y + oe.y);
              return ve;
            }
            tm.types = ["Unknown", "Point", "LineString", "Polygon"], tm.prototype.loadGeometry = function() {
              var J = this._pbf;
              J.pos = this._geometry;
              for (var H, oe = J.readVarint() + J.pos, ve = 1, Oe = 0, Xe = 0, rt = 0, yt = []; J.pos < oe; ) {
                if (Oe <= 0) {
                  var Tt = J.readVarint();
                  ve = 7 & Tt, Oe = Tt >> 3;
                }
                if (Oe--, ve === 1 || ve === 2) Xe += J.readSVarint(), rt += J.readSVarint(), ve === 1 && (H && yt.push(H), H = []), H.push(new DA(Xe, rt));
                else {
                  if (ve !== 7) throw new Error("unknown command " + ve);
                  H && H.push(H[0].clone());
                }
              }
              return H && yt.push(H), yt;
            }, tm.prototype.bbox = function() {
              var J = this._pbf;
              J.pos = this._geometry;
              for (var H = J.readVarint() + J.pos, oe = 1, ve = 0, Oe = 0, Xe = 0, rt = 1 / 0, yt = -1 / 0, Tt = 1 / 0, Nt = -1 / 0; J.pos < H; ) {
                if (ve <= 0) {
                  var Vt = J.readVarint();
                  oe = 7 & Vt, ve = Vt >> 3;
                }
                if (ve--, oe === 1 || oe === 2) (Oe += J.readSVarint()) < rt && (rt = Oe), Oe > yt && (yt = Oe), (Xe += J.readSVarint()) < Tt && (Tt = Xe), Xe > Nt && (Nt = Xe);
                else if (oe !== 7) throw new Error("unknown command " + oe);
              }
              return [rt, Tt, yt, Nt];
            }, tm.prototype.toGeoJSON = function(J, H, oe) {
              var ve, Oe, Xe = this.extent * Math.pow(2, oe), rt = this.extent * J, yt = this.extent * H, Tt = this.loadGeometry(), Nt = tm.types[this.type];
              function Vt(hn) {
                for (var kn = 0; kn < hn.length; kn++) {
                  var xn = hn[kn], Fn = 180 - 360 * (xn.y + yt) / Xe;
                  hn[kn] = [360 * (xn.x + rt) / Xe - 180, 360 / Math.PI * Math.atan(Math.exp(Fn * Math.PI / 180)) - 90];
                }
              }
              switch (this.type) {
                case 1:
                  var Kt = [];
                  for (ve = 0; ve < Tt.length; ve++) Kt[ve] = Tt[ve][0];
                  Vt(Tt = Kt);
                  break;
                case 2:
                  for (ve = 0; ve < Tt.length; ve++) Vt(Tt[ve]);
                  break;
                case 3:
                  for (Tt = function(hn) {
                    var kn = hn.length;
                    if (kn <= 1) return [hn];
                    for (var xn, Fn, qn = [], vr = 0; vr < kn; vr++) {
                      var rr = PA(hn[vr]);
                      rr !== 0 && (Fn === void 0 && (Fn = rr < 0), Fn === rr < 0 ? (xn && qn.push(xn), xn = [hn[vr]]) : xn.push(hn[vr]));
                    }
                    return xn && qn.push(xn), qn;
                  }(Tt), ve = 0; ve < Tt.length; ve++) for (Oe = 0; Oe < Tt[ve].length; Oe++) Vt(Tt[ve][Oe]);
              }
              Tt.length === 1 ? Tt = Tt[0] : Nt = "Multi" + Nt;
              var an = { type: "Feature", geometry: { type: Nt, coordinates: Tt }, properties: this.properties };
              return "id" in this && (an.id = this.id), an;
            };
            var ay = h5, cu = a_;
            function a_(J, H) {
              this.version = 1, this.name = null, this.extent = 4096, this.length = 0, this._pbf = J, this._keys = [], this._values = [], this._features = [], J.readFields(d5, this, H), this.length = this._features.length;
            }
            function d5(J, H, oe) {
              J === 15 ? H.version = oe.readVarint() : J === 1 ? H.name = oe.readString() : J === 5 ? H.extent = oe.readVarint() : J === 2 ? H._features.push(oe.pos) : J === 3 ? H._keys.push(oe.readString()) : J === 4 && H._values.push(function(ve) {
                for (var Oe = null, Xe = ve.readVarint() + ve.pos; ve.pos < Xe; ) {
                  var rt = ve.readVarint() >> 3;
                  Oe = rt === 1 ? ve.readString() : rt === 2 ? ve.readFloat() : rt === 3 ? ve.readDouble() : rt === 4 ? ve.readVarint64() : rt === 5 ? ve.readVarint() : rt === 6 ? ve.readSVarint() : rt === 7 ? ve.readBoolean() : null;
                }
                return Oe;
              }(oe));
            }
            a_.prototype.feature = function(J) {
              if (J < 0 || J >= this._features.length) throw new Error("feature index out of bounds");
              this._pbf.pos = this._features[J];
              var H = this._pbf.readVarint() + this._pbf.pos;
              return new ay(this._pbf, H, this.extent, this._keys, this._values);
            };
            var g2 = cu, Po = function(J, H) {
              this.layers = J.readFields(o_, {}, H);
            };
            function o_(J, H, oe) {
              if (J === 3) {
                var ve = new g2(oe, oe.readVarint() + oe.pos);
                ve.length && (H[ve.name] = ve);
              }
            }
            jp.VectorTile = Po, jp.VectorTileFeature = h5, jp.VectorTileLayer = cu;
            const p5 = jp.VectorTileFeature.types, y2 = Math.pow(2, 13);
            function qf(J, H, oe, ve, Oe, Xe, rt, yt) {
              J.emplaceBack(H, oe, 2 * Math.floor(ve * y2) + rt, Oe * y2 * 2, Xe * y2 * 2, Math.round(yt));
            }
            class Up {
              constructor(H) {
                this.zoom = H.zoom, this.overscaling = H.overscaling, this.layers = H.layers, this.layerIds = this.layers.map((oe) => oe.id), this.index = H.index, this.hasPattern = !1, this.layoutVertexArray = new Li(), this.centroidVertexArray = new ei(), this.indexArray = new ca(), this.programConfigurations = new _u(H.layers, H.zoom), this.segments = new pa(), this.stateDependentLayerIds = this.layers.filter((oe) => oe.isStateDependent()).map((oe) => oe.id);
              }
              populate(H, oe, ve) {
                this.features = [], this.hasPattern = t_("fill-extrusion", this.layers, oe);
                for (const { feature: Oe, id: Xe, index: rt, sourceLayerIndex: yt } of H) {
                  const Tt = this.layers[0]._featureFilter.needGeometry, Nt = J0(Oe, Tt);
                  if (!this.layers[0]._featureFilter.filter(new ni(this.zoom), Nt, ve)) continue;
                  const Vt = { id: Xe, sourceLayerIndex: yt, index: rt, geometry: Tt ? Nt.geometry : cd(Oe), properties: Oe.properties, type: Oe.type, patterns: {} };
                  this.hasPattern ? this.features.push(n_("fill-extrusion", this.layers, Vt, this.zoom, oe)) : this.addFeature(Vt, Vt.geometry, rt, ve, {}), oe.featureIndex.insert(Oe, Vt.geometry, rt, yt, this.index, !0);
                }
              }
              addFeatures(H, oe, ve) {
                for (const Oe of this.features) {
                  const { geometry: Xe } = Oe;
                  this.addFeature(Oe, Xe, Oe.index, oe, ve);
                }
              }
              update(H, oe, ve) {
                this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(H, oe, this.stateDependentLayers, ve);
              }
              isEmpty() {
                return this.layoutVertexArray.length === 0 && this.centroidVertexArray.length === 0;
              }
              uploadPending() {
                return !this.uploaded || this.programConfigurations.needsUpload;
              }
              upload(H) {
                this.uploaded || (this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, f5), this.centroidVertexBuffer = H.createVertexBuffer(this.centroidVertexArray, CA.members, !0), this.indexBuffer = H.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(H), this.uploaded = !0;
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.centroidVertexBuffer.destroy());
              }
              addFeature(H, oe, ve, Oe, Xe) {
                for (const rt of xs(oe, 500)) {
                  const yt = { x: 0, y: 0, vertexCount: 0 };
                  let Tt = 0;
                  for (const kn of rt) Tt += kn.length;
                  let Nt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);
                  for (const kn of rt) {
                    if (kn.length === 0 || OA(kn)) continue;
                    let xn = 0;
                    for (let Fn = 0; Fn < kn.length; Fn++) {
                      const qn = kn[Fn];
                      if (Fn >= 1) {
                        const vr = kn[Fn - 1];
                        if (!m5(qn, vr)) {
                          Nt.vertexLength + 4 > pa.MAX_VERTEX_ARRAY_LENGTH && (Nt = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
                          const rr = qn.sub(vr)._perp()._unit(), dr = vr.dist(qn);
                          xn + dr > 32768 && (xn = 0), qf(this.layoutVertexArray, qn.x, qn.y, rr.x, rr.y, 0, 0, xn), qf(this.layoutVertexArray, qn.x, qn.y, rr.x, rr.y, 0, 1, xn), yt.x += 2 * qn.x, yt.y += 2 * qn.y, yt.vertexCount += 2, xn += dr, qf(this.layoutVertexArray, vr.x, vr.y, rr.x, rr.y, 0, 0, xn), qf(this.layoutVertexArray, vr.x, vr.y, rr.x, rr.y, 0, 1, xn), yt.x += 2 * vr.x, yt.y += 2 * vr.y, yt.vertexCount += 2;
                          const jr = Nt.vertexLength;
                          this.indexArray.emplaceBack(jr, jr + 2, jr + 1), this.indexArray.emplaceBack(jr + 1, jr + 2, jr + 3), Nt.vertexLength += 4, Nt.primitiveLength += 2;
                        }
                      }
                    }
                  }
                  if (Nt.vertexLength + Tt > pa.MAX_VERTEX_ARRAY_LENGTH && (Nt = this.segments.prepareSegment(Tt, this.layoutVertexArray, this.indexArray)), p5[H.type] !== "Polygon") continue;
                  const Vt = [], Kt = [], an = Nt.vertexLength;
                  for (const kn of rt) if (kn.length !== 0) {
                    kn !== rt[0] && Kt.push(Vt.length / 2);
                    for (let xn = 0; xn < kn.length; xn++) {
                      const Fn = kn[xn];
                      qf(this.layoutVertexArray, Fn.x, Fn.y, 0, 0, 1, 1, 0), yt.x += Fn.x, yt.y += Fn.y, yt.vertexCount += 1, Vt.push(Fn.x), Vt.push(Fn.y);
                    }
                  }
                  const hn = c2(Vt, Kt);
                  for (let kn = 0; kn < hn.length; kn += 3) this.indexArray.emplaceBack(an + hn[kn], an + hn[kn + 2], an + hn[kn + 1]);
                  Nt.primitiveLength += hn.length / 3, Nt.vertexLength += Tt;
                  for (let kn = 0; kn < yt.vertexCount; kn++) {
                    const xn = Math.floor(yt.x / yt.vertexCount), Fn = Math.floor(yt.y / yt.vertexCount);
                    this.centroidVertexArray.emplaceBack(xn, Fn);
                  }
                }
                this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, H, ve, Xe, Oe);
              }
            }
            function m5(J, H) {
              return J.x === H.x && (J.x < 0 || J.x > Bl) || J.y === H.y && (J.y < 0 || J.y > Bl);
            }
            function OA(J) {
              return J.every((H) => H.x < 0) || J.every((H) => H.x > Bl) || J.every((H) => H.y < 0) || J.every((H) => H.y > Bl);
            }
            let g5;
            di("FillExtrusionBucket", Up, { omit: ["layers", "features"] });
            var zA = { get paint() {
              return g5 = g5 || new bt({ "fill-extrusion-opacity": new bi(pe["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new ci(pe["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new bi(pe["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new bi(pe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new He(pe["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new ci(pe["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new ci(pe["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new bi(pe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
            } };
            class RA extends Qe {
              constructor(H) {
                super(H, zA);
              }
              createBucket(H) {
                return new Up(H);
              }
              queryRadius() {
                return l1(this.paint.get("fill-extrusion-translate"));
              }
              is3D() {
                return !0;
              }
              queryIntersectsFeature(H, oe, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = s2(H, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), rt.angle, yt), Vt = this.paint.get("fill-extrusion-height").evaluate(oe, ve), Kt = this.paint.get("fill-extrusion-base").evaluate(oe, ve), an = function(kn, xn, Fn, qn) {
                  const vr = [];
                  for (const rr of kn) {
                    const dr = [rr.x, rr.y, qn, 1];
                    l2(dr, dr, xn), vr.push(new d(dr[0] / dr[3], dr[1] / dr[3]));
                  }
                  return vr;
                }(Nt, Tt, 0, 0), hn = function(kn, xn, Fn, qn) {
                  const vr = [], rr = [], dr = qn[8] * xn, jr = qn[9] * xn, oi = qn[10] * xn, Ai = qn[11] * xn, Ui = qn[8] * Fn, _i = qn[9] * Fn, fi = qn[10] * Fn, Bi = qn[11] * Fn;
                  for (const Ei of kn) {
                    const ki = [], Gr = [];
                    for (const Di of Ei) {
                      const Pi = Di.x, Qi = Di.y, Ka = qn[0] * Pi + qn[4] * Qi + qn[12], Ja = qn[1] * Pi + qn[5] * Qi + qn[13], Gs = qn[2] * Pi + qn[6] * Qi + qn[14], mc = qn[3] * Pi + qn[7] * Qi + qn[15], _l = Gs + oi, ll = mc + Ai, rc = Ka + Ui, Tu = Ja + _i, Ss = Gs + fi, fs = mc + Bi, hu = new d((Ka + dr) / ll, (Ja + jr) / ll);
                      hu.z = _l / ll, ki.push(hu);
                      const Ws = new d(rc / fs, Tu / fs);
                      Ws.z = Ss / fs, Gr.push(Ws);
                    }
                    vr.push(ki), rr.push(Gr);
                  }
                  return [vr, rr];
                }(Oe, Kt, Vt, Tt);
                return function(kn, xn, Fn) {
                  let qn = 1 / 0;
                  Yb(Fn, xn) && (qn = y5(Fn, xn[0]));
                  for (let vr = 0; vr < xn.length; vr++) {
                    const rr = xn[vr], dr = kn[vr];
                    for (let jr = 0; jr < rr.length - 1; jr++) {
                      const oi = rr[jr], Ai = rr[jr + 1], Ui = dr[jr], _i = [oi, Ai, dr[jr + 1], Ui, oi];
                      Gb(Fn, _i) && (qn = Math.min(qn, y5(Fn, _i)));
                    }
                  }
                  return qn !== 1 / 0 && qn;
                }(hn[0], hn[1], an);
              }
            }
            function oy(J, H) {
              return J.x * H.x + J.y * H.y;
            }
            function y5(J, H) {
              if (J.length === 1) {
                let oe = 0;
                const ve = H[oe++];
                let Oe;
                for (; !Oe || ve.equals(Oe); ) if (Oe = H[oe++], !Oe) return 1 / 0;
                for (; oe < H.length; oe++) {
                  const Xe = H[oe], rt = J[0], yt = Oe.sub(ve), Tt = Xe.sub(ve), Nt = rt.sub(ve), Vt = oy(yt, yt), Kt = oy(yt, Tt), an = oy(Tt, Tt), hn = oy(Nt, yt), kn = oy(Nt, Tt), xn = Vt * an - Kt * Kt, Fn = (an * hn - Kt * kn) / xn, qn = (Vt * kn - Kt * hn) / xn, vr = 1 - Fn - qn, rr = ve.z * vr + Oe.z * Fn + Xe.z * qn;
                  if (isFinite(rr)) return rr;
                }
                return 1 / 0;
              }
              {
                let oe = 1 / 0;
                for (const ve of H) oe = Math.min(oe, ve.z);
                return oe;
              }
            }
            const FA = y([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: NA, size: tF, alignment: s_ } = FA, g1 = y([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: v5, size: x5, alignment: nF } = g1, BA = jp.VectorTileFeature.types, jA = Math.cos(Math.PI / 180 * 37.5), l_ = Math.pow(2, 14) / 0.5;
            class v2 {
              constructor(H) {
                this.zoom = H.zoom, this.overscaling = H.overscaling, this.layers = H.layers, this.layerIds = this.layers.map((oe) => oe.id), this.index = H.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((oe) => {
                  this.gradients[oe.id] = {};
                }), this.layoutVertexArray = new Yi(), this.layoutVertexArray2 = new Gi(), this.indexArray = new ca(), this.programConfigurations = new _u(H.layers, H.zoom), this.segments = new pa(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter((oe) => oe.isStateDependent()).map((oe) => oe.id);
              }
              populate(H, oe, ve) {
                this.hasPattern = t_("line", this.layers, oe);
                const Oe = this.layers[0].layout.get("line-sort-key"), Xe = !Oe.isConstant(), rt = [];
                for (const { feature: yt, id: Tt, index: Nt, sourceLayerIndex: Vt } of H) {
                  const Kt = this.layers[0]._featureFilter.needGeometry, an = J0(yt, Kt);
                  if (!this.layers[0]._featureFilter.filter(new ni(this.zoom), an, ve)) continue;
                  const hn = Xe ? Oe.evaluate(an, {}, ve) : void 0, kn = { id: Tt, properties: yt.properties, type: yt.type, sourceLayerIndex: Vt, index: Nt, geometry: Kt ? an.geometry : cd(yt), patterns: {}, sortKey: hn };
                  rt.push(kn);
                }
                Xe && rt.sort((yt, Tt) => yt.sortKey - Tt.sortKey);
                for (const yt of rt) {
                  const { geometry: Tt, index: Nt, sourceLayerIndex: Vt } = yt;
                  if (this.hasPattern) {
                    const an = n_("line", this.layers, yt, this.zoom, oe);
                    this.patternFeatures.push(an);
                  } else this.addFeature(yt, Tt, Nt, ve, {});
                  const Kt = H[Nt].feature;
                  oe.featureIndex.insert(Kt, Tt, Nt, Vt, this.index);
                }
              }
              update(H, oe, ve) {
                this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(H, oe, this.stateDependentLayers, ve);
              }
              addFeatures(H, oe, ve) {
                for (const Oe of this.patternFeatures) this.addFeature(Oe, Oe.geometry, Oe.index, oe, ve);
              }
              isEmpty() {
                return this.layoutVertexArray.length === 0;
              }
              uploadPending() {
                return !this.uploaded || this.programConfigurations.needsUpload;
              }
              upload(H) {
                this.uploaded || (this.layoutVertexArray2.length !== 0 && (this.layoutVertexBuffer2 = H.createVertexBuffer(this.layoutVertexArray2, v5)), this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, NA), this.indexBuffer = H.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(H), this.uploaded = !0;
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
              }
              lineFeatureClips(H) {
                if (H.properties && Object.prototype.hasOwnProperty.call(H.properties, "mapbox_clip_start") && Object.prototype.hasOwnProperty.call(H.properties, "mapbox_clip_end")) return { start: +H.properties.mapbox_clip_start, end: +H.properties.mapbox_clip_end };
              }
              addFeature(H, oe, ve, Oe, Xe) {
                const rt = this.layers[0].layout, yt = rt.get("line-join").evaluate(H, {}), Tt = rt.get("line-cap"), Nt = rt.get("line-miter-limit"), Vt = rt.get("line-round-limit");
                this.lineClips = this.lineFeatureClips(H);
                for (const Kt of oe) this.addLine(Kt, H, yt, Tt, Nt, Vt);
                this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, H, ve, Xe, Oe);
              }
              addLine(H, oe, ve, Oe, Xe, rt) {
                if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, this.lineClips) {
                  this.lineClipsArray.push(this.lineClips);
                  for (let qn = 0; qn < H.length - 1; qn++) this.totalDistance += H[qn].dist(H[qn + 1]);
                  this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);
                }
                const yt = BA[oe.type] === "Polygon";
                let Tt = H.length;
                for (; Tt >= 2 && H[Tt - 1].equals(H[Tt - 2]); ) Tt--;
                let Nt = 0;
                for (; Nt < Tt - 1 && H[Nt].equals(H[Nt + 1]); ) Nt++;
                if (Tt < (yt ? 3 : 2)) return;
                ve === "bevel" && (Xe = 1.05);
                const Vt = this.overscaling <= 16 ? 15 * Bl / (512 * this.overscaling) : 0, Kt = this.segments.prepareSegment(10 * Tt, this.layoutVertexArray, this.indexArray);
                let an, hn, kn, xn, Fn;
                this.e1 = this.e2 = -1, yt && (an = H[Tt - 2], Fn = H[Nt].sub(an)._unit()._perp());
                for (let qn = Nt; qn < Tt; qn++) {
                  if (kn = qn === Tt - 1 ? yt ? H[Nt + 1] : void 0 : H[qn + 1], kn && H[qn].equals(kn)) continue;
                  Fn && (xn = Fn), an && (hn = an), an = H[qn], Fn = kn ? kn.sub(an)._unit()._perp() : xn, xn = xn || Fn;
                  let vr = xn.add(Fn);
                  vr.x === 0 && vr.y === 0 || vr._unit();
                  const rr = xn.x * Fn.x + xn.y * Fn.y, dr = vr.x * Fn.x + vr.y * Fn.y, jr = dr !== 0 ? 1 / dr : 1 / 0, oi = 2 * Math.sqrt(2 - 2 * dr), Ai = dr < jA && hn && kn, Ui = xn.x * Fn.y - xn.y * Fn.x > 0;
                  if (Ai && qn > Nt) {
                    const Bi = an.dist(hn);
                    if (Bi > 2 * Vt) {
                      const Ei = an.sub(an.sub(hn)._mult(Vt / Bi)._round());
                      this.updateDistance(hn, Ei), this.addCurrentVertex(Ei, xn, 0, 0, Kt), hn = Ei;
                    }
                  }
                  const _i = hn && kn;
                  let fi = _i ? ve : yt ? "butt" : Oe;
                  if (_i && fi === "round" && (jr < rt ? fi = "miter" : jr <= 2 && (fi = "fakeround")), fi === "miter" && jr > Xe && (fi = "bevel"), fi === "bevel" && (jr > 2 && (fi = "flipbevel"), jr < Xe && (fi = "miter")), hn && this.updateDistance(hn, an), fi === "miter") vr._mult(jr), this.addCurrentVertex(an, vr, 0, 0, Kt);
                  else if (fi === "flipbevel") {
                    if (jr > 100) vr = Fn.mult(-1);
                    else {
                      const Bi = jr * xn.add(Fn).mag() / xn.sub(Fn).mag();
                      vr._perp()._mult(Bi * (Ui ? -1 : 1));
                    }
                    this.addCurrentVertex(an, vr, 0, 0, Kt), this.addCurrentVertex(an, vr.mult(-1), 0, 0, Kt);
                  } else if (fi === "bevel" || fi === "fakeround") {
                    const Bi = -Math.sqrt(jr * jr - 1), Ei = Ui ? Bi : 0, ki = Ui ? 0 : Bi;
                    if (hn && this.addCurrentVertex(an, xn, Ei, ki, Kt), fi === "fakeround") {
                      const Gr = Math.round(180 * oi / Math.PI / 20);
                      for (let Di = 1; Di < Gr; Di++) {
                        let Pi = Di / Gr;
                        if (Pi !== 0.5) {
                          const Ka = Pi - 0.5;
                          Pi += Pi * Ka * (Pi - 1) * ((1.0904 + rr * (rr * (3.55645 - 1.43519 * rr) - 3.2452)) * Ka * Ka + (0.848013 + rr * (0.215638 * rr - 1.06021)));
                        }
                        const Qi = Fn.sub(xn)._mult(Pi)._add(xn)._unit()._mult(Ui ? -1 : 1);
                        this.addHalfVertex(an, Qi.x, Qi.y, !1, Ui, 0, Kt);
                      }
                    }
                    kn && this.addCurrentVertex(an, Fn, -Ei, -ki, Kt);
                  } else if (fi === "butt") this.addCurrentVertex(an, vr, 0, 0, Kt);
                  else if (fi === "square") {
                    const Bi = hn ? 1 : -1;
                    this.addCurrentVertex(an, vr, Bi, Bi, Kt);
                  } else fi === "round" && (hn && (this.addCurrentVertex(an, xn, 0, 0, Kt), this.addCurrentVertex(an, xn, 1, 1, Kt, !0)), kn && (this.addCurrentVertex(an, Fn, -1, -1, Kt, !0), this.addCurrentVertex(an, Fn, 0, 0, Kt)));
                  if (Ai && qn < Tt - 1) {
                    const Bi = an.dist(kn);
                    if (Bi > 2 * Vt) {
                      const Ei = an.add(kn.sub(an)._mult(Vt / Bi)._round());
                      this.updateDistance(an, Ei), this.addCurrentVertex(Ei, Fn, 0, 0, Kt), an = Ei;
                    }
                  }
                }
              }
              addCurrentVertex(H, oe, ve, Oe, Xe, rt = !1) {
                const yt = oe.x + oe.y * ve, Tt = oe.y - oe.x * ve, Nt = -oe.x + oe.y * Oe, Vt = -oe.y - oe.x * Oe;
                this.addHalfVertex(H, yt, Tt, rt, !1, ve, Xe), this.addHalfVertex(H, Nt, Vt, rt, !0, -Oe, Xe), this.distance > l_ / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(H, oe, ve, Oe, Xe, rt));
              }
              addHalfVertex({ x: H, y: oe }, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = 0.5 * (this.lineClips ? this.scaledDistance * (l_ - 1) : this.scaledDistance);
                if (this.layoutVertexArray.emplaceBack((H << 1) + (Xe ? 1 : 0), (oe << 1) + (rt ? 1 : 0), Math.round(63 * ve) + 128, Math.round(63 * Oe) + 128, 1 + (yt === 0 ? 0 : yt < 0 ? -1 : 1) | (63 & Nt) << 2, Nt >> 6), this.lineClips) {
                  const Kt = (this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start);
                  this.layoutVertexArray2.emplaceBack(Kt, this.lineClipsArray.length);
                }
                const Vt = Tt.vertexLength++;
                this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, this.e2, Vt), Tt.primitiveLength++), rt ? this.e2 = Vt : this.e1 = Vt;
              }
              updateScaledDistance() {
                this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance;
              }
              updateDistance(H, oe) {
                this.distance += H.dist(oe), this.updateScaledDistance();
              }
            }
            let Oc;
            di("LineBucket", v2, { omit: ["layers", "patternFeatures"] });
            let sy;
            var y1 = { get paint() {
              return sy = sy || new bt({ "line-opacity": new ci(pe.paint_line["line-opacity"]), "line-color": new ci(pe.paint_line["line-color"]), "line-translate": new bi(pe.paint_line["line-translate"]), "line-translate-anchor": new bi(pe.paint_line["line-translate-anchor"]), "line-width": new ci(pe.paint_line["line-width"]), "line-gap-width": new ci(pe.paint_line["line-gap-width"]), "line-offset": new ci(pe.paint_line["line-offset"]), "line-blur": new ci(pe.paint_line["line-blur"]), "line-dasharray": new Pe(pe.paint_line["line-dasharray"]), "line-pattern": new He(pe.paint_line["line-pattern"]), "line-gradient": new it(pe.paint_line["line-gradient"]) });
            }, get layout() {
              return Oc = Oc || new bt({ "line-cap": new bi(pe.layout_line["line-cap"]), "line-join": new ci(pe.layout_line["line-join"]), "line-miter-limit": new bi(pe.layout_line["line-miter-limit"]), "line-round-limit": new bi(pe.layout_line["line-round-limit"]), "line-sort-key": new ci(pe.layout_line["line-sort-key"]) });
            } };
            class ly extends ci {
              possiblyEvaluate(H, oe) {
                return oe = new ni(Math.floor(oe.zoom), { now: oe.now, fadeDuration: oe.fadeDuration, zoomHistory: oe.zoomHistory, transition: oe.transition }), super.possiblyEvaluate(H, oe);
              }
              evaluate(H, oe, ve, Oe) {
                return oe = L({}, oe, { zoom: Math.floor(oe.zoom) }), super.evaluate(H, oe, ve, Oe);
              }
            }
            let pc;
            class uy extends Qe {
              constructor(H) {
                super(H, y1), this.gradientVersion = 0, pc || (pc = new ly(y1.paint.properties["line-width"].specification), pc.useIntegerZoom = !0);
              }
              _handleSpecialPaintPropertyUpdate(H) {
                if (H === "line-gradient") {
                  const oe = this.gradientExpression();
                  (function(ve) {
                    return ve._styleExpression !== void 0;
                  })(oe) ? this.stepInterpolant = oe._styleExpression.expression instanceof wr : this.stepInterpolant = !1, this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER;
                }
              }
              gradientExpression() {
                return this._transitionablePaint._values["line-gradient"].value.expression;
              }
              recalculate(H, oe) {
                super.recalculate(H, oe), this.paint._values["line-floorwidth"] = pc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, H);
              }
              createBucket(H) {
                return new v2(H);
              }
              queryRadius(H) {
                const oe = H, ve = nm(Jg("line-width", this, oe), Jg("line-gap-width", this, oe)), Oe = Jg("line-offset", this, oe);
                return ve / 2 + Math.abs(Oe) + l1(this.paint.get("line-translate"));
              }
              queryIntersectsFeature(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = s2(H, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), rt.angle, yt), Nt = yt / 2 * nm(this.paint.get("line-width").evaluate(oe, ve), this.paint.get("line-gap-width").evaluate(oe, ve)), Vt = this.paint.get("line-offset").evaluate(oe, ve);
                return Vt && (Oe = function(Kt, an) {
                  const hn = [];
                  for (let kn = 0; kn < Kt.length; kn++) {
                    const xn = Kt[kn], Fn = [];
                    for (let qn = 0; qn < xn.length; qn++) {
                      const vr = xn[qn - 1], rr = xn[qn], dr = xn[qn + 1], jr = qn === 0 ? new d(0, 0) : rr.sub(vr)._unit()._perp(), oi = qn === xn.length - 1 ? new d(0, 0) : dr.sub(rr)._unit()._perp(), Ai = jr._add(oi)._unit(), Ui = Ai.x * oi.x + Ai.y * oi.y;
                      Ui !== 0 && Ai._mult(1 / Ui), Fn.push(Ai._mult(an)._add(rr));
                    }
                    hn.push(Fn);
                  }
                  return hn;
                }(Oe, Vt * yt)), function(Kt, an, hn) {
                  for (let kn = 0; kn < an.length; kn++) {
                    const xn = an[kn];
                    if (Kt.length >= 3) {
                      for (let Fn = 0; Fn < xn.length; Fn++) if (s1(Kt, xn[Fn])) return !0;
                    }
                    if (Zb(Kt, xn, hn)) return !0;
                  }
                  return !1;
                }(Tt, Oe, Nt);
              }
              isTileClipped() {
                return !0;
              }
            }
            function nm(J, H) {
              return H > 0 ? H + 2 * J : J;
            }
            const nc = y([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), x2 = y([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4);
            y([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4);
            const b2 = y([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }, { name: "a_box_real", components: 2, type: "Int16" }]);
            y([{ 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" }]);
            const zc = y([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4), b5 = y([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
            function _5(J, H, oe) {
              return J.sections.forEach((ve) => {
                ve.text = function(Oe, Xe, rt) {
                  const yt = Xe.layout.get("text-transform").evaluate(rt, {});
                  return yt === "uppercase" ? Oe = Oe.toLocaleUpperCase() : yt === "lowercase" && (Oe = Oe.toLocaleLowerCase()), il.applyArabicShaping && (Oe = il.applyArabicShaping(Oe)), Oe;
                }(ve.text, H, oe);
              }), J;
            }
            y([{ name: "triangle", components: 3, type: "Uint16" }]), y([{ 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" }, { type: "Uint8", name: "writingMode" }, { type: "Uint8", name: "placedOrientation" }, { type: "Uint8", name: "hidden" }, { type: "Uint32", name: "crossTileID" }, { type: "Int16", name: "associatedIconIndex" }]), y([{ 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" }]), y([{ type: "Float32", name: "offsetX" }]), y([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]), y([{ type: "Uint16", name: "textAnchor" }, { type: "Float32", components: 2, name: "textOffset" }]);
            const cy = { "!": "︕", "#": "＃", $: "＄", "%": "％", "&": "＆", "(": "︵", ")": "︶", "*": "＊", "+": "＋", ",": "︐", "-": "︲", ".": "・", "/": "／", ":": "︓", ";": "︔", "<": "︿", "=": "＝", ">": "﹀", "?": "︖", "@": "＠", "[": "﹇", "\\": "＼", "]": "﹈", "^": "＾", _: "︳", "`": "｀", "{": "︷", "|": "―", "}": "︸", "~": "～", "¢": "￠", "£": "￡", "¥": "￥", "¦": "￤", "¬": "￢", "¯": "￣", "–": "︲", "—": "︱", "‘": "﹃", "’": "﹄", "“": "﹁", "”": "﹂", "…": "︙", "‧": "・", "₩": "￦", "、": "︑", "。": "︒", "〈": "︿", "〉": "﹀", "《": "︽", "》": "︾", "「": "﹁", "」": "﹂", "『": "﹃", "』": "﹄", "【": "︻", "】": "︼", "〔": "︹", "〕": "︺", "〖": "︗", "〗": "︘", "！": "︕", "（": "︵", "）": "︶", "，": "︐", "－": "︲", "．": "・", "：": "︓", "；": "︔", "＜": "︿", "＞": "﹀", "？": "︖", "［": "﹇", "］": "﹈", "＿": "︳", "｛": "︷", "｜": "―", "｝": "︸", "｟": "︵", "｠": "︶", "｡": "︒", "｢": "﹁", "｣": "﹂" };
            var jl = 24, u_ = co, v1 = { read: function(J, H, oe, ve, Oe) {
              var Xe, rt, yt = 8 * Oe - ve - 1, Tt = (1 << yt) - 1, Nt = Tt >> 1, Vt = -7, Kt = oe ? Oe - 1 : 0, an = oe ? -1 : 1, hn = J[H + Kt];
              for (Kt += an, Xe = hn & (1 << -Vt) - 1, hn >>= -Vt, Vt += yt; Vt > 0; Xe = 256 * Xe + J[H + Kt], Kt += an, Vt -= 8) ;
              for (rt = Xe & (1 << -Vt) - 1, Xe >>= -Vt, Vt += ve; Vt > 0; rt = 256 * rt + J[H + Kt], Kt += an, Vt -= 8) ;
              if (Xe === 0) Xe = 1 - Nt;
              else {
                if (Xe === Tt) return rt ? NaN : 1 / 0 * (hn ? -1 : 1);
                rt += Math.pow(2, ve), Xe -= Nt;
              }
              return (hn ? -1 : 1) * rt * Math.pow(2, Xe - ve);
            }, write: function(J, H, oe, ve, Oe, Xe) {
              var rt, yt, Tt, Nt = 8 * Xe - Oe - 1, Vt = (1 << Nt) - 1, Kt = Vt >> 1, an = Oe === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, hn = ve ? 0 : Xe - 1, kn = ve ? 1 : -1, xn = H < 0 || H === 0 && 1 / H < 0 ? 1 : 0;
              for (H = Math.abs(H), isNaN(H) || H === 1 / 0 ? (yt = isNaN(H) ? 1 : 0, rt = Vt) : (rt = Math.floor(Math.log(H) / Math.LN2), H * (Tt = Math.pow(2, -rt)) < 1 && (rt--, Tt *= 2), (H += rt + Kt >= 1 ? an / Tt : an * Math.pow(2, 1 - Kt)) * Tt >= 2 && (rt++, Tt /= 2), rt + Kt >= Vt ? (yt = 0, rt = Vt) : rt + Kt >= 1 ? (yt = (H * Tt - 1) * Math.pow(2, Oe), rt += Kt) : (yt = H * Math.pow(2, Kt - 1) * Math.pow(2, Oe), rt = 0)); Oe >= 8; J[oe + hn] = 255 & yt, hn += kn, yt /= 256, Oe -= 8) ;
              for (rt = rt << Oe | yt, Nt += Oe; Nt > 0; J[oe + hn] = 255 & rt, hn += kn, rt /= 256, Nt -= 8) ;
              J[oe + hn - kn] |= 128 * xn;
            } };
            function co(J) {
              this.buf = ArrayBuffer.isView && ArrayBuffer.isView(J) ? J : new Uint8Array(J || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
            }
            co.Varint = 0, co.Fixed64 = 1, co.Bytes = 2, co.Fixed32 = 5;
            var c_ = 4294967296, f_ = 1 / c_, rm = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
            function Uu(J) {
              return J.type === co.Bytes ? J.readVarint() + J.pos : J.pos + 1;
            }
            function Vp(J, H, oe) {
              return oe ? 4294967296 * H + (J >>> 0) : 4294967296 * (H >>> 0) + (J >>> 0);
            }
            function h_(J, H, oe) {
              var ve = H <= 16383 ? 1 : H <= 2097151 ? 2 : H <= 268435455 ? 3 : Math.floor(Math.log(H) / (7 * Math.LN2));
              oe.realloc(ve);
              for (var Oe = oe.pos - 1; Oe >= J; Oe--) oe.buf[Oe + ve] = oe.buf[Oe];
            }
            function w5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeVarint(J[oe]);
            }
            function UA(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeSVarint(J[oe]);
            }
            function k5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeFloat(J[oe]);
            }
            function T5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeDouble(J[oe]);
            }
            function A5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeBoolean(J[oe]);
            }
            function S5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeFixed32(J[oe]);
            }
            function VA(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeSFixed32(J[oe]);
            }
            function $A(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeFixed64(J[oe]);
            }
            function M5(J, H) {
              for (var oe = 0; oe < J.length; oe++) H.writeSFixed64(J[oe]);
            }
            function fy(J, H) {
              return (J[H] | J[H + 1] << 8 | J[H + 2] << 16) + 16777216 * J[H + 3];
            }
            function Vh(J, H, oe) {
              J[oe] = H, J[oe + 1] = H >>> 8, J[oe + 2] = H >>> 16, J[oe + 3] = H >>> 24;
            }
            function d_(J, H) {
              return (J[H] | J[H + 1] << 8 | J[H + 2] << 16) + (J[H + 3] << 24);
            }
            co.prototype = { destroy: function() {
              this.buf = null;
            }, readFields: function(J, H, oe) {
              for (oe = oe || this.length; this.pos < oe; ) {
                var ve = this.readVarint(), Oe = ve >> 3, Xe = this.pos;
                this.type = 7 & ve, J(Oe, H, this), this.pos === Xe && this.skip(ve);
              }
              return H;
            }, readMessage: function(J, H) {
              return this.readFields(J, H, this.readVarint() + this.pos);
            }, readFixed32: function() {
              var J = fy(this.buf, this.pos);
              return this.pos += 4, J;
            }, readSFixed32: function() {
              var J = d_(this.buf, this.pos);
              return this.pos += 4, J;
            }, readFixed64: function() {
              var J = fy(this.buf, this.pos) + fy(this.buf, this.pos + 4) * c_;
              return this.pos += 8, J;
            }, readSFixed64: function() {
              var J = fy(this.buf, this.pos) + d_(this.buf, this.pos + 4) * c_;
              return this.pos += 8, J;
            }, readFloat: function() {
              var J = v1.read(this.buf, this.pos, !0, 23, 4);
              return this.pos += 4, J;
            }, readDouble: function() {
              var J = v1.read(this.buf, this.pos, !0, 52, 8);
              return this.pos += 8, J;
            }, readVarint: function(J) {
              var H, oe, ve = this.buf;
              return H = 127 & (oe = ve[this.pos++]), oe < 128 ? H : (H |= (127 & (oe = ve[this.pos++])) << 7, oe < 128 ? H : (H |= (127 & (oe = ve[this.pos++])) << 14, oe < 128 ? H : (H |= (127 & (oe = ve[this.pos++])) << 21, oe < 128 ? H : function(Oe, Xe, rt) {
                var yt, Tt, Nt = rt.buf;
                if (yt = (112 & (Tt = Nt[rt.pos++])) >> 4, Tt < 128 || (yt |= (127 & (Tt = Nt[rt.pos++])) << 3, Tt < 128) || (yt |= (127 & (Tt = Nt[rt.pos++])) << 10, Tt < 128) || (yt |= (127 & (Tt = Nt[rt.pos++])) << 17, Tt < 128) || (yt |= (127 & (Tt = Nt[rt.pos++])) << 24, Tt < 128) || (yt |= (1 & (Tt = Nt[rt.pos++])) << 31, Tt < 128)) return Vp(Oe, yt, Xe);
                throw new Error("Expected varint not more than 10 bytes");
              }(H |= (15 & (oe = ve[this.pos])) << 28, J, this))));
            }, readVarint64: function() {
              return this.readVarint(!0);
            }, readSVarint: function() {
              var J = this.readVarint();
              return J % 2 == 1 ? (J + 1) / -2 : J / 2;
            }, readBoolean: function() {
              return !!this.readVarint();
            }, readString: function() {
              var J = this.readVarint() + this.pos, H = this.pos;
              return this.pos = J, J - H >= 12 && rm ? function(oe, ve, Oe) {
                return rm.decode(oe.subarray(ve, Oe));
              }(this.buf, H, J) : function(oe, ve, Oe) {
                for (var Xe = "", rt = ve; rt < Oe; ) {
                  var yt, Tt, Nt, Vt = oe[rt], Kt = null, an = Vt > 239 ? 4 : Vt > 223 ? 3 : Vt > 191 ? 2 : 1;
                  if (rt + an > Oe) break;
                  an === 1 ? Vt < 128 && (Kt = Vt) : an === 2 ? (192 & (yt = oe[rt + 1])) == 128 && (Kt = (31 & Vt) << 6 | 63 & yt) <= 127 && (Kt = null) : an === 3 ? (yt = oe[rt + 1], Tt = oe[rt + 2], (192 & yt) == 128 && (192 & Tt) == 128 && ((Kt = (15 & Vt) << 12 | (63 & yt) << 6 | 63 & Tt) <= 2047 || Kt >= 55296 && Kt <= 57343) && (Kt = null)) : an === 4 && (yt = oe[rt + 1], Tt = oe[rt + 2], Nt = oe[rt + 3], (192 & yt) == 128 && (192 & Tt) == 128 && (192 & Nt) == 128 && ((Kt = (15 & Vt) << 18 | (63 & yt) << 12 | (63 & Tt) << 6 | 63 & Nt) <= 65535 || Kt >= 1114112) && (Kt = null)), Kt === null ? (Kt = 65533, an = 1) : Kt > 65535 && (Kt -= 65536, Xe += String.fromCharCode(Kt >>> 10 & 1023 | 55296), Kt = 56320 | 1023 & Kt), Xe += String.fromCharCode(Kt), rt += an;
                }
                return Xe;
              }(this.buf, H, J);
            }, readBytes: function() {
              var J = this.readVarint() + this.pos, H = this.buf.subarray(this.pos, J);
              return this.pos = J, H;
            }, readPackedVarint: function(J, H) {
              if (this.type !== co.Bytes) return J.push(this.readVarint(H));
              var oe = Uu(this);
              for (J = J || []; this.pos < oe; ) J.push(this.readVarint(H));
              return J;
            }, readPackedSVarint: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readSVarint());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readSVarint());
              return J;
            }, readPackedBoolean: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readBoolean());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readBoolean());
              return J;
            }, readPackedFloat: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readFloat());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readFloat());
              return J;
            }, readPackedDouble: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readDouble());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readDouble());
              return J;
            }, readPackedFixed32: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readFixed32());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readFixed32());
              return J;
            }, readPackedSFixed32: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readSFixed32());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readSFixed32());
              return J;
            }, readPackedFixed64: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readFixed64());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readFixed64());
              return J;
            }, readPackedSFixed64: function(J) {
              if (this.type !== co.Bytes) return J.push(this.readSFixed64());
              var H = Uu(this);
              for (J = J || []; this.pos < H; ) J.push(this.readSFixed64());
              return J;
            }, skip: function(J) {
              var H = 7 & J;
              if (H === co.Varint) for (; this.buf[this.pos++] > 127; ) ;
              else if (H === co.Bytes) this.pos = this.readVarint() + this.pos;
              else if (H === co.Fixed32) this.pos += 4;
              else {
                if (H !== co.Fixed64) throw new Error("Unimplemented type: " + H);
                this.pos += 8;
              }
            }, writeTag: function(J, H) {
              this.writeVarint(J << 3 | H);
            }, realloc: function(J) {
              for (var H = this.length || 16; H < this.pos + J; ) H *= 2;
              if (H !== this.length) {
                var oe = new Uint8Array(H);
                oe.set(this.buf), this.buf = oe, this.length = H;
              }
            }, finish: function() {
              return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
            }, writeFixed32: function(J) {
              this.realloc(4), Vh(this.buf, J, this.pos), this.pos += 4;
            }, writeSFixed32: function(J) {
              this.realloc(4), Vh(this.buf, J, this.pos), this.pos += 4;
            }, writeFixed64: function(J) {
              this.realloc(8), Vh(this.buf, -1 & J, this.pos), Vh(this.buf, Math.floor(J * f_), this.pos + 4), this.pos += 8;
            }, writeSFixed64: function(J) {
              this.realloc(8), Vh(this.buf, -1 & J, this.pos), Vh(this.buf, Math.floor(J * f_), this.pos + 4), this.pos += 8;
            }, writeVarint: function(J) {
              (J = +J || 0) > 268435455 || J < 0 ? function(H, oe) {
                var ve, Oe;
                if (H >= 0 ? (ve = H % 4294967296 | 0, Oe = H / 4294967296 | 0) : (Oe = ~(-H / 4294967296), 4294967295 ^ (ve = ~(-H % 4294967296)) ? ve = ve + 1 | 0 : (ve = 0, Oe = Oe + 1 | 0)), H >= 18446744073709552e3 || H < -18446744073709552e3) throw new Error("Given varint doesn't fit into 10 bytes");
                oe.realloc(10), function(Xe, rt, yt) {
                  yt.buf[yt.pos++] = 127 & Xe | 128, Xe >>>= 7, yt.buf[yt.pos++] = 127 & Xe | 128, Xe >>>= 7, yt.buf[yt.pos++] = 127 & Xe | 128, Xe >>>= 7, yt.buf[yt.pos++] = 127 & Xe | 128, Xe >>>= 7, yt.buf[yt.pos] = 127 & Xe;
                }(ve, 0, oe), function(Xe, rt) {
                  var yt = (7 & Xe) << 4;
                  rt.buf[rt.pos++] |= yt | ((Xe >>>= 3) ? 128 : 0), Xe && (rt.buf[rt.pos++] = 127 & Xe | ((Xe >>>= 7) ? 128 : 0), Xe && (rt.buf[rt.pos++] = 127 & Xe | ((Xe >>>= 7) ? 128 : 0), Xe && (rt.buf[rt.pos++] = 127 & Xe | ((Xe >>>= 7) ? 128 : 0), Xe && (rt.buf[rt.pos++] = 127 & Xe | ((Xe >>>= 7) ? 128 : 0), Xe && (rt.buf[rt.pos++] = 127 & Xe)))));
                }(Oe, oe);
              }(J, this) : (this.realloc(4), this.buf[this.pos++] = 127 & J | (J > 127 ? 128 : 0), J <= 127 || (this.buf[this.pos++] = 127 & (J >>>= 7) | (J > 127 ? 128 : 0), J <= 127 || (this.buf[this.pos++] = 127 & (J >>>= 7) | (J > 127 ? 128 : 0), J <= 127 || (this.buf[this.pos++] = J >>> 7 & 127))));
            }, writeSVarint: function(J) {
              this.writeVarint(J < 0 ? 2 * -J - 1 : 2 * J);
            }, writeBoolean: function(J) {
              this.writeVarint(!!J);
            }, writeString: function(J) {
              J = String(J), this.realloc(4 * J.length), this.pos++;
              var H = this.pos;
              this.pos = function(ve, Oe, Xe) {
                for (var rt, yt, Tt = 0; Tt < Oe.length; Tt++) {
                  if ((rt = Oe.charCodeAt(Tt)) > 55295 && rt < 57344) {
                    if (!yt) {
                      rt > 56319 || Tt + 1 === Oe.length ? (ve[Xe++] = 239, ve[Xe++] = 191, ve[Xe++] = 189) : yt = rt;
                      continue;
                    }
                    if (rt < 56320) {
                      ve[Xe++] = 239, ve[Xe++] = 191, ve[Xe++] = 189, yt = rt;
                      continue;
                    }
                    rt = yt - 55296 << 10 | rt - 56320 | 65536, yt = null;
                  } else yt && (ve[Xe++] = 239, ve[Xe++] = 191, ve[Xe++] = 189, yt = null);
                  rt < 128 ? ve[Xe++] = rt : (rt < 2048 ? ve[Xe++] = rt >> 6 | 192 : (rt < 65536 ? ve[Xe++] = rt >> 12 | 224 : (ve[Xe++] = rt >> 18 | 240, ve[Xe++] = rt >> 12 & 63 | 128), ve[Xe++] = rt >> 6 & 63 | 128), ve[Xe++] = 63 & rt | 128);
                }
                return Xe;
              }(this.buf, J, this.pos);
              var oe = this.pos - H;
              oe >= 128 && h_(H, oe, this), this.pos = H - 1, this.writeVarint(oe), this.pos += oe;
            }, writeFloat: function(J) {
              this.realloc(4), v1.write(this.buf, J, this.pos, !0, 23, 4), this.pos += 4;
            }, writeDouble: function(J) {
              this.realloc(8), v1.write(this.buf, J, this.pos, !0, 52, 8), this.pos += 8;
            }, writeBytes: function(J) {
              var H = J.length;
              this.writeVarint(H), this.realloc(H);
              for (var oe = 0; oe < H; oe++) this.buf[this.pos++] = J[oe];
            }, writeRawMessage: function(J, H) {
              this.pos++;
              var oe = this.pos;
              J(H, this);
              var ve = this.pos - oe;
              ve >= 128 && h_(oe, ve, this), this.pos = oe - 1, this.writeVarint(ve), this.pos += ve;
            }, writeMessage: function(J, H, oe) {
              this.writeTag(J, co.Bytes), this.writeRawMessage(H, oe);
            }, writePackedVarint: function(J, H) {
              H.length && this.writeMessage(J, w5, H);
            }, writePackedSVarint: function(J, H) {
              H.length && this.writeMessage(J, UA, H);
            }, writePackedBoolean: function(J, H) {
              H.length && this.writeMessage(J, A5, H);
            }, writePackedFloat: function(J, H) {
              H.length && this.writeMessage(J, k5, H);
            }, writePackedDouble: function(J, H) {
              H.length && this.writeMessage(J, T5, H);
            }, writePackedFixed32: function(J, H) {
              H.length && this.writeMessage(J, S5, H);
            }, writePackedSFixed32: function(J, H) {
              H.length && this.writeMessage(J, VA, H);
            }, writePackedFixed64: function(J, H) {
              H.length && this.writeMessage(J, $A, H);
            }, writePackedSFixed64: function(J, H) {
              H.length && this.writeMessage(J, M5, H);
            }, writeBytesField: function(J, H) {
              this.writeTag(J, co.Bytes), this.writeBytes(H);
            }, writeFixed32Field: function(J, H) {
              this.writeTag(J, co.Fixed32), this.writeFixed32(H);
            }, writeSFixed32Field: function(J, H) {
              this.writeTag(J, co.Fixed32), this.writeSFixed32(H);
            }, writeFixed64Field: function(J, H) {
              this.writeTag(J, co.Fixed64), this.writeFixed64(H);
            }, writeSFixed64Field: function(J, H) {
              this.writeTag(J, co.Fixed64), this.writeSFixed64(H);
            }, writeVarintField: function(J, H) {
              this.writeTag(J, co.Varint), this.writeVarint(H);
            }, writeSVarintField: function(J, H) {
              this.writeTag(J, co.Varint), this.writeSVarint(H);
            }, writeStringField: function(J, H) {
              this.writeTag(J, co.Bytes), this.writeString(H);
            }, writeFloatField: function(J, H) {
              this.writeTag(J, co.Fixed32), this.writeFloat(H);
            }, writeDoubleField: function(J, H) {
              this.writeTag(J, co.Fixed64), this.writeDouble(H);
            }, writeBooleanField: function(J, H) {
              this.writeVarintField(J, !!H);
            } };
            var x1 = h(u_);
            const _2 = 3;
            function w2(J, H, oe) {
              J === 1 && oe.readMessage(k2, H);
            }
            function k2(J, H, oe) {
              if (J === 3) {
                const { id: ve, bitmap: Oe, width: Xe, height: rt, left: yt, top: Tt, advance: Nt } = oe.readMessage(T2, {});
                H.push({ id: ve, bitmap: new h1({ width: Xe + 2 * _2, height: rt + 2 * _2 }, Oe), metrics: { width: Xe, height: rt, left: yt, top: Tt, advance: Nt } });
              }
            }
            function T2(J, H, oe) {
              J === 1 ? H.id = oe.readVarint() : J === 2 ? H.bitmap = oe.readBytes() : J === 3 ? H.width = oe.readVarint() : J === 4 ? H.height = oe.readVarint() : J === 5 ? H.left = oe.readSVarint() : J === 6 ? H.top = oe.readSVarint() : J === 7 && (H.advance = oe.readVarint());
            }
            const im = _2;
            function E5(J) {
              let H = 0, oe = 0;
              for (const rt of J) H += rt.w * rt.h, oe = Math.max(oe, rt.w);
              J.sort((rt, yt) => yt.h - rt.h);
              const ve = [{ x: 0, y: 0, w: Math.max(Math.ceil(Math.sqrt(H / 0.95)), oe), h: 1 / 0 }];
              let Oe = 0, Xe = 0;
              for (const rt of J) for (let yt = ve.length - 1; yt >= 0; yt--) {
                const Tt = ve[yt];
                if (!(rt.w > Tt.w || rt.h > Tt.h)) {
                  if (rt.x = Tt.x, rt.y = Tt.y, Xe = Math.max(Xe, rt.y + rt.h), Oe = Math.max(Oe, rt.x + rt.w), rt.w === Tt.w && rt.h === Tt.h) {
                    const Nt = ve.pop();
                    yt < ve.length && (ve[yt] = Nt);
                  } else rt.h === Tt.h ? (Tt.x += rt.w, Tt.w -= rt.w) : rt.w === Tt.w ? (Tt.y += rt.h, Tt.h -= rt.h) : (ve.push({ x: Tt.x + rt.w, y: Tt.y, w: Tt.w - rt.w, h: rt.h }), Tt.y += rt.h, Tt.h -= rt.h);
                  break;
                }
              }
              return { w: Oe, h: Xe, fill: H / (Oe * Xe) || 0 };
            }
            const rf = 1;
            class p_ {
              constructor(H, { pixelRatio: oe, version: ve, stretchX: Oe, stretchY: Xe, content: rt, textFitWidth: yt, textFitHeight: Tt }) {
                this.paddedRect = H, this.pixelRatio = oe, this.stretchX = Oe, this.stretchY = Xe, this.content = rt, this.version = ve, this.textFitWidth = yt, this.textFitHeight = Tt;
              }
              get tl() {
                return [this.paddedRect.x + rf, this.paddedRect.y + rf];
              }
              get br() {
                return [this.paddedRect.x + this.paddedRect.w - rf, this.paddedRect.y + this.paddedRect.h - rf];
              }
              get tlbr() {
                return this.tl.concat(this.br);
              }
              get displaySize() {
                return [(this.paddedRect.w - 2 * rf) / this.pixelRatio, (this.paddedRect.h - 2 * rf) / this.pixelRatio];
              }
            }
            class am {
              constructor(H, oe) {
                const ve = {}, Oe = {};
                this.haveRenderCallbacks = [];
                const Xe = [];
                this.addImages(H, ve, Xe), this.addImages(oe, Oe, Xe);
                const { w: rt, h: yt } = E5(Xe), Tt = new xf({ width: rt || 1, height: yt || 1 });
                for (const Nt in H) {
                  const Vt = H[Nt], Kt = ve[Nt].paddedRect;
                  xf.copy(Vt.data, Tt, { x: 0, y: 0 }, { x: Kt.x + rf, y: Kt.y + rf }, Vt.data);
                }
                for (const Nt in oe) {
                  const Vt = oe[Nt], Kt = Oe[Nt].paddedRect, an = Kt.x + rf, hn = Kt.y + rf, kn = Vt.data.width, xn = Vt.data.height;
                  xf.copy(Vt.data, Tt, { x: 0, y: 0 }, { x: an, y: hn }, Vt.data), xf.copy(Vt.data, Tt, { x: 0, y: xn - 1 }, { x: an, y: hn - 1 }, { width: kn, height: 1 }), xf.copy(Vt.data, Tt, { x: 0, y: 0 }, { x: an, y: hn + xn }, { width: kn, height: 1 }), xf.copy(Vt.data, Tt, { x: kn - 1, y: 0 }, { x: an - 1, y: hn }, { width: 1, height: xn }), xf.copy(Vt.data, Tt, { x: 0, y: 0 }, { x: an + kn, y: hn }, { width: 1, height: xn });
                }
                this.image = Tt, this.iconPositions = ve, this.patternPositions = Oe;
              }
              addImages(H, oe, ve) {
                for (const Oe in H) {
                  const Xe = H[Oe], rt = { x: 0, y: 0, w: Xe.data.width + 2 * rf, h: Xe.data.height + 2 * rf };
                  ve.push(rt), oe[Oe] = new p_(rt, Xe), Xe.hasRenderCallback && this.haveRenderCallbacks.push(Oe);
                }
              }
              patchUpdatedImages(H, oe) {
                H.dispatchRenderCallbacks(this.haveRenderCallbacks);
                for (const ve in H.updatedImages) this.patchUpdatedImage(this.iconPositions[ve], H.getImage(ve), oe), this.patchUpdatedImage(this.patternPositions[ve], H.getImage(ve), oe);
              }
              patchUpdatedImage(H, oe, ve) {
                if (!H || !oe || H.version === oe.version) return;
                H.version = oe.version;
                const [Oe, Xe] = H.tl;
                ve.update(oe.data, void 0, { x: Oe, y: Xe });
              }
            }
            var Hf;
            di("ImagePosition", p_), di("ImageAtlas", am), u.ai = void 0, (Hf = u.ai || (u.ai = {}))[Hf.none = 0] = "none", Hf[Hf.horizontal = 1] = "horizontal", Hf[Hf.vertical = 2] = "vertical", Hf[Hf.horizontalOnly = 3] = "horizontalOnly";
            const om = -17;
            class b1 {
              constructor() {
                this.scale = 1, this.fontStack = "", this.imageName = null;
              }
              static forText(H, oe) {
                const ve = new b1();
                return ve.scale = H || 1, ve.fontStack = oe, ve;
              }
              static forImage(H) {
                const oe = new b1();
                return oe.imageName = H, oe;
              }
            }
            class $p {
              constructor() {
                this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null;
              }
              static fromFeature(H, oe) {
                const ve = new $p();
                for (let Oe = 0; Oe < H.sections.length; Oe++) {
                  const Xe = H.sections[Oe];
                  Xe.image ? ve.addImageSection(Xe) : ve.addTextSection(Xe, oe);
                }
                return ve;
              }
              length() {
                return this.text.length;
              }
              getSection(H) {
                return this.sections[this.sectionIndex[H]];
              }
              getSectionIndex(H) {
                return this.sectionIndex[H];
              }
              getCharCode(H) {
                return this.text.charCodeAt(H);
              }
              verticalizePunctuation() {
                this.text = function(H) {
                  let oe = "";
                  for (let ve = 0; ve < H.length; ve++) {
                    const Oe = H.charCodeAt(ve + 1) || null, Xe = H.charCodeAt(ve - 1) || null;
                    Oe && bl(Oe) && !cy[H[ve + 1]] || Xe && bl(Xe) && !cy[H[ve - 1]] || !cy[H[ve]] ? oe += H[ve] : oe += cy[H[ve]];
                  }
                  return oe;
                }(this.text);
              }
              trim() {
                let H = 0;
                for (let ve = 0; ve < this.text.length && $h[this.text.charCodeAt(ve)]; ve++) H++;
                let oe = this.text.length;
                for (let ve = this.text.length - 1; ve >= 0 && ve >= H && $h[this.text.charCodeAt(ve)]; ve--) oe--;
                this.text = this.text.substring(H, oe), this.sectionIndex = this.sectionIndex.slice(H, oe);
              }
              substring(H, oe) {
                const ve = new $p();
                return ve.text = this.text.substring(H, oe), ve.sectionIndex = this.sectionIndex.slice(H, oe), ve.sections = this.sections, ve;
              }
              toString() {
                return this.text;
              }
              getMaxScale() {
                return this.sectionIndex.reduce((H, oe) => Math.max(H, this.sections[oe].scale), 0);
              }
              addTextSection(H, oe) {
                this.text += H.text, this.sections.push(b1.forText(H.scale, H.fontStack || oe));
                const ve = this.sections.length - 1;
                for (let Oe = 0; Oe < H.text.length; ++Oe) this.sectionIndex.push(ve);
              }
              addImageSection(H) {
                const oe = H.image ? H.image.name : "";
                if (oe.length === 0) return void T("Can't add FormattedSection with an empty image.");
                const ve = this.getNextImageSectionCharCode();
                ve ? (this.text += String.fromCharCode(ve), this.sections.push(b1.forImage(oe)), this.sectionIndex.push(this.sections.length - 1)) : T("Reached maximum number of images 6401");
              }
              getNextImageSectionCharCode() {
                return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
              }
            }
            function qp(J, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn) {
              const xn = $p.fromFeature(J, Oe);
              let Fn;
              Kt === u.ai.vertical && xn.verticalizePunctuation();
              const { processBidirectionalText: qn, processStyledBidirectionalText: vr } = il;
              if (qn && xn.sections.length === 1) {
                Fn = [];
                const jr = qn(xn.toString(), m_(xn, Nt, Xe, H, ve, hn));
                for (const oi of jr) {
                  const Ai = new $p();
                  Ai.text = oi, Ai.sections = xn.sections;
                  for (let Ui = 0; Ui < oi.length; Ui++) Ai.sectionIndex.push(0);
                  Fn.push(Ai);
                }
              } else if (vr) {
                Fn = [];
                const jr = vr(xn.text, xn.sectionIndex, m_(xn, Nt, Xe, H, ve, hn));
                for (const oi of jr) {
                  const Ai = new $p();
                  Ai.text = oi[0], Ai.sectionIndex = oi[1], Ai.sections = xn.sections, Fn.push(Ai);
                }
              } else Fn = function(jr, oi) {
                const Ai = [], Ui = jr.text;
                let _i = 0;
                for (const fi of oi) Ai.push(jr.substring(_i, fi)), _i = fi;
                return _i < Ui.length && Ai.push(jr.substring(_i, Ui.length)), Ai;
              }(xn, m_(xn, Nt, Xe, H, ve, hn));
              const rr = [], dr = { positionedLines: rr, text: xn.toString(), top: Vt[1], bottom: Vt[1], left: Vt[0], right: Vt[0], writingMode: Kt, iconsInText: !1, verticalizable: !1 };
              return function(jr, oi, Ai, Ui, _i, fi, Bi, Ei, ki, Gr, Di, Pi) {
                let Qi = 0, Ka = om, Ja = 0, Gs = 0;
                const mc = Ei === "right" ? 1 : Ei === "left" ? 0 : 0.5;
                let _l = 0;
                for (const Ss of _i) {
                  Ss.trim();
                  const fs = Ss.getMaxScale(), hu = (fs - 1) * jl, Ws = { positionedGlyphs: [], lineOffset: 0 };
                  jr.positionedLines[_l] = Ws;
                  const wl = Ws.positionedGlyphs;
                  let Au = 0;
                  if (!Ss.length()) {
                    Ka += fi, ++_l;
                    continue;
                  }
                  for (let $u = 0; $u < Ss.length(); $u++) {
                    const Ms = Ss.getSection($u), Gf = Ss.getSectionIndex($u), es = Ss.getCharCode($u);
                    let hs = 0, ds = null, ps = null, Yd = null, kf = jl;
                    const $l = !(ki === u.ai.horizontal || !Di && !$s(es) || Di && ($h[es] || Lc(es)));
                    if (Ms.imageName) {
                      const Wa = Ui[Ms.imageName];
                      if (!Wa) continue;
                      Yd = Ms.imageName, jr.iconsInText = jr.iconsInText || !0, ps = Wa.paddedRect;
                      const ts = Wa.displaySize;
                      Ms.scale = Ms.scale * jl / Pi, ds = { width: ts[0], height: ts[1], left: rf, top: -im, advance: $l ? ts[1] : ts[0] }, hs = hu + (jl - ts[1] * Ms.scale), kf = ds.advance;
                      const Wf = $l ? ts[0] * Ms.scale - jl * fs : ts[1] * Ms.scale - jl * fs;
                      Wf > 0 && Wf > Au && (Au = Wf);
                    } else {
                      const Wa = Ai[Ms.fontStack], ts = Wa && Wa[es];
                      if (ts && ts.rect) ps = ts.rect, ds = ts.metrics;
                      else {
                        const Wf = oi[Ms.fontStack], xh = Wf && Wf[es];
                        if (!xh) continue;
                        ds = xh.metrics;
                      }
                      hs = (fs - Ms.scale) * jl;
                    }
                    $l ? (jr.verticalizable = !0, wl.push({ glyph: es, imageName: Yd, x: Qi, y: Ka + hs, vertical: $l, scale: Ms.scale, fontStack: Ms.fontStack, sectionIndex: Gf, metrics: ds, rect: ps }), Qi += kf * Ms.scale + Gr) : (wl.push({ glyph: es, imageName: Yd, x: Qi, y: Ka + hs, vertical: $l, scale: Ms.scale, fontStack: Ms.fontStack, sectionIndex: Gf, metrics: ds, rect: ps }), Qi += ds.advance * Ms.scale + Gr);
                  }
                  if (wl.length !== 0) {
                    const $u = Qi - Gr;
                    Ja = Math.max($u, Ja), dy(wl, 0, wl.length - 1, mc, Au);
                  }
                  Qi = 0;
                  const gc = fi * fs + Au;
                  Ws.lineOffset = Math.max(Au, hu), Ka += gc, Gs = Math.max(gc, Gs), ++_l;
                }
                const ll = Ka - om, { horizontalAlign: rc, verticalAlign: Tu } = Hp(Bi);
                (function(Ss, fs, hu, Ws, wl, Au, gc, $u, Ms) {
                  const Gf = (fs - hu) * wl;
                  let es = 0;
                  es = Au !== gc ? -$u * Ws - om : (-Ws * Ms + 0.5) * gc;
                  for (const hs of Ss) for (const ds of hs.positionedGlyphs) ds.x += Gf, ds.y += es;
                })(jr.positionedLines, mc, rc, Tu, Ja, Gs, fi, ll, _i.length), jr.top += -Tu * ll, jr.bottom = jr.top + ll, jr.left += -rc * Ja, jr.right = jr.left + Ja;
              }(dr, H, oe, ve, Fn, rt, yt, Tt, Kt, Nt, an, kn), !function(jr) {
                for (const oi of jr) if (oi.positionedGlyphs.length !== 0) return !1;
                return !0;
              }(rr) && dr;
            }
            const $h = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, C5 = { 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 }, I5 = { 40: !0 };
            function D5(J, H, oe, ve, Oe, Xe) {
              if (H.imageName) {
                const rt = ve[H.imageName];
                return rt ? rt.displaySize[0] * H.scale * jl / Xe + Oe : 0;
              }
              {
                const rt = oe[H.fontStack], yt = rt && rt[J];
                return yt ? yt.metrics.advance * H.scale + Oe : 0;
              }
            }
            function L5(J, H, oe, ve) {
              const Oe = Math.pow(J - H, 2);
              return ve ? J < H ? Oe / 2 : 2 * Oe : Oe + Math.abs(oe) * oe;
            }
            function qA(J, H, oe) {
              let ve = 0;
              return J === 10 && (ve -= 1e4), oe && (ve += 150), J !== 40 && J !== 65288 || (ve += 50), H !== 41 && H !== 65289 || (ve += 50), ve;
            }
            function hy(J, H, oe, ve, Oe, Xe) {
              let rt = null, yt = L5(H, oe, Oe, Xe);
              for (const Tt of ve) {
                const Nt = L5(H - Tt.x, oe, Oe, Xe) + Tt.badness;
                Nt <= yt && (rt = Tt, yt = Nt);
              }
              return { index: J, x: H, priorBreak: rt, badness: yt };
            }
            function A2(J) {
              return J ? A2(J.priorBreak).concat(J.index) : [];
            }
            function m_(J, H, oe, ve, Oe, Xe) {
              if (!J) return [];
              const rt = [], yt = function(Kt, an, hn, kn, xn, Fn) {
                let qn = 0;
                for (let vr = 0; vr < Kt.length(); vr++) {
                  const rr = Kt.getSection(vr);
                  qn += D5(Kt.getCharCode(vr), rr, kn, xn, an, Fn);
                }
                return qn / Math.max(1, Math.ceil(qn / hn));
              }(J, H, oe, ve, Oe, Xe), Tt = J.text.indexOf("​") >= 0;
              let Nt = 0;
              for (let Kt = 0; Kt < J.length(); Kt++) {
                const an = J.getSection(Kt), hn = J.getCharCode(Kt);
                if ($h[hn] || (Nt += D5(hn, an, ve, Oe, H, Xe)), Kt < J.length() - 1) {
                  const kn = !((Vt = hn) < 11904 || !(li["Bopomofo Extended"](Vt) || li.Bopomofo(Vt) || li["CJK Compatibility Forms"](Vt) || li["CJK Compatibility Ideographs"](Vt) || li["CJK Compatibility"](Vt) || li["CJK Radicals Supplement"](Vt) || li["CJK Strokes"](Vt) || li["CJK Symbols and Punctuation"](Vt) || li["CJK Unified Ideographs Extension A"](Vt) || li["CJK Unified Ideographs"](Vt) || li["Enclosed CJK Letters and Months"](Vt) || li["Halfwidth and Fullwidth Forms"](Vt) || li.Hiragana(Vt) || li["Ideographic Description Characters"](Vt) || li["Kangxi Radicals"](Vt) || li["Katakana Phonetic Extensions"](Vt) || li.Katakana(Vt) || li["Vertical Forms"](Vt) || li["Yi Radicals"](Vt) || li["Yi Syllables"](Vt)));
                  (C5[hn] || kn || an.imageName || Kt !== J.length() - 2 && I5[J.getCharCode(Kt + 1)]) && rt.push(hy(Kt + 1, Nt, yt, rt, qA(hn, J.getCharCode(Kt + 1), kn && Tt), !1));
                }
              }
              var Vt;
              return A2(hy(J.length(), Nt, yt, rt, 0, !0));
            }
            function Hp(J) {
              let H = 0.5, oe = 0.5;
              switch (J) {
                case "right":
                case "top-right":
                case "bottom-right":
                  H = 1;
                  break;
                case "left":
                case "top-left":
                case "bottom-left":
                  H = 0;
              }
              switch (J) {
                case "bottom":
                case "bottom-right":
                case "bottom-left":
                  oe = 1;
                  break;
                case "top":
                case "top-right":
                case "top-left":
                  oe = 0;
              }
              return { horizontalAlign: H, verticalAlign: oe };
            }
            function dy(J, H, oe, ve, Oe) {
              if (!ve && !Oe) return;
              const Xe = J[oe], rt = Xe.metrics.advance * Xe.scale, yt = (J[oe].x + rt) * ve;
              for (let Tt = H; Tt <= oe; Tt++) J[Tt].x -= yt, J[Tt].y += Oe;
            }
            function ao(J, H, oe) {
              const { horizontalAlign: ve, verticalAlign: Oe } = Hp(oe), Xe = H[0], rt = H[1], yt = Xe - J.displaySize[0] * ve, Tt = yt + J.displaySize[0], Nt = rt - J.displaySize[1] * Oe;
              return { image: J, top: Nt, bottom: Nt + J.displaySize[1], left: yt, right: Tt };
            }
            function P5(J) {
              var H, oe;
              let ve = J.left, Oe = J.top, Xe = J.right - ve, rt = J.bottom - Oe;
              const yt = J.image.content[2] - J.image.content[0], Tt = J.image.content[3] - J.image.content[1], Nt = (H = J.image.textFitWidth) !== null && H !== void 0 ? H : "stretchOrShrink", Vt = (oe = J.image.textFitHeight) !== null && oe !== void 0 ? oe : "stretchOrShrink", Kt = yt / Tt;
              if (Vt === "proportional") {
                if (Nt === "stretchOnly" && Xe / rt < Kt || Nt === "proportional") {
                  const an = Math.ceil(rt * Kt);
                  ve *= an / Xe, Xe = an;
                }
              } else if (Nt === "proportional" && Vt === "stretchOnly" && Kt !== 0 && Xe / rt > Kt) {
                const an = Math.ceil(Xe / Kt);
                Oe *= an / rt, rt = an;
              }
              return { x1: ve, y1: Oe, x2: ve + Xe, y2: Oe + rt };
            }
            function S2(J, H, oe, ve, Oe, Xe) {
              const rt = J.image;
              let yt;
              if (rt.content) {
                const Fn = rt.content, qn = rt.pixelRatio || 1;
                yt = [Fn[0] / qn, Fn[1] / qn, rt.displaySize[0] - Fn[2] / qn, rt.displaySize[1] - Fn[3] / qn];
              }
              const Tt = H.left * Xe, Nt = H.right * Xe;
              let Vt, Kt, an, hn;
              oe === "width" || oe === "both" ? (hn = Oe[0] + Tt - ve[3], Kt = Oe[0] + Nt + ve[1]) : (hn = Oe[0] + (Tt + Nt - rt.displaySize[0]) / 2, Kt = hn + rt.displaySize[0]);
              const kn = H.top * Xe, xn = H.bottom * Xe;
              return oe === "height" || oe === "both" ? (Vt = Oe[1] + kn - ve[0], an = Oe[1] + xn + ve[2]) : (Vt = Oe[1] + (kn + xn - rt.displaySize[1]) / 2, an = Vt + rt.displaySize[1]), { image: rt, top: Vt, right: Kt, bottom: an, left: hn, collisionPadding: yt };
            }
            const fd = 255, hd = 128, Gp = fd * hd;
            function O5(J, H) {
              const { expression: oe } = H;
              if (oe.kind === "constant") return { kind: "constant", layoutSize: oe.evaluate(new ni(J + 1)) };
              if (oe.kind === "source") return { kind: "source" };
              {
                const { zoomStops: ve, interpolationType: Oe } = oe;
                let Xe = 0;
                for (; Xe < ve.length && ve[Xe] <= J; ) Xe++;
                Xe = Math.max(0, Xe - 1);
                let rt = Xe;
                for (; rt < ve.length && ve[rt] < J + 1; ) rt++;
                rt = Math.min(ve.length - 1, rt);
                const yt = ve[Xe], Tt = ve[rt];
                return oe.kind === "composite" ? { kind: "composite", minZoom: yt, maxZoom: Tt, interpolationType: Oe } : { kind: "camera", minZoom: yt, maxZoom: Tt, minSize: oe.evaluate(new ni(yt)), maxSize: oe.evaluate(new ni(Tt)), interpolationType: Oe };
              }
            }
            function g_(J, H, oe) {
              let ve = "never";
              const Oe = J.get(H);
              return Oe ? ve = Oe : J.get(oe) && (ve = "always"), ve;
            }
            const HA = jp.VectorTileFeature.types, GA = [{ name: "a_fade_opacity", components: 1, type: "Uint8", offset: 0 }];
            function M2(J, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an) {
              const hn = yt ? Math.min(Gp, Math.round(yt[0])) : 0, kn = yt ? Math.min(Gp, Math.round(yt[1])) : 0;
              J.emplaceBack(H, oe, Math.round(32 * ve), Math.round(32 * Oe), Xe, rt, (hn << 1) + (Tt ? 1 : 0), kn, 16 * Nt, 16 * Vt, 256 * Kt, 256 * an);
            }
            function E2(J, H, oe) {
              J.emplaceBack(H.x, H.y, oe), J.emplaceBack(H.x, H.y, oe), J.emplaceBack(H.x, H.y, oe), J.emplaceBack(H.x, H.y, oe);
            }
            function z5(J) {
              for (const H of J.sections) if (Na(H.text)) return !0;
              return !1;
            }
            class C2 {
              constructor(H) {
                this.layoutVertexArray = new wa(), this.indexArray = new ca(), this.programConfigurations = H, this.segments = new pa(), this.dynamicLayoutVertexArray = new uo(), this.opacityVertexArray = new no(), this.hasVisibleVertices = !1, this.placedSymbolArray = new kr();
              }
              isEmpty() {
                return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
              }
              upload(H, oe, ve, Oe) {
                this.isEmpty() || (ve && (this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, nc.members), this.indexBuffer = H.createIndexBuffer(this.indexArray, oe), this.dynamicLayoutVertexBuffer = H.createVertexBuffer(this.dynamicLayoutVertexArray, x2.members, !0), this.opacityVertexBuffer = H.createVertexBuffer(this.opacityVertexArray, GA, !0), this.opacityVertexBuffer.itemSize = 1), (ve || Oe) && this.programConfigurations.upload(H));
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
              }
            }
            di("SymbolBuffers", C2);
            class I2 {
              constructor(H, oe, ve) {
                this.layoutVertexArray = new H(), this.layoutAttributes = oe, this.indexArray = new ve(), this.segments = new pa(), this.collisionVertexArray = new Ia();
              }
              upload(H) {
                this.layoutVertexBuffer = H.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = H.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = H.createVertexBuffer(this.collisionVertexArray, b2.members, !0);
              }
              destroy() {
                this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
              }
            }
            di("CollisionBuffers", I2);
            class Hd {
              constructor(H) {
                this.collisionBoxArray = H.collisionBoxArray, this.zoom = H.zoom, this.overscaling = H.overscaling, this.layers = H.layers, this.layerIds = this.layers.map((yt) => yt.id), this.index = H.index, this.pixelRatio = H.pixelRatio, this.sourceLayerIndex = H.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [], this.placementInvProjMatrix = Qb([]), this.placementViewportMatrix = Qb([]);
                const oe = this.layers[0]._unevaluatedLayout._values;
                this.textSizeData = O5(this.zoom, oe["text-size"]), this.iconSizeData = O5(this.zoom, oe["icon-size"]);
                const ve = this.layers[0].layout, Oe = ve.get("symbol-sort-key"), Xe = ve.get("symbol-z-order");
                this.canOverlap = g_(ve, "text-overlap", "text-allow-overlap") !== "never" || g_(ve, "icon-overlap", "icon-allow-overlap") !== "never" || ve.get("text-ignore-placement") || ve.get("icon-ignore-placement"), this.sortFeaturesByKey = Xe !== "viewport-y" && !Oe.isConstant();
                const rt = Xe === "viewport-y" || Xe === "auto" && !this.sortFeaturesByKey;
                this.sortFeaturesByY = rt && this.canOverlap, ve.get("symbol-placement") === "point" && (this.writingModes = ve.get("text-writing-mode").map((yt) => u.ai[yt])), this.stateDependentLayerIds = this.layers.filter((yt) => yt.isStateDependent()).map((yt) => yt.id), this.sourceID = H.sourceID;
              }
              createArrays() {
                this.text = new C2(new _u(this.layers, this.zoom, (H) => /^text/.test(H))), this.icon = new C2(new _u(this.layers, this.zoom, (H) => /^icon/.test(H))), this.glyphOffsetArray = new fr(), this.lineVertexArray = new Or(), this.symbolInstances = new Mr(), this.textAnchorOffsets = new Nr();
              }
              calculateGlyphDependencies(H, oe, ve, Oe, Xe) {
                for (let rt = 0; rt < H.length; rt++) if (oe[H.charCodeAt(rt)] = !0, (ve || Oe) && Xe) {
                  const yt = cy[H.charAt(rt)];
                  yt && (oe[yt.charCodeAt(0)] = !0);
                }
              }
              populate(H, oe, ve) {
                const Oe = this.layers[0], Xe = Oe.layout, rt = Xe.get("text-font"), yt = Xe.get("text-field"), Tt = Xe.get("icon-image"), Nt = (yt.value.kind !== "constant" || yt.value.value instanceof Cn && !yt.value.value.isEmpty() || yt.value.value.toString().length > 0) && (rt.value.kind !== "constant" || rt.value.value.length > 0), Vt = Tt.value.kind !== "constant" || !!Tt.value.value || Object.keys(Tt.parameters).length > 0, Kt = Xe.get("symbol-sort-key");
                if (this.features = [], !Nt && !Vt) return;
                const an = oe.iconDependencies, hn = oe.glyphDependencies, kn = oe.availableImages, xn = new ni(this.zoom);
                for (const { feature: Fn, id: qn, index: vr, sourceLayerIndex: rr } of H) {
                  const dr = Oe._featureFilter.needGeometry, jr = J0(Fn, dr);
                  if (!Oe._featureFilter.filter(xn, jr, ve)) continue;
                  let oi, Ai;
                  if (dr || (jr.geometry = cd(Fn)), Nt) {
                    const fi = Oe.getValueAndResolveTokens("text-field", jr, ve, kn), Bi = Cn.factory(fi), Ei = this.hasRTLText = this.hasRTLText || z5(Bi);
                    (!Ei || il.getRTLTextPluginStatus() === "unavailable" || Ei && il.isParsed()) && (oi = _5(Bi, Oe, jr));
                  }
                  if (Vt) {
                    const fi = Oe.getValueAndResolveTokens("icon-image", jr, ve, kn);
                    Ai = fi instanceof Pn ? fi : Pn.fromString(fi);
                  }
                  if (!oi && !Ai) continue;
                  const Ui = this.sortFeaturesByKey ? Kt.evaluate(jr, {}, ve) : void 0, _i = { id: qn, text: oi, icon: Ai, index: vr, sourceLayerIndex: rr, geometry: jr.geometry, properties: Fn.properties, type: HA[Fn.type], sortKey: Ui };
                  if (this.features.push(_i), Ai && (an[Ai.name] = !0), oi) {
                    const fi = rt.evaluate(jr, {}, ve).join(","), Bi = Xe.get("text-rotation-alignment") !== "viewport" && Xe.get("symbol-placement") !== "point";
                    this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(u.ai.vertical) >= 0;
                    for (const Ei of oi.sections) if (Ei.image) an[Ei.image.name] = !0;
                    else {
                      const ki = ls(oi.toString()), Gr = Ei.fontStack || fi, Di = hn[Gr] = hn[Gr] || {};
                      this.calculateGlyphDependencies(Ei.text, Di, Bi, this.allowVerticalPlacement, ki);
                    }
                  }
                }
                Xe.get("symbol-placement") === "line" && (this.features = function(Fn) {
                  const qn = {}, vr = {}, rr = [];
                  let dr = 0;
                  function jr(_i) {
                    rr.push(Fn[_i]), dr++;
                  }
                  function oi(_i, fi, Bi) {
                    const Ei = vr[_i];
                    return delete vr[_i], vr[fi] = Ei, rr[Ei].geometry[0].pop(), rr[Ei].geometry[0] = rr[Ei].geometry[0].concat(Bi[0]), Ei;
                  }
                  function Ai(_i, fi, Bi) {
                    const Ei = qn[fi];
                    return delete qn[fi], qn[_i] = Ei, rr[Ei].geometry[0].shift(), rr[Ei].geometry[0] = Bi[0].concat(rr[Ei].geometry[0]), Ei;
                  }
                  function Ui(_i, fi, Bi) {
                    const Ei = Bi ? fi[0][fi[0].length - 1] : fi[0][0];
                    return `${_i}:${Ei.x}:${Ei.y}`;
                  }
                  for (let _i = 0; _i < Fn.length; _i++) {
                    const fi = Fn[_i], Bi = fi.geometry, Ei = fi.text ? fi.text.toString() : null;
                    if (!Ei) {
                      jr(_i);
                      continue;
                    }
                    const ki = Ui(Ei, Bi), Gr = Ui(Ei, Bi, !0);
                    if (ki in vr && Gr in qn && vr[ki] !== qn[Gr]) {
                      const Di = Ai(ki, Gr, Bi), Pi = oi(ki, Gr, rr[Di].geometry);
                      delete qn[ki], delete vr[Gr], vr[Ui(Ei, rr[Pi].geometry, !0)] = Pi, rr[Di].geometry = null;
                    } else ki in vr ? oi(ki, Gr, Bi) : Gr in qn ? Ai(ki, Gr, Bi) : (jr(_i), qn[ki] = dr - 1, vr[Gr] = dr - 1);
                  }
                  return rr.filter((_i) => _i.geometry);
                }(this.features)), this.sortFeaturesByKey && this.features.sort((Fn, qn) => Fn.sortKey - qn.sortKey);
              }
              update(H, oe, ve) {
                this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(H, oe, this.layers, ve), this.icon.programConfigurations.updatePaintArrays(H, oe, this.layers, ve));
              }
              isEmpty() {
                return this.symbolInstances.length === 0 && !this.hasRTLText;
              }
              uploadPending() {
                return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;
              }
              upload(H) {
                !this.uploaded && this.hasDebugData() && (this.textCollisionBox.upload(H), this.iconCollisionBox.upload(H)), this.text.upload(H, this.sortFeaturesByY, !this.uploaded, this.text.programConfigurations.needsUpload), this.icon.upload(H, this.sortFeaturesByY, !this.uploaded, this.icon.programConfigurations.needsUpload), this.uploaded = !0;
              }
              destroyDebugData() {
                this.textCollisionBox.destroy(), this.iconCollisionBox.destroy();
              }
              destroy() {
                this.text.destroy(), this.icon.destroy(), this.hasDebugData() && this.destroyDebugData();
              }
              addToLineVertexArray(H, oe) {
                const ve = this.lineVertexArray.length;
                if (H.segment !== void 0) {
                  let Oe = H.dist(oe[H.segment + 1]), Xe = H.dist(oe[H.segment]);
                  const rt = {};
                  for (let yt = H.segment + 1; yt < oe.length; yt++) rt[yt] = { x: oe[yt].x, y: oe[yt].y, tileUnitDistanceFromAnchor: Oe }, yt < oe.length - 1 && (Oe += oe[yt + 1].dist(oe[yt]));
                  for (let yt = H.segment || 0; yt >= 0; yt--) rt[yt] = { x: oe[yt].x, y: oe[yt].y, tileUnitDistanceFromAnchor: Xe }, yt > 0 && (Xe += oe[yt - 1].dist(oe[yt]));
                  for (let yt = 0; yt < oe.length; yt++) {
                    const Tt = rt[yt];
                    this.lineVertexArray.emplaceBack(Tt.x, Tt.y, Tt.tileUnitDistanceFromAnchor);
                  }
                }
                return { lineStartIndex: ve, lineLength: this.lineVertexArray.length - ve };
              }
              addSymbols(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an) {
                const hn = H.indexArray, kn = H.layoutVertexArray, xn = H.segments.prepareSegment(4 * oe.length, kn, hn, this.canOverlap ? rt.sortKey : void 0), Fn = this.glyphOffsetArray.length, qn = xn.vertexLength, vr = this.allowVerticalPlacement && yt === u.ai.vertical ? Math.PI / 2 : 0, rr = rt.text && rt.text.sections;
                for (let dr = 0; dr < oe.length; dr++) {
                  const { tl: jr, tr: oi, bl: Ai, br: Ui, tex: _i, pixelOffsetTL: fi, pixelOffsetBR: Bi, minFontScaleX: Ei, minFontScaleY: ki, glyphOffset: Gr, isSDF: Di, sectionIndex: Pi } = oe[dr], Qi = xn.vertexLength, Ka = Gr[1];
                  M2(kn, Tt.x, Tt.y, jr.x, Ka + jr.y, _i.x, _i.y, ve, Di, fi.x, fi.y, Ei, ki), M2(kn, Tt.x, Tt.y, oi.x, Ka + oi.y, _i.x + _i.w, _i.y, ve, Di, Bi.x, fi.y, Ei, ki), M2(kn, Tt.x, Tt.y, Ai.x, Ka + Ai.y, _i.x, _i.y + _i.h, ve, Di, fi.x, Bi.y, Ei, ki), M2(kn, Tt.x, Tt.y, Ui.x, Ka + Ui.y, _i.x + _i.w, _i.y + _i.h, ve, Di, Bi.x, Bi.y, Ei, ki), E2(H.dynamicLayoutVertexArray, Tt, vr), hn.emplaceBack(Qi, Qi + 1, Qi + 2), hn.emplaceBack(Qi + 1, Qi + 2, Qi + 3), xn.vertexLength += 4, xn.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(Gr[0]), dr !== oe.length - 1 && Pi === oe[dr + 1].sectionIndex || H.programConfigurations.populatePaintArrays(kn.length, rt, rt.index, {}, an, rr && rr[Pi]);
                }
                H.placedSymbolArray.emplaceBack(Tt.x, Tt.y, Fn, this.glyphOffsetArray.length - Fn, qn, Nt, Vt, Tt.segment, ve ? ve[0] : 0, ve ? ve[1] : 0, Oe[0], Oe[1], yt, 0, !1, 0, Kt);
              }
              _addCollisionDebugVertex(H, oe, ve, Oe, Xe, rt) {
                return oe.emplaceBack(0, 0), H.emplaceBack(ve.x, ve.y, Oe, Xe, Math.round(rt.x), Math.round(rt.y));
              }
              addCollisionDebugVertices(H, oe, ve, Oe, Xe, rt, yt) {
                const Tt = Xe.segments.prepareSegment(4, Xe.layoutVertexArray, Xe.indexArray), Nt = Tt.vertexLength, Vt = Xe.layoutVertexArray, Kt = Xe.collisionVertexArray, an = yt.anchorX, hn = yt.anchorY;
                this._addCollisionDebugVertex(Vt, Kt, rt, an, hn, new d(H, oe)), this._addCollisionDebugVertex(Vt, Kt, rt, an, hn, new d(ve, oe)), this._addCollisionDebugVertex(Vt, Kt, rt, an, hn, new d(ve, Oe)), this._addCollisionDebugVertex(Vt, Kt, rt, an, hn, new d(H, Oe)), Tt.vertexLength += 4;
                const kn = Xe.indexArray;
                kn.emplaceBack(Nt, Nt + 1), kn.emplaceBack(Nt + 1, Nt + 2), kn.emplaceBack(Nt + 2, Nt + 3), kn.emplaceBack(Nt + 3, Nt), Tt.primitiveLength += 4;
              }
              addDebugCollisionBoxes(H, oe, ve, Oe) {
                for (let Xe = H; Xe < oe; Xe++) {
                  const rt = this.collisionBoxArray.get(Xe), yt = rt.x1, Tt = rt.y1, Nt = rt.x2, Vt = rt.y2;
                  this.addCollisionDebugVertices(yt, Tt, Nt, Vt, Oe ? this.textCollisionBox : this.iconCollisionBox, rt.anchorPoint, ve);
                }
              }
              generateCollisionDebugBuffers() {
                this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new I2(Ko, zc.members, Ga), this.iconCollisionBox = new I2(Ko, zc.members, Ga);
                for (let H = 0; H < this.symbolInstances.length; H++) {
                  const oe = this.symbolInstances.get(H);
                  this.addDebugCollisionBoxes(oe.textBoxStartIndex, oe.textBoxEndIndex, oe, !0), this.addDebugCollisionBoxes(oe.verticalTextBoxStartIndex, oe.verticalTextBoxEndIndex, oe, !0), this.addDebugCollisionBoxes(oe.iconBoxStartIndex, oe.iconBoxEndIndex, oe, !1), this.addDebugCollisionBoxes(oe.verticalIconBoxStartIndex, oe.verticalIconBoxEndIndex, oe, !1);
                }
              }
              _deserializeCollisionBoxesForSymbol(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt) {
                const Vt = {};
                for (let Kt = oe; Kt < ve; Kt++) {
                  const an = H.get(Kt);
                  Vt.textBox = { x1: an.x1, y1: an.y1, x2: an.x2, y2: an.y2, anchorPointX: an.anchorPointX, anchorPointY: an.anchorPointY }, Vt.textFeatureIndex = an.featureIndex;
                  break;
                }
                for (let Kt = Oe; Kt < Xe; Kt++) {
                  const an = H.get(Kt);
                  Vt.verticalTextBox = { x1: an.x1, y1: an.y1, x2: an.x2, y2: an.y2, anchorPointX: an.anchorPointX, anchorPointY: an.anchorPointY }, Vt.verticalTextFeatureIndex = an.featureIndex;
                  break;
                }
                for (let Kt = rt; Kt < yt; Kt++) {
                  const an = H.get(Kt);
                  Vt.iconBox = { x1: an.x1, y1: an.y1, x2: an.x2, y2: an.y2, anchorPointX: an.anchorPointX, anchorPointY: an.anchorPointY }, Vt.iconFeatureIndex = an.featureIndex;
                  break;
                }
                for (let Kt = Tt; Kt < Nt; Kt++) {
                  const an = H.get(Kt);
                  Vt.verticalIconBox = { x1: an.x1, y1: an.y1, x2: an.x2, y2: an.y2, anchorPointX: an.anchorPointX, anchorPointY: an.anchorPointY }, Vt.verticalIconFeatureIndex = an.featureIndex;
                  break;
                }
                return Vt;
              }
              deserializeCollisionBoxes(H) {
                this.collisionArrays = [];
                for (let oe = 0; oe < this.symbolInstances.length; oe++) {
                  const ve = this.symbolInstances.get(oe);
                  this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(H, ve.textBoxStartIndex, ve.textBoxEndIndex, ve.verticalTextBoxStartIndex, ve.verticalTextBoxEndIndex, ve.iconBoxStartIndex, ve.iconBoxEndIndex, ve.verticalIconBoxStartIndex, ve.verticalIconBoxEndIndex));
                }
              }
              hasTextData() {
                return this.text.segments.get().length > 0;
              }
              hasIconData() {
                return this.icon.segments.get().length > 0;
              }
              hasDebugData() {
                return this.textCollisionBox && this.iconCollisionBox;
              }
              hasTextCollisionBoxData() {
                return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;
              }
              hasIconCollisionBoxData() {
                return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;
              }
              addIndicesForPlacedSymbol(H, oe) {
                const ve = H.placedSymbolArray.get(oe), Oe = ve.vertexStartIndex + 4 * ve.numGlyphs;
                for (let Xe = ve.vertexStartIndex; Xe < Oe; Xe += 4) H.indexArray.emplaceBack(Xe, Xe + 1, Xe + 2), H.indexArray.emplaceBack(Xe + 1, Xe + 2, Xe + 3);
              }
              getSortedSymbolIndexes(H) {
                if (this.sortedAngle === H && this.symbolInstanceIndexes !== void 0) return this.symbolInstanceIndexes;
                const oe = Math.sin(H), ve = Math.cos(H), Oe = [], Xe = [], rt = [];
                for (let yt = 0; yt < this.symbolInstances.length; ++yt) {
                  rt.push(yt);
                  const Tt = this.symbolInstances.get(yt);
                  Oe.push(0 | Math.round(oe * Tt.anchorX + ve * Tt.anchorY)), Xe.push(Tt.featureIndex);
                }
                return rt.sort((yt, Tt) => Oe[yt] - Oe[Tt] || Xe[Tt] - Xe[yt]), rt;
              }
              addToSortKeyRanges(H, oe) {
                const ve = this.sortKeyRanges[this.sortKeyRanges.length - 1];
                ve && ve.sortKey === oe ? ve.symbolInstanceEnd = H + 1 : this.sortKeyRanges.push({ sortKey: oe, symbolInstanceStart: H, symbolInstanceEnd: H + 1 });
              }
              sortFeatures(H) {
                if (this.sortFeaturesByY && this.sortedAngle !== H && !(this.text.segments.get().length > 1 || this.icon.segments.get().length > 1)) {
                  this.symbolInstanceIndexes = this.getSortedSymbolIndexes(H), this.sortedAngle = H, this.text.indexArray.clear(), this.icon.indexArray.clear(), this.featureSortOrder = [];
                  for (const oe of this.symbolInstanceIndexes) {
                    const ve = this.symbolInstances.get(oe);
                    this.featureSortOrder.push(ve.featureIndex), [ve.rightJustifiedTextSymbolIndex, ve.centerJustifiedTextSymbolIndex, ve.leftJustifiedTextSymbolIndex].forEach((Oe, Xe, rt) => {
                      Oe >= 0 && rt.indexOf(Oe) === Xe && this.addIndicesForPlacedSymbol(this.text, Oe);
                    }), ve.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, ve.verticalPlacedTextSymbolIndex), ve.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, ve.placedIconSymbolIndex), ve.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, ve.verticalPlacedIconSymbolIndex);
                  }
                  this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray);
                }
              }
            }
            let Wp;
            di("SymbolBucket", Hd, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), Hd.MAX_GLYPHS = 65535, Hd.addDynamicAttributes = E2;
            let D2;
            var Yp = { get paint() {
              return D2 = D2 || new bt({ "icon-opacity": new ci(pe.paint_symbol["icon-opacity"]), "icon-color": new ci(pe.paint_symbol["icon-color"]), "icon-halo-color": new ci(pe.paint_symbol["icon-halo-color"]), "icon-halo-width": new ci(pe.paint_symbol["icon-halo-width"]), "icon-halo-blur": new ci(pe.paint_symbol["icon-halo-blur"]), "icon-translate": new bi(pe.paint_symbol["icon-translate"]), "icon-translate-anchor": new bi(pe.paint_symbol["icon-translate-anchor"]), "text-opacity": new ci(pe.paint_symbol["text-opacity"]), "text-color": new ci(pe.paint_symbol["text-color"], { runtimeType: Be, getOverride: (J) => J.textColor, hasOverride: (J) => !!J.textColor }), "text-halo-color": new ci(pe.paint_symbol["text-halo-color"]), "text-halo-width": new ci(pe.paint_symbol["text-halo-width"]), "text-halo-blur": new ci(pe.paint_symbol["text-halo-blur"]), "text-translate": new bi(pe.paint_symbol["text-translate"]), "text-translate-anchor": new bi(pe.paint_symbol["text-translate-anchor"]) });
            }, get layout() {
              return Wp = Wp || new bt({ "symbol-placement": new bi(pe.layout_symbol["symbol-placement"]), "symbol-spacing": new bi(pe.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new bi(pe.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new ci(pe.layout_symbol["symbol-sort-key"]), "symbol-z-order": new bi(pe.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new bi(pe.layout_symbol["icon-allow-overlap"]), "icon-overlap": new bi(pe.layout_symbol["icon-overlap"]), "icon-ignore-placement": new bi(pe.layout_symbol["icon-ignore-placement"]), "icon-optional": new bi(pe.layout_symbol["icon-optional"]), "icon-rotation-alignment": new bi(pe.layout_symbol["icon-rotation-alignment"]), "icon-size": new ci(pe.layout_symbol["icon-size"]), "icon-text-fit": new bi(pe.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new bi(pe.layout_symbol["icon-text-fit-padding"]), "icon-image": new ci(pe.layout_symbol["icon-image"]), "icon-rotate": new ci(pe.layout_symbol["icon-rotate"]), "icon-padding": new ci(pe.layout_symbol["icon-padding"]), "icon-keep-upright": new bi(pe.layout_symbol["icon-keep-upright"]), "icon-offset": new ci(pe.layout_symbol["icon-offset"]), "icon-anchor": new ci(pe.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new bi(pe.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new bi(pe.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new bi(pe.layout_symbol["text-rotation-alignment"]), "text-field": new ci(pe.layout_symbol["text-field"]), "text-font": new ci(pe.layout_symbol["text-font"]), "text-size": new ci(pe.layout_symbol["text-size"]), "text-max-width": new ci(pe.layout_symbol["text-max-width"]), "text-line-height": new bi(pe.layout_symbol["text-line-height"]), "text-letter-spacing": new ci(pe.layout_symbol["text-letter-spacing"]), "text-justify": new ci(pe.layout_symbol["text-justify"]), "text-radial-offset": new ci(pe.layout_symbol["text-radial-offset"]), "text-variable-anchor": new bi(pe.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new ci(pe.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new ci(pe.layout_symbol["text-anchor"]), "text-max-angle": new bi(pe.layout_symbol["text-max-angle"]), "text-writing-mode": new bi(pe.layout_symbol["text-writing-mode"]), "text-rotate": new ci(pe.layout_symbol["text-rotate"]), "text-padding": new bi(pe.layout_symbol["text-padding"]), "text-keep-upright": new bi(pe.layout_symbol["text-keep-upright"]), "text-transform": new ci(pe.layout_symbol["text-transform"]), "text-offset": new ci(pe.layout_symbol["text-offset"]), "text-allow-overlap": new bi(pe.layout_symbol["text-allow-overlap"]), "text-overlap": new bi(pe.layout_symbol["text-overlap"]), "text-ignore-placement": new bi(pe.layout_symbol["text-ignore-placement"]), "text-optional": new bi(pe.layout_symbol["text-optional"]) });
            } };
            class y_ {
              constructor(H) {
                if (H.property.overrides === void 0) throw new Error("overrides must be provided to instantiate FormatSectionOverride class");
                this.type = H.property.overrides ? H.property.overrides.runtimeType : je, this.defaultValue = H;
              }
              evaluate(H) {
                if (H.formattedSection) {
                  const oe = this.defaultValue.property.overrides;
                  if (oe && oe.hasOverride(H.formattedSection)) return oe.getOverride(H.formattedSection);
                }
                return H.feature && H.featureState ? this.defaultValue.evaluate(H.feature, H.featureState) : this.defaultValue.property.specification.default;
              }
              eachChild(H) {
                this.defaultValue.isConstant() || H(this.defaultValue.value._styleExpression.expression);
              }
              outputDefined() {
                return !1;
              }
              serialize() {
                return null;
              }
            }
            di("FormatSectionOverride", y_, { omit: ["defaultValue"] });
            class zs extends Qe {
              constructor(H) {
                super(H, Yp);
              }
              recalculate(H, oe) {
                if (super.recalculate(H, oe), this.layout.get("icon-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["icon-rotation-alignment"] = "map" : this.layout._values["icon-rotation-alignment"] = "viewport"), this.layout.get("text-rotation-alignment") === "auto" && (this.layout.get("symbol-placement") !== "point" ? this.layout._values["text-rotation-alignment"] = "map" : this.layout._values["text-rotation-alignment"] = "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") {
                  const ve = this.layout.get("text-writing-mode");
                  if (ve) {
                    const Oe = [];
                    for (const Xe of ve) Oe.indexOf(Xe) < 0 && Oe.push(Xe);
                    this.layout._values["text-writing-mode"] = Oe;
                  } else this.layout._values["text-writing-mode"] = ["horizontal"];
                }
                this._setPaintOverrides();
              }
              getValueAndResolveTokens(H, oe, ve, Oe) {
                const Xe = this.layout.get(H).evaluate(oe, {}, ve, Oe), rt = this._unevaluatedLayout._values[H];
                return rt.isDataDriven() || An(rt.value) || !Xe ? Xe : function(yt, Tt) {
                  return Tt.replace(/{([^{}]+)}/g, (Nt, Vt) => yt && Vt in yt ? String(yt[Vt]) : "");
                }(oe.properties, Xe);
              }
              createBucket(H) {
                return new Hd(H);
              }
              queryRadius() {
                return 0;
              }
              queryIntersectsFeature() {
                throw new Error("Should take a different path in FeatureIndex");
              }
              _setPaintOverrides() {
                for (const H of Yp.paint.overridableProperties) {
                  if (!zs.hasPaintOverride(this.layout, H)) continue;
                  const oe = this.paint.get(H), ve = new y_(oe), Oe = new Nu(ve, oe.property.specification);
                  let Xe = null;
                  Xe = oe.value.kind === "constant" || oe.value.kind === "source" ? new Io("source", Oe) : new Ku("composite", Oe, oe.value.zoomStops), this.paint._values[H] = new na(oe.property, Xe, oe.parameters);
                }
              }
              _handleOverridablePaintPropertyUpdate(H, oe, ve) {
                return !(!this.layout || oe.isDataDriven() || ve.isDataDriven()) && zs.hasPaintOverride(this.layout, H);
              }
              static hasPaintOverride(H, oe) {
                const ve = H.get("text-field"), Oe = Yp.paint.properties[oe];
                let Xe = !1;
                const rt = (yt) => {
                  for (const Tt of yt) if (Oe.overrides && Oe.overrides.hasOverride(Tt)) return void (Xe = !0);
                };
                if (ve.value.kind === "constant" && ve.value.value instanceof Cn) rt(ve.value.value.sections);
                else if (ve.value.kind === "source") {
                  const yt = (Nt) => {
                    if (!Xe) if (Nt instanceof Kn && _n(Nt.value) === ft) {
                      const Vt = Nt.value;
                      rt(Vt.sections);
                    } else Nt instanceof Er ? rt(Nt.sections) : Nt.eachChild(yt);
                  }, Tt = ve.value;
                  Tt._styleExpression && yt(Tt._styleExpression.expression);
                }
                return Xe;
              }
            }
            let v_;
            var Qo = { get paint() {
              return v_ = v_ || new bt({ "background-color": new bi(pe.paint_background["background-color"]), "background-pattern": new Pe(pe.paint_background["background-pattern"]), "background-opacity": new bi(pe.paint_background["background-opacity"]) });
            } };
            class R5 extends Qe {
              constructor(H) {
                super(H, Qo);
              }
            }
            let x_;
            var F5 = { get paint() {
              return x_ = x_ || new bt({ "raster-opacity": new bi(pe.paint_raster["raster-opacity"]), "raster-hue-rotate": new bi(pe.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new bi(pe.paint_raster["raster-brightness-min"]), "raster-brightness-max": new bi(pe.paint_raster["raster-brightness-max"]), "raster-saturation": new bi(pe.paint_raster["raster-saturation"]), "raster-contrast": new bi(pe.paint_raster["raster-contrast"]), "raster-resampling": new bi(pe.paint_raster["raster-resampling"]), "raster-fade-duration": new bi(pe.paint_raster["raster-fade-duration"]) });
            } };
            class N5 extends Qe {
              constructor(H) {
                super(H, F5);
              }
            }
            class B5 extends Qe {
              constructor(H) {
                super(H, {}), this.onAdd = (oe) => {
                  this.implementation.onAdd && this.implementation.onAdd(oe, oe.painter.context.gl);
                }, this.onRemove = (oe) => {
                  this.implementation.onRemove && this.implementation.onRemove(oe, oe.painter.context.gl);
                }, this.implementation = H;
              }
              is3D() {
                return this.implementation.renderingMode === "3d";
              }
              hasOffscreenPass() {
                return this.implementation.prerender !== void 0;
              }
              recalculate() {
              }
              updateTransitions() {
              }
              hasTransition() {
                return !1;
              }
              serialize() {
                throw new Error("Custom layers cannot be serialized");
              }
            }
            class b_ {
              constructor(H) {
                this._methodToThrottle = H, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel(), this._channel.port2.onmessage = () => {
                  this._triggered = !1, this._methodToThrottle();
                });
              }
              trigger() {
                this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout(() => {
                  this._triggered = !1, this._methodToThrottle();
                }, 0));
              }
              remove() {
                delete this._channel, this._methodToThrottle = () => {
                };
              }
            }
            const Gd = 63710088e-1;
            class _f {
              constructor(H, oe) {
                if (isNaN(H) || isNaN(oe)) throw new Error(`Invalid LngLat object: (${H}, ${oe})`);
                if (this.lng = +H, this.lat = +oe, this.lat > 90 || this.lat < -90) throw new Error("Invalid LngLat latitude value: must be between -90 and 90");
              }
              wrap() {
                return new _f(D(this.lng, -180, 180), this.lat);
              }
              toArray() {
                return [this.lng, this.lat];
              }
              toString() {
                return `LngLat(${this.lng}, ${this.lat})`;
              }
              distanceTo(H) {
                const oe = Math.PI / 180, ve = this.lat * oe, Oe = H.lat * oe, Xe = Math.sin(ve) * Math.sin(Oe) + Math.cos(ve) * Math.cos(Oe) * Math.cos((H.lng - this.lng) * oe);
                return Gd * Math.acos(Math.min(Xe, 1));
              }
              static convert(H) {
                if (H instanceof _f) return H;
                if (Array.isArray(H) && (H.length === 2 || H.length === 3)) return new _f(Number(H[0]), Number(H[1]));
                if (!Array.isArray(H) && typeof H == "object" && H !== null) return new _f(Number("lng" in H ? H.lng : H.lon), Number(H.lat));
                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>]");
              }
            }
            const __ = 2 * Math.PI * Gd;
            function sl(J) {
              return __ * Math.cos(J * Math.PI / 180);
            }
            function _1(J) {
              return (180 + J) / 360;
            }
            function dd(J) {
              return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + J * Math.PI / 360))) / 360;
            }
            function py(J, H) {
              return J / sl(H);
            }
            function w1(J) {
              const H = 180 - 360 * J;
              return 360 / Math.PI * Math.atan(Math.exp(H * Math.PI / 180)) - 90;
            }
            class k1 {
              constructor(H, oe, ve = 0) {
                this.x = +H, this.y = +oe, this.z = +ve;
              }
              static fromLngLat(H, oe = 0) {
                const ve = _f.convert(H);
                return new k1(_1(ve.lng), dd(ve.lat), py(oe, ve.lat));
              }
              toLngLat() {
                return new _f(360 * this.x - 180, w1(this.y));
              }
              toAltitude() {
                return H = this.z, oe = this.y, H * sl(w1(oe));
                var H, oe;
              }
              meterInMercatorCoordinateUnits() {
                return 1 / __ * (H = w1(this.y), 1 / Math.cos(H * Math.PI / 180));
                var H;
              }
            }
            function sm(J, H, oe) {
              var ve = 2 * Math.PI * 6378137 / 256 / Math.pow(2, oe);
              return [J * ve - 2 * Math.PI * 6378137 / 2, H * ve - 2 * Math.PI * 6378137 / 2];
            }
            class qh {
              constructor(H, oe, ve) {
                if (H < 0 || H > 25 || ve < 0 || ve >= Math.pow(2, H) || oe < 0 || oe >= Math.pow(2, H)) throw new Error(`x=${oe}, y=${ve}, z=${H} outside of bounds. 0<=x<${Math.pow(2, H)}, 0<=y<${Math.pow(2, H)} 0<=z<=25 `);
                this.z = H, this.x = oe, this.y = ve, this.key = my(0, H, H, oe, ve);
              }
              equals(H) {
                return this.z === H.z && this.x === H.x && this.y === H.y;
              }
              url(H, oe, ve) {
                const Oe = (rt = this.x, yt = this.y, Tt = this.z, Nt = sm(256 * rt, 256 * (yt = Math.pow(2, Tt) - yt - 1), Tt), Vt = sm(256 * (rt + 1), 256 * (yt + 1), Tt), Nt[0] + "," + Nt[1] + "," + Vt[0] + "," + Vt[1]), Xe = function(Kt, an, hn) {
                  let kn, xn = "";
                  for (let Fn = Kt; Fn > 0; Fn--) kn = 1 << Fn - 1, xn += (an & kn ? 1 : 0) + (hn & kn ? 2 : 0);
                  return xn;
                }(this.z, this.x, this.y);
                var rt, yt, Tt, Nt, Vt;
                return H[(this.x + this.y) % H.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(ve === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace(/{ratio}/g, oe > 1 ? "@2x" : "").replace(/{quadkey}/g, Xe).replace(/{bbox-epsg-3857}/g, Oe);
              }
              isChildOf(H) {
                const oe = this.z - H.z;
                return oe > 0 && H.x === this.x >> oe && H.y === this.y >> oe;
              }
              getTilePoint(H) {
                const oe = Math.pow(2, this.z);
                return new d((H.x * oe - this.x) * Bl, (H.y * oe - this.y) * Bl);
              }
              toString() {
                return `${this.z}/${this.x}/${this.y}`;
              }
            }
            class w_ {
              constructor(H, oe) {
                this.wrap = H, this.canonical = oe, this.key = my(H, oe.z, oe.z, oe.x, oe.y);
              }
            }
            class wf {
              constructor(H, oe, ve, Oe, Xe) {
                if (H < ve) throw new Error(`overscaledZ should be >= z; overscaledZ = ${H}; z = ${ve}`);
                this.overscaledZ = H, this.wrap = oe, this.canonical = new qh(ve, +Oe, +Xe), this.key = my(oe, H, ve, Oe, Xe);
              }
              clone() {
                return new wf(this.overscaledZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);
              }
              equals(H) {
                return this.overscaledZ === H.overscaledZ && this.wrap === H.wrap && this.canonical.equals(H.canonical);
              }
              scaledTo(H) {
                if (H > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${H}; overscaledZ = ${this.overscaledZ}`);
                const oe = this.canonical.z - H;
                return H > this.canonical.z ? new wf(H, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new wf(H, this.wrap, H, this.canonical.x >> oe, this.canonical.y >> oe);
              }
              calculateScaledKey(H, oe) {
                if (H > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${H}; overscaledZ = ${this.overscaledZ}`);
                const ve = this.canonical.z - H;
                return H > this.canonical.z ? my(this.wrap * +oe, H, this.canonical.z, this.canonical.x, this.canonical.y) : my(this.wrap * +oe, H, H, this.canonical.x >> ve, this.canonical.y >> ve);
              }
              isChildOf(H) {
                if (H.wrap !== this.wrap) return !1;
                const oe = this.canonical.z - H.canonical.z;
                return H.overscaledZ === 0 || H.overscaledZ < this.overscaledZ && H.canonical.x === this.canonical.x >> oe && H.canonical.y === this.canonical.y >> oe;
              }
              children(H) {
                if (this.overscaledZ >= H) return [new wf(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];
                const oe = this.canonical.z + 1, ve = 2 * this.canonical.x, Oe = 2 * this.canonical.y;
                return [new wf(oe, this.wrap, oe, ve, Oe), new wf(oe, this.wrap, oe, ve + 1, Oe), new wf(oe, this.wrap, oe, ve, Oe + 1), new wf(oe, this.wrap, oe, ve + 1, Oe + 1)];
              }
              isLessThan(H) {
                return this.wrap < H.wrap || !(this.wrap > H.wrap) && (this.overscaledZ < H.overscaledZ || !(this.overscaledZ > H.overscaledZ) && (this.canonical.x < H.canonical.x || !(this.canonical.x > H.canonical.x) && this.canonical.y < H.canonical.y));
              }
              wrapped() {
                return new wf(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);
              }
              unwrapTo(H) {
                return new wf(this.overscaledZ, H, this.canonical.z, this.canonical.x, this.canonical.y);
              }
              overscaleFactor() {
                return Math.pow(2, this.overscaledZ - this.canonical.z);
              }
              toUnwrapped() {
                return new w_(this.wrap, this.canonical);
              }
              toString() {
                return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;
              }
              getTilePoint(H) {
                return this.canonical.getTilePoint(new k1(H.x - this.wrap, H.y));
              }
            }
            function my(J, H, oe, ve, Oe) {
              (J *= 2) < 0 && (J = -1 * J - 1);
              const Xe = 1 << oe;
              return (Xe * Xe * J + Xe * Oe + ve).toString(36) + oe.toString(36) + H.toString(36);
            }
            di("CanonicalTileID", qh), di("OverscaledTileID", wf, { omit: ["posMatrix"] });
            class Ul {
              constructor(H, oe, ve, Oe = 1, Xe = 1, rt = 1, yt = 0) {
                if (this.uid = H, oe.height !== oe.width) throw new RangeError("DEM tiles must be square");
                if (ve && !["mapbox", "terrarium", "custom"].includes(ve)) return void T(`"${ve}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
                this.stride = oe.height;
                const Tt = this.dim = oe.height - 2;
                switch (this.data = new Uint32Array(oe.data.buffer), ve) {
                  case "terrarium":
                    this.redFactor = 256, this.greenFactor = 1, this.blueFactor = 390625e-8, this.baseShift = 32768;
                    break;
                  case "custom":
                    this.redFactor = Oe, this.greenFactor = Xe, this.blueFactor = rt, this.baseShift = yt;
                    break;
                  default:
                    this.redFactor = 6553.6, this.greenFactor = 25.6, this.blueFactor = 0.1, this.baseShift = 1e4;
                }
                for (let Nt = 0; Nt < Tt; Nt++) this.data[this._idx(-1, Nt)] = this.data[this._idx(0, Nt)], this.data[this._idx(Tt, Nt)] = this.data[this._idx(Tt - 1, Nt)], this.data[this._idx(Nt, -1)] = this.data[this._idx(Nt, 0)], this.data[this._idx(Nt, Tt)] = this.data[this._idx(Nt, Tt - 1)];
                this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(Tt, -1)] = this.data[this._idx(Tt - 1, 0)], this.data[this._idx(-1, Tt)] = this.data[this._idx(0, Tt - 1)], this.data[this._idx(Tt, Tt)] = this.data[this._idx(Tt - 1, Tt - 1)], this.min = Number.MAX_SAFE_INTEGER, this.max = Number.MIN_SAFE_INTEGER;
                for (let Nt = 0; Nt < Tt; Nt++) for (let Vt = 0; Vt < Tt; Vt++) {
                  const Kt = this.get(Nt, Vt);
                  Kt > this.max && (this.max = Kt), Kt < this.min && (this.min = Kt);
                }
              }
              get(H, oe) {
                const ve = new Uint8Array(this.data.buffer), Oe = 4 * this._idx(H, oe);
                return this.unpack(ve[Oe], ve[Oe + 1], ve[Oe + 2]);
              }
              getUnpackVector() {
                return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift];
              }
              _idx(H, oe) {
                if (H < -1 || H >= this.dim + 1 || oe < -1 || oe >= this.dim + 1) throw new RangeError("out of range source coordinates for DEM data");
                return (oe + 1) * this.stride + (H + 1);
              }
              unpack(H, oe, ve) {
                return H * this.redFactor + oe * this.greenFactor + ve * this.blueFactor - this.baseShift;
              }
              getPixels() {
                return new xf({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
              }
              backfillBorder(H, oe, ve) {
                if (this.dim !== H.dim) throw new Error("dem dimension mismatch");
                let Oe = oe * this.dim, Xe = oe * this.dim + this.dim, rt = ve * this.dim, yt = ve * this.dim + this.dim;
                switch (oe) {
                  case -1:
                    Oe = Xe - 1;
                    break;
                  case 1:
                    Xe = Oe + 1;
                }
                switch (ve) {
                  case -1:
                    rt = yt - 1;
                    break;
                  case 1:
                    yt = rt + 1;
                }
                const Tt = -oe * this.dim, Nt = -ve * this.dim;
                for (let Vt = rt; Vt < yt; Vt++) for (let Kt = Oe; Kt < Xe; Kt++) this.data[this._idx(Kt, Vt)] = H.data[this._idx(Kt + Tt, Vt + Nt)];
              }
            }
            di("DEMData", Ul);
            class Wd {
              constructor(H) {
                this._stringToNumber = {}, this._numberToString = [];
                for (let oe = 0; oe < H.length; oe++) {
                  const ve = H[oe];
                  this._stringToNumber[ve] = oe, this._numberToString[oe] = ve;
                }
              }
              encode(H) {
                return this._stringToNumber[H];
              }
              decode(H) {
                if (H >= this._numberToString.length) throw new Error(`Out of bounds. Index requested n=${H} can't be >= this._numberToString.length ${this._numberToString.length}`);
                return this._numberToString[H];
              }
            }
            class k_ {
              constructor(H, oe, ve, Oe, Xe) {
                this.type = "Feature", this._vectorTileFeature = H, H._z = oe, H._x = ve, H._y = Oe, this.properties = H.properties, this.id = Xe;
              }
              get geometry() {
                return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry;
              }
              set geometry(H) {
                this._geometry = H;
              }
              toJSON() {
                const H = { geometry: this.geometry };
                for (const oe in this) oe !== "_geometry" && oe !== "_vectorTileFeature" && (H[oe] = this[oe]);
                return H;
              }
            }
            class N {
              constructor(H, oe) {
                this.tileID = H, this.x = H.canonical.x, this.y = H.canonical.y, this.z = H.canonical.z, this.grid = new Os(Bl, 16, 0), this.grid3D = new Os(Bl, 16, 0), this.featureIndexArray = new Rr(), this.promoteId = oe;
              }
              insert(H, oe, ve, Oe, Xe, rt) {
                const yt = this.featureIndexArray.length;
                this.featureIndexArray.emplaceBack(ve, Oe, Xe);
                const Tt = rt ? this.grid3D : this.grid;
                for (let Nt = 0; Nt < oe.length; Nt++) {
                  const Vt = oe[Nt], Kt = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
                  for (let an = 0; an < Vt.length; an++) {
                    const hn = Vt[an];
                    Kt[0] = Math.min(Kt[0], hn.x), Kt[1] = Math.min(Kt[1], hn.y), Kt[2] = Math.max(Kt[2], hn.x), Kt[3] = Math.max(Kt[3], hn.y);
                  }
                  Kt[0] < Bl && Kt[1] < Bl && Kt[2] >= 0 && Kt[3] >= 0 && Tt.insert(yt, Kt[0], Kt[1], Kt[2], Kt[3]);
                }
              }
              loadVTLayers() {
                return this.vtLayers || (this.vtLayers = new jp.VectorTile(new x1(this.rawTileData)).layers, this.sourceLayerCoder = new Wd(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
              }
              query(H, oe, ve, Oe) {
                this.loadVTLayers();
                const Xe = H.params || {}, rt = Bl / H.tileSize / H.scale, yt = Aa(Xe.filter), Tt = H.queryGeometry, Nt = H.queryPadding * rt, Vt = le(Tt), Kt = this.grid.query(Vt.minX - Nt, Vt.minY - Nt, Vt.maxX + Nt, Vt.maxY + Nt), an = le(H.cameraQueryGeometry), hn = this.grid3D.query(an.minX - Nt, an.minY - Nt, an.maxX + Nt, an.maxY + Nt, (Fn, qn, vr, rr) => function(dr, jr, oi, Ai, Ui) {
                  for (const fi of dr) if (jr <= fi.x && oi <= fi.y && Ai >= fi.x && Ui >= fi.y) return !0;
                  const _i = [new d(jr, oi), new d(jr, Ui), new d(Ai, Ui), new d(Ai, oi)];
                  if (dr.length > 2) {
                    for (const fi of _i) if (s1(dr, fi)) return !0;
                  }
                  for (let fi = 0; fi < dr.length - 1; fi++) if (mA(dr[fi], dr[fi + 1], _i)) return !0;
                  return !1;
                }(H.cameraQueryGeometry, Fn - Nt, qn - Nt, vr + Nt, rr + Nt));
                for (const Fn of hn) Kt.push(Fn);
                Kt.sort(ke);
                const kn = {};
                let xn;
                for (let Fn = 0; Fn < Kt.length; Fn++) {
                  const qn = Kt[Fn];
                  if (qn === xn) continue;
                  xn = qn;
                  const vr = this.featureIndexArray.get(qn);
                  let rr = null;
                  this.loadMatchingFeature(kn, vr.bucketIndex, vr.sourceLayerIndex, vr.featureIndex, yt, Xe.layers, Xe.availableImages, oe, ve, Oe, (dr, jr, oi) => (rr || (rr = cd(dr)), jr.queryIntersectsFeature(Tt, dr, oi, rr, this.z, H.transform, rt, H.pixelPosMatrix)));
                }
                return kn;
              }
              loadMatchingFeature(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt) {
                const an = this.bucketLayerIDs[oe];
                if (rt && !function(Fn, qn) {
                  for (let vr = 0; vr < Fn.length; vr++) if (qn.indexOf(Fn[vr]) >= 0) return !0;
                  return !1;
                }(rt, an)) return;
                const hn = this.sourceLayerCoder.decode(ve), kn = this.vtLayers[hn].feature(Oe);
                if (Xe.needGeometry) {
                  const Fn = J0(kn, !0);
                  if (!Xe.filter(new ni(this.tileID.overscaledZ), Fn, this.tileID.canonical)) return;
                } else if (!Xe.filter(new ni(this.tileID.overscaledZ), kn)) return;
                const xn = this.getId(kn, hn);
                for (let Fn = 0; Fn < an.length; Fn++) {
                  const qn = an[Fn];
                  if (rt && rt.indexOf(qn) < 0) continue;
                  const vr = Tt[qn];
                  if (!vr) continue;
                  let rr = {};
                  xn && Vt && (rr = Vt.getState(vr.sourceLayer || "_geojsonTileLayer", xn));
                  const dr = L({}, Nt[qn]);
                  dr.paint = W(dr.paint, vr.paint, kn, rr, yt), dr.layout = W(dr.layout, vr.layout, kn, rr, yt);
                  const jr = !Kt || Kt(kn, vr, rr);
                  if (!jr) continue;
                  const oi = new k_(kn, this.z, this.x, this.y, xn);
                  oi.layer = dr;
                  let Ai = H[qn];
                  Ai === void 0 && (Ai = H[qn] = []), Ai.push({ featureIndex: Oe, feature: oi, intersectionZ: jr });
                }
              }
              lookupSymbolFeatures(H, oe, ve, Oe, Xe, rt, yt, Tt) {
                const Nt = {};
                this.loadVTLayers();
                const Vt = Aa(Xe);
                for (const Kt of H) this.loadMatchingFeature(Nt, ve, Oe, Kt, Vt, rt, yt, Tt, oe);
                return Nt;
              }
              hasLayer(H) {
                for (const oe of this.bucketLayerIDs) for (const ve of oe) if (H === ve) return !0;
                return !1;
              }
              getId(H, oe) {
                let ve = H.id;
                if (this.promoteId) {
                  const Oe = typeof this.promoteId == "string" ? this.promoteId : this.promoteId[oe];
                  ve = H.properties[Oe], typeof ve == "boolean" && (ve = Number(ve));
                }
                return ve;
              }
            }
            function W(J, H, oe, ve, Oe) {
              return P(J, (Xe, rt) => {
                const yt = H instanceof tc ? H.get(rt) : null;
                return yt && yt.evaluate ? yt.evaluate(oe, ve, Oe) : yt;
              });
            }
            function le(J) {
              let H = 1 / 0, oe = 1 / 0, ve = -1 / 0, Oe = -1 / 0;
              for (const Xe of J) H = Math.min(H, Xe.x), oe = Math.min(oe, Xe.y), ve = Math.max(ve, Xe.x), Oe = Math.max(Oe, Xe.y);
              return { minX: H, minY: oe, maxX: ve, maxY: Oe };
            }
            function ke(J, H) {
              return H - J;
            }
            function qe(J, H, oe, ve, Oe) {
              const Xe = [];
              for (let rt = 0; rt < J.length; rt++) {
                const yt = J[rt];
                let Tt;
                for (let Nt = 0; Nt < yt.length - 1; Nt++) {
                  let Vt = yt[Nt], Kt = yt[Nt + 1];
                  Vt.x < H && Kt.x < H || (Vt.x < H ? Vt = new d(H, Vt.y + (Kt.y - Vt.y) * ((H - Vt.x) / (Kt.x - Vt.x)))._round() : Kt.x < H && (Kt = new d(H, Vt.y + (Kt.y - Vt.y) * ((H - Vt.x) / (Kt.x - Vt.x)))._round()), Vt.y < oe && Kt.y < oe || (Vt.y < oe ? Vt = new d(Vt.x + (Kt.x - Vt.x) * ((oe - Vt.y) / (Kt.y - Vt.y)), oe)._round() : Kt.y < oe && (Kt = new d(Vt.x + (Kt.x - Vt.x) * ((oe - Vt.y) / (Kt.y - Vt.y)), oe)._round()), Vt.x >= ve && Kt.x >= ve || (Vt.x >= ve ? Vt = new d(ve, Vt.y + (Kt.y - Vt.y) * ((ve - Vt.x) / (Kt.x - Vt.x)))._round() : Kt.x >= ve && (Kt = new d(ve, Vt.y + (Kt.y - Vt.y) * ((ve - Vt.x) / (Kt.x - Vt.x)))._round()), Vt.y >= Oe && Kt.y >= Oe || (Vt.y >= Oe ? Vt = new d(Vt.x + (Kt.x - Vt.x) * ((Oe - Vt.y) / (Kt.y - Vt.y)), Oe)._round() : Kt.y >= Oe && (Kt = new d(Vt.x + (Kt.x - Vt.x) * ((Oe - Vt.y) / (Kt.y - Vt.y)), Oe)._round()), Tt && Vt.equals(Tt[Tt.length - 1]) || (Tt = [Vt], Xe.push(Tt)), Tt.push(Kt)))));
                }
              }
              return Xe;
            }
            di("FeatureIndex", N, { omit: ["rawTileData", "sourceLayerCoder"] });
            class et extends d {
              constructor(H, oe, ve, Oe) {
                super(H, oe), this.angle = ve, Oe !== void 0 && (this.segment = Oe);
              }
              clone() {
                return new et(this.x, this.y, this.angle, this.segment);
              }
            }
            function dt(J, H, oe, ve, Oe) {
              if (H.segment === void 0 || oe === 0) return !0;
              let Xe = H, rt = H.segment + 1, yt = 0;
              for (; yt > -oe / 2; ) {
                if (rt--, rt < 0) return !1;
                yt -= J[rt].dist(Xe), Xe = J[rt];
              }
              yt += J[rt].dist(J[rt + 1]), rt++;
              const Tt = [];
              let Nt = 0;
              for (; yt < oe / 2; ) {
                const Vt = J[rt - 1], Kt = J[rt], an = J[rt + 1];
                if (!an) return !1;
                let hn = Vt.angleTo(Kt) - Kt.angleTo(an);
                for (hn = Math.abs((hn + 3 * Math.PI) % (2 * Math.PI) - Math.PI), Tt.push({ distance: yt, angleDelta: hn }), Nt += hn; yt - Tt[0].distance > ve; ) Nt -= Tt.shift().angleDelta;
                if (Nt > Oe) return !1;
                rt++, yt += Kt.dist(an);
              }
              return !0;
            }
            function Ct(J) {
              let H = 0;
              for (let oe = 0; oe < J.length - 1; oe++) H += J[oe].dist(J[oe + 1]);
              return H;
            }
            function Ut(J, H, oe) {
              return J ? 0.6 * H * oe : 0;
            }
            function tn(J, H) {
              return Math.max(J ? J.right - J.left : 0, H ? H.right - H.left : 0);
            }
            function nn(J, H, oe, ve, Oe, Xe) {
              const rt = Ut(oe, Oe, Xe), yt = tn(oe, ve) * Xe;
              let Tt = 0;
              const Nt = Ct(J) / 2;
              for (let Vt = 0; Vt < J.length - 1; Vt++) {
                const Kt = J[Vt], an = J[Vt + 1], hn = Kt.dist(an);
                if (Tt + hn > Nt) {
                  const kn = (Nt - Tt) / hn, xn = bn.number(Kt.x, an.x, kn), Fn = bn.number(Kt.y, an.y, kn), qn = new et(xn, Fn, an.angleTo(Kt), Vt);
                  return qn._round(), !rt || dt(J, qn, yt, rt, H) ? qn : void 0;
                }
                Tt += hn;
              }
            }
            function cn(J, H, oe, ve, Oe, Xe, rt, yt, Tt) {
              const Nt = Ut(ve, Xe, rt), Vt = tn(ve, Oe), Kt = Vt * rt, an = J[0].x === 0 || J[0].x === Tt || J[0].y === 0 || J[0].y === Tt;
              return H - Kt < H / 4 && (H = Kt + H / 4), vn(J, an ? H / 2 * yt % H : (Vt / 2 + 2 * Xe) * rt * yt % H, H, Nt, oe, Kt, an, !1, Tt);
            }
            function vn(J, H, oe, ve, Oe, Xe, rt, yt, Tt) {
              const Nt = Xe / 2, Vt = Ct(J);
              let Kt = 0, an = H - oe, hn = [];
              for (let kn = 0; kn < J.length - 1; kn++) {
                const xn = J[kn], Fn = J[kn + 1], qn = xn.dist(Fn), vr = Fn.angleTo(xn);
                for (; an + oe < Kt + qn; ) {
                  an += oe;
                  const rr = (an - Kt) / qn, dr = bn.number(xn.x, Fn.x, rr), jr = bn.number(xn.y, Fn.y, rr);
                  if (dr >= 0 && dr < Tt && jr >= 0 && jr < Tt && an - Nt >= 0 && an + Nt <= Vt) {
                    const oi = new et(dr, jr, vr, kn);
                    oi._round(), ve && !dt(J, oi, Xe, ve, Oe) || hn.push(oi);
                  }
                }
                Kt += qn;
              }
              return yt || hn.length || rt || (hn = vn(J, Kt / 2, oe, ve, Oe, Xe, rt, !0, Tt)), hn;
            }
            di("Anchor", et);
            const mn = rf;
            function On(J, H, oe, ve) {
              const Oe = [], Xe = J.image, rt = Xe.pixelRatio, yt = Xe.paddedRect.w - 2 * mn, Tt = Xe.paddedRect.h - 2 * mn;
              let Nt = { x1: J.left, y1: J.top, x2: J.right, y2: J.bottom };
              const Vt = Xe.stretchX || [[0, yt]], Kt = Xe.stretchY || [[0, Tt]], an = (Gr, Di) => Gr + Di[1] - Di[0], hn = Vt.reduce(an, 0), kn = Kt.reduce(an, 0), xn = yt - hn, Fn = Tt - kn;
              let qn = 0, vr = hn, rr = 0, dr = kn, jr = 0, oi = xn, Ai = 0, Ui = Fn;
              if (Xe.content && ve) {
                const Gr = Xe.content, Di = Gr[2] - Gr[0], Pi = Gr[3] - Gr[1];
                (Xe.textFitWidth || Xe.textFitHeight) && (Nt = P5(J)), qn = Bn(Vt, 0, Gr[0]), rr = Bn(Kt, 0, Gr[1]), vr = Bn(Vt, Gr[0], Gr[2]), dr = Bn(Kt, Gr[1], Gr[3]), jr = Gr[0] - qn, Ai = Gr[1] - rr, oi = Di - vr, Ui = Pi - dr;
              }
              const _i = Nt.x1, fi = Nt.y1, Bi = Nt.x2 - _i, Ei = Nt.y2 - fi, ki = (Gr, Di, Pi, Qi) => {
                const Ka = tr(Gr.stretch - qn, vr, Bi, _i), Ja = xr(Gr.fixed - jr, oi, Gr.stretch, hn), Gs = tr(Di.stretch - rr, dr, Ei, fi), mc = xr(Di.fixed - Ai, Ui, Di.stretch, kn), _l = tr(Pi.stretch - qn, vr, Bi, _i), ll = xr(Pi.fixed - jr, oi, Pi.stretch, hn), rc = tr(Qi.stretch - rr, dr, Ei, fi), Tu = xr(Qi.fixed - Ai, Ui, Qi.stretch, kn), Ss = new d(Ka, Gs), fs = new d(_l, Gs), hu = new d(_l, rc), Ws = new d(Ka, rc), wl = new d(Ja / rt, mc / rt), Au = new d(ll / rt, Tu / rt), gc = H * Math.PI / 180;
                if (gc) {
                  const hs = Math.sin(gc), ds = Math.cos(gc), ps = [ds, -hs, hs, ds];
                  Ss._matMult(ps), fs._matMult(ps), Ws._matMult(ps), hu._matMult(ps);
                }
                const $u = Gr.stretch + Gr.fixed, Ms = Pi.stretch + Pi.fixed, Gf = Di.stretch + Di.fixed, es = Qi.stretch + Qi.fixed;
                return { tl: Ss, tr: fs, bl: Ws, br: hu, tex: { x: Xe.paddedRect.x + mn + $u, y: Xe.paddedRect.y + mn + Gf, w: Ms - $u, h: es - Gf }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: wl, pixelOffsetBR: Au, minFontScaleX: oi / rt / Bi, minFontScaleY: Ui / rt / Ei, isSDF: oe };
              };
              if (ve && (Xe.stretchX || Xe.stretchY)) {
                const Gr = ar(Vt, xn, hn), Di = ar(Kt, Fn, kn);
                for (let Pi = 0; Pi < Gr.length - 1; Pi++) {
                  const Qi = Gr[Pi], Ka = Gr[Pi + 1];
                  for (let Ja = 0; Ja < Di.length - 1; Ja++) {
                    const Gs = Di[Ja], mc = Di[Ja + 1];
                    Oe.push(ki(Qi, Gs, Ka, mc));
                  }
                }
              } else Oe.push(ki({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: yt + 1 }, { fixed: 0, stretch: Tt + 1 }));
              return Oe;
            }
            function Bn(J, H, oe) {
              let ve = 0;
              for (const Oe of J) ve += Math.max(H, Math.min(oe, Oe[1])) - Math.max(H, Math.min(oe, Oe[0]));
              return ve;
            }
            function ar(J, H, oe) {
              const ve = [{ fixed: -mn, stretch: 0 }];
              for (const [Oe, Xe] of J) {
                const rt = ve[ve.length - 1];
                ve.push({ fixed: Oe - rt.stretch, stretch: rt.stretch }), ve.push({ fixed: Oe - rt.stretch, stretch: rt.stretch + (Xe - Oe) });
              }
              return ve.push({ fixed: H + mn, stretch: oe }), ve;
            }
            function tr(J, H, oe, ve) {
              return J / H * oe + ve;
            }
            function xr(J, H, oe, ve) {
              return J - H * oe / ve;
            }
            class _r {
              constructor(H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt) {
                var Kt;
                if (this.boxStartIndex = H.length, Nt) {
                  let an = rt.top, hn = rt.bottom;
                  const kn = rt.collisionPadding;
                  kn && (an -= kn[1], hn += kn[3]);
                  let xn = hn - an;
                  xn > 0 && (xn = Math.max(10, xn), this.circleDiameter = xn);
                } else {
                  const an = !((Kt = rt.image) === null || Kt === void 0) && Kt.content && (rt.image.textFitWidth || rt.image.textFitHeight) ? P5(rt) : { x1: rt.left, y1: rt.top, x2: rt.right, y2: rt.bottom };
                  an.y1 = an.y1 * yt - Tt[0], an.y2 = an.y2 * yt + Tt[2], an.x1 = an.x1 * yt - Tt[3], an.x2 = an.x2 * yt + Tt[1];
                  const hn = rt.collisionPadding;
                  if (hn && (an.x1 -= hn[0] * yt, an.y1 -= hn[1] * yt, an.x2 += hn[2] * yt, an.y2 += hn[3] * yt), Vt) {
                    const kn = new d(an.x1, an.y1), xn = new d(an.x2, an.y1), Fn = new d(an.x1, an.y2), qn = new d(an.x2, an.y2), vr = Vt * Math.PI / 180;
                    kn._rotate(vr), xn._rotate(vr), Fn._rotate(vr), qn._rotate(vr), an.x1 = Math.min(kn.x, xn.x, Fn.x, qn.x), an.x2 = Math.max(kn.x, xn.x, Fn.x, qn.x), an.y1 = Math.min(kn.y, xn.y, Fn.y, qn.y), an.y2 = Math.max(kn.y, xn.y, Fn.y, qn.y);
                  }
                  H.emplaceBack(oe.x, oe.y, an.x1, an.y1, an.x2, an.y2, ve, Oe, Xe);
                }
                this.boxEndIndex = H.length;
              }
            }
            class Lr {
              constructor(H = [], oe = (ve, Oe) => ve < Oe ? -1 : ve > Oe ? 1 : 0) {
                if (this.data = H, this.length = this.data.length, this.compare = oe, this.length > 0) for (let ve = (this.length >> 1) - 1; ve >= 0; ve--) this._down(ve);
              }
              push(H) {
                this.data.push(H), this._up(this.length++);
              }
              pop() {
                if (this.length === 0) return;
                const H = this.data[0], oe = this.data.pop();
                return --this.length > 0 && (this.data[0] = oe, this._down(0)), H;
              }
              peek() {
                return this.data[0];
              }
              _up(H) {
                const { data: oe, compare: ve } = this, Oe = oe[H];
                for (; H > 0; ) {
                  const Xe = H - 1 >> 1, rt = oe[Xe];
                  if (ve(Oe, rt) >= 0) break;
                  oe[H] = rt, H = Xe;
                }
                oe[H] = Oe;
              }
              _down(H) {
                const { data: oe, compare: ve } = this, Oe = this.length >> 1, Xe = oe[H];
                for (; H < Oe; ) {
                  let rt = 1 + (H << 1);
                  const yt = rt + 1;
                  if (yt < this.length && ve(oe[yt], oe[rt]) < 0 && (rt = yt), ve(oe[rt], Xe) >= 0) break;
                  oe[H] = oe[rt], H = rt;
                }
                oe[H] = Xe;
              }
            }
            function Ur(J, H = 1, oe = !1) {
              let ve = 1 / 0, Oe = 1 / 0, Xe = -1 / 0, rt = -1 / 0;
              const yt = J[0];
              for (let xn = 0; xn < yt.length; xn++) {
                const Fn = yt[xn];
                (!xn || Fn.x < ve) && (ve = Fn.x), (!xn || Fn.y < Oe) && (Oe = Fn.y), (!xn || Fn.x > Xe) && (Xe = Fn.x), (!xn || Fn.y > rt) && (rt = Fn.y);
              }
              const Tt = Xe - ve, Nt = rt - Oe, Vt = Math.min(Tt, Nt);
              let Kt = Vt / 2;
              const an = new Lr([], $r);
              if (Vt === 0) return new d(ve, Oe);
              for (let xn = ve; xn < Xe; xn += Vt) for (let Fn = Oe; Fn < rt; Fn += Vt) an.push(new ai(xn + Kt, Fn + Kt, Kt, J));
              let hn = function(xn) {
                let Fn = 0, qn = 0, vr = 0;
                const rr = xn[0];
                for (let dr = 0, jr = rr.length, oi = jr - 1; dr < jr; oi = dr++) {
                  const Ai = rr[dr], Ui = rr[oi], _i = Ai.x * Ui.y - Ui.x * Ai.y;
                  qn += (Ai.x + Ui.x) * _i, vr += (Ai.y + Ui.y) * _i, Fn += 3 * _i;
                }
                return new ai(qn / Fn, vr / Fn, 0, xn);
              }(J), kn = an.length;
              for (; an.length; ) {
                const xn = an.pop();
                (xn.d > hn.d || !hn.d) && (hn = xn, oe && console.log("found best %d after %d probes", Math.round(1e4 * xn.d) / 1e4, kn)), xn.max - hn.d <= H || (Kt = xn.h / 2, an.push(new ai(xn.p.x - Kt, xn.p.y - Kt, Kt, J)), an.push(new ai(xn.p.x + Kt, xn.p.y - Kt, Kt, J)), an.push(new ai(xn.p.x - Kt, xn.p.y + Kt, Kt, J)), an.push(new ai(xn.p.x + Kt, xn.p.y + Kt, Kt, J)), kn += 4);
              }
              return oe && (console.log(`num probes: ${kn}`), console.log(`best distance: ${hn.d}`)), hn.p;
            }
            function $r(J, H) {
              return H.max - J.max;
            }
            function ai(J, H, oe, ve) {
              this.p = new d(J, H), this.h = oe, this.d = function(Oe, Xe) {
                let rt = !1, yt = 1 / 0;
                for (let Tt = 0; Tt < Xe.length; Tt++) {
                  const Nt = Xe[Tt];
                  for (let Vt = 0, Kt = Nt.length, an = Kt - 1; Vt < Kt; an = Vt++) {
                    const hn = Nt[Vt], kn = Nt[an];
                    hn.y > Oe.y != kn.y > Oe.y && Oe.x < (kn.x - hn.x) * (Oe.y - hn.y) / (kn.y - hn.y) + hn.x && (rt = !rt), yt = Math.min(yt, Kb(Oe, hn, kn));
                  }
                }
                return (rt ? 1 : -1) * Math.sqrt(yt);
              }(this.p, ve), this.max = this.d + this.h * Math.SQRT2;
            }
            var Hr;
            u.ar = void 0, (Hr = u.ar || (u.ar = {}))[Hr.center = 1] = "center", Hr[Hr.left = 2] = "left", Hr[Hr.right = 3] = "right", Hr[Hr.top = 4] = "top", Hr[Hr.bottom = 5] = "bottom", Hr[Hr["top-left"] = 6] = "top-left", Hr[Hr["top-right"] = 7] = "top-right", Hr[Hr["bottom-left"] = 8] = "bottom-left", Hr[Hr["bottom-right"] = 9] = "bottom-right";
            const hi = 7, Ti = Number.POSITIVE_INFINITY;
            function ta(J, H) {
              return H[1] !== Ti ? function(oe, ve, Oe) {
                let Xe = 0, rt = 0;
                switch (ve = Math.abs(ve), Oe = Math.abs(Oe), oe) {
                  case "top-right":
                  case "top-left":
                  case "top":
                    rt = Oe - hi;
                    break;
                  case "bottom-right":
                  case "bottom-left":
                  case "bottom":
                    rt = -Oe + hi;
                }
                switch (oe) {
                  case "top-right":
                  case "bottom-right":
                  case "right":
                    Xe = -ve;
                    break;
                  case "top-left":
                  case "bottom-left":
                  case "left":
                    Xe = ve;
                }
                return [Xe, rt];
              }(J, H[0], H[1]) : function(oe, ve) {
                let Oe = 0, Xe = 0;
                ve < 0 && (ve = 0);
                const rt = ve / Math.SQRT2;
                switch (oe) {
                  case "top-right":
                  case "top-left":
                    Xe = rt - hi;
                    break;
                  case "bottom-right":
                  case "bottom-left":
                    Xe = -rt + hi;
                    break;
                  case "bottom":
                    Xe = -ve + hi;
                    break;
                  case "top":
                    Xe = ve - hi;
                }
                switch (oe) {
                  case "top-right":
                  case "bottom-right":
                    Oe = -rt;
                    break;
                  case "top-left":
                  case "bottom-left":
                    Oe = rt;
                    break;
                  case "left":
                    Oe = ve;
                    break;
                  case "right":
                    Oe = -ve;
                }
                return [Oe, Xe];
              }(J, H[0]);
            }
            function zi(J, H, oe) {
              var ve;
              const Oe = J.layout, Xe = (ve = Oe.get("text-variable-anchor-offset")) === null || ve === void 0 ? void 0 : ve.evaluate(H, {}, oe);
              if (Xe) {
                const yt = Xe.values, Tt = [];
                for (let Nt = 0; Nt < yt.length; Nt += 2) {
                  const Vt = Tt[Nt] = yt[Nt], Kt = yt[Nt + 1].map((an) => an * jl);
                  Vt.startsWith("top") ? Kt[1] -= hi : Vt.startsWith("bottom") && (Kt[1] += hi), Tt[Nt + 1] = Kt;
                }
                return new Xn(Tt);
              }
              const rt = Oe.get("text-variable-anchor");
              if (rt) {
                let yt;
                yt = J._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [Oe.get("text-radial-offset").evaluate(H, {}, oe) * jl, Ti] : Oe.get("text-offset").evaluate(H, {}, oe).map((Nt) => Nt * jl);
                const Tt = [];
                for (const Nt of rt) Tt.push(Nt, ta(Nt, yt));
                return new Xn(Tt);
              }
              return null;
            }
            function Ki(J) {
              switch (J) {
                case "right":
                case "top-right":
                case "bottom-right":
                  return "right";
                case "left":
                case "top-left":
                case "bottom-left":
                  return "left";
              }
              return "center";
            }
            function $i(J, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt) {
              let Kt = Xe.textMaxSize.evaluate(H, {});
              Kt === void 0 && (Kt = rt);
              const an = J.layers[0].layout, hn = an.get("icon-offset").evaluate(H, {}, Vt), kn = za(oe.horizontal), xn = rt / 24, Fn = J.tilePixelRatio * xn, qn = J.tilePixelRatio * Kt / 24, vr = J.tilePixelRatio * yt, rr = J.tilePixelRatio * an.get("symbol-spacing"), dr = an.get("text-padding") * J.tilePixelRatio, jr = function(Gr, Di, Pi, Qi = 1) {
                const Ka = Gr.get("icon-padding").evaluate(Di, {}, Pi), Ja = Ka && Ka.values;
                return [Ja[0] * Qi, Ja[1] * Qi, Ja[2] * Qi, Ja[3] * Qi];
              }(an, H, Vt, J.tilePixelRatio), oi = an.get("text-max-angle") / 180 * Math.PI, Ai = an.get("text-rotation-alignment") !== "viewport" && an.get("symbol-placement") !== "point", Ui = an.get("icon-rotation-alignment") === "map" && an.get("symbol-placement") !== "point", _i = an.get("symbol-placement"), fi = rr / 2, Bi = an.get("icon-text-fit");
              let Ei;
              ve && Bi !== "none" && (J.allowVerticalPlacement && oe.vertical && (Ei = S2(ve, oe.vertical, Bi, an.get("icon-text-fit-padding"), hn, xn)), kn && (ve = S2(ve, kn, Bi, an.get("icon-text-fit-padding"), hn, xn)));
              const ki = (Gr, Di) => {
                Di.x < 0 || Di.x >= Bl || Di.y < 0 || Di.y >= Bl || function(Pi, Qi, Ka, Ja, Gs, mc, _l, ll, rc, Tu, Ss, fs, hu, Ws, wl, Au, gc, $u, Ms, Gf, es, hs, ds, ps, Yd) {
                  const kf = Pi.addToLineVertexArray(Qi, Ka);
                  let $l, Wa, ts, Wf, xh = 0, L2 = 0, T_ = 0, gy = 0, bh = -1, T1 = -1;
                  const Yf = {};
                  let yy = Jo("");
                  if (Pi.allowVerticalPlacement && Ja.vertical) {
                    const kl = ll.layout.get("text-rotate").evaluate(es, {}, ps) + 90, Su = Ja.vertical;
                    ts = new _r(rc, Qi, Tu, Ss, fs, Su, hu, Ws, wl, kl), _l && (Wf = new _r(rc, Qi, Tu, Ss, fs, _l, gc, $u, wl, kl));
                  }
                  if (Gs) {
                    const kl = ll.layout.get("icon-rotate").evaluate(es, {}), Su = ll.layout.get("icon-text-fit") !== "none", _h = On(Gs, kl, ds, Su), Rc = _l ? On(_l, kl, ds, Su) : void 0;
                    Wa = new _r(rc, Qi, Tu, Ss, fs, Gs, gc, $u, !1, kl), xh = 4 * _h.length;
                    const wh = Pi.iconSizeData;
                    let md = null;
                    wh.kind === "source" ? (md = [hd * ll.layout.get("icon-size").evaluate(es, {})], md[0] > Gp && T(`${Pi.layerIds[0]}: Value for "icon-size" is >= ${fd}. Reduce your "icon-size".`)) : wh.kind === "composite" && (md = [hd * hs.compositeIconSizes[0].evaluate(es, {}, ps), hd * hs.compositeIconSizes[1].evaluate(es, {}, ps)], (md[0] > Gp || md[1] > Gp) && T(`${Pi.layerIds[0]}: Value for "icon-size" is >= ${fd}. Reduce your "icon-size".`)), Pi.addSymbols(Pi.icon, _h, md, Gf, Ms, es, u.ai.none, Qi, kf.lineStartIndex, kf.lineLength, -1, ps), bh = Pi.icon.placedSymbolArray.length - 1, Rc && (L2 = 4 * Rc.length, Pi.addSymbols(Pi.icon, Rc, md, Gf, Ms, es, u.ai.vertical, Qi, kf.lineStartIndex, kf.lineLength, -1, ps), T1 = Pi.icon.placedSymbolArray.length - 1);
                  }
                  const vy = Object.keys(Ja.horizontal);
                  for (const kl of vy) {
                    const Su = Ja.horizontal[kl];
                    if (!$l) {
                      yy = Jo(Su.text);
                      const Rc = ll.layout.get("text-rotate").evaluate(es, {}, ps);
                      $l = new _r(rc, Qi, Tu, Ss, fs, Su, hu, Ws, wl, Rc);
                    }
                    const _h = Su.positionedLines.length === 1;
                    if (T_ += Ii(Pi, Qi, Su, mc, ll, wl, es, Au, kf, Ja.vertical ? u.ai.horizontal : u.ai.horizontalOnly, _h ? vy : [kl], Yf, bh, hs, ps), _h) break;
                  }
                  Ja.vertical && (gy += Ii(Pi, Qi, Ja.vertical, mc, ll, wl, es, Au, kf, u.ai.vertical, ["vertical"], Yf, T1, hs, ps));
                  const A_ = $l ? $l.boxStartIndex : Pi.collisionBoxArray.length, j5 = $l ? $l.boxEndIndex : Pi.collisionBoxArray.length, xy = ts ? ts.boxStartIndex : Pi.collisionBoxArray.length, U5 = ts ? ts.boxEndIndex : Pi.collisionBoxArray.length, V5 = Wa ? Wa.boxStartIndex : Pi.collisionBoxArray.length, $5 = Wa ? Wa.boxEndIndex : Pi.collisionBoxArray.length, q5 = Wf ? Wf.boxStartIndex : Pi.collisionBoxArray.length, H5 = Wf ? Wf.boxEndIndex : Pi.collisionBoxArray.length;
                  let ul = -1;
                  const lm = (kl, Su) => kl && kl.circleDiameter ? Math.max(kl.circleDiameter, Su) : Su;
                  ul = lm($l, ul), ul = lm(ts, ul), ul = lm(Wa, ul), ul = lm(Wf, ul);
                  const S_ = ul > -1 ? 1 : 0;
                  S_ && (ul *= Yd / jl), Pi.glyphOffsetArray.length >= Hd.MAX_GLYPHS && T("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), es.sortKey !== void 0 && Pi.addToSortKeyRanges(Pi.symbolInstances.length, es.sortKey);
                  const pd = zi(ll, es, ps), [WA, G5] = function(kl, Su) {
                    const _h = kl.length, Rc = Su == null ? void 0 : Su.values;
                    if ((Rc == null ? void 0 : Rc.length) > 0) for (let wh = 0; wh < Rc.length; wh += 2) {
                      const md = u.ar[Rc[wh]], M_ = Rc[wh + 1];
                      kl.emplaceBack(md, M_[0], M_[1]);
                    }
                    return [_h, kl.length];
                  }(Pi.textAnchorOffsets, pd);
                  Pi.symbolInstances.emplaceBack(Qi.x, Qi.y, Yf.right >= 0 ? Yf.right : -1, Yf.center >= 0 ? Yf.center : -1, Yf.left >= 0 ? Yf.left : -1, Yf.vertical || -1, bh, T1, yy, A_, j5, xy, U5, V5, $5, q5, H5, Tu, T_, gy, xh, L2, S_, 0, hu, ul, WA, G5);
                }(J, Di, Gr, oe, ve, Oe, Ei, J.layers[0], J.collisionBoxArray, H.index, H.sourceLayerIndex, J.index, Fn, [dr, dr, dr, dr], Ai, Tt, vr, jr, Ui, hn, H, Xe, Nt, Vt, rt);
              };
              if (_i === "line") for (const Gr of qe(H.geometry, 0, 0, Bl, Bl)) {
                const Di = cn(Gr, rr, oi, oe.vertical || kn, ve, 24, qn, J.overscaling, Bl);
                for (const Pi of Di) kn && ga(J, kn.text, fi, Pi) || ki(Gr, Pi);
              }
              else if (_i === "line-center") {
                for (const Gr of H.geometry) if (Gr.length > 1) {
                  const Di = nn(Gr, oi, oe.vertical || kn, ve, 24, qn);
                  Di && ki(Gr, Di);
                }
              } else if (H.type === "Polygon") for (const Gr of xs(H.geometry, 0)) {
                const Di = Ur(Gr, 16);
                ki(Gr[0], new et(Di.x, Di.y, 0));
              }
              else if (H.type === "LineString") for (const Gr of H.geometry) ki(Gr, new et(Gr[0].x, Gr[0].y, 0));
              else if (H.type === "Point") for (const Gr of H.geometry) for (const Di of Gr) ki([Di], new et(Di.x, Di.y, 0));
            }
            function Ii(J, H, oe, ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn) {
              const xn = function(vr, rr, dr, jr, oi, Ai, Ui, _i) {
                const fi = jr.layout.get("text-rotate").evaluate(Ai, {}) * Math.PI / 180, Bi = [];
                for (const Ei of rr.positionedLines) for (const ki of Ei.positionedGlyphs) {
                  if (!ki.rect) continue;
                  const Gr = ki.rect || {};
                  let Di = im + 1, Pi = !0, Qi = 1, Ka = 0;
                  const Ja = (oi || _i) && ki.vertical, Gs = ki.metrics.advance * ki.scale / 2;
                  if (_i && rr.verticalizable) {
                    const hs = (ki.scale - 1) * jl, ds = (jl - ki.metrics.width * ki.scale) / 2;
                    Ka = Ei.lineOffset / 2 - (ki.imageName ? -ds : hs);
                  }
                  if (ki.imageName) {
                    const hs = Ui[ki.imageName];
                    Pi = hs.sdf, Qi = hs.pixelRatio, Di = rf / Qi;
                  }
                  const mc = oi ? [ki.x + Gs, ki.y] : [0, 0];
                  let _l = oi ? [0, 0] : [ki.x + Gs + dr[0], ki.y + dr[1] - Ka], ll = [0, 0];
                  Ja && (ll = _l, _l = [0, 0]);
                  const rc = ki.metrics.isDoubleResolution ? 2 : 1, Tu = (ki.metrics.left - Di) * ki.scale - Gs + _l[0], Ss = (-ki.metrics.top - Di) * ki.scale + _l[1], fs = Tu + Gr.w / rc * ki.scale / Qi, hu = Ss + Gr.h / rc * ki.scale / Qi, Ws = new d(Tu, Ss), wl = new d(fs, Ss), Au = new d(Tu, hu), gc = new d(fs, hu);
                  if (Ja) {
                    const hs = new d(-Gs, Gs - om), ds = -Math.PI / 2, ps = jl / 2 - Gs, Yd = ki.imageName ? ps : 0, kf = new d(5 - om - ps, -Yd), $l = new d(...ll);
                    Ws._rotateAround(ds, hs)._add(kf)._add($l), wl._rotateAround(ds, hs)._add(kf)._add($l), Au._rotateAround(ds, hs)._add(kf)._add($l), gc._rotateAround(ds, hs)._add(kf)._add($l);
                  }
                  if (fi) {
                    const hs = Math.sin(fi), ds = Math.cos(fi), ps = [ds, -hs, hs, ds];
                    Ws._matMult(ps), wl._matMult(ps), Au._matMult(ps), gc._matMult(ps);
                  }
                  const $u = new d(0, 0), Ms = new d(0, 0);
                  Bi.push({ tl: Ws, tr: wl, bl: Au, br: gc, tex: Gr, writingMode: rr.writingMode, glyphOffset: mc, sectionIndex: ki.sectionIndex, isSDF: Pi, pixelOffsetTL: $u, pixelOffsetBR: Ms, minFontScaleX: 0, minFontScaleY: 0 });
                }
                return Bi;
              }(0, oe, yt, Oe, Xe, rt, ve, J.allowVerticalPlacement), Fn = J.textSizeData;
              let qn = null;
              Fn.kind === "source" ? (qn = [hd * Oe.layout.get("text-size").evaluate(rt, {})], qn[0] > Gp && T(`${J.layerIds[0]}: Value for "text-size" is >= ${fd}. Reduce your "text-size".`)) : Fn.kind === "composite" && (qn = [hd * hn.compositeTextSizes[0].evaluate(rt, {}, kn), hd * hn.compositeTextSizes[1].evaluate(rt, {}, kn)], (qn[0] > Gp || qn[1] > Gp) && T(`${J.layerIds[0]}: Value for "text-size" is >= ${fd}. Reduce your "text-size".`)), J.addSymbols(J.text, xn, qn, yt, Xe, rt, Nt, H, Tt.lineStartIndex, Tt.lineLength, an, kn);
              for (const vr of Vt) Kt[vr] = J.text.placedSymbolArray.length - 1;
              return 4 * xn.length;
            }
            function za(J) {
              for (const H in J) return J[H];
              return null;
            }
            function ga(J, H, oe, ve) {
              const Oe = J.compareText;
              if (H in Oe) {
                const Xe = Oe[H];
                for (let rt = Xe.length - 1; rt >= 0; rt--) if (ve.dist(Xe[rt]) < oe) return !0;
              } else Oe[H] = [];
              return Oe[H].push(ve), !1;
            }
            const fo = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
            class Wi {
              static from(H) {
                if (!(H instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer.");
                const [oe, ve] = new Uint8Array(H, 0, 2);
                if (oe !== 219) throw new Error("Data does not appear to be in a KDBush format.");
                const Oe = ve >> 4;
                if (Oe !== 1) throw new Error(`Got v${Oe} data when expected v1.`);
                const Xe = fo[15 & ve];
                if (!Xe) throw new Error("Unrecognized array type.");
                const [rt] = new Uint16Array(H, 2, 1), [yt] = new Uint32Array(H, 4, 1);
                return new Wi(yt, rt, Xe, H);
              }
              constructor(H, oe = 64, ve = Float64Array, Oe) {
                if (isNaN(H) || H < 0) throw new Error(`Unpexpected numItems value: ${H}.`);
                this.numItems = +H, this.nodeSize = Math.min(Math.max(+oe, 2), 65535), this.ArrayType = ve, this.IndexArrayType = H < 65536 ? Uint16Array : Uint32Array;
                const Xe = fo.indexOf(this.ArrayType), rt = 2 * H * this.ArrayType.BYTES_PER_ELEMENT, yt = H * this.IndexArrayType.BYTES_PER_ELEMENT, Tt = (8 - yt % 8) % 8;
                if (Xe < 0) throw new Error(`Unexpected typed array class: ${ve}.`);
                Oe && Oe instanceof ArrayBuffer ? (this.data = Oe, this.ids = new this.IndexArrayType(this.data, 8, H), this.coords = new this.ArrayType(this.data, 8 + yt + Tt, 2 * H), this._pos = 2 * H, this._finished = !0) : (this.data = new ArrayBuffer(8 + rt + yt + Tt), this.ids = new this.IndexArrayType(this.data, 8, H), this.coords = new this.ArrayType(this.data, 8 + yt + Tt, 2 * H), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, 16 + Xe]), new Uint16Array(this.data, 2, 1)[0] = oe, new Uint32Array(this.data, 4, 1)[0] = H);
              }
              add(H, oe) {
                const ve = this._pos >> 1;
                return this.ids[ve] = ve, this.coords[this._pos++] = H, this.coords[this._pos++] = oe, ve;
              }
              finish() {
                const H = this._pos >> 1;
                if (H !== this.numItems) throw new Error(`Added ${H} items when expected ${this.numItems}.`);
                return Xa(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
              }
              range(H, oe, ve, Oe) {
                if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
                const { ids: Xe, coords: rt, nodeSize: yt } = this, Tt = [0, Xe.length - 1, 0], Nt = [];
                for (; Tt.length; ) {
                  const Vt = Tt.pop() || 0, Kt = Tt.pop() || 0, an = Tt.pop() || 0;
                  if (Kt - an <= yt) {
                    for (let Fn = an; Fn <= Kt; Fn++) {
                      const qn = rt[2 * Fn], vr = rt[2 * Fn + 1];
                      qn >= H && qn <= ve && vr >= oe && vr <= Oe && Nt.push(Xe[Fn]);
                    }
                    continue;
                  }
                  const hn = an + Kt >> 1, kn = rt[2 * hn], xn = rt[2 * hn + 1];
                  kn >= H && kn <= ve && xn >= oe && xn <= Oe && Nt.push(Xe[hn]), (Vt === 0 ? H <= kn : oe <= xn) && (Tt.push(an), Tt.push(hn - 1), Tt.push(1 - Vt)), (Vt === 0 ? ve >= kn : Oe >= xn) && (Tt.push(hn + 1), Tt.push(Kt), Tt.push(1 - Vt));
                }
                return Nt;
              }
              within(H, oe, ve) {
                if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
                const { ids: Oe, coords: Xe, nodeSize: rt } = this, yt = [0, Oe.length - 1, 0], Tt = [], Nt = ve * ve;
                for (; yt.length; ) {
                  const Vt = yt.pop() || 0, Kt = yt.pop() || 0, an = yt.pop() || 0;
                  if (Kt - an <= rt) {
                    for (let Fn = an; Fn <= Kt; Fn++) ho(Xe[2 * Fn], Xe[2 * Fn + 1], H, oe) <= Nt && Tt.push(Oe[Fn]);
                    continue;
                  }
                  const hn = an + Kt >> 1, kn = Xe[2 * hn], xn = Xe[2 * hn + 1];
                  ho(kn, xn, H, oe) <= Nt && Tt.push(Oe[hn]), (Vt === 0 ? H - ve <= kn : oe - ve <= xn) && (yt.push(an), yt.push(hn - 1), yt.push(1 - Vt)), (Vt === 0 ? H + ve >= kn : oe + ve >= xn) && (yt.push(hn + 1), yt.push(Kt), yt.push(1 - Vt));
                }
                return Tt;
              }
            }
            function Xa(J, H, oe, ve, Oe, Xe) {
              if (Oe - ve <= oe) return;
              const rt = ve + Oe >> 1;
              bo(J, H, rt, ve, Oe, Xe), Xa(J, H, oe, ve, rt - 1, 1 - Xe), Xa(J, H, oe, rt + 1, Oe, 1 - Xe);
            }
            function bo(J, H, oe, ve, Oe, Xe) {
              for (; Oe > ve; ) {
                if (Oe - ve > 600) {
                  const Nt = Oe - ve + 1, Vt = oe - ve + 1, Kt = Math.log(Nt), an = 0.5 * Math.exp(2 * Kt / 3), hn = 0.5 * Math.sqrt(Kt * an * (Nt - an) / Nt) * (Vt - Nt / 2 < 0 ? -1 : 1);
                  bo(J, H, oe, Math.max(ve, Math.floor(oe - Vt * an / Nt + hn)), Math.min(Oe, Math.floor(oe + (Nt - Vt) * an / Nt + hn)), Xe);
                }
                const rt = H[2 * oe + Xe];
                let yt = ve, Tt = Oe;
                for (oo(J, H, ve, oe), H[2 * Oe + Xe] > rt && oo(J, H, ve, Oe); yt < Tt; ) {
                  for (oo(J, H, yt, Tt), yt++, Tt--; H[2 * yt + Xe] < rt; ) yt++;
                  for (; H[2 * Tt + Xe] > rt; ) Tt--;
                }
                H[2 * ve + Xe] === rt ? oo(J, H, ve, Tt) : (Tt++, oo(J, H, Tt, Oe)), Tt <= oe && (ve = Tt + 1), oe <= Tt && (Oe = Tt - 1);
              }
            }
            function oo(J, H, oe, ve) {
              _o(J, oe, ve), _o(H, 2 * oe, 2 * ve), _o(H, 2 * oe + 1, 2 * ve + 1);
            }
            function _o(J, H, oe) {
              const ve = J[H];
              J[H] = J[oe], J[oe] = ve;
            }
            function ho(J, H, oe, ve) {
              const Oe = J - oe, Xe = H - ve;
              return Oe * Oe + Xe * Xe;
            }
            var qs;
            u.bf = void 0, (qs = u.bf || (u.bf = {})).create = "create", qs.load = "load", qs.fullLoad = "fullLoad";
            let Oo = null, Hs = [];
            const fu = 1e3 / 60, Vl = "loadTime", Vu = "fullLoadTime", ku = { mark(J) {
              performance.mark(J);
            }, frame(J) {
              const H = J;
              if (Oo != null) {
                const oe = H - Oo;
                Hs.push(oe);
              }
              Oo = H;
            }, clearMetrics() {
              Oo = null, Hs = [], performance.clearMeasures(Vl), performance.clearMeasures(Vu);
              for (const J in u.bf) performance.clearMarks(u.bf[J]);
            }, getPerformanceMetrics() {
              performance.measure(Vl, u.bf.create, u.bf.load), performance.measure(Vu, u.bf.create, u.bf.fullLoad);
              const J = performance.getEntriesByName(Vl)[0].duration, H = performance.getEntriesByName(Vu)[0].duration, oe = Hs.length, ve = 1 / (Hs.reduce((Xe, rt) => Xe + rt, 0) / oe / 1e3), Oe = Hs.filter((Xe) => Xe > fu).reduce((Xe, rt) => Xe + (rt - fu) / fu, 0);
              return { loadTime: J, fullLoadTime: H, fps: ve, percentDroppedFrames: Oe / (oe + Oe) * 100, totalFrames: oe };
            } };
            u.$ = class extends G {
            }, u.A = u1, u.B = el, u.C = function(J) {
              if (U == null) {
                const H = J.navigator ? J.navigator.userAgent : null;
                U = !!J.safari || !(!H || !(/\b(iPad|iPhone|iPod)\b/.test(H) || H.match("Safari") && !H.match("Chrome")));
              }
              return U;
            }, u.D = bi, u.E = ye, u.F = class {
              constructor(J, H) {
                this.target = J, this.mapId = H, this.resolveRejects = {}, this.tasks = {}, this.taskQueue = [], this.abortControllers = {}, this.messageHandlers = {}, this.invoker = new b_(() => this.process()), this.subscription = function(oe, ve, Oe, Xe) {
                  return oe.addEventListener(ve, Oe, Xe), { unsubscribe: () => {
                    oe.removeEventListener(ve, Oe, Xe);
                  } };
                }(this.target, "message", (oe) => this.receive(oe), !1), this.globalScope = F(self) ? J : window;
              }
              registerMessageHandler(J, H) {
                this.messageHandlers[J] = H;
              }
              sendAsync(J, H) {
                return new Promise((oe, ve) => {
                  const Oe = Math.round(1e18 * Math.random()).toString(36).substring(0, 10);
                  this.resolveRejects[Oe] = { resolve: oe, reject: ve }, H && H.signal.addEventListener("abort", () => {
                    delete this.resolveRejects[Oe];
                    const yt = { id: Oe, type: "<cancel>", origin: location.origin, targetMapId: J.targetMapId, sourceMapId: this.mapId };
                    this.target.postMessage(yt);
                  }, { once: !0 });
                  const Xe = [], rt = Object.assign(Object.assign({}, J), { id: Oe, sourceMapId: this.mapId, origin: location.origin, data: nl(J.data, Xe) });
                  this.target.postMessage(rt, { transfer: Xe });
                });
              }
              receive(J) {
                const H = J.data, oe = H.id;
                if (!(H.origin !== "file://" && location.origin !== "file://" && H.origin !== "resource://android" && location.origin !== "resource://android" && H.origin !== location.origin || H.targetMapId && this.mapId !== H.targetMapId)) {
                  if (H.type === "<cancel>") {
                    delete this.tasks[oe];
                    const ve = this.abortControllers[oe];
                    return delete this.abortControllers[oe], void (ve && ve.abort());
                  }
                  if (F(self) || H.mustQueue) return this.tasks[oe] = H, this.taskQueue.push(oe), void this.invoker.trigger();
                  this.processTask(oe, H);
                }
              }
              process() {
                if (this.taskQueue.length === 0) return;
                const J = this.taskQueue.shift(), H = this.tasks[J];
                delete this.tasks[J], this.taskQueue.length > 0 && this.invoker.trigger(), H && this.processTask(J, H);
              }
              processTask(J, H) {
                return i(this, void 0, void 0, function* () {
                  if (H.type === "<response>") {
                    const Oe = this.resolveRejects[J];
                    return delete this.resolveRejects[J], Oe ? void (H.error ? Oe.reject(Vo(H.error)) : Oe.resolve(Vo(H.data))) : void 0;
                  }
                  if (!this.messageHandlers[H.type]) return void this.completeTask(J, new Error(`Could not find a registered handler for ${H.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));
                  const oe = Vo(H.data), ve = new AbortController();
                  this.abortControllers[J] = ve;
                  try {
                    const Oe = yield this.messageHandlers[H.type](H.sourceMapId, oe, ve);
                    this.completeTask(J, null, Oe);
                  } catch (Oe) {
                    this.completeTask(J, Oe);
                  }
                });
              }
              completeTask(J, H, oe) {
                const ve = [];
                delete this.abortControllers[J];
                const Oe = { id: J, type: "<response>", sourceMapId: this.mapId, origin: location.origin, error: H ? nl(H) : null, data: nl(oe, ve) };
                this.target.postMessage(Oe, { transfer: ve });
              }
              remove() {
                this.invoker.remove(), this.subscription.unsubscribe();
              }
            }, u.G = Q, u.H = function() {
              var J = new u1(16);
              return u1 != Float32Array && (J[1] = 0, J[2] = 0, J[3] = 0, J[4] = 0, J[6] = 0, J[7] = 0, J[8] = 0, J[9] = 0, J[11] = 0, J[12] = 0, J[13] = 0, J[14] = 0), J[0] = 1, J[5] = 1, J[10] = 1, J[15] = 1, J;
            }, u.I = p_, u.J = function(J, H, oe) {
              var ve, Oe, Xe, rt, yt, Tt, Nt, Vt, Kt, an, hn, kn, xn = oe[0], Fn = oe[1], qn = oe[2];
              return H === J ? (J[12] = H[0] * xn + H[4] * Fn + H[8] * qn + H[12], J[13] = H[1] * xn + H[5] * Fn + H[9] * qn + H[13], J[14] = H[2] * xn + H[6] * Fn + H[10] * qn + H[14], J[15] = H[3] * xn + H[7] * Fn + H[11] * qn + H[15]) : (ve = H[0], Oe = H[1], Xe = H[2], rt = H[3], yt = H[4], Tt = H[5], Nt = H[6], Vt = H[7], Kt = H[8], an = H[9], hn = H[10], kn = H[11], J[0] = ve, J[1] = Oe, J[2] = Xe, J[3] = rt, J[4] = yt, J[5] = Tt, J[6] = Nt, J[7] = Vt, J[8] = Kt, J[9] = an, J[10] = hn, J[11] = kn, J[12] = ve * xn + yt * Fn + Kt * qn + H[12], J[13] = Oe * xn + Tt * Fn + an * qn + H[13], J[14] = Xe * xn + Nt * Fn + hn * qn + H[14], J[15] = rt * xn + Vt * Fn + kn * qn + H[15]), J;
            }, u.K = function(J, H, oe) {
              var ve = oe[0], Oe = oe[1], Xe = oe[2];
              return J[0] = H[0] * ve, J[1] = H[1] * ve, J[2] = H[2] * ve, J[3] = H[3] * ve, J[4] = H[4] * Oe, J[5] = H[5] * Oe, J[6] = H[6] * Oe, J[7] = H[7] * Oe, J[8] = H[8] * Xe, J[9] = H[9] * Xe, J[10] = H[10] * Xe, J[11] = H[11] * Xe, J[12] = H[12], J[13] = H[13], J[14] = H[14], J[15] = H[15], J;
            }, u.L = e5, u.M = function(J, H) {
              const oe = {};
              for (let ve = 0; ve < H.length; ve++) {
                const Oe = H[ve];
                Oe in J && (oe[Oe] = J[Oe]);
              }
              return oe;
            }, u.N = _f, u.O = _1, u.P = d, u.Q = dd, u.R = xf, u.S = wf, u.T = al, u.U = w, u.V = k, u.W = q, u.X = Bl, u.Y = y, u.Z = k1, u._ = i, u.a = ee, u.a$ = function(J, H) {
              var oe = J[0], ve = J[1], Oe = J[2], Xe = J[3], rt = J[4], yt = J[5], Tt = J[6], Nt = J[7], Vt = J[8], Kt = J[9], an = J[10], hn = J[11], kn = J[12], xn = J[13], Fn = J[14], qn = J[15], vr = H[0], rr = H[1], dr = H[2], jr = H[3], oi = H[4], Ai = H[5], Ui = H[6], _i = H[7], fi = H[8], Bi = H[9], Ei = H[10], ki = H[11], Gr = H[12], Di = H[13], Pi = H[14], Qi = H[15];
              return Math.abs(oe - vr) <= wu * Math.max(1, Math.abs(oe), Math.abs(vr)) && Math.abs(ve - rr) <= wu * Math.max(1, Math.abs(ve), Math.abs(rr)) && Math.abs(Oe - dr) <= wu * Math.max(1, Math.abs(Oe), Math.abs(dr)) && Math.abs(Xe - jr) <= wu * Math.max(1, Math.abs(Xe), Math.abs(jr)) && Math.abs(rt - oi) <= wu * Math.max(1, Math.abs(rt), Math.abs(oi)) && Math.abs(yt - Ai) <= wu * Math.max(1, Math.abs(yt), Math.abs(Ai)) && Math.abs(Tt - Ui) <= wu * Math.max(1, Math.abs(Tt), Math.abs(Ui)) && Math.abs(Nt - _i) <= wu * Math.max(1, Math.abs(Nt), Math.abs(_i)) && Math.abs(Vt - fi) <= wu * Math.max(1, Math.abs(Vt), Math.abs(fi)) && Math.abs(Kt - Bi) <= wu * Math.max(1, Math.abs(Kt), Math.abs(Bi)) && Math.abs(an - Ei) <= wu * Math.max(1, Math.abs(an), Math.abs(Ei)) && Math.abs(hn - ki) <= wu * Math.max(1, Math.abs(hn), Math.abs(ki)) && Math.abs(kn - Gr) <= wu * Math.max(1, Math.abs(kn), Math.abs(Gr)) && Math.abs(xn - Di) <= wu * Math.max(1, Math.abs(xn), Math.abs(Di)) && Math.abs(Fn - Pi) <= wu * Math.max(1, Math.abs(Fn), Math.abs(Pi)) && Math.abs(qn - Qi) <= wu * Math.max(1, Math.abs(qn), Math.abs(Qi));
            }, u.a0 = pa, u.a1 = qh, u.a2 = Ce, u.a3 = (J) => {
              const H = window.document.createElement("video");
              return H.muted = !0, new Promise((oe) => {
                H.onloadstart = () => {
                  oe(H);
                };
                for (const ve of J) {
                  const Oe = window.document.createElement("source");
                  de(ve) || (H.crossOrigin = "Anonymous"), Oe.src = ve, H.appendChild(Oe);
                }
              });
            }, u.a4 = function() {
              return E++;
            }, u.a5 = Yn, u.a6 = Hd, u.a7 = Aa, u.a8 = J0, u.a9 = ni, u.aA = function(J) {
              J = J.slice();
              const H = /* @__PURE__ */ Object.create(null);
              for (let oe = 0; oe < J.length; oe++) H[J[oe].id] = J[oe];
              for (let oe = 0; oe < J.length; oe++) "ref" in J[oe] && (J[oe] = Ae(J[oe], H[J[oe].ref]));
              return J;
            }, u.aB = function(J) {
              if (J.type === "custom") return new B5(J);
              switch (J.type) {
                case "background":
                  return new R5(J);
                case "circle":
                  return new c1(J);
                case "fill":
                  return new EA(J);
                case "fill-extrusion":
                  return new RA(J);
                case "heatmap":
                  return new e_(J);
                case "hillshade":
                  return new r5(J);
                case "line":
                  return new uy(J);
                case "raster":
                  return new N5(J);
                case "symbol":
                  return new zs(J);
              }
            }, u.aC = M, u.aD = function(J, H) {
              if (!J) return [{ command: "setStyle", args: [H] }];
              let oe = [];
              try {
                if (!Se(J.version, H.version)) return [{ command: "setStyle", args: [H] }];
                Se(J.center, H.center) || oe.push({ command: "setCenter", args: [H.center] }), Se(J.zoom, H.zoom) || oe.push({ command: "setZoom", args: [H.zoom] }), Se(J.bearing, H.bearing) || oe.push({ command: "setBearing", args: [H.bearing] }), Se(J.pitch, H.pitch) || oe.push({ command: "setPitch", args: [H.pitch] }), Se(J.sprite, H.sprite) || oe.push({ command: "setSprite", args: [H.sprite] }), Se(J.glyphs, H.glyphs) || oe.push({ command: "setGlyphs", args: [H.glyphs] }), Se(J.transition, H.transition) || oe.push({ command: "setTransition", args: [H.transition] }), Se(J.light, H.light) || oe.push({ command: "setLight", args: [H.light] }), Se(J.terrain, H.terrain) || oe.push({ command: "setTerrain", args: [H.terrain] }), Se(J.sky, H.sky) || oe.push({ command: "setSky", args: [H.sky] }), Se(J.projection, H.projection) || oe.push({ command: "setProjection", args: [H.projection] });
                const ve = {}, Oe = [];
                (function(rt, yt, Tt, Nt) {
                  let Vt;
                  for (Vt in yt = yt || {}, rt = rt || {}) Object.prototype.hasOwnProperty.call(rt, Vt) && (Object.prototype.hasOwnProperty.call(yt, Vt) || Le(Vt, Tt, Nt));
                  for (Vt in yt) Object.prototype.hasOwnProperty.call(yt, Vt) && (Object.prototype.hasOwnProperty.call(rt, Vt) ? Se(rt[Vt], yt[Vt]) || (rt[Vt].type === "geojson" && yt[Vt].type === "geojson" && Ee(rt, yt, Vt) ? Me(Tt, { command: "setGeoJSONSourceData", args: [Vt, yt[Vt].data] }) : We(Vt, yt, Tt, Nt)) : De(Vt, yt, Tt));
                })(J.sources, H.sources, Oe, ve);
                const Xe = [];
                J.layers && J.layers.forEach((rt) => {
                  "source" in rt && ve[rt.source] ? oe.push({ command: "removeLayer", args: [rt.id] }) : Xe.push(rt);
                }), oe = oe.concat(Oe), function(rt, yt, Tt) {
                  yt = yt || [];
                  const Nt = (rt = rt || []).map(Ie), Vt = yt.map(Ie), Kt = rt.reduce(ge, {}), an = yt.reduce(ge, {}), hn = Nt.slice(), kn = /* @__PURE__ */ Object.create(null);
                  let xn, Fn, qn, vr, rr;
                  for (let dr = 0, jr = 0; dr < Nt.length; dr++) xn = Nt[dr], Object.prototype.hasOwnProperty.call(an, xn) ? jr++ : (Me(Tt, { command: "removeLayer", args: [xn] }), hn.splice(hn.indexOf(xn, jr), 1));
                  for (let dr = 0, jr = 0; dr < Vt.length; dr++) xn = Vt[Vt.length - 1 - dr], hn[hn.length - 1 - dr] !== xn && (Object.prototype.hasOwnProperty.call(Kt, xn) ? (Me(Tt, { command: "removeLayer", args: [xn] }), hn.splice(hn.lastIndexOf(xn, hn.length - jr), 1)) : jr++, vr = hn[hn.length - dr], Me(Tt, { command: "addLayer", args: [an[xn], vr] }), hn.splice(hn.length - dr, 0, xn), kn[xn] = !0);
                  for (let dr = 0; dr < Vt.length; dr++) if (xn = Vt[dr], Fn = Kt[xn], qn = an[xn], !kn[xn] && !Se(Fn, qn)) if (Se(Fn.source, qn.source) && Se(Fn["source-layer"], qn["source-layer"]) && Se(Fn.type, qn.type)) {
                    for (rr in Ne(Fn.layout, qn.layout, Tt, xn, null, "setLayoutProperty"), Ne(Fn.paint, qn.paint, Tt, xn, null, "setPaintProperty"), Se(Fn.filter, qn.filter) || Me(Tt, { command: "setFilter", args: [xn, qn.filter] }), Se(Fn.minzoom, qn.minzoom) && Se(Fn.maxzoom, qn.maxzoom) || Me(Tt, { command: "setLayerZoomRange", args: [xn, qn.minzoom, qn.maxzoom] }), Fn) Object.prototype.hasOwnProperty.call(Fn, rr) && rr !== "layout" && rr !== "paint" && rr !== "filter" && rr !== "metadata" && rr !== "minzoom" && rr !== "maxzoom" && (rr.indexOf("paint.") === 0 ? Ne(Fn[rr], qn[rr], Tt, xn, rr.slice(6), "setPaintProperty") : Se(Fn[rr], qn[rr]) || Me(Tt, { command: "setLayerProperty", args: [xn, rr, qn[rr]] }));
                    for (rr in qn) Object.prototype.hasOwnProperty.call(qn, rr) && !Object.prototype.hasOwnProperty.call(Fn, rr) && rr !== "layout" && rr !== "paint" && rr !== "filter" && rr !== "metadata" && rr !== "minzoom" && rr !== "maxzoom" && (rr.indexOf("paint.") === 0 ? Ne(Fn[rr], qn[rr], Tt, xn, rr.slice(6), "setPaintProperty") : Se(Fn[rr], qn[rr]) || Me(Tt, { command: "setLayerProperty", args: [xn, rr, qn[rr]] }));
                  } else Me(Tt, { command: "removeLayer", args: [xn] }), vr = hn[hn.lastIndexOf(xn) + 1], Me(Tt, { command: "addLayer", args: [qn, vr] });
                }(Xe, H.layers, oe);
              } catch (ve) {
                console.warn("Unable to compute style diff:", ve), oe = [{ command: "setStyle", args: [H] }];
              }
              return oe;
            }, u.aE = function(J) {
              const H = [], oe = J.id;
              return oe === void 0 && H.push({ message: `layers.${oe}: missing required property "id"` }), J.render === void 0 && H.push({ message: `layers.${oe}: missing required method "render"` }), J.renderingMode && J.renderingMode !== "2d" && J.renderingMode !== "3d" && H.push({ message: `layers.${oe}: property "renderingMode" must be either "2d" or "3d"` }), H;
            }, u.aF = function J(H, oe) {
              if (Array.isArray(H)) {
                if (!Array.isArray(oe) || H.length !== oe.length) return !1;
                for (let ve = 0; ve < H.length; ve++) if (!J(H[ve], oe[ve])) return !1;
                return !0;
              }
              if (typeof H == "object" && H !== null && oe !== null) {
                if (typeof oe != "object" || Object.keys(H).length !== Object.keys(oe).length) return !1;
                for (const ve in H) if (!J(H[ve], oe[ve])) return !1;
                return !0;
              }
              return H === oe;
            }, u.aG = P, u.aH = I, u.aI = class extends fc {
              constructor(J, H) {
                super(J, H), this.current = 0;
              }
              set(J) {
                this.current !== J && (this.current = J, this.gl.uniform1i(this.location, J));
              }
            }, u.aJ = Vd, u.aK = class extends fc {
              constructor(J, H) {
                super(J, H), this.current = Rp;
              }
              set(J) {
                if (J[12] !== this.current[12] || J[0] !== this.current[0]) return this.current = J, void this.gl.uniformMatrix4fv(this.location, !1, J);
                for (let H = 1; H < 16; H++) if (J[H] !== this.current[H]) {
                  this.current = J, this.gl.uniformMatrix4fv(this.location, !1, J);
                  break;
                }
              }
            }, u.aL = $f, u.aM = zp, u.aN = fn, u.aO = class extends fc {
              constructor(J, H) {
                super(J, H), this.current = [0, 0, 0];
              }
              set(J) {
                J[0] === this.current[0] && J[1] === this.current[1] && J[2] === this.current[2] || (this.current = J, this.gl.uniform3f(this.location, J[0], J[1], J[2]));
              }
            }, u.aP = class extends fc {
              constructor(J, H) {
                super(J, H), this.current = [0, 0];
              }
              set(J) {
                J[0] === this.current[0] && J[1] === this.current[1] || (this.current = J, this.gl.uniform2f(this.location, J[0], J[1]));
              }
            }, u.aQ = yA, u.aR = vA, u.aS = class extends Et {
            }, u.aT = b5, u.aU = class extends It {
            }, u.aV = function(J) {
              return J <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(J) / Math.LN2));
            }, u.aW = d1, u.aX = ei, u.aY = ca, u.aZ = class extends Sn {
            }, u.a_ = function(J, H) {
              return J[0] === H[0] && J[1] === H[1] && J[2] === H[2] && J[3] === H[3] && J[4] === H[4] && J[5] === H[5] && J[6] === H[6] && J[7] === H[7] && J[8] === H[8] && J[9] === H[9] && J[10] === H[10] && J[11] === H[11] && J[12] === H[12] && J[13] === H[13] && J[14] === H[14] && J[15] === H[15];
            }, u.aa = k_, u.ab = function(J) {
              const H = {};
              if (J.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, (oe, ve, Oe, Xe) => {
                const rt = Oe || Xe;
                return H[ve] = !rt || rt.toLowerCase(), "";
              }), H["max-age"]) {
                const oe = parseInt(H["max-age"], 10);
                isNaN(oe) ? delete H["max-age"] : H["max-age"] = oe;
              }
              return H;
            }, u.ac = function(J, H) {
              const oe = [];
              for (const ve in J) ve in H || oe.push(ve);
              return oe;
            }, u.ad = C, u.ae = function(J, H, oe) {
              var ve = Math.sin(oe), Oe = Math.cos(oe), Xe = H[0], rt = H[1], yt = H[2], Tt = H[3], Nt = H[4], Vt = H[5], Kt = H[6], an = H[7];
              return H !== J && (J[8] = H[8], J[9] = H[9], J[10] = H[10], J[11] = H[11], J[12] = H[12], J[13] = H[13], J[14] = H[14], J[15] = H[15]), J[0] = Xe * Oe + Nt * ve, J[1] = rt * Oe + Vt * ve, J[2] = yt * Oe + Kt * ve, J[3] = Tt * Oe + an * ve, J[4] = Nt * Oe - Xe * ve, J[5] = Vt * Oe - rt * ve, J[6] = Kt * Oe - yt * ve, J[7] = an * Oe - Tt * ve, J;
            }, u.af = function(J) {
              var H = new u1(16);
              return H[0] = J[0], H[1] = J[1], H[2] = J[2], H[3] = J[3], H[4] = J[4], H[5] = J[5], H[6] = J[6], H[7] = J[7], H[8] = J[8], H[9] = J[9], H[10] = J[10], H[11] = J[11], H[12] = J[12], H[13] = J[13], H[14] = J[14], H[15] = J[15], H;
            }, u.ag = l2, u.ah = function(J, H) {
              let oe = 0, ve = 0;
              if (J.kind === "constant") ve = J.layoutSize;
              else if (J.kind !== "source") {
                const { interpolationType: Oe, minZoom: Xe, maxZoom: rt } = J, yt = Oe ? C(Nn.interpolationFactor(Oe, H, Xe, rt), 0, 1) : 0;
                J.kind === "camera" ? ve = bn.number(J.minSize, J.maxSize, yt) : oe = yt;
              }
              return { uSizeT: oe, uSize: ve };
            }, u.aj = function(J, { uSize: H, uSizeT: oe }, { lowerSize: ve, upperSize: Oe }) {
              return J.kind === "source" ? ve / hd : J.kind === "composite" ? bn.number(ve / hd, Oe / hd, oe) : H;
            }, u.ak = E2, u.al = function(J, H, oe, ve) {
              const Oe = H.y - J.y, Xe = H.x - J.x, rt = ve.y - oe.y, yt = ve.x - oe.x, Tt = rt * Xe - yt * Oe;
              if (Tt === 0) return null;
              const Nt = (yt * (J.y - oe.y) - rt * (J.x - oe.x)) / Tt;
              return new d(J.x + Nt * Xe, J.y + Nt * Oe);
            }, u.am = qe, u.an = Gb, u.ao = Qb, u.ap = function(J) {
              let H = 1 / 0, oe = 1 / 0, ve = -1 / 0, Oe = -1 / 0;
              for (const Xe of J) H = Math.min(H, Xe.x), oe = Math.min(oe, Xe.y), ve = Math.max(ve, Xe.x), Oe = Math.max(Oe, Xe.y);
              return [H, oe, ve, Oe];
            }, u.aq = jl, u.as = g_, u.at = function(J, H) {
              var oe = H[0], ve = H[1], Oe = H[2], Xe = H[3], rt = H[4], yt = H[5], Tt = H[6], Nt = H[7], Vt = H[8], Kt = H[9], an = H[10], hn = H[11], kn = H[12], xn = H[13], Fn = H[14], qn = H[15], vr = oe * yt - ve * rt, rr = oe * Tt - Oe * rt, dr = oe * Nt - Xe * rt, jr = ve * Tt - Oe * yt, oi = ve * Nt - Xe * yt, Ai = Oe * Nt - Xe * Tt, Ui = Vt * xn - Kt * kn, _i = Vt * Fn - an * kn, fi = Vt * qn - hn * kn, Bi = Kt * Fn - an * xn, Ei = Kt * qn - hn * xn, ki = an * qn - hn * Fn, Gr = vr * ki - rr * Ei + dr * Bi + jr * fi - oi * _i + Ai * Ui;
              return Gr ? (Gr = 1 / Gr, J[0] = (yt * ki - Tt * Ei + Nt * Bi) * Gr, J[1] = (Oe * Ei - ve * ki - Xe * Bi) * Gr, J[2] = (xn * Ai - Fn * oi + qn * jr) * Gr, J[3] = (an * oi - Kt * Ai - hn * jr) * Gr, J[4] = (Tt * fi - rt * ki - Nt * _i) * Gr, J[5] = (oe * ki - Oe * fi + Xe * _i) * Gr, J[6] = (Fn * dr - kn * Ai - qn * rr) * Gr, J[7] = (Vt * Ai - an * dr + hn * rr) * Gr, J[8] = (rt * Ei - yt * fi + Nt * Ui) * Gr, J[9] = (ve * fi - oe * Ei - Xe * Ui) * Gr, J[10] = (kn * oi - xn * dr + qn * vr) * Gr, J[11] = (Kt * dr - Vt * oi - hn * vr) * Gr, J[12] = (yt * _i - rt * Bi - Tt * Ui) * Gr, J[13] = (oe * Bi - ve * _i + Oe * Ui) * Gr, J[14] = (xn * rr - kn * jr - Fn * vr) * Gr, J[15] = (Vt * jr - Kt * rr + an * vr) * Gr, J) : null;
            }, u.au = Ki, u.av = Hp, u.aw = Wi, u.ax = function() {
              const J = {}, H = pe.$version;
              for (const oe in pe.$root) {
                const ve = pe.$root[oe];
                if (ve.required) {
                  let Oe = null;
                  Oe = oe === "version" ? H : ve.type === "array" ? [] : {}, Oe != null && (J[oe] = Oe);
                }
              }
              return J;
            }, u.ay = Qu, u.az = ce, u.b = V, u.b0 = function(J, H) {
              return J[0] = H[0], J[1] = H[1], J[2] = H[2], J[3] = H[3], J[4] = H[4], J[5] = H[5], J[6] = H[6], J[7] = H[7], J[8] = H[8], J[9] = H[9], J[10] = H[10], J[11] = H[11], J[12] = H[12], J[13] = H[13], J[14] = H[14], J[15] = H[15], J;
            }, u.b1 = xA, u.b2 = function(J, H) {
              return J[0] * H[0] + J[1] * H[1] + J[2] * H[2] + J[3] * H[3];
            }, u.b3 = D, u.b4 = w_, u.b5 = py, u.b6 = gA, u.b7 = function(J, H, oe) {
              var ve = Math.sin(oe), Oe = Math.cos(oe), Xe = H[4], rt = H[5], yt = H[6], Tt = H[7], Nt = H[8], Vt = H[9], Kt = H[10], an = H[11];
              return H !== J && (J[0] = H[0], J[1] = H[1], J[2] = H[2], J[3] = H[3], J[12] = H[12], J[13] = H[13], J[14] = H[14], J[15] = H[15]), J[4] = Xe * Oe + Nt * ve, J[5] = rt * Oe + Vt * ve, J[6] = yt * Oe + Kt * ve, J[7] = Tt * Oe + an * ve, J[8] = Nt * Oe - Xe * ve, J[9] = Vt * Oe - rt * ve, J[10] = Kt * Oe - yt * ve, J[11] = an * Oe - Tt * ve, J;
            }, u.b8 = S, u.b9 = A, u.bA = function(J) {
              return J.message === Y;
            }, u.bB = to, u.bC = il, u.ba = function(J) {
              return J * Math.PI / 180;
            }, u.bb = function(J, H) {
              return J[0] = H[0], J[1] = 0, J[2] = 0, J[3] = 0, J[4] = 0, J[5] = H[1], J[6] = 0, J[7] = 0, J[8] = 0, J[9] = 0, J[10] = H[2], J[11] = 0, J[12] = 0, J[13] = 0, J[14] = 0, J[15] = 1, J;
            }, u.bc = class extends j {
            }, u.bd = Gd, u.be = ku, u.bg = ue, u.bh = function(J, H) {
              ee.REGISTERED_PROTOCOLS[J] = H;
            }, u.bi = function(J) {
              delete ee.REGISTERED_PROTOCOLS[J];
            }, u.bj = function(J, H) {
              const oe = {};
              for (let Oe = 0; Oe < J.length; Oe++) {
                const Xe = H && H[J[Oe].id] || bu(J[Oe]);
                H && (H[J[Oe].id] = Xe);
                let rt = oe[Xe];
                rt || (rt = oe[Xe] = []), rt.push(J[Oe]);
              }
              const ve = [];
              for (const Oe in oe) ve.push(oe[Oe]);
              return ve;
            }, u.bk = di, u.bl = Wd, u.bm = N, u.bn = am, u.bo = function(J) {
              J.bucket.createArrays();
              const H = 512 * J.bucket.overscaling;
              J.bucket.tilePixelRatio = Bl / H, J.bucket.compareText = {}, J.bucket.iconsNeedLinear = !1;
              const oe = J.bucket.layers[0], ve = oe.layout, Oe = oe._unevaluatedLayout._values, Xe = { layoutIconSize: Oe["icon-size"].possiblyEvaluate(new ni(J.bucket.zoom + 1), J.canonical), layoutTextSize: Oe["text-size"].possiblyEvaluate(new ni(J.bucket.zoom + 1), J.canonical), textMaxSize: Oe["text-size"].possiblyEvaluate(new ni(18)) };
              if (J.bucket.textSizeData.kind === "composite") {
                const { minZoom: Vt, maxZoom: Kt } = J.bucket.textSizeData;
                Xe.compositeTextSizes = [Oe["text-size"].possiblyEvaluate(new ni(Vt), J.canonical), Oe["text-size"].possiblyEvaluate(new ni(Kt), J.canonical)];
              }
              if (J.bucket.iconSizeData.kind === "composite") {
                const { minZoom: Vt, maxZoom: Kt } = J.bucket.iconSizeData;
                Xe.compositeIconSizes = [Oe["icon-size"].possiblyEvaluate(new ni(Vt), J.canonical), Oe["icon-size"].possiblyEvaluate(new ni(Kt), J.canonical)];
              }
              const rt = ve.get("text-line-height") * jl, yt = ve.get("text-rotation-alignment") !== "viewport" && ve.get("symbol-placement") !== "point", Tt = ve.get("text-keep-upright"), Nt = ve.get("text-size");
              for (const Vt of J.bucket.features) {
                const Kt = ve.get("text-font").evaluate(Vt, {}, J.canonical).join(","), an = Nt.evaluate(Vt, {}, J.canonical), hn = Xe.layoutTextSize.evaluate(Vt, {}, J.canonical), kn = Xe.layoutIconSize.evaluate(Vt, {}, J.canonical), xn = { horizontal: {}, vertical: void 0 }, Fn = Vt.text;
                let qn, vr = [0, 0];
                if (Fn) {
                  const jr = Fn.toString(), oi = ve.get("text-letter-spacing").evaluate(Vt, {}, J.canonical) * jl, Ai = ma(jr) ? oi : 0, Ui = ve.get("text-anchor").evaluate(Vt, {}, J.canonical), _i = zi(oe, Vt, J.canonical);
                  if (!_i) {
                    const ki = ve.get("text-radial-offset").evaluate(Vt, {}, J.canonical);
                    vr = ki ? ta(Ui, [ki * jl, Ti]) : ve.get("text-offset").evaluate(Vt, {}, J.canonical).map((Gr) => Gr * jl);
                  }
                  let fi = yt ? "center" : ve.get("text-justify").evaluate(Vt, {}, J.canonical);
                  const Bi = ve.get("symbol-placement") === "point" ? ve.get("text-max-width").evaluate(Vt, {}, J.canonical) * jl : 1 / 0, Ei = () => {
                    J.bucket.allowVerticalPlacement && ls(jr) && (xn.vertical = qp(Fn, J.glyphMap, J.glyphPositions, J.imagePositions, Kt, Bi, rt, Ui, "left", Ai, vr, u.ai.vertical, !0, hn, an));
                  };
                  if (!yt && _i) {
                    const ki = /* @__PURE__ */ new Set();
                    if (fi === "auto") for (let Di = 0; Di < _i.values.length; Di += 2) ki.add(Ki(_i.values[Di]));
                    else ki.add(fi);
                    let Gr = !1;
                    for (const Di of ki) if (!xn.horizontal[Di]) if (Gr) xn.horizontal[Di] = xn.horizontal[0];
                    else {
                      const Pi = qp(Fn, J.glyphMap, J.glyphPositions, J.imagePositions, Kt, Bi, rt, "center", Di, Ai, vr, u.ai.horizontal, !1, hn, an);
                      Pi && (xn.horizontal[Di] = Pi, Gr = Pi.positionedLines.length === 1);
                    }
                    Ei();
                  } else {
                    fi === "auto" && (fi = Ki(Ui));
                    const ki = qp(Fn, J.glyphMap, J.glyphPositions, J.imagePositions, Kt, Bi, rt, Ui, fi, Ai, vr, u.ai.horizontal, !1, hn, an);
                    ki && (xn.horizontal[fi] = ki), Ei(), ls(jr) && yt && Tt && (xn.vertical = qp(Fn, J.glyphMap, J.glyphPositions, J.imagePositions, Kt, Bi, rt, Ui, fi, Ai, vr, u.ai.vertical, !1, hn, an));
                  }
                }
                let rr = !1;
                if (Vt.icon && Vt.icon.name) {
                  const jr = J.imageMap[Vt.icon.name];
                  jr && (qn = ao(J.imagePositions[Vt.icon.name], ve.get("icon-offset").evaluate(Vt, {}, J.canonical), ve.get("icon-anchor").evaluate(Vt, {}, J.canonical)), rr = !!jr.sdf, J.bucket.sdfIcons === void 0 ? J.bucket.sdfIcons = rr : J.bucket.sdfIcons !== rr && T("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (jr.pixelRatio !== J.bucket.pixelRatio || ve.get("icon-rotate").constantOr(1) !== 0) && (J.bucket.iconsNeedLinear = !0));
                }
                const dr = za(xn.horizontal) || xn.vertical;
                J.bucket.iconsInText = !!dr && dr.iconsInText, (dr || qn) && $i(J.bucket, Vt, xn, qn, J.imageMap, Xe, hn, kn, vr, rr, J.canonical);
              }
              J.showCollisionBoxes && J.bucket.generateCollisionDebugBuffers();
            }, u.bp = v2, u.bq = r_, u.br = Up, u.bs = jp, u.bt = x1, u.bu = class {
              constructor(J) {
                this._marks = { start: [J.url, "start"].join("#"), end: [J.url, "end"].join("#"), measure: J.url.toString() }, performance.mark(this._marks.start);
              }
              finish() {
                performance.mark(this._marks.end);
                let J = performance.getEntriesByName(this._marks.measure);
                return J.length === 0 && (performance.measure(this._marks.measure, this._marks.start, this._marks.end), J = performance.getEntriesByName(this._marks.measure), performance.clearMarks(this._marks.start), performance.clearMarks(this._marks.end), performance.clearMeasures(this._marks.measure)), J;
              }
            }, u.bv = function(J, H, oe, ve, Oe) {
              return i(this, void 0, void 0, function* () {
                if (k()) try {
                  return yield q(J, H, oe, ve, Oe);
                } catch {
                }
                return function(Xe, rt, yt, Tt, Nt) {
                  const Vt = Xe.width, Kt = Xe.height;
                  K && re || (K = new OffscreenCanvas(Vt, Kt), re = K.getContext("2d", { willReadFrequently: !0 })), K.width = Vt, K.height = Kt, re.drawImage(Xe, 0, 0, Vt, Kt);
                  const an = re.getImageData(rt, yt, Tt, Nt);
                  return re.clearRect(0, 0, Vt, Kt), an.data;
                }(J, H, oe, ve, Oe);
              });
            }, u.bw = Ul, u.bx = h, u.by = p, u.bz = u_, u.c = te, u.d = (J) => i(void 0, void 0, void 0, function* () {
              if (J.byteLength === 0) return createImageBitmap(new ImageData(1, 1));
              const H = new Blob([new Uint8Array(J)], { type: "image/png" });
              try {
                return createImageBitmap(H);
              } catch (oe) {
                throw new Error(`Could not load image because of ${oe.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`);
              }
            }), u.e = L, u.f = (J) => new Promise((H, oe) => {
              const ve = new Image();
              ve.onload = () => {
                H(ve), URL.revokeObjectURL(ve.src), ve.onload = null, window.requestAnimationFrame(() => {
                  ve.src = $;
                });
              }, ve.onerror = () => oe(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."));
              const Oe = new Blob([new Uint8Array(J)], { type: "image/png" });
              ve.src = J.byteLength ? URL.createObjectURL(Oe) : $;
            }), u.g = X, u.h = (J, H) => he(L(J, { type: "json" }), H), u.i = F, u.j = me, u.k = se, u.l = (J, H) => he(L(J, { type: "arrayBuffer" }), H), u.m = he, u.n = function(J) {
              return new x1(J).readFields(w2, []);
            }, u.o = h1, u.p = E5, u.q = bt, u.r = ss, u.s = de, u.t = tl, u.u = li, u.v = pe, u.w = T, u.x = Us, u.y = function([J, H, oe]) {
              return H += 90, H *= Math.PI / 180, oe *= Math.PI / 180, { x: J * Math.cos(H) * Math.sin(oe), y: J * Math.sin(H) * Math.sin(oe), z: J * Math.cos(oe) };
            }, u.z = bn;
          }), l("worker", 0, function(u) {
            class i {
              constructor(at) {
                this.keyCache = {}, at && this.replace(at);
              }
              replace(at) {
                this._layerConfigs = {}, this._layers = {}, this.update(at, []);
              }
              update(at, vt) {
                for (const Je of at) {
                  this._layerConfigs[Je.id] = Je;
                  const nt = this._layers[Je.id] = u.aB(Je);
                  nt._featureFilter = u.a7(nt.filter), this.keyCache[Je.id] && delete this.keyCache[Je.id];
                }
                for (const Je of vt) delete this.keyCache[Je], delete this._layerConfigs[Je], delete this._layers[Je];
                this.familiesBySource = {};
                const St = u.bj(Object.values(this._layerConfigs), this.keyCache);
                for (const Je of St) {
                  const nt = Je.map((At) => this._layers[At.id]), ot = nt[0];
                  if (ot.visibility === "none") continue;
                  const Ye = ot.source || "";
                  let Fe = this.familiesBySource[Ye];
                  Fe || (Fe = this.familiesBySource[Ye] = {});
                  const pt = ot.sourceLayer || "_geojsonTileLayer";
                  let Mt = Fe[pt];
                  Mt || (Mt = Fe[pt] = []), Mt.push(nt);
                }
              }
            }
            class h {
              constructor(at) {
                const vt = {}, St = [];
                for (const Ye in at) {
                  const Fe = at[Ye], pt = vt[Ye] = {};
                  for (const Mt in Fe) {
                    const At = Fe[+Mt];
                    if (!At || At.bitmap.width === 0 || At.bitmap.height === 0) continue;
                    const Rt = { x: 0, y: 0, w: At.bitmap.width + 2, h: At.bitmap.height + 2 };
                    St.push(Rt), pt[Mt] = { rect: Rt, metrics: At.metrics };
                  }
                }
                const { w: Je, h: nt } = u.p(St), ot = new u.o({ width: Je || 1, height: nt || 1 });
                for (const Ye in at) {
                  const Fe = at[Ye];
                  for (const pt in Fe) {
                    const Mt = Fe[+pt];
                    if (!Mt || Mt.bitmap.width === 0 || Mt.bitmap.height === 0) continue;
                    const At = vt[Ye][pt].rect;
                    u.o.copy(Mt.bitmap, ot, { x: 0, y: 0 }, { x: At.x + 1, y: At.y + 1 }, Mt.bitmap);
                  }
                }
                this.image = ot, this.positions = vt;
              }
            }
            u.bk("GlyphAtlas", h);
            class p {
              constructor(at) {
                this.tileID = new u.S(at.tileID.overscaledZ, at.tileID.wrap, at.tileID.canonical.z, at.tileID.canonical.x, at.tileID.canonical.y), this.uid = at.uid, this.zoom = at.zoom, this.pixelRatio = at.pixelRatio, this.tileSize = at.tileSize, this.source = at.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = at.showCollisionBoxes, this.collectResourceTiming = !!at.collectResourceTiming, this.returnDependencies = !!at.returnDependencies, this.promoteId = at.promoteId, this.inFlightDependencies = [];
              }
              parse(at, vt, St, Je) {
                return u._(this, void 0, void 0, function* () {
                  this.status = "parsing", this.data = at, this.collisionBoxArray = new u.a5();
                  const nt = new u.bl(Object.keys(at.layers).sort()), ot = new u.bm(this.tileID, this.promoteId);
                  ot.bucketLayerIDs = [];
                  const Ye = {}, Fe = { featureIndex: ot, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: St }, pt = vt.familiesBySource[this.source];
                  for (const qt in pt) {
                    const en = at.layers[qt];
                    if (!en) continue;
                    en.version === 1 && u.w(`Vector tile source "${this.source}" layer "${qt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);
                    const Yt = nt.encode(qt), Ht = [];
                    for (let sn = 0; sn < en.length; sn++) {
                      const fn = en.feature(sn), In = ot.getId(fn, qt);
                      Ht.push({ feature: fn, id: In, index: sn, sourceLayerIndex: Yt });
                    }
                    for (const sn of pt[qt]) {
                      const fn = sn[0];
                      fn.source !== this.source && u.w(`layer.source = ${fn.source} does not equal this.source = ${this.source}`), fn.minzoom && this.zoom < Math.floor(fn.minzoom) || fn.maxzoom && this.zoom >= fn.maxzoom || fn.visibility !== "none" && (_(sn, this.zoom, St), (Ye[fn.id] = fn.createBucket({ index: ot.bucketLayerIDs.length, layers: sn, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: Yt, sourceID: this.source })).populate(Ht, Fe, this.tileID.canonical), ot.bucketLayerIDs.push(sn.map((In) => In.id)));
                    }
                  }
                  const Mt = u.aG(Fe.glyphDependencies, (qt) => Object.keys(qt).map(Number));
                  this.inFlightDependencies.forEach((qt) => qt == null ? void 0 : qt.abort()), this.inFlightDependencies = [];
                  let At = Promise.resolve({});
                  if (Object.keys(Mt).length) {
                    const qt = new AbortController();
                    this.inFlightDependencies.push(qt), At = Je.sendAsync({ type: "GG", data: { stacks: Mt, source: this.source, tileID: this.tileID, type: "glyphs" } }, qt);
                  }
                  const Rt = Object.keys(Fe.iconDependencies);
                  let Ft = Promise.resolve({});
                  if (Rt.length) {
                    const qt = new AbortController();
                    this.inFlightDependencies.push(qt), Ft = Je.sendAsync({ type: "GI", data: { icons: Rt, source: this.source, tileID: this.tileID, type: "icons" } }, qt);
                  }
                  const lt = Object.keys(Fe.patternDependencies);
                  let st = Promise.resolve({});
                  if (lt.length) {
                    const qt = new AbortController();
                    this.inFlightDependencies.push(qt), st = Je.sendAsync({ type: "GI", data: { icons: lt, source: this.source, tileID: this.tileID, type: "patterns" } }, qt);
                  }
                  const [Ot, kt, Bt] = yield Promise.all([At, Ft, st]), xt = new h(Ot), Jt = new u.bn(kt, Bt);
                  for (const qt in Ye) {
                    const en = Ye[qt];
                    en instanceof u.a6 ? (_(en.layers, this.zoom, St), u.bo({ bucket: en, glyphMap: Ot, glyphPositions: xt.positions, imageMap: kt, imagePositions: Jt.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical })) : en.hasPattern && (en instanceof u.bp || en instanceof u.bq || en instanceof u.br) && (_(en.layers, this.zoom, St), en.addFeatures(Fe, this.tileID.canonical, Jt.patternPositions));
                  }
                  return this.status = "done", { buckets: Object.values(Ye).filter((qt) => !qt.isEmpty()), featureIndex: ot, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: xt.image, imageAtlas: Jt, glyphMap: this.returnDependencies ? Ot : null, iconMap: this.returnDependencies ? kt : null, glyphPositions: this.returnDependencies ? xt.positions : null };
                });
              }
            }
            function _(mt, at, vt) {
              const St = new u.a9(at);
              for (const Je of mt) Je.recalculate(St, vt);
            }
            class d {
              constructor(at, vt, St) {
                this.actor = at, this.layerIndex = vt, this.availableImages = St, this.fetching = {}, this.loading = {}, this.loaded = {};
              }
              loadVectorTile(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  const St = yield u.l(at.request, vt);
                  try {
                    return { vectorTile: new u.bs.VectorTile(new u.bt(St.data)), rawData: St.data, cacheControl: St.cacheControl, expires: St.expires };
                  } catch (Je) {
                    const nt = new Uint8Array(St.data), ot = nt[0] === 31 && nt[1] === 139;
                    let Ye = `Unable to parse the tile at ${at.request.url}, `;
                    throw Ye += ot ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${Je.message}`, new Error(Ye);
                  }
                });
              }
              loadTile(at) {
                return u._(this, void 0, void 0, function* () {
                  const vt = at.uid, St = !!(at && at.request && at.request.collectResourceTiming) && new u.bu(at.request), Je = new p(at);
                  this.loading[vt] = Je;
                  const nt = new AbortController();
                  Je.abort = nt;
                  try {
                    const ot = yield this.loadVectorTile(at, nt);
                    if (delete this.loading[vt], !ot) return null;
                    const Ye = ot.rawData, Fe = {};
                    ot.expires && (Fe.expires = ot.expires), ot.cacheControl && (Fe.cacheControl = ot.cacheControl);
                    const pt = {};
                    if (St) {
                      const At = St.finish();
                      At && (pt.resourceTiming = JSON.parse(JSON.stringify(At)));
                    }
                    Je.vectorTile = ot.vectorTile;
                    const Mt = Je.parse(ot.vectorTile, this.layerIndex, this.availableImages, this.actor);
                    this.loaded[vt] = Je, this.fetching[vt] = { rawTileData: Ye, cacheControl: Fe, resourceTiming: pt };
                    try {
                      const At = yield Mt;
                      return u.e({ rawTileData: Ye.slice(0) }, At, Fe, pt);
                    } finally {
                      delete this.fetching[vt];
                    }
                  } catch (ot) {
                    throw delete this.loading[vt], Je.status = "done", this.loaded[vt] = Je, ot;
                  }
                });
              }
              reloadTile(at) {
                return u._(this, void 0, void 0, function* () {
                  const vt = at.uid;
                  if (!this.loaded || !this.loaded[vt]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
                  const St = this.loaded[vt];
                  if (St.showCollisionBoxes = at.showCollisionBoxes, St.status === "parsing") {
                    const Je = yield St.parse(St.vectorTile, this.layerIndex, this.availableImages, this.actor);
                    let nt;
                    if (this.fetching[vt]) {
                      const { rawTileData: ot, cacheControl: Ye, resourceTiming: Fe } = this.fetching[vt];
                      delete this.fetching[vt], nt = u.e({ rawTileData: ot.slice(0) }, Je, Ye, Fe);
                    } else nt = Je;
                    return nt;
                  }
                  if (St.status === "done" && St.vectorTile) return St.parse(St.vectorTile, this.layerIndex, this.availableImages, this.actor);
                });
              }
              abortTile(at) {
                return u._(this, void 0, void 0, function* () {
                  const vt = this.loading, St = at.uid;
                  vt && vt[St] && vt[St].abort && (vt[St].abort.abort(), delete vt[St]);
                });
              }
              removeTile(at) {
                return u._(this, void 0, void 0, function* () {
                  this.loaded && this.loaded[at.uid] && delete this.loaded[at.uid];
                });
              }
            }
            class f {
              constructor() {
                this.loaded = {};
              }
              loadTile(at) {
                return u._(this, void 0, void 0, function* () {
                  const { uid: vt, encoding: St, rawImageData: Je, redFactor: nt, greenFactor: ot, blueFactor: Ye, baseShift: Fe } = at, pt = Je.width + 2, Mt = Je.height + 2, At = u.b(Je) ? new u.R({ width: pt, height: Mt }, yield u.bv(Je, -1, -1, pt, Mt)) : Je, Rt = new u.bw(vt, At, St, nt, ot, Ye, Fe);
                  return this.loaded = this.loaded || {}, this.loaded[vt] = Rt, Rt;
                });
              }
              removeTile(at) {
                const vt = this.loaded, St = at.uid;
                vt && vt[St] && delete vt[St];
              }
            }
            var c = function mt(at, vt) {
              var St, Je = at && at.type;
              if (Je === "FeatureCollection") for (St = 0; St < at.features.length; St++) mt(at.features[St], vt);
              else if (Je === "GeometryCollection") for (St = 0; St < at.geometries.length; St++) mt(at.geometries[St], vt);
              else if (Je === "Feature") mt(at.geometry, vt);
              else if (Je === "Polygon") g(at.coordinates, vt);
              else if (Je === "MultiPolygon") for (St = 0; St < at.coordinates.length; St++) g(at.coordinates[St], vt);
              return at;
            };
            function g(mt, at) {
              if (mt.length !== 0) {
                m(mt[0], at);
                for (var vt = 1; vt < mt.length; vt++) m(mt[vt], !at);
              }
            }
            function m(mt, at) {
              for (var vt = 0, St = 0, Je = 0, nt = mt.length, ot = nt - 1; Je < nt; ot = Je++) {
                var Ye = (mt[Je][0] - mt[ot][0]) * (mt[ot][1] + mt[Je][1]), Fe = vt + Ye;
                St += Math.abs(vt) >= Math.abs(Ye) ? vt - Fe + Ye : Ye - Fe + vt, vt = Fe;
              }
              vt + St >= 0 != !!at && mt.reverse();
            }
            var x = u.bx(c);
            const w = u.bs.VectorTileFeature.prototype.toGeoJSON;
            let k = class {
              constructor(mt) {
                this._feature = mt, this.extent = u.X, this.type = mt.type, this.properties = mt.tags, "id" in mt && !isNaN(mt.id) && (this.id = parseInt(mt.id, 10));
              }
              loadGeometry() {
                if (this._feature.type === 1) {
                  const mt = [];
                  for (const at of this._feature.geometry) mt.push([new u.P(at[0], at[1])]);
                  return mt;
                }
                {
                  const mt = [];
                  for (const at of this._feature.geometry) {
                    const vt = [];
                    for (const St of at) vt.push(new u.P(St[0], St[1]));
                    mt.push(vt);
                  }
                  return mt;
                }
              }
              toGeoJSON(mt, at, vt) {
                return w.call(this, mt, at, vt);
              }
            }, S = class {
              constructor(mt) {
                this.layers = { _geojsonTileLayer: this }, this.name = "_geojsonTileLayer", this.extent = u.X, this.length = mt.length, this._features = mt;
              }
              feature(mt) {
                return new k(this._features[mt]);
              }
            };
            var A = { exports: {} }, C = u.by, D = u.bs.VectorTileFeature, L = E;
            function E(mt, at) {
              this.options = at || {}, this.features = mt, this.length = mt.length;
            }
            function P(mt, at) {
              this.id = typeof mt.id == "number" ? mt.id : void 0, this.type = mt.type, this.rawGeometry = mt.type === 1 ? [mt.geometry] : mt.geometry, this.properties = mt.tags, this.extent = at || 4096;
            }
            E.prototype.feature = function(mt) {
              return new P(this.features[mt], this.options.extent);
            }, P.prototype.loadGeometry = function() {
              var mt = this.rawGeometry;
              this.geometry = [];
              for (var at = 0; at < mt.length; at++) {
                for (var vt = mt[at], St = [], Je = 0; Je < vt.length; Je++) St.push(new C(vt[Je][0], vt[Je][1]));
                this.geometry.push(St);
              }
              return this.geometry;
            }, P.prototype.bbox = function() {
              this.geometry || this.loadGeometry();
              for (var mt = this.geometry, at = 1 / 0, vt = -1 / 0, St = 1 / 0, Je = -1 / 0, nt = 0; nt < mt.length; nt++) for (var ot = mt[nt], Ye = 0; Ye < ot.length; Ye++) {
                var Fe = ot[Ye];
                at = Math.min(at, Fe.x), vt = Math.max(vt, Fe.x), St = Math.min(St, Fe.y), Je = Math.max(Je, Fe.y);
              }
              return [at, St, vt, Je];
            }, P.prototype.toGeoJSON = D.prototype.toGeoJSON;
            var I = u.bz, M = L;
            function O(mt) {
              var at = new I();
              return function(vt, St) {
                for (var Je in vt.layers) St.writeMessage(3, T, vt.layers[Je]);
              }(mt, at), at.finish();
            }
            function T(mt, at) {
              var vt;
              at.writeVarintField(15, mt.version || 1), at.writeStringField(1, mt.name || ""), at.writeVarintField(5, mt.extent || 4096);
              var St = { keys: [], values: [], keycache: {}, valuecache: {} };
              for (vt = 0; vt < mt.length; vt++) St.feature = mt.feature(vt), at.writeMessage(2, z, St);
              var Je = St.keys;
              for (vt = 0; vt < Je.length; vt++) at.writeStringField(3, Je[vt]);
              var nt = St.values;
              for (vt = 0; vt < nt.length; vt++) at.writeMessage(4, q, nt[vt]);
            }
            function z(mt, at) {
              var vt = mt.feature;
              vt.id !== void 0 && at.writeVarintField(1, vt.id), at.writeMessage(2, F, mt), at.writeVarintField(3, vt.type), at.writeMessage(4, $, vt);
            }
            function F(mt, at) {
              var vt = mt.feature, St = mt.keys, Je = mt.values, nt = mt.keycache, ot = mt.valuecache;
              for (var Ye in vt.properties) {
                var Fe = vt.properties[Ye], pt = nt[Ye];
                if (Fe !== null) {
                  pt === void 0 && (St.push(Ye), pt = St.length - 1, nt[Ye] = pt), at.writeVarint(pt);
                  var Mt = typeof Fe;
                  Mt !== "string" && Mt !== "boolean" && Mt !== "number" && (Fe = JSON.stringify(Fe));
                  var At = Mt + ":" + Fe, Rt = ot[At];
                  Rt === void 0 && (Je.push(Fe), Rt = Je.length - 1, ot[At] = Rt), at.writeVarint(Rt);
                }
              }
            }
            function U(mt, at) {
              return (at << 3) + (7 & mt);
            }
            function V(mt) {
              return mt << 1 ^ mt >> 31;
            }
            function $(mt, at) {
              for (var vt = mt.loadGeometry(), St = mt.type, Je = 0, nt = 0, ot = vt.length, Ye = 0; Ye < ot; Ye++) {
                var Fe = vt[Ye], pt = 1;
                St === 1 && (pt = Fe.length), at.writeVarint(U(1, pt));
                for (var Mt = St === 3 ? Fe.length - 1 : Fe.length, At = 0; At < Mt; At++) {
                  At === 1 && St !== 1 && at.writeVarint(U(2, Mt - 1));
                  var Rt = Fe[At].x - Je, Ft = Fe[At].y - nt;
                  at.writeVarint(V(Rt)), at.writeVarint(V(Ft)), Je += Rt, nt += Ft;
                }
                St === 3 && at.writeVarint(U(7, 1));
              }
            }
            function q(mt, at) {
              var vt = typeof mt;
              vt === "string" ? at.writeStringField(1, mt) : vt === "boolean" ? at.writeBooleanField(7, mt) : vt === "number" && (mt % 1 != 0 ? at.writeDoubleField(3, mt) : mt < 0 ? at.writeSVarintField(6, mt) : at.writeVarintField(5, mt));
            }
            A.exports = O, A.exports.fromVectorTileJs = O, A.exports.fromGeojsonVt = function(mt, at) {
              at = at || {};
              var vt = {};
              for (var St in mt) vt[St] = new M(mt[St].features, at), vt[St].name = St, vt[St].version = at.version, vt[St].extent = at.extent;
              return O({ layers: vt });
            }, A.exports.GeoJSONWrapper = M;
            var K = A.exports, re = u.bx(K);
            const Y = { minZoom: 0, maxZoom: 16, minPoints: 2, radius: 40, extent: 512, nodeSize: 64, log: !1, generateId: !1, reduce: null, map: (mt) => mt }, te = Math.fround || (ee = new Float32Array(1), (mt) => (ee[0] = +mt, ee[0]));
            var ee;
            const X = 3, Q = 5, ue = 6;
            class ce {
              constructor(at) {
                this.options = Object.assign(Object.create(Y), at), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
              }
              load(at) {
                const { log: vt, minZoom: St, maxZoom: Je } = this.options;
                vt && console.time("total time");
                const nt = `prepare ${at.length} points`;
                vt && console.time(nt), this.points = at;
                const ot = [];
                for (let Fe = 0; Fe < at.length; Fe++) {
                  const pt = at[Fe];
                  if (!pt.geometry) continue;
                  const [Mt, At] = pt.geometry.coordinates, Rt = te(ne(Mt)), Ft = te(ae(At));
                  ot.push(Rt, Ft, 1 / 0, Fe, -1, 1), this.options.reduce && ot.push(0);
                }
                let Ye = this.trees[Je + 1] = this._createTree(ot);
                vt && console.timeEnd(nt);
                for (let Fe = Je; Fe >= St; Fe--) {
                  const pt = +Date.now();
                  Ye = this.trees[Fe] = this._createTree(this._cluster(Ye, Fe)), vt && console.log("z%d: %d clusters in %dms", Fe, Ye.numItems, +Date.now() - pt);
                }
                return vt && console.timeEnd("total time"), this;
              }
              getClusters(at, vt) {
                let St = ((at[0] + 180) % 360 + 360) % 360 - 180;
                const Je = Math.max(-90, Math.min(90, at[1]));
                let nt = at[2] === 180 ? 180 : ((at[2] + 180) % 360 + 360) % 360 - 180;
                const ot = Math.max(-90, Math.min(90, at[3]));
                if (at[2] - at[0] >= 360) St = -180, nt = 180;
                else if (St > nt) {
                  const At = this.getClusters([St, Je, 180, ot], vt), Rt = this.getClusters([-180, Je, nt, ot], vt);
                  return At.concat(Rt);
                }
                const Ye = this.trees[this._limitZoom(vt)], Fe = Ye.range(ne(St), ae(ot), ne(nt), ae(Je)), pt = Ye.data, Mt = [];
                for (const At of Fe) {
                  const Rt = this.stride * At;
                  Mt.push(pt[Rt + Q] > 1 ? he(pt, Rt, this.clusterProps) : this.points[pt[Rt + X]]);
                }
                return Mt;
              }
              getChildren(at) {
                const vt = this._getOriginId(at), St = this._getOriginZoom(at), Je = "No cluster with the specified id.", nt = this.trees[St];
                if (!nt) throw new Error(Je);
                const ot = nt.data;
                if (vt * this.stride >= ot.length) throw new Error(Je);
                const Ye = this.options.radius / (this.options.extent * Math.pow(2, St - 1)), Fe = ot[vt * this.stride], pt = ot[vt * this.stride + 1], Mt = nt.within(Fe, pt, Ye), At = [];
                for (const Rt of Mt) {
                  const Ft = Rt * this.stride;
                  ot[Ft + 4] === at && At.push(ot[Ft + Q] > 1 ? he(ot, Ft, this.clusterProps) : this.points[ot[Ft + X]]);
                }
                if (At.length === 0) throw new Error(Je);
                return At;
              }
              getLeaves(at, vt, St) {
                vt = vt || 10, St = St || 0;
                const Je = [];
                return this._appendLeaves(Je, at, vt, St, 0), Je;
              }
              getTile(at, vt, St) {
                const Je = this.trees[this._limitZoom(at)], nt = Math.pow(2, at), { extent: ot, radius: Ye } = this.options, Fe = Ye / ot, pt = (St - Fe) / nt, Mt = (St + 1 + Fe) / nt, At = { features: [] };
                return this._addTileFeatures(Je.range((vt - Fe) / nt, pt, (vt + 1 + Fe) / nt, Mt), Je.data, vt, St, nt, At), vt === 0 && this._addTileFeatures(Je.range(1 - Fe / nt, pt, 1, Mt), Je.data, nt, St, nt, At), vt === nt - 1 && this._addTileFeatures(Je.range(0, pt, Fe / nt, Mt), Je.data, -1, St, nt, At), At.features.length ? At : null;
              }
              getClusterExpansionZoom(at) {
                let vt = this._getOriginZoom(at) - 1;
                for (; vt <= this.options.maxZoom; ) {
                  const St = this.getChildren(at);
                  if (vt++, St.length !== 1) break;
                  at = St[0].properties.cluster_id;
                }
                return vt;
              }
              _appendLeaves(at, vt, St, Je, nt) {
                const ot = this.getChildren(vt);
                for (const Ye of ot) {
                  const Fe = Ye.properties;
                  if (Fe && Fe.cluster ? nt + Fe.point_count <= Je ? nt += Fe.point_count : nt = this._appendLeaves(at, Fe.cluster_id, St, Je, nt) : nt < Je ? nt++ : at.push(Ye), at.length === St) break;
                }
                return nt;
              }
              _createTree(at) {
                const vt = new u.aw(at.length / this.stride | 0, this.options.nodeSize, Float32Array);
                for (let St = 0; St < at.length; St += this.stride) vt.add(at[St], at[St + 1]);
                return vt.finish(), vt.data = at, vt;
              }
              _addTileFeatures(at, vt, St, Je, nt, ot) {
                for (const Ye of at) {
                  const Fe = Ye * this.stride, pt = vt[Fe + Q] > 1;
                  let Mt, At, Rt;
                  if (pt) Mt = de(vt, Fe, this.clusterProps), At = vt[Fe], Rt = vt[Fe + 1];
                  else {
                    const st = this.points[vt[Fe + X]];
                    Mt = st.properties;
                    const [Ot, kt] = st.geometry.coordinates;
                    At = ne(Ot), Rt = ae(kt);
                  }
                  const Ft = { type: 1, geometry: [[Math.round(this.options.extent * (At * nt - St)), Math.round(this.options.extent * (Rt * nt - Je))]], tags: Mt };
                  let lt;
                  lt = pt || this.options.generateId ? vt[Fe + X] : this.points[vt[Fe + X]].id, lt !== void 0 && (Ft.id = lt), ot.features.push(Ft);
                }
              }
              _limitZoom(at) {
                return Math.max(this.options.minZoom, Math.min(Math.floor(+at), this.options.maxZoom + 1));
              }
              _cluster(at, vt) {
                const { radius: St, extent: Je, reduce: nt, minPoints: ot } = this.options, Ye = St / (Je * Math.pow(2, vt)), Fe = at.data, pt = [], Mt = this.stride;
                for (let At = 0; At < Fe.length; At += Mt) {
                  if (Fe[At + 2] <= vt) continue;
                  Fe[At + 2] = vt;
                  const Rt = Fe[At], Ft = Fe[At + 1], lt = at.within(Fe[At], Fe[At + 1], Ye), st = Fe[At + Q];
                  let Ot = st;
                  for (const kt of lt) {
                    const Bt = kt * Mt;
                    Fe[Bt + 2] > vt && (Ot += Fe[Bt + Q]);
                  }
                  if (Ot > st && Ot >= ot) {
                    let kt, Bt = Rt * st, xt = Ft * st, Jt = -1;
                    const qt = ((At / Mt | 0) << 5) + (vt + 1) + this.points.length;
                    for (const en of lt) {
                      const Yt = en * Mt;
                      if (Fe[Yt + 2] <= vt) continue;
                      Fe[Yt + 2] = vt;
                      const Ht = Fe[Yt + Q];
                      Bt += Fe[Yt] * Ht, xt += Fe[Yt + 1] * Ht, Fe[Yt + 4] = qt, nt && (kt || (kt = this._map(Fe, At, !0), Jt = this.clusterProps.length, this.clusterProps.push(kt)), nt(kt, this._map(Fe, Yt)));
                    }
                    Fe[At + 4] = qt, pt.push(Bt / Ot, xt / Ot, 1 / 0, qt, -1, Ot), nt && pt.push(Jt);
                  } else {
                    for (let kt = 0; kt < Mt; kt++) pt.push(Fe[At + kt]);
                    if (Ot > 1) for (const kt of lt) {
                      const Bt = kt * Mt;
                      if (!(Fe[Bt + 2] <= vt)) {
                        Fe[Bt + 2] = vt;
                        for (let xt = 0; xt < Mt; xt++) pt.push(Fe[Bt + xt]);
                      }
                    }
                  }
                }
                return pt;
              }
              _getOriginId(at) {
                return at - this.points.length >> 5;
              }
              _getOriginZoom(at) {
                return (at - this.points.length) % 32;
              }
              _map(at, vt, St) {
                if (at[vt + Q] > 1) {
                  const ot = this.clusterProps[at[vt + ue]];
                  return St ? Object.assign({}, ot) : ot;
                }
                const Je = this.points[at[vt + X]].properties, nt = this.options.map(Je);
                return St && nt === Je ? Object.assign({}, nt) : nt;
              }
            }
            function he(mt, at, vt) {
              return { type: "Feature", id: mt[at + X], properties: de(mt, at, vt), geometry: { type: "Point", coordinates: [(St = mt[at], 360 * (St - 0.5)), se(mt[at + 1])] } };
              var St;
            }
            function de(mt, at, vt) {
              const St = mt[at + Q], Je = St >= 1e4 ? `${Math.round(St / 1e3)}k` : St >= 1e3 ? Math.round(St / 100) / 10 + "k" : St, nt = mt[at + ue], ot = nt === -1 ? {} : Object.assign({}, vt[nt]);
              return Object.assign(ot, { cluster: !0, cluster_id: mt[at + X], point_count: St, point_count_abbreviated: Je });
            }
            function ne(mt) {
              return mt / 360 + 0.5;
            }
            function ae(mt) {
              const at = Math.sin(mt * Math.PI / 180), vt = 0.5 - 0.25 * Math.log((1 + at) / (1 - at)) / Math.PI;
              return vt < 0 ? 0 : vt > 1 ? 1 : vt;
            }
            function se(mt) {
              const at = (180 - 360 * mt) * Math.PI / 180;
              return 360 * Math.atan(Math.exp(at)) / Math.PI - 90;
            }
            function me(mt, at, vt, St) {
              let Je = St;
              const nt = at + (vt - at >> 1);
              let ot, Ye = vt - at;
              const Fe = mt[at], pt = mt[at + 1], Mt = mt[vt], At = mt[vt + 1];
              for (let Rt = at + 3; Rt < vt; Rt += 3) {
                const Ft = ye(mt[Rt], mt[Rt + 1], Fe, pt, Mt, At);
                if (Ft > Je) ot = Rt, Je = Ft;
                else if (Ft === Je) {
                  const lt = Math.abs(Rt - nt);
                  lt < Ye && (ot = Rt, Ye = lt);
                }
              }
              Je > St && (ot - at > 3 && me(mt, at, ot, St), mt[ot + 2] = Je, vt - ot > 3 && me(mt, ot, vt, St));
            }
            function ye(mt, at, vt, St, Je, nt) {
              let ot = Je - vt, Ye = nt - St;
              if (ot !== 0 || Ye !== 0) {
                const Fe = ((mt - vt) * ot + (at - St) * Ye) / (ot * ot + Ye * Ye);
                Fe > 1 ? (vt = Je, St = nt) : Fe > 0 && (vt += ot * Fe, St += Ye * Fe);
              }
              return ot = mt - vt, Ye = at - St, ot * ot + Ye * Ye;
            }
            function pe(mt, at, vt, St) {
              const Je = { id: mt ?? null, type: at, geometry: vt, tags: St, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
              if (at === "Point" || at === "MultiPoint" || at === "LineString") be(Je, vt);
              else if (at === "Polygon") be(Je, vt[0]);
              else if (at === "MultiLineString") for (const nt of vt) be(Je, nt);
              else if (at === "MultiPolygon") for (const nt of vt) be(Je, nt[0]);
              return Je;
            }
            function be(mt, at) {
              for (let vt = 0; vt < at.length; vt += 3) mt.minX = Math.min(mt.minX, at[vt]), mt.minY = Math.min(mt.minY, at[vt + 1]), mt.maxX = Math.max(mt.maxX, at[vt]), mt.maxY = Math.max(mt.maxY, at[vt + 1]);
            }
            function Ae(mt, at, vt, St) {
              if (!at.geometry) return;
              const Je = at.geometry.coordinates;
              if (Je && Je.length === 0) return;
              const nt = at.geometry.type, ot = Math.pow(vt.tolerance / ((1 << vt.maxZoom) * vt.extent), 2);
              let Ye = [], Fe = at.id;
              if (vt.promoteId ? Fe = at.properties[vt.promoteId] : vt.generateId && (Fe = St || 0), nt === "Point") Se(Je, Ye);
              else if (nt === "MultiPoint") for (const pt of Je) Se(pt, Ye);
              else if (nt === "LineString") Me(Je, Ye, ot, !1);
              else if (nt === "MultiLineString") {
                if (vt.lineMetrics) {
                  for (const pt of Je) Ye = [], Me(pt, Ye, ot, !1), mt.push(pe(Fe, "LineString", Ye, at.properties));
                  return;
                }
                De(Je, Ye, ot, !1);
              } else if (nt === "Polygon") De(Je, Ye, ot, !0);
              else {
                if (nt !== "MultiPolygon") {
                  if (nt === "GeometryCollection") {
                    for (const pt of at.geometry.geometries) Ae(mt, { id: Fe, geometry: pt, properties: at.properties }, vt, St);
                    return;
                  }
                  throw new Error("Input data is not a valid GeoJSON object.");
                }
                for (const pt of Je) {
                  const Mt = [];
                  De(pt, Mt, ot, !0), Ye.push(Mt);
                }
              }
              mt.push(pe(Fe, nt, Ye, at.properties));
            }
            function Se(mt, at) {
              at.push(Le(mt[0]), We(mt[1]), 0);
            }
            function Me(mt, at, vt, St) {
              let Je, nt, ot = 0;
              for (let Fe = 0; Fe < mt.length; Fe++) {
                const pt = Le(mt[Fe][0]), Mt = We(mt[Fe][1]);
                at.push(pt, Mt, 0), Fe > 0 && (ot += St ? (Je * Mt - pt * nt) / 2 : Math.sqrt(Math.pow(pt - Je, 2) + Math.pow(Mt - nt, 2))), Je = pt, nt = Mt;
              }
              const Ye = at.length - 3;
              at[2] = 1, me(at, 0, Ye, vt), at[Ye + 2] = 1, at.size = Math.abs(ot), at.start = 0, at.end = at.size;
            }
            function De(mt, at, vt, St) {
              for (let Je = 0; Je < mt.length; Je++) {
                const nt = [];
                Me(mt[Je], nt, vt, St), at.push(nt);
              }
            }
            function Le(mt) {
              return mt / 360 + 0.5;
            }
            function We(mt) {
              const at = Math.sin(mt * Math.PI / 180), vt = 0.5 - 0.25 * Math.log((1 + at) / (1 - at)) / Math.PI;
              return vt < 0 ? 0 : vt > 1 ? 1 : vt;
            }
            function Ee(mt, at, vt, St, Je, nt, ot, Ye) {
              if (St /= at, nt >= (vt /= at) && ot < St) return mt;
              if (ot < vt || nt >= St) return null;
              const Fe = [];
              for (const pt of mt) {
                const Mt = pt.geometry;
                let At = pt.type;
                const Rt = Je === 0 ? pt.minX : pt.minY, Ft = Je === 0 ? pt.maxX : pt.maxY;
                if (Rt >= vt && Ft < St) {
                  Fe.push(pt);
                  continue;
                }
                if (Ft < vt || Rt >= St) continue;
                let lt = [];
                if (At === "Point" || At === "MultiPoint") Ne(Mt, lt, vt, St, Je);
                else if (At === "LineString") Ie(Mt, lt, vt, St, Je, !1, Ye.lineMetrics);
                else if (At === "MultiLineString") Ce(Mt, lt, vt, St, Je, !1);
                else if (At === "Polygon") Ce(Mt, lt, vt, St, Je, !0);
                else if (At === "MultiPolygon") for (const st of Mt) {
                  const Ot = [];
                  Ce(st, Ot, vt, St, Je, !0), Ot.length && lt.push(Ot);
                }
                if (lt.length) {
                  if (Ye.lineMetrics && At === "LineString") {
                    for (const st of lt) Fe.push(pe(pt.id, At, st, pt.tags));
                    continue;
                  }
                  At !== "LineString" && At !== "MultiLineString" || (lt.length === 1 ? (At = "LineString", lt = lt[0]) : At = "MultiLineString"), At !== "Point" && At !== "MultiPoint" || (At = lt.length === 3 ? "Point" : "MultiPoint"), Fe.push(pe(pt.id, At, lt, pt.tags));
                }
              }
              return Fe.length ? Fe : null;
            }
            function Ne(mt, at, vt, St, Je) {
              for (let nt = 0; nt < mt.length; nt += 3) {
                const ot = mt[nt + Je];
                ot >= vt && ot <= St && we(at, mt[nt], mt[nt + 1], mt[nt + 2]);
              }
            }
            function Ie(mt, at, vt, St, Je, nt, ot) {
              let Ye = ge(mt);
              const Fe = Je === 0 ? Ge : Re;
              let pt, Mt, At = mt.start;
              for (let kt = 0; kt < mt.length - 3; kt += 3) {
                const Bt = mt[kt], xt = mt[kt + 1], Jt = mt[kt + 2], qt = mt[kt + 3], en = mt[kt + 4], Yt = Je === 0 ? Bt : xt, Ht = Je === 0 ? qt : en;
                let sn = !1;
                ot && (pt = Math.sqrt(Math.pow(Bt - qt, 2) + Math.pow(xt - en, 2))), Yt < vt ? Ht > vt && (Mt = Fe(Ye, Bt, xt, qt, en, vt), ot && (Ye.start = At + pt * Mt)) : Yt > St ? Ht < St && (Mt = Fe(Ye, Bt, xt, qt, en, St), ot && (Ye.start = At + pt * Mt)) : we(Ye, Bt, xt, Jt), Ht < vt && Yt >= vt && (Mt = Fe(Ye, Bt, xt, qt, en, vt), sn = !0), Ht > St && Yt <= St && (Mt = Fe(Ye, Bt, xt, qt, en, St), sn = !0), !nt && sn && (ot && (Ye.end = At + pt * Mt), at.push(Ye), Ye = ge(mt)), ot && (At += pt);
              }
              let Rt = mt.length - 3;
              const Ft = mt[Rt], lt = mt[Rt + 1], st = mt[Rt + 2], Ot = Je === 0 ? Ft : lt;
              Ot >= vt && Ot <= St && we(Ye, Ft, lt, st), Rt = Ye.length - 3, nt && Rt >= 3 && (Ye[Rt] !== Ye[0] || Ye[Rt + 1] !== Ye[1]) && we(Ye, Ye[0], Ye[1], Ye[2]), Ye.length && at.push(Ye);
            }
            function ge(mt) {
              const at = [];
              return at.size = mt.size, at.start = mt.start, at.end = mt.end, at;
            }
            function Ce(mt, at, vt, St, Je, nt) {
              for (const ot of mt) Ie(ot, at, vt, St, Je, nt, !1);
            }
            function we(mt, at, vt, St) {
              mt.push(at, vt, St);
            }
            function Ge(mt, at, vt, St, Je, nt) {
              const ot = (nt - at) / (St - at);
              return we(mt, nt, vt + (Je - vt) * ot, 1), ot;
            }
            function Re(mt, at, vt, St, Je, nt) {
              const ot = (nt - vt) / (Je - vt);
              return we(mt, at + (St - at) * ot, nt, 1), ot;
            }
            function je(mt, at) {
              const vt = [];
              for (let St = 0; St < mt.length; St++) {
                const Je = mt[St], nt = Je.type;
                let ot;
                if (nt === "Point" || nt === "MultiPoint" || nt === "LineString") ot = Ke(Je.geometry, at);
                else if (nt === "MultiLineString" || nt === "Polygon") {
                  ot = [];
                  for (const Ye of Je.geometry) ot.push(Ke(Ye, at));
                } else if (nt === "MultiPolygon") {
                  ot = [];
                  for (const Ye of Je.geometry) {
                    const Fe = [];
                    for (const pt of Ye) Fe.push(Ke(pt, at));
                    ot.push(Fe);
                  }
                }
                vt.push(pe(Je.id, nt, ot, Je.tags));
              }
              return vt;
            }
            function Ke(mt, at) {
              const vt = [];
              vt.size = mt.size, mt.start !== void 0 && (vt.start = mt.start, vt.end = mt.end);
              for (let St = 0; St < mt.length; St += 3) vt.push(mt[St] + at, mt[St + 1], mt[St + 2]);
              return vt;
            }
            function tt(mt, at) {
              if (mt.transformed) return mt;
              const vt = 1 << mt.z, St = mt.x, Je = mt.y;
              for (const nt of mt.features) {
                const ot = nt.geometry, Ye = nt.type;
                if (nt.geometry = [], Ye === 1) for (let Fe = 0; Fe < ot.length; Fe += 2) nt.geometry.push(_e(ot[Fe], ot[Fe + 1], at, vt, St, Je));
                else for (let Fe = 0; Fe < ot.length; Fe++) {
                  const pt = [];
                  for (let Mt = 0; Mt < ot[Fe].length; Mt += 2) pt.push(_e(ot[Fe][Mt], ot[Fe][Mt + 1], at, vt, St, Je));
                  nt.geometry.push(pt);
                }
              }
              return mt.transformed = !0, mt;
            }
            function _e(mt, at, vt, St, Je, nt) {
              return [Math.round(vt * (mt * St - Je)), Math.round(vt * (at * St - nt))];
            }
            function Be(mt, at, vt, St, Je) {
              const nt = at === Je.maxZoom ? 0 : Je.tolerance / ((1 << at) * Je.extent), ot = { features: [], numPoints: 0, numSimplified: 0, numFeatures: mt.length, source: null, x: vt, y: St, z: at, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 };
              for (const Ye of mt) $e(ot, Ye, nt, Je);
              return ot;
            }
            function $e(mt, at, vt, St) {
              const Je = at.geometry, nt = at.type, ot = [];
              if (mt.minX = Math.min(mt.minX, at.minX), mt.minY = Math.min(mt.minY, at.minY), mt.maxX = Math.max(mt.maxX, at.maxX), mt.maxY = Math.max(mt.maxY, at.maxY), nt === "Point" || nt === "MultiPoint") for (let Ye = 0; Ye < Je.length; Ye += 3) ot.push(Je[Ye], Je[Ye + 1]), mt.numPoints++, mt.numSimplified++;
              else if (nt === "LineString") Ze(ot, Je, mt, vt, !1, !1);
              else if (nt === "MultiLineString" || nt === "Polygon") for (let Ye = 0; Ye < Je.length; Ye++) Ze(ot, Je[Ye], mt, vt, nt === "Polygon", Ye === 0);
              else if (nt === "MultiPolygon") for (let Ye = 0; Ye < Je.length; Ye++) {
                const Fe = Je[Ye];
                for (let pt = 0; pt < Fe.length; pt++) Ze(ot, Fe[pt], mt, vt, !0, pt === 0);
              }
              if (ot.length) {
                let Ye = at.tags || null;
                if (nt === "LineString" && St.lineMetrics) {
                  Ye = {};
                  for (const pt in at.tags) Ye[pt] = at.tags[pt];
                  Ye.mapbox_clip_start = Je.start / Je.size, Ye.mapbox_clip_end = Je.end / Je.size;
                }
                const Fe = { geometry: ot, type: nt === "Polygon" || nt === "MultiPolygon" ? 3 : nt === "LineString" || nt === "MultiLineString" ? 2 : 1, tags: Ye };
                at.id !== null && (Fe.id = at.id), mt.features.push(Fe);
              }
            }
            function Ze(mt, at, vt, St, Je, nt) {
              const ot = St * St;
              if (St > 0 && at.size < (Je ? ot : St)) return void (vt.numPoints += at.length / 3);
              const Ye = [];
              for (let Fe = 0; Fe < at.length; Fe += 3) (St === 0 || at[Fe + 2] > ot) && (vt.numSimplified++, Ye.push(at[Fe], at[Fe + 1])), vt.numPoints++;
              Je && function(Fe, pt) {
                let Mt = 0;
                for (let At = 0, Rt = Fe.length, Ft = Rt - 2; At < Rt; Ft = At, At += 2) Mt += (Fe[At] - Fe[Ft]) * (Fe[At + 1] + Fe[Ft + 1]);
                if (Mt > 0 === pt) for (let At = 0, Rt = Fe.length; At < Rt / 2; At += 2) {
                  const Ft = Fe[At], lt = Fe[At + 1];
                  Fe[At] = Fe[Rt - 2 - At], Fe[At + 1] = Fe[Rt - 1 - At], Fe[Rt - 2 - At] = Ft, Fe[Rt - 1 - At] = lt;
                }
              }(Ye, nt), mt.push(Ye);
            }
            const ct = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 };
            class ft {
              constructor(at, vt) {
                const St = (vt = this.options = function(nt, ot) {
                  for (const Ye in ot) nt[Ye] = ot[Ye];
                  return nt;
                }(Object.create(ct), vt)).debug;
                if (St && console.time("preprocess data"), vt.maxZoom < 0 || vt.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range");
                if (vt.promoteId && vt.generateId) throw new Error("promoteId and generateId cannot be used together.");
                let Je = function(nt, ot) {
                  const Ye = [];
                  if (nt.type === "FeatureCollection") for (let Fe = 0; Fe < nt.features.length; Fe++) Ae(Ye, nt.features[Fe], ot, Fe);
                  else nt.type === "Feature" ? Ae(Ye, nt, ot) : Ae(Ye, { geometry: nt }, ot);
                  return Ye;
                }(at, vt);
                this.tiles = {}, this.tileCoords = [], St && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", vt.indexMaxZoom, vt.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), Je = function(nt, ot) {
                  const Ye = ot.buffer / ot.extent;
                  let Fe = nt;
                  const pt = Ee(nt, 1, -1 - Ye, Ye, 0, -1, 2, ot), Mt = Ee(nt, 1, 1 - Ye, 2 + Ye, 0, -1, 2, ot);
                  return (pt || Mt) && (Fe = Ee(nt, 1, -Ye, 1 + Ye, 0, -1, 2, ot) || [], pt && (Fe = je(pt, 1).concat(Fe)), Mt && (Fe = Fe.concat(je(Mt, -1)))), Fe;
                }(Je, vt), Je.length && this.splitTile(Je, 0, 0, 0), St && (Je.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)));
              }
              splitTile(at, vt, St, Je, nt, ot, Ye) {
                const Fe = [at, vt, St, Je], pt = this.options, Mt = pt.debug;
                for (; Fe.length; ) {
                  Je = Fe.pop(), St = Fe.pop(), vt = Fe.pop(), at = Fe.pop();
                  const At = 1 << vt, Rt = _t(vt, St, Je);
                  let Ft = this.tiles[Rt];
                  if (!Ft && (Mt > 1 && console.time("creation"), Ft = this.tiles[Rt] = Be(at, vt, St, Je, pt), this.tileCoords.push({ z: vt, x: St, y: Je }), Mt)) {
                    Mt > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", vt, St, Je, Ft.numFeatures, Ft.numPoints, Ft.numSimplified), console.timeEnd("creation"));
                    const Ht = `z${vt}`;
                    this.stats[Ht] = (this.stats[Ht] || 0) + 1, this.total++;
                  }
                  if (Ft.source = at, nt == null) {
                    if (vt === pt.indexMaxZoom || Ft.numPoints <= pt.indexMaxPoints) continue;
                  } else {
                    if (vt === pt.maxZoom || vt === nt) continue;
                    if (nt != null) {
                      const Ht = nt - vt;
                      if (St !== ot >> Ht || Je !== Ye >> Ht) continue;
                    }
                  }
                  if (Ft.source = null, at.length === 0) continue;
                  Mt > 1 && console.time("clipping");
                  const lt = 0.5 * pt.buffer / pt.extent, st = 0.5 - lt, Ot = 0.5 + lt, kt = 1 + lt;
                  let Bt = null, xt = null, Jt = null, qt = null, en = Ee(at, At, St - lt, St + Ot, 0, Ft.minX, Ft.maxX, pt), Yt = Ee(at, At, St + st, St + kt, 0, Ft.minX, Ft.maxX, pt);
                  at = null, en && (Bt = Ee(en, At, Je - lt, Je + Ot, 1, Ft.minY, Ft.maxY, pt), xt = Ee(en, At, Je + st, Je + kt, 1, Ft.minY, Ft.maxY, pt), en = null), Yt && (Jt = Ee(Yt, At, Je - lt, Je + Ot, 1, Ft.minY, Ft.maxY, pt), qt = Ee(Yt, At, Je + st, Je + kt, 1, Ft.minY, Ft.maxY, pt), Yt = null), Mt > 1 && console.timeEnd("clipping"), Fe.push(Bt || [], vt + 1, 2 * St, 2 * Je), Fe.push(xt || [], vt + 1, 2 * St, 2 * Je + 1), Fe.push(Jt || [], vt + 1, 2 * St + 1, 2 * Je), Fe.push(qt || [], vt + 1, 2 * St + 1, 2 * Je + 1);
                }
              }
              getTile(at, vt, St) {
                at = +at, vt = +vt, St = +St;
                const Je = this.options, { extent: nt, debug: ot } = Je;
                if (at < 0 || at > 24) return null;
                const Ye = 1 << at, Fe = _t(at, vt = vt + Ye & Ye - 1, St);
                if (this.tiles[Fe]) return tt(this.tiles[Fe], nt);
                ot > 1 && console.log("drilling down to z%d-%d-%d", at, vt, St);
                let pt, Mt = at, At = vt, Rt = St;
                for (; !pt && Mt > 0; ) Mt--, At >>= 1, Rt >>= 1, pt = this.tiles[_t(Mt, At, Rt)];
                return pt && pt.source ? (ot > 1 && (console.log("found parent tile z%d-%d-%d", Mt, At, Rt), console.time("drilling down")), this.splitTile(pt.source, Mt, At, Rt, at, vt, St), ot > 1 && console.timeEnd("drilling down"), this.tiles[Fe] ? tt(this.tiles[Fe], nt) : null) : null;
              }
            }
            function _t(mt, at, vt) {
              return 32 * ((1 << mt) * vt + at) + mt;
            }
            function Pt(mt, at) {
              return at ? mt.properties[at] : mt.id;
            }
            function Dt(mt, at) {
              if (mt == null) return !0;
              if (mt.type === "Feature") return Pt(mt, at) != null;
              if (mt.type === "FeatureCollection") {
                const vt = /* @__PURE__ */ new Set();
                for (const St of mt.features) {
                  const Je = Pt(St, at);
                  if (Je == null || vt.has(Je)) return !1;
                  vt.add(Je);
                }
                return !0;
              }
              return !1;
            }
            function $t(mt, at) {
              const vt = /* @__PURE__ */ new Map();
              if (mt != null) if (mt.type === "Feature") vt.set(Pt(mt, at), mt);
              else for (const St of mt.features) vt.set(Pt(St, at), St);
              return vt;
            }
            class Gt extends d {
              constructor() {
                super(...arguments), this._dataUpdateable = /* @__PURE__ */ new Map();
              }
              loadVectorTile(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  const St = at.tileID.canonical;
                  if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
                  const Je = this._geoJSONIndex.getTile(St.z, St.x, St.y);
                  if (!Je) return null;
                  const nt = new S(Je.features);
                  let ot = re(nt);
                  return ot.byteOffset === 0 && ot.byteLength === ot.buffer.byteLength || (ot = new Uint8Array(ot)), { vectorTile: nt, rawData: ot.buffer };
                });
              }
              loadData(at) {
                return u._(this, void 0, void 0, function* () {
                  var vt;
                  (vt = this._pendingRequest) === null || vt === void 0 || vt.abort();
                  const St = !!(at && at.request && at.request.collectResourceTiming) && new u.bu(at.request);
                  this._pendingRequest = new AbortController();
                  try {
                    this._pendingData = this.loadAndProcessGeoJSON(at, this._pendingRequest), this._geoJSONIndex = at.cluster ? new ce(function({ superclusterOptions: Ye, clusterProperties: Fe }) {
                      if (!Fe || !Ye) return Ye;
                      const pt = {}, Mt = {}, At = { accumulated: null, zoom: 0 }, Rt = { properties: null }, Ft = Object.keys(Fe);
                      for (const lt of Ft) {
                        const [st, Ot] = Fe[lt], kt = u.bB(Ot), Bt = u.bB(typeof st == "string" ? [st, ["accumulated"], ["get", lt]] : st);
                        pt[lt] = kt.value, Mt[lt] = Bt.value;
                      }
                      return Ye.map = (lt) => {
                        Rt.properties = lt;
                        const st = {};
                        for (const Ot of Ft) st[Ot] = pt[Ot].evaluate(At, Rt);
                        return st;
                      }, Ye.reduce = (lt, st) => {
                        Rt.properties = st;
                        for (const Ot of Ft) At.accumulated = lt[Ot], lt[Ot] = Mt[Ot].evaluate(At, Rt);
                      }, Ye;
                    }(at)).load((yield this._pendingData).features) : (Je = yield this._pendingData, nt = at.geojsonVtOptions, new ft(Je, nt)), this.loaded = {};
                    const ot = {};
                    if (St) {
                      const Ye = St.finish();
                      Ye && (ot.resourceTiming = {}, ot.resourceTiming[at.source] = JSON.parse(JSON.stringify(Ye)));
                    }
                    return ot;
                  } catch (ot) {
                    if (delete this._pendingRequest, u.bA(ot)) return { abandoned: !0 };
                    throw ot;
                  }
                  var Je, nt;
                });
              }
              getData() {
                return u._(this, void 0, void 0, function* () {
                  return this._pendingData;
                });
              }
              reloadTile(at) {
                const vt = this.loaded, St = at.uid;
                return vt && vt[St] ? super.reloadTile(at) : this.loadTile(at);
              }
              loadAndProcessGeoJSON(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  let St = yield this.loadGeoJSON(at, vt);
                  if (delete this._pendingRequest, typeof St != "object") throw new Error(`Input data given to '${at.source}' is not a valid GeoJSON object.`);
                  if (x(St, !0), at.filter) {
                    const Je = u.bB(at.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
                    if (Je.result === "error") throw new Error(Je.value.map((ot) => `${ot.key}: ${ot.message}`).join(", "));
                    St = { type: "FeatureCollection", features: St.features.filter((ot) => Je.value.evaluate({ zoom: 0 }, ot)) };
                  }
                  return St;
                });
              }
              loadGeoJSON(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  const { promoteId: St } = at;
                  if (at.request) {
                    const Je = yield u.h(at.request, vt);
                    return this._dataUpdateable = Dt(Je.data, St) ? $t(Je.data, St) : void 0, Je.data;
                  }
                  if (typeof at.data == "string") try {
                    const Je = JSON.parse(at.data);
                    return this._dataUpdateable = Dt(Je, St) ? $t(Je, St) : void 0, Je;
                  } catch {
                    throw new Error(`Input data given to '${at.source}' is not a valid GeoJSON object.`);
                  }
                  if (!at.dataDiff) throw new Error(`Input data given to '${at.source}' is not a valid GeoJSON object.`);
                  if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${at.source}`);
                  return function(Je, nt, ot) {
                    var Ye, Fe, pt, Mt;
                    if (nt.removeAll && Je.clear(), nt.remove) for (const At of nt.remove) Je.delete(At);
                    if (nt.add) for (const At of nt.add) {
                      const Rt = Pt(At, ot);
                      Rt != null && Je.set(Rt, At);
                    }
                    if (nt.update) for (const At of nt.update) {
                      let Rt = Je.get(At.id);
                      if (Rt == null) continue;
                      const Ft = At.newGeometry || At.removeAllProperties, lt = !At.removeAllProperties && (((Ye = At.removeProperties) === null || Ye === void 0 ? void 0 : Ye.length) > 0 || ((Fe = At.addOrUpdateProperties) === null || Fe === void 0 ? void 0 : Fe.length) > 0);
                      if ((Ft || lt) && (Rt = Object.assign({}, Rt), Je.set(At.id, Rt), lt && (Rt.properties = Object.assign({}, Rt.properties))), At.newGeometry && (Rt.geometry = At.newGeometry), At.removeAllProperties) Rt.properties = {};
                      else if (((pt = At.removeProperties) === null || pt === void 0 ? void 0 : pt.length) > 0) for (const st of At.removeProperties) Object.prototype.hasOwnProperty.call(Rt.properties, st) && delete Rt.properties[st];
                      if (((Mt = At.addOrUpdateProperties) === null || Mt === void 0 ? void 0 : Mt.length) > 0) for (const { key: st, value: Ot } of At.addOrUpdateProperties) Rt.properties[st] = Ot;
                    }
                  }(this._dataUpdateable, at.dataDiff, St), { type: "FeatureCollection", features: Array.from(this._dataUpdateable.values()) };
                });
              }
              removeSource(at) {
                return u._(this, void 0, void 0, function* () {
                  this._pendingRequest && this._pendingRequest.abort();
                });
              }
              getClusterExpansionZoom(at) {
                return this._geoJSONIndex.getClusterExpansionZoom(at.clusterId);
              }
              getClusterChildren(at) {
                return this._geoJSONIndex.getChildren(at.clusterId);
              }
              getClusterLeaves(at) {
                return this._geoJSONIndex.getLeaves(at.clusterId, at.limit, at.offset);
              }
            }
            class Wt {
              constructor(at) {
                this.self = at, this.actor = new u.F(at), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}, this.self.registerWorkerSource = (vt, St) => {
                  if (this.externalWorkerSourceTypes[vt]) throw new Error(`Worker source with name "${vt}" already registered.`);
                  this.externalWorkerSourceTypes[vt] = St;
                }, this.self.addProtocol = u.bh, this.self.removeProtocol = u.bi, this.self.registerRTLTextPlugin = (vt) => {
                  if (u.bC.isParsed()) throw new Error("RTL text plugin already registered.");
                  u.bC.setMethods(vt);
                }, this.actor.registerMessageHandler("LDT", (vt, St) => this._getDEMWorkerSource(vt, St.source).loadTile(St)), this.actor.registerMessageHandler("RDT", (vt, St) => u._(this, void 0, void 0, function* () {
                  this._getDEMWorkerSource(vt, St.source).removeTile(St);
                })), this.actor.registerMessageHandler("GCEZ", (vt, St) => u._(this, void 0, void 0, function* () {
                  return this._getWorkerSource(vt, St.type, St.source).getClusterExpansionZoom(St);
                })), this.actor.registerMessageHandler("GCC", (vt, St) => u._(this, void 0, void 0, function* () {
                  return this._getWorkerSource(vt, St.type, St.source).getClusterChildren(St);
                })), this.actor.registerMessageHandler("GCL", (vt, St) => u._(this, void 0, void 0, function* () {
                  return this._getWorkerSource(vt, St.type, St.source).getClusterLeaves(St);
                })), this.actor.registerMessageHandler("LD", (vt, St) => this._getWorkerSource(vt, St.type, St.source).loadData(St)), this.actor.registerMessageHandler("GD", (vt, St) => this._getWorkerSource(vt, St.type, St.source).getData()), this.actor.registerMessageHandler("LT", (vt, St) => this._getWorkerSource(vt, St.type, St.source).loadTile(St)), this.actor.registerMessageHandler("RT", (vt, St) => this._getWorkerSource(vt, St.type, St.source).reloadTile(St)), this.actor.registerMessageHandler("AT", (vt, St) => this._getWorkerSource(vt, St.type, St.source).abortTile(St)), this.actor.registerMessageHandler("RMT", (vt, St) => this._getWorkerSource(vt, St.type, St.source).removeTile(St)), this.actor.registerMessageHandler("RS", (vt, St) => u._(this, void 0, void 0, function* () {
                  if (!this.workerSources[vt] || !this.workerSources[vt][St.type] || !this.workerSources[vt][St.type][St.source]) return;
                  const Je = this.workerSources[vt][St.type][St.source];
                  delete this.workerSources[vt][St.type][St.source], Je.removeSource !== void 0 && Je.removeSource(St);
                })), this.actor.registerMessageHandler("RM", (vt) => u._(this, void 0, void 0, function* () {
                  delete this.layerIndexes[vt], delete this.availableImages[vt], delete this.workerSources[vt], delete this.demWorkerSources[vt];
                })), this.actor.registerMessageHandler("SR", (vt, St) => u._(this, void 0, void 0, function* () {
                  this.referrer = St;
                })), this.actor.registerMessageHandler("SRPS", (vt, St) => this._syncRTLPluginState(vt, St)), this.actor.registerMessageHandler("IS", (vt, St) => u._(this, void 0, void 0, function* () {
                  this.self.importScripts(St);
                })), this.actor.registerMessageHandler("SI", (vt, St) => this._setImages(vt, St)), this.actor.registerMessageHandler("UL", (vt, St) => u._(this, void 0, void 0, function* () {
                  this._getLayerIndex(vt).update(St.layers, St.removedIds);
                })), this.actor.registerMessageHandler("SL", (vt, St) => u._(this, void 0, void 0, function* () {
                  this._getLayerIndex(vt).replace(St);
                }));
              }
              _setImages(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  this.availableImages[at] = vt;
                  for (const St in this.workerSources[at]) {
                    const Je = this.workerSources[at][St];
                    for (const nt in Je) Je[nt].availableImages = vt;
                  }
                });
              }
              _syncRTLPluginState(at, vt) {
                return u._(this, void 0, void 0, function* () {
                  if (u.bC.isParsed()) return u.bC.getState();
                  if (vt.pluginStatus !== "loading") return u.bC.setState(vt), vt;
                  const St = vt.pluginURL;
                  if (this.self.importScripts(St), u.bC.isParsed()) {
                    const Je = { pluginStatus: "loaded", pluginURL: St };
                    return u.bC.setState(Je), Je;
                  }
                  throw u.bC.setState({ pluginStatus: "error", pluginURL: "" }), new Error(`RTL Text Plugin failed to import scripts from ${St}`);
                });
              }
              _getAvailableImages(at) {
                let vt = this.availableImages[at];
                return vt || (vt = []), vt;
              }
              _getLayerIndex(at) {
                let vt = this.layerIndexes[at];
                return vt || (vt = this.layerIndexes[at] = new i()), vt;
              }
              _getWorkerSource(at, vt, St) {
                if (this.workerSources[at] || (this.workerSources[at] = {}), this.workerSources[at][vt] || (this.workerSources[at][vt] = {}), !this.workerSources[at][vt][St]) {
                  const Je = { sendAsync: (nt, ot) => (nt.targetMapId = at, this.actor.sendAsync(nt, ot)) };
                  switch (vt) {
                    case "vector":
                      this.workerSources[at][vt][St] = new d(Je, this._getLayerIndex(at), this._getAvailableImages(at));
                      break;
                    case "geojson":
                      this.workerSources[at][vt][St] = new Gt(Je, this._getLayerIndex(at), this._getAvailableImages(at));
                      break;
                    default:
                      this.workerSources[at][vt][St] = new this.externalWorkerSourceTypes[vt](Je, this._getLayerIndex(at), this._getAvailableImages(at));
                  }
                }
                return this.workerSources[at][vt][St];
              }
              _getDEMWorkerSource(at, vt) {
                return this.demWorkerSources[at] || (this.demWorkerSources[at] = {}), this.demWorkerSources[at][vt] || (this.demWorkerSources[at][vt] = new f()), this.demWorkerSources[at][vt];
              }
            }
            return u.i(self) && (self.worker = new Wt(self)), Wt;
          }), l("index", 0, function(u, i) {
            var h = "4.5.2";
            let p, _;
            const d = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync(B) {
              return new Promise((y, b) => {
                const R = requestAnimationFrame(y);
                B.signal.addEventListener("abort", () => {
                  cancelAnimationFrame(R), b(i.c());
                });
              });
            }, getImageData(B, y = 0) {
              return this.getImageCanvasContext(B).getImageData(-y, -y, B.width + 2 * y, B.height + 2 * y);
            }, getImageCanvasContext(B) {
              const y = window.document.createElement("canvas"), b = y.getContext("2d", { willReadFrequently: !0 });
              if (!b) throw new Error("failed to create canvas 2d context");
              return y.width = B.width, y.height = B.height, b.drawImage(B, 0, 0, B.width, B.height), b;
            }, resolveURL(B) {
              return p || (p = document.createElement("a")), p.href = B, p.href;
            }, hardwareConcurrency: typeof navigator < "u" && navigator.hardwareConcurrency || 4, get prefersReducedMotion() {
              return !!matchMedia && (_ == null && (_ = matchMedia("(prefers-reduced-motion: reduce)")), _.matches);
            } };
            class f {
              static testProp(y) {
                if (!f.docStyle) return y[0];
                for (let b = 0; b < y.length; b++) if (y[b] in f.docStyle) return y[b];
                return y[0];
              }
              static create(y, b, R) {
                const j = window.document.createElement(y);
                return b !== void 0 && (j.className = b), R && R.appendChild(j), j;
              }
              static createNS(y, b) {
                return window.document.createElementNS(y, b);
              }
              static disableDrag() {
                f.docStyle && f.selectProp && (f.userSelect = f.docStyle[f.selectProp], f.docStyle[f.selectProp] = "none");
              }
              static enableDrag() {
                f.docStyle && f.selectProp && (f.docStyle[f.selectProp] = f.userSelect);
              }
              static setTransform(y, b) {
                y.style[f.transformProp] = b;
              }
              static addEventListener(y, b, R, j = {}) {
                "passive" in j ? y.addEventListener(b, R, j) : y.addEventListener(b, R, j.capture);
              }
              static removeEventListener(y, b, R, j = {}) {
                "passive" in j ? y.removeEventListener(b, R, j) : y.removeEventListener(b, R, j.capture);
              }
              static suppressClickInternal(y) {
                y.preventDefault(), y.stopPropagation(), window.removeEventListener("click", f.suppressClickInternal, !0);
              }
              static suppressClick() {
                window.addEventListener("click", f.suppressClickInternal, !0), window.setTimeout(() => {
                  window.removeEventListener("click", f.suppressClickInternal, !0);
                }, 0);
              }
              static getScale(y) {
                const b = y.getBoundingClientRect();
                return { x: b.width / y.offsetWidth || 1, y: b.height / y.offsetHeight || 1, boundingClientRect: b };
              }
              static getPoint(y, b, R) {
                const j = b.boundingClientRect;
                return new i.P((R.clientX - j.left) / b.x - y.clientLeft, (R.clientY - j.top) / b.y - y.clientTop);
              }
              static mousePos(y, b) {
                const R = f.getScale(y);
                return f.getPoint(y, R, b);
              }
              static touchPos(y, b) {
                const R = [], j = f.getScale(y);
                for (let G = 0; G < b.length; G++) R.push(f.getPoint(y, j, b[G]));
                return R;
              }
              static mouseButton(y) {
                return y.button;
              }
              static remove(y) {
                y.parentNode && y.parentNode.removeChild(y);
              }
            }
            f.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, f.selectProp = f.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), f.transformProp = f.testProp(["transform", "WebkitTransform"]);
            const c = { supported: !1, testSupport: function(B) {
              !x && m && (w ? k(B) : g = B);
            } };
            let g, m, x = !1, w = !1;
            function k(B) {
              const y = B.createTexture();
              B.bindTexture(B.TEXTURE_2D, y);
              try {
                if (B.texImage2D(B.TEXTURE_2D, 0, B.RGBA, B.RGBA, B.UNSIGNED_BYTE, m), B.isContextLost()) return;
                c.supported = !0;
              } catch {
              }
              B.deleteTexture(y), x = !0;
            }
            var S;
            typeof document < "u" && (m = document.createElement("img"), m.onload = () => {
              g && k(g), g = null, w = !0;
            }, m.onerror = () => {
              x = !0, g = null;
            }, m.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(B) {
              let y, b, R, j;
              B.resetRequestQueue = () => {
                y = [], b = 0, R = 0, j = {};
              }, B.addThrottleControl = (xe) => {
                const Te = R++;
                return j[Te] = xe, Te;
              }, B.removeThrottleControl = (xe) => {
                delete j[xe], ie();
              }, B.getImage = (xe, Te, ze = !0) => new Promise((Ve, ut) => {
                c.supported && (xe.headers || (xe.headers = {}), xe.headers.accept = "image/webp,*/*"), i.e(xe, { type: "image" });
                const gt = { abortController: Te, requestParameters: xe, supportImageRefresh: ze, state: "queued", onError: (wt) => {
                  ut(wt);
                }, onSuccess: (wt) => {
                  Ve(wt);
                } };
                y.push(gt), ie();
              });
              const G = (xe) => i._(this, void 0, void 0, function* () {
                xe.state = "running";
                const { requestParameters: Te, supportImageRefresh: ze, onError: Ve, onSuccess: ut, abortController: gt } = xe, wt = ze === !1 && !i.i(self) && !i.g(Te.url) && (!Te.headers || Object.keys(Te.headers).reduce((It, jt) => It && jt === "accept", !0));
                b++;
                const Et = wt ? fe(Te, gt) : i.m(Te, gt);
                try {
                  const It = yield Et;
                  delete xe.abortController, xe.state = "completed", It.data instanceof HTMLImageElement || i.b(It.data) ? ut(It) : It.data && ut({ data: yield (zt = It.data, typeof createImageBitmap == "function" ? i.d(zt) : i.f(zt)), cacheControl: It.cacheControl, expires: It.expires });
                } catch (It) {
                  delete xe.abortController, Ve(It);
                } finally {
                  b--, ie();
                }
                var zt;
              }), ie = () => {
                const xe = (() => {
                  for (const Te of Object.keys(j)) if (j[Te]()) return !0;
                  return !1;
                })() ? i.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : i.a.MAX_PARALLEL_IMAGE_REQUESTS;
                for (let Te = b; Te < xe && y.length > 0; Te++) {
                  const ze = y.shift();
                  ze.abortController.signal.aborted ? Te-- : G(ze);
                }
              }, fe = (xe, Te) => new Promise((ze, Ve) => {
                const ut = new Image(), gt = xe.url, wt = xe.credentials;
                wt && wt === "include" ? ut.crossOrigin = "use-credentials" : (wt && wt === "same-origin" || !i.s(gt)) && (ut.crossOrigin = "anonymous"), Te.signal.addEventListener("abort", () => {
                  ut.src = "", Ve(i.c());
                }), ut.fetchPriority = "high", ut.onload = () => {
                  ut.onerror = ut.onload = null, ze({ data: ut });
                }, ut.onerror = () => {
                  ut.onerror = ut.onload = null, Te.signal.aborted || Ve(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."));
                }, ut.src = gt;
              });
            }(S || (S = {})), S.resetRequestQueue();
            class A {
              constructor(y) {
                this._transformRequestFn = y;
              }
              transformRequest(y, b) {
                return this._transformRequestFn && this._transformRequestFn(y, b) || { url: y };
              }
              setTransformRequest(y) {
                this._transformRequestFn = y;
              }
            }
            function C(B) {
              var y = new i.A(3);
              return y[0] = B[0], y[1] = B[1], y[2] = B[2], y;
            }
            var D, L = function(B, y, b) {
              return B[0] = y[0] - b[0], B[1] = y[1] - b[1], B[2] = y[2] - b[2], B;
            };
            D = new i.A(3), i.A != Float32Array && (D[0] = 0, D[1] = 0, D[2] = 0);
            var E = function(B) {
              var y = B[0], b = B[1];
              return y * y + b * b;
            };
            function P(B) {
              const y = [];
              if (typeof B == "string") y.push({ id: "default", url: B });
              else if (B && B.length > 0) {
                const b = [];
                for (const { id: R, url: j } of B) {
                  const G = `${R}${j}`;
                  b.indexOf(G) === -1 && (b.push(G), y.push({ id: R, url: j }));
                }
              }
              return y;
            }
            function I(B, y, b) {
              const R = B.split("?");
              return R[0] += `${y}${b}`, R.join("?");
            }
            function M(B, y, b, R) {
              return i._(this, void 0, void 0, function* () {
                const j = P(B), G = b > 1 ? "@2x" : "", ie = {}, fe = {};
                for (const { id: xe, url: Te } of j) {
                  const ze = y.transformRequest(I(Te, G, ".json"), "SpriteJSON");
                  ie[xe] = i.h(ze, R);
                  const Ve = y.transformRequest(I(Te, G, ".png"), "SpriteImage");
                  fe[xe] = S.getImage(Ve, R);
                }
                return yield Promise.all([...Object.values(ie), ...Object.values(fe)]), function(xe, Te) {
                  return i._(this, void 0, void 0, function* () {
                    const ze = {};
                    for (const Ve in xe) {
                      ze[Ve] = {};
                      const ut = d.getImageCanvasContext((yield Te[Ve]).data), gt = (yield xe[Ve]).data;
                      for (const wt in gt) {
                        const { width: Et, height: zt, x: It, y: jt, sdf: Lt, pixelRatio: Zt, stretchX: Qt, stretchY: Xt, content: yn, textFitWidth: Sn, textFitHeight: Un } = gt[wt], Vn = { width: Et, height: zt, x: It, y: jt, context: ut };
                        ze[Ve][wt] = { data: null, pixelRatio: Zt, sdf: Lt, stretchX: Qt, stretchY: Xt, content: yn, textFitWidth: Sn, textFitHeight: Un, spriteData: Vn };
                      }
                    }
                    return ze;
                  });
                }(ie, fe);
              });
            }
            (function() {
              var B = new i.A(2);
              i.A != Float32Array && (B[0] = 0, B[1] = 0);
            })();
            class O {
              constructor(y, b, R, j) {
                this.context = y, this.format = R, this.texture = y.gl.createTexture(), this.update(b, j);
              }
              update(y, b, R) {
                const { width: j, height: G } = y, ie = !(this.size && this.size[0] === j && this.size[1] === G || R), { context: fe } = this, { gl: xe } = fe;
                if (this.useMipmap = !!(b && b.useMipmap), xe.bindTexture(xe.TEXTURE_2D, this.texture), fe.pixelStoreUnpackFlipY.set(!1), fe.pixelStoreUnpack.set(1), fe.pixelStoreUnpackPremultiplyAlpha.set(this.format === xe.RGBA && (!b || b.premultiply !== !1)), ie) this.size = [j, G], y instanceof HTMLImageElement || y instanceof HTMLCanvasElement || y instanceof HTMLVideoElement || y instanceof ImageData || i.b(y) ? xe.texImage2D(xe.TEXTURE_2D, 0, this.format, this.format, xe.UNSIGNED_BYTE, y) : xe.texImage2D(xe.TEXTURE_2D, 0, this.format, j, G, 0, this.format, xe.UNSIGNED_BYTE, y.data);
                else {
                  const { x: Te, y: ze } = R || { x: 0, y: 0 };
                  y instanceof HTMLImageElement || y instanceof HTMLCanvasElement || y instanceof HTMLVideoElement || y instanceof ImageData || i.b(y) ? xe.texSubImage2D(xe.TEXTURE_2D, 0, Te, ze, xe.RGBA, xe.UNSIGNED_BYTE, y) : xe.texSubImage2D(xe.TEXTURE_2D, 0, Te, ze, j, G, xe.RGBA, xe.UNSIGNED_BYTE, y.data);
                }
                this.useMipmap && this.isSizePowerOfTwo() && xe.generateMipmap(xe.TEXTURE_2D);
              }
              bind(y, b, R) {
                const { context: j } = this, { gl: G } = j;
                G.bindTexture(G.TEXTURE_2D, this.texture), R !== G.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (R = G.LINEAR), y !== this.filter && (G.texParameteri(G.TEXTURE_2D, G.TEXTURE_MAG_FILTER, y), G.texParameteri(G.TEXTURE_2D, G.TEXTURE_MIN_FILTER, R || y), this.filter = y), b !== this.wrap && (G.texParameteri(G.TEXTURE_2D, G.TEXTURE_WRAP_S, b), G.texParameteri(G.TEXTURE_2D, G.TEXTURE_WRAP_T, b), this.wrap = b);
              }
              isSizePowerOfTwo() {
                return this.size[0] === this.size[1] && Math.log(this.size[0]) / Math.LN2 % 1 == 0;
              }
              destroy() {
                const { gl: y } = this.context;
                y.deleteTexture(this.texture), this.texture = null;
              }
            }
            function T(B) {
              const { userImage: y } = B;
              return !!(y && y.render && y.render()) && (B.data.replace(new Uint8Array(y.data.buffer)), !0);
            }
            class z extends i.E {
              constructor() {
                super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new i.R({ width: 1, height: 1 }), this.dirty = !0;
              }
              isLoaded() {
                return this.loaded;
              }
              setLoaded(y) {
                if (this.loaded !== y && (this.loaded = y, y)) {
                  for (const { ids: b, promiseResolve: R } of this.requestors) R(this._getImagesForIds(b));
                  this.requestors = [];
                }
              }
              getImage(y) {
                const b = this.images[y];
                if (b && !b.data && b.spriteData) {
                  const R = b.spriteData;
                  b.data = new i.R({ width: R.width, height: R.height }, R.context.getImageData(R.x, R.y, R.width, R.height).data), b.spriteData = null;
                }
                return b;
              }
              addImage(y, b) {
                if (this.images[y]) throw new Error(`Image id ${y} already exist, use updateImage instead`);
                this._validate(y, b) && (this.images[y] = b);
              }
              _validate(y, b) {
                let R = !0;
                const j = b.data || b.spriteData;
                return this._validateStretch(b.stretchX, j && j.width) || (this.fire(new i.j(new Error(`Image "${y}" has invalid "stretchX" value`))), R = !1), this._validateStretch(b.stretchY, j && j.height) || (this.fire(new i.j(new Error(`Image "${y}" has invalid "stretchY" value`))), R = !1), this._validateContent(b.content, b) || (this.fire(new i.j(new Error(`Image "${y}" has invalid "content" value`))), R = !1), R;
              }
              _validateStretch(y, b) {
                if (!y) return !0;
                let R = 0;
                for (const j of y) {
                  if (j[0] < R || j[1] < j[0] || b < j[1]) return !1;
                  R = j[1];
                }
                return !0;
              }
              _validateContent(y, b) {
                if (!y) return !0;
                if (y.length !== 4) return !1;
                const R = b.spriteData, j = R && R.width || b.data.width, G = R && R.height || b.data.height;
                return !(y[0] < 0 || j < y[0] || y[1] < 0 || G < y[1] || y[2] < 0 || j < y[2] || y[3] < 0 || G < y[3] || y[2] < y[0] || y[3] < y[1]);
              }
              updateImage(y, b, R = !0) {
                const j = this.getImage(y);
                if (R && (j.data.width !== b.data.width || j.data.height !== b.data.height)) throw new Error(`size mismatch between old image (${j.data.width}x${j.data.height}) and new image (${b.data.width}x${b.data.height}).`);
                b.version = j.version + 1, this.images[y] = b, this.updatedImages[y] = !0;
              }
              removeImage(y) {
                const b = this.images[y];
                delete this.images[y], delete this.patterns[y], b.userImage && b.userImage.onRemove && b.userImage.onRemove();
              }
              listImages() {
                return Object.keys(this.images);
              }
              getImages(y) {
                return new Promise((b, R) => {
                  let j = !0;
                  if (!this.isLoaded()) for (const G of y) this.images[G] || (j = !1);
                  this.isLoaded() || j ? b(this._getImagesForIds(y)) : this.requestors.push({ ids: y, promiseResolve: b });
                });
              }
              _getImagesForIds(y) {
                const b = {};
                for (const R of y) {
                  let j = this.getImage(R);
                  j || (this.fire(new i.k("styleimagemissing", { id: R })), j = this.getImage(R)), j ? b[R] = { data: j.data.clone(), pixelRatio: j.pixelRatio, sdf: j.sdf, version: j.version, stretchX: j.stretchX, stretchY: j.stretchY, content: j.content, textFitWidth: j.textFitWidth, textFitHeight: j.textFitHeight, hasRenderCallback: !!(j.userImage && j.userImage.render) } : i.w(`Image "${R}" 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.`);
                }
                return b;
              }
              getPixelSize() {
                const { width: y, height: b } = this.atlasImage;
                return { width: y, height: b };
              }
              getPattern(y) {
                const b = this.patterns[y], R = this.getImage(y);
                if (!R) return null;
                if (b && b.position.version === R.version) return b.position;
                if (b) b.position.version = R.version;
                else {
                  const j = { w: R.data.width + 2, h: R.data.height + 2, x: 0, y: 0 }, G = new i.I(j, R);
                  this.patterns[y] = { bin: j, position: G };
                }
                return this._updatePatternAtlas(), this.patterns[y].position;
              }
              bind(y) {
                const b = y.gl;
                this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new O(y, this.atlasImage, b.RGBA), this.atlasTexture.bind(b.LINEAR, b.CLAMP_TO_EDGE);
              }
              _updatePatternAtlas() {
                const y = [];
                for (const G in this.patterns) y.push(this.patterns[G].bin);
                const { w: b, h: R } = i.p(y), j = this.atlasImage;
                j.resize({ width: b || 1, height: R || 1 });
                for (const G in this.patterns) {
                  const { bin: ie } = this.patterns[G], fe = ie.x + 1, xe = ie.y + 1, Te = this.getImage(G).data, ze = Te.width, Ve = Te.height;
                  i.R.copy(Te, j, { x: 0, y: 0 }, { x: fe, y: xe }, { width: ze, height: Ve }), i.R.copy(Te, j, { x: 0, y: Ve - 1 }, { x: fe, y: xe - 1 }, { width: ze, height: 1 }), i.R.copy(Te, j, { x: 0, y: 0 }, { x: fe, y: xe + Ve }, { width: ze, height: 1 }), i.R.copy(Te, j, { x: ze - 1, y: 0 }, { x: fe - 1, y: xe }, { width: 1, height: Ve }), i.R.copy(Te, j, { x: 0, y: 0 }, { x: fe + ze, y: xe }, { width: 1, height: Ve });
                }
                this.dirty = !0;
              }
              beginFrame() {
                this.callbackDispatchedThisFrame = {};
              }
              dispatchRenderCallbacks(y) {
                for (const b of y) {
                  if (this.callbackDispatchedThisFrame[b]) continue;
                  this.callbackDispatchedThisFrame[b] = !0;
                  const R = this.getImage(b);
                  R || i.w(`Image with ID: "${b}" was not found`), T(R) && this.updateImage(b, R);
                }
              }
            }
            const F = 1e20;
            function U(B, y, b, R, j, G, ie, fe, xe) {
              for (let Te = y; Te < y + R; Te++) V(B, b * G + Te, G, j, ie, fe, xe);
              for (let Te = b; Te < b + j; Te++) V(B, Te * G + y, 1, R, ie, fe, xe);
            }
            function V(B, y, b, R, j, G, ie) {
              G[0] = 0, ie[0] = -F, ie[1] = F, j[0] = B[y];
              for (let fe = 1, xe = 0, Te = 0; fe < R; fe++) {
                j[fe] = B[y + fe * b];
                const ze = fe * fe;
                do {
                  const Ve = G[xe];
                  Te = (j[fe] - j[Ve] + ze - Ve * Ve) / (fe - Ve) / 2;
                } while (Te <= ie[xe] && --xe > -1);
                xe++, G[xe] = fe, ie[xe] = Te, ie[xe + 1] = F;
              }
              for (let fe = 0, xe = 0; fe < R; fe++) {
                for (; ie[xe + 1] < fe; ) xe++;
                const Te = G[xe], ze = fe - Te;
                B[y + fe * b] = j[Te] + ze * ze;
              }
            }
            class $ {
              constructor(y, b) {
                this.requestManager = y, this.localIdeographFontFamily = b, this.entries = {};
              }
              setURL(y) {
                this.url = y;
              }
              getGlyphs(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = [];
                  for (const G in y) for (const ie of y[G]) b.push(this._getAndCacheGlyphsPromise(G, ie));
                  const R = yield Promise.all(b), j = {};
                  for (const { stack: G, id: ie, glyph: fe } of R) j[G] || (j[G] = {}), j[G][ie] = fe && { id: fe.id, bitmap: fe.bitmap.clone(), metrics: fe.metrics };
                  return j;
                });
              }
              _getAndCacheGlyphsPromise(y, b) {
                return i._(this, void 0, void 0, function* () {
                  let R = this.entries[y];
                  R || (R = this.entries[y] = { glyphs: {}, requests: {}, ranges: {} });
                  let j = R.glyphs[b];
                  if (j !== void 0) return { stack: y, id: b, glyph: j };
                  if (j = this._tinySDF(R, y, b), j) return R.glyphs[b] = j, { stack: y, id: b, glyph: j };
                  const G = Math.floor(b / 256);
                  if (256 * G > 65535) throw new Error("glyphs > 65535 not supported");
                  if (R.ranges[G]) return { stack: y, id: b, glyph: j };
                  if (!this.url) throw new Error("glyphsUrl is not set");
                  if (!R.requests[G]) {
                    const fe = $.loadGlyphRange(y, G, this.url, this.requestManager);
                    R.requests[G] = fe;
                  }
                  const ie = yield R.requests[G];
                  for (const fe in ie) this._doesCharSupportLocalGlyph(+fe) || (R.glyphs[+fe] = ie[+fe]);
                  return R.ranges[G] = !0, { stack: y, id: b, glyph: ie[b] || null };
                });
              }
              _doesCharSupportLocalGlyph(y) {
                return !!this.localIdeographFontFamily && (i.u["CJK Unified Ideographs"](y) || i.u["Hangul Syllables"](y) || i.u.Hiragana(y) || i.u.Katakana(y));
              }
              _tinySDF(y, b, R) {
                const j = this.localIdeographFontFamily;
                if (!j || !this._doesCharSupportLocalGlyph(R)) return;
                let G = y.tinySDF;
                if (!G) {
                  let fe = "400";
                  /bold/i.test(b) ? fe = "900" : /medium/i.test(b) ? fe = "500" : /light/i.test(b) && (fe = "200"), G = y.tinySDF = new $.TinySDF({ fontSize: 48, buffer: 6, radius: 16, cutoff: 0.25, fontFamily: j, fontWeight: fe });
                }
                const ie = G.draw(String.fromCharCode(R));
                return { id: R, bitmap: new i.o({ width: ie.width || 60, height: ie.height || 60 }, ie.data), metrics: { width: ie.glyphWidth / 2 || 24, height: ie.glyphHeight / 2 || 24, left: ie.glyphLeft / 2 + 0.5 || 0, top: ie.glyphTop / 2 - 27.5 || -8, advance: ie.glyphAdvance / 2 || 24, isDoubleResolution: !0 } };
              }
            }
            $.loadGlyphRange = function(B, y, b, R) {
              return i._(this, void 0, void 0, function* () {
                const j = 256 * y, G = j + 255, ie = R.transformRequest(b.replace("{fontstack}", B).replace("{range}", `${j}-${G}`), "Glyphs"), fe = yield i.l(ie, new AbortController());
                if (!fe || !fe.data) throw new Error(`Could not load glyph range. range: ${y}, ${j}-${G}`);
                const xe = {};
                for (const Te of i.n(fe.data)) xe[Te.id] = Te;
                return xe;
              });
            }, $.TinySDF = class {
              constructor({ fontSize: B = 24, buffer: y = 3, radius: b = 8, cutoff: R = 0.25, fontFamily: j = "sans-serif", fontWeight: G = "normal", fontStyle: ie = "normal" } = {}) {
                this.buffer = y, this.cutoff = R, this.radius = b;
                const fe = this.size = B + 4 * y, xe = this._createCanvas(fe), Te = this.ctx = xe.getContext("2d", { willReadFrequently: !0 });
                Te.font = `${ie} ${G} ${B}px ${j}`, Te.textBaseline = "alphabetic", Te.textAlign = "left", Te.fillStyle = "black", this.gridOuter = new Float64Array(fe * fe), this.gridInner = new Float64Array(fe * fe), this.f = new Float64Array(fe), this.z = new Float64Array(fe + 1), this.v = new Uint16Array(fe);
              }
              _createCanvas(B) {
                const y = document.createElement("canvas");
                return y.width = y.height = B, y;
              }
              draw(B) {
                const { width: y, actualBoundingBoxAscent: b, actualBoundingBoxDescent: R, actualBoundingBoxLeft: j, actualBoundingBoxRight: G } = this.ctx.measureText(B), ie = Math.ceil(b), fe = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(G - j))), xe = Math.min(this.size - this.buffer, ie + Math.ceil(R)), Te = fe + 2 * this.buffer, ze = xe + 2 * this.buffer, Ve = Math.max(Te * ze, 0), ut = new Uint8ClampedArray(Ve), gt = { data: ut, width: Te, height: ze, glyphWidth: fe, glyphHeight: xe, glyphTop: ie, glyphLeft: 0, glyphAdvance: y };
                if (fe === 0 || xe === 0) return gt;
                const { ctx: wt, buffer: Et, gridInner: zt, gridOuter: It } = this;
                wt.clearRect(Et, Et, fe, xe), wt.fillText(B, Et, Et + ie);
                const jt = wt.getImageData(Et, Et, fe, xe);
                It.fill(F, 0, Ve), zt.fill(0, 0, Ve);
                for (let Lt = 0; Lt < xe; Lt++) for (let Zt = 0; Zt < fe; Zt++) {
                  const Qt = jt.data[4 * (Lt * fe + Zt) + 3] / 255;
                  if (Qt === 0) continue;
                  const Xt = (Lt + Et) * Te + Zt + Et;
                  if (Qt === 1) It[Xt] = 0, zt[Xt] = F;
                  else {
                    const yn = 0.5 - Qt;
                    It[Xt] = yn > 0 ? yn * yn : 0, zt[Xt] = yn < 0 ? yn * yn : 0;
                  }
                }
                U(It, 0, 0, Te, ze, Te, this.f, this.v, this.z), U(zt, Et, Et, fe, xe, Te, this.f, this.v, this.z);
                for (let Lt = 0; Lt < Ve; Lt++) {
                  const Zt = Math.sqrt(It[Lt]) - Math.sqrt(zt[Lt]);
                  ut[Lt] = Math.round(255 - 255 * (Zt / this.radius + this.cutoff));
                }
                return gt;
              }
            };
            class q {
              constructor() {
                this.specification = i.v.light.position;
              }
              possiblyEvaluate(y, b) {
                return i.y(y.expression.evaluate(b));
              }
              interpolate(y, b, R) {
                return { x: i.z.number(y.x, b.x, R), y: i.z.number(y.y, b.y, R), z: i.z.number(y.z, b.z, R) };
              }
            }
            const K = "-transition";
            let re;
            class Y extends i.E {
              constructor(y) {
                super(), re = re || new i.q({ anchor: new i.D(i.v.light.anchor), position: new q(), color: new i.D(i.v.light.color), intensity: new i.D(i.v.light.intensity) }), this._transitionable = new i.T(re), this.setLight(y), this._transitioning = this._transitionable.untransitioned();
              }
              getLight() {
                return this._transitionable.serialize();
              }
              setLight(y, b = {}) {
                if (!this._validate(i.r, y, b)) for (const R in y) {
                  const j = y[R];
                  R.endsWith(K) ? this._transitionable.setTransition(R.slice(0, -11), j) : this._transitionable.setValue(R, j);
                }
              }
              updateTransitions(y) {
                this._transitioning = this._transitionable.transitioned(y, this._transitioning);
              }
              hasTransition() {
                return this._transitioning.hasTransition();
              }
              recalculate(y) {
                this.properties = this._transitioning.possiblyEvaluate(y);
              }
              _validate(y, b, R) {
                return (!R || R.validate !== !1) && i.t(this, y.call(i.x, { value: b, style: { glyphs: !0, sprite: !0 }, styleSpec: i.v }));
              }
            }
            const te = new i.q({ "sky-color": new i.D(i.v.sky["sky-color"]), "horizon-color": new i.D(i.v.sky["horizon-color"]), "fog-color": new i.D(i.v.sky["fog-color"]), "fog-ground-blend": new i.D(i.v.sky["fog-ground-blend"]), "horizon-fog-blend": new i.D(i.v.sky["horizon-fog-blend"]), "sky-horizon-blend": new i.D(i.v.sky["sky-horizon-blend"]), "atmosphere-blend": new i.D(i.v.sky["atmosphere-blend"]) }), ee = "-transition";
            class X extends i.E {
              constructor(y) {
                super(), this._transitionable = new i.T(te), this.setSky(y), this._transitioning = this._transitionable.untransitioned();
              }
              setSky(y, b = {}) {
                if (!this._validate(i.B, y, b)) for (const R in y) {
                  const j = y[R];
                  R.endsWith(ee) ? this._transitionable.setTransition(R.slice(0, -11), j) : this._transitionable.setValue(R, j);
                }
              }
              getSky() {
                return this._transitionable.serialize();
              }
              updateTransitions(y) {
                this._transitioning = this._transitionable.transitioned(y, this._transitioning);
              }
              hasTransition() {
                return this._transitioning.hasTransition();
              }
              recalculate(y) {
                this.properties = this._transitioning.possiblyEvaluate(y);
              }
              _validate(y, b, R = {}) {
                return (R == null ? void 0 : R.validate) !== !1 && i.t(this, y.call(i.x, i.e({ value: b, style: { glyphs: !0, sprite: !0 }, styleSpec: i.v })));
              }
              calculateFogBlendOpacity(y) {
                return y < 60 ? 0 : y < 70 ? (y - 60) / 10 : 1;
              }
            }
            class Q {
              constructor(y, b) {
                this.width = y, this.height = b, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {};
              }
              getDash(y, b) {
                const R = y.join(",") + String(b);
                return this.dashEntry[R] || (this.dashEntry[R] = this.addDash(y, b)), this.dashEntry[R];
              }
              getDashRanges(y, b, R) {
                const j = [];
                let G = y.length % 2 == 1 ? -y[y.length - 1] * R : 0, ie = y[0] * R, fe = !0;
                j.push({ left: G, right: ie, isDash: fe, zeroLength: y[0] === 0 });
                let xe = y[0];
                for (let Te = 1; Te < y.length; Te++) {
                  fe = !fe;
                  const ze = y[Te];
                  G = xe * R, xe += ze, ie = xe * R, j.push({ left: G, right: ie, isDash: fe, zeroLength: ze === 0 });
                }
                return j;
              }
              addRoundDash(y, b, R) {
                const j = b / 2;
                for (let G = -R; G <= R; G++) {
                  const ie = this.nextRow + R + G, fe = this.width * ie;
                  let xe = 0, Te = y[xe];
                  for (let ze = 0; ze < this.width; ze++) {
                    ze / Te.right > 1 && (Te = y[++xe]);
                    const Ve = Math.abs(ze - Te.left), ut = Math.abs(ze - Te.right), gt = Math.min(Ve, ut);
                    let wt;
                    const Et = G / R * (j + 1);
                    if (Te.isDash) {
                      const zt = j - Math.abs(Et);
                      wt = Math.sqrt(gt * gt + zt * zt);
                    } else wt = j - Math.sqrt(gt * gt + Et * Et);
                    this.data[fe + ze] = Math.max(0, Math.min(255, wt + 128));
                  }
                }
              }
              addRegularDash(y) {
                for (let fe = y.length - 1; fe >= 0; --fe) {
                  const xe = y[fe], Te = y[fe + 1];
                  xe.zeroLength ? y.splice(fe, 1) : Te && Te.isDash === xe.isDash && (Te.left = xe.left, y.splice(fe, 1));
                }
                const b = y[0], R = y[y.length - 1];
                b.isDash === R.isDash && (b.left = R.left - this.width, R.right = b.right + this.width);
                const j = this.width * this.nextRow;
                let G = 0, ie = y[G];
                for (let fe = 0; fe < this.width; fe++) {
                  fe / ie.right > 1 && (ie = y[++G]);
                  const xe = Math.abs(fe - ie.left), Te = Math.abs(fe - ie.right), ze = Math.min(xe, Te), Ve = ie.isDash ? ze : -ze;
                  this.data[j + fe] = Math.max(0, Math.min(255, Ve + 128));
                }
              }
              addDash(y, b) {
                const R = b ? 7 : 0, j = 2 * R + 1;
                if (this.nextRow + j > this.height) return i.w("LineAtlas out of space"), null;
                let G = 0;
                for (let fe = 0; fe < y.length; fe++) G += y[fe];
                if (G !== 0) {
                  const fe = this.width / G, xe = this.getDashRanges(y, this.width, fe);
                  b ? this.addRoundDash(xe, fe, R) : this.addRegularDash(xe);
                }
                const ie = { y: (this.nextRow + R + 0.5) / this.height, height: 2 * R / this.height, width: G };
                return this.nextRow += j, this.dirty = !0, ie;
              }
              bind(y) {
                const b = y.gl;
                this.texture ? (b.bindTexture(b.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, b.texSubImage2D(b.TEXTURE_2D, 0, 0, 0, this.width, this.height, b.ALPHA, b.UNSIGNED_BYTE, this.data))) : (this.texture = b.createTexture(), b.bindTexture(b.TEXTURE_2D, this.texture), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.REPEAT), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.REPEAT), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.LINEAR), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.LINEAR), b.texImage2D(b.TEXTURE_2D, 0, b.ALPHA, this.width, this.height, 0, b.ALPHA, b.UNSIGNED_BYTE, this.data));
              }
            }
            const ue = "maplibre_preloaded_worker_pool";
            class ce {
              constructor() {
                this.active = {};
              }
              acquire(y) {
                if (!this.workers) for (this.workers = []; this.workers.length < ce.workerCount; ) this.workers.push(new Worker(i.a.WORKER_URL));
                return this.active[y] = !0, this.workers.slice();
              }
              release(y) {
                delete this.active[y], this.numActive() === 0 && (this.workers.forEach((b) => {
                  b.terminate();
                }), this.workers = null);
              }
              isPreloaded() {
                return !!this.active[ue];
              }
              numActive() {
                return Object.keys(this.active).length;
              }
            }
            const he = Math.floor(d.hardwareConcurrency / 2);
            let de, ne;
            function ae() {
              return de || (de = new ce()), de;
            }
            ce.workerCount = i.C(globalThis) ? Math.max(Math.min(he, 3), 1) : 1;
            class se {
              constructor(y, b) {
                this.workerPool = y, this.actors = [], this.currentActor = 0, this.id = b;
                const R = this.workerPool.acquire(b);
                for (let j = 0; j < R.length; j++) {
                  const G = R[j], ie = new i.F(G, b);
                  ie.name = `Worker ${j}`, this.actors.push(ie);
                }
                if (!this.actors.length) throw new Error("No actors found");
              }
              broadcast(y, b) {
                const R = [];
                for (const j of this.actors) R.push(j.sendAsync({ type: y, data: b }));
                return Promise.all(R);
              }
              getActor() {
                return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor];
              }
              remove(y = !0) {
                this.actors.forEach((b) => {
                  b.remove();
                }), this.actors = [], y && this.workerPool.release(this.id);
              }
              registerMessageHandler(y, b) {
                for (const R of this.actors) R.registerMessageHandler(y, b);
              }
            }
            function me() {
              return ne || (ne = new se(ae(), i.G), ne.registerMessageHandler("GR", (B, y, b) => i.m(y, b))), ne;
            }
            function ye(B, y) {
              const b = i.H();
              return i.J(b, b, [1, 1, 0]), i.K(b, b, [0.5 * B.width, 0.5 * B.height, 1]), i.L(b, b, B.calculatePosMatrix(y.toUnwrapped()));
            }
            function pe(B, y, b, R, j, G) {
              const ie = function(Ve, ut, gt) {
                if (Ve) for (const wt of Ve) {
                  const Et = ut[wt];
                  if (Et && Et.source === gt && Et.type === "fill-extrusion") return !0;
                }
                else for (const wt in ut) {
                  const Et = ut[wt];
                  if (Et.source === gt && Et.type === "fill-extrusion") return !0;
                }
                return !1;
              }(j && j.layers, y, B.id), fe = G.maxPitchScaleFactor(), xe = B.tilesIn(R, fe, ie);
              xe.sort(be);
              const Te = [];
              for (const Ve of xe) Te.push({ wrappedTileID: Ve.tileID.wrapped().key, queryResults: Ve.tile.queryRenderedFeatures(y, b, B._state, Ve.queryGeometry, Ve.cameraQueryGeometry, Ve.scale, j, G, fe, ye(B.transform, Ve.tileID)) });
              const ze = function(Ve) {
                const ut = {}, gt = {};
                for (const wt of Ve) {
                  const Et = wt.queryResults, zt = wt.wrappedTileID, It = gt[zt] = gt[zt] || {};
                  for (const jt in Et) {
                    const Lt = Et[jt], Zt = It[jt] = It[jt] || {}, Qt = ut[jt] = ut[jt] || [];
                    for (const Xt of Lt) Zt[Xt.featureIndex] || (Zt[Xt.featureIndex] = !0, Qt.push(Xt));
                  }
                }
                return ut;
              }(Te);
              for (const Ve in ze) ze[Ve].forEach((ut) => {
                const gt = ut.feature, wt = B.getFeatureState(gt.layer["source-layer"], gt.id);
                gt.source = gt.layer.source, gt.layer["source-layer"] && (gt.sourceLayer = gt.layer["source-layer"]), gt.state = wt;
              });
              return ze;
            }
            function be(B, y) {
              const b = B.tileID, R = y.tileID;
              return b.overscaledZ - R.overscaledZ || b.canonical.y - R.canonical.y || b.wrap - R.wrap || b.canonical.x - R.canonical.x;
            }
            function Ae(B, y, b) {
              return i._(this, void 0, void 0, function* () {
                let R = B;
                if (B.url ? R = (yield i.h(y.transformRequest(B.url, "Source"), b)).data : yield d.frameAsync(b), !R) return null;
                const j = i.M(i.e(R, B), ["tiles", "minzoom", "maxzoom", "attribution", "bounds", "scheme", "tileSize", "encoding"]);
                return "vector_layers" in R && R.vector_layers && (j.vectorLayerIds = R.vector_layers.map((G) => G.id)), j;
              });
            }
            class Se {
              constructor(y, b) {
                y && (b ? this.setSouthWest(y).setNorthEast(b) : Array.isArray(y) && (y.length === 4 ? this.setSouthWest([y[0], y[1]]).setNorthEast([y[2], y[3]]) : this.setSouthWest(y[0]).setNorthEast(y[1])));
              }
              setNorthEast(y) {
                return this._ne = y instanceof i.N ? new i.N(y.lng, y.lat) : i.N.convert(y), this;
              }
              setSouthWest(y) {
                return this._sw = y instanceof i.N ? new i.N(y.lng, y.lat) : i.N.convert(y), this;
              }
              extend(y) {
                const b = this._sw, R = this._ne;
                let j, G;
                if (y instanceof i.N) j = y, G = y;
                else {
                  if (!(y instanceof Se)) {
                    if (Array.isArray(y)) {
                      if (y.length === 4 || y.every(Array.isArray)) {
                        const ie = y;
                        return this.extend(Se.convert(ie));
                      }
                      {
                        const ie = y;
                        return this.extend(i.N.convert(ie));
                      }
                    }
                    return y && ("lng" in y || "lon" in y) && "lat" in y ? this.extend(i.N.convert(y)) : this;
                  }
                  if (j = y._sw, G = y._ne, !j || !G) return this;
                }
                return b || R ? (b.lng = Math.min(j.lng, b.lng), b.lat = Math.min(j.lat, b.lat), R.lng = Math.max(G.lng, R.lng), R.lat = Math.max(G.lat, R.lat)) : (this._sw = new i.N(j.lng, j.lat), this._ne = new i.N(G.lng, G.lat)), this;
              }
              getCenter() {
                return new i.N((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);
              }
              getSouthWest() {
                return this._sw;
              }
              getNorthEast() {
                return this._ne;
              }
              getNorthWest() {
                return new i.N(this.getWest(), this.getNorth());
              }
              getSouthEast() {
                return new i.N(this.getEast(), this.getSouth());
              }
              getWest() {
                return this._sw.lng;
              }
              getSouth() {
                return this._sw.lat;
              }
              getEast() {
                return this._ne.lng;
              }
              getNorth() {
                return this._ne.lat;
              }
              toArray() {
                return [this._sw.toArray(), this._ne.toArray()];
              }
              toString() {
                return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`;
              }
              isEmpty() {
                return !(this._sw && this._ne);
              }
              contains(y) {
                const { lng: b, lat: R } = i.N.convert(y), j = this._sw.lat <= R && R <= this._ne.lat;
                let G = this._sw.lng <= b && b <= this._ne.lng;
                return this._sw.lng > this._ne.lng && (G = this._sw.lng >= b && b >= this._ne.lng), j && G;
              }
              static convert(y) {
                return y instanceof Se ? y : y && new Se(y);
              }
              static fromLngLat(y, b = 0) {
                const R = 360 * b / 40075017, j = R / Math.cos(Math.PI / 180 * y.lat);
                return new Se(new i.N(y.lng - j, y.lat - R), new i.N(y.lng + j, y.lat + R));
              }
            }
            class Me {
              constructor(y, b, R) {
                this.bounds = Se.convert(this.validateBounds(y)), this.minzoom = b || 0, this.maxzoom = R || 24;
              }
              validateBounds(y) {
                return Array.isArray(y) && y.length === 4 ? [Math.max(-180, y[0]), Math.max(-90, y[1]), Math.min(180, y[2]), Math.min(90, y[3])] : [-180, -90, 180, 90];
              }
              contains(y) {
                const b = Math.pow(2, y.z), R = Math.floor(i.O(this.bounds.getWest()) * b), j = Math.floor(i.Q(this.bounds.getNorth()) * b), G = Math.ceil(i.O(this.bounds.getEast()) * b), ie = Math.ceil(i.Q(this.bounds.getSouth()) * b);
                return y.x >= R && y.x < G && y.y >= j && y.y < ie;
              }
            }
            class De extends i.E {
              constructor(y, b, R, j) {
                if (super(), this.id = y, this.dispatcher = R, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, i.e(this, i.M(b, ["url", "scheme", "tileSize", "promoteId"])), this._options = i.e({ type: "vector" }, b), this._collectResourceTiming = b.collectResourceTiming, this.tileSize !== 512) throw new Error("vector tile sources must have a tileSize of 512");
                this.setEventedParent(j);
              }
              load() {
                return i._(this, void 0, void 0, function* () {
                  this._loaded = !1, this.fire(new i.k("dataloading", { dataType: "source" })), this._tileJSONRequest = new AbortController();
                  try {
                    const y = yield Ae(this._options, this.map._requestManager, this._tileJSONRequest);
                    this._tileJSONRequest = null, this._loaded = !0, this.map.style.sourceCaches[this.id].clearTiles(), y && (i.e(this, y), y.bounds && (this.tileBounds = new Me(y.bounds, this.minzoom, this.maxzoom)), this.fire(new i.k("data", { dataType: "source", sourceDataType: "metadata" })), this.fire(new i.k("data", { dataType: "source", sourceDataType: "content" })));
                  } catch (y) {
                    this._tileJSONRequest = null, this.fire(new i.j(y));
                  }
                });
              }
              loaded() {
                return this._loaded;
              }
              hasTile(y) {
                return !this.tileBounds || this.tileBounds.contains(y.canonical);
              }
              onAdd(y) {
                this.map = y, this.load();
              }
              setSourceProperty(y) {
                this._tileJSONRequest && this._tileJSONRequest.abort(), y(), this.load();
              }
              setTiles(y) {
                return this.setSourceProperty(() => {
                  this._options.tiles = y;
                }), this;
              }
              setUrl(y) {
                return this.setSourceProperty(() => {
                  this.url = y, this._options.url = y;
                }), this;
              }
              onRemove() {
                this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);
              }
              serialize() {
                return i.e({}, this._options);
              }
              loadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = y.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), R = { request: this.map._requestManager.transformRequest(b, "Tile"), uid: y.uid, tileID: y.tileID, zoom: y.tileID.overscaledZ, tileSize: this.tileSize * y.tileID.overscaleFactor(), type: this.type, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
                  R.request.collectResourceTiming = this._collectResourceTiming;
                  let j = "RT";
                  if (y.actor && y.state !== "expired") {
                    if (y.state === "loading") return new Promise((G, ie) => {
                      y.reloadPromise = { resolve: G, reject: ie };
                    });
                  } else y.actor = this.dispatcher.getActor(), j = "LT";
                  y.abortController = new AbortController();
                  try {
                    const G = yield y.actor.sendAsync({ type: j, data: R }, y.abortController);
                    if (delete y.abortController, y.aborted) return;
                    this._afterTileLoadWorkerResponse(y, G);
                  } catch (G) {
                    if (delete y.abortController, y.aborted) return;
                    if (G && G.status !== 404) throw G;
                    this._afterTileLoadWorkerResponse(y, null);
                  }
                });
              }
              _afterTileLoadWorkerResponse(y, b) {
                if (b && b.resourceTiming && (y.resourceTiming = b.resourceTiming), b && this.map._refreshExpiredTiles && y.setExpiryData(b), y.loadVectorData(b, this.map.painter), y.reloadPromise) {
                  const R = y.reloadPromise;
                  y.reloadPromise = null, this.loadTile(y).then(R.resolve).catch(R.reject);
                }
              }
              abortTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.abortController && (y.abortController.abort(), delete y.abortController), y.actor && (yield y.actor.sendAsync({ type: "AT", data: { uid: y.uid, type: this.type, source: this.id } }));
                });
              }
              unloadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.unloadVectorData(), y.actor && (yield y.actor.sendAsync({ type: "RMT", data: { uid: y.uid, type: this.type, source: this.id } }));
                });
              }
              hasTransition() {
                return !1;
              }
            }
            class Le extends i.E {
              constructor(y, b, R, j) {
                super(), this.id = y, this.dispatcher = R, this.setEventedParent(j), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = i.e({ type: "raster" }, b), i.e(this, i.M(b, ["url", "scheme", "tileSize"]));
              }
              load() {
                return i._(this, void 0, void 0, function* () {
                  this._loaded = !1, this.fire(new i.k("dataloading", { dataType: "source" })), this._tileJSONRequest = new AbortController();
                  try {
                    const y = yield Ae(this._options, this.map._requestManager, this._tileJSONRequest);
                    this._tileJSONRequest = null, this._loaded = !0, y && (i.e(this, y), y.bounds && (this.tileBounds = new Me(y.bounds, this.minzoom, this.maxzoom)), this.fire(new i.k("data", { dataType: "source", sourceDataType: "metadata" })), this.fire(new i.k("data", { dataType: "source", sourceDataType: "content" })));
                  } catch (y) {
                    this._tileJSONRequest = null, this.fire(new i.j(y));
                  }
                });
              }
              loaded() {
                return this._loaded;
              }
              onAdd(y) {
                this.map = y, this.load();
              }
              onRemove() {
                this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);
              }
              setSourceProperty(y) {
                this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null), y(), this.load();
              }
              setTiles(y) {
                return this.setSourceProperty(() => {
                  this._options.tiles = y;
                }), this;
              }
              setUrl(y) {
                return this.setSourceProperty(() => {
                  this.url = y, this._options.url = y;
                }), this;
              }
              serialize() {
                return i.e({}, this._options);
              }
              hasTile(y) {
                return !this.tileBounds || this.tileBounds.contains(y.canonical);
              }
              loadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = y.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
                  y.abortController = new AbortController();
                  try {
                    const R = yield S.getImage(this.map._requestManager.transformRequest(b, "Tile"), y.abortController, this.map._refreshExpiredTiles);
                    if (delete y.abortController, y.aborted) return void (y.state = "unloaded");
                    if (R && R.data) {
                      this.map._refreshExpiredTiles && R.cacheControl && R.expires && y.setExpiryData({ cacheControl: R.cacheControl, expires: R.expires });
                      const j = this.map.painter.context, G = j.gl, ie = R.data;
                      y.texture = this.map.painter.getTileTexture(ie.width), y.texture ? y.texture.update(ie, { useMipmap: !0 }) : (y.texture = new O(j, ie, G.RGBA, { useMipmap: !0 }), y.texture.bind(G.LINEAR, G.CLAMP_TO_EDGE, G.LINEAR_MIPMAP_NEAREST)), y.state = "loaded";
                    }
                  } catch (R) {
                    if (delete y.abortController, y.aborted) y.state = "unloaded";
                    else if (R) throw y.state = "errored", R;
                  }
                });
              }
              abortTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.abortController && (y.abortController.abort(), delete y.abortController);
                });
              }
              unloadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.texture && this.map.painter.saveTileTexture(y.texture);
                });
              }
              hasTransition() {
                return !1;
              }
            }
            class We extends Le {
              constructor(y, b, R, j) {
                super(y, b, R, j), this.type = "raster-dem", this.maxzoom = 22, this._options = i.e({ type: "raster-dem" }, b), this.encoding = b.encoding || "mapbox", this.redFactor = b.redFactor, this.greenFactor = b.greenFactor, this.blueFactor = b.blueFactor, this.baseShift = b.baseShift;
              }
              loadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = y.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), R = this.map._requestManager.transformRequest(b, "Tile");
                  y.neighboringTiles = this._getNeighboringTiles(y.tileID), y.abortController = new AbortController();
                  try {
                    const j = yield S.getImage(R, y.abortController, this.map._refreshExpiredTiles);
                    if (delete y.abortController, y.aborted) return void (y.state = "unloaded");
                    if (j && j.data) {
                      const G = j.data;
                      this.map._refreshExpiredTiles && j.cacheControl && j.expires && y.setExpiryData({ cacheControl: j.cacheControl, expires: j.expires });
                      const ie = i.b(G) && i.U() ? G : yield this.readImageNow(G), fe = { type: this.type, uid: y.uid, source: this.id, rawImageData: ie, encoding: this.encoding, redFactor: this.redFactor, greenFactor: this.greenFactor, blueFactor: this.blueFactor, baseShift: this.baseShift };
                      if (!y.actor || y.state === "expired") {
                        y.actor = this.dispatcher.getActor();
                        const xe = yield y.actor.sendAsync({ type: "LDT", data: fe });
                        y.dem = xe, y.needsHillshadePrepare = !0, y.needsTerrainPrepare = !0, y.state = "loaded";
                      }
                    }
                  } catch (j) {
                    if (delete y.abortController, y.aborted) y.state = "unloaded";
                    else if (j) throw y.state = "errored", j;
                  }
                });
              }
              readImageNow(y) {
                return i._(this, void 0, void 0, function* () {
                  if (typeof VideoFrame < "u" && i.V()) {
                    const b = y.width + 2, R = y.height + 2;
                    try {
                      return new i.R({ width: b, height: R }, yield i.W(y, -1, -1, b, R));
                    } catch {
                    }
                  }
                  return d.getImageData(y, 1);
                });
              }
              _getNeighboringTiles(y) {
                const b = y.canonical, R = Math.pow(2, b.z), j = (b.x - 1 + R) % R, G = b.x === 0 ? y.wrap - 1 : y.wrap, ie = (b.x + 1 + R) % R, fe = b.x + 1 === R ? y.wrap + 1 : y.wrap, xe = {};
                return xe[new i.S(y.overscaledZ, G, b.z, j, b.y).key] = { backfilled: !1 }, xe[new i.S(y.overscaledZ, fe, b.z, ie, b.y).key] = { backfilled: !1 }, b.y > 0 && (xe[new i.S(y.overscaledZ, G, b.z, j, b.y - 1).key] = { backfilled: !1 }, xe[new i.S(y.overscaledZ, y.wrap, b.z, b.x, b.y - 1).key] = { backfilled: !1 }, xe[new i.S(y.overscaledZ, fe, b.z, ie, b.y - 1).key] = { backfilled: !1 }), b.y + 1 < R && (xe[new i.S(y.overscaledZ, G, b.z, j, b.y + 1).key] = { backfilled: !1 }, xe[new i.S(y.overscaledZ, y.wrap, b.z, b.x, b.y + 1).key] = { backfilled: !1 }, xe[new i.S(y.overscaledZ, fe, b.z, ie, b.y + 1).key] = { backfilled: !1 }), xe;
              }
              unloadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.demTexture && this.map.painter.saveTileTexture(y.demTexture), y.fbo && (y.fbo.destroy(), delete y.fbo), y.dem && delete y.dem, delete y.neighboringTiles, y.state = "unloaded", y.actor && (yield y.actor.sendAsync({ type: "RDT", data: { type: this.type, uid: y.uid, source: this.id } }));
                });
              }
            }
            class Ee extends i.E {
              constructor(y, b, R, j) {
                super(), this.id = y, 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 = R.getActor(), this.setEventedParent(j), this._data = b.data, this._options = i.e({}, b), this._collectResourceTiming = b.collectResourceTiming, b.maxzoom !== void 0 && (this.maxzoom = b.maxzoom), b.type && (this.type = b.type), b.attribution && (this.attribution = b.attribution), this.promoteId = b.promoteId;
                const G = i.X / this.tileSize;
                this.workerOptions = i.e({ source: this.id, cluster: b.cluster || !1, geojsonVtOptions: { buffer: (b.buffer !== void 0 ? b.buffer : 128) * G, tolerance: (b.tolerance !== void 0 ? b.tolerance : 0.375) * G, extent: i.X, maxZoom: this.maxzoom, lineMetrics: b.lineMetrics || !1, generateId: b.generateId || !1 }, superclusterOptions: { maxZoom: b.clusterMaxZoom !== void 0 ? b.clusterMaxZoom : this.maxzoom - 1, minPoints: Math.max(2, b.clusterMinPoints || 2), extent: i.X, radius: (b.clusterRadius || 50) * G, log: !1, generateId: b.generateId || !1 }, clusterProperties: b.clusterProperties, filter: b.filter }, b.workerOptions), typeof this.promoteId == "string" && (this.workerOptions.promoteId = this.promoteId);
              }
              load() {
                return i._(this, void 0, void 0, function* () {
                  yield this._updateWorkerData();
                });
              }
              onAdd(y) {
                this.map = y, this.load();
              }
              setData(y) {
                return this._data = y, this._updateWorkerData(), this;
              }
              updateData(y) {
                return this._updateWorkerData(y), this;
              }
              getData() {
                return i._(this, void 0, void 0, function* () {
                  const y = i.e({ type: this.type }, this.workerOptions);
                  return this.actor.sendAsync({ type: "GD", data: y });
                });
              }
              setClusterOptions(y) {
                return this.workerOptions.cluster = y.cluster, y && (y.clusterRadius !== void 0 && (this.workerOptions.superclusterOptions.radius = y.clusterRadius), y.clusterMaxZoom !== void 0 && (this.workerOptions.superclusterOptions.maxZoom = y.clusterMaxZoom)), this._updateWorkerData(), this;
              }
              getClusterExpansionZoom(y) {
                return this.actor.sendAsync({ type: "GCEZ", data: { type: this.type, clusterId: y, source: this.id } });
              }
              getClusterChildren(y) {
                return this.actor.sendAsync({ type: "GCC", data: { type: this.type, clusterId: y, source: this.id } });
              }
              getClusterLeaves(y, b, R) {
                return this.actor.sendAsync({ type: "GCL", data: { type: this.type, source: this.id, clusterId: y, limit: b, offset: R } });
              }
              _updateWorkerData(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = i.e({ type: this.type }, this.workerOptions);
                  y ? b.dataDiff = y : typeof this._data == "string" ? (b.request = this.map._requestManager.transformRequest(d.resolveURL(this._data), "Source"), b.request.collectResourceTiming = this._collectResourceTiming) : b.data = JSON.stringify(this._data), this._pendingLoads++, this.fire(new i.k("dataloading", { dataType: "source" }));
                  try {
                    const R = yield this.actor.sendAsync({ type: "LD", data: b });
                    if (this._pendingLoads--, this._removed || R.abandoned) return void this.fire(new i.k("dataabort", { dataType: "source" }));
                    let j = null;
                    R.resourceTiming && R.resourceTiming[this.id] && (j = R.resourceTiming[this.id].slice(0));
                    const G = { dataType: "source" };
                    this._collectResourceTiming && j && j.length > 0 && i.e(G, { resourceTiming: j }), this.fire(new i.k("data", Object.assign(Object.assign({}, G), { sourceDataType: "metadata" }))), this.fire(new i.k("data", Object.assign(Object.assign({}, G), { sourceDataType: "content" })));
                  } catch (R) {
                    if (this._pendingLoads--, this._removed) return void this.fire(new i.k("dataabort", { dataType: "source" }));
                    this.fire(new i.j(R));
                  }
                });
              }
              loaded() {
                return this._pendingLoads === 0;
              }
              loadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  const b = y.actor ? "RT" : "LT";
                  y.actor = this.actor;
                  const R = { type: this.type, uid: y.uid, tileID: y.tileID, zoom: y.tileID.overscaledZ, maxZoom: this.maxzoom, tileSize: this.tileSize, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
                  y.abortController = new AbortController();
                  const j = yield this.actor.sendAsync({ type: b, data: R }, y.abortController);
                  delete y.abortController, y.unloadVectorData(), y.aborted || y.loadVectorData(j, this.map.painter, b === "RT");
                });
              }
              abortTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.abortController && (y.abortController.abort(), delete y.abortController), y.aborted = !0;
                });
              }
              unloadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  y.unloadVectorData(), yield this.actor.sendAsync({ type: "RMT", data: { uid: y.uid, type: this.type, source: this.id } });
                });
              }
              onRemove() {
                this._removed = !0, this.actor.sendAsync({ type: "RS", data: { type: this.type, source: this.id } });
              }
              serialize() {
                return i.e({}, this._options, { type: this.type, data: this._data });
              }
              hasTransition() {
                return !1;
              }
            }
            var Ne = i.Y([{ name: "a_pos", type: "Int16", components: 2 }, { name: "a_texture_pos", type: "Int16", components: 2 }]);
            class Ie extends i.E {
              constructor(y, b, R, j) {
                super(), this.id = y, this.dispatcher = R, this.coordinates = b.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(j), this.options = b;
              }
              load(y) {
                return i._(this, void 0, void 0, function* () {
                  this._loaded = !1, this.fire(new i.k("dataloading", { dataType: "source" })), this.url = this.options.url, this._request = new AbortController();
                  try {
                    const b = yield S.getImage(this.map._requestManager.transformRequest(this.url, "Image"), this._request);
                    this._request = null, this._loaded = !0, b && b.data && (this.image = b.data, y && (this.coordinates = y), this._finishLoading());
                  } catch (b) {
                    this._request = null, this._loaded = !0, this.fire(new i.j(b));
                  }
                });
              }
              loaded() {
                return this._loaded;
              }
              updateImage(y) {
                return y.url ? (this._request && (this._request.abort(), this._request = null), this.options.url = y.url, this.load(y.coordinates).finally(() => {
                  this.texture = null;
                }), this) : this;
              }
              _finishLoading() {
                this.map && (this.setCoordinates(this.coordinates), this.fire(new i.k("data", { dataType: "source", sourceDataType: "metadata" })));
              }
              onAdd(y) {
                this.map = y, this.load();
              }
              onRemove() {
                this._request && (this._request.abort(), this._request = null);
              }
              setCoordinates(y) {
                this.coordinates = y;
                const b = y.map(i.Z.fromLngLat);
                this.tileID = function(j) {
                  let G = 1 / 0, ie = 1 / 0, fe = -1 / 0, xe = -1 / 0;
                  for (const wt of j) G = Math.min(G, wt.x), ie = Math.min(ie, wt.y), fe = Math.max(fe, wt.x), xe = Math.max(xe, wt.y);
                  const Te = fe - G, ze = xe - ie, Ve = Math.max(Te, ze), ut = Math.max(0, Math.floor(-Math.log(Ve) / Math.LN2)), gt = Math.pow(2, ut);
                  return new i.a1(ut, Math.floor((G + fe) / 2 * gt), Math.floor((ie + xe) / 2 * gt));
                }(b), this.minzoom = this.maxzoom = this.tileID.z;
                const R = b.map((j) => this.tileID.getTilePoint(j)._round());
                return this._boundsArray = new i.$(), this._boundsArray.emplaceBack(R[0].x, R[0].y, 0, 0), this._boundsArray.emplaceBack(R[1].x, R[1].y, i.X, 0), this._boundsArray.emplaceBack(R[3].x, R[3].y, 0, i.X), this._boundsArray.emplaceBack(R[2].x, R[2].y, i.X, i.X), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new i.k("data", { dataType: "source", sourceDataType: "content" })), this;
              }
              prepare() {
                if (Object.keys(this.tiles).length === 0 || !this.image) return;
                const y = this.map.painter.context, b = y.gl;
                this.boundsBuffer || (this.boundsBuffer = y.createVertexBuffer(this._boundsArray, Ne.members)), this.boundsSegments || (this.boundsSegments = i.a0.simpleSegment(0, 0, 4, 2)), this.texture || (this.texture = new O(y, this.image, b.RGBA), this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE));
                let R = !1;
                for (const j in this.tiles) {
                  const G = this.tiles[j];
                  G.state !== "loaded" && (G.state = "loaded", G.texture = this.texture, R = !0);
                }
                R && this.fire(new i.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
              }
              loadTile(y) {
                return i._(this, void 0, void 0, function* () {
                  this.tileID && this.tileID.equals(y.tileID.canonical) ? (this.tiles[String(y.tileID.wrap)] = y, y.buckets = {}) : y.state = "errored";
                });
              }
              serialize() {
                return { type: "image", url: this.options.url, coordinates: this.coordinates };
              }
              hasTransition() {
                return !1;
              }
            }
            class ge extends Ie {
              constructor(y, b, R, j) {
                super(y, b, R, j), this.roundZoom = !0, this.type = "video", this.options = b;
              }
              load() {
                return i._(this, void 0, void 0, function* () {
                  this._loaded = !1;
                  const y = this.options;
                  this.urls = [];
                  for (const b of y.urls) this.urls.push(this.map._requestManager.transformRequest(b, "Source").url);
                  try {
                    const b = yield i.a3(this.urls);
                    if (this._loaded = !0, !b) return;
                    this.video = b, this.video.loop = !0, this.video.addEventListener("playing", () => {
                      this.map.triggerRepaint();
                    }), this.map && this.video.play(), this._finishLoading();
                  } catch (b) {
                    this.fire(new i.j(b));
                  }
                });
              }
              pause() {
                this.video && this.video.pause();
              }
              play() {
                this.video && this.video.play();
              }
              seek(y) {
                if (this.video) {
                  const b = this.video.seekable;
                  y < b.start(0) || y > b.end(0) ? this.fire(new i.j(new i.a2(`sources.${this.id}`, null, `Playback for this video can be set only between the ${b.start(0)} and ${b.end(0)}-second mark.`))) : this.video.currentTime = y;
                }
              }
              getVideo() {
                return this.video;
              }
              onAdd(y) {
                this.map || (this.map = y, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates)));
              }
              prepare() {
                if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) return;
                const y = this.map.painter.context, b = y.gl;
                this.boundsBuffer || (this.boundsBuffer = y.createVertexBuffer(this._boundsArray, Ne.members)), this.boundsSegments || (this.boundsSegments = i.a0.simpleSegment(0, 0, 4, 2)), this.texture ? this.video.paused || (this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE), b.texSubImage2D(b.TEXTURE_2D, 0, 0, 0, b.RGBA, b.UNSIGNED_BYTE, this.video)) : (this.texture = new O(y, this.video, b.RGBA), this.texture.bind(b.LINEAR, b.CLAMP_TO_EDGE));
                let R = !1;
                for (const j in this.tiles) {
                  const G = this.tiles[j];
                  G.state !== "loaded" && (G.state = "loaded", G.texture = this.texture, R = !0);
                }
                R && this.fire(new i.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
              }
              serialize() {
                return { type: "video", urls: this.urls, coordinates: this.coordinates };
              }
              hasTransition() {
                return this.video && !this.video.paused;
              }
            }
            class Ce extends Ie {
              constructor(y, b, R, j) {
                super(y, b, R, j), b.coordinates ? Array.isArray(b.coordinates) && b.coordinates.length === 4 && !b.coordinates.some((G) => !Array.isArray(G) || G.length !== 2 || G.some((ie) => typeof ie != "number")) || this.fire(new i.j(new i.a2(`sources.${y}`, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new i.j(new i.a2(`sources.${y}`, null, 'missing required property "coordinates"'))), b.animate && typeof b.animate != "boolean" && this.fire(new i.j(new i.a2(`sources.${y}`, null, 'optional "animate" property must be a boolean value'))), b.canvas ? typeof b.canvas == "string" || b.canvas instanceof HTMLCanvasElement || this.fire(new i.j(new i.a2(`sources.${y}`, 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 i.j(new i.a2(`sources.${y}`, null, 'missing required property "canvas"'))), this.options = b, this.animate = b.animate === void 0 || b.animate;
              }
              load() {
                return i._(this, void 0, void 0, function* () {
                  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 i.j(new Error("Canvas dimensions cannot be less than or equal to zero."))) : (this.play = function() {
                    this._playing = !0, this.map.triggerRepaint();
                  }, this.pause = function() {
                    this._playing && (this.prepare(), this._playing = !1);
                  }, this._finishLoading());
                });
              }
              getCanvas() {
                return this.canvas;
              }
              onAdd(y) {
                this.map = y, this.load(), this.canvas && this.animate && this.play();
              }
              onRemove() {
                this.pause();
              }
              prepare() {
                let y = !1;
                if (this.canvas.width !== this.width && (this.width = this.canvas.width, y = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, y = !0), this._hasInvalidDimensions() || Object.keys(this.tiles).length === 0) return;
                const b = this.map.painter.context, R = b.gl;
                this.boundsBuffer || (this.boundsBuffer = b.createVertexBuffer(this._boundsArray, Ne.members)), this.boundsSegments || (this.boundsSegments = i.a0.simpleSegment(0, 0, 4, 2)), this.texture ? (y || this._playing) && this.texture.update(this.canvas, { premultiply: !0 }) : this.texture = new O(b, this.canvas, R.RGBA, { premultiply: !0 });
                let j = !1;
                for (const G in this.tiles) {
                  const ie = this.tiles[G];
                  ie.state !== "loaded" && (ie.state = "loaded", ie.texture = this.texture, j = !0);
                }
                j && this.fire(new i.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
              }
              serialize() {
                return { type: "canvas", coordinates: this.coordinates };
              }
              hasTransition() {
                return this._playing;
              }
              _hasInvalidDimensions() {
                for (const y of [this.canvas.width, this.canvas.height]) if (isNaN(y) || y <= 0) return !0;
                return !1;
              }
            }
            const we = {}, Ge = (B) => {
              switch (B) {
                case "geojson":
                  return Ee;
                case "image":
                  return Ie;
                case "raster":
                  return Le;
                case "raster-dem":
                  return We;
                case "vector":
                  return De;
                case "video":
                  return ge;
                case "canvas":
                  return Ce;
              }
              return we[B];
            }, Re = "RTLPluginLoaded";
            class je extends i.E {
              constructor() {
                super(...arguments), this.status = "unavailable", this.url = null, this.dispatcher = me();
              }
              _syncState(y) {
                return this.status = y, this.dispatcher.broadcast("SRPS", { pluginStatus: y, pluginURL: this.url }).catch((b) => {
                  throw this.status = "error", b;
                });
              }
              getRTLTextPluginStatus() {
                return this.status;
              }
              clearRTLTextPlugin() {
                this.status = "unavailable", this.url = null;
              }
              setRTLTextPlugin(y) {
                return i._(this, arguments, void 0, function* (b, R = !1) {
                  if (this.url) throw new Error("setRTLTextPlugin cannot be called multiple times.");
                  if (this.url = d.resolveURL(b), !this.url) throw new Error(`requested url ${b} is invalid`);
                  if (this.status === "unavailable") {
                    if (!R) return this._requestImport();
                    this.status = "deferred", this._syncState(this.status);
                  } else if (this.status === "requested") return this._requestImport();
                });
              }
              _requestImport() {
                return i._(this, void 0, void 0, function* () {
                  yield this._syncState("loading"), this.status = "loaded", this.fire(new i.k(Re));
                });
              }
              lazyLoad() {
                this.status === "unavailable" ? this.status = "requested" : this.status === "deferred" && this._requestImport();
              }
            }
            let Ke = null;
            function tt() {
              return Ke || (Ke = new je()), Ke;
            }
            class _e {
              constructor(y, b) {
                this.timeAdded = 0, this.fadeEndTime = 0, this.tileID = y, this.uid = i.a4(), this.uses = 0, this.tileSize = b, 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";
              }
              registerFadeDuration(y) {
                const b = y + this.timeAdded;
                b < this.fadeEndTime || (this.fadeEndTime = b);
              }
              wasRequested() {
                return this.state === "errored" || this.state === "loaded" || this.state === "reloading";
              }
              clearTextures(y) {
                this.demTexture && y.saveTileTexture(this.demTexture), this.demTexture = null;
              }
              loadVectorData(y, b, R) {
                if (this.hasData() && this.unloadVectorData(), this.state = "loaded", y) {
                  y.featureIndex && (this.latestFeatureIndex = y.featureIndex, y.rawTileData ? (this.latestRawTileData = y.rawTileData, this.latestFeatureIndex.rawTileData = y.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = y.collisionBoxArray, this.buckets = function(j, G) {
                    const ie = {};
                    if (!G) return ie;
                    for (const fe of j) {
                      const xe = fe.layerIds.map((Te) => G.getLayer(Te)).filter(Boolean);
                      if (xe.length !== 0) {
                        fe.layers = xe, fe.stateDependentLayerIds && (fe.stateDependentLayers = fe.stateDependentLayerIds.map((Te) => xe.filter((ze) => ze.id === Te)[0]));
                        for (const Te of xe) ie[Te.id] = fe;
                      }
                    }
                    return ie;
                  }(y.buckets, b.style), this.hasSymbolBuckets = !1;
                  for (const j in this.buckets) {
                    const G = this.buckets[j];
                    if (G instanceof i.a6) {
                      if (this.hasSymbolBuckets = !0, !R) break;
                      G.justReloaded = !0;
                    }
                  }
                  if (this.hasRTLText = !1, this.hasSymbolBuckets) for (const j in this.buckets) {
                    const G = this.buckets[j];
                    if (G instanceof i.a6 && G.hasRTLText) {
                      this.hasRTLText = !0, tt().lazyLoad();
                      break;
                    }
                  }
                  this.queryPadding = 0;
                  for (const j in this.buckets) {
                    const G = this.buckets[j];
                    this.queryPadding = Math.max(this.queryPadding, b.style.getLayer(j).queryRadius(G));
                  }
                  y.imageAtlas && (this.imageAtlas = y.imageAtlas), y.glyphAtlasImage && (this.glyphAtlasImage = y.glyphAtlasImage);
                } else this.collisionBoxArray = new i.a5();
              }
              unloadVectorData() {
                for (const y in this.buckets) this.buckets[y].destroy();
                this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded";
              }
              getBucket(y) {
                return this.buckets[y.id];
              }
              upload(y) {
                for (const R in this.buckets) {
                  const j = this.buckets[R];
                  j.uploadPending() && j.upload(y);
                }
                const b = y.gl;
                this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new O(y, this.imageAtlas.image, b.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new O(y, this.glyphAtlasImage, b.ALPHA), this.glyphAtlasImage = null);
              }
              prepare(y) {
                this.imageAtlas && this.imageAtlas.patchUpdatedImages(y, this.imageAtlasTexture);
              }
              queryRenderedFeatures(y, b, R, j, G, ie, fe, xe, Te, ze) {
                return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: j, cameraQueryGeometry: G, scale: ie, tileSize: this.tileSize, pixelPosMatrix: ze, transform: xe, params: fe, queryPadding: this.queryPadding * Te }, y, b, R) : {};
              }
              querySourceFeatures(y, b) {
                const R = this.latestFeatureIndex;
                if (!R || !R.rawTileData) return;
                const j = R.loadVTLayers(), G = b && b.sourceLayer ? b.sourceLayer : "", ie = j._geojsonTileLayer || j[G];
                if (!ie) return;
                const fe = i.a7(b && b.filter), { z: xe, x: Te, y: ze } = this.tileID.canonical, Ve = { z: xe, x: Te, y: ze };
                for (let ut = 0; ut < ie.length; ut++) {
                  const gt = ie.feature(ut);
                  if (fe.needGeometry) {
                    const zt = i.a8(gt, !0);
                    if (!fe.filter(new i.a9(this.tileID.overscaledZ), zt, this.tileID.canonical)) continue;
                  } else if (!fe.filter(new i.a9(this.tileID.overscaledZ), gt)) continue;
                  const wt = R.getId(gt, G), Et = new i.aa(gt, xe, Te, ze, wt);
                  Et.tile = Ve, y.push(Et);
                }
              }
              hasData() {
                return this.state === "loaded" || this.state === "reloading" || this.state === "expired";
              }
              patternsLoaded() {
                return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;
              }
              setExpiryData(y) {
                const b = this.expirationTime;
                if (y.cacheControl) {
                  const R = i.ab(y.cacheControl);
                  R["max-age"] && (this.expirationTime = Date.now() + 1e3 * R["max-age"]);
                } else y.expires && (this.expirationTime = new Date(y.expires).getTime());
                if (this.expirationTime) {
                  const R = Date.now();
                  let j = !1;
                  if (this.expirationTime > R) j = !1;
                  else if (b) if (this.expirationTime < b) j = !0;
                  else {
                    const G = this.expirationTime - b;
                    G ? this.expirationTime = R + Math.max(G, 3e4) : j = !0;
                  }
                  else j = !0;
                  j ? (this.expiredRequestCount++, this.state = "expired") : this.expiredRequestCount = 0;
                }
              }
              getExpiryTimeout() {
                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);
              }
              setFeatureState(y, b) {
                if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData || Object.keys(y).length === 0) return;
                const R = this.latestFeatureIndex.loadVTLayers();
                for (const j in this.buckets) {
                  if (!b.style.hasLayer(j)) continue;
                  const G = this.buckets[j], ie = G.layers[0].sourceLayer || "_geojsonTileLayer", fe = R[ie], xe = y[ie];
                  if (!fe || !xe || Object.keys(xe).length === 0) continue;
                  G.update(xe, fe, this.imageAtlas && this.imageAtlas.patternPositions || {});
                  const Te = b && b.style && b.style.getLayer(j);
                  Te && (this.queryPadding = Math.max(this.queryPadding, Te.queryRadius(G)));
                }
              }
              holdingForFade() {
                return this.symbolFadeHoldUntil !== void 0;
              }
              symbolFadeFinished() {
                return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < d.now();
              }
              clearFadeHold() {
                this.symbolFadeHoldUntil = void 0;
              }
              setHoldDuration(y) {
                this.symbolFadeHoldUntil = d.now() + y;
              }
              setDependencies(y, b) {
                const R = {};
                for (const j of b) R[j] = !0;
                this.dependencies[y] = R;
              }
              hasDependency(y, b) {
                for (const R of y) {
                  const j = this.dependencies[R];
                  if (j) {
                    for (const G of b) if (j[G]) return !0;
                  }
                }
                return !1;
              }
            }
            class Be {
              constructor(y, b) {
                this.max = y, this.onRemove = b, this.reset();
              }
              reset() {
                for (const y in this.data) for (const b of this.data[y]) b.timeout && clearTimeout(b.timeout), this.onRemove(b.value);
                return this.data = {}, this.order = [], this;
              }
              add(y, b, R) {
                const j = y.wrapped().key;
                this.data[j] === void 0 && (this.data[j] = []);
                const G = { value: b, timeout: void 0 };
                if (R !== void 0 && (G.timeout = setTimeout(() => {
                  this.remove(y, G);
                }, R)), this.data[j].push(G), this.order.push(j), this.order.length > this.max) {
                  const ie = this._getAndRemoveByKey(this.order[0]);
                  ie && this.onRemove(ie);
                }
                return this;
              }
              has(y) {
                return y.wrapped().key in this.data;
              }
              getAndRemove(y) {
                return this.has(y) ? this._getAndRemoveByKey(y.wrapped().key) : null;
              }
              _getAndRemoveByKey(y) {
                const b = this.data[y].shift();
                return b.timeout && clearTimeout(b.timeout), this.data[y].length === 0 && delete this.data[y], this.order.splice(this.order.indexOf(y), 1), b.value;
              }
              getByKey(y) {
                const b = this.data[y];
                return b ? b[0].value : null;
              }
              get(y) {
                return this.has(y) ? this.data[y.wrapped().key][0].value : null;
              }
              remove(y, b) {
                if (!this.has(y)) return this;
                const R = y.wrapped().key, j = b === void 0 ? 0 : this.data[R].indexOf(b), G = this.data[R][j];
                return this.data[R].splice(j, 1), G.timeout && clearTimeout(G.timeout), this.data[R].length === 0 && delete this.data[R], this.onRemove(G.value), this.order.splice(this.order.indexOf(R), 1), this;
              }
              setMaxSize(y) {
                for (this.max = y; this.order.length > this.max; ) {
                  const b = this._getAndRemoveByKey(this.order[0]);
                  b && this.onRemove(b);
                }
                return this;
              }
              filter(y) {
                const b = [];
                for (const R in this.data) for (const j of this.data[R]) y(j.value) || b.push(j);
                for (const R of b) this.remove(R.value.tileID, R);
              }
            }
            class $e {
              constructor() {
                this.state = {}, this.stateChanges = {}, this.deletedStates = {};
              }
              updateState(y, b, R) {
                const j = String(b);
                if (this.stateChanges[y] = this.stateChanges[y] || {}, this.stateChanges[y][j] = this.stateChanges[y][j] || {}, i.e(this.stateChanges[y][j], R), this.deletedStates[y] === null) {
                  this.deletedStates[y] = {};
                  for (const G in this.state[y]) G !== j && (this.deletedStates[y][G] = null);
                } else if (this.deletedStates[y] && this.deletedStates[y][j] === null) {
                  this.deletedStates[y][j] = {};
                  for (const G in this.state[y][j]) R[G] || (this.deletedStates[y][j][G] = null);
                } else for (const G in R) this.deletedStates[y] && this.deletedStates[y][j] && this.deletedStates[y][j][G] === null && delete this.deletedStates[y][j][G];
              }
              removeFeatureState(y, b, R) {
                if (this.deletedStates[y] === null) return;
                const j = String(b);
                if (this.deletedStates[y] = this.deletedStates[y] || {}, R && b !== void 0) this.deletedStates[y][j] !== null && (this.deletedStates[y][j] = this.deletedStates[y][j] || {}, this.deletedStates[y][j][R] = null);
                else if (b !== void 0) if (this.stateChanges[y] && this.stateChanges[y][j]) for (R in this.deletedStates[y][j] = {}, this.stateChanges[y][j]) this.deletedStates[y][j][R] = null;
                else this.deletedStates[y][j] = null;
                else this.deletedStates[y] = null;
              }
              getState(y, b) {
                const R = String(b), j = this.state[y] || {}, G = this.stateChanges[y] || {}, ie = i.e({}, j[R], G[R]);
                if (this.deletedStates[y] === null) return {};
                if (this.deletedStates[y]) {
                  const fe = this.deletedStates[y][b];
                  if (fe === null) return {};
                  for (const xe in fe) delete ie[xe];
                }
                return ie;
              }
              initializeTileState(y, b) {
                y.setFeatureState(this.state, b);
              }
              coalesceChanges(y, b) {
                const R = {};
                for (const j in this.stateChanges) {
                  this.state[j] = this.state[j] || {};
                  const G = {};
                  for (const ie in this.stateChanges[j]) this.state[j][ie] || (this.state[j][ie] = {}), i.e(this.state[j][ie], this.stateChanges[j][ie]), G[ie] = this.state[j][ie];
                  R[j] = G;
                }
                for (const j in this.deletedStates) {
                  this.state[j] = this.state[j] || {};
                  const G = {};
                  if (this.deletedStates[j] === null) for (const ie in this.state[j]) G[ie] = {}, this.state[j][ie] = {};
                  else for (const ie in this.deletedStates[j]) {
                    if (this.deletedStates[j][ie] === null) this.state[j][ie] = {};
                    else for (const fe of Object.keys(this.deletedStates[j][ie])) delete this.state[j][ie][fe];
                    G[ie] = this.state[j][ie];
                  }
                  R[j] = R[j] || {}, i.e(R[j], G);
                }
                if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(R).length !== 0) for (const j in y) y[j].setFeatureState(R, b);
              }
            }
            class Ze extends i.E {
              constructor(y, b, R) {
                super(), this.id = y, this.dispatcher = R, this.on("data", (j) => this._dataHandler(j)), this.on("dataloading", () => {
                  this._sourceErrored = !1;
                }), this.on("error", () => {
                  this._sourceErrored = this._source.loaded();
                }), this._source = ((j, G, ie, fe) => {
                  const xe = new (Ge(G.type))(j, G, ie, fe);
                  if (xe.id !== j) throw new Error(`Expected Source id to be ${j} instead of ${xe.id}`);
                  return xe;
                })(y, b, R, this), this._tiles = {}, this._cache = new Be(0, (j) => this._unloadTile(j)), this._timers = {}, this._cacheTimers = {}, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new $e(), this._didEmitContent = !1, this._updated = !1;
              }
              onAdd(y) {
                this.map = y, this._maxTileCacheSize = y ? y._maxTileCacheSize : null, this._maxTileCacheZoomLevels = y ? y._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(y);
              }
              onRemove(y) {
                this.clearTiles(), this._source && this._source.onRemove && this._source.onRemove(y);
              }
              loaded() {
                if (this._sourceErrored) return !0;
                if (!this._sourceLoaded || !this._source.loaded()) return !1;
                if (!(this.used === void 0 && this.usedForTerrain === void 0 || this.used || this.usedForTerrain)) return !0;
                if (!this._updated) return !1;
                for (const y in this._tiles) {
                  const b = this._tiles[y];
                  if (b.state !== "loaded" && b.state !== "errored") return !1;
                }
                return !0;
              }
              getSource() {
                return this._source;
              }
              pause() {
                this._paused = !0;
              }
              resume() {
                if (!this._paused) return;
                const y = this._shouldReloadOnResume;
                this._paused = !1, this._shouldReloadOnResume = !1, y && this.reload(), this.transform && this.update(this.transform, this.terrain);
              }
              _loadTile(y, b, R) {
                return i._(this, void 0, void 0, function* () {
                  try {
                    yield this._source.loadTile(y), this._tileLoaded(y, b, R);
                  } catch (j) {
                    y.state = "errored", j.status !== 404 ? this._source.fire(new i.j(j, { tile: y })) : this.update(this.transform, this.terrain);
                  }
                });
              }
              _unloadTile(y) {
                this._source.unloadTile && this._source.unloadTile(y);
              }
              _abortTile(y) {
                this._source.abortTile && this._source.abortTile(y), this._source.fire(new i.k("dataabort", { tile: y, coord: y.tileID, dataType: "source" }));
              }
              serialize() {
                return this._source.serialize();
              }
              prepare(y) {
                this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null);
                for (const b in this._tiles) {
                  const R = this._tiles[b];
                  R.upload(y), R.prepare(this.map.style.imageManager);
                }
              }
              getIds() {
                return Object.values(this._tiles).map((y) => y.tileID).sort(ct).map((y) => y.key);
              }
              getRenderableIds(y) {
                const b = [];
                for (const R in this._tiles) this._isIdRenderable(R, y) && b.push(this._tiles[R]);
                return y ? b.sort((R, j) => {
                  const G = R.tileID, ie = j.tileID, fe = new i.P(G.canonical.x, G.canonical.y)._rotate(this.transform.angle), xe = new i.P(ie.canonical.x, ie.canonical.y)._rotate(this.transform.angle);
                  return G.overscaledZ - ie.overscaledZ || xe.y - fe.y || xe.x - fe.x;
                }).map((R) => R.tileID.key) : b.map((R) => R.tileID).sort(ct).map((R) => R.key);
              }
              hasRenderableParent(y) {
                const b = this.findLoadedParent(y, 0);
                return !!b && this._isIdRenderable(b.tileID.key);
              }
              _isIdRenderable(y, b) {
                return this._tiles[y] && this._tiles[y].hasData() && !this._coveredTiles[y] && (b || !this._tiles[y].holdingForFade());
              }
              reload() {
                if (this._paused) this._shouldReloadOnResume = !0;
                else {
                  this._cache.reset();
                  for (const y in this._tiles) this._tiles[y].state !== "errored" && this._reloadTile(y, "reloading");
                }
              }
              _reloadTile(y, b) {
                return i._(this, void 0, void 0, function* () {
                  const R = this._tiles[y];
                  R && (R.state !== "loading" && (R.state = b), yield this._loadTile(R, y, b));
                });
              }
              _tileLoaded(y, b, R) {
                y.timeAdded = d.now(), R === "expired" && (y.refreshedUponExpiration = !0), this._setTileReloadTimer(b, y), this.getSource().type === "raster-dem" && y.dem && this._backfillDEM(y), this._state.initializeTileState(y, this.map ? this.map.painter : null), y.aborted || this._source.fire(new i.k("data", { dataType: "source", tile: y, coord: y.tileID }));
              }
              _backfillDEM(y) {
                const b = this.getRenderableIds();
                for (let j = 0; j < b.length; j++) {
                  const G = b[j];
                  if (y.neighboringTiles && y.neighboringTiles[G]) {
                    const ie = this.getTileByID(G);
                    R(y, ie), R(ie, y);
                  }
                }
                function R(j, G) {
                  j.needsHillshadePrepare = !0, j.needsTerrainPrepare = !0;
                  let ie = G.tileID.canonical.x - j.tileID.canonical.x;
                  const fe = G.tileID.canonical.y - j.tileID.canonical.y, xe = Math.pow(2, j.tileID.canonical.z), Te = G.tileID.key;
                  ie === 0 && fe === 0 || Math.abs(fe) > 1 || (Math.abs(ie) > 1 && (Math.abs(ie + xe) === 1 ? ie += xe : Math.abs(ie - xe) === 1 && (ie -= xe)), G.dem && j.dem && (j.dem.backfillBorder(G.dem, ie, fe), j.neighboringTiles && j.neighboringTiles[Te] && (j.neighboringTiles[Te].backfilled = !0)));
                }
              }
              getTile(y) {
                return this.getTileByID(y.key);
              }
              getTileByID(y) {
                return this._tiles[y];
              }
              _retainLoadedChildren(y, b, R, j) {
                for (const G in this._tiles) {
                  let ie = this._tiles[G];
                  if (j[G] || !ie.hasData() || ie.tileID.overscaledZ <= b || ie.tileID.overscaledZ > R) continue;
                  let fe = ie.tileID;
                  for (; ie && ie.tileID.overscaledZ > b + 1; ) {
                    const Te = ie.tileID.scaledTo(ie.tileID.overscaledZ - 1);
                    ie = this._tiles[Te.key], ie && ie.hasData() && (fe = Te);
                  }
                  let xe = fe;
                  for (; xe.overscaledZ > b; ) if (xe = xe.scaledTo(xe.overscaledZ - 1), y[xe.key]) {
                    j[fe.key] = fe;
                    break;
                  }
                }
              }
              findLoadedParent(y, b) {
                if (y.key in this._loadedParentTiles) {
                  const R = this._loadedParentTiles[y.key];
                  return R && R.tileID.overscaledZ >= b ? R : null;
                }
                for (let R = y.overscaledZ - 1; R >= b; R--) {
                  const j = y.scaledTo(R), G = this._getLoadedTile(j);
                  if (G) return G;
                }
              }
              findLoadedSibling(y) {
                return this._getLoadedTile(y);
              }
              _getLoadedTile(y) {
                const b = this._tiles[y.key];
                return b && b.hasData() ? b : this._cache.getByKey(y.wrapped().key);
              }
              updateCacheSize(y) {
                const b = (Math.ceil(y.width / this._source.tileSize) + 1) * (Math.ceil(y.height / this._source.tileSize) + 1), R = this._maxTileCacheZoomLevels === null ? i.a.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels, j = Math.floor(b * R), G = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, j) : j;
                this._cache.setMaxSize(G);
              }
              handleWrapJump(y) {
                const b = (y - (this._prevLng === void 0 ? y : this._prevLng)) / 360, R = Math.round(b);
                if (this._prevLng = y, R) {
                  const j = {};
                  for (const G in this._tiles) {
                    const ie = this._tiles[G];
                    ie.tileID = ie.tileID.unwrapTo(ie.tileID.wrap + R), j[ie.tileID.key] = ie;
                  }
                  this._tiles = j;
                  for (const G in this._timers) clearTimeout(this._timers[G]), delete this._timers[G];
                  for (const G in this._tiles) {
                    const ie = this._tiles[G];
                    this._setTileReloadTimer(G, ie);
                  }
                }
              }
              _updateCoveredAndRetainedTiles(y, b, R, j, G, ie) {
                const fe = {}, xe = {}, Te = Object.keys(y), ze = d.now();
                for (const Ve of Te) {
                  const ut = y[Ve], gt = this._tiles[Ve];
                  if (!gt || gt.fadeEndTime !== 0 && gt.fadeEndTime <= ze) continue;
                  const wt = this.findLoadedParent(ut, b), Et = this.findLoadedSibling(ut), zt = wt || Et || null;
                  zt && (this._addTile(zt.tileID), fe[zt.tileID.key] = zt.tileID), xe[Ve] = ut;
                }
                this._retainLoadedChildren(xe, j, R, y);
                for (const Ve in fe) y[Ve] || (this._coveredTiles[Ve] = !0, y[Ve] = fe[Ve]);
                if (ie) {
                  const Ve = {}, ut = {};
                  for (const gt of G) this._tiles[gt.key].hasData() ? Ve[gt.key] = gt : ut[gt.key] = gt;
                  for (const gt in ut) {
                    const wt = ut[gt].children(this._source.maxzoom);
                    this._tiles[wt[0].key] && this._tiles[wt[1].key] && this._tiles[wt[2].key] && this._tiles[wt[3].key] && (Ve[wt[0].key] = y[wt[0].key] = wt[0], Ve[wt[1].key] = y[wt[1].key] = wt[1], Ve[wt[2].key] = y[wt[2].key] = wt[2], Ve[wt[3].key] = y[wt[3].key] = wt[3], delete ut[gt]);
                  }
                  for (const gt in ut) {
                    const wt = ut[gt], Et = this.findLoadedParent(wt, this._source.minzoom), zt = this.findLoadedSibling(wt), It = Et || zt || null;
                    if (It) {
                      Ve[It.tileID.key] = y[It.tileID.key] = It.tileID;
                      for (const jt in Ve) Ve[jt].isChildOf(It.tileID) && delete Ve[jt];
                    }
                  }
                  for (const gt in this._tiles) Ve[gt] || (this._coveredTiles[gt] = !0);
                }
              }
              update(y, b) {
                if (!this._sourceLoaded || this._paused) return;
                let R;
                this.transform = y, this.terrain = b, this.updateCacheSize(y), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? R = y.getVisibleUnwrappedCoordinates(this._source.tileID).map((ze) => new i.S(ze.canonical.z, ze.wrap, ze.canonical.z, ze.canonical.x, ze.canonical.y)) : (R = y.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: b }), this._source.hasTile && (R = R.filter((ze) => this._source.hasTile(ze)))) : R = [];
                const j = y.coveringZoomLevel(this._source), G = Math.max(j - Ze.maxOverzooming, this._source.minzoom), ie = Math.max(j + Ze.maxUnderzooming, this._source.minzoom);
                if (this.usedForTerrain) {
                  const ze = {};
                  for (const Ve of R) if (Ve.canonical.z > this._source.minzoom) {
                    const ut = Ve.scaledTo(Ve.canonical.z - 1);
                    ze[ut.key] = ut;
                    const gt = Ve.scaledTo(Math.max(this._source.minzoom, Math.min(Ve.canonical.z, 5)));
                    ze[gt.key] = gt;
                  }
                  R = R.concat(Object.values(ze));
                }
                const fe = R.length === 0 && !this._updated && this._didEmitContent;
                this._updated = !0, fe && this.fire(new i.k("data", { sourceDataType: "idle", dataType: "source", sourceId: this.id }));
                const xe = this._updateRetainedTiles(R, j);
                ft(this._source.type) && this._updateCoveredAndRetainedTiles(xe, G, ie, j, R, b);
                for (const ze in xe) this._tiles[ze].clearFadeHold();
                const Te = i.ac(this._tiles, xe);
                for (const ze of Te) {
                  const Ve = this._tiles[ze];
                  Ve.hasSymbolBuckets && !Ve.holdingForFade() ? Ve.setHoldDuration(this.map._fadeDuration) : Ve.hasSymbolBuckets && !Ve.symbolFadeFinished() || this._removeTile(ze);
                }
                this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache();
              }
              releaseSymbolFadeTiles() {
                for (const y in this._tiles) this._tiles[y].holdingForFade() && this._removeTile(y);
              }
              _updateRetainedTiles(y, b) {
                var R;
                const j = {}, G = {}, ie = Math.max(b - Ze.maxOverzooming, this._source.minzoom), fe = Math.max(b + Ze.maxUnderzooming, this._source.minzoom), xe = {};
                for (const Te of y) {
                  const ze = this._addTile(Te);
                  j[Te.key] = Te, ze.hasData() || b < this._source.maxzoom && (xe[Te.key] = Te);
                }
                this._retainLoadedChildren(xe, b, fe, j);
                for (const Te of y) {
                  let ze = this._tiles[Te.key];
                  if (ze.hasData()) continue;
                  if (b + 1 > this._source.maxzoom) {
                    const ut = Te.children(this._source.maxzoom)[0], gt = this.getTile(ut);
                    if (gt && gt.hasData()) {
                      j[ut.key] = ut;
                      continue;
                    }
                  } else {
                    const ut = Te.children(this._source.maxzoom);
                    if (j[ut[0].key] && j[ut[1].key] && j[ut[2].key] && j[ut[3].key]) continue;
                  }
                  let Ve = ze.wasRequested();
                  for (let ut = Te.overscaledZ - 1; ut >= ie; --ut) {
                    const gt = Te.scaledTo(ut);
                    if (G[gt.key]) break;
                    if (G[gt.key] = !0, ze = this.getTile(gt), !ze && Ve && (ze = this._addTile(gt)), ze) {
                      const wt = ze.hasData();
                      if ((wt || !(!((R = this.map) === null || R === void 0) && R.cancelPendingTileRequestsWhileZooming) || Ve) && (j[gt.key] = gt), Ve = ze.wasRequested(), wt) break;
                    }
                  }
                }
                return j;
              }
              _updateLoadedParentTileCache() {
                this._loadedParentTiles = {};
                for (const y in this._tiles) {
                  const b = [];
                  let R, j = this._tiles[y].tileID;
                  for (; j.overscaledZ > 0; ) {
                    if (j.key in this._loadedParentTiles) {
                      R = this._loadedParentTiles[j.key];
                      break;
                    }
                    b.push(j.key);
                    const G = j.scaledTo(j.overscaledZ - 1);
                    if (R = this._getLoadedTile(G), R) break;
                    j = G;
                  }
                  for (const G of b) this._loadedParentTiles[G] = R;
                }
              }
              _updateLoadedSiblingTileCache() {
                this._loadedSiblingTiles = {};
                for (const y in this._tiles) {
                  const b = this._tiles[y].tileID, R = this._getLoadedTile(b);
                  this._loadedSiblingTiles[b.key] = R;
                }
              }
              _addTile(y) {
                let b = this._tiles[y.key];
                if (b) return b;
                b = this._cache.getAndRemove(y), b && (this._setTileReloadTimer(y.key, b), b.tileID = y, this._state.initializeTileState(b, this.map ? this.map.painter : null), this._cacheTimers[y.key] && (clearTimeout(this._cacheTimers[y.key]), delete this._cacheTimers[y.key], this._setTileReloadTimer(y.key, b)));
                const R = b;
                return b || (b = new _e(y, this._source.tileSize * y.overscaleFactor()), this._loadTile(b, y.key, b.state)), b.uses++, this._tiles[y.key] = b, R || this._source.fire(new i.k("dataloading", { tile: b, coord: b.tileID, dataType: "source" })), b;
              }
              _setTileReloadTimer(y, b) {
                y in this._timers && (clearTimeout(this._timers[y]), delete this._timers[y]);
                const R = b.getExpiryTimeout();
                R && (this._timers[y] = setTimeout(() => {
                  this._reloadTile(y, "expired"), delete this._timers[y];
                }, R));
              }
              _removeTile(y) {
                const b = this._tiles[y];
                b && (b.uses--, delete this._tiles[y], this._timers[y] && (clearTimeout(this._timers[y]), delete this._timers[y]), b.uses > 0 || (b.hasData() && b.state !== "reloading" ? this._cache.add(b.tileID, b, b.getExpiryTimeout()) : (b.aborted = !0, this._abortTile(b), this._unloadTile(b))));
              }
              _dataHandler(y) {
                const b = y.sourceDataType;
                y.dataType === "source" && b === "metadata" && (this._sourceLoaded = !0), this._sourceLoaded && !this._paused && y.dataType === "source" && b === "content" && (this.reload(), this.transform && this.update(this.transform, this.terrain), this._didEmitContent = !0);
              }
              clearTiles() {
                this._shouldReloadOnResume = !1, this._paused = !1;
                for (const y in this._tiles) this._removeTile(y);
                this._cache.reset();
              }
              tilesIn(y, b, R) {
                const j = [], G = this.transform;
                if (!G) return j;
                const ie = R ? G.getCameraQueryGeometry(y) : y, fe = y.map((wt) => G.pointCoordinate(wt, this.terrain)), xe = ie.map((wt) => G.pointCoordinate(wt, this.terrain)), Te = this.getIds();
                let ze = 1 / 0, Ve = 1 / 0, ut = -1 / 0, gt = -1 / 0;
                for (const wt of xe) ze = Math.min(ze, wt.x), Ve = Math.min(Ve, wt.y), ut = Math.max(ut, wt.x), gt = Math.max(gt, wt.y);
                for (let wt = 0; wt < Te.length; wt++) {
                  const Et = this._tiles[Te[wt]];
                  if (Et.holdingForFade()) continue;
                  const zt = Et.tileID, It = Math.pow(2, G.zoom - Et.tileID.overscaledZ), jt = b * Et.queryPadding * i.X / Et.tileSize / It, Lt = [zt.getTilePoint(new i.Z(ze, Ve)), zt.getTilePoint(new i.Z(ut, gt))];
                  if (Lt[0].x - jt < i.X && Lt[0].y - jt < i.X && Lt[1].x + jt >= 0 && Lt[1].y + jt >= 0) {
                    const Zt = fe.map((Xt) => zt.getTilePoint(Xt)), Qt = xe.map((Xt) => zt.getTilePoint(Xt));
                    j.push({ tile: Et, tileID: zt, queryGeometry: Zt, cameraQueryGeometry: Qt, scale: It });
                  }
                }
                return j;
              }
              getVisibleCoordinates(y) {
                const b = this.getRenderableIds(y).map((R) => this._tiles[R].tileID);
                for (const R of b) R.posMatrix = this.transform.calculatePosMatrix(R.toUnwrapped());
                return b;
              }
              hasTransition() {
                if (this._source.hasTransition()) return !0;
                if (ft(this._source.type)) {
                  const y = d.now();
                  for (const b in this._tiles) if (this._tiles[b].fadeEndTime >= y) return !0;
                }
                return !1;
              }
              setFeatureState(y, b, R) {
                y = y || "_geojsonTileLayer", this._state.updateState(y, b, R);
              }
              removeFeatureState(y, b, R) {
                y = y || "_geojsonTileLayer", this._state.removeFeatureState(y, b, R);
              }
              getFeatureState(y, b) {
                return y = y || "_geojsonTileLayer", this._state.getState(y, b);
              }
              setDependencies(y, b, R) {
                const j = this._tiles[y];
                j && j.setDependencies(b, R);
              }
              reloadTilesForDependencies(y, b) {
                for (const R in this._tiles) this._tiles[R].hasDependency(y, b) && this._reloadTile(R, "reloading");
                this._cache.filter((R) => !R.hasDependency(y, b));
              }
            }
            function ct(B, y) {
              const b = Math.abs(2 * B.wrap) - +(B.wrap < 0), R = Math.abs(2 * y.wrap) - +(y.wrap < 0);
              return B.overscaledZ - y.overscaledZ || R - b || y.canonical.y - B.canonical.y || y.canonical.x - B.canonical.x;
            }
            function ft(B) {
              return B === "raster" || B === "image" || B === "video";
            }
            Ze.maxOverzooming = 10, Ze.maxUnderzooming = 3;
            class _t {
              constructor(y, b) {
                this.reset(y, b);
              }
              reset(y, b) {
                this.points = y || [], this._distances = [0];
                for (let R = 1; R < this.points.length; R++) this._distances[R] = this._distances[R - 1] + this.points[R].dist(this.points[R - 1]);
                this.length = this._distances[this._distances.length - 1], this.padding = Math.min(b || 0, 0.5 * this.length), this.paddedLength = this.length - 2 * this.padding;
              }
              lerp(y) {
                if (this.points.length === 1) return this.points[0];
                y = i.ad(y, 0, 1);
                let b = 1, R = this._distances[b];
                const j = y * this.paddedLength + this.padding;
                for (; R < j && b < this._distances.length; ) R = this._distances[++b];
                const G = b - 1, ie = this._distances[G], fe = R - ie, xe = fe > 0 ? (j - ie) / fe : 0;
                return this.points[G].mult(1 - xe).add(this.points[b].mult(xe));
              }
            }
            function Pt(B, y) {
              let b = !0;
              return B === "always" || B !== "never" && y !== "never" || (b = !1), b;
            }
            class Dt {
              constructor(y, b, R) {
                const j = this.boxCells = [], G = this.circleCells = [];
                this.xCellCount = Math.ceil(y / R), this.yCellCount = Math.ceil(b / R);
                for (let ie = 0; ie < this.xCellCount * this.yCellCount; ie++) j.push([]), G.push([]);
                this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = y, this.height = b, this.xScale = this.xCellCount / y, this.yScale = this.yCellCount / b, this.boxUid = 0, this.circleUid = 0;
              }
              keysLength() {
                return this.boxKeys.length + this.circleKeys.length;
              }
              insert(y, b, R, j, G) {
                this._forEachCell(b, R, j, G, this._insertBoxCell, this.boxUid++), this.boxKeys.push(y), this.bboxes.push(b), this.bboxes.push(R), this.bboxes.push(j), this.bboxes.push(G);
              }
              insertCircle(y, b, R, j) {
                this._forEachCell(b - j, R - j, b + j, R + j, this._insertCircleCell, this.circleUid++), this.circleKeys.push(y), this.circles.push(b), this.circles.push(R), this.circles.push(j);
              }
              _insertBoxCell(y, b, R, j, G, ie) {
                this.boxCells[G].push(ie);
              }
              _insertCircleCell(y, b, R, j, G, ie) {
                this.circleCells[G].push(ie);
              }
              _query(y, b, R, j, G, ie, fe) {
                if (R < 0 || y > this.width || j < 0 || b > this.height) return [];
                const xe = [];
                if (y <= 0 && b <= 0 && this.width <= R && this.height <= j) {
                  if (G) return [{ key: null, x1: y, y1: b, x2: R, y2: j }];
                  for (let Te = 0; Te < this.boxKeys.length; Te++) xe.push({ key: this.boxKeys[Te], x1: this.bboxes[4 * Te], y1: this.bboxes[4 * Te + 1], x2: this.bboxes[4 * Te + 2], y2: this.bboxes[4 * Te + 3] });
                  for (let Te = 0; Te < this.circleKeys.length; Te++) {
                    const ze = this.circles[3 * Te], Ve = this.circles[3 * Te + 1], ut = this.circles[3 * Te + 2];
                    xe.push({ key: this.circleKeys[Te], x1: ze - ut, y1: Ve - ut, x2: ze + ut, y2: Ve + ut });
                  }
                } else {
                  const Te = { hitTest: G, overlapMode: ie, seenUids: { box: {}, circle: {} } };
                  this._forEachCell(y, b, R, j, this._queryCell, xe, Te, fe);
                }
                return xe;
              }
              query(y, b, R, j) {
                return this._query(y, b, R, j, !1, null);
              }
              hitTest(y, b, R, j, G, ie) {
                return this._query(y, b, R, j, !0, G, ie).length > 0;
              }
              hitTestCircle(y, b, R, j, G) {
                const ie = y - R, fe = y + R, xe = b - R, Te = b + R;
                if (fe < 0 || ie > this.width || Te < 0 || xe > this.height) return !1;
                const ze = [], Ve = { hitTest: !0, overlapMode: j, circle: { x: y, y: b, radius: R }, seenUids: { box: {}, circle: {} } };
                return this._forEachCell(ie, xe, fe, Te, this._queryCellCircle, ze, Ve, G), ze.length > 0;
              }
              _queryCell(y, b, R, j, G, ie, fe, xe) {
                const { seenUids: Te, hitTest: ze, overlapMode: Ve } = fe, ut = this.boxCells[G];
                if (ut !== null) {
                  const wt = this.bboxes;
                  for (const Et of ut) if (!Te.box[Et]) {
                    Te.box[Et] = !0;
                    const zt = 4 * Et, It = this.boxKeys[Et];
                    if (y <= wt[zt + 2] && b <= wt[zt + 3] && R >= wt[zt + 0] && j >= wt[zt + 1] && (!xe || xe(It)) && (!ze || !Pt(Ve, It.overlapMode)) && (ie.push({ key: It, x1: wt[zt], y1: wt[zt + 1], x2: wt[zt + 2], y2: wt[zt + 3] }), ze)) return !0;
                  }
                }
                const gt = this.circleCells[G];
                if (gt !== null) {
                  const wt = this.circles;
                  for (const Et of gt) if (!Te.circle[Et]) {
                    Te.circle[Et] = !0;
                    const zt = 3 * Et, It = this.circleKeys[Et];
                    if (this._circleAndRectCollide(wt[zt], wt[zt + 1], wt[zt + 2], y, b, R, j) && (!xe || xe(It)) && (!ze || !Pt(Ve, It.overlapMode))) {
                      const jt = wt[zt], Lt = wt[zt + 1], Zt = wt[zt + 2];
                      if (ie.push({ key: It, x1: jt - Zt, y1: Lt - Zt, x2: jt + Zt, y2: Lt + Zt }), ze) return !0;
                    }
                  }
                }
                return !1;
              }
              _queryCellCircle(y, b, R, j, G, ie, fe, xe) {
                const { circle: Te, seenUids: ze, overlapMode: Ve } = fe, ut = this.boxCells[G];
                if (ut !== null) {
                  const wt = this.bboxes;
                  for (const Et of ut) if (!ze.box[Et]) {
                    ze.box[Et] = !0;
                    const zt = 4 * Et, It = this.boxKeys[Et];
                    if (this._circleAndRectCollide(Te.x, Te.y, Te.radius, wt[zt + 0], wt[zt + 1], wt[zt + 2], wt[zt + 3]) && (!xe || xe(It)) && !Pt(Ve, It.overlapMode)) return ie.push(!0), !0;
                  }
                }
                const gt = this.circleCells[G];
                if (gt !== null) {
                  const wt = this.circles;
                  for (const Et of gt) if (!ze.circle[Et]) {
                    ze.circle[Et] = !0;
                    const zt = 3 * Et, It = this.circleKeys[Et];
                    if (this._circlesCollide(wt[zt], wt[zt + 1], wt[zt + 2], Te.x, Te.y, Te.radius) && (!xe || xe(It)) && !Pt(Ve, It.overlapMode)) return ie.push(!0), !0;
                  }
                }
              }
              _forEachCell(y, b, R, j, G, ie, fe, xe) {
                const Te = this._convertToXCellCoord(y), ze = this._convertToYCellCoord(b), Ve = this._convertToXCellCoord(R), ut = this._convertToYCellCoord(j);
                for (let gt = Te; gt <= Ve; gt++) for (let wt = ze; wt <= ut; wt++) {
                  const Et = this.xCellCount * wt + gt;
                  if (G.call(this, y, b, R, j, Et, ie, fe, xe)) return;
                }
              }
              _convertToXCellCoord(y) {
                return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(y * this.xScale)));
              }
              _convertToYCellCoord(y) {
                return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(y * this.yScale)));
              }
              _circlesCollide(y, b, R, j, G, ie) {
                const fe = j - y, xe = G - b, Te = R + ie;
                return Te * Te > fe * fe + xe * xe;
              }
              _circleAndRectCollide(y, b, R, j, G, ie, fe) {
                const xe = (ie - j) / 2, Te = Math.abs(y - (j + xe));
                if (Te > xe + R) return !1;
                const ze = (fe - G) / 2, Ve = Math.abs(b - (G + ze));
                if (Ve > ze + R) return !1;
                if (Te <= xe || Ve <= ze) return !0;
                const ut = Te - xe, gt = Ve - ze;
                return ut * ut + gt * gt <= R * R;
              }
            }
            function $t(B, y, b, R, j) {
              const G = i.H();
              return y ? (i.K(G, G, [1 / j, 1 / j, 1]), b || i.ae(G, G, R.angle)) : i.L(G, R.labelPlaneMatrix, B), G;
            }
            function Gt(B, y, b, R, j) {
              if (y) {
                const G = i.af(B);
                return i.K(G, G, [j, j, 1]), b || i.ae(G, G, -R.angle), G;
              }
              return R.glCoordMatrix;
            }
            function Wt(B, y, b) {
              let R;
              b ? (R = [B.x, B.y, b(B.x, B.y), 1], i.ag(R, R, y)) : (R = [B.x, B.y, 0, 1], function(G, ie, fe) {
                const xe = ie[0], Te = ie[1];
                G[0] = fe[0] * xe + fe[4] * Te + fe[12], G[1] = fe[1] * xe + fe[5] * Te + fe[13], G[3] = fe[3] * xe + fe[7] * Te + fe[15];
              }(R, R, y));
              const j = R[3];
              return { point: new i.P(R[0] / j, R[1] / j), signedDistanceFromCamera: j, isOccluded: !1 };
            }
            function mt(B, y) {
              return 0.5 + B / y * 0.5;
            }
            function at(B, y) {
              return B.x >= -y[0] && B.x <= y[0] && B.y >= -y[1] && B.y <= y[1];
            }
            function vt(B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt) {
              const Et = R ? B.textSizeData : B.iconSizeData, zt = i.ah(Et, b.transform.zoom), It = [256 / b.width * 2 + 1, 256 / b.height * 2 + 1], jt = R ? B.text.dynamicLayoutVertexArray : B.icon.dynamicLayoutVertexArray;
              jt.clear();
              const Lt = B.lineVertexArray, Zt = R ? B.text.placedSymbolArray : B.icon.placedSymbolArray, Qt = b.transform.width / b.transform.height;
              let Xt = !1;
              for (let yn = 0; yn < Zt.length; yn++) {
                const Sn = Zt.get(yn);
                if (Sn.hidden || Sn.writingMode === i.ai.vertical && !Xt) {
                  Ft(Sn.numGlyphs, jt);
                  continue;
                }
                Xt = !1;
                const Un = Wt(new i.P(Sn.anchorX, Sn.anchorY), y, wt);
                if (!at(Un.point, It)) {
                  Ft(Sn.numGlyphs, jt);
                  continue;
                }
                const Vn = Un.signedDistanceFromCamera, Yn = mt(b.transform.cameraToCenterDistance, Vn), er = i.aj(Et, zt, Sn), kr = ie ? er / Yn : er * Yn, or = { getElevation: wt, labelPlaneMatrix: j, lineVertexArray: Lt, pitchWithMap: ie, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: Te, tileAnchorPoint: new i.P(Sn.anchorX, Sn.anchorY), unwrappedTileID: ze, width: Ve, height: ut, translation: gt }, Mr = nt(or, Sn, kr, !1, fe, y, G, B.glyphOffsetArray, jt, Qt, xe);
                Xt = Mr.useVertical, (Mr.notEnoughRoom || Xt || Mr.needsFlipping && nt(or, Sn, kr, !0, fe, y, G, B.glyphOffsetArray, jt, Qt, xe).notEnoughRoom) && Ft(Sn.numGlyphs, jt);
              }
              R ? B.text.dynamicLayoutVertexBuffer.updateData(jt) : B.icon.dynamicLayoutVertexBuffer.updateData(jt);
            }
            function St(B, y, b, R, j, G, ie, fe) {
              const xe = G.glyphStartIndex + G.numGlyphs, Te = G.lineStartIndex, ze = G.lineStartIndex + G.lineLength, Ve = y.getoffsetX(G.glyphStartIndex), ut = y.getoffsetX(xe - 1), gt = At(B * Ve, b, R, j, G.segment, Te, ze, fe, ie);
              if (!gt) return null;
              const wt = At(B * ut, b, R, j, G.segment, Te, ze, fe, ie);
              return wt ? fe.projectionCache.anyProjectionOccluded ? null : { first: gt, last: wt } : null;
            }
            function Je(B, y, b, R) {
              return B === i.ai.horizontal && Math.abs(b.y - y.y) > Math.abs(b.x - y.x) * R ? { useVertical: !0 } : (B === i.ai.vertical ? y.y < b.y : y.x > b.x) ? { needsFlipping: !0 } : null;
            }
            function nt(B, y, b, R, j, G, ie, fe, xe, Te, ze) {
              const Ve = b / 24, ut = y.lineOffsetX * Ve, gt = y.lineOffsetY * Ve;
              let wt;
              if (y.numGlyphs > 1) {
                const Et = y.glyphStartIndex + y.numGlyphs, zt = y.lineStartIndex, It = y.lineStartIndex + y.lineLength, jt = St(Ve, fe, ut, gt, R, y, ze, B);
                if (!jt) return { notEnoughRoom: !0 };
                const Lt = Wt(jt.first.point, ie, B.getElevation).point, Zt = Wt(jt.last.point, ie, B.getElevation).point;
                if (j && !R) {
                  const Qt = Je(y.writingMode, Lt, Zt, Te);
                  if (Qt) return Qt;
                }
                wt = [jt.first];
                for (let Qt = y.glyphStartIndex + 1; Qt < Et - 1; Qt++) wt.push(At(Ve * fe.getoffsetX(Qt), ut, gt, R, y.segment, zt, It, B, ze));
                wt.push(jt.last);
              } else {
                if (j && !R) {
                  const zt = Wt(B.tileAnchorPoint, G, B.getElevation).point, It = y.lineStartIndex + y.segment + 1, jt = new i.P(B.lineVertexArray.getx(It), B.lineVertexArray.gety(It)), Lt = Wt(jt, G, B.getElevation), Zt = Lt.signedDistanceFromCamera > 0 ? Lt.point : function(Xt, yn, Sn, Un, Vn, Yn) {
                    return ot(Xt, yn, Sn, Un, Vn, Yn);
                  }(B.tileAnchorPoint, jt, zt, 1, G, B), Qt = Je(y.writingMode, zt, Zt, Te);
                  if (Qt) return Qt;
                }
                const Et = At(Ve * fe.getoffsetX(y.glyphStartIndex), ut, gt, R, y.segment, y.lineStartIndex, y.lineStartIndex + y.lineLength, B, ze);
                if (!Et || B.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
                wt = [Et];
              }
              for (const Et of wt) i.ak(xe, Et.point, Et.angle);
              return {};
            }
            function ot(B, y, b, R, j, G) {
              const ie = B.add(B.sub(y)._unit()), fe = j !== void 0 ? Wt(ie, j, G.getElevation).point : Fe(ie.x, ie.y, G).point, xe = b.sub(fe);
              return b.add(xe._mult(R / xe.mag()));
            }
            function Ye(B, y, b) {
              const R = y.projectionCache;
              if (R.projections[B]) return R.projections[B];
              const j = new i.P(y.lineVertexArray.getx(B), y.lineVertexArray.gety(B)), G = Fe(j.x, j.y, y);
              if (G.signedDistanceFromCamera > 0) return R.projections[B] = G.point, R.anyProjectionOccluded = R.anyProjectionOccluded || G.isOccluded, G.point;
              const ie = B - b.direction, fe = b.distanceFromAnchor === 0 ? y.tileAnchorPoint : new i.P(y.lineVertexArray.getx(ie), y.lineVertexArray.gety(ie)), xe = b.absOffsetX - b.distanceFromAnchor + 1;
              return function(Te, ze, Ve, ut, gt) {
                return ot(Te, ze, Ve, ut, void 0, gt);
              }(fe, j, b.previousVertex, xe, y);
            }
            function Fe(B, y, b) {
              const R = B + b.translation[0], j = y + b.translation[1];
              let G;
              return !b.pitchWithMap && b.projection.useSpecialProjectionForSymbols ? (G = b.projection.projectTileCoordinates(R, j, b.unwrappedTileID, b.getElevation), G.point.x = (0.5 * G.point.x + 0.5) * b.width, G.point.y = (0.5 * -G.point.y + 0.5) * b.height) : (G = Wt(new i.P(R, j), b.labelPlaneMatrix, b.getElevation), G.isOccluded = !1), G;
            }
            function pt(B, y, b) {
              return B._unit()._perp()._mult(y * b);
            }
            function Mt(B, y, b, R, j, G, ie, fe, xe) {
              if (fe.projectionCache.offsets[B]) return fe.projectionCache.offsets[B];
              const Te = b.add(y);
              if (B + xe.direction < R || B + xe.direction >= j) return fe.projectionCache.offsets[B] = Te, Te;
              const ze = Ye(B + xe.direction, fe, xe), Ve = pt(ze.sub(b), ie, xe.direction), ut = b.add(Ve), gt = ze.add(Ve);
              return fe.projectionCache.offsets[B] = i.al(G, Te, ut, gt) || Te, fe.projectionCache.offsets[B];
            }
            function At(B, y, b, R, j, G, ie, fe, xe) {
              const Te = R ? B - y : B + y;
              let ze = Te > 0 ? 1 : -1, Ve = 0;
              R && (ze *= -1, Ve = Math.PI), ze < 0 && (Ve += Math.PI);
              let ut, gt = ze > 0 ? G + j : G + j + 1;
              fe.projectionCache.cachedAnchorPoint ? ut = fe.projectionCache.cachedAnchorPoint : (ut = Fe(fe.tileAnchorPoint.x, fe.tileAnchorPoint.y, fe).point, fe.projectionCache.cachedAnchorPoint = ut);
              let wt, Et, zt = ut, It = ut, jt = 0, Lt = 0;
              const Zt = Math.abs(Te), Qt = [];
              let Xt;
              for (; jt + Lt <= Zt; ) {
                if (gt += ze, gt < G || gt >= ie) return null;
                jt += Lt, It = zt, Et = wt;
                const Vn = { absOffsetX: Zt, direction: ze, distanceFromAnchor: jt, previousVertex: It };
                if (zt = Ye(gt, fe, Vn), b === 0) Qt.push(It), Xt = zt.sub(It);
                else {
                  let Yn;
                  const er = zt.sub(It);
                  Yn = er.mag() === 0 ? pt(Ye(gt + ze, fe, Vn).sub(zt), b, ze) : pt(er, b, ze), Et || (Et = It.add(Yn)), wt = Mt(gt, Yn, zt, G, ie, Et, b, fe, Vn), Qt.push(Et), Xt = wt.sub(Et);
                }
                Lt = Xt.mag();
              }
              const yn = (Zt - jt) / Lt, Sn = Xt._mult(yn)._add(Et || It), Un = Ve + Math.atan2(zt.y - It.y, zt.x - It.x);
              return Qt.push(Sn), { point: Sn, angle: xe ? Un : 0, path: Qt };
            }
            const Rt = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
            function Ft(B, y) {
              for (let b = 0; b < B; b++) {
                const R = y.length;
                y.resize(R + 4), y.float32.set(Rt, 3 * R);
              }
            }
            const lt = 100;
            class st {
              constructor(y, b, R = new Dt(y.width + 200, y.height + 200, 25), j = new Dt(y.width + 200, y.height + 200, 25)) {
                this.transform = y, this.mapProjection = b, this.grid = R, this.ignoredGrid = j, this.pitchFactor = Math.cos(y._pitch) * y.cameraToCenterDistance, this.screenRightBoundary = y.width + lt, this.screenBottomBoundary = y.height + lt, this.gridRightBoundary = y.width + 200, this.gridBottomBoundary = y.height + 200, this.perspectiveRatioCutoff = 0.6;
              }
              placeCollisionBox(y, b, R, j, G, ie, fe, xe, Te, ze, Ve) {
                const ut = y.anchorPointX + xe[0], gt = y.anchorPointY + xe[1], wt = this.projectAndGetPerspectiveRatio(j, ut, gt, G, ze), Et = this._projectCollisionBox(y, R, j, G, ie, fe, xe, wt, ze, Ve), [zt, It, jt, Lt] = Et.box;
                return this.mapProjection.useSpecialProjectionForSymbols && (ie ? Et.allPointsOccluded : this.mapProjection.isOccluded(ut, gt, G)) || wt.perspectiveRatio < this.perspectiveRatioCutoff || !this.isInsideGrid(zt, It, jt, Lt) || b !== "always" && this.grid.hitTest(zt, It, jt, Lt, b, Te) ? { box: [zt, It, jt, Lt], placeable: !1, offscreen: !1 } : { box: [zt, It, jt, Lt], placeable: !0, offscreen: this.isOffscreen(zt, It, jt, Lt) };
              }
              placeCollisionCircles(y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt, Et, zt) {
                const It = [], jt = new i.P(b.anchorX, b.anchorY), Lt = this.getPerspectiveRatio(ie, jt.x, jt.y, fe, zt), Zt = (Ve ? G / Lt : G * Lt) / i.aq, Qt = b.lineOffsetX * Zt, Xt = b.lineOffsetY * Zt, yn = { getElevation: zt, labelPlaneMatrix: xe, lineVertexArray: R, pitchWithMap: Ve, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: jt, unwrappedTileID: fe, width: this.transform.width, height: this.transform.height, translation: Et }, Sn = St(Zt, j, Qt, Xt, !1, b, !1, yn);
                let Un = !1, Vn = !1, Yn = !0;
                if (Sn) {
                  const er = 0.5 * gt * Lt + wt, kr = new i.P(-100, -100), or = new i.P(this.screenRightBoundary, this.screenBottomBoundary), Mr = new _t(), fr = Sn.first, Or = Sn.last;
                  let br = [];
                  for (let Rr = fr.path.length - 1; Rr >= 1; Rr--) br.push(fr.path[Rr]);
                  for (let Rr = 1; Rr < Or.path.length; Rr++) br.push(Or.path[Rr]);
                  const Nr = 2.5 * er;
                  if (Te) {
                    const Rr = this.projectPathToScreenSpace(br, yn, Te);
                    br = Rr.some((ei) => ei.signedDistanceFromCamera <= 0) ? [] : Rr.map((ei) => ei.point);
                  }
                  let ii = [];
                  if (br.length > 0) {
                    const Rr = br[0].clone(), ei = br[0].clone();
                    for (let pi = 1; pi < br.length; pi++) Rr.x = Math.min(Rr.x, br[pi].x), Rr.y = Math.min(Rr.y, br[pi].y), ei.x = Math.max(ei.x, br[pi].x), ei.y = Math.max(ei.y, br[pi].y);
                    ii = Rr.x >= kr.x && ei.x <= or.x && Rr.y >= kr.y && ei.y <= or.y ? [br] : ei.x < kr.x || Rr.x > or.x || ei.y < kr.y || Rr.y > or.y ? [] : i.am([br], kr.x, kr.y, or.x, or.y);
                  }
                  for (const Rr of ii) {
                    Mr.reset(Rr, 0.25 * er);
                    let ei = 0;
                    ei = Mr.length <= 0.5 * er ? 1 : Math.ceil(Mr.paddedLength / Nr) + 1;
                    for (let pi = 0; pi < ei; pi++) {
                      const qi = pi / Math.max(ei - 1, 1), Li = Mr.lerp(qi), Yi = Li.x + lt, Gi = Li.y + lt;
                      It.push(Yi, Gi, er, 0);
                      const ra = Yi - er, wa = Gi - er, uo = Yi + er, no = Gi + er;
                      if (Yn = Yn && this.isOffscreen(ra, wa, uo, no), Vn = Vn || this.isInsideGrid(ra, wa, uo, no), y !== "always" && this.grid.hitTestCircle(Yi, Gi, er, y, ut) && (Un = !0, !ze)) return { circles: [], offscreen: !1, collisionDetected: Un };
                    }
                  }
                }
                return { circles: !ze && Un || !Vn || Lt < this.perspectiveRatioCutoff ? [] : It, offscreen: Yn, collisionDetected: Un };
              }
              projectPathToScreenSpace(y, b, R) {
                return y.map((j) => Wt(j, R, b.getElevation));
              }
              queryRenderedSymbols(y) {
                if (y.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
                const b = [];
                let R = 1 / 0, j = 1 / 0, G = -1 / 0, ie = -1 / 0;
                for (const ze of y) {
                  const Ve = new i.P(ze.x + lt, ze.y + lt);
                  R = Math.min(R, Ve.x), j = Math.min(j, Ve.y), G = Math.max(G, Ve.x), ie = Math.max(ie, Ve.y), b.push(Ve);
                }
                const fe = this.grid.query(R, j, G, ie).concat(this.ignoredGrid.query(R, j, G, ie)), xe = {}, Te = {};
                for (const ze of fe) {
                  const Ve = ze.key;
                  if (xe[Ve.bucketInstanceId] === void 0 && (xe[Ve.bucketInstanceId] = {}), xe[Ve.bucketInstanceId][Ve.featureIndex]) continue;
                  const ut = [new i.P(ze.x1, ze.y1), new i.P(ze.x2, ze.y1), new i.P(ze.x2, ze.y2), new i.P(ze.x1, ze.y2)];
                  i.an(b, ut) && (xe[Ve.bucketInstanceId][Ve.featureIndex] = !0, Te[Ve.bucketInstanceId] === void 0 && (Te[Ve.bucketInstanceId] = []), Te[Ve.bucketInstanceId].push(Ve.featureIndex));
                }
                return Te;
              }
              insertCollisionBox(y, b, R, j, G, ie) {
                const fe = { bucketInstanceId: j, featureIndex: G, collisionGroupID: ie, overlapMode: b };
                (R ? this.ignoredGrid : this.grid).insert(fe, y[0], y[1], y[2], y[3]);
              }
              insertCollisionCircles(y, b, R, j, G, ie) {
                const fe = R ? this.ignoredGrid : this.grid, xe = { bucketInstanceId: j, featureIndex: G, collisionGroupID: ie, overlapMode: b };
                for (let Te = 0; Te < y.length; Te += 4) fe.insertCircle(xe, y[Te], y[Te + 1], y[Te + 2]);
              }
              projectAndGetPerspectiveRatio(y, b, R, j, G) {
                const ie = this.mapProjection.useSpecialProjectionForSymbols ? this.mapProjection.projectTileCoordinates(b, R, j, G) : Wt(new i.P(b, R), y, G);
                return { point: new i.P((ie.point.x + 1) / 2 * this.transform.width + lt, (1 - ie.point.y) / 2 * this.transform.height + lt), perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / ie.signedDistanceFromCamera * 0.5, isOccluded: ie.isOccluded, signedDistanceFromCamera: ie.signedDistanceFromCamera };
              }
              getPerspectiveRatio(y, b, R, j, G) {
                const ie = this.mapProjection.useSpecialProjectionForSymbols ? this.mapProjection.projectTileCoordinates(b, R, j, G) : Wt(new i.P(b, R), y, G);
                return 0.5 + this.transform.cameraToCenterDistance / ie.signedDistanceFromCamera * 0.5;
              }
              isOffscreen(y, b, R, j) {
                return R < lt || y >= this.screenRightBoundary || j < lt || b > this.screenBottomBoundary;
              }
              isInsideGrid(y, b, R, j) {
                return R >= 0 && y < this.gridRightBoundary && j >= 0 && b < this.gridBottomBoundary;
              }
              getViewportMatrix() {
                const y = i.ao([]);
                return i.J(y, y, [-100, -100, 0]), y;
              }
              _projectCollisionBox(y, b, R, j, G, ie, fe, xe, Te, ze) {
                const Ve = b * xe.perspectiveRatio;
                let ut = new i.P(1, 0), gt = new i.P(0, 1);
                const wt = new i.P(y.anchorPointX + fe[0], y.anchorPointY + fe[1]);
                if (ie && !G) {
                  const Vn = this.projectAndGetPerspectiveRatio(R, wt.x + 1, wt.y, j, Te).point.sub(xe.point).unit(), Yn = Math.atan(Vn.y / Vn.x) + (Vn.x < 0 ? Math.PI : 0), er = Math.sin(Yn), kr = Math.cos(Yn);
                  ut = new i.P(kr, er), gt = new i.P(-er, kr);
                } else if (!ie && G) {
                  const Vn = -this.transform.angle, Yn = Math.sin(Vn), er = Math.cos(Vn);
                  ut = new i.P(er, Yn), gt = new i.P(-Yn, er);
                }
                let Et = xe.point, zt = Ve;
                if (G) {
                  Et = wt;
                  const Vn = this.transform.zoom - Math.floor(this.transform.zoom);
                  if (zt = Math.pow(2, -Vn), zt *= this.mapProjection.getPitchedTextCorrection(this.transform, wt, j), !ze) {
                    const Yn = xe.signedDistanceFromCamera / this.transform.cameraToCenterDistance;
                    zt *= i.ad(0.5 + 0.5 * Yn, 0, 4);
                  }
                }
                ze && (Et = Et.add(ut.mult(ze.x * zt)).add(gt.mult(ze.y * zt)));
                const It = y.x1 * zt, jt = y.x2 * zt, Lt = (It + jt) / 2, Zt = y.y1 * zt, Qt = y.y2 * zt, Xt = (Zt + Qt) / 2, yn = [{ offsetX: It, offsetY: Zt }, { offsetX: Lt, offsetY: Zt }, { offsetX: jt, offsetY: Zt }, { offsetX: jt, offsetY: Xt }, { offsetX: jt, offsetY: Qt }, { offsetX: Lt, offsetY: Qt }, { offsetX: It, offsetY: Qt }, { offsetX: It, offsetY: Xt }];
                let Sn = [];
                for (const { offsetX: Vn, offsetY: Yn } of yn) Sn.push(new i.P(Et.x + ut.x * Vn + gt.x * Yn, Et.y + ut.y * Vn + gt.y * Yn));
                let Un = !1;
                if (G) {
                  const Vn = Sn.map((Yn) => this.projectAndGetPerspectiveRatio(R, Yn.x, Yn.y, j, Te));
                  Un = Vn.some((Yn) => !Yn.isOccluded), Sn = Vn.map((Yn) => Yn.point);
                } else Un = !0;
                return { box: i.ap(Sn), allPointsOccluded: !Un };
              }
            }
            function Ot(B, y, b) {
              return y * (i.X / (B.tileSize * Math.pow(2, b - B.tileID.overscaledZ)));
            }
            class kt {
              constructor(y, b, R, j) {
                this.opacity = y ? Math.max(0, Math.min(1, y.opacity + (y.placed ? b : -b))) : j && R ? 1 : 0, this.placed = R;
              }
              isHidden() {
                return this.opacity === 0 && !this.placed;
              }
            }
            class Bt {
              constructor(y, b, R, j, G) {
                this.text = new kt(y ? y.text : null, b, R, G), this.icon = new kt(y ? y.icon : null, b, j, G);
              }
              isHidden() {
                return this.text.isHidden() && this.icon.isHidden();
              }
            }
            class xt {
              constructor(y, b, R) {
                this.text = y, this.icon = b, this.skipFade = R;
              }
            }
            class Jt {
              constructor() {
                this.invProjMatrix = i.H(), this.viewportMatrix = i.H(), this.circles = [];
              }
            }
            class qt {
              constructor(y, b, R, j, G) {
                this.bucketInstanceId = y, this.featureIndex = b, this.sourceLayerIndex = R, this.bucketIndex = j, this.tileID = G;
              }
            }
            class en {
              constructor(y) {
                this.crossSourceCollisions = y, this.maxGroupID = 0, this.collisionGroups = {};
              }
              get(y) {
                if (this.crossSourceCollisions) return { ID: 0, predicate: null };
                if (!this.collisionGroups[y]) {
                  const b = ++this.maxGroupID;
                  this.collisionGroups[y] = { ID: b, predicate: (R) => R.collisionGroupID === b };
                }
                return this.collisionGroups[y];
              }
            }
            function Yt(B, y, b, R, j) {
              const { horizontalAlign: G, verticalAlign: ie } = i.av(B), fe = -(G - 0.5) * y, xe = -(ie - 0.5) * b;
              return new i.P(fe + R[0] * j, xe + R[1] * j);
            }
            class Ht {
              constructor(y, b, R, j, G, ie) {
                this.transform = y.clone(), this.terrain = R, this.collisionIndex = new st(this.transform, b), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = j, this.retainedQueryData = {}, this.collisionGroups = new en(G), this.collisionCircleArrays = {}, this.collisionBoxArrays = /* @__PURE__ */ new Map(), this.prevPlacement = ie, ie && (ie.prevPlacement = void 0), this.placedOrientations = {};
              }
              _getTerrainElevationFunc(y) {
                const b = this.terrain;
                return b ? (R, j) => b.getElevation(y, R, j) : null;
              }
              getBucketParts(y, b, R, j) {
                const G = R.getBucket(b), ie = R.latestFeatureIndex;
                if (!G || !ie || b.id !== G.layerIds[0]) return;
                const fe = R.collisionBoxArray, xe = G.layers[0].layout, Te = G.layers[0].paint, ze = Math.pow(2, this.transform.zoom - R.tileID.overscaledZ), Ve = R.tileSize / i.X, ut = R.tileID.toUnwrapped(), gt = this.transform.calculatePosMatrix(ut), wt = xe.get("text-pitch-alignment") === "map", Et = xe.get("text-rotation-alignment") === "map", zt = Ot(R, 1, this.transform.zoom), It = this.collisionIndex.mapProjection.translatePosition(this.transform, R, Te.get("text-translate"), Te.get("text-translate-anchor")), jt = this.collisionIndex.mapProjection.translatePosition(this.transform, R, Te.get("icon-translate"), Te.get("icon-translate-anchor")), Lt = $t(gt, wt, Et, this.transform, zt);
                let Zt = null;
                if (wt) {
                  const Xt = Gt(gt, wt, Et, this.transform, zt);
                  Zt = i.L([], this.transform.labelPlaneMatrix, Xt);
                }
                this.retainedQueryData[G.bucketInstanceId] = new qt(G.bucketInstanceId, ie, G.sourceLayerIndex, G.index, R.tileID);
                const Qt = { bucket: G, layout: xe, translationText: It, translationIcon: jt, posMatrix: gt, unwrappedTileID: ut, textLabelPlaneMatrix: Lt, labelToScreenMatrix: Zt, scale: ze, textPixelRatio: Ve, holdingForFade: R.holdingForFade(), collisionBoxArray: fe, partiallyEvaluatedTextSize: i.ah(G.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(G.sourceID) };
                if (j) for (const Xt of G.sortKeyRanges) {
                  const { sortKey: yn, symbolInstanceStart: Sn, symbolInstanceEnd: Un } = Xt;
                  y.push({ sortKey: yn, symbolInstanceStart: Sn, symbolInstanceEnd: Un, parameters: Qt });
                }
                else y.push({ symbolInstanceStart: 0, symbolInstanceEnd: G.symbolInstances.length, parameters: Qt });
              }
              attemptAnchorPlacement(y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt, Et, zt, It, jt, Lt) {
                const Zt = i.ar[y.textAnchor], Qt = [y.textOffset0, y.textOffset1], Xt = Yt(Zt, R, j, Qt, G), yn = this.collisionIndex.placeCollisionBox(b, ut, xe, Te, ze, fe, ie, zt, Ve.predicate, Lt, Xt);
                if ((!jt || this.collisionIndex.placeCollisionBox(jt, ut, xe, Te, ze, fe, ie, It, Ve.predicate, Lt, Xt).placeable) && yn.placeable) {
                  let Sn;
                  if (this.prevPlacement && this.prevPlacement.variableOffsets[gt.crossTileID] && this.prevPlacement.placements[gt.crossTileID] && this.prevPlacement.placements[gt.crossTileID].text && (Sn = this.prevPlacement.variableOffsets[gt.crossTileID].anchor), gt.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
                  return this.variableOffsets[gt.crossTileID] = { textOffset: Qt, width: R, height: j, anchor: Zt, textBoxScale: G, prevAnchor: Sn }, this.markUsedJustification(wt, Zt, gt, Et), wt.allowVerticalPlacement && (this.markUsedOrientation(wt, Et, gt), this.placedOrientations[gt.crossTileID] = Et), { shift: Xt, placedGlyphBoxes: yn };
                }
              }
              placeLayerBucketPart(y, b, R) {
                const { bucket: j, layout: G, translationText: ie, translationIcon: fe, posMatrix: xe, unwrappedTileID: Te, textLabelPlaneMatrix: ze, labelToScreenMatrix: Ve, textPixelRatio: ut, holdingForFade: gt, collisionBoxArray: wt, partiallyEvaluatedTextSize: Et, collisionGroup: zt } = y.parameters, It = G.get("text-optional"), jt = G.get("icon-optional"), Lt = i.as(G, "text-overlap", "text-allow-overlap"), Zt = Lt === "always", Qt = i.as(G, "icon-overlap", "icon-allow-overlap"), Xt = Qt === "always", yn = G.get("text-rotation-alignment") === "map", Sn = G.get("text-pitch-alignment") === "map", Un = G.get("icon-text-fit") !== "none", Vn = G.get("symbol-z-order") === "viewport-y", Yn = Zt && (Xt || !j.hasIconData() || jt), er = Xt && (Zt || !j.hasTextData() || It);
                !j.collisionArrays && wt && j.deserializeCollisionBoxes(wt);
                const kr = this.retainedQueryData[j.bucketInstanceId].tileID, or = this._getTerrainElevationFunc(kr), Mr = (fr, Or, br) => {
                  var Nr, ii;
                  if (b[fr.crossTileID]) return;
                  if (gt) return void (this.placements[fr.crossTileID] = new xt(!1, !1, !1));
                  let Rr = !1, ei = !1, pi = !0, qi = null, Li = { box: null, placeable: !1, offscreen: null }, Yi = { box: null, placeable: !1, offscreen: null }, Gi = null, ra = null, wa = null, uo = 0, no = 0, Ko = 0;
                  Or.textFeatureIndex ? uo = Or.textFeatureIndex : fr.useRuntimeCollisionCircles && (uo = fr.featureIndex), Or.verticalTextFeatureIndex && (no = Or.verticalTextFeatureIndex);
                  const Ia = Or.textBox;
                  if (Ia) {
                    const Da = (xo) => {
                      let Hi = i.ai.horizontal;
                      if (j.allowVerticalPlacement && !xo && this.prevPlacement) {
                        const As = this.prevPlacement.placedOrientations[fr.crossTileID];
                        As && (this.placedOrientations[fr.crossTileID] = As, Hi = As, this.markUsedOrientation(j, Hi, fr));
                      }
                      return Hi;
                    }, Ua = (xo, Hi) => {
                      if (j.allowVerticalPlacement && fr.numVerticalGlyphVertices > 0 && Or.verticalTextBox) {
                        for (const As of j.writingModes) if (As === i.ai.vertical ? (Li = Hi(), Yi = Li) : Li = xo(), Li && Li.placeable) break;
                      } else Li = xo();
                    }, pa = fr.textAnchorOffsetStartIndex, lu = fr.textAnchorOffsetEndIndex;
                    if (lu === pa) {
                      const xo = (Hi, As) => {
                        const $o = this.collisionIndex.placeCollisionBox(Hi, Lt, ut, xe, Te, Sn, yn, ie, zt.predicate, or);
                        return $o && $o.placeable && (this.markUsedOrientation(j, As, fr), this.placedOrientations[fr.crossTileID] = As), $o;
                      };
                      Ua(() => xo(Ia, i.ai.horizontal), () => {
                        const Hi = Or.verticalTextBox;
                        return j.allowVerticalPlacement && fr.numVerticalGlyphVertices > 0 && Hi ? xo(Hi, i.ai.vertical) : { box: null, offscreen: null };
                      }), Da(Li && Li.placeable);
                    } else {
                      let xo = i.ar[(ii = (Nr = this.prevPlacement) === null || Nr === void 0 ? void 0 : Nr.variableOffsets[fr.crossTileID]) === null || ii === void 0 ? void 0 : ii.anchor];
                      const Hi = ($o, Nl, io) => {
                        const uu = $o.x2 - $o.x1, Jo = $o.y2 - $o.y1, gh = fr.textBoxScale, a1 = Un && Qt === "never" ? Nl : null;
                        let yf = null, Ud = Lt === "never" ? 1 : 2, fc = "never";
                        xo && Ud++;
                        for (let Vd = 0; Vd < Ud; Vd++) {
                          for (let $f = pa; $f < lu; $f++) {
                            const zp = j.textAnchorOffsets.get($f);
                            if (xo && zp.textAnchor !== xo) continue;
                            const Rp = this.attemptAnchorPlacement(zp, $o, uu, Jo, gh, yn, Sn, ut, xe, Te, zt, fc, fr, j, io, ie, fe, a1, or);
                            if (Rp && (yf = Rp.placedGlyphBoxes, yf && yf.placeable)) return Rr = !0, qi = Rp.shift, yf;
                          }
                          xo ? xo = null : fc = Lt;
                        }
                        return R && !yf && (yf = { box: this.collisionIndex.placeCollisionBox(Ia, "always", ut, xe, Te, Sn, yn, ie, zt.predicate, or, new i.P(0, 0)).box, offscreen: !1, placeable: !1 }), yf;
                      };
                      Ua(() => Hi(Ia, Or.iconBox, i.ai.horizontal), () => {
                        const $o = Or.verticalTextBox, Nl = Li && Li.placeable;
                        return j.allowVerticalPlacement && !Nl && fr.numVerticalGlyphVertices > 0 && $o ? Hi($o, Or.verticalIconBox, i.ai.vertical) : { box: null, occluded: !0, offscreen: null };
                      }), Li && (Rr = Li.placeable, pi = Li.offscreen);
                      const As = Da(Li && Li.placeable);
                      if (!Rr && this.prevPlacement) {
                        const $o = this.prevPlacement.variableOffsets[fr.crossTileID];
                        $o && (this.variableOffsets[fr.crossTileID] = $o, this.markUsedJustification(j, $o.anchor, fr, As));
                      }
                    }
                  }
                  if (Gi = Li, Rr = Gi && Gi.placeable, pi = Gi && Gi.offscreen, fr.useRuntimeCollisionCircles) {
                    const Da = j.text.placedSymbolArray.get(fr.centerJustifiedTextSymbolIndex), Ua = i.aj(j.textSizeData, Et, Da), pa = G.get("text-padding"), lu = fr.collisionCircleDiameter;
                    ra = this.collisionIndex.placeCollisionCircles(Lt, Da, j.lineVertexArray, j.glyphOffsetArray, Ua, xe, Te, ze, Ve, R, Sn, zt.predicate, lu, pa, ie, or), ra.circles.length && ra.collisionDetected && !R && i.w("Collisions detected, but collision boxes are not shown"), Rr = Zt || ra.circles.length > 0 && !ra.collisionDetected, pi = pi && ra.offscreen;
                  }
                  if (Or.iconFeatureIndex && (Ko = Or.iconFeatureIndex), Or.iconBox) {
                    const Da = (Ua) => this.collisionIndex.placeCollisionBox(Ua, Qt, ut, xe, Te, Sn, yn, fe, zt.predicate, or, Un && qi ? qi : void 0);
                    Yi && Yi.placeable && Or.verticalIconBox ? (wa = Da(Or.verticalIconBox), ei = wa.placeable) : (wa = Da(Or.iconBox), ei = wa.placeable), pi = pi && wa.offscreen;
                  }
                  const ca = It || fr.numHorizontalGlyphVertices === 0 && fr.numVerticalGlyphVertices === 0, Ga = jt || fr.numIconVertices === 0;
                  ca || Ga ? Ga ? ca || (ei = ei && Rr) : Rr = ei && Rr : ei = Rr = ei && Rr;
                  const Oa = Rr && Gi.placeable, ba = ei && wa.placeable;
                  if (Oa && (Yi && Yi.placeable && no ? this.collisionIndex.insertCollisionBox(Gi.box, Lt, G.get("text-ignore-placement"), j.bucketInstanceId, no, zt.ID) : this.collisionIndex.insertCollisionBox(Gi.box, Lt, G.get("text-ignore-placement"), j.bucketInstanceId, uo, zt.ID)), ba && this.collisionIndex.insertCollisionBox(wa.box, Qt, G.get("icon-ignore-placement"), j.bucketInstanceId, Ko, zt.ID), ra && Rr && this.collisionIndex.insertCollisionCircles(ra.circles, Lt, G.get("text-ignore-placement"), j.bucketInstanceId, uo, zt.ID), R && this.storeCollisionData(j.bucketInstanceId, br, Or, Gi, wa, ra), fr.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
                  if (j.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
                  this.placements[fr.crossTileID] = new xt(Rr || Yn, ei || er, pi || j.justReloaded), b[fr.crossTileID] = !0;
                };
                if (Vn) {
                  if (y.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
                  const fr = j.getSortedSymbolIndexes(this.transform.angle);
                  for (let Or = fr.length - 1; Or >= 0; --Or) {
                    const br = fr[Or];
                    Mr(j.symbolInstances.get(br), j.collisionArrays[br], br);
                  }
                } else for (let fr = y.symbolInstanceStart; fr < y.symbolInstanceEnd; fr++) Mr(j.symbolInstances.get(fr), j.collisionArrays[fr], fr);
                if (R && j.bucketInstanceId in this.collisionCircleArrays) {
                  const fr = this.collisionCircleArrays[j.bucketInstanceId];
                  i.at(fr.invProjMatrix, xe), fr.viewportMatrix = this.collisionIndex.getViewportMatrix();
                }
                j.justReloaded = !1;
              }
              storeCollisionData(y, b, R, j, G, ie) {
                if (R.textBox || R.iconBox) {
                  let fe, xe;
                  this.collisionBoxArrays.has(y) ? fe = this.collisionBoxArrays.get(y) : (fe = /* @__PURE__ */ new Map(), this.collisionBoxArrays.set(y, fe)), fe.has(b) ? xe = fe.get(b) : (xe = { text: null, icon: null }, fe.set(b, xe)), R.textBox && (xe.text = j.box), R.iconBox && (xe.icon = G.box);
                }
                if (ie) {
                  let fe = this.collisionCircleArrays[y];
                  fe === void 0 && (fe = this.collisionCircleArrays[y] = new Jt());
                  for (let xe = 0; xe < ie.circles.length; xe += 4) fe.circles.push(ie.circles[xe + 0]), fe.circles.push(ie.circles[xe + 1]), fe.circles.push(ie.circles[xe + 2]), fe.circles.push(ie.collisionDetected ? 1 : 0);
                }
              }
              markUsedJustification(y, b, R, j) {
                const G = { left: R.leftJustifiedTextSymbolIndex, center: R.centerJustifiedTextSymbolIndex, right: R.rightJustifiedTextSymbolIndex };
                let ie;
                ie = j === i.ai.vertical ? R.verticalPlacedTextSymbolIndex : G[i.au(b)];
                const fe = [R.leftJustifiedTextSymbolIndex, R.centerJustifiedTextSymbolIndex, R.rightJustifiedTextSymbolIndex, R.verticalPlacedTextSymbolIndex];
                for (const xe of fe) xe >= 0 && (y.text.placedSymbolArray.get(xe).crossTileID = ie >= 0 && xe !== ie ? 0 : R.crossTileID);
              }
              markUsedOrientation(y, b, R) {
                const j = b === i.ai.horizontal || b === i.ai.horizontalOnly ? b : 0, G = b === i.ai.vertical ? b : 0, ie = [R.leftJustifiedTextSymbolIndex, R.centerJustifiedTextSymbolIndex, R.rightJustifiedTextSymbolIndex];
                for (const fe of ie) y.text.placedSymbolArray.get(fe).placedOrientation = j;
                R.verticalPlacedTextSymbolIndex && (y.text.placedSymbolArray.get(R.verticalPlacedTextSymbolIndex).placedOrientation = G);
              }
              commit(y) {
                this.commitTime = y, this.zoomAtLastRecencyCheck = this.transform.zoom;
                const b = this.prevPlacement;
                let R = !1;
                this.prevZoomAdjustment = b ? b.zoomAdjustment(this.transform.zoom) : 0;
                const j = b ? b.symbolFadeChange(y) : 1, G = b ? b.opacities : {}, ie = b ? b.variableOffsets : {}, fe = b ? b.placedOrientations : {};
                for (const xe in this.placements) {
                  const Te = this.placements[xe], ze = G[xe];
                  ze ? (this.opacities[xe] = new Bt(ze, j, Te.text, Te.icon), R = R || Te.text !== ze.text.placed || Te.icon !== ze.icon.placed) : (this.opacities[xe] = new Bt(null, j, Te.text, Te.icon, Te.skipFade), R = R || Te.text || Te.icon);
                }
                for (const xe in G) {
                  const Te = G[xe];
                  if (!this.opacities[xe]) {
                    const ze = new Bt(Te, j, !1, !1);
                    ze.isHidden() || (this.opacities[xe] = ze, R = R || Te.text.placed || Te.icon.placed);
                  }
                }
                for (const xe in ie) this.variableOffsets[xe] || !this.opacities[xe] || this.opacities[xe].isHidden() || (this.variableOffsets[xe] = ie[xe]);
                for (const xe in fe) this.placedOrientations[xe] || !this.opacities[xe] || this.opacities[xe].isHidden() || (this.placedOrientations[xe] = fe[xe]);
                if (b && b.lastPlacementChangeTime === void 0) throw new Error("Last placement time for previous placement is not defined");
                R ? this.lastPlacementChangeTime = y : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = b ? b.lastPlacementChangeTime : y);
              }
              updateLayerOpacities(y, b) {
                const R = {};
                for (const j of b) {
                  const G = j.getBucket(y);
                  G && j.latestFeatureIndex && y.id === G.layerIds[0] && this.updateBucketOpacities(G, j.tileID, R, j.collisionBoxArray);
                }
              }
              updateBucketOpacities(y, b, R, j) {
                y.hasTextData() && (y.text.opacityVertexArray.clear(), y.text.hasVisibleVertices = !1), y.hasIconData() && (y.icon.opacityVertexArray.clear(), y.icon.hasVisibleVertices = !1), y.hasIconCollisionBoxData() && y.iconCollisionBox.collisionVertexArray.clear(), y.hasTextCollisionBoxData() && y.textCollisionBox.collisionVertexArray.clear();
                const G = y.layers[0], ie = G.layout, fe = new Bt(null, 0, !1, !1, !0), xe = ie.get("text-allow-overlap"), Te = ie.get("icon-allow-overlap"), ze = G._unevaluatedLayout.hasValue("text-variable-anchor") || G._unevaluatedLayout.hasValue("text-variable-anchor-offset"), Ve = ie.get("text-rotation-alignment") === "map", ut = ie.get("text-pitch-alignment") === "map", gt = ie.get("icon-text-fit") !== "none", wt = new Bt(null, 0, xe && (Te || !y.hasIconData() || ie.get("icon-optional")), Te && (xe || !y.hasTextData() || ie.get("text-optional")), !0);
                !y.collisionArrays && j && (y.hasIconCollisionBoxData() || y.hasTextCollisionBoxData()) && y.deserializeCollisionBoxes(j);
                const Et = (It, jt, Lt) => {
                  for (let Zt = 0; Zt < jt / 4; Zt++) It.opacityVertexArray.emplaceBack(Lt);
                  It.hasVisibleVertices = It.hasVisibleVertices || Lt !== wn;
                }, zt = this.collisionBoxArrays.get(y.bucketInstanceId);
                for (let It = 0; It < y.symbolInstances.length; It++) {
                  const jt = y.symbolInstances.get(It), { numHorizontalGlyphVertices: Lt, numVerticalGlyphVertices: Zt, crossTileID: Qt } = jt, Xt = R[Qt];
                  let yn = this.opacities[Qt];
                  Xt ? yn = fe : yn || (yn = wt, this.opacities[Qt] = yn), R[Qt] = !0;
                  const Sn = Lt > 0 || Zt > 0, Un = jt.numIconVertices > 0, Vn = this.placedOrientations[jt.crossTileID], Yn = Vn === i.ai.vertical, er = Vn === i.ai.horizontal || Vn === i.ai.horizontalOnly;
                  if (Sn) {
                    const or = Pn(yn.text), Mr = Yn ? wn : or;
                    Et(y.text, Lt, Mr);
                    const fr = er ? wn : or;
                    Et(y.text, Zt, fr);
                    const Or = yn.text.isHidden();
                    [jt.rightJustifiedTextSymbolIndex, jt.centerJustifiedTextSymbolIndex, jt.leftJustifiedTextSymbolIndex].forEach((ii) => {
                      ii >= 0 && (y.text.placedSymbolArray.get(ii).hidden = Or || Yn ? 1 : 0);
                    }), jt.verticalPlacedTextSymbolIndex >= 0 && (y.text.placedSymbolArray.get(jt.verticalPlacedTextSymbolIndex).hidden = Or || er ? 1 : 0);
                    const br = this.variableOffsets[jt.crossTileID];
                    br && this.markUsedJustification(y, br.anchor, jt, Vn);
                    const Nr = this.placedOrientations[jt.crossTileID];
                    Nr && (this.markUsedJustification(y, "left", jt, Nr), this.markUsedOrientation(y, Nr, jt));
                  }
                  if (Un) {
                    const or = Pn(yn.icon), Mr = !(gt && jt.verticalPlacedIconSymbolIndex && Yn);
                    if (jt.placedIconSymbolIndex >= 0) {
                      const fr = Mr ? or : wn;
                      Et(y.icon, jt.numIconVertices, fr), y.icon.placedSymbolArray.get(jt.placedIconSymbolIndex).hidden = yn.icon.isHidden();
                    }
                    if (jt.verticalPlacedIconSymbolIndex >= 0) {
                      const fr = Mr ? wn : or;
                      Et(y.icon, jt.numVerticalIconVertices, fr), y.icon.placedSymbolArray.get(jt.verticalPlacedIconSymbolIndex).hidden = yn.icon.isHidden();
                    }
                  }
                  const kr = zt && zt.has(It) ? zt.get(It) : { text: null, icon: null };
                  if (y.hasIconCollisionBoxData() || y.hasTextCollisionBoxData()) {
                    const or = y.collisionArrays[It];
                    if (or) {
                      let Mr = new i.P(0, 0);
                      if (or.textBox || or.verticalTextBox) {
                        let fr = !0;
                        if (ze) {
                          const Or = this.variableOffsets[Qt];
                          Or ? (Mr = Yt(Or.anchor, Or.width, Or.height, Or.textOffset, Or.textBoxScale), Ve && Mr._rotate(ut ? this.transform.angle : -this.transform.angle)) : fr = !1;
                        }
                        if (or.textBox || or.verticalTextBox) {
                          let Or;
                          or.textBox && (Or = Yn), or.verticalTextBox && (Or = er), sn(y.textCollisionBox.collisionVertexArray, yn.text.placed, !fr || Or, kr.text, Mr.x, Mr.y);
                        }
                      }
                      if (or.iconBox || or.verticalIconBox) {
                        const fr = !!(!er && or.verticalIconBox);
                        let Or;
                        or.iconBox && (Or = fr), or.verticalIconBox && (Or = !fr), sn(y.iconCollisionBox.collisionVertexArray, yn.icon.placed, Or, kr.icon, gt ? Mr.x : 0, gt ? Mr.y : 0);
                      }
                    }
                  }
                }
                if (y.sortFeatures(this.transform.angle), this.retainedQueryData[y.bucketInstanceId] && (this.retainedQueryData[y.bucketInstanceId].featureSortOrder = y.featureSortOrder), y.hasTextData() && y.text.opacityVertexBuffer && y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray), y.hasIconData() && y.icon.opacityVertexBuffer && y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray), y.hasIconCollisionBoxData() && y.iconCollisionBox.collisionVertexBuffer && y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray), y.hasTextCollisionBoxData() && y.textCollisionBox.collisionVertexBuffer && y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray), y.text.opacityVertexArray.length !== y.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);
                if (y.icon.opacityVertexArray.length !== y.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);
                if (y.bucketInstanceId in this.collisionCircleArrays) {
                  const It = this.collisionCircleArrays[y.bucketInstanceId];
                  y.placementInvProjMatrix = It.invProjMatrix, y.placementViewportMatrix = It.viewportMatrix, y.collisionCircleArray = It.circles, delete this.collisionCircleArrays[y.bucketInstanceId];
                }
              }
              symbolFadeChange(y) {
                return this.fadeDuration === 0 ? 1 : (y - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment;
              }
              zoomAdjustment(y) {
                return Math.max(0, (this.transform.zoom - y) / 1.5);
              }
              hasTransitions(y) {
                return this.stale || y - this.lastPlacementChangeTime < this.fadeDuration;
              }
              stillRecent(y, b) {
                const R = this.zoomAtLastRecencyCheck === b ? 1 - this.zoomAdjustment(b) : 1;
                return this.zoomAtLastRecencyCheck = b, this.commitTime + this.fadeDuration * R > y;
              }
              setStale() {
                this.stale = !0;
              }
            }
            function sn(B, y, b, R, j, G) {
              R && R.length !== 0 || (R = [0, 0, 0, 0]);
              const ie = R[0] - lt, fe = R[1] - lt, xe = R[2] - lt, Te = R[3] - lt;
              B.emplaceBack(y ? 1 : 0, b ? 1 : 0, j || 0, G || 0, ie, fe), B.emplaceBack(y ? 1 : 0, b ? 1 : 0, j || 0, G || 0, xe, fe), B.emplaceBack(y ? 1 : 0, b ? 1 : 0, j || 0, G || 0, xe, Te), B.emplaceBack(y ? 1 : 0, b ? 1 : 0, j || 0, G || 0, ie, Te);
            }
            const fn = Math.pow(2, 25), In = Math.pow(2, 24), zn = Math.pow(2, 17), Cn = Math.pow(2, 16), gn = Math.pow(2, 9), Mn = Math.pow(2, 8), Xn = Math.pow(2, 1);
            function Pn(B) {
              if (B.opacity === 0 && !B.placed) return 0;
              if (B.opacity === 1 && B.placed) return 4294967295;
              const y = B.placed ? 1 : 0, b = Math.floor(127 * B.opacity);
              return b * fn + y * In + b * zn + y * Cn + b * gn + y * Mn + b * Xn + y;
            }
            const wn = 0;
            function Rn() {
              return { isOccluded(B, y, b) {
                return !1;
              }, getPitchedTextCorrection(B, y, b) {
                return 1;
              }, get useSpecialProjectionForSymbols() {
                return !1;
              }, projectTileCoordinates(B, y, b, R) {
                throw new Error("Not implemented.");
              }, translatePosition(B, y, b, R) {
                return function(j, G, ie, fe, xe = !1) {
                  if (!ie[0] && !ie[1]) return [0, 0];
                  const Te = xe ? fe === "map" ? j.angle : 0 : fe === "viewport" ? -j.angle : 0;
                  if (Te) {
                    const ze = Math.sin(Te), Ve = Math.cos(Te);
                    ie = [ie[0] * Ve - ie[1] * ze, ie[0] * ze + ie[1] * Ve];
                  }
                  return [xe ? ie[0] : Ot(G, ie[0], j.zoom), xe ? ie[1] : Ot(G, ie[1], j.zoom)];
                }(B, y, b, R);
              }, getCircleRadiusCorrection(B) {
                return 1;
              } };
            }
            class _n {
              constructor(y) {
                this._sortAcrossTiles = y.layout.get("symbol-z-order") !== "viewport-y" && !y.layout.get("symbol-sort-key").isConstant(), this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [];
              }
              continuePlacement(y, b, R, j, G) {
                const ie = this._bucketParts;
                for (; this._currentTileIndex < y.length; ) {
                  const fe = y[this._currentTileIndex];
                  if (b.getBucketParts(ie, j, fe, this._sortAcrossTiles), this._currentTileIndex++, G()) return !0;
                }
                for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, ie.sort((fe, xe) => fe.sortKey - xe.sortKey)); this._currentPartIndex < ie.length; ) {
                  const fe = ie[this._currentPartIndex];
                  if (b.placeLayerBucketPart(fe, this._seenCrossTileIDs, R), this._currentPartIndex++, G()) return !0;
                }
                return !1;
              }
            }
            class En {
              constructor(y, b, R, j, G, ie, fe, xe) {
                this.placement = new Ht(y, Rn(), b, ie, fe, xe), this._currentPlacementIndex = R.length - 1, this._forceFullPlacement = j, this._showCollisionBoxes = G, this._done = !1;
              }
              isDone() {
                return this._done;
              }
              continuePlacement(y, b, R) {
                const j = d.now(), G = () => !this._forceFullPlacement && d.now() - j > 2;
                for (; this._currentPlacementIndex >= 0; ) {
                  const ie = b[y[this._currentPlacementIndex]], fe = this.placement.collisionIndex.transform.zoom;
                  if (ie.type === "symbol" && (!ie.minzoom || ie.minzoom <= fe) && (!ie.maxzoom || ie.maxzoom > fe)) {
                    if (this._inProgressLayer || (this._inProgressLayer = new _n(ie)), this._inProgressLayer.continuePlacement(R[ie.source], this.placement, this._showCollisionBoxes, ie, G)) return;
                    delete this._inProgressLayer;
                  }
                  this._currentPlacementIndex--;
                }
                this._done = !0;
              }
              commit(y) {
                return this.placement.commit(y), this.placement;
              }
            }
            const Kn = 512 / i.X / 2;
            class Wn {
              constructor(y, b, R) {
                this.tileID = y, this.bucketInstanceId = R, this._symbolsByKey = {};
                const j = /* @__PURE__ */ new Map();
                for (let G = 0; G < b.length; G++) {
                  const ie = b.get(G), fe = ie.key, xe = j.get(fe);
                  xe ? xe.push(ie) : j.set(fe, [ie]);
                }
                for (const [G, ie] of j) {
                  const fe = { positions: ie.map((xe) => ({ x: Math.floor(xe.anchorX * Kn), y: Math.floor(xe.anchorY * Kn) })), crossTileIDs: ie.map((xe) => xe.crossTileID) };
                  if (fe.positions.length > 128) {
                    const xe = new i.aw(fe.positions.length, 16, Uint16Array);
                    for (const { x: Te, y: ze } of fe.positions) xe.add(Te, ze);
                    xe.finish(), delete fe.positions, fe.index = xe;
                  }
                  this._symbolsByKey[G] = fe;
                }
              }
              getScaledCoordinates(y, b) {
                const { x: R, y: j, z: G } = this.tileID.canonical, { x: ie, y: fe, z: xe } = b.canonical, Te = xe - G, ze = Kn / Math.pow(2, Te), Ve = (ie * i.X + y.anchorX) * ze, ut = (fe * i.X + y.anchorY) * ze, gt = R * i.X * Kn, wt = j * i.X * Kn;
                return { x: Math.floor(Ve - gt), y: Math.floor(ut - wt) };
              }
              findMatches(y, b, R) {
                const j = this.tileID.canonical.z < b.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - b.canonical.z);
                for (let G = 0; G < y.length; G++) {
                  const ie = y.get(G);
                  if (ie.crossTileID) continue;
                  const fe = this._symbolsByKey[ie.key];
                  if (!fe) continue;
                  const xe = this.getScaledCoordinates(ie, b);
                  if (fe.index) {
                    const Te = fe.index.range(xe.x - j, xe.y - j, xe.x + j, xe.y + j).sort();
                    for (const ze of Te) {
                      const Ve = fe.crossTileIDs[ze];
                      if (!R[Ve]) {
                        R[Ve] = !0, ie.crossTileID = Ve;
                        break;
                      }
                    }
                  } else if (fe.positions) for (let Te = 0; Te < fe.positions.length; Te++) {
                    const ze = fe.positions[Te], Ve = fe.crossTileIDs[Te];
                    if (Math.abs(ze.x - xe.x) <= j && Math.abs(ze.y - xe.y) <= j && !R[Ve]) {
                      R[Ve] = !0, ie.crossTileID = Ve;
                      break;
                    }
                  }
                }
              }
              getCrossTileIDsLists() {
                return Object.values(this._symbolsByKey).map(({ crossTileIDs: y }) => y);
              }
            }
            class hr {
              constructor() {
                this.maxCrossTileID = 0;
              }
              generate() {
                return ++this.maxCrossTileID;
              }
            }
            class Zn {
              constructor() {
                this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0;
              }
              handleWrapJump(y) {
                const b = Math.round((y - this.lng) / 360);
                if (b !== 0) for (const R in this.indexes) {
                  const j = this.indexes[R], G = {};
                  for (const ie in j) {
                    const fe = j[ie];
                    fe.tileID = fe.tileID.unwrapTo(fe.tileID.wrap + b), G[fe.tileID.key] = fe;
                  }
                  this.indexes[R] = G;
                }
                this.lng = y;
              }
              addBucket(y, b, R) {
                if (this.indexes[y.overscaledZ] && this.indexes[y.overscaledZ][y.key]) {
                  if (this.indexes[y.overscaledZ][y.key].bucketInstanceId === b.bucketInstanceId) return !1;
                  this.removeBucketCrossTileIDs(y.overscaledZ, this.indexes[y.overscaledZ][y.key]);
                }
                for (let G = 0; G < b.symbolInstances.length; G++) b.symbolInstances.get(G).crossTileID = 0;
                this.usedCrossTileIDs[y.overscaledZ] || (this.usedCrossTileIDs[y.overscaledZ] = {});
                const j = this.usedCrossTileIDs[y.overscaledZ];
                for (const G in this.indexes) {
                  const ie = this.indexes[G];
                  if (Number(G) > y.overscaledZ) for (const fe in ie) {
                    const xe = ie[fe];
                    xe.tileID.isChildOf(y) && xe.findMatches(b.symbolInstances, y, j);
                  }
                  else {
                    const fe = ie[y.scaledTo(Number(G)).key];
                    fe && fe.findMatches(b.symbolInstances, y, j);
                  }
                }
                for (let G = 0; G < b.symbolInstances.length; G++) {
                  const ie = b.symbolInstances.get(G);
                  ie.crossTileID || (ie.crossTileID = R.generate(), j[ie.crossTileID] = !0);
                }
                return this.indexes[y.overscaledZ] === void 0 && (this.indexes[y.overscaledZ] = {}), this.indexes[y.overscaledZ][y.key] = new Wn(y, b.symbolInstances, b.bucketInstanceId), !0;
              }
              removeBucketCrossTileIDs(y, b) {
                for (const R of b.getCrossTileIDsLists()) for (const j of R) delete this.usedCrossTileIDs[y][j];
              }
              removeStaleBuckets(y) {
                let b = !1;
                for (const R in this.indexes) {
                  const j = this.indexes[R];
                  for (const G in j) y[j[G].bucketInstanceId] || (this.removeBucketCrossTileIDs(R, j[G]), delete j[G], b = !0);
                }
                return b;
              }
            }
            class lr {
              constructor() {
                this.layerIndexes = {}, this.crossTileIDs = new hr(), this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {};
              }
              addLayer(y, b, R) {
                let j = this.layerIndexes[y.id];
                j === void 0 && (j = this.layerIndexes[y.id] = new Zn());
                let G = !1;
                const ie = {};
                j.handleWrapJump(R);
                for (const fe of b) {
                  const xe = fe.getBucket(y);
                  xe && y.id === xe.layerIds[0] && (xe.bucketInstanceId || (xe.bucketInstanceId = ++this.maxBucketInstanceId), j.addBucket(fe.tileID, xe, this.crossTileIDs) && (G = !0), ie[xe.bucketInstanceId] = !0);
                }
                return j.removeStaleBuckets(ie) && (G = !0), G;
              }
              pruneUnusedLayers(y) {
                const b = {};
                y.forEach((R) => {
                  b[R] = !0;
                });
                for (const R in this.layerIndexes) b[R] || delete this.layerIndexes[R];
              }
            }
            const cr = (B, y) => i.t(B, y && y.filter((b) => b.identifier !== "source.canvas")), zr = i.ax();
            class Wr extends i.E {
              constructor(y, b = {}) {
                super(), this._rtlPluginLoaded = () => {
                  for (const R in this.sourceCaches) {
                    const j = this.sourceCaches[R].getSource().type;
                    j !== "vector" && j !== "geojson" || this.sourceCaches[R].reload();
                  }
                }, this.map = y, this.dispatcher = new se(ae(), y._getMapId()), this.dispatcher.registerMessageHandler("GG", (R, j) => this.getGlyphs(R, j)), this.dispatcher.registerMessageHandler("GI", (R, j) => this.getImages(R, j)), this.imageManager = new z(), this.imageManager.setEventedParent(this), this.glyphManager = new $(y._requestManager, b.localIdeographFontFamily), this.lineAtlas = new Q(256, 512), this.crossTileSymbolIndex = new lr(), this._spritesImagesIds = {}, this._layers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new i.ay(), this._loaded = !1, this._availableImages = [], this._resetUpdates(), this.dispatcher.broadcast("SR", i.az()), tt().on(Re, this._rtlPluginLoaded), this.on("data", (R) => {
                  if (R.dataType !== "source" || R.sourceDataType !== "metadata") return;
                  const j = this.sourceCaches[R.sourceId];
                  if (!j) return;
                  const G = j.getSource();
                  if (G && G.vectorLayerIds) for (const ie in this._layers) {
                    const fe = this._layers[ie];
                    fe.source === G.id && this._validateLayer(fe);
                  }
                });
              }
              loadURL(y, b = {}, R) {
                this.fire(new i.k("dataloading", { dataType: "style" })), b.validate = typeof b.validate != "boolean" || b.validate;
                const j = this.map._requestManager.transformRequest(y, "Style");
                this._loadStyleRequest = new AbortController();
                const G = this._loadStyleRequest;
                i.h(j, this._loadStyleRequest).then((ie) => {
                  this._loadStyleRequest = null, this._load(ie.data, b, R);
                }).catch((ie) => {
                  this._loadStyleRequest = null, ie && !G.signal.aborted && this.fire(new i.j(ie));
                });
              }
              loadJSON(y, b = {}, R) {
                this.fire(new i.k("dataloading", { dataType: "style" })), this._frameRequest = new AbortController(), d.frameAsync(this._frameRequest).then(() => {
                  this._frameRequest = null, b.validate = b.validate !== !1, this._load(y, b, R);
                }).catch(() => {
                });
              }
              loadEmpty() {
                this.fire(new i.k("dataloading", { dataType: "style" })), this._load(zr, { validate: !1 });
              }
              _load(y, b, R) {
                var j;
                const G = b.transformStyle ? b.transformStyle(R, y) : y;
                if (!b.validate || !cr(this, i.x(G))) {
                  this._loaded = !0, this.stylesheet = G;
                  for (const ie in G.sources) this.addSource(ie, G.sources[ie], { validate: !1 });
                  G.sprite ? this._loadSprite(G.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(G.glyphs), this._createLayers(), this.light = new Y(this.stylesheet.light), this.sky = new X(this.stylesheet.sky), this.map.setTerrain((j = this.stylesheet.terrain) !== null && j !== void 0 ? j : null), this.fire(new i.k("data", { dataType: "style" })), this.fire(new i.k("style.load"));
                }
              }
              _createLayers() {
                const y = i.aA(this.stylesheet.layers);
                this.dispatcher.broadcast("SL", y), this._order = y.map((b) => b.id), this._layers = {}, this._serializedLayers = null;
                for (const b of y) {
                  const R = i.aB(b);
                  R.setEventedParent(this, { layer: { id: b.id } }), this._layers[b.id] = R;
                }
              }
              _loadSprite(y, b = !1, R = void 0) {
                let j;
                this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController(), M(y, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((G) => {
                  if (this._spriteRequest = null, G) for (const ie in G) {
                    this._spritesImagesIds[ie] = [];
                    const fe = this._spritesImagesIds[ie] ? this._spritesImagesIds[ie].filter((xe) => !(xe in G)) : [];
                    for (const xe of fe) this.imageManager.removeImage(xe), this._changedImages[xe] = !0;
                    for (const xe in G[ie]) {
                      const Te = ie === "default" ? xe : `${ie}:${xe}`;
                      this._spritesImagesIds[ie].push(Te), Te in this.imageManager.images ? this.imageManager.updateImage(Te, G[ie][xe], !1) : this.imageManager.addImage(Te, G[ie][xe]), b && (this._changedImages[Te] = !0);
                    }
                  }
                }).catch((G) => {
                  this._spriteRequest = null, j = G, this.fire(new i.j(j));
                }).finally(() => {
                  this.imageManager.setLoaded(!0), this._availableImages = this.imageManager.listImages(), b && (this._changed = !0), this.dispatcher.broadcast("SI", this._availableImages), this.fire(new i.k("data", { dataType: "style" })), R && R(j);
                });
              }
              _unloadSprite() {
                for (const y of Object.values(this._spritesImagesIds).flat()) this.imageManager.removeImage(y), this._changedImages[y] = !0;
                this._spritesImagesIds = {}, this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new i.k("data", { dataType: "style" }));
              }
              _validateLayer(y) {
                const b = this.sourceCaches[y.source];
                if (!b) return;
                const R = y.sourceLayer;
                if (!R) return;
                const j = b.getSource();
                (j.type === "geojson" || j.vectorLayerIds && j.vectorLayerIds.indexOf(R) === -1) && this.fire(new i.j(new Error(`Source layer "${R}" does not exist on source "${j.id}" as specified by style layer "${y.id}".`)));
              }
              loaded() {
                if (!this._loaded || Object.keys(this._updatedSources).length) return !1;
                for (const y in this.sourceCaches) if (!this.sourceCaches[y].loaded()) return !1;
                return !!this.imageManager.isLoaded();
              }
              _serializeByIds(y) {
                const b = this._serializedAllLayers();
                if (!y || y.length === 0) return Object.values(b);
                const R = [];
                for (const j of y) b[j] && R.push(b[j]);
                return R;
              }
              _serializedAllLayers() {
                let y = this._serializedLayers;
                if (y) return y;
                y = this._serializedLayers = {};
                const b = Object.keys(this._layers);
                for (const R of b) {
                  const j = this._layers[R];
                  j.type !== "custom" && (y[R] = j.serialize());
                }
                return y;
              }
              hasTransitions() {
                if (this.light && this.light.hasTransition() || this.sky && this.sky.hasTransition()) return !0;
                for (const y in this.sourceCaches) if (this.sourceCaches[y].hasTransition()) return !0;
                for (const y in this._layers) if (this._layers[y].hasTransition()) return !0;
                return !1;
              }
              _checkLoaded() {
                if (!this._loaded) throw new Error("Style is not done loading.");
              }
              update(y) {
                if (!this._loaded) return;
                const b = this._changed;
                if (b) {
                  const j = Object.keys(this._updatedLayers), G = Object.keys(this._removedLayers);
                  (j.length || G.length) && this._updateWorkerLayers(j, G);
                  for (const ie in this._updatedSources) {
                    const fe = this._updatedSources[ie];
                    if (fe === "reload") this._reloadSource(ie);
                    else {
                      if (fe !== "clear") throw new Error(`Invalid action ${fe}`);
                      this._clearSource(ie);
                    }
                  }
                  this._updateTilesForChangedImages(), this._updateTilesForChangedGlyphs();
                  for (const ie in this._updatedPaintProps) this._layers[ie].updateTransitions(y);
                  this.light.updateTransitions(y), this.sky.updateTransitions(y), this._resetUpdates();
                }
                const R = {};
                for (const j in this.sourceCaches) {
                  const G = this.sourceCaches[j];
                  R[j] = G.used, G.used = !1;
                }
                for (const j of this._order) {
                  const G = this._layers[j];
                  G.recalculate(y, this._availableImages), !G.isHidden(y.zoom) && G.source && (this.sourceCaches[G.source].used = !0);
                }
                for (const j in R) {
                  const G = this.sourceCaches[j];
                  !!R[j] != !!G.used && G.fire(new i.k("data", { sourceDataType: "visibility", dataType: "source", sourceId: j }));
                }
                this.light.recalculate(y), this.sky.recalculate(y), this.z = y.zoom, b && this.fire(new i.k("data", { dataType: "style" }));
              }
              _updateTilesForChangedImages() {
                const y = Object.keys(this._changedImages);
                if (y.length) {
                  for (const b in this.sourceCaches) this.sourceCaches[b].reloadTilesForDependencies(["icons", "patterns"], y);
                  this._changedImages = {};
                }
              }
              _updateTilesForChangedGlyphs() {
                if (this._glyphsDidChange) {
                  for (const y in this.sourceCaches) this.sourceCaches[y].reloadTilesForDependencies(["glyphs"], [""]);
                  this._glyphsDidChange = !1;
                }
              }
              _updateWorkerLayers(y, b) {
                this.dispatcher.broadcast("UL", { layers: this._serializeByIds(y), removedIds: b });
              }
              _resetUpdates() {
                this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {}, this._glyphsDidChange = !1;
              }
              setState(y, b = {}) {
                var R;
                this._checkLoaded();
                const j = this.serialize();
                if (y = b.transformStyle ? b.transformStyle(j, y) : y, ((R = b.validate) === null || R === void 0 || R) && cr(this, i.x(y))) return !1;
                (y = i.aC(y)).layers = i.aA(y.layers);
                const G = i.aD(j, y), ie = this._getOperationsToPerform(G);
                if (ie.unimplemented.length > 0) throw new Error(`Unimplemented: ${ie.unimplemented.join(", ")}.`);
                if (ie.operations.length === 0) return !1;
                for (const fe of ie.operations) fe();
                return this.stylesheet = y, this._serializedLayers = null, !0;
              }
              _getOperationsToPerform(y) {
                const b = [], R = [];
                for (const j of y) switch (j.command) {
                  case "setCenter":
                  case "setZoom":
                  case "setBearing":
                  case "setPitch":
                    continue;
                  case "addLayer":
                    b.push(() => this.addLayer.apply(this, j.args));
                    break;
                  case "removeLayer":
                    b.push(() => this.removeLayer.apply(this, j.args));
                    break;
                  case "setPaintProperty":
                    b.push(() => this.setPaintProperty.apply(this, j.args));
                    break;
                  case "setLayoutProperty":
                    b.push(() => this.setLayoutProperty.apply(this, j.args));
                    break;
                  case "setFilter":
                    b.push(() => this.setFilter.apply(this, j.args));
                    break;
                  case "addSource":
                    b.push(() => this.addSource.apply(this, j.args));
                    break;
                  case "removeSource":
                    b.push(() => this.removeSource.apply(this, j.args));
                    break;
                  case "setLayerZoomRange":
                    b.push(() => this.setLayerZoomRange.apply(this, j.args));
                    break;
                  case "setLight":
                    b.push(() => this.setLight.apply(this, j.args));
                    break;
                  case "setGeoJSONSourceData":
                    b.push(() => this.setGeoJSONSourceData.apply(this, j.args));
                    break;
                  case "setGlyphs":
                    b.push(() => this.setGlyphs.apply(this, j.args));
                    break;
                  case "setSprite":
                    b.push(() => this.setSprite.apply(this, j.args));
                    break;
                  case "setSky":
                    b.push(() => this.setSky.apply(this, j.args));
                    break;
                  case "setTerrain":
                    b.push(() => this.map.setTerrain.apply(this, j.args));
                    break;
                  case "setTransition":
                    b.push(() => {
                    });
                    break;
                  default:
                    R.push(j.command);
                }
                return { operations: b, unimplemented: R };
              }
              addImage(y, b) {
                if (this.getImage(y)) return this.fire(new i.j(new Error(`An image named "${y}" already exists.`)));
                this.imageManager.addImage(y, b), this._afterImageUpdated(y);
              }
              updateImage(y, b) {
                this.imageManager.updateImage(y, b);
              }
              getImage(y) {
                return this.imageManager.getImage(y);
              }
              removeImage(y) {
                if (!this.getImage(y)) return this.fire(new i.j(new Error(`An image named "${y}" does not exist.`)));
                this.imageManager.removeImage(y), this._afterImageUpdated(y);
              }
              _afterImageUpdated(y) {
                this._availableImages = this.imageManager.listImages(), this._changedImages[y] = !0, this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new i.k("data", { dataType: "style" }));
              }
              listImages() {
                return this._checkLoaded(), this.imageManager.listImages();
              }
              addSource(y, b, R = {}) {
                if (this._checkLoaded(), this.sourceCaches[y] !== void 0) throw new Error(`Source "${y}" already exists.`);
                if (!b.type) throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(b).join(", ")}.`);
                if (["vector", "raster", "geojson", "video", "image"].indexOf(b.type) >= 0 && this._validate(i.x.source, `sources.${y}`, b, null, R)) return;
                this.map && this.map._collectResourceTiming && (b.collectResourceTiming = !0);
                const j = this.sourceCaches[y] = new Ze(y, b, this.dispatcher);
                j.style = this, j.setEventedParent(this, () => ({ isSourceLoaded: j.loaded(), source: j.serialize(), sourceId: y })), j.onAdd(this.map), this._changed = !0;
              }
              removeSource(y) {
                if (this._checkLoaded(), this.sourceCaches[y] === void 0) throw new Error("There is no source with this ID");
                for (const R in this._layers) if (this._layers[R].source === y) return this.fire(new i.j(new Error(`Source "${y}" cannot be removed while layer "${R}" is using it.`)));
                const b = this.sourceCaches[y];
                delete this.sourceCaches[y], delete this._updatedSources[y], b.fire(new i.k("data", { sourceDataType: "metadata", dataType: "source", sourceId: y })), b.setEventedParent(null), b.onRemove(this.map), this._changed = !0;
              }
              setGeoJSONSourceData(y, b) {
                if (this._checkLoaded(), this.sourceCaches[y] === void 0) throw new Error(`There is no source with this ID=${y}`);
                const R = this.sourceCaches[y].getSource();
                if (R.type !== "geojson") throw new Error(`geojsonSource.type is ${R.type}, which is !== 'geojson`);
                R.setData(b), this._changed = !0;
              }
              getSource(y) {
                return this.sourceCaches[y] && this.sourceCaches[y].getSource();
              }
              addLayer(y, b, R = {}) {
                this._checkLoaded();
                const j = y.id;
                if (this.getLayer(j)) return void this.fire(new i.j(new Error(`Layer "${j}" already exists on this map.`)));
                let G;
                if (y.type === "custom") {
                  if (cr(this, i.aE(y))) return;
                  G = i.aB(y);
                } else {
                  if ("source" in y && typeof y.source == "object" && (this.addSource(j, y.source), y = i.aC(y), y = i.e(y, { source: j })), this._validate(i.x.layer, `layers.${j}`, y, { arrayIndex: -1 }, R)) return;
                  G = i.aB(y), this._validateLayer(G), G.setEventedParent(this, { layer: { id: j } });
                }
                const ie = b ? this._order.indexOf(b) : this._order.length;
                if (b && ie === -1) this.fire(new i.j(new Error(`Cannot add layer "${j}" before non-existing layer "${b}".`)));
                else {
                  if (this._order.splice(ie, 0, j), this._layerOrderChanged = !0, this._layers[j] = G, this._removedLayers[j] && G.source && G.type !== "custom") {
                    const fe = this._removedLayers[j];
                    delete this._removedLayers[j], fe.type !== G.type ? this._updatedSources[G.source] = "clear" : (this._updatedSources[G.source] = "reload", this.sourceCaches[G.source].pause());
                  }
                  this._updateLayer(G), G.onAdd && G.onAdd(this.map);
                }
              }
              moveLayer(y, b) {
                if (this._checkLoaded(), this._changed = !0, !this._layers[y]) return void this.fire(new i.j(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));
                if (y === b) return;
                const R = this._order.indexOf(y);
                this._order.splice(R, 1);
                const j = b ? this._order.indexOf(b) : this._order.length;
                b && j === -1 ? this.fire(new i.j(new Error(`Cannot move layer "${y}" before non-existing layer "${b}".`))) : (this._order.splice(j, 0, y), this._layerOrderChanged = !0);
              }
              removeLayer(y) {
                this._checkLoaded();
                const b = this._layers[y];
                if (!b) return void this.fire(new i.j(new Error(`Cannot remove non-existing layer "${y}".`)));
                b.setEventedParent(null);
                const R = this._order.indexOf(y);
                this._order.splice(R, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[y] = b, delete this._layers[y], this._serializedLayers && delete this._serializedLayers[y], delete this._updatedLayers[y], delete this._updatedPaintProps[y], b.onRemove && b.onRemove(this.map);
              }
              getLayer(y) {
                return this._layers[y];
              }
              getLayersOrder() {
                return [...this._order];
              }
              hasLayer(y) {
                return y in this._layers;
              }
              setLayerZoomRange(y, b, R) {
                this._checkLoaded();
                const j = this.getLayer(y);
                j ? j.minzoom === b && j.maxzoom === R || (b != null && (j.minzoom = b), R != null && (j.maxzoom = R), this._updateLayer(j)) : this.fire(new i.j(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)));
              }
              setFilter(y, b, R = {}) {
                this._checkLoaded();
                const j = this.getLayer(y);
                if (j) {
                  if (!i.aF(j.filter, b)) return b == null ? (j.filter = void 0, void this._updateLayer(j)) : void (this._validate(i.x.filter, `layers.${j.id}.filter`, b, null, R) || (j.filter = i.aC(b), this._updateLayer(j)));
                } else this.fire(new i.j(new Error(`Cannot filter non-existing layer "${y}".`)));
              }
              getFilter(y) {
                return i.aC(this.getLayer(y).filter);
              }
              setLayoutProperty(y, b, R, j = {}) {
                this._checkLoaded();
                const G = this.getLayer(y);
                G ? i.aF(G.getLayoutProperty(b), R) || (G.setLayoutProperty(b, R, j), this._updateLayer(G)) : this.fire(new i.j(new Error(`Cannot style non-existing layer "${y}".`)));
              }
              getLayoutProperty(y, b) {
                const R = this.getLayer(y);
                if (R) return R.getLayoutProperty(b);
                this.fire(new i.j(new Error(`Cannot get style of non-existing layer "${y}".`)));
              }
              setPaintProperty(y, b, R, j = {}) {
                this._checkLoaded();
                const G = this.getLayer(y);
                G ? i.aF(G.getPaintProperty(b), R) || (G.setPaintProperty(b, R, j) && this._updateLayer(G), this._changed = !0, this._updatedPaintProps[y] = !0, this._serializedLayers = null) : this.fire(new i.j(new Error(`Cannot style non-existing layer "${y}".`)));
              }
              getPaintProperty(y, b) {
                return this.getLayer(y).getPaintProperty(b);
              }
              setFeatureState(y, b) {
                this._checkLoaded();
                const R = y.source, j = y.sourceLayer, G = this.sourceCaches[R];
                if (G === void 0) return void this.fire(new i.j(new Error(`The source '${R}' does not exist in the map's style.`)));
                const ie = G.getSource().type;
                ie === "geojson" && j ? this.fire(new i.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : ie !== "vector" || j ? (y.id === void 0 && this.fire(new i.j(new Error("The feature id parameter must be provided."))), G.setFeatureState(j, y.id, b)) : this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
              }
              removeFeatureState(y, b) {
                this._checkLoaded();
                const R = y.source, j = this.sourceCaches[R];
                if (j === void 0) return void this.fire(new i.j(new Error(`The source '${R}' does not exist in the map's style.`)));
                const G = j.getSource().type, ie = G === "vector" ? y.sourceLayer : void 0;
                G !== "vector" || ie ? b && typeof y.id != "string" && typeof y.id != "number" ? this.fire(new i.j(new Error("A feature id is required to remove its specific state property."))) : j.removeFeatureState(ie, y.id, b) : this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
              }
              getFeatureState(y) {
                this._checkLoaded();
                const b = y.source, R = y.sourceLayer, j = this.sourceCaches[b];
                if (j !== void 0) return j.getSource().type !== "vector" || R ? (y.id === void 0 && this.fire(new i.j(new Error("The feature id parameter must be provided."))), j.getFeatureState(R, y.id)) : void this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
                this.fire(new i.j(new Error(`The source '${b}' does not exist in the map's style.`)));
              }
              getTransition() {
                return i.e({ duration: 300, delay: 0 }, this.stylesheet && this.stylesheet.transition);
              }
              serialize() {
                if (!this._loaded) return;
                const y = i.aG(this.sourceCaches, (G) => G.serialize()), b = this._serializeByIds(this._order), R = this.map.getTerrain() || void 0, j = this.stylesheet;
                return i.aH({ version: j.version, name: j.name, metadata: j.metadata, light: j.light, sky: j.sky, center: j.center, zoom: j.zoom, bearing: j.bearing, pitch: j.pitch, sprite: j.sprite, glyphs: j.glyphs, transition: j.transition, sources: y, layers: b, terrain: R }, (G) => G !== void 0);
              }
              _updateLayer(y) {
                this._updatedLayers[y.id] = !0, y.source && !this._updatedSources[y.source] && this.sourceCaches[y.source].getSource().type !== "raster" && (this._updatedSources[y.source] = "reload", this.sourceCaches[y.source].pause()), this._serializedLayers = null, this._changed = !0;
              }
              _flattenAndSortRenderedFeatures(y) {
                const b = (ie) => this._layers[ie].type === "fill-extrusion", R = {}, j = [];
                for (let ie = this._order.length - 1; ie >= 0; ie--) {
                  const fe = this._order[ie];
                  if (b(fe)) {
                    R[fe] = ie;
                    for (const xe of y) {
                      const Te = xe[fe];
                      if (Te) for (const ze of Te) j.push(ze);
                    }
                  }
                }
                j.sort((ie, fe) => fe.intersectionZ - ie.intersectionZ);
                const G = [];
                for (let ie = this._order.length - 1; ie >= 0; ie--) {
                  const fe = this._order[ie];
                  if (b(fe)) for (let xe = j.length - 1; xe >= 0; xe--) {
                    const Te = j[xe].feature;
                    if (R[Te.layer.id] < ie) break;
                    G.push(Te), j.pop();
                  }
                  else for (const xe of y) {
                    const Te = xe[fe];
                    if (Te) for (const ze of Te) G.push(ze.feature);
                  }
                }
                return G;
              }
              queryRenderedFeatures(y, b, R) {
                b && b.filter && this._validate(i.x.filter, "queryRenderedFeatures.filter", b.filter, null, b);
                const j = {};
                if (b && b.layers) {
                  if (!Array.isArray(b.layers)) return this.fire(new i.j(new Error("parameters.layers must be an Array."))), [];
                  for (const fe of b.layers) {
                    const xe = this._layers[fe];
                    if (!xe) return this.fire(new i.j(new Error(`The layer '${fe}' does not exist in the map's style and cannot be queried for features.`))), [];
                    j[xe.source] = !0;
                  }
                }
                const G = [];
                b.availableImages = this._availableImages;
                const ie = this._serializedAllLayers();
                for (const fe in this.sourceCaches) b.layers && !j[fe] || G.push(pe(this.sourceCaches[fe], this._layers, ie, y, b, R));
                return this.placement && G.push(function(fe, xe, Te, ze, Ve, ut, gt) {
                  const wt = {}, Et = ut.queryRenderedSymbols(ze), zt = [];
                  for (const It of Object.keys(Et).map(Number)) zt.push(gt[It]);
                  zt.sort(be);
                  for (const It of zt) {
                    const jt = It.featureIndex.lookupSymbolFeatures(Et[It.bucketInstanceId], xe, It.bucketIndex, It.sourceLayerIndex, Ve.filter, Ve.layers, Ve.availableImages, fe);
                    for (const Lt in jt) {
                      const Zt = wt[Lt] = wt[Lt] || [], Qt = jt[Lt];
                      Qt.sort((Xt, yn) => {
                        const Sn = It.featureSortOrder;
                        if (Sn) {
                          const Un = Sn.indexOf(Xt.featureIndex);
                          return Sn.indexOf(yn.featureIndex) - Un;
                        }
                        return yn.featureIndex - Xt.featureIndex;
                      });
                      for (const Xt of Qt) Zt.push(Xt);
                    }
                  }
                  for (const It in wt) wt[It].forEach((jt) => {
                    const Lt = jt.feature, Zt = fe[It], Qt = Te[Zt.source].getFeatureState(Lt.layer["source-layer"], Lt.id);
                    Lt.source = Lt.layer.source, Lt.layer["source-layer"] && (Lt.sourceLayer = Lt.layer["source-layer"]), Lt.state = Qt;
                  });
                  return wt;
                }(this._layers, ie, this.sourceCaches, y, b, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(G);
              }
              querySourceFeatures(y, b) {
                b && b.filter && this._validate(i.x.filter, "querySourceFeatures.filter", b.filter, null, b);
                const R = this.sourceCaches[y];
                return R ? function(j, G) {
                  const ie = j.getRenderableIds().map((Te) => j.getTileByID(Te)), fe = [], xe = {};
                  for (let Te = 0; Te < ie.length; Te++) {
                    const ze = ie[Te], Ve = ze.tileID.canonical.key;
                    xe[Ve] || (xe[Ve] = !0, ze.querySourceFeatures(fe, G));
                  }
                  return fe;
                }(R, b) : [];
              }
              getLight() {
                return this.light.getLight();
              }
              setLight(y, b = {}) {
                this._checkLoaded();
                const R = this.light.getLight();
                let j = !1;
                for (const ie in y) if (!i.aF(y[ie], R[ie])) {
                  j = !0;
                  break;
                }
                if (!j) return;
                const G = { now: d.now(), transition: i.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };
                this.light.setLight(y, b), this.light.updateTransitions(G);
              }
              getSky() {
                var y;
                return (y = this.stylesheet) === null || y === void 0 ? void 0 : y.sky;
              }
              setSky(y, b = {}) {
                const R = this.sky.getSky();
                let j = !1;
                y || R && (j = !0);
                for (const ie in y) if (!i.aF(y[ie], R[ie])) {
                  j = !0;
                  break;
                }
                if (!j) return;
                const G = { now: d.now(), transition: i.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };
                this.stylesheet.sky = y, this.sky.setSky(y, b), this.sky.updateTransitions(G);
              }
              _validate(y, b, R, j, G = {}) {
                return (!G || G.validate !== !1) && cr(this, y.call(i.x, i.e({ key: b, style: this.serialize(), value: R, styleSpec: i.v }, j)));
              }
              _remove(y = !0) {
                this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._loadStyleRequest && (this._loadStyleRequest.abort(), this._loadStyleRequest = null), this._spriteRequest && (this._spriteRequest.abort(), this._spriteRequest = null), tt().off(Re, this._rtlPluginLoaded);
                for (const b in this._layers) this._layers[b].setEventedParent(null);
                for (const b in this.sourceCaches) {
                  const R = this.sourceCaches[b];
                  R.setEventedParent(null), R.onRemove(this.map);
                }
                this.imageManager.setEventedParent(null), this.setEventedParent(null), y && this.dispatcher.broadcast("RM", void 0), this.dispatcher.remove(y);
              }
              _clearSource(y) {
                this.sourceCaches[y].clearTiles();
              }
              _reloadSource(y) {
                this.sourceCaches[y].resume(), this.sourceCaches[y].reload();
              }
              _updateSources(y) {
                for (const b in this.sourceCaches) this.sourceCaches[b].update(y, this.map.terrain);
              }
              _generateCollisionBoxes() {
                for (const y in this.sourceCaches) this._reloadSource(y);
              }
              _updatePlacement(y, b, R, j, G = !1) {
                let ie = !1, fe = !1;
                const xe = {};
                for (const Te of this._order) {
                  const ze = this._layers[Te];
                  if (ze.type !== "symbol") continue;
                  if (!xe[ze.source]) {
                    const ut = this.sourceCaches[ze.source];
                    xe[ze.source] = ut.getRenderableIds(!0).map((gt) => ut.getTileByID(gt)).sort((gt, wt) => wt.tileID.overscaledZ - gt.tileID.overscaledZ || (gt.tileID.isLessThan(wt.tileID) ? -1 : 1));
                  }
                  const Ve = this.crossTileSymbolIndex.addLayer(ze, xe[ze.source], y.center.lng);
                  ie = ie || Ve;
                }
                if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((G = G || this._layerOrderChanged || R === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(d.now(), y.zoom)) && (this.pauseablePlacement = new En(y, this.map.terrain, this._order, G, b, R, j, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, xe), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(d.now()), fe = !0), ie && this.pauseablePlacement.placement.setStale()), fe || ie) for (const Te of this._order) {
                  const ze = this._layers[Te];
                  ze.type === "symbol" && this.placement.updateLayerOpacities(ze, xe[ze.source]);
                }
                return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(d.now());
              }
              _releaseSymbolFadeTiles() {
                for (const y in this.sourceCaches) this.sourceCaches[y].releaseSymbolFadeTiles();
              }
              getImages(y, b) {
                return i._(this, void 0, void 0, function* () {
                  const R = yield this.imageManager.getImages(b.icons);
                  this._updateTilesForChangedImages();
                  const j = this.sourceCaches[b.source];
                  return j && j.setDependencies(b.tileID.key, b.type, b.icons), R;
                });
              }
              getGlyphs(y, b) {
                return i._(this, void 0, void 0, function* () {
                  const R = yield this.glyphManager.getGlyphs(b.stacks), j = this.sourceCaches[b.source];
                  return j && j.setDependencies(b.tileID.key, b.type, [""]), R;
                });
              }
              getGlyphsUrl() {
                return this.stylesheet.glyphs || null;
              }
              setGlyphs(y, b = {}) {
                this._checkLoaded(), y && this._validate(i.x.glyphs, "glyphs", y, null, b) || (this._glyphsDidChange = !0, this.stylesheet.glyphs = y, this.glyphManager.entries = {}, this.glyphManager.setURL(y));
              }
              addSprite(y, b, R = {}, j) {
                this._checkLoaded();
                const G = [{ id: y, url: b }], ie = [...P(this.stylesheet.sprite), ...G];
                this._validate(i.x.sprite, "sprite", ie, null, R) || (this.stylesheet.sprite = ie, this._loadSprite(G, !0, j));
              }
              removeSprite(y) {
                this._checkLoaded();
                const b = P(this.stylesheet.sprite);
                if (b.find((R) => R.id === y)) {
                  if (this._spritesImagesIds[y]) for (const R of this._spritesImagesIds[y]) this.imageManager.removeImage(R), this._changedImages[R] = !0;
                  b.splice(b.findIndex((R) => R.id === y), 1), this.stylesheet.sprite = b.length > 0 ? b : void 0, delete this._spritesImagesIds[y], this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new i.k("data", { dataType: "style" }));
                } else this.fire(new i.j(new Error(`Sprite "${y}" doesn't exists on this map.`)));
              }
              getSprite() {
                return P(this.stylesheet.sprite);
              }
              setSprite(y, b = {}, R) {
                this._checkLoaded(), y && this._validate(i.x.sprite, "sprite", y, null, b) || (this.stylesheet.sprite = y, y ? this._loadSprite(y, !0, R) : (this._unloadSprite(), R && R(null)));
              }
            }
            var mr = i.Y([{ name: "a_pos", type: "Int16", components: 2 }]);
            const Ir = { prelude: yr(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`, `#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 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
);}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;}
#ifdef TERRAIN3D
uniform 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;
#endif
const 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) {
#ifdef TERRAIN3D
highp 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));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 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;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 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;
#else
return 0.0;
#endif
}`), background: yr(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), backgroundPattern: yr(`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;uniform 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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: yr(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 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;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`), clippingMask: yr("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: yr(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 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,0,1);gl_Position=u_matrix*pos;}`), heatmapTexture: yr(`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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`, "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: yr("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: yr("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: yr("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: yr(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`), fillOutline: yr(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), fillOutlinePattern: yr(`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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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: yr(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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: yr(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=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+=ambientlight;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: yr(`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;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 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;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=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
? a_pos
: 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: yr(`#ifdef GL_ES
precision highp float;
#endif
uniform 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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: yr(`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;
#define PI 3.141592653589793
void 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;float 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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: yr(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float 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;
#endif
v_width2=vec2(outset,inset);}`), lineGradient: yr(`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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
attribute 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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float 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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float 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;
#endif
v_width2=vec2(outset,inset);}`), linePattern: yr(`#ifdef GL_ES
precision highp float;
#endif
uniform 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;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 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;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float 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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float 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;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), lineSDF: yr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
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 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute 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;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float 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;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float 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;
#endif
v_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: yr(`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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, "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: yr(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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);}
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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: yr(`#define SDF_PX 8.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float 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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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: yr(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform 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;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}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);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`, `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);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 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 ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_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: yr("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);float 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: yr("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: yr("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: yr("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);}") };
            function yr(B, y) {
              const b = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, R = y.match(/attribute ([\w]+) ([\w]+)/g), j = B.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), G = y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), ie = G ? G.concat(j) : j, fe = {};
              return { fragmentSource: B = B.replace(b, (xe, Te, ze, Ve, ut) => (fe[ut] = !0, Te === "define" ? `
#ifndef HAS_UNIFORM_u_${ut}
varying ${ze} ${Ve} ${ut};
#else
uniform ${ze} ${Ve} u_${ut};
#endif
` : `
#ifdef HAS_UNIFORM_u_${ut}
    ${ze} ${Ve} ${ut} = u_${ut};
#endif
`)), vertexSource: y = y.replace(b, (xe, Te, ze, Ve, ut) => {
                const gt = Ve === "float" ? "vec2" : "vec4", wt = ut.match(/color/) ? "color" : gt;
                return fe[ut] ? Te === "define" ? `
#ifndef HAS_UNIFORM_u_${ut}
uniform lowp float u_${ut}_t;
attribute ${ze} ${gt} a_${ut};
varying ${ze} ${Ve} ${ut};
#else
uniform ${ze} ${Ve} u_${ut};
#endif
` : wt === "vec4" ? `
#ifndef HAS_UNIFORM_u_${ut}
    ${ut} = a_${ut};
#else
    ${ze} ${Ve} ${ut} = u_${ut};
#endif
` : `
#ifndef HAS_UNIFORM_u_${ut}
    ${ut} = unpack_mix_${wt}(a_${ut}, u_${ut}_t);
#else
    ${ze} ${Ve} ${ut} = u_${ut};
#endif
` : Te === "define" ? `
#ifndef HAS_UNIFORM_u_${ut}
uniform lowp float u_${ut}_t;
attribute ${ze} ${gt} a_${ut};
#else
uniform ${ze} ${Ve} u_${ut};
#endif
` : wt === "vec4" ? `
#ifndef HAS_UNIFORM_u_${ut}
    ${ze} ${Ve} ${ut} = a_${ut};
#else
    ${ze} ${Ve} ${ut} = u_${ut};
#endif
` : `
#ifndef HAS_UNIFORM_u_${ut}
    ${ze} ${Ve} ${ut} = unpack_mix_${wt}(a_${ut}, u_${ut}_t);
#else
    ${ze} ${Ve} ${ut} = u_${ut};
#endif
`;
              }), staticAttributes: R, staticUniforms: ie };
            }
            class Vr {
              constructor() {
                this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null;
              }
              bind(y, b, R, j, G, ie, fe, xe, Te) {
                this.context = y;
                let ze = this.boundPaintVertexBuffers.length !== j.length;
                for (let Ve = 0; !ze && Ve < j.length; Ve++) this.boundPaintVertexBuffers[Ve] !== j[Ve] && (ze = !0);
                !this.vao || this.boundProgram !== b || this.boundLayoutVertexBuffer !== R || ze || this.boundIndexBuffer !== G || this.boundVertexOffset !== ie || this.boundDynamicVertexBuffer !== fe || this.boundDynamicVertexBuffer2 !== xe || this.boundDynamicVertexBuffer3 !== Te ? this.freshBind(b, R, j, G, ie, fe, xe, Te) : (y.bindVertexArray.set(this.vao), fe && fe.bind(), G && G.dynamicDraw && G.bind(), xe && xe.bind(), Te && Te.bind());
              }
              freshBind(y, b, R, j, G, ie, fe, xe) {
                const Te = y.numAttributes, ze = this.context, Ve = ze.gl;
                this.vao && this.destroy(), this.vao = ze.createVertexArray(), ze.bindVertexArray.set(this.vao), this.boundProgram = y, this.boundLayoutVertexBuffer = b, this.boundPaintVertexBuffers = R, this.boundIndexBuffer = j, this.boundVertexOffset = G, this.boundDynamicVertexBuffer = ie, this.boundDynamicVertexBuffer2 = fe, this.boundDynamicVertexBuffer3 = xe, b.enableAttributes(Ve, y);
                for (const ut of R) ut.enableAttributes(Ve, y);
                ie && ie.enableAttributes(Ve, y), fe && fe.enableAttributes(Ve, y), xe && xe.enableAttributes(Ve, y), b.bind(), b.setVertexAttribPointers(Ve, y, G);
                for (const ut of R) ut.bind(), ut.setVertexAttribPointers(Ve, y, G);
                ie && (ie.bind(), ie.setVertexAttribPointers(Ve, y, G)), j && j.bind(), fe && (fe.bind(), fe.setVertexAttribPointers(Ve, y, G)), xe && (xe.bind(), xe.setVertexAttribPointers(Ve, y, G)), ze.currentNumAttributes = Te;
              }
              destroy() {
                this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);
              }
            }
            const rn = (B, y, b, R, j) => ({ u_matrix: B, u_texture: 0, u_ele_delta: y, u_fog_matrix: b, u_fog_color: R ? R.properties.get("fog-color") : i.aN.white, u_fog_ground_blend: R ? R.properties.get("fog-ground-blend") : 1, u_fog_ground_blend_opacity: R ? R.calculateFogBlendOpacity(j) : 0, u_horizon_color: R ? R.properties.get("horizon-color") : i.aN.white, u_horizon_fog_blend: R ? R.properties.get("horizon-fog-blend") : 1 });
            function Tn(B) {
              const y = [];
              for (let b = 0; b < B.length; b++) {
                if (B[b] === null) continue;
                const R = B[b].split(" ");
                y.push(R.pop());
              }
              return y;
            }
            class sr {
              constructor(y, b, R, j, G, ie) {
                const fe = y.gl;
                this.program = fe.createProgram();
                const xe = Tn(b.staticAttributes), Te = R ? R.getBinderAttributes() : [], ze = xe.concat(Te), Ve = Ir.prelude.staticUniforms ? Tn(Ir.prelude.staticUniforms) : [], ut = b.staticUniforms ? Tn(b.staticUniforms) : [], gt = R ? R.getBinderUniforms() : [], wt = Ve.concat(ut).concat(gt), Et = [];
                for (const Xt of wt) Et.indexOf(Xt) < 0 && Et.push(Xt);
                const zt = R ? R.defines() : [];
                G && zt.push("#define OVERDRAW_INSPECTOR;"), ie && zt.push("#define TERRAIN3D;");
                const It = zt.concat(Ir.prelude.fragmentSource, b.fragmentSource).join(`
`), jt = zt.concat(Ir.prelude.vertexSource, b.vertexSource).join(`
`), Lt = fe.createShader(fe.FRAGMENT_SHADER);
                if (fe.isContextLost()) return void (this.failedToCreate = !0);
                if (fe.shaderSource(Lt, It), fe.compileShader(Lt), !fe.getShaderParameter(Lt, fe.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Lt)}`);
                fe.attachShader(this.program, Lt);
                const Zt = fe.createShader(fe.VERTEX_SHADER);
                if (fe.isContextLost()) return void (this.failedToCreate = !0);
                if (fe.shaderSource(Zt, jt), fe.compileShader(Zt), !fe.getShaderParameter(Zt, fe.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Zt)}`);
                fe.attachShader(this.program, Zt), this.attributes = {};
                const Qt = {};
                this.numAttributes = ze.length;
                for (let Xt = 0; Xt < this.numAttributes; Xt++) ze[Xt] && (fe.bindAttribLocation(this.program, Xt, ze[Xt]), this.attributes[ze[Xt]] = Xt);
                if (fe.linkProgram(this.program), !fe.getProgramParameter(this.program, fe.LINK_STATUS)) throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);
                fe.deleteShader(Zt), fe.deleteShader(Lt);
                for (let Xt = 0; Xt < Et.length; Xt++) {
                  const yn = Et[Xt];
                  if (yn && !Qt[yn]) {
                    const Sn = fe.getUniformLocation(this.program, yn);
                    Sn && (Qt[yn] = Sn);
                  }
                }
                this.fixedUniforms = j(y, Qt), this.terrainUniforms = ((Xt, yn) => ({ u_depth: new i.aI(Xt, yn.u_depth), u_terrain: new i.aI(Xt, yn.u_terrain), u_terrain_dim: new i.aJ(Xt, yn.u_terrain_dim), u_terrain_matrix: new i.aK(Xt, yn.u_terrain_matrix), u_terrain_unpack: new i.aL(Xt, yn.u_terrain_unpack), u_terrain_exaggeration: new i.aJ(Xt, yn.u_terrain_exaggeration) }))(y, Qt), this.binderUniforms = R ? R.getUniforms(y, Qt) : [];
              }
              draw(y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt, Et, zt, It, jt) {
                const Lt = y.gl;
                if (this.failedToCreate) return;
                if (y.program.set(this.program), y.setDepthMode(R), y.setStencilMode(j), y.setColorMode(G), y.setCullFace(ie), xe) {
                  y.activeTexture.set(Lt.TEXTURE2), Lt.bindTexture(Lt.TEXTURE_2D, xe.depthTexture), y.activeTexture.set(Lt.TEXTURE3), Lt.bindTexture(Lt.TEXTURE_2D, xe.texture);
                  for (const Qt in this.terrainUniforms) this.terrainUniforms[Qt].set(xe[Qt]);
                }
                for (const Qt in this.fixedUniforms) this.fixedUniforms[Qt].set(fe[Qt]);
                Et && Et.setUniforms(y, this.binderUniforms, gt, { zoom: wt });
                let Zt = 0;
                switch (b) {
                  case Lt.LINES:
                    Zt = 2;
                    break;
                  case Lt.TRIANGLES:
                    Zt = 3;
                    break;
                  case Lt.LINE_STRIP:
                    Zt = 1;
                }
                for (const Qt of ut.get()) {
                  const Xt = Qt.vaos || (Qt.vaos = {});
                  (Xt[Te] || (Xt[Te] = new Vr())).bind(y, this, ze, Et ? Et.getPaintVertexBuffers() : [], Ve, Qt.vertexOffset, zt, It, jt), Lt.drawElements(b, Qt.primitiveLength * Zt, Lt.UNSIGNED_SHORT, Qt.primitiveOffset * Zt * 2);
                }
              }
            }
            function $n(B, y, b) {
              const R = 1 / Ot(b, 1, y.transform.tileZoom), j = Math.pow(2, b.tileID.overscaledZ), G = b.tileSize * Math.pow(2, y.transform.tileZoom) / j, ie = G * (b.tileID.canonical.x + b.tileID.wrap * j), fe = G * b.tileID.canonical.y;
              return { u_image: 0, u_texsize: b.imageAtlasTexture.size, u_scale: [R, B.fromScale, B.toScale], u_fade: B.t, u_pixel_coord_upper: [ie >> 16, fe >> 16], u_pixel_coord_lower: [65535 & ie, 65535 & fe] };
            }
            const ur = (B, y, b, R) => {
              const j = y.style.light, G = j.properties.get("position"), ie = [G.x, G.y, G.z], fe = function() {
                var Te = new i.A(9);
                return i.A != Float32Array && (Te[1] = 0, Te[2] = 0, Te[3] = 0, Te[5] = 0, Te[6] = 0, Te[7] = 0), Te[0] = 1, Te[4] = 1, Te[8] = 1, Te;
              }();
              j.properties.get("anchor") === "viewport" && function(Te, ze) {
                var Ve = Math.sin(ze), ut = Math.cos(ze);
                Te[0] = ut, Te[1] = Ve, Te[2] = 0, Te[3] = -Ve, Te[4] = ut, Te[5] = 0, Te[6] = 0, Te[7] = 0, Te[8] = 1;
              }(fe, -y.transform.angle), function(Te, ze, Ve) {
                var ut = ze[0], gt = ze[1], wt = ze[2];
                Te[0] = ut * Ve[0] + gt * Ve[3] + wt * Ve[6], Te[1] = ut * Ve[1] + gt * Ve[4] + wt * Ve[7], Te[2] = ut * Ve[2] + gt * Ve[5] + wt * Ve[8];
              }(ie, ie, fe);
              const xe = j.properties.get("color");
              return { u_matrix: B, u_lightpos: ie, u_lightintensity: j.properties.get("intensity"), u_lightcolor: [xe.r, xe.g, xe.b], u_vertical_gradient: +b, u_opacity: R };
            }, Tr = (B, y, b, R, j, G, ie) => i.e(ur(B, y, b, R), $n(G, y, ie), { u_height_factor: -Math.pow(2, j.overscaledZ) / ie.tileSize / 8 }), wr = (B) => ({ u_matrix: B }), Fr = (B, y, b, R) => i.e(wr(B), $n(b, y, R)), Xr = (B, y) => ({ u_matrix: B, u_world: y }), un = (B, y, b, R, j) => i.e(Fr(B, y, b, R), { u_world: j }), Gn = (B, y, b, R) => {
              const j = B.transform;
              let G, ie;
              if (R.paint.get("circle-pitch-alignment") === "map") {
                const fe = Ot(b, 1, j.zoom);
                G = !0, ie = [fe, fe];
              } else G = !1, ie = j.pixelsToGLUnits;
              return { u_camera_to_center_distance: j.cameraToCenterDistance, u_scale_with_map: +(R.paint.get("circle-pitch-scale") === "map"), u_matrix: B.translatePosMatrix(y.posMatrix, b, R.paint.get("circle-translate"), R.paint.get("circle-translate-anchor")), u_pitch_with_map: +G, u_device_pixel_ratio: B.pixelRatio, u_extrude_scale: ie };
            }, on = (B, y) => ({ u_matrix: y, u_pixel_extrude_scale: [1 / B.width, 1 / B.height] }), ln = (B, y, b) => ({ u_matrix: B, u_inv_matrix: y, u_camera_to_center_distance: b.cameraToCenterDistance, u_viewport_size: [b.width, b.height] }), bn = (B, y, b = 1) => ({ u_matrix: B, u_color: y, u_overlay: 0, u_overlay_scale: b }), Nn = (B) => ({ u_matrix: B }), jn = (B, y, b, R) => ({ u_matrix: B, u_extrude_scale: Ot(y, 1, b), u_intensity: R }), Jn = (B, y, b, R) => {
              const j = i.H();
              i.aQ(j, 0, B.width, B.height, 0, 0, 1);
              const G = B.context.gl;
              return { u_matrix: j, u_world: [G.drawingBufferWidth, G.drawingBufferHeight], u_image: b, u_color_ramp: R, u_opacity: y.paint.get("heatmap-opacity") };
            }, Hn = (B, y, b, R) => {
              const j = b.paint.get("hillshade-shadow-color"), G = b.paint.get("hillshade-highlight-color"), ie = b.paint.get("hillshade-accent-color");
              let fe = b.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
              b.paint.get("hillshade-illumination-anchor") === "viewport" && (fe -= B.transform.angle);
              const xe = !B.options.moving;
              return { u_matrix: R ? R.posMatrix : B.transform.calculatePosMatrix(y.tileID.toUnwrapped(), xe), u_image: 0, u_latrange: pn(0, y.tileID), u_light: [b.paint.get("hillshade-exaggeration"), fe], u_shadow: j, u_highlight: G, u_accent: ie };
            }, Ln = (B, y) => {
              const b = y.stride, R = i.H();
              return i.aQ(R, 0, i.X, -i.X, 0, 0, 1), i.J(R, R, [0, -i.X, 0]), { u_matrix: R, u_image: 1, u_dimension: [b, b], u_zoom: B.overscaledZ, u_unpack: y.getUnpackVector() };
            };
            function pn(B, y) {
              const b = Math.pow(2, y.canonical.z), R = y.canonical.y;
              return [new i.Z(0, R / b).toLngLat().lat, new i.Z(0, (R + 1) / b).toLngLat().lat];
            }
            const dn = (B, y, b, R) => {
              const j = B.transform;
              return { u_matrix: gr(B, y, b, R), u_ratio: 1 / Ot(y, 1, j.zoom), u_device_pixel_ratio: B.pixelRatio, u_units_to_pixels: [1 / j.pixelsToGLUnits[0], 1 / j.pixelsToGLUnits[1]] };
            }, Dn = (B, y, b, R, j) => i.e(dn(B, y, b, j), { u_image: 0, u_image_height: R }), nr = (B, y, b, R, j) => {
              const G = B.transform, ie = ir(y, G);
              return { u_matrix: gr(B, y, b, j), u_texsize: y.imageAtlasTexture.size, u_ratio: 1 / Ot(y, 1, G.zoom), u_device_pixel_ratio: B.pixelRatio, u_image: 0, u_scale: [ie, R.fromScale, R.toScale], u_fade: R.t, u_units_to_pixels: [1 / G.pixelsToGLUnits[0], 1 / G.pixelsToGLUnits[1]] };
            }, pr = (B, y, b, R, j, G) => {
              const ie = B.transform, fe = B.lineAtlas, xe = ir(y, ie), Te = b.layout.get("line-cap") === "round", ze = fe.getDash(R.from, Te), Ve = fe.getDash(R.to, Te), ut = ze.width * j.fromScale, gt = Ve.width * j.toScale;
              return i.e(dn(B, y, b, G), { u_patternscale_a: [xe / ut, -ze.height / 2], u_patternscale_b: [xe / gt, -Ve.height / 2], u_sdfgamma: fe.width / (256 * Math.min(ut, gt) * B.pixelRatio) / 2, u_image: 0, u_tex_y_a: ze.y, u_tex_y_b: Ve.y, u_mix: j.t });
            };
            function ir(B, y) {
              return 1 / Ot(B, 1, y.tileZoom);
            }
            function gr(B, y, b, R) {
              return B.translatePosMatrix(R ? R.posMatrix : y.tileID.posMatrix, y, b.paint.get("line-translate"), b.paint.get("line-translate-anchor"));
            }
            const Pr = (B, y, b, R, j) => {
              return { u_matrix: B, u_tl_parent: y, u_scale_parent: b, u_buffer_scale: 1, u_fade_t: R.mix, u_opacity: R.opacity * j.paint.get("raster-opacity"), u_image0: 0, u_image1: 1, u_brightness_low: j.paint.get("raster-brightness-min"), u_brightness_high: j.paint.get("raster-brightness-max"), u_saturation_factor: (ie = j.paint.get("raster-saturation"), ie > 0 ? 1 - 1 / (1.001 - ie) : -ie), u_contrast_factor: (G = j.paint.get("raster-contrast"), G > 0 ? 1 / (1 - G) : 1 + G), u_spin_weights: Cr(j.paint.get("raster-hue-rotate")) };
              var G, ie;
            };
            function Cr(B) {
              B *= Math.PI / 180;
              const y = Math.sin(B), b = Math.cos(B);
              return [(2 * b + 1) / 3, (-Math.sqrt(3) * y - b + 1) / 3, (Math.sqrt(3) * y - b + 1) / 3];
            }
            const Er = (B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt) => {
              const wt = ie.transform;
              return { u_is_size_zoom_constant: +(B === "constant" || B === "source"), u_is_size_feature_constant: +(B === "constant" || B === "camera"), u_size_t: y ? y.uSizeT : 0, u_size: y ? y.uSize : 0, u_camera_to_center_distance: wt.cameraToCenterDistance, u_pitch: wt.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +b, u_aspect_ratio: wt.width / wt.height, u_fade_change: ie.options.fadeDuration ? ie.symbolFadeChange : 1, u_matrix: fe, u_label_plane_matrix: xe, u_coord_matrix: Te, u_is_text: +Ve, u_pitch_with_map: +R, u_is_along_line: j, u_is_variable_anchor: G, u_texsize: ut, u_texture: 0, u_translation: ze, u_pitched_scale: gt };
            }, Sr = (B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt, wt) => {
              const Et = ie.transform;
              return i.e(Er(B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, wt), { u_gamma_scale: R ? Math.cos(Et._pitch) * Et.cameraToCenterDistance : 1, u_device_pixel_ratio: ie.pixelRatio, u_is_halo: +gt });
            }, Dr = (B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt) => i.e(Sr(B, y, b, R, j, G, ie, fe, xe, Te, ze, !0, Ve, !0, gt), { u_texsize_icon: ut, u_texture_icon: 1 }), Qn = (B, y, b) => ({ u_matrix: B, u_opacity: y, u_color: b }), ri = (B, y, b, R, j, G) => i.e(function(ie, fe, xe, Te) {
              const ze = xe.imageManager.getPattern(ie.from.toString()), Ve = xe.imageManager.getPattern(ie.to.toString()), { width: ut, height: gt } = xe.imageManager.getPixelSize(), wt = Math.pow(2, Te.tileID.overscaledZ), Et = Te.tileSize * Math.pow(2, xe.transform.tileZoom) / wt, zt = Et * (Te.tileID.canonical.x + Te.tileID.wrap * wt), It = Et * Te.tileID.canonical.y;
              return { u_image: 0, u_pattern_tl_a: ze.tl, u_pattern_br_a: ze.br, u_pattern_tl_b: Ve.tl, u_pattern_br_b: Ve.br, u_texsize: [ut, gt], u_mix: fe.t, u_pattern_size_a: ze.displaySize, u_pattern_size_b: Ve.displaySize, u_scale_a: fe.fromScale, u_scale_b: fe.toScale, u_tile_units_to_pixels: 1 / Ot(Te, 1, xe.transform.tileZoom), u_pixel_coord_upper: [zt >> 16, It >> 16], u_pixel_coord_lower: [65535 & zt, 65535 & It] };
            }(R, G, b, j), { u_matrix: B, u_opacity: y }), Zr = { fillExtrusion: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_lightpos: new i.aO(B, y.u_lightpos), u_lightintensity: new i.aJ(B, y.u_lightintensity), u_lightcolor: new i.aO(B, y.u_lightcolor), u_vertical_gradient: new i.aJ(B, y.u_vertical_gradient), u_opacity: new i.aJ(B, y.u_opacity) }), fillExtrusionPattern: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_lightpos: new i.aO(B, y.u_lightpos), u_lightintensity: new i.aJ(B, y.u_lightintensity), u_lightcolor: new i.aO(B, y.u_lightcolor), u_vertical_gradient: new i.aJ(B, y.u_vertical_gradient), u_height_factor: new i.aJ(B, y.u_height_factor), u_image: new i.aI(B, y.u_image), u_texsize: new i.aP(B, y.u_texsize), u_pixel_coord_upper: new i.aP(B, y.u_pixel_coord_upper), u_pixel_coord_lower: new i.aP(B, y.u_pixel_coord_lower), u_scale: new i.aO(B, y.u_scale), u_fade: new i.aJ(B, y.u_fade), u_opacity: new i.aJ(B, y.u_opacity) }), fill: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix) }), fillPattern: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_image: new i.aI(B, y.u_image), u_texsize: new i.aP(B, y.u_texsize), u_pixel_coord_upper: new i.aP(B, y.u_pixel_coord_upper), u_pixel_coord_lower: new i.aP(B, y.u_pixel_coord_lower), u_scale: new i.aO(B, y.u_scale), u_fade: new i.aJ(B, y.u_fade) }), fillOutline: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_world: new i.aP(B, y.u_world) }), fillOutlinePattern: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_world: new i.aP(B, y.u_world), u_image: new i.aI(B, y.u_image), u_texsize: new i.aP(B, y.u_texsize), u_pixel_coord_upper: new i.aP(B, y.u_pixel_coord_upper), u_pixel_coord_lower: new i.aP(B, y.u_pixel_coord_lower), u_scale: new i.aO(B, y.u_scale), u_fade: new i.aJ(B, y.u_fade) }), circle: (B, y) => ({ u_camera_to_center_distance: new i.aJ(B, y.u_camera_to_center_distance), u_scale_with_map: new i.aI(B, y.u_scale_with_map), u_pitch_with_map: new i.aI(B, y.u_pitch_with_map), u_extrude_scale: new i.aP(B, y.u_extrude_scale), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_matrix: new i.aK(B, y.u_matrix) }), collisionBox: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_pixel_extrude_scale: new i.aP(B, y.u_pixel_extrude_scale) }), collisionCircle: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_inv_matrix: new i.aK(B, y.u_inv_matrix), u_camera_to_center_distance: new i.aJ(B, y.u_camera_to_center_distance), u_viewport_size: new i.aP(B, y.u_viewport_size) }), debug: (B, y) => ({ u_color: new i.aM(B, y.u_color), u_matrix: new i.aK(B, y.u_matrix), u_overlay: new i.aI(B, y.u_overlay), u_overlay_scale: new i.aJ(B, y.u_overlay_scale) }), clippingMask: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix) }), heatmap: (B, y) => ({ u_extrude_scale: new i.aJ(B, y.u_extrude_scale), u_intensity: new i.aJ(B, y.u_intensity), u_matrix: new i.aK(B, y.u_matrix) }), heatmapTexture: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_world: new i.aP(B, y.u_world), u_image: new i.aI(B, y.u_image), u_color_ramp: new i.aI(B, y.u_color_ramp), u_opacity: new i.aJ(B, y.u_opacity) }), hillshade: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_image: new i.aI(B, y.u_image), u_latrange: new i.aP(B, y.u_latrange), u_light: new i.aP(B, y.u_light), u_shadow: new i.aM(B, y.u_shadow), u_highlight: new i.aM(B, y.u_highlight), u_accent: new i.aM(B, y.u_accent) }), hillshadePrepare: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_image: new i.aI(B, y.u_image), u_dimension: new i.aP(B, y.u_dimension), u_zoom: new i.aJ(B, y.u_zoom), u_unpack: new i.aL(B, y.u_unpack) }), line: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_ratio: new i.aJ(B, y.u_ratio), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_units_to_pixels: new i.aP(B, y.u_units_to_pixels) }), lineGradient: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_ratio: new i.aJ(B, y.u_ratio), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_units_to_pixels: new i.aP(B, y.u_units_to_pixels), u_image: new i.aI(B, y.u_image), u_image_height: new i.aJ(B, y.u_image_height) }), linePattern: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_texsize: new i.aP(B, y.u_texsize), u_ratio: new i.aJ(B, y.u_ratio), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_image: new i.aI(B, y.u_image), u_units_to_pixels: new i.aP(B, y.u_units_to_pixels), u_scale: new i.aO(B, y.u_scale), u_fade: new i.aJ(B, y.u_fade) }), lineSDF: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_ratio: new i.aJ(B, y.u_ratio), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_units_to_pixels: new i.aP(B, y.u_units_to_pixels), u_patternscale_a: new i.aP(B, y.u_patternscale_a), u_patternscale_b: new i.aP(B, y.u_patternscale_b), u_sdfgamma: new i.aJ(B, y.u_sdfgamma), u_image: new i.aI(B, y.u_image), u_tex_y_a: new i.aJ(B, y.u_tex_y_a), u_tex_y_b: new i.aJ(B, y.u_tex_y_b), u_mix: new i.aJ(B, y.u_mix) }), raster: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_tl_parent: new i.aP(B, y.u_tl_parent), u_scale_parent: new i.aJ(B, y.u_scale_parent), u_buffer_scale: new i.aJ(B, y.u_buffer_scale), u_fade_t: new i.aJ(B, y.u_fade_t), u_opacity: new i.aJ(B, y.u_opacity), u_image0: new i.aI(B, y.u_image0), u_image1: new i.aI(B, y.u_image1), u_brightness_low: new i.aJ(B, y.u_brightness_low), u_brightness_high: new i.aJ(B, y.u_brightness_high), u_saturation_factor: new i.aJ(B, y.u_saturation_factor), u_contrast_factor: new i.aJ(B, y.u_contrast_factor), u_spin_weights: new i.aO(B, y.u_spin_weights) }), symbolIcon: (B, y) => ({ u_is_size_zoom_constant: new i.aI(B, y.u_is_size_zoom_constant), u_is_size_feature_constant: new i.aI(B, y.u_is_size_feature_constant), u_size_t: new i.aJ(B, y.u_size_t), u_size: new i.aJ(B, y.u_size), u_camera_to_center_distance: new i.aJ(B, y.u_camera_to_center_distance), u_pitch: new i.aJ(B, y.u_pitch), u_rotate_symbol: new i.aI(B, y.u_rotate_symbol), u_aspect_ratio: new i.aJ(B, y.u_aspect_ratio), u_fade_change: new i.aJ(B, y.u_fade_change), u_matrix: new i.aK(B, y.u_matrix), u_label_plane_matrix: new i.aK(B, y.u_label_plane_matrix), u_coord_matrix: new i.aK(B, y.u_coord_matrix), u_is_text: new i.aI(B, y.u_is_text), u_pitch_with_map: new i.aI(B, y.u_pitch_with_map), u_is_along_line: new i.aI(B, y.u_is_along_line), u_is_variable_anchor: new i.aI(B, y.u_is_variable_anchor), u_texsize: new i.aP(B, y.u_texsize), u_texture: new i.aI(B, y.u_texture), u_translation: new i.aP(B, y.u_translation), u_pitched_scale: new i.aJ(B, y.u_pitched_scale) }), symbolSDF: (B, y) => ({ u_is_size_zoom_constant: new i.aI(B, y.u_is_size_zoom_constant), u_is_size_feature_constant: new i.aI(B, y.u_is_size_feature_constant), u_size_t: new i.aJ(B, y.u_size_t), u_size: new i.aJ(B, y.u_size), u_camera_to_center_distance: new i.aJ(B, y.u_camera_to_center_distance), u_pitch: new i.aJ(B, y.u_pitch), u_rotate_symbol: new i.aI(B, y.u_rotate_symbol), u_aspect_ratio: new i.aJ(B, y.u_aspect_ratio), u_fade_change: new i.aJ(B, y.u_fade_change), u_matrix: new i.aK(B, y.u_matrix), u_label_plane_matrix: new i.aK(B, y.u_label_plane_matrix), u_coord_matrix: new i.aK(B, y.u_coord_matrix), u_is_text: new i.aI(B, y.u_is_text), u_pitch_with_map: new i.aI(B, y.u_pitch_with_map), u_is_along_line: new i.aI(B, y.u_is_along_line), u_is_variable_anchor: new i.aI(B, y.u_is_variable_anchor), u_texsize: new i.aP(B, y.u_texsize), u_texture: new i.aI(B, y.u_texture), u_gamma_scale: new i.aJ(B, y.u_gamma_scale), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_is_halo: new i.aI(B, y.u_is_halo), u_translation: new i.aP(B, y.u_translation), u_pitched_scale: new i.aJ(B, y.u_pitched_scale) }), symbolTextAndIcon: (B, y) => ({ u_is_size_zoom_constant: new i.aI(B, y.u_is_size_zoom_constant), u_is_size_feature_constant: new i.aI(B, y.u_is_size_feature_constant), u_size_t: new i.aJ(B, y.u_size_t), u_size: new i.aJ(B, y.u_size), u_camera_to_center_distance: new i.aJ(B, y.u_camera_to_center_distance), u_pitch: new i.aJ(B, y.u_pitch), u_rotate_symbol: new i.aI(B, y.u_rotate_symbol), u_aspect_ratio: new i.aJ(B, y.u_aspect_ratio), u_fade_change: new i.aJ(B, y.u_fade_change), u_matrix: new i.aK(B, y.u_matrix), u_label_plane_matrix: new i.aK(B, y.u_label_plane_matrix), u_coord_matrix: new i.aK(B, y.u_coord_matrix), u_is_text: new i.aI(B, y.u_is_text), u_pitch_with_map: new i.aI(B, y.u_pitch_with_map), u_is_along_line: new i.aI(B, y.u_is_along_line), u_is_variable_anchor: new i.aI(B, y.u_is_variable_anchor), u_texsize: new i.aP(B, y.u_texsize), u_texsize_icon: new i.aP(B, y.u_texsize_icon), u_texture: new i.aI(B, y.u_texture), u_texture_icon: new i.aI(B, y.u_texture_icon), u_gamma_scale: new i.aJ(B, y.u_gamma_scale), u_device_pixel_ratio: new i.aJ(B, y.u_device_pixel_ratio), u_is_halo: new i.aI(B, y.u_is_halo), u_translation: new i.aP(B, y.u_translation), u_pitched_scale: new i.aJ(B, y.u_pitched_scale) }), background: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_opacity: new i.aJ(B, y.u_opacity), u_color: new i.aM(B, y.u_color) }), backgroundPattern: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_opacity: new i.aJ(B, y.u_opacity), u_image: new i.aI(B, y.u_image), u_pattern_tl_a: new i.aP(B, y.u_pattern_tl_a), u_pattern_br_a: new i.aP(B, y.u_pattern_br_a), u_pattern_tl_b: new i.aP(B, y.u_pattern_tl_b), u_pattern_br_b: new i.aP(B, y.u_pattern_br_b), u_texsize: new i.aP(B, y.u_texsize), u_mix: new i.aJ(B, y.u_mix), u_pattern_size_a: new i.aP(B, y.u_pattern_size_a), u_pattern_size_b: new i.aP(B, y.u_pattern_size_b), u_scale_a: new i.aJ(B, y.u_scale_a), u_scale_b: new i.aJ(B, y.u_scale_b), u_pixel_coord_upper: new i.aP(B, y.u_pixel_coord_upper), u_pixel_coord_lower: new i.aP(B, y.u_pixel_coord_lower), u_tile_units_to_pixels: new i.aJ(B, y.u_tile_units_to_pixels) }), terrain: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_texture: new i.aI(B, y.u_texture), u_ele_delta: new i.aJ(B, y.u_ele_delta), u_fog_matrix: new i.aK(B, y.u_fog_matrix), u_fog_color: new i.aM(B, y.u_fog_color), u_fog_ground_blend: new i.aJ(B, y.u_fog_ground_blend), u_fog_ground_blend_opacity: new i.aJ(B, y.u_fog_ground_blend_opacity), u_horizon_color: new i.aM(B, y.u_horizon_color), u_horizon_fog_blend: new i.aJ(B, y.u_horizon_fog_blend) }), terrainDepth: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_ele_delta: new i.aJ(B, y.u_ele_delta) }), terrainCoords: (B, y) => ({ u_matrix: new i.aK(B, y.u_matrix), u_texture: new i.aI(B, y.u_texture), u_terrain_coords_id: new i.aJ(B, y.u_terrain_coords_id), u_ele_delta: new i.aJ(B, y.u_ele_delta) }), sky: (B, y) => ({ u_sky_color: new i.aM(B, y.u_sky_color), u_horizon_color: new i.aM(B, y.u_horizon_color), u_horizon: new i.aJ(B, y.u_horizon), u_sky_horizon_blend: new i.aJ(B, y.u_sky_horizon_blend) }) };
            class Br {
              constructor(y, b, R) {
                this.context = y;
                const j = y.gl;
                this.buffer = j.createBuffer(), this.dynamicDraw = !!R, this.context.unbindVAO(), y.bindElementBuffer.set(this.buffer), j.bufferData(j.ELEMENT_ARRAY_BUFFER, b.arrayBuffer, this.dynamicDraw ? j.DYNAMIC_DRAW : j.STATIC_DRAW), this.dynamicDraw || delete b.arrayBuffer;
              }
              bind() {
                this.context.bindElementBuffer.set(this.buffer);
              }
              updateData(y) {
                const b = this.context.gl;
                if (!this.dynamicDraw) throw new Error("Attempted to update data while not in dynamic mode.");
                this.context.unbindVAO(), this.bind(), b.bufferSubData(b.ELEMENT_ARRAY_BUFFER, 0, y.arrayBuffer);
              }
              destroy() {
                const y = this.context.gl;
                this.buffer && (y.deleteBuffer(this.buffer), delete this.buffer);
              }
            }
            const Yr = { Int8: "BYTE", Uint8: "UNSIGNED_BYTE", Int16: "SHORT", Uint16: "UNSIGNED_SHORT", Int32: "INT", Uint32: "UNSIGNED_INT", Float32: "FLOAT" };
            class yi {
              constructor(y, b, R, j) {
                this.length = b.length, this.attributes = R, this.itemSize = b.bytesPerElement, this.dynamicDraw = j, this.context = y;
                const G = y.gl;
                this.buffer = G.createBuffer(), y.bindVertexBuffer.set(this.buffer), G.bufferData(G.ARRAY_BUFFER, b.arrayBuffer, this.dynamicDraw ? G.DYNAMIC_DRAW : G.STATIC_DRAW), this.dynamicDraw || delete b.arrayBuffer;
              }
              bind() {
                this.context.bindVertexBuffer.set(this.buffer);
              }
              updateData(y) {
                if (y.length !== this.length) throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);
                const b = this.context.gl;
                this.bind(), b.bufferSubData(b.ARRAY_BUFFER, 0, y.arrayBuffer);
              }
              enableAttributes(y, b) {
                for (let R = 0; R < this.attributes.length; R++) {
                  const j = this.attributes[R], G = b.attributes[j.name];
                  G !== void 0 && y.enableVertexAttribArray(G);
                }
              }
              setVertexAttribPointers(y, b, R) {
                for (let j = 0; j < this.attributes.length; j++) {
                  const G = this.attributes[j], ie = b.attributes[G.name];
                  ie !== void 0 && y.vertexAttribPointer(ie, G.components, y[Yr[G.type]], !1, this.itemSize, G.offset + this.itemSize * (R || 0));
                }
              }
              destroy() {
                const y = this.context.gl;
                this.buffer && (y.deleteBuffer(this.buffer), delete this.buffer);
              }
            }
            const si = /* @__PURE__ */ new WeakMap();
            function Pa(B) {
              var y;
              if (si.has(B)) return si.get(B);
              {
                const b = (y = B.getParameter(B.VERSION)) === null || y === void 0 ? void 0 : y.startsWith("WebGL 2.0");
                return si.set(B, b), b;
              }
            }
            class Ni {
              constructor(y) {
                this.gl = y.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1;
              }
              get() {
                return this.current;
              }
              set(y) {
              }
              getDefault() {
                return this.default;
              }
              setDefault() {
                this.set(this.default);
              }
            }
            class To extends Ni {
              getDefault() {
                return i.aN.transparent;
              }
              set(y) {
                const b = this.current;
                (y.r !== b.r || y.g !== b.g || y.b !== b.b || y.a !== b.a || this.dirty) && (this.gl.clearColor(y.r, y.g, y.b, y.a), this.current = y, this.dirty = !1);
              }
            }
            class Ba extends Ni {
              getDefault() {
                return 1;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.clearDepth(y), this.current = y, this.dirty = !1);
              }
            }
            class eo extends Ni {
              getDefault() {
                return 0;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.clearStencil(y), this.current = y, this.dirty = !1);
              }
            }
            class Ds extends Ni {
              getDefault() {
                return [!0, !0, !0, !0];
              }
              set(y) {
                const b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || y[3] !== b[3] || this.dirty) && (this.gl.colorMask(y[0], y[1], y[2], y[3]), this.current = y, this.dirty = !1);
              }
            }
            class ji extends Ni {
              getDefault() {
                return !0;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.depthMask(y), this.current = y, this.dirty = !1);
              }
            }
            class Ao extends Ni {
              getDefault() {
                return 255;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.stencilMask(y), this.current = y, this.dirty = !1);
              }
            }
            class dl extends Ni {
              getDefault() {
                return { func: this.gl.ALWAYS, ref: 0, mask: 255 };
              }
              set(y) {
                const b = this.current;
                (y.func !== b.func || y.ref !== b.ref || y.mask !== b.mask || this.dirty) && (this.gl.stencilFunc(y.func, y.ref, y.mask), this.current = y, this.dirty = !1);
              }
            }
            class So extends Ni {
              getDefault() {
                const y = this.gl;
                return [y.KEEP, y.KEEP, y.KEEP];
              }
              set(y) {
                const b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || this.dirty) && (this.gl.stencilOp(y[0], y[1], y[2]), this.current = y, this.dirty = !1);
              }
            }
            class Pu extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                y ? b.enable(b.STENCIL_TEST) : b.disable(b.STENCIL_TEST), this.current = y, this.dirty = !1;
              }
            }
            class go extends Ni {
              getDefault() {
                return [0, 1];
              }
              set(y) {
                const b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || this.dirty) && (this.gl.depthRange(y[0], y[1]), this.current = y, this.dirty = !1);
              }
            }
            class Vi extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                y ? b.enable(b.DEPTH_TEST) : b.disable(b.DEPTH_TEST), this.current = y, this.dirty = !1;
              }
            }
            class Ml extends Ni {
              getDefault() {
                return this.gl.LESS;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.depthFunc(y), this.current = y, this.dirty = !1);
              }
            }
            class pl extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                y ? b.enable(b.BLEND) : b.disable(b.BLEND), this.current = y, this.dirty = !1;
              }
            }
            class Zl extends Ni {
              getDefault() {
                const y = this.gl;
                return [y.ONE, y.ZERO];
              }
              set(y) {
                const b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || this.dirty) && (this.gl.blendFunc(y[0], y[1]), this.current = y, this.dirty = !1);
              }
            }
            class vs extends Ni {
              getDefault() {
                return i.aN.transparent;
              }
              set(y) {
                const b = this.current;
                (y.r !== b.r || y.g !== b.g || y.b !== b.b || y.a !== b.a || this.dirty) && (this.gl.blendColor(y.r, y.g, y.b, y.a), this.current = y, this.dirty = !1);
              }
            }
            class Xl extends Ni {
              getDefault() {
                return this.gl.FUNC_ADD;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.blendEquation(y), this.current = y, this.dirty = !1);
              }
            }
            class xs extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                y ? b.enable(b.CULL_FACE) : b.disable(b.CULL_FACE), this.current = y, this.dirty = !1;
              }
            }
            class ja extends Ni {
              getDefault() {
                return this.gl.BACK;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.cullFace(y), this.current = y, this.dirty = !1);
              }
            }
            class Mo extends Ni {
              getDefault() {
                return this.gl.CCW;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.frontFace(y), this.current = y, this.dirty = !1);
              }
            }
            class Kl extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.useProgram(y), this.current = y, this.dirty = !1);
              }
            }
            class Xs extends Ni {
              getDefault() {
                return this.gl.TEXTURE0;
              }
              set(y) {
                (y !== this.current || this.dirty) && (this.gl.activeTexture(y), this.current = y, this.dirty = !1);
              }
            }
            class El extends Ni {
              getDefault() {
                const y = this.gl;
                return [0, 0, y.drawingBufferWidth, y.drawingBufferHeight];
              }
              set(y) {
                const b = this.current;
                (y[0] !== b[0] || y[1] !== b[1] || y[2] !== b[2] || y[3] !== b[3] || this.dirty) && (this.gl.viewport(y[0], y[1], y[2], y[3]), this.current = y, this.dirty = !1);
              }
            }
            class Jl extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.bindFramebuffer(b.FRAMEBUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class ml extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.bindRenderbuffer(b.RENDERBUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class mu extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.bindTexture(b.TEXTURE_2D, y), this.current = y, this.dirty = !1;
              }
            }
            class gu extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.bindBuffer(b.ARRAY_BUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class Ql extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                const b = this.gl;
                b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class Wo extends Ni {
              getDefault() {
                return null;
              }
              set(y) {
                var b;
                if (y === this.current && !this.dirty) return;
                const R = this.gl;
                Pa(R) ? R.bindVertexArray(y) : (b = R.getExtension("OES_vertex_array_object")) === null || b === void 0 || b.bindVertexArrayOES(y), this.current = y, this.dirty = !1;
              }
            }
            class Mc extends Ni {
              getDefault() {
                return 4;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.pixelStorei(b.UNPACK_ALIGNMENT, y), this.current = y, this.dirty = !1;
              }
            }
            class Xu extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL, y), this.current = y, this.dirty = !1;
              }
            }
            class yu extends Ni {
              getDefault() {
                return !1;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                const b = this.gl;
                b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL, y), this.current = y, this.dirty = !1;
              }
            }
            class ef extends Ni {
              constructor(y, b) {
                super(y), this.context = y, this.parent = b;
              }
              getDefault() {
                return null;
              }
            }
            class tf extends ef {
              setDirty() {
                this.dirty = !0;
              }
              set(y) {
                if (y === this.current && !this.dirty) return;
                this.context.bindFramebuffer.set(this.parent);
                const b = this.gl;
                b.framebufferTexture2D(b.FRAMEBUFFER, b.COLOR_ATTACHMENT0, b.TEXTURE_2D, y, 0), this.current = y, this.dirty = !1;
              }
            }
            class bs extends ef {
              set(y) {
                if (y === this.current && !this.dirty) return;
                this.context.bindFramebuffer.set(this.parent);
                const b = this.gl;
                b.framebufferRenderbuffer(b.FRAMEBUFFER, b.DEPTH_ATTACHMENT, b.RENDERBUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class Ec extends ef {
              set(y) {
                if (y === this.current && !this.dirty) return;
                this.context.bindFramebuffer.set(this.parent);
                const b = this.gl;
                b.framebufferRenderbuffer(b.FRAMEBUFFER, b.DEPTH_STENCIL_ATTACHMENT, b.RENDERBUFFER, y), this.current = y, this.dirty = !1;
              }
            }
            class mh {
              constructor(y, b, R, j, G) {
                this.context = y, this.width = b, this.height = R;
                const ie = y.gl, fe = this.framebuffer = ie.createFramebuffer();
                if (this.colorAttachment = new tf(y, fe), j) this.depthAttachment = G ? new Ec(y, fe) : new bs(y, fe);
                else if (G) throw new Error("Stencil cannot be set without depth");
                if (ie.checkFramebufferStatus(ie.FRAMEBUFFER) !== ie.FRAMEBUFFER_COMPLETE) throw new Error("Framebuffer is not complete");
              }
              destroy() {
                const y = this.context.gl, b = this.colorAttachment.get();
                if (b && y.deleteTexture(b), this.depthAttachment) {
                  const R = this.depthAttachment.get();
                  R && y.deleteRenderbuffer(R);
                }
                y.deleteFramebuffer(this.framebuffer);
              }
            }
            class Eo {
              constructor(y, b, R) {
                this.blendFunction = y, this.blendColor = b, this.mask = R;
              }
            }
            Eo.Replace = [1, 0], Eo.disabled = new Eo(Eo.Replace, i.aN.transparent, [!1, !1, !1, !1]), Eo.unblended = new Eo(Eo.Replace, i.aN.transparent, [!0, !0, !0, !0]), Eo.alphaBlended = new Eo([1, 771], i.aN.transparent, [!0, !0, !0, !0]);
            class ac {
              constructor(y) {
                var b, R;
                if (this.gl = y, this.clearColor = new To(this), this.clearDepth = new Ba(this), this.clearStencil = new eo(this), this.colorMask = new Ds(this), this.depthMask = new ji(this), this.stencilMask = new Ao(this), this.stencilFunc = new dl(this), this.stencilOp = new So(this), this.stencilTest = new Pu(this), this.depthRange = new go(this), this.depthTest = new Vi(this), this.depthFunc = new Ml(this), this.blend = new pl(this), this.blendFunc = new Zl(this), this.blendColor = new vs(this), this.blendEquation = new Xl(this), this.cullFace = new xs(this), this.cullFaceSide = new ja(this), this.frontFace = new Mo(this), this.program = new Kl(this), this.activeTexture = new Xs(this), this.viewport = new El(this), this.bindFramebuffer = new Jl(this), this.bindRenderbuffer = new ml(this), this.bindTexture = new mu(this), this.bindVertexBuffer = new gu(this), this.bindElementBuffer = new Ql(this), this.bindVertexArray = new Wo(this), this.pixelStoreUnpack = new Mc(this), this.pixelStoreUnpackPremultiplyAlpha = new Xu(this), this.pixelStoreUnpackFlipY = new yu(this), this.extTextureFilterAnisotropic = y.getExtension("EXT_texture_filter_anisotropic") || y.getExtension("MOZ_EXT_texture_filter_anisotropic") || y.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = y.getParameter(y.MAX_TEXTURE_SIZE), Pa(y)) {
                  this.HALF_FLOAT = y.HALF_FLOAT;
                  const j = y.getExtension("EXT_color_buffer_half_float");
                  this.RGBA16F = (b = y.RGBA16F) !== null && b !== void 0 ? b : j == null ? void 0 : j.RGBA16F_EXT, this.RGB16F = (R = y.RGB16F) !== null && R !== void 0 ? R : j == null ? void 0 : j.RGB16F_EXT, y.getExtension("EXT_color_buffer_float");
                } else {
                  y.getExtension("EXT_color_buffer_half_float"), y.getExtension("OES_texture_half_float_linear");
                  const j = y.getExtension("OES_texture_half_float");
                  this.HALF_FLOAT = j == null ? void 0 : j.HALF_FLOAT_OES;
                }
              }
              setDefault() {
                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();
              }
              setDirty() {
                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;
              }
              createIndexBuffer(y, b) {
                return new Br(this, y, b);
              }
              createVertexBuffer(y, b, R) {
                return new yi(this, y, b, R);
              }
              createRenderbuffer(y, b, R) {
                const j = this.gl, G = j.createRenderbuffer();
                return this.bindRenderbuffer.set(G), j.renderbufferStorage(j.RENDERBUFFER, y, b, R), this.bindRenderbuffer.set(null), G;
              }
              createFramebuffer(y, b, R, j) {
                return new mh(this, y, b, R, j);
              }
              clear({ color: y, depth: b, stencil: R }) {
                const j = this.gl;
                let G = 0;
                y && (G |= j.COLOR_BUFFER_BIT, this.clearColor.set(y), this.colorMask.set([!0, !0, !0, !0])), b !== void 0 && (G |= j.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(b), this.depthMask.set(!0)), R !== void 0 && (G |= j.STENCIL_BUFFER_BIT, this.clearStencil.set(R), this.stencilMask.set(255)), j.clear(G);
              }
              setCullFace(y) {
                y.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(y.mode), this.frontFace.set(y.frontFace));
              }
              setDepthMode(y) {
                y.func !== this.gl.ALWAYS || y.mask ? (this.depthTest.set(!0), this.depthFunc.set(y.func), this.depthMask.set(y.mask), this.depthRange.set(y.range)) : this.depthTest.set(!1);
              }
              setStencilMode(y) {
                y.test.func !== this.gl.ALWAYS || y.mask ? (this.stencilTest.set(!0), this.stencilMask.set(y.mask), this.stencilOp.set([y.fail, y.depthFail, y.pass]), this.stencilFunc.set({ func: y.test.func, ref: y.ref, mask: y.test.mask })) : this.stencilTest.set(!1);
              }
              setColorMode(y) {
                i.aF(y.blendFunction, Eo.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(y.blendFunction), this.blendColor.set(y.blendColor)), this.colorMask.set(y.mask);
              }
              createVertexArray() {
                var y;
                return Pa(this.gl) ? this.gl.createVertexArray() : (y = this.gl.getExtension("OES_vertex_array_object")) === null || y === void 0 ? void 0 : y.createVertexArrayOES();
              }
              deleteVertexArray(y) {
                var b;
                return Pa(this.gl) ? this.gl.deleteVertexArray(y) : (b = this.gl.getExtension("OES_vertex_array_object")) === null || b === void 0 ? void 0 : b.deleteVertexArrayOES(y);
              }
              unbindVAO() {
                this.bindVertexArray.set(null);
              }
            }
            class Xi {
              constructor(y, b, R) {
                this.func = y, this.mask = b, this.range = R;
              }
            }
            Xi.ReadOnly = !1, Xi.ReadWrite = !0, Xi.disabled = new Xi(519, Xi.ReadOnly, [0, 1]);
            const eu = 7680;
            class Ma {
              constructor(y, b, R, j, G, ie) {
                this.test = y, this.ref = b, this.mask = R, this.fail = j, this.depthFail = G, this.pass = ie;
              }
            }
            Ma.disabled = new Ma({ func: 519, mask: 0 }, 0, 0, eu, eu, eu);
            class Ea {
              constructor(y, b, R) {
                this.enable = y, this.mode = b, this.frontFace = R;
              }
            }
            let Ls;
            function Bs(B, y, b, R, j) {
              const G = B.context, ie = G.gl, fe = B.useProgram("collisionBox"), xe = [];
              let Te = 0, ze = 0;
              for (let zt = 0; zt < R.length; zt++) {
                const It = R[zt], jt = y.getTile(It).getBucket(b);
                if (!jt) continue;
                const Lt = j ? jt.textCollisionBox : jt.iconCollisionBox, Zt = jt.collisionCircleArray;
                if (Zt.length > 0) {
                  const Qt = i.H();
                  i.aR(Qt, jt.placementInvProjMatrix, B.transform.glCoordMatrix), i.aR(Qt, Qt, jt.placementViewportMatrix), xe.push({ circleArray: Zt, circleOffset: ze, transform: It.posMatrix, invTransform: Qt, coord: It }), Te += Zt.length / 4, ze = Te;
                }
                Lt && fe.draw(G, ie.LINES, Xi.disabled, Ma.disabled, B.colorModeForRenderPass(), Ea.disabled, on(B.transform, It.posMatrix), B.style.map.terrain && B.style.map.terrain.getTerrainData(It), b.id, Lt.layoutVertexBuffer, Lt.indexBuffer, Lt.segments, null, B.transform.zoom, null, null, Lt.collisionVertexBuffer);
              }
              if (!j || !xe.length) return;
              const Ve = B.useProgram("collisionCircle"), ut = new i.aS();
              ut.resize(4 * Te), ut._trim();
              let gt = 0;
              for (const zt of xe) for (let It = 0; It < zt.circleArray.length / 4; It++) {
                const jt = 4 * It, Lt = zt.circleArray[jt + 0], Zt = zt.circleArray[jt + 1], Qt = zt.circleArray[jt + 2], Xt = zt.circleArray[jt + 3];
                ut.emplace(gt++, Lt, Zt, Qt, Xt, 0), ut.emplace(gt++, Lt, Zt, Qt, Xt, 1), ut.emplace(gt++, Lt, Zt, Qt, Xt, 2), ut.emplace(gt++, Lt, Zt, Qt, Xt, 3);
              }
              (!Ls || Ls.length < 2 * Te) && (Ls = function(zt) {
                const It = 2 * zt, jt = new i.aU();
                jt.resize(It), jt._trim();
                for (let Lt = 0; Lt < It; Lt++) {
                  const Zt = 6 * Lt;
                  jt.uint16[Zt + 0] = 4 * Lt + 0, jt.uint16[Zt + 1] = 4 * Lt + 1, jt.uint16[Zt + 2] = 4 * Lt + 2, jt.uint16[Zt + 3] = 4 * Lt + 2, jt.uint16[Zt + 4] = 4 * Lt + 3, jt.uint16[Zt + 5] = 4 * Lt + 0;
                }
                return jt;
              }(Te));
              const wt = G.createIndexBuffer(Ls, !0), Et = G.createVertexBuffer(ut, i.aT.members, !0);
              for (const zt of xe) {
                const It = ln(zt.transform, zt.invTransform, B.transform);
                Ve.draw(G, ie.TRIANGLES, Xi.disabled, Ma.disabled, B.colorModeForRenderPass(), Ea.disabled, It, B.style.map.terrain && B.style.map.terrain.getTerrainData(zt.coord), b.id, Et, wt, i.a0.simpleSegment(0, 2 * zt.circleOffset, zt.circleArray.length, zt.circleArray.length / 2), null, B.transform.zoom, null, null, null);
              }
              Et.destroy(), wt.destroy();
            }
            Ea.disabled = new Ea(!1, 1029, 2305), Ea.backCCW = new Ea(!0, 1029, 2305);
            const oc = i.ao(new Float32Array(16));
            function tu(B, y, b, R, j) {
              if (B.renderPass !== "translucent") return;
              const G = Ma.disabled, ie = B.colorModeForRenderPass();
              (b._unevaluatedLayout.hasValue("text-variable-anchor") || b._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(fe, xe, Te, ze, Ve, ut, gt, wt, Et) {
                const zt = xe.transform, It = Rn(), jt = Ve === "map", Lt = ut === "map";
                for (const Zt of fe) {
                  const Qt = ze.getTile(Zt), Xt = Qt.getBucket(Te);
                  if (!Xt || !Xt.text || !Xt.text.segments.get().length) continue;
                  const yn = Xt.textSizeData, Sn = i.ah(yn, zt.zoom), Un = Ot(Qt, 1, xe.transform.zoom), Vn = $t(Zt.posMatrix, Lt, jt, xe.transform, Un), Yn = Te.layout.get("icon-text-fit") !== "none" && Xt.hasIconData();
                  if (Sn) {
                    const er = Math.pow(2, zt.zoom - Qt.tileID.overscaledZ), kr = xe.style.map.terrain ? (Mr, fr) => xe.style.map.terrain.getElevation(Zt, Mr, fr) : null, or = It.translatePosition(zt, Qt, gt, wt);
                    Co(Xt, jt, Lt, Et, zt, Vn, Zt.posMatrix, er, Sn, Yn, It, or, Zt.toUnwrapped(), kr);
                  }
                }
              }(R, B, b, y, b.layout.get("text-rotation-alignment"), b.layout.get("text-pitch-alignment"), b.paint.get("text-translate"), b.paint.get("text-translate-anchor"), j), b.paint.get("icon-opacity").constantOr(1) !== 0 && Ou(B, y, b, R, !1, b.paint.get("icon-translate"), b.paint.get("icon-translate-anchor"), b.layout.get("icon-rotation-alignment"), b.layout.get("icon-pitch-alignment"), b.layout.get("icon-keep-upright"), G, ie), b.paint.get("text-opacity").constantOr(1) !== 0 && Ou(B, y, b, R, !0, b.paint.get("text-translate"), b.paint.get("text-translate-anchor"), b.layout.get("text-rotation-alignment"), b.layout.get("text-pitch-alignment"), b.layout.get("text-keep-upright"), G, ie), y.map.showCollisionBoxes && (Bs(B, y, b, R, !0), Bs(B, y, b, R, !1));
            }
            function _s(B, y, b, R, j, G) {
              const { horizontalAlign: ie, verticalAlign: fe } = i.av(B), xe = -(ie - 0.5) * y, Te = -(fe - 0.5) * b;
              return new i.P((xe / j + R[0]) * G, (Te / j + R[1]) * G);
            }
            function Ps(B, y, b, R, j, G) {
              const ie = y.tileAnchorPoint.add(new i.P(y.translation[0], y.translation[1]));
              if (y.pitchWithMap) {
                let fe = R.mult(G);
                return b || (fe = fe.rotate(-j)), Wt(ie.add(fe), y.labelPlaneMatrix, y.getElevation).point;
              }
              if (b) {
                const fe = Fe(y.tileAnchorPoint.x + 1, y.tileAnchorPoint.y, y).point.sub(B), xe = Math.atan(fe.y / fe.x) + (fe.x < 0 ? Math.PI : 0);
                return B.add(R.rotate(xe));
              }
              return B.add(R);
            }
            function Co(B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve, ut, gt) {
              const wt = B.text.placedSymbolArray, Et = B.text.dynamicLayoutVertexArray, zt = B.icon.dynamicLayoutVertexArray, It = {};
              Et.clear();
              for (let jt = 0; jt < wt.length; jt++) {
                const Lt = wt.get(jt), Zt = B.allowVerticalPlacement && !Lt.placedOrientation, Qt = Lt.hidden || !Lt.crossTileID || Zt ? null : R[Lt.crossTileID];
                if (Qt) {
                  const Xt = new i.P(Lt.anchorX, Lt.anchorY), yn = { getElevation: gt, width: j.width, height: j.height, labelPlaneMatrix: G, lineVertexArray: null, pitchWithMap: b, projection: ze, projectionCache: null, tileAnchorPoint: Xt, translation: Ve, unwrappedTileID: ut }, Sn = b ? Wt(Xt, ie, gt) : Fe(Xt.x, Xt.y, yn), Un = mt(j.cameraToCenterDistance, Sn.signedDistanceFromCamera);
                  let Vn = i.aj(B.textSizeData, xe, Lt) * Un / i.aq;
                  b && (Vn *= B.tilePixelRatio / fe);
                  const { width: Yn, height: er, anchor: kr, textOffset: or, textBoxScale: Mr } = Qt, fr = _s(kr, Yn, er, or, Mr, Vn), Or = ze.getPitchedTextCorrection(j, Xt.add(new i.P(Ve[0], Ve[1])), ut), br = Ps(Sn.point, yn, y, fr, j.angle, Or), Nr = B.allowVerticalPlacement && Lt.placedOrientation === i.ai.vertical ? Math.PI / 2 : 0;
                  for (let ii = 0; ii < Lt.numGlyphs; ii++) i.ak(Et, br, Nr);
                  Te && Lt.associatedIconIndex >= 0 && (It[Lt.associatedIconIndex] = { shiftedAnchor: br, angle: Nr });
                } else Ft(Lt.numGlyphs, Et);
              }
              if (Te) {
                zt.clear();
                const jt = B.icon.placedSymbolArray;
                for (let Lt = 0; Lt < jt.length; Lt++) {
                  const Zt = jt.get(Lt);
                  if (Zt.hidden) Ft(Zt.numGlyphs, zt);
                  else {
                    const Qt = It[Lt];
                    if (Qt) for (let Xt = 0; Xt < Zt.numGlyphs; Xt++) i.ak(zt, Qt.shiftedAnchor, Qt.angle);
                    else Ft(Zt.numGlyphs, zt);
                  }
                }
                B.icon.dynamicLayoutVertexBuffer.updateData(zt);
              }
              B.text.dynamicLayoutVertexBuffer.updateData(Et);
            }
            function da(B, y, b) {
              return b.iconsInText && y ? "symbolTextAndIcon" : B ? "symbolSDF" : "symbolIcon";
            }
            function Ou(B, y, b, R, j, G, ie, fe, xe, Te, ze, Ve) {
              const ut = B.context, gt = ut.gl, wt = B.transform, Et = Rn(), zt = fe === "map", It = xe === "map", jt = fe !== "viewport" && b.layout.get("symbol-placement") !== "point", Lt = zt && !It && !jt, Zt = !It && jt, Qt = !b.layout.get("symbol-sort-key").isConstant();
              let Xt = !1;
              const yn = B.depthModeForSublayer(0, Xi.ReadOnly), Sn = b._unevaluatedLayout.hasValue("text-variable-anchor") || b._unevaluatedLayout.hasValue("text-variable-anchor-offset"), Un = [], Vn = Et.getCircleRadiusCorrection(wt);
              for (const Yn of R) {
                const er = y.getTile(Yn), kr = er.getBucket(b);
                if (!kr) continue;
                const or = j ? kr.text : kr.icon;
                if (!or || !or.segments.get().length || !or.hasVisibleVertices) continue;
                const Mr = or.programConfigurations.get(b.id), fr = j || kr.sdfIcons, Or = j ? kr.textSizeData : kr.iconSizeData, br = It || wt.pitch !== 0, Nr = B.useProgram(da(fr, j, kr), Mr), ii = i.ah(Or, wt.zoom), Rr = B.style.map.terrain && B.style.map.terrain.getTerrainData(Yn);
                let ei, pi, qi, Li, Yi = [0, 0], Gi = null;
                if (j) {
                  if (pi = er.glyphAtlasTexture, qi = gt.LINEAR, ei = er.glyphAtlasTexture.size, kr.iconsInText) {
                    Yi = er.imageAtlasTexture.size, Gi = er.imageAtlasTexture;
                    const Hi = Or.kind === "composite" || Or.kind === "camera";
                    Li = br || B.options.rotating || B.options.zooming || Hi ? gt.LINEAR : gt.NEAREST;
                  }
                } else {
                  const Hi = b.layout.get("icon-size").constantOr(0) !== 1 || kr.iconsNeedLinear;
                  pi = er.imageAtlasTexture, qi = fr || B.options.rotating || B.options.zooming || Hi || br ? gt.LINEAR : gt.NEAREST, ei = er.imageAtlasTexture.size;
                }
                const ra = Ot(er, 1, B.transform.zoom), wa = Zt ? Yn.posMatrix : oc, uo = $t(wa, It, zt, B.transform, ra), no = Gt(wa, It, zt, B.transform, ra), Ko = Gt(Yn.posMatrix, It, zt, B.transform, ra), Ia = Et.translatePosition(B.transform, er, G, ie), ca = Sn && kr.hasTextData(), Ga = b.layout.get("icon-text-fit") !== "none" && ca && kr.hasIconData();
                if (jt) {
                  const Hi = B.style.map.terrain ? ($o, Nl) => B.style.map.terrain.getElevation(Yn, $o, Nl) : null, As = b.layout.get("text-rotation-alignment") === "map";
                  vt(kr, Yn.posMatrix, B, j, uo, Ko, It, Te, As, Et, Yn.toUnwrapped(), wt.width, wt.height, Ia, Hi);
                }
                const Oa = Yn.posMatrix, ba = j && Sn || Ga, Da = jt || ba ? oc : uo, Ua = no, pa = fr && b.paint.get(j ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
                let lu;
                lu = fr ? kr.iconsInText ? Dr(Or.kind, ii, Lt, It, jt, ba, B, Oa, Da, Ua, Ia, ei, Yi, Vn) : Sr(Or.kind, ii, Lt, It, jt, ba, B, Oa, Da, Ua, Ia, j, ei, !0, Vn) : Er(Or.kind, ii, Lt, It, jt, ba, B, Oa, Da, Ua, Ia, j, ei, Vn);
                const xo = { program: Nr, buffers: or, uniformValues: lu, atlasTexture: pi, atlasTextureIcon: Gi, atlasInterpolation: qi, atlasInterpolationIcon: Li, isSDF: fr, hasHalo: pa };
                if (Qt && kr.canOverlap) {
                  Xt = !0;
                  const Hi = or.segments.get();
                  for (const As of Hi) Un.push({ segments: new i.a0([As]), sortKey: As.sortKey, state: xo, terrainData: Rr });
                } else Un.push({ segments: or.segments, sortKey: 0, state: xo, terrainData: Rr });
              }
              Xt && Un.sort((Yn, er) => Yn.sortKey - er.sortKey);
              for (const Yn of Un) {
                const er = Yn.state;
                if (ut.activeTexture.set(gt.TEXTURE0), er.atlasTexture.bind(er.atlasInterpolation, gt.CLAMP_TO_EDGE), er.atlasTextureIcon && (ut.activeTexture.set(gt.TEXTURE1), er.atlasTextureIcon && er.atlasTextureIcon.bind(er.atlasInterpolationIcon, gt.CLAMP_TO_EDGE)), er.isSDF) {
                  const kr = er.uniformValues;
                  er.hasHalo && (kr.u_is_halo = 1, pf(er.buffers, Yn.segments, b, B, er.program, yn, ze, Ve, kr, Yn.terrainData)), kr.u_is_halo = 0;
                }
                pf(er.buffers, Yn.segments, b, B, er.program, yn, ze, Ve, er.uniformValues, Yn.terrainData);
              }
            }
            function pf(B, y, b, R, j, G, ie, fe, xe, Te) {
              const ze = R.context, Ve = ze.gl;
              j.draw(ze, Ve.TRIANGLES, G, ie, fe, Ea.disabled, xe, Te, b.id, B.layoutVertexBuffer, B.indexBuffer, y, b.paint, R.transform.zoom, B.programConfigurations.get(b.id), B.dynamicLayoutVertexBuffer, B.opacityVertexBuffer);
            }
            function nu(B, y, b, R) {
              if (b.paint.get("heatmap-opacity") !== 0) if (B.renderPass === "offscreen") {
                const j = B.context, G = j.gl, ie = Ma.disabled, fe = new Eo([G.ONE, G.ONE], i.aN.transparent, [!0, !0, !0, !0]);
                (function(xe, Te, ze) {
                  const Ve = xe.gl;
                  xe.activeTexture.set(Ve.TEXTURE1), xe.viewport.set([0, 0, Te.width / 4, Te.height / 4]);
                  let ut = ze.heatmapFbo;
                  if (ut) Ve.bindTexture(Ve.TEXTURE_2D, ut.colorAttachment.get()), xe.bindFramebuffer.set(ut.framebuffer);
                  else {
                    const gt = Ve.createTexture();
                    Ve.bindTexture(Ve.TEXTURE_2D, gt), Ve.texParameteri(Ve.TEXTURE_2D, Ve.TEXTURE_WRAP_S, Ve.CLAMP_TO_EDGE), Ve.texParameteri(Ve.TEXTURE_2D, Ve.TEXTURE_WRAP_T, Ve.CLAMP_TO_EDGE), Ve.texParameteri(Ve.TEXTURE_2D, Ve.TEXTURE_MIN_FILTER, Ve.LINEAR), Ve.texParameteri(Ve.TEXTURE_2D, Ve.TEXTURE_MAG_FILTER, Ve.LINEAR), ut = ze.heatmapFbo = xe.createFramebuffer(Te.width / 4, Te.height / 4, !1, !1), function(wt, Et, zt, It) {
                      var jt, Lt;
                      const Zt = wt.gl, Qt = (jt = wt.HALF_FLOAT) !== null && jt !== void 0 ? jt : Zt.UNSIGNED_BYTE, Xt = (Lt = wt.RGBA16F) !== null && Lt !== void 0 ? Lt : Zt.RGBA;
                      Zt.texImage2D(Zt.TEXTURE_2D, 0, Xt, Et.width / 4, Et.height / 4, 0, Zt.RGBA, Qt, null), It.colorAttachment.set(zt);
                    }(xe, Te, gt, ut);
                  }
                })(j, B, b), j.clear({ color: i.aN.transparent });
                for (let xe = 0; xe < R.length; xe++) {
                  const Te = R[xe];
                  if (y.hasRenderableParent(Te)) continue;
                  const ze = y.getTile(Te), Ve = ze.getBucket(b);
                  if (!Ve) continue;
                  const ut = Ve.programConfigurations.get(b.id), gt = B.useProgram("heatmap", ut), { zoom: wt } = B.transform;
                  gt.draw(j, G.TRIANGLES, Xi.disabled, ie, fe, Ea.disabled, jn(Te.posMatrix, ze, wt, b.paint.get("heatmap-intensity")), null, b.id, Ve.layoutVertexBuffer, Ve.indexBuffer, Ve.segments, b.paint, B.transform.zoom, ut);
                }
                j.viewport.set([0, 0, B.width, B.height]);
              } else B.renderPass === "translucent" && (B.context.setColorMode(B.colorModeForRenderPass()), function(j, G) {
                const ie = j.context, fe = ie.gl, xe = G.heatmapFbo;
                if (!xe) return;
                ie.activeTexture.set(fe.TEXTURE0), fe.bindTexture(fe.TEXTURE_2D, xe.colorAttachment.get()), ie.activeTexture.set(fe.TEXTURE1);
                let Te = G.colorRampTexture;
                Te || (Te = G.colorRampTexture = new O(ie, G.colorRamp, fe.RGBA)), Te.bind(fe.LINEAR, fe.CLAMP_TO_EDGE), j.useProgram("heatmapTexture").draw(ie, fe.TRIANGLES, Xi.disabled, Ma.disabled, j.colorModeForRenderPass(), Ea.disabled, Jn(j, G, 0, 1), null, G.id, j.viewportBuffer, j.quadTriangleIndexBuffer, j.viewportSegments, G.paint, j.transform.zoom);
              }(B, b));
            }
            function Ks(B, y, b, R, j) {
              if (!b || !R || !R.imageAtlas) return;
              const G = R.imageAtlas.patternPositions;
              let ie = G[b.to.toString()], fe = G[b.from.toString()];
              if (!ie && fe && (ie = fe), !fe && ie && (fe = ie), !ie || !fe) {
                const xe = j.getPaintProperty(y);
                ie = G[xe], fe = G[xe];
              }
              ie && fe && B.setConstantPatternPositions(ie, fe);
            }
            function Cc(B, y, b, R, j, G, ie) {
              const fe = B.context.gl, xe = "fill-pattern", Te = b.paint.get(xe), ze = Te && Te.constantOr(1), Ve = b.getCrossfadeParameters();
              let ut, gt, wt, Et, zt;
              ie ? (gt = ze && !b.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", ut = fe.LINES) : (gt = ze ? "fillPattern" : "fill", ut = fe.TRIANGLES);
              const It = Te.constantOr(null);
              for (const jt of R) {
                const Lt = y.getTile(jt);
                if (ze && !Lt.patternsLoaded()) continue;
                const Zt = Lt.getBucket(b);
                if (!Zt) continue;
                const Qt = Zt.programConfigurations.get(b.id), Xt = B.useProgram(gt, Qt), yn = B.style.map.terrain && B.style.map.terrain.getTerrainData(jt);
                ze && (B.context.activeTexture.set(fe.TEXTURE0), Lt.imageAtlasTexture.bind(fe.LINEAR, fe.CLAMP_TO_EDGE), Qt.updatePaintBuffers(Ve)), Ks(Qt, xe, It, Lt, b);
                const Sn = yn ? jt : null, Un = Sn ? Sn.posMatrix : jt.posMatrix, Vn = B.translatePosMatrix(Un, Lt, b.paint.get("fill-translate"), b.paint.get("fill-translate-anchor"));
                if (ie) {
                  Et = Zt.indexBuffer2, zt = Zt.segments2;
                  const Yn = [fe.drawingBufferWidth, fe.drawingBufferHeight];
                  wt = gt === "fillOutlinePattern" && ze ? un(Vn, B, Ve, Lt, Yn) : Xr(Vn, Yn);
                } else Et = Zt.indexBuffer, zt = Zt.segments, wt = ze ? Fr(Vn, B, Ve, Lt) : wr(Vn);
                Xt.draw(B.context, ut, j, B.stencilModeForClipping(jt), G, Ea.disabled, wt, yn, b.id, Zt.layoutVertexBuffer, Et, zt, b.paint, B.transform.zoom, Qt);
              }
            }
            function sc(B, y, b, R, j, G, ie) {
              const fe = B.context, xe = fe.gl, Te = "fill-extrusion-pattern", ze = b.paint.get(Te), Ve = ze.constantOr(1), ut = b.getCrossfadeParameters(), gt = b.paint.get("fill-extrusion-opacity"), wt = ze.constantOr(null);
              for (const Et of R) {
                const zt = y.getTile(Et), It = zt.getBucket(b);
                if (!It) continue;
                const jt = B.style.map.terrain && B.style.map.terrain.getTerrainData(Et), Lt = It.programConfigurations.get(b.id), Zt = B.useProgram(Ve ? "fillExtrusionPattern" : "fillExtrusion", Lt);
                Ve && (B.context.activeTexture.set(xe.TEXTURE0), zt.imageAtlasTexture.bind(xe.LINEAR, xe.CLAMP_TO_EDGE), Lt.updatePaintBuffers(ut)), Ks(Lt, Te, wt, zt, b);
                const Qt = B.translatePosMatrix(Et.posMatrix, zt, b.paint.get("fill-extrusion-translate"), b.paint.get("fill-extrusion-translate-anchor")), Xt = b.paint.get("fill-extrusion-vertical-gradient"), yn = Ve ? Tr(Qt, B, Xt, gt, Et, ut, zt) : ur(Qt, B, Xt, gt);
                Zt.draw(fe, fe.gl.TRIANGLES, j, G, ie, Ea.backCCW, yn, jt, b.id, It.layoutVertexBuffer, It.indexBuffer, It.segments, b.paint, B.transform.zoom, Lt, B.style.map.terrain && It.centroidVertexBuffer);
              }
            }
            function lc(B, y, b, R, j, G, ie) {
              const fe = B.context, xe = fe.gl, Te = b.fbo;
              if (!Te) return;
              const ze = B.useProgram("hillshade"), Ve = B.style.map.terrain && B.style.map.terrain.getTerrainData(y);
              fe.activeTexture.set(xe.TEXTURE0), xe.bindTexture(xe.TEXTURE_2D, Te.colorAttachment.get());
              const ut = Ve ? y : null;
              ze.draw(fe, xe.TRIANGLES, j, G, ie, Ea.disabled, Hn(B, b, R, ut), Ve, R.id, B.rasterBoundsBuffer, B.quadTriangleIndexBuffer, B.rasterBoundsSegments);
            }
            function mf(B, y, b, R, j, G) {
              const ie = B.context, fe = ie.gl, xe = y.dem;
              if (xe && xe.data) {
                const Te = xe.dim, ze = xe.stride, Ve = xe.getPixels();
                if (ie.activeTexture.set(fe.TEXTURE1), ie.pixelStoreUnpackPremultiplyAlpha.set(!1), y.demTexture = y.demTexture || B.getTileTexture(ze), y.demTexture) {
                  const gt = y.demTexture;
                  gt.update(Ve, { premultiply: !1 }), gt.bind(fe.NEAREST, fe.CLAMP_TO_EDGE);
                } else y.demTexture = new O(ie, Ve, fe.RGBA, { premultiply: !1 }), y.demTexture.bind(fe.NEAREST, fe.CLAMP_TO_EDGE);
                ie.activeTexture.set(fe.TEXTURE0);
                let ut = y.fbo;
                if (!ut) {
                  const gt = new O(ie, { width: Te, height: Te, data: null }, fe.RGBA);
                  gt.bind(fe.LINEAR, fe.CLAMP_TO_EDGE), ut = y.fbo = ie.createFramebuffer(Te, Te, !0, !1), ut.colorAttachment.set(gt.texture);
                }
                ie.bindFramebuffer.set(ut.framebuffer), ie.viewport.set([0, 0, Te, Te]), B.useProgram("hillshadePrepare").draw(ie, fe.TRIANGLES, R, j, G, Ea.disabled, Ln(y.tileID, xe), null, b.id, B.rasterBoundsBuffer, B.quadTriangleIndexBuffer, B.rasterBoundsSegments), y.needsHillshadePrepare = !1;
              }
            }
            function yl(B, y, b, R, j, G) {
              const ie = R.paint.get("raster-fade-duration");
              if (!G && ie > 0) {
                const fe = d.now(), xe = (fe - B.timeAdded) / ie, Te = y ? (fe - y.timeAdded) / ie : -1, ze = b.getSource(), Ve = j.coveringZoomLevel({ tileSize: ze.tileSize, roundZoom: ze.roundZoom }), ut = !y || Math.abs(y.tileID.overscaledZ - Ve) > Math.abs(B.tileID.overscaledZ - Ve), gt = ut && B.refreshedUponExpiration ? 1 : i.ad(ut ? xe : 1 - Te, 0, 1);
                return B.refreshedUponExpiration && xe >= 1 && (B.refreshedUponExpiration = !1), y ? { opacity: 1, mix: 1 - gt } : { opacity: gt, mix: 0 };
              }
              return { opacity: 1, mix: 0 };
            }
            const vl = new i.aN(1, 0, 0, 1), ru = new i.aN(0, 1, 0, 1), Cl = new i.aN(0, 0, 1, 1), ea = new i.aN(1, 0, 1, 1), Ic = new i.aN(0, 1, 1, 1);
            function nf(B) {
              const y = B.transform.padding;
              zu(B, B.transform.height - (y.top || 0), 3, vl), zu(B, y.bottom || 0, 3, ru), Yo(B, y.left || 0, 3, Cl), Yo(B, B.transform.width - (y.right || 0), 3, ea);
              const b = B.transform.centerPoint;
              (function(R, j, G, ie) {
                Ru(R, j - 1, G - 10, 2, 20, ie), Ru(R, j - 10, G - 1, 20, 2, ie);
              })(B, b.x, B.transform.height - b.y, Ic);
            }
            function zu(B, y, b, R) {
              Ru(B, 0, y + b / 2, B.transform.width, b, R);
            }
            function Yo(B, y, b, R) {
              Ru(B, y - b / 2, 0, b, B.transform.height, R);
            }
            function Ru(B, y, b, R, j, G) {
              const ie = B.context, fe = ie.gl;
              fe.enable(fe.SCISSOR_TEST), fe.scissor(y * B.pixelRatio, b * B.pixelRatio, R * B.pixelRatio, j * B.pixelRatio), ie.clear({ color: G }), fe.disable(fe.SCISSOR_TEST);
            }
            function gf(B, y, b) {
              const R = B.context, j = R.gl, G = b.posMatrix, ie = B.useProgram("debug"), fe = Xi.disabled, xe = Ma.disabled, Te = B.colorModeForRenderPass(), ze = "$debug", Ve = B.style.map.terrain && B.style.map.terrain.getTerrainData(b);
              R.activeTexture.set(j.TEXTURE0);
              const ut = y.getTileByID(b.key).latestRawTileData, gt = ut && ut.byteLength || 0, wt = Math.floor(gt / 1024), Et = y.getTile(b).tileSize, zt = 512 / Math.min(Et, 512) * (b.overscaledZ / B.transform.zoom) * 0.5;
              let It = b.canonical.toString();
              b.overscaledZ !== b.canonical.z && (It += ` => ${b.overscaledZ}`), function(jt, Lt) {
                jt.initDebugOverlayCanvas();
                const Zt = jt.debugOverlayCanvas, Qt = jt.context.gl, Xt = jt.debugOverlayCanvas.getContext("2d");
                Xt.clearRect(0, 0, Zt.width, Zt.height), Xt.shadowColor = "white", Xt.shadowBlur = 2, Xt.lineWidth = 1.5, Xt.strokeStyle = "white", Xt.textBaseline = "top", Xt.font = "bold 36px Open Sans, sans-serif", Xt.fillText(Lt, 5, 5), Xt.strokeText(Lt, 5, 5), jt.debugOverlayTexture.update(Zt), jt.debugOverlayTexture.bind(Qt.LINEAR, Qt.CLAMP_TO_EDGE);
              }(B, `${It} ${wt}kB`), ie.draw(R, j.TRIANGLES, fe, xe, Eo.alphaBlended, Ea.disabled, bn(G, i.aN.transparent, zt), null, ze, B.debugBuffer, B.quadTriangleIndexBuffer, B.debugSegments), ie.draw(R, j.LINE_STRIP, fe, xe, Te, Ea.disabled, bn(G, i.aN.red), Ve, ze, B.debugBuffer, B.tileBorderIndexBuffer, B.debugSegments);
            }
            function Fu(B, y, b) {
              const R = B.context, j = R.gl, G = B.colorModeForRenderPass(), ie = new Xi(j.LEQUAL, Xi.ReadWrite, B.depthRangeFor3D), fe = B.useProgram("terrain"), xe = y.getTerrainMesh();
              R.bindFramebuffer.set(null), R.viewport.set([0, 0, B.width, B.height]);
              for (const Te of b) {
                const ze = B.renderToTexture.getTexture(Te), Ve = y.getTerrainData(Te.tileID);
                R.activeTexture.set(j.TEXTURE0), j.bindTexture(j.TEXTURE_2D, ze.texture);
                const ut = B.transform.calculatePosMatrix(Te.tileID.toUnwrapped()), gt = y.getMeshFrameDelta(B.transform.zoom), wt = B.transform.calculateFogMatrix(Te.tileID.toUnwrapped()), Et = rn(ut, gt, wt, B.style.sky, B.transform.pitch);
                fe.draw(R, j.TRIANGLES, ie, Ma.disabled, G, Ea.backCCW, Et, Ve, "terrain", xe.vertexBuffer, xe.indexBuffer, xe.segments);
              }
            }
            class ws {
              constructor(y, b, R) {
                this.vertexBuffer = y, this.indexBuffer = b, this.segments = R;
              }
              destroy() {
                this.vertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.vertexBuffer = null, this.indexBuffer = null, this.segments = null;
              }
            }
            class Nu {
              constructor(y, b) {
                this.context = new ac(y), this.transform = b, this._tileTextures = {}, this.terrainFacilitator = { dirty: !0, matrix: i.ao(new Float64Array(16)), renderTime: 0 }, this.setup(), this.numSublayers = Ze.maxUnderzooming + Ze.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new lr();
              }
              resize(y, b, R) {
                if (this.width = Math.floor(y * R), this.height = Math.floor(b * R), this.pixelRatio = R, this.context.viewport.set([0, 0, this.width, this.height]), this.style) for (const j of this.style._order) this.style._layers[j].resize();
              }
              setup() {
                const y = this.context, b = new i.aX();
                b.emplaceBack(0, 0), b.emplaceBack(i.X, 0), b.emplaceBack(0, i.X), b.emplaceBack(i.X, i.X), this.tileExtentBuffer = y.createVertexBuffer(b, mr.members), this.tileExtentSegments = i.a0.simpleSegment(0, 0, 4, 2);
                const R = new i.aX();
                R.emplaceBack(0, 0), R.emplaceBack(i.X, 0), R.emplaceBack(0, i.X), R.emplaceBack(i.X, i.X), this.debugBuffer = y.createVertexBuffer(R, mr.members), this.debugSegments = i.a0.simpleSegment(0, 0, 4, 5);
                const j = new i.$();
                j.emplaceBack(0, 0, 0, 0), j.emplaceBack(i.X, 0, i.X, 0), j.emplaceBack(0, i.X, 0, i.X), j.emplaceBack(i.X, i.X, i.X, i.X), this.rasterBoundsBuffer = y.createVertexBuffer(j, Ne.members), this.rasterBoundsSegments = i.a0.simpleSegment(0, 0, 4, 2);
                const G = new i.aX();
                G.emplaceBack(0, 0), G.emplaceBack(1, 0), G.emplaceBack(0, 1), G.emplaceBack(1, 1), this.viewportBuffer = y.createVertexBuffer(G, mr.members), this.viewportSegments = i.a0.simpleSegment(0, 0, 4, 2);
                const ie = new i.aZ();
                ie.emplaceBack(0), ie.emplaceBack(1), ie.emplaceBack(3), ie.emplaceBack(2), ie.emplaceBack(0), this.tileBorderIndexBuffer = y.createIndexBuffer(ie);
                const fe = new i.aY();
                fe.emplaceBack(0, 1, 2), fe.emplaceBack(2, 1, 3), this.quadTriangleIndexBuffer = y.createIndexBuffer(fe);
                const xe = this.context.gl;
                this.stencilClearMode = new Ma({ func: xe.ALWAYS, mask: 0 }, 0, 255, xe.ZERO, xe.ZERO, xe.ZERO);
              }
              clearStencil() {
                const y = this.context, b = y.gl;
                this.nextStencilID = 1, this.currentStencilSource = void 0;
                const R = i.H();
                i.aQ(R, 0, this.width, this.height, 0, 0, 1), i.K(R, R, [b.drawingBufferWidth, b.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(y, b.TRIANGLES, Xi.disabled, this.stencilClearMode, Eo.disabled, Ea.disabled, Nn(R), null, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
              }
              _renderTileClippingMasks(y, b) {
                if (this.currentStencilSource === y.source || !y.isTileClipped() || !b || !b.length) return;
                this.currentStencilSource = y.source;
                const R = this.context, j = R.gl;
                this.nextStencilID + b.length > 256 && this.clearStencil(), R.setColorMode(Eo.disabled), R.setDepthMode(Xi.disabled);
                const G = this.useProgram("clippingMask");
                this._tileClippingMaskIDs = {};
                for (const ie of b) {
                  const fe = this._tileClippingMaskIDs[ie.key] = this.nextStencilID++, xe = this.style.map.terrain && this.style.map.terrain.getTerrainData(ie);
                  G.draw(R, j.TRIANGLES, Xi.disabled, new Ma({ func: j.ALWAYS, mask: 0 }, fe, 255, j.KEEP, j.KEEP, j.REPLACE), Eo.disabled, Ea.disabled, Nn(ie.posMatrix), xe, "$clipping", this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);
                }
              }
              stencilModeFor3D() {
                this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil();
                const y = this.nextStencilID++, b = this.context.gl;
                return new Ma({ func: b.NOTEQUAL, mask: 255 }, y, 255, b.KEEP, b.KEEP, b.REPLACE);
              }
              stencilModeForClipping(y) {
                const b = this.context.gl;
                return new Ma({ func: b.EQUAL, mask: 255 }, this._tileClippingMaskIDs[y.key], 0, b.KEEP, b.KEEP, b.REPLACE);
              }
              stencilConfigForOverlap(y) {
                const b = this.context.gl, R = y.sort((ie, fe) => fe.overscaledZ - ie.overscaledZ), j = R[R.length - 1].overscaledZ, G = R[0].overscaledZ - j + 1;
                if (G > 1) {
                  this.currentStencilSource = void 0, this.nextStencilID + G > 256 && this.clearStencil();
                  const ie = {};
                  for (let fe = 0; fe < G; fe++) ie[fe + j] = new Ma({ func: b.GEQUAL, mask: 255 }, fe + this.nextStencilID, 255, b.KEEP, b.KEEP, b.REPLACE);
                  return this.nextStencilID += G, [ie, R];
                }
                return [{ [j]: Ma.disabled }, R];
              }
              colorModeForRenderPass() {
                const y = this.context.gl;
                return this._showOverdrawInspector ? new Eo([y.CONSTANT_COLOR, y.ONE], new i.aN(0.125, 0.125, 0.125, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? Eo.unblended : Eo.alphaBlended;
              }
              depthModeForSublayer(y, b, R) {
                if (!this.opaquePassEnabledForLayer()) return Xi.disabled;
                const j = 1 - ((1 + this.currentLayer) * this.numSublayers + y) * this.depthEpsilon;
                return new Xi(R || this.context.gl.LEQUAL, b, [j, j]);
              }
              opaquePassEnabledForLayer() {
                return this.currentLayer < this.opaquePassCutoff;
              }
              render(y, b) {
                var R;
                this.style = y, this.options = b, this.lineAtlas = y.lineAtlas, this.imageManager = y.imageManager, this.glyphManager = y.glyphManager, this.symbolFadeChange = y.placement.symbolFadeChange(d.now()), this.imageManager.beginFrame();
                const j = this.style._order, G = this.style.sourceCaches, ie = {}, fe = {}, xe = {};
                for (const Te in G) {
                  const ze = G[Te];
                  ze.used && ze.prepare(this.context), ie[Te] = ze.getVisibleCoordinates(), fe[Te] = ie[Te].slice().reverse(), xe[Te] = ze.getVisibleCoordinates(!0).reverse();
                }
                this.opaquePassCutoff = 1 / 0;
                for (let Te = 0; Te < j.length; Te++) {
                  const ze = j[Te];
                  if (this.style._layers[ze].is3D()) {
                    this.opaquePassCutoff = Te;
                    break;
                  }
                }
                this.maybeDrawDepthAndCoords(!1), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = "offscreen";
                for (const Te of j) {
                  const ze = this.style._layers[Te];
                  if (!ze.hasOffscreenPass() || ze.isHidden(this.transform.zoom)) continue;
                  const Ve = fe[ze.source];
                  (ze.type === "custom" || Ve.length) && this.renderLayer(this, G[ze.source], ze, Ve);
                }
                if (this.context.bindFramebuffer.set(null), this.context.clear({ color: b.showOverdrawInspector ? i.aN.black : i.aN.transparent, depth: 1 }), this.clearStencil(), !((R = this.style.stylesheet) === null || R === void 0) && R.sky && function(Te, ze) {
                  const Ve = Te.context, ut = Ve.gl, gt = ((jt, Lt, Zt) => ({ u_sky_color: jt.properties.get("sky-color"), u_horizon_color: jt.properties.get("horizon-color"), u_horizon: (Lt.height / 2 + Lt.getHorizon()) * Zt, u_sky_horizon_blend: jt.properties.get("sky-horizon-blend") * Lt.height / 2 * Zt }))(ze, Te.style.map.transform, Te.pixelRatio), wt = new Xi(ut.LEQUAL, Xi.ReadWrite, [0, 1]), Et = Ma.disabled, zt = Te.colorModeForRenderPass(), It = Te.useProgram("sky");
                  if (!ze.mesh) {
                    const jt = new i.aX();
                    jt.emplaceBack(-1, -1), jt.emplaceBack(1, -1), jt.emplaceBack(1, 1), jt.emplaceBack(-1, 1);
                    const Lt = new i.aY();
                    Lt.emplaceBack(0, 1, 2), Lt.emplaceBack(0, 2, 3), ze.mesh = new ws(Ve.createVertexBuffer(jt, mr.members), Ve.createIndexBuffer(Lt), i.a0.simpleSegment(0, 0, jt.length, Lt.length));
                  }
                  It.draw(Ve, ut.TRIANGLES, wt, Et, zt, Ea.disabled, gt, void 0, "sky", ze.mesh.vertexBuffer, ze.mesh.indexBuffer, ze.mesh.segments);
                }(this, this.style.sky), this._showOverdrawInspector = b.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (y._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = j.length - 1; this.currentLayer >= 0; this.currentLayer--) {
                  const Te = this.style._layers[j[this.currentLayer]], ze = G[Te.source], Ve = ie[Te.source];
                  this._renderTileClippingMasks(Te, Ve), this.renderLayer(this, ze, Te, Ve);
                }
                for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < j.length; this.currentLayer++) {
                  const Te = this.style._layers[j[this.currentLayer]], ze = G[Te.source];
                  if (this.renderToTexture && this.renderToTexture.renderLayer(Te)) continue;
                  const Ve = (Te.type === "symbol" ? xe : fe)[Te.source];
                  this._renderTileClippingMasks(Te, ie[Te.source]), this.renderLayer(this, ze, Te, Ve);
                }
                if (this.options.showTileBoundaries) {
                  const Te = function(ze, Ve) {
                    let ut = null;
                    const gt = Object.values(ze._layers).flatMap((It) => It.source && !It.isHidden(Ve) ? [ze.sourceCaches[It.source]] : []), wt = gt.filter((It) => It.getSource().type === "vector"), Et = gt.filter((It) => It.getSource().type !== "vector"), zt = (It) => {
                      (!ut || ut.getSource().maxzoom < It.getSource().maxzoom) && (ut = It);
                    };
                    return wt.forEach((It) => zt(It)), ut || Et.forEach((It) => zt(It)), ut;
                  }(this.style, this.transform.zoom);
                  Te && function(ze, Ve, ut) {
                    for (let gt = 0; gt < ut.length; gt++) gf(ze, Ve, ut[gt]);
                  }(this, Te, Te.getVisibleCoordinates());
                }
                this.options.showPadding && nf(this), this.context.setDefault();
              }
              maybeDrawDepthAndCoords(y) {
                if (!this.style || !this.style.map || !this.style.map.terrain) return;
                const b = this.terrainFacilitator.matrix, R = this.transform.modelViewProjectionMatrix;
                let j = this.terrainFacilitator.dirty;
                j || (j = y ? !i.a_(b, R) : !i.a$(b, R)), j || (j = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0), j && (i.b0(b, R), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, function(G, ie) {
                  const fe = G.context, xe = fe.gl, Te = Eo.unblended, ze = new Xi(xe.LEQUAL, Xi.ReadWrite, [0, 1]), Ve = ie.getTerrainMesh(), ut = ie.sourceCache.getRenderableTiles(), gt = G.useProgram("terrainDepth");
                  fe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer), fe.viewport.set([0, 0, G.width / devicePixelRatio, G.height / devicePixelRatio]), fe.clear({ color: i.aN.transparent, depth: 1 });
                  for (const wt of ut) {
                    const Et = ie.getTerrainData(wt.tileID), zt = { u_matrix: G.transform.calculatePosMatrix(wt.tileID.toUnwrapped()), u_ele_delta: ie.getMeshFrameDelta(G.transform.zoom) };
                    gt.draw(fe, xe.TRIANGLES, ze, Ma.disabled, Te, Ea.backCCW, zt, Et, "terrain", Ve.vertexBuffer, Ve.indexBuffer, Ve.segments);
                  }
                  fe.bindFramebuffer.set(null), fe.viewport.set([0, 0, G.width, G.height]);
                }(this, this.style.map.terrain), function(G, ie) {
                  const fe = G.context, xe = fe.gl, Te = Eo.unblended, ze = new Xi(xe.LEQUAL, Xi.ReadWrite, [0, 1]), Ve = ie.getTerrainMesh(), ut = ie.getCoordsTexture(), gt = ie.sourceCache.getRenderableTiles(), wt = G.useProgram("terrainCoords");
                  fe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer), fe.viewport.set([0, 0, G.width / devicePixelRatio, G.height / devicePixelRatio]), fe.clear({ color: i.aN.transparent, depth: 1 }), ie.coordsIndex = [];
                  for (const Et of gt) {
                    const zt = ie.getTerrainData(Et.tileID);
                    fe.activeTexture.set(xe.TEXTURE0), xe.bindTexture(xe.TEXTURE_2D, ut.texture);
                    const It = { u_matrix: G.transform.calculatePosMatrix(Et.tileID.toUnwrapped()), u_terrain_coords_id: (255 - ie.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: ie.getMeshFrameDelta(G.transform.zoom) };
                    wt.draw(fe, xe.TRIANGLES, ze, Ma.disabled, Te, Ea.backCCW, It, zt, "terrain", Ve.vertexBuffer, Ve.indexBuffer, Ve.segments), ie.coordsIndex.push(Et.tileID.key);
                  }
                  fe.bindFramebuffer.set(null), fe.viewport.set([0, 0, G.width, G.height]);
                }(this, this.style.map.terrain));
              }
              renderLayer(y, b, R, j) {
                if (!R.isHidden(this.transform.zoom) && (R.type === "background" || R.type === "custom" || (j || []).length)) switch (this.id = R.id, R.type) {
                  case "symbol":
                    tu(y, b, R, j, this.style.placement.variableOffsets);
                    break;
                  case "circle":
                    (function(G, ie, fe, xe) {
                      if (G.renderPass !== "translucent") return;
                      const Te = fe.paint.get("circle-opacity"), ze = fe.paint.get("circle-stroke-width"), Ve = fe.paint.get("circle-stroke-opacity"), ut = !fe.layout.get("circle-sort-key").isConstant();
                      if (Te.constantOr(1) === 0 && (ze.constantOr(1) === 0 || Ve.constantOr(1) === 0)) return;
                      const gt = G.context, wt = gt.gl, Et = G.depthModeForSublayer(0, Xi.ReadOnly), zt = Ma.disabled, It = G.colorModeForRenderPass(), jt = [];
                      for (let Lt = 0; Lt < xe.length; Lt++) {
                        const Zt = xe[Lt], Qt = ie.getTile(Zt), Xt = Qt.getBucket(fe);
                        if (!Xt) continue;
                        const yn = Xt.programConfigurations.get(fe.id), Sn = G.useProgram("circle", yn), Un = Xt.layoutVertexBuffer, Vn = Xt.indexBuffer, Yn = G.style.map.terrain && G.style.map.terrain.getTerrainData(Zt), er = { programConfiguration: yn, program: Sn, layoutVertexBuffer: Un, indexBuffer: Vn, uniformValues: Gn(G, Zt, Qt, fe), terrainData: Yn };
                        if (ut) {
                          const kr = Xt.segments.get();
                          for (const or of kr) jt.push({ segments: new i.a0([or]), sortKey: or.sortKey, state: er });
                        } else jt.push({ segments: Xt.segments, sortKey: 0, state: er });
                      }
                      ut && jt.sort((Lt, Zt) => Lt.sortKey - Zt.sortKey);
                      for (const Lt of jt) {
                        const { programConfiguration: Zt, program: Qt, layoutVertexBuffer: Xt, indexBuffer: yn, uniformValues: Sn, terrainData: Un } = Lt.state, Vn = Lt.segments;
                        Qt.draw(gt, wt.TRIANGLES, Et, zt, It, Ea.disabled, Sn, Un, fe.id, Xt, yn, Vn, fe.paint, G.transform.zoom, Zt);
                      }
                    })(y, b, R, j);
                    break;
                  case "heatmap":
                    nu(y, b, R, j);
                    break;
                  case "line":
                    (function(G, ie, fe, xe) {
                      if (G.renderPass !== "translucent") return;
                      const Te = fe.paint.get("line-opacity"), ze = fe.paint.get("line-width");
                      if (Te.constantOr(1) === 0 || ze.constantOr(1) === 0) return;
                      const Ve = G.depthModeForSublayer(0, Xi.ReadOnly), ut = G.colorModeForRenderPass(), gt = fe.paint.get("line-dasharray"), wt = fe.paint.get("line-pattern"), Et = wt.constantOr(1), zt = fe.paint.get("line-gradient"), It = fe.getCrossfadeParameters(), jt = Et ? "linePattern" : gt ? "lineSDF" : zt ? "lineGradient" : "line", Lt = G.context, Zt = Lt.gl;
                      let Qt = !0;
                      for (const Xt of xe) {
                        const yn = ie.getTile(Xt);
                        if (Et && !yn.patternsLoaded()) continue;
                        const Sn = yn.getBucket(fe);
                        if (!Sn) continue;
                        const Un = Sn.programConfigurations.get(fe.id), Vn = G.context.program.get(), Yn = G.useProgram(jt, Un), er = Qt || Yn.program !== Vn, kr = G.style.map.terrain && G.style.map.terrain.getTerrainData(Xt), or = wt.constantOr(null);
                        if (or && yn.imageAtlas) {
                          const Or = yn.imageAtlas, br = Or.patternPositions[or.to.toString()], Nr = Or.patternPositions[or.from.toString()];
                          br && Nr && Un.setConstantPatternPositions(br, Nr);
                        }
                        const Mr = kr ? Xt : null, fr = Et ? nr(G, yn, fe, It, Mr) : gt ? pr(G, yn, fe, gt, It, Mr) : zt ? Dn(G, yn, fe, Sn.lineClipsArray.length, Mr) : dn(G, yn, fe, Mr);
                        if (Et) Lt.activeTexture.set(Zt.TEXTURE0), yn.imageAtlasTexture.bind(Zt.LINEAR, Zt.CLAMP_TO_EDGE), Un.updatePaintBuffers(It);
                        else if (gt && (er || G.lineAtlas.dirty)) Lt.activeTexture.set(Zt.TEXTURE0), G.lineAtlas.bind(Lt);
                        else if (zt) {
                          const Or = Sn.gradients[fe.id];
                          let br = Or.texture;
                          if (fe.gradientVersion !== Or.version) {
                            let Nr = 256;
                            if (fe.stepInterpolant) {
                              const ii = ie.getSource().maxzoom, Rr = Xt.canonical.z === ii ? Math.ceil(1 << G.transform.maxZoom - Xt.canonical.z) : 1, ei = Sn.maxLineLength / i.X * 1024 * Rr;
                              Nr = i.ad(i.aV(ei), 256, Lt.maxTextureSize);
                            }
                            Or.gradient = i.aW({ expression: fe.gradientExpression(), evaluationKey: "lineProgress", resolution: Nr, image: Or.gradient || void 0, clips: Sn.lineClipsArray }), Or.texture ? Or.texture.update(Or.gradient) : Or.texture = new O(Lt, Or.gradient, Zt.RGBA), Or.version = fe.gradientVersion, br = Or.texture;
                          }
                          Lt.activeTexture.set(Zt.TEXTURE0), br.bind(fe.stepInterpolant ? Zt.NEAREST : Zt.LINEAR, Zt.CLAMP_TO_EDGE);
                        }
                        Yn.draw(Lt, Zt.TRIANGLES, Ve, G.stencilModeForClipping(Xt), ut, Ea.disabled, fr, kr, fe.id, Sn.layoutVertexBuffer, Sn.indexBuffer, Sn.segments, fe.paint, G.transform.zoom, Un, Sn.layoutVertexBuffer2), Qt = !1;
                      }
                    })(y, b, R, j);
                    break;
                  case "fill":
                    (function(G, ie, fe, xe) {
                      const Te = fe.paint.get("fill-color"), ze = fe.paint.get("fill-opacity");
                      if (ze.constantOr(1) === 0) return;
                      const Ve = G.colorModeForRenderPass(), ut = fe.paint.get("fill-pattern"), gt = G.opaquePassEnabledForLayer() && !ut.constantOr(1) && Te.constantOr(i.aN.transparent).a === 1 && ze.constantOr(0) === 1 ? "opaque" : "translucent";
                      if (G.renderPass === gt) {
                        const wt = G.depthModeForSublayer(1, G.renderPass === "opaque" ? Xi.ReadWrite : Xi.ReadOnly);
                        Cc(G, ie, fe, xe, wt, Ve, !1);
                      }
                      if (G.renderPass === "translucent" && fe.paint.get("fill-antialias")) {
                        const wt = G.depthModeForSublayer(fe.getPaintProperty("fill-outline-color") ? 2 : 0, Xi.ReadOnly);
                        Cc(G, ie, fe, xe, wt, Ve, !0);
                      }
                    })(y, b, R, j);
                    break;
                  case "fill-extrusion":
                    (function(G, ie, fe, xe) {
                      const Te = fe.paint.get("fill-extrusion-opacity");
                      if (Te !== 0 && G.renderPass === "translucent") {
                        const ze = new Xi(G.context.gl.LEQUAL, Xi.ReadWrite, G.depthRangeFor3D);
                        if (Te !== 1 || fe.paint.get("fill-extrusion-pattern").constantOr(1)) sc(G, ie, fe, xe, ze, Ma.disabled, Eo.disabled), sc(G, ie, fe, xe, ze, G.stencilModeFor3D(), G.colorModeForRenderPass());
                        else {
                          const Ve = G.colorModeForRenderPass();
                          sc(G, ie, fe, xe, ze, Ma.disabled, Ve);
                        }
                      }
                    })(y, b, R, j);
                    break;
                  case "hillshade":
                    (function(G, ie, fe, xe) {
                      if (G.renderPass !== "offscreen" && G.renderPass !== "translucent") return;
                      const Te = G.context, ze = G.depthModeForSublayer(0, Xi.ReadOnly), Ve = G.colorModeForRenderPass(), [ut, gt] = G.renderPass === "translucent" ? G.stencilConfigForOverlap(xe) : [{}, xe];
                      for (const wt of gt) {
                        const Et = ie.getTile(wt);
                        Et.needsHillshadePrepare !== void 0 && Et.needsHillshadePrepare && G.renderPass === "offscreen" ? mf(G, Et, fe, ze, Ma.disabled, Ve) : G.renderPass === "translucent" && lc(G, wt, Et, fe, ze, ut[wt.overscaledZ], Ve);
                      }
                      Te.viewport.set([0, 0, G.width, G.height]);
                    })(y, b, R, j);
                    break;
                  case "raster":
                    (function(G, ie, fe, xe) {
                      if (G.renderPass !== "translucent" || fe.paint.get("raster-opacity") === 0 || !xe.length) return;
                      const Te = G.context, ze = Te.gl, Ve = ie.getSource(), ut = G.useProgram("raster"), gt = G.colorModeForRenderPass(), [wt, Et] = Ve instanceof Ie ? [{}, xe] : G.stencilConfigForOverlap(xe), zt = Et[Et.length - 1].overscaledZ, It = !G.options.moving;
                      for (const jt of Et) {
                        const Lt = G.depthModeForSublayer(jt.overscaledZ - zt, fe.paint.get("raster-opacity") === 1 ? Xi.ReadWrite : Xi.ReadOnly, ze.LESS), Zt = ie.getTile(jt);
                        Zt.registerFadeDuration(fe.paint.get("raster-fade-duration"));
                        const Qt = ie.findLoadedParent(jt, 0), Xt = ie.findLoadedSibling(jt), yn = yl(Zt, Qt || Xt || null, ie, fe, G.transform, G.style.map.terrain);
                        let Sn, Un;
                        const Vn = fe.paint.get("raster-resampling") === "nearest" ? ze.NEAREST : ze.LINEAR;
                        Te.activeTexture.set(ze.TEXTURE0), Zt.texture.bind(Vn, ze.CLAMP_TO_EDGE, ze.LINEAR_MIPMAP_NEAREST), Te.activeTexture.set(ze.TEXTURE1), Qt ? (Qt.texture.bind(Vn, ze.CLAMP_TO_EDGE, ze.LINEAR_MIPMAP_NEAREST), Sn = Math.pow(2, Qt.tileID.overscaledZ - Zt.tileID.overscaledZ), Un = [Zt.tileID.canonical.x * Sn % 1, Zt.tileID.canonical.y * Sn % 1]) : Zt.texture.bind(Vn, ze.CLAMP_TO_EDGE, ze.LINEAR_MIPMAP_NEAREST), Zt.texture.useMipmap && Te.extTextureFilterAnisotropic && G.transform.pitch > 20 && ze.texParameterf(ze.TEXTURE_2D, Te.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, Te.extTextureFilterAnisotropicMax);
                        const Yn = G.style.map.terrain && G.style.map.terrain.getTerrainData(jt), er = Yn ? jt : null, kr = er ? er.posMatrix : G.transform.calculatePosMatrix(jt.toUnwrapped(), It), or = Pr(kr, Un || [0, 0], Sn || 1, yn, fe);
                        Ve instanceof Ie ? ut.draw(Te, ze.TRIANGLES, Lt, Ma.disabled, gt, Ea.disabled, or, Yn, fe.id, Ve.boundsBuffer, G.quadTriangleIndexBuffer, Ve.boundsSegments) : ut.draw(Te, ze.TRIANGLES, Lt, wt[jt.overscaledZ], gt, Ea.disabled, or, Yn, fe.id, G.rasterBoundsBuffer, G.quadTriangleIndexBuffer, G.rasterBoundsSegments);
                      }
                    })(y, b, R, j);
                    break;
                  case "background":
                    (function(G, ie, fe, xe) {
                      const Te = fe.paint.get("background-color"), ze = fe.paint.get("background-opacity");
                      if (ze === 0) return;
                      const Ve = G.context, ut = Ve.gl, gt = G.transform, wt = gt.tileSize, Et = fe.paint.get("background-pattern");
                      if (G.isPatternMissing(Et)) return;
                      const zt = !Et && Te.a === 1 && ze === 1 && G.opaquePassEnabledForLayer() ? "opaque" : "translucent";
                      if (G.renderPass !== zt) return;
                      const It = Ma.disabled, jt = G.depthModeForSublayer(0, zt === "opaque" ? Xi.ReadWrite : Xi.ReadOnly), Lt = G.colorModeForRenderPass(), Zt = G.useProgram(Et ? "backgroundPattern" : "background"), Qt = xe || gt.coveringTiles({ tileSize: wt, terrain: G.style.map.terrain });
                      Et && (Ve.activeTexture.set(ut.TEXTURE0), G.imageManager.bind(G.context));
                      const Xt = fe.getCrossfadeParameters();
                      for (const yn of Qt) {
                        const Sn = xe ? yn.posMatrix : G.transform.calculatePosMatrix(yn.toUnwrapped()), Un = Et ? ri(Sn, ze, G, Et, { tileID: yn, tileSize: wt }, Xt) : Qn(Sn, ze, Te), Vn = G.style.map.terrain && G.style.map.terrain.getTerrainData(yn);
                        Zt.draw(Ve, ut.TRIANGLES, jt, It, Lt, Ea.disabled, Un, Vn, fe.id, G.tileExtentBuffer, G.quadTriangleIndexBuffer, G.tileExtentSegments);
                      }
                    })(y, 0, R, j);
                    break;
                  case "custom":
                    (function(G, ie, fe) {
                      const xe = G.context, Te = fe.implementation;
                      if (G.renderPass === "offscreen") {
                        const ze = Te.prerender;
                        ze && (G.setCustomLayerDefaults(), xe.setColorMode(G.colorModeForRenderPass()), ze.call(Te, xe.gl, G.transform.customLayerMatrix()), xe.setDirty(), G.setBaseState());
                      } else if (G.renderPass === "translucent") {
                        G.setCustomLayerDefaults(), xe.setColorMode(G.colorModeForRenderPass()), xe.setStencilMode(Ma.disabled);
                        const ze = Te.renderingMode === "3d" ? new Xi(G.context.gl.LEQUAL, Xi.ReadWrite, G.depthRangeFor3D) : G.depthModeForSublayer(0, Xi.ReadOnly);
                        xe.setDepthMode(ze), Te.render(xe.gl, G.transform.customLayerMatrix(), { farZ: G.transform.farZ, nearZ: G.transform.nearZ, fov: G.transform._fov, modelViewProjectionMatrix: G.transform.modelViewProjectionMatrix, projectionMatrix: G.transform.projectionMatrix }), xe.setDirty(), G.setBaseState(), xe.bindFramebuffer.set(null);
                      }
                    })(y, 0, R);
                }
              }
              translatePosMatrix(y, b, R, j, G) {
                if (!R[0] && !R[1]) return y;
                const ie = G ? j === "map" ? this.transform.angle : 0 : j === "viewport" ? -this.transform.angle : 0;
                if (ie) {
                  const Te = Math.sin(ie), ze = Math.cos(ie);
                  R = [R[0] * ze - R[1] * Te, R[0] * Te + R[1] * ze];
                }
                const fe = [G ? R[0] : Ot(b, R[0], this.transform.zoom), G ? R[1] : Ot(b, R[1], this.transform.zoom), 0], xe = new Float32Array(16);
                return i.J(xe, y, fe), xe;
              }
              saveTileTexture(y) {
                const b = this._tileTextures[y.size[0]];
                b ? b.push(y) : this._tileTextures[y.size[0]] = [y];
              }
              getTileTexture(y) {
                const b = this._tileTextures[y];
                return b && b.length > 0 ? b.pop() : null;
              }
              isPatternMissing(y) {
                if (!y) return !1;
                if (!y.from || !y.to) return !0;
                const b = this.imageManager.getPattern(y.from.toString()), R = this.imageManager.getPattern(y.to.toString());
                return !b || !R;
              }
              useProgram(y, b) {
                this.cache = this.cache || {};
                const R = y + (b ? b.cacheKey : "") + (this._showOverdrawInspector ? "/overdraw" : "") + (this.style.map.terrain ? "/terrain" : "");
                return this.cache[R] || (this.cache[R] = new sr(this.context, Ir[y], b, Zr[y], this._showOverdrawInspector, this.style.map.terrain)), this.cache[R];
              }
              setCustomLayerDefaults() {
                this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();
              }
              setBaseState() {
                const y = this.context.gl;
                this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(y.FUNC_ADD);
              }
              initDebugOverlayCanvas() {
                if (this.debugOverlayCanvas == null) {
                  this.debugOverlayCanvas = document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512;
                  const y = this.context.gl;
                  this.debugOverlayTexture = new O(this.context, this.debugOverlayCanvas, y.RGBA);
                }
              }
              destroy() {
                this.debugOverlayTexture && this.debugOverlayTexture.destroy();
              }
              overLimit() {
                const { drawingBufferWidth: y, drawingBufferHeight: b } = this.context.gl;
                return this.width !== y || this.height !== b;
              }
            }
            class An {
              constructor(y, b) {
                this.points = y, this.planes = b;
              }
              static fromInvProjectionMatrix(y, b, R) {
                const j = Math.pow(2, R), G = [[-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((fe) => {
                  const xe = 1 / (fe = i.ag([], fe, y))[3] / b * j;
                  return i.b1(fe, fe, [xe, xe, 1 / fe[3], xe]);
                }), ie = [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]].map((fe) => {
                  const xe = function(ut, gt) {
                    var wt = gt[0], Et = gt[1], zt = gt[2], It = wt * wt + Et * Et + zt * zt;
                    return It > 0 && (It = 1 / Math.sqrt(It)), ut[0] = gt[0] * It, ut[1] = gt[1] * It, ut[2] = gt[2] * It, ut;
                  }([], function(ut, gt, wt) {
                    var Et = gt[0], zt = gt[1], It = gt[2], jt = wt[0], Lt = wt[1], Zt = wt[2];
                    return ut[0] = zt * Zt - It * Lt, ut[1] = It * jt - Et * Zt, ut[2] = Et * Lt - zt * jt, ut;
                  }([], L([], G[fe[0]], G[fe[1]]), L([], G[fe[2]], G[fe[1]]))), Te = (ze = xe, Ve = G[fe[1]], -(ze[0] * Ve[0] + ze[1] * Ve[1] + ze[2] * Ve[2]));
                  var ze, Ve;
                  return xe.concat(Te);
                });
                return new An(G, ie);
              }
            }
            class to {
              constructor(y, b) {
                this.min = y, this.max = b, this.center = function(R, j, G) {
                  return R[0] = j[0] * G, R[1] = j[1] * G, R[2] = j[2] * G, R;
                }([], function(R, j, G) {
                  return R[0] = j[0] + G[0], R[1] = j[1] + G[1], R[2] = j[2] + G[2], R;
                }([], this.min, this.max), 0.5);
              }
              quadrant(y) {
                const b = [y % 2 == 0, y < 2], R = C(this.min), j = C(this.max);
                for (let G = 0; G < b.length; G++) R[G] = b[G] ? this.min[G] : this.center[G], j[G] = b[G] ? this.center[G] : this.max[G];
                return j[2] = this.max[2], new to(R, j);
              }
              distanceX(y) {
                return Math.max(Math.min(this.max[0], y[0]), this.min[0]) - y[0];
              }
              distanceY(y) {
                return Math.max(Math.min(this.max[1], y[1]), this.min[1]) - y[1];
              }
              intersects(y) {
                const b = [[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]];
                let R = !0;
                for (let j = 0; j < y.planes.length; j++) {
                  const G = y.planes[j];
                  let ie = 0;
                  for (let fe = 0; fe < b.length; fe++) i.b2(G, b[fe]) >= 0 && ie++;
                  if (ie === 0) return 0;
                  ie !== b.length && (R = !1);
                }
                if (R) return 2;
                for (let j = 0; j < 3; j++) {
                  let G = Number.MAX_VALUE, ie = -Number.MAX_VALUE;
                  for (let fe = 0; fe < y.points.length; fe++) {
                    const xe = y.points[fe][j] - this.min[j];
                    G = Math.min(G, xe), ie = Math.max(ie, xe);
                  }
                  if (ie < 0 || G > this.max[j] - this.min[j]) return 0;
                }
                return 1;
              }
            }
            class Io {
              constructor(y = 0, b = 0, R = 0, j = 0) {
                if (isNaN(y) || y < 0 || isNaN(b) || b < 0 || isNaN(R) || R < 0 || isNaN(j) || j < 0) throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");
                this.top = y, this.bottom = b, this.left = R, this.right = j;
              }
              interpolate(y, b, R) {
                return b.top != null && y.top != null && (this.top = i.z.number(y.top, b.top, R)), b.bottom != null && y.bottom != null && (this.bottom = i.z.number(y.bottom, b.bottom, R)), b.left != null && y.left != null && (this.left = i.z.number(y.left, b.left, R)), b.right != null && y.right != null && (this.right = i.z.number(y.right, b.right, R)), this;
              }
              getCenter(y, b) {
                const R = i.ad((this.left + y - this.right) / 2, 0, y), j = i.ad((this.top + b - this.bottom) / 2, 0, b);
                return new i.P(R, j);
              }
              equals(y) {
                return this.top === y.top && this.bottom === y.bottom && this.left === y.left && this.right === y.right;
              }
              clone() {
                return new Io(this.top, this.bottom, this.left, this.right);
              }
              toJSON() {
                return { top: this.top, bottom: this.bottom, left: this.left, right: this.right };
              }
            }
            const Ku = 85.051129;
            class va {
              constructor(y, b, R, j, G) {
                this.tileSize = 512, this._renderWorldCopies = G === void 0 || !!G, this._minZoom = y || 0, this._maxZoom = b || 22, this._minPitch = R ?? 0, this._maxPitch = j ?? 60, this.setMaxBounds(), this.width = 0, this.height = 0, this._center = new i.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 Io(), this._posMatrixCache = {}, this._alignedPosMatrixCache = {}, this._fogMatrixCache = {}, this.minElevationForCurrentTile = 0;
              }
              clone() {
                const y = new va(this._minZoom, this._maxZoom, this._minPitch, this.maxPitch, this._renderWorldCopies);
                return y.apply(this), y;
              }
              apply(y) {
                this.tileSize = y.tileSize, this.latRange = y.latRange, this.width = y.width, this.height = y.height, this._center = y._center, this._elevation = y._elevation, this.minElevationForCurrentTile = y.minElevationForCurrentTile, this.zoom = y.zoom, this.angle = y.angle, this._fov = y._fov, this._pitch = y._pitch, this._unmodified = y._unmodified, this._edgeInsets = y._edgeInsets.clone(), this._calcMatrices();
              }
              get minZoom() {
                return this._minZoom;
              }
              set minZoom(y) {
                this._minZoom !== y && (this._minZoom = y, this.zoom = Math.max(this.zoom, y));
              }
              get maxZoom() {
                return this._maxZoom;
              }
              set maxZoom(y) {
                this._maxZoom !== y && (this._maxZoom = y, this.zoom = Math.min(this.zoom, y));
              }
              get minPitch() {
                return this._minPitch;
              }
              set minPitch(y) {
                this._minPitch !== y && (this._minPitch = y, this.pitch = Math.max(this.pitch, y));
              }
              get maxPitch() {
                return this._maxPitch;
              }
              set maxPitch(y) {
                this._maxPitch !== y && (this._maxPitch = y, this.pitch = Math.min(this.pitch, y));
              }
              get renderWorldCopies() {
                return this._renderWorldCopies;
              }
              set renderWorldCopies(y) {
                y === void 0 ? y = !0 : y === null && (y = !1), this._renderWorldCopies = y;
              }
              get worldSize() {
                return this.tileSize * this.scale;
              }
              get centerOffset() {
                return this.centerPoint._sub(this.size._div(2));
              }
              get size() {
                return new i.P(this.width, this.height);
              }
              get bearing() {
                return -this.angle / Math.PI * 180;
              }
              set bearing(y) {
                const b = -i.b3(y, -180, 180) * Math.PI / 180;
                this.angle !== b && (this._unmodified = !1, this.angle = b, this._calcMatrices(), this.rotationMatrix = function() {
                  var R = new i.A(4);
                  return i.A != Float32Array && (R[1] = 0, R[2] = 0), R[0] = 1, R[3] = 1, R;
                }(), function(R, j, G) {
                  var ie = j[0], fe = j[1], xe = j[2], Te = j[3], ze = Math.sin(G), Ve = Math.cos(G);
                  R[0] = ie * Ve + xe * ze, R[1] = fe * Ve + Te * ze, R[2] = ie * -ze + xe * Ve, R[3] = fe * -ze + Te * Ve;
                }(this.rotationMatrix, this.rotationMatrix, this.angle));
              }
              get pitch() {
                return this._pitch / Math.PI * 180;
              }
              set pitch(y) {
                const b = i.ad(y, this.minPitch, this.maxPitch) / 180 * Math.PI;
                this._pitch !== b && (this._unmodified = !1, this._pitch = b, this._calcMatrices());
              }
              get fov() {
                return this._fov / Math.PI * 180;
              }
              set fov(y) {
                y = Math.max(0.01, Math.min(60, y)), this._fov !== y && (this._unmodified = !1, this._fov = y / 180 * Math.PI, this._calcMatrices());
              }
              get zoom() {
                return this._zoom;
              }
              set zoom(y) {
                const b = Math.min(Math.max(y, this.minZoom), this.maxZoom);
                this._zoom !== b && (this._unmodified = !1, this._zoom = b, this.tileZoom = Math.max(0, Math.floor(b)), this.scale = this.zoomScale(b), this._constrain(), this._calcMatrices());
              }
              get center() {
                return this._center;
              }
              set center(y) {
                y.lat === this._center.lat && y.lng === this._center.lng || (this._unmodified = !1, this._center = y, this._constrain(), this._calcMatrices());
              }
              get elevation() {
                return this._elevation;
              }
              set elevation(y) {
                y !== this._elevation && (this._elevation = y, this._constrain(), this._calcMatrices());
              }
              get padding() {
                return this._edgeInsets.toJSON();
              }
              set padding(y) {
                this._edgeInsets.equals(y) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, y, 1), this._calcMatrices());
              }
              get centerPoint() {
                return this._edgeInsets.getCenter(this.width, this.height);
              }
              isPaddingEqual(y) {
                return this._edgeInsets.equals(y);
              }
              interpolatePadding(y, b, R) {
                this._unmodified = !1, this._edgeInsets.interpolate(y, b, R), this._constrain(), this._calcMatrices();
              }
              coveringZoomLevel(y) {
                const b = (y.roundZoom ? Math.round : Math.floor)(this.zoom + this.scaleZoom(this.tileSize / y.tileSize));
                return Math.max(0, b);
              }
              getVisibleUnwrappedCoordinates(y) {
                const b = [new i.b4(0, y)];
                if (this._renderWorldCopies) {
                  const R = this.pointCoordinate(new i.P(0, 0)), j = this.pointCoordinate(new i.P(this.width, 0)), G = this.pointCoordinate(new i.P(this.width, this.height)), ie = this.pointCoordinate(new i.P(0, this.height)), fe = Math.floor(Math.min(R.x, j.x, G.x, ie.x)), xe = Math.floor(Math.max(R.x, j.x, G.x, ie.x)), Te = 1;
                  for (let ze = fe - Te; ze <= xe + Te; ze++) ze !== 0 && b.push(new i.b4(ze, y));
                }
                return b;
              }
              coveringTiles(y) {
                var b, R;
                let j = this.coveringZoomLevel(y);
                const G = j;
                if (y.minzoom !== void 0 && j < y.minzoom) return [];
                y.maxzoom !== void 0 && j > y.maxzoom && (j = y.maxzoom);
                const ie = this.pointCoordinate(this.getCameraPoint()), fe = i.Z.fromLngLat(this.center), xe = Math.pow(2, j), Te = [xe * ie.x, xe * ie.y, 0], ze = [xe * fe.x, xe * fe.y, 0], Ve = An.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, j);
                let ut = y.minzoom || 0;
                !y.terrain && this.pitch <= 60 && this._edgeInsets.top < 0.1 && (ut = j);
                const gt = y.terrain ? 2 / Math.min(this.tileSize, y.tileSize) * this.tileSize : 3, wt = (Lt) => ({ aabb: new to([Lt * xe, 0, 0], [(Lt + 1) * xe, xe, 0]), zoom: 0, x: 0, y: 0, wrap: Lt, fullyVisible: !1 }), Et = [], zt = [], It = j, jt = y.reparseOverscaled ? G : j;
                if (this._renderWorldCopies) for (let Lt = 1; Lt <= 3; Lt++) Et.push(wt(-Lt)), Et.push(wt(Lt));
                for (Et.push(wt(0)); Et.length > 0; ) {
                  const Lt = Et.pop(), Zt = Lt.x, Qt = Lt.y;
                  let Xt = Lt.fullyVisible;
                  if (!Xt) {
                    const er = Lt.aabb.intersects(Ve);
                    if (er === 0) continue;
                    Xt = er === 2;
                  }
                  const yn = y.terrain ? Te : ze, Sn = Lt.aabb.distanceX(yn), Un = Lt.aabb.distanceY(yn), Vn = Math.max(Math.abs(Sn), Math.abs(Un)), Yn = gt + (1 << It - Lt.zoom) - 2;
                  if (Lt.zoom === It || Vn > Yn && Lt.zoom >= ut) {
                    const er = It - Lt.zoom, kr = Te[0] - 0.5 - (Zt << er), or = Te[1] - 0.5 - (Qt << er);
                    zt.push({ tileID: new i.S(Lt.zoom === It ? jt : Lt.zoom, Lt.wrap, Lt.zoom, Zt, Qt), distanceSq: E([ze[0] - 0.5 - Zt, ze[1] - 0.5 - Qt]), tileDistanceToCamera: Math.sqrt(kr * kr + or * or) });
                  } else for (let er = 0; er < 4; er++) {
                    const kr = (Zt << 1) + er % 2, or = (Qt << 1) + (er >> 1), Mr = Lt.zoom + 1;
                    let fr = Lt.aabb.quadrant(er);
                    if (y.terrain) {
                      const Or = new i.S(Mr, Lt.wrap, Mr, kr, or), br = y.terrain.getMinMaxElevation(Or), Nr = (b = br.minElevation) !== null && b !== void 0 ? b : this.elevation, ii = (R = br.maxElevation) !== null && R !== void 0 ? R : this.elevation;
                      fr = new to([fr.min[0], fr.min[1], Nr], [fr.max[0], fr.max[1], ii]);
                    }
                    Et.push({ aabb: fr, zoom: Mr, x: kr, y: or, wrap: Lt.wrap, fullyVisible: Xt });
                  }
                }
                return zt.sort((Lt, Zt) => Lt.distanceSq - Zt.distanceSq).map((Lt) => Lt.tileID);
              }
              resize(y, b) {
                this.width = y, this.height = b, this.pixelsToGLUnits = [2 / y, -2 / b], this._constrain(), this._calcMatrices();
              }
              get unmodified() {
                return this._unmodified;
              }
              zoomScale(y) {
                return Math.pow(2, y);
              }
              scaleZoom(y) {
                return Math.log(y) / Math.LN2;
              }
              project(y) {
                const b = i.ad(y.lat, -85.051129, Ku);
                return new i.P(i.O(y.lng) * this.worldSize, i.Q(b) * this.worldSize);
              }
              unproject(y) {
                return new i.Z(y.x / this.worldSize, y.y / this.worldSize).toLngLat();
              }
              get point() {
                return this.project(this.center);
              }
              getCameraPosition() {
                return { lngLat: this.pointLocation(this.getCameraPoint()), altitude: Math.cos(this._pitch) * this.cameraToCenterDistance / this._pixelPerMeter + this.elevation };
              }
              recalculateZoom(y) {
                const b = this.elevation, R = Math.cos(this._pitch) * this.cameraToCenterDistance / this._pixelPerMeter, j = this.pointLocation(this.centerPoint, y), G = y.getElevationForLngLatZoom(j, this.tileZoom);
                if (!(this.elevation - G)) return;
                const ie = R + b - G, fe = Math.cos(this._pitch) * this.cameraToCenterDistance / ie / i.b5(1, j.lat) / this.tileSize, xe = this.scaleZoom(fe);
                this._elevation = G, this._center = j, this.zoom = xe;
              }
              setLocationAtPoint(y, b) {
                const R = this.pointCoordinate(b), j = this.pointCoordinate(this.centerPoint), G = this.locationCoordinate(y), ie = new i.Z(G.x - (R.x - j.x), G.y - (R.y - j.y));
                this.center = this.coordinateLocation(ie), this._renderWorldCopies && (this.center = this.center.wrap());
              }
              locationPoint(y, b) {
                return b ? this.coordinatePoint(this.locationCoordinate(y), b.getElevationForLngLatZoom(y, this.tileZoom), this.pixelMatrix3D) : this.coordinatePoint(this.locationCoordinate(y));
              }
              pointLocation(y, b) {
                return this.coordinateLocation(this.pointCoordinate(y, b));
              }
              locationCoordinate(y) {
                return i.Z.fromLngLat(y);
              }
              coordinateLocation(y) {
                return y && y.toLngLat();
              }
              pointCoordinate(y, b) {
                if (b) {
                  const wt = b.pointCoordinate(y);
                  if (wt != null) return wt;
                }
                const R = [y.x, y.y, 0, 1], j = [y.x, y.y, 1, 1];
                i.ag(R, R, this.pixelMatrixInverse), i.ag(j, j, this.pixelMatrixInverse);
                const G = R[3], ie = j[3], fe = R[0] / G, xe = j[0] / ie, Te = R[1] / G, ze = j[1] / ie, Ve = R[2] / G, ut = j[2] / ie, gt = Ve === ut ? 0 : (0 - Ve) / (ut - Ve);
                return new i.Z(i.z.number(fe, xe, gt) / this.worldSize, i.z.number(Te, ze, gt) / this.worldSize);
              }
              coordinatePoint(y, b = 0, R = this.pixelMatrix) {
                const j = [y.x * this.worldSize, y.y * this.worldSize, b, 1];
                return i.ag(j, j, R), new i.P(j[0] / j[3], j[1] / j[3]);
              }
              getBounds() {
                const y = Math.max(0, this.height / 2 - this.getHorizon());
                return new Se().extend(this.pointLocation(new i.P(0, y))).extend(this.pointLocation(new i.P(this.width, y))).extend(this.pointLocation(new i.P(this.width, this.height))).extend(this.pointLocation(new i.P(0, this.height)));
              }
              getMaxBounds() {
                return this.latRange && this.latRange.length === 2 && this.lngRange && this.lngRange.length === 2 ? new Se([this.lngRange[0], this.latRange[0]], [this.lngRange[1], this.latRange[1]]) : null;
              }
              getHorizon() {
                return Math.tan(Math.PI / 2 - this._pitch) * this.cameraToCenterDistance * 0.85;
              }
              setMaxBounds(y) {
                y ? (this.lngRange = [y.getWest(), y.getEast()], this.latRange = [y.getSouth(), y.getNorth()], this._constrain()) : (this.lngRange = null, this.latRange = [-85.051129, Ku]);
              }
              calculateTileMatrix(y) {
                const b = y.canonical, R = this.worldSize / this.zoomScale(b.z), j = b.x + Math.pow(2, b.z) * y.wrap, G = i.ao(new Float64Array(16));
                return i.J(G, G, [j * R, b.y * R, 0]), i.K(G, G, [R / i.X, R / i.X, 1]), G;
              }
              calculatePosMatrix(y, b = !1) {
                const R = y.key, j = b ? this._alignedPosMatrixCache : this._posMatrixCache;
                if (j[R]) return j[R];
                const G = this.calculateTileMatrix(y);
                return i.L(G, b ? this.alignedModelViewProjectionMatrix : this.modelViewProjectionMatrix, G), j[R] = new Float32Array(G), j[R];
              }
              calculateFogMatrix(y) {
                const b = y.key, R = this._fogMatrixCache;
                if (R[b]) return R[b];
                const j = this.calculateTileMatrix(y);
                return i.L(j, this.fogMatrix, j), R[b] = new Float32Array(j), R[b];
              }
              customLayerMatrix() {
                return this.mercatorMatrix.slice();
              }
              getConstrained(y, b) {
                b = i.ad(+b, this.minZoom, this.maxZoom);
                const R = { center: new i.N(y.lng, y.lat), zoom: b };
                let j = this.lngRange;
                if (!this._renderWorldCopies && j === null) {
                  const Lt = 179.9999999999;
                  j = [-Lt, Lt];
                }
                const G = this.tileSize * this.zoomScale(R.zoom);
                let ie = 0, fe = G, xe = 0, Te = G, ze = 0, Ve = 0;
                const { x: ut, y: gt } = this.size;
                if (this.latRange) {
                  const Lt = this.latRange;
                  ie = i.Q(Lt[1]) * G, fe = i.Q(Lt[0]) * G, fe - ie < gt && (ze = gt / (fe - ie));
                }
                j && (xe = i.b3(i.O(j[0]) * G, 0, G), Te = i.b3(i.O(j[1]) * G, 0, G), Te < xe && (Te += G), Te - xe < ut && (Ve = ut / (Te - xe)));
                const { x: wt, y: Et } = this.project.call({ worldSize: G }, y);
                let zt, It;
                const jt = Math.max(Ve || 0, ze || 0);
                if (jt) {
                  const Lt = new i.P(Ve ? (Te + xe) / 2 : wt, ze ? (fe + ie) / 2 : Et);
                  return R.center = this.unproject.call({ worldSize: G }, Lt).wrap(), R.zoom += this.scaleZoom(jt), R;
                }
                if (this.latRange) {
                  const Lt = gt / 2;
                  Et - Lt < ie && (It = ie + Lt), Et + Lt > fe && (It = fe - Lt);
                }
                if (j) {
                  const Lt = (xe + Te) / 2;
                  let Zt = wt;
                  this._renderWorldCopies && (Zt = i.b3(wt, Lt - G / 2, Lt + G / 2));
                  const Qt = ut / 2;
                  Zt - Qt < xe && (zt = xe + Qt), Zt + Qt > Te && (zt = Te - Qt);
                }
                if (zt !== void 0 || It !== void 0) {
                  const Lt = new i.P(zt ?? wt, It ?? Et);
                  R.center = this.unproject.call({ worldSize: G }, Lt).wrap();
                }
                return R;
              }
              _constrain() {
                if (!this.center || !this.width || !this.height || this._constraining) return;
                this._constraining = !0;
                const y = this._unmodified, { center: b, zoom: R } = this.getConstrained(this.center, this.zoom);
                this.center = b, this.zoom = R, this._unmodified = y, this._constraining = !1;
              }
              _calcMatrices() {
                if (!this.height) return;
                const y = this._fov / 2, b = this.centerOffset, R = this.point.x, j = this.point.y;
                this.cameraToCenterDistance = 0.5 / Math.tan(y) * this.height, this._pixelPerMeter = i.b5(1, this.center.lat) * this.worldSize;
                let G = i.ao(new Float64Array(16));
                i.K(G, G, [this.width / 2, -this.height / 2, 1]), i.J(G, G, [1, -1, 0]), this.labelPlaneMatrix = G, G = i.ao(new Float64Array(16)), i.K(G, G, [1, -1, 1]), i.J(G, G, [-1, -1, 0]), i.K(G, G, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = G;
                const ie = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), fe = Math.min(this.elevation, this.minElevationForCurrentTile), xe = ie - fe * this._pixelPerMeter / Math.cos(this._pitch), Te = fe < 0 ? xe : ie, ze = Math.PI / 2 + this._pitch, Ve = this._fov * (0.5 + b.y / this.height), ut = Math.sin(Ve) * Te / Math.sin(i.ad(Math.PI - ze - Ve, 0.01, Math.PI - 0.01)), gt = this.getHorizon(), wt = 2 * Math.atan(gt / this.cameraToCenterDistance) * (0.5 + b.y / (2 * gt)), Et = Math.sin(wt) * Te / Math.sin(i.ad(Math.PI - ze - wt, 0.01, Math.PI - 0.01)), zt = Math.min(ut, Et);
                this.farZ = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * zt + Te), this.nearZ = this.height / 50, G = new Float64Array(16), i.b6(G, this._fov, this.width / this.height, this.nearZ, this.farZ), G[8] = 2 * -b.x / this.width, G[9] = 2 * b.y / this.height, this.projectionMatrix = i.af(G), i.K(G, G, [1, -1, 1]), i.J(G, G, [0, 0, -this.cameraToCenterDistance]), i.b7(G, G, this._pitch), i.ae(G, G, this.angle), i.J(G, G, [-R, -j, 0]), this.mercatorMatrix = i.K([], G, [this.worldSize, this.worldSize, this.worldSize]), i.K(G, G, [1, 1, this._pixelPerMeter]), this.pixelMatrix = i.L(new Float64Array(16), this.labelPlaneMatrix, G), i.J(G, G, [0, 0, -this.elevation]), this.modelViewProjectionMatrix = G, this.invModelViewProjectionMatrix = i.at([], G), this.fogMatrix = new Float64Array(16), i.b6(this.fogMatrix, this._fov, this.width / this.height, ie, this.farZ), this.fogMatrix[8] = 2 * -b.x / this.width, this.fogMatrix[9] = 2 * b.y / this.height, i.K(this.fogMatrix, this.fogMatrix, [1, -1, 1]), i.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.cameraToCenterDistance]), i.b7(this.fogMatrix, this.fogMatrix, this._pitch), i.ae(this.fogMatrix, this.fogMatrix, this.angle), i.J(this.fogMatrix, this.fogMatrix, [-R, -j, 0]), i.K(this.fogMatrix, this.fogMatrix, [1, 1, this._pixelPerMeter]), i.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.elevation]), this.pixelMatrix3D = i.L(new Float64Array(16), this.labelPlaneMatrix, G);
                const It = this.width % 2 / 2, jt = this.height % 2 / 2, Lt = Math.cos(this.angle), Zt = Math.sin(this.angle), Qt = R - Math.round(R) + Lt * It + Zt * jt, Xt = j - Math.round(j) + Lt * jt + Zt * It, yn = new Float64Array(G);
                if (i.J(yn, yn, [Qt > 0.5 ? Qt - 1 : Qt, Xt > 0.5 ? Xt - 1 : Xt, 0]), this.alignedModelViewProjectionMatrix = yn, G = i.at(new Float64Array(16), this.pixelMatrix), !G) throw new Error("failed to invert matrix");
                this.pixelMatrixInverse = G, this._posMatrixCache = {}, this._alignedPosMatrixCache = {}, this._fogMatrixCache = {};
              }
              maxPitchScaleFactor() {
                if (!this.pixelMatrixInverse) return 1;
                const y = this.pointCoordinate(new i.P(0, 0)), b = [y.x * this.worldSize, y.y * this.worldSize, 0, 1];
                return i.ag(b, b, this.pixelMatrix)[3] / this.cameraToCenterDistance;
              }
              getCameraPoint() {
                const y = this._pitch, b = Math.tan(y) * (this.cameraToCenterDistance || 1);
                return this.centerPoint.add(new i.P(0, b));
              }
              getCameraQueryGeometry(y) {
                const b = this.getCameraPoint();
                if (y.length === 1) return [y[0], b];
                {
                  let R = b.x, j = b.y, G = b.x, ie = b.y;
                  for (const fe of y) R = Math.min(R, fe.x), j = Math.min(j, fe.y), G = Math.max(G, fe.x), ie = Math.max(ie, fe.y);
                  return [new i.P(R, j), new i.P(G, j), new i.P(G, ie), new i.P(R, ie), new i.P(R, j)];
                }
              }
              lngLatToCameraDepth(y, b) {
                const R = this.locationCoordinate(y), j = [R.x * this.worldSize, R.y * this.worldSize, b, 1];
                return i.ag(j, j, this.modelViewProjectionMatrix), j[2] / j[3];
              }
            }
            function Js(B, y) {
              let b, R = !1, j = null, G = null;
              const ie = () => {
                j = null, R && (B.apply(G, b), j = setTimeout(ie, y), R = !1);
              };
              return (...fe) => (R = !0, G = this, b = fe, j || ie(), j);
            }
            class Ha {
              constructor(y) {
                this._getCurrentHash = () => {
                  const b = window.location.hash.replace("#", "");
                  if (this._hashName) {
                    let R;
                    return b.split("&").map((j) => j.split("=")).forEach((j) => {
                      j[0] === this._hashName && (R = j);
                    }), (R && R[1] || "").split("/");
                  }
                  return b.split("/");
                }, this._onHashChange = () => {
                  const b = this._getCurrentHash();
                  if (b.length >= 3 && !b.some((R) => isNaN(R))) {
                    const R = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(b[3] || 0) : this._map.getBearing();
                    return this._map.jumpTo({ center: [+b[2], +b[1]], zoom: +b[0], bearing: R, pitch: +(b[4] || 0) }), !0;
                  }
                  return !1;
                }, this._updateHashUnthrottled = () => {
                  const b = window.location.href.replace(/(#.+)?$/, this.getHashString());
                  window.history.replaceState(window.history.state, null, b);
                }, this._removeHash = () => {
                  const b = this._getCurrentHash();
                  if (b.length === 0) return;
                  const R = b.join("/");
                  let j = R;
                  j.split("&").length > 0 && (j = j.split("&")[0]), this._hashName && (j = `${this._hashName}=${R}`);
                  let G = window.location.hash.replace(j, "");
                  G.startsWith("#&") ? G = G.slice(0, 1) + G.slice(2) : G === "#" && (G = "");
                  let ie = window.location.href.replace(/(#.+)?$/, G);
                  ie = ie.replace("&&", "&"), window.history.replaceState(window.history.state, null, ie);
                }, this._updateHash = Js(this._updateHashUnthrottled, 300), this._hashName = y && encodeURIComponent(y);
              }
              addTo(y) {
                return this._map = y, addEventListener("hashchange", this._onHashChange, !1), this._map.on("moveend", this._updateHash), this;
              }
              remove() {
                return removeEventListener("hashchange", this._onHashChange, !1), this._map.off("moveend", this._updateHash), clearTimeout(this._updateHash()), this._removeHash(), delete this._map, this;
              }
              getHashString(y) {
                const b = this._map.getCenter(), R = Math.round(100 * this._map.getZoom()) / 100, j = Math.ceil((R * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), G = Math.pow(10, j), ie = Math.round(b.lng * G) / G, fe = Math.round(b.lat * G) / G, xe = this._map.getBearing(), Te = this._map.getPitch();
                let ze = "";
                if (ze += y ? `/${ie}/${fe}/${R}` : `${R}/${fe}/${ie}`, (xe || Te) && (ze += "/" + Math.round(10 * xe) / 10), Te && (ze += `/${Math.round(Te)}`), this._hashName) {
                  const Ve = this._hashName;
                  let ut = !1;
                  const gt = window.location.hash.slice(1).split("&").map((wt) => {
                    const Et = wt.split("=")[0];
                    return Et === Ve ? (ut = !0, `${Et}=${ze}`) : wt;
                  }).filter((wt) => wt);
                  return ut || gt.push(`${Ve}=${ze}`), `#${gt.join("&")}`;
                }
                return `#${ze}`;
              }
            }
            const as = { linearity: 0.3, easing: i.b8(0, 0, 0.3, 1) }, aa = i.e({ deceleration: 2500, maxSpeed: 1400 }, as), Aa = i.e({ deceleration: 20, maxSpeed: 1400 }, as), yo = i.e({ deceleration: 1e3, maxSpeed: 360 }, as), Ju = i.e({ deceleration: 1e3, maxSpeed: 90 }, as);
            class uc {
              constructor(y) {
                this._map = y, this.clear();
              }
              clear() {
                this._inertiaBuffer = [];
              }
              record(y) {
                this._drainInertiaBuffer(), this._inertiaBuffer.push({ time: d.now(), settings: y });
              }
              _drainInertiaBuffer() {
                const y = this._inertiaBuffer, b = d.now();
                for (; y.length > 0 && b - y[0].time > 160; ) y.shift();
              }
              _onMoveEnd(y) {
                if (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) return;
                const b = { zoom: 0, bearing: 0, pitch: 0, pan: new i.P(0, 0), pinchAround: void 0, around: void 0 };
                for (const { settings: G } of this._inertiaBuffer) b.zoom += G.zoomDelta || 0, b.bearing += G.bearingDelta || 0, b.pitch += G.pitchDelta || 0, G.panDelta && b.pan._add(G.panDelta), G.around && (b.around = G.around), G.pinchAround && (b.pinchAround = G.pinchAround);
                const R = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, j = {};
                if (b.pan.mag()) {
                  const G = xu(b.pan.mag(), R, i.e({}, aa, y || {}));
                  j.offset = b.pan.mult(G.amount / b.pan.mag()), j.center = this._map.transform.center, vu(j, G);
                }
                if (b.zoom) {
                  const G = xu(b.zoom, R, Aa);
                  j.zoom = this._map.transform.zoom + G.amount, vu(j, G);
                }
                if (b.bearing) {
                  const G = xu(b.bearing, R, yo);
                  j.bearing = this._map.transform.bearing + i.ad(G.amount, -179, 179), vu(j, G);
                }
                if (b.pitch) {
                  const G = xu(b.pitch, R, Ju);
                  j.pitch = this._map.transform.pitch + G.amount, vu(j, G);
                }
                if (j.zoom || j.bearing) {
                  const G = b.pinchAround === void 0 ? b.around : b.pinchAround;
                  j.around = G ? this._map.unproject(G) : this._map.getCenter();
                }
                return this.clear(), i.e(j, { noMoveStart: !0 });
              }
            }
            function vu(B, y) {
              (!B.duration || B.duration < y.duration) && (B.duration = y.duration, B.easing = y.easing);
            }
            function xu(B, y, b) {
              const { maxSpeed: R, linearity: j, deceleration: G } = b, ie = i.ad(B * j / (y / 1e3), -R, R), fe = Math.abs(ie) / (G * j);
              return { easing: b.easing, duration: 1e3 * fe, amount: ie * (fe / 2) };
            }
            class Zo extends i.k {
              preventDefault() {
                this._defaultPrevented = !0;
              }
              get defaultPrevented() {
                return this._defaultPrevented;
              }
              constructor(y, b, R, j = {}) {
                const G = f.mousePos(b.getCanvas(), R), ie = b.unproject(G);
                super(y, i.e({ point: G, lngLat: ie, originalEvent: R }, j)), this._defaultPrevented = !1, this.target = b;
              }
            }
            class Fo extends i.k {
              preventDefault() {
                this._defaultPrevented = !0;
              }
              get defaultPrevented() {
                return this._defaultPrevented;
              }
              constructor(y, b, R) {
                const j = y === "touchend" ? R.changedTouches : R.touches, G = f.touchPos(b.getCanvasContainer(), j), ie = G.map((xe) => b.unproject(xe)), fe = G.reduce((xe, Te, ze, Ve) => xe.add(Te.div(Ve.length)), new i.P(0, 0));
                super(y, { points: G, point: fe, lngLats: ie, lngLat: b.unproject(fe), originalEvent: R }), this._defaultPrevented = !1;
              }
            }
            class Il extends i.k {
              preventDefault() {
                this._defaultPrevented = !0;
              }
              get defaultPrevented() {
                return this._defaultPrevented;
              }
              constructor(y, b, R) {
                super(y, { originalEvent: R }), this._defaultPrevented = !1;
              }
            }
            class bu {
              constructor(y, b) {
                this._map = y, this._clickTolerance = b.clickTolerance;
              }
              reset() {
                delete this._mousedownPos;
              }
              wheel(y) {
                return this._firePreventable(new Il(y.type, this._map, y));
              }
              mousedown(y, b) {
                return this._mousedownPos = b, this._firePreventable(new Zo(y.type, this._map, y));
              }
              mouseup(y) {
                this._map.fire(new Zo(y.type, this._map, y));
              }
              click(y, b) {
                this._mousedownPos && this._mousedownPos.dist(b) >= this._clickTolerance || this._map.fire(new Zo(y.type, this._map, y));
              }
              dblclick(y) {
                return this._firePreventable(new Zo(y.type, this._map, y));
              }
              mouseover(y) {
                this._map.fire(new Zo(y.type, this._map, y));
              }
              mouseout(y) {
                this._map.fire(new Zo(y.type, this._map, y));
              }
              touchstart(y) {
                return this._firePreventable(new Fo(y.type, this._map, y));
              }
              touchmove(y) {
                this._map.fire(new Fo(y.type, this._map, y));
              }
              touchend(y) {
                this._map.fire(new Fo(y.type, this._map, y));
              }
              touchcancel(y) {
                this._map.fire(new Fo(y.type, this._map, y));
              }
              _firePreventable(y) {
                if (this._map.fire(y), y.defaultPrevented) return {};
              }
              isEnabled() {
                return !0;
              }
              isActive() {
                return !1;
              }
              enable() {
              }
              disable() {
              }
            }
            class Xo {
              constructor(y) {
                this._map = y;
              }
              reset() {
                this._delayContextMenu = !1, this._ignoreContextMenu = !0, delete this._contextMenuEvent;
              }
              mousemove(y) {
                this._map.fire(new Zo(y.type, this._map, y));
              }
              mousedown() {
                this._delayContextMenu = !0, this._ignoreContextMenu = !1;
              }
              mouseup() {
                this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Zo("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent);
              }
              contextmenu(y) {
                this._delayContextMenu ? this._contextMenuEvent = y : this._ignoreContextMenu || this._map.fire(new Zo(y.type, this._map, y)), this._map.listens("contextmenu") && y.preventDefault();
              }
              isEnabled() {
                return !0;
              }
              isActive() {
                return !1;
              }
              enable() {
              }
              disable() {
              }
            }
            class Ra {
              constructor(y) {
                this._map = y;
              }
              get transform() {
                return this._map._requestedCameraState || this._map.transform;
              }
              get center() {
                return { lng: this.transform.center.lng, lat: this.transform.center.lat };
              }
              get zoom() {
                return this.transform.zoom;
              }
              get pitch() {
                return this.transform.pitch;
              }
              get bearing() {
                return this.transform.bearing;
              }
              unproject(y) {
                return this.transform.pointLocation(i.P.convert(y), this._map.terrain);
              }
            }
            class No {
              constructor(y, b) {
                this._map = y, this._tr = new Ra(y), this._el = y.getCanvasContainer(), this._container = y.getContainer(), this._clickTolerance = b.clickTolerance || 1;
              }
              isEnabled() {
                return !!this._enabled;
              }
              isActive() {
                return !!this._active;
              }
              enable() {
                this.isEnabled() || (this._enabled = !0);
              }
              disable() {
                this.isEnabled() && (this._enabled = !1);
              }
              mousedown(y, b) {
                this.isEnabled() && y.shiftKey && y.button === 0 && (f.disableDrag(), this._startPos = this._lastPos = b, this._active = !0);
              }
              mousemoveWindow(y, b) {
                if (!this._active) return;
                const R = b;
                if (this._lastPos.equals(R) || !this._box && R.dist(this._startPos) < this._clickTolerance) return;
                const j = this._startPos;
                this._lastPos = R, this._box || (this._box = f.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", y));
                const G = Math.min(j.x, R.x), ie = Math.max(j.x, R.x), fe = Math.min(j.y, R.y), xe = Math.max(j.y, R.y);
                f.setTransform(this._box, `translate(${G}px,${fe}px)`), this._box.style.width = ie - G + "px", this._box.style.height = xe - fe + "px";
              }
              mouseupWindow(y, b) {
                if (!this._active || y.button !== 0) return;
                const R = this._startPos, j = b;
                if (this.reset(), f.suppressClick(), R.x !== j.x || R.y !== j.y) return this._map.fire(new i.k("boxzoomend", { originalEvent: y })), { cameraAnimation: (G) => G.fitScreenCoordinates(R, j, this._tr.bearing, { linear: !0 }) };
                this._fireEvent("boxzoomcancel", y);
              }
              keydown(y) {
                this._active && y.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", y));
              }
              reset() {
                this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (f.remove(this._box), this._box = null), f.enableDrag(), delete this._startPos, delete this._lastPos;
              }
              _fireEvent(y, b) {
                return this._map.fire(new i.k(y, { originalEvent: b }));
              }
            }
            function Sa(B, y) {
              if (B.length !== y.length) throw new Error(`The number of touches and points are not equal - touches ${B.length}, points ${y.length}`);
              const b = {};
              for (let R = 0; R < B.length; R++) b[B[R].identifier] = y[R];
              return b;
            }
            class Bo {
              constructor(y) {
                this.reset(), this.numTouches = y.numTouches;
              }
              reset() {
                delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1;
              }
              touchstart(y, b, R) {
                (this.centroid || R.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = y.timeStamp), R.length === this.numTouches && (this.centroid = function(j) {
                  const G = new i.P(0, 0);
                  for (const ie of j) G._add(ie);
                  return G.div(j.length);
                }(b), this.touches = Sa(R, b)));
              }
              touchmove(y, b, R) {
                if (this.aborted || !this.centroid) return;
                const j = Sa(R, b);
                for (const G in this.touches) {
                  const ie = this.touches[G], fe = j[G];
                  (!fe || fe.dist(ie) > 30) && (this.aborted = !0);
                }
              }
              touchend(y, b, R) {
                if ((!this.centroid || y.timeStamp - this.startTime > 500) && (this.aborted = !0), R.length === 0) {
                  const j = !this.aborted && this.centroid;
                  if (this.reset(), j) return j;
                }
              }
            }
            class _a {
              constructor(y) {
                this.singleTap = new Bo(y), this.numTaps = y.numTaps, this.reset();
              }
              reset() {
                this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset();
              }
              touchstart(y, b, R) {
                this.singleTap.touchstart(y, b, R);
              }
              touchmove(y, b, R) {
                this.singleTap.touchmove(y, b, R);
              }
              touchend(y, b, R) {
                const j = this.singleTap.touchend(y, b, R);
                if (j) {
                  const G = y.timeStamp - this.lastTime < 500, ie = !this.lastTap || this.lastTap.dist(j) < 30;
                  if (G && ie || this.reset(), this.count++, this.lastTime = y.timeStamp, this.lastTap = j, this.count === this.numTaps) return this.reset(), j;
                }
              }
            }
            class Do {
              constructor(y) {
                this._tr = new Ra(y), this._zoomIn = new _a({ numTouches: 1, numTaps: 2 }), this._zoomOut = new _a({ numTouches: 2, numTaps: 1 }), this.reset();
              }
              reset() {
                this._active = !1, this._zoomIn.reset(), this._zoomOut.reset();
              }
              touchstart(y, b, R) {
                this._zoomIn.touchstart(y, b, R), this._zoomOut.touchstart(y, b, R);
              }
              touchmove(y, b, R) {
                this._zoomIn.touchmove(y, b, R), this._zoomOut.touchmove(y, b, R);
              }
              touchend(y, b, R) {
                const j = this._zoomIn.touchend(y, b, R), G = this._zoomOut.touchend(y, b, R), ie = this._tr;
                return j ? (this._active = !0, y.preventDefault(), setTimeout(() => this.reset(), 0), { cameraAnimation: (fe) => fe.easeTo({ duration: 300, zoom: ie.zoom + 1, around: ie.unproject(j) }, { originalEvent: y }) }) : G ? (this._active = !0, y.preventDefault(), setTimeout(() => this.reset(), 0), { cameraAnimation: (fe) => fe.easeTo({ duration: 300, zoom: ie.zoom - 1, around: ie.unproject(G) }, { originalEvent: y }) }) : void 0;
              }
              touchcancel() {
                this.reset();
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
            }
            class jo {
              constructor(y) {
                this._enabled = !!y.enable, this._moveStateManager = y.moveStateManager, this._clickTolerance = y.clickTolerance || 1, this._moveFunction = y.move, this._activateOnStart = !!y.activateOnStart, y.assignEvents(this), this.reset();
              }
              reset(y) {
                this._active = !1, this._moved = !1, delete this._lastPoint, this._moveStateManager.endMove(y);
              }
              _move(...y) {
                const b = this._moveFunction(...y);
                if (b.bearingDelta || b.pitchDelta || b.around || b.panDelta) return this._active = !0, b;
              }
              dragStart(y, b) {
                this.isEnabled() && !this._lastPoint && this._moveStateManager.isValidStartEvent(y) && (this._moveStateManager.startMove(y), this._lastPoint = b.length ? b[0] : b, this._activateOnStart && this._lastPoint && (this._active = !0));
              }
              dragMove(y, b) {
                if (!this.isEnabled()) return;
                const R = this._lastPoint;
                if (!R) return;
                if (y.preventDefault(), !this._moveStateManager.isValidMoveEvent(y)) return void this.reset(y);
                const j = b.length ? b[0] : b;
                return !this._moved && j.dist(R) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = j, this._move(R, j));
              }
              dragEnd(y) {
                this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(y) && (this._moved && f.suppressClick(), this.reset(y));
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
              getClickTolerance() {
                return this._clickTolerance;
              }
            }
            const Dl = { 0: 1, 2: 2 };
            class Uo {
              constructor(y) {
                this._correctEvent = y.checkCorrectEvent;
              }
              startMove(y) {
                const b = f.mouseButton(y);
                this._eventButton = b;
              }
              endMove(y) {
                delete this._eventButton;
              }
              isValidStartEvent(y) {
                return this._correctEvent(y);
              }
              isValidMoveEvent(y) {
                return !function(b, R) {
                  const j = Dl[R];
                  return b.buttons === void 0 || (b.buttons & j) !== j;
                }(y, this._eventButton);
              }
              isValidEndEvent(y) {
                return f.mouseButton(y) === this._eventButton;
              }
            }
            class Qs {
              constructor() {
                this._firstTouch = void 0;
              }
              _isOneFingerTouch(y) {
                return y.targetTouches.length === 1;
              }
              _isSameTouchEvent(y) {
                return y.targetTouches[0].identifier === this._firstTouch;
              }
              startMove(y) {
                const b = y.targetTouches[0].identifier;
                this._firstTouch = b;
              }
              endMove(y) {
                delete this._firstTouch;
              }
              isValidStartEvent(y) {
                return this._isOneFingerTouch(y);
              }
              isValidMoveEvent(y) {
                return this._isOneFingerTouch(y) && this._isSameTouchEvent(y);
              }
              isValidEndEvent(y) {
                return this._isOneFingerTouch(y) && this._isSameTouchEvent(y);
              }
            }
            const os = (B) => {
              B.mousedown = B.dragStart, B.mousemoveWindow = B.dragMove, B.mouseup = B.dragEnd, B.contextmenu = (y) => {
                y.preventDefault();
              };
            }, Bu = ({ enable: B, clickTolerance: y, bearingDegreesPerPixelMoved: b = 0.8 }) => {
              const R = new Uo({ checkCorrectEvent: (j) => f.mouseButton(j) === 0 && j.ctrlKey || f.mouseButton(j) === 2 });
              return new jo({ clickTolerance: y, move: (j, G) => ({ bearingDelta: (G.x - j.x) * b }), moveStateManager: R, enable: B, assignEvents: os });
            }, Ll = ({ enable: B, clickTolerance: y, pitchDegreesPerPixelMoved: b = -0.5 }) => {
              const R = new Uo({ checkCorrectEvent: (j) => f.mouseButton(j) === 0 && j.ctrlKey || f.mouseButton(j) === 2 });
              return new jo({ clickTolerance: y, move: (j, G) => ({ pitchDelta: (G.y - j.y) * b }), moveStateManager: R, enable: B, assignEvents: os });
            };
            class Pl {
              constructor(y, b) {
                this._clickTolerance = y.clickTolerance || 1, this._map = b, this.reset();
              }
              reset() {
                this._active = !1, this._touches = {}, this._sum = new i.P(0, 0);
              }
              _shouldBePrevented(y) {
                return y < (this._map.cooperativeGestures.isEnabled() ? 2 : 1);
              }
              touchstart(y, b, R) {
                return this._calculateTransform(y, b, R);
              }
              touchmove(y, b, R) {
                if (this._active) {
                  if (!this._shouldBePrevented(R.length)) return y.preventDefault(), this._calculateTransform(y, b, R);
                  this._map.cooperativeGestures.notifyGestureBlocked("touch_pan", y);
                }
              }
              touchend(y, b, R) {
                this._calculateTransform(y, b, R), this._active && this._shouldBePrevented(R.length) && this.reset();
              }
              touchcancel() {
                this.reset();
              }
              _calculateTransform(y, b, R) {
                R.length > 0 && (this._active = !0);
                const j = Sa(R, b), G = new i.P(0, 0), ie = new i.P(0, 0);
                let fe = 0;
                for (const Te in j) {
                  const ze = j[Te], Ve = this._touches[Te];
                  Ve && (G._add(ze), ie._add(ze.sub(Ve)), fe++, j[Te] = ze);
                }
                if (this._touches = j, this._shouldBePrevented(fe) || !ie.mag()) return;
                const xe = ie.div(fe);
                return this._sum._add(xe), this._sum.mag() < this._clickTolerance ? void 0 : { around: G.div(fe), panDelta: xe };
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
            }
            class Lo {
              constructor() {
                this.reset();
              }
              reset() {
                this._active = !1, delete this._firstTwoTouches;
              }
              touchstart(y, b, R) {
                this._firstTwoTouches || R.length < 2 || (this._firstTwoTouches = [R[0].identifier, R[1].identifier], this._start([b[0], b[1]]));
              }
              touchmove(y, b, R) {
                if (!this._firstTwoTouches) return;
                y.preventDefault();
                const [j, G] = this._firstTwoTouches, ie = Ca(R, b, j), fe = Ca(R, b, G);
                if (!ie || !fe) return;
                const xe = this._aroundCenter ? null : ie.add(fe).div(2);
                return this._move([ie, fe], xe, y);
              }
              touchend(y, b, R) {
                if (!this._firstTwoTouches) return;
                const [j, G] = this._firstTwoTouches, ie = Ca(R, b, j), fe = Ca(R, b, G);
                ie && fe || (this._active && f.suppressClick(), this.reset());
              }
              touchcancel() {
                this.reset();
              }
              enable(y) {
                this._enabled = !0, this._aroundCenter = !!y && y.around === "center";
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return !!this._enabled;
              }
              isActive() {
                return !!this._active;
              }
            }
            function Ca(B, y, b) {
              for (let R = 0; R < B.length; R++) if (B[R].identifier === b) return y[R];
            }
            function Ol(B, y) {
              return Math.log(B / y) / Math.LN2;
            }
            class xi extends Lo {
              reset() {
                super.reset(), delete this._distance, delete this._startDistance;
              }
              _start(y) {
                this._startDistance = this._distance = y[0].dist(y[1]);
              }
              _move(y, b) {
                const R = this._distance;
                if (this._distance = y[0].dist(y[1]), this._active || !(Math.abs(Ol(this._distance, this._startDistance)) < 0.1)) return this._active = !0, { zoomDelta: Ol(this._distance, R), pinchAround: b };
              }
            }
            function cc(B, y) {
              return 180 * B.angleWith(y) / Math.PI;
            }
            class Dc extends Lo {
              reset() {
                super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;
              }
              _start(y) {
                this._startVector = this._vector = y[0].sub(y[1]), this._minDiameter = y[0].dist(y[1]);
              }
              _move(y, b, R) {
                const j = this._vector;
                if (this._vector = y[0].sub(y[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, { bearingDelta: cc(this._vector, j), pinchAround: b };
              }
              _isBelowThreshold(y) {
                this._minDiameter = Math.min(this._minDiameter, y.mag());
                const b = 25 / (Math.PI * this._minDiameter) * 360, R = cc(y, this._startVector);
                return Math.abs(R) < b;
              }
            }
            function xl(B) {
              return Math.abs(B.y) > Math.abs(B.x);
            }
            class zl extends Lo {
              constructor(y) {
                super(), this._currentTouchCount = 0, this._map = y;
              }
              reset() {
                super.reset(), this._valid = void 0, delete this._firstMove, delete this._lastPoints;
              }
              touchstart(y, b, R) {
                super.touchstart(y, b, R), this._currentTouchCount = R.length;
              }
              _start(y) {
                this._lastPoints = y, xl(y[0].sub(y[1])) && (this._valid = !1);
              }
              _move(y, b, R) {
                if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) return;
                const j = y[0].sub(this._lastPoints[0]), G = y[1].sub(this._lastPoints[1]);
                return this._valid = this.gestureBeginsVertically(j, G, R.timeStamp), this._valid ? (this._lastPoints = y, this._active = !0, { pitchDelta: (j.y + G.y) / 2 * -0.5 }) : void 0;
              }
              gestureBeginsVertically(y, b, R) {
                if (this._valid !== void 0) return this._valid;
                const j = y.mag() >= 2, G = b.mag() >= 2;
                if (!j && !G) return;
                if (!j || !G) return this._firstMove === void 0 && (this._firstMove = R), R - this._firstMove < 100 && void 0;
                const ie = y.y > 0 == b.y > 0;
                return xl(y) && xl(b) && ie;
              }
            }
            const Rl = { panStep: 100, bearingStep: 15, pitchStep: 10 };
            class ju {
              constructor(y) {
                this._tr = new Ra(y);
                const b = Rl;
                this._panStep = b.panStep, this._bearingStep = b.bearingStep, this._pitchStep = b.pitchStep, this._rotationDisabled = !1;
              }
              reset() {
                this._active = !1;
              }
              keydown(y) {
                if (y.altKey || y.ctrlKey || y.metaKey) return;
                let b = 0, R = 0, j = 0, G = 0, ie = 0;
                switch (y.keyCode) {
                  case 61:
                  case 107:
                  case 171:
                  case 187:
                    b = 1;
                    break;
                  case 189:
                  case 109:
                  case 173:
                    b = -1;
                    break;
                  case 37:
                    y.shiftKey ? R = -1 : (y.preventDefault(), G = -1);
                    break;
                  case 39:
                    y.shiftKey ? R = 1 : (y.preventDefault(), G = 1);
                    break;
                  case 38:
                    y.shiftKey ? j = 1 : (y.preventDefault(), ie = -1);
                    break;
                  case 40:
                    y.shiftKey ? j = -1 : (y.preventDefault(), ie = 1);
                    break;
                  default:
                    return;
                }
                return this._rotationDisabled && (R = 0, j = 0), { cameraAnimation: (fe) => {
                  const xe = this._tr;
                  fe.easeTo({ duration: 300, easeId: "keyboardHandler", easing: ti, zoom: b ? Math.round(xe.zoom) + b * (y.shiftKey ? 2 : 1) : xe.zoom, bearing: xe.bearing + R * this._bearingStep, pitch: xe.pitch + j * this._pitchStep, offset: [-G * this._panStep, -ie * this._panStep], center: xe.center }, { originalEvent: y });
                } };
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
              disableRotation() {
                this._rotationDisabled = !0;
              }
              enableRotation() {
                this._rotationDisabled = !1;
              }
            }
            function ti(B) {
              return B * (2 - B);
            }
            const js = 4.000244140625;
            class Fl {
              constructor(y, b) {
                this._onTimeout = (R) => {
                  this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(R);
                }, this._map = y, this._tr = new Ra(y), this._triggerRenderFrame = b, this._delta = 0, this._defaultZoomRate = 0.01, this._wheelZoomRate = 0.0022222222222222222;
              }
              setZoomRate(y) {
                this._defaultZoomRate = y;
              }
              setWheelZoomRate(y) {
                this._wheelZoomRate = y;
              }
              isEnabled() {
                return !!this._enabled;
              }
              isActive() {
                return !!this._active || this._finishTimeout !== void 0;
              }
              isZooming() {
                return !!this._zooming;
              }
              enable(y) {
                this.isEnabled() || (this._enabled = !0, this._aroundCenter = !!y && y.around === "center");
              }
              disable() {
                this.isEnabled() && (this._enabled = !1);
              }
              _shouldBePrevented(y) {
                return !!this._map.cooperativeGestures.isEnabled() && !(y.ctrlKey || this._map.cooperativeGestures.isBypassed(y));
              }
              wheel(y) {
                if (!this.isEnabled()) return;
                if (this._shouldBePrevented(y)) return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom", y);
                let b = y.deltaMode === WheelEvent.DOM_DELTA_LINE ? 40 * y.deltaY : y.deltaY;
                const R = d.now(), j = R - (this._lastWheelEventTime || 0);
                this._lastWheelEventTime = R, b !== 0 && b % js == 0 ? this._type = "wheel" : b !== 0 && Math.abs(b) < 4 ? this._type = "trackpad" : j > 400 ? (this._type = null, this._lastValue = b, this._timeout = setTimeout(this._onTimeout, 40, y)) : this._type || (this._type = Math.abs(j * b) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, b += this._lastValue)), y.shiftKey && b && (b /= 4), this._type && (this._lastWheelEvent = y, this._delta -= b, this._active || this._start(y)), y.preventDefault();
              }
              _start(y) {
                if (!this._delta) return;
                this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
                const b = f.mousePos(this._map.getCanvas(), y), R = this._tr;
                b.y > R.transform.height / 2 - R.transform.getHorizon() ? this._around = i.N.convert(this._aroundCenter ? R.center : R.unproject(b)) : this._around = i.N.convert(R.center), this._aroundPoint = R.transform.locationPoint(this._around), this._frameId || (this._frameId = !0, this._triggerRenderFrame());
              }
              renderFrame() {
                if (!this._frameId || (this._frameId = null, !this.isActive())) return;
                const y = this._tr.transform;
                if (this._delta !== 0) {
                  const xe = this._type === "wheel" && Math.abs(this._delta) > js ? this._wheelZoomRate : this._defaultZoomRate;
                  let Te = 2 / (1 + Math.exp(-Math.abs(this._delta * xe)));
                  this._delta < 0 && Te !== 0 && (Te = 1 / Te);
                  const ze = typeof this._targetZoom == "number" ? y.zoomScale(this._targetZoom) : y.scale;
                  this._targetZoom = Math.min(y.maxZoom, Math.max(y.minZoom, y.scaleZoom(ze * Te))), this._type === "wheel" && (this._startZoom = y.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
                }
                const b = typeof this._targetZoom == "number" ? this._targetZoom : y.zoom, R = this._startZoom, j = this._easing;
                let G, ie = !1;
                const fe = d.now() - this._lastWheelEventTime;
                if (this._type === "wheel" && R && j && fe) {
                  const xe = Math.min(fe / 200, 1), Te = j(xe);
                  G = i.z.number(R, b, Te), xe < 1 ? this._frameId || (this._frameId = !0) : ie = !0;
                } else G = b, ie = !0;
                return this._active = !0, ie && (this._active = !1, this._finishTimeout = setTimeout(() => {
                  this._zooming = !1, this._triggerRenderFrame(), delete this._targetZoom, delete this._finishTimeout;
                }, 200)), { noInertia: !0, needsRenderFrame: !ie, zoomDelta: G - y.zoom, around: this._aroundPoint, originalEvent: this._lastWheelEvent };
              }
              _smoothOutEasing(y) {
                let b = i.b9;
                if (this._prevEase) {
                  const R = this._prevEase, j = (d.now() - R.start) / R.duration, G = R.easing(j + 0.01) - R.easing(j), ie = 0.27 / Math.sqrt(G * G + 1e-4) * 0.01, fe = Math.sqrt(0.0729 - ie * ie);
                  b = i.b8(ie, fe, 0.25, 1);
                }
                return this._prevEase = { start: d.now(), duration: y, easing: b }, b;
              }
              reset() {
                this._active = !1, this._zooming = !1, delete this._targetZoom, this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
              }
            }
            class Fa {
              constructor(y, b) {
                this._clickZoom = y, this._tapZoom = b;
              }
              enable() {
                this._clickZoom.enable(), this._tapZoom.enable();
              }
              disable() {
                this._clickZoom.disable(), this._tapZoom.disable();
              }
              isEnabled() {
                return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();
              }
              isActive() {
                return this._clickZoom.isActive() || this._tapZoom.isActive();
              }
            }
            class Us {
              constructor(y) {
                this._tr = new Ra(y), this.reset();
              }
              reset() {
                this._active = !1;
              }
              dblclick(y, b) {
                return y.preventDefault(), { cameraAnimation: (R) => {
                  R.easeTo({ duration: 300, zoom: this._tr.zoom + (y.shiftKey ? -1 : 1), around: this._tr.unproject(b) }, { originalEvent: y });
                } };
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
            }
            class ss {
              constructor() {
                this._tap = new _a({ numTouches: 1, numTaps: 1 }), this.reset();
              }
              reset() {
                this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, delete this._tapPoint, this._tap.reset();
              }
              touchstart(y, b, R) {
                if (!this._swipePoint) if (this._tapTime) {
                  const j = b[0], G = y.timeStamp - this._tapTime < 500, ie = this._tapPoint.dist(j) < 30;
                  G && ie ? R.length > 0 && (this._swipePoint = j, this._swipeTouch = R[0].identifier) : this.reset();
                } else this._tap.touchstart(y, b, R);
              }
              touchmove(y, b, R) {
                if (this._tapTime) {
                  if (this._swipePoint) {
                    if (R[0].identifier !== this._swipeTouch) return;
                    const j = b[0], G = j.y - this._swipePoint.y;
                    return this._swipePoint = j, y.preventDefault(), this._active = !0, { zoomDelta: G / 128 };
                  }
                } else this._tap.touchmove(y, b, R);
              }
              touchend(y, b, R) {
                if (this._tapTime) this._swipePoint && R.length === 0 && this.reset();
                else {
                  const j = this._tap.touchend(y, b, R);
                  j && (this._tapTime = y.timeStamp, this._tapPoint = j);
                }
              }
              touchcancel() {
                this.reset();
              }
              enable() {
                this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this.reset();
              }
              isEnabled() {
                return this._enabled;
              }
              isActive() {
                return this._active;
              }
            }
            class el {
              constructor(y, b, R) {
                this._el = y, this._mousePan = b, this._touchPan = R;
              }
              enable(y) {
                this._inertiaOptions = y || {}, this._mousePan.enable(), this._touchPan.enable(), this._el.classList.add("maplibregl-touch-drag-pan");
              }
              disable() {
                this._mousePan.disable(), this._touchPan.disable(), this._el.classList.remove("maplibregl-touch-drag-pan");
              }
              isEnabled() {
                return this._mousePan.isEnabled() && this._touchPan.isEnabled();
              }
              isActive() {
                return this._mousePan.isActive() || this._touchPan.isActive();
              }
            }
            class ks {
              constructor(y, b, R) {
                this._pitchWithRotate = y.pitchWithRotate, this._mouseRotate = b, this._mousePitch = R;
              }
              enable() {
                this._mouseRotate.enable(), this._pitchWithRotate && this._mousePitch.enable();
              }
              disable() {
                this._mouseRotate.disable(), this._mousePitch.disable();
              }
              isEnabled() {
                return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled());
              }
              isActive() {
                return this._mouseRotate.isActive() || this._mousePitch.isActive();
              }
            }
            class iu {
              constructor(y, b, R, j) {
                this._el = y, this._touchZoom = b, this._touchRotate = R, this._tapDragZoom = j, this._rotationDisabled = !1, this._enabled = !0;
              }
              enable(y) {
                this._touchZoom.enable(y), this._rotationDisabled || this._touchRotate.enable(y), this._tapDragZoom.enable(), this._el.classList.add("maplibregl-touch-zoom-rotate");
              }
              disable() {
                this._touchZoom.disable(), this._touchRotate.disable(), this._tapDragZoom.disable(), this._el.classList.remove("maplibregl-touch-zoom-rotate");
              }
              isEnabled() {
                return this._touchZoom.isEnabled() && (this._rotationDisabled || this._touchRotate.isEnabled()) && this._tapDragZoom.isEnabled();
              }
              isActive() {
                return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();
              }
              disableRotation() {
                this._rotationDisabled = !0, this._touchRotate.disable();
              }
              enableRotation() {
                this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable();
              }
            }
            class tl {
              constructor(y, b) {
                this._bypassKey = navigator.userAgent.indexOf("Mac") !== -1 ? "metaKey" : "ctrlKey", this._map = y, this._options = b, this._enabled = !1;
              }
              isActive() {
                return !1;
              }
              reset() {
              }
              _setupUI() {
                if (this._container) return;
                const y = this._map.getCanvasContainer();
                y.classList.add("maplibregl-cooperative-gestures"), this._container = f.create("div", "maplibregl-cooperative-gesture-screen", y);
                let b = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");
                this._bypassKey === "metaKey" && (b = this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));
                const R = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), j = document.createElement("div");
                j.className = "maplibregl-desktop-message", j.textContent = b, this._container.appendChild(j);
                const G = document.createElement("div");
                G.className = "maplibregl-mobile-message", G.textContent = R, this._container.appendChild(G), this._container.setAttribute("aria-hidden", "true");
              }
              _destroyUI() {
                this._container && (f.remove(this._container), this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")), delete this._container;
              }
              enable() {
                this._setupUI(), this._enabled = !0;
              }
              disable() {
                this._enabled = !1, this._destroyUI();
              }
              isEnabled() {
                return this._enabled;
              }
              isBypassed(y) {
                return y[this._bypassKey];
              }
              notifyGestureBlocked(y, b) {
                this._enabled && (this._map.fire(new i.k("cooperativegestureprevented", { gestureType: y, originalEvent: b })), this._container.classList.add("maplibregl-show"), setTimeout(() => {
                  this._container.classList.remove("maplibregl-show");
                }, 100));
              }
            }
            const Os = (B) => B.zoom || B.drag || B.pitch || B.rotate;
            class Vs extends i.k {
            }
            function di(B) {
              return B.panDelta && B.panDelta.mag() || B.zoomDelta || B.bearingDelta || B.pitchDelta;
            }
            class xa {
              constructor(y, b) {
                this.handleWindowEvent = (j) => {
                  this.handleEvent(j, `${j.type}Window`);
                }, this.handleEvent = (j, G) => {
                  if (j.type === "blur") return void this.stop(!0);
                  this._updatingCamera = !0;
                  const ie = j.type === "renderFrame" ? void 0 : j, fe = { needsRenderFrame: !1 }, xe = {}, Te = {}, ze = j.touches, Ve = ze ? this._getMapTouches(ze) : void 0, ut = Ve ? f.touchPos(this._map.getCanvas(), Ve) : f.mousePos(this._map.getCanvas(), j);
                  for (const { handlerName: Et, handler: zt, allowed: It } of this._handlers) {
                    if (!zt.isEnabled()) continue;
                    let jt;
                    this._blockedByActive(Te, It, Et) ? zt.reset() : zt[G || j.type] && (jt = zt[G || j.type](j, ut, Ve), this.mergeHandlerResult(fe, xe, jt, Et, ie), jt && jt.needsRenderFrame && this._triggerRenderFrame()), (jt || zt.isActive()) && (Te[Et] = zt);
                  }
                  const gt = {};
                  for (const Et in this._previousActiveHandlers) Te[Et] || (gt[Et] = ie);
                  this._previousActiveHandlers = Te, (Object.keys(gt).length || di(fe)) && (this._changes.push([fe, xe, gt]), this._triggerRenderFrame()), (Object.keys(Te).length || di(fe)) && this._map._stop(!0), this._updatingCamera = !1;
                  const { cameraAnimation: wt } = fe;
                  wt && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], wt(this._map));
                }, this._map = y, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new uc(y), this._bearingSnap = b.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(b);
                const R = this._el;
                this._listeners = [[R, "touchstart", { passive: !0 }], [R, "touchmove", { passive: !1 }], [R, "touchend", void 0], [R, "touchcancel", void 0], [R, "mousedown", void 0], [R, "mousemove", void 0], [R, "mouseup", void 0], [document, "mousemove", { capture: !0 }], [document, "mouseup", void 0], [R, "mouseover", void 0], [R, "mouseout", void 0], [R, "dblclick", void 0], [R, "click", void 0], [R, "keydown", { capture: !1 }], [R, "keyup", void 0], [R, "wheel", { passive: !1 }], [R, "contextmenu", void 0], [window, "blur", void 0]];
                for (const [j, G, ie] of this._listeners) f.addEventListener(j, G, j === document ? this.handleWindowEvent : this.handleEvent, ie);
              }
              destroy() {
                for (const [y, b, R] of this._listeners) f.removeEventListener(y, b, y === document ? this.handleWindowEvent : this.handleEvent, R);
              }
              _addDefaultHandlers(y) {
                const b = this._map, R = b.getCanvasContainer();
                this._add("mapEvent", new bu(b, y));
                const j = b.boxZoom = new No(b, y);
                this._add("boxZoom", j), y.interactive && y.boxZoom && j.enable();
                const G = b.cooperativeGestures = new tl(b, y.cooperativeGestures);
                this._add("cooperativeGestures", G), y.cooperativeGestures && G.enable();
                const ie = new Do(b), fe = new Us(b);
                b.doubleClickZoom = new Fa(fe, ie), this._add("tapZoom", ie), this._add("clickZoom", fe), y.interactive && y.doubleClickZoom && b.doubleClickZoom.enable();
                const xe = new ss();
                this._add("tapDragZoom", xe);
                const Te = b.touchPitch = new zl(b);
                this._add("touchPitch", Te), y.interactive && y.touchPitch && b.touchPitch.enable(y.touchPitch);
                const ze = Bu(y), Ve = Ll(y);
                b.dragRotate = new ks(y, ze, Ve), this._add("mouseRotate", ze, ["mousePitch"]), this._add("mousePitch", Ve, ["mouseRotate"]), y.interactive && y.dragRotate && b.dragRotate.enable();
                const ut = (({ enable: jt, clickTolerance: Lt }) => {
                  const Zt = new Uo({ checkCorrectEvent: (Qt) => f.mouseButton(Qt) === 0 && !Qt.ctrlKey });
                  return new jo({ clickTolerance: Lt, move: (Qt, Xt) => ({ around: Xt, panDelta: Xt.sub(Qt) }), activateOnStart: !0, moveStateManager: Zt, enable: jt, assignEvents: os });
                })(y), gt = new Pl(y, b);
                b.dragPan = new el(R, ut, gt), this._add("mousePan", ut), this._add("touchPan", gt, ["touchZoom", "touchRotate"]), y.interactive && y.dragPan && b.dragPan.enable(y.dragPan);
                const wt = new Dc(), Et = new xi();
                b.touchZoomRotate = new iu(R, Et, wt, xe), this._add("touchRotate", wt, ["touchPan", "touchZoom"]), this._add("touchZoom", Et, ["touchPan", "touchRotate"]), y.interactive && y.touchZoomRotate && b.touchZoomRotate.enable(y.touchZoomRotate);
                const zt = b.scrollZoom = new Fl(b, () => this._triggerRenderFrame());
                this._add("scrollZoom", zt, ["mousePan"]), y.interactive && y.scrollZoom && b.scrollZoom.enable(y.scrollZoom);
                const It = b.keyboard = new ju(b);
                this._add("keyboard", It), y.interactive && y.keyboard && b.keyboard.enable(), this._add("blockableMapEvent", new Xo(b));
              }
              _add(y, b, R) {
                this._handlers.push({ handlerName: y, handler: b, allowed: R }), this._handlersById[y] = b;
              }
              stop(y) {
                if (!this._updatingCamera) {
                  for (const { handler: b } of this._handlers) b.reset();
                  this._inertia.clear(), this._fireEvents({}, {}, y), this._changes = [];
                }
              }
              isActive() {
                for (const { handler: y } of this._handlers) if (y.isActive()) return !0;
                return !1;
              }
              isZooming() {
                return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();
              }
              isRotating() {
                return !!this._eventsInProgress.rotate;
              }
              isMoving() {
                return !!Os(this._eventsInProgress) || this.isZooming();
              }
              _blockedByActive(y, b, R) {
                for (const j in y) if (j !== R && (!b || b.indexOf(j) < 0)) return !0;
                return !1;
              }
              _getMapTouches(y) {
                const b = [];
                for (const R of y) {
                  const j = R.target;
                  this._el.contains(j) && b.push(R);
                }
                return b;
              }
              mergeHandlerResult(y, b, R, j, G) {
                if (!R) return;
                i.e(y, R);
                const ie = { handlerName: j, originalEvent: R.originalEvent || G };
                R.zoomDelta !== void 0 && (b.zoom = ie), R.panDelta !== void 0 && (b.drag = ie), R.pitchDelta !== void 0 && (b.pitch = ie), R.bearingDelta !== void 0 && (b.rotate = ie);
              }
              _applyChanges() {
                const y = {}, b = {}, R = {};
                for (const [j, G, ie] of this._changes) j.panDelta && (y.panDelta = (y.panDelta || new i.P(0, 0))._add(j.panDelta)), j.zoomDelta && (y.zoomDelta = (y.zoomDelta || 0) + j.zoomDelta), j.bearingDelta && (y.bearingDelta = (y.bearingDelta || 0) + j.bearingDelta), j.pitchDelta && (y.pitchDelta = (y.pitchDelta || 0) + j.pitchDelta), j.around !== void 0 && (y.around = j.around), j.pinchAround !== void 0 && (y.pinchAround = j.pinchAround), j.noInertia && (y.noInertia = j.noInertia), i.e(b, G), i.e(R, ie);
                this._updateMapTransform(y, b, R), this._changes = [];
              }
              _updateMapTransform(y, b, R) {
                const j = this._map, G = j._getTransformForUpdate(), ie = j.terrain;
                if (!(di(y) || ie && this._terrainMovement)) return this._fireEvents(b, R, !0);
                let { panDelta: fe, zoomDelta: xe, bearingDelta: Te, pitchDelta: ze, around: Ve, pinchAround: ut } = y;
                ut !== void 0 && (Ve = ut), j._stop(!0), Ve = Ve || j.transform.centerPoint;
                const gt = G.pointLocation(fe ? Ve.sub(fe) : Ve);
                Te && (G.bearing += Te), ze && (G.pitch += ze), xe && (G.zoom += xe), ie ? this._terrainMovement || !b.drag && !b.zoom ? b.drag && this._terrainMovement ? G.center = G.pointLocation(G.centerPoint.sub(fe)) : G.setLocationAtPoint(gt, Ve) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, G.setLocationAtPoint(gt, Ve)) : G.setLocationAtPoint(gt, Ve), j._applyUpdatedTransform(G), this._map._update(), y.noInertia || this._inertia.record(y), this._fireEvents(b, R, !0);
              }
              _fireEvents(y, b, R) {
                const j = Os(this._eventsInProgress), G = Os(y), ie = {};
                for (const Ve in y) {
                  const { originalEvent: ut } = y[Ve];
                  this._eventsInProgress[Ve] || (ie[`${Ve}start`] = ut), this._eventsInProgress[Ve] = y[Ve];
                }
                !j && G && this._fireEvent("movestart", G.originalEvent);
                for (const Ve in ie) this._fireEvent(Ve, ie[Ve]);
                G && this._fireEvent("move", G.originalEvent);
                for (const Ve in y) {
                  const { originalEvent: ut } = y[Ve];
                  this._fireEvent(Ve, ut);
                }
                const fe = {};
                let xe;
                for (const Ve in this._eventsInProgress) {
                  const { handlerName: ut, originalEvent: gt } = this._eventsInProgress[Ve];
                  this._handlersById[ut].isActive() || (delete this._eventsInProgress[Ve], xe = b[ut] || gt, fe[`${Ve}end`] = xe);
                }
                for (const Ve in fe) this._fireEvent(Ve, fe[Ve]);
                const Te = Os(this._eventsInProgress), ze = (j || G) && !Te;
                if (ze && this._terrainMovement) {
                  this._map._elevationFreeze = !1, this._terrainMovement = !1;
                  const Ve = this._map._getTransformForUpdate();
                  Ve.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform(Ve);
                }
                if (R && ze) {
                  this._updatingCamera = !0;
                  const Ve = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), ut = (gt) => gt !== 0 && -this._bearingSnap < gt && gt < this._bearingSnap;
                  !Ve || !Ve.essential && d.prefersReducedMotion ? (this._map.fire(new i.k("moveend", { originalEvent: xe })), ut(this._map.getBearing()) && this._map.resetNorth()) : (ut(Ve.bearing || this._map.getBearing()) && (Ve.bearing = 0), Ve.freezeElevation = !0, this._map.easeTo(Ve, { originalEvent: xe })), this._updatingCamera = !1;
                }
              }
              _fireEvent(y, b) {
                this._map.fire(new i.k(y, b ? { originalEvent: b } : {}));
              }
              _requestFrame() {
                return this._map.triggerRepaint(), this._map._renderTaskQueue.add((y) => {
                  delete this._frameId, this.handleEvent(new Vs("renderFrame", { timeStamp: y })), this._applyChanges();
                });
              }
              _triggerRenderFrame() {
                this._frameId === void 0 && (this._frameId = this._requestFrame());
              }
            }
            class vo extends i.E {
              constructor(y, b) {
                super(), this._renderFrameCallback = () => {
                  const R = Math.min((d.now() - this._easeStart) / this._easeOptions.duration, 1);
                  this._onEaseFrame(this._easeOptions.easing(R)), R < 1 && this._easeFrameId ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop();
                }, this._moving = !1, this._zooming = !1, this.transform = y, this._bearingSnap = b.bearingSnap, this.on("moveend", () => {
                  delete this._requestedCameraState;
                });
              }
              getCenter() {
                return new i.N(this.transform.center.lng, this.transform.center.lat);
              }
              setCenter(y, b) {
                return this.jumpTo({ center: y }, b);
              }
              panBy(y, b, R) {
                return y = i.P.convert(y).mult(-1), this.panTo(this.transform.center, i.e({ offset: y }, b), R);
              }
              panTo(y, b, R) {
                return this.easeTo(i.e({ center: y }, b), R);
              }
              getZoom() {
                return this.transform.zoom;
              }
              setZoom(y, b) {
                return this.jumpTo({ zoom: y }, b), this;
              }
              zoomTo(y, b, R) {
                return this.easeTo(i.e({ zoom: y }, b), R);
              }
              zoomIn(y, b) {
                return this.zoomTo(this.getZoom() + 1, y, b), this;
              }
              zoomOut(y, b) {
                return this.zoomTo(this.getZoom() - 1, y, b), this;
              }
              getBearing() {
                return this.transform.bearing;
              }
              setBearing(y, b) {
                return this.jumpTo({ bearing: y }, b), this;
              }
              getPadding() {
                return this.transform.padding;
              }
              setPadding(y, b) {
                return this.jumpTo({ padding: y }, b), this;
              }
              rotateTo(y, b, R) {
                return this.easeTo(i.e({ bearing: y }, b), R);
              }
              resetNorth(y, b) {
                return this.rotateTo(0, i.e({ duration: 1e3 }, y), b), this;
              }
              resetNorthPitch(y, b) {
                return this.easeTo(i.e({ bearing: 0, pitch: 0, duration: 1e3 }, y), b), this;
              }
              snapToNorth(y, b) {
                return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(y, b) : this;
              }
              getPitch() {
                return this.transform.pitch;
              }
              setPitch(y, b) {
                return this.jumpTo({ pitch: y }, b), this;
              }
              cameraForBounds(y, b) {
                y = Se.convert(y);
                const R = b && b.bearing || 0;
                return this._cameraForBoxAndBearing(y.getNorthWest(), y.getSouthEast(), R, b);
              }
              _cameraForBoxAndBearing(y, b, R, j) {
                const G = { top: 0, bottom: 0, right: 0, left: 0 };
                if (typeof (j = i.e({ padding: G, offset: [0, 0], maxZoom: this.transform.maxZoom }, j)).padding == "number") {
                  const kr = j.padding;
                  j.padding = { top: kr, bottom: kr, right: kr, left: kr };
                }
                j.padding = i.e(G, j.padding);
                const ie = this.transform, fe = ie.padding, xe = new Se(y, b), Te = ie.project(xe.getNorthWest()), ze = ie.project(xe.getNorthEast()), Ve = ie.project(xe.getSouthEast()), ut = ie.project(xe.getSouthWest()), gt = i.ba(-R), wt = Te.rotate(gt), Et = ze.rotate(gt), zt = Ve.rotate(gt), It = ut.rotate(gt), jt = new i.P(Math.max(wt.x, Et.x, It.x, zt.x), Math.max(wt.y, Et.y, It.y, zt.y)), Lt = new i.P(Math.min(wt.x, Et.x, It.x, zt.x), Math.min(wt.y, Et.y, It.y, zt.y)), Zt = jt.sub(Lt), Qt = (ie.width - (fe.left + fe.right + j.padding.left + j.padding.right)) / Zt.x, Xt = (ie.height - (fe.top + fe.bottom + j.padding.top + j.padding.bottom)) / Zt.y;
                if (Xt < 0 || Qt < 0) return void i.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
                const yn = Math.min(ie.scaleZoom(ie.scale * Math.min(Qt, Xt)), j.maxZoom), Sn = i.P.convert(j.offset), Un = (j.padding.left - j.padding.right) / 2, Vn = (j.padding.top - j.padding.bottom) / 2, Yn = new i.P(Un, Vn).rotate(i.ba(R)), er = Sn.add(Yn).mult(ie.scale / ie.zoomScale(yn));
                return { center: ie.unproject(Te.add(Ve).div(2).sub(er)), zoom: yn, bearing: R };
              }
              fitBounds(y, b, R) {
                return this._fitInternal(this.cameraForBounds(y, b), b, R);
              }
              fitScreenCoordinates(y, b, R, j, G) {
                return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(i.P.convert(y)), this.transform.pointLocation(i.P.convert(b)), R, j), j, G);
              }
              _fitInternal(y, b, R) {
                return y ? (delete (b = i.e(y, b)).padding, b.linear ? this.easeTo(b, R) : this.flyTo(b, R)) : this;
              }
              jumpTo(y, b) {
                this.stop();
                const R = this._getTransformForUpdate();
                let j = !1, G = !1, ie = !1;
                return "zoom" in y && R.zoom !== +y.zoom && (j = !0, R.zoom = +y.zoom), y.center !== void 0 && (R.center = i.N.convert(y.center)), "bearing" in y && R.bearing !== +y.bearing && (G = !0, R.bearing = +y.bearing), "pitch" in y && R.pitch !== +y.pitch && (ie = !0, R.pitch = +y.pitch), y.padding == null || R.isPaddingEqual(y.padding) || (R.padding = y.padding), this._applyUpdatedTransform(R), this.fire(new i.k("movestart", b)).fire(new i.k("move", b)), j && this.fire(new i.k("zoomstart", b)).fire(new i.k("zoom", b)).fire(new i.k("zoomend", b)), G && this.fire(new i.k("rotatestart", b)).fire(new i.k("rotate", b)).fire(new i.k("rotateend", b)), ie && this.fire(new i.k("pitchstart", b)).fire(new i.k("pitch", b)).fire(new i.k("pitchend", b)), this.fire(new i.k("moveend", b));
              }
              calculateCameraOptionsFromTo(y, b, R, j = 0) {
                const G = i.Z.fromLngLat(y, b), ie = i.Z.fromLngLat(R, j), fe = ie.x - G.x, xe = ie.y - G.y, Te = ie.z - G.z, ze = Math.hypot(fe, xe, Te);
                if (ze === 0) throw new Error("Can't calculate camera options with same From and To");
                const Ve = Math.hypot(fe, xe), ut = this.transform.scaleZoom(this.transform.cameraToCenterDistance / ze / this.transform.tileSize), gt = 180 * Math.atan2(fe, -xe) / Math.PI;
                let wt = 180 * Math.acos(Ve / ze) / Math.PI;
                return wt = Te < 0 ? 90 - wt : 90 + wt, { center: ie.toLngLat(), zoom: ut, pitch: wt, bearing: gt };
              }
              easeTo(y, b) {
                var R;
                this._stop(!1, y.easeId), ((y = i.e({ offset: [0, 0], duration: 500, easing: i.b9 }, y)).animate === !1 || !y.essential && d.prefersReducedMotion) && (y.duration = 0);
                const j = this._getTransformForUpdate(), G = j.zoom, ie = j.bearing, fe = j.pitch, xe = j.padding, Te = "bearing" in y ? this._normalizeBearing(y.bearing, ie) : ie, ze = "pitch" in y ? +y.pitch : fe, Ve = "padding" in y ? y.padding : j.padding, ut = i.P.convert(y.offset);
                let gt = j.centerPoint.add(ut);
                const wt = j.pointLocation(gt), { center: Et, zoom: zt } = j.getConstrained(i.N.convert(y.center || wt), (R = y.zoom) !== null && R !== void 0 ? R : G);
                this._normalizeCenter(Et, j);
                const It = j.project(wt), jt = j.project(Et).sub(It), Lt = j.zoomScale(zt - G);
                let Zt, Qt;
                y.around && (Zt = i.N.convert(y.around), Qt = j.locationPoint(Zt));
                const Xt = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
                return this._zooming = this._zooming || zt !== G, this._rotating = this._rotating || ie !== Te, this._pitching = this._pitching || ze !== fe, this._padding = !j.isPaddingEqual(Ve), this._easeId = y.easeId, this._prepareEase(b, y.noMoveStart, Xt), this.terrain && this._prepareElevation(Et), this._ease((yn) => {
                  if (this._zooming && (j.zoom = i.z.number(G, zt, yn)), this._rotating && (j.bearing = i.z.number(ie, Te, yn)), this._pitching && (j.pitch = i.z.number(fe, ze, yn)), this._padding && (j.interpolatePadding(xe, Ve, yn), gt = j.centerPoint.add(ut)), this.terrain && !y.freezeElevation && this._updateElevation(yn), Zt) j.setLocationAtPoint(Zt, Qt);
                  else {
                    const Sn = j.zoomScale(j.zoom - G), Un = zt > G ? Math.min(2, Lt) : Math.max(0.5, Lt), Vn = Math.pow(Un, 1 - yn), Yn = j.unproject(It.add(jt.mult(yn * Vn)).mult(Sn));
                    j.setLocationAtPoint(j.renderWorldCopies ? Yn.wrap() : Yn, gt);
                  }
                  this._applyUpdatedTransform(j), this._fireMoveEvents(b);
                }, (yn) => {
                  this.terrain && y.freezeElevation && this._finalizeElevation(), this._afterEase(b, yn);
                }, y), this;
              }
              _prepareEase(y, b, R = {}) {
                this._moving = !0, b || R.moving || this.fire(new i.k("movestart", y)), this._zooming && !R.zooming && this.fire(new i.k("zoomstart", y)), this._rotating && !R.rotating && this.fire(new i.k("rotatestart", y)), this._pitching && !R.pitching && this.fire(new i.k("pitchstart", y));
              }
              _prepareElevation(y) {
                this._elevationCenter = y, this._elevationStart = this.transform.elevation, this._elevationTarget = this.terrain.getElevationForLngLatZoom(y, this.transform.tileZoom), this._elevationFreeze = !0;
              }
              _updateElevation(y) {
                this.transform.minElevationForCurrentTile = this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);
                const b = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);
                if (y < 1 && b !== this._elevationTarget) {
                  const R = this._elevationTarget - this._elevationStart, j = (b - (R * y + this._elevationStart)) / (1 - y);
                  this._elevationStart += y * (R - j), this._elevationTarget = b;
                }
                this.transform.elevation = i.z.number(this._elevationStart, this._elevationTarget, y);
              }
              _finalizeElevation() {
                this._elevationFreeze = !1, this.transform.recalculateZoom(this.terrain);
              }
              _getTransformForUpdate() {
                return this.transformCameraUpdate || this.terrain ? (this._requestedCameraState || (this._requestedCameraState = this.transform.clone()), this._requestedCameraState) : this.transform;
              }
              _elevateCameraIfInsideTerrain(y) {
                const b = y.getCameraPosition(), R = this.terrain.getElevationForLngLatZoom(b.lngLat, y.zoom);
                if (b.altitude < R) {
                  const j = this.calculateCameraOptionsFromTo(b.lngLat, R, y.center, y.elevation);
                  return { pitch: j.pitch, zoom: j.zoom };
                }
                return {};
              }
              _applyUpdatedTransform(y) {
                const b = [];
                if (this.terrain && b.push((j) => this._elevateCameraIfInsideTerrain(j)), this.transformCameraUpdate && b.push((j) => this.transformCameraUpdate(j)), !b.length) return;
                const R = y.clone();
                for (const j of b) {
                  const G = R.clone(), { center: ie, zoom: fe, pitch: xe, bearing: Te, elevation: ze } = j(G);
                  ie && (G.center = ie), fe !== void 0 && (G.zoom = fe), xe !== void 0 && (G.pitch = xe), Te !== void 0 && (G.bearing = Te), ze !== void 0 && (G.elevation = ze), R.apply(G);
                }
                this.transform.apply(R);
              }
              _fireMoveEvents(y) {
                this.fire(new i.k("move", y)), this._zooming && this.fire(new i.k("zoom", y)), this._rotating && this.fire(new i.k("rotate", y)), this._pitching && this.fire(new i.k("pitch", y));
              }
              _afterEase(y, b) {
                if (this._easeId && b && this._easeId === b) return;
                delete this._easeId;
                const R = this._zooming, j = this._rotating, G = this._pitching;
                this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._padding = !1, R && this.fire(new i.k("zoomend", y)), j && this.fire(new i.k("rotateend", y)), G && this.fire(new i.k("pitchend", y)), this.fire(new i.k("moveend", y));
              }
              flyTo(y, b) {
                var R;
                if (!y.essential && d.prefersReducedMotion) {
                  const fr = i.M(y, ["center", "zoom", "bearing", "pitch", "around"]);
                  return this.jumpTo(fr, b);
                }
                this.stop(), y = i.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: i.b9 }, y);
                const j = this._getTransformForUpdate(), G = j.zoom, ie = j.bearing, fe = j.pitch, xe = j.padding, Te = "bearing" in y ? this._normalizeBearing(y.bearing, ie) : ie, ze = "pitch" in y ? +y.pitch : fe, Ve = "padding" in y ? y.padding : j.padding, ut = i.P.convert(y.offset);
                let gt = j.centerPoint.add(ut);
                const wt = j.pointLocation(gt), { center: Et, zoom: zt } = j.getConstrained(i.N.convert(y.center || wt), (R = y.zoom) !== null && R !== void 0 ? R : G);
                this._normalizeCenter(Et, j);
                const It = j.zoomScale(zt - G), jt = j.project(wt), Lt = j.project(Et).sub(jt);
                let Zt = y.curve;
                const Qt = Math.max(j.width, j.height), Xt = Qt / It, yn = Lt.mag();
                if ("minZoom" in y) {
                  const fr = i.ad(Math.min(y.minZoom, G, zt), j.minZoom, j.maxZoom), Or = Qt / j.zoomScale(fr - G);
                  Zt = Math.sqrt(Or / yn * 2);
                }
                const Sn = Zt * Zt;
                function Un(fr) {
                  const Or = (Xt * Xt - Qt * Qt + (fr ? -1 : 1) * Sn * Sn * yn * yn) / (2 * (fr ? Xt : Qt) * Sn * yn);
                  return Math.log(Math.sqrt(Or * Or + 1) - Or);
                }
                function Vn(fr) {
                  return (Math.exp(fr) - Math.exp(-fr)) / 2;
                }
                function Yn(fr) {
                  return (Math.exp(fr) + Math.exp(-fr)) / 2;
                }
                const er = Un(!1);
                let kr = function(fr) {
                  return Yn(er) / Yn(er + Zt * fr);
                }, or = function(fr) {
                  return Qt * ((Yn(er) * (Vn(Or = er + Zt * fr) / Yn(Or)) - Vn(er)) / Sn) / yn;
                  var Or;
                }, Mr = (Un(!0) - er) / Zt;
                if (Math.abs(yn) < 1e-6 || !isFinite(Mr)) {
                  if (Math.abs(Qt - Xt) < 1e-6) return this.easeTo(y, b);
                  const fr = Xt < Qt ? -1 : 1;
                  Mr = Math.abs(Math.log(Xt / Qt)) / Zt, or = () => 0, kr = (Or) => Math.exp(fr * Zt * Or);
                }
                if ("duration" in y) y.duration = +y.duration;
                else {
                  const fr = "screenSpeed" in y ? +y.screenSpeed / Zt : +y.speed;
                  y.duration = 1e3 * Mr / fr;
                }
                return y.maxDuration && y.duration > y.maxDuration && (y.duration = 0), this._zooming = !0, this._rotating = ie !== Te, this._pitching = ze !== fe, this._padding = !j.isPaddingEqual(Ve), this._prepareEase(b, !1), this.terrain && this._prepareElevation(Et), this._ease((fr) => {
                  const Or = fr * Mr, br = 1 / kr(Or);
                  j.zoom = fr === 1 ? zt : G + j.scaleZoom(br), this._rotating && (j.bearing = i.z.number(ie, Te, fr)), this._pitching && (j.pitch = i.z.number(fe, ze, fr)), this._padding && (j.interpolatePadding(xe, Ve, fr), gt = j.centerPoint.add(ut)), this.terrain && !y.freezeElevation && this._updateElevation(fr);
                  const Nr = fr === 1 ? Et : j.unproject(jt.add(Lt.mult(or(Or))).mult(br));
                  j.setLocationAtPoint(j.renderWorldCopies ? Nr.wrap() : Nr, gt), this._applyUpdatedTransform(j), this._fireMoveEvents(b);
                }, () => {
                  this.terrain && y.freezeElevation && this._finalizeElevation(), this._afterEase(b);
                }, y), this;
              }
              isEasing() {
                return !!this._easeFrameId;
              }
              stop() {
                return this._stop();
              }
              _stop(y, b) {
                var R;
                if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) {
                  const j = this._onEaseEnd;
                  delete this._onEaseEnd, j.call(this, b);
                }
                return y || (R = this.handlers) === null || R === void 0 || R.stop(!1), this;
              }
              _ease(y, b, R) {
                R.animate === !1 || R.duration === 0 ? (y(1), b()) : (this._easeStart = d.now(), this._easeOptions = R, this._onEaseFrame = y, this._onEaseEnd = b, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback));
              }
              _normalizeBearing(y, b) {
                y = i.b3(y, -180, 180);
                const R = Math.abs(y - b);
                return Math.abs(y - 360 - b) < R && (y -= 360), Math.abs(y + 360 - b) < R && (y += 360), y;
              }
              _normalizeCenter(y, b) {
                if (!b.renderWorldCopies || b.lngRange) return;
                const R = y.lng - b.center.lng;
                y.lng += R > 180 ? -360 : R < -180 ? 360 : 0;
              }
              queryTerrainElevation(y) {
                return this.terrain ? this.terrain.getElevationForLngLatZoom(i.N.convert(y), this.transform.tileZoom) - this.transform.elevation : null;
              }
            }
            const Ts = { compact: !0, customAttribution: '<a href="https://maplibre.org/" target="_blank">MapLibre</a>' };
            class nl {
              constructor(y = Ts) {
                this._toggleAttribution = () => {
                  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")));
                }, this._updateData = (b) => {
                  !b || b.sourceDataType !== "metadata" && b.sourceDataType !== "visibility" && b.dataType !== "style" && b.type !== "terrain" || this._updateAttributions();
                }, this._updateCompact = () => {
                  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"));
                }, this._updateCompactMinimize = () => {
                  this._container.classList.contains("maplibregl-compact") && this._container.classList.contains("maplibregl-compact-show") && this._container.classList.remove("maplibregl-compact-show");
                }, this.options = y;
              }
              getDefaultPosition() {
                return "bottom-right";
              }
              onAdd(y) {
                return this._map = y, this._compact = this.options.compact, this._container = f.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = f.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = f.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;
              }
              onRemove() {
                f.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;
              }
              _setElementTitle(y, b) {
                const R = this._map._getUIString(`AttributionControl.${b}`);
                y.title = R, y.setAttribute("aria-label", R);
              }
              _updateAttributions() {
                if (!this._map.style) return;
                let y = [];
                if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? y = y.concat(this.options.customAttribution.map((j) => typeof j != "string" ? "" : j)) : typeof this.options.customAttribution == "string" && y.push(this.options.customAttribution)), this._map.style.stylesheet) {
                  const j = this._map.style.stylesheet;
                  this.styleOwner = j.owner, this.styleId = j.id;
                }
                const b = this._map.style.sourceCaches;
                for (const j in b) {
                  const G = b[j];
                  if (G.used || G.usedForTerrain) {
                    const ie = G.getSource();
                    ie.attribution && y.indexOf(ie.attribution) < 0 && y.push(ie.attribution);
                  }
                }
                y = y.filter((j) => String(j).trim()), y.sort((j, G) => j.length - G.length), y = y.filter((j, G) => {
                  for (let ie = G + 1; ie < y.length; ie++) if (y[ie].indexOf(j) >= 0) return !1;
                  return !0;
                });
                const R = y.join(" | ");
                R !== this._attribHTML && (this._attribHTML = R, y.length ? (this._innerContainer.innerHTML = R, this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
              }
            }
            class Vo {
              constructor(y = {}) {
                this._updateCompact = () => {
                  const b = this._container.children;
                  if (b.length) {
                    const R = b[0];
                    this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? this._compact !== !1 && R.classList.add("maplibregl-compact") : R.classList.remove("maplibregl-compact");
                  }
                }, this.options = y;
              }
              getDefaultPosition() {
                return "bottom-left";
              }
              onAdd(y) {
                this._map = y, this._compact = this.options && this.options.compact, this._container = f.create("div", "maplibregl-ctrl");
                const b = f.create("a", "maplibregl-ctrl-logo");
                return b.target = "_blank", b.rel = "noopener nofollow", b.href = "https://maplibre.org/", b.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), b.setAttribute("rel", "noopener nofollow"), this._container.appendChild(b), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
              }
              onRemove() {
                f.remove(this._container), this._map.off("resize", this._updateCompact), this._map = void 0, this._compact = void 0;
              }
            }
            class Qu {
              constructor() {
                this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1;
              }
              add(y) {
                const b = ++this._id;
                return this._queue.push({ callback: y, id: b, cancelled: !1 }), b;
              }
              remove(y) {
                const b = this._currentlyRunning, R = b ? this._queue.concat(b) : this._queue;
                for (const j of R) if (j.id === y) return void (j.cancelled = !0);
              }
              run(y = 0) {
                if (this._currentlyRunning) throw new Error("Attempting to run(), but is already running.");
                const b = this._currentlyRunning = this._queue;
                this._queue = [];
                for (const R of b) if (!R.cancelled && (R.callback(y), this._cleared)) break;
                this._cleared = !1, this._currentlyRunning = !1;
              }
              clear() {
                this._currentlyRunning && (this._cleared = !0), this._queue = [];
              }
            }
            var li = i.Y([{ name: "a_pos3d", type: "Int16", components: 3 }]);
            class ls extends i.E {
              constructor(y) {
                super(), this.sourceCache = y, this._tiles = {}, this._renderableTilesKeys = [], this._sourceTileCache = {}, this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.deltaZoom = 1, y.usedForTerrain = !0, y.tileSize = this.tileSize * 2 ** this.deltaZoom;
              }
              destruct() {
                this.sourceCache.usedForTerrain = !1, this.sourceCache.tileSize = null;
              }
              update(y, b) {
                this.sourceCache.update(y, b), this._renderableTilesKeys = [];
                const R = {};
                for (const j of y.coveringTiles({ tileSize: this.tileSize, minzoom: this.minzoom, maxzoom: this.maxzoom, reparseOverscaled: !1, terrain: b })) R[j.key] = !0, this._renderableTilesKeys.push(j.key), this._tiles[j.key] || (j.posMatrix = new Float64Array(16), i.aQ(j.posMatrix, 0, i.X, 0, i.X, 0, 1), this._tiles[j.key] = new _e(j, this.tileSize));
                for (const j in this._tiles) R[j] || delete this._tiles[j];
              }
              freeRtt(y) {
                for (const b in this._tiles) {
                  const R = this._tiles[b];
                  (!y || R.tileID.equals(y) || R.tileID.isChildOf(y) || y.isChildOf(R.tileID)) && (R.rtt = []);
                }
              }
              getRenderableTiles() {
                return this._renderableTilesKeys.map((y) => this.getTileByID(y));
              }
              getTileByID(y) {
                return this._tiles[y];
              }
              getTerrainCoords(y) {
                const b = {};
                for (const R of this._renderableTilesKeys) {
                  const j = this._tiles[R].tileID;
                  if (j.canonical.equals(y.canonical)) {
                    const G = y.clone();
                    G.posMatrix = new Float64Array(16), i.aQ(G.posMatrix, 0, i.X, 0, i.X, 0, 1), b[R] = G;
                  } else if (j.canonical.isChildOf(y.canonical)) {
                    const G = y.clone();
                    G.posMatrix = new Float64Array(16);
                    const ie = j.canonical.z - y.canonical.z, fe = j.canonical.x - (j.canonical.x >> ie << ie), xe = j.canonical.y - (j.canonical.y >> ie << ie), Te = i.X >> ie;
                    i.aQ(G.posMatrix, 0, Te, 0, Te, 0, 1), i.J(G.posMatrix, G.posMatrix, [-fe * Te, -xe * Te, 0]), b[R] = G;
                  } else if (y.canonical.isChildOf(j.canonical)) {
                    const G = y.clone();
                    G.posMatrix = new Float64Array(16);
                    const ie = y.canonical.z - j.canonical.z, fe = y.canonical.x - (y.canonical.x >> ie << ie), xe = y.canonical.y - (y.canonical.y >> ie << ie), Te = i.X >> ie;
                    i.aQ(G.posMatrix, 0, i.X, 0, i.X, 0, 1), i.J(G.posMatrix, G.posMatrix, [fe * Te, xe * Te, 0]), i.K(G.posMatrix, G.posMatrix, [1 / 2 ** ie, 1 / 2 ** ie, 0]), b[R] = G;
                  }
                }
                return b;
              }
              getSourceTile(y, b) {
                const R = this.sourceCache._source;
                let j = y.overscaledZ - this.deltaZoom;
                if (j > R.maxzoom && (j = R.maxzoom), j < R.minzoom) return null;
                this._sourceTileCache[y.key] || (this._sourceTileCache[y.key] = y.scaledTo(j).key);
                let G = this.sourceCache.getTileByID(this._sourceTileCache[y.key]);
                if ((!G || !G.dem) && b) for (; j >= R.minzoom && (!G || !G.dem); ) G = this.sourceCache.getTileByID(y.scaledTo(j--).key);
                return G;
              }
              tilesAfterTime(y = Date.now()) {
                return Object.values(this._tiles).filter((b) => b.timeAdded >= y);
              }
            }
            class ma {
              constructor(y, b, R) {
                this.painter = y, this.sourceCache = new ls(b), this.options = R, this.exaggeration = typeof R.exaggeration == "number" ? R.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024;
              }
              getDEMElevation(y, b, R, j = i.X) {
                var G;
                if (!(b >= 0 && b < j && R >= 0 && R < j)) return 0;
                const ie = this.getTerrainData(y), fe = (G = ie.tile) === null || G === void 0 ? void 0 : G.dem;
                if (!fe) return 0;
                const xe = function(wt, Et, zt) {
                  var It = Et[0], jt = Et[1];
                  return wt[0] = zt[0] * It + zt[4] * jt + zt[12], wt[1] = zt[1] * It + zt[5] * jt + zt[13], wt;
                }([], [b / j * i.X, R / j * i.X], ie.u_terrain_matrix), Te = [xe[0] * fe.dim, xe[1] * fe.dim], ze = Math.floor(Te[0]), Ve = Math.floor(Te[1]), ut = Te[0] - ze, gt = Te[1] - Ve;
                return fe.get(ze, Ve) * (1 - ut) * (1 - gt) + fe.get(ze + 1, Ve) * ut * (1 - gt) + fe.get(ze, Ve + 1) * (1 - ut) * gt + fe.get(ze + 1, Ve + 1) * ut * gt;
              }
              getElevationForLngLatZoom(y, b) {
                const { tileID: R, mercatorX: j, mercatorY: G } = this._getOverscaledTileIDFromLngLatZoom(y, b);
                return this.getElevation(R, j % i.X, G % i.X, i.X);
              }
              getElevation(y, b, R, j = i.X) {
                return this.getDEMElevation(y, b, R, j) * this.exaggeration;
              }
              getTerrainData(y) {
                if (!this._emptyDemTexture) {
                  const j = this.painter.context, G = new i.R({ width: 1, height: 1 }, new Uint8Array(4));
                  this._emptyDepthTexture = new O(j, G, j.gl.RGBA, { premultiply: !1 }), this._emptyDemUnpack = [0, 0, 0, 0], this._emptyDemTexture = new O(j, new i.R({ width: 1, height: 1 }), j.gl.RGBA, { premultiply: !1 }), this._emptyDemTexture.bind(j.gl.NEAREST, j.gl.CLAMP_TO_EDGE), this._emptyDemMatrix = i.ao([]);
                }
                const b = this.sourceCache.getSourceTile(y, !0);
                if (b && b.dem && (!b.demTexture || b.needsTerrainPrepare)) {
                  const j = this.painter.context;
                  b.demTexture = this.painter.getTileTexture(b.dem.stride), b.demTexture ? b.demTexture.update(b.dem.getPixels(), { premultiply: !1 }) : b.demTexture = new O(j, b.dem.getPixels(), j.gl.RGBA, { premultiply: !1 }), b.demTexture.bind(j.gl.NEAREST, j.gl.CLAMP_TO_EDGE), b.needsTerrainPrepare = !1;
                }
                const R = b && b + b.tileID.key + y.key;
                if (R && !this._demMatrixCache[R]) {
                  const j = this.sourceCache.sourceCache._source.maxzoom;
                  let G = y.canonical.z - b.tileID.canonical.z;
                  y.overscaledZ > y.canonical.z && (y.canonical.z >= j ? G = y.canonical.z - j : i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));
                  const ie = y.canonical.x - (y.canonical.x >> G << G), fe = y.canonical.y - (y.canonical.y >> G << G), xe = i.bb(new Float64Array(16), [1 / (i.X << G), 1 / (i.X << G), 0]);
                  i.J(xe, xe, [ie * i.X, fe * i.X, 0]), this._demMatrixCache[y.key] = { matrix: xe, coord: y };
                }
                return { u_depth: 2, u_terrain: 3, u_terrain_dim: b && b.dem && b.dem.dim || 1, u_terrain_matrix: R ? this._demMatrixCache[y.key].matrix : this._emptyDemMatrix, u_terrain_unpack: b && b.dem && b.dem.getUnpackVector() || this._emptyDemUnpack, u_terrain_exaggeration: this.exaggeration, texture: (b && b.demTexture || this._emptyDemTexture).texture, depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture, tile: b };
              }
              getFramebuffer(y) {
                const b = this.painter, R = b.width / devicePixelRatio, j = b.height / devicePixelRatio;
                return !this._fbo || this._fbo.width === R && this._fbo.height === j || (this._fbo.destroy(), this._fboCoordsTexture.destroy(), this._fboDepthTexture.destroy(), delete this._fbo, delete this._fboDepthTexture, delete this._fboCoordsTexture), this._fboCoordsTexture || (this._fboCoordsTexture = new O(b.context, { width: R, height: j, data: null }, b.context.gl.RGBA, { premultiply: !1 }), this._fboCoordsTexture.bind(b.context.gl.NEAREST, b.context.gl.CLAMP_TO_EDGE)), this._fboDepthTexture || (this._fboDepthTexture = new O(b.context, { width: R, height: j, data: null }, b.context.gl.RGBA, { premultiply: !1 }), this._fboDepthTexture.bind(b.context.gl.NEAREST, b.context.gl.CLAMP_TO_EDGE)), this._fbo || (this._fbo = b.context.createFramebuffer(R, j, !0, !1), this._fbo.depthAttachment.set(b.context.createRenderbuffer(b.context.gl.DEPTH_COMPONENT16, R, j))), this._fbo.colorAttachment.set(y === "coords" ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture), this._fbo;
              }
              getCoordsTexture() {
                const y = this.painter.context;
                if (this._coordsTexture) return this._coordsTexture;
                const b = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4);
                for (let G = 0, ie = 0; G < this._coordsTextureSize; G++) for (let fe = 0; fe < this._coordsTextureSize; fe++, ie += 4) b[ie + 0] = 255 & fe, b[ie + 1] = 255 & G, b[ie + 2] = fe >> 8 << 4 | G >> 8, b[ie + 3] = 0;
                const R = new i.R({ width: this._coordsTextureSize, height: this._coordsTextureSize }, new Uint8Array(b.buffer)), j = new O(y, R, y.gl.RGBA, { premultiply: !1 });
                return j.bind(y.gl.NEAREST, y.gl.CLAMP_TO_EDGE), this._coordsTexture = j, j;
              }
              pointCoordinate(y) {
                this.painter.maybeDrawDepthAndCoords(!0);
                const b = new Uint8Array(4), R = this.painter.context, j = R.gl, G = Math.round(y.x * this.painter.pixelRatio / devicePixelRatio), ie = Math.round(y.y * this.painter.pixelRatio / devicePixelRatio), fe = Math.round(this.painter.height / devicePixelRatio);
                R.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), j.readPixels(G, fe - ie - 1, 1, 1, j.RGBA, j.UNSIGNED_BYTE, b), R.bindFramebuffer.set(null);
                const xe = b[0] + (b[2] >> 4 << 8), Te = b[1] + ((15 & b[2]) << 8), ze = this.coordsIndex[255 - b[3]], Ve = ze && this.sourceCache.getTileByID(ze);
                if (!Ve) return null;
                const ut = this._coordsTextureSize, gt = (1 << Ve.tileID.canonical.z) * ut;
                return new i.Z((Ve.tileID.canonical.x * ut + xe) / gt + Ve.tileID.wrap, (Ve.tileID.canonical.y * ut + Te) / gt, this.getElevation(Ve.tileID, xe, Te, ut));
              }
              depthAtPoint(y) {
                const b = new Uint8Array(4), R = this.painter.context, j = R.gl;
                return R.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer), j.readPixels(y.x, this.painter.height / devicePixelRatio - y.y - 1, 1, 1, j.RGBA, j.UNSIGNED_BYTE, b), R.bindFramebuffer.set(null), (b[0] / 16777216 + b[1] / 65536 + b[2] / 256 + b[3]) / 256;
              }
              getTerrainMesh() {
                if (this._mesh) return this._mesh;
                const y = this.painter.context, b = new i.bc(), R = new i.aY(), j = this.meshSize, G = i.X / j, ie = j * j;
                for (let Ve = 0; Ve <= j; Ve++) for (let ut = 0; ut <= j; ut++) b.emplaceBack(ut * G, Ve * G, 0);
                for (let Ve = 0; Ve < ie; Ve += j + 1) for (let ut = 0; ut < j; ut++) R.emplaceBack(ut + Ve, j + ut + Ve + 1, j + ut + Ve + 2), R.emplaceBack(ut + Ve, j + ut + Ve + 2, ut + Ve + 1);
                const fe = b.length, xe = fe + 2 * (j + 1);
                for (const Ve of [0, 1]) for (let ut = 0; ut <= j; ut++) for (const gt of [0, 1]) b.emplaceBack(ut * G, Ve * i.X, gt);
                for (let Ve = 0; Ve < 2 * j; Ve += 2) R.emplaceBack(xe + Ve, xe + Ve + 1, xe + Ve + 3), R.emplaceBack(xe + Ve, xe + Ve + 3, xe + Ve + 2), R.emplaceBack(fe + Ve, fe + Ve + 3, fe + Ve + 1), R.emplaceBack(fe + Ve, fe + Ve + 2, fe + Ve + 3);
                const Te = b.length, ze = Te + 2 * (j + 1);
                for (const Ve of [0, 1]) for (let ut = 0; ut <= j; ut++) for (const gt of [0, 1]) b.emplaceBack(Ve * i.X, ut * G, gt);
                for (let Ve = 0; Ve < 2 * j; Ve += 2) R.emplaceBack(Te + Ve, Te + Ve + 1, Te + Ve + 3), R.emplaceBack(Te + Ve, Te + Ve + 3, Te + Ve + 2), R.emplaceBack(ze + Ve, ze + Ve + 3, ze + Ve + 1), R.emplaceBack(ze + Ve, ze + Ve + 2, ze + Ve + 3);
                return this._mesh = new ws(y.createVertexBuffer(b, li.members), y.createIndexBuffer(R), i.a0.simpleSegment(0, 0, b.length, R.length)), this._mesh;
              }
              getMeshFrameDelta(y) {
                return 2 * Math.PI * i.bd / Math.pow(2, y) / 5;
              }
              getMinTileElevationForLngLatZoom(y, b) {
                var R;
                const { tileID: j } = this._getOverscaledTileIDFromLngLatZoom(y, b);
                return (R = this.getMinMaxElevation(j).minElevation) !== null && R !== void 0 ? R : 0;
              }
              getMinMaxElevation(y) {
                const b = this.getTerrainData(y).tile, R = { minElevation: null, maxElevation: null };
                return b && b.dem && (R.minElevation = b.dem.min * this.exaggeration, R.maxElevation = b.dem.max * this.exaggeration), R;
              }
              _getOverscaledTileIDFromLngLatZoom(y, b) {
                const R = i.Z.fromLngLat(y.wrap()), j = (1 << b) * i.X, G = R.x * j, ie = R.y * j, fe = Math.floor(G / i.X), xe = Math.floor(ie / i.X);
                return { tileID: new i.S(b, 0, b, fe, xe), mercatorX: G, mercatorY: ie };
              }
            }
            class au {
              constructor(y, b, R) {
                this._context = y, this._size = b, this._tileSize = R, this._objects = [], this._recentlyUsed = [], this._stamp = 0;
              }
              destruct() {
                for (const y of this._objects) y.texture.destroy(), y.fbo.destroy();
              }
              _createObject(y) {
                const b = this._context.createFramebuffer(this._tileSize, this._tileSize, !0, !0), R = new O(this._context, { width: this._tileSize, height: this._tileSize, data: null }, this._context.gl.RGBA);
                return R.bind(this._context.gl.LINEAR, this._context.gl.CLAMP_TO_EDGE), b.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize)), b.colorAttachment.set(R.texture), { id: y, fbo: b, texture: R, stamp: -1, inUse: !1 };
              }
              getObjectForId(y) {
                return this._objects[y];
              }
              useObject(y) {
                y.inUse = !0, this._recentlyUsed = this._recentlyUsed.filter((b) => y.id !== b), this._recentlyUsed.push(y.id);
              }
              stampObject(y) {
                y.stamp = ++this._stamp;
              }
              getOrCreateFreeObject() {
                for (const b of this._recentlyUsed) if (!this._objects[b].inUse) return this._objects[b];
                if (this._objects.length >= this._size) throw new Error("No free RenderPool available, call freeAllObjects() required!");
                const y = this._createObject(this._objects.length);
                return this._objects.push(y), y;
              }
              freeObject(y) {
                y.inUse = !1;
              }
              freeAllObjects() {
                for (const y of this._objects) this.freeObject(y);
              }
              isFull() {
                return !(this._objects.length < this._size) && this._objects.some((y) => !y.inUse) === !1;
              }
            }
            const $s = { background: !0, fill: !0, line: !0, raster: !0, hillshade: !0 };
            class bl {
              constructor(y, b) {
                this.painter = y, this.terrain = b, this.pool = new au(y.context, 30, b.sourceCache.tileSize * b.qualityFactor);
              }
              destruct() {
                this.pool.destruct();
              }
              getTexture(y) {
                return this.pool.getObjectForId(y.rtt[this._stacks.length - 1].id).texture;
              }
              prepareForRender(y, b) {
                this._stacks = [], this._prevType = null, this._rttTiles = [], this._renderableTiles = this.terrain.sourceCache.getRenderableTiles(), this._renderableLayerIds = y._order.filter((R) => !y._layers[R].isHidden(b)), this._coordsDescendingInv = {};
                for (const R in y.sourceCaches) {
                  this._coordsDescendingInv[R] = {};
                  const j = y.sourceCaches[R].getVisibleCoordinates();
                  for (const G of j) {
                    const ie = this.terrain.sourceCache.getTerrainCoords(G);
                    for (const fe in ie) this._coordsDescendingInv[R][fe] || (this._coordsDescendingInv[R][fe] = []), this._coordsDescendingInv[R][fe].push(ie[fe]);
                  }
                }
                this._coordsDescendingInvStr = {};
                for (const R of y._order) {
                  const j = y._layers[R], G = j.source;
                  if ($s[j.type] && !this._coordsDescendingInvStr[G]) {
                    this._coordsDescendingInvStr[G] = {};
                    for (const ie in this._coordsDescendingInv[G]) this._coordsDescendingInvStr[G][ie] = this._coordsDescendingInv[G][ie].map((fe) => fe.key).sort().join();
                  }
                }
                for (const R of this._renderableTiles) for (const j in this._coordsDescendingInvStr) {
                  const G = this._coordsDescendingInvStr[j][R.tileID.key];
                  G && G !== R.rttCoords[j] && (R.rtt = []);
                }
              }
              renderLayer(y) {
                if (y.isHidden(this.painter.transform.zoom)) return !1;
                const b = y.type, R = this.painter, j = this._renderableLayerIds[this._renderableLayerIds.length - 1] === y.id;
                if ($s[b] && (this._prevType && $s[this._prevType] || this._stacks.push([]), this._prevType = b, this._stacks[this._stacks.length - 1].push(y.id), !j)) return !0;
                if ($s[this._prevType] || $s[b] && j) {
                  this._prevType = b;
                  const G = this._stacks.length - 1, ie = this._stacks[G] || [];
                  for (const fe of this._renderableTiles) {
                    if (this.pool.isFull() && (Fu(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects()), this._rttTiles.push(fe), fe.rtt[G]) {
                      const Te = this.pool.getObjectForId(fe.rtt[G].id);
                      if (Te.stamp === fe.rtt[G].stamp) {
                        this.pool.useObject(Te);
                        continue;
                      }
                    }
                    const xe = this.pool.getOrCreateFreeObject();
                    this.pool.useObject(xe), this.pool.stampObject(xe), fe.rtt[G] = { id: xe.id, stamp: xe.stamp }, R.context.bindFramebuffer.set(xe.fbo.framebuffer), R.context.clear({ color: i.aN.transparent, stencil: 0 }), R.currentStencilSource = void 0;
                    for (let Te = 0; Te < ie.length; Te++) {
                      const ze = R.style._layers[ie[Te]], Ve = ze.source ? this._coordsDescendingInv[ze.source][fe.tileID.key] : [fe.tileID];
                      R.context.viewport.set([0, 0, xe.fbo.width, xe.fbo.height]), R._renderTileClippingMasks(ze, Ve), R.renderLayer(R, R.style.sourceCaches[ze.source], ze, Ve), ze.source && (fe.rttCoords[ze.source] = this._coordsDescendingInvStr[ze.source][fe.tileID.key]);
                    }
                  }
                  return Fu(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects(), $s[b];
                }
                return !1;
              }
            }
            const Lc = { "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", "Marker.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" }, ec = h, rl = { hash: !1, interactive: !0, bearingSnap: 7, attributionControl: Ts, 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: i.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 }, Na = (B) => {
              B.touchstart = B.dragStart, B.touchmoveWindow = B.dragMove, B.touchend = B.dragEnd;
            }, il = { showCompass: !0, showZoom: !0, visualizePitch: !1 };
            class ni {
              constructor(y, b, R = !1) {
                this.mousedown = (ie) => {
                  this.startMouse(i.e({}, ie, { ctrlKey: !0, preventDefault: () => ie.preventDefault() }), f.mousePos(this.element, ie)), f.addEventListener(window, "mousemove", this.mousemove), f.addEventListener(window, "mouseup", this.mouseup);
                }, this.mousemove = (ie) => {
                  this.moveMouse(ie, f.mousePos(this.element, ie));
                }, this.mouseup = (ie) => {
                  this.mouseRotate.dragEnd(ie), this.mousePitch && this.mousePitch.dragEnd(ie), this.offTemp();
                }, this.touchstart = (ie) => {
                  ie.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = f.touchPos(this.element, ie.targetTouches)[0], this.startTouch(ie, this._startPos), f.addEventListener(window, "touchmove", this.touchmove, { passive: !1 }), f.addEventListener(window, "touchend", this.touchend));
                }, this.touchmove = (ie) => {
                  ie.targetTouches.length !== 1 ? this.reset() : (this._lastPos = f.touchPos(this.element, ie.targetTouches)[0], this.moveTouch(ie, this._lastPos));
                }, this.touchend = (ie) => {
                  ie.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();
                }, this.reset = () => {
                  this.mouseRotate.reset(), this.mousePitch && this.mousePitch.reset(), this.touchRotate.reset(), this.touchPitch && this.touchPitch.reset(), delete this._startPos, delete this._lastPos, this.offTemp();
                }, this._clickTolerance = 10;
                const j = y.dragRotate._mouseRotate.getClickTolerance(), G = y.dragRotate._mousePitch.getClickTolerance();
                this.element = b, this.mouseRotate = Bu({ clickTolerance: j, enable: !0 }), this.touchRotate = (({ enable: ie, clickTolerance: fe, bearingDegreesPerPixelMoved: xe = 0.8 }) => {
                  const Te = new Qs();
                  return new jo({ clickTolerance: fe, move: (ze, Ve) => ({ bearingDelta: (Ve.x - ze.x) * xe }), moveStateManager: Te, enable: ie, assignEvents: Na });
                })({ clickTolerance: j, enable: !0 }), this.map = y, R && (this.mousePitch = Ll({ clickTolerance: G, enable: !0 }), this.touchPitch = (({ enable: ie, clickTolerance: fe, pitchDegreesPerPixelMoved: xe = -0.5 }) => {
                  const Te = new Qs();
                  return new jo({ clickTolerance: fe, move: (ze, Ve) => ({ pitchDelta: (Ve.y - ze.y) * xe }), moveStateManager: Te, enable: ie, assignEvents: Na });
                })({ clickTolerance: G, enable: !0 })), f.addEventListener(b, "mousedown", this.mousedown), f.addEventListener(b, "touchstart", this.touchstart, { passive: !1 }), f.addEventListener(b, "touchcancel", this.reset);
              }
              startMouse(y, b) {
                this.mouseRotate.dragStart(y, b), this.mousePitch && this.mousePitch.dragStart(y, b), f.disableDrag();
              }
              startTouch(y, b) {
                this.touchRotate.dragStart(y, b), this.touchPitch && this.touchPitch.dragStart(y, b), f.disableDrag();
              }
              moveMouse(y, b) {
                const R = this.map, { bearingDelta: j } = this.mouseRotate.dragMove(y, b) || {};
                if (j && R.setBearing(R.getBearing() + j), this.mousePitch) {
                  const { pitchDelta: G } = this.mousePitch.dragMove(y, b) || {};
                  G && R.setPitch(R.getPitch() + G);
                }
              }
              moveTouch(y, b) {
                const R = this.map, { bearingDelta: j } = this.touchRotate.dragMove(y, b) || {};
                if (j && R.setBearing(R.getBearing() + j), this.touchPitch) {
                  const { pitchDelta: G } = this.touchPitch.dragMove(y, b) || {};
                  G && R.setPitch(R.getPitch() + G);
                }
              }
              off() {
                const y = this.element;
                f.removeEventListener(y, "mousedown", this.mousedown), f.removeEventListener(y, "touchstart", this.touchstart, { passive: !1 }), f.removeEventListener(window, "touchmove", this.touchmove, { passive: !1 }), f.removeEventListener(window, "touchend", this.touchend), f.removeEventListener(y, "touchcancel", this.reset), this.offTemp();
              }
              offTemp() {
                f.enableDrag(), f.removeEventListener(window, "mousemove", this.mousemove), f.removeEventListener(window, "mouseup", this.mouseup), f.removeEventListener(window, "touchmove", this.touchmove, { passive: !1 }), f.removeEventListener(window, "touchend", this.touchend);
              }
            }
            let Ci;
            function us(B, y, b) {
              const R = new i.N(B.lng, B.lat);
              if (B = new i.N(B.lng, B.lat), y) {
                const j = new i.N(B.lng - 360, B.lat), G = new i.N(B.lng + 360, B.lat), ie = b.locationPoint(B).distSqr(y);
                b.locationPoint(j).distSqr(y) < ie ? B = j : b.locationPoint(G).distSqr(y) < ie && (B = G);
              }
              for (; Math.abs(B.lng - b.center.lng) > 180; ) {
                const j = b.locationPoint(B);
                if (j.x >= 0 && j.y >= 0 && j.x <= b.width && j.y <= b.height) break;
                B.lng > b.center.lng ? B.lng -= 360 : B.lng += 360;
              }
              return B.lng !== R.lng && b.locationPoint(B).y > b.height / 2 - b.getHorizon() ? B : R;
            }
            const al = { 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%)" };
            function ou(B, y, b) {
              const R = B.classList;
              for (const j in al) R.remove(`maplibregl-${b}-anchor-${j}`);
              R.add(`maplibregl-${b}-anchor-${y}`);
            }
            class Za extends i.E {
              constructor(y) {
                if (super(), this._onKeyPress = (b) => {
                  const R = b.code, j = b.charCode || b.keyCode;
                  R !== "Space" && R !== "Enter" && j !== 32 && j !== 13 || this.togglePopup();
                }, this._onMapClick = (b) => {
                  const R = b.originalEvent.target, j = this._element;
                  this._popup && (R === j || j.contains(R)) && this.togglePopup();
                }, this._update = (b) => {
                  var R;
                  if (!this._map) return;
                  const j = this._map.loaded() && !this._map.isMoving();
                  ((b == null ? void 0 : b.type) === "terrain" || (b == null ? void 0 : b.type) === "render" && !j) && this._map.once("render", this._update), this._map.transform.renderWorldCopies ? this._lngLat = us(this._lngLat, this._flatPos, this._map.transform) : this._lngLat = (R = this._lngLat) === null || R === void 0 ? void 0 : R.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));
                  let G = "";
                  this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? G = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (G = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);
                  let ie = "";
                  this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? ie = "rotateX(0deg)" : this._pitchAlignment === "map" && (ie = `rotateX(${this._map.getPitch()}deg)`), this._subpixelPositioning || b && b.type !== "moveend" || (this._pos = this._pos.round()), f.setTransform(this._element, `${al[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${G}`), d.frameAsync(new AbortController()).then(() => {
                    this._updateOpacity(b && b.type === "moveend");
                  }).catch(() => {
                  });
                }, this._onMove = (b) => {
                  if (!this._isDragging) {
                    const R = this._clickTolerance || this._map._clickTolerance;
                    this._isDragging = b.point.dist(this._pointerdownPos) >= R;
                  }
                  this._isDragging && (this._pos = b.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 i.k("dragstart"))), this.fire(new i.k("drag")));
                }, this._onUp = () => {
                  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 i.k("dragend")), this._state = "inactive";
                }, this._addDragHandler = (b) => {
                  this._element.contains(b.originalEvent.target) && (b.preventDefault(), this._positionDelta = b.point.sub(this._pos).add(this._offset), this._pointerdownPos = b.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));
                }, this._anchor = y && y.anchor || "center", this._color = y && y.color || "#3FB1CE", this._scale = y && y.scale || 1, this._draggable = y && y.draggable || !1, this._clickTolerance = y && y.clickTolerance || 0, this._subpixelPositioning = y && y.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = y && y.rotation || 0, this._rotationAlignment = y && y.rotationAlignment || "auto", this._pitchAlignment = y && y.pitchAlignment && y.pitchAlignment !== "auto" ? y.pitchAlignment : this._rotationAlignment, this.setOpacity(), this.setOpacity(y == null ? void 0 : y.opacity, y == null ? void 0 : y.opacityWhenCovered), y && y.element) this._element = y.element, this._offset = i.P.convert(y && y.offset || [0, 0]);
                else {
                  this._defaultMarker = !0, this._element = f.create("div");
                  const b = f.createNS("http://www.w3.org/2000/svg", "svg"), R = 41, j = 27;
                  b.setAttributeNS(null, "display", "block"), b.setAttributeNS(null, "height", `${R}px`), b.setAttributeNS(null, "width", `${j}px`), b.setAttributeNS(null, "viewBox", `0 0 ${j} ${R}`);
                  const G = f.createNS("http://www.w3.org/2000/svg", "g");
                  G.setAttributeNS(null, "stroke", "none"), G.setAttributeNS(null, "stroke-width", "1"), G.setAttributeNS(null, "fill", "none"), G.setAttributeNS(null, "fill-rule", "evenodd");
                  const ie = f.createNS("http://www.w3.org/2000/svg", "g");
                  ie.setAttributeNS(null, "fill-rule", "nonzero");
                  const fe = f.createNS("http://www.w3.org/2000/svg", "g");
                  fe.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), fe.setAttributeNS(null, "fill", "#000000");
                  const xe = [{ 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" }];
                  for (const It of xe) {
                    const jt = f.createNS("http://www.w3.org/2000/svg", "ellipse");
                    jt.setAttributeNS(null, "opacity", "0.04"), jt.setAttributeNS(null, "cx", "10.5"), jt.setAttributeNS(null, "cy", "5.80029008"), jt.setAttributeNS(null, "rx", It.rx), jt.setAttributeNS(null, "ry", It.ry), fe.appendChild(jt);
                  }
                  const Te = f.createNS("http://www.w3.org/2000/svg", "g");
                  Te.setAttributeNS(null, "fill", this._color);
                  const ze = f.createNS("http://www.w3.org/2000/svg", "path");
                  ze.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"), Te.appendChild(ze);
                  const Ve = f.createNS("http://www.w3.org/2000/svg", "g");
                  Ve.setAttributeNS(null, "opacity", "0.25"), Ve.setAttributeNS(null, "fill", "#000000");
                  const ut = f.createNS("http://www.w3.org/2000/svg", "path");
                  ut.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"), Ve.appendChild(ut);
                  const gt = f.createNS("http://www.w3.org/2000/svg", "g");
                  gt.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), gt.setAttributeNS(null, "fill", "#FFFFFF");
                  const wt = f.createNS("http://www.w3.org/2000/svg", "g");
                  wt.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
                  const Et = f.createNS("http://www.w3.org/2000/svg", "circle");
                  Et.setAttributeNS(null, "fill", "#000000"), Et.setAttributeNS(null, "opacity", "0.25"), Et.setAttributeNS(null, "cx", "5.5"), Et.setAttributeNS(null, "cy", "5.5"), Et.setAttributeNS(null, "r", "5.4999962");
                  const zt = f.createNS("http://www.w3.org/2000/svg", "circle");
                  zt.setAttributeNS(null, "fill", "#FFFFFF"), zt.setAttributeNS(null, "cx", "5.5"), zt.setAttributeNS(null, "cy", "5.5"), zt.setAttributeNS(null, "r", "5.4999962"), wt.appendChild(Et), wt.appendChild(zt), ie.appendChild(fe), ie.appendChild(Te), ie.appendChild(Ve), ie.appendChild(gt), ie.appendChild(wt), b.appendChild(ie), b.setAttributeNS(null, "height", R * this._scale + "px"), b.setAttributeNS(null, "width", j * this._scale + "px"), this._element.appendChild(b), this._offset = i.P.convert(y && y.offset || [0, -14]);
                }
                if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (b) => {
                  b.preventDefault();
                }), this._element.addEventListener("mousedown", (b) => {
                  b.preventDefault();
                }), ou(this._element, this._anchor, "marker"), y && y.className) for (const b of y.className.split(" ")) this._element.classList.add(b);
                this._popup = null;
              }
              addTo(y) {
                return this.remove(), this._map = y, this._element.setAttribute("aria-label", y._getUIString("Marker.Title")), y.getCanvasContainer().appendChild(this._element), y.on("move", this._update), y.on("moveend", this._update), y.on("terrain", this._update), this.setDraggable(this._draggable), this._update(), this._map.on("click", this._onMapClick), this;
              }
              remove() {
                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), f.remove(this._element), this._popup && this._popup.remove(), this;
              }
              getLngLat() {
                return this._lngLat;
              }
              setLngLat(y) {
                return this._lngLat = i.N.convert(y), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this;
              }
              getElement() {
                return this._element;
              }
              setPopup(y) {
                if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), y) {
                  if (!("offset" in y.options)) {
                    const j = Math.abs(13.5) / Math.SQRT2;
                    y.options.offset = this._defaultMarker ? { top: [0, 0], "top-left": [0, 0], "top-right": [0, 0], bottom: [0, -38.1], "bottom-left": [j, -1 * (24.6 + j)], "bottom-right": [-j, -1 * (24.6 + j)], left: [13.5, -24.6], right: [-13.5, -24.6] } : this._offset;
                  }
                  this._popup = y, this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress);
                }
                return this;
              }
              setSubpixelPositioning(y) {
                return this._subpixelPositioning = y, this;
              }
              getPopup() {
                return this._popup;
              }
              togglePopup() {
                const y = this._popup;
                return this._element.style.opacity === this._opacityWhenCovered ? this : y ? (y.isOpen() ? y.remove() : (y.setLngLat(this._lngLat), y.addTo(this._map)), this) : this;
              }
              _updateOpacity(y = !1) {
                var b, R;
                if (!(!((b = this._map) === null || b === void 0) && b.terrain)) return void (this._element.style.opacity !== this._opacity && (this._element.style.opacity = this._opacity));
                if (y) this._opacityTimeout = null;
                else {
                  if (this._opacityTimeout) return;
                  this._opacityTimeout = setTimeout(() => {
                    this._opacityTimeout = null;
                  }, 100);
                }
                const j = this._map, G = j.terrain.depthAtPoint(this._pos), ie = j.terrain.getElevationForLngLatZoom(this._lngLat, j.transform.tileZoom);
                if (j.transform.lngLatToCameraDepth(this._lngLat, ie) - G < 6e-3) return void (this._element.style.opacity = this._opacity);
                const fe = -this._offset.y / j.transform._pixelPerMeter, xe = Math.sin(j.getPitch() * Math.PI / 180) * fe, Te = j.terrain.depthAtPoint(new i.P(this._pos.x, this._pos.y - this._offset.y)), ze = j.transform.lngLatToCameraDepth(this._lngLat, ie + xe) - Te > 6e-3;
                !((R = this._popup) === null || R === void 0) && R.isOpen() && ze && this._popup.remove(), this._element.style.opacity = ze ? this._opacityWhenCovered : this._opacity;
              }
              getOffset() {
                return this._offset;
              }
              setOffset(y) {
                return this._offset = i.P.convert(y), this._update(), this;
              }
              addClassName(y) {
                this._element.classList.add(y);
              }
              removeClassName(y) {
                this._element.classList.remove(y);
              }
              toggleClassName(y) {
                return this._element.classList.toggle(y);
              }
              setDraggable(y) {
                return this._draggable = !!y, this._map && (y ? (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;
              }
              isDraggable() {
                return this._draggable;
              }
              setRotation(y) {
                return this._rotation = y || 0, this._update(), this;
              }
              getRotation() {
                return this._rotation;
              }
              setRotationAlignment(y) {
                return this._rotationAlignment = y || "auto", this._update(), this;
              }
              getRotationAlignment() {
                return this._rotationAlignment;
              }
              setPitchAlignment(y) {
                return this._pitchAlignment = y && y !== "auto" ? y : this._rotationAlignment, this._update(), this;
              }
              getPitchAlignment() {
                return this._pitchAlignment;
              }
              setOpacity(y, b) {
                return y === void 0 && b === void 0 && (this._opacity = "1", this._opacityWhenCovered = "0.2"), y !== void 0 && (this._opacity = y), b !== void 0 && (this._opacityWhenCovered = b), this._map && this._updateOpacity(!0), this;
              }
            }
            const su = { positionOptions: { enableHighAccuracy: !1, maximumAge: 0, timeout: 6e3 }, fitBoundsOptions: { maxZoom: 15 }, trackUserLocation: !1, showAccuracyCircle: !0, showUserLocation: !0 };
            let na = 0, tc = !1;
            class bi extends i.E {
              constructor(y) {
                super(), this._onSuccess = (b) => {
                  if (this._map) {
                    if (this._isOutOfMapMaxBounds(b)) return this._setErrorState(), this.fire(new i.k("outofmaxbounds", b)), this._updateMarker(), void this._finish();
                    if (this.options.trackUserLocation) switch (this._lastKnownPosition = b, this._watchState) {
                      case "WAITING_ACTIVE":
                      case "ACTIVE_LOCK":
                      case "ACTIVE_ERROR":
                        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");
                        break;
                      case "BACKGROUND":
                      case "BACKGROUND_ERROR":
                        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");
                        break;
                      default:
                        throw new Error(`Unexpected watchState ${this._watchState}`);
                    }
                    this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(b), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(b), this.options.showUserLocation && this._dotElement.classList.remove("maplibregl-user-location-dot-stale"), this.fire(new i.k("geolocate", b)), this._finish();
                  }
                }, this._updateCamera = (b) => {
                  const R = new i.N(b.coords.longitude, b.coords.latitude), j = b.coords.accuracy, G = this._map.getBearing(), ie = i.e({ bearing: G }, this.options.fitBoundsOptions), fe = Se.fromLngLat(R, j);
                  this._map.fitBounds(fe, ie, { geolocateSource: !0 });
                }, this._updateMarker = (b) => {
                  if (b) {
                    const R = new i.N(b.coords.longitude, b.coords.latitude);
                    this._accuracyCircleMarker.setLngLat(R).addTo(this._map), this._userLocationDotMarker.setLngLat(R).addTo(this._map), this._accuracy = b.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
                  } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove();
                }, this._onZoom = () => {
                  this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
                }, this._onError = (b) => {
                  if (this._map) {
                    if (this.options.trackUserLocation) if (b.code === 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._geolocateButton.disabled = !0;
                      const R = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                      this._geolocateButton.title = R, this._geolocateButton.setAttribute("aria-label", R), this._geolocationWatchID !== void 0 && this._clearWatch();
                    } else {
                      if (b.code === 3 && tc) return;
                      this._setErrorState();
                    }
                    this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("maplibregl-user-location-dot-stale"), this.fire(new i.k("error", b)), this._finish();
                  }
                }, this._finish = () => {
                  this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0;
                }, this._setupUI = () => {
                  this._map && (this._container.addEventListener("contextmenu", (b) => b.preventDefault()), this._geolocateButton = f.create("button", "maplibregl-ctrl-geolocate", this._container), f.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
                }, this._finishSetupUI = (b) => {
                  if (this._map) {
                    if (b === !1) {
                      i.w("Geolocation support is not available so the GeolocateControl will be disabled.");
                      const R = this._map._getUIString("GeolocateControl.LocationNotAvailable");
                      this._geolocateButton.disabled = !0, this._geolocateButton.title = R, this._geolocateButton.setAttribute("aria-label", R);
                    } else {
                      const R = this._map._getUIString("GeolocateControl.FindMyLocation");
                      this._geolocateButton.disabled = !1, this._geolocateButton.title = R, this._geolocateButton.setAttribute("aria-label", R);
                    }
                    this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = f.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Za({ element: this._dotElement }), this._circleElement = f.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Za({ 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", (R) => {
                      const j = R.originalEvent && R.originalEvent.type === "resize";
                      R.geolocateSource || this._watchState !== "ACTIVE_LOCK" || j || (this._watchState = "BACKGROUND", this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this.fire(new i.k("trackuserlocationend")), this.fire(new i.k("userlocationlostfocus")));
                    });
                  }
                }, this.options = i.e({}, su, y);
              }
              onAdd(y) {
                return this._map = y, this._container = f.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), function() {
                  return i._(this, arguments, void 0, function* (b = !1) {
                    if (Ci !== void 0 && !b) return Ci;
                    if (window.navigator.permissions === void 0) return Ci = !!window.navigator.geolocation, Ci;
                    try {
                      Ci = (yield window.navigator.permissions.query({ name: "geolocation" })).state !== "denied";
                    } catch {
                      Ci = !!window.navigator.geolocation;
                    }
                    return Ci;
                  });
                }().then((b) => this._finishSetupUI(b)), this._container;
              }
              onRemove() {
                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(), f.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, na = 0, tc = !1;
              }
              _isOutOfMapMaxBounds(y) {
                const b = this._map.getMaxBounds(), R = y.coords;
                return b && (R.longitude < b.getWest() || R.longitude > b.getEast() || R.latitude < b.getSouth() || R.latitude > b.getNorth());
              }
              _setErrorState() {
                switch (this._watchState) {
                  case "WAITING_ACTIVE":
                    this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");
                    break;
                  case "ACTIVE_LOCK":
                    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");
                    break;
                  case "BACKGROUND":
                    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");
                    break;
                  case "ACTIVE_ERROR":
                    break;
                  default:
                    throw new Error(`Unexpected watchState ${this._watchState}`);
                }
              }
              _updateCircleRadius() {
                const y = this._map.getBounds(), b = y.getSouthEast(), R = y.getNorthEast(), j = b.distanceTo(R), G = this._map._container.clientHeight, ie = Math.ceil(this._accuracy / (j / G) * 2);
                this._circleElement.style.width = `${ie}px`, this._circleElement.style.height = `${ie}px`;
              }
              trigger() {
                if (!this._setup) return i.w("Geolocate control triggered before added to a map"), !1;
                if (this.options.trackUserLocation) {
                  switch (this._watchState) {
                    case "OFF":
                      this._watchState = "WAITING_ACTIVE", this.fire(new i.k("trackuserlocationstart"));
                      break;
                    case "WAITING_ACTIVE":
                    case "ACTIVE_LOCK":
                    case "ACTIVE_ERROR":
                    case "BACKGROUND_ERROR":
                      na--, 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 i.k("trackuserlocationend"));
                      break;
                    case "BACKGROUND":
                      this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._lastKnownPosition && this._updateCamera(this._lastKnownPosition), this.fire(new i.k("trackuserlocationstart")), this.fire(new i.k("userlocationfocus"));
                      break;
                    default:
                      throw new Error(`Unexpected watchState ${this._watchState}`);
                  }
                  switch (this._watchState) {
                    case "WAITING_ACTIVE":
                      this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");
                      break;
                    case "ACTIVE_LOCK":
                      this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");
                      break;
                    case "OFF":
                      break;
                    default:
                      throw new Error(`Unexpected watchState ${this._watchState}`);
                  }
                  if (this._watchState === "OFF" && this._geolocationWatchID !== void 0) this._clearWatch();
                  else if (this._geolocationWatchID === void 0) {
                    let y;
                    this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), na++, na > 1 ? (y = { maximumAge: 6e5, timeout: 0 }, tc = !0) : (y = this.options.positionOptions, tc = !1), this._geolocationWatchID = window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, y);
                  }
                } else window.navigator.geolocation.getCurrentPosition(this._onSuccess, this._onError, this.options.positionOptions), this._timeoutId = setTimeout(this._finish, 1e4);
                return !0;
              }
              _clearWatch() {
                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);
              }
            }
            const ci = { maxWidth: 100, unit: "metric" };
            function He(B, y, b) {
              const R = b && b.maxWidth || 100, j = B._container.clientHeight / 2, G = B.unproject([0, j]), ie = B.unproject([R, j]), fe = G.distanceTo(ie);
              if (b && b.unit === "imperial") {
                const xe = 3.2808 * fe;
                xe > 5280 ? Pe(y, R, xe / 5280, B._getUIString("ScaleControl.Miles")) : Pe(y, R, xe, B._getUIString("ScaleControl.Feet"));
              } else b && b.unit === "nautical" ? Pe(y, R, fe / 1852, B._getUIString("ScaleControl.NauticalMiles")) : fe >= 1e3 ? Pe(y, R, fe / 1e3, B._getUIString("ScaleControl.Kilometers")) : Pe(y, R, fe, B._getUIString("ScaleControl.Meters"));
            }
            function Pe(B, y, b, R) {
              const j = function(ie) {
                const fe = Math.pow(10, `${Math.floor(ie)}`.length - 1);
                let xe = ie / fe;
                return xe = xe >= 10 ? 10 : xe >= 5 ? 5 : xe >= 3 ? 3 : xe >= 2 ? 2 : xe >= 1 ? 1 : function(Te) {
                  const ze = Math.pow(10, Math.ceil(-Math.log(Te) / Math.LN10));
                  return Math.round(Te * ze) / ze;
                }(xe), fe * xe;
              }(b), G = j / b;
              B.style.width = y * G + "px", B.innerHTML = `${j}&nbsp;${R}`;
            }
            class it extends i.E {
              constructor(y = {}) {
                super(), this._onFullscreenChange = () => {
                  var b;
                  let R = window.document.fullscreenElement || window.document.mozFullScreenElement || window.document.webkitFullscreenElement || window.document.msFullscreenElement;
                  for (; !((b = R == null ? void 0 : R.shadowRoot) === null || b === void 0) && b.fullscreenElement; ) R = R.shadowRoot.fullscreenElement;
                  R === this._container !== this._fullscreen && this._handleFullscreenChange();
                }, this._onClickFullscreen = () => {
                  this._isFullscreen() ? this._exitFullscreen() : this._requestFullscreen();
                }, this._fullscreen = !1, y && y.container && (y.container instanceof HTMLElement ? this._container = y.container : i.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");
              }
              onAdd(y) {
                return this._map = y, this._container || (this._container = this._map.getContainer()), this._controlContainer = f.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
              }
              onRemove() {
                f.remove(this._controlContainer), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);
              }
              _setupUI() {
                const y = this._fullscreenButton = f.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
                f.create("span", "maplibregl-ctrl-icon", y).setAttribute("aria-hidden", "true"), y.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
              }
              _updateTitle() {
                const y = this._getTitle();
                this._fullscreenButton.setAttribute("aria-label", y), this._fullscreenButton.title = y;
              }
              _getTitle() {
                return this._map._getUIString(this._isFullscreen() ? "FullscreenControl.Exit" : "FullscreenControl.Enter");
              }
              _isFullscreen() {
                return this._fullscreen;
              }
              _handleFullscreenChange() {
                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 i.k("fullscreenstart")), this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled(), this._map.cooperativeGestures.disable()) : (this.fire(new i.k("fullscreenend")), this._prevCooperativeGesturesEnabled && this._map.cooperativeGestures.enable());
              }
              _exitFullscreen() {
                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();
              }
              _requestFullscreen() {
                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();
              }
              _togglePseudoFullScreen() {
                this._container.classList.toggle("maplibregl-pseudo-fullscreen"), this._handleFullscreenChange(), this._map.resize();
              }
            }
            const bt = { closeButton: !0, closeOnClick: !0, focusAfterOpen: !0, className: "", maxWidth: "240px", subpixelPositioning: !1 }, Ue = ["a[href]", "[tabindex]:not([tabindex='-1'])", "[contenteditable]:not([contenteditable='false'])", "button:not([disabled])", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].join(", ");
            class Qe extends i.E {
              constructor(y) {
                super(), this.remove = () => (this._content && f.remove(this._content), this._container && (f.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 i.k("close"))), this), this._onMouseUp = (b) => {
                  this._update(b.point);
                }, this._onMouseMove = (b) => {
                  this._update(b.point);
                }, this._onDrag = (b) => {
                  this._update(b.point);
                }, this._update = (b) => {
                  var R;
                  const j = this._lngLat || this._trackPointer;
                  if (!this._map || !j || !this._content) return;
                  if (!this._container) {
                    if (this._container = f.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = f.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const Te of this.options.className.split(" ")) this._container.classList.add(Te);
                    this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer");
                  }
                  if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._map.transform.renderWorldCopies && !this._trackPointer ? this._lngLat = us(this._lngLat, this._flatPos, this._map.transform) : this._lngLat = (R = this._lngLat) === null || R === void 0 ? void 0 : R.wrap(), this._trackPointer && !b) return;
                  const G = this._flatPos = this._pos = this._trackPointer && b ? b : this._map.project(this._lngLat);
                  this._map.terrain && (this._flatPos = this._trackPointer && b ? b : this._map.transform.locationPoint(this._lngLat));
                  let ie = this.options.anchor;
                  const fe = ht(this.options.offset);
                  if (!ie) {
                    const Te = this._container.offsetWidth, ze = this._container.offsetHeight;
                    let Ve;
                    Ve = G.y + fe.bottom.y < ze ? ["top"] : G.y > this._map.transform.height - ze ? ["bottom"] : [], G.x < Te / 2 ? Ve.push("left") : G.x > this._map.transform.width - Te / 2 && Ve.push("right"), ie = Ve.length === 0 ? "bottom" : Ve.join("-");
                  }
                  let xe = G.add(fe[ie]);
                  this.options.subpixelPositioning || (xe = xe.round()), f.setTransform(this._container, `${al[ie]} translate(${xe.x}px,${xe.y}px)`), ou(this._container, ie, "popup");
                }, this._onClose = () => {
                  this.remove();
                }, this.options = i.e(Object.create(bt), y);
              }
              addTo(y) {
                return this._map && this.remove(), this._map = y, 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 i.k("open")), this;
              }
              isOpen() {
                return !!this._map;
              }
              getLngLat() {
                return this._lngLat;
              }
              setLngLat(y) {
                return this._lngLat = i.N.convert(y), 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;
              }
              trackPointer() {
                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;
              }
              getElement() {
                return this._container;
              }
              setText(y) {
                return this.setDOMContent(document.createTextNode(y));
              }
              setHTML(y) {
                const b = document.createDocumentFragment(), R = document.createElement("body");
                let j;
                for (R.innerHTML = y; j = R.firstChild, j; ) b.appendChild(j);
                return this.setDOMContent(b);
              }
              getMaxWidth() {
                var y;
                return (y = this._container) === null || y === void 0 ? void 0 : y.style.maxWidth;
              }
              setMaxWidth(y) {
                return this.options.maxWidth = y, this._update(), this;
              }
              setDOMContent(y) {
                if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
                else this._content = f.create("div", "maplibregl-popup-content", this._container);
                return this._content.appendChild(y), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
              }
              addClassName(y) {
                return this._container && this._container.classList.add(y), this;
              }
              removeClassName(y) {
                return this._container && this._container.classList.remove(y), this;
              }
              setOffset(y) {
                return this.options.offset = y, this._update(), this;
              }
              toggleClassName(y) {
                if (this._container) return this._container.classList.toggle(y);
              }
              setSubpixelPositioning(y) {
                this.options.subpixelPositioning = y;
              }
              _createCloseButton() {
                this.options.closeButton && (this._closeButton = f.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
              }
              _focusFirstElement() {
                if (!this.options.focusAfterOpen || !this._container) return;
                const y = this._container.querySelector(Ue);
                y && y.focus();
              }
            }
            function ht(B) {
              if (B) {
                if (typeof B == "number") {
                  const y = Math.round(Math.abs(B) / Math.SQRT2);
                  return { center: new i.P(0, 0), top: new i.P(0, B), "top-left": new i.P(y, y), "top-right": new i.P(-y, y), bottom: new i.P(0, -B), "bottom-left": new i.P(y, -y), "bottom-right": new i.P(-y, -y), left: new i.P(B, 0), right: new i.P(-B, 0) };
                }
                if (B instanceof i.P || Array.isArray(B)) {
                  const y = i.P.convert(B);
                  return { center: y, top: y, "top-left": y, "top-right": y, bottom: y, "bottom-left": y, "bottom-right": y, left: y, right: y };
                }
                return { center: i.P.convert(B.center || [0, 0]), top: i.P.convert(B.top || [0, 0]), "top-left": i.P.convert(B["top-left"] || [0, 0]), "top-right": i.P.convert(B["top-right"] || [0, 0]), bottom: i.P.convert(B.bottom || [0, 0]), "bottom-left": i.P.convert(B["bottom-left"] || [0, 0]), "bottom-right": i.P.convert(B["bottom-right"] || [0, 0]), left: i.P.convert(B.left || [0, 0]), right: i.P.convert(B.right || [0, 0]) };
              }
              return ht(new i.P(0, 0));
            }
            const Z = h;
            u.AJAXError = i.bg, u.Evented = i.E, u.LngLat = i.N, u.MercatorCoordinate = i.Z, u.Point = i.P, u.addProtocol = i.bh, u.config = i.a, u.removeProtocol = i.bi, u.AttributionControl = nl, u.BoxZoomHandler = No, u.CanvasSource = Ce, u.CooperativeGesturesHandler = tl, u.DoubleClickZoomHandler = Fa, u.DragPanHandler = el, u.DragRotateHandler = ks, u.EdgeInsets = Io, u.FullscreenControl = it, u.GeoJSONSource = Ee, u.GeolocateControl = bi, u.Hash = Ha, u.ImageSource = Ie, u.KeyboardHandler = ju, u.LngLatBounds = Se, u.LogoControl = Vo, u.Map = class extends vo {
              constructor(B) {
                i.be.mark(i.bf.create);
                const y = Object.assign(Object.assign({}, rl), B);
                if (y.minZoom != null && y.maxZoom != null && y.minZoom > y.maxZoom) throw new Error("maxZoom must be greater than or equal to minZoom");
                if (y.minPitch != null && y.maxPitch != null && y.minPitch > y.maxPitch) throw new Error("maxPitch must be greater than or equal to minPitch");
                if (y.minPitch != null && y.minPitch < 0) throw new Error("minPitch must be greater than or equal to 0");
                if (y.maxPitch != null && y.maxPitch > 85) throw new Error("maxPitch must be less than or equal to 85");
                if (super(new va(y.minZoom, y.maxZoom, y.minPitch, y.maxPitch, y.renderWorldCopies), { bearingSnap: y.bearingSnap }), this._idleTriggered = !1, this._crossFadingFactor = 1, this._renderTaskQueue = new Qu(), this._controls = [], this._mapId = i.a4(), this._contextLost = (R) => {
                  R.preventDefault(), this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this.fire(new i.k("webglcontextlost", { originalEvent: R }));
                }, this._contextRestored = (R) => {
                  this._setupPainter(), this.resize(), this._update(), this.fire(new i.k("webglcontextrestored", { originalEvent: R }));
                }, this._onMapScroll = (R) => {
                  if (R.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, !1;
                }, this._onWindowOnline = () => {
                  this._update();
                }, this._interactive = y.interactive, this._maxTileCacheSize = y.maxTileCacheSize, this._maxTileCacheZoomLevels = y.maxTileCacheZoomLevels, this._failIfMajorPerformanceCaveat = y.failIfMajorPerformanceCaveat === !0, this._preserveDrawingBuffer = y.preserveDrawingBuffer === !0, this._antialias = y.antialias === !0, this._trackResize = y.trackResize === !0, this._bearingSnap = y.bearingSnap, this._refreshExpiredTiles = y.refreshExpiredTiles === !0, this._fadeDuration = y.fadeDuration, this._crossSourceCollisions = y.crossSourceCollisions === !0, this._collectResourceTiming = y.collectResourceTiming === !0, this._locale = Object.assign(Object.assign({}, Lc), y.locale), this._clickTolerance = y.clickTolerance, this._overridePixelRatio = y.pixelRatio, this._maxCanvasSize = y.maxCanvasSize, this.transformCameraUpdate = y.transformCameraUpdate, this.cancelPendingTileRequestsWhileZooming = y.cancelPendingTileRequestsWhileZooming === !0, this._imageQueueHandle = S.addThrottleControl(() => this.isMoving()), this._requestManager = new A(y.transformRequest), typeof y.container == "string") {
                  if (this._container = document.getElementById(y.container), !this._container) throw new Error(`Container '${y.container}' not found.`);
                } else {
                  if (!(y.container instanceof HTMLElement)) throw new Error("Invalid type: 'container' must be a String or HTMLElement.");
                  this._container = y.container;
                }
                if (y.maxBounds && this.setMaxBounds(y.maxBounds), this._setupContainer(), this._setupPainter(), this.on("move", () => this._update(!1)).on("moveend", () => this._update(!1)).on("zoom", () => this._update(!0)).on("terrain", () => {
                  this.painter.terrainFacilitator.dirty = !0, this._update(!0);
                }).once("idle", () => {
                  this._idleTriggered = !0;
                }), typeof window < "u") {
                  addEventListener("online", this._onWindowOnline, !1);
                  let R = !1;
                  const j = Js((G) => {
                    this._trackResize && !this._removed && this.resize(G)._update();
                  }, 50);
                  this._resizeObserver = new ResizeObserver((G) => {
                    R ? j(G) : R = !0;
                  }), this._resizeObserver.observe(this._container);
                }
                this.handlers = new xa(this, y);
                const b = typeof y.hash == "string" && y.hash || void 0;
                this._hash = y.hash && new Ha(b).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ center: y.center, zoom: y.zoom, bearing: y.bearing, pitch: y.pitch }), y.bounds && (this.resize(), this.fitBounds(y.bounds, i.e({}, y.fitBoundsOptions, { duration: 0 })))), this.resize(), this._localIdeographFontFamily = y.localIdeographFontFamily, this._validateStyle = y.validateStyle, y.style && this.setStyle(y.style, { localIdeographFontFamily: y.localIdeographFontFamily }), y.attributionControl && this.addControl(new nl(typeof y.attributionControl == "boolean" ? void 0 : y.attributionControl)), y.maplibreLogo && this.addControl(new Vo(), y.logoPosition), this.on("style.load", () => {
                  this.transform.unmodified && this.jumpTo(this.style.stylesheet);
                }), this.on("data", (R) => {
                  this._update(R.dataType === "style"), this.fire(new i.k(`${R.dataType}data`, R));
                }), this.on("dataloading", (R) => {
                  this.fire(new i.k(`${R.dataType}dataloading`, R));
                }), this.on("dataabort", (R) => {
                  this.fire(new i.k("sourcedataabort", R));
                });
              }
              _getMapId() {
                return this._mapId;
              }
              addControl(B, y) {
                if (y === void 0 && (y = B.getDefaultPosition ? B.getDefaultPosition() : "top-right"), !B || !B.onAdd) return this.fire(new i.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));
                const b = B.onAdd(this);
                this._controls.push(B);
                const R = this._controlPositions[y];
                return y.indexOf("bottom") !== -1 ? R.insertBefore(b, R.firstChild) : R.appendChild(b), this;
              }
              removeControl(B) {
                if (!B || !B.onRemove) return this.fire(new i.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));
                const y = this._controls.indexOf(B);
                return y > -1 && this._controls.splice(y, 1), B.onRemove(this), this;
              }
              hasControl(B) {
                return this._controls.indexOf(B) > -1;
              }
              calculateCameraOptionsFromTo(B, y, b, R) {
                return R == null && this.terrain && (R = this.terrain.getElevationForLngLatZoom(b, this.transform.tileZoom)), super.calculateCameraOptionsFromTo(B, y, b, R);
              }
              resize(B) {
                var y;
                const b = this._containerDimensions(), R = b[0], j = b[1], G = this._getClampedPixelRatio(R, j);
                if (this._resizeCanvas(R, j, G), this.painter.resize(R, j, G), this.painter.overLimit()) {
                  const fe = this.painter.context.gl;
                  this._maxCanvasSize = [fe.drawingBufferWidth, fe.drawingBufferHeight];
                  const xe = this._getClampedPixelRatio(R, j);
                  this._resizeCanvas(R, j, xe), this.painter.resize(R, j, xe);
                }
                this.transform.resize(R, j), (y = this._requestedCameraState) === null || y === void 0 || y.resize(R, j);
                const ie = !this._moving;
                return ie && (this.stop(), this.fire(new i.k("movestart", B)).fire(new i.k("move", B))), this.fire(new i.k("resize", B)), ie && this.fire(new i.k("moveend", B)), this;
              }
              _getClampedPixelRatio(B, y) {
                const { 0: b, 1: R } = this._maxCanvasSize, j = this.getPixelRatio(), G = B * j, ie = y * j, fe = G > b ? b / G : 1, xe = ie > R ? R / ie : 1;
                return Math.min(fe, xe) * j;
              }
              getPixelRatio() {
                var B;
                return (B = this._overridePixelRatio) !== null && B !== void 0 ? B : devicePixelRatio;
              }
              setPixelRatio(B) {
                this._overridePixelRatio = B, this.resize();
              }
              getBounds() {
                return this.transform.getBounds();
              }
              getMaxBounds() {
                return this.transform.getMaxBounds();
              }
              setMaxBounds(B) {
                return this.transform.setMaxBounds(Se.convert(B)), this._update();
              }
              setMinZoom(B) {
                if ((B = B ?? -2) >= -2 && B <= this.transform.maxZoom) return this.transform.minZoom = B, this._update(), this.getZoom() < B && this.setZoom(B), this;
                throw new Error("minZoom must be between -2 and the current maxZoom, inclusive");
              }
              getMinZoom() {
                return this.transform.minZoom;
              }
              setMaxZoom(B) {
                if ((B = B ?? 22) >= this.transform.minZoom) return this.transform.maxZoom = B, this._update(), this.getZoom() > B && this.setZoom(B), this;
                throw new Error("maxZoom must be greater than the current minZoom");
              }
              getMaxZoom() {
                return this.transform.maxZoom;
              }
              setMinPitch(B) {
                if ((B = B ?? 0) < 0) throw new Error("minPitch must be greater than or equal to 0");
                if (B >= 0 && B <= this.transform.maxPitch) return this.transform.minPitch = B, this._update(), this.getPitch() < B && this.setPitch(B), this;
                throw new Error("minPitch must be between 0 and the current maxPitch, inclusive");
              }
              getMinPitch() {
                return this.transform.minPitch;
              }
              setMaxPitch(B) {
                if ((B = B ?? 60) > 85) throw new Error("maxPitch must be less than or equal to 85");
                if (B >= this.transform.minPitch) return this.transform.maxPitch = B, this._update(), this.getPitch() > B && this.setPitch(B), this;
                throw new Error("maxPitch must be greater than the current minPitch");
              }
              getMaxPitch() {
                return this.transform.maxPitch;
              }
              getRenderWorldCopies() {
                return this.transform.renderWorldCopies;
              }
              setRenderWorldCopies(B) {
                return this.transform.renderWorldCopies = B, this._update();
              }
              project(B) {
                return this.transform.locationPoint(i.N.convert(B), this.style && this.terrain);
              }
              unproject(B) {
                return this.transform.pointLocation(i.P.convert(B), this.terrain);
              }
              isMoving() {
                var B;
                return this._moving || ((B = this.handlers) === null || B === void 0 ? void 0 : B.isMoving());
              }
              isZooming() {
                var B;
                return this._zooming || ((B = this.handlers) === null || B === void 0 ? void 0 : B.isZooming());
              }
              isRotating() {
                var B;
                return this._rotating || ((B = this.handlers) === null || B === void 0 ? void 0 : B.isRotating());
              }
              _createDelegatedListener(B, y, b) {
                if (B === "mouseenter" || B === "mouseover") {
                  let R = !1;
                  return { layer: y, listener: b, delegates: { mousemove: (G) => {
                    const ie = this.getLayer(y) ? this.queryRenderedFeatures(G.point, { layers: [y] }) : [];
                    ie.length ? R || (R = !0, b.call(this, new Zo(B, this, G.originalEvent, { features: ie }))) : R = !1;
                  }, mouseout: () => {
                    R = !1;
                  } } };
                }
                if (B === "mouseleave" || B === "mouseout") {
                  let R = !1;
                  return { layer: y, listener: b, delegates: { mousemove: (ie) => {
                    (this.getLayer(y) ? this.queryRenderedFeatures(ie.point, { layers: [y] }) : []).length ? R = !0 : R && (R = !1, b.call(this, new Zo(B, this, ie.originalEvent)));
                  }, mouseout: (ie) => {
                    R && (R = !1, b.call(this, new Zo(B, this, ie.originalEvent)));
                  } } };
                }
                {
                  const R = (j) => {
                    const G = this.getLayer(y) ? this.queryRenderedFeatures(j.point, { layers: [y] }) : [];
                    G.length && (j.features = G, b.call(this, j), delete j.features);
                  };
                  return { layer: y, listener: b, delegates: { [B]: R } };
                }
              }
              on(B, y, b) {
                if (b === void 0) return super.on(B, y);
                const R = this._createDelegatedListener(B, y, b);
                this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[B] = this._delegatedListeners[B] || [], this._delegatedListeners[B].push(R);
                for (const j in R.delegates) this.on(j, R.delegates[j]);
                return this;
              }
              once(B, y, b) {
                if (b === void 0) return super.once(B, y);
                const R = this._createDelegatedListener(B, y, b);
                for (const j in R.delegates) this.once(j, R.delegates[j]);
                return this;
              }
              off(B, y, b) {
                return b === void 0 ? super.off(B, y) : (this._delegatedListeners && this._delegatedListeners[B] && ((R) => {
                  const j = R[B];
                  for (let G = 0; G < j.length; G++) {
                    const ie = j[G];
                    if (ie.layer === y && ie.listener === b) {
                      for (const fe in ie.delegates) this.off(fe, ie.delegates[fe]);
                      return j.splice(G, 1), this;
                    }
                  }
                })(this._delegatedListeners), this);
              }
              queryRenderedFeatures(B, y) {
                if (!this.style) return [];
                let b;
                const R = B instanceof i.P || Array.isArray(B), j = R ? B : [[0, 0], [this.transform.width, this.transform.height]];
                if (y = y || (R ? {} : B) || {}, j instanceof i.P || typeof j[0] == "number") b = [i.P.convert(j)];
                else {
                  const G = i.P.convert(j[0]), ie = i.P.convert(j[1]);
                  b = [G, new i.P(ie.x, G.y), ie, new i.P(G.x, ie.y), G];
                }
                return this.style.queryRenderedFeatures(b, y, this.transform);
              }
              querySourceFeatures(B, y) {
                return this.style.querySourceFeatures(B, y);
              }
              setStyle(B, y) {
                return (y = i.e({}, { localIdeographFontFamily: this._localIdeographFontFamily, validate: this._validateStyle }, y)).diff !== !1 && y.localIdeographFontFamily === this._localIdeographFontFamily && this.style && B ? (this._diffStyle(B, y), this) : (this._localIdeographFontFamily = y.localIdeographFontFamily, this._updateStyle(B, y));
              }
              setTransformRequest(B) {
                return this._requestManager.setTransformRequest(B), this;
              }
              _getUIString(B) {
                const y = this._locale[B];
                if (y == null) throw new Error(`Missing UI string '${B}'`);
                return y;
              }
              _updateStyle(B, y) {
                if (y.transformStyle && this.style && !this.style._loaded) return void this.style.once("style.load", () => this._updateStyle(B, y));
                const b = this.style && y.transformStyle ? this.style.serialize() : void 0;
                return this.style && (this.style.setEventedParent(null), this.style._remove(!B)), B ? (this.style = new Wr(this, y || {}), this.style.setEventedParent(this, { style: this.style }), typeof B == "string" ? this.style.loadURL(B, y, b) : this.style.loadJSON(B, y, b), this) : (delete this.style, this);
              }
              _lazyInitEmptyStyle() {
                this.style || (this.style = new Wr(this, {}), this.style.setEventedParent(this, { style: this.style }), this.style.loadEmpty());
              }
              _diffStyle(B, y) {
                if (typeof B == "string") {
                  const b = B, R = this._requestManager.transformRequest(b, "Style");
                  i.h(R, new AbortController()).then((j) => {
                    this._updateDiff(j.data, y);
                  }).catch((j) => {
                    j && this.fire(new i.j(j));
                  });
                } else typeof B == "object" && this._updateDiff(B, y);
              }
              _updateDiff(B, y) {
                try {
                  this.style.setState(B, y) && this._update(!0);
                } catch (b) {
                  i.w(`Unable to perform style diff: ${b.message || b.error || b}.  Rebuilding the style from scratch.`), this._updateStyle(B, y);
                }
              }
              getStyle() {
                if (this.style) return this.style.serialize();
              }
              isStyleLoaded() {
                return this.style ? this.style.loaded() : i.w("There is no style added to the map.");
              }
              addSource(B, y) {
                return this._lazyInitEmptyStyle(), this.style.addSource(B, y), this._update(!0);
              }
              isSourceLoaded(B) {
                const y = this.style && this.style.sourceCaches[B];
                if (y !== void 0) return y.loaded();
                this.fire(new i.j(new Error(`There is no source with ID '${B}'`)));
              }
              setTerrain(B) {
                if (this.style._checkLoaded(), this._terrainDataCallback && this.style.off("data", this._terrainDataCallback), B) {
                  const y = this.style.sourceCaches[B.source];
                  if (!y) throw new Error(`cannot load terrain, because there exists no source with ID: ${B.source}`);
                  this.terrain === null && y.reload();
                  for (const b in this.style._layers) {
                    const R = this.style._layers[b];
                    R.type === "hillshade" && R.source === B.source && i.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.");
                  }
                  this.terrain = new ma(this.painter, y, B), this.painter.renderToTexture = new bl(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 = (b) => {
                    b.dataType === "style" ? this.terrain.sourceCache.freeRtt() : b.dataType === "source" && b.tile && (b.sourceId !== B.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(b.tile.tileID));
                  }, this.style.on("data", this._terrainDataCallback);
                } 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;
                return this.fire(new i.k("terrain", { terrain: B })), this;
              }
              getTerrain() {
                var B, y;
                return (y = (B = this.terrain) === null || B === void 0 ? void 0 : B.options) !== null && y !== void 0 ? y : null;
              }
              areTilesLoaded() {
                const B = this.style && this.style.sourceCaches;
                for (const y in B) {
                  const b = B[y]._tiles;
                  for (const R in b) {
                    const j = b[R];
                    if (j.state !== "loaded" && j.state !== "errored") return !1;
                  }
                }
                return !0;
              }
              removeSource(B) {
                return this.style.removeSource(B), this._update(!0);
              }
              getSource(B) {
                return this.style.getSource(B);
              }
              addImage(B, y, b = {}) {
                const { pixelRatio: R = 1, sdf: j = !1, stretchX: G, stretchY: ie, content: fe, textFitWidth: xe, textFitHeight: Te } = b;
                if (this._lazyInitEmptyStyle(), !(y instanceof HTMLImageElement || i.b(y))) {
                  if (y.width === void 0 || y.height === void 0) return this.fire(new i.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`")));
                  {
                    const { width: ze, height: Ve, data: ut } = y, gt = y;
                    return this.style.addImage(B, { data: new i.R({ width: ze, height: Ve }, new Uint8Array(ut)), pixelRatio: R, stretchX: G, stretchY: ie, content: fe, textFitWidth: xe, textFitHeight: Te, sdf: j, version: 0, userImage: gt }), gt.onAdd && gt.onAdd(this, B), this;
                  }
                }
                {
                  const { width: ze, height: Ve, data: ut } = d.getImageData(y);
                  this.style.addImage(B, { data: new i.R({ width: ze, height: Ve }, ut), pixelRatio: R, stretchX: G, stretchY: ie, content: fe, textFitWidth: xe, textFitHeight: Te, sdf: j, version: 0 });
                }
              }
              updateImage(B, y) {
                const b = this.style.getImage(B);
                if (!b) return this.fire(new i.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));
                const R = y instanceof HTMLImageElement || i.b(y) ? d.getImageData(y) : y, { width: j, height: G, data: ie } = R;
                if (j === void 0 || G === void 0) return this.fire(new i.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`")));
                if (j !== b.data.width || G !== b.data.height) return this.fire(new i.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));
                const fe = !(y instanceof HTMLImageElement || i.b(y));
                return b.data.replace(ie, fe), this.style.updateImage(B, b), this;
              }
              getImage(B) {
                return this.style.getImage(B);
              }
              hasImage(B) {
                return B ? !!this.style.getImage(B) : (this.fire(new i.j(new Error("Missing required image id"))), !1);
              }
              removeImage(B) {
                this.style.removeImage(B);
              }
              loadImage(B) {
                return S.getImage(this._requestManager.transformRequest(B, "Image"), new AbortController());
              }
              listImages() {
                return this.style.listImages();
              }
              addLayer(B, y) {
                return this._lazyInitEmptyStyle(), this.style.addLayer(B, y), this._update(!0);
              }
              moveLayer(B, y) {
                return this.style.moveLayer(B, y), this._update(!0);
              }
              removeLayer(B) {
                return this.style.removeLayer(B), this._update(!0);
              }
              getLayer(B) {
                return this.style.getLayer(B);
              }
              getLayersOrder() {
                return this.style.getLayersOrder();
              }
              setLayerZoomRange(B, y, b) {
                return this.style.setLayerZoomRange(B, y, b), this._update(!0);
              }
              setFilter(B, y, b = {}) {
                return this.style.setFilter(B, y, b), this._update(!0);
              }
              getFilter(B) {
                return this.style.getFilter(B);
              }
              setPaintProperty(B, y, b, R = {}) {
                return this.style.setPaintProperty(B, y, b, R), this._update(!0);
              }
              getPaintProperty(B, y) {
                return this.style.getPaintProperty(B, y);
              }
              setLayoutProperty(B, y, b, R = {}) {
                return this.style.setLayoutProperty(B, y, b, R), this._update(!0);
              }
              getLayoutProperty(B, y) {
                return this.style.getLayoutProperty(B, y);
              }
              setGlyphs(B, y = {}) {
                return this._lazyInitEmptyStyle(), this.style.setGlyphs(B, y), this._update(!0);
              }
              getGlyphs() {
                return this.style.getGlyphsUrl();
              }
              addSprite(B, y, b = {}) {
                return this._lazyInitEmptyStyle(), this.style.addSprite(B, y, b, (R) => {
                  R || this._update(!0);
                }), this;
              }
              removeSprite(B) {
                return this._lazyInitEmptyStyle(), this.style.removeSprite(B), this._update(!0);
              }
              getSprite() {
                return this.style.getSprite();
              }
              setSprite(B, y = {}) {
                return this._lazyInitEmptyStyle(), this.style.setSprite(B, y, (b) => {
                  b || this._update(!0);
                }), this;
              }
              setLight(B, y = {}) {
                return this._lazyInitEmptyStyle(), this.style.setLight(B, y), this._update(!0);
              }
              getLight() {
                return this.style.getLight();
              }
              setSky(B) {
                return this._lazyInitEmptyStyle(), this.style.setSky(B), this._update(!0);
              }
              getSky() {
                return this.style.getSky();
              }
              setFeatureState(B, y) {
                return this.style.setFeatureState(B, y), this._update();
              }
              removeFeatureState(B, y) {
                return this.style.removeFeatureState(B, y), this._update();
              }
              getFeatureState(B) {
                return this.style.getFeatureState(B);
              }
              getContainer() {
                return this._container;
              }
              getCanvasContainer() {
                return this._canvasContainer;
              }
              getCanvas() {
                return this._canvas;
              }
              _containerDimensions() {
                let B = 0, y = 0;
                return this._container && (B = this._container.clientWidth || 400, y = this._container.clientHeight || 300), [B, y];
              }
              _setupContainer() {
                const B = this._container;
                B.classList.add("maplibregl-map");
                const y = this._canvasContainer = f.create("div", "maplibregl-canvas-container", B);
                this._interactive && y.classList.add("maplibregl-interactive"), this._canvas = f.create("canvas", "maplibregl-canvas", y), 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");
                const b = this._containerDimensions(), R = this._getClampedPixelRatio(b[0], b[1]);
                this._resizeCanvas(b[0], b[1], R);
                const j = this._controlContainer = f.create("div", "maplibregl-control-container", B), G = this._controlPositions = {};
                ["top-left", "top-right", "bottom-left", "bottom-right"].forEach((ie) => {
                  G[ie] = f.create("div", `maplibregl-ctrl-${ie} `, j);
                }), this._container.addEventListener("scroll", this._onMapScroll, !1);
              }
              _resizeCanvas(B, y, b) {
                this._canvas.width = Math.floor(b * B), this._canvas.height = Math.floor(b * y), this._canvas.style.width = `${B}px`, this._canvas.style.height = `${y}px`;
              }
              _setupPainter() {
                const B = { alpha: !0, stencil: !0, depth: !0, failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat, preserveDrawingBuffer: this._preserveDrawingBuffer, antialias: this._antialias || !1 };
                let y = null;
                this._canvas.addEventListener("webglcontextcreationerror", (R) => {
                  y = { requestedAttributes: B }, R && (y.statusMessage = R.statusMessage, y.type = R.type);
                }, { once: !0 });
                const b = this._canvas.getContext("webgl2", B) || this._canvas.getContext("webgl", B);
                if (!b) {
                  const R = "Failed to initialize WebGL";
                  throw y ? (y.message = R, new Error(JSON.stringify(y))) : new Error(R);
                }
                this.painter = new Nu(b, this.transform), c.testSupport(b);
              }
              loaded() {
                return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
              }
              _update(B) {
                return this.style && this.style._loaded ? (this._styleDirty = this._styleDirty || B, this._sourcesDirty = !0, this.triggerRepaint(), this) : this;
              }
              _requestRenderFrame(B) {
                return this._update(), this._renderTaskQueue.add(B);
              }
              _cancelRenderFrame(B) {
                this._renderTaskQueue.remove(B);
              }
              _render(B) {
                const y = this._idleTriggered ? this._fadeDuration : 0;
                if (this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(B), this._removed) return;
                let b = !1;
                if (this.style && this._styleDirty) {
                  this._styleDirty = !1;
                  const j = this.transform.zoom, G = d.now();
                  this.style.zoomHistory.update(j, G);
                  const ie = new i.a9(j, { now: G, fadeDuration: y, zoomHistory: this.style.zoomHistory, transition: this.style.getTransition() }), fe = ie.crossFadingFactor();
                  fe === 1 && fe === this._crossFadingFactor || (b = !0, this._crossFadingFactor = fe), this.style.update(ie);
                }
                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, y, this._crossSourceCollisions), this.painter.render(this.style, { showTileBoundaries: this.showTileBoundaries, showOverdrawInspector: this._showOverdrawInspector, rotating: this.isRotating(), zooming: this.isZooming(), moving: this.isMoving(), fadeDuration: y, showPadding: this.showPadding }), this.fire(new i.k("render")), this.loaded() && !this._loaded && (this._loaded = !0, i.be.mark(i.bf.load), this.fire(new i.k("load"))), this.style && (this.style.hasTransitions() || b) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles();
                const R = this._sourcesDirty || this._styleDirty || this._placementDirty;
                return R || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new i.k("idle")), !this._loaded || this._fullyLoaded || R || (this._fullyLoaded = !0, i.be.mark(i.bf.fullLoad)), this;
              }
              redraw() {
                return this.style && (this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._render(0)), this;
              }
              remove() {
                var B;
                this._hash && this._hash.remove();
                for (const b of this._controls) b.onRemove(this);
                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), S.removeThrottleControl(this._imageQueueHandle), (B = this._resizeObserver) === null || B === void 0 || B.disconnect();
                const y = this.painter.context.gl.getExtension("WEBGL_lose_context");
                y != null && y.loseContext && y.loseContext(), this._canvas.removeEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.removeEventListener("webglcontextlost", this._contextLost, !1), f.remove(this._canvasContainer), f.remove(this._controlContainer), this._container.classList.remove("maplibregl-map"), i.be.clearMetrics(), this._removed = !0, this.fire(new i.k("remove"));
              }
              triggerRepaint() {
                this.style && !this._frameRequest && (this._frameRequest = new AbortController(), d.frameAsync(this._frameRequest).then((B) => {
                  i.be.frame(B), this._frameRequest = null, this._render(B);
                }).catch(() => {
                }));
              }
              get showTileBoundaries() {
                return !!this._showTileBoundaries;
              }
              set showTileBoundaries(B) {
                this._showTileBoundaries !== B && (this._showTileBoundaries = B, this._update());
              }
              get showPadding() {
                return !!this._showPadding;
              }
              set showPadding(B) {
                this._showPadding !== B && (this._showPadding = B, this._update());
              }
              get showCollisionBoxes() {
                return !!this._showCollisionBoxes;
              }
              set showCollisionBoxes(B) {
                this._showCollisionBoxes !== B && (this._showCollisionBoxes = B, B ? this.style._generateCollisionBoxes() : this._update());
              }
              get showOverdrawInspector() {
                return !!this._showOverdrawInspector;
              }
              set showOverdrawInspector(B) {
                this._showOverdrawInspector !== B && (this._showOverdrawInspector = B, this._update());
              }
              get repaint() {
                return !!this._repaint;
              }
              set repaint(B) {
                this._repaint !== B && (this._repaint = B, this.triggerRepaint());
              }
              get vertices() {
                return !!this._vertices;
              }
              set vertices(B) {
                this._vertices = B, this._update();
              }
              get version() {
                return ec;
              }
              getCameraTargetElevation() {
                return this.transform.elevation;
              }
            }, u.MapMouseEvent = Zo, u.MapTouchEvent = Fo, u.MapWheelEvent = Il, u.Marker = Za, u.NavigationControl = class {
              constructor(B) {
                this._updateZoomButtons = () => {
                  const y = this._map.getZoom(), b = y === this._map.getMaxZoom(), R = y === this._map.getMinZoom();
                  this._zoomInButton.disabled = b, this._zoomOutButton.disabled = R, this._zoomInButton.setAttribute("aria-disabled", b.toString()), this._zoomOutButton.setAttribute("aria-disabled", R.toString());
                }, this._rotateCompassArrow = () => {
                  const y = 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)`;
                  this._compassIcon.style.transform = y;
                }, this._setButtonTitle = (y, b) => {
                  const R = this._map._getUIString(`NavigationControl.${b}`);
                  y.title = R, y.setAttribute("aria-label", R);
                }, this.options = i.e({}, il, B), this._container = f.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", (y) => y.preventDefault()), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", (y) => this._map.zoomIn({}, { originalEvent: y })), f.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", (y) => this._map.zoomOut({}, { originalEvent: y })), f.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", (y) => {
                  this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: y }) : this._map.resetNorth({}, { originalEvent: y });
                }), this._compassIcon = f.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
              }
              onAdd(B) {
                return this._map = B, 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 ni(this._map, this._compass, this.options.visualizePitch)), this._container;
              }
              onRemove() {
                f.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;
              }
              _createButton(B, y) {
                const b = f.create("button", B, this._container);
                return b.type = "button", b.addEventListener("click", y), b;
              }
            }, u.Popup = Qe, u.RasterDEMTileSource = We, u.RasterTileSource = Le, u.ScaleControl = class {
              constructor(B) {
                this._onMove = () => {
                  He(this._map, this._container, this.options);
                }, this.setUnit = (y) => {
                  this.options.unit = y, He(this._map, this._container, this.options);
                }, this.options = Object.assign(Object.assign({}, ci), B);
              }
              getDefaultPosition() {
                return "bottom-left";
              }
              onAdd(B) {
                return this._map = B, this._container = f.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", B.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
              }
              onRemove() {
                f.remove(this._container), this._map.off("move", this._onMove), this._map = void 0;
              }
            }, u.ScrollZoomHandler = Fl, u.Style = Wr, u.TerrainControl = class {
              constructor(B) {
                this._toggleTerrain = () => {
                  this._map.getTerrain() ? this._map.setTerrain(null) : this._map.setTerrain(this.options), this._updateTerrainIcon();
                }, this._updateTerrainIcon = () => {
                  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"));
                }, this.options = B;
              }
              onAdd(B) {
                return this._map = B, this._container = f.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = f.create("button", "maplibregl-ctrl-terrain", this._container), f.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;
              }
              onRemove() {
                f.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
              }
            }, u.TwoFingersTouchPitchHandler = zl, u.TwoFingersTouchRotateHandler = Dc, u.TwoFingersTouchZoomHandler = xi, u.TwoFingersTouchZoomRotateHandler = iu, u.VectorTileSource = De, u.VideoSource = ge, u.addSourceType = (B, y) => i._(void 0, void 0, void 0, function* () {
              if (Ge(B)) throw new Error(`A source type called "${B}" already exists.`);
              ((b, R) => {
                we[b] = R;
              })(B, y);
            }), u.clearPrewarmedResources = function() {
              const B = de;
              B && (B.isPreloaded() && B.numActive() === 1 ? (B.release(ue), de = 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()"));
            }, u.getMaxParallelImageRequests = function() {
              return i.a.MAX_PARALLEL_IMAGE_REQUESTS;
            }, u.getRTLTextPluginStatus = function() {
              return tt().getRTLTextPluginStatus();
            }, u.getVersion = function() {
              return Z;
            }, u.getWorkerCount = function() {
              return ce.workerCount;
            }, u.getWorkerUrl = function() {
              return i.a.WORKER_URL;
            }, u.importScriptInWorkers = function(B) {
              return me().broadcast("IS", B);
            }, u.prewarm = function() {
              ae().acquire(ue);
            }, u.setMaxParallelImageRequests = function(B) {
              i.a.MAX_PARALLEL_IMAGE_REQUESTS = B;
            }, u.setRTLTextPlugin = function(B, y) {
              return tt().setRTLTextPlugin(B, y);
            }, u.setWorkerCount = function(B) {
              ce.workerCount = B;
            }, u.setWorkerUrl = function(B) {
              i.a.WORKER_URL = B;
            };
          }), s;
        }();
      }, 88640: function(o, s, n) {
        function l(be, Ae, Se) {
          be.prototype = Ae.prototype = Se, Se.constructor = be;
        }
        function u(be, Ae) {
          var Se = Object.create(be.prototype);
          for (var Me in Ae) Se[Me] = Ae[Me];
          return Se;
        }
        function i() {
        }
        n.d(s, { GW: function() {
          return pe;
        }, Dj: function() {
          return ce;
        } });
        var h = 0.7, p = 1 / h, _ = "\\s*([+-]?\\d+)\\s*", d = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", f = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", c = /^#([0-9a-f]{3,8})$/, g = new RegExp("^rgb\\(".concat(_, ",").concat(_, ",").concat(_, "\\)$")), m = new RegExp("^rgb\\(".concat(f, ",").concat(f, ",").concat(f, "\\)$")), x = new RegExp("^rgba\\(".concat(_, ",").concat(_, ",").concat(_, ",").concat(d, "\\)$")), w = new RegExp("^rgba\\(".concat(f, ",").concat(f, ",").concat(f, ",").concat(d, "\\)$")), k = new RegExp("^hsl\\(".concat(d, ",").concat(f, ",").concat(f, "\\)$")), S = new RegExp("^hsla\\(".concat(d, ",").concat(f, ",").concat(f, ",").concat(d, "\\)$")), A = { aliceblue: 15792383, antiquewhite: 16444375, aqua: 65535, aquamarine: 8388564, azure: 15794175, beige: 16119260, bisque: 16770244, black: 0, blanchedalmond: 16772045, blue: 255, blueviolet: 9055202, brown: 10824234, burlywood: 14596231, cadetblue: 6266528, chartreuse: 8388352, chocolate: 13789470, coral: 16744272, cornflowerblue: 6591981, cornsilk: 16775388, crimson: 14423100, cyan: 65535, darkblue: 139, darkcyan: 35723, darkgoldenrod: 12092939, darkgray: 11119017, darkgreen: 25600, darkgrey: 11119017, darkkhaki: 12433259, darkmagenta: 9109643, darkolivegreen: 5597999, darkorange: 16747520, darkorchid: 10040012, darkred: 9109504, darksalmon: 15308410, darkseagreen: 9419919, darkslateblue: 4734347, darkslategray: 3100495, darkslategrey: 3100495, darkturquoise: 52945, darkviolet: 9699539, deeppink: 16716947, deepskyblue: 49151, dimgray: 6908265, dimgrey: 6908265, dodgerblue: 2003199, firebrick: 11674146, floralwhite: 16775920, forestgreen: 2263842, fuchsia: 16711935, gainsboro: 14474460, ghostwhite: 16316671, gold: 16766720, goldenrod: 14329120, gray: 8421504, green: 32768, greenyellow: 11403055, grey: 8421504, honeydew: 15794160, hotpink: 16738740, indianred: 13458524, indigo: 4915330, ivory: 16777200, khaki: 15787660, lavender: 15132410, lavenderblush: 16773365, lawngreen: 8190976, lemonchiffon: 16775885, lightblue: 11393254, lightcoral: 15761536, lightcyan: 14745599, lightgoldenrodyellow: 16448210, lightgray: 13882323, lightgreen: 9498256, lightgrey: 13882323, lightpink: 16758465, lightsalmon: 16752762, lightseagreen: 2142890, lightskyblue: 8900346, lightslategray: 7833753, lightslategrey: 7833753, lightsteelblue: 11584734, lightyellow: 16777184, lime: 65280, limegreen: 3329330, linen: 16445670, magenta: 16711935, maroon: 8388608, mediumaquamarine: 6737322, mediumblue: 205, mediumorchid: 12211667, mediumpurple: 9662683, mediumseagreen: 3978097, mediumslateblue: 8087790, mediumspringgreen: 64154, mediumturquoise: 4772300, mediumvioletred: 13047173, midnightblue: 1644912, mintcream: 16121850, mistyrose: 16770273, moccasin: 16770229, navajowhite: 16768685, navy: 128, oldlace: 16643558, olive: 8421376, olivedrab: 7048739, orange: 16753920, orangered: 16729344, orchid: 14315734, palegoldenrod: 15657130, palegreen: 10025880, paleturquoise: 11529966, palevioletred: 14381203, papayawhip: 16773077, peachpuff: 16767673, peru: 13468991, pink: 16761035, plum: 14524637, powderblue: 11591910, purple: 8388736, rebeccapurple: 6697881, red: 16711680, rosybrown: 12357519, royalblue: 4286945, saddlebrown: 9127187, salmon: 16416882, sandybrown: 16032864, seagreen: 3050327, seashell: 16774638, sienna: 10506797, silver: 12632256, skyblue: 8900331, slateblue: 6970061, slategray: 7372944, slategrey: 7372944, snow: 16775930, springgreen: 65407, steelblue: 4620980, tan: 13808780, teal: 32896, thistle: 14204888, tomato: 16737095, turquoise: 4251856, violet: 15631086, wheat: 16113331, white: 16777215, whitesmoke: 16119285, yellow: 16776960, yellowgreen: 10145074 };
        function C() {
          return this.rgb().formatHex();
        }
        function D() {
          return this.rgb().formatRgb();
        }
        function L(be) {
          var Ae, Se;
          return be = (be + "").trim().toLowerCase(), (Ae = c.exec(be)) ? (Se = Ae[1].length, Ae = parseInt(Ae[1], 16), Se === 6 ? E(Ae) : Se === 3 ? new M(Ae >> 8 & 15 | Ae >> 4 & 240, Ae >> 4 & 15 | 240 & Ae, (15 & Ae) << 4 | 15 & Ae, 1) : Se === 8 ? P(Ae >> 24 & 255, Ae >> 16 & 255, Ae >> 8 & 255, (255 & Ae) / 255) : Se === 4 ? P(Ae >> 12 & 15 | Ae >> 8 & 240, Ae >> 8 & 15 | Ae >> 4 & 240, Ae >> 4 & 15 | 240 & Ae, ((15 & Ae) << 4 | 15 & Ae) / 255) : null) : (Ae = g.exec(be)) ? new M(Ae[1], Ae[2], Ae[3], 1) : (Ae = m.exec(be)) ? new M(255 * Ae[1] / 100, 255 * Ae[2] / 100, 255 * Ae[3] / 100, 1) : (Ae = x.exec(be)) ? P(Ae[1], Ae[2], Ae[3], Ae[4]) : (Ae = w.exec(be)) ? P(255 * Ae[1] / 100, 255 * Ae[2] / 100, 255 * Ae[3] / 100, Ae[4]) : (Ae = k.exec(be)) ? V(Ae[1], Ae[2] / 100, Ae[3] / 100, 1) : (Ae = S.exec(be)) ? V(Ae[1], Ae[2] / 100, Ae[3] / 100, Ae[4]) : A.hasOwnProperty(be) ? E(A[be]) : be === "transparent" ? new M(NaN, NaN, NaN, 0) : null;
        }
        function E(be) {
          return new M(be >> 16 & 255, be >> 8 & 255, 255 & be, 1);
        }
        function P(be, Ae, Se, Me) {
          return Me <= 0 && (be = Ae = Se = NaN), new M(be, Ae, Se, Me);
        }
        function I(be, Ae, Se, Me) {
          return arguments.length === 1 ? ((De = be) instanceof i || (De = L(De)), De ? new M((De = De.rgb()).r, De.g, De.b, De.opacity) : new M()) : new M(be, Ae, Se, Me ?? 1);
          var De;
        }
        function M(be, Ae, Se, Me) {
          this.r = +be, this.g = +Ae, this.b = +Se, this.opacity = +Me;
        }
        function O() {
          return "#".concat(U(this.r)).concat(U(this.g)).concat(U(this.b));
        }
        function T() {
          var be = z(this.opacity);
          return "".concat(be === 1 ? "rgb(" : "rgba(").concat(F(this.r), ", ").concat(F(this.g), ", ").concat(F(this.b)).concat(be === 1 ? ")" : ", ".concat(be, ")"));
        }
        function z(be) {
          return isNaN(be) ? 1 : Math.max(0, Math.min(1, be));
        }
        function F(be) {
          return Math.max(0, Math.min(255, Math.round(be) || 0));
        }
        function U(be) {
          return ((be = F(be)) < 16 ? "0" : "") + be.toString(16);
        }
        function V(be, Ae, Se, Me) {
          return Me <= 0 ? be = Ae = Se = NaN : Se <= 0 || Se >= 1 ? be = Ae = NaN : Ae <= 0 && (be = NaN), new q(be, Ae, Se, Me);
        }
        function $(be) {
          if (be instanceof q) return new q(be.h, be.s, be.l, be.opacity);
          if (be instanceof i || (be = L(be)), !be) return new q();
          if (be instanceof q) return be;
          var Ae = (be = be.rgb()).r / 255, Se = be.g / 255, Me = be.b / 255, De = Math.min(Ae, Se, Me), Le = Math.max(Ae, Se, Me), We = NaN, Ee = Le - De, Ne = (Le + De) / 2;
          return Ee ? (We = Ae === Le ? (Se - Me) / Ee + 6 * (Se < Me) : Se === Le ? (Me - Ae) / Ee + 2 : (Ae - Se) / Ee + 4, Ee /= Ne < 0.5 ? Le + De : 2 - Le - De, We *= 60) : Ee = Ne > 0 && Ne < 1 ? 0 : We, new q(We, Ee, Ne, be.opacity);
        }
        function q(be, Ae, Se, Me) {
          this.h = +be, this.s = +Ae, this.l = +Se, this.opacity = +Me;
        }
        function K(be) {
          return (be = (be || 0) % 360) < 0 ? be + 360 : be;
        }
        function re(be) {
          return Math.max(0, Math.min(1, be || 0));
        }
        function Y(be, Ae, Se) {
          return 255 * (be < 60 ? Ae + (Se - Ae) * be / 60 : be < 180 ? Se : be < 240 ? Ae + (Se - Ae) * (240 - be) / 60 : Ae);
        }
        l(i, L, { copy: function(be) {
          return Object.assign(new this.constructor(), this, be);
        }, displayable: function() {
          return this.rgb().displayable();
        }, hex: C, formatHex: C, formatHex8: function() {
          return this.rgb().formatHex8();
        }, formatHsl: function() {
          return $(this).formatHsl();
        }, formatRgb: D, toString: D }), l(M, I, u(i, { brighter: function(be) {
          return be = be == null ? p : Math.pow(p, be), new M(this.r * be, this.g * be, this.b * be, this.opacity);
        }, darker: function(be) {
          return be = be == null ? h : Math.pow(h, be), new M(this.r * be, this.g * be, this.b * be, this.opacity);
        }, rgb: function() {
          return this;
        }, clamp: function() {
          return new M(F(this.r), F(this.g), F(this.b), z(this.opacity));
        }, displayable: function() {
          return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
        }, hex: O, formatHex: O, formatHex8: function() {
          return "#".concat(U(this.r)).concat(U(this.g)).concat(U(this.b)).concat(U(255 * (isNaN(this.opacity) ? 1 : this.opacity)));
        }, formatRgb: T, toString: T })), l(q, function(be, Ae, Se, Me) {
          return arguments.length === 1 ? $(be) : new q(be, Ae, Se, Me ?? 1);
        }, u(i, { brighter: function(be) {
          return be = be == null ? p : Math.pow(p, be), new q(this.h, this.s, this.l * be, this.opacity);
        }, darker: function(be) {
          return be = be == null ? h : Math.pow(h, be), new q(this.h, this.s, this.l * be, this.opacity);
        }, rgb: function() {
          var be = this.h % 360 + 360 * (this.h < 0), Ae = isNaN(be) || isNaN(this.s) ? 0 : this.s, Se = this.l, Me = Se + (Se < 0.5 ? Se : 1 - Se) * Ae, De = 2 * Se - Me;
          return new M(Y(be >= 240 ? be - 240 : be + 120, De, Me), Y(be, De, Me), Y(be < 120 ? be + 240 : be - 120, De, Me), this.opacity);
        }, clamp: function() {
          return new q(K(this.h), re(this.s), re(this.l), z(this.opacity));
        }, displayable: function() {
          return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
        }, formatHsl: function() {
          var be = z(this.opacity);
          return "".concat(be === 1 ? "hsl(" : "hsla(").concat(K(this.h), ", ").concat(100 * re(this.s), "%, ").concat(100 * re(this.l), "%").concat(be === 1 ? ")" : ", ".concat(be, ")"));
        } }));
        var te = function(be) {
          return function() {
            return be;
          };
        };
        function ee(be, Ae) {
          var Se = Ae - be;
          return Se ? /* @__PURE__ */ function(Me, De) {
            return function(Le) {
              return Me + Le * De;
            };
          }(be, Se) : te(isNaN(be) ? Ae : be);
        }
        var X = function be(Ae) {
          var Se = function(De) {
            return (De = +De) == 1 ? ee : function(Le, We) {
              return We - Le ? function(Ee, Ne, Ie) {
                return Ee = Math.pow(Ee, Ie), Ne = Math.pow(Ne, Ie) - Ee, Ie = 1 / Ie, function(ge) {
                  return Math.pow(Ee + ge * Ne, Ie);
                };
              }(Le, We, De) : te(isNaN(Le) ? We : Le);
            };
          }(Ae);
          function Me(De, Le) {
            var We = Se((De = I(De)).r, (Le = I(Le)).r), Ee = Se(De.g, Le.g), Ne = Se(De.b, Le.b), Ie = ee(De.opacity, Le.opacity);
            return function(ge) {
              return De.r = We(ge), De.g = Ee(ge), De.b = Ne(ge), De.opacity = Ie(ge), De + "";
            };
          }
          return Me.gamma = be, Me;
        }(1);
        function Q(be, Ae) {
          var Se, Me = Ae ? Ae.length : 0, De = be ? Math.min(Me, be.length) : 0, Le = new Array(De), We = new Array(Me);
          for (Se = 0; Se < De; ++Se) Le[Se] = pe(be[Se], Ae[Se]);
          for (; Se < Me; ++Se) We[Se] = Ae[Se];
          return function(Ee) {
            for (Se = 0; Se < De; ++Se) We[Se] = Le[Se](Ee);
            return We;
          };
        }
        function ue(be, Ae) {
          var Se = /* @__PURE__ */ new Date();
          return be = +be, Ae = +Ae, function(Me) {
            return Se.setTime(be * (1 - Me) + Ae * Me), Se;
          };
        }
        function ce(be, Ae) {
          return be = +be, Ae = +Ae, function(Se) {
            return be * (1 - Se) + Ae * Se;
          };
        }
        function he(be) {
          return he = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ae) {
            return typeof Ae;
          } : function(Ae) {
            return Ae && typeof Symbol == "function" && Ae.constructor === Symbol && Ae !== Symbol.prototype ? "symbol" : typeof Ae;
          }, he(be);
        }
        function de(be, Ae) {
          var Se, Me = {}, De = {};
          for (Se in be !== null && he(be) === "object" || (be = {}), Ae !== null && he(Ae) === "object" || (Ae = {}), Ae) Se in be ? Me[Se] = pe(be[Se], Ae[Se]) : De[Se] = Ae[Se];
          return function(Le) {
            for (Se in Me) De[Se] = Me[Se](Le);
            return De;
          };
        }
        var ne = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, ae = new RegExp(ne.source, "g");
        function se(be, Ae) {
          var Se, Me, De, Le = ne.lastIndex = ae.lastIndex = 0, We = -1, Ee = [], Ne = [];
          for (be += "", Ae += ""; (Se = ne.exec(be)) && (Me = ae.exec(Ae)); ) (De = Me.index) > Le && (De = Ae.slice(Le, De), Ee[We] ? Ee[We] += De : Ee[++We] = De), (Se = Se[0]) === (Me = Me[0]) ? Ee[We] ? Ee[We] += Me : Ee[++We] = Me : (Ee[++We] = null, Ne.push({ i: We, x: ce(Se, Me) })), Le = ae.lastIndex;
          return Le < Ae.length && (De = Ae.slice(Le), Ee[We] ? Ee[We] += De : Ee[++We] = De), Ee.length < 2 ? Ne[0] ? /* @__PURE__ */ function(Ie) {
            return function(ge) {
              return Ie(ge) + "";
            };
          }(Ne[0].x) : /* @__PURE__ */ function(Ie) {
            return function() {
              return Ie;
            };
          }(Ae) : (Ae = Ne.length, function(Ie) {
            for (var ge, Ce = 0; Ce < Ae; ++Ce) Ee[(ge = Ne[Ce]).i] = ge.x(Ie);
            return Ee.join("");
          });
        }
        function me(be, Ae) {
          Ae || (Ae = []);
          var Se, Me = be ? Math.min(Ae.length, be.length) : 0, De = Ae.slice();
          return function(Le) {
            for (Se = 0; Se < Me; ++Se) De[Se] = be[Se] * (1 - Le) + Ae[Se] * Le;
            return De;
          };
        }
        function ye(be) {
          return ye = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(Ae) {
            return typeof Ae;
          } : function(Ae) {
            return Ae && typeof Symbol == "function" && Ae.constructor === Symbol && Ae !== Symbol.prototype ? "symbol" : typeof Ae;
          }, ye(be);
        }
        function pe(be, Ae) {
          var Se, Me, De = ye(Ae);
          return Ae == null || De === "boolean" ? te(Ae) : (De === "number" ? ce : De === "string" ? (Se = L(Ae)) ? (Ae = Se, X) : se : Ae instanceof L ? X : Ae instanceof Date ? ue : (Me = Ae, !ArrayBuffer.isView(Me) || Me instanceof DataView ? Array.isArray(Ae) ? Q : typeof Ae.valueOf != "function" && typeof Ae.toString != "function" || isNaN(Ae) ? de : ce : me))(be, Ae);
        }
      }, 23648: function(o) {
        o.exports = JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]');
      }, 2362: function(o) {
        o.exports = JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]');
      }, 87486: function(o) {
        o.exports = JSON.parse('["normal","italic","oblique"]');
      }, 99803: function(o) {
        o.exports = JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]');
      }, 54324: function(o) {
        o.exports = JSON.parse('["inherit","initial","unset"]');
      }, 94316: function(o) {
        o.exports = JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]');
      }, 37071: function(o) {
        o.exports = JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`);
      }, 51962: function(o) {
        o.exports = JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`);
      } }, a = {};
      function v(o) {
        var s = a[o];
        if (s !== void 0) return s.exports;
        var n = a[o] = { id: o, exports: {} };
        return r[o].call(n.exports, n, n.exports, v), n.exports;
      }
      return v.m = r, v.n = function(o) {
        var s = o && o.__esModule ? function() {
          return o.default;
        } : function() {
          return o;
        };
        return v.d(s, { a: s }), s;
      }, v.d = function(o, s) {
        for (var n in s) v.o(s, n) && !v.o(o, n) && Object.defineProperty(o, n, { enumerable: !0, get: s[n] });
      }, v.g = function() {
        if (typeof globalThis == "object") return globalThis;
        try {
          return this || new Function("return this")();
        } catch {
          if (typeof window == "object") return window;
        }
      }(), v.o = function(o, s) {
        return Object.prototype.hasOwnProperty.call(o, s);
      }, v.r = function(o) {
        typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(o, "__esModule", { value: !0 });
      }, v.b = document.baseURI || self.location.href, v.nc = void 0, v(20260);
    }();
  });
})(_W);
var l6 = _W.exports;
const N0e = /* @__PURE__ */ Bh({
  __name: "PlotlyWidget",
  props: {
    spec: {}
  },
  setup(e) {
    const t = e, r = Ys();
    function a() {
      var o, s;
      return {
        ...t.spec.layout,
        width: (o = r.value) == null ? void 0 : o.clientWidth,
        height: (s = r.value) == null ? void 0 : s.clientHeight,
        font: {
          family: "GeistMono, monospace"
        }
      };
    }
    const v = new ResizeObserver(() => {
      r.value && l6.relayout(r.value, a());
    });
    return mb(async () => {
      if (r.value) {
        v.observe(r.value);
        const o = await l6.newPlot(r.value, t.spec.data, a());
        t.spec.frames && l6.addFrames(o, t.spec.frames);
      }
    }), gb(() => {
      r.value && (v.unobserve(r.value), l6.purge(r.value));
    }), (o, s) => (Va(), ns("div", {
      class: "plotly-widget",
      ref_key: "container",
      ref: r
    }, null, 512));
  }
}), B0e = /* @__PURE__ */ Ap(N0e, [["__scopeId", "data-v-01063ddc"]]), AE = Math.min, px = Math.max, n7 = Math.round, u6 = Math.floor, gg = (e) => ({
  x: e,
  y: e
});
function kW(e) {
  return e.split("-")[0];
}
function j0e(e) {
  return e.split("-")[1];
}
function U0e(e) {
  return e === "x" ? "y" : "x";
}
function V0e(e) {
  return e === "y" ? "height" : "width";
}
function TW(e) {
  return ["top", "bottom"].includes(kW(e)) ? "y" : "x";
}
function $0e(e) {
  return U0e(TW(e));
}
function AW(e) {
  const {
    x: t,
    y: r,
    width: a,
    height: v
  } = e;
  return {
    width: a,
    height: v,
    top: r,
    left: t,
    right: t + a,
    bottom: r + v,
    x: t,
    y: r
  };
}
function QN(e, t, r) {
  let {
    reference: a,
    floating: v
  } = e;
  const o = TW(t), s = $0e(t), n = V0e(s), l = kW(t), u = o === "y", i = a.x + a.width / 2 - v.width / 2, h = a.y + a.height / 2 - v.height / 2, p = a[n] / 2 - v[n] / 2;
  let _;
  switch (l) {
    case "top":
      _ = {
        x: i,
        y: a.y - v.height
      };
      break;
    case "bottom":
      _ = {
        x: i,
        y: a.y + a.height
      };
      break;
    case "right":
      _ = {
        x: a.x + a.width,
        y: h
      };
      break;
    case "left":
      _ = {
        x: a.x - v.width,
        y: h
      };
      break;
    default:
      _ = {
        x: a.x,
        y: a.y
      };
  }
  switch (j0e(t)) {
    case "start":
      _[s] -= p * (r && u ? -1 : 1);
      break;
    case "end":
      _[s] += p * (r && u ? -1 : 1);
      break;
  }
  return _;
}
const q0e = async (e, t, r) => {
  const {
    placement: a = "bottom",
    strategy: v = "absolute",
    middleware: o = [],
    platform: s
  } = r, n = o.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
  let u = await s.getElementRects({
    reference: e,
    floating: t,
    strategy: v
  }), {
    x: i,
    y: h
  } = QN(u, a, l), p = a, _ = {}, d = 0;
  for (let f = 0; f < n.length; f++) {
    const {
      name: c,
      fn: g
    } = n[f], {
      x: m,
      y: x,
      data: w,
      reset: k
    } = await g({
      x: i,
      y: h,
      initialPlacement: a,
      placement: p,
      strategy: v,
      middlewareData: _,
      rects: u,
      platform: s,
      elements: {
        reference: e,
        floating: t
      }
    });
    i = m ?? i, h = x ?? h, _ = {
      ..._,
      [c]: {
        ..._[c],
        ...w
      }
    }, k && d <= 50 && (d++, typeof k == "object" && (k.placement && (p = k.placement), k.rects && (u = k.rects === !0 ? await s.getElementRects({
      reference: e,
      floating: t,
      strategy: v
    }) : k.rects), {
      x: i,
      y: h
    } = QN(u, p, l)), f = -1);
  }
  return {
    x: i,
    y: h,
    placement: p,
    strategy: v,
    middlewareData: _
  };
};
function a9() {
  return typeof window < "u";
}
function Uv(e) {
  return TD(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function ed(e) {
  var t;
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function N0(e) {
  var t;
  return (t = (TD(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function TD(e) {
  return a9() ? e instanceof Node || e instanceof ed(e).Node : !1;
}
function gp(e) {
  return a9() ? e instanceof Element || e instanceof ed(e).Element : !1;
}
function S0(e) {
  return a9() ? e instanceof HTMLElement || e instanceof ed(e).HTMLElement : !1;
}
function eB(e) {
  return !a9() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ed(e).ShadowRoot;
}
function a4(e) {
  const {
    overflow: t,
    overflowX: r,
    overflowY: a,
    display: v
  } = yp(e);
  return /auto|scroll|overlay|hidden|clip/.test(t + a + r) && !["inline", "contents"].includes(v);
}
function H0e(e) {
  return ["table", "td", "th"].includes(Uv(e));
}
function o9(e) {
  return [":popover-open", ":modal"].some((t) => {
    try {
      return e.matches(t);
    } catch {
      return !1;
    }
  });
}
function AD(e) {
  const t = SD(), r = gp(e) ? yp(e) : e;
  return r.transform !== "none" || r.perspective !== "none" || (r.containerType ? r.containerType !== "normal" : !1) || !t && (r.backdropFilter ? r.backdropFilter !== "none" : !1) || !t && (r.filter ? r.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((a) => (r.willChange || "").includes(a)) || ["paint", "layout", "strict", "content"].some((a) => (r.contain || "").includes(a));
}
function G0e(e) {
  let t = yg(e);
  for (; S0(t) && !Cx(t); ) {
    if (AD(t))
      return t;
    if (o9(t))
      return null;
    t = yg(t);
  }
  return null;
}
function SD() {
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function Cx(e) {
  return ["html", "body", "#document"].includes(Uv(e));
}
function yp(e) {
  return ed(e).getComputedStyle(e);
}
function s9(e) {
  return gp(e) ? {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  } : {
    scrollLeft: e.scrollX,
    scrollTop: e.scrollY
  };
}
function yg(e) {
  if (Uv(e) === "html")
    return e;
  const t = (
    // Step into the shadow DOM of the parent of a slotted node.
    e.assignedSlot || // DOM Element detected.
    e.parentNode || // ShadowRoot detected.
    eB(e) && e.host || // Fallback.
    N0(e)
  );
  return eB(t) ? t.host : t;
}
function SW(e) {
  const t = yg(e);
  return Cx(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : S0(t) && a4(t) ? t : SW(t);
}
function vw(e, t, r) {
  var a;
  t === void 0 && (t = []), r === void 0 && (r = !0);
  const v = SW(e), o = v === ((a = e.ownerDocument) == null ? void 0 : a.body), s = ed(v);
  if (o) {
    const n = SE(s);
    return t.concat(s, s.visualViewport || [], a4(v) ? v : [], n && r ? vw(n) : []);
  }
  return t.concat(v, vw(v, [], r));
}
function SE(e) {
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
function MW(e) {
  const t = yp(e);
  let r = parseFloat(t.width) || 0, a = parseFloat(t.height) || 0;
  const v = S0(e), o = v ? e.offsetWidth : r, s = v ? e.offsetHeight : a, n = n7(r) !== o || n7(a) !== s;
  return n && (r = o, a = s), {
    width: r,
    height: a,
    $: n
  };
}
function MD(e) {
  return gp(e) ? e : e.contextElement;
}
function mx(e) {
  const t = MD(e);
  if (!S0(t))
    return gg(1);
  const r = t.getBoundingClientRect(), {
    width: a,
    height: v,
    $: o
  } = MW(t);
  let s = (o ? n7(r.width) : r.width) / a, n = (o ? n7(r.height) : r.height) / v;
  return (!s || !Number.isFinite(s)) && (s = 1), (!n || !Number.isFinite(n)) && (n = 1), {
    x: s,
    y: n
  };
}
const W0e = /* @__PURE__ */ gg(0);
function EW(e) {
  const t = ed(e);
  return !SD() || !t.visualViewport ? W0e : {
    x: t.visualViewport.offsetLeft,
    y: t.visualViewport.offsetTop
  };
}
function Y0e(e, t, r) {
  return t === void 0 && (t = !1), !r || t && r !== ed(e) ? !1 : t;
}
function vv(e, t, r, a) {
  t === void 0 && (t = !1), r === void 0 && (r = !1);
  const v = e.getBoundingClientRect(), o = MD(e);
  let s = gg(1);
  t && (a ? gp(a) && (s = mx(a)) : s = mx(e));
  const n = Y0e(o, r, a) ? EW(o) : gg(0);
  let l = (v.left + n.x) / s.x, u = (v.top + n.y) / s.y, i = v.width / s.x, h = v.height / s.y;
  if (o) {
    const p = ed(o), _ = a && gp(a) ? ed(a) : a;
    let d = p, f = SE(d);
    for (; f && a && _ !== d; ) {
      const c = mx(f), g = f.getBoundingClientRect(), m = yp(f), x = g.left + (f.clientLeft + parseFloat(m.paddingLeft)) * c.x, w = g.top + (f.clientTop + parseFloat(m.paddingTop)) * c.y;
      l *= c.x, u *= c.y, i *= c.x, h *= c.y, l += x, u += w, d = ed(f), f = SE(d);
    }
  }
  return AW({
    width: i,
    height: h,
    x: l,
    y: u
  });
}
function Z0e(e) {
  let {
    elements: t,
    rect: r,
    offsetParent: a,
    strategy: v
  } = e;
  const o = v === "fixed", s = N0(a), n = t ? o9(t.floating) : !1;
  if (a === s || n && o)
    return r;
  let l = {
    scrollLeft: 0,
    scrollTop: 0
  }, u = gg(1);
  const i = gg(0), h = S0(a);
  if ((h || !h && !o) && ((Uv(a) !== "body" || a4(s)) && (l = s9(a)), S0(a))) {
    const p = vv(a);
    u = mx(a), i.x = p.x + a.clientLeft, i.y = p.y + a.clientTop;
  }
  return {
    width: r.width * u.x,
    height: r.height * u.y,
    x: r.x * u.x - l.scrollLeft * u.x + i.x,
    y: r.y * u.y - l.scrollTop * u.y + i.y
  };
}
function X0e(e) {
  return Array.from(e.getClientRects());
}
function ME(e, t) {
  const r = s9(e).scrollLeft;
  return t ? t.left + r : vv(N0(e)).left + r;
}
function K0e(e) {
  const t = N0(e), r = s9(e), a = e.ownerDocument.body, v = px(t.scrollWidth, t.clientWidth, a.scrollWidth, a.clientWidth), o = px(t.scrollHeight, t.clientHeight, a.scrollHeight, a.clientHeight);
  let s = -r.scrollLeft + ME(e);
  const n = -r.scrollTop;
  return yp(a).direction === "rtl" && (s += px(t.clientWidth, a.clientWidth) - v), {
    width: v,
    height: o,
    x: s,
    y: n
  };
}
function J0e(e, t) {
  const r = ed(e), a = N0(e), v = r.visualViewport;
  let o = a.clientWidth, s = a.clientHeight, n = 0, l = 0;
  if (v) {
    o = v.width, s = v.height;
    const u = SD();
    (!u || u && t === "fixed") && (n = v.offsetLeft, l = v.offsetTop);
  }
  return {
    width: o,
    height: s,
    x: n,
    y: l
  };
}
function Q0e(e, t) {
  const r = vv(e, !0, t === "fixed"), a = r.top + e.clientTop, v = r.left + e.clientLeft, o = S0(e) ? mx(e) : gg(1), s = e.clientWidth * o.x, n = e.clientHeight * o.y, l = v * o.x, u = a * o.y;
  return {
    width: s,
    height: n,
    x: l,
    y: u
  };
}
function tB(e, t, r) {
  let a;
  if (t === "viewport")
    a = J0e(e, r);
  else if (t === "document")
    a = K0e(N0(e));
  else if (gp(t))
    a = Q0e(t, r);
  else {
    const v = EW(e);
    a = {
      ...t,
      x: t.x - v.x,
      y: t.y - v.y
    };
  }
  return AW(a);
}
function CW(e, t) {
  const r = yg(e);
  return r === t || !gp(r) || Cx(r) ? !1 : yp(r).position === "fixed" || CW(r, t);
}
function eme(e, t) {
  const r = t.get(e);
  if (r)
    return r;
  let a = vw(e, [], !1).filter((n) => gp(n) && Uv(n) !== "body"), v = null;
  const o = yp(e).position === "fixed";
  let s = o ? yg(e) : e;
  for (; gp(s) && !Cx(s); ) {
    const n = yp(s), l = AD(s);
    !l && n.position === "fixed" && (v = null), (o ? !l && !v : !l && n.position === "static" && !!v && ["absolute", "fixed"].includes(v.position) || a4(s) && !l && CW(e, s)) ? a = a.filter((i) => i !== s) : v = n, s = yg(s);
  }
  return t.set(e, a), a;
}
function tme(e) {
  let {
    element: t,
    boundary: r,
    rootBoundary: a,
    strategy: v
  } = e;
  const s = [...r === "clippingAncestors" ? o9(t) ? [] : eme(t, this._c) : [].concat(r), a], n = s[0], l = s.reduce((u, i) => {
    const h = tB(t, i, v);
    return u.top = px(h.top, u.top), u.right = AE(h.right, u.right), u.bottom = AE(h.bottom, u.bottom), u.left = px(h.left, u.left), u;
  }, tB(t, n, v));
  return {
    width: l.right - l.left,
    height: l.bottom - l.top,
    x: l.left,
    y: l.top
  };
}
function nme(e) {
  const {
    width: t,
    height: r
  } = MW(e);
  return {
    width: t,
    height: r
  };
}
function rme(e, t, r) {
  const a = S0(t), v = N0(t), o = r === "fixed", s = vv(e, !0, o, t);
  let n = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const l = gg(0);
  if (a || !a && !o)
    if ((Uv(t) !== "body" || a4(v)) && (n = s9(t)), a) {
      const _ = vv(t, !0, o, t);
      l.x = _.x + t.clientLeft, l.y = _.y + t.clientTop;
    } else v && (l.x = ME(v));
  let u = 0, i = 0;
  if (v && !a && !o) {
    const _ = v.getBoundingClientRect();
    i = _.top + n.scrollTop, u = _.left + n.scrollLeft - // RTL <body> scrollbar.
    ME(v, _);
  }
  const h = s.left + n.scrollLeft - l.x - u, p = s.top + n.scrollTop - l.y - i;
  return {
    x: h,
    y: p,
    width: s.width,
    height: s.height
  };
}
function ES(e) {
  return yp(e).position === "static";
}
function nB(e, t) {
  if (!S0(e) || yp(e).position === "fixed")
    return null;
  if (t)
    return t(e);
  let r = e.offsetParent;
  return N0(e) === r && (r = r.ownerDocument.body), r;
}
function IW(e, t) {
  const r = ed(e);
  if (o9(e))
    return r;
  if (!S0(e)) {
    let v = yg(e);
    for (; v && !Cx(v); ) {
      if (gp(v) && !ES(v))
        return v;
      v = yg(v);
    }
    return r;
  }
  let a = nB(e, t);
  for (; a && H0e(a) && ES(a); )
    a = nB(a, t);
  return a && Cx(a) && ES(a) && !AD(a) ? r : a || G0e(e) || r;
}
const ime = async function(e) {
  const t = this.getOffsetParent || IW, r = this.getDimensions, a = await r(e.floating);
  return {
    reference: rme(e.reference, await t(e.floating), e.strategy),
    floating: {
      x: 0,
      y: 0,
      width: a.width,
      height: a.height
    }
  };
};
function ame(e) {
  return yp(e).direction === "rtl";
}
const ome = {
  convertOffsetParentRelativeRectToViewportRelativeRect: Z0e,
  getDocumentElement: N0,
  getClippingRect: tme,
  getOffsetParent: IW,
  getElementRects: ime,
  getClientRects: X0e,
  getDimensions: nme,
  getScale: mx,
  isElement: gp,
  isRTL: ame
};
function sme(e, t) {
  let r = null, a;
  const v = N0(e);
  function o() {
    var n;
    clearTimeout(a), (n = r) == null || n.disconnect(), r = null;
  }
  function s(n, l) {
    n === void 0 && (n = !1), l === void 0 && (l = 1), o();
    const {
      left: u,
      top: i,
      width: h,
      height: p
    } = e.getBoundingClientRect();
    if (n || t(), !h || !p)
      return;
    const _ = u6(i), d = u6(v.clientWidth - (u + h)), f = u6(v.clientHeight - (i + p)), c = u6(u), m = {
      rootMargin: -_ + "px " + -d + "px " + -f + "px " + -c + "px",
      threshold: px(0, AE(1, l)) || 1
    };
    let x = !0;
    function w(k) {
      const S = k[0].intersectionRatio;
      if (S !== l) {
        if (!x)
          return s();
        S ? s(!1, S) : a = setTimeout(() => {
          s(!1, 1e-7);
        }, 1e3);
      }
      x = !1;
    }
    try {
      r = new IntersectionObserver(w, {
        ...m,
        // Handle <iframe>s
        root: v.ownerDocument
      });
    } catch {
      r = new IntersectionObserver(w, m);
    }
    r.observe(e);
  }
  return s(!0), o;
}
function lme(e, t, r, a) {
  a === void 0 && (a = {});
  const {
    ancestorScroll: v = !0,
    ancestorResize: o = !0,
    elementResize: s = typeof ResizeObserver == "function",
    layoutShift: n = typeof IntersectionObserver == "function",
    animationFrame: l = !1
  } = a, u = MD(e), i = v || o ? [...u ? vw(u) : [], ...vw(t)] : [];
  i.forEach((g) => {
    v && g.addEventListener("scroll", r, {
      passive: !0
    }), o && g.addEventListener("resize", r);
  });
  const h = u && n ? sme(u, r) : null;
  let p = -1, _ = null;
  s && (_ = new ResizeObserver((g) => {
    let [m] = g;
    m && m.target === u && _ && (_.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
      var x;
      (x = _) == null || x.observe(t);
    })), r();
  }), u && !l && _.observe(u), _.observe(t));
  let d, f = l ? vv(e) : null;
  l && c();
  function c() {
    const g = vv(e);
    f && (g.x !== f.x || g.y !== f.y || g.width !== f.width || g.height !== f.height) && r(), f = g, d = requestAnimationFrame(c);
  }
  return r(), () => {
    var g;
    i.forEach((m) => {
      v && m.removeEventListener("scroll", r), o && m.removeEventListener("resize", r);
    }), h == null || h(), (g = _) == null || g.disconnect(), _ = null, l && cancelAnimationFrame(d);
  };
}
const ume = (e, t, r) => {
  const a = /* @__PURE__ */ new Map(), v = {
    platform: ome,
    ...r
  }, o = {
    ...v.platform,
    _c: a
  };
  return q0e(e, t, {
    ...v,
    platform: o
  });
};
function cme(e) {
  return e != null && typeof e == "object" && "$el" in e;
}
function rB(e) {
  if (cme(e)) {
    const t = e.$el;
    return TD(t) && Uv(t) === "#comment" ? null : t;
  }
  return e;
}
function B_(e) {
  return typeof e == "function" ? e() : pg(e);
}
function DW(e) {
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
}
function iB(e, t) {
  const r = DW(e);
  return Math.round(t * r) / r;
}
function fme(e, t, r) {
  r === void 0 && (r = {});
  const a = r.whileElementsMounted, v = Hu(() => {
    var A;
    return (A = B_(r.open)) != null ? A : !0;
  }), o = Hu(() => B_(r.middleware)), s = Hu(() => {
    var A;
    return (A = B_(r.placement)) != null ? A : "bottom";
  }), n = Hu(() => {
    var A;
    return (A = B_(r.strategy)) != null ? A : "absolute";
  }), l = Hu(() => {
    var A;
    return (A = B_(r.transform)) != null ? A : !0;
  }), u = Hu(() => rB(e.value)), i = Hu(() => rB(t.value)), h = Ys(0), p = Ys(0), _ = Ys(n.value), d = Ys(s.value), f = iH({}), c = Ys(!1), g = Hu(() => {
    const A = {
      position: _.value,
      left: "0",
      top: "0"
    };
    if (!i.value)
      return A;
    const C = iB(i.value, h.value), D = iB(i.value, p.value);
    return l.value ? {
      ...A,
      transform: "translate(" + C + "px, " + D + "px)",
      ...DW(i.value) >= 1.5 && {
        willChange: "transform"
      }
    } : {
      position: _.value,
      left: C + "px",
      top: D + "px"
    };
  });
  let m;
  function x() {
    if (u.value == null || i.value == null)
      return;
    const A = v.value;
    ume(u.value, i.value, {
      middleware: o.value,
      placement: s.value,
      strategy: n.value
    }).then((C) => {
      h.value = C.x, p.value = C.y, _.value = C.strategy, d.value = C.placement, f.value = C.middlewareData, c.value = A !== !1;
    });
  }
  function w() {
    typeof m == "function" && (m(), m = void 0);
  }
  function k() {
    if (w(), a === void 0) {
      x();
      return;
    }
    if (u.value != null && i.value != null) {
      m = a(u.value, i.value, x);
      return;
    }
  }
  function S() {
    v.value || (c.value = !1);
  }
  return Dm([o, s, n, v], x, {
    flush: "sync"
  }), Dm([u, i], k, {
    flush: "sync"
  }), Dm(v, S, {
    flush: "sync"
  }), HI() && Bq(w), {
    x: Df(h),
    y: Df(p),
    strategy: Df(_),
    placement: Df(d),
    middlewareData: Df(f),
    isPositioned: Df(c),
    floatingStyles: g,
    update: x
  };
}
const hme = {
  key: 1,
  class: "label"
}, dme = /* @__PURE__ */ Bh({
  __name: "SimpleButton",
  props: {
    label: {},
    icon: {},
    isPrimary: { type: Boolean, default: !1 },
    isInline: { type: Boolean }
  },
  setup(e) {
    const t = e, r = Ys(0), a = Ys(0);
    function v() {
      r.value = JN(3, 0, 300), a.value = JN(3, 0, 300);
    }
    return EH(() => {
      v();
    }), (o, s) => (Va(), ns("button", {
      class: dg(["button", [t.isPrimary ? "primary" : "regular", t.isInline ? "inline" : ""]]),
      onMouseover: v,
      style: hb(`
      --background-offset-x: ${r.value}px;
      --background-offset-y: ${a.value}px;
    `)
    }, [
      t.icon ? (Va(), ns("span", {
        key: 0,
        class: dg([t.icon, "icon"])
      }, null, 2)) : Nc("", !0),
      t.label ? (Va(), ns("span", hme, bd(t.label), 1)) : Nc("", !0)
    ], 38));
  }
}), pme = /* @__PURE__ */ Ap(dme, [["__scopeId", "data-v-9b0ff4b4"]]), mme = /* @__PURE__ */ Bh({
  __name: "DropdownButton",
  props: {
    label: {},
    icon: {},
    isPrimary: { type: Boolean, default: !1 },
    align: { default: "left" },
    isInline: { type: Boolean }
  },
  setup(e) {
    const t = Ys(!1), r = Ys(), a = Ys(), v = Ys(), { floatingStyles: o } = fme(a, v, {
      placement: e.align === "right" ? "bottom-end" : "bottom-start",
      strategy: "fixed",
      whileElementsMounted: lme
    });
    function s(u) {
      r.value && v.value && (!r.value.contains(u.target) || v.value.contains(u.target)) && (t.value = !1);
    }
    function n() {
      r.value && !r.value.checkVisibility({
        opacityProperty: !0,
        contentVisibilityAuto: !0,
        visibilityProperty: !0
      }) && (t.value = !1);
    }
    const l = new IntersectionObserver(
      ([u]) => {
        u.isIntersecting || (t.value = !1);
      },
      {
        root: document.body,
        threshold: 0
      }
    );
    return mb(() => {
      document.addEventListener("click", s), document.addEventListener("mousemove", n), r.value && l.observe(r.value);
    }), gb(() => {
      document.removeEventListener("click", s), document.removeEventListener("mousemove", n), l.disconnect();
    }), (u, i) => (Va(), ns("div", {
      class: dg(["dropdown", { "align-right": u.align === "right" }]),
      ref_key: "el",
      ref: r
    }, [
      Iu(pme, {
        "is-primary": u.isPrimary,
        label: u.label,
        icon: u.icon,
        "is-inline": u.isInline,
        onClick: i[0] || (i[0] = (h) => t.value = !t.value),
        ref_key: "reference",
        ref: a
      }, null, 8, ["is-primary", "label", "icon", "is-inline"]),
      Iu(xle, { name: "fade" }, {
        default: pb(() => [
          t.value ? (Va(), ns("div", {
            key: 0,
            class: "items",
            ref_key: "floating",
            ref: v,
            style: hb(pg(o))
          }, [
            IH(u.$slots, "default", {}, void 0, !0)
          ], 4)) : Nc("", !0)
        ]),
        _: 3
      })
    ], 2));
  }
}), gme = /* @__PURE__ */ Ap(mme, [["__scopeId", "data-v-2f9df7da"]]), yme = { class: "dropdown-item" }, vme = {
  key: 1,
  class: "label"
}, xme = /* @__PURE__ */ Bh({
  __name: "DropdownButtonItem",
  props: {
    label: {},
    icon: {}
  },
  setup(e) {
    const t = e;
    return (r, a) => (Va(), ns("button", yme, [
      t.icon ? (Va(), ns("span", {
        key: 0,
        class: dg([t.icon, "icon"])
      }, null, 2)) : Nc("", !0),
      t.label ? (Va(), ns("span", vme, bd(t.label), 1)) : Nc("", !0)
    ]));
  }
}), bme = /* @__PURE__ */ Ap(xme, [["__scopeId", "data-v-b4bb3b25"]]), _me = { class: "card" }, wme = { class: "header" }, kme = { class: "titles" }, Tme = { class: "title" }, Ame = {
  key: 0,
  class: "subtitle"
}, Sme = {
  key: 0,
  class: "actions"
}, Mme = { class: "content" }, Eme = /* @__PURE__ */ Bh({
  __name: "ProjectViewCard",
  props: {
    title: {},
    subtitle: {},
    showActions: { type: Boolean }
  },
  emits: ["cardRemoved"],
  setup(e, { emit: t }) {
    const r = e, a = t;
    return (v, o) => (Va(), ns("div", _me, [
      ql("div", wme, [
        ql("div", kme, [
          ql("div", Tme, bd(r.title), 1),
          r.subtitle ? (Va(), ns("div", Ame, bd(r.subtitle), 1)) : Nc("", !0)
        ]),
        r.showActions ? (Va(), ns("div", Sme, [
          Iu(gme, {
            icon: "icon-more",
            align: "right"
          }, {
            default: pb(() => [
              Iu(bme, {
                label: "Remove from view",
                icon: "icon-trash",
                onClick: o[0] || (o[0] = (s) => a("cardRemoved"))
              })
            ]),
            _: 1
          })
        ])) : Nc("", !0)
      ]),
      o[1] || (o[1] = ql("hr", null, null, -1)),
      ql("div", Mme, [
        IH(v.$slots, "default", {}, void 0)
      ])
    ]));
  }
}), Cme = /* @__PURE__ */ Ap(Eme, [["__scopeId", "data-v-5847316f"]]);
function jh(e, t, r) {
  return e.fields = t || [], e.fname = r, e;
}
function Lu(e) {
  return e == null ? null : e.fname;
}
function Ff(e) {
  return e == null ? null : e.fields;
}
function LW(e) {
  return e.length === 1 ? Ime(e[0]) : Dme(e);
}
const Ime = (e) => function(t) {
  return t[e];
}, Dme = (e) => {
  const t = e.length;
  return function(r) {
    for (let a = 0; a < t; ++a)
      r = r[e[a]];
    return r;
  };
};
function Jr(e) {
  throw Error(e);
}
function B0(e) {
  const t = [], r = e.length;
  let a = null, v = 0, o = "", s, n, l;
  e = e + "";
  function u() {
    t.push(o + e.substring(s, n)), o = "", s = n + 1;
  }
  for (s = n = 0; n < r; ++n)
    if (l = e[n], l === "\\")
      o += e.substring(s, n++), s = n;
    else if (l === a)
      u(), a = null, v = -1;
    else {
      if (a)
        continue;
      s === v && l === '"' || s === v && l === "'" ? (s = n + 1, a = l) : l === "." && !v ? n > s ? u() : s = n + 1 : l === "[" ? (n > s && u(), v = s = n + 1) : l === "]" && (v || Jr("Access path missing open bracket: " + e), v > 0 && u(), v = 0, s = n + 1);
    }
  return v && Jr("Access path missing closing bracket: " + e), a && Jr("Access path missing closing quote: " + e), n > s && (n++, u()), t;
}
function Dd(e, t, r) {
  const a = B0(e);
  return e = a.length === 1 ? a[0] : e, jh((r && r.get || LW)(a), [e], t || e);
}
const o4 = Dd("id"), Uf = jh((e) => e, [], "identity"), W1 = jh(() => 0, [], "zero"), vb = jh(() => 1, [], "one"), Ld = jh(() => !0, [], "true"), L1 = jh(() => !1, [], "false");
function Lme(e, t, r) {
  const a = [t].concat([].slice.call(r));
  console[e].apply(console, a);
}
const PW = 0, ED = 1, CD = 2, OW = 3, zW = 4;
function ID(e, t) {
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Lme, a = e || PW;
  return {
    level(v) {
      return arguments.length ? (a = +v, this) : a;
    },
    error() {
      return a >= ED && r(t || "error", "ERROR", arguments), this;
    },
    warn() {
      return a >= CD && r(t || "warn", "WARN", arguments), this;
    },
    info() {
      return a >= OW && r(t || "log", "INFO", arguments), this;
    },
    debug() {
      return a >= zW && r(t || "log", "DEBUG", arguments), this;
    }
  };
}
var Qr = Array.isArray;
function Oi(e) {
  return e === Object(e);
}
const aB = (e) => e !== "__proto__";
function xb() {
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
    t[r] = arguments[r];
  return t.reduce((a, v) => {
    for (const o in v)
      if (o === "signals")
        a.signals = Pme(a.signals, v.signals);
      else {
        const s = o === "legend" ? {
          layout: 1
        } : o === "style" ? !0 : null;
        bb(a, o, v[o], s);
      }
    return a;
  }, {});
}
function bb(e, t, r, a) {
  if (!aB(t)) return;
  let v, o;
  if (Oi(r) && !Qr(r)) {
    o = Oi(e[t]) ? e[t] : e[t] = {};
    for (v in r)
      a && (a === !0 || a[v]) ? bb(o, v, r[v]) : aB(v) && (o[v] = r[v]);
  } else
    e[t] = r;
}
function Pme(e, t) {
  if (e == null) return t;
  const r = {}, a = [];
  function v(o) {
    r[o.name] || (r[o.name] = 1, a.push(o));
  }
  return t.forEach(v), e.forEach(v), a;
}
function mo(e) {
  return e[e.length - 1];
}
function Of(e) {
  return e == null || e === "" ? null : +e;
}
const RW = (e) => (t) => e * Math.exp(t), FW = (e) => (t) => Math.log(e * t), NW = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), BW = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, r7 = (e) => (t) => t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
function l9(e, t, r, a) {
  const v = r(e[0]), o = r(mo(e)), s = (o - v) * t;
  return [a(v - s), a(o - s)];
}
function jW(e, t) {
  return l9(e, t, Of, Uf);
}
function UW(e, t) {
  var r = Math.sign(e[0]);
  return l9(e, t, FW(r), RW(r));
}
function VW(e, t, r) {
  return l9(e, t, r7(r), r7(1 / r));
}
function $W(e, t, r) {
  return l9(e, t, NW(r), BW(r));
}
function u9(e, t, r, a, v) {
  const o = a(e[0]), s = a(mo(e)), n = t != null ? a(t) : (o + s) / 2;
  return [v(n + (o - n) * r), v(n + (s - n) * r)];
}
function DD(e, t, r) {
  return u9(e, t, r, Of, Uf);
}
function LD(e, t, r) {
  const a = Math.sign(e[0]);
  return u9(e, t, r, FW(a), RW(a));
}
function i7(e, t, r, a) {
  return u9(e, t, r, r7(a), r7(1 / a));
}
function PD(e, t, r, a) {
  return u9(e, t, r, NW(a), BW(a));
}
function qW(e) {
  return 1 + ~~(new Date(e).getMonth() / 3);
}
function HW(e) {
  return 1 + ~~(new Date(e).getUTCMonth() / 3);
}
function Ri(e) {
  return e != null ? Qr(e) ? e : [e] : [];
}
function GW(e, t, r) {
  let a = e[0], v = e[1], o;
  return v < a && (o = v, v = a, a = o), o = v - a, o >= r - t ? [t, r] : [a = Math.min(Math.max(a, t), r - o), a + o];
}
function qa(e) {
  return typeof e == "function";
}
const Ome = "descending";
function OD(e, t, r) {
  r = r || {}, t = Ri(t) || [];
  const a = [], v = [], o = {}, s = r.comparator || zme;
  return Ri(e).forEach((n, l) => {
    n != null && (a.push(t[l] === Ome ? -1 : 1), v.push(n = qa(n) ? n : Dd(n, null, r)), (Ff(n) || []).forEach((u) => o[u] = 1));
  }), v.length === 0 ? null : jh(s(v, a), Object.keys(o));
}
const c9 = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, (e = e instanceof Date ? +e : e) !== e && t === t ? -1 : t !== t && e === e ? 1 : 0), zme = (e, t) => e.length === 1 ? Rme(e[0], t[0]) : Fme(e, t, e.length), Rme = (e, t) => function(r, a) {
  return c9(e(r), e(a)) * t;
}, Fme = (e, t, r) => (t.push(0), function(a, v) {
  let o, s = 0, n = -1;
  for (; s === 0 && ++n < r; )
    o = e[n], s = c9(o(a), o(v));
  return s * t[n];
});
function Vf(e) {
  return qa(e) ? e : () => e;
}
function zD(e, t) {
  let r;
  return (a) => {
    r && clearTimeout(r), r = setTimeout(() => (t(a), r = null), e);
  };
}
function $a(e) {
  for (let t, r, a = 1, v = arguments.length; a < v; ++a) {
    t = arguments[a];
    for (r in t)
      e[r] = t[r];
  }
  return e;
}
function M0(e, t) {
  let r = 0, a, v, o, s;
  if (e && (a = e.length))
    if (t == null) {
      for (v = e[r]; r < a && (v == null || v !== v); v = e[++r]) ;
      for (o = s = v; r < a; ++r)
        v = e[r], v != null && (v < o && (o = v), v > s && (s = v));
    } else {
      for (v = t(e[r]); r < a && (v == null || v !== v); v = t(e[++r])) ;
      for (o = s = v; r < a; ++r)
        v = t(e[r]), v != null && (v < o && (o = v), v > s && (s = v));
    }
  return [o, s];
}
function WW(e, t) {
  const r = e.length;
  let a = -1, v, o, s, n, l;
  if (t == null) {
    for (; ++a < r; )
      if (o = e[a], o != null && o >= o) {
        v = s = o;
        break;
      }
    if (a === r) return [-1, -1];
    for (n = l = a; ++a < r; )
      o = e[a], o != null && (v > o && (v = o, n = a), s < o && (s = o, l = a));
  } else {
    for (; ++a < r; )
      if (o = t(e[a], a, e), o != null && o >= o) {
        v = s = o;
        break;
      }
    if (a === r) return [-1, -1];
    for (n = l = a; ++a < r; )
      o = t(e[a], a, e), o != null && (v > o && (v = o, n = a), s < o && (s = o, l = a));
  }
  return [n, l];
}
const Nme = Object.prototype.hasOwnProperty;
function ua(e, t) {
  return Nme.call(e, t);
}
const c6 = {};
function _b(e) {
  let t = {}, r;
  function a(o) {
    return ua(t, o) && t[o] !== c6;
  }
  const v = {
    size: 0,
    empty: 0,
    object: t,
    has: a,
    get(o) {
      return a(o) ? t[o] : void 0;
    },
    set(o, s) {
      return a(o) || (++v.size, t[o] === c6 && --v.empty), t[o] = s, this;
    },
    delete(o) {
      return a(o) && (--v.size, ++v.empty, t[o] = c6), this;
    },
    clear() {
      v.size = v.empty = 0, v.object = t = {};
    },
    test(o) {
      return arguments.length ? (r = o, v) : r;
    },
    clean() {
      const o = {};
      let s = 0;
      for (const n in t) {
        const l = t[n];
        l !== c6 && (!r || !r(l)) && (o[n] = l, ++s);
      }
      v.size = s, v.empty = 0, v.object = t = o;
    }
  };
  return e && Object.keys(e).forEach((o) => {
    v.set(o, e[o]);
  }), v;
}
function YW(e, t, r, a, v, o) {
  if (!r && r !== 0) return o;
  const s = +r;
  let n = e[0], l = mo(e), u;
  l < n && (u = n, n = l, l = u), u = Math.abs(t - n);
  const i = Math.abs(l - t);
  return u < i && u <= s ? a : i <= s ? v : o;
}
function Si(e, t, r) {
  const a = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(a, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), $a(a, r);
}
function rx(e, t, r, a) {
  let v = t[0], o = t[t.length - 1], s;
  return v > o && (s = v, v = o, o = s), r = r === void 0 || r, a = a === void 0 || a, (r ? v <= e : v < e) && (a ? e <= o : e < o);
}
function Rg(e) {
  return typeof e == "boolean";
}
function sg(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function ZW(e) {
  return e && qa(e[Symbol.iterator]);
}
function Ro(e) {
  return typeof e == "number";
}
function XW(e) {
  return Object.prototype.toString.call(e) === "[object RegExp]";
}
function Fi(e) {
  return typeof e == "string";
}
function RD(e, t, r) {
  e && (e = t ? Ri(e).map((n) => n.replace(/\\(.)/g, "$1")) : Ri(e));
  const a = e && e.length, v = r && r.get || LW, o = (n) => v(t ? [n] : B0(n));
  let s;
  if (!a)
    s = function() {
      return "";
    };
  else if (a === 1) {
    const n = o(e[0]);
    s = function(l) {
      return "" + n(l);
    };
  } else {
    const n = e.map(o);
    s = function(l) {
      let u = "" + n[0](l), i = 0;
      for (; ++i < a; ) u += "|" + n[i](l);
      return u;
    };
  }
  return jh(s, e, "key");
}
function KW(e, t) {
  const r = e[0], a = mo(e), v = +t;
  return v ? v === 1 ? a : r + v * (a - r) : r;
}
const Bme = 1e4;
function JW(e) {
  e = +e || Bme;
  let t, r, a;
  const v = () => {
    t = {}, r = {}, a = 0;
  }, o = (s, n) => (++a > e && (r = t, t = {}, a = 1), t[s] = n);
  return v(), {
    clear: v,
    has: (s) => ua(t, s) || ua(r, s),
    get: (s) => ua(t, s) ? t[s] : ua(r, s) ? o(s, r[s]) : void 0,
    set: (s, n) => ua(t, s) ? t[s] = n : o(s, n)
  };
}
function QW(e, t, r, a) {
  const v = t.length, o = r.length;
  if (!o) return t;
  if (!v) return r;
  const s = a || new t.constructor(v + o);
  let n = 0, l = 0, u = 0;
  for (; n < v && l < o; ++u)
    s[u] = e(t[n], r[l]) > 0 ? r[l++] : t[n++];
  for (; n < v; ++n, ++u)
    s[u] = t[n];
  for (; l < o; ++l, ++u)
    s[u] = r[l];
  return s;
}
function p3(e, t) {
  let r = "";
  for (; --t >= 0; ) r += e;
  return r;
}
function eY(e, t, r, a) {
  const v = r || " ", o = e + "", s = t - o.length;
  return s <= 0 ? o : a === "left" ? p3(v, s) + o : a === "center" ? p3(v, ~~(s / 2)) + o + p3(v, Math.ceil(s / 2)) : o + p3(v, s);
}
function s4(e) {
  return e && mo(e) - e[0] || 0;
}
function vi(e) {
  return Qr(e) ? "[" + e.map(vi) + "]" : Oi(e) || Fi(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function FD(e) {
  return e == null || e === "" ? null : !e || e === "false" || e === "0" ? !1 : !!e;
}
const jme = (e) => Ro(e) || sg(e) ? e : Date.parse(e);
function ND(e, t) {
  return t = t || jme, e == null || e === "" ? null : t(e);
}
function BD(e) {
  return e == null || e === "" ? null : e + "";
}
function vp(e) {
  const t = {}, r = e.length;
  for (let a = 0; a < r; ++a) t[e[a]] = !0;
  return t;
}
function tY(e, t, r, a) {
  const v = a ?? "…", o = e + "", s = o.length, n = Math.max(0, t - v.length);
  return s <= t ? o : r === "left" ? v + o.slice(s - n) : r === "center" ? o.slice(0, Math.ceil(n / 2)) + v + o.slice(s - ~~(n / 2)) : o.slice(0, n) + v;
}
function B1(e, t, r) {
  if (e)
    if (t) {
      const a = e.length;
      for (let v = 0; v < a; ++v) {
        const o = t(e[v]);
        o && r(o, v, e);
      }
    } else
      e.forEach(r);
}
var oB = {}, CS = {}, IS = 34, j_ = 10, DS = 13;
function nY(e) {
  return new Function("d", "return {" + e.map(function(t, r) {
    return JSON.stringify(t) + ": d[" + r + '] || ""';
  }).join(",") + "}");
}
function Ume(e, t) {
  var r = nY(e);
  return function(a, v) {
    return t(r(a), v, e);
  };
}
function sB(e) {
  var t = /* @__PURE__ */ Object.create(null), r = [];
  return e.forEach(function(a) {
    for (var v in a)
      v in t || r.push(t[v] = v);
  }), r;
}
function Th(e, t) {
  var r = e + "", a = r.length;
  return a < t ? new Array(t - a + 1).join(0) + r : r;
}
function Vme(e) {
  return e < 0 ? "-" + Th(-e, 6) : e > 9999 ? "+" + Th(e, 6) : Th(e, 4);
}
function $me(e) {
  var t = e.getUTCHours(), r = e.getUTCMinutes(), a = e.getUTCSeconds(), v = e.getUTCMilliseconds();
  return isNaN(e) ? "Invalid Date" : Vme(e.getUTCFullYear()) + "-" + Th(e.getUTCMonth() + 1, 2) + "-" + Th(e.getUTCDate(), 2) + (v ? "T" + Th(t, 2) + ":" + Th(r, 2) + ":" + Th(a, 2) + "." + Th(v, 3) + "Z" : a ? "T" + Th(t, 2) + ":" + Th(r, 2) + ":" + Th(a, 2) + "Z" : r || t ? "T" + Th(t, 2) + ":" + Th(r, 2) + "Z" : "");
}
function qme(e) {
  var t = new RegExp('["' + e + `
\r]`), r = e.charCodeAt(0);
  function a(h, p) {
    var _, d, f = v(h, function(c, g) {
      if (_) return _(c, g - 1);
      d = c, _ = p ? Ume(c, p) : nY(c);
    });
    return f.columns = d || [], f;
  }
  function v(h, p) {
    var _ = [], d = h.length, f = 0, c = 0, g, m = d <= 0, x = !1;
    h.charCodeAt(d - 1) === j_ && --d, h.charCodeAt(d - 1) === DS && --d;
    function w() {
      if (m) return CS;
      if (x) return x = !1, oB;
      var S, A = f, C;
      if (h.charCodeAt(A) === IS) {
        for (; f++ < d && h.charCodeAt(f) !== IS || h.charCodeAt(++f) === IS; ) ;
        return (S = f) >= d ? m = !0 : (C = h.charCodeAt(f++)) === j_ ? x = !0 : C === DS && (x = !0, h.charCodeAt(f) === j_ && ++f), h.slice(A + 1, S - 1).replace(/""/g, '"');
      }
      for (; f < d; ) {
        if ((C = h.charCodeAt(S = f++)) === j_) x = !0;
        else if (C === DS)
          x = !0, h.charCodeAt(f) === j_ && ++f;
        else if (C !== r) continue;
        return h.slice(A, S);
      }
      return m = !0, h.slice(A, d);
    }
    for (; (g = w()) !== CS; ) {
      for (var k = []; g !== oB && g !== CS; ) k.push(g), g = w();
      p && (k = p(k, c++)) == null || _.push(k);
    }
    return _;
  }
  function o(h, p) {
    return h.map(function(_) {
      return p.map(function(d) {
        return i(_[d]);
      }).join(e);
    });
  }
  function s(h, p) {
    return p == null && (p = sB(h)), [p.map(i).join(e)].concat(o(h, p)).join(`
`);
  }
  function n(h, p) {
    return p == null && (p = sB(h)), o(h, p).join(`
`);
  }
  function l(h) {
    return h.map(u).join(`
`);
  }
  function u(h) {
    return h.map(i).join(e);
  }
  function i(h) {
    return h == null ? "" : h instanceof Date ? $me(h) : t.test(h += "") ? '"' + h.replace(/"/g, '""') + '"' : h;
  }
  return {
    parse: a,
    parseRows: v,
    format: s,
    formatBody: n,
    formatRows: l,
    formatRow: u,
    formatValue: i
  };
}
function Hme(e) {
  return e;
}
function Gme(e) {
  if (e == null) return Hme;
  var t, r, a = e.scale[0], v = e.scale[1], o = e.translate[0], s = e.translate[1];
  return function(n, l) {
    l || (t = r = 0);
    var u = 2, i = n.length, h = new Array(i);
    for (h[0] = (t += n[0]) * a + o, h[1] = (r += n[1]) * v + s; u < i; ) h[u] = n[u], ++u;
    return h;
  };
}
function Wme(e, t) {
  for (var r, a = e.length, v = a - t; v < --a; ) r = e[v], e[v++] = e[a], e[a] = r;
}
function Yme(e, t) {
  return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? { type: "FeatureCollection", features: t.geometries.map(function(r) {
    return lB(e, r);
  }) } : lB(e, t);
}
function lB(e, t) {
  var r = t.id, a = t.bbox, v = t.properties == null ? {} : t.properties, o = rY(e, t);
  return r == null && a == null ? { type: "Feature", properties: v, geometry: o } : a == null ? { type: "Feature", id: r, properties: v, geometry: o } : { type: "Feature", id: r, bbox: a, properties: v, geometry: o };
}
function rY(e, t) {
  var r = Gme(e.transform), a = e.arcs;
  function v(i, h) {
    h.length && h.pop();
    for (var p = a[i < 0 ? ~i : i], _ = 0, d = p.length; _ < d; ++_)
      h.push(r(p[_], _));
    i < 0 && Wme(h, d);
  }
  function o(i) {
    return r(i);
  }
  function s(i) {
    for (var h = [], p = 0, _ = i.length; p < _; ++p) v(i[p], h);
    return h.length < 2 && h.push(h[0]), h;
  }
  function n(i) {
    for (var h = s(i); h.length < 4; ) h.push(h[0]);
    return h;
  }
  function l(i) {
    return i.map(n);
  }
  function u(i) {
    var h = i.type, p;
    switch (h) {
      case "GeometryCollection":
        return { type: h, geometries: i.geometries.map(u) };
      case "Point":
        p = o(i.coordinates);
        break;
      case "MultiPoint":
        p = i.coordinates.map(o);
        break;
      case "LineString":
        p = s(i.arcs);
        break;
      case "MultiLineString":
        p = i.arcs.map(s);
        break;
      case "Polygon":
        p = l(i.arcs);
        break;
      case "MultiPolygon":
        p = i.arcs.map(l);
        break;
      default:
        return null;
    }
    return { type: h, coordinates: p };
  }
  return u(t);
}
function Zme(e, t) {
  var r = {}, a = {}, v = {}, o = [], s = -1;
  t.forEach(function(u, i) {
    var h = e.arcs[u < 0 ? ~u : u], p;
    h.length < 3 && !h[1][0] && !h[1][1] && (p = t[++s], t[s] = u, t[i] = p);
  }), t.forEach(function(u) {
    var i = n(u), h = i[0], p = i[1], _, d;
    if (_ = v[h])
      if (delete v[_.end], _.push(u), _.end = p, d = a[p]) {
        delete a[d.start];
        var f = d === _ ? _ : _.concat(d);
        a[f.start = _.start] = v[f.end = d.end] = f;
      } else
        a[_.start] = v[_.end] = _;
    else if (_ = a[p])
      if (delete a[_.start], _.unshift(u), _.start = h, d = v[h]) {
        delete v[d.end];
        var c = d === _ ? _ : d.concat(_);
        a[c.start = d.start] = v[c.end = _.end] = c;
      } else
        a[_.start] = v[_.end] = _;
    else
      _ = [u], a[_.start = h] = v[_.end = p] = _;
  });
  function n(u) {
    var i = e.arcs[u < 0 ? ~u : u], h = i[0], p;
    return e.transform ? (p = [0, 0], i.forEach(function(_) {
      p[0] += _[0], p[1] += _[1];
    })) : p = i[i.length - 1], u < 0 ? [p, h] : [h, p];
  }
  function l(u, i) {
    for (var h in u) {
      var p = u[h];
      delete i[p.start], delete p.start, delete p.end, p.forEach(function(_) {
        r[_ < 0 ? ~_ : _] = 1;
      }), o.push(p);
    }
  }
  return l(v, a), l(a, v), t.forEach(function(u) {
    r[u < 0 ? ~u : u] || o.push([u]);
  }), o;
}
function Xme(e) {
  return rY(e, Kme.apply(this, arguments));
}
function Kme(e, t, r) {
  var a, v, o;
  if (arguments.length > 1) a = Jme(e, t, r);
  else for (v = 0, a = new Array(o = e.arcs.length); v < o; ++v) a[v] = v;
  return { type: "MultiLineString", arcs: Zme(e, a) };
}
function Jme(e, t, r) {
  var a = [], v = [], o;
  function s(h) {
    var p = h < 0 ? ~h : h;
    (v[p] || (v[p] = [])).push({ i: h, g: o });
  }
  function n(h) {
    h.forEach(s);
  }
  function l(h) {
    h.forEach(n);
  }
  function u(h) {
    h.forEach(l);
  }
  function i(h) {
    switch (o = h, h.type) {
      case "GeometryCollection":
        h.geometries.forEach(i);
        break;
      case "LineString":
        n(h.arcs);
        break;
      case "MultiLineString":
      case "Polygon":
        l(h.arcs);
        break;
      case "MultiPolygon":
        u(h.arcs);
        break;
    }
  }
  return i(t), v.forEach(r == null ? function(h) {
    a.push(h[0].i);
  } : function(h) {
    r(h[0].g, h[h.length - 1].g) && a.push(h[0].i);
  }), a;
}
function Pm(e, t) {
  return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
function Qme(e, t) {
  return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function wb(e) {
  let t, r, a;
  e.length !== 2 ? (t = Pm, r = (n, l) => Pm(e(n), l), a = (n, l) => e(n) - l) : (t = e === Pm || e === Qme ? e : e1e, r = e, a = e);
  function v(n, l, u = 0, i = n.length) {
    if (u < i) {
      if (t(l, l) !== 0) return i;
      do {
        const h = u + i >>> 1;
        r(n[h], l) < 0 ? u = h + 1 : i = h;
      } while (u < i);
    }
    return u;
  }
  function o(n, l, u = 0, i = n.length) {
    if (u < i) {
      if (t(l, l) !== 0) return i;
      do {
        const h = u + i >>> 1;
        r(n[h], l) <= 0 ? u = h + 1 : i = h;
      } while (u < i);
    }
    return u;
  }
  function s(n, l, u = 0, i = n.length) {
    const h = v(n, l, u, i - 1);
    return h > u && a(n[h - 1], l) > -a(n[h], l) ? h - 1 : h;
  }
  return { left: v, center: s, right: o };
}
function e1e() {
  return 0;
}
function iY(e) {
  return e === null ? NaN : +e;
}
function* t1e(e, t) {
  if (t === void 0)
    for (let r of e)
      r != null && (r = +r) >= r && (yield r);
  else {
    let r = -1;
    for (let a of e)
      (a = t(a, ++r, e)) != null && (a = +a) >= a && (yield a);
  }
}
const aY = wb(Pm), vg = aY.right, n1e = aY.left;
wb(iY).center;
function r1e(e, t) {
  let r = 0, a, v = 0, o = 0;
  if (t === void 0)
    for (let s of e)
      s != null && (s = +s) >= s && (a = s - v, v += a / ++r, o += a * (s - v));
  else {
    let s = -1;
    for (let n of e)
      (n = t(n, ++s, e)) != null && (n = +n) >= n && (a = n - v, v += a / ++r, o += a * (n - v));
  }
  if (r > 1) return o / (r - 1);
}
function i1e(e, t) {
  const r = r1e(e, t);
  return r && Math.sqrt(r);
}
class lh {
  constructor() {
    this._partials = new Float64Array(32), this._n = 0;
  }
  add(t) {
    const r = this._partials;
    let a = 0;
    for (let v = 0; v < this._n && v < 32; v++) {
      const o = r[v], s = t + o, n = Math.abs(t) < Math.abs(o) ? t - (s - o) : o - (s - t);
      n && (r[a++] = n), t = s;
    }
    return r[a] = t, this._n = a + 1, this;
  }
  valueOf() {
    const t = this._partials;
    let r = this._n, a, v, o, s = 0;
    if (r > 0) {
      for (s = t[--r]; r > 0 && (a = s, v = t[--r], s = a + v, o = v - (s - a), !o); )
        ;
      r > 0 && (o < 0 && t[r - 1] < 0 || o > 0 && t[r - 1] > 0) && (v = o * 2, a = s + v, v == a - s && (s = a));
    }
    return s;
  }
}
class uB extends Map {
  constructor(t, r = lY) {
    if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const [a, v] of t) this.set(a, v);
  }
  get(t) {
    return super.get(EE(this, t));
  }
  has(t) {
    return super.has(EE(this, t));
  }
  set(t, r) {
    return super.set(oY(this, t), r);
  }
  delete(t) {
    return super.delete(sY(this, t));
  }
}
class a7 extends Set {
  constructor(t, r = lY) {
    if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null) for (const a of t) this.add(a);
  }
  has(t) {
    return super.has(EE(this, t));
  }
  add(t) {
    return super.add(oY(this, t));
  }
  delete(t) {
    return super.delete(sY(this, t));
  }
}
function EE({ _intern: e, _key: t }, r) {
  const a = t(r);
  return e.has(a) ? e.get(a) : r;
}
function oY({ _intern: e, _key: t }, r) {
  const a = t(r);
  return e.has(a) ? e.get(a) : (e.set(a, r), r);
}
function sY({ _intern: e, _key: t }, r) {
  const a = t(r);
  return e.has(a) && (r = e.get(a), e.delete(a)), r;
}
function lY(e) {
  return e !== null && typeof e == "object" ? e.valueOf() : e;
}
function a1e(e, t) {
  return Array.from(t, (r) => e[r]);
}
function o1e(e = Pm) {
  if (e === Pm) return uY;
  if (typeof e != "function") throw new TypeError("compare is not a function");
  return (t, r) => {
    const a = e(t, r);
    return a || a === 0 ? a : (e(r, r) === 0) - (e(t, t) === 0);
  };
}
function uY(e, t) {
  return (e == null || !(e >= e)) - (t == null || !(t >= t)) || (e < t ? -1 : e > t ? 1 : 0);
}
const s1e = Math.sqrt(50), l1e = Math.sqrt(10), u1e = Math.sqrt(2);
function o7(e, t, r) {
  const a = (t - e) / Math.max(0, r), v = Math.floor(Math.log10(a)), o = a / Math.pow(10, v), s = o >= s1e ? 10 : o >= l1e ? 5 : o >= u1e ? 2 : 1;
  let n, l, u;
  return v < 0 ? (u = Math.pow(10, -v) / s, n = Math.round(e * u), l = Math.round(t * u), n / u < e && ++n, l / u > t && --l, u = -u) : (u = Math.pow(10, v) * s, n = Math.round(e / u), l = Math.round(t / u), n * u < e && ++n, l * u > t && --l), l < n && 0.5 <= r && r < 2 ? o7(e, t, r * 2) : [n, l, u];
}
function CE(e, t, r) {
  if (t = +t, e = +e, r = +r, !(r > 0)) return [];
  if (e === t) return [e];
  const a = t < e, [v, o, s] = a ? o7(t, e, r) : o7(e, t, r);
  if (!(o >= v)) return [];
  const n = o - v + 1, l = new Array(n);
  if (a)
    if (s < 0) for (let u = 0; u < n; ++u) l[u] = (o - u) / -s;
    else for (let u = 0; u < n; ++u) l[u] = (o - u) * s;
  else if (s < 0) for (let u = 0; u < n; ++u) l[u] = (v + u) / -s;
  else for (let u = 0; u < n; ++u) l[u] = (v + u) * s;
  return l;
}
function IE(e, t, r) {
  return t = +t, e = +e, r = +r, o7(e, t, r)[2];
}
function xg(e, t, r) {
  t = +t, e = +e, r = +r;
  const a = t < e, v = a ? IE(t, e, r) : IE(e, t, r);
  return (a ? -1 : 1) * (v < 0 ? 1 / -v : v);
}
function av(e, t) {
  let r;
  if (t === void 0)
    for (const a of e)
      a != null && (r < a || r === void 0 && a >= a) && (r = a);
  else {
    let a = -1;
    for (let v of e)
      (v = t(v, ++a, e)) != null && (r < v || r === void 0 && v >= v) && (r = v);
  }
  return r;
}
function DE(e, t) {
  let r;
  if (t === void 0)
    for (const a of e)
      a != null && (r > a || r === void 0 && a >= a) && (r = a);
  else {
    let a = -1;
    for (let v of e)
      (v = t(v, ++a, e)) != null && (r > v || r === void 0 && v >= v) && (r = v);
  }
  return r;
}
function cY(e, t, r = 0, a = 1 / 0, v) {
  if (t = Math.floor(t), r = Math.floor(Math.max(0, r)), a = Math.floor(Math.min(e.length - 1, a)), !(r <= t && t <= a)) return e;
  for (v = v === void 0 ? uY : o1e(v); a > r; ) {
    if (a - r > 600) {
      const l = a - r + 1, u = t - r + 1, i = Math.log(l), h = 0.5 * Math.exp(2 * i / 3), p = 0.5 * Math.sqrt(i * h * (l - h) / l) * (u - l / 2 < 0 ? -1 : 1), _ = Math.max(r, Math.floor(t - u * h / l + p)), d = Math.min(a, Math.floor(t + (l - u) * h / l + p));
      cY(e, t, _, d, v);
    }
    const o = e[t];
    let s = r, n = a;
    for (U_(e, r, t), v(e[a], o) > 0 && U_(e, r, a); s < n; ) {
      for (U_(e, s, n), ++s, --n; v(e[s], o) < 0; ) ++s;
      for (; v(e[n], o) > 0; ) --n;
    }
    v(e[r], o) === 0 ? U_(e, r, n) : (++n, U_(e, n, a)), n <= t && (r = n + 1), t <= n && (a = n - 1);
  }
  return e;
}
function U_(e, t, r) {
  const a = e[t];
  e[t] = e[r], e[r] = a;
}
function LE(e, t, r) {
  if (e = Float64Array.from(t1e(e, r)), !(!(a = e.length) || isNaN(t = +t))) {
    if (t <= 0 || a < 2) return DE(e);
    if (t >= 1) return av(e);
    var a, v = (a - 1) * t, o = Math.floor(v), s = av(cY(e, o).subarray(0, o + 1)), n = DE(e.subarray(o + 1));
    return s + (n - s) * (v - o);
  }
}
function fY(e, t, r = iY) {
  if (!(!(a = e.length) || isNaN(t = +t))) {
    if (t <= 0 || a < 2) return +r(e[0], 0, e);
    if (t >= 1) return +r(e[a - 1], a - 1, e);
    var a, v = (a - 1) * t, o = Math.floor(v), s = +r(e[o], o, e), n = +r(e[o + 1], o + 1, e);
    return s + (n - s) * (v - o);
  }
}
function c1e(e, t) {
  let r = 0, a = 0;
  if (t === void 0)
    for (let v of e)
      v != null && (v = +v) >= v && (++r, a += v);
  else {
    let v = -1;
    for (let o of e)
      (o = t(o, ++v, e)) != null && (o = +o) >= o && (++r, a += o);
  }
  if (r) return a / r;
}
function hY(e, t) {
  return LE(e, 0.5, t);
}
function* f1e(e) {
  for (const t of e)
    yield* t;
}
function dY(e) {
  return Array.from(f1e(e));
}
function Kh(e, t, r) {
  e = +e, t = +t, r = (v = arguments.length) < 2 ? (t = e, e = 0, 1) : v < 3 ? 1 : +r;
  for (var a = -1, v = Math.max(0, Math.ceil((t - e) / r)) | 0, o = new Array(v); ++a < v; )
    o[a] = e + a * r;
  return o;
}
function pY(e, t) {
  let r = 0;
  for (let a of e)
    (a = +a) && (r += a);
  return r;
}
function h1e(e, ...t) {
  e = new a7(e), t = t.map(d1e);
  e: for (const r of e)
    for (const a of t)
      if (!a.has(r)) {
        e.delete(r);
        continue e;
      }
  return e;
}
function d1e(e) {
  return e instanceof a7 ? e : new a7(e);
}
function p1e(...e) {
  const t = new a7();
  for (const r of e)
    for (const a of r)
      t.add(a);
  return t;
}
function m1e(e) {
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
}
function s7(e, t) {
  if ((r = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
  var r, a = e.slice(0, r);
  return [
    a.length > 1 ? a[0] + a.slice(2) : a,
    +e.slice(r + 1)
  ];
}
function Ix(e) {
  return e = s7(Math.abs(e)), e ? e[1] : NaN;
}
function g1e(e, t) {
  return function(r, a) {
    for (var v = r.length, o = [], s = 0, n = e[0], l = 0; v > 0 && n > 0 && (l + n + 1 > a && (n = Math.max(1, a - l)), o.push(r.substring(v -= n, v + n)), !((l += n + 1) > a)); )
      n = e[s = (s + 1) % e.length];
    return o.reverse().join(t);
  };
}
function y1e(e) {
  return function(t) {
    return t.replace(/[0-9]/g, function(r) {
      return e[+r];
    });
  };
}
var v1e = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function xv(e) {
  if (!(t = v1e.exec(e))) throw new Error("invalid format: " + e);
  var t;
  return new jD({
    fill: t[1],
    align: t[2],
    sign: t[3],
    symbol: t[4],
    zero: t[5],
    width: t[6],
    comma: t[7],
    precision: t[8] && t[8].slice(1),
    trim: t[9],
    type: t[10]
  });
}
xv.prototype = jD.prototype;
function jD(e) {
  this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
}
jD.prototype.toString = function() {
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
function x1e(e) {
  e: for (var t = e.length, r = 1, a = -1, v; r < t; ++r)
    switch (e[r]) {
      case ".":
        a = v = r;
        break;
      case "0":
        a === 0 && (a = r), v = r;
        break;
      default:
        if (!+e[r]) break e;
        a > 0 && (a = 0);
        break;
    }
  return a > 0 ? e.slice(0, a) + e.slice(v + 1) : e;
}
var mY;
function b1e(e, t) {
  var r = s7(e, t);
  if (!r) return e + "";
  var a = r[0], v = r[1], o = v - (mY = Math.max(-8, Math.min(8, Math.floor(v / 3))) * 3) + 1, s = a.length;
  return o === s ? a : o > s ? a + new Array(o - s + 1).join("0") : o > 0 ? a.slice(0, o) + "." + a.slice(o) : "0." + new Array(1 - o).join("0") + s7(e, Math.max(0, t + o - 1))[0];
}
function cB(e, t) {
  var r = s7(e, t);
  if (!r) return e + "";
  var a = r[0], v = r[1];
  return v < 0 ? "0." + new Array(-v).join("0") + a : a.length > v + 1 ? a.slice(0, v + 1) + "." + a.slice(v + 1) : a + new Array(v - a.length + 2).join("0");
}
const fB = {
  "%": (e, t) => (e * 100).toFixed(t),
  b: (e) => Math.round(e).toString(2),
  c: (e) => e + "",
  d: m1e,
  e: (e, t) => e.toExponential(t),
  f: (e, t) => e.toFixed(t),
  g: (e, t) => e.toPrecision(t),
  o: (e) => Math.round(e).toString(8),
  p: (e, t) => cB(e * 100, t),
  r: cB,
  s: b1e,
  X: (e) => Math.round(e).toString(16).toUpperCase(),
  x: (e) => Math.round(e).toString(16)
};
function hB(e) {
  return e;
}
var dB = Array.prototype.map, pB = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function gY(e) {
  var t = e.grouping === void 0 || e.thousands === void 0 ? hB : g1e(dB.call(e.grouping, Number), e.thousands + ""), r = e.currency === void 0 ? "" : e.currency[0] + "", a = e.currency === void 0 ? "" : e.currency[1] + "", v = e.decimal === void 0 ? "." : e.decimal + "", o = e.numerals === void 0 ? hB : y1e(dB.call(e.numerals, String)), s = e.percent === void 0 ? "%" : e.percent + "", n = e.minus === void 0 ? "−" : e.minus + "", l = e.nan === void 0 ? "NaN" : e.nan + "";
  function u(h) {
    h = xv(h);
    var p = h.fill, _ = h.align, d = h.sign, f = h.symbol, c = h.zero, g = h.width, m = h.comma, x = h.precision, w = h.trim, k = h.type;
    k === "n" ? (m = !0, k = "g") : fB[k] || (x === void 0 && (x = 12), w = !0, k = "g"), (c || p === "0" && _ === "=") && (c = !0, p = "0", _ = "=");
    var S = f === "$" ? r : f === "#" && /[boxX]/.test(k) ? "0" + k.toLowerCase() : "", A = f === "$" ? a : /[%p]/.test(k) ? s : "", C = fB[k], D = /[defgprs%]/.test(k);
    x = x === void 0 ? 6 : /[gprs]/.test(k) ? Math.max(1, Math.min(21, x)) : Math.max(0, Math.min(20, x));
    function L(E) {
      var P = S, I = A, M, O, T;
      if (k === "c")
        I = C(E) + I, E = "";
      else {
        E = +E;
        var z = E < 0 || 1 / E < 0;
        if (E = isNaN(E) ? l : C(Math.abs(E), x), w && (E = x1e(E)), z && +E == 0 && d !== "+" && (z = !1), P = (z ? d === "(" ? d : n : d === "-" || d === "(" ? "" : d) + P, I = (k === "s" ? pB[8 + mY / 3] : "") + I + (z && d === "(" ? ")" : ""), D) {
          for (M = -1, O = E.length; ++M < O; )
            if (T = E.charCodeAt(M), 48 > T || T > 57) {
              I = (T === 46 ? v + E.slice(M + 1) : E.slice(M)) + I, E = E.slice(0, M);
              break;
            }
        }
      }
      m && !c && (E = t(E, 1 / 0));
      var F = P.length + E.length + I.length, U = F < g ? new Array(g - F + 1).join(p) : "";
      switch (m && c && (E = t(U + E, U.length ? g - I.length : 1 / 0), U = ""), _) {
        case "<":
          E = P + E + I + U;
          break;
        case "=":
          E = P + U + E + I;
          break;
        case "^":
          E = U.slice(0, F = U.length >> 1) + P + E + I + U.slice(F);
          break;
        default:
          E = U + P + E + I;
          break;
      }
      return o(E);
    }
    return L.toString = function() {
      return h + "";
    }, L;
  }
  function i(h, p) {
    var _ = u((h = xv(h), h.type = "f", h)), d = Math.max(-8, Math.min(8, Math.floor(Ix(p) / 3))) * 3, f = Math.pow(10, -d), c = pB[8 + d / 3];
    return function(g) {
      return _(f * g) + c;
    };
  }
  return {
    format: u,
    formatPrefix: i
  };
}
var f6, f9, UD;
_1e({
  thousands: ",",
  grouping: [3],
  currency: ["$", ""]
});
function _1e(e) {
  return f6 = gY(e), f9 = f6.format, UD = f6.formatPrefix, f6;
}
function yY(e) {
  return Math.max(0, -Ix(Math.abs(e)));
}
function vY(e, t) {
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Ix(t) / 3))) * 3 - Ix(Math.abs(e)));
}
function xY(e, t) {
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Ix(t) - Ix(e)) + 1;
}
const LS = /* @__PURE__ */ new Date(), PS = /* @__PURE__ */ new Date();
function Ac(e, t, r, a) {
  function v(o) {
    return e(o = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+o)), o;
  }
  return v.floor = (o) => (e(o = /* @__PURE__ */ new Date(+o)), o), v.ceil = (o) => (e(o = new Date(o - 1)), t(o, 1), e(o), o), v.round = (o) => {
    const s = v(o), n = v.ceil(o);
    return o - s < n - o ? s : n;
  }, v.offset = (o, s) => (t(o = /* @__PURE__ */ new Date(+o), s == null ? 1 : Math.floor(s)), o), v.range = (o, s, n) => {
    const l = [];
    if (o = v.ceil(o), n = n == null ? 1 : Math.floor(n), !(o < s) || !(n > 0)) return l;
    let u;
    do
      l.push(u = /* @__PURE__ */ new Date(+o)), t(o, n), e(o);
    while (u < o && o < s);
    return l;
  }, v.filter = (o) => Ac((s) => {
    if (s >= s) for (; e(s), !o(s); ) s.setTime(s - 1);
  }, (s, n) => {
    if (s >= s)
      if (n < 0) for (; ++n <= 0; )
        for (; t(s, -1), !o(s); )
          ;
      else for (; --n >= 0; )
        for (; t(s, 1), !o(s); )
          ;
  }), r && (v.count = (o, s) => (LS.setTime(+o), PS.setTime(+s), e(LS), e(PS), Math.floor(r(LS, PS))), v.every = (o) => (o = Math.floor(o), !isFinite(o) || !(o > 0) ? null : o > 1 ? v.filter(a ? (s) => a(s) % o === 0 : (s) => v.count(0, s) % o === 0) : v)), v;
}
const Dx = Ac(() => {
}, (e, t) => {
  e.setTime(+e + t);
}, (e, t) => t - e);
Dx.every = (e) => (e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? Ac((t) => {
  t.setTime(Math.floor(t / e) * e);
}, (t, r) => {
  t.setTime(+t + r * e);
}, (t, r) => (r - t) / e) : Dx);
Dx.range;
const Am = 1e3, kd = Am * 60, Sm = kd * 60, Vm = Sm * 24, VD = Vm * 7, mB = Vm * 30, OS = Vm * 365, Mm = Ac((e) => {
  e.setTime(e - e.getMilliseconds());
}, (e, t) => {
  e.setTime(+e + t * Am);
}, (e, t) => (t - e) / Am, (e) => e.getUTCSeconds());
Mm.range;
const h9 = Ac((e) => {
  e.setTime(e - e.getMilliseconds() - e.getSeconds() * Am);
}, (e, t) => {
  e.setTime(+e + t * kd);
}, (e, t) => (t - e) / kd, (e) => e.getMinutes());
h9.range;
const d9 = Ac((e) => {
  e.setUTCSeconds(0, 0);
}, (e, t) => {
  e.setTime(+e + t * kd);
}, (e, t) => (t - e) / kd, (e) => e.getUTCMinutes());
d9.range;
const p9 = Ac((e) => {
  e.setTime(e - e.getMilliseconds() - e.getSeconds() * Am - e.getMinutes() * kd);
}, (e, t) => {
  e.setTime(+e + t * Sm);
}, (e, t) => (t - e) / Sm, (e) => e.getHours());
p9.range;
const m9 = Ac((e) => {
  e.setUTCMinutes(0, 0, 0);
}, (e, t) => {
  e.setTime(+e + t * Sm);
}, (e, t) => (t - e) / Sm, (e) => e.getUTCHours());
m9.range;
const Om = Ac(
  (e) => e.setHours(0, 0, 0, 0),
  (e, t) => e.setDate(e.getDate() + t),
  (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * kd) / Vm,
  (e) => e.getDate() - 1
);
Om.range;
const lg = Ac((e) => {
  e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / Vm, (e) => e.getUTCDate() - 1);
lg.range;
const bY = Ac((e) => {
  e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / Vm, (e) => Math.floor(e / Vm));
bY.range;
function Vv(e) {
  return Ac((t) => {
    t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
  }, (t, r) => {
    t.setDate(t.getDate() + r * 7);
  }, (t, r) => (r - t - (r.getTimezoneOffset() - t.getTimezoneOffset()) * kd) / VD);
}
const kb = Vv(0), l7 = Vv(1), w1e = Vv(2), k1e = Vv(3), Lx = Vv(4), T1e = Vv(5), A1e = Vv(6);
kb.range;
l7.range;
w1e.range;
k1e.range;
Lx.range;
T1e.range;
A1e.range;
function $v(e) {
  return Ac((t) => {
    t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
  }, (t, r) => {
    t.setUTCDate(t.getUTCDate() + r * 7);
  }, (t, r) => (r - t) / VD);
}
const Tb = $v(0), u7 = $v(1), S1e = $v(2), M1e = $v(3), Px = $v(4), E1e = $v(5), C1e = $v(6);
Tb.range;
u7.range;
S1e.range;
M1e.range;
Px.range;
E1e.range;
C1e.range;
const xw = Ac((e) => {
  e.setDate(1), e.setHours(0, 0, 0, 0);
}, (e, t) => {
  e.setMonth(e.getMonth() + t);
}, (e, t) => t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12, (e) => e.getMonth());
xw.range;
const bw = Ac((e) => {
  e.setUTCDate(1), e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCMonth(e.getUTCMonth() + t);
}, (e, t) => t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12, (e) => e.getUTCMonth());
bw.range;
const E0 = Ac((e) => {
  e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, t) => {
  e.setFullYear(e.getFullYear() + t);
}, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
E0.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : Ac((t) => {
  t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, (t, r) => {
  t.setFullYear(t.getFullYear() + r * e);
});
E0.range;
const C0 = Ac((e) => {
  e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCFullYear(e.getUTCFullYear() + t);
}, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
C0.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : Ac((t) => {
  t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, (t, r) => {
  t.setUTCFullYear(t.getUTCFullYear() + r * e);
});
C0.range;
function _Y(e, t, r, a, v, o) {
  const s = [
    [Mm, 1, Am],
    [Mm, 5, 5 * Am],
    [Mm, 15, 15 * Am],
    [Mm, 30, 30 * Am],
    [o, 1, kd],
    [o, 5, 5 * kd],
    [o, 15, 15 * kd],
    [o, 30, 30 * kd],
    [v, 1, Sm],
    [v, 3, 3 * Sm],
    [v, 6, 6 * Sm],
    [v, 12, 12 * Sm],
    [a, 1, Vm],
    [a, 2, 2 * Vm],
    [r, 1, VD],
    [t, 1, mB],
    [t, 3, 3 * mB],
    [e, 1, OS]
  ];
  function n(u, i, h) {
    const p = i < u;
    p && ([u, i] = [i, u]);
    const _ = h && typeof h.range == "function" ? h : l(u, i, h), d = _ ? _.range(u, +i + 1) : [];
    return p ? d.reverse() : d;
  }
  function l(u, i, h) {
    const p = Math.abs(i - u) / h, _ = wb(([, , c]) => c).right(s, p);
    if (_ === s.length) return e.every(xg(u / OS, i / OS, h));
    if (_ === 0) return Dx.every(Math.max(xg(u, i, h), 1));
    const [d, f] = s[p / s[_ - 1][2] < s[_][2] / p ? _ - 1 : _];
    return d.every(f);
  }
  return [n, l];
}
const [I1e, D1e] = _Y(C0, bw, Tb, bY, m9, d9), [L1e, P1e] = _Y(E0, xw, kb, Om, p9, h9), cf = "year", Ph = "quarter", Nf = "month", _c = "week", Oh = "date", Pf = "day", I0 = "dayofyear", ad = "hours", od = "minutes", Pd = "seconds", xp = "milliseconds", $D = [cf, Ph, Nf, _c, Oh, Pf, I0, ad, od, Pd, xp], zS = $D.reduce((e, t, r) => (e[t] = 1 + r, e), {});
function qD(e) {
  const t = Ri(e).slice(), r = {};
  return t.length || Jr("Missing time unit."), t.forEach((v) => {
    ua(zS, v) ? r[v] = 1 : Jr(`Invalid time unit: ${v}.`);
  }), (r[_c] || r[Pf] ? 1 : 0) + (r[Ph] || r[Nf] || r[Oh] ? 1 : 0) + (r[I0] ? 1 : 0) > 1 && Jr(`Incompatible time units: ${e}`), t.sort((v, o) => zS[v] - zS[o]), t;
}
const O1e = {
  [cf]: "%Y ",
  [Ph]: "Q%q ",
  [Nf]: "%b ",
  [Oh]: "%d ",
  [_c]: "W%U ",
  [Pf]: "%a ",
  [I0]: "%j ",
  [ad]: "%H:00",
  [od]: "00:%M",
  [Pd]: ":%S",
  [xp]: ".%L",
  [`${cf}-${Nf}`]: "%Y-%m ",
  [`${cf}-${Nf}-${Oh}`]: "%Y-%m-%d ",
  [`${ad}-${od}`]: "%H:%M"
};
function wY(e, t) {
  const r = $a({}, O1e, t), a = qD(e), v = a.length;
  let o = "", s = 0, n, l;
  for (s = 0; s < v; )
    for (n = a.length; n > s; --n)
      if (l = a.slice(s, n).join("-"), r[l] != null) {
        o += r[l], s = n;
        break;
      }
  return o.trim();
}
const $y = /* @__PURE__ */ new Date();
function HD(e) {
  return $y.setFullYear(e), $y.setMonth(0), $y.setDate(1), $y.setHours(0, 0, 0, 0), $y;
}
function kY(e) {
  return AY(new Date(e));
}
function TY(e) {
  return PE(new Date(e));
}
function AY(e) {
  return Om.count(HD(e.getFullYear()) - 1, e);
}
function PE(e) {
  return kb.count(HD(e.getFullYear()) - 1, e);
}
function OE(e) {
  return HD(e).getDay();
}
function z1e(e, t, r, a, v, o, s) {
  if (0 <= e && e < 100) {
    const n = new Date(-1, t, r, a, v, o, s);
    return n.setFullYear(e), n;
  }
  return new Date(e, t, r, a, v, o, s);
}
function SY(e) {
  return EY(new Date(e));
}
function MY(e) {
  return zE(new Date(e));
}
function EY(e) {
  const t = Date.UTC(e.getUTCFullYear(), 0, 1);
  return lg.count(t - 1, e);
}
function zE(e) {
  const t = Date.UTC(e.getUTCFullYear(), 0, 1);
  return Tb.count(t - 1, e);
}
function RE(e) {
  return $y.setTime(Date.UTC(e, 0, 1)), $y.getUTCDay();
}
function R1e(e, t, r, a, v, o, s) {
  if (0 <= e && e < 100) {
    const n = new Date(Date.UTC(-1, t, r, a, v, o, s));
    return n.setUTCFullYear(r.y), n;
  }
  return new Date(Date.UTC(e, t, r, a, v, o, s));
}
function CY(e, t, r, a, v) {
  const o = t || 1, s = mo(e), n = (g, m, x) => (x = x || g, F1e(r[x], a[x], g === s && o, m)), l = /* @__PURE__ */ new Date(), u = vp(e), i = u[cf] ? n(cf) : Vf(2012), h = u[Nf] ? n(Nf) : u[Ph] ? n(Ph) : W1, p = u[_c] && u[Pf] ? n(Pf, 1, _c + Pf) : u[_c] ? n(_c, 1) : u[Pf] ? n(Pf, 1) : u[Oh] ? n(Oh, 1) : u[I0] ? n(I0, 1) : vb, _ = u[ad] ? n(ad) : W1, d = u[od] ? n(od) : W1, f = u[Pd] ? n(Pd) : W1, c = u[xp] ? n(xp) : W1;
  return function(g) {
    l.setTime(+g);
    const m = i(l);
    return v(m, h(l), p(l, m), _(l), d(l), f(l), c(l));
  };
}
function F1e(e, t, r, a) {
  const v = r <= 1 ? e : a ? (o, s) => a + r * Math.floor((e(o, s) - a) / r) : (o, s) => r * Math.floor(e(o, s) / r);
  return t ? (o, s) => t(v(o, s), s) : v;
}
function Ox(e, t, r) {
  return t + e * 7 - (r + 6) % 7;
}
const N1e = {
  [cf]: (e) => e.getFullYear(),
  [Ph]: (e) => Math.floor(e.getMonth() / 3),
  [Nf]: (e) => e.getMonth(),
  [Oh]: (e) => e.getDate(),
  [ad]: (e) => e.getHours(),
  [od]: (e) => e.getMinutes(),
  [Pd]: (e) => e.getSeconds(),
  [xp]: (e) => e.getMilliseconds(),
  [I0]: (e) => AY(e),
  [_c]: (e) => PE(e),
  [_c + Pf]: (e, t) => Ox(PE(e), e.getDay(), OE(t)),
  [Pf]: (e, t) => Ox(1, e.getDay(), OE(t))
}, B1e = {
  [Ph]: (e) => 3 * e,
  [_c]: (e, t) => Ox(e, 0, OE(t))
};
function IY(e, t) {
  return CY(e, t || 1, N1e, B1e, z1e);
}
const j1e = {
  [cf]: (e) => e.getUTCFullYear(),
  [Ph]: (e) => Math.floor(e.getUTCMonth() / 3),
  [Nf]: (e) => e.getUTCMonth(),
  [Oh]: (e) => e.getUTCDate(),
  [ad]: (e) => e.getUTCHours(),
  [od]: (e) => e.getUTCMinutes(),
  [Pd]: (e) => e.getUTCSeconds(),
  [xp]: (e) => e.getUTCMilliseconds(),
  [I0]: (e) => EY(e),
  [_c]: (e) => zE(e),
  [Pf]: (e, t) => Ox(1, e.getUTCDay(), RE(t)),
  [_c + Pf]: (e, t) => Ox(zE(e), e.getUTCDay(), RE(t))
}, U1e = {
  [Ph]: (e) => 3 * e,
  [_c]: (e, t) => Ox(e, 0, RE(t))
};
function DY(e, t) {
  return CY(e, t || 1, j1e, U1e, R1e);
}
const V1e = {
  [cf]: E0,
  [Ph]: xw.every(3),
  [Nf]: xw,
  [_c]: kb,
  [Oh]: Om,
  [Pf]: Om,
  [I0]: Om,
  [ad]: p9,
  [od]: h9,
  [Pd]: Mm,
  [xp]: Dx
}, $1e = {
  [cf]: C0,
  [Ph]: bw.every(3),
  [Nf]: bw,
  [_c]: Tb,
  [Oh]: lg,
  [Pf]: lg,
  [I0]: lg,
  [ad]: m9,
  [od]: d9,
  [Pd]: Mm,
  [xp]: Dx
};
function Ab(e) {
  return V1e[e];
}
function Sb(e) {
  return $1e[e];
}
function LY(e, t, r) {
  return e ? e.offset(t, r) : void 0;
}
function PY(e, t, r) {
  return LY(Ab(e), t, r);
}
function OY(e, t, r) {
  return LY(Sb(e), t, r);
}
function zY(e, t, r, a) {
  return e ? e.range(t, r, a) : void 0;
}
function RY(e, t, r, a) {
  return zY(Ab(e), t, r, a);
}
function FY(e, t, r, a) {
  return zY(Sb(e), t, r, a);
}
const m3 = 1e3, g3 = m3 * 60, y3 = g3 * 60, g9 = y3 * 24, q1e = g9 * 7, gB = g9 * 30, FE = g9 * 365, NY = [cf, Nf, Oh, ad, od, Pd, xp], v3 = NY.slice(0, -1), x3 = v3.slice(0, -1), b3 = x3.slice(0, -1), H1e = b3.slice(0, -1), G1e = [cf, _c], yB = [cf, Nf], BY = [cf], V_ = [[v3, 1, m3], [v3, 5, 5 * m3], [v3, 15, 15 * m3], [v3, 30, 30 * m3], [x3, 1, g3], [x3, 5, 5 * g3], [x3, 15, 15 * g3], [x3, 30, 30 * g3], [b3, 1, y3], [b3, 3, 3 * y3], [b3, 6, 6 * y3], [b3, 12, 12 * y3], [H1e, 1, g9], [G1e, 1, q1e], [yB, 1, gB], [yB, 3, 3 * gB], [BY, 1, FE]];
function jY(e) {
  const t = e.extent, r = e.maxbins || 40, a = Math.abs(s4(t)) / r;
  let v = wb((n) => n[2]).right(V_, a), o, s;
  return v === V_.length ? (o = BY, s = xg(t[0] / FE, t[1] / FE, r)) : v ? (v = V_[a / V_[v - 1][2] < V_[v][2] / a ? v - 1 : v], o = v[0], s = v[1]) : (o = NY, s = Math.max(xg(t[0], t[1], r), 1)), {
    units: o,
    step: s
  };
}
function RS(e) {
  if (0 <= e.y && e.y < 100) {
    var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
    return t.setFullYear(e.y), t;
  }
  return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
}
function FS(e) {
  if (0 <= e.y && e.y < 100) {
    var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
    return t.setUTCFullYear(e.y), t;
  }
  return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
}
function $_(e, t, r) {
  return { y: e, m: t, d: r, H: 0, M: 0, S: 0, L: 0 };
}
function UY(e) {
  var t = e.dateTime, r = e.date, a = e.time, v = e.periods, o = e.days, s = e.shortDays, n = e.months, l = e.shortMonths, u = q_(v), i = H_(v), h = q_(o), p = H_(o), _ = q_(s), d = H_(s), f = q_(n), c = H_(n), g = q_(l), m = H_(l), x = {
    a: z,
    A: F,
    b: U,
    B: V,
    c: null,
    d: kB,
    e: kB,
    f: mge,
    g: Age,
    G: Mge,
    H: hge,
    I: dge,
    j: pge,
    L: VY,
    m: gge,
    M: yge,
    p: $,
    q,
    Q: SB,
    s: MB,
    S: vge,
    u: xge,
    U: bge,
    V: _ge,
    w: wge,
    W: kge,
    x: null,
    X: null,
    y: Tge,
    Y: Sge,
    Z: Ege,
    "%": AB
  }, w = {
    a: K,
    A: re,
    b: Y,
    B: te,
    c: null,
    d: TB,
    e: TB,
    f: Lge,
    g: Vge,
    G: qge,
    H: Cge,
    I: Ige,
    j: Dge,
    L: qY,
    m: Pge,
    M: Oge,
    p: ee,
    q: X,
    Q: SB,
    s: MB,
    S: zge,
    u: Rge,
    U: Fge,
    V: Nge,
    w: Bge,
    W: jge,
    x: null,
    X: null,
    y: Uge,
    Y: $ge,
    Z: Hge,
    "%": AB
  }, k = {
    a: L,
    A: E,
    b: P,
    B: I,
    c: M,
    d: _B,
    e: _B,
    f: lge,
    g: bB,
    G: xB,
    H: wB,
    I: wB,
    j: ige,
    L: sge,
    m: rge,
    M: age,
    p: D,
    q: nge,
    Q: cge,
    s: fge,
    S: oge,
    u: K1e,
    U: J1e,
    V: Q1e,
    w: X1e,
    W: ege,
    x: O,
    X: T,
    y: bB,
    Y: xB,
    Z: tge,
    "%": uge
  };
  x.x = S(r, x), x.X = S(a, x), x.c = S(t, x), w.x = S(r, w), w.X = S(a, w), w.c = S(t, w);
  function S(Q, ue) {
    return function(ce) {
      var he = [], de = -1, ne = 0, ae = Q.length, se, me, ye;
      for (ce instanceof Date || (ce = /* @__PURE__ */ new Date(+ce)); ++de < ae; )
        Q.charCodeAt(de) === 37 && (he.push(Q.slice(ne, de)), (me = vB[se = Q.charAt(++de)]) != null ? se = Q.charAt(++de) : me = se === "e" ? " " : "0", (ye = ue[se]) && (se = ye(ce, me)), he.push(se), ne = de + 1);
      return he.push(Q.slice(ne, de)), he.join("");
    };
  }
  function A(Q, ue) {
    return function(ce) {
      var he = $_(1900, void 0, 1), de = C(he, Q, ce += "", 0), ne, ae;
      if (de != ce.length) return null;
      if ("Q" in he) return new Date(he.Q);
      if ("s" in he) return new Date(he.s * 1e3 + ("L" in he ? he.L : 0));
      if (ue && !("Z" in he) && (he.Z = 0), "p" in he && (he.H = he.H % 12 + he.p * 12), he.m === void 0 && (he.m = "q" in he ? he.q : 0), "V" in he) {
        if (he.V < 1 || he.V > 53) return null;
        "w" in he || (he.w = 1), "Z" in he ? (ne = FS($_(he.y, 0, 1)), ae = ne.getUTCDay(), ne = ae > 4 || ae === 0 ? u7.ceil(ne) : u7(ne), ne = lg.offset(ne, (he.V - 1) * 7), he.y = ne.getUTCFullYear(), he.m = ne.getUTCMonth(), he.d = ne.getUTCDate() + (he.w + 6) % 7) : (ne = RS($_(he.y, 0, 1)), ae = ne.getDay(), ne = ae > 4 || ae === 0 ? l7.ceil(ne) : l7(ne), ne = Om.offset(ne, (he.V - 1) * 7), he.y = ne.getFullYear(), he.m = ne.getMonth(), he.d = ne.getDate() + (he.w + 6) % 7);
      } else ("W" in he || "U" in he) && ("w" in he || (he.w = "u" in he ? he.u % 7 : "W" in he ? 1 : 0), ae = "Z" in he ? FS($_(he.y, 0, 1)).getUTCDay() : RS($_(he.y, 0, 1)).getDay(), he.m = 0, he.d = "W" in he ? (he.w + 6) % 7 + he.W * 7 - (ae + 5) % 7 : he.w + he.U * 7 - (ae + 6) % 7);
      return "Z" in he ? (he.H += he.Z / 100 | 0, he.M += he.Z % 100, FS(he)) : RS(he);
    };
  }
  function C(Q, ue, ce, he) {
    for (var de = 0, ne = ue.length, ae = ce.length, se, me; de < ne; ) {
      if (he >= ae) return -1;
      if (se = ue.charCodeAt(de++), se === 37) {
        if (se = ue.charAt(de++), me = k[se in vB ? ue.charAt(de++) : se], !me || (he = me(Q, ce, he)) < 0) return -1;
      } else if (se != ce.charCodeAt(he++))
        return -1;
    }
    return he;
  }
  function D(Q, ue, ce) {
    var he = u.exec(ue.slice(ce));
    return he ? (Q.p = i.get(he[0].toLowerCase()), ce + he[0].length) : -1;
  }
  function L(Q, ue, ce) {
    var he = _.exec(ue.slice(ce));
    return he ? (Q.w = d.get(he[0].toLowerCase()), ce + he[0].length) : -1;
  }
  function E(Q, ue, ce) {
    var he = h.exec(ue.slice(ce));
    return he ? (Q.w = p.get(he[0].toLowerCase()), ce + he[0].length) : -1;
  }
  function P(Q, ue, ce) {
    var he = g.exec(ue.slice(ce));
    return he ? (Q.m = m.get(he[0].toLowerCase()), ce + he[0].length) : -1;
  }
  function I(Q, ue, ce) {
    var he = f.exec(ue.slice(ce));
    return he ? (Q.m = c.get(he[0].toLowerCase()), ce + he[0].length) : -1;
  }
  function M(Q, ue, ce) {
    return C(Q, t, ue, ce);
  }
  function O(Q, ue, ce) {
    return C(Q, r, ue, ce);
  }
  function T(Q, ue, ce) {
    return C(Q, a, ue, ce);
  }
  function z(Q) {
    return s[Q.getDay()];
  }
  function F(Q) {
    return o[Q.getDay()];
  }
  function U(Q) {
    return l[Q.getMonth()];
  }
  function V(Q) {
    return n[Q.getMonth()];
  }
  function $(Q) {
    return v[+(Q.getHours() >= 12)];
  }
  function q(Q) {
    return 1 + ~~(Q.getMonth() / 3);
  }
  function K(Q) {
    return s[Q.getUTCDay()];
  }
  function re(Q) {
    return o[Q.getUTCDay()];
  }
  function Y(Q) {
    return l[Q.getUTCMonth()];
  }
  function te(Q) {
    return n[Q.getUTCMonth()];
  }
  function ee(Q) {
    return v[+(Q.getUTCHours() >= 12)];
  }
  function X(Q) {
    return 1 + ~~(Q.getUTCMonth() / 3);
  }
  return {
    format: function(Q) {
      var ue = S(Q += "", x);
      return ue.toString = function() {
        return Q;
      }, ue;
    },
    parse: function(Q) {
      var ue = A(Q += "", !1);
      return ue.toString = function() {
        return Q;
      }, ue;
    },
    utcFormat: function(Q) {
      var ue = S(Q += "", w);
      return ue.toString = function() {
        return Q;
      }, ue;
    },
    utcParse: function(Q) {
      var ue = A(Q += "", !0);
      return ue.toString = function() {
        return Q;
      }, ue;
    }
  };
}
var vB = { "-": "", _: " ", 0: "0" }, Jc = /^\s*\d+/, W1e = /^%/, Y1e = /[\\^$*+?|[\]().{}]/g;
function Ho(e, t, r) {
  var a = e < 0 ? "-" : "", v = (a ? -e : e) + "", o = v.length;
  return a + (o < r ? new Array(r - o + 1).join(t) + v : v);
}
function Z1e(e) {
  return e.replace(Y1e, "\\$&");
}
function q_(e) {
  return new RegExp("^(?:" + e.map(Z1e).join("|") + ")", "i");
}
function H_(e) {
  return new Map(e.map((t, r) => [t.toLowerCase(), r]));
}
function X1e(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 1));
  return a ? (e.w = +a[0], r + a[0].length) : -1;
}
function K1e(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 1));
  return a ? (e.u = +a[0], r + a[0].length) : -1;
}
function J1e(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.U = +a[0], r + a[0].length) : -1;
}
function Q1e(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.V = +a[0], r + a[0].length) : -1;
}
function ege(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.W = +a[0], r + a[0].length) : -1;
}
function xB(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 4));
  return a ? (e.y = +a[0], r + a[0].length) : -1;
}
function bB(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.y = +a[0] + (+a[0] > 68 ? 1900 : 2e3), r + a[0].length) : -1;
}
function tge(e, t, r) {
  var a = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r, r + 6));
  return a ? (e.Z = a[1] ? 0 : -(a[2] + (a[3] || "00")), r + a[0].length) : -1;
}
function nge(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 1));
  return a ? (e.q = a[0] * 3 - 3, r + a[0].length) : -1;
}
function rge(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.m = a[0] - 1, r + a[0].length) : -1;
}
function _B(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.d = +a[0], r + a[0].length) : -1;
}
function ige(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 3));
  return a ? (e.m = 0, e.d = +a[0], r + a[0].length) : -1;
}
function wB(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.H = +a[0], r + a[0].length) : -1;
}
function age(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.M = +a[0], r + a[0].length) : -1;
}
function oge(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 2));
  return a ? (e.S = +a[0], r + a[0].length) : -1;
}
function sge(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 3));
  return a ? (e.L = +a[0], r + a[0].length) : -1;
}
function lge(e, t, r) {
  var a = Jc.exec(t.slice(r, r + 6));
  return a ? (e.L = Math.floor(a[0] / 1e3), r + a[0].length) : -1;
}
function uge(e, t, r) {
  var a = W1e.exec(t.slice(r, r + 1));
  return a ? r + a[0].length : -1;
}
function cge(e, t, r) {
  var a = Jc.exec(t.slice(r));
  return a ? (e.Q = +a[0], r + a[0].length) : -1;
}
function fge(e, t, r) {
  var a = Jc.exec(t.slice(r));
  return a ? (e.s = +a[0], r + a[0].length) : -1;
}
function kB(e, t) {
  return Ho(e.getDate(), t, 2);
}
function hge(e, t) {
  return Ho(e.getHours(), t, 2);
}
function dge(e, t) {
  return Ho(e.getHours() % 12 || 12, t, 2);
}
function pge(e, t) {
  return Ho(1 + Om.count(E0(e), e), t, 3);
}
function VY(e, t) {
  return Ho(e.getMilliseconds(), t, 3);
}
function mge(e, t) {
  return VY(e, t) + "000";
}
function gge(e, t) {
  return Ho(e.getMonth() + 1, t, 2);
}
function yge(e, t) {
  return Ho(e.getMinutes(), t, 2);
}
function vge(e, t) {
  return Ho(e.getSeconds(), t, 2);
}
function xge(e) {
  var t = e.getDay();
  return t === 0 ? 7 : t;
}
function bge(e, t) {
  return Ho(kb.count(E0(e) - 1, e), t, 2);
}
function $Y(e) {
  var t = e.getDay();
  return t >= 4 || t === 0 ? Lx(e) : Lx.ceil(e);
}
function _ge(e, t) {
  return e = $Y(e), Ho(Lx.count(E0(e), e) + (E0(e).getDay() === 4), t, 2);
}
function wge(e) {
  return e.getDay();
}
function kge(e, t) {
  return Ho(l7.count(E0(e) - 1, e), t, 2);
}
function Tge(e, t) {
  return Ho(e.getFullYear() % 100, t, 2);
}
function Age(e, t) {
  return e = $Y(e), Ho(e.getFullYear() % 100, t, 2);
}
function Sge(e, t) {
  return Ho(e.getFullYear() % 1e4, t, 4);
}
function Mge(e, t) {
  var r = e.getDay();
  return e = r >= 4 || r === 0 ? Lx(e) : Lx.ceil(e), Ho(e.getFullYear() % 1e4, t, 4);
}
function Ege(e) {
  var t = e.getTimezoneOffset();
  return (t > 0 ? "-" : (t *= -1, "+")) + Ho(t / 60 | 0, "0", 2) + Ho(t % 60, "0", 2);
}
function TB(e, t) {
  return Ho(e.getUTCDate(), t, 2);
}
function Cge(e, t) {
  return Ho(e.getUTCHours(), t, 2);
}
function Ige(e, t) {
  return Ho(e.getUTCHours() % 12 || 12, t, 2);
}
function Dge(e, t) {
  return Ho(1 + lg.count(C0(e), e), t, 3);
}
function qY(e, t) {
  return Ho(e.getUTCMilliseconds(), t, 3);
}
function Lge(e, t) {
  return qY(e, t) + "000";
}
function Pge(e, t) {
  return Ho(e.getUTCMonth() + 1, t, 2);
}
function Oge(e, t) {
  return Ho(e.getUTCMinutes(), t, 2);
}
function zge(e, t) {
  return Ho(e.getUTCSeconds(), t, 2);
}
function Rge(e) {
  var t = e.getUTCDay();
  return t === 0 ? 7 : t;
}
function Fge(e, t) {
  return Ho(Tb.count(C0(e) - 1, e), t, 2);
}
function HY(e) {
  var t = e.getUTCDay();
  return t >= 4 || t === 0 ? Px(e) : Px.ceil(e);
}
function Nge(e, t) {
  return e = HY(e), Ho(Px.count(C0(e), e) + (C0(e).getUTCDay() === 4), t, 2);
}
function Bge(e) {
  return e.getUTCDay();
}
function jge(e, t) {
  return Ho(u7.count(C0(e) - 1, e), t, 2);
}
function Uge(e, t) {
  return Ho(e.getUTCFullYear() % 100, t, 2);
}
function Vge(e, t) {
  return e = HY(e), Ho(e.getUTCFullYear() % 100, t, 2);
}
function $ge(e, t) {
  return Ho(e.getUTCFullYear() % 1e4, t, 4);
}
function qge(e, t) {
  var r = e.getUTCDay();
  return e = r >= 4 || r === 0 ? Px(e) : Px.ceil(e), Ho(e.getUTCFullYear() % 1e4, t, 4);
}
function Hge() {
  return "+0000";
}
function AB() {
  return "%";
}
function SB(e) {
  return +e;
}
function MB(e) {
  return Math.floor(+e / 1e3);
}
var N2, GD, GY, WD, WY;
Gge({
  dateTime: "%x, %X",
  date: "%-m/%-d/%Y",
  time: "%-I:%M:%S %p",
  periods: ["AM", "PM"],
  days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function Gge(e) {
  return N2 = UY(e), GD = N2.format, GY = N2.parse, WD = N2.utcFormat, WY = N2.utcParse, N2;
}
function _3(e) {
  const t = {};
  return (r) => t[r] || (t[r] = e(r));
}
function Wge(e, t) {
  return (r) => {
    const a = e(r), v = a.indexOf(t);
    if (v < 0) return a;
    let o = Yge(a, v);
    const s = o < a.length ? a.slice(o) : "";
    for (; --o > v; ) if (a[o] !== "0") {
      ++o;
      break;
    }
    return a.slice(0, o) + s;
  };
}
function Yge(e, t) {
  let r = e.lastIndexOf("e"), a;
  if (r > 0) return r;
  for (r = e.length; --r > t; )
    if (a = e.charCodeAt(r), a >= 48 && a <= 57) return r + 1;
}
function YY(e) {
  const t = _3(e.format), r = e.formatPrefix;
  return {
    format: t,
    formatPrefix: r,
    formatFloat(a) {
      const v = xv(a || ",");
      if (v.precision == null) {
        switch (v.precision = 12, v.type) {
          case "%":
            v.precision -= 2;
            break;
          case "e":
            v.precision -= 1;
            break;
        }
        return Wge(
          t(v),
          // number format
          t(".1f")(1)[1]
          // decimal point character
        );
      } else
        return t(v);
    },
    formatSpan(a, v, o, s) {
      s = xv(s ?? ",f");
      const n = xg(a, v, o), l = Math.max(Math.abs(a), Math.abs(v));
      let u;
      if (s.precision == null)
        switch (s.type) {
          case "s":
            return isNaN(u = vY(n, l)) || (s.precision = u), r(s, l);
          case "":
          case "e":
          case "g":
          case "p":
          case "r": {
            isNaN(u = xY(n, l)) || (s.precision = u - (s.type === "e"));
            break;
          }
          case "f":
          case "%": {
            isNaN(u = yY(n)) || (s.precision = u - (s.type === "%") * 2);
            break;
          }
        }
      return t(s);
    }
  };
}
let NE;
ZY();
function ZY() {
  return NE = YY({
    format: f9,
    formatPrefix: UD
  });
}
function XY(e) {
  return YY(gY(e));
}
function c7(e) {
  return arguments.length ? NE = XY(e) : NE;
}
function EB(e, t, r) {
  r = r || {}, Oi(r) || Jr(`Invalid time multi-format specifier: ${r}`);
  const a = t(Pd), v = t(od), o = t(ad), s = t(Oh), n = t(_c), l = t(Nf), u = t(Ph), i = t(cf), h = e(r[xp] || ".%L"), p = e(r[Pd] || ":%S"), _ = e(r[od] || "%I:%M"), d = e(r[ad] || "%I %p"), f = e(r[Oh] || r[Pf] || "%a %d"), c = e(r[_c] || "%b %d"), g = e(r[Nf] || "%B"), m = e(r[Ph] || "%B"), x = e(r[cf] || "%Y");
  return (w) => (a(w) < w ? h : v(w) < w ? p : o(w) < w ? _ : s(w) < w ? d : l(w) < w ? n(w) < w ? f : c : i(w) < w ? u(w) < w ? g : m : x)(w);
}
function KY(e) {
  const t = _3(e.format), r = _3(e.utcFormat);
  return {
    timeFormat: (a) => Fi(a) ? t(a) : EB(t, Ab, a),
    utcFormat: (a) => Fi(a) ? r(a) : EB(r, Sb, a),
    timeParse: _3(e.parse),
    utcParse: _3(e.utcParse)
  };
}
let BE;
JY();
function JY() {
  return BE = KY({
    format: GD,
    parse: GY,
    utcFormat: WD,
    utcParse: WY
  });
}
function QY(e) {
  return KY(UY(e));
}
function _w(e) {
  return arguments.length ? BE = QY(e) : BE;
}
const jE = (e, t) => $a({}, e, t);
function eZ(e, t) {
  const r = e ? XY(e) : c7(), a = t ? QY(t) : _w();
  return jE(r, a);
}
function YD(e, t) {
  const r = arguments.length;
  return r && r !== 2 && Jr("defaultLocale expects either zero or two arguments."), r ? jE(c7(e), _w(t)) : jE(c7(), _w());
}
function Zge() {
  return ZY(), JY(), YD();
}
const Xge = /^(data:|([A-Za-z]+:)?\/\/)/, Kge = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, Jge = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g, CB = "file://";
function Qge(e, t) {
  return (r) => ({
    options: r || {},
    sanitize: tye,
    load: eye,
    fileAccess: !!t,
    file: nye(t),
    http: iye(e)
  });
}
async function eye(e, t) {
  const r = await this.sanitize(e, t), a = r.href;
  return r.localFile ? this.file(a) : this.http(a, t);
}
async function tye(e, t) {
  t = $a({}, this.options, t);
  const r = this.fileAccess, a = {
    href: null
  };
  let v, o, s;
  const n = Kge.test(e.replace(Jge, ""));
  (e == null || typeof e != "string" || !n) && Jr("Sanitize failure, invalid URI: " + vi(e));
  const l = Xge.test(e);
  return (s = t.baseURL) && !l && (!e.startsWith("/") && !s.endsWith("/") && (e = "/" + e), e = s + e), o = (v = e.startsWith(CB)) || t.mode === "file" || t.mode !== "http" && !l && r, v ? e = e.slice(CB.length) : e.startsWith("//") && (t.defaultProtocol === "file" ? (e = e.slice(2), o = !0) : e = (t.defaultProtocol || "http") + ":" + e), Object.defineProperty(a, "localFile", {
    value: !!o
  }), a.href = e, t.target && (a.target = t.target + ""), t.rel && (a.rel = t.rel + ""), t.context === "image" && t.crossOrigin && (a.crossOrigin = t.crossOrigin + ""), a;
}
function nye(e) {
  return e ? (t) => new Promise((r, a) => {
    e.readFile(t, (v, o) => {
      v ? a(v) : r(o);
    });
  }) : rye;
}
async function rye() {
  Jr("No file system access.");
}
function iye(e) {
  return e ? async function(t, r) {
    const a = $a({}, this.options.http, r), v = r && r.response, o = await e(t, a);
    return o.ok ? qa(o[v]) ? o[v]() : o.text() : Jr(o.status + "" + o.statusText);
  } : aye;
}
async function aye() {
  Jr("No HTTP fetch method available.");
}
const oye = (e) => e != null && e === e, sye = (e) => e === "true" || e === "false" || e === !0 || e === !1, lye = (e) => !Number.isNaN(Date.parse(e)), tZ = (e) => !Number.isNaN(+e) && !(e instanceof Date), uye = (e) => tZ(e) && Number.isInteger(+e), UE = {
  boolean: FD,
  integer: Of,
  number: Of,
  date: ND,
  string: BD,
  unknown: Uf
}, h6 = [sye, uye, tZ, lye], cye = ["boolean", "integer", "number", "date"];
function nZ(e, t) {
  if (!e || !e.length) return "unknown";
  const r = e.length, a = h6.length, v = h6.map((o, s) => s + 1);
  for (let o = 0, s = 0, n, l; o < r; ++o)
    for (l = t ? e[o][t] : e[o], n = 0; n < a; ++n)
      if (v[n] && oye(l) && !h6[n](l) && (v[n] = 0, ++s, s === h6.length))
        return "string";
  return cye[v.reduce((o, s) => o === 0 ? s : o, 0) - 1];
}
function rZ(e, t) {
  return t.reduce((r, a) => (r[a] = nZ(e, a), r), {});
}
function IB(e) {
  const t = function(r, a) {
    const v = {
      delimiter: e
    };
    return ZD(r, a ? $a(a, v) : v);
  };
  return t.responseType = "text", t;
}
function ZD(e, t) {
  return t.header && (e = t.header.map(vi).join(t.delimiter) + `
` + e), qme(t.delimiter).parse(e + "");
}
ZD.responseType = "text";
function fye(e) {
  return typeof Buffer == "function" && qa(Buffer.isBuffer) ? Buffer.isBuffer(e) : !1;
}
function XD(e, t) {
  const r = t && t.property ? Dd(t.property) : Uf;
  return Oi(e) && !fye(e) ? hye(r(e), t) : r(JSON.parse(e));
}
XD.responseType = "json";
function hye(e, t) {
  return !Qr(e) && ZW(e) && (e = [...e]), t && t.copy ? JSON.parse(JSON.stringify(e)) : e;
}
const dye = {
  interior: (e, t) => e !== t,
  exterior: (e, t) => e === t
};
function iZ(e, t) {
  let r, a, v, o;
  return e = XD(e, t), t && t.feature ? (r = Yme, v = t.feature) : t && t.mesh ? (r = Xme, v = t.mesh, o = dye[t.filter]) : Jr("Missing TopoJSON feature or mesh parameter."), a = (a = e.objects[v]) ? r(e, a, o) : Jr("Invalid TopoJSON object: " + v), a && a.features || [a];
}
iZ.responseType = "json";
const h8 = {
  dsv: ZD,
  csv: IB(","),
  tsv: IB("	"),
  json: XD,
  topojson: iZ
};
function KD(e, t) {
  return arguments.length > 1 ? (h8[e] = t, this) : ua(h8, e) ? h8[e] : null;
}
function aZ(e) {
  const t = KD(e);
  return t && t.responseType || "text";
}
function oZ(e, t, r, a) {
  t = t || {};
  const v = KD(t.type || "json");
  return v || Jr("Unknown data format type: " + t.type), e = v(e, t), t.parse && pye(e, t.parse, r, a), ua(e, "columns") && delete e.columns, e;
}
function pye(e, t, r, a) {
  if (!e.length) return;
  const v = _w();
  r = r || v.timeParse, a = a || v.utcParse;
  let o = e.columns || Object.keys(e[0]), s, n, l, u, i, h;
  t === "auto" && (t = rZ(e, o)), o = Object.keys(t);
  const p = o.map((_) => {
    const d = t[_];
    let f, c;
    if (d && (d.startsWith("date:") || d.startsWith("utc:")))
      return f = d.split(/:(.+)?/, 2), c = f[1], (c[0] === "'" && c[c.length - 1] === "'" || c[0] === '"' && c[c.length - 1] === '"') && (c = c.slice(1, -1)), (f[0] === "utc" ? a : r)(c);
    if (!UE[d])
      throw Error("Illegal format pattern: " + _ + ":" + d);
    return UE[d];
  });
  for (l = 0, i = e.length, h = o.length; l < i; ++l)
    for (s = e[l], u = 0; u < h; ++u)
      n = o[u], s[n] = p[u](s[n]);
}
const y9 = Qge(
  typeof fetch < "u" && fetch,
  // use built-in fetch API
  null
  // no file system access
);
function v9(e) {
  const t = e || Uf, r = [], a = {};
  return r.add = (v) => {
    const o = t(v);
    return a[o] || (a[o] = 1, r.push(v)), r;
  }, r.remove = (v) => {
    const o = t(v);
    if (a[o]) {
      a[o] = 0;
      const s = r.indexOf(v);
      s >= 0 && r.splice(s, 1);
    }
    return r;
  }, r;
}
async function d8(e, t) {
  try {
    await t(e);
  } catch (r) {
    e.error(r);
  }
}
const sZ = Symbol("vega_id");
let mye = 1;
function x9(e) {
  return !!(e && sa(e));
}
function sa(e) {
  return e[sZ];
}
function lZ(e, t) {
  return e[sZ] = t, e;
}
function rs(e) {
  const t = e === Object(e) ? e : {
    data: e
  };
  return sa(t) ? t : lZ(t, mye++);
}
function JD(e) {
  return b9(e, rs({}));
}
function b9(e, t) {
  for (const r in e) t[r] = e[r];
  return t;
}
function uZ(e, t) {
  return lZ(t, sa(e));
}
function qv(e, t) {
  return e ? t ? (r, a) => e(r, a) || sa(t(r)) - sa(t(a)) : (r, a) => e(r, a) || sa(r) - sa(a) : null;
}
function cZ(e) {
  return e && e.constructor === Hv;
}
function Hv() {
  const e = [], t = [], r = [], a = [], v = [];
  let o = null, s = !1;
  return {
    constructor: Hv,
    insert(n) {
      const l = Ri(n), u = l.length;
      for (let i = 0; i < u; ++i) e.push(l[i]);
      return this;
    },
    remove(n) {
      const l = qa(n) ? a : t, u = Ri(n), i = u.length;
      for (let h = 0; h < i; ++h) l.push(u[h]);
      return this;
    },
    modify(n, l, u) {
      const i = {
        field: l,
        value: Vf(u)
      };
      return qa(n) ? (i.filter = n, v.push(i)) : (i.tuple = n, r.push(i)), this;
    },
    encode(n, l) {
      return qa(n) ? v.push({
        filter: n,
        field: l
      }) : r.push({
        tuple: n,
        field: l
      }), this;
    },
    clean(n) {
      return o = n, this;
    },
    reflow() {
      return s = !0, this;
    },
    pulse(n, l) {
      const u = {}, i = {};
      let h, p, _, d, f, c;
      for (h = 0, p = l.length; h < p; ++h)
        u[sa(l[h])] = 1;
      for (h = 0, p = t.length; h < p; ++h)
        f = t[h], u[sa(f)] = -1;
      for (h = 0, p = a.length; h < p; ++h)
        d = a[h], l.forEach((m) => {
          d(m) && (u[sa(m)] = -1);
        });
      for (h = 0, p = e.length; h < p; ++h)
        f = e[h], c = sa(f), u[c] ? u[c] = 1 : n.add.push(rs(e[h]));
      for (h = 0, p = l.length; h < p; ++h)
        f = l[h], u[sa(f)] < 0 && n.rem.push(f);
      function g(m, x, w) {
        w ? m[x] = w(m) : n.encode = x, s || (i[sa(m)] = m);
      }
      for (h = 0, p = r.length; h < p; ++h)
        _ = r[h], f = _.tuple, d = _.field, c = u[sa(f)], c > 0 && (g(f, d, _.value), n.modifies(d));
      for (h = 0, p = v.length; h < p; ++h)
        _ = v[h], d = _.filter, l.forEach((m) => {
          d(m) && u[sa(m)] > 0 && g(m, _.field, _.value);
        }), n.modifies(_.field);
      if (s)
        n.mod = t.length || a.length ? l.filter((m) => u[sa(m)] > 0) : l.slice();
      else
        for (c in i) n.mod.push(i[c]);
      return (o || o == null && (t.length || a.length)) && n.clean(!0), n;
    }
  };
}
const p8 = "_:mod:_";
function _9() {
  Object.defineProperty(this, p8, {
    writable: !0,
    value: {}
  });
}
_9.prototype = {
  /**
   * Set a parameter value. If the parameter value changes, the parameter
   * will be recorded as modified.
   * @param {string} name - The parameter name.
   * @param {number} index - The index into an array-value parameter. Ignored if
   *   the argument is undefined, null or less than zero.
   * @param {*} value - The parameter value to set.
   * @param {boolean} [force=false] - If true, records the parameter as modified
   *   even if the value is unchanged.
   * @return {Parameters} - This parameter object.
   */
  set(e, t, r, a) {
    const v = this, o = v[e], s = v[p8];
    return t != null && t >= 0 ? (o[t] !== r || a) && (o[t] = r, s[t + ":" + e] = -1, s[e] = -1) : (o !== r || a) && (v[e] = r, s[e] = Qr(r) ? 1 + r.length : -1), v;
  },
  /**
   * Tests if one or more parameters has been modified. If invoked with no
   * arguments, returns true if any parameter value has changed. If the first
   * argument is array, returns trues if any parameter name in the array has
   * changed. Otherwise, tests if the given name and optional array index has
   * changed.
   * @param {string} name - The parameter name to test.
   * @param {number} [index=undefined] - The parameter array index to test.
   * @return {boolean} - Returns true if a queried parameter was modified.
   */
  modified(e, t) {
    const r = this[p8];
    if (arguments.length) {
      if (Qr(e)) {
        for (let a = 0; a < e.length; ++a)
          if (r[e[a]]) return !0;
        return !1;
      }
    } else {
      for (const a in r)
        if (r[a]) return !0;
      return !1;
    }
    return t != null && t >= 0 ? t + 1 < r[e] || !!r[t + ":" + e] : !!r[e];
  },
  /**
   * Clears the modification records. After calling this method,
   * all parameters are considered unmodified.
   */
  clear() {
    return this[p8] = {}, this;
  }
};
let gye = 0;
const yye = "pulse", vye = new _9(), xye = 1, bye = 2;
function Zs(e, t, r, a) {
  this.id = ++gye, this.value = e, this.stamp = -1, this.rank = -1, this.qrank = -1, this.flags = 0, t && (this._update = t), r && this.parameters(r, a);
}
function DB(e) {
  return function(t) {
    const r = this.flags;
    return arguments.length === 0 ? !!(r & e) : (this.flags = t ? r | e : r & ~e, this);
  };
}
Zs.prototype = {
  /**
   * Returns a list of target operators dependent on this operator.
   * If this list does not exist, it is created and then returned.
   * @return {UniqueList}
   */
  targets() {
    return this._targets || (this._targets = v9(o4));
  },
  /**
   * Sets the value of this operator.
   * @param {*} value - the value to set.
   * @return {Number} Returns 1 if the operator value has changed
   *   according to strict equality, returns 0 otherwise.
   */
  set(e) {
    return this.value !== e ? (this.value = e, 1) : 0;
  },
  /**
   * Indicates that operator evaluation should be skipped on the next pulse.
   * This operator will still propagate incoming pulses, but its update function
   * will not be invoked. The skip flag is reset after every pulse, so calling
   * this method will affect processing of the next pulse only.
   */
  skip: DB(xye),
  /**
   * Indicates that this operator's value has been modified on its most recent
   * pulse. Normally modification is checked via strict equality; however, in
   * some cases it is more efficient to update the internal state of an object.
   * In those cases, the modified flag can be used to trigger propagation. Once
   * set, the modification flag persists across pulses until unset. The flag can
   * be used with the last timestamp to test if a modification is recent.
   */
  modified: DB(bye),
  /**
   * Sets the parameters for this operator. The parameter values are analyzed for
   * operator instances. If found, this operator will be added as a dependency
   * of the parameterizing operator. Operator values are dynamically marshalled
   * from each operator parameter prior to evaluation. If a parameter value is
   * an array, the array will also be searched for Operator instances. However,
   * the search does not recurse into sub-arrays or object properties.
   * @param {object} params - A hash of operator parameters.
   * @param {boolean} [react=true] - A flag indicating if this operator should
   *   automatically update (react) when parameter values change. In other words,
   *   this flag determines if the operator registers itself as a listener on
   *   any upstream operators included in the parameters.
   * @param {boolean} [initonly=false] - A flag indicating if this operator
   *   should calculate an update only upon its initial evaluation, then
   *   deregister dependencies and suppress all future update invocations.
   * @return {Operator[]} - An array of upstream dependencies.
   */
  parameters(e, t, r) {
    t = t !== !1;
    const a = this._argval = this._argval || new _9(), v = this._argops = this._argops || [], o = [];
    let s, n, l, u;
    const i = (h, p, _) => {
      _ instanceof Zs ? (_ !== this && (t && _.targets().add(this), o.push(_)), v.push({
        op: _,
        name: h,
        index: p
      })) : a.set(h, p, _);
    };
    for (s in e)
      if (n = e[s], s === yye)
        Ri(n).forEach((h) => {
          h instanceof Zs ? h !== this && (h.targets().add(this), o.push(h)) : Jr("Pulse parameters must be operator instances.");
        }), this.source = n;
      else if (Qr(n))
        for (a.set(s, -1, Array(l = n.length)), u = 0; u < l; ++u) i(s, u, n[u]);
      else
        i(s, -1, n);
    return this.marshall().clear(), r && (v.initonly = !0), o;
  },
  /**
   * Internal method for marshalling parameter values.
   * Visits each operator dependency to pull the latest value.
   * @return {Parameters} A Parameters object to pass to the update function.
   */
  marshall(e) {
    const t = this._argval || vye, r = this._argops;
    let a, v, o, s;
    if (r) {
      const n = r.length;
      for (v = 0; v < n; ++v)
        a = r[v], o = a.op, s = o.modified() && o.stamp === e, t.set(a.name, a.index, o.value, s);
      if (r.initonly) {
        for (v = 0; v < n; ++v)
          a = r[v], a.op.targets().remove(this);
        this._argops = null, this._update = null;
      }
    }
    return t;
  },
  /**
   * Detach this operator from the dataflow.
   * Unregisters listeners on upstream dependencies.
   */
  detach() {
    const e = this._argops;
    let t, r, a, v;
    if (e)
      for (t = 0, r = e.length; t < r; ++t)
        a = e[t], v = a.op, v._targets && v._targets.remove(this);
    this.pulse = null, this.source = null;
  },
  /**
   * Delegate method to perform operator processing.
   * Subclasses can override this method to perform custom processing.
   * By default, it marshalls parameters and calls the update function
   * if that function is defined. If the update function does not
   * change the operator value then StopPropagation is returned.
   * If no update function is defined, this method does nothing.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return The output pulse or StopPropagation. A falsy return value
   *   (including undefined) will let the input pulse pass through.
   */
  evaluate(e) {
    const t = this._update;
    if (t) {
      const r = this.marshall(e.stamp), a = t.call(this, r, e);
      if (r.clear(), a !== this.value)
        this.value = a;
      else if (!this.modified())
        return e.StopPropagation;
    }
  },
  /**
   * Run this operator for the current pulse. If this operator has already
   * been run at (or after) the pulse timestamp, returns StopPropagation.
   * Internally, this method calls {@link evaluate} to perform processing.
   * If {@link evaluate} returns a falsy value, the input pulse is returned.
   * This method should NOT be overridden, instead overrride {@link evaluate}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return the output pulse for this operator (or StopPropagation)
   */
  run(e) {
    if (e.stamp < this.stamp) return e.StopPropagation;
    let t;
    return this.skip() ? (this.skip(!1), t = 0) : t = this.evaluate(e), this.pulse = t || e;
  }
};
function _ye(e, t, r, a) {
  let v = 1, o;
  return e instanceof Zs ? o = e : e && e.prototype instanceof Zs ? o = new e() : qa(e) ? o = new Zs(null, e) : (v = 0, o = new Zs(e, t)), this.rank(o), v && (a = r, r = t), r && this.connect(o, o.parameters(r, a)), this.touch(o), o;
}
function wye(e, t) {
  const r = e.rank, a = t.length;
  for (let v = 0; v < a; ++v)
    if (r < t[v].rank) {
      this.rerank(e);
      return;
    }
}
let kye = 0;
function w9(e, t, r) {
  this.id = ++kye, this.value = null, r && (this.receive = r), e && (this._filter = e), t && (this._apply = t);
}
function P1(e, t, r) {
  return new w9(e, t, r);
}
w9.prototype = {
  _filter: Ld,
  _apply: Uf,
  targets() {
    return this._targets || (this._targets = v9(o4));
  },
  consume(e) {
    return arguments.length ? (this._consume = !!e, this) : !!this._consume;
  },
  receive(e) {
    if (this._filter(e)) {
      const t = this.value = this._apply(e), r = this._targets, a = r ? r.length : 0;
      for (let v = 0; v < a; ++v) r[v].receive(t);
      this._consume && (e.preventDefault(), e.stopPropagation());
    }
  },
  filter(e) {
    const t = P1(e);
    return this.targets().add(t), t;
  },
  apply(e) {
    const t = P1(null, e);
    return this.targets().add(t), t;
  },
  merge() {
    const e = P1();
    this.targets().add(e);
    for (let t = 0, r = arguments.length; t < r; ++t)
      arguments[t].targets().add(e);
    return e;
  },
  throttle(e) {
    let t = -1;
    return this.filter(() => {
      const r = Date.now();
      return r - t > e ? (t = r, 1) : 0;
    });
  },
  debounce(e) {
    const t = P1();
    return this.targets().add(P1(null, null, zD(e, (r) => {
      const a = r.dataflow;
      t.receive(r), a && a.run && a.run();
    }))), t;
  },
  between(e, t) {
    let r = !1;
    return e.targets().add(P1(null, null, () => r = !0)), t.targets().add(P1(null, null, () => r = !1)), this.filter(() => r);
  },
  detach() {
    this._filter = Ld, this._targets = null;
  }
};
function Tye(e, t, r, a) {
  const v = this, o = P1(r, a), s = function(u) {
    u.dataflow = v;
    try {
      o.receive(u);
    } catch (i) {
      v.error(i);
    } finally {
      v.run();
    }
  };
  let n;
  typeof e == "string" && typeof document < "u" ? n = document.querySelectorAll(e) : n = Ri(e);
  const l = n.length;
  for (let u = 0; u < l; ++u)
    n[u].addEventListener(t, s);
  return o;
}
function Aye(e, t) {
  const r = this.locale();
  return oZ(e, t, r.timeParse, r.utcParse);
}
function Sye(e, t, r) {
  return t = this.parse(t, r), this.pulse(e, this.changeset().insert(t));
}
async function Mye(e, t) {
  const r = this;
  let a = 0, v;
  try {
    v = await r.loader().load(e, {
      context: "dataflow",
      response: aZ(t && t.type)
    });
    try {
      v = r.parse(v, t);
    } catch (o) {
      a = -2, r.warn("Data ingestion failed", e, o);
    }
  } catch (o) {
    a = -1, r.warn("Loading failed", e, o);
  }
  return {
    data: v,
    status: a
  };
}
async function Eye(e, t, r) {
  const a = this, v = a._pending || Cye(a);
  v.requests += 1;
  const o = await a.request(t, r);
  return a.pulse(e, a.changeset().remove(Ld).insert(o.data || [])), v.done(), o;
}
function Cye(e) {
  let t;
  const r = new Promise((a) => t = a);
  return r.requests = 0, r.done = () => {
    --r.requests === 0 && (e._pending = null, t(e));
  }, e._pending = r;
}
const Iye = {
  skip: !0
};
function Dye(e, t, r, a, v) {
  return (e instanceof Zs ? Pye : Lye)(this, e, t, r, a, v), this;
}
function Lye(e, t, r, a, v, o) {
  const s = $a({}, o, Iye);
  let n, l;
  qa(r) || (r = Vf(r)), a === void 0 ? n = (u) => e.touch(r(u)) : qa(a) ? (l = new Zs(null, a, v, !1), n = (u) => {
    l.evaluate(u);
    const i = r(u), h = l.value;
    cZ(h) ? e.pulse(i, h, o) : e.update(i, h, s);
  }) : n = (u) => e.update(r(u), a, s), t.apply(n);
}
function Pye(e, t, r, a, v, o) {
  if (a === void 0)
    t.targets().add(r);
  else {
    const s = o || {}, n = new Zs(null, Oye(r, a), v, !1);
    n.modified(s.force), n.rank = t.rank, t.targets().add(n), r && (n.skip(!0), n.value = r.value, n.targets().add(r), e.connect(r, [n]));
  }
}
function Oye(e, t) {
  return t = qa(t) ? t : Vf(t), e ? function(r, a) {
    const v = t(r, a);
    return e.skip() || (e.skip(v !== this.value).value = v), v;
  } : t;
}
function zye(e) {
  e.rank = ++this._rank;
}
function Rye(e) {
  const t = [e];
  let r, a, v;
  for (; t.length; )
    if (this.rank(r = t.pop()), a = r._targets)
      for (v = a.length; --v >= 0; )
        t.push(r = a[v]), r === e && Jr("Cycle detected in dataflow graph.");
}
const f7 = {}, r0 = 1, j1 = 2, bm = 4, Fye = r0 | j1, LB = r0 | bm, B2 = r0 | j1 | bm, PB = 8, G_ = 16, OB = 32, zB = 64;
function ug(e, t, r) {
  this.dataflow = e, this.stamp = t ?? -1, this.add = [], this.rem = [], this.mod = [], this.fields = null, this.encode = r || null;
}
function NS(e, t) {
  const r = [];
  return B1(e, t, (a) => r.push(a)), r;
}
function RB(e, t) {
  const r = {};
  return e.visit(t, (a) => {
    r[sa(a)] = 1;
  }), (a) => r[sa(a)] ? null : a;
}
function d6(e, t) {
  return e ? (r, a) => e(r, a) && t(r, a) : t;
}
ug.prototype = {
  /**
   * Sentinel value indicating pulse propagation should stop.
   */
  StopPropagation: f7,
  /**
   * Boolean flag indicating ADD (added) tuples.
   */
  ADD: r0,
  /**
   * Boolean flag indicating REM (removed) tuples.
   */
  REM: j1,
  /**
   * Boolean flag indicating MOD (modified) tuples.
   */
  MOD: bm,
  /**
   * Boolean flag indicating ADD (added) and REM (removed) tuples.
   */
  ADD_REM: Fye,
  /**
   * Boolean flag indicating ADD (added) and MOD (modified) tuples.
   */
  ADD_MOD: LB,
  /**
   * Boolean flag indicating ADD, REM and MOD tuples.
   */
  ALL: B2,
  /**
   * Boolean flag indicating all tuples in a data source
   * except for the ADD, REM and MOD tuples.
   */
  REFLOW: PB,
  /**
   * Boolean flag indicating a 'pass-through' to a
   * backing data source, ignoring ADD, REM and MOD tuples.
   */
  SOURCE: G_,
  /**
   * Boolean flag indicating that source data should be
   * suppressed when creating a forked pulse.
   */
  NO_SOURCE: OB,
  /**
   * Boolean flag indicating that field modifications should be
   * suppressed when creating a forked pulse.
   */
  NO_FIELDS: zB,
  /**
   * Creates a new pulse based on the values of this pulse.
   * The dataflow, time stamp and field modification values are copied over.
   * By default, new empty ADD, REM and MOD arrays are created.
   * @param {number} flags - Integer of boolean flags indicating which (if any)
   *   tuple arrays should be copied to the new pulse. The supported flag values
   *   are ADD, REM and MOD. Array references are copied directly: new array
   *   instances are not created.
   * @return {Pulse} - The forked pulse instance.
   * @see init
   */
  fork(e) {
    return new ug(this.dataflow).init(this, e);
  },
  /**
   * Creates a copy of this pulse with new materialized array
   * instances for the ADD, REM, MOD, and SOURCE arrays.
   * The dataflow, time stamp and field modification values are copied over.
   * @return {Pulse} - The cloned pulse instance.
   * @see init
   */
  clone() {
    const e = this.fork(B2);
    return e.add = e.add.slice(), e.rem = e.rem.slice(), e.mod = e.mod.slice(), e.source && (e.source = e.source.slice()), e.materialize(B2 | G_);
  },
  /**
   * Returns a pulse that adds all tuples from a backing source. This is
   * useful for cases where operators are added to a dataflow after an
   * upstream data pipeline has already been processed, ensuring that
   * new operators can observe all tuples within a stream.
   * @return {Pulse} - A pulse instance with all source tuples included
   *   in the add array. If the current pulse already has all source
   *   tuples in its add array, it is returned directly. If the current
   *   pulse does not have a backing source, it is returned directly.
   */
  addAll() {
    let e = this;
    return !e.source || e.add === e.rem || !e.rem.length && e.source.length === e.add.length || (e = new ug(this.dataflow).init(this), e.add = e.source, e.rem = []), e;
  },
  /**
   * Initialize this pulse based on the values of another pulse. This method
   * is used internally by {@link fork} to initialize a new forked tuple.
   * The dataflow, time stamp and field modification values are copied over.
   * By default, new empty ADD, REM and MOD arrays are created.
   * @param {Pulse} src - The source pulse to copy from.
   * @param {number} flags - Integer of boolean flags indicating which (if any)
   *   tuple arrays should be copied to the new pulse. The supported flag values
   *   are ADD, REM and MOD. Array references are copied directly: new array
   *   instances are not created. By default, source data arrays are copied
   *   to the new pulse. Use the NO_SOURCE flag to enforce a null source.
   * @return {Pulse} - Returns this Pulse instance.
   */
  init(e, t) {
    const r = this;
    return r.stamp = e.stamp, r.encode = e.encode, e.fields && !(t & zB) && (r.fields = e.fields), t & r0 ? (r.addF = e.addF, r.add = e.add) : (r.addF = null, r.add = []), t & j1 ? (r.remF = e.remF, r.rem = e.rem) : (r.remF = null, r.rem = []), t & bm ? (r.modF = e.modF, r.mod = e.mod) : (r.modF = null, r.mod = []), t & OB ? (r.srcF = null, r.source = null) : (r.srcF = e.srcF, r.source = e.source, e.cleans && (r.cleans = e.cleans)), r;
  },
  /**
   * Schedules a function to run after pulse propagation completes.
   * @param {function} func - The function to run.
   */
  runAfter(e) {
    this.dataflow.runAfter(e);
  },
  /**
   * Indicates if tuples have been added, removed or modified.
   * @param {number} [flags] - The tuple types (ADD, REM or MOD) to query.
   *   Defaults to ALL, returning true if any tuple type has changed.
   * @return {boolean} - Returns true if one or more queried tuple types have
   *   changed, false otherwise.
   */
  changed(e) {
    const t = e || B2;
    return t & r0 && this.add.length || t & j1 && this.rem.length || t & bm && this.mod.length;
  },
  /**
   * Forces a "reflow" of tuple values, such that all tuples in the backing
   * source are added to the MOD set, unless already present in the ADD set.
   * @param {boolean} [fork=false] - If true, returns a forked copy of this
   *   pulse, and invokes reflow on that derived pulse.
   * @return {Pulse} - The reflowed pulse instance.
   */
  reflow(e) {
    if (e) return this.fork(B2).reflow();
    const t = this.add.length, r = this.source && this.source.length;
    return r && r !== t && (this.mod = this.source, t && this.filter(bm, RB(this, r0))), this;
  },
  /**
   * Get/set metadata to pulse requesting garbage collection
   * to reclaim currently unused resources.
   */
  clean(e) {
    return arguments.length ? (this.cleans = !!e, this) : this.cleans;
  },
  /**
   * Marks one or more data field names as modified to assist dependency
   * tracking and incremental processing by transform operators.
   * @param {string|Array<string>} _ - The field(s) to mark as modified.
   * @return {Pulse} - This pulse instance.
   */
  modifies(e) {
    const t = this.fields || (this.fields = {});
    return Qr(e) ? e.forEach((r) => t[r] = !0) : t[e] = !0, this;
  },
  /**
   * Checks if one or more data fields have been modified during this pulse
   * propagation timestamp.
   * @param {string|Array<string>} _ - The field(s) to check for modified.
   * @param {boolean} nomod - If true, will check the modified flag even if
   *   no mod tuples exist. If false (default), mod tuples must be present.
   * @return {boolean} - Returns true if any of the provided fields has been
   *   marked as modified, false otherwise.
   */
  modified(e, t) {
    const r = this.fields;
    return (t || this.mod.length) && r ? arguments.length ? Qr(e) ? e.some((a) => r[a]) : r[e] : !!r : !1;
  },
  /**
   * Adds a filter function to one more tuple sets. Filters are applied to
   * backing tuple arrays, to determine the actual set of tuples considered
   * added, removed or modified. They can be used to delay materialization of
   * a tuple set in order to avoid expensive array copies. In addition, the
   * filter functions can serve as value transformers: unlike standard predicate
   * function (which return boolean values), Pulse filters should return the
   * actual tuple value to process. If a tuple set is already filtered, the
   * new filter function will be appended into a conjuntive ('and') query.
   * @param {number} flags - Flags indicating the tuple set(s) to filter.
   * @param {function(*):object} filter - Filter function that will be applied
   *   to the tuple set array, and should return a data tuple if the value
   *   should be included in the tuple set, and falsy (or null) otherwise.
   * @return {Pulse} - Returns this pulse instance.
   */
  filter(e, t) {
    const r = this;
    return e & r0 && (r.addF = d6(r.addF, t)), e & j1 && (r.remF = d6(r.remF, t)), e & bm && (r.modF = d6(r.modF, t)), e & G_ && (r.srcF = d6(r.srcF, t)), r;
  },
  /**
   * Materialize one or more tuple sets in this pulse. If the tuple set(s) have
   * a registered filter function, it will be applied and the tuple set(s) will
   * be replaced with materialized tuple arrays.
   * @param {number} flags - Flags indicating the tuple set(s) to materialize.
   * @return {Pulse} - Returns this pulse instance.
   */
  materialize(e) {
    e = e || B2;
    const t = this;
    return e & r0 && t.addF && (t.add = NS(t.add, t.addF), t.addF = null), e & j1 && t.remF && (t.rem = NS(t.rem, t.remF), t.remF = null), e & bm && t.modF && (t.mod = NS(t.mod, t.modF), t.modF = null), e & G_ && t.srcF && (t.source = t.source.filter(t.srcF), t.srcF = null), t;
  },
  /**
   * Visit one or more tuple sets in this pulse.
   * @param {number} flags - Flags indicating the tuple set(s) to visit.
   *   Legal values are ADD, REM, MOD and SOURCE (if a backing data source
   *   has been set).
   * @param {function(object):*} - Visitor function invoked per-tuple.
   * @return {Pulse} - Returns this pulse instance.
   */
  visit(e, t) {
    const r = this, a = t;
    if (e & G_)
      return B1(r.source, r.srcF, a), r;
    e & r0 && B1(r.add, r.addF, a), e & j1 && B1(r.rem, r.remF, a), e & bm && B1(r.mod, r.modF, a);
    const v = r.source;
    if (e & PB && v) {
      const o = r.add.length + r.mod.length;
      o === v.length || (o ? B1(v, RB(r, LB), a) : B1(v, r.srcF, a));
    }
    return r;
  }
};
function QD(e, t, r, a) {
  const v = this;
  let o = 0;
  this.dataflow = e, this.stamp = t, this.fields = null, this.encode = a || null, this.pulses = r;
  for (const s of r)
    if (s.stamp === t) {
      if (s.fields) {
        const n = v.fields || (v.fields = {});
        for (const l in s.fields)
          n[l] = 1;
      }
      s.changed(v.ADD) && (o |= v.ADD), s.changed(v.REM) && (o |= v.REM), s.changed(v.MOD) && (o |= v.MOD);
    }
  this.changes = o;
}
Si(QD, ug, {
  /**
   * Creates a new pulse based on the values of this pulse.
   * The dataflow, time stamp and field modification values are copied over.
   * @return {Pulse}
   */
  fork(e) {
    const t = new ug(this.dataflow).init(this, e & this.NO_FIELDS);
    return e !== void 0 && (e & t.ADD && this.visit(t.ADD, (r) => t.add.push(r)), e & t.REM && this.visit(t.REM, (r) => t.rem.push(r)), e & t.MOD && this.visit(t.MOD, (r) => t.mod.push(r))), t;
  },
  changed(e) {
    return this.changes & e;
  },
  modified(e) {
    const t = this, r = t.fields;
    return r && t.changes & t.MOD ? Qr(e) ? e.some((a) => r[a]) : r[e] : 0;
  },
  filter() {
    Jr("MultiPulse does not support filtering.");
  },
  materialize() {
    Jr("MultiPulse does not support materialization.");
  },
  visit(e, t) {
    const r = this, a = r.pulses, v = a.length;
    let o = 0;
    if (e & r.SOURCE)
      for (; o < v; ++o)
        a[o].visit(e, t);
    else
      for (; o < v; ++o)
        a[o].stamp === r.stamp && a[o].visit(e, t);
    return r;
  }
});
async function Nye(e, t, r) {
  const a = this, v = [];
  if (a._pulse) return fZ(a);
  if (a._pending && await a._pending, t && await d8(a, t), !a._touched.length)
    return a.debug("Dataflow invoked, but nothing to do."), a;
  const o = ++a._clock;
  a._pulse = new ug(a, o, e), a._touched.forEach((i) => a._enqueue(i, !0)), a._touched = v9(o4);
  let s = 0, n, l, u;
  try {
    for (; a._heap.size() > 0; ) {
      if (n = a._heap.pop(), n.rank !== n.qrank) {
        a._enqueue(n, !0);
        continue;
      }
      l = n.run(a._getPulse(n, e)), l.then ? l = await l : l.async && (v.push(l.async), l = f7), l !== f7 && n._targets && n._targets.forEach((i) => a._enqueue(i)), ++s;
    }
  } catch (i) {
    a._heap.clear(), u = i;
  }
  if (a._input = {}, a._pulse = null, a.debug(`Pulse ${o}: ${s} operators`), u && (a._postrun = [], a.error(u)), a._postrun.length) {
    const i = a._postrun.sort((h, p) => p.priority - h.priority);
    a._postrun = [];
    for (let h = 0; h < i.length; ++h)
      await d8(a, i[h].callback);
  }
  return r && await d8(a, r), v.length && Promise.all(v).then((i) => a.runAsync(null, () => {
    i.forEach((h) => {
      try {
        h(a);
      } catch (p) {
        a.error(p);
      }
    });
  })), a;
}
async function Bye(e, t, r) {
  for (; this._running; ) await this._running;
  const a = () => this._running = null;
  return (this._running = this.evaluate(e, t, r)).then(a, a), this._running;
}
function jye(e, t, r) {
  return this._pulse ? fZ(this) : (this.evaluate(e, t, r), this);
}
function Uye(e, t, r) {
  if (this._pulse || t)
    this._postrun.push({
      priority: r || 0,
      callback: e
    });
  else
    try {
      e(this);
    } catch (a) {
      this.error(a);
    }
}
function fZ(e) {
  return e.error("Dataflow already running. Use runAsync() to chain invocations."), e;
}
function Vye(e, t) {
  const r = e.stamp < this._clock;
  r && (e.stamp = this._clock), (r || t) && (e.qrank = e.rank, this._heap.push(e));
}
function $ye(e, t) {
  const r = e.source, a = this._clock;
  return r && Qr(r) ? new QD(this, a, r.map((v) => v.pulse), t) : this._input[e.id] || qye(this._pulse, r && r.pulse);
}
function qye(e, t) {
  return t && t.stamp === e.stamp ? t : (e = e.fork(), t && t !== f7 && (e.source = t.source), e);
}
const eL = {
  skip: !1,
  force: !1
};
function Hye(e, t) {
  const r = t || eL;
  return this._pulse ? this._enqueue(e) : this._touched.add(e), r.skip && e.skip(!0), this;
}
function Gye(e, t, r) {
  const a = r || eL;
  return (e.set(t) || a.force) && this.touch(e, a), this;
}
function Wye(e, t, r) {
  this.touch(e, r || eL);
  const a = new ug(this, this._clock + (this._pulse ? 0 : 1)), v = e.pulse && e.pulse.source || [];
  return a.target = e, this._input[e.id] = t.pulse(a, v), this;
}
function Yye(e) {
  let t = [];
  return {
    clear: () => t = [],
    size: () => t.length,
    peek: () => t[0],
    push: (r) => (t.push(r), hZ(t, 0, t.length - 1, e)),
    pop: () => {
      const r = t.pop();
      let a;
      return t.length ? (a = t[0], t[0] = r, Zye(t, 0, e)) : a = r, a;
    }
  };
}
function hZ(e, t, r, a) {
  let v, o;
  const s = e[r];
  for (; r > t; ) {
    if (o = r - 1 >> 1, v = e[o], a(s, v) < 0) {
      e[r] = v, r = o;
      continue;
    }
    break;
  }
  return e[r] = s;
}
function Zye(e, t, r) {
  const a = t, v = e.length, o = e[t];
  let s = (t << 1) + 1, n;
  for (; s < v; )
    n = s + 1, n < v && r(e[s], e[n]) >= 0 && (s = n), e[t] = e[s], t = s, s = (t << 1) + 1;
  return e[t] = o, hZ(e, a, t, r);
}
function gx() {
  this.logger(ID()), this.logLevel(ED), this._clock = 0, this._rank = 0, this._locale = YD();
  try {
    this._loader = y9();
  } catch {
  }
  this._touched = v9(o4), this._input = {}, this._pulse = null, this._heap = Yye((e, t) => e.qrank - t.qrank), this._postrun = [];
}
function W_(e) {
  return function() {
    return this._log[e].apply(this, arguments);
  };
}
gx.prototype = {
  /**
   * The current timestamp of this dataflow. This value reflects the
   * timestamp of the previous dataflow run. The dataflow is initialized
   * with a stamp value of 0. The initial run of the dataflow will have
   * a timestap of 1, and so on. This value will match the
   * {@link Pulse.stamp} property.
   * @return {number} - The current timestamp value.
   */
  stamp() {
    return this._clock;
  },
  /**
   * Gets or sets the loader instance to use for data file loading. A
   * loader object must provide a "load" method for loading files and a
   * "sanitize" method for checking URL/filename validity. Both methods
   * should accept a URI and options hash as arguments, and return a Promise
   * that resolves to the loaded file contents (load) or a hash containing
   * sanitized URI data with the sanitized url assigned to the "href" property
   * (sanitize).
   * @param {object} _ - The loader instance to use.
   * @return {object|Dataflow} - If no arguments are provided, returns
   *   the current loader instance. Otherwise returns this Dataflow instance.
   */
  loader(e) {
    return arguments.length ? (this._loader = e, this) : this._loader;
  },
  /**
   * Gets or sets the locale instance to use for formatting and parsing
   * string values. The locale object should be provided by the
   * vega-format library, and include methods such as format, timeFormat,
   * utcFormat, timeParse, and utcParse.
   * @param {object} _ - The locale instance to use.
   * @return {object|Dataflow} - If no arguments are provided, returns
   *   the current locale instance. Otherwise returns this Dataflow instance.
   */
  locale(e) {
    return arguments.length ? (this._locale = e, this) : this._locale;
  },
  /**
   * Get or set the logger instance used to log messages. If no arguments are
   * provided, returns the current logger instance. Otherwise, sets the logger
   * and return this Dataflow instance. Provided loggers must support the full
   * API of logger objects generated by the vega-util logger method. Note that
   * by default the log level of the new logger will be used; use the logLevel
   * method to adjust the log level as needed.
   */
  logger(e) {
    return arguments.length ? (this._log = e, this) : this._log;
  },
  /**
   * Logs an error message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit error messages.
   */
  error: W_("error"),
  /**
   * Logs a warning message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit warning messages.
   */
  warn: W_("warn"),
  /**
   * Logs a information message. By default, logged messages are written to
   * console output. The message will only be logged if the current log level is
   * high enough to permit information messages.
   */
  info: W_("info"),
  /**
   * Logs a debug message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit debug messages.
   */
  debug: W_("debug"),
  /**
   * Get or set the current log level. If an argument is provided, it
   * will be used as the new log level.
   * @param {number} [level] - Should be one of None, Warn, Info
   * @return {number} - The current log level.
   */
  logLevel: W_("level"),
  /**
   * Empty entry threshold for garbage cleaning. Map data structures will
   * perform cleaning once the number of empty entries exceeds this value.
   */
  cleanThreshold: 1e4,
  // OPERATOR REGISTRATION
  add: _ye,
  connect: wye,
  rank: zye,
  rerank: Rye,
  // OPERATOR UPDATES
  pulse: Wye,
  touch: Hye,
  update: Gye,
  changeset: Hv,
  // DATA LOADING
  ingest: Sye,
  parse: Aye,
  preload: Eye,
  request: Mye,
  // EVENT HANDLING
  events: Tye,
  on: Dye,
  // PULSE PROPAGATION
  evaluate: Nye,
  run: jye,
  runAsync: Bye,
  runAfter: Uye,
  _enqueue: Vye,
  _getPulse: $ye
};
function qr(e, t) {
  Zs.call(this, e, null, t);
}
Si(qr, Zs, {
  /**
   * Overrides {@link Operator.evaluate} for transform operators.
   * Internally, this method calls {@link evaluate} to perform processing.
   * If {@link evaluate} returns a falsy value, the input pulse is returned.
   * This method should NOT be overridden, instead overrride {@link evaluate}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return the output pulse for this operator (or StopPropagation)
   */
  run(e) {
    if (e.stamp < this.stamp) return e.StopPropagation;
    let t;
    return this.skip() ? this.skip(!1) : t = this.evaluate(e), t = t || e, t.then ? t = t.then((r) => this.pulse = r) : t !== e.StopPropagation && (this.pulse = t), t;
  },
  /**
   * Overrides {@link Operator.evaluate} for transform operators.
   * Marshalls parameter values and then invokes {@link transform}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return {Pulse} The output pulse (or StopPropagation). A falsy return
       value (including undefined) will let the input pulse pass through.
  */
  evaluate(e) {
    const t = this.marshall(e.stamp), r = this.transform(t, e);
    return t.clear(), r;
  },
  /**
   * Process incoming pulses.
   * Subclasses should override this method to implement transforms.
   * @param {Parameters} _ - The operator parameter values.
   * @param {Pulse} pulse - The current dataflow pulse.
   * @return {Pulse} The output pulse (or StopPropagation). A falsy return
   *   value (including undefined) will let the input pulse pass through.
   */
  transform() {
  }
});
const zx = {};
function dZ(e) {
  const t = pZ(e);
  return t && t.Definition || null;
}
function pZ(e) {
  return e = e && e.toLowerCase(), ua(zx, e) ? zx[e] : null;
}
function* mZ(e, t) {
  if (t == null)
    for (let r of e)
      r != null && r !== "" && (r = +r) >= r && (yield r);
  else {
    let r = -1;
    for (let a of e)
      a = t(a, ++r, e), a != null && a !== "" && (a = +a) >= a && (yield a);
  }
}
function tL(e, t, r) {
  const a = Float64Array.from(mZ(e, r));
  return a.sort(Pm), t.map((v) => fY(a, v));
}
function nL(e, t) {
  return tL(e, [0.25, 0.5, 0.75], t);
}
function rL(e, t) {
  const r = e.length, a = i1e(e, t), v = nL(e, t), o = (v[2] - v[0]) / 1.34;
  return 1.06 * (Math.min(a, o) || a || Math.abs(v[0]) || 1) * Math.pow(r, -0.2);
}
function gZ(e) {
  const t = e.maxbins || 20, r = e.base || 10, a = Math.log(r), v = e.divide || [5, 2];
  let o = e.extent[0], s = e.extent[1], n, l, u, i, h, p;
  const _ = e.span || s - o || Math.abs(o) || 1;
  if (e.step)
    n = e.step;
  else if (e.steps) {
    for (i = _ / t, h = 0, p = e.steps.length; h < p && e.steps[h] < i; ++h) ;
    n = e.steps[Math.max(0, h - 1)];
  } else {
    for (l = Math.ceil(Math.log(t) / a), u = e.minstep || 0, n = Math.max(u, Math.pow(r, Math.round(Math.log(_) / a) - l)); Math.ceil(_ / n) > t; )
      n *= r;
    for (h = 0, p = v.length; h < p; ++h)
      i = n / v[h], i >= u && _ / i <= t && (n = i);
  }
  i = Math.log(n);
  const d = i >= 0 ? 0 : ~~(-i / a) + 1, f = Math.pow(r, -d - 1);
  return (e.nice || e.nice === void 0) && (i = Math.floor(o / n + f) * n, o = o < i ? i - n : i, s = Math.ceil(s / n) * n), {
    start: o,
    stop: s === o ? o + n : s,
    step: n
  };
}
var Od = Math.random;
function Xye(e) {
  Od = e;
}
function yZ(e, t, r, a) {
  if (!e.length) return [void 0, void 0];
  const v = Float64Array.from(mZ(e, a)), o = v.length, s = t;
  let n, l, u, i;
  for (u = 0, i = Array(s); u < s; ++u) {
    for (n = 0, l = 0; l < o; ++l)
      n += v[~~(Od() * o)];
    i[u] = n / o;
  }
  return i.sort(Pm), [LE(i, r / 2), LE(i, 1 - r / 2)];
}
function vZ(e, t, r, a) {
  a = a || ((p) => p);
  const v = e.length, o = new Float64Array(v);
  let s = 0, n = 1, l = a(e[0]), u = l, i = l + t, h;
  for (; n < v; ++n) {
    if (h = a(e[n]), h >= i) {
      for (u = (l + u) / 2; s < n; ++s) o[s] = u;
      i = h + t, l = h;
    }
    u = h;
  }
  for (u = (l + u) / 2; s < n; ++s) o[s] = u;
  return r ? Kye(o, t + t / 4) : o;
}
function Kye(e, t) {
  const r = e.length;
  let a = 0, v = 1, o, s;
  for (; e[a] === e[v]; ) ++v;
  for (; v < r; ) {
    for (o = v + 1; e[v] === e[o]; ) ++o;
    if (e[v] - e[v - 1] < t) {
      for (s = v + (a + o - v - v >> 1); s < v; ) e[s++] = e[v];
      for (; s > v; ) e[s--] = e[a];
    }
    a = v, v = o;
  }
  return e;
}
function Jye(e) {
  return function() {
    return e = (1103515245 * e + 12345) % 2147483647, e / 2147483647;
  };
}
function Qye(e, t) {
  t == null && (t = e, e = 0);
  let r, a, v;
  const o = {
    min(s) {
      return arguments.length ? (r = s || 0, v = a - r, o) : r;
    },
    max(s) {
      return arguments.length ? (a = s || 0, v = a - r, o) : a;
    },
    sample() {
      return r + Math.floor(v * Od());
    },
    pdf(s) {
      return s === Math.floor(s) && s >= r && s < a ? 1 / v : 0;
    },
    cdf(s) {
      const n = Math.floor(s);
      return n < r ? 0 : n >= a ? 1 : (n - r + 1) / v;
    },
    icdf(s) {
      return s >= 0 && s <= 1 ? r - 1 + Math.floor(s * v) : NaN;
    }
  };
  return o.min(e).max(t);
}
const xZ = Math.sqrt(2 * Math.PI), eve = Math.SQRT2;
let Y_ = NaN;
function k9(e, t) {
  e = e || 0, t = t ?? 1;
  let r = 0, a = 0, v, o;
  if (Y_ === Y_)
    r = Y_, Y_ = NaN;
  else {
    do
      r = Od() * 2 - 1, a = Od() * 2 - 1, v = r * r + a * a;
    while (v === 0 || v > 1);
    o = Math.sqrt(-2 * Math.log(v) / v), r *= o, Y_ = a * o;
  }
  return e + r * t;
}
function iL(e, t, r) {
  r = r ?? 1;
  const a = (e - (t || 0)) / r;
  return Math.exp(-0.5 * a * a) / (r * xZ);
}
function T9(e, t, r) {
  t = t || 0, r = r ?? 1;
  const a = (e - t) / r, v = Math.abs(a);
  let o;
  if (v > 37)
    o = 0;
  else {
    const s = Math.exp(-v * v / 2);
    let n;
    v < 7.07106781186547 ? (n = 0.0352624965998911 * v + 0.700383064443688, n = n * v + 6.37396220353165, n = n * v + 33.912866078383, n = n * v + 112.079291497871, n = n * v + 221.213596169931, n = n * v + 220.206867912376, o = s * n, n = 0.0883883476483184 * v + 1.75566716318264, n = n * v + 16.064177579207, n = n * v + 86.7807322029461, n = n * v + 296.564248779674, n = n * v + 637.333633378831, n = n * v + 793.826512519948, n = n * v + 440.413735824752, o = o / n) : (n = v + 0.65, n = v + 4 / n, n = v + 3 / n, n = v + 2 / n, n = v + 1 / n, o = s / n / 2.506628274631);
  }
  return a > 0 ? 1 - o : o;
}
function A9(e, t, r) {
  return e < 0 || e > 1 ? NaN : (t || 0) + (r ?? 1) * eve * tve(2 * e - 1);
}
function tve(e) {
  let t = -Math.log((1 - e) * (1 + e)), r;
  return t < 6.25 ? (t -= 3.125, r = -364441206401782e-35, r = -16850591381820166e-35 + r * t, r = 128584807152564e-32 + r * t, r = 11157877678025181e-33 + r * t, r = -1333171662854621e-31 + r * t, r = 20972767875968562e-33 + r * t, r = 6637638134358324e-30 + r * t, r = -4054566272975207e-29 + r * t, r = -8151934197605472e-29 + r * t, r = 26335093153082323e-28 + r * t, r = -12975133253453532e-27 + r * t, r = -5415412054294628e-26 + r * t, r = 10512122733215323e-25 + r * t, r = -4112633980346984e-24 + r * t, r = -29070369957882005e-24 + r * t, r = 42347877827932404e-23 + r * t, r = -13654692000834679e-22 + r * t, r = -13882523362786469e-21 + r * t, r = 18673420803405714e-20 + r * t, r = -740702534166267e-18 + r * t, r = -0.006033670871430149 + r * t, r = 0.24015818242558962 + r * t, r = 1.6536545626831027 + r * t) : t < 16 ? (t = Math.sqrt(t) - 3.25, r = 22137376921775787e-25, r = 9075656193888539e-23 + r * t, r = -27517406297064545e-23 + r * t, r = 18239629214389228e-24 + r * t, r = 15027403968909828e-22 + r * t, r = -4013867526981546e-21 + r * t, r = 29234449089955446e-22 + r * t, r = 12475304481671779e-21 + r * t, r = -47318229009055734e-21 + r * t, r = 6828485145957318e-20 + r * t, r = 24031110387097894e-21 + r * t, r = -3550375203628475e-19 + r * t, r = 9532893797373805e-19 + r * t, r = -0.0016882755560235047 + r * t, r = 0.002491442096107851 + r * t, r = -0.003751208507569241 + r * t, r = 0.005370914553590064 + r * t, r = 1.0052589676941592 + r * t, r = 3.0838856104922208 + r * t) : Number.isFinite(t) ? (t = Math.sqrt(t) - 5, r = -27109920616438573e-27, r = -2555641816996525e-25 + r * t, r = 15076572693500548e-25 + r * t, r = -3789465440126737e-24 + r * t, r = 761570120807834e-23 + r * t, r = -1496002662714924e-23 + r * t, r = 2914795345090108e-23 + r * t, r = -6771199775845234e-23 + r * t, r = 22900482228026655e-23 + r * t, r = -99298272942317e-20 + r * t, r = 4526062597223154e-21 + r * t, r = -1968177810553167e-20 + r * t, r = 7599527703001776e-20 + r * t, r = -21503011930044477e-20 + r * t, r = -13871931833623122e-20 + r * t, r = 1.0103004648645344 + r * t, r = 4.849906401408584 + r * t) : r = 1 / 0, r * e;
}
function aL(e, t) {
  let r, a;
  const v = {
    mean(o) {
      return arguments.length ? (r = o || 0, v) : r;
    },
    stdev(o) {
      return arguments.length ? (a = o ?? 1, v) : a;
    },
    sample: () => k9(r, a),
    pdf: (o) => iL(o, r, a),
    cdf: (o) => T9(o, r, a),
    icdf: (o) => A9(o, r, a)
  };
  return v.mean(e).stdev(t);
}
function oL(e, t) {
  const r = aL();
  let a = 0;
  const v = {
    data(o) {
      return arguments.length ? (e = o, a = o ? o.length : 0, v.bandwidth(t)) : e;
    },
    bandwidth(o) {
      return arguments.length ? (t = o, !t && e && (t = rL(e)), v) : t;
    },
    sample() {
      return e[~~(Od() * a)] + t * r.sample();
    },
    pdf(o) {
      let s = 0, n = 0;
      for (; n < a; ++n)
        s += r.pdf((o - e[n]) / t);
      return s / t / a;
    },
    cdf(o) {
      let s = 0, n = 0;
      for (; n < a; ++n)
        s += r.cdf((o - e[n]) / t);
      return s / a;
    },
    icdf() {
      throw Error("KDE icdf not supported.");
    }
  };
  return v.data(e);
}
function sL(e, t) {
  return e = e || 0, t = t ?? 1, Math.exp(e + k9() * t);
}
function lL(e, t, r) {
  if (e <= 0) return 0;
  t = t || 0, r = r ?? 1;
  const a = (Math.log(e) - t) / r;
  return Math.exp(-0.5 * a * a) / (r * xZ * e);
}
function uL(e, t, r) {
  return T9(Math.log(e), t, r);
}
function cL(e, t, r) {
  return Math.exp(A9(e, t, r));
}
function bZ(e, t) {
  let r, a;
  const v = {
    mean(o) {
      return arguments.length ? (r = o || 0, v) : r;
    },
    stdev(o) {
      return arguments.length ? (a = o ?? 1, v) : a;
    },
    sample: () => sL(r, a),
    pdf: (o) => lL(o, r, a),
    cdf: (o) => uL(o, r, a),
    icdf: (o) => cL(o, r, a)
  };
  return v.mean(e).stdev(t);
}
function _Z(e, t) {
  let r = 0, a;
  function v(s) {
    const n = [];
    let l = 0, u;
    for (u = 0; u < r; ++u)
      l += n[u] = s[u] == null ? 1 : +s[u];
    for (u = 0; u < r; ++u)
      n[u] /= l;
    return n;
  }
  const o = {
    weights(s) {
      return arguments.length ? (a = v(t = s || []), o) : t;
    },
    distributions(s) {
      return arguments.length ? (s ? (r = s.length, e = s) : (r = 0, e = []), o.weights(t)) : e;
    },
    sample() {
      const s = Od();
      let n = e[r - 1], l = a[0], u = 0;
      for (; u < r - 1; l += a[++u])
        if (s < l) {
          n = e[u];
          break;
        }
      return n.sample();
    },
    pdf(s) {
      let n = 0, l = 0;
      for (; l < r; ++l)
        n += a[l] * e[l].pdf(s);
      return n;
    },
    cdf(s) {
      let n = 0, l = 0;
      for (; l < r; ++l)
        n += a[l] * e[l].cdf(s);
      return n;
    },
    icdf() {
      throw Error("Mixture icdf not supported.");
    }
  };
  return o.distributions(e).weights(t);
}
function fL(e, t) {
  return t == null && (t = e ?? 1, e = 0), e + (t - e) * Od();
}
function hL(e, t, r) {
  return r == null && (r = t ?? 1, t = 0), e >= t && e <= r ? 1 / (r - t) : 0;
}
function dL(e, t, r) {
  return r == null && (r = t ?? 1, t = 0), e < t ? 0 : e > r ? 1 : (e - t) / (r - t);
}
function pL(e, t, r) {
  return r == null && (r = t ?? 1, t = 0), e >= 0 && e <= 1 ? t + e * (r - t) : NaN;
}
function wZ(e, t) {
  let r, a;
  const v = {
    min(o) {
      return arguments.length ? (r = o || 0, v) : r;
    },
    max(o) {
      return arguments.length ? (a = o ?? 1, v) : a;
    },
    sample: () => fL(r, a),
    pdf: (o) => hL(o, r, a),
    cdf: (o) => dL(o, r, a),
    icdf: (o) => pL(o, r, a)
  };
  return t == null && (t = e ?? 1, e = 0), v.min(e).max(t);
}
function mL(e, t, r) {
  let a = 0, v = 0;
  for (const o of e) {
    const s = r(o);
    t(o) == null || s == null || isNaN(s) || (a += (s - a) / ++v);
  }
  return {
    coef: [a],
    predict: () => a,
    rSquared: 0
  };
}
function l4(e, t, r, a) {
  const v = a - e * e, o = Math.abs(v) < 1e-24 ? 0 : (r - e * t) / v;
  return [t - o * e, o];
}
function S9(e, t, r, a) {
  e = e.filter((_) => {
    let d = t(_), f = r(_);
    return d != null && (d = +d) >= d && f != null && (f = +f) >= f;
  }), a && e.sort((_, d) => t(_) - t(d));
  const v = e.length, o = new Float64Array(v), s = new Float64Array(v);
  let n = 0, l = 0, u = 0, i, h, p;
  for (p of e)
    o[n] = i = +t(p), s[n] = h = +r(p), ++n, l += (i - l) / n, u += (h - u) / n;
  for (n = 0; n < v; ++n)
    o[n] -= l, s[n] -= u;
  return [o, s, l, u];
}
function u4(e, t, r, a) {
  let v = -1, o, s;
  for (const n of e)
    o = t(n), s = r(n), o != null && (o = +o) >= o && s != null && (s = +s) >= s && a(o, s, ++v);
}
function Mb(e, t, r, a, v) {
  let o = 0, s = 0;
  return u4(e, t, r, (n, l) => {
    const u = l - v(n), i = l - a;
    o += u * u, s += i * i;
  }), 1 - o / s;
}
function gL(e, t, r) {
  let a = 0, v = 0, o = 0, s = 0, n = 0;
  u4(e, t, r, (i, h) => {
    ++n, a += (i - a) / n, v += (h - v) / n, o += (i * h - o) / n, s += (i * i - s) / n;
  });
  const l = l4(a, v, o, s), u = (i) => l[0] + l[1] * i;
  return {
    coef: l,
    predict: u,
    rSquared: Mb(e, t, r, v, u)
  };
}
function kZ(e, t, r) {
  let a = 0, v = 0, o = 0, s = 0, n = 0;
  u4(e, t, r, (i, h) => {
    ++n, i = Math.log(i), a += (i - a) / n, v += (h - v) / n, o += (i * h - o) / n, s += (i * i - s) / n;
  });
  const l = l4(a, v, o, s), u = (i) => l[0] + l[1] * Math.log(i);
  return {
    coef: l,
    predict: u,
    rSquared: Mb(e, t, r, v, u)
  };
}
function TZ(e, t, r) {
  const [a, v, o, s] = S9(e, t, r);
  let n = 0, l = 0, u = 0, i = 0, h = 0, p, _, d;
  u4(e, t, r, (m, x) => {
    p = a[h++], _ = Math.log(x), d = p * x, n += (x * _ - n) / h, l += (d - l) / h, u += (d * _ - u) / h, i += (p * d - i) / h;
  });
  const [f, c] = l4(l / s, n / s, u / s, i / s), g = (m) => Math.exp(f + c * (m - o));
  return {
    coef: [Math.exp(f - c * o), c],
    predict: g,
    rSquared: Mb(e, t, r, s, g)
  };
}
function AZ(e, t, r) {
  let a = 0, v = 0, o = 0, s = 0, n = 0, l = 0;
  u4(e, t, r, (h, p) => {
    const _ = Math.log(h), d = Math.log(p);
    ++l, a += (_ - a) / l, v += (d - v) / l, o += (_ * d - o) / l, s += (_ * _ - s) / l, n += (p - n) / l;
  });
  const u = l4(a, v, o, s), i = (h) => u[0] * Math.pow(h, u[1]);
  return u[0] = Math.exp(u[0]), {
    coef: u,
    predict: i,
    rSquared: Mb(e, t, r, n, i)
  };
}
function yL(e, t, r) {
  const [a, v, o, s] = S9(e, t, r), n = a.length;
  let l = 0, u = 0, i = 0, h = 0, p = 0, _, d, f, c;
  for (_ = 0; _ < n; )
    d = a[_], f = v[_++], c = d * d, l += (c - l) / _, u += (c * d - u) / _, i += (c * c - i) / _, h += (d * f - h) / _, p += (c * f - p) / _;
  const g = i - l * l, m = l * g - u * u, x = (p * l - h * u) / m, w = (h * g - p * u) / m, k = -x * l, S = (A) => (A = A - o, x * A * A + w * A + k + s);
  return {
    coef: [k - w * o + x * o * o + s, w - 2 * x * o, x],
    predict: S,
    rSquared: Mb(e, t, r, s, S)
  };
}
function SZ(e, t, r, a) {
  if (a === 0) return mL(e, t, r);
  if (a === 1) return gL(e, t, r);
  if (a === 2) return yL(e, t, r);
  const [v, o, s, n] = S9(e, t, r), l = v.length, u = [], i = [], h = a + 1;
  let p, _, d, f, c;
  for (p = 0; p < h; ++p) {
    for (d = 0, f = 0; d < l; ++d)
      f += Math.pow(v[d], p) * o[d];
    for (u.push(f), c = new Float64Array(h), _ = 0; _ < h; ++_) {
      for (d = 0, f = 0; d < l; ++d)
        f += Math.pow(v[d], p + _);
      c[_] = f;
    }
    i.push(c);
  }
  i.push(u);
  const g = rve(i), m = (x) => {
    x -= s;
    let w = n + g[0] + g[1] * x + g[2] * x * x;
    for (p = 3; p < h; ++p) w += g[p] * Math.pow(x, p);
    return w;
  };
  return {
    coef: nve(h, g, -s, n),
    predict: m,
    rSquared: Mb(e, t, r, n, m)
  };
}
function nve(e, t, r, a) {
  const v = Array(e);
  let o, s, n, l;
  for (o = 0; o < e; ++o) v[o] = 0;
  for (o = e - 1; o >= 0; --o)
    for (n = t[o], l = 1, v[o] += n, s = 1; s <= o; ++s)
      l *= (o + 1 - s) / s, v[o - s] += n * Math.pow(r, s) * l;
  return v[0] += a, v;
}
function rve(e) {
  const t = e.length - 1, r = [];
  let a, v, o, s, n;
  for (a = 0; a < t; ++a) {
    for (s = a, v = a + 1; v < t; ++v)
      Math.abs(e[a][v]) > Math.abs(e[a][s]) && (s = v);
    for (o = a; o < t + 1; ++o)
      n = e[o][a], e[o][a] = e[o][s], e[o][s] = n;
    for (v = a + 1; v < t; ++v)
      for (o = t; o >= a; o--)
        e[o][v] -= e[o][a] * e[a][v] / e[a][a];
  }
  for (v = t - 1; v >= 0; --v) {
    for (n = 0, o = v + 1; o < t; ++o)
      n += e[o][v] * r[o];
    r[v] = (e[t][v] - n) / e[v][v];
  }
  return r;
}
const FB = 2, NB = 1e-12;
function MZ(e, t, r, a) {
  const [v, o, s, n] = S9(e, t, r, !0), l = v.length, u = Math.max(2, ~~(a * l)), i = new Float64Array(l), h = new Float64Array(l), p = new Float64Array(l).fill(1);
  for (let _ = -1; ++_ <= FB; ) {
    const d = [0, u - 1];
    for (let c = 0; c < l; ++c) {
      const g = v[c], m = d[0], x = d[1], w = g - v[m] > v[x] - g ? m : x;
      let k = 0, S = 0, A = 0, C = 0, D = 0;
      const L = 1 / Math.abs(v[w] - g || 1);
      for (let I = m; I <= x; ++I) {
        const M = v[I], O = o[I], T = ive(Math.abs(g - M) * L) * p[I], z = M * T;
        k += T, S += z, A += O * T, C += O * z, D += M * z;
      }
      const [E, P] = l4(S / k, A / k, C / k, D / k);
      i[c] = E + P * g, h[c] = Math.abs(o[c] - i[c]), ave(v, c + 1, d);
    }
    if (_ === FB)
      break;
    const f = hY(h);
    if (Math.abs(f) < NB) break;
    for (let c = 0, g, m; c < l; ++c)
      g = h[c] / (6 * f), p[c] = g >= 1 ? NB : (m = 1 - g * g) * m;
  }
  return ove(v, i, s, n);
}
function ive(e) {
  return (e = 1 - e * e * e) * e * e;
}
function ave(e, t, r) {
  const a = e[t];
  let v = r[0], o = r[1] + 1;
  if (!(o >= e.length))
    for (; t > v && e[o] - a <= a - e[v]; )
      r[0] = ++v, r[1] = o, ++o;
}
function ove(e, t, r, a) {
  const v = e.length, o = [];
  let s = 0, n = 0, l = [], u;
  for (; s < v; ++s)
    u = e[s] + r, l[0] === u ? l[1] += (t[s] - l[1]) / ++n : (n = 0, l[1] += a, l = [u, t[s]], o.push(l));
  return l[1] += a, o;
}
const sve = 0.5 * Math.PI / 180;
function M9(e, t, r, a) {
  r = r || 25, a = Math.max(r, a || 200);
  const v = (f) => [f, e(f)], o = t[0], s = t[1], n = s - o, l = n / a, u = [v(o)], i = [];
  if (r === a) {
    for (let f = 1; f < a; ++f)
      u.push(v(o + f / r * n));
    return u.push(v(s)), u;
  } else {
    i.push(v(s));
    for (let f = r; --f > 0; )
      i.push(v(o + f / r * n));
  }
  let h = u[0], p = i[i.length - 1];
  const _ = 1 / n, d = lve(h[1], i);
  for (; p; ) {
    const f = v((h[0] + p[0]) / 2);
    f[0] - h[0] >= l && uve(h, f, p, _, d) > sve ? i.push(f) : (h = p, u.push(p), i.pop()), p = i[i.length - 1];
  }
  return u;
}
function lve(e, t) {
  let r = e, a = e;
  const v = t.length;
  for (let o = 0; o < v; ++o) {
    const s = t[o][1];
    s < r && (r = s), s > a && (a = s);
  }
  return 1 / (a - r);
}
function uve(e, t, r, a, v) {
  const o = Math.atan2(v * (r[1] - e[1]), a * (r[0] - e[0])), s = Math.atan2(v * (t[1] - e[1]), a * (t[0] - e[0]));
  return Math.abs(o - s);
}
function cve(e) {
  return (t) => {
    const r = e.length;
    let a = 1, v = String(e[0](t));
    for (; a < r; ++a)
      v += "|" + e[a](t);
    return v;
  };
}
function VE(e) {
  return !e || !e.length ? function() {
    return "";
  } : e.length === 1 ? e[0] : cve(e);
}
function EZ(e, t, r) {
  return r || e + (t ? "_" + t : "");
}
const BS = () => {
}, fve = {
  init: BS,
  add: BS,
  rem: BS,
  idx: 0
}, ww = {
  values: {
    init: (e) => e.cell.store = !0,
    value: (e) => e.cell.data.values(),
    idx: -1
  },
  count: {
    value: (e) => e.cell.num
  },
  __count__: {
    value: (e) => e.missing + e.valid
  },
  missing: {
    value: (e) => e.missing
  },
  valid: {
    value: (e) => e.valid
  },
  sum: {
    init: (e) => e.sum = 0,
    value: (e) => e.valid ? e.sum : void 0,
    add: (e, t) => e.sum += +t,
    rem: (e, t) => e.sum -= t
  },
  product: {
    init: (e) => e.product = 1,
    value: (e) => e.valid ? e.product : void 0,
    add: (e, t) => e.product *= t,
    rem: (e, t) => e.product /= t
  },
  mean: {
    init: (e) => e.mean = 0,
    value: (e) => e.valid ? e.mean : void 0,
    add: (e, t) => (e.mean_d = t - e.mean, e.mean += e.mean_d / e.valid),
    rem: (e, t) => (e.mean_d = t - e.mean, e.mean -= e.valid ? e.mean_d / e.valid : e.mean)
  },
  average: {
    value: (e) => e.valid ? e.mean : void 0,
    req: ["mean"],
    idx: 1
  },
  variance: {
    init: (e) => e.dev = 0,
    value: (e) => e.valid > 1 ? e.dev / (e.valid - 1) : void 0,
    add: (e, t) => e.dev += e.mean_d * (t - e.mean),
    rem: (e, t) => e.dev -= e.mean_d * (t - e.mean),
    req: ["mean"],
    idx: 1
  },
  variancep: {
    value: (e) => e.valid > 1 ? e.dev / e.valid : void 0,
    req: ["variance"],
    idx: 2
  },
  stdev: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / (e.valid - 1)) : void 0,
    req: ["variance"],
    idx: 2
  },
  stdevp: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / e.valid) : void 0,
    req: ["variance"],
    idx: 2
  },
  stderr: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / (e.valid * (e.valid - 1))) : void 0,
    req: ["variance"],
    idx: 2
  },
  distinct: {
    value: (e) => e.cell.data.distinct(e.get),
    req: ["values"],
    idx: 3
  },
  ci0: {
    value: (e) => e.cell.data.ci0(e.get),
    req: ["values"],
    idx: 3
  },
  ci1: {
    value: (e) => e.cell.data.ci1(e.get),
    req: ["values"],
    idx: 3
  },
  median: {
    value: (e) => e.cell.data.q2(e.get),
    req: ["values"],
    idx: 3
  },
  q1: {
    value: (e) => e.cell.data.q1(e.get),
    req: ["values"],
    idx: 3
  },
  q3: {
    value: (e) => e.cell.data.q3(e.get),
    req: ["values"],
    idx: 3
  },
  min: {
    init: (e) => e.min = void 0,
    value: (e) => e.min = Number.isNaN(e.min) ? e.cell.data.min(e.get) : e.min,
    add: (e, t) => {
      (t < e.min || e.min === void 0) && (e.min = t);
    },
    rem: (e, t) => {
      t <= e.min && (e.min = NaN);
    },
    req: ["values"],
    idx: 4
  },
  max: {
    init: (e) => e.max = void 0,
    value: (e) => e.max = Number.isNaN(e.max) ? e.cell.data.max(e.get) : e.max,
    add: (e, t) => {
      (t > e.max || e.max === void 0) && (e.max = t);
    },
    rem: (e, t) => {
      t >= e.max && (e.max = NaN);
    },
    req: ["values"],
    idx: 4
  },
  argmin: {
    init: (e) => e.argmin = void 0,
    value: (e) => e.argmin || e.cell.data.argmin(e.get),
    add: (e, t, r) => {
      t < e.min && (e.argmin = r);
    },
    rem: (e, t) => {
      t <= e.min && (e.argmin = void 0);
    },
    req: ["min", "values"],
    idx: 3
  },
  argmax: {
    init: (e) => e.argmax = void 0,
    value: (e) => e.argmax || e.cell.data.argmax(e.get),
    add: (e, t, r) => {
      t > e.max && (e.argmax = r);
    },
    rem: (e, t) => {
      t >= e.max && (e.argmax = void 0);
    },
    req: ["max", "values"],
    idx: 3
  },
  exponential: {
    init: (e, t) => {
      e.exp = 0, e.exp_r = t;
    },
    value: (e) => e.valid ? e.exp * (1 - e.exp_r) / (1 - e.exp_r ** e.valid) : void 0,
    add: (e, t) => e.exp = e.exp_r * e.exp + t,
    rem: (e, t) => e.exp = (e.exp - t / e.exp_r ** (e.valid - 1)) / e.exp_r
  },
  exponentialb: {
    value: (e) => e.valid ? e.exp * (1 - e.exp_r) : void 0,
    req: ["exponential"],
    idx: 1
  }
}, c4 = Object.keys(ww).filter((e) => e !== "__count__");
function hve(e, t) {
  return (r, a) => $a({
    name: e,
    aggregate_param: a,
    out: r || e
  }, fve, t);
}
[...c4, "__count__"].forEach((e) => {
  ww[e] = hve(e, ww[e]);
});
function CZ(e, t, r) {
  return ww[e](r, t);
}
function IZ(e, t) {
  return e.idx - t.idx;
}
function dve(e) {
  const t = {};
  e.forEach((a) => t[a.name] = a);
  const r = (a) => {
    a.req && a.req.forEach((v) => {
      t[v] || r(t[v] = ww[v]());
    });
  };
  return e.forEach(r), Object.values(t).sort(IZ);
}
function pve() {
  this.valid = 0, this.missing = 0, this._ops.forEach((e) => e.aggregate_param == null ? e.init(this) : e.init(this, e.aggregate_param));
}
function mve(e, t) {
  if (e == null || e === "") {
    ++this.missing;
    return;
  }
  e === e && (++this.valid, this._ops.forEach((r) => r.add(this, e, t)));
}
function gve(e, t) {
  if (e == null || e === "") {
    --this.missing;
    return;
  }
  e === e && (--this.valid, this._ops.forEach((r) => r.rem(this, e, t)));
}
function yve(e) {
  return this._out.forEach((t) => e[t.out] = t.value(this)), e;
}
function DZ(e, t) {
  const r = t || Uf, a = dve(e), v = e.slice().sort(IZ);
  function o(s) {
    this._ops = a, this._out = v, this.cell = s, this.init();
  }
  return o.prototype.init = pve, o.prototype.add = mve, o.prototype.rem = gve, o.prototype.set = yve, o.prototype.get = r, o.fields = e.map((s) => s.out), o;
}
function vL(e) {
  this._key = e ? Dd(e) : sa, this.reset();
}
const df = vL.prototype;
df.reset = function() {
  this._add = [], this._rem = [], this._ext = null, this._get = null, this._q = null;
};
df.add = function(e) {
  this._add.push(e);
};
df.rem = function(e) {
  this._rem.push(e);
};
df.values = function() {
  if (this._get = null, this._rem.length === 0) return this._add;
  const e = this._add, t = this._rem, r = this._key, a = e.length, v = t.length, o = Array(a - v), s = {};
  let n, l, u;
  for (n = 0; n < v; ++n)
    s[r(t[n])] = 1;
  for (n = 0, l = 0; n < a; ++n)
    s[r(u = e[n])] ? s[r(u)] = 0 : o[l++] = u;
  return this._rem = [], this._add = o;
};
df.distinct = function(e) {
  const t = this.values(), r = {};
  let a = t.length, v = 0, o;
  for (; --a >= 0; )
    o = e(t[a]) + "", ua(r, o) || (r[o] = 1, ++v);
  return v;
};
df.extent = function(e) {
  if (this._get !== e || !this._ext) {
    const t = this.values(), r = WW(t, e);
    this._ext = [t[r[0]], t[r[1]]], this._get = e;
  }
  return this._ext;
};
df.argmin = function(e) {
  return this.extent(e)[0] || {};
};
df.argmax = function(e) {
  return this.extent(e)[1] || {};
};
df.min = function(e) {
  const t = this.extent(e)[0];
  return t != null ? e(t) : void 0;
};
df.max = function(e) {
  const t = this.extent(e)[1];
  return t != null ? e(t) : void 0;
};
df.quartile = function(e) {
  return (this._get !== e || !this._q) && (this._q = nL(this.values(), e), this._get = e), this._q;
};
df.q1 = function(e) {
  return this.quartile(e)[0];
};
df.q2 = function(e) {
  return this.quartile(e)[1];
};
df.q3 = function(e) {
  return this.quartile(e)[2];
};
df.ci = function(e) {
  return (this._get !== e || !this._ci) && (this._ci = yZ(this.values(), 1e3, 0.05, e), this._get = e), this._ci;
};
df.ci0 = function(e) {
  return this.ci(e)[0];
};
df.ci1 = function(e) {
  return this.ci(e)[1];
};
function bg(e) {
  qr.call(this, null, e), this._adds = [], this._mods = [], this._alen = 0, this._mlen = 0, this._drop = !0, this._cross = !1, this._dims = [], this._dnames = [], this._measures = [], this._countOnly = !1, this._counts = null, this._prev = null, this._inputs = null, this._outputs = null;
}
bg.Definition = {
  type: "Aggregate",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: c4
  }, {
    name: "aggregate_params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "drop",
    type: "boolean",
    default: !0
  }, {
    name: "cross",
    type: "boolean",
    default: !1
  }, {
    name: "key",
    type: "field"
  }]
};
Si(bg, qr, {
  transform(e, t) {
    const r = this, a = t.fork(t.NO_SOURCE | t.NO_FIELDS), v = e.modified();
    return r.stamp = a.stamp, r.value && (v || t.modified(r._inputs, !0)) ? (r._prev = r.value, r.value = v ? r.init(e) : /* @__PURE__ */ Object.create(null), t.visit(t.SOURCE, (o) => r.add(o))) : (r.value = r.value || r.init(e), t.visit(t.REM, (o) => r.rem(o)), t.visit(t.ADD, (o) => r.add(o))), a.modifies(r._outputs), r._drop = e.drop !== !1, e.cross && r._dims.length > 1 && (r._drop = !1, r.cross()), t.clean() && r._drop && a.clean(!0).runAfter(() => this.clean()), r.changes(a);
  },
  cross() {
    const e = this, t = e.value, r = e._dnames, a = r.map(() => ({})), v = r.length;
    function o(n) {
      let l, u, i, h;
      for (l in n)
        for (i = n[l].tuple, u = 0; u < v; ++u)
          a[u][h = i[r[u]]] = h;
    }
    o(e._prev), o(t);
    function s(n, l, u) {
      const i = r[u], h = a[u++];
      for (const p in h) {
        const _ = n ? n + "|" + p : p;
        l[i] = h[p], u < v ? s(_, l, u) : t[_] || e.cell(_, l);
      }
    }
    s("", {}, 0);
  },
  init(e) {
    const t = this._inputs = [], r = this._outputs = [], a = {};
    function v(m) {
      const x = Ri(Ff(m)), w = x.length;
      let k = 0, S;
      for (; k < w; ++k)
        a[S = x[k]] || (a[S] = 1, t.push(S));
    }
    this._dims = Ri(e.groupby), this._dnames = this._dims.map((m) => {
      const x = Lu(m);
      return v(m), r.push(x), x;
    }), this.cellkey = e.key ? e.key : VE(this._dims), this._countOnly = !0, this._counts = [], this._measures = [];
    const o = e.fields || [null], s = e.ops || ["count"], n = e.aggregate_params || [null], l = e.as || [], u = o.length, i = {};
    let h, p, _, d, f, c, g;
    for (u !== s.length && Jr("Unmatched number of fields and aggregate ops."), g = 0; g < u; ++g) {
      if (h = o[g], p = s[g], _ = n[g] || null, h == null && p !== "count" && Jr("Null aggregate field specified."), f = Lu(h), c = EZ(p, f, l[g]), r.push(c), p === "count") {
        this._counts.push(c);
        continue;
      }
      d = i[f], d || (v(h), d = i[f] = [], d.field = h, this._measures.push(d)), p !== "count" && (this._countOnly = !1), d.push(CZ(p, _, c));
    }
    return this._measures = this._measures.map((m) => DZ(m, m.field)), /* @__PURE__ */ Object.create(null);
  },
  // -- Cell Management -----
  cellkey: VE(),
  cell(e, t) {
    let r = this.value[e];
    return r ? r.num === 0 && this._drop && r.stamp < this.stamp ? (r.stamp = this.stamp, this._adds[this._alen++] = r) : r.stamp < this.stamp && (r.stamp = this.stamp, this._mods[this._mlen++] = r) : (r = this.value[e] = this.newcell(e, t), this._adds[this._alen++] = r), r;
  },
  newcell(e, t) {
    const r = {
      key: e,
      num: 0,
      agg: null,
      tuple: this.newtuple(t, this._prev && this._prev[e]),
      stamp: this.stamp,
      store: !1
    };
    if (!this._countOnly) {
      const a = this._measures, v = a.length;
      r.agg = Array(v);
      for (let o = 0; o < v; ++o)
        r.agg[o] = new a[o](r);
    }
    return r.store && (r.data = new vL()), r;
  },
  newtuple(e, t) {
    const r = this._dnames, a = this._dims, v = a.length, o = {};
    for (let s = 0; s < v; ++s)
      o[r[s]] = a[s](e);
    return t ? uZ(t.tuple, o) : rs(o);
  },
  clean() {
    const e = this.value;
    for (const t in e)
      e[t].num === 0 && delete e[t];
  },
  // -- Process Tuples -----
  add(e) {
    const t = this.cellkey(e), r = this.cell(t, e);
    if (r.num += 1, this._countOnly) return;
    r.store && r.data.add(e);
    const a = r.agg;
    for (let v = 0, o = a.length; v < o; ++v)
      a[v].add(a[v].get(e), e);
  },
  rem(e) {
    const t = this.cellkey(e), r = this.cell(t, e);
    if (r.num -= 1, this._countOnly) return;
    r.store && r.data.rem(e);
    const a = r.agg;
    for (let v = 0, o = a.length; v < o; ++v)
      a[v].rem(a[v].get(e), e);
  },
  celltuple(e) {
    const t = e.tuple, r = this._counts;
    e.store && e.data.values();
    for (let a = 0, v = r.length; a < v; ++a)
      t[r[a]] = e.num;
    if (!this._countOnly) {
      const a = e.agg;
      for (let v = 0, o = a.length; v < o; ++v)
        a[v].set(t);
    }
    return t;
  },
  changes(e) {
    const t = this._adds, r = this._mods, a = this._prev, v = this._drop, o = e.add, s = e.rem, n = e.mod;
    let l, u, i, h;
    if (a) for (u in a)
      l = a[u], (!v || l.num) && s.push(l.tuple);
    for (i = 0, h = this._alen; i < h; ++i)
      o.push(this.celltuple(t[i])), t[i] = null;
    for (i = 0, h = this._mlen; i < h; ++i)
      l = r[i], (l.num === 0 && v ? s : n).push(this.celltuple(l)), r[i] = null;
    return this._alen = this._mlen = 0, this._prev = null, e;
  }
});
const vve = 1e-14;
function xL(e) {
  qr.call(this, null, e);
}
xL.Definition = {
  type: "Bin",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "interval",
    type: "boolean",
    default: !0
  }, {
    name: "anchor",
    type: "number"
  }, {
    name: "maxbins",
    type: "number",
    default: 20
  }, {
    name: "base",
    type: "number",
    default: 10
  }, {
    name: "divide",
    type: "number",
    array: !0,
    default: [5, 2]
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "span",
    type: "number"
  }, {
    name: "step",
    type: "number"
  }, {
    name: "steps",
    type: "number",
    array: !0
  }, {
    name: "minstep",
    type: "number",
    default: 0
  }, {
    name: "nice",
    type: "boolean",
    default: !0
  }, {
    name: "name",
    type: "string"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["bin0", "bin1"]
  }]
};
Si(xL, qr, {
  transform(e, t) {
    const r = e.interval !== !1, a = this._bins(e), v = a.start, o = a.step, s = e.as || ["bin0", "bin1"], n = s[0], l = s[1];
    let u;
    return e.modified() ? (t = t.reflow(!0), u = t.SOURCE) : u = t.modified(Ff(e.field)) ? t.ADD_MOD : t.ADD, t.visit(u, r ? (i) => {
      const h = a(i);
      i[n] = h, i[l] = h == null ? null : v + o * (1 + (h - v) / o);
    } : (i) => i[n] = a(i)), t.modifies(r ? s : n);
  },
  _bins(e) {
    if (this.value && !e.modified())
      return this.value;
    const t = e.field, r = gZ(e), a = r.step;
    let v = r.start, o = v + Math.ceil((r.stop - v) / a) * a, s, n;
    (s = e.anchor) != null && (n = s - (v + a * Math.floor((s - v) / a)), v += n, o += n);
    const l = function(u) {
      let i = Of(t(u));
      return i == null ? null : i < v ? -1 / 0 : i > o ? 1 / 0 : (i = Math.max(v, Math.min(i, o - a)), v + a * Math.floor(vve + (i - v) / a));
    };
    return l.start = v, l.stop = r.stop, l.step = a, this.value = jh(l, Ff(t), e.name || "bin_" + Lu(t));
  }
});
function LZ(e, t, r) {
  const a = e;
  let v = t || [], o = r || [], s = {}, n = 0;
  return {
    add: (l) => o.push(l),
    remove: (l) => s[a(l)] = ++n,
    size: () => v.length,
    data: (l, u) => (n && (v = v.filter((i) => !s[a(i)]), s = {}, n = 0), u && l && v.sort(l), o.length && (v = l ? QW(l, v, o.sort(l)) : v.concat(o), o = []), v)
  };
}
function bL(e) {
  qr.call(this, [], e);
}
bL.Definition = {
  type: "Collect",
  metadata: {
    source: !0
  },
  params: [{
    name: "sort",
    type: "compare"
  }]
};
Si(bL, qr, {
  transform(e, t) {
    const r = t.fork(t.ALL), a = LZ(sa, this.value, r.materialize(r.ADD).add), v = e.sort, o = t.changed() || v && (e.modified("sort") || t.modified(v.fields));
    return r.visit(r.REM, a.remove), this.modified(o), this.value = r.source = a.data(qv(v), o), t.source && t.source.root && (this.value.root = t.source.root), r;
  }
});
function PZ(e) {
  Zs.call(this, null, xve, e);
}
Si(PZ, Zs);
function xve(e) {
  return this.value && !e.modified() ? this.value : OD(e.fields, e.orders);
}
function _L(e) {
  qr.call(this, null, e);
}
_L.Definition = {
  type: "CountPattern",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "case",
    type: "enum",
    values: ["upper", "lower", "mixed"],
    default: "mixed"
  }, {
    name: "pattern",
    type: "string",
    default: '[\\w"]+'
  }, {
    name: "stopwords",
    type: "string",
    default: ""
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["text", "count"]
  }]
};
function bve(e, t, r) {
  switch (t) {
    case "upper":
      e = e.toUpperCase();
      break;
    case "lower":
      e = e.toLowerCase();
      break;
  }
  return e.match(r);
}
Si(_L, qr, {
  transform(e, t) {
    const r = (h) => (p) => {
      for (var _ = bve(n(p), e.case, o) || [], d, f = 0, c = _.length; f < c; ++f)
        s.test(d = _[f]) || h(d);
    }, a = this._parameterCheck(e, t), v = this._counts, o = this._match, s = this._stop, n = e.field, l = e.as || ["text", "count"], u = r((h) => v[h] = 1 + (v[h] || 0)), i = r((h) => v[h] -= 1);
    return a ? t.visit(t.SOURCE, u) : (t.visit(t.ADD, u), t.visit(t.REM, i)), this._finish(t, l);
  },
  _parameterCheck(e, t) {
    let r = !1;
    return (e.modified("stopwords") || !this._stop) && (this._stop = new RegExp("^" + (e.stopwords || "") + "$", "i"), r = !0), (e.modified("pattern") || !this._match) && (this._match = new RegExp(e.pattern || "[\\w']+", "g"), r = !0), (e.modified("field") || t.modified(e.field.fields)) && (r = !0), r && (this._counts = {}), r;
  },
  _finish(e, t) {
    const r = this._counts, a = this._tuples || (this._tuples = {}), v = t[0], o = t[1], s = e.fork(e.NO_SOURCE | e.NO_FIELDS);
    let n, l, u;
    for (n in r)
      l = a[n], u = r[n] || 0, !l && u ? (a[n] = l = rs({}), l[v] = n, l[o] = u, s.add.push(l)) : u === 0 ? (l && s.rem.push(l), r[n] = null, a[n] = null) : l[o] !== u && (l[o] = u, s.mod.push(l));
    return s.modifies(t);
  }
});
function wL(e) {
  qr.call(this, null, e);
}
wL.Definition = {
  type: "Cross",
  metadata: {
    generates: !0
  },
  params: [{
    name: "filter",
    type: "expr"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["a", "b"]
  }]
};
Si(wL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE), a = e.as || ["a", "b"], v = a[0], o = a[1], s = !this.value || t.changed(t.ADD_REM) || e.modified("as") || e.modified("filter");
    let n = this.value;
    return s ? (n && (r.rem = n), n = t.materialize(t.SOURCE).source, r.add = this.value = _ve(n, v, o, e.filter || Ld)) : r.mod = n, r.source = this.value, r.modifies(a);
  }
});
function _ve(e, t, r, a) {
  for (var v = [], o = {}, s = e.length, n = 0, l, u; n < s; ++n)
    for (o[t] = u = e[n], l = 0; l < s; ++l)
      o[r] = e[l], a(o) && (v.push(rs(o)), o = {}, o[t] = u);
  return v;
}
const BB = {
  kde: oL,
  mixture: _Z,
  normal: aL,
  lognormal: bZ,
  uniform: wZ
}, wve = "distributions", jB = "function", kve = "field";
function OZ(e, t) {
  const r = e[jB];
  ua(BB, r) || Jr("Unknown distribution function: " + r);
  const a = BB[r]();
  for (const v in e)
    v === kve ? a.data((e.from || t()).map(e[v])) : v === wve ? a[v](e[v].map((o) => OZ(o, t))) : typeof a[v] === jB && a[v](e[v]);
  return a;
}
function kL(e) {
  qr.call(this, null, e);
}
const zZ = [{
  key: {
    function: "normal"
  },
  params: [{
    name: "mean",
    type: "number",
    default: 0
  }, {
    name: "stdev",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "lognormal"
  },
  params: [{
    name: "mean",
    type: "number",
    default: 0
  }, {
    name: "stdev",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "uniform"
  },
  params: [{
    name: "min",
    type: "number",
    default: 0
  }, {
    name: "max",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "kde"
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "from",
    type: "data"
  }, {
    name: "bandwidth",
    type: "number",
    default: 0
  }]
}], Tve = {
  key: {
    function: "mixture"
  },
  params: [{
    name: "distributions",
    type: "param",
    array: !0,
    params: zZ
  }, {
    name: "weights",
    type: "number",
    array: !0
  }]
};
kL.Definition = {
  type: "Density",
  metadata: {
    generates: !0
  },
  params: [{
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "steps",
    type: "number"
  }, {
    name: "minsteps",
    type: "number",
    default: 25
  }, {
    name: "maxsteps",
    type: "number",
    default: 200
  }, {
    name: "method",
    type: "string",
    default: "pdf",
    values: ["pdf", "cdf"]
  }, {
    name: "distribution",
    type: "param",
    params: zZ.concat(Tve)
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["value", "density"]
  }]
};
Si(kL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const a = OZ(e.distribution, Ave(t)), v = e.steps || e.minsteps || 25, o = e.steps || e.maxsteps || 200;
      let s = e.method || "pdf";
      s !== "pdf" && s !== "cdf" && Jr("Invalid density method: " + s), !e.extent && !a.data && Jr("Missing density extent parameter."), s = a[s];
      const n = e.as || ["value", "density"], l = e.extent || M0(a.data()), u = M9(s, l, v, o).map((i) => {
        const h = {};
        return h[n[0]] = i[0], h[n[1]] = i[1], rs(h);
      });
      this.value && (r.rem = this.value), this.value = r.add = r.source = u;
    }
    return r;
  }
});
function Ave(e) {
  return () => e.materialize(e.SOURCE).source;
}
function RZ(e, t) {
  return e ? e.map((r, a) => t[a] || Lu(r)) : null;
}
function TL(e, t, r) {
  const a = [], v = (h) => h(l);
  let o, s, n, l, u, i;
  if (t == null)
    a.push(e.map(r));
  else
    for (o = {}, s = 0, n = e.length; s < n; ++s)
      l = e[s], u = t.map(v), i = o[u], i || (o[u] = i = [], i.dims = u, a.push(i)), i.push(r(l));
  return a;
}
const FZ = "bin";
function AL(e) {
  qr.call(this, null, e);
}
AL.Definition = {
  type: "DotBin",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "step",
    type: "number"
  }, {
    name: "smooth",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    default: FZ
  }]
};
const Sve = (e, t) => s4(M0(e, t)) / 30;
Si(AL, qr, {
  transform(e, t) {
    if (this.value && !(e.modified() || t.changed()))
      return t;
    const r = t.materialize(t.SOURCE).source, a = TL(t.source, e.groupby, Uf), v = e.smooth || !1, o = e.field, s = e.step || Sve(r, o), n = qv((d, f) => o(d) - o(f)), l = e.as || FZ, u = a.length;
    let i = 1 / 0, h = -1 / 0, p = 0, _;
    for (; p < u; ++p) {
      const d = a[p].sort(n);
      _ = -1;
      for (const f of vZ(d, s, v, o))
        f < i && (i = f), f > h && (h = f), d[++_][l] = f;
    }
    return this.value = {
      start: i,
      stop: h,
      step: s
    }, t.reflow(!0).modifies(l);
  }
});
function NZ(e) {
  Zs.call(this, null, Mve, e), this.modified(!0);
}
Si(NZ, Zs);
function Mve(e) {
  const t = e.expr;
  return this.value && !e.modified("expr") ? this.value : jh((r) => t(r, e), Ff(t), Lu(t));
}
function SL(e) {
  qr.call(this, [void 0, void 0], e);
}
SL.Definition = {
  type: "Extent",
  metadata: {},
  params: [{
    name: "field",
    type: "field",
    required: !0
  }]
};
Si(SL, qr, {
  transform(e, t) {
    const r = this.value, a = e.field, v = t.changed() || t.modified(a.fields) || e.modified("field");
    let o = r[0], s = r[1];
    if ((v || o == null) && (o = 1 / 0, s = -1 / 0), t.visit(v ? t.SOURCE : t.ADD, (n) => {
      const l = Of(a(n));
      l != null && (l < o && (o = l), l > s && (s = l));
    }), !Number.isFinite(o) || !Number.isFinite(s)) {
      let n = Lu(a);
      n && (n = ` for field "${n}"`), t.dataflow.warn(`Infinite extent${n}: [${o}, ${s}]`), o = s = void 0;
    }
    this.value = [o, s];
  }
});
function ML(e, t) {
  Zs.call(this, e), this.parent = t, this.count = 0;
}
Si(ML, Zs, {
  /**
   * Routes pulses from this subflow to a target transform.
   * @param {Transform} target - A transform that receives the subflow of tuples.
   */
  connect(e) {
    return this.detachSubflow = e.detachSubflow, this.targets().add(e), e.source = this;
  },
  /**
   * Add an 'add' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being added.
   */
  add(e) {
    this.count += 1, this.value.add.push(e);
  },
  /**
   * Add a 'rem' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being removed.
   */
  rem(e) {
    this.count -= 1, this.value.rem.push(e);
  },
  /**
   * Add a 'mod' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being modified.
   */
  mod(e) {
    this.value.mod.push(e);
  },
  /**
   * Re-initialize this operator's pulse value.
   * @param {Pulse} pulse - The pulse to copy from.
   * @see Pulse.init
   */
  init(e) {
    this.value.init(e, e.NO_SOURCE);
  },
  /**
   * Evaluate this operator. This method overrides the
   * default behavior to simply return the contained pulse value.
   * @return {Pulse}
   */
  evaluate() {
    return this.value;
  }
});
function E9(e) {
  qr.call(this, {}, e), this._keys = _b();
  const t = this._targets = [];
  t.active = 0, t.forEach = (r) => {
    for (let a = 0, v = t.active; a < v; ++a)
      r(t[a], a, t);
  };
}
Si(E9, qr, {
  activate(e) {
    this._targets[this._targets.active++] = e;
  },
  // parent argument provided by PreFacet subclass
  subflow(e, t, r, a) {
    const v = this.value;
    let o = ua(v, e) && v[e], s, n;
    return o ? o.value.stamp < r.stamp && (o.init(r), this.activate(o)) : (n = a || (n = this._group[e]) && n.tuple, s = r.dataflow, o = new ML(r.fork(r.NO_SOURCE), this), s.add(o).connect(t(s, e, n)), v[e] = o, this.activate(o)), o;
  },
  clean() {
    const e = this.value;
    let t = 0;
    for (const r in e)
      if (e[r].count === 0) {
        const a = e[r].detachSubflow;
        a && a(), delete e[r], ++t;
      }
    if (t) {
      const r = this._targets.filter((a) => a && a.count > 0);
      this.initTargets(r);
    }
  },
  initTargets(e) {
    const t = this._targets, r = t.length, a = e ? e.length : 0;
    let v = 0;
    for (; v < a; ++v)
      t[v] = e[v];
    for (; v < r && t[v] != null; ++v)
      t[v] = null;
    t.active = a;
  },
  transform(e, t) {
    const r = t.dataflow, a = e.key, v = e.subflow, o = this._keys, s = e.modified("key"), n = (l) => this.subflow(l, v, t);
    return this._group = e.group || {}, this.initTargets(), t.visit(t.REM, (l) => {
      const u = sa(l), i = o.get(u);
      i !== void 0 && (o.delete(u), n(i).rem(l));
    }), t.visit(t.ADD, (l) => {
      const u = a(l);
      o.set(sa(l), u), n(u).add(l);
    }), s || t.modified(a.fields) ? t.visit(t.MOD, (l) => {
      const u = sa(l), i = o.get(u), h = a(l);
      i === h ? n(h).mod(l) : (o.set(u, h), n(i).rem(l), n(h).add(l));
    }) : t.changed(t.MOD) && t.visit(t.MOD, (l) => {
      n(o.get(sa(l))).mod(l);
    }), s && t.visit(t.REFLOW, (l) => {
      const u = sa(l), i = o.get(u), h = a(l);
      i !== h && (o.set(u, h), n(i).rem(l), n(h).add(l));
    }), t.clean() ? r.runAfter(() => {
      this.clean(), o.clean();
    }) : o.empty > r.cleanThreshold && r.runAfter(o.clean), t;
  }
});
function BZ(e) {
  Zs.call(this, null, Eve, e);
}
Si(BZ, Zs);
function Eve(e) {
  return this.value && !e.modified() ? this.value : Qr(e.name) ? Ri(e.name).map((t) => Dd(t)) : Dd(e.name, e.as);
}
function EL(e) {
  qr.call(this, _b(), e);
}
EL.Definition = {
  type: "Filter",
  metadata: {
    changes: !0
  },
  params: [{
    name: "expr",
    type: "expr",
    required: !0
  }]
};
Si(EL, qr, {
  transform(e, t) {
    const r = t.dataflow, a = this.value, v = t.fork(), o = v.add, s = v.rem, n = v.mod, l = e.expr;
    let u = !0;
    t.visit(t.REM, (h) => {
      const p = sa(h);
      a.has(p) ? a.delete(p) : s.push(h);
    }), t.visit(t.ADD, (h) => {
      l(h, e) ? o.push(h) : a.set(sa(h), 1);
    });
    function i(h) {
      const p = sa(h), _ = l(h, e), d = a.get(p);
      _ && d ? (a.delete(p), o.push(h)) : !_ && !d ? (a.set(p, 1), s.push(h)) : u && _ && !d && n.push(h);
    }
    return t.visit(t.MOD, i), e.modified() && (u = !1, t.visit(t.REFLOW, i)), a.empty > r.cleanThreshold && r.runAfter(a.clean), v;
  }
});
function CL(e) {
  qr.call(this, [], e);
}
CL.Definition = {
  type: "Flatten",
  metadata: {
    generates: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "index",
    type: "string"
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
Si(CL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE), a = e.fields, v = RZ(a, e.as || []), o = e.index || null, s = v.length;
    return r.rem = this.value, t.visit(t.SOURCE, (n) => {
      const l = a.map((d) => d(n)), u = l.reduce((d, f) => Math.max(d, f.length), 0);
      let i = 0, h, p, _;
      for (; i < u; ++i) {
        for (p = JD(n), h = 0; h < s; ++h)
          p[v[h]] = (_ = l[h][i]) == null ? null : _;
        o && (p[o] = i), r.add.push(p);
      }
    }), this.value = r.source = r.add, o && r.modifies(o), r.modifies(v);
  }
});
function IL(e) {
  qr.call(this, [], e);
}
IL.Definition = {
  type: "Fold",
  metadata: {
    generates: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["key", "value"]
  }]
};
Si(IL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE), a = e.fields, v = a.map(Lu), o = e.as || ["key", "value"], s = o[0], n = o[1], l = a.length;
    return r.rem = this.value, t.visit(t.SOURCE, (u) => {
      for (let i = 0, h; i < l; ++i)
        h = JD(u), h[s] = v[i], h[n] = a[i](u), r.add.push(h);
    }), this.value = r.source = r.add, r.modifies(o);
  }
});
function DL(e) {
  qr.call(this, null, e);
}
DL.Definition = {
  type: "Formula",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "expr",
    type: "expr",
    required: !0
  }, {
    name: "as",
    type: "string",
    required: !0
  }, {
    name: "initonly",
    type: "boolean"
  }]
};
Si(DL, qr, {
  transform(e, t) {
    const r = e.expr, a = e.as, v = e.modified(), o = e.initonly ? t.ADD : v ? t.SOURCE : t.modified(r.fields) || t.modified(a) ? t.ADD_MOD : t.ADD;
    return v && (t = t.materialize().reflow(!0)), e.initonly || t.modifies(a), t.visit(o, (s) => s[a] = r(s, e));
  }
});
function jZ(e) {
  qr.call(this, [], e);
}
Si(jZ, qr, {
  transform(e, t) {
    const r = t.fork(t.ALL), a = e.generator;
    let v = this.value, o = e.size - v.length, s, n, l;
    if (o > 0) {
      for (s = []; --o >= 0; )
        s.push(l = rs(a(e))), v.push(l);
      r.add = r.add.length ? r.materialize(r.ADD).add.concat(s) : s;
    } else
      n = v.slice(0, -o), r.rem = r.rem.length ? r.materialize(r.REM).rem.concat(n) : n, v = v.slice(-o);
    return r.source = this.value = v, r;
  }
});
const p6 = {
  value: "value",
  median: hY,
  mean: c1e,
  min: DE,
  max: av
}, Cve = [];
function LL(e) {
  qr.call(this, [], e);
}
LL.Definition = {
  type: "Impute",
  metadata: {
    changes: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "key",
    type: "field",
    required: !0
  }, {
    name: "keyvals",
    array: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "method",
    type: "enum",
    default: "value",
    values: ["value", "mean", "median", "max", "min"]
  }, {
    name: "value",
    default: 0
  }]
};
function Ive(e) {
  var t = e.method || p6.value, r;
  if (p6[t] == null)
    Jr("Unrecognized imputation method: " + t);
  else return t === p6.value ? (r = e.value !== void 0 ? e.value : 0, () => r) : p6[t];
}
function Dve(e) {
  const t = e.field;
  return (r) => r ? t(r) : NaN;
}
Si(LL, qr, {
  transform(e, t) {
    var r = t.fork(t.ALL), a = Ive(e), v = Dve(e), o = Lu(e.field), s = Lu(e.key), n = (e.groupby || []).map(Lu), l = Lve(t.source, e.groupby, e.key, e.keyvals), u = [], i = this.value, h = l.domain.length, p, _, d, f, c, g, m, x, w, k;
    for (c = 0, x = l.length; c < x; ++c)
      for (p = l[c], d = p.values, _ = NaN, m = 0; m < h; ++m)
        if (p[m] == null) {
          for (f = l.domain[m], k = {
            _impute: !0
          }, g = 0, w = d.length; g < w; ++g) k[n[g]] = d[g];
          k[s] = f, k[o] = Number.isNaN(_) ? _ = a(p, v) : _, u.push(rs(k));
        }
    return u.length && (r.add = r.materialize(r.ADD).add.concat(u)), i.length && (r.rem = r.materialize(r.REM).rem.concat(i)), this.value = u, r;
  }
});
function Lve(e, t, r, a) {
  var v = (g) => g(c), o = [], s = a ? a.slice() : [], n = {}, l = {}, u, i, h, p, _, d, f, c;
  for (s.forEach((g, m) => n[g] = m + 1), p = 0, f = e.length; p < f; ++p)
    c = e[p], d = r(c), _ = n[d] || (n[d] = s.push(d)), i = (u = t ? t.map(v) : Cve) + "", (h = l[i]) || (h = l[i] = [], o.push(h), h.values = u), h[_ - 1] = c;
  return o.domain = s, o;
}
function PL(e) {
  bg.call(this, e);
}
PL.Definition = {
  type: "JoinAggregate",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: c4
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "key",
    type: "field"
  }]
};
Si(PL, bg, {
  transform(e, t) {
    const r = this, a = e.modified();
    let v;
    return r.value && (a || t.modified(r._inputs, !0)) ? (v = r.value = a ? r.init(e) : {}, t.visit(t.SOURCE, (o) => r.add(o))) : (v = r.value = r.value || this.init(e), t.visit(t.REM, (o) => r.rem(o)), t.visit(t.ADD, (o) => r.add(o))), r.changes(), t.visit(t.SOURCE, (o) => {
      $a(o, v[r.cellkey(o)].tuple);
    }), t.reflow(a).modifies(this._outputs);
  },
  changes() {
    const e = this._adds, t = this._mods;
    let r, a;
    for (r = 0, a = this._alen; r < a; ++r)
      this.celltuple(e[r]), e[r] = null;
    for (r = 0, a = this._mlen; r < a; ++r)
      this.celltuple(t[r]), t[r] = null;
    this._alen = this._mlen = 0;
  }
});
function OL(e) {
  qr.call(this, null, e);
}
OL.Definition = {
  type: "KDE",
  metadata: {
    generates: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "cumulative",
    type: "boolean",
    default: !1
  }, {
    name: "counts",
    type: "boolean",
    default: !1
  }, {
    name: "bandwidth",
    type: "number",
    default: 0
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "steps",
    type: "number"
  }, {
    name: "minsteps",
    type: "number",
    default: 25
  }, {
    name: "maxsteps",
    type: "number",
    default: 200
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["value", "density"]
  }]
};
Si(OL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const a = t.materialize(t.SOURCE).source, v = TL(a, e.groupby, e.field), o = (e.groupby || []).map(Lu), s = e.bandwidth, n = e.cumulative ? "cdf" : "pdf", l = e.as || ["value", "density"], u = [];
      let i = e.extent, h = e.steps || e.minsteps || 25, p = e.steps || e.maxsteps || 200;
      n !== "pdf" && n !== "cdf" && Jr("Invalid density method: " + n), e.resolve === "shared" && (i || (i = M0(a, e.field)), h = p = e.steps || p), v.forEach((_) => {
        const d = oL(_, s)[n], f = e.counts ? _.length : 1, c = i || M0(_);
        M9(d, c, h, p).forEach((g) => {
          const m = {};
          for (let x = 0; x < o.length; ++x)
            m[o[x]] = _.dims[x];
          m[l[0]] = g[0], m[l[1]] = g[1] * f, u.push(rs(m));
        });
      }), this.value && (r.rem = this.value), this.value = r.add = r.source = u;
    }
    return r;
  }
});
function UZ(e) {
  Zs.call(this, null, Pve, e);
}
Si(UZ, Zs);
function Pve(e) {
  return this.value && !e.modified() ? this.value : RD(e.fields, e.flat);
}
function VZ(e) {
  qr.call(this, [], e), this._pending = null;
}
Si(VZ, qr, {
  transform(e, t) {
    const r = t.dataflow;
    return this._pending ? jS(this, t, this._pending) : Ove(e) ? t.StopPropagation : e.values ? jS(this, t, r.parse(e.values, e.format)) : e.async ? {
      async: r.request(e.url, e.format).then((v) => (this._pending = Ri(v.data), (o) => o.touch(this)))
    } : r.request(e.url, e.format).then((a) => jS(this, t, Ri(a.data)));
  }
});
function Ove(e) {
  return e.modified("async") && !(e.modified("values") || e.modified("url") || e.modified("format"));
}
function jS(e, t, r) {
  r.forEach(rs);
  const a = t.fork(t.NO_FIELDS & t.NO_SOURCE);
  return a.rem = e.value, e.value = a.source = a.add = r, e._pending = null, a.rem.length && a.clean(!0), a;
}
function zL(e) {
  qr.call(this, {}, e);
}
zL.Definition = {
  type: "Lookup",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "index",
    type: "index",
    params: [{
      name: "from",
      type: "data",
      required: !0
    }, {
      name: "key",
      type: "field",
      required: !0
    }]
  }, {
    name: "values",
    type: "field",
    array: !0
  }, {
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "as",
    type: "string",
    array: !0
  }, {
    name: "default",
    default: null
  }]
};
Si(zL, qr, {
  transform(e, t) {
    const r = e.fields, a = e.index, v = e.values, o = e.default == null ? null : e.default, s = e.modified(), n = r.length;
    let l = s ? t.SOURCE : t.ADD, u = t, i = e.as, h, p, _;
    return v ? (p = v.length, n > 1 && !i && Jr('Multi-field lookup requires explicit "as" parameter.'), i && i.length !== n * p && Jr('The "as" parameter has too few output field names.'), i = i || v.map(Lu), h = function(d) {
      for (var f = 0, c = 0, g, m; f < n; ++f)
        if (m = a.get(r[f](d)), m == null) for (g = 0; g < p; ++g, ++c) d[i[c]] = o;
        else for (g = 0; g < p; ++g, ++c) d[i[c]] = v[g](m);
    }) : (i || Jr("Missing output field names."), h = function(d) {
      for (var f = 0, c; f < n; ++f)
        c = a.get(r[f](d)), d[i[f]] = c ?? o;
    }), s ? u = t.reflow(!0) : (_ = r.some((d) => t.modified(d.fields)), l |= _ ? t.MOD : 0), t.visit(l, h), u.modifies(i);
  }
});
function $Z(e) {
  Zs.call(this, null, zve, e);
}
Si($Z, Zs);
function zve(e) {
  if (this.value && !e.modified())
    return this.value;
  const t = e.extents, r = t.length;
  let a = 1 / 0, v = -1 / 0, o, s;
  for (o = 0; o < r; ++o)
    s = t[o], s[0] < a && (a = s[0]), s[1] > v && (v = s[1]);
  return [a, v];
}
function qZ(e) {
  Zs.call(this, null, Rve, e);
}
Si(qZ, Zs);
function Rve(e) {
  return this.value && !e.modified() ? this.value : e.values.reduce((t, r) => t.concat(r), []);
}
function HZ(e) {
  qr.call(this, null, e);
}
Si(HZ, qr, {
  transform(e, t) {
    return this.modified(e.modified()), this.value = e, t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function RL(e) {
  bg.call(this, e);
}
RL.Definition = {
  type: "Pivot",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "value",
    type: "field",
    required: !0
  }, {
    name: "op",
    type: "enum",
    values: c4,
    default: "sum"
  }, {
    name: "limit",
    type: "number",
    default: 0
  }, {
    name: "key",
    type: "field"
  }]
};
Si(RL, bg, {
  _transform: bg.prototype.transform,
  transform(e, t) {
    return this._transform(Fve(e, t), t);
  }
});
function Fve(e, t) {
  const r = e.field, a = e.value, v = (e.op === "count" ? "__count__" : e.op) || "sum", o = Ff(r).concat(Ff(a)), s = Bve(r, e.limit || 0, t);
  return t.changed() && e.set("__pivot__", null, null, !0), {
    key: e.key,
    groupby: e.groupby,
    ops: s.map(() => v),
    fields: s.map((n) => Nve(n, r, a, o)),
    as: s.map((n) => n + ""),
    modified: e.modified.bind(e)
  };
}
function Nve(e, t, r, a) {
  return jh((v) => t(v) === e ? r(v) : NaN, a, e + "");
}
function Bve(e, t, r) {
  const a = {}, v = [];
  return r.visit(r.SOURCE, (o) => {
    const s = e(o);
    a[s] || (a[s] = 1, v.push(s));
  }), v.sort(c9), t ? v.slice(0, t) : v;
}
function GZ(e) {
  E9.call(this, e);
}
Si(GZ, E9, {
  transform(e, t) {
    const r = e.subflow, a = e.field, v = (o) => this.subflow(sa(o), r, t, o);
    return (e.modified("field") || a && t.modified(Ff(a))) && Jr("PreFacet does not support field modification."), this.initTargets(), a ? (t.visit(t.MOD, (o) => {
      const s = v(o);
      a(o).forEach((n) => s.mod(n));
    }), t.visit(t.ADD, (o) => {
      const s = v(o);
      a(o).forEach((n) => s.add(rs(n)));
    }), t.visit(t.REM, (o) => {
      const s = v(o);
      a(o).forEach((n) => s.rem(n));
    })) : (t.visit(t.MOD, (o) => v(o).mod(o)), t.visit(t.ADD, (o) => v(o).add(o)), t.visit(t.REM, (o) => v(o).rem(o))), t.clean() && t.runAfter(() => this.clean()), t;
  }
});
function FL(e) {
  qr.call(this, null, e);
}
FL.Definition = {
  type: "Project",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }]
};
Si(FL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE), a = e.fields, v = RZ(e.fields, e.as || []), o = a ? (n, l) => jve(n, l, a, v) : b9;
    let s;
    return this.value ? s = this.value : (t = t.addAll(), s = this.value = {}), t.visit(t.REM, (n) => {
      const l = sa(n);
      r.rem.push(s[l]), s[l] = null;
    }), t.visit(t.ADD, (n) => {
      const l = o(n, rs({}));
      s[sa(n)] = l, r.add.push(l);
    }), t.visit(t.MOD, (n) => {
      r.mod.push(o(n, s[sa(n)]));
    }), r;
  }
});
function jve(e, t, r, a) {
  for (let v = 0, o = r.length; v < o; ++v)
    t[a[v]] = r[v](e);
  return t;
}
function WZ(e) {
  qr.call(this, null, e);
}
Si(WZ, qr, {
  transform(e, t) {
    return this.value = e.value, e.modified("value") ? t.fork(t.NO_SOURCE | t.NO_FIELDS) : t.StopPropagation;
  }
});
function NL(e) {
  qr.call(this, null, e);
}
NL.Definition = {
  type: "Quantile",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "probs",
    type: "number",
    array: !0
  }, {
    name: "step",
    type: "number",
    default: 0.01
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["prob", "value"]
  }]
};
const Uve = 1e-14;
Si(NL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = e.as || ["prob", "value"];
    if (this.value && !e.modified() && !t.changed())
      return r.source = this.value, r;
    const v = t.materialize(t.SOURCE).source, o = TL(v, e.groupby, e.field), s = (e.groupby || []).map(Lu), n = [], l = e.step || 0.01, u = e.probs || Kh(l / 2, 1 - Uve, l), i = u.length;
    return o.forEach((h) => {
      const p = tL(h, u);
      for (let _ = 0; _ < i; ++_) {
        const d = {};
        for (let f = 0; f < s.length; ++f)
          d[s[f]] = h.dims[f];
        d[a[0]] = u[_], d[a[1]] = p[_], n.push(rs(d));
      }
    }), this.value && (r.rem = this.value), this.value = r.add = r.source = n, r;
  }
});
function YZ(e) {
  qr.call(this, null, e);
}
Si(YZ, qr, {
  transform(e, t) {
    let r, a;
    return this.value ? a = this.value : (r = t = t.addAll(), a = this.value = {}), e.derive && (r = t.fork(t.NO_SOURCE), t.visit(t.REM, (v) => {
      const o = sa(v);
      r.rem.push(a[o]), a[o] = null;
    }), t.visit(t.ADD, (v) => {
      const o = JD(v);
      a[sa(v)] = o, r.add.push(o);
    }), t.visit(t.MOD, (v) => {
      const o = a[sa(v)];
      for (const s in v)
        o[s] = v[s], r.modifies(s);
      r.mod.push(o);
    })), r;
  }
});
function BL(e) {
  qr.call(this, [], e), this.count = 0;
}
BL.Definition = {
  type: "Sample",
  metadata: {},
  params: [{
    name: "size",
    type: "number",
    default: 1e3
  }]
};
Si(BL, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE), a = e.modified("size"), v = e.size, o = this.value.reduce((i, h) => (i[sa(h)] = 1, i), {});
    let s = this.value, n = this.count, l = 0;
    function u(i) {
      let h, p;
      s.length < v ? s.push(i) : (p = ~~((n + 1) * Od()), p < s.length && p >= l && (h = s[p], o[sa(h)] && r.rem.push(h), s[p] = i)), ++n;
    }
    if (t.rem.length && (t.visit(t.REM, (i) => {
      const h = sa(i);
      o[h] && (o[h] = -1, r.rem.push(i)), --n;
    }), s = s.filter((i) => o[sa(i)] !== -1)), (t.rem.length || a) && s.length < v && t.source && (l = n = s.length, t.visit(t.SOURCE, (i) => {
      o[sa(i)] || u(i);
    }), l = -1), a && s.length > v) {
      const i = s.length - v;
      for (let h = 0; h < i; ++h)
        o[sa(s[h])] = -1, r.rem.push(s[h]);
      s = s.slice(i);
    }
    return t.mod.length && t.visit(t.MOD, (i) => {
      o[sa(i)] && r.mod.push(i);
    }), t.add.length && t.visit(t.ADD, u), (t.add.length || l < 0) && (r.add = s.filter((i) => !o[sa(i)])), this.count = n, this.value = r.source = s, r;
  }
});
function jL(e) {
  qr.call(this, null, e);
}
jL.Definition = {
  type: "Sequence",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "start",
    type: "number",
    required: !0
  }, {
    name: "stop",
    type: "number",
    required: !0
  }, {
    name: "step",
    type: "number",
    default: 1
  }, {
    name: "as",
    type: "string",
    default: "data"
  }]
};
Si(jL, qr, {
  transform(e, t) {
    if (this.value && !e.modified()) return;
    const r = t.materialize().fork(t.MOD), a = e.as || "data";
    return r.rem = this.value ? t.rem.concat(this.value) : t.rem, this.value = Kh(e.start, e.stop, e.step || 1).map((v) => {
      const o = {};
      return o[a] = v, rs(o);
    }), r.add = t.add.concat(this.value), r;
  }
});
function ZZ(e) {
  qr.call(this, null, e), this.modified(!0);
}
Si(ZZ, qr, {
  transform(e, t) {
    return this.value = t.source, t.changed() ? t.fork(t.NO_SOURCE | t.NO_FIELDS) : t.StopPropagation;
  }
});
function UL(e) {
  qr.call(this, null, e);
}
const XZ = ["unit0", "unit1"];
UL.Definition = {
  type: "TimeUnit",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "interval",
    type: "boolean",
    default: !0
  }, {
    name: "units",
    type: "enum",
    values: $D,
    array: !0
  }, {
    name: "step",
    type: "number",
    default: 1
  }, {
    name: "maxbins",
    type: "number",
    default: 40
  }, {
    name: "extent",
    type: "date",
    array: !0
  }, {
    name: "timezone",
    type: "enum",
    default: "local",
    values: ["local", "utc"]
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: XZ
  }]
};
Si(UL, qr, {
  transform(e, t) {
    const r = e.field, a = e.interval !== !1, v = e.timezone === "utc", o = this._floor(e, t), s = (v ? Sb : Ab)(o.unit).offset, n = e.as || XZ, l = n[0], u = n[1], i = o.step;
    let h = o.start || 1 / 0, p = o.stop || -1 / 0, _ = t.ADD;
    return (e.modified() || t.changed(t.REM) || t.modified(Ff(r))) && (t = t.reflow(!0), _ = t.SOURCE, h = 1 / 0, p = -1 / 0), t.visit(_, (d) => {
      const f = r(d);
      let c, g;
      f == null ? (d[l] = null, a && (d[u] = null)) : (d[l] = c = g = o(f), a && (d[u] = g = s(c, i)), c < h && (h = c), g > p && (p = g));
    }), o.start = h, o.stop = p, t.modifies(a ? n : l);
  },
  _floor(e, t) {
    const r = e.timezone === "utc", {
      units: a,
      step: v
    } = e.units ? {
      units: e.units,
      step: e.step || 1
    } : jY({
      extent: e.extent || M0(t.materialize(t.SOURCE).source, e.field),
      maxbins: e.maxbins
    }), o = qD(a), s = this.value || {}, n = (r ? DY : IY)(o, v);
    return n.unit = mo(o), n.units = o, n.step = v, n.start = s.start, n.stop = s.stop, this.value = n;
  }
});
function KZ(e) {
  qr.call(this, _b(), e);
}
Si(KZ, qr, {
  transform(e, t) {
    const r = t.dataflow, a = e.field, v = this.value, o = (n) => v.set(a(n), n);
    let s = !0;
    return e.modified("field") || t.modified(a.fields) ? (v.clear(), t.visit(t.SOURCE, o)) : t.changed() ? (t.visit(t.REM, (n) => v.delete(a(n))), t.visit(t.ADD, o)) : s = !1, this.modified(s), v.empty > r.cleanThreshold && r.runAfter(v.clean), t.fork();
  }
});
function JZ(e) {
  qr.call(this, null, e);
}
Si(JZ, qr, {
  transform(e, t) {
    (!this.value || e.modified("field") || e.modified("sort") || t.changed() || e.sort && t.modified(e.sort.fields)) && (this.value = (e.sort ? t.source.slice().sort(qv(e.sort)) : t.source).map(e.field));
  }
});
function Vve(e, t, r, a) {
  const v = kw[e](t, r);
  return {
    init: v.init || W1,
    update: function(o, s) {
      s[a] = v.next(o);
    }
  };
}
const kw = {
  row_number: function() {
    return {
      next: (e) => e.index + 1
    };
  },
  rank: function() {
    let e;
    return {
      init: () => e = 1,
      next: (t) => {
        const r = t.index, a = t.data;
        return r && t.compare(a[r - 1], a[r]) ? e = r + 1 : e;
      }
    };
  },
  dense_rank: function() {
    let e;
    return {
      init: () => e = 1,
      next: (t) => {
        const r = t.index, a = t.data;
        return r && t.compare(a[r - 1], a[r]) ? ++e : e;
      }
    };
  },
  percent_rank: function() {
    const e = kw.rank(), t = e.next;
    return {
      init: e.init,
      next: (r) => (t(r) - 1) / (r.data.length - 1)
    };
  },
  cume_dist: function() {
    let e;
    return {
      init: () => e = 0,
      next: (t) => {
        const r = t.data, a = t.compare;
        let v = t.index;
        if (e < v) {
          for (; v + 1 < r.length && !a(r[v], r[v + 1]); ) ++v;
          e = v;
        }
        return (1 + e) / r.length;
      }
    };
  },
  ntile: function(e, t) {
    t = +t, t > 0 || Jr("ntile num must be greater than zero.");
    const r = kw.cume_dist(), a = r.next;
    return {
      init: r.init,
      next: (v) => Math.ceil(t * a(v))
    };
  },
  lag: function(e, t) {
    return t = +t || 1, {
      next: (r) => {
        const a = r.index - t;
        return a >= 0 ? e(r.data[a]) : null;
      }
    };
  },
  lead: function(e, t) {
    return t = +t || 1, {
      next: (r) => {
        const a = r.index + t, v = r.data;
        return a < v.length ? e(v[a]) : null;
      }
    };
  },
  first_value: function(e) {
    return {
      next: (t) => e(t.data[t.i0])
    };
  },
  last_value: function(e) {
    return {
      next: (t) => e(t.data[t.i1 - 1])
    };
  },
  nth_value: function(e, t) {
    return t = +t, t > 0 || Jr("nth_value nth must be greater than zero."), {
      next: (r) => {
        const a = r.i0 + (t - 1);
        return a < r.i1 ? e(r.data[a]) : null;
      }
    };
  },
  prev_value: function(e) {
    let t;
    return {
      init: () => t = null,
      next: (r) => {
        const a = e(r.data[r.index]);
        return a != null ? t = a : t;
      }
    };
  },
  next_value: function(e) {
    let t, r;
    return {
      init: () => (t = null, r = -1),
      next: (a) => {
        const v = a.data;
        return a.index <= r ? t : (r = $ve(e, v, a.index)) < 0 ? (r = v.length, t = null) : t = e(v[r]);
      }
    };
  }
};
function $ve(e, t, r) {
  for (let a = t.length; r < a; ++r)
    if (e(t[r]) != null) return r;
  return -1;
}
const qve = Object.keys(kw);
function QZ(e) {
  const t = Ri(e.ops), r = Ri(e.fields), a = Ri(e.params), v = Ri(e.aggregate_params), o = Ri(e.as), s = this.outputs = [], n = this.windows = [], l = {}, u = {}, i = [], h = [];
  let p = !0;
  function _(d) {
    Ri(Ff(d)).forEach((f) => l[f] = 1);
  }
  _(e.sort), t.forEach((d, f) => {
    const c = r[f], g = a[f], m = v[f] || null, x = Lu(c), w = EZ(d, x, o[f]);
    if (_(c), s.push(w), ua(kw, d))
      n.push(Vve(d, c, g, w));
    else {
      if (c == null && d !== "count" && Jr("Null aggregate field specified."), d === "count") {
        i.push(w);
        return;
      }
      p = !1;
      let k = u[x];
      k || (k = u[x] = [], k.field = c, h.push(k)), k.push(CZ(d, m, w));
    }
  }), (i.length || h.length) && (this.cell = Hve(h, i, p)), this.inputs = Object.keys(l);
}
const eX = QZ.prototype;
eX.init = function() {
  this.windows.forEach((e) => e.init()), this.cell && this.cell.init();
};
eX.update = function(e, t) {
  const r = this.cell, a = this.windows, v = e.data, o = a && a.length;
  let s;
  if (r) {
    for (s = e.p0; s < e.i0; ++s) r.rem(v[s]);
    for (s = e.p1; s < e.i1; ++s) r.add(v[s]);
    r.set(t);
  }
  for (s = 0; s < o; ++s) a[s].update(e, t);
};
function Hve(e, t, r) {
  e = e.map((l) => DZ(l, l.field));
  const a = {
    num: 0,
    agg: null,
    store: !1,
    count: t
  };
  if (!r)
    for (var v = e.length, o = a.agg = Array(v), s = 0; s < v; ++s) o[s] = new e[s](a);
  if (a.store)
    var n = a.data = new vL();
  return a.add = function(l) {
    if (a.num += 1, !r) {
      n && n.add(l);
      for (let u = 0; u < v; ++u)
        o[u].add(o[u].get(l), l);
    }
  }, a.rem = function(l) {
    if (a.num -= 1, !r) {
      n && n.rem(l);
      for (let u = 0; u < v; ++u)
        o[u].rem(o[u].get(l), l);
    }
  }, a.set = function(l) {
    let u, i;
    for (n && n.values(), u = 0, i = t.length; u < i; ++u) l[t[u]] = a.num;
    if (!r) for (u = 0, i = o.length; u < i; ++u) o[u].set(l);
  }, a.init = function() {
    a.num = 0, n && n.reset();
    for (let l = 0; l < v; ++l) o[l].init();
  }, a;
}
function VL(e) {
  qr.call(this, {}, e), this._mlen = 0, this._mods = [];
}
VL.Definition = {
  type: "Window",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "sort",
    type: "compare"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: qve.concat(c4)
  }, {
    name: "params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "aggregate_params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "frame",
    type: "number",
    null: !0,
    array: !0,
    length: 2,
    default: [null, 0]
  }, {
    name: "ignorePeers",
    type: "boolean",
    default: !1
  }]
};
Si(VL, qr, {
  transform(e, t) {
    this.stamp = t.stamp;
    const r = e.modified(), a = qv(e.sort), v = VE(e.groupby), o = (n) => this.group(v(n));
    let s = this.state;
    (!s || r) && (s = this.state = new QZ(e)), r || t.modified(s.inputs) ? (this.value = {}, t.visit(t.SOURCE, (n) => o(n).add(n))) : (t.visit(t.REM, (n) => o(n).remove(n)), t.visit(t.ADD, (n) => o(n).add(n)));
    for (let n = 0, l = this._mlen; n < l; ++n)
      Gve(this._mods[n], s, a, e);
    return this._mlen = 0, this._mods = [], t.reflow(r).modifies(s.outputs);
  },
  group(e) {
    let t = this.value[e];
    return t || (t = this.value[e] = LZ(sa), t.stamp = -1), t.stamp < this.stamp && (t.stamp = this.stamp, this._mods[this._mlen++] = t), t;
  }
});
function Gve(e, t, r, a) {
  const v = a.sort, o = v && !a.ignorePeers, s = a.frame || [null, 0], n = e.data(r), l = n.length, u = o ? wb(v) : null, i = {
    i0: 0,
    i1: 0,
    p0: 0,
    p1: 0,
    index: 0,
    data: n,
    compare: v || Vf(-1)
  };
  t.init();
  for (let h = 0; h < l; ++h)
    Wve(i, s, h, l), o && Yve(i, u), t.update(i, n[h]);
}
function Wve(e, t, r, a) {
  e.p0 = e.i0, e.p1 = e.i1, e.i0 = t[0] == null ? 0 : Math.max(0, r - Math.abs(t[0])), e.i1 = t[1] == null ? a : Math.min(a, r + Math.abs(t[1]) + 1), e.index = r;
}
function Yve(e, t) {
  const r = e.i0, a = e.i1 - 1, v = e.compare, o = e.data, s = o.length - 1;
  r > 0 && !v(o[r], o[r - 1]) && (e.i0 = t.left(o, o[r])), a < s && !v(o[a], o[a + 1]) && (e.i1 = t.right(o, o[a]));
}
const Zve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  aggregate: bg,
  bin: xL,
  collect: bL,
  compare: PZ,
  countpattern: _L,
  cross: wL,
  density: kL,
  dotbin: AL,
  expression: NZ,
  extent: SL,
  facet: E9,
  field: BZ,
  filter: EL,
  flatten: CL,
  fold: IL,
  formula: DL,
  generate: jZ,
  impute: LL,
  joinaggregate: PL,
  kde: OL,
  key: UZ,
  load: VZ,
  lookup: zL,
  multiextent: $Z,
  multivalues: qZ,
  params: HZ,
  pivot: RL,
  prefacet: GZ,
  project: FL,
  proxy: WZ,
  quantile: NL,
  relay: YZ,
  sample: BL,
  sequence: jL,
  sieve: ZZ,
  subflow: ML,
  timeunit: UL,
  tupleindex: KZ,
  values: JZ,
  window: VL
}, Symbol.toStringTag, { value: "Module" }));
function gs(e) {
  return function() {
    return e;
  };
}
const UB = Math.abs, Tf = Math.atan2, Ty = Math.cos, Xve = Math.max, US = Math.min, Kp = Math.sin, Zy = Math.sqrt, Sf = 1e-12, Rx = Math.PI, h7 = Rx / 2, tX = 2 * Rx;
function Kve(e) {
  return e > 1 ? 0 : e < -1 ? Rx : Math.acos(e);
}
function VB(e) {
  return e >= 1 ? h7 : e <= -1 ? -h7 : Math.asin(e);
}
const $E = Math.PI, qE = 2 * $E, Ny = 1e-6, Jve = qE - Ny;
function nX(e) {
  this._ += e[0];
  for (let t = 1, r = e.length; t < r; ++t)
    this._ += arguments[t] + e[t];
}
function Qve(e) {
  let t = Math.floor(e);
  if (!(t >= 0)) throw new Error(`invalid digits: ${e}`);
  if (t > 15) return nX;
  const r = 10 ** t;
  return function(a) {
    this._ += a[0];
    for (let v = 1, o = a.length; v < o; ++v)
      this._ += Math.round(arguments[v] * r) / r + a[v];
  };
}
let $L = class {
  constructor(t) {
    this._x0 = this._y0 = // start of current subpath
    this._x1 = this._y1 = null, this._ = "", this._append = t == null ? nX : Qve(t);
  }
  moveTo(t, r) {
    this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}`;
  }
  closePath() {
    this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
  }
  lineTo(t, r) {
    this._append`L${this._x1 = +t},${this._y1 = +r}`;
  }
  quadraticCurveTo(t, r, a, v) {
    this._append`Q${+t},${+r},${this._x1 = +a},${this._y1 = +v}`;
  }
  bezierCurveTo(t, r, a, v, o, s) {
    this._append`C${+t},${+r},${+a},${+v},${this._x1 = +o},${this._y1 = +s}`;
  }
  arcTo(t, r, a, v, o) {
    if (t = +t, r = +r, a = +a, v = +v, o = +o, o < 0) throw new Error(`negative radius: ${o}`);
    let s = this._x1, n = this._y1, l = a - t, u = v - r, i = s - t, h = n - r, p = i * i + h * h;
    if (this._x1 === null)
      this._append`M${this._x1 = t},${this._y1 = r}`;
    else if (p > Ny) if (!(Math.abs(h * l - u * i) > Ny) || !o)
      this._append`L${this._x1 = t},${this._y1 = r}`;
    else {
      let _ = a - s, d = v - n, f = l * l + u * u, c = _ * _ + d * d, g = Math.sqrt(f), m = Math.sqrt(p), x = o * Math.tan(($E - Math.acos((f + p - c) / (2 * g * m))) / 2), w = x / m, k = x / g;
      Math.abs(w - 1) > Ny && this._append`L${t + w * i},${r + w * h}`, this._append`A${o},${o},0,0,${+(h * _ > i * d)},${this._x1 = t + k * l},${this._y1 = r + k * u}`;
    }
  }
  arc(t, r, a, v, o, s) {
    if (t = +t, r = +r, a = +a, s = !!s, a < 0) throw new Error(`negative radius: ${a}`);
    let n = a * Math.cos(v), l = a * Math.sin(v), u = t + n, i = r + l, h = 1 ^ s, p = s ? v - o : o - v;
    this._x1 === null ? this._append`M${u},${i}` : (Math.abs(this._x1 - u) > Ny || Math.abs(this._y1 - i) > Ny) && this._append`L${u},${i}`, a && (p < 0 && (p = p % qE + qE), p > Jve ? this._append`A${a},${a},0,1,${h},${t - n},${r - l}A${a},${a},0,1,${h},${this._x1 = u},${this._y1 = i}` : p > Ny && this._append`A${a},${a},0,${+(p >= $E)},${h},${this._x1 = t + a * Math.cos(o)},${this._y1 = r + a * Math.sin(o)}`);
  }
  rect(t, r, a, v) {
    this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}h${a = +a}v${+v}h${-a}Z`;
  }
  toString() {
    return this._;
  }
};
function C9() {
  return new $L();
}
C9.prototype = $L.prototype;
function I9(e) {
  let t = 3;
  return e.digits = function(r) {
    if (!arguments.length) return t;
    if (r == null)
      t = null;
    else {
      const a = Math.floor(r);
      if (!(a >= 0)) throw new RangeError(`invalid digits: ${r}`);
      t = a;
    }
    return e;
  }, () => new $L(t);
}
function e2e(e) {
  return e.innerRadius;
}
function t2e(e) {
  return e.outerRadius;
}
function n2e(e) {
  return e.startAngle;
}
function r2e(e) {
  return e.endAngle;
}
function i2e(e) {
  return e && e.padAngle;
}
function a2e(e, t, r, a, v, o, s, n) {
  var l = r - e, u = a - t, i = s - v, h = n - o, p = h * l - i * u;
  if (!(p * p < Sf))
    return p = (i * (t - o) - h * (e - v)) / p, [e + p * l, t + p * u];
}
function m6(e, t, r, a, v, o, s) {
  var n = e - r, l = t - a, u = (s ? o : -o) / Zy(n * n + l * l), i = u * l, h = -u * n, p = e + i, _ = t + h, d = r + i, f = a + h, c = (p + d) / 2, g = (_ + f) / 2, m = d - p, x = f - _, w = m * m + x * x, k = v - o, S = p * f - d * _, A = (x < 0 ? -1 : 1) * Zy(Xve(0, k * k * w - S * S)), C = (S * x - m * A) / w, D = (-S * m - x * A) / w, L = (S * x + m * A) / w, E = (-S * m + x * A) / w, P = C - c, I = D - g, M = L - c, O = E - g;
  return P * P + I * I > M * M + O * O && (C = L, D = E), {
    cx: C,
    cy: D,
    x01: -i,
    y01: -h,
    x11: C * (v / k - 1),
    y11: D * (v / k - 1)
  };
}
function o2e() {
  var e = e2e, t = t2e, r = gs(0), a = null, v = n2e, o = r2e, s = i2e, n = null, l = I9(u);
  function u() {
    var i, h, p = +e.apply(this, arguments), _ = +t.apply(this, arguments), d = v.apply(this, arguments) - h7, f = o.apply(this, arguments) - h7, c = UB(f - d), g = f > d;
    if (n || (n = i = l()), _ < p && (h = _, _ = p, p = h), !(_ > Sf)) n.moveTo(0, 0);
    else if (c > tX - Sf)
      n.moveTo(_ * Ty(d), _ * Kp(d)), n.arc(0, 0, _, d, f, !g), p > Sf && (n.moveTo(p * Ty(f), p * Kp(f)), n.arc(0, 0, p, f, d, g));
    else {
      var m = d, x = f, w = d, k = f, S = c, A = c, C = s.apply(this, arguments) / 2, D = C > Sf && (a ? +a.apply(this, arguments) : Zy(p * p + _ * _)), L = US(UB(_ - p) / 2, +r.apply(this, arguments)), E = L, P = L, I, M;
      if (D > Sf) {
        var O = VB(D / p * Kp(C)), T = VB(D / _ * Kp(C));
        (S -= O * 2) > Sf ? (O *= g ? 1 : -1, w += O, k -= O) : (S = 0, w = k = (d + f) / 2), (A -= T * 2) > Sf ? (T *= g ? 1 : -1, m += T, x -= T) : (A = 0, m = x = (d + f) / 2);
      }
      var z = _ * Ty(m), F = _ * Kp(m), U = p * Ty(k), V = p * Kp(k);
      if (L > Sf) {
        var $ = _ * Ty(x), q = _ * Kp(x), K = p * Ty(w), re = p * Kp(w), Y;
        if (c < Rx)
          if (Y = a2e(z, F, K, re, $, q, U, V)) {
            var te = z - Y[0], ee = F - Y[1], X = $ - Y[0], Q = q - Y[1], ue = 1 / Kp(Kve((te * X + ee * Q) / (Zy(te * te + ee * ee) * Zy(X * X + Q * Q))) / 2), ce = Zy(Y[0] * Y[0] + Y[1] * Y[1]);
            E = US(L, (p - ce) / (ue - 1)), P = US(L, (_ - ce) / (ue + 1));
          } else
            E = P = 0;
      }
      A > Sf ? P > Sf ? (I = m6(K, re, z, F, _, P, g), M = m6($, q, U, V, _, P, g), n.moveTo(I.cx + I.x01, I.cy + I.y01), P < L ? n.arc(I.cx, I.cy, P, Tf(I.y01, I.x01), Tf(M.y01, M.x01), !g) : (n.arc(I.cx, I.cy, P, Tf(I.y01, I.x01), Tf(I.y11, I.x11), !g), n.arc(0, 0, _, Tf(I.cy + I.y11, I.cx + I.x11), Tf(M.cy + M.y11, M.cx + M.x11), !g), n.arc(M.cx, M.cy, P, Tf(M.y11, M.x11), Tf(M.y01, M.x01), !g))) : (n.moveTo(z, F), n.arc(0, 0, _, m, x, !g)) : n.moveTo(z, F), !(p > Sf) || !(S > Sf) ? n.lineTo(U, V) : E > Sf ? (I = m6(U, V, $, q, p, -E, g), M = m6(z, F, K, re, p, -E, g), n.lineTo(I.cx + I.x01, I.cy + I.y01), E < L ? n.arc(I.cx, I.cy, E, Tf(I.y01, I.x01), Tf(M.y01, M.x01), !g) : (n.arc(I.cx, I.cy, E, Tf(I.y01, I.x01), Tf(I.y11, I.x11), !g), n.arc(0, 0, p, Tf(I.cy + I.y11, I.cx + I.x11), Tf(M.cy + M.y11, M.cx + M.x11), g), n.arc(M.cx, M.cy, E, Tf(M.y11, M.x11), Tf(M.y01, M.x01), !g))) : n.arc(0, 0, p, k, w, g);
    }
    if (n.closePath(), i) return n = null, i + "" || null;
  }
  return u.centroid = function() {
    var i = (+e.apply(this, arguments) + +t.apply(this, arguments)) / 2, h = (+v.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Rx / 2;
    return [Ty(h) * i, Kp(h) * i];
  }, u.innerRadius = function(i) {
    return arguments.length ? (e = typeof i == "function" ? i : gs(+i), u) : e;
  }, u.outerRadius = function(i) {
    return arguments.length ? (t = typeof i == "function" ? i : gs(+i), u) : t;
  }, u.cornerRadius = function(i) {
    return arguments.length ? (r = typeof i == "function" ? i : gs(+i), u) : r;
  }, u.padRadius = function(i) {
    return arguments.length ? (a = i == null ? null : typeof i == "function" ? i : gs(+i), u) : a;
  }, u.startAngle = function(i) {
    return arguments.length ? (v = typeof i == "function" ? i : gs(+i), u) : v;
  }, u.endAngle = function(i) {
    return arguments.length ? (o = typeof i == "function" ? i : gs(+i), u) : o;
  }, u.padAngle = function(i) {
    return arguments.length ? (s = typeof i == "function" ? i : gs(+i), u) : s;
  }, u.context = function(i) {
    return arguments.length ? (n = i ?? null, u) : n;
  }, u;
}
function rX(e) {
  return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function iX(e) {
  this._context = e;
}
iX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
      default:
        this._context.lineTo(e, t);
        break;
    }
  }
};
function qL(e) {
  return new iX(e);
}
function aX(e) {
  return e[0];
}
function oX(e) {
  return e[1];
}
function sX(e, t) {
  var r = gs(!0), a = null, v = qL, o = null, s = I9(n);
  e = typeof e == "function" ? e : e === void 0 ? aX : gs(e), t = typeof t == "function" ? t : t === void 0 ? oX : gs(t);
  function n(l) {
    var u, i = (l = rX(l)).length, h, p = !1, _;
    for (a == null && (o = v(_ = s())), u = 0; u <= i; ++u)
      !(u < i && r(h = l[u], u, l)) === p && ((p = !p) ? o.lineStart() : o.lineEnd()), p && o.point(+e(h, u, l), +t(h, u, l));
    if (_) return o = null, _ + "" || null;
  }
  return n.x = function(l) {
    return arguments.length ? (e = typeof l == "function" ? l : gs(+l), n) : e;
  }, n.y = function(l) {
    return arguments.length ? (t = typeof l == "function" ? l : gs(+l), n) : t;
  }, n.defined = function(l) {
    return arguments.length ? (r = typeof l == "function" ? l : gs(!!l), n) : r;
  }, n.curve = function(l) {
    return arguments.length ? (v = l, a != null && (o = v(a)), n) : v;
  }, n.context = function(l) {
    return arguments.length ? (l == null ? a = o = null : o = v(a = l), n) : a;
  }, n;
}
function lX(e, t, r) {
  var a = null, v = gs(!0), o = null, s = qL, n = null, l = I9(u);
  e = typeof e == "function" ? e : e === void 0 ? aX : gs(+e), t = typeof t == "function" ? t : gs(t === void 0 ? 0 : +t), r = typeof r == "function" ? r : r === void 0 ? oX : gs(+r);
  function u(h) {
    var p, _, d, f = (h = rX(h)).length, c, g = !1, m, x = new Array(f), w = new Array(f);
    for (o == null && (n = s(m = l())), p = 0; p <= f; ++p) {
      if (!(p < f && v(c = h[p], p, h)) === g)
        if (g = !g)
          _ = p, n.areaStart(), n.lineStart();
        else {
          for (n.lineEnd(), n.lineStart(), d = p - 1; d >= _; --d)
            n.point(x[d], w[d]);
          n.lineEnd(), n.areaEnd();
        }
      g && (x[p] = +e(c, p, h), w[p] = +t(c, p, h), n.point(a ? +a(c, p, h) : x[p], r ? +r(c, p, h) : w[p]));
    }
    if (m) return n = null, m + "" || null;
  }
  function i() {
    return sX().defined(v).curve(s).context(o);
  }
  return u.x = function(h) {
    return arguments.length ? (e = typeof h == "function" ? h : gs(+h), a = null, u) : e;
  }, u.x0 = function(h) {
    return arguments.length ? (e = typeof h == "function" ? h : gs(+h), u) : e;
  }, u.x1 = function(h) {
    return arguments.length ? (a = h == null ? null : typeof h == "function" ? h : gs(+h), u) : a;
  }, u.y = function(h) {
    return arguments.length ? (t = typeof h == "function" ? h : gs(+h), r = null, u) : t;
  }, u.y0 = function(h) {
    return arguments.length ? (t = typeof h == "function" ? h : gs(+h), u) : t;
  }, u.y1 = function(h) {
    return arguments.length ? (r = h == null ? null : typeof h == "function" ? h : gs(+h), u) : r;
  }, u.lineX0 = u.lineY0 = function() {
    return i().x(e).y(t);
  }, u.lineY1 = function() {
    return i().x(e).y(r);
  }, u.lineX1 = function() {
    return i().x(a).y(t);
  }, u.defined = function(h) {
    return arguments.length ? (v = typeof h == "function" ? h : gs(!!h), u) : v;
  }, u.curve = function(h) {
    return arguments.length ? (s = h, o != null && (n = s(o)), u) : s;
  }, u.context = function(h) {
    return arguments.length ? (h == null ? o = n = null : n = s(o = h), u) : o;
  }, u;
}
const s2e = {
  draw(e, t) {
    const r = Zy(t / Rx);
    e.moveTo(r, 0), e.arc(0, 0, r, 0, tX);
  }
};
function l2e(e, t) {
  let r = null, a = I9(v);
  e = typeof e == "function" ? e : gs(e || s2e), t = typeof t == "function" ? t : gs(t === void 0 ? 64 : +t);
  function v() {
    let o;
    if (r || (r = o = a()), e.apply(this, arguments).draw(r, +t.apply(this, arguments)), o) return r = null, o + "" || null;
  }
  return v.type = function(o) {
    return arguments.length ? (e = typeof o == "function" ? o : gs(o), v) : e;
  }, v.size = function(o) {
    return arguments.length ? (t = typeof o == "function" ? o : gs(+o), v) : t;
  }, v.context = function(o) {
    return arguments.length ? (r = o ?? null, v) : r;
  }, v;
}
function _g() {
}
function d7(e, t, r) {
  e._context.bezierCurveTo(
    (2 * e._x0 + e._x1) / 3,
    (2 * e._y0 + e._y1) / 3,
    (e._x0 + 2 * e._x1) / 3,
    (e._y0 + 2 * e._y1) / 3,
    (e._x0 + 4 * e._x1 + t) / 6,
    (e._y0 + 4 * e._y1 + r) / 6
  );
}
function D9(e) {
  this._context = e;
}
D9.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 3:
        d7(this, this._x1, this._y1);
      case 2:
        this._context.lineTo(this._x1, this._y1);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
      default:
        d7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function u2e(e) {
  return new D9(e);
}
function uX(e) {
  this._context = e;
}
uX.prototype = {
  areaStart: _g,
  areaEnd: _g,
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x2, this._y2), this._context.closePath();
        break;
      }
      case 2: {
        this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3), this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3), this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x2, this._y2), this.point(this._x3, this._y3), this.point(this._x4, this._y4);
        break;
      }
    }
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._x2 = e, this._y2 = t;
        break;
      case 1:
        this._point = 2, this._x3 = e, this._y3 = t;
        break;
      case 2:
        this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
        break;
      default:
        d7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function c2e(e) {
  return new uX(e);
}
function cX(e) {
  this._context = e;
}
cX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._y0 = this._y1 = NaN, this._point = 0;
  },
  lineEnd: function() {
    (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1;
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3;
        var r = (this._x0 + 4 * this._x1 + e) / 6, a = (this._y0 + 4 * this._y1 + t) / 6;
        this._line ? this._context.lineTo(r, a) : this._context.moveTo(r, a);
        break;
      case 3:
        this._point = 4;
      default:
        d7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function f2e(e) {
  return new cX(e);
}
function fX(e, t) {
  this._basis = new D9(e), this._beta = t;
}
fX.prototype = {
  lineStart: function() {
    this._x = [], this._y = [], this._basis.lineStart();
  },
  lineEnd: function() {
    var e = this._x, t = this._y, r = e.length - 1;
    if (r > 0)
      for (var a = e[0], v = t[0], o = e[r] - a, s = t[r] - v, n = -1, l; ++n <= r; )
        l = n / r, this._basis.point(
          this._beta * e[n] + (1 - this._beta) * (a + l * o),
          this._beta * t[n] + (1 - this._beta) * (v + l * s)
        );
    this._x = this._y = null, this._basis.lineEnd();
  },
  point: function(e, t) {
    this._x.push(+e), this._y.push(+t);
  }
};
const h2e = function e(t) {
  function r(a) {
    return t === 1 ? new D9(a) : new fX(a, t);
  }
  return r.beta = function(a) {
    return e(+a);
  }, r;
}(0.85);
function p7(e, t, r) {
  e._context.bezierCurveTo(
    e._x1 + e._k * (e._x2 - e._x0),
    e._y1 + e._k * (e._y2 - e._y0),
    e._x2 + e._k * (e._x1 - t),
    e._y2 + e._k * (e._y1 - r),
    e._x2,
    e._y2
  );
}
function HL(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
HL.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2:
        this._context.lineTo(this._x2, this._y2);
        break;
      case 3:
        p7(this, this._x1, this._y1);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2, this._x1 = e, this._y1 = t;
        break;
      case 2:
        this._point = 3;
      default:
        p7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const d2e = function e(t) {
  function r(a) {
    return new HL(a, t);
  }
  return r.tension = function(a) {
    return e(+a);
  }, r;
}(0);
function GL(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
GL.prototype = {
  areaStart: _g,
  areaEnd: _g,
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x3, this._y3), this._context.closePath();
        break;
      }
      case 2: {
        this._context.lineTo(this._x3, this._y3), this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
        break;
      }
    }
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._x3 = e, this._y3 = t;
        break;
      case 1:
        this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
        break;
      case 2:
        this._point = 3, this._x5 = e, this._y5 = t;
        break;
      default:
        p7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const p2e = function e(t) {
  function r(a) {
    return new GL(a, t);
  }
  return r.tension = function(a) {
    return e(+a);
  }, r;
}(0);
function WL(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
WL.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._point = 0;
  },
  lineEnd: function() {
    (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1;
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
        break;
      case 3:
        this._point = 4;
      default:
        p7(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const m2e = function e(t) {
  function r(a) {
    return new WL(a, t);
  }
  return r.tension = function(a) {
    return e(+a);
  }, r;
}(0);
function YL(e, t, r) {
  var a = e._x1, v = e._y1, o = e._x2, s = e._y2;
  if (e._l01_a > Sf) {
    var n = 2 * e._l01_2a + 3 * e._l01_a * e._l12_a + e._l12_2a, l = 3 * e._l01_a * (e._l01_a + e._l12_a);
    a = (a * n - e._x0 * e._l12_2a + e._x2 * e._l01_2a) / l, v = (v * n - e._y0 * e._l12_2a + e._y2 * e._l01_2a) / l;
  }
  if (e._l23_a > Sf) {
    var u = 2 * e._l23_2a + 3 * e._l23_a * e._l12_a + e._l12_2a, i = 3 * e._l23_a * (e._l23_a + e._l12_a);
    o = (o * u + e._x1 * e._l23_2a - t * e._l12_2a) / i, s = (s * u + e._y1 * e._l23_2a - r * e._l12_2a) / i;
  }
  e._context.bezierCurveTo(a, v, o, s, e._x2, e._y2);
}
function hX(e, t) {
  this._context = e, this._alpha = t;
}
hX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2:
        this._context.lineTo(this._x2, this._y2);
        break;
      case 3:
        this.point(this._x2, this._y2);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    if (e = +e, t = +t, this._point) {
      var r = this._x2 - e, a = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + a * a, this._alpha));
    }
    switch (this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3;
      default:
        YL(this, e, t);
        break;
    }
    this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const g2e = function e(t) {
  function r(a) {
    return t ? new hX(a, t) : new HL(a, 0);
  }
  return r.alpha = function(a) {
    return e(+a);
  }, r;
}(0.5);
function dX(e, t) {
  this._context = e, this._alpha = t;
}
dX.prototype = {
  areaStart: _g,
  areaEnd: _g,
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 1: {
        this._context.moveTo(this._x3, this._y3), this._context.closePath();
        break;
      }
      case 2: {
        this._context.lineTo(this._x3, this._y3), this._context.closePath();
        break;
      }
      case 3: {
        this.point(this._x3, this._y3), this.point(this._x4, this._y4), this.point(this._x5, this._y5);
        break;
      }
    }
  },
  point: function(e, t) {
    if (e = +e, t = +t, this._point) {
      var r = this._x2 - e, a = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + a * a, this._alpha));
    }
    switch (this._point) {
      case 0:
        this._point = 1, this._x3 = e, this._y3 = t;
        break;
      case 1:
        this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
        break;
      case 2:
        this._point = 3, this._x5 = e, this._y5 = t;
        break;
      default:
        YL(this, e, t);
        break;
    }
    this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const y2e = function e(t) {
  function r(a) {
    return t ? new dX(a, t) : new GL(a, 0);
  }
  return r.alpha = function(a) {
    return e(+a);
  }, r;
}(0.5);
function pX(e, t) {
  this._context = e, this._alpha = t;
}
pX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN, this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
  },
  lineEnd: function() {
    (this._line || this._line !== 0 && this._point === 3) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    if (e = +e, t = +t, this._point) {
      var r = this._x2 - e, a = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(r * r + a * a, this._alpha));
    }
    switch (this._point) {
      case 0:
        this._point = 1;
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3, this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
        break;
      case 3:
        this._point = 4;
      default:
        YL(this, e, t);
        break;
    }
    this._l01_a = this._l12_a, this._l12_a = this._l23_a, this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a, this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const v2e = function e(t) {
  function r(a) {
    return t ? new pX(a, t) : new WL(a, 0);
  }
  return r.alpha = function(a) {
    return e(+a);
  }, r;
}(0.5);
function mX(e) {
  this._context = e;
}
mX.prototype = {
  areaStart: _g,
  areaEnd: _g,
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    this._point && this._context.closePath();
  },
  point: function(e, t) {
    e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
  }
};
function x2e(e) {
  return new mX(e);
}
function $B(e) {
  return e < 0 ? -1 : 1;
}
function qB(e, t, r) {
  var a = e._x1 - e._x0, v = t - e._x1, o = (e._y1 - e._y0) / (a || v < 0 && -0), s = (r - e._y1) / (v || a < 0 && -0), n = (o * v + s * a) / (a + v);
  return ($B(o) + $B(s)) * Math.min(Math.abs(o), Math.abs(s), 0.5 * Math.abs(n)) || 0;
}
function HB(e, t) {
  var r = e._x1 - e._x0;
  return r ? (3 * (e._y1 - e._y0) / r - t) / 2 : t;
}
function VS(e, t, r) {
  var a = e._x0, v = e._y0, o = e._x1, s = e._y1, n = (o - a) / 3;
  e._context.bezierCurveTo(a + n, v + n * t, o - n, s - n * r, o, s);
}
function m7(e) {
  this._context = e;
}
m7.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN, this._point = 0;
  },
  lineEnd: function() {
    switch (this._point) {
      case 2:
        this._context.lineTo(this._x1, this._y1);
        break;
      case 3:
        VS(this, this._t0, HB(this, this._t0));
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    var r = NaN;
    if (e = +e, t = +t, !(e === this._x1 && t === this._y1)) {
      switch (this._point) {
        case 0:
          this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
          break;
        case 1:
          this._point = 2;
          break;
        case 2:
          this._point = 3, VS(this, HB(this, r = qB(this, e, t)), r);
          break;
        default:
          VS(this, this._t0, r = qB(this, e, t));
          break;
      }
      this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = r;
    }
  }
};
function gX(e) {
  this._context = new yX(e);
}
(gX.prototype = Object.create(m7.prototype)).point = function(e, t) {
  m7.prototype.point.call(this, t, e);
};
function yX(e) {
  this._context = e;
}
yX.prototype = {
  moveTo: function(e, t) {
    this._context.moveTo(t, e);
  },
  closePath: function() {
    this._context.closePath();
  },
  lineTo: function(e, t) {
    this._context.lineTo(t, e);
  },
  bezierCurveTo: function(e, t, r, a, v, o) {
    this._context.bezierCurveTo(t, e, a, r, o, v);
  }
};
function b2e(e) {
  return new m7(e);
}
function _2e(e) {
  return new gX(e);
}
function vX(e) {
  this._context = e;
}
vX.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x = [], this._y = [];
  },
  lineEnd: function() {
    var e = this._x, t = this._y, r = e.length;
    if (r)
      if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), r === 2)
        this._context.lineTo(e[1], t[1]);
      else
        for (var a = GB(e), v = GB(t), o = 0, s = 1; s < r; ++o, ++s)
          this._context.bezierCurveTo(a[0][o], v[0][o], a[1][o], v[1][o], e[s], t[s]);
    (this._line || this._line !== 0 && r === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
  },
  point: function(e, t) {
    this._x.push(+e), this._y.push(+t);
  }
};
function GB(e) {
  var t, r = e.length - 1, a, v = new Array(r), o = new Array(r), s = new Array(r);
  for (v[0] = 0, o[0] = 2, s[0] = e[0] + 2 * e[1], t = 1; t < r - 1; ++t) v[t] = 1, o[t] = 4, s[t] = 4 * e[t] + 2 * e[t + 1];
  for (v[r - 1] = 2, o[r - 1] = 7, s[r - 1] = 8 * e[r - 1] + e[r], t = 1; t < r; ++t) a = v[t] / o[t - 1], o[t] -= a, s[t] -= a * s[t - 1];
  for (v[r - 1] = s[r - 1] / o[r - 1], t = r - 2; t >= 0; --t) v[t] = (s[t] - v[t + 1]) / o[t];
  for (o[r - 1] = (e[r] + v[r - 1]) / 2, t = 0; t < r - 1; ++t) o[t] = 2 * e[t + 1] - v[t + 1];
  return [v, o];
}
function w2e(e) {
  return new vX(e);
}
function L9(e, t) {
  this._context = e, this._t = t;
}
L9.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x = this._y = NaN, this._point = 0;
  },
  lineEnd: function() {
    0 < this._t && this._t < 1 && this._point === 2 && this._context.lineTo(this._x, this._y), (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line >= 0 && (this._t = 1 - this._t, this._line = 1 - this._line);
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
      default: {
        if (this._t <= 0)
          this._context.lineTo(this._x, t), this._context.lineTo(e, t);
        else {
          var r = this._x * (1 - this._t) + e * this._t;
          this._context.lineTo(r, this._y), this._context.lineTo(r, t);
        }
        break;
      }
    }
    this._x = e, this._y = t;
  }
};
function k2e(e) {
  return new L9(e, 0.5);
}
function T2e(e) {
  return new L9(e, 0);
}
function A2e(e) {
  return new L9(e, 1);
}
function cg(e, t) {
  if (typeof document < "u" && document.createElement) {
    const r = document.createElement("canvas");
    if (r && r.getContext)
      return r.width = e, r.height = t, r;
  }
  return null;
}
const S2e = () => typeof Image < "u" ? Image : null;
function j0(e, t) {
  switch (arguments.length) {
    case 0:
      break;
    case 1:
      this.range(e);
      break;
    default:
      this.range(t).domain(e);
      break;
  }
  return this;
}
function Fg(e, t) {
  switch (arguments.length) {
    case 0:
      break;
    case 1: {
      typeof e == "function" ? this.interpolator(e) : this.range(e);
      break;
    }
    default: {
      this.domain(e), typeof t == "function" ? this.interpolator(t) : this.range(t);
      break;
    }
  }
  return this;
}
const HE = Symbol("implicit");
function ZL() {
  var e = new uB(), t = [], r = [], a = HE;
  function v(o) {
    let s = e.get(o);
    if (s === void 0) {
      if (a !== HE) return a;
      e.set(o, s = t.push(o) - 1);
    }
    return r[s % r.length];
  }
  return v.domain = function(o) {
    if (!arguments.length) return t.slice();
    t = [], e = new uB();
    for (const s of o)
      e.has(s) || e.set(s, t.push(s) - 1);
    return v;
  }, v.range = function(o) {
    return arguments.length ? (r = Array.from(o), v) : r.slice();
  }, v.unknown = function(o) {
    return arguments.length ? (a = o, v) : a;
  }, v.copy = function() {
    return ZL(t, r).unknown(a);
  }, j0.apply(v, arguments), v;
}
function Eb(e, t, r) {
  e.prototype = t.prototype = r, r.constructor = e;
}
function f4(e, t) {
  var r = Object.create(e.prototype);
  for (var a in t) r[a] = t[a];
  return r;
}
function Ng() {
}
var bv = 0.7, Fx = 1 / bv, yx = "\\s*([+-]?\\d+)\\s*", Tw = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", v0 = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", M2e = /^#([0-9a-f]{3,8})$/, E2e = new RegExp(`^rgb\\(${yx},${yx},${yx}\\)$`), C2e = new RegExp(`^rgb\\(${v0},${v0},${v0}\\)$`), I2e = new RegExp(`^rgba\\(${yx},${yx},${yx},${Tw}\\)$`), D2e = new RegExp(`^rgba\\(${v0},${v0},${v0},${Tw}\\)$`), L2e = new RegExp(`^hsl\\(${Tw},${v0},${v0}\\)$`), P2e = new RegExp(`^hsla\\(${Tw},${v0},${v0},${Tw}\\)$`), WB = {
  aliceblue: 15792383,
  antiquewhite: 16444375,
  aqua: 65535,
  aquamarine: 8388564,
  azure: 15794175,
  beige: 16119260,
  bisque: 16770244,
  black: 0,
  blanchedalmond: 16772045,
  blue: 255,
  blueviolet: 9055202,
  brown: 10824234,
  burlywood: 14596231,
  cadetblue: 6266528,
  chartreuse: 8388352,
  chocolate: 13789470,
  coral: 16744272,
  cornflowerblue: 6591981,
  cornsilk: 16775388,
  crimson: 14423100,
  cyan: 65535,
  darkblue: 139,
  darkcyan: 35723,
  darkgoldenrod: 12092939,
  darkgray: 11119017,
  darkgreen: 25600,
  darkgrey: 11119017,
  darkkhaki: 12433259,
  darkmagenta: 9109643,
  darkolivegreen: 5597999,
  darkorange: 16747520,
  darkorchid: 10040012,
  darkred: 9109504,
  darksalmon: 15308410,
  darkseagreen: 9419919,
  darkslateblue: 4734347,
  darkslategray: 3100495,
  darkslategrey: 3100495,
  darkturquoise: 52945,
  darkviolet: 9699539,
  deeppink: 16716947,
  deepskyblue: 49151,
  dimgray: 6908265,
  dimgrey: 6908265,
  dodgerblue: 2003199,
  firebrick: 11674146,
  floralwhite: 16775920,
  forestgreen: 2263842,
  fuchsia: 16711935,
  gainsboro: 14474460,
  ghostwhite: 16316671,
  gold: 16766720,
  goldenrod: 14329120,
  gray: 8421504,
  green: 32768,
  greenyellow: 11403055,
  grey: 8421504,
  honeydew: 15794160,
  hotpink: 16738740,
  indianred: 13458524,
  indigo: 4915330,
  ivory: 16777200,
  khaki: 15787660,
  lavender: 15132410,
  lavenderblush: 16773365,
  lawngreen: 8190976,
  lemonchiffon: 16775885,
  lightblue: 11393254,
  lightcoral: 15761536,
  lightcyan: 14745599,
  lightgoldenrodyellow: 16448210,
  lightgray: 13882323,
  lightgreen: 9498256,
  lightgrey: 13882323,
  lightpink: 16758465,
  lightsalmon: 16752762,
  lightseagreen: 2142890,
  lightskyblue: 8900346,
  lightslategray: 7833753,
  lightslategrey: 7833753,
  lightsteelblue: 11584734,
  lightyellow: 16777184,
  lime: 65280,
  limegreen: 3329330,
  linen: 16445670,
  magenta: 16711935,
  maroon: 8388608,
  mediumaquamarine: 6737322,
  mediumblue: 205,
  mediumorchid: 12211667,
  mediumpurple: 9662683,
  mediumseagreen: 3978097,
  mediumslateblue: 8087790,
  mediumspringgreen: 64154,
  mediumturquoise: 4772300,
  mediumvioletred: 13047173,
  midnightblue: 1644912,
  mintcream: 16121850,
  mistyrose: 16770273,
  moccasin: 16770229,
  navajowhite: 16768685,
  navy: 128,
  oldlace: 16643558,
  olive: 8421376,
  olivedrab: 7048739,
  orange: 16753920,
  orangered: 16729344,
  orchid: 14315734,
  palegoldenrod: 15657130,
  palegreen: 10025880,
  paleturquoise: 11529966,
  palevioletred: 14381203,
  papayawhip: 16773077,
  peachpuff: 16767673,
  peru: 13468991,
  pink: 16761035,
  plum: 14524637,
  powderblue: 11591910,
  purple: 8388736,
  rebeccapurple: 6697881,
  red: 16711680,
  rosybrown: 12357519,
  royalblue: 4286945,
  saddlebrown: 9127187,
  salmon: 16416882,
  sandybrown: 16032864,
  seagreen: 3050327,
  seashell: 16774638,
  sienna: 10506797,
  silver: 12632256,
  skyblue: 8900331,
  slateblue: 6970061,
  slategray: 7372944,
  slategrey: 7372944,
  snow: 16775930,
  springgreen: 65407,
  steelblue: 4620980,
  tan: 13808780,
  teal: 32896,
  thistle: 14204888,
  tomato: 16737095,
  turquoise: 4251856,
  violet: 15631086,
  wheat: 16113331,
  white: 16777215,
  whitesmoke: 16119285,
  yellow: 16776960,
  yellowgreen: 10145074
};
Eb(Ng, Aw, {
  copy(e) {
    return Object.assign(new this.constructor(), this, e);
  },
  displayable() {
    return this.rgb().displayable();
  },
  hex: YB,
  // Deprecated! Use color.formatHex.
  formatHex: YB,
  formatHex8: O2e,
  formatHsl: z2e,
  formatRgb: ZB,
  toString: ZB
});
function YB() {
  return this.rgb().formatHex();
}
function O2e() {
  return this.rgb().formatHex8();
}
function z2e() {
  return xX(this).formatHsl();
}
function ZB() {
  return this.rgb().formatRgb();
}
function Aw(e) {
  var t, r;
  return e = (e + "").trim().toLowerCase(), (t = M2e.exec(e)) ? (r = t[1].length, t = parseInt(t[1], 16), r === 6 ? XB(t) : r === 3 ? new Hc(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : r === 8 ? g6(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : r === 4 ? g6(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = E2e.exec(e)) ? new Hc(t[1], t[2], t[3], 1) : (t = C2e.exec(e)) ? new Hc(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = I2e.exec(e)) ? g6(t[1], t[2], t[3], t[4]) : (t = D2e.exec(e)) ? g6(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = L2e.exec(e)) ? QB(t[1], t[2] / 100, t[3] / 100, 1) : (t = P2e.exec(e)) ? QB(t[1], t[2] / 100, t[3] / 100, t[4]) : WB.hasOwnProperty(e) ? XB(WB[e]) : e === "transparent" ? new Hc(NaN, NaN, NaN, 0) : null;
}
function XB(e) {
  return new Hc(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
}
function g6(e, t, r, a) {
  return a <= 0 && (e = t = r = NaN), new Hc(e, t, r, a);
}
function XL(e) {
  return e instanceof Ng || (e = Aw(e)), e ? (e = e.rgb(), new Hc(e.r, e.g, e.b, e.opacity)) : new Hc();
}
function wg(e, t, r, a) {
  return arguments.length === 1 ? XL(e) : new Hc(e, t, r, a ?? 1);
}
function Hc(e, t, r, a) {
  this.r = +e, this.g = +t, this.b = +r, this.opacity = +a;
}
Eb(Hc, wg, f4(Ng, {
  brighter(e) {
    return e = e == null ? Fx : Math.pow(Fx, e), new Hc(this.r * e, this.g * e, this.b * e, this.opacity);
  },
  darker(e) {
    return e = e == null ? bv : Math.pow(bv, e), new Hc(this.r * e, this.g * e, this.b * e, this.opacity);
  },
  rgb() {
    return this;
  },
  clamp() {
    return new Hc(ov(this.r), ov(this.g), ov(this.b), g7(this.opacity));
  },
  displayable() {
    return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
  },
  hex: KB,
  // Deprecated! Use color.formatHex.
  formatHex: KB,
  formatHex8: R2e,
  formatRgb: JB,
  toString: JB
}));
function KB() {
  return `#${Xy(this.r)}${Xy(this.g)}${Xy(this.b)}`;
}
function R2e() {
  return `#${Xy(this.r)}${Xy(this.g)}${Xy(this.b)}${Xy((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function JB() {
  const e = g7(this.opacity);
  return `${e === 1 ? "rgb(" : "rgba("}${ov(this.r)}, ${ov(this.g)}, ${ov(this.b)}${e === 1 ? ")" : `, ${e})`}`;
}
function g7(e) {
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
}
function ov(e) {
  return Math.max(0, Math.min(255, Math.round(e) || 0));
}
function Xy(e) {
  return e = ov(e), (e < 16 ? "0" : "") + e.toString(16);
}
function QB(e, t, r, a) {
  return a <= 0 ? e = t = r = NaN : r <= 0 || r >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new ap(e, t, r, a);
}
function xX(e) {
  if (e instanceof ap) return new ap(e.h, e.s, e.l, e.opacity);
  if (e instanceof Ng || (e = Aw(e)), !e) return new ap();
  if (e instanceof ap) return e;
  e = e.rgb();
  var t = e.r / 255, r = e.g / 255, a = e.b / 255, v = Math.min(t, r, a), o = Math.max(t, r, a), s = NaN, n = o - v, l = (o + v) / 2;
  return n ? (t === o ? s = (r - a) / n + (r < a) * 6 : r === o ? s = (a - t) / n + 2 : s = (t - r) / n + 4, n /= l < 0.5 ? o + v : 2 - o - v, s *= 60) : n = l > 0 && l < 1 ? 0 : s, new ap(s, n, l, e.opacity);
}
function y7(e, t, r, a) {
  return arguments.length === 1 ? xX(e) : new ap(e, t, r, a ?? 1);
}
function ap(e, t, r, a) {
  this.h = +e, this.s = +t, this.l = +r, this.opacity = +a;
}
Eb(ap, y7, f4(Ng, {
  brighter(e) {
    return e = e == null ? Fx : Math.pow(Fx, e), new ap(this.h, this.s, this.l * e, this.opacity);
  },
  darker(e) {
    return e = e == null ? bv : Math.pow(bv, e), new ap(this.h, this.s, this.l * e, this.opacity);
  },
  rgb() {
    var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, r = this.l, a = r + (r < 0.5 ? r : 1 - r) * t, v = 2 * r - a;
    return new Hc(
      $S(e >= 240 ? e - 240 : e + 120, v, a),
      $S(e, v, a),
      $S(e < 120 ? e + 240 : e - 120, v, a),
      this.opacity
    );
  },
  clamp() {
    return new ap(ej(this.h), y6(this.s), y6(this.l), g7(this.opacity));
  },
  displayable() {
    return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
  },
  formatHsl() {
    const e = g7(this.opacity);
    return `${e === 1 ? "hsl(" : "hsla("}${ej(this.h)}, ${y6(this.s) * 100}%, ${y6(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
  }
}));
function ej(e) {
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
}
function y6(e) {
  return Math.max(0, Math.min(1, e || 0));
}
function $S(e, t, r) {
  return (e < 60 ? t + (r - t) * e / 60 : e < 180 ? r : e < 240 ? t + (r - t) * (240 - e) / 60 : t) * 255;
}
const bX = Math.PI / 180, _X = 180 / Math.PI, v7 = 18, wX = 0.96422, kX = 1, TX = 0.82521, AX = 4 / 29, vx = 6 / 29, SX = 3 * vx * vx, F2e = vx * vx * vx;
function MX(e) {
  if (e instanceof x0) return new x0(e.l, e.a, e.b, e.opacity);
  if (e instanceof Em) return EX(e);
  e instanceof Hc || (e = XL(e));
  var t = WS(e.r), r = WS(e.g), a = WS(e.b), v = qS((0.2225045 * t + 0.7168786 * r + 0.0606169 * a) / kX), o, s;
  return t === r && r === a ? o = s = v : (o = qS((0.4360747 * t + 0.3850649 * r + 0.1430804 * a) / wX), s = qS((0.0139322 * t + 0.0971045 * r + 0.7141733 * a) / TX)), new x0(116 * v - 16, 500 * (o - v), 200 * (v - s), e.opacity);
}
function x7(e, t, r, a) {
  return arguments.length === 1 ? MX(e) : new x0(e, t, r, a ?? 1);
}
function x0(e, t, r, a) {
  this.l = +e, this.a = +t, this.b = +r, this.opacity = +a;
}
Eb(x0, x7, f4(Ng, {
  brighter(e) {
    return new x0(this.l + v7 * (e ?? 1), this.a, this.b, this.opacity);
  },
  darker(e) {
    return new x0(this.l - v7 * (e ?? 1), this.a, this.b, this.opacity);
  },
  rgb() {
    var e = (this.l + 16) / 116, t = isNaN(this.a) ? e : e + this.a / 500, r = isNaN(this.b) ? e : e - this.b / 200;
    return t = wX * HS(t), e = kX * HS(e), r = TX * HS(r), new Hc(
      GS(3.1338561 * t - 1.6168667 * e - 0.4906146 * r),
      GS(-0.9787684 * t + 1.9161415 * e + 0.033454 * r),
      GS(0.0719453 * t - 0.2289914 * e + 1.4052427 * r),
      this.opacity
    );
  }
}));
function qS(e) {
  return e > F2e ? Math.pow(e, 1 / 3) : e / SX + AX;
}
function HS(e) {
  return e > vx ? e * e * e : SX * (e - AX);
}
function GS(e) {
  return 255 * (e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 1 / 2.4) - 0.055);
}
function WS(e) {
  return (e /= 255) <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
}
function N2e(e) {
  if (e instanceof Em) return new Em(e.h, e.c, e.l, e.opacity);
  if (e instanceof x0 || (e = MX(e)), e.a === 0 && e.b === 0) return new Em(NaN, 0 < e.l && e.l < 100 ? 0 : NaN, e.l, e.opacity);
  var t = Math.atan2(e.b, e.a) * _X;
  return new Em(t < 0 ? t + 360 : t, Math.sqrt(e.a * e.a + e.b * e.b), e.l, e.opacity);
}
function b7(e, t, r, a) {
  return arguments.length === 1 ? N2e(e) : new Em(e, t, r, a ?? 1);
}
function Em(e, t, r, a) {
  this.h = +e, this.c = +t, this.l = +r, this.opacity = +a;
}
function EX(e) {
  if (isNaN(e.h)) return new x0(e.l, 0, 0, e.opacity);
  var t = e.h * bX;
  return new x0(e.l, Math.cos(t) * e.c, Math.sin(t) * e.c, e.opacity);
}
Eb(Em, b7, f4(Ng, {
  brighter(e) {
    return new Em(this.h, this.c, this.l + v7 * (e ?? 1), this.opacity);
  },
  darker(e) {
    return new Em(this.h, this.c, this.l - v7 * (e ?? 1), this.opacity);
  },
  rgb() {
    return EX(this).rgb();
  }
}));
var CX = -0.14861, KL = 1.78277, JL = -0.29227, P9 = -0.90649, Sw = 1.97294, tj = Sw * P9, nj = Sw * KL, rj = KL * JL - P9 * CX;
function B2e(e) {
  if (e instanceof sv) return new sv(e.h, e.s, e.l, e.opacity);
  e instanceof Hc || (e = XL(e));
  var t = e.r / 255, r = e.g / 255, a = e.b / 255, v = (rj * a + tj * t - nj * r) / (rj + tj - nj), o = a - v, s = (Sw * (r - v) - JL * o) / P9, n = Math.sqrt(s * s + o * o) / (Sw * v * (1 - v)), l = n ? Math.atan2(s, o) * _X - 120 : NaN;
  return new sv(l < 0 ? l + 360 : l, n, v, e.opacity);
}
function GE(e, t, r, a) {
  return arguments.length === 1 ? B2e(e) : new sv(e, t, r, a ?? 1);
}
function sv(e, t, r, a) {
  this.h = +e, this.s = +t, this.l = +r, this.opacity = +a;
}
Eb(sv, GE, f4(Ng, {
  brighter(e) {
    return e = e == null ? Fx : Math.pow(Fx, e), new sv(this.h, this.s, this.l * e, this.opacity);
  },
  darker(e) {
    return e = e == null ? bv : Math.pow(bv, e), new sv(this.h, this.s, this.l * e, this.opacity);
  },
  rgb() {
    var e = isNaN(this.h) ? 0 : (this.h + 120) * bX, t = +this.l, r = isNaN(this.s) ? 0 : this.s * t * (1 - t), a = Math.cos(e), v = Math.sin(e);
    return new Hc(
      255 * (t + r * (CX * a + KL * v)),
      255 * (t + r * (JL * a + P9 * v)),
      255 * (t + r * (Sw * a)),
      this.opacity
    );
  }
}));
function IX(e, t, r, a, v) {
  var o = e * e, s = o * e;
  return ((1 - 3 * e + 3 * o - s) * t + (4 - 6 * o + 3 * s) * r + (1 + 3 * e + 3 * o - 3 * s) * a + s * v) / 6;
}
function DX(e) {
  var t = e.length - 1;
  return function(r) {
    var a = r <= 0 ? r = 0 : r >= 1 ? (r = 1, t - 1) : Math.floor(r * t), v = e[a], o = e[a + 1], s = a > 0 ? e[a - 1] : 2 * v - o, n = a < t - 1 ? e[a + 2] : 2 * o - v;
    return IX((r - a / t) * t, s, v, o, n);
  };
}
function LX(e) {
  var t = e.length;
  return function(r) {
    var a = Math.floor(((r %= 1) < 0 ? ++r : r) * t), v = e[(a + t - 1) % t], o = e[a % t], s = e[(a + 1) % t], n = e[(a + 2) % t];
    return IX((r - a / t) * t, v, o, s, n);
  };
}
const O9 = (e) => () => e;
function PX(e, t) {
  return function(r) {
    return e + r * t;
  };
}
function j2e(e, t, r) {
  return e = Math.pow(e, r), t = Math.pow(t, r) - e, r = 1 / r, function(a) {
    return Math.pow(e + a * t, r);
  };
}
function z9(e, t) {
  var r = t - e;
  return r ? PX(e, r > 180 || r < -180 ? r - 360 * Math.round(r / 360) : r) : O9(isNaN(e) ? t : e);
}
function U2e(e) {
  return (e = +e) == 1 ? Gc : function(t, r) {
    return r - t ? j2e(t, r, e) : O9(isNaN(t) ? r : t);
  };
}
function Gc(e, t) {
  var r = t - e;
  return r ? PX(e, r) : O9(isNaN(e) ? t : e);
}
const WE = function e(t) {
  var r = U2e(t);
  function a(v, o) {
    var s = r((v = wg(v)).r, (o = wg(o)).r), n = r(v.g, o.g), l = r(v.b, o.b), u = Gc(v.opacity, o.opacity);
    return function(i) {
      return v.r = s(i), v.g = n(i), v.b = l(i), v.opacity = u(i), v + "";
    };
  }
  return a.gamma = e, a;
}(1);
function OX(e) {
  return function(t) {
    var r = t.length, a = new Array(r), v = new Array(r), o = new Array(r), s, n;
    for (s = 0; s < r; ++s)
      n = wg(t[s]), a[s] = n.r || 0, v[s] = n.g || 0, o[s] = n.b || 0;
    return a = e(a), v = e(v), o = e(o), n.opacity = 1, function(l) {
      return n.r = a(l), n.g = v(l), n.b = o(l), n + "";
    };
  };
}
var V2e = OX(DX), $2e = OX(LX);
function QL(e, t) {
  t || (t = []);
  var r = e ? Math.min(t.length, e.length) : 0, a = t.slice(), v;
  return function(o) {
    for (v = 0; v < r; ++v) a[v] = e[v] * (1 - o) + t[v] * o;
    return a;
  };
}
function zX(e) {
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
function q2e(e, t) {
  return (zX(t) ? QL : RX)(e, t);
}
function RX(e, t) {
  var r = t ? t.length : 0, a = e ? Math.min(r, e.length) : 0, v = new Array(a), o = new Array(r), s;
  for (s = 0; s < a; ++s) v[s] = Bg(e[s], t[s]);
  for (; s < r; ++s) o[s] = t[s];
  return function(n) {
    for (s = 0; s < a; ++s) o[s] = v[s](n);
    return o;
  };
}
function FX(e, t) {
  var r = /* @__PURE__ */ new Date();
  return e = +e, t = +t, function(a) {
    return r.setTime(e * (1 - a) + t * a), r;
  };
}
function rp(e, t) {
  return e = +e, t = +t, function(r) {
    return e * (1 - r) + t * r;
  };
}
function NX(e, t) {
  var r = {}, a = {}, v;
  (e === null || typeof e != "object") && (e = {}), (t === null || typeof t != "object") && (t = {});
  for (v in t)
    v in e ? r[v] = Bg(e[v], t[v]) : a[v] = t[v];
  return function(o) {
    for (v in r) a[v] = r[v](o);
    return a;
  };
}
var YE = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, YS = new RegExp(YE.source, "g");
function H2e(e) {
  return function() {
    return e;
  };
}
function G2e(e) {
  return function(t) {
    return e(t) + "";
  };
}
function BX(e, t) {
  var r = YE.lastIndex = YS.lastIndex = 0, a, v, o, s = -1, n = [], l = [];
  for (e = e + "", t = t + ""; (a = YE.exec(e)) && (v = YS.exec(t)); )
    (o = v.index) > r && (o = t.slice(r, o), n[s] ? n[s] += o : n[++s] = o), (a = a[0]) === (v = v[0]) ? n[s] ? n[s] += v : n[++s] = v : (n[++s] = null, l.push({ i: s, x: rp(a, v) })), r = YS.lastIndex;
  return r < t.length && (o = t.slice(r), n[s] ? n[s] += o : n[++s] = o), n.length < 2 ? l[0] ? G2e(l[0].x) : H2e(t) : (t = l.length, function(u) {
    for (var i = 0, h; i < t; ++i) n[(h = l[i]).i] = h.x(u);
    return n.join("");
  });
}
function Bg(e, t) {
  var r = typeof t, a;
  return t == null || r === "boolean" ? O9(t) : (r === "number" ? rp : r === "string" ? (a = Aw(t)) ? (t = a, WE) : BX : t instanceof Aw ? WE : t instanceof Date ? FX : zX(t) ? QL : Array.isArray(t) ? RX : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? NX : rp)(e, t);
}
function W2e(e) {
  var t = e.length;
  return function(r) {
    return e[Math.max(0, Math.min(t - 1, Math.floor(r * t)))];
  };
}
function Y2e(e, t) {
  var r = z9(+e, +t);
  return function(a) {
    var v = r(a);
    return v - 360 * Math.floor(v / 360);
  };
}
function h4(e, t) {
  return e = +e, t = +t, function(r) {
    return Math.round(e * (1 - r) + t * r);
  };
}
var ij = 180 / Math.PI, ZE = {
  translateX: 0,
  translateY: 0,
  rotate: 0,
  skewX: 0,
  scaleX: 1,
  scaleY: 1
};
function jX(e, t, r, a, v, o) {
  var s, n, l;
  return (s = Math.sqrt(e * e + t * t)) && (e /= s, t /= s), (l = e * r + t * a) && (r -= e * l, a -= t * l), (n = Math.sqrt(r * r + a * a)) && (r /= n, a /= n, l /= n), e * a < t * r && (e = -e, t = -t, l = -l, s = -s), {
    translateX: v,
    translateY: o,
    rotate: Math.atan2(t, e) * ij,
    skewX: Math.atan(l) * ij,
    scaleX: s,
    scaleY: n
  };
}
var v6;
function Z2e(e) {
  const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
  return t.isIdentity ? ZE : jX(t.a, t.b, t.c, t.d, t.e, t.f);
}
function X2e(e) {
  return e == null || (v6 || (v6 = document.createElementNS("http://www.w3.org/2000/svg", "g")), v6.setAttribute("transform", e), !(e = v6.transform.baseVal.consolidate())) ? ZE : (e = e.matrix, jX(e.a, e.b, e.c, e.d, e.e, e.f));
}
function UX(e, t, r, a) {
  function v(u) {
    return u.length ? u.pop() + " " : "";
  }
  function o(u, i, h, p, _, d) {
    if (u !== h || i !== p) {
      var f = _.push("translate(", null, t, null, r);
      d.push({ i: f - 4, x: rp(u, h) }, { i: f - 2, x: rp(i, p) });
    } else (h || p) && _.push("translate(" + h + t + p + r);
  }
  function s(u, i, h, p) {
    u !== i ? (u - i > 180 ? i += 360 : i - u > 180 && (u += 360), p.push({ i: h.push(v(h) + "rotate(", null, a) - 2, x: rp(u, i) })) : i && h.push(v(h) + "rotate(" + i + a);
  }
  function n(u, i, h, p) {
    u !== i ? p.push({ i: h.push(v(h) + "skewX(", null, a) - 2, x: rp(u, i) }) : i && h.push(v(h) + "skewX(" + i + a);
  }
  function l(u, i, h, p, _, d) {
    if (u !== h || i !== p) {
      var f = _.push(v(_) + "scale(", null, ",", null, ")");
      d.push({ i: f - 4, x: rp(u, h) }, { i: f - 2, x: rp(i, p) });
    } else (h !== 1 || p !== 1) && _.push(v(_) + "scale(" + h + "," + p + ")");
  }
  return function(u, i) {
    var h = [], p = [];
    return u = e(u), i = e(i), o(u.translateX, u.translateY, i.translateX, i.translateY, h, p), s(u.rotate, i.rotate, h, p), n(u.skewX, i.skewX, h, p), l(u.scaleX, u.scaleY, i.scaleX, i.scaleY, h, p), u = i = null, function(_) {
      for (var d = -1, f = p.length, c; ++d < f; ) h[(c = p[d]).i] = c.x(_);
      return h.join("");
    };
  };
}
var K2e = UX(Z2e, "px, ", "px)", "deg)"), J2e = UX(X2e, ", ", ")", ")"), Q2e = 1e-12;
function aj(e) {
  return ((e = Math.exp(e)) + 1 / e) / 2;
}
function exe(e) {
  return ((e = Math.exp(e)) - 1 / e) / 2;
}
function txe(e) {
  return ((e = Math.exp(2 * e)) - 1) / (e + 1);
}
const nxe = function e(t, r, a) {
  function v(o, s) {
    var n = o[0], l = o[1], u = o[2], i = s[0], h = s[1], p = s[2], _ = i - n, d = h - l, f = _ * _ + d * d, c, g;
    if (f < Q2e)
      g = Math.log(p / u) / t, c = function(A) {
        return [
          n + A * _,
          l + A * d,
          u * Math.exp(t * A * g)
        ];
      };
    else {
      var m = Math.sqrt(f), x = (p * p - u * u + a * f) / (2 * u * r * m), w = (p * p - u * u - a * f) / (2 * p * r * m), k = Math.log(Math.sqrt(x * x + 1) - x), S = Math.log(Math.sqrt(w * w + 1) - w);
      g = (S - k) / t, c = function(A) {
        var C = A * g, D = aj(k), L = u / (r * m) * (D * txe(t * C + k) - exe(k));
        return [
          n + L * _,
          l + L * d,
          u * D / aj(t * C + k)
        ];
      };
    }
    return c.duration = g * 1e3 * t / Math.SQRT2, c;
  }
  return v.rho = function(o) {
    var s = Math.max(1e-3, +o), n = s * s, l = n * n;
    return e(s, n, l);
  }, v;
}(Math.SQRT2, 2, 4);
function VX(e) {
  return function(t, r) {
    var a = e((t = y7(t)).h, (r = y7(r)).h), v = Gc(t.s, r.s), o = Gc(t.l, r.l), s = Gc(t.opacity, r.opacity);
    return function(n) {
      return t.h = a(n), t.s = v(n), t.l = o(n), t.opacity = s(n), t + "";
    };
  };
}
const rxe = VX(z9);
var ixe = VX(Gc);
function axe(e, t) {
  var r = Gc((e = x7(e)).l, (t = x7(t)).l), a = Gc(e.a, t.a), v = Gc(e.b, t.b), o = Gc(e.opacity, t.opacity);
  return function(s) {
    return e.l = r(s), e.a = a(s), e.b = v(s), e.opacity = o(s), e + "";
  };
}
function $X(e) {
  return function(t, r) {
    var a = e((t = b7(t)).h, (r = b7(r)).h), v = Gc(t.c, r.c), o = Gc(t.l, r.l), s = Gc(t.opacity, r.opacity);
    return function(n) {
      return t.h = a(n), t.c = v(n), t.l = o(n), t.opacity = s(n), t + "";
    };
  };
}
const oxe = $X(z9);
var sxe = $X(Gc);
function qX(e) {
  return function t(r) {
    r = +r;
    function a(v, o) {
      var s = e((v = GE(v)).h, (o = GE(o)).h), n = Gc(v.s, o.s), l = Gc(v.l, o.l), u = Gc(v.opacity, o.opacity);
      return function(i) {
        return v.h = s(i), v.s = n(i), v.l = l(Math.pow(i, r)), v.opacity = u(i), v + "";
      };
    }
    return a.gamma = t, a;
  }(1);
}
const lxe = qX(z9);
var uxe = qX(Gc);
function eP(e, t) {
  t === void 0 && (t = e, e = Bg);
  for (var r = 0, a = t.length - 1, v = t[0], o = new Array(a < 0 ? 0 : a); r < a; ) o[r] = e(v, v = t[++r]);
  return function(s) {
    var n = Math.max(0, Math.min(a - 1, Math.floor(s *= a)));
    return o[n](s - n);
  };
}
function cxe(e, t) {
  for (var r = new Array(t), a = 0; a < t; ++a) r[a] = e(a / (t - 1));
  return r;
}
const fxe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  interpolate: Bg,
  interpolateArray: q2e,
  interpolateBasis: DX,
  interpolateBasisClosed: LX,
  interpolateCubehelix: lxe,
  interpolateCubehelixLong: uxe,
  interpolateDate: FX,
  interpolateDiscrete: W2e,
  interpolateHcl: oxe,
  interpolateHclLong: sxe,
  interpolateHsl: rxe,
  interpolateHslLong: ixe,
  interpolateHue: Y2e,
  interpolateLab: axe,
  interpolateNumber: rp,
  interpolateNumberArray: QL,
  interpolateObject: NX,
  interpolateRgb: WE,
  interpolateRgbBasis: V2e,
  interpolateRgbBasisClosed: $2e,
  interpolateRound: h4,
  interpolateString: BX,
  interpolateTransformCss: K2e,
  interpolateTransformSvg: J2e,
  interpolateZoom: nxe,
  piecewise: eP,
  quantize: cxe
}, Symbol.toStringTag, { value: "Module" }));
function hxe(e) {
  return function() {
    return e;
  };
}
function XE(e) {
  return +e;
}
var oj = [0, 1];
function Ch(e) {
  return e;
}
function KE(e, t) {
  return (t -= e = +e) ? function(r) {
    return (r - e) / t;
  } : hxe(isNaN(t) ? NaN : 0.5);
}
function dxe(e, t) {
  var r;
  return e > t && (r = e, e = t, t = r), function(a) {
    return Math.max(e, Math.min(t, a));
  };
}
function pxe(e, t, r) {
  var a = e[0], v = e[1], o = t[0], s = t[1];
  return v < a ? (a = KE(v, a), o = r(s, o)) : (a = KE(a, v), o = r(o, s)), function(n) {
    return o(a(n));
  };
}
function mxe(e, t, r) {
  var a = Math.min(e.length, t.length) - 1, v = new Array(a), o = new Array(a), s = -1;
  for (e[a] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++s < a; )
    v[s] = KE(e[s], e[s + 1]), o[s] = r(t[s], t[s + 1]);
  return function(n) {
    var l = vg(e, n, 1, a) - 1;
    return o[l](v[l](n));
  };
}
function d4(e, t) {
  return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
}
function R9() {
  var e = oj, t = oj, r = Bg, a, v, o, s = Ch, n, l, u;
  function i() {
    var p = Math.min(e.length, t.length);
    return s !== Ch && (s = dxe(e[0], e[p - 1])), n = p > 2 ? mxe : pxe, l = u = null, h;
  }
  function h(p) {
    return p == null || isNaN(p = +p) ? o : (l || (l = n(e.map(a), t, r)))(a(s(p)));
  }
  return h.invert = function(p) {
    return s(v((u || (u = n(t, e.map(a), rp)))(p)));
  }, h.domain = function(p) {
    return arguments.length ? (e = Array.from(p, XE), i()) : e.slice();
  }, h.range = function(p) {
    return arguments.length ? (t = Array.from(p), i()) : t.slice();
  }, h.rangeRound = function(p) {
    return t = Array.from(p), r = h4, i();
  }, h.clamp = function(p) {
    return arguments.length ? (s = p ? !0 : Ch, i()) : s !== Ch;
  }, h.interpolate = function(p) {
    return arguments.length ? (r = p, i()) : r;
  }, h.unknown = function(p) {
    return arguments.length ? (o = p, h) : o;
  }, function(p, _) {
    return a = p, v = _, i();
  };
}
function HX() {
  return R9()(Ch, Ch);
}
function GX(e, t, r, a) {
  var v = xg(e, t, r), o;
  switch (a = xv(a ?? ",f"), a.type) {
    case "s": {
      var s = Math.max(Math.abs(e), Math.abs(t));
      return a.precision == null && !isNaN(o = vY(v, s)) && (a.precision = o), UD(a, s);
    }
    case "":
    case "e":
    case "g":
    case "p":
    case "r": {
      a.precision == null && !isNaN(o = xY(v, Math.max(Math.abs(e), Math.abs(t)))) && (a.precision = o - (a.type === "e"));
      break;
    }
    case "f":
    case "%": {
      a.precision == null && !isNaN(o = yY(v)) && (a.precision = o - (a.type === "%") * 2);
      break;
    }
  }
  return f9(a);
}
function Gv(e) {
  var t = e.domain;
  return e.ticks = function(r) {
    var a = t();
    return CE(a[0], a[a.length - 1], r ?? 10);
  }, e.tickFormat = function(r, a) {
    var v = t();
    return GX(v[0], v[v.length - 1], r ?? 10, a);
  }, e.nice = function(r) {
    r == null && (r = 10);
    var a = t(), v = 0, o = a.length - 1, s = a[v], n = a[o], l, u, i = 10;
    for (n < s && (u = s, s = n, n = u, u = v, v = o, o = u); i-- > 0; ) {
      if (u = IE(s, n, r), u === l)
        return a[v] = s, a[o] = n, t(a);
      if (u > 0)
        s = Math.floor(s / u) * u, n = Math.ceil(n / u) * u;
      else if (u < 0)
        s = Math.ceil(s * u) / u, n = Math.floor(n * u) / u;
      else
        break;
      l = u;
    }
    return e;
  }, e;
}
function WX() {
  var e = HX();
  return e.copy = function() {
    return d4(e, WX());
  }, j0.apply(e, arguments), Gv(e);
}
function YX(e) {
  var t;
  function r(a) {
    return a == null || isNaN(a = +a) ? t : a;
  }
  return r.invert = r, r.domain = r.range = function(a) {
    return arguments.length ? (e = Array.from(a, XE), r) : e.slice();
  }, r.unknown = function(a) {
    return arguments.length ? (t = a, r) : t;
  }, r.copy = function() {
    return YX(e).unknown(t);
  }, e = arguments.length ? Array.from(e, XE) : [0, 1], Gv(r);
}
function ZX(e, t) {
  e = e.slice();
  var r = 0, a = e.length - 1, v = e[r], o = e[a], s;
  return o < v && (s = r, r = a, a = s, s = v, v = o, o = s), e[r] = t.floor(v), e[a] = t.ceil(o), e;
}
function sj(e) {
  return Math.log(e);
}
function lj(e) {
  return Math.exp(e);
}
function gxe(e) {
  return -Math.log(-e);
}
function yxe(e) {
  return -Math.exp(-e);
}
function vxe(e) {
  return isFinite(e) ? +("1e" + e) : e < 0 ? 0 : e;
}
function xxe(e) {
  return e === 10 ? vxe : e === Math.E ? Math.exp : (t) => Math.pow(e, t);
}
function bxe(e) {
  return e === Math.E ? Math.log : e === 10 && Math.log10 || e === 2 && Math.log2 || (e = Math.log(e), (t) => Math.log(t) / e);
}
function uj(e) {
  return (t, r) => -e(-t, r);
}
function tP(e) {
  const t = e(sj, lj), r = t.domain;
  let a = 10, v, o;
  function s() {
    return v = bxe(a), o = xxe(a), r()[0] < 0 ? (v = uj(v), o = uj(o), e(gxe, yxe)) : e(sj, lj), t;
  }
  return t.base = function(n) {
    return arguments.length ? (a = +n, s()) : a;
  }, t.domain = function(n) {
    return arguments.length ? (r(n), s()) : r();
  }, t.ticks = (n) => {
    const l = r();
    let u = l[0], i = l[l.length - 1];
    const h = i < u;
    h && ([u, i] = [i, u]);
    let p = v(u), _ = v(i), d, f;
    const c = n == null ? 10 : +n;
    let g = [];
    if (!(a % 1) && _ - p < c) {
      if (p = Math.floor(p), _ = Math.ceil(_), u > 0) {
        for (; p <= _; ++p)
          for (d = 1; d < a; ++d)
            if (f = p < 0 ? d / o(-p) : d * o(p), !(f < u)) {
              if (f > i) break;
              g.push(f);
            }
      } else for (; p <= _; ++p)
        for (d = a - 1; d >= 1; --d)
          if (f = p > 0 ? d / o(-p) : d * o(p), !(f < u)) {
            if (f > i) break;
            g.push(f);
          }
      g.length * 2 < c && (g = CE(u, i, c));
    } else
      g = CE(p, _, Math.min(_ - p, c)).map(o);
    return h ? g.reverse() : g;
  }, t.tickFormat = (n, l) => {
    if (n == null && (n = 10), l == null && (l = a === 10 ? "s" : ","), typeof l != "function" && (!(a % 1) && (l = xv(l)).precision == null && (l.trim = !0), l = f9(l)), n === 1 / 0) return l;
    const u = Math.max(1, a * n / t.ticks().length);
    return (i) => {
      let h = i / o(Math.round(v(i)));
      return h * a < a - 0.5 && (h *= a), h <= u ? l(i) : "";
    };
  }, t.nice = () => r(ZX(r(), {
    floor: (n) => o(Math.floor(v(n))),
    ceil: (n) => o(Math.ceil(v(n)))
  })), t;
}
function XX() {
  const e = tP(R9()).domain([1, 10]);
  return e.copy = () => d4(e, XX()).base(e.base()), j0.apply(e, arguments), e;
}
function cj(e) {
  return function(t) {
    return Math.sign(t) * Math.log1p(Math.abs(t / e));
  };
}
function fj(e) {
  return function(t) {
    return Math.sign(t) * Math.expm1(Math.abs(t)) * e;
  };
}
function nP(e) {
  var t = 1, r = e(cj(t), fj(t));
  return r.constant = function(a) {
    return arguments.length ? e(cj(t = +a), fj(t)) : t;
  }, Gv(r);
}
function KX() {
  var e = nP(R9());
  return e.copy = function() {
    return d4(e, KX()).constant(e.constant());
  }, j0.apply(e, arguments);
}
function hj(e) {
  return function(t) {
    return t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
  };
}
function _xe(e) {
  return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
}
function wxe(e) {
  return e < 0 ? -e * e : e * e;
}
function rP(e) {
  var t = e(Ch, Ch), r = 1;
  function a() {
    return r === 1 ? e(Ch, Ch) : r === 0.5 ? e(_xe, wxe) : e(hj(r), hj(1 / r));
  }
  return t.exponent = function(v) {
    return arguments.length ? (r = +v, a()) : r;
  }, Gv(t);
}
function iP() {
  var e = rP(R9());
  return e.copy = function() {
    return d4(e, iP()).exponent(e.exponent());
  }, j0.apply(e, arguments), e;
}
function kxe() {
  return iP.apply(null, arguments).exponent(0.5);
}
function JX() {
  var e = [], t = [], r = [], a;
  function v() {
    var s = 0, n = Math.max(1, t.length);
    for (r = new Array(n - 1); ++s < n; ) r[s - 1] = fY(e, s / n);
    return o;
  }
  function o(s) {
    return s == null || isNaN(s = +s) ? a : t[vg(r, s)];
  }
  return o.invertExtent = function(s) {
    var n = t.indexOf(s);
    return n < 0 ? [NaN, NaN] : [
      n > 0 ? r[n - 1] : e[0],
      n < r.length ? r[n] : e[e.length - 1]
    ];
  }, o.domain = function(s) {
    if (!arguments.length) return e.slice();
    e = [];
    for (let n of s) n != null && !isNaN(n = +n) && e.push(n);
    return e.sort(Pm), v();
  }, o.range = function(s) {
    return arguments.length ? (t = Array.from(s), v()) : t.slice();
  }, o.unknown = function(s) {
    return arguments.length ? (a = s, o) : a;
  }, o.quantiles = function() {
    return r.slice();
  }, o.copy = function() {
    return JX().domain(e).range(t).unknown(a);
  }, j0.apply(o, arguments);
}
function QX() {
  var e = 0, t = 1, r = 1, a = [0.5], v = [0, 1], o;
  function s(l) {
    return l != null && l <= l ? v[vg(a, l, 0, r)] : o;
  }
  function n() {
    var l = -1;
    for (a = new Array(r); ++l < r; ) a[l] = ((l + 1) * t - (l - r) * e) / (r + 1);
    return s;
  }
  return s.domain = function(l) {
    return arguments.length ? ([e, t] = l, e = +e, t = +t, n()) : [e, t];
  }, s.range = function(l) {
    return arguments.length ? (r = (v = Array.from(l)).length - 1, n()) : v.slice();
  }, s.invertExtent = function(l) {
    var u = v.indexOf(l);
    return u < 0 ? [NaN, NaN] : u < 1 ? [e, a[0]] : u >= r ? [a[r - 1], t] : [a[u - 1], a[u]];
  }, s.unknown = function(l) {
    return arguments.length && (o = l), s;
  }, s.thresholds = function() {
    return a.slice();
  }, s.copy = function() {
    return QX().domain([e, t]).range(v).unknown(o);
  }, j0.apply(Gv(s), arguments);
}
function eK() {
  var e = [0.5], t = [0, 1], r, a = 1;
  function v(o) {
    return o != null && o <= o ? t[vg(e, o, 0, a)] : r;
  }
  return v.domain = function(o) {
    return arguments.length ? (e = Array.from(o), a = Math.min(e.length, t.length - 1), v) : e.slice();
  }, v.range = function(o) {
    return arguments.length ? (t = Array.from(o), a = Math.min(e.length, t.length - 1), v) : t.slice();
  }, v.invertExtent = function(o) {
    var s = t.indexOf(o);
    return [e[s - 1], e[s]];
  }, v.unknown = function(o) {
    return arguments.length ? (r = o, v) : r;
  }, v.copy = function() {
    return eK().domain(e).range(t).unknown(r);
  }, j0.apply(v, arguments);
}
function Txe(e) {
  return new Date(e);
}
function Axe(e) {
  return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
}
function aP(e, t, r, a, v, o, s, n, l, u) {
  var i = HX(), h = i.invert, p = i.domain, _ = u(".%L"), d = u(":%S"), f = u("%I:%M"), c = u("%I %p"), g = u("%a %d"), m = u("%b %d"), x = u("%B"), w = u("%Y");
  function k(S) {
    return (l(S) < S ? _ : n(S) < S ? d : s(S) < S ? f : o(S) < S ? c : a(S) < S ? v(S) < S ? g : m : r(S) < S ? x : w)(S);
  }
  return i.invert = function(S) {
    return new Date(h(S));
  }, i.domain = function(S) {
    return arguments.length ? p(Array.from(S, Axe)) : p().map(Txe);
  }, i.ticks = function(S) {
    var A = p();
    return e(A[0], A[A.length - 1], S ?? 10);
  }, i.tickFormat = function(S, A) {
    return A == null ? k : u(A);
  }, i.nice = function(S) {
    var A = p();
    return (!S || typeof S.range != "function") && (S = t(A[0], A[A.length - 1], S ?? 10)), S ? p(ZX(A, S)) : i;
  }, i.copy = function() {
    return d4(i, aP(e, t, r, a, v, o, s, n, l, u));
  }, i;
}
function Sxe() {
  return j0.apply(aP(L1e, P1e, E0, xw, kb, Om, p9, h9, Mm, GD).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
function Mxe() {
  return j0.apply(aP(I1e, D1e, C0, bw, Tb, lg, m9, d9, Mm, WD).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
}
function F9() {
  var e = 0, t = 1, r, a, v, o, s = Ch, n = !1, l;
  function u(h) {
    return h == null || isNaN(h = +h) ? l : s(v === 0 ? 0.5 : (h = (o(h) - r) * v, n ? Math.max(0, Math.min(1, h)) : h));
  }
  u.domain = function(h) {
    return arguments.length ? ([e, t] = h, r = o(e = +e), a = o(t = +t), v = r === a ? 0 : 1 / (a - r), u) : [e, t];
  }, u.clamp = function(h) {
    return arguments.length ? (n = !!h, u) : n;
  }, u.interpolator = function(h) {
    return arguments.length ? (s = h, u) : s;
  };
  function i(h) {
    return function(p) {
      var _, d;
      return arguments.length ? ([_, d] = p, s = h(_, d), u) : [s(0), s(1)];
    };
  }
  return u.range = i(Bg), u.rangeRound = i(h4), u.unknown = function(h) {
    return arguments.length ? (l = h, u) : l;
  }, function(h) {
    return o = h, r = h(e), a = h(t), v = r === a ? 0 : 1 / (a - r), u;
  };
}
function jg(e, t) {
  return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown());
}
function oP() {
  var e = Gv(F9()(Ch));
  return e.copy = function() {
    return jg(e, oP());
  }, Fg.apply(e, arguments);
}
function tK() {
  var e = tP(F9()).domain([1, 10]);
  return e.copy = function() {
    return jg(e, tK()).base(e.base());
  }, Fg.apply(e, arguments);
}
function nK() {
  var e = nP(F9());
  return e.copy = function() {
    return jg(e, nK()).constant(e.constant());
  }, Fg.apply(e, arguments);
}
function sP() {
  var e = rP(F9());
  return e.copy = function() {
    return jg(e, sP()).exponent(e.exponent());
  }, Fg.apply(e, arguments);
}
function Exe() {
  return sP.apply(null, arguments).exponent(0.5);
}
function N9() {
  var e = 0, t = 0.5, r = 1, a = 1, v, o, s, n, l, u = Ch, i, h = !1, p;
  function _(f) {
    return isNaN(f = +f) ? p : (f = 0.5 + ((f = +i(f)) - o) * (a * f < a * o ? n : l), u(h ? Math.max(0, Math.min(1, f)) : f));
  }
  _.domain = function(f) {
    return arguments.length ? ([e, t, r] = f, v = i(e = +e), o = i(t = +t), s = i(r = +r), n = v === o ? 0 : 0.5 / (o - v), l = o === s ? 0 : 0.5 / (s - o), a = o < v ? -1 : 1, _) : [e, t, r];
  }, _.clamp = function(f) {
    return arguments.length ? (h = !!f, _) : h;
  }, _.interpolator = function(f) {
    return arguments.length ? (u = f, _) : u;
  };
  function d(f) {
    return function(c) {
      var g, m, x;
      return arguments.length ? ([g, m, x] = c, u = eP(f, [g, m, x]), _) : [u(0), u(0.5), u(1)];
    };
  }
  return _.range = d(Bg), _.rangeRound = d(h4), _.unknown = function(f) {
    return arguments.length ? (p = f, _) : p;
  }, function(f) {
    return i = f, v = f(e), o = f(t), s = f(r), n = v === o ? 0 : 0.5 / (o - v), l = o === s ? 0 : 0.5 / (s - o), a = o < v ? -1 : 1, _;
  };
}
function rK() {
  var e = Gv(N9()(Ch));
  return e.copy = function() {
    return jg(e, rK());
  }, Fg.apply(e, arguments);
}
function iK() {
  var e = tP(N9()).domain([0.1, 1, 10]);
  return e.copy = function() {
    return jg(e, iK()).base(e.base());
  }, Fg.apply(e, arguments);
}
function aK() {
  var e = nP(N9());
  return e.copy = function() {
    return jg(e, aK()).constant(e.constant());
  }, Fg.apply(e, arguments);
}
function lP() {
  var e = rP(N9());
  return e.copy = function() {
    return jg(e, lP()).exponent(e.exponent());
  }, Fg.apply(e, arguments);
}
function Cxe() {
  return lP.apply(null, arguments).exponent(0.5);
}
function U0(e) {
  for (var t = e.length / 6 | 0, r = new Array(t), a = 0; a < t; ) r[a] = "#" + e.slice(a * 6, ++a * 6);
  return r;
}
const Ixe = U0("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"), Dxe = U0("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"), Lxe = U0("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"), Pxe = U0("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"), Oxe = U0("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"), zxe = U0("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"), Rxe = U0("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"), Fxe = U0("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"), Nxe = U0("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"), Bxe = U0("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
function uP(e, t, r) {
  const a = e - t + r * 2;
  return e ? a > 0 ? a : 1 : 0;
}
const jxe = "identity", Nx = "linear", $m = "log", p4 = "pow", m4 = "sqrt", B9 = "symlog", _v = "time", wv = "utc", b0 = "sequential", Cb = "diverging", Bx = "quantile", j9 = "quantize", U9 = "threshold", cP = "ordinal", JE = "point", oK = "band", fP = "bin-ordinal", Sc = "continuous", g4 = "discrete", y4 = "discretizing", Nd = "interpolating", hP = "temporal";
function Uxe(e) {
  return function(t) {
    let r = t[0], a = t[1], v;
    return a < r && (v = r, r = a, a = v), [e.invert(r), e.invert(a)];
  };
}
function Vxe(e) {
  return function(t) {
    const r = e.range();
    let a = t[0], v = t[1], o = -1, s, n, l, u;
    for (v < a && (n = a, a = v, v = n), l = 0, u = r.length; l < u; ++l)
      r[l] >= a && r[l] <= v && (o < 0 && (o = l), s = l);
    if (!(o < 0))
      return a = e.invertExtent(r[o]), v = e.invertExtent(r[s]), [a[0] === void 0 ? a[1] : a[0], v[1] === void 0 ? v[0] : v[1]];
  };
}
function dP() {
  const e = ZL().unknown(void 0), t = e.domain, r = e.range;
  let a = [0, 1], v, o, s = !1, n = 0, l = 0, u = 0.5;
  delete e.unknown;
  function i() {
    const h = t().length, p = a[1] < a[0], _ = a[1 - p], d = uP(h, n, l);
    let f = a[p - 0];
    v = (_ - f) / (d || 1), s && (v = Math.floor(v)), f += (_ - f - v * (h - n)) * u, o = v * (1 - n), s && (f = Math.round(f), o = Math.round(o));
    const c = Kh(h).map((g) => f + v * g);
    return r(p ? c.reverse() : c);
  }
  return e.domain = function(h) {
    return arguments.length ? (t(h), i()) : t();
  }, e.range = function(h) {
    return arguments.length ? (a = [+h[0], +h[1]], i()) : a.slice();
  }, e.rangeRound = function(h) {
    return a = [+h[0], +h[1]], s = !0, i();
  }, e.bandwidth = function() {
    return o;
  }, e.step = function() {
    return v;
  }, e.round = function(h) {
    return arguments.length ? (s = !!h, i()) : s;
  }, e.padding = function(h) {
    return arguments.length ? (l = Math.max(0, Math.min(1, h)), n = l, i()) : n;
  }, e.paddingInner = function(h) {
    return arguments.length ? (n = Math.max(0, Math.min(1, h)), i()) : n;
  }, e.paddingOuter = function(h) {
    return arguments.length ? (l = Math.max(0, Math.min(1, h)), i()) : l;
  }, e.align = function(h) {
    return arguments.length ? (u = Math.max(0, Math.min(1, h)), i()) : u;
  }, e.invertRange = function(h) {
    if (h[0] == null || h[1] == null) return;
    const p = a[1] < a[0], _ = p ? r().reverse() : r(), d = _.length - 1;
    let f = +h[0], c = +h[1], g, m, x;
    if (!(f !== f || c !== c) && (c < f && (x = f, f = c, c = x), !(c < _[0] || f > a[1 - p])))
      return g = Math.max(0, vg(_, f) - 1), m = f === c ? g : vg(_, c) - 1, f - _[g] > o + 1e-10 && ++g, p && (x = g, g = d - m, m = d - x), g > m ? void 0 : t().slice(g, m + 1);
  }, e.invert = function(h) {
    const p = e.invertRange([h, h]);
    return p && p[0];
  }, e.copy = function() {
    return dP().domain(t()).range(a).round(s).paddingInner(n).paddingOuter(l).align(u);
  }, i();
}
function sK(e) {
  const t = e.copy;
  return e.padding = e.paddingOuter, delete e.paddingInner, e.copy = function() {
    return sK(t());
  }, e;
}
function $xe() {
  return sK(dP().paddingInner(1));
}
var qxe = Array.prototype.map;
function Hxe(e) {
  return qxe.call(e, Of);
}
const Gxe = Array.prototype.slice;
function lK() {
  let e = [], t = [];
  function r(a) {
    return a == null || a !== a ? void 0 : t[(vg(e, a) - 1) % t.length];
  }
  return r.domain = function(a) {
    return arguments.length ? (e = Hxe(a), r) : e.slice();
  }, r.range = function(a) {
    return arguments.length ? (t = Gxe.call(a), r) : t.slice();
  }, r.tickFormat = function(a, v) {
    return GX(e[0], mo(e), a ?? 10, v);
  }, r.copy = function() {
    return lK().domain(r.domain()).range(r.range());
  }, r;
}
const _7 = /* @__PURE__ */ new Map(), uK = Symbol("vega_scale");
function cK(e) {
  return e[uK] = !0, e;
}
function Wxe(e) {
  return e && e[uK] === !0;
}
function Yxe(e, t, r) {
  const a = function() {
    const o = t();
    return o.invertRange || (o.invertRange = o.invert ? Uxe(o) : o.invertExtent ? Vxe(o) : void 0), o.type = e, cK(o);
  };
  return a.metadata = vp(Ri(r)), a;
}
function Go(e, t, r) {
  return arguments.length > 1 ? (_7.set(e, Yxe(e, t, r)), this) : fK(e) ? _7.get(e) : void 0;
}
Go(jxe, YX);
Go(Nx, WX, Sc);
Go($m, XX, [Sc, $m]);
Go(p4, iP, Sc);
Go(m4, kxe, Sc);
Go(B9, KX, Sc);
Go(_v, Sxe, [Sc, hP]);
Go(wv, Mxe, [Sc, hP]);
Go(b0, oP, [Sc, Nd]);
Go(`${b0}-${Nx}`, oP, [Sc, Nd]);
Go(`${b0}-${$m}`, tK, [Sc, Nd, $m]);
Go(`${b0}-${p4}`, sP, [Sc, Nd]);
Go(`${b0}-${m4}`, Exe, [Sc, Nd]);
Go(`${b0}-${B9}`, nK, [Sc, Nd]);
Go(`${Cb}-${Nx}`, rK, [Sc, Nd]);
Go(`${Cb}-${$m}`, iK, [Sc, Nd, $m]);
Go(`${Cb}-${p4}`, lP, [Sc, Nd]);
Go(`${Cb}-${m4}`, Cxe, [Sc, Nd]);
Go(`${Cb}-${B9}`, aK, [Sc, Nd]);
Go(Bx, JX, [y4, Bx]);
Go(j9, QX, y4);
Go(U9, eK, y4);
Go(fP, lK, [g4, y4]);
Go(cP, ZL, g4);
Go(oK, dP, g4);
Go(JE, $xe, g4);
function fK(e) {
  return _7.has(e);
}
function Wv(e, t) {
  const r = _7.get(e);
  return r && r.metadata[t];
}
function pP(e) {
  return Wv(e, Sc);
}
function jx(e) {
  return Wv(e, g4);
}
function QE(e) {
  return Wv(e, y4);
}
function hK(e) {
  return Wv(e, $m);
}
function Zxe(e) {
  return Wv(e, hP);
}
function dK(e) {
  return Wv(e, Nd);
}
function pK(e) {
  return Wv(e, Bx);
}
const Xxe = ["clamp", "base", "constant", "exponent"];
function mK(e, t) {
  const r = t[0], a = mo(t) - r;
  return function(v) {
    return e(r + v * a);
  };
}
function V9(e, t, r) {
  return eP(mP(t || "rgb", r), e);
}
function gK(e, t) {
  const r = new Array(t), a = t + 1;
  for (let v = 0; v < t; ) r[v] = e(++v / a);
  return r;
}
function yK(e, t, r) {
  const a = r - t;
  let v, o, s;
  return !a || !Number.isFinite(a) ? Vf(0.5) : (v = (o = e.type).indexOf("-"), o = v < 0 ? o : o.slice(v + 1), s = Go(o)().domain([t, r]).range([0, 1]), Xxe.forEach((n) => e[n] ? s[n](e[n]()) : 0), s);
}
function mP(e, t) {
  const r = fxe[Kxe(e)];
  return t != null && r && r.gamma ? r.gamma(t) : r;
}
function Kxe(e) {
  return "interpolate" + e.toLowerCase().split("-").map((t) => t[0].toUpperCase() + t.slice(1)).join("");
}
const Jxe = {
  blues: "cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",
  greens: "d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",
  greys: "e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",
  oranges: "fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",
  purples: "e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",
  reds: "fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",
  blueGreen: "d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",
  bluePurple: "ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",
  greenBlue: "d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",
  orangeRed: "fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",
  purpleBlue: "dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",
  purpleBlueGreen: "dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",
  purpleRed: "dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",
  redPurple: "fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",
  yellowGreen: "e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",
  yellowOrangeBrown: "feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",
  yellowOrangeRed: "fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",
  blueOrange: "134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",
  brownBlueGreen: "704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",
  purpleGreen: "5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",
  purpleOrange: "4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",
  redBlue: "8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",
  redGrey: "8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",
  yellowGreenBlue: "eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",
  redYellowBlue: "a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",
  redYellowGreen: "a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",
  pinkYellowGreen: "8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",
  spectral: "9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",
  viridis: "440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",
  magma: "0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",
  inferno: "0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",
  plasma: "0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",
  cividis: "00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",
  rainbow: "6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",
  sinebow: "ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",
  turbo: "23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",
  browns: "eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",
  tealBlues: "bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",
  teals: "bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",
  warmGreys: "dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",
  goldGreen: "f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",
  goldOrange: "f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",
  goldRed: "f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",
  lightGreyRed: "efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",
  lightGreyTeal: "e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",
  lightMulti: "e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",
  lightOrange: "f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",
  lightTealBlue: "e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",
  darkBlue: "3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",
  darkGold: "3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",
  darkGreen: "3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",
  darkMulti: "3737371f5287197d8c29a86995ce3fffe800ffffff",
  darkRed: "3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"
}, Qxe = {
  accent: Dxe,
  category10: Ixe,
  category20: "1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",
  category20b: "393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",
  category20c: "3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",
  dark2: Lxe,
  observable10: Pxe,
  paired: Oxe,
  pastel1: zxe,
  pastel2: Rxe,
  set1: Fxe,
  set2: Nxe,
  set3: Bxe,
  tableau10: "4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",
  tableau20: "4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"
};
function vK(e) {
  if (Qr(e)) return e;
  const t = e.length / 6 | 0, r = new Array(t);
  for (let a = 0; a < t; )
    r[a] = "#" + e.slice(a * 6, ++a * 6);
  return r;
}
function xK(e, t) {
  for (const r in e) gP(r, t(e[r]));
}
const dj = {};
xK(Qxe, vK);
xK(Jxe, (e) => V9(vK(e)));
function gP(e, t) {
  return e = e && e.toLowerCase(), arguments.length > 1 ? (dj[e] = t, this) : dj[e];
}
const m8 = "symbol", ebe = "discrete", tbe = "gradient", nbe = (e) => Qr(e) ? e.map((t) => String(t)) : String(e), rbe = (e, t) => e[1] - t[1], ibe = (e, t) => t[1] - e[1];
function yP(e, t, r) {
  let a;
  return Ro(t) && (e.bins && (t = Math.max(t, e.bins.length)), r != null && (t = Math.min(t, Math.floor(s4(e.domain()) / r || 1) + 1))), Oi(t) && (a = t.step, t = t.interval), Fi(t) && (t = e.type === _v ? Ab(t) : e.type == wv ? Sb(t) : Jr("Only time and utc scales accept interval strings."), a && (t = t.every(a))), t;
}
function bK(e, t, r) {
  let a = e.range(), v = a[0], o = mo(a), s = rbe;
  if (v > o && (a = o, o = v, v = a, s = ibe), v = Math.floor(v), o = Math.ceil(o), t = t.map((n) => [n, e(n)]).filter((n) => v <= n[1] && n[1] <= o).sort(s).map((n) => n[0]), r > 0 && t.length > 1) {
    const n = [t[0], mo(t)];
    for (; t.length > r && t.length >= 3; )
      t = t.filter((l, u) => !(u % 2));
    t.length < 3 && (t = n);
  }
  return t;
}
function vP(e, t) {
  return e.bins ? bK(e, e.bins, t) : e.ticks ? e.ticks(t) : e.domain();
}
function _K(e, t, r, a, v, o) {
  const s = t.type;
  let n = nbe;
  if (s === _v || v === _v)
    n = e.timeFormat(a);
  else if (s === wv || v === wv)
    n = e.utcFormat(a);
  else if (hK(s)) {
    const l = e.formatFloat(a);
    if (o || t.bins)
      n = l;
    else {
      const u = wK(t, r, !1);
      n = (i) => u(i) ? l(i) : "";
    }
  } else if (t.tickFormat) {
    const l = t.domain();
    n = e.formatSpan(l[0], l[l.length - 1], r, a);
  } else a && (n = e.format(a));
  return n;
}
function wK(e, t, r) {
  const a = vP(e, t), v = e.base(), o = Math.log(v), s = Math.max(1, v * t / a.length), n = (l) => {
    let u = l / Math.pow(v, Math.round(Math.log(l) / o));
    return u * v < v - 0.5 && (u *= v), u <= s;
  };
  return r ? a.filter(n) : n;
}
const eC = {
  [Bx]: "quantiles",
  [j9]: "thresholds",
  [U9]: "domain"
}, kK = {
  [Bx]: "quantiles",
  [j9]: "domain"
};
function TK(e, t) {
  return e.bins ? sbe(e.bins) : e.type === $m ? wK(e, t, !0) : eC[e.type] ? obe(e[eC[e.type]]()) : vP(e, t);
}
function abe(e, t, r) {
  const a = t[kK[t.type]](), v = a.length;
  let o = v > 1 ? a[1] - a[0] : a[0], s;
  for (s = 1; s < v; ++s)
    o = Math.min(o, a[s] - a[s - 1]);
  return e.formatSpan(0, o, 3 * 10, r);
}
function obe(e) {
  const t = [-1 / 0].concat(e);
  return t.max = 1 / 0, t;
}
function sbe(e) {
  const t = e.slice(0, -1);
  return t.max = mo(e), t;
}
const lbe = (e) => eC[e.type] || e.bins;
function AK(e, t, r, a, v, o, s) {
  const n = kK[t.type] && o !== _v && o !== wv ? abe(e, t, v) : _K(e, t, r, v, o, s);
  return a === m8 && lbe(t) ? ube(n) : a === ebe ? cbe(n) : fbe(n);
}
const ube = (e) => (t, r, a) => {
  const v = pj(a[r + 1], pj(a.max, 1 / 0)), o = mj(t, e), s = mj(v, e);
  return o && s ? o + " – " + s : s ? "< " + s : "≥ " + o;
}, pj = (e, t) => e ?? t, cbe = (e) => (t, r) => r ? e(t) : null, fbe = (e) => (t) => e(t), mj = (e, t) => Number.isFinite(e) ? t(e) : null;
function hbe(e) {
  const t = e.domain(), r = t.length - 1;
  let a = +t[0], v = +mo(t), o = v - a;
  if (e.type === U9) {
    const s = r ? o / r : 0.1;
    a -= s, v += s, o = v - a;
  }
  return (s) => (s - a) / o;
}
function dbe(e, t, r, a) {
  const v = a || t.type;
  return Fi(r) && Zxe(v) && (r = r.replace(/%a/g, "%A").replace(/%b/g, "%B")), !r && v === _v ? e.timeFormat("%A, %d %B %Y, %X") : !r && v === wv ? e.utcFormat("%A, %d %B %Y, %X UTC") : AK(e, t, 5, null, r, a, !0);
}
function SK(e, t, r) {
  r = r || {};
  const a = Math.max(3, r.maxlen || 7), v = dbe(e, t, r.format, r.formatType);
  if (QE(t.type)) {
    const o = TK(t).slice(1).map(v), s = o.length;
    return `${s} boundar${s === 1 ? "y" : "ies"}: ${o.join(", ")}`;
  } else if (jx(t.type)) {
    const o = t.domain(), s = o.length, n = s > a ? o.slice(0, a - 2).map(v).join(", ") + ", ending with " + o.slice(-1).map(v) : o.map(v).join(", ");
    return `${s} value${s === 1 ? "" : "s"}: ${n}`;
  } else {
    const o = t.domain();
    return `values from ${v(o[0])} to ${v(mo(o))}`;
  }
}
let MK = 0;
function pbe() {
  MK = 0;
}
const w7 = "p_";
function xP(e) {
  return e && e.gradient;
}
function EK(e, t, r) {
  const a = e.gradient;
  let v = e.id, o = a === "radial" ? w7 : "";
  return v || (v = e.id = "gradient_" + MK++, a === "radial" ? (e.x1 = Jp(e.x1, 0.5), e.y1 = Jp(e.y1, 0.5), e.r1 = Jp(e.r1, 0), e.x2 = Jp(e.x2, 0.5), e.y2 = Jp(e.y2, 0.5), e.r2 = Jp(e.r2, 0.5), o = w7) : (e.x1 = Jp(e.x1, 0), e.y1 = Jp(e.y1, 0), e.x2 = Jp(e.x2, 1), e.y2 = Jp(e.y2, 0))), t[v] = e, "url(" + (r || "") + "#" + o + v + ")";
}
function Jp(e, t) {
  return e ?? t;
}
function CK(e, t) {
  var r = [], a;
  return a = {
    gradient: "linear",
    x1: e ? e[0] : 0,
    y1: e ? e[1] : 0,
    x2: t ? t[0] : 1,
    y2: t ? t[1] : 0,
    stops: r,
    stop: function(v, o) {
      return r.push({
        offset: v,
        color: o
      }), a;
    }
  };
}
const gj = {
  basis: {
    curve: u2e
  },
  "basis-closed": {
    curve: c2e
  },
  "basis-open": {
    curve: f2e
  },
  bundle: {
    curve: h2e,
    tension: "beta",
    value: 0.85
  },
  cardinal: {
    curve: d2e,
    tension: "tension",
    value: 0
  },
  "cardinal-open": {
    curve: m2e,
    tension: "tension",
    value: 0
  },
  "cardinal-closed": {
    curve: p2e,
    tension: "tension",
    value: 0
  },
  "catmull-rom": {
    curve: g2e,
    tension: "alpha",
    value: 0.5
  },
  "catmull-rom-closed": {
    curve: y2e,
    tension: "alpha",
    value: 0.5
  },
  "catmull-rom-open": {
    curve: v2e,
    tension: "alpha",
    value: 0.5
  },
  linear: {
    curve: qL
  },
  "linear-closed": {
    curve: x2e
  },
  monotone: {
    horizontal: _2e,
    vertical: b2e
  },
  natural: {
    curve: w2e
  },
  step: {
    curve: k2e
  },
  "step-after": {
    curve: A2e
  },
  "step-before": {
    curve: T2e
  }
};
function bP(e, t, r) {
  var a = ua(gj, e) && gj[e], v = null;
  return a && (v = a.curve || a[t || "vertical"], a.tension && r != null && (v = v[a.tension](r))), v;
}
const mbe = {
  m: 2,
  l: 2,
  h: 1,
  v: 1,
  z: 0,
  c: 6,
  s: 4,
  q: 4,
  t: 2,
  a: 7
}, gbe = /[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi, ybe = /^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/, vbe = /^((\s+,?\s*)|(,\s*))/, xbe = /^[01]/;
function Ux(e) {
  const t = [];
  return (e.match(gbe) || []).forEach((a) => {
    let v = a[0];
    const o = v.toLowerCase(), s = mbe[o], n = bbe(o, s, a.slice(1).trim()), l = n.length;
    if (l < s || l && l % s !== 0)
      throw Error("Invalid SVG path, incorrect parameter count");
    if (t.push([v, ...n.slice(0, s)]), l !== s) {
      o === "m" && (v = v === "M" ? "L" : "l");
      for (let u = s; u < l; u += s)
        t.push([v, ...n.slice(u, u + s)]);
    }
  }), t;
}
function bbe(e, t, r) {
  const a = [];
  for (let v = 0; t && v < r.length; )
    for (let o = 0; o < t; ++o) {
      const s = e === "a" && (o === 3 || o === 4) ? xbe : ybe, n = r.slice(v).match(s);
      if (n === null)
        throw Error("Invalid SVG path, incorrect parameter type");
      v += n[0].length, a.push(+n[0]);
      const l = r.slice(v).match(vbe);
      l !== null && (v += l[0].length);
    }
  return a;
}
const kg = Math.PI / 180, _be = 1e-14, qy = Math.PI / 2, s0 = Math.PI * 2, j2 = Math.sqrt(3) / 2;
var ZS = {}, XS = {}, IK = [].join;
function wbe(e, t, r, a, v, o, s, n, l) {
  const u = IK.call(arguments);
  if (ZS[u])
    return ZS[u];
  const i = s * kg, h = Math.sin(i), p = Math.cos(i);
  r = Math.abs(r), a = Math.abs(a);
  const _ = p * (n - e) * 0.5 + h * (l - t) * 0.5, d = p * (l - t) * 0.5 - h * (n - e) * 0.5;
  let f = _ * _ / (r * r) + d * d / (a * a);
  f > 1 && (f = Math.sqrt(f), r *= f, a *= f);
  const c = p / r, g = h / r, m = -h / a, x = p / a, w = c * n + g * l, k = m * n + x * l, S = c * e + g * t, A = m * e + x * t;
  let D = 1 / ((S - w) * (S - w) + (A - k) * (A - k)) - 0.25;
  D < 0 && (D = 0);
  let L = Math.sqrt(D);
  o == v && (L = -L);
  const E = 0.5 * (w + S) - L * (A - k), P = 0.5 * (k + A) + L * (S - w), I = Math.atan2(k - P, w - E);
  let O = Math.atan2(A - P, S - E) - I;
  O < 0 && o === 1 ? O += s0 : O > 0 && o === 0 && (O -= s0);
  const T = Math.ceil(Math.abs(O / (qy + 1e-3))), z = [];
  for (let F = 0; F < T; ++F) {
    const U = I + F * O / T, V = I + (F + 1) * O / T;
    z[F] = [E, P, U, V, r, a, h, p];
  }
  return ZS[u] = z;
}
function kbe(e) {
  const t = IK.call(e);
  if (XS[t])
    return XS[t];
  var r = e[0], a = e[1], v = e[2], o = e[3], s = e[4], n = e[5], l = e[6], u = e[7];
  const i = u * s, h = -l * n, p = l * s, _ = u * n, d = Math.cos(v), f = Math.sin(v), c = Math.cos(o), g = Math.sin(o), m = 0.5 * (o - v), x = Math.sin(m * 0.5), w = 8 / 3 * x * x / Math.sin(m), k = r + d - w * f, S = a + f + w * d, A = r + c, C = a + g, D = A + w * g, L = C - w * c;
  return XS[t] = [i * k + h * S, p * k + _ * S, i * D + h * L, p * D + _ * L, i * A + h * C, p * A + _ * C];
}
const yd = ["l", 0, 0, 0, 0, 0, 0, 0];
function Tbe(e, t, r) {
  const a = yd[0] = e[0];
  if (a === "a" || a === "A")
    yd[1] = t * e[1], yd[2] = r * e[2], yd[3] = e[3], yd[4] = e[4], yd[5] = e[5], yd[6] = t * e[6], yd[7] = r * e[7];
  else if (a === "h" || a === "H")
    yd[1] = t * e[1];
  else if (a === "v" || a === "V")
    yd[1] = r * e[1];
  else
    for (var v = 1, o = e.length; v < o; ++v)
      yd[v] = (v % 2 == 1 ? t : r) * e[v];
  return yd;
}
function Mw(e, t, r, a, v, o) {
  var s, n = null, l = 0, u = 0, i = 0, h = 0, p, _, d, f, c = 0, g = 0;
  r == null && (r = 0), a == null && (a = 0), v == null && (v = 1), o == null && (o = v), e.beginPath && e.beginPath();
  for (var m = 0, x = t.length; m < x; ++m) {
    switch (s = t[m], (v !== 1 || o !== 1) && (s = Tbe(s, v, o)), s[0]) {
      case "l":
        l += s[1], u += s[2], e.lineTo(l + r, u + a);
        break;
      case "L":
        l = s[1], u = s[2], e.lineTo(l + r, u + a);
        break;
      case "h":
        l += s[1], e.lineTo(l + r, u + a);
        break;
      case "H":
        l = s[1], e.lineTo(l + r, u + a);
        break;
      case "v":
        u += s[1], e.lineTo(l + r, u + a);
        break;
      case "V":
        u = s[1], e.lineTo(l + r, u + a);
        break;
      case "m":
        l += s[1], u += s[2], c = l, g = u, e.moveTo(l + r, u + a);
        break;
      case "M":
        l = s[1], u = s[2], c = l, g = u, e.moveTo(l + r, u + a);
        break;
      case "c":
        p = l + s[5], _ = u + s[6], i = l + s[3], h = u + s[4], e.bezierCurveTo(
          l + s[1] + r,
          // x1
          u + s[2] + a,
          // y1
          i + r,
          // x2
          h + a,
          // y2
          p + r,
          _ + a
        ), l = p, u = _;
        break;
      case "C":
        l = s[5], u = s[6], i = s[3], h = s[4], e.bezierCurveTo(s[1] + r, s[2] + a, i + r, h + a, l + r, u + a);
        break;
      case "s":
        p = l + s[3], _ = u + s[4], i = 2 * l - i, h = 2 * u - h, e.bezierCurveTo(i + r, h + a, l + s[1] + r, u + s[2] + a, p + r, _ + a), i = l + s[1], h = u + s[2], l = p, u = _;
        break;
      case "S":
        p = s[3], _ = s[4], i = 2 * l - i, h = 2 * u - h, e.bezierCurveTo(i + r, h + a, s[1] + r, s[2] + a, p + r, _ + a), l = p, u = _, i = s[1], h = s[2];
        break;
      case "q":
        p = l + s[3], _ = u + s[4], i = l + s[1], h = u + s[2], e.quadraticCurveTo(i + r, h + a, p + r, _ + a), l = p, u = _;
        break;
      case "Q":
        p = s[3], _ = s[4], e.quadraticCurveTo(s[1] + r, s[2] + a, p + r, _ + a), l = p, u = _, i = s[1], h = s[2];
        break;
      case "t":
        p = l + s[1], _ = u + s[2], n[0].match(/[QqTt]/) === null ? (i = l, h = u) : n[0] === "t" ? (i = 2 * l - d, h = 2 * u - f) : n[0] === "q" && (i = 2 * l - i, h = 2 * u - h), d = i, f = h, e.quadraticCurveTo(i + r, h + a, p + r, _ + a), l = p, u = _, i = l + s[1], h = u + s[2];
        break;
      case "T":
        p = s[1], _ = s[2], i = 2 * l - i, h = 2 * u - h, e.quadraticCurveTo(i + r, h + a, p + r, _ + a), l = p, u = _;
        break;
      case "a":
        yj(e, l + r, u + a, [s[1], s[2], s[3], s[4], s[5], s[6] + l + r, s[7] + u + a]), l += s[6], u += s[7];
        break;
      case "A":
        yj(e, l + r, u + a, [s[1], s[2], s[3], s[4], s[5], s[6] + r, s[7] + a]), l = s[6], u = s[7];
        break;
      case "z":
      case "Z":
        l = c, u = g, e.closePath();
        break;
    }
    n = s;
  }
}
function yj(e, t, r, a) {
  const v = wbe(
    a[5],
    // end x
    a[6],
    // end y
    a[0],
    // radius x
    a[1],
    // radius y
    a[3],
    // large flag
    a[4],
    // sweep flag
    a[2],
    // rotation
    t,
    r
  );
  for (let o = 0; o < v.length; ++o) {
    const s = kbe(v[o]);
    e.bezierCurveTo(s[0], s[1], s[2], s[3], s[4], s[5]);
  }
}
const vj = 0.5773502691896257, xj = {
  circle: {
    draw: function(e, t) {
      const r = Math.sqrt(t) / 2;
      e.moveTo(r, 0), e.arc(0, 0, r, 0, s0);
    }
  },
  cross: {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = r / 2.5;
      e.moveTo(-r, -a), e.lineTo(-r, a), e.lineTo(-a, a), e.lineTo(-a, r), e.lineTo(a, r), e.lineTo(a, a), e.lineTo(r, a), e.lineTo(r, -a), e.lineTo(a, -a), e.lineTo(a, -r), e.lineTo(-a, -r), e.lineTo(-a, -a), e.closePath();
    }
  },
  diamond: {
    draw: function(e, t) {
      const r = Math.sqrt(t) / 2;
      e.moveTo(-r, 0), e.lineTo(0, -r), e.lineTo(r, 0), e.lineTo(0, r), e.closePath();
    }
  },
  square: {
    draw: function(e, t) {
      var r = Math.sqrt(t), a = -r / 2;
      e.rect(a, a, r, r);
    }
  },
  arrow: {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = r / 7, v = r / 2.5, o = r / 8;
      e.moveTo(-a, r), e.lineTo(a, r), e.lineTo(a, -o), e.lineTo(v, -o), e.lineTo(0, -r), e.lineTo(-v, -o), e.lineTo(-a, -o), e.closePath();
    }
  },
  wedge: {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r, v = a - r * vj, o = r / 4;
      e.moveTo(0, -a - v), e.lineTo(-o, a - v), e.lineTo(o, a - v), e.closePath();
    }
  },
  triangle: {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r, v = a - r * vj;
      e.moveTo(0, -a - v), e.lineTo(-r, a - v), e.lineTo(r, a - v), e.closePath();
    }
  },
  "triangle-up": {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r;
      e.moveTo(0, -a), e.lineTo(-r, a), e.lineTo(r, a), e.closePath();
    }
  },
  "triangle-down": {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r;
      e.moveTo(0, a), e.lineTo(-r, -a), e.lineTo(r, -a), e.closePath();
    }
  },
  "triangle-right": {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r;
      e.moveTo(a, 0), e.lineTo(-a, -r), e.lineTo(-a, r), e.closePath();
    }
  },
  "triangle-left": {
    draw: function(e, t) {
      var r = Math.sqrt(t) / 2, a = j2 * r;
      e.moveTo(-a, 0), e.lineTo(a, -r), e.lineTo(a, r), e.closePath();
    }
  },
  stroke: {
    draw: function(e, t) {
      const r = Math.sqrt(t) / 2;
      e.moveTo(-r, 0), e.lineTo(r, 0);
    }
  }
};
function DK(e) {
  return ua(xj, e) ? xj[e] : Abe(e);
}
var KS = {};
function Abe(e) {
  if (!ua(KS, e)) {
    const t = Ux(e);
    KS[e] = {
      draw: function(r, a) {
        Mw(r, t, 0, 0, Math.sqrt(a) / 2);
      }
    };
  }
  return KS[e];
}
const D1 = 0.448084975506;
function Sbe(e) {
  return e.x;
}
function Mbe(e) {
  return e.y;
}
function Ebe(e) {
  return e.width;
}
function Cbe(e) {
  return e.height;
}
function hm(e) {
  return typeof e == "function" ? e : () => +e;
}
function x6(e, t, r) {
  return Math.max(t, Math.min(e, r));
}
function LK() {
  var e = Sbe, t = Mbe, r = Ebe, a = Cbe, v = hm(0), o = v, s = v, n = v, l = null;
  function u(i, h, p) {
    var _, d = h ?? +e.call(this, i), f = p ?? +t.call(this, i), c = +r.call(this, i), g = +a.call(this, i), m = Math.min(c, g) / 2, x = x6(+v.call(this, i), 0, m), w = x6(+o.call(this, i), 0, m), k = x6(+s.call(this, i), 0, m), S = x6(+n.call(this, i), 0, m);
    if (l || (l = _ = C9()), x <= 0 && w <= 0 && k <= 0 && S <= 0)
      l.rect(d, f, c, g);
    else {
      var A = d + c, C = f + g;
      l.moveTo(d + x, f), l.lineTo(A - w, f), l.bezierCurveTo(A - D1 * w, f, A, f + D1 * w, A, f + w), l.lineTo(A, C - S), l.bezierCurveTo(A, C - D1 * S, A - D1 * S, C, A - S, C), l.lineTo(d + k, C), l.bezierCurveTo(d + D1 * k, C, d, C - D1 * k, d, C - k), l.lineTo(d, f + x), l.bezierCurveTo(d, f + D1 * x, d + D1 * x, f, d + x, f), l.closePath();
    }
    if (_)
      return l = null, _ + "" || null;
  }
  return u.x = function(i) {
    return arguments.length ? (e = hm(i), u) : e;
  }, u.y = function(i) {
    return arguments.length ? (t = hm(i), u) : t;
  }, u.width = function(i) {
    return arguments.length ? (r = hm(i), u) : r;
  }, u.height = function(i) {
    return arguments.length ? (a = hm(i), u) : a;
  }, u.cornerRadius = function(i, h, p, _) {
    return arguments.length ? (v = hm(i), o = h != null ? hm(h) : v, n = p != null ? hm(p) : v, s = _ != null ? hm(_) : o, u) : v;
  }, u.context = function(i) {
    return arguments.length ? (l = i ?? null, u) : l;
  }, u;
}
function PK() {
  var e, t, r, a, v = null, o, s, n, l;
  function u(h, p, _) {
    const d = _ / 2;
    if (o) {
      var f = n - p, c = h - s;
      if (f || c) {
        var g = Math.hypot(f, c), m = (f /= g) * l, x = (c /= g) * l, w = Math.atan2(c, f);
        v.moveTo(s - m, n - x), v.lineTo(h - f * d, p - c * d), v.arc(h, p, d, w - Math.PI, w), v.lineTo(s + m, n + x), v.arc(s, n, l, w, w + Math.PI);
      } else
        v.arc(h, p, d, 0, s0);
      v.closePath();
    } else
      o = 1;
    s = h, n = p, l = d;
  }
  function i(h) {
    var p, _ = h.length, d, f = !1, c;
    for (v == null && (v = c = C9()), p = 0; p <= _; ++p)
      !(p < _ && a(d = h[p], p, h)) === f && (f = !f) && (o = 0), f && u(+e(d, p, h), +t(d, p, h), +r(d, p, h));
    if (c)
      return v = null, c + "" || null;
  }
  return i.x = function(h) {
    return arguments.length ? (e = h, i) : e;
  }, i.y = function(h) {
    return arguments.length ? (t = h, i) : t;
  }, i.size = function(h) {
    return arguments.length ? (r = h, i) : r;
  }, i.defined = function(h) {
    return arguments.length ? (a = h, i) : a;
  }, i.context = function(h) {
    return arguments.length ? (h == null ? v = null : v = h, i) : v;
  }, i;
}
function v4(e, t) {
  return e ?? t;
}
const x4 = (e) => e.x || 0, b4 = (e) => e.y || 0, Ibe = (e) => e.width || 0, Dbe = (e) => e.height || 0, Lbe = (e) => (e.x || 0) + (e.width || 0), Pbe = (e) => (e.y || 0) + (e.height || 0), Obe = (e) => e.startAngle || 0, zbe = (e) => e.endAngle || 0, Rbe = (e) => e.padAngle || 0, Fbe = (e) => e.innerRadius || 0, Nbe = (e) => e.outerRadius || 0, Bbe = (e) => e.cornerRadius || 0, jbe = (e) => v4(e.cornerRadiusTopLeft, e.cornerRadius) || 0, Ube = (e) => v4(e.cornerRadiusTopRight, e.cornerRadius) || 0, Vbe = (e) => v4(e.cornerRadiusBottomRight, e.cornerRadius) || 0, $be = (e) => v4(e.cornerRadiusBottomLeft, e.cornerRadius) || 0, qbe = (e) => v4(e.size, 64), Hbe = (e) => e.size || 1, $9 = (e) => e.defined !== !1, Gbe = (e) => DK(e.shape || "circle"), Wbe = o2e().startAngle(Obe).endAngle(zbe).padAngle(Rbe).innerRadius(Fbe).outerRadius(Nbe).cornerRadius(Bbe), Ybe = lX().x(x4).y1(b4).y0(Pbe).defined($9), Zbe = lX().y(b4).x1(x4).x0(Lbe).defined($9), Xbe = sX().x(x4).y(b4).defined($9), Kbe = LK().x(x4).y(b4).width(Ibe).height(Dbe).cornerRadius(jbe, Ube, Vbe, $be), Jbe = l2e().type(Gbe).size(qbe), Qbe = PK().x(x4).y(b4).defined($9).size(Hbe);
function _P(e) {
  return e.cornerRadius || e.cornerRadiusTopLeft || e.cornerRadiusTopRight || e.cornerRadiusBottomRight || e.cornerRadiusBottomLeft;
}
function e_e(e, t) {
  return Wbe.context(e)(t);
}
function t_e(e, t) {
  const r = t[0], a = r.interpolate || "linear";
  return (r.orient === "horizontal" ? Zbe : Ybe).curve(bP(a, r.orient, r.tension)).context(e)(t);
}
function n_e(e, t) {
  const r = t[0], a = r.interpolate || "linear";
  return Xbe.curve(bP(a, r.orient, r.tension)).context(e)(t);
}
function Ib(e, t, r, a) {
  return Kbe.context(e)(t, r, a);
}
function r_e(e, t) {
  return (t.mark.shape || t.shape).context(e)(t);
}
function i_e(e, t) {
  return Jbe.context(e)(t);
}
function a_e(e, t) {
  return Qbe.context(e)(t);
}
var OK = 1;
function zK() {
  OK = 1;
}
function wP(e, t, r) {
  var a = t.clip, v = e._defs, o = t.clip_id || (t.clip_id = "clip" + OK++), s = v.clipping[o] || (v.clipping[o] = {
    id: o
  });
  return qa(a) ? s.path = a(null) : _P(r) ? s.path = Ib(null, r, 0, 0) : (s.width = r.width || 0, s.height = r.height || 0), "url(#" + o + ")";
}
function ic(e) {
  this.clear(), e && this.union(e);
}
ic.prototype = {
  clone() {
    return new ic(this);
  },
  clear() {
    return this.x1 = +Number.MAX_VALUE, this.y1 = +Number.MAX_VALUE, this.x2 = -Number.MAX_VALUE, this.y2 = -Number.MAX_VALUE, this;
  },
  empty() {
    return this.x1 === +Number.MAX_VALUE && this.y1 === +Number.MAX_VALUE && this.x2 === -Number.MAX_VALUE && this.y2 === -Number.MAX_VALUE;
  },
  equals(e) {
    return this.x1 === e.x1 && this.y1 === e.y1 && this.x2 === e.x2 && this.y2 === e.y2;
  },
  set(e, t, r, a) {
    return r < e ? (this.x2 = e, this.x1 = r) : (this.x1 = e, this.x2 = r), a < t ? (this.y2 = t, this.y1 = a) : (this.y1 = t, this.y2 = a), this;
  },
  add(e, t) {
    return e < this.x1 && (this.x1 = e), t < this.y1 && (this.y1 = t), e > this.x2 && (this.x2 = e), t > this.y2 && (this.y2 = t), this;
  },
  expand(e) {
    return this.x1 -= e, this.y1 -= e, this.x2 += e, this.y2 += e, this;
  },
  round() {
    return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
  },
  scale(e) {
    return this.x1 *= e, this.y1 *= e, this.x2 *= e, this.y2 *= e, this;
  },
  translate(e, t) {
    return this.x1 += e, this.x2 += e, this.y1 += t, this.y2 += t, this;
  },
  rotate(e, t, r) {
    const a = this.rotatedPoints(e, t, r);
    return this.clear().add(a[0], a[1]).add(a[2], a[3]).add(a[4], a[5]).add(a[6], a[7]);
  },
  rotatedPoints(e, t, r) {
    var {
      x1: a,
      y1: v,
      x2: o,
      y2: s
    } = this, n = Math.cos(e), l = Math.sin(e), u = t - t * n + r * l, i = r - t * l - r * n;
    return [n * a - l * v + u, l * a + n * v + i, n * a - l * s + u, l * a + n * s + i, n * o - l * v + u, l * o + n * v + i, n * o - l * s + u, l * o + n * s + i];
  },
  union(e) {
    return e.x1 < this.x1 && (this.x1 = e.x1), e.y1 < this.y1 && (this.y1 = e.y1), e.x2 > this.x2 && (this.x2 = e.x2), e.y2 > this.y2 && (this.y2 = e.y2), this;
  },
  intersect(e) {
    return e.x1 > this.x1 && (this.x1 = e.x1), e.y1 > this.y1 && (this.y1 = e.y1), e.x2 < this.x2 && (this.x2 = e.x2), e.y2 < this.y2 && (this.y2 = e.y2), this;
  },
  encloses(e) {
    return e && this.x1 <= e.x1 && this.x2 >= e.x2 && this.y1 <= e.y1 && this.y2 >= e.y2;
  },
  alignsWith(e) {
    return e && (this.x1 == e.x1 || this.x2 == e.x2 || this.y1 == e.y1 || this.y2 == e.y2);
  },
  intersects(e) {
    return e && !(this.x2 < e.x1 || this.x1 > e.x2 || this.y2 < e.y1 || this.y1 > e.y2);
  },
  contains(e, t) {
    return !(e < this.x1 || e > this.x2 || t < this.y1 || t > this.y2);
  },
  width() {
    return this.x2 - this.x1;
  },
  height() {
    return this.y2 - this.y1;
  }
};
function q9(e) {
  this.mark = e, this.bounds = this.bounds || new ic();
}
function H9(e) {
  q9.call(this, e), this.items = this.items || [];
}
Si(H9, q9);
class RK {
  constructor(t) {
    this._pending = 0, this._loader = t || y9();
  }
  pending() {
    return this._pending;
  }
  sanitizeURL(t) {
    const r = this;
    return bj(r), r._loader.sanitize(t, {
      context: "href"
    }).then((a) => (Z_(r), a)).catch(() => (Z_(r), null));
  }
  loadImage(t) {
    const r = this, a = S2e();
    return bj(r), r._loader.sanitize(t, {
      context: "image"
    }).then((v) => {
      const o = v.href;
      if (!o || !a) throw {
        url: o
      };
      const s = new a(), n = ua(v, "crossOrigin") ? v.crossOrigin : "anonymous";
      return n != null && (s.crossOrigin = n), s.onload = () => Z_(r), s.onerror = () => Z_(r), s.src = o, s;
    }).catch((v) => (Z_(r), {
      complete: !1,
      width: 0,
      height: 0,
      src: v && v.url || ""
    }));
  }
  ready() {
    const t = this;
    return new Promise((r) => {
      function a(v) {
        t.pending() ? setTimeout(() => {
          a(!0);
        }, 10) : r(v);
      }
      a(!1);
    });
  }
}
function bj(e) {
  e._pending += 1;
}
function Z_(e) {
  e._pending -= 1;
}
function Xm(e, t, r) {
  if (t.stroke && t.opacity !== 0 && t.strokeOpacity !== 0) {
    const a = t.strokeWidth != null ? +t.strokeWidth : 1;
    e.expand(a + (r ? o_e(t, a) : 0));
  }
  return e;
}
function o_e(e, t) {
  return e.strokeJoin && e.strokeJoin !== "miter" ? 0 : t;
}
const s_e = s0 - 1e-8;
let G9, g8, y8, Ky, tC, v8, nC, rC;
const J1 = (e, t) => G9.add(e, t), x8 = (e, t) => J1(g8 = e, y8 = t), _j = (e) => J1(e, G9.y1), wj = (e) => J1(G9.x1, e), Hy = (e, t) => tC * e + nC * t, Gy = (e, t) => v8 * e + rC * t, JS = (e, t) => J1(Hy(e, t), Gy(e, t)), QS = (e, t) => x8(Hy(e, t), Gy(e, t));
function _4(e, t) {
  return G9 = e, t ? (Ky = t * kg, tC = rC = Math.cos(Ky), v8 = Math.sin(Ky), nC = -v8) : (tC = rC = 1, Ky = v8 = nC = 0), l_e;
}
const l_e = {
  beginPath() {
  },
  closePath() {
  },
  moveTo: QS,
  lineTo: QS,
  rect(e, t, r, a) {
    Ky ? (JS(e + r, t), JS(e + r, t + a), JS(e, t + a), QS(e, t)) : (J1(e + r, t + a), x8(e, t));
  },
  quadraticCurveTo(e, t, r, a) {
    const v = Hy(e, t), o = Gy(e, t), s = Hy(r, a), n = Gy(r, a);
    kj(g8, v, s, _j), kj(y8, o, n, wj), x8(s, n);
  },
  bezierCurveTo(e, t, r, a, v, o) {
    const s = Hy(e, t), n = Gy(e, t), l = Hy(r, a), u = Gy(r, a), i = Hy(v, o), h = Gy(v, o);
    Tj(g8, s, l, i, _j), Tj(y8, n, u, h, wj), x8(i, h);
  },
  arc(e, t, r, a, v, o) {
    if (a += Ky, v += Ky, g8 = r * Math.cos(v) + e, y8 = r * Math.sin(v) + t, Math.abs(v - a) > s_e)
      J1(e - r, t - r), J1(e + r, t + r);
    else {
      const s = (u) => J1(r * Math.cos(u) + e, r * Math.sin(u) + t);
      let n, l;
      if (s(a), s(v), v !== a)
        if (a = a % s0, a < 0 && (a += s0), v = v % s0, v < 0 && (v += s0), v < a && (o = !o, n = a, a = v, v = n), o)
          for (v -= s0, n = a - a % qy, l = 0; l < 4 && n > v; ++l, n -= qy) s(n);
        else
          for (n = a - a % qy + qy, l = 0; l < 4 && n < v; ++l, n = n + qy) s(n);
    }
  }
};
function kj(e, t, r, a) {
  const v = (e - t) / (e + r - 2 * t);
  0 < v && v < 1 && a(e + (t - e) * v);
}
function Tj(e, t, r, a, v) {
  const o = a - e + 3 * t - 3 * r, s = e + r - 2 * t, n = e - t;
  let l = 0, u = 0, i;
  Math.abs(o) > _be ? (i = s * s + n * o, i >= 0 && (i = Math.sqrt(i), l = (-s + i) / o, u = (-s - i) / o)) : l = 0.5 * n / s, 0 < l && l < 1 && v(Aj(l, e, t, r, a)), 0 < u && u < 1 && v(Aj(u, e, t, r, a));
}
function Aj(e, t, r, a, v) {
  const o = 1 - e, s = o * o, n = e * e;
  return s * o * t + 3 * s * e * r + 3 * o * n * a + n * e * v;
}
var fg = (fg = cg(1, 1)) ? fg.getContext("2d") : null;
const iC = new ic();
function kP(e) {
  return function(t, r) {
    if (!fg) return !0;
    e(fg, t), iC.clear().union(t.bounds).intersect(r).round();
    const {
      x1: a,
      y1: v,
      x2: o,
      y2: s
    } = iC;
    for (let n = v; n <= s; ++n)
      for (let l = a; l <= o; ++l)
        if (fg.isPointInPath(l, n))
          return !0;
    return !1;
  };
}
function TP(e, t) {
  return t.contains(e.x || 0, e.y || 0);
}
function FK(e, t) {
  const r = e.x || 0, a = e.y || 0, v = e.width || 0, o = e.height || 0;
  return t.intersects(iC.set(r, a, r + v, a + o));
}
function NK(e, t) {
  const r = e.x || 0, a = e.y || 0, v = e.x2 != null ? e.x2 : r, o = e.y2 != null ? e.y2 : a;
  return ix(t, r, a, v, o);
}
function ix(e, t, r, a, v) {
  const {
    x1: o,
    y1: s,
    x2: n,
    y2: l
  } = e, u = a - t, i = v - r;
  let h = 0, p = 1, _, d, f, c;
  for (c = 0; c < 4; ++c) {
    if (c === 0 && (_ = -u, d = -(o - t)), c === 1 && (_ = u, d = n - t), c === 2 && (_ = -i, d = -(s - r)), c === 3 && (_ = i, d = l - r), Math.abs(_) < 1e-10 && d < 0) return !1;
    if (f = d / _, _ < 0) {
      if (f > p) return !1;
      f > h && (h = f);
    } else if (_ > 0) {
      if (f < h) return !1;
      f < p && (p = f);
    }
  }
  return !0;
}
function Vx(e, t) {
  e.globalCompositeOperation = t.blend || "source-over";
}
function Xd(e, t) {
  return e ?? t;
}
function Sj(e, t) {
  const r = t.length;
  for (let a = 0; a < r; ++a)
    e.addColorStop(t[a].offset, t[a].color);
  return e;
}
function u_e(e, t, r) {
  const a = r.width(), v = r.height();
  let o;
  if (t.gradient === "radial")
    o = e.createRadialGradient(r.x1 + Xd(t.x1, 0.5) * a, r.y1 + Xd(t.y1, 0.5) * v, Math.max(a, v) * Xd(t.r1, 0), r.x1 + Xd(t.x2, 0.5) * a, r.y1 + Xd(t.y2, 0.5) * v, Math.max(a, v) * Xd(t.r2, 0.5));
  else {
    const s = Xd(t.x1, 0), n = Xd(t.y1, 0), l = Xd(t.x2, 1), u = Xd(t.y2, 0);
    if (s === l || n === u || a === v)
      o = e.createLinearGradient(r.x1 + s * a, r.y1 + n * v, r.x1 + l * a, r.y1 + u * v);
    else {
      const i = cg(Math.ceil(a), Math.ceil(v)), h = i.getContext("2d");
      return h.scale(a, v), h.fillStyle = Sj(h.createLinearGradient(s, n, l, u), t.stops), h.fillRect(0, 0, a, v), e.createPattern(i, "no-repeat");
    }
  }
  return Sj(o, t.stops);
}
function BK(e, t, r) {
  return xP(r) ? u_e(e, r, t.bounds) : r;
}
function k7(e, t, r) {
  return r *= t.fillOpacity == null ? 1 : t.fillOpacity, r > 0 ? (e.globalAlpha = r, e.fillStyle = BK(e, t, t.fill), !0) : !1;
}
var c_e = [];
function $x(e, t, r) {
  var a = (a = t.strokeWidth) != null ? a : 1;
  return a <= 0 ? !1 : (r *= t.strokeOpacity == null ? 1 : t.strokeOpacity, r > 0 ? (e.globalAlpha = r, e.strokeStyle = BK(e, t, t.stroke), e.lineWidth = a, e.lineCap = t.strokeCap || "butt", e.lineJoin = t.strokeJoin || "miter", e.miterLimit = t.strokeMiterLimit || 10, e.setLineDash && (e.setLineDash(t.strokeDash || c_e), e.lineDashOffset = t.strokeDashOffset || 0), !0) : !1);
}
function f_e(e, t) {
  return e.zindex - t.zindex || e.index - t.index;
}
function AP(e) {
  if (!e.zdirty) return e.zitems;
  var t = e.items, r = [], a, v, o;
  for (v = 0, o = t.length; v < o; ++v)
    a = t[v], a.index = v, a.zindex && r.push(a);
  return e.zdirty = !1, e.zitems = r.sort(f_e);
}
function bp(e, t) {
  var r = e.items, a, v;
  if (!r || !r.length) return;
  const o = AP(e);
  if (o && o.length) {
    for (a = 0, v = r.length; a < v; ++a)
      r[a].zindex || t(r[a]);
    r = o;
  }
  for (a = 0, v = r.length; a < v; ++a)
    t(r[a]);
}
function T7(e, t) {
  var r = e.items, a, v;
  if (!r || !r.length) return null;
  const o = AP(e);
  for (o && o.length && (r = o), v = r.length; --v >= 0; )
    if (a = t(r[v])) return a;
  if (r === o) {
    for (r = e.items, v = r.length; --v >= 0; )
      if (!r[v].zindex && (a = t(r[v])))
        return a;
  }
  return null;
}
function SP(e) {
  return function(t, r, a) {
    bp(r, (v) => {
      (!a || a.intersects(v.bounds)) && jK(e, t, v, v);
    });
  };
}
function h_e(e) {
  return function(t, r, a) {
    r.items.length && (!a || a.intersects(r.bounds)) && jK(e, t, r.items[0], r.items);
  };
}
function jK(e, t, r, a) {
  var v = r.opacity == null ? 1 : r.opacity;
  v !== 0 && (e(t, a) || (Vx(t, r), r.fill && k7(t, r, v) && t.fill(), r.stroke && $x(t, r, v) && t.stroke()));
}
function W9(e) {
  return e = e || Ld, function(t, r, a, v, o, s) {
    return a *= t.pixelRatio, v *= t.pixelRatio, T7(r, (n) => {
      const l = n.bounds;
      if (!(l && !l.contains(o, s) || !l) && e(t, n, a, v, o, s))
        return n;
    });
  };
}
function w4(e, t) {
  return function(r, a, v, o) {
    var s = Array.isArray(a) ? a[0] : a, n = t ?? s.fill, l = s.stroke && r.isPointInStroke, u, i;
    return l && (u = s.strokeWidth, i = s.strokeCap, r.lineWidth = u ?? 1, r.lineCap = i ?? "butt"), e(r, a) ? !1 : n && r.isPointInPath(v, o) || l && r.isPointInStroke(v, o);
  };
}
function MP(e) {
  return W9(w4(e));
}
function lv(e, t) {
  return "translate(" + e + "," + t + ")";
}
function EP(e) {
  return "rotate(" + e + ")";
}
function d_e(e, t) {
  return "scale(" + e + "," + t + ")";
}
function UK(e) {
  return lv(e.x || 0, e.y || 0);
}
function p_e(e) {
  return lv(e.x || 0, e.y || 0) + (e.angle ? " " + EP(e.angle) : "");
}
function m_e(e) {
  return lv(e.x || 0, e.y || 0) + (e.angle ? " " + EP(e.angle) : "") + (e.scaleX || e.scaleY ? " " + d_e(e.scaleX || 1, e.scaleY || 1) : "");
}
function CP(e, t, r) {
  function a(s, n) {
    s("transform", p_e(n)), s("d", t(null, n));
  }
  function v(s, n) {
    return t(_4(s, n.angle), n), Xm(s, n).translate(n.x || 0, n.y || 0);
  }
  function o(s, n) {
    var l = n.x || 0, u = n.y || 0, i = n.angle || 0;
    s.translate(l, u), i && s.rotate(i *= kg), s.beginPath(), t(s, n), i && s.rotate(-i), s.translate(-l, -u);
  }
  return {
    type: e,
    tag: "path",
    nested: !1,
    attr: a,
    bound: v,
    draw: SP(o),
    pick: MP(o),
    isect: r || kP(o)
  };
}
var g_e = CP("arc", e_e);
function y_e(e, t) {
  for (var r = e[0].orient === "horizontal" ? t[1] : t[0], a = e[0].orient === "horizontal" ? "y" : "x", v = e.length, o = 1 / 0, s, n; --v >= 0; )
    e[v].defined !== !1 && (n = Math.abs(e[v][a] - r), n < o && (o = n, s = e[v]));
  return s;
}
function v_e(e, t) {
  for (var r = Math.pow(e[0].strokeWidth || 1, 2), a = e.length, v, o, s; --a >= 0; )
    if (e[a].defined !== !1 && (v = e[a].x - t[0], o = e[a].y - t[1], s = v * v + o * o, s < r))
      return e[a];
  return null;
}
function x_e(e, t) {
  for (var r = e.length, a, v, o; --r >= 0; )
    if (e[r].defined !== !1 && (a = e[r].x - t[0], v = e[r].y - t[1], o = a * a + v * v, a = e[r].size || 1, o < a * a))
      return e[r];
  return null;
}
function IP(e, t, r) {
  function a(l, u) {
    var i = u.mark.items;
    i.length && l("d", t(null, i));
  }
  function v(l, u) {
    var i = u.items;
    return i.length === 0 ? l : (t(_4(l), i), Xm(l, i[0]));
  }
  function o(l, u) {
    l.beginPath(), t(l, u);
  }
  const s = w4(o);
  function n(l, u, i, h, p, _) {
    var d = u.items, f = u.bounds;
    return !d || !d.length || f && !f.contains(p, _) ? null : (i *= l.pixelRatio, h *= l.pixelRatio, s(l, d, i, h) ? d[0] : null);
  }
  return {
    type: e,
    tag: "path",
    nested: !0,
    attr: a,
    bound: v,
    draw: h_e(o),
    pick: n,
    isect: TP,
    tip: r
  };
}
var b_e = IP("area", t_e, y_e);
function __e(e, t) {
  var r = t.clip;
  e.save(), qa(r) ? (e.beginPath(), r(e), e.clip()) : VK(e, t.group);
}
function VK(e, t) {
  e.beginPath(), _P(t) ? Ib(e, t, 0, 0) : e.rect(0, 0, t.width || 0, t.height || 0), e.clip();
}
function $K(e) {
  const t = Xd(e.strokeWidth, 1);
  return e.strokeOffset != null ? e.strokeOffset : e.stroke && t > 0.5 && t < 1.5 ? 0.5 - Math.abs(t - 1) : 0;
}
function w_e(e, t) {
  e("transform", UK(t));
}
function qK(e, t) {
  const r = $K(t);
  e("d", Ib(null, t, r, r));
}
function k_e(e, t) {
  e("class", "background"), e("aria-hidden", !0), qK(e, t);
}
function T_e(e, t) {
  e("class", "foreground"), e("aria-hidden", !0), t.strokeForeground ? qK(e, t) : e("d", "");
}
function A_e(e, t, r) {
  const a = t.clip ? wP(r, t, t) : null;
  e("clip-path", a);
}
function S_e(e, t) {
  if (!t.clip && t.items) {
    const r = t.items, a = r.length;
    for (let v = 0; v < a; ++v)
      e.union(r[v].bounds);
  }
  return (t.clip || t.width || t.height) && !t.noBound && e.add(0, 0).add(t.width || 0, t.height || 0), Xm(e, t), e.translate(t.x || 0, t.y || 0);
}
function Ew(e, t, r, a) {
  const v = $K(t);
  e.beginPath(), Ib(e, t, (r || 0) + v, (a || 0) + v);
}
const M_e = w4(Ew), E_e = w4(Ew, !1), C_e = w4(Ew, !0);
function I_e(e, t, r, a) {
  bp(t, (v) => {
    const o = v.x || 0, s = v.y || 0, n = v.strokeForeground, l = v.opacity == null ? 1 : v.opacity;
    (v.stroke || v.fill) && l && (Ew(e, v, o, s), Vx(e, v), v.fill && k7(e, v, l) && e.fill(), v.stroke && !n && $x(e, v, l) && e.stroke()), e.save(), e.translate(o, s), v.clip && VK(e, v), r && r.translate(-o, -s), bp(v, (u) => {
      (u.marktype === "group" || a == null || a.includes(u.marktype)) && this.draw(e, u, r, a);
    }), r && r.translate(o, s), e.restore(), n && v.stroke && l && (Ew(e, v, o, s), Vx(e, v), $x(e, v, l) && e.stroke());
  });
}
function D_e(e, t, r, a, v, o) {
  if (t.bounds && !t.bounds.contains(v, o) || !t.items)
    return null;
  const s = r * e.pixelRatio, n = a * e.pixelRatio;
  return T7(t, (l) => {
    let u, i, h;
    const p = l.bounds;
    if (p && !p.contains(v, o)) return;
    i = l.x || 0, h = l.y || 0;
    const _ = i + (l.width || 0), d = h + (l.height || 0), f = l.clip;
    if (f && (v < i || v > _ || o < h || o > d)) return;
    if (e.save(), e.translate(i, h), i = v - i, h = o - h, f && _P(l) && !C_e(e, l, s, n))
      return e.restore(), null;
    const c = l.strokeForeground, g = t.interactive !== !1;
    return g && c && l.stroke && E_e(e, l, s, n) ? (e.restore(), l) : (u = T7(l, (m) => L_e(m, i, h) ? this.pick(m, r, a, i, h) : null), !u && g && (l.fill || !c && l.stroke) && M_e(e, l, s, n) && (u = l), e.restore(), u || null);
  });
}
function L_e(e, t, r) {
  return (e.interactive !== !1 || e.marktype === "group") && e.bounds && e.bounds.contains(t, r);
}
var P_e = {
  type: "group",
  tag: "g",
  nested: !1,
  attr: w_e,
  bound: S_e,
  draw: I_e,
  pick: D_e,
  isect: FK,
  content: A_e,
  background: k_e,
  foreground: T_e
}, Cw = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  version: "1.1"
};
function DP(e, t) {
  var r = e.image;
  return (!r || e.url && e.url !== r.url) && (r = {
    complete: !1,
    width: 0,
    height: 0
  }, t.loadImage(e.url).then((a) => {
    e.image = a, e.image.url = e.url;
  })), r;
}
function LP(e, t) {
  return e.width != null ? e.width : !t || !t.width ? 0 : e.aspect !== !1 && e.height ? e.height * t.width / t.height : t.width;
}
function PP(e, t) {
  return e.height != null ? e.height : !t || !t.height ? 0 : e.aspect !== !1 && e.width ? e.width * t.height / t.width : t.height;
}
function Y9(e, t) {
  return e === "center" ? t / 2 : e === "right" ? t : 0;
}
function Z9(e, t) {
  return e === "middle" ? t / 2 : e === "bottom" ? t : 0;
}
function O_e(e, t, r) {
  const a = DP(t, r), v = LP(t, a), o = PP(t, a), s = (t.x || 0) - Y9(t.align, v), n = (t.y || 0) - Z9(t.baseline, o), l = !a.src && a.toDataURL ? a.toDataURL() : a.src || "";
  e("href", l, Cw["xmlns:xlink"], "xlink:href"), e("transform", lv(s, n)), e("width", v), e("height", o), e("preserveAspectRatio", t.aspect === !1 ? "none" : "xMidYMid");
}
function z_e(e, t) {
  const r = t.image, a = LP(t, r), v = PP(t, r), o = (t.x || 0) - Y9(t.align, a), s = (t.y || 0) - Z9(t.baseline, v);
  return e.set(o, s, o + a, s + v);
}
function R_e(e, t, r) {
  bp(t, (a) => {
    if (r && !r.intersects(a.bounds)) return;
    const v = DP(a, this);
    let o = LP(a, v), s = PP(a, v);
    if (o === 0 || s === 0) return;
    let n = (a.x || 0) - Y9(a.align, o), l = (a.y || 0) - Z9(a.baseline, s), u, i, h, p;
    a.aspect !== !1 && (i = v.width / v.height, h = a.width / a.height, i === i && h === h && i !== h && (h < i ? (p = o / i, l += (s - p) / 2, s = p) : (p = s * i, n += (o - p) / 2, o = p))), (v.complete || v.toDataURL) && (Vx(e, a), e.globalAlpha = (u = a.opacity) != null ? u : 1, e.imageSmoothingEnabled = a.smooth !== !1, e.drawImage(v, n, l, o, s));
  });
}
var F_e = {
  type: "image",
  tag: "image",
  nested: !1,
  attr: O_e,
  bound: z_e,
  draw: R_e,
  pick: W9(),
  isect: Ld,
  // bounds check is sufficient
  get: DP,
  xOffset: Y9,
  yOffset: Z9
}, N_e = IP("line", n_e, v_e);
function B_e(e, t) {
  var r = t.scaleX || 1, a = t.scaleY || 1;
  (r !== 1 || a !== 1) && e("vector-effect", "non-scaling-stroke"), e("transform", m_e(t)), e("d", t.path);
}
function b8(e, t) {
  var r = t.path;
  if (r == null) return !0;
  var a = t.x || 0, v = t.y || 0, o = t.scaleX || 1, s = t.scaleY || 1, n = (t.angle || 0) * kg, l = t.pathCache;
  (!l || l.path !== r) && ((t.pathCache = l = Ux(r)).path = r), n && e.rotate && e.translate ? (e.translate(a, v), e.rotate(n), Mw(e, l, 0, 0, o, s), e.rotate(-n), e.translate(-a, -v)) : Mw(e, l, a, v, o, s);
}
function j_e(e, t) {
  return b8(_4(e, t.angle), t) ? e.set(0, 0, 0, 0) : Xm(e, t, !0);
}
var U_e = {
  type: "path",
  tag: "path",
  nested: !1,
  attr: B_e,
  bound: j_e,
  draw: SP(b8),
  pick: MP(b8),
  isect: kP(b8)
};
function V_e(e, t) {
  e("d", Ib(null, t));
}
function $_e(e, t) {
  var r, a;
  return Xm(e.set(r = t.x || 0, a = t.y || 0, r + t.width || 0, a + t.height || 0), t);
}
function Mj(e, t) {
  e.beginPath(), Ib(e, t);
}
var q_e = {
  type: "rect",
  tag: "path",
  nested: !1,
  attr: V_e,
  bound: $_e,
  draw: SP(Mj),
  pick: MP(Mj),
  isect: FK
};
function H_e(e, t) {
  e("transform", UK(t)), e("x2", t.x2 != null ? t.x2 - (t.x || 0) : 0), e("y2", t.y2 != null ? t.y2 - (t.y || 0) : 0);
}
function G_e(e, t) {
  var r, a;
  return Xm(e.set(r = t.x || 0, a = t.y || 0, t.x2 != null ? t.x2 : r, t.y2 != null ? t.y2 : a), t);
}
function HK(e, t, r) {
  var a, v, o, s;
  return t.stroke && $x(e, t, r) ? (a = t.x || 0, v = t.y || 0, o = t.x2 != null ? t.x2 : a, s = t.y2 != null ? t.y2 : v, e.beginPath(), e.moveTo(a, v), e.lineTo(o, s), !0) : !1;
}
function W_e(e, t, r) {
  bp(t, (a) => {
    if (!(r && !r.intersects(a.bounds))) {
      var v = a.opacity == null ? 1 : a.opacity;
      v && HK(e, a, v) && (Vx(e, a), e.stroke());
    }
  });
}
function Y_e(e, t, r, a) {
  return e.isPointInStroke ? HK(e, t, 1) && e.isPointInStroke(r, a) : !1;
}
var Z_e = {
  type: "rule",
  tag: "line",
  nested: !1,
  attr: H_e,
  bound: G_e,
  draw: W_e,
  pick: W9(Y_e),
  isect: NK
}, X_e = CP("shape", r_e), K_e = CP("symbol", i_e, TP);
const Ej = JW();
var td = {
  height: V0,
  measureWidth: OP,
  estimateWidth: A7,
  width: A7,
  canvas: GK
};
GK(!0);
function GK(e) {
  td.width = e && fg ? OP : A7;
}
function A7(e, t) {
  return WK(Ag(e, t), V0(e));
}
function WK(e, t) {
  return ~~(0.8 * e.length * t);
}
function OP(e, t) {
  return V0(e) <= 0 || !(t = Ag(e, t)) ? 0 : YK(t, X9(e));
}
function YK(e, t) {
  const r = `(${t}) ${e}`;
  let a = Ej.get(r);
  return a === void 0 && (fg.font = t, a = fg.measureText(e).width, Ej.set(r, a)), a;
}
function V0(e) {
  return e.fontSize != null ? +e.fontSize || 0 : 11;
}
function Tg(e) {
  return e.lineHeight != null ? e.lineHeight : V0(e) + 2;
}
function J_e(e) {
  return Qr(e) ? e.length > 1 ? e : e[0] : e;
}
function k4(e) {
  return J_e(e.lineBreak && e.text && !Qr(e.text) ? e.text.split(e.lineBreak) : e.text);
}
function zP(e) {
  const t = k4(e);
  return (Qr(t) ? t.length - 1 : 0) * Tg(e);
}
function Ag(e, t) {
  const r = t == null ? "" : (t + "").trim();
  return e.limit > 0 && r.length ? e3e(e, r) : r;
}
function Q_e(e) {
  if (td.width === OP) {
    const t = X9(e);
    return (r) => YK(r, t);
  } else if (td.width === A7) {
    const t = V0(e);
    return (r) => WK(r, t);
  } else
    return (t) => td.width(e, t);
}
function e3e(e, t) {
  var r = +e.limit, a = Q_e(e);
  if (a(t) < r) return t;
  var v = e.ellipsis || "…", o = e.dir === "rtl", s = 0, n = t.length, l;
  if (r -= a(v), o) {
    for (; s < n; )
      l = s + n >>> 1, a(t.slice(l)) > r ? s = l + 1 : n = l;
    return v + t.slice(s);
  } else {
    for (; s < n; )
      l = 1 + (s + n >>> 1), a(t.slice(0, l)) < r ? s = l : n = l - 1;
    return t.slice(0, s) + v;
  }
}
function T4(e, t) {
  var r = e.font;
  return (t && r ? String(r).replace(/"/g, "'") : r) || "sans-serif";
}
function X9(e, t) {
  return (e.fontStyle ? e.fontStyle + " " : "") + (e.fontVariant ? e.fontVariant + " " : "") + (e.fontWeight ? e.fontWeight + " " : "") + V0(e) + "px " + T4(e, t);
}
function RP(e) {
  var t = e.baseline, r = V0(e);
  return Math.round(t === "top" ? 0.79 * r : t === "middle" ? 0.3 * r : t === "bottom" ? -0.21 * r : t === "line-top" ? 0.29 * r + 0.5 * Tg(e) : t === "line-bottom" ? 0.29 * r - 0.5 * Tg(e) : 0);
}
const t3e = {
  left: "start",
  center: "middle",
  right: "end"
}, q3 = new ic();
function K9(e) {
  var t = e.x || 0, r = e.y || 0, a = e.radius || 0, v;
  return a && (v = (e.theta || 0) - qy, t += a * Math.cos(v), r += a * Math.sin(v)), q3.x1 = t, q3.y1 = r, q3;
}
function n3e(e, t) {
  var r = t.dx || 0, a = (t.dy || 0) + RP(t), v = K9(t), o = v.x1, s = v.y1, n = t.angle || 0, l;
  e("text-anchor", t3e[t.align] || "start"), n ? (l = lv(o, s) + " " + EP(n), (r || a) && (l += " " + lv(r, a))) : l = lv(o + r, s + a), e("transform", l);
}
function FP(e, t, r) {
  var a = td.height(t), v = t.align, o = K9(t), s = o.x1, n = o.y1, l = t.dx || 0, u = (t.dy || 0) + RP(t) - Math.round(0.8 * a), i = k4(t), h;
  if (Qr(i) ? (a += Tg(t) * (i.length - 1), h = i.reduce((p, _) => Math.max(p, td.width(t, _)), 0)) : h = td.width(t, i), v === "center" ? l -= h / 2 : v === "right" && (l -= h), e.set(l += s, u += n, l + h, u + a), t.angle && !r)
    e.rotate(t.angle * kg, s, n);
  else if (r === 2)
    return e.rotatedPoints(t.angle * kg, s, n);
  return e;
}
function r3e(e, t, r) {
  bp(t, (a) => {
    var v = a.opacity == null ? 1 : a.opacity, o, s, n, l, u, i, h;
    if (!(r && !r.intersects(a.bounds) || // bounds check
    v === 0 || a.fontSize <= 0 || a.text == null || a.text.length === 0)) {
      if (e.font = X9(a), e.textAlign = a.align || "left", o = K9(a), s = o.x1, n = o.y1, a.angle && (e.save(), e.translate(s, n), e.rotate(a.angle * kg), s = n = 0), s += a.dx || 0, n += (a.dy || 0) + RP(a), i = k4(a), Vx(e, a), Qr(i))
        for (u = Tg(a), l = 0; l < i.length; ++l)
          h = Ag(a, i[l]), a.fill && k7(e, a, v) && e.fillText(h, s, n), a.stroke && $x(e, a, v) && e.strokeText(h, s, n), n += u;
      else
        h = Ag(a, i), a.fill && k7(e, a, v) && e.fillText(h, s, n), a.stroke && $x(e, a, v) && e.strokeText(h, s, n);
      a.angle && e.restore();
    }
  });
}
function i3e(e, t, r, a, v, o) {
  if (t.fontSize <= 0) return !1;
  if (!t.angle) return !0;
  var s = K9(t), n = s.x1, l = s.y1, u = FP(q3, t, 1), i = -t.angle * kg, h = Math.cos(i), p = Math.sin(i), _ = h * v - p * o + (n - h * n + p * l), d = p * v + h * o + (l - p * n - h * l);
  return u.contains(_, d);
}
function a3e(e, t) {
  const r = FP(q3, e, 2);
  return ix(t, r[0], r[1], r[2], r[3]) || ix(t, r[0], r[1], r[4], r[5]) || ix(t, r[4], r[5], r[6], r[7]) || ix(t, r[2], r[3], r[6], r[7]);
}
var o3e = {
  type: "text",
  tag: "text",
  nested: !1,
  attr: n3e,
  bound: FP,
  draw: r3e,
  pick: W9(i3e),
  isect: a3e
}, s3e = IP("trail", a_e, x_e), sd = {
  arc: g_e,
  area: b_e,
  group: P_e,
  image: F_e,
  line: N_e,
  path: U_e,
  rect: q_e,
  rule: Z_e,
  shape: X_e,
  symbol: K_e,
  text: o3e,
  trail: s3e
};
function aC(e, t, r) {
  var a = sd[e.mark.marktype], v = t || a.bound;
  return a.nested && (e = e.mark), v(e.bounds || (e.bounds = new ic()), e, r);
}
var Cj = {
  mark: null
};
function ZK(e, t, r) {
  var a = sd[e.marktype], v = a.bound, o = e.items, s = o && o.length, n, l, u, i;
  if (a.nested)
    return s ? u = o[0] : (Cj.mark = e, u = Cj), i = aC(u, v, r), t = t && t.union(i) || i, t;
  if (t = t || e.bounds && e.bounds.clear() || new ic(), s)
    for (n = 0, l = o.length; n < l; ++n)
      t.union(aC(o[n], v, r));
  return e.bounds = t;
}
const l3e = [
  "marktype",
  "name",
  "role",
  "interactive",
  "clip",
  "items",
  "zindex",
  "x",
  "y",
  "width",
  "height",
  "align",
  "baseline",
  // layout
  "fill",
  "fillOpacity",
  "opacity",
  "blend",
  // fill
  "stroke",
  "strokeOpacity",
  "strokeWidth",
  "strokeCap",
  // stroke
  "strokeDash",
  "strokeDashOffset",
  // stroke dash
  "strokeForeground",
  "strokeOffset",
  // group
  "startAngle",
  "endAngle",
  "innerRadius",
  "outerRadius",
  // arc
  "cornerRadius",
  "padAngle",
  // arc, rect
  "cornerRadiusTopLeft",
  "cornerRadiusTopRight",
  // rect, group
  "cornerRadiusBottomLeft",
  "cornerRadiusBottomRight",
  "interpolate",
  "tension",
  "orient",
  "defined",
  // area, line
  "url",
  "aspect",
  "smooth",
  // image
  "path",
  "scaleX",
  "scaleY",
  // path
  "x2",
  "y2",
  // rule
  "size",
  "shape",
  // symbol
  "text",
  "angle",
  "theta",
  "radius",
  "dir",
  "dx",
  "dy",
  // text
  "ellipsis",
  "limit",
  "lineBreak",
  "lineHeight",
  "font",
  "fontSize",
  "fontWeight",
  "fontStyle",
  "fontVariant",
  // font
  "description",
  "aria",
  "ariaRole",
  "ariaRoleDescription"
  // aria
];
function XK(e, t) {
  return JSON.stringify(e, l3e, t);
}
function KK(e) {
  const t = typeof e == "string" ? JSON.parse(e) : e;
  return JK(t);
}
function JK(e) {
  var t = e.marktype, r = e.items, a, v, o;
  if (r)
    for (v = 0, o = r.length; v < o; ++v)
      a = t ? "mark" : "group", r[v][a] = e, r[v].zindex && (r[v][a].zdirty = !0), (t || a) === "group" && JK(r[v]);
  return t && ZK(e), e;
}
class QK {
  constructor(t) {
    arguments.length ? this.root = KK(t) : (this.root = Ij({
      marktype: "group",
      name: "root",
      role: "frame"
    }), this.root.items = [new H9(this.root)]);
  }
  toJSON(t) {
    return XK(this.root, t || 0);
  }
  mark(t, r, a) {
    r = r || this.root.items[0];
    const v = Ij(t, r);
    return r.items[a] = v, v.zindex && (v.group.zdirty = !0), v;
  }
}
function Ij(e, t) {
  const r = {
    bounds: new ic(),
    clip: !!e.clip,
    group: t,
    interactive: e.interactive !== !1,
    items: [],
    marktype: e.marktype,
    name: e.name || void 0,
    role: e.role || void 0,
    zindex: e.zindex || 0
  };
  return e.aria != null && (r.aria = e.aria), e.description && (r.description = e.description), r;
}
function Q1(e, t, r) {
  return !e && typeof document < "u" && document.createElement && (e = document), e ? r ? e.createElementNS(r, t) : e.createElement(t) : null;
}
function NP(e, t) {
  t = t.toLowerCase();
  for (var r = e.childNodes, a = 0, v = r.length; a < v; ++a) if (r[a].tagName.toLowerCase() === t)
    return r[a];
}
function bc(e, t, r, a) {
  var v = e.childNodes[t], o;
  return (!v || v.tagName.toLowerCase() !== r.toLowerCase()) && (o = v || null, v = Q1(e.ownerDocument, r, a), e.insertBefore(v, o)), v;
}
function _d(e, t) {
  for (var r = e.childNodes, a = r.length; a > t; ) e.removeChild(r[--a]);
  return e;
}
function eJ(e) {
  return "mark-" + e.marktype + (e.role ? " role-" + e.role : "") + (e.name ? " " + e.name : "");
}
function J9(e, t) {
  const r = t.getBoundingClientRect();
  return [e.clientX - r.left - (t.clientLeft || 0), e.clientY - r.top - (t.clientTop || 0)];
}
function u3e(e, t, r, a) {
  var v = e && e.mark, o, s;
  if (v && (o = sd[v.marktype]).tip) {
    for (s = J9(t, r), s[0] -= a[0], s[1] -= a[1]; e = e.mark.group; )
      s[0] -= e.x || 0, s[1] -= e.y || 0;
    e = o.tip(v.items, s);
  }
  return e;
}
let BP = class {
  /**
   * Create a new Handler instance.
   * @param {object} [customLoader] - Optional loader instance for
   *   href URL sanitization. If not specified, a standard loader
   *   instance will be generated.
   * @param {function} [customTooltip] - Optional tooltip handler
   *   function for custom tooltip display.
   * @constructor
   */
  constructor(t, r) {
    this._active = null, this._handlers = {}, this._loader = t || y9(), this._tooltip = r || c3e;
  }
  /**
   * Initialize a new Handler instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {object} [obj] - Optional context object that should serve as
   *   the "this" context for event callbacks.
   * @return {Handler} - This handler instance.
   */
  initialize(t, r, a) {
    return this._el = t, this._obj = a || null, this.origin(r);
  }
  /**
   * Returns the parent container element for a visualization.
   * @return {DOMElement} - The containing DOM element.
   */
  element() {
    return this._el;
  }
  /**
   * Returns the scene element (e.g., canvas or SVG) of the visualization
   * Subclasses must override if the first child is not the scene element.
   * @return {DOMElement} - The scene (e.g., canvas or SVG) element.
   */
  canvas() {
    return this._el && this._el.firstChild;
  }
  /**
   * Get / set the origin coordinates of the visualization.
   */
  origin(t) {
    return arguments.length ? (this._origin = t || [0, 0], this) : this._origin.slice();
  }
  /**
   * Get / set the scenegraph root.
   */
  scene(t) {
    return arguments.length ? (this._scene = t, this) : this._scene;
  }
  /**
   * Add an event handler. Subclasses should override this method.
   */
  on() {
  }
  /**
   * Remove an event handler. Subclasses should override this method.
   */
  off() {
  }
  /**
   * Utility method for finding the array index of an event handler.
   * @param {Array} h - An array of registered event handlers.
   * @param {string} type - The event type.
   * @param {function} handler - The event handler instance to find.
   * @return {number} - The handler's array index or -1 if not registered.
   */
  _handlerIndex(t, r, a) {
    for (let v = t ? t.length : 0; --v >= 0; )
      if (t[v].type === r && (!a || t[v].handler === a))
        return v;
    return -1;
  }
  /**
   * Returns an array with registered event handlers.
   * @param {string} [type] - The event type to query. Any annotations
   *   are ignored; for example, for the argument "click.foo", ".foo" will
   *   be ignored and the method returns all "click" handlers. If type is
   *   null or unspecified, this method returns handlers for all types.
   * @return {Array} - A new array containing all registered event handlers.
   */
  handlers(t) {
    const r = this._handlers, a = [];
    if (t)
      a.push(...r[this.eventName(t)]);
    else
      for (const v in r)
        a.push(...r[v]);
    return a;
  }
  /**
   * Parses an event name string to return the specific event type.
   * For example, given "click.foo" returns "click"
   * @param {string} name - The input event type string.
   * @return {string} - A string with the event type only.
   */
  eventName(t) {
    const r = t.indexOf(".");
    return r < 0 ? t : t.slice(0, r);
  }
  /**
   * Handle hyperlink navigation in response to an item.href value.
   * @param {Event} event - The event triggering hyperlink navigation.
   * @param {Item} item - The scenegraph item.
   * @param {string} href - The URL to navigate to.
   */
  handleHref(t, r, a) {
    this._loader.sanitize(a, {
      context: "href"
    }).then((v) => {
      const o = new MouseEvent(t.type, t), s = Q1(null, "a");
      for (const n in v) s.setAttribute(n, v[n]);
      s.dispatchEvent(o);
    }).catch(() => {
    });
  }
  /**
   * Handle tooltip display in response to an item.tooltip value.
   * @param {Event} event - The event triggering tooltip display.
   * @param {Item} item - The scenegraph item.
   * @param {boolean} show - A boolean flag indicating whether
   *   to show or hide a tooltip for the given item.
   */
  handleTooltip(t, r, a) {
    if (r && r.tooltip != null) {
      r = u3e(r, t, this.canvas(), this._origin);
      const v = a && r && r.tooltip || null;
      this._tooltip.call(this._obj, this, t, r, v);
    }
  }
  /**
   * Returns the size of a scenegraph item and its position relative
   * to the viewport.
   * @param {Item} item - The scenegraph item.
   * @return {object} - A bounding box object (compatible with the
   *   DOMRect type) consisting of x, y, width, heigh, top, left,
   *   right, and bottom properties.
   */
  getItemBoundingClientRect(t) {
    const r = this.canvas();
    if (!r) return;
    const a = r.getBoundingClientRect(), v = this._origin, o = t.bounds, s = o.width(), n = o.height();
    let l = o.x1 + v[0] + a.left, u = o.y1 + v[1] + a.top;
    for (; t.mark && (t = t.mark.group); )
      l += t.x || 0, u += t.y || 0;
    return {
      x: l,
      y: u,
      width: s,
      height: n,
      left: l,
      top: u,
      right: l + s,
      bottom: u + n
    };
  }
};
function c3e(e, t, r, a) {
  e.element().setAttribute("title", a || "");
}
class A4 {
  /**
   * Create a new Renderer instance.
   * @param {object} [loader] - Optional loader instance for
   *   image and href URL sanitization. If not specified, a
   *   standard loader instance will be generated.
   * @constructor
   */
  constructor(t) {
    this._el = null, this._bgcolor = null, this._loader = new RK(t);
  }
  /**
   * Initialize a new Renderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {Renderer} - This renderer instance.
   */
  initialize(t, r, a, v, o) {
    return this._el = t, this.resize(r, a, v, o);
  }
  /**
   * Returns the parent container element for a visualization.
   * @return {DOMElement} - The containing DOM element.
   */
  element() {
    return this._el;
  }
  /**
   * Returns the scene element (e.g., canvas or SVG) of the visualization
   * Subclasses must override if the first child is not the scene element.
   * @return {DOMElement} - The scene (e.g., canvas or SVG) element.
   */
  canvas() {
    return this._el && this._el.firstChild;
  }
  /**
   * Get / set the background color.
   */
  background(t) {
    return arguments.length === 0 ? this._bgcolor : (this._bgcolor = t, this);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {Renderer} - This renderer instance;
   */
  resize(t, r, a, v) {
    return this._width = t, this._height = r, this._origin = a || [0, 0], this._scale = v || 1, this;
  }
  /**
   * Report a dirty item whose bounds should be redrawn.
   * This base class method does nothing. Subclasses that perform
   * incremental should implement this method.
   * @param {Item} item - The dirty item whose bounds should be redrawn.
   */
  dirty() {
  }
  /**
   * Render an input scenegraph, potentially with a set of dirty items.
   * This method will perform an immediate rendering with available resources.
   * The renderer may also need to perform image loading to perform a complete
   * render. This process can lead to asynchronous re-rendering of the scene
   * after this method returns. To receive notification when rendering is
   * complete, use the renderAsync method instead.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   * @return {Renderer} - This renderer instance.
   */
  render(t, r) {
    const a = this;
    return a._call = function() {
      a._render(t, r);
    }, a._call(), a._call = null, a;
  }
  /**
   * Internal rendering method. Renderer subclasses should override this
   * method to actually perform rendering.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render() {
  }
  /**
   * Asynchronous rendering method. Similar to render, but returns a Promise
   * that resolves when all rendering is completed. Sometimes a renderer must
   * perform image loading to get a complete rendering. The returned
   * Promise will not resolve until this process completes.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   * @return {Promise} - A Promise that resolves when rendering is complete.
   */
  renderAsync(t, r) {
    const a = this.render(t, r);
    return this._ready ? this._ready.then(() => a) : Promise.resolve(a);
  }
  /**
   * Internal method for asynchronous resource loading.
   * Proxies method calls to the ImageLoader, and tracks loading
   * progress to invoke a re-render once complete.
   * @param {string} method - The method name to invoke on the ImageLoader.
   * @param {string} uri - The URI for the requested resource.
   * @return {Promise} - A Promise that resolves to the requested resource.
   */
  _load(t, r) {
    var a = this, v = a._loader[t](r);
    if (!a._ready) {
      const o = a._call;
      a._ready = a._loader.ready().then((s) => {
        s && o(), a._ready = null;
      });
    }
    return v;
  }
  /**
   * Sanitize a URL to include as a hyperlink in the rendered scene.
   * This method proxies a call to ImageLoader.sanitizeURL, but also tracks
   * image loading progress and invokes a re-render once complete.
   * @param {string} uri - The URI string to sanitize.
   * @return {Promise} - A Promise that resolves to the sanitized URL.
   */
  sanitizeURL(t) {
    return this._load("sanitizeURL", t);
  }
  /**
   * Requests an image to include in the rendered scene.
   * This method proxies a call to ImageLoader.loadImage, but also tracks
   * image loading progress and invokes a re-render once complete.
   * @param {string} uri - The URI string of the image.
   * @return {Promise} - A Promise that resolves to the loaded Image.
   */
  loadImage(t) {
    return this._load("loadImage", t);
  }
}
const f3e = "keydown", h3e = "keypress", d3e = "keyup", tJ = "dragenter", _8 = "dragleave", nJ = "dragover", oC = "pointerdown", p3e = "pointerup", S7 = "pointermove", w8 = "pointerout", rJ = "pointerover", sC = "mousedown", m3e = "mouseup", iJ = "mousemove", M7 = "mouseout", aJ = "mouseover", E7 = "click", g3e = "dblclick", y3e = "wheel", oJ = "mousewheel", C7 = "touchstart", I7 = "touchmove", D7 = "touchend", v3e = [f3e, h3e, d3e, tJ, _8, nJ, oC, p3e, S7, w8, rJ, sC, m3e, iJ, M7, aJ, E7, g3e, y3e, oJ, C7, I7, D7], lC = S7, H3 = M7, uC = E7;
class S4 extends BP {
  constructor(t, r) {
    super(t, r), this._down = null, this._touch = null, this._first = !0, this._events = {}, this.events = v3e, this.pointermove = Lj([S7, iJ], [rJ, aJ], [w8, M7]), this.dragover = Lj([nJ], [tJ], [_8]), this.pointerout = Pj([w8, M7]), this.dragleave = Pj([_8]);
  }
  initialize(t, r, a) {
    return this._canvas = t && NP(t, "canvas"), [E7, sC, oC, S7, w8, _8].forEach((v) => Dj(this, v)), super.initialize(t, r, a);
  }
  // return the backing canvas instance
  canvas() {
    return this._canvas;
  }
  // retrieve the current canvas context
  context() {
    return this._canvas.getContext("2d");
  }
  // to keep old versions of firefox happy
  DOMMouseScroll(t) {
    this.fire(oJ, t);
  }
  pointerdown(t) {
    this._down = this._active, this.fire(oC, t);
  }
  mousedown(t) {
    this._down = this._active, this.fire(sC, t);
  }
  click(t) {
    this._down === this._active && (this.fire(E7, t), this._down = null);
  }
  touchstart(t) {
    this._touch = this.pickEvent(t.changedTouches[0]), this._first && (this._active = this._touch, this._first = !1), this.fire(C7, t, !0);
  }
  touchmove(t) {
    this.fire(I7, t, !0);
  }
  touchend(t) {
    this.fire(D7, t, !0), this._touch = null;
  }
  // fire an event
  fire(t, r, a) {
    const v = a ? this._touch : this._active, o = this._handlers[t];
    if (r.vegaType = t, t === uC && v && v.href ? this.handleHref(r, v, v.href) : (t === lC || t === H3) && this.handleTooltip(r, v, t !== H3), o)
      for (let s = 0, n = o.length; s < n; ++s)
        o[s].handler.call(this._obj, r, v);
  }
  // add an event handler
  on(t, r) {
    const a = this.eventName(t), v = this._handlers;
    return this._handlerIndex(v[a], t, r) < 0 && (Dj(this, t), (v[a] || (v[a] = [])).push({
      type: t,
      handler: r
    })), this;
  }
  // remove an event handler
  off(t, r) {
    const a = this.eventName(t), v = this._handlers[a], o = this._handlerIndex(v, t, r);
    return o >= 0 && v.splice(o, 1), this;
  }
  pickEvent(t) {
    const r = J9(t, this._canvas), a = this._origin;
    return this.pick(this._scene, r[0], r[1], r[0] - a[0], r[1] - a[1]);
  }
  // find the scenegraph item at the current pointer position
  // x, y -- the absolute x, y pointer coordinates on the canvas element
  // gx, gy -- the relative coordinates within the current group
  pick(t, r, a, v, o) {
    const s = this.context();
    return sd[t.marktype].pick.call(this, s, t, r, a, v, o);
  }
}
const x3e = (e) => e === C7 || e === I7 || e === D7 ? [C7, I7, D7] : [e];
function Dj(e, t) {
  x3e(t).forEach((r) => b3e(e, r));
}
function b3e(e, t) {
  const r = e.canvas();
  r && !e._events[t] && (e._events[t] = 1, r.addEventListener(t, e[t] ? (a) => e[t](a) : (a) => e.fire(t, a)));
}
function w3(e, t, r) {
  t.forEach((a) => e.fire(a, r));
}
function Lj(e, t, r) {
  return function(a) {
    const v = this._active, o = this.pickEvent(a);
    o === v ? w3(this, e, a) : ((!v || !v.exit) && w3(this, r, a), this._active = o, w3(this, t, a), w3(this, e, a));
  };
}
function Pj(e) {
  return function(t) {
    w3(this, e, t), this._active = null;
  };
}
function _3e() {
  return typeof window < "u" && window.devicePixelRatio || 1;
}
function w3e(e, t, r, a, v, o) {
  const s = typeof HTMLElement < "u" && e instanceof HTMLElement && e.parentNode != null, n = e.getContext("2d"), l = s ? _3e() : v;
  e.width = t * l, e.height = r * l;
  for (const u in o)
    n[u] = o[u];
  return s && l !== 1 && (e.style.width = t + "px", e.style.height = r + "px"), n.pixelRatio = l, n.setTransform(l, 0, 0, l, l * a[0], l * a[1]), e;
}
class L7 extends A4 {
  constructor(t) {
    super(t), this._options = {}, this._redraw = !1, this._dirty = new ic(), this._tempb = new ic();
  }
  initialize(t, r, a, v, o, s) {
    return this._options = s || {}, this._canvas = this._options.externalContext ? null : cg(1, 1, this._options.type), t && this._canvas && (_d(t, 0).appendChild(this._canvas), this._canvas.setAttribute("class", "marks")), super.initialize(t, r, a, v, o);
  }
  resize(t, r, a, v) {
    if (super.resize(t, r, a, v), this._canvas)
      w3e(this._canvas, this._width, this._height, this._origin, this._scale, this._options.context);
    else {
      const o = this._options.externalContext;
      o || Jr("CanvasRenderer is missing a valid canvas or context"), o.scale(this._scale, this._scale), o.translate(this._origin[0], this._origin[1]);
    }
    return this._redraw = !0, this;
  }
  canvas() {
    return this._canvas;
  }
  context() {
    return this._options.externalContext || (this._canvas ? this._canvas.getContext("2d") : null);
  }
  dirty(t) {
    const r = this._tempb.clear().union(t.bounds);
    let a = t.mark.group;
    for (; a; )
      r.translate(a.x || 0, a.y || 0), a = a.mark.group;
    this._dirty.union(r);
  }
  _render(t, r) {
    const a = this.context(), v = this._origin, o = this._width, s = this._height, n = this._dirty, l = k3e(v, o, s);
    a.save();
    const u = this._redraw || n.empty() ? (this._redraw = !1, l.expand(1)) : T3e(a, l.intersect(n), v);
    return this.clear(-v[0], -v[1], o, s), this.draw(a, t, u, r), a.restore(), n.clear(), this;
  }
  draw(t, r, a, v) {
    if (r.marktype !== "group" && v != null && !v.includes(r.marktype))
      return;
    const o = sd[r.marktype];
    r.clip && __e(t, r), o.draw.call(this, t, r, a, v), r.clip && t.restore();
  }
  clear(t, r, a, v) {
    const o = this._options, s = this.context();
    o.type !== "pdf" && !o.externalContext && s.clearRect(t, r, a, v), this._bgcolor != null && (s.fillStyle = this._bgcolor, s.fillRect(t, r, a, v));
  }
}
const k3e = (e, t, r) => new ic().set(0, 0, t, r).translate(-e[0], -e[1]);
function T3e(e, t, r) {
  return t.expand(1).round(), e.pixelRatio % 1 && t.scale(e.pixelRatio).round().scale(1 / e.pixelRatio), t.translate(-(r[0] % 1), -(r[1] % 1)), e.beginPath(), e.rect(t.x1, t.y1, t.width(), t.height()), e.clip(), t;
}
class sJ extends BP {
  constructor(t, r) {
    super(t, r);
    const a = this;
    a._hrefHandler = eM(a, (v, o) => {
      o && o.href && a.handleHref(v, o, o.href);
    }), a._tooltipHandler = eM(a, (v, o) => {
      a.handleTooltip(v, o, v.type !== H3);
    });
  }
  initialize(t, r, a) {
    let v = this._svg;
    return v && (v.removeEventListener(uC, this._hrefHandler), v.removeEventListener(lC, this._tooltipHandler), v.removeEventListener(H3, this._tooltipHandler)), this._svg = v = t && NP(t, "svg"), v && (v.addEventListener(uC, this._hrefHandler), v.addEventListener(lC, this._tooltipHandler), v.addEventListener(H3, this._tooltipHandler)), super.initialize(t, r, a);
  }
  canvas() {
    return this._svg;
  }
  // add an event handler
  on(t, r) {
    const a = this.eventName(t), v = this._handlers;
    if (this._handlerIndex(v[a], t, r) < 0) {
      const s = {
        type: t,
        handler: r,
        listener: eM(this, r)
      };
      (v[a] || (v[a] = [])).push(s), this._svg && this._svg.addEventListener(a, s.listener);
    }
    return this;
  }
  // remove an event handler
  off(t, r) {
    const a = this.eventName(t), v = this._handlers[a], o = this._handlerIndex(v, t, r);
    return o >= 0 && (this._svg && this._svg.removeEventListener(a, v[o].listener), v.splice(o, 1)), this;
  }
}
const eM = (e, t) => (r) => {
  let a = r.target.__data__;
  a = Array.isArray(a) ? a[0] : a, r.vegaType = r.type, t.call(e._obj, r, a);
}, lJ = "aria-hidden", jP = "aria-label", UP = "role", VP = "aria-roledescription", uJ = "graphics-object", $P = "graphics-symbol", cJ = (e, t, r) => ({
  [UP]: e,
  [VP]: t,
  [jP]: r || void 0
}), A3e = vp(["axis-domain", "axis-grid", "axis-label", "axis-tick", "axis-title", "legend-band", "legend-entry", "legend-gradient", "legend-label", "legend-title", "legend-symbol", "title"]), Oj = {
  axis: {
    desc: "axis",
    caption: E3e
  },
  legend: {
    desc: "legend",
    caption: C3e
  },
  "title-text": {
    desc: "title",
    caption: (e) => `Title text '${Rj(e)}'`
  },
  "title-subtitle": {
    desc: "subtitle",
    caption: (e) => `Subtitle text '${Rj(e)}'`
  }
}, zj = {
  ariaRole: UP,
  ariaRoleDescription: VP,
  description: jP
};
function fJ(e, t) {
  const r = t.aria === !1;
  if (e(lJ, r || void 0), r || t.description == null)
    for (const a in zj)
      e(zj[a], void 0);
  else {
    const a = t.mark.marktype;
    e(jP, t.description), e(UP, t.ariaRole || (a === "group" ? uJ : $P)), e(VP, t.ariaRoleDescription || `${a} mark`);
  }
}
function hJ(e) {
  return e.aria === !1 ? {
    [lJ]: !0
  } : A3e[e.role] ? null : Oj[e.role] ? M3e(e, Oj[e.role]) : S3e(e);
}
function S3e(e) {
  const t = e.marktype, r = t === "group" || t === "text" || e.items.some((a) => a.description != null && a.aria !== !1);
  return cJ(r ? uJ : $P, `${t} mark container`, e.description);
}
function M3e(e, t) {
  try {
    const r = e.items[0], a = t.caption || (() => "");
    return cJ(t.role || $P, t.desc, r.description || a(r));
  } catch {
    return null;
  }
}
function Rj(e) {
  return Ri(e.text).join(" ");
}
function E3e(e) {
  const t = e.datum, r = e.orient, a = t.title ? dJ(e) : null, v = e.context, o = v.scales[t.scale].value, s = v.dataflow.locale(), n = o.type;
  return `${r === "left" || r === "right" ? "Y" : "X"}-axis` + (a ? ` titled '${a}'` : "") + ` for a ${jx(n) ? "discrete" : n} scale with ${SK(s, o, e)}`;
}
function C3e(e) {
  const t = e.datum, r = t.title ? dJ(e) : null, a = `${t.type || ""} legend`.trim(), v = t.scales, o = Object.keys(v), s = e.context, n = s.scales[v[o[0]]].value, l = s.dataflow.locale();
  return D3e(a) + (r ? ` titled '${r}'` : "") + ` for ${I3e(o)} with ${SK(l, n, e)}`;
}
function dJ(e) {
  try {
    return Ri(mo(e.items).items[0].text).join(" ");
  } catch {
    return null;
  }
}
function I3e(e) {
  return e = e.map((t) => t + (t === "fill" || t === "stroke" ? " color" : "")), e.length < 2 ? e[0] : e.slice(0, -1).join(", ") + " and " + mo(e);
}
function D3e(e) {
  return e.length ? e[0].toUpperCase() + e.slice(1) : e;
}
const pJ = (e) => (e + "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), L3e = (e) => pJ(e).replace(/"/g, "&quot;").replace(/\t/g, "&#x9;").replace(/\n/g, "&#xA;").replace(/\r/g, "&#xD;");
function qP() {
  let e = "", t = "", r = "";
  const a = [], v = () => t = r = "", o = (l) => {
    t && (e += `${t}>${r}`, v()), a.push(l);
  }, s = (l, u) => (u != null && (t += ` ${l}="${L3e(u)}"`), n), n = {
    open(l) {
      o(l), t = "<" + l;
      for (var u = arguments.length, i = new Array(u > 1 ? u - 1 : 0), h = 1; h < u; h++)
        i[h - 1] = arguments[h];
      for (const p of i)
        for (const _ in p) s(_, p[_]);
      return n;
    },
    close() {
      const l = a.pop();
      return t ? e += t + (r ? `>${r}</${l}>` : "/>") : e += `</${l}>`, v(), n;
    },
    attr: s,
    text: (l) => (r += pJ(l), n),
    toString: () => e
  };
  return n;
}
const mJ = (e) => gJ(qP(), e) + "";
function gJ(e, t) {
  if (e.open(t.tagName), t.hasAttributes()) {
    const r = t.attributes, a = r.length;
    for (let v = 0; v < a; ++v)
      e.attr(r[v].name, r[v].value);
  }
  if (t.hasChildNodes()) {
    const r = t.childNodes;
    for (const a of r)
      a.nodeType === 3 ? e.text(a.nodeValue) : gJ(e, a);
  }
  return e.close();
}
const P7 = {
  fill: "fill",
  fillOpacity: "fill-opacity",
  stroke: "stroke",
  strokeOpacity: "stroke-opacity",
  strokeWidth: "stroke-width",
  strokeCap: "stroke-linecap",
  strokeJoin: "stroke-linejoin",
  strokeDash: "stroke-dasharray",
  strokeDashOffset: "stroke-dashoffset",
  strokeMiterLimit: "stroke-miterlimit",
  opacity: "opacity"
}, O7 = {
  blend: "mix-blend-mode"
}, yJ = {
  fill: "none",
  "stroke-miterlimit": 10
}, X_ = 0, Fj = "http://www.w3.org/2000/xmlns/", yc = Cw.xmlns;
class HP extends A4 {
  constructor(t) {
    super(t), this._dirtyID = 0, this._dirty = [], this._svg = null, this._root = null, this._defs = null;
  }
  /**
   * Initialize a new SVGRenderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance.
   */
  initialize(t, r, a, v, o) {
    return this._defs = {}, this._clearDefs(), t && (this._svg = bc(t, 0, "svg", yc), this._svg.setAttributeNS(Fj, "xmlns", yc), this._svg.setAttributeNS(Fj, "xmlns:xlink", Cw["xmlns:xlink"]), this._svg.setAttribute("version", Cw.version), this._svg.setAttribute("class", "marks"), _d(t, 1), this._root = bc(this._svg, X_, "g", yc), eg(this._root, yJ), _d(this._svg, X_ + 1)), this.background(this._bgcolor), super.initialize(t, r, a, v, o);
  }
  /**
   * Get / set the background color.
   */
  background(t) {
    return arguments.length && this._svg && this._svg.style.setProperty("background-color", t), super.background(...arguments);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance;
   */
  resize(t, r, a, v) {
    return super.resize(t, r, a, v), this._svg && (eg(this._svg, {
      width: this._width * this._scale,
      height: this._height * this._scale,
      viewBox: `0 0 ${this._width} ${this._height}`
    }), this._root.setAttribute("transform", `translate(${this._origin})`)), this._dirty = [], this;
  }
  /**
   * Returns the SVG element of the visualization.
   * @return {DOMElement} - The SVG element.
   */
  canvas() {
    return this._svg;
  }
  /**
   * Returns an SVG text string for the rendered content,
   * or null if this renderer is currently headless.
   */
  svg() {
    const t = this._svg, r = this._bgcolor;
    if (!t) return null;
    let a;
    r && (t.removeAttribute("style"), a = bc(t, X_, "rect", yc), eg(a, {
      width: this._width,
      height: this._height,
      fill: r
    }));
    const v = mJ(t);
    return r && (t.removeChild(a), this._svg.style.setProperty("background-color", r)), v;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render(t, r) {
    return this._dirtyCheck() && (this._dirtyAll && this._clearDefs(), this.mark(this._root, t, void 0, r), _d(this._root, 1)), this.defs(), this._dirty = [], ++this._dirtyID, this;
  }
  // -- Manage rendering of items marked as dirty --
  /**
   * Flag a mark item as dirty.
   * @param {Item} item - The mark item.
   */
  dirty(t) {
    t.dirty !== this._dirtyID && (t.dirty = this._dirtyID, this._dirty.push(t));
  }
  /**
   * Check if a mark item is considered dirty.
   * @param {Item} item - The mark item.
   */
  isDirty(t) {
    return this._dirtyAll || !t._svg || !t._svg.ownerSVGElement || t.dirty === this._dirtyID;
  }
  /**
   * Internal method to check dirty status and, if possible,
   * make targetted updates without a full rendering pass.
   */
  _dirtyCheck() {
    this._dirtyAll = !0;
    const t = this._dirty;
    if (!t.length || !this._dirtyID) return !0;
    const r = ++this._dirtyID;
    let a, v, o, s, n, l, u;
    for (n = 0, l = t.length; n < l; ++n)
      if (a = t[n], v = a.mark, v.marktype !== o && (o = v.marktype, s = sd[o]), v.zdirty && v.dirty !== r && (this._dirtyAll = !1, Nj(a, r), v.items.forEach((i) => {
        i.dirty = r;
      })), !v.zdirty) {
        if (a.exit) {
          s.nested && v.items.length ? (u = v.items[0], u._svg && this._update(s, u._svg, u)) : a._svg && (u = a._svg.parentNode, u && u.removeChild(a._svg)), a._svg = null;
          continue;
        }
        a = s.nested ? v.items[0] : a, a._update !== r && (!a._svg || !a._svg.ownerSVGElement ? (this._dirtyAll = !1, Nj(a, r)) : this._update(s, a._svg, a), a._update = r);
      }
    return !this._dirtyAll;
  }
  // -- Construct & maintain scenegraph to SVG mapping ---
  /**
   * Render a set of mark items.
   * @param {SVGElement} el - The parent element in the SVG tree.
   * @param {object} scene - The mark parent to render.
   * @param {SVGElement} prev - The previous sibling in the SVG tree.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  mark(t, r, a, v) {
    if (!this.isDirty(r))
      return r._svg;
    const o = this._svg, s = r.marktype, n = sd[s], l = r.interactive === !1 ? "none" : null, u = n.tag === "g", i = Bj(r, t, a, "g", o);
    if (s !== "group" && v != null && !v.includes(s))
      return _d(i, 0), r._svg;
    i.setAttribute("class", eJ(r));
    const h = hJ(r);
    for (const f in h) Jf(i, f, h[f]);
    u || Jf(i, "pointer-events", l), Jf(i, "clip-path", r.clip ? wP(this, r, r.group) : null);
    let p = null, _ = 0;
    const d = (f) => {
      const c = this.isDirty(f), g = Bj(f, i, p, n.tag, o);
      c && (this._update(n, g, f), u && z3e(this, g, f, v)), p = g, ++_;
    };
    return n.nested ? r.items.length && d(r.items[0]) : bp(r, d), _d(i, _), i;
  }
  /**
   * Update the attributes of an SVG element for a mark item.
   * @param {object} mdef - The mark definition object
   * @param {SVGElement} el - The SVG element.
   * @param {Item} item - The mark item.
   */
  _update(t, r, a) {
    Cm = r, Ef = r.__values__, fJ(G3, a), t.attr(G3, a, this);
    const v = F3e[t.type];
    v && v.call(this, t, r, a), Cm && this.style(Cm, a);
  }
  /**
   * Update the presentation attributes of an SVG element for a mark item.
   * @param {SVGElement} el - The SVG element.
   * @param {Item} item - The mark item.
   */
  style(t, r) {
    if (r != null) {
      for (const a in P7) {
        let v = a === "font" ? T4(r) : r[a];
        if (v === Ef[a]) continue;
        const o = P7[a];
        v == null ? t.removeAttribute(o) : (xP(v) && (v = EK(v, this._defs.gradient, vJ())), t.setAttribute(o, v + "")), Ef[a] = v;
      }
      for (const a in O7)
        k8(t, O7[a], r[a]);
    }
  }
  /**
   * Render SVG defs, as needed.
   * Must be called *after* marks have been processed to ensure the
   * collected state is current and accurate.
   */
  defs() {
    const t = this._svg, r = this._defs;
    let a = r.el, v = 0;
    for (const o in r.gradient)
      a || (r.el = a = bc(t, X_ + 1, "defs", yc)), v = P3e(a, r.gradient[o], v);
    for (const o in r.clipping)
      a || (r.el = a = bc(t, X_ + 1, "defs", yc)), v = O3e(a, r.clipping[o], v);
    a && (v === 0 ? (t.removeChild(a), r.el = null) : _d(a, v));
  }
  /**
   * Clear defs caches.
   */
  _clearDefs() {
    const t = this._defs;
    t.gradient = {}, t.clipping = {};
  }
}
function Nj(e, t) {
  for (; e && e.dirty !== t; e = e.mark.group)
    if (e.dirty = t, e.mark && e.mark.dirty !== t)
      e.mark.dirty = t;
    else return;
}
function P3e(e, t, r) {
  let a, v, o;
  if (t.gradient === "radial") {
    let s = bc(e, r++, "pattern", yc);
    eg(s, {
      id: w7 + t.id,
      viewBox: "0,0,1,1",
      width: "100%",
      height: "100%",
      preserveAspectRatio: "xMidYMid slice"
    }), s = bc(s, 0, "rect", yc), eg(s, {
      width: 1,
      height: 1,
      fill: `url(${vJ()}#${t.id})`
    }), e = bc(e, r++, "radialGradient", yc), eg(e, {
      id: t.id,
      fx: t.x1,
      fy: t.y1,
      fr: t.r1,
      cx: t.x2,
      cy: t.y2,
      r: t.r2
    });
  } else
    e = bc(e, r++, "linearGradient", yc), eg(e, {
      id: t.id,
      x1: t.x1,
      x2: t.x2,
      y1: t.y1,
      y2: t.y2
    });
  for (a = 0, v = t.stops.length; a < v; ++a)
    o = bc(e, a, "stop", yc), o.setAttribute("offset", t.stops[a].offset), o.setAttribute("stop-color", t.stops[a].color);
  return _d(e, a), r;
}
function O3e(e, t, r) {
  let a;
  return e = bc(e, r, "clipPath", yc), e.setAttribute("id", t.id), t.path ? (a = bc(e, 0, "path", yc), a.setAttribute("d", t.path)) : (a = bc(e, 0, "rect", yc), eg(a, {
    x: 0,
    y: 0,
    width: t.width,
    height: t.height
  })), _d(e, 1), r + 1;
}
function z3e(e, t, r, a) {
  t = t.lastChild.previousSibling;
  let v, o = 0;
  bp(r, (s) => {
    v = e.mark(t, s, v, a), ++o;
  }), _d(t, 1 + o);
}
function Bj(e, t, r, a, v) {
  let o = e._svg, s;
  if (!o && (s = t.ownerDocument, o = Q1(s, a, yc), e._svg = o, e.mark && (o.__data__ = e, o.__values__ = {
    fill: "default"
  }, a === "g"))) {
    const n = Q1(s, "path", yc);
    o.appendChild(n), n.__data__ = e;
    const l = Q1(s, "g", yc);
    o.appendChild(l), l.__data__ = e;
    const u = Q1(s, "path", yc);
    o.appendChild(u), u.__data__ = e, u.__values__ = {
      fill: "default"
    };
  }
  return (o.ownerSVGElement !== v || R3e(o, r)) && t.insertBefore(o, r ? r.nextSibling : t.firstChild), o;
}
function R3e(e, t) {
  return e.parentNode && e.parentNode.childNodes.length > 1 && e.previousSibling != t;
}
let Cm = null, Ef = null;
const F3e = {
  group(e, t, r) {
    const a = Cm = t.childNodes[2];
    Ef = a.__values__, e.foreground(G3, r, this), Ef = t.__values__, Cm = t.childNodes[1], e.content(G3, r, this);
    const v = Cm = t.childNodes[0];
    e.background(G3, r, this);
    const o = r.mark.interactive === !1 ? "none" : null;
    if (o !== Ef.events && (Jf(a, "pointer-events", o), Jf(v, "pointer-events", o), Ef.events = o), r.strokeForeground && r.stroke) {
      const s = r.fill;
      Jf(a, "display", null), this.style(v, r), Jf(v, "stroke", null), s && (r.fill = null), Ef = a.__values__, this.style(a, r), s && (r.fill = s), Cm = null;
    } else
      Jf(a, "display", "none");
  },
  image(e, t, r) {
    r.smooth === !1 ? (k8(t, "image-rendering", "optimizeSpeed"), k8(t, "image-rendering", "pixelated")) : k8(t, "image-rendering", null);
  },
  text(e, t, r) {
    const a = k4(r);
    let v, o, s, n;
    Qr(a) ? (o = a.map((l) => Ag(r, l)), v = o.join(`
`), v !== Ef.text && (_d(t, 0), s = t.ownerDocument, n = Tg(r), o.forEach((l, u) => {
      const i = Q1(s, "tspan", yc);
      i.__data__ = r, i.textContent = l, u && (i.setAttribute("x", 0), i.setAttribute("dy", n)), t.appendChild(i);
    }), Ef.text = v)) : (o = Ag(r, a), o !== Ef.text && (t.textContent = o, Ef.text = o)), Jf(t, "font-family", T4(r)), Jf(t, "font-size", V0(r) + "px"), Jf(t, "font-style", r.fontStyle), Jf(t, "font-variant", r.fontVariant), Jf(t, "font-weight", r.fontWeight);
  }
};
function G3(e, t, r) {
  t !== Ef[e] && (r ? N3e(Cm, e, t, r) : Jf(Cm, e, t), Ef[e] = t);
}
function k8(e, t, r) {
  r !== Ef[t] && (r == null ? e.style.removeProperty(t) : e.style.setProperty(t, r + ""), Ef[t] = r);
}
function eg(e, t) {
  for (const r in t)
    Jf(e, r, t[r]);
}
function Jf(e, t, r) {
  r != null ? e.setAttribute(t, r) : e.removeAttribute(t);
}
function N3e(e, t, r, a) {
  r != null ? e.setAttributeNS(a, t, r) : e.removeAttributeNS(a, t);
}
function vJ() {
  let e;
  return typeof window > "u" ? "" : (e = window.location).hash ? e.href.slice(0, -e.hash.length) : e.href;
}
class xJ extends A4 {
  constructor(t) {
    super(t), this._text = null, this._defs = {
      gradient: {},
      clipping: {}
    };
  }
  /**
   * Returns the rendered SVG text string,
   * or null if rendering has not yet occurred.
   */
  svg() {
    return this._text;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   */
  _render(t) {
    const r = qP();
    r.open("svg", $a({}, Cw, {
      class: "marks",
      width: this._width * this._scale,
      height: this._height * this._scale,
      viewBox: `0 0 ${this._width} ${this._height}`
    }));
    const a = this._bgcolor;
    return a && a !== "transparent" && a !== "none" && r.open("rect", {
      width: this._width,
      height: this._height,
      fill: a
    }).close(), r.open("g", yJ, {
      transform: "translate(" + this._origin + ")"
    }), this.mark(r, t), r.close(), this.defs(r), this._text = r.close() + "", this;
  }
  /**
   * Render a set of mark items.
   * @param {object} m - The markup context.
   * @param {object} scene - The mark parent to render.
   */
  mark(t, r) {
    const a = sd[r.marktype], v = a.tag, o = [fJ, a.attr];
    t.open("g", {
      class: eJ(r),
      "clip-path": r.clip ? wP(this, r, r.group) : null
    }, hJ(r), {
      "pointer-events": v !== "g" && r.interactive === !1 ? "none" : null
    });
    const s = (n) => {
      const l = this.href(n);
      if (l && t.open("a", l), t.open(v, this.attr(r, n, o, v !== "g" ? v : null)), v === "text") {
        const u = k4(n);
        if (Qr(u)) {
          const i = {
            x: 0,
            dy: Tg(n)
          };
          for (let h = 0; h < u.length; ++h)
            t.open("tspan", h ? i : null).text(Ag(n, u[h])).close();
        } else
          t.text(Ag(n, u));
      } else if (v === "g") {
        const u = n.strokeForeground, i = n.fill, h = n.stroke;
        u && h && (n.stroke = null), t.open("path", this.attr(r, n, a.background, "bgrect")).close(), t.open("g", this.attr(r, n, a.content)), bp(n, (p) => this.mark(t, p)), t.close(), u && h ? (i && (n.fill = null), n.stroke = h, t.open("path", this.attr(r, n, a.foreground, "bgrect")).close(), i && (n.fill = i)) : t.open("path", this.attr(r, n, a.foreground, "bgfore")).close();
      }
      t.close(), l && t.close();
    };
    return a.nested ? r.items && r.items.length && s(r.items[0]) : bp(r, s), t.close();
  }
  /**
   * Get href attributes for a hyperlinked mark item.
   * @param {Item} item - The mark item.
   */
  href(t) {
    const r = t.href;
    let a;
    if (r) {
      if (a = this._hrefs && this._hrefs[r])
        return a;
      this.sanitizeURL(r).then((v) => {
        v["xlink:href"] = v.href, v.href = null, (this._hrefs || (this._hrefs = {}))[r] = v;
      });
    }
    return null;
  }
  /**
   * Get an object of SVG attributes for a mark item.
   * @param {object} scene - The mark parent.
   * @param {Item} item - The mark item.
   * @param {array|function} attrs - One or more attribute emitters.
   * @param {string} tag - The tag being rendered.
   */
  attr(t, r, a, v) {
    const o = {}, s = (n, l, u, i) => {
      o[i || n] = l;
    };
    return Array.isArray(a) ? a.forEach((n) => n(s, r, this)) : a(s, r, this), v && B3e(o, r, t, v, this._defs), o;
  }
  /**
   * Render SVG defs, as needed.
   * Must be called *after* marks have been processed to ensure the
   * collected state is current and accurate.
   * @param {object} m - The markup context.
   */
  defs(t) {
    const r = this._defs.gradient, a = this._defs.clipping;
    if (Object.keys(r).length + Object.keys(a).length !== 0) {
      t.open("defs");
      for (const o in r) {
        const s = r[o], n = s.stops;
        s.gradient === "radial" ? (t.open("pattern", {
          id: w7 + o,
          viewBox: "0,0,1,1",
          width: "100%",
          height: "100%",
          preserveAspectRatio: "xMidYMid slice"
        }), t.open("rect", {
          width: "1",
          height: "1",
          fill: "url(#" + o + ")"
        }).close(), t.close(), t.open("radialGradient", {
          id: o,
          fx: s.x1,
          fy: s.y1,
          fr: s.r1,
          cx: s.x2,
          cy: s.y2,
          r: s.r2
        })) : t.open("linearGradient", {
          id: o,
          x1: s.x1,
          x2: s.x2,
          y1: s.y1,
          y2: s.y2
        });
        for (let l = 0; l < n.length; ++l)
          t.open("stop", {
            offset: n[l].offset,
            "stop-color": n[l].color
          }).close();
        t.close();
      }
      for (const o in a) {
        const s = a[o];
        t.open("clipPath", {
          id: o
        }), s.path ? t.open("path", {
          d: s.path
        }).close() : t.open("rect", {
          x: 0,
          y: 0,
          width: s.width,
          height: s.height
        }).close(), t.close();
      }
      t.close();
    }
  }
}
function B3e(e, t, r, a, v) {
  let o;
  if (t == null || (a === "bgrect" && r.interactive === !1 && (e["pointer-events"] = "none"), a === "bgfore" && (r.interactive === !1 && (e["pointer-events"] = "none"), e.display = "none", t.fill !== null)))
    return e;
  a === "image" && t.smooth === !1 && (o = ["image-rendering: optimizeSpeed;", "image-rendering: pixelated;"]), a === "text" && (e["font-family"] = T4(t), e["font-size"] = V0(t) + "px", e["font-style"] = t.fontStyle, e["font-variant"] = t.fontVariant, e["font-weight"] = t.fontWeight);
  for (const s in P7) {
    let n = t[s];
    const l = P7[s];
    n === "transparent" && (l === "fill" || l === "stroke") || n != null && (xP(n) && (n = EK(n, v.gradient, "")), e[l] = n);
  }
  for (const s in O7) {
    const n = t[s];
    n != null && (o = o || [], o.push(`${O7[s]}: ${n};`));
  }
  return o && (e.style = o.join(" ")), e;
}
const ep = {
  svgMarkTypes: ["text"],
  svgOnTop: !0,
  debug: !1
};
function j3e(e) {
  ep.svgMarkTypes = e.svgMarkTypes ?? ["text"], ep.svgOnTop = e.svgOnTop ?? !0, ep.debug = e.debug ?? !1;
}
class cC extends A4 {
  constructor(t) {
    super(t), this._svgRenderer = new HP(t), this._canvasRenderer = new L7(t);
  }
  /**
   * Initialize a new HybridRenderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {HybridRenderer} - This renderer instance.
   */
  initialize(t, r, a, v, o) {
    this._root_el = bc(t, 0, "div");
    const s = bc(this._root_el, 0, "div"), n = bc(this._root_el, 1, "div");
    return this._root_el.style.position = "relative", ep.debug || (s.style.height = "100%", n.style.position = "absolute", n.style.top = "0", n.style.left = "0", n.style.height = "100%", n.style.width = "100%"), this._svgEl = ep.svgOnTop ? n : s, this._canvasEl = ep.svgOnTop ? s : n, this._svgEl.style.pointerEvents = "none", this._canvasRenderer.initialize(this._canvasEl, r, a, v, o), this._svgRenderer.initialize(this._svgEl, r, a, v, o), super.initialize(t, r, a, v, o);
  }
  /**
   * Flag a mark item as dirty.
   * @param {Item} item - The mark item.
   */
  dirty(t) {
    return ep.svgMarkTypes.includes(t.mark.marktype) ? this._svgRenderer.dirty(t) : this._canvasRenderer.dirty(t), this;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render(t, r) {
    const v = (r ?? ["arc", "area", "image", "line", "path", "rect", "rule", "shape", "symbol", "text", "trail"]).filter((o) => !ep.svgMarkTypes.includes(o));
    this._svgRenderer.render(t, ep.svgMarkTypes), this._canvasRenderer.render(t, v);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance;
   */
  resize(t, r, a, v) {
    return super.resize(t, r, a, v), this._svgRenderer.resize(t, r, a, v), this._canvasRenderer.resize(t, r, a, v), this;
  }
  background(t) {
    return ep.svgOnTop ? this._canvasRenderer.background(t) : this._svgRenderer.background(t), this;
  }
}
class bJ extends S4 {
  constructor(t, r) {
    super(t, r);
  }
  initialize(t, r, a) {
    const v = bc(bc(t, 0, "div"), ep.svgOnTop ? 0 : 1, "div");
    return super.initialize(v, r, a);
  }
}
const _J = "canvas", wJ = "hybrid", kJ = "png", TJ = "svg", AJ = "none", tg = {
  Canvas: _J,
  PNG: kJ,
  SVG: TJ,
  Hybrid: wJ,
  None: AJ
}, kv = {};
kv[_J] = kv[kJ] = {
  renderer: L7,
  headless: L7,
  handler: S4
};
kv[TJ] = {
  renderer: HP,
  headless: xJ,
  handler: sJ
};
kv[wJ] = {
  renderer: cC,
  headless: cC,
  handler: bJ
};
kv[AJ] = {};
function Q9(e, t) {
  return e = String(e || "").toLowerCase(), arguments.length > 1 ? (kv[e] = t, this) : kv[e];
}
function SJ(e, t, r) {
  const a = [], v = new ic().union(t), o = e.marktype;
  return o ? MJ(e, v, r, a) : o === "group" ? EJ(e, v, r, a) : Jr("Intersect scene must be mark node or group item.");
}
function MJ(e, t, r, a) {
  if (U3e(e, t, r)) {
    const v = e.items, o = e.marktype, s = v.length;
    let n = 0;
    if (o === "group")
      for (; n < s; ++n)
        EJ(v[n], t, r, a);
    else
      for (const l = sd[o].isect; n < s; ++n) {
        const u = v[n];
        CJ(u, t, l) && a.push(u);
      }
  }
  return a;
}
function U3e(e, t, r) {
  return e.bounds && t.intersects(e.bounds) && (e.marktype === "group" || e.interactive !== !1 && (!r || r(e)));
}
function EJ(e, t, r, a) {
  r && r(e.mark) && CJ(e, t, sd.group.isect) && a.push(e);
  const v = e.items, o = v && v.length;
  if (o) {
    const s = e.x || 0, n = e.y || 0;
    t.translate(-s, -n);
    for (let l = 0; l < o; ++l)
      MJ(v[l], t, r, a);
    t.translate(s, n);
  }
  return a;
}
function CJ(e, t, r) {
  const a = e.bounds;
  return t.encloses(a) || t.intersects(a) && r(e, t);
}
const tM = new ic();
function IJ(e) {
  const t = e.clip;
  if (qa(t))
    t(_4(tM.clear()));
  else if (t)
    tM.set(0, 0, e.group.width, e.group.height);
  else return;
  e.bounds.intersect(tM);
}
const V3e = 1e-9;
function GP(e, t, r) {
  return e === t ? !0 : r === "path" ? DJ(e, t) : e instanceof Date && t instanceof Date ? +e == +t : Ro(e) && Ro(t) ? Math.abs(e - t) <= V3e : !e || !t || !Oi(e) && !Oi(t) ? e == t : $3e(e, t);
}
function DJ(e, t) {
  return GP(Ux(e), Ux(t));
}
function $3e(e, t) {
  var r = Object.keys(e), a = Object.keys(t), v, o;
  if (r.length !== a.length) return !1;
  for (r.sort(), a.sort(), o = r.length - 1; o >= 0; o--)
    if (r[o] != a[o]) return !1;
  for (o = r.length - 1; o >= 0; o--)
    if (v = r[o], !GP(e[v], t[v], v)) return !1;
  return typeof e == typeof t;
}
function q3e() {
  zK(), pbe();
}
const qx = "top", op = "left", sp = "right", Sg = "bottom", H3e = "top-left", G3e = "top-right", W3e = "bottom-left", Y3e = "bottom-right", WP = "start", fC = "middle", eh = "end", Z3e = "x", X3e = "y", eT = "group", YP = "axis", ZP = "title", K3e = "frame", J3e = "scope", XP = "legend", LJ = "row-header", PJ = "row-footer", OJ = "row-title", zJ = "column-header", RJ = "column-footer", FJ = "column-title", Q3e = "padding", ewe = "symbol", NJ = "fit", BJ = "fit-x", jJ = "fit-y", twe = "pad", KP = "none", b6 = "all", hC = "each", JP = "flush", ng = "column", rg = "row";
function UJ(e) {
  qr.call(this, null, e);
}
Si(UJ, qr, {
  transform(e, t) {
    const r = t.dataflow, a = e.mark, v = a.marktype, o = sd[v], s = o.bound;
    let n = a.bounds, l;
    if (o.nested)
      a.items.length && r.dirty(a.items[0]), n = _6(a, s), a.items.forEach((u) => {
        u.bounds.clear().union(n);
      });
    else if (v === eT || e.modified())
      switch (t.visit(t.MOD, (u) => r.dirty(u)), n.clear(), a.items.forEach((u) => n.union(_6(u, s))), a.role) {
        case YP:
        case XP:
        case ZP:
          t.reflow();
      }
    else
      l = t.changed(t.REM), t.visit(t.ADD, (u) => {
        n.union(_6(u, s));
      }), t.visit(t.MOD, (u) => {
        l = l || n.alignsWith(u.bounds), r.dirty(u), n.union(_6(u, s));
      }), l && (n.clear(), a.items.forEach((u) => n.union(u.bounds)));
    return IJ(a), t.modifies("bounds");
  }
});
function _6(e, t, r) {
  return t(e.bounds.clear(), e, r);
}
const jj = ":vega_identifier:";
function QP(e) {
  qr.call(this, 0, e);
}
QP.Definition = {
  type: "Identifier",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "as",
    type: "string",
    required: !0
  }]
};
Si(QP, qr, {
  transform(e, t) {
    const r = nwe(t.dataflow), a = e.as;
    let v = r.value;
    return t.visit(t.ADD, (o) => o[a] = o[a] || ++v), r.set(this.value = v), t;
  }
});
function nwe(e) {
  return e._signals[jj] || (e._signals[jj] = e.add(0));
}
function VJ(e) {
  qr.call(this, null, e);
}
Si(VJ, qr, {
  transform(e, t) {
    let r = this.value;
    r || (r = t.dataflow.scenegraph().mark(e.markdef, rwe(e), e.index), r.group.context = e.context, e.context.group || (e.context.group = r.group), r.source = this.source, r.clip = e.clip, r.interactive = e.interactive, this.value = r);
    const a = r.marktype === eT ? H9 : q9;
    return t.visit(t.ADD, (v) => a.call(v, r)), (e.modified("clip") || e.modified("interactive")) && (r.clip = e.clip, r.interactive = !!e.interactive, r.zdirty = !0, t.reflow()), r.items = t.source, t;
  }
});
function rwe(e) {
  const t = e.groups, r = e.parent;
  return t && t.size === 1 ? t.get(Object.keys(t.object)[0]) : t && r ? t.lookup(r) : null;
}
function $J(e) {
  qr.call(this, null, e);
}
const Uj = {
  parity: (e) => e.filter((t, r) => r % 2 ? t.opacity = 0 : 1),
  greedy: (e, t) => {
    let r;
    return e.filter((a, v) => !v || !qJ(r.bounds, a.bounds, t) ? (r = a, 1) : a.opacity = 0);
  }
}, qJ = (e, t, r) => r > Math.max(t.x1 - e.x2, e.x1 - t.x2, t.y1 - e.y2, e.y1 - t.y2), Vj = (e, t) => {
  for (var r = 1, a = e.length, v = e[0].bounds, o; r < a; v = o, ++r)
    if (qJ(v, o = e[r].bounds, t)) return !0;
}, iwe = (e) => {
  const t = e.bounds;
  return t.width() > 1 && t.height() > 1;
}, awe = (e, t, r) => {
  var a = e.range(), v = new ic();
  return t === qx || t === Sg ? v.set(a[0], -1 / 0, a[1], 1 / 0) : v.set(-1 / 0, a[0], 1 / 0, a[1]), v.expand(r || 1), (o) => v.encloses(o.bounds);
}, $j = (e) => (e.forEach((t) => t.opacity = 1), e), qj = (e, t) => e.reflow(t.modified()).modifies("opacity");
Si($J, qr, {
  transform(e, t) {
    const r = Uj[e.method] || Uj.parity, a = e.separation || 0;
    let v = t.materialize(t.SOURCE).source, o, s;
    if (!v || !v.length) return;
    if (!e.method)
      return e.modified("method") && ($j(v), t = qj(t, e)), t;
    if (v = v.filter(iwe), !v.length) return;
    if (e.sort && (v = v.slice().sort(e.sort)), o = $j(v), t = qj(t, e), o.length >= 3 && Vj(o, a)) {
      do
        o = r(o, a);
      while (o.length >= 3 && Vj(o, a));
      o.length < 3 && !mo(v).opacity && (o.length > 1 && (mo(o).opacity = 0), mo(v).opacity = 1);
    }
    e.boundScale && e.boundTolerance >= 0 && (s = awe(e.boundScale, e.boundOrient, +e.boundTolerance), v.forEach((l) => {
      s(l) || (l.opacity = 0);
    }));
    const n = o[0].mark.bounds.clear();
    return v.forEach((l) => {
      l.opacity && n.union(l.bounds);
    }), t;
  }
});
function HJ(e) {
  qr.call(this, null, e);
}
Si(HJ, qr, {
  transform(e, t) {
    const r = t.dataflow;
    if (t.visit(t.ALL, (a) => r.dirty(a)), t.fields && t.fields.zindex) {
      const a = t.source && t.source[0];
      a && (a.mark.zdirty = !0);
    }
  }
});
const Mf = new ic();
function ax(e, t, r) {
  return e[t] === r ? 0 : (e[t] = r, 1);
}
function owe(e) {
  var t = e.items[0].orient;
  return t === op || t === sp;
}
function swe(e) {
  let t = +e.grid;
  return [
    e.ticks ? t++ : -1,
    // ticks index
    e.labels ? t++ : -1,
    // labels index
    t + +e.domain
    // title index
  ];
}
function lwe(e, t, r, a) {
  var v = t.items[0], o = v.datum, s = v.translate != null ? v.translate : 0.5, n = v.orient, l = swe(o), u = v.range, i = v.offset, h = v.position, p = v.minExtent, _ = v.maxExtent, d = o.title && v.items[l[2]].items[0], f = v.titlePadding, c = v.bounds, g = d && zP(d), m = 0, x = 0, w, k;
  switch (Mf.clear().union(c), c.clear(), (w = l[0]) > -1 && c.union(v.items[w].bounds), (w = l[1]) > -1 && c.union(v.items[w].bounds), n) {
    case qx:
      m = h || 0, x = -i, k = Math.max(p, Math.min(_, -c.y1)), c.add(0, -k).add(u, 0), d && w6(e, d, k, f, g, 0, -1, c);
      break;
    case op:
      m = -i, x = h || 0, k = Math.max(p, Math.min(_, -c.x1)), c.add(-k, 0).add(0, u), d && w6(e, d, k, f, g, 1, -1, c);
      break;
    case sp:
      m = r + i, x = h || 0, k = Math.max(p, Math.min(_, c.x2)), c.add(0, 0).add(k, u), d && w6(e, d, k, f, g, 1, 1, c);
      break;
    case Sg:
      m = h || 0, x = a + i, k = Math.max(p, Math.min(_, c.y2)), c.add(0, 0).add(u, k), d && w6(e, d, k, f, 0, 0, 1, c);
      break;
    default:
      m = v.x, x = v.y;
  }
  return Xm(c.translate(m, x), v), ax(v, "x", m + s) | ax(v, "y", x + s) && (v.bounds = Mf, e.dirty(v), v.bounds = c, e.dirty(v)), v.mark.bounds.clear().union(c);
}
function w6(e, t, r, a, v, o, s, n) {
  const l = t.bounds;
  if (t.auto) {
    const u = s * (r + v + a);
    let i = 0, h = 0;
    e.dirty(t), o ? i = (t.x || 0) - (t.x = u) : h = (t.y || 0) - (t.y = u), t.mark.bounds.clear().union(l.translate(-i, -h)), e.dirty(t);
  }
  n.union(l);
}
const Hj = (e, t) => Math.floor(Math.min(e, t)), Gj = (e, t) => Math.ceil(Math.max(e, t));
function uwe(e) {
  var t = e.items, r = t.length, a = 0, v, o;
  const s = {
    marks: [],
    rowheaders: [],
    rowfooters: [],
    colheaders: [],
    colfooters: [],
    rowtitle: null,
    coltitle: null
  };
  for (; a < r; ++a)
    if (v = t[a], o = v.items, v.marktype === eT)
      switch (v.role) {
        case YP:
        case XP:
        case ZP:
          break;
        case LJ:
          s.rowheaders.push(...o);
          break;
        case PJ:
          s.rowfooters.push(...o);
          break;
        case zJ:
          s.colheaders.push(...o);
          break;
        case RJ:
          s.colfooters.push(...o);
          break;
        case OJ:
          s.rowtitle = o[0];
          break;
        case FJ:
          s.coltitle = o[0];
          break;
        default:
          s.marks.push(...o);
      }
  return s;
}
function cwe(e) {
  return new ic().set(0, 0, e.width || 0, e.height || 0);
}
function fwe(e) {
  const t = e.bounds.clone();
  return t.empty() ? t.set(0, 0, 0, 0) : t.translate(-(e.x || 0), -(e.y || 0));
}
function Hl(e, t, r) {
  const a = Oi(e) ? e[t] : e;
  return a ?? (r !== void 0 ? r : 0);
}
function Wj(e) {
  return e < 0 ? Math.ceil(-e) : 0;
}
function GJ(e, t, r) {
  var a = !r.nodirty, v = r.bounds === JP ? cwe : fwe, o = Mf.set(0, 0, 0, 0), s = Hl(r.align, ng), n = Hl(r.align, rg), l = Hl(r.padding, ng), u = Hl(r.padding, rg), i = r.columns || t.length, h = i <= 0 ? 1 : Math.ceil(t.length / i), p = t.length, _ = Array(p), d = Array(i), f = 0, c = Array(p), g = Array(h), m = 0, x = Array(p), w = Array(p), k = Array(p), S, A, C, D, L, E, P, I, M, O, T;
  for (A = 0; A < i; ++A) d[A] = 0;
  for (A = 0; A < h; ++A) g[A] = 0;
  for (A = 0; A < p; ++A)
    E = t[A], L = k[A] = v(E), E.x = E.x || 0, x[A] = 0, E.y = E.y || 0, w[A] = 0, C = A % i, D = ~~(A / i), f = Math.max(f, P = Math.ceil(L.x2)), m = Math.max(m, I = Math.ceil(L.y2)), d[C] = Math.max(d[C], P), g[D] = Math.max(g[D], I), _[A] = l + Wj(L.x1), c[A] = u + Wj(L.y1), a && e.dirty(t[A]);
  for (A = 0; A < p; ++A)
    A % i === 0 && (_[A] = 0), A < i && (c[A] = 0);
  if (s === hC)
    for (C = 1; C < i; ++C) {
      for (T = 0, A = C; A < p; A += i)
        T < _[A] && (T = _[A]);
      for (A = C; A < p; A += i)
        _[A] = T + d[C - 1];
    }
  else if (s === b6) {
    for (T = 0, A = 0; A < p; ++A)
      A % i && T < _[A] && (T = _[A]);
    for (A = 0; A < p; ++A)
      A % i && (_[A] = T + f);
  } else
    for (s = !1, C = 1; C < i; ++C)
      for (A = C; A < p; A += i)
        _[A] += d[C - 1];
  if (n === hC)
    for (D = 1; D < h; ++D) {
      for (T = 0, A = D * i, S = A + i; A < S; ++A)
        T < c[A] && (T = c[A]);
      for (A = D * i; A < S; ++A)
        c[A] = T + g[D - 1];
    }
  else if (n === b6) {
    for (T = 0, A = i; A < p; ++A)
      T < c[A] && (T = c[A]);
    for (A = i; A < p; ++A)
      c[A] = T + m;
  } else
    for (n = !1, D = 1; D < h; ++D)
      for (A = D * i, S = A + i; A < S; ++A)
        c[A] += g[D - 1];
  for (M = 0, A = 0; A < p; ++A)
    M = _[A] + (A % i ? M : 0), x[A] += M - t[A].x;
  for (C = 0; C < i; ++C)
    for (O = 0, A = C; A < p; A += i)
      O += c[A], w[A] += O - t[A].y;
  if (s && Hl(r.center, ng) && h > 1)
    for (A = 0; A < p; ++A)
      L = s === b6 ? f : d[A % i], M = L - k[A].x2 - t[A].x - x[A], M > 0 && (x[A] += M / 2);
  if (n && Hl(r.center, rg) && i !== 1)
    for (A = 0; A < p; ++A)
      L = n === b6 ? m : g[~~(A / i)], O = L - k[A].y2 - t[A].y - w[A], O > 0 && (w[A] += O / 2);
  for (A = 0; A < p; ++A)
    o.union(k[A].translate(x[A], w[A]));
  switch (M = Hl(r.anchor, Z3e), O = Hl(r.anchor, X3e), Hl(r.anchor, ng)) {
    case eh:
      M -= o.width();
      break;
    case fC:
      M -= o.width() / 2;
  }
  switch (Hl(r.anchor, rg)) {
    case eh:
      O -= o.height();
      break;
    case fC:
      O -= o.height() / 2;
  }
  for (M = Math.round(M), O = Math.round(O), o.clear(), A = 0; A < p; ++A)
    t[A].mark.bounds.clear();
  for (A = 0; A < p; ++A)
    E = t[A], E.x += x[A] += M, E.y += w[A] += O, o.union(E.mark.bounds.union(E.bounds.translate(x[A], w[A]))), a && e.dirty(E);
  return o;
}
function hwe(e, t, r) {
  var a = uwe(t), v = a.marks, o = r.bounds === JP ? dwe : pwe, s = r.offset, n = r.columns || v.length, l = n <= 0 ? 1 : Math.ceil(v.length / n), u = l * n, i, h, p, _, d, f, c;
  const g = GJ(e, v, r);
  g.empty() && g.set(0, 0, 0, 0), a.rowheaders && (f = Hl(r.headerBand, rg, null), i = k6(e, a.rowheaders, v, n, l, -Hl(s, "rowHeader"), Hj, 0, o, "x1", 0, n, 1, f)), a.colheaders && (f = Hl(r.headerBand, ng, null), h = k6(e, a.colheaders, v, n, n, -Hl(s, "columnHeader"), Hj, 1, o, "y1", 0, 1, n, f)), a.rowfooters && (f = Hl(r.footerBand, rg, null), p = k6(e, a.rowfooters, v, n, l, Hl(s, "rowFooter"), Gj, 0, o, "x2", n - 1, n, 1, f)), a.colfooters && (f = Hl(r.footerBand, ng, null), _ = k6(e, a.colfooters, v, n, n, Hl(s, "columnFooter"), Gj, 1, o, "y2", u - n, 1, n, f)), a.rowtitle && (d = Hl(r.titleAnchor, rg), c = Hl(s, "rowTitle"), c = d === eh ? p + c : i - c, f = Hl(r.titleBand, rg, 0.5), Yj(e, a.rowtitle, c, 0, g, f)), a.coltitle && (d = Hl(r.titleAnchor, ng), c = Hl(s, "columnTitle"), c = d === eh ? _ + c : h - c, f = Hl(r.titleBand, ng, 0.5), Yj(e, a.coltitle, c, 1, g, f));
}
function dwe(e, t) {
  return t === "x1" ? e.x || 0 : t === "y1" ? e.y || 0 : t === "x2" ? (e.x || 0) + (e.width || 0) : t === "y2" ? (e.y || 0) + (e.height || 0) : void 0;
}
function pwe(e, t) {
  return e.bounds[t];
}
function k6(e, t, r, a, v, o, s, n, l, u, i, h, p, _) {
  var d = r.length, f = 0, c = 0, g, m, x, w, k, S, A, C, D;
  if (!d) return f;
  for (g = i; g < d; g += h)
    r[g] && (f = s(f, l(r[g], u)));
  if (!t.length) return f;
  for (t.length > v && (e.warn("Grid headers exceed limit: " + v), t = t.slice(0, v)), f += o, m = 0, w = t.length; m < w; ++m)
    e.dirty(t[m]), t[m].mark.bounds.clear();
  for (g = i, m = 0, w = t.length; m < w; ++m, g += h) {
    for (S = t[m], k = S.mark.bounds, x = g; x >= 0 && (A = r[x]) == null; x -= p) ;
    n ? (C = _ == null ? A.x : Math.round(A.bounds.x1 + _ * A.bounds.width()), D = f) : (C = f, D = _ == null ? A.y : Math.round(A.bounds.y1 + _ * A.bounds.height())), k.union(S.bounds.translate(C - (S.x || 0), D - (S.y || 0))), S.x = C, S.y = D, e.dirty(S), c = s(c, k[u]);
  }
  return c;
}
function Yj(e, t, r, a, v, o) {
  if (t) {
    e.dirty(t);
    var s = r, n = r;
    a ? s = Math.round(v.x1 + o * v.width()) : n = Math.round(v.y1 + o * v.height()), t.bounds.translate(s - (t.x || 0), n - (t.y || 0)), t.mark.bounds.clear().union(t.bounds), t.x = s, t.y = n, e.dirty(t);
  }
}
function mwe(e, t) {
  const r = e[t] || {};
  return (a, v) => r[a] != null ? r[a] : e[a] != null ? e[a] : v;
}
function gwe(e, t) {
  let r = -1 / 0;
  return e.forEach((a) => {
    a.offset != null && (r = Math.max(r, a.offset));
  }), r > -1 / 0 ? r : t;
}
function ywe(e, t, r, a, v, o, s) {
  const n = mwe(r, t), l = gwe(e, n("offset", 0)), u = n("anchor", WP), i = u === eh ? 1 : u === fC ? 0.5 : 0, h = {
    align: hC,
    bounds: n("bounds", JP),
    columns: n("direction") === "vertical" ? 1 : e.length,
    padding: n("margin", 8),
    center: n("center"),
    nodirty: !0
  };
  switch (t) {
    case op:
      h.anchor = {
        x: Math.floor(a.x1) - l,
        column: eh,
        y: i * (s || a.height() + 2 * a.y1),
        row: u
      };
      break;
    case sp:
      h.anchor = {
        x: Math.ceil(a.x2) + l,
        y: i * (s || a.height() + 2 * a.y1),
        row: u
      };
      break;
    case qx:
      h.anchor = {
        y: Math.floor(v.y1) - l,
        row: eh,
        x: i * (o || v.width() + 2 * v.x1),
        column: u
      };
      break;
    case Sg:
      h.anchor = {
        y: Math.ceil(v.y2) + l,
        x: i * (o || v.width() + 2 * v.x1),
        column: u
      };
      break;
    case H3e:
      h.anchor = {
        x: l,
        y: l
      };
      break;
    case G3e:
      h.anchor = {
        x: o - l,
        y: l,
        column: eh
      };
      break;
    case W3e:
      h.anchor = {
        x: l,
        y: s - l,
        row: eh
      };
      break;
    case Y3e:
      h.anchor = {
        x: o - l,
        y: s - l,
        column: eh,
        row: eh
      };
      break;
  }
  return h;
}
function vwe(e, t) {
  var r = t.items[0], a = r.datum, v = r.orient, o = r.bounds, s = r.x, n = r.y, l, u;
  return r._bounds ? r._bounds.clear().union(o) : r._bounds = o.clone(), o.clear(), bwe(e, r, r.items[0].items[0]), o = xwe(r, o), l = 2 * r.padding, u = 2 * r.padding, o.empty() || (l = Math.ceil(o.width() + l), u = Math.ceil(o.height() + u)), a.type === ewe && _we(r.items[0].items[0].items[0].items), v !== KP && (r.x = s = 0, r.y = n = 0), r.width = l, r.height = u, Xm(o.set(s, n, s + l, n + u), r), r.mark.bounds.clear().union(o), r;
}
function xwe(e, t) {
  return e.items.forEach((r) => t.union(r.bounds)), t.x1 = e.padding, t.y1 = e.padding, t;
}
function bwe(e, t, r) {
  var a = t.padding, v = a - r.x, o = a - r.y;
  if (!t.datum.title)
    (v || o) && K_(e, r, v, o);
  else {
    var s = t.items[1].items[0], n = s.anchor, l = t.titlePadding || 0, u = a - s.x, i = a - s.y;
    switch (s.orient) {
      case op:
        v += Math.ceil(s.bounds.width()) + l;
        break;
      case sp:
      case Sg:
        break;
      default:
        o += s.bounds.height() + l;
    }
    switch ((v || o) && K_(e, r, v, o), s.orient) {
      case op:
        i += U2(t, r, s, n, 1, 1);
        break;
      case sp:
        u += U2(t, r, s, eh, 0, 0) + l, i += U2(t, r, s, n, 1, 1);
        break;
      case Sg:
        u += U2(t, r, s, n, 0, 0), i += U2(t, r, s, eh, -1, 0, 1) + l;
        break;
      default:
        u += U2(t, r, s, n, 0, 0);
    }
    (u || i) && K_(e, s, u, i), (u = Math.round(s.bounds.x1 - a)) < 0 && (K_(e, r, -u, 0), K_(e, s, -u, 0));
  }
}
function U2(e, t, r, a, v, o, s) {
  const n = e.datum.type !== "symbol", l = r.datum.vgrad, u = n && (o || !l) && !s ? t.items[0] : t, i = u.bounds[v ? "y2" : "x2"] - e.padding, h = l && o ? i : 0, p = l && o ? 0 : i, _ = v <= 0 ? 0 : zP(r);
  return Math.round(a === WP ? h : a === eh ? p - _ : 0.5 * (i - _));
}
function K_(e, t, r, a) {
  t.x += r, t.y += a, t.bounds.translate(r, a), t.mark.bounds.translate(r, a), e.dirty(t);
}
function _we(e) {
  const t = e.reduce((r, a) => (r[a.column] = Math.max(a.bounds.x2 - a.x, r[a.column] || 0), r), {});
  e.forEach((r) => {
    r.width = t[r.column], r.height = r.bounds.y2 - r.y;
  });
}
function wwe(e, t, r, a, v) {
  var o = t.items[0], s = o.frame, n = o.orient, l = o.anchor, u = o.offset, i = o.padding, h = o.items[0].items[0], p = o.items[1] && o.items[1].items[0], _ = n === op || n === sp ? a : r, d = 0, f = 0, c = 0, g = 0, m = 0, x;
  if (s !== eT ? n === op ? (d = v.y2, _ = v.y1) : n === sp ? (d = v.y1, _ = v.y2) : (d = v.x1, _ = v.x2) : n === op && (d = a, _ = 0), x = l === WP ? d : l === eh ? _ : (d + _) / 2, p && p.text) {
    switch (n) {
      case qx:
      case Sg:
        m = h.bounds.height() + i;
        break;
      case op:
        g = h.bounds.width() + i;
        break;
      case sp:
        g = -h.bounds.width() - i;
        break;
    }
    Mf.clear().union(p.bounds), Mf.translate(g - (p.x || 0), m - (p.y || 0)), ax(p, "x", g) | ax(p, "y", m) && (e.dirty(p), p.bounds.clear().union(Mf), p.mark.bounds.clear().union(Mf), e.dirty(p)), Mf.clear().union(p.bounds);
  } else
    Mf.clear();
  switch (Mf.union(h.bounds), n) {
    case qx:
      f = x, c = v.y1 - Mf.height() - u;
      break;
    case op:
      f = v.x1 - Mf.width() - u, c = x;
      break;
    case sp:
      f = v.x2 + Mf.width() + u, c = x;
      break;
    case Sg:
      f = x, c = v.y2 + u;
      break;
    default:
      f = o.x, c = o.y;
  }
  return ax(o, "x", f) | ax(o, "y", c) && (Mf.translate(f, c), e.dirty(o), o.bounds.clear().union(Mf), t.bounds.clear().union(Mf), e.dirty(o)), o.bounds;
}
function WJ(e) {
  qr.call(this, null, e);
}
Si(WJ, qr, {
  transform(e, t) {
    const r = t.dataflow;
    return e.mark.items.forEach((a) => {
      e.layout && hwe(r, a, e.layout), Twe(r, a, e);
    }), kwe(e.mark.group) ? t.reflow() : t;
  }
});
function kwe(e) {
  return e && e.mark.role !== "legend-entry";
}
function Twe(e, t, r) {
  var a = t.items, v = Math.max(0, t.width || 0), o = Math.max(0, t.height || 0), s = new ic().set(0, 0, v, o), n = s.clone(), l = s.clone(), u = [], i, h, p, _, d, f;
  for (d = 0, f = a.length; d < f; ++d)
    switch (h = a[d], h.role) {
      case YP:
        _ = owe(h) ? n : l, _.union(lwe(e, h, v, o));
        break;
      case ZP:
        i = h;
        break;
      case XP:
        u.push(vwe(e, h));
        break;
      case K3e:
      case J3e:
      case LJ:
      case PJ:
      case OJ:
      case zJ:
      case RJ:
      case FJ:
        n.union(h.bounds), l.union(h.bounds);
        break;
      default:
        s.union(h.bounds);
    }
  if (u.length) {
    const c = {};
    u.forEach((g) => {
      p = g.orient || sp, p !== KP && (c[p] || (c[p] = [])).push(g);
    });
    for (const g in c) {
      const m = c[g];
      GJ(e, m, ywe(m, g, r.legends, n, l, v, o));
    }
    u.forEach((g) => {
      const m = g.bounds;
      if (m.equals(g._bounds) || (g.bounds = g._bounds, e.dirty(g), g.bounds = m, e.dirty(g)), r.autosize && (r.autosize.type === NJ || r.autosize.type === BJ || r.autosize.type === jJ))
        switch (g.orient) {
          case op:
          case sp:
            s.add(m.x1, 0).add(m.x2, 0);
            break;
          case qx:
          case Sg:
            s.add(0, m.y1).add(0, m.y2);
        }
      else
        s.union(m);
    });
  }
  s.union(n).union(l), i && s.union(wwe(e, i, v, o, s)), t.clip && s.set(0, 0, t.width || 0, t.height || 0), Awe(e, t, s, r);
}
function Awe(e, t, r, a) {
  const v = a.autosize || {}, o = v.type;
  if (e._autosize < 1 || !o) return;
  let s = e._width, n = e._height, l = Math.max(0, t.width || 0), u = Math.max(0, Math.ceil(-r.x1)), i = Math.max(0, t.height || 0), h = Math.max(0, Math.ceil(-r.y1));
  const p = Math.max(0, Math.ceil(r.x2 - l)), _ = Math.max(0, Math.ceil(r.y2 - i));
  if (v.contains === Q3e) {
    const d = e.padding();
    s -= d.left + d.right, n -= d.top + d.bottom;
  }
  o === KP ? (u = 0, h = 0, l = s, i = n) : o === NJ ? (l = Math.max(0, s - u - p), i = Math.max(0, n - h - _)) : o === BJ ? (l = Math.max(0, s - u - p), n = i + h + _) : o === jJ ? (s = l + u + p, i = Math.max(0, n - h - _)) : o === twe && (s = l + u + p, n = i + h + _), e._resizeView(s, n, l, i, [u, h], v.resize);
}
const Swe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  bound: UJ,
  identifier: QP,
  mark: VJ,
  overlap: $J,
  render: HJ,
  viewlayout: WJ
}, Symbol.toStringTag, { value: "Module" }));
function YJ(e) {
  qr.call(this, null, e);
}
Si(YJ, qr, {
  transform(e, t) {
    if (this.value && !e.modified())
      return t.StopPropagation;
    var r = t.dataflow.locale(), a = t.fork(t.NO_SOURCE | t.NO_FIELDS), v = this.value, o = e.scale, s = e.count == null ? e.values ? e.values.length : 10 : e.count, n = yP(o, s, e.minstep), l = e.format || _K(r, o, n, e.formatSpecifier, e.formatType, !!e.values), u = e.values ? bK(o, e.values, n) : vP(o, n);
    return v && (a.rem = v), v = u.map((i, h) => rs({
      index: h / (u.length - 1 || 1),
      value: i,
      label: l(i)
    })), e.extra && v.length && v.push(rs({
      index: -1,
      extra: {
        value: v[0].value
      },
      label: ""
    })), a.source = v, a.add = v, this.value = v, a;
  }
});
function ZJ(e) {
  qr.call(this, null, e);
}
function Mwe() {
  return rs({});
}
function Ewe(e) {
  const t = _b().test((r) => r.exit);
  return t.lookup = (r) => t.get(e(r)), t;
}
Si(ZJ, qr, {
  transform(e, t) {
    var r = t.dataflow, a = t.fork(t.NO_SOURCE | t.NO_FIELDS), v = e.item || Mwe, o = e.key || sa, s = this.value;
    return Qr(a.encode) && (a.encode = null), s && (e.modified("key") || t.modified(o)) && Jr("DataJoin does not support modified key function or fields."), s || (t = t.addAll(), this.value = s = Ewe(o)), t.visit(t.ADD, (n) => {
      const l = o(n);
      let u = s.get(l);
      u ? u.exit ? (s.empty--, a.add.push(u)) : a.mod.push(u) : (u = v(n), s.set(l, u), a.add.push(u)), u.datum = n, u.exit = !1;
    }), t.visit(t.MOD, (n) => {
      const l = o(n), u = s.get(l);
      u && (u.datum = n, a.mod.push(u));
    }), t.visit(t.REM, (n) => {
      const l = o(n), u = s.get(l);
      n === u.datum && !u.exit && (a.rem.push(u), u.exit = !0, ++s.empty);
    }), t.changed(t.ADD_MOD) && a.modifies("datum"), (t.clean() || e.clean && s.empty > r.cleanThreshold) && r.runAfter(s.clean), a;
  }
});
function XJ(e) {
  qr.call(this, null, e);
}
Si(XJ, qr, {
  transform(e, t) {
    var r = t.fork(t.ADD_REM), a = e.mod || !1, v = e.encoders, o = t.encode;
    if (Qr(o))
      if (r.changed() || o.every((h) => v[h]))
        o = o[0], r.encode = null;
      else
        return t.StopPropagation;
    var s = o === "enter", n = v.update || L1, l = v.enter || L1, u = v.exit || L1, i = (o && !s ? v[o] : n) || L1;
    if (t.changed(t.ADD) && (t.visit(t.ADD, (h) => {
      l(h, e), n(h, e);
    }), r.modifies(l.output), r.modifies(n.output), i !== L1 && i !== n && (t.visit(t.ADD, (h) => {
      i(h, e);
    }), r.modifies(i.output))), t.changed(t.REM) && u !== L1 && (t.visit(t.REM, (h) => {
      u(h, e);
    }), r.modifies(u.output)), s || i !== L1) {
      const h = t.MOD | (e.modified() ? t.REFLOW : 0);
      s ? (t.visit(h, (p) => {
        const _ = l(p, e) || a;
        (i(p, e) || _) && r.mod.push(p);
      }), r.mod.length && r.modifies(l.output)) : t.visit(h, (p) => {
        (i(p, e) || a) && r.mod.push(p);
      }), r.mod.length && r.modifies(i.output);
    }
    return r.changed() ? r : t.StopPropagation;
  }
});
function KJ(e) {
  qr.call(this, [], e);
}
Si(KJ, qr, {
  transform(e, t) {
    if (this.value != null && !e.modified())
      return t.StopPropagation;
    var r = t.dataflow.locale(), a = t.fork(t.NO_SOURCE | t.NO_FIELDS), v = this.value, o = e.type || m8, s = e.scale, n = +e.limit, l = yP(s, e.count == null ? 5 : e.count, e.minstep), u = !!e.values || o === m8, i = e.format || AK(r, s, l, o, e.formatSpecifier, e.formatType, u), h = e.values || TK(s, l), p, _, d, f, c;
    return v && (a.rem = v), o === m8 ? (n && h.length > n ? (t.dataflow.warn("Symbol legend count exceeds limit, filtering items."), v = h.slice(0, n - 1), c = !0) : v = h, qa(d = e.size) ? (!e.values && s(v[0]) === 0 && (v = v.slice(1)), f = v.reduce((g, m) => Math.max(g, d(m, e)), 0)) : d = Vf(f = d || 8), v = v.map((g, m) => rs({
      index: m,
      label: i(g, m, v),
      value: g,
      offset: f,
      size: d(g, e)
    })), c && (c = h[v.length], v.push(rs({
      index: v.length,
      label: `…${h.length - v.length} entries`,
      value: c,
      offset: f,
      size: d(c, e)
    })))) : o === tbe ? (p = s.domain(), _ = yK(s, p[0], mo(p)), h.length < 3 && !e.values && p[0] !== mo(p) && (h = [p[0], mo(p)]), v = h.map((g, m) => rs({
      index: m,
      label: i(g, m, h),
      value: g,
      perc: _(g)
    }))) : (d = h.length - 1, _ = hbe(s), v = h.map((g, m) => rs({
      index: m,
      label: i(g, m, h),
      value: g,
      perc: m ? _(g) : 0,
      perc2: m === d ? 1 : _(h[m + 1])
    }))), a.source = v, a.add = v, this.value = v, a;
  }
});
const Cwe = (e) => e.source.x, Iwe = (e) => e.source.y, Dwe = (e) => e.target.x, Lwe = (e) => e.target.y;
function eO(e) {
  qr.call(this, {}, e);
}
eO.Definition = {
  type: "LinkPath",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "sourceX",
    type: "field",
    default: "source.x"
  }, {
    name: "sourceY",
    type: "field",
    default: "source.y"
  }, {
    name: "targetX",
    type: "field",
    default: "target.x"
  }, {
    name: "targetY",
    type: "field",
    default: "target.y"
  }, {
    name: "orient",
    type: "enum",
    default: "vertical",
    values: ["horizontal", "vertical", "radial"]
  }, {
    name: "shape",
    type: "enum",
    default: "line",
    values: ["line", "arc", "curve", "diagonal", "orthogonal"]
  }, {
    name: "require",
    type: "signal"
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
Si(eO, qr, {
  transform(e, t) {
    var r = e.sourceX || Cwe, a = e.sourceY || Iwe, v = e.targetX || Dwe, o = e.targetY || Lwe, s = e.as || "path", n = e.orient || "vertical", l = e.shape || "line", u = Zj.get(l + "-" + n) || Zj.get(l);
    return u || Jr("LinkPath unsupported type: " + e.shape + (e.orient ? "-" + e.orient : "")), t.visit(t.SOURCE, (i) => {
      i[s] = u(r(i), a(i), v(i), o(i));
    }), t.reflow(e.modified()).modifies(s);
  }
});
const JJ = (e, t, r, a) => "M" + e + "," + t + "L" + r + "," + a, Pwe = (e, t, r, a) => JJ(t * Math.cos(e), t * Math.sin(e), a * Math.cos(r), a * Math.sin(r)), QJ = (e, t, r, a) => {
  var v = r - e, o = a - t, s = Math.hypot(v, o) / 2, n = 180 * Math.atan2(o, v) / Math.PI;
  return "M" + e + "," + t + "A" + s + "," + s + " " + n + " 0 1 " + r + "," + a;
}, Owe = (e, t, r, a) => QJ(t * Math.cos(e), t * Math.sin(e), a * Math.cos(r), a * Math.sin(r)), eQ = (e, t, r, a) => {
  const v = r - e, o = a - t, s = 0.2 * (v + o), n = 0.2 * (o - v);
  return "M" + e + "," + t + "C" + (e + s) + "," + (t + n) + " " + (r + n) + "," + (a - s) + " " + r + "," + a;
}, zwe = (e, t, r, a) => eQ(t * Math.cos(e), t * Math.sin(e), a * Math.cos(r), a * Math.sin(r)), Rwe = (e, t, r, a) => "M" + e + "," + t + "V" + a + "H" + r, Fwe = (e, t, r, a) => "M" + e + "," + t + "H" + r + "V" + a, Nwe = (e, t, r, a) => {
  const v = Math.cos(e), o = Math.sin(e), s = Math.cos(r), n = Math.sin(r), l = Math.abs(r - e) > Math.PI ? r <= e : r > e;
  return "M" + t * v + "," + t * o + "A" + t + "," + t + " 0 0," + (l ? 1 : 0) + " " + t * s + "," + t * n + "L" + a * s + "," + a * n;
}, Bwe = (e, t, r, a) => {
  const v = (e + r) / 2;
  return "M" + e + "," + t + "C" + v + "," + t + " " + v + "," + a + " " + r + "," + a;
}, jwe = (e, t, r, a) => {
  const v = (t + a) / 2;
  return "M" + e + "," + t + "C" + e + "," + v + " " + r + "," + v + " " + r + "," + a;
}, Uwe = (e, t, r, a) => {
  const v = Math.cos(e), o = Math.sin(e), s = Math.cos(r), n = Math.sin(r), l = (t + a) / 2;
  return "M" + t * v + "," + t * o + "C" + l * v + "," + l * o + " " + l * s + "," + l * n + " " + a * s + "," + a * n;
}, Zj = _b({
  line: JJ,
  "line-radial": Pwe,
  arc: QJ,
  "arc-radial": Owe,
  curve: eQ,
  "curve-radial": zwe,
  "orthogonal-horizontal": Rwe,
  "orthogonal-vertical": Fwe,
  "orthogonal-radial": Nwe,
  "diagonal-horizontal": Bwe,
  "diagonal-vertical": jwe,
  "diagonal-radial": Uwe
});
function tO(e) {
  qr.call(this, null, e);
}
tO.Definition = {
  type: "Pie",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "startAngle",
    type: "number",
    default: 0
  }, {
    name: "endAngle",
    type: "number",
    default: 6.283185307179586
  }, {
    name: "sort",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["startAngle", "endAngle"]
  }]
};
Si(tO, qr, {
  transform(e, t) {
    var r = e.as || ["startAngle", "endAngle"], a = r[0], v = r[1], o = e.field || vb, s = e.startAngle || 0, n = e.endAngle != null ? e.endAngle : 2 * Math.PI, l = t.source, u = l.map(o), i = u.length, h = s, p = (n - s) / pY(u), _ = Kh(i), d, f, c;
    for (e.sort && _.sort((g, m) => u[g] - u[m]), d = 0; d < i; ++d)
      c = u[_[d]], f = l[_[d]], f[a] = h, f[v] = h += c * p;
    return this.value = u, t.reflow(e.modified()).modifies(r);
  }
});
const Vwe = 5;
function $we(e) {
  const t = e.type;
  return !e.bins && (t === Nx || t === p4 || t === m4);
}
function tQ(e) {
  return pP(e) && e !== b0;
}
const qwe = vp(["set", "modified", "clear", "type", "scheme", "schemeExtent", "schemeCount", "domain", "domainMin", "domainMid", "domainMax", "domainRaw", "domainImplicit", "nice", "zero", "bins", "range", "rangeStep", "round", "reverse", "interpolate", "interpolateGamma"]);
function nQ(e) {
  qr.call(this, null, e), this.modified(!0);
}
Si(nQ, qr, {
  transform(e, t) {
    var r = t.dataflow, a = this.value, v = Hwe(e);
    (!a || v !== a.type) && (this.value = a = Go(v)());
    for (v in e) if (!qwe[v]) {
      if (v === "padding" && tQ(a.type)) continue;
      qa(a[v]) ? a[v](e[v]) : r.warn("Unsupported scale property: " + v);
    }
    return Kwe(a, e, Xwe(a, e, Wwe(a, e, r))), t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function Hwe(e) {
  var t = e.type, r = "", a;
  return t === b0 ? b0 + "-" + Nx : (Gwe(e) && (a = e.rawDomain ? e.rawDomain.length : e.domain ? e.domain.length + +(e.domainMid != null) : 0, r = a === 2 ? b0 + "-" : a === 3 ? Cb + "-" : ""), (r + t || Nx).toLowerCase());
}
function Gwe(e) {
  const t = e.type;
  return pP(t) && t !== _v && t !== wv && (e.scheme || e.range && e.range.length && e.range.every(Fi));
}
function Wwe(e, t, r) {
  const a = Ywe(e, t.domainRaw, r);
  if (a > -1) return a;
  var v = t.domain, o = e.type, s = t.zero || t.zero === void 0 && $we(e), n, l;
  if (!v) return 0;
  if ((s || t.domainMin != null || t.domainMax != null || t.domainMid != null) && (n = (v = v.slice()).length - 1 || 1, s && (v[0] > 0 && (v[0] = 0), v[n] < 0 && (v[n] = 0)), t.domainMin != null && (v[0] = t.domainMin), t.domainMax != null && (v[n] = t.domainMax), t.domainMid != null)) {
    l = t.domainMid;
    const u = l > v[n] ? n + 1 : l < v[0] ? 0 : n;
    u !== n && r.warn("Scale domainMid exceeds domain min or max.", l), v.splice(u, 0, l);
  }
  return tQ(o) && t.padding && v[0] !== mo(v) && (v = Zwe(o, v, t.range, t.padding, t.exponent, t.constant)), e.domain(rQ(o, v, r)), o === cP && e.unknown(t.domainImplicit ? HE : void 0), t.nice && e.nice && e.nice(t.nice !== !0 && yP(e, t.nice) || null), v.length;
}
function Ywe(e, t, r) {
  return t ? (e.domain(rQ(e.type, t, r)), t.length) : -1;
}
function Zwe(e, t, r, a, v, o) {
  var s = Math.abs(mo(r) - r[0]), n = s / (s - 2 * a), l = e === $m ? LD(t, null, n) : e === m4 ? i7(t, null, n, 0.5) : e === p4 ? i7(t, null, n, v || 1) : e === B9 ? PD(t, null, n, o || 1) : DD(t, null, n);
  return t = t.slice(), t[0] = l[0], t[t.length - 1] = l[1], t;
}
function rQ(e, t, r) {
  if (hK(e)) {
    var a = Math.abs(t.reduce((v, o) => v + (o < 0 ? -1 : o > 0 ? 1 : 0), 0));
    a !== t.length && r.warn("Log scale domain includes zero: " + vi(t));
  }
  return t;
}
function Xwe(e, t, r) {
  let a = t.bins;
  if (a && !Qr(a)) {
    const v = e.domain(), o = v[0], s = mo(v), n = a.step;
    let l = a.start == null ? o : a.start, u = a.stop == null ? s : a.stop;
    n || Jr("Scale bins parameter missing step property."), l < o && (l = n * Math.ceil(o / n)), u > s && (u = n * Math.floor(s / n)), a = Kh(l, u + n / 2, n);
  }
  return a ? e.bins = a : e.bins && delete e.bins, e.type === fP && (a ? !t.domain && !t.domainRaw && (e.domain(a), r = a.length) : e.bins = e.domain()), r;
}
function Kwe(e, t, r) {
  var a = e.type, v = t.round || !1, o = t.range;
  if (t.rangeStep != null)
    o = Jwe(a, t, r);
  else if (t.scheme && (o = Qwe(a, t, r), qa(o))) {
    if (e.interpolator)
      return e.interpolator(o);
    Jr(`Scale type ${a} does not support interpolating color schemes.`);
  }
  if (o && dK(a))
    return e.interpolator(V9(dC(o, t.reverse), t.interpolate, t.interpolateGamma));
  o && t.interpolate && e.interpolate ? e.interpolate(mP(t.interpolate, t.interpolateGamma)) : qa(e.round) ? e.round(v) : qa(e.rangeRound) && e.interpolate(v ? h4 : Bg), o && e.range(dC(o, t.reverse));
}
function Jwe(e, t, r) {
  e !== oK && e !== JE && Jr("Only band and point scales support rangeStep.");
  var a = (t.paddingOuter != null ? t.paddingOuter : t.padding) || 0, v = e === JE ? 1 : (t.paddingInner != null ? t.paddingInner : t.padding) || 0;
  return [0, t.rangeStep * uP(r, v, a)];
}
function Qwe(e, t, r) {
  var a = t.schemeExtent, v, o;
  return Qr(t.scheme) ? o = V9(t.scheme, t.interpolate, t.interpolateGamma) : (v = t.scheme.toLowerCase(), o = gP(v), o || Jr(`Unrecognized scheme name: ${t.scheme}`)), r = e === U9 ? r + 1 : e === fP ? r - 1 : e === Bx || e === j9 ? +t.schemeCount || Vwe : r, dK(e) ? Xj(o, a, t.reverse) : qa(o) ? gK(Xj(o, a), r) : e === cP ? o : o.slice(0, r);
}
function Xj(e, t, r) {
  return qa(e) && (t || r) ? mK(e, dC(t || [0, 1], r)) : e;
}
function dC(e, t) {
  return t ? e.slice().reverse() : e;
}
function iQ(e) {
  qr.call(this, null, e);
}
Si(iQ, qr, {
  transform(e, t) {
    const r = e.modified("sort") || t.changed(t.ADD) || t.modified(e.sort.fields) || t.modified("datum");
    return r && t.source.sort(qv(e.sort)), this.modified(r), t;
  }
});
const Kj = "zero", aQ = "center", oQ = "normalize", sQ = ["y0", "y1"];
function nO(e) {
  qr.call(this, null, e);
}
nO.Definition = {
  type: "Stack",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "offset",
    type: "enum",
    default: Kj,
    values: [Kj, aQ, oQ]
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: sQ
  }]
};
Si(nO, qr, {
  transform(e, t) {
    var r = e.as || sQ, a = r[0], v = r[1], o = qv(e.sort), s = e.field || vb, n = e.offset === aQ ? e4e : e.offset === oQ ? t4e : n4e, l, u, i, h;
    for (l = r4e(t.source, e.groupby, o, s), u = 0, i = l.length, h = l.max; u < i; ++u)
      n(l[u], h, s, a, v);
    return t.reflow(e.modified()).modifies(r);
  }
});
function e4e(e, t, r, a, v) {
  for (var o = (t - e.sum) / 2, s = e.length, n = 0, l; n < s; ++n)
    l = e[n], l[a] = o, l[v] = o += Math.abs(r(l));
}
function t4e(e, t, r, a, v) {
  for (var o = 1 / e.sum, s = 0, n = e.length, l = 0, u = 0, i; l < n; ++l)
    i = e[l], i[a] = s, i[v] = s = o * (u += Math.abs(r(i)));
}
function n4e(e, t, r, a, v) {
  for (var o = 0, s = 0, n = e.length, l = 0, u, i; l < n; ++l)
    i = e[l], u = +r(i), u < 0 ? (i[a] = s, i[v] = s += u) : (i[a] = o, i[v] = o += u);
}
function r4e(e, t, r, a) {
  var v = [], o = (f) => f(i), s, n, l, u, i, h, p, _, d;
  if (t == null)
    v.push(e.slice());
  else
    for (s = {}, n = 0, l = e.length; n < l; ++n)
      i = e[n], h = t.map(o), p = s[h], p || (s[h] = p = [], v.push(p)), p.push(i);
  for (h = 0, d = 0, u = v.length; h < u; ++h) {
    for (p = v[h], n = 0, _ = 0, l = p.length; n < l; ++n)
      _ += Math.abs(a(p[n]));
    p.sum = _, _ > d && (d = _), r && p.sort(r);
  }
  return v.max = d, v;
}
const i4e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  axisticks: YJ,
  datajoin: ZJ,
  encode: XJ,
  legendentries: KJ,
  linkpath: eO,
  pie: tO,
  scale: nQ,
  sortitems: iQ,
  stack: nO
}, Symbol.toStringTag, { value: "Module" }));
var fa = 1e-6, z7 = 1e-12, Qa = Math.PI, Cu = Qa / 2, R7 = Qa / 4, ch = Qa * 2, qu = 180 / Qa, Ya = Qa / 180, po = Math.abs, Db = Math.atan, zd = Math.atan2, ha = Math.cos, T6 = Math.ceil, lQ = Math.exp, pC = Math.hypot, F7 = Math.log, nM = Math.pow, la = Math.sin, Td = Math.sign || function(e) {
  return e > 0 ? 1 : e < 0 ? -1 : 0;
}, fh = Math.sqrt, rO = Math.tan;
function uQ(e) {
  return e > 1 ? 0 : e < -1 ? Qa : Math.acos(e);
}
function zh(e) {
  return e > 1 ? Cu : e < -1 ? -Cu : Math.asin(e);
}
function lf() {
}
function N7(e, t) {
  e && Qj.hasOwnProperty(e.type) && Qj[e.type](e, t);
}
var Jj = {
  Feature: function(e, t) {
    N7(e.geometry, t);
  },
  FeatureCollection: function(e, t) {
    for (var r = e.features, a = -1, v = r.length; ++a < v; ) N7(r[a].geometry, t);
  }
}, Qj = {
  Sphere: function(e, t) {
    t.sphere();
  },
  Point: function(e, t) {
    e = e.coordinates, t.point(e[0], e[1], e[2]);
  },
  MultiPoint: function(e, t) {
    for (var r = e.coordinates, a = -1, v = r.length; ++a < v; ) e = r[a], t.point(e[0], e[1], e[2]);
  },
  LineString: function(e, t) {
    mC(e.coordinates, t, 0);
  },
  MultiLineString: function(e, t) {
    for (var r = e.coordinates, a = -1, v = r.length; ++a < v; ) mC(r[a], t, 0);
  },
  Polygon: function(e, t) {
    eU(e.coordinates, t);
  },
  MultiPolygon: function(e, t) {
    for (var r = e.coordinates, a = -1, v = r.length; ++a < v; ) eU(r[a], t);
  },
  GeometryCollection: function(e, t) {
    for (var r = e.geometries, a = -1, v = r.length; ++a < v; ) N7(r[a], t);
  }
};
function mC(e, t, r) {
  var a = -1, v = e.length - r, o;
  for (t.lineStart(); ++a < v; ) o = e[a], t.point(o[0], o[1], o[2]);
  t.lineEnd();
}
function eU(e, t) {
  var r = -1, a = e.length;
  for (t.polygonStart(); ++r < a; ) mC(e[r], t, 1);
  t.polygonEnd();
}
function km(e, t) {
  e && Jj.hasOwnProperty(e.type) ? Jj[e.type](e, t) : N7(e, t);
}
var B7 = new lh(), j7 = new lh(), cQ, fQ, gC, yC, vC, D0 = {
  point: lf,
  lineStart: lf,
  lineEnd: lf,
  polygonStart: function() {
    B7 = new lh(), D0.lineStart = a4e, D0.lineEnd = o4e;
  },
  polygonEnd: function() {
    var e = +B7;
    j7.add(e < 0 ? ch + e : e), this.lineStart = this.lineEnd = this.point = lf;
  },
  sphere: function() {
    j7.add(ch);
  }
};
function a4e() {
  D0.point = s4e;
}
function o4e() {
  hQ(cQ, fQ);
}
function s4e(e, t) {
  D0.point = hQ, cQ = e, fQ = t, e *= Ya, t *= Ya, gC = e, yC = ha(t = t / 2 + R7), vC = la(t);
}
function hQ(e, t) {
  e *= Ya, t *= Ya, t = t / 2 + R7;
  var r = e - gC, a = r >= 0 ? 1 : -1, v = a * r, o = ha(t), s = la(t), n = vC * s, l = yC * o + n * ha(v), u = n * a * la(v);
  B7.add(zd(u, l)), gC = e, yC = o, vC = s;
}
function l4e(e) {
  return j7 = new lh(), km(e, D0), j7 * 2;
}
function U7(e) {
  return [zd(e[1], e[0]), zh(e[2])];
}
function Tv(e) {
  var t = e[0], r = e[1], a = ha(r);
  return [a * ha(t), a * la(t), la(r)];
}
function A6(e, t) {
  return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
}
function Hx(e, t) {
  return [e[1] * t[2] - e[2] * t[1], e[2] * t[0] - e[0] * t[2], e[0] * t[1] - e[1] * t[0]];
}
function rM(e, t) {
  e[0] += t[0], e[1] += t[1], e[2] += t[2];
}
function S6(e, t) {
  return [e[0] * t, e[1] * t, e[2] * t];
}
function V7(e) {
  var t = fh(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
  e[0] /= t, e[1] /= t, e[2] /= t;
}
var du, Mh, Mu, Yh, By, dQ, pQ, xx, W3, U1, qm, _m = {
  point: xC,
  lineStart: tU,
  lineEnd: nU,
  polygonStart: function() {
    _m.point = gQ, _m.lineStart = u4e, _m.lineEnd = c4e, W3 = new lh(), D0.polygonStart();
  },
  polygonEnd: function() {
    D0.polygonEnd(), _m.point = xC, _m.lineStart = tU, _m.lineEnd = nU, B7 < 0 ? (du = -(Mu = 180), Mh = -(Yh = 90)) : W3 > fa ? Yh = 90 : W3 < -fa && (Mh = -90), qm[0] = du, qm[1] = Mu;
  },
  sphere: function() {
    du = -(Mu = 180), Mh = -(Yh = 90);
  }
};
function xC(e, t) {
  U1.push(qm = [du = e, Mu = e]), t < Mh && (Mh = t), t > Yh && (Yh = t);
}
function mQ(e, t) {
  var r = Tv([e * Ya, t * Ya]);
  if (xx) {
    var a = Hx(xx, r), v = [a[1], -a[0], 0], o = Hx(v, a);
    V7(o), o = U7(o);
    var s = e - By, n = s > 0 ? 1 : -1, l = o[0] * qu * n, u, i = po(s) > 180;
    i ^ (n * By < l && l < n * e) ? (u = o[1] * qu, u > Yh && (Yh = u)) : (l = (l + 360) % 360 - 180, i ^ (n * By < l && l < n * e) ? (u = -o[1] * qu, u < Mh && (Mh = u)) : (t < Mh && (Mh = t), t > Yh && (Yh = t))), i ? e < By ? Wh(du, e) > Wh(du, Mu) && (Mu = e) : Wh(e, Mu) > Wh(du, Mu) && (du = e) : Mu >= du ? (e < du && (du = e), e > Mu && (Mu = e)) : e > By ? Wh(du, e) > Wh(du, Mu) && (Mu = e) : Wh(e, Mu) > Wh(du, Mu) && (du = e);
  } else
    U1.push(qm = [du = e, Mu = e]);
  t < Mh && (Mh = t), t > Yh && (Yh = t), xx = r, By = e;
}
function tU() {
  _m.point = mQ;
}
function nU() {
  qm[0] = du, qm[1] = Mu, _m.point = xC, xx = null;
}
function gQ(e, t) {
  if (xx) {
    var r = e - By;
    W3.add(po(r) > 180 ? r + (r > 0 ? 360 : -360) : r);
  } else
    dQ = e, pQ = t;
  D0.point(e, t), mQ(e, t);
}
function u4e() {
  D0.lineStart();
}
function c4e() {
  gQ(dQ, pQ), D0.lineEnd(), po(W3) > fa && (du = -(Mu = 180)), qm[0] = du, qm[1] = Mu, xx = null;
}
function Wh(e, t) {
  return (t -= e) < 0 ? t + 360 : t;
}
function f4e(e, t) {
  return e[0] - t[0];
}
function rU(e, t) {
  return e[0] <= e[1] ? e[0] <= t && t <= e[1] : t < e[0] || e[1] < t;
}
function h4e(e) {
  var t, r, a, v, o, s, n;
  if (Yh = Mu = -(du = Mh = 1 / 0), U1 = [], km(e, _m), r = U1.length) {
    for (U1.sort(f4e), t = 1, a = U1[0], o = [a]; t < r; ++t)
      v = U1[t], rU(a, v[0]) || rU(a, v[1]) ? (Wh(a[0], v[1]) > Wh(a[0], a[1]) && (a[1] = v[1]), Wh(v[0], a[1]) > Wh(a[0], a[1]) && (a[0] = v[0])) : o.push(a = v);
    for (s = -1 / 0, r = o.length - 1, t = 0, a = o[r]; t <= r; a = v, ++t)
      v = o[t], (n = Wh(a[1], v[0])) > s && (s = n, du = v[0], Mu = a[1]);
  }
  return U1 = qm = null, du === 1 / 0 || Mh === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[du, Mh], [Mu, Yh]];
}
var k3, $7, q7, H7, G7, W7, Y7, Z7, bC, _C, wC, yQ, vQ, nh, rh, ih, lp = {
  sphere: lf,
  point: iO,
  lineStart: iU,
  lineEnd: aU,
  polygonStart: function() {
    lp.lineStart = m4e, lp.lineEnd = g4e;
  },
  polygonEnd: function() {
    lp.lineStart = iU, lp.lineEnd = aU;
  }
};
function iO(e, t) {
  e *= Ya, t *= Ya;
  var r = ha(t);
  M4(r * ha(e), r * la(e), la(t));
}
function M4(e, t, r) {
  ++k3, q7 += (e - q7) / k3, H7 += (t - H7) / k3, G7 += (r - G7) / k3;
}
function iU() {
  lp.point = d4e;
}
function d4e(e, t) {
  e *= Ya, t *= Ya;
  var r = ha(t);
  nh = r * ha(e), rh = r * la(e), ih = la(t), lp.point = p4e, M4(nh, rh, ih);
}
function p4e(e, t) {
  e *= Ya, t *= Ya;
  var r = ha(t), a = r * ha(e), v = r * la(e), o = la(t), s = zd(fh((s = rh * o - ih * v) * s + (s = ih * a - nh * o) * s + (s = nh * v - rh * a) * s), nh * a + rh * v + ih * o);
  $7 += s, W7 += s * (nh + (nh = a)), Y7 += s * (rh + (rh = v)), Z7 += s * (ih + (ih = o)), M4(nh, rh, ih);
}
function aU() {
  lp.point = iO;
}
function m4e() {
  lp.point = y4e;
}
function g4e() {
  xQ(yQ, vQ), lp.point = iO;
}
function y4e(e, t) {
  yQ = e, vQ = t, e *= Ya, t *= Ya, lp.point = xQ;
  var r = ha(t);
  nh = r * ha(e), rh = r * la(e), ih = la(t), M4(nh, rh, ih);
}
function xQ(e, t) {
  e *= Ya, t *= Ya;
  var r = ha(t), a = r * ha(e), v = r * la(e), o = la(t), s = rh * o - ih * v, n = ih * a - nh * o, l = nh * v - rh * a, u = pC(s, n, l), i = zh(u), h = u && -i / u;
  bC.add(h * s), _C.add(h * n), wC.add(h * l), $7 += i, W7 += i * (nh + (nh = a)), Y7 += i * (rh + (rh = v)), Z7 += i * (ih + (ih = o)), M4(nh, rh, ih);
}
function v4e(e) {
  k3 = $7 = q7 = H7 = G7 = W7 = Y7 = Z7 = 0, bC = new lh(), _C = new lh(), wC = new lh(), km(e, lp);
  var t = +bC, r = +_C, a = +wC, v = pC(t, r, a);
  return v < z7 && (t = W7, r = Y7, a = Z7, $7 < fa && (t = q7, r = H7, a = G7), v = pC(t, r, a), v < z7) ? [NaN, NaN] : [zd(r, t) * qu, zh(a / v) * qu];
}
function kC(e, t) {
  function r(a, v) {
    return a = e(a, v), t(a[0], a[1]);
  }
  return e.invert && t.invert && (r.invert = function(a, v) {
    return a = t.invert(a, v), a && e.invert(a[0], a[1]);
  }), r;
}
function TC(e, t) {
  return po(e) > Qa && (e -= Math.round(e / ch) * ch), [e, t];
}
TC.invert = TC;
function bQ(e, t, r) {
  return (e %= ch) ? t || r ? kC(sU(e), lU(t, r)) : sU(e) : t || r ? lU(t, r) : TC;
}
function oU(e) {
  return function(t, r) {
    return t += e, po(t) > Qa && (t -= Math.round(t / ch) * ch), [t, r];
  };
}
function sU(e) {
  var t = oU(e);
  return t.invert = oU(-e), t;
}
function lU(e, t) {
  var r = ha(e), a = la(e), v = ha(t), o = la(t);
  function s(n, l) {
    var u = ha(l), i = ha(n) * u, h = la(n) * u, p = la(l), _ = p * r + i * a;
    return [
      zd(h * v - _ * o, i * r - p * a),
      zh(_ * v + h * o)
    ];
  }
  return s.invert = function(n, l) {
    var u = ha(l), i = ha(n) * u, h = la(n) * u, p = la(l), _ = p * v - h * o;
    return [
      zd(h * v + p * o, i * r + _ * a),
      zh(_ * r - i * a)
    ];
  }, s;
}
function x4e(e) {
  e = bQ(e[0] * Ya, e[1] * Ya, e.length > 2 ? e[2] * Ya : 0);
  function t(r) {
    return r = e(r[0] * Ya, r[1] * Ya), r[0] *= qu, r[1] *= qu, r;
  }
  return t.invert = function(r) {
    return r = e.invert(r[0] * Ya, r[1] * Ya), r[0] *= qu, r[1] *= qu, r;
  }, t;
}
function b4e(e, t, r, a, v, o) {
  if (r) {
    var s = ha(t), n = la(t), l = a * r;
    v == null ? (v = t + a * ch, o = t - l / 2) : (v = uU(s, v), o = uU(s, o), (a > 0 ? v < o : v > o) && (v += a * ch));
    for (var u, i = v; a > 0 ? i > o : i < o; i -= l)
      u = U7([s, -n * ha(i), -n * la(i)]), e.point(u[0], u[1]);
  }
}
function uU(e, t) {
  t = Tv(t), t[0] -= e, V7(t);
  var r = uQ(-t[1]);
  return ((-t[2] < 0 ? -r : r) + ch - fa) % ch;
}
function _Q() {
  var e = [], t;
  return {
    point: function(r, a, v) {
      t.push([r, a, v]);
    },
    lineStart: function() {
      e.push(t = []);
    },
    lineEnd: lf,
    rejoin: function() {
      e.length > 1 && e.push(e.pop().concat(e.shift()));
    },
    result: function() {
      var r = e;
      return e = [], t = null, r;
    }
  };
}
function T8(e, t) {
  return po(e[0] - t[0]) < fa && po(e[1] - t[1]) < fa;
}
function M6(e, t, r, a) {
  this.x = e, this.z = t, this.o = r, this.e = a, this.v = !1, this.n = this.p = null;
}
function wQ(e, t, r, a, v) {
  var o = [], s = [], n, l;
  if (e.forEach(function(d) {
    if (!((f = d.length - 1) <= 0)) {
      var f, c = d[0], g = d[f], m;
      if (T8(c, g)) {
        if (!c[2] && !g[2]) {
          for (v.lineStart(), n = 0; n < f; ++n) v.point((c = d[n])[0], c[1]);
          v.lineEnd();
          return;
        }
        g[0] += 2 * fa;
      }
      o.push(m = new M6(c, d, null, !0)), s.push(m.o = new M6(c, null, m, !1)), o.push(m = new M6(g, d, null, !1)), s.push(m.o = new M6(g, null, m, !0));
    }
  }), !!o.length) {
    for (s.sort(t), cU(o), cU(s), n = 0, l = s.length; n < l; ++n)
      s[n].e = r = !r;
    for (var u = o[0], i, h; ; ) {
      for (var p = u, _ = !0; p.v; ) if ((p = p.n) === u) return;
      i = p.z, v.lineStart();
      do {
        if (p.v = p.o.v = !0, p.e) {
          if (_)
            for (n = 0, l = i.length; n < l; ++n) v.point((h = i[n])[0], h[1]);
          else
            a(p.x, p.n.x, 1, v);
          p = p.n;
        } else {
          if (_)
            for (i = p.p.z, n = i.length - 1; n >= 0; --n) v.point((h = i[n])[0], h[1]);
          else
            a(p.x, p.p.x, -1, v);
          p = p.p;
        }
        p = p.o, i = p.z, _ = !_;
      } while (!p.v);
      v.lineEnd();
    }
  }
}
function cU(e) {
  if (t = e.length) {
    for (var t, r = 0, a = e[0], v; ++r < t; )
      a.n = v = e[r], v.p = a, a = v;
    a.n = v = e[0], v.p = a;
  }
}
function iM(e) {
  return po(e[0]) <= Qa ? e[0] : Td(e[0]) * ((po(e[0]) + Qa) % ch - Qa);
}
function _4e(e, t) {
  var r = iM(t), a = t[1], v = la(a), o = [la(r), -ha(r), 0], s = 0, n = 0, l = new lh();
  v === 1 ? a = Cu + fa : v === -1 && (a = -Cu - fa);
  for (var u = 0, i = e.length; u < i; ++u)
    if (p = (h = e[u]).length)
      for (var h, p, _ = h[p - 1], d = iM(_), f = _[1] / 2 + R7, c = la(f), g = ha(f), m = 0; m < p; ++m, d = w, c = S, g = A, _ = x) {
        var x = h[m], w = iM(x), k = x[1] / 2 + R7, S = la(k), A = ha(k), C = w - d, D = C >= 0 ? 1 : -1, L = D * C, E = L > Qa, P = c * S;
        if (l.add(zd(P * D * la(L), g * A + P * ha(L))), s += E ? C + D * ch : C, E ^ d >= r ^ w >= r) {
          var I = Hx(Tv(_), Tv(x));
          V7(I);
          var M = Hx(o, I);
          V7(M);
          var O = (E ^ C >= 0 ? -1 : 1) * zh(M[2]);
          (a > O || a === O && (I[0] || I[1])) && (n += E ^ C >= 0 ? 1 : -1);
        }
      }
  return (s < -fa || s < fa && l < -z7) ^ n & 1;
}
function kQ(e, t, r, a) {
  return function(v) {
    var o = t(v), s = _Q(), n = t(s), l = !1, u, i, h, p = {
      point: _,
      lineStart: f,
      lineEnd: c,
      polygonStart: function() {
        p.point = g, p.lineStart = m, p.lineEnd = x, i = [], u = [];
      },
      polygonEnd: function() {
        p.point = _, p.lineStart = f, p.lineEnd = c, i = dY(i);
        var w = _4e(u, a);
        i.length ? (l || (v.polygonStart(), l = !0), wQ(i, k4e, w, r, v)) : w && (l || (v.polygonStart(), l = !0), v.lineStart(), r(null, null, 1, v), v.lineEnd()), l && (v.polygonEnd(), l = !1), i = u = null;
      },
      sphere: function() {
        v.polygonStart(), v.lineStart(), r(null, null, 1, v), v.lineEnd(), v.polygonEnd();
      }
    };
    function _(w, k) {
      e(w, k) && v.point(w, k);
    }
    function d(w, k) {
      o.point(w, k);
    }
    function f() {
      p.point = d, o.lineStart();
    }
    function c() {
      p.point = _, o.lineEnd();
    }
    function g(w, k) {
      h.push([w, k]), n.point(w, k);
    }
    function m() {
      n.lineStart(), h = [];
    }
    function x() {
      g(h[0][0], h[0][1]), n.lineEnd();
      var w = n.clean(), k = s.result(), S, A = k.length, C, D, L;
      if (h.pop(), u.push(h), h = null, !!A) {
        if (w & 1) {
          if (D = k[0], (C = D.length - 1) > 0) {
            for (l || (v.polygonStart(), l = !0), v.lineStart(), S = 0; S < C; ++S) v.point((L = D[S])[0], L[1]);
            v.lineEnd();
          }
          return;
        }
        A > 1 && w & 2 && k.push(k.pop().concat(k.shift())), i.push(k.filter(w4e));
      }
    }
    return p;
  };
}
function w4e(e) {
  return e.length > 1;
}
function k4e(e, t) {
  return ((e = e.x)[0] < 0 ? e[1] - Cu - fa : Cu - e[1]) - ((t = t.x)[0] < 0 ? t[1] - Cu - fa : Cu - t[1]);
}
const fU = kQ(
  function() {
    return !0;
  },
  T4e,
  S4e,
  [-Qa, -Cu]
);
function T4e(e) {
  var t = NaN, r = NaN, a = NaN, v;
  return {
    lineStart: function() {
      e.lineStart(), v = 1;
    },
    point: function(o, s) {
      var n = o > 0 ? Qa : -Qa, l = po(o - t);
      po(l - Qa) < fa ? (e.point(t, r = (r + s) / 2 > 0 ? Cu : -Cu), e.point(a, r), e.lineEnd(), e.lineStart(), e.point(n, r), e.point(o, r), v = 0) : a !== n && l >= Qa && (po(t - a) < fa && (t -= a * fa), po(o - n) < fa && (o -= n * fa), r = A4e(t, r, o, s), e.point(a, r), e.lineEnd(), e.lineStart(), e.point(n, r), v = 0), e.point(t = o, r = s), a = n;
    },
    lineEnd: function() {
      e.lineEnd(), t = r = NaN;
    },
    clean: function() {
      return 2 - v;
    }
  };
}
function A4e(e, t, r, a) {
  var v, o, s = la(e - r);
  return po(s) > fa ? Db((la(t) * (o = ha(a)) * la(r) - la(a) * (v = ha(t)) * la(e)) / (v * o * s)) : (t + a) / 2;
}
function S4e(e, t, r, a) {
  var v;
  if (e == null)
    v = r * Cu, a.point(-Qa, v), a.point(0, v), a.point(Qa, v), a.point(Qa, 0), a.point(Qa, -v), a.point(0, -v), a.point(-Qa, -v), a.point(-Qa, 0), a.point(-Qa, v);
  else if (po(e[0] - t[0]) > fa) {
    var o = e[0] < t[0] ? Qa : -Qa;
    v = r * o / 2, a.point(-o, v), a.point(0, v), a.point(o, v);
  } else
    a.point(t[0], t[1]);
}
function M4e(e) {
  var t = ha(e), r = 2 * Ya, a = t > 0, v = po(t) > fa;
  function o(i, h, p, _) {
    b4e(_, e, r, p, i, h);
  }
  function s(i, h) {
    return ha(i) * ha(h) > t;
  }
  function n(i) {
    var h, p, _, d, f;
    return {
      lineStart: function() {
        d = _ = !1, f = 1;
      },
      point: function(c, g) {
        var m = [c, g], x, w = s(c, g), k = a ? w ? 0 : u(c, g) : w ? u(c + (c < 0 ? Qa : -Qa), g) : 0;
        if (!h && (d = _ = w) && i.lineStart(), w !== _ && (x = l(h, m), (!x || T8(h, x) || T8(m, x)) && (m[2] = 1)), w !== _)
          f = 0, w ? (i.lineStart(), x = l(m, h), i.point(x[0], x[1])) : (x = l(h, m), i.point(x[0], x[1], 2), i.lineEnd()), h = x;
        else if (v && h && a ^ w) {
          var S;
          !(k & p) && (S = l(m, h, !0)) && (f = 0, a ? (i.lineStart(), i.point(S[0][0], S[0][1]), i.point(S[1][0], S[1][1]), i.lineEnd()) : (i.point(S[1][0], S[1][1]), i.lineEnd(), i.lineStart(), i.point(S[0][0], S[0][1], 3)));
        }
        w && (!h || !T8(h, m)) && i.point(m[0], m[1]), h = m, _ = w, p = k;
      },
      lineEnd: function() {
        _ && i.lineEnd(), h = null;
      },
      // Rejoin first and last segments if there were intersections and the first
      // and last points were visible.
      clean: function() {
        return f | (d && _) << 1;
      }
    };
  }
  function l(i, h, p) {
    var _ = Tv(i), d = Tv(h), f = [1, 0, 0], c = Hx(_, d), g = A6(c, c), m = c[0], x = g - m * m;
    if (!x) return !p && i;
    var w = t * g / x, k = -t * m / x, S = Hx(f, c), A = S6(f, w), C = S6(c, k);
    rM(A, C);
    var D = S, L = A6(A, D), E = A6(D, D), P = L * L - E * (A6(A, A) - 1);
    if (!(P < 0)) {
      var I = fh(P), M = S6(D, (-L - I) / E);
      if (rM(M, A), M = U7(M), !p) return M;
      var O = i[0], T = h[0], z = i[1], F = h[1], U;
      T < O && (U = O, O = T, T = U);
      var V = T - O, $ = po(V - Qa) < fa, q = $ || V < fa;
      if (!$ && F < z && (U = z, z = F, F = U), q ? $ ? z + F > 0 ^ M[1] < (po(M[0] - O) < fa ? z : F) : z <= M[1] && M[1] <= F : V > Qa ^ (O <= M[0] && M[0] <= T)) {
        var K = S6(D, (-L + I) / E);
        return rM(K, A), [M, U7(K)];
      }
    }
  }
  function u(i, h) {
    var p = a ? e : Qa - e, _ = 0;
    return i < -p ? _ |= 1 : i > p && (_ |= 2), h < -p ? _ |= 4 : h > p && (_ |= 8), _;
  }
  return kQ(s, n, o, a ? [0, -e] : [-Qa, e - Qa]);
}
function E4e(e, t, r, a, v, o) {
  var s = e[0], n = e[1], l = t[0], u = t[1], i = 0, h = 1, p = l - s, _ = u - n, d;
  if (d = r - s, !(!p && d > 0)) {
    if (d /= p, p < 0) {
      if (d < i) return;
      d < h && (h = d);
    } else if (p > 0) {
      if (d > h) return;
      d > i && (i = d);
    }
    if (d = v - s, !(!p && d < 0)) {
      if (d /= p, p < 0) {
        if (d > h) return;
        d > i && (i = d);
      } else if (p > 0) {
        if (d < i) return;
        d < h && (h = d);
      }
      if (d = a - n, !(!_ && d > 0)) {
        if (d /= _, _ < 0) {
          if (d < i) return;
          d < h && (h = d);
        } else if (_ > 0) {
          if (d > h) return;
          d > i && (i = d);
        }
        if (d = o - n, !(!_ && d < 0)) {
          if (d /= _, _ < 0) {
            if (d > h) return;
            d > i && (i = d);
          } else if (_ > 0) {
            if (d < i) return;
            d < h && (h = d);
          }
          return i > 0 && (e[0] = s + i * p, e[1] = n + i * _), h < 1 && (t[0] = s + h * p, t[1] = n + h * _), !0;
        }
      }
    }
  }
}
var T3 = 1e9, E6 = -T3;
function TQ(e, t, r, a) {
  function v(u, i) {
    return e <= u && u <= r && t <= i && i <= a;
  }
  function o(u, i, h, p) {
    var _ = 0, d = 0;
    if (u == null || (_ = s(u, h)) !== (d = s(i, h)) || l(u, i) < 0 ^ h > 0)
      do
        p.point(_ === 0 || _ === 3 ? e : r, _ > 1 ? a : t);
      while ((_ = (_ + h + 4) % 4) !== d);
    else
      p.point(i[0], i[1]);
  }
  function s(u, i) {
    return po(u[0] - e) < fa ? i > 0 ? 0 : 3 : po(u[0] - r) < fa ? i > 0 ? 2 : 1 : po(u[1] - t) < fa ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2;
  }
  function n(u, i) {
    return l(u.x, i.x);
  }
  function l(u, i) {
    var h = s(u, 1), p = s(i, 1);
    return h !== p ? h - p : h === 0 ? i[1] - u[1] : h === 1 ? u[0] - i[0] : h === 2 ? u[1] - i[1] : i[0] - u[0];
  }
  return function(u) {
    var i = u, h = _Q(), p, _, d, f, c, g, m, x, w, k, S, A = {
      point: C,
      lineStart: P,
      lineEnd: I,
      polygonStart: L,
      polygonEnd: E
    };
    function C(O, T) {
      v(O, T) && i.point(O, T);
    }
    function D() {
      for (var O = 0, T = 0, z = _.length; T < z; ++T)
        for (var F = _[T], U = 1, V = F.length, $ = F[0], q, K, re = $[0], Y = $[1]; U < V; ++U)
          q = re, K = Y, $ = F[U], re = $[0], Y = $[1], K <= a ? Y > a && (re - q) * (a - K) > (Y - K) * (e - q) && ++O : Y <= a && (re - q) * (a - K) < (Y - K) * (e - q) && --O;
      return O;
    }
    function L() {
      i = h, p = [], _ = [], S = !0;
    }
    function E() {
      var O = D(), T = S && O, z = (p = dY(p)).length;
      (T || z) && (u.polygonStart(), T && (u.lineStart(), o(null, null, 1, u), u.lineEnd()), z && wQ(p, n, O, o, u), u.polygonEnd()), i = u, p = _ = d = null;
    }
    function P() {
      A.point = M, _ && _.push(d = []), k = !0, w = !1, m = x = NaN;
    }
    function I() {
      p && (M(f, c), g && w && h.rejoin(), p.push(h.result())), A.point = C, w && i.lineEnd();
    }
    function M(O, T) {
      var z = v(O, T);
      if (_ && d.push([O, T]), k)
        f = O, c = T, g = z, k = !1, z && (i.lineStart(), i.point(O, T));
      else if (z && w) i.point(O, T);
      else {
        var F = [m = Math.max(E6, Math.min(T3, m)), x = Math.max(E6, Math.min(T3, x))], U = [O = Math.max(E6, Math.min(T3, O)), T = Math.max(E6, Math.min(T3, T))];
        E4e(F, U, e, t, r, a) ? (w || (i.lineStart(), i.point(F[0], F[1])), i.point(U[0], U[1]), z || i.lineEnd(), S = !1) : z && (i.lineStart(), i.point(O, T), S = !1);
      }
      m = O, x = T, w = z;
    }
    return A;
  };
}
function hU(e, t, r) {
  var a = Kh(e, t - fa, r).concat(t);
  return function(v) {
    return a.map(function(o) {
      return [v, o];
    });
  };
}
function dU(e, t, r) {
  var a = Kh(e, t - fa, r).concat(t);
  return function(v) {
    return a.map(function(o) {
      return [o, v];
    });
  };
}
function C4e() {
  var e, t, r, a, v, o, s, n, l = 10, u = l, i = 90, h = 360, p, _, d, f, c = 2.5;
  function g() {
    return { type: "MultiLineString", coordinates: m() };
  }
  function m() {
    return Kh(T6(a / i) * i, r, i).map(d).concat(Kh(T6(n / h) * h, s, h).map(f)).concat(Kh(T6(t / l) * l, e, l).filter(function(x) {
      return po(x % i) > fa;
    }).map(p)).concat(Kh(T6(o / u) * u, v, u).filter(function(x) {
      return po(x % h) > fa;
    }).map(_));
  }
  return g.lines = function() {
    return m().map(function(x) {
      return { type: "LineString", coordinates: x };
    });
  }, g.outline = function() {
    return {
      type: "Polygon",
      coordinates: [
        d(a).concat(
          f(s).slice(1),
          d(r).reverse().slice(1),
          f(n).reverse().slice(1)
        )
      ]
    };
  }, g.extent = function(x) {
    return arguments.length ? g.extentMajor(x).extentMinor(x) : g.extentMinor();
  }, g.extentMajor = function(x) {
    return arguments.length ? (a = +x[0][0], r = +x[1][0], n = +x[0][1], s = +x[1][1], a > r && (x = a, a = r, r = x), n > s && (x = n, n = s, s = x), g.precision(c)) : [[a, n], [r, s]];
  }, g.extentMinor = function(x) {
    return arguments.length ? (t = +x[0][0], e = +x[1][0], o = +x[0][1], v = +x[1][1], t > e && (x = t, t = e, e = x), o > v && (x = o, o = v, v = x), g.precision(c)) : [[t, o], [e, v]];
  }, g.step = function(x) {
    return arguments.length ? g.stepMajor(x).stepMinor(x) : g.stepMinor();
  }, g.stepMajor = function(x) {
    return arguments.length ? (i = +x[0], h = +x[1], g) : [i, h];
  }, g.stepMinor = function(x) {
    return arguments.length ? (l = +x[0], u = +x[1], g) : [l, u];
  }, g.precision = function(x) {
    return arguments.length ? (c = +x, p = hU(o, v, 90), _ = dU(t, e, c), d = hU(n, s, 90), f = dU(a, r, c), g) : c;
  }, g.extentMajor([[-180, -90 + fa], [180, 90 - fa]]).extentMinor([[-180, -80 - fa], [180, 80 + fa]]);
}
const Iw = (e) => e;
var aM = new lh(), AC = new lh(), AQ, SQ, SC, MC, Tm = {
  point: lf,
  lineStart: lf,
  lineEnd: lf,
  polygonStart: function() {
    Tm.lineStart = I4e, Tm.lineEnd = L4e;
  },
  polygonEnd: function() {
    Tm.lineStart = Tm.lineEnd = Tm.point = lf, aM.add(po(AC)), AC = new lh();
  },
  result: function() {
    var e = aM / 2;
    return aM = new lh(), e;
  }
};
function I4e() {
  Tm.point = D4e;
}
function D4e(e, t) {
  Tm.point = MQ, AQ = SC = e, SQ = MC = t;
}
function MQ(e, t) {
  AC.add(MC * e - SC * t), SC = e, MC = t;
}
function L4e() {
  MQ(AQ, SQ);
}
var Gx = 1 / 0, X7 = Gx, Dw = -Gx, K7 = Dw, J7 = {
  point: P4e,
  lineStart: lf,
  lineEnd: lf,
  polygonStart: lf,
  polygonEnd: lf,
  result: function() {
    var e = [[Gx, X7], [Dw, K7]];
    return Dw = K7 = -(X7 = Gx = 1 / 0), e;
  }
};
function P4e(e, t) {
  e < Gx && (Gx = e), e > Dw && (Dw = e), t < X7 && (X7 = t), t > K7 && (K7 = t);
}
var EC = 0, CC = 0, A3 = 0, Q7 = 0, ek = 0, ox = 0, IC = 0, DC = 0, S3 = 0, EQ, CQ, l0, u0, wd = {
  point: Av,
  lineStart: pU,
  lineEnd: mU,
  polygonStart: function() {
    wd.lineStart = R4e, wd.lineEnd = F4e;
  },
  polygonEnd: function() {
    wd.point = Av, wd.lineStart = pU, wd.lineEnd = mU;
  },
  result: function() {
    var e = S3 ? [IC / S3, DC / S3] : ox ? [Q7 / ox, ek / ox] : A3 ? [EC / A3, CC / A3] : [NaN, NaN];
    return EC = CC = A3 = Q7 = ek = ox = IC = DC = S3 = 0, e;
  }
};
function Av(e, t) {
  EC += e, CC += t, ++A3;
}
function pU() {
  wd.point = O4e;
}
function O4e(e, t) {
  wd.point = z4e, Av(l0 = e, u0 = t);
}
function z4e(e, t) {
  var r = e - l0, a = t - u0, v = fh(r * r + a * a);
  Q7 += v * (l0 + e) / 2, ek += v * (u0 + t) / 2, ox += v, Av(l0 = e, u0 = t);
}
function mU() {
  wd.point = Av;
}
function R4e() {
  wd.point = N4e;
}
function F4e() {
  IQ(EQ, CQ);
}
function N4e(e, t) {
  wd.point = IQ, Av(EQ = l0 = e, CQ = u0 = t);
}
function IQ(e, t) {
  var r = e - l0, a = t - u0, v = fh(r * r + a * a);
  Q7 += v * (l0 + e) / 2, ek += v * (u0 + t) / 2, ox += v, v = u0 * e - l0 * t, IC += v * (l0 + e), DC += v * (u0 + t), S3 += v * 3, Av(l0 = e, u0 = t);
}
function DQ(e) {
  this._context = e;
}
DQ.prototype = {
  _radius: 4.5,
  pointRadius: function(e) {
    return this._radius = e, this;
  },
  polygonStart: function() {
    this._line = 0;
  },
  polygonEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    this._line === 0 && this._context.closePath(), this._point = NaN;
  },
  point: function(e, t) {
    switch (this._point) {
      case 0: {
        this._context.moveTo(e, t), this._point = 1;
        break;
      }
      case 1: {
        this._context.lineTo(e, t);
        break;
      }
      default: {
        this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0, ch);
        break;
      }
    }
  },
  result: lf
};
var LC = new lh(), oM, LQ, PQ, M3, E3, Lw = {
  point: lf,
  lineStart: function() {
    Lw.point = B4e;
  },
  lineEnd: function() {
    oM && OQ(LQ, PQ), Lw.point = lf;
  },
  polygonStart: function() {
    oM = !0;
  },
  polygonEnd: function() {
    oM = null;
  },
  result: function() {
    var e = +LC;
    return LC = new lh(), e;
  }
};
function B4e(e, t) {
  Lw.point = OQ, LQ = M3 = e, PQ = E3 = t;
}
function OQ(e, t) {
  M3 -= e, E3 -= t, LC.add(fh(M3 * M3 + E3 * E3)), M3 = e, E3 = t;
}
let gU, tk, yU, vU;
class xU {
  constructor(t) {
    this._append = t == null ? zQ : j4e(t), this._radius = 4.5, this._ = "";
  }
  pointRadius(t) {
    return this._radius = +t, this;
  }
  polygonStart() {
    this._line = 0;
  }
  polygonEnd() {
    this._line = NaN;
  }
  lineStart() {
    this._point = 0;
  }
  lineEnd() {
    this._line === 0 && (this._ += "Z"), this._point = NaN;
  }
  point(t, r) {
    switch (this._point) {
      case 0: {
        this._append`M${t},${r}`, this._point = 1;
        break;
      }
      case 1: {
        this._append`L${t},${r}`;
        break;
      }
      default: {
        if (this._append`M${t},${r}`, this._radius !== yU || this._append !== tk) {
          const a = this._radius, v = this._;
          this._ = "", this._append`m0,${a}a${a},${a} 0 1,1 0,${-2 * a}a${a},${a} 0 1,1 0,${2 * a}z`, yU = a, tk = this._append, vU = this._, this._ = v;
        }
        this._ += vU;
        break;
      }
    }
  }
  result() {
    const t = this._;
    return this._ = "", t.length ? t : null;
  }
}
function zQ(e) {
  let t = 1;
  this._ += e[0];
  for (const r = e.length; t < r; ++t)
    this._ += arguments[t] + e[t];
}
function j4e(e) {
  const t = Math.floor(e);
  if (!(t >= 0)) throw new RangeError(`invalid digits: ${e}`);
  if (t > 15) return zQ;
  if (t !== gU) {
    const r = 10 ** t;
    gU = t, tk = function(v) {
      let o = 1;
      this._ += v[0];
      for (const s = v.length; o < s; ++o)
        this._ += Math.round(arguments[o] * r) / r + v[o];
    };
  }
  return tk;
}
function RQ(e, t) {
  let r = 3, a = 4.5, v, o;
  function s(n) {
    return n && (typeof a == "function" && o.pointRadius(+a.apply(this, arguments)), km(n, v(o))), o.result();
  }
  return s.area = function(n) {
    return km(n, v(Tm)), Tm.result();
  }, s.measure = function(n) {
    return km(n, v(Lw)), Lw.result();
  }, s.bounds = function(n) {
    return km(n, v(J7)), J7.result();
  }, s.centroid = function(n) {
    return km(n, v(wd)), wd.result();
  }, s.projection = function(n) {
    return arguments.length ? (v = n == null ? (e = null, Iw) : (e = n).stream, s) : e;
  }, s.context = function(n) {
    return arguments.length ? (o = n == null ? (t = null, new xU(r)) : new DQ(t = n), typeof a != "function" && o.pointRadius(a), s) : t;
  }, s.pointRadius = function(n) {
    return arguments.length ? (a = typeof n == "function" ? n : (o.pointRadius(+n), +n), s) : a;
  }, s.digits = function(n) {
    if (!arguments.length) return r;
    if (n == null) r = null;
    else {
      const l = Math.floor(n);
      if (!(l >= 0)) throw new RangeError(`invalid digits: ${n}`);
      r = l;
    }
    return t === null && (o = new xU(r)), s;
  }, s.projection(e).digits(r).context(t);
}
function tT(e) {
  return function(t) {
    var r = new PC();
    for (var a in e) r[a] = e[a];
    return r.stream = t, r;
  };
}
function PC() {
}
PC.prototype = {
  constructor: PC,
  point: function(e, t) {
    this.stream.point(e, t);
  },
  sphere: function() {
    this.stream.sphere();
  },
  lineStart: function() {
    this.stream.lineStart();
  },
  lineEnd: function() {
    this.stream.lineEnd();
  },
  polygonStart: function() {
    this.stream.polygonStart();
  },
  polygonEnd: function() {
    this.stream.polygonEnd();
  }
};
function aO(e, t, r) {
  var a = e.clipExtent && e.clipExtent();
  return e.scale(150).translate([0, 0]), a != null && e.clipExtent(null), km(r, e.stream(J7)), t(J7.result()), a != null && e.clipExtent(a), e;
}
function nT(e, t, r) {
  return aO(e, function(a) {
    var v = t[1][0] - t[0][0], o = t[1][1] - t[0][1], s = Math.min(v / (a[1][0] - a[0][0]), o / (a[1][1] - a[0][1])), n = +t[0][0] + (v - s * (a[1][0] + a[0][0])) / 2, l = +t[0][1] + (o - s * (a[1][1] + a[0][1])) / 2;
    e.scale(150 * s).translate([n, l]);
  }, r);
}
function oO(e, t, r) {
  return nT(e, [[0, 0], t], r);
}
function sO(e, t, r) {
  return aO(e, function(a) {
    var v = +t, o = v / (a[1][0] - a[0][0]), s = (v - o * (a[1][0] + a[0][0])) / 2, n = -o * a[0][1];
    e.scale(150 * o).translate([s, n]);
  }, r);
}
function lO(e, t, r) {
  return aO(e, function(a) {
    var v = +t, o = v / (a[1][1] - a[0][1]), s = -o * a[0][0], n = (v - o * (a[1][1] + a[0][1])) / 2;
    e.scale(150 * o).translate([s, n]);
  }, r);
}
var bU = 16, U4e = ha(30 * Ya);
function _U(e, t) {
  return +t ? $4e(e, t) : V4e(e);
}
function V4e(e) {
  return tT({
    point: function(t, r) {
      t = e(t, r), this.stream.point(t[0], t[1]);
    }
  });
}
function $4e(e, t) {
  function r(a, v, o, s, n, l, u, i, h, p, _, d, f, c) {
    var g = u - a, m = i - v, x = g * g + m * m;
    if (x > 4 * t && f--) {
      var w = s + p, k = n + _, S = l + d, A = fh(w * w + k * k + S * S), C = zh(S /= A), D = po(po(S) - 1) < fa || po(o - h) < fa ? (o + h) / 2 : zd(k, w), L = e(D, C), E = L[0], P = L[1], I = E - a, M = P - v, O = m * I - g * M;
      (O * O / x > t || po((g * I + m * M) / x - 0.5) > 0.3 || s * p + n * _ + l * d < U4e) && (r(a, v, o, s, n, l, E, P, D, w /= A, k /= A, S, f, c), c.point(E, P), r(E, P, D, w, k, S, u, i, h, p, _, d, f, c));
    }
  }
  return function(a) {
    var v, o, s, n, l, u, i, h, p, _, d, f, c = {
      point: g,
      lineStart: m,
      lineEnd: w,
      polygonStart: function() {
        a.polygonStart(), c.lineStart = k;
      },
      polygonEnd: function() {
        a.polygonEnd(), c.lineStart = m;
      }
    };
    function g(C, D) {
      C = e(C, D), a.point(C[0], C[1]);
    }
    function m() {
      h = NaN, c.point = x, a.lineStart();
    }
    function x(C, D) {
      var L = Tv([C, D]), E = e(C, D);
      r(h, p, i, _, d, f, h = E[0], p = E[1], i = C, _ = L[0], d = L[1], f = L[2], bU, a), a.point(h, p);
    }
    function w() {
      c.point = g, a.lineEnd();
    }
    function k() {
      m(), c.point = S, c.lineEnd = A;
    }
    function S(C, D) {
      x(v = C, D), o = h, s = p, n = _, l = d, u = f, c.point = x;
    }
    function A() {
      r(h, p, i, _, d, f, o, s, v, n, l, u, bU, a), c.lineEnd = w, w();
    }
    return c;
  };
}
var q4e = tT({
  point: function(e, t) {
    this.stream.point(e * Ya, t * Ya);
  }
});
function H4e(e) {
  return tT({
    point: function(t, r) {
      var a = e(t, r);
      return this.stream.point(a[0], a[1]);
    }
  });
}
function G4e(e, t, r, a, v) {
  function o(s, n) {
    return s *= a, n *= v, [t + e * s, r - e * n];
  }
  return o.invert = function(s, n) {
    return [(s - t) / e * a, (r - n) / e * v];
  }, o;
}
function wU(e, t, r, a, v, o) {
  if (!o) return G4e(e, t, r, a, v);
  var s = ha(o), n = la(o), l = s * e, u = n * e, i = s / e, h = n / e, p = (n * r - s * t) / e, _ = (n * t + s * r) / e;
  function d(f, c) {
    return f *= a, c *= v, [l * f - u * c + t, r - u * f - l * c];
  }
  return d.invert = function(f, c) {
    return [a * (i * f - h * c + p), v * (_ - h * f - i * c)];
  }, d;
}
function $0(e) {
  return FQ(function() {
    return e;
  })();
}
function FQ(e) {
  var t, r = 150, a = 480, v = 250, o = 0, s = 0, n = 0, l = 0, u = 0, i, h = 0, p = 1, _ = 1, d = null, f = fU, c = null, g, m, x, w = Iw, k = 0.5, S, A, C, D, L;
  function E(O) {
    return C(O[0] * Ya, O[1] * Ya);
  }
  function P(O) {
    return O = C.invert(O[0], O[1]), O && [O[0] * qu, O[1] * qu];
  }
  E.stream = function(O) {
    return D && L === O ? D : D = q4e(H4e(i)(f(S(w(L = O)))));
  }, E.preclip = function(O) {
    return arguments.length ? (f = O, d = void 0, M()) : f;
  }, E.postclip = function(O) {
    return arguments.length ? (w = O, c = g = m = x = null, M()) : w;
  }, E.clipAngle = function(O) {
    return arguments.length ? (f = +O ? M4e(d = O * Ya) : (d = null, fU), M()) : d * qu;
  }, E.clipExtent = function(O) {
    return arguments.length ? (w = O == null ? (c = g = m = x = null, Iw) : TQ(c = +O[0][0], g = +O[0][1], m = +O[1][0], x = +O[1][1]), M()) : c == null ? null : [[c, g], [m, x]];
  }, E.scale = function(O) {
    return arguments.length ? (r = +O, I()) : r;
  }, E.translate = function(O) {
    return arguments.length ? (a = +O[0], v = +O[1], I()) : [a, v];
  }, E.center = function(O) {
    return arguments.length ? (o = O[0] % 360 * Ya, s = O[1] % 360 * Ya, I()) : [o * qu, s * qu];
  }, E.rotate = function(O) {
    return arguments.length ? (n = O[0] % 360 * Ya, l = O[1] % 360 * Ya, u = O.length > 2 ? O[2] % 360 * Ya : 0, I()) : [n * qu, l * qu, u * qu];
  }, E.angle = function(O) {
    return arguments.length ? (h = O % 360 * Ya, I()) : h * qu;
  }, E.reflectX = function(O) {
    return arguments.length ? (p = O ? -1 : 1, I()) : p < 0;
  }, E.reflectY = function(O) {
    return arguments.length ? (_ = O ? -1 : 1, I()) : _ < 0;
  }, E.precision = function(O) {
    return arguments.length ? (S = _U(A, k = O * O), M()) : fh(k);
  }, E.fitExtent = function(O, T) {
    return nT(E, O, T);
  }, E.fitSize = function(O, T) {
    return oO(E, O, T);
  }, E.fitWidth = function(O, T) {
    return sO(E, O, T);
  }, E.fitHeight = function(O, T) {
    return lO(E, O, T);
  };
  function I() {
    var O = wU(r, 0, 0, p, _, h).apply(null, t(o, s)), T = wU(r, a - O[0], v - O[1], p, _, h);
    return i = bQ(n, l, u), A = kC(t, T), C = kC(i, A), S = _U(A, k), M();
  }
  function M() {
    return D = L = null, E;
  }
  return function() {
    return t = e.apply(this, arguments), E.invert = t.invert && P, I();
  };
}
function uO(e) {
  var t = 0, r = Qa / 3, a = FQ(e), v = a(t, r);
  return v.parallels = function(o) {
    return arguments.length ? a(t = o[0] * Ya, r = o[1] * Ya) : [t * qu, r * qu];
  }, v;
}
function W4e(e) {
  var t = ha(e);
  function r(a, v) {
    return [a * t, la(v) / t];
  }
  return r.invert = function(a, v) {
    return [a / t, zh(v * t)];
  }, r;
}
function Y4e(e, t) {
  var r = la(e), a = (r + la(t)) / 2;
  if (po(a) < fa) return W4e(e);
  var v = 1 + r * (2 * a - r), o = fh(v) / a;
  function s(n, l) {
    var u = fh(v - 2 * a * la(l)) / a;
    return [u * la(n *= a), o - u * ha(n)];
  }
  return s.invert = function(n, l) {
    var u = o - l, i = zd(n, po(u)) * Td(u);
    return u * a < 0 && (i -= Qa * Td(n) * Td(u)), [i / a, zh((v - (n * n + u * u) * a * a) / (2 * a))];
  }, s;
}
function nk() {
  return uO(Y4e).scale(155.424).center([0, 33.6442]);
}
function NQ() {
  return nk().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);
}
function Z4e(e) {
  var t = e.length;
  return {
    point: function(r, a) {
      for (var v = -1; ++v < t; ) e[v].point(r, a);
    },
    sphere: function() {
      for (var r = -1; ++r < t; ) e[r].sphere();
    },
    lineStart: function() {
      for (var r = -1; ++r < t; ) e[r].lineStart();
    },
    lineEnd: function() {
      for (var r = -1; ++r < t; ) e[r].lineEnd();
    },
    polygonStart: function() {
      for (var r = -1; ++r < t; ) e[r].polygonStart();
    },
    polygonEnd: function() {
      for (var r = -1; ++r < t; ) e[r].polygonEnd();
    }
  };
}
function X4e() {
  var e, t, r = NQ(), a, v = nk().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), o, s = nk().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), n, l, u = { point: function(p, _) {
    l = [p, _];
  } };
  function i(p) {
    var _ = p[0], d = p[1];
    return l = null, a.point(_, d), l || (o.point(_, d), l) || (n.point(_, d), l);
  }
  i.invert = function(p) {
    var _ = r.scale(), d = r.translate(), f = (p[0] - d[0]) / _, c = (p[1] - d[1]) / _;
    return (c >= 0.12 && c < 0.234 && f >= -0.425 && f < -0.214 ? v : c >= 0.166 && c < 0.234 && f >= -0.214 && f < -0.115 ? s : r).invert(p);
  }, i.stream = function(p) {
    return e && t === p ? e : e = Z4e([r.stream(t = p), v.stream(p), s.stream(p)]);
  }, i.precision = function(p) {
    return arguments.length ? (r.precision(p), v.precision(p), s.precision(p), h()) : r.precision();
  }, i.scale = function(p) {
    return arguments.length ? (r.scale(p), v.scale(p * 0.35), s.scale(p), i.translate(r.translate())) : r.scale();
  }, i.translate = function(p) {
    if (!arguments.length) return r.translate();
    var _ = r.scale(), d = +p[0], f = +p[1];
    return a = r.translate(p).clipExtent([[d - 0.455 * _, f - 0.238 * _], [d + 0.455 * _, f + 0.238 * _]]).stream(u), o = v.translate([d - 0.307 * _, f + 0.201 * _]).clipExtent([[d - 0.425 * _ + fa, f + 0.12 * _ + fa], [d - 0.214 * _ - fa, f + 0.234 * _ - fa]]).stream(u), n = s.translate([d - 0.205 * _, f + 0.212 * _]).clipExtent([[d - 0.214 * _ + fa, f + 0.166 * _ + fa], [d - 0.115 * _ - fa, f + 0.234 * _ - fa]]).stream(u), h();
  }, i.fitExtent = function(p, _) {
    return nT(i, p, _);
  }, i.fitSize = function(p, _) {
    return oO(i, p, _);
  }, i.fitWidth = function(p, _) {
    return sO(i, p, _);
  }, i.fitHeight = function(p, _) {
    return lO(i, p, _);
  };
  function h() {
    return e = t = null, i;
  }
  return i.scale(1070);
}
function BQ(e) {
  return function(t, r) {
    var a = ha(t), v = ha(r), o = e(a * v);
    return o === 1 / 0 ? [2, 0] : [
      o * v * la(t),
      o * la(r)
    ];
  };
}
function E4(e) {
  return function(t, r) {
    var a = fh(t * t + r * r), v = e(a), o = la(v), s = ha(v);
    return [
      zd(t * o, a * s),
      zh(a && r * o / a)
    ];
  };
}
var jQ = BQ(function(e) {
  return fh(2 / (1 + e));
});
jQ.invert = E4(function(e) {
  return 2 * zh(e / 2);
});
function K4e() {
  return $0(jQ).scale(124.75).clipAngle(180 - 1e-3);
}
var UQ = BQ(function(e) {
  return (e = uQ(e)) && e / la(e);
});
UQ.invert = E4(function(e) {
  return e;
});
function J4e() {
  return $0(UQ).scale(79.4188).clipAngle(180 - 1e-3);
}
function rT(e, t) {
  return [e, F7(rO((Cu + t) / 2))];
}
rT.invert = function(e, t) {
  return [e, 2 * Db(lQ(t)) - Cu];
};
function Q4e() {
  return VQ(rT).scale(961 / ch);
}
function VQ(e) {
  var t = $0(e), r = t.center, a = t.scale, v = t.translate, o = t.clipExtent, s = null, n, l, u;
  t.scale = function(h) {
    return arguments.length ? (a(h), i()) : a();
  }, t.translate = function(h) {
    return arguments.length ? (v(h), i()) : v();
  }, t.center = function(h) {
    return arguments.length ? (r(h), i()) : r();
  }, t.clipExtent = function(h) {
    return arguments.length ? (h == null ? s = n = l = u = null : (s = +h[0][0], n = +h[0][1], l = +h[1][0], u = +h[1][1]), i()) : s == null ? null : [[s, n], [l, u]];
  };
  function i() {
    var h = Qa * a(), p = t(x4e(t.rotate()).invert([0, 0]));
    return o(s == null ? [[p[0] - h, p[1] - h], [p[0] + h, p[1] + h]] : e === rT ? [[Math.max(p[0] - h, s), n], [Math.min(p[0] + h, l), u]] : [[s, Math.max(p[1] - h, n)], [l, Math.min(p[1] + h, u)]]);
  }
  return i();
}
function C6(e) {
  return rO((Cu + e) / 2);
}
function e5e(e, t) {
  var r = ha(e), a = e === t ? la(e) : F7(r / ha(t)) / F7(C6(t) / C6(e)), v = r * nM(C6(e), a) / a;
  if (!a) return rT;
  function o(s, n) {
    v > 0 ? n < -Cu + fa && (n = -Cu + fa) : n > Cu - fa && (n = Cu - fa);
    var l = v / nM(C6(n), a);
    return [l * la(a * s), v - l * ha(a * s)];
  }
  return o.invert = function(s, n) {
    var l = v - n, u = Td(a) * fh(s * s + l * l), i = zd(s, po(l)) * Td(l);
    return l * a < 0 && (i -= Qa * Td(s) * Td(l)), [i / a, 2 * Db(nM(v / u, 1 / a)) - Cu];
  }, o;
}
function t5e() {
  return uO(e5e).scale(109.5).parallels([30, 30]);
}
function rk(e, t) {
  return [e, t];
}
rk.invert = rk;
function n5e() {
  return $0(rk).scale(152.63);
}
function r5e(e, t) {
  var r = ha(e), a = e === t ? la(e) : (r - ha(t)) / (t - e), v = r / a + e;
  if (po(a) < fa) return rk;
  function o(s, n) {
    var l = v - n, u = a * s;
    return [l * la(u), v - l * ha(u)];
  }
  return o.invert = function(s, n) {
    var l = v - n, u = zd(s, po(l)) * Td(l);
    return l * a < 0 && (u -= Qa * Td(s) * Td(l)), [u / a, v - Td(a) * fh(s * s + l * l)];
  }, o;
}
function i5e() {
  return uO(r5e).scale(131.154).center([0, 13.9389]);
}
var Y3 = 1.340264, Z3 = -0.081106, X3 = 893e-6, K3 = 3796e-6, ik = fh(3) / 2, a5e = 12;
function $Q(e, t) {
  var r = zh(ik * la(t)), a = r * r, v = a * a * a;
  return [
    e * ha(r) / (ik * (Y3 + 3 * Z3 * a + v * (7 * X3 + 9 * K3 * a))),
    r * (Y3 + Z3 * a + v * (X3 + K3 * a))
  ];
}
$Q.invert = function(e, t) {
  for (var r = t, a = r * r, v = a * a * a, o = 0, s, n, l; o < a5e && (n = r * (Y3 + Z3 * a + v * (X3 + K3 * a)) - t, l = Y3 + 3 * Z3 * a + v * (7 * X3 + 9 * K3 * a), r -= s = n / l, a = r * r, v = a * a * a, !(po(s) < z7)); ++o)
    ;
  return [
    ik * e * (Y3 + 3 * Z3 * a + v * (7 * X3 + 9 * K3 * a)) / ha(r),
    zh(la(r) / ik)
  ];
};
function o5e() {
  return $0($Q).scale(177.158);
}
function qQ(e, t) {
  var r = ha(t), a = ha(e) * r;
  return [r * la(e) / a, la(t) / a];
}
qQ.invert = E4(Db);
function s5e() {
  return $0(qQ).scale(144.049).clipAngle(60);
}
function l5e() {
  var e = 1, t = 0, r = 0, a = 1, v = 1, o = 0, s, n, l = null, u, i, h, p = 1, _ = 1, d = tT({
    point: function(w, k) {
      var S = x([w, k]);
      this.stream.point(S[0], S[1]);
    }
  }), f = Iw, c, g;
  function m() {
    return p = e * a, _ = e * v, c = g = null, x;
  }
  function x(w) {
    var k = w[0] * p, S = w[1] * _;
    if (o) {
      var A = S * s - k * n;
      k = k * s + S * n, S = A;
    }
    return [k + t, S + r];
  }
  return x.invert = function(w) {
    var k = w[0] - t, S = w[1] - r;
    if (o) {
      var A = S * s + k * n;
      k = k * s - S * n, S = A;
    }
    return [k / p, S / _];
  }, x.stream = function(w) {
    return c && g === w ? c : c = d(f(g = w));
  }, x.postclip = function(w) {
    return arguments.length ? (f = w, l = u = i = h = null, m()) : f;
  }, x.clipExtent = function(w) {
    return arguments.length ? (f = w == null ? (l = u = i = h = null, Iw) : TQ(l = +w[0][0], u = +w[0][1], i = +w[1][0], h = +w[1][1]), m()) : l == null ? null : [[l, u], [i, h]];
  }, x.scale = function(w) {
    return arguments.length ? (e = +w, m()) : e;
  }, x.translate = function(w) {
    return arguments.length ? (t = +w[0], r = +w[1], m()) : [t, r];
  }, x.angle = function(w) {
    return arguments.length ? (o = w % 360 * Ya, n = la(o), s = ha(o), m()) : o * qu;
  }, x.reflectX = function(w) {
    return arguments.length ? (a = w ? -1 : 1, m()) : a < 0;
  }, x.reflectY = function(w) {
    return arguments.length ? (v = w ? -1 : 1, m()) : v < 0;
  }, x.fitExtent = function(w, k) {
    return nT(x, w, k);
  }, x.fitSize = function(w, k) {
    return oO(x, w, k);
  }, x.fitWidth = function(w, k) {
    return sO(x, w, k);
  }, x.fitHeight = function(w, k) {
    return lO(x, w, k);
  }, x;
}
function HQ(e, t) {
  var r = t * t, a = r * r;
  return [
    e * (0.8707 - 0.131979 * r + a * (-0.013791 + a * (3971e-6 * r - 1529e-6 * a))),
    t * (1.007226 + r * (0.015085 + a * (-0.044475 + 0.028874 * r - 5916e-6 * a)))
  ];
}
HQ.invert = function(e, t) {
  var r = t, a = 25, v;
  do {
    var o = r * r, s = o * o;
    r -= v = (r * (1.007226 + o * (0.015085 + s * (-0.044475 + 0.028874 * o - 5916e-6 * s))) - t) / (1.007226 + o * (0.015085 * 3 + s * (-0.044475 * 7 + 0.028874 * 9 * o - 5916e-6 * 11 * s)));
  } while (po(v) > fa && --a > 0);
  return [
    e / (0.8707 + (o = r * r) * (-0.131979 + o * (-0.013791 + o * o * o * (3971e-6 - 1529e-6 * o)))),
    r
  ];
};
function u5e() {
  return $0(HQ).scale(175.295);
}
function GQ(e, t) {
  return [ha(t) * la(e), la(t)];
}
GQ.invert = E4(zh);
function c5e() {
  return $0(GQ).scale(249.5).clipAngle(90 + fa);
}
function WQ(e, t) {
  var r = ha(t), a = 1 + ha(e) * r;
  return [r * la(e) / a, la(t) / a];
}
WQ.invert = E4(function(e) {
  return 2 * Db(e);
});
function f5e() {
  return $0(WQ).scale(250).clipAngle(142);
}
function YQ(e, t) {
  return [F7(rO((Cu + t) / 2)), -e];
}
YQ.invert = function(e, t) {
  return [-t, 2 * Db(lQ(e)) - Cu];
};
function h5e() {
  var e = VQ(YQ), t = e.center, r = e.rotate;
  return e.center = function(a) {
    return arguments.length ? t([-a[1], a[0]]) : (a = t(), [a[1], -a[0]]);
  }, e.rotate = function(a) {
    return arguments.length ? r([a[0], a[1], a.length > 2 ? a[2] + 90 : 90]) : (a = r(), [a[0], a[1], a[2] - 90]);
  }, r([0, 0, 90]).scale(159.155);
}
var d5e = Math.abs, OC = Math.cos, ak = Math.sin, p5e = 1e-6, ZQ = Math.PI, zC = ZQ / 2, kU = m5e(2);
function TU(e) {
  return e > 1 ? zC : e < -1 ? -zC : Math.asin(e);
}
function m5e(e) {
  return e > 0 ? Math.sqrt(e) : 0;
}
function g5e(e, t) {
  var r = e * ak(t), a = 30, v;
  do
    t -= v = (t + ak(t) - r) / (1 + OC(t));
  while (d5e(v) > p5e && --a > 0);
  return t / 2;
}
function y5e(e, t, r) {
  function a(v, o) {
    return [e * v * OC(o = g5e(r, o)), t * ak(o)];
  }
  return a.invert = function(v, o) {
    return o = TU(o / t), [v / (e * OC(o)), TU((2 * o + ak(2 * o)) / r)];
  }, a;
}
var v5e = y5e(kU / zC, kU, ZQ);
function x5e() {
  return $0(v5e).scale(169.529);
}
const b5e = RQ(), RC = [
  // standard properties in d3-geo
  "clipAngle",
  "clipExtent",
  "scale",
  "translate",
  "center",
  "rotate",
  "parallels",
  "precision",
  "reflectX",
  "reflectY",
  // extended properties in d3-geo-projections
  "coefficient",
  "distance",
  "fraction",
  "lobes",
  "parallel",
  "radius",
  "ratio",
  "spacing",
  "tilt"
];
function _5e(e, t) {
  return function r() {
    const a = t();
    return a.type = e, a.path = RQ().projection(a), a.copy = a.copy || function() {
      const v = r();
      return RC.forEach((o) => {
        a[o] && v[o](a[o]());
      }), v.path.pointRadius(a.path.pointRadius()), v;
    }, cK(a);
  };
}
function cO(e, t) {
  if (!e || typeof e != "string")
    throw new Error("Projection type must be a name string.");
  return e = e.toLowerCase(), arguments.length > 1 ? (ok[e] = _5e(e, t), this) : ok[e] || null;
}
function XQ(e) {
  return e && e.path || b5e;
}
const ok = {
  // base d3-geo projection types
  albers: NQ,
  albersusa: X4e,
  azimuthalequalarea: K4e,
  azimuthalequidistant: J4e,
  conicconformal: t5e,
  conicequalarea: nk,
  conicequidistant: i5e,
  equalEarth: o5e,
  equirectangular: n5e,
  gnomonic: s5e,
  identity: l5e,
  mercator: Q4e,
  mollweide: x5e,
  naturalEarth1: u5e,
  orthographic: c5e,
  stereographic: f5e,
  transversemercator: h5e
};
for (const e in ok)
  cO(e, ok[e]);
function w5e() {
}
const dm = [[], [[[1, 1.5], [0.5, 1]]], [[[1.5, 1], [1, 1.5]]], [[[1.5, 1], [0.5, 1]]], [[[1, 0.5], [1.5, 1]]], [[[1, 1.5], [0.5, 1]], [[1, 0.5], [1.5, 1]]], [[[1, 0.5], [1, 1.5]]], [[[1, 0.5], [0.5, 1]]], [[[0.5, 1], [1, 0.5]]], [[[1, 1.5], [1, 0.5]]], [[[0.5, 1], [1, 0.5]], [[1.5, 1], [1, 1.5]]], [[[1.5, 1], [1, 0.5]]], [[[0.5, 1], [1.5, 1]]], [[[1, 1.5], [1.5, 1]]], [[[0.5, 1], [1, 1.5]]], []];
function KQ() {
  var e = 1, t = 1, r = n;
  function a(l, u) {
    return u.map((i) => v(l, i));
  }
  function v(l, u) {
    var i = [], h = [];
    return o(l, u, (p) => {
      r(p, l, u), k5e(p) > 0 ? i.push([p]) : h.push(p);
    }), h.forEach((p) => {
      for (var _ = 0, d = i.length, f; _ < d; ++_)
        if (T5e((f = i[_])[0], p) !== -1) {
          f.push(p);
          return;
        }
    }), {
      type: "MultiPolygon",
      value: u,
      coordinates: i
    };
  }
  function o(l, u, i) {
    var h = [], p = [], _, d, f, c, g, m;
    for (_ = d = -1, c = l[0] >= u, dm[c << 1].forEach(x); ++_ < e - 1; )
      f = c, c = l[_ + 1] >= u, dm[f | c << 1].forEach(x);
    for (dm[c << 0].forEach(x); ++d < t - 1; ) {
      for (_ = -1, c = l[d * e + e] >= u, g = l[d * e] >= u, dm[c << 1 | g << 2].forEach(x); ++_ < e - 1; )
        f = c, c = l[d * e + e + _ + 1] >= u, m = g, g = l[d * e + _ + 1] >= u, dm[f | c << 1 | g << 2 | m << 3].forEach(x);
      dm[c | g << 3].forEach(x);
    }
    for (_ = -1, g = l[d * e] >= u, dm[g << 2].forEach(x); ++_ < e - 1; )
      m = g, g = l[d * e + _ + 1] >= u, dm[g << 2 | m << 3].forEach(x);
    dm[g << 3].forEach(x);
    function x(w) {
      var k = [w[0][0] + _, w[0][1] + d], S = [w[1][0] + _, w[1][1] + d], A = s(k), C = s(S), D, L;
      (D = p[A]) ? (L = h[C]) ? (delete p[D.end], delete h[L.start], D === L ? (D.ring.push(S), i(D.ring)) : h[D.start] = p[L.end] = {
        start: D.start,
        end: L.end,
        ring: D.ring.concat(L.ring)
      }) : (delete p[D.end], D.ring.push(S), p[D.end = C] = D) : (D = h[C]) ? (L = p[A]) ? (delete h[D.start], delete p[L.end], D === L ? (D.ring.push(S), i(D.ring)) : h[L.start] = p[D.end] = {
        start: L.start,
        end: D.end,
        ring: L.ring.concat(D.ring)
      }) : (delete h[D.start], D.ring.unshift(k), h[D.start = A] = D) : h[A] = p[C] = {
        start: A,
        end: C,
        ring: [k, S]
      };
    }
  }
  function s(l) {
    return l[0] * 2 + l[1] * (e + 1) * 4;
  }
  function n(l, u, i) {
    l.forEach((h) => {
      var p = h[0], _ = h[1], d = p | 0, f = _ | 0, c, g = u[f * e + d];
      p > 0 && p < e && d === p && (c = u[f * e + d - 1], h[0] = p + (i - c) / (g - c) - 0.5), _ > 0 && _ < t && f === _ && (c = u[(f - 1) * e + d], h[1] = _ + (i - c) / (g - c) - 0.5);
    });
  }
  return a.contour = v, a.size = function(l) {
    if (!arguments.length) return [e, t];
    var u = Math.floor(l[0]), i = Math.floor(l[1]);
    return u >= 0 && i >= 0 || Jr("invalid size"), e = u, t = i, a;
  }, a.smooth = function(l) {
    return arguments.length ? (r = l ? n : w5e, a) : r === n;
  }, a;
}
function k5e(e) {
  for (var t = 0, r = e.length, a = e[r - 1][1] * e[0][0] - e[r - 1][0] * e[0][1]; ++t < r; ) a += e[t - 1][1] * e[t][0] - e[t - 1][0] * e[t][1];
  return a;
}
function T5e(e, t) {
  for (var r = -1, a = t.length, v; ++r < a; ) if (v = A5e(e, t[r])) return v;
  return 0;
}
function A5e(e, t) {
  for (var r = t[0], a = t[1], v = -1, o = 0, s = e.length, n = s - 1; o < s; n = o++) {
    var l = e[o], u = l[0], i = l[1], h = e[n], p = h[0], _ = h[1];
    if (S5e(l, h, t)) return 0;
    i > a != _ > a && r < (p - u) * (a - i) / (_ - i) + u && (v = -v);
  }
  return v;
}
function S5e(e, t, r) {
  var a;
  return M5e(e, t, r) && E5e(e[a = +(e[0] === t[0])], r[a], t[a]);
}
function M5e(e, t, r) {
  return (t[0] - e[0]) * (r[1] - e[1]) === (r[0] - e[0]) * (t[1] - e[1]);
}
function E5e(e, t, r) {
  return e <= t && t <= r || r <= t && t <= e;
}
function JQ(e, t, r) {
  return function(a) {
    var v = M0(a), o = r ? Math.min(v[0], 0) : v[0], s = v[1], n = s - o, l = t ? xg(o, s, e) : n / (e + 1);
    return Kh(o + l, s, l);
  };
}
function fO(e) {
  qr.call(this, null, e);
}
fO.Definition = {
  type: "Isocontour",
  metadata: {
    generates: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "thresholds",
    type: "number",
    array: !0
  }, {
    name: "levels",
    type: "number"
  }, {
    name: "nice",
    type: "boolean",
    default: !1
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "zero",
    type: "boolean",
    default: !0
  }, {
    name: "smooth",
    type: "boolean",
    default: !0
  }, {
    name: "scale",
    type: "number",
    expr: !0
  }, {
    name: "translate",
    type: "number",
    array: !0,
    expr: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    default: "contour"
  }]
};
Si(fO, qr, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified())
      return t.StopPropagation;
    var r = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = t.materialize(t.SOURCE).source, v = e.field || Uf, o = KQ().smooth(e.smooth !== !1), s = e.thresholds || C5e(a, v, e), n = e.as === null ? null : e.as || "contour", l = [];
    return a.forEach((u) => {
      const i = v(u), h = o.size([i.width, i.height])(i.values, Qr(s) ? s : s(i.values));
      I5e(h, i, u, e), h.forEach((p) => {
        l.push(b9(u, rs(n != null ? {
          [n]: p
        } : p)));
      });
    }), this.value && (r.rem = this.value), this.value = r.source = r.add = l, r;
  }
});
function C5e(e, t, r) {
  const a = JQ(r.levels || 10, r.nice, r.zero !== !1);
  return r.resolve !== "shared" ? a : a(e.map((v) => av(t(v).values)));
}
function I5e(e, t, r, a) {
  let v = a.scale || t.scale, o = a.translate || t.translate;
  if (qa(v) && (v = v(r, a)), qa(o) && (o = o(r, a)), (v === 1 || v == null) && !o) return;
  const s = (Ro(v) ? v : v[0]) || 1, n = (Ro(v) ? v : v[1]) || 1, l = o && o[0] || 0, u = o && o[1] || 0;
  e.forEach(QQ(t, s, n, l, u));
}
function QQ(e, t, r, a, v) {
  const o = e.x1 || 0, s = e.y1 || 0, n = t * r < 0;
  function l(h) {
    h.forEach(u);
  }
  function u(h) {
    n && h.reverse(), h.forEach(i);
  }
  function i(h) {
    h[0] = (h[0] - o) * t + a, h[1] = (h[1] - s) * r + v;
  }
  return function(h) {
    return h.coordinates.forEach(l), h;
  };
}
function AU(e, t, r) {
  const a = e >= 0 ? e : rL(t, r);
  return Math.round((Math.sqrt(4 * a * a + 1) - 1) / 2);
}
function sM(e) {
  return qa(e) ? e : Vf(+e);
}
function eee() {
  var e = (l) => l[0], t = (l) => l[1], r = vb, a = [-1, -1], v = 960, o = 500, s = 2;
  function n(l, u) {
    const i = AU(a[0], l, e) >> s, h = AU(a[1], l, t) >> s, p = i ? i + 2 : 0, _ = h ? h + 2 : 0, d = 2 * p + (v >> s), f = 2 * _ + (o >> s), c = new Float32Array(d * f), g = new Float32Array(d * f);
    let m = c;
    l.forEach((w) => {
      const k = p + (+e(w) >> s), S = _ + (+t(w) >> s);
      k >= 0 && k < d && S >= 0 && S < f && (c[k + S * d] += +r(w));
    }), i > 0 && h > 0 ? (V2(d, f, c, g, i), $2(d, f, g, c, h), V2(d, f, c, g, i), $2(d, f, g, c, h), V2(d, f, c, g, i), $2(d, f, g, c, h)) : i > 0 ? (V2(d, f, c, g, i), V2(d, f, g, c, i), V2(d, f, c, g, i), m = g) : h > 0 && ($2(d, f, c, g, h), $2(d, f, g, c, h), $2(d, f, c, g, h), m = g);
    const x = u ? Math.pow(2, -2 * s) : 1 / pY(m);
    for (let w = 0, k = d * f; w < k; ++w) m[w] *= x;
    return {
      values: m,
      scale: 1 << s,
      width: d,
      height: f,
      x1: p,
      y1: _,
      x2: p + (v >> s),
      y2: _ + (o >> s)
    };
  }
  return n.x = function(l) {
    return arguments.length ? (e = sM(l), n) : e;
  }, n.y = function(l) {
    return arguments.length ? (t = sM(l), n) : t;
  }, n.weight = function(l) {
    return arguments.length ? (r = sM(l), n) : r;
  }, n.size = function(l) {
    if (!arguments.length) return [v, o];
    var u = +l[0], i = +l[1];
    return u >= 0 && i >= 0 || Jr("invalid size"), v = u, o = i, n;
  }, n.cellSize = function(l) {
    return arguments.length ? ((l = +l) >= 1 || Jr("invalid cell size"), s = Math.floor(Math.log(l) / Math.LN2), n) : 1 << s;
  }, n.bandwidth = function(l) {
    return arguments.length ? (l = Ri(l), l.length === 1 && (l = [+l[0], +l[0]]), l.length !== 2 && Jr("invalid bandwidth"), a = l, n) : a;
  }, n;
}
function V2(e, t, r, a, v) {
  const o = (v << 1) + 1;
  for (let s = 0; s < t; ++s)
    for (let n = 0, l = 0; n < e + v; ++n)
      n < e && (l += r[n + s * e]), n >= v && (n >= o && (l -= r[n - o + s * e]), a[n - v + s * e] = l / Math.min(n + 1, e - 1 + o - n, o));
}
function $2(e, t, r, a, v) {
  const o = (v << 1) + 1;
  for (let s = 0; s < e; ++s)
    for (let n = 0, l = 0; n < t + v; ++n)
      n < t && (l += r[s + n * e]), n >= v && (n >= o && (l -= r[s + (n - o) * e]), a[s + (n - v) * e] = l / Math.min(n + 1, t - 1 + o - n, o));
}
function hO(e) {
  qr.call(this, null, e);
}
hO.Definition = {
  type: "KDE2D",
  metadata: {
    generates: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "weight",
    type: "field"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "cellSize",
    type: "number"
  }, {
    name: "bandwidth",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "counts",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    default: "grid"
  }]
};
const D5e = ["x", "y", "weight", "size", "cellSize", "bandwidth"];
function tee(e, t) {
  return D5e.forEach((r) => t[r] != null ? e[r](t[r]) : 0), e;
}
Si(hO, qr, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified()) return t.StopPropagation;
    var r = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = t.materialize(t.SOURCE).source, v = L5e(a, e.groupby), o = (e.groupby || []).map(Lu), s = tee(eee(), e), n = e.as || "grid", l = [];
    function u(i, h) {
      for (let p = 0; p < o.length; ++p) i[o[p]] = h[p];
      return i;
    }
    return l = v.map((i) => rs(u({
      [n]: s(i, e.counts)
    }, i.dims))), this.value && (r.rem = this.value), this.value = r.source = r.add = l, r;
  }
});
function L5e(e, t) {
  var r = [], a = (i) => i(n), v, o, s, n, l, u;
  if (t == null)
    r.push(e);
  else
    for (v = {}, o = 0, s = e.length; o < s; ++o)
      n = e[o], l = t.map(a), u = v[l], u || (v[l] = u = [], u.dims = l, r.push(u)), u.push(n);
  return r;
}
function dO(e) {
  qr.call(this, null, e);
}
dO.Definition = {
  type: "Contour",
  metadata: {
    generates: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "values",
    type: "number",
    array: !0
  }, {
    name: "x",
    type: "field"
  }, {
    name: "y",
    type: "field"
  }, {
    name: "weight",
    type: "field"
  }, {
    name: "cellSize",
    type: "number"
  }, {
    name: "bandwidth",
    type: "number"
  }, {
    name: "count",
    type: "number"
  }, {
    name: "nice",
    type: "boolean",
    default: !1
  }, {
    name: "thresholds",
    type: "number",
    array: !0
  }, {
    name: "smooth",
    type: "boolean",
    default: !0
  }]
};
Si(dO, qr, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified())
      return t.StopPropagation;
    var r = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = KQ().smooth(e.smooth !== !1), v = e.values, o = e.thresholds || JQ(e.count || 10, e.nice, !!v), s = e.size, n, l;
    return v || (v = t.materialize(t.SOURCE).source, n = tee(eee(), e)(v, !0), l = QQ(n, n.scale || 1, n.scale || 1, 0, 0), s = [n.width, n.height], v = n.values), o = Qr(o) ? o : o(v), v = a.size(s)(v, o), l && v.forEach(l), this.value && (r.rem = this.value), this.value = r.source = r.add = (v || []).map(rs), r;
  }
});
const FC = "Feature", pO = "FeatureCollection", P5e = "MultiPoint";
function mO(e) {
  qr.call(this, null, e);
}
mO.Definition = {
  type: "GeoJSON",
  metadata: {},
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    length: 2
  }, {
    name: "geojson",
    type: "field"
  }]
};
Si(mO, qr, {
  transform(e, t) {
    var r = this._features, a = this._points, v = e.fields, o = v && v[0], s = v && v[1], n = e.geojson || !v && Uf, l = t.ADD, u;
    u = e.modified() || t.changed(t.REM) || t.modified(Ff(n)) || o && t.modified(Ff(o)) || s && t.modified(Ff(s)), (!this.value || u) && (l = t.SOURCE, this._features = r = [], this._points = a = []), n && t.visit(l, (i) => r.push(n(i))), o && s && (t.visit(l, (i) => {
      var h = o(i), p = s(i);
      h != null && p != null && (h = +h) === h && (p = +p) === p && a.push([h, p]);
    }), r = r.concat({
      type: FC,
      geometry: {
        type: P5e,
        coordinates: a
      }
    })), this.value = {
      type: pO,
      features: r
    };
  }
});
function gO(e) {
  qr.call(this, null, e);
}
gO.Definition = {
  type: "GeoPath",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "projection",
    type: "projection"
  }, {
    name: "field",
    type: "field"
  }, {
    name: "pointRadius",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
Si(gO, qr, {
  transform(e, t) {
    var r = t.fork(t.ALL), a = this.value, v = e.field || Uf, o = e.as || "path", s = r.SOURCE;
    !a || e.modified() ? (this.value = a = XQ(e.projection), r.materialize().reflow()) : s = v === Uf || t.modified(v.fields) ? r.ADD_MOD : r.ADD;
    const n = O5e(a, e.pointRadius);
    return r.visit(s, (l) => l[o] = a(v(l))), a.pointRadius(n), r.modifies(o);
  }
});
function O5e(e, t) {
  const r = e.pointRadius();
  return e.context(null), t != null && e.pointRadius(t), r;
}
function yO(e) {
  qr.call(this, null, e);
}
yO.Definition = {
  type: "GeoPoint",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "projection",
    type: "projection",
    required: !0
  }, {
    name: "fields",
    type: "field",
    array: !0,
    required: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["x", "y"]
  }]
};
Si(yO, qr, {
  transform(e, t) {
    var r = e.projection, a = e.fields[0], v = e.fields[1], o = e.as || ["x", "y"], s = o[0], n = o[1], l;
    function u(i) {
      const h = r([a(i), v(i)]);
      h ? (i[s] = h[0], i[n] = h[1]) : (i[s] = void 0, i[n] = void 0);
    }
    return e.modified() ? t = t.materialize().reflow(!0).visit(t.SOURCE, u) : (l = t.modified(a.fields) || t.modified(v.fields), t.visit(l ? t.ADD_MOD : t.ADD, u)), t.modifies(o);
  }
});
function vO(e) {
  qr.call(this, null, e);
}
vO.Definition = {
  type: "GeoShape",
  metadata: {
    modifies: !0,
    nomod: !0
  },
  params: [{
    name: "projection",
    type: "projection"
  }, {
    name: "field",
    type: "field",
    default: "datum"
  }, {
    name: "pointRadius",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    default: "shape"
  }]
};
Si(vO, qr, {
  transform(e, t) {
    var r = t.fork(t.ALL), a = this.value, v = e.as || "shape", o = r.ADD;
    return (!a || e.modified()) && (this.value = a = z5e(XQ(e.projection), e.field || Dd("datum"), e.pointRadius), r.materialize().reflow(), o = r.SOURCE), r.visit(o, (s) => s[v] = a), r.modifies(v);
  }
});
function z5e(e, t, r) {
  const a = r == null ? (v) => e(t(v)) : (v) => {
    var o = e.pointRadius(), s = e.pointRadius(r)(t(v));
    return e.pointRadius(o), s;
  };
  return a.context = (v) => (e.context(v), a), a;
}
function xO(e) {
  qr.call(this, [], e), this.generator = C4e();
}
xO.Definition = {
  type: "Graticule",
  metadata: {
    changes: !0,
    generates: !0
  },
  params: [{
    name: "extent",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "extentMajor",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "extentMinor",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "step",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "stepMajor",
    type: "number",
    array: !0,
    length: 2,
    default: [90, 360]
  }, {
    name: "stepMinor",
    type: "number",
    array: !0,
    length: 2,
    default: [10, 10]
  }, {
    name: "precision",
    type: "number",
    default: 2.5
  }]
};
Si(xO, qr, {
  transform(e, t) {
    var r = this.value, a = this.generator, v;
    if (!r.length || e.modified())
      for (const o in e)
        qa(a[o]) && a[o](e[o]);
    return v = a(), r.length ? t.mod.push(uZ(r[0], v)) : t.add.push(rs(v)), r[0] = v, t;
  }
});
function bO(e) {
  qr.call(this, null, e);
}
bO.Definition = {
  type: "heatmap",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "color",
    type: "string",
    expr: !0
  }, {
    name: "opacity",
    type: "number",
    expr: !0
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "as",
    type: "string",
    default: "image"
  }]
};
Si(bO, qr, {
  transform(e, t) {
    if (!t.changed() && !e.modified())
      return t.StopPropagation;
    var r = t.materialize(t.SOURCE).source, a = e.resolve === "shared", v = e.field || Uf, o = F5e(e.opacity, e), s = R5e(e.color, e), n = e.as || "image", l = {
      $x: 0,
      $y: 0,
      $value: 0,
      $max: a ? av(r.map((u) => av(v(u).values))) : 0
    };
    return r.forEach((u) => {
      const i = v(u), h = $a({}, u, l);
      a || (h.$max = av(i.values || [])), u[n] = N5e(i, h, s.dep ? s : Vf(s(h)), o.dep ? o : Vf(o(h)));
    }), t.reflow(!0).modifies(n);
  }
});
function R5e(e, t) {
  let r;
  return qa(e) ? (r = (a) => wg(e(a, t)), r.dep = nee(e)) : r = Vf(wg(e || "#888")), r;
}
function F5e(e, t) {
  let r;
  return qa(e) ? (r = (a) => e(a, t), r.dep = nee(e)) : e ? r = Vf(e) : (r = (a) => a.$value / a.$max || 0, r.dep = !0), r;
}
function nee(e) {
  if (!qa(e)) return !1;
  const t = vp(Ff(e));
  return t.$x || t.$y || t.$value || t.$max;
}
function N5e(e, t, r, a) {
  const v = e.width, o = e.height, s = e.x1 || 0, n = e.y1 || 0, l = e.x2 || v, u = e.y2 || o, i = e.values, h = i ? (c) => i[c] : W1, p = cg(l - s, u - n), _ = p.getContext("2d"), d = _.getImageData(0, 0, l - s, u - n), f = d.data;
  for (let c = n, g = 0; c < u; ++c) {
    t.$y = c - n;
    for (let m = s, x = c * v; m < l; ++m, g += 4) {
      t.$x = m - s, t.$value = h(m + x);
      const w = r(t);
      f[g + 0] = w.r, f[g + 1] = w.g, f[g + 2] = w.b, f[g + 3] = ~~(255 * a(t));
    }
  }
  return _.putImageData(d, 0, 0), p;
}
function ree(e) {
  qr.call(this, null, e), this.modified(!0);
}
Si(ree, qr, {
  transform(e, t) {
    let r = this.value;
    return !r || e.modified("type") ? (this.value = r = j5e(e.type), RC.forEach((a) => {
      e[a] != null && SU(r, a, e[a]);
    })) : RC.forEach((a) => {
      e.modified(a) && SU(r, a, e[a]);
    }), e.pointRadius != null && r.path.pointRadius(e.pointRadius), e.fit && B5e(r, e), t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function B5e(e, t) {
  const r = U5e(t.fit);
  t.extent ? e.fitExtent(t.extent, r) : t.size && e.fitSize(t.size, r);
}
function j5e(e) {
  const t = cO((e || "mercator").toLowerCase());
  return t || Jr("Unrecognized projection type: " + e), t();
}
function SU(e, t, r) {
  qa(e[t]) && e[t](r);
}
function U5e(e) {
  return e = Ri(e), e.length === 1 ? e[0] : {
    type: pO,
    features: e.reduce((t, r) => t.concat(V5e(r)), [])
  };
}
function V5e(e) {
  return e.type === pO ? e.features : Ri(e).filter((t) => t != null).map((t) => t.type === FC ? t : {
    type: FC,
    geometry: t
  });
}
const $5e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  contour: dO,
  geojson: mO,
  geopath: gO,
  geopoint: yO,
  geoshape: vO,
  graticule: xO,
  heatmap: bO,
  isocontour: fO,
  kde2d: hO,
  projection: ree
}, Symbol.toStringTag, { value: "Module" }));
function q5e(e, t) {
  var r, a = 1;
  e == null && (e = 0), t == null && (t = 0);
  function v() {
    var o, s = r.length, n, l = 0, u = 0;
    for (o = 0; o < s; ++o)
      n = r[o], l += n.x, u += n.y;
    for (l = (l / s - e) * a, u = (u / s - t) * a, o = 0; o < s; ++o)
      n = r[o], n.x -= l, n.y -= u;
  }
  return v.initialize = function(o) {
    r = o;
  }, v.x = function(o) {
    return arguments.length ? (e = +o, v) : e;
  }, v.y = function(o) {
    return arguments.length ? (t = +o, v) : t;
  }, v.strength = function(o) {
    return arguments.length ? (a = +o, v) : a;
  }, v;
}
function H5e(e) {
  const t = +this._x.call(null, e), r = +this._y.call(null, e);
  return iee(this.cover(t, r), t, r, e);
}
function iee(e, t, r, a) {
  if (isNaN(t) || isNaN(r)) return e;
  var v, o = e._root, s = { data: a }, n = e._x0, l = e._y0, u = e._x1, i = e._y1, h, p, _, d, f, c, g, m;
  if (!o) return e._root = s, e;
  for (; o.length; )
    if ((f = t >= (h = (n + u) / 2)) ? n = h : u = h, (c = r >= (p = (l + i) / 2)) ? l = p : i = p, v = o, !(o = o[g = c << 1 | f])) return v[g] = s, e;
  if (_ = +e._x.call(null, o.data), d = +e._y.call(null, o.data), t === _ && r === d) return s.next = o, v ? v[g] = s : e._root = s, e;
  do
    v = v ? v[g] = new Array(4) : e._root = new Array(4), (f = t >= (h = (n + u) / 2)) ? n = h : u = h, (c = r >= (p = (l + i) / 2)) ? l = p : i = p;
  while ((g = c << 1 | f) === (m = (d >= p) << 1 | _ >= h));
  return v[m] = o, v[g] = s, e;
}
function G5e(e) {
  var t, r, a = e.length, v, o, s = new Array(a), n = new Array(a), l = 1 / 0, u = 1 / 0, i = -1 / 0, h = -1 / 0;
  for (r = 0; r < a; ++r)
    isNaN(v = +this._x.call(null, t = e[r])) || isNaN(o = +this._y.call(null, t)) || (s[r] = v, n[r] = o, v < l && (l = v), v > i && (i = v), o < u && (u = o), o > h && (h = o));
  if (l > i || u > h) return this;
  for (this.cover(l, u).cover(i, h), r = 0; r < a; ++r)
    iee(this, s[r], n[r], e[r]);
  return this;
}
function W5e(e, t) {
  if (isNaN(e = +e) || isNaN(t = +t)) return this;
  var r = this._x0, a = this._y0, v = this._x1, o = this._y1;
  if (isNaN(r))
    v = (r = Math.floor(e)) + 1, o = (a = Math.floor(t)) + 1;
  else {
    for (var s = v - r || 1, n = this._root, l, u; r > e || e >= v || a > t || t >= o; )
      switch (u = (t < a) << 1 | e < r, l = new Array(4), l[u] = n, n = l, s *= 2, u) {
        case 0:
          v = r + s, o = a + s;
          break;
        case 1:
          r = v - s, o = a + s;
          break;
        case 2:
          v = r + s, a = o - s;
          break;
        case 3:
          r = v - s, a = o - s;
          break;
      }
    this._root && this._root.length && (this._root = n);
  }
  return this._x0 = r, this._y0 = a, this._x1 = v, this._y1 = o, this;
}
function Y5e() {
  var e = [];
  return this.visit(function(t) {
    if (!t.length) do
      e.push(t.data);
    while (t = t.next);
  }), e;
}
function Z5e(e) {
  return arguments.length ? this.cover(+e[0][0], +e[0][1]).cover(+e[1][0], +e[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
}
function ah(e, t, r, a, v) {
  this.node = e, this.x0 = t, this.y0 = r, this.x1 = a, this.y1 = v;
}
function X5e(e, t, r) {
  var a, v = this._x0, o = this._y0, s, n, l, u, i = this._x1, h = this._y1, p = [], _ = this._root, d, f;
  for (_ && p.push(new ah(_, v, o, i, h)), r == null ? r = 1 / 0 : (v = e - r, o = t - r, i = e + r, h = t + r, r *= r); d = p.pop(); )
    if (!(!(_ = d.node) || (s = d.x0) > i || (n = d.y0) > h || (l = d.x1) < v || (u = d.y1) < o))
      if (_.length) {
        var c = (s + l) / 2, g = (n + u) / 2;
        p.push(
          new ah(_[3], c, g, l, u),
          new ah(_[2], s, g, c, u),
          new ah(_[1], c, n, l, g),
          new ah(_[0], s, n, c, g)
        ), (f = (t >= g) << 1 | e >= c) && (d = p[p.length - 1], p[p.length - 1] = p[p.length - 1 - f], p[p.length - 1 - f] = d);
      } else {
        var m = e - +this._x.call(null, _.data), x = t - +this._y.call(null, _.data), w = m * m + x * x;
        if (w < r) {
          var k = Math.sqrt(r = w);
          v = e - k, o = t - k, i = e + k, h = t + k, a = _.data;
        }
      }
  return a;
}
function K5e(e) {
  if (isNaN(i = +this._x.call(null, e)) || isNaN(h = +this._y.call(null, e))) return this;
  var t, r = this._root, a, v, o, s = this._x0, n = this._y0, l = this._x1, u = this._y1, i, h, p, _, d, f, c, g;
  if (!r) return this;
  if (r.length) for (; ; ) {
    if ((d = i >= (p = (s + l) / 2)) ? s = p : l = p, (f = h >= (_ = (n + u) / 2)) ? n = _ : u = _, t = r, !(r = r[c = f << 1 | d])) return this;
    if (!r.length) break;
    (t[c + 1 & 3] || t[c + 2 & 3] || t[c + 3 & 3]) && (a = t, g = c);
  }
  for (; r.data !== e; ) if (v = r, !(r = r.next)) return this;
  return (o = r.next) && delete r.next, v ? (o ? v.next = o : delete v.next, this) : t ? (o ? t[c] = o : delete t[c], (r = t[0] || t[1] || t[2] || t[3]) && r === (t[3] || t[2] || t[1] || t[0]) && !r.length && (a ? a[g] = r : this._root = r), this) : (this._root = o, this);
}
function J5e(e) {
  for (var t = 0, r = e.length; t < r; ++t) this.remove(e[t]);
  return this;
}
function Q5e() {
  return this._root;
}
function e6e() {
  var e = 0;
  return this.visit(function(t) {
    if (!t.length) do
      ++e;
    while (t = t.next);
  }), e;
}
function t6e(e) {
  var t = [], r, a = this._root, v, o, s, n, l;
  for (a && t.push(new ah(a, this._x0, this._y0, this._x1, this._y1)); r = t.pop(); )
    if (!e(a = r.node, o = r.x0, s = r.y0, n = r.x1, l = r.y1) && a.length) {
      var u = (o + n) / 2, i = (s + l) / 2;
      (v = a[3]) && t.push(new ah(v, u, i, n, l)), (v = a[2]) && t.push(new ah(v, o, i, u, l)), (v = a[1]) && t.push(new ah(v, u, s, n, i)), (v = a[0]) && t.push(new ah(v, o, s, u, i));
    }
  return this;
}
function n6e(e) {
  var t = [], r = [], a;
  for (this._root && t.push(new ah(this._root, this._x0, this._y0, this._x1, this._y1)); a = t.pop(); ) {
    var v = a.node;
    if (v.length) {
      var o, s = a.x0, n = a.y0, l = a.x1, u = a.y1, i = (s + l) / 2, h = (n + u) / 2;
      (o = v[0]) && t.push(new ah(o, s, n, i, h)), (o = v[1]) && t.push(new ah(o, i, n, l, h)), (o = v[2]) && t.push(new ah(o, s, h, i, u)), (o = v[3]) && t.push(new ah(o, i, h, l, u));
    }
    r.push(a);
  }
  for (; a = r.pop(); )
    e(a.node, a.x0, a.y0, a.x1, a.y1);
  return this;
}
function r6e(e) {
  return e[0];
}
function i6e(e) {
  return arguments.length ? (this._x = e, this) : this._x;
}
function a6e(e) {
  return e[1];
}
function o6e(e) {
  return arguments.length ? (this._y = e, this) : this._y;
}
function _O(e, t, r) {
  var a = new wO(t ?? r6e, r ?? a6e, NaN, NaN, NaN, NaN);
  return e == null ? a : a.addAll(e);
}
function wO(e, t, r, a, v, o) {
  this._x = e, this._y = t, this._x0 = r, this._y0 = a, this._x1 = v, this._y1 = o, this._root = void 0;
}
function MU(e) {
  for (var t = { data: e.data }, r = t; e = e.next; ) r = r.next = { data: e.data };
  return t;
}
var dh = _O.prototype = wO.prototype;
dh.copy = function() {
  var e = new wO(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, r, a;
  if (!t) return e;
  if (!t.length) return e._root = MU(t), e;
  for (r = [{ source: t, target: e._root = new Array(4) }]; t = r.pop(); )
    for (var v = 0; v < 4; ++v)
      (a = t.source[v]) && (a.length ? r.push({ source: a, target: t.target[v] = new Array(4) }) : t.target[v] = MU(a));
  return e;
};
dh.add = H5e;
dh.addAll = G5e;
dh.cover = W5e;
dh.data = Y5e;
dh.extent = Z5e;
dh.find = X5e;
dh.remove = K5e;
dh.removeAll = J5e;
dh.root = Q5e;
dh.size = e6e;
dh.visit = t6e;
dh.visitAfter = n6e;
dh.x = i6e;
dh.y = o6e;
function oh(e) {
  return function() {
    return e;
  };
}
function ig(e) {
  return (e() - 0.5) * 1e-6;
}
function s6e(e) {
  return e.x + e.vx;
}
function l6e(e) {
  return e.y + e.vy;
}
function u6e(e) {
  var t, r, a, v = 1, o = 1;
  typeof e != "function" && (e = oh(e == null ? 1 : +e));
  function s() {
    for (var u, i = t.length, h, p, _, d, f, c, g = 0; g < o; ++g)
      for (h = _O(t, s6e, l6e).visitAfter(n), u = 0; u < i; ++u)
        p = t[u], f = r[p.index], c = f * f, _ = p.x + p.vx, d = p.y + p.vy, h.visit(m);
    function m(x, w, k, S, A) {
      var C = x.data, D = x.r, L = f + D;
      if (C) {
        if (C.index > p.index) {
          var E = _ - C.x - C.vx, P = d - C.y - C.vy, I = E * E + P * P;
          I < L * L && (E === 0 && (E = ig(a), I += E * E), P === 0 && (P = ig(a), I += P * P), I = (L - (I = Math.sqrt(I))) / I * v, p.vx += (E *= I) * (L = (D *= D) / (c + D)), p.vy += (P *= I) * L, C.vx -= E * (L = 1 - L), C.vy -= P * L);
        }
        return;
      }
      return w > _ + L || S < _ - L || k > d + L || A < d - L;
    }
  }
  function n(u) {
    if (u.data) return u.r = r[u.data.index];
    for (var i = u.r = 0; i < 4; ++i)
      u[i] && u[i].r > u.r && (u.r = u[i].r);
  }
  function l() {
    if (t) {
      var u, i = t.length, h;
      for (r = new Array(i), u = 0; u < i; ++u) h = t[u], r[h.index] = +e(h, u, t);
    }
  }
  return s.initialize = function(u, i) {
    t = u, a = i, l();
  }, s.iterations = function(u) {
    return arguments.length ? (o = +u, s) : o;
  }, s.strength = function(u) {
    return arguments.length ? (v = +u, s) : v;
  }, s.radius = function(u) {
    return arguments.length ? (e = typeof u == "function" ? u : oh(+u), l(), s) : e;
  }, s;
}
function c6e(e) {
  return e.index;
}
function EU(e, t) {
  var r = e.get(t);
  if (!r) throw new Error("node not found: " + t);
  return r;
}
function f6e(e) {
  var t = c6e, r = h, a, v = oh(30), o, s, n, l, u, i = 1;
  e == null && (e = []);
  function h(c) {
    return 1 / Math.min(n[c.source.index], n[c.target.index]);
  }
  function p(c) {
    for (var g = 0, m = e.length; g < i; ++g)
      for (var x = 0, w, k, S, A, C, D, L; x < m; ++x)
        w = e[x], k = w.source, S = w.target, A = S.x + S.vx - k.x - k.vx || ig(u), C = S.y + S.vy - k.y - k.vy || ig(u), D = Math.sqrt(A * A + C * C), D = (D - o[x]) / D * c * a[x], A *= D, C *= D, S.vx -= A * (L = l[x]), S.vy -= C * L, k.vx += A * (L = 1 - L), k.vy += C * L;
  }
  function _() {
    if (s) {
      var c, g = s.length, m = e.length, x = new Map(s.map((k, S) => [t(k, S, s), k])), w;
      for (c = 0, n = new Array(g); c < m; ++c)
        w = e[c], w.index = c, typeof w.source != "object" && (w.source = EU(x, w.source)), typeof w.target != "object" && (w.target = EU(x, w.target)), n[w.source.index] = (n[w.source.index] || 0) + 1, n[w.target.index] = (n[w.target.index] || 0) + 1;
      for (c = 0, l = new Array(m); c < m; ++c)
        w = e[c], l[c] = n[w.source.index] / (n[w.source.index] + n[w.target.index]);
      a = new Array(m), d(), o = new Array(m), f();
    }
  }
  function d() {
    if (s)
      for (var c = 0, g = e.length; c < g; ++c)
        a[c] = +r(e[c], c, e);
  }
  function f() {
    if (s)
      for (var c = 0, g = e.length; c < g; ++c)
        o[c] = +v(e[c], c, e);
  }
  return p.initialize = function(c, g) {
    s = c, u = g, _();
  }, p.links = function(c) {
    return arguments.length ? (e = c, _(), p) : e;
  }, p.id = function(c) {
    return arguments.length ? (t = c, p) : t;
  }, p.iterations = function(c) {
    return arguments.length ? (i = +c, p) : i;
  }, p.strength = function(c) {
    return arguments.length ? (r = typeof c == "function" ? c : oh(+c), d(), p) : r;
  }, p.distance = function(c) {
    return arguments.length ? (v = typeof c == "function" ? c : oh(+c), f(), p) : v;
  }, p;
}
var h6e = { value: () => {
} };
function aee() {
  for (var e = 0, t = arguments.length, r = {}, a; e < t; ++e) {
    if (!(a = arguments[e] + "") || a in r || /[\s.]/.test(a)) throw new Error("illegal type: " + a);
    r[a] = [];
  }
  return new A8(r);
}
function A8(e) {
  this._ = e;
}
function d6e(e, t) {
  return e.trim().split(/^|\s+/).map(function(r) {
    var a = "", v = r.indexOf(".");
    if (v >= 0 && (a = r.slice(v + 1), r = r.slice(0, v)), r && !t.hasOwnProperty(r)) throw new Error("unknown type: " + r);
    return { type: r, name: a };
  });
}
A8.prototype = aee.prototype = {
  constructor: A8,
  on: function(e, t) {
    var r = this._, a = d6e(e + "", r), v, o = -1, s = a.length;
    if (arguments.length < 2) {
      for (; ++o < s; ) if ((v = (e = a[o]).type) && (v = p6e(r[v], e.name))) return v;
      return;
    }
    if (t != null && typeof t != "function") throw new Error("invalid callback: " + t);
    for (; ++o < s; )
      if (v = (e = a[o]).type) r[v] = CU(r[v], e.name, t);
      else if (t == null) for (v in r) r[v] = CU(r[v], e.name, null);
    return this;
  },
  copy: function() {
    var e = {}, t = this._;
    for (var r in t) e[r] = t[r].slice();
    return new A8(e);
  },
  call: function(e, t) {
    if ((v = arguments.length - 2) > 0) for (var r = new Array(v), a = 0, v, o; a < v; ++a) r[a] = arguments[a + 2];
    if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e);
    for (o = this._[e], a = 0, v = o.length; a < v; ++a) o[a].value.apply(t, r);
  },
  apply: function(e, t, r) {
    if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e);
    for (var a = this._[e], v = 0, o = a.length; v < o; ++v) a[v].value.apply(t, r);
  }
};
function p6e(e, t) {
  for (var r = 0, a = e.length, v; r < a; ++r)
    if ((v = e[r]).name === t)
      return v.value;
}
function CU(e, t, r) {
  for (var a = 0, v = e.length; a < v; ++a)
    if (e[a].name === t) {
      e[a] = h6e, e = e.slice(0, a).concat(e.slice(a + 1));
      break;
    }
  return r != null && e.push({ name: t, value: r }), e;
}
var Wx = 0, C3 = 0, J_ = 0, oee = 1e3, sk, I3, lk = 0, Sv = 0, iT = 0, Pw = typeof performance == "object" && performance.now ? performance : Date, see = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
  setTimeout(e, 17);
};
function kO() {
  return Sv || (see(m6e), Sv = Pw.now() + iT);
}
function m6e() {
  Sv = 0;
}
function uk() {
  this._call = this._time = this._next = null;
}
uk.prototype = lee.prototype = {
  constructor: uk,
  restart: function(e, t, r) {
    if (typeof e != "function") throw new TypeError("callback is not a function");
    r = (r == null ? kO() : +r) + (t == null ? 0 : +t), !this._next && I3 !== this && (I3 ? I3._next = this : sk = this, I3 = this), this._call = e, this._time = r, NC();
  },
  stop: function() {
    this._call && (this._call = null, this._time = 1 / 0, NC());
  }
};
function lee(e, t, r) {
  var a = new uk();
  return a.restart(e, t, r), a;
}
function g6e() {
  kO(), ++Wx;
  for (var e = sk, t; e; )
    (t = Sv - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
  --Wx;
}
function IU() {
  Sv = (lk = Pw.now()) + iT, Wx = C3 = 0;
  try {
    g6e();
  } finally {
    Wx = 0, v6e(), Sv = 0;
  }
}
function y6e() {
  var e = Pw.now(), t = e - lk;
  t > oee && (iT -= t, lk = e);
}
function v6e() {
  for (var e, t = sk, r, a = 1 / 0; t; )
    t._call ? (a > t._time && (a = t._time), e = t, t = t._next) : (r = t._next, t._next = null, t = e ? e._next = r : sk = r);
  I3 = e, NC(a);
}
function NC(e) {
  if (!Wx) {
    C3 && (C3 = clearTimeout(C3));
    var t = e - Sv;
    t > 24 ? (e < 1 / 0 && (C3 = setTimeout(IU, e - Pw.now() - iT)), J_ && (J_ = clearInterval(J_))) : (J_ || (lk = Pw.now(), J_ = setInterval(y6e, oee)), Wx = 1, see(IU));
  }
}
function x6e(e, t, r) {
  var a = new uk(), v = t;
  return t == null ? (a.restart(e, t, r), a) : (a._restart = a.restart, a.restart = function(o, s, n) {
    s = +s, n = n == null ? kO() : +n, a._restart(function l(u) {
      u += v, a._restart(l, v += s, n), o(u);
    }, s, n);
  }, a.restart(e, t, r), a);
}
const b6e = 1664525, _6e = 1013904223, DU = 4294967296;
function w6e() {
  let e = 1;
  return () => (e = (b6e * e + _6e) % DU) / DU;
}
function k6e(e) {
  return e.x;
}
function T6e(e) {
  return e.y;
}
var A6e = 10, S6e = Math.PI * (3 - Math.sqrt(5));
function M6e(e) {
  var t, r = 1, a = 1e-3, v = 1 - Math.pow(a, 1 / 300), o = 0, s = 0.6, n = /* @__PURE__ */ new Map(), l = lee(h), u = aee("tick", "end"), i = w6e();
  e == null && (e = []);
  function h() {
    p(), u.call("tick", t), r < a && (l.stop(), u.call("end", t));
  }
  function p(f) {
    var c, g = e.length, m;
    f === void 0 && (f = 1);
    for (var x = 0; x < f; ++x)
      for (r += (o - r) * v, n.forEach(function(w) {
        w(r);
      }), c = 0; c < g; ++c)
        m = e[c], m.fx == null ? m.x += m.vx *= s : (m.x = m.fx, m.vx = 0), m.fy == null ? m.y += m.vy *= s : (m.y = m.fy, m.vy = 0);
    return t;
  }
  function _() {
    for (var f = 0, c = e.length, g; f < c; ++f) {
      if (g = e[f], g.index = f, g.fx != null && (g.x = g.fx), g.fy != null && (g.y = g.fy), isNaN(g.x) || isNaN(g.y)) {
        var m = A6e * Math.sqrt(0.5 + f), x = f * S6e;
        g.x = m * Math.cos(x), g.y = m * Math.sin(x);
      }
      (isNaN(g.vx) || isNaN(g.vy)) && (g.vx = g.vy = 0);
    }
  }
  function d(f) {
    return f.initialize && f.initialize(e, i), f;
  }
  return _(), t = {
    tick: p,
    restart: function() {
      return l.restart(h), t;
    },
    stop: function() {
      return l.stop(), t;
    },
    nodes: function(f) {
      return arguments.length ? (e = f, _(), n.forEach(d), t) : e;
    },
    alpha: function(f) {
      return arguments.length ? (r = +f, t) : r;
    },
    alphaMin: function(f) {
      return arguments.length ? (a = +f, t) : a;
    },
    alphaDecay: function(f) {
      return arguments.length ? (v = +f, t) : +v;
    },
    alphaTarget: function(f) {
      return arguments.length ? (o = +f, t) : o;
    },
    velocityDecay: function(f) {
      return arguments.length ? (s = 1 - f, t) : 1 - s;
    },
    randomSource: function(f) {
      return arguments.length ? (i = f, n.forEach(d), t) : i;
    },
    force: function(f, c) {
      return arguments.length > 1 ? (c == null ? n.delete(f) : n.set(f, d(c)), t) : n.get(f);
    },
    find: function(f, c, g) {
      var m = 0, x = e.length, w, k, S, A, C;
      for (g == null ? g = 1 / 0 : g *= g, m = 0; m < x; ++m)
        A = e[m], w = f - A.x, k = c - A.y, S = w * w + k * k, S < g && (C = A, g = S);
      return C;
    },
    on: function(f, c) {
      return arguments.length > 1 ? (u.on(f, c), t) : u.on(f);
    }
  };
}
function E6e() {
  var e, t, r, a, v = oh(-30), o, s = 1, n = 1 / 0, l = 0.81;
  function u(_) {
    var d, f = e.length, c = _O(e, k6e, T6e).visitAfter(h);
    for (a = _, d = 0; d < f; ++d) t = e[d], c.visit(p);
  }
  function i() {
    if (e) {
      var _, d = e.length, f;
      for (o = new Array(d), _ = 0; _ < d; ++_) f = e[_], o[f.index] = +v(f, _, e);
    }
  }
  function h(_) {
    var d = 0, f, c, g = 0, m, x, w;
    if (_.length) {
      for (m = x = w = 0; w < 4; ++w)
        (f = _[w]) && (c = Math.abs(f.value)) && (d += f.value, g += c, m += c * f.x, x += c * f.y);
      _.x = m / g, _.y = x / g;
    } else {
      f = _, f.x = f.data.x, f.y = f.data.y;
      do
        d += o[f.data.index];
      while (f = f.next);
    }
    _.value = d;
  }
  function p(_, d, f, c) {
    if (!_.value) return !0;
    var g = _.x - t.x, m = _.y - t.y, x = c - d, w = g * g + m * m;
    if (x * x / l < w)
      return w < n && (g === 0 && (g = ig(r), w += g * g), m === 0 && (m = ig(r), w += m * m), w < s && (w = Math.sqrt(s * w)), t.vx += g * _.value * a / w, t.vy += m * _.value * a / w), !0;
    if (_.length || w >= n) return;
    (_.data !== t || _.next) && (g === 0 && (g = ig(r), w += g * g), m === 0 && (m = ig(r), w += m * m), w < s && (w = Math.sqrt(s * w)));
    do
      _.data !== t && (x = o[_.data.index] * a / w, t.vx += g * x, t.vy += m * x);
    while (_ = _.next);
  }
  return u.initialize = function(_, d) {
    e = _, r = d, i();
  }, u.strength = function(_) {
    return arguments.length ? (v = typeof _ == "function" ? _ : oh(+_), i(), u) : v;
  }, u.distanceMin = function(_) {
    return arguments.length ? (s = _ * _, u) : Math.sqrt(s);
  }, u.distanceMax = function(_) {
    return arguments.length ? (n = _ * _, u) : Math.sqrt(n);
  }, u.theta = function(_) {
    return arguments.length ? (l = _ * _, u) : Math.sqrt(l);
  }, u;
}
function C6e(e) {
  var t = oh(0.1), r, a, v;
  typeof e != "function" && (e = oh(e == null ? 0 : +e));
  function o(n) {
    for (var l = 0, u = r.length, i; l < u; ++l)
      i = r[l], i.vx += (v[l] - i.x) * a[l] * n;
  }
  function s() {
    if (r) {
      var n, l = r.length;
      for (a = new Array(l), v = new Array(l), n = 0; n < l; ++n)
        a[n] = isNaN(v[n] = +e(r[n], n, r)) ? 0 : +t(r[n], n, r);
    }
  }
  return o.initialize = function(n) {
    r = n, s();
  }, o.strength = function(n) {
    return arguments.length ? (t = typeof n == "function" ? n : oh(+n), s(), o) : t;
  }, o.x = function(n) {
    return arguments.length ? (e = typeof n == "function" ? n : oh(+n), s(), o) : e;
  }, o;
}
function I6e(e) {
  var t = oh(0.1), r, a, v;
  typeof e != "function" && (e = oh(e == null ? 0 : +e));
  function o(n) {
    for (var l = 0, u = r.length, i; l < u; ++l)
      i = r[l], i.vy += (v[l] - i.y) * a[l] * n;
  }
  function s() {
    if (r) {
      var n, l = r.length;
      for (a = new Array(l), v = new Array(l), n = 0; n < l; ++n)
        a[n] = isNaN(v[n] = +e(r[n], n, r)) ? 0 : +t(r[n], n, r);
    }
  }
  return o.initialize = function(n) {
    r = n, s();
  }, o.strength = function(n) {
    return arguments.length ? (t = typeof n == "function" ? n : oh(+n), s(), o) : t;
  }, o.y = function(n) {
    return arguments.length ? (e = typeof n == "function" ? n : oh(+n), s(), o) : e;
  }, o;
}
const LU = {
  center: q5e,
  collide: u6e,
  nbody: E6e,
  link: f6e,
  x: C6e,
  y: I6e
}, D3 = "forces", BC = ["alpha", "alphaMin", "alphaTarget", "velocityDecay", "forces"], D6e = ["static", "iterations"], uee = ["x", "y", "vx", "vy"];
function TO(e) {
  qr.call(this, null, e);
}
TO.Definition = {
  type: "Force",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "static",
    type: "boolean",
    default: !1
  }, {
    name: "restart",
    type: "boolean",
    default: !1
  }, {
    name: "iterations",
    type: "number",
    default: 300
  }, {
    name: "alpha",
    type: "number",
    default: 1
  }, {
    name: "alphaMin",
    type: "number",
    default: 1e-3
  }, {
    name: "alphaTarget",
    type: "number",
    default: 0
  }, {
    name: "velocityDecay",
    type: "number",
    default: 0.4
  }, {
    name: "forces",
    type: "param",
    array: !0,
    params: [{
      key: {
        force: "center"
      },
      params: [{
        name: "x",
        type: "number",
        default: 0
      }, {
        name: "y",
        type: "number",
        default: 0
      }]
    }, {
      key: {
        force: "collide"
      },
      params: [{
        name: "radius",
        type: "number",
        expr: !0
      }, {
        name: "strength",
        type: "number",
        default: 0.7
      }, {
        name: "iterations",
        type: "number",
        default: 1
      }]
    }, {
      key: {
        force: "nbody"
      },
      params: [{
        name: "strength",
        type: "number",
        default: -30,
        expr: !0
      }, {
        name: "theta",
        type: "number",
        default: 0.9
      }, {
        name: "distanceMin",
        type: "number",
        default: 1
      }, {
        name: "distanceMax",
        type: "number"
      }]
    }, {
      key: {
        force: "link"
      },
      params: [{
        name: "links",
        type: "data"
      }, {
        name: "id",
        type: "field"
      }, {
        name: "distance",
        type: "number",
        default: 30,
        expr: !0
      }, {
        name: "strength",
        type: "number",
        expr: !0
      }, {
        name: "iterations",
        type: "number",
        default: 1
      }]
    }, {
      key: {
        force: "x"
      },
      params: [{
        name: "strength",
        type: "number",
        default: 0.1
      }, {
        name: "x",
        type: "field"
      }]
    }, {
      key: {
        force: "y"
      },
      params: [{
        name: "strength",
        type: "number",
        default: 0.1
      }, {
        name: "y",
        type: "field"
      }]
    }]
  }, {
    name: "as",
    type: "string",
    array: !0,
    modify: !1,
    default: uee
  }]
};
Si(TO, qr, {
  transform(e, t) {
    var r = this.value, a = t.changed(t.ADD_REM), v = e.modified(BC), o = e.iterations || 300;
    if (r ? (a && (t.modifies("index"), r.nodes(t.source)), (v || t.changed(t.MOD)) && cee(r, e, 0, t)) : (this.value = r = P6e(t.source, e), r.on("tick", L6e(t.dataflow, this)), e.static || (a = !0, r.tick()), t.modifies("index")), v || a || e.modified(D6e) || t.changed() && e.restart) {
      if (r.alpha(Math.max(r.alpha(), e.alpha || 1)).alphaDecay(1 - Math.pow(r.alphaMin(), 1 / o)), e.static)
        for (r.stop(); --o >= 0; ) r.tick();
      else if (r.stopped() && r.restart(), !a) return t.StopPropagation;
    }
    return this.finish(e, t);
  },
  finish(e, t) {
    const r = t.dataflow;
    for (let n = this._argops, l = 0, u = n.length, i; l < u; ++l)
      if (i = n[l], !(i.name !== D3 || i.op._argval.force !== "link")) {
        for (var a = i.op._argops, v = 0, o = a.length, s; v < o; ++v)
          if (a[v].name === "links" && (s = a[v].op.source)) {
            r.pulse(s, r.changeset().reflow());
            break;
          }
      }
    return t.reflow(e.modified()).modifies(uee);
  }
});
function L6e(e, t) {
  return () => e.touch(t).run();
}
function P6e(e, t) {
  const r = M6e(e), a = r.stop, v = r.restart;
  let o = !1;
  return r.stopped = () => o, r.restart = () => (o = !1, v()), r.stop = () => (o = !0, a()), cee(r, t, !0).on("end", () => o = !0);
}
function cee(e, t, r, a) {
  var v = Ri(t.forces), o, s, n, l;
  for (o = 0, s = BC.length; o < s; ++o)
    n = BC[o], n !== D3 && t.modified(n) && e[n](t[n]);
  for (o = 0, s = v.length; o < s; ++o)
    l = D3 + o, n = r || t.modified(D3, o) ? z6e(v[o]) : a && O6e(v[o], a) ? e.force(l) : null, n && e.force(l, n);
  for (s = e.numForces || 0; o < s; ++o)
    e.force(D3 + o, null);
  return e.numForces = v.length, e;
}
function O6e(e, t) {
  var r, a;
  for (r in e)
    if (qa(a = e[r]) && t.modified(Ff(a))) return 1;
  return 0;
}
function z6e(e) {
  var t, r;
  ua(LU, e.force) || Jr("Unrecognized force: " + e.force), t = LU[e.force]();
  for (r in e)
    qa(t[r]) && R6e(t[r], e[r], e);
  return t;
}
function R6e(e, t, r) {
  e(qa(t) ? (a) => t(a, r) : t);
}
const F6e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  force: TO
}, Symbol.toStringTag, { value: "Module" }));
function N6e(e, t) {
  return e.parent === t.parent ? 1 : 2;
}
function B6e(e) {
  return e.reduce(j6e, 0) / e.length;
}
function j6e(e, t) {
  return e + t.x;
}
function U6e(e) {
  return 1 + e.reduce(V6e, 0);
}
function V6e(e, t) {
  return Math.max(e, t.y);
}
function $6e(e) {
  for (var t; t = e.children; ) e = t[0];
  return e;
}
function q6e(e) {
  for (var t; t = e.children; ) e = t[t.length - 1];
  return e;
}
function H6e() {
  var e = N6e, t = 1, r = 1, a = !1;
  function v(o) {
    var s, n = 0;
    o.eachAfter(function(p) {
      var _ = p.children;
      _ ? (p.x = B6e(_), p.y = U6e(_)) : (p.x = s ? n += e(p, s) : 0, p.y = 0, s = p);
    });
    var l = $6e(o), u = q6e(o), i = l.x - e(l, u) / 2, h = u.x + e(u, l) / 2;
    return o.eachAfter(a ? function(p) {
      p.x = (p.x - o.x) * t, p.y = (o.y - p.y) * r;
    } : function(p) {
      p.x = (p.x - i) / (h - i) * t, p.y = (1 - (o.y ? p.y / o.y : 1)) * r;
    });
  }
  return v.separation = function(o) {
    return arguments.length ? (e = o, v) : e;
  }, v.size = function(o) {
    return arguments.length ? (a = !1, t = +o[0], r = +o[1], v) : a ? null : [t, r];
  }, v.nodeSize = function(o) {
    return arguments.length ? (a = !0, t = +o[0], r = +o[1], v) : a ? [t, r] : null;
  }, v;
}
function G6e(e) {
  var t = 0, r = e.children, a = r && r.length;
  if (!a) t = 1;
  else for (; --a >= 0; ) t += r[a].value;
  e.value = t;
}
function W6e() {
  return this.eachAfter(G6e);
}
function Y6e(e, t) {
  let r = -1;
  for (const a of this)
    e.call(t, a, ++r, this);
  return this;
}
function Z6e(e, t) {
  for (var r = this, a = [r], v, o, s = -1; r = a.pop(); )
    if (e.call(t, r, ++s, this), v = r.children)
      for (o = v.length - 1; o >= 0; --o)
        a.push(v[o]);
  return this;
}
function X6e(e, t) {
  for (var r = this, a = [r], v = [], o, s, n, l = -1; r = a.pop(); )
    if (v.push(r), o = r.children)
      for (s = 0, n = o.length; s < n; ++s)
        a.push(o[s]);
  for (; r = v.pop(); )
    e.call(t, r, ++l, this);
  return this;
}
function K6e(e, t) {
  let r = -1;
  for (const a of this)
    if (e.call(t, a, ++r, this))
      return a;
}
function J6e(e) {
  return this.eachAfter(function(t) {
    for (var r = +e(t.data) || 0, a = t.children, v = a && a.length; --v >= 0; ) r += a[v].value;
    t.value = r;
  });
}
function Q6e(e) {
  return this.eachBefore(function(t) {
    t.children && t.children.sort(e);
  });
}
function e8e(e) {
  for (var t = this, r = t8e(t, e), a = [t]; t !== r; )
    t = t.parent, a.push(t);
  for (var v = a.length; e !== r; )
    a.splice(v, 0, e), e = e.parent;
  return a;
}
function t8e(e, t) {
  if (e === t) return e;
  var r = e.ancestors(), a = t.ancestors(), v = null;
  for (e = r.pop(), t = a.pop(); e === t; )
    v = e, e = r.pop(), t = a.pop();
  return v;
}
function n8e() {
  for (var e = this, t = [e]; e = e.parent; )
    t.push(e);
  return t;
}
function r8e() {
  return Array.from(this);
}
function i8e() {
  var e = [];
  return this.eachBefore(function(t) {
    t.children || e.push(t);
  }), e;
}
function a8e() {
  var e = this, t = [];
  return e.each(function(r) {
    r !== e && t.push({ source: r.parent, target: r });
  }), t;
}
function* o8e() {
  var e = this, t, r = [e], a, v, o;
  do
    for (t = r.reverse(), r = []; e = t.pop(); )
      if (yield e, a = e.children)
        for (v = 0, o = a.length; v < o; ++v)
          r.push(a[v]);
  while (r.length);
}
function AO(e, t) {
  e instanceof Map ? (e = [void 0, e], t === void 0 && (t = u8e)) : t === void 0 && (t = l8e);
  for (var r = new Yx(e), a, v = [r], o, s, n, l; a = v.pop(); )
    if ((s = t(a.data)) && (l = (s = Array.from(s)).length))
      for (a.children = s, n = l - 1; n >= 0; --n)
        v.push(o = s[n] = new Yx(s[n])), o.parent = a, o.depth = a.depth + 1;
  return r.eachBefore(fee);
}
function s8e() {
  return AO(this).eachBefore(c8e);
}
function l8e(e) {
  return e.children;
}
function u8e(e) {
  return Array.isArray(e) ? e[1] : null;
}
function c8e(e) {
  e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
}
function fee(e) {
  var t = 0;
  do
    e.height = t;
  while ((e = e.parent) && e.height < ++t);
}
function Yx(e) {
  this.data = e, this.depth = this.height = 0, this.parent = null;
}
Yx.prototype = AO.prototype = {
  constructor: Yx,
  count: W6e,
  each: Y6e,
  eachAfter: X6e,
  eachBefore: Z6e,
  find: K6e,
  sum: J6e,
  sort: Q6e,
  path: e8e,
  ancestors: n8e,
  descendants: r8e,
  leaves: i8e,
  links: a8e,
  copy: s8e,
  [Symbol.iterator]: o8e
};
function S8(e) {
  return e == null ? null : hee(e);
}
function hee(e) {
  if (typeof e != "function") throw new Error();
  return e;
}
function Wy() {
  return 0;
}
function Q2(e) {
  return function() {
    return e;
  };
}
const f8e = 1664525, h8e = 1013904223, PU = 4294967296;
function d8e() {
  let e = 1;
  return () => (e = (f8e * e + h8e) % PU) / PU;
}
function p8e(e) {
  return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function m8e(e, t) {
  let r = e.length, a, v;
  for (; r; )
    v = t() * r-- | 0, a = e[r], e[r] = e[v], e[v] = a;
  return e;
}
function g8e(e, t) {
  for (var r = 0, a = (e = m8e(Array.from(e), t)).length, v = [], o, s; r < a; )
    o = e[r], s && dee(s, o) ? ++r : (s = v8e(v = y8e(v, o)), r = 0);
  return s;
}
function y8e(e, t) {
  var r, a;
  if (lM(t, e)) return [t];
  for (r = 0; r < e.length; ++r)
    if (I6(t, e[r]) && lM(L3(e[r], t), e))
      return [e[r], t];
  for (r = 0; r < e.length - 1; ++r)
    for (a = r + 1; a < e.length; ++a)
      if (I6(L3(e[r], e[a]), t) && I6(L3(e[r], t), e[a]) && I6(L3(e[a], t), e[r]) && lM(pee(e[r], e[a], t), e))
        return [e[r], e[a], t];
  throw new Error();
}
function I6(e, t) {
  var r = e.r - t.r, a = t.x - e.x, v = t.y - e.y;
  return r < 0 || r * r < a * a + v * v;
}
function dee(e, t) {
  var r = e.r - t.r + Math.max(e.r, t.r, 1) * 1e-9, a = t.x - e.x, v = t.y - e.y;
  return r > 0 && r * r > a * a + v * v;
}
function lM(e, t) {
  for (var r = 0; r < t.length; ++r)
    if (!dee(e, t[r]))
      return !1;
  return !0;
}
function v8e(e) {
  switch (e.length) {
    case 1:
      return x8e(e[0]);
    case 2:
      return L3(e[0], e[1]);
    case 3:
      return pee(e[0], e[1], e[2]);
  }
}
function x8e(e) {
  return {
    x: e.x,
    y: e.y,
    r: e.r
  };
}
function L3(e, t) {
  var r = e.x, a = e.y, v = e.r, o = t.x, s = t.y, n = t.r, l = o - r, u = s - a, i = n - v, h = Math.sqrt(l * l + u * u);
  return {
    x: (r + o + l / h * i) / 2,
    y: (a + s + u / h * i) / 2,
    r: (h + v + n) / 2
  };
}
function pee(e, t, r) {
  var a = e.x, v = e.y, o = e.r, s = t.x, n = t.y, l = t.r, u = r.x, i = r.y, h = r.r, p = a - s, _ = a - u, d = v - n, f = v - i, c = l - o, g = h - o, m = a * a + v * v - o * o, x = m - s * s - n * n + l * l, w = m - u * u - i * i + h * h, k = _ * d - p * f, S = (d * w - f * x) / (k * 2) - a, A = (f * c - d * g) / k, C = (_ * x - p * w) / (k * 2) - v, D = (p * g - _ * c) / k, L = A * A + D * D - 1, E = 2 * (o + S * A + C * D), P = S * S + C * C - o * o, I = -(Math.abs(L) > 1e-6 ? (E + Math.sqrt(E * E - 4 * L * P)) / (2 * L) : P / E);
  return {
    x: a + S + A * I,
    y: v + C + D * I,
    r: I
  };
}
function OU(e, t, r) {
  var a = e.x - t.x, v, o, s = e.y - t.y, n, l, u = a * a + s * s;
  u ? (o = t.r + r.r, o *= o, l = e.r + r.r, l *= l, o > l ? (v = (u + l - o) / (2 * u), n = Math.sqrt(Math.max(0, l / u - v * v)), r.x = e.x - v * a - n * s, r.y = e.y - v * s + n * a) : (v = (u + o - l) / (2 * u), n = Math.sqrt(Math.max(0, o / u - v * v)), r.x = t.x + v * a - n * s, r.y = t.y + v * s + n * a)) : (r.x = t.x + r.r, r.y = t.y);
}
function zU(e, t) {
  var r = e.r + t.r - 1e-6, a = t.x - e.x, v = t.y - e.y;
  return r > 0 && r * r > a * a + v * v;
}
function RU(e) {
  var t = e._, r = e.next._, a = t.r + r.r, v = (t.x * r.r + r.x * t.r) / a, o = (t.y * r.r + r.y * t.r) / a;
  return v * v + o * o;
}
function D6(e) {
  this._ = e, this.next = null, this.previous = null;
}
function b8e(e, t) {
  if (!(o = (e = p8e(e)).length)) return 0;
  var r, a, v, o, s, n, l, u, i, h, p;
  if (r = e[0], r.x = 0, r.y = 0, !(o > 1)) return r.r;
  if (a = e[1], r.x = -a.r, a.x = r.r, a.y = 0, !(o > 2)) return r.r + a.r;
  OU(a, r, v = e[2]), r = new D6(r), a = new D6(a), v = new D6(v), r.next = v.previous = a, a.next = r.previous = v, v.next = a.previous = r;
  e: for (l = 3; l < o; ++l) {
    OU(r._, a._, v = e[l]), v = new D6(v), u = a.next, i = r.previous, h = a._.r, p = r._.r;
    do
      if (h <= p) {
        if (zU(u._, v._)) {
          a = u, r.next = a, a.previous = r, --l;
          continue e;
        }
        h += u._.r, u = u.next;
      } else {
        if (zU(i._, v._)) {
          r = i, r.next = a, a.previous = r, --l;
          continue e;
        }
        p += i._.r, i = i.previous;
      }
    while (u !== i.next);
    for (v.previous = r, v.next = a, r.next = a.previous = a = v, s = RU(r); (v = v.next) !== a; )
      (n = RU(v)) < s && (r = v, s = n);
    a = r.next;
  }
  for (r = [a._], v = a; (v = v.next) !== a; ) r.push(v._);
  for (v = g8e(r, t), l = 0; l < o; ++l) r = e[l], r.x -= v.x, r.y -= v.y;
  return v.r;
}
function _8e(e) {
  return Math.sqrt(e.value);
}
function w8e() {
  var e = null, t = 1, r = 1, a = Wy;
  function v(o) {
    const s = d8e();
    return o.x = t / 2, o.y = r / 2, e ? o.eachBefore(FU(e)).eachAfter(uM(a, 0.5, s)).eachBefore(NU(1)) : o.eachBefore(FU(_8e)).eachAfter(uM(Wy, 1, s)).eachAfter(uM(a, o.r / Math.min(t, r), s)).eachBefore(NU(Math.min(t, r) / (2 * o.r))), o;
  }
  return v.radius = function(o) {
    return arguments.length ? (e = S8(o), v) : e;
  }, v.size = function(o) {
    return arguments.length ? (t = +o[0], r = +o[1], v) : [t, r];
  }, v.padding = function(o) {
    return arguments.length ? (a = typeof o == "function" ? o : Q2(+o), v) : a;
  }, v;
}
function FU(e) {
  return function(t) {
    t.children || (t.r = Math.max(0, +e(t) || 0));
  };
}
function uM(e, t, r) {
  return function(a) {
    if (v = a.children) {
      var v, o, s = v.length, n = e(a) * t || 0, l;
      if (n) for (o = 0; o < s; ++o) v[o].r += n;
      if (l = b8e(v, r), n) for (o = 0; o < s; ++o) v[o].r -= n;
      a.r = l + n;
    }
  };
}
function NU(e) {
  return function(t) {
    var r = t.parent;
    t.r *= e, r && (t.x = r.x + e * t.x, t.y = r.y + e * t.y);
  };
}
function mee(e) {
  e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
}
function C4(e, t, r, a, v) {
  for (var o = e.children, s, n = -1, l = o.length, u = e.value && (a - t) / e.value; ++n < l; )
    s = o[n], s.y0 = r, s.y1 = v, s.x0 = t, s.x1 = t += s.value * u;
}
function k8e() {
  var e = 1, t = 1, r = 0, a = !1;
  function v(s) {
    var n = s.height + 1;
    return s.x0 = s.y0 = r, s.x1 = e, s.y1 = t / n, s.eachBefore(o(t, n)), a && s.eachBefore(mee), s;
  }
  function o(s, n) {
    return function(l) {
      l.children && C4(l, l.x0, s * (l.depth + 1) / n, l.x1, s * (l.depth + 2) / n);
      var u = l.x0, i = l.y0, h = l.x1 - r, p = l.y1 - r;
      h < u && (u = h = (u + h) / 2), p < i && (i = p = (i + p) / 2), l.x0 = u, l.y0 = i, l.x1 = h, l.y1 = p;
    };
  }
  return v.round = function(s) {
    return arguments.length ? (a = !!s, v) : a;
  }, v.size = function(s) {
    return arguments.length ? (e = +s[0], t = +s[1], v) : [e, t];
  }, v.padding = function(s) {
    return arguments.length ? (r = +s, v) : r;
  }, v;
}
var T8e = { depth: -1 }, BU = {}, cM = {};
function A8e(e) {
  return e.id;
}
function S8e(e) {
  return e.parentId;
}
function jU() {
  var e = A8e, t = S8e, r;
  function a(v) {
    var o = Array.from(v), s = e, n = t, l, u, i, h, p, _, d, f, c = /* @__PURE__ */ new Map();
    if (r != null) {
      const g = o.map((w, k) => M8e(r(w, k, v))), m = g.map(UU), x = new Set(g).add("");
      for (const w of m)
        x.has(w) || (x.add(w), g.push(w), m.push(UU(w)), o.push(cM));
      s = (w, k) => g[k], n = (w, k) => m[k];
    }
    for (i = 0, l = o.length; i < l; ++i)
      u = o[i], _ = o[i] = new Yx(u), (d = s(u, i, v)) != null && (d += "") && (f = _.id = d, c.set(f, c.has(f) ? BU : _)), (d = n(u, i, v)) != null && (d += "") && (_.parent = d);
    for (i = 0; i < l; ++i)
      if (_ = o[i], d = _.parent) {
        if (p = c.get(d), !p) throw new Error("missing: " + d);
        if (p === BU) throw new Error("ambiguous: " + d);
        p.children ? p.children.push(_) : p.children = [_], _.parent = p;
      } else {
        if (h) throw new Error("multiple roots");
        h = _;
      }
    if (!h) throw new Error("no root");
    if (r != null) {
      for (; h.data === cM && h.children.length === 1; )
        h = h.children[0], --l;
      for (let g = o.length - 1; g >= 0 && (_ = o[g], _.data === cM); --g)
        _.data = null;
    }
    if (h.parent = T8e, h.eachBefore(function(g) {
      g.depth = g.parent.depth + 1, --l;
    }).eachBefore(fee), h.parent = null, l > 0) throw new Error("cycle");
    return h;
  }
  return a.id = function(v) {
    return arguments.length ? (e = S8(v), a) : e;
  }, a.parentId = function(v) {
    return arguments.length ? (t = S8(v), a) : t;
  }, a.path = function(v) {
    return arguments.length ? (r = S8(v), a) : r;
  }, a;
}
function M8e(e) {
  e = `${e}`;
  let t = e.length;
  return jC(e, t - 1) && !jC(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
}
function UU(e) {
  let t = e.length;
  if (t < 2) return "";
  for (; --t > 1 && !jC(e, t); ) ;
  return e.slice(0, t);
}
function jC(e, t) {
  if (e[t] === "/") {
    let r = 0;
    for (; t > 0 && e[--t] === "\\"; ) ++r;
    if (!(r & 1)) return !0;
  }
  return !1;
}
function E8e(e, t) {
  return e.parent === t.parent ? 1 : 2;
}
function fM(e) {
  var t = e.children;
  return t ? t[0] : e.t;
}
function hM(e) {
  var t = e.children;
  return t ? t[t.length - 1] : e.t;
}
function C8e(e, t, r) {
  var a = r / (t.i - e.i);
  t.c -= a, t.s += r, e.c += a, t.z += r, t.m += r;
}
function I8e(e) {
  for (var t = 0, r = 0, a = e.children, v = a.length, o; --v >= 0; )
    o = a[v], o.z += t, o.m += t, t += o.s + (r += o.c);
}
function D8e(e, t, r) {
  return e.a.parent === t.parent ? e.a : r;
}
function M8(e, t) {
  this._ = e, this.parent = null, this.children = null, this.A = null, this.a = this, this.z = 0, this.m = 0, this.c = 0, this.s = 0, this.t = null, this.i = t;
}
M8.prototype = Object.create(Yx.prototype);
function L8e(e) {
  for (var t = new M8(e, 0), r, a = [t], v, o, s, n; r = a.pop(); )
    if (o = r._.children)
      for (r.children = new Array(n = o.length), s = n - 1; s >= 0; --s)
        a.push(v = r.children[s] = new M8(o[s], s)), v.parent = r;
  return (t.parent = new M8(null, 0)).children = [t], t;
}
function P8e() {
  var e = E8e, t = 1, r = 1, a = null;
  function v(u) {
    var i = L8e(u);
    if (i.eachAfter(o), i.parent.m = -i.z, i.eachBefore(s), a) u.eachBefore(l);
    else {
      var h = u, p = u, _ = u;
      u.eachBefore(function(m) {
        m.x < h.x && (h = m), m.x > p.x && (p = m), m.depth > _.depth && (_ = m);
      });
      var d = h === p ? 1 : e(h, p) / 2, f = d - h.x, c = t / (p.x + d + f), g = r / (_.depth || 1);
      u.eachBefore(function(m) {
        m.x = (m.x + f) * c, m.y = m.depth * g;
      });
    }
    return u;
  }
  function o(u) {
    var i = u.children, h = u.parent.children, p = u.i ? h[u.i - 1] : null;
    if (i) {
      I8e(u);
      var _ = (i[0].z + i[i.length - 1].z) / 2;
      p ? (u.z = p.z + e(u._, p._), u.m = u.z - _) : u.z = _;
    } else p && (u.z = p.z + e(u._, p._));
    u.parent.A = n(u, p, u.parent.A || h[0]);
  }
  function s(u) {
    u._.x = u.z + u.parent.m, u.m += u.parent.m;
  }
  function n(u, i, h) {
    if (i) {
      for (var p = u, _ = u, d = i, f = p.parent.children[0], c = p.m, g = _.m, m = d.m, x = f.m, w; d = hM(d), p = fM(p), d && p; )
        f = fM(f), _ = hM(_), _.a = u, w = d.z + m - p.z - c + e(d._, p._), w > 0 && (C8e(D8e(d, u, h), u, w), c += w, g += w), m += d.m, c += p.m, x += f.m, g += _.m;
      d && !hM(_) && (_.t = d, _.m += m - g), p && !fM(f) && (f.t = p, f.m += c - x, h = u);
    }
    return h;
  }
  function l(u) {
    u.x *= t, u.y = u.depth * r;
  }
  return v.separation = function(u) {
    return arguments.length ? (e = u, v) : e;
  }, v.size = function(u) {
    return arguments.length ? (a = !1, t = +u[0], r = +u[1], v) : a ? null : [t, r];
  }, v.nodeSize = function(u) {
    return arguments.length ? (a = !0, t = +u[0], r = +u[1], v) : a ? [t, r] : null;
  }, v;
}
function aT(e, t, r, a, v) {
  for (var o = e.children, s, n = -1, l = o.length, u = e.value && (v - r) / e.value; ++n < l; )
    s = o[n], s.x0 = t, s.x1 = a, s.y0 = r, s.y1 = r += s.value * u;
}
var gee = (1 + Math.sqrt(5)) / 2;
function yee(e, t, r, a, v, o) {
  for (var s = [], n = t.children, l, u, i = 0, h = 0, p = n.length, _, d, f = t.value, c, g, m, x, w, k, S; i < p; ) {
    _ = v - r, d = o - a;
    do
      c = n[h++].value;
    while (!c && h < p);
    for (g = m = c, k = Math.max(d / _, _ / d) / (f * e), S = c * c * k, w = Math.max(m / S, S / g); h < p; ++h) {
      if (c += u = n[h].value, u < g && (g = u), u > m && (m = u), S = c * c * k, x = Math.max(m / S, S / g), x > w) {
        c -= u;
        break;
      }
      w = x;
    }
    s.push(l = { value: c, dice: _ < d, children: n.slice(i, h) }), l.dice ? C4(l, r, a, v, f ? a += d * c / f : o) : aT(l, r, a, f ? r += _ * c / f : v, o), f -= c, i = h;
  }
  return s;
}
const vee = function e(t) {
  function r(a, v, o, s, n) {
    yee(t, a, v, o, s, n);
  }
  return r.ratio = function(a) {
    return e((a = +a) > 1 ? a : 1);
  }, r;
}(gee);
function O8e() {
  var e = vee, t = !1, r = 1, a = 1, v = [0], o = Wy, s = Wy, n = Wy, l = Wy, u = Wy;
  function i(p) {
    return p.x0 = p.y0 = 0, p.x1 = r, p.y1 = a, p.eachBefore(h), v = [0], t && p.eachBefore(mee), p;
  }
  function h(p) {
    var _ = v[p.depth], d = p.x0 + _, f = p.y0 + _, c = p.x1 - _, g = p.y1 - _;
    c < d && (d = c = (d + c) / 2), g < f && (f = g = (f + g) / 2), p.x0 = d, p.y0 = f, p.x1 = c, p.y1 = g, p.children && (_ = v[p.depth + 1] = o(p) / 2, d += u(p) - _, f += s(p) - _, c -= n(p) - _, g -= l(p) - _, c < d && (d = c = (d + c) / 2), g < f && (f = g = (f + g) / 2), e(p, d, f, c, g));
  }
  return i.round = function(p) {
    return arguments.length ? (t = !!p, i) : t;
  }, i.size = function(p) {
    return arguments.length ? (r = +p[0], a = +p[1], i) : [r, a];
  }, i.tile = function(p) {
    return arguments.length ? (e = hee(p), i) : e;
  }, i.padding = function(p) {
    return arguments.length ? i.paddingInner(p).paddingOuter(p) : i.paddingInner();
  }, i.paddingInner = function(p) {
    return arguments.length ? (o = typeof p == "function" ? p : Q2(+p), i) : o;
  }, i.paddingOuter = function(p) {
    return arguments.length ? i.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p) : i.paddingTop();
  }, i.paddingTop = function(p) {
    return arguments.length ? (s = typeof p == "function" ? p : Q2(+p), i) : s;
  }, i.paddingRight = function(p) {
    return arguments.length ? (n = typeof p == "function" ? p : Q2(+p), i) : n;
  }, i.paddingBottom = function(p) {
    return arguments.length ? (l = typeof p == "function" ? p : Q2(+p), i) : l;
  }, i.paddingLeft = function(p) {
    return arguments.length ? (u = typeof p == "function" ? p : Q2(+p), i) : u;
  }, i;
}
function z8e(e, t, r, a, v) {
  var o = e.children, s, n = o.length, l, u = new Array(n + 1);
  for (u[0] = l = s = 0; s < n; ++s)
    u[s + 1] = l += o[s].value;
  i(0, n, e.value, t, r, a, v);
  function i(h, p, _, d, f, c, g) {
    if (h >= p - 1) {
      var m = o[h];
      m.x0 = d, m.y0 = f, m.x1 = c, m.y1 = g;
      return;
    }
    for (var x = u[h], w = _ / 2 + x, k = h + 1, S = p - 1; k < S; ) {
      var A = k + S >>> 1;
      u[A] < w ? k = A + 1 : S = A;
    }
    w - u[k - 1] < u[k] - w && h + 1 < k && --k;
    var C = u[k] - x, D = _ - C;
    if (c - d > g - f) {
      var L = _ ? (d * D + c * C) / _ : c;
      i(h, k, C, d, f, L, g), i(k, p, D, L, f, c, g);
    } else {
      var E = _ ? (f * D + g * C) / _ : g;
      i(h, k, C, d, f, c, E), i(k, p, D, d, E, c, g);
    }
  }
}
function R8e(e, t, r, a, v) {
  (e.depth & 1 ? aT : C4)(e, t, r, a, v);
}
const F8e = function e(t) {
  function r(a, v, o, s, n) {
    if ((l = a._squarify) && l.ratio === t)
      for (var l, u, i, h, p = -1, _, d = l.length, f = a.value; ++p < d; ) {
        for (u = l[p], i = u.children, h = u.value = 0, _ = i.length; h < _; ++h) u.value += i[h].value;
        u.dice ? C4(u, v, o, s, f ? o += (n - o) * u.value / f : n) : aT(u, v, o, f ? v += (s - v) * u.value / f : s, n), f -= u.value;
      }
    else
      a._squarify = l = yee(t, a, v, o, s, n), l.ratio = t;
  }
  return r.ratio = function(a) {
    return e((a = +a) > 1 ? a : 1);
  }, r;
}(gee);
function UC(e, t, r) {
  const a = {};
  return e.each((v) => {
    const o = v.data;
    r(o) && (a[t(o)] = v);
  }), e.lookup = a, e;
}
function SO(e) {
  qr.call(this, null, e);
}
SO.Definition = {
  type: "Nest",
  metadata: {
    treesource: !0,
    changes: !0
  },
  params: [{
    name: "keys",
    type: "field",
    array: !0
  }, {
    name: "generate",
    type: "boolean"
  }]
};
const N8e = (e) => e.values;
Si(SO, qr, {
  transform(e, t) {
    t.source || Jr("Nest transform requires an upstream data source.");
    var r = e.generate, a = e.modified(), v = t.clone(), o = this.value;
    return (!o || a || t.changed()) && (o && o.each((s) => {
      s.children && x9(s.data) && v.rem.push(s.data);
    }), this.value = o = AO({
      values: Ri(e.keys).reduce((s, n) => (s.key(n), s), B8e()).entries(v.source)
    }, N8e), r && o.each((s) => {
      s.children && (s = rs(s.data), v.add.push(s), v.source.push(s));
    }), UC(o, sa, sa)), v.source.root = o, v;
  }
});
function B8e() {
  const e = [], t = {
    entries: (v) => a(r(v, 0), 0),
    key: (v) => (e.push(v), t)
  };
  function r(v, o) {
    if (o >= e.length)
      return v;
    const s = v.length, n = e[o++], l = {}, u = {};
    let i = -1, h, p, _;
    for (; ++i < s; )
      h = n(p = v[i]) + "", (_ = l[h]) ? _.push(p) : l[h] = [p];
    for (h in l)
      u[h] = r(l[h], o);
    return u;
  }
  function a(v, o) {
    if (++o > e.length) return v;
    const s = [];
    for (const n in v)
      s.push({
        key: n,
        values: a(v[n], o)
      });
    return s;
  }
  return t;
}
function Km(e) {
  qr.call(this, null, e);
}
const j8e = (e, t) => e.parent === t.parent ? 1 : 2;
Si(Km, qr, {
  transform(e, t) {
    (!t.source || !t.source.root) && Jr(this.constructor.name + " transform requires a backing tree data source.");
    const r = this.layout(e.method), a = this.fields, v = t.source.root, o = e.as || a;
    e.field ? v.sum(e.field) : v.count(), e.sort && v.sort(qv(e.sort, (s) => s.data)), U8e(r, this.params, e), r.separation && r.separation(e.separation !== !1 ? j8e : vb);
    try {
      this.value = r(v);
    } catch (s) {
      Jr(s);
    }
    return v.each((s) => V8e(s, a, o)), t.reflow(e.modified()).modifies(o).modifies("leaf");
  }
});
function U8e(e, t, r) {
  for (let a, v = 0, o = t.length; v < o; ++v)
    a = t[v], a in r && e[a](r[a]);
}
function V8e(e, t, r) {
  const a = e.data, v = t.length - 1;
  for (let o = 0; o < v; ++o)
    a[r[o]] = e[t[o]];
  a[r[v]] = e.children ? e.children.length : 0;
}
const VC = ["x", "y", "r", "depth", "children"];
function MO(e) {
  Km.call(this, e);
}
MO.Definition = {
  type: "Pack",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "radius",
    type: "field",
    default: null
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: VC.length,
    default: VC
  }]
};
Si(MO, Km, {
  layout: w8e,
  params: ["radius", "size", "padding"],
  fields: VC
});
const $C = ["x0", "y0", "x1", "y1", "depth", "children"];
function EO(e) {
  Km.call(this, e);
}
EO.Definition = {
  type: "Partition",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "round",
    type: "boolean",
    default: !1
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: $C.length,
    default: $C
  }]
};
Si(EO, Km, {
  layout: k8e,
  params: ["size", "round", "padding"],
  fields: $C
});
function CO(e) {
  qr.call(this, null, e);
}
CO.Definition = {
  type: "Stratify",
  metadata: {
    treesource: !0
  },
  params: [{
    name: "key",
    type: "field",
    required: !0
  }, {
    name: "parentKey",
    type: "field",
    required: !0
  }]
};
Si(CO, qr, {
  transform(e, t) {
    t.source || Jr("Stratify transform requires an upstream data source.");
    let r = this.value;
    const a = e.modified(), v = t.fork(t.ALL).materialize(t.SOURCE), o = !r || a || t.changed(t.ADD_REM) || t.modified(e.key.fields) || t.modified(e.parentKey.fields);
    return v.source = v.source.slice(), o && (r = v.source.length ? UC(jU().id(e.key).parentId(e.parentKey)(v.source), e.key, Ld) : UC(jU()([{}]), e.key, e.key)), v.source.root = this.value = r, v;
  }
});
const VU = {
  tidy: P8e,
  cluster: H6e
}, qC = ["x", "y", "depth", "children"];
function IO(e) {
  Km.call(this, e);
}
IO.Definition = {
  type: "Tree",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "method",
    type: "enum",
    default: "tidy",
    values: ["tidy", "cluster"]
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "nodeSize",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "separation",
    type: "boolean",
    default: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: qC.length,
    default: qC
  }]
};
Si(IO, Km, {
  /**
   * Tree layout generator. Supports both 'tidy' and 'cluster' layouts.
   */
  layout(e) {
    const t = e || "tidy";
    if (ua(VU, t)) return VU[t]();
    Jr("Unrecognized Tree layout method: " + t);
  },
  params: ["size", "nodeSize"],
  fields: qC
});
function DO(e) {
  qr.call(this, [], e);
}
DO.Definition = {
  type: "TreeLinks",
  metadata: {
    tree: !0,
    generates: !0,
    changes: !0
  },
  params: []
};
Si(DO, qr, {
  transform(e, t) {
    const r = this.value, a = t.source && t.source.root, v = t.fork(t.NO_SOURCE), o = {};
    return a || Jr("TreeLinks transform requires a tree data source."), t.changed(t.ADD_REM) ? (v.rem = r, t.visit(t.SOURCE, (s) => o[sa(s)] = 1), a.each((s) => {
      const n = s.data, l = s.parent && s.parent.data;
      l && o[sa(n)] && o[sa(l)] && v.add.push(rs({
        source: l,
        target: n
      }));
    }), this.value = v.add) : t.changed(t.MOD) && (t.visit(t.MOD, (s) => o[sa(s)] = 1), r.forEach((s) => {
      (o[sa(s.source)] || o[sa(s.target)]) && v.mod.push(s);
    })), v;
  }
});
const $U = {
  binary: z8e,
  dice: C4,
  slice: aT,
  slicedice: R8e,
  squarify: vee,
  resquarify: F8e
}, HC = ["x0", "y0", "x1", "y1", "depth", "children"];
function LO(e) {
  Km.call(this, e);
}
LO.Definition = {
  type: "Treemap",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "method",
    type: "enum",
    default: "squarify",
    values: ["squarify", "resquarify", "binary", "dice", "slice", "slicedice"]
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "paddingInner",
    type: "number",
    default: 0
  }, {
    name: "paddingOuter",
    type: "number",
    default: 0
  }, {
    name: "paddingTop",
    type: "number",
    default: 0
  }, {
    name: "paddingRight",
    type: "number",
    default: 0
  }, {
    name: "paddingBottom",
    type: "number",
    default: 0
  }, {
    name: "paddingLeft",
    type: "number",
    default: 0
  }, {
    name: "ratio",
    type: "number",
    default: 1.618033988749895
  }, {
    name: "round",
    type: "boolean",
    default: !1
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: HC.length,
    default: HC
  }]
};
Si(LO, Km, {
  /**
   * Treemap layout generator. Adds 'method' and 'ratio' parameters
   * to configure the underlying tile method.
   */
  layout() {
    const e = O8e();
    return e.ratio = (t) => {
      const r = e.tile();
      r.ratio && e.tile(r.ratio(t));
    }, e.method = (t) => {
      ua($U, t) ? e.tile($U[t]) : Jr("Unrecognized Treemap layout method: " + t);
    }, e;
  },
  params: ["method", "ratio", "size", "round", "padding", "paddingInner", "paddingOuter", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
  fields: HC
});
const $8e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  nest: SO,
  pack: MO,
  partition: EO,
  stratify: CO,
  tree: IO,
  treelinks: DO,
  treemap: LO
}, Symbol.toStringTag, { value: "Module" })), dM = 4278190080;
function q8e(e, t) {
  const r = e.bitmap();
  return (t || []).forEach((a) => r.set(e(a.boundary[0]), e(a.boundary[3]))), [r, void 0];
}
function H8e(e, t, r, a, v) {
  const o = e.width, s = e.height, n = a || v, l = cg(o, s).getContext("2d"), u = cg(o, s).getContext("2d"), i = n && cg(o, s).getContext("2d");
  r.forEach((C) => E8(l, C, !1)), E8(u, t, !1), n && E8(i, t, !0);
  const h = pM(l, o, s), p = pM(u, o, s), _ = n && pM(i, o, s), d = e.bitmap(), f = n && e.bitmap();
  let c, g, m, x, w, k, S, A;
  for (g = 0; g < s; ++g)
    for (c = 0; c < o; ++c)
      w = g * o + c, k = h[w] & dM, A = p[w] & dM, S = n && _[w] & dM, (k || S || A) && (m = e(c), x = e(g), !v && (k || A) && d.set(m, x), n && (k || S) && f.set(m, x));
  return [d, f];
}
function pM(e, t, r) {
  return new Uint32Array(e.getImageData(0, 0, t, r).data.buffer);
}
function E8(e, t, r) {
  if (!t.length) return;
  const a = t[0].mark.marktype;
  a === "group" ? t.forEach((v) => {
    v.items.forEach((o) => E8(e, o.items, r));
  }) : sd[a].draw(e, {
    items: r ? t.map(G8e) : t
  });
}
function G8e(e) {
  const t = b9(e, {});
  return t.stroke && t.strokeOpacity !== 0 || t.fill && t.fillOpacity !== 0 ? {
    ...t,
    strokeOpacity: 1,
    stroke: "#000",
    fillOpacity: 0
  } : t;
}
const pm = 5, Zf = 31, Ow = 32, V1 = new Uint32Array(Ow + 1), ip = new Uint32Array(Ow + 1);
ip[0] = 0;
V1[0] = ~ip[0];
for (let e = 1; e <= Ow; ++e)
  ip[e] = ip[e - 1] << 1 | 1, V1[e] = ~ip[e];
function W8e(e, t) {
  const r = new Uint32Array(~~((e * t + Ow) / Ow));
  function a(o, s) {
    r[o] |= s;
  }
  function v(o, s) {
    r[o] &= s;
  }
  return {
    array: r,
    get: (o, s) => {
      const n = s * e + o;
      return r[n >>> pm] & 1 << (n & Zf);
    },
    set: (o, s) => {
      const n = s * e + o;
      a(n >>> pm, 1 << (n & Zf));
    },
    clear: (o, s) => {
      const n = s * e + o;
      v(n >>> pm, ~(1 << (n & Zf)));
    },
    getRange: (o, s, n, l) => {
      let u = l, i, h, p, _;
      for (; u >= s; --u)
        if (i = u * e + o, h = u * e + n, p = i >>> pm, _ = h >>> pm, p === _) {
          if (r[p] & V1[i & Zf] & ip[(h & Zf) + 1])
            return !0;
        } else {
          if (r[p] & V1[i & Zf] || r[_] & ip[(h & Zf) + 1]) return !0;
          for (let d = p + 1; d < _; ++d)
            if (r[d]) return !0;
        }
      return !1;
    },
    setRange: (o, s, n, l) => {
      let u, i, h, p, _;
      for (; s <= l; ++s)
        if (u = s * e + o, i = s * e + n, h = u >>> pm, p = i >>> pm, h === p)
          a(h, V1[u & Zf] & ip[(i & Zf) + 1]);
        else
          for (a(h, V1[u & Zf]), a(p, ip[(i & Zf) + 1]), _ = h + 1; _ < p; ++_) a(_, 4294967295);
    },
    clearRange: (o, s, n, l) => {
      let u, i, h, p, _;
      for (; s <= l; ++s)
        if (u = s * e + o, i = s * e + n, h = u >>> pm, p = i >>> pm, h === p)
          v(h, ip[u & Zf] | V1[(i & Zf) + 1]);
        else
          for (v(h, ip[u & Zf]), v(p, V1[(i & Zf) + 1]), _ = h + 1; _ < p; ++_) v(_, 0);
    },
    outOfBounds: (o, s, n, l) => o < 0 || s < 0 || l >= t || n >= e
  };
}
function Y8e(e, t, r) {
  const a = Math.max(1, Math.sqrt(e * t / 1e6)), v = ~~((e + 2 * r + a) / a), o = ~~((t + 2 * r + a) / a), s = (n) => ~~((n + r) / a);
  return s.invert = (n) => n * a - r, s.bitmap = () => W8e(v, o), s.ratio = a, s.padding = r, s.width = e, s.height = t, s;
}
function Z8e(e, t, r, a) {
  const v = e.width, o = e.height;
  return function(s) {
    const n = s.datum.datum.items[a].items, l = n.length, u = s.datum.fontSize, i = td.width(s.datum, s.datum.text);
    let h = 0, p, _, d, f, c, g, m;
    for (let x = 0; x < l; ++x)
      p = n[x].x, d = n[x].y, _ = n[x].x2 === void 0 ? p : n[x].x2, f = n[x].y2 === void 0 ? d : n[x].y2, c = (p + _) / 2, g = (d + f) / 2, m = Math.abs(_ - p + f - d), m >= h && (h = m, s.x = c, s.y = g);
    return c = i / 2, g = u / 2, p = s.x - c, _ = s.x + c, d = s.y - g, f = s.y + g, s.align = "center", p < 0 && _ <= v ? s.align = "left" : 0 <= p && v < _ && (s.align = "right"), s.baseline = "middle", d < 0 && f <= o ? s.baseline = "top" : 0 <= d && o < f && (s.baseline = "bottom"), !0;
  };
}
function ck(e, t, r, a, v, o) {
  let s = r / 2;
  return e - s < 0 || e + s > v || t - (s = a / 2) < 0 || t + s > o;
}
function ag(e, t, r, a, v, o, s, n) {
  const l = v * o / (a * 2), u = e(t - l), i = e(t + l), h = e(r - (o = o / 2)), p = e(r + o);
  return s.outOfBounds(u, h, i, p) || s.getRange(u, h, i, p) || n && n.getRange(u, h, i, p);
}
function X8e(e, t, r, a) {
  const v = e.width, o = e.height, s = t[0], n = t[1];
  function l(u, i, h, p, _) {
    const d = e.invert(u), f = e.invert(i);
    let c = h, g = o, m;
    if (!ck(d, f, p, _, v, o) && !ag(e, d, f, _, p, c, s, n) && !ag(e, d, f, _, p, _, s, null)) {
      for (; g - c >= 1; )
        m = (c + g) / 2, ag(e, d, f, _, p, m, s, n) ? g = m : c = m;
      if (c > h)
        return [d, f, c, !0];
    }
  }
  return function(u) {
    const i = u.datum.datum.items[a].items, h = i.length, p = u.datum.fontSize, _ = td.width(u.datum, u.datum.text);
    let d = r ? p : 0, f = !1, c = !1, g = 0, m, x, w, k, S, A, C, D, L, E, P, I, M, O, T, z, F;
    for (let U = 0; U < h; ++U) {
      for (m = i[U].x, w = i[U].y, x = i[U].x2 === void 0 ? m : i[U].x2, k = i[U].y2 === void 0 ? w : i[U].y2, m > x && (F = m, m = x, x = F), w > k && (F = w, w = k, k = F), L = e(m), P = e(x), E = ~~((L + P) / 2), I = e(w), O = e(k), M = ~~((I + O) / 2), C = E; C >= L; --C)
        for (D = M; D >= I; --D)
          z = l(C, D, d, _, p), z && ([u.x, u.y, d, f] = z);
      for (C = E; C <= P; ++C)
        for (D = M; D <= O; ++D)
          z = l(C, D, d, _, p), z && ([u.x, u.y, d, f] = z);
      !f && !r && (T = Math.abs(x - m + k - w), S = (m + x) / 2, A = (w + k) / 2, T >= g && !ck(S, A, _, p, v, o) && !ag(e, S, A, p, _, p, s, null) && (g = T, u.x = S, u.y = A, c = !0));
    }
    return f || c ? (S = _ / 2, A = p / 2, s.setRange(e(u.x - S), e(u.y - A), e(u.x + S), e(u.y + A)), u.align = "center", u.baseline = "middle", !0) : !1;
  };
}
const K8e = [-1, -1, 1, 1], J8e = [-1, 1, -1, 1];
function Q8e(e, t, r, a) {
  const v = e.width, o = e.height, s = t[0], n = t[1], l = e.bitmap();
  return function(u) {
    const i = u.datum.datum.items[a].items, h = i.length, p = u.datum.fontSize, _ = td.width(u.datum, u.datum.text), d = [];
    let f = r ? p : 0, c = !1, g = !1, m = 0, x, w, k, S, A, C, D, L, E, P, I, M;
    for (let O = 0; O < h; ++O) {
      for (x = i[O].x, k = i[O].y, w = i[O].x2 === void 0 ? x : i[O].x2, S = i[O].y2 === void 0 ? k : i[O].y2, d.push([e((x + w) / 2), e((k + S) / 2)]); d.length; )
        if ([D, L] = d.pop(), !(s.get(D, L) || n.get(D, L) || l.get(D, L))) {
          l.set(D, L);
          for (let T = 0; T < 4; ++T)
            A = D + K8e[T], C = L + J8e[T], l.outOfBounds(A, C, A, C) || d.push([A, C]);
          if (A = e.invert(D), C = e.invert(L), E = f, P = o, !ck(A, C, _, p, v, o) && !ag(e, A, C, p, _, E, s, n) && !ag(e, A, C, p, _, p, s, null)) {
            for (; P - E >= 1; )
              I = (E + P) / 2, ag(e, A, C, p, _, I, s, n) ? P = I : E = I;
            E > f && (u.x = A, u.y = C, f = E, c = !0);
          }
        }
      !c && !r && (M = Math.abs(w - x + S - k), A = (x + w) / 2, C = (k + S) / 2, M >= m && !ck(A, C, _, p, v, o) && !ag(e, A, C, p, _, p, s, null) && (m = M, u.x = A, u.y = C, g = !0));
    }
    return c || g ? (A = _ / 2, C = p / 2, s.setRange(e(u.x - A), e(u.y - C), e(u.x + A), e(u.y + C)), u.align = "center", u.baseline = "middle", !0) : !1;
  };
}
const e7e = ["right", "center", "left"], t7e = ["bottom", "middle", "top"];
function n7e(e, t, r, a) {
  const v = e.width, o = e.height, s = t[0], n = t[1], l = a.length;
  return function(u) {
    const i = u.boundary, h = u.datum.fontSize;
    if (i[2] < 0 || i[5] < 0 || i[0] > v || i[3] > o)
      return !1;
    let p = u.textWidth ?? 0, _, d, f, c, g, m, x, w, k, S, A, C, D, L, E;
    for (let P = 0; P < l; ++P) {
      if (_ = (r[P] & 3) - 1, d = (r[P] >>> 2 & 3) - 1, f = _ === 0 && d === 0 || a[P] < 0, c = _ && d ? Math.SQRT1_2 : 1, g = a[P] < 0 ? -1 : 1, m = i[1 + _] + a[P] * _ * c, A = i[4 + d] + g * h * d / 2 + a[P] * d * c, w = A - h / 2, k = A + h / 2, C = e(m), L = e(w), E = e(k), !p)
        if (qU(C, C, L, E, s, n, m, m, w, k, i, f))
          p = td.width(u.datum, u.datum.text);
        else
          continue;
      if (S = m + g * p * _ / 2, m = S - p / 2, x = S + p / 2, C = e(m), D = e(x), qU(C, D, L, E, s, n, m, x, w, k, i, f))
        return u.x = _ ? _ * g < 0 ? x : m : S, u.y = d ? d * g < 0 ? k : w : A, u.align = e7e[_ * g + 1], u.baseline = t7e[d * g + 1], s.setRange(C, L, D, E), !0;
    }
    return !1;
  };
}
function qU(e, t, r, a, v, o, s, n, l, u, i, h) {
  return !(v.outOfBounds(e, r, t, a) || (h && o || v).getRange(e, r, t, a));
}
const mM = 0, gM = 4, yM = 8, vM = 0, xM = 1, bM = 2, r7e = {
  "top-left": mM + vM,
  top: mM + xM,
  "top-right": mM + bM,
  left: gM + vM,
  middle: gM + xM,
  right: gM + bM,
  "bottom-left": yM + vM,
  bottom: yM + xM,
  "bottom-right": yM + bM
}, i7e = {
  naive: Z8e,
  "reduced-search": X8e,
  floodfill: Q8e
};
function a7e(e, t, r, a, v, o, s, n, l, u, i) {
  if (!e.length) return e;
  const h = Math.max(a.length, v.length), p = o7e(a, h), _ = s7e(v, h), d = l7e(e[0].datum), f = d === "group" && e[0].datum.items[l].marktype, c = f === "area", g = u7e(d, f, n, l), m = u === null || u === 1 / 0, x = c && i === "naive";
  let w = -1, k = -1;
  const S = e.map((L) => {
    const E = m ? td.width(L, L.text) : void 0;
    return w = Math.max(w, E), k = Math.max(k, L.fontSize), {
      datum: L,
      opacity: 0,
      x: void 0,
      y: void 0,
      align: void 0,
      baseline: void 0,
      boundary: g(L),
      textWidth: E
    };
  });
  u = u === null || u === 1 / 0 ? Math.max(w, k) + Math.max(...a) : u;
  const A = Y8e(t[0], t[1], u);
  let C;
  if (!x) {
    r && S.sort((P, I) => r(P.datum, I.datum));
    let L = !1;
    for (let P = 0; P < _.length && !L; ++P)
      L = _[P] === 5 || p[P] < 0;
    const E = (d && s || c) && e.map((P) => P.datum);
    C = o.length || E ? H8e(A, E || [], o, L, c) : q8e(A, s && S);
  }
  const D = c ? i7e[i](A, C, s, l) : n7e(A, C, _, p);
  return S.forEach((L) => L.opacity = +D(L)), S;
}
function o7e(e, t) {
  const r = new Float64Array(t), a = e.length;
  for (let v = 0; v < a; ++v) r[v] = e[v] || 0;
  for (let v = a; v < t; ++v) r[v] = r[a - 1];
  return r;
}
function s7e(e, t) {
  const r = new Int8Array(t), a = e.length;
  for (let v = 0; v < a; ++v) r[v] |= r7e[e[v]];
  for (let v = a; v < t; ++v) r[v] = r[a - 1];
  return r;
}
function l7e(e) {
  return e && e.mark && e.mark.marktype;
}
function u7e(e, t, r, a) {
  const v = (o) => [o.x, o.x, o.x, o.y, o.y, o.y];
  return e ? e === "line" || e === "area" ? (o) => v(o.datum) : t === "line" ? (o) => {
    const s = o.datum.items[a].items;
    return v(s.length ? s[r === "start" ? 0 : s.length - 1] : {
      x: NaN,
      y: NaN
    });
  } : (o) => {
    const s = o.datum.bounds;
    return [s.x1, (s.x1 + s.x2) / 2, s.x2, s.y1, (s.y1 + s.y2) / 2, s.y2];
  } : v;
}
const GC = ["x", "y", "opacity", "align", "baseline"], xee = ["top-left", "left", "bottom-left", "top", "bottom", "top-right", "right", "bottom-right"];
function PO(e) {
  qr.call(this, null, e);
}
PO.Definition = {
  type: "Label",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "anchor",
    type: "string",
    array: !0,
    default: xee
  }, {
    name: "offset",
    type: "number",
    array: !0,
    default: [1]
  }, {
    name: "padding",
    type: "number",
    default: 0,
    null: !0
  }, {
    name: "lineAnchor",
    type: "string",
    values: ["start", "end"],
    default: "end"
  }, {
    name: "markIndex",
    type: "number",
    default: 0
  }, {
    name: "avoidBaseMark",
    type: "boolean",
    default: !0
  }, {
    name: "avoidMarks",
    type: "data",
    array: !0
  }, {
    name: "method",
    type: "string",
    default: "naive"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: GC.length,
    default: GC
  }]
};
Si(PO, qr, {
  transform(e, t) {
    function r(o) {
      const s = e[o];
      return qa(s) && t.modified(s.fields);
    }
    const a = e.modified();
    if (!(a || t.changed(t.ADD_REM) || r("sort"))) return;
    (!e.size || e.size.length !== 2) && Jr("Size parameter should be specified as a [width, height] array.");
    const v = e.as || GC;
    return a7e(t.materialize(t.SOURCE).source || [], e.size, e.sort, Ri(e.offset == null ? 1 : e.offset), Ri(e.anchor || xee), e.avoidMarks || [], e.avoidBaseMark !== !1, e.lineAnchor || "end", e.markIndex || 0, e.padding === void 0 ? 0 : e.padding, e.method || "naive").forEach((o) => {
      const s = o.datum;
      s[v[0]] = o.x, s[v[1]] = o.y, s[v[2]] = o.opacity, s[v[3]] = o.align, s[v[4]] = o.baseline;
    }), t.reflow(a).modifies(v);
  }
});
const c7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  label: PO
}, Symbol.toStringTag, { value: "Module" }));
function bee(e, t) {
  var r = [], a = function(i) {
    return i(n);
  }, v, o, s, n, l, u;
  if (t == null)
    r.push(e);
  else
    for (v = {}, o = 0, s = e.length; o < s; ++o)
      n = e[o], l = t.map(a), u = v[l], u || (v[l] = u = [], u.dims = l, r.push(u)), u.push(n);
  return r;
}
function OO(e) {
  qr.call(this, null, e);
}
OO.Definition = {
  type: "Loess",
  metadata: {
    generates: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "bandwidth",
    type: "number",
    default: 0.3
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
Si(OO, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const a = t.materialize(t.SOURCE).source, v = bee(a, e.groupby), o = (e.groupby || []).map(Lu), s = o.length, n = e.as || [Lu(e.x), Lu(e.y)], l = [];
      v.forEach((u) => {
        MZ(u, e.x, e.y, e.bandwidth || 0.3).forEach((i) => {
          const h = {};
          for (let p = 0; p < s; ++p)
            h[o[p]] = u.dims[p];
          h[n[0]] = i[0], h[n[1]] = i[1], l.push(rs(h));
        });
      }), this.value && (r.rem = this.value), this.value = r.add = r.source = l;
    }
    return r;
  }
});
const WC = {
  constant: mL,
  linear: gL,
  log: kZ,
  exp: TZ,
  pow: AZ,
  quad: yL,
  poly: SZ
}, f7e = (e, t) => e === "poly" ? t : e === "quad" ? 2 : 1;
function zO(e) {
  qr.call(this, null, e);
}
zO.Definition = {
  type: "Regression",
  metadata: {
    generates: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "method",
    type: "string",
    default: "linear",
    values: Object.keys(WC)
  }, {
    name: "order",
    type: "number",
    default: 3
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "params",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
Si(zO, qr, {
  transform(e, t) {
    const r = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const a = t.materialize(t.SOURCE).source, v = bee(a, e.groupby), o = (e.groupby || []).map(Lu), s = e.method || "linear", n = e.order == null ? 3 : e.order, l = f7e(s, n), u = e.as || [Lu(e.x), Lu(e.y)], i = WC[s], h = [];
      let p = e.extent;
      ua(WC, s) || Jr("Invalid regression method: " + s), p != null && s === "log" && p[0] <= 0 && (t.dataflow.warn("Ignoring extent with values <= 0 for log regression."), p = null), v.forEach((_) => {
        if (_.length <= l) {
          t.dataflow.warn("Skipping regression with more parameters than data points.");
          return;
        }
        const f = i(_, e.x, e.y, n);
        if (e.params) {
          h.push(rs({
            keys: _.dims,
            coef: f.coef,
            rSquared: f.rSquared
          }));
          return;
        }
        const c = p || M0(_, e.x), g = (m) => {
          const x = {};
          for (let w = 0; w < o.length; ++w)
            x[o[w]] = _.dims[w];
          x[u[0]] = m[0], x[u[1]] = m[1], h.push(rs(x));
        };
        s === "linear" || s === "constant" ? c.forEach((m) => g([m, f.predict(m)])) : M9(f.predict, c, 25, 200).forEach(g);
      }), this.value && (r.rem = this.value), this.value = r.add = r.source = h;
    }
    return r;
  }
});
const h7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  loess: OO,
  regression: zO
}, Symbol.toStringTag, { value: "Module" })), zm = 11102230246251565e-32, Af = 134217729, d7e = (3 + 8 * zm) * zm;
function _M(e, t, r, a, v) {
  let o, s, n, l, u = t[0], i = a[0], h = 0, p = 0;
  i > u == i > -u ? (o = u, u = t[++h]) : (o = i, i = a[++p]);
  let _ = 0;
  if (h < e && p < r)
    for (i > u == i > -u ? (s = u + o, n = o - (s - u), u = t[++h]) : (s = i + o, n = o - (s - i), i = a[++p]), o = s, n !== 0 && (v[_++] = n); h < e && p < r; )
      i > u == i > -u ? (s = o + u, l = s - o, n = o - (s - l) + (u - l), u = t[++h]) : (s = o + i, l = s - o, n = o - (s - l) + (i - l), i = a[++p]), o = s, n !== 0 && (v[_++] = n);
  for (; h < e; )
    s = o + u, l = s - o, n = o - (s - l) + (u - l), u = t[++h], o = s, n !== 0 && (v[_++] = n);
  for (; p < r; )
    s = o + i, l = s - o, n = o - (s - l) + (i - l), i = a[++p], o = s, n !== 0 && (v[_++] = n);
  return (o !== 0 || _ === 0) && (v[_++] = o), _;
}
function p7e(e, t) {
  let r = t[0];
  for (let a = 1; a < e; a++) r += t[a];
  return r;
}
function I4(e) {
  return new Float64Array(e);
}
const m7e = (3 + 16 * zm) * zm, g7e = (2 + 12 * zm) * zm, y7e = (9 + 64 * zm) * zm * zm, q2 = I4(4), HU = I4(8), GU = I4(12), WU = I4(16), Xf = I4(4);
function v7e(e, t, r, a, v, o, s) {
  let n, l, u, i, h, p, _, d, f, c, g, m, x, w, k, S, A, C;
  const D = e - v, L = r - v, E = t - o, P = a - o;
  w = D * P, p = Af * D, _ = p - (p - D), d = D - _, p = Af * P, f = p - (p - P), c = P - f, k = d * c - (w - _ * f - d * f - _ * c), S = E * L, p = Af * E, _ = p - (p - E), d = E - _, p = Af * L, f = p - (p - L), c = L - f, A = d * c - (S - _ * f - d * f - _ * c), g = k - A, h = k - g, q2[0] = k - (g + h) + (h - A), m = w + g, h = m - w, x = w - (m - h) + (g - h), g = x - S, h = x - g, q2[1] = x - (g + h) + (h - S), C = m + g, h = C - m, q2[2] = m - (C - h) + (g - h), q2[3] = C;
  let I = p7e(4, q2), M = g7e * s;
  if (I >= M || -I >= M || (h = e - D, n = e - (D + h) + (h - v), h = r - L, u = r - (L + h) + (h - v), h = t - E, l = t - (E + h) + (h - o), h = a - P, i = a - (P + h) + (h - o), n === 0 && l === 0 && u === 0 && i === 0) || (M = y7e * s + d7e * Math.abs(I), I += D * i + P * n - (E * u + L * l), I >= M || -I >= M)) return I;
  w = n * P, p = Af * n, _ = p - (p - n), d = n - _, p = Af * P, f = p - (p - P), c = P - f, k = d * c - (w - _ * f - d * f - _ * c), S = l * L, p = Af * l, _ = p - (p - l), d = l - _, p = Af * L, f = p - (p - L), c = L - f, A = d * c - (S - _ * f - d * f - _ * c), g = k - A, h = k - g, Xf[0] = k - (g + h) + (h - A), m = w + g, h = m - w, x = w - (m - h) + (g - h), g = x - S, h = x - g, Xf[1] = x - (g + h) + (h - S), C = m + g, h = C - m, Xf[2] = m - (C - h) + (g - h), Xf[3] = C;
  const O = _M(4, q2, 4, Xf, HU);
  w = D * i, p = Af * D, _ = p - (p - D), d = D - _, p = Af * i, f = p - (p - i), c = i - f, k = d * c - (w - _ * f - d * f - _ * c), S = E * u, p = Af * E, _ = p - (p - E), d = E - _, p = Af * u, f = p - (p - u), c = u - f, A = d * c - (S - _ * f - d * f - _ * c), g = k - A, h = k - g, Xf[0] = k - (g + h) + (h - A), m = w + g, h = m - w, x = w - (m - h) + (g - h), g = x - S, h = x - g, Xf[1] = x - (g + h) + (h - S), C = m + g, h = C - m, Xf[2] = m - (C - h) + (g - h), Xf[3] = C;
  const T = _M(O, HU, 4, Xf, GU);
  w = n * i, p = Af * n, _ = p - (p - n), d = n - _, p = Af * i, f = p - (p - i), c = i - f, k = d * c - (w - _ * f - d * f - _ * c), S = l * u, p = Af * l, _ = p - (p - l), d = l - _, p = Af * u, f = p - (p - u), c = u - f, A = d * c - (S - _ * f - d * f - _ * c), g = k - A, h = k - g, Xf[0] = k - (g + h) + (h - A), m = w + g, h = m - w, x = w - (m - h) + (g - h), g = x - S, h = x - g, Xf[1] = x - (g + h) + (h - S), C = m + g, h = C - m, Xf[2] = m - (C - h) + (g - h), Xf[3] = C;
  const z = _M(T, GU, 4, Xf, WU);
  return WU[z - 1];
}
function L6(e, t, r, a, v, o) {
  const s = (t - o) * (r - v), n = (e - v) * (a - o), l = s - n, u = Math.abs(s + n);
  return Math.abs(l) >= m7e * u ? l : -v7e(e, t, r, a, v, o, u);
}
const YU = Math.pow(2, -52), P6 = new Uint32Array(512);
class fk {
  static from(t, r = k7e, a = T7e) {
    const v = t.length, o = new Float64Array(v * 2);
    for (let s = 0; s < v; s++) {
      const n = t[s];
      o[2 * s] = r(n), o[2 * s + 1] = a(n);
    }
    return new fk(o);
  }
  constructor(t) {
    const r = t.length >> 1;
    if (r > 0 && typeof t[0] != "number") throw new Error("Expected coords to contain numbers.");
    this.coords = t;
    const a = Math.max(2 * r - 5, 0);
    this._triangles = new Uint32Array(a * 3), this._halfedges = new Int32Array(a * 3), this._hashSize = Math.ceil(Math.sqrt(r)), this._hullPrev = new Uint32Array(r), this._hullNext = new Uint32Array(r), this._hullTri = new Uint32Array(r), this._hullHash = new Int32Array(this._hashSize), this._ids = new Uint32Array(r), this._dists = new Float64Array(r), this.update();
  }
  update() {
    const { coords: t, _hullPrev: r, _hullNext: a, _hullTri: v, _hullHash: o } = this, s = t.length >> 1;
    let n = 1 / 0, l = 1 / 0, u = -1 / 0, i = -1 / 0;
    for (let D = 0; D < s; D++) {
      const L = t[2 * D], E = t[2 * D + 1];
      L < n && (n = L), E < l && (l = E), L > u && (u = L), E > i && (i = E), this._ids[D] = D;
    }
    const h = (n + u) / 2, p = (l + i) / 2;
    let _, d, f;
    for (let D = 0, L = 1 / 0; D < s; D++) {
      const E = wM(h, p, t[2 * D], t[2 * D + 1]);
      E < L && (_ = D, L = E);
    }
    const c = t[2 * _], g = t[2 * _ + 1];
    for (let D = 0, L = 1 / 0; D < s; D++) {
      if (D === _) continue;
      const E = wM(c, g, t[2 * D], t[2 * D + 1]);
      E < L && E > 0 && (d = D, L = E);
    }
    let m = t[2 * d], x = t[2 * d + 1], w = 1 / 0;
    for (let D = 0; D < s; D++) {
      if (D === _ || D === d) continue;
      const L = _7e(c, g, m, x, t[2 * D], t[2 * D + 1]);
      L < w && (f = D, w = L);
    }
    let k = t[2 * f], S = t[2 * f + 1];
    if (w === 1 / 0) {
      for (let E = 0; E < s; E++)
        this._dists[E] = t[2 * E] - t[0] || t[2 * E + 1] - t[1];
      sx(this._ids, this._dists, 0, s - 1);
      const D = new Uint32Array(s);
      let L = 0;
      for (let E = 0, P = -1 / 0; E < s; E++) {
        const I = this._ids[E], M = this._dists[I];
        M > P && (D[L++] = I, P = M);
      }
      this.hull = D.subarray(0, L), this.triangles = new Uint32Array(0), this.halfedges = new Uint32Array(0);
      return;
    }
    if (L6(c, g, m, x, k, S) < 0) {
      const D = d, L = m, E = x;
      d = f, m = k, x = S, f = D, k = L, S = E;
    }
    const A = w7e(c, g, m, x, k, S);
    this._cx = A.x, this._cy = A.y;
    for (let D = 0; D < s; D++)
      this._dists[D] = wM(t[2 * D], t[2 * D + 1], A.x, A.y);
    sx(this._ids, this._dists, 0, s - 1), this._hullStart = _;
    let C = 3;
    a[_] = r[f] = d, a[d] = r[_] = f, a[f] = r[d] = _, v[_] = 0, v[d] = 1, v[f] = 2, o.fill(-1), o[this._hashKey(c, g)] = _, o[this._hashKey(m, x)] = d, o[this._hashKey(k, S)] = f, this.trianglesLen = 0, this._addTriangle(_, d, f, -1, -1, -1);
    for (let D = 0, L, E; D < this._ids.length; D++) {
      const P = this._ids[D], I = t[2 * P], M = t[2 * P + 1];
      if (D > 0 && Math.abs(I - L) <= YU && Math.abs(M - E) <= YU || (L = I, E = M, P === _ || P === d || P === f)) continue;
      let O = 0;
      for (let V = 0, $ = this._hashKey(I, M); V < this._hashSize && (O = o[($ + V) % this._hashSize], !(O !== -1 && O !== a[O])); V++)
        ;
      O = r[O];
      let T = O, z;
      for (; z = a[T], L6(I, M, t[2 * T], t[2 * T + 1], t[2 * z], t[2 * z + 1]) >= 0; )
        if (T = z, T === O) {
          T = -1;
          break;
        }
      if (T === -1) continue;
      let F = this._addTriangle(T, P, a[T], -1, -1, v[T]);
      v[P] = this._legalize(F + 2), v[T] = F, C++;
      let U = a[T];
      for (; z = a[U], L6(I, M, t[2 * U], t[2 * U + 1], t[2 * z], t[2 * z + 1]) < 0; )
        F = this._addTriangle(U, P, z, v[P], -1, v[U]), v[P] = this._legalize(F + 2), a[U] = U, C--, U = z;
      if (T === O)
        for (; z = r[T], L6(I, M, t[2 * z], t[2 * z + 1], t[2 * T], t[2 * T + 1]) < 0; )
          F = this._addTriangle(z, P, T, -1, v[T], v[z]), this._legalize(F + 2), v[z] = F, a[T] = T, C--, T = z;
      this._hullStart = r[P] = T, a[T] = r[U] = P, a[P] = U, o[this._hashKey(I, M)] = P, o[this._hashKey(t[2 * T], t[2 * T + 1])] = T;
    }
    this.hull = new Uint32Array(C);
    for (let D = 0, L = this._hullStart; D < C; D++)
      this.hull[D] = L, L = a[L];
    this.triangles = this._triangles.subarray(0, this.trianglesLen), this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
  }
  _hashKey(t, r) {
    return Math.floor(x7e(t - this._cx, r - this._cy) * this._hashSize) % this._hashSize;
  }
  _legalize(t) {
    const { _triangles: r, _halfedges: a, coords: v } = this;
    let o = 0, s = 0;
    for (; ; ) {
      const n = a[t], l = t - t % 3;
      if (s = l + (t + 2) % 3, n === -1) {
        if (o === 0) break;
        t = P6[--o];
        continue;
      }
      const u = n - n % 3, i = l + (t + 1) % 3, h = u + (n + 2) % 3, p = r[s], _ = r[t], d = r[i], f = r[h];
      if (b7e(
        v[2 * p],
        v[2 * p + 1],
        v[2 * _],
        v[2 * _ + 1],
        v[2 * d],
        v[2 * d + 1],
        v[2 * f],
        v[2 * f + 1]
      )) {
        r[t] = f, r[n] = p;
        const g = a[h];
        if (g === -1) {
          let x = this._hullStart;
          do {
            if (this._hullTri[x] === h) {
              this._hullTri[x] = t;
              break;
            }
            x = this._hullPrev[x];
          } while (x !== this._hullStart);
        }
        this._link(t, g), this._link(n, a[s]), this._link(s, h);
        const m = u + (n + 1) % 3;
        o < P6.length && (P6[o++] = m);
      } else {
        if (o === 0) break;
        t = P6[--o];
      }
    }
    return s;
  }
  _link(t, r) {
    this._halfedges[t] = r, r !== -1 && (this._halfedges[r] = t);
  }
  // add a new triangle given vertex indices and adjacent half-edge ids
  _addTriangle(t, r, a, v, o, s) {
    const n = this.trianglesLen;
    return this._triangles[n] = t, this._triangles[n + 1] = r, this._triangles[n + 2] = a, this._link(n, v), this._link(n + 1, o), this._link(n + 2, s), this.trianglesLen += 3, n;
  }
}
function x7e(e, t) {
  const r = e / (Math.abs(e) + Math.abs(t));
  return (t > 0 ? 3 - r : 1 + r) / 4;
}
function wM(e, t, r, a) {
  const v = e - r, o = t - a;
  return v * v + o * o;
}
function b7e(e, t, r, a, v, o, s, n) {
  const l = e - s, u = t - n, i = r - s, h = a - n, p = v - s, _ = o - n, d = l * l + u * u, f = i * i + h * h, c = p * p + _ * _;
  return l * (h * c - f * _) - u * (i * c - f * p) + d * (i * _ - h * p) < 0;
}
function _7e(e, t, r, a, v, o) {
  const s = r - e, n = a - t, l = v - e, u = o - t, i = s * s + n * n, h = l * l + u * u, p = 0.5 / (s * u - n * l), _ = (u * i - n * h) * p, d = (s * h - l * i) * p;
  return _ * _ + d * d;
}
function w7e(e, t, r, a, v, o) {
  const s = r - e, n = a - t, l = v - e, u = o - t, i = s * s + n * n, h = l * l + u * u, p = 0.5 / (s * u - n * l), _ = e + (u * i - n * h) * p, d = t + (s * h - l * i) * p;
  return { x: _, y: d };
}
function sx(e, t, r, a) {
  if (a - r <= 20)
    for (let v = r + 1; v <= a; v++) {
      const o = e[v], s = t[o];
      let n = v - 1;
      for (; n >= r && t[e[n]] > s; ) e[n + 1] = e[n--];
      e[n + 1] = o;
    }
  else {
    const v = r + a >> 1;
    let o = r + 1, s = a;
    Q_(e, v, o), t[e[r]] > t[e[a]] && Q_(e, r, a), t[e[o]] > t[e[a]] && Q_(e, o, a), t[e[r]] > t[e[o]] && Q_(e, r, o);
    const n = e[o], l = t[n];
    for (; ; ) {
      do
        o++;
      while (t[e[o]] < l);
      do
        s--;
      while (t[e[s]] > l);
      if (s < o) break;
      Q_(e, o, s);
    }
    e[r + 1] = e[s], e[s] = n, a - o + 1 >= s - r ? (sx(e, t, o, a), sx(e, t, r, s - 1)) : (sx(e, t, r, s - 1), sx(e, t, o, a));
  }
}
function Q_(e, t, r) {
  const a = e[t];
  e[t] = e[r], e[r] = a;
}
function k7e(e) {
  return e[0];
}
function T7e(e) {
  return e[1];
}
const ZU = 1e-6;
class Jy {
  constructor() {
    this._x0 = this._y0 = // start of current subpath
    this._x1 = this._y1 = null, this._ = "";
  }
  moveTo(t, r) {
    this._ += `M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}`;
  }
  closePath() {
    this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
  }
  lineTo(t, r) {
    this._ += `L${this._x1 = +t},${this._y1 = +r}`;
  }
  arc(t, r, a) {
    t = +t, r = +r, a = +a;
    const v = t + a, o = r;
    if (a < 0) throw new Error("negative radius");
    this._x1 === null ? this._ += `M${v},${o}` : (Math.abs(this._x1 - v) > ZU || Math.abs(this._y1 - o) > ZU) && (this._ += "L" + v + "," + o), a && (this._ += `A${a},${a},0,1,1,${t - a},${r}A${a},${a},0,1,1,${this._x1 = v},${this._y1 = o}`);
  }
  rect(t, r, a, v) {
    this._ += `M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}h${+a}v${+v}h${-a}Z`;
  }
  value() {
    return this._ || null;
  }
}
class YC {
  constructor() {
    this._ = [];
  }
  moveTo(t, r) {
    this._.push([t, r]);
  }
  closePath() {
    this._.push(this._[0].slice());
  }
  lineTo(t, r) {
    this._.push([t, r]);
  }
  value() {
    return this._.length ? this._ : null;
  }
}
let A7e = class {
  constructor(t, [r, a, v, o] = [0, 0, 960, 500]) {
    if (!((v = +v) >= (r = +r)) || !((o = +o) >= (a = +a))) throw new Error("invalid bounds");
    this.delaunay = t, this._circumcenters = new Float64Array(t.points.length * 2), this.vectors = new Float64Array(t.points.length * 2), this.xmax = v, this.xmin = r, this.ymax = o, this.ymin = a, this._init();
  }
  update() {
    return this.delaunay.update(), this._init(), this;
  }
  _init() {
    const { delaunay: { points: t, hull: r, triangles: a }, vectors: v } = this;
    let o, s;
    const n = this.circumcenters = this._circumcenters.subarray(0, a.length / 3 * 2);
    for (let f = 0, c = 0, g = a.length, m, x; f < g; f += 3, c += 2) {
      const w = a[f] * 2, k = a[f + 1] * 2, S = a[f + 2] * 2, A = t[w], C = t[w + 1], D = t[k], L = t[k + 1], E = t[S], P = t[S + 1], I = D - A, M = L - C, O = E - A, T = P - C, z = (I * T - M * O) * 2;
      if (Math.abs(z) < 1e-9) {
        if (o === void 0) {
          o = s = 0;
          for (const U of r) o += t[U * 2], s += t[U * 2 + 1];
          o /= r.length, s /= r.length;
        }
        const F = 1e9 * Math.sign((o - A) * T - (s - C) * O);
        m = (A + E) / 2 - F * T, x = (C + P) / 2 + F * O;
      } else {
        const F = 1 / z, U = I * I + M * M, V = O * O + T * T;
        m = A + (T * U - M * V) * F, x = C + (I * V - O * U) * F;
      }
      n[c] = m, n[c + 1] = x;
    }
    let l = r[r.length - 1], u, i = l * 4, h, p = t[2 * l], _, d = t[2 * l + 1];
    v.fill(0);
    for (let f = 0; f < r.length; ++f)
      l = r[f], u = i, h = p, _ = d, i = l * 4, p = t[2 * l], d = t[2 * l + 1], v[u + 2] = v[i] = _ - d, v[u + 3] = v[i + 1] = p - h;
  }
  render(t) {
    const r = t == null ? t = new Jy() : void 0, { delaunay: { halfedges: a, inedges: v, hull: o }, circumcenters: s, vectors: n } = this;
    if (o.length <= 1) return null;
    for (let i = 0, h = a.length; i < h; ++i) {
      const p = a[i];
      if (p < i) continue;
      const _ = Math.floor(i / 3) * 2, d = Math.floor(p / 3) * 2, f = s[_], c = s[_ + 1], g = s[d], m = s[d + 1];
      this._renderSegment(f, c, g, m, t);
    }
    let l, u = o[o.length - 1];
    for (let i = 0; i < o.length; ++i) {
      l = u, u = o[i];
      const h = Math.floor(v[u] / 3) * 2, p = s[h], _ = s[h + 1], d = l * 4, f = this._project(p, _, n[d + 2], n[d + 3]);
      f && this._renderSegment(p, _, f[0], f[1], t);
    }
    return r && r.value();
  }
  renderBounds(t) {
    const r = t == null ? t = new Jy() : void 0;
    return t.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin), r && r.value();
  }
  renderCell(t, r) {
    const a = r == null ? r = new Jy() : void 0, v = this._clip(t);
    if (v === null || !v.length) return;
    r.moveTo(v[0], v[1]);
    let o = v.length;
    for (; v[0] === v[o - 2] && v[1] === v[o - 1] && o > 1; ) o -= 2;
    for (let s = 2; s < o; s += 2)
      (v[s] !== v[s - 2] || v[s + 1] !== v[s - 1]) && r.lineTo(v[s], v[s + 1]);
    return r.closePath(), a && a.value();
  }
  *cellPolygons() {
    const { delaunay: { points: t } } = this;
    for (let r = 0, a = t.length / 2; r < a; ++r) {
      const v = this.cellPolygon(r);
      v && (v.index = r, yield v);
    }
  }
  cellPolygon(t) {
    const r = new YC();
    return this.renderCell(t, r), r.value();
  }
  _renderSegment(t, r, a, v, o) {
    let s;
    const n = this._regioncode(t, r), l = this._regioncode(a, v);
    n === 0 && l === 0 ? (o.moveTo(t, r), o.lineTo(a, v)) : (s = this._clipSegment(t, r, a, v, n, l)) && (o.moveTo(s[0], s[1]), o.lineTo(s[2], s[3]));
  }
  contains(t, r, a) {
    return r = +r, r !== r || (a = +a, a !== a) ? !1 : this.delaunay._step(t, r, a) === t;
  }
  *neighbors(t) {
    const r = this._clip(t);
    if (r) for (const a of this.delaunay.neighbors(t)) {
      const v = this._clip(a);
      if (v) {
        e: for (let o = 0, s = r.length; o < s; o += 2)
          for (let n = 0, l = v.length; n < l; n += 2)
            if (r[o] === v[n] && r[o + 1] === v[n + 1] && r[(o + 2) % s] === v[(n + l - 2) % l] && r[(o + 3) % s] === v[(n + l - 1) % l]) {
              yield a;
              break e;
            }
      }
    }
  }
  _cell(t) {
    const { circumcenters: r, delaunay: { inedges: a, halfedges: v, triangles: o } } = this, s = a[t];
    if (s === -1) return null;
    const n = [];
    let l = s;
    do {
      const u = Math.floor(l / 3);
      if (n.push(r[u * 2], r[u * 2 + 1]), l = l % 3 === 2 ? l - 2 : l + 1, o[l] !== t) break;
      l = v[l];
    } while (l !== s && l !== -1);
    return n;
  }
  _clip(t) {
    if (t === 0 && this.delaunay.hull.length === 1)
      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
    const r = this._cell(t);
    if (r === null) return null;
    const { vectors: a } = this, v = t * 4;
    return this._simplify(a[v] || a[v + 1] ? this._clipInfinite(t, r, a[v], a[v + 1], a[v + 2], a[v + 3]) : this._clipFinite(t, r));
  }
  _clipFinite(t, r) {
    const a = r.length;
    let v = null, o, s, n = r[a - 2], l = r[a - 1], u, i = this._regioncode(n, l), h, p = 0;
    for (let _ = 0; _ < a; _ += 2)
      if (o = n, s = l, n = r[_], l = r[_ + 1], u = i, i = this._regioncode(n, l), u === 0 && i === 0)
        h = p, p = 0, v ? v.push(n, l) : v = [n, l];
      else {
        let d, f, c, g, m;
        if (u === 0) {
          if ((d = this._clipSegment(o, s, n, l, u, i)) === null) continue;
          [f, c, g, m] = d;
        } else {
          if ((d = this._clipSegment(n, l, o, s, i, u)) === null) continue;
          [g, m, f, c] = d, h = p, p = this._edgecode(f, c), h && p && this._edge(t, h, p, v, v.length), v ? v.push(f, c) : v = [f, c];
        }
        h = p, p = this._edgecode(g, m), h && p && this._edge(t, h, p, v, v.length), v ? v.push(g, m) : v = [g, m];
      }
    if (v)
      h = p, p = this._edgecode(v[0], v[1]), h && p && this._edge(t, h, p, v, v.length);
    else if (this.contains(t, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2))
      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
    return v;
  }
  _clipSegment(t, r, a, v, o, s) {
    const n = o < s;
    for (n && ([t, r, a, v, o, s] = [a, v, t, r, s, o]); ; ) {
      if (o === 0 && s === 0) return n ? [a, v, t, r] : [t, r, a, v];
      if (o & s) return null;
      let l, u, i = o || s;
      i & 8 ? (l = t + (a - t) * (this.ymax - r) / (v - r), u = this.ymax) : i & 4 ? (l = t + (a - t) * (this.ymin - r) / (v - r), u = this.ymin) : i & 2 ? (u = r + (v - r) * (this.xmax - t) / (a - t), l = this.xmax) : (u = r + (v - r) * (this.xmin - t) / (a - t), l = this.xmin), o ? (t = l, r = u, o = this._regioncode(t, r)) : (a = l, v = u, s = this._regioncode(a, v));
    }
  }
  _clipInfinite(t, r, a, v, o, s) {
    let n = Array.from(r), l;
    if ((l = this._project(n[0], n[1], a, v)) && n.unshift(l[0], l[1]), (l = this._project(n[n.length - 2], n[n.length - 1], o, s)) && n.push(l[0], l[1]), n = this._clipFinite(t, n))
      for (let u = 0, i = n.length, h, p = this._edgecode(n[i - 2], n[i - 1]); u < i; u += 2)
        h = p, p = this._edgecode(n[u], n[u + 1]), h && p && (u = this._edge(t, h, p, n, u), i = n.length);
    else this.contains(t, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2) && (n = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]);
    return n;
  }
  _edge(t, r, a, v, o) {
    for (; r !== a; ) {
      let s, n;
      switch (r) {
        case 5:
          r = 4;
          continue;
        case 4:
          r = 6, s = this.xmax, n = this.ymin;
          break;
        case 6:
          r = 2;
          continue;
        case 2:
          r = 10, s = this.xmax, n = this.ymax;
          break;
        case 10:
          r = 8;
          continue;
        case 8:
          r = 9, s = this.xmin, n = this.ymax;
          break;
        case 9:
          r = 1;
          continue;
        case 1:
          r = 5, s = this.xmin, n = this.ymin;
          break;
      }
      (v[o] !== s || v[o + 1] !== n) && this.contains(t, s, n) && (v.splice(o, 0, s, n), o += 2);
    }
    return o;
  }
  _project(t, r, a, v) {
    let o = 1 / 0, s, n, l;
    if (v < 0) {
      if (r <= this.ymin) return null;
      (s = (this.ymin - r) / v) < o && (l = this.ymin, n = t + (o = s) * a);
    } else if (v > 0) {
      if (r >= this.ymax) return null;
      (s = (this.ymax - r) / v) < o && (l = this.ymax, n = t + (o = s) * a);
    }
    if (a > 0) {
      if (t >= this.xmax) return null;
      (s = (this.xmax - t) / a) < o && (n = this.xmax, l = r + (o = s) * v);
    } else if (a < 0) {
      if (t <= this.xmin) return null;
      (s = (this.xmin - t) / a) < o && (n = this.xmin, l = r + (o = s) * v);
    }
    return [n, l];
  }
  _edgecode(t, r) {
    return (t === this.xmin ? 1 : t === this.xmax ? 2 : 0) | (r === this.ymin ? 4 : r === this.ymax ? 8 : 0);
  }
  _regioncode(t, r) {
    return (t < this.xmin ? 1 : t > this.xmax ? 2 : 0) | (r < this.ymin ? 4 : r > this.ymax ? 8 : 0);
  }
  _simplify(t) {
    if (t && t.length > 4) {
      for (let r = 0; r < t.length; r += 2) {
        const a = (r + 2) % t.length, v = (r + 4) % t.length;
        (t[r] === t[a] && t[a] === t[v] || t[r + 1] === t[a + 1] && t[a + 1] === t[v + 1]) && (t.splice(a, 2), r -= 2);
      }
      t.length || (t = null);
    }
    return t;
  }
};
const S7e = 2 * Math.PI, H2 = Math.pow;
function M7e(e) {
  return e[0];
}
function E7e(e) {
  return e[1];
}
function C7e(e) {
  const { triangles: t, coords: r } = e;
  for (let a = 0; a < t.length; a += 3) {
    const v = 2 * t[a], o = 2 * t[a + 1], s = 2 * t[a + 2];
    if ((r[s] - r[v]) * (r[o + 1] - r[v + 1]) - (r[o] - r[v]) * (r[s + 1] - r[v + 1]) > 1e-10) return !1;
  }
  return !0;
}
function I7e(e, t, r) {
  return [e + Math.sin(e + t) * r, t + Math.cos(e - t) * r];
}
class RO {
  static from(t, r = M7e, a = E7e, v) {
    return new RO("length" in t ? D7e(t, r, a, v) : Float64Array.from(L7e(t, r, a, v)));
  }
  constructor(t) {
    this._delaunator = new fk(t), this.inedges = new Int32Array(t.length / 2), this._hullIndex = new Int32Array(t.length / 2), this.points = this._delaunator.coords, this._init();
  }
  update() {
    return this._delaunator.update(), this._init(), this;
  }
  _init() {
    const t = this._delaunator, r = this.points;
    if (t.hull && t.hull.length > 2 && C7e(t)) {
      this.collinear = Int32Array.from({ length: r.length / 2 }, (p, _) => _).sort((p, _) => r[2 * p] - r[2 * _] || r[2 * p + 1] - r[2 * _ + 1]);
      const l = this.collinear[0], u = this.collinear[this.collinear.length - 1], i = [r[2 * l], r[2 * l + 1], r[2 * u], r[2 * u + 1]], h = 1e-8 * Math.hypot(i[3] - i[1], i[2] - i[0]);
      for (let p = 0, _ = r.length / 2; p < _; ++p) {
        const d = I7e(r[2 * p], r[2 * p + 1], h);
        r[2 * p] = d[0], r[2 * p + 1] = d[1];
      }
      this._delaunator = new fk(r);
    } else
      delete this.collinear;
    const a = this.halfedges = this._delaunator.halfedges, v = this.hull = this._delaunator.hull, o = this.triangles = this._delaunator.triangles, s = this.inedges.fill(-1), n = this._hullIndex.fill(-1);
    for (let l = 0, u = a.length; l < u; ++l) {
      const i = o[l % 3 === 2 ? l - 2 : l + 1];
      (a[l] === -1 || s[i] === -1) && (s[i] = l);
    }
    for (let l = 0, u = v.length; l < u; ++l)
      n[v[l]] = l;
    v.length <= 2 && v.length > 0 && (this.triangles = new Int32Array(3).fill(-1), this.halfedges = new Int32Array(3).fill(-1), this.triangles[0] = v[0], s[v[0]] = 1, v.length === 2 && (s[v[1]] = 0, this.triangles[1] = v[1], this.triangles[2] = v[1]));
  }
  voronoi(t) {
    return new A7e(this, t);
  }
  *neighbors(t) {
    const { inedges: r, hull: a, _hullIndex: v, halfedges: o, triangles: s, collinear: n } = this;
    if (n) {
      const h = n.indexOf(t);
      h > 0 && (yield n[h - 1]), h < n.length - 1 && (yield n[h + 1]);
      return;
    }
    const l = r[t];
    if (l === -1) return;
    let u = l, i = -1;
    do {
      if (yield i = s[u], u = u % 3 === 2 ? u - 2 : u + 1, s[u] !== t) return;
      if (u = o[u], u === -1) {
        const h = a[(v[t] + 1) % a.length];
        h !== i && (yield h);
        return;
      }
    } while (u !== l);
  }
  find(t, r, a = 0) {
    if (t = +t, t !== t || (r = +r, r !== r)) return -1;
    const v = a;
    let o;
    for (; (o = this._step(a, t, r)) >= 0 && o !== a && o !== v; ) a = o;
    return o;
  }
  _step(t, r, a) {
    const { inedges: v, hull: o, _hullIndex: s, halfedges: n, triangles: l, points: u } = this;
    if (v[t] === -1 || !u.length) return (t + 1) % (u.length >> 1);
    let i = t, h = H2(r - u[t * 2], 2) + H2(a - u[t * 2 + 1], 2);
    const p = v[t];
    let _ = p;
    do {
      let d = l[_];
      const f = H2(r - u[d * 2], 2) + H2(a - u[d * 2 + 1], 2);
      if (f < h && (h = f, i = d), _ = _ % 3 === 2 ? _ - 2 : _ + 1, l[_] !== t) break;
      if (_ = n[_], _ === -1) {
        if (_ = o[(s[t] + 1) % o.length], _ !== d && H2(r - u[_ * 2], 2) + H2(a - u[_ * 2 + 1], 2) < h)
          return _;
        break;
      }
    } while (_ !== p);
    return i;
  }
  render(t) {
    const r = t == null ? t = new Jy() : void 0, { points: a, halfedges: v, triangles: o } = this;
    for (let s = 0, n = v.length; s < n; ++s) {
      const l = v[s];
      if (l < s) continue;
      const u = o[s] * 2, i = o[l] * 2;
      t.moveTo(a[u], a[u + 1]), t.lineTo(a[i], a[i + 1]);
    }
    return this.renderHull(t), r && r.value();
  }
  renderPoints(t, r) {
    r === void 0 && (!t || typeof t.moveTo != "function") && (r = t, t = null), r = r == null ? 2 : +r;
    const a = t == null ? t = new Jy() : void 0, { points: v } = this;
    for (let o = 0, s = v.length; o < s; o += 2) {
      const n = v[o], l = v[o + 1];
      t.moveTo(n + r, l), t.arc(n, l, r, 0, S7e);
    }
    return a && a.value();
  }
  renderHull(t) {
    const r = t == null ? t = new Jy() : void 0, { hull: a, points: v } = this, o = a[0] * 2, s = a.length;
    t.moveTo(v[o], v[o + 1]);
    for (let n = 1; n < s; ++n) {
      const l = 2 * a[n];
      t.lineTo(v[l], v[l + 1]);
    }
    return t.closePath(), r && r.value();
  }
  hullPolygon() {
    const t = new YC();
    return this.renderHull(t), t.value();
  }
  renderTriangle(t, r) {
    const a = r == null ? r = new Jy() : void 0, { points: v, triangles: o } = this, s = o[t *= 3] * 2, n = o[t + 1] * 2, l = o[t + 2] * 2;
    return r.moveTo(v[s], v[s + 1]), r.lineTo(v[n], v[n + 1]), r.lineTo(v[l], v[l + 1]), r.closePath(), a && a.value();
  }
  *trianglePolygons() {
    const { triangles: t } = this;
    for (let r = 0, a = t.length / 3; r < a; ++r)
      yield this.trianglePolygon(r);
  }
  trianglePolygon(t) {
    const r = new YC();
    return this.renderTriangle(t, r), r.value();
  }
}
function D7e(e, t, r, a) {
  const v = e.length, o = new Float64Array(v * 2);
  for (let s = 0; s < v; ++s) {
    const n = e[s];
    o[s * 2] = t.call(a, n, s, e), o[s * 2 + 1] = r.call(a, n, s, e);
  }
  return o;
}
function* L7e(e, t, r, a) {
  let v = 0;
  for (const o of e)
    yield t.call(a, o, v, e), yield r.call(a, o, v, e), ++v;
}
function FO(e) {
  qr.call(this, null, e);
}
FO.Definition = {
  type: "Voronoi",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "extent",
    type: "array",
    array: !0,
    length: 2,
    default: [[-1e5, -1e5], [1e5, 1e5]],
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
const P7e = [-1e5, -1e5, 1e5, 1e5];
Si(FO, qr, {
  transform(e, t) {
    const r = e.as || "path", a = t.source;
    if (!a || !a.length) return t;
    let v = e.size;
    v = v ? [0, 0, v[0], v[1]] : (v = e.extent) ? [v[0][0], v[0][1], v[1][0], v[1][1]] : P7e;
    const o = this.value = RO.from(a, e.x, e.y).voronoi(v);
    for (let s = 0, n = a.length; s < n; ++s) {
      const l = o.cellPolygon(s);
      a[s][r] = l && !z7e(l) ? O7e(l) : null;
    }
    return t.reflow(e.modified()).modifies(r);
  }
});
function O7e(e) {
  const t = e[0][0], r = e[0][1];
  let a = e.length - 1;
  for (; e[a][0] === t && e[a][1] === r; --a) ;
  return "M" + e.slice(0, a + 1).join("L") + "Z";
}
function z7e(e) {
  return e.length === 2 && e[0][0] === e[1][0] && e[0][1] === e[1][1];
}
const R7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  voronoi: FO
}, Symbol.toStringTag, { value: "Module" }));
var kM = Math.PI / 180, P3 = 64, C8 = 2048;
function F7e() {
  var e = [256, 256], t, r, a, v, o, s, n, l = _ee, u = [], i = Math.random, h = {};
  h.layout = function() {
    for (var d = p(cg()), f = $7e((e[0] >> 5) * e[1]), c = null, g = u.length, m = -1, x = [], w = u.map((S) => ({
      text: t(S),
      font: r(S),
      style: v(S),
      weight: o(S),
      rotate: s(S),
      size: ~~(a(S) + 1e-14),
      padding: n(S),
      xoff: 0,
      yoff: 0,
      x1: 0,
      y1: 0,
      x0: 0,
      y0: 0,
      hasText: !1,
      sprite: null,
      datum: S
    })).sort((S, A) => A.size - S.size); ++m < g; ) {
      var k = w[m];
      k.x = e[0] * (i() + 0.5) >> 1, k.y = e[1] * (i() + 0.5) >> 1, N7e(d, k, w, m), k.hasText && _(f, k, c) && (x.push(k), c ? j7e(c, k) : c = [{
        x: k.x + k.x0,
        y: k.y + k.y0
      }, {
        x: k.x + k.x1,
        y: k.y + k.y1
      }], k.x -= e[0] >> 1, k.y -= e[1] >> 1);
    }
    return x;
  };
  function p(d) {
    d.width = d.height = 1;
    var f = Math.sqrt(d.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2);
    d.width = (P3 << 5) / f, d.height = C8 / f;
    var c = d.getContext("2d");
    return c.fillStyle = c.strokeStyle = "red", c.textAlign = "center", {
      context: c,
      ratio: f
    };
  }
  function _(d, f, c) {
    for (var g = f.x, m = f.y, x = Math.hypot(e[0], e[1]), w = l(e), k = i() < 0.5 ? 1 : -1, S = -k, A, C, D; (A = w(S += k)) && (C = ~~A[0], D = ~~A[1], !(Math.min(Math.abs(C), Math.abs(D)) >= x)); )
      if (f.x = g + C, f.y = m + D, !(f.x + f.x0 < 0 || f.y + f.y0 < 0 || f.x + f.x1 > e[0] || f.y + f.y1 > e[1]) && (!c || !B7e(f, d, e[0])) && (!c || U7e(f, c))) {
        for (var L = f.sprite, E = f.width >> 5, P = e[0] >> 5, I = f.x - (E << 4), M = I & 127, O = 32 - M, T = f.y1 - f.y0, z = (f.y + f.y0) * P + (I >> 5), F, U = 0; U < T; U++) {
          F = 0;
          for (var V = 0; V <= E; V++)
            d[z + V] |= F << O | (V < E ? (F = L[U * E + V]) >>> M : 0);
          z += P;
        }
        return f.sprite = null, !0;
      }
    return !1;
  }
  return h.words = function(d) {
    return arguments.length ? (u = d, h) : u;
  }, h.size = function(d) {
    return arguments.length ? (e = [+d[0], +d[1]], h) : e;
  }, h.font = function(d) {
    return arguments.length ? (r = Ay(d), h) : r;
  }, h.fontStyle = function(d) {
    return arguments.length ? (v = Ay(d), h) : v;
  }, h.fontWeight = function(d) {
    return arguments.length ? (o = Ay(d), h) : o;
  }, h.rotate = function(d) {
    return arguments.length ? (s = Ay(d), h) : s;
  }, h.text = function(d) {
    return arguments.length ? (t = Ay(d), h) : t;
  }, h.spiral = function(d) {
    return arguments.length ? (l = q7e[d] || d, h) : l;
  }, h.fontSize = function(d) {
    return arguments.length ? (a = Ay(d), h) : a;
  }, h.padding = function(d) {
    return arguments.length ? (n = Ay(d), h) : n;
  }, h.random = function(d) {
    return arguments.length ? (i = d, h) : i;
  }, h;
}
function N7e(e, t, r, a) {
  if (!t.sprite) {
    var v = e.context, o = e.ratio;
    v.clearRect(0, 0, (P3 << 5) / o, C8 / o);
    var s = 0, n = 0, l = 0, u = r.length, i, h, p, _, d;
    for (--a; ++a < u; ) {
      if (t = r[a], v.save(), v.font = t.style + " " + t.weight + " " + ~~((t.size + 1) / o) + "px " + t.font, i = v.measureText(t.text + "m").width * o, p = t.size << 1, t.rotate) {
        var f = Math.sin(t.rotate * kM), c = Math.cos(t.rotate * kM), g = i * c, m = i * f, x = p * c, w = p * f;
        i = Math.max(Math.abs(g + w), Math.abs(g - w)) + 31 >> 5 << 5, p = ~~Math.max(Math.abs(m + x), Math.abs(m - x));
      } else
        i = i + 31 >> 5 << 5;
      if (p > l && (l = p), s + i >= P3 << 5 && (s = 0, n += l, l = 0), n + p >= C8) break;
      v.translate((s + (i >> 1)) / o, (n + (p >> 1)) / o), t.rotate && v.rotate(t.rotate * kM), v.fillText(t.text, 0, 0), t.padding && (v.lineWidth = 2 * t.padding, v.strokeText(t.text, 0, 0)), v.restore(), t.width = i, t.height = p, t.xoff = s, t.yoff = n, t.x1 = i >> 1, t.y1 = p >> 1, t.x0 = -t.x1, t.y0 = -t.y1, t.hasText = !0, s += i;
    }
    for (var k = v.getImageData(0, 0, (P3 << 5) / o, C8 / o).data, S = []; --a >= 0; )
      if (t = r[a], !!t.hasText) {
        for (i = t.width, h = i >> 5, p = t.y1 - t.y0, _ = 0; _ < p * h; _++) S[_] = 0;
        if (s = t.xoff, s == null) return;
        n = t.yoff;
        var A = 0, C = -1;
        for (d = 0; d < p; d++) {
          for (_ = 0; _ < i; _++) {
            var D = h * d + (_ >> 5), L = k[(n + d) * (P3 << 5) + (s + _) << 2] ? 1 << 31 - _ % 32 : 0;
            S[D] |= L, A |= L;
          }
          A ? C = d : (t.y0++, p--, d--, n++);
        }
        t.y1 = t.y0 + C, t.sprite = S.slice(0, (t.y1 - t.y0) * h);
      }
  }
}
function B7e(e, t, r) {
  r >>= 5;
  for (var a = e.sprite, v = e.width >> 5, o = e.x - (v << 4), s = o & 127, n = 32 - s, l = e.y1 - e.y0, u = (e.y + e.y0) * r + (o >> 5), i, h = 0; h < l; h++) {
    i = 0;
    for (var p = 0; p <= v; p++)
      if ((i << n | (p < v ? (i = a[h * v + p]) >>> s : 0)) & t[u + p]) return !0;
    u += r;
  }
  return !1;
}
function j7e(e, t) {
  var r = e[0], a = e[1];
  t.x + t.x0 < r.x && (r.x = t.x + t.x0), t.y + t.y0 < r.y && (r.y = t.y + t.y0), t.x + t.x1 > a.x && (a.x = t.x + t.x1), t.y + t.y1 > a.y && (a.y = t.y + t.y1);
}
function U7e(e, t) {
  return e.x + e.x1 > t[0].x && e.x + e.x0 < t[1].x && e.y + e.y1 > t[0].y && e.y + e.y0 < t[1].y;
}
function _ee(e) {
  var t = e[0] / e[1];
  return function(r) {
    return [t * (r *= 0.1) * Math.cos(r), r * Math.sin(r)];
  };
}
function V7e(e) {
  var t = 4, r = t * e[0] / e[1], a = 0, v = 0;
  return function(o) {
    var s = o < 0 ? -1 : 1;
    switch (Math.sqrt(1 + 4 * s * o) - s & 3) {
      case 0:
        a += r;
        break;
      case 1:
        v += t;
        break;
      case 2:
        a -= r;
        break;
      default:
        v -= t;
        break;
    }
    return [a, v];
  };
}
function $7e(e) {
  for (var t = [], r = -1; ++r < e; ) t[r] = 0;
  return t;
}
function Ay(e) {
  return typeof e == "function" ? e : function() {
    return e;
  };
}
var q7e = {
  archimedean: _ee,
  rectangular: V7e
};
const wee = ["x", "y", "font", "fontSize", "fontStyle", "fontWeight", "angle"], H7e = ["text", "font", "rotate", "fontSize", "fontStyle", "fontWeight"];
function NO(e) {
  qr.call(this, F7e(), e);
}
NO.Definition = {
  type: "Wordcloud",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "font",
    type: "string",
    expr: !0,
    default: "sans-serif"
  }, {
    name: "fontStyle",
    type: "string",
    expr: !0,
    default: "normal"
  }, {
    name: "fontWeight",
    type: "string",
    expr: !0,
    default: "normal"
  }, {
    name: "fontSize",
    type: "number",
    expr: !0,
    default: 14
  }, {
    name: "fontSizeRange",
    type: "number",
    array: "nullable",
    default: [10, 50]
  }, {
    name: "rotate",
    type: "number",
    expr: !0,
    default: 0
  }, {
    name: "text",
    type: "field"
  }, {
    name: "spiral",
    type: "string",
    values: ["archimedean", "rectangular"]
  }, {
    name: "padding",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 7,
    default: wee
  }]
};
Si(NO, qr, {
  transform(e, t) {
    e.size && !(e.size[0] && e.size[1]) && Jr("Wordcloud size dimensions must be non-zero.");
    function r(d) {
      const f = e[d];
      return qa(f) && t.modified(f.fields);
    }
    const a = e.modified();
    if (!(a || t.changed(t.ADD_REM) || H7e.some(r))) return;
    const v = t.materialize(t.SOURCE).source, o = this.value, s = e.as || wee;
    let n = e.fontSize || 14, l;
    if (qa(n) ? l = e.fontSizeRange : n = Vf(n), l) {
      const d = n, f = Go("sqrt")().domain(M0(v, d)).range(l);
      n = (c) => f(d(c));
    }
    v.forEach((d) => {
      d[s[0]] = NaN, d[s[1]] = NaN, d[s[3]] = 0;
    });
    const u = o.words(v).text(e.text).size(e.size || [500, 500]).padding(e.padding || 1).spiral(e.spiral || "archimedean").rotate(e.rotate || 0).font(e.font || "sans-serif").fontStyle(e.fontStyle || "normal").fontWeight(e.fontWeight || "normal").fontSize(n).random(Od).layout(), i = o.size(), h = i[0] >> 1, p = i[1] >> 1, _ = u.length;
    for (let d = 0, f, c; d < _; ++d)
      f = u[d], c = f.datum, c[s[0]] = f.x + h, c[s[1]] = f.y + p, c[s[2]] = f.font, c[s[3]] = f.size, c[s[4]] = f.style, c[s[5]] = f.weight, c[s[6]] = f.rotate;
    return t.reflow(a).modifies(s);
  }
});
const G7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  wordcloud: NO
}, Symbol.toStringTag, { value: "Module" })), W7e = (e) => new Uint8Array(e), Y7e = (e) => new Uint16Array(e), J3 = (e) => new Uint32Array(e);
function Z7e() {
  let e = 8, t = [], r = J3(0), a = O6(0, e), v = O6(0, e);
  return {
    data: () => t,
    seen: () => r = X7e(r, t.length),
    add(o) {
      for (let s = 0, n = t.length, l = o.length, u; s < l; ++s)
        u = o[s], u._index = n++, t.push(u);
    },
    remove(o, s) {
      const n = t.length, l = Array(n - o), u = t;
      let i, h, p;
      for (h = 0; !s[h] && h < n; ++h)
        l[h] = t[h], u[h] = h;
      for (p = h; h < n; ++h)
        i = t[h], s[h] ? u[h] = -1 : (u[h] = p, a[p] = a[h], v[p] = v[h], l[p] = i, i._index = p++), a[h] = 0;
      return t = l, u;
    },
    size: () => t.length,
    curr: () => a,
    prev: () => v,
    reset: (o) => v[o] = a[o],
    all: () => e < 257 ? 255 : e < 65537 ? 65535 : 4294967295,
    set(o, s) {
      a[o] |= s;
    },
    clear(o, s) {
      a[o] &= ~s;
    },
    resize(o, s) {
      const n = a.length;
      (o > n || s > e) && (e = Math.max(s, e), a = O6(o, e, a), v = O6(o, e));
    }
  };
}
function X7e(e, t, r) {
  return e.length >= t ? e : (r = r || new e.constructor(t), r.set(e), r);
}
function O6(e, t, r) {
  const a = (t < 257 ? W7e : t < 65537 ? Y7e : J3)(e);
  return r && a.set(r), a;
}
function XU(e, t, r) {
  const a = 1 << t;
  return {
    one: a,
    zero: ~a,
    range: r.slice(),
    bisect: e.bisect,
    index: e.index,
    size: e.size,
    onAdd(v, o) {
      const s = this, n = s.bisect(s.range, v.value), l = v.index, u = n[0], i = n[1], h = l.length;
      let p;
      for (p = 0; p < u; ++p) o[l[p]] |= a;
      for (p = i; p < h; ++p) o[l[p]] |= a;
      return s;
    }
  };
}
function KU() {
  let e = J3(0), t = [], r = 0;
  function a(n, l, u) {
    if (!l.length) return [];
    const i = r, h = l.length, p = J3(h);
    let _ = Array(h), d, f, c;
    for (c = 0; c < h; ++c)
      _[c] = n(l[c]), p[c] = c;
    if (_ = K7e(_, p), i)
      d = t, f = e, t = Array(i + h), e = J3(i + h), J7e(u, d, f, i, _, p, h, t, e);
    else {
      if (u > 0) for (c = 0; c < h; ++c)
        p[c] += u;
      t = _, e = p;
    }
    return r = i + h, {
      index: p,
      value: _
    };
  }
  function v(n, l) {
    const u = r;
    let i, h, p;
    for (h = 0; !l[e[h]] && h < u; ++h) ;
    for (p = h; h < u; ++h)
      l[i = e[h]] || (e[p] = i, t[p] = t[h], ++p);
    r = u - n;
  }
  function o(n) {
    for (let l = 0, u = r; l < u; ++l)
      e[l] = n[e[l]];
  }
  function s(n, l) {
    let u;
    return l ? u = l.length : (l = t, u = r), [n1e(l, n[0], 0, u), vg(l, n[1], 0, u)];
  }
  return {
    insert: a,
    remove: v,
    bisect: s,
    reindex: o,
    index: () => e,
    size: () => r
  };
}
function K7e(e, t) {
  return e.sort.call(t, (r, a) => {
    const v = e[r], o = e[a];
    return v < o ? -1 : v > o ? 1 : 0;
  }), a1e(e, t);
}
function J7e(e, t, r, a, v, o, s, n, l) {
  let u = 0, i = 0, h;
  for (h = 0; u < a && i < s; ++h)
    t[u] < v[i] ? (n[h] = t[u], l[h] = r[u++]) : (n[h] = v[i], l[h] = o[i++] + e);
  for (; u < a; ++u, ++h)
    n[h] = t[u], l[h] = r[u];
  for (; i < s; ++i, ++h)
    n[h] = v[i], l[h] = o[i] + e;
}
function BO(e) {
  qr.call(this, Z7e(), e), this._indices = null, this._dims = null;
}
BO.Definition = {
  type: "CrossFilter",
  metadata: {},
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "query",
    type: "array",
    array: !0,
    required: !0,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }]
};
Si(BO, qr, {
  transform(e, t) {
    if (this._dims) {
      var r = e.modified("fields") || e.fields.some((a) => t.modified(a.fields));
      return r ? this.reinit(e, t) : this.eval(e, t);
    } else
      return this.init(e, t);
  },
  init(e, t) {
    const r = e.fields, a = e.query, v = this._indices = {}, o = this._dims = [], s = a.length;
    let n = 0, l, u;
    for (; n < s; ++n)
      l = r[n].fname, u = v[l] || (v[l] = KU()), o.push(XU(u, n, a[n]));
    return this.eval(e, t);
  },
  reinit(e, t) {
    const r = t.materialize().fork(), a = e.fields, v = e.query, o = this._indices, s = this._dims, n = this.value, l = n.curr(), u = n.prev(), i = n.all(), h = r.rem = r.add, p = r.mod, _ = v.length, d = {};
    let f, c, g, m, x, w, k, S, A;
    if (u.set(l), t.rem.length && (x = this.remove(e, t, r)), t.add.length && n.add(t.add), t.mod.length)
      for (w = {}, m = t.mod, k = 0, S = m.length; k < S; ++k)
        w[m[k]._index] = 1;
    for (k = 0; k < _; ++k)
      A = a[k], (!s[k] || e.modified("fields", k) || t.modified(A.fields)) && (g = A.fname, (f = d[g]) || (o[g] = c = KU(), d[g] = f = c.insert(A, t.source, 0)), s[k] = XU(c, k, v[k]).onAdd(f, l));
    for (k = 0, S = n.data().length; k < S; ++k)
      x[k] || (u[k] !== l[k] ? h.push(k) : w[k] && l[k] !== i && p.push(k));
    return n.mask = (1 << _) - 1, r;
  },
  eval(e, t) {
    const r = t.materialize().fork(), a = this._dims.length;
    let v = 0;
    return t.rem.length && (this.remove(e, t, r), v |= (1 << a) - 1), e.modified("query") && !e.modified("fields") && (v |= this.update(e, t, r)), t.add.length && (this.insert(e, t, r), v |= (1 << a) - 1), t.mod.length && (this.modify(t, r), v |= (1 << a) - 1), this.value.mask = v, r;
  },
  insert(e, t, r) {
    const a = t.add, v = this.value, o = this._dims, s = this._indices, n = e.fields, l = {}, u = r.add, i = v.size() + a.length, h = o.length;
    let p = v.size(), _, d, f;
    v.resize(i, h), v.add(a);
    const c = v.curr(), g = v.prev(), m = v.all();
    for (_ = 0; _ < h; ++_)
      d = n[_].fname, f = l[d] || (l[d] = s[d].insert(n[_], a, p)), o[_].onAdd(f, c);
    for (; p < i; ++p)
      g[p] = m, c[p] !== m && u.push(p);
  },
  modify(e, t) {
    const r = t.mod, a = this.value, v = a.curr(), o = a.all(), s = e.mod;
    let n, l, u;
    for (n = 0, l = s.length; n < l; ++n)
      u = s[n]._index, v[u] !== o && r.push(u);
  },
  remove(e, t, r) {
    const a = this._indices, v = this.value, o = v.curr(), s = v.prev(), n = v.all(), l = {}, u = r.rem, i = t.rem;
    let h, p, _, d;
    for (h = 0, p = i.length; h < p; ++h)
      _ = i[h]._index, l[_] = 1, s[_] = d = o[_], o[_] = n, d !== n && u.push(_);
    for (_ in a)
      a[_].remove(p, l);
    return this.reindex(t, p, l), l;
  },
  // reindex filters and indices after propagation completes
  reindex(e, t, r) {
    const a = this._indices, v = this.value;
    e.runAfter(() => {
      const o = v.remove(t, r);
      for (const s in a) a[s].reindex(o);
    });
  },
  update(e, t, r) {
    const a = this._dims, v = e.query, o = t.stamp, s = a.length;
    let n = 0, l, u;
    for (r.filters = 0, u = 0; u < s; ++u)
      e.modified("query", u) && (l = u, ++n);
    if (n === 1)
      n = a[l].one, this.incrementOne(a[l], v[l], r.add, r.rem);
    else
      for (u = 0, n = 0; u < s; ++u)
        e.modified("query", u) && (n |= a[u].one, this.incrementAll(a[u], v[u], o, r.add), r.rem = r.add);
    return n;
  },
  incrementAll(e, t, r, a) {
    const v = this.value, o = v.seen(), s = v.curr(), n = v.prev(), l = e.index(), u = e.bisect(e.range), i = e.bisect(t), h = i[0], p = i[1], _ = u[0], d = u[1], f = e.one;
    let c, g, m;
    if (h < _)
      for (c = h, g = Math.min(_, p); c < g; ++c)
        m = l[c], o[m] !== r && (n[m] = s[m], o[m] = r, a.push(m)), s[m] ^= f;
    else if (h > _)
      for (c = _, g = Math.min(h, d); c < g; ++c)
        m = l[c], o[m] !== r && (n[m] = s[m], o[m] = r, a.push(m)), s[m] ^= f;
    if (p > d)
      for (c = Math.max(h, d), g = p; c < g; ++c)
        m = l[c], o[m] !== r && (n[m] = s[m], o[m] = r, a.push(m)), s[m] ^= f;
    else if (p < d)
      for (c = Math.max(_, p), g = d; c < g; ++c)
        m = l[c], o[m] !== r && (n[m] = s[m], o[m] = r, a.push(m)), s[m] ^= f;
    e.range = t.slice();
  },
  incrementOne(e, t, r, a) {
    const v = this.value, o = v.curr(), s = e.index(), n = e.bisect(e.range), l = e.bisect(t), u = l[0], i = l[1], h = n[0], p = n[1], _ = e.one;
    let d, f, c;
    if (u < h)
      for (d = u, f = Math.min(h, i); d < f; ++d)
        c = s[d], o[c] ^= _, r.push(c);
    else if (u > h)
      for (d = h, f = Math.min(u, p); d < f; ++d)
        c = s[d], o[c] ^= _, a.push(c);
    if (i > p)
      for (d = Math.max(u, p), f = i; d < f; ++d)
        c = s[d], o[c] ^= _, r.push(c);
    else if (i < p)
      for (d = Math.max(h, i), f = p; d < f; ++d)
        c = s[d], o[c] ^= _, a.push(c);
    e.range = t.slice();
  }
});
function jO(e) {
  qr.call(this, null, e);
}
jO.Definition = {
  type: "ResolveFilter",
  metadata: {},
  params: [{
    name: "ignore",
    type: "number",
    required: !0,
    description: "A bit mask indicating which filters to ignore."
  }, {
    name: "filter",
    type: "object",
    required: !0,
    description: "Per-tuple filter bitmaps from a CrossFilter transform."
  }]
};
Si(jO, qr, {
  transform(e, t) {
    const r = ~(e.ignore || 0), a = e.filter, v = a.mask;
    if (!(v & r)) return t.StopPropagation;
    const o = t.fork(t.ALL), s = a.data(), n = a.curr(), l = a.prev(), u = (i) => n[i] & r ? null : s[i];
    return o.filter(o.MOD, u), v & v - 1 ? (o.filter(o.ADD, (i) => {
      const h = n[i] & r;
      return !h && h ^ l[i] & r ? s[i] : null;
    }), o.filter(o.REM, (i) => {
      const h = n[i] & r;
      return h && !(h ^ (h ^ l[i] & r)) ? s[i] : null;
    })) : (o.filter(o.ADD, u), o.filter(o.REM, (i) => (n[i] & r) === v ? s[i] : null)), o.filter(o.SOURCE, (i) => u(i._index));
  }
});
const Q7e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  crossfilter: BO,
  resolvefilter: jO
}, Symbol.toStringTag, { value: "Module" })), eke = "RawCode", Mv = "Literal", tke = "Property", nke = "Identifier", rke = "ArrayExpression", ike = "BinaryExpression", kee = "CallExpression", ake = "ConditionalExpression", oke = "LogicalExpression", ske = "MemberExpression", lke = "ObjectExpression", uke = "UnaryExpression";
function Mp(e) {
  this.type = e;
}
Mp.prototype.visit = function(e) {
  let t, r, a;
  if (e(this)) return 1;
  for (t = cke(this), r = 0, a = t.length; r < a; ++r)
    if (t[r].visit(e)) return 1;
};
function cke(e) {
  switch (e.type) {
    case rke:
      return e.elements;
    case ike:
    case oke:
      return [e.left, e.right];
    case kee:
      return [e.callee].concat(e.arguments);
    case ake:
      return [e.test, e.consequent, e.alternate];
    case ske:
      return [e.object, e.property];
    case lke:
      return e.properties;
    case tke:
      return [e.key, e.value];
    case uke:
      return [e.argument];
    case nke:
    case Mv:
    case eke:
    default:
      return [];
  }
}
var q0, Zi, Kr, Bf, Es, oT = 1, D4 = 2, Ev = 3, Ug = 4, sT = 5, Yv = 6, Ah = 7, L4 = 8, fke = 9;
q0 = {};
q0[oT] = "Boolean";
q0[D4] = "<end>";
q0[Ev] = "Identifier";
q0[Ug] = "Keyword";
q0[sT] = "Null";
q0[Yv] = "Numeric";
q0[Ah] = "Punctuator";
q0[L4] = "String";
q0[fke] = "RegularExpression";
var hke = "ArrayExpression", dke = "BinaryExpression", pke = "CallExpression", mke = "ConditionalExpression", Tee = "Identifier", gke = "Literal", yke = "LogicalExpression", vke = "MemberExpression", xke = "ObjectExpression", bke = "Property", _ke = "UnaryExpression", Wc = "Unexpected token %0", wke = "Unexpected number", kke = "Unexpected string", Tke = "Unexpected identifier", Ake = "Unexpected reserved word", Ske = "Unexpected end of input", ZC = "Invalid regular expression", TM = "Invalid regular expression: missing /", Aee = "Octal literals are not allowed in strict mode.", Mke = "Duplicate data property in object literal not allowed in strict mode", uf = "ILLEGAL", zw = "Disabled.", Eke = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), Cke = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
function lT(e, t) {
  if (!e)
    throw new Error("ASSERT: " + t);
}
function wm(e) {
  return e >= 48 && e <= 57;
}
function UO(e) {
  return "0123456789abcdefABCDEF".includes(e);
}
function Q3(e) {
  return "01234567".includes(e);
}
function Ike(e) {
  return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].includes(e);
}
function Rw(e) {
  return e === 10 || e === 13 || e === 8232 || e === 8233;
}
function P4(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e === 92 || // \ (backslash)
  e >= 128 && Eke.test(String.fromCharCode(e));
}
function hk(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e >= 48 && e <= 57 || // 0..9
  e === 92 || // \ (backslash)
  e >= 128 && Cke.test(String.fromCharCode(e));
}
const Dke = {
  if: 1,
  in: 1,
  do: 1,
  var: 1,
  for: 1,
  new: 1,
  try: 1,
  let: 1,
  this: 1,
  else: 1,
  case: 1,
  void: 1,
  with: 1,
  enum: 1,
  while: 1,
  break: 1,
  catch: 1,
  throw: 1,
  const: 1,
  yield: 1,
  class: 1,
  super: 1,
  return: 1,
  typeof: 1,
  delete: 1,
  switch: 1,
  export: 1,
  import: 1,
  public: 1,
  static: 1,
  default: 1,
  finally: 1,
  extends: 1,
  package: 1,
  private: 1,
  function: 1,
  continue: 1,
  debugger: 1,
  interface: 1,
  protected: 1,
  instanceof: 1,
  implements: 1
};
function See() {
  for (; Kr < Bf; ) {
    const e = Zi.charCodeAt(Kr);
    if (Ike(e) || Rw(e))
      ++Kr;
    else
      break;
  }
}
function XC(e) {
  var t, r, a, v = 0;
  for (r = e === "u" ? 4 : 2, t = 0; t < r; ++t)
    Kr < Bf && UO(Zi[Kr]) ? (a = Zi[Kr++], v = v * 16 + "0123456789abcdef".indexOf(a.toLowerCase())) : qo({}, Wc, uf);
  return String.fromCharCode(v);
}
function Lke() {
  var e, t, r, a;
  for (e = Zi[Kr], t = 0, e === "}" && qo({}, Wc, uf); Kr < Bf && (e = Zi[Kr++], !!UO(e)); )
    t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
  return (t > 1114111 || e !== "}") && qo({}, Wc, uf), t <= 65535 ? String.fromCharCode(t) : (r = (t - 65536 >> 10) + 55296, a = (t - 65536 & 1023) + 56320, String.fromCharCode(r, a));
}
function Mee() {
  var e, t;
  for (e = Zi.charCodeAt(Kr++), t = String.fromCharCode(e), e === 92 && (Zi.charCodeAt(Kr) !== 117 && qo({}, Wc, uf), ++Kr, e = XC("u"), (!e || e === "\\" || !P4(e.charCodeAt(0))) && qo({}, Wc, uf), t = e); Kr < Bf && (e = Zi.charCodeAt(Kr), !!hk(e)); )
    ++Kr, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), Zi.charCodeAt(Kr) !== 117 && qo({}, Wc, uf), ++Kr, e = XC("u"), (!e || e === "\\" || !hk(e.charCodeAt(0))) && qo({}, Wc, uf), t += e);
  return t;
}
function Pke() {
  var e, t;
  for (e = Kr++; Kr < Bf; ) {
    if (t = Zi.charCodeAt(Kr), t === 92)
      return Kr = e, Mee();
    if (hk(t))
      ++Kr;
    else
      break;
  }
  return Zi.slice(e, Kr);
}
function Oke() {
  var e, t, r;
  return e = Kr, t = Zi.charCodeAt(Kr) === 92 ? Mee() : Pke(), t.length === 1 ? r = Ev : Dke.hasOwnProperty(t) ? r = Ug : t === "null" ? r = sT : t === "true" || t === "false" ? r = oT : r = Ev, {
    type: r,
    value: t,
    start: e,
    end: Kr
  };
}
function AM() {
  var e = Kr, t = Zi.charCodeAt(Kr), r, a = Zi[Kr], v, o, s;
  switch (t) {
    case 46:
    case 40:
    case 41:
    case 59:
    case 44:
    case 123:
    case 125:
    case 91:
    case 93:
    case 58:
    case 63:
    case 126:
      return ++Kr, {
        type: Ah,
        value: String.fromCharCode(t),
        start: e,
        end: Kr
      };
    default:
      if (r = Zi.charCodeAt(Kr + 1), r === 61)
        switch (t) {
          case 43:
          case 45:
          case 47:
          case 60:
          case 62:
          case 94:
          case 124:
          case 37:
          case 38:
          case 42:
            return Kr += 2, {
              type: Ah,
              value: String.fromCharCode(t) + String.fromCharCode(r),
              start: e,
              end: Kr
            };
          case 33:
          case 61:
            return Kr += 2, Zi.charCodeAt(Kr) === 61 && ++Kr, {
              type: Ah,
              value: Zi.slice(e, Kr),
              start: e,
              end: Kr
            };
        }
  }
  if (s = Zi.substr(Kr, 4), s === ">>>=")
    return Kr += 4, {
      type: Ah,
      value: s,
      start: e,
      end: Kr
    };
  if (o = s.substr(0, 3), o === ">>>" || o === "<<=" || o === ">>=")
    return Kr += 3, {
      type: Ah,
      value: o,
      start: e,
      end: Kr
    };
  if (v = o.substr(0, 2), a === v[1] && "+-<>&|".includes(a) || v === "=>")
    return Kr += 2, {
      type: Ah,
      value: v,
      start: e,
      end: Kr
    };
  if (v === "//" && qo({}, Wc, uf), "<>=!+-*%&|^/".includes(a))
    return ++Kr, {
      type: Ah,
      value: a,
      start: e,
      end: Kr
    };
  qo({}, Wc, uf);
}
function zke(e) {
  let t = "";
  for (; Kr < Bf && UO(Zi[Kr]); )
    t += Zi[Kr++];
  return t.length === 0 && qo({}, Wc, uf), P4(Zi.charCodeAt(Kr)) && qo({}, Wc, uf), {
    type: Yv,
    value: parseInt("0x" + t, 16),
    start: e,
    end: Kr
  };
}
function Rke(e) {
  let t = "0" + Zi[Kr++];
  for (; Kr < Bf && Q3(Zi[Kr]); )
    t += Zi[Kr++];
  return (P4(Zi.charCodeAt(Kr)) || wm(Zi.charCodeAt(Kr))) && qo({}, Wc, uf), {
    type: Yv,
    value: parseInt(t, 8),
    octal: !0,
    start: e,
    end: Kr
  };
}
function JU() {
  var e, t, r;
  if (r = Zi[Kr], lT(wm(r.charCodeAt(0)) || r === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = Kr, e = "", r !== ".") {
    if (e = Zi[Kr++], r = Zi[Kr], e === "0") {
      if (r === "x" || r === "X")
        return ++Kr, zke(t);
      if (Q3(r))
        return Rke(t);
      r && wm(r.charCodeAt(0)) && qo({}, Wc, uf);
    }
    for (; wm(Zi.charCodeAt(Kr)); )
      e += Zi[Kr++];
    r = Zi[Kr];
  }
  if (r === ".") {
    for (e += Zi[Kr++]; wm(Zi.charCodeAt(Kr)); )
      e += Zi[Kr++];
    r = Zi[Kr];
  }
  if (r === "e" || r === "E")
    if (e += Zi[Kr++], r = Zi[Kr], (r === "+" || r === "-") && (e += Zi[Kr++]), wm(Zi.charCodeAt(Kr)))
      for (; wm(Zi.charCodeAt(Kr)); )
        e += Zi[Kr++];
    else
      qo({}, Wc, uf);
  return P4(Zi.charCodeAt(Kr)) && qo({}, Wc, uf), {
    type: Yv,
    value: parseFloat(e),
    start: t,
    end: Kr
  };
}
function Fke() {
  var e = "", t, r, a, v, o = !1;
  for (t = Zi[Kr], lT(t === "'" || t === '"', "String literal must starts with a quote"), r = Kr, ++Kr; Kr < Bf; )
    if (a = Zi[Kr++], a === t) {
      t = "";
      break;
    } else if (a === "\\")
      if (a = Zi[Kr++], !a || !Rw(a.charCodeAt(0)))
        switch (a) {
          case "u":
          case "x":
            Zi[Kr] === "{" ? (++Kr, e += Lke()) : e += XC(a);
            break;
          case "n":
            e += `
`;
            break;
          case "r":
            e += "\r";
            break;
          case "t":
            e += "	";
            break;
          case "b":
            e += "\b";
            break;
          case "f":
            e += "\f";
            break;
          case "v":
            e += "\v";
            break;
          default:
            Q3(a) ? (v = "01234567".indexOf(a), v !== 0 && (o = !0), Kr < Bf && Q3(Zi[Kr]) && (o = !0, v = v * 8 + "01234567".indexOf(Zi[Kr++]), "0123".includes(a) && Kr < Bf && Q3(Zi[Kr]) && (v = v * 8 + "01234567".indexOf(Zi[Kr++]))), e += String.fromCharCode(v)) : e += a;
            break;
        }
      else
        a === "\r" && Zi[Kr] === `
` && ++Kr;
    else {
      if (Rw(a.charCodeAt(0)))
        break;
      e += a;
    }
  return t !== "" && qo({}, Wc, uf), {
    type: L4,
    value: e,
    octal: o,
    start: r,
    end: Kr
  };
}
function Nke(e, t) {
  let r = e;
  t.includes("u") && (r = r.replace(/\\u\{([0-9a-fA-F]+)\}/g, (a, v) => {
    if (parseInt(v, 16) <= 1114111)
      return "x";
    qo({}, ZC);
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
  try {
    new RegExp(r);
  } catch {
    qo({}, ZC);
  }
  try {
    return new RegExp(e, t);
  } catch {
    return null;
  }
}
function Bke() {
  var e, t, r, a, v;
  for (e = Zi[Kr], lT(e === "/", "Regular expression literal must start with a slash"), t = Zi[Kr++], r = !1, a = !1; Kr < Bf; )
    if (e = Zi[Kr++], t += e, e === "\\")
      e = Zi[Kr++], Rw(e.charCodeAt(0)) && qo({}, TM), t += e;
    else if (Rw(e.charCodeAt(0)))
      qo({}, TM);
    else if (r)
      e === "]" && (r = !1);
    else if (e === "/") {
      a = !0;
      break;
    } else e === "[" && (r = !0);
  return a || qo({}, TM), v = t.substr(1, t.length - 2), {
    value: v,
    literal: t
  };
}
function jke() {
  var e, t, r;
  for (t = "", r = ""; Kr < Bf && (e = Zi[Kr], !!hk(e.charCodeAt(0))); )
    ++Kr, e === "\\" && Kr < Bf ? qo({}, Wc, uf) : (r += e, t += e);
  return r.search(/[^gimuy]/g) >= 0 && qo({}, ZC, r), {
    value: r,
    literal: t
  };
}
function Uke() {
  var e, t, r, a;
  return Es = null, See(), e = Kr, t = Bke(), r = jke(), a = Nke(t.value, r.value), {
    literal: t.literal + r.literal,
    value: a,
    regex: {
      pattern: t.value,
      flags: r.value
    },
    start: e,
    end: Kr
  };
}
function Vke(e) {
  return e.type === Ev || e.type === Ug || e.type === oT || e.type === sT;
}
function Eee() {
  if (See(), Kr >= Bf)
    return {
      type: D4,
      start: Kr,
      end: Kr
    };
  const e = Zi.charCodeAt(Kr);
  return P4(e) ? Oke() : e === 40 || e === 41 || e === 59 ? AM() : e === 39 || e === 34 ? Fke() : e === 46 ? wm(Zi.charCodeAt(Kr + 1)) ? JU() : AM() : wm(e) ? JU() : AM();
}
function Eh() {
  const e = Es;
  return Kr = e.end, Es = Eee(), Kr = e.end, e;
}
function Cee() {
  const e = Kr;
  Es = Eee(), Kr = e;
}
function $ke(e) {
  const t = new Mp(hke);
  return t.elements = e, t;
}
function QU(e, t, r) {
  const a = new Mp(e === "||" || e === "&&" ? yke : dke);
  return a.operator = e, a.left = t, a.right = r, a;
}
function qke(e, t) {
  const r = new Mp(pke);
  return r.callee = e, r.arguments = t, r;
}
function Hke(e, t, r) {
  const a = new Mp(mke);
  return a.test = e, a.consequent = t, a.alternate = r, a;
}
function VO(e) {
  const t = new Mp(Tee);
  return t.name = e, t;
}
function O3(e) {
  const t = new Mp(gke);
  return t.value = e.value, t.raw = Zi.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
}
function eV(e, t, r) {
  const a = new Mp(vke);
  return a.computed = e === "[", a.object = t, a.property = r, a.computed || (r.member = !0), a;
}
function Gke(e) {
  const t = new Mp(xke);
  return t.properties = e, t;
}
function tV(e, t, r) {
  const a = new Mp(bke);
  return a.key = t, a.value = r, a.kind = e, a;
}
function Wke(e, t) {
  const r = new Mp(_ke);
  return r.operator = e, r.argument = t, r.prefix = !0, r;
}
function qo(e, t) {
  var r, a = Array.prototype.slice.call(arguments, 2), v = t.replace(/%(\d)/g, (o, s) => (lT(s < a.length, "Message reference must be in range"), a[s]));
  throw r = new Error(v), r.index = Kr, r.description = v, r;
}
function uT(e) {
  e.type === D4 && qo(e, Ske), e.type === Yv && qo(e, wke), e.type === L4 && qo(e, kke), e.type === Ev && qo(e, Tke), e.type === Ug && qo(e, Ake), qo(e, Wc, e.value);
}
function jf(e) {
  const t = Eh();
  (t.type !== Ah || t.value !== e) && uT(t);
}
function Tl(e) {
  return Es.type === Ah && Es.value === e;
}
function SM(e) {
  return Es.type === Ug && Es.value === e;
}
function Yke() {
  const e = [];
  for (Kr = Es.start, jf("["); !Tl("]"); )
    Tl(",") ? (Eh(), e.push(null)) : (e.push(Cv()), Tl("]") || jf(","));
  return Eh(), $ke(e);
}
function nV() {
  Kr = Es.start;
  const e = Eh();
  return e.type === L4 || e.type === Yv ? (e.octal && qo(e, Aee), O3(e)) : VO(e.value);
}
function Zke() {
  var e, t, r, a;
  if (Kr = Es.start, e = Es, e.type === Ev)
    return r = nV(), jf(":"), a = Cv(), tV("init", r, a);
  if (e.type === D4 || e.type === Ah)
    uT(e);
  else
    return t = nV(), jf(":"), a = Cv(), tV("init", t, a);
}
function Xke() {
  var e = [], t, r, a, v = {}, o = String;
  for (Kr = Es.start, jf("{"); !Tl("}"); )
    t = Zke(), t.key.type === Tee ? r = t.key.name : r = o(t.key.value), a = "$" + r, Object.prototype.hasOwnProperty.call(v, a) ? qo({}, Mke) : v[a] = !0, e.push(t), Tl("}") || jf(",");
  return jf("}"), Gke(e);
}
function Kke() {
  jf("(");
  const e = $O();
  return jf(")"), e;
}
const Jke = {
  if: 1
};
function Qke() {
  var e, t, r;
  if (Tl("("))
    return Kke();
  if (Tl("["))
    return Yke();
  if (Tl("{"))
    return Xke();
  if (e = Es.type, Kr = Es.start, e === Ev || Jke[Es.value])
    r = VO(Eh().value);
  else if (e === L4 || e === Yv)
    Es.octal && qo(Es, Aee), r = O3(Eh());
  else {
    if (e === Ug)
      throw new Error(zw);
    e === oT ? (t = Eh(), t.value = t.value === "true", r = O3(t)) : e === sT ? (t = Eh(), t.value = null, r = O3(t)) : Tl("/") || Tl("/=") ? (r = O3(Uke()), Cee()) : uT(Eh());
  }
  return r;
}
function e9e() {
  const e = [];
  if (jf("("), !Tl(")"))
    for (; Kr < Bf && (e.push(Cv()), !Tl(")")); )
      jf(",");
  return jf(")"), e;
}
function t9e() {
  Kr = Es.start;
  const e = Eh();
  return Vke(e) || uT(e), VO(e.value);
}
function n9e() {
  return jf("."), t9e();
}
function r9e() {
  jf("[");
  const e = $O();
  return jf("]"), e;
}
function i9e() {
  var e, t, r;
  for (e = Qke(); ; )
    if (Tl("."))
      r = n9e(), e = eV(".", e, r);
    else if (Tl("("))
      t = e9e(), e = qke(e, t);
    else if (Tl("["))
      r = r9e(), e = eV("[", e, r);
    else
      break;
  return e;
}
function rV() {
  const e = i9e();
  if (Es.type === Ah && (Tl("++") || Tl("--")))
    throw new Error(zw);
  return e;
}
function I8() {
  var e, t;
  if (Es.type !== Ah && Es.type !== Ug)
    t = rV();
  else {
    if (Tl("++") || Tl("--"))
      throw new Error(zw);
    if (Tl("+") || Tl("-") || Tl("~") || Tl("!"))
      e = Eh(), t = I8(), t = Wke(e.value, t);
    else {
      if (SM("delete") || SM("void") || SM("typeof"))
        throw new Error(zw);
      t = rV();
    }
  }
  return t;
}
function iV(e) {
  let t = 0;
  if (e.type !== Ah && e.type !== Ug)
    return 0;
  switch (e.value) {
    case "||":
      t = 1;
      break;
    case "&&":
      t = 2;
      break;
    case "|":
      t = 3;
      break;
    case "^":
      t = 4;
      break;
    case "&":
      t = 5;
      break;
    case "==":
    case "!=":
    case "===":
    case "!==":
      t = 6;
      break;
    case "<":
    case ">":
    case "<=":
    case ">=":
    case "instanceof":
    case "in":
      t = 7;
      break;
    case "<<":
    case ">>":
    case ">>>":
      t = 8;
      break;
    case "+":
    case "-":
      t = 9;
      break;
    case "*":
    case "/":
    case "%":
      t = 11;
      break;
  }
  return t;
}
function a9e() {
  var e, t, r, a, v, o, s, n, l, u;
  if (e = Es, l = I8(), a = Es, v = iV(a), v === 0)
    return l;
  for (a.prec = v, Eh(), t = [e, Es], s = I8(), o = [l, a, s]; (v = iV(Es)) > 0; ) {
    for (; o.length > 2 && v <= o[o.length - 2].prec; )
      s = o.pop(), n = o.pop().value, l = o.pop(), t.pop(), r = QU(n, l, s), o.push(r);
    a = Eh(), a.prec = v, o.push(a), t.push(Es), r = I8(), o.push(r);
  }
  for (u = o.length - 1, r = o[u], t.pop(); u > 1; )
    t.pop(), r = QU(o[u - 1].value, o[u - 2], r), u -= 2;
  return r;
}
function Cv() {
  var e, t, r;
  return e = a9e(), Tl("?") && (Eh(), t = Cv(), jf(":"), r = Cv(), e = Hke(e, t, r)), e;
}
function $O() {
  const e = Cv();
  if (Tl(","))
    throw new Error(zw);
  return e;
}
function qO(e) {
  Zi = e, Kr = 0, Bf = Zi.length, Es = null, Cee();
  const t = $O();
  if (Es.type !== D4)
    throw new Error("Unexpect token after expression.");
  return t;
}
var Iee = {
  NaN: "NaN",
  E: "Math.E",
  LN2: "Math.LN2",
  LN10: "Math.LN10",
  LOG2E: "Math.LOG2E",
  LOG10E: "Math.LOG10E",
  PI: "Math.PI",
  SQRT1_2: "Math.SQRT1_2",
  SQRT2: "Math.SQRT2",
  MIN_VALUE: "Number.MIN_VALUE",
  MAX_VALUE: "Number.MAX_VALUE"
};
function Dee(e) {
  function t(s, n, l, u) {
    let i = e(n[0]);
    return l && (i = l + "(" + i + ")", l.lastIndexOf("new ", 0) === 0 && (i = "(" + i + ")")), i + "." + s + (u < 0 ? "" : u === 0 ? "()" : "(" + n.slice(1).map(e).join(",") + ")");
  }
  function r(s, n, l) {
    return (u) => t(s, u, n, l);
  }
  const a = "new Date", v = "String", o = "RegExp";
  return {
    // MATH functions
    isNaN: "Number.isNaN",
    isFinite: "Number.isFinite",
    abs: "Math.abs",
    acos: "Math.acos",
    asin: "Math.asin",
    atan: "Math.atan",
    atan2: "Math.atan2",
    ceil: "Math.ceil",
    cos: "Math.cos",
    exp: "Math.exp",
    floor: "Math.floor",
    hypot: "Math.hypot",
    log: "Math.log",
    max: "Math.max",
    min: "Math.min",
    pow: "Math.pow",
    random: "Math.random",
    round: "Math.round",
    sin: "Math.sin",
    sqrt: "Math.sqrt",
    tan: "Math.tan",
    clamp: function(s) {
      s.length < 3 && Jr("Missing arguments to clamp function."), s.length > 3 && Jr("Too many arguments to clamp function.");
      const n = s.map(e);
      return "Math.max(" + n[1] + ", Math.min(" + n[2] + "," + n[0] + "))";
    },
    // DATE functions
    now: "Date.now",
    utc: "Date.UTC",
    datetime: a,
    date: r("getDate", a, 0),
    day: r("getDay", a, 0),
    year: r("getFullYear", a, 0),
    month: r("getMonth", a, 0),
    hours: r("getHours", a, 0),
    minutes: r("getMinutes", a, 0),
    seconds: r("getSeconds", a, 0),
    milliseconds: r("getMilliseconds", a, 0),
    time: r("getTime", a, 0),
    timezoneoffset: r("getTimezoneOffset", a, 0),
    utcdate: r("getUTCDate", a, 0),
    utcday: r("getUTCDay", a, 0),
    utcyear: r("getUTCFullYear", a, 0),
    utcmonth: r("getUTCMonth", a, 0),
    utchours: r("getUTCHours", a, 0),
    utcminutes: r("getUTCMinutes", a, 0),
    utcseconds: r("getUTCSeconds", a, 0),
    utcmilliseconds: r("getUTCMilliseconds", a, 0),
    // sequence functions
    length: r("length", null, -1),
    // STRING functions
    parseFloat: "parseFloat",
    parseInt: "parseInt",
    upper: r("toUpperCase", v, 0),
    lower: r("toLowerCase", v, 0),
    substring: r("substring", v),
    split: r("split", v),
    trim: r("trim", v, 0),
    // REGEXP functions
    regexp: o,
    test: r("test", o),
    // Control Flow functions
    if: function(s) {
      s.length < 3 && Jr("Missing arguments to if function."), s.length > 3 && Jr("Too many arguments to if function.");
      const n = s.map(e);
      return "(" + n[0] + "?" + n[1] + ":" + n[2] + ")";
    }
  };
}
function o9e(e) {
  const t = e && e.length - 1;
  return t && (e[0] === '"' && e[t] === '"' || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
}
function Lee(e) {
  e = e || {};
  const t = e.allowed ? vp(e.allowed) : {}, r = e.forbidden ? vp(e.forbidden) : {}, a = e.constants || Iee, v = (e.functions || Dee)(h), o = e.globalvar, s = e.fieldvar, n = qa(o) ? o : (d) => `${o}["${d}"]`;
  let l = {}, u = {}, i = 0;
  function h(d) {
    if (Fi(d)) return d;
    const f = p[d.type];
    return f == null && Jr("Unsupported type: " + d.type), f(d);
  }
  const p = {
    Literal: (d) => d.raw,
    Identifier: (d) => {
      const f = d.name;
      return i > 0 ? f : ua(r, f) ? Jr("Illegal identifier: " + f) : ua(a, f) ? a[f] : ua(t, f) ? f : (l[f] = 1, n(f));
    },
    MemberExpression: (d) => {
      const f = !d.computed, c = h(d.object);
      f && (i += 1);
      const g = h(d.property);
      return c === s && (u[o9e(g)] = 1), f && (i -= 1), c + (f ? "." + g : "[" + g + "]");
    },
    CallExpression: (d) => {
      d.callee.type !== "Identifier" && Jr("Illegal callee type: " + d.callee.type);
      const f = d.callee.name, c = d.arguments, g = ua(v, f) && v[f];
      return g || Jr("Unrecognized function: " + f), qa(g) ? g(c) : g + "(" + c.map(h).join(",") + ")";
    },
    ArrayExpression: (d) => "[" + d.elements.map(h).join(",") + "]",
    BinaryExpression: (d) => "(" + h(d.left) + " " + d.operator + " " + h(d.right) + ")",
    UnaryExpression: (d) => "(" + d.operator + h(d.argument) + ")",
    ConditionalExpression: (d) => "(" + h(d.test) + "?" + h(d.consequent) + ":" + h(d.alternate) + ")",
    LogicalExpression: (d) => "(" + h(d.left) + d.operator + h(d.right) + ")",
    ObjectExpression: (d) => "{" + d.properties.map(h).join(",") + "}",
    Property: (d) => {
      i += 1;
      const f = h(d.key);
      return i -= 1, f + ":" + h(d.value);
    }
  };
  function _(d) {
    const f = {
      code: h(d),
      globals: Object.keys(l),
      fields: Object.keys(u)
    };
    return l = {}, u = {}, f;
  }
  return _.functions = v, _.constants = a, _;
}
const aV = Symbol("vega_selection_getter");
function Pee(e) {
  return (!e.getter || !e.getter[aV]) && (e.getter = Dd(e.field), e.getter[aV] = !0), e.getter;
}
const HO = "intersect", oV = "union", s9e = "vlMulti", l9e = "vlPoint", sV = "or", u9e = "and", a0 = "_vgsid_", Fw = Dd(a0), c9e = "E", f9e = "R", h9e = "R-E", d9e = "R-LE", p9e = "R-RE", dk = "index:unit";
function lV(e, t) {
  for (var r = t.fields, a = t.values, v = r.length, o = 0, s, n; o < v; ++o)
    if (n = r[o], s = Pee(n)(e), sg(s) && (s = Of(s)), sg(a[o]) && (a[o] = Of(a[o])), Qr(a[o]) && sg(a[o][0]) && (a[o] = a[o].map(Of)), n.type === c9e) {
      if (Qr(a[o]) ? a[o].indexOf(s) < 0 : s !== a[o])
        return !1;
    } else if (n.type === f9e) {
      if (!rx(s, a[o])) return !1;
    } else if (n.type === p9e) {
      if (!rx(s, a[o], !0, !1)) return !1;
    } else if (n.type === h9e) {
      if (!rx(s, a[o], !1, !1)) return !1;
    } else if (n.type === d9e && !rx(s, a[o], !1, !0))
      return !1;
  return !0;
}
function m9e(e, t, r) {
  for (var a = this.context.data[e], v = a ? a.values.value : [], o = a ? a[dk] && a[dk].value : void 0, s = r === HO, n = v.length, l = 0, u, i, h, p, _; l < n; ++l)
    if (u = v[l], o && s) {
      if (i = i || {}, h = i[p = u.unit] || 0, h === -1) continue;
      if (_ = lV(t, u), i[p] = _ ? -1 : ++h, _ && o.size === 1) return !0;
      if (!_ && h === o.get(p).count) return !1;
    } else if (_ = lV(t, u), s ^ _) return _;
  return n && s;
}
const Oee = wb(Fw), g9e = Oee.left, y9e = Oee.right;
function v9e(e, t, r) {
  const a = this.context.data[e], v = a ? a.values.value : [], o = a ? a[dk] && a[dk].value : void 0, s = r === HO, n = Fw(t), l = g9e(v, n);
  if (l === v.length || Fw(v[l]) !== n) return !1;
  if (o && s) {
    if (o.size === 1) return !0;
    if (y9e(v, n) - l < o.size) return !1;
  }
  return !0;
}
function x9e(e, t) {
  return e.map((r) => $a(t.fields ? {
    values: t.fields.map((a) => Pee(a)(r.datum))
  } : {
    [a0]: Fw(r.datum)
  }, t));
}
function b9e(e, t, r, a) {
  for (var v = this.context.data[e], o = v ? v.values.value : [], s = {}, n = {}, l = {}, u, i, h, p, _, d, f, c, g, m, x = o.length, w = 0, k, S; w < x; ++w)
    if (u = o[w], p = u.unit, i = u.fields, h = u.values, i && h) {
      for (k = 0, S = i.length; k < S; ++k)
        _ = i[k], f = s[_.field] || (s[_.field] = {}), c = f[p] || (f[p] = []), l[_.field] = g = _.type.charAt(0), m = MM[`${g}_union`], f[p] = m(c, Ri(h[k]));
      r && (c = n[p] || (n[p] = []), c.push(Ri(h).reduce((A, C, D) => (A[i[D].field] = C, A), {})));
    } else
      _ = a0, d = Fw(u), f = s[_] || (s[_] = {}), c = f[p] || (f[p] = []), c.push(d), r && (c = n[p] || (n[p] = []), c.push({
        [a0]: d
      }));
  if (t = t || oV, s[a0] ? s[a0] = MM[`${a0}_${t}`](...Object.values(s[a0])) : Object.keys(s).forEach((A) => {
    s[A] = Object.keys(s[A]).map((C) => s[A][C]).reduce((C, D) => C === void 0 ? D : MM[`${l[A]}_${t}`](C, D));
  }), o = Object.keys(n), r && o.length) {
    const A = a ? l9e : s9e;
    s[A] = t === oV ? {
      [sV]: o.reduce((C, D) => (C.push(...n[D]), C), [])
    } : {
      [u9e]: o.map((C) => ({
        [sV]: n[C]
      }))
    };
  }
  return s;
}
var MM = {
  [`${a0}_union`]: p1e,
  [`${a0}_intersect`]: h1e,
  E_union: function(e, t) {
    if (!e.length) return t;
    for (var r = 0, a = t.length; r < a; ++r) e.indexOf(t[r]) < 0 && e.push(t[r]);
    return e;
  },
  E_intersect: function(e, t) {
    return e.length ? e.filter((r) => t.indexOf(r) >= 0) : t;
  },
  R_union: function(e, t) {
    var r = Of(t[0]), a = Of(t[1]);
    return r > a && (r = t[1], a = t[0]), e.length ? (e[0] > r && (e[0] = r), e[1] < a && (e[1] = a), e) : [r, a];
  },
  R_intersect: function(e, t) {
    var r = Of(t[0]), a = Of(t[1]);
    return r > a && (r = t[1], a = t[0]), e.length ? a < e[0] || e[1] < r ? [] : (e[0] < r && (e[0] = r), e[1] > a && (e[1] = a), e) : [r, a];
  }
};
const _9e = ":", w9e = "@";
function GO(e, t, r, a) {
  t[0].type !== Mv && Jr("First argument to selection functions must be a string literal.");
  const v = t[0].value, o = t.length >= 2 && mo(t).value, s = "unit", n = w9e + s, l = _9e + v;
  o === HO && !ua(a, n) && (a[n] = r.getData(v).indataRef(r, s)), ua(a, l) || (a[l] = r.getData(v).tuplesRef());
}
function zee(e) {
  const t = this.context.data[e];
  return t ? t.values.value : [];
}
function k9e(e, t, r) {
  const a = this.context.data[e]["index:" + t], v = a ? a.value.get(r) : void 0;
  return v && v.count;
}
function T9e(e, t) {
  const r = this.context.dataflow, a = this.context.data[e], v = a.input;
  return r.pulse(v, r.changeset().remove(Ld).insert(t)), 1;
}
function A9e(e, t, r) {
  if (e) {
    const a = this.context.dataflow, v = e.mark.source;
    a.pulse(v, a.changeset().encode(e, t));
  }
  return r !== void 0 ? r : e;
}
const O4 = (e) => function(t, r) {
  const a = this.context.dataflow.locale();
  return t === null ? "null" : a[e](r)(t);
}, S9e = O4("format"), Ree = O4("timeFormat"), M9e = O4("utcFormat"), E9e = O4("timeParse"), C9e = O4("utcParse"), z6 = new Date(2e3, 0, 1);
function cT(e, t, r) {
  return !Number.isInteger(e) || !Number.isInteger(t) ? "" : (z6.setYear(2e3), z6.setMonth(e), z6.setDate(t), Ree.call(this, z6, r));
}
function I9e(e) {
  return cT.call(this, e, 1, "%B");
}
function D9e(e) {
  return cT.call(this, e, 1, "%b");
}
function L9e(e) {
  return cT.call(this, 0, 2 + e, "%A");
}
function P9e(e) {
  return cT.call(this, 0, 2 + e, "%a");
}
const O9e = ":", z9e = "@", KC = "%", Fee = "$";
function WO(e, t, r, a) {
  t[0].type !== Mv && Jr("First argument to data functions must be a string literal.");
  const v = t[0].value, o = O9e + v;
  if (!ua(o, a))
    try {
      a[o] = r.getData(v).tuplesRef();
    } catch {
    }
}
function R9e(e, t, r, a) {
  t[0].type !== Mv && Jr("First argument to indata must be a string literal."), t[1].type !== Mv && Jr("Second argument to indata must be a string literal.");
  const v = t[0].value, o = t[1].value, s = z9e + o;
  ua(s, a) || (a[s] = r.getData(v).indataRef(r, o));
}
function uh(e, t, r, a) {
  if (t[0].type === Mv)
    uV(r, a, t[0].value);
  else
    for (e in r.scales)
      uV(r, a, e);
}
function uV(e, t, r) {
  const a = KC + r;
  if (!ua(t, a))
    try {
      t[a] = e.scaleRef(r);
    } catch {
    }
}
function H0(e, t) {
  if (qa(e))
    return e;
  if (Fi(e)) {
    const r = t.scales[e];
    return r && Wxe(r.value) ? r.value : void 0;
  }
}
function F9e(e, t, r) {
  t.__bandwidth = (v) => v && v.bandwidth ? v.bandwidth() : 0, r._bandwidth = uh, r._range = uh, r._scale = uh;
  const a = (v) => "_[" + (v.type === Mv ? vi(KC + v.value) : vi(KC) + "+" + e(v)) + "]";
  return {
    _bandwidth: (v) => `this.__bandwidth(${a(v[0])})`,
    _range: (v) => `${a(v[0])}.range()`,
    _scale: (v) => `${a(v[0])}(${e(v[1])})`
  };
}
function YO(e, t) {
  return function(r, a, v) {
    if (r) {
      const o = H0(r, (v || this).context);
      return o && o.path[e](a);
    } else
      return t(a);
  };
}
const N9e = YO("area", l4e), B9e = YO("bounds", h4e), j9e = YO("centroid", v4e);
function U9e(e, t) {
  const r = H0(e, (t || this).context);
  return r && r.scale();
}
function V9e(e) {
  const t = this.context.group;
  let r = !1;
  if (t) for (; e; ) {
    if (e === t) {
      r = !0;
      break;
    }
    e = e.mark.group;
  }
  return r;
}
function ZO(e, t, r) {
  try {
    e[t].apply(e, ["EXPRESSION"].concat([].slice.call(r)));
  } catch (a) {
    e.warn(a);
  }
  return r[r.length - 1];
}
function $9e() {
  return ZO(this.context.dataflow, "warn", arguments);
}
function q9e() {
  return ZO(this.context.dataflow, "info", arguments);
}
function H9e() {
  return ZO(this.context.dataflow, "debug", arguments);
}
function EM(e) {
  const t = e / 255;
  return t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function JC(e) {
  const t = wg(e), r = EM(t.r), a = EM(t.g), v = EM(t.b);
  return 0.2126 * r + 0.7152 * a + 0.0722 * v;
}
function G9e(e, t) {
  const r = JC(e), a = JC(t), v = Math.max(r, a), o = Math.min(r, a);
  return (v + 0.05) / (o + 0.05);
}
function W9e() {
  const e = [].slice.call(arguments);
  return e.unshift({}), $a(...e);
}
function Nee(e, t) {
  return e === t || e !== e && t !== t ? !0 : Qr(e) ? Qr(t) && e.length === t.length ? Y9e(e, t) : !1 : Oi(e) && Oi(t) ? Bee(e, t) : !1;
}
function Y9e(e, t) {
  for (let r = 0, a = e.length; r < a; ++r)
    if (!Nee(e[r], t[r])) return !1;
  return !0;
}
function Bee(e, t) {
  for (const r in e)
    if (!Nee(e[r], t[r])) return !1;
  return !0;
}
function cV(e) {
  return (t) => Bee(e, t);
}
function Z9e(e, t, r, a, v, o) {
  const s = this.context.dataflow, n = this.context.data[e], l = n.input, u = s.stamp();
  let i = n.changes, h, p;
  if (s._trigger === !1 || !(l.value.length || t || a))
    return 0;
  if ((!i || i.stamp < u) && (n.changes = i = s.changeset(), i.stamp = u, s.runAfter(() => {
    n.modified = !0, s.pulse(l, i).run();
  }, !0, 1)), r && (h = r === !0 ? Ld : Qr(r) || x9(r) ? r : cV(r), i.remove(h)), t && i.insert(t), a && (h = cV(a), l.value.some(h) ? i.remove(h) : i.insert(a)), v)
    for (p in o)
      i.modify(v, p, o[p]);
  return 1;
}
function X9e(e) {
  const t = e.touches, r = t[0].clientX - t[1].clientX, a = t[0].clientY - t[1].clientY;
  return Math.hypot(r, a);
}
function K9e(e) {
  const t = e.touches;
  return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
}
const fV = {};
function J9e(e, t) {
  const r = fV[t] || (fV[t] = Dd(t));
  return Qr(e) ? e.map(r) : r(e);
}
function XO(e) {
  return Qr(e) || ArrayBuffer.isView(e) ? e : null;
}
function KO(e) {
  return XO(e) || (Fi(e) ? e : null);
}
function Q9e(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
    r[a - 1] = arguments[a];
  return XO(e).join(...r);
}
function eTe(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
    r[a - 1] = arguments[a];
  return KO(e).indexOf(...r);
}
function tTe(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
    r[a - 1] = arguments[a];
  return KO(e).lastIndexOf(...r);
}
function nTe(e) {
  for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
    r[a - 1] = arguments[a];
  return KO(e).slice(...r);
}
function rTe(e, t, r) {
  return qa(r) && Jr("Function argument passed to replace."), String(e).replace(t, r);
}
function iTe(e) {
  return XO(e).slice().reverse();
}
function aTe(e, t, r) {
  return uP(e || 0, t || 0, r || 0);
}
function oTe(e, t) {
  const r = H0(e, (t || this).context);
  return r && r.bandwidth ? r.bandwidth() : 0;
}
function sTe(e, t) {
  const r = H0(e, (t || this).context);
  return r ? r.copy() : void 0;
}
function lTe(e, t) {
  const r = H0(e, (t || this).context);
  return r ? r.domain() : [];
}
function uTe(e, t, r) {
  const a = H0(e, (r || this).context);
  return a ? Qr(t) ? (a.invertRange || a.invert)(t) : (a.invert || a.invertExtent)(t) : void 0;
}
function cTe(e, t) {
  const r = H0(e, (t || this).context);
  return r && r.range ? r.range() : [];
}
function fTe(e, t, r) {
  const a = H0(e, (r || this).context);
  return a ? a(t) : void 0;
}
function hTe(e, t, r, a, v) {
  e = H0(e, (v || this).context);
  const o = CK(t, r);
  let s = e.domain(), n = s[0], l = mo(s), u = Uf;
  return l - n ? u = yK(e, n, l) : e = (e.interpolator ? Go("sequential")().interpolator(e.interpolator()) : Go("linear")().interpolate(e.interpolate()).range(e.range())).domain([n = 0, l = 1]), e.ticks && (s = e.ticks(+a || 15), n !== s[0] && s.unshift(n), l !== mo(s) && s.push(l)), s.forEach((i) => o.stop(u(i), e(i))), o;
}
function dTe(e, t, r) {
  const a = H0(e, (r || this).context);
  return function(v) {
    return a ? a.path.context(v)(t) : "";
  };
}
function pTe(e) {
  let t = null;
  return function(r) {
    return r ? Mw(r, t = t || Ux(e)) : e;
  };
}
const jee = (e) => e.data;
function Uee(e, t) {
  const r = zee.call(t, e);
  return r.root && r.root.lookup || {};
}
function mTe(e, t, r) {
  const a = Uee(e, this), v = a[t], o = a[r];
  return v && o ? v.path(o).map(jee) : void 0;
}
function gTe(e, t) {
  const r = Uee(e, this)[t];
  return r ? r.ancestors().map(jee) : void 0;
}
const Vee = () => typeof window < "u" && window || null;
function yTe() {
  const e = Vee();
  return e ? e.screen : {};
}
function vTe() {
  const e = Vee();
  return e ? [e.innerWidth, e.innerHeight] : [void 0, void 0];
}
function xTe() {
  const e = this.context.dataflow, t = e.container && e.container();
  return t ? [t.clientWidth, t.clientHeight] : [void 0, void 0];
}
function $ee(e, t, r) {
  if (!e) return [];
  const [a, v] = e, o = new ic().set(a[0], a[1], v[0], v[1]), s = r || this.context.dataflow.scenegraph().root;
  return SJ(s, o, bTe(t));
}
function bTe(e) {
  let t = null;
  if (e) {
    const r = Ri(e.marktype), a = Ri(e.markname);
    t = (v) => (!r.length || r.some((o) => v.marktype === o)) && (!a.length || a.some((o) => v.name === o));
  }
  return t;
}
function _Te(e, t, r) {
  let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5;
  e = Ri(e);
  const v = e[e.length - 1];
  return v === void 0 || Math.hypot(v[0] - t, v[1] - r) > a ? [...e, [t, r]] : e;
}
function wTe(e) {
  return Ri(e).reduce((t, r, a) => {
    let [v, o] = r;
    return t += a == 0 ? `M ${v},${o} ` : a === e.length - 1 ? " Z" : `L ${v},${o} `;
  }, "");
}
function kTe(e, t, r) {
  const {
    x: a,
    y: v,
    mark: o
  } = r, s = new ic().set(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
  for (const [l, u] of t)
    l < s.x1 && (s.x1 = l), l > s.x2 && (s.x2 = l), u < s.y1 && (s.y1 = u), u > s.y2 && (s.y2 = u);
  return s.translate(a, v), $ee([[s.x1, s.y1], [s.x2, s.y2]], e, o).filter((l) => TTe(l.x, l.y, t));
}
function TTe(e, t, r) {
  let a = 0;
  for (let v = 0, o = r.length - 1; v < r.length; o = v++) {
    const [s, n] = r[o], [l, u] = r[v];
    u > t != n > t && e < (s - l) * (t - u) / (n - u) + l && a++;
  }
  return a & 1;
}
const Nw = {
  random() {
    return Od();
  },
  // override default
  cumulativeNormal: T9,
  cumulativeLogNormal: uL,
  cumulativeUniform: dL,
  densityNormal: iL,
  densityLogNormal: lL,
  densityUniform: hL,
  quantileNormal: A9,
  quantileLogNormal: cL,
  quantileUniform: pL,
  sampleNormal: k9,
  sampleLogNormal: sL,
  sampleUniform: fL,
  isArray: Qr,
  isBoolean: Rg,
  isDate: sg,
  isDefined(e) {
    return e !== void 0;
  },
  isNumber: Ro,
  isObject: Oi,
  isRegExp: XW,
  isString: Fi,
  isTuple: x9,
  isValid(e) {
    return e != null && e === e;
  },
  toBoolean: FD,
  toDate(e) {
    return ND(e);
  },
  // suppress extra arguments
  toNumber: Of,
  toString: BD,
  indexof: eTe,
  join: Q9e,
  lastindexof: tTe,
  replace: rTe,
  reverse: iTe,
  slice: nTe,
  flush: YW,
  lerp: KW,
  merge: W9e,
  pad: eY,
  peek: mo,
  pluck: J9e,
  span: s4,
  inrange: rx,
  truncate: tY,
  rgb: wg,
  lab: x7,
  hcl: b7,
  hsl: y7,
  luminance: JC,
  contrast: G9e,
  sequence: Kh,
  format: S9e,
  utcFormat: M9e,
  utcParse: C9e,
  utcOffset: OY,
  utcSequence: FY,
  timeFormat: Ree,
  timeParse: E9e,
  timeOffset: PY,
  timeSequence: RY,
  timeUnitSpecifier: wY,
  monthFormat: I9e,
  monthAbbrevFormat: D9e,
  dayFormat: L9e,
  dayAbbrevFormat: P9e,
  quarter: qW,
  utcquarter: HW,
  week: TY,
  utcweek: MY,
  dayofyear: kY,
  utcdayofyear: SY,
  warn: $9e,
  info: q9e,
  debug: H9e,
  extent(e) {
    return M0(e);
  },
  // suppress extra arguments
  inScope: V9e,
  intersect: $ee,
  clampRange: GW,
  pinchDistance: X9e,
  pinchAngle: K9e,
  screen: yTe,
  containerSize: xTe,
  windowSize: vTe,
  bandspace: aTe,
  setdata: T9e,
  pathShape: pTe,
  panLinear: jW,
  panLog: UW,
  panPow: VW,
  panSymlog: $W,
  zoomLinear: DD,
  zoomLog: LD,
  zoomPow: i7,
  zoomSymlog: PD,
  encode: A9e,
  modify: Z9e,
  lassoAppend: _Te,
  lassoPath: wTe,
  intersectLasso: kTe
}, ATe = ["view", "item", "group", "xy", "x", "y"], STe = "event.vega.", qee = "this.", JO = {}, Hee = {
  forbidden: ["_"],
  allowed: ["datum", "event", "item"],
  fieldvar: "datum",
  globalvar: (e) => `_[${vi(Fee + e)}]`,
  functions: MTe,
  constants: Iee,
  visitors: JO
}, QC = Lee(Hee);
function MTe(e) {
  const t = Dee(e);
  ATe.forEach((r) => t[r] = STe + r);
  for (const r in Nw)
    t[r] = qee + r;
  return $a(t, F9e(e, Nw, JO)), t;
}
function Zu(e, t, r) {
  return arguments.length === 1 ? Nw[e] : (Nw[e] = t, r && (JO[e] = r), QC && (QC.functions[e] = qee + e), this);
}
Zu("bandwidth", oTe, uh);
Zu("copy", sTe, uh);
Zu("domain", lTe, uh);
Zu("range", cTe, uh);
Zu("invert", uTe, uh);
Zu("scale", fTe, uh);
Zu("gradient", hTe, uh);
Zu("geoArea", N9e, uh);
Zu("geoBounds", B9e, uh);
Zu("geoCentroid", j9e, uh);
Zu("geoShape", dTe, uh);
Zu("geoScale", U9e, uh);
Zu("indata", k9e, R9e);
Zu("data", zee, WO);
Zu("treePath", mTe, WO);
Zu("treeAncestors", gTe, WO);
Zu("vlSelectionTest", m9e, GO);
Zu("vlSelectionIdTest", v9e, GO);
Zu("vlSelectionResolve", b9e, GO);
Zu("vlSelectionTuples", x9e);
function L0(e, t) {
  const r = {};
  let a;
  try {
    e = Fi(e) ? e : vi(e) + "", a = qO(e);
  } catch {
    Jr("Expression parse error: " + e);
  }
  a.visit((o) => {
    if (o.type !== kee) return;
    const s = o.callee.name, n = Hee.visitors[s];
    n && n(s, o.arguments, t, r);
  });
  const v = QC(a);
  return v.globals.forEach((o) => {
    const s = Fee + o;
    !ua(r, s) && t.getSignal(o) && (r[s] = t.signalRef(o));
  }), {
    $expr: $a({
      code: v.code
    }, t.options.ast ? {
      ast: a
    } : null),
    $fields: v.fields,
    $params: r
  };
}
function ETe(e) {
  const t = this, r = e.operators || [];
  return e.background && (t.background = e.background), e.eventConfig && (t.eventConfig = e.eventConfig), e.locale && (t.locale = e.locale), r.forEach((a) => t.parseOperator(a)), r.forEach((a) => t.parseOperatorParameters(a)), (e.streams || []).forEach((a) => t.parseStream(a)), (e.updates || []).forEach((a) => t.parseUpdate(a)), t.resolve();
}
const CTe = vp(["rule"]), hV = vp(["group", "image", "rect"]);
function ITe(e, t) {
  let r = "";
  return CTe[t] || (e.x2 && (e.x ? (hV[t] && (r += "if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"), r += "o.width=o.x2-o.x;") : r += "o.x=o.x2-(o.width||0);"), e.xc && (r += "o.x=o.xc-(o.width||0)/2;"), e.y2 && (e.y ? (hV[t] && (r += "if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"), r += "o.height=o.y2-o.y;") : r += "o.y=o.y2-(o.height||0);"), e.yc && (r += "o.y=o.yc-(o.height||0)/2;")), r;
}
function QO(e) {
  return (e + "").toLowerCase();
}
function DTe(e) {
  return QO(e) === "operator";
}
function LTe(e) {
  return QO(e) === "collect";
}
function e3(e, t, r) {
  r.endsWith(";") || (r = "return(" + r + ");");
  const a = Function(...t.concat(r));
  return e && e.functions ? a.bind(e.functions) : a;
}
function PTe(e, t, r, a) {
  return `((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${r}
  : (u > v || v == null) && u != null ? ${a}
  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${r}
  : v !== v && u === u ? ${a} : `;
}
var OTe = {
  /**
   * Parse an expression used to update an operator value.
   */
  operator: (e, t) => e3(e, ["_"], t.code),
  /**
   * Parse an expression provided as an operator parameter value.
   */
  parameter: (e, t) => e3(e, ["datum", "_"], t.code),
  /**
   * Parse an expression applied to an event stream.
   */
  event: (e, t) => e3(e, ["event"], t.code),
  /**
   * Parse an expression used to handle an event-driven operator update.
   */
  handler: (e, t) => {
    const r = `var datum=event.item&&event.item.datum;return ${t.code};`;
    return e3(e, ["_", "event"], r);
  },
  /**
   * Parse an expression that performs visual encoding.
   */
  encode: (e, t) => {
    const {
      marktype: r,
      channels: a
    } = t;
    let v = "var o=item,datum=o.datum,m=0,$;";
    for (const o in a) {
      const s = "o[" + vi(o) + "]";
      v += `$=${a[o].code};if(${s}!==$)${s}=$,m=1;`;
    }
    return v += ITe(a, r), v += "return m;", e3(e, ["item", "_"], v);
  },
  /**
   * Optimized code generators for access and comparison.
   */
  codegen: {
    get(e) {
      const t = `[${e.map(vi).join("][")}]`, r = Function("_", `return _${t};`);
      return r.path = t, r;
    },
    comparator(e, t) {
      let r;
      const a = (o, s) => {
        const n = t[s];
        let l, u;
        return o.path ? (l = `a${o.path}`, u = `b${o.path}`) : ((r = r || {})["f" + s] = o, l = `this.f${s}(a)`, u = `this.f${s}(b)`), PTe(l, u, -n, n);
      }, v = Function("a", "b", "var u, v; return " + e.map(a).join("") + "0;");
      return r ? v.bind(r) : v;
    }
  }
};
function zTe(e) {
  const t = this;
  DTe(e.type) || !e.type ? t.operator(e, e.update ? t.operatorExpression(e.update) : null) : t.transform(e, e.type);
}
function RTe(e) {
  const t = this;
  if (e.params) {
    const r = t.get(e.id);
    r || Jr("Invalid operator id: " + e.id), t.dataflow.connect(r, r.parameters(t.parseParameters(e.params), e.react, e.initonly));
  }
}
function FTe(e, t) {
  t = t || {};
  const r = this;
  for (const a in e) {
    const v = e[a];
    t[a] = Qr(v) ? v.map((o) => dV(o, r, t)) : dV(v, r, t);
  }
  return t;
}
function dV(e, t, r) {
  if (!e || !Oi(e)) return e;
  for (let a = 0, v = pV.length, o; a < v; ++a)
    if (o = pV[a], ua(e, o.key))
      return o.parse(e, t, r);
  return e;
}
var pV = [{
  key: "$ref",
  parse: NTe
}, {
  key: "$key",
  parse: jTe
}, {
  key: "$expr",
  parse: BTe
}, {
  key: "$field",
  parse: UTe
}, {
  key: "$encode",
  parse: $Te
}, {
  key: "$compare",
  parse: VTe
}, {
  key: "$context",
  parse: qTe
}, {
  key: "$subflow",
  parse: HTe
}, {
  key: "$tupleid",
  parse: GTe
}];
function NTe(e, t) {
  return t.get(e.$ref) || Jr("Operator not defined: " + e.$ref);
}
function BTe(e, t, r) {
  e.$params && t.parseParameters(e.$params, r);
  const a = "e:" + e.$expr.code;
  return t.fn[a] || (t.fn[a] = jh(t.parameterExpression(e.$expr), e.$fields));
}
function jTe(e, t) {
  const r = "k:" + e.$key + "_" + !!e.$flat;
  return t.fn[r] || (t.fn[r] = RD(e.$key, e.$flat, t.expr.codegen));
}
function UTe(e, t) {
  if (!e.$field) return null;
  const r = "f:" + e.$field + "_" + e.$name;
  return t.fn[r] || (t.fn[r] = Dd(e.$field, e.$name, t.expr.codegen));
}
function VTe(e, t) {
  const r = "c:" + e.$compare + "_" + e.$order, a = Ri(e.$compare).map((v) => v && v.$tupleid ? sa : v);
  return t.fn[r] || (t.fn[r] = OD(a, e.$order, t.expr.codegen));
}
function $Te(e, t) {
  const r = e.$encode, a = {};
  for (const v in r) {
    const o = r[v];
    a[v] = jh(t.encodeExpression(o.$expr), o.$fields), a[v].output = o.$output;
  }
  return a;
}
function qTe(e, t) {
  return t;
}
function HTe(e, t) {
  const r = e.$subflow;
  return function(a, v, o) {
    const s = t.fork().parse(r), n = s.get(r.operators[0].id), l = s.signals.parent;
    return l && l.set(o), n.detachSubflow = () => t.detach(s), n;
  };
}
function GTe() {
  return sa;
}
function WTe(e) {
  var t = this, r = e.filter != null ? t.eventExpression(e.filter) : void 0, a = e.stream != null ? t.get(e.stream) : void 0, v;
  e.source ? a = t.events(e.source, e.type, r) : e.merge && (v = e.merge.map((o) => t.get(o)), a = v[0].merge.apply(v[0], v.slice(1))), e.between && (v = e.between.map((o) => t.get(o)), a = a.between(v[0], v[1])), e.filter && (a = a.filter(r)), e.throttle != null && (a = a.throttle(+e.throttle)), e.debounce != null && (a = a.debounce(+e.debounce)), a == null && Jr("Invalid stream definition: " + JSON.stringify(e)), e.consume && a.consume(!0), t.stream(e, a);
}
function YTe(e) {
  var t = this, r = Oi(r = e.source) ? r.$ref : r, a = t.get(r), v = null, o = e.update, s = void 0;
  a || Jr("Source not defined: " + e.source), v = e.target && e.target.$expr ? t.eventExpression(e.target.$expr) : t.get(e.target), o && o.$expr && (o.$params && (s = t.parseParameters(o.$params)), o = t.handlerExpression(o.$expr)), t.update(e, a, v, o, s);
}
const ZTe = {
  skip: !0
};
function XTe(e) {
  var t = this, r = {};
  if (e.signals) {
    var a = r.signals = {};
    Object.keys(t.signals).forEach((o) => {
      const s = t.signals[o];
      e.signals(o, s) && (a[o] = s.value);
    });
  }
  if (e.data) {
    var v = r.data = {};
    Object.keys(t.data).forEach((o) => {
      const s = t.data[o];
      e.data(o, s) && (v[o] = s.input.value);
    });
  }
  return t.subcontext && e.recurse !== !1 && (r.subcontext = t.subcontext.map((o) => o.getState(e))), r;
}
function KTe(e) {
  var t = this, r = t.dataflow, a = e.data, v = e.signals;
  Object.keys(v || {}).forEach((o) => {
    r.update(t.signals[o], v[o], ZTe);
  }), Object.keys(a || {}).forEach((o) => {
    r.pulse(t.data[o].input, r.changeset().remove(Ld).insert(a[o]));
  }), (e.subcontext || []).forEach((o, s) => {
    const n = t.subcontext[s];
    n && n.setState(o);
  });
}
function Gee(e, t, r, a) {
  return new Wee(e, t, r, a);
}
function Wee(e, t, r, a) {
  this.dataflow = e, this.transforms = t, this.events = e.events.bind(e), this.expr = a || OTe, this.signals = {}, this.scales = {}, this.nodes = {}, this.data = {}, this.fn = {}, r && (this.functions = Object.create(r), this.functions.context = this);
}
function mV(e) {
  this.dataflow = e.dataflow, this.transforms = e.transforms, this.events = e.events, this.expr = e.expr, this.signals = Object.create(e.signals), this.scales = Object.create(e.scales), this.nodes = Object.create(e.nodes), this.data = Object.create(e.data), this.fn = Object.create(e.fn), e.functions && (this.functions = Object.create(e.functions), this.functions.context = this);
}
Wee.prototype = mV.prototype = {
  fork() {
    const e = new mV(this);
    return (this.subcontext || (this.subcontext = [])).push(e), e;
  },
  detach(e) {
    this.subcontext = this.subcontext.filter((r) => r !== e);
    const t = Object.keys(e.nodes);
    for (const r of t) e.nodes[r]._targets = null;
    for (const r of t) e.nodes[r].detach();
    e.nodes = null;
  },
  get(e) {
    return this.nodes[e];
  },
  set(e, t) {
    return this.nodes[e] = t;
  },
  add(e, t) {
    const r = this, a = r.dataflow, v = e.value;
    if (r.set(e.id, t), LTe(e.type) && v && (v.$ingest ? a.ingest(t, v.$ingest, v.$format) : v.$request ? a.preload(t, v.$request, v.$format) : a.pulse(t, a.changeset().insert(v))), e.root && (r.root = t), e.parent) {
      let o = r.get(e.parent.$ref);
      o ? (a.connect(o, [t]), t.targets().add(o)) : (r.unresolved = r.unresolved || []).push(() => {
        o = r.get(e.parent.$ref), a.connect(o, [t]), t.targets().add(o);
      });
    }
    if (e.signal && (r.signals[e.signal] = t), e.scale && (r.scales[e.scale] = t), e.data)
      for (const o in e.data) {
        const s = r.data[o] || (r.data[o] = {});
        e.data[o].forEach((n) => s[n] = t);
      }
  },
  resolve() {
    return (this.unresolved || []).forEach((e) => e()), delete this.unresolved, this;
  },
  operator(e, t) {
    this.add(e, this.dataflow.add(e.value, t));
  },
  transform(e, t) {
    this.add(e, this.dataflow.add(this.transforms[QO(t)]));
  },
  stream(e, t) {
    this.set(e.id, t);
  },
  update(e, t, r, a, v) {
    this.dataflow.on(t, r, a, v, e.options);
  },
  // expression parsing
  operatorExpression(e) {
    return this.expr.operator(this, e);
  },
  parameterExpression(e) {
    return this.expr.parameter(this, e);
  },
  eventExpression(e) {
    return this.expr.event(this, e);
  },
  handlerExpression(e) {
    return this.expr.handler(this, e);
  },
  encodeExpression(e) {
    return this.expr.encode(this, e);
  },
  // parse methods
  parse: ETe,
  parseOperator: zTe,
  parseOperatorParameters: RTe,
  parseParameters: FTe,
  parseStream: WTe,
  parseUpdate: YTe,
  // state methods
  getState: XTe,
  setState: KTe
};
function JTe(e) {
  const t = e.container();
  t && (t.setAttribute("role", "graphics-document"), t.setAttribute("aria-roleDescription", "visualization"), Yee(t, e.description()));
}
function Yee(e, t) {
  e && (t == null ? e.removeAttribute("aria-label") : e.setAttribute("aria-label", t));
}
function QTe(e) {
  e.add(null, (t) => (e._background = t.bg, e._resize = 1, t.bg), {
    bg: e._signals.background
  });
}
const CM = "default";
function eAe(e) {
  const t = e._signals.cursor || (e._signals.cursor = e.add({
    user: CM,
    item: null
  }));
  e.on(e.events("view", "pointermove"), t, (r, a) => {
    const v = t.value, o = v ? Fi(v) ? v : v.user : CM, s = a.item && a.item.cursor || null;
    return v && o === v.user && s == v.item ? v : {
      user: o,
      item: s
    };
  }), e.add(null, function(r) {
    let a = r.cursor, v = this.value;
    return Fi(a) || (v = a.item, a = a.user), eI(e, a && a !== CM ? a : v || a), v;
  }, {
    cursor: t
  });
}
function eI(e, t) {
  const r = e.globalCursor() ? typeof document < "u" && document.body : e.container();
  if (r)
    return t == null ? r.style.removeProperty("cursor") : r.style.cursor = t;
}
function pk(e, t) {
  var r = e._runtime.data;
  return ua(r, t) || Jr("Unrecognized data set: " + t), r[t];
}
function tAe(e, t) {
  return arguments.length < 2 ? pk(this, e).values.value : fT.call(this, e, Hv().remove(Ld).insert(t));
}
function fT(e, t) {
  cZ(t) || Jr("Second argument to changes must be a changeset.");
  const r = pk(this, e);
  return r.modified = !0, this.pulse(r.input, t);
}
function nAe(e, t) {
  return fT.call(this, e, Hv().insert(t));
}
function rAe(e, t) {
  return fT.call(this, e, Hv().remove(t));
}
function Zee(e) {
  var t = e.padding();
  return Math.max(0, e._viewWidth + t.left + t.right);
}
function Xee(e) {
  var t = e.padding();
  return Math.max(0, e._viewHeight + t.top + t.bottom);
}
function hT(e) {
  var t = e.padding(), r = e._origin;
  return [t.left + r[0], t.top + r[1]];
}
function iAe(e) {
  var t = hT(e), r = Zee(e), a = Xee(e);
  e._renderer.background(e.background()), e._renderer.resize(r, a, t), e._handler.origin(t), e._resizeListeners.forEach((v) => {
    try {
      v(r, a);
    } catch (o) {
      e.error(o);
    }
  });
}
function aAe(e, t, r) {
  var a = e._renderer, v = a && a.canvas(), o, s, n;
  return v && (n = hT(e), s = t.changedTouches ? t.changedTouches[0] : t, o = J9(s, v), o[0] -= n[0], o[1] -= n[1]), t.dataflow = e, t.item = r, t.vega = oAe(e, r, o), t;
}
function oAe(e, t, r) {
  const a = t ? t.mark.marktype === "group" ? t : t.mark.group : null;
  function v(s) {
    var n = a, l;
    if (s) {
      for (l = t; l; l = l.mark.group)
        if (l.mark.name === s) {
          n = l;
          break;
        }
    }
    return n && n.mark && n.mark.interactive ? n : {};
  }
  function o(s) {
    if (!s) return r;
    Fi(s) && (s = v(s));
    const n = r.slice();
    for (; s; )
      n[0] -= s.x || 0, n[1] -= s.y || 0, s = s.mark && s.mark.group;
    return n;
  }
  return {
    view: Vf(e),
    item: Vf(t || {}),
    group: v,
    xy: o,
    x: (s) => o(s)[0],
    y: (s) => o(s)[1]
  };
}
const gV = "view", sAe = "timer", lAe = "window", uAe = {
  trap: !1
};
function cAe(e) {
  const t = $a({
    defaults: {}
  }, e), r = (a, v) => {
    v.forEach((o) => {
      Qr(a[o]) && (a[o] = vp(a[o]));
    });
  };
  return r(t.defaults, ["prevent", "allow"]), r(t, ["view", "window", "selector"]), t;
}
function Kee(e, t, r, a) {
  e._eventListeners.push({
    type: r,
    sources: Ri(t),
    handler: a
  });
}
function fAe(e, t) {
  var r = e._eventConfig.defaults, a = r.prevent, v = r.allow;
  return a === !1 || v === !0 ? !1 : a === !0 || v === !1 ? !0 : a ? a[t] : v ? !v[t] : e.preventDefault();
}
function R6(e, t, r) {
  const a = e._eventConfig && e._eventConfig[t];
  return a === !1 || Oi(a) && !a[r] ? (e.warn(`Blocked ${t} ${r} event listener.`), !1) : !0;
}
function hAe(e, t, r) {
  var a = this, v = new w9(r), o = function(u, i) {
    a.runAsync(null, () => {
      e === gV && fAe(a, t) && u.preventDefault(), v.receive(aAe(a, u, i));
    });
  }, s;
  if (e === sAe)
    R6(a, "timer", t) && a.timer(o, t);
  else if (e === gV)
    R6(a, "view", t) && a.addEventListener(t, o, uAe);
  else if (e === lAe ? R6(a, "window", t) && typeof window < "u" && (s = [window]) : typeof document < "u" && R6(a, "selector", t) && (s = Array.from(document.querySelectorAll(e))), !s)
    a.warn("Can not resolve event source: " + e);
  else {
    for (var n = 0, l = s.length; n < l; ++n)
      s[n].addEventListener(t, o);
    Kee(a, s, t, o);
  }
  return v;
}
function yV(e) {
  return e.item;
}
function vV(e) {
  return e.item.mark.source;
}
function xV(e) {
  return function(t, r) {
    return r.vega.view().changeset().encode(r.item, e);
  };
}
function dAe(e, t) {
  return e = [e || "hover"], t = [t || "update", e[0]], this.on(this.events("view", "pointerover", yV), vV, xV(e)), this.on(this.events("view", "pointerout", yV), vV, xV(t)), this;
}
function pAe() {
  var e = this._tooltip, t = this._timers, r = this._handler.handlers(), a = this._eventListeners, v, o, s, n, l;
  for (v = t.length; --v >= 0; )
    t[v].stop();
  for (v = a.length; --v >= 0; )
    for (s = a[v], o = s.sources.length; --o >= 0; )
      s.sources[o].removeEventListener(s.type, s.handler);
  for (e && e.call(this, this._handler, null, null, null), v = r.length; --v >= 0; )
    l = r[v].type, n = r[v].handler, this._handler.off(l, n);
  return this;
}
function nd(e, t, r) {
  const a = document.createElement(e);
  for (const v in t) a.setAttribute(v, t[v]);
  return r != null && (a.textContent = r), a;
}
const mAe = "vega-bind", gAe = "vega-bind-name", yAe = "vega-bind-radio";
function vAe(e, t, r) {
  if (!t) return;
  const a = r.param;
  let v = r.state;
  return v || (v = r.state = {
    elements: null,
    active: !1,
    set: null,
    update: (s) => {
      s != e.signal(a.signal) && e.runAsync(null, () => {
        v.source = !0, e.signal(a.signal, s);
      });
    }
  }, a.debounce && (v.update = zD(a.debounce, v.update))), (a.input == null && a.element ? xAe : _Ae)(v, t, a, e), v.active || (e.on(e._signals[a.signal], null, () => {
    v.source ? v.source = !1 : v.set(e.signal(a.signal));
  }), v.active = !0), v;
}
function xAe(e, t, r, a) {
  const v = r.event || "input", o = () => e.update(t.value);
  a.signal(r.signal, t.value), t.addEventListener(v, o), Kee(a, t, v, o), e.set = (s) => {
    t.value = s, t.dispatchEvent(bAe(v));
  };
}
function bAe(e) {
  return typeof Event < "u" ? new Event(e) : {
    type: e
  };
}
function _Ae(e, t, r, a) {
  const v = a.signal(r.signal), o = nd("div", {
    class: mAe
  }), s = r.input === "radio" ? o : o.appendChild(nd("label"));
  s.appendChild(nd("span", {
    class: gAe
  }, r.name || r.signal)), t.appendChild(o);
  let n = wAe;
  switch (r.input) {
    case "checkbox":
      n = kAe;
      break;
    case "select":
      n = TAe;
      break;
    case "radio":
      n = AAe;
      break;
    case "range":
      n = SAe;
      break;
  }
  n(e, s, r, v);
}
function wAe(e, t, r, a) {
  const v = nd("input");
  for (const o in r)
    o !== "signal" && o !== "element" && v.setAttribute(o === "input" ? "type" : o, r[o]);
  v.setAttribute("name", r.signal), v.value = a, t.appendChild(v), v.addEventListener("input", () => e.update(v.value)), e.elements = [v], e.set = (o) => v.value = o;
}
function kAe(e, t, r, a) {
  const v = {
    type: "checkbox",
    name: r.signal
  };
  a && (v.checked = !0);
  const o = nd("input", v);
  t.appendChild(o), o.addEventListener("change", () => e.update(o.checked)), e.elements = [o], e.set = (s) => o.checked = !!s || null;
}
function TAe(e, t, r, a) {
  const v = nd("select", {
    name: r.signal
  }), o = r.labels || [];
  r.options.forEach((s, n) => {
    const l = {
      value: s
    };
    mk(s, a) && (l.selected = !0), v.appendChild(nd("option", l, (o[n] || s) + ""));
  }), t.appendChild(v), v.addEventListener("change", () => {
    e.update(r.options[v.selectedIndex]);
  }), e.elements = [v], e.set = (s) => {
    for (let n = 0, l = r.options.length; n < l; ++n)
      if (mk(r.options[n], s)) {
        v.selectedIndex = n;
        return;
      }
  };
}
function AAe(e, t, r, a) {
  const v = nd("span", {
    class: yAe
  }), o = r.labels || [];
  t.appendChild(v), e.elements = r.options.map((s, n) => {
    const l = {
      type: "radio",
      name: r.signal,
      value: s
    };
    mk(s, a) && (l.checked = !0);
    const u = nd("input", l);
    u.addEventListener("change", () => e.update(s));
    const i = nd("label", {}, (o[n] || s) + "");
    return i.prepend(u), v.appendChild(i), u;
  }), e.set = (s) => {
    const n = e.elements, l = n.length;
    for (let u = 0; u < l; ++u)
      mk(n[u].value, s) && (n[u].checked = !0);
  };
}
function SAe(e, t, r, a) {
  a = a !== void 0 ? a : (+r.max + +r.min) / 2;
  const v = r.max != null ? r.max : Math.max(100, +a) || 100, o = r.min || Math.min(0, v, +a) || 0, s = r.step || xg(o, v, 100), n = nd("input", {
    type: "range",
    name: r.signal,
    min: o,
    max: v,
    step: s
  });
  n.value = a;
  const l = nd("span", {}, +a);
  t.appendChild(n), t.appendChild(l);
  const u = () => {
    l.textContent = n.value, e.update(+n.value);
  };
  n.addEventListener("input", u), n.addEventListener("change", u), e.elements = [n], e.set = (i) => {
    n.value = i, l.textContent = i;
  };
}
function mk(e, t) {
  return e === t || e + "" == t + "";
}
function Jee(e, t, r, a, v, o) {
  return t = t || new a(e.loader()), t.initialize(r, Zee(e), Xee(e), hT(e), v, o).background(e.background());
}
function ez(e, t) {
  return t ? function() {
    try {
      t.apply(this, arguments);
    } catch (r) {
      e.error(r);
    }
  } : null;
}
function MAe(e, t, r, a) {
  const v = new a(e.loader(), ez(e, e.tooltip())).scene(e.scenegraph().root).initialize(r, hT(e), e);
  return t && t.handlers().forEach((o) => {
    v.on(o.type, o.handler);
  }), v;
}
function EAe(e, t) {
  const r = this, a = r._renderType, v = r._eventConfig.bind, o = Q9(a);
  e = r._el = e ? IM(r, e, !0) : null, JTe(r), o || r.error("Unrecognized renderer type: " + a);
  const s = o.handler || S4, n = e ? o.renderer : o.headless;
  return r._renderer = n ? Jee(r, r._renderer, e, n) : null, r._handler = MAe(r, r._handler, e, s), r._redraw = !0, e && v !== "none" && (t = t ? r._elBind = IM(r, t, !0) : e.appendChild(nd("form", {
    class: "vega-bindings"
  })), r._bind.forEach((l) => {
    l.param.element && v !== "container" && (l.element = IM(r, l.param.element, !!l.param.input));
  }), r._bind.forEach((l) => {
    vAe(r, l.element || t, l);
  })), r;
}
function IM(e, t, r) {
  if (typeof t == "string")
    if (typeof document < "u") {
      if (t = document.querySelector(t), !t)
        return e.error("Signal bind element not found: " + t), null;
    } else
      return e.error("DOM document instance not found."), null;
  if (t && r)
    try {
      t.textContent = "";
    } catch (a) {
      t = null, e.error(a);
    }
  return t;
}
const t3 = (e) => +e || 0, CAe = (e) => ({
  top: e,
  bottom: e,
  left: e,
  right: e
});
function bV(e) {
  return Oi(e) ? {
    top: t3(e.top),
    bottom: t3(e.bottom),
    left: t3(e.left),
    right: t3(e.right)
  } : CAe(t3(e));
}
async function tz(e, t, r, a) {
  const v = Q9(t), o = v && v.headless;
  return o || Jr("Unrecognized renderer type: " + t), await e.runAsync(), Jee(e, null, null, o, r, a).renderAsync(e._scenegraph.root);
}
async function IAe(e, t) {
  e !== tg.Canvas && e !== tg.SVG && e !== tg.PNG && Jr("Unrecognized image type: " + e);
  const r = await tz(this, e, t);
  return e === tg.SVG ? DAe(r.svg(), "image/svg+xml") : r.canvas().toDataURL("image/png");
}
function DAe(e, t) {
  const r = new Blob([e], {
    type: t
  });
  return window.URL.createObjectURL(r);
}
async function LAe(e, t) {
  return (await tz(this, tg.Canvas, e, t)).canvas();
}
async function PAe(e) {
  return (await tz(this, tg.SVG, e)).svg();
}
function OAe(e, t, r) {
  return Gee(e, zx, Nw, r).parse(t);
}
function zAe(e) {
  var t = this._runtime.scales;
  return ua(t, e) || Jr("Unrecognized scale or projection: " + e), t[e].value;
}
var Qee = "width", ete = "height", nz = "padding", _V = {
  skip: !0
};
function tte(e, t) {
  var r = e.autosize(), a = e.padding();
  return t - (r && r.contains === nz ? a.left + a.right : 0);
}
function nte(e, t) {
  var r = e.autosize(), a = e.padding();
  return t - (r && r.contains === nz ? a.top + a.bottom : 0);
}
function RAe(e) {
  var t = e._signals, r = t[Qee], a = t[ete], v = t[nz];
  function o() {
    e._autosize = e._resize = 1;
  }
  e._resizeWidth = e.add(null, (n) => {
    e._width = n.size, e._viewWidth = tte(e, n.size), o();
  }, {
    size: r
  }), e._resizeHeight = e.add(null, (n) => {
    e._height = n.size, e._viewHeight = nte(e, n.size), o();
  }, {
    size: a
  });
  const s = e.add(null, o, {
    pad: v
  });
  e._resizeWidth.rank = r.rank + 1, e._resizeHeight.rank = a.rank + 1, s.rank = v.rank + 1;
}
function FAe(e, t, r, a, v, o) {
  this.runAfter((s) => {
    let n = 0;
    s._autosize = 0, s.width() !== r && (n = 1, s.signal(Qee, r, _V), s._resizeWidth.skip(!0)), s.height() !== a && (n = 1, s.signal(ete, a, _V), s._resizeHeight.skip(!0)), s._viewWidth !== e && (s._resize = 1, s._viewWidth = e), s._viewHeight !== t && (s._resize = 1, s._viewHeight = t), (s._origin[0] !== v[0] || s._origin[1] !== v[1]) && (s._resize = 1, s._origin = v), n && s.run("enter"), o && s.runAfter((l) => l.resize());
  }, !1, 1);
}
function NAe(e) {
  return this._runtime.getState(e || {
    data: BAe,
    signals: jAe,
    recurse: !0
  });
}
function BAe(e, t) {
  return t.modified && Qr(t.input.value) && !e.startsWith("_:vega:_");
}
function jAe(e, t) {
  return !(e === "parent" || t instanceof zx.proxy);
}
function UAe(e) {
  return this.runAsync(null, (t) => {
    t._trigger = !1, t._runtime.setState(e);
  }, (t) => {
    t._trigger = !0;
  }), this;
}
function VAe(e, t) {
  function r(a) {
    e({
      timestamp: Date.now(),
      elapsed: a
    });
  }
  this._timers.push(x6e(r, t));
}
function $Ae(e, t, r, a) {
  const v = e.element();
  v && v.setAttribute("title", qAe(a));
}
function qAe(e) {
  return e == null ? "" : Qr(e) ? rte(e) : Oi(e) && !sg(e) ? HAe(e) : e + "";
}
function HAe(e) {
  return Object.keys(e).map((t) => {
    const r = e[t];
    return t + ": " + (Qr(r) ? rte(r) : ite(r));
  }).join(`
`);
}
function rte(e) {
  return "[" + e.map(ite).join(", ") + "]";
}
function ite(e) {
  return Qr(e) ? "[…]" : Oi(e) && !sg(e) ? "{…}" : e;
}
function GAe() {
  if (this.renderer() === "canvas" && this._renderer._canvas) {
    let e = null;
    const t = () => {
      e != null && e();
      const r = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
      r.addEventListener("change", t), e = () => {
        r.removeEventListener("change", t);
      }, this._renderer._canvas.getContext("2d").pixelRatio = window.devicePixelRatio || 1, this._redraw = !0, this._resize = 1, this.resize().runAsync();
    };
    t();
  }
}
function ate(e, t) {
  const r = this;
  if (t = t || {}, gx.call(r), t.loader && r.loader(t.loader), t.logger && r.logger(t.logger), t.logLevel != null && r.logLevel(t.logLevel), t.locale || e.locale) {
    const o = $a({}, e.locale, t.locale);
    r.locale(eZ(o.number, o.time));
  }
  r._el = null, r._elBind = null, r._renderType = t.renderer || tg.Canvas, r._scenegraph = new QK();
  const a = r._scenegraph.root;
  r._renderer = null, r._tooltip = t.tooltip || $Ae, r._redraw = !0, r._handler = new S4().scene(a), r._globalCursor = !1, r._preventDefault = !1, r._timers = [], r._eventListeners = [], r._resizeListeners = [], r._eventConfig = cAe(e.eventConfig), r.globalCursor(r._eventConfig.globalCursor);
  const v = OAe(r, e, t.expr);
  r._runtime = v, r._signals = v.signals, r._bind = (e.bindings || []).map((o) => ({
    state: null,
    param: $a({}, o)
  })), v.root && v.root.set(a), a.source = v.data.root.input, r.pulse(v.data.root.input, r.changeset().insert(a.items)), r._width = r.width(), r._height = r.height(), r._viewWidth = tte(r, r._width), r._viewHeight = nte(r, r._height), r._origin = [0, 0], r._resize = 0, r._autosize = 1, RAe(r), QTe(r), eAe(r), r.description(e.description), t.hover && r.hover(), t.container && r.initialize(t.container, t.bind), t.watchPixelRatio && r._watchPixelRatio();
}
function F6(e, t) {
  return ua(e._signals, t) ? e._signals[t] : Jr("Unrecognized signal name: " + vi(t));
}
function ote(e, t) {
  const r = (e._targets || []).filter((a) => a._update && a._update.handler === t);
  return r.length ? r[0] : null;
}
function wV(e, t, r, a) {
  let v = ote(r, a);
  return v || (v = ez(e, () => a(t, r.value)), v.handler = a, e.on(r, null, v)), e;
}
function kV(e, t, r) {
  const a = ote(t, r);
  return a && t._targets.remove(a), e;
}
Si(ate, gx, {
  // -- DATAFLOW / RENDERING ----
  async evaluate(e, t, r) {
    if (await gx.prototype.evaluate.call(this, e, t), this._redraw || this._resize)
      try {
        this._renderer && (this._resize && (this._resize = 0, iAe(this)), await this._renderer.renderAsync(this._scenegraph.root)), this._redraw = !1;
      } catch (a) {
        this.error(a);
      }
    return r && d8(this, r), this;
  },
  dirty(e) {
    this._redraw = !0, this._renderer && this._renderer.dirty(e);
  },
  // -- GET / SET ----
  description(e) {
    if (arguments.length) {
      const t = e != null ? e + "" : null;
      return t !== this._desc && Yee(this._el, this._desc = t), this;
    }
    return this._desc;
  },
  container() {
    return this._el;
  },
  scenegraph() {
    return this._scenegraph;
  },
  origin() {
    return this._origin.slice();
  },
  signal(e, t, r) {
    const a = F6(this, e);
    return arguments.length === 1 ? a.value : this.update(a, t, r);
  },
  width(e) {
    return arguments.length ? this.signal("width", e) : this.signal("width");
  },
  height(e) {
    return arguments.length ? this.signal("height", e) : this.signal("height");
  },
  padding(e) {
    return arguments.length ? this.signal("padding", bV(e)) : bV(this.signal("padding"));
  },
  autosize(e) {
    return arguments.length ? this.signal("autosize", e) : this.signal("autosize");
  },
  background(e) {
    return arguments.length ? this.signal("background", e) : this.signal("background");
  },
  renderer(e) {
    return arguments.length ? (Q9(e) || Jr("Unrecognized renderer type: " + e), e !== this._renderType && (this._renderType = e, this._resetRenderer()), this) : this._renderType;
  },
  tooltip(e) {
    return arguments.length ? (e !== this._tooltip && (this._tooltip = e, this._resetRenderer()), this) : this._tooltip;
  },
  loader(e) {
    return arguments.length ? (e !== this._loader && (gx.prototype.loader.call(this, e), this._resetRenderer()), this) : this._loader;
  },
  resize() {
    return this._autosize = 1, this.touch(F6(this, "autosize"));
  },
  _resetRenderer() {
    this._renderer && (this._renderer = null, this.initialize(this._el, this._elBind));
  },
  // -- SIZING ----
  _resizeView: FAe,
  // -- EVENT HANDLING ----
  addEventListener(e, t, r) {
    let a = t;
    return r && r.trap === !1 || (a = ez(this, t), a.raw = t), this._handler.on(e, a), this;
  },
  removeEventListener(e, t) {
    for (var r = this._handler.handlers(e), a = r.length, v, o; --a >= 0; )
      if (o = r[a].type, v = r[a].handler, e === o && (t === v || t === v.raw)) {
        this._handler.off(o, v);
        break;
      }
    return this;
  },
  addResizeListener(e) {
    const t = this._resizeListeners;
    return t.includes(e) || t.push(e), this;
  },
  removeResizeListener(e) {
    var t = this._resizeListeners, r = t.indexOf(e);
    return r >= 0 && t.splice(r, 1), this;
  },
  addSignalListener(e, t) {
    return wV(this, e, F6(this, e), t);
  },
  removeSignalListener(e, t) {
    return kV(this, F6(this, e), t);
  },
  addDataListener(e, t) {
    return wV(this, e, pk(this, e).values, t);
  },
  removeDataListener(e, t) {
    return kV(this, pk(this, e).values, t);
  },
  globalCursor(e) {
    if (arguments.length) {
      if (this._globalCursor !== !!e) {
        const t = eI(this, null);
        this._globalCursor = !!e, t && eI(this, t);
      }
      return this;
    } else
      return this._globalCursor;
  },
  preventDefault(e) {
    return arguments.length ? (this._preventDefault = e, this) : this._preventDefault;
  },
  timer: VAe,
  events: hAe,
  finalize: pAe,
  hover: dAe,
  // -- DATA ----
  data: tAe,
  change: fT,
  insert: nAe,
  remove: rAe,
  // -- SCALES --
  scale: zAe,
  // -- INITIALIZATION ----
  initialize: EAe,
  // -- HEADLESS RENDERING ----
  toImageURL: IAe,
  toCanvas: LAe,
  toSVG: PAe,
  // -- SAVE / RESTORE STATE ----
  getState: NAe,
  setState: UAe,
  // RE-RENDER ON ZOOM
  _watchPixelRatio: GAe
});
const WAe = "view", gk = "[", yk = "]", ste = "{", lte = "}", YAe = ":", ute = ",", ZAe = "@", XAe = ">", KAe = /[[\]{}]/, JAe = {
  "*": 1,
  arc: 1,
  area: 1,
  group: 1,
  image: 1,
  line: 1,
  path: 1,
  rect: 1,
  rule: 1,
  shape: 1,
  symbol: 1,
  text: 1,
  trail: 1
};
let cte, fte;
function Vg(e, t, r) {
  return cte = t || WAe, fte = r || JAe, hte(e.trim()).map(tI);
}
function QAe(e) {
  return fte[e];
}
function ew(e, t, r, a, v) {
  const o = e.length;
  let s = 0, n;
  for (; t < o; ++t) {
    if (n = e[t], !s && n === r) return t;
    v && v.indexOf(n) >= 0 ? --s : a && a.indexOf(n) >= 0 && ++s;
  }
  return t;
}
function hte(e) {
  const t = [], r = e.length;
  let a = 0, v = 0;
  for (; v < r; )
    v = ew(e, v, ute, gk + ste, yk + lte), t.push(e.substring(a, v).trim()), a = ++v;
  if (t.length === 0)
    throw "Empty event selector: " + e;
  return t;
}
function tI(e) {
  return e[0] === "[" ? eSe(e) : tSe(e);
}
function eSe(e) {
  const t = e.length;
  let r = 1, a;
  if (r = ew(e, r, yk, gk, yk), r === t)
    throw "Empty between selector: " + e;
  if (a = hte(e.substring(1, r)), a.length !== 2)
    throw "Between selector must have two elements: " + e;
  if (e = e.slice(r + 1).trim(), e[0] !== XAe)
    throw "Expected '>' after between selector: " + e;
  a = a.map(tI);
  const v = tI(e.slice(1).trim());
  return v.between ? {
    between: a,
    stream: v
  } : (v.between = a, v);
}
function tSe(e) {
  const t = {
    source: cte
  }, r = [];
  let a = [0, 0], v = 0, o = 0, s = e.length, n = 0, l, u;
  if (e[s - 1] === lte) {
    if (n = e.lastIndexOf(ste), n >= 0) {
      try {
        a = nSe(e.substring(n + 1, s - 1));
      } catch {
        throw "Invalid throttle specification: " + e;
      }
      e = e.slice(0, n).trim(), s = e.length;
    } else throw "Unmatched right brace: " + e;
    n = 0;
  }
  if (!s) throw e;
  if (e[0] === ZAe && (v = ++n), l = ew(e, n, YAe), l < s && (r.push(e.substring(o, l).trim()), o = n = ++l), n = ew(e, n, gk), n === s)
    r.push(e.substring(o, s).trim());
  else if (r.push(e.substring(o, n).trim()), u = [], o = ++n, o === s) throw "Unmatched left bracket: " + e;
  for (; n < s; ) {
    if (n = ew(e, n, yk), n === s) throw "Unmatched left bracket: " + e;
    if (u.push(e.substring(o, n).trim()), n < s - 1 && e[++n] !== gk) throw "Expected left bracket: " + e;
    o = ++n;
  }
  if (!(s = r.length) || KAe.test(r[s - 1]))
    throw "Invalid event selector: " + e;
  return s > 1 ? (t.type = r[1], v ? t.markname = r[0].slice(1) : QAe(r[0]) ? t.marktype = r[0] : t.source = r[0]) : t.type = r[0], t.type.slice(-1) === "!" && (t.consume = !0, t.type = t.type.slice(0, -1)), u != null && (t.filter = u), a[0] && (t.throttle = a[0]), a[1] && (t.debounce = a[1]), t;
}
function nSe(e) {
  const t = e.split(ute);
  if (!e.length || t.length > 2) throw e;
  return t.map((r) => {
    const a = +r;
    if (a !== a) throw e;
    return a;
  });
}
function rSe(e) {
  return Oi(e) ? e : {
    type: e || "pad"
  };
}
const n3 = (e) => +e || 0, iSe = (e) => ({
  top: e,
  bottom: e,
  left: e,
  right: e
});
function aSe(e) {
  return Oi(e) ? e.signal ? e : {
    top: n3(e.top),
    bottom: n3(e.bottom),
    left: n3(e.left),
    right: n3(e.right)
  } : iSe(n3(e));
}
const Yc = (e) => Oi(e) && !Qr(e) ? $a({}, e) : {
  value: e
};
function TV(e, t, r, a) {
  return r != null ? (Oi(r) && !Qr(r) || Qr(r) && r.length && Oi(r[0]) ? e.update[t] = r : e[a || "enter"][t] = {
    value: r
  }, 1) : 0;
}
function hf(e, t, r) {
  for (const a in t)
    TV(e, a, t[a]);
  for (const a in r)
    TV(e, a, r[a], "update");
}
function Lb(e, t, r) {
  for (const a in t)
    r && ua(r, a) || (e[a] = $a(e[a] || {}, t[a]));
  return e;
}
function ex(e, t) {
  return t && (t.enter && t.enter[e] || t.update && t.update[e]);
}
const rz = "mark", iz = "frame", az = "scope", oSe = "axis", sSe = "axis-domain", lSe = "axis-grid", uSe = "axis-label", cSe = "axis-tick", fSe = "axis-title", hSe = "legend", dSe = "legend-band", pSe = "legend-entry", mSe = "legend-gradient", dte = "legend-label", gSe = "legend-symbol", ySe = "legend-title", vSe = "title", xSe = "title-text", bSe = "title-subtitle";
function _Se(e, t, r, a, v) {
  const o = {}, s = {};
  let n, l, u, i;
  l = "lineBreak", t === "text" && v[l] != null && !ex(l, e) && DM(o, l, v[l]), (r == "legend" || String(r).startsWith("axis")) && (r = null), i = r === iz ? v.group : r === rz ? $a({}, v.mark, v[t]) : null;
  for (l in i)
    u = ex(l, e) || (l === "fill" || l === "stroke") && (ex("fill", e) || ex("stroke", e)), u || DM(o, l, i[l]);
  Ri(a).forEach((h) => {
    const p = v.style && v.style[h];
    for (const _ in p)
      ex(_, e) || DM(o, _, p[_]);
  }), e = $a({}, e);
  for (l in o)
    i = o[l], i.signal ? (n = n || {})[l] = i : s[l] = i;
  return e.enter = $a(s, e.enter), n && (e.update = $a(n, e.update)), e;
}
function DM(e, t, r) {
  e[t] = r && r.signal ? {
    signal: r.signal
  } : {
    value: r
  };
}
const pte = (e) => Fi(e) ? vi(e) : e.signal ? `(${e.signal})` : mte(e);
function dT(e) {
  if (e.gradient != null)
    return kSe(e);
  let t = e.signal ? `(${e.signal})` : e.color ? wSe(e.color) : e.field != null ? mte(e.field) : e.value !== void 0 ? vi(e.value) : void 0;
  return e.scale != null && (t = TSe(e, t)), t === void 0 && (t = null), e.exponent != null && (t = `pow(${t},${D8(e.exponent)})`), e.mult != null && (t += `*${D8(e.mult)}`), e.offset != null && (t += `+${D8(e.offset)}`), e.round && (t = `round(${t})`), t;
}
const N6 = (e, t, r, a) => `(${e}(${[t, r, a].map(dT).join(",")})+'')`;
function wSe(e) {
  return e.c ? N6("hcl", e.h, e.c, e.l) : e.h || e.s ? N6("hsl", e.h, e.s, e.l) : e.l || e.a ? N6("lab", e.l, e.a, e.b) : e.r || e.g || e.b ? N6("rgb", e.r, e.g, e.b) : null;
}
function kSe(e) {
  const t = [e.start, e.stop, e.count].map((r) => r == null ? null : vi(r));
  for (; t.length && mo(t) == null; ) t.pop();
  return t.unshift(pte(e.gradient)), `gradient(${t.join(",")})`;
}
function D8(e) {
  return Oi(e) ? "(" + dT(e) + ")" : e;
}
function mte(e) {
  return gte(Oi(e) ? e : {
    datum: e
  });
}
function gte(e) {
  let t, r, a;
  if (e.signal)
    t = "datum", a = e.signal;
  else if (e.group || e.parent) {
    for (r = Math.max(1, e.level || 1), t = "item"; r-- > 0; )
      t += ".mark.group";
    e.parent ? (a = e.parent, t += ".datum") : a = e.group;
  } else e.datum ? (t = "datum", a = e.datum) : Jr("Invalid field reference: " + vi(e));
  return e.signal || (a = Fi(a) ? B0(a).map(vi).join("][") : gte(a)), t + "[" + a + "]";
}
function TSe(e, t) {
  const r = pte(e.scale);
  return e.range != null ? t = `lerp(_range(${r}), ${+e.range})` : (t !== void 0 && (t = `_scale(${r}, ${t})`), e.band && (t = (t ? t + "+" : "") + `_bandwidth(${r})` + (+e.band == 1 ? "" : "*" + D8(e.band)), e.extra && (t = `(datum.extra ? _scale(${r}, datum.extra.value) : ${t})`)), t == null && (t = "0")), t;
}
function ASe(e) {
  let t = "";
  return e.forEach((r) => {
    const a = dT(r);
    t += r.test ? `(${r.test})?${a}:` : a;
  }), mo(t) === ":" && (t += "null"), t;
}
function yte(e, t, r, a, v, o) {
  const s = {};
  o = o || {}, o.encoders = {
    $encode: s
  }, e = _Se(e, t, r, a, v.config);
  for (const n in e)
    s[n] = SSe(e[n], t, o, v);
  return o;
}
function SSe(e, t, r, a) {
  const v = {}, o = {};
  for (const s in e)
    e[s] != null && (v[s] = ESe(MSe(e[s]), a, r, o));
  return {
    $expr: {
      marktype: t,
      channels: v
    },
    $fields: Object.keys(o),
    $output: Object.keys(e)
  };
}
function MSe(e) {
  return Qr(e) ? ASe(e) : dT(e);
}
function ESe(e, t, r, a) {
  const v = L0(e, t);
  return v.$fields.forEach((o) => a[o] = 1), $a(r, v.$params), v.$expr;
}
const CSe = "outer", ISe = ["value", "update", "init", "react", "bind"];
function AV(e, t) {
  Jr(e + ' for "outer" push: ' + vi(t));
}
function vte(e, t) {
  const r = e.name;
  if (e.push === CSe)
    t.signals[r] || AV("No prior signal definition", r), ISe.forEach((a) => {
      e[a] !== void 0 && AV("Invalid property ", a);
    });
  else {
    const a = t.addSignal(r, e.value);
    e.react === !1 && (a.react = !1), e.bind && t.addBinding(r, e.bind);
  }
}
function nI(e, t, r, a) {
  this.id = -1, this.type = e, this.value = t, this.params = r, a && (this.parent = a);
}
function pT(e, t, r, a) {
  return new nI(e, t, r, a);
}
function vk(e, t) {
  return pT("operator", e, t);
}
function oa(e) {
  const t = {
    $ref: e.id
  };
  return e.id < 0 && (e.refs = e.refs || []).push(t), t;
}
function Bw(e, t) {
  return t ? {
    $field: e,
    $name: t
  } : {
    $field: e
  };
}
const rI = Bw("key");
function SV(e, t) {
  return {
    $compare: e,
    $order: t
  };
}
function DSe(e, t) {
  const r = {
    $key: e
  };
  return t && (r.$flat = !0), r;
}
const LSe = "ascending", PSe = "descending";
function OSe(e) {
  return Oi(e) ? (e.order === PSe ? "-" : "+") + mT(e.op, e.field) : "";
}
function mT(e, t) {
  return (e && e.signal ? "$" + e.signal : e || "") + (e && t ? "_" : "") + (t && t.signal ? "$" + t.signal : t || "");
}
const oz = "scope", iI = "view";
function kc(e) {
  return e && e.signal;
}
function zSe(e) {
  return e && e.expr;
}
function L8(e) {
  if (kc(e)) return !0;
  if (Oi(e)) {
    for (const t in e)
      if (L8(e[t])) return !0;
  }
  return !1;
}
function tp(e, t) {
  return e ?? t;
}
function uv(e) {
  return e && e.signal || e;
}
const MV = "timer";
function jw(e, t) {
  return (e.merge ? FSe : e.stream ? NSe : e.type ? BSe : Jr("Invalid stream specification: " + vi(e)))(e, t);
}
function RSe(e) {
  return e === oz ? iI : e || iI;
}
function FSe(e, t) {
  const r = e.merge.map((v) => jw(v, t)), a = sz({
    merge: r
  }, e, t);
  return t.addStream(a).id;
}
function NSe(e, t) {
  const r = jw(e.stream, t), a = sz({
    stream: r
  }, e, t);
  return t.addStream(a).id;
}
function BSe(e, t) {
  let r;
  e.type === MV ? (r = t.event(MV, e.throttle), e = {
    between: e.between,
    filter: e.filter
  }) : r = t.event(RSe(e.source), e.type);
  const a = sz({
    stream: r
  }, e, t);
  return Object.keys(a).length === 1 ? r : t.addStream(a).id;
}
function sz(e, t, r) {
  let a = t.between;
  return a && (a.length !== 2 && Jr('Stream "between" parameter must have 2 entries: ' + vi(t)), e.between = [jw(a[0], r), jw(a[1], r)]), a = t.filter ? [].concat(t.filter) : [], (t.marktype || t.markname || t.markrole) && a.push(jSe(t.marktype, t.markname, t.markrole)), t.source === oz && a.push("inScope(event.item)"), a.length && (e.filter = L0("(" + a.join(")&&(") + ")", r).$expr), (a = t.throttle) != null && (e.throttle = +a), (a = t.debounce) != null && (e.debounce = +a), t.consume && (e.consume = !0), e;
}
function jSe(e, t, r) {
  const a = "event.item";
  return a + (e && e !== "*" ? "&&" + a + ".mark.marktype==='" + e + "'" : "") + (r ? "&&" + a + ".mark.role==='" + r + "'" : "") + (t ? "&&" + a + ".mark.name==='" + t + "'" : "");
}
const USe = {
  code: "_.$value",
  ast: {
    type: "Identifier",
    value: "value"
  }
};
function VSe(e, t, r) {
  const a = e.encode, v = {
    target: r
  };
  let o = e.events, s = e.update, n = [];
  o || Jr("Signal update missing events specification."), Fi(o) && (o = Vg(o, t.isSubscope() ? oz : iI)), o = Ri(o).filter((l) => l.signal || l.scale ? (n.push(l), 0) : 1), n.length > 1 && (n = [qSe(n)]), o.length && n.push(o.length > 1 ? {
    merge: o
  } : o[0]), a != null && (s && Jr("Signal encode and update are mutually exclusive."), s = "encode(item()," + vi(a) + ")"), v.update = Fi(s) ? L0(s, t) : s.expr != null ? L0(s.expr, t) : s.value != null ? s.value : s.signal != null ? {
    $expr: USe,
    $params: {
      $value: t.signalRef(s.signal)
    }
  } : Jr("Invalid signal update specification."), e.force && (v.options = {
    force: !0
  }), n.forEach((l) => t.addUpdate($a($Se(l, t), v)));
}
function $Se(e, t) {
  return {
    source: e.signal ? t.signalRef(e.signal) : e.scale ? t.scaleRef(e.scale) : jw(e, t)
  };
}
function qSe(e) {
  return {
    signal: "[" + e.map((t) => t.scale ? 'scale("' + t.scale + '")' : t.signal) + "]"
  };
}
function HSe(e, t) {
  const r = t.getSignal(e.name);
  let a = e.update;
  e.init && (a ? Jr("Signals can not include both init and update expressions.") : (a = e.init, r.initonly = !0)), a && (a = L0(a, t), r.update = a.$expr, r.params = a.$params), e.on && e.on.forEach((v) => VSe(v, t, r.id));
}
const Ns = (e) => (t, r, a) => pT(e, r, t || void 0, a), xte = Ns("aggregate"), GSe = Ns("axisticks"), bte = Ns("bound"), Ep = Ns("collect"), EV = Ns("compare"), WSe = Ns("datajoin"), _te = Ns("encode"), YSe = Ns("expression"), ZSe = Ns("facet"), XSe = Ns("field"), KSe = Ns("key"), JSe = Ns("legendentries"), QSe = Ns("load"), eMe = Ns("mark"), tMe = Ns("multiextent"), nMe = Ns("multivalues"), rMe = Ns("overlap"), iMe = Ns("params"), wte = Ns("prefacet"), aMe = Ns("projection"), oMe = Ns("proxy"), sMe = Ns("relay"), kte = Ns("render"), lMe = Ns("scale"), Zv = Ns("sieve"), uMe = Ns("sortitems"), Tte = Ns("viewlayout"), cMe = Ns("values");
let fMe = 0;
const Ate = {
  min: "min",
  max: "max",
  count: "sum"
};
function hMe(e, t) {
  const r = e.type || "linear";
  fK(r) || Jr("Unrecognized scale type: " + vi(r)), t.addScale(e.name, {
    type: r,
    domain: void 0
  });
}
function dMe(e, t) {
  const r = t.getScale(e.name).params;
  let a;
  r.domain = Ste(e.domain, e, t), e.range != null && (r.range = Ete(e, t, r)), e.interpolate != null && kMe(e.interpolate, r), e.nice != null && (r.nice = wMe(e.nice, t)), e.bins != null && (r.bins = _Me(e.bins, t));
  for (a in e)
    ua(r, a) || a === "name" || (r[a] = Ad(e[a], t));
}
function Ad(e, t) {
  return Oi(e) ? e.signal ? t.signalRef(e.signal) : Jr("Unsupported object: " + vi(e)) : e;
}
function P8(e, t) {
  return e.signal ? t.signalRef(e.signal) : e.map((r) => Ad(r, t));
}
function gT(e) {
  Jr("Can not find data set: " + vi(e));
}
function Ste(e, t, r) {
  if (!e) {
    (t.domainMin != null || t.domainMax != null) && Jr("No scale domain defined for domainMin/domainMax to override.");
    return;
  }
  return e.signal ? r.signalRef(e.signal) : (Qr(e) ? pMe : e.fields ? gMe : mMe)(e, t, r);
}
function pMe(e, t, r) {
  return e.map((a) => Ad(a, r));
}
function mMe(e, t, r) {
  const a = r.getData(e.data);
  return a || gT(e.data), jx(t.type) ? a.valuesRef(r, e.field, Mte(e.sort, !1)) : pK(t.type) ? a.domainRef(r, e.field) : a.extentRef(r, e.field);
}
function gMe(e, t, r) {
  const a = e.data, v = e.fields.reduce((o, s) => (s = Fi(s) ? {
    data: a,
    field: s
  } : Qr(s) || s.signal ? yMe(s, r) : s, o.push(s), o), []);
  return (jx(t.type) ? vMe : pK(t.type) ? xMe : bMe)(e, r, v);
}
function yMe(e, t) {
  const r = "_:vega:_" + fMe++, a = Ep({});
  if (Qr(e))
    a.value = {
      $ingest: e
    };
  else if (e.signal) {
    const v = "setdata(" + vi(r) + "," + e.signal + ")";
    a.params.input = t.signalRef(v);
  }
  return t.addDataPipeline(r, [a, Zv({})]), {
    data: r,
    field: "data"
  };
}
function vMe(e, t, r) {
  const a = Mte(e.sort, !0);
  let v, o;
  const s = r.map((u) => {
    const i = t.getData(u.data);
    return i || gT(u.data), i.countsRef(t, u.field, a);
  }), n = {
    groupby: rI,
    pulse: s
  };
  a && (v = a.op || "count", o = a.field ? mT(v, a.field) : "count", n.ops = [Ate[v]], n.fields = [t.fieldRef(o)], n.as = [o]), v = t.add(xte(n));
  const l = t.add(Ep({
    pulse: oa(v)
  }));
  return o = t.add(cMe({
    field: rI,
    sort: t.sortRef(a),
    pulse: oa(l)
  })), oa(o);
}
function Mte(e, t) {
  return e && (!e.field && !e.op ? Oi(e) ? e.field = "key" : e = {
    field: "key"
  } : !e.field && e.op !== "count" ? Jr("No field provided for sort aggregate op: " + e.op) : t && e.field && e.op && !Ate[e.op] && Jr("Multiple domain scales can not be sorted using " + e.op)), e;
}
function xMe(e, t, r) {
  const a = r.map((v) => {
    const o = t.getData(v.data);
    return o || gT(v.data), o.domainRef(t, v.field);
  });
  return oa(t.add(nMe({
    values: a
  })));
}
function bMe(e, t, r) {
  const a = r.map((v) => {
    const o = t.getData(v.data);
    return o || gT(v.data), o.extentRef(t, v.field);
  });
  return oa(t.add(tMe({
    extents: a
  })));
}
function _Me(e, t) {
  return e.signal || Qr(e) ? P8(e, t) : t.objectProperty(e);
}
function wMe(e, t) {
  return e.signal ? t.signalRef(e.signal) : Oi(e) ? {
    interval: Ad(e.interval),
    step: Ad(e.step)
  } : Ad(e);
}
function kMe(e, t) {
  t.interpolate = Ad(e.type || e), e.gamma != null && (t.interpolateGamma = Ad(e.gamma));
}
function Ete(e, t, r) {
  const a = t.config.range;
  let v = e.range;
  if (v.signal)
    return t.signalRef(v.signal);
  if (Fi(v)) {
    if (a && ua(a, v))
      return e = $a({}, e, {
        range: a[v]
      }), Ete(e, t, r);
    v === "width" ? v = [0, {
      signal: "width"
    }] : v === "height" ? v = jx(e.type) ? [0, {
      signal: "height"
    }] : [{
      signal: "height"
    }, 0] : Jr("Unrecognized scale range value: " + vi(v));
  } else if (v.scheme) {
    r.scheme = Qr(v.scheme) ? P8(v.scheme, t) : Ad(v.scheme, t), v.extent && (r.schemeExtent = P8(v.extent, t)), v.count && (r.schemeCount = Ad(v.count, t));
    return;
  } else if (v.step) {
    r.rangeStep = Ad(v.step, t);
    return;
  } else {
    if (jx(e.type) && !Qr(v))
      return Ste(v, e, t);
    Qr(v) || Jr("Unsupported range type: " + vi(v));
  }
  return v.map((o) => (Qr(o) ? P8 : Ad)(o, t));
}
function TMe(e, t) {
  const r = t.config.projection || {}, a = {};
  for (const v in e)
    v !== "name" && (a[v] = aI(e[v], v, t));
  for (const v in r)
    a[v] == null && (a[v] = aI(r[v], v, t));
  t.addProjection(e.name, a);
}
function aI(e, t, r) {
  return Qr(e) ? e.map((a) => aI(a, t, r)) : Oi(e) ? e.signal ? r.signalRef(e.signal) : t === "fit" ? e : Jr("Unsupported parameter object: " + vi(e)) : e;
}
const Cp = "top", Pb = "left", Ob = "right", Mg = "bottom", Cte = "center", AMe = "vertical", SMe = "start", MMe = "middle", EMe = "end", oI = "index", lz = "label", CMe = "offset", Zx = "perc", IMe = "perc2", Md = "value", z4 = "guide-label", uz = "guide-title", DMe = "group-title", LMe = "group-subtitle", CV = "symbol", O8 = "gradient", sI = "discrete", lI = "size", PMe = "shape", OMe = "fill", zMe = "stroke", RMe = "strokeWidth", FMe = "strokeDash", NMe = "opacity", cz = [lI, PMe, OMe, zMe, RMe, FMe, NMe], R4 = {
  name: 1,
  style: 1,
  interactive: 1
}, ko = {
  value: 0
}, Ed = {
  value: 1
}, yT = "group", Ite = "rect", fz = "rule", BMe = "symbol", Xv = "text";
function Uw(e) {
  return e.type = yT, e.interactive = e.interactive || !1, e;
}
function Uh(e, t) {
  const r = (a, v) => tp(e[a], tp(t[a], v));
  return r.isVertical = (a) => AMe === tp(e.direction, t.direction || (a ? t.symbolDirection : t.gradientDirection)), r.gradientLength = () => tp(e.gradientLength, t.gradientLength || t.gradientWidth), r.gradientThickness = () => tp(e.gradientThickness, t.gradientThickness || t.gradientHeight), r.entryColumns = () => tp(e.columns, tp(t.columns, +r.isVertical(!0))), r;
}
function Dte(e, t) {
  const r = t && (t.update && t.update[e] || t.enter && t.enter[e]);
  return r && r.signal ? r : r ? r.value : null;
}
function jMe(e, t, r) {
  const a = t.config.style[r];
  return a && a[e];
}
function vT(e, t, r) {
  return `item.anchor === '${SMe}' ? ${e} : item.anchor === '${EMe}' ? ${t} : ${r}`;
}
const hz = vT(vi(Pb), vi(Ob), vi(Cte));
function UMe(e) {
  const t = e("tickBand");
  let r = e("tickOffset"), a, v;
  return t ? t.signal ? (a = {
    signal: `(${t.signal}) === 'extent' ? 1 : 0.5`
  }, v = {
    signal: `(${t.signal}) === 'extent'`
  }, Oi(r) || (r = {
    signal: `(${t.signal}) === 'extent' ? 0 : ${r}`
  })) : t === "extent" ? (a = 1, v = !0, r = 0) : (a = 0.5, v = !1) : (a = e("bandPosition"), v = e("tickExtra")), {
    extra: v,
    band: a,
    offset: r
  };
}
function Lte(e, t) {
  return t ? e ? Oi(e) ? Object.assign({}, e, {
    offset: Lte(e.offset, t)
  }) : {
    value: e,
    offset: t
  } : t : e;
}
function ld(e, t) {
  return t ? (e.name = t.name, e.style = t.style || e.style, e.interactive = !!t.interactive, e.encode = Lb(e.encode, t, R4)) : e.interactive = !1, e;
}
function VMe(e, t, r, a) {
  const v = Uh(e, r), o = v.isVertical(), s = v.gradientThickness(), n = v.gradientLength();
  let l, u, i, h, p;
  o ? (u = [0, 1], i = [0, 0], h = s, p = n) : (u = [0, 0], i = [1, 0], h = n, p = s);
  const _ = {
    enter: l = {
      opacity: ko,
      x: ko,
      y: ko,
      width: Yc(h),
      height: Yc(p)
    },
    update: $a({}, l, {
      opacity: Ed,
      fill: {
        gradient: t,
        start: u,
        stop: i
      }
    }),
    exit: {
      opacity: ko
    }
  };
  return hf(_, {
    stroke: v("gradientStrokeColor"),
    strokeWidth: v("gradientStrokeWidth")
  }, {
    // update
    opacity: v("gradientOpacity")
  }), ld({
    type: Ite,
    role: mSe,
    encode: _
  }, a);
}
function $Me(e, t, r, a, v) {
  const o = Uh(e, r), s = o.isVertical(), n = o.gradientThickness(), l = o.gradientLength();
  let u, i, h, p, _ = "";
  s ? (u = "y", h = "y2", i = "x", p = "width", _ = "1-") : (u = "x", h = "x2", i = "y", p = "height");
  const d = {
    opacity: ko,
    fill: {
      scale: t,
      field: Md
    }
  };
  d[u] = {
    signal: _ + "datum." + Zx,
    mult: l
  }, d[i] = ko, d[h] = {
    signal: _ + "datum." + IMe,
    mult: l
  }, d[p] = Yc(n);
  const f = {
    enter: d,
    update: $a({}, d, {
      opacity: Ed
    }),
    exit: {
      opacity: ko
    }
  };
  return hf(f, {
    stroke: o("gradientStrokeColor"),
    strokeWidth: o("gradientStrokeWidth")
  }, {
    // update
    opacity: o("gradientOpacity")
  }), ld({
    type: Ite,
    role: dSe,
    key: Md,
    from: v,
    encode: f
  }, a);
}
const qMe = `datum.${Zx}<=0?"${Pb}":datum.${Zx}>=1?"${Ob}":"${Cte}"`, HMe = `datum.${Zx}<=0?"${Mg}":datum.${Zx}>=1?"${Cp}":"${MMe}"`;
function IV(e, t, r, a) {
  const v = Uh(e, t), o = v.isVertical(), s = Yc(v.gradientThickness()), n = v.gradientLength();
  let l = v("labelOverlap"), u, i, h, p, _ = "";
  const d = {
    enter: u = {
      opacity: ko
    },
    update: i = {
      opacity: Ed,
      text: {
        field: lz
      }
    },
    exit: {
      opacity: ko
    }
  };
  return hf(d, {
    fill: v("labelColor"),
    fillOpacity: v("labelOpacity"),
    font: v("labelFont"),
    fontSize: v("labelFontSize"),
    fontStyle: v("labelFontStyle"),
    fontWeight: v("labelFontWeight"),
    limit: tp(e.labelLimit, t.gradientLabelLimit)
  }), o ? (u.align = {
    value: "left"
  }, u.baseline = i.baseline = {
    signal: HMe
  }, h = "y", p = "x", _ = "1-") : (u.align = i.align = {
    signal: qMe
  }, u.baseline = {
    value: "top"
  }, h = "x", p = "y"), u[h] = i[h] = {
    signal: _ + "datum." + Zx,
    mult: n
  }, u[p] = i[p] = s, s.offset = tp(e.labelOffset, t.gradientLabelOffset) || 0, l = l ? {
    separation: v("labelSeparation"),
    method: l,
    order: "datum." + oI
  } : void 0, ld({
    type: Xv,
    role: dte,
    style: z4,
    key: Md,
    from: a,
    encode: d,
    overlap: l
  }, r);
}
function GMe(e, t, r, a, v) {
  const o = Uh(e, t), s = r.entries, n = !!(s && s.interactive), l = s ? s.name : void 0, u = o("clipHeight"), i = o("symbolOffset"), h = {
    data: "value"
  }, p = `(${v}) ? datum.${CMe} : datum.${lI}`, _ = u ? Yc(u) : {
    field: lI
  }, d = `datum.${oI}`, f = `max(1, ${v})`;
  let c, g, m, x, w;
  _.mult = 0.5, c = {
    enter: g = {
      opacity: ko,
      x: {
        signal: p,
        mult: 0.5,
        offset: i
      },
      y: _
    },
    update: m = {
      opacity: Ed,
      x: g.x,
      y: g.y
    },
    exit: {
      opacity: ko
    }
  };
  let k = null, S = null;
  e.fill || (k = t.symbolBaseFillColor, S = t.symbolBaseStrokeColor), hf(c, {
    fill: o("symbolFillColor", k),
    shape: o("symbolType"),
    size: o("symbolSize"),
    stroke: o("symbolStrokeColor", S),
    strokeDash: o("symbolDash"),
    strokeDashOffset: o("symbolDashOffset"),
    strokeWidth: o("symbolStrokeWidth")
  }, {
    // update
    opacity: o("symbolOpacity")
  }), cz.forEach((L) => {
    e[L] && (m[L] = g[L] = {
      scale: e[L],
      field: Md
    });
  });
  const A = ld({
    type: BMe,
    role: gSe,
    key: Md,
    from: h,
    clip: u ? !0 : void 0,
    encode: c
  }, r.symbols), C = Yc(i);
  C.offset = o("labelOffset"), c = {
    enter: g = {
      opacity: ko,
      x: {
        signal: p,
        offset: C
      },
      y: _
    },
    update: m = {
      opacity: Ed,
      text: {
        field: lz
      },
      x: g.x,
      y: g.y
    },
    exit: {
      opacity: ko
    }
  }, hf(c, {
    align: o("labelAlign"),
    baseline: o("labelBaseline"),
    fill: o("labelColor"),
    fillOpacity: o("labelOpacity"),
    font: o("labelFont"),
    fontSize: o("labelFontSize"),
    fontStyle: o("labelFontStyle"),
    fontWeight: o("labelFontWeight"),
    limit: o("labelLimit")
  });
  const D = ld({
    type: Xv,
    role: dte,
    style: z4,
    key: Md,
    from: h,
    encode: c
  }, r.labels);
  return c = {
    enter: {
      noBound: {
        value: !u
      },
      // ignore width/height in bounds calc
      width: ko,
      height: u ? Yc(u) : ko,
      opacity: ko
    },
    exit: {
      opacity: ko
    },
    update: m = {
      opacity: Ed,
      row: {
        signal: null
      },
      column: {
        signal: null
      }
    }
  }, o.isVertical(!0) ? (x = `ceil(item.mark.items.length / ${f})`, m.row.signal = `${d}%${x}`, m.column.signal = `floor(${d} / ${x})`, w = {
    field: ["row", d]
  }) : (m.row.signal = `floor(${d} / ${f})`, m.column.signal = `${d} % ${f}`, w = {
    field: d
  }), m.column.signal = `(${v})?${m.column.signal}:${d}`, a = {
    facet: {
      data: a,
      name: "value",
      groupby: oI
    }
  }, Uw({
    role: az,
    from: a,
    encode: Lb(c, s, R4),
    marks: [A, D],
    name: l,
    interactive: n,
    sort: w
  });
}
function WMe(e, t) {
  const r = Uh(e, t);
  return {
    align: r("gridAlign"),
    columns: r.entryColumns(),
    center: {
      row: !0,
      column: !1
    },
    padding: {
      row: r("rowPadding"),
      column: r("columnPadding")
    }
  };
}
const dz = 'item.orient === "left"', pz = 'item.orient === "right"', xT = `(${dz} || ${pz})`, YMe = `datum.vgrad && ${xT}`, ZMe = vT('"top"', '"bottom"', '"middle"'), XMe = vT('"right"', '"left"', '"center"'), KMe = `datum.vgrad && ${pz} ? (${XMe}) : (${xT} && !(datum.vgrad && ${dz})) ? "left" : ${hz}`, JMe = `item._anchor || (${xT} ? "middle" : "start")`, QMe = `${YMe} ? (${dz} ? -90 : 90) : 0`, eEe = `${xT} ? (datum.vgrad ? (${pz} ? "bottom" : "top") : ${ZMe}) : "top"`;
function tEe(e, t, r, a) {
  const v = Uh(e, t), o = {
    enter: {
      opacity: ko
    },
    update: {
      opacity: Ed,
      x: {
        field: {
          group: "padding"
        }
      },
      y: {
        field: {
          group: "padding"
        }
      }
    },
    exit: {
      opacity: ko
    }
  };
  return hf(o, {
    orient: v("titleOrient"),
    _anchor: v("titleAnchor"),
    anchor: {
      signal: JMe
    },
    angle: {
      signal: QMe
    },
    align: {
      signal: KMe
    },
    baseline: {
      signal: eEe
    },
    text: e.title,
    fill: v("titleColor"),
    fillOpacity: v("titleOpacity"),
    font: v("titleFont"),
    fontSize: v("titleFontSize"),
    fontStyle: v("titleFontStyle"),
    fontWeight: v("titleFontWeight"),
    limit: v("titleLimit"),
    lineHeight: v("titleLineHeight")
  }, {
    // require update
    align: v("titleAlign"),
    baseline: v("titleBaseline")
  }), ld({
    type: Xv,
    role: ySe,
    style: uz,
    from: a,
    encode: o
  }, r);
}
function nEe(e, t) {
  let r;
  return Oi(e) && (e.signal ? r = e.signal : e.path ? r = "pathShape(" + DV(e.path) + ")" : e.sphere && (r = "geoShape(" + DV(e.sphere) + ', {type: "Sphere"})')), r ? t.signalRef(r) : !!e;
}
function DV(e) {
  return Oi(e) && e.signal ? e.signal : vi(e);
}
function Pte(e) {
  const t = e.role || "";
  return t.startsWith("axis") || t.startsWith("legend") || t.startsWith("title") ? t : e.type === yT ? az : t || rz;
}
function rEe(e) {
  return {
    marktype: e.type,
    name: e.name || void 0,
    role: e.role || Pte(e),
    zindex: +e.zindex || void 0,
    aria: e.aria,
    description: e.description
  };
}
function iEe(e, t) {
  return e && e.signal ? t.signalRef(e.signal) : e !== !1;
}
function mz(e, t) {
  const r = dZ(e.type);
  r || Jr("Unrecognized transform type: " + vi(e.type));
  const a = pT(r.type.toLowerCase(), null, Ote(r, e, t));
  return e.signal && t.addSignal(e.signal, t.proxy(a)), a.metadata = r.metadata || {}, a;
}
function Ote(e, t, r) {
  const a = {}, v = e.params.length;
  for (let o = 0; o < v; ++o) {
    const s = e.params[o];
    a[s.name] = aEe(s, t, r);
  }
  return a;
}
function aEe(e, t, r) {
  const a = e.type, v = t[e.name];
  if (a === "index")
    return oEe(e, t, r);
  if (v === void 0) {
    e.required && Jr("Missing required " + vi(t.type) + " parameter: " + vi(e.name));
    return;
  } else {
    if (a === "param")
      return sEe(e, t, r);
    if (a === "projection")
      return r.projectionRef(t[e.name]);
  }
  return e.array && !kc(v) ? v.map((o) => LV(e, o, r)) : LV(e, v, r);
}
function LV(e, t, r) {
  const a = e.type;
  if (kc(t))
    return OV(a) ? Jr("Expression references can not be signals.") : LM(a) ? r.fieldRef(t) : zV(a) ? r.compareRef(t) : r.signalRef(t.signal);
  {
    const v = e.expr || LM(a);
    return v && lEe(t) ? r.exprRef(t.expr, t.as) : v && uEe(t) ? Bw(t.field, t.as) : OV(a) ? L0(t, r) : cEe(a) ? oa(r.getData(t).values) : LM(a) ? Bw(t) : zV(a) ? r.compareRef(t) : t;
  }
}
function oEe(e, t, r) {
  return Fi(t.from) || Jr('Lookup "from" parameter must be a string literal.'), r.getData(t.from).lookupRef(r, t.key);
}
function sEe(e, t, r) {
  const a = t[e.name];
  return e.array ? (Qr(a) || Jr("Expected an array of sub-parameters. Instead: " + vi(a)), a.map((v) => PV(e, v, r))) : PV(e, a, r);
}
function PV(e, t, r) {
  const a = e.params.length;
  let v;
  for (let s = 0; s < a; ++s) {
    v = e.params[s];
    for (const n in v.key)
      if (v.key[n] !== t[n]) {
        v = null;
        break;
      }
    if (v) break;
  }
  v || Jr("Unsupported parameter: " + vi(t));
  const o = $a(Ote(v, t, r), v.key);
  return oa(r.add(iMe(o)));
}
const lEe = (e) => e && e.expr, uEe = (e) => e && e.field, cEe = (e) => e === "data", OV = (e) => e === "expr", LM = (e) => e === "field", zV = (e) => e === "compare";
function fEe(e, t, r) {
  let a, v, o, s, n;
  return e ? (a = e.facet) && (t || Jr("Only group marks can be faceted."), a.field != null ? s = n = z8(a, r) : (e.data ? n = oa(r.getData(e.data).aggregate) : (o = mz($a({
    type: "aggregate",
    groupby: Ri(a.groupby)
  }, a.aggregate), r), o.params.key = r.keyRef(a.groupby), o.params.pulse = z8(a, r), s = n = oa(r.add(o))), v = r.keyRef(a.groupby, !0))) : s = oa(r.add(Ep(null, [{}]))), s || (s = z8(e, r)), {
    key: v,
    pulse: s,
    parent: n
  };
}
function z8(e, t) {
  return e.$ref ? e : e.data && e.data.$ref ? e.data : oa(t.getData(e.data).output);
}
function Iv(e, t, r, a, v) {
  this.scope = e, this.input = t, this.output = r, this.values = a, this.aggregate = v, this.index = {};
}
Iv.fromEntries = function(e, t) {
  const r = t.length, a = t[r - 1], v = t[r - 2];
  let o = t[0], s = null, n = 1;
  for (o && o.type === "load" && (o = t[1]), e.add(t[0]); n < r; ++n)
    t[n].params.pulse = oa(t[n - 1]), e.add(t[n]), t[n].type === "aggregate" && (s = t[n]);
  return new Iv(e, o, v, a, s);
};
function zte(e) {
  return Fi(e) ? e : null;
}
function RV(e, t, r) {
  const a = mT(r.op, r.field);
  let v;
  if (t.ops) {
    for (let o = 0, s = t.as.length; o < s; ++o)
      if (t.as[o] === a) return;
  } else
    t.ops = ["count"], t.fields = [null], t.as = ["count"];
  r.op && (t.ops.push((v = r.op.signal) ? e.signalRef(v) : r.op), t.fields.push(e.fieldRef(r.field)), t.as.push(a));
}
function r3(e, t, r, a, v, o, s) {
  const n = t[r] || (t[r] = {}), l = OSe(o);
  let u = zte(v), i, h;
  if (u != null && (e = t.scope, u = u + (l ? "|" + l : ""), i = n[u]), !i) {
    const p = o ? {
      field: rI,
      pulse: t.countsRef(e, v, o)
    } : {
      field: e.fieldRef(v),
      pulse: oa(t.output)
    };
    l && (p.sort = e.sortRef(o)), h = e.add(pT(a, void 0, p)), s && (t.index[v] = h), i = oa(h), u != null && (n[u] = i);
  }
  return i;
}
Iv.prototype = {
  countsRef(e, t, r) {
    const a = this, v = a.counts || (a.counts = {}), o = zte(t);
    let s, n, l;
    return o != null && (e = a.scope, s = v[o]), s ? r && r.field && RV(e, s.agg.params, r) : (l = {
      groupby: e.fieldRef(t, "key"),
      pulse: oa(a.output)
    }, r && r.field && RV(e, l, r), n = e.add(xte(l)), s = e.add(Ep({
      pulse: oa(n)
    })), s = {
      agg: n,
      ref: oa(s)
    }, o != null && (v[o] = s)), s.ref;
  },
  tuplesRef() {
    return oa(this.values);
  },
  extentRef(e, t) {
    return r3(e, this, "extent", "extent", t, !1);
  },
  domainRef(e, t) {
    return r3(e, this, "domain", "values", t, !1);
  },
  valuesRef(e, t, r) {
    return r3(e, this, "vals", "values", t, r || !0);
  },
  lookupRef(e, t) {
    return r3(e, this, "lookup", "tupleindex", t, !1);
  },
  indataRef(e, t) {
    return r3(e, this, "indata", "tupleindex", t, !0, !0);
  }
};
function hEe(e, t, r) {
  const a = e.from.facet, v = a.name, o = z8(a, t);
  let s;
  a.name || Jr("Facet must have a name: " + vi(a)), a.data || Jr("Facet must reference a data set: " + vi(a)), a.field ? s = t.add(wte({
    field: t.fieldRef(a.field),
    pulse: o
  })) : a.groupby ? s = t.add(ZSe({
    key: t.keyRef(a.groupby),
    group: oa(t.proxy(r.parent)),
    pulse: o
  })) : Jr("Facet must specify groupby or field: " + vi(a));
  const n = t.fork(), l = n.add(Ep()), u = n.add(Zv({
    pulse: oa(l)
  }));
  n.addData(v, new Iv(n, l, l, u)), n.addSignal("parent", null), s.params.subflow = {
    $subflow: n.parse(e).toRuntime()
  };
}
function dEe(e, t, r) {
  const a = t.add(wte({
    pulse: r.pulse
  })), v = t.fork();
  v.add(Zv()), v.addSignal("parent", null), a.params.subflow = {
    $subflow: v.parse(e).toRuntime()
  };
}
function Rte(e, t, r) {
  const a = e.remove, v = e.insert, o = e.toggle, s = e.modify, n = e.values, l = t.add(vk()), u = "if(" + e.trigger + ',modify("' + r + '",' + [v, a, o, s, n].map((h) => h ?? "null").join(",") + "),0)", i = L0(u, t);
  l.update = i.$expr, l.params = i.$params;
}
function bT(e, t) {
  const r = Pte(e), a = e.type === yT, v = e.from && e.from.facet, o = e.overlap;
  let s = e.layout || r === az || r === iz, n, l, u, i, h, p, _;
  const d = r === rz || s || v, f = fEe(e.from, a, t);
  l = t.add(WSe({
    key: f.key || (e.key ? Bw(e.key) : void 0),
    pulse: f.pulse,
    clean: !a
  }));
  const c = oa(l);
  l = u = t.add(Ep({
    pulse: c
  })), l = t.add(eMe({
    markdef: rEe(e),
    interactive: iEe(e.interactive, t),
    clip: nEe(e.clip, t),
    context: {
      $context: !0
    },
    groups: t.lookup(),
    parent: t.signals.parent ? t.signalRef("parent") : null,
    index: t.markpath(),
    pulse: oa(l)
  }));
  const g = oa(l);
  l = i = t.add(_te(yte(e.encode, e.type, r, e.style, t, {
    mod: !1,
    pulse: g
  }))), l.params.parent = t.encode(), e.transform && e.transform.forEach((S) => {
    const A = mz(S, t), C = A.metadata;
    (C.generates || C.changes) && Jr("Mark transforms should not generate new data."), C.nomod || (i.params.mod = !0), A.params.pulse = oa(l), t.add(l = A);
  }), e.sort && (l = t.add(uMe({
    sort: t.compareRef(e.sort),
    pulse: oa(l)
  })));
  const m = oa(l);
  (v || s) && (s = t.add(Tte({
    layout: t.objectProperty(e.layout),
    legends: t.legends,
    mark: g,
    pulse: m
  })), p = oa(s));
  const x = t.add(bte({
    mark: g,
    pulse: p || m
  }));
  _ = oa(x), a && (d && (n = t.operators, n.pop(), s && n.pop()), t.pushState(m, p || _, c), v ? hEe(e, t, f) : d ? dEe(e, t, f) : t.parse(e), t.popState(), d && (s && n.push(s), n.push(x))), o && (_ = pEe(o, _, t));
  const w = t.add(kte({
    pulse: _
  })), k = t.add(Zv({
    pulse: oa(w)
  }, void 0, t.parent()));
  e.name != null && (h = e.name, t.addData(h, new Iv(t, u, w, k)), e.on && e.on.forEach((S) => {
    (S.insert || S.remove || S.toggle) && Jr("Marks only support modify triggers."), Rte(S, t, h);
  }));
}
function pEe(e, t, r) {
  const a = e.method, v = e.bound, o = e.separation, s = {
    separation: kc(o) ? r.signalRef(o.signal) : o,
    method: kc(a) ? r.signalRef(a.signal) : a,
    pulse: t
  };
  if (e.order && (s.sort = r.compareRef({
    field: e.order
  })), v) {
    const n = v.tolerance;
    s.boundTolerance = kc(n) ? r.signalRef(n.signal) : +n, s.boundScale = r.scaleRef(v.scale), s.boundOrient = v.orient;
  }
  return oa(r.add(rMe(s)));
}
function mEe(e, t) {
  const r = t.config.legend, a = e.encode || {}, v = Uh(e, r), o = a.legend || {}, s = o.name || void 0, n = o.interactive, l = o.style, u = {};
  let i = 0, h, p, _;
  cz.forEach((x) => e[x] ? (u[x] = e[x], i = i || e[x]) : 0), i || Jr("Missing valid scale for legend.");
  const d = gEe(e, t.scaleType(i)), f = {
    title: e.title != null,
    scales: u,
    type: d,
    vgrad: d !== "symbol" && v.isVertical()
  }, c = oa(t.add(Ep(null, [f]))), g = {
    enter: {
      x: {
        value: 0
      },
      y: {
        value: 0
      }
    }
  }, m = oa(t.add(JSe(p = {
    type: d,
    scale: t.scaleRef(i),
    count: t.objectProperty(v("tickCount")),
    limit: t.property(v("symbolLimit")),
    values: t.objectProperty(e.values),
    minstep: t.property(e.tickMinStep),
    formatType: t.property(e.formatType),
    formatSpecifier: t.property(e.format)
  })));
  return d === O8 ? (_ = [VMe(e, i, r, a.gradient), IV(e, r, a.labels, m)], p.count = p.count || t.signalRef(`max(2,2*floor((${uv(v.gradientLength())})/100))`)) : d === sI ? _ = [$Me(e, i, r, a.gradient, m), IV(e, r, a.labels, m)] : (h = WMe(e, r), _ = [GMe(e, r, a, m, uv(h.columns))], p.size = xEe(e, t, _[0].marks)), _ = [Uw({
    role: pSe,
    from: c,
    encode: g,
    marks: _,
    layout: h,
    interactive: n
  })], f.title && _.push(tEe(e, r, a.title, c)), bT(Uw({
    role: hSe,
    from: c,
    encode: Lb(vEe(v, e, r), o, R4),
    marks: _,
    aria: v("aria"),
    description: v("description"),
    zindex: v("zindex"),
    name: s,
    interactive: n,
    style: l
  }), t);
}
function gEe(e, t) {
  let r = e.type || CV;
  return !e.type && yEe(e) === 1 && (e.fill || e.stroke) && (r = pP(t) ? O8 : QE(t) ? sI : CV), r !== O8 ? r : QE(t) ? sI : O8;
}
function yEe(e) {
  return cz.reduce((t, r) => t + (e[r] ? 1 : 0), 0);
}
function vEe(e, t, r) {
  const a = {
    enter: {},
    update: {}
  };
  return hf(a, {
    orient: e("orient"),
    offset: e("offset"),
    padding: e("padding"),
    titlePadding: e("titlePadding"),
    cornerRadius: e("cornerRadius"),
    fill: e("fillColor"),
    stroke: e("strokeColor"),
    strokeWidth: r.strokeWidth,
    strokeDash: r.strokeDash,
    x: e("legendX"),
    y: e("legendY"),
    // accessibility support
    format: t.format,
    formatType: t.formatType
  }), a;
}
function xEe(e, t, r) {
  const a = uv(FV("size", e, r)), v = uv(FV("strokeWidth", e, r)), o = uv(bEe(r[1].encode, t, z4));
  return L0(`max(ceil(sqrt(${a})+${v}),${o})`, t);
}
function FV(e, t, r) {
  return t[e] ? `scale("${t[e]}",datum)` : Dte(e, r[0].encode);
}
function bEe(e, t, r) {
  return Dte("fontSize", e) || jMe("fontSize", t, r);
}
const _Ee = `item.orient==="${Pb}"?-90:item.orient==="${Ob}"?90:0`;
function wEe(e, t) {
  e = Fi(e) ? {
    text: e
  } : e;
  const r = Uh(e, t.config.title), a = e.encode || {}, v = a.group || {}, o = v.name || void 0, s = v.interactive, n = v.style, l = [], u = {}, i = oa(t.add(Ep(null, [u])));
  return l.push(AEe(e, r, kEe(e), i)), e.subtitle && l.push(SEe(e, r, a.subtitle, i)), bT(Uw({
    role: vSe,
    from: i,
    encode: TEe(r, v),
    marks: l,
    aria: r("aria"),
    description: r("description"),
    zindex: r("zindex"),
    name: o,
    interactive: s,
    style: n
  }), t);
}
function kEe(e) {
  const t = e.encode;
  return t && t.title || $a({
    name: e.name,
    interactive: e.interactive,
    style: e.style
  }, t);
}
function TEe(e, t) {
  const r = {
    enter: {},
    update: {}
  };
  return hf(r, {
    orient: e("orient"),
    anchor: e("anchor"),
    align: {
      signal: hz
    },
    angle: {
      signal: _Ee
    },
    limit: e("limit"),
    frame: e("frame"),
    offset: e("offset") || 0,
    padding: e("subtitlePadding")
  }), Lb(r, t, R4);
}
function AEe(e, t, r, a) {
  const v = {
    value: 0
  }, o = e.text, s = {
    enter: {
      opacity: v
    },
    update: {
      opacity: {
        value: 1
      }
    },
    exit: {
      opacity: v
    }
  };
  return hf(s, {
    text: o,
    align: {
      signal: "item.mark.group.align"
    },
    angle: {
      signal: "item.mark.group.angle"
    },
    limit: {
      signal: "item.mark.group.limit"
    },
    baseline: "top",
    dx: t("dx"),
    dy: t("dy"),
    fill: t("color"),
    font: t("font"),
    fontSize: t("fontSize"),
    fontStyle: t("fontStyle"),
    fontWeight: t("fontWeight"),
    lineHeight: t("lineHeight")
  }, {
    // update
    align: t("align"),
    angle: t("angle"),
    baseline: t("baseline")
  }), ld({
    type: Xv,
    role: xSe,
    style: DMe,
    from: a,
    encode: s
  }, r);
}
function SEe(e, t, r, a) {
  const v = {
    value: 0
  }, o = e.subtitle, s = {
    enter: {
      opacity: v
    },
    update: {
      opacity: {
        value: 1
      }
    },
    exit: {
      opacity: v
    }
  };
  return hf(s, {
    text: o,
    align: {
      signal: "item.mark.group.align"
    },
    angle: {
      signal: "item.mark.group.angle"
    },
    limit: {
      signal: "item.mark.group.limit"
    },
    baseline: "top",
    dx: t("dx"),
    dy: t("dy"),
    fill: t("subtitleColor"),
    font: t("subtitleFont"),
    fontSize: t("subtitleFontSize"),
    fontStyle: t("subtitleFontStyle"),
    fontWeight: t("subtitleFontWeight"),
    lineHeight: t("subtitleLineHeight")
  }, {
    // update
    align: t("align"),
    angle: t("angle"),
    baseline: t("baseline")
  }), ld({
    type: Xv,
    role: bSe,
    style: LMe,
    from: a,
    encode: s
  }, r);
}
function MEe(e, t) {
  const r = [];
  e.transform && e.transform.forEach((a) => {
    r.push(mz(a, t));
  }), e.on && e.on.forEach((a) => {
    Rte(a, t, e.name);
  }), t.addDataPipeline(e.name, EEe(e, t, r));
}
function EEe(e, t, r) {
  const a = [];
  let v = null, o = !1, s = !1, n, l, u, i, h;
  for (e.values ? kc(e.values) || L8(e.format) ? (a.push(NV(t, e)), a.push(v = Sy())) : a.push(v = Sy({
    $ingest: e.values,
    $format: e.format
  })) : e.url ? L8(e.url) || L8(e.format) ? (a.push(NV(t, e)), a.push(v = Sy())) : a.push(v = Sy({
    $request: e.url,
    $format: e.format
  })) : e.source && (v = n = Ri(e.source).map((p) => oa(t.getData(p).output)), a.push(null)), l = 0, u = r.length; l < u; ++l)
    i = r[l], h = i.metadata, !v && !h.source && a.push(v = Sy()), a.push(i), h.generates && (s = !0), h.modifies && !s && (o = !0), h.source ? v = i : h.changes && (v = null);
  return n && (u = n.length - 1, a[0] = sMe({
    derive: o,
    pulse: u ? n : n[0]
  }), (o || u) && a.splice(1, 0, Sy())), v || a.push(Sy()), a.push(Zv({})), a;
}
function Sy(e) {
  const t = Ep({}, e);
  return t.metadata = {
    source: !0
  }, t;
}
function NV(e, t) {
  return QSe({
    url: t.url ? e.property(t.url) : void 0,
    async: t.async ? e.property(t.async) : void 0,
    values: t.values ? e.property(t.values) : void 0,
    format: e.objectProperty(t.format)
  });
}
const Fte = (e) => e === Mg || e === Cp, _T = (e, t, r) => kc(e) ? LEe(e.signal, t, r) : e === Pb || e === Cp ? t : r, Zc = (e, t, r) => kc(e) ? IEe(e.signal, t, r) : Fte(e) ? t : r, dp = (e, t, r) => kc(e) ? DEe(e.signal, t, r) : Fte(e) ? r : t, Nte = (e, t, r) => kc(e) ? PEe(e.signal, t, r) : e === Cp ? {
  value: t
} : {
  value: r
}, CEe = (e, t, r) => kc(e) ? OEe(e.signal, t, r) : e === Ob ? {
  value: t
} : {
  value: r
}, IEe = (e, t, r) => Bte(`${e} === '${Cp}' || ${e} === '${Mg}'`, t, r), DEe = (e, t, r) => Bte(`${e} !== '${Cp}' && ${e} !== '${Mg}'`, t, r), LEe = (e, t, r) => gz(`${e} === '${Pb}' || ${e} === '${Cp}'`, t, r), PEe = (e, t, r) => gz(`${e} === '${Cp}'`, t, r), OEe = (e, t, r) => gz(`${e} === '${Ob}'`, t, r), Bte = (e, t, r) => (t = t != null ? Yc(t) : t, r = r != null ? Yc(r) : r, BV(t) && BV(r) ? (t = t ? t.signal || vi(t.value) : null, r = r ? r.signal || vi(r.value) : null, {
  signal: `${e} ? (${t}) : (${r})`
}) : [$a({
  test: e
}, t)].concat(r || [])), BV = (e) => e == null || Object.keys(e).length === 1, gz = (e, t, r) => ({
  signal: `${e} ? (${lx(t)}) : (${lx(r)})`
}), zEe = (e, t, r, a, v) => ({
  signal: (a != null ? `${e} === '${Pb}' ? (${lx(a)}) : ` : "") + (r != null ? `${e} === '${Mg}' ? (${lx(r)}) : ` : "") + (v != null ? `${e} === '${Ob}' ? (${lx(v)}) : ` : "") + (t != null ? `${e} === '${Cp}' ? (${lx(t)}) : ` : "") + "(null)"
}), lx = (e) => kc(e) ? e.signal : e == null ? null : vi(e), REe = (e, t) => t === 0 ? 0 : kc(e) ? {
  signal: `(${e.signal}) * ${t}`
} : {
  value: e * t
}, bx = (e, t) => {
  const r = e.signal;
  return r && r.endsWith("(null)") ? {
    signal: r.slice(0, -6) + t.signal
  } : e;
};
function G2(e, t, r, a) {
  let v;
  if (t && ua(t, e))
    return t[e];
  if (ua(r, e))
    return r[e];
  if (e.startsWith("title")) {
    switch (e) {
      case "titleColor":
        v = "fill";
        break;
      case "titleFont":
      case "titleFontSize":
      case "titleFontWeight":
        v = e[5].toLowerCase() + e.slice(6);
    }
    return a[uz][v];
  } else if (e.startsWith("label")) {
    switch (e) {
      case "labelColor":
        v = "fill";
        break;
      case "labelFont":
      case "labelFontSize":
        v = e[5].toLowerCase() + e.slice(6);
    }
    return a[z4][v];
  }
  return null;
}
function jV(e) {
  const t = {};
  for (const r of e)
    if (r)
      for (const a in r) t[a] = 1;
  return Object.keys(t);
}
function FEe(e, t) {
  var r = t.config, a = r.style, v = r.axis, o = t.scaleType(e.scale) === "band" && r.axisBand, s = e.orient, n, l, u;
  if (kc(s)) {
    const h = jV([r.axisX, r.axisY]), p = jV([r.axisTop, r.axisBottom, r.axisLeft, r.axisRight]);
    n = {};
    for (u of h)
      n[u] = Zc(s, G2(u, r.axisX, v, a), G2(u, r.axisY, v, a));
    l = {};
    for (u of p)
      l[u] = zEe(s.signal, G2(u, r.axisTop, v, a), G2(u, r.axisBottom, v, a), G2(u, r.axisLeft, v, a), G2(u, r.axisRight, v, a));
  } else
    n = s === Cp || s === Mg ? r.axisX : r.axisY, l = r["axis" + s[0].toUpperCase() + s.slice(1)];
  return n || l || o ? $a({}, v, n, l, o) : v;
}
function NEe(e, t, r, a) {
  const v = Uh(e, t), o = e.orient;
  let s, n;
  const l = {
    enter: s = {
      opacity: ko
    },
    update: n = {
      opacity: Ed
    },
    exit: {
      opacity: ko
    }
  };
  hf(l, {
    stroke: v("domainColor"),
    strokeCap: v("domainCap"),
    strokeDash: v("domainDash"),
    strokeDashOffset: v("domainDashOffset"),
    strokeWidth: v("domainWidth"),
    strokeOpacity: v("domainOpacity")
  });
  const u = UV(e, 0), i = UV(e, 1);
  return s.x = n.x = Zc(o, u, ko), s.x2 = n.x2 = Zc(o, i), s.y = n.y = dp(o, u, ko), s.y2 = n.y2 = dp(o, i), ld({
    type: fz,
    role: sSe,
    from: a,
    encode: l
  }, r);
}
function UV(e, t) {
  return {
    scale: e.scale,
    range: t
  };
}
function BEe(e, t, r, a, v) {
  const o = Uh(e, t), s = e.orient, n = e.gridScale, l = _T(s, 1, -1), u = jEe(e.offset, l);
  let i, h, p;
  const _ = {
    enter: i = {
      opacity: ko
    },
    update: p = {
      opacity: Ed
    },
    exit: h = {
      opacity: ko
    }
  };
  hf(_, {
    stroke: o("gridColor"),
    strokeCap: o("gridCap"),
    strokeDash: o("gridDash"),
    strokeDashOffset: o("gridDashOffset"),
    strokeOpacity: o("gridOpacity"),
    strokeWidth: o("gridWidth")
  });
  const d = {
    scale: e.scale,
    field: Md,
    band: v.band,
    extra: v.extra,
    offset: v.offset,
    round: o("tickRound")
  }, f = Zc(s, {
    signal: "height"
  }, {
    signal: "width"
  }), c = n ? {
    scale: n,
    range: 0,
    mult: l,
    offset: u
  } : {
    value: 0,
    offset: u
  }, g = n ? {
    scale: n,
    range: 1,
    mult: l,
    offset: u
  } : $a(f, {
    mult: l,
    offset: u
  });
  return i.x = p.x = Zc(s, d, c), i.y = p.y = dp(s, d, c), i.x2 = p.x2 = dp(s, g), i.y2 = p.y2 = Zc(s, g), h.x = Zc(s, d), h.y = dp(s, d), ld({
    type: fz,
    role: lSe,
    key: Md,
    from: a,
    encode: _
  }, r);
}
function jEe(e, t) {
  if (t !== 1) if (!Oi(e))
    e = kc(t) ? {
      signal: `(${t.signal}) * (${e || 0})`
    } : t * (e || 0);
  else {
    let r = e = $a({}, e);
    for (; r.mult != null; )
      if (Oi(r.mult))
        r = r.mult = $a({}, r.mult);
      else
        return r.mult = kc(t) ? {
          signal: `(${r.mult}) * (${t.signal})`
        } : r.mult * t, e;
    r.mult = t;
  }
  return e;
}
function UEe(e, t, r, a, v, o) {
  const s = Uh(e, t), n = e.orient, l = _T(n, -1, 1);
  let u, i, h;
  const p = {
    enter: u = {
      opacity: ko
    },
    update: h = {
      opacity: Ed
    },
    exit: i = {
      opacity: ko
    }
  };
  hf(p, {
    stroke: s("tickColor"),
    strokeCap: s("tickCap"),
    strokeDash: s("tickDash"),
    strokeDashOffset: s("tickDashOffset"),
    strokeOpacity: s("tickOpacity"),
    strokeWidth: s("tickWidth")
  });
  const _ = Yc(v);
  _.mult = l;
  const d = {
    scale: e.scale,
    field: Md,
    band: o.band,
    extra: o.extra,
    offset: o.offset,
    round: s("tickRound")
  };
  return h.y = u.y = Zc(n, ko, d), h.y2 = u.y2 = Zc(n, _), i.x = Zc(n, d), h.x = u.x = dp(n, ko, d), h.x2 = u.x2 = dp(n, _), i.y = dp(n, d), ld({
    type: fz,
    role: cSe,
    key: Md,
    from: a,
    encode: p
  }, r);
}
function PM(e, t, r, a, v) {
  return {
    signal: 'flush(range("' + e + '"), scale("' + e + '", datum.value), ' + t + "," + r + "," + a + "," + v + ")"
  };
}
function VEe(e, t, r, a, v, o) {
  const s = Uh(e, t), n = e.orient, l = e.scale, u = _T(n, -1, 1), i = uv(s("labelFlush")), h = uv(s("labelFlushOffset")), p = s("labelAlign"), _ = s("labelBaseline");
  let d = i === 0 || !!i, f;
  const c = Yc(v);
  c.mult = u, c.offset = Yc(s("labelPadding") || 0), c.offset.mult = u;
  const g = {
    scale: l,
    field: Md,
    band: 0.5,
    offset: Lte(o.offset, s("labelOffset"))
  }, m = Zc(n, d ? PM(l, i, '"left"', '"right"', '"center"') : {
    value: "center"
  }, CEe(n, "left", "right")), x = Zc(n, Nte(n, "bottom", "top"), d ? PM(l, i, '"top"', '"bottom"', '"middle"') : {
    value: "middle"
  }), w = PM(l, i, `-(${h})`, h, 0);
  d = d && h;
  const k = {
    opacity: ko,
    x: Zc(n, g, c),
    y: dp(n, g, c)
  }, S = {
    enter: k,
    update: f = {
      opacity: Ed,
      text: {
        field: lz
      },
      x: k.x,
      y: k.y,
      align: m,
      baseline: x
    },
    exit: {
      opacity: ko,
      x: k.x,
      y: k.y
    }
  };
  hf(S, {
    dx: !p && d ? Zc(n, w) : null,
    dy: !_ && d ? dp(n, w) : null
  }), hf(S, {
    angle: s("labelAngle"),
    fill: s("labelColor"),
    fillOpacity: s("labelOpacity"),
    font: s("labelFont"),
    fontSize: s("labelFontSize"),
    fontWeight: s("labelFontWeight"),
    fontStyle: s("labelFontStyle"),
    limit: s("labelLimit"),
    lineHeight: s("labelLineHeight")
  }, {
    align: p,
    baseline: _
  });
  const A = s("labelBound");
  let C = s("labelOverlap");
  return C = C || A ? {
    separation: s("labelSeparation"),
    method: C,
    order: "datum.index",
    bound: A ? {
      scale: l,
      orient: n,
      tolerance: A
    } : null
  } : void 0, f.align !== m && (f.align = bx(f.align, m)), f.baseline !== x && (f.baseline = bx(f.baseline, x)), ld({
    type: Xv,
    role: uSe,
    style: z4,
    key: Md,
    from: a,
    encode: S,
    overlap: C
  }, r);
}
function $Ee(e, t, r, a) {
  const v = Uh(e, t), o = e.orient, s = _T(o, -1, 1);
  let n, l;
  const u = {
    enter: n = {
      opacity: ko,
      anchor: Yc(v("titleAnchor", null)),
      align: {
        signal: hz
      }
    },
    update: l = $a({}, n, {
      opacity: Ed,
      text: Yc(e.title)
    }),
    exit: {
      opacity: ko
    }
  }, i = {
    signal: `lerp(range("${e.scale}"), ${vT(0, 1, 0.5)})`
  };
  return l.x = Zc(o, i), l.y = dp(o, i), n.angle = Zc(o, ko, REe(s, 90)), n.baseline = Zc(o, Nte(o, Mg, Cp), {
    value: Mg
  }), l.angle = n.angle, l.baseline = n.baseline, hf(u, {
    fill: v("titleColor"),
    fillOpacity: v("titleOpacity"),
    font: v("titleFont"),
    fontSize: v("titleFontSize"),
    fontStyle: v("titleFontStyle"),
    fontWeight: v("titleFontWeight"),
    limit: v("titleLimit"),
    lineHeight: v("titleLineHeight")
  }, {
    // require update
    align: v("titleAlign"),
    angle: v("titleAngle"),
    baseline: v("titleBaseline")
  }), qEe(v, o, u, r), u.update.align = bx(u.update.align, n.align), u.update.angle = bx(u.update.angle, n.angle), u.update.baseline = bx(u.update.baseline, n.baseline), ld({
    type: Xv,
    role: fSe,
    style: uz,
    from: a,
    encode: u
  }, r);
}
function qEe(e, t, r, a) {
  const v = (n, l) => n != null ? (r.update[l] = bx(Yc(n), r.update[l]), !1) : !ex(l, a), o = v(e("titleX"), "x"), s = v(e("titleY"), "y");
  r.enter.auto = s === o ? Yc(s) : Zc(t, Yc(s), Yc(o));
}
function HEe(e, t) {
  const r = FEe(e, t), a = e.encode || {}, v = a.axis || {}, o = v.name || void 0, s = v.interactive, n = v.style, l = Uh(e, r), u = UMe(l), i = {
    scale: e.scale,
    ticks: !!l("ticks"),
    labels: !!l("labels"),
    grid: !!l("grid"),
    domain: !!l("domain"),
    title: e.title != null
  }, h = oa(t.add(Ep({}, [i]))), p = oa(t.add(GSe({
    scale: t.scaleRef(e.scale),
    extra: t.property(u.extra),
    count: t.objectProperty(e.tickCount),
    values: t.objectProperty(e.values),
    minstep: t.property(e.tickMinStep),
    formatType: t.property(e.formatType),
    formatSpecifier: t.property(e.format)
  }))), _ = [];
  let d;
  return i.grid && _.push(BEe(e, r, a.grid, p, u)), i.ticks && (d = l("tickSize"), _.push(UEe(e, r, a.ticks, p, d, u))), i.labels && (d = i.ticks ? d : 0, _.push(VEe(e, r, a.labels, p, d, u))), i.domain && _.push(NEe(e, r, a.domain, h)), i.title && _.push($Ee(e, r, a.title, h)), bT(Uw({
    role: oSe,
    from: h,
    encode: Lb(GEe(l, e), v, R4),
    marks: _,
    aria: l("aria"),
    description: l("description"),
    zindex: l("zindex"),
    name: o,
    interactive: s,
    style: n
  }), t);
}
function GEe(e, t) {
  const r = {
    enter: {},
    update: {}
  };
  return hf(r, {
    orient: e("orient"),
    offset: e("offset") || 0,
    position: tp(t.position, 0),
    titlePadding: e("titlePadding"),
    minExtent: e("minExtent"),
    maxExtent: e("maxExtent"),
    range: {
      signal: `abs(span(range("${t.scale}")))`
    },
    translate: e("translate"),
    // accessibility support
    format: t.format,
    formatType: t.formatType
  }), r;
}
function jte(e, t, r) {
  const a = Ri(e.signals), v = Ri(e.scales);
  return r || a.forEach((o) => vte(o, t)), Ri(e.projections).forEach((o) => TMe(o, t)), v.forEach((o) => hMe(o, t)), Ri(e.data).forEach((o) => MEe(o, t)), v.forEach((o) => dMe(o, t)), (r || a).forEach((o) => HSe(o, t)), Ri(e.axes).forEach((o) => HEe(o, t)), Ri(e.marks).forEach((o) => bT(o, t)), Ri(e.legends).forEach((o) => mEe(o, t)), e.title && wEe(e.title, t), t.parseLambdas(), t;
}
const WEe = (e) => Lb({
  enter: {
    x: {
      value: 0
    },
    y: {
      value: 0
    }
  },
  update: {
    width: {
      signal: "width"
    },
    height: {
      signal: "height"
    }
  }
}, e);
function YEe(e, t) {
  const r = t.config, a = oa(t.root = t.add(vk())), v = ZEe(e, r);
  v.forEach((u) => vte(u, t)), t.description = e.description || r.description, t.eventConfig = r.events, t.legends = t.objectProperty(r.legend && r.legend.layout), t.locale = r.locale;
  const o = t.add(Ep()), s = t.add(_te(yte(WEe(e.encode), yT, iz, e.style, t, {
    pulse: oa(o)
  }))), n = t.add(Tte({
    layout: t.objectProperty(e.layout),
    legends: t.legends,
    autosize: t.signalRef("autosize"),
    mark: a,
    pulse: oa(s)
  }));
  t.operators.pop(), t.pushState(oa(s), oa(n), null), jte(e, t, v), t.operators.push(n);
  let l = t.add(bte({
    mark: a,
    pulse: oa(n)
  }));
  return l = t.add(kte({
    pulse: oa(l)
  })), l = t.add(Zv({
    pulse: oa(l)
  })), t.addData("root", new Iv(t, o, o, l)), t;
}
function i3(e, t) {
  return t && t.signal ? {
    name: e,
    update: t.signal
  } : {
    name: e,
    value: t
  };
}
function ZEe(e, t) {
  const r = (s) => tp(e[s], t[s]), a = [i3("background", r("background")), i3("autosize", rSe(r("autosize"))), i3("padding", aSe(r("padding"))), i3("width", r("width") || 0), i3("height", r("height") || 0)], v = a.reduce((s, n) => (s[n.name] = n, s), {}), o = {};
  return Ri(e.signals).forEach((s) => {
    ua(v, s.name) ? s = $a(v[s.name], s) : a.push(s), o[s.name] = s;
  }), Ri(t.signals).forEach((s) => {
    !ua(o, s.name) && !ua(v, s.name) && a.push(s);
  }), a;
}
function Ute(e, t) {
  this.config = e || {}, this.options = t || {}, this.bindings = [], this.field = {}, this.signals = {}, this.lambdas = {}, this.scales = {}, this.events = {}, this.data = {}, this.streams = [], this.updates = [], this.operators = [], this.eventConfig = null, this.locale = null, this._id = 0, this._subid = 0, this._nextsub = [0], this._parent = [], this._encode = [], this._lookup = [], this._markpath = [];
}
function VV(e) {
  this.config = e.config, this.options = e.options, this.legends = e.legends, this.field = Object.create(e.field), this.signals = Object.create(e.signals), this.lambdas = Object.create(e.lambdas), this.scales = Object.create(e.scales), this.events = Object.create(e.events), this.data = Object.create(e.data), this.streams = [], this.updates = [], this.operators = [], this._id = 0, this._subid = ++e._nextsub[0], this._nextsub = e._nextsub, this._parent = e._parent.slice(), this._encode = e._encode.slice(), this._lookup = e._lookup.slice(), this._markpath = e._markpath;
}
Ute.prototype = VV.prototype = {
  parse(e) {
    return jte(e, this);
  },
  fork() {
    return new VV(this);
  },
  isSubscope() {
    return this._subid > 0;
  },
  toRuntime() {
    return this.finish(), {
      description: this.description,
      operators: this.operators,
      streams: this.streams,
      updates: this.updates,
      bindings: this.bindings,
      eventConfig: this.eventConfig,
      locale: this.locale
    };
  },
  id() {
    return (this._subid ? this._subid + ":" : 0) + this._id++;
  },
  add(e) {
    return this.operators.push(e), e.id = this.id(), e.refs && (e.refs.forEach((t) => {
      t.$ref = e.id;
    }), e.refs = null), e;
  },
  proxy(e) {
    const t = e instanceof nI ? oa(e) : e;
    return this.add(oMe({
      value: t
    }));
  },
  addStream(e) {
    return this.streams.push(e), e.id = this.id(), e;
  },
  addUpdate(e) {
    return this.updates.push(e), e;
  },
  // Apply metadata
  finish() {
    let e, t;
    this.root && (this.root.root = !0);
    for (e in this.signals)
      this.signals[e].signal = e;
    for (e in this.scales)
      this.scales[e].scale = e;
    function r(a, v, o) {
      let s, n;
      a && (s = a.data || (a.data = {}), n = s[v] || (s[v] = []), n.push(o));
    }
    for (e in this.data) {
      t = this.data[e], r(t.input, e, "input"), r(t.output, e, "output"), r(t.values, e, "values");
      for (const a in t.index)
        r(t.index[a], e, "index:" + a);
    }
    return this;
  },
  // ----
  pushState(e, t, r) {
    this._encode.push(oa(this.add(Zv({
      pulse: e
    })))), this._parent.push(t), this._lookup.push(r ? oa(this.proxy(r)) : null), this._markpath.push(-1);
  },
  popState() {
    this._encode.pop(), this._parent.pop(), this._lookup.pop(), this._markpath.pop();
  },
  parent() {
    return mo(this._parent);
  },
  encode() {
    return mo(this._encode);
  },
  lookup() {
    return mo(this._lookup);
  },
  markpath() {
    const e = this._markpath;
    return ++e[e.length - 1];
  },
  // ----
  fieldRef(e, t) {
    if (Fi(e)) return Bw(e, t);
    e.signal || Jr("Unsupported field reference: " + vi(e));
    const r = e.signal;
    let a = this.field[r];
    if (!a) {
      const v = {
        name: this.signalRef(r)
      };
      t && (v.as = t), this.field[r] = a = oa(this.add(XSe(v)));
    }
    return a;
  },
  compareRef(e) {
    let t = !1;
    const r = (o) => kc(o) ? (t = !0, this.signalRef(o.signal)) : zSe(o) ? (t = !0, this.exprRef(o.expr)) : o, a = Ri(e.field).map(r), v = Ri(e.order).map(r);
    return t ? oa(this.add(EV({
      fields: a,
      orders: v
    }))) : SV(a, v);
  },
  keyRef(e, t) {
    let r = !1;
    const a = (o) => kc(o) ? (r = !0, oa(v[o.signal])) : o, v = this.signals;
    return e = Ri(e).map(a), r ? oa(this.add(KSe({
      fields: e,
      flat: t
    }))) : DSe(e, t);
  },
  sortRef(e) {
    if (!e) return e;
    const t = mT(e.op, e.field), r = e.order || LSe;
    return r.signal ? oa(this.add(EV({
      fields: t,
      orders: this.signalRef(r.signal)
    }))) : SV(t, r);
  },
  // ----
  event(e, t) {
    const r = e + ":" + t;
    if (!this.events[r]) {
      const a = this.id();
      this.streams.push({
        id: a,
        source: e,
        type: t
      }), this.events[r] = a;
    }
    return this.events[r];
  },
  // ----
  hasOwnSignal(e) {
    return ua(this.signals, e);
  },
  addSignal(e, t) {
    this.hasOwnSignal(e) && Jr("Duplicate signal name: " + vi(e));
    const r = t instanceof nI ? t : this.add(vk(t));
    return this.signals[e] = r;
  },
  getSignal(e) {
    return this.signals[e] || Jr("Unrecognized signal name: " + vi(e)), this.signals[e];
  },
  signalRef(e) {
    return this.signals[e] ? oa(this.signals[e]) : (ua(this.lambdas, e) || (this.lambdas[e] = this.add(vk(null))), oa(this.lambdas[e]));
  },
  parseLambdas() {
    const e = Object.keys(this.lambdas);
    for (let t = 0, r = e.length; t < r; ++t) {
      const a = e[t], v = L0(a, this), o = this.lambdas[a];
      o.params = v.$params, o.update = v.$expr;
    }
  },
  property(e) {
    return e && e.signal ? this.signalRef(e.signal) : e;
  },
  objectProperty(e) {
    return !e || !Oi(e) ? e : this.signalRef(e.signal || yz(e));
  },
  exprRef(e, t) {
    const r = {
      expr: L0(e, this)
    };
    return t && (r.expr.$name = t), oa(this.add(YSe(r)));
  },
  addBinding(e, t) {
    this.bindings || Jr("Nested signals do not support binding: " + vi(e)), this.bindings.push($a({
      signal: e
    }, t));
  },
  // ----
  addScaleProj(e, t) {
    ua(this.scales, e) && Jr("Duplicate scale or projection name: " + vi(e)), this.scales[e] = this.add(t);
  },
  addScale(e, t) {
    this.addScaleProj(e, lMe(t));
  },
  addProjection(e, t) {
    this.addScaleProj(e, aMe(t));
  },
  getScale(e) {
    return this.scales[e] || Jr("Unrecognized scale name: " + vi(e)), this.scales[e];
  },
  scaleRef(e) {
    return oa(this.getScale(e));
  },
  scaleType(e) {
    return this.getScale(e).params.type;
  },
  projectionRef(e) {
    return this.scaleRef(e);
  },
  projectionType(e) {
    return this.scaleType(e);
  },
  // ----
  addData(e, t) {
    return ua(this.data, e) && Jr("Duplicate data set name: " + vi(e)), this.data[e] = t;
  },
  getData(e) {
    return this.data[e] || Jr("Undefined data set name: " + vi(e)), this.data[e];
  },
  addDataPipeline(e, t) {
    return ua(this.data, e) && Jr("Duplicate data set name: " + vi(e)), this.addData(e, Iv.fromEntries(this, t));
  }
};
function yz(e) {
  return (Qr(e) ? XEe : KEe)(e);
}
function XEe(e) {
  const t = e.length;
  let r = "[";
  for (let a = 0; a < t; ++a) {
    const v = e[a];
    r += (a > 0 ? "," : "") + (Oi(v) ? v.signal || yz(v) : vi(v));
  }
  return r + "]";
}
function KEe(e) {
  let t = "{", r = 0, a, v;
  for (a in e)
    v = e[a], t += (++r > 1 ? "," : "") + vi(a) + ":" + (Oi(v) ? v.signal || yz(v) : vi(v));
  return t + "}";
}
function JEe() {
  const e = "sans-serif", a = "#4c78a8", v = "#000", o = "#888", s = "#ddd";
  return {
    // default visualization description
    description: "Vega visualization",
    // default padding around visualization
    padding: 0,
    // default for automatic sizing; options: 'none', 'pad', 'fit'
    // or provide an object (e.g., {'type': 'pad', 'resize': true})
    autosize: "pad",
    // default view background color
    // covers the entire view component
    background: null,
    // default event handling configuration
    // preventDefault for view-sourced event types except 'wheel'
    events: {
      defaults: {
        allow: ["wheel"]
      }
    },
    // defaults for top-level group marks
    // accepts mark properties (fill, stroke, etc)
    // covers the data rectangle within group width/height
    group: null,
    // defaults for basic mark types
    // each subset accepts mark properties (fill, stroke, etc)
    mark: null,
    arc: {
      fill: a
    },
    area: {
      fill: a
    },
    image: null,
    line: {
      stroke: a,
      strokeWidth: 2
    },
    path: {
      stroke: a
    },
    rect: {
      fill: a
    },
    rule: {
      stroke: v
    },
    shape: {
      stroke: a
    },
    symbol: {
      fill: a,
      size: 64
    },
    text: {
      fill: v,
      font: e,
      fontSize: 11
    },
    trail: {
      fill: a,
      size: 2
    },
    // style definitions
    style: {
      // axis & legend labels
      "guide-label": {
        fill: v,
        font: e,
        fontSize: 10
      },
      // axis & legend titles
      "guide-title": {
        fill: v,
        font: e,
        fontSize: 11,
        fontWeight: "bold"
      },
      // headers, including chart title
      "group-title": {
        fill: v,
        font: e,
        fontSize: 13,
        fontWeight: "bold"
      },
      // chart subtitle
      "group-subtitle": {
        fill: v,
        font: e,
        fontSize: 12
      },
      // defaults for styled point marks in Vega-Lite
      point: {
        size: 30,
        strokeWidth: 2,
        shape: "circle"
      },
      circle: {
        size: 30,
        strokeWidth: 2
      },
      square: {
        size: 30,
        strokeWidth: 2,
        shape: "square"
      },
      // defaults for styled group marks in Vega-Lite
      cell: {
        fill: "transparent",
        stroke: s
      },
      view: {
        fill: "transparent"
      }
    },
    // defaults for title
    title: {
      orient: "top",
      anchor: "middle",
      offset: 4,
      subtitlePadding: 3
    },
    // defaults for axes
    axis: {
      minExtent: 0,
      maxExtent: 200,
      bandPosition: 0.5,
      domain: !0,
      domainWidth: 1,
      domainColor: o,
      grid: !1,
      gridWidth: 1,
      gridColor: s,
      labels: !0,
      labelAngle: 0,
      labelLimit: 180,
      labelOffset: 0,
      labelPadding: 2,
      ticks: !0,
      tickColor: o,
      tickOffset: 0,
      tickRound: !0,
      tickSize: 5,
      tickWidth: 1,
      titlePadding: 4
    },
    // correction for centering bias
    axisBand: {
      tickOffset: -0.5
    },
    // defaults for cartographic projection
    projection: {
      type: "mercator"
    },
    // defaults for legends
    legend: {
      orient: "right",
      padding: 0,
      gridAlign: "each",
      columnPadding: 10,
      rowPadding: 2,
      symbolDirection: "vertical",
      gradientDirection: "vertical",
      gradientLength: 200,
      gradientThickness: 16,
      gradientStrokeColor: s,
      gradientStrokeWidth: 0,
      gradientLabelOffset: 2,
      labelAlign: "left",
      labelBaseline: "middle",
      labelLimit: 160,
      labelOffset: 4,
      labelOverlap: !0,
      symbolLimit: 30,
      symbolType: "circle",
      symbolSize: 100,
      symbolOffset: 0,
      symbolStrokeWidth: 1.5,
      symbolBaseFillColor: "transparent",
      symbolBaseStrokeColor: o,
      titleLimit: 180,
      titleOrient: "top",
      titlePadding: 5,
      layout: {
        offset: 18,
        direction: "horizontal",
        left: {
          direction: "vertical"
        },
        right: {
          direction: "vertical"
        }
      }
    },
    // defaults for scale ranges
    range: {
      category: {
        scheme: "tableau10"
      },
      ordinal: {
        scheme: "blues"
      },
      heatmap: {
        scheme: "yellowgreenblue"
      },
      ramp: {
        scheme: "blues"
      },
      diverging: {
        scheme: "blueorange",
        extent: [1, 0]
      },
      symbol: ["circle", "square", "triangle-up", "cross", "diamond", "triangle-right", "triangle-down", "triangle-left"]
    }
  };
}
function QEe(e, t, r) {
  return Oi(e) || Jr("Input Vega specification must be an object."), t = xb(JEe(), t, e.config), YEe(e, new Ute(t, r)).toRuntime();
}
var eCe = "5.30.0";
$a(zx, Zve, Swe, i4e, $5e, F6e, c7e, $8e, h7e, R7e, G7e, Q7e);
const tCe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Bounds: ic,
  CanvasHandler: S4,
  CanvasRenderer: L7,
  DATE: Oh,
  DAY: Pf,
  DAYOFYEAR: I0,
  Dataflow: gx,
  Debug: zW,
  Error: ED,
  EventStream: w9,
  Gradient: CK,
  GroupItem: H9,
  HOURS: ad,
  Handler: BP,
  HybridHandler: bJ,
  HybridRenderer: cC,
  Info: OW,
  Item: q9,
  MILLISECONDS: xp,
  MINUTES: od,
  MONTH: Nf,
  Marks: sd,
  MultiPulse: QD,
  None: PW,
  Operator: Zs,
  Parameters: _9,
  Pulse: ug,
  QUARTER: Ph,
  RenderType: tg,
  Renderer: A4,
  ResourceLoader: RK,
  SECONDS: Pd,
  SVGHandler: sJ,
  SVGRenderer: HP,
  SVGStringRenderer: xJ,
  Scenegraph: QK,
  TIME_UNITS: $D,
  Transform: qr,
  View: ate,
  WEEK: _c,
  Warn: CD,
  YEAR: cf,
  accessor: jh,
  accessorFields: Ff,
  accessorName: Lu,
  array: Ri,
  ascending: c9,
  bandwidthNRD: rL,
  bin: gZ,
  bootstrapCI: yZ,
  boundClip: IJ,
  boundContext: _4,
  boundItem: aC,
  boundMark: ZK,
  boundStroke: Xm,
  changeset: Hv,
  clampRange: GW,
  codegenExpression: Lee,
  compare: OD,
  constant: Vf,
  cumulativeLogNormal: uL,
  cumulativeNormal: T9,
  cumulativeUniform: dL,
  dayofyear: kY,
  debounce: zD,
  defaultLocale: YD,
  definition: dZ,
  densityLogNormal: lL,
  densityNormal: iL,
  densityUniform: hL,
  domChild: bc,
  domClear: _d,
  domCreate: Q1,
  domFind: NP,
  dotbin: vZ,
  error: Jr,
  expressionFunction: Zu,
  extend: $a,
  extent: M0,
  extentIndex: WW,
  falsy: L1,
  fastmap: _b,
  field: Dd,
  flush: YW,
  font: X9,
  fontFamily: T4,
  fontSize: V0,
  format: h8,
  formatLocale: c7,
  formats: KD,
  hasOwnProperty: ua,
  id: o4,
  identity: Uf,
  inferType: nZ,
  inferTypes: rZ,
  ingest: rs,
  inherits: Si,
  inrange: rx,
  interpolate: mP,
  interpolateColors: V9,
  interpolateRange: mK,
  intersect: SJ,
  intersectBoxLine: ix,
  intersectPath: kP,
  intersectPoint: TP,
  intersectRule: NK,
  isArray: Qr,
  isBoolean: Rg,
  isDate: sg,
  isFunction: qa,
  isIterable: ZW,
  isNumber: Ro,
  isObject: Oi,
  isRegExp: XW,
  isString: Fi,
  isTuple: x9,
  key: RD,
  lerp: KW,
  lineHeight: Tg,
  loader: y9,
  locale: eZ,
  logger: ID,
  lruCache: JW,
  markup: qP,
  merge: QW,
  mergeConfig: xb,
  multiLineOffset: zP,
  one: vb,
  pad: eY,
  panLinear: jW,
  panLog: UW,
  panPow: VW,
  panSymlog: $W,
  parse: QEe,
  parseExpression: qO,
  parseSelector: Vg,
  path: C9,
  pathCurves: bP,
  pathEqual: DJ,
  pathParse: Ux,
  pathRectangle: LK,
  pathRender: Mw,
  pathSymbols: DK,
  pathTrail: PK,
  peek: mo,
  point: J9,
  projection: cO,
  quantileLogNormal: cL,
  quantileNormal: A9,
  quantileUniform: pL,
  quantiles: tL,
  quantizeInterpolator: gK,
  quarter: qW,
  quartiles: nL,
  get random() {
    return Od;
  },
  randomInteger: Qye,
  randomKDE: oL,
  randomLCG: Jye,
  randomLogNormal: bZ,
  randomMixture: _Z,
  randomNormal: aL,
  randomUniform: wZ,
  read: oZ,
  regressionConstant: mL,
  regressionExp: TZ,
  regressionLinear: gL,
  regressionLoess: MZ,
  regressionLog: kZ,
  regressionPoly: SZ,
  regressionPow: AZ,
  regressionQuad: yL,
  renderModule: Q9,
  repeat: p3,
  resetDefaultLocale: Zge,
  resetSVGClipId: zK,
  resetSVGDefIds: q3e,
  responseType: aZ,
  runtimeContext: Gee,
  sampleCurve: M9,
  sampleLogNormal: sL,
  sampleNormal: k9,
  sampleUniform: fL,
  scale: Go,
  sceneEqual: GP,
  sceneFromJSON: KK,
  scenePickVisit: T7,
  sceneToJSON: XK,
  sceneVisit: bp,
  sceneZOrder: AP,
  scheme: gP,
  serializeXML: mJ,
  setHybridRendererOptions: j3e,
  setRandom: Xye,
  span: s4,
  splitAccessPath: B0,
  stringValue: vi,
  textMetrics: td,
  timeBin: jY,
  timeFloor: IY,
  timeFormatLocale: _w,
  timeInterval: Ab,
  timeOffset: PY,
  timeSequence: RY,
  timeUnitSpecifier: wY,
  timeUnits: qD,
  toBoolean: FD,
  toDate: ND,
  toNumber: Of,
  toSet: vp,
  toString: BD,
  transform: pZ,
  transforms: zx,
  truncate: tY,
  truthy: Ld,
  tupleid: sa,
  typeParsers: UE,
  utcFloor: DY,
  utcInterval: Sb,
  utcOffset: OY,
  utcSequence: FY,
  utcdayofyear: SY,
  utcquarter: HW,
  utcweek: MY,
  version: eCe,
  visitArray: B1,
  week: TY,
  writeConfig: bb,
  zero: W1,
  zoomLinear: DD,
  zoomLog: LD,
  zoomPow: i7,
  zoomSymlog: PD
}, Symbol.toStringTag, { value: "Module" }));
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */
var nCe = /* @__PURE__ */ function() {
  var e = function(t, r) {
    return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, v) {
      a.__proto__ = v;
    } || function(a, v) {
      for (var o in v) v.hasOwnProperty(o) && (a[o] = v[o]);
    }, e(t, r);
  };
  return function(t, r) {
    e(t, r);
    function a() {
      this.constructor = t;
    }
    t.prototype = r === null ? Object.create(r) : (a.prototype = r.prototype, new a());
  };
}(), rCe = Object.prototype.hasOwnProperty;
function uI(e, t) {
  return rCe.call(e, t);
}
function cI(e) {
  if (Array.isArray(e)) {
    for (var t = new Array(e.length), r = 0; r < t.length; r++)
      t[r] = "" + r;
    return t;
  }
  if (Object.keys)
    return Object.keys(e);
  var a = [];
  for (var v in e)
    uI(e, v) && a.push(v);
  return a;
}
function Jh(e) {
  switch (typeof e) {
    case "object":
      return JSON.parse(JSON.stringify(e));
    case "undefined":
      return null;
    default:
      return e;
  }
}
function fI(e) {
  for (var t = 0, r = e.length, a; t < r; ) {
    if (a = e.charCodeAt(t), a >= 48 && a <= 57) {
      t++;
      continue;
    }
    return !1;
  }
  return !0;
}
function jy(e) {
  return e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replace(/~/g, "~0").replace(/\//g, "~1");
}
function Vte(e) {
  return e.replace(/~1/g, "/").replace(/~0/g, "~");
}
function hI(e) {
  if (e === void 0)
    return !0;
  if (e) {
    if (Array.isArray(e)) {
      for (var t = 0, r = e.length; t < r; t++)
        if (hI(e[t]))
          return !0;
    } else if (typeof e == "object") {
      for (var a = cI(e), v = a.length, o = 0; o < v; o++)
        if (hI(e[a[o]]))
          return !0;
    }
  }
  return !1;
}
function $V(e, t) {
  var r = [e];
  for (var a in t) {
    var v = typeof t[a] == "object" ? JSON.stringify(t[a], null, 2) : t[a];
    typeof v < "u" && r.push(a + ": " + v);
  }
  return r.join(`
`);
}
var $te = (
  /** @class */
  function(e) {
    nCe(t, e);
    function t(r, a, v, o, s) {
      var n = this.constructor, l = e.call(this, $V(r, { name: a, index: v, operation: o, tree: s })) || this;
      return l.name = a, l.index = v, l.operation = o, l.tree = s, Object.setPrototypeOf(l, n.prototype), l.message = $V(r, { name: a, index: v, operation: o, tree: s }), l;
    }
    return t;
  }(Error)
), Eu = $te, iCe = Jh, ux = {
  add: function(e, t, r) {
    return e[t] = this.value, { newDocument: r };
  },
  remove: function(e, t, r) {
    var a = e[t];
    return delete e[t], { newDocument: r, removed: a };
  },
  replace: function(e, t, r) {
    var a = e[t];
    return e[t] = this.value, { newDocument: r, removed: a };
  },
  move: function(e, t, r) {
    var a = xk(r, this.path);
    a && (a = Jh(a));
    var v = cv(r, { op: "remove", path: this.from }).removed;
    return cv(r, { op: "add", path: this.path, value: v }), { newDocument: r, removed: a };
  },
  copy: function(e, t, r) {
    var a = xk(r, this.from);
    return cv(r, { op: "add", path: this.path, value: Jh(a) }), { newDocument: r };
  },
  test: function(e, t, r) {
    return { newDocument: r, test: Vw(e[t], this.value) };
  },
  _get: function(e, t, r) {
    return this.value = e[t], { newDocument: r };
  }
}, aCe = {
  add: function(e, t, r) {
    return fI(t) ? e.splice(t, 0, this.value) : e[t] = this.value, { newDocument: r, index: t };
  },
  remove: function(e, t, r) {
    var a = e.splice(t, 1);
    return { newDocument: r, removed: a[0] };
  },
  replace: function(e, t, r) {
    var a = e[t];
    return e[t] = this.value, { newDocument: r, removed: a };
  },
  move: ux.move,
  copy: ux.copy,
  test: ux.test,
  _get: ux._get
};
function xk(e, t) {
  if (t == "")
    return e;
  var r = { op: "_get", path: t };
  return cv(e, r), r.value;
}
function cv(e, t, r, a, v, o) {
  if (r === void 0 && (r = !1), a === void 0 && (a = !0), v === void 0 && (v = !0), o === void 0 && (o = 0), r && (typeof r == "function" ? r(t, 0, e, t.path) : bk(t, 0)), t.path === "") {
    var s = { newDocument: e };
    if (t.op === "add")
      return s.newDocument = t.value, s;
    if (t.op === "replace")
      return s.newDocument = t.value, s.removed = e, s;
    if (t.op === "move" || t.op === "copy")
      return s.newDocument = xk(e, t.from), t.op === "move" && (s.removed = e), s;
    if (t.op === "test") {
      if (s.test = Vw(e, t.value), s.test === !1)
        throw new Eu("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
      return s.newDocument = e, s;
    } else {
      if (t.op === "remove")
        return s.removed = e, s.newDocument = null, s;
      if (t.op === "_get")
        return t.value = e, s;
      if (r)
        throw new Eu("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", o, t, e);
      return s;
    }
  } else {
    a || (e = Jh(e));
    var n = t.path || "", l = n.split("/"), u = e, i = 1, h = l.length, p = void 0, _ = void 0, d = void 0;
    for (typeof r == "function" ? d = r : d = bk; ; ) {
      if (_ = l[i], _ && _.indexOf("~") != -1 && (_ = Vte(_)), v && (_ == "__proto__" || _ == "prototype" && i > 0 && l[i - 1] == "constructor"))
        throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");
      if (r && p === void 0 && (u[_] === void 0 ? p = l.slice(0, i).join("/") : i == h - 1 && (p = t.path), p !== void 0 && d(t, 0, e, p)), i++, Array.isArray(u)) {
        if (_ === "-")
          _ = u.length;
        else {
          if (r && !fI(_))
            throw new Eu("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", o, t, e);
          fI(_) && (_ = ~~_);
        }
        if (i >= h) {
          if (r && t.op === "add" && _ > u.length)
            throw new Eu("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", o, t, e);
          var s = aCe[t.op].call(t, u, _, e);
          if (s.test === !1)
            throw new Eu("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
          return s;
        }
      } else if (i >= h) {
        var s = ux[t.op].call(t, u, _, e);
        if (s.test === !1)
          throw new Eu("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
        return s;
      }
      if (u = u[_], r && i < h && (!u || typeof u != "object"))
        throw new Eu("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", o, t, e);
    }
  }
}
function wT(e, t, r, a, v) {
  if (a === void 0 && (a = !0), v === void 0 && (v = !0), r && !Array.isArray(t))
    throw new Eu("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
  a || (e = Jh(e));
  for (var o = new Array(t.length), s = 0, n = t.length; s < n; s++)
    o[s] = cv(e, t[s], r, !0, v, s), e = o[s].newDocument;
  return o.newDocument = e, o;
}
function oCe(e, t, r) {
  var a = cv(e, t);
  if (a.test === !1)
    throw new Eu("Test operation failed", "TEST_OPERATION_FAILED", r, t, e);
  return a.newDocument;
}
function bk(e, t, r, a) {
  if (typeof e != "object" || e === null || Array.isArray(e))
    throw new Eu("Operation is not an object", "OPERATION_NOT_AN_OBJECT", t, e, r);
  if (ux[e.op]) {
    if (typeof e.path != "string")
      throw new Eu("Operation `path` property is not a string", "OPERATION_PATH_INVALID", t, e, r);
    if (e.path.indexOf("/") !== 0 && e.path.length > 0)
      throw new Eu('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", t, e, r);
    if ((e.op === "move" || e.op === "copy") && typeof e.from != "string")
      throw new Eu("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", t, e, r);
    if ((e.op === "add" || e.op === "replace" || e.op === "test") && e.value === void 0)
      throw new Eu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", t, e, r);
    if ((e.op === "add" || e.op === "replace" || e.op === "test") && hI(e.value))
      throw new Eu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", t, e, r);
    if (r) {
      if (e.op == "add") {
        var v = e.path.split("/").length, o = a.split("/").length;
        if (v !== o + 1 && v !== o)
          throw new Eu("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", t, e, r);
      } else if (e.op === "replace" || e.op === "remove" || e.op === "_get") {
        if (e.path !== a)
          throw new Eu("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", t, e, r);
      } else if (e.op === "move" || e.op === "copy") {
        var s = { op: "_get", path: e.from, value: void 0 }, n = qte([s], r);
        if (n && n.name === "OPERATION_PATH_UNRESOLVABLE")
          throw new Eu("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", t, e, r);
      }
    }
  } else throw new Eu("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", t, e, r);
}
function qte(e, t, r) {
  try {
    if (!Array.isArray(e))
      throw new Eu("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
    if (t)
      wT(Jh(t), Jh(e), r || !0);
    else {
      r = r || bk;
      for (var a = 0; a < e.length; a++)
        r(e[a], a, t, void 0);
    }
  } catch (v) {
    if (v instanceof Eu)
      return v;
    throw v;
  }
}
function Vw(e, t) {
  if (e === t)
    return !0;
  if (e && t && typeof e == "object" && typeof t == "object") {
    var r = Array.isArray(e), a = Array.isArray(t), v, o, s;
    if (r && a) {
      if (o = e.length, o != t.length)
        return !1;
      for (v = o; v-- !== 0; )
        if (!Vw(e[v], t[v]))
          return !1;
      return !0;
    }
    if (r != a)
      return !1;
    var n = Object.keys(e);
    if (o = n.length, o !== Object.keys(t).length)
      return !1;
    for (v = o; v-- !== 0; )
      if (!t.hasOwnProperty(n[v]))
        return !1;
    for (v = o; v-- !== 0; )
      if (s = n[v], !Vw(e[s], t[s]))
        return !1;
    return !0;
  }
  return e !== e && t !== t;
}
const sCe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  JsonPatchError: Eu,
  _areEquals: Vw,
  applyOperation: cv,
  applyPatch: wT,
  applyReducer: oCe,
  deepClone: iCe,
  getValueByPointer: xk,
  validate: qte,
  validator: bk
}, Symbol.toStringTag, { value: "Module" }));
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */
var vz = /* @__PURE__ */ new WeakMap(), lCe = (
  /** @class */
  /* @__PURE__ */ function() {
    function e(t) {
      this.observers = /* @__PURE__ */ new Map(), this.obj = t;
    }
    return e;
  }()
), uCe = (
  /** @class */
  /* @__PURE__ */ function() {
    function e(t, r) {
      this.callback = t, this.observer = r;
    }
    return e;
  }()
);
function cCe(e) {
  return vz.get(e);
}
function fCe(e, t) {
  return e.observers.get(t);
}
function hCe(e, t) {
  e.observers.delete(t.callback);
}
function dCe(e, t) {
  t.unobserve();
}
function pCe(e, t) {
  var r = [], a, v = cCe(e);
  if (!v)
    v = new lCe(e), vz.set(e, v);
  else {
    var o = fCe(v, t);
    a = o && o.observer;
  }
  if (a)
    return a;
  if (a = {}, v.value = Jh(e), t) {
    a.callback = t, a.next = null;
    var s = function() {
      dI(a);
    }, n = function() {
      clearTimeout(a.next), a.next = setTimeout(s);
    };
    typeof window < "u" && (window.addEventListener("mouseup", n), window.addEventListener("keyup", n), window.addEventListener("mousedown", n), window.addEventListener("keydown", n), window.addEventListener("change", n));
  }
  return a.patches = r, a.object = e, a.unobserve = function() {
    dI(a), clearTimeout(a.next), hCe(v, a), typeof window < "u" && (window.removeEventListener("mouseup", n), window.removeEventListener("keyup", n), window.removeEventListener("mousedown", n), window.removeEventListener("keydown", n), window.removeEventListener("change", n));
  }, v.observers.set(t, new uCe(t, a)), a;
}
function dI(e, t) {
  t === void 0 && (t = !1);
  var r = vz.get(e.object);
  xz(r.value, e.object, e.patches, "", t), e.patches.length && wT(r.value, e.patches);
  var a = e.patches;
  return a.length > 0 && (e.patches = [], e.callback && e.callback(a)), a;
}
function xz(e, t, r, a, v) {
  if (t !== e) {
    typeof t.toJSON == "function" && (t = t.toJSON());
    for (var o = cI(t), s = cI(e), n = !1, l = s.length - 1; l >= 0; l--) {
      var u = s[l], i = e[u];
      if (uI(t, u) && !(t[u] === void 0 && i !== void 0 && Array.isArray(t) === !1)) {
        var h = t[u];
        typeof i == "object" && i != null && typeof h == "object" && h != null && Array.isArray(i) === Array.isArray(h) ? xz(i, h, r, a + "/" + jy(u), v) : i !== h && (v && r.push({ op: "test", path: a + "/" + jy(u), value: Jh(i) }), r.push({ op: "replace", path: a + "/" + jy(u), value: Jh(h) }));
      } else Array.isArray(e) === Array.isArray(t) ? (v && r.push({ op: "test", path: a + "/" + jy(u), value: Jh(i) }), r.push({ op: "remove", path: a + "/" + jy(u) }), n = !0) : (v && r.push({ op: "test", path: a, value: e }), r.push({ op: "replace", path: a, value: t }));
    }
    if (!(!n && o.length == s.length))
      for (var l = 0; l < o.length; l++) {
        var u = o[l];
        !uI(e, u) && t[u] !== void 0 && r.push({ op: "add", path: a + "/" + jy(u), value: Jh(t[u]) });
      }
  }
}
function mCe(e, t, r) {
  r === void 0 && (r = !1);
  var a = [];
  return xz(e, t, a, "", r), a;
}
const gCe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  compare: mCe,
  generate: dI,
  observe: pCe,
  unobserve: dCe
}, Symbol.toStringTag, { value: "Module" }));
Object.assign({}, sCe, gCe, {
  JsonPatchError: $te,
  deepClone: Jh,
  escapePathComponent: jy,
  unescapePathComponent: Vte
});
var yCe = /("(?:[^\\"]|\\.)*")|[:,]/g, vCe = function(t, r) {
  var a, v, o;
  return r = r || {}, a = JSON.stringify(
    [1],
    void 0,
    r.indent === void 0 ? 2 : r.indent
  ).slice(2, -3), v = a === "" ? 1 / 0 : r.maxLength === void 0 ? 80 : r.maxLength, o = r.replacer, function s(n, l, u) {
    var i, h, p, _, d, f, c, g, m, x, w, k;
    if (n && typeof n.toJSON == "function" && (n = n.toJSON()), w = JSON.stringify(n, o), w === void 0)
      return w;
    if (c = v - l.length - u, w.length <= c && (m = w.replace(
      yCe,
      function(S, A) {
        return A || S + " ";
      }
    ), m.length <= c))
      return m;
    if (o != null && (n = JSON.parse(w), o = void 0), typeof n == "object" && n !== null) {
      if (g = l + a, p = [], h = 0, Array.isArray(n))
        for (x = "[", i = "]", c = n.length; h < c; h++)
          p.push(
            s(n[h], g, h === c - 1 ? 0 : 1) || "null"
          );
      else
        for (x = "{", i = "}", f = Object.keys(n), c = f.length; h < c; h++)
          _ = f[h], d = JSON.stringify(_) + ": ", k = s(
            n[_],
            g,
            d.length + (h === c - 1 ? 0 : 1)
          ), k !== void 0 && p.push(d + k);
      if (p.length > 0)
        return [x, a + p.join(`,
` + g), i].join(
          `
` + l
        );
    }
    return w;
  }(t, "", 0);
};
const OM = /* @__PURE__ */ cD(vCe);
function xCe(e, t, r) {
  let a;
  t.x2 && (t.x ? (r && e.x > e.x2 && (a = e.x, e.x = e.x2, e.x2 = a), e.width = e.x2 - e.x) : e.x = e.x2 - (e.width || 0)), t.xc && (e.x = e.xc - (e.width || 0) / 2), t.y2 && (t.y ? (r && e.y > e.y2 && (a = e.y, e.y = e.y2, e.y2 = a), e.height = e.y2 - e.y) : e.y = e.y2 - (e.height || 0)), t.yc && (e.y = e.yc - (e.height || 0) / 2);
}
var bCe = {
  NaN: NaN,
  E: Math.E,
  LN2: Math.LN2,
  LN10: Math.LN10,
  LOG2E: Math.LOG2E,
  LOG10E: Math.LOG10E,
  PI: Math.PI,
  SQRT1_2: Math.SQRT1_2,
  SQRT2: Math.SQRT2,
  MIN_VALUE: Number.MIN_VALUE,
  MAX_VALUE: Number.MAX_VALUE
}, _Ce = {
  "*": (e, t) => e * t,
  "+": (e, t) => e + t,
  "-": (e, t) => e - t,
  "/": (e, t) => e / t,
  "%": (e, t) => e % t,
  ">": (e, t) => e > t,
  "<": (e, t) => e < t,
  "<=": (e, t) => e <= t,
  ">=": (e, t) => e >= t,
  "==": (e, t) => e == t,
  "!=": (e, t) => e != t,
  "===": (e, t) => e === t,
  "!==": (e, t) => e !== t,
  "&": (e, t) => e & t,
  "|": (e, t) => e | t,
  "^": (e, t) => e ^ t,
  "<<": (e, t) => e << t,
  ">>": (e, t) => e >> t,
  ">>>": (e, t) => e >>> t
}, wCe = {
  "+": (e) => +e,
  "-": (e) => -e,
  "~": (e) => ~e,
  "!": (e) => !e
};
const kCe = Array.prototype.slice, My = (e, t, r) => {
  const a = r ? r(t[0]) : t[0];
  return a[e].apply(a, kCe.call(t, 1));
}, TCe = (e, t, r, a, v, o, s) => new Date(e, t || 0, r ?? 1, a || 0, v || 0, o || 0, s || 0);
var ACe = {
  // math functions
  isNaN: Number.isNaN,
  isFinite: Number.isFinite,
  abs: Math.abs,
  acos: Math.acos,
  asin: Math.asin,
  atan: Math.atan,
  atan2: Math.atan2,
  ceil: Math.ceil,
  cos: Math.cos,
  exp: Math.exp,
  floor: Math.floor,
  log: Math.log,
  max: Math.max,
  min: Math.min,
  pow: Math.pow,
  random: Math.random,
  round: Math.round,
  sin: Math.sin,
  sqrt: Math.sqrt,
  tan: Math.tan,
  clamp: (e, t, r) => Math.max(t, Math.min(r, e)),
  // date functions
  now: Date.now,
  utc: Date.UTC,
  datetime: TCe,
  date: (e) => new Date(e).getDate(),
  day: (e) => new Date(e).getDay(),
  year: (e) => new Date(e).getFullYear(),
  month: (e) => new Date(e).getMonth(),
  hours: (e) => new Date(e).getHours(),
  minutes: (e) => new Date(e).getMinutes(),
  seconds: (e) => new Date(e).getSeconds(),
  milliseconds: (e) => new Date(e).getMilliseconds(),
  time: (e) => new Date(e).getTime(),
  timezoneoffset: (e) => new Date(e).getTimezoneOffset(),
  utcdate: (e) => new Date(e).getUTCDate(),
  utcday: (e) => new Date(e).getUTCDay(),
  utcyear: (e) => new Date(e).getUTCFullYear(),
  utcmonth: (e) => new Date(e).getUTCMonth(),
  utchours: (e) => new Date(e).getUTCHours(),
  utcminutes: (e) => new Date(e).getUTCMinutes(),
  utcseconds: (e) => new Date(e).getUTCSeconds(),
  utcmilliseconds: (e) => new Date(e).getUTCMilliseconds(),
  // sequence functions
  length: (e) => e.length,
  join: function() {
    return My("join", arguments);
  },
  indexof: function() {
    return My("indexOf", arguments);
  },
  lastindexof: function() {
    return My("lastIndexOf", arguments);
  },
  slice: function() {
    return My("slice", arguments);
  },
  reverse: (e) => e.slice().reverse(),
  // string functions
  parseFloat,
  parseInt,
  upper: (e) => String(e).toUpperCase(),
  lower: (e) => String(e).toLowerCase(),
  substring: function() {
    return My("substring", arguments, String);
  },
  split: function() {
    return My("split", arguments, String);
  },
  replace: function() {
    return My("replace", arguments, String);
  },
  trim: (e) => String(e).trim(),
  // regexp functions
  regexp: RegExp,
  test: (e, t) => RegExp(e).test(t)
};
const SCe = ["view", "item", "group", "xy", "x", "y"], pI = /* @__PURE__ */ new Set([Function, eval, setTimeout, setInterval]);
typeof setImmediate == "function" && pI.add(setImmediate);
const MCe = {
  Literal: (e, t) => t.value,
  Identifier: (e, t) => {
    const r = t.name;
    return e.memberDepth > 0 ? r : r === "datum" ? e.datum : r === "event" ? e.event : r === "item" ? e.item : bCe[r] || e.params["$" + r];
  },
  MemberExpression: (e, t) => {
    const r = !t.computed, a = e(t.object);
    r && (e.memberDepth += 1);
    const v = e(t.property);
    if (r && (e.memberDepth -= 1), pI.has(a[v])) {
      console.error(`Prevented interpretation of member "${v}" which could lead to insecure code execution`);
      return;
    }
    return a[v];
  },
  CallExpression: (e, t) => {
    const r = t.arguments;
    let a = t.callee.name;
    return a.startsWith("_") && (a = a.slice(1)), a === "if" ? e(r[0]) ? e(r[1]) : e(r[2]) : (e.fn[a] || ACe[a]).apply(e.fn, r.map(e));
  },
  ArrayExpression: (e, t) => t.elements.map(e),
  BinaryExpression: (e, t) => _Ce[t.operator](e(t.left), e(t.right)),
  UnaryExpression: (e, t) => wCe[t.operator](e(t.argument)),
  ConditionalExpression: (e, t) => e(t.test) ? e(t.consequent) : e(t.alternate),
  LogicalExpression: (e, t) => t.operator === "&&" ? e(t.left) && e(t.right) : e(t.left) || e(t.right),
  ObjectExpression: (e, t) => t.properties.reduce((r, a) => {
    e.memberDepth += 1;
    const v = e(a.key);
    return e.memberDepth -= 1, pI.has(e(a.value)) ? console.error(`Prevented interpretation of property "${v}" which could lead to insecure code execution`) : r[v] = e(a.value), r;
  }, {})
};
function a3(e, t, r, a, v, o) {
  const s = (n) => MCe[n.type](s, n);
  return s.memberDepth = 0, s.fn = Object.create(t), s.params = r, s.datum = a, s.event = v, s.item = o, SCe.forEach((n) => s.fn[n] = function() {
    return v.vega[n](...arguments);
  }), s(e);
}
var ECe = {
  /**
   * Parse an expression used to update an operator value.
   */
  operator(e, t) {
    const r = t.ast, a = e.functions;
    return (v) => a3(r, a, v);
  },
  /**
   * Parse an expression provided as an operator parameter value.
   */
  parameter(e, t) {
    const r = t.ast, a = e.functions;
    return (v, o) => a3(r, a, o, v);
  },
  /**
   * Parse an expression applied to an event stream.
   */
  event(e, t) {
    const r = t.ast, a = e.functions;
    return (v) => a3(r, a, void 0, void 0, v);
  },
  /**
   * Parse an expression used to handle an event-driven operator update.
   */
  handler(e, t) {
    const r = t.ast, a = e.functions;
    return (v, o) => {
      const s = o.item && o.item.datum;
      return a3(r, a, v, s, o);
    };
  },
  /**
   * Parse an expression that performs visual encoding.
   */
  encode(e, t) {
    const {
      marktype: r,
      channels: a
    } = t, v = e.functions, o = r === "group" || r === "image" || r === "rect";
    return (s, n) => {
      const l = s.datum;
      let u = 0, i;
      for (const h in a)
        i = a3(a[h].ast, v, n, l, void 0, s), s[h] !== i && (s[h] = i, u = 1);
      return r !== "rule" && xCe(s, a, o), u;
    };
  }
};
const CCe = "vega-lite", ICe = 'Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer', DCe = "5.19.0", LCe = [
  "Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)",
  "Dominik Moritz (https://www.domoritz.de)",
  "Arvind Satyanarayan (https://arvindsatya.com)",
  "Jeffrey Heer (https://jheer.org)"
], PCe = "https://vega.github.io/vega-lite/", OCe = "Vega-Lite is a concise high-level language for interactive visualization.", zCe = [
  "vega",
  "chart",
  "visualization"
], RCe = "build/vega-lite.js", FCe = "build/vega-lite.min.js", NCe = "build/vega-lite.min.js", BCe = "build/src/index", jCe = "build/src/index.d.ts", UCe = {
  vl2pdf: "./bin/vl2pdf",
  vl2png: "./bin/vl2png",
  vl2svg: "./bin/vl2svg",
  vl2vg: "./bin/vl2vg"
}, VCe = [
  "bin",
  "build",
  "src",
  "vega-lite*",
  "tsconfig.json"
], $Ce = {
  changelog: "conventional-changelog -p angular -r 2",
  prebuild: "yarn clean:build",
  build: "yarn build:only",
  "build:only": "tsc -p tsconfig.build.json && rollup -c",
  "prebuild:examples": "yarn build:only",
  "build:examples": "yarn data && TZ=America/Los_Angeles scripts/build-examples.sh",
  "prebuild:examples-full": "yarn build:only",
  "build:examples-full": "TZ=America/Los_Angeles scripts/build-examples.sh 1",
  "build:example": "TZ=America/Los_Angeles scripts/build-example.sh",
  "build:toc": "yarn build:jekyll && scripts/generate-toc",
  "build:site": "rollup -c site/rollup.config.mjs",
  "build:jekyll": "pushd site && bundle exec jekyll build -q && popd",
  "build:versions": "scripts/update-version.sh",
  clean: "yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete",
  "clean:build": "del-cli 'build/*' !build/vega-lite-schema.json",
  data: "rsync -r node_modules/vega-datasets/data/* site/data",
  "build-editor-preview": "scripts/build-editor-preview.sh",
  schema: "mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",
  renameschema: "scripts/rename-schema.sh",
  presite: "yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",
  site: "yarn site:only",
  "site:only": "pushd site && bundle exec jekyll serve -I -l && popd",
  prettierbase: "prettier '**/*.{md,css,yml}'",
  format: "eslint . --fix && yarn prettierbase --write",
  lint: "eslint . && yarn prettierbase --check",
  test: "yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime",
  "test:cover": "yarn jest --collectCoverage test/",
  "test:inspect": "node --inspect-brk ./node_modules/.bin/jest --runInBand test",
  "test:runtime": "TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json",
  "test:runtime:generate": "yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",
  watch: "tsc -p tsconfig.build.json -w",
  "watch:site": "yarn build:site -w",
  "watch:test": "yarn jest --watch test/",
  "watch:test:runtime": "TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",
  release: "release-it"
}, qCe = {
  type: "git",
  url: "https://github.com/vega/vega-lite.git"
}, HCe = "BSD-3-Clause", GCe = {
  url: "https://github.com/vega/vega-lite/issues"
}, WCe = {
  "@babel/core": "^7.24.7",
  "@babel/preset-env": "^7.24.7",
  "@babel/preset-typescript": "^7.24.7",
  "@release-it/conventional-changelog": "^8.0.1",
  "@rollup/plugin-alias": "^5.1.0",
  "@rollup/plugin-babel": "^6.0.4",
  "@rollup/plugin-commonjs": "^25.0.7",
  "@rollup/plugin-json": "^6.1.0",
  "@rollup/plugin-node-resolve": "^15.2.3",
  "@rollup/plugin-terser": "^0.4.4",
  "@types/d3": "^7.4.3",
  "@types/jest": "^29.5.12",
  "@types/pako": "^2.0.3",
  "@typescript-eslint/eslint-plugin": "^7.13.0",
  "@typescript-eslint/parser": "^7.13.0",
  ajv: "^8.16.0",
  "ajv-formats": "^2.1.1",
  cheerio: "^1.0.0-rc.12",
  "conventional-changelog-cli": "^4.1.0",
  d3: "^7.9.0",
  "del-cli": "^5.1.0",
  eslint: "^8.57.0",
  "eslint-config-prettier": "^9.1.0",
  "eslint-plugin-jest": "^27.9.0",
  "eslint-plugin-prettier": "^5.1.3",
  "fast-json-stable-stringify": "~2.1.0",
  "highlight.js": "^11.9.0",
  jest: "^29.7.0",
  "jest-dev-server": "^10.0.0",
  mkdirp: "^3.0.1",
  pako: "^2.1.0",
  prettier: "^3.3.2",
  puppeteer: "^15.0.0",
  "release-it": "17.2.1",
  rollup: "^4.18.0",
  "rollup-plugin-bundle-size": "^1.0.3",
  serve: "^14.2.3",
  terser: "^5.31.1",
  "ts-jest": "^29.1.4",
  "ts-json-schema-generator": "^1.5.0",
  typescript: "~5.4.5",
  "vega-cli": "^5.28.0",
  "vega-datasets": "^2.8.1",
  "vega-embed": "^6.25.0",
  "vega-tooltip": "^0.34.0",
  "yaml-front-matter": "^4.1.1"
}, YCe = {
  "json-stringify-pretty-compact": "~3.0.0",
  tslib: "~2.6.3",
  "vega-event-selector": "~3.0.1",
  "vega-expression": "~5.1.0",
  "vega-util": "~1.17.2",
  yargs: "~17.7.2"
}, ZCe = {
  vega: "^5.24.0"
}, XCe = {
  node: ">=18"
}, KCe = "yarn@1.22.19", JCe = {
  name: CCe,
  author: ICe,
  version: DCe,
  collaborators: LCe,
  homepage: PCe,
  description: OCe,
  keywords: zCe,
  main: RCe,
  unpkg: FCe,
  jsdelivr: NCe,
  module: BCe,
  types: jCe,
  bin: UCe,
  files: VCe,
  scripts: $Ce,
  repository: qCe,
  license: HCe,
  bugs: GCe,
  devDependencies: WCe,
  dependencies: YCe,
  peerDependencies: ZCe,
  engines: XCe,
  packageManager: KCe
};
function bz(e) {
  return !!e.or;
}
function _z(e) {
  return !!e.and;
}
function wz(e) {
  return !!e.not;
}
function R8(e, t) {
  if (wz(e))
    R8(e.not, t);
  else if (_z(e))
    for (const r of e.and)
      R8(r, t);
  else if (bz(e))
    for (const r of e.or)
      R8(r, t);
  else
    t(e);
}
function _x(e, t) {
  return wz(e) ? { not: _x(e.not, t) } : _z(e) ? { and: e.and.map((r) => _x(r, t)) } : bz(e) ? { or: e.or.map((r) => _x(r, t)) } : t(e);
}
const ka = structuredClone;
function Hte(e) {
  throw new Error(e);
}
function Xx(e, t) {
  const r = {};
  for (const a of t)
    ua(e, a) && (r[a] = e[a]);
  return r;
}
function Ih(e, t) {
  const r = { ...e };
  for (const a of t)
    delete r[a];
  return r;
}
Set.prototype.toJSON = function() {
  return `Set(${[...this].map((e) => Fs(e)).join(",")})`;
};
function lo(e) {
  if (Ro(e))
    return e;
  const t = Fi(e) ? e : Fs(e);
  if (t.length < 250)
    return t;
  let r = 0;
  for (let a = 0; a < t.length; a++) {
    const v = t.charCodeAt(a);
    r = (r << 5) - r + v, r = r & r;
  }
  return r;
}
function mI(e) {
  return e === !1 || e === null;
}
function ro(e, t) {
  return e.includes(t);
}
function Kx(e, t) {
  let r = 0;
  for (const [a, v] of e.entries())
    if (t(v, a, r++))
      return !0;
  return !1;
}
function kz(e, t) {
  let r = 0;
  for (const [a, v] of e.entries())
    if (!t(v, a, r++))
      return !1;
  return !0;
}
function Gte(e, ...t) {
  for (const r of t)
    QCe(e, r ?? {});
  return e;
}
function QCe(e, t) {
  for (const r of ui(t))
    bb(e, r, t[r], !0);
}
function d0(e, t) {
  const r = [], a = {};
  let v;
  for (const o of e)
    v = t(o), !(v in a) && (a[v] = 1, r.push(o));
  return r;
}
function eIe(e, t) {
  const r = ui(e), a = ui(t);
  if (r.length !== a.length)
    return !1;
  for (const v of r)
    if (e[v] !== t[v])
      return !1;
  return !0;
}
function Wte(e, t) {
  if (e.size !== t.size)
    return !1;
  for (const r of e)
    if (!t.has(r))
      return !1;
  return !0;
}
function Tz(e, t) {
  for (const r of e)
    if (t.has(r))
      return !0;
  return !1;
}
function gI(e) {
  const t = /* @__PURE__ */ new Set();
  for (const r of e) {
    const v = B0(r).map((s, n) => n === 0 ? s : `[${s}]`), o = v.map((s, n) => v.slice(0, n + 1).join(""));
    for (const s of o)
      t.add(s);
  }
  return t;
}
function Az(e, t) {
  return e === void 0 || t === void 0 ? !0 : Tz(gI(e), gI(t));
}
function Rs(e) {
  return ui(e).length === 0;
}
const ui = Object.keys, ff = Object.values, Eg = Object.entries;
function $w(e) {
  return e === !0 || e === !1;
}
function Gl(e) {
  const t = e.replace(/\W/g, "_");
  return (e.match(/^\d+/) ? "_" : "") + t;
}
function tw(e, t) {
  return wz(e) ? `!(${tw(e.not, t)})` : _z(e) ? `(${e.and.map((r) => tw(r, t)).join(") && (")})` : bz(e) ? `(${e.or.map((r) => tw(r, t)).join(") || (")})` : t(e);
}
function _k(e, t) {
  if (t.length === 0)
    return !0;
  const r = t.shift();
  return r in e && _k(e[r], t) && delete e[r], Rs(e);
}
function F4(e) {
  return e.charAt(0).toUpperCase() + e.substr(1);
}
function Sz(e, t = "datum") {
  const r = B0(e), a = [];
  for (let v = 1; v <= r.length; v++) {
    const o = `[${r.slice(0, v).map(vi).join("][")}]`;
    a.push(`${t}${o}`);
  }
  return a.join(" && ");
}
function Yte(e, t = "datum") {
  return `${t}[${vi(B0(e).join("."))}]`;
}
function tIe(e) {
  return e.replace(/(\[|\]|\.|'|")/g, "\\$1");
}
function Rd(e) {
  return `${B0(e).map(tIe).join("\\.")}`;
}
function Dv(e, t, r) {
  return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "g"), r);
}
function zb(e) {
  return `${B0(e).join(".")}`;
}
function Jx(e) {
  return e ? B0(e).length : 0;
}
function Wu(...e) {
  for (const t of e)
    if (t !== void 0)
      return t;
}
let Zte = 42;
function Xte(e) {
  const t = ++Zte;
  return e ? String(e) + t : t;
}
function nIe() {
  Zte = 42;
}
function Kte(e) {
  return Jte(e) ? e : `__${e}`;
}
function Jte(e) {
  return e.startsWith("__");
}
function qw(e) {
  if (e !== void 0)
    return (e % 360 + 360) % 360;
}
function kT(e) {
  return Ro(e) ? !0 : !isNaN(e) && !isNaN(parseFloat(e));
}
const qV = Object.getPrototypeOf(structuredClone({}));
function Qh(e, t) {
  if (e === t)
    return !0;
  if (e && t && typeof e == "object" && typeof t == "object") {
    if (e.constructor.name !== t.constructor.name)
      return !1;
    let r, a;
    if (Array.isArray(e)) {
      if (r = e.length, r != t.length)
        return !1;
      for (a = r; a-- !== 0; )
        if (!Qh(e[a], t[a]))
          return !1;
      return !0;
    }
    if (e instanceof Map && t instanceof Map) {
      if (e.size !== t.size)
        return !1;
      for (a of e.entries())
        if (!t.has(a[0]))
          return !1;
      for (a of e.entries())
        if (!Qh(a[1], t.get(a[0])))
          return !1;
      return !0;
    }
    if (e instanceof Set && t instanceof Set) {
      if (e.size !== t.size)
        return !1;
      for (a of e.entries())
        if (!t.has(a[0]))
          return !1;
      return !0;
    }
    if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
      if (r = e.length, r != t.length)
        return !1;
      for (a = r; a-- !== 0; )
        if (e[a] !== t[a])
          return !1;
      return !0;
    }
    if (e.constructor === RegExp)
      return e.source === t.source && e.flags === t.flags;
    if (e.valueOf !== Object.prototype.valueOf && e.valueOf !== qV.valueOf)
      return e.valueOf() === t.valueOf();
    if (e.toString !== Object.prototype.toString && e.toString !== qV.toString)
      return e.toString() === t.toString();
    const v = Object.keys(e);
    if (r = v.length, r !== Object.keys(t).length)
      return !1;
    for (a = r; a-- !== 0; )
      if (!Object.prototype.hasOwnProperty.call(t, v[a]))
        return !1;
    for (a = r; a-- !== 0; ) {
      const o = v[a];
      if (!Qh(e[o], t[o]))
        return !1;
    }
    return !0;
  }
  return e !== e && t !== t;
}
function Fs(e) {
  const t = [];
  return function r(a) {
    if (a && a.toJSON && typeof a.toJSON == "function" && (a = a.toJSON()), a === void 0)
      return;
    if (typeof a == "number")
      return isFinite(a) ? "" + a : "null";
    if (typeof a != "object")
      return JSON.stringify(a);
    let v, o;
    if (Array.isArray(a)) {
      for (o = "[", v = 0; v < a.length; v++)
        v && (o += ","), o += r(a[v]) || "null";
      return o + "]";
    }
    if (a === null)
      return "null";
    if (t.includes(a))
      throw new TypeError("Converting circular structure to JSON");
    const s = t.push(a) - 1, n = Object.keys(a).sort();
    for (o = "", v = 0; v < n.length; v++) {
      const l = n[v], u = r(a[l]);
      u && (o && (o += ","), o += JSON.stringify(l) + ":" + u);
    }
    return t.splice(s, 1), `{${o}}`;
  }(e);
}
const Rm = "row", Fm = "column", TT = "facet", Yl = "x", Qc = "y", Ip = "x2", G0 = "y2", $g = "xOffset", Rb = "yOffset", Dp = "radius", Jm = "radius2", Bd = "theta", Qm = "theta2", Lp = "latitude", Pp = "longitude", Op = "latitude2", Fd = "longitude2", Rh = "color", W0 = "fill", Y0 = "stroke", Fh = "shape", e1 = "size", Kv = "angle", t1 = "opacity", qg = "fillOpacity", Hg = "strokeOpacity", Gg = "strokeWidth", Wg = "strokeDash", N4 = "text", Qx = "order", B4 = "detail", AT = "key", Lv = "tooltip", ST = "href", MT = "url", ET = "description", rIe = {
  x: 1,
  y: 1,
  x2: 1,
  y2: 1
}, Qte = {
  theta: 1,
  theta2: 1,
  radius: 1,
  radius2: 1
};
function ene(e) {
  return e in Qte;
}
const Mz = {
  longitude: 1,
  longitude2: 1,
  latitude: 1,
  latitude2: 1
};
function tne(e) {
  switch (e) {
    case Lp:
      return "y";
    case Op:
      return "y2";
    case Pp:
      return "x";
    case Fd:
      return "x2";
  }
}
function nne(e) {
  return e in Mz;
}
const iIe = ui(Mz), Ez = {
  ...rIe,
  ...Qte,
  ...Mz,
  xOffset: 1,
  yOffset: 1,
  // color
  color: 1,
  fill: 1,
  stroke: 1,
  // other non-position with scale
  opacity: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  strokeWidth: 1,
  strokeDash: 1,
  size: 1,
  angle: 1,
  shape: 1,
  // channels without scales
  order: 1,
  text: 1,
  detail: 1,
  key: 1,
  tooltip: 1,
  href: 1,
  url: 1,
  description: 1
};
function wx(e) {
  return e === Rh || e === W0 || e === Y0;
}
const rne = {
  row: 1,
  column: 1,
  facet: 1
}, Sd = ui(rne), Cz = {
  ...Ez,
  ...rne
}, aIe = ui(Cz), { order: cUe, detail: fUe, tooltip: hUe, ...oIe } = Cz, { row: dUe, column: pUe, facet: mUe, ...sIe } = oIe;
function lIe(e) {
  return !!sIe[e];
}
function ine(e) {
  return !!Cz[e];
}
const uIe = [Ip, G0, Op, Fd, Qm, Jm];
function ane(e) {
  return Jv(e) !== e;
}
function Jv(e) {
  switch (e) {
    case Ip:
      return Yl;
    case G0:
      return Qc;
    case Op:
      return Lp;
    case Fd:
      return Pp;
    case Qm:
      return Bd;
    case Jm:
      return Dp;
  }
  return e;
}
function Cg(e) {
  if (ene(e))
    switch (e) {
      case Bd:
        return "startAngle";
      case Qm:
        return "endAngle";
      case Dp:
        return "outerRadius";
      case Jm:
        return "innerRadius";
    }
  return e;
}
function Z0(e) {
  switch (e) {
    case Yl:
      return Ip;
    case Qc:
      return G0;
    case Lp:
      return Op;
    case Pp:
      return Fd;
    case Bd:
      return Qm;
    case Dp:
      return Jm;
  }
}
function Nh(e) {
  switch (e) {
    case Yl:
    case Ip:
      return "width";
    case Qc:
    case G0:
      return "height";
  }
}
function one(e) {
  switch (e) {
    case Yl:
      return "xOffset";
    case Qc:
      return "yOffset";
    case Ip:
      return "x2Offset";
    case G0:
      return "y2Offset";
    case Bd:
      return "thetaOffset";
    case Dp:
      return "radiusOffset";
    case Qm:
      return "theta2Offset";
    case Jm:
      return "radius2Offset";
  }
}
function Iz(e) {
  switch (e) {
    case Yl:
      return "xOffset";
    case Qc:
      return "yOffset";
  }
}
function cIe(e) {
  switch (e) {
    case "xOffset":
      return "x";
    case "yOffset":
      return "y";
  }
}
const fIe = ui(Ez), {
  x: gUe,
  y: yUe,
  // x2 and y2 share the same scale as x and y
  x2: vUe,
  y2: xUe,
  //
  xOffset: bUe,
  yOffset: _Ue,
  latitude: wUe,
  longitude: kUe,
  latitude2: TUe,
  longitude2: AUe,
  theta: SUe,
  theta2: MUe,
  radius: EUe,
  radius2: CUe,
  // The rest of unit channels then have scale
  ...Dz
} = Ez, hIe = ui(Dz), Lz = {
  x: 1,
  y: 1
}, n1 = ui(Lz);
function Yu(e) {
  return e in Lz;
}
const Pz = {
  theta: 1,
  radius: 1
}, dIe = ui(Pz);
function CT(e) {
  return e === "width" ? Yl : Qc;
}
const sne = { xOffset: 1, yOffset: 1 };
function j4(e) {
  return e in sne;
}
const {
  // x2 and y2 share the same scale as x and y
  // text and tooltip have format instead of scale,
  // href has neither format, nor scale
  text: IUe,
  tooltip: DUe,
  href: LUe,
  url: PUe,
  description: OUe,
  // detail and order have no scale
  detail: zUe,
  key: RUe,
  order: FUe,
  ...lne
} = Dz, pIe = ui(lne);
function mIe(e) {
  return !!Dz[e];
}
function gIe(e) {
  switch (e) {
    case Rh:
    case W0:
    case Y0:
    case e1:
    case Fh:
    case t1:
    case Gg:
    case Wg:
      return !0;
    case qg:
    case Hg:
    case Kv:
      return !1;
  }
}
const une = {
  ...Lz,
  ...Pz,
  ...sne,
  ...lne
}, Oz = ui(une);
function X0(e) {
  return !!une[e];
}
function yIe(e, t) {
  return xIe(e)[t];
}
const cne = {
  // all marks
  arc: "always",
  area: "always",
  bar: "always",
  circle: "always",
  geoshape: "always",
  image: "always",
  line: "always",
  rule: "always",
  point: "always",
  rect: "always",
  square: "always",
  trail: "always",
  text: "always",
  tick: "always"
}, { geoshape: NUe, ...vIe } = cne;
function xIe(e) {
  switch (e) {
    case Rh:
    case W0:
    case Y0:
    case ET:
    case B4:
    case AT:
    case Lv:
    case ST:
    case Qx:
    case t1:
    case qg:
    case Hg:
    case Gg:
    case TT:
    case Rm:
    case Fm:
      return cne;
    case Yl:
    case Qc:
    case $g:
    case Rb:
    case Lp:
    case Pp:
      return vIe;
    case Ip:
    case G0:
    case Op:
    case Fd:
      return {
        area: "always",
        bar: "always",
        image: "always",
        rect: "always",
        rule: "always",
        circle: "binned",
        point: "binned",
        square: "binned",
        tick: "binned",
        line: "binned",
        trail: "binned"
      };
    case e1:
      return {
        point: "always",
        tick: "always",
        rule: "always",
        circle: "always",
        square: "always",
        bar: "always",
        text: "always",
        line: "always",
        trail: "always"
      };
    case Wg:
      return {
        line: "always",
        point: "always",
        tick: "always",
        rule: "always",
        circle: "always",
        square: "always",
        bar: "always",
        geoshape: "always"
      };
    case Fh:
      return { point: "always", geoshape: "always" };
    case N4:
      return { text: "always" };
    case Kv:
      return { point: "always", square: "always", text: "always" };
    case MT:
      return { image: "always" };
    case Bd:
      return { text: "always", arc: "always" };
    case Dp:
      return { text: "always", arc: "always" };
    case Qm:
    case Jm:
      return { arc: "always" };
  }
}
function zM(e) {
  switch (e) {
    case Yl:
    case Qc:
    case Bd:
    case Dp:
    case $g:
    case Rb:
    case e1:
    case Kv:
    case Gg:
    case t1:
    case qg:
    case Hg:
    case Ip:
    case G0:
    case Qm:
    case Jm:
      return;
    case TT:
    case Rm:
    case Fm:
    case Fh:
    case Wg:
    case N4:
    case Lv:
    case ST:
    case MT:
    case ET:
      return "discrete";
    case Rh:
    case W0:
    case Y0:
      return "flexible";
    case Lp:
    case Pp:
    case Op:
    case Fd:
    case B4:
    case AT:
    case Qx:
      return;
  }
}
const bIe = {
  argmax: 1,
  argmin: 1,
  average: 1,
  count: 1,
  distinct: 1,
  exponential: 1,
  exponentialb: 1,
  product: 1,
  max: 1,
  mean: 1,
  median: 1,
  min: 1,
  missing: 1,
  q1: 1,
  q3: 1,
  ci0: 1,
  ci1: 1,
  stderr: 1,
  stdev: 1,
  stdevp: 1,
  sum: 1,
  valid: 1,
  values: 1,
  variance: 1,
  variancep: 1
}, _Ie = {
  count: 1,
  min: 1,
  max: 1
};
function Hm(e) {
  return !!e && !!e.argmin;
}
function Yg(e) {
  return !!e && !!e.argmax;
}
function zz(e) {
  return Fi(e) && !!bIe[e];
}
const wIe = /* @__PURE__ */ new Set([
  "count",
  "valid",
  "missing",
  "distinct"
]);
function IT(e) {
  return Fi(e) && wIe.has(e);
}
function kIe(e) {
  return Fi(e) && ro(["min", "max"], e);
}
const TIe = /* @__PURE__ */ new Set([
  "count",
  "sum",
  "distinct",
  "valid",
  "missing"
]), AIe = /* @__PURE__ */ new Set([
  "mean",
  "average",
  "median",
  "q1",
  "q3",
  "min",
  "max"
]);
function fne(e) {
  return Rg(e) && (e = $T(e, void 0)), "bin" + ui(e).map((t) => DT(e[t]) ? Gl(`_${t}_${Eg(e[t])}`) : Gl(`_${t}_${e[t]}`)).join("");
}
function hl(e) {
  return e === !0 || Qv(e) && !e.binned;
}
function af(e) {
  return e === "binned" || Qv(e) && e.binned === !0;
}
function Qv(e) {
  return Oi(e);
}
function DT(e) {
  return e == null ? void 0 : e.param;
}
function HV(e) {
  switch (e) {
    case Rm:
    case Fm:
    case e1:
    case Rh:
    case W0:
    case Y0:
    case Gg:
    case t1:
    case qg:
    case Hg:
    case Fh:
      return 6;
    case Wg:
      return 4;
    default:
      return 10;
  }
}
function U4(e) {
  return !!(e != null && e.expr);
}
function If(e, { level: t } = { level: 0 }) {
  const r = ui(e || {}), a = {};
  for (const v of r)
    a[v] = t === 0 ? Zh(e[v]) : If(e[v], { level: t - 1 });
  return a;
}
function hne(e) {
  const {
    // These are non-mark title config that need to be hardcoded
    anchor: t,
    frame: r,
    offset: a,
    orient: v,
    angle: o,
    limit: s,
    // color needs to be redirect to fill
    color: n,
    // subtitle properties
    subtitleColor: l,
    subtitleFont: u,
    subtitleFontSize: i,
    subtitleFontStyle: h,
    subtitleFontWeight: p,
    subtitleLineHeight: _,
    subtitlePadding: d,
    // The rest are mark config.
    ...f
  } = e, c = {
    ...f,
    ...n ? { fill: n } : {}
  }, g = {
    ...t ? { anchor: t } : {},
    ...r ? { frame: r } : {},
    ...a ? { offset: a } : {},
    ...v ? { orient: v } : {},
    ...o !== void 0 ? { angle: o } : {},
    ...s !== void 0 ? { limit: s } : {}
  }, m = {
    ...l ? { subtitleColor: l } : {},
    ...u ? { subtitleFont: u } : {},
    ...i ? { subtitleFontSize: i } : {},
    ...h ? { subtitleFontStyle: h } : {},
    ...p ? { subtitleFontWeight: p } : {},
    ..._ ? { subtitleLineHeight: _ } : {},
    ...d ? { subtitlePadding: d } : {}
  }, x = Xx(e, ["align", "baseline", "dx", "dy", "limit"]);
  return { titleMarkConfig: c, subtitleMarkConfig: x, nonMarkTitleProperties: g, subtitle: m };
}
function $1(e) {
  return Fi(e) || Qr(e) && Fi(e[0]);
}
function Ji(e) {
  return !!(e != null && e.signal);
}
function Zg(e) {
  return !!e.step;
}
function SIe(e) {
  return Qr(e) ? !1 : "fields" in e && !("data" in e);
}
function MIe(e) {
  return Qr(e) ? !1 : "fields" in e && "data" in e;
}
function Im(e) {
  return Qr(e) ? !1 : "field" in e && "data" in e;
}
const EIe = {
  aria: 1,
  description: 1,
  ariaRole: 1,
  ariaRoleDescription: 1,
  blend: 1,
  opacity: 1,
  fill: 1,
  fillOpacity: 1,
  stroke: 1,
  strokeCap: 1,
  strokeWidth: 1,
  strokeOpacity: 1,
  strokeDash: 1,
  strokeDashOffset: 1,
  strokeJoin: 1,
  strokeOffset: 1,
  strokeMiterLimit: 1,
  startAngle: 1,
  endAngle: 1,
  padAngle: 1,
  innerRadius: 1,
  outerRadius: 1,
  size: 1,
  shape: 1,
  interpolate: 1,
  tension: 1,
  orient: 1,
  align: 1,
  baseline: 1,
  text: 1,
  dir: 1,
  dx: 1,
  dy: 1,
  ellipsis: 1,
  limit: 1,
  radius: 1,
  theta: 1,
  angle: 1,
  font: 1,
  fontSize: 1,
  fontWeight: 1,
  fontStyle: 1,
  lineBreak: 1,
  lineHeight: 1,
  cursor: 1,
  href: 1,
  tooltip: 1,
  cornerRadius: 1,
  cornerRadiusTopLeft: 1,
  cornerRadiusTopRight: 1,
  cornerRadiusBottomLeft: 1,
  cornerRadiusBottomRight: 1,
  aspect: 1,
  width: 1,
  height: 1,
  url: 1,
  smooth: 1
  // commented below are vg channel that do not have mark config.
  // x: 1,
  // y: 1,
  // x2: 1,
  // y2: 1,
  // xc'|'yc'
  // clip: 1,
  // path: 1,
  // url: 1,
}, CIe = ui(EIe), IIe = {
  arc: 1,
  area: 1,
  group: 1,
  image: 1,
  line: 1,
  path: 1,
  rect: 1,
  rule: 1,
  shape: 1,
  symbol: 1,
  text: 1,
  trail: 1
}, yI = [
  "cornerRadius",
  "cornerRadiusTopLeft",
  "cornerRadiusTopRight",
  "cornerRadiusBottomLeft",
  "cornerRadiusBottomRight"
];
function dne(e) {
  const t = Qr(e.condition) ? e.condition.map(GV) : GV(e.condition);
  return {
    ...Zh(e),
    condition: t
  };
}
function Zh(e) {
  if (U4(e)) {
    const { expr: t, ...r } = e;
    return { signal: t, ...r };
  }
  return e;
}
function GV(e) {
  if (U4(e)) {
    const { expr: t, ...r } = e;
    return { signal: t, ...r };
  }
  return e;
}
function Al(e) {
  if (U4(e)) {
    const { expr: t, ...r } = e;
    return { signal: t, ...r };
  }
  return Ji(e) ? e : e !== void 0 ? { value: e } : void 0;
}
function DIe(e) {
  return Ji(e) ? e.signal : vi(e);
}
function WV(e) {
  return Ji(e) ? e.signal : vi(e.value);
}
function up(e) {
  return Ji(e) ? e.signal : e == null ? null : vi(e);
}
function LIe(e, t, r) {
  for (const a of r) {
    const v = P0(a, t.markDef, t.config);
    v !== void 0 && (e[a] = Al(v));
  }
  return e;
}
function pne(e) {
  return [].concat(e.type, e.style ?? []);
}
function Cs(e, t, r, a = {}) {
  const { vgChannel: v, ignoreVgConfig: o } = a;
  return v && t[v] !== void 0 ? t[v] : t[e] !== void 0 ? t[e] : o && (!v || v === e) ? void 0 : P0(e, t, r, a);
}
function P0(e, t, r, { vgChannel: a } = {}) {
  return Wu(
    // style config has highest precedence
    a ? wk(e, t, r.style) : void 0,
    wk(e, t, r.style),
    // then mark-specific config
    a ? r[t.type][a] : void 0,
    r[t.type][e],
    // Need to cast because MarkDef doesn't perfectly match with AnyMarkConfig, but if the type isn't available, we'll get nothing here, which is fine
    // If there is vgChannel, skip vl channel.
    // For example, vl size for text is vg fontSize, but config.mark.size is only for point size.
    a ? r.mark[a] : r.mark[e]
    // Need to cast for the same reason as above
  );
}
function wk(e, t, r) {
  return mne(e, pne(t), r);
}
function mne(e, t, r) {
  t = Ri(t);
  let a;
  for (const v of t) {
    const o = r[v];
    o && o[e] !== void 0 && (a = o[e]);
  }
  return a;
}
function gne(e, t) {
  return Ri(e).reduce((r, a) => (r.field.push(Mi(a, t)), r.order.push(a.sort ?? "ascending"), r), { field: [], order: [] });
}
function yne(e, t) {
  const r = [...e];
  return t.forEach((a) => {
    for (const v of r)
      if (Qh(v, a))
        return;
    r.push(a);
  }), r;
}
function vne(e, t) {
  return Qh(e, t) || !t ? e : e ? [...Ri(e), ...Ri(t)].join(", ") : t;
}
function xne(e, t) {
  const r = e.value, a = t.value;
  if (r == null || a === null)
    return {
      explicit: e.explicit,
      value: null
    };
  if (($1(r) || Ji(r)) && ($1(a) || Ji(a)))
    return {
      explicit: e.explicit,
      value: vne(r, a)
    };
  if ($1(r) || Ji(r))
    return {
      explicit: e.explicit,
      value: r
    };
  if ($1(a) || Ji(a))
    return {
      explicit: e.explicit,
      value: a
    };
  if (!$1(r) && !Ji(r) && !$1(a) && !Ji(a))
    return {
      explicit: e.explicit,
      value: yne(r, a)
    };
  throw new Error("It should never reach here");
}
function Rz(e) {
  return `Invalid specification ${Fs(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`;
}
const PIe = 'Autosize "fit" only works for single views and layered views.';
function YV(e) {
  return `${e == "width" ? "Width" : "Height"} "container" only works for single views and layered views.`;
}
function ZV(e) {
  const t = e == "width" ? "Width" : "Height", r = e == "width" ? "x" : "y";
  return `${t} "container" only works well with autosize "fit" or "fit-${r}".`;
}
function XV(e) {
  return e ? `Dropping "fit-${e}" because spec has discrete ${Nh(e)}.` : 'Dropping "fit" because spec has discrete size.';
}
function Fz(e) {
  return `Unknown field for ${e}. Cannot calculate view size.`;
}
function KV(e) {
  return `Cannot project a selection on encoding channel "${e}", which has no field.`;
}
function OIe(e, t) {
  return `Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`;
}
function zIe(e) {
  return `The "nearest" transform is not supported for ${e} marks.`;
}
function bne(e) {
  return `Selection not supported for ${e} yet.`;
}
function RIe(e) {
  return `Cannot find a selection named "${e}".`;
}
const FIe = "Scale bindings are currently only supported for scales with unbinned, continuous domains.", NIe = "Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc", BIe = "Legend bindings are only supported for selections over an individual field or encoding channel.";
function jIe(e) {
  return `Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`;
}
function UIe(e) {
  return `Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`;
}
const VIe = "The same selection must be used to override scale domains in a layered view.", $Ie = 'Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.';
function qIe(e) {
  return `Unknown repeated value "${e}".`;
}
function JV(e) {
  return `The "columns" property cannot be used when "${e}" has nested row/column.`;
}
const HIe = "Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";
function GIe(e) {
  return `Unrecognized parse "${e}".`;
}
function QV(e, t, r) {
  return `An ancestor parsed field "${e}" as ${r} but a child wants to parse the field as ${t}.`;
}
const WIe = "Attempt to add the same child twice.";
function YIe(e) {
  return `Ignoring an invalid transform: ${Fs(e)}.`;
}
const ZIe = 'If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';
function e$(e) {
  return `Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`;
}
function XIe(e) {
  const { parentProjection: t, projection: r } = e;
  return `Layer's shared projection ${Fs(t)} is overridden by a child projection ${Fs(r)}.`;
}
const KIe = "Arc marks uses theta channel rather than angle, replacing angle with theta.";
function JIe(e) {
  return `${e}Offset dropped because ${e} is continuous`;
}
function QIe(e, t, r) {
  return `Channel ${e} is a ${t}. Converted to {value: ${Fs(r)}}.`;
}
function _ne(e) {
  return `Invalid field type "${e}".`;
}
function eDe(e, t) {
  return `Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`;
}
function tDe(e) {
  return `Invalid aggregation operator "${e}".`;
}
function wne(e, t) {
  const { fill: r, stroke: a } = t;
  return `Dropping color ${e} as the plot also has ${r && a ? "fill and stroke" : r ? "fill" : "stroke"}.`;
}
function nDe(e) {
  return `Position range does not support relative band size for ${e}.`;
}
function vI(e, t) {
  return `Dropping ${Fs(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`;
}
const rDe = "Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";
function LT(e, t, r) {
  return `${e} dropped as it is incompatible with "${t}".`;
}
function iDe(e) {
  return `${e}-encoding is dropped as ${e} is not a valid encoding channel.`;
}
function aDe(e) {
  return `${e} encoding should be discrete (ordinal / nominal / binned).`;
}
function oDe(e) {
  return `${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`;
}
function sDe(e) {
  return `Facet encoding dropped as ${e.join(" and ")} ${e.length > 1 ? "are" : "is"} also specified.`;
}
function RM(e, t) {
  return `Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t === "ordinal" ? "order" : "magnitude"}.`;
}
function lDe(e) {
  return `The ${e} for range marks cannot be an expression`;
}
function uDe(e, t) {
  return `Line mark is for continuous lines and thus cannot be used with ${e && t ? "x2 and y2" : e ? "x2" : "y2"}. We will use the rule mark (line segments) instead.`;
}
function cDe(e, t) {
  return `Specified orient "${e}" overridden with "${t}".`;
}
function fDe(e) {
  return `Cannot use the scale property "${e}" with non-color channel.`;
}
function hDe(e) {
  return `Cannot use the relative band size with ${e} scale.`;
}
function dDe(e) {
  return `Using unaggregated domain with raw field has no effect (${Fs(e)}).`;
}
function pDe(e) {
  return `Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`;
}
function mDe(e) {
  return `Unaggregated domain is currently unsupported for log scale (${Fs(e)}).`;
}
function gDe(e) {
  return `Cannot apply size to non-oriented mark "${e}".`;
}
function yDe(e, t, r) {
  return `Channel "${e}" does not work with "${t}" scale. We are using "${r}" scale instead.`;
}
function vDe(e, t) {
  return `FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`;
}
function kne(e, t, r) {
  return `${r}-scale's "${t}" is dropped as it does not work with ${e} scale.`;
}
function Tne(e) {
  return `The step for "${e}" is dropped because the ${e === "width" ? "x" : "y"} is continuous.`;
}
function xDe(e, t, r, a) {
  return `Conflicting ${t.toString()} property "${e.toString()}" (${Fs(r)} and ${Fs(a)}). Using ${Fs(r)}.`;
}
function bDe(e, t, r, a) {
  return `Conflicting ${t.toString()} property "${e.toString()}" (${Fs(r)} and ${Fs(a)}). Using the union of the two domains.`;
}
function _De(e) {
  return `Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`;
}
function wDe(e) {
  return `Dropping sort property ${Fs(e)} as unioned domains only support boolean or op "count", "min", and "max".`;
}
const t$ = "Domains that should be unioned has conflicting sort properties. Sort will be set to true.", kDe = "Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.", TDe = "Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.", ADe = "Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";
function SDe(e) {
  return `Cannot stack "${e}" if there is already "${e}2".`;
}
function MDe(e) {
  return `Stack is applied to a non-linear scale (${e}).`;
}
function EDe(e) {
  return `Stacking is applied even though the aggregate function is non-summative ("${e}").`;
}
function kk(e, t) {
  return `Invalid ${e}: ${Fs(t)}.`;
}
function CDe(e) {
  return `Dropping day from datetime ${Fs(e)} as day cannot be combined with other units.`;
}
function IDe(e, t) {
  return `${t ? "extent " : ""}${t && e ? "and " : ""}${e ? "center " : ""}${t && e ? "are " : "is "}not needed when data are aggregated.`;
}
function DDe(e, t, r) {
  return `${e} is not usually used with ${t} for ${r}.`;
}
function LDe(e, t) {
  return `Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`;
}
function n$(e) {
  return `1D error band does not support ${e}.`;
}
function Ane(e) {
  return `Channel ${e} is required for "binned" bin.`;
}
function PDe(e) {
  return `Channel ${e} should not be used with "binned" bin.`;
}
function ODe(e) {
  return `Domain for ${e} is required for threshold scale.`;
}
const Sne = ID(CD);
let eb = Sne;
function zDe(e) {
  return eb = e, eb;
}
function RDe() {
  return eb = Sne, eb;
}
function mi(...e) {
  eb.warn(...e);
}
function FDe(...e) {
  eb.debug(...e);
}
function e2(e) {
  if (e && Oi(e)) {
    for (const t of Bz)
      if (t in e)
        return !0;
  }
  return !1;
}
const Mne = [
  "january",
  "february",
  "march",
  "april",
  "may",
  "june",
  "july",
  "august",
  "september",
  "october",
  "november",
  "december"
], NDe = Mne.map((e) => e.substr(0, 3)), Ene = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"], BDe = Ene.map((e) => e.substr(0, 3));
function jDe(e) {
  if (kT(e) && (e = +e), Ro(e))
    return e > 4 && mi(kk("quarter", e)), e - 1;
  throw new Error(kk("quarter", e));
}
function UDe(e) {
  if (kT(e) && (e = +e), Ro(e))
    return e - 1;
  {
    const t = e.toLowerCase(), r = Mne.indexOf(t);
    if (r !== -1)
      return r;
    const a = t.substr(0, 3), v = NDe.indexOf(a);
    if (v !== -1)
      return v;
    throw new Error(kk("month", e));
  }
}
function VDe(e) {
  if (kT(e) && (e = +e), Ro(e))
    return e % 7;
  {
    const t = e.toLowerCase(), r = Ene.indexOf(t);
    if (r !== -1)
      return r;
    const a = t.substr(0, 3), v = BDe.indexOf(a);
    if (v !== -1)
      return v;
    throw new Error(kk("day", e));
  }
}
function Nz(e, t) {
  const r = [];
  if (t && e.day !== void 0 && ui(e).length > 1 && (mi(CDe(e)), e = ka(e), delete e.day), e.year !== void 0 ? r.push(e.year) : r.push(2012), e.month !== void 0) {
    const a = t ? UDe(e.month) : e.month;
    r.push(a);
  } else if (e.quarter !== void 0) {
    const a = t ? jDe(e.quarter) : e.quarter;
    r.push(Ro(a) ? a * 3 : `${a}*3`);
  } else
    r.push(0);
  if (e.date !== void 0)
    r.push(e.date);
  else if (e.day !== void 0) {
    const a = t ? VDe(e.day) : e.day;
    r.push(Ro(a) ? a + 1 : `${a}+1`);
  } else
    r.push(1);
  for (const a of ["hours", "minutes", "seconds", "milliseconds"]) {
    const v = e[a];
    r.push(typeof v > "u" ? 0 : v);
  }
  return r;
}
function Pv(e) {
  const r = Nz(e, !0).join(", ");
  return e.utc ? `utc(${r})` : `datetime(${r})`;
}
function $De(e) {
  const r = Nz(e, !1).join(", ");
  return e.utc ? `utc(${r})` : `datetime(${r})`;
}
function qDe(e) {
  const t = Nz(e, !0);
  return e.utc ? +new Date(Date.UTC(...t)) : +new Date(...t);
}
const Cne = {
  year: 1,
  quarter: 1,
  month: 1,
  week: 1,
  day: 1,
  dayofyear: 1,
  date: 1,
  hours: 1,
  minutes: 1,
  seconds: 1,
  milliseconds: 1
}, Bz = ui(Cne);
function HDe(e) {
  return !!Cne[e];
}
function t2(e) {
  return Oi(e) ? e.binned : Ine(e);
}
function Ine(e) {
  return e && e.startsWith("binned");
}
function jz(e) {
  return e.startsWith("utc");
}
function GDe(e) {
  return e.substring(3);
}
const WDe = {
  "year-month": "%b %Y ",
  "year-month-date": "%b %d, %Y "
};
function PT(e) {
  return Bz.filter((t) => Lne(e, t));
}
function Dne(e) {
  const t = PT(e);
  return t[t.length - 1];
}
function Lne(e, t) {
  const r = e.indexOf(t);
  return !(r < 0 || r > 0 && t === "seconds" && e.charAt(r - 1) === "i" || e.length > r + 3 && t === "day" && e.charAt(r + 3) === "o" || r > 0 && t === "year" && e.charAt(r - 1) === "f");
}
function YDe(e, t, { end: r } = { end: !1 }) {
  const a = Sz(t), v = jz(e) ? "utc" : "";
  function o(l) {
    return l === "quarter" ? `(${v}quarter(${a})-1)` : `${v}${l}(${a})`;
  }
  let s;
  const n = {};
  for (const l of Bz)
    Lne(e, l) && (n[l] = o(l), s = l);
  return r && (n[s] += "+1"), $De(n);
}
function Pne(e) {
  if (!e)
    return;
  const t = PT(e);
  return `timeUnitSpecifier(${Fs(t)}, ${Fs(WDe)})`;
}
function ZDe(e, t, r) {
  if (!e)
    return;
  const a = Pne(e);
  return `${r || jz(e) ? "utc" : "time"}Format(${t}, ${a})`;
}
function Xc(e) {
  if (!e)
    return;
  let t;
  return Fi(e) ? Ine(e) ? t = {
    unit: e.substring(6),
    binned: !0
  } : t = {
    unit: e
  } : Oi(e) && (t = {
    ...e,
    ...e.unit ? { unit: e.unit } : {}
  }), jz(t.unit) && (t.utc = !0, t.unit = GDe(t.unit)), t;
}
function XDe(e) {
  const { utc: t, ...r } = Xc(e);
  return r.unit ? (t ? "utc" : "") + ui(r).map((a) => Gl(`${a === "unit" ? "" : `_${a}_`}${r[a]}`)).join("") : (t ? "utc" : "") + "timeunit" + ui(r).map((a) => Gl(`_${a}_${r[a]}`)).join("");
}
function One(e, t = (r) => r) {
  const r = Xc(e), a = Dne(r.unit);
  if (a && a !== "day") {
    const v = {
      year: 2001,
      // pick a non-leap year
      month: 1,
      date: 1,
      hours: 0,
      minutes: 0,
      seconds: 0,
      milliseconds: 0
    }, { step: o, part: s } = zne(a, r.step), n = {
      ...v,
      [s]: +v[s] + o
    };
    return `${t(Pv(n))} - ${t(Pv(v))}`;
  }
}
const KDe = {
  year: 1,
  month: 1,
  date: 1,
  hours: 1,
  minutes: 1,
  seconds: 1,
  milliseconds: 1
};
function JDe(e) {
  return !!KDe[e];
}
function zne(e, t = 1) {
  if (JDe(e))
    return { part: e, step: t };
  switch (e) {
    case "day":
    case "dayofyear":
      return { part: "date", step: t };
    case "quarter":
      return { part: "month", step: t * 3 };
    case "week":
      return { part: "date", step: t * 7 };
  }
}
function QDe(e) {
  return e == null ? void 0 : e.param;
}
function Uz(e) {
  return !!(e != null && e.field) && e.equal !== void 0;
}
function Vz(e) {
  return !!(e != null && e.field) && e.lt !== void 0;
}
function $z(e) {
  return !!(e != null && e.field) && e.lte !== void 0;
}
function qz(e) {
  return !!(e != null && e.field) && e.gt !== void 0;
}
function Hz(e) {
  return !!(e != null && e.field) && e.gte !== void 0;
}
function Gz(e) {
  if (e != null && e.field) {
    if (Qr(e.range) && e.range.length === 2)
      return !0;
    if (Ji(e.range))
      return !0;
  }
  return !1;
}
function Wz(e) {
  return !!(e != null && e.field) && (Qr(e.oneOf) || Qr(e.in));
}
function eLe(e) {
  return !!(e != null && e.field) && e.valid !== void 0;
}
function Rne(e) {
  return Wz(e) || Uz(e) || Gz(e) || Vz(e) || qz(e) || $z(e) || Hz(e);
}
function Qp(e, t) {
  return qT(e, { timeUnit: t, wrapTime: !0 });
}
function tLe(e, t) {
  return e.map((r) => Qp(r, t));
}
function Fne(e, t = !0) {
  const { field: r } = e, a = Xc(e.timeUnit), { unit: v, binned: o } = a || {}, s = Mi(e, { expr: "datum" }), n = v ? (
    // For timeUnit, cast into integer with time() so we can use ===, inrange, indexOf to compare values directly.
    // TODO: We calculate timeUnit on the fly here. Consider if we would like to consolidate this with timeUnit pipeline
    // TODO: support utc
    `time(${o ? s : YDe(v, r)})`
  ) : s;
  if (Uz(e))
    return `${n}===${Qp(e.equal, v)}`;
  if (Vz(e)) {
    const l = e.lt;
    return `${n}<${Qp(l, v)}`;
  } else if (qz(e)) {
    const l = e.gt;
    return `${n}>${Qp(l, v)}`;
  } else if ($z(e)) {
    const l = e.lte;
    return `${n}<=${Qp(l, v)}`;
  } else if (Hz(e)) {
    const l = e.gte;
    return `${n}>=${Qp(l, v)}`;
  } else {
    if (Wz(e))
      return `indexof([${tLe(e.oneOf, v).join(",")}], ${n}) !== -1`;
    if (eLe(e))
      return OT(n, e.valid);
    if (Gz(e)) {
      const { range: l } = e, u = Ji(l) ? { signal: `${l.signal}[0]` } : l[0], i = Ji(l) ? { signal: `${l.signal}[1]` } : l[1];
      if (u !== null && i !== null && t)
        return "inrange(" + n + ", [" + Qp(u, v) + ", " + Qp(i, v) + "])";
      const h = [];
      return u !== null && h.push(`${n} >= ${Qp(u, v)}`), i !== null && h.push(`${n} <= ${Qp(i, v)}`), h.length > 0 ? h.join(" && ") : "true";
    }
  }
  throw new Error(`Invalid field predicate: ${Fs(e)}`);
}
function OT(e, t = !0) {
  return t ? `isValid(${e}) && isFinite(+${e})` : `!isValid(${e}) || !isFinite(+${e})`;
}
function nLe(e) {
  return Rne(e) && e.timeUnit ? {
    ...e,
    timeUnit: Xc(e.timeUnit)
  } : e;
}
const V4 = {
  quantitative: "quantitative",
  ordinal: "ordinal",
  temporal: "temporal",
  nominal: "nominal",
  geojson: "geojson"
};
function rLe(e) {
  return e === "quantitative" || e === "temporal";
}
function Nne(e) {
  return e === "ordinal" || e === "nominal";
}
const Ov = V4.quantitative, Yz = V4.ordinal, tb = V4.temporal, Zz = V4.nominal, Fb = V4.geojson;
function iLe(e) {
  if (e)
    switch (e = e.toLowerCase(), e) {
      case "q":
      case Ov:
        return "quantitative";
      case "t":
      case tb:
        return "temporal";
      case "o":
      case Yz:
        return "ordinal";
      case "n":
      case Zz:
        return "nominal";
      case Fb:
        return "geojson";
    }
}
const of = {
  // Continuous - Quantitative
  LINEAR: "linear",
  LOG: "log",
  POW: "pow",
  SQRT: "sqrt",
  SYMLOG: "symlog",
  IDENTITY: "identity",
  SEQUENTIAL: "sequential",
  // Continuous - Time
  TIME: "time",
  UTC: "utc",
  // Discretizing scales
  QUANTILE: "quantile",
  QUANTIZE: "quantize",
  THRESHOLD: "threshold",
  BIN_ORDINAL: "bin-ordinal",
  // Discrete scales
  ORDINAL: "ordinal",
  POINT: "point",
  BAND: "band"
}, xI = {
  linear: "numeric",
  log: "numeric",
  pow: "numeric",
  sqrt: "numeric",
  symlog: "numeric",
  identity: "numeric",
  sequential: "numeric",
  time: "time",
  utc: "time",
  ordinal: "ordinal",
  "bin-ordinal": "bin-ordinal",
  // TODO: should bin-ordinal support merging with other
  point: "ordinal-position",
  band: "ordinal-position",
  quantile: "discretizing",
  quantize: "discretizing",
  threshold: "discretizing"
};
function aLe(e, t) {
  const r = xI[e], a = xI[t];
  return r === a || r === "ordinal-position" && a === "time" || a === "ordinal-position" && r === "time";
}
const oLe = {
  // numeric
  linear: 0,
  log: 1,
  pow: 1,
  sqrt: 1,
  symlog: 1,
  identity: 1,
  sequential: 1,
  // time
  time: 0,
  utc: 0,
  // ordinal-position -- these have higher precedence than continuous scales as they support more types of data
  point: 10,
  band: 11,
  // band has higher precedence as it is better for interaction
  // non grouped types
  ordinal: 0,
  "bin-ordinal": 0,
  quantile: 0,
  quantize: 0,
  threshold: 0
};
function r$(e) {
  return oLe[e];
}
const Bne = /* @__PURE__ */ new Set([
  "linear",
  "log",
  "pow",
  "sqrt",
  "symlog"
]), jne = /* @__PURE__ */ new Set([
  ...Bne,
  "time",
  "utc"
]);
function Une(e) {
  return Bne.has(e);
}
const Vne = /* @__PURE__ */ new Set([
  "quantile",
  "quantize",
  "threshold"
]), sLe = /* @__PURE__ */ new Set([
  ...jne,
  ...Vne,
  "sequential",
  "identity"
]), lLe = /* @__PURE__ */ new Set([
  "ordinal",
  "bin-ordinal",
  "point",
  "band"
]);
function Kc(e) {
  return lLe.has(e);
}
function _p(e) {
  return sLe.has(e);
}
function p0(e) {
  return jne.has(e);
}
function nb(e) {
  return Vne.has(e);
}
const uLe = {
  pointPadding: 0.5,
  barBandPaddingInner: 0.1,
  rectBandPaddingInner: 0,
  bandWithNestedOffsetPaddingInner: 0.2,
  bandWithNestedOffsetPaddingOuter: 0.2,
  minBandSize: 2,
  minFontSize: 8,
  maxFontSize: 40,
  minOpacity: 0.3,
  maxOpacity: 0.8,
  // FIXME: revise if these *can* become ratios of width/height step
  minSize: 4,
  // Point size is area. For square point, 9 = 3 pixel ^ 2, not too small!
  minStrokeWidth: 1,
  maxStrokeWidth: 4,
  quantileCount: 4,
  quantizeCount: 4,
  zero: !0
};
function cLe(e) {
  return !Fi(e) && !!e.name;
}
function $ne(e) {
  return e == null ? void 0 : e.param;
}
function fLe(e) {
  return e == null ? void 0 : e.unionWith;
}
function hLe(e) {
  return Oi(e) && "field" in e;
}
const dLe = {
  type: 1,
  domain: 1,
  domainMax: 1,
  domainMin: 1,
  domainMid: 1,
  domainRaw: 1,
  align: 1,
  range: 1,
  rangeMax: 1,
  rangeMin: 1,
  scheme: 1,
  bins: 1,
  // Other properties
  reverse: 1,
  round: 1,
  // quantitative / time
  clamp: 1,
  nice: 1,
  // quantitative
  base: 1,
  exponent: 1,
  constant: 1,
  interpolate: 1,
  zero: 1,
  // zero depends on domain
  // band/point
  padding: 1,
  paddingInner: 1,
  paddingOuter: 1
}, { type: BUe, domain: jUe, range: UUe, rangeMax: VUe, rangeMin: $Ue, scheme: qUe, ...pLe } = dLe, mLe = ui(pLe);
function bI(e, t) {
  switch (t) {
    case "type":
    case "domain":
    case "reverse":
    case "range":
      return !0;
    case "scheme":
    case "interpolate":
      return !["point", "band", "identity"].includes(e);
    case "bins":
      return !["point", "band", "identity", "ordinal"].includes(e);
    case "round":
      return p0(e) || e === "band" || e === "point";
    case "padding":
    case "rangeMin":
    case "rangeMax":
      return p0(e) || ["point", "band"].includes(e);
    case "paddingOuter":
    case "align":
      return ["point", "band"].includes(e);
    case "paddingInner":
      return e === "band";
    case "domainMax":
    case "domainMid":
    case "domainMin":
    case "domainRaw":
    case "clamp":
      return p0(e);
    case "nice":
      return p0(e) || e === "quantize" || e === "threshold";
    case "exponent":
      return e === "pow";
    case "base":
      return e === "log";
    case "constant":
      return e === "symlog";
    case "zero":
      return _p(e) && !ro([
        "log",
        // log scale cannot have zero value
        "time",
        "utc",
        // zero is not meaningful for time
        "threshold",
        // threshold requires custom domain so zero does not matter
        "quantile"
        // quantile depends on distribution so zero does not matter
      ], e);
  }
}
function qne(e, t) {
  switch (t) {
    case "interpolate":
    case "scheme":
    case "domainMid":
      return wx(e) ? void 0 : fDe(t);
    case "align":
    case "type":
    case "bins":
    case "domain":
    case "domainMax":
    case "domainMin":
    case "domainRaw":
    case "range":
    case "base":
    case "exponent":
    case "constant":
    case "nice":
    case "padding":
    case "paddingInner":
    case "paddingOuter":
    case "rangeMax":
    case "rangeMin":
    case "reverse":
    case "round":
    case "clamp":
    case "zero":
      return;
  }
}
function gLe(e, t) {
  return ro([Yz, Zz], t) ? e === void 0 || Kc(e) : t === tb ? ro([of.TIME, of.UTC, void 0], e) : t === Ov ? Une(e) || nb(e) || e === void 0 : !0;
}
function yLe(e, t, r = !1) {
  if (!X0(e))
    return !1;
  switch (e) {
    case Yl:
    case Qc:
    case $g:
    case Rb:
    case Bd:
    case Dp:
      return p0(t) || t === "band" ? !0 : t === "point" ? !r : !1;
    case e1:
    case Gg:
    case t1:
    case qg:
    case Hg:
    case Kv:
      return p0(t) || nb(t) || ro(["band", "point", "ordinal"], t);
    case Rh:
    case W0:
    case Y0:
      return t !== "band";
    case Wg:
    case Fh:
      return t === "ordinal" || nb(t);
  }
}
function vLe(e) {
  return Oi(e) && "value" in e;
}
const ph = {
  arc: "arc",
  area: "area",
  bar: "bar",
  image: "image",
  line: "line",
  point: "point",
  rect: "rect",
  rule: "rule",
  text: "text",
  tick: "tick",
  trail: "trail",
  circle: "circle",
  square: "square",
  geoshape: "geoshape"
}, Hne = ph.arc, zT = ph.area, RT = ph.bar, xLe = ph.image, FT = ph.line, NT = ph.point, bLe = ph.rect, Tk = ph.rule, Gne = ph.text, Xz = ph.tick, _Le = ph.trail, Kz = ph.circle, Jz = ph.square, Wne = ph.geoshape;
function Xg(e) {
  return ["line", "area", "trail"].includes(e);
}
function Hw(e) {
  return [
    "rect",
    "bar",
    "image",
    "arc"
    /* arc is rect/interval in polar coordinate */
  ].includes(e);
}
const wLe = new Set(ui(ph));
function O0(e) {
  return e.type;
}
const kLe = [
  "stroke",
  "strokeWidth",
  "strokeDash",
  "strokeDashOffset",
  "strokeOpacity",
  "strokeJoin",
  "strokeMiterLimit"
], TLe = ["fill", "fillOpacity"], ALe = [...kLe, ...TLe], SLe = {
  color: 1,
  filled: 1,
  invalid: 1,
  order: 1,
  radius2: 1,
  theta2: 1,
  timeUnitBandSize: 1,
  timeUnitBandPosition: 1
}, i$ = ui(SLe), MLe = {
  area: ["line", "point"],
  bar: ["binSpacing", "continuousBandSize", "discreteBandSize", "minBandSize"],
  rect: ["binSpacing", "continuousBandSize", "discreteBandSize", "minBandSize"],
  line: ["point"],
  tick: ["bandSize", "thickness"]
}, ELe = {
  color: "#4c78a8",
  invalid: "break-paths-show-path-domains",
  timeUnitBandSize: 1
}, CLe = {
  mark: 1,
  arc: 1,
  area: 1,
  bar: 1,
  circle: 1,
  image: 1,
  line: 1,
  point: 1,
  rect: 1,
  rule: 1,
  square: 1,
  text: 1,
  tick: 1,
  trail: 1,
  geoshape: 1
}, Yne = ui(CLe);
function zv(e) {
  return e && e.band != null;
}
const ILe = {
  horizontal: ["cornerRadiusTopRight", "cornerRadiusBottomRight"],
  vertical: ["cornerRadiusTopLeft", "cornerRadiusTopRight"]
}, Zne = 5, DLe = {
  binSpacing: 1,
  continuousBandSize: Zne,
  minBandSize: 0.25,
  timeUnitBandPosition: 0.5
}, LLe = {
  binSpacing: 0,
  continuousBandSize: Zne,
  minBandSize: 0.25,
  timeUnitBandPosition: 0.5
}, PLe = {
  thickness: 1
};
function OLe(e) {
  return O0(e) ? e.type : e;
}
function Xne(e, { isPath: t }) {
  return e === void 0 || e === "break-paths-show-path-domains" ? t ? "break-paths-show-domains" : "filter" : e === null ? "show" : e;
}
function Qz({ markDef: e, config: t, scaleChannel: r, scaleType: a, isCountAggregate: v }) {
  var n, l;
  if (!a || !_p(a) || v)
    return "always-valid";
  const o = Xne(Cs("invalid", e, t), {
    isPath: Xg(e.type)
  });
  return ((l = (n = t.scale) == null ? void 0 : n.invalid) == null ? void 0 : l[r]) !== void 0 ? "show" : o;
}
function zLe(e) {
  return e === "break-paths-filter-domains" || e === "break-paths-show-domains";
}
function Kne({ scaleName: e, scale: t, mode: r }) {
  const a = `domain('${e}')`;
  if (!t || !e)
    return;
  const v = `${a}[0]`, o = `peek(${a})`, s = t.domainHasZero();
  return s === "definitely" ? {
    scale: e,
    value: 0
  } : s === "maybe" ? { signal: `scale('${e}', inrange(0, ${a}) ? 0 : ${r === "zeroOrMin" ? v : o})` } : { signal: `scale('${e}', ${r === "zeroOrMin" ? v : o})` };
}
function Jne({ scaleChannel: e, channelDef: t, scale: r, scaleName: a, markDef: v, config: o }) {
  var i;
  const s = r == null ? void 0 : r.get("type"), n = kp(t), l = IT(n == null ? void 0 : n.aggregate), u = Qz({
    scaleChannel: e,
    markDef: v,
    config: o,
    scaleType: s,
    isCountAggregate: l
  });
  if (n && u === "show") {
    const h = ((i = o.scale.invalid) == null ? void 0 : i[e]) ?? "zero-or-min";
    return {
      test: OT(Mi(n, { expr: "datum" }), !1),
      ...RLe(h, r, a)
    };
  }
}
function RLe(e, t, r) {
  if (vLe(e)) {
    const { value: a } = e;
    return Ji(a) ? { signal: a.signal } : { value: a };
  }
  return Kne({
    scale: t,
    scaleName: r,
    mode: "zeroOrMin"
  });
}
function eR(e) {
  const { channel: t, channelDef: r, markDef: a, scale: v, scaleName: o, config: s } = e, n = Jv(t), l = tR(e), u = Jne({
    scaleChannel: n,
    channelDef: r,
    scale: v,
    scaleName: o,
    markDef: a,
    config: s
  });
  return u !== void 0 ? [u, l] : l;
}
function FLe(e) {
  const { datum: t } = e;
  return e2(t) ? Pv(t) : `${Fs(t)}`;
}
function fv(e, t, r, a) {
  const v = {};
  if (t && (v.scale = t), K0(e)) {
    const { datum: o } = e;
    e2(o) ? v.signal = Pv(o) : Ji(o) ? v.signal = o.signal : U4(o) ? v.signal = o.expr : v.value = o;
  } else
    v.field = Mi(e, r);
  if (a) {
    const { offset: o, band: s } = a;
    o && (v.offset = o), s && (v.band = s);
  }
  return v;
}
function Ak({ scaleName: e, fieldOrDatumDef: t, fieldOrDatumDef2: r, offset: a, startSuffix: v, endSuffix: o = "end", bandPosition: s = 0.5 }) {
  const n = !Ji(s) && 0 < s && s < 1 ? "datum" : void 0, l = Mi(t, { expr: n, suffix: v }), u = r !== void 0 ? Mi(r, { expr: n }) : Mi(t, { suffix: o, expr: n }), i = {};
  if (s === 0 || s === 1) {
    i.scale = e;
    const h = s === 0 ? l : u;
    i.field = h;
  } else {
    const h = Ji(s) ? `(1-${s.signal}) * ${l} + ${s.signal} * ${u}` : `${1 - s} * ${l} + ${s} * ${u}`;
    i.signal = `scale("${e}", ${h})`;
  }
  return a && (i.offset = a), i;
}
function NLe({ scaleName: e, fieldDef: t }) {
  const r = Mi(t, { expr: "datum" }), a = Mi(t, { expr: "datum", suffix: "end" });
  return `abs(scale("${e}", ${a}) - scale("${e}", ${r}))`;
}
function tR({ channel: e, channelDef: t, channel2Def: r, markDef: a, config: v, scaleName: o, scale: s, stack: n, offset: l, defaultRef: u, bandPosition: i }) {
  if (t) {
    if (La(t)) {
      const h = s == null ? void 0 : s.get("type");
      if (hh(t)) {
        i ?? (i = Ig({
          fieldDef: t,
          fieldDef2: r,
          markDef: a,
          config: v
        }));
        const { bin: p, timeUnit: _, type: d } = t;
        if (hl(p) || i && _ && d === tb)
          return n != null && n.impute ? fv(t, o, { binSuffix: "mid" }, { offset: l }) : i && !Kc(h) ? Ak({ scaleName: o, fieldOrDatumDef: t, bandPosition: i, offset: l }) : fv(t, o, G4(t, e) ? { binSuffix: "range" } : {}, {
            offset: l
          });
        if (af(p)) {
          if (gi(r))
            return Ak({
              scaleName: o,
              fieldOrDatumDef: t,
              fieldOrDatumDef2: r,
              bandPosition: i,
              offset: l
            });
          mi(Ane(e === Yl ? Ip : G0));
        }
      }
      return fv(
        t,
        o,
        Kc(h) ? { binSuffix: "range" } : {},
        // no need for bin suffix if there is no scale
        {
          offset: l,
          // For band, to get mid point, need to offset by half of the band
          band: h === "band" ? i ?? t.bandPosition ?? 0.5 : void 0
        }
      );
    } else if (wp(t)) {
      const h = t.value, p = l ? { offset: l } : {};
      return { ...nw(e, h), ...p };
    }
  }
  return qa(u) && (u = u()), u && {
    ...u,
    // only include offset when it is non-zero (zero = no offset)
    ...l ? { offset: l } : {}
  };
}
function nw(e, t) {
  return ro(["x", "x2"], e) && t === "width" ? { field: { group: "width" } } : ro(["y", "y2"], e) && t === "height" ? { field: { group: "height" } } : Al(t);
}
function Rv(e) {
  return e && e !== "number" && e !== "time";
}
function Qne(e, t, r) {
  return `${e}(${t}${r ? `, ${Fs(r)}` : ""})`;
}
const BLe = " – ";
function nR({ fieldOrDatumDef: e, format: t, formatType: r, expr: a, normalizeStack: v, config: o }) {
  var l, u;
  if (Rv(r))
    return cp({
      fieldOrDatumDef: e,
      format: t,
      formatType: r,
      expr: a,
      config: o
    });
  const s = ere(e, a, v), n = rb(e);
  if (t === void 0 && r === void 0 && o.customFormatTypes) {
    if (n === "quantitative") {
      if (v && o.normalizedNumberFormatType)
        return cp({
          fieldOrDatumDef: e,
          format: o.normalizedNumberFormat,
          formatType: o.normalizedNumberFormatType,
          expr: a,
          config: o
        });
      if (o.numberFormatType)
        return cp({
          fieldOrDatumDef: e,
          format: o.numberFormat,
          formatType: o.numberFormatType,
          expr: a,
          config: o
        });
    }
    if (n === "temporal" && o.timeFormatType && gi(e) && e.timeUnit === void 0)
      return cp({
        fieldOrDatumDef: e,
        format: o.timeFormat,
        formatType: o.timeFormatType,
        expr: a,
        config: o
      });
  }
  if (ab(e)) {
    const i = ULe({
      field: s,
      timeUnit: gi(e) ? (l = Xc(e.timeUnit)) == null ? void 0 : l.unit : void 0,
      format: t,
      formatType: o.timeFormatType,
      rawTimeFormat: o.timeFormat,
      isUTCScale: n2(e) && ((u = e.scale) == null ? void 0 : u.type) === of.UTC
    });
    return i ? { signal: i } : void 0;
  }
  if (t = _I({ type: n, specifiedFormat: t, config: o, normalizeStack: v }), gi(e) && hl(e.bin)) {
    const i = Mi(e, { expr: a, binSuffix: "end" });
    return {
      signal: $4(s, i, t, r, o)
    };
  } else return t || rb(e) === "quantitative" ? {
    signal: `${rre(s, t)}`
  } : { signal: `isValid(${s}) ? ${s} : ""+${s}` };
}
function ere(e, t, r) {
  return gi(e) ? r ? `${Mi(e, { expr: t, suffix: "end" })}-${Mi(e, {
    expr: t,
    suffix: "start"
  })}` : Mi(e, { expr: t }) : FLe(e);
}
function cp({ fieldOrDatumDef: e, format: t, formatType: r, expr: a, normalizeStack: v, config: o, field: s }) {
  if (s ?? (s = ere(e, a, v)), s !== "datum.value" && // For axis/legend, we can't correctly know the end of the bin from `datum`
  gi(e) && hl(e.bin)) {
    const n = Mi(e, { expr: a, binSuffix: "end" });
    return {
      signal: $4(s, n, t, r, o)
    };
  }
  return { signal: Qne(r, s, t) };
}
function tre(e, t, r, a, v, o) {
  var s;
  if (!(Fi(a) && Rv(a)) && !(r === void 0 && a === void 0 && v.customFormatTypes && rb(e) === "quantitative" && (v.normalizedNumberFormatType && ib(e) && e.stack === "normalize" || v.numberFormatType))) {
    if (ib(e) && e.stack === "normalize" && v.normalizedNumberFormat)
      return _I({
        type: "quantitative",
        config: v,
        normalizeStack: !0
      });
    if (ab(e)) {
      const n = gi(e) ? (s = Xc(e.timeUnit)) == null ? void 0 : s.unit : void 0;
      return n === void 0 && v.customFormatTypes && v.timeFormatType ? void 0 : jLe({ specifiedFormat: r, timeUnit: n, config: v, omitTimeFormatConfig: o });
    }
    return _I({ type: t, specifiedFormat: r, config: v });
  }
}
function nre(e, t, r) {
  var a;
  if (e && (Ji(e) || e === "number" || e === "time"))
    return e;
  if (ab(t) && r !== "time" && r !== "utc")
    return gi(t) && ((a = Xc(t == null ? void 0 : t.timeUnit)) != null && a.utc) ? "utc" : "time";
}
function _I({ type: e, specifiedFormat: t, config: r, normalizeStack: a }) {
  if (Fi(t))
    return t;
  if (e === Ov)
    return a ? r.normalizedNumberFormat : r.numberFormat;
}
function jLe({ specifiedFormat: e, timeUnit: t, config: r, omitTimeFormatConfig: a }) {
  return e || (t ? {
    signal: Pne(t)
  } : a ? void 0 : r.timeFormat);
}
function rre(e, t) {
  return `format(${e}, "${t || ""}")`;
}
function a$(e, t, r, a) {
  return Rv(r) ? Qne(r, e, t) : rre(e, (Fi(t) ? t : void 0) ?? a.numberFormat);
}
function $4(e, t, r, a, v) {
  if (r === void 0 && a === void 0 && v.customFormatTypes && v.numberFormatType)
    return $4(e, t, v.numberFormat, v.numberFormatType, v);
  const o = a$(e, r, a, v), s = a$(t, r, a, v);
  return `${OT(e, !1)} ? "null" : ${o} + "${BLe}" + ${s}`;
}
function ULe({ field: e, timeUnit: t, format: r, formatType: a, rawTimeFormat: v, isUTCScale: o }) {
  return !t || r ? !t && a ? `${a}(${e}, '${r}')` : (r = Fi(r) ? r : v, `${o ? "utc" : "time"}Format(${e}, '${r}')`) : ZDe(t, e, o);
}
const BT = "min", VLe = {
  x: 1,
  y: 1,
  color: 1,
  fill: 1,
  stroke: 1,
  strokeWidth: 1,
  size: 1,
  shape: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  opacity: 1,
  text: 1
};
function o$(e) {
  return e in VLe;
}
function $Le(e) {
  return !!(e != null && e.encoding);
}
function Nm(e) {
  return e && (e.op === "count" || !!e.field);
}
function ire(e) {
  return e && Qr(e);
}
function q4(e) {
  return "row" in e || "column" in e;
}
function rR(e) {
  return !!e && "header" in e;
}
function jT(e) {
  return "facet" in e;
}
function qLe(e) {
  return e.param;
}
function HLe(e) {
  return e && !Fi(e) && "repeat" in e;
}
function s$(e) {
  const { field: t, timeUnit: r, bin: a, aggregate: v } = e;
  return {
    ...r ? { timeUnit: r } : {},
    ...a ? { bin: a } : {},
    ...v ? { aggregate: v } : {},
    field: t
  };
}
function iR(e) {
  return "sort" in e;
}
function Ig({ fieldDef: e, fieldDef2: t, markDef: r, config: a }) {
  if (La(e) && e.bandPosition !== void 0)
    return e.bandPosition;
  if (gi(e)) {
    const { timeUnit: v, bin: o } = e;
    if (v && !t)
      return P0("timeUnitBandPosition", r, a);
    if (hl(o))
      return 0.5;
  }
}
function are({ channel: e, fieldDef: t, fieldDef2: r, markDef: a, config: v, scaleType: o, useVlSizeChannel: s }) {
  var u, i, h;
  const n = Nh(e), l = Cs(s ? "size" : n, a, v, {
    vgChannel: n
  });
  if (l !== void 0)
    return l;
  if (gi(t)) {
    const { timeUnit: p, bin: _ } = t;
    if (p && !r)
      return { band: P0("timeUnitBandSize", a, v) };
    if (hl(_) && !Kc(o))
      return { band: 1 };
  }
  if (Hw(a.type))
    return o ? Kc(o) ? ((u = v[a.type]) == null ? void 0 : u.discreteBandSize) || { band: 1 } : (i = v[a.type]) == null ? void 0 : i.continuousBandSize : (h = v[a.type]) == null ? void 0 : h.discreteBandSize;
}
function ore(e, t, r, a) {
  return hl(e.bin) || e.timeUnit && hh(e) && e.type === "temporal" ? Ig({ fieldDef: e, fieldDef2: t, markDef: r, config: a }) !== void 0 : !1;
}
function sre(e) {
  return e && !!e.sort && !e.field;
}
function UT(e) {
  return e && "condition" in e;
}
function VT(e) {
  const t = e == null ? void 0 : e.condition;
  return !!t && !Qr(t) && gi(t);
}
function H4(e) {
  const t = e == null ? void 0 : e.condition;
  return !!t && !Qr(t) && La(t);
}
function GLe(e) {
  const t = e == null ? void 0 : e.condition;
  return !!t && (Qr(t) || wp(t));
}
function gi(e) {
  return e && (!!e.field || e.aggregate === "count");
}
function rb(e) {
  return e == null ? void 0 : e.type;
}
function K0(e) {
  return e && "datum" in e;
}
function og(e) {
  return hh(e) && !Mk(e) || Sk(e);
}
function l$(e) {
  return hh(e) && e.type === "quantitative" && !e.bin || Sk(e);
}
function Sk(e) {
  return K0(e) && Ro(e.datum);
}
function La(e) {
  return gi(e) || K0(e);
}
function hh(e) {
  return e && ("field" in e || e.aggregate === "count") && "type" in e;
}
function wp(e) {
  return e && "value" in e && "value" in e;
}
function n2(e) {
  return e && ("scale" in e || "sort" in e);
}
function ib(e) {
  return e && ("axis" in e || "stack" in e || "impute" in e);
}
function lre(e) {
  return e && "legend" in e;
}
function ure(e) {
  return e && ("format" in e || "formatType" in e);
}
function WLe(e) {
  return Ih(e, ["legend", "axis", "header", "scale"]);
}
function YLe(e) {
  return "op" in e;
}
function Mi(e, t = {}) {
  let r = e.field;
  const a = t.prefix;
  let v = t.suffix, o = "";
  if (XLe(e))
    r = Kte("count");
  else {
    let s;
    if (!t.nofn)
      if (YLe(e))
        s = e.op;
      else {
        const { bin: n, aggregate: l, timeUnit: u } = e;
        hl(n) ? (s = fne(n), v = (t.binSuffix ?? "") + (t.suffix ?? "")) : l ? Yg(l) ? (o = `["${r}"]`, r = `argmax_${l.argmax}`) : Hm(l) ? (o = `["${r}"]`, r = `argmin_${l.argmin}`) : s = String(l) : u && !t2(u) && (s = XDe(u), v = (!["range", "mid"].includes(t.binSuffix) && t.binSuffix || "") + (t.suffix ?? ""));
      }
    s && (r = r ? `${s}_${r}` : s);
  }
  return v && (r = `${r}_${v}`), a && (r = `${a}_${r}`), t.forAs ? zb(r) : t.expr ? Yte(r, t.expr) + o : Rd(r) + o;
}
function Mk(e) {
  switch (e.type) {
    case "nominal":
    case "ordinal":
    case "geojson":
      return !0;
    case "quantitative":
      return gi(e) && !!e.bin;
    case "temporal":
      return !1;
  }
  throw new Error(_ne(e.type));
}
function ZLe(e) {
  var t;
  return n2(e) && nb((t = e.scale) == null ? void 0 : t.type);
}
function XLe(e) {
  return e.aggregate === "count";
}
function KLe(e, t) {
  var s;
  const { field: r, bin: a, timeUnit: v, aggregate: o } = e;
  if (o === "count")
    return t.countTitle;
  if (hl(a))
    return `${r} (binned)`;
  if (v && !t2(v)) {
    const n = (s = Xc(v)) == null ? void 0 : s.unit;
    if (n)
      return `${r} (${PT(n).join("-")})`;
  } else if (o)
    return Yg(o) ? `${r} for max ${o.argmax}` : Hm(o) ? `${r} for min ${o.argmin}` : `${F4(o)} of ${r}`;
  return r;
}
function JLe(e) {
  const { aggregate: t, bin: r, timeUnit: a, field: v } = e;
  if (Yg(t))
    return `${v} for argmax(${t.argmax})`;
  if (Hm(t))
    return `${v} for argmin(${t.argmin})`;
  const o = a && !t2(a) ? Xc(a) : void 0, s = t || (o == null ? void 0 : o.unit) || (o == null ? void 0 : o.maxbins) && "timeunit" || hl(r) && "bin";
  return s ? `${s.toUpperCase()}(${v})` : v;
}
const cre = (e, t) => {
  switch (t.fieldTitle) {
    case "plain":
      return e.field;
    case "functional":
      return JLe(e);
    default:
      return KLe(e, t);
  }
};
let fre = cre;
function hre(e) {
  fre = e;
}
function QLe() {
  hre(cre);
}
function kx(e, t, { allowDisabling: r, includeDefault: a = !0 }) {
  var n;
  const v = (n = aR(e)) == null ? void 0 : n.title;
  if (!gi(e))
    return v ?? e.title;
  const o = e, s = a ? oR(o, t) : void 0;
  return r ? Wu(v, o.title, s) : v ?? o.title ?? s;
}
function aR(e) {
  if (ib(e) && e.axis)
    return e.axis;
  if (lre(e) && e.legend)
    return e.legend;
  if (rR(e) && e.header)
    return e.header;
}
function oR(e, t) {
  return fre(e, t);
}
function Ek(e) {
  if (ure(e)) {
    const { format: t, formatType: r } = e;
    return { format: t, formatType: r };
  } else {
    const t = aR(e) ?? {}, { format: r, formatType: a } = t;
    return { format: r, formatType: a };
  }
}
function ePe(e, t) {
  var o;
  switch (t) {
    case "latitude":
    case "longitude":
      return "quantitative";
    case "row":
    case "column":
    case "facet":
    case "shape":
    case "strokeDash":
      return "nominal";
    case "order":
      return "ordinal";
  }
  if (iR(e) && Qr(e.sort))
    return "ordinal";
  const { aggregate: r, bin: a, timeUnit: v } = e;
  if (v)
    return "temporal";
  if (a || r && !Yg(r) && !Hm(r))
    return "quantitative";
  if (n2(e) && ((o = e.scale) != null && o.type))
    switch (xI[e.scale.type]) {
      case "numeric":
      case "discretizing":
        return "quantitative";
      case "time":
        return "temporal";
    }
  return "nominal";
}
function kp(e) {
  if (gi(e))
    return e;
  if (VT(e))
    return e.condition;
}
function wc(e) {
  if (La(e))
    return e;
  if (H4(e))
    return e.condition;
}
function dre(e, t, r, a = {}) {
  if (Fi(e) || Ro(e) || Rg(e)) {
    const v = Fi(e) ? "string" : Ro(e) ? "number" : "boolean";
    return mi(QIe(t, v, e)), { value: e };
  }
  return La(e) ? Ck(e, t, r, a) : H4(e) ? {
    ...e,
    // Need to cast as normalizeFieldDef normally return FieldDef, but here we know that it is definitely Condition<FieldDef>
    condition: Ck(e.condition, t, r, a)
  } : e;
}
function Ck(e, t, r, a) {
  if (ure(e)) {
    const { format: v, formatType: o, ...s } = e;
    if (Rv(o) && !r.customFormatTypes)
      return mi(e$(t)), Ck(s, t, r, a);
  } else {
    const v = ib(e) ? "axis" : lre(e) ? "legend" : rR(e) ? "header" : null;
    if (v && e[v]) {
      const { format: o, formatType: s, ...n } = e[v];
      if (Rv(s) && !r.customFormatTypes)
        return mi(e$(t)), Ck({ ...e, [v]: n }, t, r, a);
    }
  }
  return gi(e) ? sR(e, t, a) : tPe(e);
}
function tPe(e) {
  let t = e.type;
  if (t)
    return e;
  const { datum: r } = e;
  return t = Ro(r) ? "quantitative" : Fi(r) ? "nominal" : e2(r) ? "temporal" : void 0, { ...e, type: t };
}
function sR(e, t, { compositeMark: r = !1 } = {}) {
  const { aggregate: a, timeUnit: v, bin: o, field: s } = e, n = { ...e };
  if (!r && a && !zz(a) && !Yg(a) && !Hm(a) && (mi(tDe(a)), delete n.aggregate), v && (n.timeUnit = Xc(v)), s && (n.field = `${s}`), hl(o) && (n.bin = $T(o, t)), af(o) && !Yu(t) && mi(PDe(t)), hh(n)) {
    const { type: l } = n, u = iLe(l);
    l !== u && (n.type = u), l !== "quantitative" && IT(a) && (mi(eDe(l, a)), n.type = "quantitative");
  } else if (!ane(t)) {
    const l = ePe(n, t);
    n.type = l;
  }
  if (hh(n)) {
    const { compatible: l, warning: u } = nPe(n, t) || {};
    l === !1 && mi(u);
  }
  if (iR(n) && Fi(n.sort)) {
    const { sort: l } = n;
    if (o$(l))
      return {
        ...n,
        sort: { encoding: l }
      };
    const u = l.substr(1);
    if (l.charAt(0) === "-" && o$(u))
      return {
        ...n,
        sort: { encoding: u, order: "descending" }
      };
  }
  if (rR(n)) {
    const { header: l } = n;
    if (l) {
      const { orient: u, ...i } = l;
      if (u)
        return {
          ...n,
          header: {
            ...i,
            labelOrient: l.labelOrient || u,
            titleOrient: l.titleOrient || u
          }
        };
    }
  }
  return n;
}
function $T(e, t) {
  return Rg(e) ? { maxbins: HV(t) } : e === "binned" ? {
    binned: !0
  } : !e.maxbins && !e.step ? { ...e, maxbins: HV(t) } : e;
}
const W2 = { compatible: !0 };
function nPe(e, t) {
  const r = e.type;
  if (r === "geojson" && t !== "shape")
    return {
      compatible: !1,
      warning: `Channel ${t} should not be used with a geojson data.`
    };
  switch (t) {
    case Rm:
    case Fm:
    case TT:
      return Mk(e) ? W2 : {
        compatible: !1,
        warning: aDe(t)
      };
    case Yl:
    case Qc:
    case $g:
    case Rb:
    case Rh:
    case W0:
    case Y0:
    case N4:
    case B4:
    case AT:
    case Lv:
    case ST:
    case MT:
    case Kv:
    case Bd:
    case Dp:
    case ET:
      return W2;
    case Pp:
    case Fd:
    case Lp:
    case Op:
      return r !== Ov ? {
        compatible: !1,
        warning: `Channel ${t} should be used with a quantitative field only, not ${e.type} field.`
      } : W2;
    case t1:
    case qg:
    case Hg:
    case Gg:
    case e1:
    case Qm:
    case Jm:
    case Ip:
    case G0:
      return r === "nominal" && !e.sort ? {
        compatible: !1,
        warning: `Channel ${t} should not be used with an unsorted discrete field.`
      } : W2;
    case Fh:
    case Wg:
      return !Mk(e) && !ZLe(e) ? {
        compatible: !1,
        warning: oDe(t)
      } : W2;
    case Qx:
      return e.type === "nominal" && !("sort" in e) ? {
        compatible: !1,
        warning: "Channel order is inappropriate for nominal field, which has no inherent order."
      } : W2;
  }
}
function ab(e) {
  const { formatType: t } = Ek(e);
  return t === "time" || !t && rPe(e);
}
function rPe(e) {
  return e && (e.type === "temporal" || gi(e) && !!e.timeUnit);
}
function qT(e, { timeUnit: t, type: r, wrapTime: a, undefinedIfExprNotRequired: v }) {
  var l;
  const o = t && ((l = Xc(t)) == null ? void 0 : l.unit);
  let s = o || r === "temporal", n;
  return U4(e) ? n = e.expr : Ji(e) ? n = e.signal : e2(e) ? (s = !0, n = Pv(e)) : (Fi(e) || Ro(e)) && s && (n = `datetime(${Fs(e)})`, HDe(o) && (Ro(e) && e < 1e4 || Fi(e) && isNaN(Date.parse(e))) && (n = Pv({ [o]: e }))), n ? a && s ? `time(${n})` : n : v ? void 0 : Fs(e);
}
function pre(e, t) {
  const { type: r } = e;
  return t.map((a) => {
    const v = gi(e) && !t2(e.timeUnit) ? e.timeUnit : void 0, o = qT(a, {
      timeUnit: v,
      type: r,
      undefinedIfExprNotRequired: !0
    });
    return o !== void 0 ? { signal: o } : a;
  });
}
function G4(e, t) {
  return hl(e.bin) ? X0(t) && ["ordinal", "nominal"].includes(e.type) : (console.warn("Only call this method for binned field defs."), !1);
}
const u$ = {
  labelAlign: {
    part: "labels",
    vgProp: "align"
  },
  labelBaseline: {
    part: "labels",
    vgProp: "baseline"
  },
  labelColor: {
    part: "labels",
    vgProp: "fill"
  },
  labelFont: {
    part: "labels",
    vgProp: "font"
  },
  labelFontSize: {
    part: "labels",
    vgProp: "fontSize"
  },
  labelFontStyle: {
    part: "labels",
    vgProp: "fontStyle"
  },
  labelFontWeight: {
    part: "labels",
    vgProp: "fontWeight"
  },
  labelOpacity: {
    part: "labels",
    vgProp: "opacity"
  },
  labelOffset: null,
  labelPadding: null,
  // There is no fixed vgProp for tickSize, need to use signal.
  gridColor: {
    part: "grid",
    vgProp: "stroke"
  },
  gridDash: {
    part: "grid",
    vgProp: "strokeDash"
  },
  gridDashOffset: {
    part: "grid",
    vgProp: "strokeDashOffset"
  },
  gridOpacity: {
    part: "grid",
    vgProp: "opacity"
  },
  gridWidth: {
    part: "grid",
    vgProp: "strokeWidth"
  },
  tickColor: {
    part: "ticks",
    vgProp: "stroke"
  },
  tickDash: {
    part: "ticks",
    vgProp: "strokeDash"
  },
  tickDashOffset: {
    part: "ticks",
    vgProp: "strokeDashOffset"
  },
  tickOpacity: {
    part: "ticks",
    vgProp: "opacity"
  },
  tickSize: null,
  // There is no fixed vgProp for tickSize, need to use signal.
  tickWidth: {
    part: "ticks",
    vgProp: "strokeWidth"
  }
};
function W4(e) {
  return e == null ? void 0 : e.condition;
}
const mre = ["domain", "grid", "labels", "ticks", "title"], iPe = {
  grid: "grid",
  gridCap: "grid",
  gridColor: "grid",
  gridDash: "grid",
  gridDashOffset: "grid",
  gridOpacity: "grid",
  gridScale: "grid",
  gridWidth: "grid",
  orient: "main",
  bandPosition: "both",
  // Need to be applied to grid axis too, so the grid will align with ticks.
  aria: "main",
  description: "main",
  domain: "main",
  domainCap: "main",
  domainColor: "main",
  domainDash: "main",
  domainDashOffset: "main",
  domainOpacity: "main",
  domainWidth: "main",
  format: "main",
  formatType: "main",
  labelAlign: "main",
  labelAngle: "main",
  labelBaseline: "main",
  labelBound: "main",
  labelColor: "main",
  labelFlush: "main",
  labelFlushOffset: "main",
  labelFont: "main",
  labelFontSize: "main",
  labelFontStyle: "main",
  labelFontWeight: "main",
  labelLimit: "main",
  labelLineHeight: "main",
  labelOffset: "main",
  labelOpacity: "main",
  labelOverlap: "main",
  labelPadding: "main",
  labels: "main",
  labelSeparation: "main",
  maxExtent: "main",
  minExtent: "main",
  offset: "both",
  position: "main",
  tickCap: "main",
  tickColor: "main",
  tickDash: "main",
  tickDashOffset: "main",
  tickMinStep: "both",
  tickOffset: "both",
  // Need to be applied to grid axis too, so the grid will align with ticks.
  tickOpacity: "main",
  tickRound: "both",
  // Apply rounding to grid and ticks so they are aligned.
  ticks: "main",
  tickSize: "main",
  tickWidth: "both",
  title: "main",
  titleAlign: "main",
  titleAnchor: "main",
  titleAngle: "main",
  titleBaseline: "main",
  titleColor: "main",
  titleFont: "main",
  titleFontSize: "main",
  titleFontStyle: "main",
  titleFontWeight: "main",
  titleLimit: "main",
  titleLineHeight: "main",
  titleOpacity: "main",
  titlePadding: "main",
  titleX: "main",
  titleY: "main",
  encode: "both",
  // we hide this in Vega-Lite
  scale: "both",
  tickBand: "both",
  tickCount: "both",
  tickExtra: "both",
  translate: "both",
  values: "both",
  zindex: "both"
  // this is actually set afterward, so it doesn't matter
}, gre = {
  orient: 1,
  // other things can depend on orient
  aria: 1,
  bandPosition: 1,
  description: 1,
  domain: 1,
  domainCap: 1,
  domainColor: 1,
  domainDash: 1,
  domainDashOffset: 1,
  domainOpacity: 1,
  domainWidth: 1,
  format: 1,
  formatType: 1,
  grid: 1,
  gridCap: 1,
  gridColor: 1,
  gridDash: 1,
  gridDashOffset: 1,
  gridOpacity: 1,
  gridWidth: 1,
  labelAlign: 1,
  labelAngle: 1,
  labelBaseline: 1,
  labelBound: 1,
  labelColor: 1,
  labelFlush: 1,
  labelFlushOffset: 1,
  labelFont: 1,
  labelFontSize: 1,
  labelFontStyle: 1,
  labelFontWeight: 1,
  labelLimit: 1,
  labelLineHeight: 1,
  labelOffset: 1,
  labelOpacity: 1,
  labelOverlap: 1,
  labelPadding: 1,
  labels: 1,
  labelSeparation: 1,
  maxExtent: 1,
  minExtent: 1,
  offset: 1,
  position: 1,
  tickBand: 1,
  tickCap: 1,
  tickColor: 1,
  tickCount: 1,
  tickDash: 1,
  tickDashOffset: 1,
  tickExtra: 1,
  tickMinStep: 1,
  tickOffset: 1,
  tickOpacity: 1,
  tickRound: 1,
  ticks: 1,
  tickSize: 1,
  tickWidth: 1,
  title: 1,
  titleAlign: 1,
  titleAnchor: 1,
  titleAngle: 1,
  titleBaseline: 1,
  titleColor: 1,
  titleFont: 1,
  titleFontSize: 1,
  titleFontStyle: 1,
  titleFontWeight: 1,
  titleLimit: 1,
  titleLineHeight: 1,
  titleOpacity: 1,
  titlePadding: 1,
  titleX: 1,
  titleY: 1,
  translate: 1,
  values: 1,
  zindex: 1
}, aPe = {
  ...gre,
  style: 1,
  labelExpr: 1,
  encoding: 1
};
function c$(e) {
  return !!aPe[e];
}
const oPe = {
  axis: 1,
  axisBand: 1,
  axisBottom: 1,
  axisDiscrete: 1,
  axisLeft: 1,
  axisPoint: 1,
  axisQuantitative: 1,
  axisRight: 1,
  axisTemporal: 1,
  axisTop: 1,
  axisX: 1,
  axisXBand: 1,
  axisXDiscrete: 1,
  axisXPoint: 1,
  axisXQuantitative: 1,
  axisXTemporal: 1,
  axisY: 1,
  axisYBand: 1,
  axisYDiscrete: 1,
  axisYPoint: 1,
  axisYQuantitative: 1,
  axisYTemporal: 1
}, yre = ui(oPe);
function r1(e) {
  return "mark" in e;
}
class HT {
  constructor(t, r) {
    this.name = t, this.run = r;
  }
  hasMatchingType(t) {
    return r1(t) ? OLe(t.mark) === this.name : !1;
  }
}
function hv(e, t) {
  const r = e && e[t];
  return r ? Qr(r) ? Kx(r, (a) => !!a.field) : gi(r) || VT(r) : !1;
}
function vre(e, t) {
  const r = e && e[t];
  return r ? Qr(r) ? Kx(r, (a) => !!a.field) : gi(r) || K0(r) || H4(r) : !1;
}
function xre(e, t) {
  if (Yu(t)) {
    const r = e[t];
    if ((gi(r) || K0(r)) && (Nne(r.type) || gi(r) && r.timeUnit)) {
      const a = Iz(t);
      return vre(e, a);
    }
  }
  return !1;
}
function bre(e) {
  return Kx(aIe, (t) => {
    if (hv(e, t)) {
      const r = e[t];
      if (Qr(r))
        return Kx(r, (a) => !!a.aggregate);
      {
        const a = kp(r);
        return a && !!a.aggregate;
      }
    }
    return !1;
  });
}
function _re(e, t) {
  const r = [], a = [], v = [], o = [], s = {};
  return lR(e, (n, l) => {
    if (gi(n)) {
      const { field: u, aggregate: i, bin: h, timeUnit: p, ..._ } = n;
      if (i || p || h) {
        const d = aR(n), f = d == null ? void 0 : d.title;
        let c = Mi(n, { forAs: !0 });
        const g = {
          // Only add title if it doesn't exist
          ...f ? [] : { title: kx(n, t, { allowDisabling: !0 }) },
          ..._,
          // Always overwrite field
          field: c
        };
        if (i) {
          let m;
          if (Yg(i) ? (m = "argmax", c = Mi({ op: "argmax", field: i.argmax }, { forAs: !0 }), g.field = `${c}.${u}`) : Hm(i) ? (m = "argmin", c = Mi({ op: "argmin", field: i.argmin }, { forAs: !0 }), g.field = `${c}.${u}`) : i !== "boxplot" && i !== "errorbar" && i !== "errorband" && (m = i), m) {
            const x = {
              op: m,
              as: c
            };
            u && (x.field = u), o.push(x);
          }
        } else if (r.push(c), hh(n) && hl(h)) {
          if (a.push({ bin: h, field: u, as: c }), r.push(Mi(n, { binSuffix: "end" })), G4(n, l) && r.push(Mi(n, { binSuffix: "range" })), Yu(l)) {
            const m = {
              field: `${c}_end`
            };
            s[`${l}2`] = m;
          }
          g.bin = "binned", ane(l) || (g.type = Ov);
        } else if (p && !t2(p)) {
          v.push({
            timeUnit: p,
            field: u,
            as: c
          });
          const m = hh(n) && n.type !== tb && "time";
          m && (l === N4 || l === Lv ? g.formatType = m : mIe(l) ? g.legend = {
            formatType: m,
            ...g.legend
          } : Yu(l) && (g.axis = {
            formatType: m,
            ...g.axis
          }));
        }
        s[l] = g;
      } else
        r.push(u), s[l] = e[l];
    } else
      s[l] = e[l];
  }), {
    bins: a,
    timeUnits: v,
    aggregate: o,
    groupby: r,
    encoding: s
  };
}
function sPe(e, t, r) {
  const a = yIe(t, r);
  if (a) {
    if (a === "binned") {
      const v = e[t === Ip ? Yl : Qc];
      return !!(gi(v) && gi(e[t]) && af(v.bin));
    }
  } else return !1;
  return !0;
}
function lPe(e, t, r, a) {
  const v = {};
  for (const o of ui(e))
    ine(o) || mi(iDe(o));
  for (let o of fIe) {
    if (!e[o])
      continue;
    const s = e[o];
    if (j4(o)) {
      const n = cIe(o), l = v[n];
      if (gi(l) && rLe(l.type) && gi(s) && !l.timeUnit) {
        mi(JIe(n));
        continue;
      }
    }
    if (o === "angle" && t === "arc" && !e.theta && (mi(KIe), o = Bd), !sPe(e, o, t)) {
      mi(LT(o, t));
      continue;
    }
    if (o === e1 && t === "line") {
      const n = kp(e[o]);
      if (n != null && n.aggregate) {
        mi(rDe);
        continue;
      }
    }
    if (o === Rh && (r ? "fill" in e : "stroke" in e)) {
      mi(wne("encoding", { fill: "fill" in e, stroke: "stroke" in e }));
      continue;
    }
    if (o === B4 || o === Qx && !Qr(s) && !wp(s) || o === Lv && Qr(s)) {
      if (s) {
        if (o === Qx) {
          const n = e[o];
          if (sre(n)) {
            v[o] = n;
            continue;
          }
        }
        v[o] = Ri(s).reduce((n, l) => (gi(l) ? n.push(sR(l, o)) : mi(vI(l, o)), n), []);
      }
    } else {
      if (o === Lv && s === null)
        v[o] = null;
      else if (!gi(s) && !K0(s) && !wp(s) && !UT(s) && !Ji(s)) {
        mi(vI(s, o));
        continue;
      }
      v[o] = dre(s, o, a);
    }
  }
  return v;
}
function GT(e, t) {
  const r = {};
  for (const a of ui(e)) {
    const v = dre(e[a], a, t, { compositeMark: !0 });
    r[a] = v;
  }
  return r;
}
function uPe(e) {
  const t = [];
  for (const r of ui(e))
    if (hv(e, r)) {
      const a = e[r], v = Ri(a);
      for (const o of v)
        gi(o) ? t.push(o) : VT(o) && t.push(o.condition);
    }
  return t;
}
function lR(e, t, r) {
  if (e)
    for (const a of ui(e)) {
      const v = e[a];
      if (Qr(v))
        for (const o of v)
          t.call(r, o, a);
      else
        t.call(r, v, a);
    }
}
function cPe(e, t, r, a) {
  return e ? ui(e).reduce((v, o) => {
    const s = e[o];
    return Qr(s) ? s.reduce((n, l) => t.call(a, n, l, o), v) : t.call(a, v, s, o);
  }, r) : r;
}
function wre(e, t) {
  return ui(t).reduce((r, a) => {
    switch (a) {
      case Yl:
      case Qc:
      case ST:
      case ET:
      case MT:
      case Ip:
      case G0:
      case $g:
      case Rb:
      case Bd:
      case Qm:
      case Dp:
      case Jm:
      case Lp:
      case Pp:
      case Op:
      case Fd:
      case N4:
      case Fh:
      case Kv:
      case Lv:
        return r;
      case Qx:
        if (e === "line" || e === "trail")
          return r;
      case B4:
      case AT: {
        const v = t[a];
        if (Qr(v) || gi(v))
          for (const o of Ri(v))
            o.aggregate || r.push(Mi(o, {}));
        return r;
      }
      case e1:
        if (e === "trail")
          return r;
      case Rh:
      case W0:
      case Y0:
      case t1:
      case qg:
      case Hg:
      case Wg:
      case Gg: {
        const v = kp(t[a]);
        return v && !v.aggregate && r.push(Mi(v, {})), r;
      }
    }
  }, []);
}
function fPe(e) {
  const { tooltip: t, ...r } = e;
  if (!t)
    return { filteredEncoding: r };
  let a, v;
  if (Qr(t)) {
    for (const o of t)
      o.aggregate ? (a || (a = []), a.push(o)) : (v || (v = []), v.push(o));
    a && (r.tooltip = a);
  } else
    t.aggregate ? r.tooltip = t : v = t;
  return Qr(v) && v.length === 1 && (v = v[0]), { customTooltipWithoutAggregatedField: v, filteredEncoding: r };
}
function wI(e, t, r, a = !0) {
  if ("tooltip" in r)
    return { tooltip: r.tooltip };
  const v = e.map(({ fieldPrefix: s, titlePrefix: n }) => {
    const l = a ? ` of ${uR(t)}` : "";
    return {
      field: s + t.field,
      type: t.type,
      title: Ji(n) ? { signal: `${n}"${escape(l)}"` } : n + l
    };
  }), o = uPe(r).map(WLe);
  return {
    tooltip: [
      ...v,
      // need to cast because TextFieldDef supports fewer types of bin
      ...d0(o, lo)
    ]
  };
}
function uR(e) {
  const { title: t, field: r } = e;
  return Wu(t, r);
}
function cR(e, t, r, a, v) {
  const { scale: o, axis: s } = r;
  return ({ partName: n, mark: l, positionPrefix: u, endPositionPrefix: i = void 0, extraEncoding: h = {} }) => {
    const p = uR(r);
    return kre(e, n, v, {
      mark: l,
      // TODO better remove this method and just have mark as a parameter of the method
      encoding: {
        [t]: {
          field: `${u}_${r.field}`,
          type: r.type,
          ...p !== void 0 ? { title: p } : {},
          ...o !== void 0 ? { scale: o } : {},
          ...s !== void 0 ? { axis: s } : {}
        },
        ...Fi(i) ? {
          [`${t}2`]: {
            field: `${i}_${r.field}`
          }
        } : {},
        ...a,
        ...h
      }
    });
  };
}
function kre(e, t, r, a) {
  const { clip: v, color: o, opacity: s } = e, n = e.type;
  return e[t] || e[t] === void 0 && r[t] ? [
    {
      ...a,
      mark: {
        ...r[t],
        ...v ? { clip: v } : {},
        ...o ? { color: o } : {},
        ...s ? { opacity: s } : {},
        ...O0(a.mark) ? a.mark : { type: a.mark },
        style: `${n}-${String(t)}`,
        ...Rg(e[t]) ? {} : e[t]
      }
    }
  ] : [];
}
function Tre(e, t, r) {
  const { encoding: a } = e, v = t === "vertical" ? "y" : "x", o = a[v], s = a[`${v}2`], n = a[`${v}Error`], l = a[`${v}Error2`];
  return {
    continuousAxisChannelDef: B6(o, r),
    continuousAxisChannelDef2: B6(s, r),
    continuousAxisChannelDefError: B6(n, r),
    continuousAxisChannelDefError2: B6(l, r),
    continuousAxis: v
  };
}
function B6(e, t) {
  if (e != null && e.aggregate) {
    const { aggregate: r, ...a } = e;
    return r !== t && mi(LDe(r, t)), a;
  } else
    return e;
}
function Are(e, t) {
  const { mark: r, encoding: a } = e, { x: v, y: o } = a;
  if (O0(r) && r.orient)
    return r.orient;
  if (og(v)) {
    if (og(o)) {
      const s = gi(v) && v.aggregate, n = gi(o) && o.aggregate;
      if (!s && n === t)
        return "vertical";
      if (!n && s === t)
        return "horizontal";
      if (s === t && n === t)
        throw new Error("Both x and y cannot have aggregate");
      return ab(o) && !ab(v) ? "horizontal" : "vertical";
    }
    return "horizontal";
  } else {
    if (og(o))
      return "vertical";
    throw new Error(`Need a valid continuous axis for ${t}s`);
  }
}
const Ik = "boxplot", hPe = ["box", "median", "outliers", "rule", "ticks"], dPe = new HT(Ik, Mre);
function Sre(e) {
  return Ro(e) ? "tukey" : e;
}
function Mre(e, { config: t }) {
  e = {
    ...e,
    encoding: GT(e.encoding, t)
  };
  const { mark: r, encoding: a, params: v, projection: o, ...s } = e, n = O0(r) ? r : { type: r };
  v && mi(bne("boxplot"));
  const l = n.extent ?? t.boxplot.extent, u = Cs(
    "size",
    n,
    // TODO: https://github.com/vega/vega-lite/issues/6245
    t
  ), i = n.invalid, h = Sre(l), { bins: p, timeUnits: _, transform: d, continuousAxisChannelDef: f, continuousAxis: c, groupby: g, aggregate: m, encodingWithoutContinuousAxis: x, ticksOrient: w, boxOrient: k, customTooltipWithoutAggregatedField: S } = pPe(e, l, t), A = zb(f.field), { color: C, size: D, ...L } = x, E = (ye) => cR(n, c, f, ye, t.boxplot), P = E(L), I = E(x), M = (Oi(t.boxplot.box) ? t.boxplot.box.color : t.mark.color) || "#4c78a8", O = E({
    ...L,
    ...D ? { size: D } : {},
    color: {
      condition: {
        test: `datum['lower_box_${f.field}'] >= datum['upper_box_${f.field}']`,
        ...C || { value: M }
      }
    }
  }), T = wI([
    { fieldPrefix: h === "min-max" ? "upper_whisker_" : "max_", titlePrefix: "Max" },
    { fieldPrefix: "upper_box_", titlePrefix: "Q3" },
    { fieldPrefix: "mid_box_", titlePrefix: "Median" },
    { fieldPrefix: "lower_box_", titlePrefix: "Q1" },
    { fieldPrefix: h === "min-max" ? "lower_whisker_" : "min_", titlePrefix: "Min" }
  ], f, x), z = { type: "tick", color: "black", opacity: 1, orient: w, invalid: i, aria: !1 }, F = h === "min-max" ? T : (
    // for tukey / k-IQR, just show upper/lower-whisker
    wI([
      { fieldPrefix: "upper_whisker_", titlePrefix: "Upper Whisker" },
      { fieldPrefix: "lower_whisker_", titlePrefix: "Lower Whisker" }
    ], f, x)
  ), U = [
    ...P({
      partName: "rule",
      mark: { type: "rule", invalid: i, aria: !1 },
      positionPrefix: "lower_whisker",
      endPositionPrefix: "lower_box",
      extraEncoding: F
    }),
    ...P({
      partName: "rule",
      mark: { type: "rule", invalid: i, aria: !1 },
      positionPrefix: "upper_box",
      endPositionPrefix: "upper_whisker",
      extraEncoding: F
    }),
    ...P({
      partName: "ticks",
      mark: z,
      positionPrefix: "lower_whisker",
      extraEncoding: F
    }),
    ...P({
      partName: "ticks",
      mark: z,
      positionPrefix: "upper_whisker",
      extraEncoding: F
    })
  ], V = [
    ...h !== "tukey" ? U : [],
    ...I({
      partName: "box",
      mark: {
        type: "bar",
        ...u ? { size: u } : {},
        orient: k,
        invalid: i,
        ariaRoleDescription: "box"
      },
      positionPrefix: "lower_box",
      endPositionPrefix: "upper_box",
      extraEncoding: T
    }),
    ...O({
      partName: "median",
      mark: {
        type: "tick",
        invalid: i,
        ...Oi(t.boxplot.median) && t.boxplot.median.color ? { color: t.boxplot.median.color } : {},
        ...u ? { size: u } : {},
        orient: w,
        aria: !1
      },
      positionPrefix: "mid_box",
      extraEncoding: T
    })
  ];
  if (h === "min-max")
    return {
      ...s,
      transform: (s.transform ?? []).concat(d),
      layer: V
    };
  const $ = `datum["lower_box_${f.field}"]`, q = `datum["upper_box_${f.field}"]`, K = `(${q} - ${$})`, re = `${$} - ${l} * ${K}`, Y = `${q} + ${l} * ${K}`, te = `datum["${f.field}"]`, ee = {
    joinaggregate: Ere(f.field),
    groupby: g
  }, X = {
    transform: [
      {
        filter: `(${re} <= ${te}) && (${te} <= ${Y})`
      },
      {
        aggregate: [
          {
            op: "min",
            field: f.field,
            as: `lower_whisker_${A}`
          },
          {
            op: "max",
            field: f.field,
            as: `upper_whisker_${A}`
          },
          // preserve lower_box / upper_box
          {
            op: "min",
            field: `lower_box_${f.field}`,
            as: `lower_box_${A}`
          },
          {
            op: "max",
            field: `upper_box_${f.field}`,
            as: `upper_box_${A}`
          },
          ...m
        ],
        groupby: g
      }
    ],
    layer: U
  }, { tooltip: Q, ...ue } = L, { scale: ce, axis: he } = f, de = uR(f), ne = Ih(he, ["title"]), ae = kre(n, "outliers", t.boxplot, {
    transform: [{ filter: `(${te} < ${re}) || (${te} > ${Y})` }],
    mark: "point",
    encoding: {
      [c]: {
        field: f.field,
        type: f.type,
        ...de !== void 0 ? { title: de } : {},
        ...ce !== void 0 ? { scale: ce } : {},
        // add axis without title since we already added the title above
        ...Rs(ne) ? {} : { axis: ne }
      },
      ...ue,
      ...C ? { color: C } : {},
      ...S ? { tooltip: S } : {}
    }
  })[0];
  let se;
  const me = [...p, ..._, ee];
  return ae ? se = {
    transform: me,
    layer: [ae, X]
  } : (se = X, se.transform.unshift(...me)), {
    ...s,
    layer: [
      se,
      {
        // boxplot
        transform: d,
        layer: V
      }
    ]
  };
}
function Ere(e) {
  const t = zb(e);
  return [
    {
      op: "q1",
      field: e,
      as: `lower_box_${t}`
    },
    {
      op: "q3",
      field: e,
      as: `upper_box_${t}`
    }
  ];
}
function pPe(e, t, r) {
  const a = Are(e, Ik), { continuousAxisChannelDef: v, continuousAxis: o } = Tre(e, a, Ik), s = v.field, n = zb(s), l = Sre(t), u = [
    ...Ere(s),
    {
      op: "median",
      field: s,
      as: `mid_box_${n}`
    },
    {
      op: "min",
      field: s,
      as: (l === "min-max" ? "lower_whisker_" : "min_") + n
    },
    {
      op: "max",
      field: s,
      as: (l === "min-max" ? "upper_whisker_" : "max_") + n
    }
  ], i = l === "min-max" || l === "tukey" ? [] : [
    // This is for the  original k-IQR, which we do not expose
    {
      calculate: `datum["upper_box_${n}"] - datum["lower_box_${n}"]`,
      as: `iqr_${n}`
    },
    {
      calculate: `min(datum["upper_box_${n}"] + datum["iqr_${n}"] * ${t}, datum["max_${n}"])`,
      as: `upper_whisker_${n}`
    },
    {
      calculate: `max(datum["lower_box_${n}"] - datum["iqr_${n}"] * ${t}, datum["min_${n}"])`,
      as: `lower_whisker_${n}`
    }
  ], { [o]: h, ...p } = e.encoding, { customTooltipWithoutAggregatedField: _, filteredEncoding: d } = fPe(p), { bins: f, timeUnits: c, aggregate: g, groupby: m, encoding: x } = _re(d, r), w = a === "vertical" ? "horizontal" : "vertical", k = a, S = [
    ...f,
    ...c,
    {
      aggregate: [...g, ...u],
      groupby: m
    },
    ...i
  ];
  return {
    bins: f,
    timeUnits: c,
    transform: S,
    groupby: m,
    aggregate: g,
    continuousAxisChannelDef: v,
    continuousAxis: o,
    encodingWithoutContinuousAxis: x,
    ticksOrient: w,
    boxOrient: k,
    customTooltipWithoutAggregatedField: _
  };
}
const fR = "errorbar", mPe = ["ticks", "rule"], gPe = new HT(fR, Cre);
function Cre(e, { config: t }) {
  e = {
    ...e,
    encoding: GT(e.encoding, t)
  };
  const { transform: r, continuousAxisChannelDef: a, continuousAxis: v, encodingWithoutContinuousAxis: o, ticksOrient: s, markDef: n, outerSpec: l, tooltipEncoding: u } = Ire(e, fR, t);
  delete o.size;
  const i = cR(n, v, a, o, t.errorbar), h = n.thickness, p = n.size, _ = {
    type: "tick",
    orient: s,
    aria: !1,
    ...h !== void 0 ? { thickness: h } : {},
    ...p !== void 0 ? { size: p } : {}
  }, d = [
    ...i({
      partName: "ticks",
      mark: _,
      positionPrefix: "lower",
      extraEncoding: u
    }),
    ...i({
      partName: "ticks",
      mark: _,
      positionPrefix: "upper",
      extraEncoding: u
    }),
    ...i({
      partName: "rule",
      mark: {
        type: "rule",
        ariaRoleDescription: "errorbar",
        ...h !== void 0 ? { size: h } : {}
      },
      positionPrefix: "lower",
      endPositionPrefix: "upper",
      extraEncoding: u
    })
  ];
  return {
    ...l,
    transform: r,
    ...d.length > 1 ? { layer: d } : { ...d[0] }
  };
}
function yPe(e, t) {
  const { encoding: r } = e;
  if (vPe(r))
    return {
      orient: Are(e, t),
      inputType: "raw"
    };
  const a = xPe(r), v = bPe(r), o = r.x, s = r.y;
  if (a) {
    if (v)
      throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);
    const n = r.x2, l = r.y2;
    if (La(n) && La(l))
      throw new Error(`${t} cannot have both x2 and y2`);
    if (La(n)) {
      if (og(o))
        return { orient: "horizontal", inputType: "aggregated-upper-lower" };
      throw new Error(`Both x and x2 have to be quantitative in ${t}`);
    } else if (La(l)) {
      if (og(s))
        return { orient: "vertical", inputType: "aggregated-upper-lower" };
      throw new Error(`Both y and y2 have to be quantitative in ${t}`);
    }
    throw new Error("No ranged axis");
  } else {
    const n = r.xError, l = r.xError2, u = r.yError, i = r.yError2;
    if (La(l) && !La(n))
      throw new Error(`${t} cannot have xError2 without xError`);
    if (La(i) && !La(u))
      throw new Error(`${t} cannot have yError2 without yError`);
    if (La(n) && La(u))
      throw new Error(`${t} cannot have both xError and yError with both are quantiative`);
    if (La(n)) {
      if (og(o))
        return { orient: "horizontal", inputType: "aggregated-error" };
      throw new Error("All x, xError, and xError2 (if exist) have to be quantitative");
    } else if (La(u)) {
      if (og(s))
        return { orient: "vertical", inputType: "aggregated-error" };
      throw new Error("All y, yError, and yError2 (if exist) have to be quantitative");
    }
    throw new Error("No ranged axis");
  }
}
function vPe(e) {
  return (La(e.x) || La(e.y)) && !La(e.x2) && !La(e.y2) && !La(e.xError) && !La(e.xError2) && !La(e.yError) && !La(e.yError2);
}
function xPe(e) {
  return La(e.x2) || La(e.y2);
}
function bPe(e) {
  return La(e.xError) || La(e.xError2) || La(e.yError) || La(e.yError2);
}
function Ire(e, t, r) {
  const { mark: a, encoding: v, params: o, projection: s, ...n } = e, l = O0(a) ? a : { type: a };
  o && mi(bne(t));
  const { orient: u, inputType: i } = yPe(e, t), { continuousAxisChannelDef: h, continuousAxisChannelDef2: p, continuousAxisChannelDefError: _, continuousAxisChannelDefError2: d, continuousAxis: f } = Tre(e, u, t), { errorBarSpecificAggregate: c, postAggregateCalculates: g, tooltipSummary: m, tooltipTitleWithFieldName: x } = _Pe(l, h, p, _, d, i, t, r), { [f]: w, [f === "x" ? "x2" : "y2"]: k, [f === "x" ? "xError" : "yError"]: S, [f === "x" ? "xError2" : "yError2"]: A, ...C } = v, { bins: D, timeUnits: L, aggregate: E, groupby: P, encoding: I } = _re(C, r), M = [...E, ...c], O = i !== "raw" ? [] : P, T = wI(m, h, I, x);
  return {
    transform: [
      ...n.transform ?? [],
      ...D,
      ...L,
      ...M.length === 0 ? [] : [{ aggregate: M, groupby: O }],
      ...g
    ],
    groupby: O,
    continuousAxisChannelDef: h,
    continuousAxis: f,
    encodingWithoutContinuousAxis: I,
    ticksOrient: u === "vertical" ? "horizontal" : "vertical",
    markDef: l,
    outerSpec: n,
    tooltipEncoding: T
  };
}
function _Pe(e, t, r, a, v, o, s, n) {
  let l = [], u = [];
  const i = t.field;
  let h, p = !1;
  if (o === "raw") {
    const _ = e.center ? e.center : e.extent ? e.extent === "iqr" ? "median" : "mean" : n.errorbar.center, d = e.extent ? e.extent : _ === "mean" ? "stderr" : "iqr";
    if (_ === "median" != (d === "iqr") && mi(DDe(_, d, s)), d === "stderr" || d === "stdev")
      l = [
        { op: d, field: i, as: `extent_${i}` },
        { op: _, field: i, as: `center_${i}` }
      ], u = [
        {
          calculate: `datum["center_${i}"] + datum["extent_${i}"]`,
          as: `upper_${i}`
        },
        {
          calculate: `datum["center_${i}"] - datum["extent_${i}"]`,
          as: `lower_${i}`
        }
      ], h = [
        { fieldPrefix: "center_", titlePrefix: F4(_) },
        { fieldPrefix: "upper_", titlePrefix: f$(_, d, "+") },
        { fieldPrefix: "lower_", titlePrefix: f$(_, d, "-") }
      ], p = !0;
    else {
      let f, c, g;
      d === "ci" ? (f = "mean", c = "ci0", g = "ci1") : (f = "median", c = "q1", g = "q3"), l = [
        { op: c, field: i, as: `lower_${i}` },
        { op: g, field: i, as: `upper_${i}` },
        { op: f, field: i, as: `center_${i}` }
      ], h = [
        {
          fieldPrefix: "upper_",
          titlePrefix: kx({ field: i, aggregate: g, type: "quantitative" }, n, {
            allowDisabling: !1
          })
        },
        {
          fieldPrefix: "lower_",
          titlePrefix: kx({ field: i, aggregate: c, type: "quantitative" }, n, {
            allowDisabling: !1
          })
        },
        {
          fieldPrefix: "center_",
          titlePrefix: kx({ field: i, aggregate: f, type: "quantitative" }, n, {
            allowDisabling: !1
          })
        }
      ];
    }
  } else {
    (e.center || e.extent) && mi(IDe(e.center, e.extent)), o === "aggregated-upper-lower" ? (h = [], u = [
      { calculate: `datum["${r.field}"]`, as: `upper_${i}` },
      { calculate: `datum["${i}"]`, as: `lower_${i}` }
    ]) : o === "aggregated-error" && (h = [{ fieldPrefix: "", titlePrefix: i }], u = [
      {
        calculate: `datum["${i}"] + datum["${a.field}"]`,
        as: `upper_${i}`
      }
    ], v ? u.push({
      calculate: `datum["${i}"] + datum["${v.field}"]`,
      as: `lower_${i}`
    }) : u.push({
      calculate: `datum["${i}"] - datum["${a.field}"]`,
      as: `lower_${i}`
    }));
    for (const _ of u)
      h.push({
        fieldPrefix: _.as.substring(0, 6),
        titlePrefix: Dv(Dv(_.calculate, 'datum["', ""), '"]', "")
      });
  }
  return { postAggregateCalculates: u, errorBarSpecificAggregate: l, tooltipSummary: h, tooltipTitleWithFieldName: p };
}
function f$(e, t, r) {
  return `${F4(e)} ${r} ${t}`;
}
const hR = "errorband", wPe = ["band", "borders"], kPe = new HT(hR, Dre);
function Dre(e, { config: t }) {
  e = {
    ...e,
    encoding: GT(e.encoding, t)
  };
  const { transform: r, continuousAxisChannelDef: a, continuousAxis: v, encodingWithoutContinuousAxis: o, markDef: s, outerSpec: n, tooltipEncoding: l } = Ire(e, hR, t), u = s, i = cR(u, v, a, o, t.errorband), h = e.encoding.x !== void 0 && e.encoding.y !== void 0;
  let p = { type: h ? "area" : "rect" }, _ = { type: h ? "line" : "rule" };
  const d = {
    ...u.interpolate ? { interpolate: u.interpolate } : {},
    ...u.tension && u.interpolate ? { tension: u.tension } : {}
  };
  return h ? (p = {
    ...p,
    ...d,
    ariaRoleDescription: "errorband"
  }, _ = {
    ..._,
    ...d,
    aria: !1
  }) : u.interpolate ? mi(n$("interpolate")) : u.tension && mi(n$("tension")), {
    ...n,
    transform: r,
    layer: [
      ...i({
        partName: "band",
        mark: p,
        positionPrefix: "lower",
        endPositionPrefix: "upper",
        extraEncoding: l
      }),
      ...i({
        partName: "borders",
        mark: _,
        positionPrefix: "lower",
        extraEncoding: l
      }),
      ...i({
        partName: "borders",
        mark: _,
        positionPrefix: "upper",
        extraEncoding: l
      })
    ]
  };
}
const Lre = {};
function dR(e, t, r) {
  const a = new HT(e, t);
  Lre[e] = { normalizer: a, parts: r };
}
function TPe() {
  return ui(Lre);
}
dR(Ik, Mre, hPe);
dR(fR, Cre, mPe);
dR(hR, Dre, wPe);
const APe = [
  "gradientHorizontalMaxLength",
  "gradientHorizontalMinLength",
  "gradientVerticalMaxLength",
  "gradientVerticalMinLength",
  "unselectedOpacity"
], Pre = {
  titleAlign: "align",
  titleAnchor: "anchor",
  titleAngle: "angle",
  titleBaseline: "baseline",
  titleColor: "color",
  titleFont: "font",
  titleFontSize: "fontSize",
  titleFontStyle: "fontStyle",
  titleFontWeight: "fontWeight",
  titleLimit: "limit",
  titleLineHeight: "lineHeight",
  titleOrient: "orient",
  titlePadding: "offset"
}, Ore = {
  labelAlign: "align",
  labelAnchor: "anchor",
  labelAngle: "angle",
  labelBaseline: "baseline",
  labelColor: "color",
  labelFont: "font",
  labelFontSize: "fontSize",
  labelFontStyle: "fontStyle",
  labelFontWeight: "fontWeight",
  labelLimit: "limit",
  labelLineHeight: "lineHeight",
  labelOrient: "orient",
  labelPadding: "offset"
}, SPe = ui(Pre), MPe = ui(Ore), EPe = {
  header: 1,
  headerRow: 1,
  headerColumn: 1,
  headerFacet: 1
}, zre = ui(EPe), Rre = [
  "size",
  "shape",
  "fill",
  "stroke",
  "strokeDash",
  "strokeWidth",
  "opacity"
], CPe = {
  gradientHorizontalMaxLength: 200,
  gradientHorizontalMinLength: 100,
  gradientVerticalMaxLength: 200,
  gradientVerticalMinLength: 64,
  // This is Vega's minimum.
  unselectedOpacity: 0.35
}, IPe = {
  aria: 1,
  clipHeight: 1,
  columnPadding: 1,
  columns: 1,
  cornerRadius: 1,
  description: 1,
  direction: 1,
  fillColor: 1,
  format: 1,
  formatType: 1,
  gradientLength: 1,
  gradientOpacity: 1,
  gradientStrokeColor: 1,
  gradientStrokeWidth: 1,
  gradientThickness: 1,
  gridAlign: 1,
  labelAlign: 1,
  labelBaseline: 1,
  labelColor: 1,
  labelFont: 1,
  labelFontSize: 1,
  labelFontStyle: 1,
  labelFontWeight: 1,
  labelLimit: 1,
  labelOffset: 1,
  labelOpacity: 1,
  labelOverlap: 1,
  labelPadding: 1,
  labelSeparation: 1,
  legendX: 1,
  legendY: 1,
  offset: 1,
  orient: 1,
  padding: 1,
  rowPadding: 1,
  strokeColor: 1,
  symbolDash: 1,
  symbolDashOffset: 1,
  symbolFillColor: 1,
  symbolLimit: 1,
  symbolOffset: 1,
  symbolOpacity: 1,
  symbolSize: 1,
  symbolStrokeColor: 1,
  symbolStrokeWidth: 1,
  symbolType: 1,
  tickCount: 1,
  tickMinStep: 1,
  title: 1,
  titleAlign: 1,
  titleAnchor: 1,
  titleBaseline: 1,
  titleColor: 1,
  titleFont: 1,
  titleFontSize: 1,
  titleFontStyle: 1,
  titleFontWeight: 1,
  titleLimit: 1,
  titleLineHeight: 1,
  titleOpacity: 1,
  titleOrient: 1,
  titlePadding: 1,
  type: 1,
  values: 1,
  zindex: 1
}, Tp = "_vgsid_", DPe = {
  point: {
    on: "click",
    fields: [Tp],
    toggle: "event.shiftKey",
    resolve: "global",
    clear: "dblclick"
  },
  interval: {
    on: "[pointerdown, window:pointerup] > window:pointermove!",
    encodings: ["x", "y"],
    translate: "[pointerdown, window:pointerup] > window:pointermove!",
    zoom: "wheel!",
    mark: { fill: "#333", fillOpacity: 0.125, stroke: "white" },
    resolve: "global",
    clear: "dblclick"
  }
};
function pR(e) {
  return e === "legend" || !!(e != null && e.legend);
}
function FM(e) {
  return pR(e) && Oi(e);
}
function mR(e) {
  return !!(e != null && e.select);
}
function Fre(e) {
  const t = [];
  for (const r of e || []) {
    if (mR(r))
      continue;
    const { expr: a, bind: v, ...o } = r;
    if (v && a) {
      const s = {
        ...o,
        bind: v,
        init: a
      };
      t.push(s);
    } else {
      const s = {
        ...o,
        ...a ? { update: a } : {},
        ...v ? { bind: v } : {}
      };
      t.push(s);
    }
  }
  return t;
}
function LPe(e) {
  return WT(e) || yR(e) || gR(e);
}
function gR(e) {
  return "concat" in e;
}
function WT(e) {
  return "vconcat" in e;
}
function yR(e) {
  return "hconcat" in e;
}
function Nre({ step: e, offsetIsDiscrete: t }) {
  return t ? e.for ?? "offset" : "position";
}
function z0(e) {
  return Oi(e) && e.step !== void 0;
}
function h$(e) {
  return e.view || e.width || e.height;
}
const d$ = 20, PPe = {
  align: 1,
  bounds: 1,
  center: 1,
  columns: 1,
  spacing: 1
}, OPe = ui(PPe);
function zPe(e, t, r) {
  const a = r[t], v = {}, { spacing: o, columns: s } = a;
  o !== void 0 && (v.spacing = o), s !== void 0 && (jT(e) && !q4(e.facet) || gR(e)) && (v.columns = s), WT(e) && (v.columns = 1);
  for (const n of OPe)
    if (e[n] !== void 0)
      if (n === "spacing") {
        const l = e[n];
        v[n] = Ro(l) ? l : {
          row: l.row ?? o,
          column: l.column ?? o
        };
      } else
        v[n] = e[n];
  return v;
}
function kI(e, t) {
  return e[t] ?? e[t === "width" ? "continuousWidth" : "continuousHeight"];
}
function Dk(e, t) {
  const r = Lk(e, t);
  return z0(r) ? r.step : Bre;
}
function Lk(e, t) {
  const r = e[t] ?? e[t === "width" ? "discreteWidth" : "discreteHeight"];
  return Wu(r, { step: e.step });
}
const Bre = 20, RPe = {
  continuousWidth: 200,
  continuousHeight: 200,
  step: Bre
}, FPe = {
  background: "white",
  padding: 5,
  timeFormat: "%b %d, %Y",
  countTitle: "Count of Records",
  view: RPe,
  mark: ELe,
  arc: {},
  area: {},
  bar: DLe,
  circle: {},
  geoshape: {},
  image: {},
  line: {},
  point: {},
  rect: LLe,
  rule: { color: "black" },
  // Need this to override default color in mark config
  square: {},
  text: { color: "black" },
  // Need this to override default color in mark config
  tick: PLe,
  trail: {},
  boxplot: {
    size: 14,
    extent: 1.5,
    box: {},
    median: { color: "white" },
    outliers: {},
    rule: {},
    ticks: null
  },
  errorbar: {
    center: "mean",
    rule: !0,
    ticks: !1
  },
  errorband: {
    band: {
      opacity: 0.3
    },
    borders: !1
  },
  scale: uLe,
  projection: {},
  legend: CPe,
  header: { titlePadding: 10, labelPadding: 10 },
  headerColumn: {},
  headerRow: {},
  headerFacet: {},
  selection: DPe,
  style: {},
  title: {},
  facet: { spacing: d$ },
  concat: { spacing: d$ },
  normalizedNumberFormat: ".0%"
}, mm = [
  "#4c78a8",
  "#f58518",
  "#e45756",
  "#72b7b2",
  "#54a24b",
  "#eeca3b",
  "#b279a2",
  "#ff9da6",
  "#9d755d",
  "#bab0ac"
], p$ = {
  text: 11,
  guideLabel: 10,
  guideTitle: 11,
  groupTitle: 13,
  groupSubtitle: 12
}, m$ = {
  blue: mm[0],
  orange: mm[1],
  red: mm[2],
  teal: mm[3],
  green: mm[4],
  yellow: mm[5],
  purple: mm[6],
  pink: mm[7],
  brown: mm[8],
  gray0: "#000",
  gray1: "#111",
  gray2: "#222",
  gray3: "#333",
  gray4: "#444",
  gray5: "#555",
  gray6: "#666",
  gray7: "#777",
  gray8: "#888",
  gray9: "#999",
  gray10: "#aaa",
  gray11: "#bbb",
  gray12: "#ccc",
  gray13: "#ddd",
  gray14: "#eee",
  gray15: "#fff"
};
function NPe(e = {}) {
  return {
    signals: [
      {
        name: "color",
        value: Oi(e) ? { ...m$, ...e } : m$
      }
    ],
    mark: { color: { signal: "color.blue" } },
    rule: { color: { signal: "color.gray0" } },
    text: {
      color: { signal: "color.gray0" }
    },
    style: {
      "guide-label": {
        fill: { signal: "color.gray0" }
      },
      "guide-title": {
        fill: { signal: "color.gray0" }
      },
      "group-title": {
        fill: { signal: "color.gray0" }
      },
      "group-subtitle": {
        fill: { signal: "color.gray0" }
      },
      cell: {
        stroke: { signal: "color.gray8" }
      }
    },
    axis: {
      domainColor: { signal: "color.gray13" },
      gridColor: { signal: "color.gray8" },
      tickColor: { signal: "color.gray13" }
    },
    range: {
      category: [
        { signal: "color.blue" },
        { signal: "color.orange" },
        { signal: "color.red" },
        { signal: "color.teal" },
        { signal: "color.green" },
        { signal: "color.yellow" },
        { signal: "color.purple" },
        { signal: "color.pink" },
        { signal: "color.brown" },
        { signal: "color.grey8" }
      ]
    }
  };
}
function BPe(e) {
  return {
    signals: [
      {
        name: "fontSize",
        value: Oi(e) ? { ...p$, ...e } : p$
      }
    ],
    text: {
      fontSize: { signal: "fontSize.text" }
    },
    style: {
      "guide-label": {
        fontSize: { signal: "fontSize.guideLabel" }
      },
      "guide-title": {
        fontSize: { signal: "fontSize.guideTitle" }
      },
      "group-title": {
        fontSize: { signal: "fontSize.groupTitle" }
      },
      "group-subtitle": {
        fontSize: { signal: "fontSize.groupSubtitle" }
      }
    }
  };
}
function jPe(e) {
  return {
    text: { font: e },
    style: {
      "guide-label": { font: e },
      "guide-title": { font: e },
      "group-title": { font: e },
      "group-subtitle": { font: e }
    }
  };
}
function jre(e) {
  const t = ui(e || {}), r = {};
  for (const a of t) {
    const v = e[a];
    r[a] = W4(v) ? dne(v) : Zh(v);
  }
  return r;
}
function UPe(e) {
  const t = ui(e), r = {};
  for (const a of t)
    r[a] = jre(e[a]);
  return r;
}
const VPe = [
  ...Yne,
  ...yre,
  ...zre,
  "background",
  "padding",
  "legend",
  "lineBreak",
  "scale",
  "style",
  "title",
  "view"
];
function Ure(e = {}) {
  const { color: t, font: r, fontSize: a, selection: v, ...o } = e, s = xb({}, ka(FPe), r ? jPe(r) : {}, t ? NPe(t) : {}, a ? BPe(a) : {}, o || {});
  v && bb(s, "selection", v, !0);
  const n = Ih(s, VPe);
  for (const l of ["background", "lineBreak", "padding"])
    s[l] && (n[l] = Zh(s[l]));
  for (const l of Yne)
    s[l] && (n[l] = If(s[l]));
  for (const l of yre)
    s[l] && (n[l] = jre(s[l]));
  for (const l of zre)
    s[l] && (n[l] = If(s[l]));
  if (s.legend && (n.legend = If(s.legend)), s.scale) {
    const { invalid: l, ...u } = s.scale, i = If(l, { level: 1 });
    n.scale = {
      ...If(u),
      ...ui(i).length > 0 ? { invalid: i } : {}
    };
  }
  return s.style && (n.style = UPe(s.style)), s.title && (n.title = If(s.title)), s.view && (n.view = If(s.view)), n;
}
const $Pe = /* @__PURE__ */ new Set(["view", ...wLe]), qPe = [
  "color",
  "fontSize",
  "background",
  // We apply background to the spec directly.
  "padding",
  "facet",
  "concat",
  "numberFormat",
  "numberFormatType",
  "normalizedNumberFormat",
  "normalizedNumberFormatType",
  "timeFormat",
  "countTitle",
  "header",
  "axisQuantitative",
  "axisTemporal",
  "axisDiscrete",
  "axisPoint",
  "axisXBand",
  "axisXPoint",
  "axisXDiscrete",
  "axisXQuantitative",
  "axisXTemporal",
  "axisYBand",
  "axisYPoint",
  "axisYDiscrete",
  "axisYQuantitative",
  "axisYTemporal",
  "scale",
  "selection",
  "overlay"
  // FIXME: Redesign and unhide this
], HPe = {
  view: ["continuousWidth", "continuousHeight", "discreteWidth", "discreteHeight", "step"],
  ...MLe
};
function GPe(e) {
  e = ka(e);
  for (const t of qPe)
    delete e[t];
  if (e.axis)
    for (const t in e.axis)
      W4(e.axis[t]) && delete e.axis[t];
  if (e.legend)
    for (const t of APe)
      delete e.legend[t];
  if (e.mark) {
    for (const t of i$)
      delete e.mark[t];
    e.mark.tooltip && Oi(e.mark.tooltip) && delete e.mark.tooltip;
  }
  e.params && (e.signals = (e.signals || []).concat(Fre(e.params)), delete e.params);
  for (const t of $Pe) {
    for (const a of i$)
      delete e[t][a];
    const r = HPe[t];
    if (r)
      for (const a of r)
        delete e[t][a];
    YPe(e, t);
  }
  for (const t of TPe())
    delete e[t];
  WPe(e);
  for (const t in e)
    Oi(e[t]) && Rs(e[t]) && delete e[t];
  return Rs(e) ? void 0 : e;
}
function WPe(e) {
  const { titleMarkConfig: t, subtitleMarkConfig: r, subtitle: a } = hne(e.title);
  Rs(t) || (e.style["group-title"] = {
    ...e.style["group-title"],
    ...t
    // config.title has higher precedence than config.style.group-title in Vega
  }), Rs(r) || (e.style["group-subtitle"] = {
    ...e.style["group-subtitle"],
    ...r
  }), Rs(a) ? delete e.title : e.title = a;
}
function YPe(e, t, r, a) {
  const v = e[t];
  t === "view" && (r = "cell");
  const o = {
    ...v,
    ...e.style[r ?? t]
  };
  Rs(o) || (e.style[r ?? t] = o), delete e[t];
}
function YT(e) {
  return "layer" in e;
}
function ZPe(e) {
  return "repeat" in e;
}
function XPe(e) {
  return !Qr(e.repeat) && e.repeat.layer;
}
class vR {
  map(t, r) {
    return jT(t) ? this.mapFacet(t, r) : ZPe(t) ? this.mapRepeat(t, r) : yR(t) ? this.mapHConcat(t, r) : WT(t) ? this.mapVConcat(t, r) : gR(t) ? this.mapConcat(t, r) : this.mapLayerOrUnit(t, r);
  }
  mapLayerOrUnit(t, r) {
    if (YT(t))
      return this.mapLayer(t, r);
    if (r1(t))
      return this.mapUnit(t, r);
    throw new Error(Rz(t));
  }
  mapLayer(t, r) {
    return {
      ...t,
      layer: t.layer.map((a) => this.mapLayerOrUnit(a, r))
    };
  }
  mapHConcat(t, r) {
    return {
      ...t,
      hconcat: t.hconcat.map((a) => this.map(a, r))
    };
  }
  mapVConcat(t, r) {
    return {
      ...t,
      vconcat: t.vconcat.map((a) => this.map(a, r))
    };
  }
  mapConcat(t, r) {
    const { concat: a, ...v } = t;
    return {
      ...v,
      concat: a.map((o) => this.map(o, r))
    };
  }
  mapFacet(t, r) {
    return {
      // as any is required here since TS cannot infer that FO may only be FieldName or Field, but not RepeatRef
      ...t,
      // TODO: remove "any" once we support all facet listed in https://github.com/vega/vega-lite/issues/2760
      spec: this.map(t.spec, r)
    };
  }
  mapRepeat(t, r) {
    return {
      ...t,
      // as any is required here since TS cannot infer that the output type satisfies the input type
      spec: this.map(t.spec, r)
    };
  }
}
const KPe = {
  zero: 1,
  center: 1,
  normalize: 1
};
function JPe(e) {
  return e in KPe;
}
const QPe = /* @__PURE__ */ new Set([Hne, RT, zT, Tk, NT, Kz, Jz, FT, Gne, Xz]), eOe = /* @__PURE__ */ new Set([RT, zT, Hne]);
function Y2(e) {
  return gi(e) && rb(e) === "quantitative" && !e.bin;
}
function g$(e, t, { orient: r, type: a }) {
  const v = t === "x" ? "y" : "radius", o = t === "x" && ["bar", "area"].includes(a), s = e[t], n = e[v];
  if (gi(s) && gi(n))
    if (Y2(s) && Y2(n)) {
      if (s.stack)
        return t;
      if (n.stack)
        return v;
      const l = gi(s) && !!s.aggregate, u = gi(n) && !!n.aggregate;
      if (l !== u)
        return l ? t : v;
      if (o) {
        if (r === "vertical")
          return v;
        if (r === "horizontal")
          return t;
      }
    } else {
      if (Y2(s))
        return t;
      if (Y2(n))
        return v;
    }
  else {
    if (Y2(s))
      return o && r === "vertical" ? void 0 : t;
    if (Y2(n))
      return o && r === "horizontal" ? void 0 : v;
  }
}
function tOe(e) {
  switch (e) {
    case "x":
      return "y";
    case "y":
      return "x";
    case "theta":
      return "radius";
    case "radius":
      return "theta";
  }
}
function Vre(e, t) {
  var f, c;
  const r = O0(e) ? e : { type: e }, a = r.type;
  if (!QPe.has(a))
    return null;
  const v = g$(t, "x", r) || g$(t, "theta", r);
  if (!v)
    return null;
  const o = t[v], s = gi(o) ? Mi(o, {}) : void 0, n = tOe(v), l = [], u = /* @__PURE__ */ new Set();
  if (t[n]) {
    const g = t[n], m = gi(g) ? Mi(g, {}) : void 0;
    m && m !== s && (l.push(n), u.add(m));
  }
  const i = n === "x" ? "xOffset" : "yOffset", h = t[i], p = gi(h) ? Mi(h, {}) : void 0;
  p && p !== s && (l.push(i), u.add(p));
  const _ = hIe.reduce((g, m) => {
    if (m !== "tooltip" && hv(t, m)) {
      const x = t[m];
      for (const w of Ri(x)) {
        const k = kp(w);
        if (k.aggregate)
          continue;
        const S = Mi(k, {});
        // if fielddef is a repeat, just include it in the stack by
        (!S || // otherwise, the field must be different from the groupBy fields.
        !u.has(S)) && g.push({ channel: m, fieldDef: k });
      }
    }
    return g;
  }, []);
  let d;
  return o.stack !== void 0 ? Rg(o.stack) ? d = o.stack ? "zero" : null : d = o.stack : eOe.has(a) && (d = "zero"), !d || !JPe(d) || bre(t) && _.length === 0 ? null : ((f = o == null ? void 0 : o.scale) != null && f.type && ((c = o == null ? void 0 : o.scale) == null ? void 0 : c.type) !== of.LINEAR && o != null && o.stack && mi(MDe(o.scale.type)), La(t[Z0(v)]) ? (o.stack !== void 0 && mi(SDe(v)), null) : (gi(o) && o.aggregate && !TIe.has(o.aggregate) && mi(EDe(o.aggregate)), {
    groupbyChannels: l,
    groupbyFields: u,
    fieldChannel: v,
    impute: o.impute === null ? !1 : Xg(a),
    stackBy: _,
    offset: d
  }));
}
function $re(e, t, r) {
  const a = If(e), v = Cs("orient", a, r);
  if (a.orient = aOe(a.type, t, v), v !== void 0 && v !== a.orient && mi(cDe(a.orient, v)), a.type === "bar" && a.orient) {
    const l = Cs("cornerRadiusEnd", a, r);
    if (l !== void 0) {
      const u = a.orient === "horizontal" && t.x2 || a.orient === "vertical" && t.y2 ? ["cornerRadius"] : ILe[a.orient];
      for (const i of u)
        a[i] = l;
      a.cornerRadiusEnd !== void 0 && delete a.cornerRadiusEnd;
    }
  }
  const o = Cs("opacity", a, r), s = Cs("fillOpacity", a, r);
  return o === void 0 && s === void 0 && (a.opacity = rOe(a.type, t)), Cs("cursor", a, r) === void 0 && (a.cursor = nOe(a, t, r)), a;
}
function nOe(e, t, r) {
  return t.href || e.href || Cs("href", e, r) ? "pointer" : e.cursor;
}
function rOe(e, t) {
  if (ro([NT, Xz, Kz, Jz], e) && !bre(t))
    return 0.7;
}
function iOe(e, t, { graticule: r }) {
  if (r)
    return !1;
  const a = P0("filled", e, t), v = e.type;
  return Wu(a, v !== NT && v !== FT && v !== Tk);
}
function aOe(e, t, r) {
  switch (e) {
    case NT:
    case Kz:
    case Jz:
    case Gne:
    case bLe:
    case xLe:
      return;
  }
  const { x: a, y: v, x2: o, y2: s } = t;
  switch (e) {
    case RT:
      if (gi(a) && (af(a.bin) || gi(v) && v.aggregate && !a.aggregate))
        return "vertical";
      if (gi(v) && (af(v.bin) || gi(a) && a.aggregate && !v.aggregate))
        return "horizontal";
      if (s || o) {
        if (r)
          return r;
        if (!o)
          return (gi(a) && a.type === Ov && !hl(a.bin) || Sk(a)) && gi(v) && af(v.bin) ? "horizontal" : "vertical";
        if (!s)
          return (gi(v) && v.type === Ov && !hl(v.bin) || Sk(v)) && gi(a) && af(a.bin) ? "vertical" : "horizontal";
      }
    case Tk:
      if (o && !(gi(a) && af(a.bin)) && s && !(gi(v) && af(v.bin)))
        return;
    case zT:
      if (s)
        return gi(v) && af(v.bin) ? "horizontal" : "vertical";
      if (o)
        return gi(a) && af(a.bin) ? "vertical" : "horizontal";
      if (e === Tk) {
        if (a && !v)
          return "vertical";
        if (v && !a)
          return "horizontal";
      }
    case FT:
    case Xz: {
      const n = l$(a), l = l$(v);
      if (r)
        return r;
      if (n && !l)
        return e !== "tick" ? "horizontal" : "vertical";
      if (!n && l)
        return e !== "tick" ? "vertical" : "horizontal";
      if (n && l)
        return "vertical";
      {
        const u = hh(a) && a.type === tb, i = hh(v) && v.type === tb;
        if (u && !i)
          return "vertical";
        if (!u && i)
          return "horizontal";
      }
      return;
    }
  }
  return "vertical";
}
function oOe(e) {
  const { point: t, line: r, ...a } = e;
  return ui(a).length > 1 ? a : a.type;
}
function sOe(e) {
  for (const t of ["line", "area", "rule", "trail"])
    e[t] && (e = {
      ...e,
      // TODO: remove as any
      [t]: Ih(e[t], ["point", "line"])
    });
  return e;
}
function NM(e, t = {}, r) {
  return e.point === "transparent" ? { opacity: 0 } : e.point ? Oi(e.point) ? e.point : {} : e.point !== void 0 ? null : t.point || r.shape ? Oi(t.point) ? t.point : {} : void 0;
}
function y$(e, t = {}) {
  return e.line ? e.line === !0 ? {} : e.line : e.line !== void 0 ? null : t.line ? t.line === !0 ? {} : t.line : void 0;
}
class lOe {
  constructor() {
    this.name = "path-overlay";
  }
  hasMatchingType(t, r) {
    if (r1(t)) {
      const { mark: a, encoding: v } = t, o = O0(a) ? a : { type: a };
      switch (o.type) {
        case "line":
        case "rule":
        case "trail":
          return !!NM(o, r[o.type], v);
        case "area":
          return (
            // false / null are also included as we want to remove the properties
            !!NM(o, r[o.type], v) || !!y$(o, r[o.type])
          );
      }
    }
    return !1;
  }
  run(t, r, a) {
    const { config: v } = r, { params: o, projection: s, mark: n, name: l, encoding: u, ...i } = t, h = GT(u, v), p = O0(n) ? n : { type: n }, _ = NM(p, v[p.type], h), d = p.type === "area" && y$(p, v[p.type]), f = [
      {
        name: l,
        ...o ? { params: o } : {},
        mark: oOe({
          // TODO: extract this 0.7 to be shared with default opacity for point/tick/...
          ...p.type === "area" && p.opacity === void 0 && p.fillOpacity === void 0 ? { opacity: 0.7 } : {},
          ...p
        }),
        // drop shape from encoding as this might be used to trigger point overlay
        encoding: Ih(h, ["shape"])
      }
    ], c = Vre($re(p, h, v), h);
    let g = h;
    if (c) {
      const { fieldChannel: m, offset: x } = c;
      g = {
        ...h,
        [m]: {
          ...h[m],
          ...x ? { stack: x } : {}
        }
      };
    }
    return g = Ih(g, ["y2", "x2"]), d && f.push({
      ...s ? { projection: s } : {},
      mark: {
        type: "line",
        ...Xx(p, ["clip", "interpolate", "tension", "tooltip"]),
        ...d
      },
      encoding: g
    }), _ && f.push({
      ...s ? { projection: s } : {},
      mark: {
        type: "point",
        opacity: 1,
        filled: !0,
        ...Xx(p, ["clip", "tooltip"]),
        ..._
      },
      encoding: g
    }), a({
      ...i,
      layer: f
    }, {
      ...r,
      config: sOe(v)
    });
  }
}
function uOe(e, t) {
  return t ? q4(e) ? Hre(e, t) : qre(e, t) : e;
}
function BM(e, t) {
  return t ? Hre(e, t) : e;
}
function TI(e, t, r) {
  const a = t[e];
  if (HLe(a)) {
    if (a.repeat in r)
      return { ...t, [e]: r[a.repeat] };
    mi(qIe(a.repeat));
    return;
  }
  return t;
}
function qre(e, t) {
  if (e = TI("field", e, t), e !== void 0) {
    if (e === null)
      return null;
    if (iR(e) && Nm(e.sort)) {
      const r = TI("field", e.sort, t);
      e = {
        ...e,
        ...r ? { sort: r } : {}
      };
    }
    return e;
  }
}
function v$(e, t) {
  if (gi(e))
    return qre(e, t);
  {
    const r = TI("datum", e, t);
    return r !== e && !r.type && (r.type = "nominal"), r;
  }
}
function x$(e, t) {
  if (La(e)) {
    const r = v$(e, t);
    if (r)
      return r;
    if (UT(e))
      return { condition: e.condition };
  } else {
    if (H4(e)) {
      const r = v$(e.condition, t);
      if (r)
        return {
          ...e,
          condition: r
        };
      {
        const { condition: a, ...v } = e;
        return v;
      }
    }
    return e;
  }
}
function Hre(e, t) {
  const r = {};
  for (const a in e)
    if (ua(e, a)) {
      const v = e[a];
      if (Qr(v))
        r[a] = v.map((o) => x$(o, t)).filter((o) => o);
      else {
        const o = x$(v, t);
        o !== void 0 && (r[a] = o);
      }
    }
  return r;
}
class cOe {
  constructor() {
    this.name = "RuleForRangedLine";
  }
  hasMatchingType(t) {
    if (r1(t)) {
      const { encoding: r, mark: a } = t;
      if (a === "line" || O0(a) && a.type === "line")
        for (const v of uIe) {
          const o = Jv(v), s = r[o];
          if (r[v] && (gi(s) && !af(s.bin) || K0(s)))
            return !0;
        }
    }
    return !1;
  }
  run(t, r, a) {
    const { encoding: v, mark: o } = t;
    return mi(uDe(!!v.x2, !!v.y2)), a({
      ...t,
      mark: Oi(o) ? { ...o, type: "rule" } : "rule"
    }, r);
  }
}
class fOe extends vR {
  constructor() {
    super(...arguments), this.nonFacetUnitNormalizers = [
      dPe,
      gPe,
      kPe,
      new lOe(),
      new cOe()
    ];
  }
  map(t, r) {
    if (r1(t)) {
      const a = hv(t.encoding, Rm), v = hv(t.encoding, Fm), o = hv(t.encoding, TT);
      if (a || v || o)
        return this.mapFacetedUnit(t, r);
    }
    return super.map(t, r);
  }
  // This is for normalizing non-facet unit
  mapUnit(t, r) {
    const { parentEncoding: a, parentProjection: v } = r, o = BM(t.encoding, r.repeater), s = {
      ...t,
      ...t.name ? { name: [r.repeaterPrefix, t.name].filter((l) => l).join("_") } : {},
      ...o ? { encoding: o } : {}
    };
    if (a || v)
      return this.mapUnitWithParentEncodingOrProjection(s, r);
    const n = this.mapLayerOrUnit.bind(this);
    for (const l of this.nonFacetUnitNormalizers)
      if (l.hasMatchingType(s, r.config))
        return l.run(s, r, n);
    return s;
  }
  mapRepeat(t, r) {
    return XPe(t) ? this.mapLayerRepeat(t, r) : this.mapNonLayerRepeat(t, r);
  }
  mapLayerRepeat(t, r) {
    const { repeat: a, spec: v, ...o } = t, { row: s, column: n, layer: l } = a, { repeater: u = {}, repeaterPrefix: i = "" } = r;
    return s || n ? this.mapRepeat({
      ...t,
      repeat: {
        ...s ? { row: s } : {},
        ...n ? { column: n } : {}
      },
      spec: {
        repeat: { layer: l },
        spec: v
      }
    }, r) : {
      ...o,
      layer: l.map((h) => {
        const p = {
          ...u,
          layer: h
        }, _ = `${(v.name ? `${v.name}_` : "") + i}child__layer_${Gl(h)}`, d = this.mapLayerOrUnit(v, { ...r, repeater: p, repeaterPrefix: _ });
        return d.name = _, d;
      })
    };
  }
  mapNonLayerRepeat(t, r) {
    const { repeat: a, spec: v, data: o, ...s } = t;
    !Qr(a) && t.columns && (t = Ih(t, ["columns"]), mi(JV("repeat")));
    const n = [], { repeater: l = {}, repeaterPrefix: u = "" } = r, i = !Qr(a) && a.row || [l ? l.row : null], h = !Qr(a) && a.column || [l ? l.column : null], p = Qr(a) && a || [l ? l.repeat : null];
    for (const d of p)
      for (const f of i)
        for (const c of h) {
          const g = {
            repeat: d,
            row: f,
            column: c,
            layer: l.layer
          }, m = (v.name ? `${v.name}_` : "") + u + "child__" + (Qr(a) ? `${Gl(d)}` : (a.row ? `row_${Gl(f)}` : "") + (a.column ? `column_${Gl(c)}` : "")), x = this.map(v, { ...r, repeater: g, repeaterPrefix: m });
          x.name = m, n.push(Ih(x, ["data"]));
        }
    const _ = Qr(a) ? t.columns : a.column ? a.column.length : 1;
    return {
      data: v.data ?? o,
      // data from child spec should have precedence
      align: "all",
      ...s,
      columns: _,
      concat: n
    };
  }
  mapFacet(t, r) {
    const { facet: a } = t;
    return q4(a) && t.columns && (t = Ih(t, ["columns"]), mi(JV("facet"))), super.mapFacet(t, r);
  }
  mapUnitWithParentEncodingOrProjection(t, r) {
    const { encoding: a, projection: v } = t, { parentEncoding: o, parentProjection: s, config: n } = r, l = _$({ parentProjection: s, projection: v }), u = b$({
      parentEncoding: o,
      encoding: BM(a, r.repeater)
    });
    return this.mapUnit({
      ...t,
      ...l ? { projection: l } : {},
      ...u ? { encoding: u } : {}
    }, { config: n });
  }
  mapFacetedUnit(t, r) {
    const { row: a, column: v, facet: o, ...s } = t.encoding, { mark: n, width: l, projection: u, height: i, view: h, params: p, encoding: _, ...d } = t, { facetMapping: f, layout: c } = this.getFacetMappingAndLayout({ row: a, column: v, facet: o }, r), g = BM(s, r.repeater);
    return this.mapFacet({
      ...d,
      ...c,
      // row / column has higher precedence than facet
      facet: f,
      spec: {
        ...l ? { width: l } : {},
        ...i ? { height: i } : {},
        ...h ? { view: h } : {},
        ...u ? { projection: u } : {},
        mark: n,
        encoding: g,
        ...p ? { params: p } : {}
      }
    }, r);
  }
  getFacetMappingAndLayout(t, r) {
    const { row: a, column: v, facet: o } = t;
    if (a || v) {
      o && mi(sDe([...a ? [Rm] : [], ...v ? [Fm] : []]));
      const s = {}, n = {};
      for (const l of [Rm, Fm]) {
        const u = t[l];
        if (u) {
          const { align: i, center: h, spacing: p, columns: _, ...d } = u;
          s[l] = d;
          for (const f of ["align", "center", "spacing"])
            u[f] !== void 0 && (n[f] ?? (n[f] = {}), n[f][l] = u[f]);
        }
      }
      return { facetMapping: s, layout: n };
    } else {
      const { align: s, center: n, spacing: l, columns: u, ...i } = o;
      return {
        facetMapping: uOe(i, r.repeater),
        layout: {
          ...s ? { align: s } : {},
          ...n ? { center: n } : {},
          ...l ? { spacing: l } : {},
          ...u ? { columns: u } : {}
        }
      };
    }
  }
  mapLayer(t, { parentEncoding: r, parentProjection: a, ...v }) {
    const { encoding: o, projection: s, ...n } = t, l = {
      ...v,
      parentEncoding: b$({ parentEncoding: r, encoding: o, layer: !0 }),
      parentProjection: _$({ parentProjection: a, projection: s })
    };
    return super.mapLayer({
      ...n,
      ...t.name ? { name: [l.repeaterPrefix, t.name].filter((u) => u).join("_") } : {}
    }, l);
  }
}
function b$({ parentEncoding: e, encoding: t = {}, layer: r }) {
  let a = {};
  if (e) {
    const v = /* @__PURE__ */ new Set([...ui(e), ...ui(t)]);
    for (const o of v) {
      const s = t[o], n = e[o];
      if (La(s)) {
        const l = {
          ...n,
          ...s
        };
        a[o] = l;
      } else H4(s) ? a[o] = {
        ...s,
        condition: {
          ...n,
          ...s.condition
        }
      } : s || s === null ? a[o] = s : (r || wp(n) || Ji(n) || La(n) || Qr(n)) && (a[o] = n);
    }
  } else
    a = t;
  return !a || Rs(a) ? void 0 : a;
}
function _$(e) {
  const { parentProjection: t, projection: r } = e;
  return t && r && mi(XIe({ parentProjection: t, projection: r })), r ?? t;
}
function xR(e) {
  return "filter" in e;
}
function hOe(e) {
  return (e == null ? void 0 : e.stop) !== void 0;
}
function Gre(e) {
  return "lookup" in e;
}
function dOe(e) {
  return "data" in e;
}
function pOe(e) {
  return "param" in e;
}
function mOe(e) {
  return "pivot" in e;
}
function gOe(e) {
  return "density" in e;
}
function yOe(e) {
  return "quantile" in e;
}
function vOe(e) {
  return "regression" in e;
}
function xOe(e) {
  return "loess" in e;
}
function bOe(e) {
  return "sample" in e;
}
function _Oe(e) {
  return "window" in e;
}
function wOe(e) {
  return "joinaggregate" in e;
}
function kOe(e) {
  return "flatten" in e;
}
function TOe(e) {
  return "calculate" in e;
}
function Wre(e) {
  return "bin" in e;
}
function AOe(e) {
  return "impute" in e;
}
function SOe(e) {
  return "timeUnit" in e;
}
function MOe(e) {
  return "aggregate" in e;
}
function EOe(e) {
  return "stack" in e;
}
function COe(e) {
  return "fold" in e;
}
function IOe(e) {
  return "extent" in e && !("density" in e) && !("regression" in e);
}
function DOe(e) {
  return e.map((t) => xR(t) ? {
    filter: _x(t.filter, nLe)
  } : t);
}
class LOe extends vR {
  map(t, r) {
    return r.emptySelections ?? (r.emptySelections = {}), r.selectionPredicates ?? (r.selectionPredicates = {}), t = w$(t, r), super.map(t, r);
  }
  mapLayerOrUnit(t, r) {
    if (t = w$(t, r), t.encoding) {
      const a = {};
      for (const [v, o] of Eg(t.encoding))
        a[v] = Yre(o, r);
      t = { ...t, encoding: a };
    }
    return super.mapLayerOrUnit(t, r);
  }
  mapUnit(t, r) {
    const { selection: a, ...v } = t;
    return a ? {
      ...v,
      params: Eg(a).map(([o, s]) => {
        const { init: n, bind: l, empty: u, ...i } = s;
        i.type === "single" ? (i.type = "point", i.toggle = !1) : i.type === "multi" && (i.type = "point"), r.emptySelections[o] = u !== "none";
        for (const h of ff(r.selectionPredicates[o] ?? {}))
          h.empty = u !== "none";
        return { name: o, value: n, select: i, bind: l };
      })
    } : t;
  }
}
function w$(e, t) {
  const { transform: r, ...a } = e;
  if (r) {
    const v = r.map((o) => {
      if (xR(o))
        return { filter: AI(o, t) };
      if (Wre(o) && Qv(o.bin))
        return {
          ...o,
          bin: Zre(o.bin)
        };
      if (Gre(o)) {
        const { selection: s, ...n } = o.from;
        return s ? {
          ...o,
          from: { param: s, ...n }
        } : o;
      }
      return o;
    });
    return { ...a, transform: v };
  }
  return e;
}
function Yre(e, t) {
  var a, v;
  const r = ka(e);
  if (gi(r) && Qv(r.bin) && (r.bin = Zre(r.bin)), n2(r) && ((v = (a = r.scale) == null ? void 0 : a.domain) != null && v.selection)) {
    const { selection: o, ...s } = r.scale.domain;
    r.scale.domain = { ...s, ...o ? { param: o } : {} };
  }
  if (UT(r))
    if (Qr(r.condition))
      r.condition = r.condition.map((o) => {
        const { selection: s, param: n, test: l, ...u } = o;
        return n ? o : { ...u, test: AI(o, t) };
      });
    else {
      const { selection: o, param: s, test: n, ...l } = Yre(r.condition, t);
      r.condition = s ? r.condition : {
        ...l,
        test: AI(r.condition, t)
      };
    }
  return r;
}
function Zre(e) {
  const t = e.extent;
  if (t != null && t.selection) {
    const { selection: r, ...a } = t;
    return { ...e, extent: { ...a, param: r } };
  }
  return e;
}
function AI(e, t) {
  const r = (a) => _x(a, (v) => {
    var o;
    const s = t.emptySelections[v] ?? !0, n = { param: v, empty: s };
    return (o = t.selectionPredicates)[v] ?? (o[v] = []), t.selectionPredicates[v].push(n), n;
  });
  return e.selection ? r(e.selection) : _x(e.test || e.filter, (a) => a.selection ? r(a.selection) : a);
}
class SI extends vR {
  map(t, r) {
    const a = r.selections ?? [];
    if (t.params && !r1(t)) {
      const v = [];
      for (const o of t.params)
        mR(o) ? a.push(o) : v.push(o);
      t.params = v;
    }
    return r.selections = a, super.map(t, r);
  }
  mapUnit(t, r) {
    const a = r.selections;
    if (!a || !a.length)
      return t;
    const v = (r.path ?? []).concat(t.name), o = [];
    for (const s of a)
      if (!s.views || !s.views.length)
        o.push(s);
      else
        for (const n of s.views)
          (Fi(n) && (n === t.name || v.includes(n)) || Qr(n) && // logic for backwards compatibility with view paths before we had unique names
          // @ts-ignore
          n.map((l) => v.indexOf(l)).every((l, u, i) => l !== -1 && (u === 0 || l > i[u - 1]))) && o.push(s);
    return o.length && (t.params = o), t;
  }
}
for (const e of ["mapFacet", "mapRepeat", "mapHConcat", "mapVConcat", "mapLayer"]) {
  const t = SI.prototype[e];
  SI.prototype[e] = function(r, a) {
    return t.call(this, r, POe(r, a));
  };
}
function POe(e, t) {
  return e.name ? {
    ...t,
    path: (t.path ?? []).concat(e.name)
  } : t;
}
function Xre(e, t) {
  t === void 0 && (t = Ure(e.config));
  const r = FOe(e, t), { width: a, height: v } = e, o = NOe(r, { width: a, height: v, autosize: e.autosize }, t);
  return {
    ...r,
    ...o ? { autosize: o } : {}
  };
}
const OOe = new fOe(), zOe = new LOe(), ROe = new SI();
function FOe(e, t = {}) {
  const r = { config: t };
  return ROe.map(OOe.map(zOe.map(e, r), r), r);
}
function k$(e) {
  return Fi(e) ? { type: e } : e ?? {};
}
function NOe(e, t, r) {
  let { width: a, height: v } = t;
  const o = r1(e) || YT(e), s = {};
  o ? a == "container" && v == "container" ? (s.type = "fit", s.contains = "padding") : a == "container" ? (s.type = "fit-x", s.contains = "padding") : v == "container" && (s.type = "fit-y", s.contains = "padding") : (a == "container" && (mi(YV("width")), a = void 0), v == "container" && (mi(YV("height")), v = void 0));
  const n = {
    type: "pad",
    ...s,
    ...r ? k$(r.autosize) : {},
    ...k$(e.autosize)
  };
  if (n.type === "fit" && !o && (mi(PIe), n.type = "pad"), a == "container" && !(n.type == "fit" || n.type == "fit-x") && mi(ZV("width")), v == "container" && !(n.type == "fit" || n.type == "fit-y") && mi(ZV("height")), !Qh(n, { type: "pad" }))
    return n;
}
function BOe(e) {
  return e === "fit" || e === "fit-x" || e === "fit-y";
}
function jOe(e) {
  return e ? `fit-${CT(e)}` : "fit";
}
const UOe = [
  "background",
  "padding"
  // We do not include "autosize" here as it is supported by only unit and layer specs and thus need to be normalized
];
function T$(e, t) {
  const r = {};
  for (const a of UOe)
    e && e[a] !== void 0 && (r[a] = Zh(e[a]));
  return t && (r.params = e.params), r;
}
class i1 {
  constructor(t = {}, r = {}) {
    this.explicit = t, this.implicit = r;
  }
  clone() {
    return new i1(ka(this.explicit), ka(this.implicit));
  }
  combine() {
    return {
      ...this.explicit,
      // Explicit properties comes first
      ...this.implicit
    };
  }
  get(t) {
    return Wu(this.explicit[t], this.implicit[t]);
  }
  getWithExplicit(t) {
    return this.explicit[t] !== void 0 ? { explicit: !0, value: this.explicit[t] } : this.implicit[t] !== void 0 ? { explicit: !1, value: this.implicit[t] } : { explicit: !1, value: void 0 };
  }
  setWithExplicit(t, { value: r, explicit: a }) {
    r !== void 0 && this.set(t, r, a);
  }
  set(t, r, a) {
    return delete this[a ? "implicit" : "explicit"][t], this[a ? "explicit" : "implicit"][t] = r, this;
  }
  copyKeyFromSplit(t, { explicit: r, implicit: a }) {
    r[t] !== void 0 ? this.set(t, r[t], !0) : a[t] !== void 0 && this.set(t, a[t], !1);
  }
  copyKeyFromObject(t, r) {
    r[t] !== void 0 && this.set(t, r[t], !0);
  }
  /**
   * Merge split object into this split object. Properties from the other split
   * overwrite properties from this split.
   */
  copyAll(t) {
    for (const r of ui(t.combine())) {
      const a = t.getWithExplicit(r);
      this.setWithExplicit(r, a);
    }
  }
}
function i0(e) {
  return {
    explicit: !0,
    value: e
  };
}
function Gh(e) {
  return {
    explicit: !1,
    value: e
  };
}
function Kre(e) {
  return (t, r, a, v) => {
    const o = e(t.value, r.value);
    return o > 0 ? t : o < 0 ? r : ZT(t, r, a, v);
  };
}
function ZT(e, t, r, a) {
  return e.explicit && t.explicit && mi(xDe(r, a, e.value, t.value)), e;
}
function Dg(e, t, r, a, v = ZT) {
  return e === void 0 || e.value === void 0 ? t : e.explicit && !t.explicit ? e : t.explicit && !e.explicit ? t : Qh(e.value, t.value) ? e : v(e, t, r, a);
}
class VOe extends i1 {
  constructor(t = {}, r = {}, a = !1) {
    super(t, r), this.explicit = t, this.implicit = r, this.parseNothing = a;
  }
  clone() {
    const t = super.clone();
    return t.parseNothing = this.parseNothing, t;
  }
}
function ob(e) {
  return "url" in e;
}
function Gw(e) {
  return "values" in e;
}
function Jre(e) {
  return "name" in e && !ob(e) && !Gw(e) && !hg(e);
}
function hg(e) {
  return e && (Qre(e) || eie(e) || bR(e));
}
function Qre(e) {
  return "sequence" in e;
}
function eie(e) {
  return "sphere" in e;
}
function bR(e) {
  return "graticule" in e;
}
var Du;
(function(e) {
  e[e.Raw = 0] = "Raw", e[e.Main = 1] = "Main", e[e.Row = 2] = "Row", e[e.Column = 3] = "Column", e[e.Lookup = 4] = "Lookup", e[e.PreFilterInvalid = 5] = "PreFilterInvalid", e[e.PostFilterInvalid = 6] = "PostFilterInvalid";
})(Du || (Du = {}));
function tie({ invalid: e, isPath: t }) {
  switch (Xne(e, { isPath: t })) {
    case "filter":
      return {
        marks: "exclude-invalid-values",
        scales: "exclude-invalid-values"
      };
    case "break-paths-show-domains":
      return {
        // Path-based marks use pre-filter data so we know to skip these invalid points in the path.
        // For non-path based marks, we skip by not showing them at all.
        marks: t ? "include-invalid-values" : "exclude-invalid-values",
        scales: "include-invalid-values"
      };
    case "break-paths-filter-domains":
      return {
        marks: t ? "include-invalid-values" : "exclude-invalid-values",
        // Unlike 'break-paths-show-domains', 'break-paths-filter-domains' uses post-filter data to feed scale.
        scales: "exclude-invalid-values"
      };
    case "show":
      return {
        marks: "include-invalid-values",
        scales: "include-invalid-values"
      };
  }
}
function $Oe(e) {
  const { marks: t, scales: r } = tie(e);
  return t === r ? Du.Main : r === "include-invalid-values" ? Du.PreFilterInvalid : Du.PostFilterInvalid;
}
function nie(e) {
  const { signals: t, hasLegend: r, index: a, ...v } = e;
  return v.field = Rd(v.field), v;
}
function Fv(e, t = !0, r = Uf) {
  if (Qr(e)) {
    const a = e.map((v) => Fv(v, t, r));
    return t ? `[${a.join(", ")}]` : a;
  } else if (e2(e))
    return r(t ? Pv(e) : qDe(e));
  return t ? r(Fs(e)) : e;
}
function qOe(e, t) {
  for (const r of ff(e.component.selection ?? {})) {
    const a = r.name;
    let v = `${a}${Pg}, ${r.resolve === "global" ? "true" : `{unit: ${dv(e)}}`}`;
    for (const o of QT)
      o.defined(r) && (o.signals && (t = o.signals(e, r, t)), o.modifyExpr && (v = o.modifyExpr(e, r, v)));
    t.push({
      name: a + bze,
      on: [
        {
          events: { signal: r.name + Pg },
          update: `modify(${vi(r.name + Nv)}, ${v})`
        }
      ]
    });
  }
  return _R(t);
}
function HOe(e, t) {
  if (e.component.selection && ui(e.component.selection).length) {
    const r = vi(e.getName("cell"));
    t.unshift({
      name: "facet",
      value: {},
      on: [
        {
          events: Vg("pointermove", "scope"),
          update: `isTuple(facet) ? facet : group(${r}).datum`
        }
      ]
    });
  }
  return _R(t);
}
function GOe(e, t) {
  let r = !1;
  for (const a of ff(e.component.selection ?? {})) {
    const v = a.name, o = vi(v + Nv);
    if (t.filter((n) => n.name === v).length === 0) {
      const n = a.resolve === "global" ? "union" : a.resolve, l = a.type === "point" ? ", true, true)" : ")";
      t.push({
        name: a.name,
        update: `${bie}(${o}, ${vi(n)}${l}`
      });
    }
    r = !0;
    for (const n of QT)
      n.defined(a) && n.topLevelSignals && (t = n.topLevelSignals(e, a, t));
  }
  return r && t.filter((v) => v.name === "unit").length === 0 && t.unshift({
    name: "unit",
    value: {},
    on: [{ events: "pointermove", update: "isTuple(group()) ? group() : unit" }]
  }), _R(t);
}
function WOe(e, t) {
  const r = [...t], a = dv(e, { escape: !1 });
  for (const v of ff(e.component.selection ?? {})) {
    const o = { name: v.name + Nv };
    if (v.project.hasSelectionId && (o.transform = [{ type: "collect", sort: { field: Tp } }]), v.init) {
      const n = v.project.items.map(nie);
      o.values = v.project.hasSelectionId ? v.init.map((l) => ({ unit: a, [Tp]: Fv(l, !1)[0] })) : v.init.map((l) => ({ unit: a, fields: n, values: Fv(l, !1) }));
    }
    r.filter((n) => n.name === v.name + Nv).length || r.push(o);
  }
  return r;
}
function rie(e, t) {
  for (const r of ff(e.component.selection ?? {}))
    for (const a of QT)
      a.defined(r) && a.marks && (t = a.marks(e, r, t));
  return t;
}
function YOe(e, t) {
  for (const r of e.children)
    pu(r) && (t = rie(r, t));
  return t;
}
function ZOe(e, t, r, a) {
  const v = Aie(e, t.param, t);
  return {
    signal: _p(r.get("type")) && Qr(a) && a[0] > a[1] ? `isValid(${v}) && reverse(${v})` : v
  };
}
function _R(e) {
  return e.map((t) => (t.on && !t.on.length && delete t.on, t));
}
class Is {
  constructor(t, r) {
    this.debugName = r, this._children = [], this._parent = null, t && (this.parent = t);
  }
  /**
   * Clone this node with a deep copy but don't clone links to children or parents.
   */
  clone() {
    throw new Error("Cannot clone node");
  }
  get parent() {
    return this._parent;
  }
  /**
   * Set the parent of the node and also add this node to the parent's children.
   */
  set parent(t) {
    this._parent = t, t && t.addChild(this);
  }
  get children() {
    return this._children;
  }
  numChildren() {
    return this._children.length;
  }
  addChild(t, r) {
    if (this._children.includes(t)) {
      mi(WIe);
      return;
    }
    r !== void 0 ? this._children.splice(r, 0, t) : this._children.push(t);
  }
  removeChild(t) {
    const r = this._children.indexOf(t);
    return this._children.splice(r, 1), r;
  }
  /**
   * Remove node from the dataflow.
   */
  remove() {
    let t = this._parent.removeChild(this);
    for (const r of this._children)
      r._parent = this._parent, this._parent.addChild(r, t++);
  }
  /**
   * Insert another node as a parent of this node.
   */
  insertAsParentOf(t) {
    const r = t.parent;
    r.removeChild(this), this.parent = r, t.parent = this;
  }
  swapWithParent() {
    const t = this._parent, r = t.parent;
    for (const v of this._children)
      v.parent = t;
    this._children = [], t.removeChild(this);
    const a = t.parent.removeChild(t);
    this._parent = r, r.addChild(this, a), t.parent = this;
  }
}
class Dh extends Is {
  clone() {
    const t = new this.constructor();
    return t.debugName = `clone_${this.debugName}`, t._source = this._source, t._name = `clone_${this._name}`, t.type = this.type, t.refCounts = this.refCounts, t.refCounts[t._name] = 0, t;
  }
  /**
   * @param source The name of the source. Will change in assemble.
   * @param type The type of the output node.
   * @param refCounts A global ref counter map.
   */
  constructor(t, r, a, v) {
    super(t, r), this.type = a, this.refCounts = v, this._source = this._name = r, this.refCounts && !(this._name in this.refCounts) && (this.refCounts[this._name] = 0);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return this._hash === void 0 && (this._hash = `Output ${Xte()}`), this._hash;
  }
  /**
   * Request the datasource name and increase the ref counter.
   *
   * During the parsing phase, this will return the simple name such as 'main' or 'raw'.
   * It is crucial to request the name from an output node to mark it as a required node.
   * If nobody ever requests the name, this datasource will not be instantiated in the assemble phase.
   *
   * In the assemble phase, this will return the correct name.
   */
  getSource() {
    return this.refCounts[this._name]++, this._source;
  }
  isRequired() {
    return !!this.refCounts[this._name];
  }
  setSource(t) {
    this._source = t;
  }
}
function jM(e) {
  return e.as !== void 0;
}
function A$(e) {
  return `${e}_end`;
}
class _0 extends Is {
  clone() {
    return new _0(null, ka(this.timeUnits));
  }
  constructor(t, r) {
    super(t), this.timeUnits = r;
  }
  static makeFromEncoding(t, r) {
    const a = r.reduceFieldDef((v, o, s) => {
      const { field: n, timeUnit: l } = o;
      if (l) {
        let u;
        if (t2(l)) {
          if (pu(r)) {
            const { mark: i, markDef: h, config: p } = r, _ = Ig({ fieldDef: o, markDef: h, config: p });
            (Hw(i) || _) && (u = {
              timeUnit: Xc(l),
              field: n
            });
          }
        } else
          u = {
            as: Mi(o, { forAs: !0 }),
            field: n,
            timeUnit: l
          };
        if (pu(r)) {
          const { mark: i, markDef: h, config: p } = r, _ = Ig({ fieldDef: o, markDef: h, config: p });
          Hw(i) && Yu(s) && _ !== 0.5 && (u.rectBandPosition = _);
        }
        u && (v[lo(u)] = u);
      }
      return v;
    }, {});
    return Rs(a) ? null : new _0(t, a);
  }
  static makeFromTransform(t, r) {
    const { timeUnit: a, ...v } = { ...r }, o = Xc(a), s = {
      ...v,
      timeUnit: o
    };
    return new _0(t, {
      [lo(s)]: s
    });
  }
  /**
   * Merge together TimeUnitNodes assigning the children of `other` to `this`
   * and removing `other`.
   */
  merge(t) {
    this.timeUnits = { ...this.timeUnits };
    for (const r in t.timeUnits)
      this.timeUnits[r] || (this.timeUnits[r] = t.timeUnits[r]);
    for (const r of t.children)
      t.removeChild(r), r.parent = this;
    t.remove();
  }
  /**
   * Remove time units coming from the other node.
   */
  removeFormulas(t) {
    const r = {};
    for (const [a, v] of Eg(this.timeUnits)) {
      const o = jM(v) ? v.as : `${v.field}_end`;
      t.has(o) || (r[a] = v);
    }
    this.timeUnits = r;
  }
  producedFields() {
    return new Set(ff(this.timeUnits).map((t) => jM(t) ? t.as : A$(t.field)));
  }
  dependentFields() {
    return new Set(ff(this.timeUnits).map((t) => t.field));
  }
  hash() {
    return `TimeUnit ${lo(this.timeUnits)}`;
  }
  assemble() {
    const t = [];
    for (const r of ff(this.timeUnits)) {
      const { rectBandPosition: a } = r, v = Xc(r.timeUnit);
      if (jM(r)) {
        const { field: o, as: s } = r, { unit: n, utc: l, ...u } = v, i = [s, `${s}_end`];
        t.push({
          field: Rd(o),
          type: "timeunit",
          ...n ? { units: PT(n) } : {},
          ...l ? { timezone: "utc" } : {},
          ...u,
          as: i
        }), t.push(...S$(i, a, v));
      } else if (r) {
        const { field: o } = r, s = o.replaceAll("\\.", "."), n = iie({ timeUnit: v, field: s }), l = A$(s);
        t.push({
          type: "formula",
          expr: n,
          as: l
        }), t.push(...S$([s, l], a, v));
      }
    }
    return t;
  }
}
const XT = "offsetted_rect_start", KT = "offsetted_rect_end";
function iie({ timeUnit: e, field: t, reverse: r }) {
  const { unit: a, utc: v } = e, o = Dne(a), { part: s, step: n } = zne(o, e.step);
  return `${v ? "utcOffset" : "timeOffset"}('${s}', datum['${t}'], ${r ? -n : n})`;
}
function S$([e, t], r, a) {
  if (r !== void 0 && r !== 0.5) {
    const v = `datum['${e}']`, o = `datum['${t}']`;
    return [
      {
        type: "formula",
        expr: M$([
          iie({
            timeUnit: a,
            field: e,
            reverse: !0
          }),
          v
        ], r + 0.5),
        as: `${e}_${XT}`
      },
      {
        type: "formula",
        expr: M$([v, o], r + 0.5),
        as: `${e}_${KT}`
      }
    ];
  }
  return [];
}
function M$([e, t], r) {
  return `${1 - r} * ${e} + ${r} * ${t}`;
}
const Y4 = "_tuple_fields";
class XOe {
  constructor(...t) {
    this.items = t, this.hasChannel = {}, this.hasField = {}, this.hasSelectionId = !1;
  }
}
const KOe = {
  defined: () => !0,
  parse: (e, t, r) => {
    const a = t.name, v = t.project ?? (t.project = new XOe()), o = {}, s = {}, n = /* @__PURE__ */ new Set(), l = (d, f) => {
      const c = f === "visual" ? d.channel : d.field;
      let g = Gl(`${a}_${c}`);
      for (let m = 1; n.has(g); m++)
        g = Gl(`${a}_${c}_${m}`);
      return n.add(g), { [f]: g };
    }, u = t.type, i = e.config.selection[u], h = r.value !== void 0 ? Ri(r.value) : null;
    let { fields: p, encodings: _ } = Oi(r.select) ? r.select : {};
    if (!p && !_ && h) {
      for (const d of h)
        if (Oi(d))
          for (const f of ui(d))
            lIe(f) ? (_ || (_ = [])).push(f) : u === "interval" ? (mi($Ie), _ = i.encodings) : (p ?? (p = [])).push(f);
    }
    !p && !_ && (_ = i.encodings, "fields" in i && (p = i.fields));
    for (const d of _ ?? []) {
      const f = e.fieldDef(d);
      if (f) {
        let c = f.field;
        if (f.aggregate) {
          mi(OIe(d, f.aggregate));
          continue;
        } else if (!c) {
          mi(KV(d));
          continue;
        }
        if (f.timeUnit && !t2(f.timeUnit)) {
          c = e.vgField(d);
          const g = {
            timeUnit: f.timeUnit,
            as: c,
            field: f.field
          };
          s[lo(g)] = g;
        }
        if (!o[c]) {
          const g = u === "interval" && X0(d) && _p(e.getScaleComponent(d).get("type")) ? "R" : f.bin ? "R-RE" : "E", m = { field: c, channel: d, type: g, index: v.items.length };
          m.signals = { ...l(m, "data"), ...l(m, "visual") }, v.items.push(o[c] = m), v.hasField[c] = o[c], v.hasSelectionId = v.hasSelectionId || c === Tp, nne(d) ? (m.geoChannel = d, m.channel = tne(d), v.hasChannel[m.channel] = o[c]) : v.hasChannel[d] = o[c];
        }
      } else
        mi(KV(d));
    }
    for (const d of p ?? []) {
      if (v.hasField[d])
        continue;
      const f = { type: "E", field: d, index: v.items.length };
      f.signals = { ...l(f, "data") }, v.items.push(f), v.hasField[d] = f, v.hasSelectionId = v.hasSelectionId || d === Tp;
    }
    h && (t.init = h.map((d) => v.items.map((f) => Oi(d) ? d[f.geoChannel || f.channel] !== void 0 ? d[f.geoChannel || f.channel] : d[f.field] : d))), Rs(s) || (v.timeUnit = new _0(null, s));
  },
  signals: (e, t, r) => {
    const a = t.name + Y4;
    return r.filter((o) => o.name === a).length > 0 || t.project.hasSelectionId ? r : r.concat({
      name: a,
      value: t.project.items.map(nie)
    });
  }
}, Bm = {
  defined: (e) => e.type === "interval" && e.resolve === "global" && e.bind && e.bind === "scales",
  parse: (e, t) => {
    const r = t.scales = [];
    for (const a of t.project.items) {
      const v = a.channel;
      if (!X0(v))
        continue;
      const o = e.getScaleComponent(v), s = o ? o.get("type") : void 0;
      if (s == "sequential" && mi(NIe), !o || !_p(s)) {
        mi(FIe);
        continue;
      }
      o.set("selectionExtent", { param: t.name, field: a.field }, !0), r.push(a);
    }
  },
  topLevelSignals: (e, t, r) => {
    const a = t.scales.filter((s) => r.filter((n) => n.name === s.signals.data).length === 0);
    if (!e.parent || E$(e) || a.length === 0)
      return r;
    const v = r.filter((s) => s.name === t.name)[0];
    let o = v.update;
    if (o.indexOf(bie) >= 0)
      v.update = `{${a.map((s) => `${vi(Rd(s.field))}: ${s.signals.data}`).join(", ")}}`;
    else {
      for (const s of a) {
        const n = `${vi(Rd(s.field))}: ${s.signals.data}`;
        o.includes(n) || (o = `${o.substring(0, o.length - 1)}, ${n}}`);
      }
      v.update = o;
    }
    return r.concat(a.map((s) => ({ name: s.signals.data })));
  },
  signals: (e, t, r) => {
    if (e.parent && !E$(e))
      for (const a of t.scales) {
        const v = r.find((o) => o.name === a.signals.data);
        v.push = "outer", delete v.value, delete v.update;
      }
    return r;
  }
};
function MI(e, t) {
  return `domain(${vi(e.scaleName(t))})`;
}
function E$(e) {
  return e.parent && Vb(e.parent) && !e.parent.parent;
}
const Tx = "_brush", aie = "_scale_trigger", o3 = "geo_interval_init_tick", oie = "_init", JOe = "_center", QOe = {
  defined: (e) => e.type === "interval",
  parse: (e, t, r) => {
    var a;
    if (e.hasProjection) {
      const v = { ...Oi(r.select) ? r.select : {} };
      v.fields = [Tp], v.encodings || (v.encodings = r.value ? ui(r.value) : [Pp, Lp]), r.select = { type: "interval", ...v };
    }
    if (t.translate && !Bm.defined(t)) {
      const v = `!event.item || event.item.mark.name !== ${vi(t.name + Tx)}`;
      for (const o of t.events) {
        if (!o.between) {
          mi(`${o} is not an ordered event stream for interval selections.`);
          continue;
        }
        const s = Ri((a = o.between[0]).filter ?? (a.filter = []));
        s.indexOf(v) < 0 && s.push(v);
      }
    }
  },
  signals: (e, t, r) => {
    const a = t.name, v = a + Pg, o = ff(t.project.hasChannel).filter((n) => n.channel === Yl || n.channel === Qc), s = t.init ? t.init[0] : null;
    if (r.push(...o.reduce((n, l) => n.concat(eze(e, t, l, s && s[l.index])), [])), e.hasProjection) {
      const n = vi(e.projectionName()), l = e.projectionName() + JOe, { x: u, y: i } = t.project.hasChannel, h = u && u.signals.visual, p = i && i.signals.visual, _ = u ? s && s[u.index] : `${l}[0]`, d = i ? s && s[i.index] : `${l}[1]`, f = (k) => e.getSizeSignalRef(k).signal, c = `[[${h ? h + "[0]" : "0"}, ${p ? p + "[0]" : "0"}],[${h ? h + "[1]" : f("width")}, ${p ? p + "[1]" : f("height")}]]`;
      s && (r.unshift({
        name: a + oie,
        init: `[scale(${n}, [${u ? _[0] : _}, ${i ? d[0] : d}]), scale(${n}, [${u ? _[1] : _}, ${i ? d[1] : d}])]`
      }), (!u || !i) && (r.find((S) => S.name === l) || r.unshift({
        name: l,
        update: `invert(${n}, [${f("width")}/2, ${f("height")}/2])`
      })));
      const g = `intersect(${c}, {markname: ${vi(e.getName("marks"))}}, unit.mark)`, m = `{unit: ${dv(e)}}`, x = `vlSelectionTuples(${g}, ${m})`, w = o.map((k) => k.signals.visual);
      return r.concat({
        name: v,
        on: [
          {
            events: [
              ...w.length ? [{ signal: w.join(" || ") }] : [],
              ...s ? [{ signal: o3 }] : []
            ],
            update: x
          }
        ]
      });
    } else {
      if (!Bm.defined(t)) {
        const u = a + aie, i = o.map((h) => {
          const p = h.channel, { data: _, visual: d } = h.signals, f = vi(e.scaleName(p)), c = e.getScaleComponent(p).get("type"), g = _p(c) ? "+" : "";
          return `(!isArray(${_}) || (${g}invert(${f}, ${d})[0] === ${g}${_}[0] && ${g}invert(${f}, ${d})[1] === ${g}${_}[1]))`;
        });
        i.length && r.push({
          name: u,
          value: {},
          on: [
            {
              events: o.map((h) => ({ scale: e.scaleName(h.channel) })),
              update: i.join(" && ") + ` ? ${u} : {}`
            }
          ]
        });
      }
      const n = o.map((u) => u.signals.data), l = `unit: ${dv(e)}, fields: ${a + Y4}, values`;
      return r.concat({
        name: v,
        ...s ? { init: `{${l}: ${Fv(s)}}` } : {},
        ...n.length ? {
          on: [
            {
              events: [{ signal: n.join(" || ") }],
              // Prevents double invocation, see https://github.com/vega/vega/issues/1672.
              update: `${n.join(" && ")} ? {${l}: [${n}]} : null`
            }
          ]
        } : {}
      });
    }
  },
  topLevelSignals: (e, t, r) => (pu(e) && e.hasProjection && t.init && (r.filter((v) => v.name === o3).length || r.unshift({
    name: o3,
    value: null,
    on: [
      {
        events: "timer{1}",
        update: `${o3} === null ? {} : ${o3}`
      }
    ]
  })), r),
  marks: (e, t, r) => {
    const a = t.name, { x: v, y: o } = t.project.hasChannel, s = v == null ? void 0 : v.signals.visual, n = o == null ? void 0 : o.signals.visual, l = `data(${vi(t.name + Nv)})`;
    if (Bm.defined(t) || !v && !o)
      return r;
    const u = {
      x: v !== void 0 ? { signal: `${s}[0]` } : { value: 0 },
      y: o !== void 0 ? { signal: `${n}[0]` } : { value: 0 },
      x2: v !== void 0 ? { signal: `${s}[1]` } : { field: { group: "width" } },
      y2: o !== void 0 ? { signal: `${n}[1]` } : { field: { group: "height" } }
    };
    if (t.resolve === "global")
      for (const c of ui(u))
        u[c] = [
          {
            test: `${l}.length && ${l}[0].unit === ${dv(e)}`,
            ...u[c]
          },
          { value: 0 }
        ];
    const { fill: i, fillOpacity: h, cursor: p, ..._ } = t.mark, d = ui(_).reduce((c, g) => (c[g] = [
      {
        test: [v !== void 0 && `${s}[0] !== ${s}[1]`, o !== void 0 && `${n}[0] !== ${n}[1]`].filter((m) => m).join(" && "),
        value: _[g]
      },
      { value: null }
    ], c), {}), f = p ?? (t.translate ? "move" : null);
    return [
      {
        name: `${a + Tx}_bg`,
        type: "rect",
        clip: !0,
        encode: {
          enter: {
            fill: { value: i },
            fillOpacity: { value: h }
          },
          update: u
        }
      },
      ...r,
      {
        name: a + Tx,
        type: "rect",
        clip: !0,
        encode: {
          enter: {
            ...f ? { cursor: { value: f } } : {},
            fill: { value: "transparent" }
          },
          update: { ...u, ...d }
        }
      }
    ];
  }
};
function eze(e, t, r, a) {
  const v = !e.hasProjection, o = r.channel, s = r.signals.visual, n = vi(v ? e.scaleName(o) : e.projectionName()), l = (p) => `scale(${n}, ${p})`, u = e.getSizeSignalRef(o === Yl ? "width" : "height").signal, i = `${o}(unit)`, h = t.events.reduce((p, _) => [
    ...p,
    { events: _.between[0], update: `[${i}, ${i}]` },
    // Brush Start
    { events: _, update: `[${s}[0], clamp(${i}, 0, ${u})]` }
    // Brush End
  ], []);
  if (v) {
    const p = r.signals.data, _ = Bm.defined(t), d = e.getScaleComponent(o), f = d ? d.get("type") : void 0, c = a ? { init: Fv(a, !0, l) } : { value: [] };
    return h.push({
      events: { signal: t.name + aie },
      update: _p(f) ? `[${l(`${p}[0]`)}, ${l(`${p}[1]`)}]` : "[0, 0]"
    }), _ ? [{ name: p, on: [] }] : [
      { name: s, ...c, on: h },
      {
        name: p,
        ...a ? { init: Fv(a) } : {},
        // Cannot be `value` as `init` may require datetime exprs.
        on: [
          {
            events: { signal: s },
            update: `${s}[0] === ${s}[1] ? null : invert(${n}, ${s})`
          }
        ]
      }
    ];
  } else {
    const p = o === Yl ? 0 : 1, _ = t.name + oie, d = a ? { init: `[${_}[0][${p}], ${_}[1][${p}]]` } : { value: [] };
    return [{ name: s, ...d, on: h }];
  }
}
const tze = {
  defined: (e) => e.type === "point",
  signals: (e, t, r) => {
    const a = t.name, v = a + Y4, o = t.project, s = "(item().isVoronoi ? datum.datum : datum)", n = ff(e.component.selection ?? {}).reduce((h, p) => p.type === "interval" ? h.concat(p.name + Tx) : h, []).map((h) => `indexof(item().mark.name, '${h}') < 0`).join(" && "), l = `datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${n ? ` && ${n}` : ""}`;
    let u = `unit: ${dv(e)}, `;
    if (t.project.hasSelectionId)
      u += `${Tp}: ${s}[${vi(Tp)}]`;
    else {
      const h = o.items.map((p) => {
        const _ = e.fieldDef(p.channel);
        return _ != null && _.bin ? `[${s}[${vi(e.vgField(p.channel, {}))}], ${s}[${vi(e.vgField(p.channel, { binSuffix: "end" }))}]]` : `${s}[${vi(p.field)}]`;
      }).join(", ");
      u += `fields: ${v}, values: [${h}]`;
    }
    const i = t.events;
    return r.concat([
      {
        name: a + Pg,
        on: i ? [
          {
            events: i,
            update: `${l} ? {${u}} : null`,
            force: !0
          }
        ] : []
      }
    ]);
  }
};
function Nb({ model: e, channelDef: t, vgChannel: r, invalidValueRef: a, mainRefFn: v }) {
  const o = UT(t) && t.condition;
  let s = [];
  o && (s = Ri(o).map((u) => {
    const i = v(u);
    if (qLe(u)) {
      const { param: h, empty: p } = u;
      return { test: Tie(e, { param: h, empty: p }), ...i };
    } else
      return { test: zk(e, u.test), ...i };
  })), a !== void 0 && s.push(a);
  const n = v(t);
  return n !== void 0 && s.push(n), s.length > 1 || s.length === 1 && s[0].test ? { [r]: s } : s.length === 1 ? { [r]: s[0] } : {};
}
function wR(e, t = "text") {
  const r = e.encoding[t];
  return Nb({
    model: e,
    channelDef: r,
    vgChannel: t,
    mainRefFn: (a) => JT(a, e.config),
    invalidValueRef: void 0
    // text encoding doesn't have continuous scales and thus can't have invalid values
  });
}
function JT(e, t, r = "datum") {
  if (e) {
    if (wp(e))
      return Al(e.value);
    if (La(e)) {
      const { format: a, formatType: v } = Ek(e);
      return nR({ fieldOrDatumDef: e, format: a, formatType: v, expr: r, config: t });
    }
  }
}
function sie(e, t = {}) {
  const { encoding: r, markDef: a, config: v, stack: o } = e, s = r.tooltip;
  if (Qr(s))
    return { tooltip: C$({ tooltip: s }, o, v, t) };
  {
    const n = t.reactiveGeom ? "datum.datum" : "datum";
    return Nb({
      model: e,
      channelDef: s,
      vgChannel: "tooltip",
      mainRefFn: (u) => {
        const i = JT(u, v, n);
        if (i)
          return i;
        if (u === null)
          return;
        let h = Cs("tooltip", a, v);
        if (h === !0 && (h = { content: "encoding" }), Fi(h))
          return { value: h };
        if (Oi(h))
          return Ji(h) ? h : h.content === "encoding" ? C$(r, o, v, t) : { signal: n };
      },
      invalidValueRef: void 0
      // tooltip encoding doesn't have continuous scales and thus can't have invalid values
    });
  }
}
function lie(e, t, r, { reactiveGeom: a } = {}) {
  const v = { ...r, ...r.tooltipFormat }, o = {}, s = a ? "datum.datum" : "datum", n = [];
  function l(i, h) {
    const p = Jv(h), _ = hh(i) ? i : {
      ...i,
      type: e[p].type
      // for secondary field def, copy type from main channel
    }, d = _.title || oR(_, v), f = Ri(d).join(", ").replaceAll(/"/g, '\\"');
    let c;
    if (Yu(h)) {
      const g = h === "x" ? "x2" : "y2", m = kp(e[g]);
      if (af(_.bin) && m) {
        const x = Mi(_, { expr: s }), w = Mi(m, { expr: s }), { format: k, formatType: S } = Ek(_);
        c = $4(x, w, k, S, v), o[g] = !0;
      }
    }
    if ((Yu(h) || h === Bd || h === Dp) && t && t.fieldChannel === h && t.offset === "normalize") {
      const { format: g, formatType: m } = Ek(_);
      c = nR({
        fieldOrDatumDef: _,
        format: g,
        formatType: m,
        expr: s,
        config: v,
        normalizeStack: !0
      }).signal;
    }
    c ?? (c = JT(_, v, s).signal), n.push({ channel: h, key: f, value: c });
  }
  lR(e, (i, h) => {
    gi(i) ? l(i, h) : VT(i) && l(i.condition, h);
  });
  const u = {};
  for (const { channel: i, key: h, value: p } of n)
    !o[i] && !u[h] && (u[h] = p);
  return u;
}
function C$(e, t, r, { reactiveGeom: a } = {}) {
  const v = lie(e, t, r, { reactiveGeom: a }), o = Eg(v).map(([s, n]) => `"${s}": ${n}`);
  return o.length > 0 ? { signal: `{${o.join(", ")}}` } : void 0;
}
function nze(e) {
  const { markDef: t, config: r } = e, a = Cs("aria", t, r);
  return a === !1 ? {} : {
    ...a ? { aria: a } : {},
    ...rze(e),
    ...ize(e)
  };
}
function rze(e) {
  const { mark: t, markDef: r, config: a } = e;
  if (a.aria === !1)
    return {};
  const v = Cs("ariaRoleDescription", r, a);
  return v != null ? { ariaRoleDescription: { value: v } } : t in IIe ? {} : { ariaRoleDescription: { value: t } };
}
function ize(e) {
  const { encoding: t, markDef: r, config: a, stack: v } = e, o = t.description;
  if (o)
    return Nb({
      model: e,
      channelDef: o,
      vgChannel: "description",
      mainRefFn: (l) => JT(l, e.config),
      invalidValueRef: void 0
      // aria encoding doesn't have continuous scales and thus can't have invalid values
    });
  const s = Cs("description", r, a);
  if (s != null)
    return {
      description: Al(s)
    };
  if (a.aria === !1)
    return {};
  const n = lie(t, v, a);
  if (!Rs(n))
    return {
      description: {
        signal: Eg(n).map(([l, u], i) => `"${i > 0 ? "; " : ""}${l}: " + (${u})`).join(" + ")
      }
    };
}
function $c(e, t, r = {}) {
  const { markDef: a, encoding: v, config: o } = t, { vgChannel: s } = r;
  let { defaultRef: n, defaultValue: l } = r;
  n === void 0 && (l ?? (l = Cs(e, a, o, { vgChannel: s, ignoreVgConfig: !0 })), l !== void 0 && (n = Al(l)));
  const u = v[e], i = {
    markDef: a,
    config: o,
    scaleName: t.scaleName(e),
    scale: t.getScaleComponent(e)
  }, h = Jne({
    ...i,
    scaleChannel: e,
    channelDef: u
  });
  return Nb({
    model: t,
    channelDef: u,
    vgChannel: s ?? e,
    invalidValueRef: h,
    mainRefFn: (_) => tR({
      ...i,
      channel: e,
      channelDef: _,
      stack: null,
      // No need to provide stack for non-position as it does not affect mid point
      defaultRef: n
    })
  });
}
function uie(e, t = { filled: void 0 }) {
  const { markDef: r, encoding: a, config: v } = e, { type: o } = r, s = t.filled ?? Cs("filled", r, v), n = ro(["bar", "point", "circle", "square", "geoshape"], o) ? "transparent" : void 0, l = Cs(s === !0 ? "color" : void 0, r, v, { vgChannel: "fill" }) ?? // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified
  v.mark[s === !0 && "color"] ?? // If there is no fill, always fill symbols, bar, geoshape
  // with transparent fills https://github.com/vega/vega-lite/issues/1316
  n, u = Cs(s === !1 ? "color" : void 0, r, v, { vgChannel: "stroke" }) ?? // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified
  v.mark[s === !1 && "color"], i = s ? "fill" : "stroke", h = {
    ...l ? { fill: Al(l) } : {},
    ...u ? { stroke: Al(u) } : {}
  };
  return r.color && (s ? r.fill : r.stroke) && mi(wne("property", { fill: "fill" in r, stroke: "stroke" in r })), {
    ...h,
    ...$c("color", e, {
      vgChannel: i,
      defaultValue: s ? l : u
    }),
    ...$c("fill", e, {
      // if there is encoding.fill, include default fill just in case we have conditional-only fill encoding
      defaultValue: a.fill ? l : void 0
    }),
    ...$c("stroke", e, {
      // if there is encoding.stroke, include default fill just in case we have conditional-only stroke encoding
      defaultValue: a.stroke ? u : void 0
    })
  };
}
function aze(e) {
  const { encoding: t, mark: r } = e, a = t.order;
  return !Xg(r) && wp(a) ? Nb({
    model: e,
    channelDef: a,
    vgChannel: "zindex",
    mainRefFn: (v) => Al(v.value),
    invalidValueRef: void 0
    // zindex encoding doesn't have continuous scales and thus can't have invalid values
  }) : {};
}
function sb({ channel: e, markDef: t, encoding: r = {}, model: a, bandPosition: v }) {
  const o = `${e}Offset`, s = t[o], n = r[o];
  if ((o === "xOffset" || o === "yOffset") && n)
    return { offsetType: "encoding", offset: tR({
      channel: o,
      channelDef: n,
      markDef: t,
      config: a == null ? void 0 : a.config,
      scaleName: a.scaleName(o),
      scale: a.getScaleComponent(o),
      stack: null,
      defaultRef: Al(s),
      bandPosition: v
    }) };
  const l = t[o];
  return l ? { offsetType: "visual", offset: l } : {};
}
function zf(e, t, { defaultPos: r, vgChannel: a }) {
  const { encoding: v, markDef: o, config: s, stack: n } = t, l = v[e], u = v[Z0(e)], i = t.scaleName(e), h = t.getScaleComponent(e), { offset: p, offsetType: _ } = sb({
    channel: e,
    markDef: o,
    encoding: v,
    model: t,
    bandPosition: 0.5
  }), d = kR({
    model: t,
    defaultPos: r,
    channel: e,
    scaleName: i,
    scale: h
  }), f = !l && Yu(e) && (v.latitude || v.longitude) ? (
    // use geopoint output if there are lat/long and there is no point position overriding lat/long.
    { field: t.getName(e) }
  ) : oze({
    channel: e,
    channelDef: l,
    channel2Def: u,
    markDef: o,
    config: s,
    scaleName: i,
    scale: h,
    stack: n,
    offset: p,
    defaultRef: d,
    bandPosition: _ === "encoding" ? 0 : void 0
  });
  return f ? { [a || e]: f } : void 0;
}
function oze(e) {
  const { channel: t, channelDef: r, scaleName: a, stack: v, offset: o, markDef: s } = e;
  if (La(r) && v && t === v.fieldChannel) {
    if (gi(r)) {
      let n = r.bandPosition;
      if (n === void 0 && s.type === "text" && (t === "radius" || t === "theta") && (n = 0.5), n !== void 0)
        return Ak({
          scaleName: a,
          fieldOrDatumDef: r,
          // positionRef always have type
          startSuffix: "start",
          bandPosition: n,
          offset: o
        });
    }
    return fv(r, a, { suffix: "end" }, { offset: o });
  }
  return eR(e);
}
function kR({ model: e, defaultPos: t, channel: r, scaleName: a, scale: v }) {
  const { markDef: o, config: s } = e;
  return () => {
    const n = Jv(r), l = Cg(r), u = Cs(r, o, s, { vgChannel: l });
    if (u !== void 0)
      return nw(r, u);
    switch (t) {
      case "zeroOrMin":
        return I$({ scaleName: a, scale: v, mode: "zeroOrMin", mainChannel: n, config: s });
      case "zeroOrMax":
        return I$({
          scaleName: a,
          scale: v,
          mode: { zeroOrMax: { widthSignal: e.width.signal, heightSignal: e.height.signal } },
          mainChannel: n,
          config: s
        });
      case "mid":
        return { ...e[Nh(r)], mult: 0.5 };
    }
  };
}
function I$({ mainChannel: e, config: t, ...r }) {
  const a = Kne(r), { mode: v } = r;
  if (a)
    return a;
  switch (e) {
    case "radius": {
      if (v === "zeroOrMin")
        return { value: 0 };
      const { widthSignal: o, heightSignal: s } = v.zeroOrMax;
      return {
        signal: `min(${o},${s})/2`
      };
    }
    case "theta":
      return v === "zeroOrMin" ? { value: 0 } : { signal: "2*PI" };
    case "x":
      return v === "zeroOrMin" ? { value: 0 } : { field: { group: "width" } };
    case "y":
      return v === "zeroOrMin" ? { field: { group: "height" } } : { value: 0 };
  }
}
const sze = {
  left: "x",
  center: "xc",
  right: "x2"
}, lze = {
  top: "y",
  middle: "yc",
  bottom: "y2"
};
function cie(e, t, r, a = "middle") {
  if (e === "radius" || e === "theta")
    return Cg(e);
  const v = e === "x" ? "align" : "baseline", o = Cs(v, t, r);
  let s;
  return Ji(o) ? (mi(lDe(v)), s = void 0) : s = o, e === "x" ? sze[s || (a === "top" ? "left" : "center")] : lze[s || a];
}
function Pk(e, t, { defaultPos: r, defaultPos2: a, range: v }) {
  return v ? fie(e, t, { defaultPos: r, defaultPos2: a }) : zf(e, t, { defaultPos: r });
}
function fie(e, t, { defaultPos: r, defaultPos2: a }) {
  const { markDef: v, config: o } = t, s = Z0(e), n = Nh(e), l = uze(t, a, s), u = l[n] ? (
    // If there is width/height, we need to position the marks based on the alignment.
    cie(e, v, o)
  ) : (
    // Otherwise, make sure to apply to the right Vg Channel (for arc mark)
    Cg(e)
  );
  return {
    ...zf(e, t, { defaultPos: r, vgChannel: u }),
    ...l
  };
}
function uze(e, t, r) {
  const { encoding: a, mark: v, markDef: o, stack: s, config: n } = e, l = Jv(r), u = Nh(r), i = Cg(r), h = a[l], p = e.scaleName(l), _ = e.getScaleComponent(l), { offset: d } = r in a || r in o ? sb({ channel: r, markDef: o, encoding: a, model: e }) : sb({ channel: l, markDef: o, encoding: a, model: e });
  if (!h && (r === "x2" || r === "y2") && (a.latitude || a.longitude)) {
    const c = Nh(r), g = e.markDef[c];
    return g != null ? {
      [c]: { value: g }
    } : {
      [i]: { field: e.getName(r) }
    };
  }
  const f = cze({
    channel: r,
    channelDef: h,
    channel2Def: a[r],
    markDef: o,
    config: n,
    scaleName: p,
    scale: _,
    stack: s,
    offset: d,
    defaultRef: void 0
  });
  return f !== void 0 ? { [i]: f } : j6(r, o) || j6(r, {
    [r]: wk(r, o, n.style),
    [u]: wk(u, o, n.style)
  }) || j6(r, n[v]) || j6(r, n.mark) || {
    [i]: kR({
      model: e,
      defaultPos: t,
      channel: r,
      scaleName: p,
      scale: _
    })()
  };
}
function cze({ channel: e, channelDef: t, channel2Def: r, markDef: a, config: v, scaleName: o, scale: s, stack: n, offset: l, defaultRef: u }) {
  return La(t) && n && // If fieldChannel is X and channel is X2 (or Y and Y2)
  e.charAt(0) === n.fieldChannel.charAt(0) ? fv(t, o, { suffix: "start" }, { offset: l }) : eR({
    channel: e,
    channelDef: r,
    scaleName: o,
    scale: s,
    stack: n,
    markDef: a,
    config: v,
    offset: l,
    defaultRef: u
  });
}
function j6(e, t) {
  const r = Nh(e), a = Cg(e);
  if (t[a] !== void 0)
    return { [a]: nw(e, t[a]) };
  if (t[e] !== void 0)
    return { [a]: nw(e, t[e]) };
  if (t[r]) {
    const v = t[r];
    if (zv(v))
      mi(nDe(r));
    else
      return { [r]: nw(e, v) };
  }
}
function Lg(e, t) {
  const { config: r, encoding: a, markDef: v } = e, o = v.type, s = Z0(t), n = Nh(t), l = a[t], u = a[s], i = e.getScaleComponent(t), h = i ? i.get("type") : void 0, p = v.orient, _ = a[n] ?? a.size ?? Cs("size", v, r, { vgChannel: n }), d = one(t), f = o === "bar" && (t === "x" ? p === "vertical" : p === "horizontal");
  return gi(l) && (hl(l.bin) || af(l.bin) || l.timeUnit && !u) && !(_ && !zv(_)) && !a[d] && !Kc(h) ? dze({
    fieldDef: l,
    fieldDef2: u,
    channel: t,
    model: e
  }) : (La(l) && Kc(h) || f) && !u ? hze(l, t, e) : fie(t, e, { defaultPos: "zeroOrMax", defaultPos2: "zeroOrMin" });
}
function fze(e, t, r, a, v, o, s) {
  if (zv(v))
    if (r) {
      const l = r.get("type");
      if (l === "band") {
        let u = `bandwidth('${t}')`;
        v.band !== 1 && (u = `${v.band} * ${u}`);
        const i = P0("minBandSize", { type: s }, a);
        return { signal: i ? `max(${up(i)}, ${u})` : u };
      } else v.band !== 1 && (mi(hDe(l)), v = void 0);
    } else
      return {
        mult: v.band,
        field: { group: e }
      };
  else {
    if (Ji(v))
      return v;
    if (v)
      return { value: v };
  }
  if (r) {
    const l = r.get("range");
    if (Zg(l) && Ro(l.step))
      return { value: l.step - 2 };
  }
  if (!o) {
    const { bandPaddingInner: l, barBandPaddingInner: u, rectBandPaddingInner: i } = a.scale, h = Wu(l, s === "bar" ? u : i);
    if (Ji(h))
      return { signal: `(1 - (${h.signal})) * ${e}` };
    if (Ro(h))
      return { signal: `${1 - h} * ${e}` };
  }
  return { value: Dk(a.view, e) - 2 };
}
function hze(e, t, r) {
  var D, L;
  const { markDef: a, encoding: v, config: o, stack: s } = r, n = a.orient, l = r.scaleName(t), u = r.getScaleComponent(t), i = Nh(t), h = Z0(t), p = one(t), _ = r.scaleName(p), d = r.getScaleComponent(Iz(t)), f = n === "horizontal" && t === "y" || n === "vertical" && t === "x";
  let c;
  (v.size || a.size) && (f ? c = $c("size", r, {
    vgChannel: i,
    defaultRef: Al(a.size)
  }) : mi(gDe(a.type)));
  const g = !!c, m = are({
    channel: t,
    fieldDef: e,
    markDef: a,
    config: o,
    scaleType: (D = u || d) == null ? void 0 : D.get("type"),
    useVlSizeChannel: f
  });
  c = c || {
    [i]: fze(i, _ || l, d || u, o, m, !!e, a.type)
  };
  const x = ((L = u || d) == null ? void 0 : L.get("type")) === "band" && zv(m) && !g ? "top" : "middle", w = cie(t, a, o, x), k = w === "xc" || w === "yc", { offset: S, offsetType: A } = sb({ channel: t, markDef: a, encoding: v, model: r, bandPosition: k ? 0.5 : 0 }), C = eR({
    channel: t,
    channelDef: e,
    markDef: a,
    config: o,
    scaleName: l,
    scale: u,
    stack: s,
    offset: S,
    defaultRef: kR({ model: r, defaultPos: "mid", channel: t, scaleName: l, scale: u }),
    bandPosition: k ? A === "encoding" ? 0 : 0.5 : Ji(m) ? { signal: `(1-${m})/2` } : zv(m) ? (1 - m.band) / 2 : 0
  });
  if (i)
    return { [w]: C, ...c };
  {
    const E = Cg(h), P = c[i], I = S ? { ...P, offset: S } : P;
    return {
      [w]: C,
      // posRef might be an array that wraps position invalid test
      [E]: Qr(C) ? [C[0], { ...C[1], offset: I }] : {
        ...C,
        offset: I
      }
    };
  }
}
function D$(e, t, r, a, v, o, s) {
  if (ene(e))
    return 0;
  const n = e === "x" || e === "y2", l = n ? -t / 2 : t / 2;
  if (Ji(r) || Ji(v) || Ji(a) || o) {
    const u = up(r), i = up(v), h = up(a), p = up(o), d = o ? `(${s} < ${p} ? ${n ? "" : "-"}0.5 * (${p} - (${s})) : ${l})` : l, f = h ? `${h} + ` : "", c = u ? `(${u} ? -1 : 1) * ` : "", g = i ? `(${i} + ${d})` : d;
    return {
      signal: f + c + g
    };
  } else
    return v = v || 0, a + (r ? -v - l : +v + l);
}
function dze({ fieldDef: e, fieldDef2: t, channel: r, model: a }) {
  var L;
  const { config: v, markDef: o, encoding: s } = a, n = a.getScaleComponent(r), l = a.scaleName(r), u = n ? n.get("type") : void 0, i = n.get("reverse"), h = are({ channel: r, fieldDef: e, markDef: o, config: v, scaleType: u }), p = (L = a.component.axes[r]) == null ? void 0 : L[0], _ = (p == null ? void 0 : p.get("translate")) ?? 0.5, d = Yu(r) ? Cs("binSpacing", o, v) ?? 0 : 0, f = Z0(r), c = Cg(r), g = Cg(f), m = P0("minBandSize", o, v), { offset: x } = sb({ channel: r, markDef: o, encoding: s, model: a, bandPosition: 0 }), { offset: w } = sb({ channel: f, markDef: o, encoding: s, model: a, bandPosition: 0 }), k = NLe({ fieldDef: e, scaleName: l }), S = D$(r, d, i, _, x, m, k), A = D$(f, d, i, _, w ?? x, m, k), C = Ji(h) ? { signal: `(1-${h.signal})/2` } : zv(h) ? (1 - h.band) / 2 : 0.5, D = Ig({ fieldDef: e, fieldDef2: t, markDef: o, config: v });
  if (hl(e.bin) || e.timeUnit) {
    const E = e.timeUnit && D !== 0.5;
    return {
      [g]: L$({
        fieldDef: e,
        scaleName: l,
        bandPosition: C,
        offset: A,
        useRectOffsetField: E
      }),
      [c]: L$({
        fieldDef: e,
        scaleName: l,
        bandPosition: Ji(C) ? { signal: `1-${C.signal}` } : 1 - C,
        offset: S,
        useRectOffsetField: E
      })
    };
  } else if (af(e.bin)) {
    const E = fv(e, l, {}, { offset: A });
    if (gi(t))
      return {
        [g]: E,
        [c]: fv(t, l, {}, { offset: S })
      };
    if (Qv(e.bin) && e.bin.step)
      return {
        [g]: E,
        [c]: {
          signal: `scale("${l}", ${Mi(e, { expr: "datum" })} + ${e.bin.step})`,
          offset: S
        }
      };
  }
  mi(Ane(f));
}
function L$({ fieldDef: e, scaleName: t, bandPosition: r, offset: a, useRectOffsetField: v }) {
  return Ak({
    scaleName: t,
    fieldOrDatumDef: e,
    bandPosition: r,
    offset: a,
    ...v ? {
      startSuffix: XT,
      endSuffix: KT
    } : {}
  });
}
const pze = /* @__PURE__ */ new Set(["aria", "width", "height"]);
function jd(e, t) {
  const { fill: r = void 0, stroke: a = void 0 } = t.color === "include" ? uie(e) : {};
  return {
    ...mze(e.markDef, t),
    ...P$("fill", r),
    ...P$("stroke", a),
    ...$c("opacity", e),
    ...$c("fillOpacity", e),
    ...$c("strokeOpacity", e),
    ...$c("strokeWidth", e),
    ...$c("strokeDash", e),
    ...aze(e),
    ...sie(e),
    ...wR(e, "href"),
    ...nze(e)
  };
}
function P$(e, t) {
  return t ? { [e]: t } : {};
}
function mze(e, t) {
  return CIe.reduce((r, a) => (!pze.has(a) && e[a] !== void 0 && t[a] !== "ignore" && (r[a] = Al(e[a])), r), {});
}
function TR(e) {
  const { config: t, markDef: r } = e, a = /* @__PURE__ */ new Set();
  if (e.forEachFieldDef((v, o) => {
    var u;
    let s;
    if (!X0(o) || !(s = e.getScaleType(o)))
      return;
    const n = IT(v.aggregate), l = Qz({
      scaleChannel: o,
      markDef: r,
      config: t,
      scaleType: s,
      isCountAggregate: n
    });
    if (zLe(l)) {
      const i = e.vgField(o, { expr: "datum", binSuffix: (u = e.stack) != null && u.impute ? "mid" : void 0 });
      i && a.add(i);
    }
  }), a.size > 0)
    return { defined: { signal: [...a].map((o) => OT(o, !0)).join(" && ") } };
}
function O$(e, t) {
  if (t !== void 0)
    return { [e]: Al(t) };
}
const UM = "voronoi", hie = {
  defined: (e) => e.type === "point" && e.nearest,
  parse: (e, t) => {
    if (t.events)
      for (const r of t.events)
        r.markname = e.getName(UM);
  },
  marks: (e, t, r) => {
    const { x: a, y: v } = t.project.hasChannel, o = e.mark;
    if (Xg(o))
      return mi(zIe(o)), r;
    const s = {
      name: e.getName(UM),
      type: "path",
      interactive: !0,
      from: { data: e.getName("marks") },
      encode: {
        update: {
          fill: { value: "transparent" },
          strokeWidth: { value: 0.35 },
          stroke: { value: "transparent" },
          isVoronoi: { value: !0 },
          ...sie(e, { reactiveGeom: !0 })
        }
      },
      transform: [
        {
          type: "voronoi",
          x: { expr: a || !v ? "datum.datum.x || 0" : "0" },
          y: { expr: v || !a ? "datum.datum.y || 0" : "0" },
          size: [e.getSizeSignalRef("width"), e.getSizeSignalRef("height")]
        }
      ]
    };
    let n = 0, l = !1;
    return r.forEach((u, i) => {
      const h = u.name ?? "";
      h === e.component.mark[0].name ? n = i : h.indexOf(UM) >= 0 && (l = !0);
    }), l || r.splice(n + 1, 0, s), r;
  }
}, die = {
  defined: (e) => e.type === "point" && e.resolve === "global" && e.bind && e.bind !== "scales" && !pR(e.bind),
  parse: (e, t, r) => _ie(t, r),
  topLevelSignals: (e, t, r) => {
    const a = t.name, v = t.project, o = t.bind, s = t.init && t.init[0], n = hie.defined(t) ? "(item().isVoronoi ? datum.datum : datum)" : "datum";
    return v.items.forEach((l, u) => {
      const i = Gl(`${a}_${l.field}`);
      r.filter((p) => p.name === i).length || r.unshift({
        name: i,
        ...s ? { init: Fv(s[u]) } : { value: null },
        on: t.events ? [
          {
            events: t.events,
            update: `datum && item().mark.marktype !== 'group' ? ${n}[${vi(l.field)}] : null`
          }
        ] : [],
        bind: o[l.field] ?? o[l.channel] ?? o
      });
    }), r;
  },
  signals: (e, t, r) => {
    const a = t.name, v = t.project, o = r.filter((u) => u.name === a + Pg)[0], s = a + Y4, n = v.items.map((u) => Gl(`${a}_${u.field}`)), l = n.map((u) => `${u} !== null`).join(" && ");
    return n.length && (o.update = `${l} ? {fields: ${s}, values: [${n.join(", ")}]} : null`), delete o.value, delete o.on, r;
  }
}, Ok = "_toggle", pie = {
  defined: (e) => e.type === "point" && !!e.toggle,
  signals: (e, t, r) => r.concat({
    name: t.name + Ok,
    value: !1,
    on: [{ events: t.events, update: t.toggle }]
  }),
  modifyExpr: (e, t) => {
    const r = t.name + Pg, a = t.name + Ok;
    return `${a} ? null : ${r}, ` + (t.resolve === "global" ? `${a} ? null : true, ` : `${a} ? null : {unit: ${dv(e)}}, `) + `${a} ? ${r} : null`;
  }
}, gze = {
  defined: (e) => e.clear !== void 0 && e.clear !== !1,
  parse: (e, t) => {
    t.clear && (t.clear = Fi(t.clear) ? Vg(t.clear, "view") : t.clear);
  },
  topLevelSignals: (e, t, r) => {
    if (die.defined(t))
      for (const a of t.project.items) {
        const v = r.findIndex((o) => o.name === Gl(`${t.name}_${a.field}`));
        v !== -1 && r[v].on.push({ events: t.clear, update: "null" });
      }
    return r;
  },
  signals: (e, t, r) => {
    function a(v, o) {
      v !== -1 && r[v].on && r[v].on.push({ events: t.clear, update: o });
    }
    if (t.type === "interval")
      for (const v of t.project.items) {
        const o = r.findIndex((s) => s.name === v.signals.visual);
        if (a(o, "[0, 0]"), o === -1) {
          const s = r.findIndex((n) => n.name === v.signals.data);
          a(s, "null");
        }
      }
    else {
      let v = r.findIndex((o) => o.name === t.name + Pg);
      a(v, "null"), pie.defined(t) && (v = r.findIndex((o) => o.name === t.name + Ok), a(v, "false"));
    }
    return r;
  }
}, mie = {
  defined: (e) => {
    const t = e.resolve === "global" && e.bind && pR(e.bind), r = e.project.items.length === 1 && e.project.items[0].field !== Tp;
    return t && !r && mi(BIe), t && r;
  },
  parse: (e, t, r) => {
    const a = ka(r);
    if (a.select = Fi(a.select) ? { type: a.select, toggle: t.toggle } : { ...a.select, toggle: t.toggle }, _ie(t, a), Oi(r.select) && (r.select.on || r.select.clear)) {
      const s = 'event.item && indexof(event.item.mark.role, "legend") < 0';
      for (const n of t.events)
        n.filter = Ri(n.filter ?? []), n.filter.includes(s) || n.filter.push(s);
    }
    const v = FM(t.bind) ? t.bind.legend : "click", o = Fi(v) ? Vg(v, "view") : Ri(v);
    t.bind = { legend: { merge: o } };
  },
  topLevelSignals: (e, t, r) => {
    const a = t.name, v = FM(t.bind) && t.bind.legend, o = (s) => (n) => {
      const l = ka(n);
      return l.markname = s, l;
    };
    for (const s of t.project.items) {
      if (!s.hasLegend)
        continue;
      const n = `${Gl(s.field)}_legend`, l = `${a}_${n}`;
      if (r.filter((i) => i.name === l).length === 0) {
        const i = v.merge.map(o(`${n}_symbols`)).concat(v.merge.map(o(`${n}_labels`))).concat(v.merge.map(o(`${n}_entries`)));
        r.unshift({
          name: l,
          ...t.init ? {} : { value: null },
          on: [
            // Legend entries do not store values, so we need to walk the scenegraph to the symbol datum.
            {
              events: i,
              update: "isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",
              force: !0
            },
            { events: v.merge, update: `!event.item || !datum ? null : ${l}`, force: !0 }
          ]
        });
      }
    }
    return r;
  },
  signals: (e, t, r) => {
    const a = t.name, v = t.project, o = r.find((p) => p.name === a + Pg), s = a + Y4, n = v.items.filter((p) => p.hasLegend).map((p) => Gl(`${a}_${Gl(p.field)}_legend`)), u = `${n.map((p) => `${p} !== null`).join(" && ")} ? {fields: ${s}, values: [${n.join(", ")}]} : null`;
    t.events && n.length > 0 ? o.on.push({
      events: n.map((p) => ({ signal: p })),
      update: u
    }) : n.length > 0 && (o.update = u, delete o.value, delete o.on);
    const i = r.find((p) => p.name === a + Ok), h = FM(t.bind) && t.bind.legend;
    return i && (t.events ? i.on.push({ ...i.on[0], events: h }) : i.on[0].events = h), r;
  }
};
function yze(e, t, r) {
  var v;
  const a = (v = e.fieldDef(t)) == null ? void 0 : v.field;
  for (const o of ff(e.component.selection ?? {})) {
    const s = o.project.hasField[a] ?? o.project.hasChannel[t];
    if (s && mie.defined(o)) {
      const n = r.get("selections") ?? [];
      n.push(o.name), r.set("selections", n, !1), s.hasLegend = !0;
    }
  }
}
const gie = "_translate_anchor", yie = "_translate_delta", vze = {
  defined: (e) => e.type === "interval" && e.translate,
  signals: (e, t, r) => {
    const a = t.name, v = Bm.defined(t), o = a + gie, { x: s, y: n } = t.project.hasChannel;
    let l = Vg(t.translate, "scope");
    return v || (l = l.map((u) => (u.between[0].markname = a + Tx, u))), r.push({
      name: o,
      value: {},
      on: [
        {
          events: l.map((u) => u.between[0]),
          update: "{x: x(unit), y: y(unit)" + (s !== void 0 ? `, extent_x: ${v ? MI(e, Yl) : `slice(${s.signals.visual})`}` : "") + (n !== void 0 ? `, extent_y: ${v ? MI(e, Qc) : `slice(${n.signals.visual})`}` : "") + "}"
        }
      ]
    }, {
      name: a + yie,
      value: {},
      on: [
        {
          events: l,
          update: `{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`
        }
      ]
    }), s !== void 0 && z$(e, t, s, "width", r), n !== void 0 && z$(e, t, n, "height", r), r;
  }
};
function z$(e, t, r, a, v) {
  const o = t.name, s = o + gie, n = o + yie, l = r.channel, u = Bm.defined(t), i = v.filter((k) => k.name === r.signals[u ? "data" : "visual"])[0], h = e.getSizeSignalRef(a).signal, p = e.getScaleComponent(l), _ = p && p.get("type"), d = p && p.get("reverse"), f = u ? l === Yl ? d ? "" : "-" : d ? "-" : "" : "", c = `${s}.extent_${l}`, g = `${f}${n}.${l} / ${u ? `${h}` : `span(${c})`}`, m = !u || !p ? "panLinear" : _ === "log" ? "panLog" : _ === "symlog" ? "panSymlog" : _ === "pow" ? "panPow" : "panLinear", x = u ? _ === "pow" ? `, ${p.get("exponent") ?? 1}` : _ === "symlog" ? `, ${p.get("constant") ?? 1}` : "" : "", w = `${m}(${c}, ${g}${x})`;
  i.on.push({
    events: { signal: n },
    update: u ? w : `clampRange(${w}, 0, ${h})`
  });
}
const vie = "_zoom_anchor", xie = "_zoom_delta", xze = {
  defined: (e) => e.type === "interval" && e.zoom,
  signals: (e, t, r) => {
    const a = t.name, v = Bm.defined(t), o = a + xie, { x: s, y: n } = t.project.hasChannel, l = vi(e.scaleName(Yl)), u = vi(e.scaleName(Qc));
    let i = Vg(t.zoom, "scope");
    return v || (i = i.map((h) => (h.markname = a + Tx, h))), r.push({
      name: a + vie,
      on: [
        {
          events: i,
          update: v ? "{" + [l ? `x: invert(${l}, x(unit))` : "", u ? `y: invert(${u}, y(unit))` : ""].filter((h) => h).join(", ") + "}" : "{x: x(unit), y: y(unit)}"
        }
      ]
    }, {
      name: o,
      on: [
        {
          events: i,
          force: !0,
          update: "pow(1.001, event.deltaY * pow(16, event.deltaMode))"
        }
      ]
    }), s !== void 0 && R$(e, t, s, "width", r), n !== void 0 && R$(e, t, n, "height", r), r;
  }
};
function R$(e, t, r, a, v) {
  const o = t.name, s = r.channel, n = Bm.defined(t), l = v.filter((m) => m.name === r.signals[n ? "data" : "visual"])[0], u = e.getSizeSignalRef(a).signal, i = e.getScaleComponent(s), h = i && i.get("type"), p = n ? MI(e, s) : l.name, _ = o + xie, d = `${o}${vie}.${s}`, f = !n || !i ? "zoomLinear" : h === "log" ? "zoomLog" : h === "symlog" ? "zoomSymlog" : h === "pow" ? "zoomPow" : "zoomLinear", c = n ? h === "pow" ? `, ${i.get("exponent") ?? 1}` : h === "symlog" ? `, ${i.get("constant") ?? 1}` : "" : "", g = `${f}(${p}, ${d}, ${_}${c})`;
  l.on.push({
    events: { signal: _ },
    update: n ? g : `clampRange(${g}, 0, ${u})`
  });
}
const Nv = "_store", Pg = "_tuple", bze = "_modify", bie = "vlSelectionResolve", QT = [
  tze,
  QOe,
  KOe,
  pie,
  // Bindings may disable direct manipulation.
  die,
  Bm,
  mie,
  gze,
  vze,
  xze,
  hie
];
function _ze(e) {
  let t = e.parent;
  for (; t && !rd(t); )
    t = t.parent;
  return t;
}
function dv(e, { escape: t } = { escape: !0 }) {
  let r = t ? vi(e.name) : e.name;
  const a = _ze(e);
  if (a) {
    const { facet: v } = a;
    for (const o of Sd)
      v[o] && (r += ` + '__facet_${o}_' + (facet[${vi(a.vgField(o))}])`);
  }
  return r;
}
function AR(e) {
  return ff(e.component.selection ?? {}).reduce((t, r) => t || r.project.hasSelectionId, !1);
}
function _ie(e, t) {
  (Fi(t.select) || !t.select.on) && delete e.events, (Fi(t.select) || !t.select.clear) && delete e.clear, (Fi(t.select) || !t.select.toggle) && delete e.toggle;
}
function EI(e) {
  const t = [];
  return e.type === "Identifier" ? [e.name] : e.type === "Literal" ? [e.value] : (e.type === "MemberExpression" && (t.push(...EI(e.object)), t.push(...EI(e.property))), t);
}
function wie(e) {
  return e.object.type === "MemberExpression" ? wie(e.object) : e.object.name === "datum";
}
function kie(e) {
  const t = qO(e), r = /* @__PURE__ */ new Set();
  return t.visit((a) => {
    a.type === "MemberExpression" && wie(a) && r.add(EI(a).slice(1).join("."));
  }), r;
}
class Bb extends Is {
  clone() {
    return new Bb(null, this.model, ka(this.filter));
  }
  constructor(t, r, a) {
    super(t), this.model = r, this.filter = a, this.expr = zk(this.model, this.filter, this), this._dependentFields = kie(this.expr);
  }
  dependentFields() {
    return this._dependentFields;
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  assemble() {
    return {
      type: "filter",
      expr: this.expr
    };
  }
  hash() {
    return `Filter ${this.expr}`;
  }
}
function wze(e, t) {
  const r = {}, a = e.config.selection;
  if (!t || !t.length)
    return r;
  for (const v of t) {
    const o = Gl(v.name), s = v.select, n = Fi(s) ? s : s.type, l = Oi(s) ? ka(s) : { type: n }, u = a[n];
    for (const p in u)
      p === "fields" || p === "encodings" || (p === "mark" && (l[p] = { ...u[p], ...l[p] }), (l[p] === void 0 || l[p] === !0) && (l[p] = ka(u[p] ?? l[p])));
    const i = r[o] = {
      ...l,
      name: o,
      type: n,
      init: v.value,
      bind: v.bind,
      events: Fi(l.on) ? Vg(l.on, "scope") : Ri(ka(l.on))
    }, h = ka(v);
    for (const p of QT)
      p.defined(i) && p.parse && p.parse(e, i, h);
  }
  return r;
}
function Tie(e, t, r, a = "datum") {
  const v = Fi(t) ? t : t.param, o = Gl(v), s = vi(o + Nv);
  let n;
  try {
    n = e.getSelectionComponent(o, v);
  } catch {
    return `!!${o}`;
  }
  if (n.project.timeUnit) {
    const p = r ?? e.component.data.raw, _ = n.project.timeUnit.clone();
    p.parent ? _.insertAsParentOf(p) : p.parent = _;
  }
  const l = n.project.hasSelectionId ? "vlSelectionIdTest(" : "vlSelectionTest(", u = n.resolve === "global" ? ")" : `, ${vi(n.resolve)})`, i = `${l}${s}, ${a}${u}`, h = `length(data(${s}))`;
  return t.empty === !1 ? `${h} && ${i}` : `!${h} || ${i}`;
}
function Aie(e, t, r) {
  const a = Gl(t), v = r.encoding;
  let o = r.field, s;
  try {
    s = e.getSelectionComponent(a, t);
  } catch {
    return a;
  }
  if (!v && !o)
    o = s.project.items[0].field, s.project.items.length > 1 && mi(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${vi(o)}.`);
  else if (v && !o) {
    const n = s.project.items.filter((l) => l.channel === v);
    !n.length || n.length > 1 ? (o = s.project.items[0].field, mi((n.length ? "Multiple " : "No ") + `matching ${vi(v)} encoding found for selection ${vi(r.param)}. Using "field": ${vi(o)}.`)) : o = n[0].field;
  }
  return `${s.name}[${vi(Rd(o))}]`;
}
function kze(e, t) {
  for (const [r, a] of Eg(e.component.selection ?? {})) {
    const v = e.getName(`lookup_${r}`);
    e.component.data.outputNodes[v] = a.materialized = new Dh(new Bb(t, e, { param: r }), v, Du.Lookup, e.component.data.outputNodeRefCounts);
  }
}
function zk(e, t, r) {
  return tw(t, (a) => Fi(a) ? a : QDe(a) ? Tie(e, a, r) : Fne(a));
}
function Tze(e, t) {
  if (e)
    return Qr(e) && !$1(e) ? e.map((r) => oR(r, t)).join(", ") : e;
}
function VM(e, t, r, a) {
  var v, o;
  e.encode ?? (e.encode = {}), (v = e.encode)[t] ?? (v[t] = {}), (o = e.encode[t]).update ?? (o.update = {}), e.encode[t].update[r] = a;
}
function z3(e, t, r, a = { header: !1 }) {
  var h, p;
  const { disable: v, orient: o, scale: s, labelExpr: n, title: l, zindex: u, ...i } = e.combine();
  if (!v) {
    for (const _ in i) {
      const d = iPe[_], f = i[_];
      if (d && d !== t && d !== "both")
        delete i[_];
      else if (W4(f)) {
        const { condition: c, ...g } = f, m = Ri(c), x = u$[_];
        if (x) {
          const { vgProp: w, part: k } = x, S = [
            ...m.map((A) => {
              const { test: C, ...D } = A;
              return {
                test: zk(null, C),
                ...D
              };
            }),
            g
          ];
          VM(i, k, w, S), delete i[_];
        } else if (x === null) {
          const w = {
            signal: m.map((k) => {
              const { test: S, ...A } = k;
              return `${zk(null, S)} ? ${WV(A)} : `;
            }).join("") + WV(g)
          };
          i[_] = w;
        }
      } else if (Ji(f)) {
        const c = u$[_];
        if (c) {
          const { vgProp: g, part: m } = c;
          VM(i, m, g, f), delete i[_];
        }
      }
      ro(["labelAlign", "labelBaseline"], _) && i[_] === null && delete i[_];
    }
    if (t === "grid") {
      if (!i.grid)
        return;
      if (i.encode) {
        const { grid: _ } = i.encode;
        i.encode = {
          ..._ ? { grid: _ } : {}
        }, Rs(i.encode) && delete i.encode;
      }
      return {
        scale: s,
        orient: o,
        ...i,
        domain: !1,
        labels: !1,
        aria: !1,
        // always hide grid axis
        // Always set min/maxExtent to 0 to ensure that `config.axis*.minExtent` and `config.axis*.maxExtent`
        // would not affect gridAxis
        maxExtent: 0,
        minExtent: 0,
        ticks: !1,
        zindex: Wu(u, 0)
        // put grid behind marks by default
      };
    } else {
      if (!a.header && e.mainExtracted)
        return;
      if (n !== void 0) {
        let d = n;
        (p = (h = i.encode) == null ? void 0 : h.labels) != null && p.update && Ji(i.encode.labels.update.text) && (d = Dv(n, "datum.label", i.encode.labels.update.text.signal)), VM(i, "labels", "text", { signal: d });
      }
      if (i.labelAlign === null && delete i.labelAlign, i.encode) {
        for (const d of mre)
          e.hasAxisPart(d) || delete i.encode[d];
        Rs(i.encode) && delete i.encode;
      }
      const _ = Tze(l, r);
      return {
        scale: s,
        orient: o,
        grid: !1,
        ..._ ? { title: _ } : {},
        ...i,
        ...r.aria === !1 ? { aria: !1 } : {},
        zindex: Wu(u, 0)
        // put axis line above marks by default
      };
    }
  }
}
function Sie(e) {
  const { axes: t } = e.component, r = [];
  for (const a of n1)
    if (t[a]) {
      for (const v of t[a])
        if (!v.get("disable") && !v.get("gridScale")) {
          const o = a === "x" ? "height" : "width", s = e.getSizeSignalRef(o).signal;
          o !== s && r.push({
            name: o,
            update: s
          });
        }
    }
  return r;
}
function Aze(e, t) {
  const { x: r = [], y: a = [] } = e;
  return [
    ...r.map((v) => z3(v, "grid", t)),
    ...a.map((v) => z3(v, "grid", t)),
    ...r.map((v) => z3(v, "main", t)),
    ...a.map((v) => z3(v, "main", t))
  ].filter((v) => v);
}
function F$(e, t, r, a) {
  return Object.assign.apply(null, [
    {},
    ...e.map((v) => {
      if (v === "axisOrient") {
        const o = r === "x" ? "bottom" : "left", s = t[r === "x" ? "axisBottom" : "axisLeft"] || {}, n = t[r === "x" ? "axisTop" : "axisRight"] || {}, l = /* @__PURE__ */ new Set([...ui(s), ...ui(n)]), u = {};
        for (const i of l.values())
          u[i] = {
            // orient is surely signal in this case
            signal: `${a.signal} === "${o}" ? ${up(s[i])} : ${up(n[i])}`
          };
        return u;
      }
      return t[v];
    })
  ]);
}
function Sze(e, t, r, a) {
  const v = t === "band" ? ["axisDiscrete", "axisBand"] : t === "point" ? ["axisDiscrete", "axisPoint"] : Une(t) ? ["axisQuantitative"] : t === "time" || t === "utc" ? ["axisTemporal"] : [], o = e === "x" ? "axisX" : "axisY", s = Ji(r) ? "axisOrient" : `axis${F4(r)}`, n = [
    // technically Vega does have axisBand, but if we make another separation here,
    // it will further introduce complexity in the code
    ...v,
    ...v.map((u) => o + u.substr(4))
  ], l = ["axis", s, o];
  return {
    vlOnlyAxisConfig: F$(n, a, e, r),
    vgAxisConfig: F$(l, a, e, r),
    axisConfigStyle: Mze([...l, ...n], a)
  };
}
function Mze(e, t) {
  var a;
  const r = [{}];
  for (const v of e) {
    let o = (a = t[v]) == null ? void 0 : a.style;
    if (o) {
      o = Ri(o);
      for (const s of o)
        r.push(t.style[s]);
    }
  }
  return Object.assign.apply(null, r);
}
function CI(e, t, r, a = {}) {
  var o;
  const v = mne(e, r, t);
  if (v !== void 0)
    return {
      configFrom: "style",
      configValue: v
    };
  for (const s of ["vlOnlyAxisConfig", "vgAxisConfig", "axisConfigStyle"])
    if (((o = a[s]) == null ? void 0 : o[e]) !== void 0)
      return { configFrom: s, configValue: a[s][e] };
  return {};
}
const N$ = {
  scale: ({ model: e, channel: t }) => e.scaleName(t),
  format: ({ format: e }) => e,
  // we already calculate this in parse
  formatType: ({ formatType: e }) => e,
  // we already calculate this in parse
  grid: ({ fieldOrDatumDef: e, axis: t, scaleType: r }) => t.grid ?? Eze(r, e),
  gridScale: ({ model: e, channel: t }) => Cze(e, t),
  labelAlign: ({ axis: e, labelAngle: t, orient: r, channel: a }) => e.labelAlign || Eie(t, r, a),
  labelAngle: ({ labelAngle: e }) => e,
  // we already calculate this in parse
  labelBaseline: ({ axis: e, labelAngle: t, orient: r, channel: a }) => e.labelBaseline || Mie(t, r, a),
  labelFlush: ({ axis: e, fieldOrDatumDef: t, channel: r }) => e.labelFlush ?? Dze(t.type, r),
  labelOverlap: ({ axis: e, fieldOrDatumDef: t, scaleType: r }) => e.labelOverlap ?? Lze(t.type, r, gi(t) && !!t.timeUnit, gi(t) ? t.sort : void 0),
  // we already calculate orient in parse
  orient: ({ orient: e }) => e,
  // Need to cast until Vega supports signal
  tickCount: ({ channel: e, model: t, axis: r, fieldOrDatumDef: a, scaleType: v }) => {
    const o = e === "x" ? "width" : e === "y" ? "height" : void 0, s = o ? t.getSizeSignalRef(o) : void 0;
    return r.tickCount ?? Oze({ fieldOrDatumDef: a, scaleType: v, size: s, values: r.values });
  },
  tickMinStep: zze,
  title: ({ axis: e, model: t, channel: r }) => {
    if (e.title !== void 0)
      return e.title;
    const a = Cie(t, r);
    if (a !== void 0)
      return a;
    const v = t.typedFieldDef(r), o = r === "x" ? "x2" : "y2", s = t.fieldDef(o);
    return yne(v ? [s$(v)] : [], gi(s) ? [s$(s)] : []);
  },
  values: ({ axis: e, fieldOrDatumDef: t }) => Rze(e, t),
  zindex: ({ axis: e, fieldOrDatumDef: t, mark: r }) => e.zindex ?? Fze(r, t)
};
function Eze(e, t) {
  return !Kc(e) && gi(t) && !hl(t == null ? void 0 : t.bin) && !af(t == null ? void 0 : t.bin);
}
function Cze(e, t) {
  const r = t === "x" ? "y" : "x";
  if (e.getScaleComponent(r))
    return e.scaleName(r);
}
function Ize(e, t, r, a, v) {
  const o = t == null ? void 0 : t.labelAngle;
  if (o !== void 0)
    return Ji(o) ? o : qw(o);
  {
    const { configValue: s } = CI("labelAngle", a, t == null ? void 0 : t.style, v);
    return s !== void 0 ? qw(s) : r === Yl && ro([Zz, Yz], e.type) && !(gi(e) && e.timeUnit) ? 270 : void 0;
  }
}
function II(e) {
  return `(((${e.signal} % 360) + 360) % 360)`;
}
function Mie(e, t, r, a) {
  if (e !== void 0)
    if (r === "x") {
      if (Ji(e)) {
        const v = II(e), o = Ji(t) ? `(${t.signal} === "top")` : t === "top";
        return {
          signal: `(45 < ${v} && ${v} < 135) || (225 < ${v} && ${v} < 315) ? "middle" :(${v} <= 45 || 315 <= ${v}) === ${o} ? "bottom" : "top"`
        };
      }
      if (45 < e && e < 135 || 225 < e && e < 315)
        return "middle";
      if (Ji(t)) {
        const v = e <= 45 || 315 <= e ? "===" : "!==";
        return { signal: `${t.signal} ${v} "top" ? "bottom" : "top"` };
      }
      return (e <= 45 || 315 <= e) == (t === "top") ? "bottom" : "top";
    } else {
      if (Ji(e)) {
        const v = II(e), o = Ji(t) ? `(${t.signal} === "left")` : t === "left";
        return {
          signal: `${v} <= 45 || 315 <= ${v} || (135 <= ${v} && ${v} <= 225) ? ${a ? '"middle"' : "null"} : (45 <= ${v} && ${v} <= 135) === ${o} ? "top" : "bottom"`
        };
      }
      if (e <= 45 || 315 <= e || 135 <= e && e <= 225)
        return a ? "middle" : null;
      if (Ji(t)) {
        const v = 45 <= e && e <= 135 ? "===" : "!==";
        return { signal: `${t.signal} ${v} "left" ? "top" : "bottom"` };
      }
      return (45 <= e && e <= 135) == (t === "left") ? "top" : "bottom";
    }
}
function Eie(e, t, r) {
  if (e === void 0)
    return;
  const a = r === "x", v = a ? 0 : 90, o = a ? "bottom" : "left";
  if (Ji(e)) {
    const s = II(e), n = Ji(t) ? `(${t.signal} === "${o}")` : t === o;
    return {
      signal: `(${v ? `(${s} + 90)` : s} % 180 === 0) ? ${a ? null : '"center"'} :(${v} < ${s} && ${s} < ${180 + v}) === ${n} ? "left" : "right"`
    };
  }
  if ((e + v) % 180 === 0)
    return a ? null : "center";
  if (Ji(t)) {
    const s = v < e && e < 180 + v ? "===" : "!==";
    return {
      signal: `${`${t.signal} ${s} "${o}"`} ? "left" : "right"`
    };
  }
  return (v < e && e < 180 + v) == (t === o) ? "left" : "right";
}
function Dze(e, t) {
  if (t === "x" && ro(["quantitative", "temporal"], e))
    return !0;
}
function Lze(e, t, r, a) {
  if (r && !Oi(a) || e !== "nominal" && e !== "ordinal")
    return t === "log" || t === "symlog" ? "greedy" : !0;
}
function Pze(e) {
  return e === "x" ? "bottom" : "left";
}
function Oze({ fieldOrDatumDef: e, scaleType: t, size: r, values: a }) {
  var v;
  if (!a && !Kc(t) && t !== "log") {
    if (gi(e)) {
      if (hl(e.bin))
        return { signal: `ceil(${r.signal}/10)` };
      if (e.timeUnit && ro(["month", "hours", "day", "quarter"], (v = Xc(e.timeUnit)) == null ? void 0 : v.unit))
        return;
    }
    return { signal: `ceil(${r.signal}/40)` };
  }
}
function zze({ format: e, fieldOrDatumDef: t }) {
  if (e === "d")
    return 1;
  if (gi(t)) {
    const { timeUnit: r } = t;
    if (r) {
      const a = One(r);
      if (a)
        return { signal: a };
    }
  }
}
function Cie(e, t) {
  const r = t === "x" ? "x2" : "y2", a = e.fieldDef(t), v = e.fieldDef(r), o = a ? a.title : void 0, s = v ? v.title : void 0;
  if (o && s)
    return vne(o, s);
  if (o)
    return o;
  if (s)
    return s;
  if (o !== void 0)
    return o;
  if (s !== void 0)
    return s;
}
function Rze(e, t) {
  const r = e.values;
  if (Qr(r))
    return pre(t, r);
  if (Ji(r))
    return r;
}
function Fze(e, t) {
  return e === "rect" && Mk(t) ? 1 : 0;
}
class lb extends Is {
  clone() {
    return new lb(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this._dependentFields = kie(this.transform.calculate);
  }
  static parseAllForSortIndex(t, r) {
    return r.forEachFieldDef((a, v) => {
      if (n2(a) && ire(a.sort)) {
        const { field: o, timeUnit: s } = a, n = a.sort, l = n.map((u, i) => `${Fne({ field: o, timeUnit: s, equal: u })} ? ${i} : `).join("") + n.length;
        t = new lb(t, {
          calculate: l,
          as: ub(a, v, { forAs: !0 })
        });
      }
    }), t;
  }
  producedFields() {
    return /* @__PURE__ */ new Set([this.transform.as]);
  }
  dependentFields() {
    return this._dependentFields;
  }
  assemble() {
    return {
      type: "formula",
      expr: this.transform.calculate,
      as: this.transform.as
    };
  }
  hash() {
    return `Calculate ${lo(this.transform)}`;
  }
}
function ub(e, t, r) {
  return Mi(e, { prefix: t, suffix: "sort_index", ...r });
}
function eA(e, t) {
  return ro(["top", "bottom"], t) ? "column" : ro(["left", "right"], t) || e === "row" ? "row" : "column";
}
function cb(e, t, r, a) {
  const v = a === "row" ? r.headerRow : a === "column" ? r.headerColumn : r.headerFacet;
  return Wu((t || {})[e], v[e], r.header[e]);
}
function tA(e, t, r, a) {
  const v = {};
  for (const o of e) {
    const s = cb(o, t || {}, r, a);
    s !== void 0 && (v[o] = s);
  }
  return v;
}
const SR = ["row", "column"], MR = ["header", "footer"];
function Nze(e, t) {
  const r = e.component.layoutHeaders[t].title, a = e.config ? e.config : void 0, v = e.component.layoutHeaders[t].facetFieldDef ? e.component.layoutHeaders[t].facetFieldDef : void 0, { titleAnchor: o, titleAngle: s, titleOrient: n } = tA(["titleAnchor", "titleAngle", "titleOrient"], v.header, a, t), l = eA(t, n), u = qw(s);
  return {
    name: `${t}-title`,
    type: "group",
    role: `${l}-title`,
    title: {
      text: r,
      ...t === "row" ? { orient: "left" } : {},
      style: "guide-title",
      ...Die(u, l),
      ...Iie(l, u, o),
      ...Lie(a, v, t, SPe, Pre)
    }
  };
}
function Iie(e, t, r = "middle") {
  switch (r) {
    case "start":
      return { align: "left" };
    case "end":
      return { align: "right" };
  }
  const a = Eie(t, e === "row" ? "left" : "top", e === "row" ? "y" : "x");
  return a ? { align: a } : {};
}
function Die(e, t) {
  const r = Mie(e, t === "row" ? "left" : "top", t === "row" ? "y" : "x", !0);
  return r ? { baseline: r } : {};
}
function Bze(e, t) {
  const r = e.component.layoutHeaders[t], a = [];
  for (const v of MR)
    if (r[v])
      for (const o of r[v]) {
        const s = Uze(e, t, v, r, o);
        s != null && a.push(s);
      }
  return a;
}
function jze(e, t) {
  const { sort: r } = e;
  return Nm(r) ? {
    field: Mi(r, { expr: "datum" }),
    order: r.order ?? "ascending"
  } : Qr(r) ? {
    field: ub(e, t, { expr: "datum" }),
    order: "ascending"
  } : {
    field: Mi(e, { expr: "datum" }),
    order: r ?? "ascending"
  };
}
function DI(e, t, r) {
  const { format: a, formatType: v, labelAngle: o, labelAnchor: s, labelOrient: n, labelExpr: l } = tA(["format", "formatType", "labelAngle", "labelAnchor", "labelOrient", "labelExpr"], e.header, r, t), u = nR({
    fieldOrDatumDef: e,
    format: a,
    formatType: v,
    expr: "parent",
    config: r
  }).signal, i = eA(t, n);
  return {
    text: {
      signal: l ? Dv(Dv(l, "datum.label", u), "datum.value", Mi(e, { expr: "parent" })) : u
    },
    ...t === "row" ? { orient: "left" } : {},
    style: "guide-label",
    frame: "group",
    ...Die(o, i),
    ...Iie(i, o, s),
    ...Lie(r, e, t, MPe, Ore)
  };
}
function Uze(e, t, r, a, v) {
  if (v) {
    let o = null;
    const { facetFieldDef: s } = a, n = e.config ? e.config : void 0;
    if (s && v.labels) {
      const { labelOrient: h } = tA(["labelOrient"], s.header, n, t);
      (t === "row" && !ro(["top", "bottom"], h) || t === "column" && !ro(["left", "right"], h)) && (o = DI(s, t, n));
    }
    const l = rd(e) && !q4(e.facet), u = v.axes, i = (u == null ? void 0 : u.length) > 0;
    if (o || i) {
      const h = t === "row" ? "height" : "width";
      return {
        name: e.getName(`${t}_${r}`),
        type: "group",
        role: `${t}-${r}`,
        ...a.facetFieldDef ? {
          from: { data: e.getName(`${t}_domain`) },
          sort: jze(s, t)
        } : {},
        ...i && l ? {
          from: { data: e.getName(`facet_domain_${t}`) }
        } : {},
        ...o ? { title: o } : {},
        ...v.sizeSignal ? {
          encode: {
            update: {
              [h]: v.sizeSignal
            }
          }
        } : {},
        ...i ? { axes: u } : {}
      };
    }
  }
  return null;
}
const Vze = {
  column: {
    start: 0,
    end: 1
  },
  row: {
    start: 1,
    end: 0
  }
};
function $ze(e, t) {
  return Vze[t][e];
}
function qze(e, t) {
  const r = {};
  for (const a of Sd) {
    const v = e[a];
    if (v != null && v.facetFieldDef) {
      const { titleAnchor: o, titleOrient: s } = tA(["titleAnchor", "titleOrient"], v.facetFieldDef.header, t, a), n = eA(a, s), l = $ze(o, n);
      l !== void 0 && (r[n] = l);
    }
  }
  return Rs(r) ? void 0 : r;
}
function Lie(e, t, r, a, v) {
  const o = {};
  for (const s of a) {
    if (!v[s])
      continue;
    const n = cb(s, t == null ? void 0 : t.header, e, r);
    n !== void 0 && (o[v[s]] = n);
  }
  return o;
}
function ER(e) {
  return [
    ...U6(e, "width"),
    ...U6(e, "height"),
    ...U6(e, "childWidth"),
    ...U6(e, "childHeight")
  ];
}
function U6(e, t) {
  const r = t === "width" ? "x" : "y", a = e.component.layoutSize.get(t);
  if (!a || a === "merged")
    return [];
  const v = e.getSizeSignalRef(t).signal;
  if (a === "step") {
    const o = e.getScaleComponent(r);
    if (o) {
      const s = o.get("type"), n = o.get("range");
      if (Kc(s) && Zg(n)) {
        const l = e.scaleName(r);
        return rd(e.parent) && e.parent.component.resolve.scale[r] === "independent" ? [B$(l, n)] : [
          B$(l, n),
          {
            name: v,
            update: Pie(l, o, `domain('${l}').length`)
          }
        ];
      }
    }
    throw new Error("layout size is step although width/height is not step.");
  } else if (a == "container") {
    const o = v.endsWith("width"), s = o ? "containerSize()[0]" : "containerSize()[1]", n = kI(e.config.view, o ? "width" : "height"), l = `isFinite(${s}) ? ${s} : ${n}`;
    return [{ name: v, init: l, on: [{ update: l, events: "window:resize" }] }];
  } else
    return [
      {
        name: v,
        value: a
      }
    ];
}
function B$(e, t) {
  const r = `${e}_step`;
  return Ji(t.step) ? { name: r, update: t.step.signal } : { name: r, value: t.step };
}
function Pie(e, t, r) {
  const a = t.get("type"), v = t.get("padding"), o = Wu(t.get("paddingOuter"), v);
  let s = t.get("paddingInner");
  return s = a === "band" ? (
    // only band has real paddingInner
    s !== void 0 ? s : v
  ) : (
    // For point, as calculated in https://github.com/vega/vega-scale/blob/master/src/band.js#L128,
    // it's equivalent to have paddingInner = 1 since there is only n-1 steps between n points.
    1
  ), `bandspace(${r}, ${up(s)}, ${up(o)}) * ${e}_step`;
}
function Oie(e) {
  return e === "childWidth" ? "width" : e === "childHeight" ? "height" : e;
}
function zie(e, t) {
  return ui(e).reduce((r, a) => ({
    ...r,
    ...Nb({
      model: t,
      channelDef: e[a],
      vgChannel: a,
      mainRefFn: (v) => Al(v.value),
      invalidValueRef: void 0
      // guide encoding won't show invalid values for the scale
    })
  }), {});
}
function Rie(e, t) {
  if (rd(t))
    return e === "theta" ? "independent" : "shared";
  if (Vb(t))
    return "shared";
  if (zR(t))
    return Yu(e) || e === "theta" || e === "radius" ? "independent" : "shared";
  throw new Error("invalid model type for resolve");
}
function CR(e, t) {
  const r = e.scale[t], a = Yu(t) ? "axis" : "legend";
  return r === "independent" ? (e[a][t] === "shared" && mi(_De(t)), "independent") : e[a][t] || "shared";
}
const Hze = {
  ...IPe,
  disable: 1,
  labelExpr: 1,
  selections: 1,
  // channel scales
  opacity: 1,
  shape: 1,
  stroke: 1,
  fill: 1,
  size: 1,
  strokeWidth: 1,
  strokeDash: 1,
  // encode
  encode: 1
}, Fie = ui(Hze);
class Gze extends i1 {
}
const j$ = {
  symbols: Wze,
  gradient: Yze,
  labels: Zze,
  entries: Xze
};
function Wze(e, { fieldOrDatumDef: t, model: r, channel: a, legendCmpt: v, legendType: o }) {
  if (o !== "symbol")
    return;
  const { markDef: s, encoding: n, config: l, mark: u } = r, i = s.filled && u !== "trail";
  let h = {
    ...LIe({}, r, ALe),
    ...uie(r, { filled: i })
  };
  const p = v.get("symbolOpacity") ?? l.legend.symbolOpacity, _ = v.get("symbolFillColor") ?? l.legend.symbolFillColor, d = v.get("symbolStrokeColor") ?? l.legend.symbolStrokeColor, f = p === void 0 ? Nie(n.opacity) ?? s.opacity : void 0;
  if (h.fill) {
    if (a === "fill" || i && a === Rh)
      delete h.fill;
    else if (h.fill.field)
      _ ? delete h.fill : (h.fill = Al(l.legend.symbolBaseFillColor ?? "black"), h.fillOpacity = Al(f ?? 1));
    else if (Qr(h.fill)) {
      const c = LI(n.fill ?? n.color) ?? s.fill ?? (i && s.color);
      c && (h.fill = Al(c));
    }
  }
  if (h.stroke) {
    if (a === "stroke" || !i && a === Rh)
      delete h.stroke;
    else if (h.stroke.field || d)
      delete h.stroke;
    else if (Qr(h.stroke)) {
      const c = Wu(LI(n.stroke || n.color), s.stroke, i ? s.color : void 0);
      c && (h.stroke = { value: c });
    }
  }
  if (a !== t1) {
    const c = gi(t) && jie(r, v, t);
    c ? h.opacity = [
      { test: c, ...Al(f ?? 1) },
      Al(l.legend.unselectedOpacity)
    ] : f && (h.opacity = Al(f));
  }
  return h = { ...h, ...e }, Rs(h) ? void 0 : h;
}
function Yze(e, { model: t, legendType: r, legendCmpt: a }) {
  if (r !== "gradient")
    return;
  const { config: v, markDef: o, encoding: s } = t;
  let n = {};
  const u = (a.get("gradientOpacity") ?? v.legend.gradientOpacity) === void 0 ? Nie(s.opacity) || o.opacity : void 0;
  return u && (n.opacity = Al(u)), n = { ...n, ...e }, Rs(n) ? void 0 : n;
}
function Zze(e, { fieldOrDatumDef: t, model: r, channel: a, legendCmpt: v }) {
  const o = r.legend(a) || {}, s = r.config, n = gi(t) ? jie(r, v, t) : void 0, l = n ? [{ test: n, value: 1 }, { value: s.legend.unselectedOpacity }] : void 0, { format: u, formatType: i } = o;
  let h;
  Rv(i) ? h = cp({
    fieldOrDatumDef: t,
    field: "datum.value",
    format: u,
    formatType: i,
    config: s
  }) : u === void 0 && i === void 0 && s.customFormatTypes && (t.type === "quantitative" && s.numberFormatType ? h = cp({
    fieldOrDatumDef: t,
    field: "datum.value",
    format: s.numberFormat,
    formatType: s.numberFormatType,
    config: s
  }) : t.type === "temporal" && s.timeFormatType && gi(t) && t.timeUnit === void 0 && (h = cp({
    fieldOrDatumDef: t,
    field: "datum.value",
    format: s.timeFormat,
    formatType: s.timeFormatType,
    config: s
  })));
  const p = {
    ...l ? { opacity: l } : {},
    ...h ? { text: h } : {},
    ...e
  };
  return Rs(p) ? void 0 : p;
}
function Xze(e, { legendCmpt: t }) {
  const r = t.get("selections");
  return r != null && r.length ? { ...e, fill: { value: "transparent" } } : e;
}
function Nie(e) {
  return Bie(e, (t, r) => Math.max(t, r.value));
}
function LI(e) {
  return Bie(e, (t, r) => Wu(t, r.value));
}
function Bie(e, t) {
  if (GLe(e))
    return Ri(e.condition).reduce(t, e.value);
  if (wp(e))
    return e.value;
}
function jie(e, t, r) {
  const a = t.get("selections");
  if (!(a != null && a.length))
    return;
  const v = vi(r.field);
  return a.map((o) => `(!length(data(${vi(Gl(o) + Nv)})) || (${o}[${v}] && indexof(${o}[${v}], datum.value) >= 0))`).join(" || ");
}
const U$ = {
  direction: ({ direction: e }) => e,
  format: ({ fieldOrDatumDef: e, legend: t, config: r }) => {
    const { format: a, formatType: v } = t;
    return tre(e, e.type, a, v, r, !1);
  },
  formatType: ({ legend: e, fieldOrDatumDef: t, scaleType: r }) => {
    const { formatType: a } = e;
    return nre(a, t, r);
  },
  gradientLength: (e) => {
    const { legend: t, legendConfig: r } = e;
    return t.gradientLength ?? r.gradientLength ?? rRe(e);
  },
  labelOverlap: ({ legend: e, legendConfig: t, scaleType: r }) => e.labelOverlap ?? t.labelOverlap ?? iRe(r),
  symbolType: ({ legend: e, markDef: t, channel: r, encoding: a }) => e.symbolType ?? Jze(t.type, r, a.shape, t.shape),
  title: ({ fieldOrDatumDef: e, config: t }) => kx(e, t, { allowDisabling: !0 }),
  type: ({ legendType: e, scaleType: t, channel: r }) => {
    if (wx(r) && p0(t)) {
      if (e === "gradient")
        return;
    } else if (e === "symbol")
      return;
    return e;
  },
  // depended by other property, let's define upfront
  values: ({ fieldOrDatumDef: e, legend: t }) => Kze(t, e)
};
function Kze(e, t) {
  const r = e.values;
  if (Qr(r))
    return pre(t, r);
  if (Ji(r))
    return r;
}
function Jze(e, t, r, a) {
  if (t !== "shape") {
    const v = LI(r) ?? a;
    if (v)
      return v;
  }
  switch (e) {
    case "bar":
    case "rect":
    case "image":
    case "square":
      return "square";
    case "line":
    case "trail":
    case "rule":
      return "stroke";
    case "arc":
    case "point":
    case "circle":
    case "tick":
    case "geoshape":
    case "area":
    case "text":
      return "circle";
  }
}
function Qze(e) {
  const { legend: t } = e;
  return Wu(t.type, eRe(e));
}
function eRe({ channel: e, timeUnit: t, scaleType: r }) {
  if (wx(e)) {
    if (ro(["quarter", "month", "day"], t))
      return "symbol";
    if (p0(r))
      return "gradient";
  }
  return "symbol";
}
function tRe({ legendConfig: e, legendType: t, orient: r, legend: a }) {
  return a.direction ?? e[t ? "gradientDirection" : "symbolDirection"] ?? nRe(r, t);
}
function nRe(e, t) {
  switch (e) {
    case "top":
    case "bottom":
      return "horizontal";
    case "left":
    case "right":
    case "none":
    case void 0:
      return;
    default:
      return t === "gradient" ? "horizontal" : void 0;
  }
}
function rRe({ legendConfig: e, model: t, direction: r, orient: a, scaleType: v }) {
  const { gradientHorizontalMaxLength: o, gradientHorizontalMinLength: s, gradientVerticalMaxLength: n, gradientVerticalMinLength: l } = e;
  if (p0(v))
    return r === "horizontal" ? a === "top" || a === "bottom" ? V$(t, "width", s, o) : s : V$(t, "height", l, n);
}
function V$(e, t, r, a) {
  return { signal: `clamp(${e.getSizeSignalRef(t).signal}, ${r}, ${a})` };
}
function iRe(e) {
  if (ro(["quantile", "threshold", "log", "symlog"], e))
    return "greedy";
}
function Uie(e) {
  const t = pu(e) ? aRe(e) : uRe(e);
  return e.component.legends = t, t;
}
function aRe(e) {
  const { encoding: t } = e, r = {};
  for (const a of [Rh, ...Rre]) {
    const v = wc(t[a]);
    !v || !e.getScaleComponent(a) || a === Fh && gi(v) && v.type === Fb || (r[a] = lRe(e, a));
  }
  return r;
}
function oRe(e, t) {
  const r = e.scaleName(t);
  if (e.mark === "trail") {
    if (t === "color")
      return { stroke: r };
    if (t === "size")
      return { strokeWidth: r };
  }
  return t === "color" ? e.markDef.filled ? { fill: r } : { stroke: r } : { [t]: r };
}
function sRe(e, t, r, a) {
  switch (t) {
    case "disable":
      return r !== void 0;
    case "values":
      return !!(r != null && r.values);
    case "title":
      if (t === "title" && e === (a == null ? void 0 : a.title))
        return !0;
  }
  return e === (r || {})[t];
}
function lRe(e, t) {
  var w;
  let r = e.legend(t);
  const { markDef: a, encoding: v, config: o } = e, s = o.legend, n = new Gze({}, oRe(e, t));
  yze(e, t, n);
  const l = r !== void 0 ? !r : s.disable;
  if (n.set("disable", l, r !== void 0), l)
    return n;
  r = r || {};
  const u = e.getScaleComponent(t).get("type"), i = wc(v[t]), h = gi(i) ? (w = Xc(i.timeUnit)) == null ? void 0 : w.unit : void 0, p = r.orient || o.legend.orient || "right", _ = Qze({ legend: r, channel: t, timeUnit: h, scaleType: u }), d = tRe({ legend: r, legendType: _, orient: p, legendConfig: s }), f = {
    legend: r,
    channel: t,
    model: e,
    markDef: a,
    encoding: v,
    fieldOrDatumDef: i,
    legendConfig: s,
    config: o,
    scaleType: u,
    orient: p,
    legendType: _,
    direction: d
  };
  for (const k of Fie) {
    if (_ === "gradient" && k.startsWith("symbol") || _ === "symbol" && k.startsWith("gradient"))
      continue;
    const S = k in U$ ? U$[k](f) : r[k];
    if (S !== void 0) {
      const A = sRe(S, k, r, e.fieldDef(t));
      (A || o.legend[k] === void 0) && n.set(k, S, A);
    }
  }
  const c = (r == null ? void 0 : r.encoding) ?? {}, g = n.get("selections"), m = {}, x = { fieldOrDatumDef: i, model: e, channel: t, legendCmpt: n, legendType: _ };
  for (const k of ["labels", "legend", "title", "symbols", "gradient", "entries"]) {
    const S = zie(c[k] ?? {}, e), A = k in j$ ? j$[k](S, x) : S;
    A !== void 0 && !Rs(A) && (m[k] = {
      ...g != null && g.length && gi(i) ? { name: `${Gl(i.field)}_legend_${k}` } : {},
      ...g != null && g.length ? { interactive: !!g } : {},
      update: A
    });
  }
  return Rs(m) || n.set("encode", m, !!(r != null && r.encoding)), n;
}
function uRe(e) {
  const { legends: t, resolve: r } = e.component;
  for (const a of e.children) {
    Uie(a);
    for (const v of ui(a.component.legends))
      r.legend[v] = CR(e.component.resolve, v), r.legend[v] === "shared" && (t[v] = Vie(t[v], a.component.legends[v]), t[v] || (r.legend[v] = "independent", delete t[v]));
  }
  for (const a of ui(t))
    for (const v of e.children)
      v.component.legends[a] && r.legend[a] === "shared" && delete v.component.legends[a];
  return t;
}
function Vie(e, t) {
  var o, s, n, l;
  if (!e)
    return t.clone();
  const r = e.getWithExplicit("orient"), a = t.getWithExplicit("orient");
  if (r.explicit && a.explicit && r.value !== a.value)
    return;
  let v = !1;
  for (const u of Fie) {
    const i = Dg(
      e.getWithExplicit(u),
      t.getWithExplicit(u),
      u,
      "legend",
      // Tie breaker function
      (h, p) => {
        switch (u) {
          case "symbolType":
            return cRe(h, p);
          case "title":
            return xne(h, p);
          case "type":
            return v = !0, Gh("symbol");
        }
        return ZT(h, p, u, "legend");
      }
    );
    e.setWithExplicit(u, i);
  }
  return v && ((s = (o = e.implicit) == null ? void 0 : o.encode) != null && s.gradient && _k(e.implicit, ["encode", "gradient"]), (l = (n = e.explicit) == null ? void 0 : n.encode) != null && l.gradient && _k(e.explicit, ["encode", "gradient"])), e;
}
function cRe(e, t) {
  return t.value === "circle" ? t : e;
}
function fRe(e, t, r, a) {
  var v, o;
  e.encode ?? (e.encode = {}), (v = e.encode)[t] ?? (v[t] = {}), (o = e.encode[t]).update ?? (o.update = {}), e.encode[t].update[r] = a;
}
function $ie(e) {
  const t = e.component.legends, r = {};
  for (const v of ui(t)) {
    const o = e.getScaleComponent(v), s = Fs(o.get("domains"));
    if (r[s])
      for (const n of r[s])
        Vie(n, t[v]) || r[s].push(t[v]);
    else
      r[s] = [t[v].clone()];
  }
  return ff(r).flat().map((v) => hRe(v, e.config)).filter((v) => v !== void 0);
}
function hRe(e, t) {
  var s, n, l;
  const { disable: r, labelExpr: a, selections: v, ...o } = e.combine();
  if (!r) {
    if (t.aria === !1 && o.aria == null && (o.aria = !1), (s = o.encode) != null && s.symbols) {
      const u = o.encode.symbols.update;
      u.fill && u.fill.value !== "transparent" && !u.stroke && !o.stroke && (u.stroke = { value: "transparent" });
      for (const i of Rre)
        o[i] && delete u[i];
    }
    if (o.title || delete o.title, a !== void 0) {
      let u = a;
      (l = (n = o.encode) == null ? void 0 : n.labels) != null && l.update && Ji(o.encode.labels.update.text) && (u = Dv(a, "datum.label", o.encode.labels.update.text.signal)), fRe(o, "labels", "text", { signal: u });
    }
    return o;
  }
}
function dRe(e) {
  return Vb(e) || zR(e) ? pRe(e) : qie(e);
}
function pRe(e) {
  return e.children.reduce((t, r) => t.concat(r.assembleProjections()), qie(e));
}
function qie(e) {
  const t = e.component.projection;
  if (!t || t.merged)
    return [];
  const r = t.combine(), { name: a } = r;
  if (t.data) {
    const v = {
      signal: `[${t.size.map((s) => s.signal).join(", ")}]`
    }, o = t.data.reduce((s, n) => {
      const l = Ji(n) ? n.signal : `data('${e.lookupDataSource(n)}')`;
      return ro(s, l) || s.push(l), s;
    }, []);
    if (o.length <= 0)
      throw new Error("Projection's fit didn't find any data sources");
    return [
      {
        name: a,
        size: v,
        fit: {
          signal: o.length > 1 ? `[${o.join(", ")}]` : o[0]
        },
        ...r
      }
    ];
  } else
    return [
      {
        name: a,
        // translate to center by default
        translate: { signal: "[width / 2, height / 2]" },
        // parameters, overwrite default translate if specified
        ...r
      }
    ];
}
const mRe = [
  "type",
  "clipAngle",
  "clipExtent",
  "center",
  "rotate",
  "precision",
  "reflectX",
  "reflectY",
  "coefficient",
  "distance",
  "fraction",
  "lobes",
  "parallel",
  "radius",
  "ratio",
  "spacing",
  "tilt"
];
class Hie extends i1 {
  constructor(t, r, a, v) {
    super(
      { ...r },
      // all explicit properties of projection
      { name: t }
      // name as initial implicit property
    ), this.specifiedProjection = r, this.size = a, this.data = v, this.merged = !1;
  }
  /**
   * Whether the projection parameters should fit provided data.
   */
  get isFit() {
    return !!this.data;
  }
}
function Gie(e) {
  e.component.projection = pu(e) ? gRe(e) : xRe(e);
}
function gRe(e) {
  if (e.hasProjection) {
    const t = If(e.specifiedProjection), r = !(t && (t.scale != null || t.translate != null)), a = r ? [e.getSizeSignalRef("width"), e.getSizeSignalRef("height")] : void 0, v = r ? yRe(e) : void 0, o = new Hie(e.projectionName(!0), {
      ...If(e.config.projection),
      ...t
    }, a, v);
    return o.get("type") || o.set("type", "equalEarth", !1), o;
  }
}
function yRe(e) {
  const t = [], { encoding: r } = e;
  for (const a of [
    [Pp, Lp],
    [Fd, Op]
  ])
    (wc(r[a[0]]) || wc(r[a[1]])) && t.push({
      signal: e.getName(`geojson_${t.length}`)
    });
  return e.channelHasField(Fh) && e.typedFieldDef(Fh).type === Fb && t.push({
    signal: e.getName(`geojson_${t.length}`)
  }), t.length === 0 && t.push(e.requestDataName(Du.Main)), t;
}
function vRe(e, t) {
  const r = kz(mRe, (v) => !!(!ua(e.explicit, v) && !ua(t.explicit, v) || ua(e.explicit, v) && ua(t.explicit, v) && // some properties might be signals or objects and require hashing for comparison
  Qh(e.get(v), t.get(v))));
  if (Qh(e.size, t.size)) {
    if (r)
      return e;
    if (Qh(e.explicit, {}))
      return t;
    if (Qh(t.explicit, {}))
      return e;
  }
  return null;
}
function xRe(e) {
  if (e.children.length === 0)
    return;
  let t;
  for (const a of e.children)
    Gie(a);
  const r = kz(e.children, (a) => {
    const v = a.component.projection;
    if (v)
      if (t) {
        const o = vRe(t, v);
        return o && (t = o), !!o;
      } else
        return t = v, !0;
    else return !0;
  });
  if (t && r) {
    const a = e.projectionName(!0), v = new Hie(a, t.specifiedProjection, t.size, ka(t.data));
    for (const o of e.children) {
      const s = o.component.projection;
      s && (s.isFit && v.data.push(...o.component.projection.data), o.renameProjection(s.get("name"), a), s.merged = !0);
    }
    return v;
  }
}
function bRe(e, t, r, a) {
  if (G4(t, r)) {
    const v = pu(e) ? e.axis(r) ?? e.legend(r) ?? {} : {}, o = Mi(t, { expr: "datum" }), s = Mi(t, { expr: "datum", binSuffix: "end" });
    return {
      formulaAs: Mi(t, { binSuffix: "range", forAs: !0 }),
      formula: $4(o, s, v.format, v.formatType, a)
    };
  }
  return {};
}
function Wie(e, t) {
  return `${fne(e)}_${t}`;
}
function _Re(e, t) {
  return {
    signal: e.getName(`${t}_bins`),
    extentSignal: e.getName(`${t}_extent`)
  };
}
function IR(e, t, r) {
  const a = $T(r, void 0) ?? {}, v = Wie(a, t);
  return e.getName(`${v}_bins`);
}
function wRe(e) {
  return "as" in e;
}
function $$(e, t, r) {
  let a, v;
  wRe(e) ? a = Fi(e.as) ? [e.as, `${e.as}_end`] : [e.as[0], e.as[1]] : a = [Mi(e, { forAs: !0 }), Mi(e, { binSuffix: "end", forAs: !0 })];
  const o = { ...$T(t, void 0) }, s = Wie(o, e.field), { signal: n, extentSignal: l } = _Re(r, s);
  if (DT(o.extent)) {
    const i = o.extent;
    v = Aie(r, i.param, i), delete o.extent;
  }
  const u = {
    bin: o,
    field: e.field,
    as: [a],
    ...n ? { signal: n } : {},
    ...l ? { extentSignal: l } : {},
    ...v ? { span: v } : {}
  };
  return { key: s, binComponent: u };
}
class w0 extends Is {
  clone() {
    return new w0(null, ka(this.bins));
  }
  constructor(t, r) {
    super(t), this.bins = r;
  }
  static makeFromEncoding(t, r) {
    const a = r.reduceFieldDef((v, o, s) => {
      if (hh(o) && hl(o.bin)) {
        const { key: n, binComponent: l } = $$(o, o.bin, r);
        v[n] = {
          ...l,
          ...v[n],
          ...bRe(r, o, s, r.config)
        };
      }
      return v;
    }, {});
    return Rs(a) ? null : new w0(t, a);
  }
  /**
   * Creates a bin node from BinTransform.
   * The optional parameter should provide
   */
  static makeFromTransform(t, r, a) {
    const { key: v, binComponent: o } = $$(r, r.bin, a);
    return new w0(t, {
      [v]: o
    });
  }
  /**
   * Merge bin nodes. This method either integrates the bin config from the other node
   * or if this node already has a bin config, renames the corresponding signal in the model.
   */
  merge(t, r) {
    for (const a of ui(t.bins))
      a in this.bins ? (r(t.bins[a].signal, this.bins[a].signal), this.bins[a].as = d0([...this.bins[a].as, ...t.bins[a].as], lo)) : this.bins[a] = t.bins[a];
    for (const a of t.children)
      t.removeChild(a), a.parent = this;
    t.remove();
  }
  producedFields() {
    return new Set(ff(this.bins).map((t) => t.as).flat(2));
  }
  dependentFields() {
    return new Set(ff(this.bins).map((t) => t.field));
  }
  hash() {
    return `Bin ${lo(this.bins)}`;
  }
  assemble() {
    return ff(this.bins).flatMap((t) => {
      const r = [], [a, ...v] = t.as, { extent: o, ...s } = t.bin, n = {
        type: "bin",
        field: Rd(t.field),
        as: a,
        signal: t.signal,
        ...DT(o) ? { extent: null } : { extent: o },
        ...t.span ? { span: { signal: `span(${t.span})` } } : {},
        ...s
      };
      !o && t.extentSignal && (r.push({
        type: "extent",
        field: Rd(t.field),
        signal: t.extentSignal
      }), n.extent = { signal: t.extentSignal }), r.push(n);
      for (const l of v)
        for (let u = 0; u < 2; u++)
          r.push({
            type: "formula",
            expr: Mi({ field: a[u] }, { expr: "datum" }),
            as: l[u]
          });
      return t.formula && r.push({
        type: "formula",
        expr: t.formula,
        as: t.formulaAs
      }), r;
    });
  }
}
function kRe(e, t, r, a) {
  var o;
  const v = pu(a) ? a.encoding[Z0(t)] : void 0;
  if (hh(r) && pu(a) && ore(r, v, a.markDef, a.config)) {
    e.add(Mi(r, {})), e.add(Mi(r, { suffix: "end" }));
    const { mark: s, markDef: n, config: l } = a, u = Ig({ fieldDef: r, markDef: n, config: l });
    Hw(s) && u !== 0.5 && Yu(t) && (e.add(Mi(r, { suffix: XT })), e.add(Mi(r, { suffix: KT }))), r.bin && G4(r, t) && e.add(Mi(r, { binSuffix: "range" }));
  } else if (nne(t)) {
    const s = tne(t);
    e.add(a.getName(s));
  } else
    e.add(Mi(r));
  return n2(r) && hLe((o = r.scale) == null ? void 0 : o.range) && e.add(r.scale.range.field), e;
}
function TRe(e, t) {
  for (const r of ui(t)) {
    const a = t[r];
    for (const v of ui(a))
      r in e ? e[r][v] = /* @__PURE__ */ new Set([...e[r][v] ?? [], ...a[v]]) : e[r] = { [v]: a[v] };
  }
}
class pp extends Is {
  clone() {
    return new pp(null, new Set(this.dimensions), ka(this.measures));
  }
  /**
   * @param dimensions string set for dimensions
   * @param measures dictionary mapping field name => dict of aggregation functions and names to use
   */
  constructor(t, r, a) {
    super(t), this.dimensions = r, this.measures = a;
  }
  get groupBy() {
    return this.dimensions;
  }
  static makeFromEncoding(t, r) {
    let a = !1;
    r.forEachFieldDef((s) => {
      s.aggregate && (a = !0);
    });
    const v = {}, o = /* @__PURE__ */ new Set();
    return !a || (r.forEachFieldDef((s, n) => {
      const { aggregate: l, field: u } = s;
      if (l)
        if (l === "count")
          v["*"] ?? (v["*"] = {}), v["*"].count = /* @__PURE__ */ new Set([Mi(s, { forAs: !0 })]);
        else {
          if (Hm(l) || Yg(l)) {
            const i = Hm(l) ? "argmin" : "argmax", h = l[i];
            v[h] ?? (v[h] = {}), v[h][i] = /* @__PURE__ */ new Set([Mi({ op: i, field: h }, { forAs: !0 })]);
          } else
            v[u] ?? (v[u] = {}), v[u][l] = /* @__PURE__ */ new Set([Mi(s, { forAs: !0 })]);
          X0(n) && r.scaleDomain(n) === "unaggregated" && (v[u] ?? (v[u] = {}), v[u].min = /* @__PURE__ */ new Set([Mi({ field: u, aggregate: "min" }, { forAs: !0 })]), v[u].max = /* @__PURE__ */ new Set([Mi({ field: u, aggregate: "max" }, { forAs: !0 })]));
        }
      else
        kRe(o, n, s, r);
    }), o.size + ui(v).length === 0) ? null : new pp(t, o, v);
  }
  static makeFromTransform(t, r) {
    const a = /* @__PURE__ */ new Set(), v = {};
    for (const o of r.aggregate) {
      const { op: s, field: n, as: l } = o;
      s && (s === "count" ? (v["*"] ?? (v["*"] = {}), v["*"].count = /* @__PURE__ */ new Set([l || Mi(o, { forAs: !0 })])) : (v[n] ?? (v[n] = {}), v[n][s] = /* @__PURE__ */ new Set([l || Mi(o, { forAs: !0 })])));
    }
    for (const o of r.groupby ?? [])
      a.add(o);
    return a.size + ui(v).length === 0 ? null : new pp(t, a, v);
  }
  merge(t) {
    return Wte(this.dimensions, t.dimensions) ? (TRe(this.measures, t.measures), !0) : (FDe("different dimensions, cannot merge"), !1);
  }
  addDimensions(t) {
    t.forEach(this.dimensions.add, this.dimensions);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([...this.dimensions, ...ui(this.measures)]);
  }
  producedFields() {
    const t = /* @__PURE__ */ new Set();
    for (const r of ui(this.measures))
      for (const a of ui(this.measures[r])) {
        const v = this.measures[r][a];
        v.size === 0 ? t.add(`${a}_${r}`) : v.forEach(t.add, t);
      }
    return t;
  }
  hash() {
    return `Aggregate ${lo({ dimensions: this.dimensions, measures: this.measures })}`;
  }
  assemble() {
    const t = [], r = [], a = [];
    for (const o of ui(this.measures))
      for (const s of ui(this.measures[o]))
        for (const n of this.measures[o][s])
          a.push(n), t.push(s), r.push(o === "*" ? null : Rd(o));
    return {
      type: "aggregate",
      groupby: [...this.dimensions].map(Rd),
      ops: t,
      fields: r,
      as: a
    };
  }
}
class jb extends Is {
  /**
   * @param model The facet model.
   * @param name The name that this facet source will have.
   * @param data The source data for this facet data.
   */
  constructor(t, r, a, v) {
    super(t), this.model = r, this.name = a, this.data = v;
    for (const o of Sd) {
      const s = r.facet[o];
      if (s) {
        const { bin: n, sort: l } = s;
        this[o] = {
          name: r.getName(`${o}_domain`),
          fields: [Mi(s), ...hl(n) ? [Mi(s, { binSuffix: "end" })] : []],
          ...Nm(l) ? { sortField: l } : Qr(l) ? { sortIndexField: ub(s, o) } : {}
        };
      }
    }
    this.childModel = r.child;
  }
  hash() {
    let t = "Facet";
    for (const r of Sd)
      this[r] && (t += ` ${r.charAt(0)}:${lo(this[r])}`);
    return t;
  }
  get fields() {
    var r;
    const t = [];
    for (const a of Sd)
      (r = this[a]) != null && r.fields && t.push(...this[a].fields);
    return t;
  }
  dependentFields() {
    const t = new Set(this.fields);
    for (const r of Sd)
      this[r] && (this[r].sortField && t.add(this[r].sortField.field), this[r].sortIndexField && t.add(this[r].sortIndexField));
    return t;
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  /**
   * The name to reference this source is its name.
   */
  getSource() {
    return this.name;
  }
  getChildIndependentFieldsWithStep() {
    const t = {};
    for (const r of n1) {
      const a = this.childModel.component.scales[r];
      if (a && !a.merged) {
        const v = a.get("type"), o = a.get("range");
        if (Kc(v) && Zg(o)) {
          const s = nA(this.childModel, r), n = OR(s);
          n ? t[r] = n : mi(Fz(r));
        }
      }
    }
    return t;
  }
  assembleRowColumnHeaderData(t, r, a) {
    const v = { row: "y", column: "x", facet: void 0 }[t], o = [], s = [], n = [];
    v && a && a[v] && (r ? (o.push(`distinct_${a[v]}`), s.push("max")) : (o.push(a[v]), s.push("distinct")), n.push(`distinct_${a[v]}`));
    const { sortField: l, sortIndexField: u } = this[t];
    if (l) {
      const { op: i = BT, field: h } = l;
      o.push(h), s.push(i), n.push(Mi(l, { forAs: !0 }));
    } else u && (o.push(u), s.push("max"), n.push(u));
    return {
      name: this[t].name,
      // Use data from the crossed one if it exist
      source: r ?? this.data,
      transform: [
        {
          type: "aggregate",
          groupby: this[t].fields,
          ...o.length ? {
            fields: o,
            ops: s,
            as: n
          } : {}
        }
      ]
    };
  }
  assembleFacetHeaderData(t) {
    var l;
    const { columns: r } = this.model.layout, { layoutHeaders: a } = this.model.component, v = [], o = {};
    for (const u of SR) {
      for (const i of MR) {
        const h = (a[u] && a[u][i]) ?? [];
        for (const p of h)
          if (((l = p.axes) == null ? void 0 : l.length) > 0) {
            o[u] = !0;
            break;
          }
      }
      if (o[u]) {
        const i = `length(data("${this.facet.name}"))`, h = u === "row" ? r ? { signal: `ceil(${i} / ${r})` } : 1 : r ? { signal: `min(${i}, ${r})` } : { signal: i };
        v.push({
          name: `${this.facet.name}_${u}`,
          transform: [
            {
              type: "sequence",
              start: 0,
              stop: h
            }
          ]
        });
      }
    }
    const { row: s, column: n } = o;
    return (s || n) && v.unshift(this.assembleRowColumnHeaderData("facet", null, t)), v;
  }
  assemble() {
    const t = [];
    let r = null;
    const a = this.getChildIndependentFieldsWithStep(), { column: v, row: o, facet: s } = this;
    if (v && o && (a.x || a.y)) {
      r = `cross_${this.column.name}_${this.row.name}`;
      const n = [].concat(a.x ?? [], a.y ?? []), l = n.map(() => "distinct");
      t.push({
        name: r,
        source: this.data,
        transform: [
          {
            type: "aggregate",
            groupby: this.fields,
            fields: n,
            ops: l
          }
        ]
      });
    }
    for (const n of [Fm, Rm])
      this[n] && t.push(this.assembleRowColumnHeaderData(n, r, a));
    if (s) {
      const n = this.assembleFacetHeaderData(a);
      n && t.push(...n);
    }
    return t;
  }
}
function q$(e) {
  return e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e;
}
function ARe(e, t) {
  const r = Sz(e);
  if (t === "number")
    return `toNumber(${r})`;
  if (t === "boolean")
    return `toBoolean(${r})`;
  if (t === "string")
    return `toString(${r})`;
  if (t === "date")
    return `toDate(${r})`;
  if (t === "flatten")
    return r;
  if (t.startsWith("date:")) {
    const a = q$(t.slice(5, t.length));
    return `timeParse(${r},'${a}')`;
  } else if (t.startsWith("utc:")) {
    const a = q$(t.slice(4, t.length));
    return `utcParse(${r},'${a}')`;
  } else
    return mi(GIe(t)), null;
}
function SRe(e) {
  const t = {};
  return R8(e.filter, (r) => {
    if (Rne(r)) {
      let a = null;
      Uz(r) ? a = Zh(r.equal) : $z(r) ? a = Zh(r.lte) : Vz(r) ? a = Zh(r.lt) : qz(r) ? a = Zh(r.gt) : Hz(r) ? a = Zh(r.gte) : Gz(r) ? a = r.range[0] : Wz(r) && (a = (r.oneOf ?? r.in)[0]), a && (e2(a) ? t[r.field] = "date" : Ro(a) ? t[r.field] = "number" : Fi(a) && (t[r.field] = "string")), r.timeUnit && (t[r.field] = "date");
    }
  }), t;
}
function MRe(e) {
  const t = {};
  function r(a) {
    ab(a) ? t[a.field] = "date" : a.type === "quantitative" && kIe(a.aggregate) ? t[a.field] = "number" : Jx(a.field) > 1 ? a.field in t || (t[a.field] = "flatten") : n2(a) && Nm(a.sort) && Jx(a.sort.field) > 1 && (a.sort.field in t || (t[a.sort.field] = "flatten"));
  }
  if ((pu(e) || rd(e)) && e.forEachFieldDef((a, v) => {
    if (hh(a))
      r(a);
    else {
      const o = Jv(v), s = e.fieldDef(o);
      r({
        ...a,
        type: s.type
      });
    }
  }), pu(e)) {
    const { mark: a, markDef: v, encoding: o } = e;
    if (Xg(a) && // No need to sort by dimension if we have a connected scatterplot (order channel is present)
    !e.encoding.order) {
      const s = v.orient === "horizontal" ? "y" : "x", n = o[s];
      gi(n) && n.type === "quantitative" && !(n.field in t) && (t[n.field] = "number");
    }
  }
  return t;
}
function ERe(e) {
  const t = {};
  if (pu(e) && e.component.selection)
    for (const r of ui(e.component.selection)) {
      const a = e.component.selection[r];
      for (const v of a.project.items)
        !v.channel && Jx(v.field) > 1 && (t[v.field] = "flatten");
    }
  return t;
}
class Rf extends Is {
  clone() {
    return new Rf(null, ka(this._parse));
  }
  constructor(t, r) {
    super(t), this._parse = r;
  }
  hash() {
    return `Parse ${lo(this._parse)}`;
  }
  /**
   * Creates a parse node from a data.format.parse and updates ancestorParse.
   */
  static makeExplicit(t, r, a) {
    var s;
    let v = {};
    const o = r.data;
    return !hg(o) && ((s = o == null ? void 0 : o.format) != null && s.parse) && (v = o.format.parse), this.makeWithAncestors(t, v, {}, a);
  }
  /**
   * Creates a parse node from "explicit" parse and "implicit" parse and updates ancestorParse.
   */
  static makeWithAncestors(t, r, a, v) {
    for (const n of ui(a)) {
      const l = v.getWithExplicit(n);
      l.value !== void 0 && (l.explicit || l.value === a[n] || l.value === "derived" || a[n] === "flatten" ? delete a[n] : mi(QV(n, a[n], l.value)));
    }
    for (const n of ui(r)) {
      const l = v.get(n);
      l !== void 0 && (l === r[n] ? delete r[n] : mi(QV(n, r[n], l)));
    }
    const o = new i1(r, a);
    v.copyAll(o);
    const s = {};
    for (const n of ui(o.combine())) {
      const l = o.get(n);
      l !== null && (s[n] = l);
    }
    return ui(s).length === 0 || v.parseNothing ? null : new Rf(t, s);
  }
  get parse() {
    return this._parse;
  }
  merge(t) {
    this._parse = { ...this._parse, ...t.parse }, t.remove();
  }
  /**
   * Assemble an object for Vega's format.parse property.
   */
  assembleFormatParse() {
    const t = {};
    for (const r of ui(this._parse)) {
      const a = this._parse[r];
      Jx(r) === 1 && (t[r] = a);
    }
    return t;
  }
  // format parse depends and produces all fields in its parse
  producedFields() {
    return new Set(ui(this._parse));
  }
  dependentFields() {
    return new Set(ui(this._parse));
  }
  assembleTransforms(t = !1) {
    return ui(this._parse).filter((r) => t ? Jx(r) > 1 : !0).map((r) => {
      const a = ARe(r, this._parse[r]);
      return a ? {
        type: "formula",
        expr: a,
        as: zb(r)
        // Vega output is always flattened
      } : null;
    }).filter((r) => r !== null);
  }
}
class Og extends Is {
  clone() {
    return new Og(null);
  }
  constructor(t) {
    super(t);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set([Tp]);
  }
  hash() {
    return "Identifier";
  }
  assemble() {
    return { type: "identifier", as: Tp };
  }
}
class Z4 extends Is {
  clone() {
    return new Z4(null, this.params);
  }
  constructor(t, r) {
    super(t), this.params = r;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
  }
  hash() {
    return `Graticule ${lo(this.params)}`;
  }
  assemble() {
    return {
      type: "graticule",
      ...this.params === !0 ? {} : this.params
    };
  }
}
class X4 extends Is {
  clone() {
    return new X4(null, this.params);
  }
  constructor(t, r) {
    super(t), this.params = r;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set([this.params.as ?? "data"]);
  }
  hash() {
    return `Hash ${lo(this.params)}`;
  }
  assemble() {
    return {
      type: "sequence",
      ...this.params
    };
  }
}
class Bv extends Is {
  constructor(t) {
    super(null), t ?? (t = { name: "source" });
    let r;
    if (hg(t) || (r = t.format ? { ...Ih(t.format, ["parse"]) } : {}), Gw(t))
      this._data = { values: t.values };
    else if (ob(t)) {
      if (this._data = { url: t.url }, !r.type) {
        let a = /(?:\.([^.]+))?$/.exec(t.url)[1];
        ro(["json", "csv", "tsv", "dsv", "topojson"], a) || (a = "json"), r.type = a;
      }
    } else eie(t) ? this._data = { values: [{ type: "Sphere" }] } : (Jre(t) || hg(t)) && (this._data = {});
    this._generator = hg(t), t.name && (this._name = t.name), r && !Rs(r) && (this._data.format = r);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
  }
  get data() {
    return this._data;
  }
  hasName() {
    return !!this._name;
  }
  get isGenerator() {
    return this._generator;
  }
  get dataName() {
    return this._name;
  }
  set dataName(t) {
    this._name = t;
  }
  set parent(t) {
    throw new Error("Source nodes have to be roots.");
  }
  remove() {
    throw new Error("Source nodes are roots and cannot be removed.");
  }
  hash() {
    throw new Error("Cannot hash sources");
  }
  assemble() {
    return {
      name: this._name,
      ...this._data,
      transform: []
    };
  }
}
var H$ = function(e, t, r, a, v) {
  if (a === "m") throw new TypeError("Private method is not writable");
  if (a === "a" && !v) throw new TypeError("Private accessor was defined without a setter");
  if (typeof t == "function" ? e !== t || !v : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
  return a === "a" ? v.call(e, r) : v ? v.value = r : t.set(e, r), r;
}, CRe = function(e, t, r, a) {
  if (r === "a" && !a) throw new TypeError("Private accessor was defined without a getter");
  if (typeof t == "function" ? e !== t || !a : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return r === "m" ? a : r === "a" ? a.call(e) : a ? a.value : t.get(e);
}, R3;
function DR(e) {
  return e instanceof Bv || e instanceof Z4 || e instanceof X4;
}
class LR {
  constructor() {
    R3.set(this, void 0), H$(this, R3, !1, "f");
  }
  // Once true, #modified is never set to false
  setModified() {
    H$(this, R3, !0, "f");
  }
  get modifiedFlag() {
    return CRe(this, R3, "f");
  }
}
R3 = /* @__PURE__ */ new WeakMap();
class r2 extends LR {
  /**
   * Compute a map of node depths that we can use to determine a topological sort order.
   */
  getNodeDepths(t, r, a) {
    a.set(t, r);
    for (const v of t.children)
      this.getNodeDepths(v, r + 1, a);
    return a;
  }
  /**
   * Run the optimizer on all nodes starting from the leaves.
   */
  optimize(t) {
    const a = [...this.getNodeDepths(t, 0, /* @__PURE__ */ new Map()).entries()].sort((v, o) => o[1] - v[1]);
    for (const v of a)
      this.run(v[0]);
    return this.modifiedFlag;
  }
}
class PR extends LR {
  /**
   * Run the optimizer depth first on all nodes starting from the roots.
   */
  optimize(t) {
    this.run(t);
    for (const r of t.children)
      this.optimize(r);
    return this.modifiedFlag;
  }
}
class IRe extends PR {
  mergeNodes(t, r) {
    const a = r.shift();
    for (const v of r)
      t.removeChild(v), v.parent = a, v.remove();
  }
  run(t) {
    const r = t.children.map((v) => v.hash()), a = {};
    for (let v = 0; v < r.length; v++)
      a[r[v]] === void 0 ? a[r[v]] = [t.children[v]] : a[r[v]].push(t.children[v]);
    for (const v of ui(a))
      a[v].length > 1 && (this.setModified(), this.mergeNodes(t, a[v]));
  }
}
class DRe extends PR {
  constructor(t) {
    super(), this.requiresSelectionId = t && AR(t);
  }
  run(t) {
    t instanceof Og && (this.requiresSelectionId && (DR(t.parent) || t.parent instanceof pp || t.parent instanceof Rf) || (this.setModified(), t.remove()));
  }
}
class LRe extends LR {
  optimize(t) {
    return this.run(t, /* @__PURE__ */ new Set()), this.modifiedFlag;
  }
  run(t, r) {
    let a = /* @__PURE__ */ new Set();
    t instanceof _0 && (a = t.producedFields(), Tz(a, r) && (this.setModified(), t.removeFormulas(r), t.producedFields.length === 0 && t.remove()));
    for (const v of t.children)
      this.run(v, /* @__PURE__ */ new Set([...r, ...a]));
  }
}
class PRe extends PR {
  constructor() {
    super();
  }
  run(t) {
    t instanceof Dh && !t.isRequired() && (this.setModified(), t.remove());
  }
}
class ORe extends r2 {
  run(t) {
    if (!DR(t) && !(t.numChildren() > 1)) {
      for (const r of t.children)
        if (r instanceof Rf)
          if (t instanceof Rf)
            this.setModified(), t.merge(r);
          else {
            if (Az(t.producedFields(), r.dependentFields()))
              continue;
            this.setModified(), r.swapWithParent();
          }
    }
  }
}
class zRe extends r2 {
  run(t) {
    const r = [...t.children], a = t.children.filter((v) => v instanceof Rf);
    if (t.numChildren() > 1 && a.length >= 1) {
      const v = {}, o = /* @__PURE__ */ new Set();
      for (const s of a) {
        const n = s.parse;
        for (const l of ui(n))
          l in v ? v[l] !== n[l] && o.add(l) : v[l] = n[l];
      }
      for (const s of o)
        delete v[s];
      if (!Rs(v)) {
        this.setModified();
        const s = new Rf(t, v);
        for (const n of r) {
          if (n instanceof Rf)
            for (const l of ui(v))
              delete n.parse[l];
          t.removeChild(n), n.parent = s, n instanceof Rf && ui(n.parse).length === 0 && n.remove();
        }
      }
    }
  }
}
class RRe extends r2 {
  run(t) {
    t instanceof Dh || t.numChildren() > 0 || t instanceof jb || t instanceof Bv || (this.setModified(), t.remove());
  }
}
class FRe extends r2 {
  run(t) {
    const r = t.children.filter((v) => v instanceof _0), a = r.pop();
    for (const v of r)
      this.setModified(), a.merge(v);
  }
}
class NRe extends r2 {
  run(t) {
    const r = t.children.filter((v) => v instanceof pp), a = {};
    for (const v of r) {
      const o = lo(v.groupBy);
      o in a || (a[o] = []), a[o].push(v);
    }
    for (const v of ui(a)) {
      const o = a[v];
      if (o.length > 1) {
        const s = o.pop();
        for (const n of o)
          s.merge(n) && (t.removeChild(n), n.parent = s, n.remove(), this.setModified());
      }
    }
  }
}
class BRe extends r2 {
  constructor(t) {
    super(), this.model = t;
  }
  run(t) {
    const r = !(DR(t) || t instanceof Bb || t instanceof Rf || t instanceof Og), a = [], v = [];
    for (const o of t.children)
      o instanceof w0 && (r && !Az(t.producedFields(), o.dependentFields()) ? a.push(o) : v.push(o));
    if (a.length > 0) {
      const o = a.pop();
      for (const s of a)
        o.merge(s, this.model.renameSignal.bind(this.model));
      this.setModified(), t instanceof w0 ? t.merge(o, this.model.renameSignal.bind(this.model)) : o.swapWithParent();
    }
    if (v.length > 1) {
      const o = v.pop();
      for (const s of v)
        o.merge(s, this.model.renameSignal.bind(this.model));
      this.setModified();
    }
  }
}
class jRe extends r2 {
  run(t) {
    const r = [...t.children];
    if (!Kx(r, (s) => s instanceof Dh) || t.numChildren() <= 1)
      return;
    const v = [];
    let o;
    for (const s of r)
      if (s instanceof Dh) {
        let n = s;
        for (; n.numChildren() === 1; ) {
          const [l] = n.children;
          if (l instanceof Dh)
            n = l;
          else
            break;
        }
        v.push(...n.children), o ? (t.removeChild(s), s.parent = o.parent, o.parent.removeChild(o), o.parent = n, this.setModified()) : o = n;
      } else
        v.push(s);
    if (v.length) {
      this.setModified();
      for (const s of v)
        s.parent.removeChild(s), s.parent = o;
    }
  }
}
class i2 extends Is {
  clone() {
    return new i2(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r;
  }
  addDimensions(t) {
    this.transform.groupby = d0(this.transform.groupby.concat(t), (r) => r);
  }
  dependentFields() {
    const t = /* @__PURE__ */ new Set();
    return this.transform.groupby && this.transform.groupby.forEach(t.add, t), this.transform.joinaggregate.map((r) => r.field).filter((r) => r !== void 0).forEach(t.add, t), t;
  }
  producedFields() {
    return new Set(this.transform.joinaggregate.map(this.getDefaultName));
  }
  getDefaultName(t) {
    return t.as ?? Mi(t);
  }
  hash() {
    return `JoinAggregateTransform ${lo(this.transform)}`;
  }
  assemble() {
    const t = [], r = [], a = [];
    for (const o of this.transform.joinaggregate)
      r.push(o.op), a.push(this.getDefaultName(o)), t.push(o.field === void 0 ? null : o.field);
    const v = this.transform.groupby;
    return {
      type: "joinaggregate",
      as: a,
      ops: r,
      fields: t,
      ...v !== void 0 ? { groupby: v } : {}
    };
  }
}
class fb extends Is {
  clone() {
    return new fb(null, { ...this.filter });
  }
  constructor(t, r) {
    super(t), this.filter = r;
  }
  static make(t, r, a) {
    const { config: v, markDef: o } = r, { marks: s, scales: n } = a;
    if (s === "include-invalid-values" && n === "include-invalid-values")
      return null;
    const l = r.reduceFieldDef((u, i, h) => {
      const p = X0(h) && r.getScaleComponent(h);
      if (p) {
        const _ = p.get("type"), { aggregate: d } = i, f = Qz({
          scaleChannel: h,
          markDef: o,
          config: v,
          scaleType: _,
          isCountAggregate: IT(d)
        });
        f !== "show" && f !== "always-valid" && (u[i.field] = i);
      }
      return u;
    }, {});
    return ui(l).length ? new fb(t, l) : null;
  }
  dependentFields() {
    return new Set(ui(this.filter));
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `FilterInvalid ${lo(this.filter)}`;
  }
  /**
   * Create the VgTransforms for each of the filtered fields.
   */
  assemble() {
    const t = ui(this.filter).reduce((r, a) => {
      const v = this.filter[a], o = Mi(v, { expr: "datum" });
      return v !== null && (v.type === "temporal" ? r.push(`(isDate(${o}) || (${PI(o)}))`) : v.type === "quantitative" && r.push(PI(o))), r;
    }, []);
    return t.length > 0 ? {
      type: "filter",
      expr: t.join(" && ")
    } : null;
  }
}
function PI(e) {
  return `isValid(${e}) && isFinite(+${e})`;
}
function URe(e) {
  return e.stack.stackBy.reduce((t, r) => {
    const a = r.fieldDef, v = Mi(a);
    return v && t.push(v), t;
  }, []);
}
function VRe(e) {
  return Qr(e) && e.every((t) => Fi(t)) && e.length > 1;
}
class jm extends Is {
  clone() {
    return new jm(null, ka(this._stack));
  }
  constructor(t, r) {
    super(t), this._stack = r;
  }
  static makeFromTransform(t, r) {
    const { stack: a, groupby: v, as: o, offset: s = "zero" } = r, n = [], l = [];
    if (r.sort !== void 0)
      for (const h of r.sort)
        n.push(h.field), l.push(Wu(h.order, "ascending"));
    const u = {
      field: n,
      order: l
    };
    let i;
    return VRe(o) ? i = o : Fi(o) ? i = [o, `${o}_end`] : i = [`${r.stack}_start`, `${r.stack}_end`], new jm(t, {
      dimensionFieldDefs: [],
      stackField: a,
      groupby: v,
      offset: s,
      sort: u,
      facetby: [],
      as: i
    });
  }
  static makeFromEncoding(t, r) {
    const a = r.stack, { encoding: v } = r;
    if (!a)
      return null;
    const { groupbyChannels: o, fieldChannel: s, offset: n, impute: l } = a, u = o.map((_) => {
      const d = v[_];
      return kp(d);
    }).filter((_) => !!_), i = URe(r), h = r.encoding.order;
    let p;
    if (Qr(h) || gi(h))
      p = gne(h);
    else {
      const _ = sre(h) ? h.sort : s === "y" ? "descending" : "ascending";
      p = i.reduce((d, f) => (d.field.includes(f) || (d.field.push(f), d.order.push(_)), d), { field: [], order: [] });
    }
    return new jm(t, {
      dimensionFieldDefs: u,
      stackField: r.vgField(s),
      facetby: [],
      stackby: i,
      sort: p,
      offset: n,
      impute: l,
      as: [
        r.vgField(s, { suffix: "start", forAs: !0 }),
        r.vgField(s, { suffix: "end", forAs: !0 })
      ]
    });
  }
  get stack() {
    return this._stack;
  }
  addDimensions(t) {
    this._stack.facetby.push(...t);
  }
  dependentFields() {
    const t = /* @__PURE__ */ new Set();
    return t.add(this._stack.stackField), this.getGroupbyFields().forEach(t.add, t), this._stack.facetby.forEach(t.add, t), this._stack.sort.field.forEach(t.add, t), t;
  }
  producedFields() {
    return new Set(this._stack.as);
  }
  hash() {
    return `Stack ${lo(this._stack)}`;
  }
  getGroupbyFields() {
    const { dimensionFieldDefs: t, impute: r, groupby: a } = this._stack;
    return t.length > 0 ? t.map((v) => v.bin ? r ? [Mi(v, { binSuffix: "mid" })] : [
      // For binned group by field without impute, we need both bin (start) and bin_end
      Mi(v, {}),
      Mi(v, { binSuffix: "end" })
    ] : [Mi(v)]).flat() : a ?? [];
  }
  assemble() {
    const t = [], { facetby: r, dimensionFieldDefs: a, stackField: v, stackby: o, sort: s, offset: n, impute: l, as: u } = this._stack;
    if (l)
      for (const i of a) {
        const { bandPosition: h = 0.5, bin: p } = i;
        if (p) {
          const _ = Mi(i, { expr: "datum" }), d = Mi(i, { expr: "datum", binSuffix: "end" });
          t.push({
            type: "formula",
            expr: `${PI(_)} ? ${h}*${_}+${1 - h}*${d} : ${_}`,
            as: Mi(i, { binSuffix: "mid", forAs: !0 })
          });
        }
        t.push({
          type: "impute",
          field: v,
          groupby: [...o, ...r],
          key: Mi(i, { binSuffix: "mid" }),
          method: "value",
          value: 0
        });
      }
    return t.push({
      type: "stack",
      groupby: [...this.getGroupbyFields(), ...r],
      field: v,
      sort: s,
      as: u,
      offset: n
    }), t;
  }
}
class Ub extends Is {
  clone() {
    return new Ub(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r;
  }
  addDimensions(t) {
    this.transform.groupby = d0(this.transform.groupby.concat(t), (r) => r);
  }
  dependentFields() {
    const t = /* @__PURE__ */ new Set();
    return (this.transform.groupby ?? []).forEach(t.add, t), (this.transform.sort ?? []).forEach((r) => t.add(r.field)), this.transform.window.map((r) => r.field).filter((r) => r !== void 0).forEach(t.add, t), t;
  }
  producedFields() {
    return new Set(this.transform.window.map(this.getDefaultName));
  }
  getDefaultName(t) {
    return t.as ?? Mi(t);
  }
  hash() {
    return `WindowTransform ${lo(this.transform)}`;
  }
  assemble() {
    const t = [], r = [], a = [], v = [];
    for (const h of this.transform.window)
      r.push(h.op), a.push(this.getDefaultName(h)), v.push(h.param === void 0 ? null : h.param), t.push(h.field === void 0 ? null : h.field);
    const o = this.transform.frame, s = this.transform.groupby;
    if (o && o[0] === null && o[1] === null && r.every((h) => zz(h)))
      return {
        type: "joinaggregate",
        as: a,
        ops: r,
        fields: t,
        ...s !== void 0 ? { groupby: s } : {}
      };
    const n = [], l = [];
    if (this.transform.sort !== void 0)
      for (const h of this.transform.sort)
        n.push(h.field), l.push(h.order ?? "ascending");
    const u = {
      field: n,
      order: l
    }, i = this.transform.ignorePeers;
    return {
      type: "window",
      params: v,
      as: a,
      ops: r,
      fields: t,
      sort: u,
      ...i !== void 0 ? { ignorePeers: i } : {},
      ...s !== void 0 ? { groupby: s } : {},
      ...o !== void 0 ? { frame: o } : {}
    };
  }
}
function $Re(e) {
  function t(r) {
    if (!(r instanceof jb)) {
      const a = r.clone();
      if (a instanceof Dh) {
        const v = zI + a.getSource();
        a.setSource(v), e.model.component.data.outputNodes[v] = a;
      } else (a instanceof pp || a instanceof jm || a instanceof Ub || a instanceof i2) && a.addDimensions(e.fields);
      for (const v of r.children.flatMap(t))
        v.parent = a;
      return [a];
    }
    return r.children.flatMap(t);
  }
  return t;
}
function OI(e) {
  if (e instanceof jb)
    if (e.numChildren() === 1 && !(e.children[0] instanceof Dh)) {
      const t = e.children[0];
      (t instanceof pp || t instanceof jm || t instanceof Ub || t instanceof i2) && t.addDimensions(e.fields), t.swapWithParent(), OI(e);
    } else {
      const t = e.model.component.data.main;
      Yie(t);
      const r = $Re(e), a = e.children.map(r).flat();
      for (const v of a)
        v.parent = t;
    }
  else
    e.children.map(OI);
}
function Yie(e) {
  if (e instanceof Dh && e.type === Du.Main && e.numChildren() === 1) {
    const t = e.children[0];
    t instanceof jb || (t.swapWithParent(), Yie(e));
  }
}
const zI = "scale_", V6 = 5;
function RI(e) {
  for (const t of e) {
    for (const r of t.children)
      if (r.parent !== t)
        return !1;
    if (!RI(t.children))
      return !1;
  }
  return !0;
}
function Zd(e, t) {
  let r = !1;
  for (const a of t)
    r = e.optimize(a) || r;
  return r;
}
function G$(e, t, r) {
  let a = e.sources, v = !1;
  return v = Zd(new PRe(), a) || v, v = Zd(new DRe(t), a) || v, a = a.filter((o) => o.numChildren() > 0), v = Zd(new RRe(), a) || v, a = a.filter((o) => o.numChildren() > 0), r || (v = Zd(new ORe(), a) || v, v = Zd(new BRe(t), a) || v, v = Zd(new LRe(), a) || v, v = Zd(new zRe(), a) || v, v = Zd(new NRe(), a) || v, v = Zd(new FRe(), a) || v, v = Zd(new IRe(), a) || v, v = Zd(new jRe(), a) || v), e.sources = a, v;
}
function qRe(e, t) {
  RI(e.sources);
  let r = 0, a = 0;
  for (let v = 0; v < V6 && G$(e, t, !0); v++)
    r++;
  e.sources.map(OI);
  for (let v = 0; v < V6 && G$(e, t, !1); v++)
    a++;
  RI(e.sources), Math.max(r, a) === V6 && mi(`Maximum optimization runs(${V6}) reached.`);
}
class Uc {
  constructor(t) {
    Object.defineProperty(this, "signal", {
      enumerable: !0,
      get: t
    });
  }
  static fromName(t, r) {
    return new Uc(() => t(r));
  }
}
function Zie(e) {
  pu(e) ? HRe(e) : GRe(e);
}
function HRe(e) {
  const t = e.component.scales;
  for (const r of ui(t)) {
    const a = YRe(e, r);
    if (t[r].setWithExplicit("domains", a), XRe(e, r), e.component.data.isFaceted) {
      let o = e;
      for (; !rd(o) && o.parent; )
        o = o.parent;
      if (o.component.resolve.scale[r] === "shared")
        for (const n of a.value)
          Im(n) && (n.data = zI + n.data.replace(zI, ""));
    }
  }
}
function GRe(e) {
  for (const r of e.children)
    Zie(r);
  const t = e.component.scales;
  for (const r of ui(t)) {
    let a, v = null;
    for (const o of e.children) {
      const s = o.component.scales[r];
      if (s) {
        a === void 0 ? a = s.getWithExplicit("domains") : a = Dg(a, s.getWithExplicit("domains"), "domains", "scale", FI);
        const n = s.get("selectionExtent");
        v && n && v.param !== n.param && mi(VIe), v = n;
      }
    }
    t[r].setWithExplicit("domains", a), v && t[r].set("selectionExtent", v, !0);
  }
}
function WRe(e, t, r, a) {
  if (e === "unaggregated") {
    const { valid: v, reason: o } = W$(t, r);
    if (!v) {
      mi(o);
      return;
    }
  } else if (e === void 0 && a.useUnaggregatedDomain) {
    const { valid: v } = W$(t, r);
    if (v)
      return "unaggregated";
  }
  return e;
}
function YRe(e, t) {
  const r = e.getScaleComponent(t).get("type"), { encoding: a } = e, v = WRe(e.scaleDomain(t), e.typedFieldDef(t), r, e.config.scale);
  return v !== e.scaleDomain(t) && (e.specifiedScales[t] = {
    ...e.specifiedScales[t],
    domain: v
  }), t === "x" && wc(a.x2) ? wc(a.x) ? Dg(O1(r, v, e, "x"), O1(r, v, e, "x2"), "domain", "scale", FI) : O1(r, v, e, "x2") : t === "y" && wc(a.y2) ? wc(a.y) ? Dg(O1(r, v, e, "y"), O1(r, v, e, "y2"), "domain", "scale", FI) : O1(r, v, e, "y2") : O1(r, v, e, t);
}
function ZRe(e, t, r) {
  return e.map((a) => ({ signal: `{data: ${qT(a, { timeUnit: r, type: t })}}` }));
}
function $M(e, t, r) {
  var v;
  const a = (v = Xc(r)) == null ? void 0 : v.unit;
  return t === "temporal" || a ? ZRe(e, t, a) : [e];
}
function O1(e, t, r, a) {
  const { encoding: v, markDef: o, mark: s, config: n, stack: l } = r, u = wc(v[a]), { type: i } = u, h = u.timeUnit, p = $Oe({
    invalid: P0("invalid", o, n),
    isPath: Xg(s)
  });
  if (fLe(t)) {
    const f = O1(e, void 0, r, a), c = $M(t.unionWith, i, h);
    return i0([...c, ...f.value]);
  } else {
    if (Ji(t))
      return i0([t]);
    if (t && t !== "unaggregated" && !$ne(t))
      return i0($M(t, i, h));
  }
  if (l && a === l.fieldChannel) {
    if (l.offset === "normalize")
      return Gh([[0, 1]]);
    const f = r.requestDataName(p);
    return Gh([
      {
        data: f,
        field: r.vgField(a, { suffix: "start" })
      },
      {
        data: f,
        field: r.vgField(a, { suffix: "end" })
      }
    ]);
  }
  const _ = X0(a) && gi(u) ? KRe(r, a, e) : void 0;
  if (K0(u)) {
    const f = $M([u.datum], i, h);
    return Gh(f);
  }
  const d = u;
  if (t === "unaggregated") {
    const { field: f } = u;
    return Gh([
      {
        data: r.requestDataName(p),
        field: Mi({ field: f, aggregate: "min" })
      },
      {
        data: r.requestDataName(p),
        field: Mi({ field: f, aggregate: "max" })
      }
    ]);
  } else if (hl(d.bin)) {
    if (Kc(e))
      return Gh(e === "bin-ordinal" ? [] : [
        {
          // If sort by aggregation of a specified sort field, we need to use RAW table,
          // so we can aggregate values for the scale independently from the main aggregation.
          data: $w(_) ? r.requestDataName(p) : r.requestDataName(Du.Raw),
          // Use range if we added it and the scale does not support computing a range as a signal.
          field: r.vgField(a, G4(d, a) ? { binSuffix: "range" } : {}),
          // we have to use a sort object if sort = true to make the sort correct by bin start
          sort: _ === !0 || !Oi(_) ? {
            field: r.vgField(a, {}),
            op: "min"
            // min or max doesn't matter since we sort by the start of the bin range
          } : _
        }
      ]);
    {
      const { bin: f } = d;
      if (hl(f)) {
        const c = IR(r, d.field, f);
        return Gh([
          new Uc(() => {
            const g = r.getSignalName(c);
            return `[${g}.start, ${g}.stop]`;
          })
        ]);
      } else
        return Gh([
          {
            data: r.requestDataName(p),
            field: r.vgField(a, {})
          }
        ]);
    }
  } else if (d.timeUnit && ro(["time", "utc"], e)) {
    const f = v[Z0(a)];
    if (ore(d, f, o, n)) {
      const c = r.requestDataName(p), g = Ig({ fieldDef: d, fieldDef2: f, markDef: o, config: n }), m = Hw(s) && g !== 0.5 && Yu(a);
      return Gh([
        {
          data: c,
          field: r.vgField(a, m ? { suffix: XT } : {})
        },
        {
          data: c,
          field: r.vgField(a, { suffix: m ? KT : "end" })
        }
      ]);
    }
  }
  return Gh(_ ? [
    {
      // If sort by aggregation of a specified sort field, we need to use RAW table,
      // so we can aggregate values for the scale independently from the main aggregation.
      data: $w(_) ? r.requestDataName(p) : r.requestDataName(Du.Raw),
      field: r.vgField(a),
      sort: _
    }
  ] : [
    {
      data: r.requestDataName(p),
      field: r.vgField(a)
    }
  ]);
}
function qM(e, t) {
  const { op: r, field: a, order: v } = e;
  return {
    // Apply default op
    op: r ?? (t ? "sum" : BT),
    // flatten nested fields
    ...a ? { field: Rd(a) } : {},
    ...v ? { order: v } : {}
  };
}
function XRe(e, t) {
  var n;
  const r = e.component.scales[t], a = e.specifiedScales[t].domain, v = (n = e.fieldDef(t)) == null ? void 0 : n.bin, o = $ne(a) && a, s = Qv(v) && DT(v.extent) && v.extent;
  (o || s) && r.set("selectionExtent", o ?? s, !0);
}
function KRe(e, t, r) {
  if (!Kc(r))
    return;
  const a = e.fieldDef(t), v = a.sort;
  if (ire(v))
    return {
      op: "min",
      field: ub(a, t),
      order: "ascending"
    };
  const { stack: o } = e, s = o ? /* @__PURE__ */ new Set([...o.groupbyFields, ...o.stackBy.map((n) => n.fieldDef.field)]) : void 0;
  if (Nm(v)) {
    const n = o && !s.has(v.field);
    return qM(v, n);
  } else if ($Le(v)) {
    const { encoding: n, order: l } = v, u = e.fieldDef(n), { aggregate: i, field: h } = u, p = o && !s.has(h);
    if (Hm(i) || Yg(i))
      return qM({
        field: Mi(u),
        order: l
      }, p);
    if (zz(i) || !i)
      return qM({
        op: i,
        // can't be argmin/argmax since we don't support them in encoding field def
        field: h,
        order: l
      }, p);
  } else {
    if (v === "descending")
      return {
        op: "min",
        field: e.vgField(t),
        order: "descending"
      };
    if (ro([
      "ascending",
      void 0
      /* default =ascending*/
    ], v))
      return !0;
  }
}
function W$(e, t) {
  const { aggregate: r, type: a } = e;
  return r ? Fi(r) && !AIe.has(r) ? {
    valid: !1,
    reason: pDe(r)
  } : a === "quantitative" && t === "log" ? {
    valid: !1,
    reason: mDe(e)
  } : { valid: !0 } : {
    valid: !1,
    reason: dDe(e)
  };
}
function FI(e, t, r, a) {
  return e.explicit && t.explicit && mi(bDe(r, a, e.value, t.value)), { explicit: e.explicit, value: [...e.value, ...t.value] };
}
function JRe(e) {
  const t = d0(e.map((s) => {
    if (Im(s)) {
      const { sort: n, ...l } = s;
      return l;
    }
    return s;
  }), lo), r = d0(e.map((s) => {
    if (Im(s)) {
      const n = s.sort;
      return n !== void 0 && !$w(n) && ("op" in n && n.op === "count" && delete n.field, n.order === "ascending" && delete n.order), n;
    }
  }).filter((s) => s !== void 0), lo);
  if (t.length === 0)
    return;
  if (t.length === 1) {
    const s = e[0];
    if (Im(s) && r.length > 0) {
      let n = r[0];
      if (r.length > 1) {
        mi(t$);
        const l = r.filter((u) => Oi(u) && "op" in u && u.op !== "min");
        r.every((u) => Oi(u) && "op" in u) && l.length === 1 ? n = l[0] : n = !0;
      } else if (Oi(n) && "field" in n) {
        const l = n.field;
        s.field === l && (n = n.order ? { order: n.order } : !0);
      }
      return {
        ...s,
        sort: n
      };
    }
    return s;
  }
  const a = d0(r.map((s) => $w(s) || !("op" in s) || Fi(s.op) && s.op in _Ie ? s : (mi(wDe(s)), !0)), lo);
  let v;
  a.length === 1 ? v = a[0] : a.length > 1 && (mi(t$), v = !0);
  const o = d0(e.map((s) => Im(s) ? s.data : null), (s) => s);
  return o.length === 1 && o[0] !== null ? {
    data: o[0],
    fields: t.map((n) => n.field),
    ...v ? { sort: v } : {}
  } : { fields: t, ...v ? { sort: v } : {} };
}
function OR(e) {
  if (Im(e) && Fi(e.field))
    return e.field;
  if (SIe(e)) {
    let t;
    for (const r of e.fields)
      if (Im(r) && Fi(r.field)) {
        if (!t)
          t = r.field;
        else if (t !== r.field)
          return mi(kDe), t;
      }
    return mi(TDe), t;
  } else if (MIe(e)) {
    mi(ADe);
    const t = e.fields[0];
    return Fi(t) ? t : void 0;
  }
}
function nA(e, t) {
  const a = e.component.scales[t].get("domains").map((v) => (Im(v) && (v.data = e.lookupDataSource(v.data)), v));
  return JRe(a);
}
function Xie(e) {
  return Vb(e) || zR(e) ? e.children.reduce((t, r) => t.concat(Xie(r)), Y$(e)) : Y$(e);
}
function Y$(e) {
  return ui(e.component.scales).reduce((t, r) => {
    const a = e.component.scales[r];
    if (a.merged)
      return t;
    const v = a.combine(), { name: o, type: s, selectionExtent: n, domains: l, range: u, reverse: i, ...h } = v, p = QRe(v.range, o, r, e), _ = nA(e, r), d = n ? ZOe(e, n, a, _) : null;
    return t.push({
      name: o,
      type: s,
      ..._ ? { domain: _ } : {},
      ...d ? { domainRaw: d } : {},
      range: p,
      ...i !== void 0 ? { reverse: i } : {},
      ...h
    }), t;
  }, []);
}
function QRe(e, t, r, a) {
  if (Yu(r)) {
    if (Zg(e))
      return {
        step: { signal: `${t}_step` }
      };
  } else if (Oi(e) && Im(e))
    return {
      ...e,
      data: a.lookupDataSource(e.data)
    };
  return e;
}
class Kie extends i1 {
  constructor(t, r) {
    super(
      {},
      // no initial explicit property
      { name: t }
      // name as initial implicit property
    ), this.merged = !1, this.setWithExplicit("type", r);
  }
  /**
   * Whether the scale definitely includes or not include zero in the domain
   */
  domainHasZero() {
    const t = this.get("type");
    if (ro([of.LOG, of.TIME, of.UTC], t))
      return "definitely-not";
    const r = this.get("zero");
    if (r === !0 || // If zero is undefined, linear/sqrt/pow scales have zero by default.
    r === void 0 && ro([of.LINEAR, of.SQRT, of.POW], t))
      return "definitely";
    const a = this.get("domains");
    if (a.length > 0) {
      let v = !1, o = !1, s = !1;
      for (const n of a) {
        if (Qr(n)) {
          const l = n[0], u = n[n.length - 1];
          if (Ro(l) && Ro(u))
            if (l <= 0 && u >= 0) {
              v = !0;
              continue;
            } else {
              o = !0;
              continue;
            }
        }
        s = !0;
      }
      if (v)
        return "definitely";
      if (o && !s)
        return "definitely-not";
    }
    return "maybe";
  }
}
const eFe = ["range", "scheme"];
function tFe(e) {
  const t = e.component.scales;
  for (const r of Oz) {
    const a = t[r];
    if (!a)
      continue;
    const v = nFe(r, e);
    a.setWithExplicit("range", v);
  }
}
function Z$(e, t) {
  const r = e.fieldDef(t);
  if (r != null && r.bin) {
    const { bin: a, field: v } = r, o = Nh(t), s = e.getName(o);
    if (Oi(a) && a.binned && a.step !== void 0)
      return new Uc(() => {
        const n = e.scaleName(t), l = `(domain("${n}")[1] - domain("${n}")[0]) / ${a.step}`;
        return `${e.getSignalName(s)} / (${l})`;
      });
    if (hl(a)) {
      const n = IR(e, v, a);
      return new Uc(() => {
        const l = e.getSignalName(n), u = `(${l}.stop - ${l}.start) / ${l}.step`;
        return `${e.getSignalName(s)} / (${u})`;
      });
    }
  }
}
function nFe(e, t) {
  const r = t.specifiedScales[e], { size: a } = t, o = t.getScaleComponent(e).get("type");
  for (const h of eFe)
    if (r[h] !== void 0) {
      const p = bI(o, h), _ = qne(e, h);
      if (!p)
        mi(kne(o, h, e));
      else if (_)
        mi(_);
      else
        switch (h) {
          case "range": {
            const d = r.range;
            if (Qr(d)) {
              if (Yu(e))
                return i0(d.map((f) => {
                  if (f === "width" || f === "height") {
                    const c = t.getName(f), g = t.getSignalName.bind(t);
                    return Uc.fromName(g, c);
                  }
                  return f;
                }));
            } else if (Oi(d))
              return i0({
                data: t.requestDataName(Du.Main),
                field: d.field,
                sort: { op: "min", field: t.vgField(e) }
              });
            return i0(d);
          }
          case "scheme":
            return i0(rFe(r[h]));
        }
    }
  const s = e === Yl || e === "xOffset" ? "width" : "height", n = a[s];
  if (z0(n)) {
    if (Yu(e))
      if (Kc(o)) {
        const h = Qie(n, t, e);
        if (h)
          return i0({ step: h });
      } else
        mi(Tne(s));
    else if (j4(e)) {
      const h = e === $g ? "x" : "y";
      if (t.getScaleComponent(h).get("type") === "band") {
        const d = eae(n, o);
        if (d)
          return i0(d);
      }
    }
  }
  const { rangeMin: l, rangeMax: u } = r, i = iFe(e, t);
  return (l !== void 0 || u !== void 0) && // it's ok to check just rangeMin's compatibility since rangeMin/rangeMax are the same
  bI(o, "rangeMin") && Qr(i) && i.length === 2 ? i0([l ?? i[0], u ?? i[1]]) : Gh(i);
}
function rFe(e) {
  return cLe(e) ? {
    scheme: e.name,
    ...Ih(e, ["name"])
  } : { scheme: e };
}
function Jie(e, t, r, { center: a } = {}) {
  const v = Nh(e), o = t.getName(v), s = t.getSignalName.bind(t);
  return e === Qc && _p(r) ? a ? [
    Uc.fromName((n) => `${s(n)}/2`, o),
    Uc.fromName((n) => `-${s(n)}/2`, o)
  ] : [Uc.fromName(s, o), 0] : a ? [
    Uc.fromName((n) => `-${s(n)}/2`, o),
    Uc.fromName((n) => `${s(n)}/2`, o)
  ] : [0, Uc.fromName(s, o)];
}
function iFe(e, t) {
  const { size: r, config: a, mark: v, encoding: o } = t, { type: s } = wc(o[e]), l = t.getScaleComponent(e).get("type"), { domain: u, domainMid: i } = t.specifiedScales[e];
  switch (e) {
    case Yl:
    case Qc: {
      if (ro(["point", "band"], l)) {
        const h = tae(e, r, a.view);
        if (z0(h))
          return { step: Qie(h, t, e) };
      }
      return Jie(e, t, l);
    }
    case $g:
    case Rb:
      return aFe(e, t, l);
    case e1: {
      const h = lFe(v, a), p = uFe(v, r, t, a);
      return nb(l) ? sFe(h, p, oFe(l, a, u, e)) : [h, p];
    }
    case Bd:
      return [0, Math.PI * 2];
    case Kv:
      return [0, 360];
    case Dp:
      return [
        0,
        new Uc(() => {
          const h = t.getSignalName(rd(t.parent) ? "child_width" : "width"), p = t.getSignalName(rd(t.parent) ? "child_height" : "height");
          return `min(${h},${p})/2`;
        })
      ];
    case Gg:
      return [a.scale.minStrokeWidth, a.scale.maxStrokeWidth];
    case Wg:
      return [
        // TODO: add this to Vega's config.range?
        [1, 0],
        [4, 2],
        [2, 1],
        [1, 1],
        [1, 2, 4, 2]
      ];
    case Fh:
      return "symbol";
    case Rh:
    case W0:
    case Y0:
      return l === "ordinal" ? s === "nominal" ? "category" : "ordinal" : i !== void 0 ? "diverging" : v === "rect" || v === "geoshape" ? "heatmap" : "ramp";
    case t1:
    case qg:
    case Hg:
      return [a.scale.minOpacity, a.scale.maxOpacity];
  }
}
function Qie(e, t, r) {
  const { encoding: a } = t, v = t.getScaleComponent(r), o = Iz(r), s = a[o];
  if (Nre({ step: e, offsetIsDiscrete: La(s) && Nne(s.type) }) === "offset" && vre(a, o)) {
    const l = t.getScaleComponent(o);
    let i = `domain('${t.scaleName(o)}').length`;
    if (l.get("type") === "band") {
      const p = l.get("paddingInner") ?? l.get("padding") ?? 0, _ = l.get("paddingOuter") ?? l.get("padding") ?? 0;
      i = `bandspace(${i}, ${p}, ${_})`;
    }
    const h = v.get("paddingInner") ?? v.get("padding");
    return {
      signal: `${e.step} * ${i} / (1-${DIe(h)})`
    };
  } else
    return e.step;
}
function eae(e, t) {
  if (Nre({ step: e, offsetIsDiscrete: Kc(t) }) === "offset")
    return { step: e.step };
}
function aFe(e, t, r) {
  const a = e === $g ? "x" : "y", v = t.getScaleComponent(a);
  if (!v)
    return Jie(a, t, r, { center: !0 });
  const o = v.get("type"), s = t.scaleName(a), { markDef: n, config: l } = t;
  if (o === "band") {
    const u = tae(a, t.size, t.config.view);
    if (z0(u)) {
      const i = eae(u, r);
      if (i)
        return i;
    }
    return [0, { signal: `bandwidth('${s}')` }];
  } else {
    const u = t.encoding[a];
    if (gi(u) && u.timeUnit) {
      const i = One(u.timeUnit, (d) => `scale('${s}', ${d})`), h = t.config.scale.bandWithNestedOffsetPaddingInner, p = Ig({
        fieldDef: u,
        markDef: n,
        config: l
      }) - 0.5, _ = p !== 0 ? ` + ${p}` : "";
      if (h) {
        const d = Ji(h) ? `${h.signal}/2` + _ : `${h / 2 + p}`, f = Ji(h) ? `(1 - ${h.signal}/2)` + _ : `${1 - h / 2 + p}`;
        return [{ signal: `${d} * (${i})` }, { signal: `${f} * (${i})` }];
      }
      return [0, { signal: i }];
    }
    return Hte(`Cannot use ${e} scale if ${a} scale is not discrete.`);
  }
}
function tae(e, t, r) {
  const a = e === Yl ? "width" : "height", v = t[a];
  return v || Lk(r, a);
}
function oFe(e, t, r, a) {
  switch (e) {
    case "quantile":
      return t.scale.quantileCount;
    case "quantize":
      return t.scale.quantizeCount;
    case "threshold":
      return r !== void 0 && Qr(r) ? r.length + 1 : (mi(ODe(a)), 3);
  }
}
function sFe(e, t, r) {
  const a = () => {
    const v = up(t), o = up(e), s = `(${v} - ${o}) / (${r} - 1)`;
    return `sequence(${o}, ${v} + ${s}, ${s})`;
  };
  return Ji(t) ? new Uc(a) : { signal: a() };
}
function lFe(e, t) {
  switch (e) {
    case "bar":
    case "tick":
      return t.scale.minBandSize;
    case "line":
    case "trail":
    case "rule":
      return t.scale.minStrokeWidth;
    case "text":
      return t.scale.minFontSize;
    case "point":
    case "square":
    case "circle":
      return t.scale.minSize;
  }
  throw new Error(LT("size", e));
}
const X$ = 0.95;
function uFe(e, t, r, a) {
  const v = {
    x: Z$(r, "x"),
    y: Z$(r, "y")
  };
  switch (e) {
    case "bar":
    case "tick": {
      if (a.scale.maxBandSize !== void 0)
        return a.scale.maxBandSize;
      const o = K$(t, v, a.view);
      return Ro(o) ? o - 1 : new Uc(() => `${o.signal} - 1`);
    }
    case "line":
    case "trail":
    case "rule":
      return a.scale.maxStrokeWidth;
    case "text":
      return a.scale.maxFontSize;
    case "point":
    case "square":
    case "circle": {
      if (a.scale.maxSize)
        return a.scale.maxSize;
      const o = K$(t, v, a.view);
      return Ro(o) ? Math.pow(X$ * o, 2) : new Uc(() => `pow(${X$} * ${o.signal}, 2)`);
    }
  }
  throw new Error(LT("size", e));
}
function K$(e, t, r) {
  const a = z0(e.width) ? e.width.step : Dk(r, "width"), v = z0(e.height) ? e.height.step : Dk(r, "height");
  return t.x || t.y ? new Uc(() => `min(${[
    t.x ? t.x.signal : a,
    t.y ? t.y.signal : v
  ].join(", ")})`) : Math.min(a, v);
}
function nae(e, t) {
  pu(e) ? cFe(e, t) : iae(e, t);
}
function cFe(e, t) {
  const r = e.component.scales, { config: a, encoding: v, markDef: o, specifiedScales: s } = e;
  for (const n of ui(r)) {
    const l = s[n], u = r[n], i = e.getScaleComponent(n), h = wc(v[n]), p = l[t], _ = i.get("type"), d = i.get("padding"), f = i.get("paddingInner"), c = bI(_, t), g = qne(n, t);
    if (p !== void 0 && (c ? g && mi(g) : mi(kne(_, t, n))), c && g === void 0)
      if (p !== void 0) {
        const m = h.timeUnit, x = h.type;
        switch (t) {
          case "domainMax":
          case "domainMin":
            e2(l[t]) || x === "temporal" || m ? u.set(t, { signal: qT(l[t], { type: x, timeUnit: m }) }, !0) : u.set(t, l[t], !0);
            break;
          default:
            u.copyKeyFromObject(t, l);
        }
      } else {
        const m = t in J$ ? J$[t]({
          model: e,
          channel: n,
          fieldOrDatumDef: h,
          scaleType: _,
          scalePadding: d,
          scalePaddingInner: f,
          domain: l.domain,
          domainMin: l.domainMin,
          domainMax: l.domainMax,
          markDef: o,
          config: a,
          hasNestedOffsetScale: xre(v, n),
          hasSecondaryRangeChannel: !!v[Z0(n)]
        }) : a.scale[t];
        m !== void 0 && u.set(t, m, !1);
      }
  }
}
const J$ = {
  bins: ({ model: e, fieldOrDatumDef: t }) => gi(t) ? fFe(e, t) : void 0,
  interpolate: ({ channel: e, fieldOrDatumDef: t }) => hFe(e, t.type),
  nice: ({ scaleType: e, channel: t, domain: r, domainMin: a, domainMax: v, fieldOrDatumDef: o }) => dFe(e, t, r, a, v, o),
  padding: ({ channel: e, scaleType: t, fieldOrDatumDef: r, markDef: a, config: v }) => pFe(e, t, v.scale, r, a, v.bar),
  paddingInner: ({ scalePadding: e, channel: t, markDef: r, scaleType: a, config: v, hasNestedOffsetScale: o }) => mFe(e, t, r.type, a, v.scale, o),
  paddingOuter: ({ scalePadding: e, channel: t, scaleType: r, scalePaddingInner: a, config: v, hasNestedOffsetScale: o }) => gFe(e, t, r, a, v.scale, o),
  reverse: ({ fieldOrDatumDef: e, scaleType: t, channel: r, config: a }) => {
    const v = gi(e) ? e.sort : void 0;
    return yFe(t, v, r, a.scale);
  },
  zero: ({ channel: e, fieldOrDatumDef: t, domain: r, markDef: a, scaleType: v, config: o, hasSecondaryRangeChannel: s }) => vFe(e, t, r, a, v, o.scale, s)
};
function rae(e) {
  pu(e) ? tFe(e) : iae(e, "range");
}
function iae(e, t) {
  const r = e.component.scales;
  for (const a of e.children)
    t === "range" ? rae(a) : nae(a, t);
  for (const a of ui(r)) {
    let v;
    for (const o of e.children) {
      const s = o.component.scales[a];
      if (s) {
        const n = s.getWithExplicit(t);
        v = Dg(v, n, t, "scale", Kre((l, u) => {
          switch (t) {
            case "range":
              return l.step && u.step ? l.step - u.step : 0;
          }
          return 0;
        }));
      }
    }
    r[a].setWithExplicit(t, v);
  }
}
function fFe(e, t) {
  const r = t.bin;
  if (hl(r)) {
    const a = IR(e, t.field, r);
    return new Uc(() => e.getSignalName(a));
  } else if (af(r) && Qv(r) && r.step !== void 0)
    return {
      step: r.step
    };
}
function hFe(e, t) {
  if (ro([Rh, W0, Y0], e) && t !== "nominal")
    return "hcl";
}
function dFe(e, t, r, a, v, o) {
  var s;
  if (!((s = kp(o)) != null && s.bin || Qr(r) || v != null || a != null || ro([of.TIME, of.UTC], e)))
    return Yu(t) ? !0 : void 0;
}
function pFe(e, t, r, a, v, o) {
  if (Yu(e)) {
    if (p0(t)) {
      if (r.continuousPadding !== void 0)
        return r.continuousPadding;
      const { type: s, orient: n } = v;
      if (s === "bar" && !(gi(a) && (a.bin || a.timeUnit)) && (n === "vertical" && e === "x" || n === "horizontal" && e === "y"))
        return o.continuousBandSize;
    }
    if (t === of.POINT)
      return r.pointPadding;
  }
}
function mFe(e, t, r, a, v, o = !1) {
  if (e === void 0) {
    if (Yu(t)) {
      const { bandPaddingInner: s, barBandPaddingInner: n, rectBandPaddingInner: l, bandWithNestedOffsetPaddingInner: u } = v;
      return o ? u : Wu(s, r === "bar" ? n : l);
    } else if (j4(t) && a === of.BAND)
      return v.offsetBandPaddingInner;
  }
}
function gFe(e, t, r, a, v, o = !1) {
  if (e === void 0) {
    if (Yu(t)) {
      const { bandPaddingOuter: s, bandWithNestedOffsetPaddingOuter: n } = v;
      if (o)
        return n;
      if (r === of.BAND)
        return Wu(
          s,
          /* By default, paddingOuter is paddingInner / 2. The reason is that
            size (width/height) = step * (cardinality - paddingInner + 2 * paddingOuter).
            and we want the width/height to be integer by default.
            Note that step (by default) and cardinality are integers.) */
          Ji(a) ? { signal: `${a.signal}/2` } : a / 2
        );
    } else if (j4(t)) {
      if (r === of.POINT)
        return 0.5;
      if (r === of.BAND)
        return v.offsetBandPaddingOuter;
    }
  }
}
function yFe(e, t, r, a) {
  if (r === "x" && a.xReverse !== void 0)
    return _p(e) && t === "descending" ? Ji(a.xReverse) ? { signal: `!${a.xReverse.signal}` } : !a.xReverse : a.xReverse;
  if (_p(e) && t === "descending")
    return !0;
}
function vFe(e, t, r, a, v, o, s) {
  if (!!r && r !== "unaggregated" && _p(v)) {
    if (Qr(r)) {
      const l = r[0], u = r[r.length - 1];
      if (Ro(l) && l <= 0 && Ro(u) && u >= 0)
        return !0;
    }
    return !1;
  }
  if (e === "size" && t.type === "quantitative" && !nb(v))
    return !0;
  if (!(gi(t) && t.bin) && ro([...n1, ...dIe], e)) {
    const { orient: l, type: u } = a;
    return ro(["bar", "area", "line", "trail"], u) && (l === "horizontal" && e === "y" || l === "vertical" && e === "x") ? !1 : ro(["bar", "area"], u) && !s ? !0 : o == null ? void 0 : o.zero;
  }
  return !1;
}
function xFe(e, t, r, a, v = !1) {
  const o = bFe(t, r, a, v), { type: s } = e;
  return X0(t) ? s !== void 0 ? yLe(t, s) ? gi(r) && !gLe(s, r.type) ? (mi(vDe(s, o)), o) : s : (mi(yDe(t, s, o)), o) : o : null;
}
function bFe(e, t, r, a) {
  var v;
  switch (t.type) {
    case "nominal":
    case "ordinal": {
      if (wx(e) || zM(e) === "discrete")
        return e === "shape" && t.type === "ordinal" && mi(RM(e, "ordinal")), "ordinal";
      if (Yu(e) || j4(e)) {
        if (ro(["rect", "bar", "image", "rule"], r.type) || a)
          return "band";
      } else if (r.type === "arc" && e in Pz)
        return "band";
      const o = r[Nh(e)];
      return zv(o) || ib(t) && ((v = t.axis) != null && v.tickBand) ? "band" : "point";
    }
    case "temporal":
      return wx(e) ? "time" : zM(e) === "discrete" ? (mi(RM(e, "temporal")), "ordinal") : gi(t) && t.timeUnit && Xc(t.timeUnit).utc ? "utc" : "time";
    case "quantitative":
      return wx(e) ? gi(t) && hl(t.bin) ? "bin-ordinal" : "linear" : zM(e) === "discrete" ? (mi(RM(e, "quantitative")), "ordinal") : "linear";
    case "geojson":
      return;
  }
  throw new Error(_ne(t.type));
}
function _Fe(e, { ignoreRange: t } = {}) {
  aae(e), Zie(e);
  for (const r of mLe)
    nae(e, r);
  t || rae(e);
}
function aae(e) {
  pu(e) ? e.component.scales = wFe(e) : e.component.scales = TFe(e);
}
function wFe(e) {
  const { encoding: t, mark: r, markDef: a } = e, v = {};
  for (const o of Oz) {
    const s = wc(t[o]);
    if (s && r === Wne && o === Fh && s.type === Fb)
      continue;
    let n = s && s.scale;
    if (s && n !== null && n !== !1) {
      n ?? (n = {});
      const l = xre(t, o), u = xFe(n, o, s, a, l);
      v[o] = new Kie(e.scaleName(`${o}`, !0), {
        value: u,
        explicit: n.type === u
      });
    }
  }
  return v;
}
const kFe = Kre((e, t) => r$(e) - r$(t));
function TFe(e) {
  var t;
  const r = e.component.scales = {}, a = {}, v = e.component.resolve;
  for (const o of e.children) {
    aae(o);
    for (const s of ui(o.component.scales))
      if ((t = v.scale)[s] ?? (t[s] = Rie(s, e)), v.scale[s] === "shared") {
        const n = a[s], l = o.component.scales[s].getWithExplicit("type");
        n ? aLe(n.value, l.value) ? a[s] = Dg(n, l, "type", "scale", kFe) : (v.scale[s] = "independent", delete a[s]) : a[s] = l;
      }
  }
  for (const o of ui(a)) {
    const s = e.scaleName(o, !0), n = a[o];
    r[o] = new Kie(s, n);
    for (const l of e.children) {
      const u = l.component.scales[o];
      u && (l.renameScale(u.get("name"), s), u.merged = !0);
    }
  }
  return r;
}
class HM {
  constructor() {
    this.nameMap = {};
  }
  rename(t, r) {
    this.nameMap[t] = r;
  }
  has(t) {
    return this.nameMap[t] !== void 0;
  }
  get(t) {
    for (; this.nameMap[t] && t !== this.nameMap[t]; )
      t = this.nameMap[t];
    return t;
  }
}
function pu(e) {
  return (e == null ? void 0 : e.type) === "unit";
}
function rd(e) {
  return (e == null ? void 0 : e.type) === "facet";
}
function zR(e) {
  return (e == null ? void 0 : e.type) === "concat";
}
function Vb(e) {
  return (e == null ? void 0 : e.type) === "layer";
}
class RR {
  constructor(t, r, a, v, o, s, n) {
    this.type = r, this.parent = a, this.config = o, this.correctDataNames = (l) => {
      var u, i, h;
      return (u = l.from) != null && u.data && (l.from.data = this.lookupDataSource(l.from.data)), (h = (i = l.from) == null ? void 0 : i.facet) != null && h.data && (l.from.facet.data = this.lookupDataSource(l.from.facet.data)), l;
    }, this.parent = a, this.config = o, this.view = If(n), this.name = t.name ?? v, this.title = $1(t.title) ? { text: t.title } : t.title ? If(t.title) : void 0, this.scaleNameMap = a ? a.scaleNameMap : new HM(), this.projectionNameMap = a ? a.projectionNameMap : new HM(), this.signalNameMap = a ? a.signalNameMap : new HM(), this.data = t.data, this.description = t.description, this.transforms = DOe(t.transform ?? []), this.layout = r === "layer" || r === "unit" ? {} : zPe(t, r, o), this.component = {
      data: {
        sources: a ? a.component.data.sources : [],
        outputNodes: a ? a.component.data.outputNodes : {},
        outputNodeRefCounts: a ? a.component.data.outputNodeRefCounts : {},
        // data is faceted if the spec is a facet spec or the parent has faceted data and data is undefined
        isFaceted: jT(t) || (a == null ? void 0 : a.component.data.isFaceted) && t.data === void 0
      },
      layoutSize: new i1(),
      layoutHeaders: { row: {}, column: {}, facet: {} },
      mark: null,
      resolve: {
        scale: {},
        axis: {},
        legend: {},
        ...s ? ka(s) : {}
      },
      selection: null,
      scales: null,
      projection: null,
      axes: {},
      legends: {}
    };
  }
  get width() {
    return this.getSizeSignalRef("width");
  }
  get height() {
    return this.getSizeSignalRef("height");
  }
  parse() {
    this.parseScale(), this.parseLayoutSize(), this.renameTopLevelLayoutSizeSignal(), this.parseSelections(), this.parseProjection(), this.parseData(), this.parseAxesAndHeaders(), this.parseLegends(), this.parseMarkGroup();
  }
  parseScale() {
    _Fe(this);
  }
  parseProjection() {
    Gie(this);
  }
  /**
   * Rename top-level spec's size to be just width / height, ignoring model name.
   * This essentially merges the top-level spec's width/height signals with the width/height signals
   * to help us reduce redundant signals declaration.
   */
  renameTopLevelLayoutSizeSignal() {
    this.getName("width") !== "width" && this.renameSignal(this.getName("width"), "width"), this.getName("height") !== "height" && this.renameSignal(this.getName("height"), "height");
  }
  parseLegends() {
    Uie(this);
  }
  assembleEncodeFromView(t) {
    const { style: r, ...a } = t, v = {};
    for (const o of ui(a)) {
      const s = a[o];
      s !== void 0 && (v[o] = Al(s));
    }
    return v;
  }
  assembleGroupEncodeEntry(t) {
    let r = {};
    return this.view && (r = this.assembleEncodeFromView(this.view)), !t && (this.description && (r.description = Al(this.description)), this.type === "unit" || this.type === "layer") ? {
      width: this.getSizeSignalRef("width"),
      height: this.getSizeSignalRef("height"),
      ...r
    } : Rs(r) ? void 0 : r;
  }
  assembleLayout() {
    if (!this.layout)
      return;
    const { spacing: t, ...r } = this.layout, { component: a, config: v } = this, o = qze(a.layoutHeaders, v);
    return {
      padding: t,
      ...this.assembleDefaultLayout(),
      ...r,
      ...o ? { titleBand: o } : {}
    };
  }
  assembleDefaultLayout() {
    return {};
  }
  assembleHeaderMarks() {
    const { layoutHeaders: t } = this.component;
    let r = [];
    for (const a of Sd)
      t[a].title && r.push(Nze(this, a));
    for (const a of SR)
      r = r.concat(Bze(this, a));
    return r;
  }
  assembleAxes() {
    return Aze(this.component.axes, this.config);
  }
  assembleLegends() {
    return $ie(this);
  }
  assembleProjections() {
    return dRe(this);
  }
  assembleTitle() {
    const { encoding: t, ...r } = this.title ?? {}, a = {
      ...hne(this.config.title).nonMarkTitleProperties,
      ...r,
      ...t ? { encode: { update: t } } : {}
    };
    if (a.text)
      return ro(["unit", "layer"], this.type) ? ro(["middle", void 0], a.anchor) && (a.frame ?? (a.frame = "group")) : a.anchor ?? (a.anchor = "start"), Rs(a) ? void 0 : a;
  }
  /**
   * Assemble the mark group for this model. We accept optional `signals` so that we can include concat top-level signals with the top-level model's local signals.
   */
  assembleGroup(t = []) {
    const r = {};
    t = t.concat(this.assembleSignals()), t.length > 0 && (r.signals = t);
    const a = this.assembleLayout();
    a && (r.layout = a), r.marks = [].concat(this.assembleHeaderMarks(), this.assembleMarks());
    const v = !this.parent || rd(this.parent) ? Xie(this) : [];
    v.length > 0 && (r.scales = v);
    const o = this.assembleAxes();
    o.length > 0 && (r.axes = o);
    const s = this.assembleLegends();
    return s.length > 0 && (r.legends = s), r;
  }
  getName(t) {
    return Gl((this.name ? `${this.name}_` : "") + t);
  }
  getDataName(t) {
    return this.getName(Du[t].toLowerCase());
  }
  /**
   * Request a data source name for the given data source type and mark that data source as required.
   * This method should be called in parse, so that all used data source can be correctly instantiated in assembleData().
   * You can lookup the correct dataset name in assemble with `lookupDataSource`.
   */
  requestDataName(t) {
    const r = this.getDataName(t), a = this.component.data.outputNodeRefCounts;
    return a[r] = (a[r] || 0) + 1, r;
  }
  getSizeSignalRef(t) {
    if (rd(this.parent)) {
      const r = Oie(t), a = CT(r), v = this.component.scales[a];
      if (v && !v.merged) {
        const o = v.get("type"), s = v.get("range");
        if (Kc(o) && Zg(s)) {
          const n = v.get("name"), l = nA(this, a), u = OR(l);
          if (u) {
            const i = Mi({ aggregate: "distinct", field: u }, { expr: "datum" });
            return {
              signal: Pie(n, v, i)
            };
          } else
            return mi(Fz(a)), null;
        }
      }
    }
    return {
      signal: this.signalNameMap.get(this.getName(t))
    };
  }
  /**
   * Lookup the name of the datasource for an output node. You probably want to call this in assemble.
   */
  lookupDataSource(t) {
    const r = this.component.data.outputNodes[t];
    return r ? r.getSource() : t;
  }
  getSignalName(t) {
    return this.signalNameMap.get(t);
  }
  renameSignal(t, r) {
    this.signalNameMap.rename(t, r);
  }
  renameScale(t, r) {
    this.scaleNameMap.rename(t, r);
  }
  renameProjection(t, r) {
    this.projectionNameMap.rename(t, r);
  }
  /**
   * @return scale name for a given channel after the scale has been parsed and named.
   */
  scaleName(t, r) {
    if (r)
      return this.getName(t);
    if (
      // If there is a scale for the channel, there should be a local scale component for it
      ine(t) && X0(t) && this.component.scales[t] || // in the scale name map (the scale get merged by its parent)
      this.scaleNameMap.has(this.getName(t))
    )
      return this.scaleNameMap.get(this.getName(t));
  }
  /**
   * @return projection name after the projection has been parsed and named.
   */
  projectionName(t) {
    if (t)
      return this.getName("projection");
    if (this.component.projection && !this.component.projection.merged || this.projectionNameMap.has(this.getName("projection")))
      return this.projectionNameMap.get(this.getName("projection"));
  }
  /**
   * Traverse a model's hierarchy to get the scale component for a particular channel.
   */
  getScaleComponent(t) {
    if (!this.component.scales)
      throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");
    const r = this.component.scales[t];
    return r && !r.merged ? r : this.parent ? this.parent.getScaleComponent(t) : void 0;
  }
  getScaleType(t) {
    const r = this.getScaleComponent(t);
    return r ? r.get("type") : void 0;
  }
  /**
   * Traverse a model's hierarchy to get a particular selection component.
   */
  getSelectionComponent(t, r) {
    let a = this.component.selection[t];
    if (!a && this.parent && (a = this.parent.getSelectionComponent(t, r)), !a)
      throw new Error(RIe(r));
    return a;
  }
  /**
   * Returns true if the model has a signalRef for an axis orient.
   */
  hasAxisOrientSignalRef() {
    var t, r;
    return ((t = this.component.axes.x) == null ? void 0 : t.some((a) => a.hasOrientSignalRef())) || ((r = this.component.axes.y) == null ? void 0 : r.some((a) => a.hasOrientSignalRef()));
  }
}
class oae extends RR {
  /** Get "field" reference for Vega */
  vgField(t, r = {}) {
    const a = this.fieldDef(t);
    if (a)
      return Mi(a, r);
  }
  reduceFieldDef(t, r) {
    return cPe(this.getMapping(), (a, v, o) => {
      const s = kp(v);
      return s ? t(a, s, o) : a;
    }, r);
  }
  forEachFieldDef(t, r) {
    lR(this.getMapping(), (a, v) => {
      const o = kp(a);
      o && t(o, v);
    }, r);
  }
}
class rA extends Is {
  clone() {
    return new rA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const a = this.transform.as ?? [void 0, void 0];
    this.transform.as = [a[0] ?? "value", a[1] ?? "density"];
    const v = this.transform.resolve ?? "shared";
    this.transform.resolve = v;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.density, ...this.transform.groupby ?? []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `DensityTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { density: t, ...r } = this.transform, a = {
      type: "kde",
      field: t,
      ...r
    };
    return a.resolve = this.transform.resolve, a;
  }
}
class iA extends Is {
  clone() {
    return new iA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.extent]);
  }
  producedFields() {
    return /* @__PURE__ */ new Set([]);
  }
  hash() {
    return `ExtentTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { extent: t, param: r } = this.transform;
    return {
      type: "extent",
      field: t,
      signal: r
    };
  }
}
class aA extends Is {
  clone() {
    return new aA(this.parent, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const { flatten: a, as: v = [] } = this.transform;
    this.transform.as = a.map((o, s) => v[s] ?? o);
  }
  dependentFields() {
    return new Set(this.transform.flatten);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `FlattenTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { flatten: t, as: r } = this.transform;
    return {
      type: "flatten",
      fields: t,
      as: r
    };
  }
}
class oA extends Is {
  clone() {
    return new oA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const a = this.transform.as ?? [void 0, void 0];
    this.transform.as = [a[0] ?? "key", a[1] ?? "value"];
  }
  dependentFields() {
    return new Set(this.transform.fold);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `FoldTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { fold: t, as: r } = this.transform;
    return {
      type: "fold",
      fields: t,
      as: r
    };
  }
}
class Ax extends Is {
  clone() {
    return new Ax(null, ka(this.fields), this.geojson, this.signal);
  }
  static parseAll(t, r) {
    if (r.component.projection && !r.component.projection.isFit)
      return t;
    let a = 0;
    for (const v of [
      [Pp, Lp],
      [Fd, Op]
    ]) {
      const o = v.map((s) => {
        const n = wc(r.encoding[s]);
        return gi(n) ? n.field : K0(n) ? { expr: `${n.datum}` } : wp(n) ? { expr: `${n.value}` } : void 0;
      });
      (o[0] || o[1]) && (t = new Ax(t, o, null, r.getName(`geojson_${a++}`)));
    }
    if (r.channelHasField(Fh)) {
      const v = r.typedFieldDef(Fh);
      v.type === Fb && (t = new Ax(t, null, v.field, r.getName(`geojson_${a++}`)));
    }
    return t;
  }
  constructor(t, r, a, v) {
    super(t), this.fields = r, this.geojson = a, this.signal = v;
  }
  dependentFields() {
    const t = (this.fields ?? []).filter(Fi);
    return /* @__PURE__ */ new Set([...this.geojson ? [this.geojson] : [], ...t]);
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `GeoJSON ${this.geojson} ${this.signal} ${lo(this.fields)}`;
  }
  assemble() {
    return [
      ...this.geojson ? [
        {
          type: "filter",
          expr: `isValid(datum["${this.geojson}"])`
        }
      ] : [],
      {
        type: "geojson",
        ...this.fields ? { fields: this.fields } : {},
        ...this.geojson ? { geojson: this.geojson } : {},
        signal: this.signal
      }
    ];
  }
}
class Ww extends Is {
  clone() {
    return new Ww(null, this.projection, ka(this.fields), ka(this.as));
  }
  constructor(t, r, a, v) {
    super(t), this.projection = r, this.fields = a, this.as = v;
  }
  static parseAll(t, r) {
    if (!r.projectionName())
      return t;
    for (const a of [
      [Pp, Lp],
      [Fd, Op]
    ]) {
      const v = a.map((s) => {
        const n = wc(r.encoding[s]);
        return gi(n) ? n.field : K0(n) ? { expr: `${n.datum}` } : wp(n) ? { expr: `${n.value}` } : void 0;
      }), o = a[0] === Fd ? "2" : "";
      (v[0] || v[1]) && (t = new Ww(t, r.projectionName(), v, [
        r.getName(`x${o}`),
        r.getName(`y${o}`)
      ]));
    }
    return t;
  }
  dependentFields() {
    return new Set(this.fields.filter(Fi));
  }
  producedFields() {
    return new Set(this.as);
  }
  hash() {
    return `Geopoint ${this.projection} ${lo(this.fields)} ${lo(this.as)}`;
  }
  assemble() {
    return {
      type: "geopoint",
      projection: this.projection,
      fields: this.fields,
      as: this.as
    };
  }
}
class pv extends Is {
  clone() {
    return new pv(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.impute, this.transform.key, ...this.transform.groupby ?? []]);
  }
  producedFields() {
    return /* @__PURE__ */ new Set([this.transform.impute]);
  }
  processSequence(t) {
    const { start: r = 0, stop: a, step: v } = t;
    return { signal: `sequence(${[r, a, ...v ? [v] : []].join(",")})` };
  }
  static makeFromTransform(t, r) {
    return new pv(t, r);
  }
  static makeFromEncoding(t, r) {
    const a = r.encoding, v = a.x, o = a.y;
    if (gi(v) && gi(o)) {
      const s = v.impute ? v : o.impute ? o : void 0;
      if (s === void 0)
        return;
      const n = v.impute ? o : o.impute ? v : void 0, { method: l, value: u, frame: i, keyvals: h } = s.impute, p = wre(r.mark, a);
      return new pv(t, {
        impute: s.field,
        key: n.field,
        ...l ? { method: l } : {},
        ...u !== void 0 ? { value: u } : {},
        ...i ? { frame: i } : {},
        ...h !== void 0 ? { keyvals: h } : {},
        ...p.length ? { groupby: p } : {}
      });
    }
    return null;
  }
  hash() {
    return `Impute ${lo(this.transform)}`;
  }
  assemble() {
    const { impute: t, key: r, keyvals: a, method: v, groupby: o, value: s, frame: n = [null, null] } = this.transform, l = {
      type: "impute",
      field: t,
      key: r,
      ...a ? { keyvals: hOe(a) ? this.processSequence(a) : a } : {},
      method: "value",
      ...o ? { groupby: o } : {},
      value: !v || v === "value" ? s : null
    };
    if (v && v !== "value") {
      const u = {
        type: "window",
        as: [`imputed_${t}_value`],
        ops: [v],
        fields: [t],
        frame: n,
        ignorePeers: !1,
        ...o ? { groupby: o } : {}
      }, i = {
        type: "formula",
        expr: `datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,
        as: t
      };
      return [l, u, i];
    } else
      return [l];
  }
}
class sA extends Is {
  clone() {
    return new sA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const a = this.transform.as ?? [void 0, void 0];
    this.transform.as = [a[0] ?? r.on, a[1] ?? r.loess];
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.loess, this.transform.on, ...this.transform.groupby ?? []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `LoessTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { loess: t, on: r, ...a } = this.transform;
    return {
      type: "loess",
      x: r,
      y: t,
      ...a
    };
  }
}
class Yw extends Is {
  clone() {
    return new Yw(null, ka(this.transform), this.secondary);
  }
  constructor(t, r, a) {
    super(t), this.transform = r, this.secondary = a;
  }
  static make(t, r, a, v) {
    const o = r.component.data.sources, { from: s } = a;
    let n = null;
    if (dOe(s)) {
      let l = uae(s.data, o);
      l || (l = new Bv(s.data), o.push(l));
      const u = r.getName(`lookup_${v}`);
      n = new Dh(l, u, Du.Lookup, r.component.data.outputNodeRefCounts), r.component.data.outputNodes[u] = n;
    } else if (pOe(s)) {
      const l = s.param;
      a = { as: l, ...a };
      let u;
      try {
        u = r.getSelectionComponent(Gl(l), l);
      } catch {
        throw new Error(jIe(l));
      }
      if (n = u.materialized, !n)
        throw new Error(UIe(l));
    }
    return new Yw(t, a, n.getSource());
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.lookup]);
  }
  producedFields() {
    return new Set(this.transform.as ? Ri(this.transform.as) : this.transform.from.fields);
  }
  hash() {
    return `Lookup ${lo({ transform: this.transform, secondary: this.secondary })}`;
  }
  assemble() {
    let t;
    if (this.transform.from.fields)
      t = {
        values: this.transform.from.fields,
        ...this.transform.as ? { as: Ri(this.transform.as) } : {}
      };
    else {
      let r = this.transform.as;
      Fi(r) || (mi(ZIe), r = "_lookup"), t = {
        as: [r]
      };
    }
    return {
      type: "lookup",
      from: this.secondary,
      key: this.transform.from.key,
      fields: [this.transform.lookup],
      ...t,
      ...this.transform.default ? { default: this.transform.default } : {}
    };
  }
}
class lA extends Is {
  clone() {
    return new lA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const a = this.transform.as ?? [void 0, void 0];
    this.transform.as = [a[0] ?? "prob", a[1] ?? "value"];
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.quantile, ...this.transform.groupby ?? []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `QuantileTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { quantile: t, ...r } = this.transform;
    return {
      type: "quantile",
      field: t,
      ...r
    };
  }
}
class uA extends Is {
  clone() {
    return new uA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r, this.transform = ka(r);
    const a = this.transform.as ?? [void 0, void 0];
    this.transform.as = [a[0] ?? r.on, a[1] ?? r.regression];
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.regression, this.transform.on, ...this.transform.groupby ?? []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `RegressionTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { regression: t, on: r, ...a } = this.transform;
    return {
      type: "regression",
      x: r,
      y: t,
      ...a
    };
  }
}
class cA extends Is {
  clone() {
    return new cA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r;
  }
  addDimensions(t) {
    this.transform.groupby = d0((this.transform.groupby ?? []).concat(t), (r) => r);
  }
  producedFields() {
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.pivot, this.transform.value, ...this.transform.groupby ?? []]);
  }
  hash() {
    return `PivotTransform ${lo(this.transform)}`;
  }
  assemble() {
    const { pivot: t, value: r, groupby: a, limit: v, op: o } = this.transform;
    return {
      type: "pivot",
      field: t,
      value: r,
      ...v !== void 0 ? { limit: v } : {},
      ...o !== void 0 ? { op: o } : {},
      ...a !== void 0 ? { groupby: a } : {}
    };
  }
}
class fA extends Is {
  clone() {
    return new fA(null, ka(this.transform));
  }
  constructor(t, r) {
    super(t), this.transform = r;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `SampleTransform ${lo(this.transform)}`;
  }
  assemble() {
    return {
      type: "sample",
      size: this.transform.sample
    };
  }
}
function sae(e) {
  let t = 0;
  function r(a, v) {
    if (a instanceof Bv && !a.isGenerator && !ob(a.data) && (e.push(v), v = {
      name: null,
      source: v.name,
      transform: []
    }), a instanceof Rf && (a.parent instanceof Bv && !v.source ? (v.format = {
      ...v.format,
      parse: a.assembleFormatParse()
    }, v.transform.push(...a.assembleTransforms(!0))) : v.transform.push(...a.assembleTransforms())), a instanceof jb) {
      v.name || (v.name = `data_${t++}`), !v.source || v.transform.length > 0 ? (e.push(v), a.data = v.name) : a.data = v.source, e.push(...a.assemble());
      return;
    }
    switch ((a instanceof Z4 || a instanceof X4 || a instanceof fb || a instanceof Bb || a instanceof lb || a instanceof Ww || a instanceof pp || a instanceof Yw || a instanceof Ub || a instanceof i2 || a instanceof oA || a instanceof aA || a instanceof rA || a instanceof sA || a instanceof lA || a instanceof uA || a instanceof Og || a instanceof fA || a instanceof cA || a instanceof iA) && v.transform.push(a.assemble()), (a instanceof w0 || a instanceof _0 || a instanceof pv || a instanceof jm || a instanceof Ax) && v.transform.push(...a.assemble()), a instanceof Dh && (v.source && v.transform.length === 0 ? a.setSource(v.source) : a.parent instanceof Dh ? a.setSource(v.name) : (v.name || (v.name = `data_${t++}`), a.setSource(v.name), a.numChildren() === 1 && (e.push(v), v = {
      name: null,
      source: v.name,
      transform: []
    }))), a.numChildren()) {
      case 0:
        a instanceof Dh && (!v.source || v.transform.length > 0) && e.push(v);
        break;
      case 1:
        r(a.children[0], v);
        break;
      default: {
        v.name || (v.name = `data_${t++}`);
        let o = v.name;
        !v.source || v.transform.length > 0 ? e.push(v) : o = v.source;
        for (const s of a.children)
          r(s, {
            name: null,
            source: o,
            transform: []
          });
        break;
      }
    }
  }
  return r;
}
function AFe(e) {
  const t = [], r = sae(t);
  for (const a of e.children)
    r(a, {
      source: e.name,
      name: null,
      transform: []
    });
  return t;
}
function SFe(e, t) {
  const r = [], a = sae(r);
  let v = 0;
  for (const s of e.sources) {
    s.hasName() || (s.dataName = `source_${v++}`);
    const n = s.assemble();
    a(s, n);
  }
  for (const s of r)
    s.transform.length === 0 && delete s.transform;
  let o = 0;
  for (const [s, n] of r.entries())
    (n.transform ?? []).length === 0 && !n.source && r.splice(o++, 0, r.splice(s, 1)[0]);
  for (const s of r)
    for (const n of s.transform ?? [])
      n.type === "lookup" && (n.from = e.outputNodes[n.from].getSource());
  for (const s of r)
    s.name in t && (s.values = t[s.name]);
  return r;
}
function MFe(e) {
  return e === "top" || e === "left" || Ji(e) ? "header" : "footer";
}
function EFe(e) {
  for (const t of Sd)
    CFe(e, t);
  Q$(e, "x"), Q$(e, "y");
}
function CFe(e, t) {
  var s;
  const { facet: r, config: a, child: v, component: o } = e;
  if (e.channelHasField(t)) {
    const n = r[t], l = cb("title", null, a, t);
    let u = kx(n, a, {
      allowDisabling: !0,
      includeDefault: l === void 0 || !!l
    });
    v.component.layoutHeaders[t].title && (u = Qr(u) ? u.join(", ") : u, u += ` / ${v.component.layoutHeaders[t].title}`, v.component.layoutHeaders[t].title = null);
    const i = cb("labelOrient", n.header, a, t), h = n.header !== null ? Wu((s = n.header) == null ? void 0 : s.labels, a.header.labels, !0) : !1, p = ro(["bottom", "right"], i) ? "footer" : "header";
    o.layoutHeaders[t] = {
      title: n.header !== null ? u : null,
      facetFieldDef: n,
      [p]: t === "facet" ? [] : [lae(e, t, h)]
    };
  }
}
function lae(e, t, r) {
  const a = t === "row" ? "height" : "width";
  return {
    labels: r,
    sizeSignal: e.child.component.layoutSize.get(a) ? e.child.getSizeSignalRef(a) : void 0,
    axes: []
  };
}
function Q$(e, t) {
  const { child: r } = e;
  if (r.component.axes[t]) {
    const { layoutHeaders: a, resolve: v } = e.component;
    if (v.axis[t] = CR(v, t), v.axis[t] === "shared") {
      const o = t === "x" ? "column" : "row", s = a[o];
      for (const n of r.component.axes[t]) {
        const l = MFe(n.get("orient"));
        s[l] ?? (s[l] = [lae(e, o, !1)]);
        const u = z3(n, "main", e.config, { header: !0 });
        u && s[l][0].axes.push(u), n.mainExtracted = !0;
      }
    }
  }
}
function IFe(e) {
  FR(e), Rk(e, "width"), Rk(e, "height");
}
function DFe(e) {
  FR(e);
  const t = e.layout.columns === 1 ? "width" : "childWidth", r = e.layout.columns === void 0 ? "height" : "childHeight";
  Rk(e, t), Rk(e, r);
}
function FR(e) {
  for (const t of e.children)
    t.parseLayoutSize();
}
function Rk(e, t) {
  const r = Oie(t), a = CT(r), v = e.component.resolve, o = e.component.layoutSize;
  let s;
  for (const n of e.children) {
    const l = n.component.layoutSize.getWithExplicit(r), u = v.scale[a] ?? Rie(a, e);
    if (u === "independent" && l.value === "step") {
      s = void 0;
      break;
    }
    if (s) {
      if (u === "independent" && s.value !== l.value) {
        s = void 0;
        break;
      }
      s = Dg(s, l, r, "");
    } else
      s = l;
  }
  if (s) {
    for (const n of e.children)
      e.renameSignal(n.getName(r), e.getName(t)), n.component.layoutSize.set(r, "merged", !1);
    o.setWithExplicit(t, s);
  } else
    o.setWithExplicit(t, {
      explicit: !1,
      value: void 0
    });
}
function LFe(e) {
  const { size: t, component: r } = e;
  for (const a of n1) {
    const v = Nh(a);
    if (t[v]) {
      const o = t[v];
      r.layoutSize.set(v, z0(o) ? "step" : o, !0);
    } else {
      const o = PFe(e, v);
      r.layoutSize.set(v, o, !1);
    }
  }
}
function PFe(e, t) {
  const r = t === "width" ? "x" : "y", a = e.config, v = e.getScaleComponent(r);
  if (v) {
    const o = v.get("type"), s = v.get("range");
    if (Kc(o)) {
      const n = Lk(a.view, t);
      return Zg(s) || z0(n) ? "step" : n;
    } else
      return kI(a.view, t);
  } else {
    if (e.hasProjection || e.mark === "arc")
      return kI(a.view, t);
    {
      const o = Lk(a.view, t);
      return z0(o) ? o.step : o;
    }
  }
}
function NI(e, t, r) {
  return Mi(t, { suffix: `by_${Mi(e)}`, ...r });
}
class rw extends oae {
  constructor(t, r, a, v) {
    super(t, "facet", r, a, v, t.resolve), this.child = VR(t.spec, this, this.getName("child"), void 0, v), this.children = [this.child], this.facet = this.initFacet(t.facet);
  }
  initFacet(t) {
    if (!q4(t))
      return { facet: this.initFacetFieldDef(t, "facet") };
    const r = ui(t), a = {};
    for (const v of r) {
      if (![Rm, Fm].includes(v)) {
        mi(LT(v, "facet"));
        break;
      }
      const o = t[v];
      if (o.field === void 0) {
        mi(vI(o, v));
        break;
      }
      a[v] = this.initFacetFieldDef(o, v);
    }
    return a;
  }
  initFacetFieldDef(t, r) {
    const a = sR(t, r);
    return a.header ? a.header = If(a.header) : a.header === null && (a.header = null), a;
  }
  channelHasField(t) {
    return !!this.facet[t];
  }
  fieldDef(t) {
    return this.facet[t];
  }
  parseData() {
    this.component.data = hA(this), this.child.parseData();
  }
  parseLayoutSize() {
    FR(this);
  }
  parseSelections() {
    this.child.parseSelections(), this.component.selection = this.child.component.selection;
  }
  parseMarkGroup() {
    this.child.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    this.child.parseAxesAndHeaders(), EFe(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return this.child.assembleSelectionTopLevelSignals(t);
  }
  assembleSignals() {
    return this.child.assembleSignals(), [];
  }
  assembleSelectionData(t) {
    return this.child.assembleSelectionData(t);
  }
  getHeaderLayoutMixins() {
    const t = {};
    for (const r of Sd)
      for (const a of MR) {
        const v = this.component.layoutHeaders[r], o = v[a], { facetFieldDef: s } = v;
        if (s) {
          const n = cb("titleOrient", s.header, this.config, r);
          if (["right", "bottom"].includes(n)) {
            const l = eA(r, n);
            t.titleAnchor ?? (t.titleAnchor = {}), t.titleAnchor[l] = "end";
          }
        }
        if (o != null && o[0]) {
          const n = r === "row" ? "height" : "width", l = a === "header" ? "headerBand" : "footerBand";
          r !== "facet" && !this.child.component.layoutSize.get(n) && (t[l] ?? (t[l] = {}), t[l][r] = 0.5), v.title && (t.offset ?? (t.offset = {}), t.offset[r === "row" ? "rowTitle" : "columnTitle"] = 10);
        }
      }
    return t;
  }
  assembleDefaultLayout() {
    const { column: t, row: r } = this.facet, a = t ? this.columnDistinctSignal() : r ? 1 : void 0;
    let v = "all";
    return (!r && this.component.resolve.scale.x === "independent" || !t && this.component.resolve.scale.y === "independent") && (v = "none"), {
      ...this.getHeaderLayoutMixins(),
      ...a ? { columns: a } : {},
      bounds: "full",
      align: v
    };
  }
  assembleLayoutSignals() {
    return this.child.assembleLayoutSignals();
  }
  columnDistinctSignal() {
    if (!(this.parent && this.parent instanceof rw))
      return { signal: `length(data('${this.getName("column_domain")}'))` };
  }
  assembleGroupStyle() {
  }
  assembleGroup(t) {
    return this.parent && this.parent instanceof rw ? {
      ...this.channelHasField("column") ? {
        encode: {
          update: {
            // TODO(https://github.com/vega/vega-lite/issues/2759):
            // Correct the signal for facet of concat of facet_column
            columns: { field: Mi(this.facet.column, { prefix: "distinct" }) }
          }
        }
      } : {},
      ...super.assembleGroup(t)
    } : super.assembleGroup(t);
  }
  /**
   * Aggregate cardinality for calculating size
   */
  getCardinalityAggregateForChild() {
    const t = [], r = [], a = [];
    if (this.child instanceof rw) {
      if (this.child.channelHasField("column")) {
        const v = Mi(this.child.facet.column);
        t.push(v), r.push("distinct"), a.push(`distinct_${v}`);
      }
    } else
      for (const v of n1) {
        const o = this.child.component.scales[v];
        if (o && !o.merged) {
          const s = o.get("type"), n = o.get("range");
          if (Kc(s) && Zg(n)) {
            const l = nA(this.child, v), u = OR(l);
            u ? (t.push(u), r.push("distinct"), a.push(`distinct_${u}`)) : mi(Fz(v));
          }
        }
      }
    return { fields: t, ops: r, as: a };
  }
  assembleFacet() {
    const { name: t, data: r } = this.component.data.facetRoot, { row: a, column: v } = this.facet, { fields: o, ops: s, as: n } = this.getCardinalityAggregateForChild(), l = [];
    for (const i of Sd) {
      const h = this.facet[i];
      if (h) {
        l.push(Mi(h));
        const { bin: p, sort: _ } = h;
        if (hl(p) && l.push(Mi(h, { binSuffix: "end" })), Nm(_)) {
          const { field: d, op: f = BT } = _, c = NI(h, _);
          a && v ? (o.push(c), s.push("max"), n.push(c)) : (o.push(d), s.push(f), n.push(c));
        } else if (Qr(_)) {
          const d = ub(h, i);
          o.push(d), s.push("max"), n.push(d);
        }
      }
    }
    const u = !!a && !!v;
    return {
      name: t,
      data: r,
      groupby: l,
      ...u || o.length > 0 ? {
        aggregate: {
          ...u ? { cross: u } : {},
          ...o.length ? { fields: o, ops: s, as: n } : {}
        }
      } : {}
    };
  }
  facetSortFields(t) {
    const { facet: r } = this, a = r[t];
    return a ? Nm(a.sort) ? [NI(a, a.sort, { expr: "datum" })] : Qr(a.sort) ? [ub(a, t, { expr: "datum" })] : [Mi(a, { expr: "datum" })] : [];
  }
  facetSortOrder(t) {
    const { facet: r } = this, a = r[t];
    if (a) {
      const { sort: v } = a;
      return [(Nm(v) ? v.order : !Qr(v) && v) || "ascending"];
    }
    return [];
  }
  assembleLabelTitle() {
    var v;
    const { facet: t, config: r } = this;
    if (t.facet)
      return DI(t.facet, "facet", r);
    const a = {
      row: ["top", "bottom"],
      column: ["left", "right"]
    };
    for (const o of SR)
      if (t[o]) {
        const s = cb("labelOrient", (v = t[o]) == null ? void 0 : v.header, r, o);
        if (a[o].includes(s))
          return DI(t[o], o, r);
      }
  }
  assembleMarks() {
    const { child: t } = this, r = this.component.data.facetRoot, a = AFe(r), v = t.assembleGroupEncodeEntry(!1), o = this.assembleLabelTitle() || t.assembleTitle(), s = t.assembleGroupStyle();
    return [{
      name: this.getName("cell"),
      type: "group",
      ...o ? { title: o } : {},
      ...s ? { style: s } : {},
      from: {
        facet: this.assembleFacet()
      },
      // TODO: move this to after data
      sort: {
        field: Sd.map((l) => this.facetSortFields(l)).flat(),
        order: Sd.map((l) => this.facetSortOrder(l)).flat()
      },
      ...a.length > 0 ? { data: a } : {},
      ...v ? { encode: { update: v } } : {},
      ...t.assembleGroup(HOe(this, []))
    }];
  }
  getMapping() {
    return this.facet;
  }
}
function OFe(e, t) {
  const { row: r, column: a } = t;
  if (r && a) {
    let v = null;
    for (const o of [r, a])
      if (Nm(o.sort)) {
        const { field: s, op: n = BT } = o.sort;
        e = v = new i2(e, {
          joinaggregate: [
            {
              op: n,
              field: s,
              as: NI(o, o.sort, { forAs: !0 })
            }
          ],
          groupby: [Mi(o)]
        });
      }
    return v;
  }
  return null;
}
function uae(e, t) {
  var r, a, v, o;
  for (const s of t) {
    const n = s.data;
    if (e.name && s.hasName() && e.name !== s.dataName)
      continue;
    const l = (r = e.format) == null ? void 0 : r.mesh, u = (a = n.format) == null ? void 0 : a.feature;
    if (l && u)
      continue;
    const i = (v = e.format) == null ? void 0 : v.feature;
    if ((i || u) && i !== u)
      continue;
    const h = (o = n.format) == null ? void 0 : o.mesh;
    if (!((l || h) && l !== h)) {
      if (Gw(e) && Gw(n)) {
        if (Qh(e.values, n.values))
          return s;
      } else if (ob(e) && ob(n)) {
        if (e.url === n.url)
          return s;
      } else if (Jre(e) && e.name === s.dataName)
        return s;
    }
  }
  return null;
}
function zFe(e, t) {
  if (e.data || !e.parent) {
    if (e.data === null) {
      const a = new Bv({ values: [] });
      return t.push(a), a;
    }
    const r = uae(e.data, t);
    if (r)
      return hg(e.data) || (r.data.format = Gte({}, e.data.format, r.data.format)), !r.hasName() && e.data.name && (r.dataName = e.data.name), r;
    {
      const a = new Bv(e.data);
      return t.push(a), a;
    }
  } else
    return e.parent.component.data.facetRoot ? e.parent.component.data.facetRoot : e.parent.component.data.main;
}
function RFe(e, t, r) {
  let a = 0;
  for (const v of t.transforms) {
    let o, s;
    if (TOe(v))
      s = e = new lb(e, v), o = "derived";
    else if (xR(v)) {
      const n = SRe(v);
      s = e = Rf.makeWithAncestors(e, {}, n, r) ?? e, e = new Bb(e, t, v.filter);
    } else if (Wre(v))
      s = e = w0.makeFromTransform(e, v, t), o = "number";
    else if (SOe(v))
      o = "date", r.getWithExplicit(v.field).value === void 0 && (e = new Rf(e, { [v.field]: o }), r.set(v.field, o, !1)), s = e = _0.makeFromTransform(e, v);
    else if (MOe(v))
      s = e = pp.makeFromTransform(e, v), o = "number", AR(t) && (e = new Og(e));
    else if (Gre(v))
      s = e = Yw.make(e, t, v, a++), o = "derived";
    else if (_Oe(v))
      s = e = new Ub(e, v), o = "number";
    else if (wOe(v))
      s = e = new i2(e, v), o = "number";
    else if (EOe(v))
      s = e = jm.makeFromTransform(e, v), o = "derived";
    else if (COe(v))
      s = e = new oA(e, v), o = "derived";
    else if (IOe(v))
      s = e = new iA(e, v), o = "derived";
    else if (kOe(v))
      s = e = new aA(e, v), o = "derived";
    else if (mOe(v))
      s = e = new cA(e, v), o = "derived";
    else if (bOe(v))
      e = new fA(e, v);
    else if (AOe(v))
      s = e = pv.makeFromTransform(e, v), o = "derived";
    else if (gOe(v))
      s = e = new rA(e, v), o = "derived";
    else if (yOe(v))
      s = e = new lA(e, v), o = "derived";
    else if (vOe(v))
      s = e = new uA(e, v), o = "derived";
    else if (xOe(v))
      s = e = new sA(e, v), o = "derived";
    else {
      mi(YIe(v));
      continue;
    }
    if (s && o !== void 0)
      for (const n of s.producedFields() ?? [])
        r.set(n, o, !1);
  }
  return e;
}
function hA(e) {
  var c;
  let t = zFe(e, e.component.data.sources);
  const { outputNodes: r, outputNodeRefCounts: a } = e.component.data, v = e.data, s = !(v && (hg(v) || ob(v) || Gw(v))) && e.parent ? e.parent.component.data.ancestorParse.clone() : new VOe();
  hg(v) ? (Qre(v) ? t = new X4(t, v.sequence) : bR(v) && (t = new Z4(t, v.graticule)), s.parseNothing = !0) : ((c = v == null ? void 0 : v.format) == null ? void 0 : c.parse) === null && (s.parseNothing = !0), t = Rf.makeExplicit(t, e, s) ?? t, t = new Og(t);
  const n = e.parent && Vb(e.parent);
  (pu(e) || rd(e)) && n && (t = w0.makeFromEncoding(t, e) ?? t), e.transforms.length > 0 && (t = RFe(t, e, s));
  const l = ERe(e), u = MRe(e);
  t = Rf.makeWithAncestors(t, {}, { ...l, ...u }, s) ?? t, pu(e) && (t = Ax.parseAll(t, e), t = Ww.parseAll(t, e)), (pu(e) || rd(e)) && (n || (t = w0.makeFromEncoding(t, e) ?? t), t = _0.makeFromEncoding(t, e) ?? t, t = lb.parseAllForSortIndex(t, e));
  const i = t = $6(Du.Raw, e, t);
  if (pu(e)) {
    const g = pp.makeFromEncoding(t, e);
    g && (t = g, AR(e) && (t = new Og(t))), t = pv.makeFromEncoding(t, e) ?? t, t = jm.makeFromEncoding(t, e) ?? t;
  }
  let h, p;
  if (pu(e)) {
    const { markDef: g, mark: m, config: x } = e, w = Cs("invalid", g, x), { marks: k, scales: S } = p = tie({
      invalid: w,
      isPath: Xg(m)
    });
    k !== S && S === "include-invalid-values" && (h = t = $6(Du.PreFilterInvalid, e, t)), k === "exclude-invalid-values" && (t = fb.make(t, e, p) ?? t);
  }
  const _ = t = $6(Du.Main, e, t);
  let d;
  if (pu(e) && p) {
    const { marks: g, scales: m } = p;
    g === "include-invalid-values" && m === "exclude-invalid-values" && (t = fb.make(t, e, p) ?? t, d = t = $6(Du.PostFilterInvalid, e, t));
  }
  pu(e) && kze(e, _);
  let f = null;
  if (rd(e)) {
    const g = e.getName("facet");
    t = OFe(t, e.facet) ?? t, f = new jb(t, e, g, _.getSource()), r[g] = f;
  }
  return {
    ...e.component.data,
    outputNodes: r,
    outputNodeRefCounts: a,
    raw: i,
    main: _,
    facetRoot: f,
    ancestorParse: s,
    preFilterInvalid: h,
    postFilterInvalid: d
  };
}
function $6(e, t, r) {
  const { outputNodes: a, outputNodeRefCounts: v } = t.component.data, o = t.getDataName(e), s = new Dh(r, o, e, v);
  return a[o] = s, s;
}
class FFe extends RR {
  constructor(t, r, a, v) {
    var o, s, n, l;
    super(t, "concat", r, a, v, t.resolve), (((s = (o = t.resolve) == null ? void 0 : o.axis) == null ? void 0 : s.x) === "shared" || ((l = (n = t.resolve) == null ? void 0 : n.axis) == null ? void 0 : l.y) === "shared") && mi(HIe), this.children = this.getChildren(t).map((u, i) => VR(u, this, this.getName(`concat_${i}`), void 0, v));
  }
  parseData() {
    this.component.data = hA(this);
    for (const t of this.children)
      t.parseData();
  }
  parseSelections() {
    this.component.selection = {};
    for (const t of this.children) {
      t.parseSelections();
      for (const r of ui(t.component.selection))
        this.component.selection[r] = t.component.selection[r];
    }
  }
  parseMarkGroup() {
    for (const t of this.children)
      t.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    for (const t of this.children)
      t.parseAxesAndHeaders();
  }
  getChildren(t) {
    return WT(t) ? t.vconcat : yR(t) ? t.hconcat : t.concat;
  }
  parseLayoutSize() {
    DFe(this);
  }
  parseAxisGroup() {
    return null;
  }
  assembleSelectionTopLevelSignals(t) {
    return this.children.reduce((r, a) => a.assembleSelectionTopLevelSignals(r), t);
  }
  assembleSignals() {
    return this.children.forEach((t) => t.assembleSignals()), [];
  }
  assembleLayoutSignals() {
    const t = ER(this);
    for (const r of this.children)
      t.push(...r.assembleLayoutSignals());
    return t;
  }
  assembleSelectionData(t) {
    return this.children.reduce((r, a) => a.assembleSelectionData(r), t);
  }
  assembleMarks() {
    return this.children.map((t) => {
      const r = t.assembleTitle(), a = t.assembleGroupStyle(), v = t.assembleGroupEncodeEntry(!1);
      return {
        type: "group",
        name: t.getName("group"),
        ...r ? { title: r } : {},
        ...a ? { style: a } : {},
        ...v ? { encode: { update: v } } : {},
        ...t.assembleGroup()
      };
    });
  }
  assembleGroupStyle() {
  }
  assembleDefaultLayout() {
    const t = this.layout.columns;
    return {
      ...t != null ? { columns: t } : {},
      bounds: "full",
      // Use align each so it can work with multiple plots with different size
      align: "each"
    };
  }
}
function NFe(e) {
  return e === !1 || e === null;
}
const BFe = {
  disable: 1,
  gridScale: 1,
  scale: 1,
  ...gre,
  labelExpr: 1,
  encode: 1
}, cae = ui(BFe);
class NR extends i1 {
  constructor(t = {}, r = {}, a = !1) {
    super(), this.explicit = t, this.implicit = r, this.mainExtracted = a;
  }
  clone() {
    return new NR(ka(this.explicit), ka(this.implicit), this.mainExtracted);
  }
  hasAxisPart(t) {
    return t === "axis" ? !0 : t === "grid" || t === "title" ? !!this.get(t) : !NFe(this.get(t));
  }
  hasOrientSignalRef() {
    return Ji(this.explicit.orient);
  }
}
function jFe(e, t, r) {
  const { encoding: a, config: v } = e, o = wc(a[t]) ?? wc(a[Z0(t)]), s = e.axis(t) || {}, { format: n, formatType: l } = s;
  if (Rv(l))
    return {
      text: cp({
        fieldOrDatumDef: o,
        field: "datum.value",
        format: n,
        formatType: l,
        config: v
      }),
      ...r
    };
  if (n === void 0 && l === void 0 && v.customFormatTypes) {
    if (rb(o) === "quantitative") {
      if (ib(o) && o.stack === "normalize" && v.normalizedNumberFormatType)
        return {
          text: cp({
            fieldOrDatumDef: o,
            field: "datum.value",
            format: v.normalizedNumberFormat,
            formatType: v.normalizedNumberFormatType,
            config: v
          }),
          ...r
        };
      if (v.numberFormatType)
        return {
          text: cp({
            fieldOrDatumDef: o,
            field: "datum.value",
            format: v.numberFormat,
            formatType: v.numberFormatType,
            config: v
          }),
          ...r
        };
    }
    if (rb(o) === "temporal" && v.timeFormatType && gi(o) && !o.timeUnit)
      return {
        text: cp({
          fieldOrDatumDef: o,
          field: "datum.value",
          format: v.timeFormat,
          formatType: v.timeFormatType,
          config: v
        }),
        ...r
      };
  }
  return r;
}
function UFe(e) {
  return n1.reduce((t, r) => (e.component.scales[r] && (t[r] = [YFe(r, e)]), t), {});
}
const VFe = {
  bottom: "top",
  top: "bottom",
  left: "right",
  right: "left"
};
function $Fe(e) {
  const { axes: t, resolve: r } = e.component, a = { top: 0, bottom: 0, right: 0, left: 0 };
  for (const v of e.children) {
    v.parseAxesAndHeaders();
    for (const o of ui(v.component.axes))
      r.axis[o] = CR(e.component.resolve, o), r.axis[o] === "shared" && (t[o] = qFe(t[o], v.component.axes[o]), t[o] || (r.axis[o] = "independent", delete t[o]));
  }
  for (const v of n1) {
    for (const o of e.children)
      if (o.component.axes[v]) {
        if (r.axis[v] === "independent") {
          t[v] = (t[v] ?? []).concat(o.component.axes[v]);
          for (const s of o.component.axes[v]) {
            const { value: n, explicit: l } = s.getWithExplicit("orient");
            if (!Ji(n)) {
              if (a[n] > 0 && !l) {
                const u = VFe[n];
                a[n] > a[u] && s.set("orient", u, !1);
              }
              a[n]++;
            }
          }
        }
        delete o.component.axes[v];
      }
    if (r.axis[v] === "independent" && t[v] && t[v].length > 1)
      for (const [o, s] of (t[v] || []).entries())
        o > 0 && s.get("grid") && !s.explicit.grid && (s.implicit.grid = !1);
  }
}
function qFe(e, t) {
  if (e) {
    if (e.length !== t.length)
      return;
    const r = e.length;
    for (let a = 0; a < r; a++) {
      const v = e[a], o = t[a];
      if (!!v != !!o)
        return;
      if (v && o) {
        const s = v.getWithExplicit("orient"), n = o.getWithExplicit("orient");
        if (s.explicit && n.explicit && s.value !== n.value)
          return;
        e[a] = HFe(v, o);
      }
    }
  } else
    return t.map((r) => r.clone());
  return e;
}
function HFe(e, t) {
  for (const r of cae) {
    const a = Dg(
      e.getWithExplicit(r),
      t.getWithExplicit(r),
      r,
      "axis",
      // Tie breaker function
      (v, o) => {
        switch (r) {
          case "title":
            return xne(v, o);
          case "gridScale":
            return {
              explicit: v.explicit,
              // keep the old explicit
              value: Wu(v.value, o.value)
            };
        }
        return ZT(v, o, r, "axis");
      }
    );
    e.setWithExplicit(r, a);
  }
  return e;
}
function GFe(e, t, r, a, v) {
  if (t === "disable")
    return r !== void 0;
  switch (r = r || {}, t) {
    case "titleAngle":
    case "labelAngle":
      return e === (Ji(r.labelAngle) ? r.labelAngle : qw(r.labelAngle));
    case "values":
      return !!r.values;
    case "encode":
      return !!r.encoding || !!r.labelAngle;
    case "title":
      if (e === Cie(a, v))
        return !0;
  }
  return e === r[t];
}
const WFe = /* @__PURE__ */ new Set([
  "grid",
  // Grid is an exception because we need to set grid = true to generate another grid axis
  "translate",
  // translate has dependent logic for bar's bin position and it's 0.5 by default in Vega. If a config overrides this value, we need to know.
  // the rest are not axis configs in Vega, but are in VL, so we need to set too.
  "format",
  "formatType",
  "orient",
  "labelExpr",
  "tickCount",
  "position",
  "tickMinStep"
]);
function YFe(e, t) {
  var g, m;
  let r = t.axis(e);
  const a = new NR(), v = wc(t.encoding[e]), { mark: o, config: s } = t, n = (r == null ? void 0 : r.orient) || ((g = s[e === "x" ? "axisX" : "axisY"]) == null ? void 0 : g.orient) || ((m = s.axis) == null ? void 0 : m.orient) || Pze(e), l = t.getScaleComponent(e).get("type"), u = Sze(e, l, n, t.config), i = r !== void 0 ? !r : CI("disable", s.style, r == null ? void 0 : r.style, u).configValue;
  if (a.set("disable", i, r !== void 0), i)
    return a;
  r = r || {};
  const h = Ize(v, r, e, s.style, u), p = nre(r.formatType, v, l), _ = tre(v, v.type, r.format, r.formatType, s, !0), d = {
    fieldOrDatumDef: v,
    axis: r,
    channel: e,
    model: t,
    scaleType: l,
    orient: n,
    labelAngle: h,
    format: _,
    formatType: p,
    mark: o,
    config: s
  };
  for (const x of cae) {
    const w = x in N$ ? N$[x](d) : c$(x) ? r[x] : void 0, k = w !== void 0, S = GFe(w, x, r, t, e);
    if (k && S)
      a.set(x, w, S);
    else {
      const { configValue: A = void 0, configFrom: C = void 0 } = c$(x) && x !== "values" ? CI(x, s.style, r.style, u) : {}, D = A !== void 0;
      k && !D ? a.set(x, w, S) : (
        // Cases need implicit values
        // 1. Axis config that aren't available in Vega
        (C !== "vgAxisConfig" || // 2. Certain properties are always included (see `propsToAlwaysIncludeConfig`'s declaration for more details)
        WFe.has(x) && D || // 3. Conditional axis values and signals
        W4(A) || Ji(A)) && a.set(x, A, !1)
      );
    }
  }
  const f = r.encoding ?? {}, c = mre.reduce((x, w) => {
    if (!a.hasAxisPart(w))
      return x;
    const k = zie(f[w] ?? {}, t), S = w === "labels" ? jFe(t, e, k) : k;
    return S !== void 0 && !Rs(S) && (x[w] = { update: S }), x;
  }, {});
  return Rs(c) || a.set("encode", c, !!r.encoding || r.labelAngle !== void 0), a;
}
function ZFe({ encoding: e, size: t }) {
  for (const r of n1) {
    const a = Nh(r);
    z0(t[a]) && og(e[r]) && (delete t[a], mi(Tne(a)));
  }
  return t;
}
const XFe = {
  vgMark: "arc",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      size: "ignore",
      orient: "ignore",
      theta: "ignore"
    }),
    ...zf("x", e, { defaultPos: "mid" }),
    ...zf("y", e, { defaultPos: "mid" }),
    // arcs are rectangles in polar coordinates
    ...Lg(e, "radius"),
    ...Lg(e, "theta")
  })
}, KFe = {
  vgMark: "area",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      orient: "include",
      size: "ignore",
      theta: "ignore"
    }),
    ...Pk("x", e, {
      defaultPos: "zeroOrMin",
      defaultPos2: "zeroOrMin",
      range: e.markDef.orient === "horizontal"
    }),
    ...Pk("y", e, {
      defaultPos: "zeroOrMin",
      defaultPos2: "zeroOrMin",
      range: e.markDef.orient === "vertical"
    }),
    ...TR(e)
  })
}, JFe = {
  vgMark: "rect",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      orient: "ignore",
      size: "ignore",
      theta: "ignore"
    }),
    ...Lg(e, "x"),
    ...Lg(e, "y")
  })
}, QFe = {
  vgMark: "shape",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      size: "ignore",
      orient: "ignore",
      theta: "ignore"
    })
  }),
  postEncodingTransform: (e) => {
    const { encoding: t } = e, r = t.shape;
    return [{
      type: "geoshape",
      projection: e.projectionName(),
      // as: 'shape',
      ...r && gi(r) && r.type === Fb ? { field: Mi(r, { expr: "datum" }) } : {}
    }];
  }
}, eNe = {
  vgMark: "image",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "ignore",
      orient: "ignore",
      size: "ignore",
      theta: "ignore"
    }),
    ...Lg(e, "x"),
    ...Lg(e, "y"),
    ...wR(e, "url")
  })
}, tNe = {
  vgMark: "line",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      size: "ignore",
      orient: "ignore",
      theta: "ignore"
    }),
    ...zf("x", e, { defaultPos: "mid" }),
    ...zf("y", e, { defaultPos: "mid" }),
    ...$c("size", e, {
      vgChannel: "strokeWidth"
      // VL's line size is strokeWidth
    }),
    ...TR(e)
  })
}, nNe = {
  vgMark: "trail",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      size: "include",
      orient: "ignore",
      theta: "ignore"
    }),
    ...zf("x", e, { defaultPos: "mid" }),
    ...zf("y", e, { defaultPos: "mid" }),
    ...$c("size", e),
    ...TR(e)
  })
};
function BR(e, t) {
  const { config: r } = e;
  return {
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      size: "include",
      orient: "ignore",
      theta: "ignore"
    }),
    ...zf("x", e, { defaultPos: "mid" }),
    ...zf("y", e, { defaultPos: "mid" }),
    ...$c("size", e),
    ...$c("angle", e),
    ...rNe(e, r, t)
  };
}
function rNe(e, t, r) {
  return r ? { shape: { value: r } } : $c("shape", e);
}
const iNe = {
  vgMark: "symbol",
  encodeEntry: (e) => BR(e)
}, aNe = {
  vgMark: "symbol",
  encodeEntry: (e) => BR(e, "circle")
}, oNe = {
  vgMark: "symbol",
  encodeEntry: (e) => BR(e, "square")
}, sNe = {
  vgMark: "rect",
  encodeEntry: (e) => ({
    ...jd(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      orient: "ignore",
      size: "ignore",
      theta: "ignore"
    }),
    ...Lg(e, "x"),
    ...Lg(e, "y")
  })
}, lNe = {
  vgMark: "rule",
  encodeEntry: (e) => {
    const { markDef: t } = e, r = t.orient;
    return !e.encoding.x && !e.encoding.y && !e.encoding.latitude && !e.encoding.longitude ? {} : {
      ...jd(e, {
        align: "ignore",
        baseline: "ignore",
        color: "include",
        orient: "ignore",
        size: "ignore",
        theta: "ignore"
      }),
      ...Pk("x", e, {
        defaultPos: r === "horizontal" ? "zeroOrMax" : "mid",
        defaultPos2: "zeroOrMin",
        range: r !== "vertical"
        // include x2 for horizontal or line segment rule
      }),
      ...Pk("y", e, {
        defaultPos: r === "vertical" ? "zeroOrMax" : "mid",
        defaultPos2: "zeroOrMin",
        range: r !== "horizontal"
        // include y2 for vertical or line segment rule
      }),
      ...$c("size", e, {
        vgChannel: "strokeWidth"
        // VL's rule size is strokeWidth
      })
    };
  }
}, uNe = {
  vgMark: "text",
  encodeEntry: (e) => {
    const { config: t, encoding: r } = e;
    return {
      ...jd(e, {
        align: "include",
        baseline: "include",
        color: "include",
        size: "ignore",
        orient: "ignore",
        theta: "include"
      }),
      ...zf("x", e, { defaultPos: "mid" }),
      ...zf("y", e, { defaultPos: "mid" }),
      ...wR(e),
      ...$c("size", e, {
        vgChannel: "fontSize"
        // VL's text size is fontSize
      }),
      ...$c("angle", e),
      ...O$("align", cNe(e.markDef, r, t)),
      ...O$("baseline", fNe(e.markDef, r, t)),
      ...zf("radius", e, { defaultPos: null }),
      ...zf("theta", e, { defaultPos: null })
    };
  }
};
function cNe(e, t, r) {
  if (Cs("align", e, r) === void 0)
    return "center";
}
function fNe(e, t, r) {
  if (Cs("baseline", e, r) === void 0)
    return "middle";
}
const hNe = {
  vgMark: "rect",
  encodeEntry: (e) => {
    const { config: t, markDef: r } = e, a = r.orient, v = a === "horizontal" ? "width" : "height", o = a === "horizontal" ? "height" : "width";
    return {
      ...jd(e, {
        align: "ignore",
        baseline: "ignore",
        color: "include",
        orient: "ignore",
        size: "ignore",
        theta: "ignore"
      }),
      ...zf("x", e, { defaultPos: "mid", vgChannel: "xc" }),
      ...zf("y", e, { defaultPos: "mid", vgChannel: "yc" }),
      // size / thickness => width / height
      ...$c("size", e, {
        defaultValue: dNe(e),
        vgChannel: v
      }),
      [o]: Al(Cs("thickness", r, t))
    };
  }
};
function dNe(e) {
  const { config: t, markDef: r } = e, { orient: a } = r, v = a === "horizontal" ? "width" : "height", o = e.getScaleComponent(a === "horizontal" ? "x" : "y"), s = Cs("size", r, t, { vgChannel: v }) ?? t.tick.bandSize;
  if (s !== void 0)
    return s;
  {
    const n = o ? o.get("range") : void 0;
    return n && Zg(n) && Ro(n.step) ? n.step * 3 / 4 : Dk(t.view, v) * 3 / 4;
  }
}
const q6 = {
  arc: XFe,
  area: KFe,
  bar: JFe,
  circle: aNe,
  geoshape: QFe,
  image: eNe,
  line: tNe,
  point: iNe,
  rect: sNe,
  rule: lNe,
  square: oNe,
  text: uNe,
  tick: hNe,
  trail: nNe
};
function pNe(e) {
  if (ro([FT, zT, _Le], e.mark)) {
    const t = wre(e.mark, e.encoding);
    if (t.length > 0)
      return mNe(e, t);
  } else if (e.mark === RT) {
    const t = yI.some((r) => Cs(r, e.markDef, e.config));
    if (e.stack && !e.fieldDef("size") && t)
      return gNe(e);
  }
  return jR(e);
}
const eq = "faceted_path_";
function mNe(e, t) {
  return [
    {
      name: e.getName("pathgroup"),
      type: "group",
      from: {
        facet: {
          name: eq + e.requestDataName(Du.Main),
          data: e.requestDataName(Du.Main),
          groupby: t
        }
      },
      encode: {
        update: {
          width: { field: { group: "width" } },
          height: { field: { group: "height" } }
        }
      },
      // With subfacet for line/area group, need to use faceted data from above.
      marks: jR(e, { fromPrefix: eq })
    }
  ];
}
const tq = "stack_group_";
function gNe(e) {
  var u;
  const [t] = jR(e, { fromPrefix: tq }), r = e.scaleName(e.stack.fieldChannel), a = (i = {}) => e.vgField(e.stack.fieldChannel, i), v = (i, h) => {
    const p = [
      a({ prefix: "min", suffix: "start", expr: h }),
      a({ prefix: "max", suffix: "start", expr: h }),
      a({ prefix: "min", suffix: "end", expr: h }),
      a({ prefix: "max", suffix: "end", expr: h })
    ];
    return `${i}(${p.map((_) => `scale('${r}',${_})`).join(",")})`;
  };
  let o, s;
  e.stack.fieldChannel === "x" ? (o = {
    ...Xx(t.encode.update, ["y", "yc", "y2", "height", ...yI]),
    x: { signal: v("min", "datum") },
    x2: { signal: v("max", "datum") },
    clip: { value: !0 }
  }, s = {
    x: { field: { group: "x" }, mult: -1 },
    height: { field: { group: "height" } }
  }, t.encode.update = {
    ...Ih(t.encode.update, ["y", "yc", "y2"]),
    height: { field: { group: "height" } }
  }) : (o = {
    ...Xx(t.encode.update, ["x", "xc", "x2", "width"]),
    y: { signal: v("min", "datum") },
    y2: { signal: v("max", "datum") },
    clip: { value: !0 }
  }, s = {
    y: { field: { group: "y" }, mult: -1 },
    width: { field: { group: "width" } }
  }, t.encode.update = {
    ...Ih(t.encode.update, ["x", "xc", "x2"]),
    width: { field: { group: "width" } }
  });
  for (const i of yI) {
    const h = P0(i, e.markDef, e.config);
    t.encode.update[i] ? (o[i] = t.encode.update[i], delete t.encode.update[i]) : h && (o[i] = Al(h)), h && (t.encode.update[i] = { value: 0 });
  }
  const n = [];
  if (((u = e.stack.groupbyChannels) == null ? void 0 : u.length) > 0)
    for (const i of e.stack.groupbyChannels) {
      const h = e.fieldDef(i), p = Mi(h);
      p && n.push(p), (h != null && h.bin || h != null && h.timeUnit) && n.push(Mi(h, { binSuffix: "end" }));
    }
  return o = [
    "stroke",
    "strokeWidth",
    "strokeJoin",
    "strokeCap",
    "strokeDash",
    "strokeDashOffset",
    "strokeMiterLimit",
    "strokeOpacity"
  ].reduce((i, h) => {
    if (t.encode.update[h])
      return { ...i, [h]: t.encode.update[h] };
    {
      const p = P0(h, e.markDef, e.config);
      return p !== void 0 ? { ...i, [h]: Al(p) } : i;
    }
  }, o), o.stroke && (o.strokeForeground = { value: !0 }, o.strokeOffset = { value: 0 }), [
    {
      type: "group",
      from: {
        facet: {
          data: e.requestDataName(Du.Main),
          name: tq + e.requestDataName(Du.Main),
          groupby: n,
          aggregate: {
            fields: [
              a({ suffix: "start" }),
              a({ suffix: "start" }),
              a({ suffix: "end" }),
              a({ suffix: "end" })
            ],
            ops: ["min", "max", "min", "max"]
          }
        }
      },
      encode: {
        update: o
      },
      marks: [
        {
          type: "group",
          encode: { update: s },
          marks: [t]
        }
      ]
    }
  ];
}
function yNe(e) {
  const { encoding: t, stack: r, mark: a, markDef: v, config: o } = e, s = t.order;
  if (!(!Qr(s) && wp(s) && mI(s.value) || !s && mI(Cs("order", v, o)))) {
    if ((Qr(s) || gi(s)) && !r)
      return gne(s, { expr: "datum" });
    if (Xg(a)) {
      const n = v.orient === "horizontal" ? "y" : "x", l = t[n];
      if (gi(l))
        return { field: n };
    }
  }
}
function jR(e, t = { fromPrefix: "" }) {
  const { mark: r, markDef: a, encoding: v, config: o } = e, s = Wu(a.clip, vNe(e), xNe(e)), n = pne(a), l = v.key, u = yNe(e), i = bNe(e), h = Cs("aria", a, o), p = q6[r].postEncodingTransform ? q6[r].postEncodingTransform(e) : null;
  return [
    {
      name: e.getName("marks"),
      type: q6[r].vgMark,
      ...s ? { clip: s } : {},
      ...n ? { style: n } : {},
      ...l ? { key: l.field } : {},
      ...u ? { sort: u } : {},
      ...i || {},
      ...h === !1 ? { aria: h } : {},
      from: { data: t.fromPrefix + e.requestDataName(Du.Main) },
      encode: {
        update: q6[r].encodeEntry(e)
      },
      ...p ? {
        transform: p
      } : {}
    }
  ];
}
function vNe(e) {
  const t = e.getScaleComponent("x"), r = e.getScaleComponent("y");
  return t != null && t.get("selectionExtent") || r != null && r.get("selectionExtent") ? !0 : void 0;
}
function xNe(e) {
  const t = e.component.projection;
  return t && !t.isFit ? !0 : void 0;
}
function bNe(e) {
  if (!e.component.selection)
    return null;
  const t = ui(e.component.selection).length;
  let r = t, a = e.parent;
  for (; a && r === 0; )
    r = ui(a.component.selection).length, a = a.parent;
  return r ? {
    interactive: t > 0 || e.mark === "geoshape" || !!e.encoding.tooltip || !!e.markDef.tooltip
  } : null;
}
class fae extends oae {
  constructor(t, r, a, v = {}, o) {
    super(t, "unit", r, a, o, void 0, h$(t) ? t.view : void 0), this.specifiedScales = {}, this.specifiedAxes = {}, this.specifiedLegends = {}, this.specifiedProjection = {}, this.selection = [], this.children = [];
    const s = O0(t.mark) ? { ...t.mark } : { type: t.mark }, n = s.type;
    s.filled === void 0 && (s.filled = iOe(s, o, {
      graticule: t.data && bR(t.data)
    }));
    const l = this.encoding = lPe(t.encoding || {}, n, s.filled, o);
    this.markDef = $re(s, l, o), this.size = ZFe({
      encoding: l,
      size: h$(t) ? {
        ...v,
        ...t.width ? { width: t.width } : {},
        ...t.height ? { height: t.height } : {}
      } : v
    }), this.stack = Vre(this.markDef, l), this.specifiedScales = this.initScales(n, l), this.specifiedAxes = this.initAxes(l), this.specifiedLegends = this.initLegends(l), this.specifiedProjection = t.projection, this.selection = (t.params ?? []).filter((u) => mR(u));
  }
  get hasProjection() {
    const { encoding: t } = this, r = this.mark === Wne, a = t && iIe.some((v) => La(t[v]));
    return r || a;
  }
  /**
   * Return specified Vega-Lite scale domain for a particular channel
   * @param channel
   */
  scaleDomain(t) {
    const r = this.specifiedScales[t];
    return r ? r.domain : void 0;
  }
  axis(t) {
    return this.specifiedAxes[t];
  }
  legend(t) {
    return this.specifiedLegends[t];
  }
  initScales(t, r) {
    return Oz.reduce((a, v) => {
      const o = wc(r[v]);
      return o && (a[v] = this.initScale(o.scale ?? {})), a;
    }, {});
  }
  initScale(t) {
    const { domain: r, range: a } = t, v = If(t);
    return Qr(r) && (v.domain = r.map(Zh)), Qr(a) && (v.range = a.map(Zh)), v;
  }
  initAxes(t) {
    return n1.reduce((r, a) => {
      const v = t[a];
      if (La(v) || a === Yl && La(t.x2) || a === Qc && La(t.y2)) {
        const o = La(v) ? v.axis : void 0;
        r[a] = o && this.initAxis({ ...o });
      }
      return r;
    }, {});
  }
  initAxis(t) {
    const r = ui(t), a = {};
    for (const v of r) {
      const o = t[v];
      a[v] = W4(o) ? dne(o) : Zh(o);
    }
    return a;
  }
  initLegends(t) {
    return pIe.reduce((r, a) => {
      const v = wc(t[a]);
      if (v && gIe(a)) {
        const o = v.legend;
        r[a] = o && If(o);
      }
      return r;
    }, {});
  }
  parseData() {
    this.component.data = hA(this);
  }
  parseLayoutSize() {
    LFe(this);
  }
  parseSelections() {
    this.component.selection = wze(this, this.selection);
  }
  parseMarkGroup() {
    this.component.mark = pNe(this);
  }
  parseAxesAndHeaders() {
    this.component.axes = UFe(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return GOe(this, t);
  }
  assembleSignals() {
    return [...Sie(this), ...qOe(this, [])];
  }
  assembleSelectionData(t) {
    return WOe(this, t);
  }
  assembleLayout() {
    return null;
  }
  assembleLayoutSignals() {
    return ER(this);
  }
  assembleMarks() {
    let t = this.component.mark ?? [];
    return (!this.parent || !Vb(this.parent)) && (t = rie(this, t)), t.map(this.correctDataNames);
  }
  assembleGroupStyle() {
    const { style: t } = this.view || {};
    return t !== void 0 ? t : this.encoding.x || this.encoding.y ? "cell" : "view";
  }
  getMapping() {
    return this.encoding;
  }
  get mark() {
    return this.markDef.type;
  }
  channelHasField(t) {
    return hv(this.encoding, t);
  }
  fieldDef(t) {
    const r = this.encoding[t];
    return kp(r);
  }
  typedFieldDef(t) {
    const r = this.fieldDef(t);
    return hh(r) ? r : null;
  }
}
class UR extends RR {
  constructor(t, r, a, v, o) {
    super(t, "layer", r, a, o, t.resolve, t.view);
    const s = {
      ...v,
      ...t.width ? { width: t.width } : {},
      ...t.height ? { height: t.height } : {}
    };
    this.children = t.layer.map((n, l) => {
      if (YT(n))
        return new UR(n, this, this.getName(`layer_${l}`), s, o);
      if (r1(n))
        return new fae(n, this, this.getName(`layer_${l}`), s, o);
      throw new Error(Rz(n));
    });
  }
  parseData() {
    this.component.data = hA(this);
    for (const t of this.children)
      t.parseData();
  }
  parseLayoutSize() {
    IFe(this);
  }
  parseSelections() {
    this.component.selection = {};
    for (const t of this.children) {
      t.parseSelections();
      for (const r of ui(t.component.selection))
        this.component.selection[r] = t.component.selection[r];
    }
  }
  parseMarkGroup() {
    for (const t of this.children)
      t.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    $Fe(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return this.children.reduce((r, a) => a.assembleSelectionTopLevelSignals(r), t);
  }
  // TODO: Support same named selections across children.
  assembleSignals() {
    return this.children.reduce((t, r) => t.concat(r.assembleSignals()), Sie(this));
  }
  assembleLayoutSignals() {
    return this.children.reduce((t, r) => t.concat(r.assembleLayoutSignals()), ER(this));
  }
  assembleSelectionData(t) {
    return this.children.reduce((r, a) => a.assembleSelectionData(r), t);
  }
  assembleGroupStyle() {
    const t = /* @__PURE__ */ new Set();
    for (const a of this.children)
      for (const v of Ri(a.assembleGroupStyle()))
        t.add(v);
    const r = Array.from(t);
    return r.length > 1 ? r : r.length === 1 ? r[0] : void 0;
  }
  assembleTitle() {
    let t = super.assembleTitle();
    if (t)
      return t;
    for (const r of this.children)
      if (t = r.assembleTitle(), t)
        return t;
  }
  assembleLayout() {
    return null;
  }
  assembleMarks() {
    return YOe(this, this.children.flatMap((t) => t.assembleMarks()));
  }
  assembleLegends() {
    return this.children.reduce((t, r) => t.concat(r.assembleLegends()), $ie(this));
  }
}
function VR(e, t, r, a, v) {
  if (jT(e))
    return new rw(e, t, r, v);
  if (YT(e))
    return new UR(e, t, r, a, v);
  if (r1(e))
    return new fae(e, t, r, a, v);
  if (LPe(e))
    return new FFe(e, t, r, v);
  throw new Error(Rz(e));
}
function _Ne(e, t = {}) {
  t.logger && zDe(t.logger), t.fieldTitle && hre(t.fieldTitle);
  try {
    const r = Ure(xb(t.config, e.config)), a = Xre(e, r), v = VR(a, null, "", void 0, r);
    return v.parse(), qRe(v.component.data, v), {
      spec: kNe(v, wNe(e, a.autosize, r, v), e.datasets, e.usermeta),
      normalized: a
    };
  } finally {
    t.logger && RDe(), t.fieldTitle && QLe();
  }
}
function wNe(e, t, r, a) {
  const v = a.component.layoutSize.get("width"), o = a.component.layoutSize.get("height");
  if (t === void 0 ? (t = { type: "pad" }, a.hasAxisOrientSignalRef() && (t.resize = !0)) : Fi(t) && (t = { type: t }), v && o && BOe(t.type)) {
    if (v === "step" && o === "step")
      mi(XV()), t.type = "pad";
    else if (v === "step" || o === "step") {
      const s = v === "step" ? "width" : "height";
      mi(XV(CT(s)));
      const n = s === "width" ? "height" : "width";
      t.type = jOe(n);
    }
  }
  return {
    ...ui(t).length === 1 && t.type ? t.type === "pad" ? {} : { autosize: t.type } : { autosize: t },
    ...T$(r, !1),
    ...T$(e, !0)
  };
}
function kNe(e, t, r = {}, a) {
  const v = e.config ? GPe(e.config) : void 0, o = [].concat(
    e.assembleSelectionData([]),
    // only assemble data in the root
    SFe(e.component.data, r)
  ), s = e.assembleProjections(), n = e.assembleTitle(), l = e.assembleGroupStyle(), u = e.assembleGroupEncodeEntry(!0);
  let i = e.assembleLayoutSignals();
  i = i.filter((_) => (_.name === "width" || _.name === "height") && _.value !== void 0 ? (t[_.name] = +_.value, !1) : !0);
  const { params: h, ...p } = t;
  return {
    $schema: "https://vega.github.io/schema/vega/v5.json",
    ...e.description ? { description: e.description } : {},
    ...p,
    ...n ? { title: n } : {},
    ...l ? { style: l } : {},
    ...u ? { encode: { update: u } } : {},
    data: o,
    ...s.length > 0 ? { projections: s } : {},
    ...e.assembleGroup([
      ...i,
      ...e.assembleSelectionTopLevelSignals([]),
      ...Fre(h)
    ]),
    ...v ? { config: v } : {},
    ...a ? { usermeta: a } : {}
  };
}
const TNe = JCe.version, ANe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  accessPathDepth: Jx,
  accessPathWithDatum: Sz,
  compile: _Ne,
  contains: ro,
  deepEqual: Qh,
  deleteNestedProperty: _k,
  duplicate: ka,
  entries: Eg,
  every: kz,
  fieldIntersection: Az,
  flatAccessWithDatum: Yte,
  getFirstDefined: Wu,
  hasIntersection: Tz,
  hash: lo,
  internalField: Kte,
  isBoolean: $w,
  isEmpty: Rs,
  isEqual: eIe,
  isInternalField: Jte,
  isNullOrFalse: mI,
  isNumeric: kT,
  keys: ui,
  logicalExpr: tw,
  mergeDeep: Gte,
  never: Hte,
  normalize: Xre,
  normalizeAngle: qw,
  omit: Ih,
  pick: Xx,
  prefixGenerator: gI,
  removePathFromField: zb,
  replaceAll: Dv,
  replacePathInField: Rd,
  resetIdCounter: nIe,
  setEqual: Wte,
  some: Kx,
  stringify: Fs,
  titleCase: F4,
  unique: d0,
  uniqueId: Xte,
  vals: ff,
  varName: Gl,
  version: TNe
}, Symbol.toStringTag, { value: "Module" }));
function hae(e) {
  const [t, r] = /schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1, 3);
  return { library: t, version: r };
}
var SNe = "vega-themes", MNe = "2.15.0", ENe = "Themes for stylized Vega and Vega-Lite visualizations.", CNe = ["vega", "vega-lite", "themes", "style"], INe = "BSD-3-Clause", DNe = {
  name: "UW Interactive Data Lab",
  url: "https://idl.cs.washington.edu"
}, LNe = [{
  name: "Emily Gu",
  url: "https://github.com/emilygu"
}, {
  name: "Arvind Satyanarayan",
  url: "http://arvindsatya.com"
}, {
  name: "Jeffrey Heer",
  url: "https://idl.cs.washington.edu"
}, {
  name: "Dominik Moritz",
  url: "https://www.domoritz.de"
}], PNe = "build/vega-themes.js", ONe = "build/vega-themes.module.js", zNe = "build/vega-themes.min.js", RNe = "build/vega-themes.min.js", FNe = "build/vega-themes.module.d.ts", NNe = {
  type: "git",
  url: "https://github.com/vega/vega-themes.git"
}, BNe = ["src", "build"], jNe = {
  prebuild: "yarn clean",
  build: "rollup -c",
  clean: "rimraf build && rimraf examples/build",
  "copy:data": "rsync -r node_modules/vega-datasets/data/* examples/data",
  "copy:build": "rsync -r build/* examples/build",
  "deploy:gh": "yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",
  preversion: "yarn lint",
  serve: "browser-sync start -s -f build examples --serveStatic examples",
  start: "yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",
  format: "eslint . --fix",
  lint: "eslint .",
  release: "release-it"
}, UNe = {
  "@babel/core": "^7.24.6",
  "@babel/plugin-transform-runtime": "^7.24.6",
  "@babel/preset-env": "^7.24.6",
  "@babel/preset-typescript": "^7.24.6",
  "@release-it/conventional-changelog": "^8.0.1",
  "@rollup/plugin-json": "^6.1.0",
  "@rollup/plugin-node-resolve": "^15.2.3",
  "@rollup/plugin-terser": "^0.4.4",
  "@typescript-eslint/eslint-plugin": "^7.11.0",
  "@typescript-eslint/parser": "^7.11.0",
  "browser-sync": "^3.0.2",
  concurrently: "^8.2.2",
  eslint: "^8.45.0",
  "eslint-config-prettier": "^9.1.0",
  "eslint-plugin-prettier": "^5.1.3",
  "gh-pages": "^6.1.1",
  prettier: "^3.2.5",
  "release-it": "^17.3.0",
  rollup: "^4.18.0",
  "rollup-plugin-bundle-size": "^1.0.3",
  "rollup-plugin-ts": "^3.4.5",
  typescript: "^5.4.5",
  vega: "^5.25.0",
  "vega-lite": "^5.9.3"
}, VNe = {
  vega: "*",
  "vega-lite": "*"
}, $Ne = {}, qNe = {
  name: SNe,
  version: MNe,
  description: ENe,
  keywords: CNe,
  license: INe,
  author: DNe,
  contributors: LNe,
  main: PNe,
  module: ONe,
  unpkg: zNe,
  jsdelivr: RNe,
  types: FNe,
  repository: NNe,
  files: BNe,
  scripts: jNe,
  devDependencies: UNe,
  peerDependencies: VNe,
  dependencies: $Ne
};
const Z2 = "#fff", nq = "#888", HNe = {
  background: "#333",
  view: {
    stroke: nq
  },
  title: {
    color: Z2,
    subtitleColor: Z2
  },
  style: {
    "guide-label": {
      fill: Z2
    },
    "guide-title": {
      fill: Z2
    }
  },
  axis: {
    domainColor: Z2,
    gridColor: nq,
    tickColor: Z2
  }
}, Ey = "#4572a7", GNe = {
  background: "#fff",
  arc: {
    fill: Ey
  },
  area: {
    fill: Ey
  },
  line: {
    stroke: Ey,
    strokeWidth: 2
  },
  path: {
    stroke: Ey
  },
  rect: {
    fill: Ey
  },
  shape: {
    stroke: Ey
  },
  symbol: {
    fill: Ey,
    strokeWidth: 1.5,
    size: 50
  },
  axis: {
    bandPosition: 0.5,
    grid: !0,
    gridColor: "#000000",
    gridOpacity: 1,
    gridWidth: 0.5,
    labelPadding: 10,
    tickSize: 5,
    tickWidth: 0.5
  },
  axisBand: {
    grid: !1,
    tickExtra: !0
  },
  legend: {
    labelBaseline: "middle",
    labelFontSize: 11,
    symbolSize: 50,
    symbolType: "square"
  },
  range: {
    category: ["#4572a7", "#aa4643", "#8aa453", "#71598e", "#4598ae", "#d98445", "#94aace", "#d09393", "#b9cc98", "#a99cbc"]
  }
}, Cy = "#30a2da", GM = "#cbcbcb", WNe = "#999", YNe = "#333", rq = "#f0f0f0", iq = "#333", ZNe = {
  arc: {
    fill: Cy
  },
  area: {
    fill: Cy
  },
  axis: {
    domainColor: GM,
    grid: !0,
    gridColor: GM,
    gridWidth: 1,
    labelColor: WNe,
    labelFontSize: 10,
    titleColor: YNe,
    tickColor: GM,
    tickSize: 10,
    titleFontSize: 14,
    titlePadding: 10,
    labelPadding: 4
  },
  axisBand: {
    grid: !1
  },
  background: rq,
  group: {
    fill: rq
  },
  legend: {
    labelColor: iq,
    labelFontSize: 11,
    padding: 1,
    symbolSize: 30,
    symbolType: "square",
    titleColor: iq,
    titleFontSize: 14,
    titlePadding: 10
  },
  line: {
    stroke: Cy,
    strokeWidth: 2
  },
  path: {
    stroke: Cy,
    strokeWidth: 0.5
  },
  rect: {
    fill: Cy
  },
  range: {
    category: ["#30a2da", "#fc4f30", "#e5ae38", "#6d904f", "#8b8b8b", "#b96db8", "#ff9e27", "#56cc60", "#52d2ca", "#52689e", "#545454", "#9fe4f8"],
    diverging: ["#cc0020", "#e77866", "#f6e7e1", "#d6e8ed", "#91bfd9", "#1d78b5"],
    heatmap: ["#d6e8ed", "#cee0e5", "#91bfd9", "#549cc6", "#1d78b5"]
  },
  point: {
    filled: !0,
    shape: "circle"
  },
  shape: {
    stroke: Cy
  },
  bar: {
    binSpacing: 2,
    fill: Cy,
    stroke: null
  },
  title: {
    anchor: "start",
    fontSize: 24,
    fontWeight: 600,
    offset: 20
  }
}, Iy = "#000", XNe = {
  group: {
    fill: "#e5e5e5"
  },
  arc: {
    fill: Iy
  },
  area: {
    fill: Iy
  },
  line: {
    stroke: Iy
  },
  path: {
    stroke: Iy
  },
  rect: {
    fill: Iy
  },
  shape: {
    stroke: Iy
  },
  symbol: {
    fill: Iy,
    size: 40
  },
  axis: {
    domain: !1,
    grid: !0,
    gridColor: "#FFFFFF",
    gridOpacity: 1,
    labelColor: "#7F7F7F",
    labelPadding: 4,
    tickColor: "#7F7F7F",
    tickSize: 5.67,
    titleFontSize: 16,
    titleFontWeight: "normal"
  },
  legend: {
    labelBaseline: "middle",
    labelFontSize: 11,
    symbolSize: 40
  },
  range: {
    category: ["#000000", "#7F7F7F", "#1A1A1A", "#999999", "#333333", "#B0B0B0", "#4D4D4D", "#C9C9C9", "#666666", "#DCDCDC"]
  }
}, KNe = 22, JNe = "normal", aq = "Benton Gothic, sans-serif", oq = 11.5, QNe = "normal", Dy = "#82c6df", WM = "Benton Gothic Bold, sans-serif", sq = "normal", lq = 13, s3 = {
  "category-6": ["#ec8431", "#829eb1", "#c89d29", "#3580b1", "#adc839", "#ab7fb4"],
  "fire-7": ["#fbf2c7", "#f9e39c", "#f8d36e", "#f4bb6a", "#e68a4f", "#d15a40", "#ab4232"],
  "fireandice-6": ["#e68a4f", "#f4bb6a", "#f9e39c", "#dadfe2", "#a6b7c6", "#849eae"],
  "ice-7": ["#edefee", "#dadfe2", "#c4ccd2", "#a6b7c6", "#849eae", "#607785", "#47525d"]
}, eBe = {
  background: "#ffffff",
  title: {
    anchor: "start",
    color: "#000000",
    font: WM,
    fontSize: KNe,
    fontWeight: JNe
  },
  arc: {
    fill: Dy
  },
  area: {
    fill: Dy
  },
  line: {
    stroke: Dy,
    strokeWidth: 2
  },
  path: {
    stroke: Dy
  },
  rect: {
    fill: Dy
  },
  shape: {
    stroke: Dy
  },
  symbol: {
    fill: Dy,
    size: 30
  },
  axis: {
    labelFont: aq,
    labelFontSize: oq,
    labelFontWeight: QNe,
    titleFont: WM,
    titleFontSize: lq,
    titleFontWeight: sq
  },
  axisX: {
    labelAngle: 0,
    labelPadding: 4,
    tickSize: 3
  },
  axisY: {
    labelBaseline: "middle",
    maxExtent: 45,
    minExtent: 45,
    tickSize: 2,
    titleAlign: "left",
    titleAngle: 0,
    titleX: -45,
    titleY: -11
  },
  legend: {
    labelFont: aq,
    labelFontSize: oq,
    symbolType: "square",
    titleFont: WM,
    titleFontSize: lq,
    titleFontWeight: sq
  },
  range: {
    category: s3["category-6"],
    diverging: s3["fireandice-6"],
    heatmap: s3["fire-7"],
    ordinal: s3["fire-7"],
    ramp: s3["fire-7"]
  }
}, Ly = "#ab5787", H6 = "#979797", tBe = {
  background: "#f9f9f9",
  arc: {
    fill: Ly
  },
  area: {
    fill: Ly
  },
  line: {
    stroke: Ly
  },
  path: {
    stroke: Ly
  },
  rect: {
    fill: Ly
  },
  shape: {
    stroke: Ly
  },
  symbol: {
    fill: Ly,
    size: 30
  },
  axis: {
    domainColor: H6,
    domainWidth: 0.5,
    gridWidth: 0.2,
    labelColor: H6,
    tickColor: H6,
    tickWidth: 0.2,
    titleColor: H6
  },
  axisBand: {
    grid: !1
  },
  axisX: {
    grid: !0,
    tickSize: 10
  },
  axisY: {
    domain: !1,
    grid: !0,
    tickSize: 0
  },
  legend: {
    labelFontSize: 11,
    padding: 1,
    symbolSize: 30,
    symbolType: "square"
  },
  range: {
    category: ["#ab5787", "#51b2e5", "#703c5c", "#168dd9", "#d190b6", "#00609f", "#d365ba", "#154866", "#666666", "#c4c4c4"]
  }
}, Py = "#3e5c69", nBe = {
  background: "#fff",
  arc: {
    fill: Py
  },
  area: {
    fill: Py
  },
  line: {
    stroke: Py
  },
  path: {
    stroke: Py
  },
  rect: {
    fill: Py
  },
  shape: {
    stroke: Py
  },
  symbol: {
    fill: Py
  },
  axis: {
    domainWidth: 0.5,
    grid: !0,
    labelPadding: 2,
    tickSize: 5,
    tickWidth: 0.5,
    titleFontWeight: "normal"
  },
  axisBand: {
    grid: !1
  },
  axisX: {
    gridWidth: 0.2
  },
  axisY: {
    gridDash: [3],
    gridWidth: 0.4
  },
  legend: {
    labelFontSize: 11,
    padding: 1,
    symbolType: "square"
  },
  range: {
    category: ["#3e5c69", "#6793a6", "#182429", "#0570b0", "#3690c0", "#74a9cf", "#a6bddb", "#e2ddf2"]
  }
}, vd = "#1696d2", uq = "#000000", rBe = "#FFFFFF", G6 = "Lato", YM = "Lato", iBe = "Lato", aBe = "#DEDDDD", oBe = 18, l3 = {
  "main-colors": ["#1696d2", "#d2d2d2", "#000000", "#fdbf11", "#ec008b", "#55b748", "#5c5859", "#db2b27"],
  "shades-blue": ["#CFE8F3", "#A2D4EC", "#73BFE2", "#46ABDB", "#1696D2", "#12719E", "#0A4C6A", "#062635"],
  "shades-gray": ["#F5F5F5", "#ECECEC", "#E3E3E3", "#DCDBDB", "#D2D2D2", "#9D9D9D", "#696969", "#353535"],
  "shades-yellow": ["#FFF2CF", "#FCE39E", "#FDD870", "#FCCB41", "#FDBF11", "#E88E2D", "#CA5800", "#843215"],
  "shades-magenta": ["#F5CBDF", "#EB99C2", "#E46AA7", "#E54096", "#EC008B", "#AF1F6B", "#761548", "#351123"],
  "shades-green": ["#DCEDD9", "#BCDEB4", "#98CF90", "#78C26D", "#55B748", "#408941", "#2C5C2D", "#1A2E19"],
  "shades-black": ["#D5D5D4", "#ADABAC", "#848081", "#5C5859", "#332D2F", "#262223", "#1A1717", "#0E0C0D"],
  "shades-red": ["#F8D5D4", "#F1AAA9", "#E9807D", "#E25552", "#DB2B27", "#A4201D", "#6E1614", "#370B0A"],
  "one-group": ["#1696d2", "#000000"],
  "two-groups-cat-1": ["#1696d2", "#000000"],
  "two-groups-cat-2": ["#1696d2", "#fdbf11"],
  "two-groups-cat-3": ["#1696d2", "#db2b27"],
  "two-groups-seq": ["#a2d4ec", "#1696d2"],
  "three-groups-cat": ["#1696d2", "#fdbf11", "#000000"],
  "three-groups-seq": ["#a2d4ec", "#1696d2", "#0a4c6a"],
  "four-groups-cat-1": ["#000000", "#d2d2d2", "#fdbf11", "#1696d2"],
  "four-groups-cat-2": ["#1696d2", "#ec0008b", "#fdbf11", "#5c5859"],
  "four-groups-seq": ["#cfe8f3", "#73bf42", "#1696d2", "#0a4c6a"],
  "five-groups-cat-1": ["#1696d2", "#fdbf11", "#d2d2d2", "#ec008b", "#000000"],
  "five-groups-cat-2": ["#1696d2", "#0a4c6a", "#d2d2d2", "#fdbf11", "#332d2f"],
  "five-groups-seq": ["#cfe8f3", "#73bf42", "#1696d2", "#0a4c6a", "#000000"],
  "six-groups-cat-1": ["#1696d2", "#ec008b", "#fdbf11", "#000000", "#d2d2d2", "#55b748"],
  "six-groups-cat-2": ["#1696d2", "#d2d2d2", "#ec008b", "#fdbf11", "#332d2f", "#0a4c6a"],
  "six-groups-seq": ["#cfe8f3", "#a2d4ec", "#73bfe2", "#46abdb", "#1696d2", "#12719e"],
  "diverging-colors": ["#ca5800", "#fdbf11", "#fdd870", "#fff2cf", "#cfe8f3", "#73bfe2", "#1696d2", "#0a4c6a"]
}, sBe = {
  background: rBe,
  title: {
    anchor: "start",
    fontSize: oBe,
    font: G6
  },
  axisX: {
    domain: !0,
    domainColor: uq,
    domainWidth: 1,
    grid: !1,
    labelFontSize: 12,
    labelFont: YM,
    labelAngle: 0,
    tickColor: uq,
    tickSize: 5,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: G6
  },
  axisY: {
    domain: !1,
    domainWidth: 1,
    grid: !0,
    gridColor: aBe,
    gridWidth: 1,
    labelFontSize: 12,
    labelFont: YM,
    labelPadding: 8,
    ticks: !1,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: G6,
    titleAngle: 0,
    titleY: -10,
    titleX: 18
  },
  legend: {
    labelFontSize: 12,
    labelFont: YM,
    symbolSize: 100,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: G6,
    orient: "right",
    offset: 10
  },
  view: {
    stroke: "transparent"
  },
  range: {
    category: l3["six-groups-cat-1"],
    diverging: l3["diverging-colors"],
    heatmap: l3["diverging-colors"],
    ordinal: l3["six-groups-seq"],
    ramp: l3["shades-blue"]
  },
  area: {
    fill: vd
  },
  rect: {
    fill: vd
  },
  line: {
    color: vd,
    stroke: vd,
    strokeWidth: 5
  },
  trail: {
    color: vd,
    stroke: vd,
    strokeWidth: 0,
    size: 1
  },
  path: {
    stroke: vd,
    strokeWidth: 0.5
  },
  point: {
    filled: !0
  },
  text: {
    font: iBe,
    color: vd,
    fontSize: 11,
    align: "center",
    fontWeight: 400,
    size: 11
  },
  style: {
    bar: {
      fill: vd,
      stroke: null
    }
  },
  arc: {
    fill: vd
  },
  shape: {
    stroke: vd
  },
  symbol: {
    fill: vd,
    size: 30
  }
}, Oy = "#3366CC", cq = "#ccc", W6 = "Arial, sans-serif", lBe = {
  arc: {
    fill: Oy
  },
  area: {
    fill: Oy
  },
  path: {
    stroke: Oy
  },
  rect: {
    fill: Oy
  },
  shape: {
    stroke: Oy
  },
  symbol: {
    stroke: Oy
  },
  circle: {
    fill: Oy
  },
  background: "#fff",
  padding: {
    top: 10,
    right: 10,
    bottom: 10,
    left: 10
  },
  style: {
    "guide-label": {
      font: W6,
      fontSize: 12
    },
    "guide-title": {
      font: W6,
      fontSize: 12
    },
    "group-title": {
      font: W6,
      fontSize: 12
    }
  },
  title: {
    font: W6,
    fontSize: 14,
    fontWeight: "bold",
    dy: -3,
    anchor: "start"
  },
  axis: {
    gridColor: cq,
    tickColor: cq,
    domain: !1,
    grid: !0
  },
  range: {
    category: ["#4285F4", "#DB4437", "#F4B400", "#0F9D58", "#AB47BC", "#00ACC1", "#FF7043", "#9E9D24", "#5C6BC0", "#F06292", "#00796B", "#C2185B"],
    heatmap: ["#c6dafc", "#5e97f6", "#2a56c6"]
  }
}, $R = (e) => e * (1 / 3 + 1), fq = $R(9), hq = $R(10), dq = $R(12), u3 = "Segoe UI", pq = "wf_standard-font, helvetica, arial, sans-serif", mq = "#252423", c3 = "#605E5C", gq = "transparent", uBe = "#C8C6C4", Kd = "#118DFF", cBe = "#12239E", fBe = "#E66C37", hBe = "#6B007B", dBe = "#E044A7", pBe = "#744EC2", mBe = "#D9B300", gBe = "#D64550", dae = Kd, pae = "#DEEFFF", yq = [pae, dae], yBe = [pae, "#c7e4ff", "#b0d9ff", "#9aceff", "#83c3ff", "#6cb9ff", "#55aeff", "#3fa3ff", "#2898ff", dae], vBe = {
  view: {
    stroke: gq
  },
  background: gq,
  font: u3,
  header: {
    titleFont: pq,
    titleFontSize: dq,
    titleColor: mq,
    labelFont: u3,
    labelFontSize: hq,
    labelColor: c3
  },
  axis: {
    ticks: !1,
    grid: !1,
    domain: !1,
    labelColor: c3,
    labelFontSize: fq,
    titleFont: pq,
    titleColor: mq,
    titleFontSize: dq,
    titleFontWeight: "normal"
  },
  axisQuantitative: {
    tickCount: 3,
    grid: !0,
    gridColor: uBe,
    gridDash: [1, 5],
    labelFlush: !1
  },
  axisBand: {
    tickExtra: !0
  },
  axisX: {
    labelPadding: 5
  },
  axisY: {
    labelPadding: 10
  },
  bar: {
    fill: Kd
  },
  line: {
    stroke: Kd,
    strokeWidth: 3,
    strokeCap: "round",
    strokeJoin: "round"
  },
  text: {
    font: u3,
    fontSize: fq,
    fill: c3
  },
  arc: {
    fill: Kd
  },
  area: {
    fill: Kd,
    line: !0,
    opacity: 0.6
  },
  path: {
    stroke: Kd
  },
  rect: {
    fill: Kd
  },
  point: {
    fill: Kd,
    filled: !0,
    size: 75
  },
  shape: {
    stroke: Kd
  },
  symbol: {
    fill: Kd,
    strokeWidth: 1.5,
    size: 50
  },
  legend: {
    titleFont: u3,
    titleFontWeight: "bold",
    titleColor: c3,
    labelFont: u3,
    labelFontSize: hq,
    labelColor: c3,
    symbolType: "circle",
    symbolSize: 75
  },
  range: {
    category: [Kd, cBe, fBe, hBe, dBe, pBe, mBe, gBe],
    diverging: yq,
    heatmap: yq,
    ordinal: yBe
  }
}, ZM = 'IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif', xBe = 'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif', XM = 400, Y6 = {
  textPrimary: {
    g90: "#f4f4f4",
    g100: "#f4f4f4",
    white: "#161616",
    g10: "#161616"
  },
  textSecondary: {
    g90: "#c6c6c6",
    g100: "#c6c6c6",
    white: "#525252",
    g10: "#525252"
  },
  // layer
  layerAccent01: {
    white: "#e0e0e0",
    g10: "#e0e0e0",
    g90: "#525252",
    g100: "#393939"
  },
  // grid
  gridBg: {
    white: "#ffffff",
    g10: "#ffffff",
    g90: "#161616",
    g100: "#161616"
  }
}, bBe = ["#8a3ffc", "#33b1ff", "#007d79", "#ff7eb6", "#fa4d56", "#fff1f1", "#6fdc8c", "#4589ff", "#d12771", "#d2a106", "#08bdba", "#bae6ff", "#ba4e00", "#d4bbff"], _Be = ["#6929c4", "#1192e8", "#005d5d", "#9f1853", "#fa4d56", "#570408", "#198038", "#002d9c", "#ee538b", "#b28600", "#009d9a", "#012749", "#8a3800", "#a56eff"];
function dA({
  theme: e,
  background: t
}) {
  const r = ["white", "g10"].includes(e) ? "light" : "dark", a = Y6.gridBg[e], v = Y6.textPrimary[e], o = Y6.textSecondary[e], s = r === "dark" ? bBe : _Be, n = r === "dark" ? "#d4bbff" : "#6929c4";
  return {
    background: t,
    arc: {
      fill: n
    },
    area: {
      fill: n
    },
    path: {
      stroke: n
    },
    rect: {
      fill: n
    },
    shape: {
      stroke: n
    },
    symbol: {
      stroke: n
    },
    circle: {
      fill: n
    },
    view: {
      fill: a,
      stroke: a
    },
    group: {
      fill: a
    },
    title: {
      color: v,
      anchor: "start",
      dy: -15,
      fontSize: 16,
      font: ZM,
      fontWeight: 600
    },
    axis: {
      // Axis labels
      labelColor: o,
      labelFontSize: 12,
      labelFont: xBe,
      labelFontWeight: XM,
      // Axis titles
      titleColor: v,
      titleFontWeight: 600,
      titleFontSize: 12,
      // MISC
      grid: !0,
      gridColor: Y6.layerAccent01[e],
      labelAngle: 0
    },
    axisX: {
      titlePadding: 10
    },
    axisY: {
      titlePadding: 2.5
    },
    style: {
      "guide-label": {
        font: ZM,
        fill: o,
        fontWeight: XM
      },
      "guide-title": {
        font: ZM,
        fill: o,
        fontWeight: XM
      }
    },
    range: {
      category: s,
      diverging: ["#750e13", "#a2191f", "#da1e28", "#fa4d56", "#ff8389", "#ffb3b8", "#ffd7d9", "#fff1f1", "#e5f6ff", "#bae6ff", "#82cfff", "#33b1ff", "#1192e8", "#0072c3", "#00539a", "#003a6d"],
      heatmap: ["#f6f2ff", "#e8daff", "#d4bbff", "#be95ff", "#a56eff", "#8a3ffc", "#6929c4", "#491d8b", "#31135e", "#1c0f30"]
    }
  };
}
const wBe = dA({
  theme: "white",
  background: "#ffffff"
}), kBe = dA({
  theme: "g10",
  background: "#f4f4f4"
}), TBe = dA({
  theme: "g90",
  background: "#262626"
}), ABe = dA({
  theme: "g100",
  background: "#161616"
}), SBe = qNe.version, MBe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  carbong10: kBe,
  carbong100: ABe,
  carbong90: TBe,
  carbonwhite: wBe,
  dark: HNe,
  excel: GNe,
  fivethirtyeight: ZNe,
  ggplot2: XNe,
  googlecharts: lBe,
  latimes: eBe,
  powerbi: vBe,
  quartz: tBe,
  urbaninstitute: sBe,
  version: SBe,
  vox: nBe
}, Symbol.toStringTag, { value: "Module" }));
function EBe(e, t, r, a) {
  if (Qr(e))
    return `[${e.map((v) => t(Fi(v) ? v : vq(v, r))).join(", ")}]`;
  if (Oi(e)) {
    let v = "";
    const {
      title: o,
      image: s,
      ...n
    } = e;
    o && (v += `<h2>${t(o)}</h2>`), s && (v += `<img src="${new URL(t(s), a || location.href).href}">`);
    const l = Object.keys(n);
    if (l.length > 0) {
      v += "<table>";
      for (const u of l) {
        let i = n[u];
        i !== void 0 && (Oi(i) && (i = vq(i, r)), v += `<tr><td class="key">${t(u)}</td><td class="value">${t(i)}</td></tr>`);
      }
      v += "</table>";
    }
    return v || "{}";
  }
  return t(e);
}
function CBe(e) {
  const t = [];
  return function(r, a) {
    if (typeof a != "object" || a === null)
      return a;
    const v = t.indexOf(this) + 1;
    return t.length = v, t.length > e ? "[Object]" : t.indexOf(a) >= 0 ? "[Circular]" : (t.push(a), a);
  };
}
function vq(e, t) {
  return JSON.stringify(e, CBe(t));
}
var IBe = `#vg-tooltip-element {
  visibility: hidden;
  padding: 8px;
  position: fixed;
  z-index: 1000;
  font-family: sans-serif;
  font-size: 11px;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  /* The default theme is the light theme. */
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #d9d9d9;
  color: black;
}
#vg-tooltip-element.visible {
  visibility: visible;
}
#vg-tooltip-element h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 13px;
}
#vg-tooltip-element table {
  border-spacing: 0;
}
#vg-tooltip-element table tr {
  border: none;
}
#vg-tooltip-element table tr td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  padding-bottom: 2px;
}
#vg-tooltip-element table tr td.key {
  color: #808080;
  max-width: 150px;
  text-align: right;
  padding-right: 4px;
}
#vg-tooltip-element table tr td.value {
  display: block;
  max-width: 300px;
  max-height: 7em;
  text-align: left;
}
#vg-tooltip-element.dark-theme {
  background-color: rgba(32, 32, 32, 0.9);
  border: 1px solid #f5f5f5;
  color: white;
}
#vg-tooltip-element.dark-theme td.key {
  color: #bfbfbf;
}
`;
const mae = "vg-tooltip-element", DBe = {
  /**
   * X offset.
   */
  offsetX: 10,
  /**
   * Y offset.
   */
  offsetY: 10,
  /**
   * ID of the tooltip element.
   */
  id: mae,
  /**
   * ID of the tooltip CSS style.
   */
  styleId: "vega-tooltip-style",
  /**
   * The name of the theme. You can use the CSS class called [THEME]-theme to style the tooltips.
   *
   * There are two predefined themes: "light" (default) and "dark".
   */
  theme: "light",
  /**
   * Do not use the default styles provided by Vega Tooltip. If you enable this option, you need to use your own styles. It is not necessary to disable the default style when using a custom theme.
   */
  disableDefaultStyle: !1,
  /**
   * HTML sanitizer function that removes dangerous HTML to prevent XSS.
   *
   * This should be a function from string to string. You may replace it with a formatter such as a markdown formatter.
   */
  sanitize: LBe,
  /**
   * The maximum recursion depth when printing objects in the tooltip.
   */
  maxDepth: 2,
  /**
   * A function to customize the rendered HTML of the tooltip.
   * @param value A value string, or object of value strings keyed by field
   * @param sanitize The `sanitize` function from `options.sanitize`
   * @param baseURL The `baseURL` from `options.baseURL`
   * @returns {string} The returned string will become the `innerHTML` of the tooltip element
   */
  formatTooltip: EBe,
  /**
   * The baseurl to use in image paths.
   */
  baseURL: ""
};
function LBe(e) {
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;");
}
function PBe(e) {
  if (!/^[A-Za-z]+[-:.\w]*$/.test(e))
    throw new Error("Invalid HTML ID");
  return IBe.toString().replace(mae, e);
}
function OBe(e, t, r, a) {
  let v = e.clientX + r;
  v + t.width > window.innerWidth && (v = +e.clientX - r - t.width);
  let o = e.clientY + a;
  return o + t.height > window.innerHeight && (o = +e.clientY - a - t.height), {
    x: v,
    y: o
  };
}
class zBe {
  /**
   * The handler function. We bind this to this function in the constructor.
   */
  /**
   * Complete tooltip options.
   */
  /**
   * The tooltip html element.
   */
  /**
   * Create the tooltip handler and initialize the element and style.
   *
   * @param options Tooltip Options
   */
  constructor(t) {
    this.options = {
      ...DBe,
      ...t
    };
    const r = this.options.id;
    if (this.el = null, this.call = this.tooltipHandler.bind(this), !this.options.disableDefaultStyle && !document.getElementById(this.options.styleId)) {
      const a = document.createElement("style");
      a.setAttribute("id", this.options.styleId), a.innerHTML = PBe(r);
      const v = document.head;
      v.childNodes.length > 0 ? v.insertBefore(a, v.childNodes[0]) : v.appendChild(a);
    }
  }
  /**
   * The tooltip handler function.
   */
  tooltipHandler(t, r, a, v) {
    if (this.el = document.getElementById(this.options.id), this.el || (this.el = document.createElement("div"), this.el.setAttribute("id", this.options.id), this.el.classList.add("vg-tooltip"), (document.fullscreenElement ?? document.body).appendChild(this.el)), v == null || v === "") {
      this.el.classList.remove("visible", `${this.options.theme}-theme`);
      return;
    }
    this.el.innerHTML = this.options.formatTooltip(v, this.options.sanitize, this.options.maxDepth, this.options.baseURL), this.el.classList.add("visible", `${this.options.theme}-theme`);
    const {
      x: o,
      y: s
    } = OBe(r, this.el.getBoundingClientRect(), this.options.offsetX, this.options.offsetY);
    this.el.style.top = `${s}px`, this.el.style.left = `${o}px`;
  }
}
var KM = {};
function RBe(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
class FBe {
  constructor() {
    this.max = 1e3, this.map = /* @__PURE__ */ new Map();
  }
  get(t) {
    const r = this.map.get(t);
    if (r !== void 0)
      return this.map.delete(t), this.map.set(t, r), r;
  }
  delete(t) {
    return this.map.delete(t);
  }
  set(t, r) {
    if (!this.delete(t) && r !== void 0) {
      if (this.map.size >= this.max) {
        const v = this.map.keys().next().value;
        this.delete(v);
      }
      this.map.set(t, r);
    }
    return this;
  }
}
var NBe = FBe;
const BBe = Object.freeze({
  loose: !0
}), jBe = Object.freeze({}), UBe = (e) => e ? typeof e != "object" ? BBe : e : jBe;
var qR = UBe, BI = { exports: {} };
const VBe = "2.0.0", gae = 256, $Be = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9007199254740991, qBe = 16, HBe = gae - 6, GBe = ["major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease"];
var HR = {
  MAX_LENGTH: gae,
  MAX_SAFE_COMPONENT_LENGTH: qBe,
  MAX_SAFE_BUILD_LENGTH: HBe,
  MAX_SAFE_INTEGER: $Be,
  RELEASE_TYPES: GBe,
  SEMVER_SPEC_VERSION: VBe,
  FLAG_INCLUDE_PRERELEASE: 1,
  FLAG_LOOSE: 2
};
const WBe = typeof process == "object" && KM && KM.NODE_DEBUG && /\bsemver\b/i.test(KM.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
};
var pA = WBe;
(function(e, t) {
  const {
    MAX_SAFE_COMPONENT_LENGTH: r,
    MAX_SAFE_BUILD_LENGTH: a,
    MAX_LENGTH: v
  } = HR, o = pA;
  t = e.exports = {};
  const s = t.re = [], n = t.safeRe = [], l = t.src = [], u = t.t = {};
  let i = 0;
  const h = "[a-zA-Z0-9-]", p = [["\\s", 1], ["\\d", v], [h, a]], _ = (f) => {
    for (const [c, g] of p)
      f = f.split(`${c}*`).join(`${c}{0,${g}}`).split(`${c}+`).join(`${c}{1,${g}}`);
    return f;
  }, d = (f, c, g) => {
    const m = _(c), x = i++;
    o(f, x, c), u[f] = x, l[x] = c, s[x] = new RegExp(c, g ? "g" : void 0), n[x] = new RegExp(m, g ? "g" : void 0);
  };
  d("NUMERICIDENTIFIER", "0|[1-9]\\d*"), d("NUMERICIDENTIFIERLOOSE", "\\d+"), d("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), d("MAINVERSION", `(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`), d("MAINVERSIONLOOSE", `(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASEIDENTIFIER", `(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`), d("PRERELEASEIDENTIFIERLOOSE", `(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`), d("PRERELEASE", `(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`), d("PRERELEASELOOSE", `(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`), d("BUILDIDENTIFIER", `${h}+`), d("BUILD", `(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`), d("FULLPLAIN", `v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`), d("FULL", `^${l[u.FULLPLAIN]}$`), d("LOOSEPLAIN", `[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`), d("LOOSE", `^${l[u.LOOSEPLAIN]}$`), d("GTLT", "((?:<|>)?=?)"), d("XRANGEIDENTIFIERLOOSE", `${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), d("XRANGEIDENTIFIER", `${l[u.NUMERICIDENTIFIER]}|x|X|\\*`), d("XRANGEPLAIN", `[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`), d("XRANGEPLAINLOOSE", `[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`), d("XRANGE", `^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`), d("XRANGELOOSE", `^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`), d("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), d("COERCE", `${l[u.COERCEPLAIN]}(?:$|[^\\d])`), d("COERCEFULL", l[u.COERCEPLAIN] + `(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`), d("COERCERTL", l[u.COERCE], !0), d("COERCERTLFULL", l[u.COERCEFULL], !0), d("LONETILDE", "(?:~>?)"), d("TILDETRIM", `(\\s*)${l[u.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", d("TILDE", `^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`), d("TILDELOOSE", `^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`), d("LONECARET", "(?:\\^)"), d("CARETTRIM", `(\\s*)${l[u.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", d("CARET", `^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`), d("CARETLOOSE", `^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`), d("COMPARATORLOOSE", `^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`), d("COMPARATOR", `^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`), d("COMPARATORTRIM", `(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", d("HYPHENRANGE", `^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`), d("HYPHENRANGELOOSE", `^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`), d("STAR", "(<|>)?=?\\s*\\*"), d("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), d("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
})(BI, BI.exports);
var GR = BI.exports;
const xq = /^[0-9]+$/, yae = (e, t) => {
  const r = xq.test(e), a = xq.test(t);
  return r && a && (e = +e, t = +t), e === t ? 0 : r && !a ? -1 : a && !r ? 1 : e < t ? -1 : 1;
}, YBe = (e, t) => yae(t, e);
var ZBe = {
  compareIdentifiers: yae,
  rcompareIdentifiers: YBe
};
const Z6 = pA, {
  MAX_LENGTH: bq,
  MAX_SAFE_INTEGER: X6
} = HR, {
  safeRe: _q,
  t: wq
} = GR, XBe = qR, {
  compareIdentifiers: X2
} = ZBe;
let KBe = class e0 {
  constructor(t, r) {
    if (r = XBe(r), t instanceof e0) {
      if (t.loose === !!r.loose && t.includePrerelease === !!r.includePrerelease)
        return t;
      t = t.version;
    } else if (typeof t != "string")
      throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);
    if (t.length > bq)
      throw new TypeError(`version is longer than ${bq} characters`);
    Z6("SemVer", t, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
    const a = t.trim().match(r.loose ? _q[wq.LOOSE] : _q[wq.FULL]);
    if (!a)
      throw new TypeError(`Invalid Version: ${t}`);
    if (this.raw = t, this.major = +a[1], this.minor = +a[2], this.patch = +a[3], this.major > X6 || this.major < 0)
      throw new TypeError("Invalid major version");
    if (this.minor > X6 || this.minor < 0)
      throw new TypeError("Invalid minor version");
    if (this.patch > X6 || this.patch < 0)
      throw new TypeError("Invalid patch version");
    a[4] ? this.prerelease = a[4].split(".").map((v) => {
      if (/^[0-9]+$/.test(v)) {
        const o = +v;
        if (o >= 0 && o < X6)
          return o;
      }
      return v;
    }) : this.prerelease = [], this.build = a[5] ? a[5].split(".") : [], this.format();
  }
  format() {
    return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
  }
  toString() {
    return this.version;
  }
  compare(t) {
    if (Z6("SemVer.compare", this.version, this.options, t), !(t instanceof e0)) {
      if (typeof t == "string" && t === this.version)
        return 0;
      t = new e0(t, this.options);
    }
    return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t);
  }
  compareMain(t) {
    return t instanceof e0 || (t = new e0(t, this.options)), X2(this.major, t.major) || X2(this.minor, t.minor) || X2(this.patch, t.patch);
  }
  comparePre(t) {
    if (t instanceof e0 || (t = new e0(t, this.options)), this.prerelease.length && !t.prerelease.length)
      return -1;
    if (!this.prerelease.length && t.prerelease.length)
      return 1;
    if (!this.prerelease.length && !t.prerelease.length)
      return 0;
    let r = 0;
    do {
      const a = this.prerelease[r], v = t.prerelease[r];
      if (Z6("prerelease compare", r, a, v), a === void 0 && v === void 0)
        return 0;
      if (v === void 0)
        return 1;
      if (a === void 0)
        return -1;
      if (a === v)
        continue;
      return X2(a, v);
    } while (++r);
  }
  compareBuild(t) {
    t instanceof e0 || (t = new e0(t, this.options));
    let r = 0;
    do {
      const a = this.build[r], v = t.build[r];
      if (Z6("build compare", r, a, v), a === void 0 && v === void 0)
        return 0;
      if (v === void 0)
        return 1;
      if (a === void 0)
        return -1;
      if (a === v)
        continue;
      return X2(a, v);
    } while (++r);
  }
  // preminor will bump the version up to the next minor release, and immediately
  // down to pre-release. premajor and prepatch work the same way.
  inc(t, r, a) {
    switch (t) {
      case "premajor":
        this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, a);
        break;
      case "preminor":
        this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", r, a);
        break;
      case "prepatch":
        this.prerelease.length = 0, this.inc("patch", r, a), this.inc("pre", r, a);
        break;
      case "prerelease":
        this.prerelease.length === 0 && this.inc("patch", r, a), this.inc("pre", r, a);
        break;
      case "major":
        (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
        break;
      case "minor":
        (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
        break;
      case "patch":
        this.prerelease.length === 0 && this.patch++, this.prerelease = [];
        break;
      case "pre": {
        const v = Number(a) ? 1 : 0;
        if (!r && a === !1)
          throw new Error("invalid increment argument: identifier is empty");
        if (this.prerelease.length === 0)
          this.prerelease = [v];
        else {
          let o = this.prerelease.length;
          for (; --o >= 0; )
            typeof this.prerelease[o] == "number" && (this.prerelease[o]++, o = -2);
          if (o === -1) {
            if (r === this.prerelease.join(".") && a === !1)
              throw new Error("invalid increment argument: identifier already exists");
            this.prerelease.push(v);
          }
        }
        if (r) {
          let o = [r, v];
          a === !1 && (o = [r]), X2(this.prerelease[0], r) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = o) : this.prerelease = o;
        }
        break;
      }
      default:
        throw new Error(`invalid increment argument: ${t}`);
    }
    return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
  }
};
var WR = KBe;
const kq = WR, JBe = (e, t, r) => new kq(e, r).compare(new kq(t, r));
var $b = JBe;
const QBe = $b, eje = (e, t, r) => QBe(e, t, r) === 0;
var tje = eje;
const nje = $b, rje = (e, t, r) => nje(e, t, r) !== 0;
var ije = rje;
const aje = $b, oje = (e, t, r) => aje(e, t, r) > 0;
var sje = oje;
const lje = $b, uje = (e, t, r) => lje(e, t, r) >= 0;
var cje = uje;
const fje = $b, hje = (e, t, r) => fje(e, t, r) < 0;
var dje = hje;
const pje = $b, mje = (e, t, r) => pje(e, t, r) <= 0;
var gje = mje;
const yje = tje, vje = ije, xje = sje, bje = cje, _je = dje, wje = gje, kje = (e, t, r, a) => {
  switch (t) {
    case "===":
      return typeof e == "object" && (e = e.version), typeof r == "object" && (r = r.version), e === r;
    case "!==":
      return typeof e == "object" && (e = e.version), typeof r == "object" && (r = r.version), e !== r;
    case "":
    case "=":
    case "==":
      return yje(e, r, a);
    case "!=":
      return vje(e, r, a);
    case ">":
      return xje(e, r, a);
    case ">=":
      return bje(e, r, a);
    case "<":
      return _je(e, r, a);
    case "<=":
      return wje(e, r, a);
    default:
      throw new TypeError(`Invalid operator: ${t}`);
  }
};
var Tje = kje, JM, Tq;
function Aje() {
  if (Tq) return JM;
  Tq = 1;
  const e = Symbol("SemVer ANY");
  class t {
    static get ANY() {
      return e;
    }
    constructor(i, h) {
      if (h = r(h), i instanceof t) {
        if (i.loose === !!h.loose)
          return i;
        i = i.value;
      }
      i = i.trim().split(/\s+/).join(" "), s("comparator", i, h), this.options = h, this.loose = !!h.loose, this.parse(i), this.semver === e ? this.value = "" : this.value = this.operator + this.semver.version, s("comp", this);
    }
    parse(i) {
      const h = this.options.loose ? a[v.COMPARATORLOOSE] : a[v.COMPARATOR], p = i.match(h);
      if (!p)
        throw new TypeError(`Invalid comparator: ${i}`);
      this.operator = p[1] !== void 0 ? p[1] : "", this.operator === "=" && (this.operator = ""), p[2] ? this.semver = new n(p[2], this.options.loose) : this.semver = e;
    }
    toString() {
      return this.value;
    }
    test(i) {
      if (s("Comparator.test", i, this.options.loose), this.semver === e || i === e)
        return !0;
      if (typeof i == "string")
        try {
          i = new n(i, this.options);
        } catch {
          return !1;
        }
      return o(i, this.operator, this.semver, this.options);
    }
    intersects(i, h) {
      if (!(i instanceof t))
        throw new TypeError("a Comparator is required");
      return this.operator === "" ? this.value === "" ? !0 : new l(i.value, h).test(this.value) : i.operator === "" ? i.value === "" ? !0 : new l(this.value, h).test(i.semver) : (h = r(h), h.includePrerelease && (this.value === "<0.0.0-0" || i.value === "<0.0.0-0") || !h.includePrerelease && (this.value.startsWith("<0.0.0") || i.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && i.operator.startsWith(">") || this.operator.startsWith("<") && i.operator.startsWith("<") || this.semver.version === i.semver.version && this.operator.includes("=") && i.operator.includes("=") || o(this.semver, "<", i.semver, h) && this.operator.startsWith(">") && i.operator.startsWith("<") || o(this.semver, ">", i.semver, h) && this.operator.startsWith("<") && i.operator.startsWith(">")));
    }
  }
  JM = t;
  const r = qR, {
    safeRe: a,
    t: v
  } = GR, o = Tje, s = pA, n = WR, l = vae();
  return JM;
}
var QM, Aq;
function vae() {
  if (Aq) return QM;
  Aq = 1;
  class e {
    constructor(M, O) {
      if (O = a(O), M instanceof e)
        return M.loose === !!O.loose && M.includePrerelease === !!O.includePrerelease ? M : new e(M.raw, O);
      if (M instanceof v)
        return this.raw = M.value, this.set = [[M]], this.format(), this;
      if (this.options = O, this.loose = !!O.loose, this.includePrerelease = !!O.includePrerelease, this.raw = M.trim().split(/\s+/).join(" "), this.set = this.raw.split("||").map((T) => this.parseRange(T.trim())).filter((T) => T.length), !this.set.length)
        throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
      if (this.set.length > 1) {
        const T = this.set[0];
        if (this.set = this.set.filter((z) => !d(z[0])), this.set.length === 0)
          this.set = [T];
        else if (this.set.length > 1) {
          for (const z of this.set)
            if (z.length === 1 && f(z[0])) {
              this.set = [z];
              break;
            }
        }
      }
      this.format();
    }
    format() {
      return this.range = this.set.map((M) => M.join(" ").trim()).join("||").trim(), this.range;
    }
    toString() {
      return this.range;
    }
    parseRange(M) {
      const T = ((this.options.includePrerelease && p) | (this.options.loose && _)) + ":" + M, z = r.get(T);
      if (z)
        return z;
      const F = this.options.loose, U = F ? n[l.HYPHENRANGELOOSE] : n[l.HYPHENRANGE];
      M = M.replace(U, E(this.options.includePrerelease)), o("hyphen replace", M), M = M.replace(n[l.COMPARATORTRIM], u), o("comparator trim", M), M = M.replace(n[l.TILDETRIM], i), o("tilde trim", M), M = M.replace(n[l.CARETTRIM], h), o("caret trim", M);
      let V = M.split(" ").map((re) => g(re, this.options)).join(" ").split(/\s+/).map((re) => L(re, this.options));
      F && (V = V.filter((re) => (o("loose invalid filter", re, this.options), !!re.match(n[l.COMPARATORLOOSE])))), o("range list", V);
      const $ = /* @__PURE__ */ new Map(), q = V.map((re) => new v(re, this.options));
      for (const re of q) {
        if (d(re))
          return [re];
        $.set(re.value, re);
      }
      $.size > 1 && $.has("") && $.delete("");
      const K = [...$.values()];
      return r.set(T, K), K;
    }
    intersects(M, O) {
      if (!(M instanceof e))
        throw new TypeError("a Range is required");
      return this.set.some((T) => c(T, O) && M.set.some((z) => c(z, O) && T.every((F) => z.every((U) => F.intersects(U, O)))));
    }
    // if ANY of the sets match ALL of its comparators, then pass
    test(M) {
      if (!M)
        return !1;
      if (typeof M == "string")
        try {
          M = new s(M, this.options);
        } catch {
          return !1;
        }
      for (let O = 0; O < this.set.length; O++)
        if (P(this.set[O], M, this.options))
          return !0;
      return !1;
    }
  }
  QM = e;
  const t = NBe, r = new t(), a = qR, v = Aje(), o = pA, s = WR, {
    safeRe: n,
    t: l,
    comparatorTrimReplace: u,
    tildeTrimReplace: i,
    caretTrimReplace: h
  } = GR, {
    FLAG_INCLUDE_PRERELEASE: p,
    FLAG_LOOSE: _
  } = HR, d = (I) => I.value === "<0.0.0-0", f = (I) => I.value === "", c = (I, M) => {
    let O = !0;
    const T = I.slice();
    let z = T.pop();
    for (; O && T.length; )
      O = T.every((F) => z.intersects(F, M)), z = T.pop();
    return O;
  }, g = (I, M) => (o("comp", I, M), I = k(I, M), o("caret", I), I = x(I, M), o("tildes", I), I = A(I, M), o("xrange", I), I = D(I, M), o("stars", I), I), m = (I) => !I || I.toLowerCase() === "x" || I === "*", x = (I, M) => I.trim().split(/\s+/).map((O) => w(O, M)).join(" "), w = (I, M) => {
    const O = M.loose ? n[l.TILDELOOSE] : n[l.TILDE];
    return I.replace(O, (T, z, F, U, V) => {
      o("tilde", I, T, z, F, U, V);
      let $;
      return m(z) ? $ = "" : m(F) ? $ = `>=${z}.0.0 <${+z + 1}.0.0-0` : m(U) ? $ = `>=${z}.${F}.0 <${z}.${+F + 1}.0-0` : V ? (o("replaceTilde pr", V), $ = `>=${z}.${F}.${U}-${V} <${z}.${+F + 1}.0-0`) : $ = `>=${z}.${F}.${U} <${z}.${+F + 1}.0-0`, o("tilde return", $), $;
    });
  }, k = (I, M) => I.trim().split(/\s+/).map((O) => S(O, M)).join(" "), S = (I, M) => {
    o("caret", I, M);
    const O = M.loose ? n[l.CARETLOOSE] : n[l.CARET], T = M.includePrerelease ? "-0" : "";
    return I.replace(O, (z, F, U, V, $) => {
      o("caret", I, z, F, U, V, $);
      let q;
      return m(F) ? q = "" : m(U) ? q = `>=${F}.0.0${T} <${+F + 1}.0.0-0` : m(V) ? F === "0" ? q = `>=${F}.${U}.0${T} <${F}.${+U + 1}.0-0` : q = `>=${F}.${U}.0${T} <${+F + 1}.0.0-0` : $ ? (o("replaceCaret pr", $), F === "0" ? U === "0" ? q = `>=${F}.${U}.${V}-${$} <${F}.${U}.${+V + 1}-0` : q = `>=${F}.${U}.${V}-${$} <${F}.${+U + 1}.0-0` : q = `>=${F}.${U}.${V}-${$} <${+F + 1}.0.0-0`) : (o("no pr"), F === "0" ? U === "0" ? q = `>=${F}.${U}.${V}${T} <${F}.${U}.${+V + 1}-0` : q = `>=${F}.${U}.${V}${T} <${F}.${+U + 1}.0-0` : q = `>=${F}.${U}.${V} <${+F + 1}.0.0-0`), o("caret return", q), q;
    });
  }, A = (I, M) => (o("replaceXRanges", I, M), I.split(/\s+/).map((O) => C(O, M)).join(" ")), C = (I, M) => {
    I = I.trim();
    const O = M.loose ? n[l.XRANGELOOSE] : n[l.XRANGE];
    return I.replace(O, (T, z, F, U, V, $) => {
      o("xRange", I, T, z, F, U, V, $);
      const q = m(F), K = q || m(U), re = K || m(V), Y = re;
      return z === "=" && Y && (z = ""), $ = M.includePrerelease ? "-0" : "", q ? z === ">" || z === "<" ? T = "<0.0.0-0" : T = "*" : z && Y ? (K && (U = 0), V = 0, z === ">" ? (z = ">=", K ? (F = +F + 1, U = 0, V = 0) : (U = +U + 1, V = 0)) : z === "<=" && (z = "<", K ? F = +F + 1 : U = +U + 1), z === "<" && ($ = "-0"), T = `${z + F}.${U}.${V}${$}`) : K ? T = `>=${F}.0.0${$} <${+F + 1}.0.0-0` : re && (T = `>=${F}.${U}.0${$} <${F}.${+U + 1}.0-0`), o("xRange return", T), T;
    });
  }, D = (I, M) => (o("replaceStars", I, M), I.trim().replace(n[l.STAR], "")), L = (I, M) => (o("replaceGTE0", I, M), I.trim().replace(n[M.includePrerelease ? l.GTE0PRE : l.GTE0], "")), E = (I) => (M, O, T, z, F, U, V, $, q, K, re, Y) => (m(T) ? O = "" : m(z) ? O = `>=${T}.0.0${I ? "-0" : ""}` : m(F) ? O = `>=${T}.${z}.0${I ? "-0" : ""}` : U ? O = `>=${O}` : O = `>=${O}${I ? "-0" : ""}`, m(q) ? $ = "" : m(K) ? $ = `<${+q + 1}.0.0-0` : m(re) ? $ = `<${q}.${+K + 1}.0-0` : Y ? $ = `<=${q}.${K}.${re}-${Y}` : I ? $ = `<${q}.${K}.${+re + 1}-0` : $ = `<=${$}`, `${O} ${$}`.trim()), P = (I, M, O) => {
    for (let T = 0; T < I.length; T++)
      if (!I[T].test(M))
        return !1;
    if (M.prerelease.length && !O.includePrerelease) {
      for (let T = 0; T < I.length; T++)
        if (o(I[T].semver), I[T].semver !== v.ANY && I[T].semver.prerelease.length > 0) {
          const z = I[T].semver;
          if (z.major === M.major && z.minor === M.minor && z.patch === M.patch)
            return !0;
        }
      return !1;
    }
    return !0;
  };
  return QM;
}
const Sje = vae(), Mje = (e, t, r) => {
  try {
    t = new Sje(t, r);
  } catch {
    return !1;
  }
  return t.test(e);
};
var Eje = Mje, xae = /* @__PURE__ */ RBe(Eje);
function Cje(e, t, r) {
  const a = e.open(t), v = 1e4, o = 250, {
    origin: s
  } = new URL(t);
  let n = ~~(v / o);
  function l(i) {
    i.source === a && (n = 0, e.removeEventListener("message", l, !1));
  }
  e.addEventListener("message", l, !1);
  function u() {
    n <= 0 || (a.postMessage(r, s), setTimeout(u, o), n -= 1);
  }
  setTimeout(u, o);
}
var Ije = `.vega-embed {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
}
.vega-embed.has-actions {
  padding-right: 38px;
}
.vega-embed details:not([open]) > :not(summary) {
  display: none !important;
}
.vega-embed summary {
  list-style: none;
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px;
  z-index: 1000;
  background: white;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  color: #1b1e23;
  border: 1px solid #aaa;
  border-radius: 999px;
  opacity: 0.2;
  transition: opacity 0.4s ease-in;
  cursor: pointer;
  line-height: 0px;
}
.vega-embed summary::-webkit-details-marker {
  display: none;
}
.vega-embed summary:active {
  box-shadow: #aaa 0px 0px 0px 1px inset;
}
.vega-embed summary svg {
  width: 14px;
  height: 14px;
}
.vega-embed details[open] summary {
  opacity: 0.7;
}
.vega-embed:hover summary, .vega-embed:focus-within summary {
  opacity: 1 !important;
  transition: opacity 0.2s ease;
}
.vega-embed .vega-actions {
  position: absolute;
  z-index: 1001;
  top: 35px;
  right: -9px;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  padding-top: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid #d9d9d9;
  background: white;
  animation-duration: 0.15s;
  animation-name: scale-in;
  animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
  text-align: left;
}
.vega-embed .vega-actions a {
  padding: 8px 16px;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #434a56;
  text-decoration: none;
}
.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
  background-color: #f7f7f9;
  color: black;
}
.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
  content: "";
  display: inline-block;
  position: absolute;
}
.vega-embed .vega-actions::before {
  left: auto;
  right: 14px;
  top: -16px;
  border: 8px solid rgba(0, 0, 0, 0);
  border-bottom-color: #d9d9d9;
}
.vega-embed .vega-actions::after {
  left: auto;
  right: 15px;
  top: -14px;
  border: 7px solid rgba(0, 0, 0, 0);
  border-bottom-color: #fff;
}
.vega-embed .chart-wrapper.fit-x {
  width: 100%;
}
.vega-embed .chart-wrapper.fit-y {
  height: 100%;
}

.vega-embed-wrapper {
  max-width: 100%;
  overflow: auto;
  padding-right: 14px;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
`;
function bae(e, ...t) {
  for (const r of t)
    Dje(e, r);
  return e;
}
function Dje(e, t) {
  for (const r of Object.keys(t))
    bb(e, r, t[r], !0);
}
const n0 = tCe;
let Zw = ANe;
const K6 = typeof window < "u" ? window : void 0;
var Cq;
Zw === void 0 && ((Cq = K6 == null ? void 0 : K6.vl) != null && Cq.compile) && (Zw = K6.vl);
const Lje = {
  export: {
    svg: !0,
    png: !0
  },
  source: !0,
  compiled: !0,
  editor: !0
}, Pje = {
  CLICK_TO_VIEW_ACTIONS: "Click to view actions",
  COMPILED_ACTION: "View Compiled Vega",
  EDITOR_ACTION: "Open in Vega Editor",
  PNG_ACTION: "Save as PNG",
  SOURCE_ACTION: "View Source",
  SVG_ACTION: "Save as SVG"
}, F3 = {
  vega: "Vega",
  "vega-lite": "Vega-Lite"
}, Fk = {
  vega: n0.version,
  "vega-lite": Zw ? Zw.version : "not available"
}, Oje = {
  vega: (e) => e,
  "vega-lite": (e, t) => Zw.compile(e, {
    config: t
  }).spec
}, zje = `
<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
  <circle r="2" cy="8" cx="2"></circle>
  <circle r="2" cy="8" cx="8"></circle>
  <circle r="2" cy="8" cx="14"></circle>
</svg>`, Rje = "chart-wrapper";
function Fje(e) {
  return typeof e == "function";
}
function Sq(e, t, r, a) {
  const v = `<html><head>${t}</head><body><pre><code class="json">`, o = `</code></pre>${r}</body></html>`, s = window.open("");
  s.document.write(v + e + o), s.document.title = `${F3[a]} JSON Source`;
}
function Nje(e, t) {
  if (e.$schema) {
    const r = hae(e.$schema);
    t && t !== r.library && console.warn(`The given visualization spec is written in ${F3[r.library]}, but mode argument sets ${F3[t] ?? t}.`);
    const a = r.library;
    return xae(Fk[a], `^${r.version.slice(1)}`) || console.warn(`The input spec uses ${F3[a]} ${r.version}, but the current version of ${F3[a]} is v${Fk[a]}.`), a;
  }
  return "mark" in e || "encoding" in e || "layer" in e || "hconcat" in e || "vconcat" in e || "facet" in e || "repeat" in e ? "vega-lite" : "marks" in e || "signals" in e || "scales" in e || "axes" in e ? "vega" : t ?? "vega";
}
function _ae(e) {
  return !!(e && "load" in e);
}
function Mq(e) {
  return _ae(e) ? e : n0.loader(e);
}
function Bje(e) {
  var r;
  const t = ((r = e.usermeta) == null ? void 0 : r.embedOptions) ?? {};
  return Fi(t.defaultStyle) && (t.defaultStyle = !1), t;
}
async function jje(e, t, r = {}) {
  let a, v;
  Fi(t) ? (v = Mq(r.loader), a = JSON.parse(await v.load(t))) : a = t;
  const o = Bje(a), s = o.loader;
  (!v || s) && (v = Mq(r.loader ?? s));
  const n = await Eq(o, v), l = await Eq(r, v), u = {
    ...bae(l, n),
    config: xb(l.config ?? {}, n.config ?? {})
  };
  return await Vje(e, a, u, v);
}
async function Eq(e, t) {
  const r = Fi(e.config) ? JSON.parse(await t.load(e.config)) : e.config ?? {}, a = Fi(e.patch) ? JSON.parse(await t.load(e.patch)) : e.patch;
  return {
    ...e,
    ...a ? {
      patch: a
    } : {},
    ...r ? {
      config: r
    } : {}
  };
}
function Uje(e) {
  const t = e.getRootNode ? e.getRootNode() : document;
  return t instanceof ShadowRoot ? {
    root: t,
    rootContainer: t
  } : {
    root: document,
    rootContainer: document.head ?? document.body
  };
}
async function Vje(e, t, r = {}, a) {
  const v = r.theme ? xb(MBe[r.theme], r.config ?? {}) : r.config, o = Rg(r.actions) ? r.actions : bae({}, Lje, r.actions ?? {}), s = {
    ...Pje,
    ...r.i18n
  }, n = r.renderer ?? "canvas", l = r.logLevel ?? n0.Warn, u = r.downloadFileName ?? "visualization", i = typeof e == "string" ? document.querySelector(e) : e;
  if (!i)
    throw new Error(`${e} does not exist`);
  if (r.defaultStyle !== !1) {
    const k = "vega-embed-style", {
      root: S,
      rootContainer: A
    } = Uje(i);
    if (!S.getElementById(k)) {
      const C = document.createElement("style");
      C.id = k, C.innerHTML = r.defaultStyle === void 0 || r.defaultStyle === !0 ? Ije.toString() : r.defaultStyle, A.appendChild(C);
    }
  }
  const h = Nje(t, r.mode);
  let p = Oje[h](t, v);
  if (h === "vega-lite" && p.$schema) {
    const k = hae(p.$schema);
    xae(Fk.vega, `^${k.version.slice(1)}`) || console.warn(`The compiled spec uses Vega ${k.version}, but current version is v${Fk.vega}.`);
  }
  i.classList.add("vega-embed"), o && i.classList.add("has-actions"), i.innerHTML = "";
  let _ = i;
  if (o) {
    const k = document.createElement("div");
    k.classList.add(Rje), i.appendChild(k), _ = k;
  }
  const d = r.patch;
  if (d && (p = d instanceof Function ? d(p) : wT(p, d, !0, !1).newDocument), r.formatLocale && n0.formatLocale(r.formatLocale), r.timeFormatLocale && n0.timeFormatLocale(r.timeFormatLocale), r.expressionFunctions)
    for (const k in r.expressionFunctions) {
      const S = r.expressionFunctions[k];
      "fn" in S ? n0.expressionFunction(k, S.fn, S.visitor) : S instanceof Function && n0.expressionFunction(k, S);
    }
  const {
    ast: f
  } = r, c = n0.parse(p, h === "vega-lite" ? {} : v, {
    ast: f
  }), g = new (r.viewClass || n0.View)(c, {
    loader: a,
    logLevel: l,
    renderer: n,
    ...f ? {
      expr: n0.expressionInterpreter ?? r.expr ?? ECe
    } : {}
  });
  if (g.addSignalListener("autosize", (k, S) => {
    const {
      type: A
    } = S;
    A == "fit-x" ? (_.classList.add("fit-x"), _.classList.remove("fit-y")) : A == "fit-y" ? (_.classList.remove("fit-x"), _.classList.add("fit-y")) : A == "fit" ? _.classList.add("fit-x", "fit-y") : _.classList.remove("fit-x", "fit-y");
  }), r.tooltip !== !1) {
    const {
      loader: k,
      tooltip: S
    } = r, A = k && !_ae(k) ? k == null ? void 0 : k.baseURL : void 0, C = Fje(S) ? S : (
      // user provided boolean true or tooltip options
      new zBe({
        baseURL: A,
        ...S === !0 ? {} : S
      }).call
    );
    g.tooltip(C);
  }
  let {
    hover: m
  } = r;
  if (m === void 0 && (m = h === "vega"), m) {
    const {
      hoverSet: k,
      updateSet: S
    } = typeof m == "boolean" ? {} : m;
    g.hover(k, S);
  }
  r && (r.width != null && g.width(r.width), r.height != null && g.height(r.height), r.padding != null && g.padding(r.padding)), await g.initialize(_, r.bind).runAsync();
  let x;
  if (o !== !1) {
    let k = i;
    if (r.defaultStyle !== !1 || r.forceActionsMenu) {
      const A = document.createElement("details");
      A.title = s.CLICK_TO_VIEW_ACTIONS, i.append(A), k = A;
      const C = document.createElement("summary");
      C.innerHTML = zje, A.append(C), x = (D) => {
        A.contains(D.target) || A.removeAttribute("open");
      }, document.addEventListener("click", x);
    }
    const S = document.createElement("div");
    if (k.append(S), S.classList.add("vega-actions"), o === !0 || o.export !== !1) {
      for (const A of ["svg", "png"])
        if (o === !0 || o.export === !0 || o.export[A]) {
          const C = s[`${A.toUpperCase()}_ACTION`], D = document.createElement("a"), L = Oi(r.scaleFactor) ? r.scaleFactor[A] : r.scaleFactor;
          D.text = C, D.href = "#", D.target = "_blank", D.download = `${u}.${A}`, D.addEventListener("mousedown", async function(E) {
            E.preventDefault();
            const P = await g.toImageURL(A, L);
            this.href = P;
          }), S.append(D);
        }
    }
    if (o === !0 || o.source !== !1) {
      const A = document.createElement("a");
      A.text = s.SOURCE_ACTION, A.href = "#", A.addEventListener("click", function(C) {
        Sq(OM(t), r.sourceHeader ?? "", r.sourceFooter ?? "", h), C.preventDefault();
      }), S.append(A);
    }
    if (h === "vega-lite" && (o === !0 || o.compiled !== !1)) {
      const A = document.createElement("a");
      A.text = s.COMPILED_ACTION, A.href = "#", A.addEventListener("click", function(C) {
        Sq(OM(p), r.sourceHeader ?? "", r.sourceFooter ?? "", "vega"), C.preventDefault();
      }), S.append(A);
    }
    if (o === !0 || o.editor !== !1) {
      const A = r.editorUrl ?? "https://vega.github.io/editor/", C = document.createElement("a");
      C.text = s.EDITOR_ACTION, C.href = "#", C.addEventListener("click", function(D) {
        Cje(window, A, {
          config: v,
          mode: d ? "vega" : h,
          renderer: n,
          spec: OM(d ? p : t)
        }), D.preventDefault();
      }), S.append(C);
    }
  }
  function w() {
    x && document.removeEventListener("click", x), g.finalize();
  }
  return {
    view: g,
    spec: t,
    vgSpec: p,
    finalize: w,
    embedOptions: r
  };
}
const gm = "GeistMono, monospace", $je = /* @__PURE__ */ Bh({
  __name: "VegaWidget",
  props: {
    spec: {}
  },
  setup(e) {
    const t = e, r = Ys(), a = {
      axis: { labelFont: gm, titleFont: gm },
      legend: { labelFont: gm, titleFont: gm },
      header: { labelFont: gm, titleFont: gm },
      mark: { font: gm },
      title: { font: gm, subtitleFont: gm },
      background: "transparent"
    };
    let v = null;
    const o = new ResizeObserver(async () => {
      var n;
      const s = ((n = r.value) == null ? void 0 : n.clientWidth) || 0;
      await (v == null ? void 0 : v.width(s).runAsync());
    });
    return mb(async () => {
      var s;
      r.value && (v = (await jje(
        r.value,
        {
          width: ((s = r.value) == null ? void 0 : s.clientWidth) || 0,
          ...t.spec
        },
        {
          theme: O0e() ? "dark" : void 0,
          config: a,
          actions: !1
        }
      )).view, o.observe(r.value));
    }), gb(() => {
      r.value && o.unobserve(r.value), v && v.finalize();
    }), (s, n) => (Va(), ns("div", {
      ref_key: "container",
      ref: r
    }, null, 512));
  }
}), qje = /* @__PURE__ */ Ap($je, [["__scopeId", "data-v-16afdb1c"]]), Hje = /* @__PURE__ */ kG("toasts", () => {
  const e = Ys([]);
  function t(a, v) {
    const o = e.value.find(
      (s) => s.message === a && s.type === v
    );
    o ? o.count = (o.count || 1) + 1 : e.value.push({ id: z0e(), message: a, type: v, count: 1 });
  }
  function r(a) {
    e.value = e.value.filter((v) => v.id !== a);
  }
  return { toasts: e, addToast: t, dismissToast: r };
}), { protocol: Gje, hostname: Wje, port: Yje } = window.location, Zje = Yje, YR = `${Gje}//${Wje}:${Zje}/api`;
function ZR(e) {
  return e instanceof Error ? e.message : String(e);
}
function XR(e) {
  Hje().addToast(e, "error"), console.error(e);
}
function KR(e, t) {
  if (e.status !== t)
    throw new Error(`Server responded with unexpected status code: ${e.status}`);
}
async function Xje() {
  try {
    const e = await fetch(`${YR}/project/items`);
    return KR(e, 200), await e.json();
  } catch (e) {
    XR(ZR(e));
  }
  return null;
}
async function Kje(e, t) {
  try {
    const r = await fetch(`${YR}/project/views?key=${e}`, {
      method: "PUT",
      body: JSON.stringify(t),
      headers: {
        "Content-Type": "application/json"
      }
    });
    return KR(r, 201), await r.json();
  } catch (r) {
    XR(ZR(r));
  }
  return null;
}
async function Jje(e) {
  try {
    const t = await fetch(`${YR}/project/views?key=${e}`, {
      method: "DELETE"
    });
    KR(t, 202);
  } catch (t) {
    XR(ZR(t));
  }
}
const JR = /* @__PURE__ */ kG("project", () => {
  const e = iH(null), t = Ys({}), r = Ys(null);
  function a(m, x) {
    return (t.value[m] ?? []).includes(x);
  }
  async function v(m, x) {
    i();
    const w = x.replace(" (self)", "");
    a(m, w) || (t.value[m] = [...t.value[m], w], await h(m, t.value[m])), await u();
  }
  async function o(m, x) {
    if (i(), a(m, x)) {
      const w = t.value[m];
      t.value[m] = w.filter((k) => k !== x), await h(m, t.value[m]);
    }
    await u();
  }
  let s = !1;
  async function n() {
    if (!s) {
      const m = await Xje();
      m && p(m);
    }
  }
  let l = null;
  async function u() {
    s = !1, await n(), l = await P0e(n, 1500);
  }
  function i() {
    s = !0, l && l();
  }
  async function h(m, x) {
    if (e.value && t.value) {
      const w = await Kje(m, x);
      w && p(w);
    }
  }
  async function p(m) {
    e.value = m.items, t.value = m.views;
  }
  function _() {
    const m = {}, x = [], w = Object.keys(e.value || {});
    for (const S of w) {
      const A = S.split("/").filter((E) => E.length > 0), C = A[0];
      let D = m[C];
      D || (D = { name: C, children: [] }, x.push(D), m[C] = D);
      let L = D;
      for (const E of A.slice(1)) {
        L.children = L.children || [];
        const P = `${L.name}/${E}`;
        let I = m[P];
        I || (I = { name: P, children: [] }, L.children.push(I), m[P] = I), L = I;
      }
    }
    function k(S) {
      w.includes(S.name) && S.children.length > 0 && S.children.unshift({ name: `${S.name} (self)`, children: [] });
      for (const A of S.children)
        k(A);
    }
    for (const S of x)
      k(S);
    return x;
  }
  async function d(m) {
    t.value[m] = [], await h(m, t.value[m]);
  }
  async function f(m, x) {
    t.value[x] = [...t.value[m]], await h(x, t.value[x]);
  }
  async function c(m) {
    m === r.value && (r.value = null), delete t.value[m], await Jje(m);
  }
  async function g(m, x) {
    t.value[x] = t.value[m], delete t.value[m], await c(m), await h(x, t.value[x]);
  }
  return {
    items: e,
    views: t,
    currentView: r,
    displayKey: v,
    hideKey: o,
    startBackendPolling: u,
    stopBackendPolling: i,
    setProject: p,
    keysAsTree: _,
    createView: d,
    duplicateView: f,
    deleteView: c,
    renameView: g
  };
}), Qje = { class: "canvas" }, eUe = /* @__PURE__ */ Bh({
  __name: "ProjectViewCanvas",
  props: {
    showCardActions: {
      type: Boolean,
      default: !0
    }
  },
  setup(e) {
    const t = e, r = JR(), a = Hu(() => {
      const s = [];
      let n = 0;
      if (r.items !== null && r.currentView !== null) {
        const l = r.views[r.currentView];
        for (const u of l) {
          const i = r.items[u];
          if (i) {
            const h = i.media_type || "";
            let p;
            [
              "text/markdown",
              "application/vnd.dataframe+json",
              "application/vnd.sklearn.estimator+html",
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/svg+xml"
            ].includes(h) ? p = i.value : (p = atob(i.value), h.includes("json") && (p = JSON.parse(p)));
            const _ = new Date(i.created_at), d = new Date(i.updated_at);
            s.push({
              key: u,
              mediaType: h,
              data: p,
              createdAt: _,
              updatedAt: d,
              index: n
            }), n++;
          }
        }
      }
      return s;
    });
    function v(s) {
      r.currentView && r.hideKey(r.currentView, s);
    }
    function o(s, n) {
      const l = /* @__PURE__ */ new Date();
      return `Created ${yN(s, l)} ago, updated ${yN(n, l)} ago`;
    }
    return (s, n) => (Va(), ns("div", Qje, [
      (Va(!0), ns(jc, null, t8(a.value, ({ key: l, mediaType: u, data: i, createdAt: h, updatedAt: p }) => (Va(), Qd(Cme, {
        key: l,
        title: l.toString(),
        subtitle: o(h, p),
        showActions: t.showCardActions,
        class: "canvas-element",
        onCardRemoved: (_) => v(l)
      }, {
        default: pb(() => [
          u === "application/vnd.dataframe+json" ? (Va(), Qd(ofe, {
            key: 0,
            columns: i.columns,
            data: i.data
          }, null, 8, ["columns", "data"])) : Nc("", !0),
          ["image/svg+xml", "image/png", "image/jpeg", "image/webp"].includes(u) ? (Va(), Qd(cfe, {
            key: 1,
            mediaType: u,
            "base64-src": i,
            alt: l.toString()
          }, null, 8, ["mediaType", "base64-src", "alt"])) : Nc("", !0),
          u === "text/markdown" ? (Va(), Qd(F0e, {
            key: 2,
            source: i
          }, null, 8, ["source"])) : Nc("", !0),
          u === "application/vnd.vega.v5+json" ? (Va(), Qd(qje, {
            key: 3,
            spec: i
          }, null, 8, ["spec"])) : Nc("", !0),
          u === "application/vnd.plotly.v1+json" ? (Va(), Qd(B0e, {
            key: 4,
            spec: i
          }, null, 8, ["spec"])) : Nc("", !0),
          u === "application/vnd.sklearn.estimator+html" ? (Va(), Qd(vN, {
            key: 5,
            src: i
          }, null, 8, ["src"])) : Nc("", !0),
          u === "text/html" ? (Va(), Qd(vN, {
            key: 6,
            src: i
          }, null, 8, ["src"])) : Nc("", !0)
        ]),
        _: 2
      }, 1032, ["title", "subtitle", "showActions", "onCardRemoved"]))), 128))
    ]));
  }
}), tUe = /* @__PURE__ */ Ap(eUe, [["__scopeId", "data-v-4d905552"]]), nUe = { class: "share" }, rUe = { class: "share-header" }, iUe = /* @__PURE__ */ Bh({
  __name: "ShareApp",
  setup(e) {
    const t = JR();
    return (r, a) => (Va(), ns("div", nUe, [
      ql("div", rUe, [
        ql("h1", null, bd(pg(t).currentView), 1)
      ]),
      Iu(pg(LG), { class: "canvas-wrapper" }, {
        default: pb(() => [
          Iu(tUe, { showCardActions: !1 })
        ]),
        _: 1
      })
    ]));
  }
}), aUe = /* @__PURE__ */ Ap(iUe, [["__scopeId", "data-v-9fe21859"]]);
async function HUe(e) {
  var v;
  const t = qle(aUe);
  t.use(_ue()), t.mount("#app");
  const r = JSON.parse(((v = document.getElementById("project-data")) == null ? void 0 : v.innerText) || "{}"), a = JR();
  await a.setProject(r), a.currentView = e;
}
export {
  HUe as default
};
